@purpurds/modal 6.7.1 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +5 -5
- package/dist/modal-content.d.ts.map +1 -1
- package/dist/modal.cjs.js +18 -18
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.es.js +546 -541
- 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 +0 -1
- package/src/modal-content.tsx +9 -0
- package/src/modal.stories.tsx +1 -1
package/dist/modal.es.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as p, Fragment as
|
|
1
|
+
import { jsx as p, Fragment as ie, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { useState as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
3
|
+
import { useState as be, forwardRef as Oe, useRef as we, useCallback as er, useEffect as Ee } from "react";
|
|
4
|
+
import * as tr from "react-dom";
|
|
5
|
+
import rr from "react-dom";
|
|
6
6
|
function I(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
8
|
if (e == null || e(a), r === !1 || !a.defaultPrevented)
|
|
9
9
|
return t == null ? void 0 : t(a);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Ie(e, t) {
|
|
13
13
|
if (typeof e == "function")
|
|
14
14
|
return e(t);
|
|
15
15
|
e != null && (e.current = t);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function pt(...e) {
|
|
18
18
|
return (t) => {
|
|
19
19
|
let r = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
21
|
-
const n =
|
|
21
|
+
const n = Ie(a, t);
|
|
22
22
|
return !r && typeof n == "function" && (r = !0), n;
|
|
23
23
|
});
|
|
24
24
|
if (r)
|
|
25
25
|
return () => {
|
|
26
26
|
for (let a = 0; a < o.length; a++) {
|
|
27
27
|
const n = o[a];
|
|
28
|
-
typeof n == "function" ? n() :
|
|
28
|
+
typeof n == "function" ? n() : Ie(e[a], null);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function B(...e) {
|
|
34
|
-
return s.useCallback(
|
|
34
|
+
return s.useCallback(pt(...e), e);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function nr(e, t) {
|
|
37
37
|
const r = s.createContext(t), o = (n) => {
|
|
38
38
|
const { children: i, ...u } = n, d = s.useMemo(() => u, Object.values(u));
|
|
39
39
|
return /* @__PURE__ */ p(r.Provider, { value: d, children: i });
|
|
@@ -47,21 +47,21 @@ function tr(e, t) {
|
|
|
47
47
|
}
|
|
48
48
|
return [o, a];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function or(e, t = []) {
|
|
51
51
|
let r = [];
|
|
52
52
|
function o(n, i) {
|
|
53
53
|
const u = s.createContext(i), d = r.length;
|
|
54
54
|
r = [...r, i];
|
|
55
55
|
const c = (v) => {
|
|
56
56
|
var _;
|
|
57
|
-
const { scope: h, children: g, ...
|
|
57
|
+
const { scope: h, children: g, ...b } = v, l = ((_ = h == null ? void 0 : h[e]) == null ? void 0 : _[d]) || u, m = s.useMemo(() => b, Object.values(b));
|
|
58
58
|
return /* @__PURE__ */ p(l.Provider, { value: m, children: g });
|
|
59
59
|
};
|
|
60
60
|
c.displayName = n + "Provider";
|
|
61
61
|
function f(v, h) {
|
|
62
62
|
var l;
|
|
63
|
-
const g = ((l = h == null ? void 0 : h[e]) == null ? void 0 : l[d]) || u,
|
|
64
|
-
if (
|
|
63
|
+
const g = ((l = h == null ? void 0 : h[e]) == null ? void 0 : l[d]) || u, b = s.useContext(g);
|
|
64
|
+
if (b) return b;
|
|
65
65
|
if (i !== void 0) return i;
|
|
66
66
|
throw new Error(`\`${v}\` must be used within \`${n}\``);
|
|
67
67
|
}
|
|
@@ -77,9 +77,9 @@ function rr(e, t = []) {
|
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
return a.scopeName = e, [o,
|
|
80
|
+
return a.scopeName = e, [o, ar(a, ...t)];
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function ar(...e) {
|
|
83
83
|
const t = e[0];
|
|
84
84
|
if (e.length === 1) return t;
|
|
85
85
|
const r = () => {
|
|
@@ -97,13 +97,13 @@ function nr(...e) {
|
|
|
97
97
|
};
|
|
98
98
|
return r.scopeName = t.scopeName, r;
|
|
99
99
|
}
|
|
100
|
-
var
|
|
101
|
-
},
|
|
102
|
-
}),
|
|
103
|
-
function
|
|
104
|
-
const [t, r] = s.useState(
|
|
105
|
-
return
|
|
106
|
-
r((o) => o ?? String(
|
|
100
|
+
var ue = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
|
|
101
|
+
}, ir = s.useId || (() => {
|
|
102
|
+
}), ur = 0;
|
|
103
|
+
function de(e) {
|
|
104
|
+
const [t, r] = s.useState(ir());
|
|
105
|
+
return ue(() => {
|
|
106
|
+
r((o) => o ?? String(ur++));
|
|
107
107
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
108
108
|
}
|
|
109
109
|
function W(e) {
|
|
@@ -115,13 +115,13 @@ function W(e) {
|
|
|
115
115
|
return (o = t.current) == null ? void 0 : o.call(t, ...r);
|
|
116
116
|
}, []);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function sr({
|
|
119
119
|
prop: e,
|
|
120
120
|
defaultProp: t,
|
|
121
121
|
onChange: r = () => {
|
|
122
122
|
}
|
|
123
123
|
}) {
|
|
124
|
-
const [o, a] =
|
|
124
|
+
const [o, a] = cr({ defaultProp: t, onChange: r }), n = e !== void 0, i = n ? e : o, u = W(r), d = s.useCallback(
|
|
125
125
|
(c) => {
|
|
126
126
|
if (n) {
|
|
127
127
|
const v = typeof c == "function" ? c(e) : c;
|
|
@@ -133,7 +133,7 @@ function ir({
|
|
|
133
133
|
);
|
|
134
134
|
return [i, d];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function cr({
|
|
137
137
|
defaultProp: e,
|
|
138
138
|
onChange: t
|
|
139
139
|
}) {
|
|
@@ -142,29 +142,29 @@ function ur({
|
|
|
142
142
|
a.current !== o && (n(o), a.current = o);
|
|
143
143
|
}, [o, a, n]), r;
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(
|
|
145
|
+
var xe = s.forwardRef((e, t) => {
|
|
146
|
+
const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(dr);
|
|
147
147
|
if (n) {
|
|
148
148
|
const i = n.props.children, u = a.map((d) => d === n ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : d);
|
|
149
|
-
return /* @__PURE__ */ p(
|
|
149
|
+
return /* @__PURE__ */ p(Ce, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
|
|
150
150
|
}
|
|
151
|
-
return /* @__PURE__ */ p(
|
|
151
|
+
return /* @__PURE__ */ p(Ce, { ...o, ref: t, children: r });
|
|
152
152
|
});
|
|
153
|
-
|
|
154
|
-
var
|
|
153
|
+
xe.displayName = "Slot";
|
|
154
|
+
var Ce = s.forwardRef((e, t) => {
|
|
155
155
|
const { children: r, ...o } = e;
|
|
156
156
|
if (s.isValidElement(r)) {
|
|
157
|
-
const a =
|
|
158
|
-
return r.type !== s.Fragment && (n.ref = t ?
|
|
157
|
+
const a = fr(r), n = pr(o, r.props);
|
|
158
|
+
return r.type !== s.Fragment && (n.ref = t ? pt(t, a) : a), s.cloneElement(r, n);
|
|
159
159
|
}
|
|
160
160
|
return s.Children.count(r) > 1 ? s.Children.only(null) : null;
|
|
161
161
|
});
|
|
162
|
-
|
|
163
|
-
var
|
|
164
|
-
function
|
|
165
|
-
return s.isValidElement(e) && e.type ===
|
|
162
|
+
Ce.displayName = "SlotClone";
|
|
163
|
+
var lr = ({ children: e }) => /* @__PURE__ */ p(ie, { children: e });
|
|
164
|
+
function dr(e) {
|
|
165
|
+
return s.isValidElement(e) && e.type === lr;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function pr(e, t) {
|
|
168
168
|
const r = { ...t };
|
|
169
169
|
for (const o in t) {
|
|
170
170
|
const a = e[o], n = t[o];
|
|
@@ -174,12 +174,12 @@ function lr(e, t) {
|
|
|
174
174
|
}
|
|
175
175
|
return { ...e, ...r };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function fr(e) {
|
|
178
178
|
var o, a;
|
|
179
179
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
180
180
|
return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
181
181
|
}
|
|
182
|
-
var
|
|
182
|
+
var vr = [
|
|
183
183
|
"a",
|
|
184
184
|
"button",
|
|
185
185
|
"div",
|
|
@@ -196,17 +196,17 @@ var pr = [
|
|
|
196
196
|
"span",
|
|
197
197
|
"svg",
|
|
198
198
|
"ul"
|
|
199
|
-
], M =
|
|
199
|
+
], M = vr.reduce((e, t) => {
|
|
200
200
|
const r = s.forwardRef((o, a) => {
|
|
201
|
-
const { asChild: n, ...i } = o, u = n ?
|
|
201
|
+
const { asChild: n, ...i } = o, u = n ? xe : t;
|
|
202
202
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(u, { ...i, ref: a });
|
|
203
203
|
});
|
|
204
204
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
205
205
|
}, {});
|
|
206
|
-
function
|
|
207
|
-
e &&
|
|
206
|
+
function hr(e, t) {
|
|
207
|
+
e && tr.flushSync(() => e.dispatchEvent(t));
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function mr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
210
210
|
const r = W(e);
|
|
211
211
|
s.useEffect(() => {
|
|
212
212
|
const o = (a) => {
|
|
@@ -215,11 +215,11 @@ function vr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
215
215
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
216
216
|
}, [r, t]);
|
|
217
217
|
}
|
|
218
|
-
var
|
|
218
|
+
var gr = "DismissableLayer", Se = "dismissableLayer.update", _r = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", Le, ft = s.createContext({
|
|
219
219
|
layers: /* @__PURE__ */ new Set(),
|
|
220
220
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
221
221
|
branches: /* @__PURE__ */ new Set()
|
|
222
|
-
}),
|
|
222
|
+
}), vt = s.forwardRef(
|
|
223
223
|
(e, t) => {
|
|
224
224
|
const {
|
|
225
225
|
disableOutsidePointerEvents: r = !1,
|
|
@@ -229,30 +229,30 @@ var hr = "DismissableLayer", Ee = "dismissableLayer.update", mr = "dismissableLa
|
|
|
229
229
|
onInteractOutside: i,
|
|
230
230
|
onDismiss: u,
|
|
231
231
|
...d
|
|
232
|
-
} = e, c = s.useContext(
|
|
233
|
-
const
|
|
234
|
-
!E || L || (a == null || a(
|
|
235
|
-
}, h), x =
|
|
236
|
-
const
|
|
237
|
-
[...c.branches].some((D) => D.contains(
|
|
232
|
+
} = e, c = s.useContext(ft), [f, v] = s.useState(null), h = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = s.useState({}), b = B(t, (y) => v(y)), l = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = l.indexOf(m), S = f ? l.indexOf(f) : -1, w = c.layersWithOutsidePointerEventsDisabled.size > 0, E = S >= _, C = Er((y) => {
|
|
233
|
+
const O = y.target, L = [...c.branches].some((D) => D.contains(O));
|
|
234
|
+
!E || L || (a == null || a(y), i == null || i(y), y.defaultPrevented || u == null || u());
|
|
235
|
+
}, h), x = Cr((y) => {
|
|
236
|
+
const O = y.target;
|
|
237
|
+
[...c.branches].some((D) => D.contains(O)) || (n == null || n(y), i == null || i(y), y.defaultPrevented || u == null || u());
|
|
238
238
|
}, h);
|
|
239
|
-
return
|
|
240
|
-
S === c.layers.size - 1 && (o == null || o(
|
|
239
|
+
return mr((y) => {
|
|
240
|
+
S === c.layers.size - 1 && (o == null || o(y), !y.defaultPrevented && u && (y.preventDefault(), u()));
|
|
241
241
|
}, h), s.useEffect(() => {
|
|
242
242
|
if (f)
|
|
243
|
-
return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
244
|
-
r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents =
|
|
243
|
+
return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Le = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), ke(), () => {
|
|
244
|
+
r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Le);
|
|
245
245
|
};
|
|
246
246
|
}, [f, h, r, c]), s.useEffect(() => () => {
|
|
247
|
-
f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f),
|
|
247
|
+
f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), ke());
|
|
248
248
|
}, [f, c]), s.useEffect(() => {
|
|
249
|
-
const
|
|
250
|
-
return document.addEventListener(
|
|
249
|
+
const y = () => g({});
|
|
250
|
+
return document.addEventListener(Se, y), () => document.removeEventListener(Se, y);
|
|
251
251
|
}, []), /* @__PURE__ */ p(
|
|
252
252
|
M.div,
|
|
253
253
|
{
|
|
254
254
|
...d,
|
|
255
|
-
ref:
|
|
255
|
+
ref: b,
|
|
256
256
|
style: {
|
|
257
257
|
pointerEvents: w ? E ? "auto" : "none" : void 0,
|
|
258
258
|
...e.style
|
|
@@ -267,9 +267,9 @@ var hr = "DismissableLayer", Ee = "dismissableLayer.update", mr = "dismissableLa
|
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
|
-
|
|
271
|
-
var
|
|
272
|
-
const r = s.useContext(
|
|
270
|
+
vt.displayName = gr;
|
|
271
|
+
var br = "DismissableLayerBranch", wr = s.forwardRef((e, t) => {
|
|
272
|
+
const r = s.useContext(ft), o = s.useRef(null), a = B(t, o);
|
|
273
273
|
return s.useEffect(() => {
|
|
274
274
|
const n = o.current;
|
|
275
275
|
if (n)
|
|
@@ -278,16 +278,16 @@ var _r = "DismissableLayerBranch", yr = s.forwardRef((e, t) => {
|
|
|
278
278
|
};
|
|
279
279
|
}, [r.branches]), /* @__PURE__ */ p(M.div, { ...e, ref: a });
|
|
280
280
|
});
|
|
281
|
-
|
|
282
|
-
function
|
|
281
|
+
wr.displayName = br;
|
|
282
|
+
function Er(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
283
283
|
const r = W(e), o = s.useRef(!1), a = s.useRef(() => {
|
|
284
284
|
});
|
|
285
285
|
return s.useEffect(() => {
|
|
286
286
|
const n = (u) => {
|
|
287
287
|
if (u.target && !o.current) {
|
|
288
288
|
let d = function() {
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
ht(
|
|
290
|
+
_r,
|
|
291
291
|
r,
|
|
292
292
|
c,
|
|
293
293
|
{ discrete: !0 }
|
|
@@ -309,11 +309,11 @@ function br(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
309
309
|
onPointerDownCapture: () => o.current = !0
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Cr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
313
313
|
const r = W(e), o = s.useRef(!1);
|
|
314
314
|
return s.useEffect(() => {
|
|
315
315
|
const a = (n) => {
|
|
316
|
-
n.target && !o.current &&
|
|
316
|
+
n.target && !o.current && ht(yr, r, { originalEvent: n }, {
|
|
317
317
|
discrete: !1
|
|
318
318
|
});
|
|
319
319
|
};
|
|
@@ -323,15 +323,15 @@ function wr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
323
323
|
onBlurCapture: () => o.current = !1
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
const e = new CustomEvent(
|
|
326
|
+
function ke() {
|
|
327
|
+
const e = new CustomEvent(Se);
|
|
328
328
|
document.dispatchEvent(e);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function ht(e, t, r, { discrete: o }) {
|
|
331
331
|
const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
|
|
332
|
-
t && a.addEventListener(e, t, { once: !0 }), o ?
|
|
332
|
+
t && a.addEventListener(e, t, { once: !0 }), o ? hr(a, n) : a.dispatchEvent(n);
|
|
333
333
|
}
|
|
334
|
-
var
|
|
334
|
+
var pe = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", Fe = { bubbles: !1, cancelable: !0 }, Sr = "FocusScope", mt = s.forwardRef((e, t) => {
|
|
335
335
|
const {
|
|
336
336
|
loop: r = !1,
|
|
337
337
|
trapped: o = !1,
|
|
@@ -370,44 +370,44 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Le
|
|
|
370
370
|
}
|
|
371
371
|
}, [o, u, g.paused]), s.useEffect(() => {
|
|
372
372
|
if (u) {
|
|
373
|
-
|
|
373
|
+
je.add(g);
|
|
374
374
|
const l = document.activeElement;
|
|
375
375
|
if (!u.contains(l)) {
|
|
376
|
-
const _ = new CustomEvent(
|
|
377
|
-
u.addEventListener(
|
|
376
|
+
const _ = new CustomEvent(pe, Fe);
|
|
377
|
+
u.addEventListener(pe, c), u.dispatchEvent(_), _.defaultPrevented || (Nr(Ar(gt(u)), { select: !0 }), document.activeElement === l && $(u));
|
|
378
378
|
}
|
|
379
379
|
return () => {
|
|
380
|
-
u.removeEventListener(
|
|
381
|
-
const _ = new CustomEvent(
|
|
382
|
-
u.addEventListener(
|
|
380
|
+
u.removeEventListener(pe, c), setTimeout(() => {
|
|
381
|
+
const _ = new CustomEvent(fe, Fe);
|
|
382
|
+
u.addEventListener(fe, f), u.dispatchEvent(_), _.defaultPrevented || $(l ?? document.body, { select: !0 }), u.removeEventListener(fe, f), je.remove(g);
|
|
383
383
|
}, 0);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
}, [u, c, f, g]);
|
|
387
|
-
const
|
|
387
|
+
const b = s.useCallback(
|
|
388
388
|
(l) => {
|
|
389
389
|
if (!r && !o || g.paused) return;
|
|
390
390
|
const m = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, _ = document.activeElement;
|
|
391
391
|
if (m && _) {
|
|
392
|
-
const S = l.currentTarget, [w, E] =
|
|
392
|
+
const S = l.currentTarget, [w, E] = Pr(S);
|
|
393
393
|
w && E ? !l.shiftKey && _ === E ? (l.preventDefault(), r && $(w, { select: !0 })) : l.shiftKey && _ === w && (l.preventDefault(), r && $(E, { select: !0 })) : _ === S && l.preventDefault();
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
[r, o, g.paused]
|
|
397
397
|
);
|
|
398
|
-
return /* @__PURE__ */ p(M.div, { tabIndex: -1, ...i, ref: h, onKeyDown:
|
|
398
|
+
return /* @__PURE__ */ p(M.div, { tabIndex: -1, ...i, ref: h, onKeyDown: b });
|
|
399
399
|
});
|
|
400
|
-
|
|
401
|
-
function
|
|
400
|
+
mt.displayName = Sr;
|
|
401
|
+
function Nr(e, { select: t = !1 } = {}) {
|
|
402
402
|
const r = document.activeElement;
|
|
403
403
|
for (const o of e)
|
|
404
404
|
if ($(o, { select: t }), document.activeElement !== r) return;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
const t =
|
|
406
|
+
function Pr(e) {
|
|
407
|
+
const t = gt(e), r = We(t, e), o = We(t.reverse(), e);
|
|
408
408
|
return [r, o];
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function gt(e) {
|
|
411
411
|
const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
412
412
|
acceptNode: (o) => {
|
|
413
413
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -417,11 +417,11 @@ function mt(e) {
|
|
|
417
417
|
for (; r.nextNode(); ) t.push(r.currentNode);
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function We(e, t) {
|
|
421
421
|
for (const r of e)
|
|
422
|
-
if (!
|
|
422
|
+
if (!Or(r, { upTo: t })) return r;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Or(e, { upTo: t }) {
|
|
425
425
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
426
426
|
for (; e; ) {
|
|
427
427
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -430,54 +430,54 @@ function Nr(e, { upTo: t }) {
|
|
|
430
430
|
}
|
|
431
431
|
return !1;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function xr(e) {
|
|
434
434
|
return e instanceof HTMLInputElement && "select" in e;
|
|
435
435
|
}
|
|
436
436
|
function $(e, { select: t = !1 } = {}) {
|
|
437
437
|
if (e && e.focus) {
|
|
438
438
|
const r = document.activeElement;
|
|
439
|
-
e.focus({ preventScroll: !0 }), e !== r &&
|
|
439
|
+
e.focus({ preventScroll: !0 }), e !== r && xr(e) && t && e.select();
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
var
|
|
443
|
-
function
|
|
442
|
+
var je = Rr();
|
|
443
|
+
function Rr() {
|
|
444
444
|
let e = [];
|
|
445
445
|
return {
|
|
446
446
|
add(t) {
|
|
447
447
|
const r = e[0];
|
|
448
|
-
t !== r && (r == null || r.pause()), e =
|
|
448
|
+
t !== r && (r == null || r.pause()), e = Be(e, t), e.unshift(t);
|
|
449
449
|
},
|
|
450
450
|
remove(t) {
|
|
451
451
|
var r;
|
|
452
|
-
e =
|
|
452
|
+
e = Be(e, t), (r = e[0]) == null || r.resume();
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Be(e, t) {
|
|
457
457
|
const r = [...e], o = r.indexOf(t);
|
|
458
458
|
return o !== -1 && r.splice(o, 1), r;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Ar(e) {
|
|
461
461
|
return e.filter((t) => t.tagName !== "A");
|
|
462
462
|
}
|
|
463
|
-
var
|
|
463
|
+
var Dr = "Portal", _t = s.forwardRef((e, t) => {
|
|
464
464
|
var u;
|
|
465
465
|
const { container: r, ...o } = e, [a, n] = s.useState(!1);
|
|
466
|
-
|
|
466
|
+
ue(() => n(!0), []);
|
|
467
467
|
const i = r || a && ((u = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : u.body);
|
|
468
|
-
return i ?
|
|
468
|
+
return i ? rr.createPortal(/* @__PURE__ */ p(M.div, { ...o, ref: t }), i) : null;
|
|
469
469
|
});
|
|
470
|
-
|
|
471
|
-
function
|
|
470
|
+
_t.displayName = Dr;
|
|
471
|
+
function Tr(e, t) {
|
|
472
472
|
return s.useReducer((r, o) => t[r][o] ?? r, e);
|
|
473
473
|
}
|
|
474
|
-
var
|
|
475
|
-
const { present: t, children: r } = e, o =
|
|
474
|
+
var ce = (e) => {
|
|
475
|
+
const { present: t, children: r } = e, o = Mr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = B(o.ref, $r(a));
|
|
476
476
|
return typeof r == "function" || o.isPresent ? s.cloneElement(a, { ref: n }) : null;
|
|
477
477
|
};
|
|
478
|
-
|
|
479
|
-
function
|
|
480
|
-
const [t, r] = s.useState(), o = s.useRef({}), a = s.useRef(e), n = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, d] =
|
|
478
|
+
ce.displayName = "Presence";
|
|
479
|
+
function Mr(e) {
|
|
480
|
+
const [t, r] = s.useState(), o = s.useRef({}), a = s.useRef(e), n = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, d] = Tr(i, {
|
|
481
481
|
mounted: {
|
|
482
482
|
UNMOUNT: "unmounted",
|
|
483
483
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -491,19 +491,19 @@ function Dr(e) {
|
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
493
|
return s.useEffect(() => {
|
|
494
|
-
const c =
|
|
494
|
+
const c = Z(o.current);
|
|
495
495
|
n.current = u === "mounted" ? c : "none";
|
|
496
|
-
}, [u]),
|
|
496
|
+
}, [u]), ue(() => {
|
|
497
497
|
const c = o.current, f = a.current;
|
|
498
498
|
if (f !== e) {
|
|
499
|
-
const h = n.current, g =
|
|
499
|
+
const h = n.current, g = Z(c);
|
|
500
500
|
e ? d("MOUNT") : g === "none" || (c == null ? void 0 : c.display) === "none" ? d("UNMOUNT") : d(f && h !== g ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
501
501
|
}
|
|
502
|
-
}, [e, d]),
|
|
502
|
+
}, [e, d]), ue(() => {
|
|
503
503
|
if (t) {
|
|
504
504
|
let c;
|
|
505
505
|
const f = t.ownerDocument.defaultView ?? window, v = (g) => {
|
|
506
|
-
const l =
|
|
506
|
+
const l = Z(o.current).includes(g.animationName);
|
|
507
507
|
if (g.target === t && l && (d("ANIMATION_END"), !a.current)) {
|
|
508
508
|
const m = t.style.animationFillMode;
|
|
509
509
|
t.style.animationFillMode = "forwards", c = f.setTimeout(() => {
|
|
@@ -511,7 +511,7 @@ function Dr(e) {
|
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
}, h = (g) => {
|
|
514
|
-
g.target === t && (n.current =
|
|
514
|
+
g.target === t && (n.current = Z(o.current));
|
|
515
515
|
};
|
|
516
516
|
return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
|
|
517
517
|
f.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
|
|
@@ -525,24 +525,24 @@ function Dr(e) {
|
|
|
525
525
|
}, [])
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Z(e) {
|
|
529
529
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function $r(e) {
|
|
532
532
|
var o, a;
|
|
533
533
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
534
534
|
return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
535
535
|
}
|
|
536
|
-
var
|
|
537
|
-
function
|
|
536
|
+
var ve = 0;
|
|
537
|
+
function Ir() {
|
|
538
538
|
s.useEffect(() => {
|
|
539
539
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
540
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
541
|
-
|
|
540
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? qe()), document.body.insertAdjacentElement("beforeend", e[1] ?? qe()), ve++, () => {
|
|
541
|
+
ve === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ve--;
|
|
542
542
|
};
|
|
543
543
|
}, []);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function qe() {
|
|
546
546
|
const e = document.createElement("span");
|
|
547
547
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
548
548
|
}
|
|
@@ -555,7 +555,7 @@ var T = function() {
|
|
|
555
555
|
return t;
|
|
556
556
|
}, T.apply(this, arguments);
|
|
557
557
|
};
|
|
558
|
-
function
|
|
558
|
+
function yt(e, t) {
|
|
559
559
|
var r = {};
|
|
560
560
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
|
|
561
561
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -563,17 +563,17 @@ function _t(e, t) {
|
|
|
563
563
|
t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (r[o[a]] = e[o[a]]);
|
|
564
564
|
return r;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Lr(e, t, r) {
|
|
567
567
|
if (r || arguments.length === 2) for (var o = 0, a = t.length, n; o < a; o++)
|
|
568
568
|
(n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
|
|
569
569
|
return e.concat(n || Array.prototype.slice.call(t));
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
function
|
|
571
|
+
var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", kr = "with-scroll-bars-hidden", Fr = "--removed-body-scroll-bar-size";
|
|
572
|
+
function he(e, t) {
|
|
573
573
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
var r =
|
|
575
|
+
function Wr(e, t) {
|
|
576
|
+
var r = be(function() {
|
|
577
577
|
return {
|
|
578
578
|
// value
|
|
579
579
|
value: e,
|
|
@@ -593,31 +593,31 @@ function kr(e, t) {
|
|
|
593
593
|
})[0];
|
|
594
594
|
return r.callback = t, r.facade;
|
|
595
595
|
}
|
|
596
|
-
var
|
|
597
|
-
function
|
|
598
|
-
var r =
|
|
596
|
+
var jr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, Ue = /* @__PURE__ */ new WeakMap();
|
|
597
|
+
function Br(e, t) {
|
|
598
|
+
var r = Wr(null, function(o) {
|
|
599
599
|
return e.forEach(function(a) {
|
|
600
|
-
return
|
|
600
|
+
return he(a, o);
|
|
601
601
|
});
|
|
602
602
|
});
|
|
603
|
-
return
|
|
604
|
-
var o =
|
|
603
|
+
return jr(function() {
|
|
604
|
+
var o = Ue.get(r);
|
|
605
605
|
if (o) {
|
|
606
606
|
var a = new Set(o), n = new Set(e), i = r.current;
|
|
607
607
|
a.forEach(function(u) {
|
|
608
|
-
n.has(u) ||
|
|
608
|
+
n.has(u) || he(u, null);
|
|
609
609
|
}), n.forEach(function(u) {
|
|
610
|
-
a.has(u) ||
|
|
610
|
+
a.has(u) || he(u, i);
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
|
|
613
|
+
Ue.set(r, e);
|
|
614
614
|
}, [e]), r;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function qr(e) {
|
|
617
617
|
return e;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
t === void 0 && (t =
|
|
619
|
+
function Ur(e, t) {
|
|
620
|
+
t === void 0 && (t = qr);
|
|
621
621
|
var r = [], o = !1, a = {
|
|
622
622
|
read: function() {
|
|
623
623
|
if (o)
|
|
@@ -671,13 +671,13 @@ function Br(e, t) {
|
|
|
671
671
|
};
|
|
672
672
|
return a;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Vr(e) {
|
|
675
675
|
e === void 0 && (e = {});
|
|
676
|
-
var t =
|
|
676
|
+
var t = Ur(null);
|
|
677
677
|
return t.options = T({ async: !0, ssr: !1 }, e), t;
|
|
678
678
|
}
|
|
679
|
-
var
|
|
680
|
-
var t = e.sideCar, r =
|
|
679
|
+
var bt = function(e) {
|
|
680
|
+
var t = e.sideCar, r = yt(e, ["sideCar"]);
|
|
681
681
|
if (!t)
|
|
682
682
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
683
683
|
var o = t.read();
|
|
@@ -685,64 +685,64 @@ var yt = function(e) {
|
|
|
685
685
|
throw new Error("Sidecar medium not found");
|
|
686
686
|
return s.createElement(o, T({}, r));
|
|
687
687
|
};
|
|
688
|
-
|
|
689
|
-
function
|
|
690
|
-
return e.useMedium(t),
|
|
688
|
+
bt.isSideCarExport = !0;
|
|
689
|
+
function zr(e, t) {
|
|
690
|
+
return e.useMedium(t), bt;
|
|
691
691
|
}
|
|
692
|
-
var
|
|
693
|
-
},
|
|
692
|
+
var wt = Vr(), me = function() {
|
|
693
|
+
}, le = s.forwardRef(function(e, t) {
|
|
694
694
|
var r = s.useRef(null), o = s.useState({
|
|
695
|
-
onScrollCapture:
|
|
696
|
-
onWheelCapture:
|
|
697
|
-
onTouchMoveCapture:
|
|
698
|
-
}), a = o[0], n = o[1], i = e.forwardProps, u = e.children, d = e.className, c = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, g = e.noIsolation,
|
|
695
|
+
onScrollCapture: me,
|
|
696
|
+
onWheelCapture: me,
|
|
697
|
+
onTouchMoveCapture: me
|
|
698
|
+
}), a = o[0], n = o[1], i = e.forwardProps, u = e.children, d = e.className, c = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, g = e.noIsolation, b = e.inert, l = e.allowPinchZoom, m = e.as, _ = m === void 0 ? "div" : m, S = e.gapMode, w = yt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = h, C = Br([r, t]), x = T(T({}, w), a);
|
|
699
699
|
return s.createElement(
|
|
700
700
|
s.Fragment,
|
|
701
701
|
null,
|
|
702
|
-
f && s.createElement(E, { sideCar:
|
|
702
|
+
f && s.createElement(E, { sideCar: wt, removeScrollBar: c, shards: v, noIsolation: g, inert: b, setCallbacks: n, allowPinchZoom: !!l, lockRef: r, gapMode: S }),
|
|
703
703
|
i ? s.cloneElement(s.Children.only(u), T(T({}, x), { ref: C })) : s.createElement(_, T({}, x, { className: d, ref: C }), u)
|
|
704
704
|
);
|
|
705
705
|
});
|
|
706
|
-
|
|
706
|
+
le.defaultProps = {
|
|
707
707
|
enabled: !0,
|
|
708
708
|
removeScrollBar: !0,
|
|
709
709
|
inert: !1
|
|
710
710
|
};
|
|
711
|
-
|
|
712
|
-
fullWidth:
|
|
713
|
-
zeroRight:
|
|
711
|
+
le.classNames = {
|
|
712
|
+
fullWidth: ae,
|
|
713
|
+
zeroRight: oe
|
|
714
714
|
};
|
|
715
|
-
var
|
|
715
|
+
var Hr = function() {
|
|
716
716
|
if (typeof __webpack_nonce__ < "u")
|
|
717
717
|
return __webpack_nonce__;
|
|
718
718
|
};
|
|
719
|
-
function
|
|
719
|
+
function Gr() {
|
|
720
720
|
if (!document)
|
|
721
721
|
return null;
|
|
722
722
|
var e = document.createElement("style");
|
|
723
723
|
e.type = "text/css";
|
|
724
|
-
var t =
|
|
724
|
+
var t = Hr();
|
|
725
725
|
return t && e.setAttribute("nonce", t), e;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Kr(e, t) {
|
|
728
728
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Xr(e) {
|
|
731
731
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
732
732
|
t.appendChild(e);
|
|
733
733
|
}
|
|
734
|
-
var
|
|
734
|
+
var Yr = function() {
|
|
735
735
|
var e = 0, t = null;
|
|
736
736
|
return {
|
|
737
737
|
add: function(r) {
|
|
738
|
-
e == 0 && (t =
|
|
738
|
+
e == 0 && (t = Gr()) && (Kr(t, r), Xr(t)), e++;
|
|
739
739
|
},
|
|
740
740
|
remove: function() {
|
|
741
741
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
},
|
|
745
|
-
var e =
|
|
744
|
+
}, Zr = function() {
|
|
745
|
+
var e = Yr();
|
|
746
746
|
return function(t, r) {
|
|
747
747
|
s.useEffect(function() {
|
|
748
748
|
return e.add(t), function() {
|
|
@@ -750,40 +750,40 @@ var Kr = function() {
|
|
|
750
750
|
};
|
|
751
751
|
}, [t && r]);
|
|
752
752
|
};
|
|
753
|
-
},
|
|
754
|
-
var e =
|
|
753
|
+
}, Et = function() {
|
|
754
|
+
var e = Zr(), t = function(r) {
|
|
755
755
|
var o = r.styles, a = r.dynamic;
|
|
756
756
|
return e(o, a), null;
|
|
757
757
|
};
|
|
758
758
|
return t;
|
|
759
|
-
},
|
|
759
|
+
}, Qr = {
|
|
760
760
|
left: 0,
|
|
761
761
|
top: 0,
|
|
762
762
|
right: 0,
|
|
763
763
|
gap: 0
|
|
764
|
-
},
|
|
764
|
+
}, ge = function(e) {
|
|
765
765
|
return parseInt(e || "", 10) || 0;
|
|
766
|
-
},
|
|
766
|
+
}, Jr = function(e) {
|
|
767
767
|
var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
768
|
-
return [
|
|
769
|
-
},
|
|
768
|
+
return [ge(r), ge(o), ge(a)];
|
|
769
|
+
}, en = function(e) {
|
|
770
770
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
771
|
-
return
|
|
772
|
-
var t =
|
|
771
|
+
return Qr;
|
|
772
|
+
var t = Jr(e), r = document.documentElement.clientWidth, o = window.innerWidth;
|
|
773
773
|
return {
|
|
774
774
|
left: t[0],
|
|
775
775
|
top: t[1],
|
|
776
776
|
right: t[2],
|
|
777
777
|
gap: Math.max(0, o - r + t[2] - t[0])
|
|
778
778
|
};
|
|
779
|
-
},
|
|
779
|
+
}, tn = Et(), H = "data-scroll-locked", rn = function(e, t, r, o) {
|
|
780
780
|
var a = e.left, n = e.top, i = e.right, u = e.gap;
|
|
781
781
|
return r === void 0 && (r = "margin"), `
|
|
782
|
-
.`.concat(
|
|
782
|
+
.`.concat(kr, ` {
|
|
783
783
|
overflow: hidden `).concat(o, `;
|
|
784
784
|
padding-right: `).concat(u, "px ").concat(o, `;
|
|
785
785
|
}
|
|
786
|
-
body[`).concat(
|
|
786
|
+
body[`).concat(H, `] {
|
|
787
787
|
overflow: hidden `).concat(o, `;
|
|
788
788
|
overscroll-behavior: contain;
|
|
789
789
|
`).concat([
|
|
@@ -800,136 +800,136 @@ var Kr = function() {
|
|
|
800
800
|
].filter(Boolean).join(""), `
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
-
.`).concat(
|
|
803
|
+
.`).concat(oe, ` {
|
|
804
804
|
right: `).concat(u, "px ").concat(o, `;
|
|
805
805
|
}
|
|
806
806
|
|
|
807
|
-
.`).concat(
|
|
807
|
+
.`).concat(ae, ` {
|
|
808
808
|
margin-right: `).concat(u, "px ").concat(o, `;
|
|
809
809
|
}
|
|
810
810
|
|
|
811
|
-
.`).concat(
|
|
811
|
+
.`).concat(oe, " .").concat(oe, ` {
|
|
812
812
|
right: 0 `).concat(o, `;
|
|
813
813
|
}
|
|
814
814
|
|
|
815
|
-
.`).concat(
|
|
815
|
+
.`).concat(ae, " .").concat(ae, ` {
|
|
816
816
|
margin-right: 0 `).concat(o, `;
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
body[`).concat(
|
|
820
|
-
`).concat(
|
|
819
|
+
body[`).concat(H, `] {
|
|
820
|
+
`).concat(Fr, ": ").concat(u, `px;
|
|
821
821
|
}
|
|
822
822
|
`);
|
|
823
|
-
},
|
|
824
|
-
var e = parseInt(document.body.getAttribute(
|
|
823
|
+
}, Ve = function() {
|
|
824
|
+
var e = parseInt(document.body.getAttribute(H) || "0", 10);
|
|
825
825
|
return isFinite(e) ? e : 0;
|
|
826
|
-
},
|
|
826
|
+
}, nn = function() {
|
|
827
827
|
s.useEffect(function() {
|
|
828
|
-
return document.body.setAttribute(
|
|
829
|
-
var e =
|
|
830
|
-
e <= 0 ? document.body.removeAttribute(
|
|
828
|
+
return document.body.setAttribute(H, (Ve() + 1).toString()), function() {
|
|
829
|
+
var e = Ve() - 1;
|
|
830
|
+
e <= 0 ? document.body.removeAttribute(H) : document.body.setAttribute(H, e.toString());
|
|
831
831
|
};
|
|
832
832
|
}, []);
|
|
833
|
-
},
|
|
833
|
+
}, on = function(e) {
|
|
834
834
|
var t = e.noRelative, r = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
835
|
-
|
|
835
|
+
nn();
|
|
836
836
|
var n = s.useMemo(function() {
|
|
837
|
-
return
|
|
837
|
+
return en(a);
|
|
838
838
|
}, [a]);
|
|
839
|
-
return s.createElement(
|
|
840
|
-
},
|
|
839
|
+
return s.createElement(tn, { styles: rn(n, !t, a, r ? "" : "!important") });
|
|
840
|
+
}, Ne = !1;
|
|
841
841
|
if (typeof window < "u")
|
|
842
842
|
try {
|
|
843
|
-
var
|
|
843
|
+
var Q = Object.defineProperty({}, "passive", {
|
|
844
844
|
get: function() {
|
|
845
|
-
return
|
|
845
|
+
return Ne = !0, !0;
|
|
846
846
|
}
|
|
847
847
|
});
|
|
848
|
-
window.addEventListener("test",
|
|
848
|
+
window.addEventListener("test", Q, Q), window.removeEventListener("test", Q, Q);
|
|
849
849
|
} catch {
|
|
850
|
-
|
|
850
|
+
Ne = !1;
|
|
851
851
|
}
|
|
852
|
-
var
|
|
852
|
+
var U = Ne ? { passive: !1 } : !1, an = function(e) {
|
|
853
853
|
return e.tagName === "TEXTAREA";
|
|
854
|
-
},
|
|
854
|
+
}, Ct = function(e, t) {
|
|
855
855
|
if (!(e instanceof Element))
|
|
856
856
|
return !1;
|
|
857
857
|
var r = window.getComputedStyle(e);
|
|
858
858
|
return (
|
|
859
859
|
// not-not-scrollable
|
|
860
860
|
r[t] !== "hidden" && // contains scroll inside self
|
|
861
|
-
!(r.overflowY === r.overflowX && !
|
|
861
|
+
!(r.overflowY === r.overflowX && !an(e) && r[t] === "visible")
|
|
862
862
|
);
|
|
863
|
-
},
|
|
864
|
-
return
|
|
865
|
-
},
|
|
866
|
-
return
|
|
867
|
-
},
|
|
863
|
+
}, un = function(e) {
|
|
864
|
+
return Ct(e, "overflowY");
|
|
865
|
+
}, sn = function(e) {
|
|
866
|
+
return Ct(e, "overflowX");
|
|
867
|
+
}, ze = function(e, t) {
|
|
868
868
|
var r = t.ownerDocument, o = t;
|
|
869
869
|
do {
|
|
870
870
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
871
|
-
var a =
|
|
871
|
+
var a = St(e, o);
|
|
872
872
|
if (a) {
|
|
873
|
-
var n =
|
|
873
|
+
var n = Nt(e, o), i = n[1], u = n[2];
|
|
874
874
|
if (i > u)
|
|
875
875
|
return !0;
|
|
876
876
|
}
|
|
877
877
|
o = o.parentNode;
|
|
878
878
|
} while (o && o !== r.body);
|
|
879
879
|
return !1;
|
|
880
|
-
},
|
|
880
|
+
}, cn = function(e) {
|
|
881
881
|
var t = e.scrollTop, r = e.scrollHeight, o = e.clientHeight;
|
|
882
882
|
return [
|
|
883
883
|
t,
|
|
884
884
|
r,
|
|
885
885
|
o
|
|
886
886
|
];
|
|
887
|
-
},
|
|
887
|
+
}, ln = function(e) {
|
|
888
888
|
var t = e.scrollLeft, r = e.scrollWidth, o = e.clientWidth;
|
|
889
889
|
return [
|
|
890
890
|
t,
|
|
891
891
|
r,
|
|
892
892
|
o
|
|
893
893
|
];
|
|
894
|
-
}, Ct = function(e, t) {
|
|
895
|
-
return e === "v" ? on(t) : an(t);
|
|
896
894
|
}, St = function(e, t) {
|
|
897
895
|
return e === "v" ? un(t) : sn(t);
|
|
898
|
-
},
|
|
896
|
+
}, Nt = function(e, t) {
|
|
897
|
+
return e === "v" ? cn(t) : ln(t);
|
|
898
|
+
}, dn = function(e, t) {
|
|
899
899
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
900
|
-
},
|
|
901
|
-
var n =
|
|
900
|
+
}, pn = function(e, t, r, o, a) {
|
|
901
|
+
var n = dn(e, window.getComputedStyle(t).direction), i = n * o, u = r.target, d = t.contains(u), c = !1, f = i > 0, v = 0, h = 0;
|
|
902
902
|
do {
|
|
903
|
-
var g =
|
|
904
|
-
(
|
|
903
|
+
var g = Nt(e, u), b = g[0], l = g[1], m = g[2], _ = l - m - n * b;
|
|
904
|
+
(b || _) && St(e, u) && (v += _, h += b), u instanceof ShadowRoot ? u = u.host : u = u.parentNode;
|
|
905
905
|
} while (
|
|
906
906
|
// portaled content
|
|
907
907
|
!d && u !== document.body || // self content
|
|
908
908
|
d && (t.contains(u) || t === u)
|
|
909
909
|
);
|
|
910
910
|
return (f && Math.abs(v) < 1 || !f && Math.abs(h) < 1) && (c = !0), c;
|
|
911
|
-
},
|
|
911
|
+
}, J = function(e) {
|
|
912
912
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
913
|
-
},
|
|
913
|
+
}, He = function(e) {
|
|
914
914
|
return [e.deltaX, e.deltaY];
|
|
915
|
-
},
|
|
915
|
+
}, Ge = function(e) {
|
|
916
916
|
return e && "current" in e ? e.current : e;
|
|
917
|
-
},
|
|
917
|
+
}, fn = function(e, t) {
|
|
918
918
|
return e[0] === t[0] && e[1] === t[1];
|
|
919
|
-
},
|
|
919
|
+
}, vn = function(e) {
|
|
920
920
|
return `
|
|
921
921
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
922
922
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
923
923
|
`);
|
|
924
|
-
},
|
|
925
|
-
function
|
|
926
|
-
var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(
|
|
924
|
+
}, hn = 0, V = [];
|
|
925
|
+
function mn(e) {
|
|
926
|
+
var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(hn++)[0], n = s.useState(Et)[0], i = s.useRef(e);
|
|
927
927
|
s.useEffect(function() {
|
|
928
928
|
i.current = e;
|
|
929
929
|
}, [e]), s.useEffect(function() {
|
|
930
930
|
if (e.inert) {
|
|
931
931
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
932
|
-
var l =
|
|
932
|
+
var l = Lr([e.lockRef.current], (e.shards || []).map(Ge), !0).filter(Boolean);
|
|
933
933
|
return l.forEach(function(m) {
|
|
934
934
|
return m.classList.add("allow-interactivity-".concat(a));
|
|
935
935
|
}), function() {
|
|
@@ -942,98 +942,98 @@ function vn(e) {
|
|
|
942
942
|
var u = s.useCallback(function(l, m) {
|
|
943
943
|
if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
|
|
944
944
|
return !i.current.allowPinchZoom;
|
|
945
|
-
var _ =
|
|
946
|
-
if ("touches" in l &&
|
|
945
|
+
var _ = J(l), S = r.current, w = "deltaX" in l ? l.deltaX : S[0] - _[0], E = "deltaY" in l ? l.deltaY : S[1] - _[1], C, x = l.target, y = Math.abs(w) > Math.abs(E) ? "h" : "v";
|
|
946
|
+
if ("touches" in l && y === "h" && x.type === "range")
|
|
947
947
|
return !1;
|
|
948
|
-
var
|
|
949
|
-
if (!
|
|
948
|
+
var O = ze(y, x);
|
|
949
|
+
if (!O)
|
|
950
950
|
return !0;
|
|
951
|
-
if (
|
|
951
|
+
if (O ? C = y : (C = y === "v" ? "h" : "v", O = ze(y, x)), !O)
|
|
952
952
|
return !1;
|
|
953
953
|
if (!o.current && "changedTouches" in l && (w || E) && (o.current = C), !C)
|
|
954
954
|
return !0;
|
|
955
955
|
var L = o.current || C;
|
|
956
|
-
return
|
|
956
|
+
return pn(L, m, l, L === "h" ? w : E);
|
|
957
957
|
}, []), d = s.useCallback(function(l) {
|
|
958
958
|
var m = l;
|
|
959
|
-
if (!(!
|
|
960
|
-
var _ = "deltaY" in m ?
|
|
961
|
-
return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) &&
|
|
959
|
+
if (!(!V.length || V[V.length - 1] !== n)) {
|
|
960
|
+
var _ = "deltaY" in m ? He(m) : J(m), S = t.current.filter(function(C) {
|
|
961
|
+
return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) && fn(C.delta, _);
|
|
962
962
|
})[0];
|
|
963
963
|
if (S && S.should) {
|
|
964
964
|
m.cancelable && m.preventDefault();
|
|
965
965
|
return;
|
|
966
966
|
}
|
|
967
967
|
if (!S) {
|
|
968
|
-
var w = (i.current.shards || []).map(
|
|
968
|
+
var w = (i.current.shards || []).map(Ge).filter(Boolean).filter(function(C) {
|
|
969
969
|
return C.contains(m.target);
|
|
970
970
|
}), E = w.length > 0 ? u(m, w[0]) : !i.current.noIsolation;
|
|
971
971
|
E && m.cancelable && m.preventDefault();
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
}, []), c = s.useCallback(function(l, m, _, S) {
|
|
975
|
-
var w = { name: l, delta: m, target: _, should: S, shadowParent:
|
|
975
|
+
var w = { name: l, delta: m, target: _, should: S, shadowParent: gn(_) };
|
|
976
976
|
t.current.push(w), setTimeout(function() {
|
|
977
977
|
t.current = t.current.filter(function(E) {
|
|
978
978
|
return E !== w;
|
|
979
979
|
});
|
|
980
980
|
}, 1);
|
|
981
981
|
}, []), f = s.useCallback(function(l) {
|
|
982
|
-
r.current =
|
|
982
|
+
r.current = J(l), o.current = void 0;
|
|
983
983
|
}, []), v = s.useCallback(function(l) {
|
|
984
|
-
c(l.type,
|
|
984
|
+
c(l.type, He(l), l.target, u(l, e.lockRef.current));
|
|
985
985
|
}, []), h = s.useCallback(function(l) {
|
|
986
|
-
c(l.type,
|
|
986
|
+
c(l.type, J(l), l.target, u(l, e.lockRef.current));
|
|
987
987
|
}, []);
|
|
988
988
|
s.useEffect(function() {
|
|
989
|
-
return
|
|
989
|
+
return V.push(n), e.setCallbacks({
|
|
990
990
|
onScrollCapture: v,
|
|
991
991
|
onWheelCapture: v,
|
|
992
992
|
onTouchMoveCapture: h
|
|
993
|
-
}), document.addEventListener("wheel", d,
|
|
994
|
-
|
|
993
|
+
}), document.addEventListener("wheel", d, U), document.addEventListener("touchmove", d, U), document.addEventListener("touchstart", f, U), function() {
|
|
994
|
+
V = V.filter(function(l) {
|
|
995
995
|
return l !== n;
|
|
996
|
-
}), document.removeEventListener("wheel", d,
|
|
996
|
+
}), document.removeEventListener("wheel", d, U), document.removeEventListener("touchmove", d, U), document.removeEventListener("touchstart", f, U);
|
|
997
997
|
};
|
|
998
998
|
}, []);
|
|
999
|
-
var g = e.removeScrollBar,
|
|
999
|
+
var g = e.removeScrollBar, b = e.inert;
|
|
1000
1000
|
return s.createElement(
|
|
1001
1001
|
s.Fragment,
|
|
1002
1002
|
null,
|
|
1003
|
-
|
|
1004
|
-
g ? s.createElement(
|
|
1003
|
+
b ? s.createElement(n, { styles: vn(a) }) : null,
|
|
1004
|
+
g ? s.createElement(on, { gapMode: e.gapMode }) : null
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function gn(e) {
|
|
1008
1008
|
for (var t = null; e !== null; )
|
|
1009
1009
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1010
1010
|
return t;
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1013
|
-
var
|
|
1014
|
-
return s.createElement(
|
|
1012
|
+
const _n = zr(wt, mn);
|
|
1013
|
+
var Pt = s.forwardRef(function(e, t) {
|
|
1014
|
+
return s.createElement(le, T({}, e, { ref: t, sideCar: _n }));
|
|
1015
1015
|
});
|
|
1016
|
-
|
|
1017
|
-
var
|
|
1016
|
+
Pt.classNames = le.classNames;
|
|
1017
|
+
var yn = function(e) {
|
|
1018
1018
|
if (typeof document > "u")
|
|
1019
1019
|
return null;
|
|
1020
1020
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1021
1021
|
return t.ownerDocument.body;
|
|
1022
|
-
},
|
|
1023
|
-
return e && (e.host ||
|
|
1024
|
-
},
|
|
1022
|
+
}, z = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, _e = 0, Ot = function(e) {
|
|
1023
|
+
return e && (e.host || Ot(e.parentNode));
|
|
1024
|
+
}, bn = function(e, t) {
|
|
1025
1025
|
return t.map(function(r) {
|
|
1026
1026
|
if (e.contains(r))
|
|
1027
1027
|
return r;
|
|
1028
|
-
var o =
|
|
1028
|
+
var o = Ot(r);
|
|
1029
1029
|
return o && e.contains(o) ? o : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
|
|
1030
1030
|
}).filter(function(r) {
|
|
1031
1031
|
return !!r;
|
|
1032
1032
|
});
|
|
1033
|
-
},
|
|
1034
|
-
var a =
|
|
1035
|
-
|
|
1036
|
-
var n =
|
|
1033
|
+
}, wn = function(e, t, r, o) {
|
|
1034
|
+
var a = bn(t, Array.isArray(e) ? e : [e]);
|
|
1035
|
+
te[r] || (te[r] = /* @__PURE__ */ new WeakMap());
|
|
1036
|
+
var n = te[r], i = [], u = /* @__PURE__ */ new Set(), d = new Set(a), c = function(v) {
|
|
1037
1037
|
!v || u.has(v) || (u.add(v), c(v.parentNode));
|
|
1038
1038
|
};
|
|
1039
1039
|
a.forEach(c);
|
|
@@ -1043,26 +1043,26 @@ var gn = function(e) {
|
|
|
1043
1043
|
f(h);
|
|
1044
1044
|
else
|
|
1045
1045
|
try {
|
|
1046
|
-
var g = h.getAttribute(o),
|
|
1047
|
-
|
|
1046
|
+
var g = h.getAttribute(o), b = g !== null && g !== "false", l = (z.get(h) || 0) + 1, m = (n.get(h) || 0) + 1;
|
|
1047
|
+
z.set(h, l), n.set(h, m), i.push(h), l === 1 && b && ee.set(h, !0), m === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
|
|
1048
1048
|
} catch (_) {
|
|
1049
1049
|
console.error("aria-hidden: cannot operate on ", h, _);
|
|
1050
1050
|
}
|
|
1051
1051
|
});
|
|
1052
1052
|
};
|
|
1053
|
-
return f(t), u.clear(),
|
|
1053
|
+
return f(t), u.clear(), _e++, function() {
|
|
1054
1054
|
i.forEach(function(v) {
|
|
1055
|
-
var h =
|
|
1056
|
-
|
|
1057
|
-
}),
|
|
1055
|
+
var h = z.get(v) - 1, g = n.get(v) - 1;
|
|
1056
|
+
z.set(v, h), n.set(v, g), h || (ee.has(v) || v.removeAttribute(o), ee.delete(v)), g || v.removeAttribute(r);
|
|
1057
|
+
}), _e--, _e || (z = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {});
|
|
1058
1058
|
};
|
|
1059
|
-
},
|
|
1059
|
+
}, En = function(e, t, r) {
|
|
1060
1060
|
r === void 0 && (r = "data-aria-hidden");
|
|
1061
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1062
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))),
|
|
1061
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = yn(e);
|
|
1062
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), wn(o, a, r, "aria-hidden")) : function() {
|
|
1063
1063
|
return null;
|
|
1064
1064
|
};
|
|
1065
|
-
},
|
|
1065
|
+
}, Re = "Dialog", [xt, Uo] = or(Re), [Cn, A] = xt(Re), Rt = (e) => {
|
|
1066
1066
|
const {
|
|
1067
1067
|
__scopeDialog: t,
|
|
1068
1068
|
children: r,
|
|
@@ -1070,20 +1070,20 @@ var gn = function(e) {
|
|
|
1070
1070
|
defaultOpen: a,
|
|
1071
1071
|
onOpenChange: n,
|
|
1072
1072
|
modal: i = !0
|
|
1073
|
-
} = e, u = s.useRef(null), d = s.useRef(null), [c = !1, f] =
|
|
1073
|
+
} = e, u = s.useRef(null), d = s.useRef(null), [c = !1, f] = sr({
|
|
1074
1074
|
prop: o,
|
|
1075
1075
|
defaultProp: a,
|
|
1076
1076
|
onChange: n
|
|
1077
1077
|
});
|
|
1078
1078
|
return /* @__PURE__ */ p(
|
|
1079
|
-
|
|
1079
|
+
Cn,
|
|
1080
1080
|
{
|
|
1081
1081
|
scope: t,
|
|
1082
1082
|
triggerRef: u,
|
|
1083
1083
|
contentRef: d,
|
|
1084
|
-
contentId:
|
|
1085
|
-
titleId:
|
|
1086
|
-
descriptionId:
|
|
1084
|
+
contentId: de(),
|
|
1085
|
+
titleId: de(),
|
|
1086
|
+
descriptionId: de(),
|
|
1087
1087
|
open: c,
|
|
1088
1088
|
onOpenChange: f,
|
|
1089
1089
|
onOpenToggle: s.useCallback(() => f((v) => !v), [f]),
|
|
@@ -1092,10 +1092,10 @@ var gn = function(e) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
);
|
|
1094
1094
|
};
|
|
1095
|
-
|
|
1096
|
-
var
|
|
1095
|
+
Rt.displayName = Re;
|
|
1096
|
+
var At = "DialogTrigger", Dt = s.forwardRef(
|
|
1097
1097
|
(e, t) => {
|
|
1098
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1098
|
+
const { __scopeDialog: r, ...o } = e, a = A(At, r), n = B(t, a.triggerRef);
|
|
1099
1099
|
return /* @__PURE__ */ p(
|
|
1100
1100
|
M.button,
|
|
1101
1101
|
{
|
|
@@ -1103,7 +1103,7 @@ var Rt = "DialogTrigger", At = s.forwardRef(
|
|
|
1103
1103
|
"aria-haspopup": "dialog",
|
|
1104
1104
|
"aria-expanded": a.open,
|
|
1105
1105
|
"aria-controls": a.contentId,
|
|
1106
|
-
"data-state":
|
|
1106
|
+
"data-state": Te(a.open),
|
|
1107
1107
|
...o,
|
|
1108
1108
|
ref: n,
|
|
1109
1109
|
onClick: I(e.onClick, a.onOpenToggle)
|
|
@@ -1111,31 +1111,31 @@ var Rt = "DialogTrigger", At = s.forwardRef(
|
|
|
1111
1111
|
);
|
|
1112
1112
|
}
|
|
1113
1113
|
);
|
|
1114
|
-
|
|
1115
|
-
var
|
|
1114
|
+
Dt.displayName = At;
|
|
1115
|
+
var Ae = "DialogPortal", [Sn, Tt] = xt(Ae, {
|
|
1116
1116
|
forceMount: void 0
|
|
1117
|
-
}),
|
|
1118
|
-
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = A(
|
|
1119
|
-
return /* @__PURE__ */ p(
|
|
1117
|
+
}), Mt = (e) => {
|
|
1118
|
+
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = A(Ae, t);
|
|
1119
|
+
return /* @__PURE__ */ p(Sn, { scope: t, forceMount: r, children: s.Children.map(o, (i) => /* @__PURE__ */ p(ce, { present: r || n.open, children: /* @__PURE__ */ p(_t, { asChild: !0, container: a, children: i }) })) });
|
|
1120
1120
|
};
|
|
1121
|
-
|
|
1122
|
-
var
|
|
1121
|
+
Mt.displayName = Ae;
|
|
1122
|
+
var se = "DialogOverlay", $t = s.forwardRef(
|
|
1123
1123
|
(e, t) => {
|
|
1124
|
-
const r =
|
|
1125
|
-
return n.modal ? /* @__PURE__ */ p(
|
|
1124
|
+
const r = Tt(se, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(se, e.__scopeDialog);
|
|
1125
|
+
return n.modal ? /* @__PURE__ */ p(ce, { present: o || n.open, children: /* @__PURE__ */ p(Nn, { ...a, ref: t }) }) : null;
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
|
-
|
|
1129
|
-
var
|
|
1128
|
+
$t.displayName = se;
|
|
1129
|
+
var Nn = s.forwardRef(
|
|
1130
1130
|
(e, t) => {
|
|
1131
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1131
|
+
const { __scopeDialog: r, ...o } = e, a = A(se, r);
|
|
1132
1132
|
return (
|
|
1133
1133
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1134
1134
|
// ie. when `Overlay` and `Content` are siblings
|
|
1135
|
-
/* @__PURE__ */ p(
|
|
1135
|
+
/* @__PURE__ */ p(Pt, { as: xe, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ p(
|
|
1136
1136
|
M.div,
|
|
1137
1137
|
{
|
|
1138
|
-
"data-state":
|
|
1138
|
+
"data-state": Te(a.open),
|
|
1139
1139
|
...o,
|
|
1140
1140
|
ref: t,
|
|
1141
1141
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -1143,21 +1143,21 @@ var Cn = s.forwardRef(
|
|
|
1143
1143
|
) })
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
), j = "DialogContent",
|
|
1146
|
+
), j = "DialogContent", It = s.forwardRef(
|
|
1147
1147
|
(e, t) => {
|
|
1148
|
-
const r =
|
|
1149
|
-
return /* @__PURE__ */ p(
|
|
1148
|
+
const r = Tt(j, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(j, e.__scopeDialog);
|
|
1149
|
+
return /* @__PURE__ */ p(ce, { present: o || n.open, children: n.modal ? /* @__PURE__ */ p(Pn, { ...a, ref: t }) : /* @__PURE__ */ p(On, { ...a, ref: t }) });
|
|
1150
1150
|
}
|
|
1151
1151
|
);
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1152
|
+
It.displayName = j;
|
|
1153
|
+
var Pn = s.forwardRef(
|
|
1154
1154
|
(e, t) => {
|
|
1155
1155
|
const r = A(j, e.__scopeDialog), o = s.useRef(null), a = B(t, r.contentRef, o);
|
|
1156
1156
|
return s.useEffect(() => {
|
|
1157
1157
|
const n = o.current;
|
|
1158
|
-
if (n) return
|
|
1158
|
+
if (n) return En(n);
|
|
1159
1159
|
}, []), /* @__PURE__ */ p(
|
|
1160
|
-
|
|
1160
|
+
Lt,
|
|
1161
1161
|
{
|
|
1162
1162
|
...e,
|
|
1163
1163
|
ref: a,
|
|
@@ -1178,11 +1178,11 @@ var Sn = s.forwardRef(
|
|
|
1178
1178
|
}
|
|
1179
1179
|
);
|
|
1180
1180
|
}
|
|
1181
|
-
),
|
|
1181
|
+
), On = s.forwardRef(
|
|
1182
1182
|
(e, t) => {
|
|
1183
1183
|
const r = A(j, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
|
|
1184
1184
|
return /* @__PURE__ */ p(
|
|
1185
|
-
|
|
1185
|
+
Lt,
|
|
1186
1186
|
{
|
|
1187
1187
|
...e,
|
|
1188
1188
|
ref: t,
|
|
@@ -1201,12 +1201,12 @@ var Sn = s.forwardRef(
|
|
|
1201
1201
|
}
|
|
1202
1202
|
);
|
|
1203
1203
|
}
|
|
1204
|
-
),
|
|
1204
|
+
), Lt = s.forwardRef(
|
|
1205
1205
|
(e, t) => {
|
|
1206
1206
|
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...i } = e, u = A(j, r), d = s.useRef(null), c = B(t, d);
|
|
1207
|
-
return
|
|
1207
|
+
return Ir(), /* @__PURE__ */ R(ie, { children: [
|
|
1208
1208
|
/* @__PURE__ */ p(
|
|
1209
|
-
|
|
1209
|
+
mt,
|
|
1210
1210
|
{
|
|
1211
1211
|
asChild: !0,
|
|
1212
1212
|
loop: !0,
|
|
@@ -1214,13 +1214,13 @@ var Sn = s.forwardRef(
|
|
|
1214
1214
|
onMountAutoFocus: a,
|
|
1215
1215
|
onUnmountAutoFocus: n,
|
|
1216
1216
|
children: /* @__PURE__ */ p(
|
|
1217
|
-
|
|
1217
|
+
vt,
|
|
1218
1218
|
{
|
|
1219
1219
|
role: "dialog",
|
|
1220
1220
|
id: u.contentId,
|
|
1221
1221
|
"aria-describedby": u.descriptionId,
|
|
1222
1222
|
"aria-labelledby": u.titleId,
|
|
1223
|
-
"data-state":
|
|
1223
|
+
"data-state": Te(u.open),
|
|
1224
1224
|
...i,
|
|
1225
1225
|
ref: c,
|
|
1226
1226
|
onDismiss: () => u.onOpenChange(!1)
|
|
@@ -1228,29 +1228,29 @@ var Sn = s.forwardRef(
|
|
|
1228
1228
|
)
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
/* @__PURE__ */ R(
|
|
1232
|
-
/* @__PURE__ */ p(
|
|
1233
|
-
/* @__PURE__ */ p(
|
|
1231
|
+
/* @__PURE__ */ R(ie, { children: [
|
|
1232
|
+
/* @__PURE__ */ p(xn, { titleId: u.titleId }),
|
|
1233
|
+
/* @__PURE__ */ p(An, { contentRef: d, descriptionId: u.descriptionId })
|
|
1234
1234
|
] })
|
|
1235
1235
|
] });
|
|
1236
1236
|
}
|
|
1237
|
-
),
|
|
1237
|
+
), De = "DialogTitle", kt = s.forwardRef(
|
|
1238
1238
|
(e, t) => {
|
|
1239
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1239
|
+
const { __scopeDialog: r, ...o } = e, a = A(De, r);
|
|
1240
1240
|
return /* @__PURE__ */ p(M.h2, { id: a.titleId, ...o, ref: t });
|
|
1241
1241
|
}
|
|
1242
1242
|
);
|
|
1243
|
-
|
|
1244
|
-
var
|
|
1243
|
+
kt.displayName = De;
|
|
1244
|
+
var Ft = "DialogDescription", Wt = s.forwardRef(
|
|
1245
1245
|
(e, t) => {
|
|
1246
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1246
|
+
const { __scopeDialog: r, ...o } = e, a = A(Ft, r);
|
|
1247
1247
|
return /* @__PURE__ */ p(M.p, { id: a.descriptionId, ...o, ref: t });
|
|
1248
1248
|
}
|
|
1249
1249
|
);
|
|
1250
|
-
|
|
1251
|
-
var
|
|
1250
|
+
Wt.displayName = Ft;
|
|
1251
|
+
var jt = "DialogClose", Bt = s.forwardRef(
|
|
1252
1252
|
(e, t) => {
|
|
1253
|
-
const { __scopeDialog: r, ...o } = e, a = A(
|
|
1253
|
+
const { __scopeDialog: r, ...o } = e, a = A(jt, r);
|
|
1254
1254
|
return /* @__PURE__ */ p(
|
|
1255
1255
|
M.button,
|
|
1256
1256
|
{
|
|
@@ -1262,16 +1262,16 @@ var Wt = "DialogClose", jt = s.forwardRef(
|
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
1264
1264
|
);
|
|
1265
|
-
|
|
1266
|
-
function
|
|
1265
|
+
Bt.displayName = jt;
|
|
1266
|
+
function Te(e) {
|
|
1267
1267
|
return e ? "open" : "closed";
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1269
|
+
var qt = "DialogTitleWarning", [Vo, Ut] = nr(qt, {
|
|
1270
1270
|
contentName: j,
|
|
1271
|
-
titleName:
|
|
1271
|
+
titleName: De,
|
|
1272
1272
|
docsSlug: "dialog"
|
|
1273
|
-
}),
|
|
1274
|
-
const t = qt
|
|
1273
|
+
}), xn = ({ titleId: e }) => {
|
|
1274
|
+
const t = Ut(qt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1275
1275
|
|
|
1276
1276
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1277
1277
|
|
|
@@ -1279,29 +1279,29 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1279
1279
|
return s.useEffect(() => {
|
|
1280
1280
|
e && (document.getElementById(e) || console.error(r));
|
|
1281
1281
|
}, [r, e]), null;
|
|
1282
|
-
},
|
|
1283
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
1282
|
+
}, Rn = "DialogDescriptionWarning", An = ({ contentRef: e, descriptionId: t }) => {
|
|
1283
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ut(Rn).contentName}}.`;
|
|
1284
1284
|
return s.useEffect(() => {
|
|
1285
1285
|
var n;
|
|
1286
1286
|
const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
|
|
1287
1287
|
t && a && (document.getElementById(t) || console.warn(o));
|
|
1288
1288
|
}, [o, e, t]), null;
|
|
1289
|
-
},
|
|
1290
|
-
const
|
|
1289
|
+
}, Dn = Rt, Tn = Dt, Mn = Mt, $n = $t, In = It, Ln = kt, Ke = Wt, kn = Bt;
|
|
1290
|
+
const Fn = {
|
|
1291
1291
|
LG: "lg"
|
|
1292
1292
|
};
|
|
1293
|
-
function
|
|
1293
|
+
function Wn(e) {
|
|
1294
1294
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1295
1295
|
}
|
|
1296
|
-
var
|
|
1296
|
+
var Xe = { exports: {} };
|
|
1297
1297
|
/*!
|
|
1298
1298
|
Copyright (c) 2018 Jed Watson.
|
|
1299
1299
|
Licensed under the MIT License (MIT), see
|
|
1300
1300
|
http://jedwatson.github.io/classnames
|
|
1301
1301
|
*/
|
|
1302
|
-
var
|
|
1303
|
-
function
|
|
1304
|
-
return
|
|
1302
|
+
var Ye;
|
|
1303
|
+
function jn() {
|
|
1304
|
+
return Ye || (Ye = 1, function(e) {
|
|
1305
1305
|
(function() {
|
|
1306
1306
|
var t = {}.hasOwnProperty;
|
|
1307
1307
|
function r() {
|
|
@@ -1330,41 +1330,41 @@ function Fn() {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1332
1332
|
})();
|
|
1333
|
-
}(
|
|
1333
|
+
}(Xe)), Xe.exports;
|
|
1334
1334
|
}
|
|
1335
|
-
var
|
|
1336
|
-
const
|
|
1335
|
+
var Bn = jn();
|
|
1336
|
+
const Ze = /* @__PURE__ */ Wn(Bn), qn = "_rotate_1xozj_1", Un = "_dash_1xozj_1", G = {
|
|
1337
1337
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1338
|
-
rotate:
|
|
1338
|
+
rotate: qn,
|
|
1339
1339
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
1340
1340
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
1341
1341
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
1342
1342
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
1343
1343
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
1344
1344
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
1345
|
-
dash:
|
|
1345
|
+
dash: Un,
|
|
1346
1346
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1347
1347
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1348
|
-
},
|
|
1348
|
+
}, K = "purpur-spinner", Vn = {
|
|
1349
1349
|
SM: "sm"
|
|
1350
|
-
},
|
|
1350
|
+
}, zn = ({
|
|
1351
1351
|
["data-testid"]: e,
|
|
1352
1352
|
disabled: t = !1,
|
|
1353
1353
|
negative: r = !1,
|
|
1354
|
-
size: o =
|
|
1354
|
+
size: o = Vn.SM,
|
|
1355
1355
|
...a
|
|
1356
1356
|
}) => /* @__PURE__ */ p(
|
|
1357
1357
|
"div",
|
|
1358
1358
|
{
|
|
1359
|
-
className:
|
|
1359
|
+
className: Ze([G[K], G[`${K}--${o}`]]),
|
|
1360
1360
|
"data-testid": e,
|
|
1361
1361
|
...a,
|
|
1362
1362
|
children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
|
|
1363
1363
|
"circle",
|
|
1364
1364
|
{
|
|
1365
|
-
className:
|
|
1366
|
-
[
|
|
1367
|
-
[
|
|
1365
|
+
className: Ze(G[`${K}__circle`], {
|
|
1366
|
+
[G[`${K}__circle--disabled`]]: t,
|
|
1367
|
+
[G[`${K}__circle--negative`]]: r
|
|
1368
1368
|
}),
|
|
1369
1369
|
cx: "25",
|
|
1370
1370
|
cy: "25",
|
|
@@ -1373,18 +1373,18 @@ const Xe = /* @__PURE__ */ kn(Wn), jn = "_rotate_1xozj_1", Bn = "_dash_1xozj_1",
|
|
|
1373
1373
|
) })
|
|
1374
1374
|
}
|
|
1375
1375
|
);
|
|
1376
|
-
function
|
|
1376
|
+
function Hn(e) {
|
|
1377
1377
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1378
1378
|
}
|
|
1379
|
-
var
|
|
1379
|
+
var Qe = { exports: {} };
|
|
1380
1380
|
/*!
|
|
1381
1381
|
Copyright (c) 2018 Jed Watson.
|
|
1382
1382
|
Licensed under the MIT License (MIT), see
|
|
1383
1383
|
http://jedwatson.github.io/classnames
|
|
1384
1384
|
*/
|
|
1385
|
-
var
|
|
1386
|
-
function
|
|
1387
|
-
return
|
|
1385
|
+
var Je;
|
|
1386
|
+
function Gn() {
|
|
1387
|
+
return Je || (Je = 1, function(e) {
|
|
1388
1388
|
(function() {
|
|
1389
1389
|
var t = {}.hasOwnProperty;
|
|
1390
1390
|
function r() {
|
|
@@ -1413,10 +1413,10 @@ function zn() {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1415
1415
|
})();
|
|
1416
|
-
}(
|
|
1416
|
+
}(Qe)), Qe.exports;
|
|
1417
1417
|
}
|
|
1418
|
-
var
|
|
1419
|
-
const
|
|
1418
|
+
var Kn = Gn();
|
|
1419
|
+
const Xn = /* @__PURE__ */ Hn(Kn), Yn = {
|
|
1420
1420
|
"purpur-button": "_purpur-button_w455q_1",
|
|
1421
1421
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
1422
1422
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -1438,7 +1438,7 @@ const Gn = /* @__PURE__ */ Vn(Hn), Kn = {
|
|
|
1438
1438
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
1439
1439
|
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
1440
1440
|
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
1441
|
-
},
|
|
1441
|
+
}, Zn = Xn.bind(Yn), F = "purpur-button", Qn = ({
|
|
1442
1442
|
children: e,
|
|
1443
1443
|
className: t,
|
|
1444
1444
|
["data-testid"]: r,
|
|
@@ -1455,7 +1455,7 @@ const Gn = /* @__PURE__ */ Vn(Hn), Kn = {
|
|
|
1455
1455
|
}, g) => {
|
|
1456
1456
|
if (n && f === "destructive")
|
|
1457
1457
|
return null;
|
|
1458
|
-
const
|
|
1458
|
+
const b = Zn(
|
|
1459
1459
|
[
|
|
1460
1460
|
F,
|
|
1461
1461
|
`${F}--${u ? `${f}-negative` : f}`,
|
|
@@ -1474,7 +1474,7 @@ const Gn = /* @__PURE__ */ Vn(Hn), Kn = {
|
|
|
1474
1474
|
return /* @__PURE__ */ R(
|
|
1475
1475
|
"button",
|
|
1476
1476
|
{
|
|
1477
|
-
className:
|
|
1477
|
+
className: b,
|
|
1478
1478
|
"data-testid": r,
|
|
1479
1479
|
type: v,
|
|
1480
1480
|
ref: g,
|
|
@@ -1482,26 +1482,26 @@ const Gn = /* @__PURE__ */ Vn(Hn), Kn = {
|
|
|
1482
1482
|
onClick: l,
|
|
1483
1483
|
...h,
|
|
1484
1484
|
children: [
|
|
1485
|
-
i && /* @__PURE__ */ p(
|
|
1485
|
+
i && /* @__PURE__ */ p(zn, { size: c === Fn.LG ? "xs" : "xxs", negative: u, disabled: m }),
|
|
1486
1486
|
" ",
|
|
1487
1487
|
e
|
|
1488
1488
|
]
|
|
1489
1489
|
}
|
|
1490
1490
|
);
|
|
1491
|
-
},
|
|
1492
|
-
|
|
1493
|
-
function
|
|
1491
|
+
}, Me = Oe(Qn);
|
|
1492
|
+
Me.displayName = "Button";
|
|
1493
|
+
function Jn(e) {
|
|
1494
1494
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1495
1495
|
}
|
|
1496
|
-
var
|
|
1496
|
+
var et = { exports: {} };
|
|
1497
1497
|
/*!
|
|
1498
1498
|
Copyright (c) 2018 Jed Watson.
|
|
1499
1499
|
Licensed under the MIT License (MIT), see
|
|
1500
1500
|
http://jedwatson.github.io/classnames
|
|
1501
1501
|
*/
|
|
1502
|
-
var
|
|
1503
|
-
function
|
|
1504
|
-
return
|
|
1502
|
+
var tt;
|
|
1503
|
+
function eo() {
|
|
1504
|
+
return tt || (tt = 1, function(e) {
|
|
1505
1505
|
(function() {
|
|
1506
1506
|
var t = {}.hasOwnProperty;
|
|
1507
1507
|
function r() {
|
|
@@ -1530,10 +1530,10 @@ function Qn() {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1532
1532
|
})();
|
|
1533
|
-
}(
|
|
1533
|
+
}(et)), et.exports;
|
|
1534
1534
|
}
|
|
1535
|
-
var
|
|
1536
|
-
const
|
|
1535
|
+
var to = eo();
|
|
1536
|
+
const ro = /* @__PURE__ */ Jn(to), re = {
|
|
1537
1537
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1538
1538
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1539
1539
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1549,42 +1549,42 @@ const eo = /* @__PURE__ */ Zn(Jn), te = {
|
|
|
1549
1549
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
1550
1550
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
1551
1551
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
1552
|
-
},
|
|
1552
|
+
}, no = {
|
|
1553
1553
|
TITLE100: "title-100"
|
|
1554
|
-
},
|
|
1554
|
+
}, ne = "purpur-heading", Vt = ({
|
|
1555
1555
|
["data-testid"]: e,
|
|
1556
1556
|
children: t,
|
|
1557
1557
|
className: r = "",
|
|
1558
1558
|
enableHyphenation: o = !1,
|
|
1559
1559
|
negative: a = !1,
|
|
1560
1560
|
tag: n,
|
|
1561
|
-
variant: i =
|
|
1561
|
+
variant: i = no.TITLE100,
|
|
1562
1562
|
...u
|
|
1563
1563
|
}) => {
|
|
1564
|
-
const d = n, c =
|
|
1564
|
+
const d = n, c = ro([
|
|
1565
1565
|
r,
|
|
1566
|
-
|
|
1567
|
-
|
|
1566
|
+
re[ne],
|
|
1567
|
+
re[`${ne}--${i}`],
|
|
1568
1568
|
{
|
|
1569
|
-
[
|
|
1570
|
-
[
|
|
1569
|
+
[re[`${ne}--hyphens`]]: o,
|
|
1570
|
+
[re[`${ne}--negative`]]: a
|
|
1571
1571
|
}
|
|
1572
1572
|
]);
|
|
1573
1573
|
return /* @__PURE__ */ p(d, { ...u, className: c, "data-testid": e, children: t });
|
|
1574
1574
|
};
|
|
1575
|
-
|
|
1576
|
-
function
|
|
1575
|
+
Vt.displayName = "Heading";
|
|
1576
|
+
function oo(e) {
|
|
1577
1577
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1578
1578
|
}
|
|
1579
|
-
var
|
|
1579
|
+
var rt = { exports: {} };
|
|
1580
1580
|
/*!
|
|
1581
1581
|
Copyright (c) 2018 Jed Watson.
|
|
1582
1582
|
Licensed under the MIT License (MIT), see
|
|
1583
1583
|
http://jedwatson.github.io/classnames
|
|
1584
1584
|
*/
|
|
1585
|
-
var
|
|
1586
|
-
function
|
|
1587
|
-
return
|
|
1585
|
+
var nt;
|
|
1586
|
+
function ao() {
|
|
1587
|
+
return nt || (nt = 1, function(e) {
|
|
1588
1588
|
(function() {
|
|
1589
1589
|
var t = {}.hasOwnProperty;
|
|
1590
1590
|
function r() {
|
|
@@ -1613,10 +1613,10 @@ function no() {
|
|
|
1613
1613
|
}
|
|
1614
1614
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1615
1615
|
})();
|
|
1616
|
-
}(
|
|
1616
|
+
}(rt)), rt.exports;
|
|
1617
1617
|
}
|
|
1618
|
-
var
|
|
1619
|
-
const
|
|
1618
|
+
var io = ao();
|
|
1619
|
+
const uo = /* @__PURE__ */ oo(io), so = {
|
|
1620
1620
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1621
1621
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1622
1622
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1624,26 +1624,26 @@ const ao = /* @__PURE__ */ ro(oo), io = {
|
|
|
1624
1624
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1625
1625
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1626
1626
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1627
|
-
},
|
|
1627
|
+
}, co = uo.bind(so), ot = "purpur-icon", lo = "md", po = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), fo = ({ content: e = "", title: t } = {}) => {
|
|
1628
1628
|
const r = [
|
|
1629
1629
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1630
1630
|
{ name: "fill", value: "currentColor" },
|
|
1631
1631
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1632
1632
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1633
1633
|
], o = t ? `<title>${t}</title>` : "";
|
|
1634
|
-
return `<svg ${
|
|
1635
|
-
},
|
|
1634
|
+
return `<svg ${po(r)}>${o}${e}</svg>`;
|
|
1635
|
+
}, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), zt = ({
|
|
1636
1636
|
["data-testid"]: e,
|
|
1637
1637
|
svg: t,
|
|
1638
1638
|
allyTitle: r,
|
|
1639
1639
|
className: o,
|
|
1640
|
-
size: a =
|
|
1640
|
+
size: a = lo,
|
|
1641
1641
|
...n
|
|
1642
1642
|
}) => {
|
|
1643
|
-
const i =
|
|
1644
|
-
content:
|
|
1643
|
+
const i = fo({
|
|
1644
|
+
content: vo(t.svg),
|
|
1645
1645
|
title: r
|
|
1646
|
-
}), u =
|
|
1646
|
+
}), u = co(o, ot, `${ot}--${a}`);
|
|
1647
1647
|
return /* @__PURE__ */ p(
|
|
1648
1648
|
"span",
|
|
1649
1649
|
{
|
|
@@ -1655,26 +1655,26 @@ const ao = /* @__PURE__ */ ro(oo), io = {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
);
|
|
1657
1657
|
};
|
|
1658
|
-
|
|
1659
|
-
const
|
|
1658
|
+
zt.displayName = "Icon";
|
|
1659
|
+
const ho = {
|
|
1660
1660
|
name: "close",
|
|
1661
1661
|
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>',
|
|
1662
1662
|
keywords: ["close"],
|
|
1663
1663
|
category: "utility"
|
|
1664
|
-
},
|
|
1665
|
-
|
|
1666
|
-
function
|
|
1664
|
+
}, Ht = (e) => /* @__PURE__ */ p(zt, { ...e, svg: ho });
|
|
1665
|
+
Ht.displayName = "IconClose";
|
|
1666
|
+
function mo(e) {
|
|
1667
1667
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1668
1668
|
}
|
|
1669
|
-
var
|
|
1669
|
+
var at = { exports: {} };
|
|
1670
1670
|
/*!
|
|
1671
1671
|
Copyright (c) 2018 Jed Watson.
|
|
1672
1672
|
Licensed under the MIT License (MIT), see
|
|
1673
1673
|
http://jedwatson.github.io/classnames
|
|
1674
1674
|
*/
|
|
1675
|
-
var
|
|
1676
|
-
function
|
|
1677
|
-
return
|
|
1675
|
+
var it;
|
|
1676
|
+
function go() {
|
|
1677
|
+
return it || (it = 1, function(e) {
|
|
1678
1678
|
(function() {
|
|
1679
1679
|
var t = {}.hasOwnProperty;
|
|
1680
1680
|
function r() {
|
|
@@ -1703,10 +1703,10 @@ function ho() {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1705
1705
|
})();
|
|
1706
|
-
}(
|
|
1706
|
+
}(at)), at.exports;
|
|
1707
1707
|
}
|
|
1708
|
-
var
|
|
1709
|
-
const
|
|
1708
|
+
var _o = go();
|
|
1709
|
+
const yo = /* @__PURE__ */ mo(_o), X = {
|
|
1710
1710
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
1711
1711
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
1712
1712
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -1721,75 +1721,75 @@ const go = /* @__PURE__ */ vo(mo), K = {
|
|
|
1721
1721
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
1722
1722
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
1723
1723
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
1724
|
-
},
|
|
1724
|
+
}, bo = {
|
|
1725
1725
|
PARAGRAPH100: "paragraph-100"
|
|
1726
|
-
},
|
|
1726
|
+
}, Y = "purpur-paragraph", Gt = ({
|
|
1727
1727
|
["data-testid"]: e,
|
|
1728
1728
|
children: t,
|
|
1729
1729
|
className: r,
|
|
1730
1730
|
disabled: o,
|
|
1731
1731
|
enableHyphenation: a = !1,
|
|
1732
1732
|
negative: n = !1,
|
|
1733
|
-
variant: i =
|
|
1733
|
+
variant: i = bo.PARAGRAPH100,
|
|
1734
1734
|
...u
|
|
1735
1735
|
}) => {
|
|
1736
|
-
const d =
|
|
1736
|
+
const d = yo([
|
|
1737
1737
|
r,
|
|
1738
|
-
|
|
1739
|
-
|
|
1738
|
+
X[Y],
|
|
1739
|
+
X[`${Y}--${i}`],
|
|
1740
1740
|
{
|
|
1741
|
-
[
|
|
1742
|
-
[
|
|
1743
|
-
[
|
|
1741
|
+
[X[`${Y}--hyphens`]]: a,
|
|
1742
|
+
[X[`${Y}--disabled`]]: o,
|
|
1743
|
+
[X[`${Y}--negative`]]: n
|
|
1744
1744
|
}
|
|
1745
1745
|
]);
|
|
1746
1746
|
return /* @__PURE__ */ p("p", { ...u, className: d, "data-testid": e, children: t });
|
|
1747
1747
|
};
|
|
1748
|
-
|
|
1749
|
-
function
|
|
1748
|
+
Gt.displayName = "Paragraph";
|
|
1749
|
+
function ut(e, t) {
|
|
1750
1750
|
if (typeof e == "function")
|
|
1751
1751
|
return e(t);
|
|
1752
1752
|
e != null && (e.current = t);
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function wo(...e) {
|
|
1755
1755
|
return (t) => {
|
|
1756
1756
|
let r = !1;
|
|
1757
1757
|
const o = e.map((a) => {
|
|
1758
|
-
const n =
|
|
1758
|
+
const n = ut(a, t);
|
|
1759
1759
|
return !r && typeof n == "function" && (r = !0), n;
|
|
1760
1760
|
});
|
|
1761
1761
|
if (r)
|
|
1762
1762
|
return () => {
|
|
1763
1763
|
for (let a = 0; a < o.length; a++) {
|
|
1764
1764
|
const n = o[a];
|
|
1765
|
-
typeof n == "function" ? n() :
|
|
1765
|
+
typeof n == "function" ? n() : ut(e[a], null);
|
|
1766
1766
|
}
|
|
1767
1767
|
};
|
|
1768
1768
|
};
|
|
1769
1769
|
}
|
|
1770
|
-
var
|
|
1771
|
-
const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(
|
|
1770
|
+
var Kt = s.forwardRef((e, t) => {
|
|
1771
|
+
const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(Co);
|
|
1772
1772
|
if (n) {
|
|
1773
1773
|
const i = n.props.children, u = a.map((d) => d === n ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : d);
|
|
1774
|
-
return /* @__PURE__ */ p(
|
|
1774
|
+
return /* @__PURE__ */ p(Pe, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
|
|
1775
1775
|
}
|
|
1776
|
-
return /* @__PURE__ */ p(
|
|
1776
|
+
return /* @__PURE__ */ p(Pe, { ...o, ref: t, children: r });
|
|
1777
1777
|
});
|
|
1778
|
-
|
|
1779
|
-
var
|
|
1778
|
+
Kt.displayName = "Slot";
|
|
1779
|
+
var Pe = s.forwardRef((e, t) => {
|
|
1780
1780
|
const { children: r, ...o } = e;
|
|
1781
1781
|
if (s.isValidElement(r)) {
|
|
1782
|
-
const a =
|
|
1783
|
-
return r.type !== s.Fragment && (n.ref = t ?
|
|
1782
|
+
const a = No(r), n = So(o, r.props);
|
|
1783
|
+
return r.type !== s.Fragment && (n.ref = t ? wo(t, a) : a), s.cloneElement(r, n);
|
|
1784
1784
|
}
|
|
1785
1785
|
return s.Children.count(r) > 1 ? s.Children.only(null) : null;
|
|
1786
1786
|
});
|
|
1787
|
-
|
|
1788
|
-
var
|
|
1789
|
-
function
|
|
1790
|
-
return s.isValidElement(e) && e.type ===
|
|
1787
|
+
Pe.displayName = "SlotClone";
|
|
1788
|
+
var Eo = ({ children: e }) => /* @__PURE__ */ p(ie, { children: e });
|
|
1789
|
+
function Co(e) {
|
|
1790
|
+
return s.isValidElement(e) && e.type === Eo;
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function So(e, t) {
|
|
1793
1793
|
const r = { ...t };
|
|
1794
1794
|
for (const o in t) {
|
|
1795
1795
|
const a = e[o], n = t[o];
|
|
@@ -1799,12 +1799,12 @@ function Eo(e, t) {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
return { ...e, ...r };
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function No(e) {
|
|
1803
1803
|
var t, r;
|
|
1804
1804
|
let o = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning;
|
|
1805
1805
|
return a ? e.ref : (o = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
|
|
1806
1806
|
}
|
|
1807
|
-
var
|
|
1807
|
+
var Po = [
|
|
1808
1808
|
"a",
|
|
1809
1809
|
"button",
|
|
1810
1810
|
"div",
|
|
@@ -1821,15 +1821,15 @@ var So = [
|
|
|
1821
1821
|
"span",
|
|
1822
1822
|
"svg",
|
|
1823
1823
|
"ul"
|
|
1824
|
-
],
|
|
1824
|
+
], Oo = Po.reduce((e, t) => {
|
|
1825
1825
|
const r = s.forwardRef((o, a) => {
|
|
1826
|
-
const { asChild: n, ...i } = o, u = n ?
|
|
1826
|
+
const { asChild: n, ...i } = o, u = n ? Kt : t;
|
|
1827
1827
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(u, { ...i, ref: a });
|
|
1828
1828
|
});
|
|
1829
1829
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
1830
|
-
}, {}),
|
|
1830
|
+
}, {}), xo = "VisuallyHidden", Xt = s.forwardRef(
|
|
1831
1831
|
(e, t) => /* @__PURE__ */ p(
|
|
1832
|
-
|
|
1832
|
+
Oo.span,
|
|
1833
1833
|
{
|
|
1834
1834
|
...e,
|
|
1835
1835
|
ref: t,
|
|
@@ -1850,26 +1850,26 @@ var So = [
|
|
|
1850
1850
|
}
|
|
1851
1851
|
)
|
|
1852
1852
|
);
|
|
1853
|
-
|
|
1854
|
-
var
|
|
1855
|
-
const
|
|
1853
|
+
Xt.displayName = xo;
|
|
1854
|
+
var Ro = Xt;
|
|
1855
|
+
const Ao = ({
|
|
1856
1856
|
asChild: e,
|
|
1857
1857
|
children: t,
|
|
1858
1858
|
className: r = "",
|
|
1859
1859
|
["data-testid"]: o
|
|
1860
|
-
}) => /* @__PURE__ */ p(
|
|
1861
|
-
function
|
|
1860
|
+
}) => /* @__PURE__ */ p(Ro, { asChild: e, "data-testid": o, className: r, children: t });
|
|
1861
|
+
function Do(e) {
|
|
1862
1862
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1863
1863
|
}
|
|
1864
|
-
var
|
|
1864
|
+
var ye = { exports: {} };
|
|
1865
1865
|
/*!
|
|
1866
1866
|
Copyright (c) 2018 Jed Watson.
|
|
1867
1867
|
Licensed under the MIT License (MIT), see
|
|
1868
1868
|
http://jedwatson.github.io/classnames
|
|
1869
1869
|
*/
|
|
1870
|
-
var
|
|
1871
|
-
function
|
|
1872
|
-
return
|
|
1870
|
+
var st;
|
|
1871
|
+
function To() {
|
|
1872
|
+
return st || (st = 1, function(e) {
|
|
1873
1873
|
(function() {
|
|
1874
1874
|
var t = {}.hasOwnProperty;
|
|
1875
1875
|
function r() {
|
|
@@ -1898,31 +1898,31 @@ function Ao() {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1900
1900
|
})();
|
|
1901
|
-
}(
|
|
1902
|
-
}
|
|
1903
|
-
var
|
|
1904
|
-
const
|
|
1905
|
-
"purpur-modal-content": "_purpur-modal-
|
|
1906
|
-
fadeIn:
|
|
1907
|
-
"purpur-modal-content__overlay": "_purpur-modal-
|
|
1908
|
-
"purpur-modal-content__close-button": "_purpur-modal-content__close-
|
|
1909
|
-
"purpur-modal-content__wrapper": "_purpur-modal-
|
|
1910
|
-
"purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-
|
|
1911
|
-
"purpur-modal-content__image-wrapper": "_purpur-modal-content__image-
|
|
1912
|
-
"purpur-modal-content__header": "_purpur-modal-
|
|
1913
|
-
"purpur-modal-content__title": "_purpur-modal-
|
|
1914
|
-
"purpur-modal-content__description": "_purpur-modal-
|
|
1915
|
-
"purpur-modal-content__body": "_purpur-modal-
|
|
1916
|
-
"purpur-modal-content__body-inner": "_purpur-modal-content__body-
|
|
1917
|
-
"purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-
|
|
1918
|
-
"purpur-modal-content__actions-button": "_purpur-modal-content__actions-
|
|
1919
|
-
"purpur-modal-content__notification": "_purpur-modal-
|
|
1920
|
-
"purpur-modal-content--with-image": "_purpur-modal-content--with-
|
|
1921
|
-
"purpur-modal-content--overflow": "_purpur-modal-content--
|
|
1922
|
-
"purpur-modal-content__actions": "_purpur-modal-
|
|
1923
|
-
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-
|
|
1924
|
-
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-
|
|
1925
|
-
},
|
|
1901
|
+
}(ye)), ye.exports;
|
|
1902
|
+
}
|
|
1903
|
+
var Mo = To();
|
|
1904
|
+
const $o = /* @__PURE__ */ Do(Mo), Io = "_fadeIn_1bcc3_1", Lo = {
|
|
1905
|
+
"purpur-modal-content": "_purpur-modal-content_1bcc3_1",
|
|
1906
|
+
fadeIn: Io,
|
|
1907
|
+
"purpur-modal-content__overlay": "_purpur-modal-content__overlay_1bcc3_30",
|
|
1908
|
+
"purpur-modal-content__close-button": "_purpur-modal-content__close-button_1bcc3_37",
|
|
1909
|
+
"purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_1bcc3_47",
|
|
1910
|
+
"purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-inner_1bcc3_57",
|
|
1911
|
+
"purpur-modal-content__image-wrapper": "_purpur-modal-content__image-wrapper_1bcc3_61",
|
|
1912
|
+
"purpur-modal-content__header": "_purpur-modal-content__header_1bcc3_84",
|
|
1913
|
+
"purpur-modal-content__title": "_purpur-modal-content__title_1bcc3_97",
|
|
1914
|
+
"purpur-modal-content__description": "_purpur-modal-content__description_1bcc3_100",
|
|
1915
|
+
"purpur-modal-content__body": "_purpur-modal-content__body_1bcc3_103",
|
|
1916
|
+
"purpur-modal-content__body-inner": "_purpur-modal-content__body-inner_1bcc3_111",
|
|
1917
|
+
"purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-buttons_1bcc3_123",
|
|
1918
|
+
"purpur-modal-content__actions-button": "_purpur-modal-content__actions-button_1bcc3_123",
|
|
1919
|
+
"purpur-modal-content__notification": "_purpur-modal-content__notification_1bcc3_146",
|
|
1920
|
+
"purpur-modal-content--with-image": "_purpur-modal-content--with-image_1bcc3_149",
|
|
1921
|
+
"purpur-modal-content--overflow": "_purpur-modal-content--overflow_1bcc3_149",
|
|
1922
|
+
"purpur-modal-content__actions": "_purpur-modal-content__actions_1bcc3_123",
|
|
1923
|
+
"purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_1bcc3_180",
|
|
1924
|
+
"purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_1bcc3_190"
|
|
1925
|
+
}, ct = (e) => e.showCloseButton === !0, P = $o.bind(Lo), N = "purpur-modal-content", ko = Oe(
|
|
1926
1926
|
({
|
|
1927
1927
|
["data-testid"]: e,
|
|
1928
1928
|
actions: t,
|
|
@@ -1938,94 +1938,97 @@ const To = /* @__PURE__ */ Ro(Do), Mo = "_fadeIn_1ifm3_1", $o = {
|
|
|
1938
1938
|
notification: v = void 0,
|
|
1939
1939
|
zIndex: h,
|
|
1940
1940
|
onCloseAutoFocus: g,
|
|
1941
|
-
...
|
|
1941
|
+
...b
|
|
1942
1942
|
}, l) => {
|
|
1943
|
-
const { closeButtonAllyLabel: m, showCloseButton: _, ...S } =
|
|
1943
|
+
const { closeButtonAllyLabel: m, showCloseButton: _, ...S } = b, [w, E] = be(!1), [C, x] = be(0), y = we(null), O = we(null), L = P([
|
|
1944
1944
|
N,
|
|
1945
1945
|
{ [`${N}--with-image`]: !!u },
|
|
1946
1946
|
{ [`${N}--overflow`]: w },
|
|
1947
1947
|
{ [`${N}--sticky-footer`]: c },
|
|
1948
1948
|
o
|
|
1949
|
-
]),
|
|
1949
|
+
]), D = (k) => e ? `${e} ${k}` : void 0, Yt = (k) => {
|
|
1950
1950
|
n && k.preventDefault();
|
|
1951
|
-
},
|
|
1952
|
-
if (!
|
|
1951
|
+
}, q = er(() => {
|
|
1952
|
+
if (!y.current || !O.current)
|
|
1953
1953
|
return;
|
|
1954
|
-
const k = window.getComputedStyle(
|
|
1955
|
-
E(
|
|
1956
|
-
|
|
1954
|
+
const k = window.getComputedStyle(y.current, null), Qt = parseFloat(k.getPropertyValue("height")), Jt = O.current.offsetHeight;
|
|
1955
|
+
E(Qt < Jt), x(
|
|
1956
|
+
(y.current.offsetWidth ?? 0) - (y.current.clientWidth ?? 0)
|
|
1957
|
+
);
|
|
1958
|
+
}, []), Zt = (k) => {
|
|
1957
1959
|
n && !_ && k.preventDefault();
|
|
1958
1960
|
};
|
|
1959
|
-
return
|
|
1960
|
-
window.removeEventListener("resize",
|
|
1961
|
-
}), [
|
|
1962
|
-
|
|
1963
|
-
}, [v, r,
|
|
1964
|
-
/* @__PURE__ */ p(
|
|
1961
|
+
return Ee(() => (window.addEventListener("resize", q), () => {
|
|
1962
|
+
window.removeEventListener("resize", q);
|
|
1963
|
+
}), [q]), Ee(() => {
|
|
1964
|
+
q();
|
|
1965
|
+
}, [v, r, q]), /* @__PURE__ */ R(Mn, { children: [
|
|
1966
|
+
/* @__PURE__ */ p($n, { className: P(`${N}__overlay`), style: { zIndex: h } }),
|
|
1965
1967
|
/* @__PURE__ */ R(
|
|
1966
|
-
|
|
1968
|
+
In,
|
|
1967
1969
|
{
|
|
1968
1970
|
...S,
|
|
1969
|
-
className:
|
|
1971
|
+
className: L,
|
|
1970
1972
|
"data-testid": e,
|
|
1971
1973
|
ref: l,
|
|
1972
1974
|
...!a && { "aria-describedby": void 0 },
|
|
1973
|
-
onPointerDownOutside:
|
|
1974
|
-
onOpenAutoFocus:
|
|
1975
|
-
onEscapeKeyDown:
|
|
1975
|
+
onPointerDownOutside: Yt,
|
|
1976
|
+
onOpenAutoFocus: q,
|
|
1977
|
+
onEscapeKeyDown: Zt,
|
|
1976
1978
|
onCloseAutoFocus: g,
|
|
1977
1979
|
style: { zIndex: `calc(${h} + 1)` },
|
|
1978
1980
|
children: [
|
|
1979
|
-
/* @__PURE__ */ R("div", { ref:
|
|
1980
|
-
|
|
1981
|
-
|
|
1981
|
+
/* @__PURE__ */ R("div", { ref: y, className: P(`${N}__wrapper`), children: [
|
|
1982
|
+
ct(b) && m && u && /* @__PURE__ */ p(
|
|
1983
|
+
lt,
|
|
1982
1984
|
{
|
|
1983
1985
|
allyLabel: m,
|
|
1984
1986
|
hasImage: !0,
|
|
1985
|
-
|
|
1987
|
+
scrollbarWidth: C,
|
|
1988
|
+
"data-testid": D("close-button")
|
|
1986
1989
|
}
|
|
1987
1990
|
),
|
|
1988
|
-
/* @__PURE__ */ R("div", { ref:
|
|
1989
|
-
/* @__PURE__ */ R("div", { className:
|
|
1990
|
-
|
|
1991
|
-
|
|
1991
|
+
/* @__PURE__ */ R("div", { ref: O, className: P(`${N}__wrapper-inner`), children: [
|
|
1992
|
+
/* @__PURE__ */ R("div", { className: P(`${N}__header`), children: [
|
|
1993
|
+
ct(b) && m && !u && /* @__PURE__ */ p(
|
|
1994
|
+
lt,
|
|
1992
1995
|
{
|
|
1993
1996
|
allyLabel: m,
|
|
1994
|
-
"data-testid":
|
|
1997
|
+
"data-testid": D("close-button")
|
|
1995
1998
|
}
|
|
1996
1999
|
),
|
|
1997
2000
|
/* @__PURE__ */ p(
|
|
1998
|
-
|
|
2001
|
+
Ln,
|
|
1999
2002
|
{
|
|
2000
2003
|
asChild: !0,
|
|
2001
|
-
className:
|
|
2002
|
-
"data-testid":
|
|
2003
|
-
children: /* @__PURE__ */ p(
|
|
2004
|
+
className: P(`${N}__title`),
|
|
2005
|
+
"data-testid": D("title"),
|
|
2006
|
+
children: /* @__PURE__ */ p(Vt, { tag: "h2", variant: "title-200", children: f })
|
|
2004
2007
|
}
|
|
2005
2008
|
)
|
|
2006
2009
|
] }),
|
|
2007
2010
|
u && /* @__PURE__ */ p(
|
|
2008
2011
|
"div",
|
|
2009
2012
|
{
|
|
2010
|
-
className:
|
|
2011
|
-
"data-testid":
|
|
2013
|
+
className: P(`${N}__image-wrapper`),
|
|
2014
|
+
"data-testid": D("image"),
|
|
2012
2015
|
children: u
|
|
2013
2016
|
}
|
|
2014
2017
|
),
|
|
2015
|
-
/* @__PURE__ */ p("div", { className:
|
|
2016
|
-
a && i && /* @__PURE__ */ p(
|
|
2018
|
+
/* @__PURE__ */ p("div", { className: P(`${N}__body`), children: /* @__PURE__ */ R("div", { className: P(`${N}__body-inner`), children: [
|
|
2019
|
+
a && i && /* @__PURE__ */ p(Ao, { asChild: !0, children: /* @__PURE__ */ p(Ke, { "data-testid": D("description"), children: a }) }),
|
|
2017
2020
|
a && !i && /* @__PURE__ */ p(
|
|
2018
|
-
|
|
2021
|
+
Ke,
|
|
2019
2022
|
{
|
|
2020
2023
|
asChild: !0,
|
|
2021
|
-
className:
|
|
2022
|
-
"data-testid":
|
|
2023
|
-
children: /* @__PURE__ */ p(
|
|
2024
|
+
className: P(`${N}__description`),
|
|
2025
|
+
"data-testid": D("description"),
|
|
2026
|
+
children: /* @__PURE__ */ p(Gt, { variant: "paragraph-100", children: a })
|
|
2024
2027
|
}
|
|
2025
2028
|
),
|
|
2026
2029
|
/* @__PURE__ */ p("div", { children: r }),
|
|
2027
2030
|
!c && /* @__PURE__ */ p(
|
|
2028
|
-
|
|
2031
|
+
dt,
|
|
2029
2032
|
{
|
|
2030
2033
|
actions: t,
|
|
2031
2034
|
primaryActionVariant: d,
|
|
@@ -2036,7 +2039,7 @@ const To = /* @__PURE__ */ Ro(Do), Mo = "_fadeIn_1ifm3_1", $o = {
|
|
|
2036
2039
|
] })
|
|
2037
2040
|
] }),
|
|
2038
2041
|
c && /* @__PURE__ */ p(
|
|
2039
|
-
|
|
2042
|
+
dt,
|
|
2040
2043
|
{
|
|
2041
2044
|
actions: t,
|
|
2042
2045
|
primaryActionVariant: d,
|
|
@@ -2048,42 +2051,44 @@ const To = /* @__PURE__ */ Ro(Do), Mo = "_fadeIn_1ifm3_1", $o = {
|
|
|
2048
2051
|
)
|
|
2049
2052
|
] });
|
|
2050
2053
|
}
|
|
2051
|
-
),
|
|
2054
|
+
), lt = ({
|
|
2052
2055
|
allyLabel: e,
|
|
2053
2056
|
hasImage: t,
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
+
scrollbarWidth: r,
|
|
2058
|
+
["data-testid"]: o
|
|
2059
|
+
}) => /* @__PURE__ */ p(kn, { asChild: !0, children: /* @__PURE__ */ p(
|
|
2060
|
+
Me,
|
|
2057
2061
|
{
|
|
2058
2062
|
variant: t ? "primary" : "tertiary-purple",
|
|
2059
2063
|
negative: t,
|
|
2060
2064
|
size: "sm",
|
|
2061
2065
|
iconOnly: !0,
|
|
2062
2066
|
"aria-label": e,
|
|
2063
|
-
className:
|
|
2064
|
-
|
|
2065
|
-
|
|
2067
|
+
className: P(`${N}__close-button`),
|
|
2068
|
+
style: { right: `calc(var(--purpur-spacing-100) + ${r || 0}px)` },
|
|
2069
|
+
"data-testid": o,
|
|
2070
|
+
children: /* @__PURE__ */ p(Ht, {})
|
|
2066
2071
|
}
|
|
2067
|
-
) }),
|
|
2072
|
+
) }), Fo = 3, dt = ({
|
|
2068
2073
|
actions: e,
|
|
2069
2074
|
primaryActionVariant: t,
|
|
2070
2075
|
notification: r
|
|
2071
2076
|
}) => {
|
|
2072
|
-
const o =
|
|
2073
|
-
return
|
|
2077
|
+
const o = we(null), a = [t, "secondary", "text"];
|
|
2078
|
+
return Ee(() => {
|
|
2074
2079
|
var n, i;
|
|
2075
2080
|
r && ((i = (n = o == null ? void 0 : o.current) == null ? void 0 : n.scrollIntoView) == null || i.call(n, !1));
|
|
2076
|
-
}, [r]), e && e.length > 0 ? /* @__PURE__ */ R("div", { className:
|
|
2077
|
-
/* @__PURE__ */ p("div", { className:
|
|
2081
|
+
}, [r]), e && e.length > 0 ? /* @__PURE__ */ R("div", { className: P(`${N}__actions`), children: [
|
|
2082
|
+
/* @__PURE__ */ p("div", { className: P(`${N}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, Fo).map(
|
|
2078
2083
|
({ label: n, onClick: i, disabled: u, loading: d, iconPosition: c = "right", icon: f, ...v }, h) => /* @__PURE__ */ R(
|
|
2079
|
-
|
|
2084
|
+
Me,
|
|
2080
2085
|
{
|
|
2081
2086
|
"data-testid": "modal actions button",
|
|
2082
2087
|
variant: a[h] || "",
|
|
2083
2088
|
onClick: i,
|
|
2084
2089
|
disabled: u,
|
|
2085
2090
|
loading: d,
|
|
2086
|
-
className:
|
|
2091
|
+
className: P(`${N}__actions-button`),
|
|
2087
2092
|
...v,
|
|
2088
2093
|
children: [
|
|
2089
2094
|
c === "left" && f && f,
|
|
@@ -2094,21 +2099,21 @@ const To = /* @__PURE__ */ Ro(Do), Mo = "_fadeIn_1ifm3_1", $o = {
|
|
|
2094
2099
|
n
|
|
2095
2100
|
)
|
|
2096
2101
|
) }),
|
|
2097
|
-
r && /* @__PURE__ */ p("div", { className:
|
|
2098
|
-
/* @__PURE__ */ p("span", { className:
|
|
2102
|
+
r && /* @__PURE__ */ p("div", { className: P(`${N}__notification`), ref: o, children: r }),
|
|
2103
|
+
/* @__PURE__ */ p("span", { className: P(`${N}__actions-separator`) })
|
|
2099
2104
|
] }) : null;
|
|
2100
|
-
},
|
|
2101
|
-
({ ["data-testid"]: e, children: t, className: r, ...o }, a) => /* @__PURE__ */ p(
|
|
2102
|
-
),
|
|
2105
|
+
}, Wo = Oe(
|
|
2106
|
+
({ ["data-testid"]: e, children: t, className: r, ...o }, a) => /* @__PURE__ */ p(Tn, { asChild: !0, ref: a, "data-testid": e, className: r, ...o, children: t })
|
|
2107
|
+
), $e = ({
|
|
2103
2108
|
["data-testid"]: e,
|
|
2104
2109
|
children: t,
|
|
2105
2110
|
open: r,
|
|
2106
2111
|
onOpenChange: o
|
|
2107
|
-
}) => /* @__PURE__ */ p(
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2112
|
+
}) => /* @__PURE__ */ p(Dn, { open: r, onOpenChange: o, "data-testid": e, children: t });
|
|
2113
|
+
$e.Trigger = Wo;
|
|
2114
|
+
$e.Content = ko;
|
|
2115
|
+
$e.displayName = "Modal";
|
|
2111
2116
|
export {
|
|
2112
|
-
|
|
2117
|
+
$e as Modal
|
|
2113
2118
|
};
|
|
2114
2119
|
//# sourceMappingURL=modal.es.js.map
|