@drjoshcsimmons/scl 0.1.4 → 0.1.5
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/index100.js +8 -14
- package/dist/index101.js +50 -9
- package/dist/index102.js +218 -49
- package/dist/index103.js +29 -218
- package/dist/index104.js +178 -27
- package/dist/index11.js +2 -2
- package/dist/index110.js +1 -1
- package/dist/index112.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index131.js +1 -1
- package/dist/index132.js +1 -1
- package/dist/index137.js +11 -21
- package/dist/index138.js +26 -11
- package/dist/index139.js +4 -27
- package/dist/index14.js +2 -2
- package/dist/index140.js +22 -4
- package/dist/index15.js +2 -2
- package/dist/index17.js +1 -1
- package/dist/index18.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index21.js +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.js +1 -1
- package/dist/index24.js +1 -1
- package/dist/index25.js +3 -3
- package/dist/index26.js +1 -1
- package/dist/index27.js +3 -3
- package/dist/index29.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index36.js +2 -2
- package/dist/index37.js +1 -1
- package/dist/index45.js +7 -7
- package/dist/index47.js +33 -435
- package/dist/index48.js +111 -147
- package/dist/index49.js +65 -302
- package/dist/index5.js +1 -1
- package/dist/index50.js +60 -12
- package/dist/index51.js +253 -32
- package/dist/index52.js +7 -7
- package/dist/index53.js +302 -65
- package/dist/index54.js +4 -4
- package/dist/index55.js +4 -1
- package/dist/index56.js +9 -249
- package/dist/index57.js +432 -57
- package/dist/index58.js +6 -6
- package/dist/index6.js +1 -1
- package/dist/index61.js +234 -99
- package/dist/index62.js +12 -260
- package/dist/index63.js +860 -12
- package/dist/index64.js +9 -82
- package/dist/index65.js +505 -211
- package/dist/index66.js +138 -507
- package/dist/index67.js +17 -21
- package/dist/index68.js +16 -854
- package/dist/index69.js +336 -9
- package/dist/index7.js +1 -1
- package/dist/index70.js +126 -250
- package/dist/index71.js +82 -31
- package/dist/index72.js +216 -311
- package/dist/index73.js +222 -214
- package/dist/index74.js +30 -17
- package/dist/index75.js +197 -91
- package/dist/index77.js +25 -44
- package/dist/index78.js +5 -25
- package/dist/index79.js +53 -6
- package/dist/index8.js +1 -1
- package/dist/index80.js +52 -49
- package/dist/index81.js +10 -33
- package/dist/index82.js +4 -11
- package/dist/index83.js +30 -8
- package/dist/index84.js +12 -3
- package/dist/index85.js +51 -5
- package/dist/index86.js +33 -24
- package/dist/index87.js +65 -177
- package/dist/index88.js +10 -68
- package/dist/index9.js +2 -2
- package/dist/index90.js +46 -30
- package/dist/index91.js +7 -54
- package/dist/index92.js +3 -10
- package/dist/index93.js +6 -4
- package/dist/index94.js +24 -12
- package/dist/index95.js +647 -51
- package/dist/index96.js +112 -637
- package/dist/index97.js +126 -116
- package/dist/index98.js +13 -134
- package/dist/index99.js +14 -13
- package/package.json +1 -1
package/dist/index97.js
CHANGED
|
@@ -1,127 +1,137 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { Primitive as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
|
|
51
|
-
onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
|
|
52
|
-
onPointerDownCapture: m(
|
|
53
|
-
r.onPointerDownCapture,
|
|
54
|
-
_.onPointerDownCapture
|
|
55
|
-
)
|
|
1
|
+
import * as d from "react";
|
|
2
|
+
import { useComposedRefs as R } from "./index77.js";
|
|
3
|
+
import { Primitive as M } from "./index86.js";
|
|
4
|
+
import { useCallbackRef as y } from "./index81.js";
|
|
5
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
6
|
+
var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, n) => {
|
|
7
|
+
const {
|
|
8
|
+
loop: t = !1,
|
|
9
|
+
trapped: u = !1,
|
|
10
|
+
onMountAutoFocus: p,
|
|
11
|
+
onUnmountAutoFocus: L,
|
|
12
|
+
...g
|
|
13
|
+
} = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = R(n, (s) => U(s)), a = d.useRef({
|
|
14
|
+
paused: !1,
|
|
15
|
+
pause() {
|
|
16
|
+
this.paused = !0;
|
|
17
|
+
},
|
|
18
|
+
resume() {
|
|
19
|
+
this.paused = !1;
|
|
20
|
+
}
|
|
21
|
+
}).current;
|
|
22
|
+
d.useEffect(() => {
|
|
23
|
+
if (u) {
|
|
24
|
+
let s = function(i) {
|
|
25
|
+
if (a.paused || !o) return;
|
|
26
|
+
const c = i.target;
|
|
27
|
+
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
|
28
|
+
}, l = function(i) {
|
|
29
|
+
if (a.paused || !o) return;
|
|
30
|
+
const c = i.relatedTarget;
|
|
31
|
+
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
|
32
|
+
}, r = function(i) {
|
|
33
|
+
if (document.activeElement === document.body)
|
|
34
|
+
for (const h of i)
|
|
35
|
+
h.removedNodes.length > 0 && f(o);
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
|
38
|
+
const m = new MutationObserver(r);
|
|
39
|
+
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
40
|
+
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [u, o, a.paused]), d.useEffect(() => {
|
|
44
|
+
if (o) {
|
|
45
|
+
S.add(a);
|
|
46
|
+
const s = document.activeElement;
|
|
47
|
+
if (!o.contains(s)) {
|
|
48
|
+
const r = new CustomEvent(F, N);
|
|
49
|
+
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
|
56
50
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const i = n.useContext(B), o = n.useRef(null), t = R(e, o);
|
|
63
|
-
return n.useEffect(() => {
|
|
64
|
-
const a = o.current;
|
|
65
|
-
if (a)
|
|
66
|
-
return i.branches.add(a), () => {
|
|
67
|
-
i.branches.delete(a);
|
|
51
|
+
return () => {
|
|
52
|
+
o.removeEventListener(F, E), setTimeout(() => {
|
|
53
|
+
const r = new CustomEvent(T, N);
|
|
54
|
+
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
|
|
55
|
+
}, 0);
|
|
68
56
|
};
|
|
69
|
-
|
|
57
|
+
}
|
|
58
|
+
}, [o, E, v, a]);
|
|
59
|
+
const P = d.useCallback(
|
|
60
|
+
(s) => {
|
|
61
|
+
if (!t && !u || a.paused) return;
|
|
62
|
+
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
|
63
|
+
if (l && r) {
|
|
64
|
+
const m = s.currentTarget, [i, c] = x(m);
|
|
65
|
+
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
[t, u, a.paused]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ _(M.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
|
|
70
71
|
});
|
|
71
|
-
|
|
72
|
-
function
|
|
73
|
-
const
|
|
72
|
+
k.displayName = K;
|
|
73
|
+
function w(e, { select: n = !1 } = {}) {
|
|
74
|
+
const t = document.activeElement;
|
|
75
|
+
for (const u of e)
|
|
76
|
+
if (f(u, { select: n }), document.activeElement !== t) return;
|
|
77
|
+
}
|
|
78
|
+
function x(e) {
|
|
79
|
+
const n = I(e), t = O(n, e), u = O(n.reverse(), e);
|
|
80
|
+
return [t, u];
|
|
81
|
+
}
|
|
82
|
+
function I(e) {
|
|
83
|
+
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
84
|
+
acceptNode: (u) => {
|
|
85
|
+
const p = u.tagName === "INPUT" && u.type === "hidden";
|
|
86
|
+
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
87
|
+
}
|
|
74
88
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
onPointerDownCapture: () => o.current = !0
|
|
100
|
-
};
|
|
89
|
+
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
90
|
+
return n;
|
|
91
|
+
}
|
|
92
|
+
function O(e, n) {
|
|
93
|
+
for (const t of e)
|
|
94
|
+
if (!D(t, { upTo: n })) return t;
|
|
95
|
+
}
|
|
96
|
+
function D(e, { upTo: n }) {
|
|
97
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
98
|
+
for (; e; ) {
|
|
99
|
+
if (n !== void 0 && e === n) return !1;
|
|
100
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
101
|
+
e = e.parentElement;
|
|
102
|
+
}
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
function H(e) {
|
|
106
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
107
|
+
}
|
|
108
|
+
function f(e, { select: n = !1 } = {}) {
|
|
109
|
+
if (e && e.focus) {
|
|
110
|
+
const t = document.activeElement;
|
|
111
|
+
e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
|
|
112
|
+
}
|
|
101
113
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
var S = V();
|
|
115
|
+
function V() {
|
|
116
|
+
let e = [];
|
|
117
|
+
return {
|
|
118
|
+
add(n) {
|
|
119
|
+
const t = e[0];
|
|
120
|
+
n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
|
|
121
|
+
},
|
|
122
|
+
remove(n) {
|
|
123
|
+
var t;
|
|
124
|
+
e = C(e, n), (t = e[0]) == null || t.resume();
|
|
125
|
+
}
|
|
114
126
|
};
|
|
115
127
|
}
|
|
116
|
-
function
|
|
117
|
-
const
|
|
118
|
-
|
|
128
|
+
function C(e, n) {
|
|
129
|
+
const t = [...e], u = t.indexOf(n);
|
|
130
|
+
return u !== -1 && t.splice(u, 1), t;
|
|
119
131
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
122
|
-
e && t.addEventListener(r, e, { once: !0 }), o ? k(t, a) : t.dispatchEvent(a);
|
|
132
|
+
function W(e) {
|
|
133
|
+
return e.filter((n) => n.tagName !== "A");
|
|
123
134
|
}
|
|
124
135
|
export {
|
|
125
|
-
|
|
126
|
-
Y as DismissableLayerBranch
|
|
136
|
+
k as FocusScope
|
|
127
137
|
};
|
package/dist/index98.js
CHANGED
|
@@ -1,137 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { Primitive as
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
...g
|
|
13
|
-
} = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = R(n, (s) => U(s)), a = d.useRef({
|
|
14
|
-
paused: !1,
|
|
15
|
-
pause() {
|
|
16
|
-
this.paused = !0;
|
|
17
|
-
},
|
|
18
|
-
resume() {
|
|
19
|
-
this.paused = !1;
|
|
20
|
-
}
|
|
21
|
-
}).current;
|
|
22
|
-
d.useEffect(() => {
|
|
23
|
-
if (u) {
|
|
24
|
-
let s = function(i) {
|
|
25
|
-
if (a.paused || !o) return;
|
|
26
|
-
const c = i.target;
|
|
27
|
-
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
|
28
|
-
}, l = function(i) {
|
|
29
|
-
if (a.paused || !o) return;
|
|
30
|
-
const c = i.relatedTarget;
|
|
31
|
-
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
|
32
|
-
}, r = function(i) {
|
|
33
|
-
if (document.activeElement === document.body)
|
|
34
|
-
for (const h of i)
|
|
35
|
-
h.removedNodes.length > 0 && f(o);
|
|
36
|
-
};
|
|
37
|
-
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
|
38
|
-
const m = new MutationObserver(r);
|
|
39
|
-
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
40
|
-
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}, [u, o, a.paused]), d.useEffect(() => {
|
|
44
|
-
if (o) {
|
|
45
|
-
S.add(a);
|
|
46
|
-
const s = document.activeElement;
|
|
47
|
-
if (!o.contains(s)) {
|
|
48
|
-
const r = new CustomEvent(F, N);
|
|
49
|
-
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
|
50
|
-
}
|
|
51
|
-
return () => {
|
|
52
|
-
o.removeEventListener(F, E), setTimeout(() => {
|
|
53
|
-
const r = new CustomEvent(T, N);
|
|
54
|
-
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
|
|
55
|
-
}, 0);
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}, [o, E, v, a]);
|
|
59
|
-
const P = d.useCallback(
|
|
60
|
-
(s) => {
|
|
61
|
-
if (!t && !u || a.paused) return;
|
|
62
|
-
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
|
63
|
-
if (l && r) {
|
|
64
|
-
const m = s.currentTarget, [i, c] = x(m);
|
|
65
|
-
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
[t, u, a.paused]
|
|
69
|
-
);
|
|
70
|
-
return /* @__PURE__ */ _(M.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import s from "react-dom";
|
|
3
|
+
import { Primitive as c } from "./index86.js";
|
|
4
|
+
import { useLayoutEffect as u } from "./index82.js";
|
|
5
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
+
var p = "Portal", d = r.forwardRef((e, a) => {
|
|
7
|
+
var o;
|
|
8
|
+
const { container: f, ...i } = e, [m, n] = r.useState(!1);
|
|
9
|
+
u(() => n(!0), []);
|
|
10
|
+
const t = f || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
|
|
11
|
+
return t ? s.createPortal(/* @__PURE__ */ l(c.div, { ...i, ref: a }), t) : null;
|
|
71
12
|
});
|
|
72
|
-
|
|
73
|
-
function w(e, { select: n = !1 } = {}) {
|
|
74
|
-
const t = document.activeElement;
|
|
75
|
-
for (const u of e)
|
|
76
|
-
if (f(u, { select: n }), document.activeElement !== t) return;
|
|
77
|
-
}
|
|
78
|
-
function x(e) {
|
|
79
|
-
const n = I(e), t = O(n, e), u = O(n.reverse(), e);
|
|
80
|
-
return [t, u];
|
|
81
|
-
}
|
|
82
|
-
function I(e) {
|
|
83
|
-
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
84
|
-
acceptNode: (u) => {
|
|
85
|
-
const p = u.tagName === "INPUT" && u.type === "hidden";
|
|
86
|
-
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
90
|
-
return n;
|
|
91
|
-
}
|
|
92
|
-
function O(e, n) {
|
|
93
|
-
for (const t of e)
|
|
94
|
-
if (!D(t, { upTo: n })) return t;
|
|
95
|
-
}
|
|
96
|
-
function D(e, { upTo: n }) {
|
|
97
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
98
|
-
for (; e; ) {
|
|
99
|
-
if (n !== void 0 && e === n) return !1;
|
|
100
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
101
|
-
e = e.parentElement;
|
|
102
|
-
}
|
|
103
|
-
return !1;
|
|
104
|
-
}
|
|
105
|
-
function H(e) {
|
|
106
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
107
|
-
}
|
|
108
|
-
function f(e, { select: n = !1 } = {}) {
|
|
109
|
-
if (e && e.focus) {
|
|
110
|
-
const t = document.activeElement;
|
|
111
|
-
e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
var S = V();
|
|
115
|
-
function V() {
|
|
116
|
-
let e = [];
|
|
117
|
-
return {
|
|
118
|
-
add(n) {
|
|
119
|
-
const t = e[0];
|
|
120
|
-
n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
|
|
121
|
-
},
|
|
122
|
-
remove(n) {
|
|
123
|
-
var t;
|
|
124
|
-
e = C(e, n), (t = e[0]) == null || t.resume();
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
function C(e, n) {
|
|
129
|
-
const t = [...e], u = t.indexOf(n);
|
|
130
|
-
return u !== -1 && t.splice(u, 1), t;
|
|
131
|
-
}
|
|
132
|
-
function W(e) {
|
|
133
|
-
return e.filter((n) => n.tagName !== "A");
|
|
134
|
-
}
|
|
13
|
+
d.displayName = p;
|
|
135
14
|
export {
|
|
136
|
-
|
|
15
|
+
d as Portal
|
|
137
16
|
};
|
package/dist/index99.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
var t = 0;
|
|
3
|
+
function a() {
|
|
4
|
+
r.useEffect(() => {
|
|
5
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? n()), document.body.insertAdjacentElement("beforeend", e[1] ?? n()), t++, () => {
|
|
7
|
+
t === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((o) => o.remove()), t--;
|
|
8
|
+
};
|
|
9
|
+
}, []);
|
|
10
|
+
}
|
|
11
|
+
function n() {
|
|
12
|
+
const e = document.createElement("span");
|
|
13
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
14
|
+
}
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
a as useFocusGuards
|
|
16
17
|
};
|