@purpurds/modal 8.3.1 → 8.5.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 +12 -12
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.es.js +373 -369
- package/dist/modal.es.js.map +1 -1
- package/package.json +10 -10
package/dist/modal.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as f, 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
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
3
|
+
import { useState as ye, forwardRef as Ce, useRef as be, useCallback as Zt, useEffect as we } from "react";
|
|
4
|
+
import * as Qt from "react-dom";
|
|
5
|
+
import Jt from "react-dom";
|
|
6
|
+
function F(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
8
|
if (e == null || e(a), r === !1 || !a.defaultPrevented)
|
|
9
9
|
return t == null ? void 0 : t(a);
|
|
@@ -14,7 +14,7 @@ function Ae(e, t) {
|
|
|
14
14
|
return e(t);
|
|
15
15
|
e != null && (e.current = t);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function st(...e) {
|
|
18
18
|
return (t) => {
|
|
19
19
|
let r = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
@@ -30,10 +30,10 @@ function ut(...e) {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return s.useCallback(
|
|
33
|
+
function k(...e) {
|
|
34
|
+
return s.useCallback(st(...e), e);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
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
39
|
return /* @__PURE__ */ f(r.Provider, { value: d, children: u });
|
|
@@ -47,7 +47,7 @@ function Qt(e, t) {
|
|
|
47
47
|
}
|
|
48
48
|
return [o, a];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function tr(e, t = []) {
|
|
51
51
|
let r = [];
|
|
52
52
|
function o(n, u) {
|
|
53
53
|
const i = s.createContext(u), d = r.length;
|
|
@@ -77,9 +77,9 @@ function Jt(e, t = []) {
|
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
return a.scopeName = e, [o,
|
|
80
|
+
return a.scopeName = e, [o, rr(a, ...t)];
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function rr(...e) {
|
|
83
83
|
const t = e[0];
|
|
84
84
|
if (e.length === 1) return t;
|
|
85
85
|
const r = () => {
|
|
@@ -98,23 +98,23 @@ function er(...e) {
|
|
|
98
98
|
return r.scopeName = t.scopeName, r;
|
|
99
99
|
}
|
|
100
100
|
var q = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
|
|
101
|
-
},
|
|
102
|
-
}),
|
|
101
|
+
}, nr = s[" useId ".trim().toString()] || (() => {
|
|
102
|
+
}), or = 0;
|
|
103
103
|
function le(e) {
|
|
104
|
-
const [t, r] = s.useState(
|
|
104
|
+
const [t, r] = s.useState(nr());
|
|
105
105
|
return q(() => {
|
|
106
|
-
r((o) => o ?? String(
|
|
106
|
+
r((o) => o ?? String(or++));
|
|
107
107
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
function
|
|
109
|
+
var ar = s[" useInsertionEffect ".trim().toString()] || q;
|
|
110
|
+
function ir({
|
|
111
111
|
prop: e,
|
|
112
112
|
defaultProp: t,
|
|
113
113
|
onChange: r = () => {
|
|
114
114
|
},
|
|
115
115
|
caller: o
|
|
116
116
|
}) {
|
|
117
|
-
const [a, n, u] =
|
|
117
|
+
const [a, n, u] = ur({
|
|
118
118
|
defaultProp: t,
|
|
119
119
|
onChange: r
|
|
120
120
|
}), i = e !== void 0, d = i ? e : a;
|
|
@@ -131,7 +131,7 @@ function or({
|
|
|
131
131
|
(p) => {
|
|
132
132
|
var v;
|
|
133
133
|
if (i) {
|
|
134
|
-
const h =
|
|
134
|
+
const h = sr(p) ? p(e) : p;
|
|
135
135
|
h !== e && ((v = u.current) == null || v.call(u, h));
|
|
136
136
|
} else
|
|
137
137
|
n(p);
|
|
@@ -140,25 +140,25 @@ function or({
|
|
|
140
140
|
);
|
|
141
141
|
return [d, c];
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function ur({
|
|
144
144
|
defaultProp: e,
|
|
145
145
|
onChange: t
|
|
146
146
|
}) {
|
|
147
147
|
const [r, o] = s.useState(e), a = s.useRef(r), n = s.useRef(t);
|
|
148
|
-
return
|
|
148
|
+
return ar(() => {
|
|
149
149
|
n.current = t;
|
|
150
150
|
}, [t]), s.useEffect(() => {
|
|
151
151
|
var u;
|
|
152
152
|
a.current !== r && ((u = n.current) == null || u.call(n, r), a.current = r);
|
|
153
153
|
}, [r, a]), [r, o, n];
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function sr(e) {
|
|
156
156
|
return typeof e == "function";
|
|
157
157
|
}
|
|
158
158
|
// @__NO_SIDE_EFFECTS__
|
|
159
|
-
function
|
|
160
|
-
const t = /* @__PURE__ */
|
|
161
|
-
const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(
|
|
159
|
+
function ct(e) {
|
|
160
|
+
const t = /* @__PURE__ */ cr(e), r = s.forwardRef((o, a) => {
|
|
161
|
+
const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(dr);
|
|
162
162
|
if (d) {
|
|
163
163
|
const c = d.props.children, p = i.map((v) => v === d ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : v);
|
|
164
164
|
return /* @__PURE__ */ f(t, { ...u, ref: a, children: s.isValidElement(c) ? s.cloneElement(c, void 0, p) : null });
|
|
@@ -168,22 +168,22 @@ function st(e) {
|
|
|
168
168
|
return r.displayName = `${e}.Slot`, r;
|
|
169
169
|
}
|
|
170
170
|
// @__NO_SIDE_EFFECTS__
|
|
171
|
-
function
|
|
171
|
+
function cr(e) {
|
|
172
172
|
const t = s.forwardRef((r, o) => {
|
|
173
173
|
const { children: a, ...n } = r;
|
|
174
174
|
if (s.isValidElement(a)) {
|
|
175
|
-
const u =
|
|
176
|
-
return a.type !== s.Fragment && (i.ref = o ?
|
|
175
|
+
const u = fr(a), i = pr(n, a.props);
|
|
176
|
+
return a.type !== s.Fragment && (i.ref = o ? st(o, u) : u), s.cloneElement(a, i);
|
|
177
177
|
}
|
|
178
178
|
return s.Children.count(a) > 1 ? s.Children.only(null) : null;
|
|
179
179
|
});
|
|
180
180
|
return t.displayName = `${e}.SlotClone`, t;
|
|
181
181
|
}
|
|
182
|
-
var
|
|
183
|
-
function
|
|
184
|
-
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
182
|
+
var lr = Symbol("radix.slottable");
|
|
183
|
+
function dr(e) {
|
|
184
|
+
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === lr;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function pr(e, t) {
|
|
187
187
|
const r = { ...t };
|
|
188
188
|
for (const o in t) {
|
|
189
189
|
const a = e[o], n = t[o];
|
|
@@ -194,12 +194,12 @@ function lr(e, t) {
|
|
|
194
194
|
}
|
|
195
195
|
return { ...e, ...r };
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function fr(e) {
|
|
198
198
|
var o, a;
|
|
199
199
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
200
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);
|
|
201
201
|
}
|
|
202
|
-
var
|
|
202
|
+
var vr = [
|
|
203
203
|
"a",
|
|
204
204
|
"button",
|
|
205
205
|
"div",
|
|
@@ -217,15 +217,15 @@ var pr = [
|
|
|
217
217
|
"span",
|
|
218
218
|
"svg",
|
|
219
219
|
"ul"
|
|
220
|
-
], M =
|
|
221
|
-
const r = /* @__PURE__ */
|
|
220
|
+
], M = vr.reduce((e, t) => {
|
|
221
|
+
const r = /* @__PURE__ */ ct(`Primitive.${t}`), o = s.forwardRef((a, n) => {
|
|
222
222
|
const { asChild: u, ...i } = a, d = u ? r : t;
|
|
223
223
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(d, { ...i, ref: n });
|
|
224
224
|
});
|
|
225
225
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
226
226
|
}, {});
|
|
227
|
-
function
|
|
228
|
-
e &&
|
|
227
|
+
function hr(e, t) {
|
|
228
|
+
e && Qt.flushSync(() => e.dispatchEvent(t));
|
|
229
229
|
}
|
|
230
230
|
function Y(e) {
|
|
231
231
|
const t = s.useRef(e);
|
|
@@ -236,7 +236,7 @@ function Y(e) {
|
|
|
236
236
|
return (o = t.current) == null ? void 0 : o.call(t, ...r);
|
|
237
237
|
}, []);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function mr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
240
240
|
const r = Y(e);
|
|
241
241
|
s.useEffect(() => {
|
|
242
242
|
const o = (a) => {
|
|
@@ -245,11 +245,11 @@ function vr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
245
245
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
246
246
|
}, [r, t]);
|
|
247
247
|
}
|
|
248
|
-
var
|
|
248
|
+
var gr = "DismissableLayer", Ee = "dismissableLayer.update", _r = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", De, lt = s.createContext({
|
|
249
249
|
layers: /* @__PURE__ */ new Set(),
|
|
250
250
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
251
251
|
branches: /* @__PURE__ */ new Set()
|
|
252
|
-
}),
|
|
252
|
+
}), dt = s.forwardRef(
|
|
253
253
|
(e, t) => {
|
|
254
254
|
const {
|
|
255
255
|
disableOutsidePointerEvents: r = !1,
|
|
@@ -259,14 +259,14 @@ var hr = "DismissableLayer", Ee = "dismissableLayer.update", mr = "dismissableLa
|
|
|
259
259
|
onInteractOutside: u,
|
|
260
260
|
onDismiss: i,
|
|
261
261
|
...d
|
|
262
|
-
} = e, c = s.useContext(
|
|
263
|
-
const x = y.target, R = [...c.branches].some((
|
|
262
|
+
} = e, c = s.useContext(lt), [p, v] = s.useState(null), h = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = s.useState({}), b = k(t, (y) => v(y)), l = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = l.indexOf(m), w = p ? l.indexOf(p) : -1, E = c.layersWithOutsidePointerEventsDisabled.size > 0, S = w >= _, C = Er((y) => {
|
|
263
|
+
const x = y.target, R = [...c.branches].some((G) => G.contains(x));
|
|
264
264
|
!S || R || (a == null || a(y), u == null || u(y), y.defaultPrevented || i == null || i());
|
|
265
|
-
}, h), P =
|
|
265
|
+
}, h), P = Sr((y) => {
|
|
266
266
|
const x = y.target;
|
|
267
|
-
[...c.branches].some((
|
|
267
|
+
[...c.branches].some((G) => G.contains(x)) || (n == null || n(y), u == null || u(y), y.defaultPrevented || i == null || i());
|
|
268
268
|
}, h);
|
|
269
|
-
return
|
|
269
|
+
return mr((y) => {
|
|
270
270
|
w === c.layers.size - 1 && (o == null || o(y), !y.defaultPrevented && i && (y.preventDefault(), i()));
|
|
271
271
|
}, h), s.useEffect(() => {
|
|
272
272
|
if (p)
|
|
@@ -287,9 +287,9 @@ var hr = "DismissableLayer", Ee = "dismissableLayer.update", mr = "dismissableLa
|
|
|
287
287
|
pointerEvents: E ? S ? "auto" : "none" : void 0,
|
|
288
288
|
...e.style
|
|
289
289
|
},
|
|
290
|
-
onFocusCapture:
|
|
291
|
-
onBlurCapture:
|
|
292
|
-
onPointerDownCapture:
|
|
290
|
+
onFocusCapture: F(e.onFocusCapture, P.onFocusCapture),
|
|
291
|
+
onBlurCapture: F(e.onBlurCapture, P.onBlurCapture),
|
|
292
|
+
onPointerDownCapture: F(
|
|
293
293
|
e.onPointerDownCapture,
|
|
294
294
|
C.onPointerDownCapture
|
|
295
295
|
)
|
|
@@ -297,9 +297,9 @@ var hr = "DismissableLayer", Ee = "dismissableLayer.update", mr = "dismissableLa
|
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
|
-
|
|
301
|
-
var
|
|
302
|
-
const r = s.useContext(
|
|
300
|
+
dt.displayName = gr;
|
|
301
|
+
var br = "DismissableLayerBranch", wr = s.forwardRef((e, t) => {
|
|
302
|
+
const r = s.useContext(lt), o = s.useRef(null), a = k(t, o);
|
|
303
303
|
return s.useEffect(() => {
|
|
304
304
|
const n = o.current;
|
|
305
305
|
if (n)
|
|
@@ -308,16 +308,16 @@ var _r = "DismissableLayerBranch", yr = s.forwardRef((e, t) => {
|
|
|
308
308
|
};
|
|
309
309
|
}, [r.branches]), /* @__PURE__ */ f(M.div, { ...e, ref: a });
|
|
310
310
|
});
|
|
311
|
-
|
|
312
|
-
function
|
|
311
|
+
wr.displayName = br;
|
|
312
|
+
function Er(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
313
313
|
const r = Y(e), o = s.useRef(!1), a = s.useRef(() => {
|
|
314
314
|
});
|
|
315
315
|
return s.useEffect(() => {
|
|
316
316
|
const n = (i) => {
|
|
317
317
|
if (i.target && !o.current) {
|
|
318
318
|
let d = function() {
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
pt(
|
|
320
|
+
_r,
|
|
321
321
|
r,
|
|
322
322
|
c,
|
|
323
323
|
{ discrete: !0 }
|
|
@@ -339,11 +339,11 @@ function br(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
339
339
|
onPointerDownCapture: () => o.current = !0
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
343
343
|
const r = Y(e), o = s.useRef(!1);
|
|
344
344
|
return s.useEffect(() => {
|
|
345
345
|
const a = (n) => {
|
|
346
|
-
n.target && !o.current &&
|
|
346
|
+
n.target && !o.current && pt(yr, r, { originalEvent: n }, {
|
|
347
347
|
discrete: !1
|
|
348
348
|
});
|
|
349
349
|
};
|
|
@@ -357,18 +357,18 @@ function $e() {
|
|
|
357
357
|
const e = new CustomEvent(Ee);
|
|
358
358
|
document.dispatchEvent(e);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function pt(e, t, r, { discrete: o }) {
|
|
361
361
|
const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
|
|
362
|
-
t && a.addEventListener(e, t, { once: !0 }), o ?
|
|
362
|
+
t && a.addEventListener(e, t, { once: !0 }), o ? hr(a, n) : a.dispatchEvent(n);
|
|
363
363
|
}
|
|
364
|
-
var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te = { bubbles: !1, cancelable: !0 },
|
|
364
|
+
var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te = { bubbles: !1, cancelable: !0 }, Cr = "FocusScope", ft = s.forwardRef((e, t) => {
|
|
365
365
|
const {
|
|
366
366
|
loop: r = !1,
|
|
367
367
|
trapped: o = !1,
|
|
368
368
|
onMountAutoFocus: a,
|
|
369
369
|
onUnmountAutoFocus: n,
|
|
370
370
|
...u
|
|
371
|
-
} = e, [i, d] = s.useState(null), c = Y(a), p = Y(n), v = s.useRef(null), h =
|
|
371
|
+
} = e, [i, d] = s.useState(null), c = Y(a), p = Y(n), v = s.useRef(null), h = k(t, (l) => d(l)), g = s.useRef({
|
|
372
372
|
paused: !1,
|
|
373
373
|
pause() {
|
|
374
374
|
this.paused = !0;
|
|
@@ -382,15 +382,15 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
|
|
|
382
382
|
let l = function(E) {
|
|
383
383
|
if (g.paused || !i) return;
|
|
384
384
|
const S = E.target;
|
|
385
|
-
i.contains(S) ? v.current = S :
|
|
385
|
+
i.contains(S) ? v.current = S : L(v.current, { select: !0 });
|
|
386
386
|
}, m = function(E) {
|
|
387
387
|
if (g.paused || !i) return;
|
|
388
388
|
const S = E.relatedTarget;
|
|
389
|
-
S !== null && (i.contains(S) ||
|
|
389
|
+
S !== null && (i.contains(S) || L(v.current, { select: !0 }));
|
|
390
390
|
}, _ = function(E) {
|
|
391
391
|
if (document.activeElement === document.body)
|
|
392
392
|
for (const C of E)
|
|
393
|
-
C.removedNodes.length > 0 &&
|
|
393
|
+
C.removedNodes.length > 0 && L(i);
|
|
394
394
|
};
|
|
395
395
|
document.addEventListener("focusin", l), document.addEventListener("focusout", m);
|
|
396
396
|
const w = new MutationObserver(_);
|
|
@@ -404,12 +404,12 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
|
|
|
404
404
|
const l = document.activeElement;
|
|
405
405
|
if (!i.contains(l)) {
|
|
406
406
|
const _ = new CustomEvent(de, Te);
|
|
407
|
-
i.addEventListener(de, c), i.dispatchEvent(_), _.defaultPrevented || (
|
|
407
|
+
i.addEventListener(de, c), i.dispatchEvent(_), _.defaultPrevented || (Nr(Ar(vt(i)), { select: !0 }), document.activeElement === l && L(i));
|
|
408
408
|
}
|
|
409
409
|
return () => {
|
|
410
410
|
i.removeEventListener(de, c), setTimeout(() => {
|
|
411
411
|
const _ = new CustomEvent(pe, Te);
|
|
412
|
-
i.addEventListener(pe, p), i.dispatchEvent(_), _.defaultPrevented ||
|
|
412
|
+
i.addEventListener(pe, p), i.dispatchEvent(_), _.defaultPrevented || L(l ?? document.body, { select: !0 }), i.removeEventListener(pe, p), Ie.remove(g);
|
|
413
413
|
}, 0);
|
|
414
414
|
};
|
|
415
415
|
}
|
|
@@ -419,25 +419,25 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
|
|
|
419
419
|
if (!r && !o || g.paused) return;
|
|
420
420
|
const m = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, _ = document.activeElement;
|
|
421
421
|
if (m && _) {
|
|
422
|
-
const w = l.currentTarget, [E, S] =
|
|
423
|
-
E && S ? !l.shiftKey && _ === S ? (l.preventDefault(), r &&
|
|
422
|
+
const w = l.currentTarget, [E, S] = Pr(w);
|
|
423
|
+
E && S ? !l.shiftKey && _ === S ? (l.preventDefault(), r && L(E, { select: !0 })) : l.shiftKey && _ === E && (l.preventDefault(), r && L(S, { select: !0 })) : _ === w && l.preventDefault();
|
|
424
424
|
}
|
|
425
425
|
},
|
|
426
426
|
[r, o, g.paused]
|
|
427
427
|
);
|
|
428
428
|
return /* @__PURE__ */ f(M.div, { tabIndex: -1, ...u, ref: h, onKeyDown: b });
|
|
429
429
|
});
|
|
430
|
-
|
|
431
|
-
function
|
|
430
|
+
ft.displayName = Cr;
|
|
431
|
+
function Nr(e, { select: t = !1 } = {}) {
|
|
432
432
|
const r = document.activeElement;
|
|
433
433
|
for (const o of e)
|
|
434
|
-
if (
|
|
434
|
+
if (L(o, { select: t }), document.activeElement !== r) return;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
const t =
|
|
436
|
+
function Pr(e) {
|
|
437
|
+
const t = vt(e), r = Me(t, e), o = Me(t.reverse(), e);
|
|
438
438
|
return [r, o];
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function vt(e) {
|
|
441
441
|
const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
442
442
|
acceptNode: (o) => {
|
|
443
443
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -449,9 +449,9 @@ function ft(e) {
|
|
|
449
449
|
}
|
|
450
450
|
function Me(e, t) {
|
|
451
451
|
for (const r of e)
|
|
452
|
-
if (!
|
|
452
|
+
if (!Or(r, { upTo: t })) return r;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Or(e, { upTo: t }) {
|
|
455
455
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
456
456
|
for (; e; ) {
|
|
457
457
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -460,17 +460,17 @@ function Nr(e, { upTo: t }) {
|
|
|
460
460
|
}
|
|
461
461
|
return !1;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Rr(e) {
|
|
464
464
|
return e instanceof HTMLInputElement && "select" in e;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function L(e, { select: t = !1 } = {}) {
|
|
467
467
|
if (e && e.focus) {
|
|
468
468
|
const r = document.activeElement;
|
|
469
|
-
e.focus({ preventScroll: !0 }), e !== r &&
|
|
469
|
+
e.focus({ preventScroll: !0 }), e !== r && Rr(e) && t && e.select();
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
var Ie =
|
|
473
|
-
function
|
|
472
|
+
var Ie = xr();
|
|
473
|
+
function xr() {
|
|
474
474
|
let e = [];
|
|
475
475
|
return {
|
|
476
476
|
add(t) {
|
|
@@ -487,27 +487,27 @@ function Le(e, t) {
|
|
|
487
487
|
const r = [...e], o = r.indexOf(t);
|
|
488
488
|
return o !== -1 && r.splice(o, 1), r;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Ar(e) {
|
|
491
491
|
return e.filter((t) => t.tagName !== "A");
|
|
492
492
|
}
|
|
493
|
-
var
|
|
493
|
+
var Dr = "Portal", ht = s.forwardRef((e, t) => {
|
|
494
494
|
var i;
|
|
495
495
|
const { container: r, ...o } = e, [a, n] = s.useState(!1);
|
|
496
496
|
q(() => n(!0), []);
|
|
497
497
|
const u = r || a && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
498
|
-
return u ?
|
|
498
|
+
return u ? Jt.createPortal(/* @__PURE__ */ f(M.div, { ...o, ref: t }), u) : null;
|
|
499
499
|
});
|
|
500
|
-
|
|
501
|
-
function
|
|
500
|
+
ht.displayName = Dr;
|
|
501
|
+
function $r(e, t) {
|
|
502
502
|
return s.useReducer((r, o) => t[r][o] ?? r, e);
|
|
503
503
|
}
|
|
504
504
|
var ue = (e) => {
|
|
505
|
-
const { present: t, children: r } = e, o =
|
|
505
|
+
const { present: t, children: r } = e, o = Tr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = k(o.ref, Mr(a));
|
|
506
506
|
return typeof r == "function" || o.isPresent ? s.cloneElement(a, { ref: n }) : null;
|
|
507
507
|
};
|
|
508
508
|
ue.displayName = "Presence";
|
|
509
|
-
function
|
|
510
|
-
const [t, r] = s.useState(), o = s.useRef(null), a = s.useRef(e), n = s.useRef("none"), u = e ? "mounted" : "unmounted", [i, d] =
|
|
509
|
+
function Tr(e) {
|
|
510
|
+
const [t, r] = s.useState(), o = s.useRef(null), a = s.useRef(e), n = s.useRef("none"), u = e ? "mounted" : "unmounted", [i, d] = $r(u, {
|
|
511
511
|
mounted: {
|
|
512
512
|
UNMOUNT: "unmounted",
|
|
513
513
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -558,13 +558,13 @@ function Dr(e) {
|
|
|
558
558
|
function Z(e) {
|
|
559
559
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function Mr(e) {
|
|
562
562
|
var o, a;
|
|
563
563
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
564
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);
|
|
565
565
|
}
|
|
566
566
|
var fe = 0;
|
|
567
|
-
function
|
|
567
|
+
function Ir() {
|
|
568
568
|
s.useEffect(() => {
|
|
569
569
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
570
570
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Fe()), document.body.insertAdjacentElement("beforeend", e[1] ?? Fe()), fe++, () => {
|
|
@@ -585,7 +585,7 @@ var T = function() {
|
|
|
585
585
|
return t;
|
|
586
586
|
}, T.apply(this, arguments);
|
|
587
587
|
};
|
|
588
|
-
function
|
|
588
|
+
function mt(e, t) {
|
|
589
589
|
var r = {};
|
|
590
590
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
|
|
591
591
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -593,16 +593,16 @@ function ht(e, t) {
|
|
|
593
593
|
t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (r[o[a]] = e[o[a]]);
|
|
594
594
|
return r;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function Lr(e, t, r) {
|
|
597
597
|
if (r || arguments.length === 2) for (var o = 0, a = t.length, n; o < a; o++)
|
|
598
598
|
(n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
|
|
599
599
|
return e.concat(n || Array.prototype.slice.call(t));
|
|
600
600
|
}
|
|
601
|
-
var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar",
|
|
601
|
+
var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", Fr = "with-scroll-bars-hidden", jr = "--removed-body-scroll-bar-size";
|
|
602
602
|
function ve(e, t) {
|
|
603
603
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function kr(e, t) {
|
|
606
606
|
var r = ye(function() {
|
|
607
607
|
return {
|
|
608
608
|
// value
|
|
@@ -623,15 +623,15 @@ function Fr(e, t) {
|
|
|
623
623
|
})[0];
|
|
624
624
|
return r.callback = t, r.facade;
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
var r =
|
|
626
|
+
var Wr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, je = /* @__PURE__ */ new WeakMap();
|
|
627
|
+
function Br(e, t) {
|
|
628
|
+
var r = kr(null, function(o) {
|
|
629
629
|
return e.forEach(function(a) {
|
|
630
630
|
return ve(a, o);
|
|
631
631
|
});
|
|
632
632
|
});
|
|
633
|
-
return
|
|
634
|
-
var o =
|
|
633
|
+
return Wr(function() {
|
|
634
|
+
var o = je.get(r);
|
|
635
635
|
if (o) {
|
|
636
636
|
var a = new Set(o), n = new Set(e), u = r.current;
|
|
637
637
|
a.forEach(function(i) {
|
|
@@ -640,14 +640,14 @@ function Wr(e, t) {
|
|
|
640
640
|
a.has(i) || ve(i, u);
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
|
-
|
|
643
|
+
je.set(r, e);
|
|
644
644
|
}, [e]), r;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Ur(e) {
|
|
647
647
|
return e;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
t === void 0 && (t =
|
|
649
|
+
function Vr(e, t) {
|
|
650
|
+
t === void 0 && (t = Ur);
|
|
651
651
|
var r = [], o = !1, a = {
|
|
652
652
|
read: function() {
|
|
653
653
|
if (o)
|
|
@@ -701,13 +701,13 @@ function jr(e, t) {
|
|
|
701
701
|
};
|
|
702
702
|
return a;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function Hr(e) {
|
|
705
705
|
e === void 0 && (e = {});
|
|
706
|
-
var t =
|
|
706
|
+
var t = Vr(null);
|
|
707
707
|
return t.options = T({ async: !0, ssr: !1 }, e), t;
|
|
708
708
|
}
|
|
709
|
-
var
|
|
710
|
-
var t = e.sideCar, r =
|
|
709
|
+
var gt = function(e) {
|
|
710
|
+
var t = e.sideCar, r = mt(e, ["sideCar"]);
|
|
711
711
|
if (!t)
|
|
712
712
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
713
713
|
var o = t.read();
|
|
@@ -715,21 +715,21 @@ var mt = function(e) {
|
|
|
715
715
|
throw new Error("Sidecar medium not found");
|
|
716
716
|
return s.createElement(o, T({}, r));
|
|
717
717
|
};
|
|
718
|
-
|
|
719
|
-
function
|
|
720
|
-
return e.useMedium(t),
|
|
718
|
+
gt.isSideCarExport = !0;
|
|
719
|
+
function Gr(e, t) {
|
|
720
|
+
return e.useMedium(t), gt;
|
|
721
721
|
}
|
|
722
|
-
var
|
|
722
|
+
var _t = Hr(), he = function() {
|
|
723
723
|
}, se = s.forwardRef(function(e, t) {
|
|
724
724
|
var r = s.useRef(null), o = s.useState({
|
|
725
725
|
onScrollCapture: he,
|
|
726
726
|
onWheelCapture: he,
|
|
727
727
|
onTouchMoveCapture: he
|
|
728
|
-
}), a = o[0], n = o[1], u = e.forwardProps, i = e.children, d = e.className, c = e.removeScrollBar, p = e.enabled, v = e.shards, h = e.sideCar, g = e.noRelative, b = e.noIsolation, l = e.inert, m = e.allowPinchZoom, _ = e.as, w = _ === void 0 ? "div" : _, E = e.gapMode, S =
|
|
728
|
+
}), a = o[0], n = o[1], u = e.forwardProps, i = e.children, d = e.className, c = e.removeScrollBar, p = e.enabled, v = e.shards, h = e.sideCar, g = e.noRelative, b = e.noIsolation, l = e.inert, m = e.allowPinchZoom, _ = e.as, w = _ === void 0 ? "div" : _, E = e.gapMode, S = mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, P = Br([r, t]), y = T(T({}, S), a);
|
|
729
729
|
return s.createElement(
|
|
730
730
|
s.Fragment,
|
|
731
731
|
null,
|
|
732
|
-
p && s.createElement(C, { sideCar:
|
|
732
|
+
p && s.createElement(C, { sideCar: _t, removeScrollBar: c, shards: v, noRelative: g, noIsolation: b, inert: l, setCallbacks: n, allowPinchZoom: !!m, lockRef: r, gapMode: E }),
|
|
733
733
|
u ? s.cloneElement(s.Children.only(i), T(T({}, y), { ref: P })) : s.createElement(w, T({}, y, { className: d, ref: P }), i)
|
|
734
734
|
);
|
|
735
735
|
});
|
|
@@ -742,37 +742,37 @@ se.classNames = {
|
|
|
742
742
|
fullWidth: ae,
|
|
743
743
|
zeroRight: oe
|
|
744
744
|
};
|
|
745
|
-
var
|
|
745
|
+
var zr = function() {
|
|
746
746
|
if (typeof __webpack_nonce__ < "u")
|
|
747
747
|
return __webpack_nonce__;
|
|
748
748
|
};
|
|
749
|
-
function
|
|
749
|
+
function Kr() {
|
|
750
750
|
if (!document)
|
|
751
751
|
return null;
|
|
752
752
|
var e = document.createElement("style");
|
|
753
753
|
e.type = "text/css";
|
|
754
|
-
var t =
|
|
754
|
+
var t = zr();
|
|
755
755
|
return t && e.setAttribute("nonce", t), e;
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function qr(e, t) {
|
|
758
758
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function Yr(e) {
|
|
761
761
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
762
762
|
t.appendChild(e);
|
|
763
763
|
}
|
|
764
|
-
var
|
|
764
|
+
var Xr = function() {
|
|
765
765
|
var e = 0, t = null;
|
|
766
766
|
return {
|
|
767
767
|
add: function(r) {
|
|
768
|
-
e == 0 && (t =
|
|
768
|
+
e == 0 && (t = Kr()) && (qr(t, r), Yr(t)), e++;
|
|
769
769
|
},
|
|
770
770
|
remove: function() {
|
|
771
771
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
|
-
},
|
|
775
|
-
var e =
|
|
774
|
+
}, Zr = function() {
|
|
775
|
+
var e = Xr();
|
|
776
776
|
return function(t, r) {
|
|
777
777
|
s.useEffect(function() {
|
|
778
778
|
return e.add(t), function() {
|
|
@@ -780,36 +780,36 @@ var qr = function() {
|
|
|
780
780
|
};
|
|
781
781
|
}, [t && r]);
|
|
782
782
|
};
|
|
783
|
-
},
|
|
784
|
-
var e =
|
|
783
|
+
}, yt = function() {
|
|
784
|
+
var e = Zr(), t = function(r) {
|
|
785
785
|
var o = r.styles, a = r.dynamic;
|
|
786
786
|
return e(o, a), null;
|
|
787
787
|
};
|
|
788
788
|
return t;
|
|
789
|
-
},
|
|
789
|
+
}, Qr = {
|
|
790
790
|
left: 0,
|
|
791
791
|
top: 0,
|
|
792
792
|
right: 0,
|
|
793
793
|
gap: 0
|
|
794
794
|
}, me = function(e) {
|
|
795
795
|
return parseInt(e || "", 10) || 0;
|
|
796
|
-
},
|
|
796
|
+
}, Jr = function(e) {
|
|
797
797
|
var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
798
798
|
return [me(r), me(o), me(a)];
|
|
799
|
-
},
|
|
799
|
+
}, en = function(e) {
|
|
800
800
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
801
|
-
return
|
|
802
|
-
var t =
|
|
801
|
+
return Qr;
|
|
802
|
+
var t = Jr(e), r = document.documentElement.clientWidth, o = window.innerWidth;
|
|
803
803
|
return {
|
|
804
804
|
left: t[0],
|
|
805
805
|
top: t[1],
|
|
806
806
|
right: t[2],
|
|
807
807
|
gap: Math.max(0, o - r + t[2] - t[0])
|
|
808
808
|
};
|
|
809
|
-
},
|
|
809
|
+
}, tn = yt(), H = "data-scroll-locked", rn = function(e, t, r, o) {
|
|
810
810
|
var a = e.left, n = e.top, u = e.right, i = e.gap;
|
|
811
811
|
return r === void 0 && (r = "margin"), `
|
|
812
|
-
.`.concat(
|
|
812
|
+
.`.concat(Fr, ` {
|
|
813
813
|
overflow: hidden `).concat(o, `;
|
|
814
814
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
815
815
|
}
|
|
@@ -847,26 +847,26 @@ var qr = function() {
|
|
|
847
847
|
}
|
|
848
848
|
|
|
849
849
|
body[`).concat(H, `] {
|
|
850
|
-
`).concat(
|
|
850
|
+
`).concat(jr, ": ").concat(i, `px;
|
|
851
851
|
}
|
|
852
852
|
`);
|
|
853
|
-
},
|
|
853
|
+
}, ke = function() {
|
|
854
854
|
var e = parseInt(document.body.getAttribute(H) || "0", 10);
|
|
855
855
|
return isFinite(e) ? e : 0;
|
|
856
|
-
},
|
|
856
|
+
}, nn = function() {
|
|
857
857
|
s.useEffect(function() {
|
|
858
|
-
return document.body.setAttribute(H, (
|
|
859
|
-
var e =
|
|
858
|
+
return document.body.setAttribute(H, (ke() + 1).toString()), function() {
|
|
859
|
+
var e = ke() - 1;
|
|
860
860
|
e <= 0 ? document.body.removeAttribute(H) : document.body.setAttribute(H, e.toString());
|
|
861
861
|
};
|
|
862
862
|
}, []);
|
|
863
|
-
},
|
|
863
|
+
}, on = function(e) {
|
|
864
864
|
var t = e.noRelative, r = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
865
|
-
|
|
865
|
+
nn();
|
|
866
866
|
var n = s.useMemo(function() {
|
|
867
|
-
return
|
|
867
|
+
return en(a);
|
|
868
868
|
}, [a]);
|
|
869
|
-
return s.createElement(
|
|
869
|
+
return s.createElement(tn, { styles: rn(n, !t, a, r ? "" : "!important") });
|
|
870
870
|
}, Se = !1;
|
|
871
871
|
if (typeof window < "u")
|
|
872
872
|
try {
|
|
@@ -879,61 +879,61 @@ if (typeof window < "u")
|
|
|
879
879
|
} catch {
|
|
880
880
|
Se = !1;
|
|
881
881
|
}
|
|
882
|
-
var
|
|
882
|
+
var B = Se ? { passive: !1 } : !1, an = function(e) {
|
|
883
883
|
return e.tagName === "TEXTAREA";
|
|
884
|
-
},
|
|
884
|
+
}, bt = function(e, t) {
|
|
885
885
|
if (!(e instanceof Element))
|
|
886
886
|
return !1;
|
|
887
887
|
var r = window.getComputedStyle(e);
|
|
888
888
|
return (
|
|
889
889
|
// not-not-scrollable
|
|
890
890
|
r[t] !== "hidden" && // contains scroll inside self
|
|
891
|
-
!(r.overflowY === r.overflowX && !
|
|
891
|
+
!(r.overflowY === r.overflowX && !an(e) && r[t] === "visible")
|
|
892
892
|
);
|
|
893
|
-
},
|
|
894
|
-
return
|
|
895
|
-
},
|
|
896
|
-
return
|
|
897
|
-
},
|
|
893
|
+
}, un = function(e) {
|
|
894
|
+
return bt(e, "overflowY");
|
|
895
|
+
}, sn = function(e) {
|
|
896
|
+
return bt(e, "overflowX");
|
|
897
|
+
}, We = function(e, t) {
|
|
898
898
|
var r = t.ownerDocument, o = t;
|
|
899
899
|
do {
|
|
900
900
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
901
|
-
var a =
|
|
901
|
+
var a = wt(e, o);
|
|
902
902
|
if (a) {
|
|
903
|
-
var n =
|
|
903
|
+
var n = Et(e, o), u = n[1], i = n[2];
|
|
904
904
|
if (u > i)
|
|
905
905
|
return !0;
|
|
906
906
|
}
|
|
907
907
|
o = o.parentNode;
|
|
908
908
|
} while (o && o !== r.body);
|
|
909
909
|
return !1;
|
|
910
|
-
},
|
|
910
|
+
}, cn = function(e) {
|
|
911
911
|
var t = e.scrollTop, r = e.scrollHeight, o = e.clientHeight;
|
|
912
912
|
return [
|
|
913
913
|
t,
|
|
914
914
|
r,
|
|
915
915
|
o
|
|
916
916
|
];
|
|
917
|
-
},
|
|
917
|
+
}, ln = function(e) {
|
|
918
918
|
var t = e.scrollLeft, r = e.scrollWidth, o = e.clientWidth;
|
|
919
919
|
return [
|
|
920
920
|
t,
|
|
921
921
|
r,
|
|
922
922
|
o
|
|
923
923
|
];
|
|
924
|
-
}, bt = function(e, t) {
|
|
925
|
-
return e === "v" ? on(t) : an(t);
|
|
926
924
|
}, wt = function(e, t) {
|
|
927
925
|
return e === "v" ? un(t) : sn(t);
|
|
928
|
-
},
|
|
926
|
+
}, Et = function(e, t) {
|
|
927
|
+
return e === "v" ? cn(t) : ln(t);
|
|
928
|
+
}, dn = function(e, t) {
|
|
929
929
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
930
|
-
},
|
|
931
|
-
var n =
|
|
930
|
+
}, 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, p = u > 0, v = 0, h = 0;
|
|
932
932
|
do {
|
|
933
933
|
if (!i)
|
|
934
934
|
break;
|
|
935
|
-
var g =
|
|
936
|
-
(b || _) &&
|
|
935
|
+
var g = Et(e, i), b = g[0], l = g[1], m = g[2], _ = l - m - n * b;
|
|
936
|
+
(b || _) && wt(e, i) && (v += _, h += b);
|
|
937
937
|
var w = i.parentNode;
|
|
938
938
|
i = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
939
939
|
} while (
|
|
@@ -944,26 +944,26 @@ var j = Se ? { passive: !1 } : !1, nn = function(e) {
|
|
|
944
944
|
return (p && Math.abs(v) < 1 || !p && Math.abs(h) < 1) && (c = !0), c;
|
|
945
945
|
}, J = function(e) {
|
|
946
946
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
947
|
-
},
|
|
947
|
+
}, Be = function(e) {
|
|
948
948
|
return [e.deltaX, e.deltaY];
|
|
949
949
|
}, Ue = function(e) {
|
|
950
950
|
return e && "current" in e ? e.current : e;
|
|
951
|
-
},
|
|
951
|
+
}, fn = function(e, t) {
|
|
952
952
|
return e[0] === t[0] && e[1] === t[1];
|
|
953
|
-
},
|
|
953
|
+
}, vn = function(e) {
|
|
954
954
|
return `
|
|
955
955
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
956
956
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
957
957
|
`);
|
|
958
|
-
},
|
|
959
|
-
function
|
|
960
|
-
var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(
|
|
958
|
+
}, hn = 0, U = [];
|
|
959
|
+
function mn(e) {
|
|
960
|
+
var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(hn++)[0], n = s.useState(yt)[0], u = s.useRef(e);
|
|
961
961
|
s.useEffect(function() {
|
|
962
962
|
u.current = e;
|
|
963
963
|
}, [e]), s.useEffect(function() {
|
|
964
964
|
if (e.inert) {
|
|
965
965
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
966
|
-
var l =
|
|
966
|
+
var l = Lr([e.lockRef.current], (e.shards || []).map(Ue), !0).filter(Boolean);
|
|
967
967
|
return l.forEach(function(m) {
|
|
968
968
|
return m.classList.add("allow-interactivity-".concat(a));
|
|
969
969
|
}), function() {
|
|
@@ -979,20 +979,20 @@ function vn(e) {
|
|
|
979
979
|
var _ = J(l), w = r.current, E = "deltaX" in l ? l.deltaX : w[0] - _[0], S = "deltaY" in l ? l.deltaY : w[1] - _[1], C, P = l.target, y = Math.abs(E) > Math.abs(S) ? "h" : "v";
|
|
980
980
|
if ("touches" in l && y === "h" && P.type === "range")
|
|
981
981
|
return !1;
|
|
982
|
-
var x =
|
|
982
|
+
var x = We(y, P);
|
|
983
983
|
if (!x)
|
|
984
984
|
return !0;
|
|
985
|
-
if (x ? C = y : (C = y === "v" ? "h" : "v", x =
|
|
985
|
+
if (x ? C = y : (C = y === "v" ? "h" : "v", x = We(y, P)), !x)
|
|
986
986
|
return !1;
|
|
987
987
|
if (!o.current && "changedTouches" in l && (E || S) && (o.current = C), !C)
|
|
988
988
|
return !0;
|
|
989
989
|
var R = o.current || C;
|
|
990
|
-
return
|
|
990
|
+
return pn(R, m, l, R === "h" ? E : S);
|
|
991
991
|
}, []), d = s.useCallback(function(l) {
|
|
992
992
|
var m = l;
|
|
993
993
|
if (!(!U.length || U[U.length - 1] !== n)) {
|
|
994
|
-
var _ = "deltaY" in m ?
|
|
995
|
-
return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) &&
|
|
994
|
+
var _ = "deltaY" in m ? Be(m) : J(m), w = t.current.filter(function(C) {
|
|
995
|
+
return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) && fn(C.delta, _);
|
|
996
996
|
})[0];
|
|
997
997
|
if (w && w.should) {
|
|
998
998
|
m.cancelable && m.preventDefault();
|
|
@@ -1006,7 +1006,7 @@ function vn(e) {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
}, []), c = s.useCallback(function(l, m, _, w) {
|
|
1009
|
-
var E = { name: l, delta: m, target: _, should: w, shadowParent:
|
|
1009
|
+
var E = { name: l, delta: m, target: _, should: w, shadowParent: gn(_) };
|
|
1010
1010
|
t.current.push(E), setTimeout(function() {
|
|
1011
1011
|
t.current = t.current.filter(function(S) {
|
|
1012
1012
|
return S !== E;
|
|
@@ -1015,7 +1015,7 @@ function vn(e) {
|
|
|
1015
1015
|
}, []), p = s.useCallback(function(l) {
|
|
1016
1016
|
r.current = J(l), o.current = void 0;
|
|
1017
1017
|
}, []), v = s.useCallback(function(l) {
|
|
1018
|
-
c(l.type,
|
|
1018
|
+
c(l.type, Be(l), l.target, i(l, e.lockRef.current));
|
|
1019
1019
|
}, []), h = s.useCallback(function(l) {
|
|
1020
1020
|
c(l.type, J(l), l.target, i(l, e.lockRef.current));
|
|
1021
1021
|
}, []);
|
|
@@ -1024,48 +1024,48 @@ function vn(e) {
|
|
|
1024
1024
|
onScrollCapture: v,
|
|
1025
1025
|
onWheelCapture: v,
|
|
1026
1026
|
onTouchMoveCapture: h
|
|
1027
|
-
}), document.addEventListener("wheel", d,
|
|
1027
|
+
}), document.addEventListener("wheel", d, B), document.addEventListener("touchmove", d, B), document.addEventListener("touchstart", p, B), function() {
|
|
1028
1028
|
U = U.filter(function(l) {
|
|
1029
1029
|
return l !== n;
|
|
1030
|
-
}), document.removeEventListener("wheel", d,
|
|
1030
|
+
}), document.removeEventListener("wheel", d, B), document.removeEventListener("touchmove", d, B), document.removeEventListener("touchstart", p, B);
|
|
1031
1031
|
};
|
|
1032
1032
|
}, []);
|
|
1033
1033
|
var g = e.removeScrollBar, b = e.inert;
|
|
1034
1034
|
return s.createElement(
|
|
1035
1035
|
s.Fragment,
|
|
1036
1036
|
null,
|
|
1037
|
-
b ? s.createElement(n, { styles:
|
|
1038
|
-
g ? s.createElement(
|
|
1037
|
+
b ? s.createElement(n, { styles: vn(a) }) : null,
|
|
1038
|
+
g ? s.createElement(on, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1039
1039
|
);
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function gn(e) {
|
|
1042
1042
|
for (var t = null; e !== null; )
|
|
1043
1043
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1044
1044
|
return t;
|
|
1045
1045
|
}
|
|
1046
|
-
const
|
|
1047
|
-
var
|
|
1048
|
-
return s.createElement(se, T({}, e, { ref: t, sideCar:
|
|
1046
|
+
const _n = Gr(_t, mn);
|
|
1047
|
+
var St = s.forwardRef(function(e, t) {
|
|
1048
|
+
return s.createElement(se, T({}, e, { ref: t, sideCar: _n }));
|
|
1049
1049
|
});
|
|
1050
|
-
|
|
1051
|
-
var
|
|
1050
|
+
St.classNames = se.classNames;
|
|
1051
|
+
var yn = function(e) {
|
|
1052
1052
|
if (typeof document > "u")
|
|
1053
1053
|
return null;
|
|
1054
1054
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1055
1055
|
return t.ownerDocument.body;
|
|
1056
|
-
}, V = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, ge = 0,
|
|
1057
|
-
return e && (e.host ||
|
|
1058
|
-
},
|
|
1056
|
+
}, V = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, ge = 0, Ct = function(e) {
|
|
1057
|
+
return e && (e.host || Ct(e.parentNode));
|
|
1058
|
+
}, bn = function(e, t) {
|
|
1059
1059
|
return t.map(function(r) {
|
|
1060
1060
|
if (e.contains(r))
|
|
1061
1061
|
return r;
|
|
1062
|
-
var o =
|
|
1062
|
+
var o = Ct(r);
|
|
1063
1063
|
return o && e.contains(o) ? o : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
|
|
1064
1064
|
}).filter(function(r) {
|
|
1065
1065
|
return !!r;
|
|
1066
1066
|
});
|
|
1067
|
-
},
|
|
1068
|
-
var a =
|
|
1067
|
+
}, wn = function(e, t, r, o) {
|
|
1068
|
+
var a = bn(t, Array.isArray(e) ? e : [e]);
|
|
1069
1069
|
te[r] || (te[r] = /* @__PURE__ */ new WeakMap());
|
|
1070
1070
|
var n = te[r], u = [], i = /* @__PURE__ */ new Set(), d = new Set(a), c = function(v) {
|
|
1071
1071
|
!v || i.has(v) || (i.add(v), c(v.parentNode));
|
|
@@ -1090,13 +1090,13 @@ var gn = function(e) {
|
|
|
1090
1090
|
V.set(v, h), n.set(v, g), h || (ee.has(v) || v.removeAttribute(o), ee.delete(v)), g || v.removeAttribute(r);
|
|
1091
1091
|
}), ge--, ge || (V = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {});
|
|
1092
1092
|
};
|
|
1093
|
-
},
|
|
1093
|
+
}, En = function(e, t, r) {
|
|
1094
1094
|
r === void 0 && (r = "data-aria-hidden");
|
|
1095
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1096
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))),
|
|
1095
|
+
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"))), wn(o, a, r, "aria-hidden")) : function() {
|
|
1097
1097
|
return null;
|
|
1098
1098
|
};
|
|
1099
|
-
}, ce = "Dialog", [
|
|
1099
|
+
}, ce = "Dialog", [Nt] = tr(ce), [Sn, A] = Nt(ce), Pt = (e) => {
|
|
1100
1100
|
const {
|
|
1101
1101
|
__scopeDialog: t,
|
|
1102
1102
|
children: r,
|
|
@@ -1104,14 +1104,14 @@ var gn = function(e) {
|
|
|
1104
1104
|
defaultOpen: a,
|
|
1105
1105
|
onOpenChange: n,
|
|
1106
1106
|
modal: u = !0
|
|
1107
|
-
} = e, i = s.useRef(null), d = s.useRef(null), [c, p] =
|
|
1107
|
+
} = e, i = s.useRef(null), d = s.useRef(null), [c, p] = ir({
|
|
1108
1108
|
prop: o,
|
|
1109
1109
|
defaultProp: a ?? !1,
|
|
1110
1110
|
onChange: n,
|
|
1111
1111
|
caller: ce
|
|
1112
1112
|
});
|
|
1113
1113
|
return /* @__PURE__ */ f(
|
|
1114
|
-
|
|
1114
|
+
Sn,
|
|
1115
1115
|
{
|
|
1116
1116
|
scope: t,
|
|
1117
1117
|
triggerRef: i,
|
|
@@ -1127,10 +1127,10 @@ var gn = function(e) {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
);
|
|
1129
1129
|
};
|
|
1130
|
-
|
|
1131
|
-
var
|
|
1130
|
+
Pt.displayName = ce;
|
|
1131
|
+
var Ot = "DialogTrigger", Rt = s.forwardRef(
|
|
1132
1132
|
(e, t) => {
|
|
1133
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1133
|
+
const { __scopeDialog: r, ...o } = e, a = A(Ot, r), n = k(t, a.triggerRef);
|
|
1134
1134
|
return /* @__PURE__ */ f(
|
|
1135
1135
|
M.button,
|
|
1136
1136
|
{
|
|
@@ -1141,33 +1141,33 @@ var Pt = "DialogTrigger", Ot = s.forwardRef(
|
|
|
1141
1141
|
"data-state": Oe(a.open),
|
|
1142
1142
|
...o,
|
|
1143
1143
|
ref: n,
|
|
1144
|
-
onClick:
|
|
1144
|
+
onClick: F(e.onClick, a.onOpenToggle)
|
|
1145
1145
|
}
|
|
1146
1146
|
);
|
|
1147
1147
|
}
|
|
1148
1148
|
);
|
|
1149
|
-
|
|
1150
|
-
var Ne = "DialogPortal", [
|
|
1149
|
+
Rt.displayName = Ot;
|
|
1150
|
+
var Ne = "DialogPortal", [Cn, xt] = Nt(Ne, {
|
|
1151
1151
|
forceMount: void 0
|
|
1152
|
-
}),
|
|
1152
|
+
}), At = (e) => {
|
|
1153
1153
|
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = A(Ne, t);
|
|
1154
|
-
return /* @__PURE__ */ f(
|
|
1154
|
+
return /* @__PURE__ */ f(Cn, { scope: t, forceMount: r, children: s.Children.map(o, (u) => /* @__PURE__ */ f(ue, { present: r || n.open, children: /* @__PURE__ */ f(ht, { asChild: !0, container: a, children: u }) })) });
|
|
1155
1155
|
};
|
|
1156
|
-
|
|
1157
|
-
var ie = "DialogOverlay",
|
|
1156
|
+
At.displayName = Ne;
|
|
1157
|
+
var ie = "DialogOverlay", Dt = s.forwardRef(
|
|
1158
1158
|
(e, t) => {
|
|
1159
|
-
const r =
|
|
1160
|
-
return n.modal ? /* @__PURE__ */ f(ue, { present: o || n.open, children: /* @__PURE__ */ f(
|
|
1159
|
+
const r = xt(ie, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(ie, e.__scopeDialog);
|
|
1160
|
+
return n.modal ? /* @__PURE__ */ f(ue, { present: o || n.open, children: /* @__PURE__ */ f(Pn, { ...a, ref: t }) }) : null;
|
|
1161
1161
|
}
|
|
1162
1162
|
);
|
|
1163
|
-
|
|
1164
|
-
var
|
|
1163
|
+
Dt.displayName = ie;
|
|
1164
|
+
var Nn = /* @__PURE__ */ ct("DialogOverlay.RemoveScroll"), Pn = s.forwardRef(
|
|
1165
1165
|
(e, t) => {
|
|
1166
1166
|
const { __scopeDialog: r, ...o } = e, a = A(ie, r);
|
|
1167
1167
|
return (
|
|
1168
1168
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1169
1169
|
// ie. when `Overlay` and `Content` are siblings
|
|
1170
|
-
/* @__PURE__ */ f(
|
|
1170
|
+
/* @__PURE__ */ f(St, { as: Nn, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1171
1171
|
M.div,
|
|
1172
1172
|
{
|
|
1173
1173
|
"data-state": Oe(a.open),
|
|
@@ -1178,46 +1178,46 @@ var Sn = /* @__PURE__ */ st("DialogOverlay.RemoveScroll"), Cn = s.forwardRef(
|
|
|
1178
1178
|
) })
|
|
1179
1179
|
);
|
|
1180
1180
|
}
|
|
1181
|
-
),
|
|
1181
|
+
), j = "DialogContent", $t = s.forwardRef(
|
|
1182
1182
|
(e, t) => {
|
|
1183
|
-
const r =
|
|
1184
|
-
return /* @__PURE__ */ f(ue, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(
|
|
1183
|
+
const r = xt(j, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(j, e.__scopeDialog);
|
|
1184
|
+
return /* @__PURE__ */ f(ue, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(On, { ...a, ref: t }) : /* @__PURE__ */ f(Rn, { ...a, ref: t }) });
|
|
1185
1185
|
}
|
|
1186
1186
|
);
|
|
1187
|
-
|
|
1188
|
-
var
|
|
1187
|
+
$t.displayName = j;
|
|
1188
|
+
var On = s.forwardRef(
|
|
1189
1189
|
(e, t) => {
|
|
1190
|
-
const r = A(
|
|
1190
|
+
const r = A(j, e.__scopeDialog), o = s.useRef(null), a = k(t, r.contentRef, o);
|
|
1191
1191
|
return s.useEffect(() => {
|
|
1192
1192
|
const n = o.current;
|
|
1193
|
-
if (n) return
|
|
1193
|
+
if (n) return En(n);
|
|
1194
1194
|
}, []), /* @__PURE__ */ f(
|
|
1195
|
-
|
|
1195
|
+
Tt,
|
|
1196
1196
|
{
|
|
1197
1197
|
...e,
|
|
1198
1198
|
ref: a,
|
|
1199
1199
|
trapFocus: r.open,
|
|
1200
1200
|
disableOutsidePointerEvents: !0,
|
|
1201
|
-
onCloseAutoFocus:
|
|
1201
|
+
onCloseAutoFocus: F(e.onCloseAutoFocus, (n) => {
|
|
1202
1202
|
var u;
|
|
1203
1203
|
n.preventDefault(), (u = r.triggerRef.current) == null || u.focus();
|
|
1204
1204
|
}),
|
|
1205
|
-
onPointerDownOutside:
|
|
1205
|
+
onPointerDownOutside: F(e.onPointerDownOutside, (n) => {
|
|
1206
1206
|
const u = n.detail.originalEvent, i = u.button === 0 && u.ctrlKey === !0;
|
|
1207
1207
|
(u.button === 2 || i) && n.preventDefault();
|
|
1208
1208
|
}),
|
|
1209
|
-
onFocusOutside:
|
|
1209
|
+
onFocusOutside: F(
|
|
1210
1210
|
e.onFocusOutside,
|
|
1211
1211
|
(n) => n.preventDefault()
|
|
1212
1212
|
)
|
|
1213
1213
|
}
|
|
1214
1214
|
);
|
|
1215
1215
|
}
|
|
1216
|
-
),
|
|
1216
|
+
), Rn = s.forwardRef(
|
|
1217
1217
|
(e, t) => {
|
|
1218
|
-
const r = A(
|
|
1218
|
+
const r = A(j, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
|
|
1219
1219
|
return /* @__PURE__ */ f(
|
|
1220
|
-
|
|
1220
|
+
Tt,
|
|
1221
1221
|
{
|
|
1222
1222
|
...e,
|
|
1223
1223
|
ref: t,
|
|
@@ -1236,12 +1236,12 @@ var Nn = s.forwardRef(
|
|
|
1236
1236
|
}
|
|
1237
1237
|
);
|
|
1238
1238
|
}
|
|
1239
|
-
),
|
|
1239
|
+
), Tt = s.forwardRef(
|
|
1240
1240
|
(e, t) => {
|
|
1241
|
-
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...u } = e, i = A(
|
|
1242
|
-
return
|
|
1241
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...u } = e, i = A(j, r), d = s.useRef(null), c = k(t, d);
|
|
1242
|
+
return Ir(), /* @__PURE__ */ $(xe, { children: [
|
|
1243
1243
|
/* @__PURE__ */ f(
|
|
1244
|
-
|
|
1244
|
+
ft,
|
|
1245
1245
|
{
|
|
1246
1246
|
asChild: !0,
|
|
1247
1247
|
loop: !0,
|
|
@@ -1249,7 +1249,7 @@ var Nn = s.forwardRef(
|
|
|
1249
1249
|
onMountAutoFocus: a,
|
|
1250
1250
|
onUnmountAutoFocus: n,
|
|
1251
1251
|
children: /* @__PURE__ */ f(
|
|
1252
|
-
|
|
1252
|
+
dt,
|
|
1253
1253
|
{
|
|
1254
1254
|
role: "dialog",
|
|
1255
1255
|
id: i.contentId,
|
|
@@ -1264,48 +1264,48 @@ var Nn = s.forwardRef(
|
|
|
1264
1264
|
}
|
|
1265
1265
|
),
|
|
1266
1266
|
/* @__PURE__ */ $(xe, { children: [
|
|
1267
|
-
/* @__PURE__ */ f(
|
|
1268
|
-
/* @__PURE__ */ f(
|
|
1267
|
+
/* @__PURE__ */ f(xn, { titleId: i.titleId }),
|
|
1268
|
+
/* @__PURE__ */ f(Dn, { contentRef: d, descriptionId: i.descriptionId })
|
|
1269
1269
|
] })
|
|
1270
1270
|
] });
|
|
1271
1271
|
}
|
|
1272
|
-
), Pe = "DialogTitle",
|
|
1272
|
+
), Pe = "DialogTitle", Mt = s.forwardRef(
|
|
1273
1273
|
(e, t) => {
|
|
1274
1274
|
const { __scopeDialog: r, ...o } = e, a = A(Pe, r);
|
|
1275
1275
|
return /* @__PURE__ */ f(M.h2, { id: a.titleId, ...o, ref: t });
|
|
1276
1276
|
}
|
|
1277
1277
|
);
|
|
1278
|
-
|
|
1279
|
-
var
|
|
1278
|
+
Mt.displayName = Pe;
|
|
1279
|
+
var It = "DialogDescription", Lt = s.forwardRef(
|
|
1280
1280
|
(e, t) => {
|
|
1281
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1281
|
+
const { __scopeDialog: r, ...o } = e, a = A(It, r);
|
|
1282
1282
|
return /* @__PURE__ */ f(M.p, { id: a.descriptionId, ...o, ref: t });
|
|
1283
1283
|
}
|
|
1284
1284
|
);
|
|
1285
|
-
|
|
1286
|
-
var
|
|
1285
|
+
Lt.displayName = It;
|
|
1286
|
+
var Ft = "DialogClose", jt = s.forwardRef(
|
|
1287
1287
|
(e, t) => {
|
|
1288
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1288
|
+
const { __scopeDialog: r, ...o } = e, a = A(Ft, r);
|
|
1289
1289
|
return /* @__PURE__ */ f(
|
|
1290
1290
|
M.button,
|
|
1291
1291
|
{
|
|
1292
1292
|
type: "button",
|
|
1293
1293
|
...o,
|
|
1294
1294
|
ref: t,
|
|
1295
|
-
onClick:
|
|
1295
|
+
onClick: F(e.onClick, () => a.onOpenChange(!1))
|
|
1296
1296
|
}
|
|
1297
1297
|
);
|
|
1298
1298
|
}
|
|
1299
1299
|
);
|
|
1300
|
-
|
|
1300
|
+
jt.displayName = Ft;
|
|
1301
1301
|
function Oe(e) {
|
|
1302
1302
|
return e ? "open" : "closed";
|
|
1303
1303
|
}
|
|
1304
|
-
var kt = "DialogTitleWarning", [
|
|
1305
|
-
contentName:
|
|
1304
|
+
var kt = "DialogTitleWarning", [zo, Wt] = er(kt, {
|
|
1305
|
+
contentName: j,
|
|
1306
1306
|
titleName: Pe,
|
|
1307
1307
|
docsSlug: "dialog"
|
|
1308
|
-
}),
|
|
1308
|
+
}), xn = ({ titleId: e }) => {
|
|
1309
1309
|
const t = Wt(kt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1310
1310
|
|
|
1311
1311
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -1314,18 +1314,18 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1314
1314
|
return s.useEffect(() => {
|
|
1315
1315
|
e && (document.getElementById(e) || console.error(r));
|
|
1316
1316
|
}, [r, e]), null;
|
|
1317
|
-
},
|
|
1318
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wt(
|
|
1317
|
+
}, An = "DialogDescriptionWarning", Dn = ({ contentRef: e, descriptionId: t }) => {
|
|
1318
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wt(An).contentName}}.`;
|
|
1319
1319
|
return s.useEffect(() => {
|
|
1320
1320
|
var n;
|
|
1321
1321
|
const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
|
|
1322
1322
|
t && a && (document.getElementById(t) || console.warn(o));
|
|
1323
1323
|
}, [o, e, t]), null;
|
|
1324
|
-
},
|
|
1325
|
-
const
|
|
1324
|
+
}, $n = Pt, Tn = Rt, Mn = At, In = Dt, Ln = $t, Fn = Mt, Ve = Lt, jn = jt;
|
|
1325
|
+
const kn = {
|
|
1326
1326
|
LG: "lg"
|
|
1327
1327
|
};
|
|
1328
|
-
function
|
|
1328
|
+
function Wn(e) {
|
|
1329
1329
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1330
1330
|
}
|
|
1331
1331
|
var He = { exports: {} };
|
|
@@ -1334,9 +1334,9 @@ var He = { exports: {} };
|
|
|
1334
1334
|
Licensed under the MIT License (MIT), see
|
|
1335
1335
|
http://jedwatson.github.io/classnames
|
|
1336
1336
|
*/
|
|
1337
|
-
var
|
|
1338
|
-
function
|
|
1339
|
-
return
|
|
1337
|
+
var Ge;
|
|
1338
|
+
function Bn() {
|
|
1339
|
+
return Ge || (Ge = 1, (function(e) {
|
|
1340
1340
|
(function() {
|
|
1341
1341
|
var t = {}.hasOwnProperty;
|
|
1342
1342
|
function r() {
|
|
@@ -1367,39 +1367,41 @@ function Wn() {
|
|
|
1367
1367
|
})();
|
|
1368
1368
|
})(He)), He.exports;
|
|
1369
1369
|
}
|
|
1370
|
-
var
|
|
1371
|
-
const
|
|
1370
|
+
var Un = Bn();
|
|
1371
|
+
const Vn = /* @__PURE__ */ Wn(Un), Hn = "_rotate_12t9p_1", Gn = "_dash_12t9p_1", zn = {
|
|
1372
1372
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1373
|
-
rotate:
|
|
1373
|
+
rotate: Hn,
|
|
1374
1374
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1375
1375
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1376
1376
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1377
1377
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1378
1378
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1379
1379
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1380
|
-
dash:
|
|
1380
|
+
dash: Gn,
|
|
1381
1381
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1382
1382
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1383
|
-
},
|
|
1383
|
+
}, ze = Vn.bind(zn), z = "purpur-spinner", Kn = {
|
|
1384
1384
|
SM: "sm"
|
|
1385
|
-
},
|
|
1385
|
+
}, Bt = ({
|
|
1386
1386
|
disabled: e = !1,
|
|
1387
1387
|
negative: t = !1,
|
|
1388
|
-
size: r =
|
|
1389
|
-
|
|
1390
|
-
|
|
1388
|
+
size: r = Kn.SM,
|
|
1389
|
+
className: o,
|
|
1390
|
+
...a
|
|
1391
|
+
}) => /* @__PURE__ */ f("div", { className: ze(z, `${z}--${r}`, o), ...a, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1391
1392
|
"circle",
|
|
1392
1393
|
{
|
|
1393
|
-
className:
|
|
1394
|
-
[`${
|
|
1395
|
-
[`${
|
|
1394
|
+
className: ze(`${z}__circle`, {
|
|
1395
|
+
[`${z}__circle--disabled`]: e,
|
|
1396
|
+
[`${z}__circle--negative`]: t
|
|
1396
1397
|
}),
|
|
1397
1398
|
cx: "25",
|
|
1398
1399
|
cy: "25",
|
|
1399
1400
|
r: "20"
|
|
1400
1401
|
}
|
|
1401
1402
|
) }) });
|
|
1402
|
-
|
|
1403
|
+
Bt.displayName = "Spinner";
|
|
1404
|
+
function qn(e) {
|
|
1403
1405
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1404
1406
|
}
|
|
1405
1407
|
var Ke = { exports: {} };
|
|
@@ -1409,7 +1411,7 @@ var Ke = { exports: {} };
|
|
|
1409
1411
|
http://jedwatson.github.io/classnames
|
|
1410
1412
|
*/
|
|
1411
1413
|
var qe;
|
|
1412
|
-
function
|
|
1414
|
+
function Yn() {
|
|
1413
1415
|
return qe || (qe = 1, (function(e) {
|
|
1414
1416
|
(function() {
|
|
1415
1417
|
var t = {}.hasOwnProperty;
|
|
@@ -1441,30 +1443,31 @@ function qn() {
|
|
|
1441
1443
|
})();
|
|
1442
1444
|
})(Ke)), Ke.exports;
|
|
1443
1445
|
}
|
|
1444
|
-
var
|
|
1445
|
-
const
|
|
1446
|
-
"purpur-button": "_purpur-
|
|
1447
|
-
"purpur-button--xs": "_purpur-button--
|
|
1448
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
1449
|
-
"purpur-button--sm": "_purpur-button--
|
|
1450
|
-
"purpur-button--md": "_purpur-button--
|
|
1451
|
-
"purpur-button--lg": "_purpur-button--
|
|
1452
|
-
"purpur-button--full-width": "_purpur-button--full-
|
|
1453
|
-
"purpur-button--primary": "_purpur-button--
|
|
1454
|
-
"purpur-button--disabled": "_purpur-button--
|
|
1455
|
-
"purpur-button--primary-negative": "_purpur-button--primary-
|
|
1456
|
-
"purpur-button--secondary": "_purpur-button--
|
|
1457
|
-
"purpur-button--secondary-negative": "_purpur-button--secondary-
|
|
1458
|
-
"purpur-button--expressive": "_purpur-button--
|
|
1459
|
-
"purpur-button--expressive-negative": "_purpur-button--expressive-
|
|
1460
|
-
"purpur-button--negative": "_purpur-button--
|
|
1461
|
-
"purpur-button--destructive": "_purpur-button--
|
|
1462
|
-
"purpur-button--destructive-negative": "_purpur-button--destructive-
|
|
1463
|
-
"purpur-button--tertiary-purple": "_purpur-button--tertiary-
|
|
1464
|
-
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-
|
|
1465
|
-
"purpur-button--text-negative": "_purpur-button--text-
|
|
1466
|
-
"purpur-button--text": "_purpur-button--
|
|
1467
|
-
|
|
1446
|
+
var Xn = Yn();
|
|
1447
|
+
const Zn = /* @__PURE__ */ qn(Xn), Qn = {
|
|
1448
|
+
"purpur-button": "_purpur-button_10jh0_1",
|
|
1449
|
+
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
1450
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
1451
|
+
"purpur-button--sm": "_purpur-button--sm_10jh0_28",
|
|
1452
|
+
"purpur-button--md": "_purpur-button--md_10jh0_34",
|
|
1453
|
+
"purpur-button--lg": "_purpur-button--lg_10jh0_40",
|
|
1454
|
+
"purpur-button--full-width": "_purpur-button--full-width_10jh0_46",
|
|
1455
|
+
"purpur-button--primary": "_purpur-button--primary_10jh0_64",
|
|
1456
|
+
"purpur-button--disabled": "_purpur-button--disabled_10jh0_68",
|
|
1457
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_10jh0_74",
|
|
1458
|
+
"purpur-button--secondary": "_purpur-button--secondary_10jh0_86",
|
|
1459
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_10jh0_97",
|
|
1460
|
+
"purpur-button--expressive": "_purpur-button--expressive_10jh0_108",
|
|
1461
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_10jh0_118",
|
|
1462
|
+
"purpur-button--negative": "_purpur-button--negative_10jh0_130",
|
|
1463
|
+
"purpur-button--destructive": "_purpur-button--destructive_10jh0_137",
|
|
1464
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_10jh0_147",
|
|
1465
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_10jh0_157",
|
|
1466
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_10jh0_170",
|
|
1467
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
1468
|
+
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
1469
|
+
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
1470
|
+
}, Ye = Zn.bind(Qn), I = "purpur-button", Ut = Ce(
|
|
1468
1471
|
({
|
|
1469
1472
|
children: e,
|
|
1470
1473
|
className: t,
|
|
@@ -1481,17 +1484,17 @@ const Xn = /* @__PURE__ */ Kn(Yn), Zn = {
|
|
|
1481
1484
|
}, h) => {
|
|
1482
1485
|
if (a && c === "destructive")
|
|
1483
1486
|
return null;
|
|
1484
|
-
const g =
|
|
1487
|
+
const g = Ye(
|
|
1485
1488
|
[
|
|
1486
|
-
|
|
1487
|
-
`${
|
|
1488
|
-
`${
|
|
1489
|
+
I,
|
|
1490
|
+
`${I}--${u ? `${c}-negative` : c}`,
|
|
1491
|
+
`${I}--${d}`
|
|
1489
1492
|
],
|
|
1490
1493
|
{
|
|
1491
|
-
[`${
|
|
1492
|
-
[`${
|
|
1493
|
-
[`${
|
|
1494
|
-
[`${
|
|
1494
|
+
[`${I}--icon-only`]: a,
|
|
1495
|
+
[`${I}--negative`]: u,
|
|
1496
|
+
[`${I}--full-width`]: o,
|
|
1497
|
+
[`${I}--disabled`]: r || n
|
|
1495
1498
|
},
|
|
1496
1499
|
t
|
|
1497
1500
|
), b = (m) => {
|
|
@@ -1508,11 +1511,12 @@ const Xn = /* @__PURE__ */ Kn(Yn), Zn = {
|
|
|
1508
1511
|
...v,
|
|
1509
1512
|
children: [
|
|
1510
1513
|
n && /* @__PURE__ */ f(
|
|
1511
|
-
|
|
1514
|
+
Bt,
|
|
1512
1515
|
{
|
|
1513
|
-
size: d ===
|
|
1516
|
+
size: d === kn.LG ? "xs" : "xxs",
|
|
1514
1517
|
negative: u,
|
|
1515
|
-
disabled: l
|
|
1518
|
+
disabled: l,
|
|
1519
|
+
className: Ye(`${I}__spinner`)
|
|
1516
1520
|
}
|
|
1517
1521
|
),
|
|
1518
1522
|
" ",
|
|
@@ -1522,19 +1526,19 @@ const Xn = /* @__PURE__ */ Kn(Yn), Zn = {
|
|
|
1522
1526
|
);
|
|
1523
1527
|
}
|
|
1524
1528
|
);
|
|
1525
|
-
|
|
1529
|
+
Ut.displayName = "Button";
|
|
1526
1530
|
function Jn(e) {
|
|
1527
1531
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1528
1532
|
}
|
|
1529
|
-
var
|
|
1533
|
+
var Xe = { exports: {} };
|
|
1530
1534
|
/*!
|
|
1531
1535
|
Copyright (c) 2018 Jed Watson.
|
|
1532
1536
|
Licensed under the MIT License (MIT), see
|
|
1533
1537
|
http://jedwatson.github.io/classnames
|
|
1534
1538
|
*/
|
|
1535
|
-
var
|
|
1539
|
+
var Ze;
|
|
1536
1540
|
function eo() {
|
|
1537
|
-
return
|
|
1541
|
+
return Ze || (Ze = 1, (function(e) {
|
|
1538
1542
|
(function() {
|
|
1539
1543
|
var t = {}.hasOwnProperty;
|
|
1540
1544
|
function r() {
|
|
@@ -1563,7 +1567,7 @@ function eo() {
|
|
|
1563
1567
|
}
|
|
1564
1568
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1565
1569
|
})();
|
|
1566
|
-
})(
|
|
1570
|
+
})(Xe)), Xe.exports;
|
|
1567
1571
|
}
|
|
1568
1572
|
var to = eo();
|
|
1569
1573
|
const ro = /* @__PURE__ */ Jn(to), re = {
|
|
@@ -1588,7 +1592,7 @@ const ro = /* @__PURE__ */ Jn(to), re = {
|
|
|
1588
1592
|
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
1589
1593
|
}, no = {
|
|
1590
1594
|
TITLE100: "title-100"
|
|
1591
|
-
}, ne = "purpur-heading",
|
|
1595
|
+
}, ne = "purpur-heading", Vt = ({
|
|
1592
1596
|
children: e,
|
|
1593
1597
|
className: t = "",
|
|
1594
1598
|
enableHyphenation: r = !1,
|
|
@@ -1608,19 +1612,19 @@ const ro = /* @__PURE__ */ Jn(to), re = {
|
|
|
1608
1612
|
]);
|
|
1609
1613
|
return /* @__PURE__ */ f(i, { className: d, ...u, children: e });
|
|
1610
1614
|
};
|
|
1611
|
-
|
|
1615
|
+
Vt.displayName = "Heading";
|
|
1612
1616
|
function oo(e) {
|
|
1613
1617
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1614
1618
|
}
|
|
1615
|
-
var
|
|
1619
|
+
var Qe = { exports: {} };
|
|
1616
1620
|
/*!
|
|
1617
1621
|
Copyright (c) 2018 Jed Watson.
|
|
1618
1622
|
Licensed under the MIT License (MIT), see
|
|
1619
1623
|
http://jedwatson.github.io/classnames
|
|
1620
1624
|
*/
|
|
1621
|
-
var
|
|
1625
|
+
var Je;
|
|
1622
1626
|
function ao() {
|
|
1623
|
-
return
|
|
1627
|
+
return Je || (Je = 1, (function(e) {
|
|
1624
1628
|
(function() {
|
|
1625
1629
|
var t = {}.hasOwnProperty;
|
|
1626
1630
|
function r() {
|
|
@@ -1649,7 +1653,7 @@ function ao() {
|
|
|
1649
1653
|
}
|
|
1650
1654
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1651
1655
|
})();
|
|
1652
|
-
})(
|
|
1656
|
+
})(Qe)), Qe.exports;
|
|
1653
1657
|
}
|
|
1654
1658
|
var io = ao();
|
|
1655
1659
|
const uo = /* @__PURE__ */ oo(io), so = {
|
|
@@ -1660,7 +1664,7 @@ const uo = /* @__PURE__ */ oo(io), so = {
|
|
|
1660
1664
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1661
1665
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1662
1666
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1663
|
-
}, co = uo.bind(so),
|
|
1667
|
+
}, co = uo.bind(so), et = "purpur-icon", lo = "md", po = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), fo = ({ content: e = "", title: t } = {}) => {
|
|
1664
1668
|
const r = [
|
|
1665
1669
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1666
1670
|
{ name: "fill", value: "currentColor" },
|
|
@@ -1668,33 +1672,33 @@ const uo = /* @__PURE__ */ oo(io), so = {
|
|
|
1668
1672
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1669
1673
|
], o = t ? `<title>${t}</title>` : "";
|
|
1670
1674
|
return `<svg ${po(r)}>${o}${e}</svg>`;
|
|
1671
|
-
}, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
1675
|
+
}, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ht = ({ svg: e, allyTitle: t, className: r, size: o = lo, ...a }) => {
|
|
1672
1676
|
const n = fo({
|
|
1673
1677
|
content: vo(e.svg),
|
|
1674
1678
|
title: t
|
|
1675
|
-
}), u = co(r,
|
|
1679
|
+
}), u = co(r, et, `${et}--${o}`);
|
|
1676
1680
|
return /* @__PURE__ */ f("span", { className: u, dangerouslySetInnerHTML: { __html: n }, ...a });
|
|
1677
1681
|
};
|
|
1678
|
-
|
|
1682
|
+
Ht.displayName = "Icon";
|
|
1679
1683
|
const ho = {
|
|
1680
1684
|
name: "close",
|
|
1681
1685
|
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>',
|
|
1682
1686
|
keywords: ["close"],
|
|
1683
1687
|
category: "utility"
|
|
1684
|
-
},
|
|
1685
|
-
|
|
1688
|
+
}, Gt = (e) => /* @__PURE__ */ f(Ht, { ...e, svg: ho });
|
|
1689
|
+
Gt.displayName = "IconClose";
|
|
1686
1690
|
function mo(e) {
|
|
1687
1691
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1688
1692
|
}
|
|
1689
|
-
var
|
|
1693
|
+
var tt = { exports: {} };
|
|
1690
1694
|
/*!
|
|
1691
1695
|
Copyright (c) 2018 Jed Watson.
|
|
1692
1696
|
Licensed under the MIT License (MIT), see
|
|
1693
1697
|
http://jedwatson.github.io/classnames
|
|
1694
1698
|
*/
|
|
1695
|
-
var
|
|
1699
|
+
var rt;
|
|
1696
1700
|
function go() {
|
|
1697
|
-
return
|
|
1701
|
+
return rt || (rt = 1, (function(e) {
|
|
1698
1702
|
(function() {
|
|
1699
1703
|
var t = {}.hasOwnProperty;
|
|
1700
1704
|
function r() {
|
|
@@ -1723,7 +1727,7 @@ function go() {
|
|
|
1723
1727
|
}
|
|
1724
1728
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1725
1729
|
})();
|
|
1726
|
-
})(
|
|
1730
|
+
})(tt)), tt.exports;
|
|
1727
1731
|
}
|
|
1728
1732
|
var _o = go();
|
|
1729
1733
|
const yo = /* @__PURE__ */ mo(_o), bo = {
|
|
@@ -1743,7 +1747,7 @@ const yo = /* @__PURE__ */ mo(_o), bo = {
|
|
|
1743
1747
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
1744
1748
|
}, wo = yo.bind(bo), Eo = {
|
|
1745
1749
|
PARAGRAPH100: "paragraph-100"
|
|
1746
|
-
}, K = "purpur-paragraph",
|
|
1750
|
+
}, K = "purpur-paragraph", zt = ({
|
|
1747
1751
|
children: e,
|
|
1748
1752
|
className: t,
|
|
1749
1753
|
disabled: r,
|
|
@@ -1759,8 +1763,8 @@ const yo = /* @__PURE__ */ mo(_o), bo = {
|
|
|
1759
1763
|
});
|
|
1760
1764
|
return /* @__PURE__ */ f("p", { ...u, className: i, children: e });
|
|
1761
1765
|
};
|
|
1762
|
-
|
|
1763
|
-
function
|
|
1766
|
+
zt.displayName = "Paragraph";
|
|
1767
|
+
function nt(e, t) {
|
|
1764
1768
|
if (typeof e == "function")
|
|
1765
1769
|
return e(t);
|
|
1766
1770
|
e != null && (e.current = t);
|
|
@@ -1769,14 +1773,14 @@ function So(...e) {
|
|
|
1769
1773
|
return (t) => {
|
|
1770
1774
|
let r = !1;
|
|
1771
1775
|
const o = e.map((a) => {
|
|
1772
|
-
const n =
|
|
1776
|
+
const n = nt(a, t);
|
|
1773
1777
|
return !r && typeof n == "function" && (r = !0), n;
|
|
1774
1778
|
});
|
|
1775
1779
|
if (r)
|
|
1776
1780
|
return () => {
|
|
1777
1781
|
for (let a = 0; a < o.length; a++) {
|
|
1778
1782
|
const n = o[a];
|
|
1779
|
-
typeof n == "function" ? n() :
|
|
1783
|
+
typeof n == "function" ? n() : nt(e[a], null);
|
|
1780
1784
|
}
|
|
1781
1785
|
};
|
|
1782
1786
|
};
|
|
@@ -1847,7 +1851,7 @@ var Ao = [
|
|
|
1847
1851
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(d, { ...i, ref: n });
|
|
1848
1852
|
});
|
|
1849
1853
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
1850
|
-
}, {}), $o = "VisuallyHidden",
|
|
1854
|
+
}, {}), $o = "VisuallyHidden", Kt = s.forwardRef(
|
|
1851
1855
|
(e, t) => /* @__PURE__ */ f(
|
|
1852
1856
|
Do.span,
|
|
1853
1857
|
{
|
|
@@ -1870,8 +1874,8 @@ var Ao = [
|
|
|
1870
1874
|
}
|
|
1871
1875
|
)
|
|
1872
1876
|
);
|
|
1873
|
-
|
|
1874
|
-
var To =
|
|
1877
|
+
Kt.displayName = $o;
|
|
1878
|
+
var To = Kt;
|
|
1875
1879
|
const Mo = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(To, { asChild: e, ...r, children: t });
|
|
1876
1880
|
function Io(e) {
|
|
1877
1881
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -1882,9 +1886,9 @@ var _e = { exports: {} };
|
|
|
1882
1886
|
Licensed under the MIT License (MIT), see
|
|
1883
1887
|
http://jedwatson.github.io/classnames
|
|
1884
1888
|
*/
|
|
1885
|
-
var
|
|
1889
|
+
var ot;
|
|
1886
1890
|
function Lo() {
|
|
1887
|
-
return
|
|
1891
|
+
return ot || (ot = 1, (function(e) {
|
|
1888
1892
|
(function() {
|
|
1889
1893
|
var t = {}.hasOwnProperty;
|
|
1890
1894
|
function r() {
|
|
@@ -1916,9 +1920,9 @@ function Lo() {
|
|
|
1916
1920
|
})(_e)), _e.exports;
|
|
1917
1921
|
}
|
|
1918
1922
|
var Fo = Lo();
|
|
1919
|
-
const
|
|
1923
|
+
const jo = /* @__PURE__ */ Io(Fo), ko = "_fadeIn_4aird_1", Wo = {
|
|
1920
1924
|
"purpur-modal-content": "_purpur-modal-content_4aird_1",
|
|
1921
|
-
fadeIn:
|
|
1925
|
+
fadeIn: ko,
|
|
1922
1926
|
"purpur-modal-content__overlay": "_purpur-modal-content__overlay_4aird_30",
|
|
1923
1927
|
"purpur-modal-content__close-button": "_purpur-modal-content__close-button_4aird_37",
|
|
1924
1928
|
"purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_4aird_47",
|
|
@@ -1936,7 +1940,7 @@ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
|
|
|
1936
1940
|
"purpur-modal-content__actions": "_purpur-modal-content__actions_4aird_123",
|
|
1937
1941
|
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_4aird_175",
|
|
1938
1942
|
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_4aird_185"
|
|
1939
|
-
},
|
|
1943
|
+
}, at = (e) => e.showCloseButton === !0, O = jo.bind(Wo), N = "purpur-modal-content", Bo = Ce(
|
|
1940
1944
|
({
|
|
1941
1945
|
["data-testid"]: e,
|
|
1942
1946
|
actions: t,
|
|
@@ -1959,16 +1963,16 @@ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
|
|
|
1959
1963
|
{ [`${N}--overflow`]: w },
|
|
1960
1964
|
{ [`${N}--sticky-footer`]: d },
|
|
1961
1965
|
o
|
|
1962
|
-
), R = (D) => e ? `${e} ${D}` : void 0,
|
|
1966
|
+
), R = (D) => e ? `${e} ${D}` : void 0, G = (D) => {
|
|
1963
1967
|
n && D.preventDefault();
|
|
1964
|
-
},
|
|
1968
|
+
}, W = Zt(() => {
|
|
1965
1969
|
if (!P.current || !y.current)
|
|
1966
1970
|
return;
|
|
1967
|
-
const D = window.getComputedStyle(P.current, null), X = parseFloat(D.getPropertyValue("height")),
|
|
1968
|
-
E(X <
|
|
1971
|
+
const D = window.getComputedStyle(P.current, null), X = parseFloat(D.getPropertyValue("height")), Xt = y.current.offsetHeight;
|
|
1972
|
+
E(X < Xt), C(
|
|
1969
1973
|
(P.current.offsetWidth ?? 0) - (P.current.clientWidth ?? 0)
|
|
1970
1974
|
);
|
|
1971
|
-
}, []),
|
|
1975
|
+
}, []), qt = () => {
|
|
1972
1976
|
const D = y.current;
|
|
1973
1977
|
if (D) {
|
|
1974
1978
|
const X = D.querySelector("h2");
|
|
@@ -1976,34 +1980,34 @@ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
|
|
|
1976
1980
|
X.focus();
|
|
1977
1981
|
});
|
|
1978
1982
|
}
|
|
1979
|
-
},
|
|
1983
|
+
}, Yt = (D) => {
|
|
1980
1984
|
n && !m && D.preventDefault();
|
|
1981
1985
|
};
|
|
1982
|
-
return we(() => (window.addEventListener("resize",
|
|
1983
|
-
window.removeEventListener("resize",
|
|
1984
|
-
}), [
|
|
1985
|
-
|
|
1986
|
-
}, [p, r,
|
|
1987
|
-
/* @__PURE__ */ f(
|
|
1986
|
+
return we(() => (window.addEventListener("resize", W), () => {
|
|
1987
|
+
window.removeEventListener("resize", W);
|
|
1988
|
+
}), [W]), we(() => {
|
|
1989
|
+
W();
|
|
1990
|
+
}, [p, r, W]), /* @__PURE__ */ $(Mn, { children: [
|
|
1991
|
+
/* @__PURE__ */ f(In, { className: O(`${N}__overlay`), style: { zIndex: v } }),
|
|
1988
1992
|
/* @__PURE__ */ $(
|
|
1989
|
-
|
|
1993
|
+
Ln,
|
|
1990
1994
|
{
|
|
1991
1995
|
..._,
|
|
1992
1996
|
className: x,
|
|
1993
1997
|
"data-testid": e,
|
|
1994
1998
|
ref: b,
|
|
1995
1999
|
...!a && { "aria-describedby": void 0 },
|
|
1996
|
-
onPointerDownOutside:
|
|
2000
|
+
onPointerDownOutside: G,
|
|
1997
2001
|
onOpenAutoFocus: () => {
|
|
1998
|
-
|
|
2002
|
+
W(), qt();
|
|
1999
2003
|
},
|
|
2000
|
-
onEscapeKeyDown:
|
|
2004
|
+
onEscapeKeyDown: Yt,
|
|
2001
2005
|
onCloseAutoFocus: h,
|
|
2002
2006
|
style: { zIndex: `calc(${v} + 1)` },
|
|
2003
2007
|
children: [
|
|
2004
2008
|
/* @__PURE__ */ $("div", { ref: P, className: O(`${N}__wrapper`), children: [
|
|
2005
|
-
|
|
2006
|
-
|
|
2009
|
+
at(g) && l && i && /* @__PURE__ */ f(
|
|
2010
|
+
it,
|
|
2007
2011
|
{
|
|
2008
2012
|
"aria-label": l,
|
|
2009
2013
|
hasImage: !0,
|
|
@@ -2013,20 +2017,20 @@ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
|
|
|
2013
2017
|
),
|
|
2014
2018
|
/* @__PURE__ */ $("div", { ref: y, className: O(`${N}__wrapper-inner`), children: [
|
|
2015
2019
|
/* @__PURE__ */ $("div", { className: O(`${N}__header`), children: [
|
|
2016
|
-
|
|
2017
|
-
|
|
2020
|
+
at(g) && l && !i && /* @__PURE__ */ f(
|
|
2021
|
+
it,
|
|
2018
2022
|
{
|
|
2019
2023
|
"aria-label": l,
|
|
2020
2024
|
"data-testid": R("close-button")
|
|
2021
2025
|
}
|
|
2022
2026
|
),
|
|
2023
2027
|
/* @__PURE__ */ f(
|
|
2024
|
-
|
|
2028
|
+
Fn,
|
|
2025
2029
|
{
|
|
2026
2030
|
asChild: !0,
|
|
2027
2031
|
className: O(`${N}__title`),
|
|
2028
2032
|
"data-testid": R("title"),
|
|
2029
|
-
children: /* @__PURE__ */ f(
|
|
2033
|
+
children: /* @__PURE__ */ f(Vt, { tag: "h2", variant: "title-200", tabIndex: -1, children: c })
|
|
2030
2034
|
}
|
|
2031
2035
|
)
|
|
2032
2036
|
] }),
|
|
@@ -2046,27 +2050,27 @@ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
|
|
|
2046
2050
|
asChild: !0,
|
|
2047
2051
|
className: O(`${N}__description`),
|
|
2048
2052
|
"data-testid": R("description"),
|
|
2049
|
-
children: /* @__PURE__ */ f(
|
|
2053
|
+
children: /* @__PURE__ */ f(zt, { variant: "paragraph-100", children: a })
|
|
2050
2054
|
}
|
|
2051
2055
|
),
|
|
2052
2056
|
/* @__PURE__ */ f("div", { children: r }),
|
|
2053
|
-
!d && /* @__PURE__ */ f(
|
|
2057
|
+
!d && /* @__PURE__ */ f(ut, { actions: t, notification: p })
|
|
2054
2058
|
] }) })
|
|
2055
2059
|
] })
|
|
2056
2060
|
] }),
|
|
2057
|
-
d && /* @__PURE__ */ f(
|
|
2061
|
+
d && /* @__PURE__ */ f(ut, { actions: t, notification: p })
|
|
2058
2062
|
]
|
|
2059
2063
|
}
|
|
2060
2064
|
)
|
|
2061
2065
|
] });
|
|
2062
2066
|
}
|
|
2063
|
-
),
|
|
2067
|
+
), it = ({
|
|
2064
2068
|
["aria-label"]: e,
|
|
2065
2069
|
hasImage: t,
|
|
2066
2070
|
scrollbarWidth: r,
|
|
2067
2071
|
["data-testid"]: o
|
|
2068
|
-
}) => /* @__PURE__ */ f(
|
|
2069
|
-
|
|
2072
|
+
}) => /* @__PURE__ */ f(jn, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2073
|
+
Ut,
|
|
2070
2074
|
{
|
|
2071
2075
|
variant: t ? "primary" : "tertiary-purple",
|
|
2072
2076
|
negative: t,
|
|
@@ -2076,9 +2080,9 @@ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
|
|
|
2076
2080
|
className: O(`${N}__close-button`),
|
|
2077
2081
|
style: { right: `calc(var(--purpur-spacing-100) + ${r || 0}px)` },
|
|
2078
2082
|
"data-testid": o,
|
|
2079
|
-
children: /* @__PURE__ */ f(
|
|
2083
|
+
children: /* @__PURE__ */ f(Gt, {})
|
|
2080
2084
|
}
|
|
2081
|
-
) }),
|
|
2085
|
+
) }), ut = ({
|
|
2082
2086
|
actions: e,
|
|
2083
2087
|
notification: t
|
|
2084
2088
|
}) => {
|
|
@@ -2092,15 +2096,15 @@ const ko = /* @__PURE__ */ Io(Fo), Wo = "_fadeIn_4aird_1", Bo = {
|
|
|
2092
2096
|
/* @__PURE__ */ f("span", { className: O(`${N}__actions-separator`) })
|
|
2093
2097
|
] }) : null;
|
|
2094
2098
|
}, Uo = Ce(
|
|
2095
|
-
({ children: e, ...t }, r) => /* @__PURE__ */ f(
|
|
2099
|
+
({ children: e, ...t }, r) => /* @__PURE__ */ f(Tn, { asChild: !0, ref: r, ...t, children: e })
|
|
2096
2100
|
), Re = ({
|
|
2097
2101
|
["data-testid"]: e,
|
|
2098
2102
|
children: t,
|
|
2099
2103
|
open: r,
|
|
2100
2104
|
onOpenChange: o
|
|
2101
|
-
}) => /* @__PURE__ */ f(
|
|
2105
|
+
}) => /* @__PURE__ */ f($n, { open: r, onOpenChange: o, "data-testid": e, children: t });
|
|
2102
2106
|
Re.Trigger = Uo;
|
|
2103
|
-
Re.Content =
|
|
2107
|
+
Re.Content = Bo;
|
|
2104
2108
|
Re.displayName = "Modal";
|
|
2105
2109
|
export {
|
|
2106
2110
|
Re as Modal
|