@purpurds/drawer 8.5.2 → 8.7.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-container.d.ts.map +1 -1
- package/dist/drawer-content.d.ts.map +1 -1
- package/dist/drawer.cjs.js +9 -9
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +266 -265
- package/dist/drawer.es.js.map +1 -1
- package/package.json +8 -8
- package/src/drawer-container.tsx +1 -3
- package/src/drawer-content.tsx +6 -4
- package/src/drawer-frame.tsx +1 -1
- package/src/drawer-handle.tsx +1 -1
- package/src/drawer-header.tsx +6 -6
- package/src/drawer-scroll-area.tsx +1 -1
package/dist/drawer.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as f, jsxs as D, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import ke, { useState as
|
|
3
|
+
import ke, { useState as $r, createContext as Lr, forwardRef as Y, useRef as Je, useContext as Mr, useEffect as Ir } from "react";
|
|
4
4
|
import * as kr from "react-dom";
|
|
5
5
|
import Wr from "react-dom";
|
|
6
6
|
function A(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
@@ -9,7 +9,7 @@ function A(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
|
9
9
|
return t == null ? void 0 : t(a);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function et(e, t) {
|
|
13
13
|
if (typeof e == "function")
|
|
14
14
|
return e(t);
|
|
15
15
|
e != null && (e.current = t);
|
|
@@ -18,19 +18,19 @@ function Dt(...e) {
|
|
|
18
18
|
return (t) => {
|
|
19
19
|
let r = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
21
|
-
const n =
|
|
21
|
+
const n = et(a, t);
|
|
22
22
|
return !r && typeof n == "function" && (r = !0), n;
|
|
23
23
|
});
|
|
24
24
|
if (r)
|
|
25
25
|
return () => {
|
|
26
26
|
for (let a = 0; a < o.length; a++) {
|
|
27
27
|
const n = o[a];
|
|
28
|
-
typeof n == "function" ? n() :
|
|
28
|
+
typeof n == "function" ? n() : et(e[a], null);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function $(...e) {
|
|
34
34
|
return c.useCallback(Dt(...e), e);
|
|
35
35
|
}
|
|
36
36
|
function Fr(e, t) {
|
|
@@ -107,14 +107,14 @@ function Re(e) {
|
|
|
107
107
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
108
108
|
}
|
|
109
109
|
var Hr = c[" useInsertionEffect ".trim().toString()] || ne;
|
|
110
|
-
function
|
|
110
|
+
function Yr({
|
|
111
111
|
prop: e,
|
|
112
112
|
defaultProp: t,
|
|
113
113
|
onChange: r = () => {
|
|
114
114
|
},
|
|
115
115
|
caller: o
|
|
116
116
|
}) {
|
|
117
|
-
const [a, n, s] =
|
|
117
|
+
const [a, n, s] = Vr({
|
|
118
118
|
defaultProp: t,
|
|
119
119
|
onChange: r
|
|
120
120
|
}), i = e !== void 0, u = i ? e : a;
|
|
@@ -131,7 +131,7 @@ function Vr({
|
|
|
131
131
|
(d) => {
|
|
132
132
|
var p;
|
|
133
133
|
if (i) {
|
|
134
|
-
const h =
|
|
134
|
+
const h = zr(d) ? d(e) : d;
|
|
135
135
|
h !== e && ((p = s.current) == null || p.call(s, h));
|
|
136
136
|
} else
|
|
137
137
|
n(d);
|
|
@@ -140,7 +140,7 @@ function Vr({
|
|
|
140
140
|
);
|
|
141
141
|
return [u, l];
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Vr({
|
|
144
144
|
defaultProp: e,
|
|
145
145
|
onChange: t
|
|
146
146
|
}) {
|
|
@@ -152,7 +152,7 @@ function zr({
|
|
|
152
152
|
a.current !== r && ((s = n.current) == null || s.call(n, r), a.current = r);
|
|
153
153
|
}, [r, a]), [r, o, n];
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function zr(e) {
|
|
156
156
|
return typeof e == "function";
|
|
157
157
|
}
|
|
158
158
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -227,7 +227,7 @@ var Qr = [
|
|
|
227
227
|
function Jr(e, t) {
|
|
228
228
|
e && kr.flushSync(() => e.dispatchEvent(t));
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function L(e) {
|
|
231
231
|
const t = c.useRef(e);
|
|
232
232
|
return c.useEffect(() => {
|
|
233
233
|
t.current = e;
|
|
@@ -237,7 +237,7 @@ function $(e) {
|
|
|
237
237
|
}, []);
|
|
238
238
|
}
|
|
239
239
|
function en(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
240
|
-
const r =
|
|
240
|
+
const r = L(e);
|
|
241
241
|
c.useEffect(() => {
|
|
242
242
|
const o = (a) => {
|
|
243
243
|
a.key === "Escape" && r(a);
|
|
@@ -245,11 +245,11 @@ function en(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
245
245
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
246
246
|
}, [r, t]);
|
|
247
247
|
}
|
|
248
|
-
var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLayer.pointerDownOutside", nn = "dismissableLayer.focusOutside",
|
|
248
|
+
var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLayer.pointerDownOutside", nn = "dismissableLayer.focusOutside", tt, $t = c.createContext({
|
|
249
249
|
layers: /* @__PURE__ */ new Set(),
|
|
250
250
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
251
251
|
branches: /* @__PURE__ */ new Set()
|
|
252
|
-
}),
|
|
252
|
+
}), Lt = c.forwardRef(
|
|
253
253
|
(e, t) => {
|
|
254
254
|
const {
|
|
255
255
|
disableOutsidePointerEvents: r = !1,
|
|
@@ -259,7 +259,7 @@ var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLa
|
|
|
259
259
|
onInteractOutside: s,
|
|
260
260
|
onDismiss: i,
|
|
261
261
|
...u
|
|
262
|
-
} = e, l = c.useContext(
|
|
262
|
+
} = e, l = c.useContext($t), [d, p] = c.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), _ = $(t, (S) => p(S)), v = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = v.indexOf(g), y = d ? v.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, w = y >= b, C = sn((S) => {
|
|
263
263
|
const x = S.target, P = [...l.branches].some((N) => N.contains(x));
|
|
264
264
|
!w || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
265
265
|
}, h), R = cn((S) => {
|
|
@@ -270,11 +270,11 @@ var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLa
|
|
|
270
270
|
y === l.layers.size - 1 && (o == null || o(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
271
271
|
}, h), c.useEffect(() => {
|
|
272
272
|
if (d)
|
|
273
|
-
return r && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
274
|
-
r && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents =
|
|
273
|
+
return r && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (tt = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), rt(), () => {
|
|
274
|
+
r && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = tt);
|
|
275
275
|
};
|
|
276
276
|
}, [d, h, r, l]), c.useEffect(() => () => {
|
|
277
|
-
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
277
|
+
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), rt());
|
|
278
278
|
}, [d, l]), c.useEffect(() => {
|
|
279
279
|
const S = () => m({});
|
|
280
280
|
return document.addEventListener(We, S), () => document.removeEventListener(We, S);
|
|
@@ -297,9 +297,9 @@ var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLa
|
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
|
-
|
|
300
|
+
Lt.displayName = tn;
|
|
301
301
|
var on = "DismissableLayerBranch", an = c.forwardRef((e, t) => {
|
|
302
|
-
const r = c.useContext(
|
|
302
|
+
const r = c.useContext($t), o = c.useRef(null), a = $(t, o);
|
|
303
303
|
return c.useEffect(() => {
|
|
304
304
|
const n = o.current;
|
|
305
305
|
if (n)
|
|
@@ -310,7 +310,7 @@ var on = "DismissableLayerBranch", an = c.forwardRef((e, t) => {
|
|
|
310
310
|
});
|
|
311
311
|
an.displayName = on;
|
|
312
312
|
function sn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
313
|
-
const r =
|
|
313
|
+
const r = L(e), o = c.useRef(!1), a = c.useRef(() => {
|
|
314
314
|
});
|
|
315
315
|
return c.useEffect(() => {
|
|
316
316
|
const n = (i) => {
|
|
@@ -340,7 +340,7 @@ function sn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
342
|
function cn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
343
|
-
const r =
|
|
343
|
+
const r = L(e), o = c.useRef(!1);
|
|
344
344
|
return c.useEffect(() => {
|
|
345
345
|
const a = (n) => {
|
|
346
346
|
n.target && !o.current && Mt(nn, r, { originalEvent: n }, {
|
|
@@ -353,7 +353,7 @@ function cn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
353
353
|
onBlurCapture: () => o.current = !1
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function rt() {
|
|
357
357
|
const e = new CustomEvent(We);
|
|
358
358
|
document.dispatchEvent(e);
|
|
359
359
|
}
|
|
@@ -361,14 +361,14 @@ function Mt(e, t, r, { discrete: o }) {
|
|
|
361
361
|
const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
|
|
362
362
|
t && a.addEventListener(e, t, { once: !0 }), o ? Jr(a, n) : a.dispatchEvent(n);
|
|
363
363
|
}
|
|
364
|
-
var Ne = "focusScope.autoFocusOnMount", xe = "focusScope.autoFocusOnUnmount",
|
|
364
|
+
var Ne = "focusScope.autoFocusOnMount", xe = "focusScope.autoFocusOnUnmount", nt = { bubbles: !1, cancelable: !0 }, ln = "FocusScope", It = c.forwardRef((e, t) => {
|
|
365
365
|
const {
|
|
366
366
|
loop: r = !1,
|
|
367
367
|
trapped: o = !1,
|
|
368
368
|
onMountAutoFocus: a,
|
|
369
369
|
onUnmountAutoFocus: n,
|
|
370
370
|
...s
|
|
371
|
-
} = e, [i, u] = c.useState(null), l =
|
|
371
|
+
} = e, [i, u] = c.useState(null), l = L(a), d = L(n), p = c.useRef(null), h = $(t, (v) => u(v)), m = c.useRef({
|
|
372
372
|
paused: !1,
|
|
373
373
|
pause() {
|
|
374
374
|
this.paused = !0;
|
|
@@ -400,16 +400,16 @@ var Ne = "focusScope.autoFocusOnMount", xe = "focusScope.autoFocusOnUnmount", ot
|
|
|
400
400
|
}
|
|
401
401
|
}, [o, i, m.paused]), c.useEffect(() => {
|
|
402
402
|
if (i) {
|
|
403
|
-
|
|
403
|
+
at.add(m);
|
|
404
404
|
const v = document.activeElement;
|
|
405
405
|
if (!i.contains(v)) {
|
|
406
|
-
const b = new CustomEvent(Ne,
|
|
406
|
+
const b = new CustomEvent(Ne, nt);
|
|
407
407
|
i.addEventListener(Ne, l), i.dispatchEvent(b), b.defaultPrevented || (un(vn(kt(i)), { select: !0 }), document.activeElement === v && H(i));
|
|
408
408
|
}
|
|
409
409
|
return () => {
|
|
410
410
|
i.removeEventListener(Ne, l), setTimeout(() => {
|
|
411
|
-
const b = new CustomEvent(xe,
|
|
412
|
-
i.addEventListener(xe, d), i.dispatchEvent(b), b.defaultPrevented || H(v ?? document.body, { select: !0 }), i.removeEventListener(xe, d),
|
|
411
|
+
const b = new CustomEvent(xe, nt);
|
|
412
|
+
i.addEventListener(xe, d), i.dispatchEvent(b), b.defaultPrevented || H(v ?? document.body, { select: !0 }), i.removeEventListener(xe, d), at.remove(m);
|
|
413
413
|
}, 0);
|
|
414
414
|
};
|
|
415
415
|
}
|
|
@@ -434,7 +434,7 @@ function un(e, { select: t = !1 } = {}) {
|
|
|
434
434
|
if (H(o, { select: t }), document.activeElement !== r) return;
|
|
435
435
|
}
|
|
436
436
|
function dn(e) {
|
|
437
|
-
const t = kt(e), r =
|
|
437
|
+
const t = kt(e), r = ot(t, e), o = ot(t.reverse(), e);
|
|
438
438
|
return [r, o];
|
|
439
439
|
}
|
|
440
440
|
function kt(e) {
|
|
@@ -447,7 +447,7 @@ function kt(e) {
|
|
|
447
447
|
for (; r.nextNode(); ) t.push(r.currentNode);
|
|
448
448
|
return t;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function ot(e, t) {
|
|
451
451
|
for (const r of e)
|
|
452
452
|
if (!fn(r, { upTo: t })) return r;
|
|
453
453
|
}
|
|
@@ -469,21 +469,21 @@ function H(e, { select: t = !1 } = {}) {
|
|
|
469
469
|
e.focus({ preventScroll: !0 }), e !== r && pn(e) && t && e.select();
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
var
|
|
472
|
+
var at = hn();
|
|
473
473
|
function hn() {
|
|
474
474
|
let e = [];
|
|
475
475
|
return {
|
|
476
476
|
add(t) {
|
|
477
477
|
const r = e[0];
|
|
478
|
-
t !== r && (r == null || r.pause()), e =
|
|
478
|
+
t !== r && (r == null || r.pause()), e = it(e, t), e.unshift(t);
|
|
479
479
|
},
|
|
480
480
|
remove(t) {
|
|
481
481
|
var r;
|
|
482
|
-
e =
|
|
482
|
+
e = it(e, t), (r = e[0]) == null || r.resume();
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function it(e, t) {
|
|
487
487
|
const r = [...e], o = r.indexOf(t);
|
|
488
488
|
return o !== -1 && r.splice(o, 1), r;
|
|
489
489
|
}
|
|
@@ -501,11 +501,11 @@ Wt.displayName = mn;
|
|
|
501
501
|
function gn(e, t) {
|
|
502
502
|
return c.useReducer((r, o) => t[r][o] ?? r, e);
|
|
503
503
|
}
|
|
504
|
-
var
|
|
505
|
-
const { present: t, children: r } = e, o = _n(t), a = typeof r == "function" ? r({ present: o.isPresent }) : c.Children.only(r), n =
|
|
504
|
+
var V = (e) => {
|
|
505
|
+
const { present: t, children: r } = e, o = _n(t), a = typeof r == "function" ? r({ present: o.isPresent }) : c.Children.only(r), n = $(o.ref, bn(a));
|
|
506
506
|
return typeof r == "function" || o.isPresent ? c.cloneElement(a, { ref: n }) : null;
|
|
507
507
|
};
|
|
508
|
-
|
|
508
|
+
V.displayName = "Presence";
|
|
509
509
|
function _n(e) {
|
|
510
510
|
const [t, r] = c.useState(), o = c.useRef(null), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = gn(s, {
|
|
511
511
|
mounted: {
|
|
@@ -567,12 +567,12 @@ var Ae = 0;
|
|
|
567
567
|
function yn() {
|
|
568
568
|
c.useEffect(() => {
|
|
569
569
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
570
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
570
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? st()), document.body.insertAdjacentElement("beforeend", e[1] ?? st()), Ae++, () => {
|
|
571
571
|
Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ae--;
|
|
572
572
|
};
|
|
573
573
|
}, []);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function st() {
|
|
576
576
|
const e = document.createElement("span");
|
|
577
577
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
578
578
|
}
|
|
@@ -603,7 +603,7 @@ function De(e, t) {
|
|
|
603
603
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
604
604
|
}
|
|
605
605
|
function Cn(e, t) {
|
|
606
|
-
var r =
|
|
606
|
+
var r = $r(function() {
|
|
607
607
|
return {
|
|
608
608
|
// value
|
|
609
609
|
value: e,
|
|
@@ -623,7 +623,7 @@ function Cn(e, t) {
|
|
|
623
623
|
})[0];
|
|
624
624
|
return r.callback = t, r.facade;
|
|
625
625
|
}
|
|
626
|
-
var Pn = typeof window < "u" ? c.useLayoutEffect : c.useEffect,
|
|
626
|
+
var Pn = typeof window < "u" ? c.useLayoutEffect : c.useEffect, ct = /* @__PURE__ */ new WeakMap();
|
|
627
627
|
function Rn(e, t) {
|
|
628
628
|
var r = Cn(null, function(o) {
|
|
629
629
|
return e.forEach(function(a) {
|
|
@@ -631,7 +631,7 @@ function Rn(e, t) {
|
|
|
631
631
|
});
|
|
632
632
|
});
|
|
633
633
|
return Pn(function() {
|
|
634
|
-
var o =
|
|
634
|
+
var o = ct.get(r);
|
|
635
635
|
if (o) {
|
|
636
636
|
var a = new Set(o), n = new Set(e), s = r.current;
|
|
637
637
|
a.forEach(function(i) {
|
|
@@ -640,7 +640,7 @@ function Rn(e, t) {
|
|
|
640
640
|
a.has(i) || De(i, s);
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
|
-
|
|
643
|
+
ct.set(r, e);
|
|
644
644
|
}, [e]), r;
|
|
645
645
|
}
|
|
646
646
|
function Nn(e) {
|
|
@@ -754,10 +754,10 @@ function On() {
|
|
|
754
754
|
var t = Tn();
|
|
755
755
|
return t && e.setAttribute("nonce", t), e;
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function $n(e, t) {
|
|
758
758
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function Ln(e) {
|
|
761
761
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
762
762
|
t.appendChild(e);
|
|
763
763
|
}
|
|
@@ -765,7 +765,7 @@ var Mn = function() {
|
|
|
765
765
|
var e = 0, t = null;
|
|
766
766
|
return {
|
|
767
767
|
add: function(r) {
|
|
768
|
-
e == 0 && (t = On()) && (
|
|
768
|
+
e == 0 && (t = On()) && ($n(t, r), Ln(t)), e++;
|
|
769
769
|
},
|
|
770
770
|
remove: function() {
|
|
771
771
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
@@ -850,13 +850,13 @@ var Mn = function() {
|
|
|
850
850
|
`).concat(En, ": ").concat(i, `px;
|
|
851
851
|
}
|
|
852
852
|
`);
|
|
853
|
-
},
|
|
853
|
+
}, lt = function() {
|
|
854
854
|
var e = parseInt(document.body.getAttribute(te) || "0", 10);
|
|
855
855
|
return isFinite(e) ? e : 0;
|
|
856
856
|
}, Bn = function() {
|
|
857
857
|
c.useEffect(function() {
|
|
858
|
-
return document.body.setAttribute(te, (
|
|
859
|
-
var e =
|
|
858
|
+
return document.body.setAttribute(te, (lt() + 1).toString()), function() {
|
|
859
|
+
var e = lt() - 1;
|
|
860
860
|
e <= 0 ? document.body.removeAttribute(te) : document.body.setAttribute(te, e.toString());
|
|
861
861
|
};
|
|
862
862
|
}, []);
|
|
@@ -879,7 +879,7 @@ if (typeof window < "u")
|
|
|
879
879
|
} catch {
|
|
880
880
|
Fe = !1;
|
|
881
881
|
}
|
|
882
|
-
var q = Fe ? { passive: !1 } : !1,
|
|
882
|
+
var q = Fe ? { passive: !1 } : !1, Yn = function(e) {
|
|
883
883
|
return e.tagName === "TEXTAREA";
|
|
884
884
|
}, Ht = function(e, t) {
|
|
885
885
|
if (!(e instanceof Element))
|
|
@@ -888,19 +888,19 @@ var q = Fe ? { passive: !1 } : !1, Vn = function(e) {
|
|
|
888
888
|
return (
|
|
889
889
|
// not-not-scrollable
|
|
890
890
|
r[t] !== "hidden" && // contains scroll inside self
|
|
891
|
-
!(r.overflowY === r.overflowX && !
|
|
891
|
+
!(r.overflowY === r.overflowX && !Yn(e) && r[t] === "visible")
|
|
892
892
|
);
|
|
893
|
-
},
|
|
893
|
+
}, Vn = function(e) {
|
|
894
894
|
return Ht(e, "overflowY");
|
|
895
|
-
},
|
|
895
|
+
}, zn = function(e) {
|
|
896
896
|
return Ht(e, "overflowX");
|
|
897
|
-
},
|
|
897
|
+
}, ut = function(e, t) {
|
|
898
898
|
var r = t.ownerDocument, o = t;
|
|
899
899
|
do {
|
|
900
900
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
901
|
-
var a =
|
|
901
|
+
var a = Yt(e, o);
|
|
902
902
|
if (a) {
|
|
903
|
-
var n =
|
|
903
|
+
var n = Vt(e, o), s = n[1], i = n[2];
|
|
904
904
|
if (s > i)
|
|
905
905
|
return !0;
|
|
906
906
|
}
|
|
@@ -921,9 +921,9 @@ var q = Fe ? { passive: !1 } : !1, Vn = function(e) {
|
|
|
921
921
|
r,
|
|
922
922
|
o
|
|
923
923
|
];
|
|
924
|
+
}, Yt = function(e, t) {
|
|
925
|
+
return e === "v" ? Vn(t) : zn(t);
|
|
924
926
|
}, Vt = function(e, t) {
|
|
925
|
-
return e === "v" ? zn(t) : Yn(t);
|
|
926
|
-
}, zt = function(e, t) {
|
|
927
927
|
return e === "v" ? Xn(t) : qn(t);
|
|
928
928
|
}, Gn = function(e, t) {
|
|
929
929
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
@@ -932,8 +932,8 @@ var q = Fe ? { passive: !1 } : !1, Vn = function(e) {
|
|
|
932
932
|
do {
|
|
933
933
|
if (!i)
|
|
934
934
|
break;
|
|
935
|
-
var m =
|
|
936
|
-
(_ || b) &&
|
|
935
|
+
var m = Vt(e, i), _ = m[0], v = m[1], g = m[2], b = v - g - n * _;
|
|
936
|
+
(_ || b) && Yt(e, i) && (p += b, h += _);
|
|
937
937
|
var y = i.parentNode;
|
|
938
938
|
i = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
|
|
939
939
|
} while (
|
|
@@ -944,9 +944,9 @@ var q = Fe ? { passive: !1 } : !1, Vn = function(e) {
|
|
|
944
944
|
return (d && Math.abs(p) < 1 || !d && Math.abs(h) < 1) && (l = !0), l;
|
|
945
945
|
}, de = function(e) {
|
|
946
946
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
947
|
-
},
|
|
947
|
+
}, dt = function(e) {
|
|
948
948
|
return [e.deltaX, e.deltaY];
|
|
949
|
-
},
|
|
949
|
+
}, ft = function(e) {
|
|
950
950
|
return e && "current" in e ? e.current : e;
|
|
951
951
|
}, Zn = function(e, t) {
|
|
952
952
|
return e[0] === t[0] && e[1] === t[1];
|
|
@@ -963,7 +963,7 @@ function eo(e) {
|
|
|
963
963
|
}, [e]), c.useEffect(function() {
|
|
964
964
|
if (e.inert) {
|
|
965
965
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
966
|
-
var v = wn([e.lockRef.current], (e.shards || []).map(
|
|
966
|
+
var v = wn([e.lockRef.current], (e.shards || []).map(ft), !0).filter(Boolean);
|
|
967
967
|
return v.forEach(function(g) {
|
|
968
968
|
return g.classList.add("allow-interactivity-".concat(a));
|
|
969
969
|
}), function() {
|
|
@@ -979,10 +979,10 @@ function eo(e) {
|
|
|
979
979
|
var b = de(v), y = r.current, E = "deltaX" in v ? v.deltaX : y[0] - b[0], w = "deltaY" in v ? v.deltaY : y[1] - b[1], C, R = v.target, S = Math.abs(E) > Math.abs(w) ? "h" : "v";
|
|
980
980
|
if ("touches" in v && S === "h" && R.type === "range")
|
|
981
981
|
return !1;
|
|
982
|
-
var x =
|
|
982
|
+
var x = ut(S, R);
|
|
983
983
|
if (!x)
|
|
984
984
|
return !0;
|
|
985
|
-
if (x ? C = S : (C = S === "v" ? "h" : "v", x =
|
|
985
|
+
if (x ? C = S : (C = S === "v" ? "h" : "v", x = ut(S, R)), !x)
|
|
986
986
|
return !1;
|
|
987
987
|
if (!o.current && "changedTouches" in v && (E || w) && (o.current = C), !C)
|
|
988
988
|
return !0;
|
|
@@ -991,7 +991,7 @@ function eo(e) {
|
|
|
991
991
|
}, []), u = c.useCallback(function(v) {
|
|
992
992
|
var g = v;
|
|
993
993
|
if (!(!G.length || G[G.length - 1] !== n)) {
|
|
994
|
-
var b = "deltaY" in g ?
|
|
994
|
+
var b = "deltaY" in g ? dt(g) : de(g), y = t.current.filter(function(C) {
|
|
995
995
|
return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && Zn(C.delta, b);
|
|
996
996
|
})[0];
|
|
997
997
|
if (y && y.should) {
|
|
@@ -999,7 +999,7 @@ function eo(e) {
|
|
|
999
999
|
return;
|
|
1000
1000
|
}
|
|
1001
1001
|
if (!y) {
|
|
1002
|
-
var E = (s.current.shards || []).map(
|
|
1002
|
+
var E = (s.current.shards || []).map(ft).filter(Boolean).filter(function(C) {
|
|
1003
1003
|
return C.contains(g.target);
|
|
1004
1004
|
}), w = E.length > 0 ? i(g, E[0]) : !s.current.noIsolation;
|
|
1005
1005
|
w && g.cancelable && g.preventDefault();
|
|
@@ -1015,7 +1015,7 @@ function eo(e) {
|
|
|
1015
1015
|
}, []), d = c.useCallback(function(v) {
|
|
1016
1016
|
r.current = de(v), o.current = void 0;
|
|
1017
1017
|
}, []), p = c.useCallback(function(v) {
|
|
1018
|
-
l(v.type,
|
|
1018
|
+
l(v.type, dt(v), v.target, i(v, e.lockRef.current));
|
|
1019
1019
|
}, []), h = c.useCallback(function(v) {
|
|
1020
1020
|
l(v.type, de(v), v.target, i(v, e.lockRef.current));
|
|
1021
1021
|
}, []);
|
|
@@ -1044,16 +1044,16 @@ function to(e) {
|
|
|
1044
1044
|
return t;
|
|
1045
1045
|
}
|
|
1046
1046
|
const ro = Dn(Ut, eo);
|
|
1047
|
-
var
|
|
1047
|
+
var zt = c.forwardRef(function(e, t) {
|
|
1048
1048
|
return c.createElement(Se, k({}, e, { ref: t, sideCar: ro }));
|
|
1049
1049
|
});
|
|
1050
|
-
|
|
1050
|
+
zt.classNames = Se.classNames;
|
|
1051
1051
|
var no = function(e) {
|
|
1052
1052
|
if (typeof document > "u")
|
|
1053
1053
|
return null;
|
|
1054
1054
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1055
1055
|
return t.ownerDocument.body;
|
|
1056
|
-
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {},
|
|
1056
|
+
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, $e = 0, Xt = function(e) {
|
|
1057
1057
|
return e && (e.host || Xt(e.parentNode));
|
|
1058
1058
|
}, oo = function(e, t) {
|
|
1059
1059
|
return t.map(function(r) {
|
|
@@ -1084,11 +1084,11 @@ var no = function(e) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
});
|
|
1086
1086
|
};
|
|
1087
|
-
return d(t), i.clear(),
|
|
1087
|
+
return d(t), i.clear(), $e++, function() {
|
|
1088
1088
|
s.forEach(function(p) {
|
|
1089
1089
|
var h = K.get(p) - 1, m = n.get(p) - 1;
|
|
1090
1090
|
K.set(p, h), n.set(p, m), h || (fe.has(p) || p.removeAttribute(o), fe.delete(p)), m || p.removeAttribute(r);
|
|
1091
|
-
}),
|
|
1091
|
+
}), $e--, $e || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {});
|
|
1092
1092
|
};
|
|
1093
1093
|
}, io = function(e, t, r) {
|
|
1094
1094
|
r === void 0 && (r = "data-aria-hidden");
|
|
@@ -1104,7 +1104,7 @@ var no = function(e) {
|
|
|
1104
1104
|
defaultOpen: a,
|
|
1105
1105
|
onOpenChange: n,
|
|
1106
1106
|
modal: s = !0
|
|
1107
|
-
} = e, i = c.useRef(null), u = c.useRef(null), [l, d] =
|
|
1107
|
+
} = e, i = c.useRef(null), u = c.useRef(null), [l, d] = Yr({
|
|
1108
1108
|
prop: o,
|
|
1109
1109
|
defaultProp: a ?? !1,
|
|
1110
1110
|
onChange: n,
|
|
@@ -1130,7 +1130,7 @@ var no = function(e) {
|
|
|
1130
1130
|
Gt.displayName = Ee;
|
|
1131
1131
|
var Kt = "DialogTrigger", Zt = c.forwardRef(
|
|
1132
1132
|
(e, t) => {
|
|
1133
|
-
const { __scopeDialog: r, ...o } = e, a = I(Kt, r), n =
|
|
1133
|
+
const { __scopeDialog: r, ...o } = e, a = I(Kt, r), n = $(t, a.triggerRef);
|
|
1134
1134
|
return /* @__PURE__ */ f(
|
|
1135
1135
|
T.button,
|
|
1136
1136
|
{
|
|
@@ -1138,7 +1138,7 @@ var Kt = "DialogTrigger", Zt = c.forwardRef(
|
|
|
1138
1138
|
"aria-haspopup": "dialog",
|
|
1139
1139
|
"aria-expanded": a.open,
|
|
1140
1140
|
"aria-controls": a.contentId,
|
|
1141
|
-
"data-state":
|
|
1141
|
+
"data-state": Ve(a.open),
|
|
1142
1142
|
...o,
|
|
1143
1143
|
ref: n,
|
|
1144
1144
|
onClick: A(e.onClick, a.onOpenToggle)
|
|
@@ -1147,17 +1147,17 @@ var Kt = "DialogTrigger", Zt = c.forwardRef(
|
|
|
1147
1147
|
}
|
|
1148
1148
|
);
|
|
1149
1149
|
Zt.displayName = Kt;
|
|
1150
|
-
var
|
|
1150
|
+
var He = "DialogPortal", [co, Qt] = qt(He, {
|
|
1151
1151
|
forceMount: void 0
|
|
1152
1152
|
}), Jt = (e) => {
|
|
1153
|
-
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = I(
|
|
1154
|
-
return /* @__PURE__ */ f(co, { scope: t, forceMount: r, children: c.Children.map(o, (s) => /* @__PURE__ */ f(
|
|
1153
|
+
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = I(He, t);
|
|
1154
|
+
return /* @__PURE__ */ f(co, { scope: t, forceMount: r, children: c.Children.map(o, (s) => /* @__PURE__ */ f(V, { present: r || n.open, children: /* @__PURE__ */ f(Wt, { asChild: !0, container: a, children: s }) })) });
|
|
1155
1155
|
};
|
|
1156
|
-
Jt.displayName =
|
|
1156
|
+
Jt.displayName = He;
|
|
1157
1157
|
var be = "DialogOverlay", er = c.forwardRef(
|
|
1158
1158
|
(e, t) => {
|
|
1159
1159
|
const r = Qt(be, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = I(be, e.__scopeDialog);
|
|
1160
|
-
return n.modal ? /* @__PURE__ */ f(
|
|
1160
|
+
return n.modal ? /* @__PURE__ */ f(V, { present: o || n.open, children: /* @__PURE__ */ f(uo, { ...a, ref: t }) }) : null;
|
|
1161
1161
|
}
|
|
1162
1162
|
);
|
|
1163
1163
|
er.displayName = be;
|
|
@@ -1167,10 +1167,10 @@ var lo = /* @__PURE__ */ Ot("DialogOverlay.RemoveScroll"), uo = c.forwardRef(
|
|
|
1167
1167
|
return (
|
|
1168
1168
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1169
1169
|
// ie. when `Overlay` and `Content` are siblings
|
|
1170
|
-
/* @__PURE__ */ f(
|
|
1170
|
+
/* @__PURE__ */ f(zt, { as: lo, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1171
1171
|
T.div,
|
|
1172
1172
|
{
|
|
1173
|
-
"data-state":
|
|
1173
|
+
"data-state": Ve(a.open),
|
|
1174
1174
|
...o,
|
|
1175
1175
|
ref: t,
|
|
1176
1176
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -1181,13 +1181,13 @@ var lo = /* @__PURE__ */ Ot("DialogOverlay.RemoveScroll"), uo = c.forwardRef(
|
|
|
1181
1181
|
), X = "DialogContent", tr = c.forwardRef(
|
|
1182
1182
|
(e, t) => {
|
|
1183
1183
|
const r = Qt(X, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = I(X, e.__scopeDialog);
|
|
1184
|
-
return /* @__PURE__ */ f(
|
|
1184
|
+
return /* @__PURE__ */ f(V, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(fo, { ...a, ref: t }) : /* @__PURE__ */ f(po, { ...a, ref: t }) });
|
|
1185
1185
|
}
|
|
1186
1186
|
);
|
|
1187
1187
|
tr.displayName = X;
|
|
1188
1188
|
var fo = c.forwardRef(
|
|
1189
1189
|
(e, t) => {
|
|
1190
|
-
const r = I(X, e.__scopeDialog), o = c.useRef(null), a =
|
|
1190
|
+
const r = I(X, e.__scopeDialog), o = c.useRef(null), a = $(t, r.contentRef, o);
|
|
1191
1191
|
return c.useEffect(() => {
|
|
1192
1192
|
const n = o.current;
|
|
1193
1193
|
if (n) return io(n);
|
|
@@ -1238,7 +1238,7 @@ var fo = c.forwardRef(
|
|
|
1238
1238
|
}
|
|
1239
1239
|
), rr = c.forwardRef(
|
|
1240
1240
|
(e, t) => {
|
|
1241
|
-
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = I(X, r), u = c.useRef(null), l =
|
|
1241
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = I(X, r), u = c.useRef(null), l = $(t, u);
|
|
1242
1242
|
return yn(), /* @__PURE__ */ D(re, { children: [
|
|
1243
1243
|
/* @__PURE__ */ f(
|
|
1244
1244
|
It,
|
|
@@ -1249,13 +1249,13 @@ var fo = c.forwardRef(
|
|
|
1249
1249
|
onMountAutoFocus: a,
|
|
1250
1250
|
onUnmountAutoFocus: n,
|
|
1251
1251
|
children: /* @__PURE__ */ f(
|
|
1252
|
-
|
|
1252
|
+
Lt,
|
|
1253
1253
|
{
|
|
1254
1254
|
role: "dialog",
|
|
1255
1255
|
id: i.contentId,
|
|
1256
1256
|
"aria-describedby": i.descriptionId,
|
|
1257
1257
|
"aria-labelledby": i.titleId,
|
|
1258
|
-
"data-state":
|
|
1258
|
+
"data-state": Ve(i.open),
|
|
1259
1259
|
...s,
|
|
1260
1260
|
ref: l,
|
|
1261
1261
|
onDismiss: () => i.onOpenChange(!1)
|
|
@@ -1269,13 +1269,13 @@ var fo = c.forwardRef(
|
|
|
1269
1269
|
] })
|
|
1270
1270
|
] });
|
|
1271
1271
|
}
|
|
1272
|
-
),
|
|
1272
|
+
), Ye = "DialogTitle", nr = c.forwardRef(
|
|
1273
1273
|
(e, t) => {
|
|
1274
|
-
const { __scopeDialog: r, ...o } = e, a = I(
|
|
1274
|
+
const { __scopeDialog: r, ...o } = e, a = I(Ye, r);
|
|
1275
1275
|
return /* @__PURE__ */ f(T.h2, { id: a.titleId, ...o, ref: t });
|
|
1276
1276
|
}
|
|
1277
1277
|
);
|
|
1278
|
-
nr.displayName =
|
|
1278
|
+
nr.displayName = Ye;
|
|
1279
1279
|
var or = "DialogDescription", ar = c.forwardRef(
|
|
1280
1280
|
(e, t) => {
|
|
1281
1281
|
const { __scopeDialog: r, ...o } = e, a = I(or, r);
|
|
@@ -1298,12 +1298,12 @@ var ir = "DialogClose", sr = c.forwardRef(
|
|
|
1298
1298
|
}
|
|
1299
1299
|
);
|
|
1300
1300
|
sr.displayName = ir;
|
|
1301
|
-
function
|
|
1301
|
+
function Ve(e) {
|
|
1302
1302
|
return e ? "open" : "closed";
|
|
1303
1303
|
}
|
|
1304
|
-
var cr = "DialogTitleWarning", [
|
|
1304
|
+
var cr = "DialogTitleWarning", [ri, lr] = Fr(cr, {
|
|
1305
1305
|
contentName: X,
|
|
1306
|
-
titleName:
|
|
1306
|
+
titleName: Ye,
|
|
1307
1307
|
docsSlug: "dialog"
|
|
1308
1308
|
}), ho = ({ titleId: e }) => {
|
|
1309
1309
|
const t = lr(cr), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
@@ -1322,19 +1322,19 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1322
1322
|
t && a && (document.getElementById(t) || console.warn(o));
|
|
1323
1323
|
}, [o, e, t]), null;
|
|
1324
1324
|
}, go = Gt, _o = Zt, bo = Jt, yo = er, wo = tr, he = nr, So = ar, Eo = sr;
|
|
1325
|
-
const ur =
|
|
1325
|
+
const ur = Lr(null);
|
|
1326
1326
|
function Co(e) {
|
|
1327
1327
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1328
1328
|
}
|
|
1329
|
-
var
|
|
1329
|
+
var Le = { exports: {} };
|
|
1330
1330
|
/*!
|
|
1331
1331
|
Copyright (c) 2018 Jed Watson.
|
|
1332
1332
|
Licensed under the MIT License (MIT), see
|
|
1333
1333
|
http://jedwatson.github.io/classnames
|
|
1334
1334
|
*/
|
|
1335
|
-
var
|
|
1335
|
+
var pt;
|
|
1336
1336
|
function Po() {
|
|
1337
|
-
return
|
|
1337
|
+
return pt || (pt = 1, (function(e) {
|
|
1338
1338
|
(function() {
|
|
1339
1339
|
var t = {}.hasOwnProperty;
|
|
1340
1340
|
function r() {
|
|
@@ -1363,10 +1363,10 @@ function Po() {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1365
1365
|
})();
|
|
1366
|
-
})(
|
|
1366
|
+
})(Le)), Le.exports;
|
|
1367
1367
|
}
|
|
1368
1368
|
var Ro = Po();
|
|
1369
|
-
const ae = /* @__PURE__ */ Co(Ro), No = "_slideUp_71yig_1", xo = "_slideDown_71yig_1", Ao = "_slideInRight_71yig_1", Do = "_slideInLeft_71yig_1", To = "_slideOutRight_71yig_1", Oo = "_slideOutLeft_71yig_1",
|
|
1369
|
+
const ae = /* @__PURE__ */ Co(Ro), No = "_slideUp_71yig_1", xo = "_slideDown_71yig_1", Ao = "_slideInRight_71yig_1", Do = "_slideInLeft_71yig_1", To = "_slideOutRight_71yig_1", Oo = "_slideOutLeft_71yig_1", $o = "_fadeIn_71yig_1", Lo = "_fadeOut_71yig_1", Mo = {
|
|
1370
1370
|
"purpur-drawer-content": "_purpur-drawer-content_71yig_1",
|
|
1371
1371
|
slideUp: No,
|
|
1372
1372
|
slideDown: xo,
|
|
@@ -1380,14 +1380,14 @@ const ae = /* @__PURE__ */ Co(Ro), No = "_slideUp_71yig_1", xo = "_slideDown_71y
|
|
|
1380
1380
|
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_71yig_63",
|
|
1381
1381
|
"purpur-drawer-content__description": "_purpur-drawer-content__description_71yig_68",
|
|
1382
1382
|
"purpur-drawer-overlay": "_purpur-drawer-overlay_71yig_79",
|
|
1383
|
-
fadeIn:
|
|
1384
|
-
fadeOut:
|
|
1383
|
+
fadeIn: $o,
|
|
1384
|
+
fadeOut: Lo
|
|
1385
1385
|
}, Io = {
|
|
1386
1386
|
"purpur-drawer-container--header": "_purpur-drawer-container--header_1bcla_1",
|
|
1387
1387
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1bcla_4",
|
|
1388
1388
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1bcla_12",
|
|
1389
1389
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1bcla_20"
|
|
1390
|
-
}, ko = ae.bind(Io), Me = "purpur-drawer-container", ee =
|
|
1390
|
+
}, ko = ae.bind(Io), Me = "purpur-drawer-container", ee = Y(
|
|
1391
1391
|
({
|
|
1392
1392
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1393
1393
|
children: t,
|
|
@@ -1397,14 +1397,12 @@ const ae = /* @__PURE__ */ Co(Ro), No = "_slideUp_71yig_1", xo = "_slideDown_71y
|
|
|
1397
1397
|
...n
|
|
1398
1398
|
}, s) => {
|
|
1399
1399
|
const i = ko([
|
|
1400
|
-
r,
|
|
1401
1400
|
Me,
|
|
1402
1401
|
{
|
|
1403
|
-
[`${Me}--${o}`]: o
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1402
|
+
[`${Me}--${o}`]: o,
|
|
1406
1403
|
[`${Me}--sticky`]: a
|
|
1407
|
-
}
|
|
1404
|
+
},
|
|
1405
|
+
r
|
|
1408
1406
|
]);
|
|
1409
1407
|
return /* @__PURE__ */ f("div", { className: i, "data-testid": e, ref: s, ...n, children: t });
|
|
1410
1408
|
}
|
|
@@ -1433,18 +1431,18 @@ const Wo = {
|
|
|
1433
1431
|
if (!e.current)
|
|
1434
1432
|
return;
|
|
1435
1433
|
const d = l.clientY - e.current.y, p = !!t.current, h = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2, _ = { y: h }, v = { originalEvent: l, delta: _ };
|
|
1436
|
-
p ? (t.current = _, o(v)) :
|
|
1434
|
+
p ? (t.current = _, o(v)) : ht(_, 0) ? (t.current = _, r(), l.target.setPointerCapture(l.pointerId)) : Math.abs(d) > m && (e.current = null);
|
|
1437
1435
|
},
|
|
1438
1436
|
onPointerUp: (l) => {
|
|
1439
1437
|
const d = t.current, p = l.target;
|
|
1440
1438
|
if (p.hasPointerCapture(l.pointerId) && p.releasePointerCapture(l.pointerId), t.current = null, e.current = null, d) {
|
|
1441
1439
|
const h = l.currentTarget, m = { originalEvent: l, delta: d };
|
|
1442
|
-
|
|
1440
|
+
ht(d, 0) && d.y > 200 ? n(m) : a(), h.addEventListener("click", (_) => _.preventDefault(), {
|
|
1443
1441
|
once: !0
|
|
1444
1442
|
});
|
|
1445
1443
|
}
|
|
1446
1444
|
}
|
|
1447
|
-
}),
|
|
1445
|
+
}), ht = (e, t = 0) => Math.abs(e.y) > t, Uo = ae.bind(Fo), Bo = "purpur-drawer-handle", dr = Y(
|
|
1448
1446
|
({
|
|
1449
1447
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1450
1448
|
className: t,
|
|
@@ -1454,7 +1452,7 @@ const Wo = {
|
|
|
1454
1452
|
onSwipeEnd: n,
|
|
1455
1453
|
...s
|
|
1456
1454
|
}, i) => {
|
|
1457
|
-
const u = Uo([
|
|
1455
|
+
const u = Uo([Bo, t]), l = ke.useRef(null), d = ke.useRef(null), { onPointerDown: p, onPointerMove: h, onPointerUp: m } = jo(
|
|
1458
1456
|
d,
|
|
1459
1457
|
l,
|
|
1460
1458
|
r,
|
|
@@ -1480,18 +1478,18 @@ dr.displayName = "DrawerHandle";
|
|
|
1480
1478
|
const Ho = {
|
|
1481
1479
|
LG: "lg"
|
|
1482
1480
|
};
|
|
1483
|
-
function
|
|
1481
|
+
function Yo(e) {
|
|
1484
1482
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1485
1483
|
}
|
|
1486
|
-
var
|
|
1484
|
+
var vt = { exports: {} };
|
|
1487
1485
|
/*!
|
|
1488
1486
|
Copyright (c) 2018 Jed Watson.
|
|
1489
1487
|
Licensed under the MIT License (MIT), see
|
|
1490
1488
|
http://jedwatson.github.io/classnames
|
|
1491
1489
|
*/
|
|
1492
|
-
var
|
|
1493
|
-
function
|
|
1494
|
-
return
|
|
1490
|
+
var mt;
|
|
1491
|
+
function Vo() {
|
|
1492
|
+
return mt || (mt = 1, (function(e) {
|
|
1495
1493
|
(function() {
|
|
1496
1494
|
var t = {}.hasOwnProperty;
|
|
1497
1495
|
function r() {
|
|
@@ -1520,10 +1518,10 @@ function zo() {
|
|
|
1520
1518
|
}
|
|
1521
1519
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1522
1520
|
})();
|
|
1523
|
-
})(
|
|
1521
|
+
})(vt)), vt.exports;
|
|
1524
1522
|
}
|
|
1525
|
-
var
|
|
1526
|
-
const Xo = /* @__PURE__ */
|
|
1523
|
+
var zo = Vo();
|
|
1524
|
+
const Xo = /* @__PURE__ */ Yo(zo), qo = "_rotate_12t9p_1", Go = "_dash_12t9p_1", Ko = {
|
|
1527
1525
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1528
1526
|
rotate: qo,
|
|
1529
1527
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
@@ -1535,7 +1533,7 @@ const Xo = /* @__PURE__ */ Vo(Yo), qo = "_rotate_12t9p_1", Go = "_dash_12t9p_1",
|
|
|
1535
1533
|
dash: Go,
|
|
1536
1534
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1537
1535
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1538
|
-
},
|
|
1536
|
+
}, gt = Xo.bind(Ko), ie = "purpur-spinner", Zo = {
|
|
1539
1537
|
SM: "sm"
|
|
1540
1538
|
}, fr = ({
|
|
1541
1539
|
disabled: e = !1,
|
|
@@ -1543,10 +1541,10 @@ const Xo = /* @__PURE__ */ Vo(Yo), qo = "_rotate_12t9p_1", Go = "_dash_12t9p_1",
|
|
|
1543
1541
|
size: r = Zo.SM,
|
|
1544
1542
|
className: o,
|
|
1545
1543
|
...a
|
|
1546
|
-
}) => /* @__PURE__ */ f("div", { className:
|
|
1544
|
+
}) => /* @__PURE__ */ f("div", { className: gt(ie, `${ie}--${r}`, o), ...a, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1547
1545
|
"circle",
|
|
1548
1546
|
{
|
|
1549
|
-
className:
|
|
1547
|
+
className: gt(`${ie}__circle`, {
|
|
1550
1548
|
[`${ie}__circle--disabled`]: e,
|
|
1551
1549
|
[`${ie}__circle--negative`]: t
|
|
1552
1550
|
}),
|
|
@@ -1559,15 +1557,15 @@ fr.displayName = "Spinner";
|
|
|
1559
1557
|
function Qo(e) {
|
|
1560
1558
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1561
1559
|
}
|
|
1562
|
-
var
|
|
1560
|
+
var _t = { exports: {} };
|
|
1563
1561
|
/*!
|
|
1564
1562
|
Copyright (c) 2018 Jed Watson.
|
|
1565
1563
|
Licensed under the MIT License (MIT), see
|
|
1566
1564
|
http://jedwatson.github.io/classnames
|
|
1567
1565
|
*/
|
|
1568
|
-
var
|
|
1566
|
+
var bt;
|
|
1569
1567
|
function Jo() {
|
|
1570
|
-
return
|
|
1568
|
+
return bt || (bt = 1, (function(e) {
|
|
1571
1569
|
(function() {
|
|
1572
1570
|
var t = {}.hasOwnProperty;
|
|
1573
1571
|
function r() {
|
|
@@ -1596,7 +1594,7 @@ function Jo() {
|
|
|
1596
1594
|
}
|
|
1597
1595
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1598
1596
|
})();
|
|
1599
|
-
})(
|
|
1597
|
+
})(_t)), _t.exports;
|
|
1600
1598
|
}
|
|
1601
1599
|
var ea = Jo();
|
|
1602
1600
|
const ta = /* @__PURE__ */ Qo(ea), ra = {
|
|
@@ -1625,7 +1623,7 @@ const ta = /* @__PURE__ */ Qo(ea), ra = {
|
|
|
1625
1623
|
}, Ie = {
|
|
1626
1624
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1627
1625
|
TEXT: "text"
|
|
1628
|
-
},
|
|
1626
|
+
}, yt = ta.bind(ra), U = "purpur-button", je = Y(
|
|
1629
1627
|
({
|
|
1630
1628
|
children: e,
|
|
1631
1629
|
className: t,
|
|
@@ -1642,7 +1640,7 @@ const ta = /* @__PURE__ */ Qo(ea), ra = {
|
|
|
1642
1640
|
}, h) => {
|
|
1643
1641
|
if (a && l === "destructive")
|
|
1644
1642
|
return null;
|
|
1645
|
-
const m =
|
|
1643
|
+
const m = yt(
|
|
1646
1644
|
[
|
|
1647
1645
|
U,
|
|
1648
1646
|
`${U}--${s ? `${l}-negative` : l}`,
|
|
@@ -1674,7 +1672,7 @@ const ta = /* @__PURE__ */ Qo(ea), ra = {
|
|
|
1674
1672
|
size: u === Ho.LG ? "xs" : "xxs",
|
|
1675
1673
|
negative: s,
|
|
1676
1674
|
disabled: v,
|
|
1677
|
-
className:
|
|
1675
|
+
className: yt(`${U}__spinner`)
|
|
1678
1676
|
}
|
|
1679
1677
|
),
|
|
1680
1678
|
" ",
|
|
@@ -1688,15 +1686,15 @@ je.displayName = "Button";
|
|
|
1688
1686
|
function na(e) {
|
|
1689
1687
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1690
1688
|
}
|
|
1691
|
-
var
|
|
1689
|
+
var wt = { exports: {} };
|
|
1692
1690
|
/*!
|
|
1693
1691
|
Copyright (c) 2018 Jed Watson.
|
|
1694
1692
|
Licensed under the MIT License (MIT), see
|
|
1695
1693
|
http://jedwatson.github.io/classnames
|
|
1696
1694
|
*/
|
|
1697
|
-
var
|
|
1695
|
+
var St;
|
|
1698
1696
|
function oa() {
|
|
1699
|
-
return
|
|
1697
|
+
return St || (St = 1, (function(e) {
|
|
1700
1698
|
(function() {
|
|
1701
1699
|
var t = {}.hasOwnProperty;
|
|
1702
1700
|
function r() {
|
|
@@ -1725,7 +1723,7 @@ function oa() {
|
|
|
1725
1723
|
}
|
|
1726
1724
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1727
1725
|
})();
|
|
1728
|
-
})(
|
|
1726
|
+
})(wt)), wt.exports;
|
|
1729
1727
|
}
|
|
1730
1728
|
var aa = oa();
|
|
1731
1729
|
const ia = /* @__PURE__ */ na(aa), ve = {
|
|
@@ -1748,16 +1746,17 @@ const ia = /* @__PURE__ */ na(aa), ve = {
|
|
|
1748
1746
|
"purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
|
|
1749
1747
|
"purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
|
|
1750
1748
|
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
1751
|
-
},
|
|
1752
|
-
TITLE100: "title-100"
|
|
1753
|
-
|
|
1754
|
-
|
|
1749
|
+
}, sa = {
|
|
1750
|
+
TITLE100: "title-100"
|
|
1751
|
+
}, Et = {
|
|
1752
|
+
DISPLAY10: "display-10"
|
|
1753
|
+
}, me = "purpur-heading", Ue = ({
|
|
1755
1754
|
children: e,
|
|
1756
1755
|
className: t = "",
|
|
1757
1756
|
enableHyphenation: r = !1,
|
|
1758
1757
|
negative: o = !1,
|
|
1759
1758
|
tag: a,
|
|
1760
|
-
variant: n =
|
|
1759
|
+
variant: n = sa.TITLE100,
|
|
1761
1760
|
...s
|
|
1762
1761
|
}) => {
|
|
1763
1762
|
const i = a, u = ia([
|
|
@@ -1771,8 +1770,8 @@ const ia = /* @__PURE__ */ na(aa), ve = {
|
|
|
1771
1770
|
]);
|
|
1772
1771
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1773
1772
|
};
|
|
1774
|
-
|
|
1775
|
-
function
|
|
1773
|
+
Ue.displayName = "Heading";
|
|
1774
|
+
function ca(e) {
|
|
1776
1775
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1777
1776
|
}
|
|
1778
1777
|
var Ct = { exports: {} };
|
|
@@ -1782,7 +1781,7 @@ var Ct = { exports: {} };
|
|
|
1782
1781
|
http://jedwatson.github.io/classnames
|
|
1783
1782
|
*/
|
|
1784
1783
|
var Pt;
|
|
1785
|
-
function
|
|
1784
|
+
function la() {
|
|
1786
1785
|
return Pt || (Pt = 1, (function(e) {
|
|
1787
1786
|
(function() {
|
|
1788
1787
|
var t = {}.hasOwnProperty;
|
|
@@ -1814,8 +1813,8 @@ function ca() {
|
|
|
1814
1813
|
})();
|
|
1815
1814
|
})(Ct)), Ct.exports;
|
|
1816
1815
|
}
|
|
1817
|
-
var
|
|
1818
|
-
const
|
|
1816
|
+
var ua = la();
|
|
1817
|
+
const da = /* @__PURE__ */ ca(ua), fa = {
|
|
1819
1818
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1820
1819
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1821
1820
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1823,42 +1822,42 @@ const ua = /* @__PURE__ */ sa(la), da = {
|
|
|
1823
1822
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1824
1823
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1825
1824
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1826
|
-
},
|
|
1825
|
+
}, pa = da.bind(fa), Rt = "purpur-icon", ha = "md", va = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), ma = ({ content: e = "", title: t } = {}) => {
|
|
1827
1826
|
const r = [
|
|
1828
1827
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1829
1828
|
{ name: "fill", value: "currentColor" },
|
|
1830
1829
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1831
1830
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1832
1831
|
], o = t ? `<title>${t}</title>` : "";
|
|
1833
|
-
return `<svg ${
|
|
1834
|
-
},
|
|
1835
|
-
const n =
|
|
1836
|
-
content:
|
|
1832
|
+
return `<svg ${va(r)}>${o}${e}</svg>`;
|
|
1833
|
+
}, ga = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), ze = ({ svg: e, allyTitle: t, className: r, size: o = ha, ...a }) => {
|
|
1834
|
+
const n = ma({
|
|
1835
|
+
content: ga(e.svg),
|
|
1837
1836
|
title: t
|
|
1838
|
-
}), s =
|
|
1837
|
+
}), s = pa(Rt, `${Rt}--${o}`, r);
|
|
1839
1838
|
return /* @__PURE__ */ f("span", { className: s, dangerouslySetInnerHTML: { __html: n }, ...a });
|
|
1840
1839
|
};
|
|
1841
|
-
|
|
1842
|
-
const ga = {
|
|
1843
|
-
name: "arrow-left",
|
|
1844
|
-
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>',
|
|
1845
|
-
keywords: ["arrow-left"],
|
|
1846
|
-
category: "utility"
|
|
1847
|
-
}, pr = (e) => /* @__PURE__ */ f(Xe, { ...e, svg: ga });
|
|
1848
|
-
pr.displayName = "IconArrowLeft";
|
|
1840
|
+
ze.displayName = "Icon";
|
|
1849
1841
|
const _a = {
|
|
1842
|
+
name: "chevron-left",
|
|
1843
|
+
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M16.175 3.905a.9.9 0 0 1-.08 1.27L8.36 12l7.736 6.825a.9.9 0 0 1-1.191 1.35l-8.5-7.5a.9.9 0 0 1 0-1.35l8.5-7.5a.9.9 0 0 1 1.27.08Z" clip-rule="evenodd"/></svg>',
|
|
1844
|
+
keywords: ["chevron-left"],
|
|
1845
|
+
category: "utility"
|
|
1846
|
+
}, pr = (e) => /* @__PURE__ */ f(ze, { ...e, svg: _a });
|
|
1847
|
+
pr.displayName = "IconChevronLeft";
|
|
1848
|
+
const ba = {
|
|
1850
1849
|
name: "close",
|
|
1851
1850
|
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>',
|
|
1852
1851
|
keywords: ["close"],
|
|
1853
1852
|
category: "utility"
|
|
1854
|
-
}, hr = (e) => /* @__PURE__ */ f(
|
|
1853
|
+
}, hr = (e) => /* @__PURE__ */ f(ze, { ...e, svg: ba });
|
|
1855
1854
|
hr.displayName = "IconClose";
|
|
1856
1855
|
function Nt(e, t) {
|
|
1857
1856
|
if (typeof e == "function")
|
|
1858
1857
|
return e(t);
|
|
1859
1858
|
e != null && (e.current = t);
|
|
1860
1859
|
}
|
|
1861
|
-
function
|
|
1860
|
+
function ya(...e) {
|
|
1862
1861
|
return (t) => {
|
|
1863
1862
|
let r = !1;
|
|
1864
1863
|
const o = e.map((a) => {
|
|
@@ -1875,9 +1874,9 @@ function ba(...e) {
|
|
|
1875
1874
|
};
|
|
1876
1875
|
}
|
|
1877
1876
|
// @__NO_SIDE_EFFECTS__
|
|
1878
|
-
function
|
|
1879
|
-
const t = /* @__PURE__ */
|
|
1880
|
-
const { children: n, ...s } = o, i = c.Children.toArray(n), u = i.find(
|
|
1877
|
+
function wa(e) {
|
|
1878
|
+
const t = /* @__PURE__ */ Sa(e), r = c.forwardRef((o, a) => {
|
|
1879
|
+
const { children: n, ...s } = o, i = c.Children.toArray(n), u = i.find(Ca);
|
|
1881
1880
|
if (u) {
|
|
1882
1881
|
const l = u.props.children, d = i.map((p) => p === u ? c.Children.count(l) > 1 ? c.Children.only(null) : c.isValidElement(l) ? l.props.children : null : p);
|
|
1883
1882
|
return /* @__PURE__ */ f(t, { ...s, ref: a, children: c.isValidElement(l) ? c.cloneElement(l, void 0, d) : null });
|
|
@@ -1887,22 +1886,22 @@ function ya(e) {
|
|
|
1887
1886
|
return r.displayName = `${e}.Slot`, r;
|
|
1888
1887
|
}
|
|
1889
1888
|
// @__NO_SIDE_EFFECTS__
|
|
1890
|
-
function
|
|
1889
|
+
function Sa(e) {
|
|
1891
1890
|
const t = c.forwardRef((r, o) => {
|
|
1892
1891
|
const { children: a, ...n } = r;
|
|
1893
1892
|
if (c.isValidElement(a)) {
|
|
1894
|
-
const s =
|
|
1895
|
-
return a.type !== c.Fragment && (i.ref = o ?
|
|
1893
|
+
const s = Ra(a), i = Pa(n, a.props);
|
|
1894
|
+
return a.type !== c.Fragment && (i.ref = o ? ya(o, s) : s), c.cloneElement(a, i);
|
|
1896
1895
|
}
|
|
1897
1896
|
return c.Children.count(a) > 1 ? c.Children.only(null) : null;
|
|
1898
1897
|
});
|
|
1899
1898
|
return t.displayName = `${e}.SlotClone`, t;
|
|
1900
1899
|
}
|
|
1901
|
-
var
|
|
1902
|
-
function
|
|
1903
|
-
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
1900
|
+
var Ea = Symbol("radix.slottable");
|
|
1901
|
+
function Ca(e) {
|
|
1902
|
+
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ea;
|
|
1904
1903
|
}
|
|
1905
|
-
function
|
|
1904
|
+
function Pa(e, t) {
|
|
1906
1905
|
const r = { ...t };
|
|
1907
1906
|
for (const o in t) {
|
|
1908
1907
|
const a = e[o], n = t[o];
|
|
@@ -1912,12 +1911,12 @@ function Ca(e, t) {
|
|
|
1912
1911
|
}
|
|
1913
1912
|
return { ...e, ...r };
|
|
1914
1913
|
}
|
|
1915
|
-
function
|
|
1914
|
+
function Ra(e) {
|
|
1916
1915
|
var t, r;
|
|
1917
1916
|
let o = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning;
|
|
1918
1917
|
return a ? e.ref : (o = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
|
|
1919
1918
|
}
|
|
1920
|
-
var
|
|
1919
|
+
var Na = [
|
|
1921
1920
|
"a",
|
|
1922
1921
|
"button",
|
|
1923
1922
|
"div",
|
|
@@ -1934,15 +1933,15 @@ var Ra = [
|
|
|
1934
1933
|
"span",
|
|
1935
1934
|
"svg",
|
|
1936
1935
|
"ul"
|
|
1937
|
-
],
|
|
1938
|
-
const r = /* @__PURE__ */
|
|
1936
|
+
], xa = Na.reduce((e, t) => {
|
|
1937
|
+
const r = /* @__PURE__ */ wa(`Primitive.${t}`), o = c.forwardRef((a, n) => {
|
|
1939
1938
|
const { asChild: s, ...i } = a, u = s ? r : t;
|
|
1940
1939
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: n });
|
|
1941
1940
|
});
|
|
1942
1941
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
1943
|
-
}, {}),
|
|
1942
|
+
}, {}), Aa = "VisuallyHidden", vr = c.forwardRef(
|
|
1944
1943
|
(e, t) => /* @__PURE__ */ f(
|
|
1945
|
-
|
|
1944
|
+
xa.span,
|
|
1946
1945
|
{
|
|
1947
1946
|
...e,
|
|
1948
1947
|
ref: t,
|
|
@@ -1963,9 +1962,9 @@ var Ra = [
|
|
|
1963
1962
|
}
|
|
1964
1963
|
)
|
|
1965
1964
|
);
|
|
1966
|
-
vr.displayName =
|
|
1967
|
-
var
|
|
1968
|
-
const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(
|
|
1965
|
+
vr.displayName = Aa;
|
|
1966
|
+
var Da = vr;
|
|
1967
|
+
const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Da, { asChild: e, ...r, children: t }), Ta = {
|
|
1969
1968
|
"purpur-drawer-header": "_purpur-drawer-header_1iujy_1",
|
|
1970
1969
|
"purpur-drawer-header__row": "_purpur-drawer-header__row_1iujy_4",
|
|
1971
1970
|
"purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-button_1iujy_7",
|
|
@@ -1973,7 +1972,7 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
1973
1972
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1iujy_13",
|
|
1974
1973
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1iujy_16",
|
|
1975
1974
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1iujy_27"
|
|
1976
|
-
}, Z = ae.bind(
|
|
1975
|
+
}, Z = ae.bind(Ta), B = "purpur-drawer-header", mr = Y(
|
|
1977
1976
|
({
|
|
1978
1977
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1979
1978
|
backButton: t,
|
|
@@ -1986,7 +1985,7 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
1986
1985
|
title: u,
|
|
1987
1986
|
...l
|
|
1988
1987
|
}, d) => {
|
|
1989
|
-
const p = Z([
|
|
1988
|
+
const p = Z([B, a]), h = !!(t && r && i);
|
|
1990
1989
|
return /* @__PURE__ */ D("div", { className: p, "data-testid": e, ref: d, ...l, children: [
|
|
1991
1990
|
/* @__PURE__ */ D(
|
|
1992
1991
|
"div",
|
|
@@ -2023,11 +2022,11 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
2023
2022
|
s,
|
|
2024
2023
|
/* @__PURE__ */ f(xt, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
|
|
2025
2024
|
] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2026
|
-
|
|
2025
|
+
Ue,
|
|
2027
2026
|
{
|
|
2028
2027
|
"data-testid": `${e}-title`,
|
|
2029
2028
|
tag: "h2",
|
|
2030
|
-
variant:
|
|
2029
|
+
variant: Et.DISPLAY10,
|
|
2031
2030
|
tabIndex: -1,
|
|
2032
2031
|
children: u
|
|
2033
2032
|
}
|
|
@@ -2050,12 +2049,12 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
2050
2049
|
s,
|
|
2051
2050
|
/* @__PURE__ */ f(xt, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
|
|
2052
2051
|
] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2053
|
-
|
|
2052
|
+
Ue,
|
|
2054
2053
|
{
|
|
2055
2054
|
"data-testid": `${e}-title-with-back-button`,
|
|
2056
2055
|
tag: "h2",
|
|
2057
2056
|
tabIndex: -1,
|
|
2058
|
-
variant:
|
|
2057
|
+
variant: Et.DISPLAY10,
|
|
2059
2058
|
children: u
|
|
2060
2059
|
}
|
|
2061
2060
|
) }))
|
|
@@ -2063,18 +2062,18 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
2063
2062
|
}
|
|
2064
2063
|
);
|
|
2065
2064
|
mr.displayName = "DrawerHeader";
|
|
2066
|
-
var
|
|
2067
|
-
function
|
|
2068
|
-
const t = c.useContext(
|
|
2065
|
+
var Oa = c.createContext(void 0);
|
|
2066
|
+
function $a(e) {
|
|
2067
|
+
const t = c.useContext(Oa);
|
|
2069
2068
|
return e || t || "ltr";
|
|
2070
2069
|
}
|
|
2071
2070
|
function La(e, [t, r]) {
|
|
2072
2071
|
return Math.min(r, Math.max(t, e));
|
|
2073
2072
|
}
|
|
2074
|
-
function
|
|
2073
|
+
function Ma(e, t) {
|
|
2075
2074
|
return c.useReducer((r, o) => t[r][o] ?? r, e);
|
|
2076
2075
|
}
|
|
2077
|
-
var
|
|
2076
|
+
var Xe = "ScrollArea", [gr] = Tt(Xe), [Ia, M] = gr(Xe), _r = c.forwardRef(
|
|
2078
2077
|
(e, t) => {
|
|
2079
2078
|
const {
|
|
2080
2079
|
__scopeScrollArea: r,
|
|
@@ -2082,9 +2081,9 @@ var qe = "ScrollArea", [gr] = Tt(qe), [Ma, M] = gr(qe), _r = c.forwardRef(
|
|
|
2082
2081
|
dir: a,
|
|
2083
2082
|
scrollHideDelay: n = 600,
|
|
2084
2083
|
...s
|
|
2085
|
-
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, h] = c.useState(null), [m, _] = c.useState(null), [v, g] = c.useState(null), [b, y] = c.useState(0), [E, w] = c.useState(0), [C, R] = c.useState(!1), [S, x] = c.useState(!1), P =
|
|
2084
|
+
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, h] = c.useState(null), [m, _] = c.useState(null), [v, g] = c.useState(null), [b, y] = c.useState(0), [E, w] = c.useState(0), [C, R] = c.useState(!1), [S, x] = c.useState(!1), P = $(t, (F) => u(F)), N = $a(a);
|
|
2086
2085
|
return /* @__PURE__ */ f(
|
|
2087
|
-
|
|
2086
|
+
Ia,
|
|
2088
2087
|
{
|
|
2089
2088
|
scope: r,
|
|
2090
2089
|
type: o,
|
|
@@ -2124,10 +2123,10 @@ var qe = "ScrollArea", [gr] = Tt(qe), [Ma, M] = gr(qe), _r = c.forwardRef(
|
|
|
2124
2123
|
);
|
|
2125
2124
|
}
|
|
2126
2125
|
);
|
|
2127
|
-
_r.displayName =
|
|
2126
|
+
_r.displayName = Xe;
|
|
2128
2127
|
var br = "ScrollAreaViewport", yr = c.forwardRef(
|
|
2129
2128
|
(e, t) => {
|
|
2130
|
-
const { __scopeScrollArea: r, children: o, nonce: a, ...n } = e, s = M(br, r), i = c.useRef(null), u =
|
|
2129
|
+
const { __scopeScrollArea: r, children: o, nonce: a, ...n } = e, s = M(br, r), i = c.useRef(null), u = $(t, i, s.onViewportChange);
|
|
2131
2130
|
return /* @__PURE__ */ D(re, { children: [
|
|
2132
2131
|
/* @__PURE__ */ f(
|
|
2133
2132
|
"style",
|
|
@@ -2172,11 +2171,11 @@ var W = "ScrollAreaScrollbar", wr = c.forwardRef(
|
|
|
2172
2171
|
const { forceMount: r, ...o } = e, a = M(W, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2173
2172
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2174
2173
|
i ? n(!1) : s(!1);
|
|
2175
|
-
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(
|
|
2174
|
+
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(ka, { ...o, ref: t, forceMount: r }) : a.type === "scroll" ? /* @__PURE__ */ f(Wa, { ...o, ref: t, forceMount: r }) : a.type === "auto" ? /* @__PURE__ */ f(Sr, { ...o, ref: t, forceMount: r }) : a.type === "always" ? /* @__PURE__ */ f(qe, { ...o, ref: t }) : null;
|
|
2176
2175
|
}
|
|
2177
2176
|
);
|
|
2178
2177
|
wr.displayName = W;
|
|
2179
|
-
var
|
|
2178
|
+
var ka = c.forwardRef((e, t) => {
|
|
2180
2179
|
const { forceMount: r, ...o } = e, a = M(W, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2181
2180
|
return c.useEffect(() => {
|
|
2182
2181
|
const i = a.scrollArea;
|
|
@@ -2191,7 +2190,7 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2191
2190
|
window.clearTimeout(u), i.removeEventListener("pointerenter", l), i.removeEventListener("pointerleave", d);
|
|
2192
2191
|
};
|
|
2193
2192
|
}
|
|
2194
|
-
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(
|
|
2193
|
+
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(V, { present: r || n, children: /* @__PURE__ */ f(
|
|
2195
2194
|
Sr,
|
|
2196
2195
|
{
|
|
2197
2196
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2199,8 +2198,8 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2199
2198
|
ref: t
|
|
2200
2199
|
}
|
|
2201
2200
|
) });
|
|
2202
|
-
}),
|
|
2203
|
-
const { forceMount: r, ...o } = e, a = M(W, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Pe(() => u("SCROLL_END"), 100), [i, u] =
|
|
2201
|
+
}), Wa = c.forwardRef((e, t) => {
|
|
2202
|
+
const { forceMount: r, ...o } = e, a = M(W, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Pe(() => u("SCROLL_END"), 100), [i, u] = Ma("hidden", {
|
|
2204
2203
|
hidden: {
|
|
2205
2204
|
SCROLL: "scrolling"
|
|
2206
2205
|
},
|
|
@@ -2233,8 +2232,8 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2233
2232
|
};
|
|
2234
2233
|
return l.addEventListener("scroll", h), () => l.removeEventListener("scroll", h);
|
|
2235
2234
|
}
|
|
2236
|
-
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(
|
|
2237
|
-
|
|
2235
|
+
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(V, { present: r || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2236
|
+
qe,
|
|
2238
2237
|
{
|
|
2239
2238
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
2240
2239
|
...o,
|
|
@@ -2250,15 +2249,15 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2250
2249
|
s(i ? l : d);
|
|
2251
2250
|
}
|
|
2252
2251
|
}, 10);
|
|
2253
|
-
return oe(r.viewport, u), oe(r.content, u), /* @__PURE__ */ f(
|
|
2254
|
-
|
|
2252
|
+
return oe(r.viewport, u), oe(r.content, u), /* @__PURE__ */ f(V, { present: o || n, children: /* @__PURE__ */ f(
|
|
2253
|
+
qe,
|
|
2255
2254
|
{
|
|
2256
2255
|
"data-state": n ? "visible" : "hidden",
|
|
2257
2256
|
...a,
|
|
2258
2257
|
ref: t
|
|
2259
2258
|
}
|
|
2260
2259
|
) });
|
|
2261
|
-
}),
|
|
2260
|
+
}), qe = c.forwardRef((e, t) => {
|
|
2262
2261
|
const { orientation: r = "vertical", ...o } = e, a = M(W, e.__scopeScrollArea), n = c.useRef(null), s = c.useRef(0), [i, u] = c.useState({
|
|
2263
2262
|
content: 0,
|
|
2264
2263
|
viewport: 0,
|
|
@@ -2276,7 +2275,7 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2276
2275
|
return Va(h, s.current, i, m);
|
|
2277
2276
|
}
|
|
2278
2277
|
return r === "horizontal" ? /* @__PURE__ */ f(
|
|
2279
|
-
|
|
2278
|
+
Fa,
|
|
2280
2279
|
{
|
|
2281
2280
|
...d,
|
|
2282
2281
|
ref: t,
|
|
@@ -2294,7 +2293,7 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2294
2293
|
}
|
|
2295
2294
|
}
|
|
2296
2295
|
) : r === "vertical" ? /* @__PURE__ */ f(
|
|
2297
|
-
|
|
2296
|
+
ja,
|
|
2298
2297
|
{
|
|
2299
2298
|
...d,
|
|
2300
2299
|
ref: t,
|
|
@@ -2312,8 +2311,8 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2312
2311
|
}
|
|
2313
2312
|
}
|
|
2314
2313
|
) : null;
|
|
2315
|
-
}),
|
|
2316
|
-
const { sizes: r, onSizesChange: o, ...a } = e, n = M(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l =
|
|
2314
|
+
}), Fa = c.forwardRef((e, t) => {
|
|
2315
|
+
const { sizes: r, onSizesChange: o, ...a } = e, n = M(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = $(t, u, n.onScrollbarXChange);
|
|
2317
2316
|
return c.useEffect(() => {
|
|
2318
2317
|
u.current && i(getComputedStyle(u.current));
|
|
2319
2318
|
}, [u]), /* @__PURE__ */ f(
|
|
@@ -2351,8 +2350,8 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2351
2350
|
}
|
|
2352
2351
|
}
|
|
2353
2352
|
);
|
|
2354
|
-
}),
|
|
2355
|
-
const { sizes: r, onSizesChange: o, ...a } = e, n = M(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l =
|
|
2353
|
+
}), ja = c.forwardRef((e, t) => {
|
|
2354
|
+
const { sizes: r, onSizesChange: o, ...a } = e, n = M(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = $(t, u, n.onScrollbarYChange);
|
|
2356
2355
|
return c.useEffect(() => {
|
|
2357
2356
|
u.current && i(getComputedStyle(u.current));
|
|
2358
2357
|
}, [u]), /* @__PURE__ */ f(
|
|
@@ -2391,7 +2390,7 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2391
2390
|
}
|
|
2392
2391
|
}
|
|
2393
2392
|
);
|
|
2394
|
-
}), [
|
|
2393
|
+
}), [Ua, Er] = gr(W), Cr = c.forwardRef((e, t) => {
|
|
2395
2394
|
const {
|
|
2396
2395
|
__scopeScrollArea: r,
|
|
2397
2396
|
sizes: o,
|
|
@@ -2404,7 +2403,7 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2404
2403
|
onWheelScroll: d,
|
|
2405
2404
|
onResize: p,
|
|
2406
2405
|
...h
|
|
2407
|
-
} = e, m = M(W, r), [_, v] = c.useState(null), g =
|
|
2406
|
+
} = e, m = M(W, r), [_, v] = c.useState(null), g = $(t, (P) => v(P)), b = c.useRef(null), y = c.useRef(""), E = m.viewport, w = o.content - o.viewport, C = L(d), R = L(u), S = Pe(p, 10);
|
|
2408
2407
|
function x(P) {
|
|
2409
2408
|
if (b.current) {
|
|
2410
2409
|
const N = P.clientX - b.current.left, F = P.clientY - b.current.top;
|
|
@@ -2418,15 +2417,15 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2418
2417
|
};
|
|
2419
2418
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2420
2419
|
}, [E, _, w, C]), c.useEffect(R, [o, R]), oe(_, S), oe(m.content, S), /* @__PURE__ */ f(
|
|
2421
|
-
|
|
2420
|
+
Ua,
|
|
2422
2421
|
{
|
|
2423
2422
|
scope: r,
|
|
2424
2423
|
scrollbar: _,
|
|
2425
2424
|
hasThumb: a,
|
|
2426
|
-
onThumbChange:
|
|
2427
|
-
onThumbPointerUp:
|
|
2425
|
+
onThumbChange: L(n),
|
|
2426
|
+
onThumbPointerUp: L(s),
|
|
2428
2427
|
onThumbPositionChange: R,
|
|
2429
|
-
onThumbPointerDown:
|
|
2428
|
+
onThumbPointerDown: L(i),
|
|
2430
2429
|
children: /* @__PURE__ */ f(
|
|
2431
2430
|
T.div,
|
|
2432
2431
|
{
|
|
@@ -2448,11 +2447,11 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2448
2447
|
}), ye = "ScrollAreaThumb", Pr = c.forwardRef(
|
|
2449
2448
|
(e, t) => {
|
|
2450
2449
|
const { forceMount: r, ...o } = e, a = Er(ye, e.__scopeScrollArea);
|
|
2451
|
-
return /* @__PURE__ */ f(
|
|
2450
|
+
return /* @__PURE__ */ f(V, { present: r || a.hasThumb, children: /* @__PURE__ */ f(Ba, { ref: t, ...o }) });
|
|
2452
2451
|
}
|
|
2453
|
-
),
|
|
2452
|
+
), Ba = c.forwardRef(
|
|
2454
2453
|
(e, t) => {
|
|
2455
|
-
const { __scopeScrollArea: r, style: o, ...a } = e, n = M(ye, r), s = Er(ye, r), { onThumbPositionChange: i } = s, u =
|
|
2454
|
+
const { __scopeScrollArea: r, style: o, ...a } = e, n = M(ye, r), s = Er(ye, r), { onThumbPositionChange: i } = s, u = $(
|
|
2456
2455
|
t,
|
|
2457
2456
|
(p) => s.onThumbChange(p)
|
|
2458
2457
|
), l = c.useRef(void 0), d = Pe(() => {
|
|
@@ -2490,15 +2489,15 @@ var Ia = c.forwardRef((e, t) => {
|
|
|
2490
2489
|
}
|
|
2491
2490
|
);
|
|
2492
2491
|
Pr.displayName = ye;
|
|
2493
|
-
var
|
|
2492
|
+
var Ge = "ScrollAreaCorner", Ha = c.forwardRef(
|
|
2494
2493
|
(e, t) => {
|
|
2495
|
-
const r = M(
|
|
2496
|
-
return r.type !== "scroll" && o ? /* @__PURE__ */ f(
|
|
2494
|
+
const r = M(Ge, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
|
|
2495
|
+
return r.type !== "scroll" && o ? /* @__PURE__ */ f(Ya, { ...e, ref: t }) : null;
|
|
2497
2496
|
}
|
|
2498
2497
|
);
|
|
2499
|
-
|
|
2500
|
-
var
|
|
2501
|
-
const { __scopeScrollArea: r, ...o } = e, a = M(
|
|
2498
|
+
Ha.displayName = Ge;
|
|
2499
|
+
var Ya = c.forwardRef((e, t) => {
|
|
2500
|
+
const { __scopeScrollArea: r, ...o } = e, a = M(Ge, r), [n, s] = c.useState(0), [i, u] = c.useState(0), l = !!(n && i);
|
|
2502
2501
|
return oe(a.scrollbarX, () => {
|
|
2503
2502
|
var p;
|
|
2504
2503
|
const d = ((p = a.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
|
|
@@ -2562,13 +2561,13 @@ var za = (e, t = () => {
|
|
|
2562
2561
|
})(), () => window.cancelAnimationFrame(o);
|
|
2563
2562
|
};
|
|
2564
2563
|
function Pe(e, t) {
|
|
2565
|
-
const r =
|
|
2564
|
+
const r = L(e), o = c.useRef(0);
|
|
2566
2565
|
return c.useEffect(() => () => window.clearTimeout(o.current), []), c.useCallback(() => {
|
|
2567
2566
|
window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
|
|
2568
2567
|
}, [r, t]);
|
|
2569
2568
|
}
|
|
2570
2569
|
function oe(e, t) {
|
|
2571
|
-
const r =
|
|
2570
|
+
const r = L(t);
|
|
2572
2571
|
ne(() => {
|
|
2573
2572
|
let o = 0;
|
|
2574
2573
|
if (e) {
|
|
@@ -2581,14 +2580,14 @@ function oe(e, t) {
|
|
|
2581
2580
|
}
|
|
2582
2581
|
}, [e, r]);
|
|
2583
2582
|
}
|
|
2584
|
-
var
|
|
2585
|
-
const
|
|
2583
|
+
var Xa = _r, qa = yr, Ga = wr, Ka = Pr;
|
|
2584
|
+
const Za = {
|
|
2586
2585
|
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1hyos_1",
|
|
2587
2586
|
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1hyos_4",
|
|
2588
2587
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1hyos_10",
|
|
2589
2588
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1hyos_14",
|
|
2590
2589
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1hyos_25"
|
|
2591
|
-
}, se = ae.bind(
|
|
2590
|
+
}, se = ae.bind(Za), Q = "purpur-drawer-scroll-area", Be = Y(
|
|
2592
2591
|
({
|
|
2593
2592
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2594
2593
|
children: t,
|
|
@@ -2596,21 +2595,21 @@ const Ka = {
|
|
|
2596
2595
|
fitToContent: o = !1,
|
|
2597
2596
|
...a
|
|
2598
2597
|
}, n) => {
|
|
2599
|
-
const s = se([
|
|
2598
|
+
const s = se([Q, r]);
|
|
2600
2599
|
return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ D(
|
|
2601
|
-
|
|
2600
|
+
Xa,
|
|
2602
2601
|
{
|
|
2603
2602
|
className: se(`${Q}__root`, {
|
|
2604
2603
|
[`${Q}__root--fit-to-content`]: o
|
|
2605
2604
|
}),
|
|
2606
2605
|
children: [
|
|
2607
|
-
/* @__PURE__ */ f(
|
|
2606
|
+
/* @__PURE__ */ f(qa, { className: se(`${Q}__viewport`), children: t }),
|
|
2608
2607
|
/* @__PURE__ */ f(
|
|
2609
|
-
|
|
2608
|
+
Ga,
|
|
2610
2609
|
{
|
|
2611
2610
|
className: se(`${Q}__scrollbar`),
|
|
2612
2611
|
orientation: "vertical",
|
|
2613
|
-
children: /* @__PURE__ */ f(
|
|
2612
|
+
children: /* @__PURE__ */ f(Ka, { className: se(`${Q}__thumb`) })
|
|
2614
2613
|
}
|
|
2615
2614
|
)
|
|
2616
2615
|
]
|
|
@@ -2618,8 +2617,8 @@ const Ka = {
|
|
|
2618
2617
|
) });
|
|
2619
2618
|
}
|
|
2620
2619
|
);
|
|
2621
|
-
|
|
2622
|
-
const J = ae.bind(Wo), O = "purpur-drawer-frame", Ar =
|
|
2620
|
+
Be.displayName = "DrawerScrollArea";
|
|
2621
|
+
const J = ae.bind(Wo), O = "purpur-drawer-frame", Ar = Y(
|
|
2623
2622
|
({
|
|
2624
2623
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2625
2624
|
backButton: t,
|
|
@@ -2642,7 +2641,6 @@ const J = ae.bind(Wo), O = "purpur-drawer-frame", Ar = V(
|
|
|
2642
2641
|
...y
|
|
2643
2642
|
}, E) => {
|
|
2644
2643
|
const w = !!(t && r && d), C = J([
|
|
2645
|
-
n,
|
|
2646
2644
|
O,
|
|
2647
2645
|
{
|
|
2648
2646
|
[`${O}--fit-to-content`]: i,
|
|
@@ -2651,7 +2649,8 @@ const J = ae.bind(Wo), O = "purpur-drawer-frame", Ar = V(
|
|
|
2651
2649
|
[`${O}--right`]: b === "right",
|
|
2652
2650
|
[`${O}--without-back-button`]: !w,
|
|
2653
2651
|
[`${O}--with-back-button`]: w
|
|
2654
|
-
}
|
|
2652
|
+
},
|
|
2653
|
+
n
|
|
2655
2654
|
]);
|
|
2656
2655
|
return /* @__PURE__ */ D("div", { className: C, "data-testid": e, ref: E, ...y, children: [
|
|
2657
2656
|
/* @__PURE__ */ f(
|
|
@@ -2685,7 +2684,7 @@ const J = ae.bind(Wo), O = "purpur-drawer-frame", Ar = V(
|
|
|
2685
2684
|
),
|
|
2686
2685
|
g ? /* @__PURE__ */ D(re, { children: [
|
|
2687
2686
|
/* @__PURE__ */ f(
|
|
2688
|
-
|
|
2687
|
+
Be,
|
|
2689
2688
|
{
|
|
2690
2689
|
className: J(`${O}__body`),
|
|
2691
2690
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
@@ -2704,7 +2703,7 @@ const J = ae.bind(Wo), O = "purpur-drawer-frame", Ar = V(
|
|
|
2704
2703
|
}
|
|
2705
2704
|
)
|
|
2706
2705
|
] }) : /* @__PURE__ */ f(
|
|
2707
|
-
|
|
2706
|
+
Be,
|
|
2708
2707
|
{
|
|
2709
2708
|
className: J(`${O}__body`),
|
|
2710
2709
|
"data-testid": `${e}-scroll-area`,
|
|
@@ -2736,7 +2735,7 @@ const J = ae.bind(Wo), O = "purpur-drawer-frame", Ar = V(
|
|
|
2736
2735
|
}
|
|
2737
2736
|
);
|
|
2738
2737
|
Ar.displayName = "DrawerFrame";
|
|
2739
|
-
const
|
|
2738
|
+
const Qa = (e, t) => ({
|
|
2740
2739
|
onSwipeStart: () => {
|
|
2741
2740
|
e.current && e.current.setAttribute("data-swipe", "start");
|
|
2742
2741
|
},
|
|
@@ -2755,7 +2754,7 @@ const Za = (e, t) => ({
|
|
|
2755
2754
|
const { y: i } = s.delta;
|
|
2756
2755
|
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${i}px`), t == null || t(!1);
|
|
2757
2756
|
}
|
|
2758
|
-
}), ce = ae.bind(Mo),
|
|
2757
|
+
}), ce = ae.bind(Mo), z = "purpur-drawer-content", Dr = Y(
|
|
2759
2758
|
({
|
|
2760
2759
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2761
2760
|
backButton: t = !1,
|
|
@@ -2777,24 +2776,26 @@ const Za = (e, t) => ({
|
|
|
2777
2776
|
...b
|
|
2778
2777
|
}, y) => {
|
|
2779
2778
|
const E = ce([
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2779
|
+
z,
|
|
2780
|
+
{
|
|
2781
|
+
[`${z}--fit-to-content`]: l,
|
|
2782
|
+
[`${z}--left`]: g === "left",
|
|
2783
|
+
[`${z}--right`]: g === "right"
|
|
2784
|
+
},
|
|
2785
|
+
s
|
|
2786
|
+
]), w = Je(null), C = Je(null), R = (j) => {
|
|
2786
2787
|
C.current = j, typeof y == "function" ? y(j) : y && (y.current = j);
|
|
2787
|
-
}, S = Mr(ur), { onSwipeStart: x, onSwipeMove: P, onSwipeCancel: N, onSwipeEnd: F } =
|
|
2788
|
+
}, S = Mr(ur), { onSwipeStart: x, onSwipeMove: P, onSwipeCancel: N, onSwipeEnd: F } = Qa(
|
|
2788
2789
|
C,
|
|
2789
2790
|
S
|
|
2790
|
-
),
|
|
2791
|
+
), Ze = (j) => {
|
|
2791
2792
|
u && j.preventDefault();
|
|
2792
2793
|
}, Or = () => {
|
|
2793
2794
|
const j = w.current;
|
|
2794
2795
|
if (j) {
|
|
2795
|
-
const
|
|
2796
|
-
|
|
2797
|
-
|
|
2796
|
+
const Qe = j.querySelector("h2");
|
|
2797
|
+
Qe && setTimeout(() => {
|
|
2798
|
+
Qe.focus();
|
|
2798
2799
|
});
|
|
2799
2800
|
}
|
|
2800
2801
|
};
|
|
@@ -2807,7 +2808,7 @@ const Za = (e, t) => ({
|
|
|
2807
2808
|
children: /* @__PURE__ */ f(
|
|
2808
2809
|
wo,
|
|
2809
2810
|
{
|
|
2810
|
-
onPointerDownOutside:
|
|
2811
|
+
onPointerDownOutside: Ze,
|
|
2811
2812
|
onOpenAutoFocus: Or,
|
|
2812
2813
|
className: E,
|
|
2813
2814
|
"data-testid": e,
|
|
@@ -2821,7 +2822,7 @@ const Za = (e, t) => ({
|
|
|
2821
2822
|
backButtonText: r,
|
|
2822
2823
|
backButtonOnlyIcon: o,
|
|
2823
2824
|
closeButtonAriaLabel: i,
|
|
2824
|
-
className: ce(`${
|
|
2825
|
+
className: ce(`${z}__drawer-frame`),
|
|
2825
2826
|
fitToContent: l,
|
|
2826
2827
|
footerContent: d,
|
|
2827
2828
|
headerContent: p,
|
|
@@ -2834,11 +2835,11 @@ const Za = (e, t) => ({
|
|
|
2834
2835
|
stickyFooter: m,
|
|
2835
2836
|
title: _,
|
|
2836
2837
|
position: g,
|
|
2837
|
-
children: a ? /* @__PURE__ */ D("div", { className: ce(`${
|
|
2838
|
+
children: a ? /* @__PURE__ */ D("div", { className: ce(`${z}__content-container`), children: [
|
|
2838
2839
|
/* @__PURE__ */ f(
|
|
2839
2840
|
So,
|
|
2840
2841
|
{
|
|
2841
|
-
className: ce(`${
|
|
2842
|
+
className: ce(`${z}__description`),
|
|
2842
2843
|
"data-testid": `${e}-description`,
|
|
2843
2844
|
children: a
|
|
2844
2845
|
}
|
|
@@ -2854,11 +2855,11 @@ const Za = (e, t) => ({
|
|
|
2854
2855
|
}
|
|
2855
2856
|
);
|
|
2856
2857
|
Dr.displayName = "DrawerContent";
|
|
2857
|
-
const Tr =
|
|
2858
|
+
const Tr = Y(
|
|
2858
2859
|
({ ["data-testid"]: e = "purpur-drawer-trigger", children: t, ...r }, o) => /* @__PURE__ */ f(_o, { asChild: !0, "data-testid": e, ref: o, ...r, children: t })
|
|
2859
2860
|
);
|
|
2860
2861
|
Tr.displayName = "DrawerTrigger";
|
|
2861
|
-
const
|
|
2862
|
+
const Ke = ({
|
|
2862
2863
|
["data-testid"]: e = "purpur-drawer",
|
|
2863
2864
|
children: t,
|
|
2864
2865
|
className: r,
|
|
@@ -2873,10 +2874,10 @@ const Ze = ({
|
|
|
2873
2874
|
i(a);
|
|
2874
2875
|
}, [a]), /* @__PURE__ */ f(ur.Provider, { value: u, children: /* @__PURE__ */ f("div", { className: r, "data-testid": e, ...n, children: /* @__PURE__ */ f(go, { open: s, onOpenChange: u, children: t }) }) });
|
|
2875
2876
|
};
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2877
|
+
Ke.Trigger = Tr;
|
|
2878
|
+
Ke.Content = Dr;
|
|
2879
|
+
Ke.displayName = "Drawer";
|
|
2879
2880
|
export {
|
|
2880
|
-
|
|
2881
|
+
Ke as Drawer
|
|
2881
2882
|
};
|
|
2882
2883
|
//# sourceMappingURL=drawer.es.js.map
|