@purpurds/drawer 6.11.0 → 6.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +4 -4
- package/dist/drawer-content.d.ts +4 -0
- package/dist/drawer-content.d.ts.map +1 -1
- package/dist/drawer-frame.d.ts +1 -0
- package/dist/drawer-frame.d.ts.map +1 -1
- package/dist/drawer-scroll-area.d.ts +1 -0
- package/dist/drawer-scroll-area.d.ts.map +1 -1
- package/dist/drawer.cjs.js +11 -11
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +374 -351
- package/dist/drawer.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +7 -7
- package/src/drawer-content.module.scss +15 -6
- package/src/drawer-content.tsx +12 -1
- package/src/drawer-frame.module.scss +14 -4
- package/src/drawer-frame.tsx +5 -0
- package/src/drawer-scroll-area.module.scss +8 -3
- package/src/drawer-scroll-area.tsx +7 -1
- package/src/drawer.stories.tsx +2 -0
package/dist/drawer.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as f, Fragment as
|
|
1
|
+
import { jsx as f, Fragment as q, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import Ie, { useState as Dt, createContext as Tt, forwardRef as
|
|
3
|
+
import Ie, { useState as Dt, createContext as Tt, forwardRef as z, useRef as Ot, useContext as Lt, useEffect as $t } from "react";
|
|
4
4
|
import * as Mt from "react-dom";
|
|
5
5
|
import It from "react-dom";
|
|
6
6
|
function R(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
@@ -53,15 +53,15 @@ function Dr(e, r = []) {
|
|
|
53
53
|
const i = c.createContext(s), u = t.length;
|
|
54
54
|
t = [...t, s];
|
|
55
55
|
const l = (p) => {
|
|
56
|
-
var
|
|
57
|
-
const { scope: v, children: m, ...
|
|
58
|
-
return /* @__PURE__ */ f(h.Provider, { value:
|
|
56
|
+
var g;
|
|
57
|
+
const { scope: v, children: m, ...w } = p, h = ((g = v == null ? void 0 : v[e]) == null ? void 0 : g[u]) || i, _ = c.useMemo(() => w, Object.values(w));
|
|
58
|
+
return /* @__PURE__ */ f(h.Provider, { value: _, children: m });
|
|
59
59
|
};
|
|
60
60
|
l.displayName = n + "Provider";
|
|
61
61
|
function d(p, v) {
|
|
62
62
|
var h;
|
|
63
|
-
const m = ((h = v == null ? void 0 : v[e]) == null ? void 0 : h[u]) || i,
|
|
64
|
-
if (
|
|
63
|
+
const m = ((h = v == null ? void 0 : v[e]) == null ? void 0 : h[u]) || i, w = c.useContext(m);
|
|
64
|
+
if (w) return w;
|
|
65
65
|
if (s !== void 0) return s;
|
|
66
66
|
throw new Error(`\`${p}\` must be used within \`${n}\``);
|
|
67
67
|
}
|
|
@@ -97,13 +97,13 @@ function Wt(...e) {
|
|
|
97
97
|
};
|
|
98
98
|
return t.scopeName = r.scopeName, t;
|
|
99
99
|
}
|
|
100
|
-
var
|
|
100
|
+
var ce = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
101
101
|
}, Ft = c.useId || (() => {
|
|
102
|
-
}),
|
|
102
|
+
}), Ut = 0;
|
|
103
103
|
function Pe(e) {
|
|
104
104
|
const [r, t] = c.useState(Ft());
|
|
105
|
-
return
|
|
106
|
-
t((o) => o ?? String(
|
|
105
|
+
return ce(() => {
|
|
106
|
+
t((o) => o ?? String(Ut++));
|
|
107
107
|
}, [e]), e || (r ? `radix-${r}` : "");
|
|
108
108
|
}
|
|
109
109
|
function T(e) {
|
|
@@ -121,7 +121,7 @@ function jt({
|
|
|
121
121
|
onChange: t = () => {
|
|
122
122
|
}
|
|
123
123
|
}) {
|
|
124
|
-
const [o, a] =
|
|
124
|
+
const [o, a] = qt({ defaultProp: r, onChange: t }), n = e !== void 0, s = n ? e : o, i = T(t), u = c.useCallback(
|
|
125
125
|
(l) => {
|
|
126
126
|
if (n) {
|
|
127
127
|
const p = typeof l == "function" ? l(e) : l;
|
|
@@ -133,7 +133,7 @@ function jt({
|
|
|
133
133
|
);
|
|
134
134
|
return [s, u];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function qt({
|
|
137
137
|
defaultProp: e,
|
|
138
138
|
onChange: r
|
|
139
139
|
}) {
|
|
@@ -160,7 +160,7 @@ var ke = c.forwardRef((e, r) => {
|
|
|
160
160
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
161
161
|
});
|
|
162
162
|
ke.displayName = "SlotClone";
|
|
163
|
-
var zt = ({ children: e }) => /* @__PURE__ */ f(
|
|
163
|
+
var zt = ({ children: e }) => /* @__PURE__ */ f(q, { children: e });
|
|
164
164
|
function Ht(e) {
|
|
165
165
|
return c.isValidElement(e) && e.type === zt;
|
|
166
166
|
}
|
|
@@ -229,15 +229,15 @@ var Kt = "DismissableLayer", We = "dismissableLayer.update", Zt = "dismissableLa
|
|
|
229
229
|
onInteractOutside: s,
|
|
230
230
|
onDismiss: i,
|
|
231
231
|
...u
|
|
232
|
-
} = e, l = c.useContext(Tr), [d, p] = c.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}),
|
|
233
|
-
const A =
|
|
234
|
-
!
|
|
235
|
-
}, v),
|
|
236
|
-
const A =
|
|
237
|
-
[...l.branches].some((
|
|
232
|
+
} = e, l = c.useContext(Tr), [d, p] = c.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), w = L(r, (S) => p(S)), h = Array.from(l.layers), [_] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = h.indexOf(_), E = d ? h.indexOf(d) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, y = E >= g, C = rn((S) => {
|
|
233
|
+
const A = S.target, P = [...l.branches].some((N) => N.contains(A));
|
|
234
|
+
!y || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
235
|
+
}, v), x = tn((S) => {
|
|
236
|
+
const A = S.target;
|
|
237
|
+
[...l.branches].some((N) => N.contains(A)) || (n == null || n(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
238
238
|
}, v);
|
|
239
|
-
return Gt((
|
|
240
|
-
E === l.layers.size - 1 && (o == null || o(
|
|
239
|
+
return Gt((S) => {
|
|
240
|
+
E === l.layers.size - 1 && (o == null || o(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
241
241
|
}, v), c.useEffect(() => {
|
|
242
242
|
if (d)
|
|
243
243
|
return t && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (tr = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), nr(), () => {
|
|
@@ -246,19 +246,19 @@ var Kt = "DismissableLayer", We = "dismissableLayer.update", Zt = "dismissableLa
|
|
|
246
246
|
}, [d, v, t, l]), c.useEffect(() => () => {
|
|
247
247
|
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), nr());
|
|
248
248
|
}, [d, l]), c.useEffect(() => {
|
|
249
|
-
const
|
|
250
|
-
return document.addEventListener(We,
|
|
249
|
+
const S = () => m({});
|
|
250
|
+
return document.addEventListener(We, S), () => document.removeEventListener(We, S);
|
|
251
251
|
}, []), /* @__PURE__ */ f(
|
|
252
252
|
O.div,
|
|
253
253
|
{
|
|
254
254
|
...u,
|
|
255
|
-
ref:
|
|
255
|
+
ref: w,
|
|
256
256
|
style: {
|
|
257
|
-
pointerEvents: b ?
|
|
257
|
+
pointerEvents: b ? y ? "auto" : "none" : void 0,
|
|
258
258
|
...e.style
|
|
259
259
|
},
|
|
260
|
-
onFocusCapture: R(e.onFocusCapture,
|
|
261
|
-
onBlurCapture: R(e.onBlurCapture,
|
|
260
|
+
onFocusCapture: R(e.onFocusCapture, x.onFocusCapture),
|
|
261
|
+
onBlurCapture: R(e.onBlurCapture, x.onBlurCapture),
|
|
262
262
|
onPointerDownCapture: R(
|
|
263
263
|
e.onPointerDownCapture,
|
|
264
264
|
C.onPointerDownCapture
|
|
@@ -331,7 +331,7 @@ function Lr(e, r, t, { discrete: o }) {
|
|
|
331
331
|
const a = t.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: t });
|
|
332
332
|
r && a.addEventListener(e, r, { once: !0 }), o ? Xt(a, n) : a.dispatchEvent(n);
|
|
333
333
|
}
|
|
334
|
-
var
|
|
334
|
+
var xe = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", or = { bubbles: !1, cancelable: !0 }, nn = "FocusScope", $r = c.forwardRef((e, r) => {
|
|
335
335
|
const {
|
|
336
336
|
loop: t = !1,
|
|
337
337
|
trapped: o = !1,
|
|
@@ -351,21 +351,21 @@ var Ne = "focusScope.autoFocusOnMount", xe = "focusScope.autoFocusOnUnmount", or
|
|
|
351
351
|
if (o) {
|
|
352
352
|
let h = function(b) {
|
|
353
353
|
if (m.paused || !i) return;
|
|
354
|
-
const
|
|
355
|
-
i.contains(
|
|
356
|
-
},
|
|
354
|
+
const y = b.target;
|
|
355
|
+
i.contains(y) ? p.current = y : j(p.current, { select: !0 });
|
|
356
|
+
}, _ = function(b) {
|
|
357
357
|
if (m.paused || !i) return;
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
},
|
|
358
|
+
const y = b.relatedTarget;
|
|
359
|
+
y !== null && (i.contains(y) || j(p.current, { select: !0 }));
|
|
360
|
+
}, g = function(b) {
|
|
361
361
|
if (document.activeElement === document.body)
|
|
362
362
|
for (const C of b)
|
|
363
|
-
C.removedNodes.length > 0 &&
|
|
363
|
+
C.removedNodes.length > 0 && j(i);
|
|
364
364
|
};
|
|
365
|
-
document.addEventListener("focusin", h), document.addEventListener("focusout",
|
|
366
|
-
const E = new MutationObserver(
|
|
365
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", _);
|
|
366
|
+
const E = new MutationObserver(g);
|
|
367
367
|
return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
368
|
-
document.removeEventListener("focusin", h), document.removeEventListener("focusout",
|
|
368
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", _), E.disconnect();
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
371
|
}, [o, i, m.paused]), c.useEffect(() => {
|
|
@@ -373,35 +373,35 @@ var Ne = "focusScope.autoFocusOnMount", xe = "focusScope.autoFocusOnUnmount", or
|
|
|
373
373
|
ir.add(m);
|
|
374
374
|
const h = document.activeElement;
|
|
375
375
|
if (!i.contains(h)) {
|
|
376
|
-
const
|
|
377
|
-
i.addEventListener(
|
|
376
|
+
const g = new CustomEvent(xe, or);
|
|
377
|
+
i.addEventListener(xe, l), i.dispatchEvent(g), g.defaultPrevented || (on(un(Mr(i)), { select: !0 }), document.activeElement === h && j(i));
|
|
378
378
|
}
|
|
379
379
|
return () => {
|
|
380
|
-
i.removeEventListener(
|
|
381
|
-
const
|
|
382
|
-
i.addEventListener(
|
|
380
|
+
i.removeEventListener(xe, l), setTimeout(() => {
|
|
381
|
+
const g = new CustomEvent(Ne, or);
|
|
382
|
+
i.addEventListener(Ne, d), i.dispatchEvent(g), g.defaultPrevented || j(h ?? document.body, { select: !0 }), i.removeEventListener(Ne, d), ir.remove(m);
|
|
383
383
|
}, 0);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
}, [i, l, d, m]);
|
|
387
|
-
const
|
|
387
|
+
const w = c.useCallback(
|
|
388
388
|
(h) => {
|
|
389
389
|
if (!t && !o || m.paused) return;
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
const E = h.currentTarget, [b,
|
|
393
|
-
b &&
|
|
390
|
+
const _ = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, g = document.activeElement;
|
|
391
|
+
if (_ && g) {
|
|
392
|
+
const E = h.currentTarget, [b, y] = an(E);
|
|
393
|
+
b && y ? !h.shiftKey && g === y ? (h.preventDefault(), t && j(b, { select: !0 })) : h.shiftKey && g === b && (h.preventDefault(), t && j(y, { select: !0 })) : g === E && h.preventDefault();
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
[t, o, m.paused]
|
|
397
397
|
);
|
|
398
|
-
return /* @__PURE__ */ f(O.div, { tabIndex: -1, ...s, ref: v, onKeyDown:
|
|
398
|
+
return /* @__PURE__ */ f(O.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
|
|
399
399
|
});
|
|
400
400
|
$r.displayName = nn;
|
|
401
401
|
function on(e, { select: r = !1 } = {}) {
|
|
402
402
|
const t = document.activeElement;
|
|
403
403
|
for (const o of e)
|
|
404
|
-
if (
|
|
404
|
+
if (j(o, { select: r }), document.activeElement !== t) return;
|
|
405
405
|
}
|
|
406
406
|
function an(e) {
|
|
407
407
|
const r = Mr(e), t = ar(r, e), o = ar(r.reverse(), e);
|
|
@@ -433,7 +433,7 @@ function sn(e, { upTo: r }) {
|
|
|
433
433
|
function cn(e) {
|
|
434
434
|
return e instanceof HTMLInputElement && "select" in e;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function j(e, { select: r = !1 } = {}) {
|
|
437
437
|
if (e && e.focus) {
|
|
438
438
|
const t = document.activeElement;
|
|
439
439
|
e.focus({ preventScroll: !0 }), e !== t && cn(e) && r && e.select();
|
|
@@ -463,7 +463,7 @@ function un(e) {
|
|
|
463
463
|
var dn = "Portal", Ir = c.forwardRef((e, r) => {
|
|
464
464
|
var i;
|
|
465
465
|
const { container: t, ...o } = e, [a, n] = c.useState(!1);
|
|
466
|
-
|
|
466
|
+
ce(() => n(!0), []);
|
|
467
467
|
const s = t || a && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
468
468
|
return s ? It.createPortal(/* @__PURE__ */ f(O.div, { ...o, ref: r }), s) : null;
|
|
469
469
|
});
|
|
@@ -471,11 +471,11 @@ Ir.displayName = dn;
|
|
|
471
471
|
function fn(e, r) {
|
|
472
472
|
return c.useReducer((t, o) => r[t][o] ?? t, e);
|
|
473
473
|
}
|
|
474
|
-
var
|
|
474
|
+
var H = (e) => {
|
|
475
475
|
const { present: r, children: t } = e, o = pn(r), a = typeof t == "function" ? t({ present: o.isPresent }) : c.Children.only(t), n = L(o.ref, vn(a));
|
|
476
476
|
return typeof t == "function" || o.isPresent ? c.cloneElement(a, { ref: n }) : null;
|
|
477
477
|
};
|
|
478
|
-
|
|
478
|
+
H.displayName = "Presence";
|
|
479
479
|
function pn(e) {
|
|
480
480
|
const [r, t] = c.useState(), o = c.useRef({}), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = fn(s, {
|
|
481
481
|
mounted: {
|
|
@@ -491,27 +491,27 @@ function pn(e) {
|
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
493
|
return c.useEffect(() => {
|
|
494
|
-
const l =
|
|
494
|
+
const l = le(o.current);
|
|
495
495
|
n.current = i === "mounted" ? l : "none";
|
|
496
|
-
}, [i]),
|
|
496
|
+
}, [i]), ce(() => {
|
|
497
497
|
const l = o.current, d = a.current;
|
|
498
498
|
if (d !== e) {
|
|
499
|
-
const v = n.current, m =
|
|
499
|
+
const v = n.current, m = le(l);
|
|
500
500
|
e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(d && v !== m ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
501
501
|
}
|
|
502
|
-
}, [e, u]),
|
|
502
|
+
}, [e, u]), ce(() => {
|
|
503
503
|
if (r) {
|
|
504
504
|
let l;
|
|
505
505
|
const d = r.ownerDocument.defaultView ?? window, p = (m) => {
|
|
506
|
-
const h =
|
|
506
|
+
const h = le(o.current).includes(m.animationName);
|
|
507
507
|
if (m.target === r && h && (u("ANIMATION_END"), !a.current)) {
|
|
508
|
-
const
|
|
508
|
+
const _ = r.style.animationFillMode;
|
|
509
509
|
r.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
510
|
-
r.style.animationFillMode === "forwards" && (r.style.animationFillMode =
|
|
510
|
+
r.style.animationFillMode === "forwards" && (r.style.animationFillMode = _);
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
}, v = (m) => {
|
|
514
|
-
m.target === r && (n.current =
|
|
514
|
+
m.target === r && (n.current = le(o.current));
|
|
515
515
|
};
|
|
516
516
|
return r.addEventListener("animationstart", v), r.addEventListener("animationcancel", p), r.addEventListener("animationend", p), () => {
|
|
517
517
|
d.clearTimeout(l), r.removeEventListener("animationstart", v), r.removeEventListener("animationcancel", p), r.removeEventListener("animationend", p);
|
|
@@ -525,7 +525,7 @@ function pn(e) {
|
|
|
525
525
|
}, [])
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function le(e) {
|
|
529
529
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
530
530
|
}
|
|
531
531
|
function vn(e) {
|
|
@@ -695,12 +695,12 @@ var Fr = Cn(), De = function() {
|
|
|
695
695
|
onScrollCapture: De,
|
|
696
696
|
onWheelCapture: De,
|
|
697
697
|
onTouchMoveCapture: De
|
|
698
|
-
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar, m = e.noIsolation,
|
|
698
|
+
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar, m = e.noIsolation, w = e.inert, h = e.allowPinchZoom, _ = e.as, g = _ === void 0 ? "div" : _, E = e.gapMode, b = kr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), y = v, C = yn([t, r]), x = I(I({}, b), a);
|
|
699
699
|
return c.createElement(
|
|
700
700
|
c.Fragment,
|
|
701
701
|
null,
|
|
702
|
-
d && c.createElement(
|
|
703
|
-
s ? c.cloneElement(c.Children.only(i), I(I({},
|
|
702
|
+
d && c.createElement(y, { sideCar: Fr, removeScrollBar: l, shards: p, noIsolation: m, inert: w, setCallbacks: n, allowPinchZoom: !!h, lockRef: t, gapMode: E }),
|
|
703
|
+
s ? c.cloneElement(c.Children.only(i), I(I({}, x), { ref: C })) : c.createElement(g, I({}, x, { className: u, ref: C }), i)
|
|
704
704
|
);
|
|
705
705
|
});
|
|
706
706
|
Se.defaultProps = {
|
|
@@ -712,16 +712,16 @@ Se.classNames = {
|
|
|
712
712
|
fullWidth: _e,
|
|
713
713
|
zeroRight: ge
|
|
714
714
|
};
|
|
715
|
-
var
|
|
715
|
+
var xn = function() {
|
|
716
716
|
if (typeof __webpack_nonce__ < "u")
|
|
717
717
|
return __webpack_nonce__;
|
|
718
718
|
};
|
|
719
|
-
function
|
|
719
|
+
function Nn() {
|
|
720
720
|
if (!document)
|
|
721
721
|
return null;
|
|
722
722
|
var e = document.createElement("style");
|
|
723
723
|
e.type = "text/css";
|
|
724
|
-
var r =
|
|
724
|
+
var r = xn();
|
|
725
725
|
return r && e.setAttribute("nonce", r), e;
|
|
726
726
|
}
|
|
727
727
|
function An(e, r) {
|
|
@@ -735,7 +735,7 @@ var Dn = function() {
|
|
|
735
735
|
var e = 0, r = null;
|
|
736
736
|
return {
|
|
737
737
|
add: function(t) {
|
|
738
|
-
e == 0 && (r =
|
|
738
|
+
e == 0 && (r = Nn()) && (An(r, t), Rn(r)), e++;
|
|
739
739
|
},
|
|
740
740
|
remove: function() {
|
|
741
741
|
e--, !e && r && (r.parentNode && r.parentNode.removeChild(r), r = null);
|
|
@@ -750,7 +750,7 @@ var Dn = function() {
|
|
|
750
750
|
};
|
|
751
751
|
}, [r && t]);
|
|
752
752
|
};
|
|
753
|
-
},
|
|
753
|
+
}, Ur = function() {
|
|
754
754
|
var e = Tn(), r = function(t) {
|
|
755
755
|
var o = t.styles, a = t.dynamic;
|
|
756
756
|
return e(o, a), null;
|
|
@@ -776,14 +776,14 @@ var Dn = function() {
|
|
|
776
776
|
right: r[2],
|
|
777
777
|
gap: Math.max(0, o - t + r[2] - r[0])
|
|
778
778
|
};
|
|
779
|
-
}, Mn =
|
|
779
|
+
}, Mn = Ur(), re = "data-scroll-locked", In = function(e, r, t, o) {
|
|
780
780
|
var a = e.left, n = e.top, s = e.right, i = e.gap;
|
|
781
781
|
return t === void 0 && (t = "margin"), `
|
|
782
782
|
.`.concat(gn, ` {
|
|
783
783
|
overflow: hidden `).concat(o, `;
|
|
784
784
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
785
785
|
}
|
|
786
|
-
body[`).concat(
|
|
786
|
+
body[`).concat(re, `] {
|
|
787
787
|
overflow: hidden `).concat(o, `;
|
|
788
788
|
overscroll-behavior: contain;
|
|
789
789
|
`).concat([
|
|
@@ -816,18 +816,18 @@ var Dn = function() {
|
|
|
816
816
|
margin-right: 0 `).concat(o, `;
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
body[`).concat(
|
|
819
|
+
body[`).concat(re, `] {
|
|
820
820
|
`).concat(_n, ": ").concat(i, `px;
|
|
821
821
|
}
|
|
822
822
|
`);
|
|
823
823
|
}, ur = function() {
|
|
824
|
-
var e = parseInt(document.body.getAttribute(
|
|
824
|
+
var e = parseInt(document.body.getAttribute(re) || "0", 10);
|
|
825
825
|
return isFinite(e) ? e : 0;
|
|
826
826
|
}, kn = function() {
|
|
827
827
|
c.useEffect(function() {
|
|
828
|
-
return document.body.setAttribute(
|
|
828
|
+
return document.body.setAttribute(re, (ur() + 1).toString()), function() {
|
|
829
829
|
var e = ur() - 1;
|
|
830
|
-
e <= 0 ? document.body.removeAttribute(
|
|
830
|
+
e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
|
|
831
831
|
};
|
|
832
832
|
}, []);
|
|
833
833
|
}, Wn = function(e) {
|
|
@@ -840,12 +840,12 @@ var Dn = function() {
|
|
|
840
840
|
}, Fe = !1;
|
|
841
841
|
if (typeof window < "u")
|
|
842
842
|
try {
|
|
843
|
-
var
|
|
843
|
+
var ue = Object.defineProperty({}, "passive", {
|
|
844
844
|
get: function() {
|
|
845
845
|
return Fe = !0, !0;
|
|
846
846
|
}
|
|
847
847
|
});
|
|
848
|
-
window.addEventListener("test",
|
|
848
|
+
window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
|
|
849
849
|
} catch {
|
|
850
850
|
Fe = !1;
|
|
851
851
|
}
|
|
@@ -860,7 +860,7 @@ var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
|
860
860
|
t[r] !== "hidden" && // contains scroll inside self
|
|
861
861
|
!(t.overflowY === t.overflowX && !Fn(e) && t[r] === "visible")
|
|
862
862
|
);
|
|
863
|
-
},
|
|
863
|
+
}, Un = function(e) {
|
|
864
864
|
return jr(e, "overflowY");
|
|
865
865
|
}, jn = function(e) {
|
|
866
866
|
return jr(e, "overflowX");
|
|
@@ -868,7 +868,7 @@ var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
|
868
868
|
var t = r.ownerDocument, o = r;
|
|
869
869
|
do {
|
|
870
870
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
871
|
-
var a =
|
|
871
|
+
var a = qr(e, o);
|
|
872
872
|
if (a) {
|
|
873
873
|
var n = zr(e, o), s = n[1], i = n[2];
|
|
874
874
|
if (s > i)
|
|
@@ -877,7 +877,7 @@ var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
|
877
877
|
o = o.parentNode;
|
|
878
878
|
} while (o && o !== t.body);
|
|
879
879
|
return !1;
|
|
880
|
-
},
|
|
880
|
+
}, qn = function(e) {
|
|
881
881
|
var r = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
|
|
882
882
|
return [
|
|
883
883
|
r,
|
|
@@ -891,24 +891,24 @@ var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
|
891
891
|
t,
|
|
892
892
|
o
|
|
893
893
|
];
|
|
894
|
-
},
|
|
895
|
-
return e === "v" ?
|
|
894
|
+
}, qr = function(e, r) {
|
|
895
|
+
return e === "v" ? Un(r) : jn(r);
|
|
896
896
|
}, zr = function(e, r) {
|
|
897
|
-
return e === "v" ?
|
|
897
|
+
return e === "v" ? qn(r) : zn(r);
|
|
898
898
|
}, Hn = function(e, r) {
|
|
899
899
|
return e === "h" && r === "rtl" ? -1 : 1;
|
|
900
900
|
}, Bn = function(e, r, t, o, a) {
|
|
901
901
|
var n = Hn(e, window.getComputedStyle(r).direction), s = n * o, i = t.target, u = r.contains(i), l = !1, d = s > 0, p = 0, v = 0;
|
|
902
902
|
do {
|
|
903
|
-
var m = zr(e, i),
|
|
904
|
-
(
|
|
903
|
+
var m = zr(e, i), w = m[0], h = m[1], _ = m[2], g = h - _ - n * w;
|
|
904
|
+
(w || g) && qr(e, i) && (p += g, v += w), i instanceof ShadowRoot ? i = i.host : i = i.parentNode;
|
|
905
905
|
} while (
|
|
906
906
|
// portaled content
|
|
907
907
|
!u && i !== document.body || // self content
|
|
908
908
|
u && (r.contains(i) || r === i)
|
|
909
909
|
);
|
|
910
910
|
return (d && Math.abs(p) < 1 || !d && Math.abs(v) < 1) && (l = !0), l;
|
|
911
|
-
},
|
|
911
|
+
}, de = function(e) {
|
|
912
912
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
913
913
|
}, fr = function(e) {
|
|
914
914
|
return [e.deltaX, e.deltaY];
|
|
@@ -923,67 +923,67 @@ var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
|
923
923
|
`);
|
|
924
924
|
}, Xn = 0, G = [];
|
|
925
925
|
function Gn(e) {
|
|
926
|
-
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Xn++)[0], n = c.useState(
|
|
926
|
+
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Xn++)[0], n = c.useState(Ur)[0], s = c.useRef(e);
|
|
927
927
|
c.useEffect(function() {
|
|
928
928
|
s.current = e;
|
|
929
929
|
}, [e]), c.useEffect(function() {
|
|
930
930
|
if (e.inert) {
|
|
931
931
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
932
932
|
var h = mn([e.lockRef.current], (e.shards || []).map(pr), !0).filter(Boolean);
|
|
933
|
-
return h.forEach(function(
|
|
934
|
-
return
|
|
933
|
+
return h.forEach(function(_) {
|
|
934
|
+
return _.classList.add("allow-interactivity-".concat(a));
|
|
935
935
|
}), function() {
|
|
936
|
-
document.body.classList.remove("block-interactivity-".concat(a)), h.forEach(function(
|
|
937
|
-
return
|
|
936
|
+
document.body.classList.remove("block-interactivity-".concat(a)), h.forEach(function(_) {
|
|
937
|
+
return _.classList.remove("allow-interactivity-".concat(a));
|
|
938
938
|
});
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
941
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
942
|
-
var i = c.useCallback(function(h,
|
|
942
|
+
var i = c.useCallback(function(h, _) {
|
|
943
943
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
944
944
|
return !s.current.allowPinchZoom;
|
|
945
|
-
var
|
|
946
|
-
if ("touches" in h &&
|
|
945
|
+
var g = de(h), E = t.current, b = "deltaX" in h ? h.deltaX : E[0] - g[0], y = "deltaY" in h ? h.deltaY : E[1] - g[1], C, x = h.target, S = Math.abs(b) > Math.abs(y) ? "h" : "v";
|
|
946
|
+
if ("touches" in h && S === "h" && x.type === "range")
|
|
947
947
|
return !1;
|
|
948
|
-
var A = dr(
|
|
948
|
+
var A = dr(S, x);
|
|
949
949
|
if (!A)
|
|
950
950
|
return !0;
|
|
951
|
-
if (A ? C =
|
|
951
|
+
if (A ? C = S : (C = S === "v" ? "h" : "v", A = dr(S, x)), !A)
|
|
952
952
|
return !1;
|
|
953
|
-
if (!o.current && "changedTouches" in h && (b ||
|
|
953
|
+
if (!o.current && "changedTouches" in h && (b || y) && (o.current = C), !C)
|
|
954
954
|
return !0;
|
|
955
955
|
var P = o.current || C;
|
|
956
|
-
return Bn(P,
|
|
956
|
+
return Bn(P, _, h, P === "h" ? b : y);
|
|
957
957
|
}, []), u = c.useCallback(function(h) {
|
|
958
|
-
var
|
|
958
|
+
var _ = h;
|
|
959
959
|
if (!(!G.length || G[G.length - 1] !== n)) {
|
|
960
|
-
var
|
|
961
|
-
return C.name ===
|
|
960
|
+
var g = "deltaY" in _ ? fr(_) : de(_), E = r.current.filter(function(C) {
|
|
961
|
+
return C.name === _.type && (C.target === _.target || _.target === C.shadowParent) && Vn(C.delta, g);
|
|
962
962
|
})[0];
|
|
963
963
|
if (E && E.should) {
|
|
964
|
-
|
|
964
|
+
_.cancelable && _.preventDefault();
|
|
965
965
|
return;
|
|
966
966
|
}
|
|
967
967
|
if (!E) {
|
|
968
968
|
var b = (s.current.shards || []).map(pr).filter(Boolean).filter(function(C) {
|
|
969
|
-
return C.contains(
|
|
970
|
-
}),
|
|
971
|
-
|
|
969
|
+
return C.contains(_.target);
|
|
970
|
+
}), y = b.length > 0 ? i(_, b[0]) : !s.current.noIsolation;
|
|
971
|
+
y && _.cancelable && _.preventDefault();
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
}, []), l = c.useCallback(function(h,
|
|
975
|
-
var b = { name: h, delta:
|
|
974
|
+
}, []), l = c.useCallback(function(h, _, g, E) {
|
|
975
|
+
var b = { name: h, delta: _, target: g, should: E, shadowParent: Kn(g) };
|
|
976
976
|
r.current.push(b), setTimeout(function() {
|
|
977
|
-
r.current = r.current.filter(function(
|
|
978
|
-
return
|
|
977
|
+
r.current = r.current.filter(function(y) {
|
|
978
|
+
return y !== b;
|
|
979
979
|
});
|
|
980
980
|
}, 1);
|
|
981
981
|
}, []), d = c.useCallback(function(h) {
|
|
982
|
-
t.current =
|
|
982
|
+
t.current = de(h), o.current = void 0;
|
|
983
983
|
}, []), p = c.useCallback(function(h) {
|
|
984
984
|
l(h.type, fr(h), h.target, i(h, e.lockRef.current));
|
|
985
985
|
}, []), v = c.useCallback(function(h) {
|
|
986
|
-
l(h.type,
|
|
986
|
+
l(h.type, de(h), h.target, i(h, e.lockRef.current));
|
|
987
987
|
}, []);
|
|
988
988
|
c.useEffect(function() {
|
|
989
989
|
return G.push(n), e.setCallbacks({
|
|
@@ -996,11 +996,11 @@ function Gn(e) {
|
|
|
996
996
|
}), document.removeEventListener("wheel", u, X), document.removeEventListener("touchmove", u, X), document.removeEventListener("touchstart", d, X);
|
|
997
997
|
};
|
|
998
998
|
}, []);
|
|
999
|
-
var m = e.removeScrollBar,
|
|
999
|
+
var m = e.removeScrollBar, w = e.inert;
|
|
1000
1000
|
return c.createElement(
|
|
1001
1001
|
c.Fragment,
|
|
1002
1002
|
null,
|
|
1003
|
-
|
|
1003
|
+
w ? c.createElement(n, { styles: Yn(a) }) : null,
|
|
1004
1004
|
m ? c.createElement(Wn, { gapMode: e.gapMode }) : null
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
@@ -1019,7 +1019,7 @@ var Qn = function(e) {
|
|
|
1019
1019
|
return null;
|
|
1020
1020
|
var r = Array.isArray(e) ? e[0] : e;
|
|
1021
1021
|
return r.ownerDocument.body;
|
|
1022
|
-
}, K = /* @__PURE__ */ new WeakMap(),
|
|
1022
|
+
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, Br = function(e) {
|
|
1023
1023
|
return e && (e.host || Br(e.parentNode));
|
|
1024
1024
|
}, Jn = function(e, r) {
|
|
1025
1025
|
return r.map(function(t) {
|
|
@@ -1032,8 +1032,8 @@ var Qn = function(e) {
|
|
|
1032
1032
|
});
|
|
1033
1033
|
}, eo = function(e, r, t, o) {
|
|
1034
1034
|
var a = Jn(r, Array.isArray(e) ? e : [e]);
|
|
1035
|
-
|
|
1036
|
-
var n =
|
|
1035
|
+
pe[t] || (pe[t] = /* @__PURE__ */ new WeakMap());
|
|
1036
|
+
var n = pe[t], s = [], i = /* @__PURE__ */ new Set(), u = new Set(a), l = function(p) {
|
|
1037
1037
|
!p || i.has(p) || (i.add(p), l(p.parentNode));
|
|
1038
1038
|
};
|
|
1039
1039
|
a.forEach(l);
|
|
@@ -1043,18 +1043,18 @@ var Qn = function(e) {
|
|
|
1043
1043
|
d(v);
|
|
1044
1044
|
else
|
|
1045
1045
|
try {
|
|
1046
|
-
var m = v.getAttribute(o),
|
|
1047
|
-
K.set(v, h), n.set(v,
|
|
1048
|
-
} catch (
|
|
1049
|
-
console.error("aria-hidden: cannot operate on ", v,
|
|
1046
|
+
var m = v.getAttribute(o), w = m !== null && m !== "false", h = (K.get(v) || 0) + 1, _ = (n.get(v) || 0) + 1;
|
|
1047
|
+
K.set(v, h), n.set(v, _), s.push(v), h === 1 && w && fe.set(v, !0), _ === 1 && v.setAttribute(t, "true"), w || v.setAttribute(o, "true");
|
|
1048
|
+
} catch (g) {
|
|
1049
|
+
console.error("aria-hidden: cannot operate on ", v, g);
|
|
1050
1050
|
}
|
|
1051
1051
|
});
|
|
1052
1052
|
};
|
|
1053
1053
|
return d(r), i.clear(), Oe++, function() {
|
|
1054
1054
|
s.forEach(function(p) {
|
|
1055
1055
|
var v = K.get(p) - 1, m = n.get(p) - 1;
|
|
1056
|
-
K.set(p, v), n.set(p, m), v || (
|
|
1057
|
-
}), Oe--, Oe || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(),
|
|
1056
|
+
K.set(p, v), n.set(p, m), v || (fe.has(p) || p.removeAttribute(o), fe.delete(p)), m || p.removeAttribute(t);
|
|
1057
|
+
}), Oe--, Oe || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {});
|
|
1058
1058
|
};
|
|
1059
1059
|
}, ro = function(e, r, t) {
|
|
1060
1060
|
t === void 0 && (t = "data-aria-hidden");
|
|
@@ -1116,13 +1116,13 @@ var Ye = "DialogPortal", [no, Kr] = Vr(Ye, {
|
|
|
1116
1116
|
forceMount: void 0
|
|
1117
1117
|
}), Zr = (e) => {
|
|
1118
1118
|
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = M(Ye, r);
|
|
1119
|
-
return /* @__PURE__ */ f(no, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(
|
|
1119
|
+
return /* @__PURE__ */ f(no, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(H, { present: t || n.open, children: /* @__PURE__ */ f(Ir, { asChild: !0, container: a, children: s }) })) });
|
|
1120
1120
|
};
|
|
1121
1121
|
Zr.displayName = Ye;
|
|
1122
1122
|
var we = "DialogOverlay", Qr = c.forwardRef(
|
|
1123
1123
|
(e, r) => {
|
|
1124
1124
|
const t = Kr(we, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(we, e.__scopeDialog);
|
|
1125
|
-
return n.modal ? /* @__PURE__ */ f(
|
|
1125
|
+
return n.modal ? /* @__PURE__ */ f(H, { present: o || n.open, children: /* @__PURE__ */ f(oo, { ...a, ref: r }) }) : null;
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
1128
|
Qr.displayName = we;
|
|
@@ -1143,16 +1143,16 @@ var oo = c.forwardRef(
|
|
|
1143
1143
|
) })
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
),
|
|
1146
|
+
), V = "DialogContent", Jr = c.forwardRef(
|
|
1147
1147
|
(e, r) => {
|
|
1148
|
-
const t = Kr(
|
|
1149
|
-
return /* @__PURE__ */ f(
|
|
1148
|
+
const t = Kr(V, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(V, e.__scopeDialog);
|
|
1149
|
+
return /* @__PURE__ */ f(H, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(ao, { ...a, ref: r }) : /* @__PURE__ */ f(io, { ...a, ref: r }) });
|
|
1150
1150
|
}
|
|
1151
1151
|
);
|
|
1152
|
-
Jr.displayName =
|
|
1152
|
+
Jr.displayName = V;
|
|
1153
1153
|
var ao = c.forwardRef(
|
|
1154
1154
|
(e, r) => {
|
|
1155
|
-
const t = M(
|
|
1155
|
+
const t = M(V, e.__scopeDialog), o = c.useRef(null), a = L(r, t.contentRef, o);
|
|
1156
1156
|
return c.useEffect(() => {
|
|
1157
1157
|
const n = o.current;
|
|
1158
1158
|
if (n) return ro(n);
|
|
@@ -1180,7 +1180,7 @@ var ao = c.forwardRef(
|
|
|
1180
1180
|
}
|
|
1181
1181
|
), io = c.forwardRef(
|
|
1182
1182
|
(e, r) => {
|
|
1183
|
-
const t = M(
|
|
1183
|
+
const t = M(V, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
|
|
1184
1184
|
return /* @__PURE__ */ f(
|
|
1185
1185
|
et,
|
|
1186
1186
|
{
|
|
@@ -1203,8 +1203,8 @@ var ao = c.forwardRef(
|
|
|
1203
1203
|
}
|
|
1204
1204
|
), et = c.forwardRef(
|
|
1205
1205
|
(e, r) => {
|
|
1206
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = M(
|
|
1207
|
-
return hn(), /* @__PURE__ */ D(
|
|
1206
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = M(V, t), u = c.useRef(null), l = L(r, u);
|
|
1207
|
+
return hn(), /* @__PURE__ */ D(q, { children: [
|
|
1208
1208
|
/* @__PURE__ */ f(
|
|
1209
1209
|
$r,
|
|
1210
1210
|
{
|
|
@@ -1228,7 +1228,7 @@ var ao = c.forwardRef(
|
|
|
1228
1228
|
)
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
/* @__PURE__ */ D(
|
|
1231
|
+
/* @__PURE__ */ D(q, { children: [
|
|
1232
1232
|
/* @__PURE__ */ f(so, { titleId: i.titleId }),
|
|
1233
1233
|
/* @__PURE__ */ f(lo, { contentRef: u, descriptionId: i.descriptionId })
|
|
1234
1234
|
] })
|
|
@@ -1267,7 +1267,7 @@ function Ge(e) {
|
|
|
1267
1267
|
return e ? "open" : "closed";
|
|
1268
1268
|
}
|
|
1269
1269
|
var it = "DialogTitleWarning", [Ga, st] = kt(it, {
|
|
1270
|
-
contentName:
|
|
1270
|
+
contentName: V,
|
|
1271
1271
|
titleName: Xe,
|
|
1272
1272
|
docsSlug: "dialog"
|
|
1273
1273
|
}), so = ({ titleId: e }) => {
|
|
@@ -1286,7 +1286,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${r.do
|
|
|
1286
1286
|
const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
|
|
1287
1287
|
r && a && (document.getElementById(r) || console.warn(o));
|
|
1288
1288
|
}, [o, e, r]), null;
|
|
1289
|
-
}, uo = Yr, fo = Gr, po = Zr, vo = Qr, ho = Jr,
|
|
1289
|
+
}, uo = Yr, fo = Gr, po = Zr, vo = Qr, ho = Jr, ve = rt, mo = nt, go = at;
|
|
1290
1290
|
function _o(e) {
|
|
1291
1291
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1292
1292
|
}
|
|
@@ -1330,22 +1330,23 @@ function wo() {
|
|
|
1330
1330
|
}(Le)), Le.exports;
|
|
1331
1331
|
}
|
|
1332
1332
|
var bo = wo();
|
|
1333
|
-
const
|
|
1334
|
-
"purpur-drawer-content": "_purpur-drawer-
|
|
1333
|
+
const Y = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "_drawerSmallScreenAnimation_1xk2s_1", Eo = "_drawerLargeScreenAnimation_1xk2s_1", Co = "_slideDown_1xk2s_1", Po = "_overlayAnimation_1xk2s_1", xo = {
|
|
1334
|
+
"purpur-drawer-content": "_purpur-drawer-content_1xk2s_1",
|
|
1335
1335
|
drawerSmallScreenAnimation: So,
|
|
1336
|
+
"purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_1xk2s_12",
|
|
1336
1337
|
drawerLargeScreenAnimation: Eo,
|
|
1337
|
-
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-
|
|
1338
|
-
"purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-
|
|
1338
|
+
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_1xk2s_35",
|
|
1339
|
+
"purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-frame_1xk2s_40",
|
|
1339
1340
|
slideDown: Co,
|
|
1340
|
-
"purpur-drawer-content__description": "_purpur-drawer-
|
|
1341
|
-
"purpur-drawer-overlay": "_purpur-drawer-
|
|
1341
|
+
"purpur-drawer-content__description": "_purpur-drawer-content__description_1xk2s_50",
|
|
1342
|
+
"purpur-drawer-overlay": "_purpur-drawer-overlay_1xk2s_61",
|
|
1342
1343
|
overlayAnimation: Po
|
|
1343
|
-
},
|
|
1344
|
+
}, No = {
|
|
1344
1345
|
"purpur-drawer-container--header": "_purpur-drawer-container--header_1r6tb_1",
|
|
1345
1346
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1r6tb_5",
|
|
1346
1347
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1r6tb_8",
|
|
1347
1348
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1r6tb_11"
|
|
1348
|
-
}, Ao =
|
|
1349
|
+
}, Ao = Y.bind(No), $e = "purpur-drawer-container", ee = z(
|
|
1349
1350
|
({
|
|
1350
1351
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1351
1352
|
children: r,
|
|
@@ -1367,15 +1368,16 @@ const V = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "_drawerSmallScre
|
|
|
1367
1368
|
return /* @__PURE__ */ f("div", { className: i, "data-testid": e, ref: s, ...n, children: r });
|
|
1368
1369
|
}
|
|
1369
1370
|
);
|
|
1370
|
-
|
|
1371
|
+
ee.displayName = "DrawerContainer";
|
|
1371
1372
|
const Ro = {
|
|
1372
|
-
"purpur-drawer-frame": "_purpur-drawer-
|
|
1373
|
-
"purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-
|
|
1374
|
-
"purpur-drawer-frame__header": "_purpur-drawer-
|
|
1375
|
-
"purpur-drawer-frame__body": "_purpur-drawer-
|
|
1376
|
-
"purpur-drawer-
|
|
1377
|
-
"purpur-drawer-
|
|
1378
|
-
"purpur-drawer-frame__content-container
|
|
1373
|
+
"purpur-drawer-frame": "_purpur-drawer-frame_1gdvv_1",
|
|
1374
|
+
"purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_1gdvv_17",
|
|
1375
|
+
"purpur-drawer-frame__header": "_purpur-drawer-frame__header_1gdvv_20",
|
|
1376
|
+
"purpur-drawer-frame__body": "_purpur-drawer-frame__body_1gdvv_23",
|
|
1377
|
+
"purpur-drawer-frame--fit-to-content": "_purpur-drawer-frame--fit-to-content_1gdvv_27",
|
|
1378
|
+
"purpur-drawer-frame__footer": "_purpur-drawer-frame__footer_1gdvv_36",
|
|
1379
|
+
"purpur-drawer-frame__content-container": "_purpur-drawer-frame__content-container_1gdvv_39",
|
|
1380
|
+
"purpur-drawer-frame__content-container--no-footer": "_purpur-drawer-frame__content-container--no-footer_1gdvv_44"
|
|
1379
1381
|
}, Do = {
|
|
1380
1382
|
"purpur-drawer-handle": "_purpur-drawer-handle_3n0ew_1"
|
|
1381
1383
|
}, To = (e, r, t, o, a, n) => ({
|
|
@@ -1385,19 +1387,19 @@ const Ro = {
|
|
|
1385
1387
|
onPointerMove: (l) => {
|
|
1386
1388
|
if (!e.current)
|
|
1387
1389
|
return;
|
|
1388
|
-
const d = l.clientY - e.current.y, p = !!r.current, v = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2,
|
|
1389
|
-
p ? (r.current =
|
|
1390
|
+
const d = l.clientY - e.current.y, p = !!r.current, v = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2, w = { y: v }, h = { originalEvent: l, delta: w };
|
|
1391
|
+
p ? (r.current = w, o(h)) : hr(w, 0) ? (r.current = w, t(), l.target.setPointerCapture(l.pointerId)) : Math.abs(d) > m && (e.current = null);
|
|
1390
1392
|
},
|
|
1391
1393
|
onPointerUp: (l) => {
|
|
1392
1394
|
const d = r.current, p = l.target;
|
|
1393
1395
|
if (p.hasPointerCapture(l.pointerId) && p.releasePointerCapture(l.pointerId), r.current = null, e.current = null, d) {
|
|
1394
1396
|
const v = l.currentTarget, m = { originalEvent: l, delta: d };
|
|
1395
|
-
hr(d, 0) && d.y > 200 ? n(m) : a(), v.addEventListener("click", (
|
|
1397
|
+
hr(d, 0) && d.y > 200 ? n(m) : a(), v.addEventListener("click", (w) => w.preventDefault(), {
|
|
1396
1398
|
once: !0
|
|
1397
1399
|
});
|
|
1398
1400
|
}
|
|
1399
1401
|
}
|
|
1400
|
-
}), hr = (e, r = 0) => Math.abs(e.y) > r, Oo =
|
|
1402
|
+
}), hr = (e, r = 0) => Math.abs(e.y) > r, Oo = Y.bind(Do), Lo = "purpur-drawer-handle", lt = z(
|
|
1401
1403
|
({
|
|
1402
1404
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1403
1405
|
className: r,
|
|
@@ -1476,7 +1478,7 @@ function Io() {
|
|
|
1476
1478
|
}(mr)), mr.exports;
|
|
1477
1479
|
}
|
|
1478
1480
|
var ko = Io();
|
|
1479
|
-
const _r = /* @__PURE__ */ Mo(ko), Wo = "_rotate_1xozj_1", Fo = "_dash_1xozj_1",
|
|
1481
|
+
const _r = /* @__PURE__ */ Mo(ko), Wo = "_rotate_1xozj_1", Fo = "_dash_1xozj_1", ne = {
|
|
1480
1482
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1481
1483
|
rotate: Wo,
|
|
1482
1484
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -1488,26 +1490,26 @@ const _r = /* @__PURE__ */ Mo(ko), Wo = "_rotate_1xozj_1", Fo = "_dash_1xozj_1",
|
|
|
1488
1490
|
dash: Fo,
|
|
1489
1491
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1490
1492
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1491
|
-
},
|
|
1493
|
+
}, oe = "purpur-spinner", Uo = {
|
|
1492
1494
|
SM: "sm"
|
|
1493
1495
|
}, jo = ({
|
|
1494
1496
|
["data-testid"]: e,
|
|
1495
1497
|
disabled: r = !1,
|
|
1496
1498
|
negative: t = !1,
|
|
1497
|
-
size: o =
|
|
1499
|
+
size: o = Uo.SM,
|
|
1498
1500
|
...a
|
|
1499
1501
|
}) => /* @__PURE__ */ f(
|
|
1500
1502
|
"div",
|
|
1501
1503
|
{
|
|
1502
|
-
className: _r([
|
|
1504
|
+
className: _r([ne[oe], ne[`${oe}--${o}`]]),
|
|
1503
1505
|
"data-testid": e,
|
|
1504
1506
|
...a,
|
|
1505
1507
|
children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1506
1508
|
"circle",
|
|
1507
1509
|
{
|
|
1508
|
-
className: _r(
|
|
1509
|
-
[
|
|
1510
|
-
[
|
|
1510
|
+
className: _r(ne[`${oe}__circle`], {
|
|
1511
|
+
[ne[`${oe}__circle--disabled`]]: r,
|
|
1512
|
+
[ne[`${oe}__circle--negative`]]: t
|
|
1511
1513
|
}),
|
|
1512
1514
|
cx: "25",
|
|
1513
1515
|
cy: "25",
|
|
@@ -1516,7 +1518,7 @@ const _r = /* @__PURE__ */ Mo(ko), Wo = "_rotate_1xozj_1", Fo = "_dash_1xozj_1",
|
|
|
1516
1518
|
) })
|
|
1517
1519
|
}
|
|
1518
1520
|
);
|
|
1519
|
-
function
|
|
1521
|
+
function qo(e) {
|
|
1520
1522
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1521
1523
|
}
|
|
1522
1524
|
var wr = { exports: {} };
|
|
@@ -1559,7 +1561,7 @@ function zo() {
|
|
|
1559
1561
|
}(wr)), wr.exports;
|
|
1560
1562
|
}
|
|
1561
1563
|
var Ho = zo();
|
|
1562
|
-
const Bo = /* @__PURE__ */
|
|
1564
|
+
const Bo = /* @__PURE__ */ qo(Ho), Vo = {
|
|
1563
1565
|
"purpur-button": "_purpur-button_w455q_1",
|
|
1564
1566
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
1565
1567
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -1584,7 +1586,7 @@ const Bo = /* @__PURE__ */ Uo(Ho), Vo = {
|
|
|
1584
1586
|
}, Me = {
|
|
1585
1587
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1586
1588
|
TEXT: "text"
|
|
1587
|
-
}, Yo = Bo.bind(Vo),
|
|
1589
|
+
}, Yo = Bo.bind(Vo), B = "purpur-button", Xo = ({
|
|
1588
1590
|
children: e,
|
|
1589
1591
|
className: r,
|
|
1590
1592
|
["data-testid"]: t,
|
|
@@ -1601,41 +1603,41 @@ const Bo = /* @__PURE__ */ Uo(Ho), Vo = {
|
|
|
1601
1603
|
}, m) => {
|
|
1602
1604
|
if (n && d === "destructive")
|
|
1603
1605
|
return null;
|
|
1604
|
-
const
|
|
1606
|
+
const w = Yo(
|
|
1605
1607
|
[
|
|
1606
|
-
|
|
1607
|
-
`${
|
|
1608
|
-
`${
|
|
1608
|
+
B,
|
|
1609
|
+
`${B}--${i ? `${d}-negative` : d}`,
|
|
1610
|
+
`${B}--${l}`
|
|
1609
1611
|
],
|
|
1610
1612
|
{
|
|
1611
|
-
[`${
|
|
1612
|
-
[`${
|
|
1613
|
-
[`${
|
|
1614
|
-
[`${
|
|
1613
|
+
[`${B}--icon-only`]: n,
|
|
1614
|
+
[`${B}--negative`]: i,
|
|
1615
|
+
[`${B}--full-width`]: a,
|
|
1616
|
+
[`${B}--disabled`]: o || s
|
|
1615
1617
|
},
|
|
1616
1618
|
r
|
|
1617
|
-
), h = (
|
|
1618
|
-
o || s ?
|
|
1619
|
-
},
|
|
1619
|
+
), h = (g) => {
|
|
1620
|
+
o || s ? g.preventDefault() : u && u(g);
|
|
1621
|
+
}, _ = !!v["aria-disabled"] || o || s;
|
|
1620
1622
|
return /* @__PURE__ */ D(
|
|
1621
1623
|
"button",
|
|
1622
1624
|
{
|
|
1623
|
-
className:
|
|
1625
|
+
className: w,
|
|
1624
1626
|
"data-testid": t,
|
|
1625
1627
|
type: p,
|
|
1626
1628
|
ref: m,
|
|
1627
|
-
"aria-disabled":
|
|
1629
|
+
"aria-disabled": _,
|
|
1628
1630
|
onClick: h,
|
|
1629
1631
|
...v,
|
|
1630
1632
|
children: [
|
|
1631
|
-
s && /* @__PURE__ */ f(jo, { size: l === $o.LG ? "xs" : "xxs", negative: i, disabled:
|
|
1633
|
+
s && /* @__PURE__ */ f(jo, { size: l === $o.LG ? "xs" : "xxs", negative: i, disabled: _ }),
|
|
1632
1634
|
" ",
|
|
1633
1635
|
e
|
|
1634
1636
|
]
|
|
1635
1637
|
}
|
|
1636
1638
|
);
|
|
1637
|
-
},
|
|
1638
|
-
|
|
1639
|
+
}, Ue = z(Xo);
|
|
1640
|
+
Ue.displayName = "Button";
|
|
1639
1641
|
function Go(e) {
|
|
1640
1642
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1641
1643
|
}
|
|
@@ -1679,7 +1681,7 @@ function Ko() {
|
|
|
1679
1681
|
}(yr)), yr.exports;
|
|
1680
1682
|
}
|
|
1681
1683
|
var Zo = Ko();
|
|
1682
|
-
const Qo = /* @__PURE__ */ Go(Zo),
|
|
1684
|
+
const Qo = /* @__PURE__ */ Go(Zo), he = {
|
|
1683
1685
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1684
1686
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1685
1687
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1698,7 +1700,7 @@ const Qo = /* @__PURE__ */ Go(Zo), ve = {
|
|
|
1698
1700
|
}, je = {
|
|
1699
1701
|
TITLE100: "title-100",
|
|
1700
1702
|
TITLE200: "title-200"
|
|
1701
|
-
},
|
|
1703
|
+
}, me = "purpur-heading", qe = ({
|
|
1702
1704
|
children: e,
|
|
1703
1705
|
className: r = "",
|
|
1704
1706
|
enableHyphenation: t = !1,
|
|
@@ -1709,16 +1711,16 @@ const Qo = /* @__PURE__ */ Go(Zo), ve = {
|
|
|
1709
1711
|
}) => {
|
|
1710
1712
|
const i = a, u = Qo([
|
|
1711
1713
|
r,
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
+
he[me],
|
|
1715
|
+
he[`${me}--${n}`],
|
|
1714
1716
|
{
|
|
1715
|
-
[
|
|
1716
|
-
[
|
|
1717
|
+
[he[`${me}--hyphens`]]: t,
|
|
1718
|
+
[he[`${me}--negative`]]: o
|
|
1717
1719
|
}
|
|
1718
1720
|
]);
|
|
1719
1721
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1720
1722
|
};
|
|
1721
|
-
|
|
1723
|
+
qe.displayName = "Heading";
|
|
1722
1724
|
function Jo(e) {
|
|
1723
1725
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1724
1726
|
}
|
|
@@ -1816,7 +1818,7 @@ const ua = {
|
|
|
1816
1818
|
category: "utility"
|
|
1817
1819
|
}, dt = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: ua });
|
|
1818
1820
|
dt.displayName = "IconClose";
|
|
1819
|
-
function
|
|
1821
|
+
function xr(e, r) {
|
|
1820
1822
|
if (typeof e == "function")
|
|
1821
1823
|
return e(r);
|
|
1822
1824
|
e != null && (e.current = r);
|
|
@@ -1825,14 +1827,14 @@ function da(...e) {
|
|
|
1825
1827
|
return (r) => {
|
|
1826
1828
|
let t = !1;
|
|
1827
1829
|
const o = e.map((a) => {
|
|
1828
|
-
const n =
|
|
1830
|
+
const n = xr(a, r);
|
|
1829
1831
|
return !t && typeof n == "function" && (t = !0), n;
|
|
1830
1832
|
});
|
|
1831
1833
|
if (t)
|
|
1832
1834
|
return () => {
|
|
1833
1835
|
for (let a = 0; a < o.length; a++) {
|
|
1834
1836
|
const n = o[a];
|
|
1835
|
-
typeof n == "function" ? n() :
|
|
1837
|
+
typeof n == "function" ? n() : xr(e[a], null);
|
|
1836
1838
|
}
|
|
1837
1839
|
};
|
|
1838
1840
|
};
|
|
@@ -1855,7 +1857,7 @@ var ze = c.forwardRef((e, r) => {
|
|
|
1855
1857
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
1856
1858
|
});
|
|
1857
1859
|
ze.displayName = "SlotClone";
|
|
1858
|
-
var fa = ({ children: e }) => /* @__PURE__ */ f(
|
|
1860
|
+
var fa = ({ children: e }) => /* @__PURE__ */ f(q, { children: e });
|
|
1859
1861
|
function pa(e) {
|
|
1860
1862
|
return c.isValidElement(e) && e.type === fa;
|
|
1861
1863
|
}
|
|
@@ -1922,7 +1924,7 @@ var ma = [
|
|
|
1922
1924
|
);
|
|
1923
1925
|
pt.displayName = _a;
|
|
1924
1926
|
var wa = pt;
|
|
1925
|
-
const
|
|
1927
|
+
const Nr = ({
|
|
1926
1928
|
asChild: e,
|
|
1927
1929
|
children: r,
|
|
1928
1930
|
className: t = "",
|
|
@@ -1934,7 +1936,7 @@ const xr = ({
|
|
|
1934
1936
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1935
1937
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1936
1938
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1937
|
-
}, Z =
|
|
1939
|
+
}, Z = Y.bind(ba), U = "purpur-drawer-header", vt = z(
|
|
1938
1940
|
({
|
|
1939
1941
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1940
1942
|
backButton: r,
|
|
@@ -1947,27 +1949,27 @@ const xr = ({
|
|
|
1947
1949
|
title: u,
|
|
1948
1950
|
...l
|
|
1949
1951
|
}, d) => {
|
|
1950
|
-
const p = Z([a,
|
|
1952
|
+
const p = Z([a, U]);
|
|
1951
1953
|
return /* @__PURE__ */ D("div", { className: p, "data-testid": e, ref: d, ...l, children: [
|
|
1952
1954
|
/* @__PURE__ */ D(
|
|
1953
1955
|
"div",
|
|
1954
1956
|
{
|
|
1955
1957
|
className: Z([
|
|
1956
|
-
`${
|
|
1958
|
+
`${U}__row`,
|
|
1957
1959
|
{
|
|
1958
|
-
[`${
|
|
1960
|
+
[`${U}__row--with-back-button`]: r && t && i
|
|
1959
1961
|
}
|
|
1960
1962
|
]),
|
|
1961
1963
|
"data-testid": `${e}-row`,
|
|
1962
1964
|
children: [
|
|
1963
|
-
/* @__PURE__ */ f("div", { className: Z(`${
|
|
1964
|
-
|
|
1965
|
+
/* @__PURE__ */ f("div", { className: Z(`${U}__left`), children: r && t && i ? /* @__PURE__ */ D(
|
|
1966
|
+
Ue,
|
|
1965
1967
|
{
|
|
1966
1968
|
"aria-label": o ? t : "",
|
|
1967
1969
|
className: Z([
|
|
1968
|
-
`${
|
|
1970
|
+
`${U}__back-button`,
|
|
1969
1971
|
{
|
|
1970
|
-
[`${
|
|
1972
|
+
[`${U}__back-button--only-icon`]: o
|
|
1971
1973
|
}
|
|
1972
1974
|
]),
|
|
1973
1975
|
"data-testid": `${e}-back-button`,
|
|
@@ -1980,11 +1982,11 @@ const xr = ({
|
|
|
1980
1982
|
!o && t
|
|
1981
1983
|
]
|
|
1982
1984
|
}
|
|
1983
|
-
) : s ? /* @__PURE__ */ D(
|
|
1985
|
+
) : s ? /* @__PURE__ */ D(q, { children: [
|
|
1984
1986
|
s,
|
|
1985
|
-
/* @__PURE__ */ f(
|
|
1986
|
-
] }) : /* @__PURE__ */ f(
|
|
1987
|
-
|
|
1987
|
+
/* @__PURE__ */ f(Nr, { asChild: !0, children: /* @__PURE__ */ f(ve, { asChild: !0, children: u }) })
|
|
1988
|
+
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1989
|
+
qe,
|
|
1988
1990
|
{
|
|
1989
1991
|
"data-testid": `${e}-title`,
|
|
1990
1992
|
tag: "h2",
|
|
@@ -1992,11 +1994,11 @@ const xr = ({
|
|
|
1992
1994
|
children: u
|
|
1993
1995
|
}
|
|
1994
1996
|
) }) }),
|
|
1995
|
-
/* @__PURE__ */ f("div", { className: Z(`${
|
|
1996
|
-
|
|
1997
|
+
/* @__PURE__ */ f("div", { className: Z(`${U}__right`), children: /* @__PURE__ */ f(go, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1998
|
+
Ue,
|
|
1997
1999
|
{
|
|
1998
2000
|
"aria-label": n,
|
|
1999
|
-
className: Z(`${
|
|
2001
|
+
className: Z(`${U}__close-button`),
|
|
2000
2002
|
iconOnly: !0,
|
|
2001
2003
|
size: "sm",
|
|
2002
2004
|
variant: Me.TERTIARY_PURPLE,
|
|
@@ -2006,11 +2008,11 @@ const xr = ({
|
|
|
2006
2008
|
]
|
|
2007
2009
|
}
|
|
2008
2010
|
),
|
|
2009
|
-
r && t && i && (s ? /* @__PURE__ */ D(
|
|
2011
|
+
r && t && i && (s ? /* @__PURE__ */ D(q, { children: [
|
|
2010
2012
|
s,
|
|
2011
|
-
/* @__PURE__ */ f(
|
|
2012
|
-
] }) : /* @__PURE__ */ f(
|
|
2013
|
-
|
|
2013
|
+
/* @__PURE__ */ f(Nr, { asChild: !0, children: /* @__PURE__ */ f(ve, { asChild: !0, children: u }) })
|
|
2014
|
+
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2015
|
+
qe,
|
|
2014
2016
|
{
|
|
2015
2017
|
"data-testid": `${e}-title-with-back-button`,
|
|
2016
2018
|
tag: "h2",
|
|
@@ -2041,13 +2043,13 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2041
2043
|
dir: a,
|
|
2042
2044
|
scrollHideDelay: n = 600,
|
|
2043
2045
|
...s
|
|
2044
|
-
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, v] = c.useState(null), [m,
|
|
2046
|
+
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, v] = c.useState(null), [m, w] = c.useState(null), [h, _] = c.useState(null), [g, E] = c.useState(0), [b, y] = c.useState(0), [C, x] = c.useState(!1), [S, A] = c.useState(!1), P = L(r, (F) => u(F)), N = Sa(a);
|
|
2045
2047
|
return /* @__PURE__ */ f(
|
|
2046
2048
|
Pa,
|
|
2047
2049
|
{
|
|
2048
2050
|
scope: t,
|
|
2049
2051
|
type: o,
|
|
2050
|
-
dir:
|
|
2052
|
+
dir: N,
|
|
2051
2053
|
scrollHideDelay: n,
|
|
2052
2054
|
scrollArea: i,
|
|
2053
2055
|
viewport: l,
|
|
@@ -2055,25 +2057,25 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2055
2057
|
content: p,
|
|
2056
2058
|
onContentChange: v,
|
|
2057
2059
|
scrollbarX: m,
|
|
2058
|
-
onScrollbarXChange:
|
|
2060
|
+
onScrollbarXChange: w,
|
|
2059
2061
|
scrollbarXEnabled: C,
|
|
2060
|
-
onScrollbarXEnabledChange:
|
|
2062
|
+
onScrollbarXEnabledChange: x,
|
|
2061
2063
|
scrollbarY: h,
|
|
2062
|
-
onScrollbarYChange:
|
|
2063
|
-
scrollbarYEnabled:
|
|
2064
|
+
onScrollbarYChange: _,
|
|
2065
|
+
scrollbarYEnabled: S,
|
|
2064
2066
|
onScrollbarYEnabledChange: A,
|
|
2065
2067
|
onCornerWidthChange: E,
|
|
2066
|
-
onCornerHeightChange:
|
|
2068
|
+
onCornerHeightChange: y,
|
|
2067
2069
|
children: /* @__PURE__ */ f(
|
|
2068
2070
|
O.div,
|
|
2069
2071
|
{
|
|
2070
|
-
dir:
|
|
2072
|
+
dir: N,
|
|
2071
2073
|
...s,
|
|
2072
2074
|
ref: P,
|
|
2073
2075
|
style: {
|
|
2074
2076
|
position: "relative",
|
|
2075
2077
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
2076
|
-
"--radix-scroll-area-corner-width":
|
|
2078
|
+
"--radix-scroll-area-corner-width": g + "px",
|
|
2077
2079
|
"--radix-scroll-area-corner-height": b + "px",
|
|
2078
2080
|
...e.style
|
|
2079
2081
|
}
|
|
@@ -2087,7 +2089,7 @@ mt.displayName = Ze;
|
|
|
2087
2089
|
var gt = "ScrollAreaViewport", _t = c.forwardRef(
|
|
2088
2090
|
(e, r) => {
|
|
2089
2091
|
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(gt, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
|
|
2090
|
-
return /* @__PURE__ */ D(
|
|
2092
|
+
return /* @__PURE__ */ D(q, { children: [
|
|
2091
2093
|
/* @__PURE__ */ f(
|
|
2092
2094
|
"style",
|
|
2093
2095
|
{
|
|
@@ -2131,11 +2133,11 @@ var k = "ScrollAreaScrollbar", wt = c.forwardRef(
|
|
|
2131
2133
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2132
2134
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2133
2135
|
i ? n(!1) : s(!1);
|
|
2134
|
-
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(
|
|
2136
|
+
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(xa, { ...o, ref: r, forceMount: t }) : a.type === "scroll" ? /* @__PURE__ */ f(Na, { ...o, ref: r, forceMount: t }) : a.type === "auto" ? /* @__PURE__ */ f(bt, { ...o, ref: r, forceMount: t }) : a.type === "always" ? /* @__PURE__ */ f(Qe, { ...o, ref: r }) : null;
|
|
2135
2137
|
}
|
|
2136
2138
|
);
|
|
2137
2139
|
wt.displayName = k;
|
|
2138
|
-
var
|
|
2140
|
+
var xa = c.forwardRef((e, r) => {
|
|
2139
2141
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2140
2142
|
return c.useEffect(() => {
|
|
2141
2143
|
const i = a.scrollArea;
|
|
@@ -2150,7 +2152,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2150
2152
|
window.clearTimeout(u), i.removeEventListener("pointerenter", l), i.removeEventListener("pointerleave", d);
|
|
2151
2153
|
};
|
|
2152
2154
|
}
|
|
2153
|
-
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(
|
|
2155
|
+
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(H, { present: t || n, children: /* @__PURE__ */ f(
|
|
2154
2156
|
bt,
|
|
2155
2157
|
{
|
|
2156
2158
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2158,7 +2160,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2158
2160
|
ref: r
|
|
2159
2161
|
}
|
|
2160
2162
|
) });
|
|
2161
|
-
}),
|
|
2163
|
+
}), Na = c.forwardRef((e, r) => {
|
|
2162
2164
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Ce(() => u("SCROLL_END"), 100), [i, u] = Ca("hidden", {
|
|
2163
2165
|
hidden: {
|
|
2164
2166
|
SCROLL: "scrolling"
|
|
@@ -2192,7 +2194,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2192
2194
|
};
|
|
2193
2195
|
return l.addEventListener("scroll", v), () => l.removeEventListener("scroll", v);
|
|
2194
2196
|
}
|
|
2195
|
-
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(
|
|
2197
|
+
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(H, { present: t || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2196
2198
|
Qe,
|
|
2197
2199
|
{
|
|
2198
2200
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
@@ -2209,7 +2211,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2209
2211
|
s(i ? l : d);
|
|
2210
2212
|
}
|
|
2211
2213
|
}, 10);
|
|
2212
|
-
return
|
|
2214
|
+
return te(t.viewport, u), te(t.content, u), /* @__PURE__ */ f(H, { present: o || n, children: /* @__PURE__ */ f(
|
|
2213
2215
|
Qe,
|
|
2214
2216
|
{
|
|
2215
2217
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2294,7 +2296,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2294
2296
|
onWheelScroll: (d, p) => {
|
|
2295
2297
|
if (n.viewport) {
|
|
2296
2298
|
const v = n.viewport.scrollLeft + d.deltaX;
|
|
2297
|
-
e.onWheelScroll(v),
|
|
2299
|
+
e.onWheelScroll(v), xt(v, p) && d.preventDefault();
|
|
2298
2300
|
}
|
|
2299
2301
|
},
|
|
2300
2302
|
onResize: () => {
|
|
@@ -2334,7 +2336,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2334
2336
|
onWheelScroll: (d, p) => {
|
|
2335
2337
|
if (n.viewport) {
|
|
2336
2338
|
const v = n.viewport.scrollTop + d.deltaY;
|
|
2337
|
-
e.onWheelScroll(v),
|
|
2339
|
+
e.onWheelScroll(v), xt(v, p) && d.preventDefault();
|
|
2338
2340
|
}
|
|
2339
2341
|
},
|
|
2340
2342
|
onResize: () => {
|
|
@@ -2363,42 +2365,42 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2363
2365
|
onWheelScroll: d,
|
|
2364
2366
|
onResize: p,
|
|
2365
2367
|
...v
|
|
2366
|
-
} = e, m = $(k, t), [
|
|
2368
|
+
} = e, m = $(k, t), [w, h] = c.useState(null), _ = L(r, (P) => h(P)), g = c.useRef(null), E = c.useRef(""), b = m.viewport, y = o.content - o.viewport, C = T(d), x = T(u), S = Ce(p, 10);
|
|
2367
2369
|
function A(P) {
|
|
2368
|
-
if (
|
|
2369
|
-
const
|
|
2370
|
-
l({ x, y:
|
|
2370
|
+
if (g.current) {
|
|
2371
|
+
const N = P.clientX - g.current.left, F = P.clientY - g.current.top;
|
|
2372
|
+
l({ x: N, y: F });
|
|
2371
2373
|
}
|
|
2372
2374
|
}
|
|
2373
2375
|
return c.useEffect(() => {
|
|
2374
|
-
const P = (
|
|
2375
|
-
const
|
|
2376
|
-
(
|
|
2376
|
+
const P = (N) => {
|
|
2377
|
+
const F = N.target;
|
|
2378
|
+
(w == null ? void 0 : w.contains(F)) && C(N, y);
|
|
2377
2379
|
};
|
|
2378
2380
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2379
|
-
}, [b,
|
|
2381
|
+
}, [b, w, y, C]), c.useEffect(x, [o, x]), te(w, S), te(m.content, S), /* @__PURE__ */ f(
|
|
2380
2382
|
Da,
|
|
2381
2383
|
{
|
|
2382
2384
|
scope: t,
|
|
2383
|
-
scrollbar:
|
|
2385
|
+
scrollbar: w,
|
|
2384
2386
|
hasThumb: a,
|
|
2385
2387
|
onThumbChange: T(n),
|
|
2386
2388
|
onThumbPointerUp: T(s),
|
|
2387
|
-
onThumbPositionChange:
|
|
2389
|
+
onThumbPositionChange: x,
|
|
2388
2390
|
onThumbPointerDown: T(i),
|
|
2389
2391
|
children: /* @__PURE__ */ f(
|
|
2390
2392
|
O.div,
|
|
2391
2393
|
{
|
|
2392
2394
|
...v,
|
|
2393
|
-
ref:
|
|
2395
|
+
ref: _,
|
|
2394
2396
|
style: { position: "absolute", ...v.style },
|
|
2395
2397
|
onPointerDown: R(e.onPointerDown, (P) => {
|
|
2396
|
-
P.button === 0 && (P.target.setPointerCapture(P.pointerId),
|
|
2398
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), g.current = w.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), A(P));
|
|
2397
2399
|
}),
|
|
2398
2400
|
onPointerMove: R(e.onPointerMove, A),
|
|
2399
2401
|
onPointerUp: R(e.onPointerUp, (P) => {
|
|
2400
|
-
const
|
|
2401
|
-
|
|
2402
|
+
const N = P.target;
|
|
2403
|
+
N.hasPointerCapture(P.pointerId) && N.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = E.current, m.viewport && (m.viewport.style.scrollBehavior = ""), g.current = null;
|
|
2402
2404
|
})
|
|
2403
2405
|
}
|
|
2404
2406
|
)
|
|
@@ -2407,7 +2409,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2407
2409
|
}), be = "ScrollAreaThumb", Et = c.forwardRef(
|
|
2408
2410
|
(e, r) => {
|
|
2409
2411
|
const { forceMount: t, ...o } = e, a = yt(be, e.__scopeScrollArea);
|
|
2410
|
-
return /* @__PURE__ */ f(
|
|
2412
|
+
return /* @__PURE__ */ f(H, { present: t || a.hasThumb, children: /* @__PURE__ */ f(Ta, { ref: r, ...o }) });
|
|
2411
2413
|
}
|
|
2412
2414
|
), Ta = c.forwardRef(
|
|
2413
2415
|
(e, r) => {
|
|
@@ -2440,8 +2442,8 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2440
2442
|
...o
|
|
2441
2443
|
},
|
|
2442
2444
|
onPointerDownCapture: R(e.onPointerDownCapture, (p) => {
|
|
2443
|
-
const m = p.target.getBoundingClientRect(),
|
|
2444
|
-
s.onThumbPointerDown({ x:
|
|
2445
|
+
const m = p.target.getBoundingClientRect(), w = p.clientX - m.left, h = p.clientY - m.top;
|
|
2446
|
+
s.onThumbPointerDown({ x: w, y: h });
|
|
2445
2447
|
}),
|
|
2446
2448
|
onPointerUp: R(e.onPointerUp, s.onThumbPointerUp)
|
|
2447
2449
|
}
|
|
@@ -2458,11 +2460,11 @@ var Je = "ScrollAreaCorner", Oa = c.forwardRef(
|
|
|
2458
2460
|
Oa.displayName = Je;
|
|
2459
2461
|
var La = c.forwardRef((e, r) => {
|
|
2460
2462
|
const { __scopeScrollArea: t, ...o } = e, a = $(Je, t), [n, s] = c.useState(0), [i, u] = c.useState(0), l = !!(n && i);
|
|
2461
|
-
return
|
|
2463
|
+
return te(a.scrollbarX, () => {
|
|
2462
2464
|
var p;
|
|
2463
2465
|
const d = ((p = a.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
|
|
2464
2466
|
a.onCornerHeightChange(d), u(d);
|
|
2465
|
-
}),
|
|
2467
|
+
}), te(a.scrollbarY, () => {
|
|
2466
2468
|
var p;
|
|
2467
2469
|
const d = ((p = a.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
|
|
2468
2470
|
a.onCornerWidthChange(d), s(d);
|
|
@@ -2509,7 +2511,7 @@ function Pt(e, r) {
|
|
|
2509
2511
|
return r[0] + o * (t - e[0]);
|
|
2510
2512
|
};
|
|
2511
2513
|
}
|
|
2512
|
-
function
|
|
2514
|
+
function xt(e, r) {
|
|
2513
2515
|
return e > 0 && e < r;
|
|
2514
2516
|
}
|
|
2515
2517
|
var Ma = (e, r = () => {
|
|
@@ -2526,9 +2528,9 @@ function Ce(e, r) {
|
|
|
2526
2528
|
window.clearTimeout(o.current), o.current = window.setTimeout(t, r);
|
|
2527
2529
|
}, [t, r]);
|
|
2528
2530
|
}
|
|
2529
|
-
function
|
|
2531
|
+
function te(e, r) {
|
|
2530
2532
|
const t = T(r);
|
|
2531
|
-
|
|
2533
|
+
ce(() => {
|
|
2532
2534
|
let o = 0;
|
|
2533
2535
|
if (e) {
|
|
2534
2536
|
const a = new ResizeObserver(() => {
|
|
@@ -2541,34 +2543,44 @@ function re(e, r) {
|
|
|
2541
2543
|
}, [e, t]);
|
|
2542
2544
|
}
|
|
2543
2545
|
var Ia = mt, ka = _t, Wa = wt, Fa = Et;
|
|
2544
|
-
const
|
|
2545
|
-
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-
|
|
2546
|
-
"purpur-drawer-scroll-
|
|
2547
|
-
"purpur-drawer-scroll-
|
|
2548
|
-
"purpur-drawer-scroll-
|
|
2549
|
-
|
|
2546
|
+
const Ua = {
|
|
2547
|
+
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1r0fa_1",
|
|
2548
|
+
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1r0fa_4",
|
|
2549
|
+
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1r0fa_10",
|
|
2550
|
+
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1r0fa_13",
|
|
2551
|
+
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1r0fa_24"
|
|
2552
|
+
}, ae = Y.bind(Ua), Q = "purpur-drawer-scroll-area", He = z(
|
|
2550
2553
|
({
|
|
2551
2554
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2552
2555
|
children: r,
|
|
2553
2556
|
className: t,
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
{
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2557
|
+
fitToContent: o = !1,
|
|
2558
|
+
...a
|
|
2559
|
+
}, n) => {
|
|
2560
|
+
const s = ae([t, Q]);
|
|
2561
|
+
return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ D(
|
|
2562
|
+
Ia,
|
|
2563
|
+
{
|
|
2564
|
+
className: ae(`${Q}__root`, {
|
|
2565
|
+
[`${Q}__root--fit-to-content`]: o
|
|
2566
|
+
}),
|
|
2567
|
+
children: [
|
|
2568
|
+
/* @__PURE__ */ f(ka, { className: ae(`${Q}__viewport`), children: r }),
|
|
2569
|
+
/* @__PURE__ */ f(
|
|
2570
|
+
Wa,
|
|
2571
|
+
{
|
|
2572
|
+
className: ae(`${Q}__scrollbar`),
|
|
2573
|
+
orientation: "vertical",
|
|
2574
|
+
children: /* @__PURE__ */ f(Fa, { className: ae(`${Q}__thumb`) })
|
|
2575
|
+
}
|
|
2576
|
+
)
|
|
2577
|
+
]
|
|
2578
|
+
}
|
|
2579
|
+
) });
|
|
2568
2580
|
}
|
|
2569
2581
|
);
|
|
2570
2582
|
He.displayName = "DrawerScrollArea";
|
|
2571
|
-
const
|
|
2583
|
+
const J = Y.bind(Ro), W = "purpur-drawer-frame", Nt = z(
|
|
2572
2584
|
({
|
|
2573
2585
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2574
2586
|
backButton: r,
|
|
@@ -2577,103 +2589,107 @@ const Q = V.bind(Ro), F = "purpur-drawer-frame", xt = U(
|
|
|
2577
2589
|
children: a,
|
|
2578
2590
|
className: n,
|
|
2579
2591
|
closeButtonText: s,
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2592
|
+
fitToContent: i = !1,
|
|
2593
|
+
footerContent: u,
|
|
2594
|
+
headerContent: l,
|
|
2595
|
+
onAnimationEnd: d,
|
|
2596
|
+
onBackButtonClick: p,
|
|
2597
|
+
onSwipeStart: v,
|
|
2598
|
+
onSwipeMove: m,
|
|
2599
|
+
onSwipeCancel: w,
|
|
2600
|
+
onSwipeEnd: h,
|
|
2601
|
+
title: _,
|
|
2589
2602
|
stickyFooter: g,
|
|
2590
|
-
...
|
|
2591
|
-
},
|
|
2592
|
-
const
|
|
2603
|
+
...E
|
|
2604
|
+
}, b) => {
|
|
2605
|
+
const y = J([
|
|
2593
2606
|
n,
|
|
2594
|
-
|
|
2607
|
+
W,
|
|
2595
2608
|
{
|
|
2596
|
-
[`${
|
|
2609
|
+
[`${W}--fit-to-content`]: i,
|
|
2610
|
+
[`${W}--sticky-footer`]: g
|
|
2597
2611
|
}
|
|
2598
2612
|
]);
|
|
2599
2613
|
return /* @__PURE__ */ D(
|
|
2600
2614
|
"div",
|
|
2601
2615
|
{
|
|
2602
|
-
className:
|
|
2616
|
+
className: y,
|
|
2603
2617
|
"data-testid": e,
|
|
2604
|
-
ref:
|
|
2605
|
-
onAnimationEnd:
|
|
2606
|
-
...
|
|
2618
|
+
ref: b,
|
|
2619
|
+
onAnimationEnd: d,
|
|
2620
|
+
...E,
|
|
2607
2621
|
children: [
|
|
2608
2622
|
/* @__PURE__ */ f(
|
|
2609
2623
|
lt,
|
|
2610
2624
|
{
|
|
2611
|
-
onSwipeStart:
|
|
2612
|
-
onSwipeMove:
|
|
2613
|
-
onSwipeCancel:
|
|
2614
|
-
onSwipeEnd:
|
|
2625
|
+
onSwipeStart: v,
|
|
2626
|
+
onSwipeMove: m,
|
|
2627
|
+
onSwipeCancel: w,
|
|
2628
|
+
onSwipeEnd: h
|
|
2615
2629
|
}
|
|
2616
2630
|
),
|
|
2617
2631
|
/* @__PURE__ */ f(
|
|
2618
|
-
|
|
2632
|
+
ee,
|
|
2619
2633
|
{
|
|
2620
|
-
className:
|
|
2634
|
+
className: J(`${W}__header`),
|
|
2621
2635
|
variant: "header",
|
|
2622
2636
|
stickyFooter: g,
|
|
2623
2637
|
children: /* @__PURE__ */ f(
|
|
2624
2638
|
vt,
|
|
2625
2639
|
{
|
|
2626
|
-
title:
|
|
2627
|
-
headerContent:
|
|
2640
|
+
title: _,
|
|
2641
|
+
headerContent: l,
|
|
2628
2642
|
backButtonOnlyIcon: o,
|
|
2629
2643
|
backButton: r,
|
|
2630
2644
|
backButtonText: t,
|
|
2631
2645
|
closeButtonText: s,
|
|
2632
|
-
onBackButtonClick:
|
|
2646
|
+
onBackButtonClick: p
|
|
2633
2647
|
}
|
|
2634
2648
|
)
|
|
2635
2649
|
}
|
|
2636
2650
|
),
|
|
2637
|
-
g ? /* @__PURE__ */ D(
|
|
2651
|
+
g ? /* @__PURE__ */ D(q, { children: [
|
|
2638
2652
|
/* @__PURE__ */ f(
|
|
2639
2653
|
He,
|
|
2640
2654
|
{
|
|
2641
|
-
className:
|
|
2655
|
+
className: J(`${W}__body`),
|
|
2642
2656
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
2643
|
-
|
|
2657
|
+
fitToContent: i,
|
|
2658
|
+
children: /* @__PURE__ */ f(ee, { stickyFooter: !0, children: a })
|
|
2644
2659
|
}
|
|
2645
2660
|
),
|
|
2646
|
-
|
|
2647
|
-
|
|
2661
|
+
u && /* @__PURE__ */ f(
|
|
2662
|
+
ee,
|
|
2648
2663
|
{
|
|
2649
|
-
className:
|
|
2664
|
+
className: J(`${W}__footer`),
|
|
2650
2665
|
"data-testid": `${e}-sticky-footer`,
|
|
2651
2666
|
variant: "footer",
|
|
2652
2667
|
stickyFooter: g,
|
|
2653
|
-
children:
|
|
2668
|
+
children: u
|
|
2654
2669
|
}
|
|
2655
2670
|
)
|
|
2656
2671
|
] }) : /* @__PURE__ */ f(
|
|
2657
2672
|
He,
|
|
2658
2673
|
{
|
|
2659
|
-
className:
|
|
2674
|
+
className: J(`${W}__body`),
|
|
2660
2675
|
"data-testid": `${e}-scroll-area`,
|
|
2676
|
+
fitToContent: i,
|
|
2661
2677
|
children: /* @__PURE__ */ D(
|
|
2662
2678
|
"div",
|
|
2663
2679
|
{
|
|
2664
|
-
className:
|
|
2665
|
-
`${
|
|
2666
|
-
{ [`${
|
|
2680
|
+
className: J([
|
|
2681
|
+
`${W}__content-container`,
|
|
2682
|
+
{ [`${W}__content-container--no-footer`]: !u }
|
|
2667
2683
|
]),
|
|
2668
2684
|
children: [
|
|
2669
|
-
/* @__PURE__ */ f(
|
|
2670
|
-
|
|
2671
|
-
|
|
2685
|
+
/* @__PURE__ */ f(ee, { stickyFooter: g, children: a }),
|
|
2686
|
+
u && /* @__PURE__ */ f(
|
|
2687
|
+
ee,
|
|
2672
2688
|
{
|
|
2673
2689
|
"data-testid": `${e}-footer`,
|
|
2674
2690
|
stickyFooter: g,
|
|
2675
2691
|
variant: "footer",
|
|
2676
|
-
children:
|
|
2692
|
+
children: u
|
|
2677
2693
|
}
|
|
2678
2694
|
)
|
|
2679
2695
|
]
|
|
@@ -2686,7 +2702,7 @@ const Q = V.bind(Ro), F = "purpur-drawer-frame", xt = U(
|
|
|
2686
2702
|
);
|
|
2687
2703
|
}
|
|
2688
2704
|
);
|
|
2689
|
-
|
|
2705
|
+
Nt.displayName = "DrawerFrame";
|
|
2690
2706
|
const ja = (e, r) => ({
|
|
2691
2707
|
onAnimationEnd: (i) => {
|
|
2692
2708
|
i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
@@ -2709,7 +2725,7 @@ const ja = (e, r) => ({
|
|
|
2709
2725
|
const { y: u } = i.delta;
|
|
2710
2726
|
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${u}px`);
|
|
2711
2727
|
}
|
|
2712
|
-
}), ie =
|
|
2728
|
+
}), ie = Y.bind(xo), se = "purpur-drawer-content", At = z(
|
|
2713
2729
|
({
|
|
2714
2730
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2715
2731
|
backButton: r = !1,
|
|
@@ -2720,55 +2736,62 @@ const ja = (e, r) => ({
|
|
|
2720
2736
|
className: s,
|
|
2721
2737
|
closeButtonText: i,
|
|
2722
2738
|
disableCloseOnClickOutside: u = !1,
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2739
|
+
fitToContent: l = !1,
|
|
2740
|
+
footerContent: d,
|
|
2741
|
+
headerContent: p,
|
|
2742
|
+
onBackButtonClick: v,
|
|
2743
|
+
stickyFooter: m = !1,
|
|
2744
|
+
title: w,
|
|
2745
|
+
zIndex: h,
|
|
2746
|
+
..._
|
|
2730
2747
|
}, g) => {
|
|
2731
|
-
const
|
|
2732
|
-
|
|
2748
|
+
const E = ie([
|
|
2749
|
+
s,
|
|
2750
|
+
se,
|
|
2751
|
+
{ [`${se}--fit-to-content`]: l }
|
|
2752
|
+
]), b = Ot(null), y = Lt(ct), { onAnimationEnd: C, onSwipeStart: x, onSwipeMove: S, onSwipeCancel: A, onSwipeEnd: P } = ja(b, y), N = (F) => {
|
|
2753
|
+
u && F.preventDefault();
|
|
2733
2754
|
};
|
|
2734
2755
|
return /* @__PURE__ */ f(po, { children: /* @__PURE__ */ f(
|
|
2735
2756
|
vo,
|
|
2736
2757
|
{
|
|
2737
2758
|
className: ie("purpur-drawer-overlay"),
|
|
2738
|
-
style:
|
|
2759
|
+
style: h ? { zIndex: h } : void 0,
|
|
2739
2760
|
"data-testid": `${e}-overlay`,
|
|
2740
2761
|
children: /* @__PURE__ */ f(
|
|
2741
2762
|
ho,
|
|
2742
2763
|
{
|
|
2743
|
-
onPointerDownOutside:
|
|
2744
|
-
className:
|
|
2764
|
+
onPointerDownOutside: N,
|
|
2765
|
+
className: E,
|
|
2745
2766
|
"data-testid": e,
|
|
2746
2767
|
ref: g,
|
|
2747
|
-
|
|
2768
|
+
"aria-describedby": void 0,
|
|
2769
|
+
..._,
|
|
2748
2770
|
children: /* @__PURE__ */ f(
|
|
2749
|
-
|
|
2771
|
+
Nt,
|
|
2750
2772
|
{
|
|
2751
2773
|
backButton: r,
|
|
2752
2774
|
backButtonText: t,
|
|
2753
2775
|
backButtonOnlyIcon: o,
|
|
2754
2776
|
closeButtonText: i,
|
|
2755
|
-
className: ie(`${
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2777
|
+
className: ie(`${se}__drawer-frame`),
|
|
2778
|
+
fitToContent: l,
|
|
2779
|
+
footerContent: d,
|
|
2780
|
+
headerContent: p,
|
|
2781
|
+
ref: b,
|
|
2782
|
+
onAnimationEnd: C,
|
|
2783
|
+
onBackButtonClick: v,
|
|
2784
|
+
onSwipeStart: x,
|
|
2785
|
+
onSwipeMove: S,
|
|
2786
|
+
onSwipeCancel: A,
|
|
2787
|
+
onSwipeEnd: P,
|
|
2788
|
+
stickyFooter: m,
|
|
2789
|
+
title: w,
|
|
2790
|
+
children: a ? /* @__PURE__ */ D("div", { className: ie(`${se}__content-container`), children: [
|
|
2768
2791
|
/* @__PURE__ */ f(
|
|
2769
2792
|
mo,
|
|
2770
2793
|
{
|
|
2771
|
-
className: ie(`${
|
|
2794
|
+
className: ie(`${se}__description`),
|
|
2772
2795
|
"data-testid": `${e}-description`,
|
|
2773
2796
|
children: a
|
|
2774
2797
|
}
|
|
@@ -2784,7 +2807,7 @@ const ja = (e, r) => ({
|
|
|
2784
2807
|
}
|
|
2785
2808
|
);
|
|
2786
2809
|
At.displayName = "DrawerContent";
|
|
2787
|
-
const Rt =
|
|
2810
|
+
const Rt = z(
|
|
2788
2811
|
({
|
|
2789
2812
|
["data-testid"]: e = "purpur-drawer-trigger",
|
|
2790
2813
|
children: r,
|
|
@@ -2803,7 +2826,7 @@ const Rt = U(
|
|
|
2803
2826
|
)
|
|
2804
2827
|
);
|
|
2805
2828
|
Rt.displayName = "DrawerTrigger";
|
|
2806
|
-
const
|
|
2829
|
+
const qa = Y.bind(yo), za = "purpur-drawer", er = ({
|
|
2807
2830
|
["data-testid"]: e = "purpur-drawer",
|
|
2808
2831
|
children: r,
|
|
2809
2832
|
className: t,
|
|
@@ -2811,7 +2834,7 @@ const Ua = V.bind(yo), za = "purpur-drawer", er = ({
|
|
|
2811
2834
|
open: a = !1,
|
|
2812
2835
|
...n
|
|
2813
2836
|
}) => {
|
|
2814
|
-
const [s, i] = Ie.useState(a), u =
|
|
2837
|
+
const [s, i] = Ie.useState(a), u = qa([t, za]), l = (d) => {
|
|
2815
2838
|
i(d), o == null || o(d);
|
|
2816
2839
|
};
|
|
2817
2840
|
return $t(() => {
|