@anoki/fse-ui 1.10.1-RC2.13 → 1.10.1-RC2.15

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.
Files changed (233) hide show
  1. package/dist/components/ui/GroupCodeExemptionFilterDropDown/GroupCodeExemptionFilterDropDown.css +1 -1
  2. package/dist/index.cjs113.js +1 -1
  3. package/dist/index.cjs113.js.map +1 -1
  4. package/dist/index.cjs251.js +1 -1
  5. package/dist/index.cjs258.js +1 -1
  6. package/dist/index.cjs265.js +1 -1
  7. package/dist/index.cjs266.js +1 -1
  8. package/dist/index.cjs267.js +1 -1
  9. package/dist/index.cjs310.js +1 -1
  10. package/dist/index.cjs321.js +1 -1
  11. package/dist/index.cjs328.js +1 -1
  12. package/dist/index.cjs335.js +1 -1
  13. package/dist/index.cjs340.js +1 -1
  14. package/dist/index.cjs351.js +1 -1
  15. package/dist/index.cjs359.js +1 -1
  16. package/dist/index.cjs400.js +1 -1
  17. package/dist/index.cjs441.js +1 -1
  18. package/dist/index.cjs462.js +27 -1
  19. package/dist/index.cjs462.js.map +1 -1
  20. package/dist/index.cjs463.js +1 -2
  21. package/dist/index.cjs463.js.map +1 -1
  22. package/dist/index.cjs464.js +1 -27
  23. package/dist/index.cjs464.js.map +1 -1
  24. package/dist/index.cjs465.js +1 -1
  25. package/dist/index.cjs465.js.map +1 -1
  26. package/dist/index.cjs466.js +2 -1
  27. package/dist/index.cjs466.js.map +1 -1
  28. package/dist/index.cjs467.js +1 -1
  29. package/dist/index.cjs474.js +1 -1
  30. package/dist/index.cjs475.js +1 -1
  31. package/dist/index.cjs480.js +1 -1
  32. package/dist/index.cjs480.js.map +1 -1
  33. package/dist/index.cjs481.js +1 -1
  34. package/dist/index.cjs481.js.map +1 -1
  35. package/dist/index.cjs482.js +1 -1
  36. package/dist/index.cjs482.js.map +1 -1
  37. package/dist/index.cjs488.js +2 -0
  38. package/dist/index.cjs488.js.map +1 -0
  39. package/dist/index.cjs489.js +1 -1
  40. package/dist/index.cjs489.js.map +1 -1
  41. package/dist/index.cjs490.js +1 -1
  42. package/dist/index.cjs490.js.map +1 -1
  43. package/dist/index.cjs491.js +1 -1
  44. package/dist/index.cjs491.js.map +1 -1
  45. package/dist/index.cjs492.js +1 -1
  46. package/dist/index.cjs492.js.map +1 -1
  47. package/dist/index.cjs493.js +1 -1
  48. package/dist/index.cjs493.js.map +1 -1
  49. package/dist/index.cjs494.js +1 -1
  50. package/dist/index.cjs494.js.map +1 -1
  51. package/dist/index.cjs498.js +2 -0
  52. package/dist/index.cjs498.js.map +1 -0
  53. package/dist/index.cjs513.js +1 -1
  54. package/dist/index.cjs527.js +1 -1
  55. package/dist/index.cjs527.js.map +1 -1
  56. package/dist/index.cjs528.js +1 -1
  57. package/dist/index.cjs529.js +1 -1
  58. package/dist/index.cjs529.js.map +1 -1
  59. package/dist/index.cjs530.js +1 -1
  60. package/dist/index.cjs530.js.map +1 -1
  61. package/dist/index.cjs532.js +1 -1
  62. package/dist/index.cjs534.js +1 -1
  63. package/dist/index.cjs537.js +1 -1
  64. package/dist/index.cjs537.js.map +1 -1
  65. package/dist/index.cjs538.js +1 -1
  66. package/dist/index.cjs538.js.map +1 -1
  67. package/dist/index.cjs576.js +1 -1
  68. package/dist/index.cjs576.js.map +1 -1
  69. package/dist/index.cjs577.js +1 -1
  70. package/dist/index.cjs577.js.map +1 -1
  71. package/dist/index.cjs578.js +1 -1
  72. package/dist/index.cjs578.js.map +1 -1
  73. package/dist/index.cjs579.js +1 -1
  74. package/dist/index.cjs579.js.map +1 -1
  75. package/dist/index.cjs580.js +1 -1
  76. package/dist/index.cjs580.js.map +1 -1
  77. package/dist/index.cjs581.js +1 -1
  78. package/dist/index.cjs581.js.map +1 -1
  79. package/dist/index.cjs582.js +1 -1
  80. package/dist/index.cjs583.js +1 -1
  81. package/dist/index.cjs584.js +1 -1
  82. package/dist/index.cjs589.js +1 -1
  83. package/dist/index.cjs593.js +1 -1
  84. package/dist/index.cjs594.js +1 -1
  85. package/dist/index.cjs601.js +1 -1
  86. package/dist/index.cjs606.js +1 -1
  87. package/dist/index.cjs645.js +1 -1
  88. package/dist/index.cjs647.js +1 -1
  89. package/dist/index.cjs648.js +1 -1
  90. package/dist/index.cjs655.js +1 -1
  91. package/dist/index.cjs662.js +1 -38
  92. package/dist/index.cjs662.js.map +1 -1
  93. package/dist/index.cjs663.js +38 -1
  94. package/dist/index.cjs663.js.map +1 -1
  95. package/dist/index.cjs664.js +1 -1
  96. package/dist/index.cjs664.js.map +1 -1
  97. package/dist/index.cjs665.js +1 -1
  98. package/dist/index.cjs665.js.map +1 -1
  99. package/dist/index.cjs666.js +1 -1
  100. package/dist/index.cjs666.js.map +1 -1
  101. package/dist/index.cjs667.js +1 -1
  102. package/dist/index.cjs667.js.map +1 -1
  103. package/dist/index.cjs668.js +1 -1
  104. package/dist/index.cjs668.js.map +1 -1
  105. package/dist/index.cjs669.js +1 -1
  106. package/dist/index.cjs669.js.map +1 -1
  107. package/dist/index.cjs670.js +1 -1
  108. package/dist/index.cjs670.js.map +1 -1
  109. package/dist/index.cjs671.js +1 -1
  110. package/dist/index.cjs671.js.map +1 -1
  111. package/dist/index.cjs672.js +1 -1
  112. package/dist/index.cjs672.js.map +1 -1
  113. package/dist/index.es113.js +11 -12
  114. package/dist/index.es113.js.map +1 -1
  115. package/dist/index.es251.js +1 -1
  116. package/dist/index.es258.js +2 -2
  117. package/dist/index.es265.js +1 -1
  118. package/dist/index.es266.js +2 -2
  119. package/dist/index.es267.js +2 -2
  120. package/dist/index.es310.js +3 -3
  121. package/dist/index.es321.js +1 -1
  122. package/dist/index.es328.js +8 -8
  123. package/dist/index.es335.js +1 -1
  124. package/dist/index.es340.js +1 -1
  125. package/dist/index.es351.js +1 -1
  126. package/dist/index.es359.js +2 -2
  127. package/dist/index.es400.js +1 -1
  128. package/dist/index.es441.js +1 -1
  129. package/dist/index.es462.js +3674 -5
  130. package/dist/index.es462.js.map +1 -1
  131. package/dist/index.es463.js +5 -520
  132. package/dist/index.es463.js.map +1 -1
  133. package/dist/index.es464.js +2 -3675
  134. package/dist/index.es464.js.map +1 -1
  135. package/dist/index.es465.js +5 -5
  136. package/dist/index.es465.js.map +1 -1
  137. package/dist/index.es466.js +521 -2
  138. package/dist/index.es466.js.map +1 -1
  139. package/dist/index.es467.js +1 -1
  140. package/dist/index.es474.js +1 -1
  141. package/dist/index.es475.js +8 -8
  142. package/dist/index.es480.js +5 -14
  143. package/dist/index.es480.js.map +1 -1
  144. package/dist/index.es481.js +24 -5
  145. package/dist/index.es481.js.map +1 -1
  146. package/dist/index.es482.js +67 -23
  147. package/dist/index.es482.js.map +1 -1
  148. package/dist/index.es488.js +128 -0
  149. package/dist/index.es488.js.map +1 -0
  150. package/dist/index.es489.js +126 -116
  151. package/dist/index.es489.js.map +1 -1
  152. package/dist/index.es490.js +13 -134
  153. package/dist/index.es490.js.map +1 -1
  154. package/dist/index.es491.js +14 -13
  155. package/dist/index.es491.js.map +1 -1
  156. package/dist/index.es492.js +8 -14
  157. package/dist/index.es492.js.map +1 -1
  158. package/dist/index.es493.js +50 -9
  159. package/dist/index.es493.js.map +1 -1
  160. package/dist/index.es494.js +55 -49
  161. package/dist/index.es494.js.map +1 -1
  162. package/dist/index.es498.js +18 -0
  163. package/dist/index.es498.js.map +1 -0
  164. package/dist/index.es513.js +1 -1
  165. package/dist/index.es527.js +131 -8
  166. package/dist/index.es527.js.map +1 -1
  167. package/dist/index.es528.js +1 -1
  168. package/dist/index.es529.js +9 -3
  169. package/dist/index.es529.js.map +1 -1
  170. package/dist/index.es530.js +2 -131
  171. package/dist/index.es530.js.map +1 -1
  172. package/dist/index.es532.js +1 -1
  173. package/dist/index.es534.js +4 -4
  174. package/dist/index.es537.js +14 -2
  175. package/dist/index.es537.js.map +1 -1
  176. package/dist/index.es538.js +2 -14
  177. package/dist/index.es538.js.map +1 -1
  178. package/dist/index.es576.js +22 -202
  179. package/dist/index.es576.js.map +1 -1
  180. package/dist/index.es577.js +27 -20
  181. package/dist/index.es577.js.map +1 -1
  182. package/dist/index.es578.js +5 -393
  183. package/dist/index.es578.js.map +1 -1
  184. package/dist/index.es579.js +202 -22
  185. package/dist/index.es579.js.map +1 -1
  186. package/dist/index.es580.js +20 -27
  187. package/dist/index.es580.js.map +1 -1
  188. package/dist/index.es581.js +393 -5
  189. package/dist/index.es581.js.map +1 -1
  190. package/dist/index.es582.js +1 -1
  191. package/dist/index.es583.js +1 -1
  192. package/dist/index.es584.js +1 -1
  193. package/dist/index.es589.js +1 -1
  194. package/dist/index.es593.js +1 -1
  195. package/dist/index.es594.js +8 -8
  196. package/dist/index.es601.js +2 -2
  197. package/dist/index.es606.js +3 -3
  198. package/dist/index.es645.js +1 -1
  199. package/dist/index.es647.js +5 -5
  200. package/dist/index.es648.js +1 -1
  201. package/dist/index.es655.js +2 -2
  202. package/dist/index.es662.js +65 -69
  203. package/dist/index.es662.js.map +1 -1
  204. package/dist/index.es663.js +68 -8
  205. package/dist/index.es663.js.map +1 -1
  206. package/dist/index.es664.js +9 -14
  207. package/dist/index.es664.js.map +1 -1
  208. package/dist/index.es665.js +14 -62
  209. package/dist/index.es665.js.map +1 -1
  210. package/dist/index.es666.js +61 -64
  211. package/dist/index.es666.js.map +1 -1
  212. package/dist/index.es667.js +3 -522
  213. package/dist/index.es667.js.map +1 -1
  214. package/dist/index.es668.js +509 -113
  215. package/dist/index.es668.js.map +1 -1
  216. package/dist/index.es669.js +121 -123
  217. package/dist/index.es669.js.map +1 -1
  218. package/dist/index.es670.js +129 -3
  219. package/dist/index.es670.js.map +1 -1
  220. package/dist/index.es671.js +3 -2
  221. package/dist/index.es671.js.map +1 -1
  222. package/dist/index.es672.js +2 -4
  223. package/dist/index.es672.js.map +1 -1
  224. package/package.json +1 -1
  225. package/dist/index.cjs483.js +0 -2
  226. package/dist/index.cjs483.js.map +0 -1
  227. package/dist/index.cjs495.js +0 -2
  228. package/dist/index.cjs495.js.map +0 -1
  229. package/dist/index.es483.js +0 -72
  230. package/dist/index.es483.js.map +0 -1
  231. package/dist/index.es495.js +0 -59
  232. package/dist/index.es495.js.map +0 -1
  233. /package/dist/components/ui/{DoctorModal/DoctorModalFooter/DoctorModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
@@ -1,138 +1,17 @@
1
- import * as d from "react";
2
- import { useComposedRefs as P } from "./index.es471.js";
3
- import { Primitive as M } from "./index.es474.js";
4
- import { useCallbackRef as y } from "./index.es531.js";
5
- import { j as _ } from "./index.es247.js";
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, R] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), U = P(n, (s) => R(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(V(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 A = 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__ */ _.jsx(M.div, { tabIndex: -1, ...g, ref: U, onKeyDown: A });
1
+ import * as r from "react";
2
+ import f from "react-dom";
3
+ import { Primitive as u } from "./index.es474.js";
4
+ import { useLayoutEffect as c } from "./index.es536.js";
5
+ import { j as l } from "./index.es247.js";
6
+ var p = "Portal", d = r.forwardRef((e, a) => {
7
+ var o;
8
+ const { container: s, ...i } = e, [m, n] = r.useState(!1);
9
+ c(() => n(!0), []);
10
+ const t = s || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
11
+ return t ? f.createPortal(/* @__PURE__ */ l.jsx(u.div, { ...i, ref: a }), t) : null;
71
12
  });
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
- }
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 = j();
115
- function j() {
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 V(e) {
133
- return e.filter((n) => n.tagName !== "A");
134
- }
13
+ d.displayName = p;
135
14
  export {
136
- k as FocusScope
15
+ d as Portal
137
16
  };
138
17
  //# sourceMappingURL=index.es490.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es490.js","sources":["../node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-scope/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"],"names":["AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","React","props","forwardedRef","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","useCallbackRef","onUnmountAutoFocus","lastFocusedElementRef","composedRefs","useComposedRefs","node","focusScope","handleFocusIn2","event","target","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","handleKeyDown","isTabKey","focusedElement","container2","first","last","getTabbableEdges","jsx","Primitive","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","element","isHidden","upTo","isSelectableInput","createFocusScopesStack","stack","activeFocusScope","arrayRemove","_a","array","item","updatedArray","index","items"],"mappings":";;;;;AAQA,IAAIA,IAAqB,+BACrBC,IAAuB,iCACvBC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAM,GACpDC,IAAmB,cACnBC,IAAaC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACzD,QAAM;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,SAAAC,IAAU;AAAA,IACV,kBAAkBC;AAAA,IAClB,oBAAoBC;AAAA,IACpB,GAAGC;AAAA,EACP,IAAMN,GACE,CAACO,G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IAAAH,EAAM,CAAC,MAAP,QAAAG,EAAU;AAAA,IAChB;AAAA,EACG;AACH;AACA,SAASD,EAAYE,GAAOC,GAAM;AAChC,QAAMC,IAAe,CAAC,GAAGF,CAAK,GACxBG,IAAQD,EAAa,QAAQD,CAAI;AACvC,SAAIE,MAAU,MACZD,EAAa,OAAOC,GAAO,CAAC,GAEvBD;AACT;AACA,SAAS/B,EAAYiC,GAAO;AAC1B,SAAOA,EAAM,OAAO,CAACH,MAASA,EAAK,YAAY,GAAG;AACpD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es490.js","sources":["../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PORTAL_NAME","Portal","React","props","forwardedRef","containerProp","portalProps","mounted","setMounted","useLayoutEffect","container","_a","ReactDOM","jsx","Primitive"],"mappings":";;;;;AAQA,IAAIA,IAAc,UACdC,IAASC,EAAM,WAAW,CAACC,GAAOC,MAAiB;;AACrD,QAAM,EAAE,WAAWC,GAAe,GAAGC,EAAa,IAAGH,GAC/C,CAACI,GAASC,CAAU,IAAIN,EAAM,SAAS,EAAK;AAClDO,EAAAA,EAAgB,MAAMD,EAAW,EAAI,GAAG,CAAA,CAAE;AAC1C,QAAME,IAAYL,KAAiBE,OAAWI,IAAA,yCAAY,aAAZ,gBAAAA,EAAsB;AACpE,SAAOD,IAAYE,EAAS,aAA6BC,gBAAAA,EAAG,IAACC,EAAU,KAAK,EAAE,GAAGR,GAAa,KAAKF,EAAc,CAAA,GAAGM,CAAS,IAAI;AACnI,CAAC;AACDT,EAAO,cAAcD;","x_google_ignoreList":[0]}
@@ -1,17 +1,18 @@
1
1
  import * as r from "react";
2
- import f from "react-dom";
3
- import { Primitive as u } from "./index.es474.js";
4
- import { useLayoutEffect as c } from "./index.es536.js";
5
- import { j as l } from "./index.es247.js";
6
- var p = "Portal", d = r.forwardRef((e, a) => {
7
- var o;
8
- const { container: s, ...i } = e, [m, n] = r.useState(!1);
9
- c(() => n(!0), []);
10
- const t = s || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
11
- return t ? f.createPortal(/* @__PURE__ */ l.jsx(u.div, { ...i, ref: a }), t) : null;
12
- });
13
- d.displayName = p;
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
- d as Portal
16
+ a as useFocusGuards
16
17
  };
17
18
  //# sourceMappingURL=index.es491.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es491.js","sources":["../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PORTAL_NAME","Portal","React","props","forwardedRef","containerProp","portalProps","mounted","setMounted","useLayoutEffect","container","_a","ReactDOM","jsx","Primitive"],"mappings":";;;;;AAQA,IAAIA,IAAc,UACdC,IAASC,EAAM,WAAW,CAACC,GAAOC,MAAiB;;AACrD,QAAM,EAAE,WAAWC,GAAe,GAAGC,EAAa,IAAGH,GAC/C,CAACI,GAASC,CAAU,IAAIN,EAAM,SAAS,EAAK;AAClDO,EAAAA,EAAgB,MAAMD,EAAW,EAAI,GAAG,CAAA,CAAE;AAC1C,QAAME,IAAYL,KAAiBE,OAAWI,IAAA,yCAAY,aAAZ,gBAAAA,EAAsB;AACpE,SAAOD,IAAYE,EAAS,aAA6BC,gBAAAA,EAAG,IAACC,EAAU,KAAK,EAAE,GAAGR,GAAa,KAAKF,EAAc,CAAA,GAAGM,CAAS,IAAI;AACnI,CAAC;AACDT,EAAO,cAAcD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es491.js","sources":["../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-guards/src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\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 return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\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.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nvar Root = FocusGuards;\nexport {\n FocusGuards,\n Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["count","useFocusGuards","React","edgeGuards","createFocusGuard","node","element"],"mappings":";AAIA,IAAIA,IAAQ;AAKZ,SAASC,IAAiB;AACxB,EAAAC,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,SAAS,iBAAiB,0BAA0B;AACvE,oBAAS,KAAK,sBAAsB,cAAcA,EAAW,CAAC,KAAKC,GAAkB,GACrF,SAAS,KAAK,sBAAsB,aAAaD,EAAW,CAAC,KAAKC,GAAkB,GACpFJ,KACO,MAAM;AACX,MAAIA,MAAU,KACZ,SAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAACK,MAASA,EAAK,QAAQ,GAEvFL;AAAA,IACD;AAAA,EACF,GAAE,EAAE;AACP;AACA,SAASI,IAAmB;AAC1B,QAAME,IAAU,SAAS,cAAc,MAAM;AAC7C,SAAAA,EAAQ,aAAa,0BAA0B,EAAE,GACjDA,EAAQ,WAAW,GACnBA,EAAQ,MAAM,UAAU,QACxBA,EAAQ,MAAM,UAAU,KACxBA,EAAQ,MAAM,WAAW,SACzBA,EAAQ,MAAM,gBAAgB,QACvBA;AACT;","x_google_ignoreList":[0]}
@@ -1,18 +1,12 @@
1
+ import { __assign as m } from "./index.es576.js";
1
2
  import * as r from "react";
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
- }
3
+ import { RemoveScroll as e } from "./index.es577.js";
4
+ import t from "./index.es578.js";
5
+ var s = r.forwardRef(function(a, o) {
6
+ return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
7
+ });
8
+ s.classNames = e.classNames;
15
9
  export {
16
- a as useFocusGuards
10
+ s as default
17
11
  };
18
12
  //# sourceMappingURL=index.es492.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es492.js","sources":["../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-guards/src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\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 return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\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.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nvar Root = FocusGuards;\nexport {\n FocusGuards,\n Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["count","useFocusGuards","React","edgeGuards","createFocusGuard","node","element"],"mappings":";AAIA,IAAIA,IAAQ;AAKZ,SAASC,IAAiB;AACxB,EAAAC,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,SAAS,iBAAiB,0BAA0B;AACvE,oBAAS,KAAK,sBAAsB,cAAcA,EAAW,CAAC,KAAKC,GAAkB,GACrF,SAAS,KAAK,sBAAsB,aAAaD,EAAW,CAAC,KAAKC,GAAkB,GACpFJ,KACO,MAAM;AACX,MAAIA,MAAU,KACZ,SAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAACK,MAASA,EAAK,QAAQ,GAEvFL;AAAA,IACD;AAAA,EACF,GAAE,EAAE;AACP;AACA,SAASI,IAAmB;AAC1B,QAAME,IAAU,SAAS,cAAc,MAAM;AAC7C,SAAAA,EAAQ,aAAa,0BAA0B,EAAE,GACjDA,EAAQ,WAAW,GACnBA,EAAQ,MAAM,UAAU,QACxBA,EAAQ,MAAM,UAAU,KACxBA,EAAQ,MAAM,WAAW,SACzBA,EAAQ,MAAM,gBAAgB,QACvBA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es492.js","sources":["../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,CAAE,GAAEH,GAAO,EAAE,KAAKC,GAAK,SAASG,GAAS,CAAC;AAAK,CAAA;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
@@ -1,12 +1,53 @@
1
- import { __assign as m } from "./index.es579.js";
2
- import * as r from "react";
3
- import { RemoveScroll as e } from "./index.es580.js";
4
- import t from "./index.es581.js";
5
- var s = r.forwardRef(function(a, o) {
6
- return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
7
- });
8
- s.classNames = e.classNames;
1
+ var S = function(r) {
2
+ if (typeof document > "u")
3
+ return null;
4
+ var u = Array.isArray(r) ? r[0] : r;
5
+ return u.ownerDocument.body;
6
+ }, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
7
+ return r && (r.host || W(r.parentNode));
8
+ }, D = function(r, u) {
9
+ return u.map(function(e) {
10
+ if (r.contains(e))
11
+ return e;
12
+ var n = W(e);
13
+ return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
14
+ }).filter(function(e) {
15
+ return !!e;
16
+ });
17
+ }, E = function(r, u, e, n) {
18
+ var i = D(u, Array.isArray(r) ? r : [r]);
19
+ p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
20
+ var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
21
+ !t || s.has(t) || (s.add(t), y(t.parentNode));
22
+ };
23
+ i.forEach(y);
24
+ var A = function(t) {
25
+ !t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
26
+ if (s.has(a))
27
+ A(a);
28
+ else
29
+ try {
30
+ var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
31
+ f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
32
+ } catch (k) {
33
+ console.error("aria-hidden: cannot operate on ", a, k);
34
+ }
35
+ });
36
+ };
37
+ return A(u), s.clear(), h++, function() {
38
+ l.forEach(function(t) {
39
+ var a = f.get(t) - 1, c = o.get(t) - 1;
40
+ f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
41
+ }), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
42
+ };
43
+ }, C = function(r, u, e) {
44
+ e === void 0 && (e = "data-aria-hidden");
45
+ var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
46
+ return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
47
+ return null;
48
+ };
49
+ };
9
50
  export {
10
- s as default
51
+ C as hideOthers
11
52
  };
12
53
  //# sourceMappingURL=index.es493.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es493.js","sources":["../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,CAAE,GAAEH,GAAO,EAAE,KAAKC,GAAK,SAASG,GAAS,CAAC;AAAK,CAAA;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es493.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE,GACdC,IAAY,GACZC,IAAa,SAAUC,GAAM;AAC7B,SAAOA,MAASA,EAAK,QAAQD,EAAWC,EAAK,UAAU;AAC3D,GACIC,IAAiB,SAAUC,GAAQC,GAAS;AAC5C,SAAOA,EACF,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;AAK3C;","x_google_ignoreList":[0]}
@@ -1,53 +1,59 @@
1
- var S = function(r) {
2
- if (typeof document > "u")
3
- return null;
4
- var u = Array.isArray(r) ? r[0] : r;
5
- return u.ownerDocument.body;
6
- }, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
7
- return r && (r.host || W(r.parentNode));
8
- }, D = function(r, u) {
9
- return u.map(function(e) {
10
- if (r.contains(e))
11
- return e;
12
- var n = W(e);
13
- return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
14
- }).filter(function(e) {
15
- return !!e;
1
+ import * as l from "react";
2
+ import { composeRefs as y } from "./index.es471.js";
3
+ import { j as f } from "./index.es247.js";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function S(e) {
6
+ const t = /* @__PURE__ */ g(e), o = l.forwardRef((n, r) => {
7
+ const { children: i, ...a } = n, s = l.Children.toArray(i), p = s.find(E);
8
+ if (p) {
9
+ const c = p.props.children, m = s.map((u) => u === p ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : u);
10
+ return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: l.isValidElement(c) ? l.cloneElement(c, void 0, m) : null });
11
+ }
12
+ return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: i });
16
13
  });
17
- }, E = function(r, u, e, n) {
18
- var i = D(u, Array.isArray(r) ? r : [r]);
19
- p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
20
- var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
21
- !t || s.has(t) || (s.add(t), y(t.parentNode));
22
- };
23
- i.forEach(y);
24
- var A = function(t) {
25
- !t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
26
- if (s.has(a))
27
- A(a);
28
- else
29
- try {
30
- var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
31
- f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
32
- } catch (k) {
33
- console.error("aria-hidden: cannot operate on ", a, k);
34
- }
35
- });
36
- };
37
- return A(u), s.clear(), h++, function() {
38
- l.forEach(function(t) {
39
- var a = f.get(t) - 1, c = o.get(t) - 1;
40
- f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
41
- }), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
42
- };
43
- }, C = function(r, u, e) {
44
- e === void 0 && (e = "data-aria-hidden");
45
- var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
46
- return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
47
- return null;
48
- };
49
- };
14
+ return o.displayName = `${e}.Slot`, o;
15
+ }
16
+ var h = /* @__PURE__ */ S("Slot");
17
+ // @__NO_SIDE_EFFECTS__
18
+ function g(e) {
19
+ const t = l.forwardRef((o, n) => {
20
+ const { children: r, ...i } = o;
21
+ if (l.isValidElement(r)) {
22
+ const a = x(r), s = R(i, r.props);
23
+ return r.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(r, s);
24
+ }
25
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
26
+ });
27
+ return t.displayName = `${e}.SlotClone`, t;
28
+ }
29
+ var d = Symbol("radix.slottable");
30
+ // @__NO_SIDE_EFFECTS__
31
+ function j(e) {
32
+ const t = ({ children: o }) => /* @__PURE__ */ f.jsx(f.Fragment, { children: o });
33
+ return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
34
+ }
35
+ function E(e) {
36
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
37
+ }
38
+ function R(e, t) {
39
+ const o = { ...t };
40
+ for (const n in t) {
41
+ const r = e[n], i = t[n];
42
+ /^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
43
+ i(...s), r(...s);
44
+ } : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
45
+ }
46
+ return { ...e, ...o };
47
+ }
48
+ function x(e) {
49
+ var n, r;
50
+ let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
51
+ return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
52
+ }
50
53
  export {
51
- C as hideOthers
54
+ h as Root,
55
+ h as Slot,
56
+ S as createSlot,
57
+ j as createSlottable
52
58
  };
53
59
  //# sourceMappingURL=index.es494.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es494.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE,GACdC,IAAY,GACZC,IAAa,SAAUC,GAAM;AAC7B,SAAOA,MAASA,EAAK,QAAQD,EAAWC,EAAK,UAAU;AAC3D,GACIC,IAAiB,SAAUC,GAAQC,GAAS;AAC5C,SAAOA,EACF,IAAI,SAAUC,GAAQ;AACvB,QAAIF,EAAO,SAASE,CAAM;AACtB,aAAOA;AAEX,QAAIC,IAAkBN,EAAWK,CAAM;AACvC,WAAIC,KAAmBH,EAAO,SAASG,CAAe,IAC3CA,KAEX,QAAQ,MAAM,eAAeD,GAAQ,2BAA2BF,GAAQ,iBAAiB,GAClF;AAAA,EACV,CAAA,EACI,OAAO,SAAUI,GAAG;AAAE,WAAO,EAAQA;AAAA,GAAK;AACnD,GASIC,IAAyB,SAAUd,GAAgBe,GAAYC,GAAYC,GAAkB;AAC7F,MAAIP,IAAUF,EAAeO,GAAY,MAAM,QAAQf,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC;AAC1G,EAAKI,EAAUY,CAAU,MACrBZ,EAAUY,CAAU,IAAI,oBAAI,QAAS;AAEzC,MAAIE,IAAgBd,EAAUY,CAAU,GACpCG,IAAc,CAAE,GAChBC,IAAiB,oBAAI,IAAK,GAC1BC,IAAiB,IAAI,IAAIX,CAAO,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C3BA,EAAK,gBAAgBU,CAAgB,GAEzCd,EAAkB,OAAOI,CAAI,IAE5BqB,KACDrB,EAAK,gBAAgBS,CAAU;AAAA,IAE/C,CAAS,GACDX,KACKA,MAEDH,IAAa,oBAAI,QAAS,GAC1BA,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE;AAAA,EAErB;AACL,GAQW0B,IAAa,SAAU9B,GAAgBe,GAAYC,GAAY;AACtE,EAAIA,MAAe,WAAUA,IAAa;AAC1C,MAAIN,IAAU,MAAM,KAAK,MAAM,QAAQV,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC,GACtF+B,IAAiChC,EAAiBC,CAAc;AACpE,SAAK+B,KAILrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,GACjFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KAJvE,WAAY;AAAE,WAAO;AAAA,EAAO;AAK3C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es494.js","sources":["../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","Slot","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeQ,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuBC,gBAAAA,EAAAA,IAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAUF,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;AACzC,QAAMC,IAAgB,EAAE,GAAGD,EAAY;AACvC,aAAWE,KAAYF,GAAY;AACjC,UAAMG,IAAgBrB,EAAUoB,CAAQ,GAClCE,IAAiBJ,EAAWE,CAAQ;AAE1C,IADkB,WAAW,KAAKA,CAAQ,IAEpCC,KAAiBC,IACnBH,EAAcC,CAAQ,IAAI,IAAIG,MAAS;AACrC,MAAAD,EAAe,GAAGC,CAAI,GACtBF,EAAc,GAAGE,CAAI;AAAA,IACtB,IACQF,MACTF,EAAcC,CAAQ,IAAIC,KAEnBD,MAAa,UACtBD,EAAcC,CAAQ,IAAI,EAAE,GAAGC,GAAe,GAAGC,EAAgB,IACxDF,MAAa,gBACtBD,EAAcC,CAAQ,IAAI,CAACC,GAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAExF;AACE,SAAO,EAAE,GAAGtB,GAAW,GAAGmB,EAAe;AAC3C;AACA,SAAST,EAAcc,GAAS;;AAC9B,MAAIC,KAASC,IAAA,OAAO,yBAAyBF,EAAQ,OAAO,KAAK,MAApD,gBAAAE,EAAuD,KAChEC,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIE,IACKH,EAAQ,OAEjBC,KAASG,IAAA,OAAO,yBAAyBJ,GAAS,KAAK,MAA9C,gBAAAI,EAAiD,KAC1DD,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDE,IACKH,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
@@ -0,0 +1,18 @@
1
+ import { useState as n, useCallback as i } from "react";
2
+ import "./index.es538.js";
3
+ function c() {
4
+ const [t, o] = n(null), e = i(async (r) => {
5
+ if (!(navigator != null && navigator.clipboard))
6
+ return console.warn("Clipboard not supported"), !1;
7
+ try {
8
+ return await navigator.clipboard.writeText(r), o(r), !0;
9
+ } catch (a) {
10
+ return console.warn("Copy failed", a), o(null), !1;
11
+ }
12
+ }, []);
13
+ return [t, e];
14
+ }
15
+ export {
16
+ c as useCopyToClipboard
17
+ };
18
+ //# sourceMappingURL=index.es498.js.map