Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/descendant

Package Overview
Dependencies
Maintainers
3
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/descendant - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

4

dist/chakra-ui-descendant.cjs.dev.js

@@ -109,3 +109,3 @@ 'use strict';

descendant.index = index;
descendant.node.dataset.index = descendant.index.toString();
descendant.node.dataset["index"] = descendant.index.toString();
});

@@ -297,3 +297,3 @@ };

if (!ref.current) return;
var dataIndex = Number(ref.current.dataset.index);
var dataIndex = Number(ref.current.dataset["index"]);

@@ -300,0 +300,0 @@ if (index != dataIndex && !Number.isNaN(dataIndex)) {

@@ -109,3 +109,3 @@ 'use strict';

descendant.index = index;
descendant.node.dataset.index = descendant.index.toString();
descendant.node.dataset["index"] = descendant.index.toString();
});

@@ -297,3 +297,3 @@ };

if (!ref.current) return;
var dataIndex = Number(ref.current.dataset.index);
var dataIndex = Number(ref.current.dataset["index"]);

@@ -300,0 +300,0 @@ if (index != dataIndex && !Number.isNaN(dataIndex)) {

@@ -105,3 +105,3 @@ import { createContext, mergeRefs } from '@chakra-ui/react-utils';

descendant.index = index;
descendant.node.dataset.index = descendant.index.toString();
descendant.node.dataset["index"] = descendant.index.toString();
});

@@ -293,3 +293,3 @@ };

if (!ref.current) return;
var dataIndex = Number(ref.current.dataset.index);
var dataIndex = Number(ref.current.dataset["index"]);

@@ -296,0 +296,0 @@ if (index != dataIndex && !Number.isNaN(dataIndex)) {

{
"name": "@chakra-ui/descendant",
"version": "2.1.1",
"version": "2.1.2",
"description": "Register child nodes of a react element for better accessibility",

@@ -38,3 +38,3 @@ "keywords": [

"dependencies": {
"@chakra-ui/react-utils": "^1.2.1"
"@chakra-ui/react-utils": "^1.2.2"
},

@@ -41,0 +41,0 @@ "peerDependencies": {

@@ -34,3 +34,3 @@ import { sortNodes, isElement, getNextIndex, getPrevIndex } from "./utils"

T extends HTMLElement,
K extends Record<string, any> = {}
K extends Record<string, any> = {},
> {

@@ -65,3 +65,3 @@ private descendants = new Map<T, Descendant<T, K>>()

descendant.index = index
descendant.node.dataset.index = descendant.index.toString()
descendant.node.dataset["index"] = descendant.index.toString()
})

@@ -68,0 +68,0 @@ }

@@ -29,9 +29,8 @@ import { createContext, mergeRefs } from "@chakra-ui/react-utils"

const [
DescendantsContextProvider,
useDescendantsContext,
] = createContext<UseDescendantsReturn>({
name: "DescendantsProvider",
errorMessage: "useDescendantsContext must be used within DescendantsProvider",
})
const [DescendantsContextProvider, useDescendantsContext] =
createContext<UseDescendantsReturn>({
name: "DescendantsProvider",
errorMessage:
"useDescendantsContext must be used within DescendantsProvider",
})

@@ -61,3 +60,3 @@ /**

if (!ref.current) return
const dataIndex = Number(ref.current.dataset.index)
const dataIndex = Number(ref.current.dataset["index"])
if (index != dataIndex && !Number.isNaN(dataIndex)) {

@@ -87,3 +86,3 @@ setIndex(dataIndex)

T extends HTMLElement = HTMLElement,
K = {}
K = {},
>() {

@@ -90,0 +89,0 @@ type ContextProviderType = React.Provider<DescendantsManager<T, K>>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc