@rpcbase/ui 0.207.0 → 0.208.0
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.js +7 -7
- package/dist/index19.js +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index200.js +56 -55
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +60 -8
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +7 -15
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +15 -143
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +145 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -11
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +10 -104
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +94 -347
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +349 -87
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +73 -304
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +309 -193
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +211 -19
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +18 -27
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +27 -187
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +186 -16
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +18 -44
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +60 -8
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +42 -23
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +9 -44
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +25 -18
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +45 -3
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +17 -4
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -21
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +4 -24
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +17 -64
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +23 -13
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +68 -4
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +14 -50
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +4 -6
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +50 -26
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -13
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +25 -8
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +17 -3
- package/dist/index232.js.map +1 -0
- package/dist/index233.js +8 -24
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -71
- package/dist/index235.js +29 -3
- package/dist/index235.js.map +1 -0
- package/dist/index236.js +69 -12
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +3 -54
- package/dist/index238.js +11 -114
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +51 -6
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +115 -13
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +6 -687
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +13 -253
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +662 -676
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +252 -7430
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +700 -6
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7429 -11
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +5 -4
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +11 -458
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +5 -37
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +458 -18
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +34 -24
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +19 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +23 -54
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +4 -7
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +57 -11
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +8 -3
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +12 -16
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +3 -26
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +15 -42
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +25 -13
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +40 -22
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +13 -17
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +24 -34
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +17 -5
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +35 -9
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +5 -8
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +9 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +8 -10
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +9 -7
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +9 -72
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +7 -171
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +63 -104
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +169 -12
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +109 -75
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +12 -44
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +79 -12
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +45 -15
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +12 -98
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +15 -55
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +89 -98
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +27 -42
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +92 -97
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +62 -46
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +108 -38
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +48 -135
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +43 -139
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +105 -217
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +109 -210
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +168 -212
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +240 -5
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +298 -6
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +5 -7
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -4
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +7 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +6 -21
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +6 -10
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +18 -123
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +10 -164
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +116 -58
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +161 -106
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +66 -489
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +106 -59
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +492 -4
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +62 -27
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +4 -66
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +27 -152
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +59 -555
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +143 -201
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +56 -326
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +553 -260
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +214 -0
- package/dist/index311.js.map +1 -0
- package/dist/index312.js +335 -0
- package/dist/index312.js.map +1 -0
- package/dist/index313.js +272 -0
- package/dist/index313.js.map +1 -0
- package/package.json +2 -2
- package/dist/index234.js.map +0 -1
- package/dist/index237.js.map +0 -1
package/dist/index204.js
CHANGED
|
@@ -1,7 +1,148 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { useComposedRefs as e } from "./index18.js";
|
|
3
|
+
import { Primitive as t } from "./index20.js";
|
|
4
|
+
import { useCallbackRef as n } from "./index21.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
8
|
+
var a = "focusScope.autoFocusOnMount", o = "focusScope.autoFocusOnUnmount", s = {
|
|
9
|
+
bubbles: !1,
|
|
10
|
+
cancelable: !0
|
|
11
|
+
}, c = "FocusScope", l = r.forwardRef((c, l) => {
|
|
12
|
+
let { loop: p = !1, trapped: m = !1, onMountAutoFocus: h, onUnmountAutoFocus: v, ...y } = c, [x, S] = r.useState(null), C = n(h), w = n(v), T = r.useRef(null), E = e(l, (e) => S(e)), D = r.useRef({
|
|
13
|
+
paused: !1,
|
|
14
|
+
pause() {
|
|
15
|
+
this.paused = !0;
|
|
16
|
+
},
|
|
17
|
+
resume() {
|
|
18
|
+
this.paused = !1;
|
|
19
|
+
}
|
|
20
|
+
}).current;
|
|
21
|
+
r.useEffect(() => {
|
|
22
|
+
if (m) {
|
|
23
|
+
let e = function(e) {
|
|
24
|
+
if (D.paused || !x) return;
|
|
25
|
+
let t = e.target;
|
|
26
|
+
x.contains(t) ? T.current = t : g(T.current, { select: !0 });
|
|
27
|
+
}, t = function(e) {
|
|
28
|
+
if (D.paused || !x) return;
|
|
29
|
+
let t = e.relatedTarget;
|
|
30
|
+
t !== null && (x.contains(t) || g(T.current, { select: !0 }));
|
|
31
|
+
}, n = function(e) {
|
|
32
|
+
if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 && g(x);
|
|
33
|
+
};
|
|
34
|
+
document.addEventListener("focusin", e), document.addEventListener("focusout", t);
|
|
35
|
+
let r = new MutationObserver(n);
|
|
36
|
+
return x && r.observe(x, {
|
|
37
|
+
childList: !0,
|
|
38
|
+
subtree: !0
|
|
39
|
+
}), () => {
|
|
40
|
+
document.removeEventListener("focusin", e), document.removeEventListener("focusout", t), r.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [
|
|
44
|
+
m,
|
|
45
|
+
x,
|
|
46
|
+
D.paused
|
|
47
|
+
]), r.useEffect(() => {
|
|
48
|
+
if (x) {
|
|
49
|
+
_.add(D);
|
|
50
|
+
let e = document.activeElement;
|
|
51
|
+
if (!x.contains(e)) {
|
|
52
|
+
let t = new CustomEvent(a, s);
|
|
53
|
+
x.addEventListener(a, C), x.dispatchEvent(t), t.defaultPrevented || (u(b(f(x)), { select: !0 }), document.activeElement === e && g(x));
|
|
54
|
+
}
|
|
55
|
+
return () => {
|
|
56
|
+
x.removeEventListener(a, C), setTimeout(() => {
|
|
57
|
+
let t = new CustomEvent(o, s);
|
|
58
|
+
x.addEventListener(o, w), x.dispatchEvent(t), t.defaultPrevented || g(e ?? document.body, { select: !0 }), x.removeEventListener(o, w), _.remove(D);
|
|
59
|
+
}, 0);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}, [
|
|
63
|
+
x,
|
|
64
|
+
C,
|
|
65
|
+
w,
|
|
66
|
+
D
|
|
67
|
+
]);
|
|
68
|
+
let O = r.useCallback((e) => {
|
|
69
|
+
if (!p && !m || D.paused) return;
|
|
70
|
+
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, n = document.activeElement;
|
|
71
|
+
if (t && n) {
|
|
72
|
+
let t = e.currentTarget, [r, i] = d(t);
|
|
73
|
+
r && i ? !e.shiftKey && n === i ? (e.preventDefault(), p && g(r, { select: !0 })) : e.shiftKey && n === r && (e.preventDefault(), p && g(i, { select: !0 })) : n === t && e.preventDefault();
|
|
74
|
+
}
|
|
75
|
+
}, [
|
|
76
|
+
p,
|
|
77
|
+
m,
|
|
78
|
+
D.paused
|
|
79
|
+
]);
|
|
80
|
+
return /* @__PURE__ */ i(t.div, {
|
|
81
|
+
tabIndex: -1,
|
|
82
|
+
...y,
|
|
83
|
+
ref: E,
|
|
84
|
+
onKeyDown: O
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
l.displayName = c;
|
|
88
|
+
function u(e, { select: t = !1 } = {}) {
|
|
89
|
+
let n = document.activeElement;
|
|
90
|
+
for (let r of e) if (g(r, { select: t }), document.activeElement !== n) return;
|
|
91
|
+
}
|
|
92
|
+
function d(e) {
|
|
93
|
+
let t = f(e);
|
|
94
|
+
return [p(t, e), p(t.reverse(), e)];
|
|
95
|
+
}
|
|
96
|
+
function f(e) {
|
|
97
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
|
|
98
|
+
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
99
|
+
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
100
|
+
} });
|
|
101
|
+
for (; n.nextNode();) t.push(n.currentNode);
|
|
102
|
+
return t;
|
|
103
|
+
}
|
|
104
|
+
function p(e, t) {
|
|
105
|
+
for (let n of e) if (!m(n, { upTo: t })) return n;
|
|
106
|
+
}
|
|
107
|
+
function m(e, { upTo: t }) {
|
|
108
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
109
|
+
for (; e;) {
|
|
110
|
+
if (t !== void 0 && e === t) return !1;
|
|
111
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
112
|
+
e = e.parentElement;
|
|
113
|
+
}
|
|
114
|
+
return !1;
|
|
115
|
+
}
|
|
116
|
+
function h(e) {
|
|
117
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
118
|
+
}
|
|
119
|
+
function g(e, { select: t = !1 } = {}) {
|
|
120
|
+
if (e && e.focus) {
|
|
121
|
+
let n = document.activeElement;
|
|
122
|
+
e.focus({ preventScroll: !0 }), e !== n && h(e) && t && e.select();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
var _ = v();
|
|
126
|
+
function v() {
|
|
127
|
+
let e = [];
|
|
128
|
+
return {
|
|
129
|
+
add(t) {
|
|
130
|
+
let n = e[0];
|
|
131
|
+
t !== n && n?.pause(), e = y(e, t), e.unshift(t);
|
|
132
|
+
},
|
|
133
|
+
remove(t) {
|
|
134
|
+
e = y(e, t), e[0]?.resume();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function y(e, t) {
|
|
139
|
+
let n = [...e], r = n.indexOf(t);
|
|
140
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
141
|
+
}
|
|
142
|
+
function b(e) {
|
|
143
|
+
return e.filter((e) => e.tagName !== "A");
|
|
144
|
+
}
|
|
4
145
|
//#endregion
|
|
5
|
-
export {
|
|
146
|
+
export { l as FocusScope };
|
|
6
147
|
|
|
7
148
|
//# sourceMappingURL=index204.js.map
|
package/dist/index204.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index204.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAI,IAAmB,YAAY,WAAWA,EAAM,wBAAwB"}
|
|
1
|
+
{"version":3,"file":"index204.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAQA,IAAI,IAAqB,+BACrB,IAAuB,iCACvB,IAAgB;CAAE,SAAS;CAAO,YAAY;CAAM,EACpD,IAAmB,cACnB,IAAaA,EAAM,YAAY,GAAO,MAAiB;CACzD,IAAM,EACJ,UAAO,IACP,aAAU,IACV,kBAAkB,GAClB,oBAAoB,GACpB,GAAG,MACD,GACE,CAAC,GAAW,KAAgBA,EAAM,SAAS,KAAK,EAChD,IAAmB,EAAe,EAAqB,EACvD,IAAqB,EAAe,EAAuB,EAC3D,IAAwBA,EAAM,OAAO,KAAK,EAC1C,IAAe,EAAgB,IAAe,MAAS,EAAa,EAAK,CAAC,EAC1E,IAAaA,EAAM,OAAO;EAC9B,QAAQ;EACR,QAAQ;AACN,QAAK,SAAS;;EAEhB,SAAS;AACP,QAAK,SAAS;;EAEjB,CAAC,CAAC;AAqCH,CApCA,EAAM,gBAAgB;AACpB,MAAI,GAAS;GACX,IAAI,IAAiB,SAAS,GAAO;AACnC,QAAI,EAAW,UAAU,CAAC,EAAW;IACrC,IAAM,IAAS,EAAM;AACrB,IAAI,EAAU,SAAS,EAAO,GAC5B,EAAsB,UAAU,IAEhC,EAAM,EAAsB,SAAS,EAAE,QAAQ,IAAM,CAAC;MAEvD,IAAkB,SAAS,GAAO;AACnC,QAAI,EAAW,UAAU,CAAC,EAAW;IACrC,IAAM,IAAgB,EAAM;AACxB,UAAkB,SACjB,EAAU,SAAS,EAAc,IACpC,EAAM,EAAsB,SAAS,EAAE,QAAQ,IAAM,CAAC;MAEvD,IA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,YAAY,IAAI"}
|
package/dist/index205.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var n = t.useId || (() => void 0), r = 0;
|
|
5
|
-
function i(i) {
|
|
6
|
-
let [a, o] = t.useState(n());
|
|
7
|
-
return e(() => {
|
|
8
|
-
i || o((e) => e ?? String(r++));
|
|
9
|
-
}, [i]), i || (a ? `radix-${a}` : "");
|
|
10
|
-
}
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
//#region ../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
3
|
+
var t = globalThis?.document ? e.useLayoutEffect : () => {};
|
|
11
4
|
//#endregion
|
|
12
|
-
export {
|
|
5
|
+
export { t as useLayoutEffect2 };
|
|
13
6
|
|
|
14
7
|
//# sourceMappingURL=index205.js.map
|
package/dist/index205.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index205.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-
|
|
1
|
+
{"version":3,"file":"index205.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAI,IAAmB,YAAY,WAAWA,EAAM,wBAAwB"}
|
package/dist/index206.js
CHANGED
|
@@ -1,108 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}), o = {
|
|
11
|
-
left: "right",
|
|
12
|
-
right: "left",
|
|
13
|
-
bottom: "top",
|
|
14
|
-
top: "bottom"
|
|
15
|
-
};
|
|
16
|
-
function s(e, r, i) {
|
|
17
|
-
return n(e, t(r, i));
|
|
18
|
-
}
|
|
19
|
-
function c(e, t) {
|
|
20
|
-
return typeof e == "function" ? e(t) : e;
|
|
21
|
-
}
|
|
22
|
-
function l(e) {
|
|
23
|
-
return e.split("-")[0];
|
|
24
|
-
}
|
|
25
|
-
function u(e) {
|
|
26
|
-
return e.split("-")[1];
|
|
27
|
-
}
|
|
28
|
-
function d(e) {
|
|
29
|
-
return e === "x" ? "y" : "x";
|
|
30
|
-
}
|
|
31
|
-
function f(e) {
|
|
32
|
-
return e === "y" ? "height" : "width";
|
|
33
|
-
}
|
|
34
|
-
function p(e) {
|
|
35
|
-
let t = e[0];
|
|
36
|
-
return t === "t" || t === "b" ? "y" : "x";
|
|
37
|
-
}
|
|
38
|
-
function m(e) {
|
|
39
|
-
return d(p(e));
|
|
40
|
-
}
|
|
41
|
-
function h(e, t, n) {
|
|
42
|
-
n === void 0 && (n = !1);
|
|
43
|
-
let r = u(e), i = m(e), a = f(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
44
|
-
return t.reference[a] > t.floating[a] && (o = w(o)), [o, w(o)];
|
|
45
|
-
}
|
|
46
|
-
function g(e) {
|
|
47
|
-
let t = w(e);
|
|
48
|
-
return [
|
|
49
|
-
_(e),
|
|
50
|
-
t,
|
|
51
|
-
_(t)
|
|
52
|
-
];
|
|
53
|
-
}
|
|
54
|
-
function _(e) {
|
|
55
|
-
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
56
|
-
}
|
|
57
|
-
var v = ["left", "right"], y = ["right", "left"], b = ["top", "bottom"], x = ["bottom", "top"];
|
|
58
|
-
function S(e, t, n) {
|
|
59
|
-
switch (e) {
|
|
60
|
-
case "top":
|
|
61
|
-
case "bottom": return n ? t ? y : v : t ? v : y;
|
|
62
|
-
case "left":
|
|
63
|
-
case "right": return t ? b : x;
|
|
64
|
-
default: return [];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function C(e, t, n, r) {
|
|
68
|
-
let i = u(e), a = S(l(e), n === "start", r);
|
|
69
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(_)))), a;
|
|
70
|
-
}
|
|
71
|
-
function w(e) {
|
|
72
|
-
let t = l(e);
|
|
73
|
-
return o[t] + e.slice(t.length);
|
|
74
|
-
}
|
|
75
|
-
function T(e) {
|
|
76
|
-
return {
|
|
77
|
-
top: 0,
|
|
78
|
-
right: 0,
|
|
79
|
-
bottom: 0,
|
|
80
|
-
left: 0,
|
|
81
|
-
...e
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function E(e) {
|
|
85
|
-
return typeof e == "number" ? {
|
|
86
|
-
top: e,
|
|
87
|
-
right: e,
|
|
88
|
-
bottom: e,
|
|
89
|
-
left: e
|
|
90
|
-
} : T(e);
|
|
91
|
-
}
|
|
92
|
-
function D(e) {
|
|
93
|
-
let { x: t, y: n, width: r, height: i } = e;
|
|
94
|
-
return {
|
|
95
|
-
width: r,
|
|
96
|
-
height: i,
|
|
97
|
-
top: n,
|
|
98
|
-
left: t,
|
|
99
|
-
right: t + r,
|
|
100
|
-
bottom: n + i,
|
|
101
|
-
x: t,
|
|
102
|
-
y: n
|
|
103
|
-
};
|
|
1
|
+
import { useLayoutEffect2 as e } from "./index205.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
//#region ../../node_modules/@radix-ui/react-id/dist/index.mjs
|
|
4
|
+
var n = t.useId || (() => void 0), r = 0;
|
|
5
|
+
function i(i) {
|
|
6
|
+
let [a, o] = t.useState(n());
|
|
7
|
+
return e(() => {
|
|
8
|
+
i || o((e) => e ?? String(r++));
|
|
9
|
+
}, [i]), i || (a ? `radix-${a}` : "");
|
|
104
10
|
}
|
|
105
11
|
//#endregion
|
|
106
|
-
export {
|
|
12
|
+
export { i as useId };
|
|
107
13
|
|
|
108
14
|
//# sourceMappingURL=index206.js.map
|
package/dist/index206.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index206.js","names":[],"sources":["../../../node_modules/@
|
|
1
|
+
{"version":3,"file":"index206.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-id/dist/index.mjs"],"sourcesContent":["// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAI,IAAaA,EAAM,gBAAuC,KAAK,IAC/D,IAAQ;AACZ,SAAS,EAAM,GAAiB;CAC9B,IAAM,CAAC,GAAI,KAASA,EAAM,SAAS,GAAY,CAAC;AAIhD,QAHA,QAAsB;AACpB,EAAK,KAAiB,GAAO,MAAY,KAAW,OAAO,IAAQ,CAAC;IACnE,CAAC,EAAgB,CAAC,EACd,MAAoB,IAAK,SAAS,MAAO"}
|