@purpurds/drawer 7.0.0 → 7.1.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.cjs.js +9 -9
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +216 -216
- 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 +14 -5
package/dist/drawer.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as f, Fragment as
|
|
1
|
+
import { jsx as f, Fragment as H, 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 B, 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
|
-
function
|
|
6
|
+
function x(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
8
|
if (e == null || e(a), t === !1 || !a.defaultPrevented)
|
|
9
9
|
return r == null ? void 0 : r(a);
|
|
@@ -14,7 +14,7 @@ function rr(e, r) {
|
|
|
14
14
|
return e(r);
|
|
15
15
|
e != null && (e.current = r);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function xr(...e) {
|
|
18
18
|
return (r) => {
|
|
19
19
|
let t = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
@@ -31,7 +31,7 @@ function Rr(...e) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function L(...e) {
|
|
34
|
-
return c.useCallback(
|
|
34
|
+
return c.useCallback(xr(...e), e);
|
|
35
35
|
}
|
|
36
36
|
function kt(e, r) {
|
|
37
37
|
const t = c.createContext(r), o = (n) => {
|
|
@@ -115,13 +115,13 @@ function T(e) {
|
|
|
115
115
|
return (o = r.current) == null ? void 0 : o.call(r, ...t);
|
|
116
116
|
}, []);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function qt({
|
|
119
119
|
prop: e,
|
|
120
120
|
defaultProp: r,
|
|
121
121
|
onChange: t = () => {
|
|
122
122
|
}
|
|
123
123
|
}) {
|
|
124
|
-
const [o, a] =
|
|
124
|
+
const [o, a] = Ht({ 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 Ht({
|
|
137
137
|
defaultProp: e,
|
|
138
138
|
onChange: r
|
|
139
139
|
}) {
|
|
@@ -142,29 +142,29 @@ function qt({
|
|
|
142
142
|
a.current !== o && (n(o), a.current = o);
|
|
143
143
|
}, [o, a, n]), t;
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(
|
|
145
|
+
var ze = c.forwardRef((e, r) => {
|
|
146
|
+
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(jt);
|
|
147
147
|
if (n) {
|
|
148
148
|
const s = n.props.children, i = a.map((u) => u === n ? c.Children.count(s) > 1 ? c.Children.only(null) : c.isValidElement(s) ? s.props.children : null : u);
|
|
149
149
|
return /* @__PURE__ */ f(ke, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
150
150
|
}
|
|
151
151
|
return /* @__PURE__ */ f(ke, { ...o, ref: r, children: t });
|
|
152
152
|
});
|
|
153
|
-
|
|
153
|
+
ze.displayName = "Slot";
|
|
154
154
|
var ke = c.forwardRef((e, r) => {
|
|
155
155
|
const { children: t, ...o } = e;
|
|
156
156
|
if (c.isValidElement(t)) {
|
|
157
|
-
const a = Vt(t), n =
|
|
158
|
-
return t.type !== c.Fragment && (n.ref = r ?
|
|
157
|
+
const a = Vt(t), n = zt(o, t.props);
|
|
158
|
+
return t.type !== c.Fragment && (n.ref = r ? xr(r, a) : a), c.cloneElement(t, n);
|
|
159
159
|
}
|
|
160
160
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
161
161
|
});
|
|
162
162
|
ke.displayName = "SlotClone";
|
|
163
|
-
var
|
|
164
|
-
function
|
|
165
|
-
return c.isValidElement(e) && e.type ===
|
|
163
|
+
var Bt = ({ children: e }) => /* @__PURE__ */ f(H, { children: e });
|
|
164
|
+
function jt(e) {
|
|
165
|
+
return c.isValidElement(e) && e.type === Bt;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function zt(e, r) {
|
|
168
168
|
const t = { ...r };
|
|
169
169
|
for (const o in r) {
|
|
170
170
|
const a = e[o], n = r[o];
|
|
@@ -198,7 +198,7 @@ var Yt = [
|
|
|
198
198
|
"ul"
|
|
199
199
|
], O = Yt.reduce((e, r) => {
|
|
200
200
|
const t = c.forwardRef((o, a) => {
|
|
201
|
-
const { asChild: n, ...s } = o, i = n ?
|
|
201
|
+
const { asChild: n, ...s } = o, i = n ? ze : r;
|
|
202
202
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...s, ref: a });
|
|
203
203
|
});
|
|
204
204
|
return t.displayName = `Primitive.${r}`, { ...e, [r]: t };
|
|
@@ -230,11 +230,11 @@ var Kt = "DismissableLayer", We = "dismissableLayer.update", Zt = "dismissableLa
|
|
|
230
230
|
onDismiss: i,
|
|
231
231
|
...u
|
|
232
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
|
|
233
|
+
const R = S.target, P = [...l.branches].some((A) => A.contains(R));
|
|
234
234
|
!y || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
235
|
-
}, v),
|
|
236
|
-
const
|
|
237
|
-
[...l.branches].some((
|
|
235
|
+
}, v), N = tn((S) => {
|
|
236
|
+
const R = S.target;
|
|
237
|
+
[...l.branches].some((A) => A.contains(R)) || (n == null || n(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
238
238
|
}, v);
|
|
239
239
|
return Gt((S) => {
|
|
240
240
|
E === l.layers.size - 1 && (o == null || o(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
@@ -257,9 +257,9 @@ var Kt = "DismissableLayer", We = "dismissableLayer.update", Zt = "dismissableLa
|
|
|
257
257
|
pointerEvents: b ? y ? "auto" : "none" : void 0,
|
|
258
258
|
...e.style
|
|
259
259
|
},
|
|
260
|
-
onFocusCapture:
|
|
261
|
-
onBlurCapture:
|
|
262
|
-
onPointerDownCapture:
|
|
260
|
+
onFocusCapture: x(e.onFocusCapture, N.onFocusCapture),
|
|
261
|
+
onBlurCapture: x(e.onBlurCapture, N.onBlurCapture),
|
|
262
|
+
onPointerDownCapture: x(
|
|
263
263
|
e.onPointerDownCapture,
|
|
264
264
|
C.onPointerDownCapture
|
|
265
265
|
)
|
|
@@ -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 Ne = "focusScope.autoFocusOnMount", Ae = "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,
|
|
@@ -352,15 +352,15 @@ var xe = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", or
|
|
|
352
352
|
let h = function(b) {
|
|
353
353
|
if (m.paused || !i) return;
|
|
354
354
|
const y = b.target;
|
|
355
|
-
i.contains(y) ? p.current = y :
|
|
355
|
+
i.contains(y) ? p.current = y : q(p.current, { select: !0 });
|
|
356
356
|
}, _ = function(b) {
|
|
357
357
|
if (m.paused || !i) return;
|
|
358
358
|
const y = b.relatedTarget;
|
|
359
|
-
y !== null && (i.contains(y) ||
|
|
359
|
+
y !== null && (i.contains(y) || q(p.current, { select: !0 }));
|
|
360
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 && q(i);
|
|
364
364
|
};
|
|
365
365
|
document.addEventListener("focusin", h), document.addEventListener("focusout", _);
|
|
366
366
|
const E = new MutationObserver(g);
|
|
@@ -373,13 +373,13 @@ var xe = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", or
|
|
|
373
373
|
ir.add(m);
|
|
374
374
|
const h = document.activeElement;
|
|
375
375
|
if (!i.contains(h)) {
|
|
376
|
-
const g = new CustomEvent(
|
|
377
|
-
i.addEventListener(
|
|
376
|
+
const g = new CustomEvent(Ne, or);
|
|
377
|
+
i.addEventListener(Ne, l), i.dispatchEvent(g), g.defaultPrevented || (on(un(Mr(i)), { select: !0 }), document.activeElement === h && q(i));
|
|
378
378
|
}
|
|
379
379
|
return () => {
|
|
380
|
-
i.removeEventListener(
|
|
381
|
-
const g = new CustomEvent(
|
|
382
|
-
i.addEventListener(
|
|
380
|
+
i.removeEventListener(Ne, l), setTimeout(() => {
|
|
381
|
+
const g = new CustomEvent(Ae, or);
|
|
382
|
+
i.addEventListener(Ae, d), i.dispatchEvent(g), g.defaultPrevented || q(h ?? document.body, { select: !0 }), i.removeEventListener(Ae, d), ir.remove(m);
|
|
383
383
|
}, 0);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
@@ -390,7 +390,7 @@ var xe = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", or
|
|
|
390
390
|
const _ = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, g = document.activeElement;
|
|
391
391
|
if (_ && g) {
|
|
392
392
|
const E = h.currentTarget, [b, y] = an(E);
|
|
393
|
-
b && y ? !h.shiftKey && g === y ? (h.preventDefault(), t &&
|
|
393
|
+
b && y ? !h.shiftKey && g === y ? (h.preventDefault(), t && q(b, { select: !0 })) : h.shiftKey && g === b && (h.preventDefault(), t && q(y, { select: !0 })) : g === E && h.preventDefault();
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
[t, o, m.paused]
|
|
@@ -401,7 +401,7 @@ $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 (q(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 q(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();
|
|
@@ -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 j = (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
|
+
j.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: {
|
|
@@ -533,12 +533,12 @@ function vn(e) {
|
|
|
533
533
|
let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
534
534
|
return t ? e.ref : (r = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
535
535
|
}
|
|
536
|
-
var
|
|
536
|
+
var Re = 0;
|
|
537
537
|
function hn() {
|
|
538
538
|
c.useEffect(() => {
|
|
539
539
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
540
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? cr()), document.body.insertAdjacentElement("beforeend", e[1] ?? cr()),
|
|
541
|
-
|
|
540
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? cr()), document.body.insertAdjacentElement("beforeend", e[1] ?? cr()), Re++, () => {
|
|
541
|
+
Re === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((r) => r.remove()), Re--;
|
|
542
542
|
};
|
|
543
543
|
}, []);
|
|
544
544
|
}
|
|
@@ -569,7 +569,7 @@ function mn(e, r, t) {
|
|
|
569
569
|
return e.concat(n || Array.prototype.slice.call(r));
|
|
570
570
|
}
|
|
571
571
|
var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar", gn = "with-scroll-bars-hidden", _n = "--removed-body-scroll-bar-size";
|
|
572
|
-
function
|
|
572
|
+
function xe(e, r) {
|
|
573
573
|
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
574
574
|
}
|
|
575
575
|
function wn(e, r) {
|
|
@@ -597,7 +597,7 @@ var bn = typeof window < "u" ? c.useLayoutEffect : c.useEffect, lr = /* @__PURE_
|
|
|
597
597
|
function yn(e, r) {
|
|
598
598
|
var t = wn(null, function(o) {
|
|
599
599
|
return e.forEach(function(a) {
|
|
600
|
-
return
|
|
600
|
+
return xe(a, o);
|
|
601
601
|
});
|
|
602
602
|
});
|
|
603
603
|
return bn(function() {
|
|
@@ -605,9 +605,9 @@ function yn(e, r) {
|
|
|
605
605
|
if (o) {
|
|
606
606
|
var a = new Set(o), n = new Set(e), s = t.current;
|
|
607
607
|
a.forEach(function(i) {
|
|
608
|
-
n.has(i) ||
|
|
608
|
+
n.has(i) || xe(i, null);
|
|
609
609
|
}), n.forEach(function(i) {
|
|
610
|
-
a.has(i) ||
|
|
610
|
+
a.has(i) || xe(i, s);
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
613
|
lr.set(t, 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, 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]),
|
|
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]), N = I(I({}, b), a);
|
|
699
699
|
return c.createElement(
|
|
700
700
|
c.Fragment,
|
|
701
701
|
null,
|
|
702
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({},
|
|
703
|
+
s ? c.cloneElement(c.Children.only(i), I(I({}, N), { ref: C })) : c.createElement(g, I({}, N, { className: u, ref: C }), i)
|
|
704
704
|
);
|
|
705
705
|
});
|
|
706
706
|
Se.defaultProps = {
|
|
@@ -712,22 +712,22 @@ Se.classNames = {
|
|
|
712
712
|
fullWidth: _e,
|
|
713
713
|
zeroRight: ge
|
|
714
714
|
};
|
|
715
|
-
var
|
|
715
|
+
var Nn = function() {
|
|
716
716
|
if (typeof __webpack_nonce__ < "u")
|
|
717
717
|
return __webpack_nonce__;
|
|
718
718
|
};
|
|
719
|
-
function
|
|
719
|
+
function An() {
|
|
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 = Nn();
|
|
725
725
|
return r && e.setAttribute("nonce", r), e;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Rn(e, r) {
|
|
728
728
|
e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function xn(e) {
|
|
731
731
|
var r = document.head || document.getElementsByTagName("head")[0];
|
|
732
732
|
r.appendChild(e);
|
|
733
733
|
}
|
|
@@ -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 = An()) && (Rn(r, t), xn(r)), e++;
|
|
739
739
|
},
|
|
740
740
|
remove: function() {
|
|
741
741
|
e--, !e && r && (r.parentNode && r.parentNode.removeChild(r), r = null);
|
|
@@ -851,7 +851,7 @@ if (typeof window < "u")
|
|
|
851
851
|
}
|
|
852
852
|
var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
853
853
|
return e.tagName === "TEXTAREA";
|
|
854
|
-
},
|
|
854
|
+
}, qr = function(e, r) {
|
|
855
855
|
if (!(e instanceof Element))
|
|
856
856
|
return !1;
|
|
857
857
|
var t = window.getComputedStyle(e);
|
|
@@ -861,47 +861,47 @@ var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
|
861
861
|
!(t.overflowY === t.overflowX && !Fn(e) && t[r] === "visible")
|
|
862
862
|
);
|
|
863
863
|
}, Un = function(e) {
|
|
864
|
-
return
|
|
865
|
-
},
|
|
866
|
-
return
|
|
864
|
+
return qr(e, "overflowY");
|
|
865
|
+
}, qn = function(e) {
|
|
866
|
+
return qr(e, "overflowX");
|
|
867
867
|
}, dr = function(e, r) {
|
|
868
868
|
var t = r.ownerDocument, o = r;
|
|
869
869
|
do {
|
|
870
870
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
871
|
-
var a =
|
|
871
|
+
var a = Hr(e, o);
|
|
872
872
|
if (a) {
|
|
873
|
-
var n =
|
|
873
|
+
var n = Br(e, o), s = n[1], i = n[2];
|
|
874
874
|
if (s > i)
|
|
875
875
|
return !0;
|
|
876
876
|
}
|
|
877
877
|
o = o.parentNode;
|
|
878
878
|
} while (o && o !== t.body);
|
|
879
879
|
return !1;
|
|
880
|
-
},
|
|
880
|
+
}, Hn = function(e) {
|
|
881
881
|
var r = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
|
|
882
882
|
return [
|
|
883
883
|
r,
|
|
884
884
|
t,
|
|
885
885
|
o
|
|
886
886
|
];
|
|
887
|
-
},
|
|
887
|
+
}, Bn = function(e) {
|
|
888
888
|
var r = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
|
|
889
889
|
return [
|
|
890
890
|
r,
|
|
891
891
|
t,
|
|
892
892
|
o
|
|
893
893
|
];
|
|
894
|
-
},
|
|
895
|
-
return e === "v" ? Un(r) :
|
|
896
|
-
},
|
|
897
|
-
return e === "v" ?
|
|
898
|
-
},
|
|
894
|
+
}, Hr = function(e, r) {
|
|
895
|
+
return e === "v" ? Un(r) : qn(r);
|
|
896
|
+
}, Br = function(e, r) {
|
|
897
|
+
return e === "v" ? Hn(r) : Bn(r);
|
|
898
|
+
}, jn = function(e, r) {
|
|
899
899
|
return e === "h" && r === "rtl" ? -1 : 1;
|
|
900
|
-
},
|
|
901
|
-
var n =
|
|
900
|
+
}, zn = function(e, r, t, o, a) {
|
|
901
|
+
var n = jn(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 =
|
|
904
|
-
(w || g) &&
|
|
903
|
+
var m = Br(e, i), w = m[0], h = m[1], _ = m[2], g = h - _ - n * w;
|
|
904
|
+
(w || g) && Hr(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
|
|
@@ -942,18 +942,18 @@ function Gn(e) {
|
|
|
942
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 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,
|
|
946
|
-
if ("touches" in h && S === "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, N = h.target, S = Math.abs(b) > Math.abs(y) ? "h" : "v";
|
|
946
|
+
if ("touches" in h && S === "h" && N.type === "range")
|
|
947
947
|
return !1;
|
|
948
|
-
var
|
|
949
|
-
if (!
|
|
948
|
+
var R = dr(S, N);
|
|
949
|
+
if (!R)
|
|
950
950
|
return !0;
|
|
951
|
-
if (
|
|
951
|
+
if (R ? C = S : (C = S === "v" ? "h" : "v", R = dr(S, N)), !R)
|
|
952
952
|
return !1;
|
|
953
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
|
|
956
|
+
return zn(P, _, h, P === "h" ? b : y);
|
|
957
957
|
}, []), u = c.useCallback(function(h) {
|
|
958
958
|
var _ = h;
|
|
959
959
|
if (!(!G.length || G[G.length - 1] !== n)) {
|
|
@@ -1010,22 +1010,22 @@ function Kn(e) {
|
|
|
1010
1010
|
return r;
|
|
1011
1011
|
}
|
|
1012
1012
|
const Zn = Pn(Fr, Gn);
|
|
1013
|
-
var
|
|
1013
|
+
var jr = c.forwardRef(function(e, r) {
|
|
1014
1014
|
return c.createElement(Se, I({}, e, { ref: r, sideCar: Zn }));
|
|
1015
1015
|
});
|
|
1016
|
-
|
|
1016
|
+
jr.classNames = Se.classNames;
|
|
1017
1017
|
var Qn = function(e) {
|
|
1018
1018
|
if (typeof document > "u")
|
|
1019
1019
|
return null;
|
|
1020
1020
|
var r = Array.isArray(e) ? e[0] : e;
|
|
1021
1021
|
return r.ownerDocument.body;
|
|
1022
|
-
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0,
|
|
1023
|
-
return e && (e.host ||
|
|
1022
|
+
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, zr = function(e) {
|
|
1023
|
+
return e && (e.host || zr(e.parentNode));
|
|
1024
1024
|
}, Jn = function(e, r) {
|
|
1025
1025
|
return r.map(function(t) {
|
|
1026
1026
|
if (e.contains(t))
|
|
1027
1027
|
return t;
|
|
1028
|
-
var o =
|
|
1028
|
+
var o = zr(t);
|
|
1029
1029
|
return o && e.contains(o) ? o : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
1030
1030
|
}).filter(function(t) {
|
|
1031
1031
|
return !!t;
|
|
@@ -1070,7 +1070,7 @@ var Qn = function(e) {
|
|
|
1070
1070
|
defaultOpen: a,
|
|
1071
1071
|
onOpenChange: n,
|
|
1072
1072
|
modal: s = !0
|
|
1073
|
-
} = e, i = c.useRef(null), u = c.useRef(null), [l = !1, d] =
|
|
1073
|
+
} = e, i = c.useRef(null), u = c.useRef(null), [l = !1, d] = qt({
|
|
1074
1074
|
prop: o,
|
|
1075
1075
|
defaultProp: a,
|
|
1076
1076
|
onChange: n
|
|
@@ -1106,7 +1106,7 @@ var Xr = "DialogTrigger", Gr = c.forwardRef(
|
|
|
1106
1106
|
"data-state": Ge(a.open),
|
|
1107
1107
|
...o,
|
|
1108
1108
|
ref: n,
|
|
1109
|
-
onClick:
|
|
1109
|
+
onClick: x(e.onClick, a.onOpenToggle)
|
|
1110
1110
|
}
|
|
1111
1111
|
);
|
|
1112
1112
|
}
|
|
@@ -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(j, { 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(j, { present: o || n.open, children: /* @__PURE__ */ f(oo, { ...a, ref: r }) }) : null;
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
1128
|
Qr.displayName = we;
|
|
@@ -1132,7 +1132,7 @@ var oo = c.forwardRef(
|
|
|
1132
1132
|
return (
|
|
1133
1133
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1134
1134
|
// ie. when `Overlay` and `Content` are siblings
|
|
1135
|
-
/* @__PURE__ */ f(
|
|
1135
|
+
/* @__PURE__ */ f(jr, { as: ze, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1136
1136
|
O.div,
|
|
1137
1137
|
{
|
|
1138
1138
|
"data-state": Ge(a.open),
|
|
@@ -1146,7 +1146,7 @@ var oo = c.forwardRef(
|
|
|
1146
1146
|
), V = "DialogContent", Jr = c.forwardRef(
|
|
1147
1147
|
(e, r) => {
|
|
1148
1148
|
const t = Kr(V, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(V, e.__scopeDialog);
|
|
1149
|
-
return /* @__PURE__ */ f(
|
|
1149
|
+
return /* @__PURE__ */ f(j, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(ao, { ...a, ref: r }) : /* @__PURE__ */ f(io, { ...a, ref: r }) });
|
|
1150
1150
|
}
|
|
1151
1151
|
);
|
|
1152
1152
|
Jr.displayName = V;
|
|
@@ -1163,15 +1163,15 @@ var ao = c.forwardRef(
|
|
|
1163
1163
|
ref: a,
|
|
1164
1164
|
trapFocus: t.open,
|
|
1165
1165
|
disableOutsidePointerEvents: !0,
|
|
1166
|
-
onCloseAutoFocus:
|
|
1166
|
+
onCloseAutoFocus: x(e.onCloseAutoFocus, (n) => {
|
|
1167
1167
|
var s;
|
|
1168
1168
|
n.preventDefault(), (s = t.triggerRef.current) == null || s.focus();
|
|
1169
1169
|
}),
|
|
1170
|
-
onPointerDownOutside:
|
|
1170
|
+
onPointerDownOutside: x(e.onPointerDownOutside, (n) => {
|
|
1171
1171
|
const s = n.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0;
|
|
1172
1172
|
(s.button === 2 || i) && n.preventDefault();
|
|
1173
1173
|
}),
|
|
1174
|
-
onFocusOutside:
|
|
1174
|
+
onFocusOutside: x(
|
|
1175
1175
|
e.onFocusOutside,
|
|
1176
1176
|
(n) => n.preventDefault()
|
|
1177
1177
|
)
|
|
@@ -1204,7 +1204,7 @@ var ao = c.forwardRef(
|
|
|
1204
1204
|
), et = c.forwardRef(
|
|
1205
1205
|
(e, r) => {
|
|
1206
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(
|
|
1207
|
+
return hn(), /* @__PURE__ */ D(H, { 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(H, { children: [
|
|
1232
1232
|
/* @__PURE__ */ f(so, { titleId: i.titleId }),
|
|
1233
1233
|
/* @__PURE__ */ f(lo, { contentRef: u, descriptionId: i.descriptionId })
|
|
1234
1234
|
] })
|
|
@@ -1257,7 +1257,7 @@ var ot = "DialogClose", at = c.forwardRef(
|
|
|
1257
1257
|
type: "button",
|
|
1258
1258
|
...o,
|
|
1259
1259
|
ref: r,
|
|
1260
|
-
onClick:
|
|
1260
|
+
onClick: x(e.onClick, () => a.onOpenChange(!1))
|
|
1261
1261
|
}
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
@@ -1330,23 +1330,23 @@ function wo() {
|
|
|
1330
1330
|
}(Le)), Le.exports;
|
|
1331
1331
|
}
|
|
1332
1332
|
var bo = wo();
|
|
1333
|
-
const Y = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "
|
|
1334
|
-
"purpur-drawer-content": "_purpur-drawer-
|
|
1333
|
+
const Y = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "_drawerSmallScreenAnimation_5mlbf_1", Eo = "_drawerLargeScreenAnimation_5mlbf_1", Co = "_slideDown_5mlbf_1", Po = "_overlayAnimation_5mlbf_1", No = {
|
|
1334
|
+
"purpur-drawer-content": "_purpur-drawer-content_5mlbf_1",
|
|
1335
1335
|
drawerSmallScreenAnimation: So,
|
|
1336
|
-
"purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-
|
|
1336
|
+
"purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_5mlbf_16",
|
|
1337
1337
|
drawerLargeScreenAnimation: Eo,
|
|
1338
|
-
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-
|
|
1339
|
-
"purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-
|
|
1338
|
+
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_5mlbf_43",
|
|
1339
|
+
"purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-frame_5mlbf_48",
|
|
1340
1340
|
slideDown: Co,
|
|
1341
|
-
"purpur-drawer-content__description": "_purpur-drawer-
|
|
1342
|
-
"purpur-drawer-overlay": "_purpur-drawer-
|
|
1341
|
+
"purpur-drawer-content__description": "_purpur-drawer-content__description_5mlbf_58",
|
|
1342
|
+
"purpur-drawer-overlay": "_purpur-drawer-overlay_5mlbf_69",
|
|
1343
1343
|
overlayAnimation: Po
|
|
1344
|
-
},
|
|
1344
|
+
}, Ao = {
|
|
1345
1345
|
"purpur-drawer-container--header": "_purpur-drawer-container--header_1u45h_1",
|
|
1346
1346
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1u45h_10",
|
|
1347
1347
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1u45h_18",
|
|
1348
1348
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1u45h_26"
|
|
1349
|
-
},
|
|
1349
|
+
}, Ro = Y.bind(Ao), $e = "purpur-drawer-container", ee = B(
|
|
1350
1350
|
({
|
|
1351
1351
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1352
1352
|
children: r,
|
|
@@ -1355,7 +1355,7 @@ const Y = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "_drawerSmallScre
|
|
|
1355
1355
|
stickyFooter: a,
|
|
1356
1356
|
...n
|
|
1357
1357
|
}, s) => {
|
|
1358
|
-
const i =
|
|
1358
|
+
const i = Ro([
|
|
1359
1359
|
t,
|
|
1360
1360
|
$e,
|
|
1361
1361
|
{
|
|
@@ -1369,7 +1369,7 @@ const Y = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "_drawerSmallScre
|
|
|
1369
1369
|
}
|
|
1370
1370
|
);
|
|
1371
1371
|
ee.displayName = "DrawerContainer";
|
|
1372
|
-
const
|
|
1372
|
+
const xo = {
|
|
1373
1373
|
"purpur-drawer-frame": "_purpur-drawer-frame_1gdvv_1",
|
|
1374
1374
|
"purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_1gdvv_17",
|
|
1375
1375
|
"purpur-drawer-frame__header": "_purpur-drawer-frame__header_1gdvv_20",
|
|
@@ -1399,7 +1399,7 @@ const Ro = {
|
|
|
1399
1399
|
});
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
-
}), hr = (e, r = 0) => Math.abs(e.y) > r, Oo = Y.bind(Do), Lo = "purpur-drawer-handle", lt =
|
|
1402
|
+
}), hr = (e, r = 0) => Math.abs(e.y) > r, Oo = Y.bind(Do), Lo = "purpur-drawer-handle", lt = B(
|
|
1403
1403
|
({
|
|
1404
1404
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1405
1405
|
className: r,
|
|
@@ -1478,21 +1478,21 @@ function Io() {
|
|
|
1478
1478
|
}(mr)), mr.exports;
|
|
1479
1479
|
}
|
|
1480
1480
|
var ko = Io();
|
|
1481
|
-
const _r = /* @__PURE__ */ Mo(ko), Wo = "
|
|
1482
|
-
"purpur-spinner": "_purpur-
|
|
1481
|
+
const _r = /* @__PURE__ */ Mo(ko), Wo = "_rotate_12t9p_1", Fo = "_dash_12t9p_1", ne = {
|
|
1482
|
+
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1483
1483
|
rotate: Wo,
|
|
1484
|
-
"purpur-spinner--xxs": "_purpur-spinner--
|
|
1485
|
-
"purpur-spinner--xs": "_purpur-spinner--
|
|
1486
|
-
"purpur-spinner--sm": "_purpur-spinner--
|
|
1487
|
-
"purpur-spinner--md": "_purpur-spinner--
|
|
1488
|
-
"purpur-spinner--lg": "_purpur-spinner--
|
|
1489
|
-
"purpur-spinner__circle": "_purpur-
|
|
1484
|
+
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1485
|
+
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1486
|
+
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1487
|
+
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1488
|
+
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1489
|
+
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1490
1490
|
dash: Fo,
|
|
1491
|
-
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--
|
|
1492
|
-
"purpur-spinner__circle--negative": "_purpur-spinner__circle--
|
|
1491
|
+
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1492
|
+
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1493
1493
|
}, oe = "purpur-spinner", Uo = {
|
|
1494
1494
|
SM: "sm"
|
|
1495
|
-
},
|
|
1495
|
+
}, qo = ({
|
|
1496
1496
|
["data-testid"]: e,
|
|
1497
1497
|
disabled: r = !1,
|
|
1498
1498
|
negative: t = !1,
|
|
@@ -1518,7 +1518,7 @@ const _r = /* @__PURE__ */ Mo(ko), Wo = "_rotate_1xozj_1", Fo = "_dash_1xozj_1",
|
|
|
1518
1518
|
) })
|
|
1519
1519
|
}
|
|
1520
1520
|
);
|
|
1521
|
-
function
|
|
1521
|
+
function Ho(e) {
|
|
1522
1522
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1523
1523
|
}
|
|
1524
1524
|
var wr = { exports: {} };
|
|
@@ -1528,7 +1528,7 @@ var wr = { exports: {} };
|
|
|
1528
1528
|
http://jedwatson.github.io/classnames
|
|
1529
1529
|
*/
|
|
1530
1530
|
var br;
|
|
1531
|
-
function
|
|
1531
|
+
function Bo() {
|
|
1532
1532
|
return br || (br = 1, function(e) {
|
|
1533
1533
|
(function() {
|
|
1534
1534
|
var r = {}.hasOwnProperty;
|
|
@@ -1560,8 +1560,8 @@ function zo() {
|
|
|
1560
1560
|
})();
|
|
1561
1561
|
}(wr)), wr.exports;
|
|
1562
1562
|
}
|
|
1563
|
-
var
|
|
1564
|
-
const
|
|
1563
|
+
var jo = Bo();
|
|
1564
|
+
const zo = /* @__PURE__ */ Ho(jo), Vo = {
|
|
1565
1565
|
"purpur-button": "_purpur-button_w455q_1",
|
|
1566
1566
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
1567
1567
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -1586,7 +1586,7 @@ const Bo = /* @__PURE__ */ qo(Ho), Vo = {
|
|
|
1586
1586
|
}, Me = {
|
|
1587
1587
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1588
1588
|
TEXT: "text"
|
|
1589
|
-
}, Yo =
|
|
1589
|
+
}, Yo = zo.bind(Vo), z = "purpur-button", Xo = ({
|
|
1590
1590
|
children: e,
|
|
1591
1591
|
className: r,
|
|
1592
1592
|
["data-testid"]: t,
|
|
@@ -1605,15 +1605,15 @@ const Bo = /* @__PURE__ */ qo(Ho), Vo = {
|
|
|
1605
1605
|
return null;
|
|
1606
1606
|
const w = Yo(
|
|
1607
1607
|
[
|
|
1608
|
-
|
|
1609
|
-
`${
|
|
1610
|
-
`${
|
|
1608
|
+
z,
|
|
1609
|
+
`${z}--${i ? `${d}-negative` : d}`,
|
|
1610
|
+
`${z}--${l}`
|
|
1611
1611
|
],
|
|
1612
1612
|
{
|
|
1613
|
-
[`${
|
|
1614
|
-
[`${
|
|
1615
|
-
[`${
|
|
1616
|
-
[`${
|
|
1613
|
+
[`${z}--icon-only`]: n,
|
|
1614
|
+
[`${z}--negative`]: i,
|
|
1615
|
+
[`${z}--full-width`]: a,
|
|
1616
|
+
[`${z}--disabled`]: o || s
|
|
1617
1617
|
},
|
|
1618
1618
|
r
|
|
1619
1619
|
), h = (g) => {
|
|
@@ -1630,13 +1630,13 @@ const Bo = /* @__PURE__ */ qo(Ho), Vo = {
|
|
|
1630
1630
|
onClick: h,
|
|
1631
1631
|
...v,
|
|
1632
1632
|
children: [
|
|
1633
|
-
s && /* @__PURE__ */ f(
|
|
1633
|
+
s && /* @__PURE__ */ f(qo, { size: l === $o.LG ? "xs" : "xxs", negative: i, disabled: _ }),
|
|
1634
1634
|
" ",
|
|
1635
1635
|
e
|
|
1636
1636
|
]
|
|
1637
1637
|
}
|
|
1638
1638
|
);
|
|
1639
|
-
}, Ue =
|
|
1639
|
+
}, Ue = B(Xo);
|
|
1640
1640
|
Ue.displayName = "Button";
|
|
1641
1641
|
function Go(e) {
|
|
1642
1642
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -1697,16 +1697,16 @@ const Qo = /* @__PURE__ */ Go(Zo), he = {
|
|
|
1697
1697
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
1698
1698
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
1699
1699
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
1700
|
-
},
|
|
1700
|
+
}, qe = {
|
|
1701
1701
|
TITLE100: "title-100",
|
|
1702
1702
|
TITLE200: "title-200"
|
|
1703
|
-
}, me = "purpur-heading",
|
|
1703
|
+
}, me = "purpur-heading", He = ({
|
|
1704
1704
|
children: e,
|
|
1705
1705
|
className: r = "",
|
|
1706
1706
|
enableHyphenation: t = !1,
|
|
1707
1707
|
negative: o = !1,
|
|
1708
1708
|
tag: a,
|
|
1709
|
-
variant: n =
|
|
1709
|
+
variant: n = qe.TITLE100,
|
|
1710
1710
|
...s
|
|
1711
1711
|
}) => {
|
|
1712
1712
|
const i = a, u = Qo([
|
|
@@ -1720,7 +1720,7 @@ const Qo = /* @__PURE__ */ Go(Zo), he = {
|
|
|
1720
1720
|
]);
|
|
1721
1721
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1722
1722
|
};
|
|
1723
|
-
|
|
1723
|
+
He.displayName = "Heading";
|
|
1724
1724
|
function Jo(e) {
|
|
1725
1725
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1726
1726
|
}
|
|
@@ -1817,7 +1817,7 @@ const ua = {
|
|
|
1817
1817
|
category: "utility"
|
|
1818
1818
|
}, dt = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: ua });
|
|
1819
1819
|
dt.displayName = "IconClose";
|
|
1820
|
-
function
|
|
1820
|
+
function Nr(e, r) {
|
|
1821
1821
|
if (typeof e == "function")
|
|
1822
1822
|
return e(r);
|
|
1823
1823
|
e != null && (e.current = r);
|
|
@@ -1826,14 +1826,14 @@ function da(...e) {
|
|
|
1826
1826
|
return (r) => {
|
|
1827
1827
|
let t = !1;
|
|
1828
1828
|
const o = e.map((a) => {
|
|
1829
|
-
const n =
|
|
1829
|
+
const n = Nr(a, r);
|
|
1830
1830
|
return !t && typeof n == "function" && (t = !0), n;
|
|
1831
1831
|
});
|
|
1832
1832
|
if (t)
|
|
1833
1833
|
return () => {
|
|
1834
1834
|
for (let a = 0; a < o.length; a++) {
|
|
1835
1835
|
const n = o[a];
|
|
1836
|
-
typeof n == "function" ? n() :
|
|
1836
|
+
typeof n == "function" ? n() : Nr(e[a], null);
|
|
1837
1837
|
}
|
|
1838
1838
|
};
|
|
1839
1839
|
};
|
|
@@ -1842,12 +1842,12 @@ var ft = c.forwardRef((e, r) => {
|
|
|
1842
1842
|
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(pa);
|
|
1843
1843
|
if (n) {
|
|
1844
1844
|
const s = n.props.children, i = a.map((u) => u === n ? c.Children.count(s) > 1 ? c.Children.only(null) : c.isValidElement(s) ? s.props.children : null : u);
|
|
1845
|
-
return /* @__PURE__ */ f(
|
|
1845
|
+
return /* @__PURE__ */ f(Be, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
1846
1846
|
}
|
|
1847
|
-
return /* @__PURE__ */ f(
|
|
1847
|
+
return /* @__PURE__ */ f(Be, { ...o, ref: r, children: t });
|
|
1848
1848
|
});
|
|
1849
1849
|
ft.displayName = "Slot";
|
|
1850
|
-
var
|
|
1850
|
+
var Be = c.forwardRef((e, r) => {
|
|
1851
1851
|
const { children: t, ...o } = e;
|
|
1852
1852
|
if (c.isValidElement(t)) {
|
|
1853
1853
|
const a = ha(t), n = va(o, t.props);
|
|
@@ -1855,8 +1855,8 @@ var ze = c.forwardRef((e, r) => {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
1857
1857
|
});
|
|
1858
|
-
|
|
1859
|
-
var fa = ({ children: e }) => /* @__PURE__ */ f(
|
|
1858
|
+
Be.displayName = "SlotClone";
|
|
1859
|
+
var fa = ({ children: e }) => /* @__PURE__ */ f(H, { children: e });
|
|
1860
1860
|
function pa(e) {
|
|
1861
1861
|
return c.isValidElement(e) && e.type === fa;
|
|
1862
1862
|
}
|
|
@@ -1923,7 +1923,7 @@ var ma = [
|
|
|
1923
1923
|
);
|
|
1924
1924
|
pt.displayName = _a;
|
|
1925
1925
|
var wa = pt;
|
|
1926
|
-
const
|
|
1926
|
+
const Ar = ({
|
|
1927
1927
|
asChild: e,
|
|
1928
1928
|
children: r,
|
|
1929
1929
|
className: t = "",
|
|
@@ -1935,7 +1935,7 @@ const Nr = ({
|
|
|
1935
1935
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1936
1936
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1937
1937
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1938
|
-
}, Z = Y.bind(ba), U = "purpur-drawer-header", vt =
|
|
1938
|
+
}, Z = Y.bind(ba), U = "purpur-drawer-header", vt = B(
|
|
1939
1939
|
({
|
|
1940
1940
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1941
1941
|
backButton: r,
|
|
@@ -1981,15 +1981,15 @@ const Nr = ({
|
|
|
1981
1981
|
!o && t
|
|
1982
1982
|
]
|
|
1983
1983
|
}
|
|
1984
|
-
) : s ? /* @__PURE__ */ D(
|
|
1984
|
+
) : s ? /* @__PURE__ */ D(H, { children: [
|
|
1985
1985
|
s,
|
|
1986
|
-
/* @__PURE__ */ f(
|
|
1986
|
+
/* @__PURE__ */ f(Ar, { asChild: !0, children: /* @__PURE__ */ f(ve, { asChild: !0, children: u }) })
|
|
1987
1987
|
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1988
|
-
|
|
1988
|
+
He,
|
|
1989
1989
|
{
|
|
1990
1990
|
"data-testid": `${e}-title`,
|
|
1991
1991
|
tag: "h2",
|
|
1992
|
-
variant:
|
|
1992
|
+
variant: qe.TITLE200,
|
|
1993
1993
|
children: u
|
|
1994
1994
|
}
|
|
1995
1995
|
) }) }),
|
|
@@ -2007,15 +2007,15 @@ const Nr = ({
|
|
|
2007
2007
|
]
|
|
2008
2008
|
}
|
|
2009
2009
|
),
|
|
2010
|
-
r && t && i && (s ? /* @__PURE__ */ D(
|
|
2010
|
+
r && t && i && (s ? /* @__PURE__ */ D(H, { children: [
|
|
2011
2011
|
s,
|
|
2012
|
-
/* @__PURE__ */ f(
|
|
2012
|
+
/* @__PURE__ */ f(Ar, { asChild: !0, children: /* @__PURE__ */ f(ve, { asChild: !0, children: u }) })
|
|
2013
2013
|
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2014
|
-
|
|
2014
|
+
He,
|
|
2015
2015
|
{
|
|
2016
2016
|
"data-testid": `${e}-title-with-back-button`,
|
|
2017
2017
|
tag: "h2",
|
|
2018
|
-
variant:
|
|
2018
|
+
variant: qe.TITLE200,
|
|
2019
2019
|
children: u
|
|
2020
2020
|
}
|
|
2021
2021
|
) }))
|
|
@@ -2042,13 +2042,13 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2042
2042
|
dir: a,
|
|
2043
2043
|
scrollHideDelay: n = 600,
|
|
2044
2044
|
...s
|
|
2045
|
-
} = 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,
|
|
2045
|
+
} = 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, N] = c.useState(!1), [S, R] = c.useState(!1), P = L(r, (F) => u(F)), A = Sa(a);
|
|
2046
2046
|
return /* @__PURE__ */ f(
|
|
2047
2047
|
Pa,
|
|
2048
2048
|
{
|
|
2049
2049
|
scope: t,
|
|
2050
2050
|
type: o,
|
|
2051
|
-
dir:
|
|
2051
|
+
dir: A,
|
|
2052
2052
|
scrollHideDelay: n,
|
|
2053
2053
|
scrollArea: i,
|
|
2054
2054
|
viewport: l,
|
|
@@ -2058,17 +2058,17 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2058
2058
|
scrollbarX: m,
|
|
2059
2059
|
onScrollbarXChange: w,
|
|
2060
2060
|
scrollbarXEnabled: C,
|
|
2061
|
-
onScrollbarXEnabledChange:
|
|
2061
|
+
onScrollbarXEnabledChange: N,
|
|
2062
2062
|
scrollbarY: h,
|
|
2063
2063
|
onScrollbarYChange: _,
|
|
2064
2064
|
scrollbarYEnabled: S,
|
|
2065
|
-
onScrollbarYEnabledChange:
|
|
2065
|
+
onScrollbarYEnabledChange: R,
|
|
2066
2066
|
onCornerWidthChange: E,
|
|
2067
2067
|
onCornerHeightChange: y,
|
|
2068
2068
|
children: /* @__PURE__ */ f(
|
|
2069
2069
|
O.div,
|
|
2070
2070
|
{
|
|
2071
|
-
dir:
|
|
2071
|
+
dir: A,
|
|
2072
2072
|
...s,
|
|
2073
2073
|
ref: P,
|
|
2074
2074
|
style: {
|
|
@@ -2088,7 +2088,7 @@ mt.displayName = Ze;
|
|
|
2088
2088
|
var gt = "ScrollAreaViewport", _t = c.forwardRef(
|
|
2089
2089
|
(e, r) => {
|
|
2090
2090
|
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(gt, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
|
|
2091
|
-
return /* @__PURE__ */ D(
|
|
2091
|
+
return /* @__PURE__ */ D(H, { children: [
|
|
2092
2092
|
/* @__PURE__ */ f(
|
|
2093
2093
|
"style",
|
|
2094
2094
|
{
|
|
@@ -2132,11 +2132,11 @@ var k = "ScrollAreaScrollbar", wt = c.forwardRef(
|
|
|
2132
2132
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2133
2133
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2134
2134
|
i ? n(!1) : s(!1);
|
|
2135
|
-
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(
|
|
2135
|
+
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(Na, { ...o, ref: r, forceMount: t }) : a.type === "scroll" ? /* @__PURE__ */ f(Aa, { ...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;
|
|
2136
2136
|
}
|
|
2137
2137
|
);
|
|
2138
2138
|
wt.displayName = k;
|
|
2139
|
-
var
|
|
2139
|
+
var Na = c.forwardRef((e, r) => {
|
|
2140
2140
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2141
2141
|
return c.useEffect(() => {
|
|
2142
2142
|
const i = a.scrollArea;
|
|
@@ -2151,7 +2151,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2151
2151
|
window.clearTimeout(u), i.removeEventListener("pointerenter", l), i.removeEventListener("pointerleave", d);
|
|
2152
2152
|
};
|
|
2153
2153
|
}
|
|
2154
|
-
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(
|
|
2154
|
+
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(j, { present: t || n, children: /* @__PURE__ */ f(
|
|
2155
2155
|
bt,
|
|
2156
2156
|
{
|
|
2157
2157
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2159,7 +2159,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2159
2159
|
ref: r
|
|
2160
2160
|
}
|
|
2161
2161
|
) });
|
|
2162
|
-
}),
|
|
2162
|
+
}), Aa = c.forwardRef((e, r) => {
|
|
2163
2163
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Ce(() => u("SCROLL_END"), 100), [i, u] = Ca("hidden", {
|
|
2164
2164
|
hidden: {
|
|
2165
2165
|
SCROLL: "scrolling"
|
|
@@ -2193,14 +2193,14 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2193
2193
|
};
|
|
2194
2194
|
return l.addEventListener("scroll", v), () => l.removeEventListener("scroll", v);
|
|
2195
2195
|
}
|
|
2196
|
-
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(
|
|
2196
|
+
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(j, { present: t || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2197
2197
|
Qe,
|
|
2198
2198
|
{
|
|
2199
2199
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
2200
2200
|
...o,
|
|
2201
2201
|
ref: r,
|
|
2202
|
-
onPointerEnter:
|
|
2203
|
-
onPointerLeave:
|
|
2202
|
+
onPointerEnter: x(e.onPointerEnter, () => u("POINTER_ENTER")),
|
|
2203
|
+
onPointerLeave: x(e.onPointerLeave, () => u("POINTER_LEAVE"))
|
|
2204
2204
|
}
|
|
2205
2205
|
) });
|
|
2206
2206
|
}), bt = c.forwardRef((e, r) => {
|
|
@@ -2210,7 +2210,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2210
2210
|
s(i ? l : d);
|
|
2211
2211
|
}
|
|
2212
2212
|
}, 10);
|
|
2213
|
-
return te(t.viewport, u), te(t.content, u), /* @__PURE__ */ f(
|
|
2213
|
+
return te(t.viewport, u), te(t.content, u), /* @__PURE__ */ f(j, { present: o || n, children: /* @__PURE__ */ f(
|
|
2214
2214
|
Qe,
|
|
2215
2215
|
{
|
|
2216
2216
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2236,13 +2236,13 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2236
2236
|
return $a(v, s.current, i, m);
|
|
2237
2237
|
}
|
|
2238
2238
|
return t === "horizontal" ? /* @__PURE__ */ f(
|
|
2239
|
-
|
|
2239
|
+
Ra,
|
|
2240
2240
|
{
|
|
2241
2241
|
...d,
|
|
2242
2242
|
ref: r,
|
|
2243
2243
|
onThumbPositionChange: () => {
|
|
2244
2244
|
if (a.viewport && n.current) {
|
|
2245
|
-
const v = a.viewport.scrollLeft, m =
|
|
2245
|
+
const v = a.viewport.scrollLeft, m = Rr(v, i, a.dir);
|
|
2246
2246
|
n.current.style.transform = `translate3d(${m}px, 0, 0)`;
|
|
2247
2247
|
}
|
|
2248
2248
|
},
|
|
@@ -2254,13 +2254,13 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2254
2254
|
}
|
|
2255
2255
|
}
|
|
2256
2256
|
) : t === "vertical" ? /* @__PURE__ */ f(
|
|
2257
|
-
|
|
2257
|
+
xa,
|
|
2258
2258
|
{
|
|
2259
2259
|
...d,
|
|
2260
2260
|
ref: r,
|
|
2261
2261
|
onThumbPositionChange: () => {
|
|
2262
2262
|
if (a.viewport && n.current) {
|
|
2263
|
-
const v = a.viewport.scrollTop, m =
|
|
2263
|
+
const v = a.viewport.scrollTop, m = Rr(v, i);
|
|
2264
2264
|
n.current.style.transform = `translate3d(0, ${m}px, 0)`;
|
|
2265
2265
|
}
|
|
2266
2266
|
},
|
|
@@ -2272,7 +2272,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
2274
2274
|
) : null;
|
|
2275
|
-
}),
|
|
2275
|
+
}), Ra = c.forwardRef((e, r) => {
|
|
2276
2276
|
const { sizes: t, onSizesChange: o, ...a } = e, n = $(k, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarXChange);
|
|
2277
2277
|
return c.useEffect(() => {
|
|
2278
2278
|
u.current && i(getComputedStyle(u.current));
|
|
@@ -2295,7 +2295,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2295
2295
|
onWheelScroll: (d, p) => {
|
|
2296
2296
|
if (n.viewport) {
|
|
2297
2297
|
const v = n.viewport.scrollLeft + d.deltaX;
|
|
2298
|
-
e.onWheelScroll(v),
|
|
2298
|
+
e.onWheelScroll(v), Nt(v, p) && d.preventDefault();
|
|
2299
2299
|
}
|
|
2300
2300
|
},
|
|
2301
2301
|
onResize: () => {
|
|
@@ -2311,7 +2311,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
}
|
|
2313
2313
|
);
|
|
2314
|
-
}),
|
|
2314
|
+
}), xa = c.forwardRef((e, r) => {
|
|
2315
2315
|
const { sizes: t, onSizesChange: o, ...a } = e, n = $(k, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarYChange);
|
|
2316
2316
|
return c.useEffect(() => {
|
|
2317
2317
|
u.current && i(getComputedStyle(u.current));
|
|
@@ -2335,7 +2335,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2335
2335
|
onWheelScroll: (d, p) => {
|
|
2336
2336
|
if (n.viewport) {
|
|
2337
2337
|
const v = n.viewport.scrollTop + d.deltaY;
|
|
2338
|
-
e.onWheelScroll(v),
|
|
2338
|
+
e.onWheelScroll(v), Nt(v, p) && d.preventDefault();
|
|
2339
2339
|
}
|
|
2340
2340
|
},
|
|
2341
2341
|
onResize: () => {
|
|
@@ -2364,20 +2364,20 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2364
2364
|
onWheelScroll: d,
|
|
2365
2365
|
onResize: p,
|
|
2366
2366
|
...v
|
|
2367
|
-
} = 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),
|
|
2368
|
-
function
|
|
2367
|
+
} = 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), N = T(u), S = Ce(p, 10);
|
|
2368
|
+
function R(P) {
|
|
2369
2369
|
if (g.current) {
|
|
2370
|
-
const
|
|
2371
|
-
l({ x:
|
|
2370
|
+
const A = P.clientX - g.current.left, F = P.clientY - g.current.top;
|
|
2371
|
+
l({ x: A, y: F });
|
|
2372
2372
|
}
|
|
2373
2373
|
}
|
|
2374
2374
|
return c.useEffect(() => {
|
|
2375
|
-
const P = (
|
|
2376
|
-
const F =
|
|
2377
|
-
(w == null ? void 0 : w.contains(F)) && C(
|
|
2375
|
+
const P = (A) => {
|
|
2376
|
+
const F = A.target;
|
|
2377
|
+
(w == null ? void 0 : w.contains(F)) && C(A, y);
|
|
2378
2378
|
};
|
|
2379
2379
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2380
|
-
}, [b, w, y, C]), c.useEffect(
|
|
2380
|
+
}, [b, w, y, C]), c.useEffect(N, [o, N]), te(w, S), te(m.content, S), /* @__PURE__ */ f(
|
|
2381
2381
|
Da,
|
|
2382
2382
|
{
|
|
2383
2383
|
scope: t,
|
|
@@ -2385,7 +2385,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2385
2385
|
hasThumb: a,
|
|
2386
2386
|
onThumbChange: T(n),
|
|
2387
2387
|
onThumbPointerUp: T(s),
|
|
2388
|
-
onThumbPositionChange:
|
|
2388
|
+
onThumbPositionChange: N,
|
|
2389
2389
|
onThumbPointerDown: T(i),
|
|
2390
2390
|
children: /* @__PURE__ */ f(
|
|
2391
2391
|
O.div,
|
|
@@ -2393,13 +2393,13 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2393
2393
|
...v,
|
|
2394
2394
|
ref: _,
|
|
2395
2395
|
style: { position: "absolute", ...v.style },
|
|
2396
|
-
onPointerDown:
|
|
2397
|
-
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"),
|
|
2396
|
+
onPointerDown: x(e.onPointerDown, (P) => {
|
|
2397
|
+
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"), R(P));
|
|
2398
2398
|
}),
|
|
2399
|
-
onPointerMove:
|
|
2400
|
-
onPointerUp:
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2399
|
+
onPointerMove: x(e.onPointerMove, R),
|
|
2400
|
+
onPointerUp: x(e.onPointerUp, (P) => {
|
|
2401
|
+
const A = P.target;
|
|
2402
|
+
A.hasPointerCapture(P.pointerId) && A.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = E.current, m.viewport && (m.viewport.style.scrollBehavior = ""), g.current = null;
|
|
2403
2403
|
})
|
|
2404
2404
|
}
|
|
2405
2405
|
)
|
|
@@ -2408,7 +2408,7 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2408
2408
|
}), be = "ScrollAreaThumb", Et = c.forwardRef(
|
|
2409
2409
|
(e, r) => {
|
|
2410
2410
|
const { forceMount: t, ...o } = e, a = yt(be, e.__scopeScrollArea);
|
|
2411
|
-
return /* @__PURE__ */ f(
|
|
2411
|
+
return /* @__PURE__ */ f(j, { present: t || a.hasThumb, children: /* @__PURE__ */ f(Ta, { ref: r, ...o }) });
|
|
2412
2412
|
}
|
|
2413
2413
|
), Ta = c.forwardRef(
|
|
2414
2414
|
(e, r) => {
|
|
@@ -2440,11 +2440,11 @@ var xa = c.forwardRef((e, r) => {
|
|
|
2440
2440
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2441
2441
|
...o
|
|
2442
2442
|
},
|
|
2443
|
-
onPointerDownCapture:
|
|
2443
|
+
onPointerDownCapture: x(e.onPointerDownCapture, (p) => {
|
|
2444
2444
|
const m = p.target.getBoundingClientRect(), w = p.clientX - m.left, h = p.clientY - m.top;
|
|
2445
2445
|
s.onThumbPointerDown({ x: w, y: h });
|
|
2446
2446
|
}),
|
|
2447
|
-
onPointerUp:
|
|
2447
|
+
onPointerUp: x(e.onPointerUp, s.onThumbPointerUp)
|
|
2448
2448
|
}
|
|
2449
2449
|
);
|
|
2450
2450
|
}
|
|
@@ -2499,7 +2499,7 @@ function $a(e, r, t, o = "ltr") {
|
|
|
2499
2499
|
const a = Ee(t), n = a / 2, s = r || n, i = a - s, u = t.scrollbar.paddingStart + s, l = t.scrollbar.size - t.scrollbar.paddingEnd - i, d = t.content - t.viewport, p = o === "ltr" ? [0, d] : [d * -1, 0];
|
|
2500
2500
|
return Pt([u, l], p)(e);
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function Rr(e, r, t = "ltr") {
|
|
2503
2503
|
const o = Ee(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, s = r.content - r.viewport, i = n - o, u = t === "ltr" ? [0, s] : [s * -1, 0], l = Ea(e, u);
|
|
2504
2504
|
return Pt([0, s], [0, i])(l);
|
|
2505
2505
|
}
|
|
@@ -2510,7 +2510,7 @@ function Pt(e, r) {
|
|
|
2510
2510
|
return r[0] + o * (t - e[0]);
|
|
2511
2511
|
};
|
|
2512
2512
|
}
|
|
2513
|
-
function
|
|
2513
|
+
function Nt(e, r) {
|
|
2514
2514
|
return e > 0 && e < r;
|
|
2515
2515
|
}
|
|
2516
2516
|
var Ma = (e, r = () => {
|
|
@@ -2548,7 +2548,7 @@ const Ua = {
|
|
|
2548
2548
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1r0fa_10",
|
|
2549
2549
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1r0fa_13",
|
|
2550
2550
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1r0fa_24"
|
|
2551
|
-
}, ae = Y.bind(Ua), Q = "purpur-drawer-scroll-area",
|
|
2551
|
+
}, ae = Y.bind(Ua), Q = "purpur-drawer-scroll-area", je = B(
|
|
2552
2552
|
({
|
|
2553
2553
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2554
2554
|
children: r,
|
|
@@ -2578,8 +2578,8 @@ const Ua = {
|
|
|
2578
2578
|
) });
|
|
2579
2579
|
}
|
|
2580
2580
|
);
|
|
2581
|
-
|
|
2582
|
-
const J = Y.bind(
|
|
2581
|
+
je.displayName = "DrawerScrollArea";
|
|
2582
|
+
const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
2583
2583
|
({
|
|
2584
2584
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2585
2585
|
backButton: r,
|
|
@@ -2647,9 +2647,9 @@ const J = Y.bind(Ro), W = "purpur-drawer-frame", Nt = z(
|
|
|
2647
2647
|
)
|
|
2648
2648
|
}
|
|
2649
2649
|
),
|
|
2650
|
-
g ? /* @__PURE__ */ D(
|
|
2650
|
+
g ? /* @__PURE__ */ D(H, { children: [
|
|
2651
2651
|
/* @__PURE__ */ f(
|
|
2652
|
-
|
|
2652
|
+
je,
|
|
2653
2653
|
{
|
|
2654
2654
|
className: J(`${W}__body`),
|
|
2655
2655
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
@@ -2668,7 +2668,7 @@ const J = Y.bind(Ro), W = "purpur-drawer-frame", Nt = z(
|
|
|
2668
2668
|
}
|
|
2669
2669
|
)
|
|
2670
2670
|
] }) : /* @__PURE__ */ f(
|
|
2671
|
-
|
|
2671
|
+
je,
|
|
2672
2672
|
{
|
|
2673
2673
|
className: J(`${W}__body`),
|
|
2674
2674
|
"data-testid": `${e}-scroll-area`,
|
|
@@ -2701,8 +2701,8 @@ const J = Y.bind(Ro), W = "purpur-drawer-frame", Nt = z(
|
|
|
2701
2701
|
);
|
|
2702
2702
|
}
|
|
2703
2703
|
);
|
|
2704
|
-
|
|
2705
|
-
const
|
|
2704
|
+
At.displayName = "DrawerFrame";
|
|
2705
|
+
const qa = (e, r) => ({
|
|
2706
2706
|
onAnimationEnd: (i) => {
|
|
2707
2707
|
i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
2708
2708
|
},
|
|
@@ -2724,7 +2724,7 @@ const ja = (e, r) => ({
|
|
|
2724
2724
|
const { y: u } = i.delta;
|
|
2725
2725
|
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`);
|
|
2726
2726
|
}
|
|
2727
|
-
}), ie = Y.bind(
|
|
2727
|
+
}), ie = Y.bind(No), se = "purpur-drawer-content", Rt = B(
|
|
2728
2728
|
({
|
|
2729
2729
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2730
2730
|
backButton: r = !1,
|
|
@@ -2748,7 +2748,7 @@ const ja = (e, r) => ({
|
|
|
2748
2748
|
s,
|
|
2749
2749
|
se,
|
|
2750
2750
|
{ [`${se}--fit-to-content`]: l }
|
|
2751
|
-
]), b = Ot(null), y = Lt(ct), { onAnimationEnd: C, onSwipeStart:
|
|
2751
|
+
]), b = Ot(null), y = Lt(ct), { onAnimationEnd: C, onSwipeStart: N, onSwipeMove: S, onSwipeCancel: R, onSwipeEnd: P } = qa(b, y), A = (F) => {
|
|
2752
2752
|
u && F.preventDefault();
|
|
2753
2753
|
};
|
|
2754
2754
|
return /* @__PURE__ */ f(po, { children: /* @__PURE__ */ f(
|
|
@@ -2760,14 +2760,14 @@ const ja = (e, r) => ({
|
|
|
2760
2760
|
children: /* @__PURE__ */ f(
|
|
2761
2761
|
ho,
|
|
2762
2762
|
{
|
|
2763
|
-
onPointerDownOutside:
|
|
2763
|
+
onPointerDownOutside: A,
|
|
2764
2764
|
className: E,
|
|
2765
2765
|
"data-testid": e,
|
|
2766
2766
|
ref: g,
|
|
2767
2767
|
...!a && { "aria-describedby": void 0 },
|
|
2768
2768
|
..._,
|
|
2769
2769
|
children: /* @__PURE__ */ f(
|
|
2770
|
-
|
|
2770
|
+
At,
|
|
2771
2771
|
{
|
|
2772
2772
|
backButton: r,
|
|
2773
2773
|
backButtonText: t,
|
|
@@ -2780,9 +2780,9 @@ const ja = (e, r) => ({
|
|
|
2780
2780
|
ref: b,
|
|
2781
2781
|
onAnimationEnd: C,
|
|
2782
2782
|
onBackButtonClick: v,
|
|
2783
|
-
onSwipeStart:
|
|
2783
|
+
onSwipeStart: N,
|
|
2784
2784
|
onSwipeMove: S,
|
|
2785
|
-
onSwipeCancel:
|
|
2785
|
+
onSwipeCancel: R,
|
|
2786
2786
|
onSwipeEnd: P,
|
|
2787
2787
|
stickyFooter: m,
|
|
2788
2788
|
title: w,
|
|
@@ -2805,8 +2805,8 @@ const ja = (e, r) => ({
|
|
|
2805
2805
|
) });
|
|
2806
2806
|
}
|
|
2807
2807
|
);
|
|
2808
|
-
|
|
2809
|
-
const
|
|
2808
|
+
Rt.displayName = "DrawerContent";
|
|
2809
|
+
const xt = B(
|
|
2810
2810
|
({
|
|
2811
2811
|
["data-testid"]: e = "purpur-drawer-trigger",
|
|
2812
2812
|
children: r,
|
|
@@ -2824,8 +2824,8 @@ const Rt = z(
|
|
|
2824
2824
|
}
|
|
2825
2825
|
)
|
|
2826
2826
|
);
|
|
2827
|
-
|
|
2828
|
-
const
|
|
2827
|
+
xt.displayName = "DrawerTrigger";
|
|
2828
|
+
const Ha = Y.bind(yo), Ba = "purpur-drawer", er = ({
|
|
2829
2829
|
["data-testid"]: e = "purpur-drawer",
|
|
2830
2830
|
children: r,
|
|
2831
2831
|
className: t,
|
|
@@ -2833,15 +2833,15 @@ const qa = Y.bind(yo), za = "purpur-drawer", er = ({
|
|
|
2833
2833
|
open: a = !1,
|
|
2834
2834
|
...n
|
|
2835
2835
|
}) => {
|
|
2836
|
-
const [s, i] = Ie.useState(a), u =
|
|
2836
|
+
const [s, i] = Ie.useState(a), u = Ha([t, Ba]), l = (d) => {
|
|
2837
2837
|
i(d), o == null || o(d);
|
|
2838
2838
|
};
|
|
2839
2839
|
return $t(() => {
|
|
2840
2840
|
i(a);
|
|
2841
2841
|
}, [a]), /* @__PURE__ */ f(ct.Provider, { value: l, children: /* @__PURE__ */ f("div", { className: u, "data-testid": e, ...n, children: /* @__PURE__ */ f(uo, { open: s, onOpenChange: l, children: r }) }) });
|
|
2842
2842
|
};
|
|
2843
|
-
er.Trigger =
|
|
2844
|
-
er.Content =
|
|
2843
|
+
er.Trigger = xt;
|
|
2844
|
+
er.Content = Rt;
|
|
2845
2845
|
er.displayName = "Drawer";
|
|
2846
2846
|
export {
|
|
2847
2847
|
er as Drawer
|