@purpurds/drawer 7.10.1 → 7.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.cjs.js +7 -7
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +212 -208
- package/dist/drawer.es.js.map +1 -1
- package/package.json +8 -8
package/dist/drawer.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as f, Fragment as
|
|
1
|
+
import { jsx as f, Fragment as B, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import Ie, { useState as Tt, createContext as Ot, forwardRef as
|
|
3
|
+
import Ie, { useState as Tt, createContext as Ot, forwardRef as j, useRef as Lt, useContext as $t, useEffect as Mt } from "react";
|
|
4
4
|
import * as It from "react-dom";
|
|
5
|
-
import
|
|
5
|
+
import Wt from "react-dom";
|
|
6
6
|
function x(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
8
|
if (e == null || e(a), t === !1 || !a.defaultPrevented)
|
|
@@ -33,7 +33,7 @@ function Dr(...e) {
|
|
|
33
33
|
function L(...e) {
|
|
34
34
|
return c.useCallback(Dr(...e), e);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Ft(e, r) {
|
|
37
37
|
const t = c.createContext(r), o = (n) => {
|
|
38
38
|
const { children: s, ...i } = n, u = c.useMemo(() => i, Object.values(i));
|
|
39
39
|
return /* @__PURE__ */ f(t.Provider, { value: u, children: s });
|
|
@@ -77,9 +77,9 @@ function Tr(e, r = []) {
|
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
return a.scopeName = e, [o,
|
|
80
|
+
return a.scopeName = e, [o, kt(a, ...r)];
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function kt(...e) {
|
|
83
83
|
const r = e[0];
|
|
84
84
|
if (e.length === 1) return r;
|
|
85
85
|
const t = () => {
|
|
@@ -99,11 +99,11 @@ function Ft(...e) {
|
|
|
99
99
|
}
|
|
100
100
|
var ce = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
101
101
|
}, Ut = c.useId || (() => {
|
|
102
|
-
}),
|
|
102
|
+
}), Ht = 0;
|
|
103
103
|
function Pe(e) {
|
|
104
104
|
const [r, t] = c.useState(Ut());
|
|
105
105
|
return ce(() => {
|
|
106
|
-
t((o) => o ?? String(
|
|
106
|
+
t((o) => o ?? String(Ht++));
|
|
107
107
|
}, [e]), e || (r ? `radix-${r}` : "");
|
|
108
108
|
}
|
|
109
109
|
function T(e) {
|
|
@@ -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 Bt({
|
|
119
119
|
prop: e,
|
|
120
120
|
defaultProp: r,
|
|
121
121
|
onChange: t = () => {
|
|
122
122
|
}
|
|
123
123
|
}) {
|
|
124
|
-
const [o, a] =
|
|
124
|
+
const [o, a] = jt({ 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 Ht({
|
|
|
133
133
|
);
|
|
134
134
|
return [s, u];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function jt({
|
|
137
137
|
defaultProp: e,
|
|
138
138
|
onChange: r
|
|
139
139
|
}) {
|
|
@@ -142,29 +142,29 @@ function Bt({
|
|
|
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 Ve = c.forwardRef((e, r) => {
|
|
146
|
+
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(Vt);
|
|
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
|
-
return /* @__PURE__ */ f(
|
|
149
|
+
return /* @__PURE__ */ f(We, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
150
150
|
}
|
|
151
|
-
return /* @__PURE__ */ f(
|
|
151
|
+
return /* @__PURE__ */ f(We, { ...o, ref: r, children: t });
|
|
152
152
|
});
|
|
153
|
-
|
|
154
|
-
var
|
|
153
|
+
Ve.displayName = "Slot";
|
|
154
|
+
var We = c.forwardRef((e, r) => {
|
|
155
155
|
const { children: t, ...o } = e;
|
|
156
156
|
if (c.isValidElement(t)) {
|
|
157
|
-
const a =
|
|
157
|
+
const a = qt(t), n = Yt(o, t.props);
|
|
158
158
|
return t.type !== c.Fragment && (n.ref = r ? Dr(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
|
-
|
|
163
|
-
var
|
|
164
|
-
function
|
|
165
|
-
return c.isValidElement(e) && e.type ===
|
|
162
|
+
We.displayName = "SlotClone";
|
|
163
|
+
var zt = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
|
|
164
|
+
function Vt(e) {
|
|
165
|
+
return c.isValidElement(e) && e.type === zt;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Yt(e, r) {
|
|
168
168
|
const t = { ...r };
|
|
169
169
|
for (const o in r) {
|
|
170
170
|
const a = e[o], n = r[o];
|
|
@@ -174,7 +174,7 @@ function Vt(e, r) {
|
|
|
174
174
|
}
|
|
175
175
|
return { ...e, ...t };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function qt(e) {
|
|
178
178
|
var o, a;
|
|
179
179
|
let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
180
180
|
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);
|
|
@@ -198,7 +198,7 @@ var Xt = [
|
|
|
198
198
|
"ul"
|
|
199
199
|
], O = Xt.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 ? Ve : 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 };
|
|
@@ -215,7 +215,7 @@ function Kt(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
215
215
|
return r.addEventListener("keydown", o, { capture: !0 }), () => r.removeEventListener("keydown", o, { capture: !0 });
|
|
216
216
|
}, [t, r]);
|
|
217
217
|
}
|
|
218
|
-
var Zt = "DismissableLayer",
|
|
218
|
+
var Zt = "DismissableLayer", Fe = "dismissableLayer.update", Qt = "dismissableLayer.pointerDownOutside", Jt = "dismissableLayer.focusOutside", nr, Or = c.createContext({
|
|
219
219
|
layers: /* @__PURE__ */ new Set(),
|
|
220
220
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
221
221
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -247,7 +247,7 @@ var Zt = "DismissableLayer", We = "dismissableLayer.update", Qt = "dismissableLa
|
|
|
247
247
|
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), or());
|
|
248
248
|
}, [d, l]), c.useEffect(() => {
|
|
249
249
|
const S = () => m({});
|
|
250
|
-
return document.addEventListener(
|
|
250
|
+
return document.addEventListener(Fe, S), () => document.removeEventListener(Fe, S);
|
|
251
251
|
}, []), /* @__PURE__ */ f(
|
|
252
252
|
O.div,
|
|
253
253
|
{
|
|
@@ -324,7 +324,7 @@ function nn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
326
|
function or() {
|
|
327
|
-
const e = new CustomEvent(
|
|
327
|
+
const e = new CustomEvent(Fe);
|
|
328
328
|
document.dispatchEvent(e);
|
|
329
329
|
}
|
|
330
330
|
function $r(e, r, t, { discrete: o }) {
|
|
@@ -352,15 +352,15 @@ var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ar
|
|
|
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 : H(p.current, { select: !0 });
|
|
356
356
|
}, g = 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) || H(p.current, { select: !0 }));
|
|
360
360
|
}, _ = 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 && H(i);
|
|
364
364
|
};
|
|
365
365
|
document.addEventListener("focusin", h), document.addEventListener("focusout", g);
|
|
366
366
|
const E = new MutationObserver(_);
|
|
@@ -374,12 +374,12 @@ var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ar
|
|
|
374
374
|
const h = document.activeElement;
|
|
375
375
|
if (!i.contains(h)) {
|
|
376
376
|
const _ = new CustomEvent(Ne, ar);
|
|
377
|
-
i.addEventListener(Ne, l), i.dispatchEvent(_), _.defaultPrevented || (an(dn(Ir(i)), { select: !0 }), document.activeElement === h &&
|
|
377
|
+
i.addEventListener(Ne, l), i.dispatchEvent(_), _.defaultPrevented || (an(dn(Ir(i)), { select: !0 }), document.activeElement === h && H(i));
|
|
378
378
|
}
|
|
379
379
|
return () => {
|
|
380
380
|
i.removeEventListener(Ne, l), setTimeout(() => {
|
|
381
381
|
const _ = new CustomEvent(Ae, ar);
|
|
382
|
-
i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented ||
|
|
382
|
+
i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented || H(h ?? document.body, { select: !0 }), i.removeEventListener(Ae, d), sr.remove(m);
|
|
383
383
|
}, 0);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
@@ -390,7 +390,7 @@ var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ar
|
|
|
390
390
|
const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, _ = document.activeElement;
|
|
391
391
|
if (g && _) {
|
|
392
392
|
const E = h.currentTarget, [b, y] = sn(E);
|
|
393
|
-
b && y ? !h.shiftKey && _ === y ? (h.preventDefault(), t &&
|
|
393
|
+
b && y ? !h.shiftKey && _ === y ? (h.preventDefault(), t && H(b, { select: !0 })) : h.shiftKey && _ === b && (h.preventDefault(), t && H(y, { select: !0 })) : _ === E && h.preventDefault();
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
[t, o, m.paused]
|
|
@@ -401,7 +401,7 @@ Mr.displayName = on;
|
|
|
401
401
|
function an(e, { select: r = !1 } = {}) {
|
|
402
402
|
const t = document.activeElement;
|
|
403
403
|
for (const o of e)
|
|
404
|
-
if (
|
|
404
|
+
if (H(o, { select: r }), document.activeElement !== t) return;
|
|
405
405
|
}
|
|
406
406
|
function sn(e) {
|
|
407
407
|
const r = Ir(e), t = ir(r, e), o = ir(r.reverse(), e);
|
|
@@ -433,7 +433,7 @@ function cn(e, { upTo: r }) {
|
|
|
433
433
|
function ln(e) {
|
|
434
434
|
return e instanceof HTMLInputElement && "select" in e;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function H(e, { select: r = !1 } = {}) {
|
|
437
437
|
if (e && e.focus) {
|
|
438
438
|
const t = document.activeElement;
|
|
439
439
|
e.focus({ preventScroll: !0 }), e !== t && ln(e) && r && e.select();
|
|
@@ -460,22 +460,22 @@ function cr(e, r) {
|
|
|
460
460
|
function dn(e) {
|
|
461
461
|
return e.filter((r) => r.tagName !== "A");
|
|
462
462
|
}
|
|
463
|
-
var fn = "Portal",
|
|
463
|
+
var fn = "Portal", Wr = 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
|
-
return s ?
|
|
468
|
+
return s ? Wt.createPortal(/* @__PURE__ */ f(O.div, { ...o, ref: r }), s) : null;
|
|
469
469
|
});
|
|
470
|
-
|
|
470
|
+
Wr.displayName = fn;
|
|
471
471
|
function pn(e, r) {
|
|
472
472
|
return c.useReducer((t, o) => r[t][o] ?? t, e);
|
|
473
473
|
}
|
|
474
|
-
var
|
|
474
|
+
var z = (e) => {
|
|
475
475
|
const { present: r, children: t } = e, o = vn(r), a = typeof t == "function" ? t({ present: o.isPresent }) : c.Children.only(t), n = L(o.ref, hn(a));
|
|
476
476
|
return typeof t == "function" || o.isPresent ? c.cloneElement(a, { ref: n }) : null;
|
|
477
477
|
};
|
|
478
|
-
|
|
478
|
+
z.displayName = "Presence";
|
|
479
479
|
function vn(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] = pn(s, {
|
|
481
481
|
mounted: {
|
|
@@ -555,7 +555,7 @@ var I = function() {
|
|
|
555
555
|
return r;
|
|
556
556
|
}, I.apply(this, arguments);
|
|
557
557
|
};
|
|
558
|
-
function
|
|
558
|
+
function Fr(e, r) {
|
|
559
559
|
var t = {};
|
|
560
560
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (t[o] = e[o]);
|
|
561
561
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -676,8 +676,8 @@ function Pn(e) {
|
|
|
676
676
|
var r = Cn(null);
|
|
677
677
|
return r.options = I({ async: !0, ssr: !1 }, e), r;
|
|
678
678
|
}
|
|
679
|
-
var
|
|
680
|
-
var r = e.sideCar, t =
|
|
679
|
+
var kr = function(e) {
|
|
680
|
+
var r = e.sideCar, t = Fr(e, ["sideCar"]);
|
|
681
681
|
if (!r)
|
|
682
682
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
683
683
|
var o = r.read();
|
|
@@ -685,9 +685,9 @@ var Fr = function(e) {
|
|
|
685
685
|
throw new Error("Sidecar medium not found");
|
|
686
686
|
return c.createElement(o, I({}, t));
|
|
687
687
|
};
|
|
688
|
-
|
|
688
|
+
kr.isSideCarExport = !0;
|
|
689
689
|
function Nn(e, r) {
|
|
690
|
-
return e.useMedium(r),
|
|
690
|
+
return e.useMedium(r), kr;
|
|
691
691
|
}
|
|
692
692
|
var Ur = Pn(), De = function() {
|
|
693
693
|
}, Se = c.forwardRef(function(e, r) {
|
|
@@ -695,7 +695,7 @@ var Ur = Pn(), 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, g = e.as, _ = g === void 0 ? "div" : g, E = e.gapMode, b =
|
|
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, g = e.as, _ = g === void 0 ? "div" : g, E = e.gapMode, b = Fr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), y = v, C = Sn([t, r]), N = I(I({}, b), a);
|
|
699
699
|
return c.createElement(
|
|
700
700
|
c.Fragment,
|
|
701
701
|
null,
|
|
@@ -750,7 +750,7 @@ var Tn = function() {
|
|
|
750
750
|
};
|
|
751
751
|
}, [r && t]);
|
|
752
752
|
};
|
|
753
|
-
},
|
|
753
|
+
}, Hr = function() {
|
|
754
754
|
var e = On(), r = function(t) {
|
|
755
755
|
var o = t.styles, a = t.dynamic;
|
|
756
756
|
return e(o, a), null;
|
|
@@ -776,7 +776,7 @@ var Tn = function() {
|
|
|
776
776
|
right: r[2],
|
|
777
777
|
gap: Math.max(0, o - t + r[2] - r[0])
|
|
778
778
|
};
|
|
779
|
-
}, In =
|
|
779
|
+
}, In = Hr(), re = "data-scroll-locked", Wn = 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(_n, ` {
|
|
@@ -823,35 +823,35 @@ var Tn = function() {
|
|
|
823
823
|
}, dr = function() {
|
|
824
824
|
var e = parseInt(document.body.getAttribute(re) || "0", 10);
|
|
825
825
|
return isFinite(e) ? e : 0;
|
|
826
|
-
},
|
|
826
|
+
}, Fn = function() {
|
|
827
827
|
c.useEffect(function() {
|
|
828
828
|
return document.body.setAttribute(re, (dr() + 1).toString()), function() {
|
|
829
829
|
var e = dr() - 1;
|
|
830
830
|
e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
|
|
831
831
|
};
|
|
832
832
|
}, []);
|
|
833
|
-
},
|
|
833
|
+
}, kn = function(e) {
|
|
834
834
|
var r = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
835
|
-
|
|
835
|
+
Fn();
|
|
836
836
|
var n = c.useMemo(function() {
|
|
837
837
|
return Mn(a);
|
|
838
838
|
}, [a]);
|
|
839
|
-
return c.createElement(In, { styles:
|
|
840
|
-
},
|
|
839
|
+
return c.createElement(In, { styles: Wn(n, !r, a, t ? "" : "!important") });
|
|
840
|
+
}, ke = !1;
|
|
841
841
|
if (typeof window < "u")
|
|
842
842
|
try {
|
|
843
843
|
var ue = Object.defineProperty({}, "passive", {
|
|
844
844
|
get: function() {
|
|
845
|
-
return
|
|
845
|
+
return ke = !0, !0;
|
|
846
846
|
}
|
|
847
847
|
});
|
|
848
848
|
window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
|
|
849
849
|
} catch {
|
|
850
|
-
|
|
850
|
+
ke = !1;
|
|
851
851
|
}
|
|
852
|
-
var X =
|
|
852
|
+
var X = ke ? { passive: !1 } : !1, Un = function(e) {
|
|
853
853
|
return e.tagName === "TEXTAREA";
|
|
854
|
-
},
|
|
854
|
+
}, Br = function(e, r) {
|
|
855
855
|
if (!(e instanceof Element))
|
|
856
856
|
return !1;
|
|
857
857
|
var t = window.getComputedStyle(e);
|
|
@@ -860,48 +860,48 @@ var X = Fe ? { passive: !1 } : !1, Un = function(e) {
|
|
|
860
860
|
t[r] !== "hidden" && // contains scroll inside self
|
|
861
861
|
!(t.overflowY === t.overflowX && !Un(e) && t[r] === "visible")
|
|
862
862
|
);
|
|
863
|
-
}, qn = function(e) {
|
|
864
|
-
return Hr(e, "overflowY");
|
|
865
863
|
}, Hn = function(e) {
|
|
866
|
-
return
|
|
864
|
+
return Br(e, "overflowY");
|
|
865
|
+
}, Bn = function(e) {
|
|
866
|
+
return Br(e, "overflowX");
|
|
867
867
|
}, fr = 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 = jr(e, o);
|
|
872
872
|
if (a) {
|
|
873
|
-
var n =
|
|
873
|
+
var n = zr(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
|
+
}, jn = 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
|
+
}, zn = 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
|
-
}, Br = function(e, r) {
|
|
895
|
-
return e === "v" ? qn(r) : Hn(r);
|
|
896
894
|
}, jr = function(e, r) {
|
|
897
|
-
return e === "v" ?
|
|
898
|
-
},
|
|
895
|
+
return e === "v" ? Hn(r) : Bn(r);
|
|
896
|
+
}, zr = function(e, r) {
|
|
897
|
+
return e === "v" ? jn(r) : zn(r);
|
|
898
|
+
}, Vn = function(e, r) {
|
|
899
899
|
return e === "h" && r === "rtl" ? -1 : 1;
|
|
900
|
-
},
|
|
901
|
-
var n =
|
|
900
|
+
}, Yn = function(e, r, t, o, a) {
|
|
901
|
+
var n = Vn(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 || _) &&
|
|
903
|
+
var m = zr(e, i), w = m[0], h = m[1], g = m[2], _ = h - g - n * w;
|
|
904
|
+
(w || _) && jr(e, i) && (p += _, 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
|
|
@@ -914,7 +914,7 @@ var X = Fe ? { passive: !1 } : !1, Un = function(e) {
|
|
|
914
914
|
return [e.deltaX, e.deltaY];
|
|
915
915
|
}, vr = function(e) {
|
|
916
916
|
return e && "current" in e ? e.current : e;
|
|
917
|
-
},
|
|
917
|
+
}, qn = function(e, r) {
|
|
918
918
|
return e[0] === r[0] && e[1] === r[1];
|
|
919
919
|
}, Xn = function(e) {
|
|
920
920
|
return `
|
|
@@ -923,7 +923,7 @@ var X = Fe ? { passive: !1 } : !1, Un = function(e) {
|
|
|
923
923
|
`);
|
|
924
924
|
}, Gn = 0, G = [];
|
|
925
925
|
function Kn(e) {
|
|
926
|
-
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Gn++)[0], n = c.useState(
|
|
926
|
+
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Gn++)[0], n = c.useState(Hr)[0], s = c.useRef(e);
|
|
927
927
|
c.useEffect(function() {
|
|
928
928
|
s.current = e;
|
|
929
929
|
}, [e]), c.useEffect(function() {
|
|
@@ -953,12 +953,12 @@ function Kn(e) {
|
|
|
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 Yn(P, g, h, P === "h" ? b : y);
|
|
957
957
|
}, []), u = c.useCallback(function(h) {
|
|
958
958
|
var g = h;
|
|
959
959
|
if (!(!G.length || G[G.length - 1] !== n)) {
|
|
960
960
|
var _ = "deltaY" in g ? pr(g) : de(g), E = r.current.filter(function(C) {
|
|
961
|
-
return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) &&
|
|
961
|
+
return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && qn(C.delta, _);
|
|
962
962
|
})[0];
|
|
963
963
|
if (E && E.should) {
|
|
964
964
|
g.cancelable && g.preventDefault();
|
|
@@ -1001,7 +1001,7 @@ function Kn(e) {
|
|
|
1001
1001
|
c.Fragment,
|
|
1002
1002
|
null,
|
|
1003
1003
|
w ? c.createElement(n, { styles: Xn(a) }) : null,
|
|
1004
|
-
m ? c.createElement(
|
|
1004
|
+
m ? c.createElement(kn, { gapMode: e.gapMode }) : null
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
1007
1007
|
function Zn(e) {
|
|
@@ -1010,22 +1010,22 @@ function Zn(e) {
|
|
|
1010
1010
|
return r;
|
|
1011
1011
|
}
|
|
1012
1012
|
const Qn = Nn(Ur, Kn);
|
|
1013
|
-
var
|
|
1013
|
+
var Vr = c.forwardRef(function(e, r) {
|
|
1014
1014
|
return c.createElement(Se, I({}, e, { ref: r, sideCar: Qn }));
|
|
1015
1015
|
});
|
|
1016
|
-
|
|
1016
|
+
Vr.classNames = Se.classNames;
|
|
1017
1017
|
var Jn = 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, Yr = function(e) {
|
|
1023
|
+
return e && (e.host || Yr(e.parentNode));
|
|
1024
1024
|
}, eo = 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 = Yr(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;
|
|
@@ -1062,7 +1062,7 @@ var Jn = function(e) {
|
|
|
1062
1062
|
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), ro(o, a, t, "aria-hidden")) : function() {
|
|
1063
1063
|
return null;
|
|
1064
1064
|
};
|
|
1065
|
-
},
|
|
1065
|
+
}, Ye = "Dialog", [qr, Ga] = Tr(Ye), [no, M] = qr(Ye), Xr = (e) => {
|
|
1066
1066
|
const {
|
|
1067
1067
|
__scopeDialog: r,
|
|
1068
1068
|
children: t,
|
|
@@ -1070,7 +1070,7 @@ var Jn = 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] = Bt({
|
|
1074
1074
|
prop: o,
|
|
1075
1075
|
defaultProp: a,
|
|
1076
1076
|
onChange: n
|
|
@@ -1092,7 +1092,7 @@ var Jn = function(e) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
);
|
|
1094
1094
|
};
|
|
1095
|
-
Xr.displayName =
|
|
1095
|
+
Xr.displayName = Ye;
|
|
1096
1096
|
var Gr = "DialogTrigger", Kr = c.forwardRef(
|
|
1097
1097
|
(e, r) => {
|
|
1098
1098
|
const { __scopeDialog: t, ...o } = e, a = M(Gr, t), n = L(r, a.triggerRef);
|
|
@@ -1112,17 +1112,17 @@ var Gr = "DialogTrigger", Kr = c.forwardRef(
|
|
|
1112
1112
|
}
|
|
1113
1113
|
);
|
|
1114
1114
|
Kr.displayName = Gr;
|
|
1115
|
-
var
|
|
1115
|
+
var qe = "DialogPortal", [oo, Zr] = qr(qe, {
|
|
1116
1116
|
forceMount: void 0
|
|
1117
1117
|
}), Qr = (e) => {
|
|
1118
|
-
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = M(
|
|
1119
|
-
return /* @__PURE__ */ f(oo, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(
|
|
1118
|
+
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = M(qe, r);
|
|
1119
|
+
return /* @__PURE__ */ f(oo, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(z, { present: t || n.open, children: /* @__PURE__ */ f(Wr, { asChild: !0, container: a, children: s }) })) });
|
|
1120
1120
|
};
|
|
1121
|
-
Qr.displayName =
|
|
1121
|
+
Qr.displayName = qe;
|
|
1122
1122
|
var we = "DialogOverlay", Jr = c.forwardRef(
|
|
1123
1123
|
(e, r) => {
|
|
1124
1124
|
const t = Zr(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(z, { present: o || n.open, children: /* @__PURE__ */ f(ao, { ...a, ref: r }) }) : null;
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
1128
|
Jr.displayName = we;
|
|
@@ -1132,7 +1132,7 @@ var ao = 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(Vr, { as: Ve, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1136
1136
|
O.div,
|
|
1137
1137
|
{
|
|
1138
1138
|
"data-state": Ge(a.open),
|
|
@@ -1143,16 +1143,16 @@ var ao = c.forwardRef(
|
|
|
1143
1143
|
) })
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
),
|
|
1146
|
+
), Y = "DialogContent", et = c.forwardRef(
|
|
1147
1147
|
(e, r) => {
|
|
1148
|
-
const t = Zr(
|
|
1149
|
-
return /* @__PURE__ */ f(
|
|
1148
|
+
const t = Zr(Y, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(Y, e.__scopeDialog);
|
|
1149
|
+
return /* @__PURE__ */ f(z, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(io, { ...a, ref: r }) : /* @__PURE__ */ f(so, { ...a, ref: r }) });
|
|
1150
1150
|
}
|
|
1151
1151
|
);
|
|
1152
|
-
et.displayName =
|
|
1152
|
+
et.displayName = Y;
|
|
1153
1153
|
var io = c.forwardRef(
|
|
1154
1154
|
(e, r) => {
|
|
1155
|
-
const t = M(
|
|
1155
|
+
const t = M(Y, 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 to(n);
|
|
@@ -1180,7 +1180,7 @@ var io = c.forwardRef(
|
|
|
1180
1180
|
}
|
|
1181
1181
|
), so = c.forwardRef(
|
|
1182
1182
|
(e, r) => {
|
|
1183
|
-
const t = M(
|
|
1183
|
+
const t = M(Y, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
|
|
1184
1184
|
return /* @__PURE__ */ f(
|
|
1185
1185
|
rt,
|
|
1186
1186
|
{
|
|
@@ -1203,8 +1203,8 @@ var io = c.forwardRef(
|
|
|
1203
1203
|
}
|
|
1204
1204
|
), rt = c.forwardRef(
|
|
1205
1205
|
(e, r) => {
|
|
1206
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = M(
|
|
1207
|
-
return mn(), /* @__PURE__ */ D(
|
|
1206
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = M(Y, t), u = c.useRef(null), l = L(r, u);
|
|
1207
|
+
return mn(), /* @__PURE__ */ D(B, { children: [
|
|
1208
1208
|
/* @__PURE__ */ f(
|
|
1209
1209
|
Mr,
|
|
1210
1210
|
{
|
|
@@ -1228,7 +1228,7 @@ var io = c.forwardRef(
|
|
|
1228
1228
|
)
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
/* @__PURE__ */ D(
|
|
1231
|
+
/* @__PURE__ */ D(B, { children: [
|
|
1232
1232
|
/* @__PURE__ */ f(co, { titleId: i.titleId }),
|
|
1233
1233
|
/* @__PURE__ */ f(uo, { contentRef: u, descriptionId: i.descriptionId })
|
|
1234
1234
|
] })
|
|
@@ -1266,8 +1266,8 @@ it.displayName = at;
|
|
|
1266
1266
|
function Ge(e) {
|
|
1267
1267
|
return e ? "open" : "closed";
|
|
1268
1268
|
}
|
|
1269
|
-
var st = "DialogTitleWarning", [Ka, ct] =
|
|
1270
|
-
contentName:
|
|
1269
|
+
var st = "DialogTitleWarning", [Ka, ct] = Ft(st, {
|
|
1270
|
+
contentName: Y,
|
|
1271
1271
|
titleName: Xe,
|
|
1272
1272
|
docsSlug: "dialog"
|
|
1273
1273
|
}), co = ({ titleId: e }) => {
|
|
@@ -1330,7 +1330,7 @@ function bo() {
|
|
|
1330
1330
|
}(Le)), Le.exports;
|
|
1331
1331
|
}
|
|
1332
1332
|
var yo = bo();
|
|
1333
|
-
const
|
|
1333
|
+
const q = /* @__PURE__ */ wo(yo), lt = Ot(null), So = {}, Eo = "_drawerSmallScreenAnimation_5mlbf_1", Co = "_drawerLargeScreenAnimation_5mlbf_1", Po = "_slideDown_5mlbf_1", No = "_overlayAnimation_5mlbf_1", Ao = {
|
|
1334
1334
|
"purpur-drawer-content": "_purpur-drawer-content_5mlbf_1",
|
|
1335
1335
|
drawerSmallScreenAnimation: Eo,
|
|
1336
1336
|
"purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_5mlbf_16",
|
|
@@ -1346,7 +1346,7 @@ const Y = /* @__PURE__ */ wo(yo), lt = Ot(null), So = {}, Eo = "_drawerSmallScre
|
|
|
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
|
-
}, xo =
|
|
1349
|
+
}, xo = q.bind(Ro), $e = "purpur-drawer-container", ee = j(
|
|
1350
1350
|
({
|
|
1351
1351
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1352
1352
|
children: r,
|
|
@@ -1399,7 +1399,7 @@ const Do = {
|
|
|
1399
1399
|
});
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
-
}), mr = (e, r = 0) => Math.abs(e.y) > r, Lo =
|
|
1402
|
+
}), mr = (e, r = 0) => Math.abs(e.y) > r, Lo = q.bind(To), $o = "purpur-drawer-handle", ut = j(
|
|
1403
1403
|
({
|
|
1404
1404
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1405
1405
|
className: r,
|
|
@@ -1445,7 +1445,7 @@ var gr = { exports: {} };
|
|
|
1445
1445
|
http://jedwatson.github.io/classnames
|
|
1446
1446
|
*/
|
|
1447
1447
|
var _r;
|
|
1448
|
-
function
|
|
1448
|
+
function Wo() {
|
|
1449
1449
|
return _r || (_r = 1, function(e) {
|
|
1450
1450
|
(function() {
|
|
1451
1451
|
var r = {}.hasOwnProperty;
|
|
@@ -1477,8 +1477,8 @@ function ko() {
|
|
|
1477
1477
|
})();
|
|
1478
1478
|
}(gr)), gr.exports;
|
|
1479
1479
|
}
|
|
1480
|
-
var
|
|
1481
|
-
const
|
|
1480
|
+
var Fo = Wo();
|
|
1481
|
+
const ko = /* @__PURE__ */ Io(Fo), Uo = "_rotate_12t9p_1", Ho = "_dash_12t9p_1", Bo = {
|
|
1482
1482
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1483
1483
|
rotate: Uo,
|
|
1484
1484
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
@@ -1487,15 +1487,15 @@ const Fo = /* @__PURE__ */ Io(Wo), Uo = "_rotate_12t9p_1", qo = "_dash_12t9p_1",
|
|
|
1487
1487
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1488
1488
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1489
1489
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1490
|
-
dash:
|
|
1490
|
+
dash: Ho,
|
|
1491
1491
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1492
1492
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1493
|
-
}, wr =
|
|
1493
|
+
}, wr = ko.bind(Bo), oe = "purpur-spinner", jo = {
|
|
1494
1494
|
SM: "sm"
|
|
1495
|
-
},
|
|
1495
|
+
}, zo = ({
|
|
1496
1496
|
disabled: e = !1,
|
|
1497
1497
|
negative: r = !1,
|
|
1498
|
-
size: t =
|
|
1498
|
+
size: t = jo.SM,
|
|
1499
1499
|
...o
|
|
1500
1500
|
}) => /* @__PURE__ */ f("div", { className: wr(oe, `${oe}--${t}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1501
1501
|
"circle",
|
|
@@ -1509,7 +1509,7 @@ const Fo = /* @__PURE__ */ Io(Wo), Uo = "_rotate_12t9p_1", qo = "_dash_12t9p_1",
|
|
|
1509
1509
|
r: "20"
|
|
1510
1510
|
}
|
|
1511
1511
|
) }) });
|
|
1512
|
-
function
|
|
1512
|
+
function Vo(e) {
|
|
1513
1513
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1514
1514
|
}
|
|
1515
1515
|
var br = { exports: {} };
|
|
@@ -1519,7 +1519,7 @@ var br = { exports: {} };
|
|
|
1519
1519
|
http://jedwatson.github.io/classnames
|
|
1520
1520
|
*/
|
|
1521
1521
|
var yr;
|
|
1522
|
-
function
|
|
1522
|
+
function Yo() {
|
|
1523
1523
|
return yr || (yr = 1, function(e) {
|
|
1524
1524
|
(function() {
|
|
1525
1525
|
var r = {}.hasOwnProperty;
|
|
@@ -1551,8 +1551,8 @@ function Vo() {
|
|
|
1551
1551
|
})();
|
|
1552
1552
|
}(br)), br.exports;
|
|
1553
1553
|
}
|
|
1554
|
-
var
|
|
1555
|
-
const Xo = /* @__PURE__ */
|
|
1554
|
+
var qo = Yo();
|
|
1555
|
+
const Xo = /* @__PURE__ */ Vo(qo), Go = {
|
|
1556
1556
|
"purpur-button": "_purpur-button_w455q_1",
|
|
1557
1557
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
1558
1558
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -1577,7 +1577,7 @@ const Xo = /* @__PURE__ */ zo(Yo), Go = {
|
|
|
1577
1577
|
}, Me = {
|
|
1578
1578
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1579
1579
|
TEXT: "text"
|
|
1580
|
-
}, Ko = Xo.bind(Go),
|
|
1580
|
+
}, Ko = Xo.bind(Go), V = "purpur-button", Ue = j(
|
|
1581
1581
|
({
|
|
1582
1582
|
children: e,
|
|
1583
1583
|
className: r,
|
|
@@ -1596,15 +1596,15 @@ const Xo = /* @__PURE__ */ zo(Yo), Go = {
|
|
|
1596
1596
|
return null;
|
|
1597
1597
|
const m = Ko(
|
|
1598
1598
|
[
|
|
1599
|
-
|
|
1600
|
-
`${
|
|
1601
|
-
`${
|
|
1599
|
+
V,
|
|
1600
|
+
`${V}--${s ? `${l}-negative` : l}`,
|
|
1601
|
+
`${V}--${u}`
|
|
1602
1602
|
],
|
|
1603
1603
|
{
|
|
1604
|
-
[`${
|
|
1605
|
-
[`${
|
|
1606
|
-
[`${
|
|
1607
|
-
[`${
|
|
1604
|
+
[`${V}--icon-only`]: a,
|
|
1605
|
+
[`${V}--negative`]: s,
|
|
1606
|
+
[`${V}--full-width`]: o,
|
|
1607
|
+
[`${V}--disabled`]: t || n
|
|
1608
1608
|
},
|
|
1609
1609
|
r
|
|
1610
1610
|
), w = (g) => {
|
|
@@ -1621,7 +1621,7 @@ const Xo = /* @__PURE__ */ zo(Yo), Go = {
|
|
|
1621
1621
|
...p,
|
|
1622
1622
|
children: [
|
|
1623
1623
|
n && /* @__PURE__ */ f(
|
|
1624
|
-
|
|
1624
|
+
zo,
|
|
1625
1625
|
{
|
|
1626
1626
|
size: u === Mo.LG ? "xs" : "xxs",
|
|
1627
1627
|
negative: s,
|
|
@@ -1680,31 +1680,35 @@ function Qo() {
|
|
|
1680
1680
|
}
|
|
1681
1681
|
var Jo = Qo();
|
|
1682
1682
|
const ea = /* @__PURE__ */ Zo(Jo), he = {
|
|
1683
|
-
"purpur-heading": "_purpur-
|
|
1684
|
-
"purpur-heading--hyphens": "_purpur-heading--
|
|
1685
|
-
"purpur-heading--negative": "_purpur-heading--
|
|
1686
|
-
"purpur-heading--subsection-100": "_purpur-heading--subsection-
|
|
1687
|
-
"purpur-heading--title-100": "_purpur-heading--title-
|
|
1688
|
-
"purpur-heading--title-200": "_purpur-heading--title-
|
|
1689
|
-
"purpur-heading--title-300": "_purpur-heading--title-
|
|
1690
|
-
"purpur-heading--title-400": "_purpur-heading--title-
|
|
1691
|
-
"purpur-heading--title-500": "_purpur-heading--title-
|
|
1692
|
-
"purpur-heading--title-600": "_purpur-heading--title-
|
|
1693
|
-
"purpur-heading--title-700": "_purpur-heading--title-
|
|
1694
|
-
"purpur-heading--display-
|
|
1695
|
-
"purpur-heading--display-
|
|
1696
|
-
"purpur-heading--display-
|
|
1697
|
-
"purpur-heading--display-
|
|
1698
|
-
|
|
1683
|
+
"purpur-heading": "_purpur-heading_vo751_1",
|
|
1684
|
+
"purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
|
|
1685
|
+
"purpur-heading--negative": "_purpur-heading--negative_vo751_11",
|
|
1686
|
+
"purpur-heading--subsection-100": "_purpur-heading--subsection-100_vo751_14",
|
|
1687
|
+
"purpur-heading--title-100": "_purpur-heading--title-100_vo751_20",
|
|
1688
|
+
"purpur-heading--title-200": "_purpur-heading--title-200_vo751_26",
|
|
1689
|
+
"purpur-heading--title-300": "_purpur-heading--title-300_vo751_32",
|
|
1690
|
+
"purpur-heading--title-400": "_purpur-heading--title-400_vo751_38",
|
|
1691
|
+
"purpur-heading--title-500": "_purpur-heading--title-500_vo751_44",
|
|
1692
|
+
"purpur-heading--title-600": "_purpur-heading--title-600_vo751_50",
|
|
1693
|
+
"purpur-heading--title-700": "_purpur-heading--title-700_vo751_56",
|
|
1694
|
+
"purpur-heading--display-5": "_purpur-heading--display-5_vo751_62",
|
|
1695
|
+
"purpur-heading--display-10": "_purpur-heading--display-10_vo751_68",
|
|
1696
|
+
"purpur-heading--display-15": "_purpur-heading--display-15_vo751_74",
|
|
1697
|
+
"purpur-heading--display-20": "_purpur-heading--display-20_vo751_80",
|
|
1698
|
+
"purpur-heading--display-25": "_purpur-heading--display-25_vo751_86",
|
|
1699
|
+
"purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
|
|
1700
|
+
"purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
|
|
1701
|
+
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
1702
|
+
}, He = {
|
|
1699
1703
|
TITLE100: "title-100",
|
|
1700
1704
|
TITLE200: "title-200"
|
|
1701
|
-
}, me = "purpur-heading",
|
|
1705
|
+
}, me = "purpur-heading", Be = ({
|
|
1702
1706
|
children: e,
|
|
1703
1707
|
className: r = "",
|
|
1704
1708
|
enableHyphenation: t = !1,
|
|
1705
1709
|
negative: o = !1,
|
|
1706
1710
|
tag: a,
|
|
1707
|
-
variant: n =
|
|
1711
|
+
variant: n = He.TITLE100,
|
|
1708
1712
|
...s
|
|
1709
1713
|
}) => {
|
|
1710
1714
|
const i = a, u = ea([
|
|
@@ -1718,7 +1722,7 @@ const ea = /* @__PURE__ */ Zo(Jo), he = {
|
|
|
1718
1722
|
]);
|
|
1719
1723
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1720
1724
|
};
|
|
1721
|
-
|
|
1725
|
+
Be.displayName = "Heading";
|
|
1722
1726
|
function ra(e) {
|
|
1723
1727
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1724
1728
|
}
|
|
@@ -1825,12 +1829,12 @@ var pt = c.forwardRef((e, r) => {
|
|
|
1825
1829
|
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(ha);
|
|
1826
1830
|
if (n) {
|
|
1827
1831
|
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);
|
|
1828
|
-
return /* @__PURE__ */ f(
|
|
1832
|
+
return /* @__PURE__ */ f(je, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
1829
1833
|
}
|
|
1830
|
-
return /* @__PURE__ */ f(
|
|
1834
|
+
return /* @__PURE__ */ f(je, { ...o, ref: r, children: t });
|
|
1831
1835
|
});
|
|
1832
1836
|
pt.displayName = "Slot";
|
|
1833
|
-
var
|
|
1837
|
+
var je = c.forwardRef((e, r) => {
|
|
1834
1838
|
const { children: t, ...o } = e;
|
|
1835
1839
|
if (c.isValidElement(t)) {
|
|
1836
1840
|
const a = ga(t), n = ma(o, t.props);
|
|
@@ -1838,8 +1842,8 @@ var Be = c.forwardRef((e, r) => {
|
|
|
1838
1842
|
}
|
|
1839
1843
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
1840
1844
|
});
|
|
1841
|
-
|
|
1842
|
-
var va = ({ children: e }) => /* @__PURE__ */ f(
|
|
1845
|
+
je.displayName = "SlotClone";
|
|
1846
|
+
var va = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
|
|
1843
1847
|
function ha(e) {
|
|
1844
1848
|
return c.isValidElement(e) && e.type === va;
|
|
1845
1849
|
}
|
|
@@ -1913,7 +1917,7 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1913
1917
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1914
1918
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1915
1919
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1916
|
-
}, Z =
|
|
1920
|
+
}, Z = q.bind(Sa), U = "purpur-drawer-header", ht = j(
|
|
1917
1921
|
({
|
|
1918
1922
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1919
1923
|
backButton: r,
|
|
@@ -1959,15 +1963,15 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1959
1963
|
!o && t
|
|
1960
1964
|
]
|
|
1961
1965
|
}
|
|
1962
|
-
) : s ? /* @__PURE__ */ D(
|
|
1966
|
+
) : s ? /* @__PURE__ */ D(B, { children: [
|
|
1963
1967
|
s,
|
|
1964
1968
|
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
1965
1969
|
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1966
|
-
|
|
1970
|
+
Be,
|
|
1967
1971
|
{
|
|
1968
1972
|
"data-testid": `${e}-title`,
|
|
1969
1973
|
tag: "h2",
|
|
1970
|
-
variant:
|
|
1974
|
+
variant: He.TITLE200,
|
|
1971
1975
|
tabIndex: -1,
|
|
1972
1976
|
children: u
|
|
1973
1977
|
}
|
|
@@ -1986,16 +1990,16 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChil
|
|
|
1986
1990
|
]
|
|
1987
1991
|
}
|
|
1988
1992
|
),
|
|
1989
|
-
r && t && i && (s ? /* @__PURE__ */ D(
|
|
1993
|
+
r && t && i && (s ? /* @__PURE__ */ D(B, { children: [
|
|
1990
1994
|
s,
|
|
1991
1995
|
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
1992
1996
|
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1993
|
-
|
|
1997
|
+
Be,
|
|
1994
1998
|
{
|
|
1995
1999
|
"data-testid": `${e}-title-with-back-button`,
|
|
1996
2000
|
tag: "h2",
|
|
1997
2001
|
tabIndex: -1,
|
|
1998
|
-
variant:
|
|
2002
|
+
variant: He.TITLE200,
|
|
1999
2003
|
children: u
|
|
2000
2004
|
}
|
|
2001
2005
|
) }))
|
|
@@ -2022,7 +2026,7 @@ var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
|
|
|
2022
2026
|
dir: a,
|
|
2023
2027
|
scrollHideDelay: n = 600,
|
|
2024
2028
|
...s
|
|
2025
|
-
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, v] = c.useState(null), [m, w] = c.useState(null), [h, g] = c.useState(null), [_, E] = c.useState(0), [b, y] = c.useState(0), [C, N] = c.useState(!1), [S, R] = c.useState(!1), P = L(r, (
|
|
2029
|
+
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, v] = c.useState(null), [m, w] = c.useState(null), [h, g] = c.useState(null), [_, E] = c.useState(0), [b, y] = c.useState(0), [C, N] = c.useState(!1), [S, R] = c.useState(!1), P = L(r, (k) => u(k)), A = Ca(a);
|
|
2026
2030
|
return /* @__PURE__ */ f(
|
|
2027
2031
|
Aa,
|
|
2028
2032
|
{
|
|
@@ -2068,7 +2072,7 @@ gt.displayName = Ze;
|
|
|
2068
2072
|
var _t = "ScrollAreaViewport", wt = c.forwardRef(
|
|
2069
2073
|
(e, r) => {
|
|
2070
2074
|
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(_t, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
|
|
2071
|
-
return /* @__PURE__ */ D(
|
|
2075
|
+
return /* @__PURE__ */ D(B, { children: [
|
|
2072
2076
|
/* @__PURE__ */ f(
|
|
2073
2077
|
"style",
|
|
2074
2078
|
{
|
|
@@ -2107,17 +2111,17 @@ var _t = "ScrollAreaViewport", wt = c.forwardRef(
|
|
|
2107
2111
|
}
|
|
2108
2112
|
);
|
|
2109
2113
|
wt.displayName = _t;
|
|
2110
|
-
var
|
|
2114
|
+
var W = "ScrollAreaScrollbar", bt = c.forwardRef(
|
|
2111
2115
|
(e, r) => {
|
|
2112
|
-
const { forceMount: t, ...o } = e, a = $(
|
|
2116
|
+
const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2113
2117
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2114
2118
|
i ? n(!1) : s(!1);
|
|
2115
2119
|
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(Ra, { ...o, ref: r, forceMount: t }) : a.type === "scroll" ? /* @__PURE__ */ f(xa, { ...o, ref: r, forceMount: t }) : a.type === "auto" ? /* @__PURE__ */ f(yt, { ...o, ref: r, forceMount: t }) : a.type === "always" ? /* @__PURE__ */ f(Qe, { ...o, ref: r }) : null;
|
|
2116
2120
|
}
|
|
2117
2121
|
);
|
|
2118
|
-
bt.displayName =
|
|
2122
|
+
bt.displayName = W;
|
|
2119
2123
|
var Ra = c.forwardRef((e, r) => {
|
|
2120
|
-
const { forceMount: t, ...o } = e, a = $(
|
|
2124
|
+
const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2121
2125
|
return c.useEffect(() => {
|
|
2122
2126
|
const i = a.scrollArea;
|
|
2123
2127
|
let u = 0;
|
|
@@ -2131,7 +2135,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2131
2135
|
window.clearTimeout(u), i.removeEventListener("pointerenter", l), i.removeEventListener("pointerleave", d);
|
|
2132
2136
|
};
|
|
2133
2137
|
}
|
|
2134
|
-
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(
|
|
2138
|
+
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(z, { present: t || n, children: /* @__PURE__ */ f(
|
|
2135
2139
|
yt,
|
|
2136
2140
|
{
|
|
2137
2141
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2140,7 +2144,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2140
2144
|
}
|
|
2141
2145
|
) });
|
|
2142
2146
|
}), xa = c.forwardRef((e, r) => {
|
|
2143
|
-
const { forceMount: t, ...o } = e, a = $(
|
|
2147
|
+
const { forceMount: t, ...o } = e, a = $(W, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Ce(() => u("SCROLL_END"), 100), [i, u] = Na("hidden", {
|
|
2144
2148
|
hidden: {
|
|
2145
2149
|
SCROLL: "scrolling"
|
|
2146
2150
|
},
|
|
@@ -2173,7 +2177,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2173
2177
|
};
|
|
2174
2178
|
return l.addEventListener("scroll", v), () => l.removeEventListener("scroll", v);
|
|
2175
2179
|
}
|
|
2176
|
-
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(
|
|
2180
|
+
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(z, { present: t || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2177
2181
|
Qe,
|
|
2178
2182
|
{
|
|
2179
2183
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
@@ -2184,13 +2188,13 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2184
2188
|
}
|
|
2185
2189
|
) });
|
|
2186
2190
|
}), yt = c.forwardRef((e, r) => {
|
|
2187
|
-
const t = $(
|
|
2191
|
+
const t = $(W, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, s] = c.useState(!1), i = e.orientation === "horizontal", u = Ce(() => {
|
|
2188
2192
|
if (t.viewport) {
|
|
2189
2193
|
const l = t.viewport.offsetWidth < t.viewport.scrollWidth, d = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
2190
2194
|
s(i ? l : d);
|
|
2191
2195
|
}
|
|
2192
2196
|
}, 10);
|
|
2193
|
-
return te(t.viewport, u), te(t.content, u), /* @__PURE__ */ f(
|
|
2197
|
+
return te(t.viewport, u), te(t.content, u), /* @__PURE__ */ f(z, { present: o || n, children: /* @__PURE__ */ f(
|
|
2194
2198
|
Qe,
|
|
2195
2199
|
{
|
|
2196
2200
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2199,7 +2203,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2199
2203
|
}
|
|
2200
2204
|
) });
|
|
2201
2205
|
}), Qe = c.forwardRef((e, r) => {
|
|
2202
|
-
const { orientation: t = "vertical", ...o } = e, a = $(
|
|
2206
|
+
const { orientation: t = "vertical", ...o } = e, a = $(W, e.__scopeScrollArea), n = c.useRef(null), s = c.useRef(0), [i, u] = c.useState({
|
|
2203
2207
|
content: 0,
|
|
2204
2208
|
viewport: 0,
|
|
2205
2209
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -2253,7 +2257,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2253
2257
|
}
|
|
2254
2258
|
) : null;
|
|
2255
2259
|
}), Da = c.forwardRef((e, r) => {
|
|
2256
|
-
const { sizes: t, onSizesChange: o, ...a } = e, n = $(
|
|
2260
|
+
const { sizes: t, onSizesChange: o, ...a } = e, n = $(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarXChange);
|
|
2257
2261
|
return c.useEffect(() => {
|
|
2258
2262
|
u.current && i(getComputedStyle(u.current));
|
|
2259
2263
|
}, [u]), /* @__PURE__ */ f(
|
|
@@ -2292,7 +2296,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2292
2296
|
}
|
|
2293
2297
|
);
|
|
2294
2298
|
}), Ta = c.forwardRef((e, r) => {
|
|
2295
|
-
const { sizes: t, onSizesChange: o, ...a } = e, n = $(
|
|
2299
|
+
const { sizes: t, onSizesChange: o, ...a } = e, n = $(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarYChange);
|
|
2296
2300
|
return c.useEffect(() => {
|
|
2297
2301
|
u.current && i(getComputedStyle(u.current));
|
|
2298
2302
|
}, [u]), /* @__PURE__ */ f(
|
|
@@ -2331,7 +2335,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2331
2335
|
}
|
|
2332
2336
|
}
|
|
2333
2337
|
);
|
|
2334
|
-
}), [Oa, St] = mt(
|
|
2338
|
+
}), [Oa, St] = mt(W), Et = c.forwardRef((e, r) => {
|
|
2335
2339
|
const {
|
|
2336
2340
|
__scopeScrollArea: t,
|
|
2337
2341
|
sizes: o,
|
|
@@ -2344,17 +2348,17 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2344
2348
|
onWheelScroll: d,
|
|
2345
2349
|
onResize: p,
|
|
2346
2350
|
...v
|
|
2347
|
-
} = e, m = $(
|
|
2351
|
+
} = e, m = $(W, t), [w, h] = c.useState(null), g = L(r, (P) => h(P)), _ = c.useRef(null), E = c.useRef(""), b = m.viewport, y = o.content - o.viewport, C = T(d), N = T(u), S = Ce(p, 10);
|
|
2348
2352
|
function R(P) {
|
|
2349
2353
|
if (_.current) {
|
|
2350
|
-
const A = P.clientX - _.current.left,
|
|
2351
|
-
l({ x: A, y:
|
|
2354
|
+
const A = P.clientX - _.current.left, k = P.clientY - _.current.top;
|
|
2355
|
+
l({ x: A, y: k });
|
|
2352
2356
|
}
|
|
2353
2357
|
}
|
|
2354
2358
|
return c.useEffect(() => {
|
|
2355
2359
|
const P = (A) => {
|
|
2356
|
-
const
|
|
2357
|
-
(w == null ? void 0 : w.contains(
|
|
2360
|
+
const k = A.target;
|
|
2361
|
+
(w == null ? void 0 : w.contains(k)) && C(A, y);
|
|
2358
2362
|
};
|
|
2359
2363
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2360
2364
|
}, [b, w, y, C]), c.useEffect(N, [o, N]), te(w, S), te(m.content, S), /* @__PURE__ */ f(
|
|
@@ -2388,7 +2392,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2388
2392
|
}), be = "ScrollAreaThumb", Ct = c.forwardRef(
|
|
2389
2393
|
(e, r) => {
|
|
2390
2394
|
const { forceMount: t, ...o } = e, a = St(be, e.__scopeScrollArea);
|
|
2391
|
-
return /* @__PURE__ */ f(
|
|
2395
|
+
return /* @__PURE__ */ f(z, { present: t || a.hasThumb, children: /* @__PURE__ */ f(La, { ref: r, ...o }) });
|
|
2392
2396
|
}
|
|
2393
2397
|
), La = c.forwardRef(
|
|
2394
2398
|
(e, r) => {
|
|
@@ -2403,7 +2407,7 @@ var Ra = c.forwardRef((e, r) => {
|
|
|
2403
2407
|
if (p) {
|
|
2404
2408
|
const v = () => {
|
|
2405
2409
|
if (d(), !l.current) {
|
|
2406
|
-
const m =
|
|
2410
|
+
const m = Wa(p, i);
|
|
2407
2411
|
l.current = m, i();
|
|
2408
2412
|
}
|
|
2409
2413
|
};
|
|
@@ -2493,7 +2497,7 @@ function Nt(e, r) {
|
|
|
2493
2497
|
function At(e, r) {
|
|
2494
2498
|
return e > 0 && e < r;
|
|
2495
2499
|
}
|
|
2496
|
-
var
|
|
2500
|
+
var Wa = (e, r = () => {
|
|
2497
2501
|
}) => {
|
|
2498
2502
|
let t = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
|
|
2499
2503
|
return function a() {
|
|
@@ -2521,14 +2525,14 @@ function te(e, r) {
|
|
|
2521
2525
|
}
|
|
2522
2526
|
}, [e, t]);
|
|
2523
2527
|
}
|
|
2524
|
-
var
|
|
2525
|
-
const
|
|
2528
|
+
var Fa = gt, ka = wt, Ua = bt, Ha = Ct;
|
|
2529
|
+
const Ba = {
|
|
2526
2530
|
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1r0fa_1",
|
|
2527
2531
|
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1r0fa_4",
|
|
2528
2532
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1r0fa_10",
|
|
2529
2533
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1r0fa_13",
|
|
2530
2534
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1r0fa_24"
|
|
2531
|
-
}, ae =
|
|
2535
|
+
}, ae = q.bind(Ba), Q = "purpur-drawer-scroll-area", ze = j(
|
|
2532
2536
|
({
|
|
2533
2537
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2534
2538
|
children: r,
|
|
@@ -2538,19 +2542,19 @@ const Ha = {
|
|
|
2538
2542
|
}, n) => {
|
|
2539
2543
|
const s = ae([t, Q]);
|
|
2540
2544
|
return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ D(
|
|
2541
|
-
|
|
2545
|
+
Fa,
|
|
2542
2546
|
{
|
|
2543
2547
|
className: ae(`${Q}__root`, {
|
|
2544
2548
|
[`${Q}__root--fit-to-content`]: o
|
|
2545
2549
|
}),
|
|
2546
2550
|
children: [
|
|
2547
|
-
/* @__PURE__ */ f(
|
|
2551
|
+
/* @__PURE__ */ f(ka, { className: ae(`${Q}__viewport`), children: r }),
|
|
2548
2552
|
/* @__PURE__ */ f(
|
|
2549
2553
|
Ua,
|
|
2550
2554
|
{
|
|
2551
2555
|
className: ae(`${Q}__scrollbar`),
|
|
2552
2556
|
orientation: "vertical",
|
|
2553
|
-
children: /* @__PURE__ */ f(
|
|
2557
|
+
children: /* @__PURE__ */ f(Ha, { className: ae(`${Q}__thumb`) })
|
|
2554
2558
|
}
|
|
2555
2559
|
)
|
|
2556
2560
|
]
|
|
@@ -2558,8 +2562,8 @@ const Ha = {
|
|
|
2558
2562
|
) });
|
|
2559
2563
|
}
|
|
2560
2564
|
);
|
|
2561
|
-
|
|
2562
|
-
const J =
|
|
2565
|
+
ze.displayName = "DrawerScrollArea";
|
|
2566
|
+
const J = q.bind(Do), F = "purpur-drawer-frame", Rt = j(
|
|
2563
2567
|
({
|
|
2564
2568
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2565
2569
|
backButton: r,
|
|
@@ -2583,10 +2587,10 @@ const J = Y.bind(Do), W = "purpur-drawer-frame", Rt = B(
|
|
|
2583
2587
|
}, b) => {
|
|
2584
2588
|
const y = J([
|
|
2585
2589
|
n,
|
|
2586
|
-
|
|
2590
|
+
F,
|
|
2587
2591
|
{
|
|
2588
|
-
[`${
|
|
2589
|
-
[`${
|
|
2592
|
+
[`${F}--fit-to-content`]: i,
|
|
2593
|
+
[`${F}--sticky-footer`]: _
|
|
2590
2594
|
}
|
|
2591
2595
|
]);
|
|
2592
2596
|
return /* @__PURE__ */ D(
|
|
@@ -2610,7 +2614,7 @@ const J = Y.bind(Do), W = "purpur-drawer-frame", Rt = B(
|
|
|
2610
2614
|
/* @__PURE__ */ f(
|
|
2611
2615
|
ee,
|
|
2612
2616
|
{
|
|
2613
|
-
className: J(`${
|
|
2617
|
+
className: J(`${F}__header`),
|
|
2614
2618
|
variant: "header",
|
|
2615
2619
|
stickyFooter: _,
|
|
2616
2620
|
children: /* @__PURE__ */ f(
|
|
@@ -2627,11 +2631,11 @@ const J = Y.bind(Do), W = "purpur-drawer-frame", Rt = B(
|
|
|
2627
2631
|
)
|
|
2628
2632
|
}
|
|
2629
2633
|
),
|
|
2630
|
-
_ ? /* @__PURE__ */ D(
|
|
2634
|
+
_ ? /* @__PURE__ */ D(B, { children: [
|
|
2631
2635
|
/* @__PURE__ */ f(
|
|
2632
|
-
|
|
2636
|
+
ze,
|
|
2633
2637
|
{
|
|
2634
|
-
className: J(`${
|
|
2638
|
+
className: J(`${F}__body`),
|
|
2635
2639
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
2636
2640
|
fitToContent: i,
|
|
2637
2641
|
children: /* @__PURE__ */ f(ee, { stickyFooter: !0, children: a })
|
|
@@ -2640,7 +2644,7 @@ const J = Y.bind(Do), W = "purpur-drawer-frame", Rt = B(
|
|
|
2640
2644
|
u && /* @__PURE__ */ f(
|
|
2641
2645
|
ee,
|
|
2642
2646
|
{
|
|
2643
|
-
className: J(`${
|
|
2647
|
+
className: J(`${F}__footer`),
|
|
2644
2648
|
"data-testid": `${e}-sticky-footer`,
|
|
2645
2649
|
variant: "footer",
|
|
2646
2650
|
stickyFooter: _,
|
|
@@ -2648,17 +2652,17 @@ const J = Y.bind(Do), W = "purpur-drawer-frame", Rt = B(
|
|
|
2648
2652
|
}
|
|
2649
2653
|
)
|
|
2650
2654
|
] }) : /* @__PURE__ */ f(
|
|
2651
|
-
|
|
2655
|
+
ze,
|
|
2652
2656
|
{
|
|
2653
|
-
className: J(`${
|
|
2657
|
+
className: J(`${F}__body`),
|
|
2654
2658
|
"data-testid": `${e}-scroll-area`,
|
|
2655
2659
|
fitToContent: i,
|
|
2656
2660
|
children: /* @__PURE__ */ D(
|
|
2657
2661
|
"div",
|
|
2658
2662
|
{
|
|
2659
2663
|
className: J([
|
|
2660
|
-
`${
|
|
2661
|
-
{ [`${
|
|
2664
|
+
`${F}__content-container`,
|
|
2665
|
+
{ [`${F}__content-container--no-footer`]: !u }
|
|
2662
2666
|
]),
|
|
2663
2667
|
children: [
|
|
2664
2668
|
/* @__PURE__ */ f(ee, { stickyFooter: _, children: a }),
|
|
@@ -2682,7 +2686,7 @@ const J = Y.bind(Do), W = "purpur-drawer-frame", Rt = B(
|
|
|
2682
2686
|
}
|
|
2683
2687
|
);
|
|
2684
2688
|
Rt.displayName = "DrawerFrame";
|
|
2685
|
-
const
|
|
2689
|
+
const ja = (e, r) => ({
|
|
2686
2690
|
onAnimationEnd: (i) => {
|
|
2687
2691
|
i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
2688
2692
|
},
|
|
@@ -2704,7 +2708,7 @@ const Ba = (e, r) => ({
|
|
|
2704
2708
|
const { y: u } = i.delta;
|
|
2705
2709
|
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`);
|
|
2706
2710
|
}
|
|
2707
|
-
}), ie =
|
|
2711
|
+
}), ie = q.bind(Ao), se = "purpur-drawer-content", xt = j(
|
|
2708
2712
|
({
|
|
2709
2713
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2710
2714
|
backButton: r = !1,
|
|
@@ -2728,9 +2732,9 @@ const Ba = (e, r) => ({
|
|
|
2728
2732
|
s,
|
|
2729
2733
|
se,
|
|
2730
2734
|
{ [`${se}--fit-to-content`]: l }
|
|
2731
|
-
]), b = Lt(null), y = $t(lt), { onAnimationEnd: C, onSwipeStart: N, onSwipeMove: S, onSwipeCancel: R, onSwipeEnd: P } =
|
|
2735
|
+
]), b = Lt(null), y = $t(lt), { onAnimationEnd: C, onSwipeStart: N, onSwipeMove: S, onSwipeCancel: R, onSwipeEnd: P } = ja(b, y), A = (ne) => {
|
|
2732
2736
|
u && ne.preventDefault();
|
|
2733
|
-
},
|
|
2737
|
+
}, k = () => {
|
|
2734
2738
|
const ne = b.current;
|
|
2735
2739
|
if (ne) {
|
|
2736
2740
|
const rr = ne.querySelector("h2");
|
|
@@ -2749,7 +2753,7 @@ const Ba = (e, r) => ({
|
|
|
2749
2753
|
mo,
|
|
2750
2754
|
{
|
|
2751
2755
|
onPointerDownOutside: A,
|
|
2752
|
-
onOpenAutoFocus:
|
|
2756
|
+
onOpenAutoFocus: k,
|
|
2753
2757
|
className: E,
|
|
2754
2758
|
"data-testid": e,
|
|
2755
2759
|
ref: _,
|
|
@@ -2795,11 +2799,11 @@ const Ba = (e, r) => ({
|
|
|
2795
2799
|
}
|
|
2796
2800
|
);
|
|
2797
2801
|
xt.displayName = "DrawerContent";
|
|
2798
|
-
const Dt =
|
|
2802
|
+
const Dt = j(
|
|
2799
2803
|
({ ["data-testid"]: e = "purpur-drawer-trigger", children: r, ...t }, o) => /* @__PURE__ */ f(po, { asChild: !0, "data-testid": e, ref: o, ...t, children: r })
|
|
2800
2804
|
);
|
|
2801
2805
|
Dt.displayName = "DrawerTrigger";
|
|
2802
|
-
const
|
|
2806
|
+
const za = q.bind(So), Va = "purpur-drawer", er = ({
|
|
2803
2807
|
["data-testid"]: e = "purpur-drawer",
|
|
2804
2808
|
children: r,
|
|
2805
2809
|
className: t,
|
|
@@ -2807,7 +2811,7 @@ const ja = Y.bind(So), za = "purpur-drawer", er = ({
|
|
|
2807
2811
|
open: a = !1,
|
|
2808
2812
|
...n
|
|
2809
2813
|
}) => {
|
|
2810
|
-
const [s, i] = Ie.useState(a), u =
|
|
2814
|
+
const [s, i] = Ie.useState(a), u = za([t, Va]), l = (d) => {
|
|
2811
2815
|
i(d), o == null || o(d);
|
|
2812
2816
|
};
|
|
2813
2817
|
return Mt(() => {
|