@radix-ui/react-focus-guards 1.0.1 → 1.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
- export function FocusGuards(props: any): any;
1
+ declare function FocusGuards(props: any): any;
2
2
  /**
3
3
  * Injects a pair of focus guards at the edges of the whole DOM tree
4
4
  * to ensure `focusin` & `focusout` events can be caught consistently.
5
5
  */
6
- export function useFocusGuards(): void;
7
- export const Root: typeof FocusGuards;
6
+ declare function useFocusGuards(): void;
7
+ declare const Root: typeof FocusGuards;
8
8
 
9
- //# sourceMappingURL=index.d.ts.map
9
+ export { FocusGuards, Root, useFocusGuards };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export function FocusGuards(props: any): any;
1
+ declare function FocusGuards(props: any): any;
2
2
  /**
3
3
  * Injects a pair of focus guards at the edges of the whole DOM tree
4
4
  * to ensure `focusin` & `focusout` events can be caught consistently.
5
5
  */
6
- export function useFocusGuards(): void;
7
- export const Root: typeof FocusGuards;
6
+ declare function useFocusGuards(): void;
7
+ declare const Root: typeof FocusGuards;
8
8
 
9
- //# sourceMappingURL=index.d.ts.map
9
+ export { FocusGuards, Root, useFocusGuards };
package/dist/index.js CHANGED
@@ -1,45 +1,62 @@
1
- var $cnctE$react = require("react");
1
+ "use strict";
2
+ (() => {
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
2
31
 
3
- function $parcel$export(e, n, v, s) {
4
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
5
- }
6
-
7
- $parcel$export(module.exports, "FocusGuards", () => $71476a6ed7dbbaf3$export$ac5b58043b79449b);
8
- $parcel$export(module.exports, "Root", () => $71476a6ed7dbbaf3$export$be92b6f5f03c0fe9);
9
- $parcel$export(module.exports, "useFocusGuards", () => $71476a6ed7dbbaf3$export$b7ece24a22aeda8c);
10
-
11
- /** Number of components which have requested interest to have focus guards */ let $71476a6ed7dbbaf3$var$count = 0;
12
- function $71476a6ed7dbbaf3$export$ac5b58043b79449b(props) {
13
- $71476a6ed7dbbaf3$export$b7ece24a22aeda8c();
32
+ // packages/react/focus-guards/src/FocusGuards.tsx
33
+ var React = __toESM(__require("react"));
34
+ var count = 0;
35
+ function FocusGuards(props) {
36
+ useFocusGuards();
14
37
  return props.children;
15
- }
16
- /**
17
- * Injects a pair of focus guards at the edges of the whole DOM tree
18
- * to ensure `focusin` & `focusout` events can be caught consistently.
19
- */ function $71476a6ed7dbbaf3$export$b7ece24a22aeda8c() {
20
- $cnctE$react.useEffect(()=>{
21
- var _edgeGuards$, _edgeGuards$2;
22
- const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
23
- document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $71476a6ed7dbbaf3$var$createFocusGuard());
24
- document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $71476a6ed7dbbaf3$var$createFocusGuard());
25
- $71476a6ed7dbbaf3$var$count++;
26
- return ()=>{
27
- if ($71476a6ed7dbbaf3$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
28
- );
29
- $71476a6ed7dbbaf3$var$count--;
30
- };
38
+ }
39
+ function useFocusGuards() {
40
+ React.useEffect(() => {
41
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
42
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
43
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
44
+ count++;
45
+ return () => {
46
+ if (count === 1) {
47
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
48
+ }
49
+ count--;
50
+ };
31
51
  }, []);
32
- }
33
- function $71476a6ed7dbbaf3$var$createFocusGuard() {
34
- const element = document.createElement('span');
35
- element.setAttribute('data-radix-focus-guard', '');
52
+ }
53
+ function createFocusGuard() {
54
+ const element = document.createElement("span");
55
+ element.setAttribute("data-radix-focus-guard", "");
36
56
  element.tabIndex = 0;
37
- element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
57
+ element.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none";
38
58
  return element;
39
- }
40
- const $71476a6ed7dbbaf3$export$be92b6f5f03c0fe9 = $71476a6ed7dbbaf3$export$ac5b58043b79449b;
41
-
42
-
43
-
44
-
59
+ }
60
+ var Root = FocusGuards;
61
+ })();
45
62
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1,7 @@
1
- {"mappings":";;;;;;;;;ACAA;AAEA,8EAAA,CACA,IAAII,2BAAK,GAAG,CAAZ,AAAA;AAEA,SAASJ,yCAAT,CAAqBK,KAArB,EAAiC;IAC/BH,yCAAc,EAAdA,CAAAA;IACA,OAAOG,KAAK,CAACC,QAAb,CAAA;CACD;AAED;;;GAGA,CACA,SAASJ,yCAAT,GAA0B;IACxBC,sBAAA,CAAgB,IAAM;QAAA,IAAA,YAAA,EAAA,aAAA,AAAA;QACpB,MAAMK,UAAU,GAAGC,QAAQ,CAACC,gBAAT,CAA0B,0BAA1B,CAAnB,AAAA;QACAD,QAAQ,CAACE,IAAT,CAAcC,qBAAd,CAAoC,YAApC,EAAA,AAAA,CAAA,YAAA,GAAkDJ,UAAU,CAAC,CAAD,CAA5D,CAAA,KAAA,IAAA,IAAA,YAAA,KAAA,KAAA,CAAA,GAAA,YAAA,GAAmEK,sCAAgB,EAAnF,CAAAJ,CAAAA;QACAA,QAAQ,CAACE,IAAT,CAAcC,qBAAd,CAAoC,WAApC,EAAA,AAAA,CAAA,aAAA,GAAiDJ,UAAU,CAAC,CAAD,CAA3D,CAAA,KAAA,IAAA,IAAA,aAAA,KAAA,KAAA,CAAA,GAAA,aAAA,GAAkEK,sCAAgB,EAAlF,CAAAJ,CAAAA;QACAL,2BAAK,EAALA,CAAAA;QAEA,OAAO,IAAM;YACX,IAAIA,2BAAK,KAAK,CAAd,EACEK,QAAQ,CAACC,gBAAT,CAA0B,0BAA1B,CAAA,CAAsDI,OAAtD,CAA+DC,CAAAA,IAAD,GAAUA,IAAI,CAACC,MAAL,EAAxE;YAAA,CAAAP,CAAAA;YAEFL,2BAAK,EAALA,CAAAA;SAJF,CAKC;KAXH,EAYG,EAZH,CAYC,CAAA;CACF;AAED,SAASS,sCAAT,GAA4B;IAC1B,MAAMI,OAAO,GAAGR,QAAQ,CAACS,aAAT,CAAuB,MAAvB,CAAhB,AAAA;IACAD,OAAO,CAACE,YAAR,CAAqB,wBAArB,EAA+C,EAA/C,CAAAF,CAAAA;IACAA,OAAO,CAACG,QAAR,GAAmB,CAAnB,CAAAH;IACAA,OAAO,CAACI,KAAR,CAAcC,OAAd,GAAwB,kEAAxB,CAAAL;IACA,OAAOA,OAAP,CAAA;CACD;AAED,MAAMhB,yCAAI,GAAGD,yCAAb,AAAA;;ADtCA","sources":["packages/react/focus-guards/src/index.ts","packages/react/focus-guards/src/FocusGuards.tsx"],"sourcesContent":["export {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n} from './FocusGuards';\n","import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],"names":["FocusGuards","Root","useFocusGuards","React","count","props","children","useEffect","edgeGuards","document","querySelectorAll","body","insertAdjacentElement","createFocusGuard","forEach","node","remove","element","createElement","setAttribute","tabIndex","style","cssText"],"version":3,"file":"index.js.map"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/FocusGuards.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAuB;AAGvB,MAAI,QAAQ;AAEZ,WAAS,YAAY,OAAY;AAC/B,mBAAe;AACf,WAAO,MAAM;AAAA,EACf;AAMA,WAAS,iBAAiB;AACxB,IAAM,gBAAU,MAAM;AACpB,YAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,eAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,eAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,aAAO,MAAM;AACX,YAAI,UAAU,GAAG;AACf,mBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,QACvF;AACA;AAAA,MACF;AAAA,IACF,GAAG,CAAC,CAAC;AAAA,EACP;AAEA,WAAS,mBAAmB;AAC1B,UAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,YAAQ,aAAa,0BAA0B,EAAE;AACjD,YAAQ,WAAW;AACnB,YAAQ,MAAM,UAAU;AACxB,WAAO;AAAA,EACT;AAEA,MAAM,OAAO;",
6
+ "names": []
7
+ }
package/dist/index.mjs CHANGED
@@ -1,39 +1,35 @@
1
- import {useEffect as $1wErz$useEffect} from "react";
2
-
3
-
4
- /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;
5
- function $3db38b7d1fb3fe6a$export$ac5b58043b79449b(props) {
6
- $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
7
- return props.children;
1
+ // packages/react/focus-guards/src/FocusGuards.tsx
2
+ import * as React from "react";
3
+ var count = 0;
4
+ function FocusGuards(props) {
5
+ useFocusGuards();
6
+ return props.children;
8
7
  }
9
- /**
10
- * Injects a pair of focus guards at the edges of the whole DOM tree
11
- * to ensure `focusin` & `focusout` events can be caught consistently.
12
- */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
13
- $1wErz$useEffect(()=>{
14
- var _edgeGuards$, _edgeGuards$2;
15
- const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
16
- document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
17
- document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
18
- $3db38b7d1fb3fe6a$var$count++;
19
- return ()=>{
20
- if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
21
- );
22
- $3db38b7d1fb3fe6a$var$count--;
23
- };
24
- }, []);
8
+ function useFocusGuards() {
9
+ React.useEffect(() => {
10
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
11
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
12
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
13
+ count++;
14
+ return () => {
15
+ if (count === 1) {
16
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
17
+ }
18
+ count--;
19
+ };
20
+ }, []);
25
21
  }
26
- function $3db38b7d1fb3fe6a$var$createFocusGuard() {
27
- const element = document.createElement('span');
28
- element.setAttribute('data-radix-focus-guard', '');
29
- element.tabIndex = 0;
30
- element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
31
- return element;
22
+ function createFocusGuard() {
23
+ const element = document.createElement("span");
24
+ element.setAttribute("data-radix-focus-guard", "");
25
+ element.tabIndex = 0;
26
+ element.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none";
27
+ return element;
32
28
  }
33
- const $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9 = $3db38b7d1fb3fe6a$export$ac5b58043b79449b;
34
-
35
-
36
-
37
-
38
- export {$3db38b7d1fb3fe6a$export$ac5b58043b79449b as FocusGuards, $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9 as Root, $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c as useFocusGuards};
29
+ var Root = FocusGuards;
30
+ export {
31
+ FocusGuards,
32
+ Root,
33
+ useFocusGuards
34
+ };
39
35
  //# sourceMappingURL=index.mjs.map
@@ -1 +1,7 @@
1
- {"mappings":";;ACAA;AAEA,8EAAA,CACA,IAAII,2BAAK,GAAG,CAAZ,AAAA;AAEA,SAASJ,yCAAT,CAAqBK,KAArB,EAAiC;IAC/BH,yCAAc,EAAdA,CAAAA;IACA,OAAOG,KAAK,CAACC,QAAb,CAAA;CACD;AAED;;;GAGA,CACA,SAASJ,yCAAT,GAA0B;IACxBC,gBAAA,CAAgB,IAAM;QAAA,IAAA,YAAA,EAAA,aAAA,AAAA;QACpB,MAAMK,UAAU,GAAGC,QAAQ,CAACC,gBAAT,CAA0B,0BAA1B,CAAnB,AAAA;QACAD,QAAQ,CAACE,IAAT,CAAcC,qBAAd,CAAoC,YAApC,EAAA,AAAA,CAAA,YAAA,GAAkDJ,UAAU,CAAC,CAAD,CAA5D,CAAA,KAAA,IAAA,IAAA,YAAA,KAAA,KAAA,CAAA,GAAA,YAAA,GAAmEK,sCAAgB,EAAnF,CAAAJ,CAAAA;QACAA,QAAQ,CAACE,IAAT,CAAcC,qBAAd,CAAoC,WAApC,EAAA,AAAA,CAAA,aAAA,GAAiDJ,UAAU,CAAC,CAAD,CAA3D,CAAA,KAAA,IAAA,IAAA,aAAA,KAAA,KAAA,CAAA,GAAA,aAAA,GAAkEK,sCAAgB,EAAlF,CAAAJ,CAAAA;QACAL,2BAAK,EAALA,CAAAA;QAEA,OAAO,IAAM;YACX,IAAIA,2BAAK,KAAK,CAAd,EACEK,QAAQ,CAACC,gBAAT,CAA0B,0BAA1B,CAAA,CAAsDI,OAAtD,CAA+DC,CAAAA,IAAD,GAAUA,IAAI,CAACC,MAAL,EAAxE;YAAA,CAAAP,CAAAA;YAEFL,2BAAK,EAALA,CAAAA;SAJF,CAKC;KAXH,EAYG,EAZH,CAYC,CAAA;CACF;AAED,SAASS,sCAAT,GAA4B;IAC1B,MAAMI,OAAO,GAAGR,QAAQ,CAACS,aAAT,CAAuB,MAAvB,CAAhB,AAAA;IACAD,OAAO,CAACE,YAAR,CAAqB,wBAArB,EAA+C,EAA/C,CAAAF,CAAAA;IACAA,OAAO,CAACG,QAAR,GAAmB,CAAnB,CAAAH;IACAA,OAAO,CAACI,KAAR,CAAcC,OAAd,GAAwB,kEAAxB,CAAAL;IACA,OAAOA,OAAP,CAAA;CACD;AAED,MAAMhB,yCAAI,GAAGD,yCAAb,AAAA;;ADtCA","sources":["packages/react/focus-guards/src/index.ts","packages/react/focus-guards/src/FocusGuards.tsx"],"sourcesContent":["export {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n} from './FocusGuards';\n","import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],"names":["FocusGuards","Root","useFocusGuards","React","count","props","children","useEffect","edgeGuards","document","querySelectorAll","body","insertAdjacentElement","createFocusGuard","forEach","node","remove","element","createElement","setAttribute","tabIndex","style","cssText"],"version":3,"file":"index.mjs.map"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/FocusGuards.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],
5
+ "mappings": ";AAAA,YAAY,WAAW;AAGvB,IAAI,QAAQ;AAEZ,SAAS,YAAY,OAAY;AAC/B,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AACxB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEA,SAAS,mBAAmB;AAC1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,SAAO;AACT;AAEA,IAAM,OAAO;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-focus-guards",
3
- "version": "1.0.1",
3
+ "version": "1.1.0-rc.1",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -44,7 +44,5 @@
44
44
  "bugs": {
45
45
  "url": "https://github.com/radix-ui/primitives/issues"
46
46
  },
47
- "dependencies": {
48
- "@babel/runtime": "^7.13.10"
49
- }
47
+ "stableVersion": "1.0.1"
50
48
  }
@@ -1 +0,0 @@
1
- {"mappings":"AAKA,4BAAqB,KAAK,EAAE,GAAG,OAG9B;AAED;;;GAGG;AACH,uCAcC;AAUD,OAAA,MAAM,wBAAkB,CAAC","sources":["packages/react/focus-guards/src/packages/react/focus-guards/src/FocusGuards.tsx","packages/react/focus-guards/src/packages/react/focus-guards/src/index.ts","packages/react/focus-guards/src/index.ts"],"sourcesContent":[null,null,"export {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n} from './FocusGuards';\n"],"names":[],"version":3,"file":"index.d.ts.map"}