@chakra-ui/live-region
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -29,3 +29,6 @@ "use strict"; | ||
// src/live-region.ts | ||
var import_utils = require("@chakra-ui/utils"); | ||
function isDom() { | ||
return Boolean(globalThis == null ? void 0 : globalThis.document); | ||
} | ||
var isBrowser = isDom(); | ||
var LiveRegion = class { | ||
@@ -68,3 +71,3 @@ region; | ||
id: "chakra-a11y-live-region", | ||
parentNode: import_utils.isBrowser ? document.body : void 0 | ||
parentNode: isBrowser ? document.body : void 0 | ||
}; | ||
@@ -77,6 +80,6 @@ if (options) { | ||
function getRegion(options) { | ||
let region = import_utils.isBrowser ? document.getElementById(options.id) : null; | ||
let region = isBrowser ? document.getElementById(options.id) : null; | ||
if (region) | ||
return region; | ||
if (import_utils.isBrowser) { | ||
if (isBrowser) { | ||
region = document.createElement("div"); | ||
@@ -83,0 +86,0 @@ setup(region, options); |
// src/live-region.ts | ||
import { isBrowser } from "@chakra-ui/utils"; | ||
function isDom() { | ||
return Boolean(globalThis == null ? void 0 : globalThis.document); | ||
} | ||
var isBrowser = isDom(); | ||
var LiveRegion = class { | ||
@@ -4,0 +7,0 @@ region; |
{ | ||
"name": "@chakra-ui/live-region", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "Aria live region for React components", | ||
@@ -35,5 +35,2 @@ "keywords": [ | ||
}, | ||
"dependencies": { | ||
"@chakra-ui/utils": "2.0.8" | ||
}, | ||
"peerDependencies": { | ||
@@ -51,4 +48,3 @@ "react": ">=18" | ||
"build:fast": "tsup src/index.ts" | ||
}, | ||
"readme": "# Live Regions\n\nARIA Live Regions are used to communicate important information to screen reader\nsoftware.\n\n## Installation\n\n```sh\nyarn add @chakra-ui/live-region\n```\n\n## Import components\n\n```jsx\nimport { LiveRegion, useLiveRegion } from \"@chakra-ui/live-region\"\n```\n\n## Usage\n\n```jsx\nimport { useLiveRegion } from \"@chakra-ui/live-region\"\n\nfunction Example() {\n const region = useLiveRegion()\n return (\n <button\n onClick={() => {\n region.speak(\"Filtering categories was successful\")\n }}\n >\n Click me\n </button>\n )\n}\n```\n" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
259
0
10020
- Removed@chakra-ui/utils@2.0.8
- Removed@chakra-ui/utils@2.0.8(transitive)
- Removed@types/lodash@4.17.13(transitive)
- Removed@types/lodash.mergewith@4.6.6(transitive)
- Removedcss-box-model@1.2.1(transitive)
- Removedframesync@5.3.0(transitive)
- Removedlodash.mergewith@4.6.2(transitive)
- Removedtiny-invariant@1.3.3(transitive)
- Removedtslib@2.8.1(transitive)