@purpurds/modal 5.11.2 → 5.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +5 -12
- package/dist/modal-content.d.ts +3 -1
- package/dist/modal-content.d.ts.map +1 -1
- package/dist/modal.cjs.js +21 -21
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.es.js +551 -553
- package/dist/modal.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -9
- package/src/modal-content.module.scss +3 -13
- package/src/modal-content.tsx +22 -33
- package/src/modal.stories.tsx +53 -10
package/dist/modal.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as j, jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import
|
|
3
|
+
import { useCallback as Z, createContext as Se, useMemo as he, createElement as g, useContext as Je, useLayoutEffect as At, useRef as P, useEffect as A, useState as H, forwardRef as S, Children as L, isValidElement as U, cloneElement as oe, Fragment as De, useReducer as Tt } from "react";
|
|
4
|
+
import Dt, { flushSync as et } from "react-dom";
|
|
5
5
|
function N() {
|
|
6
6
|
return N = Object.assign ? Object.assign.bind() : function(e) {
|
|
7
7
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -12,32 +12,32 @@ function N() {
|
|
|
12
12
|
return e;
|
|
13
13
|
}, N.apply(this, arguments);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function B(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
16
16
|
return function(a) {
|
|
17
17
|
if (e == null || e(a), t === !1 || !a.defaultPrevented) return n == null ? void 0 : n(a);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function It(e, n) {
|
|
21
21
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function tt(...e) {
|
|
24
24
|
return (n) => e.forEach(
|
|
25
|
-
(t) =>
|
|
25
|
+
(t) => It(t, n)
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function Q(...e) {
|
|
29
|
+
return Z(tt(...e), e);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Lt(e, n = []) {
|
|
32
32
|
let t = [];
|
|
33
33
|
function o(r, i) {
|
|
34
|
-
const c = /* @__PURE__ */
|
|
34
|
+
const c = /* @__PURE__ */ Se(i), s = t.length;
|
|
35
35
|
t = [
|
|
36
36
|
...t,
|
|
37
37
|
i
|
|
38
38
|
];
|
|
39
39
|
function d(l) {
|
|
40
|
-
const { scope: h, children: f, ...E } = l, u = (h == null ? void 0 : h[e][s]) || c, v =
|
|
40
|
+
const { scope: h, children: f, ...E } = l, u = (h == null ? void 0 : h[e][s]) || c, v = he(
|
|
41
41
|
() => E,
|
|
42
42
|
Object.values(E)
|
|
43
43
|
);
|
|
@@ -46,7 +46,7 @@ function kt(e, n = []) {
|
|
|
46
46
|
}, f);
|
|
47
47
|
}
|
|
48
48
|
function p(l, h) {
|
|
49
|
-
const f = (h == null ? void 0 : h[e][s]) || c, E =
|
|
49
|
+
const f = (h == null ? void 0 : h[e][s]) || c, E = Je(f);
|
|
50
50
|
if (E) return E;
|
|
51
51
|
if (i !== void 0) return i;
|
|
52
52
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
@@ -57,10 +57,10 @@ function kt(e, n = []) {
|
|
|
57
57
|
];
|
|
58
58
|
}
|
|
59
59
|
const a = () => {
|
|
60
|
-
const r = t.map((i) => /* @__PURE__ */
|
|
60
|
+
const r = t.map((i) => /* @__PURE__ */ Se(i));
|
|
61
61
|
return function(c) {
|
|
62
62
|
const s = (c == null ? void 0 : c[e]) || r;
|
|
63
|
-
return
|
|
63
|
+
return he(
|
|
64
64
|
() => ({
|
|
65
65
|
[`__scope${e}`]: {
|
|
66
66
|
...c,
|
|
@@ -76,10 +76,10 @@ function kt(e, n = []) {
|
|
|
76
76
|
};
|
|
77
77
|
return a.scopeName = e, [
|
|
78
78
|
o,
|
|
79
|
-
|
|
79
|
+
Rt(a, ...n)
|
|
80
80
|
];
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Rt(...e) {
|
|
83
83
|
const n = e[0];
|
|
84
84
|
if (e.length === 1) return n;
|
|
85
85
|
const t = () => {
|
|
@@ -97,7 +97,7 @@ function Ft(...e) {
|
|
|
97
97
|
...l
|
|
98
98
|
};
|
|
99
99
|
}, {});
|
|
100
|
-
return
|
|
100
|
+
return he(
|
|
101
101
|
() => ({
|
|
102
102
|
[`__scope${n.scopeName}`]: i
|
|
103
103
|
}),
|
|
@@ -109,25 +109,25 @@ function Ft(...e) {
|
|
|
109
109
|
};
|
|
110
110
|
return t.scopeName = n.scopeName, t;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
},
|
|
112
|
+
const Ce = globalThis != null && globalThis.document ? At : () => {
|
|
113
|
+
}, Mt = m.useId || (() => {
|
|
114
114
|
});
|
|
115
|
-
let
|
|
116
|
-
function
|
|
117
|
-
const [n, t] = m.useState(
|
|
118
|
-
return
|
|
115
|
+
let kt = 0;
|
|
116
|
+
function _e(e) {
|
|
117
|
+
const [n, t] = m.useState(Mt());
|
|
118
|
+
return Ce(() => {
|
|
119
119
|
e || t(
|
|
120
|
-
(o) => o ?? String(
|
|
120
|
+
(o) => o ?? String(kt++)
|
|
121
121
|
);
|
|
122
122
|
}, [
|
|
123
123
|
e
|
|
124
124
|
]), e || (n ? `radix-${n}` : "");
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
const n =
|
|
126
|
+
function K(e) {
|
|
127
|
+
const n = P(e);
|
|
128
128
|
return A(() => {
|
|
129
129
|
n.current = e;
|
|
130
|
-
}),
|
|
130
|
+
}), he(
|
|
131
131
|
() => (...t) => {
|
|
132
132
|
var o;
|
|
133
133
|
return (o = n.current) === null || o === void 0 ? void 0 : o.call(n, ...t);
|
|
@@ -135,12 +135,12 @@ function G(e) {
|
|
|
135
135
|
[]
|
|
136
136
|
);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ft({ prop: e, defaultProp: n, onChange: t = () => {
|
|
139
139
|
} }) {
|
|
140
|
-
const [o, a] =
|
|
140
|
+
const [o, a] = jt({
|
|
141
141
|
defaultProp: n,
|
|
142
142
|
onChange: t
|
|
143
|
-
}), r = e !== void 0, i = r ? e : o, c =
|
|
143
|
+
}), r = e !== void 0, i = r ? e : o, c = K(t), s = Z((d) => {
|
|
144
144
|
if (r) {
|
|
145
145
|
const l = typeof d == "function" ? d(e) : d;
|
|
146
146
|
l !== e && c(l);
|
|
@@ -156,8 +156,8 @@ function Ut({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
156
156
|
s
|
|
157
157
|
];
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
const t =
|
|
159
|
+
function jt({ defaultProp: e, onChange: n }) {
|
|
160
|
+
const t = H(e), [o] = t, a = P(o), r = K(n);
|
|
161
161
|
return A(() => {
|
|
162
162
|
a.current !== o && (r(o), a.current = o);
|
|
163
163
|
}, [
|
|
@@ -166,32 +166,32 @@ function Wt({ defaultProp: e, onChange: n }) {
|
|
|
166
166
|
r
|
|
167
167
|
]), t;
|
|
168
168
|
}
|
|
169
|
-
const
|
|
170
|
-
const { children: t, ...o } = e, a =
|
|
169
|
+
const Ie = /* @__PURE__ */ S((e, n) => {
|
|
170
|
+
const { children: t, ...o } = e, a = L.toArray(t), r = a.find(Ut);
|
|
171
171
|
if (r) {
|
|
172
|
-
const i = r.props.children, c = a.map((s) => s === r ?
|
|
173
|
-
return /* @__PURE__ */ g(
|
|
172
|
+
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);
|
|
173
|
+
return /* @__PURE__ */ g(Oe, N({}, o, {
|
|
174
174
|
ref: n
|
|
175
|
-
}), /* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ U(i) ? /* @__PURE__ */ oe(i, void 0, c) : null);
|
|
176
176
|
}
|
|
177
|
-
return /* @__PURE__ */ g(
|
|
177
|
+
return /* @__PURE__ */ g(Oe, N({}, o, {
|
|
178
178
|
ref: n
|
|
179
179
|
}), t);
|
|
180
180
|
});
|
|
181
|
-
|
|
182
|
-
const
|
|
181
|
+
Ie.displayName = "Slot";
|
|
182
|
+
const Oe = /* @__PURE__ */ S((e, n) => {
|
|
183
183
|
const { children: t, ...o } = e;
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
-
...
|
|
186
|
-
ref: n ?
|
|
187
|
-
}) :
|
|
184
|
+
return /* @__PURE__ */ U(t) ? /* @__PURE__ */ oe(t, {
|
|
185
|
+
...Wt(o, t.props),
|
|
186
|
+
ref: n ? tt(n, t.ref) : t.ref
|
|
187
|
+
}) : L.count(t) > 1 ? L.only(null) : null;
|
|
188
188
|
});
|
|
189
|
-
|
|
190
|
-
const
|
|
191
|
-
function
|
|
192
|
-
return /* @__PURE__ */
|
|
189
|
+
Oe.displayName = "SlotClone";
|
|
190
|
+
const Bt = ({ children: e }) => /* @__PURE__ */ g(De, null, e);
|
|
191
|
+
function Ut(e) {
|
|
192
|
+
return /* @__PURE__ */ U(e) && e.type === Bt;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Wt(e, n) {
|
|
195
195
|
const t = {
|
|
196
196
|
...n
|
|
197
197
|
};
|
|
@@ -212,7 +212,7 @@ function Ht(e, n) {
|
|
|
212
212
|
...t
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
const
|
|
215
|
+
const zt = [
|
|
216
216
|
"a",
|
|
217
217
|
"button",
|
|
218
218
|
"div",
|
|
@@ -229,9 +229,9 @@ const Kt = [
|
|
|
229
229
|
"span",
|
|
230
230
|
"svg",
|
|
231
231
|
"ul"
|
|
232
|
-
],
|
|
232
|
+
], W = zt.reduce((e, n) => {
|
|
233
233
|
const t = /* @__PURE__ */ S((o, a) => {
|
|
234
|
-
const { asChild: r, ...i } = o, c = r ?
|
|
234
|
+
const { asChild: r, ...i } = o, c = r ? Ie : n;
|
|
235
235
|
return A(() => {
|
|
236
236
|
window[Symbol.for("radix-ui")] = !0;
|
|
237
237
|
}, []), /* @__PURE__ */ g(c, N({}, i, {
|
|
@@ -243,13 +243,13 @@ const Kt = [
|
|
|
243
243
|
[n]: t
|
|
244
244
|
};
|
|
245
245
|
}, {});
|
|
246
|
-
function
|
|
247
|
-
e &&
|
|
246
|
+
function qt(e, n) {
|
|
247
|
+
e && et(
|
|
248
248
|
() => e.dispatchEvent(n)
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
const t =
|
|
251
|
+
function Ht(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
252
|
+
const t = K(e);
|
|
253
253
|
A(() => {
|
|
254
254
|
const o = (a) => {
|
|
255
255
|
a.key === "Escape" && t(a);
|
|
@@ -260,40 +260,40 @@ function Vt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
260
260
|
n
|
|
261
261
|
]);
|
|
262
262
|
}
|
|
263
|
-
const
|
|
264
|
-
let
|
|
265
|
-
const
|
|
263
|
+
const Pe = "dismissableLayer.update", Kt = "dismissableLayer.pointerDownOutside", Gt = "dismissableLayer.focusOutside";
|
|
264
|
+
let ke;
|
|
265
|
+
const Vt = /* @__PURE__ */ Se({
|
|
266
266
|
layers: /* @__PURE__ */ new Set(),
|
|
267
267
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
268
268
|
branches: /* @__PURE__ */ new Set()
|
|
269
|
-
}),
|
|
269
|
+
}), Xt = /* @__PURE__ */ S((e, n) => {
|
|
270
270
|
var t;
|
|
271
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...d } = e, p =
|
|
271
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...d } = e, p = Je(Vt), [l, h] = H(null), f = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = H({}), u = Q(
|
|
272
272
|
n,
|
|
273
273
|
(x) => h(x)
|
|
274
274
|
), v = Array.from(p.layers), [b] = [
|
|
275
275
|
...p.layersWithOutsidePointerEventsDisabled
|
|
276
|
-
].slice(-1),
|
|
277
|
-
const
|
|
276
|
+
].slice(-1), C = v.indexOf(b), y = l ? v.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, w = y >= C, z = Yt((x) => {
|
|
277
|
+
const I = x.target, ae = [
|
|
278
278
|
...p.branches
|
|
279
279
|
].some(
|
|
280
|
-
(
|
|
280
|
+
(R) => R.contains(I)
|
|
281
281
|
);
|
|
282
|
-
!w ||
|
|
283
|
-
}, f),
|
|
284
|
-
const
|
|
282
|
+
!w || ae || (r == null || r(x), c == null || c(x), x.defaultPrevented || s == null || s());
|
|
283
|
+
}, f), D = Zt((x) => {
|
|
284
|
+
const I = x.target;
|
|
285
285
|
[
|
|
286
286
|
...p.branches
|
|
287
287
|
].some(
|
|
288
|
-
(
|
|
288
|
+
(R) => R.contains(I)
|
|
289
289
|
) || (i == null || i(x), c == null || c(x), x.defaultPrevented || s == null || s());
|
|
290
290
|
}, f);
|
|
291
|
-
return
|
|
291
|
+
return Ht((x) => {
|
|
292
292
|
y === p.layers.size - 1 && (a == null || a(x), !x.defaultPrevented && s && (x.preventDefault(), s()));
|
|
293
293
|
}, f), A(() => {
|
|
294
294
|
if (l)
|
|
295
|
-
return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
296
|
-
o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents =
|
|
295
|
+
return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (ke = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(l)), p.layers.add(l), Fe(), () => {
|
|
296
|
+
o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = ke);
|
|
297
297
|
};
|
|
298
298
|
}, [
|
|
299
299
|
l,
|
|
@@ -301,32 +301,32 @@ const Zt = /* @__PURE__ */ Ce({
|
|
|
301
301
|
o,
|
|
302
302
|
p
|
|
303
303
|
]), A(() => () => {
|
|
304
|
-
l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l),
|
|
304
|
+
l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l), Fe());
|
|
305
305
|
}, [
|
|
306
306
|
l,
|
|
307
307
|
p
|
|
308
308
|
]), A(() => {
|
|
309
309
|
const x = () => E({});
|
|
310
|
-
return document.addEventListener(
|
|
311
|
-
}, []), /* @__PURE__ */ g(
|
|
310
|
+
return document.addEventListener(Pe, x), () => document.removeEventListener(Pe, x);
|
|
311
|
+
}, []), /* @__PURE__ */ g(W.div, N({}, d, {
|
|
312
312
|
ref: u,
|
|
313
313
|
style: {
|
|
314
314
|
pointerEvents: $ ? w ? "auto" : "none" : void 0,
|
|
315
315
|
...e.style
|
|
316
316
|
},
|
|
317
|
-
onFocusCapture:
|
|
318
|
-
onBlurCapture:
|
|
319
|
-
onPointerDownCapture:
|
|
317
|
+
onFocusCapture: B(e.onFocusCapture, D.onFocusCapture),
|
|
318
|
+
onBlurCapture: B(e.onBlurCapture, D.onBlurCapture),
|
|
319
|
+
onPointerDownCapture: B(e.onPointerDownCapture, z.onPointerDownCapture)
|
|
320
320
|
}));
|
|
321
321
|
});
|
|
322
|
-
function
|
|
323
|
-
const t =
|
|
322
|
+
function Yt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
323
|
+
const t = K(e), o = P(!1), a = P(() => {
|
|
324
324
|
});
|
|
325
325
|
return A(() => {
|
|
326
326
|
const r = (c) => {
|
|
327
327
|
if (c.target && !o.current) {
|
|
328
328
|
let d = function() {
|
|
329
|
-
|
|
329
|
+
nt(Kt, t, s, {
|
|
330
330
|
discrete: !0
|
|
331
331
|
});
|
|
332
332
|
};
|
|
@@ -353,11 +353,11 @@ function Jt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
353
353
|
onPointerDownCapture: () => o.current = !0
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
const t =
|
|
356
|
+
function Zt(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
357
|
+
const t = K(e), o = P(!1);
|
|
358
358
|
return A(() => {
|
|
359
359
|
const a = (r) => {
|
|
360
|
-
r.target && !o.current &&
|
|
360
|
+
r.target && !o.current && nt(Gt, t, {
|
|
361
361
|
originalEvent: r
|
|
362
362
|
}, {
|
|
363
363
|
discrete: !1
|
|
@@ -372,11 +372,11 @@ function en(e, n = globalThis == null ? void 0 : globalThis.document) {
|
|
|
372
372
|
onBlurCapture: () => o.current = !1
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
const e = new CustomEvent(
|
|
375
|
+
function Fe() {
|
|
376
|
+
const e = new CustomEvent(Pe);
|
|
377
377
|
document.dispatchEvent(e);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function nt(e, n, t, { discrete: o }) {
|
|
380
380
|
const a = t.originalEvent.target, r = new CustomEvent(e, {
|
|
381
381
|
bubbles: !1,
|
|
382
382
|
cancelable: !0,
|
|
@@ -384,16 +384,16 @@ function rt(e, n, t, { discrete: o }) {
|
|
|
384
384
|
});
|
|
385
385
|
n && a.addEventListener(e, n, {
|
|
386
386
|
once: !0
|
|
387
|
-
}), o ?
|
|
387
|
+
}), o ? qt(a, r) : a.dispatchEvent(r);
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const be = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount", je = {
|
|
390
390
|
bubbles: !1,
|
|
391
391
|
cancelable: !0
|
|
392
|
-
},
|
|
393
|
-
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c, s] =
|
|
392
|
+
}, Qt = /* @__PURE__ */ S((e, n) => {
|
|
393
|
+
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c, s] = H(null), d = K(a), p = K(r), l = P(null), h = Q(
|
|
394
394
|
n,
|
|
395
395
|
(u) => s(u)
|
|
396
|
-
), f =
|
|
396
|
+
), f = P({
|
|
397
397
|
paused: !1,
|
|
398
398
|
pause() {
|
|
399
399
|
this.paused = !0;
|
|
@@ -407,26 +407,26 @@ const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount",
|
|
|
407
407
|
let u = function(y) {
|
|
408
408
|
if (f.paused || !c) return;
|
|
409
409
|
const $ = y.target;
|
|
410
|
-
c.contains($) ? l.current = $ :
|
|
410
|
+
c.contains($) ? l.current = $ : F(l.current, {
|
|
411
411
|
select: !0
|
|
412
412
|
});
|
|
413
413
|
}, v = function(y) {
|
|
414
414
|
if (f.paused || !c) return;
|
|
415
415
|
const $ = y.relatedTarget;
|
|
416
|
-
$ !== null && (c.contains($) ||
|
|
416
|
+
$ !== null && (c.contains($) || F(l.current, {
|
|
417
417
|
select: !0
|
|
418
418
|
}));
|
|
419
419
|
}, b = function(y) {
|
|
420
420
|
if (document.activeElement === document.body)
|
|
421
|
-
for (const w of y) w.removedNodes.length > 0 &&
|
|
421
|
+
for (const w of y) w.removedNodes.length > 0 && F(c);
|
|
422
422
|
};
|
|
423
423
|
document.addEventListener("focusin", u), document.addEventListener("focusout", v);
|
|
424
|
-
const
|
|
425
|
-
return c &&
|
|
424
|
+
const C = new MutationObserver(b);
|
|
425
|
+
return c && C.observe(c, {
|
|
426
426
|
childList: !0,
|
|
427
427
|
subtree: !0
|
|
428
428
|
}), () => {
|
|
429
|
-
document.removeEventListener("focusin", u), document.removeEventListener("focusout", v),
|
|
429
|
+
document.removeEventListener("focusin", u), document.removeEventListener("focusout", v), C.disconnect();
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
}, [
|
|
@@ -435,20 +435,20 @@ const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount",
|
|
|
435
435
|
f.paused
|
|
436
436
|
]), A(() => {
|
|
437
437
|
if (c) {
|
|
438
|
-
|
|
438
|
+
Ue.add(f);
|
|
439
439
|
const u = document.activeElement;
|
|
440
440
|
if (!c.contains(u)) {
|
|
441
|
-
const b = new CustomEvent(
|
|
442
|
-
c.addEventListener(
|
|
441
|
+
const b = new CustomEvent(be, je);
|
|
442
|
+
c.addEventListener(be, d), c.dispatchEvent(b), b.defaultPrevented || (Jt(on(rt(c)), {
|
|
443
443
|
select: !0
|
|
444
|
-
}), document.activeElement === u &&
|
|
444
|
+
}), document.activeElement === u && F(c));
|
|
445
445
|
}
|
|
446
446
|
return () => {
|
|
447
|
-
c.removeEventListener(
|
|
448
|
-
const b = new CustomEvent(
|
|
449
|
-
c.addEventListener(
|
|
447
|
+
c.removeEventListener(be, d), setTimeout(() => {
|
|
448
|
+
const b = new CustomEvent($e, je);
|
|
449
|
+
c.addEventListener($e, p), c.dispatchEvent(b), b.defaultPrevented || F(u ?? document.body, {
|
|
450
450
|
select: !0
|
|
451
|
-
}), c.removeEventListener(
|
|
451
|
+
}), c.removeEventListener($e, p), Ue.remove(f);
|
|
452
452
|
}, 0);
|
|
453
453
|
};
|
|
454
454
|
}
|
|
@@ -458,44 +458,44 @@ const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount",
|
|
|
458
458
|
p,
|
|
459
459
|
f
|
|
460
460
|
]);
|
|
461
|
-
const E =
|
|
461
|
+
const E = Z((u) => {
|
|
462
462
|
if (!t && !o || f.paused) return;
|
|
463
463
|
const v = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, b = document.activeElement;
|
|
464
464
|
if (v && b) {
|
|
465
|
-
const
|
|
466
|
-
y && $ ? !u.shiftKey && b === $ ? (u.preventDefault(), t &&
|
|
465
|
+
const C = u.currentTarget, [y, $] = en(C);
|
|
466
|
+
y && $ ? !u.shiftKey && b === $ ? (u.preventDefault(), t && F(y, {
|
|
467
467
|
select: !0
|
|
468
|
-
})) : u.shiftKey && b === y && (u.preventDefault(), t &&
|
|
468
|
+
})) : u.shiftKey && b === y && (u.preventDefault(), t && F($, {
|
|
469
469
|
select: !0
|
|
470
|
-
})) : b ===
|
|
470
|
+
})) : b === C && u.preventDefault();
|
|
471
471
|
}
|
|
472
472
|
}, [
|
|
473
473
|
t,
|
|
474
474
|
o,
|
|
475
475
|
f.paused
|
|
476
476
|
]);
|
|
477
|
-
return /* @__PURE__ */ g(
|
|
477
|
+
return /* @__PURE__ */ g(W.div, N({
|
|
478
478
|
tabIndex: -1
|
|
479
479
|
}, i, {
|
|
480
480
|
ref: h,
|
|
481
481
|
onKeyDown: E
|
|
482
482
|
}));
|
|
483
483
|
});
|
|
484
|
-
function
|
|
484
|
+
function Jt(e, { select: n = !1 } = {}) {
|
|
485
485
|
const t = document.activeElement;
|
|
486
486
|
for (const o of e)
|
|
487
|
-
if (
|
|
487
|
+
if (F(o, {
|
|
488
488
|
select: n
|
|
489
489
|
}), document.activeElement !== t) return;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
const n =
|
|
491
|
+
function en(e) {
|
|
492
|
+
const n = rt(e), t = Be(n, e), o = Be(n.reverse(), e);
|
|
493
493
|
return [
|
|
494
494
|
t,
|
|
495
495
|
o
|
|
496
496
|
];
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function rt(e) {
|
|
499
499
|
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
500
500
|
acceptNode: (o) => {
|
|
501
501
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -505,13 +505,13 @@ function ot(e) {
|
|
|
505
505
|
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
506
506
|
return n;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Be(e, n) {
|
|
509
509
|
for (const t of e)
|
|
510
|
-
if (!
|
|
510
|
+
if (!tn(t, {
|
|
511
511
|
upTo: n
|
|
512
512
|
})) return t;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function tn(e, { upTo: n }) {
|
|
515
515
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
516
516
|
for (; e; ) {
|
|
517
517
|
if (n !== void 0 && e === n) return !1;
|
|
@@ -520,66 +520,66 @@ function on(e, { upTo: n }) {
|
|
|
520
520
|
}
|
|
521
521
|
return !1;
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function nn(e) {
|
|
524
524
|
return e instanceof HTMLInputElement && "select" in e;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function F(e, { select: n = !1 } = {}) {
|
|
527
527
|
if (e && e.focus) {
|
|
528
528
|
const t = document.activeElement;
|
|
529
529
|
e.focus({
|
|
530
530
|
preventScroll: !0
|
|
531
|
-
}), e !== t &&
|
|
531
|
+
}), e !== t && nn(e) && n && e.select();
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
const
|
|
535
|
-
function
|
|
534
|
+
const Ue = rn();
|
|
535
|
+
function rn() {
|
|
536
536
|
let e = [];
|
|
537
537
|
return {
|
|
538
538
|
add(n) {
|
|
539
539
|
const t = e[0];
|
|
540
|
-
n !== t && (t == null || t.pause()), e =
|
|
540
|
+
n !== t && (t == null || t.pause()), e = We(e, n), e.unshift(n);
|
|
541
541
|
},
|
|
542
542
|
remove(n) {
|
|
543
543
|
var t;
|
|
544
|
-
e =
|
|
544
|
+
e = We(e, n), (t = e[0]) === null || t === void 0 || t.resume();
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function We(e, n) {
|
|
549
549
|
const t = [
|
|
550
550
|
...e
|
|
551
551
|
], o = t.indexOf(n);
|
|
552
552
|
return o !== -1 && t.splice(o, 1), t;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function on(e) {
|
|
555
555
|
return e.filter(
|
|
556
556
|
(n) => n.tagName !== "A"
|
|
557
557
|
);
|
|
558
558
|
}
|
|
559
|
-
const
|
|
559
|
+
const an = /* @__PURE__ */ S((e, n) => {
|
|
560
560
|
var t;
|
|
561
561
|
const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
|
|
562
|
-
return o ? /* @__PURE__ */
|
|
562
|
+
return o ? /* @__PURE__ */ Dt.createPortal(/* @__PURE__ */ g(W.div, N({}, a, {
|
|
563
563
|
ref: n
|
|
564
564
|
})), o) : null;
|
|
565
565
|
});
|
|
566
|
-
function
|
|
567
|
-
return
|
|
566
|
+
function cn(e, n) {
|
|
567
|
+
return Tt((t, o) => {
|
|
568
568
|
const a = n[t][o];
|
|
569
569
|
return a ?? t;
|
|
570
570
|
}, e);
|
|
571
571
|
}
|
|
572
|
-
const
|
|
573
|
-
const { present: n, children: t } = e, o =
|
|
572
|
+
const me = (e) => {
|
|
573
|
+
const { present: n, children: t } = e, o = un(n), a = typeof t == "function" ? t({
|
|
574
574
|
present: o.isPresent
|
|
575
|
-
}) :
|
|
576
|
-
return typeof t == "function" || o.isPresent ? /* @__PURE__ */
|
|
575
|
+
}) : L.only(t), r = Q(o.ref, a.ref);
|
|
576
|
+
return typeof t == "function" || o.isPresent ? /* @__PURE__ */ oe(a, {
|
|
577
577
|
ref: r
|
|
578
578
|
}) : null;
|
|
579
579
|
};
|
|
580
|
-
|
|
581
|
-
function
|
|
582
|
-
const [n, t] =
|
|
580
|
+
me.displayName = "Presence";
|
|
581
|
+
function un(e) {
|
|
582
|
+
const [n, t] = H(), o = P({}), a = P(e), r = P("none"), i = e ? "mounted" : "unmounted", [c, s] = cn(i, {
|
|
583
583
|
mounted: {
|
|
584
584
|
UNMOUNT: "unmounted",
|
|
585
585
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -593,28 +593,28 @@ function dn(e) {
|
|
|
593
593
|
}
|
|
594
594
|
});
|
|
595
595
|
return A(() => {
|
|
596
|
-
const d =
|
|
596
|
+
const d = ie(o.current);
|
|
597
597
|
r.current = c === "mounted" ? d : "none";
|
|
598
598
|
}, [
|
|
599
599
|
c
|
|
600
|
-
]),
|
|
600
|
+
]), Ce(() => {
|
|
601
601
|
const d = o.current, p = a.current;
|
|
602
602
|
if (p !== e) {
|
|
603
|
-
const h = r.current, f =
|
|
603
|
+
const h = r.current, f = ie(d);
|
|
604
604
|
e ? s("MOUNT") : f === "none" || (d == null ? void 0 : d.display) === "none" ? s("UNMOUNT") : s(p && h !== f ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
605
605
|
}
|
|
606
606
|
}, [
|
|
607
607
|
e,
|
|
608
608
|
s
|
|
609
|
-
]),
|
|
609
|
+
]), Ce(() => {
|
|
610
610
|
if (n) {
|
|
611
611
|
const d = (l) => {
|
|
612
|
-
const f =
|
|
613
|
-
l.target === n && f &&
|
|
612
|
+
const f = ie(o.current).includes(l.animationName);
|
|
613
|
+
l.target === n && f && et(
|
|
614
614
|
() => s("ANIMATION_END")
|
|
615
615
|
);
|
|
616
616
|
}, p = (l) => {
|
|
617
|
-
l.target === n && (r.current =
|
|
617
|
+
l.target === n && (r.current = ie(o.current));
|
|
618
618
|
};
|
|
619
619
|
return n.addEventListener("animationstart", p), n.addEventListener("animationcancel", d), n.addEventListener("animationend", d), () => {
|
|
620
620
|
n.removeEventListener("animationstart", p), n.removeEventListener("animationcancel", d), n.removeEventListener("animationend", d);
|
|
@@ -629,27 +629,27 @@ function dn(e) {
|
|
|
629
629
|
"mounted",
|
|
630
630
|
"unmountSuspended"
|
|
631
631
|
].includes(c),
|
|
632
|
-
ref:
|
|
632
|
+
ref: Z((d) => {
|
|
633
633
|
d && (o.current = getComputedStyle(d)), t(d);
|
|
634
634
|
}, [])
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function ie(e) {
|
|
638
638
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
639
639
|
}
|
|
640
|
-
let
|
|
641
|
-
function
|
|
640
|
+
let ye = 0;
|
|
641
|
+
function sn() {
|
|
642
642
|
A(() => {
|
|
643
643
|
var e, n;
|
|
644
644
|
const t = document.querySelectorAll("[data-radix-focus-guard]");
|
|
645
|
-
return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e :
|
|
646
|
-
|
|
645
|
+
return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : ze()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : ze()), ye++, () => {
|
|
646
|
+
ye === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
|
|
647
647
|
(o) => o.remove()
|
|
648
|
-
),
|
|
648
|
+
), ye--;
|
|
649
649
|
};
|
|
650
650
|
}, []);
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function ze() {
|
|
653
653
|
const e = document.createElement("span");
|
|
654
654
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
655
655
|
}
|
|
@@ -662,7 +662,7 @@ var k = function() {
|
|
|
662
662
|
return n;
|
|
663
663
|
}, k.apply(this, arguments);
|
|
664
664
|
};
|
|
665
|
-
function
|
|
665
|
+
function ot(e, n) {
|
|
666
666
|
var t = {};
|
|
667
667
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
|
|
668
668
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -670,17 +670,17 @@ function at(e, n) {
|
|
|
670
670
|
n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
671
671
|
return t;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function ln(e, n, t) {
|
|
674
674
|
if (t || arguments.length === 2) for (var o = 0, a = n.length, r; o < a; o++)
|
|
675
675
|
(r || !(o in n)) && (r || (r = Array.prototype.slice.call(n, 0, o)), r[o] = n[o]);
|
|
676
676
|
return e.concat(r || Array.prototype.slice.call(n));
|
|
677
677
|
}
|
|
678
|
-
var
|
|
679
|
-
function
|
|
678
|
+
var fe = "right-scroll-bar-position", ve = "width-before-scroll-bar", dn = "with-scroll-bars-hidden", pn = "--removed-body-scroll-bar-size";
|
|
679
|
+
function fn(e, n) {
|
|
680
680
|
return typeof e == "function" ? e(n) : e && (e.current = n), e;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
var t =
|
|
682
|
+
function vn(e, n) {
|
|
683
|
+
var t = H(function() {
|
|
684
684
|
return {
|
|
685
685
|
// value
|
|
686
686
|
value: e,
|
|
@@ -700,18 +700,18 @@ function gn(e, n) {
|
|
|
700
700
|
})[0];
|
|
701
701
|
return t.callback = n, t.facade;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
return
|
|
703
|
+
function hn(e, n) {
|
|
704
|
+
return vn(null, function(t) {
|
|
705
705
|
return e.forEach(function(o) {
|
|
706
|
-
return
|
|
706
|
+
return fn(o, t);
|
|
707
707
|
});
|
|
708
708
|
});
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function mn(e) {
|
|
711
711
|
return e;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
n === void 0 && (n =
|
|
713
|
+
function gn(e, n) {
|
|
714
|
+
n === void 0 && (n = mn);
|
|
715
715
|
var t = [], o = !1, a = {
|
|
716
716
|
read: function() {
|
|
717
717
|
if (o)
|
|
@@ -765,13 +765,13 @@ function $n(e, n) {
|
|
|
765
765
|
};
|
|
766
766
|
return a;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function _n(e) {
|
|
769
769
|
e === void 0 && (e = {});
|
|
770
|
-
var n =
|
|
770
|
+
var n = gn(null);
|
|
771
771
|
return n.options = k({ async: !0, ssr: !1 }, e), n;
|
|
772
772
|
}
|
|
773
|
-
var
|
|
774
|
-
var n = e.sideCar, t =
|
|
773
|
+
var at = function(e) {
|
|
774
|
+
var n = e.sideCar, t = ot(e, ["sideCar"]);
|
|
775
775
|
if (!n)
|
|
776
776
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
777
777
|
var o = n.read();
|
|
@@ -779,64 +779,64 @@ var it = function(e) {
|
|
|
779
779
|
throw new Error("Sidecar medium not found");
|
|
780
780
|
return m.createElement(o, k({}, t));
|
|
781
781
|
};
|
|
782
|
-
|
|
783
|
-
function
|
|
784
|
-
return e.useMedium(n),
|
|
782
|
+
at.isSideCarExport = !0;
|
|
783
|
+
function bn(e, n) {
|
|
784
|
+
return e.useMedium(n), at;
|
|
785
785
|
}
|
|
786
|
-
var
|
|
787
|
-
},
|
|
786
|
+
var it = _n(), Ee = function() {
|
|
787
|
+
}, ge = m.forwardRef(function(e, n) {
|
|
788
788
|
var t = m.useRef(null), o = m.useState({
|
|
789
|
-
onScrollCapture:
|
|
790
|
-
onWheelCapture:
|
|
791
|
-
onTouchMoveCapture:
|
|
792
|
-
}), a = o[0], r = o[1], i = e.forwardProps, c = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, h = e.sideCar, f = e.noIsolation, E = e.inert, u = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v,
|
|
789
|
+
onScrollCapture: Ee,
|
|
790
|
+
onWheelCapture: Ee,
|
|
791
|
+
onTouchMoveCapture: Ee
|
|
792
|
+
}), a = o[0], r = o[1], i = e.forwardProps, c = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, h = e.sideCar, f = e.noIsolation, E = e.inert, u = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, C = ot(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = h, $ = hn([t, n]), w = k(k({}, C), a);
|
|
793
793
|
return m.createElement(
|
|
794
794
|
m.Fragment,
|
|
795
795
|
null,
|
|
796
|
-
p && m.createElement(y, { sideCar:
|
|
796
|
+
p && m.createElement(y, { sideCar: it, removeScrollBar: d, shards: l, noIsolation: f, inert: E, setCallbacks: r, allowPinchZoom: !!u, lockRef: t }),
|
|
797
797
|
i ? m.cloneElement(m.Children.only(c), k(k({}, w), { ref: $ })) : m.createElement(b, k({}, w, { className: s, ref: $ }), c)
|
|
798
798
|
);
|
|
799
799
|
});
|
|
800
|
-
|
|
800
|
+
ge.defaultProps = {
|
|
801
801
|
enabled: !0,
|
|
802
802
|
removeScrollBar: !0,
|
|
803
803
|
inert: !1
|
|
804
804
|
};
|
|
805
|
-
|
|
806
|
-
fullWidth:
|
|
807
|
-
zeroRight:
|
|
805
|
+
ge.classNames = {
|
|
806
|
+
fullWidth: ve,
|
|
807
|
+
zeroRight: fe
|
|
808
808
|
};
|
|
809
|
-
var
|
|
809
|
+
var $n = function() {
|
|
810
810
|
if (typeof __webpack_nonce__ < "u")
|
|
811
811
|
return __webpack_nonce__;
|
|
812
812
|
};
|
|
813
|
-
function
|
|
813
|
+
function yn() {
|
|
814
814
|
if (!document)
|
|
815
815
|
return null;
|
|
816
816
|
var e = document.createElement("style");
|
|
817
817
|
e.type = "text/css";
|
|
818
|
-
var n =
|
|
818
|
+
var n = $n();
|
|
819
819
|
return n && e.setAttribute("nonce", n), e;
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function En(e, n) {
|
|
822
822
|
e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function xn(e) {
|
|
825
825
|
var n = document.head || document.getElementsByTagName("head")[0];
|
|
826
826
|
n.appendChild(e);
|
|
827
827
|
}
|
|
828
|
-
var
|
|
828
|
+
var wn = function() {
|
|
829
829
|
var e = 0, n = null;
|
|
830
830
|
return {
|
|
831
831
|
add: function(t) {
|
|
832
|
-
e == 0 && (n =
|
|
832
|
+
e == 0 && (n = yn()) && (En(n, t), xn(n)), e++;
|
|
833
833
|
},
|
|
834
834
|
remove: function() {
|
|
835
835
|
e--, !e && n && (n.parentNode && n.parentNode.removeChild(n), n = null);
|
|
836
836
|
}
|
|
837
837
|
};
|
|
838
|
-
},
|
|
839
|
-
var e =
|
|
838
|
+
}, Sn = function() {
|
|
839
|
+
var e = wn();
|
|
840
840
|
return function(n, t) {
|
|
841
841
|
m.useEffect(function() {
|
|
842
842
|
return e.add(n), function() {
|
|
@@ -844,36 +844,36 @@ var On = function() {
|
|
|
844
844
|
};
|
|
845
845
|
}, [n && t]);
|
|
846
846
|
};
|
|
847
|
-
},
|
|
848
|
-
var e =
|
|
847
|
+
}, ct = function() {
|
|
848
|
+
var e = Sn(), n = function(t) {
|
|
849
849
|
var o = t.styles, a = t.dynamic;
|
|
850
850
|
return e(o, a), null;
|
|
851
851
|
};
|
|
852
852
|
return n;
|
|
853
|
-
},
|
|
853
|
+
}, Cn = {
|
|
854
854
|
left: 0,
|
|
855
855
|
top: 0,
|
|
856
856
|
right: 0,
|
|
857
857
|
gap: 0
|
|
858
|
-
},
|
|
858
|
+
}, xe = function(e) {
|
|
859
859
|
return parseInt(e || "", 10) || 0;
|
|
860
|
-
},
|
|
860
|
+
}, On = function(e) {
|
|
861
861
|
var n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], a = n[e === "padding" ? "paddingRight" : "marginRight"];
|
|
862
|
-
return [
|
|
863
|
-
},
|
|
862
|
+
return [xe(t), xe(o), xe(a)];
|
|
863
|
+
}, Pn = function(e) {
|
|
864
864
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
865
|
-
return
|
|
866
|
-
var n =
|
|
865
|
+
return Cn;
|
|
866
|
+
var n = On(e), t = document.documentElement.clientWidth, o = window.innerWidth;
|
|
867
867
|
return {
|
|
868
868
|
left: n[0],
|
|
869
869
|
top: n[1],
|
|
870
870
|
right: n[2],
|
|
871
871
|
gap: Math.max(0, o - t + n[2] - n[0])
|
|
872
872
|
};
|
|
873
|
-
},
|
|
873
|
+
}, Nn = ct(), An = function(e, n, t, o) {
|
|
874
874
|
var a = e.left, r = e.top, i = e.right, c = e.gap;
|
|
875
875
|
return t === void 0 && (t = "margin"), `
|
|
876
|
-
.`.concat(
|
|
876
|
+
.`.concat(dn, ` {
|
|
877
877
|
overflow: hidden `).concat(o, `;
|
|
878
878
|
padding-right: `).concat(c, "px ").concat(o, `;
|
|
879
879
|
}
|
|
@@ -894,124 +894,124 @@ var On = function() {
|
|
|
894
894
|
].filter(Boolean).join(""), `
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
-
.`).concat(
|
|
897
|
+
.`).concat(fe, ` {
|
|
898
898
|
right: `).concat(c, "px ").concat(o, `;
|
|
899
899
|
}
|
|
900
900
|
|
|
901
|
-
.`).concat(
|
|
901
|
+
.`).concat(ve, ` {
|
|
902
902
|
margin-right: `).concat(c, "px ").concat(o, `;
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
-
.`).concat(
|
|
905
|
+
.`).concat(fe, " .").concat(fe, ` {
|
|
906
906
|
right: 0 `).concat(o, `;
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
.`).concat(
|
|
909
|
+
.`).concat(ve, " .").concat(ve, ` {
|
|
910
910
|
margin-right: 0 `).concat(o, `;
|
|
911
911
|
}
|
|
912
912
|
|
|
913
913
|
body {
|
|
914
|
-
`).concat(
|
|
914
|
+
`).concat(pn, ": ").concat(c, `px;
|
|
915
915
|
}
|
|
916
916
|
`);
|
|
917
|
-
},
|
|
917
|
+
}, Tn = function(e) {
|
|
918
918
|
var n = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o, r = m.useMemo(function() {
|
|
919
|
-
return
|
|
919
|
+
return Pn(a);
|
|
920
920
|
}, [a]);
|
|
921
|
-
return m.createElement(
|
|
922
|
-
},
|
|
921
|
+
return m.createElement(Nn, { styles: An(r, !n, a, t ? "" : "!important") });
|
|
922
|
+
}, Ne = !1;
|
|
923
923
|
if (typeof window < "u")
|
|
924
924
|
try {
|
|
925
|
-
var
|
|
925
|
+
var ce = Object.defineProperty({}, "passive", {
|
|
926
926
|
get: function() {
|
|
927
|
-
return
|
|
927
|
+
return Ne = !0, !0;
|
|
928
928
|
}
|
|
929
929
|
});
|
|
930
|
-
window.addEventListener("test",
|
|
930
|
+
window.addEventListener("test", ce, ce), window.removeEventListener("test", ce, ce);
|
|
931
931
|
} catch {
|
|
932
|
-
|
|
932
|
+
Ne = !1;
|
|
933
933
|
}
|
|
934
|
-
var
|
|
934
|
+
var G = Ne ? { passive: !1 } : !1, Dn = function(e) {
|
|
935
935
|
return e.tagName === "TEXTAREA";
|
|
936
|
-
},
|
|
936
|
+
}, ut = function(e, n) {
|
|
937
937
|
var t = window.getComputedStyle(e);
|
|
938
938
|
return (
|
|
939
939
|
// not-not-scrollable
|
|
940
940
|
t[n] !== "hidden" && // contains scroll inside self
|
|
941
|
-
!(t.overflowY === t.overflowX && !
|
|
941
|
+
!(t.overflowY === t.overflowX && !Dn(e) && t[n] === "visible")
|
|
942
942
|
);
|
|
943
|
-
},
|
|
944
|
-
return
|
|
945
|
-
},
|
|
946
|
-
return
|
|
947
|
-
},
|
|
943
|
+
}, In = function(e) {
|
|
944
|
+
return ut(e, "overflowY");
|
|
945
|
+
}, Ln = function(e) {
|
|
946
|
+
return ut(e, "overflowX");
|
|
947
|
+
}, qe = function(e, n) {
|
|
948
948
|
var t = n;
|
|
949
949
|
do {
|
|
950
950
|
typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
|
|
951
|
-
var o =
|
|
951
|
+
var o = st(e, t);
|
|
952
952
|
if (o) {
|
|
953
|
-
var a =
|
|
953
|
+
var a = lt(e, t), r = a[1], i = a[2];
|
|
954
954
|
if (r > i)
|
|
955
955
|
return !0;
|
|
956
956
|
}
|
|
957
957
|
t = t.parentNode;
|
|
958
958
|
} while (t && t !== document.body);
|
|
959
959
|
return !1;
|
|
960
|
-
},
|
|
960
|
+
}, Rn = function(e) {
|
|
961
961
|
var n = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
|
|
962
962
|
return [
|
|
963
963
|
n,
|
|
964
964
|
t,
|
|
965
965
|
o
|
|
966
966
|
];
|
|
967
|
-
},
|
|
967
|
+
}, Mn = function(e) {
|
|
968
968
|
var n = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
|
|
969
969
|
return [
|
|
970
970
|
n,
|
|
971
971
|
t,
|
|
972
972
|
o
|
|
973
973
|
];
|
|
974
|
+
}, st = function(e, n) {
|
|
975
|
+
return e === "v" ? In(n) : Ln(n);
|
|
974
976
|
}, lt = function(e, n) {
|
|
975
|
-
return e === "v" ?
|
|
976
|
-
},
|
|
977
|
-
return e === "v" ? Fn(n) : jn(n);
|
|
978
|
-
}, Bn = function(e, n) {
|
|
977
|
+
return e === "v" ? Rn(n) : Mn(n);
|
|
978
|
+
}, kn = function(e, n) {
|
|
979
979
|
return e === "h" && n === "rtl" ? -1 : 1;
|
|
980
|
-
},
|
|
981
|
-
var r =
|
|
980
|
+
}, Fn = function(e, n, t, o, a) {
|
|
981
|
+
var r = kn(e, window.getComputedStyle(n).direction), i = r * o, c = t.target, s = n.contains(c), d = !1, p = i > 0, l = 0, h = 0;
|
|
982
982
|
do {
|
|
983
|
-
var f =
|
|
984
|
-
(E || b) &&
|
|
983
|
+
var f = lt(e, c), E = f[0], u = f[1], v = f[2], b = u - v - r * E;
|
|
984
|
+
(E || b) && st(e, c) && (l += b, h += E), c = c.parentNode;
|
|
985
985
|
} while (
|
|
986
986
|
// portaled content
|
|
987
987
|
!s && c !== document.body || // self content
|
|
988
988
|
s && (n.contains(c) || n === c)
|
|
989
989
|
);
|
|
990
990
|
return (p && (l === 0 || !a) || !p && (h === 0 || !a)) && (d = !0), d;
|
|
991
|
-
},
|
|
991
|
+
}, ue = function(e) {
|
|
992
992
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
993
|
-
},
|
|
993
|
+
}, He = function(e) {
|
|
994
994
|
return [e.deltaX, e.deltaY];
|
|
995
|
-
},
|
|
995
|
+
}, Ke = function(e) {
|
|
996
996
|
return e && "current" in e ? e.current : e;
|
|
997
|
-
},
|
|
997
|
+
}, jn = function(e, n) {
|
|
998
998
|
return e[0] === n[0] && e[1] === n[1];
|
|
999
|
-
},
|
|
999
|
+
}, Bn = function(e) {
|
|
1000
1000
|
return `
|
|
1001
1001
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1002
1002
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1003
1003
|
`);
|
|
1004
|
-
},
|
|
1005
|
-
function
|
|
1006
|
-
var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(
|
|
1007
|
-
return
|
|
1004
|
+
}, Un = 0, V = [];
|
|
1005
|
+
function Wn(e) {
|
|
1006
|
+
var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(Un++)[0], r = m.useState(function() {
|
|
1007
|
+
return ct();
|
|
1008
1008
|
})[0], i = m.useRef(e);
|
|
1009
1009
|
m.useEffect(function() {
|
|
1010
1010
|
i.current = e;
|
|
1011
1011
|
}, [e]), m.useEffect(function() {
|
|
1012
1012
|
if (e.inert) {
|
|
1013
1013
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
1014
|
-
var u =
|
|
1014
|
+
var u = ln([e.lockRef.current], (e.shards || []).map(Ke), !0).filter(Boolean);
|
|
1015
1015
|
return u.forEach(function(v) {
|
|
1016
1016
|
return v.classList.add("allow-interactivity-".concat(a));
|
|
1017
1017
|
}), function() {
|
|
@@ -1024,93 +1024,93 @@ function Hn(e) {
|
|
|
1024
1024
|
var c = m.useCallback(function(u, v) {
|
|
1025
1025
|
if ("touches" in u && u.touches.length === 2)
|
|
1026
1026
|
return !i.current.allowPinchZoom;
|
|
1027
|
-
var b =
|
|
1028
|
-
if ("touches" in u &&
|
|
1027
|
+
var b = ue(u), C = t.current, y = "deltaX" in u ? u.deltaX : C[0] - b[0], $ = "deltaY" in u ? u.deltaY : C[1] - b[1], w, z = u.target, D = Math.abs(y) > Math.abs($) ? "h" : "v";
|
|
1028
|
+
if ("touches" in u && D === "h" && z.type === "range")
|
|
1029
1029
|
return !1;
|
|
1030
|
-
var x =
|
|
1030
|
+
var x = qe(D, z);
|
|
1031
1031
|
if (!x)
|
|
1032
1032
|
return !0;
|
|
1033
|
-
if (x ? w =
|
|
1033
|
+
if (x ? w = D : (w = D === "v" ? "h" : "v", x = qe(D, z)), !x)
|
|
1034
1034
|
return !1;
|
|
1035
1035
|
if (!o.current && "changedTouches" in u && (y || $) && (o.current = w), !w)
|
|
1036
1036
|
return !0;
|
|
1037
|
-
var
|
|
1038
|
-
return
|
|
1037
|
+
var I = o.current || w;
|
|
1038
|
+
return Fn(I, v, u, I === "h" ? y : $, !0);
|
|
1039
1039
|
}, []), s = m.useCallback(function(u) {
|
|
1040
1040
|
var v = u;
|
|
1041
|
-
if (!(!
|
|
1042
|
-
var b = "deltaY" in v ?
|
|
1043
|
-
return w.name === v.type && w.target === v.target &&
|
|
1041
|
+
if (!(!V.length || V[V.length - 1] !== r)) {
|
|
1042
|
+
var b = "deltaY" in v ? He(v) : ue(v), C = n.current.filter(function(w) {
|
|
1043
|
+
return w.name === v.type && w.target === v.target && jn(w.delta, b);
|
|
1044
1044
|
})[0];
|
|
1045
|
-
if (
|
|
1045
|
+
if (C && C.should) {
|
|
1046
1046
|
v.cancelable && v.preventDefault();
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
if (!
|
|
1050
|
-
var y = (i.current.shards || []).map(
|
|
1049
|
+
if (!C) {
|
|
1050
|
+
var y = (i.current.shards || []).map(Ke).filter(Boolean).filter(function(w) {
|
|
1051
1051
|
return w.contains(v.target);
|
|
1052
1052
|
}), $ = y.length > 0 ? c(v, y[0]) : !i.current.noIsolation;
|
|
1053
1053
|
$ && v.cancelable && v.preventDefault();
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
|
-
}, []), d = m.useCallback(function(u, v, b,
|
|
1057
|
-
var y = { name: u, delta: v, target: b, should:
|
|
1056
|
+
}, []), d = m.useCallback(function(u, v, b, C) {
|
|
1057
|
+
var y = { name: u, delta: v, target: b, should: C };
|
|
1058
1058
|
n.current.push(y), setTimeout(function() {
|
|
1059
1059
|
n.current = n.current.filter(function($) {
|
|
1060
1060
|
return $ !== y;
|
|
1061
1061
|
});
|
|
1062
1062
|
}, 1);
|
|
1063
1063
|
}, []), p = m.useCallback(function(u) {
|
|
1064
|
-
t.current =
|
|
1064
|
+
t.current = ue(u), o.current = void 0;
|
|
1065
1065
|
}, []), l = m.useCallback(function(u) {
|
|
1066
|
-
d(u.type,
|
|
1066
|
+
d(u.type, He(u), u.target, c(u, e.lockRef.current));
|
|
1067
1067
|
}, []), h = m.useCallback(function(u) {
|
|
1068
|
-
d(u.type,
|
|
1068
|
+
d(u.type, ue(u), u.target, c(u, e.lockRef.current));
|
|
1069
1069
|
}, []);
|
|
1070
1070
|
m.useEffect(function() {
|
|
1071
|
-
return
|
|
1071
|
+
return V.push(r), e.setCallbacks({
|
|
1072
1072
|
onScrollCapture: l,
|
|
1073
1073
|
onWheelCapture: l,
|
|
1074
1074
|
onTouchMoveCapture: h
|
|
1075
|
-
}), document.addEventListener("wheel", s,
|
|
1076
|
-
|
|
1075
|
+
}), document.addEventListener("wheel", s, G), document.addEventListener("touchmove", s, G), document.addEventListener("touchstart", p, G), function() {
|
|
1076
|
+
V = V.filter(function(u) {
|
|
1077
1077
|
return u !== r;
|
|
1078
|
-
}), document.removeEventListener("wheel", s,
|
|
1078
|
+
}), document.removeEventListener("wheel", s, G), document.removeEventListener("touchmove", s, G), document.removeEventListener("touchstart", p, G);
|
|
1079
1079
|
};
|
|
1080
1080
|
}, []);
|
|
1081
1081
|
var f = e.removeScrollBar, E = e.inert;
|
|
1082
1082
|
return m.createElement(
|
|
1083
1083
|
m.Fragment,
|
|
1084
1084
|
null,
|
|
1085
|
-
E ? m.createElement(r, { styles:
|
|
1086
|
-
f ? m.createElement(
|
|
1085
|
+
E ? m.createElement(r, { styles: Bn(a) }) : null,
|
|
1086
|
+
f ? m.createElement(Tn, { gapMode: "margin" }) : null
|
|
1087
1087
|
);
|
|
1088
1088
|
}
|
|
1089
|
-
const
|
|
1090
|
-
var
|
|
1091
|
-
return m.createElement(
|
|
1089
|
+
const zn = bn(it, Wn);
|
|
1090
|
+
var dt = m.forwardRef(function(e, n) {
|
|
1091
|
+
return m.createElement(ge, k({}, e, { ref: n, sideCar: zn }));
|
|
1092
1092
|
});
|
|
1093
|
-
|
|
1094
|
-
var
|
|
1093
|
+
dt.classNames = ge.classNames;
|
|
1094
|
+
var qn = function(e) {
|
|
1095
1095
|
if (typeof document > "u")
|
|
1096
1096
|
return null;
|
|
1097
1097
|
var n = Array.isArray(e) ? e[0] : e;
|
|
1098
1098
|
return n.ownerDocument.body;
|
|
1099
|
-
},
|
|
1100
|
-
return e && (e.host ||
|
|
1101
|
-
},
|
|
1099
|
+
}, X = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), le = {}, we = 0, pt = function(e) {
|
|
1100
|
+
return e && (e.host || pt(e.parentNode));
|
|
1101
|
+
}, Hn = function(e, n) {
|
|
1102
1102
|
return n.map(function(t) {
|
|
1103
1103
|
if (e.contains(t))
|
|
1104
1104
|
return t;
|
|
1105
|
-
var o =
|
|
1105
|
+
var o = pt(t);
|
|
1106
1106
|
return o && e.contains(o) ? o : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
1107
1107
|
}).filter(function(t) {
|
|
1108
1108
|
return !!t;
|
|
1109
1109
|
});
|
|
1110
|
-
},
|
|
1111
|
-
var a =
|
|
1112
|
-
|
|
1113
|
-
var r =
|
|
1110
|
+
}, Kn = function(e, n, t, o) {
|
|
1111
|
+
var a = Hn(n, Array.isArray(e) ? e : [e]);
|
|
1112
|
+
le[t] || (le[t] = /* @__PURE__ */ new WeakMap());
|
|
1113
|
+
var r = le[t], i = [], c = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
|
|
1114
1114
|
!l || c.has(l) || (c.add(l), d(l.parentNode));
|
|
1115
1115
|
};
|
|
1116
1116
|
a.forEach(d);
|
|
@@ -1119,40 +1119,40 @@ var Gn = function(e) {
|
|
|
1119
1119
|
if (c.has(h))
|
|
1120
1120
|
p(h);
|
|
1121
1121
|
else {
|
|
1122
|
-
var f = h.getAttribute(o), E = f !== null && f !== "false", u = (
|
|
1123
|
-
|
|
1122
|
+
var f = h.getAttribute(o), E = f !== null && f !== "false", u = (X.get(h) || 0) + 1, v = (r.get(h) || 0) + 1;
|
|
1123
|
+
X.set(h, u), r.set(h, v), i.push(h), u === 1 && E && se.set(h, !0), v === 1 && h.setAttribute(t, "true"), E || h.setAttribute(o, "true");
|
|
1124
1124
|
}
|
|
1125
1125
|
});
|
|
1126
1126
|
};
|
|
1127
|
-
return p(n), c.clear(),
|
|
1127
|
+
return p(n), c.clear(), we++, function() {
|
|
1128
1128
|
i.forEach(function(l) {
|
|
1129
|
-
var h =
|
|
1130
|
-
|
|
1131
|
-
}),
|
|
1129
|
+
var h = X.get(l) - 1, f = r.get(l) - 1;
|
|
1130
|
+
X.set(l, h), r.set(l, f), h || (se.has(l) || l.removeAttribute(o), se.delete(l)), f || l.removeAttribute(t);
|
|
1131
|
+
}), we--, we || (X = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), le = {});
|
|
1132
1132
|
};
|
|
1133
|
-
},
|
|
1133
|
+
}, Gn = function(e, n, t) {
|
|
1134
1134
|
t === void 0 && (t = "data-aria-hidden");
|
|
1135
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1136
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))),
|
|
1135
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = qn(e);
|
|
1136
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Kn(o, a, t, "aria-hidden")) : function() {
|
|
1137
1137
|
return null;
|
|
1138
1138
|
};
|
|
1139
1139
|
};
|
|
1140
|
-
const
|
|
1141
|
-
const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c =
|
|
1140
|
+
const ft = "Dialog", [vt, _o] = Lt(ft), [Vn, M] = vt(ft), Xn = (e) => {
|
|
1141
|
+
const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c = P(null), s = P(null), [d = !1, p] = Ft({
|
|
1142
1142
|
prop: o,
|
|
1143
1143
|
defaultProp: a,
|
|
1144
1144
|
onChange: r
|
|
1145
1145
|
});
|
|
1146
|
-
return /* @__PURE__ */ g(
|
|
1146
|
+
return /* @__PURE__ */ g(Vn, {
|
|
1147
1147
|
scope: n,
|
|
1148
1148
|
triggerRef: c,
|
|
1149
1149
|
contentRef: s,
|
|
1150
|
-
contentId:
|
|
1151
|
-
titleId:
|
|
1152
|
-
descriptionId:
|
|
1150
|
+
contentId: _e(),
|
|
1151
|
+
titleId: _e(),
|
|
1152
|
+
descriptionId: _e(),
|
|
1153
1153
|
open: d,
|
|
1154
1154
|
onOpenChange: p,
|
|
1155
|
-
onOpenToggle:
|
|
1155
|
+
onOpenToggle: Z(
|
|
1156
1156
|
() => p(
|
|
1157
1157
|
(l) => !l
|
|
1158
1158
|
),
|
|
@@ -1162,9 +1162,9 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
|
|
|
1162
1162
|
),
|
|
1163
1163
|
modal: i
|
|
1164
1164
|
}, t);
|
|
1165
|
-
},
|
|
1166
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1167
|
-
return /* @__PURE__ */ g(
|
|
1165
|
+
}, Yn = "DialogTrigger", Zn = /* @__PURE__ */ S((e, n) => {
|
|
1166
|
+
const { __scopeDialog: t, ...o } = e, a = M(Yn, t), r = Q(n, a.triggerRef);
|
|
1167
|
+
return /* @__PURE__ */ g(W.button, N({
|
|
1168
1168
|
type: "button",
|
|
1169
1169
|
"aria-haspopup": "dialog",
|
|
1170
1170
|
"aria-expanded": a.open,
|
|
@@ -1172,43 +1172,43 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
|
|
|
1172
1172
|
"data-state": Le(a.open)
|
|
1173
1173
|
}, o, {
|
|
1174
1174
|
ref: r,
|
|
1175
|
-
onClick:
|
|
1175
|
+
onClick: B(e.onClick, a.onOpenToggle)
|
|
1176
1176
|
}));
|
|
1177
|
-
}),
|
|
1177
|
+
}), ht = "DialogPortal", [Qn, mt] = vt(ht, {
|
|
1178
1178
|
forceMount: void 0
|
|
1179
|
-
}),
|
|
1180
|
-
const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r =
|
|
1181
|
-
return /* @__PURE__ */ g(
|
|
1179
|
+
}), Jn = (e) => {
|
|
1180
|
+
const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = M(ht, n);
|
|
1181
|
+
return /* @__PURE__ */ g(Qn, {
|
|
1182
1182
|
scope: n,
|
|
1183
1183
|
forceMount: t
|
|
1184
|
-
},
|
|
1184
|
+
}, L.map(
|
|
1185
1185
|
o,
|
|
1186
|
-
(i) => /* @__PURE__ */ g(
|
|
1186
|
+
(i) => /* @__PURE__ */ g(me, {
|
|
1187
1187
|
present: t || r.open
|
|
1188
|
-
}, /* @__PURE__ */ g(
|
|
1188
|
+
}, /* @__PURE__ */ g(an, {
|
|
1189
1189
|
asChild: !0,
|
|
1190
1190
|
container: a
|
|
1191
1191
|
}, i))
|
|
1192
1192
|
));
|
|
1193
|
-
},
|
|
1194
|
-
const t =
|
|
1195
|
-
return r.modal ? /* @__PURE__ */ g(
|
|
1193
|
+
}, Ae = "DialogOverlay", er = /* @__PURE__ */ S((e, n) => {
|
|
1194
|
+
const t = mt(Ae, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(Ae, e.__scopeDialog);
|
|
1195
|
+
return r.modal ? /* @__PURE__ */ g(me, {
|
|
1196
1196
|
present: o || r.open
|
|
1197
|
-
}, /* @__PURE__ */ g(
|
|
1197
|
+
}, /* @__PURE__ */ g(tr, N({}, a, {
|
|
1198
1198
|
ref: n
|
|
1199
1199
|
}))) : null;
|
|
1200
|
-
}),
|
|
1201
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1200
|
+
}), tr = /* @__PURE__ */ S((e, n) => {
|
|
1201
|
+
const { __scopeDialog: t, ...o } = e, a = M(Ae, t);
|
|
1202
1202
|
return (
|
|
1203
1203
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1204
1204
|
// ie. when `Overlay` and `Content` are siblings
|
|
1205
|
-
/* @__PURE__ */ g(
|
|
1206
|
-
as:
|
|
1205
|
+
/* @__PURE__ */ g(dt, {
|
|
1206
|
+
as: Ie,
|
|
1207
1207
|
allowPinchZoom: !0,
|
|
1208
1208
|
shards: [
|
|
1209
1209
|
a.contentRef
|
|
1210
1210
|
]
|
|
1211
|
-
}, /* @__PURE__ */ g(
|
|
1211
|
+
}, /* @__PURE__ */ g(W.div, N({
|
|
1212
1212
|
"data-state": Le(a.open)
|
|
1213
1213
|
}, o, {
|
|
1214
1214
|
ref: n,
|
|
@@ -1218,40 +1218,40 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
})))
|
|
1220
1220
|
);
|
|
1221
|
-
}),
|
|
1222
|
-
const t =
|
|
1223
|
-
return /* @__PURE__ */ g(
|
|
1221
|
+
}), re = "DialogContent", nr = /* @__PURE__ */ S((e, n) => {
|
|
1222
|
+
const t = mt(re, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(re, e.__scopeDialog);
|
|
1223
|
+
return /* @__PURE__ */ g(me, {
|
|
1224
1224
|
present: o || r.open
|
|
1225
|
-
}, r.modal ? /* @__PURE__ */ g(
|
|
1225
|
+
}, r.modal ? /* @__PURE__ */ g(rr, N({}, a, {
|
|
1226
1226
|
ref: n
|
|
1227
|
-
})) : /* @__PURE__ */ g(
|
|
1227
|
+
})) : /* @__PURE__ */ g(or, N({}, a, {
|
|
1228
1228
|
ref: n
|
|
1229
1229
|
})));
|
|
1230
|
-
}),
|
|
1231
|
-
const t =
|
|
1230
|
+
}), rr = /* @__PURE__ */ S((e, n) => {
|
|
1231
|
+
const t = M(re, e.__scopeDialog), o = P(null), a = Q(n, t.contentRef, o);
|
|
1232
1232
|
return A(() => {
|
|
1233
1233
|
const r = o.current;
|
|
1234
|
-
if (r) return
|
|
1235
|
-
}, []), /* @__PURE__ */ g(
|
|
1234
|
+
if (r) return Gn(r);
|
|
1235
|
+
}, []), /* @__PURE__ */ g(gt, N({}, e, {
|
|
1236
1236
|
ref: a,
|
|
1237
1237
|
trapFocus: t.open,
|
|
1238
1238
|
disableOutsidePointerEvents: !0,
|
|
1239
|
-
onCloseAutoFocus:
|
|
1239
|
+
onCloseAutoFocus: B(e.onCloseAutoFocus, (r) => {
|
|
1240
1240
|
var i;
|
|
1241
1241
|
r.preventDefault(), (i = t.triggerRef.current) === null || i === void 0 || i.focus();
|
|
1242
1242
|
}),
|
|
1243
|
-
onPointerDownOutside:
|
|
1243
|
+
onPointerDownOutside: B(e.onPointerDownOutside, (r) => {
|
|
1244
1244
|
const i = r.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
|
|
1245
1245
|
(i.button === 2 || c) && r.preventDefault();
|
|
1246
1246
|
}),
|
|
1247
|
-
onFocusOutside:
|
|
1247
|
+
onFocusOutside: B(
|
|
1248
1248
|
e.onFocusOutside,
|
|
1249
1249
|
(r) => r.preventDefault()
|
|
1250
1250
|
)
|
|
1251
1251
|
}));
|
|
1252
|
-
}),
|
|
1253
|
-
const t =
|
|
1254
|
-
return /* @__PURE__ */ g(
|
|
1252
|
+
}), or = /* @__PURE__ */ S((e, n) => {
|
|
1253
|
+
const t = M(re, e.__scopeDialog), o = P(!1), a = P(!1);
|
|
1254
|
+
return /* @__PURE__ */ g(gt, N({}, e, {
|
|
1255
1255
|
ref: n,
|
|
1256
1256
|
trapFocus: !1,
|
|
1257
1257
|
disableOutsidePointerEvents: !1,
|
|
@@ -1270,15 +1270,15 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
|
|
|
1270
1270
|
((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
|
|
1271
1271
|
}
|
|
1272
1272
|
}));
|
|
1273
|
-
}),
|
|
1274
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c =
|
|
1275
|
-
return
|
|
1273
|
+
}), gt = /* @__PURE__ */ S((e, n) => {
|
|
1274
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c = M(re, t), s = P(null), d = Q(n, s);
|
|
1275
|
+
return sn(), /* @__PURE__ */ g(De, null, /* @__PURE__ */ g(Qt, {
|
|
1276
1276
|
asChild: !0,
|
|
1277
1277
|
loop: !0,
|
|
1278
1278
|
trapped: o,
|
|
1279
1279
|
onMountAutoFocus: a,
|
|
1280
1280
|
onUnmountAutoFocus: r
|
|
1281
|
-
}, /* @__PURE__ */ g(
|
|
1281
|
+
}, /* @__PURE__ */ g(Xt, N({
|
|
1282
1282
|
role: "dialog",
|
|
1283
1283
|
id: c.contentId,
|
|
1284
1284
|
"aria-describedby": c.descriptionId,
|
|
@@ -1288,27 +1288,27 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
|
|
|
1288
1288
|
ref: d,
|
|
1289
1289
|
onDismiss: () => c.onOpenChange(!1)
|
|
1290
1290
|
}))), !1);
|
|
1291
|
-
}),
|
|
1292
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1293
|
-
return /* @__PURE__ */ g(
|
|
1291
|
+
}), ar = "DialogTitle", ir = /* @__PURE__ */ S((e, n) => {
|
|
1292
|
+
const { __scopeDialog: t, ...o } = e, a = M(ar, t);
|
|
1293
|
+
return /* @__PURE__ */ g(W.h2, N({
|
|
1294
1294
|
id: a.titleId
|
|
1295
1295
|
}, o, {
|
|
1296
1296
|
ref: n
|
|
1297
1297
|
}));
|
|
1298
|
-
}),
|
|
1299
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1300
|
-
return /* @__PURE__ */ g(
|
|
1298
|
+
}), cr = "DialogDescription", ur = /* @__PURE__ */ S((e, n) => {
|
|
1299
|
+
const { __scopeDialog: t, ...o } = e, a = M(cr, t);
|
|
1300
|
+
return /* @__PURE__ */ g(W.p, N({
|
|
1301
1301
|
id: a.descriptionId
|
|
1302
1302
|
}, o, {
|
|
1303
1303
|
ref: n
|
|
1304
1304
|
}));
|
|
1305
|
-
}),
|
|
1306
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1307
|
-
return /* @__PURE__ */ g(
|
|
1305
|
+
}), sr = "DialogClose", lr = /* @__PURE__ */ S((e, n) => {
|
|
1306
|
+
const { __scopeDialog: t, ...o } = e, a = M(sr, t);
|
|
1307
|
+
return /* @__PURE__ */ g(W.button, N({
|
|
1308
1308
|
type: "button"
|
|
1309
1309
|
}, o, {
|
|
1310
1310
|
ref: n,
|
|
1311
|
-
onClick:
|
|
1311
|
+
onClick: B(
|
|
1312
1312
|
e.onClick,
|
|
1313
1313
|
() => a.onOpenChange(!1)
|
|
1314
1314
|
)
|
|
@@ -1317,15 +1317,15 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
|
|
|
1317
1317
|
function Le(e) {
|
|
1318
1318
|
return e ? "open" : "closed";
|
|
1319
1319
|
}
|
|
1320
|
-
const
|
|
1320
|
+
const dr = Xn, pr = Zn, fr = Jn, vr = er, hr = nr, mr = ir, Ge = ur, gr = lr, _r = {
|
|
1321
1321
|
SM: "sm",
|
|
1322
1322
|
MD: "md",
|
|
1323
1323
|
LG: "lg"
|
|
1324
1324
|
};
|
|
1325
|
-
function
|
|
1325
|
+
function br(e) {
|
|
1326
1326
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1327
1327
|
}
|
|
1328
|
-
var
|
|
1328
|
+
var _t = { exports: {} };
|
|
1329
1329
|
/*!
|
|
1330
1330
|
Copyright (c) 2018 Jed Watson.
|
|
1331
1331
|
Licensed under the MIT License (MIT), see
|
|
@@ -1360,44 +1360,44 @@ var bt = { exports: {} };
|
|
|
1360
1360
|
}
|
|
1361
1361
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1362
1362
|
})();
|
|
1363
|
-
})(
|
|
1364
|
-
var
|
|
1365
|
-
const
|
|
1363
|
+
})(_t);
|
|
1364
|
+
var $r = _t.exports;
|
|
1365
|
+
const Ve = /* @__PURE__ */ br($r), yr = "_rotate_1xozj_1", Er = "_dash_1xozj_1", J = {
|
|
1366
1366
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1367
|
-
rotate:
|
|
1367
|
+
rotate: yr,
|
|
1368
1368
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
1369
1369
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
1370
1370
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
1371
1371
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
1372
1372
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
1373
1373
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
1374
|
-
dash:
|
|
1374
|
+
dash: Er,
|
|
1375
1375
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1376
1376
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1377
|
-
},
|
|
1377
|
+
}, ee = "purpur-spinner", xr = {
|
|
1378
1378
|
XXS: "xxs",
|
|
1379
1379
|
XS: "xs",
|
|
1380
1380
|
SM: "sm",
|
|
1381
1381
|
MD: "md",
|
|
1382
1382
|
LG: "lg"
|
|
1383
|
-
},
|
|
1383
|
+
}, wr = ({
|
|
1384
1384
|
["data-testid"]: e,
|
|
1385
1385
|
disabled: n = !1,
|
|
1386
1386
|
negative: t = !1,
|
|
1387
|
-
size: o =
|
|
1387
|
+
size: o = xr.SM,
|
|
1388
1388
|
...a
|
|
1389
1389
|
}) => /* @__PURE__ */ _(
|
|
1390
1390
|
"div",
|
|
1391
1391
|
{
|
|
1392
|
-
className:
|
|
1392
|
+
className: Ve([J[ee], J[`${ee}--${o}`]]),
|
|
1393
1393
|
"data-testid": e,
|
|
1394
1394
|
...a,
|
|
1395
1395
|
children: /* @__PURE__ */ _("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ _(
|
|
1396
1396
|
"circle",
|
|
1397
1397
|
{
|
|
1398
|
-
className:
|
|
1399
|
-
[
|
|
1400
|
-
[
|
|
1398
|
+
className: Ve(J[`${ee}__circle`], {
|
|
1399
|
+
[J[`${ee}__circle--disabled`]]: n,
|
|
1400
|
+
[J[`${ee}__circle--negative`]]: t
|
|
1401
1401
|
}),
|
|
1402
1402
|
cx: "25",
|
|
1403
1403
|
cy: "25",
|
|
@@ -1406,10 +1406,10 @@ const Xe = /* @__PURE__ */ Er(xr), wr = "_rotate_1xozj_1", Sr = "_dash_1xozj_1",
|
|
|
1406
1406
|
) })
|
|
1407
1407
|
}
|
|
1408
1408
|
);
|
|
1409
|
-
function
|
|
1409
|
+
function Sr(e) {
|
|
1410
1410
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1411
1411
|
}
|
|
1412
|
-
var
|
|
1412
|
+
var bt = { exports: {} };
|
|
1413
1413
|
/*!
|
|
1414
1414
|
Copyright (c) 2018 Jed Watson.
|
|
1415
1415
|
Licensed under the MIT License (MIT), see
|
|
@@ -1444,9 +1444,9 @@ var $t = { exports: {} };
|
|
|
1444
1444
|
}
|
|
1445
1445
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1446
1446
|
})();
|
|
1447
|
-
})(
|
|
1448
|
-
var
|
|
1449
|
-
const
|
|
1447
|
+
})(bt);
|
|
1448
|
+
var Cr = bt.exports;
|
|
1449
|
+
const Or = /* @__PURE__ */ Sr(Cr), Pr = {
|
|
1450
1450
|
"purpur-button": "_purpur-button_1acxn_1",
|
|
1451
1451
|
"purpur-button--sm": "_purpur-button--sm_1acxn_33",
|
|
1452
1452
|
"purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
|
|
@@ -1467,7 +1467,7 @@ const Ar = /* @__PURE__ */ Pr(Nr), Tr = {
|
|
|
1467
1467
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
|
|
1468
1468
|
"purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
|
|
1469
1469
|
"purpur-button--text": "_purpur-button--text_1acxn_175"
|
|
1470
|
-
},
|
|
1470
|
+
}, Nr = Or.bind(Pr), q = "purpur-button", Ar = ({
|
|
1471
1471
|
children: e,
|
|
1472
1472
|
className: n,
|
|
1473
1473
|
["data-testid"]: t,
|
|
@@ -1484,23 +1484,23 @@ const Ar = /* @__PURE__ */ Pr(Nr), Tr = {
|
|
|
1484
1484
|
}, f) => {
|
|
1485
1485
|
if (r && p === "destructive")
|
|
1486
1486
|
return null;
|
|
1487
|
-
const E =
|
|
1487
|
+
const E = Nr(
|
|
1488
1488
|
[
|
|
1489
|
-
|
|
1490
|
-
`${
|
|
1491
|
-
`${
|
|
1489
|
+
q,
|
|
1490
|
+
`${q}--${c ? `${p}-negative` : p}`,
|
|
1491
|
+
`${q}--${d}`
|
|
1492
1492
|
],
|
|
1493
1493
|
{
|
|
1494
|
-
[`${
|
|
1495
|
-
[`${
|
|
1496
|
-
[`${
|
|
1497
|
-
[`${
|
|
1494
|
+
[`${q}--icon-only`]: r,
|
|
1495
|
+
[`${q}--negative`]: c,
|
|
1496
|
+
[`${q}--full-width`]: a,
|
|
1497
|
+
[`${q}--disabled`]: o || i
|
|
1498
1498
|
},
|
|
1499
1499
|
n
|
|
1500
1500
|
), u = (b) => {
|
|
1501
1501
|
o || i ? b.preventDefault() : s && s(b);
|
|
1502
1502
|
}, v = !!h["aria-disabled"] || o || i;
|
|
1503
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ j(
|
|
1504
1504
|
"button",
|
|
1505
1505
|
{
|
|
1506
1506
|
className: E,
|
|
@@ -1511,18 +1511,18 @@ const Ar = /* @__PURE__ */ Pr(Nr), Tr = {
|
|
|
1511
1511
|
onClick: u,
|
|
1512
1512
|
...h,
|
|
1513
1513
|
children: [
|
|
1514
|
-
i && /* @__PURE__ */ _(
|
|
1514
|
+
i && /* @__PURE__ */ _(wr, { size: d === _r.LG ? "xs" : "xxs", negative: c, disabled: v }),
|
|
1515
1515
|
" ",
|
|
1516
1516
|
e
|
|
1517
1517
|
]
|
|
1518
1518
|
}
|
|
1519
1519
|
);
|
|
1520
|
-
},
|
|
1521
|
-
|
|
1522
|
-
function
|
|
1520
|
+
}, Re = S(Ar);
|
|
1521
|
+
Re.displayName = "Button";
|
|
1522
|
+
function Tr(e) {
|
|
1523
1523
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1524
1524
|
}
|
|
1525
|
-
var
|
|
1525
|
+
var $t = { exports: {} };
|
|
1526
1526
|
/*!
|
|
1527
1527
|
Copyright (c) 2018 Jed Watson.
|
|
1528
1528
|
Licensed under the MIT License (MIT), see
|
|
@@ -1557,9 +1557,9 @@ var yt = { exports: {} };
|
|
|
1557
1557
|
}
|
|
1558
1558
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1559
1559
|
})();
|
|
1560
|
-
})(
|
|
1561
|
-
var
|
|
1562
|
-
const
|
|
1560
|
+
})($t);
|
|
1561
|
+
var Dr = $t.exports;
|
|
1562
|
+
const Ir = /* @__PURE__ */ Tr(Dr), de = {
|
|
1563
1563
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1564
1564
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1565
1565
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1575,7 +1575,7 @@ const Mr = /* @__PURE__ */ Rr(Lr), pe = {
|
|
|
1575
1575
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
1576
1576
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
1577
1577
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
1578
|
-
},
|
|
1578
|
+
}, Lr = {
|
|
1579
1579
|
TITLE100: "title-100",
|
|
1580
1580
|
TITLE200: "title-200",
|
|
1581
1581
|
TITLE300: "title-300",
|
|
@@ -1584,32 +1584,32 @@ const Mr = /* @__PURE__ */ Rr(Lr), pe = {
|
|
|
1584
1584
|
TITLE600: "title-600",
|
|
1585
1585
|
TITLE700: "title-700",
|
|
1586
1586
|
SUBSECTION100: "subsection-100"
|
|
1587
|
-
},
|
|
1587
|
+
}, pe = "purpur-heading", yt = ({
|
|
1588
1588
|
["data-testid"]: e,
|
|
1589
1589
|
children: n,
|
|
1590
1590
|
className: t = "",
|
|
1591
1591
|
enableHyphenation: o = !1,
|
|
1592
1592
|
negative: a = !1,
|
|
1593
1593
|
tag: r,
|
|
1594
|
-
variant: i =
|
|
1594
|
+
variant: i = Lr.TITLE100,
|
|
1595
1595
|
...c
|
|
1596
1596
|
}) => {
|
|
1597
|
-
const s = r, d =
|
|
1597
|
+
const s = r, d = Ir([
|
|
1598
1598
|
t,
|
|
1599
|
-
pe
|
|
1600
|
-
|
|
1599
|
+
de[pe],
|
|
1600
|
+
de[`${pe}--${i}`],
|
|
1601
1601
|
{
|
|
1602
|
-
[
|
|
1603
|
-
[
|
|
1602
|
+
[de[`${pe}--hyphens`]]: o,
|
|
1603
|
+
[de[`${pe}--negative`]]: a
|
|
1604
1604
|
}
|
|
1605
1605
|
]);
|
|
1606
1606
|
return /* @__PURE__ */ _(s, { ...c, className: d, "data-testid": e, children: n });
|
|
1607
1607
|
};
|
|
1608
|
-
|
|
1609
|
-
function
|
|
1608
|
+
yt.displayName = "Heading";
|
|
1609
|
+
function Rr(e) {
|
|
1610
1610
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1611
1611
|
}
|
|
1612
|
-
var
|
|
1612
|
+
var Et = { exports: {} };
|
|
1613
1613
|
/*!
|
|
1614
1614
|
Copyright (c) 2018 Jed Watson.
|
|
1615
1615
|
Licensed under the MIT License (MIT), see
|
|
@@ -1644,9 +1644,9 @@ var xt = { exports: {} };
|
|
|
1644
1644
|
}
|
|
1645
1645
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1646
1646
|
})();
|
|
1647
|
-
})(
|
|
1648
|
-
var
|
|
1649
|
-
const
|
|
1647
|
+
})(Et);
|
|
1648
|
+
var Mr = Et.exports;
|
|
1649
|
+
const kr = /* @__PURE__ */ Rr(Mr), Fr = {
|
|
1650
1650
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1651
1651
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1652
1652
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1654,39 +1654,39 @@ const Br = /* @__PURE__ */ Fr(jr), Ur = {
|
|
|
1654
1654
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1655
1655
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1656
1656
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1657
|
-
},
|
|
1657
|
+
}, jr = {
|
|
1658
1658
|
name: "close",
|
|
1659
1659
|
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>',
|
|
1660
1660
|
keywords: ["close"],
|
|
1661
1661
|
category: "utility"
|
|
1662
|
-
},
|
|
1663
|
-
|
|
1662
|
+
}, xt = (e) => /* @__PURE__ */ _(
|
|
1663
|
+
Hr,
|
|
1664
1664
|
{
|
|
1665
1665
|
...e,
|
|
1666
|
-
svg:
|
|
1666
|
+
svg: jr
|
|
1667
1667
|
}
|
|
1668
1668
|
);
|
|
1669
|
-
|
|
1670
|
-
const
|
|
1669
|
+
xt.displayName = "IconClose";
|
|
1670
|
+
const Br = kr.bind(Fr), Xe = "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 } = {}) => {
|
|
1671
1671
|
const t = [
|
|
1672
1672
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1673
1673
|
{ name: "fill", value: "currentColor" },
|
|
1674
1674
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1675
1675
|
n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1676
1676
|
], o = n ? `<title>${n}</title>` : "";
|
|
1677
|
-
return `<svg ${
|
|
1678
|
-
},
|
|
1677
|
+
return `<svg ${Wr(t)}>${o}${e}</svg>`;
|
|
1678
|
+
}, qr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Hr = ({
|
|
1679
1679
|
["data-testid"]: e,
|
|
1680
1680
|
svg: n,
|
|
1681
1681
|
allyTitle: t,
|
|
1682
1682
|
className: o,
|
|
1683
|
-
size: a =
|
|
1683
|
+
size: a = Ur,
|
|
1684
1684
|
...r
|
|
1685
1685
|
}) => {
|
|
1686
|
-
const i =
|
|
1687
|
-
content:
|
|
1686
|
+
const i = zr({
|
|
1687
|
+
content: qr(n.svg),
|
|
1688
1688
|
title: t
|
|
1689
|
-
}), c =
|
|
1689
|
+
}), c = Br(o, Xe, `${Xe}--${a}`);
|
|
1690
1690
|
return /* @__PURE__ */ _(
|
|
1691
1691
|
"span",
|
|
1692
1692
|
{
|
|
@@ -1698,10 +1698,10 @@ const zr = Br.bind(Ur), Ye = "purpur-icon", qr = "md", Hr = (e) => e.filter((n)
|
|
|
1698
1698
|
}
|
|
1699
1699
|
);
|
|
1700
1700
|
};
|
|
1701
|
-
function
|
|
1701
|
+
function Kr(e) {
|
|
1702
1702
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1703
1703
|
}
|
|
1704
|
-
var
|
|
1704
|
+
var wt = { exports: {} };
|
|
1705
1705
|
/*!
|
|
1706
1706
|
Copyright (c) 2018 Jed Watson.
|
|
1707
1707
|
Licensed under the MIT License (MIT), see
|
|
@@ -1736,9 +1736,9 @@ var St = { exports: {} };
|
|
|
1736
1736
|
}
|
|
1737
1737
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1738
1738
|
})();
|
|
1739
|
-
})(
|
|
1740
|
-
var
|
|
1741
|
-
const
|
|
1739
|
+
})(wt);
|
|
1740
|
+
var Gr = wt.exports;
|
|
1741
|
+
const Vr = /* @__PURE__ */ Kr(Gr), te = {
|
|
1742
1742
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
1743
1743
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
1744
1744
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -1753,7 +1753,7 @@ const Zr = /* @__PURE__ */ Xr(Yr), ne = {
|
|
|
1753
1753
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
1754
1754
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
1755
1755
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
1756
|
-
},
|
|
1756
|
+
}, Xr = {
|
|
1757
1757
|
PARAGRAPH100: "paragraph-100",
|
|
1758
1758
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
1759
1759
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
@@ -1764,74 +1764,73 @@ const Zr = /* @__PURE__ */ Xr(Yr), ne = {
|
|
|
1764
1764
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
1765
1765
|
OVERLINE100: "overline-100",
|
|
1766
1766
|
OVERLINE200: "overline-200"
|
|
1767
|
-
},
|
|
1767
|
+
}, ne = "purpur-paragraph", St = ({
|
|
1768
1768
|
["data-testid"]: e,
|
|
1769
1769
|
children: n,
|
|
1770
1770
|
className: t,
|
|
1771
1771
|
disabled: o,
|
|
1772
1772
|
enableHyphenation: a = !1,
|
|
1773
1773
|
negative: r = !1,
|
|
1774
|
-
variant: i =
|
|
1774
|
+
variant: i = Xr.PARAGRAPH100,
|
|
1775
1775
|
...c
|
|
1776
1776
|
}) => {
|
|
1777
|
-
const s =
|
|
1777
|
+
const s = Vr([
|
|
1778
1778
|
t,
|
|
1779
|
-
ne
|
|
1780
|
-
|
|
1779
|
+
te[ne],
|
|
1780
|
+
te[`${ne}--${i}`],
|
|
1781
1781
|
{
|
|
1782
|
-
[
|
|
1783
|
-
[
|
|
1784
|
-
[
|
|
1782
|
+
[te[`${ne}--hyphens`]]: a,
|
|
1783
|
+
[te[`${ne}--disabled`]]: o,
|
|
1784
|
+
[te[`${ne}--negative`]]: r
|
|
1785
1785
|
}
|
|
1786
1786
|
]);
|
|
1787
1787
|
return /* @__PURE__ */ _("p", { ...c, className: s, "data-testid": e, children: n });
|
|
1788
1788
|
};
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
return Z = Object.assign ? Object.assign.bind() : function(e) {
|
|
1789
|
+
St.displayName = "Paragraph";
|
|
1790
|
+
function Y() {
|
|
1791
|
+
return Y = Object.assign ? Object.assign.bind() : function(e) {
|
|
1793
1792
|
for (var n = 1; n < arguments.length; n++) {
|
|
1794
1793
|
var t = arguments[n];
|
|
1795
1794
|
for (var o in t)
|
|
1796
1795
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
1797
1796
|
}
|
|
1798
1797
|
return e;
|
|
1799
|
-
},
|
|
1798
|
+
}, Y.apply(this, arguments);
|
|
1800
1799
|
}
|
|
1801
|
-
function
|
|
1800
|
+
function Yr(e, n) {
|
|
1802
1801
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
1803
1802
|
}
|
|
1804
|
-
function
|
|
1803
|
+
function Zr(...e) {
|
|
1805
1804
|
return (n) => e.forEach(
|
|
1806
|
-
(t) =>
|
|
1805
|
+
(t) => Yr(t, n)
|
|
1807
1806
|
);
|
|
1808
1807
|
}
|
|
1809
|
-
const
|
|
1810
|
-
const { children: t, ...o } = e, a =
|
|
1808
|
+
const Ct = /* @__PURE__ */ S((e, n) => {
|
|
1809
|
+
const { children: t, ...o } = e, a = L.toArray(t), r = a.find(Jr);
|
|
1811
1810
|
if (r) {
|
|
1812
|
-
const i = r.props.children, c = a.map((s) => s === r ?
|
|
1813
|
-
return /* @__PURE__ */ g(
|
|
1811
|
+
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);
|
|
1812
|
+
return /* @__PURE__ */ g(Te, Y({}, o, {
|
|
1814
1813
|
ref: n
|
|
1815
|
-
}), /* @__PURE__ */
|
|
1814
|
+
}), /* @__PURE__ */ U(i) ? /* @__PURE__ */ oe(i, void 0, c) : null);
|
|
1816
1815
|
}
|
|
1817
|
-
return /* @__PURE__ */ g(
|
|
1816
|
+
return /* @__PURE__ */ g(Te, Y({}, o, {
|
|
1818
1817
|
ref: n
|
|
1819
1818
|
}), t);
|
|
1820
1819
|
});
|
|
1821
|
-
|
|
1822
|
-
const
|
|
1820
|
+
Ct.displayName = "Slot";
|
|
1821
|
+
const Te = /* @__PURE__ */ S((e, n) => {
|
|
1823
1822
|
const { children: t, ...o } = e;
|
|
1824
|
-
return /* @__PURE__ */
|
|
1825
|
-
...
|
|
1826
|
-
ref: n ?
|
|
1827
|
-
}) :
|
|
1823
|
+
return /* @__PURE__ */ U(t) ? /* @__PURE__ */ oe(t, {
|
|
1824
|
+
...eo(o, t.props),
|
|
1825
|
+
ref: n ? Zr(n, t.ref) : t.ref
|
|
1826
|
+
}) : L.count(t) > 1 ? L.only(null) : null;
|
|
1828
1827
|
});
|
|
1829
|
-
|
|
1830
|
-
const
|
|
1831
|
-
function
|
|
1832
|
-
return /* @__PURE__ */
|
|
1828
|
+
Te.displayName = "SlotClone";
|
|
1829
|
+
const Qr = ({ children: e }) => /* @__PURE__ */ g(De, null, e);
|
|
1830
|
+
function Jr(e) {
|
|
1831
|
+
return /* @__PURE__ */ U(e) && e.type === Qr;
|
|
1833
1832
|
}
|
|
1834
|
-
function
|
|
1833
|
+
function eo(e, n) {
|
|
1835
1834
|
const t = {
|
|
1836
1835
|
...n
|
|
1837
1836
|
};
|
|
@@ -1852,7 +1851,7 @@ function oo(e, n) {
|
|
|
1852
1851
|
...t
|
|
1853
1852
|
};
|
|
1854
1853
|
}
|
|
1855
|
-
const
|
|
1854
|
+
const to = [
|
|
1856
1855
|
"a",
|
|
1857
1856
|
"button",
|
|
1858
1857
|
"div",
|
|
@@ -1869,12 +1868,12 @@ const ao = [
|
|
|
1869
1868
|
"span",
|
|
1870
1869
|
"svg",
|
|
1871
1870
|
"ul"
|
|
1872
|
-
],
|
|
1871
|
+
], no = to.reduce((e, n) => {
|
|
1873
1872
|
const t = /* @__PURE__ */ S((o, a) => {
|
|
1874
|
-
const { asChild: r, ...i } = o, c = r ?
|
|
1873
|
+
const { asChild: r, ...i } = o, c = r ? Ct : n;
|
|
1875
1874
|
return A(() => {
|
|
1876
1875
|
window[Symbol.for("radix-ui")] = !0;
|
|
1877
|
-
}, []), /* @__PURE__ */ g(c,
|
|
1876
|
+
}, []), /* @__PURE__ */ g(c, Y({}, i, {
|
|
1878
1877
|
ref: a
|
|
1879
1878
|
}));
|
|
1880
1879
|
});
|
|
@@ -1882,7 +1881,7 @@ const ao = [
|
|
|
1882
1881
|
...e,
|
|
1883
1882
|
[n]: t
|
|
1884
1883
|
};
|
|
1885
|
-
}, {}),
|
|
1884
|
+
}, {}), ro = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ g(no.span, Y({}, e, {
|
|
1886
1885
|
ref: n,
|
|
1887
1886
|
style: {
|
|
1888
1887
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -1898,16 +1897,16 @@ const ao = [
|
|
|
1898
1897
|
wordWrap: "normal",
|
|
1899
1898
|
...e.style
|
|
1900
1899
|
}
|
|
1901
|
-
}))),
|
|
1900
|
+
}))), oo = ro, ao = ({
|
|
1902
1901
|
asChild: e,
|
|
1903
1902
|
children: n,
|
|
1904
1903
|
className: t = "",
|
|
1905
1904
|
["data-testid"]: o
|
|
1906
|
-
}) => /* @__PURE__ */ _(
|
|
1907
|
-
function
|
|
1905
|
+
}) => /* @__PURE__ */ _(oo, { asChild: e, "data-testid": o, className: t, children: n });
|
|
1906
|
+
function io(e) {
|
|
1908
1907
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1909
1908
|
}
|
|
1910
|
-
var
|
|
1909
|
+
var Ot = { exports: {} };
|
|
1911
1910
|
/*!
|
|
1912
1911
|
Copyright (c) 2018 Jed Watson.
|
|
1913
1912
|
Licensed under the MIT License (MIT), see
|
|
@@ -1942,30 +1941,30 @@ var Pt = { exports: {} };
|
|
|
1942
1941
|
}
|
|
1943
1942
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1944
1943
|
})();
|
|
1945
|
-
})(
|
|
1946
|
-
var
|
|
1947
|
-
const
|
|
1948
|
-
"purpur-modal-content": "_purpur-modal-
|
|
1949
|
-
fadeIn:
|
|
1950
|
-
"purpur-modal-content__overlay": "_purpur-modal-
|
|
1951
|
-
"purpur-modal-content__close-button": "_purpur-modal-content__close-
|
|
1952
|
-
"purpur-modal-content__wrapper": "_purpur-modal-
|
|
1953
|
-
"purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-
|
|
1954
|
-
"purpur-modal-content__image-wrapper": "_purpur-modal-content__image-
|
|
1955
|
-
"purpur-modal-content__header": "_purpur-modal-
|
|
1956
|
-
"purpur-modal-content__title": "_purpur-modal-
|
|
1957
|
-
"purpur-modal-content__description": "_purpur-modal-
|
|
1958
|
-
"purpur-modal-content__body": "_purpur-modal-
|
|
1959
|
-
"purpur-modal-content__body-inner": "_purpur-modal-content__body-
|
|
1960
|
-
"purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-
|
|
1961
|
-
"purpur-modal-content__actions-button": "_purpur-modal-content__actions-
|
|
1962
|
-
"purpur-modal-content__notification": "_purpur-modal-
|
|
1963
|
-
"purpur-modal-content--with-image": "_purpur-modal-content--with-
|
|
1964
|
-
"purpur-modal-content--overflow": "_purpur-modal-content--
|
|
1965
|
-
"purpur-modal-content__actions": "_purpur-modal-
|
|
1966
|
-
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-
|
|
1967
|
-
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-
|
|
1968
|
-
},
|
|
1944
|
+
})(Ot);
|
|
1945
|
+
var co = Ot.exports;
|
|
1946
|
+
const uo = /* @__PURE__ */ io(co), so = "_fadeIn_1ifm3_1", lo = {
|
|
1947
|
+
"purpur-modal-content": "_purpur-modal-content_1ifm3_1",
|
|
1948
|
+
fadeIn: so,
|
|
1949
|
+
"purpur-modal-content__overlay": "_purpur-modal-content__overlay_1ifm3_30",
|
|
1950
|
+
"purpur-modal-content__close-button": "_purpur-modal-content__close-button_1ifm3_37",
|
|
1951
|
+
"purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_1ifm3_48",
|
|
1952
|
+
"purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-inner_1ifm3_58",
|
|
1953
|
+
"purpur-modal-content__image-wrapper": "_purpur-modal-content__image-wrapper_1ifm3_62",
|
|
1954
|
+
"purpur-modal-content__header": "_purpur-modal-content__header_1ifm3_85",
|
|
1955
|
+
"purpur-modal-content__title": "_purpur-modal-content__title_1ifm3_98",
|
|
1956
|
+
"purpur-modal-content__description": "_purpur-modal-content__description_1ifm3_101",
|
|
1957
|
+
"purpur-modal-content__body": "_purpur-modal-content__body_1ifm3_104",
|
|
1958
|
+
"purpur-modal-content__body-inner": "_purpur-modal-content__body-inner_1ifm3_112",
|
|
1959
|
+
"purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-buttons_1ifm3_124",
|
|
1960
|
+
"purpur-modal-content__actions-button": "_purpur-modal-content__actions-button_1ifm3_124",
|
|
1961
|
+
"purpur-modal-content__notification": "_purpur-modal-content__notification_1ifm3_147",
|
|
1962
|
+
"purpur-modal-content--with-image": "_purpur-modal-content--with-image_1ifm3_150",
|
|
1963
|
+
"purpur-modal-content--overflow": "_purpur-modal-content--overflow_1ifm3_150",
|
|
1964
|
+
"purpur-modal-content__actions": "_purpur-modal-content__actions_1ifm3_124",
|
|
1965
|
+
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_1ifm3_181",
|
|
1966
|
+
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_1ifm3_191"
|
|
1967
|
+
}, Ye = (e) => e.showCloseButton === !0, T = uo.bind(lo), O = "purpur-modal-content", po = S(
|
|
1969
1968
|
({
|
|
1970
1969
|
["data-testid"]: e,
|
|
1971
1970
|
actions: n,
|
|
@@ -1982,94 +1981,91 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
|
|
|
1982
1981
|
zIndex: h,
|
|
1983
1982
|
...f
|
|
1984
1983
|
}, E) => {
|
|
1985
|
-
const { closeButtonAllyLabel: u, showCloseButton: v, ...b } = f, [
|
|
1986
|
-
|
|
1987
|
-
{ [`${
|
|
1988
|
-
{ [`${
|
|
1989
|
-
{ [`${
|
|
1984
|
+
const { closeButtonAllyLabel: u, showCloseButton: v, ...b } = f, [C, y] = H(!1), $ = P(null), w = P(null), z = T([
|
|
1985
|
+
O,
|
|
1986
|
+
{ [`${O}--with-image`]: !!c },
|
|
1987
|
+
{ [`${O}--overflow`]: C },
|
|
1988
|
+
{ [`${O}--sticky-footer`]: d },
|
|
1990
1989
|
o
|
|
1991
|
-
]), D = (
|
|
1992
|
-
r &&
|
|
1993
|
-
},
|
|
1994
|
-
if (!$.current || !w.current
|
|
1990
|
+
]), D = (R) => e ? `${e} ${R}` : void 0, x = (R) => {
|
|
1991
|
+
r && R.preventDefault();
|
|
1992
|
+
}, I = Z(() => {
|
|
1993
|
+
if (!$.current || !w.current)
|
|
1995
1994
|
return;
|
|
1996
|
-
const
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
y(Tt < Dt);
|
|
2001
|
-
}, []), Nt = (j) => {
|
|
2002
|
-
r && !v && j.preventDefault();
|
|
1995
|
+
const R = window.getComputedStyle($.current, null), Pt = parseFloat(R.getPropertyValue("height")), Nt = w.current.offsetHeight;
|
|
1996
|
+
y(Pt < Nt);
|
|
1997
|
+
}, []), ae = (R) => {
|
|
1998
|
+
r && !v && R.preventDefault();
|
|
2003
1999
|
};
|
|
2004
|
-
return A(() => (window.addEventListener("resize",
|
|
2005
|
-
window.removeEventListener("resize",
|
|
2006
|
-
}), [
|
|
2007
|
-
|
|
2008
|
-
}, [l,
|
|
2009
|
-
/* @__PURE__ */ _(
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
-
|
|
2000
|
+
return A(() => (window.addEventListener("resize", I), () => {
|
|
2001
|
+
window.removeEventListener("resize", I);
|
|
2002
|
+
}), [I]), A(() => {
|
|
2003
|
+
I();
|
|
2004
|
+
}, [l, I]), /* @__PURE__ */ j(fr, { children: [
|
|
2005
|
+
/* @__PURE__ */ _(vr, { className: T(`${O}__overlay`), style: { zIndex: h } }),
|
|
2006
|
+
/* @__PURE__ */ j(
|
|
2007
|
+
hr,
|
|
2012
2008
|
{
|
|
2013
2009
|
...b,
|
|
2014
|
-
className:
|
|
2010
|
+
className: z,
|
|
2015
2011
|
"data-testid": e,
|
|
2016
2012
|
ref: E,
|
|
2017
2013
|
...!a && { "aria-describedby": void 0 },
|
|
2018
|
-
onPointerDownOutside:
|
|
2019
|
-
onOpenAutoFocus:
|
|
2020
|
-
onEscapeKeyDown:
|
|
2014
|
+
onPointerDownOutside: x,
|
|
2015
|
+
onOpenAutoFocus: I,
|
|
2016
|
+
onEscapeKeyDown: ae,
|
|
2021
2017
|
style: { zIndex: `calc(${h} + 1)` },
|
|
2022
2018
|
children: [
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
|
|
2025
|
-
|
|
2019
|
+
/* @__PURE__ */ j("div", { ref: $, className: T(`${O}__wrapper`), children: [
|
|
2020
|
+
Ye(f) && u && c && /* @__PURE__ */ _(
|
|
2021
|
+
Ze,
|
|
2026
2022
|
{
|
|
2027
2023
|
allyLabel: u,
|
|
2028
2024
|
hasImage: !0,
|
|
2029
2025
|
"data-testid": D("close-button")
|
|
2030
2026
|
}
|
|
2031
2027
|
),
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
|
|
2035
|
-
|
|
2028
|
+
/* @__PURE__ */ j("div", { ref: w, className: T(`${O}__wrapper-inner`), children: [
|
|
2029
|
+
/* @__PURE__ */ j("div", { className: T(`${O}__header`), children: [
|
|
2030
|
+
Ye(f) && u && !c && /* @__PURE__ */ _(
|
|
2031
|
+
Ze,
|
|
2036
2032
|
{
|
|
2037
2033
|
allyLabel: u,
|
|
2038
2034
|
"data-testid": D("close-button")
|
|
2039
2035
|
}
|
|
2040
2036
|
),
|
|
2041
2037
|
/* @__PURE__ */ _(
|
|
2042
|
-
|
|
2038
|
+
mr,
|
|
2043
2039
|
{
|
|
2044
2040
|
asChild: !0,
|
|
2045
|
-
className: T(`${
|
|
2041
|
+
className: T(`${O}__title`),
|
|
2046
2042
|
"data-testid": D("title"),
|
|
2047
|
-
children: /* @__PURE__ */ _(
|
|
2043
|
+
children: /* @__PURE__ */ _(yt, { tag: "h2", variant: "title-200", children: p })
|
|
2048
2044
|
}
|
|
2049
2045
|
)
|
|
2050
2046
|
] }),
|
|
2051
2047
|
c && /* @__PURE__ */ _(
|
|
2052
2048
|
"div",
|
|
2053
2049
|
{
|
|
2054
|
-
className: T(`${
|
|
2050
|
+
className: T(`${O}__image-wrapper`),
|
|
2055
2051
|
"data-testid": D("image"),
|
|
2056
2052
|
children: c
|
|
2057
2053
|
}
|
|
2058
2054
|
),
|
|
2059
|
-
/* @__PURE__ */ _("div", {
|
|
2060
|
-
a && i && /* @__PURE__ */ _(
|
|
2055
|
+
/* @__PURE__ */ _("div", { className: T(`${O}__body`), children: /* @__PURE__ */ j("div", { className: T(`${O}__body-inner`), children: [
|
|
2056
|
+
a && i && /* @__PURE__ */ _(ao, { asChild: !0, children: /* @__PURE__ */ _(Ge, { "data-testid": D("description"), children: a }) }),
|
|
2061
2057
|
a && !i && /* @__PURE__ */ _(
|
|
2062
|
-
|
|
2058
|
+
Ge,
|
|
2063
2059
|
{
|
|
2064
2060
|
asChild: !0,
|
|
2065
|
-
className: T(`${
|
|
2061
|
+
className: T(`${O}__description`),
|
|
2066
2062
|
"data-testid": D("description"),
|
|
2067
|
-
children: /* @__PURE__ */ _(
|
|
2063
|
+
children: /* @__PURE__ */ _(St, { variant: "paragraph-100", children: a })
|
|
2068
2064
|
}
|
|
2069
2065
|
),
|
|
2070
2066
|
/* @__PURE__ */ _("div", { children: t }),
|
|
2071
2067
|
!d && /* @__PURE__ */ _(
|
|
2072
|
-
|
|
2068
|
+
Qe,
|
|
2073
2069
|
{
|
|
2074
2070
|
actions: n,
|
|
2075
2071
|
primaryActionVariant: s,
|
|
@@ -2080,7 +2076,7 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
|
|
|
2080
2076
|
] })
|
|
2081
2077
|
] }),
|
|
2082
2078
|
d && /* @__PURE__ */ _(
|
|
2083
|
-
|
|
2079
|
+
Qe,
|
|
2084
2080
|
{
|
|
2085
2081
|
actions: n,
|
|
2086
2082
|
primaryActionVariant: s,
|
|
@@ -2092,49 +2088,51 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
|
|
|
2092
2088
|
)
|
|
2093
2089
|
] });
|
|
2094
2090
|
}
|
|
2095
|
-
),
|
|
2091
|
+
), Ze = ({
|
|
2096
2092
|
allyLabel: e,
|
|
2097
2093
|
hasImage: n,
|
|
2098
2094
|
["data-testid"]: t
|
|
2099
|
-
}) => /* @__PURE__ */ _(
|
|
2100
|
-
|
|
2095
|
+
}) => /* @__PURE__ */ _(gr, { asChild: !0, children: /* @__PURE__ */ _(
|
|
2096
|
+
Re,
|
|
2101
2097
|
{
|
|
2102
2098
|
variant: n ? "primary" : "tertiary-purple",
|
|
2103
2099
|
negative: n,
|
|
2104
2100
|
size: "sm",
|
|
2105
2101
|
iconOnly: !0,
|
|
2106
2102
|
"aria-label": e,
|
|
2107
|
-
className: T(`${
|
|
2103
|
+
className: T(`${O}__close-button`),
|
|
2108
2104
|
"data-testid": t,
|
|
2109
|
-
children: /* @__PURE__ */ _(
|
|
2105
|
+
children: /* @__PURE__ */ _(xt, {})
|
|
2110
2106
|
}
|
|
2111
|
-
) }),
|
|
2107
|
+
) }), fo = 3, Qe = ({
|
|
2112
2108
|
actions: e,
|
|
2113
2109
|
primaryActionVariant: n,
|
|
2114
2110
|
notification: t
|
|
2115
2111
|
}) => {
|
|
2116
|
-
const o =
|
|
2112
|
+
const o = P(null), a = [n, "secondary", "text"];
|
|
2117
2113
|
return A(() => {
|
|
2118
2114
|
var r, i;
|
|
2119
2115
|
t && ((i = (r = o == null ? void 0 : o.current) == null ? void 0 : r.scrollIntoView) == null || i.call(r, !1));
|
|
2120
|
-
}, [t]), e && e.length > 0 ? /* @__PURE__ */
|
|
2121
|
-
/* @__PURE__ */ _("div", { className: T(`${
|
|
2122
|
-
|
|
2116
|
+
}, [t]), e && e.length > 0 ? /* @__PURE__ */ j("div", { className: T(`${O}__actions`), children: [
|
|
2117
|
+
/* @__PURE__ */ _("div", { className: T(`${O}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, fo).map(({ label: r, onClick: i, disabled: c, loading: s }, d) => /* @__PURE__ */ _(
|
|
2118
|
+
Re,
|
|
2123
2119
|
{
|
|
2124
2120
|
"data-testid": "modal actions button",
|
|
2125
|
-
variant: a[
|
|
2121
|
+
variant: a[d] || "",
|
|
2126
2122
|
onClick: i,
|
|
2127
|
-
|
|
2123
|
+
disabled: c,
|
|
2124
|
+
loading: s,
|
|
2125
|
+
className: T(`${O}__actions-button`),
|
|
2128
2126
|
children: r
|
|
2129
2127
|
},
|
|
2130
2128
|
r
|
|
2131
2129
|
)) }),
|
|
2132
|
-
t && /* @__PURE__ */ _("div", { className: T(`${
|
|
2133
|
-
/* @__PURE__ */ _("span", { className: T(`${
|
|
2130
|
+
t && /* @__PURE__ */ _("div", { className: T(`${O}__notification`), ref: o, children: t }),
|
|
2131
|
+
/* @__PURE__ */ _("span", { className: T(`${O}__actions-separator`) })
|
|
2134
2132
|
] }) : null;
|
|
2135
|
-
},
|
|
2133
|
+
}, vo = S(
|
|
2136
2134
|
({ ["data-testid"]: e, children: n, className: t, ...o }, a) => /* @__PURE__ */ _(
|
|
2137
|
-
|
|
2135
|
+
pr,
|
|
2138
2136
|
{
|
|
2139
2137
|
asChild: !0,
|
|
2140
2138
|
ref: a,
|
|
@@ -2144,16 +2142,16 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
|
|
|
2144
2142
|
children: n
|
|
2145
2143
|
}
|
|
2146
2144
|
)
|
|
2147
|
-
),
|
|
2145
|
+
), Me = ({
|
|
2148
2146
|
["data-testid"]: e,
|
|
2149
2147
|
children: n,
|
|
2150
2148
|
open: t,
|
|
2151
2149
|
onOpenChange: o
|
|
2152
|
-
}) => /* @__PURE__ */ _(
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2150
|
+
}) => /* @__PURE__ */ _(dr, { open: t, onOpenChange: o, "data-testid": e, children: n });
|
|
2151
|
+
Me.Trigger = vo;
|
|
2152
|
+
Me.Content = po;
|
|
2153
|
+
Me.displayName = "Modal";
|
|
2156
2154
|
export {
|
|
2157
|
-
|
|
2155
|
+
Me as Modal
|
|
2158
2156
|
};
|
|
2159
2157
|
//# sourceMappingURL=modal.es.js.map
|