@purpurds/modal 8.8.1 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +5 -5
- package/dist/modal.cjs.js +7 -31
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.es.js +339 -391
- package/dist/modal.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +26 -26
package/dist/modal.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as p, jsxs as $, Fragment as xe } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { useState as ye, forwardRef as Ce, useRef as be, useCallback as Zt, useEffect as
|
|
3
|
+
import { useState as ye, forwardRef as Ce, useRef as be, useCallback as Zt, useEffect as Ee } from "react";
|
|
4
4
|
import * as Qt from "react-dom";
|
|
5
5
|
import Jt from "react-dom";
|
|
6
6
|
function F(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
|
-
if (e
|
|
9
|
-
return t
|
|
8
|
+
if (e?.(a), r === !1 || !a.defaultPrevented)
|
|
9
|
+
return t?.(a);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function De(e, t) {
|
|
13
13
|
if (typeof e == "function")
|
|
14
14
|
return e(t);
|
|
15
15
|
e != null && (e.current = t);
|
|
@@ -18,25 +18,25 @@ function st(...e) {
|
|
|
18
18
|
return (t) => {
|
|
19
19
|
let r = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
21
|
-
const n =
|
|
21
|
+
const n = De(a, t);
|
|
22
22
|
return !r && typeof n == "function" && (r = !0), n;
|
|
23
23
|
});
|
|
24
24
|
if (r)
|
|
25
25
|
return () => {
|
|
26
26
|
for (let a = 0; a < o.length; a++) {
|
|
27
27
|
const n = o[a];
|
|
28
|
-
typeof n == "function" ? n() :
|
|
28
|
+
typeof n == "function" ? n() : De(e[a], null);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function j(...e) {
|
|
34
34
|
return s.useCallback(st(...e), e);
|
|
35
35
|
}
|
|
36
36
|
function er(e, t) {
|
|
37
37
|
const r = s.createContext(t), o = (n) => {
|
|
38
38
|
const { children: u, ...i } = n, d = s.useMemo(() => i, Object.values(i));
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ p(r.Provider, { value: d, children: u });
|
|
40
40
|
};
|
|
41
41
|
o.displayName = e + "Provider";
|
|
42
42
|
function a(n) {
|
|
@@ -53,24 +53,22 @@ function tr(e, t = []) {
|
|
|
53
53
|
const i = s.createContext(u), d = r.length;
|
|
54
54
|
r = [...r, u];
|
|
55
55
|
const c = (v) => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return /* @__PURE__ */ f(l.Provider, { value: m, children: g });
|
|
56
|
+
const { scope: h, children: g, ...b } = v, l = h?.[e]?.[d] || i, m = s.useMemo(() => b, Object.values(b));
|
|
57
|
+
return /* @__PURE__ */ p(l.Provider, { value: m, children: g });
|
|
59
58
|
};
|
|
60
59
|
c.displayName = n + "Provider";
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
const g = ((l = h == null ? void 0 : h[e]) == null ? void 0 : l[d]) || i, b = s.useContext(g);
|
|
60
|
+
function f(v, h) {
|
|
61
|
+
const g = h?.[e]?.[d] || i, b = s.useContext(g);
|
|
64
62
|
if (b) return b;
|
|
65
63
|
if (u !== void 0) return u;
|
|
66
64
|
throw new Error(`\`${v}\` must be used within \`${n}\``);
|
|
67
65
|
}
|
|
68
|
-
return [c,
|
|
66
|
+
return [c, f];
|
|
69
67
|
}
|
|
70
68
|
const a = () => {
|
|
71
69
|
const n = r.map((u) => s.createContext(u));
|
|
72
70
|
return function(i) {
|
|
73
|
-
const d =
|
|
71
|
+
const d = i?.[e] || n;
|
|
74
72
|
return s.useMemo(
|
|
75
73
|
() => ({ [`__scope${e}`]: { ...i, [e]: d } }),
|
|
76
74
|
[i, d]
|
|
@@ -97,7 +95,7 @@ function rr(...e) {
|
|
|
97
95
|
};
|
|
98
96
|
return r.scopeName = t.scopeName, r;
|
|
99
97
|
}
|
|
100
|
-
var q = globalThis
|
|
98
|
+
var q = globalThis?.document ? s.useLayoutEffect : () => {
|
|
101
99
|
}, nr = s[" useId ".trim().toString()] || (() => {
|
|
102
100
|
}), or = 0;
|
|
103
101
|
function le(e) {
|
|
@@ -119,22 +117,21 @@ function ir({
|
|
|
119
117
|
onChange: r
|
|
120
118
|
}), i = e !== void 0, d = i ? e : a;
|
|
121
119
|
{
|
|
122
|
-
const
|
|
120
|
+
const f = s.useRef(e !== void 0);
|
|
123
121
|
s.useEffect(() => {
|
|
124
|
-
const v =
|
|
122
|
+
const v = f.current;
|
|
125
123
|
v !== i && console.warn(
|
|
126
124
|
`${o} is changing from ${v ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
127
|
-
),
|
|
125
|
+
), f.current = i;
|
|
128
126
|
}, [i, o]);
|
|
129
127
|
}
|
|
130
128
|
const c = s.useCallback(
|
|
131
|
-
(
|
|
132
|
-
var v;
|
|
129
|
+
(f) => {
|
|
133
130
|
if (i) {
|
|
134
|
-
const
|
|
135
|
-
|
|
131
|
+
const v = sr(f) ? f(e) : f;
|
|
132
|
+
v !== e && u.current?.(v);
|
|
136
133
|
} else
|
|
137
|
-
n(
|
|
134
|
+
n(f);
|
|
138
135
|
},
|
|
139
136
|
[i, e, n, u]
|
|
140
137
|
);
|
|
@@ -148,8 +145,7 @@ function ur({
|
|
|
148
145
|
return ar(() => {
|
|
149
146
|
n.current = t;
|
|
150
147
|
}, [t]), s.useEffect(() => {
|
|
151
|
-
|
|
152
|
-
a.current !== r && ((u = n.current) == null || u.call(n, r), a.current = r);
|
|
148
|
+
a.current !== r && (n.current?.(r), a.current = r);
|
|
153
149
|
}, [r, a]), [r, o, n];
|
|
154
150
|
}
|
|
155
151
|
function sr(e) {
|
|
@@ -160,10 +156,10 @@ function ct(e) {
|
|
|
160
156
|
const t = /* @__PURE__ */ cr(e), r = s.forwardRef((o, a) => {
|
|
161
157
|
const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(dr);
|
|
162
158
|
if (d) {
|
|
163
|
-
const c = d.props.children,
|
|
164
|
-
return /* @__PURE__ */
|
|
159
|
+
const c = d.props.children, f = i.map((v) => v === d ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : v);
|
|
160
|
+
return /* @__PURE__ */ p(t, { ...u, ref: a, children: s.isValidElement(c) ? s.cloneElement(c, void 0, f) : null });
|
|
165
161
|
}
|
|
166
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ p(t, { ...u, ref: a, children: n });
|
|
167
163
|
});
|
|
168
164
|
return r.displayName = `${e}.Slot`, r;
|
|
169
165
|
}
|
|
@@ -195,9 +191,8 @@ function pr(e, t) {
|
|
|
195
191
|
return { ...e, ...r };
|
|
196
192
|
}
|
|
197
193
|
function fr(e) {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
194
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
195
|
+
return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
201
196
|
}
|
|
202
197
|
var vr = [
|
|
203
198
|
"a",
|
|
@@ -220,7 +215,7 @@ var vr = [
|
|
|
220
215
|
], M = vr.reduce((e, t) => {
|
|
221
216
|
const r = /* @__PURE__ */ ct(`Primitive.${t}`), o = s.forwardRef((a, n) => {
|
|
222
217
|
const { asChild: u, ...i } = a, d = u ? r : t;
|
|
223
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
218
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(d, { ...i, ref: n });
|
|
224
219
|
});
|
|
225
220
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
226
221
|
}, {});
|
|
@@ -231,12 +226,9 @@ function Y(e) {
|
|
|
231
226
|
const t = s.useRef(e);
|
|
232
227
|
return s.useEffect(() => {
|
|
233
228
|
t.current = e;
|
|
234
|
-
}), s.useMemo(() => (...r) =>
|
|
235
|
-
var o;
|
|
236
|
-
return (o = t.current) == null ? void 0 : o.call(t, ...r);
|
|
237
|
-
}, []);
|
|
229
|
+
}), s.useMemo(() => (...r) => t.current?.(...r), []);
|
|
238
230
|
}
|
|
239
|
-
function mr(e, t = globalThis
|
|
231
|
+
function mr(e, t = globalThis?.document) {
|
|
240
232
|
const r = Y(e);
|
|
241
233
|
s.useEffect(() => {
|
|
242
234
|
const o = (a) => {
|
|
@@ -245,7 +237,7 @@ function mr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
245
237
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
246
238
|
}, [r, t]);
|
|
247
239
|
}
|
|
248
|
-
var gr = "DismissableLayer",
|
|
240
|
+
var gr = "DismissableLayer", we = "dismissableLayer.update", _r = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", Ae, lt = s.createContext({
|
|
249
241
|
layers: /* @__PURE__ */ new Set(),
|
|
250
242
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
251
243
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -259,32 +251,32 @@ var gr = "DismissableLayer", Ee = "dismissableLayer.update", _r = "dismissableLa
|
|
|
259
251
|
onInteractOutside: u,
|
|
260
252
|
onDismiss: i,
|
|
261
253
|
...d
|
|
262
|
-
} = e, c = s.useContext(lt), [
|
|
263
|
-
const x = y.target,
|
|
264
|
-
!S ||
|
|
254
|
+
} = e, c = s.useContext(lt), [f, v] = s.useState(null), h = f?.ownerDocument ?? globalThis?.document, [, g] = s.useState({}), b = j(t, (y) => v(y)), l = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = l.indexOf(m), E = f ? l.indexOf(f) : -1, w = c.layersWithOutsidePointerEventsDisabled.size > 0, S = E >= _, C = wr((y) => {
|
|
255
|
+
const x = y.target, P = [...c.branches].some((K) => K.contains(x));
|
|
256
|
+
!S || P || (a?.(y), u?.(y), y.defaultPrevented || i?.());
|
|
265
257
|
}, h), O = Sr((y) => {
|
|
266
258
|
const x = y.target;
|
|
267
|
-
[...c.branches].some((
|
|
259
|
+
[...c.branches].some((K) => K.contains(x)) || (n?.(y), u?.(y), y.defaultPrevented || i?.());
|
|
268
260
|
}, h);
|
|
269
261
|
return mr((y) => {
|
|
270
|
-
|
|
262
|
+
E === c.layers.size - 1 && (o?.(y), !y.defaultPrevented && i && (y.preventDefault(), i()));
|
|
271
263
|
}, h), s.useEffect(() => {
|
|
272
|
-
if (
|
|
273
|
-
return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
274
|
-
r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents =
|
|
264
|
+
if (f)
|
|
265
|
+
return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Ae = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), $e(), () => {
|
|
266
|
+
r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Ae);
|
|
275
267
|
};
|
|
276
|
-
}, [
|
|
277
|
-
|
|
278
|
-
}, [
|
|
268
|
+
}, [f, h, r, c]), s.useEffect(() => () => {
|
|
269
|
+
f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), $e());
|
|
270
|
+
}, [f, c]), s.useEffect(() => {
|
|
279
271
|
const y = () => g({});
|
|
280
|
-
return document.addEventListener(
|
|
281
|
-
}, []), /* @__PURE__ */
|
|
272
|
+
return document.addEventListener(we, y), () => document.removeEventListener(we, y);
|
|
273
|
+
}, []), /* @__PURE__ */ p(
|
|
282
274
|
M.div,
|
|
283
275
|
{
|
|
284
276
|
...d,
|
|
285
277
|
ref: b,
|
|
286
278
|
style: {
|
|
287
|
-
pointerEvents:
|
|
279
|
+
pointerEvents: w ? S ? "auto" : "none" : void 0,
|
|
288
280
|
...e.style
|
|
289
281
|
},
|
|
290
282
|
onFocusCapture: F(e.onFocusCapture, O.onFocusCapture),
|
|
@@ -298,18 +290,18 @@ var gr = "DismissableLayer", Ee = "dismissableLayer.update", _r = "dismissableLa
|
|
|
298
290
|
}
|
|
299
291
|
);
|
|
300
292
|
dt.displayName = gr;
|
|
301
|
-
var br = "DismissableLayerBranch",
|
|
302
|
-
const r = s.useContext(lt), o = s.useRef(null), a =
|
|
293
|
+
var br = "DismissableLayerBranch", Er = s.forwardRef((e, t) => {
|
|
294
|
+
const r = s.useContext(lt), o = s.useRef(null), a = j(t, o);
|
|
303
295
|
return s.useEffect(() => {
|
|
304
296
|
const n = o.current;
|
|
305
297
|
if (n)
|
|
306
298
|
return r.branches.add(n), () => {
|
|
307
299
|
r.branches.delete(n);
|
|
308
300
|
};
|
|
309
|
-
}, [r.branches]), /* @__PURE__ */
|
|
301
|
+
}, [r.branches]), /* @__PURE__ */ p(M.div, { ...e, ref: a });
|
|
310
302
|
});
|
|
311
|
-
|
|
312
|
-
function
|
|
303
|
+
Er.displayName = br;
|
|
304
|
+
function wr(e, t = globalThis?.document) {
|
|
313
305
|
const r = Y(e), o = s.useRef(!1), a = s.useRef(() => {
|
|
314
306
|
});
|
|
315
307
|
return s.useEffect(() => {
|
|
@@ -339,7 +331,7 @@ function Er(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
339
331
|
onPointerDownCapture: () => o.current = !0
|
|
340
332
|
};
|
|
341
333
|
}
|
|
342
|
-
function Sr(e, t = globalThis
|
|
334
|
+
function Sr(e, t = globalThis?.document) {
|
|
343
335
|
const r = Y(e), o = s.useRef(!1);
|
|
344
336
|
return s.useEffect(() => {
|
|
345
337
|
const a = (n) => {
|
|
@@ -354,7 +346,7 @@ function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
354
346
|
};
|
|
355
347
|
}
|
|
356
348
|
function $e() {
|
|
357
|
-
const e = new CustomEvent(
|
|
349
|
+
const e = new CustomEvent(we);
|
|
358
350
|
document.dispatchEvent(e);
|
|
359
351
|
}
|
|
360
352
|
function pt(e, t, r, { discrete: o }) {
|
|
@@ -368,7 +360,7 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
|
|
|
368
360
|
onMountAutoFocus: a,
|
|
369
361
|
onUnmountAutoFocus: n,
|
|
370
362
|
...u
|
|
371
|
-
} = e, [i, d] = s.useState(null), c = Y(a),
|
|
363
|
+
} = e, [i, d] = s.useState(null), c = Y(a), f = Y(n), v = s.useRef(null), h = j(t, (l) => d(l)), g = s.useRef({
|
|
372
364
|
paused: !1,
|
|
373
365
|
pause() {
|
|
374
366
|
this.paused = !0;
|
|
@@ -379,23 +371,23 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
|
|
|
379
371
|
}).current;
|
|
380
372
|
s.useEffect(() => {
|
|
381
373
|
if (o) {
|
|
382
|
-
let l = function(
|
|
374
|
+
let l = function(w) {
|
|
383
375
|
if (g.paused || !i) return;
|
|
384
|
-
const S =
|
|
376
|
+
const S = w.target;
|
|
385
377
|
i.contains(S) ? v.current = S : L(v.current, { select: !0 });
|
|
386
|
-
}, m = function(
|
|
378
|
+
}, m = function(w) {
|
|
387
379
|
if (g.paused || !i) return;
|
|
388
|
-
const S =
|
|
380
|
+
const S = w.relatedTarget;
|
|
389
381
|
S !== null && (i.contains(S) || L(v.current, { select: !0 }));
|
|
390
|
-
}, _ = function(
|
|
382
|
+
}, _ = function(w) {
|
|
391
383
|
if (document.activeElement === document.body)
|
|
392
|
-
for (const C of
|
|
384
|
+
for (const C of w)
|
|
393
385
|
C.removedNodes.length > 0 && L(i);
|
|
394
386
|
};
|
|
395
387
|
document.addEventListener("focusin", l), document.addEventListener("focusout", m);
|
|
396
|
-
const
|
|
397
|
-
return i &&
|
|
398
|
-
document.removeEventListener("focusin", l), document.removeEventListener("focusout", m),
|
|
388
|
+
const E = new MutationObserver(_);
|
|
389
|
+
return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
390
|
+
document.removeEventListener("focusin", l), document.removeEventListener("focusout", m), E.disconnect();
|
|
399
391
|
};
|
|
400
392
|
}
|
|
401
393
|
}, [o, i, g.paused]), s.useEffect(() => {
|
|
@@ -404,28 +396,28 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
|
|
|
404
396
|
const l = document.activeElement;
|
|
405
397
|
if (!i.contains(l)) {
|
|
406
398
|
const _ = new CustomEvent(de, Te);
|
|
407
|
-
i.addEventListener(de, c), i.dispatchEvent(_), _.defaultPrevented || (Nr(
|
|
399
|
+
i.addEventListener(de, c), i.dispatchEvent(_), _.defaultPrevented || (Nr(Dr(vt(i)), { select: !0 }), document.activeElement === l && L(i));
|
|
408
400
|
}
|
|
409
401
|
return () => {
|
|
410
402
|
i.removeEventListener(de, c), setTimeout(() => {
|
|
411
403
|
const _ = new CustomEvent(pe, Te);
|
|
412
|
-
i.addEventListener(pe,
|
|
404
|
+
i.addEventListener(pe, f), i.dispatchEvent(_), _.defaultPrevented || L(l ?? document.body, { select: !0 }), i.removeEventListener(pe, f), Ie.remove(g);
|
|
413
405
|
}, 0);
|
|
414
406
|
};
|
|
415
407
|
}
|
|
416
|
-
}, [i, c,
|
|
408
|
+
}, [i, c, f, g]);
|
|
417
409
|
const b = s.useCallback(
|
|
418
410
|
(l) => {
|
|
419
411
|
if (!r && !o || g.paused) return;
|
|
420
412
|
const m = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, _ = document.activeElement;
|
|
421
413
|
if (m && _) {
|
|
422
|
-
const
|
|
423
|
-
|
|
414
|
+
const E = l.currentTarget, [w, S] = Or(E);
|
|
415
|
+
w && S ? !l.shiftKey && _ === S ? (l.preventDefault(), r && L(w, { select: !0 })) : l.shiftKey && _ === w && (l.preventDefault(), r && L(S, { select: !0 })) : _ === E && l.preventDefault();
|
|
424
416
|
}
|
|
425
417
|
},
|
|
426
418
|
[r, o, g.paused]
|
|
427
419
|
);
|
|
428
|
-
return /* @__PURE__ */
|
|
420
|
+
return /* @__PURE__ */ p(M.div, { tabIndex: -1, ...u, ref: h, onKeyDown: b });
|
|
429
421
|
});
|
|
430
422
|
ft.displayName = Cr;
|
|
431
423
|
function Nr(e, { select: t = !1 } = {}) {
|
|
@@ -449,9 +441,9 @@ function vt(e) {
|
|
|
449
441
|
}
|
|
450
442
|
function Me(e, t) {
|
|
451
443
|
for (const r of e)
|
|
452
|
-
if (!
|
|
444
|
+
if (!Rr(r, { upTo: t })) return r;
|
|
453
445
|
}
|
|
454
|
-
function
|
|
446
|
+
function Rr(e, { upTo: t }) {
|
|
455
447
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
456
448
|
for (; e; ) {
|
|
457
449
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -460,13 +452,13 @@ function Pr(e, { upTo: t }) {
|
|
|
460
452
|
}
|
|
461
453
|
return !1;
|
|
462
454
|
}
|
|
463
|
-
function
|
|
455
|
+
function Pr(e) {
|
|
464
456
|
return e instanceof HTMLInputElement && "select" in e;
|
|
465
457
|
}
|
|
466
458
|
function L(e, { select: t = !1 } = {}) {
|
|
467
459
|
if (e && e.focus) {
|
|
468
460
|
const r = document.activeElement;
|
|
469
|
-
e.focus({ preventScroll: !0 }), e !== r &&
|
|
461
|
+
e.focus({ preventScroll: !0 }), e !== r && Pr(e) && t && e.select();
|
|
470
462
|
}
|
|
471
463
|
}
|
|
472
464
|
var Ie = xr();
|
|
@@ -475,11 +467,10 @@ function xr() {
|
|
|
475
467
|
return {
|
|
476
468
|
add(t) {
|
|
477
469
|
const r = e[0];
|
|
478
|
-
t !== r &&
|
|
470
|
+
t !== r && r?.pause(), e = Le(e, t), e.unshift(t);
|
|
479
471
|
},
|
|
480
472
|
remove(t) {
|
|
481
|
-
|
|
482
|
-
e = Le(e, t), (r = e[0]) == null || r.resume();
|
|
473
|
+
e = Le(e, t), e[0]?.resume();
|
|
483
474
|
}
|
|
484
475
|
};
|
|
485
476
|
}
|
|
@@ -487,22 +478,21 @@ function Le(e, t) {
|
|
|
487
478
|
const r = [...e], o = r.indexOf(t);
|
|
488
479
|
return o !== -1 && r.splice(o, 1), r;
|
|
489
480
|
}
|
|
490
|
-
function
|
|
481
|
+
function Dr(e) {
|
|
491
482
|
return e.filter((t) => t.tagName !== "A");
|
|
492
483
|
}
|
|
493
|
-
var
|
|
494
|
-
var i;
|
|
484
|
+
var Ar = "Portal", ht = s.forwardRef((e, t) => {
|
|
495
485
|
const { container: r, ...o } = e, [a, n] = s.useState(!1);
|
|
496
486
|
q(() => n(!0), []);
|
|
497
|
-
const u = r || a &&
|
|
498
|
-
return u ? Jt.createPortal(/* @__PURE__ */
|
|
487
|
+
const u = r || a && globalThis?.document?.body;
|
|
488
|
+
return u ? Jt.createPortal(/* @__PURE__ */ p(M.div, { ...o, ref: t }), u) : null;
|
|
499
489
|
});
|
|
500
|
-
ht.displayName =
|
|
490
|
+
ht.displayName = Ar;
|
|
501
491
|
function $r(e, t) {
|
|
502
492
|
return s.useReducer((r, o) => t[r][o] ?? r, e);
|
|
503
493
|
}
|
|
504
494
|
var ue = (e) => {
|
|
505
|
-
const { present: t, children: r } = e, o = Tr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n =
|
|
495
|
+
const { present: t, children: r } = e, o = Tr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = j(o.ref, Mr(a));
|
|
506
496
|
return typeof r == "function" || o.isPresent ? s.cloneElement(a, { ref: n }) : null;
|
|
507
497
|
};
|
|
508
498
|
ue.displayName = "Presence";
|
|
@@ -524,19 +514,19 @@ function Tr(e) {
|
|
|
524
514
|
const c = Z(o.current);
|
|
525
515
|
n.current = i === "mounted" ? c : "none";
|
|
526
516
|
}, [i]), q(() => {
|
|
527
|
-
const c = o.current,
|
|
528
|
-
if (
|
|
517
|
+
const c = o.current, f = a.current;
|
|
518
|
+
if (f !== e) {
|
|
529
519
|
const h = n.current, g = Z(c);
|
|
530
|
-
e ? d("MOUNT") : g === "none" ||
|
|
520
|
+
e ? d("MOUNT") : g === "none" || c?.display === "none" ? d("UNMOUNT") : d(f && h !== g ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
531
521
|
}
|
|
532
522
|
}, [e, d]), q(() => {
|
|
533
523
|
if (t) {
|
|
534
524
|
let c;
|
|
535
|
-
const
|
|
525
|
+
const f = t.ownerDocument.defaultView ?? window, v = (g) => {
|
|
536
526
|
const l = Z(o.current).includes(CSS.escape(g.animationName));
|
|
537
527
|
if (g.target === t && l && (d("ANIMATION_END"), !a.current)) {
|
|
538
528
|
const m = t.style.animationFillMode;
|
|
539
|
-
t.style.animationFillMode = "forwards", c =
|
|
529
|
+
t.style.animationFillMode = "forwards", c = f.setTimeout(() => {
|
|
540
530
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = m);
|
|
541
531
|
});
|
|
542
532
|
}
|
|
@@ -544,7 +534,7 @@ function Tr(e) {
|
|
|
544
534
|
g.target === t && (n.current = Z(o.current));
|
|
545
535
|
};
|
|
546
536
|
return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
|
|
547
|
-
|
|
537
|
+
f.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
|
|
548
538
|
};
|
|
549
539
|
} else
|
|
550
540
|
d("ANIMATION_END");
|
|
@@ -556,12 +546,11 @@ function Tr(e) {
|
|
|
556
546
|
};
|
|
557
547
|
}
|
|
558
548
|
function Z(e) {
|
|
559
|
-
return
|
|
549
|
+
return e?.animationName || "none";
|
|
560
550
|
}
|
|
561
551
|
function Mr(e) {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
552
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
553
|
+
return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
565
554
|
}
|
|
566
555
|
var fe = 0;
|
|
567
556
|
function Ir() {
|
|
@@ -598,11 +587,11 @@ function Lr(e, t, r) {
|
|
|
598
587
|
(n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
|
|
599
588
|
return e.concat(n || Array.prototype.slice.call(t));
|
|
600
589
|
}
|
|
601
|
-
var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", Fr = "with-scroll-bars-hidden",
|
|
590
|
+
var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", Fr = "with-scroll-bars-hidden", kr = "--removed-body-scroll-bar-size";
|
|
602
591
|
function ve(e, t) {
|
|
603
592
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
604
593
|
}
|
|
605
|
-
function
|
|
594
|
+
function jr(e, t) {
|
|
606
595
|
var r = ye(function() {
|
|
607
596
|
return {
|
|
608
597
|
// value
|
|
@@ -623,15 +612,15 @@ function kr(e, t) {
|
|
|
623
612
|
})[0];
|
|
624
613
|
return r.callback = t, r.facade;
|
|
625
614
|
}
|
|
626
|
-
var Wr = typeof window < "u" ? s.useLayoutEffect : s.useEffect,
|
|
615
|
+
var Wr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, ke = /* @__PURE__ */ new WeakMap();
|
|
627
616
|
function Br(e, t) {
|
|
628
|
-
var r =
|
|
617
|
+
var r = jr(null, function(o) {
|
|
629
618
|
return e.forEach(function(a) {
|
|
630
619
|
return ve(a, o);
|
|
631
620
|
});
|
|
632
621
|
});
|
|
633
622
|
return Wr(function() {
|
|
634
|
-
var o =
|
|
623
|
+
var o = ke.get(r);
|
|
635
624
|
if (o) {
|
|
636
625
|
var a = new Set(o), n = new Set(e), u = r.current;
|
|
637
626
|
a.forEach(function(i) {
|
|
@@ -640,13 +629,13 @@ function Br(e, t) {
|
|
|
640
629
|
a.has(i) || ve(i, u);
|
|
641
630
|
});
|
|
642
631
|
}
|
|
643
|
-
|
|
632
|
+
ke.set(r, e);
|
|
644
633
|
}, [e]), r;
|
|
645
634
|
}
|
|
646
635
|
function Ur(e) {
|
|
647
636
|
return e;
|
|
648
637
|
}
|
|
649
|
-
function
|
|
638
|
+
function Hr(e, t) {
|
|
650
639
|
t === void 0 && (t = Ur);
|
|
651
640
|
var r = [], o = !1, a = {
|
|
652
641
|
read: function() {
|
|
@@ -684,26 +673,26 @@ function Vr(e, t) {
|
|
|
684
673
|
r = [], i.forEach(n), u = r;
|
|
685
674
|
}
|
|
686
675
|
var d = function() {
|
|
687
|
-
var
|
|
688
|
-
u = [],
|
|
676
|
+
var f = u;
|
|
677
|
+
u = [], f.forEach(n);
|
|
689
678
|
}, c = function() {
|
|
690
679
|
return Promise.resolve().then(d);
|
|
691
680
|
};
|
|
692
681
|
c(), r = {
|
|
693
|
-
push: function(
|
|
694
|
-
u.push(
|
|
682
|
+
push: function(f) {
|
|
683
|
+
u.push(f), c();
|
|
695
684
|
},
|
|
696
|
-
filter: function(
|
|
697
|
-
return u = u.filter(
|
|
685
|
+
filter: function(f) {
|
|
686
|
+
return u = u.filter(f), r;
|
|
698
687
|
}
|
|
699
688
|
};
|
|
700
689
|
}
|
|
701
690
|
};
|
|
702
691
|
return a;
|
|
703
692
|
}
|
|
704
|
-
function
|
|
693
|
+
function Vr(e) {
|
|
705
694
|
e === void 0 && (e = {});
|
|
706
|
-
var t =
|
|
695
|
+
var t = Hr(null);
|
|
707
696
|
return t.options = T({ async: !0, ssr: !1 }, e), t;
|
|
708
697
|
}
|
|
709
698
|
var gt = function(e) {
|
|
@@ -716,21 +705,21 @@ var gt = function(e) {
|
|
|
716
705
|
return s.createElement(o, T({}, r));
|
|
717
706
|
};
|
|
718
707
|
gt.isSideCarExport = !0;
|
|
719
|
-
function
|
|
708
|
+
function Kr(e, t) {
|
|
720
709
|
return e.useMedium(t), gt;
|
|
721
710
|
}
|
|
722
|
-
var _t =
|
|
711
|
+
var _t = Vr(), he = function() {
|
|
723
712
|
}, se = s.forwardRef(function(e, t) {
|
|
724
713
|
var r = s.useRef(null), o = s.useState({
|
|
725
714
|
onScrollCapture: he,
|
|
726
715
|
onWheelCapture: he,
|
|
727
716
|
onTouchMoveCapture: he
|
|
728
|
-
}), a = o[0], n = o[1], u = e.forwardProps, i = e.children, d = e.className, c = e.removeScrollBar,
|
|
717
|
+
}), a = o[0], n = o[1], u = e.forwardProps, i = e.children, d = e.className, c = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, g = e.noRelative, b = e.noIsolation, l = e.inert, m = e.allowPinchZoom, _ = e.as, E = _ === void 0 ? "div" : _, w = e.gapMode, S = mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, O = Br([r, t]), y = T(T({}, S), a);
|
|
729
718
|
return s.createElement(
|
|
730
719
|
s.Fragment,
|
|
731
720
|
null,
|
|
732
|
-
|
|
733
|
-
u ? s.cloneElement(s.Children.only(i), T(T({}, y), { ref: O })) : s.createElement(
|
|
721
|
+
f && s.createElement(C, { sideCar: _t, removeScrollBar: c, shards: v, noRelative: g, noIsolation: b, inert: l, setCallbacks: n, allowPinchZoom: !!m, lockRef: r, gapMode: w }),
|
|
722
|
+
u ? s.cloneElement(s.Children.only(i), T(T({}, y), { ref: O })) : s.createElement(E, T({}, y, { className: d, ref: O }), i)
|
|
734
723
|
);
|
|
735
724
|
});
|
|
736
725
|
se.defaultProps = {
|
|
@@ -742,16 +731,16 @@ se.classNames = {
|
|
|
742
731
|
fullWidth: ae,
|
|
743
732
|
zeroRight: oe
|
|
744
733
|
};
|
|
745
|
-
var
|
|
734
|
+
var Gr = function() {
|
|
746
735
|
if (typeof __webpack_nonce__ < "u")
|
|
747
736
|
return __webpack_nonce__;
|
|
748
737
|
};
|
|
749
|
-
function
|
|
738
|
+
function zr() {
|
|
750
739
|
if (!document)
|
|
751
740
|
return null;
|
|
752
741
|
var e = document.createElement("style");
|
|
753
742
|
e.type = "text/css";
|
|
754
|
-
var t =
|
|
743
|
+
var t = Gr();
|
|
755
744
|
return t && e.setAttribute("nonce", t), e;
|
|
756
745
|
}
|
|
757
746
|
function qr(e, t) {
|
|
@@ -765,7 +754,7 @@ var Xr = function() {
|
|
|
765
754
|
var e = 0, t = null;
|
|
766
755
|
return {
|
|
767
756
|
add: function(r) {
|
|
768
|
-
e == 0 && (t =
|
|
757
|
+
e == 0 && (t = zr()) && (qr(t, r), Yr(t)), e++;
|
|
769
758
|
},
|
|
770
759
|
remove: function() {
|
|
771
760
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
@@ -806,14 +795,14 @@ var Xr = function() {
|
|
|
806
795
|
right: t[2],
|
|
807
796
|
gap: Math.max(0, o - r + t[2] - t[0])
|
|
808
797
|
};
|
|
809
|
-
}, tn = yt(),
|
|
798
|
+
}, tn = yt(), V = "data-scroll-locked", rn = function(e, t, r, o) {
|
|
810
799
|
var a = e.left, n = e.top, u = e.right, i = e.gap;
|
|
811
800
|
return r === void 0 && (r = "margin"), `
|
|
812
801
|
.`.concat(Fr, ` {
|
|
813
802
|
overflow: hidden `).concat(o, `;
|
|
814
803
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
815
804
|
}
|
|
816
|
-
body[`).concat(
|
|
805
|
+
body[`).concat(V, `] {
|
|
817
806
|
overflow: hidden `).concat(o, `;
|
|
818
807
|
overscroll-behavior: contain;
|
|
819
808
|
`).concat([
|
|
@@ -846,18 +835,18 @@ var Xr = function() {
|
|
|
846
835
|
margin-right: 0 `).concat(o, `;
|
|
847
836
|
}
|
|
848
837
|
|
|
849
|
-
body[`).concat(
|
|
850
|
-
`).concat(
|
|
838
|
+
body[`).concat(V, `] {
|
|
839
|
+
`).concat(kr, ": ").concat(i, `px;
|
|
851
840
|
}
|
|
852
841
|
`);
|
|
853
|
-
},
|
|
854
|
-
var e = parseInt(document.body.getAttribute(
|
|
842
|
+
}, je = function() {
|
|
843
|
+
var e = parseInt(document.body.getAttribute(V) || "0", 10);
|
|
855
844
|
return isFinite(e) ? e : 0;
|
|
856
845
|
}, nn = function() {
|
|
857
846
|
s.useEffect(function() {
|
|
858
|
-
return document.body.setAttribute(
|
|
859
|
-
var e =
|
|
860
|
-
e <= 0 ? document.body.removeAttribute(
|
|
847
|
+
return document.body.setAttribute(V, (je() + 1).toString()), function() {
|
|
848
|
+
var e = je() - 1;
|
|
849
|
+
e <= 0 ? document.body.removeAttribute(V) : document.body.setAttribute(V, e.toString());
|
|
861
850
|
};
|
|
862
851
|
}, []);
|
|
863
852
|
}, on = function(e) {
|
|
@@ -898,9 +887,9 @@ var B = Se ? { passive: !1 } : !1, an = function(e) {
|
|
|
898
887
|
var r = t.ownerDocument, o = t;
|
|
899
888
|
do {
|
|
900
889
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
901
|
-
var a =
|
|
890
|
+
var a = Et(e, o);
|
|
902
891
|
if (a) {
|
|
903
|
-
var n =
|
|
892
|
+
var n = wt(e, o), u = n[1], i = n[2];
|
|
904
893
|
if (u > i)
|
|
905
894
|
return !0;
|
|
906
895
|
}
|
|
@@ -921,27 +910,27 @@ var B = Se ? { passive: !1 } : !1, an = function(e) {
|
|
|
921
910
|
r,
|
|
922
911
|
o
|
|
923
912
|
];
|
|
924
|
-
}, wt = function(e, t) {
|
|
925
|
-
return e === "v" ? un(t) : sn(t);
|
|
926
913
|
}, Et = function(e, t) {
|
|
914
|
+
return e === "v" ? un(t) : sn(t);
|
|
915
|
+
}, wt = function(e, t) {
|
|
927
916
|
return e === "v" ? cn(t) : ln(t);
|
|
928
917
|
}, dn = function(e, t) {
|
|
929
918
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
930
919
|
}, pn = function(e, t, r, o, a) {
|
|
931
|
-
var n = dn(e, window.getComputedStyle(t).direction), u = n * o, i = r.target, d = t.contains(i), c = !1,
|
|
920
|
+
var n = dn(e, window.getComputedStyle(t).direction), u = n * o, i = r.target, d = t.contains(i), c = !1, f = u > 0, v = 0, h = 0;
|
|
932
921
|
do {
|
|
933
922
|
if (!i)
|
|
934
923
|
break;
|
|
935
|
-
var g =
|
|
936
|
-
(b || _) &&
|
|
937
|
-
var
|
|
938
|
-
i =
|
|
924
|
+
var g = wt(e, i), b = g[0], l = g[1], m = g[2], _ = l - m - n * b;
|
|
925
|
+
(b || _) && Et(e, i) && (v += _, h += b);
|
|
926
|
+
var E = i.parentNode;
|
|
927
|
+
i = E && E.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? E.host : E;
|
|
939
928
|
} while (
|
|
940
929
|
// portaled content
|
|
941
930
|
!d && i !== document.body || // self content
|
|
942
931
|
d && (t.contains(i) || t === i)
|
|
943
932
|
);
|
|
944
|
-
return (
|
|
933
|
+
return (f && Math.abs(v) < 1 || !f && Math.abs(h) < 1) && (c = !0), c;
|
|
945
934
|
}, J = function(e) {
|
|
946
935
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
947
936
|
}, Be = function(e) {
|
|
@@ -976,7 +965,7 @@ function mn(e) {
|
|
|
976
965
|
var i = s.useCallback(function(l, m) {
|
|
977
966
|
if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
|
|
978
967
|
return !u.current.allowPinchZoom;
|
|
979
|
-
var _ = J(l),
|
|
968
|
+
var _ = J(l), E = r.current, w = "deltaX" in l ? l.deltaX : E[0] - _[0], S = "deltaY" in l ? l.deltaY : E[1] - _[1], C, O = l.target, y = Math.abs(w) > Math.abs(S) ? "h" : "v";
|
|
980
969
|
if ("touches" in l && y === "h" && O.type === "range")
|
|
981
970
|
return !1;
|
|
982
971
|
var x = We(y, O);
|
|
@@ -984,35 +973,35 @@ function mn(e) {
|
|
|
984
973
|
return !0;
|
|
985
974
|
if (x ? C = y : (C = y === "v" ? "h" : "v", x = We(y, O)), !x)
|
|
986
975
|
return !1;
|
|
987
|
-
if (!o.current && "changedTouches" in l && (
|
|
976
|
+
if (!o.current && "changedTouches" in l && (w || S) && (o.current = C), !C)
|
|
988
977
|
return !0;
|
|
989
|
-
var
|
|
990
|
-
return pn(
|
|
978
|
+
var P = o.current || C;
|
|
979
|
+
return pn(P, m, l, P === "h" ? w : S);
|
|
991
980
|
}, []), d = s.useCallback(function(l) {
|
|
992
981
|
var m = l;
|
|
993
982
|
if (!(!U.length || U[U.length - 1] !== n)) {
|
|
994
|
-
var _ = "deltaY" in m ? Be(m) : J(m),
|
|
983
|
+
var _ = "deltaY" in m ? Be(m) : J(m), E = t.current.filter(function(C) {
|
|
995
984
|
return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) && fn(C.delta, _);
|
|
996
985
|
})[0];
|
|
997
|
-
if (
|
|
986
|
+
if (E && E.should) {
|
|
998
987
|
m.cancelable && m.preventDefault();
|
|
999
988
|
return;
|
|
1000
989
|
}
|
|
1001
|
-
if (!
|
|
1002
|
-
var
|
|
990
|
+
if (!E) {
|
|
991
|
+
var w = (u.current.shards || []).map(Ue).filter(Boolean).filter(function(C) {
|
|
1003
992
|
return C.contains(m.target);
|
|
1004
|
-
}), S =
|
|
993
|
+
}), S = w.length > 0 ? i(m, w[0]) : !u.current.noIsolation;
|
|
1005
994
|
S && m.cancelable && m.preventDefault();
|
|
1006
995
|
}
|
|
1007
996
|
}
|
|
1008
|
-
}, []), c = s.useCallback(function(l, m, _,
|
|
1009
|
-
var
|
|
1010
|
-
t.current.push(
|
|
997
|
+
}, []), c = s.useCallback(function(l, m, _, E) {
|
|
998
|
+
var w = { name: l, delta: m, target: _, should: E, shadowParent: gn(_) };
|
|
999
|
+
t.current.push(w), setTimeout(function() {
|
|
1011
1000
|
t.current = t.current.filter(function(S) {
|
|
1012
|
-
return S !==
|
|
1001
|
+
return S !== w;
|
|
1013
1002
|
});
|
|
1014
1003
|
}, 1);
|
|
1015
|
-
}, []),
|
|
1004
|
+
}, []), f = s.useCallback(function(l) {
|
|
1016
1005
|
r.current = J(l), o.current = void 0;
|
|
1017
1006
|
}, []), v = s.useCallback(function(l) {
|
|
1018
1007
|
c(l.type, Be(l), l.target, i(l, e.lockRef.current));
|
|
@@ -1024,10 +1013,10 @@ function mn(e) {
|
|
|
1024
1013
|
onScrollCapture: v,
|
|
1025
1014
|
onWheelCapture: v,
|
|
1026
1015
|
onTouchMoveCapture: h
|
|
1027
|
-
}), document.addEventListener("wheel", d, B), document.addEventListener("touchmove", d, B), document.addEventListener("touchstart",
|
|
1016
|
+
}), document.addEventListener("wheel", d, B), document.addEventListener("touchmove", d, B), document.addEventListener("touchstart", f, B), function() {
|
|
1028
1017
|
U = U.filter(function(l) {
|
|
1029
1018
|
return l !== n;
|
|
1030
|
-
}), document.removeEventListener("wheel", d, B), document.removeEventListener("touchmove", d, B), document.removeEventListener("touchstart",
|
|
1019
|
+
}), document.removeEventListener("wheel", d, B), document.removeEventListener("touchmove", d, B), document.removeEventListener("touchstart", f, B);
|
|
1031
1020
|
};
|
|
1032
1021
|
}, []);
|
|
1033
1022
|
var g = e.removeScrollBar, b = e.inert;
|
|
@@ -1043,7 +1032,7 @@ function gn(e) {
|
|
|
1043
1032
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1044
1033
|
return t;
|
|
1045
1034
|
}
|
|
1046
|
-
const _n =
|
|
1035
|
+
const _n = Kr(_t, mn);
|
|
1047
1036
|
var St = s.forwardRef(function(e, t) {
|
|
1048
1037
|
return s.createElement(se, T({}, e, { ref: t, sideCar: _n }));
|
|
1049
1038
|
});
|
|
@@ -1053,7 +1042,7 @@ var yn = function(e) {
|
|
|
1053
1042
|
return null;
|
|
1054
1043
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1055
1044
|
return t.ownerDocument.body;
|
|
1056
|
-
},
|
|
1045
|
+
}, H = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, ge = 0, Ct = function(e) {
|
|
1057
1046
|
return e && (e.host || Ct(e.parentNode));
|
|
1058
1047
|
}, bn = function(e, t) {
|
|
1059
1048
|
return t.map(function(r) {
|
|
@@ -1064,39 +1053,39 @@ var yn = function(e) {
|
|
|
1064
1053
|
}).filter(function(r) {
|
|
1065
1054
|
return !!r;
|
|
1066
1055
|
});
|
|
1067
|
-
},
|
|
1056
|
+
}, En = function(e, t, r, o) {
|
|
1068
1057
|
var a = bn(t, Array.isArray(e) ? e : [e]);
|
|
1069
1058
|
te[r] || (te[r] = /* @__PURE__ */ new WeakMap());
|
|
1070
1059
|
var n = te[r], u = [], i = /* @__PURE__ */ new Set(), d = new Set(a), c = function(v) {
|
|
1071
1060
|
!v || i.has(v) || (i.add(v), c(v.parentNode));
|
|
1072
1061
|
};
|
|
1073
1062
|
a.forEach(c);
|
|
1074
|
-
var
|
|
1063
|
+
var f = function(v) {
|
|
1075
1064
|
!v || d.has(v) || Array.prototype.forEach.call(v.children, function(h) {
|
|
1076
1065
|
if (i.has(h))
|
|
1077
|
-
|
|
1066
|
+
f(h);
|
|
1078
1067
|
else
|
|
1079
1068
|
try {
|
|
1080
|
-
var g = h.getAttribute(o), b = g !== null && g !== "false", l = (
|
|
1081
|
-
|
|
1069
|
+
var g = h.getAttribute(o), b = g !== null && g !== "false", l = (H.get(h) || 0) + 1, m = (n.get(h) || 0) + 1;
|
|
1070
|
+
H.set(h, l), n.set(h, m), u.push(h), l === 1 && b && ee.set(h, !0), m === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
|
|
1082
1071
|
} catch (_) {
|
|
1083
1072
|
console.error("aria-hidden: cannot operate on ", h, _);
|
|
1084
1073
|
}
|
|
1085
1074
|
});
|
|
1086
1075
|
};
|
|
1087
|
-
return
|
|
1076
|
+
return f(t), i.clear(), ge++, function() {
|
|
1088
1077
|
u.forEach(function(v) {
|
|
1089
|
-
var h =
|
|
1090
|
-
|
|
1091
|
-
}), ge--, ge || (
|
|
1078
|
+
var h = H.get(v) - 1, g = n.get(v) - 1;
|
|
1079
|
+
H.set(v, h), n.set(v, g), h || (ee.has(v) || v.removeAttribute(o), ee.delete(v)), g || v.removeAttribute(r);
|
|
1080
|
+
}), ge--, ge || (H = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {});
|
|
1092
1081
|
};
|
|
1093
|
-
},
|
|
1082
|
+
}, wn = function(e, t, r) {
|
|
1094
1083
|
r === void 0 && (r = "data-aria-hidden");
|
|
1095
1084
|
var o = Array.from(Array.isArray(e) ? e : [e]), a = yn(e);
|
|
1096
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))),
|
|
1085
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))), En(o, a, r, "aria-hidden")) : function() {
|
|
1097
1086
|
return null;
|
|
1098
1087
|
};
|
|
1099
|
-
}, ce = "Dialog", [Nt] = tr(ce), [Sn,
|
|
1088
|
+
}, ce = "Dialog", [Nt] = tr(ce), [Sn, D] = Nt(ce), Ot = (e) => {
|
|
1100
1089
|
const {
|
|
1101
1090
|
__scopeDialog: t,
|
|
1102
1091
|
children: r,
|
|
@@ -1104,13 +1093,13 @@ var yn = function(e) {
|
|
|
1104
1093
|
defaultOpen: a,
|
|
1105
1094
|
onOpenChange: n,
|
|
1106
1095
|
modal: u = !0
|
|
1107
|
-
} = e, i = s.useRef(null), d = s.useRef(null), [c,
|
|
1096
|
+
} = e, i = s.useRef(null), d = s.useRef(null), [c, f] = ir({
|
|
1108
1097
|
prop: o,
|
|
1109
1098
|
defaultProp: a ?? !1,
|
|
1110
1099
|
onChange: n,
|
|
1111
1100
|
caller: ce
|
|
1112
1101
|
});
|
|
1113
|
-
return /* @__PURE__ */
|
|
1102
|
+
return /* @__PURE__ */ p(
|
|
1114
1103
|
Sn,
|
|
1115
1104
|
{
|
|
1116
1105
|
scope: t,
|
|
@@ -1120,25 +1109,25 @@ var yn = function(e) {
|
|
|
1120
1109
|
titleId: le(),
|
|
1121
1110
|
descriptionId: le(),
|
|
1122
1111
|
open: c,
|
|
1123
|
-
onOpenChange:
|
|
1124
|
-
onOpenToggle: s.useCallback(() =>
|
|
1112
|
+
onOpenChange: f,
|
|
1113
|
+
onOpenToggle: s.useCallback(() => f((v) => !v), [f]),
|
|
1125
1114
|
modal: u,
|
|
1126
1115
|
children: r
|
|
1127
1116
|
}
|
|
1128
1117
|
);
|
|
1129
1118
|
};
|
|
1130
1119
|
Ot.displayName = ce;
|
|
1131
|
-
var
|
|
1120
|
+
var Rt = "DialogTrigger", Pt = s.forwardRef(
|
|
1132
1121
|
(e, t) => {
|
|
1133
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1134
|
-
return /* @__PURE__ */
|
|
1122
|
+
const { __scopeDialog: r, ...o } = e, a = D(Rt, r), n = j(t, a.triggerRef);
|
|
1123
|
+
return /* @__PURE__ */ p(
|
|
1135
1124
|
M.button,
|
|
1136
1125
|
{
|
|
1137
1126
|
type: "button",
|
|
1138
1127
|
"aria-haspopup": "dialog",
|
|
1139
1128
|
"aria-expanded": a.open,
|
|
1140
1129
|
"aria-controls": a.contentId,
|
|
1141
|
-
"data-state":
|
|
1130
|
+
"data-state": Re(a.open),
|
|
1142
1131
|
...o,
|
|
1143
1132
|
ref: n,
|
|
1144
1133
|
onClick: F(e.onClick, a.onOpenToggle)
|
|
@@ -1146,31 +1135,31 @@ var Pt = "DialogTrigger", Rt = s.forwardRef(
|
|
|
1146
1135
|
);
|
|
1147
1136
|
}
|
|
1148
1137
|
);
|
|
1149
|
-
|
|
1138
|
+
Pt.displayName = Rt;
|
|
1150
1139
|
var Ne = "DialogPortal", [Cn, xt] = Nt(Ne, {
|
|
1151
1140
|
forceMount: void 0
|
|
1152
|
-
}),
|
|
1153
|
-
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n =
|
|
1154
|
-
return /* @__PURE__ */
|
|
1141
|
+
}), Dt = (e) => {
|
|
1142
|
+
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = D(Ne, t);
|
|
1143
|
+
return /* @__PURE__ */ p(Cn, { scope: t, forceMount: r, children: s.Children.map(o, (u) => /* @__PURE__ */ p(ue, { present: r || n.open, children: /* @__PURE__ */ p(ht, { asChild: !0, container: a, children: u }) })) });
|
|
1155
1144
|
};
|
|
1156
|
-
|
|
1157
|
-
var ie = "DialogOverlay",
|
|
1145
|
+
Dt.displayName = Ne;
|
|
1146
|
+
var ie = "DialogOverlay", At = s.forwardRef(
|
|
1158
1147
|
(e, t) => {
|
|
1159
|
-
const r = xt(ie, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n =
|
|
1160
|
-
return n.modal ? /* @__PURE__ */
|
|
1148
|
+
const r = xt(ie, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = D(ie, e.__scopeDialog);
|
|
1149
|
+
return n.modal ? /* @__PURE__ */ p(ue, { present: o || n.open, children: /* @__PURE__ */ p(On, { ...a, ref: t }) }) : null;
|
|
1161
1150
|
}
|
|
1162
1151
|
);
|
|
1163
|
-
|
|
1152
|
+
At.displayName = ie;
|
|
1164
1153
|
var Nn = /* @__PURE__ */ ct("DialogOverlay.RemoveScroll"), On = s.forwardRef(
|
|
1165
1154
|
(e, t) => {
|
|
1166
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1155
|
+
const { __scopeDialog: r, ...o } = e, a = D(ie, r);
|
|
1167
1156
|
return (
|
|
1168
1157
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1169
1158
|
// ie. when `Overlay` and `Content` are siblings
|
|
1170
|
-
/* @__PURE__ */
|
|
1159
|
+
/* @__PURE__ */ p(St, { as: Nn, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ p(
|
|
1171
1160
|
M.div,
|
|
1172
1161
|
{
|
|
1173
|
-
"data-state":
|
|
1162
|
+
"data-state": Re(a.open),
|
|
1174
1163
|
...o,
|
|
1175
1164
|
ref: t,
|
|
1176
1165
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -1178,20 +1167,20 @@ var Nn = /* @__PURE__ */ ct("DialogOverlay.RemoveScroll"), On = s.forwardRef(
|
|
|
1178
1167
|
) })
|
|
1179
1168
|
);
|
|
1180
1169
|
}
|
|
1181
|
-
),
|
|
1170
|
+
), k = "DialogContent", $t = s.forwardRef(
|
|
1182
1171
|
(e, t) => {
|
|
1183
|
-
const r = xt(
|
|
1184
|
-
return /* @__PURE__ */
|
|
1172
|
+
const r = xt(k, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = D(k, e.__scopeDialog);
|
|
1173
|
+
return /* @__PURE__ */ p(ue, { present: o || n.open, children: n.modal ? /* @__PURE__ */ p(Rn, { ...a, ref: t }) : /* @__PURE__ */ p(Pn, { ...a, ref: t }) });
|
|
1185
1174
|
}
|
|
1186
1175
|
);
|
|
1187
|
-
$t.displayName =
|
|
1188
|
-
var
|
|
1176
|
+
$t.displayName = k;
|
|
1177
|
+
var Rn = s.forwardRef(
|
|
1189
1178
|
(e, t) => {
|
|
1190
|
-
const r =
|
|
1179
|
+
const r = D(k, e.__scopeDialog), o = s.useRef(null), a = j(t, r.contentRef, o);
|
|
1191
1180
|
return s.useEffect(() => {
|
|
1192
1181
|
const n = o.current;
|
|
1193
|
-
if (n) return
|
|
1194
|
-
}, []), /* @__PURE__ */
|
|
1182
|
+
if (n) return wn(n);
|
|
1183
|
+
}, []), /* @__PURE__ */ p(
|
|
1195
1184
|
Tt,
|
|
1196
1185
|
{
|
|
1197
1186
|
...e,
|
|
@@ -1199,8 +1188,7 @@ var Pn = s.forwardRef(
|
|
|
1199
1188
|
trapFocus: r.open,
|
|
1200
1189
|
disableOutsidePointerEvents: !0,
|
|
1201
1190
|
onCloseAutoFocus: F(e.onCloseAutoFocus, (n) => {
|
|
1202
|
-
|
|
1203
|
-
n.preventDefault(), (u = r.triggerRef.current) == null || u.focus();
|
|
1191
|
+
n.preventDefault(), r.triggerRef.current?.focus();
|
|
1204
1192
|
}),
|
|
1205
1193
|
onPointerDownOutside: F(e.onPointerDownOutside, (n) => {
|
|
1206
1194
|
const u = n.detail.originalEvent, i = u.button === 0 && u.ctrlKey === !0;
|
|
@@ -1213,10 +1201,10 @@ var Pn = s.forwardRef(
|
|
|
1213
1201
|
}
|
|
1214
1202
|
);
|
|
1215
1203
|
}
|
|
1216
|
-
),
|
|
1204
|
+
), Pn = s.forwardRef(
|
|
1217
1205
|
(e, t) => {
|
|
1218
|
-
const r =
|
|
1219
|
-
return /* @__PURE__ */
|
|
1206
|
+
const r = D(k, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
|
|
1207
|
+
return /* @__PURE__ */ p(
|
|
1220
1208
|
Tt,
|
|
1221
1209
|
{
|
|
1222
1210
|
...e,
|
|
@@ -1224,23 +1212,21 @@ var Pn = s.forwardRef(
|
|
|
1224
1212
|
trapFocus: !1,
|
|
1225
1213
|
disableOutsidePointerEvents: !1,
|
|
1226
1214
|
onCloseAutoFocus: (n) => {
|
|
1227
|
-
|
|
1228
|
-
(u = e.onCloseAutoFocus) == null || u.call(e, n), n.defaultPrevented || (o.current || (i = r.triggerRef.current) == null || i.focus(), n.preventDefault()), o.current = !1, a.current = !1;
|
|
1215
|
+
e.onCloseAutoFocus?.(n), n.defaultPrevented || (o.current || r.triggerRef.current?.focus(), n.preventDefault()), o.current = !1, a.current = !1;
|
|
1229
1216
|
},
|
|
1230
1217
|
onInteractOutside: (n) => {
|
|
1231
|
-
|
|
1232
|
-
(d = e.onInteractOutside) == null || d.call(e, n), n.defaultPrevented || (o.current = !0, n.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
1218
|
+
e.onInteractOutside?.(n), n.defaultPrevented || (o.current = !0, n.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
1233
1219
|
const u = n.target;
|
|
1234
|
-
|
|
1220
|
+
r.triggerRef.current?.contains(u) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
|
|
1235
1221
|
}
|
|
1236
1222
|
}
|
|
1237
1223
|
);
|
|
1238
1224
|
}
|
|
1239
1225
|
), Tt = s.forwardRef(
|
|
1240
1226
|
(e, t) => {
|
|
1241
|
-
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...u } = e, i =
|
|
1227
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...u } = e, i = D(k, r), d = s.useRef(null), c = j(t, d);
|
|
1242
1228
|
return Ir(), /* @__PURE__ */ $(xe, { children: [
|
|
1243
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ p(
|
|
1244
1230
|
ft,
|
|
1245
1231
|
{
|
|
1246
1232
|
asChild: !0,
|
|
@@ -1248,14 +1234,14 @@ var Pn = s.forwardRef(
|
|
|
1248
1234
|
trapped: o,
|
|
1249
1235
|
onMountAutoFocus: a,
|
|
1250
1236
|
onUnmountAutoFocus: n,
|
|
1251
|
-
children: /* @__PURE__ */
|
|
1237
|
+
children: /* @__PURE__ */ p(
|
|
1252
1238
|
dt,
|
|
1253
1239
|
{
|
|
1254
1240
|
role: "dialog",
|
|
1255
1241
|
id: i.contentId,
|
|
1256
1242
|
"aria-describedby": i.descriptionId,
|
|
1257
1243
|
"aria-labelledby": i.titleId,
|
|
1258
|
-
"data-state":
|
|
1244
|
+
"data-state": Re(i.open),
|
|
1259
1245
|
...u,
|
|
1260
1246
|
ref: c,
|
|
1261
1247
|
onDismiss: () => i.onOpenChange(!1)
|
|
@@ -1264,29 +1250,29 @@ var Pn = s.forwardRef(
|
|
|
1264
1250
|
}
|
|
1265
1251
|
),
|
|
1266
1252
|
/* @__PURE__ */ $(xe, { children: [
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ p(xn, { titleId: i.titleId }),
|
|
1254
|
+
/* @__PURE__ */ p(An, { contentRef: d, descriptionId: i.descriptionId })
|
|
1269
1255
|
] })
|
|
1270
1256
|
] });
|
|
1271
1257
|
}
|
|
1272
1258
|
), Oe = "DialogTitle", Mt = s.forwardRef(
|
|
1273
1259
|
(e, t) => {
|
|
1274
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1275
|
-
return /* @__PURE__ */
|
|
1260
|
+
const { __scopeDialog: r, ...o } = e, a = D(Oe, r);
|
|
1261
|
+
return /* @__PURE__ */ p(M.h2, { id: a.titleId, ...o, ref: t });
|
|
1276
1262
|
}
|
|
1277
1263
|
);
|
|
1278
1264
|
Mt.displayName = Oe;
|
|
1279
1265
|
var It = "DialogDescription", Lt = s.forwardRef(
|
|
1280
1266
|
(e, t) => {
|
|
1281
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1282
|
-
return /* @__PURE__ */
|
|
1267
|
+
const { __scopeDialog: r, ...o } = e, a = D(It, r);
|
|
1268
|
+
return /* @__PURE__ */ p(M.p, { id: a.descriptionId, ...o, ref: t });
|
|
1283
1269
|
}
|
|
1284
1270
|
);
|
|
1285
1271
|
Lt.displayName = It;
|
|
1286
|
-
var Ft = "DialogClose",
|
|
1272
|
+
var Ft = "DialogClose", kt = s.forwardRef(
|
|
1287
1273
|
(e, t) => {
|
|
1288
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1289
|
-
return /* @__PURE__ */
|
|
1274
|
+
const { __scopeDialog: r, ...o } = e, a = D(Ft, r);
|
|
1275
|
+
return /* @__PURE__ */ p(
|
|
1290
1276
|
M.button,
|
|
1291
1277
|
{
|
|
1292
1278
|
type: "button",
|
|
@@ -1297,16 +1283,16 @@ var Ft = "DialogClose", jt = s.forwardRef(
|
|
|
1297
1283
|
);
|
|
1298
1284
|
}
|
|
1299
1285
|
);
|
|
1300
|
-
|
|
1301
|
-
function
|
|
1286
|
+
kt.displayName = Ft;
|
|
1287
|
+
function Re(e) {
|
|
1302
1288
|
return e ? "open" : "closed";
|
|
1303
1289
|
}
|
|
1304
|
-
var
|
|
1305
|
-
contentName:
|
|
1290
|
+
var jt = "DialogTitleWarning", [Yo, Wt] = er(jt, {
|
|
1291
|
+
contentName: k,
|
|
1306
1292
|
titleName: Oe,
|
|
1307
1293
|
docsSlug: "dialog"
|
|
1308
1294
|
}), xn = ({ titleId: e }) => {
|
|
1309
|
-
const t = Wt(
|
|
1295
|
+
const t = Wt(jt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1310
1296
|
|
|
1311
1297
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1312
1298
|
|
|
@@ -1314,29 +1300,22 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1314
1300
|
return s.useEffect(() => {
|
|
1315
1301
|
e && (document.getElementById(e) || console.error(r));
|
|
1316
1302
|
}, [r, e]), null;
|
|
1317
|
-
},
|
|
1318
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wt(
|
|
1303
|
+
}, Dn = "DialogDescriptionWarning", An = ({ contentRef: e, descriptionId: t }) => {
|
|
1304
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wt(Dn).contentName}}.`;
|
|
1319
1305
|
return s.useEffect(() => {
|
|
1320
|
-
|
|
1321
|
-
const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
|
|
1306
|
+
const a = e.current?.getAttribute("aria-describedby");
|
|
1322
1307
|
t && a && (document.getElementById(t) || console.warn(o));
|
|
1323
1308
|
}, [o, e, t]), null;
|
|
1324
|
-
}, $n = Ot, Tn =
|
|
1325
|
-
const
|
|
1309
|
+
}, $n = Ot, Tn = Pt, Mn = Dt, In = At, Ln = $t, Fn = Mt, He = Lt, kn = kt;
|
|
1310
|
+
const jn = {
|
|
1326
1311
|
LG: "lg"
|
|
1327
1312
|
};
|
|
1328
1313
|
function Wn(e) {
|
|
1329
1314
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1330
1315
|
}
|
|
1331
|
-
var
|
|
1332
|
-
/*!
|
|
1333
|
-
Copyright (c) 2018 Jed Watson.
|
|
1334
|
-
Licensed under the MIT License (MIT), see
|
|
1335
|
-
http://jedwatson.github.io/classnames
|
|
1336
|
-
*/
|
|
1337
|
-
var Ge;
|
|
1316
|
+
var Ve = { exports: {} }, Ke;
|
|
1338
1317
|
function Bn() {
|
|
1339
|
-
return
|
|
1318
|
+
return Ke || (Ke = 1, (function(e) {
|
|
1340
1319
|
(function() {
|
|
1341
1320
|
var t = {}.hasOwnProperty;
|
|
1342
1321
|
function r() {
|
|
@@ -1365,35 +1344,35 @@ function Bn() {
|
|
|
1365
1344
|
}
|
|
1366
1345
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1367
1346
|
})();
|
|
1368
|
-
})(
|
|
1347
|
+
})(Ve)), Ve.exports;
|
|
1369
1348
|
}
|
|
1370
1349
|
var Un = Bn();
|
|
1371
|
-
const
|
|
1350
|
+
const Hn = /* @__PURE__ */ Wn(Un), Vn = "_rotate_12t9p_1", Kn = "_dash_12t9p_1", Gn = {
|
|
1372
1351
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1373
|
-
rotate:
|
|
1352
|
+
rotate: Vn,
|
|
1374
1353
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1375
1354
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1376
1355
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1377
1356
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1378
1357
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1379
1358
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1380
|
-
dash:
|
|
1359
|
+
dash: Kn,
|
|
1381
1360
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1382
1361
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1383
|
-
},
|
|
1362
|
+
}, Ge = Hn.bind(Gn), G = "purpur-spinner", zn = {
|
|
1384
1363
|
SM: "sm"
|
|
1385
1364
|
}, Bt = ({
|
|
1386
1365
|
disabled: e = !1,
|
|
1387
1366
|
negative: t = !1,
|
|
1388
|
-
size: r =
|
|
1367
|
+
size: r = zn.SM,
|
|
1389
1368
|
className: o,
|
|
1390
1369
|
...a
|
|
1391
|
-
}) => /* @__PURE__ */
|
|
1370
|
+
}) => /* @__PURE__ */ p("div", { className: Ge(G, `${G}--${r}`, o), ...a, children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
|
|
1392
1371
|
"circle",
|
|
1393
1372
|
{
|
|
1394
|
-
className:
|
|
1395
|
-
[`${
|
|
1396
|
-
[`${
|
|
1373
|
+
className: Ge(`${G}__circle`, {
|
|
1374
|
+
[`${G}__circle--disabled`]: e,
|
|
1375
|
+
[`${G}__circle--negative`]: t
|
|
1397
1376
|
}),
|
|
1398
1377
|
cx: "25",
|
|
1399
1378
|
cy: "25",
|
|
@@ -1404,13 +1383,7 @@ Bt.displayName = "Spinner";
|
|
|
1404
1383
|
function qn(e) {
|
|
1405
1384
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1406
1385
|
}
|
|
1407
|
-
var
|
|
1408
|
-
/*!
|
|
1409
|
-
Copyright (c) 2018 Jed Watson.
|
|
1410
|
-
Licensed under the MIT License (MIT), see
|
|
1411
|
-
http://jedwatson.github.io/classnames
|
|
1412
|
-
*/
|
|
1413
|
-
var qe;
|
|
1386
|
+
var ze = { exports: {} }, qe;
|
|
1414
1387
|
function Yn() {
|
|
1415
1388
|
return qe || (qe = 1, (function(e) {
|
|
1416
1389
|
(function() {
|
|
@@ -1441,7 +1414,7 @@ function Yn() {
|
|
|
1441
1414
|
}
|
|
1442
1415
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1443
1416
|
})();
|
|
1444
|
-
})(
|
|
1417
|
+
})(ze)), ze.exports;
|
|
1445
1418
|
}
|
|
1446
1419
|
var Xn = Yn();
|
|
1447
1420
|
const Zn = /* @__PURE__ */ qn(Xn), Qn = {
|
|
@@ -1479,7 +1452,7 @@ const Zn = /* @__PURE__ */ qn(Xn), Qn = {
|
|
|
1479
1452
|
onClick: i,
|
|
1480
1453
|
size: d = "md",
|
|
1481
1454
|
variant: c,
|
|
1482
|
-
type:
|
|
1455
|
+
type: f = "button",
|
|
1483
1456
|
...v
|
|
1484
1457
|
}, h) => {
|
|
1485
1458
|
if (a && c === "destructive")
|
|
@@ -1504,16 +1477,16 @@ const Zn = /* @__PURE__ */ qn(Xn), Qn = {
|
|
|
1504
1477
|
"button",
|
|
1505
1478
|
{
|
|
1506
1479
|
className: g,
|
|
1507
|
-
type:
|
|
1480
|
+
type: f,
|
|
1508
1481
|
ref: h,
|
|
1509
1482
|
"aria-disabled": l,
|
|
1510
1483
|
onClick: b,
|
|
1511
1484
|
...v,
|
|
1512
1485
|
children: [
|
|
1513
|
-
n && /* @__PURE__ */
|
|
1486
|
+
n && /* @__PURE__ */ p(
|
|
1514
1487
|
Bt,
|
|
1515
1488
|
{
|
|
1516
|
-
size: d ===
|
|
1489
|
+
size: d === jn.LG ? "xs" : "xxs",
|
|
1517
1490
|
negative: u,
|
|
1518
1491
|
disabled: l,
|
|
1519
1492
|
className: Ye(`${I}__spinner`)
|
|
@@ -1530,13 +1503,7 @@ Ut.displayName = "Button";
|
|
|
1530
1503
|
function Jn(e) {
|
|
1531
1504
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1532
1505
|
}
|
|
1533
|
-
var Xe = { exports: {} };
|
|
1534
|
-
/*!
|
|
1535
|
-
Copyright (c) 2018 Jed Watson.
|
|
1536
|
-
Licensed under the MIT License (MIT), see
|
|
1537
|
-
http://jedwatson.github.io/classnames
|
|
1538
|
-
*/
|
|
1539
|
-
var Ze;
|
|
1506
|
+
var Xe = { exports: {} }, Ze;
|
|
1540
1507
|
function eo() {
|
|
1541
1508
|
return Ze || (Ze = 1, (function(e) {
|
|
1542
1509
|
(function() {
|
|
@@ -1592,7 +1559,7 @@ const ro = /* @__PURE__ */ Jn(to), re = {
|
|
|
1592
1559
|
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
1593
1560
|
}, no = {
|
|
1594
1561
|
TITLE100: "title-100"
|
|
1595
|
-
}, ne = "purpur-heading",
|
|
1562
|
+
}, ne = "purpur-heading", Ht = ({
|
|
1596
1563
|
children: e,
|
|
1597
1564
|
className: t = "",
|
|
1598
1565
|
enableHyphenation: r = !1,
|
|
@@ -1610,19 +1577,13 @@ const ro = /* @__PURE__ */ Jn(to), re = {
|
|
|
1610
1577
|
[re[`${ne}--negative`]]: o
|
|
1611
1578
|
}
|
|
1612
1579
|
]);
|
|
1613
|
-
return /* @__PURE__ */
|
|
1580
|
+
return /* @__PURE__ */ p(i, { className: d, ...u, children: e });
|
|
1614
1581
|
};
|
|
1615
|
-
|
|
1582
|
+
Ht.displayName = "Heading";
|
|
1616
1583
|
function oo(e) {
|
|
1617
1584
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1618
1585
|
}
|
|
1619
|
-
var Qe = { exports: {} };
|
|
1620
|
-
/*!
|
|
1621
|
-
Copyright (c) 2018 Jed Watson.
|
|
1622
|
-
Licensed under the MIT License (MIT), see
|
|
1623
|
-
http://jedwatson.github.io/classnames
|
|
1624
|
-
*/
|
|
1625
|
-
var Je;
|
|
1586
|
+
var Qe = { exports: {} }, Je;
|
|
1626
1587
|
function ao() {
|
|
1627
1588
|
return Je || (Je = 1, (function(e) {
|
|
1628
1589
|
(function() {
|
|
@@ -1672,31 +1633,25 @@ const uo = /* @__PURE__ */ oo(io), so = {
|
|
|
1672
1633
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1673
1634
|
], o = t ? `<title>${t}</title>` : "";
|
|
1674
1635
|
return `<svg ${po(r)}>${o}${e}</svg>`;
|
|
1675
|
-
}, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
1636
|
+
}, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Vt = ({ svg: e, allyTitle: t, className: r, size: o = lo, ...a }) => {
|
|
1676
1637
|
const n = fo({
|
|
1677
1638
|
content: vo(e.svg),
|
|
1678
1639
|
title: t
|
|
1679
1640
|
}), u = co(et, `${et}--${o}`, r);
|
|
1680
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ p("span", { className: u, dangerouslySetInnerHTML: { __html: n }, ...a });
|
|
1681
1642
|
};
|
|
1682
|
-
|
|
1643
|
+
Vt.displayName = "Icon";
|
|
1683
1644
|
const ho = {
|
|
1684
1645
|
name: "close",
|
|
1685
1646
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
1686
1647
|
keywords: ["close"],
|
|
1687
1648
|
category: "utility"
|
|
1688
|
-
},
|
|
1689
|
-
|
|
1649
|
+
}, Kt = (e) => /* @__PURE__ */ p(Vt, { ...e, svg: ho });
|
|
1650
|
+
Kt.displayName = "IconClose";
|
|
1690
1651
|
function mo(e) {
|
|
1691
1652
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1692
1653
|
}
|
|
1693
|
-
var tt = { exports: {} };
|
|
1694
|
-
/*!
|
|
1695
|
-
Copyright (c) 2018 Jed Watson.
|
|
1696
|
-
Licensed under the MIT License (MIT), see
|
|
1697
|
-
http://jedwatson.github.io/classnames
|
|
1698
|
-
*/
|
|
1699
|
-
var rt;
|
|
1654
|
+
var tt = { exports: {} }, rt;
|
|
1700
1655
|
function go() {
|
|
1701
1656
|
return rt || (rt = 1, (function(e) {
|
|
1702
1657
|
(function() {
|
|
@@ -1745,25 +1700,25 @@ const yo = /* @__PURE__ */ mo(_o), bo = {
|
|
|
1745
1700
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
1746
1701
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
1747
1702
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
1748
|
-
},
|
|
1703
|
+
}, Eo = yo.bind(bo), wo = {
|
|
1749
1704
|
PARAGRAPH100: "paragraph-100"
|
|
1750
|
-
},
|
|
1705
|
+
}, z = "purpur-paragraph", Gt = ({
|
|
1751
1706
|
children: e,
|
|
1752
1707
|
className: t,
|
|
1753
1708
|
disabled: r,
|
|
1754
1709
|
enableHyphenation: o = !1,
|
|
1755
1710
|
negative: a = !1,
|
|
1756
|
-
variant: n =
|
|
1711
|
+
variant: n = wo.PARAGRAPH100,
|
|
1757
1712
|
...u
|
|
1758
1713
|
}) => {
|
|
1759
|
-
const i =
|
|
1760
|
-
[`${
|
|
1761
|
-
[`${
|
|
1762
|
-
[`${
|
|
1714
|
+
const i = Eo(t, z, `${z}--${n}`, {
|
|
1715
|
+
[`${z}--hyphens`]: o,
|
|
1716
|
+
[`${z}--disabled`]: r,
|
|
1717
|
+
[`${z}--negative`]: a
|
|
1763
1718
|
});
|
|
1764
|
-
return /* @__PURE__ */
|
|
1719
|
+
return /* @__PURE__ */ p("p", { ...u, className: i, children: e });
|
|
1765
1720
|
};
|
|
1766
|
-
|
|
1721
|
+
Gt.displayName = "Paragraph";
|
|
1767
1722
|
function nt(e, t) {
|
|
1768
1723
|
if (typeof e == "function")
|
|
1769
1724
|
return e(t);
|
|
@@ -1788,12 +1743,12 @@ function So(...e) {
|
|
|
1788
1743
|
// @__NO_SIDE_EFFECTS__
|
|
1789
1744
|
function Co(e) {
|
|
1790
1745
|
const t = /* @__PURE__ */ No(e), r = s.forwardRef((o, a) => {
|
|
1791
|
-
const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(
|
|
1746
|
+
const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(Ro);
|
|
1792
1747
|
if (d) {
|
|
1793
|
-
const c = d.props.children,
|
|
1794
|
-
return /* @__PURE__ */
|
|
1748
|
+
const c = d.props.children, f = i.map((v) => v === d ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : v);
|
|
1749
|
+
return /* @__PURE__ */ p(t, { ...u, ref: a, children: s.isValidElement(c) ? s.cloneElement(c, void 0, f) : null });
|
|
1795
1750
|
}
|
|
1796
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ p(t, { ...u, ref: a, children: n });
|
|
1797
1752
|
});
|
|
1798
1753
|
return r.displayName = `${e}.Slot`, r;
|
|
1799
1754
|
}
|
|
@@ -1802,7 +1757,7 @@ function No(e) {
|
|
|
1802
1757
|
const t = s.forwardRef((r, o) => {
|
|
1803
1758
|
const { children: a, ...n } = r;
|
|
1804
1759
|
if (s.isValidElement(a)) {
|
|
1805
|
-
const u = xo(a), i =
|
|
1760
|
+
const u = xo(a), i = Po(n, a.props);
|
|
1806
1761
|
return a.type !== s.Fragment && (i.ref = o ? So(o, u) : u), s.cloneElement(a, i);
|
|
1807
1762
|
}
|
|
1808
1763
|
return s.Children.count(a) > 1 ? s.Children.only(null) : null;
|
|
@@ -1810,10 +1765,10 @@ function No(e) {
|
|
|
1810
1765
|
return t.displayName = `${e}.SlotClone`, t;
|
|
1811
1766
|
}
|
|
1812
1767
|
var Oo = Symbol("radix.slottable");
|
|
1813
|
-
function
|
|
1768
|
+
function Ro(e) {
|
|
1814
1769
|
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Oo;
|
|
1815
1770
|
}
|
|
1816
|
-
function
|
|
1771
|
+
function Po(e, t) {
|
|
1817
1772
|
const r = { ...t };
|
|
1818
1773
|
for (const o in t) {
|
|
1819
1774
|
const a = e[o], n = t[o];
|
|
@@ -1824,11 +1779,10 @@ function Ro(e, t) {
|
|
|
1824
1779
|
return { ...e, ...r };
|
|
1825
1780
|
}
|
|
1826
1781
|
function xo(e) {
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
return a ? e.ref : (o = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
|
|
1782
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
1783
|
+
return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
1830
1784
|
}
|
|
1831
|
-
var
|
|
1785
|
+
var Do = [
|
|
1832
1786
|
"a",
|
|
1833
1787
|
"button",
|
|
1834
1788
|
"div",
|
|
@@ -1845,15 +1799,15 @@ var Ao = [
|
|
|
1845
1799
|
"span",
|
|
1846
1800
|
"svg",
|
|
1847
1801
|
"ul"
|
|
1848
|
-
],
|
|
1802
|
+
], Ao = Do.reduce((e, t) => {
|
|
1849
1803
|
const r = /* @__PURE__ */ Co(`Primitive.${t}`), o = s.forwardRef((a, n) => {
|
|
1850
1804
|
const { asChild: u, ...i } = a, d = u ? r : t;
|
|
1851
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
1805
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(d, { ...i, ref: n });
|
|
1852
1806
|
});
|
|
1853
1807
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
1854
|
-
}, {}), $o = "VisuallyHidden",
|
|
1855
|
-
(e, t) => /* @__PURE__ */
|
|
1856
|
-
|
|
1808
|
+
}, {}), $o = "VisuallyHidden", zt = s.forwardRef(
|
|
1809
|
+
(e, t) => /* @__PURE__ */ p(
|
|
1810
|
+
Ao.span,
|
|
1857
1811
|
{
|
|
1858
1812
|
...e,
|
|
1859
1813
|
ref: t,
|
|
@@ -1874,18 +1828,13 @@ var Ao = [
|
|
|
1874
1828
|
}
|
|
1875
1829
|
)
|
|
1876
1830
|
);
|
|
1877
|
-
|
|
1878
|
-
var To =
|
|
1879
|
-
const Mo = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */
|
|
1831
|
+
zt.displayName = $o;
|
|
1832
|
+
var To = zt;
|
|
1833
|
+
const Mo = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ p(To, { asChild: e, ...r, children: t });
|
|
1880
1834
|
function Io(e) {
|
|
1881
1835
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1882
1836
|
}
|
|
1883
1837
|
var _e = { exports: {} };
|
|
1884
|
-
/*!
|
|
1885
|
-
Copyright (c) 2018 Jed Watson.
|
|
1886
|
-
Licensed under the MIT License (MIT), see
|
|
1887
|
-
http://jedwatson.github.io/classnames
|
|
1888
|
-
*/
|
|
1889
1838
|
var ot;
|
|
1890
1839
|
function Lo() {
|
|
1891
1840
|
return ot || (ot = 1, (function(e) {
|
|
@@ -1920,9 +1869,9 @@ function Lo() {
|
|
|
1920
1869
|
})(_e)), _e.exports;
|
|
1921
1870
|
}
|
|
1922
1871
|
var Fo = Lo();
|
|
1923
|
-
const
|
|
1872
|
+
const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_1", Bo = "_slideUp_slvdi_1", Uo = "_slideDown_slvdi_1", Ho = {
|
|
1924
1873
|
"purpur-modal-content": "_purpur-modal-content_slvdi_1",
|
|
1925
|
-
fadeIn:
|
|
1874
|
+
fadeIn: jo,
|
|
1926
1875
|
fadeOut: Wo,
|
|
1927
1876
|
slideUp: Bo,
|
|
1928
1877
|
slideDown: Uo,
|
|
@@ -1943,7 +1892,7 @@ const jo = /* @__PURE__ */ Io(Fo), ko = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
|
|
|
1943
1892
|
"purpur-modal-content__actions": "_purpur-modal-content__actions_slvdi_151",
|
|
1944
1893
|
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_slvdi_203",
|
|
1945
1894
|
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_slvdi_213"
|
|
1946
|
-
}, at = (e) => e.showCloseButton === !0,
|
|
1895
|
+
}, at = (e) => e.showCloseButton === !0, R = ko.bind(Ho), N = "purpur-modal-content", Vo = Ce(
|
|
1947
1896
|
({
|
|
1948
1897
|
["data-testid"]: e,
|
|
1949
1898
|
actions: t,
|
|
@@ -1955,43 +1904,43 @@ const jo = /* @__PURE__ */ Io(Fo), ko = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
|
|
|
1955
1904
|
image: i,
|
|
1956
1905
|
stickyButtons: d = !0,
|
|
1957
1906
|
title: c,
|
|
1958
|
-
notification:
|
|
1907
|
+
notification: f = void 0,
|
|
1959
1908
|
zIndex: v,
|
|
1960
1909
|
onCloseAutoFocus: h,
|
|
1961
1910
|
...g
|
|
1962
1911
|
}, b) => {
|
|
1963
|
-
const { closeButtonAriaLabel: l, showCloseButton: m, ..._ } = g, [
|
|
1912
|
+
const { closeButtonAriaLabel: l, showCloseButton: m, ..._ } = g, [E, w] = ye(!1), [S, C] = ye(0), O = be(null), y = be(null), x = R(
|
|
1964
1913
|
N,
|
|
1965
1914
|
{ [`${N}--with-image`]: !!i },
|
|
1966
|
-
{ [`${N}--overflow`]:
|
|
1915
|
+
{ [`${N}--overflow`]: E },
|
|
1967
1916
|
{ [`${N}--sticky-footer`]: d },
|
|
1968
1917
|
o
|
|
1969
|
-
),
|
|
1970
|
-
n &&
|
|
1918
|
+
), P = (A) => e ? `${e} ${A}` : void 0, K = (A) => {
|
|
1919
|
+
n && A.preventDefault();
|
|
1971
1920
|
}, W = Zt(() => {
|
|
1972
1921
|
if (!O.current || !y.current)
|
|
1973
1922
|
return;
|
|
1974
|
-
const
|
|
1975
|
-
|
|
1923
|
+
const A = window.getComputedStyle(O.current, null), X = parseFloat(A.getPropertyValue("height")), Xt = y.current.offsetHeight;
|
|
1924
|
+
w(X < Xt), C(
|
|
1976
1925
|
(O.current.offsetWidth ?? 0) - (O.current.clientWidth ?? 0)
|
|
1977
1926
|
);
|
|
1978
1927
|
}, []), qt = () => {
|
|
1979
|
-
const
|
|
1980
|
-
if (
|
|
1981
|
-
const X =
|
|
1928
|
+
const A = y.current;
|
|
1929
|
+
if (A) {
|
|
1930
|
+
const X = A.querySelector("h2");
|
|
1982
1931
|
X && setTimeout(() => {
|
|
1983
1932
|
X.focus();
|
|
1984
1933
|
});
|
|
1985
1934
|
}
|
|
1986
|
-
}, Yt = (
|
|
1987
|
-
n && !m &&
|
|
1935
|
+
}, Yt = (A) => {
|
|
1936
|
+
n && !m && A.preventDefault();
|
|
1988
1937
|
};
|
|
1989
|
-
return
|
|
1938
|
+
return Ee(() => (window.addEventListener("resize", W), () => {
|
|
1990
1939
|
window.removeEventListener("resize", W);
|
|
1991
|
-
}), [W]),
|
|
1940
|
+
}), [W]), Ee(() => {
|
|
1992
1941
|
W();
|
|
1993
|
-
}, [
|
|
1994
|
-
/* @__PURE__ */
|
|
1942
|
+
}, [f, r, W]), /* @__PURE__ */ $(Mn, { children: [
|
|
1943
|
+
/* @__PURE__ */ p(In, { className: R(`${N}__overlay`), style: { zIndex: v } }),
|
|
1995
1944
|
/* @__PURE__ */ $(
|
|
1996
1945
|
Ln,
|
|
1997
1946
|
{
|
|
@@ -2000,7 +1949,7 @@ const jo = /* @__PURE__ */ Io(Fo), ko = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
|
|
|
2000
1949
|
"data-testid": e,
|
|
2001
1950
|
ref: b,
|
|
2002
1951
|
...!a && { "aria-describedby": void 0 },
|
|
2003
|
-
onPointerDownOutside:
|
|
1952
|
+
onPointerDownOutside: K,
|
|
2004
1953
|
onOpenAutoFocus: () => {
|
|
2005
1954
|
W(), qt();
|
|
2006
1955
|
},
|
|
@@ -2008,60 +1957,60 @@ const jo = /* @__PURE__ */ Io(Fo), ko = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
|
|
|
2008
1957
|
onCloseAutoFocus: h,
|
|
2009
1958
|
style: { zIndex: `calc(${v} + 1)` },
|
|
2010
1959
|
children: [
|
|
2011
|
-
/* @__PURE__ */ $("div", { ref: O, className:
|
|
2012
|
-
at(g) && l && i && /* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ $("div", { ref: O, className: R(`${N}__wrapper`), children: [
|
|
1961
|
+
at(g) && l && i && /* @__PURE__ */ p(
|
|
2013
1962
|
it,
|
|
2014
1963
|
{
|
|
2015
1964
|
"aria-label": l,
|
|
2016
1965
|
hasImage: !0,
|
|
2017
1966
|
scrollbarWidth: S,
|
|
2018
|
-
"data-testid":
|
|
1967
|
+
"data-testid": P("close-button")
|
|
2019
1968
|
}
|
|
2020
1969
|
),
|
|
2021
|
-
/* @__PURE__ */ $("div", { ref: y, className:
|
|
2022
|
-
/* @__PURE__ */ $("div", { className:
|
|
2023
|
-
at(g) && l && !i && /* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ $("div", { ref: y, className: R(`${N}__wrapper-inner`), children: [
|
|
1971
|
+
/* @__PURE__ */ $("div", { className: R(`${N}__header`), children: [
|
|
1972
|
+
at(g) && l && !i && /* @__PURE__ */ p(
|
|
2024
1973
|
it,
|
|
2025
1974
|
{
|
|
2026
1975
|
"aria-label": l,
|
|
2027
|
-
"data-testid":
|
|
1976
|
+
"data-testid": P("close-button")
|
|
2028
1977
|
}
|
|
2029
1978
|
),
|
|
2030
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ p(
|
|
2031
1980
|
Fn,
|
|
2032
1981
|
{
|
|
2033
1982
|
asChild: !0,
|
|
2034
|
-
className:
|
|
2035
|
-
"data-testid":
|
|
2036
|
-
children: /* @__PURE__ */
|
|
1983
|
+
className: R(`${N}__title`),
|
|
1984
|
+
"data-testid": P("title"),
|
|
1985
|
+
children: /* @__PURE__ */ p(Ht, { tag: "h2", variant: "title-200", tabIndex: -1, children: c })
|
|
2037
1986
|
}
|
|
2038
1987
|
)
|
|
2039
1988
|
] }),
|
|
2040
|
-
i && /* @__PURE__ */
|
|
1989
|
+
i && /* @__PURE__ */ p(
|
|
2041
1990
|
"div",
|
|
2042
1991
|
{
|
|
2043
|
-
className:
|
|
2044
|
-
"data-testid":
|
|
1992
|
+
className: R(`${N}__image-wrapper`),
|
|
1993
|
+
"data-testid": P("image"),
|
|
2045
1994
|
children: i
|
|
2046
1995
|
}
|
|
2047
1996
|
),
|
|
2048
|
-
/* @__PURE__ */
|
|
2049
|
-
a && u && /* @__PURE__ */
|
|
2050
|
-
a && !u && /* @__PURE__ */
|
|
2051
|
-
|
|
1997
|
+
/* @__PURE__ */ p("div", { className: R(`${N}__body`), children: /* @__PURE__ */ $("div", { className: R(`${N}__body-inner`), children: [
|
|
1998
|
+
a && u && /* @__PURE__ */ p(Mo, { asChild: !0, children: /* @__PURE__ */ p(He, { "data-testid": P("description"), children: a }) }),
|
|
1999
|
+
a && !u && /* @__PURE__ */ p(
|
|
2000
|
+
He,
|
|
2052
2001
|
{
|
|
2053
2002
|
asChild: !0,
|
|
2054
|
-
className:
|
|
2055
|
-
"data-testid":
|
|
2056
|
-
children: /* @__PURE__ */
|
|
2003
|
+
className: R(`${N}__description`),
|
|
2004
|
+
"data-testid": P("description"),
|
|
2005
|
+
children: /* @__PURE__ */ p(Gt, { variant: "paragraph-100", children: a })
|
|
2057
2006
|
}
|
|
2058
2007
|
),
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
!d && /* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ p("div", { children: r }),
|
|
2009
|
+
!d && /* @__PURE__ */ p(ut, { actions: t, notification: f })
|
|
2061
2010
|
] }) })
|
|
2062
2011
|
] })
|
|
2063
2012
|
] }),
|
|
2064
|
-
d && /* @__PURE__ */
|
|
2013
|
+
d && /* @__PURE__ */ p(ut, { actions: t, notification: f })
|
|
2065
2014
|
]
|
|
2066
2015
|
}
|
|
2067
2016
|
)
|
|
@@ -2072,7 +2021,7 @@ const jo = /* @__PURE__ */ Io(Fo), ko = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
|
|
|
2072
2021
|
hasImage: t,
|
|
2073
2022
|
scrollbarWidth: r,
|
|
2074
2023
|
["data-testid"]: o
|
|
2075
|
-
}) => /* @__PURE__ */
|
|
2024
|
+
}) => /* @__PURE__ */ p(kn, { asChild: !0, children: /* @__PURE__ */ p(
|
|
2076
2025
|
Ut,
|
|
2077
2026
|
{
|
|
2078
2027
|
variant: t ? "primary" : "tertiary-purple",
|
|
@@ -2080,36 +2029,35 @@ const jo = /* @__PURE__ */ Io(Fo), ko = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
|
|
|
2080
2029
|
size: "sm",
|
|
2081
2030
|
iconOnly: !0,
|
|
2082
2031
|
"aria-label": e,
|
|
2083
|
-
className:
|
|
2032
|
+
className: R(`${N}__close-button`),
|
|
2084
2033
|
style: { right: `calc(var(--purpur-spacing-100) + ${r || 0}px)` },
|
|
2085
2034
|
"data-testid": o,
|
|
2086
|
-
children: /* @__PURE__ */
|
|
2035
|
+
children: /* @__PURE__ */ p(Kt, {})
|
|
2087
2036
|
}
|
|
2088
2037
|
) }), ut = ({
|
|
2089
2038
|
actions: e,
|
|
2090
2039
|
notification: t
|
|
2091
2040
|
}) => {
|
|
2092
2041
|
const r = be(null);
|
|
2093
|
-
return
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
/* @__PURE__ */
|
|
2098
|
-
|
|
2099
|
-
/* @__PURE__ */ f("span", { className: P(`${N}__actions-separator`) })
|
|
2042
|
+
return Ee(() => {
|
|
2043
|
+
t && r?.current?.scrollIntoView?.(!1);
|
|
2044
|
+
}, [t]), e ? /* @__PURE__ */ $("div", { className: R(`${N}__actions`), children: [
|
|
2045
|
+
/* @__PURE__ */ p("div", { className: R(`${N}__actions-buttons`), "data-testid": "modal actions", children: e }),
|
|
2046
|
+
t && /* @__PURE__ */ p("div", { className: R(`${N}__notification`), ref: r, children: t }),
|
|
2047
|
+
/* @__PURE__ */ p("span", { className: R(`${N}__actions-separator`) })
|
|
2100
2048
|
] }) : null;
|
|
2101
|
-
},
|
|
2102
|
-
({ children: e, ...t }, r) => /* @__PURE__ */
|
|
2103
|
-
),
|
|
2049
|
+
}, Ko = Ce(
|
|
2050
|
+
({ children: e, ...t }, r) => /* @__PURE__ */ p(Tn, { asChild: !0, ref: r, ...t, children: e })
|
|
2051
|
+
), Pe = ({
|
|
2104
2052
|
["data-testid"]: e,
|
|
2105
2053
|
children: t,
|
|
2106
2054
|
open: r,
|
|
2107
2055
|
onOpenChange: o
|
|
2108
|
-
}) => /* @__PURE__ */
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2056
|
+
}) => /* @__PURE__ */ p($n, { open: r, onOpenChange: o, "data-testid": e, children: t });
|
|
2057
|
+
Pe.Trigger = Ko;
|
|
2058
|
+
Pe.Content = Vo;
|
|
2059
|
+
Pe.displayName = "Modal";
|
|
2112
2060
|
export {
|
|
2113
|
-
|
|
2061
|
+
Pe as Modal
|
|
2114
2062
|
};
|
|
2115
2063
|
//# sourceMappingURL=modal.es.js.map
|