@satoshibits/react-json-schema-builder 1.1.6 → 1.1.7

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 (196) hide show
  1. package/README.md +2 -0
  2. package/dist/index.cjs132.js +1 -1
  3. package/dist/index.cjs132.js.map +1 -1
  4. package/dist/index.cjs133.js +1 -1
  5. package/dist/index.cjs133.js.map +1 -1
  6. package/dist/index.cjs136.js +1 -1
  7. package/dist/index.cjs138.js +1 -1
  8. package/dist/index.cjs139.js +5 -1
  9. package/dist/index.cjs139.js.map +1 -1
  10. package/dist/index.cjs140.js +1 -1
  11. package/dist/index.cjs140.js.map +1 -1
  12. package/dist/index.cjs141.js +1 -1
  13. package/dist/index.cjs141.js.map +1 -1
  14. package/dist/index.cjs142.js +1 -1
  15. package/dist/index.cjs142.js.map +1 -1
  16. package/dist/index.cjs143.js +1 -1
  17. package/dist/index.cjs143.js.map +1 -1
  18. package/dist/index.cjs144.js +1 -1
  19. package/dist/index.cjs144.js.map +1 -1
  20. package/dist/index.cjs145.js +1 -1
  21. package/dist/index.cjs145.js.map +1 -1
  22. package/dist/index.cjs146.js +1 -1
  23. package/dist/index.cjs146.js.map +1 -1
  24. package/dist/index.cjs147.js +1 -1
  25. package/dist/index.cjs147.js.map +1 -1
  26. package/dist/index.cjs148.js +1 -1
  27. package/dist/index.cjs148.js.map +1 -1
  28. package/dist/index.cjs149.js +1 -1
  29. package/dist/index.cjs149.js.map +1 -1
  30. package/dist/index.cjs15.js +1 -1
  31. package/dist/index.cjs150.js +1 -1
  32. package/dist/index.cjs150.js.map +1 -1
  33. package/dist/index.cjs151.js +1 -1
  34. package/dist/index.cjs151.js.map +1 -1
  35. package/dist/index.cjs152.js +1 -1
  36. package/dist/index.cjs152.js.map +1 -1
  37. package/dist/index.cjs153.js +1 -5
  38. package/dist/index.cjs153.js.map +1 -1
  39. package/dist/index.cjs154.js +1 -1
  40. package/dist/index.cjs154.js.map +1 -1
  41. package/dist/index.cjs155.js +1 -1
  42. package/dist/index.cjs155.js.map +1 -1
  43. package/dist/index.cjs156.js +1 -1
  44. package/dist/index.cjs156.js.map +1 -1
  45. package/dist/index.cjs157.js +1 -1
  46. package/dist/index.cjs157.js.map +1 -1
  47. package/dist/index.cjs158.js +1 -1
  48. package/dist/index.cjs158.js.map +1 -1
  49. package/dist/index.cjs159.js +1 -1
  50. package/dist/index.cjs159.js.map +1 -1
  51. package/dist/index.cjs164.js +1 -1
  52. package/dist/index.cjs166.js +1 -1
  53. package/dist/index.cjs17.js +1 -1
  54. package/dist/index.cjs171.js +1 -38
  55. package/dist/index.cjs171.js.map +1 -1
  56. package/dist/index.cjs172.js +38 -1
  57. package/dist/index.cjs172.js.map +1 -1
  58. package/dist/index.cjs173.js +1 -1
  59. package/dist/index.cjs173.js.map +1 -1
  60. package/dist/index.cjs174.js +1 -1
  61. package/dist/index.cjs174.js.map +1 -1
  62. package/dist/index.cjs175.js +1 -1
  63. package/dist/index.cjs175.js.map +1 -1
  64. package/dist/index.cjs178.js +1 -1
  65. package/dist/index.cjs178.js.map +1 -1
  66. package/dist/index.cjs179.js +1 -1
  67. package/dist/index.cjs179.js.map +1 -1
  68. package/dist/index.cjs180.js +1 -1
  69. package/dist/index.cjs180.js.map +1 -1
  70. package/dist/index.cjs181.js +1 -1
  71. package/dist/index.cjs181.js.map +1 -1
  72. package/dist/index.cjs21.js +1 -1
  73. package/dist/index.cjs25.js +1 -1
  74. package/dist/index.cjs32.js +1 -1
  75. package/dist/index.cjs35.js +1 -1
  76. package/dist/index.cjs37.js +1 -1
  77. package/dist/index.cjs37.js.map +1 -1
  78. package/dist/index.cjs38.js +1 -1
  79. package/dist/index.cjs38.js.map +1 -1
  80. package/dist/index.cjs39.js +1 -6
  81. package/dist/index.cjs39.js.map +1 -1
  82. package/dist/index.cjs40.js +1 -6
  83. package/dist/index.cjs40.js.map +1 -1
  84. package/dist/index.cjs41.js +1 -6
  85. package/dist/index.cjs41.js.map +1 -1
  86. package/dist/index.cjs42.js +1 -1
  87. package/dist/index.cjs42.js.map +1 -1
  88. package/dist/index.cjs43.js +1 -1
  89. package/dist/index.cjs43.js.map +1 -1
  90. package/dist/index.cjs44.js +1 -1
  91. package/dist/index.cjs44.js.map +1 -1
  92. package/dist/index.cjs45.js +6 -1
  93. package/dist/index.cjs45.js.map +1 -1
  94. package/dist/index.cjs46.js +6 -1
  95. package/dist/index.cjs46.js.map +1 -1
  96. package/dist/index.cjs47.js +6 -1
  97. package/dist/index.cjs47.js.map +1 -1
  98. package/dist/index.cjs48.js +1 -1
  99. package/dist/index.es132.js +32 -26
  100. package/dist/index.es132.js.map +1 -1
  101. package/dist/index.es133.js +26 -32
  102. package/dist/index.es133.js.map +1 -1
  103. package/dist/index.es136.js +1 -1
  104. package/dist/index.es138.js +1 -1
  105. package/dist/index.es139.js +254 -3
  106. package/dist/index.es139.js.map +1 -1
  107. package/dist/index.es140.js +19 -43
  108. package/dist/index.es140.js.map +1 -1
  109. package/dist/index.es141.js +3 -7
  110. package/dist/index.es141.js.map +1 -1
  111. package/dist/index.es142.js +44 -123
  112. package/dist/index.es142.js.map +1 -1
  113. package/dist/index.es143.js +7 -14
  114. package/dist/index.es143.js.map +1 -1
  115. package/dist/index.es144.js +116 -125
  116. package/dist/index.es144.js.map +1 -1
  117. package/dist/index.es145.js +14 -10
  118. package/dist/index.es145.js.map +1 -1
  119. package/dist/index.es146.js +127 -209
  120. package/dist/index.es146.js.map +1 -1
  121. package/dist/index.es147.js +10 -12
  122. package/dist/index.es147.js.map +1 -1
  123. package/dist/index.es148.js +215 -7
  124. package/dist/index.es148.js.map +1 -1
  125. package/dist/index.es149.js +13 -4
  126. package/dist/index.es149.js.map +1 -1
  127. package/dist/index.es15.js +1 -1
  128. package/dist/index.es150.js +7 -27
  129. package/dist/index.es150.js.map +1 -1
  130. package/dist/index.es151.js +3 -49
  131. package/dist/index.es151.js.map +1 -1
  132. package/dist/index.es152.js +28 -9
  133. package/dist/index.es152.js.map +1 -1
  134. package/dist/index.es153.js +48 -253
  135. package/dist/index.es153.js.map +1 -1
  136. package/dist/index.es154.js +8 -21
  137. package/dist/index.es154.js.map +1 -1
  138. package/dist/index.es155.js +67 -11
  139. package/dist/index.es155.js.map +1 -1
  140. package/dist/index.es156.js +10 -203
  141. package/dist/index.es156.js.map +1 -1
  142. package/dist/index.es157.js +203 -20
  143. package/dist/index.es157.js.map +1 -1
  144. package/dist/index.es158.js +21 -392
  145. package/dist/index.es158.js.map +1 -1
  146. package/dist/index.es159.js +386 -61
  147. package/dist/index.es159.js.map +1 -1
  148. package/dist/index.es164.js +1 -1
  149. package/dist/index.es166.js +4 -4
  150. package/dist/index.es17.js +4 -4
  151. package/dist/index.es171.js +65 -69
  152. package/dist/index.es171.js.map +1 -1
  153. package/dist/index.es172.js +68 -8
  154. package/dist/index.es172.js.map +1 -1
  155. package/dist/index.es173.js +9 -14
  156. package/dist/index.es173.js.map +1 -1
  157. package/dist/index.es174.js +14 -62
  158. package/dist/index.es174.js.map +1 -1
  159. package/dist/index.es175.js +61 -64
  160. package/dist/index.es175.js.map +1 -1
  161. package/dist/index.es178.js +21 -11
  162. package/dist/index.es178.js.map +1 -1
  163. package/dist/index.es179.js +11 -26
  164. package/dist/index.es179.js.map +1 -1
  165. package/dist/index.es180.js +27 -4
  166. package/dist/index.es180.js.map +1 -1
  167. package/dist/index.es181.js +4 -22
  168. package/dist/index.es181.js.map +1 -1
  169. package/dist/index.es21.js +5 -5
  170. package/dist/index.es25.js +6 -6
  171. package/dist/index.es32.js +1 -1
  172. package/dist/index.es35.js +1 -1
  173. package/dist/index.es37.js +106 -108
  174. package/dist/index.es37.js.map +1 -1
  175. package/dist/index.es38.js +48 -824
  176. package/dist/index.es38.js.map +1 -1
  177. package/dist/index.es39.js +24 -10
  178. package/dist/index.es39.js.map +1 -1
  179. package/dist/index.es40.js +45 -10
  180. package/dist/index.es40.js.map +1 -1
  181. package/dist/index.es41.js +86 -10
  182. package/dist/index.es41.js.map +1 -1
  183. package/dist/index.es42.js +56 -110
  184. package/dist/index.es42.js.map +1 -1
  185. package/dist/index.es43.js +109 -49
  186. package/dist/index.es43.js.map +1 -1
  187. package/dist/index.es44.js +827 -19
  188. package/dist/index.es44.js.map +1 -1
  189. package/dist/index.es45.js +10 -45
  190. package/dist/index.es45.js.map +1 -1
  191. package/dist/index.es46.js +10 -86
  192. package/dist/index.es46.js.map +1 -1
  193. package/dist/index.es47.js +10 -60
  194. package/dist/index.es47.js.map +1 -1
  195. package/dist/index.es48.js +2 -2
  196. package/package.json +9 -1
@@ -1,258 +1,53 @@
1
- import * as s from "react";
2
- import { composeEventHandlers as p } from "./index.es134.js";
3
- import { useComposedRefs as R } from "./index.es132.js";
4
- import { createContextScope as V, createContext as q } from "./index.es135.js";
5
- import { useId as C } from "./index.es145.js";
6
- import { useControllableState as K } from "./index.es136.js";
7
- import { DismissableLayer as U } from "./index.es142.js";
8
- import { FocusScope as Y } from "./index.es144.js";
9
- import { Portal as Z } from "./index.es147.js";
10
- import { Presence as _ } from "./index.es159.js";
11
- import { Primitive as g } from "./index.es133.js";
12
- import { useFocusGuards as z } from "./index.es143.js";
13
- import J from "./index.es152.js";
14
- import { hideOthers as Q } from "./index.es151.js";
15
- import { Slot as X } from "./index.es35.js";
16
- import { jsx as i, jsxs as y, Fragment as I } from "react/jsx-runtime";
17
- var h = "Dialog", [O, Ne] = V(h), [ee, u] = O(h), x = (e) => {
18
- const {
19
- __scopeDialog: t,
20
- children: n,
21
- open: a,
22
- defaultOpen: r,
23
- onOpenChange: o,
24
- modal: l = !0
25
- } = e, c = s.useRef(null), f = s.useRef(null), [D = !1, v] = K({
26
- prop: a,
27
- defaultProp: r,
28
- onChange: o
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;
29
16
  });
30
- return /* @__PURE__ */ i(
31
- ee,
32
- {
33
- scope: t,
34
- triggerRef: c,
35
- contentRef: f,
36
- contentId: C(),
37
- titleId: C(),
38
- descriptionId: C(),
39
- open: D,
40
- onOpenChange: v,
41
- onOpenToggle: s.useCallback(() => v((H) => !H), [v]),
42
- modal: l,
43
- children: n
44
- }
45
- );
46
- };
47
- x.displayName = h;
48
- var A = "DialogTrigger", T = s.forwardRef(
49
- (e, t) => {
50
- const { __scopeDialog: n, ...a } = e, r = u(A, n), o = R(t, r.triggerRef);
51
- return /* @__PURE__ */ i(
52
- g.button,
53
- {
54
- type: "button",
55
- "aria-haspopup": "dialog",
56
- "aria-expanded": r.open,
57
- "aria-controls": r.contentId,
58
- "data-state": P(r.open),
59
- ...a,
60
- ref: o,
61
- onClick: p(e.onClick, r.onOpenToggle)
62
- }
63
- );
64
- }
65
- );
66
- T.displayName = A;
67
- var E = "DialogPortal", [oe, b] = O(E, {
68
- forceMount: void 0
69
- }), M = (e) => {
70
- const { __scopeDialog: t, forceMount: n, children: a, container: r } = e, o = u(E, t);
71
- return /* @__PURE__ */ i(oe, { scope: t, forceMount: n, children: s.Children.map(a, (l) => /* @__PURE__ */ i(_, { present: n || o.open, children: /* @__PURE__ */ i(Z, { asChild: !0, container: r, children: l }) })) });
72
- };
73
- M.displayName = E;
74
- var m = "DialogOverlay", w = s.forwardRef(
75
- (e, t) => {
76
- const n = b(m, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(m, e.__scopeDialog);
77
- return o.modal ? /* @__PURE__ */ i(_, { present: a || o.open, children: /* @__PURE__ */ i(te, { ...r, ref: t }) }) : null;
78
- }
79
- );
80
- w.displayName = m;
81
- var te = s.forwardRef(
82
- (e, t) => {
83
- const { __scopeDialog: n, ...a } = e, r = u(m, n);
84
- return (
85
- // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
86
- // ie. when `Overlay` and `Content` are siblings
87
- /* @__PURE__ */ i(J, { as: X, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
88
- g.div,
89
- {
90
- "data-state": P(r.open),
91
- ...a,
92
- ref: t,
93
- style: { pointerEvents: "auto", ...a.style }
94
- }
95
- ) })
96
- );
97
- }
98
- ), d = "DialogContent", F = s.forwardRef(
99
- (e, t) => {
100
- const n = b(d, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(d, e.__scopeDialog);
101
- return /* @__PURE__ */ i(_, { present: a || o.open, children: o.modal ? /* @__PURE__ */ i(re, { ...r, ref: t }) : /* @__PURE__ */ i(ne, { ...r, ref: t }) });
102
- }
103
- );
104
- F.displayName = d;
105
- var re = s.forwardRef(
106
- (e, t) => {
107
- const n = u(d, e.__scopeDialog), a = s.useRef(null), r = R(t, n.contentRef, a);
108
- return s.useEffect(() => {
109
- const o = a.current;
110
- if (o) return Q(o);
111
- }, []), /* @__PURE__ */ i(
112
- S,
113
- {
114
- ...e,
115
- ref: r,
116
- trapFocus: n.open,
117
- disableOutsidePointerEvents: !0,
118
- onCloseAutoFocus: p(e.onCloseAutoFocus, (o) => {
119
- o.preventDefault(), n.triggerRef.current?.focus();
120
- }),
121
- onPointerDownOutside: p(e.onPointerDownOutside, (o) => {
122
- const l = o.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
123
- (l.button === 2 || c) && o.preventDefault();
124
- }),
125
- onFocusOutside: p(
126
- e.onFocusOutside,
127
- (o) => o.preventDefault()
128
- )
129
- }
130
- );
131
- }
132
- ), ne = s.forwardRef(
133
- (e, t) => {
134
- const n = u(d, e.__scopeDialog), a = s.useRef(!1), r = s.useRef(!1);
135
- return /* @__PURE__ */ i(
136
- S,
137
- {
138
- ...e,
139
- ref: t,
140
- trapFocus: !1,
141
- disableOutsidePointerEvents: !1,
142
- onCloseAutoFocus: (o) => {
143
- e.onCloseAutoFocus?.(o), o.defaultPrevented || (a.current || n.triggerRef.current?.focus(), o.preventDefault()), a.current = !1, r.current = !1;
144
- },
145
- onInteractOutside: (o) => {
146
- e.onInteractOutside?.(o), o.defaultPrevented || (a.current = !0, o.detail.originalEvent.type === "pointerdown" && (r.current = !0));
147
- const l = o.target;
148
- n.triggerRef.current?.contains(l) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && r.current && o.preventDefault();
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);
149
34
  }
150
- }
151
- );
152
- }
153
- ), S = s.forwardRef(
154
- (e, t) => {
155
- const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: o, ...l } = e, c = u(d, n), f = s.useRef(null), D = R(t, f);
156
- return z(), /* @__PURE__ */ y(I, { children: [
157
- /* @__PURE__ */ i(
158
- Y,
159
- {
160
- asChild: !0,
161
- loop: !0,
162
- trapped: a,
163
- onMountAutoFocus: r,
164
- onUnmountAutoFocus: o,
165
- children: /* @__PURE__ */ i(
166
- U,
167
- {
168
- role: "dialog",
169
- id: c.contentId,
170
- "aria-describedby": c.descriptionId,
171
- "aria-labelledby": c.titleId,
172
- "data-state": P(c.open),
173
- ...l,
174
- ref: D,
175
- onDismiss: () => c.onOpenChange(!1)
176
- }
177
- )
178
- }
179
- ),
180
- /* @__PURE__ */ y(I, { children: [
181
- /* @__PURE__ */ i(ae, { titleId: c.titleId }),
182
- /* @__PURE__ */ i(se, { contentRef: f, descriptionId: c.descriptionId })
183
- ] })
184
- ] });
185
- }
186
- ), N = "DialogTitle", W = s.forwardRef(
187
- (e, t) => {
188
- const { __scopeDialog: n, ...a } = e, r = u(N, n);
189
- return /* @__PURE__ */ i(g.h2, { id: r.titleId, ...a, ref: t });
190
- }
191
- );
192
- W.displayName = N;
193
- var k = "DialogDescription", G = s.forwardRef(
194
- (e, t) => {
195
- const { __scopeDialog: n, ...a } = e, r = u(k, n);
196
- return /* @__PURE__ */ i(g.p, { id: r.descriptionId, ...a, ref: t });
197
- }
198
- );
199
- G.displayName = k;
200
- var L = "DialogClose", $ = s.forwardRef(
201
- (e, t) => {
202
- const { __scopeDialog: n, ...a } = e, r = u(L, n);
203
- return /* @__PURE__ */ i(
204
- g.button,
205
- {
206
- type: "button",
207
- ...a,
208
- ref: t,
209
- onClick: p(e.onClick, () => r.onOpenChange(!1))
210
- }
211
- );
212
- }
213
- );
214
- $.displayName = L;
215
- function P(e) {
216
- return e ? "open" : "closed";
217
- }
218
- var B = "DialogTitleWarning", [Pe, j] = q(B, {
219
- contentName: d,
220
- titleName: N,
221
- docsSlug: "dialog"
222
- }), ae = ({ titleId: e }) => {
223
- const t = j(B), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
224
-
225
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
226
-
227
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
228
- return s.useEffect(() => {
229
- e && (document.getElementById(e) || console.error(n));
230
- }, [n, e]), null;
231
- }, ie = "DialogDescriptionWarning", se = ({ contentRef: e, descriptionId: t }) => {
232
- const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j(ie).contentName}}.`;
233
- return s.useEffect(() => {
234
- const r = e.current?.getAttribute("aria-describedby");
235
- t && r && (document.getElementById(t) || console.warn(a));
236
- }, [a, e, t]), null;
237
- }, ye = x, Ie = T, Oe = M, xe = w, Ae = F, Te = W, be = G, Me = $;
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
+ };
238
50
  export {
239
- Me as Close,
240
- Ae as Content,
241
- be as Description,
242
- x as Dialog,
243
- $ as DialogClose,
244
- F as DialogContent,
245
- G as DialogDescription,
246
- w as DialogOverlay,
247
- M as DialogPortal,
248
- W as DialogTitle,
249
- T as DialogTrigger,
250
- xe as Overlay,
251
- Oe as Portal,
252
- ye as Root,
253
- Te as Title,
254
- Ie as Trigger,
255
- Pe as WarningProvider,
256
- Ne as createDialogScope
51
+ C as hideOthers
257
52
  };
258
53
  //# sourceMappingURL=index.es153.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es153.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.6_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_963ba7435ac590a8053d1db2d26ca164/node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","contentRef","open","setOpen","useControllableState","jsx","useId","prevOpen","TRIGGER_NAME","DialogTrigger","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","DialogPortal","forceMount","container","child","Presence","PortalPrimitive","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","RemoveScroll","Slot","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","content","hideOthers","DialogContentImpl","event","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","DismissableLayer","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","DESCRIPTION_NAME","DialogDescription","descriptionProps","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","titleId","titleWarningContext","MESSAGE","DESCRIPTION_WARNING_NAME","descriptionId","describedById","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAIA,IAAc,UACd,CAACC,GAAqBC,EAAiB,IAAIC,EAAmBH,CAAW,GACzE,CAACI,IAAgBC,CAAgB,IAAIJ,EAAoBD,CAAW,GACpEM,IAAS,CAACC,MAAU;AACtB,QAAM;AAAA,IACJ,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EACZ,IAAMN,GACEO,IAAaC,EAAM,OAAO,IAAI,GAC9BC,IAAaD,EAAM,OAAO,IAAI,GAC9B,CAACE,IAAO,IAAOC,CAAO,IAAIC,EAAqB;AAAA,IACnD,MAAMT;AAAA,IACN,aAAaC;AAAA,IACb,UAAUC;AAAA,EACd,CAAG;AACD,SAAuB,gBAAAQ;AAAA,IACrBhB;AAAA,IACA;AAAA,MACE,OAAOI;AAAA,MACP,YAAAM;AAAA,MACA,YAAAE;AAAA,MACA,WAAWK,EAAO;AAAA,MAClB,SAASA,EAAO;AAAA,MAChB,eAAeA,EAAO;AAAA,MACtB,MAAAJ;AAAA,MACA,cAAcC;AAAA,MACd,cAAcH,EAAM,YAAY,MAAMG,E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a,kBAAkB;AACzE,IAAI2E,KAAiBC,MACI,SAAS,eAAeD,CAAa,KACvC,QAAQ,KAAKF,CAAO;AAAA,EAE5C,GAAE,CAACA,GAASzE,GAAY2E,CAAa,CAAC,GAChC;AACT,GACIE,KAAOvF,GACPwF,KAAUtE,GACVuE,KAAS3D,GACT4D,KAAUrD,GACVsD,KAAU/C,GACVgD,KAAQvB,GACRwB,KAAcrB,GACdsB,KAAQnB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es153.js","sources":["../../../node_modules/.pnpm/aria-hidden@1.2.4/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,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AAYC,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,25 +1,12 @@
1
- import * as p from "react";
2
- import { Primitive as v } from "./index.es133.js";
3
- import { jsx as m } from "react/jsx-runtime";
4
- var d = "Separator", a = "horizontal", l = ["horizontal", "vertical"], i = p.forwardRef((r, n) => {
5
- const { decorative: e, orientation: t = a, ...s } = r, o = f(t) ? t : a, c = e ? { role: "none" } : { "aria-orientation": o === "vertical" ? o : void 0, role: "separator" };
6
- return /* @__PURE__ */ m(
7
- v.div,
8
- {
9
- "data-orientation": o,
10
- ...c,
11
- ...s,
12
- ref: n
13
- }
14
- );
1
+ import { __assign as m } from "./index.es160.js";
2
+ import * as r from "react";
3
+ import { RemoveScroll as e } from "./index.es161.js";
4
+ import t from "./index.es162.js";
5
+ var s = r.forwardRef(function(a, o) {
6
+ return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
15
7
  });
16
- i.displayName = d;
17
- function f(r) {
18
- return l.includes(r);
19
- }
20
- var T = i;
8
+ s.classNames = e.classNames;
21
9
  export {
22
- T as Root,
23
- i as Separator
10
+ s as default
24
11
  };
25
12
  //# sourceMappingURL=index.es154.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es154.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-separator@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+re_e069430f4793534a3e5922dcc5ebc25b/node_modules/@radix-ui/react-separator/dist/index.mjs"],"sourcesContent":["// packages/react/separator/src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAME","DEFAULT_ORIENTATION","ORIENTATIONS","Separator","React","props","forwardedRef","decorative","orientationProp","domProps","orientation","isValidOrientation","semanticProps","jsx","Primitive","Root"],"mappings":";;;AAIA,IAAIA,IAAO,aACPC,IAAsB,cACtBC,IAAe,CAAC,cAAc,UAAU,GACxCC,IAAYC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACxD,QAAM,EAAE,YAAAC,GAAY,aAAaC,IAAkBP,GAAqB,GAAGQ,EAAQ,IAAKJ,GAClFK,IAAcC,EAAmBH,CAAe,IAAIA,IAAkBP,GAEtEW,IAAgBL,IAAa,EAAE,MAAM,WAAW,EAAE,oBADhCG,MAAgB,aAAaA,IAAc,QAC0B,MAAM,YAAa;AAChH,SAAuB,gBAAAG;AAAA,IACrBC,EAAU;AAAA,IACV;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACG;AACH,CAAC;AACDH,EAAU,cAAcH;AACxB,SAASW,EAAmBD,GAAa;AACvC,SAAOR,EAAa,SAASQ,CAAW;AAC1C;AACG,IAACK,IAAOZ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es154.js","sources":["../../../node_modules/.pnpm/react-remove-scroll@2.6.3_@types+react@18.3.18_react@18.3.1/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,15 +1,71 @@
1
- import * as r from "react";
2
- import { useCallbackRef as s } from "./index.es148.js";
3
- function p(n, e = globalThis?.document) {
4
- const t = s(n);
5
- r.useEffect(() => {
6
- const o = (a) => {
7
- a.key === "Escape" && t(a);
8
- };
9
- return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
10
- }, [t, e]);
1
+ import * as i from "react";
2
+ import { useComposedRefs as O } from "./index.es133.js";
3
+ import { useLayoutEffect as A } from "./index.es151.js";
4
+ function E(n, e) {
5
+ return i.useReducer((t, r) => e[t][r] ?? t, n);
6
+ }
7
+ var T = (n) => {
8
+ const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
9
+ return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
10
+ };
11
+ T.displayName = "Presence";
12
+ function R(n) {
13
+ const [e, t] = i.useState(), r = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
14
+ mounted: {
15
+ UNMOUNT: "unmounted",
16
+ ANIMATION_OUT: "unmountSuspended"
17
+ },
18
+ unmountSuspended: {
19
+ MOUNT: "mounted",
20
+ ANIMATION_END: "unmounted"
21
+ },
22
+ unmounted: {
23
+ MOUNT: "mounted"
24
+ }
25
+ });
26
+ return i.useEffect(() => {
27
+ const o = l(r.current);
28
+ c.current = N === "mounted" ? o : "none";
29
+ }, [N]), A(() => {
30
+ const o = r.current, m = a.current;
31
+ if (m !== n) {
32
+ const f = c.current, u = l(o);
33
+ n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
34
+ }
35
+ }, [n, s]), A(() => {
36
+ if (e) {
37
+ let o;
38
+ const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
+ const g = l(r.current).includes(u.animationName);
40
+ if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
41
+ const y = e.style.animationFillMode;
42
+ e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
+ e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
44
+ });
45
+ }
46
+ }, f = (u) => {
47
+ u.target === e && (c.current = l(r.current));
48
+ };
49
+ return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
+ m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
+ };
52
+ } else
53
+ s("ANIMATION_END");
54
+ }, [e, s]), {
55
+ isPresent: ["mounted", "unmountSuspended"].includes(N),
56
+ ref: i.useCallback((o) => {
57
+ o && (r.current = getComputedStyle(o)), t(o);
58
+ }, [])
59
+ };
60
+ }
61
+ function l(n) {
62
+ return n?.animationName || "none";
63
+ }
64
+ function v(n) {
65
+ let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
66
+ return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
11
67
  }
12
68
  export {
13
- p as useEscapeKeydown
69
+ T as Presence
14
70
  };
15
71
  //# sourceMappingURL=index.es155.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es155.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs"],"sourcesContent":["// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","useCallbackRef","React","handleKeyDown","event"],"mappings":";;AAGA,SAASA,EAAiBC,GAAqBC,IAAgB,YAAY,UAAU;AACnF,QAAMC,IAAkBC,EAAeH,CAAmB;AAC1D,EAAAI,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAgB,CAACC,MAAU;AAC/B,MAAIA,EAAM,QAAQ,YAChBJ,EAAgBI,CAAK;AAAA,IAExB;AACD,WAAAL,EAAc,iBAAiB,WAAWI,GAAe,EAAE,SAAS,IAAM,GACnE,MAAMJ,EAAc,oBAAoB,WAAWI,GAAe,EAAE,SAAS,IAAM;AAAA,EAC9F,GAAK,CAACH,GAAiBD,CAAa,CAAC;AACrC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es155.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-presence@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+rea_f6427c6d64d2d542f3fe67e5d488b7cd/node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/presence/src/Presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/useStateMachine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\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 Presence\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useStateMachine","initialState","machine","React","state","event","Presence","props","present","children","presence","usePresence","child","React2","ref","useComposedRefs","getElementRef","node","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","node2","element","getter","mayWarn"],"mappings":";;;AASA,SAASA,EAAgBC,GAAcC,GAAS;AAC9C,SAAOC,EAAM,WAAW,CAACC,GAAOC,MACZH,EAAQE,CAAK,EAAEC,CAAK,KAClBD,GACnBH,CAAY;AACjB;AAGG,IAACK,IAAW,CAACC,MAAU;AACxB,QAAM,EAAE,SAAAC,GAAS,UAAAC,EAAQ,IAAKF,GACxBG,IAAWC,EAAYH,CAAO,GAC9BI,IAAQ,OAAOH,KAAa,aAAaA,EAAS,EAAE,SAASC,EAAS,UAAW,CAAA,IAAIG,EAAO,SAAS,KAAKJ,CAAQ,GAClHK,IAAMC,EAAgBL,EAAS,KAAKM,EAAcJ,CAAK,CAAC;AAE9D,SADmB,OAAOH,KAAa,cAClBC,EAAS,YAAYG,EAAO,aAAaD,GAAO,EAAE,KAAAE,EAAK,CAAA,IAAI;AAClF;AACAR,EAAS,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