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

@chakra-ui/live-region

Package Overview
Dependencies
Maintainers
3
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/live-region - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

11

dist/index.cjs.js

@@ -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"
}
}
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