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