@purpurds/drawer 5.31.0 → 5.33.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 +34 -9
- package/dist/drawer.cjs.js +6 -6
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +262 -260
- package/dist/drawer.es.js.map +1 -1
- package/package.json +6 -6
package/dist/drawer.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _, jsxs as
|
|
1
|
+
import { jsx as _, jsxs as H, Fragment as lr } from "react/jsx-runtime";
|
|
2
2
|
import * as $ from "react";
|
|
3
3
|
import Ue, { useCallback as ae, createContext as de, useMemo as Se, createElement as h, useContext as Te, useLayoutEffect as ur, useRef as A, useEffect as D, useState as N, forwardRef as w, Children as Z, isValidElement as Ee, cloneElement as Qe, Fragment as Je, useReducer as yt } from "react";
|
|
4
4
|
import dr, { flushSync as St } from "react-dom";
|
|
@@ -27,7 +27,7 @@ function Et(...e) {
|
|
|
27
27
|
function k(...e) {
|
|
28
28
|
return ae(Et(...e), e);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Ct(e, r = []) {
|
|
31
31
|
let t = [];
|
|
32
32
|
function o(n, i) {
|
|
33
33
|
const c = /* @__PURE__ */ de(i), l = t.length;
|
|
@@ -108,13 +108,13 @@ function pr(...e) {
|
|
|
108
108
|
};
|
|
109
109
|
return t.scopeName = r.scopeName, t;
|
|
110
110
|
}
|
|
111
|
-
const
|
|
111
|
+
const Ce = globalThis != null && globalThis.document ? ur : () => {
|
|
112
112
|
}, vr = $.useId || (() => {
|
|
113
113
|
});
|
|
114
114
|
let hr = 0;
|
|
115
115
|
function Oe(e) {
|
|
116
116
|
const [r, t] = $.useState(vr());
|
|
117
|
-
return
|
|
117
|
+
return Ce(() => {
|
|
118
118
|
e || t(
|
|
119
119
|
(o) => o ?? String(hr++)
|
|
120
120
|
);
|
|
@@ -169,23 +169,23 @@ const et = /* @__PURE__ */ w((e, r) => {
|
|
|
169
169
|
const { children: t, ...o } = e, a = Z.toArray(t), n = a.find(_r);
|
|
170
170
|
if (n) {
|
|
171
171
|
const i = n.props.children, c = a.map((l) => l === n ? Z.count(i) > 1 ? Z.only(null) : /* @__PURE__ */ Ee(i) ? i.props.children : null : l);
|
|
172
|
-
return /* @__PURE__ */ h(
|
|
172
|
+
return /* @__PURE__ */ h(qe, y({}, o, {
|
|
173
173
|
ref: r
|
|
174
174
|
}), /* @__PURE__ */ Ee(i) ? /* @__PURE__ */ Qe(i, void 0, c) : null);
|
|
175
175
|
}
|
|
176
|
-
return /* @__PURE__ */ h(
|
|
176
|
+
return /* @__PURE__ */ h(qe, y({}, o, {
|
|
177
177
|
ref: r
|
|
178
178
|
}), t);
|
|
179
179
|
});
|
|
180
180
|
et.displayName = "Slot";
|
|
181
|
-
const
|
|
181
|
+
const qe = /* @__PURE__ */ w((e, r) => {
|
|
182
182
|
const { children: t, ...o } = e;
|
|
183
183
|
return /* @__PURE__ */ Ee(t) ? /* @__PURE__ */ Qe(t, {
|
|
184
184
|
...$r(o, t.props),
|
|
185
185
|
ref: r ? Et(r, t.ref) : t.ref
|
|
186
186
|
}) : Z.count(t) > 1 ? Z.only(null) : null;
|
|
187
187
|
});
|
|
188
|
-
|
|
188
|
+
qe.displayName = "SlotClone";
|
|
189
189
|
const gr = ({ children: e }) => /* @__PURE__ */ h(Je, null, e);
|
|
190
190
|
function _r(e) {
|
|
191
191
|
return /* @__PURE__ */ Ee(e) && e.type === gr;
|
|
@@ -259,36 +259,36 @@ function Sr(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
259
259
|
r
|
|
260
260
|
]);
|
|
261
261
|
}
|
|
262
|
-
const
|
|
262
|
+
const He = "dismissableLayer.update", Er = "dismissableLayer.pointerDownOutside", Cr = "dismissableLayer.focusOutside";
|
|
263
263
|
let at;
|
|
264
|
-
const
|
|
264
|
+
const Pr = /* @__PURE__ */ de({
|
|
265
265
|
layers: /* @__PURE__ */ new Set(),
|
|
266
266
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
267
267
|
branches: /* @__PURE__ */ new Set()
|
|
268
|
-
}),
|
|
268
|
+
}), xr = /* @__PURE__ */ w((e, r) => {
|
|
269
269
|
var t;
|
|
270
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: n, onFocusOutside: i, onInteractOutside: c, onDismiss: l, ...s } = e, u = Te(
|
|
270
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: n, onFocusOutside: i, onInteractOutside: c, onDismiss: l, ...s } = e, u = Te(Pr), [d, f] = N(null), v = (t = d == null ? void 0 : d.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, m] = N({}), p = k(
|
|
271
271
|
r,
|
|
272
|
-
(
|
|
272
|
+
(C) => f(C)
|
|
273
273
|
), b = Array.from(u.layers), [g] = [
|
|
274
274
|
...u.layersWithOutsidePointerEventsDisabled
|
|
275
|
-
].slice(-1),
|
|
276
|
-
const
|
|
275
|
+
].slice(-1), x = b.indexOf(g), S = d ? b.indexOf(d) : -1, E = u.layersWithOutsidePointerEventsDisabled.size > 0, T = S >= x, I = Tr((C) => {
|
|
276
|
+
const P = C.target, R = [
|
|
277
277
|
...u.branches
|
|
278
278
|
].some(
|
|
279
|
-
(
|
|
279
|
+
(z) => z.contains(P)
|
|
280
280
|
);
|
|
281
|
-
!T || R || (n == null || n(
|
|
282
|
-
}, v), O = Ar((
|
|
283
|
-
const
|
|
281
|
+
!T || R || (n == null || n(C), c == null || c(C), C.defaultPrevented || l == null || l());
|
|
282
|
+
}, v), O = Ar((C) => {
|
|
283
|
+
const P = C.target;
|
|
284
284
|
[
|
|
285
285
|
...u.branches
|
|
286
286
|
].some(
|
|
287
|
-
(
|
|
288
|
-
) || (i == null || i(
|
|
287
|
+
(z) => z.contains(P)
|
|
288
|
+
) || (i == null || i(C), c == null || c(C), C.defaultPrevented || l == null || l());
|
|
289
289
|
}, v);
|
|
290
|
-
return Sr((
|
|
291
|
-
S === u.layers.size - 1 && (a == null || a(
|
|
290
|
+
return Sr((C) => {
|
|
291
|
+
S === u.layers.size - 1 && (a == null || a(C), !C.defaultPrevented && l && (C.preventDefault(), l()));
|
|
292
292
|
}, v), D(() => {
|
|
293
293
|
if (d)
|
|
294
294
|
return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (at = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), ct(), () => {
|
|
@@ -305,8 +305,8 @@ const Cr = /* @__PURE__ */ de({
|
|
|
305
305
|
d,
|
|
306
306
|
u
|
|
307
307
|
]), D(() => {
|
|
308
|
-
const
|
|
309
|
-
return document.addEventListener(
|
|
308
|
+
const C = () => m({});
|
|
309
|
+
return document.addEventListener(He, C), () => document.removeEventListener(He, C);
|
|
310
310
|
}, []), /* @__PURE__ */ h(F.div, y({}, s, {
|
|
311
311
|
ref: p,
|
|
312
312
|
style: {
|
|
@@ -325,7 +325,7 @@ function Tr(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
325
325
|
const n = (c) => {
|
|
326
326
|
if (c.target && !o.current) {
|
|
327
327
|
let s = function() {
|
|
328
|
-
|
|
328
|
+
Pt(Er, t, l, {
|
|
329
329
|
discrete: !0
|
|
330
330
|
});
|
|
331
331
|
};
|
|
@@ -356,7 +356,7 @@ function Ar(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
356
356
|
const t = M(e), o = A(!1);
|
|
357
357
|
return D(() => {
|
|
358
358
|
const a = (n) => {
|
|
359
|
-
n.target && !o.current &&
|
|
359
|
+
n.target && !o.current && Pt(Cr, t, {
|
|
360
360
|
originalEvent: n
|
|
361
361
|
}, {
|
|
362
362
|
discrete: !1
|
|
@@ -372,10 +372,10 @@ function Ar(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
374
|
function ct() {
|
|
375
|
-
const e = new CustomEvent(
|
|
375
|
+
const e = new CustomEvent(He);
|
|
376
376
|
document.dispatchEvent(e);
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Pt(e, r, t, { discrete: o }) {
|
|
379
379
|
const a = t.originalEvent.target, n = new CustomEvent(e, {
|
|
380
380
|
bubbles: !1,
|
|
381
381
|
cancelable: !0,
|
|
@@ -406,26 +406,26 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
406
406
|
let p = function(S) {
|
|
407
407
|
if (v.paused || !c) return;
|
|
408
408
|
const E = S.target;
|
|
409
|
-
c.contains(E) ? d.current = E :
|
|
409
|
+
c.contains(E) ? d.current = E : B(d.current, {
|
|
410
410
|
select: !0
|
|
411
411
|
});
|
|
412
412
|
}, b = function(S) {
|
|
413
413
|
if (v.paused || !c) return;
|
|
414
414
|
const E = S.relatedTarget;
|
|
415
|
-
E !== null && (c.contains(E) ||
|
|
415
|
+
E !== null && (c.contains(E) || B(d.current, {
|
|
416
416
|
select: !0
|
|
417
417
|
}));
|
|
418
418
|
}, g = function(S) {
|
|
419
419
|
if (document.activeElement === document.body)
|
|
420
|
-
for (const T of S) T.removedNodes.length > 0 &&
|
|
420
|
+
for (const T of S) T.removedNodes.length > 0 && B(c);
|
|
421
421
|
};
|
|
422
422
|
document.addEventListener("focusin", p), document.addEventListener("focusout", b);
|
|
423
|
-
const
|
|
424
|
-
return c &&
|
|
423
|
+
const x = new MutationObserver(g);
|
|
424
|
+
return c && x.observe(c, {
|
|
425
425
|
childList: !0,
|
|
426
426
|
subtree: !0
|
|
427
427
|
}), () => {
|
|
428
|
-
document.removeEventListener("focusin", p), document.removeEventListener("focusout", b),
|
|
428
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", b), x.disconnect();
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
431
|
}, [
|
|
@@ -438,14 +438,14 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
438
438
|
const p = document.activeElement;
|
|
439
439
|
if (!c.contains(p)) {
|
|
440
440
|
const g = new CustomEvent(Le, it);
|
|
441
|
-
c.addEventListener(Le, s), c.dispatchEvent(g), g.defaultPrevented || (Nr(Ir(
|
|
441
|
+
c.addEventListener(Le, s), c.dispatchEvent(g), g.defaultPrevented || (Nr(Ir(xt(c)), {
|
|
442
442
|
select: !0
|
|
443
|
-
}), document.activeElement === p &&
|
|
443
|
+
}), document.activeElement === p && B(c));
|
|
444
444
|
}
|
|
445
445
|
return () => {
|
|
446
446
|
c.removeEventListener(Le, s), setTimeout(() => {
|
|
447
447
|
const g = new CustomEvent(Re, it);
|
|
448
|
-
c.addEventListener(Re, u), c.dispatchEvent(g), g.defaultPrevented ||
|
|
448
|
+
c.addEventListener(Re, u), c.dispatchEvent(g), g.defaultPrevented || B(p ?? document.body, {
|
|
449
449
|
select: !0
|
|
450
450
|
}), c.removeEventListener(Re, u), lt.remove(v);
|
|
451
451
|
}, 0);
|
|
@@ -461,12 +461,12 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
461
461
|
if (!t && !o || v.paused) return;
|
|
462
462
|
const b = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, g = document.activeElement;
|
|
463
463
|
if (b && g) {
|
|
464
|
-
const
|
|
465
|
-
S && E ? !p.shiftKey && g === E ? (p.preventDefault(), t &&
|
|
464
|
+
const x = p.currentTarget, [S, E] = Or(x);
|
|
465
|
+
S && E ? !p.shiftKey && g === E ? (p.preventDefault(), t && B(S, {
|
|
466
466
|
select: !0
|
|
467
|
-
})) : p.shiftKey && g === S && (p.preventDefault(), t &&
|
|
467
|
+
})) : p.shiftKey && g === S && (p.preventDefault(), t && B(E, {
|
|
468
468
|
select: !0
|
|
469
|
-
})) : g ===
|
|
469
|
+
})) : g === x && p.preventDefault();
|
|
470
470
|
}
|
|
471
471
|
}, [
|
|
472
472
|
t,
|
|
@@ -483,18 +483,18 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
483
483
|
function Nr(e, { select: r = !1 } = {}) {
|
|
484
484
|
const t = document.activeElement;
|
|
485
485
|
for (const o of e)
|
|
486
|
-
if (
|
|
486
|
+
if (B(o, {
|
|
487
487
|
select: r
|
|
488
488
|
}), document.activeElement !== t) return;
|
|
489
489
|
}
|
|
490
490
|
function Or(e) {
|
|
491
|
-
const r =
|
|
491
|
+
const r = xt(e), t = st(r, e), o = st(r.reverse(), e);
|
|
492
492
|
return [
|
|
493
493
|
t,
|
|
494
494
|
o
|
|
495
495
|
];
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function xt(e) {
|
|
498
498
|
const r = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
499
499
|
acceptNode: (o) => {
|
|
500
500
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -522,7 +522,7 @@ function Lr(e, { upTo: r }) {
|
|
|
522
522
|
function Rr(e) {
|
|
523
523
|
return e instanceof HTMLInputElement && "select" in e;
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function B(e, { select: r = !1 } = {}) {
|
|
526
526
|
if (e && e.focus) {
|
|
527
527
|
const t = document.activeElement;
|
|
528
528
|
e.focus({
|
|
@@ -568,7 +568,7 @@ function Fr(e, r) {
|
|
|
568
568
|
return a ?? t;
|
|
569
569
|
}, e);
|
|
570
570
|
}
|
|
571
|
-
const
|
|
571
|
+
const V = (e) => {
|
|
572
572
|
const { present: r, children: t } = e, o = jr(r), a = typeof t == "function" ? t({
|
|
573
573
|
present: o.isPresent
|
|
574
574
|
}) : Z.only(t), n = k(o.ref, a.ref);
|
|
@@ -576,7 +576,7 @@ const q = (e) => {
|
|
|
576
576
|
ref: n
|
|
577
577
|
}) : null;
|
|
578
578
|
};
|
|
579
|
-
|
|
579
|
+
V.displayName = "Presence";
|
|
580
580
|
function jr(e) {
|
|
581
581
|
const [r, t] = N(), o = A({}), a = A(e), n = A("none"), i = e ? "mounted" : "unmounted", [c, l] = Fr(i, {
|
|
582
582
|
mounted: {
|
|
@@ -596,7 +596,7 @@ function jr(e) {
|
|
|
596
596
|
n.current = c === "mounted" ? s : "none";
|
|
597
597
|
}, [
|
|
598
598
|
c
|
|
599
|
-
]),
|
|
599
|
+
]), Ce(() => {
|
|
600
600
|
const s = o.current, u = a.current;
|
|
601
601
|
if (u !== e) {
|
|
602
602
|
const f = n.current, v = pe(s);
|
|
@@ -605,7 +605,7 @@ function jr(e) {
|
|
|
605
605
|
}, [
|
|
606
606
|
e,
|
|
607
607
|
l
|
|
608
|
-
]),
|
|
608
|
+
]), Ce(() => {
|
|
609
609
|
if (r) {
|
|
610
610
|
const s = (d) => {
|
|
611
611
|
const v = pe(o.current).includes(d.animationName);
|
|
@@ -637,7 +637,7 @@ function pe(e) {
|
|
|
637
637
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
638
638
|
}
|
|
639
639
|
let Me = 0;
|
|
640
|
-
function
|
|
640
|
+
function zr() {
|
|
641
641
|
D(() => {
|
|
642
642
|
var e, r;
|
|
643
643
|
const t = document.querySelectorAll("[data-radix-focus-guard]");
|
|
@@ -652,14 +652,14 @@ function dt() {
|
|
|
652
652
|
const e = document.createElement("span");
|
|
653
653
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
654
654
|
}
|
|
655
|
-
var
|
|
656
|
-
return
|
|
655
|
+
var W = function() {
|
|
656
|
+
return W = Object.assign || function(r) {
|
|
657
657
|
for (var t, o = 1, a = arguments.length; o < a; o++) {
|
|
658
658
|
t = arguments[o];
|
|
659
659
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
|
|
660
660
|
}
|
|
661
661
|
return r;
|
|
662
|
-
},
|
|
662
|
+
}, W.apply(this, arguments);
|
|
663
663
|
};
|
|
664
664
|
function Tt(e, r) {
|
|
665
665
|
var t = {};
|
|
@@ -669,16 +669,16 @@ function Tt(e, r) {
|
|
|
669
669
|
r.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
670
670
|
return t;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Wr(e, r, t) {
|
|
673
673
|
if (t || arguments.length === 2) for (var o = 0, a = r.length, n; o < a; o++)
|
|
674
674
|
(n || !(o in r)) && (n || (n = Array.prototype.slice.call(r, 0, o)), n[o] = r[o]);
|
|
675
675
|
return e.concat(n || Array.prototype.slice.call(r));
|
|
676
676
|
}
|
|
677
|
-
var we = "right-scroll-bar-position", ye = "width-before-scroll-bar", Ur = "with-scroll-bars-hidden",
|
|
677
|
+
var we = "right-scroll-bar-position", ye = "width-before-scroll-bar", Ur = "with-scroll-bars-hidden", qr = "--removed-body-scroll-bar-size";
|
|
678
678
|
function Ie(e, r) {
|
|
679
679
|
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function Hr(e, r) {
|
|
682
682
|
var t = N(function() {
|
|
683
683
|
return {
|
|
684
684
|
// value
|
|
@@ -699,14 +699,14 @@ function Yr(e, r) {
|
|
|
699
699
|
})[0];
|
|
700
700
|
return t.callback = r, t.facade;
|
|
701
701
|
}
|
|
702
|
-
var
|
|
703
|
-
function
|
|
704
|
-
var t =
|
|
702
|
+
var Yr = typeof window < "u" ? $.useLayoutEffect : $.useEffect, ft = /* @__PURE__ */ new WeakMap();
|
|
703
|
+
function Xr(e, r) {
|
|
704
|
+
var t = Hr(null, function(o) {
|
|
705
705
|
return e.forEach(function(a) {
|
|
706
706
|
return Ie(a, o);
|
|
707
707
|
});
|
|
708
708
|
});
|
|
709
|
-
return
|
|
709
|
+
return Yr(function() {
|
|
710
710
|
var o = ft.get(t);
|
|
711
711
|
if (o) {
|
|
712
712
|
var a = new Set(o), n = new Set(e), i = t.current;
|
|
@@ -719,11 +719,11 @@ function Br(e, r) {
|
|
|
719
719
|
ft.set(t, e);
|
|
720
720
|
}, [e]), t;
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Br(e) {
|
|
723
723
|
return e;
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
r === void 0 && (r =
|
|
725
|
+
function Vr(e, r) {
|
|
726
|
+
r === void 0 && (r = Br);
|
|
727
727
|
var t = [], o = !1, a = {
|
|
728
728
|
read: function() {
|
|
729
729
|
if (o)
|
|
@@ -779,8 +779,8 @@ function qr(e, r) {
|
|
|
779
779
|
}
|
|
780
780
|
function Kr(e) {
|
|
781
781
|
e === void 0 && (e = {});
|
|
782
|
-
var r =
|
|
783
|
-
return r.options =
|
|
782
|
+
var r = Vr(null);
|
|
783
|
+
return r.options = W({ async: !0, ssr: !1 }, e), r;
|
|
784
784
|
}
|
|
785
785
|
var At = function(e) {
|
|
786
786
|
var r = e.sideCar, t = Tt(e, ["sideCar"]);
|
|
@@ -789,7 +789,7 @@ var At = function(e) {
|
|
|
789
789
|
var o = r.read();
|
|
790
790
|
if (!o)
|
|
791
791
|
throw new Error("Sidecar medium not found");
|
|
792
|
-
return $.createElement(o,
|
|
792
|
+
return $.createElement(o, W({}, t));
|
|
793
793
|
};
|
|
794
794
|
At.isSideCarExport = !0;
|
|
795
795
|
function Gr(e, r) {
|
|
@@ -801,12 +801,12 @@ var Dt = Kr(), ke = function() {
|
|
|
801
801
|
onScrollCapture: ke,
|
|
802
802
|
onWheelCapture: ke,
|
|
803
803
|
onTouchMoveCapture: ke
|
|
804
|
-
}), a = o[0], n = o[1], i = e.forwardProps, c = e.children, l = e.className, s = e.removeScrollBar, u = e.enabled, d = e.shards, f = e.sideCar, v = e.noIsolation, m = e.inert, p = e.allowPinchZoom, b = e.as, g = b === void 0 ? "div" : b,
|
|
804
|
+
}), a = o[0], n = o[1], i = e.forwardProps, c = e.children, l = e.className, s = e.removeScrollBar, u = e.enabled, d = e.shards, f = e.sideCar, v = e.noIsolation, m = e.inert, p = e.allowPinchZoom, b = e.as, g = b === void 0 ? "div" : b, x = Tt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), S = f, E = Xr([t, r]), T = W(W({}, x), a);
|
|
805
805
|
return $.createElement(
|
|
806
806
|
$.Fragment,
|
|
807
807
|
null,
|
|
808
808
|
u && $.createElement(S, { sideCar: Dt, removeScrollBar: s, shards: d, noIsolation: v, inert: m, setCallbacks: n, allowPinchZoom: !!p, lockRef: t }),
|
|
809
|
-
i ? $.cloneElement($.Children.only(c),
|
|
809
|
+
i ? $.cloneElement($.Children.only(c), W(W({}, T), { ref: E })) : $.createElement(g, W({}, T, { className: l, ref: E }), c)
|
|
810
810
|
);
|
|
811
811
|
});
|
|
812
812
|
Ae.defaultProps = {
|
|
@@ -923,7 +923,7 @@ var tn = function() {
|
|
|
923
923
|
}
|
|
924
924
|
|
|
925
925
|
body[`).concat(oe, `] {
|
|
926
|
-
`).concat(
|
|
926
|
+
`).concat(qr, ": ").concat(c, `px;
|
|
927
927
|
}
|
|
928
928
|
`);
|
|
929
929
|
}, pt = function() {
|
|
@@ -943,19 +943,19 @@ var tn = function() {
|
|
|
943
943
|
return an(a);
|
|
944
944
|
}, [a]);
|
|
945
945
|
return $.createElement(cn, { styles: sn(n, !r, a, t ? "" : "!important") });
|
|
946
|
-
},
|
|
946
|
+
}, Ye = !1;
|
|
947
947
|
if (typeof window < "u")
|
|
948
948
|
try {
|
|
949
949
|
var ve = Object.defineProperty({}, "passive", {
|
|
950
950
|
get: function() {
|
|
951
|
-
return
|
|
951
|
+
return Ye = !0, !0;
|
|
952
952
|
}
|
|
953
953
|
});
|
|
954
954
|
window.addEventListener("test", ve, ve), window.removeEventListener("test", ve, ve);
|
|
955
955
|
} catch {
|
|
956
|
-
|
|
956
|
+
Ye = !1;
|
|
957
957
|
}
|
|
958
|
-
var J =
|
|
958
|
+
var J = Ye ? { passive: !1 } : !1, dn = function(e) {
|
|
959
959
|
return e.tagName === "TEXTAREA";
|
|
960
960
|
}, Ot = function(e, r) {
|
|
961
961
|
var t = window.getComputedStyle(e);
|
|
@@ -1011,7 +1011,7 @@ var J = Xe ? { passive: !1 } : !1, dn = function(e) {
|
|
|
1011
1011
|
!l && c !== document.body || // self content
|
|
1012
1012
|
l && (r.contains(c) || r === c)
|
|
1013
1013
|
);
|
|
1014
|
-
return (u &&
|
|
1014
|
+
return (u && d === 0 || !u && f === 0) && (s = !0), s;
|
|
1015
1015
|
}, he = function(e) {
|
|
1016
1016
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1017
1017
|
}, ht = function(e) {
|
|
@@ -1035,7 +1035,7 @@ function wn(e) {
|
|
|
1035
1035
|
}, [e]), $.useEffect(function() {
|
|
1036
1036
|
if (e.inert) {
|
|
1037
1037
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
1038
|
-
var p =
|
|
1038
|
+
var p = Wr([e.lockRef.current], (e.shards || []).map(bt), !0).filter(Boolean);
|
|
1039
1039
|
return p.forEach(function(b) {
|
|
1040
1040
|
return b.classList.add("allow-interactivity-".concat(a));
|
|
1041
1041
|
}), function() {
|
|
@@ -1048,37 +1048,37 @@ function wn(e) {
|
|
|
1048
1048
|
var c = $.useCallback(function(p, b) {
|
|
1049
1049
|
if ("touches" in p && p.touches.length === 2)
|
|
1050
1050
|
return !i.current.allowPinchZoom;
|
|
1051
|
-
var g = he(p),
|
|
1051
|
+
var g = he(p), x = t.current, S = "deltaX" in p ? p.deltaX : x[0] - g[0], E = "deltaY" in p ? p.deltaY : x[1] - g[1], T, I = p.target, O = Math.abs(S) > Math.abs(E) ? "h" : "v";
|
|
1052
1052
|
if ("touches" in p && O === "h" && I.type === "range")
|
|
1053
1053
|
return !1;
|
|
1054
|
-
var
|
|
1055
|
-
if (!
|
|
1054
|
+
var C = vt(O, I);
|
|
1055
|
+
if (!C)
|
|
1056
1056
|
return !0;
|
|
1057
|
-
if (
|
|
1057
|
+
if (C ? T = O : (T = O === "v" ? "h" : "v", C = vt(O, I)), !C)
|
|
1058
1058
|
return !1;
|
|
1059
1059
|
if (!o.current && "changedTouches" in p && (S || E) && (o.current = T), !T)
|
|
1060
1060
|
return !0;
|
|
1061
|
-
var
|
|
1062
|
-
return mn(
|
|
1061
|
+
var P = o.current || T;
|
|
1062
|
+
return mn(P, b, p, P === "h" ? S : E);
|
|
1063
1063
|
}, []), l = $.useCallback(function(p) {
|
|
1064
1064
|
var b = p;
|
|
1065
1065
|
if (!(!ee.length || ee[ee.length - 1] !== n)) {
|
|
1066
|
-
var g = "deltaY" in b ? ht(b) : he(b),
|
|
1066
|
+
var g = "deltaY" in b ? ht(b) : he(b), x = r.current.filter(function(T) {
|
|
1067
1067
|
return T.name === b.type && T.target === b.target && gn(T.delta, g);
|
|
1068
1068
|
})[0];
|
|
1069
|
-
if (
|
|
1069
|
+
if (x && x.should) {
|
|
1070
1070
|
b.cancelable && b.preventDefault();
|
|
1071
1071
|
return;
|
|
1072
1072
|
}
|
|
1073
|
-
if (!
|
|
1073
|
+
if (!x) {
|
|
1074
1074
|
var S = (i.current.shards || []).map(bt).filter(Boolean).filter(function(T) {
|
|
1075
1075
|
return T.contains(b.target);
|
|
1076
1076
|
}), E = S.length > 0 ? c(b, S[0]) : !i.current.noIsolation;
|
|
1077
1077
|
E && b.cancelable && b.preventDefault();
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
|
-
}, []), s = $.useCallback(function(p, b, g,
|
|
1081
|
-
var S = { name: p, delta: b, target: g, should:
|
|
1080
|
+
}, []), s = $.useCallback(function(p, b, g, x) {
|
|
1081
|
+
var S = { name: p, delta: b, target: g, should: x };
|
|
1082
1082
|
r.current.push(S), setTimeout(function() {
|
|
1083
1083
|
r.current = r.current.filter(function(E) {
|
|
1084
1084
|
return E !== S;
|
|
@@ -1112,7 +1112,7 @@ function wn(e) {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
const yn = Gr(Dt, wn);
|
|
1114
1114
|
var Mt = $.forwardRef(function(e, r) {
|
|
1115
|
-
return $.createElement(Ae,
|
|
1115
|
+
return $.createElement(Ae, W({}, e, { ref: r, sideCar: yn }));
|
|
1116
1116
|
});
|
|
1117
1117
|
Mt.classNames = Ae.classNames;
|
|
1118
1118
|
var Sn = function(e) {
|
|
@@ -1131,7 +1131,7 @@ var Sn = function(e) {
|
|
|
1131
1131
|
}).filter(function(t) {
|
|
1132
1132
|
return !!t;
|
|
1133
1133
|
});
|
|
1134
|
-
},
|
|
1134
|
+
}, Cn = function(e, r, t, o) {
|
|
1135
1135
|
var a = En(r, Array.isArray(e) ? e : [e]);
|
|
1136
1136
|
me[t] || (me[t] = /* @__PURE__ */ new WeakMap());
|
|
1137
1137
|
var n = me[t], i = [], c = /* @__PURE__ */ new Set(), l = new Set(a), s = function(d) {
|
|
@@ -1157,20 +1157,20 @@ var Sn = function(e) {
|
|
|
1157
1157
|
te.set(d, f), n.set(d, v), f || (be.has(d) || d.removeAttribute(o), be.delete(d)), v || d.removeAttribute(t);
|
|
1158
1158
|
}), je--, je || (te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), me = {});
|
|
1159
1159
|
};
|
|
1160
|
-
},
|
|
1160
|
+
}, Pn = function(e, r, t) {
|
|
1161
1161
|
t === void 0 && (t = "data-aria-hidden");
|
|
1162
1162
|
var o = Array.from(Array.isArray(e) ? e : [e]), a = Sn(e);
|
|
1163
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))),
|
|
1163
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Cn(o, a, t, "aria-hidden")) : function() {
|
|
1164
1164
|
return null;
|
|
1165
1165
|
};
|
|
1166
1166
|
};
|
|
1167
|
-
const kt = "Dialog", [Ft, ga] =
|
|
1167
|
+
const kt = "Dialog", [Ft, ga] = Ct(kt), [xn, j] = Ft(kt), Tn = (e) => {
|
|
1168
1168
|
const { __scopeDialog: r, children: t, open: o, defaultOpen: a, onOpenChange: n, modal: i = !0 } = e, c = A(null), l = A(null), [s = !1, u] = br({
|
|
1169
1169
|
prop: o,
|
|
1170
1170
|
defaultProp: a,
|
|
1171
1171
|
onChange: n
|
|
1172
1172
|
});
|
|
1173
|
-
return /* @__PURE__ */ h(
|
|
1173
|
+
return /* @__PURE__ */ h(xn, {
|
|
1174
1174
|
scope: r,
|
|
1175
1175
|
triggerRef: c,
|
|
1176
1176
|
contentRef: l,
|
|
@@ -1201,7 +1201,7 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1201
1201
|
ref: n,
|
|
1202
1202
|
onClick: L(e.onClick, a.onOpenToggle)
|
|
1203
1203
|
}));
|
|
1204
|
-
}), jt = "DialogPortal", [Nn,
|
|
1204
|
+
}), jt = "DialogPortal", [Nn, zt] = Ft(jt, {
|
|
1205
1205
|
forceMount: void 0
|
|
1206
1206
|
}), On = (e) => {
|
|
1207
1207
|
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = j(jt, r);
|
|
@@ -1210,22 +1210,22 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1210
1210
|
forceMount: t
|
|
1211
1211
|
}, Z.map(
|
|
1212
1212
|
o,
|
|
1213
|
-
(i) => /* @__PURE__ */ h(
|
|
1213
|
+
(i) => /* @__PURE__ */ h(V, {
|
|
1214
1214
|
present: t || n.open
|
|
1215
1215
|
}, /* @__PURE__ */ h(kr, {
|
|
1216
1216
|
asChild: !0,
|
|
1217
1217
|
container: a
|
|
1218
1218
|
}, i))
|
|
1219
1219
|
));
|
|
1220
|
-
},
|
|
1221
|
-
const t =
|
|
1222
|
-
return n.modal ? /* @__PURE__ */ h(
|
|
1220
|
+
}, Xe = "DialogOverlay", Ln = /* @__PURE__ */ w((e, r) => {
|
|
1221
|
+
const t = zt(Xe, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = j(Xe, e.__scopeDialog);
|
|
1222
|
+
return n.modal ? /* @__PURE__ */ h(V, {
|
|
1223
1223
|
present: o || n.open
|
|
1224
1224
|
}, /* @__PURE__ */ h(Rn, y({}, a, {
|
|
1225
1225
|
ref: r
|
|
1226
1226
|
}))) : null;
|
|
1227
1227
|
}), Rn = /* @__PURE__ */ w((e, r) => {
|
|
1228
|
-
const { __scopeDialog: t, ...o } = e, a = j(
|
|
1228
|
+
const { __scopeDialog: t, ...o } = e, a = j(Xe, t);
|
|
1229
1229
|
return (
|
|
1230
1230
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1231
1231
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -1246,8 +1246,8 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1246
1246
|
})))
|
|
1247
1247
|
);
|
|
1248
1248
|
}), fe = "DialogContent", Mn = /* @__PURE__ */ w((e, r) => {
|
|
1249
|
-
const t =
|
|
1250
|
-
return /* @__PURE__ */ h(
|
|
1249
|
+
const t = zt(fe, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = j(fe, e.__scopeDialog);
|
|
1250
|
+
return /* @__PURE__ */ h(V, {
|
|
1251
1251
|
present: o || n.open
|
|
1252
1252
|
}, n.modal ? /* @__PURE__ */ h(In, y({}, a, {
|
|
1253
1253
|
ref: r
|
|
@@ -1258,8 +1258,8 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1258
1258
|
const t = j(fe, e.__scopeDialog), o = A(null), a = k(r, t.contentRef, o);
|
|
1259
1259
|
return D(() => {
|
|
1260
1260
|
const n = o.current;
|
|
1261
|
-
if (n) return
|
|
1262
|
-
}, []), /* @__PURE__ */ h(
|
|
1261
|
+
if (n) return Pn(n);
|
|
1262
|
+
}, []), /* @__PURE__ */ h(Wt, y({}, e, {
|
|
1263
1263
|
ref: a,
|
|
1264
1264
|
trapFocus: t.open,
|
|
1265
1265
|
disableOutsidePointerEvents: !0,
|
|
@@ -1278,7 +1278,7 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1278
1278
|
}));
|
|
1279
1279
|
}), kn = /* @__PURE__ */ w((e, r) => {
|
|
1280
1280
|
const t = j(fe, e.__scopeDialog), o = A(!1), a = A(!1);
|
|
1281
|
-
return /* @__PURE__ */ h(
|
|
1281
|
+
return /* @__PURE__ */ h(Wt, y({}, e, {
|
|
1282
1282
|
ref: r,
|
|
1283
1283
|
trapFocus: !1,
|
|
1284
1284
|
disableOutsidePointerEvents: !1,
|
|
@@ -1297,15 +1297,15 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1297
1297
|
((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(l)) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
|
|
1298
1298
|
}
|
|
1299
1299
|
}));
|
|
1300
|
-
}),
|
|
1300
|
+
}), Wt = /* @__PURE__ */ w((e, r) => {
|
|
1301
1301
|
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...i } = e, c = j(fe, t), l = A(null), s = k(r, l);
|
|
1302
|
-
return
|
|
1302
|
+
return zr(), /* @__PURE__ */ h(Je, null, /* @__PURE__ */ h(Dr, {
|
|
1303
1303
|
asChild: !0,
|
|
1304
1304
|
loop: !0,
|
|
1305
1305
|
trapped: o,
|
|
1306
1306
|
onMountAutoFocus: a,
|
|
1307
1307
|
onUnmountAutoFocus: n
|
|
1308
|
-
}, /* @__PURE__ */ h(
|
|
1308
|
+
}, /* @__PURE__ */ h(xr, y({
|
|
1309
1309
|
role: "dialog",
|
|
1310
1310
|
id: c.contentId,
|
|
1311
1311
|
"aria-describedby": c.descriptionId,
|
|
@@ -1322,14 +1322,14 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1322
1322
|
}, o, {
|
|
1323
1323
|
ref: r
|
|
1324
1324
|
}));
|
|
1325
|
-
}),
|
|
1326
|
-
const { __scopeDialog: t, ...o } = e, a = j(
|
|
1325
|
+
}), zn = "DialogDescription", Wn = /* @__PURE__ */ w((e, r) => {
|
|
1326
|
+
const { __scopeDialog: t, ...o } = e, a = j(zn, t);
|
|
1327
1327
|
return /* @__PURE__ */ h(F.p, y({
|
|
1328
1328
|
id: a.descriptionId
|
|
1329
1329
|
}, o, {
|
|
1330
1330
|
ref: r
|
|
1331
1331
|
}));
|
|
1332
|
-
}), Un = "DialogClose",
|
|
1332
|
+
}), Un = "DialogClose", qn = /* @__PURE__ */ w((e, r) => {
|
|
1333
1333
|
const { __scopeDialog: t, ...o } = e, a = j(Un, t);
|
|
1334
1334
|
return /* @__PURE__ */ h(F.button, y({
|
|
1335
1335
|
type: "button"
|
|
@@ -1344,7 +1344,7 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1344
1344
|
function tt(e) {
|
|
1345
1345
|
return e ? "open" : "closed";
|
|
1346
1346
|
}
|
|
1347
|
-
const
|
|
1347
|
+
const Hn = Tn, Yn = Dn, Xn = On, Bn = Ln, Vn = Mn, mt = jn, Kn = Wn, Gn = qn;
|
|
1348
1348
|
function Zn(e) {
|
|
1349
1349
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1350
1350
|
}
|
|
@@ -1385,7 +1385,7 @@ var Ut = { exports: {} };
|
|
|
1385
1385
|
})();
|
|
1386
1386
|
})(Ut);
|
|
1387
1387
|
var Qn = Ut.exports;
|
|
1388
|
-
const Q = /* @__PURE__ */ Zn(Qn),
|
|
1388
|
+
const Q = /* @__PURE__ */ Zn(Qn), qt = de(null), Jn = {}, eo = "_drawerSmallScreenAnimation_10vdf_1", to = "_drawerLargeScreenAnimation_10vdf_1", ro = "_slideDown_10vdf_1", no = "_overlayAnimation_10vdf_1", oo = {
|
|
1389
1389
|
"purpur-drawer-content": "_purpur-drawer-content_10vdf_1",
|
|
1390
1390
|
drawerSmallScreenAnimation: eo,
|
|
1391
1391
|
drawerLargeScreenAnimation: to,
|
|
@@ -1400,7 +1400,7 @@ const Q = /* @__PURE__ */ Zn(Qn), Ht = de(null), Jn = {}, eo = "_drawerSmallScre
|
|
|
1400
1400
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1r6tb_5",
|
|
1401
1401
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1r6tb_8",
|
|
1402
1402
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1r6tb_11"
|
|
1403
|
-
}, co = Q.bind(ao),
|
|
1403
|
+
}, co = Q.bind(ao), ze = "purpur-drawer-container", ne = w(
|
|
1404
1404
|
({
|
|
1405
1405
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1406
1406
|
children: r,
|
|
@@ -1411,12 +1411,12 @@ const Q = /* @__PURE__ */ Zn(Qn), Ht = de(null), Jn = {}, eo = "_drawerSmallScre
|
|
|
1411
1411
|
}, i) => {
|
|
1412
1412
|
const c = co([
|
|
1413
1413
|
t,
|
|
1414
|
-
|
|
1414
|
+
ze,
|
|
1415
1415
|
{
|
|
1416
|
-
[`${
|
|
1416
|
+
[`${ze}--${o}`]: o
|
|
1417
1417
|
},
|
|
1418
1418
|
{
|
|
1419
|
-
[`${
|
|
1419
|
+
[`${ze}--sticky`]: a
|
|
1420
1420
|
}
|
|
1421
1421
|
]);
|
|
1422
1422
|
return /* @__PURE__ */ _("div", { className: c, "data-testid": e, ref: i, ...n, children: r });
|
|
@@ -1452,7 +1452,7 @@ const io = {
|
|
|
1452
1452
|
});
|
|
1453
1453
|
}
|
|
1454
1454
|
}
|
|
1455
|
-
}), gt = (e, r = 0) => Math.abs(e.y) > r, uo = Q.bind(so), fo = "purpur-drawer-handle",
|
|
1455
|
+
}), gt = (e, r = 0) => Math.abs(e.y) > r, uo = Q.bind(so), fo = "purpur-drawer-handle", Ht = w(
|
|
1456
1456
|
({
|
|
1457
1457
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1458
1458
|
className: r,
|
|
@@ -1484,12 +1484,13 @@ const io = {
|
|
|
1484
1484
|
);
|
|
1485
1485
|
}
|
|
1486
1486
|
);
|
|
1487
|
-
|
|
1487
|
+
Ht.displayName = "DrawerHandle";
|
|
1488
1488
|
const po = {
|
|
1489
1489
|
PRIMARY: "primary",
|
|
1490
1490
|
SECONDARY: "secondary",
|
|
1491
1491
|
EXPRESSIVE: "expressive"
|
|
1492
1492
|
}, vo = {
|
|
1493
|
+
XS: "xs",
|
|
1493
1494
|
SM: "sm",
|
|
1494
1495
|
MD: "md",
|
|
1495
1496
|
LG: "lg"
|
|
@@ -1497,7 +1498,7 @@ const po = {
|
|
|
1497
1498
|
function ho(e) {
|
|
1498
1499
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1499
1500
|
}
|
|
1500
|
-
var
|
|
1501
|
+
var Yt = { exports: {} };
|
|
1501
1502
|
/*!
|
|
1502
1503
|
Copyright (c) 2018 Jed Watson.
|
|
1503
1504
|
Licensed under the MIT License (MIT), see
|
|
@@ -1532,8 +1533,8 @@ var Xt = { exports: {} };
|
|
|
1532
1533
|
}
|
|
1533
1534
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1534
1535
|
})();
|
|
1535
|
-
})(
|
|
1536
|
-
var bo =
|
|
1536
|
+
})(Yt);
|
|
1537
|
+
var bo = Yt.exports;
|
|
1537
1538
|
const _t = /* @__PURE__ */ ho(bo), mo = "_rotate_1xozj_1", go = "_dash_1xozj_1", ce = {
|
|
1538
1539
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1539
1540
|
rotate: mo,
|
|
@@ -1581,7 +1582,7 @@ const _t = /* @__PURE__ */ ho(bo), mo = "_rotate_1xozj_1", go = "_dash_1xozj_1",
|
|
|
1581
1582
|
function wo(e) {
|
|
1582
1583
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1583
1584
|
}
|
|
1584
|
-
var
|
|
1585
|
+
var Xt = { exports: {} };
|
|
1585
1586
|
/*!
|
|
1586
1587
|
Copyright (c) 2018 Jed Watson.
|
|
1587
1588
|
Licensed under the MIT License (MIT), see
|
|
@@ -1616,35 +1617,36 @@ var Bt = { exports: {} };
|
|
|
1616
1617
|
}
|
|
1617
1618
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1618
1619
|
})();
|
|
1619
|
-
})(
|
|
1620
|
-
var yo =
|
|
1620
|
+
})(Xt);
|
|
1621
|
+
var yo = Xt.exports;
|
|
1621
1622
|
const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
1622
|
-
"purpur-button": "_purpur-
|
|
1623
|
-
"purpur-button--
|
|
1624
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
1625
|
-
"purpur-button--
|
|
1626
|
-
"purpur-button--
|
|
1627
|
-
"purpur-button--
|
|
1628
|
-
"purpur-button--
|
|
1629
|
-
"purpur-button--
|
|
1630
|
-
"purpur-button--
|
|
1631
|
-
"purpur-button--
|
|
1632
|
-
"purpur-button--secondary
|
|
1633
|
-
"purpur-button--
|
|
1634
|
-
"purpur-button--expressive
|
|
1635
|
-
"purpur-button--negative": "_purpur-button--
|
|
1636
|
-
"purpur-button--
|
|
1637
|
-
"purpur-button--destructive
|
|
1638
|
-
"purpur-button--
|
|
1639
|
-
"purpur-button--tertiary-purple
|
|
1640
|
-
"purpur-button--
|
|
1641
|
-
"purpur-button--text": "_purpur-button--
|
|
1642
|
-
|
|
1623
|
+
"purpur-button": "_purpur-button_w455q_1",
|
|
1624
|
+
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
1625
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
1626
|
+
"purpur-button--sm": "_purpur-button--sm_w455q_39",
|
|
1627
|
+
"purpur-button--md": "_purpur-button--md_w455q_45",
|
|
1628
|
+
"purpur-button--lg": "_purpur-button--lg_w455q_51",
|
|
1629
|
+
"purpur-button--full-width": "_purpur-button--full-width_w455q_57",
|
|
1630
|
+
"purpur-button--primary": "_purpur-button--primary_w455q_60",
|
|
1631
|
+
"purpur-button--disabled": "_purpur-button--disabled_w455q_64",
|
|
1632
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_w455q_70",
|
|
1633
|
+
"purpur-button--secondary": "_purpur-button--secondary_w455q_82",
|
|
1634
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_w455q_93",
|
|
1635
|
+
"purpur-button--expressive": "_purpur-button--expressive_w455q_104",
|
|
1636
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_w455q_114",
|
|
1637
|
+
"purpur-button--negative": "_purpur-button--negative_w455q_126",
|
|
1638
|
+
"purpur-button--destructive": "_purpur-button--destructive_w455q_133",
|
|
1639
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_w455q_143",
|
|
1640
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_w455q_153",
|
|
1641
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
|
|
1642
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
|
|
1643
|
+
"purpur-button--text": "_purpur-button--text_w455q_181"
|
|
1644
|
+
}, We = {
|
|
1643
1645
|
...po,
|
|
1644
1646
|
DESTRUCTIVE: "destructive",
|
|
1645
1647
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1646
1648
|
TEXT: "text"
|
|
1647
|
-
},
|
|
1649
|
+
}, Co = So.bind(Eo), K = "purpur-button", Po = ({
|
|
1648
1650
|
children: e,
|
|
1649
1651
|
className: r,
|
|
1650
1652
|
["data-testid"]: t,
|
|
@@ -1661,7 +1663,7 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1661
1663
|
}, v) => {
|
|
1662
1664
|
if (n && u === "destructive")
|
|
1663
1665
|
return null;
|
|
1664
|
-
const m =
|
|
1666
|
+
const m = Co(
|
|
1665
1667
|
[
|
|
1666
1668
|
K,
|
|
1667
1669
|
`${K}--${c ? `${u}-negative` : u}`,
|
|
@@ -1677,7 +1679,7 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1677
1679
|
), p = (g) => {
|
|
1678
1680
|
o || i ? g.preventDefault() : l && l(g);
|
|
1679
1681
|
}, b = !!f["aria-disabled"] || o || i;
|
|
1680
|
-
return /* @__PURE__ */
|
|
1682
|
+
return /* @__PURE__ */ H(
|
|
1681
1683
|
"button",
|
|
1682
1684
|
{
|
|
1683
1685
|
className: m,
|
|
@@ -1694,12 +1696,12 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1694
1696
|
]
|
|
1695
1697
|
}
|
|
1696
1698
|
);
|
|
1697
|
-
},
|
|
1698
|
-
|
|
1699
|
-
function
|
|
1699
|
+
}, Be = w(Po);
|
|
1700
|
+
Be.displayName = "Button";
|
|
1701
|
+
function xo(e) {
|
|
1700
1702
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1701
1703
|
}
|
|
1702
|
-
var
|
|
1704
|
+
var Bt = { exports: {} };
|
|
1703
1705
|
/*!
|
|
1704
1706
|
Copyright (c) 2018 Jed Watson.
|
|
1705
1707
|
Licensed under the MIT License (MIT), see
|
|
@@ -1734,9 +1736,9 @@ var Vt = { exports: {} };
|
|
|
1734
1736
|
}
|
|
1735
1737
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1736
1738
|
})();
|
|
1737
|
-
})(
|
|
1738
|
-
var To =
|
|
1739
|
-
const Ao = /* @__PURE__ */
|
|
1739
|
+
})(Bt);
|
|
1740
|
+
var To = Bt.exports;
|
|
1741
|
+
const Ao = /* @__PURE__ */ xo(To), ge = {
|
|
1740
1742
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1741
1743
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1742
1744
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1752,7 +1754,7 @@ const Ao = /* @__PURE__ */ Po(To), ge = {
|
|
|
1752
1754
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
1753
1755
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
1754
1756
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
1755
|
-
},
|
|
1757
|
+
}, Ve = {
|
|
1756
1758
|
TITLE100: "title-100",
|
|
1757
1759
|
TITLE200: "title-200",
|
|
1758
1760
|
TITLE300: "title-300",
|
|
@@ -1768,7 +1770,7 @@ const Ao = /* @__PURE__ */ Po(To), ge = {
|
|
|
1768
1770
|
enableHyphenation: o = !1,
|
|
1769
1771
|
negative: a = !1,
|
|
1770
1772
|
tag: n,
|
|
1771
|
-
variant: i =
|
|
1773
|
+
variant: i = Ve.TITLE100,
|
|
1772
1774
|
...c
|
|
1773
1775
|
}) => {
|
|
1774
1776
|
const l = n, s = Ao([
|
|
@@ -1786,7 +1788,7 @@ Ke.displayName = "Heading";
|
|
|
1786
1788
|
function Do(e) {
|
|
1787
1789
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1788
1790
|
}
|
|
1789
|
-
var
|
|
1791
|
+
var Vt = { exports: {} };
|
|
1790
1792
|
/*!
|
|
1791
1793
|
Copyright (c) 2018 Jed Watson.
|
|
1792
1794
|
Licensed under the MIT License (MIT), see
|
|
@@ -1821,8 +1823,8 @@ var qt = { exports: {} };
|
|
|
1821
1823
|
}
|
|
1822
1824
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1823
1825
|
})();
|
|
1824
|
-
})(
|
|
1825
|
-
var No =
|
|
1826
|
+
})(Vt);
|
|
1827
|
+
var No = Vt.exports;
|
|
1826
1828
|
const Oo = /* @__PURE__ */ Do(No), Lo = {
|
|
1827
1829
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1828
1830
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
@@ -1865,7 +1867,7 @@ const Io = Oo.bind(Lo), $t = "purpur-icon", ko = "md", Fo = (e) => e.filter((r)
|
|
|
1865
1867
|
r ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1866
1868
|
], o = r ? `<title>${r}</title>` : "";
|
|
1867
1869
|
return `<svg ${Fo(t)}>${o}${e}</svg>`;
|
|
1868
|
-
},
|
|
1870
|
+
}, zo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), rt = ({
|
|
1869
1871
|
["data-testid"]: e,
|
|
1870
1872
|
svg: r,
|
|
1871
1873
|
allyTitle: t,
|
|
@@ -1874,7 +1876,7 @@ const Io = Oo.bind(Lo), $t = "purpur-icon", ko = "md", Fo = (e) => e.filter((r)
|
|
|
1874
1876
|
...n
|
|
1875
1877
|
}) => {
|
|
1876
1878
|
const i = jo({
|
|
1877
|
-
content:
|
|
1879
|
+
content: zo(r.svg),
|
|
1878
1880
|
title: t
|
|
1879
1881
|
}), c = Io(o, $t, `${$t}--${a}`);
|
|
1880
1882
|
return /* @__PURE__ */ _(
|
|
@@ -1889,14 +1891,14 @@ const Io = Oo.bind(Lo), $t = "purpur-icon", ko = "md", Fo = (e) => e.filter((r)
|
|
|
1889
1891
|
);
|
|
1890
1892
|
};
|
|
1891
1893
|
rt.displayName = "Icon";
|
|
1892
|
-
const
|
|
1894
|
+
const Wo = {
|
|
1893
1895
|
"purpur-drawer-header__row": "_purpur-drawer-header__row_1yg5w_1",
|
|
1894
1896
|
"purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-button_1yg5w_6",
|
|
1895
1897
|
"purpur-drawer-header__left": "_purpur-drawer-header__left_1yg5w_9",
|
|
1896
1898
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1897
1899
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1898
1900
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1899
|
-
}, G = Q.bind(
|
|
1901
|
+
}, G = Q.bind(Wo), q = "purpur-drawer-header", Zt = w(
|
|
1900
1902
|
({
|
|
1901
1903
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1902
1904
|
backButton: r,
|
|
@@ -1908,34 +1910,34 @@ const zo = {
|
|
|
1908
1910
|
title: c,
|
|
1909
1911
|
...l
|
|
1910
1912
|
}, s) => {
|
|
1911
|
-
const u = G([a,
|
|
1912
|
-
return /* @__PURE__ */
|
|
1913
|
-
/* @__PURE__ */
|
|
1913
|
+
const u = G([a, q]);
|
|
1914
|
+
return /* @__PURE__ */ H("div", { className: u, "data-testid": e, ref: s, ...l, children: [
|
|
1915
|
+
/* @__PURE__ */ H(
|
|
1914
1916
|
"div",
|
|
1915
1917
|
{
|
|
1916
1918
|
className: G([
|
|
1917
|
-
`${
|
|
1919
|
+
`${q}__row`,
|
|
1918
1920
|
{
|
|
1919
|
-
[`${
|
|
1921
|
+
[`${q}__row--with-back-button`]: r && t && i
|
|
1920
1922
|
}
|
|
1921
1923
|
]),
|
|
1922
1924
|
"data-testid": `${e}-row`,
|
|
1923
1925
|
children: [
|
|
1924
|
-
/* @__PURE__ */ _("div", { className: G(`${
|
|
1925
|
-
|
|
1926
|
+
/* @__PURE__ */ _("div", { className: G(`${q}__left`), children: r && t && i ? /* @__PURE__ */ H(
|
|
1927
|
+
Be,
|
|
1926
1928
|
{
|
|
1927
1929
|
"aria-label": o ? t : "",
|
|
1928
1930
|
className: G([
|
|
1929
|
-
`${
|
|
1931
|
+
`${q}__back-button`,
|
|
1930
1932
|
{
|
|
1931
|
-
[`${
|
|
1933
|
+
[`${q}__back-button--only-icon`]: o
|
|
1932
1934
|
}
|
|
1933
1935
|
]),
|
|
1934
1936
|
"data-testid": `${e}-back-button`,
|
|
1935
1937
|
iconOnly: o,
|
|
1936
1938
|
onClick: i,
|
|
1937
1939
|
size: "sm",
|
|
1938
|
-
variant: o ?
|
|
1940
|
+
variant: o ? We.TERTIARY_PURPLE : We.TEXT,
|
|
1939
1941
|
children: [
|
|
1940
1942
|
/* @__PURE__ */ _(Kt, { size: "sm" }),
|
|
1941
1943
|
!o && t
|
|
@@ -1946,18 +1948,18 @@ const zo = {
|
|
|
1946
1948
|
{
|
|
1947
1949
|
"data-testid": `${e}-title`,
|
|
1948
1950
|
tag: "h2",
|
|
1949
|
-
variant:
|
|
1951
|
+
variant: Ve.TITLE200,
|
|
1950
1952
|
children: c
|
|
1951
1953
|
}
|
|
1952
1954
|
) }) }),
|
|
1953
|
-
/* @__PURE__ */ _("div", { className: G(`${
|
|
1954
|
-
|
|
1955
|
+
/* @__PURE__ */ _("div", { className: G(`${q}__right`), children: /* @__PURE__ */ _(Gn, { asChild: !0, children: /* @__PURE__ */ _(
|
|
1956
|
+
Be,
|
|
1955
1957
|
{
|
|
1956
1958
|
"aria-label": n,
|
|
1957
|
-
className: G(`${
|
|
1959
|
+
className: G(`${q}__close-button`),
|
|
1958
1960
|
iconOnly: !0,
|
|
1959
1961
|
size: "sm",
|
|
1960
|
-
variant:
|
|
1962
|
+
variant: We.TERTIARY_PURPLE,
|
|
1961
1963
|
children: /* @__PURE__ */ _(Gt, { size: "sm" })
|
|
1962
1964
|
}
|
|
1963
1965
|
) }) })
|
|
@@ -1967,10 +1969,10 @@ const zo = {
|
|
|
1967
1969
|
r && t && i && /* @__PURE__ */ _(mt, { asChild: !0, children: /* @__PURE__ */ _(
|
|
1968
1970
|
Ke,
|
|
1969
1971
|
{
|
|
1970
|
-
className: G(`${
|
|
1972
|
+
className: G(`${q}__heading`),
|
|
1971
1973
|
"data-testid": `${e}-title-with-back-button`,
|
|
1972
1974
|
tag: "h2",
|
|
1973
|
-
variant:
|
|
1975
|
+
variant: Ve.TITLE200,
|
|
1974
1976
|
children: c
|
|
1975
1977
|
}
|
|
1976
1978
|
) })
|
|
@@ -1979,25 +1981,25 @@ const zo = {
|
|
|
1979
1981
|
);
|
|
1980
1982
|
Zt.displayName = "DrawerHeader";
|
|
1981
1983
|
const Uo = /* @__PURE__ */ de(void 0);
|
|
1982
|
-
function
|
|
1984
|
+
function qo(e) {
|
|
1983
1985
|
const r = Te(Uo);
|
|
1984
1986
|
return e || r || "ltr";
|
|
1985
1987
|
}
|
|
1986
|
-
function
|
|
1988
|
+
function Ho(e, [r, t]) {
|
|
1987
1989
|
return Math.min(t, Math.max(r, e));
|
|
1988
1990
|
}
|
|
1989
|
-
function
|
|
1991
|
+
function Yo(e, r) {
|
|
1990
1992
|
return yt((t, o) => {
|
|
1991
1993
|
const a = r[t][o];
|
|
1992
1994
|
return a ?? t;
|
|
1993
1995
|
}, e);
|
|
1994
1996
|
}
|
|
1995
|
-
const Qt = "ScrollArea", [Jt, _a] =
|
|
1996
|
-
const { __scopeScrollArea: t, type: o = "hover", dir: a, scrollHideDelay: n = 600, ...i } = e, [c, l] = N(null), [s, u] = N(null), [d, f] = N(null), [v, m] = N(null), [p, b] = N(null), [g,
|
|
1997
|
+
const Qt = "ScrollArea", [Jt, _a] = Ct(Qt), [Xo, U] = Jt(Qt), Bo = /* @__PURE__ */ w((e, r) => {
|
|
1998
|
+
const { __scopeScrollArea: t, type: o = "hover", dir: a, scrollHideDelay: n = 600, ...i } = e, [c, l] = N(null), [s, u] = N(null), [d, f] = N(null), [v, m] = N(null), [p, b] = N(null), [g, x] = N(0), [S, E] = N(0), [T, I] = N(!1), [O, C] = N(!1), P = k(
|
|
1997
1999
|
r,
|
|
1998
|
-
(
|
|
1999
|
-
), R =
|
|
2000
|
-
return /* @__PURE__ */ h(
|
|
2000
|
+
(z) => l(z)
|
|
2001
|
+
), R = qo(a);
|
|
2002
|
+
return /* @__PURE__ */ h(Xo, {
|
|
2001
2003
|
scope: t,
|
|
2002
2004
|
type: o,
|
|
2003
2005
|
dir: R,
|
|
@@ -2014,13 +2016,13 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2014
2016
|
scrollbarY: p,
|
|
2015
2017
|
onScrollbarYChange: b,
|
|
2016
2018
|
scrollbarYEnabled: O,
|
|
2017
|
-
onScrollbarYEnabledChange:
|
|
2018
|
-
onCornerWidthChange:
|
|
2019
|
+
onScrollbarYEnabledChange: C,
|
|
2020
|
+
onCornerWidthChange: x,
|
|
2019
2021
|
onCornerHeightChange: E
|
|
2020
2022
|
}, /* @__PURE__ */ h(F.div, y({
|
|
2021
2023
|
dir: R
|
|
2022
2024
|
}, i, {
|
|
2023
|
-
ref:
|
|
2025
|
+
ref: P,
|
|
2024
2026
|
style: {
|
|
2025
2027
|
position: "relative",
|
|
2026
2028
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
@@ -2029,8 +2031,8 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2029
2031
|
...e.style
|
|
2030
2032
|
}
|
|
2031
2033
|
})));
|
|
2032
|
-
}),
|
|
2033
|
-
const { __scopeScrollArea: t, children: o, ...a } = e, n = U(
|
|
2034
|
+
}), Vo = "ScrollAreaViewport", Ko = /* @__PURE__ */ w((e, r) => {
|
|
2035
|
+
const { __scopeScrollArea: t, children: o, ...a } = e, n = U(Vo, t), i = A(null), c = k(r, i, n.onViewportChange);
|
|
2034
2036
|
return /* @__PURE__ */ h(Je, null, /* @__PURE__ */ h("style", {
|
|
2035
2037
|
dangerouslySetInnerHTML: {
|
|
2036
2038
|
__html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
|
|
@@ -2062,8 +2064,8 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2062
2064
|
display: "table"
|
|
2063
2065
|
}
|
|
2064
2066
|
}, o)));
|
|
2065
|
-
}),
|
|
2066
|
-
const { forceMount: t, ...o } = e, a = U(
|
|
2067
|
+
}), Y = "ScrollAreaScrollbar", Go = /* @__PURE__ */ w((e, r) => {
|
|
2068
|
+
const { forceMount: t, ...o } = e, a = U(Y, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: i } = a, c = e.orientation === "horizontal";
|
|
2067
2069
|
return D(() => (c ? n(!0) : i(!0), () => {
|
|
2068
2070
|
c ? n(!1) : i(!1);
|
|
2069
2071
|
}), [
|
|
@@ -2083,7 +2085,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2083
2085
|
ref: r
|
|
2084
2086
|
})) : null;
|
|
2085
2087
|
}), Zo = /* @__PURE__ */ w((e, r) => {
|
|
2086
|
-
const { forceMount: t, ...o } = e, a = U(
|
|
2088
|
+
const { forceMount: t, ...o } = e, a = U(Y, e.__scopeScrollArea), [n, i] = N(!1);
|
|
2087
2089
|
return D(() => {
|
|
2088
2090
|
const c = a.scrollArea;
|
|
2089
2091
|
let l = 0;
|
|
@@ -2103,7 +2105,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2103
2105
|
}, [
|
|
2104
2106
|
a.scrollArea,
|
|
2105
2107
|
a.scrollHideDelay
|
|
2106
|
-
]), /* @__PURE__ */ h(
|
|
2108
|
+
]), /* @__PURE__ */ h(V, {
|
|
2107
2109
|
present: t || n
|
|
2108
2110
|
}, /* @__PURE__ */ h(er, y({
|
|
2109
2111
|
"data-state": n ? "visible" : "hidden"
|
|
@@ -2111,10 +2113,10 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2111
2113
|
ref: r
|
|
2112
2114
|
})));
|
|
2113
2115
|
}), Qo = /* @__PURE__ */ w((e, r) => {
|
|
2114
|
-
const { forceMount: t, ...o } = e, a = U(
|
|
2116
|
+
const { forceMount: t, ...o } = e, a = U(Y, e.__scopeScrollArea), n = e.orientation === "horizontal", i = Ne(
|
|
2115
2117
|
() => l("SCROLL_END"),
|
|
2116
2118
|
100
|
|
2117
|
-
), [c, l] =
|
|
2119
|
+
), [c, l] = Yo("hidden", {
|
|
2118
2120
|
hidden: {
|
|
2119
2121
|
SCROLL: "scrolling"
|
|
2120
2122
|
},
|
|
@@ -2159,7 +2161,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2159
2161
|
n,
|
|
2160
2162
|
l,
|
|
2161
2163
|
i
|
|
2162
|
-
]), /* @__PURE__ */ h(
|
|
2164
|
+
]), /* @__PURE__ */ h(V, {
|
|
2163
2165
|
present: t || c !== "hidden"
|
|
2164
2166
|
}, /* @__PURE__ */ h(nt, y({
|
|
2165
2167
|
"data-state": c === "hidden" ? "hidden" : "visible"
|
|
@@ -2175,13 +2177,13 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2175
2177
|
)
|
|
2176
2178
|
})));
|
|
2177
2179
|
}), er = /* @__PURE__ */ w((e, r) => {
|
|
2178
|
-
const t = U(
|
|
2180
|
+
const t = U(Y, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, i] = N(!1), c = e.orientation === "horizontal", l = Ne(() => {
|
|
2179
2181
|
if (t.viewport) {
|
|
2180
2182
|
const s = t.viewport.offsetWidth < t.viewport.scrollWidth, u = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
2181
2183
|
i(c ? s : u);
|
|
2182
2184
|
}
|
|
2183
2185
|
}, 10);
|
|
2184
|
-
return
|
|
2186
|
+
return xe(t.viewport, l), xe(t.content, l), /* @__PURE__ */ h(V, {
|
|
2185
2187
|
present: o || n
|
|
2186
2188
|
}, /* @__PURE__ */ h(nt, y({
|
|
2187
2189
|
"data-state": n ? "visible" : "hidden"
|
|
@@ -2189,7 +2191,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2189
2191
|
ref: r
|
|
2190
2192
|
})));
|
|
2191
2193
|
}), nt = /* @__PURE__ */ w((e, r) => {
|
|
2192
|
-
const { orientation: t = "vertical", ...o } = e, a = U(
|
|
2194
|
+
const { orientation: t = "vertical", ...o } = e, a = U(Y, e.__scopeScrollArea), n = A(null), i = A(0), [c, l] = N({
|
|
2193
2195
|
content: 0,
|
|
2194
2196
|
viewport: 0,
|
|
2195
2197
|
scrollbar: {
|
|
@@ -2239,7 +2241,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2239
2241
|
}
|
|
2240
2242
|
})) : null;
|
|
2241
2243
|
}), Jo = /* @__PURE__ */ w((e, r) => {
|
|
2242
|
-
const { sizes: t, onSizesChange: o, ...a } = e, n = U(
|
|
2244
|
+
const { sizes: t, onSizesChange: o, ...a } = e, n = U(Y, e.__scopeScrollArea), [i, c] = N(), l = A(null), s = k(r, l, n.onScrollbarXChange);
|
|
2243
2245
|
return D(() => {
|
|
2244
2246
|
l.current && c(getComputedStyle(l.current));
|
|
2245
2247
|
}, [
|
|
@@ -2270,14 +2272,14 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2270
2272
|
viewport: n.viewport.offsetWidth,
|
|
2271
2273
|
scrollbar: {
|
|
2272
2274
|
size: l.current.clientWidth,
|
|
2273
|
-
paddingStart:
|
|
2274
|
-
paddingEnd:
|
|
2275
|
+
paddingStart: Pe(i.paddingLeft),
|
|
2276
|
+
paddingEnd: Pe(i.paddingRight)
|
|
2275
2277
|
}
|
|
2276
2278
|
});
|
|
2277
2279
|
}
|
|
2278
2280
|
}));
|
|
2279
2281
|
}), ea = /* @__PURE__ */ w((e, r) => {
|
|
2280
|
-
const { sizes: t, onSizesChange: o, ...a } = e, n = U(
|
|
2282
|
+
const { sizes: t, onSizesChange: o, ...a } = e, n = U(Y, e.__scopeScrollArea), [i, c] = N(), l = A(null), s = k(r, l, n.onScrollbarYChange);
|
|
2281
2283
|
return D(() => {
|
|
2282
2284
|
l.current && c(getComputedStyle(l.current));
|
|
2283
2285
|
}, [
|
|
@@ -2309,34 +2311,34 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2309
2311
|
viewport: n.viewport.offsetHeight,
|
|
2310
2312
|
scrollbar: {
|
|
2311
2313
|
size: l.current.clientHeight,
|
|
2312
|
-
paddingStart:
|
|
2313
|
-
paddingEnd:
|
|
2314
|
+
paddingStart: Pe(i.paddingTop),
|
|
2315
|
+
paddingEnd: Pe(i.paddingBottom)
|
|
2314
2316
|
}
|
|
2315
2317
|
});
|
|
2316
2318
|
}
|
|
2317
2319
|
}));
|
|
2318
|
-
}), [ta, tr] = Jt(
|
|
2319
|
-
const { __scopeScrollArea: t, sizes: o, hasThumb: a, onThumbChange: n, onThumbPointerUp: i, onThumbPointerDown: c, onThumbPositionChange: l, onDragScroll: s, onWheelScroll: u, onResize: d, ...f } = e, v = U(
|
|
2320
|
+
}), [ta, tr] = Jt(Y), rr = /* @__PURE__ */ w((e, r) => {
|
|
2321
|
+
const { __scopeScrollArea: t, sizes: o, hasThumb: a, onThumbChange: n, onThumbPointerUp: i, onThumbPointerDown: c, onThumbPositionChange: l, onDragScroll: s, onWheelScroll: u, onResize: d, ...f } = e, v = U(Y, t), [m, p] = N(null), b = k(
|
|
2320
2322
|
r,
|
|
2321
|
-
(
|
|
2322
|
-
), g = A(null),
|
|
2323
|
-
function
|
|
2323
|
+
(P) => p(P)
|
|
2324
|
+
), g = A(null), x = A(""), S = v.viewport, E = o.content - o.viewport, T = M(u), I = M(l), O = Ne(d, 10);
|
|
2325
|
+
function C(P) {
|
|
2324
2326
|
if (g.current) {
|
|
2325
|
-
const R =
|
|
2327
|
+
const R = P.clientX - g.current.left, z = P.clientY - g.current.top;
|
|
2326
2328
|
s({
|
|
2327
2329
|
x: R,
|
|
2328
|
-
y:
|
|
2330
|
+
y: z
|
|
2329
2331
|
});
|
|
2330
2332
|
}
|
|
2331
2333
|
}
|
|
2332
2334
|
return D(() => {
|
|
2333
|
-
const
|
|
2334
|
-
const
|
|
2335
|
-
(m == null ? void 0 : m.contains(
|
|
2335
|
+
const P = (R) => {
|
|
2336
|
+
const z = R.target;
|
|
2337
|
+
(m == null ? void 0 : m.contains(z)) && T(R, E);
|
|
2336
2338
|
};
|
|
2337
|
-
return document.addEventListener("wheel",
|
|
2339
|
+
return document.addEventListener("wheel", P, {
|
|
2338
2340
|
passive: !1
|
|
2339
|
-
}), () => document.removeEventListener("wheel",
|
|
2341
|
+
}), () => document.removeEventListener("wheel", P, {
|
|
2340
2342
|
passive: !1
|
|
2341
2343
|
});
|
|
2342
2344
|
}, [
|
|
@@ -2347,7 +2349,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2347
2349
|
]), D(I, [
|
|
2348
2350
|
o,
|
|
2349
2351
|
I
|
|
2350
|
-
]),
|
|
2352
|
+
]), xe(m, O), xe(v.content, O), /* @__PURE__ */ h(ta, {
|
|
2351
2353
|
scope: t,
|
|
2352
2354
|
scrollbar: m,
|
|
2353
2355
|
hasThumb: a,
|
|
@@ -2361,18 +2363,18 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2361
2363
|
position: "absolute",
|
|
2362
2364
|
...f.style
|
|
2363
2365
|
},
|
|
2364
|
-
onPointerDown: L(e.onPointerDown, (
|
|
2365
|
-
|
|
2366
|
+
onPointerDown: L(e.onPointerDown, (P) => {
|
|
2367
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), g.current = m.getBoundingClientRect(), x.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", v.viewport && (v.viewport.style.scrollBehavior = "auto"), C(P));
|
|
2366
2368
|
}),
|
|
2367
|
-
onPointerMove: L(e.onPointerMove,
|
|
2368
|
-
onPointerUp: L(e.onPointerUp, (
|
|
2369
|
-
const R =
|
|
2370
|
-
R.hasPointerCapture(
|
|
2369
|
+
onPointerMove: L(e.onPointerMove, C),
|
|
2370
|
+
onPointerUp: L(e.onPointerUp, (P) => {
|
|
2371
|
+
const R = P.target;
|
|
2372
|
+
R.hasPointerCapture(P.pointerId) && R.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = x.current, v.viewport && (v.viewport.style.scrollBehavior = ""), g.current = null;
|
|
2371
2373
|
})
|
|
2372
2374
|
})));
|
|
2373
2375
|
}), Ge = "ScrollAreaThumb", ra = /* @__PURE__ */ w((e, r) => {
|
|
2374
2376
|
const { forceMount: t, ...o } = e, a = tr(Ge, e.__scopeScrollArea);
|
|
2375
|
-
return /* @__PURE__ */ h(
|
|
2377
|
+
return /* @__PURE__ */ h(V, {
|
|
2376
2378
|
present: t || a.hasThumb
|
|
2377
2379
|
}, /* @__PURE__ */ h(na, y({
|
|
2378
2380
|
ref: r
|
|
@@ -2418,7 +2420,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2418
2420
|
onPointerUp: L(e.onPointerUp, i.onThumbPointerUp)
|
|
2419
2421
|
}));
|
|
2420
2422
|
});
|
|
2421
|
-
function
|
|
2423
|
+
function Pe(e) {
|
|
2422
2424
|
return e ? parseInt(e, 10) : 0;
|
|
2423
2425
|
}
|
|
2424
2426
|
function nr(e, r) {
|
|
@@ -2449,7 +2451,7 @@ function wt(e, r, t = "ltr") {
|
|
|
2449
2451
|
] : [
|
|
2450
2452
|
i * -1,
|
|
2451
2453
|
0
|
|
2452
|
-
], s =
|
|
2454
|
+
], s = Ho(e, l);
|
|
2453
2455
|
return or([
|
|
2454
2456
|
0,
|
|
2455
2457
|
i
|
|
@@ -2494,9 +2496,9 @@ function Ne(e, r) {
|
|
|
2494
2496
|
r
|
|
2495
2497
|
]);
|
|
2496
2498
|
}
|
|
2497
|
-
function
|
|
2499
|
+
function xe(e, r) {
|
|
2498
2500
|
const t = M(r);
|
|
2499
|
-
|
|
2501
|
+
Ce(() => {
|
|
2500
2502
|
let o = 0;
|
|
2501
2503
|
if (e) {
|
|
2502
2504
|
const a = new ResizeObserver(() => {
|
|
@@ -2511,7 +2513,7 @@ function Pe(e, r) {
|
|
|
2511
2513
|
t
|
|
2512
2514
|
]);
|
|
2513
2515
|
}
|
|
2514
|
-
const ca =
|
|
2516
|
+
const ca = Bo, ia = Ko, sa = Go, la = ra, ua = {
|
|
2515
2517
|
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1p63i_1",
|
|
2516
2518
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1p63i_4",
|
|
2517
2519
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1p63i_7",
|
|
@@ -2524,7 +2526,7 @@ const ca = Vo, ia = Ko, sa = Go, la = ra, ua = {
|
|
|
2524
2526
|
...o
|
|
2525
2527
|
}, a) => {
|
|
2526
2528
|
const n = se([t, le]);
|
|
2527
|
-
return /* @__PURE__ */ _("div", { className: n, "data-testid": e, ref: a, ...o, children: /* @__PURE__ */
|
|
2529
|
+
return /* @__PURE__ */ _("div", { className: n, "data-testid": e, ref: a, ...o, children: /* @__PURE__ */ H(ca, { className: se(`${le}__root`), children: [
|
|
2528
2530
|
/* @__PURE__ */ _(ia, { className: se(`${le}__viewport`), children: r }),
|
|
2529
2531
|
/* @__PURE__ */ _(
|
|
2530
2532
|
sa,
|
|
@@ -2538,7 +2540,7 @@ const ca = Vo, ia = Ko, sa = Go, la = ra, ua = {
|
|
|
2538
2540
|
}
|
|
2539
2541
|
);
|
|
2540
2542
|
Ze.displayName = "DrawerScrollArea";
|
|
2541
|
-
const re = Q.bind(io),
|
|
2543
|
+
const re = Q.bind(io), X = "purpur-drawer-frame", cr = w(
|
|
2542
2544
|
({
|
|
2543
2545
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2544
2546
|
backButton: r,
|
|
@@ -2558,24 +2560,24 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2558
2560
|
stickyFooter: p,
|
|
2559
2561
|
...b
|
|
2560
2562
|
}, g) => {
|
|
2561
|
-
const
|
|
2563
|
+
const x = re([
|
|
2562
2564
|
n,
|
|
2563
|
-
|
|
2565
|
+
X,
|
|
2564
2566
|
{
|
|
2565
|
-
[`${
|
|
2567
|
+
[`${X}--sticky-footer`]: p
|
|
2566
2568
|
}
|
|
2567
2569
|
]);
|
|
2568
|
-
return /* @__PURE__ */
|
|
2570
|
+
return /* @__PURE__ */ H(
|
|
2569
2571
|
"div",
|
|
2570
2572
|
{
|
|
2571
|
-
className:
|
|
2573
|
+
className: x,
|
|
2572
2574
|
"data-testid": e,
|
|
2573
2575
|
ref: g,
|
|
2574
2576
|
onAnimationEnd: l,
|
|
2575
2577
|
...b,
|
|
2576
2578
|
children: [
|
|
2577
2579
|
/* @__PURE__ */ _(
|
|
2578
|
-
|
|
2580
|
+
Ht,
|
|
2579
2581
|
{
|
|
2580
2582
|
onSwipeStart: u,
|
|
2581
2583
|
onSwipeMove: d,
|
|
@@ -2586,7 +2588,7 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2586
2588
|
/* @__PURE__ */ _(
|
|
2587
2589
|
ne,
|
|
2588
2590
|
{
|
|
2589
|
-
className: re(`${
|
|
2591
|
+
className: re(`${X}__header`),
|
|
2590
2592
|
variant: "header",
|
|
2591
2593
|
stickyFooter: p,
|
|
2592
2594
|
children: /* @__PURE__ */ _(
|
|
@@ -2602,11 +2604,11 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2602
2604
|
)
|
|
2603
2605
|
}
|
|
2604
2606
|
),
|
|
2605
|
-
p ? /* @__PURE__ */
|
|
2607
|
+
p ? /* @__PURE__ */ H(lr, { children: [
|
|
2606
2608
|
/* @__PURE__ */ _(
|
|
2607
2609
|
Ze,
|
|
2608
2610
|
{
|
|
2609
|
-
className: re(`${
|
|
2611
|
+
className: re(`${X}__body`),
|
|
2610
2612
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
2611
2613
|
children: /* @__PURE__ */ _(ne, { stickyFooter: !0, children: a })
|
|
2612
2614
|
}
|
|
@@ -2614,7 +2616,7 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2614
2616
|
c && /* @__PURE__ */ _(
|
|
2615
2617
|
ne,
|
|
2616
2618
|
{
|
|
2617
|
-
className: re(`${
|
|
2619
|
+
className: re(`${X}__footer`),
|
|
2618
2620
|
"data-testid": `${e}-sticky-footer`,
|
|
2619
2621
|
variant: "footer",
|
|
2620
2622
|
stickyFooter: p,
|
|
@@ -2624,14 +2626,14 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2624
2626
|
] }) : /* @__PURE__ */ _(
|
|
2625
2627
|
Ze,
|
|
2626
2628
|
{
|
|
2627
|
-
className: re(`${
|
|
2629
|
+
className: re(`${X}__body`),
|
|
2628
2630
|
"data-testid": `${e}-scroll-area`,
|
|
2629
|
-
children: /* @__PURE__ */
|
|
2631
|
+
children: /* @__PURE__ */ H(
|
|
2630
2632
|
"div",
|
|
2631
2633
|
{
|
|
2632
2634
|
className: re([
|
|
2633
|
-
`${
|
|
2634
|
-
{ [`${
|
|
2635
|
+
`${X}__content-container`,
|
|
2636
|
+
{ [`${X}__content-container--no-footer`]: !c }
|
|
2635
2637
|
]),
|
|
2636
2638
|
children: [
|
|
2637
2639
|
/* @__PURE__ */ _(ne, { stickyFooter: p, children: a }),
|
|
@@ -2695,19 +2697,19 @@ const da = (e, r) => ({
|
|
|
2695
2697
|
zIndex: v,
|
|
2696
2698
|
...m
|
|
2697
2699
|
}, p) => {
|
|
2698
|
-
const b = ue([i, $e]), g = A(null),
|
|
2699
|
-
l &&
|
|
2700
|
+
const b = ue([i, $e]), g = A(null), x = Te(qt), { onAnimationEnd: S, onSwipeStart: E, onSwipeMove: T, onSwipeCancel: I, onSwipeEnd: O } = da(g, x), C = (P) => {
|
|
2701
|
+
l && P.preventDefault();
|
|
2700
2702
|
};
|
|
2701
|
-
return /* @__PURE__ */ _(
|
|
2702
|
-
|
|
2703
|
+
return /* @__PURE__ */ _(Xn, { children: /* @__PURE__ */ _(
|
|
2704
|
+
Bn,
|
|
2703
2705
|
{
|
|
2704
2706
|
className: ue("purpur-drawer-overlay"),
|
|
2705
2707
|
style: v ? { zIndex: v } : void 0,
|
|
2706
2708
|
"data-testid": `${e}-overlay`,
|
|
2707
2709
|
children: /* @__PURE__ */ _(
|
|
2708
|
-
|
|
2710
|
+
Vn,
|
|
2709
2711
|
{
|
|
2710
|
-
onPointerDownOutside:
|
|
2712
|
+
onPointerDownOutside: C,
|
|
2711
2713
|
className: b,
|
|
2712
2714
|
"data-testid": e,
|
|
2713
2715
|
ref: p,
|
|
@@ -2730,7 +2732,7 @@ const da = (e, r) => ({
|
|
|
2730
2732
|
onSwipeEnd: O,
|
|
2731
2733
|
stickyFooter: d,
|
|
2732
2734
|
title: f,
|
|
2733
|
-
children: a ? /* @__PURE__ */
|
|
2735
|
+
children: a ? /* @__PURE__ */ H("div", { className: ue(`${$e}__content-container`), children: [
|
|
2734
2736
|
/* @__PURE__ */ _(
|
|
2735
2737
|
Kn,
|
|
2736
2738
|
{
|
|
@@ -2757,7 +2759,7 @@ const sr = w(
|
|
|
2757
2759
|
className: t,
|
|
2758
2760
|
...o
|
|
2759
2761
|
}, a) => /* @__PURE__ */ _(
|
|
2760
|
-
|
|
2762
|
+
Yn,
|
|
2761
2763
|
{
|
|
2762
2764
|
asChild: !0,
|
|
2763
2765
|
className: t,
|
|
@@ -2782,7 +2784,7 @@ const fa = Q.bind(Jn), pa = "purpur-drawer", ot = ({
|
|
|
2782
2784
|
};
|
|
2783
2785
|
return D(() => {
|
|
2784
2786
|
c(a);
|
|
2785
|
-
}, [a]), /* @__PURE__ */ _(
|
|
2787
|
+
}, [a]), /* @__PURE__ */ _(qt.Provider, { value: s, children: /* @__PURE__ */ _("div", { className: l, "data-testid": e, ...n, children: /* @__PURE__ */ _(Hn, { open: i, onOpenChange: s, children: r }) }) });
|
|
2786
2788
|
};
|
|
2787
2789
|
ot.Trigger = sr;
|
|
2788
2790
|
ot.Content = ir;
|