@purpurds/drawer 8.19.0 → 8.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +5 -5
- package/dist/drawer.cjs.js +8 -8
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +262 -259
- package/dist/drawer.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -9
package/dist/drawer.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as f, jsxs as A, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import
|
|
3
|
+
import We, { 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
|
-
function
|
|
6
|
+
function x(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
8
|
if (e?.(a), r === !1 || !a.defaultPrevented)
|
|
9
9
|
return t?.(a);
|
|
@@ -30,7 +30,7 @@ function At(...e) {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function L(...e) {
|
|
34
34
|
return c.useCallback(At(...e), e);
|
|
35
35
|
}
|
|
36
36
|
function Fr(e, t) {
|
|
@@ -98,7 +98,7 @@ function jr(...e) {
|
|
|
98
98
|
var ne = globalThis?.document ? c.useLayoutEffect : () => {
|
|
99
99
|
}, Ur = c[" useId ".trim().toString()] || (() => {
|
|
100
100
|
}), Br = 0;
|
|
101
|
-
function
|
|
101
|
+
function Ne(e) {
|
|
102
102
|
const [t, r] = c.useState(Ur());
|
|
103
103
|
return ne(() => {
|
|
104
104
|
r((o) => o ?? String(Br++));
|
|
@@ -175,7 +175,7 @@ function Xr(e) {
|
|
|
175
175
|
});
|
|
176
176
|
return t.displayName = `${e}.SlotClone`, t;
|
|
177
177
|
}
|
|
178
|
-
var qr = Symbol("radix.slottable");
|
|
178
|
+
var qr = /* @__PURE__ */ Symbol("radix.slottable");
|
|
179
179
|
function Kr(e) {
|
|
180
180
|
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === qr;
|
|
181
181
|
}
|
|
@@ -215,21 +215,21 @@ var Qr = [
|
|
|
215
215
|
], O = Qr.reduce((e, t) => {
|
|
216
216
|
const r = /* @__PURE__ */ Tt(`Primitive.${t}`), o = c.forwardRef((a, n) => {
|
|
217
217
|
const { asChild: s, ...i } = a, u = s ? r : t;
|
|
218
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: n });
|
|
218
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: n });
|
|
219
219
|
});
|
|
220
220
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
221
221
|
}, {});
|
|
222
222
|
function Jr(e, t) {
|
|
223
223
|
e && kr.flushSync(() => e.dispatchEvent(t));
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function M(e) {
|
|
226
226
|
const t = c.useRef(e);
|
|
227
227
|
return c.useEffect(() => {
|
|
228
228
|
t.current = e;
|
|
229
229
|
}), c.useMemo(() => (...r) => t.current?.(...r), []);
|
|
230
230
|
}
|
|
231
231
|
function en(e, t = globalThis?.document) {
|
|
232
|
-
const r =
|
|
232
|
+
const r = M(e);
|
|
233
233
|
c.useEffect(() => {
|
|
234
234
|
const o = (a) => {
|
|
235
235
|
a.key === "Escape" && r(a);
|
|
@@ -237,7 +237,7 @@ function en(e, t = globalThis?.document) {
|
|
|
237
237
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
238
238
|
}, [r, t]);
|
|
239
239
|
}
|
|
240
|
-
var tn = "DismissableLayer",
|
|
240
|
+
var tn = "DismissableLayer", Fe = "dismissableLayer.update", rn = "dismissableLayer.pointerDownOutside", nn = "dismissableLayer.focusOutside", tt, $t = c.createContext({
|
|
241
241
|
layers: /* @__PURE__ */ new Set(),
|
|
242
242
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
243
243
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -251,12 +251,12 @@ var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLa
|
|
|
251
251
|
onInteractOutside: s,
|
|
252
252
|
onDismiss: i,
|
|
253
253
|
...u
|
|
254
|
-
} = e, l = c.useContext($t), [d, p] = c.useState(null), h = d?.ownerDocument ?? globalThis?.document, [, m] = c.useState({}), _ =
|
|
255
|
-
const
|
|
254
|
+
} = e, l = c.useContext($t), [d, p] = c.useState(null), h = d?.ownerDocument ?? globalThis?.document, [, m] = c.useState({}), _ = L(t, (S) => p(S)), v = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = v.indexOf(g), b = d ? v.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, w = b >= y, C = sn((S) => {
|
|
255
|
+
const D = S.target, P = [...l.branches].some((N) => N.contains(D));
|
|
256
256
|
!w || P || (a?.(S), s?.(S), S.defaultPrevented || i?.());
|
|
257
257
|
}, h), R = cn((S) => {
|
|
258
|
-
const
|
|
259
|
-
[...l.branches].some((N) => N.contains(
|
|
258
|
+
const D = S.target;
|
|
259
|
+
[...l.branches].some((N) => N.contains(D)) || (n?.(S), s?.(S), S.defaultPrevented || i?.());
|
|
260
260
|
}, h);
|
|
261
261
|
return en((S) => {
|
|
262
262
|
b === l.layers.size - 1 && (o?.(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
@@ -269,7 +269,7 @@ var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLa
|
|
|
269
269
|
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), rt());
|
|
270
270
|
}, [d, l]), c.useEffect(() => {
|
|
271
271
|
const S = () => m({});
|
|
272
|
-
return document.addEventListener(
|
|
272
|
+
return document.addEventListener(Fe, S), () => document.removeEventListener(Fe, S);
|
|
273
273
|
}, []), /* @__PURE__ */ f(
|
|
274
274
|
O.div,
|
|
275
275
|
{
|
|
@@ -279,9 +279,9 @@ var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLa
|
|
|
279
279
|
pointerEvents: E ? w ? "auto" : "none" : void 0,
|
|
280
280
|
...e.style
|
|
281
281
|
},
|
|
282
|
-
onFocusCapture:
|
|
283
|
-
onBlurCapture:
|
|
284
|
-
onPointerDownCapture:
|
|
282
|
+
onFocusCapture: x(e.onFocusCapture, R.onFocusCapture),
|
|
283
|
+
onBlurCapture: x(e.onBlurCapture, R.onBlurCapture),
|
|
284
|
+
onPointerDownCapture: x(
|
|
285
285
|
e.onPointerDownCapture,
|
|
286
286
|
C.onPointerDownCapture
|
|
287
287
|
)
|
|
@@ -291,7 +291,7 @@ var tn = "DismissableLayer", We = "dismissableLayer.update", rn = "dismissableLa
|
|
|
291
291
|
);
|
|
292
292
|
Lt.displayName = tn;
|
|
293
293
|
var on = "DismissableLayerBranch", an = c.forwardRef((e, t) => {
|
|
294
|
-
const r = c.useContext($t), o = c.useRef(null), a =
|
|
294
|
+
const r = c.useContext($t), o = c.useRef(null), a = L(t, o);
|
|
295
295
|
return c.useEffect(() => {
|
|
296
296
|
const n = o.current;
|
|
297
297
|
if (n)
|
|
@@ -302,7 +302,7 @@ var on = "DismissableLayerBranch", an = c.forwardRef((e, t) => {
|
|
|
302
302
|
});
|
|
303
303
|
an.displayName = on;
|
|
304
304
|
function sn(e, t = globalThis?.document) {
|
|
305
|
-
const r =
|
|
305
|
+
const r = M(e), o = c.useRef(!1), a = c.useRef(() => {
|
|
306
306
|
});
|
|
307
307
|
return c.useEffect(() => {
|
|
308
308
|
const n = (i) => {
|
|
@@ -332,7 +332,7 @@ function sn(e, t = globalThis?.document) {
|
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
function cn(e, t = globalThis?.document) {
|
|
335
|
-
const r =
|
|
335
|
+
const r = M(e), o = c.useRef(!1);
|
|
336
336
|
return c.useEffect(() => {
|
|
337
337
|
const a = (n) => {
|
|
338
338
|
n.target && !o.current && Mt(nn, r, { originalEvent: n }, {
|
|
@@ -346,21 +346,21 @@ function cn(e, t = globalThis?.document) {
|
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
348
|
function rt() {
|
|
349
|
-
const e = new CustomEvent(
|
|
349
|
+
const e = new CustomEvent(Fe);
|
|
350
350
|
document.dispatchEvent(e);
|
|
351
351
|
}
|
|
352
352
|
function Mt(e, t, r, { discrete: o }) {
|
|
353
353
|
const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
|
|
354
354
|
t && a.addEventListener(e, t, { once: !0 }), o ? Jr(a, n) : a.dispatchEvent(n);
|
|
355
355
|
}
|
|
356
|
-
var
|
|
356
|
+
var xe = "focusScope.autoFocusOnMount", De = "focusScope.autoFocusOnUnmount", nt = { bubbles: !1, cancelable: !0 }, ln = "FocusScope", It = c.forwardRef((e, t) => {
|
|
357
357
|
const {
|
|
358
358
|
loop: r = !1,
|
|
359
359
|
trapped: o = !1,
|
|
360
360
|
onMountAutoFocus: a,
|
|
361
361
|
onUnmountAutoFocus: n,
|
|
362
362
|
...s
|
|
363
|
-
} = e, [i, u] = c.useState(null), l =
|
|
363
|
+
} = e, [i, u] = c.useState(null), l = M(a), d = M(n), p = c.useRef(null), h = L(t, (v) => u(v)), m = c.useRef({
|
|
364
364
|
paused: !1,
|
|
365
365
|
pause() {
|
|
366
366
|
this.paused = !0;
|
|
@@ -395,13 +395,13 @@ var Ne = "focusScope.autoFocusOnMount", xe = "focusScope.autoFocusOnUnmount", nt
|
|
|
395
395
|
at.add(m);
|
|
396
396
|
const v = document.activeElement;
|
|
397
397
|
if (!i.contains(v)) {
|
|
398
|
-
const y = new CustomEvent(
|
|
399
|
-
i.addEventListener(
|
|
398
|
+
const y = new CustomEvent(xe, nt);
|
|
399
|
+
i.addEventListener(xe, l), i.dispatchEvent(y), y.defaultPrevented || (un(vn(kt(i)), { select: !0 }), document.activeElement === v && H(i));
|
|
400
400
|
}
|
|
401
401
|
return () => {
|
|
402
|
-
i.removeEventListener(
|
|
403
|
-
const y = new CustomEvent(
|
|
404
|
-
i.addEventListener(
|
|
402
|
+
i.removeEventListener(xe, l), setTimeout(() => {
|
|
403
|
+
const y = new CustomEvent(De, nt);
|
|
404
|
+
i.addEventListener(De, d), i.dispatchEvent(y), y.defaultPrevented || H(v ?? document.body, { select: !0 }), i.removeEventListener(De, d), at.remove(m);
|
|
405
405
|
}, 0);
|
|
406
406
|
};
|
|
407
407
|
}
|
|
@@ -492,7 +492,7 @@ function gn(e, t) {
|
|
|
492
492
|
return c.useReducer((r, o) => t[r][o] ?? r, e);
|
|
493
493
|
}
|
|
494
494
|
var V = (e) => {
|
|
495
|
-
const { present: t, children: r } = e, o = _n(t), a = typeof r == "function" ? r({ present: o.isPresent }) : c.Children.only(r), n =
|
|
495
|
+
const { present: t, children: r } = e, o = _n(t), a = typeof r == "function" ? r({ present: o.isPresent }) : c.Children.only(r), n = L(o.ref, yn(a));
|
|
496
496
|
return typeof r == "function" || o.isPresent ? c.cloneElement(a, { ref: n }) : null;
|
|
497
497
|
};
|
|
498
498
|
V.displayName = "Presence";
|
|
@@ -511,19 +511,19 @@ function _n(e) {
|
|
|
511
511
|
}
|
|
512
512
|
});
|
|
513
513
|
return c.useEffect(() => {
|
|
514
|
-
const l =
|
|
514
|
+
const l = ue(o.current);
|
|
515
515
|
n.current = i === "mounted" ? l : "none";
|
|
516
516
|
}, [i]), ne(() => {
|
|
517
517
|
const l = o.current, d = a.current;
|
|
518
518
|
if (d !== e) {
|
|
519
|
-
const h = n.current, m =
|
|
519
|
+
const h = n.current, m = ue(l);
|
|
520
520
|
e ? u("MOUNT") : m === "none" || l?.display === "none" ? u("UNMOUNT") : u(d && h !== m ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
521
521
|
}
|
|
522
522
|
}, [e, u]), ne(() => {
|
|
523
523
|
if (t) {
|
|
524
524
|
let l;
|
|
525
525
|
const d = t.ownerDocument.defaultView ?? window, p = (m) => {
|
|
526
|
-
const v =
|
|
526
|
+
const v = ue(o.current).includes(CSS.escape(m.animationName));
|
|
527
527
|
if (m.target === t && v && (u("ANIMATION_END"), !a.current)) {
|
|
528
528
|
const g = t.style.animationFillMode;
|
|
529
529
|
t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
@@ -531,7 +531,7 @@ function _n(e) {
|
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
}, h = (m) => {
|
|
534
|
-
m.target === t && (n.current =
|
|
534
|
+
m.target === t && (n.current = ue(o.current));
|
|
535
535
|
};
|
|
536
536
|
return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
|
|
537
537
|
d.clearTimeout(l), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
|
|
@@ -545,19 +545,19 @@ function _n(e) {
|
|
|
545
545
|
}, [])
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function ue(e) {
|
|
549
549
|
return e?.animationName || "none";
|
|
550
550
|
}
|
|
551
551
|
function yn(e) {
|
|
552
552
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
553
553
|
return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
554
554
|
}
|
|
555
|
-
var
|
|
555
|
+
var Ae = 0;
|
|
556
556
|
function bn() {
|
|
557
557
|
c.useEffect(() => {
|
|
558
558
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
559
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? st()), document.body.insertAdjacentElement("beforeend", e[1] ?? st()),
|
|
560
|
-
|
|
559
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? st()), document.body.insertAdjacentElement("beforeend", e[1] ?? st()), Ae++, () => {
|
|
560
|
+
Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ae--;
|
|
561
561
|
};
|
|
562
562
|
}, []);
|
|
563
563
|
}
|
|
@@ -565,14 +565,14 @@ function st() {
|
|
|
565
565
|
const e = document.createElement("span");
|
|
566
566
|
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;
|
|
567
567
|
}
|
|
568
|
-
var
|
|
569
|
-
return
|
|
568
|
+
var W = function() {
|
|
569
|
+
return W = Object.assign || function(t) {
|
|
570
570
|
for (var r, o = 1, a = arguments.length; o < a; o++) {
|
|
571
571
|
r = arguments[o];
|
|
572
572
|
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
573
573
|
}
|
|
574
574
|
return t;
|
|
575
|
-
},
|
|
575
|
+
}, W.apply(this, arguments);
|
|
576
576
|
};
|
|
577
577
|
function Ft(e, t) {
|
|
578
578
|
var r = {};
|
|
@@ -587,8 +587,8 @@ function wn(e, t, r) {
|
|
|
587
587
|
(n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
|
|
588
588
|
return e.concat(n || Array.prototype.slice.call(t));
|
|
589
589
|
}
|
|
590
|
-
var
|
|
591
|
-
function
|
|
590
|
+
var _e = "right-scroll-bar-position", ye = "width-before-scroll-bar", Sn = "with-scroll-bars-hidden", En = "--removed-body-scroll-bar-size";
|
|
591
|
+
function Oe(e, t) {
|
|
592
592
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
593
593
|
}
|
|
594
594
|
function Cn(e, t) {
|
|
@@ -616,7 +616,7 @@ var Pn = typeof window < "u" ? c.useLayoutEffect : c.useEffect, ct = /* @__PURE_
|
|
|
616
616
|
function Rn(e, t) {
|
|
617
617
|
var r = Cn(null, function(o) {
|
|
618
618
|
return e.forEach(function(a) {
|
|
619
|
-
return
|
|
619
|
+
return Oe(a, o);
|
|
620
620
|
});
|
|
621
621
|
});
|
|
622
622
|
return Pn(function() {
|
|
@@ -624,9 +624,9 @@ function Rn(e, t) {
|
|
|
624
624
|
if (o) {
|
|
625
625
|
var a = new Set(o), n = new Set(e), s = r.current;
|
|
626
626
|
a.forEach(function(i) {
|
|
627
|
-
n.has(i) ||
|
|
627
|
+
n.has(i) || Oe(i, null);
|
|
628
628
|
}), n.forEach(function(i) {
|
|
629
|
-
a.has(i) ||
|
|
629
|
+
a.has(i) || Oe(i, s);
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
632
|
ct.set(r, e);
|
|
@@ -693,7 +693,7 @@ function xn(e, t) {
|
|
|
693
693
|
function Dn(e) {
|
|
694
694
|
e === void 0 && (e = {});
|
|
695
695
|
var t = xn(null);
|
|
696
|
-
return t.options =
|
|
696
|
+
return t.options = W({ async: !0, ssr: !1 }, e), t;
|
|
697
697
|
}
|
|
698
698
|
var jt = function(e) {
|
|
699
699
|
var t = e.sideCar, r = Ft(e, ["sideCar"]);
|
|
@@ -702,34 +702,34 @@ var jt = function(e) {
|
|
|
702
702
|
var o = t.read();
|
|
703
703
|
if (!o)
|
|
704
704
|
throw new Error("Sidecar medium not found");
|
|
705
|
-
return c.createElement(o,
|
|
705
|
+
return c.createElement(o, W({}, r));
|
|
706
706
|
};
|
|
707
707
|
jt.isSideCarExport = !0;
|
|
708
708
|
function An(e, t) {
|
|
709
709
|
return e.useMedium(t), jt;
|
|
710
710
|
}
|
|
711
|
-
var Ut = Dn(),
|
|
712
|
-
},
|
|
711
|
+
var Ut = Dn(), Te = function() {
|
|
712
|
+
}, Ee = c.forwardRef(function(e, t) {
|
|
713
713
|
var r = c.useRef(null), o = c.useState({
|
|
714
|
-
onScrollCapture:
|
|
715
|
-
onWheelCapture:
|
|
716
|
-
onTouchMoveCapture:
|
|
717
|
-
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, m = e.noRelative, _ = e.noIsolation, v = e.inert, g = e.allowPinchZoom, y = e.as, b = y === void 0 ? "div" : y, E = e.gapMode, w = Ft(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, R = Rn([r, t]), S =
|
|
714
|
+
onScrollCapture: Te,
|
|
715
|
+
onWheelCapture: Te,
|
|
716
|
+
onTouchMoveCapture: Te
|
|
717
|
+
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, m = e.noRelative, _ = e.noIsolation, v = e.inert, g = e.allowPinchZoom, y = e.as, b = y === void 0 ? "div" : y, E = e.gapMode, w = Ft(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, R = Rn([r, t]), S = W(W({}, w), a);
|
|
718
718
|
return c.createElement(
|
|
719
719
|
c.Fragment,
|
|
720
720
|
null,
|
|
721
721
|
d && c.createElement(C, { sideCar: Ut, removeScrollBar: l, shards: p, noRelative: m, noIsolation: _, inert: v, setCallbacks: n, allowPinchZoom: !!g, lockRef: r, gapMode: E }),
|
|
722
|
-
s ? c.cloneElement(c.Children.only(i),
|
|
722
|
+
s ? c.cloneElement(c.Children.only(i), W(W({}, S), { ref: R })) : c.createElement(b, W({}, S, { className: u, ref: R }), i)
|
|
723
723
|
);
|
|
724
724
|
});
|
|
725
|
-
|
|
725
|
+
Ee.defaultProps = {
|
|
726
726
|
enabled: !0,
|
|
727
727
|
removeScrollBar: !0,
|
|
728
728
|
inert: !1
|
|
729
729
|
};
|
|
730
|
-
|
|
731
|
-
fullWidth:
|
|
732
|
-
zeroRight:
|
|
730
|
+
Ee.classNames = {
|
|
731
|
+
fullWidth: ye,
|
|
732
|
+
zeroRight: _e
|
|
733
733
|
};
|
|
734
734
|
var On = function() {
|
|
735
735
|
if (typeof __webpack_nonce__ < "u")
|
|
@@ -780,11 +780,11 @@ var Mn = function() {
|
|
|
780
780
|
top: 0,
|
|
781
781
|
right: 0,
|
|
782
782
|
gap: 0
|
|
783
|
-
},
|
|
783
|
+
}, $e = function(e) {
|
|
784
784
|
return parseInt(e || "", 10) || 0;
|
|
785
785
|
}, Wn = function(e) {
|
|
786
786
|
var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
787
|
-
return [
|
|
787
|
+
return [$e(r), $e(o), $e(a)];
|
|
788
788
|
}, Fn = function(e) {
|
|
789
789
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
790
790
|
return kn;
|
|
@@ -819,19 +819,19 @@ var Mn = function() {
|
|
|
819
819
|
].filter(Boolean).join(""), `
|
|
820
820
|
}
|
|
821
821
|
|
|
822
|
-
.`).concat(
|
|
822
|
+
.`).concat(_e, ` {
|
|
823
823
|
right: `).concat(i, "px ").concat(o, `;
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
.`).concat(
|
|
826
|
+
.`).concat(ye, ` {
|
|
827
827
|
margin-right: `).concat(i, "px ").concat(o, `;
|
|
828
828
|
}
|
|
829
829
|
|
|
830
|
-
.`).concat(
|
|
830
|
+
.`).concat(_e, " .").concat(_e, ` {
|
|
831
831
|
right: 0 `).concat(o, `;
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
.`).concat(
|
|
834
|
+
.`).concat(ye, " .").concat(ye, ` {
|
|
835
835
|
margin-right: 0 `).concat(o, `;
|
|
836
836
|
}
|
|
837
837
|
|
|
@@ -856,19 +856,19 @@ var Mn = function() {
|
|
|
856
856
|
return Fn(a);
|
|
857
857
|
}, [a]);
|
|
858
858
|
return c.createElement(jn, { styles: Un(n, !t, a, r ? "" : "!important") });
|
|
859
|
-
},
|
|
859
|
+
}, je = !1;
|
|
860
860
|
if (typeof window < "u")
|
|
861
861
|
try {
|
|
862
|
-
var
|
|
862
|
+
var de = Object.defineProperty({}, "passive", {
|
|
863
863
|
get: function() {
|
|
864
|
-
return
|
|
864
|
+
return je = !0, !0;
|
|
865
865
|
}
|
|
866
866
|
});
|
|
867
|
-
window.addEventListener("test",
|
|
867
|
+
window.addEventListener("test", de, de), window.removeEventListener("test", de, de);
|
|
868
868
|
} catch {
|
|
869
|
-
|
|
869
|
+
je = !1;
|
|
870
870
|
}
|
|
871
|
-
var q =
|
|
871
|
+
var q = je ? { passive: !1 } : !1, Yn = function(e) {
|
|
872
872
|
return e.tagName === "TEXTAREA";
|
|
873
873
|
}, Ht = function(e, t) {
|
|
874
874
|
if (!(e instanceof Element))
|
|
@@ -931,7 +931,7 @@ var q = Fe ? { passive: !1 } : !1, Yn = function(e) {
|
|
|
931
931
|
u && (t.contains(i) || t === i)
|
|
932
932
|
);
|
|
933
933
|
return (d && Math.abs(p) < 1 || !d && Math.abs(h) < 1) && (l = !0), l;
|
|
934
|
-
},
|
|
934
|
+
}, fe = function(e) {
|
|
935
935
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
936
936
|
}, dt = function(e) {
|
|
937
937
|
return [e.deltaX, e.deltaY];
|
|
@@ -965,22 +965,25 @@ function eo(e) {
|
|
|
965
965
|
var i = c.useCallback(function(v, g) {
|
|
966
966
|
if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
|
|
967
967
|
return !s.current.allowPinchZoom;
|
|
968
|
-
var y =
|
|
968
|
+
var y = fe(v), b = r.current, E = "deltaX" in v ? v.deltaX : b[0] - y[0], w = "deltaY" in v ? v.deltaY : b[1] - y[1], C, R = v.target, S = Math.abs(E) > Math.abs(w) ? "h" : "v";
|
|
969
969
|
if ("touches" in v && S === "h" && R.type === "range")
|
|
970
970
|
return !1;
|
|
971
|
-
var
|
|
972
|
-
if (
|
|
971
|
+
var D = window.getSelection(), P = D && D.anchorNode, N = P ? P === R || P.contains(R) : !1;
|
|
972
|
+
if (N)
|
|
973
|
+
return !1;
|
|
974
|
+
var T = ut(S, R);
|
|
975
|
+
if (!T)
|
|
973
976
|
return !0;
|
|
974
|
-
if (
|
|
977
|
+
if (T ? C = S : (C = S === "v" ? "h" : "v", T = ut(S, R)), !T)
|
|
975
978
|
return !1;
|
|
976
979
|
if (!o.current && "changedTouches" in v && (E || w) && (o.current = C), !C)
|
|
977
980
|
return !0;
|
|
978
|
-
var
|
|
979
|
-
return Gn(
|
|
981
|
+
var ie = o.current || C;
|
|
982
|
+
return Gn(ie, g, v, ie === "h" ? E : w);
|
|
980
983
|
}, []), u = c.useCallback(function(v) {
|
|
981
984
|
var g = v;
|
|
982
985
|
if (!(!K.length || K[K.length - 1] !== n)) {
|
|
983
|
-
var y = "deltaY" in g ? dt(g) :
|
|
986
|
+
var y = "deltaY" in g ? dt(g) : fe(g), b = t.current.filter(function(C) {
|
|
984
987
|
return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && Zn(C.delta, y);
|
|
985
988
|
})[0];
|
|
986
989
|
if (b && b.should) {
|
|
@@ -1002,11 +1005,11 @@ function eo(e) {
|
|
|
1002
1005
|
});
|
|
1003
1006
|
}, 1);
|
|
1004
1007
|
}, []), d = c.useCallback(function(v) {
|
|
1005
|
-
r.current =
|
|
1008
|
+
r.current = fe(v), o.current = void 0;
|
|
1006
1009
|
}, []), p = c.useCallback(function(v) {
|
|
1007
1010
|
l(v.type, dt(v), v.target, i(v, e.lockRef.current));
|
|
1008
1011
|
}, []), h = c.useCallback(function(v) {
|
|
1009
|
-
l(v.type,
|
|
1012
|
+
l(v.type, fe(v), v.target, i(v, e.lockRef.current));
|
|
1010
1013
|
}, []);
|
|
1011
1014
|
c.useEffect(function() {
|
|
1012
1015
|
return K.push(n), e.setCallbacks({
|
|
@@ -1034,15 +1037,15 @@ function to(e) {
|
|
|
1034
1037
|
}
|
|
1035
1038
|
const ro = An(Ut, eo);
|
|
1036
1039
|
var zt = c.forwardRef(function(e, t) {
|
|
1037
|
-
return c.createElement(
|
|
1040
|
+
return c.createElement(Ee, W({}, e, { ref: t, sideCar: ro }));
|
|
1038
1041
|
});
|
|
1039
|
-
zt.classNames =
|
|
1042
|
+
zt.classNames = Ee.classNames;
|
|
1040
1043
|
var no = function(e) {
|
|
1041
1044
|
if (typeof document > "u")
|
|
1042
1045
|
return null;
|
|
1043
1046
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1044
1047
|
return t.ownerDocument.body;
|
|
1045
|
-
}, G = /* @__PURE__ */ new WeakMap(),
|
|
1048
|
+
}, G = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), he = {}, Le = 0, Xt = function(e) {
|
|
1046
1049
|
return e && (e.host || Xt(e.parentNode));
|
|
1047
1050
|
}, oo = function(e, t) {
|
|
1048
1051
|
return t.map(function(r) {
|
|
@@ -1055,8 +1058,8 @@ var no = function(e) {
|
|
|
1055
1058
|
});
|
|
1056
1059
|
}, ao = function(e, t, r, o) {
|
|
1057
1060
|
var a = oo(t, Array.isArray(e) ? e : [e]);
|
|
1058
|
-
|
|
1059
|
-
var n =
|
|
1061
|
+
he[r] || (he[r] = /* @__PURE__ */ new WeakMap());
|
|
1062
|
+
var n = he[r], s = [], i = /* @__PURE__ */ new Set(), u = new Set(a), l = function(p) {
|
|
1060
1063
|
!p || i.has(p) || (i.add(p), l(p.parentNode));
|
|
1061
1064
|
};
|
|
1062
1065
|
a.forEach(l);
|
|
@@ -1067,17 +1070,17 @@ var no = function(e) {
|
|
|
1067
1070
|
else
|
|
1068
1071
|
try {
|
|
1069
1072
|
var m = h.getAttribute(o), _ = m !== null && m !== "false", v = (G.get(h) || 0) + 1, g = (n.get(h) || 0) + 1;
|
|
1070
|
-
G.set(h, v), n.set(h, g), s.push(h), v === 1 && _ &&
|
|
1073
|
+
G.set(h, v), n.set(h, g), s.push(h), v === 1 && _ && pe.set(h, !0), g === 1 && h.setAttribute(r, "true"), _ || h.setAttribute(o, "true");
|
|
1071
1074
|
} catch (y) {
|
|
1072
1075
|
console.error("aria-hidden: cannot operate on ", h, y);
|
|
1073
1076
|
}
|
|
1074
1077
|
});
|
|
1075
1078
|
};
|
|
1076
|
-
return d(t), i.clear(),
|
|
1079
|
+
return d(t), i.clear(), Le++, function() {
|
|
1077
1080
|
s.forEach(function(p) {
|
|
1078
1081
|
var h = G.get(p) - 1, m = n.get(p) - 1;
|
|
1079
|
-
G.set(p, h), n.set(p, m), h || (
|
|
1080
|
-
}),
|
|
1082
|
+
G.set(p, h), n.set(p, m), h || (pe.has(p) || p.removeAttribute(o), pe.delete(p)), m || p.removeAttribute(r);
|
|
1083
|
+
}), Le--, Le || (G = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), he = {});
|
|
1081
1084
|
};
|
|
1082
1085
|
}, io = function(e, t, r) {
|
|
1083
1086
|
r === void 0 && (r = "data-aria-hidden");
|
|
@@ -1085,7 +1088,7 @@ var no = function(e) {
|
|
|
1085
1088
|
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))), ao(o, a, r, "aria-hidden")) : function() {
|
|
1086
1089
|
return null;
|
|
1087
1090
|
};
|
|
1088
|
-
},
|
|
1091
|
+
}, Ce = "Dialog", [qt] = Ot(Ce), [so, k] = qt(Ce), Kt = (e) => {
|
|
1089
1092
|
const {
|
|
1090
1093
|
__scopeDialog: t,
|
|
1091
1094
|
children: r,
|
|
@@ -1097,7 +1100,7 @@ var no = function(e) {
|
|
|
1097
1100
|
prop: o,
|
|
1098
1101
|
defaultProp: a ?? !1,
|
|
1099
1102
|
onChange: n,
|
|
1100
|
-
caller:
|
|
1103
|
+
caller: Ce
|
|
1101
1104
|
});
|
|
1102
1105
|
return /* @__PURE__ */ f(
|
|
1103
1106
|
so,
|
|
@@ -1105,9 +1108,9 @@ var no = function(e) {
|
|
|
1105
1108
|
scope: t,
|
|
1106
1109
|
triggerRef: i,
|
|
1107
1110
|
contentRef: u,
|
|
1108
|
-
contentId:
|
|
1109
|
-
titleId:
|
|
1110
|
-
descriptionId:
|
|
1111
|
+
contentId: Ne(),
|
|
1112
|
+
titleId: Ne(),
|
|
1113
|
+
descriptionId: Ne(),
|
|
1111
1114
|
open: l,
|
|
1112
1115
|
onOpenChange: d,
|
|
1113
1116
|
onOpenToggle: c.useCallback(() => d((p) => !p), [d]),
|
|
@@ -1116,10 +1119,10 @@ var no = function(e) {
|
|
|
1116
1119
|
}
|
|
1117
1120
|
);
|
|
1118
1121
|
};
|
|
1119
|
-
Kt.displayName =
|
|
1122
|
+
Kt.displayName = Ce;
|
|
1120
1123
|
var Gt = "DialogTrigger", Zt = c.forwardRef(
|
|
1121
1124
|
(e, t) => {
|
|
1122
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1125
|
+
const { __scopeDialog: r, ...o } = e, a = k(Gt, r), n = L(t, a.triggerRef);
|
|
1123
1126
|
return /* @__PURE__ */ f(
|
|
1124
1127
|
O.button,
|
|
1125
1128
|
{
|
|
@@ -1127,39 +1130,39 @@ var Gt = "DialogTrigger", Zt = c.forwardRef(
|
|
|
1127
1130
|
"aria-haspopup": "dialog",
|
|
1128
1131
|
"aria-expanded": a.open,
|
|
1129
1132
|
"aria-controls": a.contentId,
|
|
1130
|
-
"data-state":
|
|
1133
|
+
"data-state": ze(a.open),
|
|
1131
1134
|
...o,
|
|
1132
1135
|
ref: n,
|
|
1133
|
-
onClick:
|
|
1136
|
+
onClick: x(e.onClick, a.onOpenToggle)
|
|
1134
1137
|
}
|
|
1135
1138
|
);
|
|
1136
1139
|
}
|
|
1137
1140
|
);
|
|
1138
1141
|
Zt.displayName = Gt;
|
|
1139
|
-
var
|
|
1142
|
+
var Ye = "DialogPortal", [co, Qt] = qt(Ye, {
|
|
1140
1143
|
forceMount: void 0
|
|
1141
1144
|
}), Jt = (e) => {
|
|
1142
|
-
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n =
|
|
1145
|
+
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = k(Ye, t);
|
|
1143
1146
|
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 }) })) });
|
|
1144
1147
|
};
|
|
1145
|
-
Jt.displayName =
|
|
1146
|
-
var
|
|
1148
|
+
Jt.displayName = Ye;
|
|
1149
|
+
var be = "DialogOverlay", er = c.forwardRef(
|
|
1147
1150
|
(e, t) => {
|
|
1148
|
-
const r = Qt(
|
|
1151
|
+
const r = Qt(be, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = k(be, e.__scopeDialog);
|
|
1149
1152
|
return n.modal ? /* @__PURE__ */ f(V, { present: o || n.open, children: /* @__PURE__ */ f(uo, { ...a, ref: t }) }) : null;
|
|
1150
1153
|
}
|
|
1151
1154
|
);
|
|
1152
|
-
er.displayName =
|
|
1155
|
+
er.displayName = be;
|
|
1153
1156
|
var lo = /* @__PURE__ */ Tt("DialogOverlay.RemoveScroll"), uo = c.forwardRef(
|
|
1154
1157
|
(e, t) => {
|
|
1155
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1158
|
+
const { __scopeDialog: r, ...o } = e, a = k(be, r);
|
|
1156
1159
|
return (
|
|
1157
1160
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1158
1161
|
// ie. when `Overlay` and `Content` are siblings
|
|
1159
1162
|
/* @__PURE__ */ f(zt, { as: lo, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1160
1163
|
O.div,
|
|
1161
1164
|
{
|
|
1162
|
-
"data-state":
|
|
1165
|
+
"data-state": ze(a.open),
|
|
1163
1166
|
...o,
|
|
1164
1167
|
ref: t,
|
|
1165
1168
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -1169,14 +1172,14 @@ var lo = /* @__PURE__ */ Tt("DialogOverlay.RemoveScroll"), uo = c.forwardRef(
|
|
|
1169
1172
|
}
|
|
1170
1173
|
), X = "DialogContent", tr = c.forwardRef(
|
|
1171
1174
|
(e, t) => {
|
|
1172
|
-
const r = Qt(X, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n =
|
|
1175
|
+
const r = Qt(X, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = k(X, e.__scopeDialog);
|
|
1173
1176
|
return /* @__PURE__ */ f(V, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(fo, { ...a, ref: t }) : /* @__PURE__ */ f(po, { ...a, ref: t }) });
|
|
1174
1177
|
}
|
|
1175
1178
|
);
|
|
1176
1179
|
tr.displayName = X;
|
|
1177
1180
|
var fo = c.forwardRef(
|
|
1178
1181
|
(e, t) => {
|
|
1179
|
-
const r =
|
|
1182
|
+
const r = k(X, e.__scopeDialog), o = c.useRef(null), a = L(t, r.contentRef, o);
|
|
1180
1183
|
return c.useEffect(() => {
|
|
1181
1184
|
const n = o.current;
|
|
1182
1185
|
if (n) return io(n);
|
|
@@ -1187,14 +1190,14 @@ var fo = c.forwardRef(
|
|
|
1187
1190
|
ref: a,
|
|
1188
1191
|
trapFocus: r.open,
|
|
1189
1192
|
disableOutsidePointerEvents: !0,
|
|
1190
|
-
onCloseAutoFocus:
|
|
1193
|
+
onCloseAutoFocus: x(e.onCloseAutoFocus, (n) => {
|
|
1191
1194
|
n.preventDefault(), r.triggerRef.current?.focus();
|
|
1192
1195
|
}),
|
|
1193
|
-
onPointerDownOutside:
|
|
1196
|
+
onPointerDownOutside: x(e.onPointerDownOutside, (n) => {
|
|
1194
1197
|
const s = n.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0;
|
|
1195
1198
|
(s.button === 2 || i) && n.preventDefault();
|
|
1196
1199
|
}),
|
|
1197
|
-
onFocusOutside:
|
|
1200
|
+
onFocusOutside: x(
|
|
1198
1201
|
e.onFocusOutside,
|
|
1199
1202
|
(n) => n.preventDefault()
|
|
1200
1203
|
)
|
|
@@ -1203,7 +1206,7 @@ var fo = c.forwardRef(
|
|
|
1203
1206
|
}
|
|
1204
1207
|
), po = c.forwardRef(
|
|
1205
1208
|
(e, t) => {
|
|
1206
|
-
const r =
|
|
1209
|
+
const r = k(X, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
|
|
1207
1210
|
return /* @__PURE__ */ f(
|
|
1208
1211
|
rr,
|
|
1209
1212
|
{
|
|
@@ -1224,7 +1227,7 @@ var fo = c.forwardRef(
|
|
|
1224
1227
|
}
|
|
1225
1228
|
), rr = c.forwardRef(
|
|
1226
1229
|
(e, t) => {
|
|
1227
|
-
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i =
|
|
1230
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = k(X, r), u = c.useRef(null), l = L(t, u);
|
|
1228
1231
|
return bn(), /* @__PURE__ */ A(re, { children: [
|
|
1229
1232
|
/* @__PURE__ */ f(
|
|
1230
1233
|
It,
|
|
@@ -1241,7 +1244,7 @@ var fo = c.forwardRef(
|
|
|
1241
1244
|
id: i.contentId,
|
|
1242
1245
|
"aria-describedby": i.descriptionId,
|
|
1243
1246
|
"aria-labelledby": i.titleId,
|
|
1244
|
-
"data-state":
|
|
1247
|
+
"data-state": ze(i.open),
|
|
1245
1248
|
...s,
|
|
1246
1249
|
ref: l,
|
|
1247
1250
|
onDismiss: () => i.onOpenChange(!1)
|
|
@@ -1255,41 +1258,41 @@ var fo = c.forwardRef(
|
|
|
1255
1258
|
] })
|
|
1256
1259
|
] });
|
|
1257
1260
|
}
|
|
1258
|
-
),
|
|
1261
|
+
), Ve = "DialogTitle", nr = c.forwardRef(
|
|
1259
1262
|
(e, t) => {
|
|
1260
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1263
|
+
const { __scopeDialog: r, ...o } = e, a = k(Ve, r);
|
|
1261
1264
|
return /* @__PURE__ */ f(O.h2, { id: a.titleId, ...o, ref: t });
|
|
1262
1265
|
}
|
|
1263
1266
|
);
|
|
1264
|
-
nr.displayName =
|
|
1267
|
+
nr.displayName = Ve;
|
|
1265
1268
|
var or = "DialogDescription", ar = c.forwardRef(
|
|
1266
1269
|
(e, t) => {
|
|
1267
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1270
|
+
const { __scopeDialog: r, ...o } = e, a = k(or, r);
|
|
1268
1271
|
return /* @__PURE__ */ f(O.p, { id: a.descriptionId, ...o, ref: t });
|
|
1269
1272
|
}
|
|
1270
1273
|
);
|
|
1271
1274
|
ar.displayName = or;
|
|
1272
1275
|
var ir = "DialogClose", sr = c.forwardRef(
|
|
1273
1276
|
(e, t) => {
|
|
1274
|
-
const { __scopeDialog: r, ...o } = e, a =
|
|
1277
|
+
const { __scopeDialog: r, ...o } = e, a = k(ir, r);
|
|
1275
1278
|
return /* @__PURE__ */ f(
|
|
1276
1279
|
O.button,
|
|
1277
1280
|
{
|
|
1278
1281
|
type: "button",
|
|
1279
1282
|
...o,
|
|
1280
1283
|
ref: t,
|
|
1281
|
-
onClick:
|
|
1284
|
+
onClick: x(e.onClick, () => a.onOpenChange(!1))
|
|
1282
1285
|
}
|
|
1283
1286
|
);
|
|
1284
1287
|
}
|
|
1285
1288
|
);
|
|
1286
1289
|
sr.displayName = ir;
|
|
1287
|
-
function
|
|
1290
|
+
function ze(e) {
|
|
1288
1291
|
return e ? "open" : "closed";
|
|
1289
1292
|
}
|
|
1290
1293
|
var cr = "DialogTitleWarning", [ri, lr] = Fr(cr, {
|
|
1291
1294
|
contentName: X,
|
|
1292
|
-
titleName:
|
|
1295
|
+
titleName: Ve,
|
|
1293
1296
|
docsSlug: "dialog"
|
|
1294
1297
|
}), ho = ({ titleId: e }) => {
|
|
1295
1298
|
const t = lr(cr), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
@@ -1306,12 +1309,12 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1306
1309
|
const a = e.current?.getAttribute("aria-describedby");
|
|
1307
1310
|
t && a && (document.getElementById(t) || console.warn(o));
|
|
1308
1311
|
}, [o, e, t]), null;
|
|
1309
|
-
}, go = Kt, _o = Zt, yo = Jt, bo = er, wo = tr,
|
|
1312
|
+
}, go = Kt, _o = Zt, yo = Jt, bo = er, wo = tr, ve = nr, So = ar, Eo = sr;
|
|
1310
1313
|
const ur = Lr(null);
|
|
1311
1314
|
function Co(e) {
|
|
1312
1315
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1313
1316
|
}
|
|
1314
|
-
var
|
|
1317
|
+
var Me = { exports: {} };
|
|
1315
1318
|
var pt;
|
|
1316
1319
|
function Po() {
|
|
1317
1320
|
return pt || (pt = 1, (function(e) {
|
|
@@ -1343,7 +1346,7 @@ function Po() {
|
|
|
1343
1346
|
}
|
|
1344
1347
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1345
1348
|
})();
|
|
1346
|
-
})(
|
|
1349
|
+
})(Me)), Me.exports;
|
|
1347
1350
|
}
|
|
1348
1351
|
var Ro = Po();
|
|
1349
1352
|
const ae = /* @__PURE__ */ Co(Ro), No = "_slideUp_71yig_1", xo = "_slideDown_71yig_1", Do = "_slideInRight_71yig_1", Ao = "_slideInLeft_71yig_1", Oo = "_slideOutRight_71yig_1", To = "_slideOutLeft_71yig_1", $o = "_fadeIn_71yig_1", Lo = "_fadeOut_71yig_1", Mo = {
|
|
@@ -1367,7 +1370,7 @@ const ae = /* @__PURE__ */ Co(Ro), No = "_slideUp_71yig_1", xo = "_slideDown_71y
|
|
|
1367
1370
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1bcla_4",
|
|
1368
1371
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1bcla_12",
|
|
1369
1372
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1bcla_20"
|
|
1370
|
-
}, ko = ae.bind(Io),
|
|
1373
|
+
}, ko = ae.bind(Io), Ie = "purpur-drawer-container", ee = Y(
|
|
1371
1374
|
({
|
|
1372
1375
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1373
1376
|
children: t,
|
|
@@ -1377,10 +1380,10 @@ const ae = /* @__PURE__ */ Co(Ro), No = "_slideUp_71yig_1", xo = "_slideDown_71y
|
|
|
1377
1380
|
...n
|
|
1378
1381
|
}, s) => {
|
|
1379
1382
|
const i = ko([
|
|
1380
|
-
|
|
1383
|
+
Ie,
|
|
1381
1384
|
{
|
|
1382
|
-
[`${
|
|
1383
|
-
[`${
|
|
1385
|
+
[`${Ie}--${o}`]: o,
|
|
1386
|
+
[`${Ie}--sticky`]: a
|
|
1384
1387
|
},
|
|
1385
1388
|
r
|
|
1386
1389
|
]);
|
|
@@ -1432,7 +1435,7 @@ const Wo = {
|
|
|
1432
1435
|
onSwipeEnd: n,
|
|
1433
1436
|
...s
|
|
1434
1437
|
}, i) => {
|
|
1435
|
-
const u = Uo([Bo, t]), l =
|
|
1438
|
+
const u = Uo([Bo, t]), l = We.useRef(null), d = We.useRef(null), { onPointerDown: p, onPointerMove: h, onPointerUp: m } = jo(
|
|
1436
1439
|
d,
|
|
1437
1440
|
l,
|
|
1438
1441
|
r,
|
|
@@ -1507,7 +1510,7 @@ const Xo = /* @__PURE__ */ Yo(zo), qo = "_rotate_12t9p_1", Ko = "_dash_12t9p_1",
|
|
|
1507
1510
|
dash: Ko,
|
|
1508
1511
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1509
1512
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1510
|
-
}, gt = Xo.bind(Go),
|
|
1513
|
+
}, gt = Xo.bind(Go), se = "purpur-spinner", Zo = {
|
|
1511
1514
|
SM: "sm"
|
|
1512
1515
|
}, fr = ({
|
|
1513
1516
|
disabled: e = !1,
|
|
@@ -1515,12 +1518,12 @@ const Xo = /* @__PURE__ */ Yo(zo), qo = "_rotate_12t9p_1", Ko = "_dash_12t9p_1",
|
|
|
1515
1518
|
size: r = Zo.SM,
|
|
1516
1519
|
className: o,
|
|
1517
1520
|
...a
|
|
1518
|
-
}) => /* @__PURE__ */ f("div", { className: gt(
|
|
1521
|
+
}) => /* @__PURE__ */ f("div", { className: gt(se, `${se}--${r}`, o), ...a, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1519
1522
|
"circle",
|
|
1520
1523
|
{
|
|
1521
|
-
className: gt(`${
|
|
1522
|
-
[`${
|
|
1523
|
-
[`${
|
|
1524
|
+
className: gt(`${se}__circle`, {
|
|
1525
|
+
[`${se}__circle--disabled`]: e,
|
|
1526
|
+
[`${se}__circle--negative`]: t
|
|
1524
1527
|
}),
|
|
1525
1528
|
cx: "25",
|
|
1526
1529
|
cy: "25",
|
|
@@ -1588,10 +1591,10 @@ const ta = /* @__PURE__ */ Qo(ea), ra = {
|
|
|
1588
1591
|
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
1589
1592
|
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
1590
1593
|
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
1591
|
-
},
|
|
1594
|
+
}, ke = {
|
|
1592
1595
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1593
1596
|
TEXT: "text"
|
|
1594
|
-
}, bt = ta.bind(ra), U = "purpur-button",
|
|
1597
|
+
}, bt = ta.bind(ra), U = "purpur-button", Ue = Y(
|
|
1595
1598
|
({
|
|
1596
1599
|
children: e,
|
|
1597
1600
|
className: t,
|
|
@@ -1650,7 +1653,7 @@ const ta = /* @__PURE__ */ Qo(ea), ra = {
|
|
|
1650
1653
|
);
|
|
1651
1654
|
}
|
|
1652
1655
|
);
|
|
1653
|
-
|
|
1656
|
+
Ue.displayName = "Button";
|
|
1654
1657
|
function na(e) {
|
|
1655
1658
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1656
1659
|
}
|
|
@@ -1688,7 +1691,7 @@ function oa() {
|
|
|
1688
1691
|
})(wt)), wt.exports;
|
|
1689
1692
|
}
|
|
1690
1693
|
var aa = oa();
|
|
1691
|
-
const ia = /* @__PURE__ */ na(aa),
|
|
1694
|
+
const ia = /* @__PURE__ */ na(aa), me = {
|
|
1692
1695
|
"purpur-heading": "_purpur-heading_vo751_1",
|
|
1693
1696
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
|
|
1694
1697
|
"purpur-heading--negative": "_purpur-heading--negative_vo751_11",
|
|
@@ -1712,7 +1715,7 @@ const ia = /* @__PURE__ */ na(aa), ve = {
|
|
|
1712
1715
|
TITLE100: "title-100"
|
|
1713
1716
|
}, Et = {
|
|
1714
1717
|
DISPLAY10: "display-10"
|
|
1715
|
-
},
|
|
1718
|
+
}, ge = "purpur-heading", Be = ({
|
|
1716
1719
|
children: e,
|
|
1717
1720
|
className: t = "",
|
|
1718
1721
|
enableHyphenation: r = !1,
|
|
@@ -1723,16 +1726,16 @@ const ia = /* @__PURE__ */ na(aa), ve = {
|
|
|
1723
1726
|
}) => {
|
|
1724
1727
|
const i = a, u = ia([
|
|
1725
1728
|
t,
|
|
1726
|
-
|
|
1727
|
-
|
|
1729
|
+
me[ge],
|
|
1730
|
+
me[`${ge}--${n}`],
|
|
1728
1731
|
{
|
|
1729
|
-
[
|
|
1730
|
-
[
|
|
1732
|
+
[me[`${ge}--hyphens`]]: r,
|
|
1733
|
+
[me[`${ge}--negative`]]: o
|
|
1731
1734
|
}
|
|
1732
1735
|
]);
|
|
1733
1736
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1734
1737
|
};
|
|
1735
|
-
|
|
1738
|
+
Be.displayName = "Heading";
|
|
1736
1739
|
function ca(e) {
|
|
1737
1740
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1738
1741
|
}
|
|
@@ -1786,27 +1789,27 @@ const da = /* @__PURE__ */ ca(ua), fa = {
|
|
|
1786
1789
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1787
1790
|
], o = t ? `<title>${t}</title>` : "";
|
|
1788
1791
|
return `<svg ${va(r)}>${o}${e}</svg>`;
|
|
1789
|
-
}, ga = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
1792
|
+
}, ga = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Xe = ({ svg: e, allyTitle: t, className: r, size: o = ha, ...a }) => {
|
|
1790
1793
|
const n = ma({
|
|
1791
1794
|
content: ga(e.svg),
|
|
1792
1795
|
title: t
|
|
1793
1796
|
}), s = pa(Rt, `${Rt}--${o}`, r);
|
|
1794
1797
|
return /* @__PURE__ */ f("span", { className: s, dangerouslySetInnerHTML: { __html: n }, ...a });
|
|
1795
1798
|
};
|
|
1796
|
-
|
|
1799
|
+
Xe.displayName = "Icon";
|
|
1797
1800
|
const _a = {
|
|
1798
1801
|
name: "chevron-left",
|
|
1799
1802
|
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>',
|
|
1800
1803
|
keywords: ["chevron-left"],
|
|
1801
1804
|
category: "utility"
|
|
1802
|
-
}, pr = (e) => /* @__PURE__ */ f(
|
|
1805
|
+
}, pr = (e) => /* @__PURE__ */ f(Xe, { ...e, svg: _a });
|
|
1803
1806
|
pr.displayName = "IconChevronLeft";
|
|
1804
1807
|
const ya = {
|
|
1805
1808
|
name: "close",
|
|
1806
1809
|
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>',
|
|
1807
1810
|
keywords: ["close"],
|
|
1808
1811
|
category: "utility"
|
|
1809
|
-
}, hr = (e) => /* @__PURE__ */ f(
|
|
1812
|
+
}, hr = (e) => /* @__PURE__ */ f(Xe, { ...e, svg: ya });
|
|
1810
1813
|
hr.displayName = "IconClose";
|
|
1811
1814
|
function Nt(e, t) {
|
|
1812
1815
|
if (typeof e == "function")
|
|
@@ -1853,7 +1856,7 @@ function Sa(e) {
|
|
|
1853
1856
|
});
|
|
1854
1857
|
return t.displayName = `${e}.SlotClone`, t;
|
|
1855
1858
|
}
|
|
1856
|
-
var Ea = Symbol("radix.slottable");
|
|
1859
|
+
var Ea = /* @__PURE__ */ Symbol("radix.slottable");
|
|
1857
1860
|
function Ca(e) {
|
|
1858
1861
|
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ea;
|
|
1859
1862
|
}
|
|
@@ -1891,7 +1894,7 @@ var Na = [
|
|
|
1891
1894
|
], xa = Na.reduce((e, t) => {
|
|
1892
1895
|
const r = /* @__PURE__ */ wa(`Primitive.${t}`), o = c.forwardRef((a, n) => {
|
|
1893
1896
|
const { asChild: s, ...i } = a, u = s ? r : t;
|
|
1894
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: n });
|
|
1897
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: n });
|
|
1895
1898
|
});
|
|
1896
1899
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
1897
1900
|
}, {}), Da = "VisuallyHidden", vr = c.forwardRef(
|
|
@@ -1954,7 +1957,7 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
1954
1957
|
"data-testid": `${e}-row`,
|
|
1955
1958
|
children: [
|
|
1956
1959
|
/* @__PURE__ */ f("div", { className: Z(`${B}__left`), children: h ? /* @__PURE__ */ A(
|
|
1957
|
-
|
|
1960
|
+
Ue,
|
|
1958
1961
|
{
|
|
1959
1962
|
"aria-label": o ? r : "",
|
|
1960
1963
|
className: Z([
|
|
@@ -1967,7 +1970,7 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
1967
1970
|
iconOnly: o,
|
|
1968
1971
|
onClick: i,
|
|
1969
1972
|
size: "sm",
|
|
1970
|
-
variant: o ?
|
|
1973
|
+
variant: o ? ke.TERTIARY_PURPLE : ke.TEXT,
|
|
1971
1974
|
children: [
|
|
1972
1975
|
/* @__PURE__ */ f(pr, { size: "sm" }),
|
|
1973
1976
|
!o && r
|
|
@@ -1975,9 +1978,9 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
1975
1978
|
}
|
|
1976
1979
|
) : s ? /* @__PURE__ */ A(re, { children: [
|
|
1977
1980
|
s,
|
|
1978
|
-
/* @__PURE__ */ f(xt, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1979
|
-
] }) : /* @__PURE__ */ f(
|
|
1980
|
-
|
|
1981
|
+
/* @__PURE__ */ f(xt, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
1982
|
+
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1983
|
+
Be,
|
|
1981
1984
|
{
|
|
1982
1985
|
"data-testid": `${e}-title`,
|
|
1983
1986
|
tag: "h2",
|
|
@@ -1987,13 +1990,13 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
1987
1990
|
}
|
|
1988
1991
|
) }) }),
|
|
1989
1992
|
/* @__PURE__ */ f("div", { className: Z(`${B}__right`), children: /* @__PURE__ */ f(Eo, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1990
|
-
|
|
1993
|
+
Ue,
|
|
1991
1994
|
{
|
|
1992
1995
|
"aria-label": n,
|
|
1993
1996
|
className: Z(`${B}__close-button`),
|
|
1994
1997
|
iconOnly: !0,
|
|
1995
1998
|
size: "sm",
|
|
1996
|
-
variant:
|
|
1999
|
+
variant: ke.TERTIARY_PURPLE,
|
|
1997
2000
|
children: /* @__PURE__ */ f(hr, { size: "sm" })
|
|
1998
2001
|
}
|
|
1999
2002
|
) }) })
|
|
@@ -2002,9 +2005,9 @@ const xt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChil
|
|
|
2002
2005
|
),
|
|
2003
2006
|
h && (s ? /* @__PURE__ */ A(re, { children: [
|
|
2004
2007
|
s,
|
|
2005
|
-
/* @__PURE__ */ f(xt, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2006
|
-
] }) : /* @__PURE__ */ f(
|
|
2007
|
-
|
|
2008
|
+
/* @__PURE__ */ f(xt, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
2009
|
+
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2010
|
+
Be,
|
|
2008
2011
|
{
|
|
2009
2012
|
"data-testid": `${e}-title-with-back-button`,
|
|
2010
2013
|
tag: "h2",
|
|
@@ -2028,7 +2031,7 @@ function La(e, [t, r]) {
|
|
|
2028
2031
|
function Ma(e, t) {
|
|
2029
2032
|
return c.useReducer((r, o) => t[r][o] ?? r, e);
|
|
2030
2033
|
}
|
|
2031
|
-
var
|
|
2034
|
+
var qe = "ScrollArea", [gr] = Ot(qe), [Ia, I] = gr(qe), _r = c.forwardRef(
|
|
2032
2035
|
(e, t) => {
|
|
2033
2036
|
const {
|
|
2034
2037
|
__scopeScrollArea: r,
|
|
@@ -2036,7 +2039,7 @@ var Xe = "ScrollArea", [gr] = Ot(Xe), [Ia, M] = gr(Xe), _r = c.forwardRef(
|
|
|
2036
2039
|
dir: a,
|
|
2037
2040
|
scrollHideDelay: n = 600,
|
|
2038
2041
|
...s
|
|
2039
|
-
} = 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), [y, b] = c.useState(0), [E, w] = c.useState(0), [C, R] = c.useState(!1), [S,
|
|
2042
|
+
} = 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), [y, b] = c.useState(0), [E, w] = c.useState(0), [C, R] = c.useState(!1), [S, D] = c.useState(!1), P = L(t, (T) => u(T)), N = $a(a);
|
|
2040
2043
|
return /* @__PURE__ */ f(
|
|
2041
2044
|
Ia,
|
|
2042
2045
|
{
|
|
@@ -2056,7 +2059,7 @@ var Xe = "ScrollArea", [gr] = Ot(Xe), [Ia, M] = gr(Xe), _r = c.forwardRef(
|
|
|
2056
2059
|
scrollbarY: v,
|
|
2057
2060
|
onScrollbarYChange: g,
|
|
2058
2061
|
scrollbarYEnabled: S,
|
|
2059
|
-
onScrollbarYEnabledChange:
|
|
2062
|
+
onScrollbarYEnabledChange: D,
|
|
2060
2063
|
onCornerWidthChange: b,
|
|
2061
2064
|
onCornerHeightChange: w,
|
|
2062
2065
|
children: /* @__PURE__ */ f(
|
|
@@ -2078,10 +2081,10 @@ var Xe = "ScrollArea", [gr] = Ot(Xe), [Ia, M] = gr(Xe), _r = c.forwardRef(
|
|
|
2078
2081
|
);
|
|
2079
2082
|
}
|
|
2080
2083
|
);
|
|
2081
|
-
_r.displayName =
|
|
2084
|
+
_r.displayName = qe;
|
|
2082
2085
|
var yr = "ScrollAreaViewport", br = c.forwardRef(
|
|
2083
2086
|
(e, t) => {
|
|
2084
|
-
const { __scopeScrollArea: r, children: o, nonce: a, ...n } = e, s =
|
|
2087
|
+
const { __scopeScrollArea: r, children: o, nonce: a, ...n } = e, s = I(yr, r), i = c.useRef(null), u = L(t, i, s.onViewportChange);
|
|
2085
2088
|
return /* @__PURE__ */ A(re, { children: [
|
|
2086
2089
|
/* @__PURE__ */ f(
|
|
2087
2090
|
"style",
|
|
@@ -2121,17 +2124,17 @@ var yr = "ScrollAreaViewport", br = c.forwardRef(
|
|
|
2121
2124
|
}
|
|
2122
2125
|
);
|
|
2123
2126
|
br.displayName = yr;
|
|
2124
|
-
var
|
|
2127
|
+
var F = "ScrollAreaScrollbar", wr = c.forwardRef(
|
|
2125
2128
|
(e, t) => {
|
|
2126
|
-
const { forceMount: r, ...o } = e, a =
|
|
2129
|
+
const { forceMount: r, ...o } = e, a = I(F, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2127
2130
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2128
2131
|
i ? n(!1) : s(!1);
|
|
2129
|
-
}), [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(
|
|
2132
|
+
}), [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(Ke, { ...o, ref: t }) : null;
|
|
2130
2133
|
}
|
|
2131
2134
|
);
|
|
2132
|
-
wr.displayName =
|
|
2135
|
+
wr.displayName = F;
|
|
2133
2136
|
var ka = c.forwardRef((e, t) => {
|
|
2134
|
-
const { forceMount: r, ...o } = e, a =
|
|
2137
|
+
const { forceMount: r, ...o } = e, a = I(F, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2135
2138
|
return c.useEffect(() => {
|
|
2136
2139
|
const i = a.scrollArea;
|
|
2137
2140
|
let u = 0;
|
|
@@ -2154,7 +2157,7 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2154
2157
|
}
|
|
2155
2158
|
) });
|
|
2156
2159
|
}), Wa = c.forwardRef((e, t) => {
|
|
2157
|
-
const { forceMount: r, ...o } = e, a =
|
|
2160
|
+
const { forceMount: r, ...o } = e, a = I(F, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Re(() => u("SCROLL_END"), 100), [i, u] = Ma("hidden", {
|
|
2158
2161
|
hidden: {
|
|
2159
2162
|
SCROLL: "scrolling"
|
|
2160
2163
|
},
|
|
@@ -2188,32 +2191,32 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2188
2191
|
return l.addEventListener("scroll", h), () => l.removeEventListener("scroll", h);
|
|
2189
2192
|
}
|
|
2190
2193
|
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(V, { present: r || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2191
|
-
|
|
2194
|
+
Ke,
|
|
2192
2195
|
{
|
|
2193
2196
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
2194
2197
|
...o,
|
|
2195
2198
|
ref: t,
|
|
2196
|
-
onPointerEnter:
|
|
2197
|
-
onPointerLeave:
|
|
2199
|
+
onPointerEnter: x(e.onPointerEnter, () => u("POINTER_ENTER")),
|
|
2200
|
+
onPointerLeave: x(e.onPointerLeave, () => u("POINTER_LEAVE"))
|
|
2198
2201
|
}
|
|
2199
2202
|
) });
|
|
2200
2203
|
}), Sr = c.forwardRef((e, t) => {
|
|
2201
|
-
const r =
|
|
2204
|
+
const r = I(F, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, s] = c.useState(!1), i = e.orientation === "horizontal", u = Re(() => {
|
|
2202
2205
|
if (r.viewport) {
|
|
2203
2206
|
const l = r.viewport.offsetWidth < r.viewport.scrollWidth, d = r.viewport.offsetHeight < r.viewport.scrollHeight;
|
|
2204
2207
|
s(i ? l : d);
|
|
2205
2208
|
}
|
|
2206
2209
|
}, 10);
|
|
2207
2210
|
return oe(r.viewport, u), oe(r.content, u), /* @__PURE__ */ f(V, { present: o || n, children: /* @__PURE__ */ f(
|
|
2208
|
-
|
|
2211
|
+
Ke,
|
|
2209
2212
|
{
|
|
2210
2213
|
"data-state": n ? "visible" : "hidden",
|
|
2211
2214
|
...a,
|
|
2212
2215
|
ref: t
|
|
2213
2216
|
}
|
|
2214
2217
|
) });
|
|
2215
|
-
}),
|
|
2216
|
-
const { orientation: r = "vertical", ...o } = e, a =
|
|
2218
|
+
}), Ke = c.forwardRef((e, t) => {
|
|
2219
|
+
const { orientation: r = "vertical", ...o } = e, a = I(F, e.__scopeScrollArea), n = c.useRef(null), s = c.useRef(0), [i, u] = c.useState({
|
|
2217
2220
|
content: 0,
|
|
2218
2221
|
viewport: 0,
|
|
2219
2222
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -2267,7 +2270,7 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2267
2270
|
}
|
|
2268
2271
|
) : null;
|
|
2269
2272
|
}), Fa = c.forwardRef((e, t) => {
|
|
2270
|
-
const { sizes: r, onSizesChange: o, ...a } = e, n =
|
|
2273
|
+
const { sizes: r, onSizesChange: o, ...a } = e, n = I(F, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(t, u, n.onScrollbarXChange);
|
|
2271
2274
|
return c.useEffect(() => {
|
|
2272
2275
|
u.current && i(getComputedStyle(u.current));
|
|
2273
2276
|
}, [u]), /* @__PURE__ */ f(
|
|
@@ -2281,7 +2284,7 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2281
2284
|
bottom: 0,
|
|
2282
2285
|
left: n.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2283
2286
|
right: n.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2284
|
-
"--radix-scroll-area-thumb-width":
|
|
2287
|
+
"--radix-scroll-area-thumb-width": Pe(r) + "px",
|
|
2285
2288
|
...e.style
|
|
2286
2289
|
},
|
|
2287
2290
|
onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
|
|
@@ -2298,15 +2301,15 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2298
2301
|
viewport: n.viewport.offsetWidth,
|
|
2299
2302
|
scrollbar: {
|
|
2300
2303
|
size: u.current.clientWidth,
|
|
2301
|
-
paddingStart:
|
|
2302
|
-
paddingEnd:
|
|
2304
|
+
paddingStart: Se(s.paddingLeft),
|
|
2305
|
+
paddingEnd: Se(s.paddingRight)
|
|
2303
2306
|
}
|
|
2304
2307
|
});
|
|
2305
2308
|
}
|
|
2306
2309
|
}
|
|
2307
2310
|
);
|
|
2308
2311
|
}), ja = c.forwardRef((e, t) => {
|
|
2309
|
-
const { sizes: r, onSizesChange: o, ...a } = e, n =
|
|
2312
|
+
const { sizes: r, onSizesChange: o, ...a } = e, n = I(F, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(t, u, n.onScrollbarYChange);
|
|
2310
2313
|
return c.useEffect(() => {
|
|
2311
2314
|
u.current && i(getComputedStyle(u.current));
|
|
2312
2315
|
}, [u]), /* @__PURE__ */ f(
|
|
@@ -2321,7 +2324,7 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2321
2324
|
right: n.dir === "ltr" ? 0 : void 0,
|
|
2322
2325
|
left: n.dir === "rtl" ? 0 : void 0,
|
|
2323
2326
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
2324
|
-
"--radix-scroll-area-thumb-height":
|
|
2327
|
+
"--radix-scroll-area-thumb-height": Pe(r) + "px",
|
|
2325
2328
|
...e.style
|
|
2326
2329
|
},
|
|
2327
2330
|
onThumbPointerDown: (d) => e.onThumbPointerDown(d.y),
|
|
@@ -2338,14 +2341,14 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2338
2341
|
viewport: n.viewport.offsetHeight,
|
|
2339
2342
|
scrollbar: {
|
|
2340
2343
|
size: u.current.clientHeight,
|
|
2341
|
-
paddingStart:
|
|
2342
|
-
paddingEnd:
|
|
2344
|
+
paddingStart: Se(s.paddingTop),
|
|
2345
|
+
paddingEnd: Se(s.paddingBottom)
|
|
2343
2346
|
}
|
|
2344
2347
|
});
|
|
2345
2348
|
}
|
|
2346
2349
|
}
|
|
2347
2350
|
);
|
|
2348
|
-
}), [Ua, Er] = gr(
|
|
2351
|
+
}), [Ua, Er] = gr(F), Cr = c.forwardRef((e, t) => {
|
|
2349
2352
|
const {
|
|
2350
2353
|
__scopeScrollArea: r,
|
|
2351
2354
|
sizes: o,
|
|
@@ -2358,17 +2361,17 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2358
2361
|
onWheelScroll: d,
|
|
2359
2362
|
onResize: p,
|
|
2360
2363
|
...h
|
|
2361
|
-
} = e, m =
|
|
2362
|
-
function
|
|
2364
|
+
} = e, m = I(F, r), [_, v] = c.useState(null), g = L(t, (P) => v(P)), y = c.useRef(null), b = c.useRef(""), E = m.viewport, w = o.content - o.viewport, C = M(d), R = M(u), S = Re(p, 10);
|
|
2365
|
+
function D(P) {
|
|
2363
2366
|
if (y.current) {
|
|
2364
|
-
const N = P.clientX - y.current.left,
|
|
2365
|
-
l({ x: N, y:
|
|
2367
|
+
const N = P.clientX - y.current.left, T = P.clientY - y.current.top;
|
|
2368
|
+
l({ x: N, y: T });
|
|
2366
2369
|
}
|
|
2367
2370
|
}
|
|
2368
2371
|
return c.useEffect(() => {
|
|
2369
2372
|
const P = (N) => {
|
|
2370
|
-
const
|
|
2371
|
-
_?.contains(
|
|
2373
|
+
const T = N.target;
|
|
2374
|
+
_?.contains(T) && C(N, w);
|
|
2372
2375
|
};
|
|
2373
2376
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2374
2377
|
}, [E, _, w, C]), c.useEffect(R, [o, R]), oe(_, S), oe(m.content, S), /* @__PURE__ */ f(
|
|
@@ -2377,21 +2380,21 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2377
2380
|
scope: r,
|
|
2378
2381
|
scrollbar: _,
|
|
2379
2382
|
hasThumb: a,
|
|
2380
|
-
onThumbChange:
|
|
2381
|
-
onThumbPointerUp:
|
|
2383
|
+
onThumbChange: M(n),
|
|
2384
|
+
onThumbPointerUp: M(s),
|
|
2382
2385
|
onThumbPositionChange: R,
|
|
2383
|
-
onThumbPointerDown:
|
|
2386
|
+
onThumbPointerDown: M(i),
|
|
2384
2387
|
children: /* @__PURE__ */ f(
|
|
2385
2388
|
O.div,
|
|
2386
2389
|
{
|
|
2387
2390
|
...h,
|
|
2388
2391
|
ref: g,
|
|
2389
2392
|
style: { position: "absolute", ...h.style },
|
|
2390
|
-
onPointerDown:
|
|
2391
|
-
P.button === 0 && (P.target.setPointerCapture(P.pointerId), y.current = _.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"),
|
|
2393
|
+
onPointerDown: x(e.onPointerDown, (P) => {
|
|
2394
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), y.current = _.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), D(P));
|
|
2392
2395
|
}),
|
|
2393
|
-
onPointerMove:
|
|
2394
|
-
onPointerUp:
|
|
2396
|
+
onPointerMove: x(e.onPointerMove, D),
|
|
2397
|
+
onPointerUp: x(e.onPointerUp, (P) => {
|
|
2395
2398
|
const N = P.target;
|
|
2396
2399
|
N.hasPointerCapture(P.pointerId) && N.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = b.current, m.viewport && (m.viewport.style.scrollBehavior = ""), y.current = null;
|
|
2397
2400
|
})
|
|
@@ -2399,17 +2402,17 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2399
2402
|
)
|
|
2400
2403
|
}
|
|
2401
2404
|
);
|
|
2402
|
-
}),
|
|
2405
|
+
}), we = "ScrollAreaThumb", Pr = c.forwardRef(
|
|
2403
2406
|
(e, t) => {
|
|
2404
|
-
const { forceMount: r, ...o } = e, a = Er(
|
|
2407
|
+
const { forceMount: r, ...o } = e, a = Er(we, e.__scopeScrollArea);
|
|
2405
2408
|
return /* @__PURE__ */ f(V, { present: r || a.hasThumb, children: /* @__PURE__ */ f(Ba, { ref: t, ...o }) });
|
|
2406
2409
|
}
|
|
2407
2410
|
), Ba = c.forwardRef(
|
|
2408
2411
|
(e, t) => {
|
|
2409
|
-
const { __scopeScrollArea: r, style: o, ...a } = e, n =
|
|
2412
|
+
const { __scopeScrollArea: r, style: o, ...a } = e, n = I(we, r), s = Er(we, r), { onThumbPositionChange: i } = s, u = L(
|
|
2410
2413
|
t,
|
|
2411
2414
|
(p) => s.onThumbChange(p)
|
|
2412
|
-
), l = c.useRef(void 0), d =
|
|
2415
|
+
), l = c.useRef(void 0), d = Re(() => {
|
|
2413
2416
|
l.current && (l.current(), l.current = void 0);
|
|
2414
2417
|
}, 100);
|
|
2415
2418
|
return c.useEffect(() => {
|
|
@@ -2434,25 +2437,25 @@ var ka = c.forwardRef((e, t) => {
|
|
|
2434
2437
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2435
2438
|
...o
|
|
2436
2439
|
},
|
|
2437
|
-
onPointerDownCapture:
|
|
2440
|
+
onPointerDownCapture: x(e.onPointerDownCapture, (p) => {
|
|
2438
2441
|
const m = p.target.getBoundingClientRect(), _ = p.clientX - m.left, v = p.clientY - m.top;
|
|
2439
2442
|
s.onThumbPointerDown({ x: _, y: v });
|
|
2440
2443
|
}),
|
|
2441
|
-
onPointerUp:
|
|
2444
|
+
onPointerUp: x(e.onPointerUp, s.onThumbPointerUp)
|
|
2442
2445
|
}
|
|
2443
2446
|
);
|
|
2444
2447
|
}
|
|
2445
2448
|
);
|
|
2446
|
-
Pr.displayName =
|
|
2447
|
-
var
|
|
2449
|
+
Pr.displayName = we;
|
|
2450
|
+
var Ge = "ScrollAreaCorner", Ha = c.forwardRef(
|
|
2448
2451
|
(e, t) => {
|
|
2449
|
-
const r =
|
|
2452
|
+
const r = I(Ge, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
|
|
2450
2453
|
return r.type !== "scroll" && o ? /* @__PURE__ */ f(Ya, { ...e, ref: t }) : null;
|
|
2451
2454
|
}
|
|
2452
2455
|
);
|
|
2453
|
-
Ha.displayName =
|
|
2456
|
+
Ha.displayName = Ge;
|
|
2454
2457
|
var Ya = c.forwardRef((e, t) => {
|
|
2455
|
-
const { __scopeScrollArea: r, ...o } = e, a =
|
|
2458
|
+
const { __scopeScrollArea: r, ...o } = e, a = I(Ge, r), [n, s] = c.useState(0), [i, u] = c.useState(0), l = !!(n && i);
|
|
2456
2459
|
return oe(a.scrollbarX, () => {
|
|
2457
2460
|
const d = a.scrollbarX?.offsetHeight || 0;
|
|
2458
2461
|
a.onCornerHeightChange(d), u(d);
|
|
@@ -2476,23 +2479,23 @@ var Ya = c.forwardRef((e, t) => {
|
|
|
2476
2479
|
}
|
|
2477
2480
|
) : null;
|
|
2478
2481
|
});
|
|
2479
|
-
function
|
|
2482
|
+
function Se(e) {
|
|
2480
2483
|
return e ? parseInt(e, 10) : 0;
|
|
2481
2484
|
}
|
|
2482
2485
|
function Rr(e, t) {
|
|
2483
2486
|
const r = e / t;
|
|
2484
2487
|
return isNaN(r) ? 0 : r;
|
|
2485
2488
|
}
|
|
2486
|
-
function
|
|
2489
|
+
function Pe(e) {
|
|
2487
2490
|
const t = Rr(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
|
|
2488
2491
|
return Math.max(o, 18);
|
|
2489
2492
|
}
|
|
2490
2493
|
function Va(e, t, r, o = "ltr") {
|
|
2491
|
-
const a =
|
|
2494
|
+
const a = Pe(r), n = a / 2, s = t || n, i = a - s, u = r.scrollbar.paddingStart + s, l = r.scrollbar.size - r.scrollbar.paddingEnd - i, d = r.content - r.viewport, p = o === "ltr" ? [0, d] : [d * -1, 0];
|
|
2492
2495
|
return Nr([u, l], p)(e);
|
|
2493
2496
|
}
|
|
2494
2497
|
function Dt(e, t, r = "ltr") {
|
|
2495
|
-
const o =
|
|
2498
|
+
const o = Pe(t), a = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, n = t.scrollbar.size - a, s = t.content - t.viewport, i = n - o, u = r === "ltr" ? [0, s] : [s * -1, 0], l = La(e, u);
|
|
2496
2499
|
return Nr([0, s], [0, i])(l);
|
|
2497
2500
|
}
|
|
2498
2501
|
function Nr(e, t) {
|
|
@@ -2513,14 +2516,14 @@ var za = (e, t = () => {
|
|
|
2513
2516
|
(s || i) && t(), r = n, o = window.requestAnimationFrame(a);
|
|
2514
2517
|
})(), () => window.cancelAnimationFrame(o);
|
|
2515
2518
|
};
|
|
2516
|
-
function
|
|
2517
|
-
const r =
|
|
2519
|
+
function Re(e, t) {
|
|
2520
|
+
const r = M(e), o = c.useRef(0);
|
|
2518
2521
|
return c.useEffect(() => () => window.clearTimeout(o.current), []), c.useCallback(() => {
|
|
2519
2522
|
window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
|
|
2520
2523
|
}, [r, t]);
|
|
2521
2524
|
}
|
|
2522
2525
|
function oe(e, t) {
|
|
2523
|
-
const r =
|
|
2526
|
+
const r = M(t);
|
|
2524
2527
|
ne(() => {
|
|
2525
2528
|
let o = 0;
|
|
2526
2529
|
if (e) {
|
|
@@ -2540,7 +2543,7 @@ const Za = {
|
|
|
2540
2543
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1hyos_10",
|
|
2541
2544
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1hyos_14",
|
|
2542
2545
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1hyos_25"
|
|
2543
|
-
},
|
|
2546
|
+
}, ce = ae.bind(Za), Q = "purpur-drawer-scroll-area", He = Y(
|
|
2544
2547
|
({
|
|
2545
2548
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2546
2549
|
children: t,
|
|
@@ -2548,21 +2551,21 @@ const Za = {
|
|
|
2548
2551
|
fitToContent: o = !1,
|
|
2549
2552
|
...a
|
|
2550
2553
|
}, n) => {
|
|
2551
|
-
const s =
|
|
2554
|
+
const s = ce([Q, r]);
|
|
2552
2555
|
return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ A(
|
|
2553
2556
|
Xa,
|
|
2554
2557
|
{
|
|
2555
|
-
className:
|
|
2558
|
+
className: ce(`${Q}__root`, {
|
|
2556
2559
|
[`${Q}__root--fit-to-content`]: o
|
|
2557
2560
|
}),
|
|
2558
2561
|
children: [
|
|
2559
|
-
/* @__PURE__ */ f(qa, { className:
|
|
2562
|
+
/* @__PURE__ */ f(qa, { className: ce(`${Q}__viewport`), children: t }),
|
|
2560
2563
|
/* @__PURE__ */ f(
|
|
2561
2564
|
Ka,
|
|
2562
2565
|
{
|
|
2563
|
-
className:
|
|
2566
|
+
className: ce(`${Q}__scrollbar`),
|
|
2564
2567
|
orientation: "vertical",
|
|
2565
|
-
children: /* @__PURE__ */ f(Ga, { className:
|
|
2568
|
+
children: /* @__PURE__ */ f(Ga, { className: ce(`${Q}__thumb`) })
|
|
2566
2569
|
}
|
|
2567
2570
|
)
|
|
2568
2571
|
]
|
|
@@ -2570,8 +2573,8 @@ const Za = {
|
|
|
2570
2573
|
) });
|
|
2571
2574
|
}
|
|
2572
2575
|
);
|
|
2573
|
-
|
|
2574
|
-
const J = ae.bind(Wo),
|
|
2576
|
+
He.displayName = "DrawerScrollArea";
|
|
2577
|
+
const J = ae.bind(Wo), $ = "purpur-drawer-frame", Dr = Y(
|
|
2575
2578
|
({
|
|
2576
2579
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2577
2580
|
backButton: t,
|
|
@@ -2594,14 +2597,14 @@ const J = ae.bind(Wo), T = "purpur-drawer-frame", Dr = Y(
|
|
|
2594
2597
|
...b
|
|
2595
2598
|
}, E) => {
|
|
2596
2599
|
const w = !!(t && r && d), C = J([
|
|
2597
|
-
|
|
2600
|
+
$,
|
|
2598
2601
|
{
|
|
2599
|
-
[`${
|
|
2600
|
-
[`${
|
|
2601
|
-
[`${
|
|
2602
|
-
[`${
|
|
2603
|
-
[`${
|
|
2604
|
-
[`${
|
|
2602
|
+
[`${$}--fit-to-content`]: i,
|
|
2603
|
+
[`${$}--sticky-footer`]: g,
|
|
2604
|
+
[`${$}--left`]: y === "left",
|
|
2605
|
+
[`${$}--right`]: y === "right",
|
|
2606
|
+
[`${$}--without-back-button`]: !w,
|
|
2607
|
+
[`${$}--with-back-button`]: w
|
|
2605
2608
|
},
|
|
2606
2609
|
n
|
|
2607
2610
|
]);
|
|
@@ -2618,7 +2621,7 @@ const J = ae.bind(Wo), T = "purpur-drawer-frame", Dr = Y(
|
|
|
2618
2621
|
/* @__PURE__ */ f(
|
|
2619
2622
|
ee,
|
|
2620
2623
|
{
|
|
2621
|
-
className: J(`${
|
|
2624
|
+
className: J(`${$}__header`),
|
|
2622
2625
|
variant: "header",
|
|
2623
2626
|
stickyFooter: g,
|
|
2624
2627
|
children: /* @__PURE__ */ f(
|
|
@@ -2637,9 +2640,9 @@ const J = ae.bind(Wo), T = "purpur-drawer-frame", Dr = Y(
|
|
|
2637
2640
|
),
|
|
2638
2641
|
g ? /* @__PURE__ */ A(re, { children: [
|
|
2639
2642
|
/* @__PURE__ */ f(
|
|
2640
|
-
|
|
2643
|
+
He,
|
|
2641
2644
|
{
|
|
2642
|
-
className: J(`${
|
|
2645
|
+
className: J(`${$}__body`),
|
|
2643
2646
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
2644
2647
|
fitToContent: i,
|
|
2645
2648
|
children: /* @__PURE__ */ f(ee, { stickyFooter: !0, children: a })
|
|
@@ -2648,7 +2651,7 @@ const J = ae.bind(Wo), T = "purpur-drawer-frame", Dr = Y(
|
|
|
2648
2651
|
u && /* @__PURE__ */ f(
|
|
2649
2652
|
ee,
|
|
2650
2653
|
{
|
|
2651
|
-
className: J(`${
|
|
2654
|
+
className: J(`${$}__footer`),
|
|
2652
2655
|
"data-testid": `${e}-sticky-footer`,
|
|
2653
2656
|
variant: "footer",
|
|
2654
2657
|
stickyFooter: g,
|
|
@@ -2656,17 +2659,17 @@ const J = ae.bind(Wo), T = "purpur-drawer-frame", Dr = Y(
|
|
|
2656
2659
|
}
|
|
2657
2660
|
)
|
|
2658
2661
|
] }) : /* @__PURE__ */ f(
|
|
2659
|
-
|
|
2662
|
+
He,
|
|
2660
2663
|
{
|
|
2661
|
-
className: J(`${
|
|
2664
|
+
className: J(`${$}__body`),
|
|
2662
2665
|
"data-testid": `${e}-scroll-area`,
|
|
2663
2666
|
fitToContent: i,
|
|
2664
2667
|
children: /* @__PURE__ */ A(
|
|
2665
2668
|
"div",
|
|
2666
2669
|
{
|
|
2667
2670
|
className: J([
|
|
2668
|
-
`${
|
|
2669
|
-
{ [`${
|
|
2671
|
+
`${$}__content-container`,
|
|
2672
|
+
{ [`${$}__content-container--no-footer`]: !u }
|
|
2670
2673
|
]),
|
|
2671
2674
|
children: [
|
|
2672
2675
|
/* @__PURE__ */ f(ee, { stickyFooter: g, children: a }),
|
|
@@ -2707,7 +2710,7 @@ const Qa = (e, t) => ({
|
|
|
2707
2710
|
const { y: i } = s.delta;
|
|
2708
2711
|
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?.(!1);
|
|
2709
2712
|
}
|
|
2710
|
-
}),
|
|
2713
|
+
}), le = ae.bind(Mo), z = "purpur-drawer-content", Ar = Y(
|
|
2711
2714
|
({
|
|
2712
2715
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2713
2716
|
backButton: t = !1,
|
|
@@ -2728,7 +2731,7 @@ const Qa = (e, t) => ({
|
|
|
2728
2731
|
position: g = "right",
|
|
2729
2732
|
...y
|
|
2730
2733
|
}, b) => {
|
|
2731
|
-
const E =
|
|
2734
|
+
const E = le([
|
|
2732
2735
|
z,
|
|
2733
2736
|
{
|
|
2734
2737
|
[`${z}--fit-to-content`]: l,
|
|
@@ -2738,10 +2741,10 @@ const Qa = (e, t) => ({
|
|
|
2738
2741
|
s
|
|
2739
2742
|
]), w = Je(null), C = Je(null), R = (j) => {
|
|
2740
2743
|
C.current = j, typeof b == "function" ? b(j) : b && (b.current = j);
|
|
2741
|
-
}, S = Mr(ur), { onSwipeStart:
|
|
2744
|
+
}, S = Mr(ur), { onSwipeStart: D, onSwipeMove: P, onSwipeCancel: N, onSwipeEnd: T } = Qa(
|
|
2742
2745
|
C,
|
|
2743
2746
|
S
|
|
2744
|
-
),
|
|
2747
|
+
), ie = (j) => {
|
|
2745
2748
|
u && j.preventDefault();
|
|
2746
2749
|
}, Tr = () => {
|
|
2747
2750
|
const j = w.current;
|
|
@@ -2755,13 +2758,13 @@ const Qa = (e, t) => ({
|
|
|
2755
2758
|
return /* @__PURE__ */ f(yo, { children: /* @__PURE__ */ f(
|
|
2756
2759
|
bo,
|
|
2757
2760
|
{
|
|
2758
|
-
className:
|
|
2761
|
+
className: le("purpur-drawer-overlay"),
|
|
2759
2762
|
style: v ? { zIndex: v } : void 0,
|
|
2760
2763
|
"data-testid": `${e}-overlay`,
|
|
2761
2764
|
children: /* @__PURE__ */ f(
|
|
2762
2765
|
wo,
|
|
2763
2766
|
{
|
|
2764
|
-
onPointerDownOutside:
|
|
2767
|
+
onPointerDownOutside: ie,
|
|
2765
2768
|
onOpenAutoFocus: Tr,
|
|
2766
2769
|
className: E,
|
|
2767
2770
|
"data-testid": e,
|
|
@@ -2775,24 +2778,24 @@ const Qa = (e, t) => ({
|
|
|
2775
2778
|
backButtonText: r,
|
|
2776
2779
|
backButtonOnlyIcon: o,
|
|
2777
2780
|
closeButtonAriaLabel: i,
|
|
2778
|
-
className:
|
|
2781
|
+
className: le(`${z}__drawer-frame`),
|
|
2779
2782
|
fitToContent: l,
|
|
2780
2783
|
footerContent: d,
|
|
2781
2784
|
headerContent: p,
|
|
2782
2785
|
ref: w,
|
|
2783
2786
|
onBackButtonClick: h,
|
|
2784
|
-
onSwipeStart:
|
|
2787
|
+
onSwipeStart: D,
|
|
2785
2788
|
onSwipeMove: P,
|
|
2786
2789
|
onSwipeCancel: N,
|
|
2787
|
-
onSwipeEnd:
|
|
2790
|
+
onSwipeEnd: T,
|
|
2788
2791
|
stickyFooter: m,
|
|
2789
2792
|
title: _,
|
|
2790
2793
|
position: g,
|
|
2791
|
-
children: a ? /* @__PURE__ */ A("div", { className:
|
|
2794
|
+
children: a ? /* @__PURE__ */ A("div", { className: le(`${z}__content-container`), children: [
|
|
2792
2795
|
/* @__PURE__ */ f(
|
|
2793
2796
|
So,
|
|
2794
2797
|
{
|
|
2795
|
-
className:
|
|
2798
|
+
className: le(`${z}__description`),
|
|
2796
2799
|
"data-testid": `${e}-description`,
|
|
2797
2800
|
children: a
|
|
2798
2801
|
}
|
|
@@ -2812,7 +2815,7 @@ const Or = Y(
|
|
|
2812
2815
|
({ ["data-testid"]: e = "purpur-drawer-trigger", children: t, ...r }, o) => /* @__PURE__ */ f(_o, { asChild: !0, "data-testid": e, ref: o, ...r, children: t })
|
|
2813
2816
|
);
|
|
2814
2817
|
Or.displayName = "DrawerTrigger";
|
|
2815
|
-
const
|
|
2818
|
+
const Ze = ({
|
|
2816
2819
|
["data-testid"]: e = "purpur-drawer",
|
|
2817
2820
|
children: t,
|
|
2818
2821
|
className: r,
|
|
@@ -2820,17 +2823,17 @@ const Ge = ({
|
|
|
2820
2823
|
open: a = !1,
|
|
2821
2824
|
...n
|
|
2822
2825
|
}) => {
|
|
2823
|
-
const [s, i] =
|
|
2826
|
+
const [s, i] = We.useState(a), u = (l) => {
|
|
2824
2827
|
i(l), o?.(l);
|
|
2825
2828
|
};
|
|
2826
2829
|
return Ir(() => {
|
|
2827
2830
|
i(a);
|
|
2828
2831
|
}, [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 }) }) });
|
|
2829
2832
|
};
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
+
Ze.Trigger = Or;
|
|
2834
|
+
Ze.Content = Ar;
|
|
2835
|
+
Ze.displayName = "Drawer";
|
|
2833
2836
|
export {
|
|
2834
|
-
|
|
2837
|
+
Ze as Drawer
|
|
2835
2838
|
};
|
|
2836
2839
|
//# sourceMappingURL=drawer.es.js.map
|