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