@purpurds/modal 5.27.3 → 5.27.5
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 +7 -7
- package/dist/modal.cjs.js +11 -11
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.es.js +527 -533
- package/dist/modal.es.js.map +1 -1
- package/package.json +9 -9
- package/src/modal.stories.tsx +4 -0
package/dist/modal.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as F, jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import
|
|
3
|
+
import { useCallback as Q, createContext as Oe, useMemo as me, createElement as _, useContext as rt, useLayoutEffect as Rt, useRef as N, useEffect as A, useState as H, forwardRef as S, Children as L, isValidElement as U, cloneElement as ae, Fragment as Le, useReducer as Mt } from "react";
|
|
4
|
+
import kt, { flushSync as ot } from "react-dom";
|
|
5
5
|
function P() {
|
|
6
6
|
return P = Object.assign ? Object.assign.bind() : function(e) {
|
|
7
7
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -16,58 +16,36 @@ function B(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
|
16
16
|
if (e == null || e(a), t === !1 || !a.defaultPrevented) return n == null ? void 0 : n(a);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ft(e, n) {
|
|
20
20
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
21
21
|
}
|
|
22
22
|
function at(...e) {
|
|
23
23
|
return (n) => e.forEach(
|
|
24
|
-
(t) =>
|
|
24
|
+
(t) => Ft(t, n)
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
27
|
+
function J(...e) {
|
|
28
|
+
return Q(at(...e), e);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
const t = /* @__PURE__ */ ge(n);
|
|
32
|
-
function o(r) {
|
|
33
|
-
const { children: i, ...c } = r, u = ae(
|
|
34
|
-
() => c,
|
|
35
|
-
Object.values(c)
|
|
36
|
-
);
|
|
37
|
-
return /* @__PURE__ */ g(t.Provider, {
|
|
38
|
-
value: u
|
|
39
|
-
}, i);
|
|
40
|
-
}
|
|
41
|
-
function a(r) {
|
|
42
|
-
const i = Le(t);
|
|
43
|
-
if (i) return i;
|
|
44
|
-
if (n !== void 0) return n;
|
|
45
|
-
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
|
46
|
-
}
|
|
47
|
-
return o.displayName = e + "Provider", [
|
|
48
|
-
o,
|
|
49
|
-
a
|
|
50
|
-
];
|
|
51
|
-
}
|
|
52
|
-
function Wt(e, n = []) {
|
|
30
|
+
function jt(e, n = []) {
|
|
53
31
|
let t = [];
|
|
54
32
|
function o(r, i) {
|
|
55
|
-
const c = /* @__PURE__ */
|
|
33
|
+
const c = /* @__PURE__ */ Oe(i), s = t.length;
|
|
56
34
|
t = [
|
|
57
35
|
...t,
|
|
58
36
|
i
|
|
59
37
|
];
|
|
60
38
|
function d(l) {
|
|
61
|
-
const { scope: f, children: v, ...E } = l,
|
|
39
|
+
const { scope: f, children: v, ...E } = l, u = (f == null ? void 0 : f[e][s]) || c, h = me(
|
|
62
40
|
() => E,
|
|
63
41
|
Object.values(E)
|
|
64
42
|
);
|
|
65
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ _(u.Provider, {
|
|
66
44
|
value: h
|
|
67
45
|
}, v);
|
|
68
46
|
}
|
|
69
47
|
function p(l, f) {
|
|
70
|
-
const v = (f == null ? void 0 : f[e][
|
|
48
|
+
const v = (f == null ? void 0 : f[e][s]) || c, E = rt(v);
|
|
71
49
|
if (E) return E;
|
|
72
50
|
if (i !== void 0) return i;
|
|
73
51
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
@@ -78,29 +56,29 @@ function Wt(e, n = []) {
|
|
|
78
56
|
];
|
|
79
57
|
}
|
|
80
58
|
const a = () => {
|
|
81
|
-
const r = t.map((i) => /* @__PURE__ */
|
|
59
|
+
const r = t.map((i) => /* @__PURE__ */ Oe(i));
|
|
82
60
|
return function(c) {
|
|
83
|
-
const
|
|
84
|
-
return
|
|
61
|
+
const s = (c == null ? void 0 : c[e]) || r;
|
|
62
|
+
return me(
|
|
85
63
|
() => ({
|
|
86
64
|
[`__scope${e}`]: {
|
|
87
65
|
...c,
|
|
88
|
-
[e]:
|
|
66
|
+
[e]: s
|
|
89
67
|
}
|
|
90
68
|
}),
|
|
91
69
|
[
|
|
92
70
|
c,
|
|
93
|
-
|
|
71
|
+
s
|
|
94
72
|
]
|
|
95
73
|
);
|
|
96
74
|
};
|
|
97
75
|
};
|
|
98
76
|
return a.scopeName = e, [
|
|
99
77
|
o,
|
|
100
|
-
|
|
78
|
+
Bt(a, ...n)
|
|
101
79
|
];
|
|
102
80
|
}
|
|
103
|
-
function
|
|
81
|
+
function Bt(...e) {
|
|
104
82
|
const n = e[0];
|
|
105
83
|
if (e.length === 1) return n;
|
|
106
84
|
const t = () => {
|
|
@@ -111,14 +89,14 @@ function Ut(...e) {
|
|
|
111
89
|
})
|
|
112
90
|
);
|
|
113
91
|
return function(r) {
|
|
114
|
-
const i = o.reduce((c, { useScope:
|
|
115
|
-
const l =
|
|
92
|
+
const i = o.reduce((c, { useScope: s, scopeName: d }) => {
|
|
93
|
+
const l = s(r)[`__scope${d}`];
|
|
116
94
|
return {
|
|
117
95
|
...c,
|
|
118
96
|
...l
|
|
119
97
|
};
|
|
120
98
|
}, {});
|
|
121
|
-
return
|
|
99
|
+
return me(
|
|
122
100
|
() => ({
|
|
123
101
|
[`__scope${n.scopeName}`]: i
|
|
124
102
|
}),
|
|
@@ -131,24 +109,24 @@ function Ut(...e) {
|
|
|
131
109
|
return t.scopeName = n.scopeName, t;
|
|
132
110
|
}
|
|
133
111
|
const Ne = globalThis != null && globalThis.document ? Rt : () => {
|
|
134
|
-
},
|
|
112
|
+
}, Ut = m.useId || (() => {
|
|
135
113
|
});
|
|
136
|
-
let
|
|
137
|
-
function
|
|
138
|
-
const [n, t] = m.useState(
|
|
114
|
+
let Wt = 0;
|
|
115
|
+
function be(e) {
|
|
116
|
+
const [n, t] = m.useState(Ut());
|
|
139
117
|
return Ne(() => {
|
|
140
118
|
e || t(
|
|
141
|
-
(o) => o ?? String(
|
|
119
|
+
(o) => o ?? String(Wt++)
|
|
142
120
|
);
|
|
143
121
|
}, [
|
|
144
122
|
e
|
|
145
123
|
]), e || (n ? `radix-${n}` : "");
|
|
146
124
|
}
|
|
147
|
-
function
|
|
125
|
+
function V(e) {
|
|
148
126
|
const n = N(e);
|
|
149
127
|
return A(() => {
|
|
150
128
|
n.current = e;
|
|
151
|
-
}),
|
|
129
|
+
}), me(
|
|
152
130
|
() => (...t) => {
|
|
153
131
|
var o;
|
|
154
132
|
return (o = n.current) === null || o === void 0 ? void 0 : o.call(n, ...t);
|
|
@@ -156,12 +134,12 @@ function K(e) {
|
|
|
156
134
|
[]
|
|
157
135
|
);
|
|
158
136
|
}
|
|
159
|
-
function
|
|
137
|
+
function zt({ prop: e, defaultProp: n, onChange: t = () => {
|
|
160
138
|
} }) {
|
|
161
|
-
const [o, a] =
|
|
139
|
+
const [o, a] = qt({
|
|
162
140
|
defaultProp: n,
|
|
163
141
|
onChange: t
|
|
164
|
-
}), r = e !== void 0, i = r ? e : o, c =
|
|
142
|
+
}), r = e !== void 0, i = r ? e : o, c = V(t), s = Q((d) => {
|
|
165
143
|
if (r) {
|
|
166
144
|
const l = typeof d == "function" ? d(e) : d;
|
|
167
145
|
l !== e && c(l);
|
|
@@ -174,11 +152,11 @@ function Ht({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
174
152
|
]);
|
|
175
153
|
return [
|
|
176
154
|
i,
|
|
177
|
-
|
|
155
|
+
s
|
|
178
156
|
];
|
|
179
157
|
}
|
|
180
|
-
function
|
|
181
|
-
const t = H(e), [o] = t, a = N(o), r =
|
|
158
|
+
function qt({ defaultProp: e, onChange: n }) {
|
|
159
|
+
const t = H(e), [o] = t, a = N(o), r = V(n);
|
|
182
160
|
return A(() => {
|
|
183
161
|
a.current !== o && (r(o), a.current = o);
|
|
184
162
|
}, [
|
|
@@ -188,31 +166,31 @@ function Kt({ defaultProp: e, onChange: n }) {
|
|
|
188
166
|
]), t;
|
|
189
167
|
}
|
|
190
168
|
const Re = /* @__PURE__ */ S((e, n) => {
|
|
191
|
-
const { children: t, ...o } = e, a = L.toArray(t), r = a.find(
|
|
169
|
+
const { children: t, ...o } = e, a = L.toArray(t), r = a.find(Vt);
|
|
192
170
|
if (r) {
|
|
193
|
-
const i = r.props.children, c = a.map((
|
|
194
|
-
return /* @__PURE__ */
|
|
171
|
+
const i = r.props.children, c = a.map((s) => s === r ? L.count(i) > 1 ? L.only(null) : /* @__PURE__ */ U(i) ? i.props.children : null : s);
|
|
172
|
+
return /* @__PURE__ */ _(Pe, P({}, o, {
|
|
195
173
|
ref: n
|
|
196
|
-
}), /* @__PURE__ */
|
|
174
|
+
}), /* @__PURE__ */ U(i) ? /* @__PURE__ */ ae(i, void 0, c) : null);
|
|
197
175
|
}
|
|
198
|
-
return /* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ _(Pe, P({}, o, {
|
|
199
177
|
ref: n
|
|
200
178
|
}), t);
|
|
201
179
|
});
|
|
202
180
|
Re.displayName = "Slot";
|
|
203
181
|
const Pe = /* @__PURE__ */ S((e, n) => {
|
|
204
182
|
const { children: t, ...o } = e;
|
|
205
|
-
return /* @__PURE__ */
|
|
206
|
-
...
|
|
183
|
+
return /* @__PURE__ */ U(t) ? /* @__PURE__ */ ae(t, {
|
|
184
|
+
...Kt(o, t.props),
|
|
207
185
|
ref: n ? at(n, t.ref) : t.ref
|
|
208
186
|
}) : L.count(t) > 1 ? L.only(null) : null;
|
|
209
187
|
});
|
|
210
188
|
Pe.displayName = "SlotClone";
|
|
211
|
-
const
|
|
212
|
-
function
|
|
213
|
-
return /* @__PURE__ */
|
|
189
|
+
const Ht = ({ children: e }) => /* @__PURE__ */ _(Le, null, e);
|
|
190
|
+
function Vt(e) {
|
|
191
|
+
return /* @__PURE__ */ U(e) && e.type === Ht;
|
|
214
192
|
}
|
|
215
|
-
function
|
|
193
|
+
function Kt(e, n) {
|
|
216
194
|
const t = {
|
|
217
195
|
...n
|
|
218
196
|
};
|
|
@@ -233,7 +211,7 @@ function Xt(e, n) {
|
|
|
233
211
|
...t
|
|
234
212
|
};
|
|
235
213
|
}
|
|
236
|
-
const
|
|
214
|
+
const Xt = [
|
|
237
215
|
"a",
|
|
238
216
|
"button",
|
|
239
217
|
"div",
|
|
@@ -250,12 +228,12 @@ const Yt = [
|
|
|
250
228
|
"span",
|
|
251
229
|
"svg",
|
|
252
230
|
"ul"
|
|
253
|
-
],
|
|
231
|
+
], W = Xt.reduce((e, n) => {
|
|
254
232
|
const t = /* @__PURE__ */ S((o, a) => {
|
|
255
233
|
const { asChild: r, ...i } = o, c = r ? Re : n;
|
|
256
234
|
return A(() => {
|
|
257
235
|
window[Symbol.for("radix-ui")] = !0;
|
|
258
|
-
}, []), /* @__PURE__ */
|
|
236
|
+
}, []), /* @__PURE__ */ _(c, P({}, i, {
|
|
259
237
|
ref: a
|
|
260
238
|
}));
|
|
261
239
|
});
|
|
@@ -264,13 +242,13 @@ const Yt = [
|
|
|
264
242
|
[n]: t
|
|
265
243
|
};
|
|
266
244
|
}, {});
|
|
267
|
-
function
|
|
245
|
+
function Gt(e, n) {
|
|
268
246
|
e && ot(
|
|
269
247
|
() => e.dispatchEvent(n)
|
|
270
248
|
);
|
|
271
249
|
}
|
|
272
|
-
function
|
|
273
|
-
const t =
|
|
250
|
+
function Yt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
251
|
+
const t = V(e);
|
|
274
252
|
A(() => {
|
|
275
253
|
const o = (a) => {
|
|
276
254
|
a.key === "Escape" && t(a);
|
|
@@ -281,40 +259,40 @@ function Qt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
281
259
|
n
|
|
282
260
|
]);
|
|
283
261
|
}
|
|
284
|
-
const Ae = "dismissableLayer.update",
|
|
285
|
-
let
|
|
286
|
-
const
|
|
262
|
+
const Ae = "dismissableLayer.update", Zt = "dismissableLayer.pointerDownOutside", Qt = "dismissableLayer.focusOutside";
|
|
263
|
+
let je;
|
|
264
|
+
const Jt = /* @__PURE__ */ Oe({
|
|
287
265
|
layers: /* @__PURE__ */ new Set(),
|
|
288
266
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
289
267
|
branches: /* @__PURE__ */ new Set()
|
|
290
|
-
}),
|
|
268
|
+
}), en = /* @__PURE__ */ S((e, n) => {
|
|
291
269
|
var t;
|
|
292
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss:
|
|
270
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...d } = e, p = rt(Jt), [l, f] = H(null), v = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = H({}), u = J(
|
|
293
271
|
n,
|
|
294
272
|
(w) => f(w)
|
|
295
|
-
), h = Array.from(p.layers), [
|
|
273
|
+
), h = Array.from(p.layers), [g] = [
|
|
296
274
|
...p.layersWithOutsidePointerEventsDisabled
|
|
297
|
-
].slice(-1), C = h.indexOf(
|
|
298
|
-
const I = w.target,
|
|
275
|
+
].slice(-1), C = h.indexOf(g), y = l ? h.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, x = y >= C, z = tn((w) => {
|
|
276
|
+
const I = w.target, ie = [
|
|
299
277
|
...p.branches
|
|
300
278
|
].some(
|
|
301
|
-
(
|
|
279
|
+
(R) => R.contains(I)
|
|
302
280
|
);
|
|
303
|
-
!x ||
|
|
304
|
-
}, v), D =
|
|
281
|
+
!x || ie || (r == null || r(w), c == null || c(w), w.defaultPrevented || s == null || s());
|
|
282
|
+
}, v), D = nn((w) => {
|
|
305
283
|
const I = w.target;
|
|
306
284
|
[
|
|
307
285
|
...p.branches
|
|
308
286
|
].some(
|
|
309
|
-
(
|
|
310
|
-
) || (i == null || i(w), c == null || c(w), w.defaultPrevented ||
|
|
287
|
+
(R) => R.contains(I)
|
|
288
|
+
) || (i == null || i(w), c == null || c(w), w.defaultPrevented || s == null || s());
|
|
311
289
|
}, v);
|
|
312
|
-
return
|
|
313
|
-
y === p.layers.size - 1 && (a == null || a(w), !w.defaultPrevented &&
|
|
290
|
+
return Yt((w) => {
|
|
291
|
+
y === p.layers.size - 1 && (a == null || a(w), !w.defaultPrevented && s && (w.preventDefault(), s()));
|
|
314
292
|
}, v), A(() => {
|
|
315
293
|
if (l)
|
|
316
|
-
return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
317
|
-
o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents =
|
|
294
|
+
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(), () => {
|
|
295
|
+
o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = je);
|
|
318
296
|
};
|
|
319
297
|
}, [
|
|
320
298
|
l,
|
|
@@ -322,15 +300,15 @@ const tn = /* @__PURE__ */ ge({
|
|
|
322
300
|
o,
|
|
323
301
|
p
|
|
324
302
|
]), A(() => () => {
|
|
325
|
-
l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l),
|
|
303
|
+
l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l), Be());
|
|
326
304
|
}, [
|
|
327
305
|
l,
|
|
328
306
|
p
|
|
329
307
|
]), A(() => {
|
|
330
308
|
const w = () => E({});
|
|
331
309
|
return document.addEventListener(Ae, w), () => document.removeEventListener(Ae, w);
|
|
332
|
-
}, []), /* @__PURE__ */
|
|
333
|
-
ref:
|
|
310
|
+
}, []), /* @__PURE__ */ _(W.div, P({}, d, {
|
|
311
|
+
ref: u,
|
|
334
312
|
style: {
|
|
335
313
|
pointerEvents: $ ? x ? "auto" : "none" : void 0,
|
|
336
314
|
...e.style
|
|
@@ -340,18 +318,18 @@ const tn = /* @__PURE__ */ ge({
|
|
|
340
318
|
onPointerDownCapture: B(e.onPointerDownCapture, z.onPointerDownCapture)
|
|
341
319
|
}));
|
|
342
320
|
});
|
|
343
|
-
function
|
|
344
|
-
const t =
|
|
321
|
+
function tn(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
322
|
+
const t = V(e), o = N(!1), a = N(() => {
|
|
345
323
|
});
|
|
346
324
|
return A(() => {
|
|
347
325
|
const r = (c) => {
|
|
348
326
|
if (c.target && !o.current) {
|
|
349
327
|
let d = function() {
|
|
350
|
-
it(
|
|
328
|
+
it(Zt, t, s, {
|
|
351
329
|
discrete: !0
|
|
352
330
|
});
|
|
353
331
|
};
|
|
354
|
-
const
|
|
332
|
+
const s = {
|
|
355
333
|
originalEvent: c
|
|
356
334
|
};
|
|
357
335
|
c.pointerType === "touch" ? (n.removeEventListener("click", a.current), a.current = d, n.addEventListener("click", a.current, {
|
|
@@ -374,11 +352,11 @@ function rn(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
374
352
|
onPointerDownCapture: () => o.current = !0
|
|
375
353
|
};
|
|
376
354
|
}
|
|
377
|
-
function
|
|
378
|
-
const t =
|
|
355
|
+
function nn(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
356
|
+
const t = V(e), o = N(!1);
|
|
379
357
|
return A(() => {
|
|
380
358
|
const a = (r) => {
|
|
381
|
-
r.target && !o.current && it(
|
|
359
|
+
r.target && !o.current && it(Qt, t, {
|
|
382
360
|
originalEvent: r
|
|
383
361
|
}, {
|
|
384
362
|
discrete: !1
|
|
@@ -393,7 +371,7 @@ function on(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
393
371
|
onBlurCapture: () => o.current = !1
|
|
394
372
|
};
|
|
395
373
|
}
|
|
396
|
-
function
|
|
374
|
+
function Be() {
|
|
397
375
|
const e = new CustomEvent(Ae);
|
|
398
376
|
document.dispatchEvent(e);
|
|
399
377
|
}
|
|
@@ -405,15 +383,15 @@ function it(e, n, t, { discrete: o }) {
|
|
|
405
383
|
});
|
|
406
384
|
n && a.addEventListener(e, n, {
|
|
407
385
|
once: !0
|
|
408
|
-
}), o ?
|
|
386
|
+
}), o ? Gt(a, r) : a.dispatchEvent(r);
|
|
409
387
|
}
|
|
410
|
-
const
|
|
388
|
+
const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount", Ue = {
|
|
411
389
|
bubbles: !1,
|
|
412
390
|
cancelable: !0
|
|
413
|
-
},
|
|
414
|
-
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c,
|
|
391
|
+
}, rn = /* @__PURE__ */ S((e, n) => {
|
|
392
|
+
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c, s] = H(null), d = V(a), p = V(r), l = N(null), f = J(
|
|
415
393
|
n,
|
|
416
|
-
(
|
|
394
|
+
(u) => s(u)
|
|
417
395
|
), v = N({
|
|
418
396
|
paused: !1,
|
|
419
397
|
pause() {
|
|
@@ -425,7 +403,7 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
|
|
|
425
403
|
}).current;
|
|
426
404
|
A(() => {
|
|
427
405
|
if (o) {
|
|
428
|
-
let
|
|
406
|
+
let u = function(y) {
|
|
429
407
|
if (v.paused || !c) return;
|
|
430
408
|
const $ = y.target;
|
|
431
409
|
c.contains($) ? l.current = $ : j(l.current, {
|
|
@@ -437,17 +415,17 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
|
|
|
437
415
|
$ !== null && (c.contains($) || j(l.current, {
|
|
438
416
|
select: !0
|
|
439
417
|
}));
|
|
440
|
-
},
|
|
418
|
+
}, g = function(y) {
|
|
441
419
|
if (document.activeElement === document.body)
|
|
442
420
|
for (const x of y) x.removedNodes.length > 0 && j(c);
|
|
443
421
|
};
|
|
444
|
-
document.addEventListener("focusin",
|
|
445
|
-
const C = new MutationObserver(
|
|
422
|
+
document.addEventListener("focusin", u), document.addEventListener("focusout", h);
|
|
423
|
+
const C = new MutationObserver(g);
|
|
446
424
|
return c && C.observe(c, {
|
|
447
425
|
childList: !0,
|
|
448
426
|
subtree: !0
|
|
449
427
|
}), () => {
|
|
450
|
-
document.removeEventListener("focusin",
|
|
428
|
+
document.removeEventListener("focusin", u), document.removeEventListener("focusout", h), C.disconnect();
|
|
451
429
|
};
|
|
452
430
|
}
|
|
453
431
|
}, [
|
|
@@ -456,20 +434,20 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
|
|
|
456
434
|
v.paused
|
|
457
435
|
]), A(() => {
|
|
458
436
|
if (c) {
|
|
459
|
-
|
|
460
|
-
const
|
|
461
|
-
if (!c.contains(
|
|
462
|
-
const
|
|
463
|
-
c.addEventListener(
|
|
437
|
+
ze.add(v);
|
|
438
|
+
const u = document.activeElement;
|
|
439
|
+
if (!c.contains(u)) {
|
|
440
|
+
const g = new CustomEvent($e, Ue);
|
|
441
|
+
c.addEventListener($e, d), c.dispatchEvent(g), g.defaultPrevented || (on(ln(ct(c)), {
|
|
464
442
|
select: !0
|
|
465
|
-
}), document.activeElement ===
|
|
443
|
+
}), document.activeElement === u && j(c));
|
|
466
444
|
}
|
|
467
445
|
return () => {
|
|
468
|
-
c.removeEventListener(
|
|
469
|
-
const
|
|
470
|
-
c.addEventListener(
|
|
446
|
+
c.removeEventListener($e, d), setTimeout(() => {
|
|
447
|
+
const g = new CustomEvent(ye, Ue);
|
|
448
|
+
c.addEventListener(ye, p), c.dispatchEvent(g), g.defaultPrevented || j(u ?? document.body, {
|
|
471
449
|
select: !0
|
|
472
|
-
}), c.removeEventListener(
|
|
450
|
+
}), c.removeEventListener(ye, p), ze.remove(v);
|
|
473
451
|
}, 0);
|
|
474
452
|
};
|
|
475
453
|
}
|
|
@@ -479,38 +457,38 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
|
|
|
479
457
|
p,
|
|
480
458
|
v
|
|
481
459
|
]);
|
|
482
|
-
const E =
|
|
460
|
+
const E = Q((u) => {
|
|
483
461
|
if (!t && !o || v.paused) return;
|
|
484
|
-
const h =
|
|
485
|
-
if (h &&
|
|
486
|
-
const C =
|
|
487
|
-
y && $ ? !
|
|
462
|
+
const h = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, g = document.activeElement;
|
|
463
|
+
if (h && g) {
|
|
464
|
+
const C = u.currentTarget, [y, $] = an(C);
|
|
465
|
+
y && $ ? !u.shiftKey && g === $ ? (u.preventDefault(), t && j(y, {
|
|
488
466
|
select: !0
|
|
489
|
-
})) :
|
|
467
|
+
})) : u.shiftKey && g === y && (u.preventDefault(), t && j($, {
|
|
490
468
|
select: !0
|
|
491
|
-
})) :
|
|
469
|
+
})) : g === C && u.preventDefault();
|
|
492
470
|
}
|
|
493
471
|
}, [
|
|
494
472
|
t,
|
|
495
473
|
o,
|
|
496
474
|
v.paused
|
|
497
475
|
]);
|
|
498
|
-
return /* @__PURE__ */
|
|
476
|
+
return /* @__PURE__ */ _(W.div, P({
|
|
499
477
|
tabIndex: -1
|
|
500
478
|
}, i, {
|
|
501
479
|
ref: f,
|
|
502
480
|
onKeyDown: E
|
|
503
481
|
}));
|
|
504
482
|
});
|
|
505
|
-
function
|
|
483
|
+
function on(e, { select: n = !1 } = {}) {
|
|
506
484
|
const t = document.activeElement;
|
|
507
485
|
for (const o of e)
|
|
508
486
|
if (j(o, {
|
|
509
487
|
select: n
|
|
510
488
|
}), document.activeElement !== t) return;
|
|
511
489
|
}
|
|
512
|
-
function
|
|
513
|
-
const n = ct(e), t =
|
|
490
|
+
function an(e) {
|
|
491
|
+
const n = ct(e), t = We(n, e), o = We(n.reverse(), e);
|
|
514
492
|
return [
|
|
515
493
|
t,
|
|
516
494
|
o
|
|
@@ -526,13 +504,13 @@ function ct(e) {
|
|
|
526
504
|
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
527
505
|
return n;
|
|
528
506
|
}
|
|
529
|
-
function
|
|
507
|
+
function We(e, n) {
|
|
530
508
|
for (const t of e)
|
|
531
|
-
if (!
|
|
509
|
+
if (!cn(t, {
|
|
532
510
|
upTo: n
|
|
533
511
|
})) return t;
|
|
534
512
|
}
|
|
535
|
-
function
|
|
513
|
+
function cn(e, { upTo: n }) {
|
|
536
514
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
537
515
|
for (; e; ) {
|
|
538
516
|
if (n !== void 0 && e === n) return !1;
|
|
@@ -541,7 +519,7 @@ function sn(e, { upTo: n }) {
|
|
|
541
519
|
}
|
|
542
520
|
return !1;
|
|
543
521
|
}
|
|
544
|
-
function
|
|
522
|
+
function un(e) {
|
|
545
523
|
return e instanceof HTMLInputElement && "select" in e;
|
|
546
524
|
}
|
|
547
525
|
function j(e, { select: n = !1 } = {}) {
|
|
@@ -549,58 +527,58 @@ function j(e, { select: n = !1 } = {}) {
|
|
|
549
527
|
const t = document.activeElement;
|
|
550
528
|
e.focus({
|
|
551
529
|
preventScroll: !0
|
|
552
|
-
}), e !== t &&
|
|
530
|
+
}), e !== t && un(e) && n && e.select();
|
|
553
531
|
}
|
|
554
532
|
}
|
|
555
|
-
const
|
|
556
|
-
function
|
|
533
|
+
const ze = sn();
|
|
534
|
+
function sn() {
|
|
557
535
|
let e = [];
|
|
558
536
|
return {
|
|
559
537
|
add(n) {
|
|
560
538
|
const t = e[0];
|
|
561
|
-
n !== t && (t == null || t.pause()), e =
|
|
539
|
+
n !== t && (t == null || t.pause()), e = qe(e, n), e.unshift(n);
|
|
562
540
|
},
|
|
563
541
|
remove(n) {
|
|
564
542
|
var t;
|
|
565
|
-
e =
|
|
543
|
+
e = qe(e, n), (t = e[0]) === null || t === void 0 || t.resume();
|
|
566
544
|
}
|
|
567
545
|
};
|
|
568
546
|
}
|
|
569
|
-
function
|
|
547
|
+
function qe(e, n) {
|
|
570
548
|
const t = [
|
|
571
549
|
...e
|
|
572
550
|
], o = t.indexOf(n);
|
|
573
551
|
return o !== -1 && t.splice(o, 1), t;
|
|
574
552
|
}
|
|
575
|
-
function
|
|
553
|
+
function ln(e) {
|
|
576
554
|
return e.filter(
|
|
577
555
|
(n) => n.tagName !== "A"
|
|
578
556
|
);
|
|
579
557
|
}
|
|
580
|
-
const
|
|
558
|
+
const dn = /* @__PURE__ */ S((e, n) => {
|
|
581
559
|
var t;
|
|
582
560
|
const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
|
|
583
|
-
return o ? /* @__PURE__ */
|
|
561
|
+
return o ? /* @__PURE__ */ kt.createPortal(/* @__PURE__ */ _(W.div, P({}, a, {
|
|
584
562
|
ref: n
|
|
585
563
|
})), o) : null;
|
|
586
564
|
});
|
|
587
|
-
function
|
|
588
|
-
return
|
|
565
|
+
function pn(e, n) {
|
|
566
|
+
return Mt((t, o) => {
|
|
589
567
|
const a = n[t][o];
|
|
590
568
|
return a ?? t;
|
|
591
569
|
}, e);
|
|
592
570
|
}
|
|
593
|
-
const
|
|
594
|
-
const { present: n, children: t } = e, o =
|
|
571
|
+
const ge = (e) => {
|
|
572
|
+
const { present: n, children: t } = e, o = fn(n), a = typeof t == "function" ? t({
|
|
595
573
|
present: o.isPresent
|
|
596
|
-
}) : L.only(t), r =
|
|
597
|
-
return typeof t == "function" || o.isPresent ? /* @__PURE__ */
|
|
574
|
+
}) : L.only(t), r = J(o.ref, a.ref);
|
|
575
|
+
return typeof t == "function" || o.isPresent ? /* @__PURE__ */ ae(a, {
|
|
598
576
|
ref: r
|
|
599
577
|
}) : null;
|
|
600
578
|
};
|
|
601
|
-
|
|
602
|
-
function
|
|
603
|
-
const [n, t] = H(), o = N({}), a = N(e), r = N("none"), i = e ? "mounted" : "unmounted", [c,
|
|
579
|
+
ge.displayName = "Presence";
|
|
580
|
+
function fn(e) {
|
|
581
|
+
const [n, t] = H(), o = N({}), a = N(e), r = N("none"), i = e ? "mounted" : "unmounted", [c, s] = pn(i, {
|
|
604
582
|
mounted: {
|
|
605
583
|
UNMOUNT: "unmounted",
|
|
606
584
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -614,63 +592,63 @@ function hn(e) {
|
|
|
614
592
|
}
|
|
615
593
|
});
|
|
616
594
|
return A(() => {
|
|
617
|
-
const d =
|
|
595
|
+
const d = ce(o.current);
|
|
618
596
|
r.current = c === "mounted" ? d : "none";
|
|
619
597
|
}, [
|
|
620
598
|
c
|
|
621
599
|
]), Ne(() => {
|
|
622
600
|
const d = o.current, p = a.current;
|
|
623
601
|
if (p !== e) {
|
|
624
|
-
const f = r.current, v =
|
|
625
|
-
e ?
|
|
602
|
+
const f = r.current, v = ce(d);
|
|
603
|
+
e ? s("MOUNT") : v === "none" || (d == null ? void 0 : d.display) === "none" ? s("UNMOUNT") : s(p && f !== v ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
626
604
|
}
|
|
627
605
|
}, [
|
|
628
606
|
e,
|
|
629
|
-
|
|
607
|
+
s
|
|
630
608
|
]), Ne(() => {
|
|
631
609
|
if (n) {
|
|
632
610
|
const d = (l) => {
|
|
633
|
-
const v =
|
|
611
|
+
const v = ce(o.current).includes(l.animationName);
|
|
634
612
|
l.target === n && v && ot(
|
|
635
|
-
() =>
|
|
613
|
+
() => s("ANIMATION_END")
|
|
636
614
|
);
|
|
637
615
|
}, p = (l) => {
|
|
638
|
-
l.target === n && (r.current =
|
|
616
|
+
l.target === n && (r.current = ce(o.current));
|
|
639
617
|
};
|
|
640
618
|
return n.addEventListener("animationstart", p), n.addEventListener("animationcancel", d), n.addEventListener("animationend", d), () => {
|
|
641
619
|
n.removeEventListener("animationstart", p), n.removeEventListener("animationcancel", d), n.removeEventListener("animationend", d);
|
|
642
620
|
};
|
|
643
621
|
} else
|
|
644
|
-
|
|
622
|
+
s("ANIMATION_END");
|
|
645
623
|
}, [
|
|
646
624
|
n,
|
|
647
|
-
|
|
625
|
+
s
|
|
648
626
|
]), {
|
|
649
627
|
isPresent: [
|
|
650
628
|
"mounted",
|
|
651
629
|
"unmountSuspended"
|
|
652
630
|
].includes(c),
|
|
653
|
-
ref:
|
|
631
|
+
ref: Q((d) => {
|
|
654
632
|
d && (o.current = getComputedStyle(d)), t(d);
|
|
655
633
|
}, [])
|
|
656
634
|
};
|
|
657
635
|
}
|
|
658
|
-
function
|
|
636
|
+
function ce(e) {
|
|
659
637
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
660
638
|
}
|
|
661
|
-
let
|
|
662
|
-
function
|
|
639
|
+
let Ee = 0;
|
|
640
|
+
function vn() {
|
|
663
641
|
A(() => {
|
|
664
642
|
var e, n;
|
|
665
643
|
const t = document.querySelectorAll("[data-radix-focus-guard]");
|
|
666
|
-
return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e :
|
|
667
|
-
|
|
644
|
+
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()), Ee++, () => {
|
|
645
|
+
Ee === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
|
|
668
646
|
(o) => o.remove()
|
|
669
|
-
),
|
|
647
|
+
), Ee--;
|
|
670
648
|
};
|
|
671
649
|
}, []);
|
|
672
650
|
}
|
|
673
|
-
function
|
|
651
|
+
function He() {
|
|
674
652
|
const e = document.createElement("span");
|
|
675
653
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
676
654
|
}
|
|
@@ -691,16 +669,16 @@ function ut(e, n) {
|
|
|
691
669
|
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
692
670
|
return t;
|
|
693
671
|
}
|
|
694
|
-
function
|
|
672
|
+
function hn(e, n, t) {
|
|
695
673
|
if (t || arguments.length === 2) for (var o = 0, a = n.length, r; o < a; o++)
|
|
696
674
|
(r || !(o in n)) && (r || (r = Array.prototype.slice.call(n, 0, o)), r[o] = n[o]);
|
|
697
675
|
return e.concat(r || Array.prototype.slice.call(n));
|
|
698
676
|
}
|
|
699
|
-
var
|
|
700
|
-
function
|
|
677
|
+
var ve = "right-scroll-bar-position", he = "width-before-scroll-bar", mn = "with-scroll-bars-hidden", gn = "--removed-body-scroll-bar-size";
|
|
678
|
+
function we(e, n) {
|
|
701
679
|
return typeof e == "function" ? e(n) : e && (e.current = n), e;
|
|
702
680
|
}
|
|
703
|
-
function
|
|
681
|
+
function _n(e, n) {
|
|
704
682
|
var t = H(function() {
|
|
705
683
|
return {
|
|
706
684
|
// value
|
|
@@ -721,31 +699,31 @@ function $n(e, n) {
|
|
|
721
699
|
})[0];
|
|
722
700
|
return t.callback = n, t.facade;
|
|
723
701
|
}
|
|
724
|
-
var
|
|
725
|
-
function
|
|
726
|
-
var t =
|
|
702
|
+
var bn = typeof window < "u" ? m.useLayoutEffect : m.useEffect, Ve = /* @__PURE__ */ new WeakMap();
|
|
703
|
+
function $n(e, n) {
|
|
704
|
+
var t = _n(null, function(o) {
|
|
727
705
|
return e.forEach(function(a) {
|
|
728
|
-
return
|
|
706
|
+
return we(a, o);
|
|
729
707
|
});
|
|
730
708
|
});
|
|
731
|
-
return
|
|
709
|
+
return bn(function() {
|
|
732
710
|
var o = Ve.get(t);
|
|
733
711
|
if (o) {
|
|
734
712
|
var a = new Set(o), r = new Set(e), i = t.current;
|
|
735
713
|
a.forEach(function(c) {
|
|
736
|
-
r.has(c) ||
|
|
714
|
+
r.has(c) || we(c, null);
|
|
737
715
|
}), r.forEach(function(c) {
|
|
738
|
-
a.has(c) ||
|
|
716
|
+
a.has(c) || we(c, i);
|
|
739
717
|
});
|
|
740
718
|
}
|
|
741
719
|
Ve.set(t, e);
|
|
742
720
|
}, [e]), t;
|
|
743
721
|
}
|
|
744
|
-
function
|
|
722
|
+
function yn(e) {
|
|
745
723
|
return e;
|
|
746
724
|
}
|
|
747
|
-
function
|
|
748
|
-
n === void 0 && (n =
|
|
725
|
+
function En(e, n) {
|
|
726
|
+
n === void 0 && (n = yn);
|
|
749
727
|
var t = [], o = !1, a = {
|
|
750
728
|
read: function() {
|
|
751
729
|
if (o)
|
|
@@ -781,11 +759,11 @@ function xn(e, n) {
|
|
|
781
759
|
var c = t;
|
|
782
760
|
t = [], c.forEach(r), i = t;
|
|
783
761
|
}
|
|
784
|
-
var
|
|
762
|
+
var s = function() {
|
|
785
763
|
var p = i;
|
|
786
764
|
i = [], p.forEach(r);
|
|
787
765
|
}, d = function() {
|
|
788
|
-
return Promise.resolve().then(
|
|
766
|
+
return Promise.resolve().then(s);
|
|
789
767
|
};
|
|
790
768
|
d(), t = {
|
|
791
769
|
push: function(p) {
|
|
@@ -799,9 +777,9 @@ function xn(e, n) {
|
|
|
799
777
|
};
|
|
800
778
|
return a;
|
|
801
779
|
}
|
|
802
|
-
function
|
|
780
|
+
function wn(e) {
|
|
803
781
|
e === void 0 && (e = {});
|
|
804
|
-
var n =
|
|
782
|
+
var n = En(null);
|
|
805
783
|
return n.options = k({ async: !0, ssr: !1 }, e), n;
|
|
806
784
|
}
|
|
807
785
|
var st = function(e) {
|
|
@@ -814,63 +792,63 @@ var st = function(e) {
|
|
|
814
792
|
return m.createElement(o, k({}, t));
|
|
815
793
|
};
|
|
816
794
|
st.isSideCarExport = !0;
|
|
817
|
-
function
|
|
795
|
+
function xn(e, n) {
|
|
818
796
|
return e.useMedium(n), st;
|
|
819
797
|
}
|
|
820
|
-
var lt =
|
|
821
|
-
},
|
|
798
|
+
var lt = wn(), xe = function() {
|
|
799
|
+
}, _e = m.forwardRef(function(e, n) {
|
|
822
800
|
var t = m.useRef(null), o = m.useState({
|
|
823
|
-
onScrollCapture:
|
|
824
|
-
onWheelCapture:
|
|
825
|
-
onTouchMoveCapture:
|
|
826
|
-
}), a = o[0], r = o[1], i = e.forwardProps, c = e.children,
|
|
801
|
+
onScrollCapture: xe,
|
|
802
|
+
onWheelCapture: xe,
|
|
803
|
+
onTouchMoveCapture: xe
|
|
804
|
+
}), a = o[0], r = o[1], i = e.forwardProps, c = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, f = e.sideCar, v = e.noIsolation, E = e.inert, u = e.allowPinchZoom, h = e.as, g = h === void 0 ? "div" : h, C = ut(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = f, $ = $n([t, n]), x = k(k({}, C), a);
|
|
827
805
|
return m.createElement(
|
|
828
806
|
m.Fragment,
|
|
829
807
|
null,
|
|
830
|
-
p && m.createElement(y, { sideCar: lt, removeScrollBar: d, shards: l, noIsolation: v, inert: E, setCallbacks: r, allowPinchZoom: !!
|
|
831
|
-
i ? m.cloneElement(m.Children.only(c), k(k({}, x), { ref: $ })) : m.createElement(
|
|
808
|
+
p && m.createElement(y, { sideCar: lt, removeScrollBar: d, shards: l, noIsolation: v, inert: E, setCallbacks: r, allowPinchZoom: !!u, lockRef: t }),
|
|
809
|
+
i ? m.cloneElement(m.Children.only(c), k(k({}, x), { ref: $ })) : m.createElement(g, k({}, x, { className: s, ref: $ }), c)
|
|
832
810
|
);
|
|
833
811
|
});
|
|
834
|
-
|
|
812
|
+
_e.defaultProps = {
|
|
835
813
|
enabled: !0,
|
|
836
814
|
removeScrollBar: !0,
|
|
837
815
|
inert: !1
|
|
838
816
|
};
|
|
839
|
-
|
|
840
|
-
fullWidth:
|
|
841
|
-
zeroRight:
|
|
817
|
+
_e.classNames = {
|
|
818
|
+
fullWidth: he,
|
|
819
|
+
zeroRight: ve
|
|
842
820
|
};
|
|
843
|
-
var
|
|
821
|
+
var Sn = function() {
|
|
844
822
|
if (typeof __webpack_nonce__ < "u")
|
|
845
823
|
return __webpack_nonce__;
|
|
846
824
|
};
|
|
847
|
-
function
|
|
825
|
+
function Cn() {
|
|
848
826
|
if (!document)
|
|
849
827
|
return null;
|
|
850
828
|
var e = document.createElement("style");
|
|
851
829
|
e.type = "text/css";
|
|
852
|
-
var n =
|
|
830
|
+
var n = Sn();
|
|
853
831
|
return n && e.setAttribute("nonce", n), e;
|
|
854
832
|
}
|
|
855
|
-
function
|
|
833
|
+
function On(e, n) {
|
|
856
834
|
e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
|
|
857
835
|
}
|
|
858
|
-
function
|
|
836
|
+
function Nn(e) {
|
|
859
837
|
var n = document.head || document.getElementsByTagName("head")[0];
|
|
860
838
|
n.appendChild(e);
|
|
861
839
|
}
|
|
862
|
-
var
|
|
840
|
+
var Pn = function() {
|
|
863
841
|
var e = 0, n = null;
|
|
864
842
|
return {
|
|
865
843
|
add: function(t) {
|
|
866
|
-
e == 0 && (n =
|
|
844
|
+
e == 0 && (n = Cn()) && (On(n, t), Nn(n)), e++;
|
|
867
845
|
},
|
|
868
846
|
remove: function() {
|
|
869
847
|
e--, !e && n && (n.parentNode && n.parentNode.removeChild(n), n = null);
|
|
870
848
|
}
|
|
871
849
|
};
|
|
872
|
-
},
|
|
873
|
-
var e =
|
|
850
|
+
}, An = function() {
|
|
851
|
+
var e = Pn();
|
|
874
852
|
return function(n, t) {
|
|
875
853
|
m.useEffect(function() {
|
|
876
854
|
return e.add(n), function() {
|
|
@@ -879,35 +857,35 @@ var Tn = function() {
|
|
|
879
857
|
}, [n && t]);
|
|
880
858
|
};
|
|
881
859
|
}, dt = function() {
|
|
882
|
-
var e =
|
|
860
|
+
var e = An(), n = function(t) {
|
|
883
861
|
var o = t.styles, a = t.dynamic;
|
|
884
862
|
return e(o, a), null;
|
|
885
863
|
};
|
|
886
864
|
return n;
|
|
887
|
-
},
|
|
865
|
+
}, Tn = {
|
|
888
866
|
left: 0,
|
|
889
867
|
top: 0,
|
|
890
868
|
right: 0,
|
|
891
869
|
gap: 0
|
|
892
|
-
},
|
|
870
|
+
}, Se = function(e) {
|
|
893
871
|
return parseInt(e || "", 10) || 0;
|
|
894
|
-
},
|
|
872
|
+
}, Dn = function(e) {
|
|
895
873
|
var n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], a = n[e === "padding" ? "paddingRight" : "marginRight"];
|
|
896
|
-
return [
|
|
897
|
-
},
|
|
874
|
+
return [Se(t), Se(o), Se(a)];
|
|
875
|
+
}, In = function(e) {
|
|
898
876
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
899
|
-
return
|
|
900
|
-
var n =
|
|
877
|
+
return Tn;
|
|
878
|
+
var n = Dn(e), t = document.documentElement.clientWidth, o = window.innerWidth;
|
|
901
879
|
return {
|
|
902
880
|
left: n[0],
|
|
903
881
|
top: n[1],
|
|
904
882
|
right: n[2],
|
|
905
883
|
gap: Math.max(0, o - t + n[2] - n[0])
|
|
906
884
|
};
|
|
907
|
-
},
|
|
885
|
+
}, Ln = dt(), Y = "data-scroll-locked", Rn = function(e, n, t, o) {
|
|
908
886
|
var a = e.left, r = e.top, i = e.right, c = e.gap;
|
|
909
887
|
return t === void 0 && (t = "margin"), `
|
|
910
|
-
.`.concat(
|
|
888
|
+
.`.concat(mn, ` {
|
|
911
889
|
overflow: hidden `).concat(o, `;
|
|
912
890
|
padding-right: `).concat(c, "px ").concat(o, `;
|
|
913
891
|
}
|
|
@@ -928,67 +906,67 @@ var Tn = function() {
|
|
|
928
906
|
].filter(Boolean).join(""), `
|
|
929
907
|
}
|
|
930
908
|
|
|
931
|
-
.`).concat(
|
|
909
|
+
.`).concat(ve, ` {
|
|
932
910
|
right: `).concat(c, "px ").concat(o, `;
|
|
933
911
|
}
|
|
934
912
|
|
|
935
|
-
.`).concat(
|
|
913
|
+
.`).concat(he, ` {
|
|
936
914
|
margin-right: `).concat(c, "px ").concat(o, `;
|
|
937
915
|
}
|
|
938
916
|
|
|
939
|
-
.`).concat(
|
|
917
|
+
.`).concat(ve, " .").concat(ve, ` {
|
|
940
918
|
right: 0 `).concat(o, `;
|
|
941
919
|
}
|
|
942
920
|
|
|
943
|
-
.`).concat(
|
|
921
|
+
.`).concat(he, " .").concat(he, ` {
|
|
944
922
|
margin-right: 0 `).concat(o, `;
|
|
945
923
|
}
|
|
946
924
|
|
|
947
925
|
body[`).concat(Y, `] {
|
|
948
|
-
`).concat(
|
|
926
|
+
`).concat(gn, ": ").concat(c, `px;
|
|
949
927
|
}
|
|
950
928
|
`);
|
|
951
|
-
},
|
|
929
|
+
}, Ke = function() {
|
|
952
930
|
var e = parseInt(document.body.getAttribute(Y) || "0", 10);
|
|
953
931
|
return isFinite(e) ? e : 0;
|
|
954
|
-
},
|
|
932
|
+
}, Mn = function() {
|
|
955
933
|
m.useEffect(function() {
|
|
956
|
-
return document.body.setAttribute(Y, (
|
|
957
|
-
var e =
|
|
934
|
+
return document.body.setAttribute(Y, (Ke() + 1).toString()), function() {
|
|
935
|
+
var e = Ke() - 1;
|
|
958
936
|
e <= 0 ? document.body.removeAttribute(Y) : document.body.setAttribute(Y, e.toString());
|
|
959
937
|
};
|
|
960
938
|
}, []);
|
|
961
|
-
},
|
|
939
|
+
}, kn = function(e) {
|
|
962
940
|
var n = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
963
|
-
|
|
941
|
+
Mn();
|
|
964
942
|
var r = m.useMemo(function() {
|
|
965
|
-
return
|
|
943
|
+
return In(a);
|
|
966
944
|
}, [a]);
|
|
967
|
-
return m.createElement(
|
|
945
|
+
return m.createElement(Ln, { styles: Rn(r, !n, a, t ? "" : "!important") });
|
|
968
946
|
}, Te = !1;
|
|
969
947
|
if (typeof window < "u")
|
|
970
948
|
try {
|
|
971
|
-
var
|
|
949
|
+
var ue = Object.defineProperty({}, "passive", {
|
|
972
950
|
get: function() {
|
|
973
951
|
return Te = !0, !0;
|
|
974
952
|
}
|
|
975
953
|
});
|
|
976
|
-
window.addEventListener("test",
|
|
954
|
+
window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
|
|
977
955
|
} catch {
|
|
978
956
|
Te = !1;
|
|
979
957
|
}
|
|
980
|
-
var
|
|
958
|
+
var K = Te ? { passive: !1 } : !1, Fn = function(e) {
|
|
981
959
|
return e.tagName === "TEXTAREA";
|
|
982
960
|
}, pt = function(e, n) {
|
|
983
961
|
var t = window.getComputedStyle(e);
|
|
984
962
|
return (
|
|
985
963
|
// not-not-scrollable
|
|
986
964
|
t[n] !== "hidden" && // contains scroll inside self
|
|
987
|
-
!(t.overflowY === t.overflowX && !
|
|
965
|
+
!(t.overflowY === t.overflowX && !Fn(e) && t[n] === "visible")
|
|
988
966
|
);
|
|
989
|
-
},
|
|
967
|
+
}, jn = function(e) {
|
|
990
968
|
return pt(e, "overflowY");
|
|
991
|
-
},
|
|
969
|
+
}, Bn = function(e) {
|
|
992
970
|
return pt(e, "overflowX");
|
|
993
971
|
}, Xe = function(e, n) {
|
|
994
972
|
var t = n;
|
|
@@ -1003,14 +981,14 @@ var V = Te ? {} : !1, Bn = function(e) {
|
|
|
1003
981
|
t = t.parentNode;
|
|
1004
982
|
} while (t && t !== document.body);
|
|
1005
983
|
return !1;
|
|
1006
|
-
},
|
|
984
|
+
}, Un = function(e) {
|
|
1007
985
|
var n = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
|
|
1008
986
|
return [
|
|
1009
987
|
n,
|
|
1010
988
|
t,
|
|
1011
989
|
o
|
|
1012
990
|
];
|
|
1013
|
-
},
|
|
991
|
+
}, Wn = function(e) {
|
|
1014
992
|
var n = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
|
|
1015
993
|
return [
|
|
1016
994
|
n,
|
|
@@ -1018,38 +996,38 @@ var V = Te ? {} : !1, Bn = function(e) {
|
|
|
1018
996
|
o
|
|
1019
997
|
];
|
|
1020
998
|
}, ft = function(e, n) {
|
|
1021
|
-
return e === "v" ?
|
|
999
|
+
return e === "v" ? jn(n) : Bn(n);
|
|
1022
1000
|
}, vt = function(e, n) {
|
|
1023
|
-
return e === "v" ?
|
|
1024
|
-
},
|
|
1001
|
+
return e === "v" ? Un(n) : Wn(n);
|
|
1002
|
+
}, zn = function(e, n) {
|
|
1025
1003
|
return e === "h" && n === "rtl" ? -1 : 1;
|
|
1026
|
-
},
|
|
1027
|
-
var r =
|
|
1004
|
+
}, qn = function(e, n, t, o, a) {
|
|
1005
|
+
var r = zn(e, window.getComputedStyle(n).direction), i = r * o, c = t.target, s = n.contains(c), d = !1, p = i > 0, l = 0, f = 0;
|
|
1028
1006
|
do {
|
|
1029
|
-
var v = vt(e, c), E = v[0],
|
|
1030
|
-
(E ||
|
|
1007
|
+
var v = vt(e, c), E = v[0], u = v[1], h = v[2], g = u - h - r * E;
|
|
1008
|
+
(E || g) && ft(e, c) && (l += g, f += E), c = c.parentNode;
|
|
1031
1009
|
} while (
|
|
1032
1010
|
// portaled content
|
|
1033
|
-
!
|
|
1034
|
-
|
|
1011
|
+
!s && c !== document.body || // self content
|
|
1012
|
+
s && (n.contains(c) || n === c)
|
|
1035
1013
|
);
|
|
1036
1014
|
return (p && (l === 0 || !a) || !p && (f === 0 || !a)) && (d = !0), d;
|
|
1037
|
-
},
|
|
1015
|
+
}, se = function(e) {
|
|
1038
1016
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1039
|
-
},
|
|
1017
|
+
}, Ge = function(e) {
|
|
1040
1018
|
return [e.deltaX, e.deltaY];
|
|
1041
|
-
},
|
|
1019
|
+
}, Ye = function(e) {
|
|
1042
1020
|
return e && "current" in e ? e.current : e;
|
|
1043
|
-
},
|
|
1021
|
+
}, Hn = function(e, n) {
|
|
1044
1022
|
return e[0] === n[0] && e[1] === n[1];
|
|
1045
|
-
},
|
|
1023
|
+
}, Vn = function(e) {
|
|
1046
1024
|
return `
|
|
1047
1025
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1048
1026
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1049
1027
|
`);
|
|
1050
|
-
},
|
|
1051
|
-
function
|
|
1052
|
-
var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(
|
|
1028
|
+
}, Kn = 0, X = [];
|
|
1029
|
+
function Xn(e) {
|
|
1030
|
+
var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(Kn++)[0], r = m.useState(function() {
|
|
1053
1031
|
return dt();
|
|
1054
1032
|
})[0], i = m.useRef(e);
|
|
1055
1033
|
m.useEffect(function() {
|
|
@@ -1057,94 +1035,94 @@ function Yn(e) {
|
|
|
1057
1035
|
}, [e]), m.useEffect(function() {
|
|
1058
1036
|
if (e.inert) {
|
|
1059
1037
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
1060
|
-
var
|
|
1061
|
-
return
|
|
1038
|
+
var u = hn([e.lockRef.current], (e.shards || []).map(Ye), !0).filter(Boolean);
|
|
1039
|
+
return u.forEach(function(h) {
|
|
1062
1040
|
return h.classList.add("allow-interactivity-".concat(a));
|
|
1063
1041
|
}), function() {
|
|
1064
|
-
document.body.classList.remove("block-interactivity-".concat(a)),
|
|
1042
|
+
document.body.classList.remove("block-interactivity-".concat(a)), u.forEach(function(h) {
|
|
1065
1043
|
return h.classList.remove("allow-interactivity-".concat(a));
|
|
1066
1044
|
});
|
|
1067
1045
|
};
|
|
1068
1046
|
}
|
|
1069
1047
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1070
|
-
var c = m.useCallback(function(
|
|
1071
|
-
if ("touches" in
|
|
1048
|
+
var c = m.useCallback(function(u, h) {
|
|
1049
|
+
if ("touches" in u && u.touches.length === 2)
|
|
1072
1050
|
return !i.current.allowPinchZoom;
|
|
1073
|
-
var
|
|
1074
|
-
if ("touches" in
|
|
1051
|
+
var g = se(u), C = t.current, y = "deltaX" in u ? u.deltaX : C[0] - g[0], $ = "deltaY" in u ? u.deltaY : C[1] - g[1], x, z = u.target, D = Math.abs(y) > Math.abs($) ? "h" : "v";
|
|
1052
|
+
if ("touches" in u && D === "h" && z.type === "range")
|
|
1075
1053
|
return !1;
|
|
1076
1054
|
var w = Xe(D, z);
|
|
1077
1055
|
if (!w)
|
|
1078
1056
|
return !0;
|
|
1079
1057
|
if (w ? x = D : (x = D === "v" ? "h" : "v", w = Xe(D, z)), !w)
|
|
1080
1058
|
return !1;
|
|
1081
|
-
if (!o.current && "changedTouches" in
|
|
1059
|
+
if (!o.current && "changedTouches" in u && (y || $) && (o.current = x), !x)
|
|
1082
1060
|
return !0;
|
|
1083
1061
|
var I = o.current || x;
|
|
1084
|
-
return
|
|
1085
|
-
}, []),
|
|
1086
|
-
var h =
|
|
1087
|
-
if (!(!
|
|
1088
|
-
var
|
|
1089
|
-
return x.name === h.type && x.target === h.target &&
|
|
1062
|
+
return qn(I, h, u, I === "h" ? y : $, !0);
|
|
1063
|
+
}, []), s = m.useCallback(function(u) {
|
|
1064
|
+
var h = u;
|
|
1065
|
+
if (!(!X.length || X[X.length - 1] !== r)) {
|
|
1066
|
+
var g = "deltaY" in h ? Ge(h) : se(h), C = n.current.filter(function(x) {
|
|
1067
|
+
return x.name === h.type && x.target === h.target && Hn(x.delta, g);
|
|
1090
1068
|
})[0];
|
|
1091
1069
|
if (C && C.should) {
|
|
1092
1070
|
h.cancelable && h.preventDefault();
|
|
1093
1071
|
return;
|
|
1094
1072
|
}
|
|
1095
1073
|
if (!C) {
|
|
1096
|
-
var y = (i.current.shards || []).map(
|
|
1074
|
+
var y = (i.current.shards || []).map(Ye).filter(Boolean).filter(function(x) {
|
|
1097
1075
|
return x.contains(h.target);
|
|
1098
1076
|
}), $ = y.length > 0 ? c(h, y[0]) : !i.current.noIsolation;
|
|
1099
1077
|
$ && h.cancelable && h.preventDefault();
|
|
1100
1078
|
}
|
|
1101
1079
|
}
|
|
1102
|
-
}, []), d = m.useCallback(function(
|
|
1103
|
-
var y = { name:
|
|
1080
|
+
}, []), d = m.useCallback(function(u, h, g, C) {
|
|
1081
|
+
var y = { name: u, delta: h, target: g, should: C };
|
|
1104
1082
|
n.current.push(y), setTimeout(function() {
|
|
1105
1083
|
n.current = n.current.filter(function($) {
|
|
1106
1084
|
return $ !== y;
|
|
1107
1085
|
});
|
|
1108
1086
|
}, 1);
|
|
1109
|
-
}, []), p = m.useCallback(function(
|
|
1110
|
-
t.current =
|
|
1111
|
-
}, []), l = m.useCallback(function(
|
|
1112
|
-
d(
|
|
1113
|
-
}, []), f = m.useCallback(function(
|
|
1114
|
-
d(
|
|
1087
|
+
}, []), p = m.useCallback(function(u) {
|
|
1088
|
+
t.current = se(u), o.current = void 0;
|
|
1089
|
+
}, []), l = m.useCallback(function(u) {
|
|
1090
|
+
d(u.type, Ge(u), u.target, c(u, e.lockRef.current));
|
|
1091
|
+
}, []), f = m.useCallback(function(u) {
|
|
1092
|
+
d(u.type, se(u), u.target, c(u, e.lockRef.current));
|
|
1115
1093
|
}, []);
|
|
1116
1094
|
m.useEffect(function() {
|
|
1117
|
-
return
|
|
1095
|
+
return X.push(r), e.setCallbacks({
|
|
1118
1096
|
onScrollCapture: l,
|
|
1119
1097
|
onWheelCapture: l,
|
|
1120
1098
|
onTouchMoveCapture: f
|
|
1121
|
-
}), document.addEventListener("wheel",
|
|
1122
|
-
|
|
1123
|
-
return
|
|
1124
|
-
}), document.removeEventListener("wheel",
|
|
1099
|
+
}), document.addEventListener("wheel", s, K), document.addEventListener("touchmove", s, K), document.addEventListener("touchstart", p, K), function() {
|
|
1100
|
+
X = X.filter(function(u) {
|
|
1101
|
+
return u !== r;
|
|
1102
|
+
}), document.removeEventListener("wheel", s, K), document.removeEventListener("touchmove", s, K), document.removeEventListener("touchstart", p, K);
|
|
1125
1103
|
};
|
|
1126
1104
|
}, []);
|
|
1127
1105
|
var v = e.removeScrollBar, E = e.inert;
|
|
1128
1106
|
return m.createElement(
|
|
1129
1107
|
m.Fragment,
|
|
1130
1108
|
null,
|
|
1131
|
-
E ? m.createElement(r, { styles:
|
|
1132
|
-
v ? m.createElement(
|
|
1109
|
+
E ? m.createElement(r, { styles: Vn(a) }) : null,
|
|
1110
|
+
v ? m.createElement(kn, { gapMode: "margin" }) : null
|
|
1133
1111
|
);
|
|
1134
1112
|
}
|
|
1135
|
-
const
|
|
1113
|
+
const Gn = xn(lt, Xn);
|
|
1136
1114
|
var ht = m.forwardRef(function(e, n) {
|
|
1137
|
-
return m.createElement(
|
|
1115
|
+
return m.createElement(_e, k({}, e, { ref: n, sideCar: Gn }));
|
|
1138
1116
|
});
|
|
1139
|
-
ht.classNames =
|
|
1140
|
-
var
|
|
1117
|
+
ht.classNames = _e.classNames;
|
|
1118
|
+
var Yn = function(e) {
|
|
1141
1119
|
if (typeof document > "u")
|
|
1142
1120
|
return null;
|
|
1143
1121
|
var n = Array.isArray(e) ? e[0] : e;
|
|
1144
1122
|
return n.ownerDocument.body;
|
|
1145
|
-
},
|
|
1123
|
+
}, G = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {}, Ce = 0, mt = function(e) {
|
|
1146
1124
|
return e && (e.host || mt(e.parentNode));
|
|
1147
|
-
},
|
|
1125
|
+
}, Zn = function(e, n) {
|
|
1148
1126
|
return n.map(function(t) {
|
|
1149
1127
|
if (e.contains(t))
|
|
1150
1128
|
return t;
|
|
@@ -1153,55 +1131,55 @@ var Qn = function(e) {
|
|
|
1153
1131
|
}).filter(function(t) {
|
|
1154
1132
|
return !!t;
|
|
1155
1133
|
});
|
|
1156
|
-
},
|
|
1157
|
-
var a =
|
|
1158
|
-
|
|
1159
|
-
var r =
|
|
1134
|
+
}, Qn = function(e, n, t, o) {
|
|
1135
|
+
var a = Zn(n, Array.isArray(e) ? e : [e]);
|
|
1136
|
+
de[t] || (de[t] = /* @__PURE__ */ new WeakMap());
|
|
1137
|
+
var r = de[t], i = [], c = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
|
|
1160
1138
|
!l || c.has(l) || (c.add(l), d(l.parentNode));
|
|
1161
1139
|
};
|
|
1162
1140
|
a.forEach(d);
|
|
1163
1141
|
var p = function(l) {
|
|
1164
|
-
!l ||
|
|
1142
|
+
!l || s.has(l) || Array.prototype.forEach.call(l.children, function(f) {
|
|
1165
1143
|
if (c.has(f))
|
|
1166
1144
|
p(f);
|
|
1167
1145
|
else
|
|
1168
1146
|
try {
|
|
1169
|
-
var v = f.getAttribute(o), E = v !== null && v !== "false",
|
|
1170
|
-
|
|
1171
|
-
} catch (
|
|
1172
|
-
console.error("aria-hidden: cannot operate on ", f,
|
|
1147
|
+
var v = f.getAttribute(o), E = v !== null && v !== "false", u = (G.get(f) || 0) + 1, h = (r.get(f) || 0) + 1;
|
|
1148
|
+
G.set(f, u), r.set(f, h), i.push(f), u === 1 && E && le.set(f, !0), h === 1 && f.setAttribute(t, "true"), E || f.setAttribute(o, "true");
|
|
1149
|
+
} catch (g) {
|
|
1150
|
+
console.error("aria-hidden: cannot operate on ", f, g);
|
|
1173
1151
|
}
|
|
1174
1152
|
});
|
|
1175
1153
|
};
|
|
1176
|
-
return p(n), c.clear(),
|
|
1154
|
+
return p(n), c.clear(), Ce++, function() {
|
|
1177
1155
|
i.forEach(function(l) {
|
|
1178
|
-
var f =
|
|
1179
|
-
|
|
1180
|
-
}),
|
|
1156
|
+
var f = G.get(l) - 1, v = r.get(l) - 1;
|
|
1157
|
+
G.set(l, f), r.set(l, v), f || (le.has(l) || l.removeAttribute(o), le.delete(l)), v || l.removeAttribute(t);
|
|
1158
|
+
}), Ce--, Ce || (G = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {});
|
|
1181
1159
|
};
|
|
1182
|
-
},
|
|
1160
|
+
}, Jn = function(e, n, t) {
|
|
1183
1161
|
t === void 0 && (t = "data-aria-hidden");
|
|
1184
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1185
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))),
|
|
1162
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = Yn(e);
|
|
1163
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Qn(o, a, t, "aria-hidden")) : function() {
|
|
1186
1164
|
return null;
|
|
1187
1165
|
};
|
|
1188
1166
|
};
|
|
1189
|
-
const gt = "Dialog", [_t,
|
|
1190
|
-
const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c = N(null),
|
|
1167
|
+
const gt = "Dialog", [_t, wo] = jt(gt), [er, M] = _t(gt), tr = (e) => {
|
|
1168
|
+
const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c = N(null), s = N(null), [d = !1, p] = zt({
|
|
1191
1169
|
prop: o,
|
|
1192
1170
|
defaultProp: a,
|
|
1193
1171
|
onChange: r
|
|
1194
1172
|
});
|
|
1195
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ _(er, {
|
|
1196
1174
|
scope: n,
|
|
1197
1175
|
triggerRef: c,
|
|
1198
|
-
contentRef:
|
|
1199
|
-
contentId:
|
|
1200
|
-
titleId:
|
|
1201
|
-
descriptionId:
|
|
1176
|
+
contentRef: s,
|
|
1177
|
+
contentId: be(),
|
|
1178
|
+
titleId: be(),
|
|
1179
|
+
descriptionId: be(),
|
|
1202
1180
|
open: d,
|
|
1203
1181
|
onOpenChange: p,
|
|
1204
|
-
onOpenToggle:
|
|
1182
|
+
onOpenToggle: Q(
|
|
1205
1183
|
() => p(
|
|
1206
1184
|
(l) => !l
|
|
1207
1185
|
),
|
|
@@ -1211,54 +1189,54 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
|
|
|
1211
1189
|
),
|
|
1212
1190
|
modal: i
|
|
1213
1191
|
}, t);
|
|
1214
|
-
},
|
|
1215
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1216
|
-
return /* @__PURE__ */
|
|
1192
|
+
}, nr = "DialogTrigger", rr = /* @__PURE__ */ S((e, n) => {
|
|
1193
|
+
const { __scopeDialog: t, ...o } = e, a = M(nr, t), r = J(n, a.triggerRef);
|
|
1194
|
+
return /* @__PURE__ */ _(W.button, P({
|
|
1217
1195
|
type: "button",
|
|
1218
1196
|
"aria-haspopup": "dialog",
|
|
1219
1197
|
"aria-expanded": a.open,
|
|
1220
1198
|
"aria-controls": a.contentId,
|
|
1221
|
-
"data-state":
|
|
1199
|
+
"data-state": Me(a.open)
|
|
1222
1200
|
}, o, {
|
|
1223
1201
|
ref: r,
|
|
1224
1202
|
onClick: B(e.onClick, a.onOpenToggle)
|
|
1225
1203
|
}));
|
|
1226
|
-
}), bt = "DialogPortal", [
|
|
1204
|
+
}), bt = "DialogPortal", [or, $t] = _t(bt, {
|
|
1227
1205
|
forceMount: void 0
|
|
1228
|
-
}),
|
|
1229
|
-
const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r =
|
|
1230
|
-
return /* @__PURE__ */
|
|
1206
|
+
}), ar = (e) => {
|
|
1207
|
+
const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = M(bt, n);
|
|
1208
|
+
return /* @__PURE__ */ _(or, {
|
|
1231
1209
|
scope: n,
|
|
1232
1210
|
forceMount: t
|
|
1233
1211
|
}, L.map(
|
|
1234
1212
|
o,
|
|
1235
|
-
(i) => /* @__PURE__ */
|
|
1213
|
+
(i) => /* @__PURE__ */ _(ge, {
|
|
1236
1214
|
present: t || r.open
|
|
1237
|
-
}, /* @__PURE__ */
|
|
1215
|
+
}, /* @__PURE__ */ _(dn, {
|
|
1238
1216
|
asChild: !0,
|
|
1239
1217
|
container: a
|
|
1240
1218
|
}, i))
|
|
1241
1219
|
));
|
|
1242
|
-
}, De = "DialogOverlay",
|
|
1243
|
-
const t = $t(De, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r =
|
|
1244
|
-
return r.modal ? /* @__PURE__ */
|
|
1220
|
+
}, De = "DialogOverlay", ir = /* @__PURE__ */ S((e, n) => {
|
|
1221
|
+
const t = $t(De, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(De, e.__scopeDialog);
|
|
1222
|
+
return r.modal ? /* @__PURE__ */ _(ge, {
|
|
1245
1223
|
present: o || r.open
|
|
1246
|
-
}, /* @__PURE__ */
|
|
1224
|
+
}, /* @__PURE__ */ _(cr, P({}, a, {
|
|
1247
1225
|
ref: n
|
|
1248
1226
|
}))) : null;
|
|
1249
|
-
}),
|
|
1250
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1227
|
+
}), cr = /* @__PURE__ */ S((e, n) => {
|
|
1228
|
+
const { __scopeDialog: t, ...o } = e, a = M(De, t);
|
|
1251
1229
|
return (
|
|
1252
1230
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1253
1231
|
// ie. when `Overlay` and `Content` are siblings
|
|
1254
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ _(ht, {
|
|
1255
1233
|
as: Re,
|
|
1256
1234
|
allowPinchZoom: !0,
|
|
1257
1235
|
shards: [
|
|
1258
1236
|
a.contentRef
|
|
1259
1237
|
]
|
|
1260
|
-
}, /* @__PURE__ */
|
|
1261
|
-
"data-state":
|
|
1238
|
+
}, /* @__PURE__ */ _(W.div, P({
|
|
1239
|
+
"data-state": Me(a.open)
|
|
1262
1240
|
}, o, {
|
|
1263
1241
|
ref: n,
|
|
1264
1242
|
style: {
|
|
@@ -1267,21 +1245,21 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
|
|
|
1267
1245
|
}
|
|
1268
1246
|
})))
|
|
1269
1247
|
);
|
|
1270
|
-
}),
|
|
1271
|
-
const t = $t(
|
|
1272
|
-
return /* @__PURE__ */
|
|
1248
|
+
}), oe = "DialogContent", ur = /* @__PURE__ */ S((e, n) => {
|
|
1249
|
+
const t = $t(oe, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(oe, e.__scopeDialog);
|
|
1250
|
+
return /* @__PURE__ */ _(ge, {
|
|
1273
1251
|
present: o || r.open
|
|
1274
|
-
}, r.modal ? /* @__PURE__ */
|
|
1252
|
+
}, r.modal ? /* @__PURE__ */ _(sr, P({}, a, {
|
|
1275
1253
|
ref: n
|
|
1276
|
-
})) : /* @__PURE__ */
|
|
1254
|
+
})) : /* @__PURE__ */ _(lr, P({}, a, {
|
|
1277
1255
|
ref: n
|
|
1278
1256
|
})));
|
|
1279
|
-
}),
|
|
1280
|
-
const t =
|
|
1257
|
+
}), sr = /* @__PURE__ */ S((e, n) => {
|
|
1258
|
+
const t = M(oe, e.__scopeDialog), o = N(null), a = J(n, t.contentRef, o);
|
|
1281
1259
|
return A(() => {
|
|
1282
1260
|
const r = o.current;
|
|
1283
|
-
if (r) return
|
|
1284
|
-
}, []), /* @__PURE__ */
|
|
1261
|
+
if (r) return Jn(r);
|
|
1262
|
+
}, []), /* @__PURE__ */ _(yt, P({}, e, {
|
|
1285
1263
|
ref: a,
|
|
1286
1264
|
trapFocus: t.open,
|
|
1287
1265
|
disableOutsidePointerEvents: !0,
|
|
@@ -1298,9 +1276,9 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
|
|
|
1298
1276
|
(r) => r.preventDefault()
|
|
1299
1277
|
)
|
|
1300
1278
|
}));
|
|
1301
|
-
}),
|
|
1302
|
-
const t =
|
|
1303
|
-
return /* @__PURE__ */
|
|
1279
|
+
}), lr = /* @__PURE__ */ S((e, n) => {
|
|
1280
|
+
const t = M(oe, e.__scopeDialog), o = N(!1), a = N(!1);
|
|
1281
|
+
return /* @__PURE__ */ _(yt, P({}, e, {
|
|
1304
1282
|
ref: n,
|
|
1305
1283
|
trapFocus: !1,
|
|
1306
1284
|
disableOutsidePointerEvents: !1,
|
|
@@ -1315,45 +1293,45 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
|
|
|
1315
1293
|
onInteractOutside: (r) => {
|
|
1316
1294
|
var i, c;
|
|
1317
1295
|
(i = e.onInteractOutside) === null || i === void 0 || i.call(e, r), r.defaultPrevented || (o.current = !0, r.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
1318
|
-
const
|
|
1319
|
-
((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(
|
|
1296
|
+
const s = r.target;
|
|
1297
|
+
((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
|
|
1320
1298
|
}
|
|
1321
1299
|
}));
|
|
1322
1300
|
}), yt = /* @__PURE__ */ S((e, n) => {
|
|
1323
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c =
|
|
1324
|
-
return
|
|
1301
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c = M(oe, t), s = N(null), d = J(n, s);
|
|
1302
|
+
return vn(), /* @__PURE__ */ _(Le, null, /* @__PURE__ */ _(rn, {
|
|
1325
1303
|
asChild: !0,
|
|
1326
1304
|
loop: !0,
|
|
1327
1305
|
trapped: o,
|
|
1328
1306
|
onMountAutoFocus: a,
|
|
1329
1307
|
onUnmountAutoFocus: r
|
|
1330
|
-
}, /* @__PURE__ */
|
|
1308
|
+
}, /* @__PURE__ */ _(en, P({
|
|
1331
1309
|
role: "dialog",
|
|
1332
1310
|
id: c.contentId,
|
|
1333
1311
|
"aria-describedby": c.descriptionId,
|
|
1334
1312
|
"aria-labelledby": c.titleId,
|
|
1335
|
-
"data-state":
|
|
1313
|
+
"data-state": Me(c.open)
|
|
1336
1314
|
}, i, {
|
|
1337
1315
|
ref: d,
|
|
1338
1316
|
onDismiss: () => c.onOpenChange(!1)
|
|
1339
1317
|
}))), !1);
|
|
1340
|
-
}),
|
|
1341
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1342
|
-
return /* @__PURE__ */
|
|
1318
|
+
}), dr = "DialogTitle", pr = /* @__PURE__ */ S((e, n) => {
|
|
1319
|
+
const { __scopeDialog: t, ...o } = e, a = M(dr, t);
|
|
1320
|
+
return /* @__PURE__ */ _(W.h2, P({
|
|
1343
1321
|
id: a.titleId
|
|
1344
1322
|
}, o, {
|
|
1345
1323
|
ref: n
|
|
1346
1324
|
}));
|
|
1347
|
-
}),
|
|
1348
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1349
|
-
return /* @__PURE__ */
|
|
1325
|
+
}), fr = "DialogDescription", vr = /* @__PURE__ */ S((e, n) => {
|
|
1326
|
+
const { __scopeDialog: t, ...o } = e, a = M(fr, t);
|
|
1327
|
+
return /* @__PURE__ */ _(W.p, P({
|
|
1350
1328
|
id: a.descriptionId
|
|
1351
1329
|
}, o, {
|
|
1352
1330
|
ref: n
|
|
1353
1331
|
}));
|
|
1354
|
-
}),
|
|
1355
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1356
|
-
return /* @__PURE__ */
|
|
1332
|
+
}), hr = "DialogClose", mr = /* @__PURE__ */ S((e, n) => {
|
|
1333
|
+
const { __scopeDialog: t, ...o } = e, a = M(hr, t);
|
|
1334
|
+
return /* @__PURE__ */ _(W.button, P({
|
|
1357
1335
|
type: "button"
|
|
1358
1336
|
}, o, {
|
|
1359
1337
|
ref: n,
|
|
@@ -1363,22 +1341,18 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
|
|
|
1363
1341
|
)
|
|
1364
1342
|
}));
|
|
1365
1343
|
});
|
|
1366
|
-
function
|
|
1344
|
+
function Me(e) {
|
|
1367
1345
|
return e ? "open" : "closed";
|
|
1368
1346
|
}
|
|
1369
|
-
const _r =
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
titleName: Et,
|
|
1373
|
-
docsSlug: "dialog"
|
|
1374
|
-
});
|
|
1375
|
-
const br = rr, $r = ar, yr = cr, Er = ur, wr = lr, xr = fr, Qe = hr, Sr = gr, Cr = {
|
|
1347
|
+
const gr = tr, _r = rr, br = ar, $r = ir, yr = ur, Er = pr, Ze = vr, wr = mr, xr = {
|
|
1348
|
+
SM: "sm",
|
|
1349
|
+
MD: "md",
|
|
1376
1350
|
LG: "lg"
|
|
1377
1351
|
};
|
|
1378
|
-
function
|
|
1352
|
+
function Sr(e) {
|
|
1379
1353
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1380
1354
|
}
|
|
1381
|
-
var
|
|
1355
|
+
var Et = { exports: {} };
|
|
1382
1356
|
/*!
|
|
1383
1357
|
Copyright (c) 2018 Jed Watson.
|
|
1384
1358
|
Licensed under the MIT License (MIT), see
|
|
@@ -1413,40 +1387,44 @@ var wt = { exports: {} };
|
|
|
1413
1387
|
}
|
|
1414
1388
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1415
1389
|
})();
|
|
1416
|
-
})(
|
|
1417
|
-
var
|
|
1418
|
-
const
|
|
1390
|
+
})(Et);
|
|
1391
|
+
var Cr = Et.exports;
|
|
1392
|
+
const Qe = /* @__PURE__ */ Sr(Cr), Or = "_rotate_1xozj_1", Nr = "_dash_1xozj_1", ee = {
|
|
1419
1393
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1420
|
-
rotate:
|
|
1394
|
+
rotate: Or,
|
|
1421
1395
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
1422
1396
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
1423
1397
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
1424
1398
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
1425
1399
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
1426
1400
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
1427
|
-
dash:
|
|
1401
|
+
dash: Nr,
|
|
1428
1402
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1429
1403
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1430
|
-
},
|
|
1431
|
-
|
|
1432
|
-
|
|
1404
|
+
}, te = "purpur-spinner", Pr = {
|
|
1405
|
+
XXS: "xxs",
|
|
1406
|
+
XS: "xs",
|
|
1407
|
+
SM: "sm",
|
|
1408
|
+
MD: "md",
|
|
1409
|
+
LG: "lg"
|
|
1410
|
+
}, Ar = ({
|
|
1433
1411
|
["data-testid"]: e,
|
|
1434
1412
|
disabled: n = !1,
|
|
1435
1413
|
negative: t = !1,
|
|
1436
|
-
size: o =
|
|
1414
|
+
size: o = Pr.SM,
|
|
1437
1415
|
...a
|
|
1438
1416
|
}) => /* @__PURE__ */ b(
|
|
1439
1417
|
"div",
|
|
1440
1418
|
{
|
|
1441
|
-
className:
|
|
1419
|
+
className: Qe([ee[te], ee[`${te}--${o}`]]),
|
|
1442
1420
|
"data-testid": e,
|
|
1443
1421
|
...a,
|
|
1444
1422
|
children: /* @__PURE__ */ b("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ b(
|
|
1445
1423
|
"circle",
|
|
1446
1424
|
{
|
|
1447
|
-
className:
|
|
1448
|
-
[
|
|
1449
|
-
[
|
|
1425
|
+
className: Qe(ee[`${te}__circle`], {
|
|
1426
|
+
[ee[`${te}__circle--disabled`]]: n,
|
|
1427
|
+
[ee[`${te}__circle--negative`]]: t
|
|
1450
1428
|
}),
|
|
1451
1429
|
cx: "25",
|
|
1452
1430
|
cy: "25",
|
|
@@ -1455,10 +1433,10 @@ const Je = /* @__PURE__ */ Or(Nr), Pr = "_rotate_1xozj_1", Ar = "_dash_1xozj_1",
|
|
|
1455
1433
|
) })
|
|
1456
1434
|
}
|
|
1457
1435
|
);
|
|
1458
|
-
function
|
|
1436
|
+
function Tr(e) {
|
|
1459
1437
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1460
1438
|
}
|
|
1461
|
-
var
|
|
1439
|
+
var wt = { exports: {} };
|
|
1462
1440
|
/*!
|
|
1463
1441
|
Copyright (c) 2018 Jed Watson.
|
|
1464
1442
|
Licensed under the MIT License (MIT), see
|
|
@@ -1493,9 +1471,9 @@ var xt = { exports: {} };
|
|
|
1493
1471
|
}
|
|
1494
1472
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1495
1473
|
})();
|
|
1496
|
-
})(
|
|
1497
|
-
var
|
|
1498
|
-
const
|
|
1474
|
+
})(wt);
|
|
1475
|
+
var Dr = wt.exports;
|
|
1476
|
+
const Ir = /* @__PURE__ */ Tr(Dr), Lr = {
|
|
1499
1477
|
"purpur-button": "_purpur-button_1acxn_1",
|
|
1500
1478
|
"purpur-button--sm": "_purpur-button--sm_1acxn_33",
|
|
1501
1479
|
"purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
|
|
@@ -1516,7 +1494,7 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
|
|
|
1516
1494
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
|
|
1517
1495
|
"purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
|
|
1518
1496
|
"purpur-button--text": "_purpur-button--text_1acxn_175"
|
|
1519
|
-
},
|
|
1497
|
+
}, Rr = Ir.bind(Lr), q = "purpur-button", Mr = ({
|
|
1520
1498
|
children: e,
|
|
1521
1499
|
className: n,
|
|
1522
1500
|
["data-testid"]: t,
|
|
@@ -1525,7 +1503,7 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
|
|
|
1525
1503
|
iconOnly: r,
|
|
1526
1504
|
loading: i = !1,
|
|
1527
1505
|
negative: c = !1,
|
|
1528
|
-
onClick:
|
|
1506
|
+
onClick: s,
|
|
1529
1507
|
size: d = "md",
|
|
1530
1508
|
variant: p,
|
|
1531
1509
|
type: l = "button",
|
|
@@ -1533,7 +1511,7 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
|
|
|
1533
1511
|
}, v) => {
|
|
1534
1512
|
if (r && p === "destructive")
|
|
1535
1513
|
return null;
|
|
1536
|
-
const E =
|
|
1514
|
+
const E = Rr(
|
|
1537
1515
|
[
|
|
1538
1516
|
q,
|
|
1539
1517
|
`${q}--${c ? `${p}-negative` : p}`,
|
|
@@ -1546,8 +1524,8 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
|
|
|
1546
1524
|
[`${q}--disabled`]: o || i
|
|
1547
1525
|
},
|
|
1548
1526
|
n
|
|
1549
|
-
),
|
|
1550
|
-
o || i ?
|
|
1527
|
+
), u = (g) => {
|
|
1528
|
+
o || i ? g.preventDefault() : s && s(g);
|
|
1551
1529
|
}, h = !!f["aria-disabled"] || o || i;
|
|
1552
1530
|
return /* @__PURE__ */ F(
|
|
1553
1531
|
"button",
|
|
@@ -1557,21 +1535,21 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
|
|
|
1557
1535
|
type: l,
|
|
1558
1536
|
ref: v,
|
|
1559
1537
|
"aria-disabled": h,
|
|
1560
|
-
onClick:
|
|
1538
|
+
onClick: u,
|
|
1561
1539
|
...f,
|
|
1562
1540
|
children: [
|
|
1563
|
-
i && /* @__PURE__ */ b(
|
|
1541
|
+
i && /* @__PURE__ */ b(Ar, { size: d === xr.LG ? "xs" : "xxs", negative: c, disabled: h }),
|
|
1564
1542
|
" ",
|
|
1565
1543
|
e
|
|
1566
1544
|
]
|
|
1567
1545
|
}
|
|
1568
1546
|
);
|
|
1569
|
-
},
|
|
1570
|
-
|
|
1571
|
-
function
|
|
1547
|
+
}, ke = S(Mr);
|
|
1548
|
+
ke.displayName = "Button";
|
|
1549
|
+
function kr(e) {
|
|
1572
1550
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1573
1551
|
}
|
|
1574
|
-
var
|
|
1552
|
+
var xt = { exports: {} };
|
|
1575
1553
|
/*!
|
|
1576
1554
|
Copyright (c) 2018 Jed Watson.
|
|
1577
1555
|
Licensed under the MIT License (MIT), see
|
|
@@ -1606,9 +1584,9 @@ var St = { exports: {} };
|
|
|
1606
1584
|
}
|
|
1607
1585
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1608
1586
|
})();
|
|
1609
|
-
})(
|
|
1610
|
-
var
|
|
1611
|
-
const
|
|
1587
|
+
})(xt);
|
|
1588
|
+
var Fr = xt.exports;
|
|
1589
|
+
const jr = /* @__PURE__ */ kr(Fr), pe = {
|
|
1612
1590
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1613
1591
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1614
1592
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1624,34 +1602,41 @@ const Wr = /* @__PURE__ */ jr(Br), fe = {
|
|
|
1624
1602
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
1625
1603
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
1626
1604
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
1627
|
-
},
|
|
1628
|
-
TITLE100: "title-100"
|
|
1629
|
-
|
|
1605
|
+
}, Br = {
|
|
1606
|
+
TITLE100: "title-100",
|
|
1607
|
+
TITLE200: "title-200",
|
|
1608
|
+
TITLE300: "title-300",
|
|
1609
|
+
TITLE400: "title-400",
|
|
1610
|
+
TITLE500: "title-500",
|
|
1611
|
+
TITLE600: "title-600",
|
|
1612
|
+
TITLE700: "title-700",
|
|
1613
|
+
SUBSECTION100: "subsection-100"
|
|
1614
|
+
}, fe = "purpur-heading", St = ({
|
|
1630
1615
|
["data-testid"]: e,
|
|
1631
1616
|
children: n,
|
|
1632
1617
|
className: t = "",
|
|
1633
1618
|
enableHyphenation: o = !1,
|
|
1634
1619
|
negative: a = !1,
|
|
1635
1620
|
tag: r,
|
|
1636
|
-
variant: i =
|
|
1621
|
+
variant: i = Br.TITLE100,
|
|
1637
1622
|
...c
|
|
1638
1623
|
}) => {
|
|
1639
|
-
const
|
|
1624
|
+
const s = r, d = jr([
|
|
1640
1625
|
t,
|
|
1641
|
-
fe
|
|
1642
|
-
|
|
1626
|
+
pe[fe],
|
|
1627
|
+
pe[`${fe}--${i}`],
|
|
1643
1628
|
{
|
|
1644
|
-
[
|
|
1645
|
-
[
|
|
1629
|
+
[pe[`${fe}--hyphens`]]: o,
|
|
1630
|
+
[pe[`${fe}--negative`]]: a
|
|
1646
1631
|
}
|
|
1647
1632
|
]);
|
|
1648
|
-
return /* @__PURE__ */ b(
|
|
1633
|
+
return /* @__PURE__ */ b(s, { ...c, className: d, "data-testid": e, children: n });
|
|
1649
1634
|
};
|
|
1650
|
-
|
|
1651
|
-
function
|
|
1635
|
+
St.displayName = "Heading";
|
|
1636
|
+
function Ur(e) {
|
|
1652
1637
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1653
1638
|
}
|
|
1654
|
-
var
|
|
1639
|
+
var Ct = { exports: {} };
|
|
1655
1640
|
/*!
|
|
1656
1641
|
Copyright (c) 2018 Jed Watson.
|
|
1657
1642
|
Licensed under the MIT License (MIT), see
|
|
@@ -1686,9 +1671,9 @@ var Ot = { exports: {} };
|
|
|
1686
1671
|
}
|
|
1687
1672
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1688
1673
|
})();
|
|
1689
|
-
})(
|
|
1690
|
-
var
|
|
1691
|
-
const
|
|
1674
|
+
})(Ct);
|
|
1675
|
+
var Wr = Ct.exports;
|
|
1676
|
+
const zr = /* @__PURE__ */ Ur(Wr), qr = {
|
|
1692
1677
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1693
1678
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1694
1679
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1696,39 +1681,39 @@ const Hr = /* @__PURE__ */ zr(qr), Kr = {
|
|
|
1696
1681
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1697
1682
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1698
1683
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1699
|
-
},
|
|
1684
|
+
}, Hr = {
|
|
1700
1685
|
name: "close",
|
|
1701
1686
|
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>',
|
|
1702
1687
|
keywords: ["close"],
|
|
1703
1688
|
category: "utility"
|
|
1704
|
-
},
|
|
1705
|
-
|
|
1689
|
+
}, Ot = (e) => /* @__PURE__ */ b(
|
|
1690
|
+
Nt,
|
|
1706
1691
|
{
|
|
1707
1692
|
...e,
|
|
1708
|
-
svg:
|
|
1693
|
+
svg: Hr
|
|
1709
1694
|
}
|
|
1710
1695
|
);
|
|
1711
|
-
|
|
1712
|
-
const
|
|
1696
|
+
Ot.displayName = "IconClose";
|
|
1697
|
+
const Vr = zr.bind(qr), Je = "purpur-icon", Kr = "md", Xr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Gr = ({ content: e = "", title: n } = {}) => {
|
|
1713
1698
|
const t = [
|
|
1714
1699
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1715
1700
|
{ name: "fill", value: "currentColor" },
|
|
1716
1701
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1717
1702
|
n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1718
1703
|
], o = n ? `<title>${n}</title>` : "";
|
|
1719
|
-
return `<svg ${
|
|
1720
|
-
},
|
|
1704
|
+
return `<svg ${Xr(t)}>${o}${e}</svg>`;
|
|
1705
|
+
}, Yr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Nt = ({
|
|
1721
1706
|
["data-testid"]: e,
|
|
1722
1707
|
svg: n,
|
|
1723
1708
|
allyTitle: t,
|
|
1724
1709
|
className: o,
|
|
1725
|
-
size: a =
|
|
1710
|
+
size: a = Kr,
|
|
1726
1711
|
...r
|
|
1727
1712
|
}) => {
|
|
1728
|
-
const i =
|
|
1729
|
-
content:
|
|
1713
|
+
const i = Gr({
|
|
1714
|
+
content: Yr(n.svg),
|
|
1730
1715
|
title: t
|
|
1731
|
-
}), c =
|
|
1716
|
+
}), c = Vr(o, Je, `${Je}--${a}`);
|
|
1732
1717
|
return /* @__PURE__ */ b(
|
|
1733
1718
|
"span",
|
|
1734
1719
|
{
|
|
@@ -1740,11 +1725,11 @@ const Gr = Hr.bind(Kr), et = "purpur-icon", Xr = "md", Yr = (e) => e.filter((n)
|
|
|
1740
1725
|
}
|
|
1741
1726
|
);
|
|
1742
1727
|
};
|
|
1743
|
-
|
|
1744
|
-
function
|
|
1728
|
+
Nt.displayName = "Icon";
|
|
1729
|
+
function Zr(e) {
|
|
1745
1730
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1746
1731
|
}
|
|
1747
|
-
var
|
|
1732
|
+
var Pt = { exports: {} };
|
|
1748
1733
|
/*!
|
|
1749
1734
|
Copyright (c) 2018 Jed Watson.
|
|
1750
1735
|
Licensed under the MIT License (MIT), see
|
|
@@ -1779,9 +1764,9 @@ var At = { exports: {} };
|
|
|
1779
1764
|
}
|
|
1780
1765
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1781
1766
|
})();
|
|
1782
|
-
})(
|
|
1783
|
-
var
|
|
1784
|
-
const
|
|
1767
|
+
})(Pt);
|
|
1768
|
+
var Qr = Pt.exports;
|
|
1769
|
+
const Jr = /* @__PURE__ */ Zr(Qr), ne = {
|
|
1785
1770
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
1786
1771
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
1787
1772
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -1796,74 +1781,83 @@ const to = /* @__PURE__ */ Jr(eo), re = {
|
|
|
1796
1781
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
1797
1782
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
1798
1783
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
1799
|
-
},
|
|
1800
|
-
PARAGRAPH100: "paragraph-100"
|
|
1801
|
-
|
|
1784
|
+
}, eo = {
|
|
1785
|
+
PARAGRAPH100: "paragraph-100",
|
|
1786
|
+
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
1787
|
+
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
1788
|
+
PARAGRAPH200: "paragraph-200",
|
|
1789
|
+
PREAMBLE100: "preamble-100",
|
|
1790
|
+
PREAMBLE200: "preamble-200",
|
|
1791
|
+
ADDITIONAL100: "additional-100",
|
|
1792
|
+
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
1793
|
+
OVERLINE100: "overline-100",
|
|
1794
|
+
OVERLINE200: "overline-200"
|
|
1795
|
+
}, re = "purpur-paragraph", At = ({
|
|
1802
1796
|
["data-testid"]: e,
|
|
1803
1797
|
children: n,
|
|
1804
1798
|
className: t,
|
|
1805
1799
|
disabled: o,
|
|
1806
1800
|
enableHyphenation: a = !1,
|
|
1807
1801
|
negative: r = !1,
|
|
1808
|
-
variant: i =
|
|
1802
|
+
variant: i = eo.PARAGRAPH100,
|
|
1809
1803
|
...c
|
|
1810
1804
|
}) => {
|
|
1811
|
-
const
|
|
1805
|
+
const s = Jr([
|
|
1812
1806
|
t,
|
|
1813
|
-
re
|
|
1814
|
-
|
|
1807
|
+
ne[re],
|
|
1808
|
+
ne[`${re}--${i}`],
|
|
1815
1809
|
{
|
|
1816
|
-
[
|
|
1817
|
-
[
|
|
1818
|
-
[
|
|
1810
|
+
[ne[`${re}--hyphens`]]: a,
|
|
1811
|
+
[ne[`${re}--disabled`]]: o,
|
|
1812
|
+
[ne[`${re}--negative`]]: r
|
|
1819
1813
|
}
|
|
1820
1814
|
]);
|
|
1821
|
-
return /* @__PURE__ */ b("p", { ...c, className:
|
|
1815
|
+
return /* @__PURE__ */ b("p", { ...c, className: s, "data-testid": e, children: n });
|
|
1822
1816
|
};
|
|
1823
|
-
|
|
1824
|
-
function
|
|
1825
|
-
return
|
|
1817
|
+
At.displayName = "Paragraph";
|
|
1818
|
+
function Z() {
|
|
1819
|
+
return Z = Object.assign ? Object.assign.bind() : function(e) {
|
|
1826
1820
|
for (var n = 1; n < arguments.length; n++) {
|
|
1827
1821
|
var t = arguments[n];
|
|
1828
1822
|
for (var o in t) ({}).hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
1829
1823
|
}
|
|
1830
1824
|
return e;
|
|
1831
|
-
},
|
|
1825
|
+
}, Z.apply(null, arguments);
|
|
1832
1826
|
}
|
|
1833
|
-
function
|
|
1827
|
+
function to(e, n) {
|
|
1834
1828
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
1835
1829
|
}
|
|
1836
|
-
function
|
|
1830
|
+
function no(...e) {
|
|
1837
1831
|
return (n) => e.forEach(
|
|
1838
|
-
(t) =>
|
|
1832
|
+
(t) => to(t, n)
|
|
1839
1833
|
);
|
|
1840
1834
|
}
|
|
1841
|
-
const
|
|
1842
|
-
const { children: t, ...o } = e, a = L.toArray(t), r = a.find(
|
|
1835
|
+
const Tt = /* @__PURE__ */ S((e, n) => {
|
|
1836
|
+
const { children: t, ...o } = e, a = L.toArray(t), r = a.find(oo);
|
|
1843
1837
|
if (r) {
|
|
1844
|
-
const i = r.props.children, c = a.map((
|
|
1845
|
-
return /* @__PURE__ */
|
|
1838
|
+
const i = r.props.children, c = a.map((s) => s === r ? L.count(i) > 1 ? L.only(null) : /* @__PURE__ */ U(i) ? i.props.children : null : s);
|
|
1839
|
+
return /* @__PURE__ */ _(Ie, Z({}, o, {
|
|
1846
1840
|
ref: n
|
|
1847
|
-
}), /* @__PURE__ */
|
|
1841
|
+
}), /* @__PURE__ */ U(i) ? /* @__PURE__ */ ae(i, void 0, c) : null);
|
|
1848
1842
|
}
|
|
1849
|
-
return /* @__PURE__ */
|
|
1843
|
+
return /* @__PURE__ */ _(Ie, Z({}, o, {
|
|
1850
1844
|
ref: n
|
|
1851
1845
|
}), t);
|
|
1852
1846
|
});
|
|
1853
|
-
|
|
1847
|
+
Tt.displayName = "Slot";
|
|
1854
1848
|
const Ie = /* @__PURE__ */ S((e, n) => {
|
|
1855
1849
|
const { children: t, ...o } = e;
|
|
1856
|
-
return /* @__PURE__ */
|
|
1857
|
-
...
|
|
1858
|
-
ref: n ?
|
|
1850
|
+
return /* @__PURE__ */ U(t) ? /* @__PURE__ */ ae(t, {
|
|
1851
|
+
...ao(o, t.props),
|
|
1852
|
+
ref: n ? no(n, t.ref) : t.ref
|
|
1859
1853
|
}) : L.count(t) > 1 ? L.only(null) : null;
|
|
1860
1854
|
});
|
|
1861
1855
|
Ie.displayName = "SlotClone";
|
|
1862
|
-
const
|
|
1863
|
-
function
|
|
1864
|
-
return /* @__PURE__ */
|
|
1856
|
+
const ro = ({ children: e }) => /* @__PURE__ */ _(Le, null, e);
|
|
1857
|
+
function oo(e) {
|
|
1858
|
+
return /* @__PURE__ */ U(e) && e.type === ro;
|
|
1865
1859
|
}
|
|
1866
|
-
function
|
|
1860
|
+
function ao(e, n) {
|
|
1867
1861
|
const t = {
|
|
1868
1862
|
...n
|
|
1869
1863
|
};
|
|
@@ -1884,7 +1878,7 @@ function co(e, n) {
|
|
|
1884
1878
|
...t
|
|
1885
1879
|
};
|
|
1886
1880
|
}
|
|
1887
|
-
const
|
|
1881
|
+
const io = [
|
|
1888
1882
|
"a",
|
|
1889
1883
|
"button",
|
|
1890
1884
|
"div",
|
|
@@ -1901,12 +1895,12 @@ const uo = [
|
|
|
1901
1895
|
"span",
|
|
1902
1896
|
"svg",
|
|
1903
1897
|
"ul"
|
|
1904
|
-
],
|
|
1898
|
+
], co = io.reduce((e, n) => {
|
|
1905
1899
|
const t = /* @__PURE__ */ S((o, a) => {
|
|
1906
|
-
const { asChild: r, ...i } = o, c = r ?
|
|
1900
|
+
const { asChild: r, ...i } = o, c = r ? Tt : n;
|
|
1907
1901
|
return A(() => {
|
|
1908
1902
|
window[Symbol.for("radix-ui")] = !0;
|
|
1909
|
-
}, []), /* @__PURE__ */
|
|
1903
|
+
}, []), /* @__PURE__ */ _(c, Z({}, i, {
|
|
1910
1904
|
ref: a
|
|
1911
1905
|
}));
|
|
1912
1906
|
});
|
|
@@ -1914,7 +1908,7 @@ const uo = [
|
|
|
1914
1908
|
...e,
|
|
1915
1909
|
[n]: t
|
|
1916
1910
|
};
|
|
1917
|
-
}, {}),
|
|
1911
|
+
}, {}), uo = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ _(co.span, Z({}, e, {
|
|
1918
1912
|
ref: n,
|
|
1919
1913
|
style: {
|
|
1920
1914
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -1930,16 +1924,16 @@ const uo = [
|
|
|
1930
1924
|
wordWrap: "normal",
|
|
1931
1925
|
...e.style
|
|
1932
1926
|
}
|
|
1933
|
-
}))),
|
|
1927
|
+
}))), so = uo, lo = ({
|
|
1934
1928
|
asChild: e,
|
|
1935
1929
|
children: n,
|
|
1936
1930
|
className: t = "",
|
|
1937
1931
|
["data-testid"]: o
|
|
1938
|
-
}) => /* @__PURE__ */ b(
|
|
1939
|
-
function
|
|
1932
|
+
}) => /* @__PURE__ */ b(so, { asChild: e, "data-testid": o, className: t, children: n });
|
|
1933
|
+
function po(e) {
|
|
1940
1934
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1941
1935
|
}
|
|
1942
|
-
var
|
|
1936
|
+
var Dt = { exports: {} };
|
|
1943
1937
|
/*!
|
|
1944
1938
|
Copyright (c) 2018 Jed Watson.
|
|
1945
1939
|
Licensed under the MIT License (MIT), see
|
|
@@ -1974,11 +1968,11 @@ var It = { exports: {} };
|
|
|
1974
1968
|
}
|
|
1975
1969
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1976
1970
|
})();
|
|
1977
|
-
})(
|
|
1978
|
-
var
|
|
1979
|
-
const
|
|
1971
|
+
})(Dt);
|
|
1972
|
+
var fo = Dt.exports;
|
|
1973
|
+
const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1ifm3_1", mo = {
|
|
1980
1974
|
"purpur-modal-content": "_purpur-modal-content_1ifm3_1",
|
|
1981
|
-
fadeIn:
|
|
1975
|
+
fadeIn: ho,
|
|
1982
1976
|
"purpur-modal-content__overlay": "_purpur-modal-content__overlay_1ifm3_30",
|
|
1983
1977
|
"purpur-modal-content__close-button": "_purpur-modal-content__close-button_1ifm3_37",
|
|
1984
1978
|
"purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_1ifm3_48",
|
|
@@ -1997,7 +1991,7 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
1997
1991
|
"purpur-modal-content__actions": "_purpur-modal-content__actions_1ifm3_124",
|
|
1998
1992
|
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_1ifm3_181",
|
|
1999
1993
|
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_1ifm3_191"
|
|
2000
|
-
},
|
|
1994
|
+
}, et = (e) => e.showCloseButton === !0, T = vo.bind(mo), O = "purpur-modal-content", go = S(
|
|
2001
1995
|
({
|
|
2002
1996
|
["data-testid"]: e,
|
|
2003
1997
|
actions: n,
|
|
@@ -2007,73 +2001,73 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2007
2001
|
disableCloseOnClickOutside: r,
|
|
2008
2002
|
hideDescription: i,
|
|
2009
2003
|
image: c,
|
|
2010
|
-
primaryActionVariant:
|
|
2004
|
+
primaryActionVariant: s = "primary",
|
|
2011
2005
|
stickyButtons: d = !0,
|
|
2012
2006
|
title: p,
|
|
2013
2007
|
notification: l = void 0,
|
|
2014
2008
|
zIndex: f,
|
|
2015
2009
|
...v
|
|
2016
2010
|
}, E) => {
|
|
2017
|
-
const { closeButtonAllyLabel:
|
|
2011
|
+
const { closeButtonAllyLabel: u, showCloseButton: h, ...g } = v, [C, y] = H(!1), $ = N(null), x = N(null), z = T([
|
|
2018
2012
|
O,
|
|
2019
2013
|
{ [`${O}--with-image`]: !!c },
|
|
2020
2014
|
{ [`${O}--overflow`]: C },
|
|
2021
2015
|
{ [`${O}--sticky-footer`]: d },
|
|
2022
2016
|
o
|
|
2023
|
-
]), D = (
|
|
2024
|
-
r &&
|
|
2025
|
-
}, I =
|
|
2017
|
+
]), D = (R) => e ? `${e} ${R}` : void 0, w = (R) => {
|
|
2018
|
+
r && R.preventDefault();
|
|
2019
|
+
}, I = Q(() => {
|
|
2026
2020
|
if (!$.current || !x.current)
|
|
2027
2021
|
return;
|
|
2028
|
-
const
|
|
2029
|
-
y(
|
|
2030
|
-
}, []),
|
|
2031
|
-
r && !h &&
|
|
2022
|
+
const R = window.getComputedStyle($.current, null), It = parseFloat(R.getPropertyValue("height")), Lt = x.current.offsetHeight;
|
|
2023
|
+
y(It < Lt);
|
|
2024
|
+
}, []), ie = (R) => {
|
|
2025
|
+
r && !h && R.preventDefault();
|
|
2032
2026
|
};
|
|
2033
2027
|
return A(() => (window.addEventListener("resize", I), () => {
|
|
2034
2028
|
window.removeEventListener("resize", I);
|
|
2035
2029
|
}), [I]), A(() => {
|
|
2036
2030
|
I();
|
|
2037
|
-
}, [l, t, I]), /* @__PURE__ */ F(
|
|
2038
|
-
/* @__PURE__ */ b(
|
|
2031
|
+
}, [l, t, I]), /* @__PURE__ */ F(br, { children: [
|
|
2032
|
+
/* @__PURE__ */ b($r, { className: T(`${O}__overlay`), style: { zIndex: f } }),
|
|
2039
2033
|
/* @__PURE__ */ F(
|
|
2040
|
-
|
|
2034
|
+
yr,
|
|
2041
2035
|
{
|
|
2042
|
-
...
|
|
2036
|
+
...g,
|
|
2043
2037
|
className: z,
|
|
2044
2038
|
"data-testid": e,
|
|
2045
2039
|
ref: E,
|
|
2046
2040
|
...!a && { "aria-describedby": void 0 },
|
|
2047
2041
|
onPointerDownOutside: w,
|
|
2048
2042
|
onOpenAutoFocus: I,
|
|
2049
|
-
onEscapeKeyDown:
|
|
2043
|
+
onEscapeKeyDown: ie,
|
|
2050
2044
|
style: { zIndex: `calc(${f} + 1)` },
|
|
2051
2045
|
children: [
|
|
2052
2046
|
/* @__PURE__ */ F("div", { ref: $, className: T(`${O}__wrapper`), children: [
|
|
2053
|
-
|
|
2054
|
-
|
|
2047
|
+
et(v) && u && c && /* @__PURE__ */ b(
|
|
2048
|
+
tt,
|
|
2055
2049
|
{
|
|
2056
|
-
allyLabel:
|
|
2050
|
+
allyLabel: u,
|
|
2057
2051
|
hasImage: !0,
|
|
2058
2052
|
"data-testid": D("close-button")
|
|
2059
2053
|
}
|
|
2060
2054
|
),
|
|
2061
2055
|
/* @__PURE__ */ F("div", { ref: x, className: T(`${O}__wrapper-inner`), children: [
|
|
2062
2056
|
/* @__PURE__ */ F("div", { className: T(`${O}__header`), children: [
|
|
2063
|
-
|
|
2064
|
-
|
|
2057
|
+
et(v) && u && !c && /* @__PURE__ */ b(
|
|
2058
|
+
tt,
|
|
2065
2059
|
{
|
|
2066
|
-
allyLabel:
|
|
2060
|
+
allyLabel: u,
|
|
2067
2061
|
"data-testid": D("close-button")
|
|
2068
2062
|
}
|
|
2069
2063
|
),
|
|
2070
2064
|
/* @__PURE__ */ b(
|
|
2071
|
-
|
|
2065
|
+
Er,
|
|
2072
2066
|
{
|
|
2073
2067
|
asChild: !0,
|
|
2074
2068
|
className: T(`${O}__title`),
|
|
2075
2069
|
"data-testid": D("title"),
|
|
2076
|
-
children: /* @__PURE__ */ b(
|
|
2070
|
+
children: /* @__PURE__ */ b(St, { tag: "h2", variant: "title-200", children: p })
|
|
2077
2071
|
}
|
|
2078
2072
|
)
|
|
2079
2073
|
] }),
|
|
@@ -2086,22 +2080,22 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2086
2080
|
}
|
|
2087
2081
|
),
|
|
2088
2082
|
/* @__PURE__ */ b("div", { className: T(`${O}__body`), children: /* @__PURE__ */ F("div", { className: T(`${O}__body-inner`), children: [
|
|
2089
|
-
a && i && /* @__PURE__ */ b(
|
|
2083
|
+
a && i && /* @__PURE__ */ b(lo, { asChild: !0, children: /* @__PURE__ */ b(Ze, { "data-testid": D("description"), children: a }) }),
|
|
2090
2084
|
a && !i && /* @__PURE__ */ b(
|
|
2091
|
-
|
|
2085
|
+
Ze,
|
|
2092
2086
|
{
|
|
2093
2087
|
asChild: !0,
|
|
2094
2088
|
className: T(`${O}__description`),
|
|
2095
2089
|
"data-testid": D("description"),
|
|
2096
|
-
children: /* @__PURE__ */ b(
|
|
2090
|
+
children: /* @__PURE__ */ b(At, { variant: "paragraph-100", children: a })
|
|
2097
2091
|
}
|
|
2098
2092
|
),
|
|
2099
2093
|
/* @__PURE__ */ b("div", { children: t }),
|
|
2100
2094
|
!d && /* @__PURE__ */ b(
|
|
2101
|
-
|
|
2095
|
+
nt,
|
|
2102
2096
|
{
|
|
2103
2097
|
actions: n,
|
|
2104
|
-
primaryActionVariant:
|
|
2098
|
+
primaryActionVariant: s,
|
|
2105
2099
|
notification: l
|
|
2106
2100
|
}
|
|
2107
2101
|
)
|
|
@@ -2109,10 +2103,10 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2109
2103
|
] })
|
|
2110
2104
|
] }),
|
|
2111
2105
|
d && /* @__PURE__ */ b(
|
|
2112
|
-
|
|
2106
|
+
nt,
|
|
2113
2107
|
{
|
|
2114
2108
|
actions: n,
|
|
2115
|
-
primaryActionVariant:
|
|
2109
|
+
primaryActionVariant: s,
|
|
2116
2110
|
notification: l
|
|
2117
2111
|
}
|
|
2118
2112
|
)
|
|
@@ -2121,12 +2115,12 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2121
2115
|
)
|
|
2122
2116
|
] });
|
|
2123
2117
|
}
|
|
2124
|
-
),
|
|
2118
|
+
), tt = ({
|
|
2125
2119
|
allyLabel: e,
|
|
2126
2120
|
hasImage: n,
|
|
2127
2121
|
["data-testid"]: t
|
|
2128
|
-
}) => /* @__PURE__ */ b(
|
|
2129
|
-
|
|
2122
|
+
}) => /* @__PURE__ */ b(wr, { asChild: !0, children: /* @__PURE__ */ b(
|
|
2123
|
+
ke,
|
|
2130
2124
|
{
|
|
2131
2125
|
variant: n ? "primary" : "tertiary-purple",
|
|
2132
2126
|
negative: n,
|
|
@@ -2135,9 +2129,9 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2135
2129
|
"aria-label": e,
|
|
2136
2130
|
className: T(`${O}__close-button`),
|
|
2137
2131
|
"data-testid": t,
|
|
2138
|
-
children: /* @__PURE__ */ b(
|
|
2132
|
+
children: /* @__PURE__ */ b(Ot, {})
|
|
2139
2133
|
}
|
|
2140
|
-
) }),
|
|
2134
|
+
) }), _o = 3, nt = ({
|
|
2141
2135
|
actions: e,
|
|
2142
2136
|
primaryActionVariant: n,
|
|
2143
2137
|
notification: t
|
|
@@ -2147,15 +2141,15 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2147
2141
|
var r, i;
|
|
2148
2142
|
t && ((i = (r = o == null ? void 0 : o.current) == null ? void 0 : r.scrollIntoView) == null || i.call(r, !1));
|
|
2149
2143
|
}, [t]), e && e.length > 0 ? /* @__PURE__ */ F("div", { className: T(`${O}__actions`), children: [
|
|
2150
|
-
/* @__PURE__ */ b("div", { className: T(`${O}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0,
|
|
2151
|
-
({ label: r, onClick: i, disabled: c, loading:
|
|
2152
|
-
|
|
2144
|
+
/* @__PURE__ */ b("div", { className: T(`${O}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, _o).map(
|
|
2145
|
+
({ label: r, onClick: i, disabled: c, loading: s, iconPosition: d = "right", icon: p, ...l }, f) => /* @__PURE__ */ F(
|
|
2146
|
+
ke,
|
|
2153
2147
|
{
|
|
2154
2148
|
"data-testid": "modal actions button",
|
|
2155
2149
|
variant: a[f] || "",
|
|
2156
2150
|
onClick: i,
|
|
2157
2151
|
disabled: c,
|
|
2158
|
-
loading:
|
|
2152
|
+
loading: s,
|
|
2159
2153
|
className: T(`${O}__actions-button`),
|
|
2160
2154
|
...l,
|
|
2161
2155
|
children: [
|
|
@@ -2170,9 +2164,9 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2170
2164
|
t && /* @__PURE__ */ b("div", { className: T(`${O}__notification`), ref: o, children: t }),
|
|
2171
2165
|
/* @__PURE__ */ b("span", { className: T(`${O}__actions-separator`) })
|
|
2172
2166
|
] }) : null;
|
|
2173
|
-
},
|
|
2167
|
+
}, bo = S(
|
|
2174
2168
|
({ ["data-testid"]: e, children: n, className: t, ...o }, a) => /* @__PURE__ */ b(
|
|
2175
|
-
|
|
2169
|
+
_r,
|
|
2176
2170
|
{
|
|
2177
2171
|
asChild: !0,
|
|
2178
2172
|
ref: a,
|
|
@@ -2182,16 +2176,16 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
|
|
|
2182
2176
|
children: n
|
|
2183
2177
|
}
|
|
2184
2178
|
)
|
|
2185
|
-
),
|
|
2179
|
+
), Fe = ({
|
|
2186
2180
|
["data-testid"]: e,
|
|
2187
2181
|
children: n,
|
|
2188
2182
|
open: t,
|
|
2189
2183
|
onOpenChange: o
|
|
2190
|
-
}) => /* @__PURE__ */ b(
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2184
|
+
}) => /* @__PURE__ */ b(gr, { open: t, onOpenChange: o, "data-testid": e, children: n });
|
|
2185
|
+
Fe.Trigger = bo;
|
|
2186
|
+
Fe.Content = go;
|
|
2187
|
+
Fe.displayName = "Modal";
|
|
2194
2188
|
export {
|
|
2195
|
-
|
|
2189
|
+
Fe as Modal
|
|
2196
2190
|
};
|
|
2197
2191
|
//# sourceMappingURL=modal.es.js.map
|