@purpurds/drawer 7.14.0 → 8.0.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 +8 -8
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +172 -172
- package/dist/drawer.es.js.map +1 -1
- package/package.json +8 -8
package/dist/drawer.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 Ot, createContext as Lt, forwardRef as
|
|
3
|
+
import Ie, { useState as Ot, createContext as Lt, forwardRef as j, useRef as $t, useContext as Mt, useEffect as It } from "react";
|
|
4
4
|
import * as kt from "react-dom";
|
|
5
5
|
import Wt from "react-dom";
|
|
6
6
|
function R(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
@@ -98,12 +98,12 @@ function Ut(...e) {
|
|
|
98
98
|
return t.scopeName = r.scopeName, t;
|
|
99
99
|
}
|
|
100
100
|
var se = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
101
|
-
},
|
|
102
|
-
}),
|
|
101
|
+
}, Ht = c.useId || (() => {
|
|
102
|
+
}), Bt = 0;
|
|
103
103
|
function Pe(e) {
|
|
104
|
-
const [r, t] = c.useState(
|
|
104
|
+
const [r, t] = c.useState(Ht());
|
|
105
105
|
return se(() => {
|
|
106
|
-
t((o) => o ?? String(
|
|
106
|
+
t((o) => o ?? String(Bt++));
|
|
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 jt({
|
|
119
119
|
prop: e,
|
|
120
120
|
defaultProp: r,
|
|
121
121
|
onChange: t = () => {
|
|
122
122
|
}
|
|
123
123
|
}) {
|
|
124
|
-
const [o, a] =
|
|
124
|
+
const [o, a] = zt({ 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 Bt({
|
|
|
133
133
|
);
|
|
134
134
|
return [s, u];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function zt({
|
|
137
137
|
defaultProp: e,
|
|
138
138
|
onChange: r
|
|
139
139
|
}) {
|
|
@@ -142,29 +142,29 @@ function jt({
|
|
|
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(Yt);
|
|
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
|
+
Ve.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 =
|
|
157
|
+
const a = qt(t), n = Xt(o, t.props);
|
|
158
158
|
return t.type !== c.Fragment && (n.ref = r ? Tr(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 Vt = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
|
|
164
|
+
function Yt(e) {
|
|
165
|
+
return c.isValidElement(e) && e.type === Vt;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Xt(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 Yt(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 Gt = [
|
|
|
198
198
|
"ul"
|
|
199
199
|
], O = Gt.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 };
|
|
@@ -352,15 +352,15 @@ var xe = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ir
|
|
|
352
352
|
let v = function(y) {
|
|
353
353
|
if (m.paused || !i) return;
|
|
354
354
|
const b = y.target;
|
|
355
|
-
i.contains(b) ? p.current = b :
|
|
355
|
+
i.contains(b) ? p.current = b : H(p.current, { select: !0 });
|
|
356
356
|
}, g = function(y) {
|
|
357
357
|
if (m.paused || !i) return;
|
|
358
358
|
const b = y.relatedTarget;
|
|
359
|
-
b !== null && (i.contains(b) ||
|
|
359
|
+
b !== null && (i.contains(b) || H(p.current, { select: !0 }));
|
|
360
360
|
}, _ = function(y) {
|
|
361
361
|
if (document.activeElement === document.body)
|
|
362
362
|
for (const C of y)
|
|
363
|
-
C.removedNodes.length > 0 &&
|
|
363
|
+
C.removedNodes.length > 0 && H(i);
|
|
364
364
|
};
|
|
365
365
|
document.addEventListener("focusin", v), document.addEventListener("focusout", g);
|
|
366
366
|
const E = new MutationObserver(_);
|
|
@@ -374,12 +374,12 @@ var xe = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ir
|
|
|
374
374
|
const v = document.activeElement;
|
|
375
375
|
if (!i.contains(v)) {
|
|
376
376
|
const _ = new CustomEvent(xe, ir);
|
|
377
|
-
i.addEventListener(xe, l), i.dispatchEvent(_), _.defaultPrevented || (sn(fn(kr(i)), { select: !0 }), document.activeElement === v &&
|
|
377
|
+
i.addEventListener(xe, l), i.dispatchEvent(_), _.defaultPrevented || (sn(fn(kr(i)), { select: !0 }), document.activeElement === v && H(i));
|
|
378
378
|
}
|
|
379
379
|
return () => {
|
|
380
380
|
i.removeEventListener(xe, l), setTimeout(() => {
|
|
381
381
|
const _ = new CustomEvent(Ae, ir);
|
|
382
|
-
i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented ||
|
|
382
|
+
i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented || H(v ?? document.body, { select: !0 }), i.removeEventListener(Ae, d), cr.remove(m);
|
|
383
383
|
}, 0);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
@@ -390,7 +390,7 @@ var xe = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ir
|
|
|
390
390
|
const g = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, _ = document.activeElement;
|
|
391
391
|
if (g && _) {
|
|
392
392
|
const E = v.currentTarget, [y, b] = cn(E);
|
|
393
|
-
y && b ? !v.shiftKey && _ === b ? (v.preventDefault(), t &&
|
|
393
|
+
y && b ? !v.shiftKey && _ === b ? (v.preventDefault(), t && H(y, { select: !0 })) : v.shiftKey && _ === y && (v.preventDefault(), t && H(b, { select: !0 })) : _ === E && v.preventDefault();
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
[t, o, m.paused]
|
|
@@ -401,7 +401,7 @@ Ir.displayName = an;
|
|
|
401
401
|
function sn(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 cn(e) {
|
|
407
407
|
const r = kr(e), t = sr(r, e), o = sr(r.reverse(), e);
|
|
@@ -433,7 +433,7 @@ function ln(e, { upTo: r }) {
|
|
|
433
433
|
function un(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 && un(e) && r && e.select();
|
|
@@ -471,11 +471,11 @@ Wr.displayName = pn;
|
|
|
471
471
|
function hn(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, mn(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] = hn(s, {
|
|
481
481
|
mounted: {
|
|
@@ -689,7 +689,7 @@ Ur.isSideCarExport = !0;
|
|
|
689
689
|
function An(e, r) {
|
|
690
690
|
return e.useMedium(r), Ur;
|
|
691
691
|
}
|
|
692
|
-
var
|
|
692
|
+
var Hr = xn(), De = function() {
|
|
693
693
|
}, Se = c.forwardRef(function(e, r) {
|
|
694
694
|
var t = c.useRef(null), o = c.useState({
|
|
695
695
|
onScrollCapture: De,
|
|
@@ -699,7 +699,7 @@ var qr = xn(), De = function() {
|
|
|
699
699
|
return c.createElement(
|
|
700
700
|
c.Fragment,
|
|
701
701
|
null,
|
|
702
|
-
d && c.createElement(b, { sideCar:
|
|
702
|
+
d && c.createElement(b, { sideCar: Hr, removeScrollBar: l, shards: p, noIsolation: m, inert: w, setCallbacks: n, allowPinchZoom: !!v, lockRef: t, gapMode: E }),
|
|
703
703
|
s ? c.cloneElement(c.Children.only(i), k(k({}, x), { ref: C })) : c.createElement(_, k({}, x, { className: u, ref: C }), i)
|
|
704
704
|
);
|
|
705
705
|
});
|
|
@@ -750,7 +750,7 @@ var On = function() {
|
|
|
750
750
|
};
|
|
751
751
|
}, [r && t]);
|
|
752
752
|
};
|
|
753
|
-
},
|
|
753
|
+
}, Br = function() {
|
|
754
754
|
var e = Ln(), r = function(t) {
|
|
755
755
|
var o = t.styles, a = t.dynamic;
|
|
756
756
|
return e(o, a), null;
|
|
@@ -776,7 +776,7 @@ var On = function() {
|
|
|
776
776
|
right: r[2],
|
|
777
777
|
gap: Math.max(0, o - t + r[2] - r[0])
|
|
778
778
|
};
|
|
779
|
-
}, kn =
|
|
779
|
+
}, kn = Br(), te = "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(wn, ` {
|
|
@@ -849,59 +849,59 @@ if (typeof window < "u")
|
|
|
849
849
|
} catch {
|
|
850
850
|
Fe = !1;
|
|
851
851
|
}
|
|
852
|
-
var G = Fe ? { passive: !1 } : !1,
|
|
852
|
+
var G = Fe ? { passive: !1 } : !1, Hn = function(e) {
|
|
853
853
|
return e.tagName === "TEXTAREA";
|
|
854
|
-
},
|
|
854
|
+
}, jr = function(e, r) {
|
|
855
855
|
if (!(e instanceof Element))
|
|
856
856
|
return !1;
|
|
857
857
|
var t = window.getComputedStyle(e);
|
|
858
858
|
return (
|
|
859
859
|
// not-not-scrollable
|
|
860
860
|
t[r] !== "hidden" && // contains scroll inside self
|
|
861
|
-
!(t.overflowY === t.overflowX && !
|
|
861
|
+
!(t.overflowY === t.overflowX && !Hn(e) && t[r] === "visible")
|
|
862
862
|
);
|
|
863
|
-
}, Hn = function(e) {
|
|
864
|
-
return Br(e, "overflowY");
|
|
865
863
|
}, Bn = function(e) {
|
|
866
|
-
return
|
|
864
|
+
return jr(e, "overflowY");
|
|
865
|
+
}, jn = function(e) {
|
|
866
|
+
return jr(e, "overflowX");
|
|
867
867
|
}, pr = 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 = zr(e, o);
|
|
872
872
|
if (a) {
|
|
873
|
-
var n =
|
|
873
|
+
var n = Vr(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
|
+
}, zn = 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
|
+
}, Vn = 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
|
-
}, jr = function(e, r) {
|
|
895
|
-
return e === "v" ? Hn(r) : Bn(r);
|
|
896
894
|
}, zr = function(e, r) {
|
|
897
|
-
return e === "v" ?
|
|
898
|
-
},
|
|
895
|
+
return e === "v" ? Bn(r) : jn(r);
|
|
896
|
+
}, Vr = function(e, r) {
|
|
897
|
+
return e === "v" ? zn(r) : Vn(r);
|
|
898
|
+
}, Yn = function(e, r) {
|
|
899
899
|
return e === "h" && r === "rtl" ? -1 : 1;
|
|
900
|
-
},
|
|
901
|
-
var n =
|
|
900
|
+
}, Xn = function(e, r, t, o, a) {
|
|
901
|
+
var n = Yn(e, window.getComputedStyle(r).direction), s = n * o, i = t.target, u = r.contains(i), l = !1, d = s > 0, p = 0, h = 0;
|
|
902
902
|
do {
|
|
903
|
-
var m =
|
|
904
|
-
(w || _) &&
|
|
903
|
+
var m = Vr(e, i), w = m[0], v = m[1], g = m[2], _ = v - g - n * w;
|
|
904
|
+
(w || _) && zr(e, i) && (p += _, h += 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 G = Fe ? { passive: !1 } : !1, qn = 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
|
}, Gn = function(e) {
|
|
920
920
|
return `
|
|
@@ -923,7 +923,7 @@ var G = Fe ? { passive: !1 } : !1, qn = function(e) {
|
|
|
923
923
|
`);
|
|
924
924
|
}, Kn = 0, K = [];
|
|
925
925
|
function Zn(e) {
|
|
926
|
-
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Kn++)[0], n = c.useState(
|
|
926
|
+
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Kn++)[0], n = c.useState(Br)[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 Zn(e) {
|
|
|
953
953
|
if (!o.current && "changedTouches" in v && (y || b) && (o.current = C), !C)
|
|
954
954
|
return !0;
|
|
955
955
|
var P = o.current || C;
|
|
956
|
-
return
|
|
956
|
+
return Xn(P, g, v, P === "h" ? y : b);
|
|
957
957
|
}, []), u = c.useCallback(function(v) {
|
|
958
958
|
var g = v;
|
|
959
959
|
if (!(!K.length || K[K.length - 1] !== n)) {
|
|
960
960
|
var _ = "deltaY" in g ? hr(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();
|
|
@@ -1009,23 +1009,23 @@ function Qn(e) {
|
|
|
1009
1009
|
e instanceof ShadowRoot && (r = e.host, e = e.host), e = e.parentNode;
|
|
1010
1010
|
return r;
|
|
1011
1011
|
}
|
|
1012
|
-
const Jn = An(
|
|
1013
|
-
var
|
|
1012
|
+
const Jn = An(Hr, Zn);
|
|
1013
|
+
var Yr = c.forwardRef(function(e, r) {
|
|
1014
1014
|
return c.createElement(Se, k({}, e, { ref: r, sideCar: Jn }));
|
|
1015
1015
|
});
|
|
1016
|
-
|
|
1016
|
+
Yr.classNames = Se.classNames;
|
|
1017
1017
|
var eo = 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
|
-
}, Z = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0,
|
|
1023
|
-
return e && (e.host ||
|
|
1022
|
+
}, Z = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, Xr = function(e) {
|
|
1023
|
+
return e && (e.host || Xr(e.parentNode));
|
|
1024
1024
|
}, ro = 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 = Xr(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 eo = function(e) {
|
|
|
1062
1062
|
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), to(o, a, t, "aria-hidden")) : function() {
|
|
1063
1063
|
return null;
|
|
1064
1064
|
};
|
|
1065
|
-
},
|
|
1065
|
+
}, Ye = "Dialog", [qr, Za] = Or(Ye), [oo, I] = qr(Ye), Gr = (e) => {
|
|
1066
1066
|
const {
|
|
1067
1067
|
__scopeDialog: r,
|
|
1068
1068
|
children: t,
|
|
@@ -1070,7 +1070,7 @@ var eo = 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] = jt({
|
|
1074
1074
|
prop: o,
|
|
1075
1075
|
defaultProp: a,
|
|
1076
1076
|
onChange: n
|
|
@@ -1092,7 +1092,7 @@ var eo = function(e) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
);
|
|
1094
1094
|
};
|
|
1095
|
-
Gr.displayName =
|
|
1095
|
+
Gr.displayName = Ye;
|
|
1096
1096
|
var Kr = "DialogTrigger", Zr = c.forwardRef(
|
|
1097
1097
|
(e, r) => {
|
|
1098
1098
|
const { __scopeDialog: t, ...o } = e, a = I(Kr, t), n = L(r, a.triggerRef);
|
|
@@ -1112,17 +1112,17 @@ var Kr = "DialogTrigger", Zr = c.forwardRef(
|
|
|
1112
1112
|
}
|
|
1113
1113
|
);
|
|
1114
1114
|
Zr.displayName = Kr;
|
|
1115
|
-
var
|
|
1115
|
+
var Xe = "DialogPortal", [ao, Qr] = qr(Xe, {
|
|
1116
1116
|
forceMount: void 0
|
|
1117
1117
|
}), Jr = (e) => {
|
|
1118
|
-
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = I(
|
|
1119
|
-
return /* @__PURE__ */ f(ao, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(
|
|
1118
|
+
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = I(Xe, r);
|
|
1119
|
+
return /* @__PURE__ */ f(ao, { 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
|
-
Jr.displayName =
|
|
1121
|
+
Jr.displayName = Xe;
|
|
1122
1122
|
var we = "DialogOverlay", et = c.forwardRef(
|
|
1123
1123
|
(e, r) => {
|
|
1124
1124
|
const t = Qr(we, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = I(we, e.__scopeDialog);
|
|
1125
|
-
return n.modal ? /* @__PURE__ */ f(
|
|
1125
|
+
return n.modal ? /* @__PURE__ */ f(z, { present: o || n.open, children: /* @__PURE__ */ f(io, { ...a, ref: r }) }) : null;
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
1128
|
et.displayName = we;
|
|
@@ -1132,7 +1132,7 @@ var io = 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(Yr, { 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 io = c.forwardRef(
|
|
|
1143
1143
|
) })
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
),
|
|
1146
|
+
), X = "DialogContent", rt = c.forwardRef(
|
|
1147
1147
|
(e, r) => {
|
|
1148
|
-
const t = Qr(
|
|
1149
|
-
return /* @__PURE__ */ f(
|
|
1148
|
+
const t = Qr(X, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = I(X, e.__scopeDialog);
|
|
1149
|
+
return /* @__PURE__ */ f(z, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(so, { ...a, ref: r }) : /* @__PURE__ */ f(co, { ...a, ref: r }) });
|
|
1150
1150
|
}
|
|
1151
1151
|
);
|
|
1152
|
-
rt.displayName =
|
|
1152
|
+
rt.displayName = X;
|
|
1153
1153
|
var so = c.forwardRef(
|
|
1154
1154
|
(e, r) => {
|
|
1155
|
-
const t = I(
|
|
1155
|
+
const t = I(X, 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 no(n);
|
|
@@ -1180,7 +1180,7 @@ var so = c.forwardRef(
|
|
|
1180
1180
|
}
|
|
1181
1181
|
), co = c.forwardRef(
|
|
1182
1182
|
(e, r) => {
|
|
1183
|
-
const t = I(
|
|
1183
|
+
const t = I(X, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
|
|
1184
1184
|
return /* @__PURE__ */ f(
|
|
1185
1185
|
tt,
|
|
1186
1186
|
{
|
|
@@ -1203,8 +1203,8 @@ var so = c.forwardRef(
|
|
|
1203
1203
|
}
|
|
1204
1204
|
), tt = c.forwardRef(
|
|
1205
1205
|
(e, r) => {
|
|
1206
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = I(
|
|
1207
|
-
return gn(), /* @__PURE__ */ D(
|
|
1206
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = I(X, t), u = c.useRef(null), l = L(r, u);
|
|
1207
|
+
return gn(), /* @__PURE__ */ D(B, { children: [
|
|
1208
1208
|
/* @__PURE__ */ f(
|
|
1209
1209
|
Ir,
|
|
1210
1210
|
{
|
|
@@ -1228,19 +1228,19 @@ var so = c.forwardRef(
|
|
|
1228
1228
|
)
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
/* @__PURE__ */ D(
|
|
1231
|
+
/* @__PURE__ */ D(B, { children: [
|
|
1232
1232
|
/* @__PURE__ */ f(lo, { titleId: i.titleId }),
|
|
1233
1233
|
/* @__PURE__ */ f(fo, { contentRef: u, descriptionId: i.descriptionId })
|
|
1234
1234
|
] })
|
|
1235
1235
|
] });
|
|
1236
1236
|
}
|
|
1237
|
-
),
|
|
1237
|
+
), qe = "DialogTitle", nt = c.forwardRef(
|
|
1238
1238
|
(e, r) => {
|
|
1239
|
-
const { __scopeDialog: t, ...o } = e, a = I(
|
|
1239
|
+
const { __scopeDialog: t, ...o } = e, a = I(qe, t);
|
|
1240
1240
|
return /* @__PURE__ */ f(O.h2, { id: a.titleId, ...o, ref: r });
|
|
1241
1241
|
}
|
|
1242
1242
|
);
|
|
1243
|
-
nt.displayName =
|
|
1243
|
+
nt.displayName = qe;
|
|
1244
1244
|
var ot = "DialogDescription", at = c.forwardRef(
|
|
1245
1245
|
(e, r) => {
|
|
1246
1246
|
const { __scopeDialog: t, ...o } = e, a = I(ot, t);
|
|
@@ -1267,8 +1267,8 @@ function Ge(e) {
|
|
|
1267
1267
|
return e ? "open" : "closed";
|
|
1268
1268
|
}
|
|
1269
1269
|
var ct = "DialogTitleWarning", [Qa, lt] = Ft(ct, {
|
|
1270
|
-
contentName:
|
|
1271
|
-
titleName:
|
|
1270
|
+
contentName: X,
|
|
1271
|
+
titleName: qe,
|
|
1272
1272
|
docsSlug: "dialog"
|
|
1273
1273
|
}), lo = ({ titleId: e }) => {
|
|
1274
1274
|
const r = lt(ct), t = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
@@ -1330,7 +1330,7 @@ function yo() {
|
|
|
1330
1330
|
}(Le)), Le.exports;
|
|
1331
1331
|
}
|
|
1332
1332
|
var So = yo();
|
|
1333
|
-
const
|
|
1333
|
+
const q = /* @__PURE__ */ bo(So), ut = Lt(null), Eo = {}, Co = "_drawerSmallScreenAnimation_khfax_1", Po = "_drawerLargeScreenAnimationRight_khfax_1", xo = "_drawerLargeScreenAnimationLeft_khfax_1", Ao = "_slideDown_khfax_1", No = "_overlayAnimation_khfax_1", Ro = {
|
|
1334
1334
|
"purpur-drawer-content": "_purpur-drawer-content_khfax_1",
|
|
1335
1335
|
drawerSmallScreenAnimation: Co,
|
|
1336
1336
|
"purpur-drawer-content--left": "_purpur-drawer-content--left_khfax_15",
|
|
@@ -1349,7 +1349,7 @@ const X = /* @__PURE__ */ bo(So), ut = Lt(null), Eo = {}, Co = "_drawerSmallScre
|
|
|
1349
1349
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1u45h_10",
|
|
1350
1350
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1u45h_18",
|
|
1351
1351
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1u45h_26"
|
|
1352
|
-
}, To =
|
|
1352
|
+
}, To = q.bind(Do), $e = "purpur-drawer-container", re = j(
|
|
1353
1353
|
({
|
|
1354
1354
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1355
1355
|
children: r,
|
|
@@ -1404,7 +1404,7 @@ const Oo = {
|
|
|
1404
1404
|
});
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
|
-
}), gr = (e, r = 0) => Math.abs(e.y) > r, Mo =
|
|
1407
|
+
}), gr = (e, r = 0) => Math.abs(e.y) > r, Mo = q.bind(Lo), Io = "purpur-drawer-handle", dt = j(
|
|
1408
1408
|
({
|
|
1409
1409
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1410
1410
|
className: r,
|
|
@@ -1483,24 +1483,24 @@ function Fo() {
|
|
|
1483
1483
|
}(_r)), _r.exports;
|
|
1484
1484
|
}
|
|
1485
1485
|
var Uo = Fo();
|
|
1486
|
-
const
|
|
1486
|
+
const Ho = /* @__PURE__ */ Wo(Uo), Bo = "_rotate_12t9p_1", jo = "_dash_12t9p_1", zo = {
|
|
1487
1487
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1488
|
-
rotate:
|
|
1488
|
+
rotate: Bo,
|
|
1489
1489
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1490
1490
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1491
1491
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1492
1492
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1493
1493
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1494
1494
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1495
|
-
dash:
|
|
1495
|
+
dash: jo,
|
|
1496
1496
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1497
1497
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1498
|
-
}, br =
|
|
1498
|
+
}, br = Ho.bind(zo), oe = "purpur-spinner", Vo = {
|
|
1499
1499
|
SM: "sm"
|
|
1500
|
-
},
|
|
1500
|
+
}, Yo = ({
|
|
1501
1501
|
disabled: e = !1,
|
|
1502
1502
|
negative: r = !1,
|
|
1503
|
-
size: t =
|
|
1503
|
+
size: t = Vo.SM,
|
|
1504
1504
|
...o
|
|
1505
1505
|
}) => /* @__PURE__ */ f("div", { className: br(oe, `${oe}--${t}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1506
1506
|
"circle",
|
|
@@ -1514,7 +1514,7 @@ const qo = /* @__PURE__ */ Wo(Uo), Ho = "_rotate_12t9p_1", Bo = "_dash_12t9p_1",
|
|
|
1514
1514
|
r: "20"
|
|
1515
1515
|
}
|
|
1516
1516
|
) }) });
|
|
1517
|
-
function
|
|
1517
|
+
function Xo(e) {
|
|
1518
1518
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1519
1519
|
}
|
|
1520
1520
|
var yr = { exports: {} };
|
|
@@ -1524,7 +1524,7 @@ var yr = { exports: {} };
|
|
|
1524
1524
|
http://jedwatson.github.io/classnames
|
|
1525
1525
|
*/
|
|
1526
1526
|
var Sr;
|
|
1527
|
-
function
|
|
1527
|
+
function qo() {
|
|
1528
1528
|
return Sr || (Sr = 1, function(e) {
|
|
1529
1529
|
(function() {
|
|
1530
1530
|
var r = {}.hasOwnProperty;
|
|
@@ -1556,33 +1556,33 @@ function Xo() {
|
|
|
1556
1556
|
})();
|
|
1557
1557
|
}(yr)), yr.exports;
|
|
1558
1558
|
}
|
|
1559
|
-
var Go =
|
|
1560
|
-
const Ko = /* @__PURE__ */
|
|
1561
|
-
"purpur-button": "_purpur-
|
|
1562
|
-
"purpur-button--xs": "_purpur-button--
|
|
1563
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
1564
|
-
"purpur-button--sm": "_purpur-button--
|
|
1565
|
-
"purpur-button--md": "_purpur-button--
|
|
1566
|
-
"purpur-button--lg": "_purpur-button--
|
|
1567
|
-
"purpur-button--full-width": "_purpur-button--full-
|
|
1568
|
-
"purpur-button--primary": "_purpur-button--
|
|
1569
|
-
"purpur-button--disabled": "_purpur-button--
|
|
1570
|
-
"purpur-button--primary-negative": "_purpur-button--primary-
|
|
1571
|
-
"purpur-button--secondary": "_purpur-button--
|
|
1572
|
-
"purpur-button--secondary-negative": "_purpur-button--secondary-
|
|
1573
|
-
"purpur-button--expressive": "_purpur-button--
|
|
1574
|
-
"purpur-button--expressive-negative": "_purpur-button--expressive-
|
|
1575
|
-
"purpur-button--negative": "_purpur-button--
|
|
1576
|
-
"purpur-button--destructive": "_purpur-button--
|
|
1577
|
-
"purpur-button--destructive-negative": "_purpur-button--destructive-
|
|
1578
|
-
"purpur-button--tertiary-purple": "_purpur-button--tertiary-
|
|
1579
|
-
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-
|
|
1580
|
-
"purpur-button--text-negative": "_purpur-button--text-
|
|
1581
|
-
"purpur-button--text": "_purpur-button--
|
|
1559
|
+
var Go = qo();
|
|
1560
|
+
const Ko = /* @__PURE__ */ Xo(Go), Zo = {
|
|
1561
|
+
"purpur-button": "_purpur-button_1goi7_1",
|
|
1562
|
+
"purpur-button--xs": "_purpur-button--xs_1goi7_33",
|
|
1563
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_1goi7_36",
|
|
1564
|
+
"purpur-button--sm": "_purpur-button--sm_1goi7_39",
|
|
1565
|
+
"purpur-button--md": "_purpur-button--md_1goi7_45",
|
|
1566
|
+
"purpur-button--lg": "_purpur-button--lg_1goi7_51",
|
|
1567
|
+
"purpur-button--full-width": "_purpur-button--full-width_1goi7_57",
|
|
1568
|
+
"purpur-button--primary": "_purpur-button--primary_1goi7_60",
|
|
1569
|
+
"purpur-button--disabled": "_purpur-button--disabled_1goi7_64",
|
|
1570
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_1goi7_70",
|
|
1571
|
+
"purpur-button--secondary": "_purpur-button--secondary_1goi7_82",
|
|
1572
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_1goi7_93",
|
|
1573
|
+
"purpur-button--expressive": "_purpur-button--expressive_1goi7_104",
|
|
1574
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_1goi7_114",
|
|
1575
|
+
"purpur-button--negative": "_purpur-button--negative_1goi7_126",
|
|
1576
|
+
"purpur-button--destructive": "_purpur-button--destructive_1goi7_133",
|
|
1577
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_1goi7_143",
|
|
1578
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_1goi7_153",
|
|
1579
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1goi7_166",
|
|
1580
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_1goi7_181",
|
|
1581
|
+
"purpur-button--text": "_purpur-button--text_1goi7_181"
|
|
1582
1582
|
}, Me = {
|
|
1583
1583
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1584
1584
|
TEXT: "text"
|
|
1585
|
-
}, Qo = Ko.bind(Zo),
|
|
1585
|
+
}, Qo = Ko.bind(Zo), V = "purpur-button", Ue = j(
|
|
1586
1586
|
({
|
|
1587
1587
|
children: e,
|
|
1588
1588
|
className: r,
|
|
@@ -1601,15 +1601,15 @@ const Ko = /* @__PURE__ */ Yo(Go), Zo = {
|
|
|
1601
1601
|
return null;
|
|
1602
1602
|
const m = Qo(
|
|
1603
1603
|
[
|
|
1604
|
-
|
|
1605
|
-
`${
|
|
1606
|
-
`${
|
|
1604
|
+
V,
|
|
1605
|
+
`${V}--${s ? `${l}-negative` : l}`,
|
|
1606
|
+
`${V}--${u}`
|
|
1607
1607
|
],
|
|
1608
1608
|
{
|
|
1609
|
-
[`${
|
|
1610
|
-
[`${
|
|
1611
|
-
[`${
|
|
1612
|
-
[`${
|
|
1609
|
+
[`${V}--icon-only`]: a,
|
|
1610
|
+
[`${V}--negative`]: s,
|
|
1611
|
+
[`${V}--full-width`]: o,
|
|
1612
|
+
[`${V}--disabled`]: t || n
|
|
1613
1613
|
},
|
|
1614
1614
|
r
|
|
1615
1615
|
), w = (g) => {
|
|
@@ -1626,7 +1626,7 @@ const Ko = /* @__PURE__ */ Yo(Go), Zo = {
|
|
|
1626
1626
|
...p,
|
|
1627
1627
|
children: [
|
|
1628
1628
|
n && /* @__PURE__ */ f(
|
|
1629
|
-
|
|
1629
|
+
Yo,
|
|
1630
1630
|
{
|
|
1631
1631
|
size: u === ko.LG ? "xs" : "xxs",
|
|
1632
1632
|
negative: s,
|
|
@@ -1704,16 +1704,16 @@ const ta = /* @__PURE__ */ Jo(ra), ve = {
|
|
|
1704
1704
|
"purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
|
|
1705
1705
|
"purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
|
|
1706
1706
|
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
1707
|
-
},
|
|
1707
|
+
}, He = {
|
|
1708
1708
|
TITLE100: "title-100",
|
|
1709
1709
|
TITLE200: "title-200"
|
|
1710
|
-
}, me = "purpur-heading",
|
|
1710
|
+
}, me = "purpur-heading", Be = ({
|
|
1711
1711
|
children: e,
|
|
1712
1712
|
className: r = "",
|
|
1713
1713
|
enableHyphenation: t = !1,
|
|
1714
1714
|
negative: o = !1,
|
|
1715
1715
|
tag: a,
|
|
1716
|
-
variant: n =
|
|
1716
|
+
variant: n = He.TITLE100,
|
|
1717
1717
|
...s
|
|
1718
1718
|
}) => {
|
|
1719
1719
|
const i = a, u = ta([
|
|
@@ -1727,7 +1727,7 @@ const ta = /* @__PURE__ */ Jo(ra), ve = {
|
|
|
1727
1727
|
]);
|
|
1728
1728
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1729
1729
|
};
|
|
1730
|
-
|
|
1730
|
+
Be.displayName = "Heading";
|
|
1731
1731
|
function na(e) {
|
|
1732
1732
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1733
1733
|
}
|
|
@@ -1834,12 +1834,12 @@ var ht = c.forwardRef((e, r) => {
|
|
|
1834
1834
|
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(ga);
|
|
1835
1835
|
if (n) {
|
|
1836
1836
|
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);
|
|
1837
|
-
return /* @__PURE__ */ f(
|
|
1837
|
+
return /* @__PURE__ */ f(je, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
1838
1838
|
}
|
|
1839
|
-
return /* @__PURE__ */ f(
|
|
1839
|
+
return /* @__PURE__ */ f(je, { ...o, ref: r, children: t });
|
|
1840
1840
|
});
|
|
1841
1841
|
ht.displayName = "Slot";
|
|
1842
|
-
var
|
|
1842
|
+
var je = c.forwardRef((e, r) => {
|
|
1843
1843
|
const { children: t, ...o } = e;
|
|
1844
1844
|
if (c.isValidElement(t)) {
|
|
1845
1845
|
const a = wa(t), n = _a(o, t.props);
|
|
@@ -1847,8 +1847,8 @@ var Be = c.forwardRef((e, r) => {
|
|
|
1847
1847
|
}
|
|
1848
1848
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
1849
1849
|
});
|
|
1850
|
-
|
|
1851
|
-
var ma = ({ children: e }) => /* @__PURE__ */ f(
|
|
1850
|
+
je.displayName = "SlotClone";
|
|
1851
|
+
var ma = ({ children: e }) => /* @__PURE__ */ f(B, { children: e });
|
|
1852
1852
|
function ga(e) {
|
|
1853
1853
|
return c.isValidElement(e) && e.type === ma;
|
|
1854
1854
|
}
|
|
@@ -1922,7 +1922,7 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(Ea, { asChil
|
|
|
1922
1922
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1923
1923
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1924
1924
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1925
|
-
}, Q =
|
|
1925
|
+
}, Q = q.bind(Ca), U = "purpur-drawer-header", mt = j(
|
|
1926
1926
|
({
|
|
1927
1927
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1928
1928
|
backButton: r,
|
|
@@ -1968,15 +1968,15 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(Ea, { asChil
|
|
|
1968
1968
|
!o && t
|
|
1969
1969
|
]
|
|
1970
1970
|
}
|
|
1971
|
-
) : s ? /* @__PURE__ */ D(
|
|
1971
|
+
) : s ? /* @__PURE__ */ D(B, { children: [
|
|
1972
1972
|
s,
|
|
1973
1973
|
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
|
|
1974
1974
|
] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1975
|
-
|
|
1975
|
+
Be,
|
|
1976
1976
|
{
|
|
1977
1977
|
"data-testid": `${e}-title`,
|
|
1978
1978
|
tag: "h2",
|
|
1979
|
-
variant:
|
|
1979
|
+
variant: He.TITLE200,
|
|
1980
1980
|
tabIndex: -1,
|
|
1981
1981
|
children: u
|
|
1982
1982
|
}
|
|
@@ -1995,16 +1995,16 @@ const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(Ea, { asChil
|
|
|
1995
1995
|
]
|
|
1996
1996
|
}
|
|
1997
1997
|
),
|
|
1998
|
-
r && t && i && (s ? /* @__PURE__ */ D(
|
|
1998
|
+
r && t && i && (s ? /* @__PURE__ */ D(B, { children: [
|
|
1999
1999
|
s,
|
|
2000
2000
|
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(he, { children: u }) })
|
|
2001
2001
|
] }) : /* @__PURE__ */ f(he, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2002
|
-
|
|
2002
|
+
Be,
|
|
2003
2003
|
{
|
|
2004
2004
|
"data-testid": `${e}-title-with-back-button`,
|
|
2005
2005
|
tag: "h2",
|
|
2006
2006
|
tabIndex: -1,
|
|
2007
|
-
variant:
|
|
2007
|
+
variant: He.TITLE200,
|
|
2008
2008
|
children: u
|
|
2009
2009
|
}
|
|
2010
2010
|
) }))
|
|
@@ -2077,7 +2077,7 @@ _t.displayName = Ze;
|
|
|
2077
2077
|
var wt = "ScrollAreaViewport", bt = c.forwardRef(
|
|
2078
2078
|
(e, r) => {
|
|
2079
2079
|
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(wt, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
|
|
2080
|
-
return /* @__PURE__ */ D(
|
|
2080
|
+
return /* @__PURE__ */ D(B, { children: [
|
|
2081
2081
|
/* @__PURE__ */ f(
|
|
2082
2082
|
"style",
|
|
2083
2083
|
{
|
|
@@ -2140,7 +2140,7 @@ var Da = c.forwardRef((e, r) => {
|
|
|
2140
2140
|
window.clearTimeout(u), i.removeEventListener("pointerenter", l), i.removeEventListener("pointerleave", d);
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
|
-
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(
|
|
2143
|
+
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(z, { present: t || n, children: /* @__PURE__ */ f(
|
|
2144
2144
|
St,
|
|
2145
2145
|
{
|
|
2146
2146
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2182,7 +2182,7 @@ var Da = c.forwardRef((e, r) => {
|
|
|
2182
2182
|
};
|
|
2183
2183
|
return l.addEventListener("scroll", h), () => l.removeEventListener("scroll", h);
|
|
2184
2184
|
}
|
|
2185
|
-
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(
|
|
2185
|
+
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(z, { present: t || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2186
2186
|
Qe,
|
|
2187
2187
|
{
|
|
2188
2188
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
@@ -2199,7 +2199,7 @@ var Da = c.forwardRef((e, r) => {
|
|
|
2199
2199
|
s(i ? l : d);
|
|
2200
2200
|
}
|
|
2201
2201
|
}, 10);
|
|
2202
|
-
return ne(t.viewport, u), ne(t.content, u), /* @__PURE__ */ f(
|
|
2202
|
+
return ne(t.viewport, u), ne(t.content, u), /* @__PURE__ */ f(z, { present: o || n, children: /* @__PURE__ */ f(
|
|
2203
2203
|
Qe,
|
|
2204
2204
|
{
|
|
2205
2205
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -2397,7 +2397,7 @@ var Da = c.forwardRef((e, r) => {
|
|
|
2397
2397
|
}), be = "ScrollAreaThumb", Pt = c.forwardRef(
|
|
2398
2398
|
(e, r) => {
|
|
2399
2399
|
const { forceMount: t, ...o } = e, a = Et(be, e.__scopeScrollArea);
|
|
2400
|
-
return /* @__PURE__ */ f(
|
|
2400
|
+
return /* @__PURE__ */ f(z, { present: t || a.hasThumb, children: /* @__PURE__ */ f(Ma, { ref: r, ...o }) });
|
|
2401
2401
|
}
|
|
2402
2402
|
), Ma = c.forwardRef(
|
|
2403
2403
|
(e, r) => {
|
|
@@ -2530,14 +2530,14 @@ function ne(e, r) {
|
|
|
2530
2530
|
}
|
|
2531
2531
|
}, [e, t]);
|
|
2532
2532
|
}
|
|
2533
|
-
var Ua = _t,
|
|
2534
|
-
const
|
|
2533
|
+
var Ua = _t, Ha = bt, Ba = yt, ja = Pt;
|
|
2534
|
+
const za = {
|
|
2535
2535
|
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1r0fa_1",
|
|
2536
2536
|
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1r0fa_4",
|
|
2537
2537
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1r0fa_10",
|
|
2538
2538
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1r0fa_13",
|
|
2539
2539
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1r0fa_24"
|
|
2540
|
-
}, ae =
|
|
2540
|
+
}, ae = q.bind(za), J = "purpur-drawer-scroll-area", ze = j(
|
|
2541
2541
|
({
|
|
2542
2542
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2543
2543
|
children: r,
|
|
@@ -2553,13 +2553,13 @@ const ja = {
|
|
|
2553
2553
|
[`${J}__root--fit-to-content`]: o
|
|
2554
2554
|
}),
|
|
2555
2555
|
children: [
|
|
2556
|
-
/* @__PURE__ */ f(
|
|
2556
|
+
/* @__PURE__ */ f(Ha, { className: ae(`${J}__viewport`), children: r }),
|
|
2557
2557
|
/* @__PURE__ */ f(
|
|
2558
|
-
|
|
2558
|
+
Ba,
|
|
2559
2559
|
{
|
|
2560
2560
|
className: ae(`${J}__scrollbar`),
|
|
2561
2561
|
orientation: "vertical",
|
|
2562
|
-
children: /* @__PURE__ */ f(
|
|
2562
|
+
children: /* @__PURE__ */ f(ja, { className: ae(`${J}__thumb`) })
|
|
2563
2563
|
}
|
|
2564
2564
|
)
|
|
2565
2565
|
]
|
|
@@ -2567,8 +2567,8 @@ const ja = {
|
|
|
2567
2567
|
) });
|
|
2568
2568
|
}
|
|
2569
2569
|
);
|
|
2570
|
-
|
|
2571
|
-
const ee =
|
|
2570
|
+
ze.displayName = "DrawerScrollArea";
|
|
2571
|
+
const ee = q.bind(Oo), M = "purpur-drawer-frame", Rt = j(
|
|
2572
2572
|
({
|
|
2573
2573
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2574
2574
|
backButton: r,
|
|
@@ -2639,9 +2639,9 @@ const ee = X.bind(Oo), M = "purpur-drawer-frame", Rt = B(
|
|
|
2639
2639
|
)
|
|
2640
2640
|
}
|
|
2641
2641
|
),
|
|
2642
|
-
_ ? /* @__PURE__ */ D(
|
|
2642
|
+
_ ? /* @__PURE__ */ D(B, { children: [
|
|
2643
2643
|
/* @__PURE__ */ f(
|
|
2644
|
-
|
|
2644
|
+
ze,
|
|
2645
2645
|
{
|
|
2646
2646
|
className: ee(`${M}__body`),
|
|
2647
2647
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
@@ -2660,7 +2660,7 @@ const ee = X.bind(Oo), M = "purpur-drawer-frame", Rt = B(
|
|
|
2660
2660
|
}
|
|
2661
2661
|
)
|
|
2662
2662
|
] }) : /* @__PURE__ */ f(
|
|
2663
|
-
|
|
2663
|
+
ze,
|
|
2664
2664
|
{
|
|
2665
2665
|
className: ee(`${M}__body`),
|
|
2666
2666
|
"data-testid": `${e}-scroll-area`,
|
|
@@ -2694,7 +2694,7 @@ const ee = X.bind(Oo), M = "purpur-drawer-frame", Rt = B(
|
|
|
2694
2694
|
}
|
|
2695
2695
|
);
|
|
2696
2696
|
Rt.displayName = "DrawerFrame";
|
|
2697
|
-
const
|
|
2697
|
+
const Va = (e, r) => ({
|
|
2698
2698
|
onAnimationEnd: (i) => {
|
|
2699
2699
|
i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
2700
2700
|
},
|
|
@@ -2716,7 +2716,7 @@ const za = (e, r) => ({
|
|
|
2716
2716
|
const { y: u } = i.delta;
|
|
2717
2717
|
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`);
|
|
2718
2718
|
}
|
|
2719
|
-
}), ie =
|
|
2719
|
+
}), ie = q.bind(Ro), Y = "purpur-drawer-content", Dt = j(
|
|
2720
2720
|
({
|
|
2721
2721
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2722
2722
|
backButton: r = !1,
|
|
@@ -2739,11 +2739,11 @@ const za = (e, r) => ({
|
|
|
2739
2739
|
}, E) => {
|
|
2740
2740
|
const y = ie([
|
|
2741
2741
|
s,
|
|
2742
|
-
|
|
2743
|
-
{ [`${
|
|
2744
|
-
{ [`${
|
|
2745
|
-
{ [`${
|
|
2746
|
-
]), b = $t(null), C = Mt(ut), { onAnimationEnd: x, onSwipeStart: S, onSwipeMove: N, onSwipeCancel: P, onSwipeEnd: A } =
|
|
2742
|
+
Y,
|
|
2743
|
+
{ [`${Y}--fit-to-content`]: l },
|
|
2744
|
+
{ [`${Y}--left`]: g === "left" },
|
|
2745
|
+
{ [`${Y}--right`]: g === "right" }
|
|
2746
|
+
]), b = $t(null), C = Mt(ut), { onAnimationEnd: x, onSwipeStart: S, onSwipeMove: N, onSwipeCancel: P, onSwipeEnd: A } = Va(b, C), F = (ce) => {
|
|
2747
2747
|
u && ce.preventDefault();
|
|
2748
2748
|
}, rr = () => {
|
|
2749
2749
|
const ce = b.current;
|
|
@@ -2777,7 +2777,7 @@ const za = (e, r) => ({
|
|
|
2777
2777
|
backButtonText: t,
|
|
2778
2778
|
backButtonOnlyIcon: o,
|
|
2779
2779
|
closeButtonAriaLabel: i,
|
|
2780
|
-
className: ie(`${
|
|
2780
|
+
className: ie(`${Y}__drawer-frame`),
|
|
2781
2781
|
fitToContent: l,
|
|
2782
2782
|
footerContent: d,
|
|
2783
2783
|
headerContent: p,
|
|
@@ -2791,11 +2791,11 @@ const za = (e, r) => ({
|
|
|
2791
2791
|
stickyFooter: m,
|
|
2792
2792
|
title: w,
|
|
2793
2793
|
position: g,
|
|
2794
|
-
children: a ? /* @__PURE__ */ D("div", { className: ie(`${
|
|
2794
|
+
children: a ? /* @__PURE__ */ D("div", { className: ie(`${Y}__content-container`), children: [
|
|
2795
2795
|
/* @__PURE__ */ f(
|
|
2796
2796
|
_o,
|
|
2797
2797
|
{
|
|
2798
|
-
className: ie(`${
|
|
2798
|
+
className: ie(`${Y}__description`),
|
|
2799
2799
|
"data-testid": `${e}-description`,
|
|
2800
2800
|
children: a
|
|
2801
2801
|
}
|
|
@@ -2811,11 +2811,11 @@ const za = (e, r) => ({
|
|
|
2811
2811
|
}
|
|
2812
2812
|
);
|
|
2813
2813
|
Dt.displayName = "DrawerContent";
|
|
2814
|
-
const Tt =
|
|
2814
|
+
const Tt = j(
|
|
2815
2815
|
({ ["data-testid"]: e = "purpur-drawer-trigger", children: r, ...t }, o) => /* @__PURE__ */ f(ho, { asChild: !0, "data-testid": e, ref: o, ...t, children: r })
|
|
2816
2816
|
);
|
|
2817
2817
|
Tt.displayName = "DrawerTrigger";
|
|
2818
|
-
const
|
|
2818
|
+
const Ya = q.bind(Eo), Xa = "purpur-drawer", er = ({
|
|
2819
2819
|
["data-testid"]: e = "purpur-drawer",
|
|
2820
2820
|
children: r,
|
|
2821
2821
|
className: t,
|
|
@@ -2823,7 +2823,7 @@ const Va = X.bind(Eo), Ya = "purpur-drawer", er = ({
|
|
|
2823
2823
|
open: a = !1,
|
|
2824
2824
|
...n
|
|
2825
2825
|
}) => {
|
|
2826
|
-
const [s, i] = Ie.useState(a), u =
|
|
2826
|
+
const [s, i] = Ie.useState(a), u = Ya([t, Xa]), l = (d) => {
|
|
2827
2827
|
i(d), o == null || o(d);
|
|
2828
2828
|
};
|
|
2829
2829
|
return It(() => {
|