@purpurds/modal 5.1.1 → 5.2.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 +6 -6
- package/dist/modal-content.d.ts +6 -2
- package/dist/modal-content.d.ts.map +1 -1
- package/dist/modal.cjs.js +20 -20
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.es.js +647 -623
- package/dist/modal.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -8
- package/src/modal-content.module.scss +8 -0
- package/src/modal-content.stories.tsx +43 -0
- package/src/modal-content.test.tsx +15 -1
- package/src/modal-content.tsx +39 -14
package/dist/modal.es.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as U, jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
return
|
|
3
|
+
import { useCallback as J, createContext as Oe, useMemo as ge, createElement as g, useContext as nt, useLayoutEffect as Dt, useRef as C, useEffect as A, useState as K, forwardRef as S, Children as D, isValidElement as z, cloneElement as ue, Fragment as Re, useReducer as It } from "react";
|
|
4
|
+
import Rt, { flushSync as rt } from "react-dom";
|
|
5
|
+
function N() {
|
|
6
|
+
return N = Object.assign ? Object.assign.bind() : function(e) {
|
|
7
7
|
for (var n = 1; n < arguments.length; n++) {
|
|
8
8
|
var t = arguments[n];
|
|
9
9
|
for (var o in t)
|
|
10
10
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
11
11
|
}
|
|
12
12
|
return e;
|
|
13
|
-
},
|
|
13
|
+
}, N.apply(this, arguments);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function W(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
16
16
|
return function(a) {
|
|
17
17
|
if (e == null || e(a), t === !1 || !a.defaultPrevented)
|
|
18
18
|
return n == null ? void 0 : n(a);
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Mt(e, n) {
|
|
22
22
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ot(...e) {
|
|
25
25
|
return (n) => e.forEach(
|
|
26
|
-
(t) =>
|
|
26
|
+
(t) => Mt(t, n)
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function ee(...e) {
|
|
30
|
+
return J(ot(...e), e);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function kt(e, n = []) {
|
|
33
33
|
let t = [];
|
|
34
34
|
function o(r, i) {
|
|
35
|
-
const u = /* @__PURE__ */
|
|
35
|
+
const u = /* @__PURE__ */ Oe(i), s = t.length;
|
|
36
36
|
t = [
|
|
37
37
|
...t,
|
|
38
38
|
i
|
|
39
39
|
];
|
|
40
40
|
function d(l) {
|
|
41
|
-
const { scope:
|
|
42
|
-
() =>
|
|
43
|
-
Object.values(
|
|
41
|
+
const { scope: f, children: v, ...$ } = l, c = (f == null ? void 0 : f[e][s]) || u, h = ge(
|
|
42
|
+
() => $,
|
|
43
|
+
Object.values($)
|
|
44
44
|
);
|
|
45
45
|
return /* @__PURE__ */ g(c.Provider, {
|
|
46
|
-
value:
|
|
47
|
-
},
|
|
46
|
+
value: h
|
|
47
|
+
}, v);
|
|
48
48
|
}
|
|
49
|
-
function p(l,
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
49
|
+
function p(l, f) {
|
|
50
|
+
const v = (f == null ? void 0 : f[e][s]) || u, $ = nt(v);
|
|
51
|
+
if ($)
|
|
52
|
+
return $;
|
|
53
53
|
if (i !== void 0)
|
|
54
54
|
return i;
|
|
55
55
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
@@ -60,10 +60,10 @@ function Mt(e, n = []) {
|
|
|
60
60
|
];
|
|
61
61
|
}
|
|
62
62
|
const a = () => {
|
|
63
|
-
const r = t.map((i) => /* @__PURE__ */
|
|
63
|
+
const r = t.map((i) => /* @__PURE__ */ Oe(i));
|
|
64
64
|
return function(u) {
|
|
65
65
|
const s = (u == null ? void 0 : u[e]) || r;
|
|
66
|
-
return
|
|
66
|
+
return ge(
|
|
67
67
|
() => ({
|
|
68
68
|
[`__scope${e}`]: {
|
|
69
69
|
...u,
|
|
@@ -101,7 +101,7 @@ function Lt(...e) {
|
|
|
101
101
|
...l
|
|
102
102
|
};
|
|
103
103
|
}, {});
|
|
104
|
-
return
|
|
104
|
+
return ge(
|
|
105
105
|
() => ({
|
|
106
106
|
[`__scope${n.scopeName}`]: i
|
|
107
107
|
}),
|
|
@@ -113,25 +113,25 @@ function Lt(...e) {
|
|
|
113
113
|
};
|
|
114
114
|
return t.scopeName = n.scopeName, t;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
},
|
|
116
|
+
const Pe = globalThis != null && globalThis.document ? Dt : () => {
|
|
117
|
+
}, Ft = m.useId || (() => {
|
|
118
118
|
});
|
|
119
|
-
let
|
|
120
|
-
function
|
|
121
|
-
const [n, t] = m.useState(
|
|
122
|
-
return
|
|
119
|
+
let jt = 0;
|
|
120
|
+
function $e(e) {
|
|
121
|
+
const [n, t] = m.useState(Ft());
|
|
122
|
+
return Pe(() => {
|
|
123
123
|
e || t(
|
|
124
|
-
(o) => o ?? String(
|
|
124
|
+
(o) => o ?? String(jt++)
|
|
125
125
|
);
|
|
126
126
|
}, [
|
|
127
127
|
e
|
|
128
128
|
]), e || (n ? `radix-${n}` : "");
|
|
129
129
|
}
|
|
130
130
|
function G(e) {
|
|
131
|
-
const n =
|
|
131
|
+
const n = C(e);
|
|
132
132
|
return A(() => {
|
|
133
133
|
n.current = e;
|
|
134
|
-
}),
|
|
134
|
+
}), ge(
|
|
135
135
|
() => (...t) => {
|
|
136
136
|
var o;
|
|
137
137
|
return (o = n.current) === null || o === void 0 ? void 0 : o.call(n, ...t);
|
|
@@ -139,12 +139,12 @@ function G(e) {
|
|
|
139
139
|
[]
|
|
140
140
|
);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Bt({ prop: e, defaultProp: n, onChange: t = () => {
|
|
143
143
|
} }) {
|
|
144
|
-
const [o, a] =
|
|
144
|
+
const [o, a] = Ut({
|
|
145
145
|
defaultProp: n,
|
|
146
146
|
onChange: t
|
|
147
|
-
}), r = e !== void 0, i = r ? e : o, u = G(t), s =
|
|
147
|
+
}), r = e !== void 0, i = r ? e : o, u = G(t), s = J((d) => {
|
|
148
148
|
if (r) {
|
|
149
149
|
const l = typeof d == "function" ? d(e) : d;
|
|
150
150
|
l !== e && u(l);
|
|
@@ -161,8 +161,8 @@ function jt({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
161
161
|
s
|
|
162
162
|
];
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
const t =
|
|
164
|
+
function Ut({ defaultProp: e, onChange: n }) {
|
|
165
|
+
const t = K(e), [o] = t, a = C(o), r = G(n);
|
|
166
166
|
return A(() => {
|
|
167
167
|
a.current !== o && (r(o), a.current = o);
|
|
168
168
|
}, [
|
|
@@ -171,32 +171,32 @@ function Bt({ defaultProp: e, onChange: n }) {
|
|
|
171
171
|
r
|
|
172
172
|
]), t;
|
|
173
173
|
}
|
|
174
|
-
const
|
|
175
|
-
const { children: t, ...o } = e, a =
|
|
174
|
+
const Me = /* @__PURE__ */ S((e, n) => {
|
|
175
|
+
const { children: t, ...o } = e, a = D.toArray(t), r = a.find(zt);
|
|
176
176
|
if (r) {
|
|
177
|
-
const i = r.props.children, u = a.map((s) => s === r ?
|
|
178
|
-
return /* @__PURE__ */ g(
|
|
177
|
+
const i = r.props.children, u = a.map((s) => s === r ? D.count(i) > 1 ? D.only(null) : /* @__PURE__ */ z(i) ? i.props.children : null : s);
|
|
178
|
+
return /* @__PURE__ */ g(Ne, N({}, o, {
|
|
179
179
|
ref: n
|
|
180
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ z(i) ? /* @__PURE__ */ ue(i, void 0, u) : null);
|
|
181
181
|
}
|
|
182
|
-
return /* @__PURE__ */ g(
|
|
182
|
+
return /* @__PURE__ */ g(Ne, N({}, o, {
|
|
183
183
|
ref: n
|
|
184
184
|
}), t);
|
|
185
185
|
});
|
|
186
|
-
|
|
187
|
-
const
|
|
186
|
+
Me.displayName = "Slot";
|
|
187
|
+
const Ne = /* @__PURE__ */ S((e, n) => {
|
|
188
188
|
const { children: t, ...o } = e;
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
-
...
|
|
191
|
-
ref: n ?
|
|
192
|
-
}) :
|
|
189
|
+
return /* @__PURE__ */ z(t) ? /* @__PURE__ */ ue(t, {
|
|
190
|
+
...qt(o, t.props),
|
|
191
|
+
ref: n ? ot(n, t.ref) : t.ref
|
|
192
|
+
}) : D.count(t) > 1 ? D.only(null) : null;
|
|
193
193
|
});
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
function
|
|
197
|
-
return /* @__PURE__ */
|
|
194
|
+
Ne.displayName = "SlotClone";
|
|
195
|
+
const Wt = ({ children: e }) => /* @__PURE__ */ g(Re, null, e);
|
|
196
|
+
function zt(e) {
|
|
197
|
+
return /* @__PURE__ */ z(e) && e.type === Wt;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function qt(e, n) {
|
|
200
200
|
const t = {
|
|
201
201
|
...n
|
|
202
202
|
};
|
|
@@ -217,7 +217,7 @@ function Wt(e, n) {
|
|
|
217
217
|
...t
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const Ht = [
|
|
221
221
|
"a",
|
|
222
222
|
"button",
|
|
223
223
|
"div",
|
|
@@ -234,12 +234,12 @@ const zt = [
|
|
|
234
234
|
"span",
|
|
235
235
|
"svg",
|
|
236
236
|
"ul"
|
|
237
|
-
],
|
|
237
|
+
], q = Ht.reduce((e, n) => {
|
|
238
238
|
const t = /* @__PURE__ */ S((o, a) => {
|
|
239
|
-
const { asChild: r, ...i } = o, u = r ?
|
|
239
|
+
const { asChild: r, ...i } = o, u = r ? Me : n;
|
|
240
240
|
return A(() => {
|
|
241
241
|
window[Symbol.for("radix-ui")] = !0;
|
|
242
|
-
}, []), /* @__PURE__ */ g(u,
|
|
242
|
+
}, []), /* @__PURE__ */ g(u, N({}, i, {
|
|
243
243
|
ref: a
|
|
244
244
|
}));
|
|
245
245
|
});
|
|
@@ -248,12 +248,12 @@ const zt = [
|
|
|
248
248
|
[n]: t
|
|
249
249
|
};
|
|
250
250
|
}, {});
|
|
251
|
-
function
|
|
252
|
-
e &&
|
|
251
|
+
function Vt(e, n) {
|
|
252
|
+
e && rt(
|
|
253
253
|
() => e.dispatchEvent(n)
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function Kt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
257
257
|
const t = G(e);
|
|
258
258
|
A(() => {
|
|
259
259
|
const o = (a) => {
|
|
@@ -265,73 +265,73 @@ function Vt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
265
265
|
n
|
|
266
266
|
]);
|
|
267
267
|
}
|
|
268
|
-
const
|
|
269
|
-
let
|
|
270
|
-
const
|
|
268
|
+
const Ae = "dismissableLayer.update", Gt = "dismissableLayer.pointerDownOutside", Xt = "dismissableLayer.focusOutside";
|
|
269
|
+
let je;
|
|
270
|
+
const Yt = /* @__PURE__ */ Oe({
|
|
271
271
|
layers: /* @__PURE__ */ new Set(),
|
|
272
272
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
273
273
|
branches: /* @__PURE__ */ new Set()
|
|
274
|
-
}),
|
|
274
|
+
}), Zt = /* @__PURE__ */ S((e, n) => {
|
|
275
275
|
var t;
|
|
276
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: u, onDismiss: s, ...d } = e, p =
|
|
276
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: u, onDismiss: s, ...d } = e, p = nt(Yt), [l, f] = K(null), v = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, $] = K({}), c = ee(
|
|
277
277
|
n,
|
|
278
|
-
(
|
|
279
|
-
),
|
|
278
|
+
(b) => f(b)
|
|
279
|
+
), h = Array.from(p.layers), [y] = [
|
|
280
280
|
...p.layersWithOutsidePointerEventsDisabled
|
|
281
|
-
].slice(-1),
|
|
282
|
-
const
|
|
281
|
+
].slice(-1), O = h.indexOf(y), E = l ? h.indexOf(l) : -1, w = p.layersWithOutsidePointerEventsDisabled.size > 0, x = E >= O, k = Qt((b) => {
|
|
282
|
+
const L = b.target, F = [
|
|
283
283
|
...p.branches
|
|
284
284
|
].some(
|
|
285
|
-
(
|
|
285
|
+
(te) => te.contains(L)
|
|
286
286
|
);
|
|
287
|
-
!x ||
|
|
288
|
-
},
|
|
289
|
-
const
|
|
287
|
+
!x || F || (r == null || r(b), u == null || u(b), b.defaultPrevented || s == null || s());
|
|
288
|
+
}, v), R = Jt((b) => {
|
|
289
|
+
const L = b.target;
|
|
290
290
|
[
|
|
291
291
|
...p.branches
|
|
292
292
|
].some(
|
|
293
|
-
(
|
|
294
|
-
) || (i == null || i(
|
|
295
|
-
},
|
|
296
|
-
return
|
|
297
|
-
|
|
298
|
-
},
|
|
293
|
+
(te) => te.contains(L)
|
|
294
|
+
) || (i == null || i(b), u == null || u(b), b.defaultPrevented || s == null || s());
|
|
295
|
+
}, v);
|
|
296
|
+
return Kt((b) => {
|
|
297
|
+
E === p.layers.size - 1 && (a == null || a(b), !b.defaultPrevented && s && (b.preventDefault(), s()));
|
|
298
|
+
}, v), A(() => {
|
|
299
299
|
if (l)
|
|
300
|
-
return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
301
|
-
o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (
|
|
300
|
+
return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (je = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(l)), p.layers.add(l), Be(), () => {
|
|
301
|
+
o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = je);
|
|
302
302
|
};
|
|
303
303
|
}, [
|
|
304
304
|
l,
|
|
305
|
-
|
|
305
|
+
v,
|
|
306
306
|
o,
|
|
307
307
|
p
|
|
308
308
|
]), A(() => () => {
|
|
309
|
-
l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l),
|
|
309
|
+
l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l), Be());
|
|
310
310
|
}, [
|
|
311
311
|
l,
|
|
312
312
|
p
|
|
313
313
|
]), A(() => {
|
|
314
|
-
const
|
|
315
|
-
return document.addEventListener(
|
|
316
|
-
}, []), /* @__PURE__ */ g(
|
|
314
|
+
const b = () => $({});
|
|
315
|
+
return document.addEventListener(Ae, b), () => document.removeEventListener(Ae, b);
|
|
316
|
+
}, []), /* @__PURE__ */ g(q.div, N({}, d, {
|
|
317
317
|
ref: c,
|
|
318
318
|
style: {
|
|
319
|
-
pointerEvents:
|
|
319
|
+
pointerEvents: w ? x ? "auto" : "none" : void 0,
|
|
320
320
|
...e.style
|
|
321
321
|
},
|
|
322
|
-
onFocusCapture:
|
|
323
|
-
onBlurCapture:
|
|
324
|
-
onPointerDownCapture:
|
|
322
|
+
onFocusCapture: W(e.onFocusCapture, R.onFocusCapture),
|
|
323
|
+
onBlurCapture: W(e.onBlurCapture, R.onBlurCapture),
|
|
324
|
+
onPointerDownCapture: W(e.onPointerDownCapture, k.onPointerDownCapture)
|
|
325
325
|
}));
|
|
326
326
|
});
|
|
327
|
-
function
|
|
328
|
-
const t = G(e), o =
|
|
327
|
+
function Qt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
328
|
+
const t = G(e), o = C(!1), a = C(() => {
|
|
329
329
|
});
|
|
330
330
|
return A(() => {
|
|
331
331
|
const r = (u) => {
|
|
332
332
|
if (u.target && !o.current) {
|
|
333
333
|
let d = function() {
|
|
334
|
-
|
|
334
|
+
at(Gt, t, s, {
|
|
335
335
|
discrete: !0
|
|
336
336
|
});
|
|
337
337
|
};
|
|
@@ -358,11 +358,11 @@ function Zt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
358
358
|
onPointerDownCapture: () => o.current = !0
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
const t = G(e), o =
|
|
361
|
+
function Jt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
362
|
+
const t = G(e), o = C(!1);
|
|
363
363
|
return A(() => {
|
|
364
364
|
const a = (r) => {
|
|
365
|
-
r.target && !o.current &&
|
|
365
|
+
r.target && !o.current && at(Xt, t, {
|
|
366
366
|
originalEvent: r
|
|
367
367
|
}, {
|
|
368
368
|
discrete: !1
|
|
@@ -377,11 +377,11 @@ function Qt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
377
377
|
onBlurCapture: () => o.current = !1
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
const e = new CustomEvent(
|
|
380
|
+
function Be() {
|
|
381
|
+
const e = new CustomEvent(Ae);
|
|
382
382
|
document.dispatchEvent(e);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function at(e, n, t, { discrete: o }) {
|
|
385
385
|
const a = t.originalEvent.target, r = new CustomEvent(e, {
|
|
386
386
|
bubbles: !1,
|
|
387
387
|
cancelable: !0,
|
|
@@ -389,16 +389,16 @@ function ot(e, n, t, { discrete: o }) {
|
|
|
389
389
|
});
|
|
390
390
|
n && a.addEventListener(e, n, {
|
|
391
391
|
once: !0
|
|
392
|
-
}), o ?
|
|
392
|
+
}), o ? Vt(a, r) : a.dispatchEvent(r);
|
|
393
393
|
}
|
|
394
|
-
const ye = "focusScope.autoFocusOnMount",
|
|
394
|
+
const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount", Ue = {
|
|
395
395
|
bubbles: !1,
|
|
396
396
|
cancelable: !0
|
|
397
|
-
},
|
|
398
|
-
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [u, s] =
|
|
397
|
+
}, en = /* @__PURE__ */ S((e, n) => {
|
|
398
|
+
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [u, s] = K(null), d = G(a), p = G(r), l = C(null), f = ee(
|
|
399
399
|
n,
|
|
400
400
|
(c) => s(c)
|
|
401
|
-
),
|
|
401
|
+
), v = C({
|
|
402
402
|
paused: !1,
|
|
403
403
|
pause() {
|
|
404
404
|
this.paused = !0;
|
|
@@ -409,54 +409,54 @@ const ye = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount",
|
|
|
409
409
|
}).current;
|
|
410
410
|
A(() => {
|
|
411
411
|
if (o) {
|
|
412
|
-
let c = function(
|
|
413
|
-
if (
|
|
412
|
+
let c = function(E) {
|
|
413
|
+
if (v.paused || !u)
|
|
414
414
|
return;
|
|
415
|
-
const
|
|
416
|
-
u.contains(
|
|
415
|
+
const w = E.target;
|
|
416
|
+
u.contains(w) ? l.current = w : B(l.current, {
|
|
417
417
|
select: !0
|
|
418
418
|
});
|
|
419
|
-
},
|
|
420
|
-
if (
|
|
419
|
+
}, h = function(E) {
|
|
420
|
+
if (v.paused || !u)
|
|
421
421
|
return;
|
|
422
|
-
const
|
|
423
|
-
|
|
422
|
+
const w = E.relatedTarget;
|
|
423
|
+
w !== null && (u.contains(w) || B(l.current, {
|
|
424
424
|
select: !0
|
|
425
425
|
}));
|
|
426
|
-
},
|
|
426
|
+
}, y = function(E) {
|
|
427
427
|
if (document.activeElement === document.body)
|
|
428
|
-
for (const x of
|
|
429
|
-
x.removedNodes.length > 0 &&
|
|
428
|
+
for (const x of E)
|
|
429
|
+
x.removedNodes.length > 0 && B(u);
|
|
430
430
|
};
|
|
431
|
-
document.addEventListener("focusin", c), document.addEventListener("focusout",
|
|
432
|
-
const
|
|
433
|
-
return u &&
|
|
431
|
+
document.addEventListener("focusin", c), document.addEventListener("focusout", h);
|
|
432
|
+
const O = new MutationObserver(y);
|
|
433
|
+
return u && O.observe(u, {
|
|
434
434
|
childList: !0,
|
|
435
435
|
subtree: !0
|
|
436
436
|
}), () => {
|
|
437
|
-
document.removeEventListener("focusin", c), document.removeEventListener("focusout",
|
|
437
|
+
document.removeEventListener("focusin", c), document.removeEventListener("focusout", h), O.disconnect();
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
}, [
|
|
441
441
|
o,
|
|
442
442
|
u,
|
|
443
|
-
|
|
443
|
+
v.paused
|
|
444
444
|
]), A(() => {
|
|
445
445
|
if (u) {
|
|
446
|
-
|
|
446
|
+
ze.add(v);
|
|
447
447
|
const c = document.activeElement;
|
|
448
448
|
if (!u.contains(c)) {
|
|
449
|
-
const
|
|
450
|
-
u.addEventListener(ye, d), u.dispatchEvent(
|
|
449
|
+
const y = new CustomEvent(ye, Ue);
|
|
450
|
+
u.addEventListener(ye, d), u.dispatchEvent(y), y.defaultPrevented || (tn(un(it(u)), {
|
|
451
451
|
select: !0
|
|
452
|
-
}), document.activeElement === c &&
|
|
452
|
+
}), document.activeElement === c && B(u));
|
|
453
453
|
}
|
|
454
454
|
return () => {
|
|
455
455
|
u.removeEventListener(ye, d), setTimeout(() => {
|
|
456
|
-
const
|
|
457
|
-
u.addEventListener(
|
|
456
|
+
const y = new CustomEvent(Ee, Ue);
|
|
457
|
+
u.addEventListener(Ee, p), u.dispatchEvent(y), y.defaultPrevented || B(c ?? document.body, {
|
|
458
458
|
select: !0
|
|
459
|
-
}), u.removeEventListener(
|
|
459
|
+
}), u.removeEventListener(Ee, p), ze.remove(v);
|
|
460
460
|
}, 0);
|
|
461
461
|
};
|
|
462
462
|
}
|
|
@@ -464,48 +464,48 @@ const ye = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount",
|
|
|
464
464
|
u,
|
|
465
465
|
d,
|
|
466
466
|
p,
|
|
467
|
-
|
|
467
|
+
v
|
|
468
468
|
]);
|
|
469
|
-
const
|
|
470
|
-
if (!t && !o ||
|
|
469
|
+
const $ = J((c) => {
|
|
470
|
+
if (!t && !o || v.paused)
|
|
471
471
|
return;
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
474
|
-
const
|
|
475
|
-
|
|
472
|
+
const h = c.key === "Tab" && !c.altKey && !c.ctrlKey && !c.metaKey, y = document.activeElement;
|
|
473
|
+
if (h && y) {
|
|
474
|
+
const O = c.currentTarget, [E, w] = nn(O);
|
|
475
|
+
E && w ? !c.shiftKey && y === w ? (c.preventDefault(), t && B(E, {
|
|
476
476
|
select: !0
|
|
477
|
-
})) : c.shiftKey &&
|
|
477
|
+
})) : c.shiftKey && y === E && (c.preventDefault(), t && B(w, {
|
|
478
478
|
select: !0
|
|
479
|
-
})) :
|
|
479
|
+
})) : y === O && c.preventDefault();
|
|
480
480
|
}
|
|
481
481
|
}, [
|
|
482
482
|
t,
|
|
483
483
|
o,
|
|
484
|
-
|
|
484
|
+
v.paused
|
|
485
485
|
]);
|
|
486
|
-
return /* @__PURE__ */ g(
|
|
486
|
+
return /* @__PURE__ */ g(q.div, N({
|
|
487
487
|
tabIndex: -1
|
|
488
488
|
}, i, {
|
|
489
|
-
ref:
|
|
490
|
-
onKeyDown:
|
|
489
|
+
ref: f,
|
|
490
|
+
onKeyDown: $
|
|
491
491
|
}));
|
|
492
492
|
});
|
|
493
|
-
function
|
|
493
|
+
function tn(e, { select: n = !1 } = {}) {
|
|
494
494
|
const t = document.activeElement;
|
|
495
495
|
for (const o of e)
|
|
496
|
-
if (
|
|
496
|
+
if (B(o, {
|
|
497
497
|
select: n
|
|
498
498
|
}), document.activeElement !== t)
|
|
499
499
|
return;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
const n =
|
|
501
|
+
function nn(e) {
|
|
502
|
+
const n = it(e), t = We(n, e), o = We(n.reverse(), e);
|
|
503
503
|
return [
|
|
504
504
|
t,
|
|
505
505
|
o
|
|
506
506
|
];
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function it(e) {
|
|
509
509
|
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
510
510
|
acceptNode: (o) => {
|
|
511
511
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -516,14 +516,14 @@ function at(e) {
|
|
|
516
516
|
n.push(t.currentNode);
|
|
517
517
|
return n;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function We(e, n) {
|
|
520
520
|
for (const t of e)
|
|
521
|
-
if (!
|
|
521
|
+
if (!rn(t, {
|
|
522
522
|
upTo: n
|
|
523
523
|
}))
|
|
524
524
|
return t;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function rn(e, { upTo: n }) {
|
|
527
527
|
if (getComputedStyle(e).visibility === "hidden")
|
|
528
528
|
return !0;
|
|
529
529
|
for (; e; ) {
|
|
@@ -535,66 +535,66 @@ function nn(e, { upTo: n }) {
|
|
|
535
535
|
}
|
|
536
536
|
return !1;
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function on(e) {
|
|
539
539
|
return e instanceof HTMLInputElement && "select" in e;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function B(e, { select: n = !1 } = {}) {
|
|
542
542
|
if (e && e.focus) {
|
|
543
543
|
const t = document.activeElement;
|
|
544
544
|
e.focus({
|
|
545
545
|
preventScroll: !0
|
|
546
|
-
}), e !== t &&
|
|
546
|
+
}), e !== t && on(e) && n && e.select();
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
const
|
|
550
|
-
function
|
|
549
|
+
const ze = an();
|
|
550
|
+
function an() {
|
|
551
551
|
let e = [];
|
|
552
552
|
return {
|
|
553
553
|
add(n) {
|
|
554
554
|
const t = e[0];
|
|
555
|
-
n !== t && (t == null || t.pause()), e =
|
|
555
|
+
n !== t && (t == null || t.pause()), e = qe(e, n), e.unshift(n);
|
|
556
556
|
},
|
|
557
557
|
remove(n) {
|
|
558
558
|
var t;
|
|
559
|
-
e =
|
|
559
|
+
e = qe(e, n), (t = e[0]) === null || t === void 0 || t.resume();
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function qe(e, n) {
|
|
564
564
|
const t = [
|
|
565
565
|
...e
|
|
566
566
|
], o = t.indexOf(n);
|
|
567
567
|
return o !== -1 && t.splice(o, 1), t;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function un(e) {
|
|
570
570
|
return e.filter(
|
|
571
571
|
(n) => n.tagName !== "A"
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
|
-
const
|
|
574
|
+
const cn = /* @__PURE__ */ S((e, n) => {
|
|
575
575
|
var t;
|
|
576
576
|
const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
|
|
577
|
-
return o ? /* @__PURE__ */
|
|
577
|
+
return o ? /* @__PURE__ */ Rt.createPortal(/* @__PURE__ */ g(q.div, N({}, a, {
|
|
578
578
|
ref: n
|
|
579
579
|
})), o) : null;
|
|
580
580
|
});
|
|
581
|
-
function
|
|
582
|
-
return
|
|
581
|
+
function sn(e, n) {
|
|
582
|
+
return It((t, o) => {
|
|
583
583
|
const a = n[t][o];
|
|
584
584
|
return a ?? t;
|
|
585
585
|
}, e);
|
|
586
586
|
}
|
|
587
|
-
const
|
|
588
|
-
const { present: n, children: t } = e, o =
|
|
587
|
+
const _e = (e) => {
|
|
588
|
+
const { present: n, children: t } = e, o = ln(n), a = typeof t == "function" ? t({
|
|
589
589
|
present: o.isPresent
|
|
590
|
-
}) :
|
|
591
|
-
return typeof t == "function" || o.isPresent ? /* @__PURE__ */
|
|
590
|
+
}) : D.only(t), r = ee(o.ref, a.ref);
|
|
591
|
+
return typeof t == "function" || o.isPresent ? /* @__PURE__ */ ue(a, {
|
|
592
592
|
ref: r
|
|
593
593
|
}) : null;
|
|
594
594
|
};
|
|
595
|
-
|
|
596
|
-
function
|
|
597
|
-
const [n, t] =
|
|
595
|
+
_e.displayName = "Presence";
|
|
596
|
+
function ln(e) {
|
|
597
|
+
const [n, t] = K(), o = C({}), a = C(e), r = C("none"), i = e ? "mounted" : "unmounted", [u, s] = sn(i, {
|
|
598
598
|
mounted: {
|
|
599
599
|
UNMOUNT: "unmounted",
|
|
600
600
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -608,28 +608,28 @@ function sn(e) {
|
|
|
608
608
|
}
|
|
609
609
|
});
|
|
610
610
|
return A(() => {
|
|
611
|
-
const d =
|
|
611
|
+
const d = ce(o.current);
|
|
612
612
|
r.current = u === "mounted" ? d : "none";
|
|
613
613
|
}, [
|
|
614
614
|
u
|
|
615
|
-
]),
|
|
615
|
+
]), Pe(() => {
|
|
616
616
|
const d = o.current, p = a.current;
|
|
617
617
|
if (p !== e) {
|
|
618
|
-
const
|
|
619
|
-
e ? s("MOUNT") :
|
|
618
|
+
const f = r.current, v = ce(d);
|
|
619
|
+
e ? s("MOUNT") : v === "none" || (d == null ? void 0 : d.display) === "none" ? s("UNMOUNT") : s(p && f !== v ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
620
620
|
}
|
|
621
621
|
}, [
|
|
622
622
|
e,
|
|
623
623
|
s
|
|
624
|
-
]),
|
|
624
|
+
]), Pe(() => {
|
|
625
625
|
if (n) {
|
|
626
626
|
const d = (l) => {
|
|
627
|
-
const
|
|
628
|
-
l.target === n &&
|
|
627
|
+
const v = ce(o.current).includes(l.animationName);
|
|
628
|
+
l.target === n && v && rt(
|
|
629
629
|
() => s("ANIMATION_END")
|
|
630
630
|
);
|
|
631
631
|
}, p = (l) => {
|
|
632
|
-
l.target === n && (r.current =
|
|
632
|
+
l.target === n && (r.current = ce(o.current));
|
|
633
633
|
};
|
|
634
634
|
return n.addEventListener("animationstart", p), n.addEventListener("animationcancel", d), n.addEventListener("animationend", d), () => {
|
|
635
635
|
n.removeEventListener("animationstart", p), n.removeEventListener("animationcancel", d), n.removeEventListener("animationend", d);
|
|
@@ -644,41 +644,41 @@ function sn(e) {
|
|
|
644
644
|
"mounted",
|
|
645
645
|
"unmountSuspended"
|
|
646
646
|
].includes(u),
|
|
647
|
-
ref:
|
|
647
|
+
ref: J((d) => {
|
|
648
648
|
d && (o.current = getComputedStyle(d)), t(d);
|
|
649
649
|
}, [])
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function ce(e) {
|
|
653
653
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
654
654
|
}
|
|
655
|
-
let
|
|
656
|
-
function
|
|
655
|
+
let we = 0;
|
|
656
|
+
function dn() {
|
|
657
657
|
A(() => {
|
|
658
658
|
var e, n;
|
|
659
659
|
const t = document.querySelectorAll("[data-radix-focus-guard]");
|
|
660
|
-
return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e :
|
|
661
|
-
|
|
660
|
+
return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : He()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : He()), we++, () => {
|
|
661
|
+
we === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
|
|
662
662
|
(o) => o.remove()
|
|
663
|
-
),
|
|
663
|
+
), we--;
|
|
664
664
|
};
|
|
665
665
|
}, []);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function He() {
|
|
668
668
|
const e = document.createElement("span");
|
|
669
669
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
670
670
|
}
|
|
671
|
-
var
|
|
672
|
-
return
|
|
671
|
+
var M = function() {
|
|
672
|
+
return M = Object.assign || function(n) {
|
|
673
673
|
for (var t, o = 1, a = arguments.length; o < a; o++) {
|
|
674
674
|
t = arguments[o];
|
|
675
675
|
for (var r in t)
|
|
676
676
|
Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
677
677
|
}
|
|
678
678
|
return n;
|
|
679
|
-
},
|
|
679
|
+
}, M.apply(this, arguments);
|
|
680
680
|
};
|
|
681
|
-
function
|
|
681
|
+
function ut(e, n) {
|
|
682
682
|
var t = {};
|
|
683
683
|
for (var o in e)
|
|
684
684
|
Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
@@ -687,18 +687,18 @@ function it(e, n) {
|
|
|
687
687
|
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
688
688
|
return t;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function pn(e, n, t) {
|
|
691
691
|
if (t || arguments.length === 2)
|
|
692
692
|
for (var o = 0, a = n.length, r; o < a; o++)
|
|
693
693
|
(r || !(o in n)) && (r || (r = Array.prototype.slice.call(n, 0, o)), r[o] = n[o]);
|
|
694
694
|
return e.concat(r || Array.prototype.slice.call(n));
|
|
695
695
|
}
|
|
696
|
-
var
|
|
697
|
-
function
|
|
696
|
+
var he = "right-scroll-bar-position", me = "width-before-scroll-bar", fn = "with-scroll-bars-hidden", vn = "--removed-body-scroll-bar-size";
|
|
697
|
+
function hn(e, n) {
|
|
698
698
|
return typeof e == "function" ? e(n) : e && (e.current = n), e;
|
|
699
699
|
}
|
|
700
|
-
function
|
|
701
|
-
var t =
|
|
700
|
+
function mn(e, n) {
|
|
701
|
+
var t = K(function() {
|
|
702
702
|
return {
|
|
703
703
|
// value
|
|
704
704
|
value: e,
|
|
@@ -718,18 +718,18 @@ function hn(e, n) {
|
|
|
718
718
|
})[0];
|
|
719
719
|
return t.callback = n, t.facade;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
721
|
+
function gn(e, n) {
|
|
722
|
+
return mn(null, function(t) {
|
|
723
723
|
return e.forEach(function(o) {
|
|
724
|
-
return
|
|
724
|
+
return hn(o, t);
|
|
725
725
|
});
|
|
726
726
|
});
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function _n(e) {
|
|
729
729
|
return e;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
n === void 0 && (n =
|
|
731
|
+
function bn(e, n) {
|
|
732
|
+
n === void 0 && (n = _n);
|
|
733
733
|
var t = [], o = !1, a = {
|
|
734
734
|
read: function() {
|
|
735
735
|
if (o)
|
|
@@ -783,78 +783,78 @@ function _n(e, n) {
|
|
|
783
783
|
};
|
|
784
784
|
return a;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function $n(e) {
|
|
787
787
|
e === void 0 && (e = {});
|
|
788
|
-
var n =
|
|
789
|
-
return n.options =
|
|
788
|
+
var n = bn(null);
|
|
789
|
+
return n.options = M({ async: !0, ssr: !1 }, e), n;
|
|
790
790
|
}
|
|
791
|
-
var
|
|
792
|
-
var n = e.sideCar, t =
|
|
791
|
+
var ct = function(e) {
|
|
792
|
+
var n = e.sideCar, t = ut(e, ["sideCar"]);
|
|
793
793
|
if (!n)
|
|
794
794
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
795
795
|
var o = n.read();
|
|
796
796
|
if (!o)
|
|
797
797
|
throw new Error("Sidecar medium not found");
|
|
798
|
-
return m.createElement(o,
|
|
798
|
+
return m.createElement(o, M({}, t));
|
|
799
799
|
};
|
|
800
|
-
|
|
800
|
+
ct.isSideCarExport = !0;
|
|
801
801
|
function yn(e, n) {
|
|
802
|
-
return e.useMedium(n),
|
|
802
|
+
return e.useMedium(n), ct;
|
|
803
803
|
}
|
|
804
|
-
var
|
|
805
|
-
},
|
|
804
|
+
var st = $n(), xe = function() {
|
|
805
|
+
}, be = m.forwardRef(function(e, n) {
|
|
806
806
|
var t = m.useRef(null), o = m.useState({
|
|
807
|
-
onScrollCapture:
|
|
808
|
-
onWheelCapture:
|
|
809
|
-
onTouchMoveCapture:
|
|
810
|
-
}), a = o[0], r = o[1], i = e.forwardProps, u = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards,
|
|
807
|
+
onScrollCapture: xe,
|
|
808
|
+
onWheelCapture: xe,
|
|
809
|
+
onTouchMoveCapture: xe
|
|
810
|
+
}), a = o[0], r = o[1], i = e.forwardProps, u = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, f = e.sideCar, v = e.noIsolation, $ = e.inert, c = e.allowPinchZoom, h = e.as, y = h === void 0 ? "div" : h, O = ut(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), E = f, w = gn([t, n]), x = M(M({}, O), a);
|
|
811
811
|
return m.createElement(
|
|
812
812
|
m.Fragment,
|
|
813
813
|
null,
|
|
814
|
-
p && m.createElement(
|
|
815
|
-
i ? m.cloneElement(m.Children.only(u),
|
|
814
|
+
p && m.createElement(E, { sideCar: st, removeScrollBar: d, shards: l, noIsolation: v, inert: $, setCallbacks: r, allowPinchZoom: !!c, lockRef: t }),
|
|
815
|
+
i ? m.cloneElement(m.Children.only(u), M(M({}, x), { ref: w })) : m.createElement(y, M({}, x, { className: s, ref: w }), u)
|
|
816
816
|
);
|
|
817
817
|
});
|
|
818
|
-
|
|
818
|
+
be.defaultProps = {
|
|
819
819
|
enabled: !0,
|
|
820
820
|
removeScrollBar: !0,
|
|
821
821
|
inert: !1
|
|
822
822
|
};
|
|
823
|
-
|
|
824
|
-
fullWidth:
|
|
825
|
-
zeroRight:
|
|
823
|
+
be.classNames = {
|
|
824
|
+
fullWidth: me,
|
|
825
|
+
zeroRight: he
|
|
826
826
|
};
|
|
827
|
-
var
|
|
827
|
+
var En = function() {
|
|
828
828
|
if (typeof __webpack_nonce__ < "u")
|
|
829
829
|
return __webpack_nonce__;
|
|
830
830
|
};
|
|
831
|
-
function
|
|
831
|
+
function wn() {
|
|
832
832
|
if (!document)
|
|
833
833
|
return null;
|
|
834
834
|
var e = document.createElement("style");
|
|
835
835
|
e.type = "text/css";
|
|
836
|
-
var n =
|
|
836
|
+
var n = En();
|
|
837
837
|
return n && e.setAttribute("nonce", n), e;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function xn(e, n) {
|
|
840
840
|
e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Sn(e) {
|
|
843
843
|
var n = document.head || document.getElementsByTagName("head")[0];
|
|
844
844
|
n.appendChild(e);
|
|
845
845
|
}
|
|
846
|
-
var
|
|
846
|
+
var Cn = function() {
|
|
847
847
|
var e = 0, n = null;
|
|
848
848
|
return {
|
|
849
849
|
add: function(t) {
|
|
850
|
-
e == 0 && (n =
|
|
850
|
+
e == 0 && (n = wn()) && (xn(n, t), Sn(n)), e++;
|
|
851
851
|
},
|
|
852
852
|
remove: function() {
|
|
853
853
|
e--, !e && n && (n.parentNode && n.parentNode.removeChild(n), n = null);
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
|
-
},
|
|
857
|
-
var e =
|
|
856
|
+
}, On = function() {
|
|
857
|
+
var e = Cn();
|
|
858
858
|
return function(n, t) {
|
|
859
859
|
m.useEffect(function() {
|
|
860
860
|
return e.add(n), function() {
|
|
@@ -862,36 +862,36 @@ var Sn = function() {
|
|
|
862
862
|
};
|
|
863
863
|
}, [n && t]);
|
|
864
864
|
};
|
|
865
|
-
},
|
|
866
|
-
var e =
|
|
865
|
+
}, lt = function() {
|
|
866
|
+
var e = On(), n = function(t) {
|
|
867
867
|
var o = t.styles, a = t.dynamic;
|
|
868
868
|
return e(o, a), null;
|
|
869
869
|
};
|
|
870
870
|
return n;
|
|
871
|
-
},
|
|
871
|
+
}, Pn = {
|
|
872
872
|
left: 0,
|
|
873
873
|
top: 0,
|
|
874
874
|
right: 0,
|
|
875
875
|
gap: 0
|
|
876
|
-
},
|
|
876
|
+
}, Se = function(e) {
|
|
877
877
|
return parseInt(e || "", 10) || 0;
|
|
878
|
-
}, Pn = function(e) {
|
|
879
|
-
var n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], a = n[e === "padding" ? "paddingRight" : "marginRight"];
|
|
880
|
-
return [xe(t), xe(o), xe(a)];
|
|
881
878
|
}, Nn = function(e) {
|
|
879
|
+
var n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], a = n[e === "padding" ? "paddingRight" : "marginRight"];
|
|
880
|
+
return [Se(t), Se(o), Se(a)];
|
|
881
|
+
}, An = function(e) {
|
|
882
882
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
883
|
-
return
|
|
884
|
-
var n =
|
|
883
|
+
return Pn;
|
|
884
|
+
var n = Nn(e), t = document.documentElement.clientWidth, o = window.innerWidth;
|
|
885
885
|
return {
|
|
886
886
|
left: n[0],
|
|
887
887
|
top: n[1],
|
|
888
888
|
right: n[2],
|
|
889
889
|
gap: Math.max(0, o - t + n[2] - n[0])
|
|
890
890
|
};
|
|
891
|
-
},
|
|
891
|
+
}, Tn = lt(), Dn = function(e, n, t, o) {
|
|
892
892
|
var a = e.left, r = e.top, i = e.right, u = e.gap;
|
|
893
893
|
return t === void 0 && (t = "margin"), `
|
|
894
|
-
.`.concat(
|
|
894
|
+
.`.concat(fn, ` {
|
|
895
895
|
overflow: hidden `).concat(o, `;
|
|
896
896
|
padding-right: `).concat(u, "px ").concat(o, `;
|
|
897
897
|
}
|
|
@@ -912,63 +912,63 @@ var Sn = function() {
|
|
|
912
912
|
].filter(Boolean).join(""), `
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
-
.`).concat(
|
|
915
|
+
.`).concat(he, ` {
|
|
916
916
|
right: `).concat(u, "px ").concat(o, `;
|
|
917
917
|
}
|
|
918
918
|
|
|
919
|
-
.`).concat(
|
|
919
|
+
.`).concat(me, ` {
|
|
920
920
|
margin-right: `).concat(u, "px ").concat(o, `;
|
|
921
921
|
}
|
|
922
922
|
|
|
923
|
-
.`).concat(
|
|
923
|
+
.`).concat(he, " .").concat(he, ` {
|
|
924
924
|
right: 0 `).concat(o, `;
|
|
925
925
|
}
|
|
926
926
|
|
|
927
|
-
.`).concat(
|
|
927
|
+
.`).concat(me, " .").concat(me, ` {
|
|
928
928
|
margin-right: 0 `).concat(o, `;
|
|
929
929
|
}
|
|
930
930
|
|
|
931
931
|
body {
|
|
932
|
-
`).concat(
|
|
932
|
+
`).concat(vn, ": ").concat(u, `px;
|
|
933
933
|
}
|
|
934
934
|
`);
|
|
935
|
-
},
|
|
935
|
+
}, In = function(e) {
|
|
936
936
|
var n = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o, r = m.useMemo(function() {
|
|
937
|
-
return
|
|
937
|
+
return An(a);
|
|
938
938
|
}, [a]);
|
|
939
|
-
return m.createElement(
|
|
940
|
-
},
|
|
939
|
+
return m.createElement(Tn, { styles: Dn(r, !n, a, t ? "" : "!important") });
|
|
940
|
+
}, Te = !1;
|
|
941
941
|
if (typeof window < "u")
|
|
942
942
|
try {
|
|
943
|
-
var
|
|
943
|
+
var se = Object.defineProperty({}, "passive", {
|
|
944
944
|
get: function() {
|
|
945
|
-
return
|
|
945
|
+
return Te = !0, !0;
|
|
946
946
|
}
|
|
947
947
|
});
|
|
948
|
-
window.addEventListener("test",
|
|
948
|
+
window.addEventListener("test", se, se), window.removeEventListener("test", se, se);
|
|
949
949
|
} catch {
|
|
950
|
-
|
|
950
|
+
Te = !1;
|
|
951
951
|
}
|
|
952
|
-
var
|
|
952
|
+
var X = Te ? { passive: !1 } : !1, Rn = function(e) {
|
|
953
953
|
return e.tagName === "TEXTAREA";
|
|
954
|
-
},
|
|
954
|
+
}, dt = function(e, n) {
|
|
955
955
|
var t = window.getComputedStyle(e);
|
|
956
956
|
return (
|
|
957
957
|
// not-not-scrollable
|
|
958
958
|
t[n] !== "hidden" && // contains scroll inside self
|
|
959
|
-
!(t.overflowY === t.overflowX && !
|
|
959
|
+
!(t.overflowY === t.overflowX && !Rn(e) && t[n] === "visible")
|
|
960
960
|
);
|
|
961
|
-
}, Rn = function(e) {
|
|
962
|
-
return lt(e, "overflowY");
|
|
963
961
|
}, Mn = function(e) {
|
|
964
|
-
return
|
|
965
|
-
},
|
|
962
|
+
return dt(e, "overflowY");
|
|
963
|
+
}, kn = function(e) {
|
|
964
|
+
return dt(e, "overflowX");
|
|
965
|
+
}, Ve = function(e, n) {
|
|
966
966
|
var t = n;
|
|
967
967
|
do {
|
|
968
968
|
typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
|
|
969
|
-
var o =
|
|
969
|
+
var o = pt(e, t);
|
|
970
970
|
if (o) {
|
|
971
|
-
var a =
|
|
971
|
+
var a = ft(e, t), r = a[1], i = a[2];
|
|
972
972
|
if (r > i)
|
|
973
973
|
return !0;
|
|
974
974
|
}
|
|
@@ -982,195 +982,195 @@ var K = Ae ? { passive: !1 } : !1, In = function(e) {
|
|
|
982
982
|
t,
|
|
983
983
|
o
|
|
984
984
|
];
|
|
985
|
-
},
|
|
985
|
+
}, Fn = function(e) {
|
|
986
986
|
var n = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
|
|
987
987
|
return [
|
|
988
988
|
n,
|
|
989
989
|
t,
|
|
990
990
|
o
|
|
991
991
|
];
|
|
992
|
-
}, dt = function(e, n) {
|
|
993
|
-
return e === "v" ? Rn(n) : Mn(n);
|
|
994
992
|
}, pt = function(e, n) {
|
|
995
|
-
return e === "v" ?
|
|
996
|
-
},
|
|
993
|
+
return e === "v" ? Mn(n) : kn(n);
|
|
994
|
+
}, ft = function(e, n) {
|
|
995
|
+
return e === "v" ? Ln(n) : Fn(n);
|
|
996
|
+
}, jn = function(e, n) {
|
|
997
997
|
return e === "h" && n === "rtl" ? -1 : 1;
|
|
998
|
-
},
|
|
999
|
-
var r =
|
|
998
|
+
}, Bn = function(e, n, t, o, a) {
|
|
999
|
+
var r = jn(e, window.getComputedStyle(n).direction), i = r * o, u = t.target, s = n.contains(u), d = !1, p = i > 0, l = 0, f = 0;
|
|
1000
1000
|
do {
|
|
1001
|
-
var
|
|
1002
|
-
(
|
|
1001
|
+
var v = ft(e, u), $ = v[0], c = v[1], h = v[2], y = c - h - r * $;
|
|
1002
|
+
($ || y) && pt(e, u) && (l += y, f += $), u = u.parentNode;
|
|
1003
1003
|
} while (
|
|
1004
1004
|
// portaled content
|
|
1005
1005
|
!s && u !== document.body || // self content
|
|
1006
1006
|
s && (n.contains(u) || n === u)
|
|
1007
1007
|
);
|
|
1008
|
-
return (p && (l === 0 || !a) || !p && (
|
|
1009
|
-
},
|
|
1008
|
+
return (p && (l === 0 || !a) || !p && (f === 0 || !a)) && (d = !0), d;
|
|
1009
|
+
}, le = function(e) {
|
|
1010
1010
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1011
|
-
},
|
|
1011
|
+
}, Ke = function(e) {
|
|
1012
1012
|
return [e.deltaX, e.deltaY];
|
|
1013
1013
|
}, Ge = function(e) {
|
|
1014
1014
|
return e && "current" in e ? e.current : e;
|
|
1015
|
-
},
|
|
1015
|
+
}, Un = function(e, n) {
|
|
1016
1016
|
return e[0] === n[0] && e[1] === n[1];
|
|
1017
|
-
},
|
|
1017
|
+
}, Wn = function(e) {
|
|
1018
1018
|
return `
|
|
1019
1019
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1020
1020
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1021
1021
|
`);
|
|
1022
|
-
},
|
|
1023
|
-
function
|
|
1024
|
-
var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(
|
|
1025
|
-
return
|
|
1022
|
+
}, zn = 0, Y = [];
|
|
1023
|
+
function qn(e) {
|
|
1024
|
+
var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(zn++)[0], r = m.useState(function() {
|
|
1025
|
+
return lt();
|
|
1026
1026
|
})[0], i = m.useRef(e);
|
|
1027
1027
|
m.useEffect(function() {
|
|
1028
1028
|
i.current = e;
|
|
1029
1029
|
}, [e]), m.useEffect(function() {
|
|
1030
1030
|
if (e.inert) {
|
|
1031
1031
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
1032
|
-
var c =
|
|
1033
|
-
return c.forEach(function(
|
|
1034
|
-
return
|
|
1032
|
+
var c = pn([e.lockRef.current], (e.shards || []).map(Ge), !0).filter(Boolean);
|
|
1033
|
+
return c.forEach(function(h) {
|
|
1034
|
+
return h.classList.add("allow-interactivity-".concat(a));
|
|
1035
1035
|
}), function() {
|
|
1036
|
-
document.body.classList.remove("block-interactivity-".concat(a)), c.forEach(function(
|
|
1037
|
-
return
|
|
1036
|
+
document.body.classList.remove("block-interactivity-".concat(a)), c.forEach(function(h) {
|
|
1037
|
+
return h.classList.remove("allow-interactivity-".concat(a));
|
|
1038
1038
|
});
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
1041
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1042
|
-
var u = m.useCallback(function(c,
|
|
1042
|
+
var u = m.useCallback(function(c, h) {
|
|
1043
1043
|
if ("touches" in c && c.touches.length === 2)
|
|
1044
1044
|
return !i.current.allowPinchZoom;
|
|
1045
|
-
var
|
|
1046
|
-
if ("touches" in c &&
|
|
1045
|
+
var y = le(c), O = t.current, E = "deltaX" in c ? c.deltaX : O[0] - y[0], w = "deltaY" in c ? c.deltaY : O[1] - y[1], x, k = c.target, R = Math.abs(E) > Math.abs(w) ? "h" : "v";
|
|
1046
|
+
if ("touches" in c && R === "h" && k.type === "range")
|
|
1047
1047
|
return !1;
|
|
1048
|
-
var
|
|
1049
|
-
if (!
|
|
1048
|
+
var b = Ve(R, k);
|
|
1049
|
+
if (!b)
|
|
1050
1050
|
return !0;
|
|
1051
|
-
if (
|
|
1051
|
+
if (b ? x = R : (x = R === "v" ? "h" : "v", b = Ve(R, k)), !b)
|
|
1052
1052
|
return !1;
|
|
1053
|
-
if (!o.current && "changedTouches" in c && (
|
|
1053
|
+
if (!o.current && "changedTouches" in c && (E || w) && (o.current = x), !x)
|
|
1054
1054
|
return !0;
|
|
1055
|
-
var
|
|
1056
|
-
return
|
|
1055
|
+
var L = o.current || x;
|
|
1056
|
+
return Bn(L, h, c, L === "h" ? E : w, !0);
|
|
1057
1057
|
}, []), s = m.useCallback(function(c) {
|
|
1058
|
-
var
|
|
1059
|
-
if (!(!
|
|
1060
|
-
var
|
|
1061
|
-
return x.name ===
|
|
1058
|
+
var h = c;
|
|
1059
|
+
if (!(!Y.length || Y[Y.length - 1] !== r)) {
|
|
1060
|
+
var y = "deltaY" in h ? Ke(h) : le(h), O = n.current.filter(function(x) {
|
|
1061
|
+
return x.name === h.type && x.target === h.target && Un(x.delta, y);
|
|
1062
1062
|
})[0];
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1063
|
+
if (O && O.should) {
|
|
1064
|
+
h.cancelable && h.preventDefault();
|
|
1065
1065
|
return;
|
|
1066
1066
|
}
|
|
1067
|
-
if (!
|
|
1068
|
-
var
|
|
1069
|
-
return x.contains(
|
|
1070
|
-
}),
|
|
1071
|
-
|
|
1067
|
+
if (!O) {
|
|
1068
|
+
var E = (i.current.shards || []).map(Ge).filter(Boolean).filter(function(x) {
|
|
1069
|
+
return x.contains(h.target);
|
|
1070
|
+
}), w = E.length > 0 ? u(h, E[0]) : !i.current.noIsolation;
|
|
1071
|
+
w && h.cancelable && h.preventDefault();
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
|
-
}, []), d = m.useCallback(function(c,
|
|
1075
|
-
var
|
|
1076
|
-
n.current.push(
|
|
1077
|
-
n.current = n.current.filter(function(
|
|
1078
|
-
return
|
|
1074
|
+
}, []), d = m.useCallback(function(c, h, y, O) {
|
|
1075
|
+
var E = { name: c, delta: h, target: y, should: O };
|
|
1076
|
+
n.current.push(E), setTimeout(function() {
|
|
1077
|
+
n.current = n.current.filter(function(w) {
|
|
1078
|
+
return w !== E;
|
|
1079
1079
|
});
|
|
1080
1080
|
}, 1);
|
|
1081
1081
|
}, []), p = m.useCallback(function(c) {
|
|
1082
|
-
t.current =
|
|
1082
|
+
t.current = le(c), o.current = void 0;
|
|
1083
1083
|
}, []), l = m.useCallback(function(c) {
|
|
1084
|
-
d(c.type,
|
|
1085
|
-
}, []),
|
|
1086
|
-
d(c.type,
|
|
1084
|
+
d(c.type, Ke(c), c.target, u(c, e.lockRef.current));
|
|
1085
|
+
}, []), f = m.useCallback(function(c) {
|
|
1086
|
+
d(c.type, le(c), c.target, u(c, e.lockRef.current));
|
|
1087
1087
|
}, []);
|
|
1088
1088
|
m.useEffect(function() {
|
|
1089
|
-
return
|
|
1089
|
+
return Y.push(r), e.setCallbacks({
|
|
1090
1090
|
onScrollCapture: l,
|
|
1091
1091
|
onWheelCapture: l,
|
|
1092
|
-
onTouchMoveCapture:
|
|
1093
|
-
}), document.addEventListener("wheel", s,
|
|
1094
|
-
|
|
1092
|
+
onTouchMoveCapture: f
|
|
1093
|
+
}), document.addEventListener("wheel", s, X), document.addEventListener("touchmove", s, X), document.addEventListener("touchstart", p, X), function() {
|
|
1094
|
+
Y = Y.filter(function(c) {
|
|
1095
1095
|
return c !== r;
|
|
1096
|
-
}), document.removeEventListener("wheel", s,
|
|
1096
|
+
}), document.removeEventListener("wheel", s, X), document.removeEventListener("touchmove", s, X), document.removeEventListener("touchstart", p, X);
|
|
1097
1097
|
};
|
|
1098
1098
|
}, []);
|
|
1099
|
-
var
|
|
1099
|
+
var v = e.removeScrollBar, $ = e.inert;
|
|
1100
1100
|
return m.createElement(
|
|
1101
1101
|
m.Fragment,
|
|
1102
1102
|
null,
|
|
1103
|
-
|
|
1104
|
-
|
|
1103
|
+
$ ? m.createElement(r, { styles: Wn(a) }) : null,
|
|
1104
|
+
v ? m.createElement(In, { gapMode: "margin" }) : null
|
|
1105
1105
|
);
|
|
1106
1106
|
}
|
|
1107
|
-
const
|
|
1108
|
-
var
|
|
1109
|
-
return m.createElement(
|
|
1107
|
+
const Hn = yn(st, qn);
|
|
1108
|
+
var vt = m.forwardRef(function(e, n) {
|
|
1109
|
+
return m.createElement(be, M({}, e, { ref: n, sideCar: Hn }));
|
|
1110
1110
|
});
|
|
1111
|
-
|
|
1112
|
-
var
|
|
1111
|
+
vt.classNames = be.classNames;
|
|
1112
|
+
var Vn = function(e) {
|
|
1113
1113
|
if (typeof document > "u")
|
|
1114
1114
|
return null;
|
|
1115
1115
|
var n = Array.isArray(e) ? e[0] : e;
|
|
1116
1116
|
return n.ownerDocument.body;
|
|
1117
|
-
},
|
|
1118
|
-
return e && (e.host ||
|
|
1119
|
-
},
|
|
1117
|
+
}, Z = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), pe = {}, Ce = 0, ht = function(e) {
|
|
1118
|
+
return e && (e.host || ht(e.parentNode));
|
|
1119
|
+
}, Kn = function(e, n) {
|
|
1120
1120
|
return n.map(function(t) {
|
|
1121
1121
|
if (e.contains(t))
|
|
1122
1122
|
return t;
|
|
1123
|
-
var o =
|
|
1123
|
+
var o = ht(t);
|
|
1124
1124
|
return o && e.contains(o) ? o : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
1125
1125
|
}).filter(function(t) {
|
|
1126
1126
|
return !!t;
|
|
1127
1127
|
});
|
|
1128
1128
|
}, Gn = function(e, n, t, o) {
|
|
1129
|
-
var a =
|
|
1130
|
-
|
|
1131
|
-
var r =
|
|
1129
|
+
var a = Kn(n, Array.isArray(e) ? e : [e]);
|
|
1130
|
+
pe[t] || (pe[t] = /* @__PURE__ */ new WeakMap());
|
|
1131
|
+
var r = pe[t], i = [], u = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
|
|
1132
1132
|
!l || u.has(l) || (u.add(l), d(l.parentNode));
|
|
1133
1133
|
};
|
|
1134
1134
|
a.forEach(d);
|
|
1135
1135
|
var p = function(l) {
|
|
1136
|
-
!l || s.has(l) || Array.prototype.forEach.call(l.children, function(
|
|
1137
|
-
if (u.has(
|
|
1138
|
-
p(
|
|
1136
|
+
!l || s.has(l) || Array.prototype.forEach.call(l.children, function(f) {
|
|
1137
|
+
if (u.has(f))
|
|
1138
|
+
p(f);
|
|
1139
1139
|
else {
|
|
1140
|
-
var
|
|
1141
|
-
|
|
1140
|
+
var v = f.getAttribute(o), $ = v !== null && v !== "false", c = (Z.get(f) || 0) + 1, h = (r.get(f) || 0) + 1;
|
|
1141
|
+
Z.set(f, c), r.set(f, h), i.push(f), c === 1 && $ && de.set(f, !0), h === 1 && f.setAttribute(t, "true"), $ || f.setAttribute(o, "true");
|
|
1142
1142
|
}
|
|
1143
1143
|
});
|
|
1144
1144
|
};
|
|
1145
|
-
return p(n), u.clear(),
|
|
1145
|
+
return p(n), u.clear(), Ce++, function() {
|
|
1146
1146
|
i.forEach(function(l) {
|
|
1147
|
-
var
|
|
1148
|
-
|
|
1149
|
-
}),
|
|
1147
|
+
var f = Z.get(l) - 1, v = r.get(l) - 1;
|
|
1148
|
+
Z.set(l, f), r.set(l, v), f || (de.has(l) || l.removeAttribute(o), de.delete(l)), v || l.removeAttribute(t);
|
|
1149
|
+
}), Ce--, Ce || (Z = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), pe = {});
|
|
1150
1150
|
};
|
|
1151
|
-
},
|
|
1151
|
+
}, Xn = function(e, n, t) {
|
|
1152
1152
|
t === void 0 && (t = "data-aria-hidden");
|
|
1153
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1153
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = Vn(e);
|
|
1154
1154
|
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Gn(o, a, t, "aria-hidden")) : function() {
|
|
1155
1155
|
return null;
|
|
1156
1156
|
};
|
|
1157
1157
|
};
|
|
1158
|
-
const
|
|
1159
|
-
const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, u =
|
|
1158
|
+
const mt = "Dialog", [gt, $o] = kt(mt), [Yn, I] = gt(mt), Zn = (e) => {
|
|
1159
|
+
const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, u = C(null), s = C(null), [d = !1, p] = Bt({
|
|
1160
1160
|
prop: o,
|
|
1161
1161
|
defaultProp: a,
|
|
1162
1162
|
onChange: r
|
|
1163
1163
|
});
|
|
1164
|
-
return /* @__PURE__ */ g(
|
|
1164
|
+
return /* @__PURE__ */ g(Yn, {
|
|
1165
1165
|
scope: n,
|
|
1166
1166
|
triggerRef: u,
|
|
1167
1167
|
contentRef: s,
|
|
1168
|
-
contentId:
|
|
1169
|
-
titleId:
|
|
1170
|
-
descriptionId:
|
|
1168
|
+
contentId: $e(),
|
|
1169
|
+
titleId: $e(),
|
|
1170
|
+
descriptionId: $e(),
|
|
1171
1171
|
open: d,
|
|
1172
1172
|
onOpenChange: p,
|
|
1173
|
-
onOpenToggle:
|
|
1173
|
+
onOpenToggle: J(
|
|
1174
1174
|
() => p(
|
|
1175
1175
|
(l) => !l
|
|
1176
1176
|
),
|
|
@@ -1180,54 +1180,54 @@ const ht = "Dialog", [mt, bo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
|
|
|
1180
1180
|
),
|
|
1181
1181
|
modal: i
|
|
1182
1182
|
}, t);
|
|
1183
|
-
},
|
|
1184
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1185
|
-
return /* @__PURE__ */ g(
|
|
1183
|
+
}, Qn = "DialogTrigger", Jn = /* @__PURE__ */ S((e, n) => {
|
|
1184
|
+
const { __scopeDialog: t, ...o } = e, a = I(Qn, t), r = ee(n, a.triggerRef);
|
|
1185
|
+
return /* @__PURE__ */ g(q.button, N({
|
|
1186
1186
|
type: "button",
|
|
1187
1187
|
"aria-haspopup": "dialog",
|
|
1188
1188
|
"aria-expanded": a.open,
|
|
1189
1189
|
"aria-controls": a.contentId,
|
|
1190
|
-
"data-state":
|
|
1190
|
+
"data-state": ke(a.open)
|
|
1191
1191
|
}, o, {
|
|
1192
1192
|
ref: r,
|
|
1193
|
-
onClick:
|
|
1193
|
+
onClick: W(e.onClick, a.onOpenToggle)
|
|
1194
1194
|
}));
|
|
1195
|
-
}),
|
|
1195
|
+
}), _t = "DialogPortal", [er, bt] = gt(_t, {
|
|
1196
1196
|
forceMount: void 0
|
|
1197
|
-
}),
|
|
1198
|
-
const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r =
|
|
1199
|
-
return /* @__PURE__ */ g(
|
|
1197
|
+
}), tr = (e) => {
|
|
1198
|
+
const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = I(_t, n);
|
|
1199
|
+
return /* @__PURE__ */ g(er, {
|
|
1200
1200
|
scope: n,
|
|
1201
1201
|
forceMount: t
|
|
1202
|
-
},
|
|
1202
|
+
}, D.map(
|
|
1203
1203
|
o,
|
|
1204
|
-
(i) => /* @__PURE__ */ g(
|
|
1204
|
+
(i) => /* @__PURE__ */ g(_e, {
|
|
1205
1205
|
present: t || r.open
|
|
1206
|
-
}, /* @__PURE__ */ g(
|
|
1206
|
+
}, /* @__PURE__ */ g(cn, {
|
|
1207
1207
|
asChild: !0,
|
|
1208
1208
|
container: a
|
|
1209
1209
|
}, i))
|
|
1210
1210
|
));
|
|
1211
|
-
},
|
|
1212
|
-
const t =
|
|
1213
|
-
return r.modal ? /* @__PURE__ */ g(
|
|
1211
|
+
}, De = "DialogOverlay", nr = /* @__PURE__ */ S((e, n) => {
|
|
1212
|
+
const t = bt(De, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = I(De, e.__scopeDialog);
|
|
1213
|
+
return r.modal ? /* @__PURE__ */ g(_e, {
|
|
1214
1214
|
present: o || r.open
|
|
1215
|
-
}, /* @__PURE__ */ g(
|
|
1215
|
+
}, /* @__PURE__ */ g(rr, N({}, a, {
|
|
1216
1216
|
ref: n
|
|
1217
1217
|
}))) : null;
|
|
1218
|
-
}),
|
|
1219
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1218
|
+
}), rr = /* @__PURE__ */ S((e, n) => {
|
|
1219
|
+
const { __scopeDialog: t, ...o } = e, a = I(De, t);
|
|
1220
1220
|
return (
|
|
1221
1221
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1222
1222
|
// ie. when `Overlay` and `Content` are siblings
|
|
1223
|
-
/* @__PURE__ */ g(
|
|
1224
|
-
as:
|
|
1223
|
+
/* @__PURE__ */ g(vt, {
|
|
1224
|
+
as: Me,
|
|
1225
1225
|
allowPinchZoom: !0,
|
|
1226
1226
|
shards: [
|
|
1227
1227
|
a.contentRef
|
|
1228
1228
|
]
|
|
1229
|
-
}, /* @__PURE__ */ g(
|
|
1230
|
-
"data-state":
|
|
1229
|
+
}, /* @__PURE__ */ g(q.div, N({
|
|
1230
|
+
"data-state": ke(a.open)
|
|
1231
1231
|
}, o, {
|
|
1232
1232
|
ref: n,
|
|
1233
1233
|
style: {
|
|
@@ -1236,41 +1236,41 @@ const ht = "Dialog", [mt, bo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
})))
|
|
1238
1238
|
);
|
|
1239
|
-
}),
|
|
1240
|
-
const t =
|
|
1241
|
-
return /* @__PURE__ */ g(
|
|
1239
|
+
}), ie = "DialogContent", or = /* @__PURE__ */ S((e, n) => {
|
|
1240
|
+
const t = bt(ie, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = I(ie, e.__scopeDialog);
|
|
1241
|
+
return /* @__PURE__ */ g(_e, {
|
|
1242
1242
|
present: o || r.open
|
|
1243
|
-
}, r.modal ? /* @__PURE__ */ g(
|
|
1243
|
+
}, r.modal ? /* @__PURE__ */ g(ar, N({}, a, {
|
|
1244
1244
|
ref: n
|
|
1245
|
-
})) : /* @__PURE__ */ g(
|
|
1245
|
+
})) : /* @__PURE__ */ g(ir, N({}, a, {
|
|
1246
1246
|
ref: n
|
|
1247
1247
|
})));
|
|
1248
|
-
}),
|
|
1249
|
-
const t =
|
|
1248
|
+
}), ar = /* @__PURE__ */ S((e, n) => {
|
|
1249
|
+
const t = I(ie, e.__scopeDialog), o = C(null), a = ee(n, t.contentRef, o);
|
|
1250
1250
|
return A(() => {
|
|
1251
1251
|
const r = o.current;
|
|
1252
1252
|
if (r)
|
|
1253
|
-
return
|
|
1254
|
-
}, []), /* @__PURE__ */ g(
|
|
1253
|
+
return Xn(r);
|
|
1254
|
+
}, []), /* @__PURE__ */ g($t, N({}, e, {
|
|
1255
1255
|
ref: a,
|
|
1256
1256
|
trapFocus: t.open,
|
|
1257
1257
|
disableOutsidePointerEvents: !0,
|
|
1258
|
-
onCloseAutoFocus:
|
|
1258
|
+
onCloseAutoFocus: W(e.onCloseAutoFocus, (r) => {
|
|
1259
1259
|
var i;
|
|
1260
1260
|
r.preventDefault(), (i = t.triggerRef.current) === null || i === void 0 || i.focus();
|
|
1261
1261
|
}),
|
|
1262
|
-
onPointerDownOutside:
|
|
1262
|
+
onPointerDownOutside: W(e.onPointerDownOutside, (r) => {
|
|
1263
1263
|
const i = r.detail.originalEvent, u = i.button === 0 && i.ctrlKey === !0;
|
|
1264
1264
|
(i.button === 2 || u) && r.preventDefault();
|
|
1265
1265
|
}),
|
|
1266
|
-
onFocusOutside:
|
|
1266
|
+
onFocusOutside: W(
|
|
1267
1267
|
e.onFocusOutside,
|
|
1268
1268
|
(r) => r.preventDefault()
|
|
1269
1269
|
)
|
|
1270
1270
|
}));
|
|
1271
|
-
}),
|
|
1272
|
-
const t =
|
|
1273
|
-
return /* @__PURE__ */ g(
|
|
1271
|
+
}), ir = /* @__PURE__ */ S((e, n) => {
|
|
1272
|
+
const t = I(ie, e.__scopeDialog), o = C(!1), a = C(!1);
|
|
1273
|
+
return /* @__PURE__ */ g($t, N({}, e, {
|
|
1274
1274
|
ref: n,
|
|
1275
1275
|
trapFocus: !1,
|
|
1276
1276
|
disableOutsidePointerEvents: !1,
|
|
@@ -1289,59 +1289,59 @@ const ht = "Dialog", [mt, bo] = Mt(ht), [Xn, L] = mt(ht), Yn = (e) => {
|
|
|
1289
1289
|
((u = t.triggerRef.current) === null || u === void 0 ? void 0 : u.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
|
|
1290
1290
|
}
|
|
1291
1291
|
}));
|
|
1292
|
-
}),
|
|
1293
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, u =
|
|
1294
|
-
return
|
|
1292
|
+
}), $t = /* @__PURE__ */ S((e, n) => {
|
|
1293
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, u = I(ie, t), s = C(null), d = ee(n, s);
|
|
1294
|
+
return dn(), /* @__PURE__ */ g(Re, null, /* @__PURE__ */ g(en, {
|
|
1295
1295
|
asChild: !0,
|
|
1296
1296
|
loop: !0,
|
|
1297
1297
|
trapped: o,
|
|
1298
1298
|
onMountAutoFocus: a,
|
|
1299
1299
|
onUnmountAutoFocus: r
|
|
1300
|
-
}, /* @__PURE__ */ g(
|
|
1300
|
+
}, /* @__PURE__ */ g(Zt, N({
|
|
1301
1301
|
role: "dialog",
|
|
1302
1302
|
id: u.contentId,
|
|
1303
1303
|
"aria-describedby": u.descriptionId,
|
|
1304
1304
|
"aria-labelledby": u.titleId,
|
|
1305
|
-
"data-state":
|
|
1305
|
+
"data-state": ke(u.open)
|
|
1306
1306
|
}, i, {
|
|
1307
1307
|
ref: d,
|
|
1308
1308
|
onDismiss: () => u.onOpenChange(!1)
|
|
1309
1309
|
}))), !1);
|
|
1310
|
-
}),
|
|
1311
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1312
|
-
return /* @__PURE__ */ g(
|
|
1310
|
+
}), ur = "DialogTitle", cr = /* @__PURE__ */ S((e, n) => {
|
|
1311
|
+
const { __scopeDialog: t, ...o } = e, a = I(ur, t);
|
|
1312
|
+
return /* @__PURE__ */ g(q.h2, N({
|
|
1313
1313
|
id: a.titleId
|
|
1314
1314
|
}, o, {
|
|
1315
1315
|
ref: n
|
|
1316
1316
|
}));
|
|
1317
|
-
}),
|
|
1318
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1319
|
-
return /* @__PURE__ */ g(
|
|
1317
|
+
}), sr = "DialogDescription", lr = /* @__PURE__ */ S((e, n) => {
|
|
1318
|
+
const { __scopeDialog: t, ...o } = e, a = I(sr, t);
|
|
1319
|
+
return /* @__PURE__ */ g(q.p, N({
|
|
1320
1320
|
id: a.descriptionId
|
|
1321
1321
|
}, o, {
|
|
1322
1322
|
ref: n
|
|
1323
1323
|
}));
|
|
1324
|
-
}),
|
|
1325
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1326
|
-
return /* @__PURE__ */ g(
|
|
1324
|
+
}), dr = "DialogClose", pr = /* @__PURE__ */ S((e, n) => {
|
|
1325
|
+
const { __scopeDialog: t, ...o } = e, a = I(dr, t);
|
|
1326
|
+
return /* @__PURE__ */ g(q.button, N({
|
|
1327
1327
|
type: "button"
|
|
1328
1328
|
}, o, {
|
|
1329
1329
|
ref: n,
|
|
1330
|
-
onClick:
|
|
1330
|
+
onClick: W(
|
|
1331
1331
|
e.onClick,
|
|
1332
1332
|
() => a.onOpenChange(!1)
|
|
1333
1333
|
)
|
|
1334
1334
|
}));
|
|
1335
1335
|
});
|
|
1336
|
-
function
|
|
1336
|
+
function ke(e) {
|
|
1337
1337
|
return e ? "open" : "closed";
|
|
1338
1338
|
}
|
|
1339
|
-
const
|
|
1339
|
+
const fr = Zn, vr = Jn, hr = tr, mr = nr, gr = or, _r = cr, Xe = lr, br = pr, Ye = {
|
|
1340
1340
|
SM: "sm",
|
|
1341
1341
|
MD: "md",
|
|
1342
1342
|
LG: "lg"
|
|
1343
1343
|
};
|
|
1344
|
-
function
|
|
1344
|
+
function $r(e) {
|
|
1345
1345
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1346
1346
|
}
|
|
1347
1347
|
var yt = { exports: {} };
|
|
@@ -1381,42 +1381,42 @@ var yt = { exports: {} };
|
|
|
1381
1381
|
})();
|
|
1382
1382
|
})(yt);
|
|
1383
1383
|
var yr = yt.exports;
|
|
1384
|
-
const
|
|
1384
|
+
const Ze = /* @__PURE__ */ $r(yr), Er = "_rotate_1xozj_1", wr = "_dash_1xozj_1", ne = {
|
|
1385
1385
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1386
|
-
rotate:
|
|
1386
|
+
rotate: Er,
|
|
1387
1387
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
1388
1388
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
1389
1389
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
1390
1390
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
1391
1391
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
1392
1392
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
1393
|
-
dash:
|
|
1393
|
+
dash: wr,
|
|
1394
1394
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1395
1395
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1396
|
-
},
|
|
1396
|
+
}, re = "purpur-spinner", xr = {
|
|
1397
1397
|
XXS: "xxs",
|
|
1398
1398
|
XS: "xs",
|
|
1399
1399
|
SM: "sm",
|
|
1400
1400
|
MD: "md",
|
|
1401
1401
|
LG: "lg"
|
|
1402
|
-
},
|
|
1402
|
+
}, Sr = ({
|
|
1403
1403
|
["data-testid"]: e,
|
|
1404
1404
|
disabled: n = !1,
|
|
1405
1405
|
negative: t = !1,
|
|
1406
|
-
size: o =
|
|
1406
|
+
size: o = xr.SM,
|
|
1407
1407
|
...a
|
|
1408
1408
|
}) => /* @__PURE__ */ _(
|
|
1409
1409
|
"div",
|
|
1410
1410
|
{
|
|
1411
|
-
className:
|
|
1411
|
+
className: Ze([ne[re], ne[`${re}--${o}`]]),
|
|
1412
1412
|
"data-testid": e,
|
|
1413
1413
|
...a,
|
|
1414
1414
|
children: /* @__PURE__ */ _("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ _(
|
|
1415
1415
|
"circle",
|
|
1416
1416
|
{
|
|
1417
|
-
className:
|
|
1418
|
-
[
|
|
1419
|
-
[
|
|
1417
|
+
className: Ze(ne[`${re}__circle`], {
|
|
1418
|
+
[ne[`${re}__circle--disabled`]]: n,
|
|
1419
|
+
[ne[`${re}__circle--negative`]]: t
|
|
1420
1420
|
}),
|
|
1421
1421
|
cx: "25",
|
|
1422
1422
|
cy: "25",
|
|
@@ -1425,10 +1425,10 @@ const Ye = /* @__PURE__ */ br(yr), $r = "_rotate_1xozj_1", Er = "_dash_1xozj_1",
|
|
|
1425
1425
|
) })
|
|
1426
1426
|
}
|
|
1427
1427
|
);
|
|
1428
|
-
function
|
|
1428
|
+
function Cr(e) {
|
|
1429
1429
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1430
1430
|
}
|
|
1431
|
-
var
|
|
1431
|
+
var Et = { exports: {} };
|
|
1432
1432
|
/*!
|
|
1433
1433
|
Copyright (c) 2018 Jed Watson.
|
|
1434
1434
|
Licensed under the MIT License (MIT), see
|
|
@@ -1463,9 +1463,9 @@ var $t = { exports: {} };
|
|
|
1463
1463
|
}
|
|
1464
1464
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1465
1465
|
})();
|
|
1466
|
-
})(
|
|
1467
|
-
var
|
|
1468
|
-
const
|
|
1466
|
+
})(Et);
|
|
1467
|
+
var Or = Et.exports;
|
|
1468
|
+
const Pr = /* @__PURE__ */ Cr(Or), H = {
|
|
1469
1469
|
"purpur-button": "_purpur-button_u2yv5_1",
|
|
1470
1470
|
"purpur-button--sm": "_purpur-button--sm_u2yv5_33",
|
|
1471
1471
|
"purpur-button--icon-only": "_purpur-button--icon-only_u2yv5_36",
|
|
@@ -1486,7 +1486,7 @@ const Or = /* @__PURE__ */ Sr(Cr), z = {
|
|
|
1486
1486
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_u2yv5_160",
|
|
1487
1487
|
"purpur-button--text-negative": "_purpur-button--text-negative_u2yv5_175",
|
|
1488
1488
|
"purpur-button--text": "_purpur-button--text_u2yv5_175"
|
|
1489
|
-
},
|
|
1489
|
+
}, V = "purpur-button", Nr = ({
|
|
1490
1490
|
children: e,
|
|
1491
1491
|
className: n,
|
|
1492
1492
|
["data-testid"]: t,
|
|
@@ -1496,52 +1496,52 @@ const Or = /* @__PURE__ */ Sr(Cr), z = {
|
|
|
1496
1496
|
loading: i = !1,
|
|
1497
1497
|
negative: u = !1,
|
|
1498
1498
|
onClick: s,
|
|
1499
|
-
size: d =
|
|
1499
|
+
size: d = Ye.MD,
|
|
1500
1500
|
variant: p,
|
|
1501
1501
|
type: l = "button",
|
|
1502
|
-
...
|
|
1503
|
-
},
|
|
1502
|
+
...f
|
|
1503
|
+
}, v) => {
|
|
1504
1504
|
if (r && p === "destructive")
|
|
1505
1505
|
return null;
|
|
1506
|
-
const
|
|
1506
|
+
const $ = Pr(
|
|
1507
1507
|
[
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1508
|
+
H[V],
|
|
1509
|
+
H[`${V}--${u ? `${p}-negative` : p}`],
|
|
1510
|
+
H[`${V}--${d}`]
|
|
1511
1511
|
],
|
|
1512
1512
|
{
|
|
1513
|
-
[
|
|
1514
|
-
[
|
|
1515
|
-
[
|
|
1516
|
-
[
|
|
1513
|
+
[H[`${V}--icon-only`]]: r,
|
|
1514
|
+
[H[`${V}--negative`]]: u,
|
|
1515
|
+
[H[`${V}--full-width`]]: a,
|
|
1516
|
+
[H[`${V}--disabled`]]: o || i
|
|
1517
1517
|
},
|
|
1518
1518
|
n
|
|
1519
|
-
), c = (
|
|
1520
|
-
o || i ?
|
|
1519
|
+
), c = (h) => {
|
|
1520
|
+
o || i ? h.preventDefault() : s && s(h);
|
|
1521
1521
|
};
|
|
1522
|
-
return /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ U(
|
|
1523
1523
|
"button",
|
|
1524
1524
|
{
|
|
1525
|
-
className:
|
|
1525
|
+
className: $,
|
|
1526
1526
|
"data-testid": t,
|
|
1527
1527
|
type: l,
|
|
1528
|
-
ref:
|
|
1529
|
-
"aria-disabled":
|
|
1528
|
+
ref: v,
|
|
1529
|
+
"aria-disabled": f["aria-disabled"] || o || i,
|
|
1530
1530
|
onClick: c,
|
|
1531
|
-
...
|
|
1531
|
+
...f,
|
|
1532
1532
|
children: [
|
|
1533
|
-
i && /* @__PURE__ */ _(
|
|
1533
|
+
i && /* @__PURE__ */ _(Sr, { size: d === Ye.LG ? "xs" : "xxs", negative: u, disabled: o }),
|
|
1534
1534
|
" ",
|
|
1535
1535
|
e
|
|
1536
1536
|
]
|
|
1537
1537
|
}
|
|
1538
1538
|
);
|
|
1539
|
-
}, Le = S(
|
|
1539
|
+
}, Le = S(Nr);
|
|
1540
1540
|
Le.displayName = "Button";
|
|
1541
|
-
function
|
|
1541
|
+
function Ar(e) {
|
|
1542
1542
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1543
1543
|
}
|
|
1544
|
-
var
|
|
1544
|
+
var wt = { exports: {} };
|
|
1545
1545
|
/*!
|
|
1546
1546
|
Copyright (c) 2018 Jed Watson.
|
|
1547
1547
|
Licensed under the MIT License (MIT), see
|
|
@@ -1576,9 +1576,9 @@ var Et = { exports: {} };
|
|
|
1576
1576
|
}
|
|
1577
1577
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1578
1578
|
})();
|
|
1579
|
-
})(
|
|
1580
|
-
var
|
|
1581
|
-
const
|
|
1579
|
+
})(wt);
|
|
1580
|
+
var Tr = wt.exports;
|
|
1581
|
+
const Dr = /* @__PURE__ */ Ar(Tr), fe = {
|
|
1582
1582
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1583
1583
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1584
1584
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1594,7 +1594,7 @@ const Tr = /* @__PURE__ */ Nr(Ar), pe = {
|
|
|
1594
1594
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
1595
1595
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
1596
1596
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
1597
|
-
},
|
|
1597
|
+
}, Ir = {
|
|
1598
1598
|
TITLE100: "title-100",
|
|
1599
1599
|
TITLE200: "title-200",
|
|
1600
1600
|
TITLE300: "title-300",
|
|
@@ -1603,31 +1603,31 @@ const Tr = /* @__PURE__ */ Nr(Ar), pe = {
|
|
|
1603
1603
|
TITLE600: "title-600",
|
|
1604
1604
|
TITLE700: "title-700",
|
|
1605
1605
|
SUBSECTION100: "subsection-100"
|
|
1606
|
-
},
|
|
1606
|
+
}, ve = "purpur-heading", Rr = ({
|
|
1607
1607
|
["data-testid"]: e,
|
|
1608
1608
|
children: n,
|
|
1609
1609
|
className: t = "",
|
|
1610
1610
|
enableHyphenation: o = !1,
|
|
1611
1611
|
negative: a = !1,
|
|
1612
1612
|
tag: r,
|
|
1613
|
-
variant: i =
|
|
1613
|
+
variant: i = Ir.TITLE100,
|
|
1614
1614
|
...u
|
|
1615
1615
|
}) => {
|
|
1616
|
-
const s = r, d =
|
|
1616
|
+
const s = r, d = Dr([
|
|
1617
1617
|
t,
|
|
1618
|
-
|
|
1619
|
-
|
|
1618
|
+
fe[ve],
|
|
1619
|
+
fe[`${ve}--${i}`],
|
|
1620
1620
|
{
|
|
1621
|
-
[
|
|
1622
|
-
[
|
|
1621
|
+
[fe[`${ve}--hyphens`]]: o,
|
|
1622
|
+
[fe[`${ve}--negative`]]: a
|
|
1623
1623
|
}
|
|
1624
1624
|
]);
|
|
1625
1625
|
return /* @__PURE__ */ _(s, { ...u, className: d, "data-testid": e, children: n });
|
|
1626
1626
|
};
|
|
1627
|
-
function
|
|
1627
|
+
function Mr(e) {
|
|
1628
1628
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1629
1629
|
}
|
|
1630
|
-
var
|
|
1630
|
+
var xt = { exports: {} };
|
|
1631
1631
|
/*!
|
|
1632
1632
|
Copyright (c) 2018 Jed Watson.
|
|
1633
1633
|
Licensed under the MIT License (MIT), see
|
|
@@ -1662,9 +1662,9 @@ var wt = { exports: {} };
|
|
|
1662
1662
|
}
|
|
1663
1663
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1664
1664
|
})();
|
|
1665
|
-
})(
|
|
1666
|
-
var
|
|
1667
|
-
const Lr = /* @__PURE__ */
|
|
1665
|
+
})(xt);
|
|
1666
|
+
var kr = xt.exports;
|
|
1667
|
+
const Lr = /* @__PURE__ */ Mr(kr), Fr = {
|
|
1668
1668
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1669
1669
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1670
1670
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1672,39 +1672,39 @@ const Lr = /* @__PURE__ */ Rr(Mr), kr = {
|
|
|
1672
1672
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1673
1673
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1674
1674
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1675
|
-
},
|
|
1675
|
+
}, jr = {
|
|
1676
1676
|
name: "close",
|
|
1677
1677
|
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>',
|
|
1678
1678
|
keywords: ["close"],
|
|
1679
1679
|
category: "utility"
|
|
1680
|
-
},
|
|
1681
|
-
|
|
1680
|
+
}, St = (e) => /* @__PURE__ */ _(
|
|
1681
|
+
Hr,
|
|
1682
1682
|
{
|
|
1683
1683
|
...e,
|
|
1684
|
-
svg:
|
|
1684
|
+
svg: jr
|
|
1685
1685
|
}
|
|
1686
1686
|
);
|
|
1687
|
-
|
|
1688
|
-
const
|
|
1687
|
+
St.displayName = "IconClose";
|
|
1688
|
+
const Br = Lr.bind(Fr), Qe = "purpur-icon", Ur = "md", Wr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), zr = ({ content: e = "", title: n } = {}) => {
|
|
1689
1689
|
const t = [
|
|
1690
1690
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1691
1691
|
{ name: "fill", value: "currentColor" },
|
|
1692
1692
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1693
1693
|
n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1694
1694
|
], o = n ? `<title>${n}</title>` : "";
|
|
1695
|
-
return `<svg ${
|
|
1696
|
-
},
|
|
1695
|
+
return `<svg ${Wr(t)}>${o}${e}</svg>`;
|
|
1696
|
+
}, qr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Hr = ({
|
|
1697
1697
|
["data-testid"]: e,
|
|
1698
1698
|
svg: n,
|
|
1699
1699
|
allyTitle: t,
|
|
1700
1700
|
className: o = "",
|
|
1701
|
-
size: a =
|
|
1701
|
+
size: a = Ur,
|
|
1702
1702
|
...r
|
|
1703
1703
|
}) => {
|
|
1704
|
-
const i =
|
|
1705
|
-
content:
|
|
1704
|
+
const i = zr({
|
|
1705
|
+
content: qr(n.svg),
|
|
1706
1706
|
title: t
|
|
1707
|
-
}), u =
|
|
1707
|
+
}), u = Br(o, Qe, `${Qe}--${a}`);
|
|
1708
1708
|
return /* @__PURE__ */ _(
|
|
1709
1709
|
"span",
|
|
1710
1710
|
{
|
|
@@ -1716,10 +1716,10 @@ const jr = Lr.bind(kr), Ze = "purpur-icon", Br = "md", qr = (e) => e.filter((n)
|
|
|
1716
1716
|
}
|
|
1717
1717
|
);
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function Vr(e) {
|
|
1720
1720
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1721
1721
|
}
|
|
1722
|
-
var
|
|
1722
|
+
var Ct = { exports: {} };
|
|
1723
1723
|
/*!
|
|
1724
1724
|
Copyright (c) 2018 Jed Watson.
|
|
1725
1725
|
Licensed under the MIT License (MIT), see
|
|
@@ -1754,9 +1754,9 @@ var St = { exports: {} };
|
|
|
1754
1754
|
}
|
|
1755
1755
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1756
1756
|
})();
|
|
1757
|
-
})(
|
|
1758
|
-
var
|
|
1759
|
-
const Gr = /* @__PURE__ */
|
|
1757
|
+
})(Ct);
|
|
1758
|
+
var Kr = Ct.exports;
|
|
1759
|
+
const Gr = /* @__PURE__ */ Vr(Kr), oe = {
|
|
1760
1760
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
1761
1761
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
1762
1762
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -1771,7 +1771,7 @@ const Gr = /* @__PURE__ */ Hr(Vr), ne = {
|
|
|
1771
1771
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
1772
1772
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
1773
1773
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
1774
|
-
},
|
|
1774
|
+
}, Xr = {
|
|
1775
1775
|
PARAGRAPH100: "paragraph-100",
|
|
1776
1776
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
1777
1777
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
@@ -1782,72 +1782,72 @@ const Gr = /* @__PURE__ */ Hr(Vr), ne = {
|
|
|
1782
1782
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
1783
1783
|
OVERLINE100: "overline-100",
|
|
1784
1784
|
OVERLINE200: "overline-200"
|
|
1785
|
-
},
|
|
1785
|
+
}, ae = "purpur-paragraph", Yr = ({
|
|
1786
1786
|
["data-testid"]: e,
|
|
1787
1787
|
children: n,
|
|
1788
1788
|
className: t = "",
|
|
1789
1789
|
disabled: o,
|
|
1790
1790
|
enableHyphenation: a = !1,
|
|
1791
1791
|
negative: r = !1,
|
|
1792
|
-
variant: i =
|
|
1792
|
+
variant: i = Xr.PARAGRAPH100,
|
|
1793
1793
|
...u
|
|
1794
1794
|
}) => {
|
|
1795
1795
|
const s = Gr([
|
|
1796
1796
|
t,
|
|
1797
|
-
|
|
1798
|
-
|
|
1797
|
+
oe[ae],
|
|
1798
|
+
oe[`${ae}--${i}`],
|
|
1799
1799
|
{
|
|
1800
|
-
[
|
|
1801
|
-
[
|
|
1802
|
-
[
|
|
1800
|
+
[oe[`${ae}--hyphens`]]: a,
|
|
1801
|
+
[oe[`${ae}--disabled`]]: o,
|
|
1802
|
+
[oe[`${ae}--negative`]]: r
|
|
1803
1803
|
}
|
|
1804
1804
|
]);
|
|
1805
1805
|
return /* @__PURE__ */ _("p", { ...u, className: s, "data-testid": e, children: n });
|
|
1806
|
-
},
|
|
1807
|
-
function
|
|
1808
|
-
return
|
|
1806
|
+
}, Zr = "600px";
|
|
1807
|
+
function Q() {
|
|
1808
|
+
return Q = Object.assign ? Object.assign.bind() : function(e) {
|
|
1809
1809
|
for (var n = 1; n < arguments.length; n++) {
|
|
1810
1810
|
var t = arguments[n];
|
|
1811
1811
|
for (var o in t)
|
|
1812
1812
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
1813
1813
|
}
|
|
1814
1814
|
return e;
|
|
1815
|
-
},
|
|
1815
|
+
}, Q.apply(this, arguments);
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1817
|
+
function Qr(e, n) {
|
|
1818
1818
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function Jr(...e) {
|
|
1821
1821
|
return (n) => e.forEach(
|
|
1822
|
-
(t) =>
|
|
1822
|
+
(t) => Qr(t, n)
|
|
1823
1823
|
);
|
|
1824
1824
|
}
|
|
1825
|
-
const
|
|
1826
|
-
const { children: t, ...o } = e, a =
|
|
1825
|
+
const Ot = /* @__PURE__ */ S((e, n) => {
|
|
1826
|
+
const { children: t, ...o } = e, a = D.toArray(t), r = a.find(to);
|
|
1827
1827
|
if (r) {
|
|
1828
|
-
const i = r.props.children, u = a.map((s) => s === r ?
|
|
1829
|
-
return /* @__PURE__ */ g(
|
|
1828
|
+
const i = r.props.children, u = a.map((s) => s === r ? D.count(i) > 1 ? D.only(null) : /* @__PURE__ */ z(i) ? i.props.children : null : s);
|
|
1829
|
+
return /* @__PURE__ */ g(Ie, Q({}, o, {
|
|
1830
1830
|
ref: n
|
|
1831
|
-
}), /* @__PURE__ */
|
|
1831
|
+
}), /* @__PURE__ */ z(i) ? /* @__PURE__ */ ue(i, void 0, u) : null);
|
|
1832
1832
|
}
|
|
1833
|
-
return /* @__PURE__ */ g(
|
|
1833
|
+
return /* @__PURE__ */ g(Ie, Q({}, o, {
|
|
1834
1834
|
ref: n
|
|
1835
1835
|
}), t);
|
|
1836
1836
|
});
|
|
1837
|
-
|
|
1838
|
-
const
|
|
1837
|
+
Ot.displayName = "Slot";
|
|
1838
|
+
const Ie = /* @__PURE__ */ S((e, n) => {
|
|
1839
1839
|
const { children: t, ...o } = e;
|
|
1840
|
-
return /* @__PURE__ */
|
|
1841
|
-
...
|
|
1842
|
-
ref: n ?
|
|
1843
|
-
}) :
|
|
1840
|
+
return /* @__PURE__ */ z(t) ? /* @__PURE__ */ ue(t, {
|
|
1841
|
+
...no(o, t.props),
|
|
1842
|
+
ref: n ? Jr(n, t.ref) : t.ref
|
|
1843
|
+
}) : D.count(t) > 1 ? D.only(null) : null;
|
|
1844
1844
|
});
|
|
1845
|
-
|
|
1846
|
-
const
|
|
1847
|
-
function
|
|
1848
|
-
return /* @__PURE__ */
|
|
1845
|
+
Ie.displayName = "SlotClone";
|
|
1846
|
+
const eo = ({ children: e }) => /* @__PURE__ */ g(Re, null, e);
|
|
1847
|
+
function to(e) {
|
|
1848
|
+
return /* @__PURE__ */ z(e) && e.type === eo;
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function no(e, n) {
|
|
1851
1851
|
const t = {
|
|
1852
1852
|
...n
|
|
1853
1853
|
};
|
|
@@ -1868,7 +1868,7 @@ function to(e, n) {
|
|
|
1868
1868
|
...t
|
|
1869
1869
|
};
|
|
1870
1870
|
}
|
|
1871
|
-
const
|
|
1871
|
+
const ro = [
|
|
1872
1872
|
"a",
|
|
1873
1873
|
"button",
|
|
1874
1874
|
"div",
|
|
@@ -1885,12 +1885,12 @@ const no = [
|
|
|
1885
1885
|
"span",
|
|
1886
1886
|
"svg",
|
|
1887
1887
|
"ul"
|
|
1888
|
-
],
|
|
1888
|
+
], oo = ro.reduce((e, n) => {
|
|
1889
1889
|
const t = /* @__PURE__ */ S((o, a) => {
|
|
1890
|
-
const { asChild: r, ...i } = o, u = r ?
|
|
1890
|
+
const { asChild: r, ...i } = o, u = r ? Ot : n;
|
|
1891
1891
|
return A(() => {
|
|
1892
1892
|
window[Symbol.for("radix-ui")] = !0;
|
|
1893
|
-
}, []), /* @__PURE__ */ g(u,
|
|
1893
|
+
}, []), /* @__PURE__ */ g(u, Q({}, i, {
|
|
1894
1894
|
ref: a
|
|
1895
1895
|
}));
|
|
1896
1896
|
});
|
|
@@ -1898,7 +1898,7 @@ const no = [
|
|
|
1898
1898
|
...e,
|
|
1899
1899
|
[n]: t
|
|
1900
1900
|
};
|
|
1901
|
-
}, {}),
|
|
1901
|
+
}, {}), ao = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ g(oo.span, Q({}, e, {
|
|
1902
1902
|
ref: n,
|
|
1903
1903
|
style: {
|
|
1904
1904
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -1914,16 +1914,16 @@ const no = [
|
|
|
1914
1914
|
wordWrap: "normal",
|
|
1915
1915
|
...e.style
|
|
1916
1916
|
}
|
|
1917
|
-
}))),
|
|
1917
|
+
}))), io = ao, uo = ({
|
|
1918
1918
|
asChild: e,
|
|
1919
1919
|
children: n,
|
|
1920
1920
|
className: t = "",
|
|
1921
1921
|
["data-testid"]: o
|
|
1922
|
-
}) => /* @__PURE__ */ _(
|
|
1923
|
-
function
|
|
1922
|
+
}) => /* @__PURE__ */ _(io, { asChild: e, "data-testid": o, className: t, children: n });
|
|
1923
|
+
function co(e) {
|
|
1924
1924
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1925
1925
|
}
|
|
1926
|
-
var
|
|
1926
|
+
var Pt = { exports: {} };
|
|
1927
1927
|
/*!
|
|
1928
1928
|
Copyright (c) 2018 Jed Watson.
|
|
1929
1929
|
Licensed under the MIT License (MIT), see
|
|
@@ -1958,29 +1958,30 @@ var Ot = { exports: {} };
|
|
|
1958
1958
|
}
|
|
1959
1959
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1960
1960
|
})();
|
|
1961
|
-
})(
|
|
1962
|
-
var
|
|
1963
|
-
const
|
|
1964
|
-
"purpur-modal-content": "_purpur-modal-
|
|
1965
|
-
fadeIn:
|
|
1966
|
-
"purpur-modal-content__overlay": "_purpur-modal-
|
|
1967
|
-
"purpur-modal-content__close-button": "_purpur-modal-content__close-
|
|
1968
|
-
"purpur-modal-content__wrapper": "_purpur-modal-
|
|
1969
|
-
"purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-
|
|
1970
|
-
"purpur-modal-content__image-wrapper": "_purpur-modal-content__image-
|
|
1971
|
-
"purpur-modal-content__header": "_purpur-modal-
|
|
1972
|
-
"purpur-modal-content__title": "_purpur-modal-
|
|
1973
|
-
"purpur-modal-content__description": "_purpur-modal-
|
|
1974
|
-
"purpur-modal-content__body": "_purpur-modal-
|
|
1975
|
-
"purpur-modal-content__body-inner": "_purpur-modal-content__body-
|
|
1976
|
-
"purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-
|
|
1977
|
-
"purpur-modal-content__actions-button": "_purpur-modal-content__actions-
|
|
1978
|
-
"purpur-modal-
|
|
1979
|
-
"purpur-modal-content--
|
|
1980
|
-
"purpur-modal-
|
|
1981
|
-
"purpur-modal-content__actions
|
|
1982
|
-
"purpur-modal-
|
|
1983
|
-
|
|
1961
|
+
})(Pt);
|
|
1962
|
+
var so = Pt.exports;
|
|
1963
|
+
const lo = /* @__PURE__ */ co(so), po = "_fadeIn_ofk9m_1", fo = {
|
|
1964
|
+
"purpur-modal-content": "_purpur-modal-content_ofk9m_1",
|
|
1965
|
+
fadeIn: po,
|
|
1966
|
+
"purpur-modal-content__overlay": "_purpur-modal-content__overlay_ofk9m_30",
|
|
1967
|
+
"purpur-modal-content__close-button": "_purpur-modal-content__close-button_ofk9m_37",
|
|
1968
|
+
"purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_ofk9m_48",
|
|
1969
|
+
"purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-inner_ofk9m_59",
|
|
1970
|
+
"purpur-modal-content__image-wrapper": "_purpur-modal-content__image-wrapper_ofk9m_68",
|
|
1971
|
+
"purpur-modal-content__header": "_purpur-modal-content__header_ofk9m_91",
|
|
1972
|
+
"purpur-modal-content__title": "_purpur-modal-content__title_ofk9m_104",
|
|
1973
|
+
"purpur-modal-content__description": "_purpur-modal-content__description_ofk9m_107",
|
|
1974
|
+
"purpur-modal-content__body": "_purpur-modal-content__body_ofk9m_110",
|
|
1975
|
+
"purpur-modal-content__body-inner": "_purpur-modal-content__body-inner_ofk9m_120",
|
|
1976
|
+
"purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-buttons_ofk9m_132",
|
|
1977
|
+
"purpur-modal-content__actions-button": "_purpur-modal-content__actions-button_ofk9m_132",
|
|
1978
|
+
"purpur-modal-content__notification": "_purpur-modal-content__notification_ofk9m_155",
|
|
1979
|
+
"purpur-modal-content--with-image": "_purpur-modal-content--with-image_ofk9m_158",
|
|
1980
|
+
"purpur-modal-content--overflow": "_purpur-modal-content--overflow_ofk9m_158",
|
|
1981
|
+
"purpur-modal-content__actions": "_purpur-modal-content__actions_ofk9m_132",
|
|
1982
|
+
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_ofk9m_189",
|
|
1983
|
+
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_ofk9m_199"
|
|
1984
|
+
}, Je = (e) => e.showCloseButton === !0, T = lo.bind(fo), P = "purpur-modal-content", vo = S(
|
|
1984
1985
|
({
|
|
1985
1986
|
["data-testid"]: e,
|
|
1986
1987
|
actions: n,
|
|
@@ -1993,138 +1994,161 @@ const so = /* @__PURE__ */ uo(co), lo = "_fadeIn_1qmv6_1", po = {
|
|
|
1993
1994
|
primaryActionVariant: s = "primary",
|
|
1994
1995
|
stickyButtons: d = !0,
|
|
1995
1996
|
title: p,
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
{ [`${
|
|
2002
|
-
{ [`${
|
|
1997
|
+
notification: l = void 0,
|
|
1998
|
+
...f
|
|
1999
|
+
}, v) => {
|
|
2000
|
+
const { closeButtonAllyLabel: $, showCloseButton: c, ...h } = f, [y, O] = K(!1), E = C(null), w = C(null), x = C(null), k = C(null), R = T([
|
|
2001
|
+
P,
|
|
2002
|
+
{ [`${P}--with-image`]: !!u },
|
|
2003
|
+
{ [`${P}--overflow`]: y },
|
|
2004
|
+
{ [`${P}--sticky-footer`]: d },
|
|
2003
2005
|
o
|
|
2004
|
-
]),
|
|
2005
|
-
r &&
|
|
2006
|
-
},
|
|
2007
|
-
if (!
|
|
2006
|
+
]), b = (j) => e ? `${e} ${j}` : void 0, L = (j) => {
|
|
2007
|
+
r && j.preventDefault();
|
|
2008
|
+
}, F = J(() => {
|
|
2009
|
+
if (!E.current || !w.current || !x.current || !k.current)
|
|
2008
2010
|
return;
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2011
|
+
const j = window.innerWidth < parseInt(Zr), Nt = window.getComputedStyle(
|
|
2012
|
+
j ? E.current : x.current,
|
|
2011
2013
|
null
|
|
2012
|
-
),
|
|
2013
|
-
|
|
2014
|
-
}, []),
|
|
2015
|
-
r && !
|
|
2014
|
+
), At = parseFloat(Nt.getPropertyValue("height")), Tt = j ? w.current.offsetHeight : k.current.offsetHeight;
|
|
2015
|
+
O(At < Tt);
|
|
2016
|
+
}, []), te = (j) => {
|
|
2017
|
+
r && !c && j.preventDefault();
|
|
2016
2018
|
};
|
|
2017
|
-
return A(() => (window.addEventListener("resize",
|
|
2018
|
-
window.removeEventListener("resize",
|
|
2019
|
-
}), [
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2019
|
+
return A(() => (window.addEventListener("resize", F), () => {
|
|
2020
|
+
window.removeEventListener("resize", F);
|
|
2021
|
+
}), [F]), A(() => {
|
|
2022
|
+
F();
|
|
2023
|
+
}, [l, F]), /* @__PURE__ */ U(hr, { children: [
|
|
2024
|
+
/* @__PURE__ */ _(mr, { className: T(`${P}__overlay`) }),
|
|
2025
|
+
/* @__PURE__ */ U(
|
|
2026
|
+
gr,
|
|
2023
2027
|
{
|
|
2024
|
-
...
|
|
2025
|
-
className:
|
|
2028
|
+
...h,
|
|
2029
|
+
className: R,
|
|
2026
2030
|
"data-testid": e,
|
|
2027
|
-
ref:
|
|
2031
|
+
ref: v,
|
|
2028
2032
|
...!a && { "aria-describedby": void 0 },
|
|
2029
|
-
onPointerDownOutside:
|
|
2030
|
-
onOpenAutoFocus:
|
|
2031
|
-
onEscapeKeyDown:
|
|
2033
|
+
onPointerDownOutside: L,
|
|
2034
|
+
onOpenAutoFocus: F,
|
|
2035
|
+
onEscapeKeyDown: te,
|
|
2032
2036
|
children: [
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
|
|
2035
|
-
|
|
2037
|
+
/* @__PURE__ */ U("div", { ref: E, className: T(`${P}__wrapper`), children: [
|
|
2038
|
+
Je(f) && $ && u && /* @__PURE__ */ _(
|
|
2039
|
+
et,
|
|
2036
2040
|
{
|
|
2037
|
-
allyLabel:
|
|
2041
|
+
allyLabel: $,
|
|
2038
2042
|
hasImage: !0,
|
|
2039
|
-
"data-testid":
|
|
2043
|
+
"data-testid": b("close-button")
|
|
2040
2044
|
}
|
|
2041
2045
|
),
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
+
/* @__PURE__ */ U("div", { ref: w, className: T(`${P}__wrapper-inner`), children: [
|
|
2047
|
+
/* @__PURE__ */ U("div", { className: T(`${P}__header`), children: [
|
|
2048
|
+
Je(f) && $ && !u && /* @__PURE__ */ _(
|
|
2049
|
+
et,
|
|
2046
2050
|
{
|
|
2047
|
-
allyLabel:
|
|
2048
|
-
"data-testid":
|
|
2051
|
+
allyLabel: $,
|
|
2052
|
+
"data-testid": b("close-button")
|
|
2049
2053
|
}
|
|
2050
2054
|
),
|
|
2051
2055
|
/* @__PURE__ */ _(
|
|
2052
|
-
|
|
2056
|
+
_r,
|
|
2053
2057
|
{
|
|
2054
2058
|
asChild: !0,
|
|
2055
|
-
className:
|
|
2056
|
-
"data-testid":
|
|
2057
|
-
children: /* @__PURE__ */ _(
|
|
2059
|
+
className: T(`${P}__title`),
|
|
2060
|
+
"data-testid": b("title"),
|
|
2061
|
+
children: /* @__PURE__ */ _(Rr, { tag: "h2", variant: "title-200", children: p })
|
|
2058
2062
|
}
|
|
2059
2063
|
)
|
|
2060
2064
|
] }),
|
|
2061
2065
|
u && /* @__PURE__ */ _(
|
|
2062
2066
|
"div",
|
|
2063
2067
|
{
|
|
2064
|
-
className:
|
|
2065
|
-
"data-testid":
|
|
2068
|
+
className: T(`${P}__image-wrapper`),
|
|
2069
|
+
"data-testid": b("image"),
|
|
2066
2070
|
children: u
|
|
2067
2071
|
}
|
|
2068
2072
|
),
|
|
2069
|
-
/* @__PURE__ */ _("div", { ref:
|
|
2070
|
-
a && i && /* @__PURE__ */ _(
|
|
2073
|
+
/* @__PURE__ */ _("div", { ref: x, className: T(`${P}__body`), children: /* @__PURE__ */ U("div", { ref: k, className: T(`${P}__body-inner`), children: [
|
|
2074
|
+
a && i && /* @__PURE__ */ _(uo, { asChild: !0, children: /* @__PURE__ */ _(Xe, { "data-testid": b("description"), children: a }) }),
|
|
2071
2075
|
a && !i && /* @__PURE__ */ _(
|
|
2072
|
-
|
|
2076
|
+
Xe,
|
|
2073
2077
|
{
|
|
2074
2078
|
asChild: !0,
|
|
2075
|
-
className:
|
|
2076
|
-
"data-testid":
|
|
2077
|
-
children: /* @__PURE__ */ _(
|
|
2079
|
+
className: T(`${P}__description`),
|
|
2080
|
+
"data-testid": b("description"),
|
|
2081
|
+
children: /* @__PURE__ */ _(Yr, { variant: "paragraph-100", children: a })
|
|
2078
2082
|
}
|
|
2079
2083
|
),
|
|
2080
2084
|
/* @__PURE__ */ _("div", { children: t }),
|
|
2081
|
-
!d && /* @__PURE__ */ _(
|
|
2085
|
+
!d && /* @__PURE__ */ _(
|
|
2086
|
+
tt,
|
|
2087
|
+
{
|
|
2088
|
+
actions: n,
|
|
2089
|
+
primaryActionVariant: s,
|
|
2090
|
+
notification: l
|
|
2091
|
+
}
|
|
2092
|
+
)
|
|
2082
2093
|
] }) })
|
|
2083
2094
|
] })
|
|
2084
2095
|
] }),
|
|
2085
|
-
d && /* @__PURE__ */ _(
|
|
2096
|
+
d && /* @__PURE__ */ _(
|
|
2097
|
+
tt,
|
|
2098
|
+
{
|
|
2099
|
+
actions: n,
|
|
2100
|
+
primaryActionVariant: s,
|
|
2101
|
+
notification: l
|
|
2102
|
+
}
|
|
2103
|
+
)
|
|
2086
2104
|
]
|
|
2087
2105
|
}
|
|
2088
2106
|
)
|
|
2089
2107
|
] });
|
|
2090
2108
|
}
|
|
2091
|
-
),
|
|
2109
|
+
), et = ({
|
|
2092
2110
|
allyLabel: e,
|
|
2093
2111
|
hasImage: n,
|
|
2094
2112
|
["data-testid"]: t
|
|
2095
|
-
}) => /* @__PURE__ */ _(
|
|
2113
|
+
}) => /* @__PURE__ */ _(br, { asChild: !0, children: /* @__PURE__ */ _(
|
|
2096
2114
|
Le,
|
|
2097
2115
|
{
|
|
2098
|
-
variant: n ? "primary
|
|
2116
|
+
variant: n ? "primary" : "tertiary-purple",
|
|
2117
|
+
negative: n,
|
|
2099
2118
|
size: "sm",
|
|
2100
2119
|
iconOnly: !0,
|
|
2101
2120
|
"aria-label": e,
|
|
2102
|
-
className:
|
|
2121
|
+
className: T(`${P}__close-button`),
|
|
2103
2122
|
"data-testid": t,
|
|
2104
|
-
children: /* @__PURE__ */ _(
|
|
2123
|
+
children: /* @__PURE__ */ _(St, {})
|
|
2105
2124
|
}
|
|
2106
|
-
) }),
|
|
2125
|
+
) }), ho = 3, tt = ({
|
|
2107
2126
|
actions: e,
|
|
2108
|
-
primaryActionVariant: n
|
|
2127
|
+
primaryActionVariant: n,
|
|
2128
|
+
notification: t
|
|
2109
2129
|
}) => {
|
|
2110
|
-
const
|
|
2111
|
-
return
|
|
2112
|
-
|
|
2130
|
+
const o = C(null), a = [n, "secondary", "text"];
|
|
2131
|
+
return A(() => {
|
|
2132
|
+
var r, i;
|
|
2133
|
+
t && ((i = (r = o == null ? void 0 : o.current) == null ? void 0 : r.scrollIntoView) == null || i.call(r, !1));
|
|
2134
|
+
}, [t]), e && e.length > 0 ? /* @__PURE__ */ U("div", { className: T(`${P}__actions`), children: [
|
|
2135
|
+
/* @__PURE__ */ _("div", { className: T(`${P}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, ho).map(({ label: r, onClick: i }, u) => /* @__PURE__ */ _(
|
|
2113
2136
|
Le,
|
|
2114
2137
|
{
|
|
2115
2138
|
"data-testid": "modal actions button",
|
|
2116
|
-
variant:
|
|
2117
|
-
onClick:
|
|
2118
|
-
className:
|
|
2119
|
-
children:
|
|
2139
|
+
variant: a[u] || "",
|
|
2140
|
+
onClick: i,
|
|
2141
|
+
className: T(`${P}__actions-button`),
|
|
2142
|
+
children: r
|
|
2120
2143
|
},
|
|
2121
|
-
|
|
2144
|
+
r
|
|
2122
2145
|
)) }),
|
|
2123
|
-
/* @__PURE__ */ _("
|
|
2146
|
+
t && /* @__PURE__ */ _("div", { className: T(`${P}__notification`), ref: o, children: t }),
|
|
2147
|
+
/* @__PURE__ */ _("span", { className: T(`${P}__actions-separator`) })
|
|
2124
2148
|
] }) : null;
|
|
2125
|
-
},
|
|
2149
|
+
}, mo = S(
|
|
2126
2150
|
({ ["data-testid"]: e, children: n, className: t, ...o }, a) => /* @__PURE__ */ _(
|
|
2127
|
-
|
|
2151
|
+
vr,
|
|
2128
2152
|
{
|
|
2129
2153
|
asChild: !0,
|
|
2130
2154
|
ref: a,
|
|
@@ -2134,16 +2158,16 @@ const so = /* @__PURE__ */ uo(co), lo = "_fadeIn_1qmv6_1", po = {
|
|
|
2134
2158
|
children: n
|
|
2135
2159
|
}
|
|
2136
2160
|
)
|
|
2137
|
-
),
|
|
2161
|
+
), Fe = ({
|
|
2138
2162
|
["data-testid"]: e,
|
|
2139
2163
|
children: n,
|
|
2140
2164
|
open: t,
|
|
2141
2165
|
onOpenChange: o
|
|
2142
|
-
}) => /* @__PURE__ */ _(
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2166
|
+
}) => /* @__PURE__ */ _(fr, { open: t, onOpenChange: o, "data-testid": e, children: n });
|
|
2167
|
+
Fe.Trigger = mo;
|
|
2168
|
+
Fe.Content = vo;
|
|
2169
|
+
Fe.displayName = "Modal";
|
|
2146
2170
|
export {
|
|
2147
|
-
|
|
2171
|
+
Fe as Modal
|
|
2148
2172
|
};
|
|
2149
2173
|
//# sourceMappingURL=modal.es.js.map
|