@purpurds/drawer 7.13.1 → 8.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 +4 -4
- package/dist/drawer-content.d.ts +4 -0
- package/dist/drawer-content.d.ts.map +1 -1
- package/dist/drawer-frame.d.ts +2 -1
- package/dist/drawer-frame.d.ts.map +1 -1
- package/dist/drawer.cjs.js +15 -15
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +703 -691
- package/dist/drawer.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/drawer-content.module.scss +25 -3
- package/src/drawer-content.tsx +6 -1
- package/src/drawer-frame.module.scss +9 -2
- package/src/drawer-frame.tsx +5 -1
- package/src/drawer.stories.tsx +2 -0
- package/src/types.ts +2 -0
package/dist/drawer.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as f, Fragment as B, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import Ie, { useState as
|
|
4
|
-
import * as
|
|
3
|
+
import Ie, { useState as Ot, createContext as Lt, forwardRef as j, useRef as $t, useContext as Mt, useEffect as It } from "react";
|
|
4
|
+
import * as kt from "react-dom";
|
|
5
5
|
import Wt from "react-dom";
|
|
6
|
-
function
|
|
6
|
+
function R(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
8
|
if (e == null || e(a), t === !1 || !a.defaultPrevented)
|
|
9
9
|
return r == null ? void 0 : r(a);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function nr(e, r) {
|
|
13
13
|
if (typeof e == "function")
|
|
14
14
|
return e(r);
|
|
15
15
|
e != null && (e.current = r);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Tr(...e) {
|
|
18
18
|
return (r) => {
|
|
19
19
|
let t = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
21
|
-
const n =
|
|
21
|
+
const n = nr(a, r);
|
|
22
22
|
return !t && typeof n == "function" && (t = !0), n;
|
|
23
23
|
});
|
|
24
24
|
if (t)
|
|
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() : nr(e[a], null);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function L(...e) {
|
|
34
|
-
return c.useCallback(
|
|
34
|
+
return c.useCallback(Tr(...e), e);
|
|
35
35
|
}
|
|
36
36
|
function Ft(e, r) {
|
|
37
37
|
const t = c.createContext(r), o = (n) => {
|
|
@@ -47,20 +47,20 @@ function Ft(e, r) {
|
|
|
47
47
|
}
|
|
48
48
|
return [o, a];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Or(e, r = []) {
|
|
51
51
|
let t = [];
|
|
52
52
|
function o(n, s) {
|
|
53
53
|
const i = c.createContext(s), u = t.length;
|
|
54
54
|
t = [...t, s];
|
|
55
55
|
const l = (p) => {
|
|
56
56
|
var _;
|
|
57
|
-
const { scope:
|
|
58
|
-
return /* @__PURE__ */ f(
|
|
57
|
+
const { scope: h, children: m, ...w } = p, v = ((_ = h == null ? void 0 : h[e]) == null ? void 0 : _[u]) || i, g = c.useMemo(() => w, Object.values(w));
|
|
58
|
+
return /* @__PURE__ */ f(v.Provider, { value: g, children: m });
|
|
59
59
|
};
|
|
60
60
|
l.displayName = n + "Provider";
|
|
61
|
-
function d(p,
|
|
62
|
-
var
|
|
63
|
-
const m = ((
|
|
61
|
+
function d(p, h) {
|
|
62
|
+
var v;
|
|
63
|
+
const m = ((v = h == null ? void 0 : h[e]) == null ? void 0 : v[u]) || i, w = c.useContext(m);
|
|
64
64
|
if (w) return w;
|
|
65
65
|
if (s !== void 0) return s;
|
|
66
66
|
throw new Error(`\`${p}\` must be used within \`${n}\``);
|
|
@@ -77,9 +77,9 @@ function Tr(e, r = []) {
|
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
return a.scopeName = e, [o,
|
|
80
|
+
return a.scopeName = e, [o, Ut(a, ...r)];
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ut(...e) {
|
|
83
83
|
const r = e[0];
|
|
84
84
|
if (e.length === 1) return r;
|
|
85
85
|
const t = () => {
|
|
@@ -97,13 +97,13 @@ function kt(...e) {
|
|
|
97
97
|
};
|
|
98
98
|
return t.scopeName = r.scopeName, t;
|
|
99
99
|
}
|
|
100
|
-
var
|
|
101
|
-
},
|
|
102
|
-
}),
|
|
100
|
+
var se = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
101
|
+
}, Ht = c.useId || (() => {
|
|
102
|
+
}), Bt = 0;
|
|
103
103
|
function Pe(e) {
|
|
104
|
-
const [r, t] = c.useState(
|
|
105
|
-
return
|
|
106
|
-
t((o) => o ?? String(
|
|
104
|
+
const [r, t] = c.useState(Ht());
|
|
105
|
+
return se(() => {
|
|
106
|
+
t((o) => o ?? String(Bt++));
|
|
107
107
|
}, [e]), e || (r ? `radix-${r}` : "");
|
|
108
108
|
}
|
|
109
109
|
function T(e) {
|
|
@@ -115,13 +115,13 @@ function T(e) {
|
|
|
115
115
|
return (o = r.current) == null ? void 0 : o.call(r, ...t);
|
|
116
116
|
}, []);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function jt({
|
|
119
119
|
prop: e,
|
|
120
120
|
defaultProp: r,
|
|
121
121
|
onChange: t = () => {
|
|
122
122
|
}
|
|
123
123
|
}) {
|
|
124
|
-
const [o, a] =
|
|
124
|
+
const [o, a] = zt({ defaultProp: r, onChange: t }), n = e !== void 0, s = n ? e : o, i = T(t), u = c.useCallback(
|
|
125
125
|
(l) => {
|
|
126
126
|
if (n) {
|
|
127
127
|
const p = typeof l == "function" ? l(e) : l;
|
|
@@ -133,7 +133,7 @@ function Bt({
|
|
|
133
133
|
);
|
|
134
134
|
return [s, u];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function zt({
|
|
137
137
|
defaultProp: e,
|
|
138
138
|
onChange: r
|
|
139
139
|
}) {
|
|
@@ -143,28 +143,28 @@ function jt({
|
|
|
143
143
|
}, [o, a, n]), t;
|
|
144
144
|
}
|
|
145
145
|
var Ve = c.forwardRef((e, r) => {
|
|
146
|
-
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(
|
|
146
|
+
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(Yt);
|
|
147
147
|
if (n) {
|
|
148
148
|
const s = n.props.children, i = a.map((u) => u === n ? c.Children.count(s) > 1 ? c.Children.only(null) : c.isValidElement(s) ? s.props.children : null : u);
|
|
149
|
-
return /* @__PURE__ */ f(
|
|
149
|
+
return /* @__PURE__ */ f(ke, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
150
150
|
}
|
|
151
|
-
return /* @__PURE__ */ f(
|
|
151
|
+
return /* @__PURE__ */ f(ke, { ...o, ref: r, children: t });
|
|
152
152
|
});
|
|
153
153
|
Ve.displayName = "Slot";
|
|
154
|
-
var
|
|
154
|
+
var ke = c.forwardRef((e, r) => {
|
|
155
155
|
const { children: t, ...o } = e;
|
|
156
156
|
if (c.isValidElement(t)) {
|
|
157
|
-
const a = qt(t), n =
|
|
158
|
-
return t.type !== c.Fragment && (n.ref = r ?
|
|
157
|
+
const a = qt(t), n = Xt(o, t.props);
|
|
158
|
+
return t.type !== c.Fragment && (n.ref = r ? Tr(r, a) : a), c.cloneElement(t, n);
|
|
159
159
|
}
|
|
160
160
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
161
161
|
});
|
|
162
|
-
|
|
163
|
-
var
|
|
164
|
-
function
|
|
165
|
-
return c.isValidElement(e) && e.type ===
|
|
162
|
+
ke.displayName = "SlotClone";
|
|
163
|
+
var Vt = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
|
|
164
|
+
function Yt(e) {
|
|
165
|
+
return c.isValidElement(e) && e.type === Vt;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Xt(e, r) {
|
|
168
168
|
const t = { ...r };
|
|
169
169
|
for (const o in r) {
|
|
170
170
|
const a = e[o], n = r[o];
|
|
@@ -179,7 +179,7 @@ function qt(e) {
|
|
|
179
179
|
let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
180
180
|
return t ? e.ref : (r = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
181
181
|
}
|
|
182
|
-
var
|
|
182
|
+
var Gt = [
|
|
183
183
|
"a",
|
|
184
184
|
"button",
|
|
185
185
|
"div",
|
|
@@ -196,17 +196,17 @@ var Xt = [
|
|
|
196
196
|
"span",
|
|
197
197
|
"svg",
|
|
198
198
|
"ul"
|
|
199
|
-
], O =
|
|
199
|
+
], O = Gt.reduce((e, r) => {
|
|
200
200
|
const t = c.forwardRef((o, a) => {
|
|
201
201
|
const { asChild: n, ...s } = o, i = n ? Ve : r;
|
|
202
202
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...s, ref: a });
|
|
203
203
|
});
|
|
204
204
|
return t.displayName = `Primitive.${r}`, { ...e, [r]: t };
|
|
205
205
|
}, {});
|
|
206
|
-
function
|
|
207
|
-
e &&
|
|
206
|
+
function Kt(e, r) {
|
|
207
|
+
e && kt.flushSync(() => e.dispatchEvent(r));
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Zt(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
210
210
|
const t = T(e);
|
|
211
211
|
c.useEffect(() => {
|
|
212
212
|
const o = (a) => {
|
|
@@ -215,11 +215,11 @@ function Kt(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
215
215
|
return r.addEventListener("keydown", o, { capture: !0 }), () => r.removeEventListener("keydown", o, { capture: !0 });
|
|
216
216
|
}, [t, r]);
|
|
217
217
|
}
|
|
218
|
-
var
|
|
218
|
+
var Qt = "DismissableLayer", We = "dismissableLayer.update", Jt = "dismissableLayer.pointerDownOutside", en = "dismissableLayer.focusOutside", or, Lr = c.createContext({
|
|
219
219
|
layers: /* @__PURE__ */ new Set(),
|
|
220
220
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
221
221
|
branches: /* @__PURE__ */ new Set()
|
|
222
|
-
}),
|
|
222
|
+
}), $r = c.forwardRef(
|
|
223
223
|
(e, r) => {
|
|
224
224
|
const {
|
|
225
225
|
disableOutsidePointerEvents: t = !1,
|
|
@@ -229,37 +229,37 @@ var Zt = "DismissableLayer", Fe = "dismissableLayer.update", Qt = "dismissableLa
|
|
|
229
229
|
onInteractOutside: s,
|
|
230
230
|
onDismiss: i,
|
|
231
231
|
...u
|
|
232
|
-
} = e, l = c.useContext(
|
|
233
|
-
const
|
|
234
|
-
!
|
|
235
|
-
},
|
|
236
|
-
const
|
|
237
|
-
[...l.branches].some((A) => A.contains(
|
|
238
|
-
},
|
|
239
|
-
return
|
|
232
|
+
} = e, l = c.useContext(Lr), [d, p] = c.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), w = L(r, (S) => p(S)), v = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = v.indexOf(g), E = d ? v.indexOf(d) : -1, y = l.layersWithOutsidePointerEventsDisabled.size > 0, b = E >= _, C = nn((S) => {
|
|
233
|
+
const N = S.target, P = [...l.branches].some((A) => A.contains(N));
|
|
234
|
+
!b || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
235
|
+
}, h), x = on((S) => {
|
|
236
|
+
const N = S.target;
|
|
237
|
+
[...l.branches].some((A) => A.contains(N)) || (n == null || n(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
238
|
+
}, h);
|
|
239
|
+
return Zt((S) => {
|
|
240
240
|
E === l.layers.size - 1 && (o == null || o(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
241
|
-
},
|
|
241
|
+
}, h), c.useEffect(() => {
|
|
242
242
|
if (d)
|
|
243
|
-
return t && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
244
|
-
t && l.layersWithOutsidePointerEventsDisabled.size === 1 && (
|
|
243
|
+
return t && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (or = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), ar(), () => {
|
|
244
|
+
t && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = or);
|
|
245
245
|
};
|
|
246
|
-
}, [d,
|
|
247
|
-
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
246
|
+
}, [d, h, t, l]), c.useEffect(() => () => {
|
|
247
|
+
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), ar());
|
|
248
248
|
}, [d, l]), c.useEffect(() => {
|
|
249
249
|
const S = () => m({});
|
|
250
|
-
return document.addEventListener(
|
|
250
|
+
return document.addEventListener(We, S), () => document.removeEventListener(We, S);
|
|
251
251
|
}, []), /* @__PURE__ */ f(
|
|
252
252
|
O.div,
|
|
253
253
|
{
|
|
254
254
|
...u,
|
|
255
255
|
ref: w,
|
|
256
256
|
style: {
|
|
257
|
-
pointerEvents:
|
|
257
|
+
pointerEvents: y ? b ? "auto" : "none" : void 0,
|
|
258
258
|
...e.style
|
|
259
259
|
},
|
|
260
|
-
onFocusCapture:
|
|
261
|
-
onBlurCapture:
|
|
262
|
-
onPointerDownCapture:
|
|
260
|
+
onFocusCapture: R(e.onFocusCapture, x.onFocusCapture),
|
|
261
|
+
onBlurCapture: R(e.onBlurCapture, x.onBlurCapture),
|
|
262
|
+
onPointerDownCapture: R(
|
|
263
263
|
e.onPointerDownCapture,
|
|
264
264
|
C.onPointerDownCapture
|
|
265
265
|
)
|
|
@@ -267,9 +267,9 @@ var Zt = "DismissableLayer", Fe = "dismissableLayer.update", Qt = "dismissableLa
|
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
|
-
|
|
271
|
-
var
|
|
272
|
-
const t = c.useContext(
|
|
270
|
+
$r.displayName = Qt;
|
|
271
|
+
var rn = "DismissableLayerBranch", tn = c.forwardRef((e, r) => {
|
|
272
|
+
const t = c.useContext(Lr), o = c.useRef(null), a = L(r, o);
|
|
273
273
|
return c.useEffect(() => {
|
|
274
274
|
const n = o.current;
|
|
275
275
|
if (n)
|
|
@@ -278,16 +278,16 @@ var en = "DismissableLayerBranch", rn = c.forwardRef((e, r) => {
|
|
|
278
278
|
};
|
|
279
279
|
}, [t.branches]), /* @__PURE__ */ f(O.div, { ...e, ref: a });
|
|
280
280
|
});
|
|
281
|
-
|
|
282
|
-
function
|
|
281
|
+
tn.displayName = rn;
|
|
282
|
+
function nn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
283
283
|
const t = T(e), o = c.useRef(!1), a = c.useRef(() => {
|
|
284
284
|
});
|
|
285
285
|
return c.useEffect(() => {
|
|
286
286
|
const n = (i) => {
|
|
287
287
|
if (i.target && !o.current) {
|
|
288
288
|
let u = function() {
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
Mr(
|
|
290
|
+
Jt,
|
|
291
291
|
t,
|
|
292
292
|
l,
|
|
293
293
|
{ discrete: !0 }
|
|
@@ -309,11 +309,11 @@ function tn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
309
309
|
onPointerDownCapture: () => o.current = !0
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function on(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
313
313
|
const t = T(e), o = c.useRef(!1);
|
|
314
314
|
return c.useEffect(() => {
|
|
315
315
|
const a = (n) => {
|
|
316
|
-
n.target && !o.current &&
|
|
316
|
+
n.target && !o.current && Mr(en, t, { originalEvent: n }, {
|
|
317
317
|
discrete: !1
|
|
318
318
|
});
|
|
319
319
|
};
|
|
@@ -323,22 +323,22 @@ function nn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
323
323
|
onBlurCapture: () => o.current = !1
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
const e = new CustomEvent(
|
|
326
|
+
function ar() {
|
|
327
|
+
const e = new CustomEvent(We);
|
|
328
328
|
document.dispatchEvent(e);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function Mr(e, r, t, { discrete: o }) {
|
|
331
331
|
const a = t.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: t });
|
|
332
|
-
r && a.addEventListener(e, r, { once: !0 }), o ?
|
|
332
|
+
r && a.addEventListener(e, r, { once: !0 }), o ? Kt(a, n) : a.dispatchEvent(n);
|
|
333
333
|
}
|
|
334
|
-
var
|
|
334
|
+
var xe = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ir = { bubbles: !1, cancelable: !0 }, an = "FocusScope", Ir = c.forwardRef((e, r) => {
|
|
335
335
|
const {
|
|
336
336
|
loop: t = !1,
|
|
337
337
|
trapped: o = !1,
|
|
338
338
|
onMountAutoFocus: a,
|
|
339
339
|
onUnmountAutoFocus: n,
|
|
340
340
|
...s
|
|
341
|
-
} = e, [i, u] = c.useState(null), l = T(a), d = T(n), p = c.useRef(null),
|
|
341
|
+
} = e, [i, u] = c.useState(null), l = T(a), d = T(n), p = c.useRef(null), h = L(r, (v) => u(v)), m = c.useRef({
|
|
342
342
|
paused: !1,
|
|
343
343
|
pause() {
|
|
344
344
|
this.paused = !0;
|
|
@@ -349,65 +349,65 @@ var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ar
|
|
|
349
349
|
}).current;
|
|
350
350
|
c.useEffect(() => {
|
|
351
351
|
if (o) {
|
|
352
|
-
let
|
|
352
|
+
let v = function(y) {
|
|
353
353
|
if (m.paused || !i) return;
|
|
354
|
-
const
|
|
355
|
-
i.contains(
|
|
356
|
-
}, g = function(
|
|
354
|
+
const b = y.target;
|
|
355
|
+
i.contains(b) ? p.current = b : H(p.current, { select: !0 });
|
|
356
|
+
}, g = function(y) {
|
|
357
357
|
if (m.paused || !i) return;
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
}, _ = function(
|
|
358
|
+
const b = y.relatedTarget;
|
|
359
|
+
b !== null && (i.contains(b) || H(p.current, { select: !0 }));
|
|
360
|
+
}, _ = function(y) {
|
|
361
361
|
if (document.activeElement === document.body)
|
|
362
|
-
for (const C of
|
|
362
|
+
for (const C of y)
|
|
363
363
|
C.removedNodes.length > 0 && H(i);
|
|
364
364
|
};
|
|
365
|
-
document.addEventListener("focusin",
|
|
365
|
+
document.addEventListener("focusin", v), document.addEventListener("focusout", g);
|
|
366
366
|
const E = new MutationObserver(_);
|
|
367
367
|
return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
368
|
-
document.removeEventListener("focusin",
|
|
368
|
+
document.removeEventListener("focusin", v), document.removeEventListener("focusout", g), E.disconnect();
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
371
|
}, [o, i, m.paused]), c.useEffect(() => {
|
|
372
372
|
if (i) {
|
|
373
|
-
|
|
374
|
-
const
|
|
375
|
-
if (!i.contains(
|
|
376
|
-
const _ = new CustomEvent(
|
|
377
|
-
i.addEventListener(
|
|
373
|
+
cr.add(m);
|
|
374
|
+
const v = document.activeElement;
|
|
375
|
+
if (!i.contains(v)) {
|
|
376
|
+
const _ = new CustomEvent(xe, ir);
|
|
377
|
+
i.addEventListener(xe, l), i.dispatchEvent(_), _.defaultPrevented || (sn(fn(kr(i)), { select: !0 }), document.activeElement === v && H(i));
|
|
378
378
|
}
|
|
379
379
|
return () => {
|
|
380
|
-
i.removeEventListener(
|
|
381
|
-
const _ = new CustomEvent(Ae,
|
|
382
|
-
i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented || H(
|
|
380
|
+
i.removeEventListener(xe, l), setTimeout(() => {
|
|
381
|
+
const _ = new CustomEvent(Ae, ir);
|
|
382
|
+
i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented || H(v ?? document.body, { select: !0 }), i.removeEventListener(Ae, d), cr.remove(m);
|
|
383
383
|
}, 0);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
}, [i, l, d, m]);
|
|
387
387
|
const w = c.useCallback(
|
|
388
|
-
(
|
|
388
|
+
(v) => {
|
|
389
389
|
if (!t && !o || m.paused) return;
|
|
390
|
-
const g =
|
|
390
|
+
const g = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, _ = document.activeElement;
|
|
391
391
|
if (g && _) {
|
|
392
|
-
const E =
|
|
393
|
-
|
|
392
|
+
const E = v.currentTarget, [y, b] = cn(E);
|
|
393
|
+
y && b ? !v.shiftKey && _ === b ? (v.preventDefault(), t && H(y, { select: !0 })) : v.shiftKey && _ === y && (v.preventDefault(), t && H(b, { select: !0 })) : _ === E && v.preventDefault();
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
[t, o, m.paused]
|
|
397
397
|
);
|
|
398
|
-
return /* @__PURE__ */ f(O.div, { tabIndex: -1, ...s, ref:
|
|
398
|
+
return /* @__PURE__ */ f(O.div, { tabIndex: -1, ...s, ref: h, onKeyDown: w });
|
|
399
399
|
});
|
|
400
|
-
|
|
401
|
-
function
|
|
400
|
+
Ir.displayName = an;
|
|
401
|
+
function sn(e, { select: r = !1 } = {}) {
|
|
402
402
|
const t = document.activeElement;
|
|
403
403
|
for (const o of e)
|
|
404
404
|
if (H(o, { select: r }), document.activeElement !== t) return;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
const r =
|
|
406
|
+
function cn(e) {
|
|
407
|
+
const r = kr(e), t = sr(r, e), o = sr(r.reverse(), e);
|
|
408
408
|
return [t, o];
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function kr(e) {
|
|
411
411
|
const r = [], t = 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 Ir(e) {
|
|
|
417
417
|
for (; t.nextNode(); ) r.push(t.currentNode);
|
|
418
418
|
return r;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function sr(e, r) {
|
|
421
421
|
for (const t of e)
|
|
422
|
-
if (!
|
|
422
|
+
if (!ln(t, { upTo: r })) return t;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function ln(e, { upTo: r }) {
|
|
425
425
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
426
426
|
for (; e; ) {
|
|
427
427
|
if (r !== void 0 && e === r) return !1;
|
|
@@ -430,54 +430,54 @@ function cn(e, { upTo: r }) {
|
|
|
430
430
|
}
|
|
431
431
|
return !1;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function un(e) {
|
|
434
434
|
return e instanceof HTMLInputElement && "select" in e;
|
|
435
435
|
}
|
|
436
436
|
function H(e, { select: r = !1 } = {}) {
|
|
437
437
|
if (e && e.focus) {
|
|
438
438
|
const t = document.activeElement;
|
|
439
|
-
e.focus({ preventScroll: !0 }), e !== t &&
|
|
439
|
+
e.focus({ preventScroll: !0 }), e !== t && un(e) && r && e.select();
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
var
|
|
443
|
-
function
|
|
442
|
+
var cr = dn();
|
|
443
|
+
function dn() {
|
|
444
444
|
let e = [];
|
|
445
445
|
return {
|
|
446
446
|
add(r) {
|
|
447
447
|
const t = e[0];
|
|
448
|
-
r !== t && (t == null || t.pause()), e =
|
|
448
|
+
r !== t && (t == null || t.pause()), e = lr(e, r), e.unshift(r);
|
|
449
449
|
},
|
|
450
450
|
remove(r) {
|
|
451
451
|
var t;
|
|
452
|
-
e =
|
|
452
|
+
e = lr(e, r), (t = e[0]) == null || t.resume();
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function lr(e, r) {
|
|
457
457
|
const t = [...e], o = t.indexOf(r);
|
|
458
458
|
return o !== -1 && t.splice(o, 1), t;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function fn(e) {
|
|
461
461
|
return e.filter((r) => r.tagName !== "A");
|
|
462
462
|
}
|
|
463
|
-
var
|
|
463
|
+
var pn = "Portal", Wr = c.forwardRef((e, r) => {
|
|
464
464
|
var i;
|
|
465
465
|
const { container: t, ...o } = e, [a, n] = c.useState(!1);
|
|
466
|
-
|
|
466
|
+
se(() => n(!0), []);
|
|
467
467
|
const s = t || a && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
468
468
|
return s ? Wt.createPortal(/* @__PURE__ */ f(O.div, { ...o, ref: r }), s) : null;
|
|
469
469
|
});
|
|
470
|
-
Wr.displayName =
|
|
471
|
-
function
|
|
470
|
+
Wr.displayName = pn;
|
|
471
|
+
function hn(e, r) {
|
|
472
472
|
return c.useReducer((t, o) => r[t][o] ?? t, e);
|
|
473
473
|
}
|
|
474
474
|
var z = (e) => {
|
|
475
|
-
const { present: r, children: t } = e, o = vn(r), a = typeof t == "function" ? t({ present: o.isPresent }) : c.Children.only(t), n = L(o.ref,
|
|
475
|
+
const { present: r, children: t } = e, o = vn(r), a = typeof t == "function" ? t({ present: o.isPresent }) : c.Children.only(t), n = L(o.ref, mn(a));
|
|
476
476
|
return typeof t == "function" || o.isPresent ? c.cloneElement(a, { ref: n }) : null;
|
|
477
477
|
};
|
|
478
478
|
z.displayName = "Presence";
|
|
479
479
|
function vn(e) {
|
|
480
|
-
const [r, t] = c.useState(), o = c.useRef({}), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] =
|
|
480
|
+
const [r, t] = c.useState(), o = c.useRef({}), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = hn(s, {
|
|
481
481
|
mounted: {
|
|
482
482
|
UNMOUNT: "unmounted",
|
|
483
483
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -493,28 +493,28 @@ function vn(e) {
|
|
|
493
493
|
return c.useEffect(() => {
|
|
494
494
|
const l = le(o.current);
|
|
495
495
|
n.current = i === "mounted" ? l : "none";
|
|
496
|
-
}, [i]),
|
|
496
|
+
}, [i]), se(() => {
|
|
497
497
|
const l = o.current, d = a.current;
|
|
498
498
|
if (d !== e) {
|
|
499
|
-
const
|
|
500
|
-
e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(d &&
|
|
499
|
+
const h = n.current, m = le(l);
|
|
500
|
+
e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(d && h !== m ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
501
501
|
}
|
|
502
|
-
}, [e, u]),
|
|
502
|
+
}, [e, u]), se(() => {
|
|
503
503
|
if (r) {
|
|
504
504
|
let l;
|
|
505
505
|
const d = r.ownerDocument.defaultView ?? window, p = (m) => {
|
|
506
|
-
const
|
|
507
|
-
if (m.target === r &&
|
|
506
|
+
const v = le(o.current).includes(m.animationName);
|
|
507
|
+
if (m.target === r && v && (u("ANIMATION_END"), !a.current)) {
|
|
508
508
|
const g = r.style.animationFillMode;
|
|
509
509
|
r.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
510
510
|
r.style.animationFillMode === "forwards" && (r.style.animationFillMode = g);
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
|
-
},
|
|
513
|
+
}, h = (m) => {
|
|
514
514
|
m.target === r && (n.current = le(o.current));
|
|
515
515
|
};
|
|
516
|
-
return r.addEventListener("animationstart",
|
|
517
|
-
d.clearTimeout(l), r.removeEventListener("animationstart",
|
|
516
|
+
return r.addEventListener("animationstart", h), r.addEventListener("animationcancel", p), r.addEventListener("animationend", p), () => {
|
|
517
|
+
d.clearTimeout(l), r.removeEventListener("animationstart", h), r.removeEventListener("animationcancel", p), r.removeEventListener("animationend", p);
|
|
518
518
|
};
|
|
519
519
|
} else
|
|
520
520
|
u("ANIMATION_END");
|
|
@@ -528,32 +528,32 @@ function vn(e) {
|
|
|
528
528
|
function le(e) {
|
|
529
529
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function mn(e) {
|
|
532
532
|
var o, a;
|
|
533
533
|
let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
534
534
|
return t ? e.ref : (r = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
535
535
|
}
|
|
536
|
-
var
|
|
537
|
-
function
|
|
536
|
+
var Ne = 0;
|
|
537
|
+
function gn() {
|
|
538
538
|
c.useEffect(() => {
|
|
539
539
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
540
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
541
|
-
|
|
540
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? ur()), document.body.insertAdjacentElement("beforeend", e[1] ?? ur()), Ne++, () => {
|
|
541
|
+
Ne === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((r) => r.remove()), Ne--;
|
|
542
542
|
};
|
|
543
543
|
}, []);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function ur() {
|
|
546
546
|
const e = document.createElement("span");
|
|
547
547
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
548
548
|
}
|
|
549
|
-
var
|
|
550
|
-
return
|
|
549
|
+
var k = function() {
|
|
550
|
+
return k = Object.assign || function(r) {
|
|
551
551
|
for (var t, o = 1, a = arguments.length; o < a; o++) {
|
|
552
552
|
t = arguments[o];
|
|
553
553
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
|
|
554
554
|
}
|
|
555
555
|
return r;
|
|
556
|
-
},
|
|
556
|
+
}, k.apply(this, arguments);
|
|
557
557
|
};
|
|
558
558
|
function Fr(e, r) {
|
|
559
559
|
var t = {};
|
|
@@ -563,17 +563,17 @@ function Fr(e, r) {
|
|
|
563
563
|
r.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
564
564
|
return t;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function _n(e, r, t) {
|
|
567
567
|
if (t || arguments.length === 2) for (var o = 0, a = r.length, n; o < a; o++)
|
|
568
568
|
(n || !(o in r)) && (n || (n = Array.prototype.slice.call(r, 0, o)), n[o] = r[o]);
|
|
569
569
|
return e.concat(n || Array.prototype.slice.call(r));
|
|
570
570
|
}
|
|
571
|
-
var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar",
|
|
572
|
-
function
|
|
571
|
+
var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar", wn = "with-scroll-bars-hidden", bn = "--removed-body-scroll-bar-size";
|
|
572
|
+
function Re(e, r) {
|
|
573
573
|
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
var t =
|
|
575
|
+
function yn(e, r) {
|
|
576
|
+
var t = Ot(function() {
|
|
577
577
|
return {
|
|
578
578
|
// value
|
|
579
579
|
value: e,
|
|
@@ -593,31 +593,31 @@ function bn(e, r) {
|
|
|
593
593
|
})[0];
|
|
594
594
|
return t.callback = r, t.facade;
|
|
595
595
|
}
|
|
596
|
-
var
|
|
597
|
-
function
|
|
598
|
-
var t =
|
|
596
|
+
var Sn = typeof window < "u" ? c.useLayoutEffect : c.useEffect, dr = /* @__PURE__ */ new WeakMap();
|
|
597
|
+
function En(e, r) {
|
|
598
|
+
var t = yn(null, function(o) {
|
|
599
599
|
return e.forEach(function(a) {
|
|
600
|
-
return
|
|
600
|
+
return Re(a, o);
|
|
601
601
|
});
|
|
602
602
|
});
|
|
603
|
-
return
|
|
604
|
-
var o =
|
|
603
|
+
return Sn(function() {
|
|
604
|
+
var o = dr.get(t);
|
|
605
605
|
if (o) {
|
|
606
606
|
var a = new Set(o), n = new Set(e), s = t.current;
|
|
607
607
|
a.forEach(function(i) {
|
|
608
|
-
n.has(i) ||
|
|
608
|
+
n.has(i) || Re(i, null);
|
|
609
609
|
}), n.forEach(function(i) {
|
|
610
|
-
a.has(i) ||
|
|
610
|
+
a.has(i) || Re(i, s);
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
|
|
613
|
+
dr.set(t, e);
|
|
614
614
|
}, [e]), t;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function Cn(e) {
|
|
617
617
|
return e;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
r === void 0 && (r =
|
|
619
|
+
function Pn(e, r) {
|
|
620
|
+
r === void 0 && (r = Cn);
|
|
621
621
|
var t = [], o = !1, a = {
|
|
622
622
|
read: function() {
|
|
623
623
|
if (o)
|
|
@@ -671,36 +671,36 @@ function Cn(e, r) {
|
|
|
671
671
|
};
|
|
672
672
|
return a;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function xn(e) {
|
|
675
675
|
e === void 0 && (e = {});
|
|
676
|
-
var r =
|
|
677
|
-
return r.options =
|
|
676
|
+
var r = Pn(null);
|
|
677
|
+
return r.options = k({ async: !0, ssr: !1 }, e), r;
|
|
678
678
|
}
|
|
679
|
-
var
|
|
679
|
+
var Ur = function(e) {
|
|
680
680
|
var r = e.sideCar, t = Fr(e, ["sideCar"]);
|
|
681
681
|
if (!r)
|
|
682
682
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
683
683
|
var o = r.read();
|
|
684
684
|
if (!o)
|
|
685
685
|
throw new Error("Sidecar medium not found");
|
|
686
|
-
return c.createElement(o,
|
|
686
|
+
return c.createElement(o, k({}, t));
|
|
687
687
|
};
|
|
688
|
-
|
|
689
|
-
function
|
|
690
|
-
return e.useMedium(r),
|
|
688
|
+
Ur.isSideCarExport = !0;
|
|
689
|
+
function An(e, r) {
|
|
690
|
+
return e.useMedium(r), Ur;
|
|
691
691
|
}
|
|
692
|
-
var
|
|
692
|
+
var Hr = xn(), De = function() {
|
|
693
693
|
}, Se = c.forwardRef(function(e, r) {
|
|
694
694
|
var t = c.useRef(null), o = c.useState({
|
|
695
695
|
onScrollCapture: De,
|
|
696
696
|
onWheelCapture: De,
|
|
697
697
|
onTouchMoveCapture: De
|
|
698
|
-
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards,
|
|
698
|
+
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, m = e.noIsolation, w = e.inert, v = e.allowPinchZoom, g = e.as, _ = g === void 0 ? "div" : g, E = e.gapMode, y = Fr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), b = h, C = En([t, r]), x = k(k({}, y), a);
|
|
699
699
|
return c.createElement(
|
|
700
700
|
c.Fragment,
|
|
701
701
|
null,
|
|
702
|
-
d && c.createElement(
|
|
703
|
-
s ? c.cloneElement(c.Children.only(i),
|
|
702
|
+
d && c.createElement(b, { sideCar: Hr, removeScrollBar: l, shards: p, noIsolation: m, inert: w, setCallbacks: n, allowPinchZoom: !!v, lockRef: t, gapMode: E }),
|
|
703
|
+
s ? c.cloneElement(c.Children.only(i), k(k({}, x), { ref: C })) : c.createElement(_, k({}, x, { className: u, ref: C }), i)
|
|
704
704
|
);
|
|
705
705
|
});
|
|
706
706
|
Se.defaultProps = {
|
|
@@ -712,7 +712,7 @@ Se.classNames = {
|
|
|
712
712
|
fullWidth: _e,
|
|
713
713
|
zeroRight: ge
|
|
714
714
|
};
|
|
715
|
-
var
|
|
715
|
+
var Nn = function() {
|
|
716
716
|
if (typeof __webpack_nonce__ < "u")
|
|
717
717
|
return __webpack_nonce__;
|
|
718
718
|
};
|
|
@@ -721,28 +721,28 @@ function Rn() {
|
|
|
721
721
|
return null;
|
|
722
722
|
var e = document.createElement("style");
|
|
723
723
|
e.type = "text/css";
|
|
724
|
-
var r =
|
|
724
|
+
var r = Nn();
|
|
725
725
|
return r && e.setAttribute("nonce", r), e;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Dn(e, r) {
|
|
728
728
|
e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Tn(e) {
|
|
731
731
|
var r = document.head || document.getElementsByTagName("head")[0];
|
|
732
732
|
r.appendChild(e);
|
|
733
733
|
}
|
|
734
|
-
var
|
|
734
|
+
var On = function() {
|
|
735
735
|
var e = 0, r = null;
|
|
736
736
|
return {
|
|
737
737
|
add: function(t) {
|
|
738
|
-
e == 0 && (r = Rn()) && (
|
|
738
|
+
e == 0 && (r = Rn()) && (Dn(r, t), Tn(r)), e++;
|
|
739
739
|
},
|
|
740
740
|
remove: function() {
|
|
741
741
|
e--, !e && r && (r.parentNode && r.parentNode.removeChild(r), r = null);
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
},
|
|
745
|
-
var e =
|
|
744
|
+
}, Ln = function() {
|
|
745
|
+
var e = On();
|
|
746
746
|
return function(r, t) {
|
|
747
747
|
c.useEffect(function() {
|
|
748
748
|
return e.add(r), function() {
|
|
@@ -750,40 +750,40 @@ var Tn = function() {
|
|
|
750
750
|
};
|
|
751
751
|
}, [r && t]);
|
|
752
752
|
};
|
|
753
|
-
},
|
|
754
|
-
var e =
|
|
753
|
+
}, Br = function() {
|
|
754
|
+
var e = Ln(), r = function(t) {
|
|
755
755
|
var o = t.styles, a = t.dynamic;
|
|
756
756
|
return e(o, a), null;
|
|
757
757
|
};
|
|
758
758
|
return r;
|
|
759
|
-
},
|
|
759
|
+
}, $n = {
|
|
760
760
|
left: 0,
|
|
761
761
|
top: 0,
|
|
762
762
|
right: 0,
|
|
763
763
|
gap: 0
|
|
764
764
|
}, Te = function(e) {
|
|
765
765
|
return parseInt(e || "", 10) || 0;
|
|
766
|
-
},
|
|
766
|
+
}, Mn = function(e) {
|
|
767
767
|
var r = window.getComputedStyle(document.body), t = r[e === "padding" ? "paddingLeft" : "marginLeft"], o = r[e === "padding" ? "paddingTop" : "marginTop"], a = r[e === "padding" ? "paddingRight" : "marginRight"];
|
|
768
768
|
return [Te(t), Te(o), Te(a)];
|
|
769
|
-
},
|
|
769
|
+
}, In = function(e) {
|
|
770
770
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
771
|
-
return
|
|
772
|
-
var r =
|
|
771
|
+
return $n;
|
|
772
|
+
var r = Mn(e), t = document.documentElement.clientWidth, o = window.innerWidth;
|
|
773
773
|
return {
|
|
774
774
|
left: r[0],
|
|
775
775
|
top: r[1],
|
|
776
776
|
right: r[2],
|
|
777
777
|
gap: Math.max(0, o - t + r[2] - r[0])
|
|
778
778
|
};
|
|
779
|
-
},
|
|
779
|
+
}, kn = Br(), te = "data-scroll-locked", Wn = function(e, r, t, o) {
|
|
780
780
|
var a = e.left, n = e.top, s = e.right, i = e.gap;
|
|
781
781
|
return t === void 0 && (t = "margin"), `
|
|
782
|
-
.`.concat(
|
|
782
|
+
.`.concat(wn, ` {
|
|
783
783
|
overflow: hidden `).concat(o, `;
|
|
784
784
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
785
785
|
}
|
|
786
|
-
body[`).concat(
|
|
786
|
+
body[`).concat(te, `] {
|
|
787
787
|
overflow: hidden `).concat(o, `;
|
|
788
788
|
overscroll-behavior: contain;
|
|
789
789
|
`).concat([
|
|
@@ -816,148 +816,148 @@ var Tn = function() {
|
|
|
816
816
|
margin-right: 0 `).concat(o, `;
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
body[`).concat(
|
|
820
|
-
`).concat(
|
|
819
|
+
body[`).concat(te, `] {
|
|
820
|
+
`).concat(bn, ": ").concat(i, `px;
|
|
821
821
|
}
|
|
822
822
|
`);
|
|
823
|
-
},
|
|
824
|
-
var e = parseInt(document.body.getAttribute(
|
|
823
|
+
}, fr = function() {
|
|
824
|
+
var e = parseInt(document.body.getAttribute(te) || "0", 10);
|
|
825
825
|
return isFinite(e) ? e : 0;
|
|
826
826
|
}, Fn = function() {
|
|
827
827
|
c.useEffect(function() {
|
|
828
|
-
return document.body.setAttribute(
|
|
829
|
-
var e =
|
|
830
|
-
e <= 0 ? document.body.removeAttribute(
|
|
828
|
+
return document.body.setAttribute(te, (fr() + 1).toString()), function() {
|
|
829
|
+
var e = fr() - 1;
|
|
830
|
+
e <= 0 ? document.body.removeAttribute(te) : document.body.setAttribute(te, e.toString());
|
|
831
831
|
};
|
|
832
832
|
}, []);
|
|
833
|
-
},
|
|
833
|
+
}, Un = function(e) {
|
|
834
834
|
var r = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
835
835
|
Fn();
|
|
836
836
|
var n = c.useMemo(function() {
|
|
837
|
-
return
|
|
837
|
+
return In(a);
|
|
838
838
|
}, [a]);
|
|
839
|
-
return c.createElement(
|
|
840
|
-
},
|
|
839
|
+
return c.createElement(kn, { styles: Wn(n, !r, a, t ? "" : "!important") });
|
|
840
|
+
}, Fe = !1;
|
|
841
841
|
if (typeof window < "u")
|
|
842
842
|
try {
|
|
843
843
|
var ue = Object.defineProperty({}, "passive", {
|
|
844
844
|
get: function() {
|
|
845
|
-
return
|
|
845
|
+
return Fe = !0, !0;
|
|
846
846
|
}
|
|
847
847
|
});
|
|
848
848
|
window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
|
|
849
849
|
} catch {
|
|
850
|
-
|
|
850
|
+
Fe = !1;
|
|
851
851
|
}
|
|
852
|
-
var
|
|
852
|
+
var G = Fe ? { passive: !1 } : !1, Hn = function(e) {
|
|
853
853
|
return e.tagName === "TEXTAREA";
|
|
854
|
-
},
|
|
854
|
+
}, jr = function(e, r) {
|
|
855
855
|
if (!(e instanceof Element))
|
|
856
856
|
return !1;
|
|
857
857
|
var t = window.getComputedStyle(e);
|
|
858
858
|
return (
|
|
859
859
|
// not-not-scrollable
|
|
860
860
|
t[r] !== "hidden" && // contains scroll inside self
|
|
861
|
-
!(t.overflowY === t.overflowX && !
|
|
861
|
+
!(t.overflowY === t.overflowX && !Hn(e) && t[r] === "visible")
|
|
862
862
|
);
|
|
863
|
-
}, Hn = function(e) {
|
|
864
|
-
return Br(e, "overflowY");
|
|
865
863
|
}, Bn = function(e) {
|
|
866
|
-
return
|
|
867
|
-
},
|
|
864
|
+
return jr(e, "overflowY");
|
|
865
|
+
}, jn = function(e) {
|
|
866
|
+
return jr(e, "overflowX");
|
|
867
|
+
}, pr = function(e, r) {
|
|
868
868
|
var t = r.ownerDocument, o = r;
|
|
869
869
|
do {
|
|
870
870
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
871
|
-
var a =
|
|
871
|
+
var a = zr(e, o);
|
|
872
872
|
if (a) {
|
|
873
|
-
var n =
|
|
873
|
+
var n = Vr(e, o), s = n[1], i = n[2];
|
|
874
874
|
if (s > i)
|
|
875
875
|
return !0;
|
|
876
876
|
}
|
|
877
877
|
o = o.parentNode;
|
|
878
878
|
} while (o && o !== t.body);
|
|
879
879
|
return !1;
|
|
880
|
-
},
|
|
880
|
+
}, zn = function(e) {
|
|
881
881
|
var r = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
|
|
882
882
|
return [
|
|
883
883
|
r,
|
|
884
884
|
t,
|
|
885
885
|
o
|
|
886
886
|
];
|
|
887
|
-
},
|
|
887
|
+
}, Vn = function(e) {
|
|
888
888
|
var r = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
|
|
889
889
|
return [
|
|
890
890
|
r,
|
|
891
891
|
t,
|
|
892
892
|
o
|
|
893
893
|
];
|
|
894
|
-
}, jr = function(e, r) {
|
|
895
|
-
return e === "v" ? Hn(r) : Bn(r);
|
|
896
894
|
}, zr = function(e, r) {
|
|
897
|
-
return e === "v" ?
|
|
898
|
-
},
|
|
895
|
+
return e === "v" ? Bn(r) : jn(r);
|
|
896
|
+
}, Vr = function(e, r) {
|
|
897
|
+
return e === "v" ? zn(r) : Vn(r);
|
|
898
|
+
}, Yn = function(e, r) {
|
|
899
899
|
return e === "h" && r === "rtl" ? -1 : 1;
|
|
900
|
-
},
|
|
901
|
-
var n =
|
|
900
|
+
}, Xn = function(e, r, t, o, a) {
|
|
901
|
+
var n = Yn(e, window.getComputedStyle(r).direction), s = n * o, i = t.target, u = r.contains(i), l = !1, d = s > 0, p = 0, h = 0;
|
|
902
902
|
do {
|
|
903
|
-
var m =
|
|
904
|
-
(w || _) &&
|
|
903
|
+
var m = Vr(e, i), w = m[0], v = m[1], g = m[2], _ = v - g - n * w;
|
|
904
|
+
(w || _) && zr(e, i) && (p += _, h += w), i instanceof ShadowRoot ? i = i.host : i = i.parentNode;
|
|
905
905
|
} while (
|
|
906
906
|
// portaled content
|
|
907
907
|
!u && i !== document.body || // self content
|
|
908
908
|
u && (r.contains(i) || r === i)
|
|
909
909
|
);
|
|
910
|
-
return (d && Math.abs(p) < 1 || !d && Math.abs(
|
|
910
|
+
return (d && Math.abs(p) < 1 || !d && Math.abs(h) < 1) && (l = !0), l;
|
|
911
911
|
}, de = function(e) {
|
|
912
912
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
913
|
-
},
|
|
913
|
+
}, hr = function(e) {
|
|
914
914
|
return [e.deltaX, e.deltaY];
|
|
915
915
|
}, vr = function(e) {
|
|
916
916
|
return e && "current" in e ? e.current : e;
|
|
917
917
|
}, qn = function(e, r) {
|
|
918
918
|
return e[0] === r[0] && e[1] === r[1];
|
|
919
|
-
},
|
|
919
|
+
}, Gn = 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 r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(
|
|
924
|
+
}, Kn = 0, K = [];
|
|
925
|
+
function Zn(e) {
|
|
926
|
+
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Kn++)[0], n = c.useState(Br)[0], s = c.useRef(e);
|
|
927
927
|
c.useEffect(function() {
|
|
928
928
|
s.current = e;
|
|
929
929
|
}, [e]), c.useEffect(function() {
|
|
930
930
|
if (e.inert) {
|
|
931
931
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
932
|
-
var
|
|
933
|
-
return
|
|
932
|
+
var v = _n([e.lockRef.current], (e.shards || []).map(vr), !0).filter(Boolean);
|
|
933
|
+
return v.forEach(function(g) {
|
|
934
934
|
return g.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)), v.forEach(function(g) {
|
|
937
937
|
return g.classList.remove("allow-interactivity-".concat(a));
|
|
938
938
|
});
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
941
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
942
|
-
var i = c.useCallback(function(
|
|
943
|
-
if ("touches" in
|
|
942
|
+
var i = c.useCallback(function(v, g) {
|
|
943
|
+
if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
|
|
944
944
|
return !s.current.allowPinchZoom;
|
|
945
|
-
var _ = de(
|
|
946
|
-
if ("touches" in
|
|
945
|
+
var _ = de(v), E = t.current, y = "deltaX" in v ? v.deltaX : E[0] - _[0], b = "deltaY" in v ? v.deltaY : E[1] - _[1], C, x = v.target, S = Math.abs(y) > Math.abs(b) ? "h" : "v";
|
|
946
|
+
if ("touches" in v && S === "h" && x.type === "range")
|
|
947
947
|
return !1;
|
|
948
|
-
var
|
|
949
|
-
if (!
|
|
948
|
+
var N = pr(S, x);
|
|
949
|
+
if (!N)
|
|
950
950
|
return !0;
|
|
951
|
-
if (
|
|
951
|
+
if (N ? C = S : (C = S === "v" ? "h" : "v", N = pr(S, x)), !N)
|
|
952
952
|
return !1;
|
|
953
|
-
if (!o.current && "changedTouches" in
|
|
953
|
+
if (!o.current && "changedTouches" in v && (y || b) && (o.current = C), !C)
|
|
954
954
|
return !0;
|
|
955
955
|
var P = o.current || C;
|
|
956
|
-
return
|
|
957
|
-
}, []), u = c.useCallback(function(
|
|
958
|
-
var g =
|
|
959
|
-
if (!(!
|
|
960
|
-
var _ = "deltaY" in g ?
|
|
956
|
+
return Xn(P, g, v, P === "h" ? y : b);
|
|
957
|
+
}, []), u = c.useCallback(function(v) {
|
|
958
|
+
var g = v;
|
|
959
|
+
if (!(!K.length || K[K.length - 1] !== n)) {
|
|
960
|
+
var _ = "deltaY" in g ? hr(g) : de(g), E = r.current.filter(function(C) {
|
|
961
961
|
return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && qn(C.delta, _);
|
|
962
962
|
})[0];
|
|
963
963
|
if (E && E.should) {
|
|
@@ -965,104 +965,104 @@ function Kn(e) {
|
|
|
965
965
|
return;
|
|
966
966
|
}
|
|
967
967
|
if (!E) {
|
|
968
|
-
var
|
|
968
|
+
var y = (s.current.shards || []).map(vr).filter(Boolean).filter(function(C) {
|
|
969
969
|
return C.contains(g.target);
|
|
970
|
-
}),
|
|
971
|
-
|
|
970
|
+
}), b = y.length > 0 ? i(g, y[0]) : !s.current.noIsolation;
|
|
971
|
+
b && g.cancelable && g.preventDefault();
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
}, []), l = c.useCallback(function(
|
|
975
|
-
var
|
|
976
|
-
r.current.push(
|
|
977
|
-
r.current = r.current.filter(function(
|
|
978
|
-
return
|
|
974
|
+
}, []), l = c.useCallback(function(v, g, _, E) {
|
|
975
|
+
var y = { name: v, delta: g, target: _, should: E, shadowParent: Qn(_) };
|
|
976
|
+
r.current.push(y), setTimeout(function() {
|
|
977
|
+
r.current = r.current.filter(function(b) {
|
|
978
|
+
return b !== y;
|
|
979
979
|
});
|
|
980
980
|
}, 1);
|
|
981
|
-
}, []), d = c.useCallback(function(
|
|
982
|
-
t.current = de(
|
|
983
|
-
}, []), p = c.useCallback(function(
|
|
984
|
-
l(
|
|
985
|
-
}, []),
|
|
986
|
-
l(
|
|
981
|
+
}, []), d = c.useCallback(function(v) {
|
|
982
|
+
t.current = de(v), o.current = void 0;
|
|
983
|
+
}, []), p = c.useCallback(function(v) {
|
|
984
|
+
l(v.type, hr(v), v.target, i(v, e.lockRef.current));
|
|
985
|
+
}, []), h = c.useCallback(function(v) {
|
|
986
|
+
l(v.type, de(v), v.target, i(v, e.lockRef.current));
|
|
987
987
|
}, []);
|
|
988
988
|
c.useEffect(function() {
|
|
989
|
-
return
|
|
989
|
+
return K.push(n), e.setCallbacks({
|
|
990
990
|
onScrollCapture: p,
|
|
991
991
|
onWheelCapture: p,
|
|
992
|
-
onTouchMoveCapture:
|
|
993
|
-
}), document.addEventListener("wheel", u,
|
|
994
|
-
|
|
995
|
-
return
|
|
996
|
-
}), document.removeEventListener("wheel", u,
|
|
992
|
+
onTouchMoveCapture: h
|
|
993
|
+
}), document.addEventListener("wheel", u, G), document.addEventListener("touchmove", u, G), document.addEventListener("touchstart", d, G), function() {
|
|
994
|
+
K = K.filter(function(v) {
|
|
995
|
+
return v !== n;
|
|
996
|
+
}), document.removeEventListener("wheel", u, G), document.removeEventListener("touchmove", u, G), document.removeEventListener("touchstart", d, G);
|
|
997
997
|
};
|
|
998
998
|
}, []);
|
|
999
999
|
var m = e.removeScrollBar, w = e.inert;
|
|
1000
1000
|
return c.createElement(
|
|
1001
1001
|
c.Fragment,
|
|
1002
1002
|
null,
|
|
1003
|
-
w ? c.createElement(n, { styles:
|
|
1004
|
-
m ? c.createElement(
|
|
1003
|
+
w ? c.createElement(n, { styles: Gn(a) }) : null,
|
|
1004
|
+
m ? c.createElement(Un, { gapMode: e.gapMode }) : null
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function Qn(e) {
|
|
1008
1008
|
for (var r = null; e !== null; )
|
|
1009
1009
|
e instanceof ShadowRoot && (r = e.host, e = e.host), e = e.parentNode;
|
|
1010
1010
|
return r;
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1013
|
-
var
|
|
1014
|
-
return c.createElement(Se,
|
|
1012
|
+
const Jn = An(Hr, Zn);
|
|
1013
|
+
var Yr = c.forwardRef(function(e, r) {
|
|
1014
|
+
return c.createElement(Se, k({}, e, { ref: r, sideCar: Jn }));
|
|
1015
1015
|
});
|
|
1016
|
-
|
|
1017
|
-
var
|
|
1016
|
+
Yr.classNames = Se.classNames;
|
|
1017
|
+
var eo = function(e) {
|
|
1018
1018
|
if (typeof document > "u")
|
|
1019
1019
|
return null;
|
|
1020
1020
|
var r = Array.isArray(e) ? e[0] : e;
|
|
1021
1021
|
return r.ownerDocument.body;
|
|
1022
|
-
},
|
|
1023
|
-
return e && (e.host ||
|
|
1024
|
-
},
|
|
1022
|
+
}, Z = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, Xr = function(e) {
|
|
1023
|
+
return e && (e.host || Xr(e.parentNode));
|
|
1024
|
+
}, ro = function(e, r) {
|
|
1025
1025
|
return r.map(function(t) {
|
|
1026
1026
|
if (e.contains(t))
|
|
1027
1027
|
return t;
|
|
1028
|
-
var o =
|
|
1028
|
+
var o = Xr(t);
|
|
1029
1029
|
return o && e.contains(o) ? o : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
1030
1030
|
}).filter(function(t) {
|
|
1031
1031
|
return !!t;
|
|
1032
1032
|
});
|
|
1033
|
-
},
|
|
1034
|
-
var a =
|
|
1033
|
+
}, to = function(e, r, t, o) {
|
|
1034
|
+
var a = ro(r, Array.isArray(e) ? e : [e]);
|
|
1035
1035
|
pe[t] || (pe[t] = /* @__PURE__ */ new WeakMap());
|
|
1036
1036
|
var n = pe[t], s = [], i = /* @__PURE__ */ new Set(), u = new Set(a), l = function(p) {
|
|
1037
1037
|
!p || i.has(p) || (i.add(p), l(p.parentNode));
|
|
1038
1038
|
};
|
|
1039
1039
|
a.forEach(l);
|
|
1040
1040
|
var d = function(p) {
|
|
1041
|
-
!p || u.has(p) || Array.prototype.forEach.call(p.children, function(
|
|
1042
|
-
if (i.has(
|
|
1043
|
-
d(
|
|
1041
|
+
!p || u.has(p) || Array.prototype.forEach.call(p.children, function(h) {
|
|
1042
|
+
if (i.has(h))
|
|
1043
|
+
d(h);
|
|
1044
1044
|
else
|
|
1045
1045
|
try {
|
|
1046
|
-
var m =
|
|
1047
|
-
|
|
1046
|
+
var m = h.getAttribute(o), w = m !== null && m !== "false", v = (Z.get(h) || 0) + 1, g = (n.get(h) || 0) + 1;
|
|
1047
|
+
Z.set(h, v), n.set(h, g), s.push(h), v === 1 && w && fe.set(h, !0), g === 1 && h.setAttribute(t, "true"), w || h.setAttribute(o, "true");
|
|
1048
1048
|
} catch (_) {
|
|
1049
|
-
console.error("aria-hidden: cannot operate on ",
|
|
1049
|
+
console.error("aria-hidden: cannot operate on ", h, _);
|
|
1050
1050
|
}
|
|
1051
1051
|
});
|
|
1052
1052
|
};
|
|
1053
1053
|
return d(r), i.clear(), Oe++, function() {
|
|
1054
1054
|
s.forEach(function(p) {
|
|
1055
|
-
var
|
|
1056
|
-
|
|
1057
|
-
}), Oe--, Oe || (
|
|
1055
|
+
var h = Z.get(p) - 1, m = n.get(p) - 1;
|
|
1056
|
+
Z.set(p, h), n.set(p, m), h || (fe.has(p) || p.removeAttribute(o), fe.delete(p)), m || p.removeAttribute(t);
|
|
1057
|
+
}), Oe--, Oe || (Z = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {});
|
|
1058
1058
|
};
|
|
1059
|
-
},
|
|
1059
|
+
}, no = function(e, r, t) {
|
|
1060
1060
|
t === void 0 && (t = "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 = eo(e);
|
|
1062
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), to(o, a, t, "aria-hidden")) : function() {
|
|
1063
1063
|
return null;
|
|
1064
1064
|
};
|
|
1065
|
-
}, Ye = "Dialog", [qr,
|
|
1065
|
+
}, Ye = "Dialog", [qr, Za] = Or(Ye), [oo, I] = qr(Ye), Gr = (e) => {
|
|
1066
1066
|
const {
|
|
1067
1067
|
__scopeDialog: r,
|
|
1068
1068
|
children: t,
|
|
@@ -1070,13 +1070,13 @@ var Jn = function(e) {
|
|
|
1070
1070
|
defaultOpen: a,
|
|
1071
1071
|
onOpenChange: n,
|
|
1072
1072
|
modal: s = !0
|
|
1073
|
-
} = e, i = c.useRef(null), u = c.useRef(null), [l = !1, d] =
|
|
1073
|
+
} = e, i = c.useRef(null), u = c.useRef(null), [l = !1, d] = jt({
|
|
1074
1074
|
prop: o,
|
|
1075
1075
|
defaultProp: a,
|
|
1076
1076
|
onChange: n
|
|
1077
1077
|
});
|
|
1078
1078
|
return /* @__PURE__ */ f(
|
|
1079
|
-
|
|
1079
|
+
oo,
|
|
1080
1080
|
{
|
|
1081
1081
|
scope: r,
|
|
1082
1082
|
triggerRef: i,
|
|
@@ -1092,10 +1092,10 @@ var Jn = function(e) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
);
|
|
1094
1094
|
};
|
|
1095
|
-
|
|
1096
|
-
var
|
|
1095
|
+
Gr.displayName = Ye;
|
|
1096
|
+
var Kr = "DialogTrigger", Zr = c.forwardRef(
|
|
1097
1097
|
(e, r) => {
|
|
1098
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1098
|
+
const { __scopeDialog: t, ...o } = e, a = I(Kr, t), n = L(r, a.triggerRef);
|
|
1099
1099
|
return /* @__PURE__ */ f(
|
|
1100
1100
|
O.button,
|
|
1101
1101
|
{
|
|
@@ -1106,33 +1106,33 @@ var Gr = "DialogTrigger", Kr = c.forwardRef(
|
|
|
1106
1106
|
"data-state": Ge(a.open),
|
|
1107
1107
|
...o,
|
|
1108
1108
|
ref: n,
|
|
1109
|
-
onClick:
|
|
1109
|
+
onClick: R(e.onClick, a.onOpenToggle)
|
|
1110
1110
|
}
|
|
1111
1111
|
);
|
|
1112
1112
|
}
|
|
1113
1113
|
);
|
|
1114
|
-
|
|
1115
|
-
var
|
|
1114
|
+
Zr.displayName = Kr;
|
|
1115
|
+
var Xe = "DialogPortal", [ao, Qr] = qr(Xe, {
|
|
1116
1116
|
forceMount: void 0
|
|
1117
|
-
}),
|
|
1118
|
-
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n =
|
|
1119
|
-
return /* @__PURE__ */ f(
|
|
1117
|
+
}), Jr = (e) => {
|
|
1118
|
+
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = I(Xe, r);
|
|
1119
|
+
return /* @__PURE__ */ f(ao, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(z, { present: t || n.open, children: /* @__PURE__ */ f(Wr, { asChild: !0, container: a, children: s }) })) });
|
|
1120
1120
|
};
|
|
1121
|
-
|
|
1122
|
-
var we = "DialogOverlay",
|
|
1121
|
+
Jr.displayName = Xe;
|
|
1122
|
+
var we = "DialogOverlay", et = c.forwardRef(
|
|
1123
1123
|
(e, r) => {
|
|
1124
|
-
const t =
|
|
1125
|
-
return n.modal ? /* @__PURE__ */ f(z, { present: o || n.open, children: /* @__PURE__ */ f(
|
|
1124
|
+
const t = Qr(we, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = I(we, e.__scopeDialog);
|
|
1125
|
+
return n.modal ? /* @__PURE__ */ f(z, { present: o || n.open, children: /* @__PURE__ */ f(io, { ...a, ref: r }) }) : null;
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
|
-
|
|
1129
|
-
var
|
|
1128
|
+
et.displayName = we;
|
|
1129
|
+
var io = c.forwardRef(
|
|
1130
1130
|
(e, r) => {
|
|
1131
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1131
|
+
const { __scopeDialog: t, ...o } = e, a = I(we, t);
|
|
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__ */ f(
|
|
1135
|
+
/* @__PURE__ */ f(Yr, { as: Ve, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1136
1136
|
O.div,
|
|
1137
1137
|
{
|
|
1138
1138
|
"data-state": Ge(a.open),
|
|
@@ -1143,46 +1143,46 @@ var ao = c.forwardRef(
|
|
|
1143
1143
|
) })
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
),
|
|
1146
|
+
), X = "DialogContent", rt = c.forwardRef(
|
|
1147
1147
|
(e, r) => {
|
|
1148
|
-
const t =
|
|
1149
|
-
return /* @__PURE__ */ f(z, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(
|
|
1148
|
+
const t = Qr(X, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = I(X, e.__scopeDialog);
|
|
1149
|
+
return /* @__PURE__ */ f(z, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(so, { ...a, ref: r }) : /* @__PURE__ */ f(co, { ...a, ref: r }) });
|
|
1150
1150
|
}
|
|
1151
1151
|
);
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1152
|
+
rt.displayName = X;
|
|
1153
|
+
var so = c.forwardRef(
|
|
1154
1154
|
(e, r) => {
|
|
1155
|
-
const t =
|
|
1155
|
+
const t = I(X, e.__scopeDialog), o = c.useRef(null), a = L(r, t.contentRef, o);
|
|
1156
1156
|
return c.useEffect(() => {
|
|
1157
1157
|
const n = o.current;
|
|
1158
|
-
if (n) return
|
|
1158
|
+
if (n) return no(n);
|
|
1159
1159
|
}, []), /* @__PURE__ */ f(
|
|
1160
|
-
|
|
1160
|
+
tt,
|
|
1161
1161
|
{
|
|
1162
1162
|
...e,
|
|
1163
1163
|
ref: a,
|
|
1164
1164
|
trapFocus: t.open,
|
|
1165
1165
|
disableOutsidePointerEvents: !0,
|
|
1166
|
-
onCloseAutoFocus:
|
|
1166
|
+
onCloseAutoFocus: R(e.onCloseAutoFocus, (n) => {
|
|
1167
1167
|
var s;
|
|
1168
1168
|
n.preventDefault(), (s = t.triggerRef.current) == null || s.focus();
|
|
1169
1169
|
}),
|
|
1170
|
-
onPointerDownOutside:
|
|
1170
|
+
onPointerDownOutside: R(e.onPointerDownOutside, (n) => {
|
|
1171
1171
|
const s = n.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0;
|
|
1172
1172
|
(s.button === 2 || i) && n.preventDefault();
|
|
1173
1173
|
}),
|
|
1174
|
-
onFocusOutside:
|
|
1174
|
+
onFocusOutside: R(
|
|
1175
1175
|
e.onFocusOutside,
|
|
1176
1176
|
(n) => n.preventDefault()
|
|
1177
1177
|
)
|
|
1178
1178
|
}
|
|
1179
1179
|
);
|
|
1180
1180
|
}
|
|
1181
|
-
),
|
|
1181
|
+
), co = c.forwardRef(
|
|
1182
1182
|
(e, r) => {
|
|
1183
|
-
const t =
|
|
1183
|
+
const t = I(X, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
|
|
1184
1184
|
return /* @__PURE__ */ f(
|
|
1185
|
-
|
|
1185
|
+
tt,
|
|
1186
1186
|
{
|
|
1187
1187
|
...e,
|
|
1188
1188
|
ref: r,
|
|
@@ -1201,12 +1201,12 @@ var io = c.forwardRef(
|
|
|
1201
1201
|
}
|
|
1202
1202
|
);
|
|
1203
1203
|
}
|
|
1204
|
-
),
|
|
1204
|
+
), tt = c.forwardRef(
|
|
1205
1205
|
(e, r) => {
|
|
1206
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i =
|
|
1207
|
-
return
|
|
1206
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = I(X, t), u = c.useRef(null), l = L(r, u);
|
|
1207
|
+
return gn(), /* @__PURE__ */ D(B, { children: [
|
|
1208
1208
|
/* @__PURE__ */ f(
|
|
1209
|
-
|
|
1209
|
+
Ir,
|
|
1210
1210
|
{
|
|
1211
1211
|
asChild: !0,
|
|
1212
1212
|
loop: !0,
|
|
@@ -1214,7 +1214,7 @@ var io = c.forwardRef(
|
|
|
1214
1214
|
onMountAutoFocus: a,
|
|
1215
1215
|
onUnmountAutoFocus: n,
|
|
1216
1216
|
children: /* @__PURE__ */ f(
|
|
1217
|
-
|
|
1217
|
+
$r,
|
|
1218
1218
|
{
|
|
1219
1219
|
role: "dialog",
|
|
1220
1220
|
id: i.contentId,
|
|
@@ -1229,49 +1229,49 @@ var io = c.forwardRef(
|
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
1231
|
/* @__PURE__ */ D(B, { children: [
|
|
1232
|
-
/* @__PURE__ */ f(
|
|
1233
|
-
/* @__PURE__ */ f(
|
|
1232
|
+
/* @__PURE__ */ f(lo, { titleId: i.titleId }),
|
|
1233
|
+
/* @__PURE__ */ f(fo, { contentRef: u, descriptionId: i.descriptionId })
|
|
1234
1234
|
] })
|
|
1235
1235
|
] });
|
|
1236
1236
|
}
|
|
1237
|
-
),
|
|
1237
|
+
), qe = "DialogTitle", nt = c.forwardRef(
|
|
1238
1238
|
(e, r) => {
|
|
1239
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1239
|
+
const { __scopeDialog: t, ...o } = e, a = I(qe, t);
|
|
1240
1240
|
return /* @__PURE__ */ f(O.h2, { id: a.titleId, ...o, ref: r });
|
|
1241
1241
|
}
|
|
1242
1242
|
);
|
|
1243
|
-
|
|
1244
|
-
var
|
|
1243
|
+
nt.displayName = qe;
|
|
1244
|
+
var ot = "DialogDescription", at = c.forwardRef(
|
|
1245
1245
|
(e, r) => {
|
|
1246
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1246
|
+
const { __scopeDialog: t, ...o } = e, a = I(ot, t);
|
|
1247
1247
|
return /* @__PURE__ */ f(O.p, { id: a.descriptionId, ...o, ref: r });
|
|
1248
1248
|
}
|
|
1249
1249
|
);
|
|
1250
|
-
|
|
1251
|
-
var
|
|
1250
|
+
at.displayName = ot;
|
|
1251
|
+
var it = "DialogClose", st = c.forwardRef(
|
|
1252
1252
|
(e, r) => {
|
|
1253
|
-
const { __scopeDialog: t, ...o } = e, a =
|
|
1253
|
+
const { __scopeDialog: t, ...o } = e, a = I(it, t);
|
|
1254
1254
|
return /* @__PURE__ */ f(
|
|
1255
1255
|
O.button,
|
|
1256
1256
|
{
|
|
1257
1257
|
type: "button",
|
|
1258
1258
|
...o,
|
|
1259
1259
|
ref: r,
|
|
1260
|
-
onClick:
|
|
1260
|
+
onClick: R(e.onClick, () => a.onOpenChange(!1))
|
|
1261
1261
|
}
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
1264
1264
|
);
|
|
1265
|
-
|
|
1265
|
+
st.displayName = it;
|
|
1266
1266
|
function Ge(e) {
|
|
1267
1267
|
return e ? "open" : "closed";
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1270
|
-
contentName:
|
|
1271
|
-
titleName:
|
|
1269
|
+
var ct = "DialogTitleWarning", [Qa, lt] = Ft(ct, {
|
|
1270
|
+
contentName: X,
|
|
1271
|
+
titleName: qe,
|
|
1272
1272
|
docsSlug: "dialog"
|
|
1273
|
-
}),
|
|
1274
|
-
const r = ct
|
|
1273
|
+
}), lo = ({ titleId: e }) => {
|
|
1274
|
+
const r = lt(ct), t = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
1275
1275
|
|
|
1276
1276
|
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1277
1277
|
|
|
@@ -1279,15 +1279,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${r.do
|
|
|
1279
1279
|
return c.useEffect(() => {
|
|
1280
1280
|
e && (document.getElementById(e) || console.error(t));
|
|
1281
1281
|
}, [t, e]), null;
|
|
1282
|
-
},
|
|
1283
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
1282
|
+
}, uo = "DialogDescriptionWarning", fo = ({ contentRef: e, descriptionId: r }) => {
|
|
1283
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lt(uo).contentName}}.`;
|
|
1284
1284
|
return c.useEffect(() => {
|
|
1285
1285
|
var n;
|
|
1286
1286
|
const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
|
|
1287
1287
|
r && a && (document.getElementById(r) || console.warn(o));
|
|
1288
1288
|
}, [o, e, r]), null;
|
|
1289
|
-
},
|
|
1290
|
-
function
|
|
1289
|
+
}, po = Gr, ho = Zr, vo = Jr, mo = et, go = rt, he = nt, _o = at, wo = st;
|
|
1290
|
+
function bo(e) {
|
|
1291
1291
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1292
1292
|
}
|
|
1293
1293
|
var Le = { exports: {} };
|
|
@@ -1296,9 +1296,9 @@ var Le = { exports: {} };
|
|
|
1296
1296
|
Licensed under the MIT License (MIT), see
|
|
1297
1297
|
http://jedwatson.github.io/classnames
|
|
1298
1298
|
*/
|
|
1299
|
-
var
|
|
1300
|
-
function
|
|
1301
|
-
return
|
|
1299
|
+
var mr;
|
|
1300
|
+
function yo() {
|
|
1301
|
+
return mr || (mr = 1, function(e) {
|
|
1302
1302
|
(function() {
|
|
1303
1303
|
var r = {}.hasOwnProperty;
|
|
1304
1304
|
function t() {
|
|
@@ -1329,24 +1329,27 @@ function bo() {
|
|
|
1329
1329
|
})();
|
|
1330
1330
|
}(Le)), Le.exports;
|
|
1331
1331
|
}
|
|
1332
|
-
var
|
|
1333
|
-
const q = /* @__PURE__ */
|
|
1334
|
-
"purpur-drawer-content": "_purpur-drawer-
|
|
1335
|
-
drawerSmallScreenAnimation:
|
|
1336
|
-
"purpur-drawer-content--
|
|
1337
|
-
|
|
1338
|
-
"purpur-drawer-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
"purpur-drawer-
|
|
1342
|
-
"purpur-drawer-
|
|
1332
|
+
var So = yo();
|
|
1333
|
+
const q = /* @__PURE__ */ bo(So), ut = Lt(null), Eo = {}, Co = "_drawerSmallScreenAnimation_khfax_1", Po = "_drawerLargeScreenAnimationRight_khfax_1", xo = "_drawerLargeScreenAnimationLeft_khfax_1", Ao = "_slideDown_khfax_1", No = "_overlayAnimation_khfax_1", Ro = {
|
|
1334
|
+
"purpur-drawer-content": "_purpur-drawer-content_khfax_1",
|
|
1335
|
+
drawerSmallScreenAnimation: Co,
|
|
1336
|
+
"purpur-drawer-content--left": "_purpur-drawer-content--left_khfax_15",
|
|
1337
|
+
"purpur-drawer-content--right": "_purpur-drawer-content--right_khfax_18",
|
|
1338
|
+
"purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_khfax_21",
|
|
1339
|
+
drawerLargeScreenAnimationRight: Po,
|
|
1340
|
+
drawerLargeScreenAnimationLeft: xo,
|
|
1341
|
+
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_khfax_51",
|
|
1342
|
+
"purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-frame_khfax_56",
|
|
1343
|
+
slideDown: Ao,
|
|
1344
|
+
"purpur-drawer-content__description": "_purpur-drawer-content__description_khfax_66",
|
|
1345
|
+
"purpur-drawer-overlay": "_purpur-drawer-overlay_khfax_77",
|
|
1343
1346
|
overlayAnimation: No
|
|
1344
|
-
},
|
|
1347
|
+
}, Do = {
|
|
1345
1348
|
"purpur-drawer-container--header": "_purpur-drawer-container--header_1u45h_1",
|
|
1346
1349
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1u45h_10",
|
|
1347
1350
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1u45h_18",
|
|
1348
1351
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1u45h_26"
|
|
1349
|
-
},
|
|
1352
|
+
}, To = q.bind(Do), $e = "purpur-drawer-container", re = j(
|
|
1350
1353
|
({
|
|
1351
1354
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1352
1355
|
children: r,
|
|
@@ -1355,7 +1358,7 @@ const q = /* @__PURE__ */ wo(yo), lt = Ot(null), So = {}, Eo = "_drawerSmallScre
|
|
|
1355
1358
|
stickyFooter: a,
|
|
1356
1359
|
...n
|
|
1357
1360
|
}, s) => {
|
|
1358
|
-
const i =
|
|
1361
|
+
const i = To([
|
|
1359
1362
|
t,
|
|
1360
1363
|
$e,
|
|
1361
1364
|
{
|
|
@@ -1368,38 +1371,40 @@ const q = /* @__PURE__ */ wo(yo), lt = Ot(null), So = {}, Eo = "_drawerSmallScre
|
|
|
1368
1371
|
return /* @__PURE__ */ f("div", { className: i, "data-testid": e, ref: s, ...n, children: r });
|
|
1369
1372
|
}
|
|
1370
1373
|
);
|
|
1371
|
-
|
|
1372
|
-
const
|
|
1373
|
-
"purpur-drawer-frame": "_purpur-drawer-
|
|
1374
|
-
"purpur-drawer-frame--
|
|
1375
|
-
"purpur-drawer-
|
|
1376
|
-
"purpur-drawer-
|
|
1377
|
-
"purpur-drawer-
|
|
1378
|
-
"purpur-drawer-
|
|
1379
|
-
"purpur-drawer-
|
|
1380
|
-
"purpur-drawer-
|
|
1381
|
-
|
|
1374
|
+
re.displayName = "DrawerContainer";
|
|
1375
|
+
const Oo = {
|
|
1376
|
+
"purpur-drawer-frame": "_purpur-drawer-frame_1s8hq_1",
|
|
1377
|
+
"purpur-drawer-frame--left": "_purpur-drawer-frame--left_1s8hq_12",
|
|
1378
|
+
"purpur-drawer-frame--right": "_purpur-drawer-frame--right_1s8hq_16",
|
|
1379
|
+
"purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_1s8hq_21",
|
|
1380
|
+
"purpur-drawer-frame__header": "_purpur-drawer-frame__header_1s8hq_24",
|
|
1381
|
+
"purpur-drawer-frame__body": "_purpur-drawer-frame__body_1s8hq_27",
|
|
1382
|
+
"purpur-drawer-frame--fit-to-content": "_purpur-drawer-frame--fit-to-content_1s8hq_31",
|
|
1383
|
+
"purpur-drawer-frame__footer": "_purpur-drawer-frame__footer_1s8hq_40",
|
|
1384
|
+
"purpur-drawer-frame__content-container": "_purpur-drawer-frame__content-container_1s8hq_43",
|
|
1385
|
+
"purpur-drawer-frame__content-container--no-footer": "_purpur-drawer-frame__content-container--no-footer_1s8hq_48"
|
|
1386
|
+
}, Lo = {
|
|
1382
1387
|
"purpur-drawer-handle": "_purpur-drawer-handle_3n0ew_1"
|
|
1383
|
-
},
|
|
1388
|
+
}, $o = (e, r, t, o, a, n) => ({
|
|
1384
1389
|
onPointerDown: (l) => {
|
|
1385
1390
|
e.current = { y: l.clientY };
|
|
1386
1391
|
},
|
|
1387
1392
|
onPointerMove: (l) => {
|
|
1388
1393
|
if (!e.current)
|
|
1389
1394
|
return;
|
|
1390
|
-
const d = l.clientY - e.current.y, p = !!r.current,
|
|
1391
|
-
p ? (r.current = w, o(
|
|
1395
|
+
const d = l.clientY - e.current.y, p = !!r.current, h = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2, w = { y: h }, v = { originalEvent: l, delta: w };
|
|
1396
|
+
p ? (r.current = w, o(v)) : gr(w, 0) ? (r.current = w, t(), l.target.setPointerCapture(l.pointerId)) : Math.abs(d) > m && (e.current = null);
|
|
1392
1397
|
},
|
|
1393
1398
|
onPointerUp: (l) => {
|
|
1394
1399
|
const d = r.current, p = l.target;
|
|
1395
1400
|
if (p.hasPointerCapture(l.pointerId) && p.releasePointerCapture(l.pointerId), r.current = null, e.current = null, d) {
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1401
|
+
const h = l.currentTarget, m = { originalEvent: l, delta: d };
|
|
1402
|
+
gr(d, 0) && d.y > 200 ? n(m) : a(), h.addEventListener("click", (w) => w.preventDefault(), {
|
|
1398
1403
|
once: !0
|
|
1399
1404
|
});
|
|
1400
1405
|
}
|
|
1401
1406
|
}
|
|
1402
|
-
}),
|
|
1407
|
+
}), gr = (e, r = 0) => Math.abs(e.y) > r, Mo = q.bind(Lo), Io = "purpur-drawer-handle", dt = j(
|
|
1403
1408
|
({
|
|
1404
1409
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1405
1410
|
className: r,
|
|
@@ -1409,7 +1414,7 @@ const Do = {
|
|
|
1409
1414
|
onSwipeEnd: n,
|
|
1410
1415
|
...s
|
|
1411
1416
|
}, i) => {
|
|
1412
|
-
const u =
|
|
1417
|
+
const u = Mo([r, Io]), l = Ie.useRef(null), d = Ie.useRef(null), { onPointerDown: p, onPointerMove: h, onPointerUp: m } = $o(
|
|
1413
1418
|
d,
|
|
1414
1419
|
l,
|
|
1415
1420
|
t,
|
|
@@ -1423,7 +1428,7 @@ const Do = {
|
|
|
1423
1428
|
className: u,
|
|
1424
1429
|
"data-testid": e,
|
|
1425
1430
|
onPointerDown: p,
|
|
1426
|
-
onPointerMove:
|
|
1431
|
+
onPointerMove: h,
|
|
1427
1432
|
onPointerUp: m,
|
|
1428
1433
|
ref: i,
|
|
1429
1434
|
...s
|
|
@@ -1431,22 +1436,22 @@ const Do = {
|
|
|
1431
1436
|
);
|
|
1432
1437
|
}
|
|
1433
1438
|
);
|
|
1434
|
-
|
|
1435
|
-
const
|
|
1439
|
+
dt.displayName = "DrawerHandle";
|
|
1440
|
+
const ko = {
|
|
1436
1441
|
LG: "lg"
|
|
1437
1442
|
};
|
|
1438
|
-
function
|
|
1443
|
+
function Wo(e) {
|
|
1439
1444
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1440
1445
|
}
|
|
1441
|
-
var
|
|
1446
|
+
var _r = { exports: {} };
|
|
1442
1447
|
/*!
|
|
1443
1448
|
Copyright (c) 2018 Jed Watson.
|
|
1444
1449
|
Licensed under the MIT License (MIT), see
|
|
1445
1450
|
http://jedwatson.github.io/classnames
|
|
1446
1451
|
*/
|
|
1447
|
-
var
|
|
1448
|
-
function
|
|
1449
|
-
return
|
|
1452
|
+
var wr;
|
|
1453
|
+
function Fo() {
|
|
1454
|
+
return wr || (wr = 1, function(e) {
|
|
1450
1455
|
(function() {
|
|
1451
1456
|
var r = {}.hasOwnProperty;
|
|
1452
1457
|
function t() {
|
|
@@ -1475,32 +1480,32 @@ function Wo() {
|
|
|
1475
1480
|
}
|
|
1476
1481
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1477
1482
|
})();
|
|
1478
|
-
}(
|
|
1483
|
+
}(_r)), _r.exports;
|
|
1479
1484
|
}
|
|
1480
|
-
var
|
|
1481
|
-
const
|
|
1485
|
+
var Uo = Fo();
|
|
1486
|
+
const Ho = /* @__PURE__ */ Wo(Uo), Bo = "_rotate_12t9p_1", jo = "_dash_12t9p_1", zo = {
|
|
1482
1487
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1483
|
-
rotate:
|
|
1488
|
+
rotate: Bo,
|
|
1484
1489
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1485
1490
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1486
1491
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1487
1492
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1488
1493
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1489
1494
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1490
|
-
dash:
|
|
1495
|
+
dash: jo,
|
|
1491
1496
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1492
1497
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1493
|
-
},
|
|
1498
|
+
}, br = Ho.bind(zo), oe = "purpur-spinner", Vo = {
|
|
1494
1499
|
SM: "sm"
|
|
1495
|
-
},
|
|
1500
|
+
}, Yo = ({
|
|
1496
1501
|
disabled: e = !1,
|
|
1497
1502
|
negative: r = !1,
|
|
1498
|
-
size: t =
|
|
1503
|
+
size: t = Vo.SM,
|
|
1499
1504
|
...o
|
|
1500
|
-
}) => /* @__PURE__ */ f("div", { className:
|
|
1505
|
+
}) => /* @__PURE__ */ f("div", { className: br(oe, `${oe}--${t}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1501
1506
|
"circle",
|
|
1502
1507
|
{
|
|
1503
|
-
className:
|
|
1508
|
+
className: br(`${oe}__circle`, {
|
|
1504
1509
|
[`${oe}__circle--disabled`]: e,
|
|
1505
1510
|
[`${oe}__circle--negative`]: r
|
|
1506
1511
|
}),
|
|
@@ -1509,18 +1514,18 @@ const ko = /* @__PURE__ */ Io(Fo), Uo = "_rotate_12t9p_1", Ho = "_dash_12t9p_1",
|
|
|
1509
1514
|
r: "20"
|
|
1510
1515
|
}
|
|
1511
1516
|
) }) });
|
|
1512
|
-
function
|
|
1517
|
+
function Xo(e) {
|
|
1513
1518
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1514
1519
|
}
|
|
1515
|
-
var
|
|
1520
|
+
var yr = { exports: {} };
|
|
1516
1521
|
/*!
|
|
1517
1522
|
Copyright (c) 2018 Jed Watson.
|
|
1518
1523
|
Licensed under the MIT License (MIT), see
|
|
1519
1524
|
http://jedwatson.github.io/classnames
|
|
1520
1525
|
*/
|
|
1521
|
-
var
|
|
1522
|
-
function
|
|
1523
|
-
return
|
|
1526
|
+
var Sr;
|
|
1527
|
+
function qo() {
|
|
1528
|
+
return Sr || (Sr = 1, function(e) {
|
|
1524
1529
|
(function() {
|
|
1525
1530
|
var r = {}.hasOwnProperty;
|
|
1526
1531
|
function t() {
|
|
@@ -1549,35 +1554,35 @@ function Yo() {
|
|
|
1549
1554
|
}
|
|
1550
1555
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1551
1556
|
})();
|
|
1552
|
-
}(
|
|
1553
|
-
}
|
|
1554
|
-
var
|
|
1555
|
-
const
|
|
1556
|
-
"purpur-button": "_purpur-
|
|
1557
|
-
"purpur-button--xs": "_purpur-button--
|
|
1558
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
1559
|
-
"purpur-button--sm": "_purpur-button--
|
|
1560
|
-
"purpur-button--md": "_purpur-button--
|
|
1561
|
-
"purpur-button--lg": "_purpur-button--
|
|
1562
|
-
"purpur-button--full-width": "_purpur-button--full-
|
|
1563
|
-
"purpur-button--primary": "_purpur-button--
|
|
1564
|
-
"purpur-button--disabled": "_purpur-button--
|
|
1565
|
-
"purpur-button--primary-negative": "_purpur-button--primary-
|
|
1566
|
-
"purpur-button--secondary": "_purpur-button--
|
|
1567
|
-
"purpur-button--secondary-negative": "_purpur-button--secondary-
|
|
1568
|
-
"purpur-button--expressive": "_purpur-button--
|
|
1569
|
-
"purpur-button--expressive-negative": "_purpur-button--expressive-
|
|
1570
|
-
"purpur-button--negative": "_purpur-button--
|
|
1571
|
-
"purpur-button--destructive": "_purpur-button--
|
|
1572
|
-
"purpur-button--destructive-negative": "_purpur-button--destructive-
|
|
1573
|
-
"purpur-button--tertiary-purple": "_purpur-button--tertiary-
|
|
1574
|
-
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-
|
|
1575
|
-
"purpur-button--text-negative": "_purpur-button--text-
|
|
1576
|
-
"purpur-button--text": "_purpur-button--
|
|
1557
|
+
}(yr)), yr.exports;
|
|
1558
|
+
}
|
|
1559
|
+
var Go = qo();
|
|
1560
|
+
const Ko = /* @__PURE__ */ Xo(Go), Zo = {
|
|
1561
|
+
"purpur-button": "_purpur-button_1goi7_1",
|
|
1562
|
+
"purpur-button--xs": "_purpur-button--xs_1goi7_33",
|
|
1563
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_1goi7_36",
|
|
1564
|
+
"purpur-button--sm": "_purpur-button--sm_1goi7_39",
|
|
1565
|
+
"purpur-button--md": "_purpur-button--md_1goi7_45",
|
|
1566
|
+
"purpur-button--lg": "_purpur-button--lg_1goi7_51",
|
|
1567
|
+
"purpur-button--full-width": "_purpur-button--full-width_1goi7_57",
|
|
1568
|
+
"purpur-button--primary": "_purpur-button--primary_1goi7_60",
|
|
1569
|
+
"purpur-button--disabled": "_purpur-button--disabled_1goi7_64",
|
|
1570
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_1goi7_70",
|
|
1571
|
+
"purpur-button--secondary": "_purpur-button--secondary_1goi7_82",
|
|
1572
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_1goi7_93",
|
|
1573
|
+
"purpur-button--expressive": "_purpur-button--expressive_1goi7_104",
|
|
1574
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_1goi7_114",
|
|
1575
|
+
"purpur-button--negative": "_purpur-button--negative_1goi7_126",
|
|
1576
|
+
"purpur-button--destructive": "_purpur-button--destructive_1goi7_133",
|
|
1577
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_1goi7_143",
|
|
1578
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_1goi7_153",
|
|
1579
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
|
|
1580
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
|
|
1581
|
+
"purpur-button--text": "_purpur-button--text_1goi7_181"
|
|
1577
1582
|
}, Me = {
|
|
1578
1583
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1579
1584
|
TEXT: "text"
|
|
1580
|
-
},
|
|
1585
|
+
}, Qo = Ko.bind(Zo), V = "purpur-button", Ue = j(
|
|
1581
1586
|
({
|
|
1582
1587
|
children: e,
|
|
1583
1588
|
className: r,
|
|
@@ -1591,10 +1596,10 @@ const Xo = /* @__PURE__ */ Vo(qo), Go = {
|
|
|
1591
1596
|
variant: l,
|
|
1592
1597
|
type: d = "button",
|
|
1593
1598
|
...p
|
|
1594
|
-
},
|
|
1599
|
+
}, h) => {
|
|
1595
1600
|
if (a && l === "destructive")
|
|
1596
1601
|
return null;
|
|
1597
|
-
const m =
|
|
1602
|
+
const m = Qo(
|
|
1598
1603
|
[
|
|
1599
1604
|
V,
|
|
1600
1605
|
`${V}--${s ? `${l}-negative` : l}`,
|
|
@@ -1609,23 +1614,23 @@ const Xo = /* @__PURE__ */ Vo(qo), Go = {
|
|
|
1609
1614
|
r
|
|
1610
1615
|
), w = (g) => {
|
|
1611
1616
|
t || n ? g.preventDefault() : i && i(g);
|
|
1612
|
-
},
|
|
1617
|
+
}, v = !!p["aria-disabled"] || t || n;
|
|
1613
1618
|
return /* @__PURE__ */ D(
|
|
1614
1619
|
"button",
|
|
1615
1620
|
{
|
|
1616
1621
|
className: m,
|
|
1617
1622
|
type: d,
|
|
1618
|
-
ref:
|
|
1619
|
-
"aria-disabled":
|
|
1623
|
+
ref: h,
|
|
1624
|
+
"aria-disabled": v,
|
|
1620
1625
|
onClick: w,
|
|
1621
1626
|
...p,
|
|
1622
1627
|
children: [
|
|
1623
1628
|
n && /* @__PURE__ */ f(
|
|
1624
|
-
|
|
1629
|
+
Yo,
|
|
1625
1630
|
{
|
|
1626
|
-
size: u ===
|
|
1631
|
+
size: u === ko.LG ? "xs" : "xxs",
|
|
1627
1632
|
negative: s,
|
|
1628
|
-
disabled:
|
|
1633
|
+
disabled: v
|
|
1629
1634
|
}
|
|
1630
1635
|
),
|
|
1631
1636
|
" ",
|
|
@@ -1636,18 +1641,18 @@ const Xo = /* @__PURE__ */ Vo(qo), Go = {
|
|
|
1636
1641
|
}
|
|
1637
1642
|
);
|
|
1638
1643
|
Ue.displayName = "Button";
|
|
1639
|
-
function
|
|
1644
|
+
function Jo(e) {
|
|
1640
1645
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1641
1646
|
}
|
|
1642
|
-
var
|
|
1647
|
+
var Er = { exports: {} };
|
|
1643
1648
|
/*!
|
|
1644
1649
|
Copyright (c) 2018 Jed Watson.
|
|
1645
1650
|
Licensed under the MIT License (MIT), see
|
|
1646
1651
|
http://jedwatson.github.io/classnames
|
|
1647
1652
|
*/
|
|
1648
|
-
var
|
|
1649
|
-
function
|
|
1650
|
-
return
|
|
1653
|
+
var Cr;
|
|
1654
|
+
function ea() {
|
|
1655
|
+
return Cr || (Cr = 1, function(e) {
|
|
1651
1656
|
(function() {
|
|
1652
1657
|
var r = {}.hasOwnProperty;
|
|
1653
1658
|
function t() {
|
|
@@ -1676,10 +1681,10 @@ function Qo() {
|
|
|
1676
1681
|
}
|
|
1677
1682
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1678
1683
|
})();
|
|
1679
|
-
}(
|
|
1684
|
+
}(Er)), Er.exports;
|
|
1680
1685
|
}
|
|
1681
|
-
var
|
|
1682
|
-
const
|
|
1686
|
+
var ra = ea();
|
|
1687
|
+
const ta = /* @__PURE__ */ Jo(ra), ve = {
|
|
1683
1688
|
"purpur-heading": "_purpur-heading_vo751_1",
|
|
1684
1689
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
|
|
1685
1690
|
"purpur-heading--negative": "_purpur-heading--negative_vo751_11",
|
|
@@ -1711,30 +1716,30 @@ const ea = /* @__PURE__ */ Zo(Jo), he = {
|
|
|
1711
1716
|
variant: n = He.TITLE100,
|
|
1712
1717
|
...s
|
|
1713
1718
|
}) => {
|
|
1714
|
-
const i = a, u =
|
|
1719
|
+
const i = a, u = ta([
|
|
1715
1720
|
r,
|
|
1716
|
-
|
|
1717
|
-
|
|
1721
|
+
ve[me],
|
|
1722
|
+
ve[`${me}--${n}`],
|
|
1718
1723
|
{
|
|
1719
|
-
[
|
|
1720
|
-
[
|
|
1724
|
+
[ve[`${me}--hyphens`]]: t,
|
|
1725
|
+
[ve[`${me}--negative`]]: o
|
|
1721
1726
|
}
|
|
1722
1727
|
]);
|
|
1723
1728
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1724
1729
|
};
|
|
1725
1730
|
Be.displayName = "Heading";
|
|
1726
|
-
function
|
|
1731
|
+
function na(e) {
|
|
1727
1732
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1728
1733
|
}
|
|
1729
|
-
var
|
|
1734
|
+
var Pr = { exports: {} };
|
|
1730
1735
|
/*!
|
|
1731
1736
|
Copyright (c) 2018 Jed Watson.
|
|
1732
1737
|
Licensed under the MIT License (MIT), see
|
|
1733
1738
|
http://jedwatson.github.io/classnames
|
|
1734
1739
|
*/
|
|
1735
|
-
var
|
|
1736
|
-
function
|
|
1737
|
-
return
|
|
1740
|
+
var xr;
|
|
1741
|
+
function oa() {
|
|
1742
|
+
return xr || (xr = 1, function(e) {
|
|
1738
1743
|
(function() {
|
|
1739
1744
|
var r = {}.hasOwnProperty;
|
|
1740
1745
|
function t() {
|
|
@@ -1763,10 +1768,10 @@ function ta() {
|
|
|
1763
1768
|
}
|
|
1764
1769
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1765
1770
|
})();
|
|
1766
|
-
}(
|
|
1771
|
+
}(Pr)), Pr.exports;
|
|
1767
1772
|
}
|
|
1768
|
-
var
|
|
1769
|
-
const
|
|
1773
|
+
var aa = oa();
|
|
1774
|
+
const ia = /* @__PURE__ */ na(aa), sa = {
|
|
1770
1775
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1771
1776
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1772
1777
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1774,80 +1779,80 @@ const oa = /* @__PURE__ */ ra(na), aa = {
|
|
|
1774
1779
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1775
1780
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1776
1781
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1777
|
-
},
|
|
1782
|
+
}, ca = ia.bind(sa), Ar = "purpur-icon", la = "md", ua = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), da = ({ content: e = "", title: r } = {}) => {
|
|
1778
1783
|
const t = [
|
|
1779
1784
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1780
1785
|
{ name: "fill", value: "currentColor" },
|
|
1781
1786
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1782
1787
|
r ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1783
1788
|
], o = r ? `<title>${r}</title>` : "";
|
|
1784
|
-
return `<svg ${
|
|
1785
|
-
},
|
|
1786
|
-
const n =
|
|
1787
|
-
content:
|
|
1789
|
+
return `<svg ${ua(t)}>${o}${e}</svg>`;
|
|
1790
|
+
}, fa = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ke = ({ svg: e, allyTitle: r, className: t, size: o = la, ...a }) => {
|
|
1791
|
+
const n = da({
|
|
1792
|
+
content: fa(e.svg),
|
|
1788
1793
|
title: r
|
|
1789
|
-
}), s =
|
|
1794
|
+
}), s = ca(t, Ar, `${Ar}--${o}`);
|
|
1790
1795
|
return /* @__PURE__ */ f("span", { className: s, dangerouslySetInnerHTML: { __html: n }, ...a });
|
|
1791
1796
|
};
|
|
1792
1797
|
Ke.displayName = "Icon";
|
|
1793
|
-
const
|
|
1798
|
+
const pa = {
|
|
1794
1799
|
name: "arrow-left",
|
|
1795
1800
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 12a.9.9 0 0 1 .264-.636l5.5-5.5a.9.9 0 0 1 1.272 1.272L6.173 11.1H20a.9.9 0 0 1 0 1.8H6.173l3.963 3.964a.9.9 0 1 1-1.272 1.272l-5.5-5.5A.9.9 0 0 1 3.1 12Z" clip-rule="evenodd"/></svg>',
|
|
1796
1801
|
keywords: ["arrow-left"],
|
|
1797
1802
|
category: "utility"
|
|
1798
|
-
},
|
|
1799
|
-
|
|
1800
|
-
const
|
|
1803
|
+
}, ft = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: pa });
|
|
1804
|
+
ft.displayName = "IconArrowLeft";
|
|
1805
|
+
const ha = {
|
|
1801
1806
|
name: "close",
|
|
1802
1807
|
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>',
|
|
1803
1808
|
keywords: ["close"],
|
|
1804
1809
|
category: "utility"
|
|
1805
|
-
},
|
|
1806
|
-
|
|
1807
|
-
function
|
|
1810
|
+
}, pt = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: ha });
|
|
1811
|
+
pt.displayName = "IconClose";
|
|
1812
|
+
function Nr(e, r) {
|
|
1808
1813
|
if (typeof e == "function")
|
|
1809
1814
|
return e(r);
|
|
1810
1815
|
e != null && (e.current = r);
|
|
1811
1816
|
}
|
|
1812
|
-
function
|
|
1817
|
+
function va(...e) {
|
|
1813
1818
|
return (r) => {
|
|
1814
1819
|
let t = !1;
|
|
1815
1820
|
const o = e.map((a) => {
|
|
1816
|
-
const n =
|
|
1821
|
+
const n = Nr(a, r);
|
|
1817
1822
|
return !t && typeof n == "function" && (t = !0), n;
|
|
1818
1823
|
});
|
|
1819
1824
|
if (t)
|
|
1820
1825
|
return () => {
|
|
1821
1826
|
for (let a = 0; a < o.length; a++) {
|
|
1822
1827
|
const n = o[a];
|
|
1823
|
-
typeof n == "function" ? n() :
|
|
1828
|
+
typeof n == "function" ? n() : Nr(e[a], null);
|
|
1824
1829
|
}
|
|
1825
1830
|
};
|
|
1826
1831
|
};
|
|
1827
1832
|
}
|
|
1828
|
-
var
|
|
1829
|
-
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(
|
|
1833
|
+
var ht = c.forwardRef((e, r) => {
|
|
1834
|
+
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(ga);
|
|
1830
1835
|
if (n) {
|
|
1831
1836
|
const s = n.props.children, i = a.map((u) => u === n ? c.Children.count(s) > 1 ? c.Children.only(null) : c.isValidElement(s) ? s.props.children : null : u);
|
|
1832
1837
|
return /* @__PURE__ */ f(je, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
1833
1838
|
}
|
|
1834
1839
|
return /* @__PURE__ */ f(je, { ...o, ref: r, children: t });
|
|
1835
1840
|
});
|
|
1836
|
-
|
|
1841
|
+
ht.displayName = "Slot";
|
|
1837
1842
|
var je = c.forwardRef((e, r) => {
|
|
1838
1843
|
const { children: t, ...o } = e;
|
|
1839
1844
|
if (c.isValidElement(t)) {
|
|
1840
|
-
const a =
|
|
1841
|
-
return t.type !== c.Fragment && (n.ref = r ?
|
|
1845
|
+
const a = wa(t), n = _a(o, t.props);
|
|
1846
|
+
return t.type !== c.Fragment && (n.ref = r ? va(r, a) : a), c.cloneElement(t, n);
|
|
1842
1847
|
}
|
|
1843
1848
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
1844
1849
|
});
|
|
1845
1850
|
je.displayName = "SlotClone";
|
|
1846
|
-
var
|
|
1847
|
-
function
|
|
1848
|
-
return c.isValidElement(e) && e.type ===
|
|
1851
|
+
var ma = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
|
|
1852
|
+
function ga(e) {
|
|
1853
|
+
return c.isValidElement(e) && e.type === ma;
|
|
1849
1854
|
}
|
|
1850
|
-
function
|
|
1855
|
+
function _a(e, r) {
|
|
1851
1856
|
const t = { ...r };
|
|
1852
1857
|
for (const o in r) {
|
|
1853
1858
|
const a = e[o], n = r[o];
|
|
@@ -1857,12 +1862,12 @@ function ma(e, r) {
|
|
|
1857
1862
|
}
|
|
1858
1863
|
return { ...e, ...t };
|
|
1859
1864
|
}
|
|
1860
|
-
function
|
|
1865
|
+
function wa(e) {
|
|
1861
1866
|
var r, t;
|
|
1862
1867
|
let o = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning;
|
|
1863
1868
|
return a ? e.ref : (o = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
|
|
1864
1869
|
}
|
|
1865
|
-
var
|
|
1870
|
+
var ba = [
|
|
1866
1871
|
"a",
|
|
1867
1872
|
"button",
|
|
1868
1873
|
"div",
|
|
@@ -1879,15 +1884,15 @@ var _a = [
|
|
|
1879
1884
|
"span",
|
|
1880
1885
|
"svg",
|
|
1881
1886
|
"ul"
|
|
1882
|
-
],
|
|
1887
|
+
], ya = ba.reduce((e, r) => {
|
|
1883
1888
|
const t = c.forwardRef((o, a) => {
|
|
1884
|
-
const { asChild: n, ...s } = o, i = n ?
|
|
1889
|
+
const { asChild: n, ...s } = o, i = n ? ht : r;
|
|
1885
1890
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...s, ref: a });
|
|
1886
1891
|
});
|
|
1887
1892
|
return t.displayName = `Primitive.${r}`, { ...e, [r]: t };
|
|
1888
|
-
}, {}),
|
|
1893
|
+
}, {}), Sa = "VisuallyHidden", vt = c.forwardRef(
|
|
1889
1894
|
(e, r) => /* @__PURE__ */ f(
|
|
1890
|
-
|
|
1895
|
+
ya.span,
|
|
1891
1896
|
{
|
|
1892
1897
|
...e,
|
|
1893
1898
|
ref: r,
|
|
@@ -1908,16 +1913,16 @@ var _a = [
|
|
|
1908
1913
|
}
|
|
1909
1914
|
)
|
|
1910
1915
|
);
|
|
1911
|
-
vt.displayName =
|
|
1912
|
-
var
|
|
1913
|
-
const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(
|
|
1916
|
+
vt.displayName = Sa;
|
|
1917
|
+
var Ea = vt;
|
|
1918
|
+
const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(Ea, { asChild: e, ...t, children: r }), Ca = {
|
|
1914
1919
|
"purpur-drawer-header__row": "_purpur-drawer-header__row_1yg5w_1",
|
|
1915
1920
|
"purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-button_1yg5w_6",
|
|
1916
1921
|
"purpur-drawer-header__left": "_purpur-drawer-header__left_1yg5w_9",
|
|
1917
1922
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1918
1923
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1919
1924
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1920
|
-
},
|
|
1925
|
+
}, Q = q.bind(Ca), U = "purpur-drawer-header", mt = j(
|
|
1921
1926
|
({
|
|
1922
1927
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1923
1928
|
backButton: r,
|
|
@@ -1930,12 +1935,12 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1930
1935
|
title: u,
|
|
1931
1936
|
...l
|
|
1932
1937
|
}, d) => {
|
|
1933
|
-
const p =
|
|
1938
|
+
const p = Q([a, U]);
|
|
1934
1939
|
return /* @__PURE__ */ D("div", { className: p, "data-testid": e, ref: d, ...l, children: [
|
|
1935
1940
|
/* @__PURE__ */ D(
|
|
1936
1941
|
"div",
|
|
1937
1942
|
{
|
|
1938
|
-
className:
|
|
1943
|
+
className: Q([
|
|
1939
1944
|
`${U}__row`,
|
|
1940
1945
|
{
|
|
1941
1946
|
[`${U}__row--with-back-button`]: r && t && i
|
|
@@ -1943,11 +1948,11 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1943
1948
|
]),
|
|
1944
1949
|
"data-testid": `${e}-row`,
|
|
1945
1950
|
children: [
|
|
1946
|
-
/* @__PURE__ */ f("div", { className:
|
|
1951
|
+
/* @__PURE__ */ f("div", { className: Q(`${U}__left`), children: r && t && i ? /* @__PURE__ */ D(
|
|
1947
1952
|
Ue,
|
|
1948
1953
|
{
|
|
1949
1954
|
"aria-label": o ? t : "",
|
|
1950
|
-
className:
|
|
1955
|
+
className: Q([
|
|
1951
1956
|
`${U}__back-button`,
|
|
1952
1957
|
{
|
|
1953
1958
|
[`${U}__back-button--only-icon`]: o
|
|
@@ -1959,14 +1964,14 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1959
1964
|
size: "sm",
|
|
1960
1965
|
variant: o ? Me.TERTIARY_PURPLE : Me.TEXT,
|
|
1961
1966
|
children: [
|
|
1962
|
-
/* @__PURE__ */ f(
|
|
1967
|
+
/* @__PURE__ */ f(ft, { size: "sm" }),
|
|
1963
1968
|
!o && t
|
|
1964
1969
|
]
|
|
1965
1970
|
}
|
|
1966
1971
|
) : s ? /* @__PURE__ */ D(B, { children: [
|
|
1967
1972
|
s,
|
|
1968
|
-
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1969
|
-
] }) : /* @__PURE__ */ f(
|
|
1973
|
+
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
|
|
1974
|
+
] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1970
1975
|
Be,
|
|
1971
1976
|
{
|
|
1972
1977
|
"data-testid": `${e}-title`,
|
|
@@ -1976,15 +1981,15 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1976
1981
|
children: u
|
|
1977
1982
|
}
|
|
1978
1983
|
) }) }),
|
|
1979
|
-
/* @__PURE__ */ f("div", { className:
|
|
1984
|
+
/* @__PURE__ */ f("div", { className: Q(`${U}__right`), children: /* @__PURE__ */ f(wo, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1980
1985
|
Ue,
|
|
1981
1986
|
{
|
|
1982
1987
|
"aria-label": n,
|
|
1983
|
-
className:
|
|
1988
|
+
className: Q(`${U}__close-button`),
|
|
1984
1989
|
iconOnly: !0,
|
|
1985
1990
|
size: "sm",
|
|
1986
1991
|
variant: Me.TERTIARY_PURPLE,
|
|
1987
|
-
children: /* @__PURE__ */ f(
|
|
1992
|
+
children: /* @__PURE__ */ f(pt, { size: "sm" })
|
|
1988
1993
|
}
|
|
1989
1994
|
) }) })
|
|
1990
1995
|
]
|
|
@@ -1992,8 +1997,8 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1992
1997
|
),
|
|
1993
1998
|
r && t && i && (s ? /* @__PURE__ */ D(B, { children: [
|
|
1994
1999
|
s,
|
|
1995
|
-
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1996
|
-
] }) : /* @__PURE__ */ f(
|
|
2000
|
+
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
|
|
2001
|
+
] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1997
2002
|
Be,
|
|
1998
2003
|
{
|
|
1999
2004
|
"data-testid": `${e}-title-with-back-button`,
|
|
@@ -2006,19 +2011,19 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
2006
2011
|
] });
|
|
2007
2012
|
}
|
|
2008
2013
|
);
|
|
2009
|
-
|
|
2010
|
-
var
|
|
2011
|
-
function
|
|
2012
|
-
const r = c.useContext(
|
|
2014
|
+
mt.displayName = "DrawerHeader";
|
|
2015
|
+
var Pa = c.createContext(void 0);
|
|
2016
|
+
function xa(e) {
|
|
2017
|
+
const r = c.useContext(Pa);
|
|
2013
2018
|
return e || r || "ltr";
|
|
2014
2019
|
}
|
|
2015
|
-
function
|
|
2020
|
+
function Aa(e, [r, t]) {
|
|
2016
2021
|
return Math.min(t, Math.max(r, e));
|
|
2017
2022
|
}
|
|
2018
2023
|
function Na(e, r) {
|
|
2019
2024
|
return c.useReducer((t, o) => r[t][o] ?? t, e);
|
|
2020
2025
|
}
|
|
2021
|
-
var Ze = "ScrollArea", [
|
|
2026
|
+
var Ze = "ScrollArea", [gt, Ja] = Or(Ze), [Ra, $] = gt(Ze), _t = c.forwardRef(
|
|
2022
2027
|
(e, r) => {
|
|
2023
2028
|
const {
|
|
2024
2029
|
__scopeScrollArea: t,
|
|
@@ -2026,9 +2031,9 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
|
|
|
2026
2031
|
dir: a,
|
|
2027
2032
|
scrollHideDelay: n = 600,
|
|
2028
2033
|
...s
|
|
2029
|
-
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p,
|
|
2034
|
+
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, h] = c.useState(null), [m, w] = c.useState(null), [v, g] = c.useState(null), [_, E] = c.useState(0), [y, b] = c.useState(0), [C, x] = c.useState(!1), [S, N] = c.useState(!1), P = L(r, (F) => u(F)), A = xa(a);
|
|
2030
2035
|
return /* @__PURE__ */ f(
|
|
2031
|
-
|
|
2036
|
+
Ra,
|
|
2032
2037
|
{
|
|
2033
2038
|
scope: t,
|
|
2034
2039
|
type: o,
|
|
@@ -2038,17 +2043,17 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
|
|
|
2038
2043
|
viewport: l,
|
|
2039
2044
|
onViewportChange: d,
|
|
2040
2045
|
content: p,
|
|
2041
|
-
onContentChange:
|
|
2046
|
+
onContentChange: h,
|
|
2042
2047
|
scrollbarX: m,
|
|
2043
2048
|
onScrollbarXChange: w,
|
|
2044
2049
|
scrollbarXEnabled: C,
|
|
2045
|
-
onScrollbarXEnabledChange:
|
|
2046
|
-
scrollbarY:
|
|
2050
|
+
onScrollbarXEnabledChange: x,
|
|
2051
|
+
scrollbarY: v,
|
|
2047
2052
|
onScrollbarYChange: g,
|
|
2048
2053
|
scrollbarYEnabled: S,
|
|
2049
|
-
onScrollbarYEnabledChange:
|
|
2054
|
+
onScrollbarYEnabledChange: N,
|
|
2050
2055
|
onCornerWidthChange: E,
|
|
2051
|
-
onCornerHeightChange:
|
|
2056
|
+
onCornerHeightChange: b,
|
|
2052
2057
|
children: /* @__PURE__ */ f(
|
|
2053
2058
|
O.div,
|
|
2054
2059
|
{
|
|
@@ -2059,7 +2064,7 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
|
|
|
2059
2064
|
position: "relative",
|
|
2060
2065
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
2061
2066
|
"--radix-scroll-area-corner-width": _ + "px",
|
|
2062
|
-
"--radix-scroll-area-corner-height":
|
|
2067
|
+
"--radix-scroll-area-corner-height": y + "px",
|
|
2063
2068
|
...e.style
|
|
2064
2069
|
}
|
|
2065
2070
|
}
|
|
@@ -2068,10 +2073,10 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
|
|
|
2068
2073
|
);
|
|
2069
2074
|
}
|
|
2070
2075
|
);
|
|
2071
|
-
|
|
2072
|
-
var
|
|
2076
|
+
_t.displayName = Ze;
|
|
2077
|
+
var wt = "ScrollAreaViewport", bt = c.forwardRef(
|
|
2073
2078
|
(e, r) => {
|
|
2074
|
-
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(
|
|
2079
|
+
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(wt, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
|
|
2075
2080
|
return /* @__PURE__ */ D(B, { children: [
|
|
2076
2081
|
/* @__PURE__ */ f(
|
|
2077
2082
|
"style",
|
|
@@ -2110,17 +2115,17 @@ var _t = "ScrollAreaViewport", wt = c.forwardRef(
|
|
|
2110
2115
|
] });
|
|
2111
2116
|
}
|
|
2112
2117
|
);
|
|
2113
|
-
|
|
2114
|
-
var W = "ScrollAreaScrollbar",
|
|
2118
|
+
bt.displayName = wt;
|
|
2119
|
+
var W = "ScrollAreaScrollbar", yt = c.forwardRef(
|
|
2115
2120
|
(e, r) => {
|
|
2116
2121
|
const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2117
2122
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2118
2123
|
i ? n(!1) : s(!1);
|
|
2119
|
-
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(
|
|
2124
|
+
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(Da, { ...o, ref: r, forceMount: t }) : a.type === "scroll" ? /* @__PURE__ */ f(Ta, { ...o, ref: r, forceMount: t }) : a.type === "auto" ? /* @__PURE__ */ f(St, { ...o, ref: r, forceMount: t }) : a.type === "always" ? /* @__PURE__ */ f(Qe, { ...o, ref: r }) : null;
|
|
2120
2125
|
}
|
|
2121
2126
|
);
|
|
2122
|
-
|
|
2123
|
-
var
|
|
2127
|
+
yt.displayName = W;
|
|
2128
|
+
var Da = c.forwardRef((e, r) => {
|
|
2124
2129
|
const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2125
2130
|
return c.useEffect(() => {
|
|
2126
2131
|
const i = a.scrollArea;
|
|
@@ -2136,14 +2141,14 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2136
2141
|
};
|
|
2137
2142
|
}
|
|
2138
2143
|
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(z, { present: t || n, children: /* @__PURE__ */ f(
|
|
2139
|
-
|
|
2144
|
+
St,
|
|
2140
2145
|
{
|
|
2141
2146
|
"data-state": n ? "visible" : "hidden",
|
|
2142
2147
|
...o,
|
|
2143
2148
|
ref: r
|
|
2144
2149
|
}
|
|
2145
2150
|
) });
|
|
2146
|
-
}),
|
|
2151
|
+
}), Ta = c.forwardRef((e, r) => {
|
|
2147
2152
|
const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Ce(() => u("SCROLL_END"), 100), [i, u] = Na("hidden", {
|
|
2148
2153
|
hidden: {
|
|
2149
2154
|
SCROLL: "scrolling"
|
|
@@ -2171,11 +2176,11 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2171
2176
|
const l = a.viewport, d = n ? "scrollLeft" : "scrollTop";
|
|
2172
2177
|
if (l) {
|
|
2173
2178
|
let p = l[d];
|
|
2174
|
-
const
|
|
2179
|
+
const h = () => {
|
|
2175
2180
|
const m = l[d];
|
|
2176
2181
|
p !== m && (u("SCROLL"), s()), p = m;
|
|
2177
2182
|
};
|
|
2178
|
-
return l.addEventListener("scroll",
|
|
2183
|
+
return l.addEventListener("scroll", h), () => l.removeEventListener("scroll", h);
|
|
2179
2184
|
}
|
|
2180
2185
|
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(z, { present: t || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2181
2186
|
Qe,
|
|
@@ -2183,18 +2188,18 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2183
2188
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
2184
2189
|
...o,
|
|
2185
2190
|
ref: r,
|
|
2186
|
-
onPointerEnter:
|
|
2187
|
-
onPointerLeave:
|
|
2191
|
+
onPointerEnter: R(e.onPointerEnter, () => u("POINTER_ENTER")),
|
|
2192
|
+
onPointerLeave: R(e.onPointerLeave, () => u("POINTER_LEAVE"))
|
|
2188
2193
|
}
|
|
2189
2194
|
) });
|
|
2190
|
-
}),
|
|
2195
|
+
}), St = c.forwardRef((e, r) => {
|
|
2191
2196
|
const t = $(W, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, s] = c.useState(!1), i = e.orientation === "horizontal", u = Ce(() => {
|
|
2192
2197
|
if (t.viewport) {
|
|
2193
2198
|
const l = t.viewport.offsetWidth < t.viewport.scrollWidth, d = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
2194
2199
|
s(i ? l : d);
|
|
2195
2200
|
}
|
|
2196
2201
|
}, 10);
|
|
2197
|
-
return
|
|
2202
|
+
return ne(t.viewport, u), ne(t.content, u), /* @__PURE__ */ f(z, { present: o || n, children: /* @__PURE__ */ f(
|
|
2198
2203
|
Qe,
|
|
2199
2204
|
{
|
|
2200
2205
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2207,61 +2212,61 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2207
2212
|
content: 0,
|
|
2208
2213
|
viewport: 0,
|
|
2209
2214
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
2210
|
-
}), l =
|
|
2215
|
+
}), l = xt(i.viewport, i.content), d = {
|
|
2211
2216
|
...o,
|
|
2212
2217
|
sizes: i,
|
|
2213
2218
|
onSizesChange: u,
|
|
2214
2219
|
hasThumb: l > 0 && l < 1,
|
|
2215
|
-
onThumbChange: (
|
|
2220
|
+
onThumbChange: (h) => n.current = h,
|
|
2216
2221
|
onThumbPointerUp: () => s.current = 0,
|
|
2217
|
-
onThumbPointerDown: (
|
|
2222
|
+
onThumbPointerDown: (h) => s.current = h
|
|
2218
2223
|
};
|
|
2219
|
-
function p(
|
|
2220
|
-
return
|
|
2224
|
+
function p(h, m) {
|
|
2225
|
+
return Wa(h, s.current, i, m);
|
|
2221
2226
|
}
|
|
2222
2227
|
return t === "horizontal" ? /* @__PURE__ */ f(
|
|
2223
|
-
|
|
2228
|
+
Oa,
|
|
2224
2229
|
{
|
|
2225
2230
|
...d,
|
|
2226
2231
|
ref: r,
|
|
2227
2232
|
onThumbPositionChange: () => {
|
|
2228
2233
|
if (a.viewport && n.current) {
|
|
2229
|
-
const
|
|
2234
|
+
const h = a.viewport.scrollLeft, m = Dr(h, i, a.dir);
|
|
2230
2235
|
n.current.style.transform = `translate3d(${m}px, 0, 0)`;
|
|
2231
2236
|
}
|
|
2232
2237
|
},
|
|
2233
|
-
onWheelScroll: (
|
|
2234
|
-
a.viewport && (a.viewport.scrollLeft =
|
|
2238
|
+
onWheelScroll: (h) => {
|
|
2239
|
+
a.viewport && (a.viewport.scrollLeft = h);
|
|
2235
2240
|
},
|
|
2236
|
-
onDragScroll: (
|
|
2237
|
-
a.viewport && (a.viewport.scrollLeft = p(
|
|
2241
|
+
onDragScroll: (h) => {
|
|
2242
|
+
a.viewport && (a.viewport.scrollLeft = p(h, a.dir));
|
|
2238
2243
|
}
|
|
2239
2244
|
}
|
|
2240
2245
|
) : t === "vertical" ? /* @__PURE__ */ f(
|
|
2241
|
-
|
|
2246
|
+
La,
|
|
2242
2247
|
{
|
|
2243
2248
|
...d,
|
|
2244
2249
|
ref: r,
|
|
2245
2250
|
onThumbPositionChange: () => {
|
|
2246
2251
|
if (a.viewport && n.current) {
|
|
2247
|
-
const
|
|
2252
|
+
const h = a.viewport.scrollTop, m = Dr(h, i);
|
|
2248
2253
|
n.current.style.transform = `translate3d(0, ${m}px, 0)`;
|
|
2249
2254
|
}
|
|
2250
2255
|
},
|
|
2251
|
-
onWheelScroll: (
|
|
2252
|
-
a.viewport && (a.viewport.scrollTop =
|
|
2256
|
+
onWheelScroll: (h) => {
|
|
2257
|
+
a.viewport && (a.viewport.scrollTop = h);
|
|
2253
2258
|
},
|
|
2254
|
-
onDragScroll: (
|
|
2255
|
-
a.viewport && (a.viewport.scrollTop = p(
|
|
2259
|
+
onDragScroll: (h) => {
|
|
2260
|
+
a.viewport && (a.viewport.scrollTop = p(h));
|
|
2256
2261
|
}
|
|
2257
2262
|
}
|
|
2258
2263
|
) : null;
|
|
2259
|
-
}),
|
|
2264
|
+
}), Oa = c.forwardRef((e, r) => {
|
|
2260
2265
|
const { sizes: t, onSizesChange: o, ...a } = e, n = $(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarXChange);
|
|
2261
2266
|
return c.useEffect(() => {
|
|
2262
2267
|
u.current && i(getComputedStyle(u.current));
|
|
2263
2268
|
}, [u]), /* @__PURE__ */ f(
|
|
2264
|
-
|
|
2269
|
+
Ct,
|
|
2265
2270
|
{
|
|
2266
2271
|
"data-orientation": "horizontal",
|
|
2267
2272
|
...a,
|
|
@@ -2278,8 +2283,8 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2278
2283
|
onDragScroll: (d) => e.onDragScroll(d.x),
|
|
2279
2284
|
onWheelScroll: (d, p) => {
|
|
2280
2285
|
if (n.viewport) {
|
|
2281
|
-
const
|
|
2282
|
-
e.onWheelScroll(
|
|
2286
|
+
const h = n.viewport.scrollLeft + d.deltaX;
|
|
2287
|
+
e.onWheelScroll(h), Nt(h, p) && d.preventDefault();
|
|
2283
2288
|
}
|
|
2284
2289
|
},
|
|
2285
2290
|
onResize: () => {
|
|
@@ -2295,12 +2300,12 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2295
2300
|
}
|
|
2296
2301
|
}
|
|
2297
2302
|
);
|
|
2298
|
-
}),
|
|
2303
|
+
}), La = c.forwardRef((e, r) => {
|
|
2299
2304
|
const { sizes: t, onSizesChange: o, ...a } = e, n = $(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarYChange);
|
|
2300
2305
|
return c.useEffect(() => {
|
|
2301
2306
|
u.current && i(getComputedStyle(u.current));
|
|
2302
2307
|
}, [u]), /* @__PURE__ */ f(
|
|
2303
|
-
|
|
2308
|
+
Ct,
|
|
2304
2309
|
{
|
|
2305
2310
|
"data-orientation": "vertical",
|
|
2306
2311
|
...a,
|
|
@@ -2318,8 +2323,8 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2318
2323
|
onDragScroll: (d) => e.onDragScroll(d.y),
|
|
2319
2324
|
onWheelScroll: (d, p) => {
|
|
2320
2325
|
if (n.viewport) {
|
|
2321
|
-
const
|
|
2322
|
-
e.onWheelScroll(
|
|
2326
|
+
const h = n.viewport.scrollTop + d.deltaY;
|
|
2327
|
+
e.onWheelScroll(h), Nt(h, p) && d.preventDefault();
|
|
2323
2328
|
}
|
|
2324
2329
|
},
|
|
2325
2330
|
onResize: () => {
|
|
@@ -2335,7 +2340,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2335
2340
|
}
|
|
2336
2341
|
}
|
|
2337
2342
|
);
|
|
2338
|
-
}), [
|
|
2343
|
+
}), [$a, Et] = gt(W), Ct = c.forwardRef((e, r) => {
|
|
2339
2344
|
const {
|
|
2340
2345
|
__scopeScrollArea: t,
|
|
2341
2346
|
sizes: o,
|
|
@@ -2347,41 +2352,41 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2347
2352
|
onDragScroll: l,
|
|
2348
2353
|
onWheelScroll: d,
|
|
2349
2354
|
onResize: p,
|
|
2350
|
-
...
|
|
2351
|
-
} = e, m = $(W, t), [w,
|
|
2352
|
-
function
|
|
2355
|
+
...h
|
|
2356
|
+
} = e, m = $(W, t), [w, v] = c.useState(null), g = L(r, (P) => v(P)), _ = c.useRef(null), E = c.useRef(""), y = m.viewport, b = o.content - o.viewport, C = T(d), x = T(u), S = Ce(p, 10);
|
|
2357
|
+
function N(P) {
|
|
2353
2358
|
if (_.current) {
|
|
2354
|
-
const A = P.clientX - _.current.left,
|
|
2355
|
-
l({ x: A, y:
|
|
2359
|
+
const A = P.clientX - _.current.left, F = P.clientY - _.current.top;
|
|
2360
|
+
l({ x: A, y: F });
|
|
2356
2361
|
}
|
|
2357
2362
|
}
|
|
2358
2363
|
return c.useEffect(() => {
|
|
2359
2364
|
const P = (A) => {
|
|
2360
|
-
const
|
|
2361
|
-
(w == null ? void 0 : w.contains(
|
|
2365
|
+
const F = A.target;
|
|
2366
|
+
(w == null ? void 0 : w.contains(F)) && C(A, b);
|
|
2362
2367
|
};
|
|
2363
2368
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2364
|
-
}, [
|
|
2365
|
-
|
|
2369
|
+
}, [y, w, b, C]), c.useEffect(x, [o, x]), ne(w, S), ne(m.content, S), /* @__PURE__ */ f(
|
|
2370
|
+
$a,
|
|
2366
2371
|
{
|
|
2367
2372
|
scope: t,
|
|
2368
2373
|
scrollbar: w,
|
|
2369
2374
|
hasThumb: a,
|
|
2370
2375
|
onThumbChange: T(n),
|
|
2371
2376
|
onThumbPointerUp: T(s),
|
|
2372
|
-
onThumbPositionChange:
|
|
2377
|
+
onThumbPositionChange: x,
|
|
2373
2378
|
onThumbPointerDown: T(i),
|
|
2374
2379
|
children: /* @__PURE__ */ f(
|
|
2375
2380
|
O.div,
|
|
2376
2381
|
{
|
|
2377
|
-
...
|
|
2382
|
+
...h,
|
|
2378
2383
|
ref: g,
|
|
2379
|
-
style: { position: "absolute", ...
|
|
2380
|
-
onPointerDown:
|
|
2381
|
-
P.button === 0 && (P.target.setPointerCapture(P.pointerId), _.current = w.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"),
|
|
2384
|
+
style: { position: "absolute", ...h.style },
|
|
2385
|
+
onPointerDown: R(e.onPointerDown, (P) => {
|
|
2386
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), _.current = w.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), N(P));
|
|
2382
2387
|
}),
|
|
2383
|
-
onPointerMove:
|
|
2384
|
-
onPointerUp:
|
|
2388
|
+
onPointerMove: R(e.onPointerMove, N),
|
|
2389
|
+
onPointerUp: R(e.onPointerUp, (P) => {
|
|
2385
2390
|
const A = P.target;
|
|
2386
2391
|
A.hasPointerCapture(P.pointerId) && A.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = E.current, m.viewport && (m.viewport.style.scrollBehavior = ""), _.current = null;
|
|
2387
2392
|
})
|
|
@@ -2389,14 +2394,14 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2389
2394
|
)
|
|
2390
2395
|
}
|
|
2391
2396
|
);
|
|
2392
|
-
}), be = "ScrollAreaThumb",
|
|
2397
|
+
}), be = "ScrollAreaThumb", Pt = c.forwardRef(
|
|
2393
2398
|
(e, r) => {
|
|
2394
|
-
const { forceMount: t, ...o } = e, a =
|
|
2395
|
-
return /* @__PURE__ */ f(z, { present: t || a.hasThumb, children: /* @__PURE__ */ f(
|
|
2399
|
+
const { forceMount: t, ...o } = e, a = Et(be, e.__scopeScrollArea);
|
|
2400
|
+
return /* @__PURE__ */ f(z, { present: t || a.hasThumb, children: /* @__PURE__ */ f(Ma, { ref: r, ...o }) });
|
|
2396
2401
|
}
|
|
2397
|
-
),
|
|
2402
|
+
), Ma = c.forwardRef(
|
|
2398
2403
|
(e, r) => {
|
|
2399
|
-
const { __scopeScrollArea: t, style: o, ...a } = e, n = $(be, t), s =
|
|
2404
|
+
const { __scopeScrollArea: t, style: o, ...a } = e, n = $(be, t), s = Et(be, t), { onThumbPositionChange: i } = s, u = L(
|
|
2400
2405
|
r,
|
|
2401
2406
|
(p) => s.onThumbChange(p)
|
|
2402
2407
|
), l = c.useRef(void 0), d = Ce(() => {
|
|
@@ -2405,13 +2410,13 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2405
2410
|
return c.useEffect(() => {
|
|
2406
2411
|
const p = n.viewport;
|
|
2407
2412
|
if (p) {
|
|
2408
|
-
const
|
|
2413
|
+
const h = () => {
|
|
2409
2414
|
if (d(), !l.current) {
|
|
2410
|
-
const m =
|
|
2415
|
+
const m = Fa(p, i);
|
|
2411
2416
|
l.current = m, i();
|
|
2412
2417
|
}
|
|
2413
2418
|
};
|
|
2414
|
-
return i(), p.addEventListener("scroll",
|
|
2419
|
+
return i(), p.addEventListener("scroll", h), () => p.removeEventListener("scroll", h);
|
|
2415
2420
|
}
|
|
2416
2421
|
}, [n.viewport, d, i]), /* @__PURE__ */ f(
|
|
2417
2422
|
O.div,
|
|
@@ -2424,30 +2429,30 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2424
2429
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2425
2430
|
...o
|
|
2426
2431
|
},
|
|
2427
|
-
onPointerDownCapture:
|
|
2428
|
-
const m = p.target.getBoundingClientRect(), w = p.clientX - m.left,
|
|
2429
|
-
s.onThumbPointerDown({ x: w, y:
|
|
2432
|
+
onPointerDownCapture: R(e.onPointerDownCapture, (p) => {
|
|
2433
|
+
const m = p.target.getBoundingClientRect(), w = p.clientX - m.left, v = p.clientY - m.top;
|
|
2434
|
+
s.onThumbPointerDown({ x: w, y: v });
|
|
2430
2435
|
}),
|
|
2431
|
-
onPointerUp:
|
|
2436
|
+
onPointerUp: R(e.onPointerUp, s.onThumbPointerUp)
|
|
2432
2437
|
}
|
|
2433
2438
|
);
|
|
2434
2439
|
}
|
|
2435
2440
|
);
|
|
2436
|
-
|
|
2437
|
-
var Je = "ScrollAreaCorner",
|
|
2441
|
+
Pt.displayName = be;
|
|
2442
|
+
var Je = "ScrollAreaCorner", Ia = c.forwardRef(
|
|
2438
2443
|
(e, r) => {
|
|
2439
2444
|
const t = $(Je, e.__scopeScrollArea), o = !!(t.scrollbarX && t.scrollbarY);
|
|
2440
|
-
return t.type !== "scroll" && o ? /* @__PURE__ */ f(
|
|
2445
|
+
return t.type !== "scroll" && o ? /* @__PURE__ */ f(ka, { ...e, ref: r }) : null;
|
|
2441
2446
|
}
|
|
2442
2447
|
);
|
|
2443
|
-
|
|
2444
|
-
var
|
|
2448
|
+
Ia.displayName = Je;
|
|
2449
|
+
var ka = c.forwardRef((e, r) => {
|
|
2445
2450
|
const { __scopeScrollArea: t, ...o } = e, a = $(Je, t), [n, s] = c.useState(0), [i, u] = c.useState(0), l = !!(n && i);
|
|
2446
|
-
return
|
|
2451
|
+
return ne(a.scrollbarX, () => {
|
|
2447
2452
|
var p;
|
|
2448
2453
|
const d = ((p = a.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
|
|
2449
2454
|
a.onCornerHeightChange(d), u(d);
|
|
2450
|
-
}),
|
|
2455
|
+
}), ne(a.scrollbarY, () => {
|
|
2451
2456
|
var p;
|
|
2452
2457
|
const d = ((p = a.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
|
|
2453
2458
|
a.onCornerWidthChange(d), s(d);
|
|
@@ -2471,33 +2476,33 @@ var Ma = c.forwardRef((e, r) => {
|
|
|
2471
2476
|
function ye(e) {
|
|
2472
2477
|
return e ? parseInt(e, 10) : 0;
|
|
2473
2478
|
}
|
|
2474
|
-
function
|
|
2479
|
+
function xt(e, r) {
|
|
2475
2480
|
const t = e / r;
|
|
2476
2481
|
return isNaN(t) ? 0 : t;
|
|
2477
2482
|
}
|
|
2478
2483
|
function Ee(e) {
|
|
2479
|
-
const r =
|
|
2484
|
+
const r = xt(e.viewport, e.content), t = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - t) * r;
|
|
2480
2485
|
return Math.max(o, 18);
|
|
2481
2486
|
}
|
|
2482
|
-
function
|
|
2487
|
+
function Wa(e, r, t, o = "ltr") {
|
|
2483
2488
|
const a = Ee(t), n = a / 2, s = r || n, i = a - s, u = t.scrollbar.paddingStart + s, l = t.scrollbar.size - t.scrollbar.paddingEnd - i, d = t.content - t.viewport, p = o === "ltr" ? [0, d] : [d * -1, 0];
|
|
2484
|
-
return
|
|
2489
|
+
return At([u, l], p)(e);
|
|
2485
2490
|
}
|
|
2486
|
-
function
|
|
2487
|
-
const o = Ee(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, s = r.content - r.viewport, i = n - o, u = t === "ltr" ? [0, s] : [s * -1, 0], l =
|
|
2488
|
-
return
|
|
2491
|
+
function Dr(e, r, t = "ltr") {
|
|
2492
|
+
const o = Ee(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, s = r.content - r.viewport, i = n - o, u = t === "ltr" ? [0, s] : [s * -1, 0], l = Aa(e, u);
|
|
2493
|
+
return At([0, s], [0, i])(l);
|
|
2489
2494
|
}
|
|
2490
|
-
function
|
|
2495
|
+
function At(e, r) {
|
|
2491
2496
|
return (t) => {
|
|
2492
2497
|
if (e[0] === e[1] || r[0] === r[1]) return r[0];
|
|
2493
2498
|
const o = (r[1] - r[0]) / (e[1] - e[0]);
|
|
2494
2499
|
return r[0] + o * (t - e[0]);
|
|
2495
2500
|
};
|
|
2496
2501
|
}
|
|
2497
|
-
function
|
|
2502
|
+
function Nt(e, r) {
|
|
2498
2503
|
return e > 0 && e < r;
|
|
2499
2504
|
}
|
|
2500
|
-
var
|
|
2505
|
+
var Fa = (e, r = () => {
|
|
2501
2506
|
}) => {
|
|
2502
2507
|
let t = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
|
|
2503
2508
|
return function a() {
|
|
@@ -2511,9 +2516,9 @@ function Ce(e, r) {
|
|
|
2511
2516
|
window.clearTimeout(o.current), o.current = window.setTimeout(t, r);
|
|
2512
2517
|
}, [t, r]);
|
|
2513
2518
|
}
|
|
2514
|
-
function
|
|
2519
|
+
function ne(e, r) {
|
|
2515
2520
|
const t = T(r);
|
|
2516
|
-
|
|
2521
|
+
se(() => {
|
|
2517
2522
|
let o = 0;
|
|
2518
2523
|
if (e) {
|
|
2519
2524
|
const a = new ResizeObserver(() => {
|
|
@@ -2525,14 +2530,14 @@ function te(e, r) {
|
|
|
2525
2530
|
}
|
|
2526
2531
|
}, [e, t]);
|
|
2527
2532
|
}
|
|
2528
|
-
var
|
|
2529
|
-
const
|
|
2533
|
+
var Ua = _t, Ha = bt, Ba = yt, ja = Pt;
|
|
2534
|
+
const za = {
|
|
2530
2535
|
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1r0fa_1",
|
|
2531
2536
|
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1r0fa_4",
|
|
2532
2537
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1r0fa_10",
|
|
2533
2538
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1r0fa_13",
|
|
2534
2539
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1r0fa_24"
|
|
2535
|
-
}, ae = q.bind(
|
|
2540
|
+
}, ae = q.bind(za), J = "purpur-drawer-scroll-area", ze = j(
|
|
2536
2541
|
({
|
|
2537
2542
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2538
2543
|
children: r,
|
|
@@ -2540,21 +2545,21 @@ const Ba = {
|
|
|
2540
2545
|
fitToContent: o = !1,
|
|
2541
2546
|
...a
|
|
2542
2547
|
}, n) => {
|
|
2543
|
-
const s = ae([t,
|
|
2548
|
+
const s = ae([t, J]);
|
|
2544
2549
|
return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ D(
|
|
2545
|
-
|
|
2550
|
+
Ua,
|
|
2546
2551
|
{
|
|
2547
|
-
className: ae(`${
|
|
2548
|
-
[`${
|
|
2552
|
+
className: ae(`${J}__root`, {
|
|
2553
|
+
[`${J}__root--fit-to-content`]: o
|
|
2549
2554
|
}),
|
|
2550
2555
|
children: [
|
|
2551
|
-
/* @__PURE__ */ f(
|
|
2556
|
+
/* @__PURE__ */ f(Ha, { className: ae(`${J}__viewport`), children: r }),
|
|
2552
2557
|
/* @__PURE__ */ f(
|
|
2553
|
-
|
|
2558
|
+
Ba,
|
|
2554
2559
|
{
|
|
2555
|
-
className: ae(`${
|
|
2560
|
+
className: ae(`${J}__scrollbar`),
|
|
2556
2561
|
orientation: "vertical",
|
|
2557
|
-
children: /* @__PURE__ */ f(
|
|
2562
|
+
children: /* @__PURE__ */ f(ja, { className: ae(`${J}__thumb`) })
|
|
2558
2563
|
}
|
|
2559
2564
|
)
|
|
2560
2565
|
]
|
|
@@ -2563,7 +2568,7 @@ const Ba = {
|
|
|
2563
2568
|
}
|
|
2564
2569
|
);
|
|
2565
2570
|
ze.displayName = "DrawerScrollArea";
|
|
2566
|
-
const
|
|
2571
|
+
const ee = q.bind(Oo), M = "purpur-drawer-frame", Rt = j(
|
|
2567
2572
|
({
|
|
2568
2573
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2569
2574
|
backButton: r,
|
|
@@ -2577,48 +2582,51 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
|
|
|
2577
2582
|
headerContent: l,
|
|
2578
2583
|
onAnimationEnd: d,
|
|
2579
2584
|
onBackButtonClick: p,
|
|
2580
|
-
onSwipeStart:
|
|
2585
|
+
onSwipeStart: h,
|
|
2581
2586
|
onSwipeMove: m,
|
|
2582
2587
|
onSwipeCancel: w,
|
|
2583
|
-
onSwipeEnd:
|
|
2588
|
+
onSwipeEnd: v,
|
|
2584
2589
|
title: g,
|
|
2585
2590
|
stickyFooter: _,
|
|
2586
|
-
|
|
2591
|
+
position: E = "right",
|
|
2592
|
+
...y
|
|
2587
2593
|
}, b) => {
|
|
2588
|
-
const
|
|
2594
|
+
const C = ee([
|
|
2589
2595
|
n,
|
|
2590
|
-
|
|
2596
|
+
M,
|
|
2591
2597
|
{
|
|
2592
|
-
[`${
|
|
2593
|
-
[`${
|
|
2598
|
+
[`${M}--fit-to-content`]: i,
|
|
2599
|
+
[`${M}--sticky-footer`]: _,
|
|
2600
|
+
[`${M}--left`]: E === "left",
|
|
2601
|
+
[`${M}--right`]: E === "right"
|
|
2594
2602
|
}
|
|
2595
2603
|
]);
|
|
2596
2604
|
return /* @__PURE__ */ D(
|
|
2597
2605
|
"div",
|
|
2598
2606
|
{
|
|
2599
|
-
className:
|
|
2607
|
+
className: C,
|
|
2600
2608
|
"data-testid": e,
|
|
2601
2609
|
ref: b,
|
|
2602
2610
|
onAnimationEnd: d,
|
|
2603
|
-
...
|
|
2611
|
+
...y,
|
|
2604
2612
|
children: [
|
|
2605
2613
|
/* @__PURE__ */ f(
|
|
2606
|
-
|
|
2614
|
+
dt,
|
|
2607
2615
|
{
|
|
2608
|
-
onSwipeStart:
|
|
2616
|
+
onSwipeStart: h,
|
|
2609
2617
|
onSwipeMove: m,
|
|
2610
2618
|
onSwipeCancel: w,
|
|
2611
|
-
onSwipeEnd:
|
|
2619
|
+
onSwipeEnd: v
|
|
2612
2620
|
}
|
|
2613
2621
|
),
|
|
2614
2622
|
/* @__PURE__ */ f(
|
|
2615
|
-
|
|
2623
|
+
re,
|
|
2616
2624
|
{
|
|
2617
|
-
className:
|
|
2625
|
+
className: ee(`${M}__header`),
|
|
2618
2626
|
variant: "header",
|
|
2619
2627
|
stickyFooter: _,
|
|
2620
2628
|
children: /* @__PURE__ */ f(
|
|
2621
|
-
|
|
2629
|
+
mt,
|
|
2622
2630
|
{
|
|
2623
2631
|
title: g,
|
|
2624
2632
|
headerContent: l,
|
|
@@ -2635,16 +2643,16 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
|
|
|
2635
2643
|
/* @__PURE__ */ f(
|
|
2636
2644
|
ze,
|
|
2637
2645
|
{
|
|
2638
|
-
className:
|
|
2646
|
+
className: ee(`${M}__body`),
|
|
2639
2647
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
2640
2648
|
fitToContent: i,
|
|
2641
|
-
children: /* @__PURE__ */ f(
|
|
2649
|
+
children: /* @__PURE__ */ f(re, { stickyFooter: !0, children: a })
|
|
2642
2650
|
}
|
|
2643
2651
|
),
|
|
2644
2652
|
u && /* @__PURE__ */ f(
|
|
2645
|
-
|
|
2653
|
+
re,
|
|
2646
2654
|
{
|
|
2647
|
-
className:
|
|
2655
|
+
className: ee(`${M}__footer`),
|
|
2648
2656
|
"data-testid": `${e}-sticky-footer`,
|
|
2649
2657
|
variant: "footer",
|
|
2650
2658
|
stickyFooter: _,
|
|
@@ -2654,20 +2662,20 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
|
|
|
2654
2662
|
] }) : /* @__PURE__ */ f(
|
|
2655
2663
|
ze,
|
|
2656
2664
|
{
|
|
2657
|
-
className:
|
|
2665
|
+
className: ee(`${M}__body`),
|
|
2658
2666
|
"data-testid": `${e}-scroll-area`,
|
|
2659
2667
|
fitToContent: i,
|
|
2660
2668
|
children: /* @__PURE__ */ D(
|
|
2661
2669
|
"div",
|
|
2662
2670
|
{
|
|
2663
|
-
className:
|
|
2664
|
-
`${
|
|
2665
|
-
{ [`${
|
|
2671
|
+
className: ee([
|
|
2672
|
+
`${M}__content-container`,
|
|
2673
|
+
{ [`${M}__content-container--no-footer`]: !u }
|
|
2666
2674
|
]),
|
|
2667
2675
|
children: [
|
|
2668
|
-
/* @__PURE__ */ f(
|
|
2676
|
+
/* @__PURE__ */ f(re, { stickyFooter: _, children: a }),
|
|
2669
2677
|
u && /* @__PURE__ */ f(
|
|
2670
|
-
|
|
2678
|
+
re,
|
|
2671
2679
|
{
|
|
2672
2680
|
"data-testid": `${e}-footer`,
|
|
2673
2681
|
stickyFooter: _,
|
|
@@ -2686,7 +2694,7 @@ const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
|
|
|
2686
2694
|
}
|
|
2687
2695
|
);
|
|
2688
2696
|
Rt.displayName = "DrawerFrame";
|
|
2689
|
-
const
|
|
2697
|
+
const Va = (e, r) => ({
|
|
2690
2698
|
onAnimationEnd: (i) => {
|
|
2691
2699
|
i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
2692
2700
|
},
|
|
@@ -2708,7 +2716,7 @@ const ja = (e, r) => ({
|
|
|
2708
2716
|
const { y: u } = i.delta;
|
|
2709
2717
|
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${u}px`);
|
|
2710
2718
|
}
|
|
2711
|
-
}), ie = q.bind(
|
|
2719
|
+
}), ie = q.bind(Ro), Y = "purpur-drawer-content", Dt = j(
|
|
2712
2720
|
({
|
|
2713
2721
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2714
2722
|
backButton: r = !1,
|
|
@@ -2722,43 +2730,46 @@ const ja = (e, r) => ({
|
|
|
2722
2730
|
fitToContent: l = !1,
|
|
2723
2731
|
footerContent: d,
|
|
2724
2732
|
headerContent: p,
|
|
2725
|
-
onBackButtonClick:
|
|
2733
|
+
onBackButtonClick: h,
|
|
2726
2734
|
stickyFooter: m = !1,
|
|
2727
2735
|
title: w,
|
|
2728
|
-
zIndex:
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2736
|
+
zIndex: v,
|
|
2737
|
+
position: g = "right",
|
|
2738
|
+
..._
|
|
2739
|
+
}, E) => {
|
|
2740
|
+
const y = ie([
|
|
2732
2741
|
s,
|
|
2733
|
-
|
|
2734
|
-
{ [`${
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
},
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2742
|
+
Y,
|
|
2743
|
+
{ [`${Y}--fit-to-content`]: l },
|
|
2744
|
+
{ [`${Y}--left`]: g === "left" },
|
|
2745
|
+
{ [`${Y}--right`]: g === "right" }
|
|
2746
|
+
]), b = $t(null), C = Mt(ut), { onAnimationEnd: x, onSwipeStart: S, onSwipeMove: N, onSwipeCancel: P, onSwipeEnd: A } = Va(b, C), F = (ce) => {
|
|
2747
|
+
u && ce.preventDefault();
|
|
2748
|
+
}, rr = () => {
|
|
2749
|
+
const ce = b.current;
|
|
2750
|
+
if (ce) {
|
|
2751
|
+
const tr = ce.querySelector("h2");
|
|
2752
|
+
tr && setTimeout(() => {
|
|
2753
|
+
tr.focus();
|
|
2743
2754
|
});
|
|
2744
2755
|
}
|
|
2745
2756
|
};
|
|
2746
2757
|
return /* @__PURE__ */ f(vo, { children: /* @__PURE__ */ f(
|
|
2747
|
-
|
|
2758
|
+
mo,
|
|
2748
2759
|
{
|
|
2749
2760
|
className: ie("purpur-drawer-overlay"),
|
|
2750
|
-
style:
|
|
2761
|
+
style: v ? { zIndex: v } : void 0,
|
|
2751
2762
|
"data-testid": `${e}-overlay`,
|
|
2752
2763
|
children: /* @__PURE__ */ f(
|
|
2753
|
-
|
|
2764
|
+
go,
|
|
2754
2765
|
{
|
|
2755
|
-
onPointerDownOutside:
|
|
2756
|
-
onOpenAutoFocus:
|
|
2757
|
-
className:
|
|
2766
|
+
onPointerDownOutside: F,
|
|
2767
|
+
onOpenAutoFocus: rr,
|
|
2768
|
+
className: y,
|
|
2758
2769
|
"data-testid": e,
|
|
2759
|
-
ref:
|
|
2770
|
+
ref: E,
|
|
2760
2771
|
...!a && { "aria-describedby": void 0 },
|
|
2761
|
-
...
|
|
2772
|
+
..._,
|
|
2762
2773
|
children: /* @__PURE__ */ f(
|
|
2763
2774
|
Rt,
|
|
2764
2775
|
{
|
|
@@ -2766,24 +2777,25 @@ const ja = (e, r) => ({
|
|
|
2766
2777
|
backButtonText: t,
|
|
2767
2778
|
backButtonOnlyIcon: o,
|
|
2768
2779
|
closeButtonAriaLabel: i,
|
|
2769
|
-
className: ie(`${
|
|
2780
|
+
className: ie(`${Y}__drawer-frame`),
|
|
2770
2781
|
fitToContent: l,
|
|
2771
2782
|
footerContent: d,
|
|
2772
2783
|
headerContent: p,
|
|
2773
2784
|
ref: b,
|
|
2774
|
-
onAnimationEnd:
|
|
2775
|
-
onBackButtonClick:
|
|
2776
|
-
onSwipeStart:
|
|
2777
|
-
onSwipeMove:
|
|
2778
|
-
onSwipeCancel:
|
|
2779
|
-
onSwipeEnd:
|
|
2785
|
+
onAnimationEnd: x,
|
|
2786
|
+
onBackButtonClick: h,
|
|
2787
|
+
onSwipeStart: S,
|
|
2788
|
+
onSwipeMove: N,
|
|
2789
|
+
onSwipeCancel: P,
|
|
2790
|
+
onSwipeEnd: A,
|
|
2780
2791
|
stickyFooter: m,
|
|
2781
2792
|
title: w,
|
|
2782
|
-
|
|
2793
|
+
position: g,
|
|
2794
|
+
children: a ? /* @__PURE__ */ D("div", { className: ie(`${Y}__content-container`), children: [
|
|
2783
2795
|
/* @__PURE__ */ f(
|
|
2784
|
-
|
|
2796
|
+
_o,
|
|
2785
2797
|
{
|
|
2786
|
-
className: ie(`${
|
|
2798
|
+
className: ie(`${Y}__description`),
|
|
2787
2799
|
"data-testid": `${e}-description`,
|
|
2788
2800
|
children: a
|
|
2789
2801
|
}
|
|
@@ -2798,12 +2810,12 @@ const ja = (e, r) => ({
|
|
|
2798
2810
|
) });
|
|
2799
2811
|
}
|
|
2800
2812
|
);
|
|
2801
|
-
|
|
2802
|
-
const
|
|
2803
|
-
({ ["data-testid"]: e = "purpur-drawer-trigger", children: r, ...t }, o) => /* @__PURE__ */ f(
|
|
2813
|
+
Dt.displayName = "DrawerContent";
|
|
2814
|
+
const Tt = j(
|
|
2815
|
+
({ ["data-testid"]: e = "purpur-drawer-trigger", children: r, ...t }, o) => /* @__PURE__ */ f(ho, { asChild: !0, "data-testid": e, ref: o, ...t, children: r })
|
|
2804
2816
|
);
|
|
2805
|
-
|
|
2806
|
-
const
|
|
2817
|
+
Tt.displayName = "DrawerTrigger";
|
|
2818
|
+
const Ya = q.bind(Eo), Xa = "purpur-drawer", er = ({
|
|
2807
2819
|
["data-testid"]: e = "purpur-drawer",
|
|
2808
2820
|
children: r,
|
|
2809
2821
|
className: t,
|
|
@@ -2811,15 +2823,15 @@ const za = q.bind(So), Va = "purpur-drawer", er = ({
|
|
|
2811
2823
|
open: a = !1,
|
|
2812
2824
|
...n
|
|
2813
2825
|
}) => {
|
|
2814
|
-
const [s, i] = Ie.useState(a), u =
|
|
2826
|
+
const [s, i] = Ie.useState(a), u = Ya([t, Xa]), l = (d) => {
|
|
2815
2827
|
i(d), o == null || o(d);
|
|
2816
2828
|
};
|
|
2817
|
-
return
|
|
2829
|
+
return It(() => {
|
|
2818
2830
|
i(a);
|
|
2819
|
-
}, [a]), /* @__PURE__ */ f(
|
|
2831
|
+
}, [a]), /* @__PURE__ */ f(ut.Provider, { value: l, children: /* @__PURE__ */ f("div", { className: u, "data-testid": e, ...n, children: /* @__PURE__ */ f(po, { open: s, onOpenChange: l, children: r }) }) });
|
|
2820
2832
|
};
|
|
2821
|
-
er.Trigger =
|
|
2822
|
-
er.Content =
|
|
2833
|
+
er.Trigger = Tt;
|
|
2834
|
+
er.Content = Dt;
|
|
2823
2835
|
er.displayName = "Drawer";
|
|
2824
2836
|
export {
|
|
2825
2837
|
er as Drawer
|