@purpurds/drawer 7.6.1 → 7.8.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-container.d.ts +3 -8
- package/dist/drawer-container.d.ts.map +1 -1
- package/dist/drawer-content.d.ts +35 -3
- package/dist/drawer-content.d.ts.map +1 -1
- package/dist/drawer-frame.d.ts +3 -21
- package/dist/drawer-frame.d.ts.map +1 -1
- package/dist/drawer-handle.d.ts +3 -9
- package/dist/drawer-handle.d.ts.map +1 -1
- package/dist/drawer-header.d.ts +3 -12
- package/dist/drawer-header.d.ts.map +1 -1
- package/dist/drawer-scroll-area.d.ts +3 -7
- package/dist/drawer-scroll-area.d.ts.map +1 -1
- package/dist/drawer-trigger.d.ts +3 -6
- package/dist/drawer-trigger.d.ts.map +1 -1
- package/dist/drawer.cjs.js +11 -11
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.d.ts +2 -2
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.es.js +560 -586
- package/dist/drawer.es.js.map +1 -1
- package/dist/use-swipe-to-dismiss.hook.d.ts +3 -3
- package/dist/use-swipe-to-dismiss.hook.d.ts.map +1 -1
- package/dist/use-swipe-tracking.hook.d.ts +6 -6
- package/dist/use-swipe-tracking.hook.d.ts.map +1 -1
- package/package.json +11 -12
- package/src/drawer-container.tsx +7 -6
- package/src/drawer-content.tsx +20 -6
- package/src/drawer-frame.tsx +7 -6
- package/src/drawer-handle.tsx +7 -6
- package/src/drawer-header.tsx +8 -6
- package/src/drawer-scroll-area.tsx +7 -6
- package/src/drawer-trigger.tsx +6 -20
- package/src/drawer.stories.tsx +2 -2
- package/src/drawer.tsx +3 -2
- package/src/use-swipe-to-dismiss.hook.ts +4 -4
- package/src/use-swipe-tracking.hook.ts +9 -9
package/dist/drawer.es.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsx as f, Fragment as H, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import Ie, { useState as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
3
|
+
import Ie, { useState as Tt, createContext as Ot, forwardRef as B, useRef as Lt, useContext as $t, useEffect as Mt } from "react";
|
|
4
|
+
import * as It from "react-dom";
|
|
5
|
+
import kt 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)
|
|
9
9
|
return r == null ? void 0 : r(a);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function tr(e, r) {
|
|
13
13
|
if (typeof e == "function")
|
|
14
14
|
return e(r);
|
|
15
15
|
e != null && (e.current = r);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Dr(...e) {
|
|
18
18
|
return (r) => {
|
|
19
19
|
let t = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
21
|
-
const n =
|
|
21
|
+
const n = tr(a, r);
|
|
22
22
|
return !t && typeof n == "function" && (t = !0), n;
|
|
23
23
|
});
|
|
24
24
|
if (t)
|
|
25
25
|
return () => {
|
|
26
26
|
for (let a = 0; a < o.length; a++) {
|
|
27
27
|
const n = o[a];
|
|
28
|
-
typeof n == "function" ? n() :
|
|
28
|
+
typeof n == "function" ? n() : tr(e[a], null);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function L(...e) {
|
|
34
|
-
return c.useCallback(
|
|
34
|
+
return c.useCallback(Dr(...e), e);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Wt(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 });
|
|
@@ -47,15 +47,15 @@ function kt(e, r) {
|
|
|
47
47
|
}
|
|
48
48
|
return [o, a];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Tr(e, r = []) {
|
|
51
51
|
let t = [];
|
|
52
52
|
function o(n, s) {
|
|
53
53
|
const i = c.createContext(s), u = t.length;
|
|
54
54
|
t = [...t, s];
|
|
55
55
|
const l = (p) => {
|
|
56
|
-
var
|
|
57
|
-
const { scope: v, children: m, ...w } = p, h = ((
|
|
58
|
-
return /* @__PURE__ */ f(h.Provider, { value:
|
|
56
|
+
var _;
|
|
57
|
+
const { scope: v, children: m, ...w } = p, h = ((_ = v == null ? void 0 : v[e]) == null ? void 0 : _[u]) || i, g = c.useMemo(() => w, Object.values(w));
|
|
58
|
+
return /* @__PURE__ */ f(h.Provider, { value: g, children: m });
|
|
59
59
|
};
|
|
60
60
|
l.displayName = n + "Provider";
|
|
61
61
|
function d(p, v) {
|
|
@@ -77,9 +77,9 @@ function Dr(e, r = []) {
|
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
return a.scopeName = e, [o,
|
|
80
|
+
return a.scopeName = e, [o, Ft(a, ...r)];
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ft(...e) {
|
|
83
83
|
const r = e[0];
|
|
84
84
|
if (e.length === 1) return r;
|
|
85
85
|
const t = () => {
|
|
@@ -98,12 +98,12 @@ function Wt(...e) {
|
|
|
98
98
|
return t.scopeName = r.scopeName, t;
|
|
99
99
|
}
|
|
100
100
|
var ce = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
101
|
-
},
|
|
102
|
-
}),
|
|
101
|
+
}, Ut = c.useId || (() => {
|
|
102
|
+
}), qt = 0;
|
|
103
103
|
function Pe(e) {
|
|
104
|
-
const [r, t] = c.useState(
|
|
104
|
+
const [r, t] = c.useState(Ut());
|
|
105
105
|
return ce(() => {
|
|
106
|
-
t((o) => o ?? String(
|
|
106
|
+
t((o) => o ?? String(qt++));
|
|
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 Ht({
|
|
119
119
|
prop: e,
|
|
120
120
|
defaultProp: r,
|
|
121
121
|
onChange: t = () => {
|
|
122
122
|
}
|
|
123
123
|
}) {
|
|
124
|
-
const [o, a] =
|
|
124
|
+
const [o, a] = Bt({ 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 qt({
|
|
|
133
133
|
);
|
|
134
134
|
return [s, u];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Bt({
|
|
137
137
|
defaultProp: e,
|
|
138
138
|
onChange: r
|
|
139
139
|
}) {
|
|
@@ -143,7 +143,7 @@ function Ht({
|
|
|
143
143
|
}, [o, a, n]), t;
|
|
144
144
|
}
|
|
145
145
|
var ze = c.forwardRef((e, r) => {
|
|
146
|
-
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(
|
|
146
|
+
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(zt);
|
|
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 });
|
|
@@ -154,17 +154,17 @@ ze.displayName = "Slot";
|
|
|
154
154
|
var ke = c.forwardRef((e, r) => {
|
|
155
155
|
const { children: t, ...o } = e;
|
|
156
156
|
if (c.isValidElement(t)) {
|
|
157
|
-
const a =
|
|
158
|
-
return t.type !== c.Fragment && (n.ref = r ?
|
|
157
|
+
const a = Yt(t), n = Vt(o, t.props);
|
|
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
162
|
ke.displayName = "SlotClone";
|
|
163
|
-
var
|
|
164
|
-
function
|
|
165
|
-
return c.isValidElement(e) && e.type ===
|
|
163
|
+
var jt = ({ children: e }) => /* @__PURE__ */ f(H, { children: e });
|
|
164
|
+
function zt(e) {
|
|
165
|
+
return c.isValidElement(e) && e.type === jt;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Vt(e, r) {
|
|
168
168
|
const t = { ...r };
|
|
169
169
|
for (const o in r) {
|
|
170
170
|
const a = e[o], n = r[o];
|
|
@@ -174,12 +174,12 @@ function zt(e, r) {
|
|
|
174
174
|
}
|
|
175
175
|
return { ...e, ...t };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Yt(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);
|
|
181
181
|
}
|
|
182
|
-
var
|
|
182
|
+
var Xt = [
|
|
183
183
|
"a",
|
|
184
184
|
"button",
|
|
185
185
|
"div",
|
|
@@ -196,17 +196,17 @@ var Yt = [
|
|
|
196
196
|
"span",
|
|
197
197
|
"svg",
|
|
198
198
|
"ul"
|
|
199
|
-
], O =
|
|
199
|
+
], O = Xt.reduce((e, r) => {
|
|
200
200
|
const t = c.forwardRef((o, a) => {
|
|
201
201
|
const { asChild: n, ...s } = o, i = n ? ze : r;
|
|
202
202
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...s, ref: a });
|
|
203
203
|
});
|
|
204
204
|
return t.displayName = `Primitive.${r}`, { ...e, [r]: t };
|
|
205
205
|
}, {});
|
|
206
|
-
function
|
|
207
|
-
e &&
|
|
206
|
+
function Gt(e, r) {
|
|
207
|
+
e && It.flushSync(() => e.dispatchEvent(r));
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Kt(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
210
210
|
const t = T(e);
|
|
211
211
|
c.useEffect(() => {
|
|
212
212
|
const o = (a) => {
|
|
@@ -215,11 +215,11 @@ function Gt(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
|
|
218
|
+
var Zt = "DismissableLayer", We = "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()
|
|
222
|
-
}),
|
|
222
|
+
}), Lr = c.forwardRef(
|
|
223
223
|
(e, r) => {
|
|
224
224
|
const {
|
|
225
225
|
disableOutsidePointerEvents: t = !1,
|
|
@@ -229,22 +229,22 @@ var Kt = "DismissableLayer", We = "dismissableLayer.update", Zt = "dismissableLa
|
|
|
229
229
|
onInteractOutside: s,
|
|
230
230
|
onDismiss: i,
|
|
231
231
|
...u
|
|
232
|
-
} = e, l = c.useContext(
|
|
232
|
+
} = e, l = c.useContext(Or), [d, p] = c.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), w = L(r, (S) => p(S)), h = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = h.indexOf(g), E = d ? h.indexOf(d) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, y = E >= _, C = tn((S) => {
|
|
233
233
|
const R = S.target, P = [...l.branches].some((A) => A.contains(R));
|
|
234
234
|
!y || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
235
|
-
}, v), N =
|
|
235
|
+
}, v), N = nn((S) => {
|
|
236
236
|
const R = S.target;
|
|
237
237
|
[...l.branches].some((A) => A.contains(R)) || (n == null || n(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
238
238
|
}, v);
|
|
239
|
-
return
|
|
239
|
+
return Kt((S) => {
|
|
240
240
|
E === l.layers.size - 1 && (o == null || o(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
241
241
|
}, v), c.useEffect(() => {
|
|
242
242
|
if (d)
|
|
243
|
-
return t && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
244
|
-
t && l.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents =
|
|
243
|
+
return t && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (nr = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), or(), () => {
|
|
244
|
+
t && l.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = nr);
|
|
245
245
|
};
|
|
246
246
|
}, [d, v, t, l]), c.useEffect(() => () => {
|
|
247
|
-
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
247
|
+
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), or());
|
|
248
248
|
}, [d, l]), c.useEffect(() => {
|
|
249
249
|
const S = () => m({});
|
|
250
250
|
return document.addEventListener(We, S), () => document.removeEventListener(We, S);
|
|
@@ -267,9 +267,9 @@ var Kt = "DismissableLayer", We = "dismissableLayer.update", Zt = "dismissableLa
|
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
|
-
|
|
271
|
-
var
|
|
272
|
-
const t = c.useContext(
|
|
270
|
+
Lr.displayName = Zt;
|
|
271
|
+
var en = "DismissableLayerBranch", rn = c.forwardRef((e, r) => {
|
|
272
|
+
const t = c.useContext(Or), o = c.useRef(null), a = L(r, o);
|
|
273
273
|
return c.useEffect(() => {
|
|
274
274
|
const n = o.current;
|
|
275
275
|
if (n)
|
|
@@ -278,16 +278,16 @@ var Jt = "DismissableLayerBranch", en = c.forwardRef((e, r) => {
|
|
|
278
278
|
};
|
|
279
279
|
}, [t.branches]), /* @__PURE__ */ f(O.div, { ...e, ref: a });
|
|
280
280
|
});
|
|
281
|
-
|
|
282
|
-
function
|
|
281
|
+
rn.displayName = en;
|
|
282
|
+
function tn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
283
283
|
const t = T(e), o = c.useRef(!1), a = c.useRef(() => {
|
|
284
284
|
});
|
|
285
285
|
return c.useEffect(() => {
|
|
286
286
|
const n = (i) => {
|
|
287
287
|
if (i.target && !o.current) {
|
|
288
288
|
let u = function() {
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
$r(
|
|
290
|
+
Qt,
|
|
291
291
|
t,
|
|
292
292
|
l,
|
|
293
293
|
{ discrete: !0 }
|
|
@@ -309,11 +309,11 @@ function rn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
309
309
|
onPointerDownCapture: () => o.current = !0
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function nn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
313
313
|
const t = T(e), o = c.useRef(!1);
|
|
314
314
|
return c.useEffect(() => {
|
|
315
315
|
const a = (n) => {
|
|
316
|
-
n.target && !o.current &&
|
|
316
|
+
n.target && !o.current && $r(Jt, t, { originalEvent: n }, {
|
|
317
317
|
discrete: !1
|
|
318
318
|
});
|
|
319
319
|
};
|
|
@@ -323,15 +323,15 @@ function tn(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
323
323
|
onBlurCapture: () => o.current = !1
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function or() {
|
|
327
327
|
const e = new CustomEvent(We);
|
|
328
328
|
document.dispatchEvent(e);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function $r(e, r, t, { discrete: o }) {
|
|
331
331
|
const a = t.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: t });
|
|
332
|
-
r && a.addEventListener(e, r, { once: !0 }), o ?
|
|
332
|
+
r && a.addEventListener(e, r, { once: !0 }), o ? Gt(a, n) : a.dispatchEvent(n);
|
|
333
333
|
}
|
|
334
|
-
var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount",
|
|
334
|
+
var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", ar = { bubbles: !1, cancelable: !0 }, on = "FocusScope", Mr = c.forwardRef((e, r) => {
|
|
335
335
|
const {
|
|
336
336
|
loop: t = !1,
|
|
337
337
|
trapped: o = !1,
|
|
@@ -353,33 +353,33 @@ var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", or
|
|
|
353
353
|
if (m.paused || !i) return;
|
|
354
354
|
const y = b.target;
|
|
355
355
|
i.contains(y) ? p.current = y : q(p.current, { select: !0 });
|
|
356
|
-
},
|
|
356
|
+
}, g = function(b) {
|
|
357
357
|
if (m.paused || !i) return;
|
|
358
358
|
const y = b.relatedTarget;
|
|
359
359
|
y !== null && (i.contains(y) || q(p.current, { select: !0 }));
|
|
360
|
-
},
|
|
360
|
+
}, _ = function(b) {
|
|
361
361
|
if (document.activeElement === document.body)
|
|
362
362
|
for (const C of b)
|
|
363
363
|
C.removedNodes.length > 0 && q(i);
|
|
364
364
|
};
|
|
365
|
-
document.addEventListener("focusin", h), document.addEventListener("focusout",
|
|
366
|
-
const E = new MutationObserver(
|
|
365
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", g);
|
|
366
|
+
const E = new MutationObserver(_);
|
|
367
367
|
return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
368
|
-
document.removeEventListener("focusin", h), document.removeEventListener("focusout",
|
|
368
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", g), E.disconnect();
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
371
|
}, [o, i, m.paused]), c.useEffect(() => {
|
|
372
372
|
if (i) {
|
|
373
|
-
|
|
373
|
+
sr.add(m);
|
|
374
374
|
const h = document.activeElement;
|
|
375
375
|
if (!i.contains(h)) {
|
|
376
|
-
const
|
|
377
|
-
i.addEventListener(Ne, l), i.dispatchEvent(
|
|
376
|
+
const _ = new CustomEvent(Ne, ar);
|
|
377
|
+
i.addEventListener(Ne, l), i.dispatchEvent(_), _.defaultPrevented || (an(dn(Ir(i)), { select: !0 }), document.activeElement === h && q(i));
|
|
378
378
|
}
|
|
379
379
|
return () => {
|
|
380
380
|
i.removeEventListener(Ne, l), setTimeout(() => {
|
|
381
|
-
const
|
|
382
|
-
i.addEventListener(Ae, d), i.dispatchEvent(
|
|
381
|
+
const _ = new CustomEvent(Ae, ar);
|
|
382
|
+
i.addEventListener(Ae, d), i.dispatchEvent(_), _.defaultPrevented || q(h ?? document.body, { select: !0 }), i.removeEventListener(Ae, d), sr.remove(m);
|
|
383
383
|
}, 0);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
@@ -387,27 +387,27 @@ var Ne = "focusScope.autoFocusOnMount", Ae = "focusScope.autoFocusOnUnmount", or
|
|
|
387
387
|
const w = c.useCallback(
|
|
388
388
|
(h) => {
|
|
389
389
|
if (!t && !o || m.paused) return;
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
const E = h.currentTarget, [b, y] =
|
|
393
|
-
b && y ? !h.shiftKey &&
|
|
390
|
+
const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, _ = document.activeElement;
|
|
391
|
+
if (g && _) {
|
|
392
|
+
const E = h.currentTarget, [b, y] = sn(E);
|
|
393
|
+
b && y ? !h.shiftKey && _ === y ? (h.preventDefault(), t && q(b, { select: !0 })) : h.shiftKey && _ === b && (h.preventDefault(), t && q(y, { select: !0 })) : _ === E && h.preventDefault();
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
[t, o, m.paused]
|
|
397
397
|
);
|
|
398
398
|
return /* @__PURE__ */ f(O.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
|
|
399
399
|
});
|
|
400
|
-
|
|
401
|
-
function
|
|
400
|
+
Mr.displayName = on;
|
|
401
|
+
function an(e, { select: r = !1 } = {}) {
|
|
402
402
|
const t = document.activeElement;
|
|
403
403
|
for (const o of e)
|
|
404
404
|
if (q(o, { select: r }), document.activeElement !== t) return;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
const r =
|
|
406
|
+
function sn(e) {
|
|
407
|
+
const r = Ir(e), t = ir(r, e), o = ir(r.reverse(), e);
|
|
408
408
|
return [t, o];
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Ir(e) {
|
|
411
411
|
const r = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
412
412
|
acceptNode: (o) => {
|
|
413
413
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -417,11 +417,11 @@ function Mr(e) {
|
|
|
417
417
|
for (; t.nextNode(); ) r.push(t.currentNode);
|
|
418
418
|
return r;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function ir(e, r) {
|
|
421
421
|
for (const t of e)
|
|
422
|
-
if (!
|
|
422
|
+
if (!cn(t, { upTo: r })) return t;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function cn(e, { upTo: r }) {
|
|
425
425
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
426
426
|
for (; e; ) {
|
|
427
427
|
if (r !== void 0 && e === r) return !1;
|
|
@@ -430,54 +430,54 @@ function sn(e, { upTo: r }) {
|
|
|
430
430
|
}
|
|
431
431
|
return !1;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function ln(e) {
|
|
434
434
|
return e instanceof HTMLInputElement && "select" in e;
|
|
435
435
|
}
|
|
436
436
|
function q(e, { select: r = !1 } = {}) {
|
|
437
437
|
if (e && e.focus) {
|
|
438
438
|
const t = document.activeElement;
|
|
439
|
-
e.focus({ preventScroll: !0 }), e !== t &&
|
|
439
|
+
e.focus({ preventScroll: !0 }), e !== t && ln(e) && r && e.select();
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
var
|
|
443
|
-
function
|
|
442
|
+
var sr = un();
|
|
443
|
+
function un() {
|
|
444
444
|
let e = [];
|
|
445
445
|
return {
|
|
446
446
|
add(r) {
|
|
447
447
|
const t = e[0];
|
|
448
|
-
r !== t && (t == null || t.pause()), e =
|
|
448
|
+
r !== t && (t == null || t.pause()), e = cr(e, r), e.unshift(r);
|
|
449
449
|
},
|
|
450
450
|
remove(r) {
|
|
451
451
|
var t;
|
|
452
|
-
e =
|
|
452
|
+
e = cr(e, r), (t = e[0]) == null || t.resume();
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function cr(e, r) {
|
|
457
457
|
const t = [...e], o = t.indexOf(r);
|
|
458
458
|
return o !== -1 && t.splice(o, 1), t;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function dn(e) {
|
|
461
461
|
return e.filter((r) => r.tagName !== "A");
|
|
462
462
|
}
|
|
463
|
-
var
|
|
463
|
+
var fn = "Portal", kr = 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 ? kt.createPortal(/* @__PURE__ */ f(O.div, { ...o, ref: r }), s) : null;
|
|
469
469
|
});
|
|
470
|
-
|
|
471
|
-
function
|
|
470
|
+
kr.displayName = fn;
|
|
471
|
+
function pn(e, r) {
|
|
472
472
|
return c.useReducer((t, o) => r[t][o] ?? t, e);
|
|
473
473
|
}
|
|
474
474
|
var j = (e) => {
|
|
475
|
-
const { present: r, children: t } = e, o =
|
|
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
|
j.displayName = "Presence";
|
|
479
|
-
function
|
|
480
|
-
const [r, t] = c.useState(), o = c.useRef({}), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] =
|
|
479
|
+
function vn(e) {
|
|
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: {
|
|
482
482
|
UNMOUNT: "unmounted",
|
|
483
483
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -505,9 +505,9 @@ function pn(e) {
|
|
|
505
505
|
const d = r.ownerDocument.defaultView ?? window, p = (m) => {
|
|
506
506
|
const h = le(o.current).includes(m.animationName);
|
|
507
507
|
if (m.target === r && h && (u("ANIMATION_END"), !a.current)) {
|
|
508
|
-
const
|
|
508
|
+
const g = r.style.animationFillMode;
|
|
509
509
|
r.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
510
|
-
r.style.animationFillMode === "forwards" && (r.style.animationFillMode =
|
|
510
|
+
r.style.animationFillMode === "forwards" && (r.style.animationFillMode = g);
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
}, v = (m) => {
|
|
@@ -528,21 +528,21 @@ function pn(e) {
|
|
|
528
528
|
function le(e) {
|
|
529
529
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function hn(e) {
|
|
532
532
|
var o, a;
|
|
533
533
|
let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
534
534
|
return t ? e.ref : (r = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
535
535
|
}
|
|
536
536
|
var Re = 0;
|
|
537
|
-
function
|
|
537
|
+
function mn() {
|
|
538
538
|
c.useEffect(() => {
|
|
539
539
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
540
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
540
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? lr()), document.body.insertAdjacentElement("beforeend", e[1] ?? lr()), Re++, () => {
|
|
541
541
|
Re === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((r) => r.remove()), Re--;
|
|
542
542
|
};
|
|
543
543
|
}, []);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function lr() {
|
|
546
546
|
const e = document.createElement("span");
|
|
547
547
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
548
548
|
}
|
|
@@ -555,7 +555,7 @@ var I = function() {
|
|
|
555
555
|
return r;
|
|
556
556
|
}, I.apply(this, arguments);
|
|
557
557
|
};
|
|
558
|
-
function
|
|
558
|
+
function Wr(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")
|
|
@@ -563,17 +563,17 @@ function kr(e, r) {
|
|
|
563
563
|
r.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
564
564
|
return t;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function gn(e, r, t) {
|
|
567
567
|
if (t || arguments.length === 2) for (var o = 0, a = r.length, n; o < a; o++)
|
|
568
568
|
(n || !(o in r)) && (n || (n = Array.prototype.slice.call(r, 0, o)), n[o] = r[o]);
|
|
569
569
|
return e.concat(n || Array.prototype.slice.call(r));
|
|
570
570
|
}
|
|
571
|
-
var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar",
|
|
571
|
+
var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar", _n = "with-scroll-bars-hidden", wn = "--removed-body-scroll-bar-size";
|
|
572
572
|
function xe(e, r) {
|
|
573
573
|
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
var t =
|
|
575
|
+
function bn(e, r) {
|
|
576
|
+
var t = Tt(function() {
|
|
577
577
|
return {
|
|
578
578
|
// value
|
|
579
579
|
value: e,
|
|
@@ -593,15 +593,15 @@ function wn(e, r) {
|
|
|
593
593
|
})[0];
|
|
594
594
|
return t.callback = r, t.facade;
|
|
595
595
|
}
|
|
596
|
-
var
|
|
597
|
-
function
|
|
598
|
-
var t =
|
|
596
|
+
var yn = typeof window < "u" ? c.useLayoutEffect : c.useEffect, ur = /* @__PURE__ */ new WeakMap();
|
|
597
|
+
function Sn(e, r) {
|
|
598
|
+
var t = bn(null, function(o) {
|
|
599
599
|
return e.forEach(function(a) {
|
|
600
600
|
return xe(a, o);
|
|
601
601
|
});
|
|
602
602
|
});
|
|
603
|
-
return
|
|
604
|
-
var o =
|
|
603
|
+
return yn(function() {
|
|
604
|
+
var o = ur.get(t);
|
|
605
605
|
if (o) {
|
|
606
606
|
var a = new Set(o), n = new Set(e), s = t.current;
|
|
607
607
|
a.forEach(function(i) {
|
|
@@ -610,14 +610,14 @@ function yn(e, r) {
|
|
|
610
610
|
a.has(i) || xe(i, s);
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
|
|
613
|
+
ur.set(t, e);
|
|
614
614
|
}, [e]), t;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function En(e) {
|
|
617
617
|
return e;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
r === void 0 && (r =
|
|
619
|
+
function Cn(e, r) {
|
|
620
|
+
r === void 0 && (r = En);
|
|
621
621
|
var t = [], o = !1, a = {
|
|
622
622
|
read: function() {
|
|
623
623
|
if (o)
|
|
@@ -671,13 +671,13 @@ function En(e, r) {
|
|
|
671
671
|
};
|
|
672
672
|
return a;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Pn(e) {
|
|
675
675
|
e === void 0 && (e = {});
|
|
676
|
-
var r =
|
|
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 Fr = function(e) {
|
|
680
|
+
var r = e.sideCar, t = Wr(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,22 +685,22 @@ var Wr = function(e) {
|
|
|
685
685
|
throw new Error("Sidecar medium not found");
|
|
686
686
|
return c.createElement(o, I({}, t));
|
|
687
687
|
};
|
|
688
|
-
|
|
689
|
-
function
|
|
690
|
-
return e.useMedium(r),
|
|
688
|
+
Fr.isSideCarExport = !0;
|
|
689
|
+
function Nn(e, r) {
|
|
690
|
+
return e.useMedium(r), Fr;
|
|
691
691
|
}
|
|
692
|
-
var
|
|
692
|
+
var Ur = Pn(), De = function() {
|
|
693
693
|
}, Se = c.forwardRef(function(e, r) {
|
|
694
694
|
var t = c.useRef(null), o = c.useState({
|
|
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,
|
|
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 = Wr(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,
|
|
702
|
-
d && c.createElement(y, { sideCar:
|
|
703
|
-
s ? c.cloneElement(c.Children.only(i), I(I({}, N), { ref: C })) : c.createElement(
|
|
702
|
+
d && c.createElement(y, { sideCar: Ur, removeScrollBar: l, shards: p, noIsolation: m, inert: w, setCallbacks: n, allowPinchZoom: !!h, lockRef: t, gapMode: E }),
|
|
703
|
+
s ? c.cloneElement(c.Children.only(i), I(I({}, N), { ref: C })) : c.createElement(_, I({}, N, { className: u, ref: C }), i)
|
|
704
704
|
);
|
|
705
705
|
});
|
|
706
706
|
Se.defaultProps = {
|
|
@@ -712,37 +712,37 @@ Se.classNames = {
|
|
|
712
712
|
fullWidth: _e,
|
|
713
713
|
zeroRight: ge
|
|
714
714
|
};
|
|
715
|
-
var
|
|
715
|
+
var An = function() {
|
|
716
716
|
if (typeof __webpack_nonce__ < "u")
|
|
717
717
|
return __webpack_nonce__;
|
|
718
718
|
};
|
|
719
|
-
function
|
|
719
|
+
function Rn() {
|
|
720
720
|
if (!document)
|
|
721
721
|
return null;
|
|
722
722
|
var e = document.createElement("style");
|
|
723
723
|
e.type = "text/css";
|
|
724
|
-
var r =
|
|
724
|
+
var r = An();
|
|
725
725
|
return r && e.setAttribute("nonce", r), e;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function xn(e, r) {
|
|
728
728
|
e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Dn(e) {
|
|
731
731
|
var r = document.head || document.getElementsByTagName("head")[0];
|
|
732
732
|
r.appendChild(e);
|
|
733
733
|
}
|
|
734
|
-
var
|
|
734
|
+
var Tn = function() {
|
|
735
735
|
var e = 0, r = null;
|
|
736
736
|
return {
|
|
737
737
|
add: function(t) {
|
|
738
|
-
e == 0 && (r =
|
|
738
|
+
e == 0 && (r = Rn()) && (xn(r, t), Dn(r)), e++;
|
|
739
739
|
},
|
|
740
740
|
remove: function() {
|
|
741
741
|
e--, !e && r && (r.parentNode && r.parentNode.removeChild(r), r = null);
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
},
|
|
745
|
-
var e =
|
|
744
|
+
}, On = function() {
|
|
745
|
+
var e = Tn();
|
|
746
746
|
return function(r, t) {
|
|
747
747
|
c.useEffect(function() {
|
|
748
748
|
return e.add(r), function() {
|
|
@@ -750,36 +750,36 @@ var Dn = function() {
|
|
|
750
750
|
};
|
|
751
751
|
}, [r && t]);
|
|
752
752
|
};
|
|
753
|
-
},
|
|
754
|
-
var e =
|
|
753
|
+
}, qr = function() {
|
|
754
|
+
var e = On(), r = function(t) {
|
|
755
755
|
var o = t.styles, a = t.dynamic;
|
|
756
756
|
return e(o, a), null;
|
|
757
757
|
};
|
|
758
758
|
return r;
|
|
759
|
-
},
|
|
759
|
+
}, Ln = {
|
|
760
760
|
left: 0,
|
|
761
761
|
top: 0,
|
|
762
762
|
right: 0,
|
|
763
763
|
gap: 0
|
|
764
764
|
}, Te = function(e) {
|
|
765
765
|
return parseInt(e || "", 10) || 0;
|
|
766
|
-
},
|
|
766
|
+
}, $n = function(e) {
|
|
767
767
|
var r = window.getComputedStyle(document.body), t = r[e === "padding" ? "paddingLeft" : "marginLeft"], o = r[e === "padding" ? "paddingTop" : "marginTop"], a = r[e === "padding" ? "paddingRight" : "marginRight"];
|
|
768
768
|
return [Te(t), Te(o), Te(a)];
|
|
769
|
-
},
|
|
769
|
+
}, Mn = function(e) {
|
|
770
770
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
771
|
-
return
|
|
772
|
-
var r =
|
|
771
|
+
return Ln;
|
|
772
|
+
var r = $n(e), t = document.documentElement.clientWidth, o = window.innerWidth;
|
|
773
773
|
return {
|
|
774
774
|
left: r[0],
|
|
775
775
|
top: r[1],
|
|
776
776
|
right: r[2],
|
|
777
777
|
gap: Math.max(0, o - t + r[2] - r[0])
|
|
778
778
|
};
|
|
779
|
-
},
|
|
779
|
+
}, In = qr(), re = "data-scroll-locked", kn = 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
|
-
.`.concat(
|
|
782
|
+
.`.concat(_n, ` {
|
|
783
783
|
overflow: hidden `).concat(o, `;
|
|
784
784
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
785
785
|
}
|
|
@@ -817,26 +817,26 @@ var Dn = function() {
|
|
|
817
817
|
}
|
|
818
818
|
|
|
819
819
|
body[`).concat(re, `] {
|
|
820
|
-
`).concat(
|
|
820
|
+
`).concat(wn, ": ").concat(i, `px;
|
|
821
821
|
}
|
|
822
822
|
`);
|
|
823
|
-
},
|
|
823
|
+
}, dr = function() {
|
|
824
824
|
var e = parseInt(document.body.getAttribute(re) || "0", 10);
|
|
825
825
|
return isFinite(e) ? e : 0;
|
|
826
|
-
},
|
|
826
|
+
}, Wn = function() {
|
|
827
827
|
c.useEffect(function() {
|
|
828
|
-
return document.body.setAttribute(re, (
|
|
829
|
-
var e =
|
|
828
|
+
return document.body.setAttribute(re, (dr() + 1).toString()), function() {
|
|
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
|
+
}, Fn = function(e) {
|
|
834
834
|
var r = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
835
|
-
|
|
835
|
+
Wn();
|
|
836
836
|
var n = c.useMemo(function() {
|
|
837
|
-
return
|
|
837
|
+
return Mn(a);
|
|
838
838
|
}, [a]);
|
|
839
|
-
return c.createElement(
|
|
839
|
+
return c.createElement(In, { styles: kn(n, !r, a, t ? "" : "!important") });
|
|
840
840
|
}, Fe = !1;
|
|
841
841
|
if (typeof window < "u")
|
|
842
842
|
try {
|
|
@@ -849,59 +849,59 @@ if (typeof window < "u")
|
|
|
849
849
|
} catch {
|
|
850
850
|
Fe = !1;
|
|
851
851
|
}
|
|
852
|
-
var X = Fe ? { passive: !1 } : !1,
|
|
852
|
+
var X = Fe ? { passive: !1 } : !1, Un = function(e) {
|
|
853
853
|
return e.tagName === "TEXTAREA";
|
|
854
|
-
},
|
|
854
|
+
}, Hr = 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 && !Un(e) && t[r] === "visible")
|
|
862
862
|
);
|
|
863
|
-
}, Un = function(e) {
|
|
864
|
-
return qr(e, "overflowY");
|
|
865
863
|
}, qn = function(e) {
|
|
866
|
-
return
|
|
867
|
-
},
|
|
864
|
+
return Hr(e, "overflowY");
|
|
865
|
+
}, Hn = function(e) {
|
|
866
|
+
return Hr(e, "overflowX");
|
|
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 = Br(e, o);
|
|
872
872
|
if (a) {
|
|
873
|
-
var n =
|
|
873
|
+
var n = jr(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
|
+
}, Bn = 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
|
+
}, jn = 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
|
-
}, Hr = function(e, r) {
|
|
895
|
-
return e === "v" ? Un(r) : qn(r);
|
|
896
894
|
}, Br = function(e, r) {
|
|
897
|
-
return e === "v" ?
|
|
898
|
-
},
|
|
895
|
+
return e === "v" ? qn(r) : Hn(r);
|
|
896
|
+
}, jr = function(e, r) {
|
|
897
|
+
return e === "v" ? Bn(r) : jn(r);
|
|
898
|
+
}, zn = function(e, r) {
|
|
899
899
|
return e === "h" && r === "rtl" ? -1 : 1;
|
|
900
|
-
},
|
|
901
|
-
var n =
|
|
900
|
+
}, Vn = function(e, r, t, o, a) {
|
|
901
|
+
var n = zn(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 = jr(e, i), w = m[0], h = m[1], g = m[2], _ = h - g - n * w;
|
|
904
|
+
(w || _) && Br(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
|
|
@@ -910,69 +910,69 @@ var X = Fe ? { passive: !1 } : !1, Fn = function(e) {
|
|
|
910
910
|
return (d && Math.abs(p) < 1 || !d && Math.abs(v) < 1) && (l = !0), l;
|
|
911
911
|
}, de = function(e) {
|
|
912
912
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
913
|
-
}, fr = function(e) {
|
|
914
|
-
return [e.deltaX, e.deltaY];
|
|
915
913
|
}, pr = function(e) {
|
|
914
|
+
return [e.deltaX, e.deltaY];
|
|
915
|
+
}, vr = function(e) {
|
|
916
916
|
return e && "current" in e ? e.current : e;
|
|
917
|
-
},
|
|
917
|
+
}, Yn = function(e, r) {
|
|
918
918
|
return e[0] === r[0] && e[1] === r[1];
|
|
919
|
-
},
|
|
919
|
+
}, Xn = function(e) {
|
|
920
920
|
return `
|
|
921
921
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
922
922
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
923
923
|
`);
|
|
924
|
-
},
|
|
925
|
-
function
|
|
926
|
-
var r = c.useRef([]), t = c.useRef([0, 0]), o = c.useRef(), a = c.useState(
|
|
924
|
+
}, Gn = 0, G = [];
|
|
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(qr)[0], s = c.useRef(e);
|
|
927
927
|
c.useEffect(function() {
|
|
928
928
|
s.current = e;
|
|
929
929
|
}, [e]), c.useEffect(function() {
|
|
930
930
|
if (e.inert) {
|
|
931
931
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
932
|
-
var h =
|
|
933
|
-
return h.forEach(function(
|
|
934
|
-
return
|
|
932
|
+
var h = gn([e.lockRef.current], (e.shards || []).map(vr), !0).filter(Boolean);
|
|
933
|
+
return h.forEach(function(g) {
|
|
934
|
+
return g.classList.add("allow-interactivity-".concat(a));
|
|
935
935
|
}), function() {
|
|
936
|
-
document.body.classList.remove("block-interactivity-".concat(a)), h.forEach(function(
|
|
937
|
-
return
|
|
936
|
+
document.body.classList.remove("block-interactivity-".concat(a)), h.forEach(function(g) {
|
|
937
|
+
return g.classList.remove("allow-interactivity-".concat(a));
|
|
938
938
|
});
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
941
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
942
|
-
var i = c.useCallback(function(h,
|
|
942
|
+
var i = c.useCallback(function(h, g) {
|
|
943
943
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
944
944
|
return !s.current.allowPinchZoom;
|
|
945
|
-
var
|
|
945
|
+
var _ = de(h), E = t.current, b = "deltaX" in h ? h.deltaX : E[0] - _[0], y = "deltaY" in h ? h.deltaY : E[1] - _[1], C, N = h.target, S = Math.abs(b) > Math.abs(y) ? "h" : "v";
|
|
946
946
|
if ("touches" in h && S === "h" && N.type === "range")
|
|
947
947
|
return !1;
|
|
948
|
-
var R =
|
|
948
|
+
var R = fr(S, N);
|
|
949
949
|
if (!R)
|
|
950
950
|
return !0;
|
|
951
|
-
if (R ? C = S : (C = S === "v" ? "h" : "v", R =
|
|
951
|
+
if (R ? C = S : (C = S === "v" ? "h" : "v", R = fr(S, N)), !R)
|
|
952
952
|
return !1;
|
|
953
953
|
if (!o.current && "changedTouches" in h && (b || y) && (o.current = C), !C)
|
|
954
954
|
return !0;
|
|
955
955
|
var P = o.current || C;
|
|
956
|
-
return
|
|
956
|
+
return Vn(P, g, h, P === "h" ? b : y);
|
|
957
957
|
}, []), u = c.useCallback(function(h) {
|
|
958
|
-
var
|
|
958
|
+
var g = h;
|
|
959
959
|
if (!(!G.length || G[G.length - 1] !== n)) {
|
|
960
|
-
var
|
|
961
|
-
return C.name ===
|
|
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) && Yn(C.delta, _);
|
|
962
962
|
})[0];
|
|
963
963
|
if (E && E.should) {
|
|
964
|
-
|
|
964
|
+
g.cancelable && g.preventDefault();
|
|
965
965
|
return;
|
|
966
966
|
}
|
|
967
967
|
if (!E) {
|
|
968
|
-
var b = (s.current.shards || []).map(
|
|
969
|
-
return C.contains(
|
|
970
|
-
}), y = b.length > 0 ? i(
|
|
971
|
-
y &&
|
|
968
|
+
var b = (s.current.shards || []).map(vr).filter(Boolean).filter(function(C) {
|
|
969
|
+
return C.contains(g.target);
|
|
970
|
+
}), y = b.length > 0 ? i(g, b[0]) : !s.current.noIsolation;
|
|
971
|
+
y && g.cancelable && g.preventDefault();
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
}, []), l = c.useCallback(function(h,
|
|
975
|
-
var b = { name: h, delta:
|
|
974
|
+
}, []), l = c.useCallback(function(h, g, _, E) {
|
|
975
|
+
var b = { name: h, delta: g, target: _, should: E, shadowParent: Zn(_) };
|
|
976
976
|
r.current.push(b), setTimeout(function() {
|
|
977
977
|
r.current = r.current.filter(function(y) {
|
|
978
978
|
return y !== b;
|
|
@@ -981,7 +981,7 @@ function Gn(e) {
|
|
|
981
981
|
}, []), d = c.useCallback(function(h) {
|
|
982
982
|
t.current = de(h), o.current = void 0;
|
|
983
983
|
}, []), p = c.useCallback(function(h) {
|
|
984
|
-
l(h.type,
|
|
984
|
+
l(h.type, pr(h), h.target, i(h, e.lockRef.current));
|
|
985
985
|
}, []), v = c.useCallback(function(h) {
|
|
986
986
|
l(h.type, de(h), h.target, i(h, e.lockRef.current));
|
|
987
987
|
}, []);
|
|
@@ -1000,38 +1000,38 @@ function Gn(e) {
|
|
|
1000
1000
|
return c.createElement(
|
|
1001
1001
|
c.Fragment,
|
|
1002
1002
|
null,
|
|
1003
|
-
w ? c.createElement(n, { styles:
|
|
1004
|
-
m ? c.createElement(
|
|
1003
|
+
w ? c.createElement(n, { styles: Xn(a) }) : null,
|
|
1004
|
+
m ? c.createElement(Fn, { gapMode: e.gapMode }) : null
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function Zn(e) {
|
|
1008
1008
|
for (var r = null; e !== null; )
|
|
1009
1009
|
e instanceof ShadowRoot && (r = e.host, e = e.host), e = e.parentNode;
|
|
1010
1010
|
return r;
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1013
|
-
var
|
|
1014
|
-
return c.createElement(Se, I({}, e, { ref: r, sideCar:
|
|
1012
|
+
const Qn = Nn(Ur, Kn);
|
|
1013
|
+
var zr = c.forwardRef(function(e, r) {
|
|
1014
|
+
return c.createElement(Se, I({}, e, { ref: r, sideCar: Qn }));
|
|
1015
1015
|
});
|
|
1016
|
-
|
|
1017
|
-
var
|
|
1016
|
+
zr.classNames = Se.classNames;
|
|
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 ||
|
|
1024
|
-
},
|
|
1022
|
+
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, Vr = function(e) {
|
|
1023
|
+
return e && (e.host || Vr(e.parentNode));
|
|
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 = Vr(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;
|
|
1032
1032
|
});
|
|
1033
|
-
},
|
|
1034
|
-
var a =
|
|
1033
|
+
}, ro = function(e, r, t, o) {
|
|
1034
|
+
var a = eo(r, Array.isArray(e) ? e : [e]);
|
|
1035
1035
|
pe[t] || (pe[t] = /* @__PURE__ */ new WeakMap());
|
|
1036
1036
|
var n = pe[t], s = [], i = /* @__PURE__ */ new Set(), u = new Set(a), l = function(p) {
|
|
1037
1037
|
!p || i.has(p) || (i.add(p), l(p.parentNode));
|
|
@@ -1043,10 +1043,10 @@ var Qn = function(e) {
|
|
|
1043
1043
|
d(v);
|
|
1044
1044
|
else
|
|
1045
1045
|
try {
|
|
1046
|
-
var m = v.getAttribute(o), w = m !== null && m !== "false", h = (K.get(v) || 0) + 1,
|
|
1047
|
-
K.set(v, h), n.set(v,
|
|
1048
|
-
} catch (
|
|
1049
|
-
console.error("aria-hidden: cannot operate on ", v,
|
|
1046
|
+
var m = v.getAttribute(o), w = m !== null && m !== "false", h = (K.get(v) || 0) + 1, g = (n.get(v) || 0) + 1;
|
|
1047
|
+
K.set(v, h), n.set(v, g), s.push(v), h === 1 && w && fe.set(v, !0), g === 1 && v.setAttribute(t, "true"), w || v.setAttribute(o, "true");
|
|
1048
|
+
} catch (_) {
|
|
1049
|
+
console.error("aria-hidden: cannot operate on ", v, _);
|
|
1050
1050
|
}
|
|
1051
1051
|
});
|
|
1052
1052
|
};
|
|
@@ -1056,13 +1056,13 @@ var Qn = function(e) {
|
|
|
1056
1056
|
K.set(p, v), n.set(p, m), v || (fe.has(p) || p.removeAttribute(o), fe.delete(p)), m || p.removeAttribute(t);
|
|
1057
1057
|
}), Oe--, Oe || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {});
|
|
1058
1058
|
};
|
|
1059
|
-
},
|
|
1059
|
+
}, to = function(e, r, t) {
|
|
1060
1060
|
t === void 0 && (t = "data-aria-hidden");
|
|
1061
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1062
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))),
|
|
1061
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = Jn(e);
|
|
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
|
-
}, Ve = "Dialog", [
|
|
1065
|
+
}, Ve = "Dialog", [Yr, Ga] = Tr(Ve), [no, M] = Yr(Ve), Xr = (e) => {
|
|
1066
1066
|
const {
|
|
1067
1067
|
__scopeDialog: r,
|
|
1068
1068
|
children: t,
|
|
@@ -1070,13 +1070,13 @@ var Qn = function(e) {
|
|
|
1070
1070
|
defaultOpen: a,
|
|
1071
1071
|
onOpenChange: n,
|
|
1072
1072
|
modal: s = !0
|
|
1073
|
-
} = e, i = c.useRef(null), u = c.useRef(null), [l = !1, d] =
|
|
1073
|
+
} = e, i = c.useRef(null), u = c.useRef(null), [l = !1, d] = Ht({
|
|
1074
1074
|
prop: o,
|
|
1075
1075
|
defaultProp: a,
|
|
1076
1076
|
onChange: n
|
|
1077
1077
|
});
|
|
1078
1078
|
return /* @__PURE__ */ f(
|
|
1079
|
-
|
|
1079
|
+
no,
|
|
1080
1080
|
{
|
|
1081
1081
|
scope: r,
|
|
1082
1082
|
triggerRef: i,
|
|
@@ -1092,10 +1092,10 @@ var Qn = function(e) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
);
|
|
1094
1094
|
};
|
|
1095
|
-
|
|
1096
|
-
var
|
|
1095
|
+
Xr.displayName = Ve;
|
|
1096
|
+
var Gr = "DialogTrigger", Kr = c.forwardRef(
|
|
1097
1097
|
(e, r) => {
|
|
1098
|
-
const { __scopeDialog: t, ...o } = e, a = M(
|
|
1098
|
+
const { __scopeDialog: t, ...o } = e, a = M(Gr, t), n = L(r, a.triggerRef);
|
|
1099
1099
|
return /* @__PURE__ */ f(
|
|
1100
1100
|
O.button,
|
|
1101
1101
|
{
|
|
@@ -1111,28 +1111,28 @@ var Xr = "DialogTrigger", Gr = c.forwardRef(
|
|
|
1111
1111
|
);
|
|
1112
1112
|
}
|
|
1113
1113
|
);
|
|
1114
|
-
|
|
1115
|
-
var Ye = "DialogPortal", [
|
|
1114
|
+
Kr.displayName = Gr;
|
|
1115
|
+
var Ye = "DialogPortal", [oo, Zr] = Yr(Ye, {
|
|
1116
1116
|
forceMount: void 0
|
|
1117
|
-
}),
|
|
1117
|
+
}), Qr = (e) => {
|
|
1118
1118
|
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = M(Ye, r);
|
|
1119
|
-
return /* @__PURE__ */ f(
|
|
1119
|
+
return /* @__PURE__ */ f(oo, { scope: r, forceMount: t, children: c.Children.map(o, (s) => /* @__PURE__ */ f(j, { present: t || n.open, children: /* @__PURE__ */ f(kr, { asChild: !0, container: a, children: s }) })) });
|
|
1120
1120
|
};
|
|
1121
|
-
|
|
1122
|
-
var we = "DialogOverlay",
|
|
1121
|
+
Qr.displayName = Ye;
|
|
1122
|
+
var we = "DialogOverlay", Jr = c.forwardRef(
|
|
1123
1123
|
(e, r) => {
|
|
1124
|
-
const t =
|
|
1125
|
-
return n.modal ? /* @__PURE__ */ f(j, { present: o || n.open, children: /* @__PURE__ */ f(
|
|
1124
|
+
const t = Zr(we, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(we, e.__scopeDialog);
|
|
1125
|
+
return n.modal ? /* @__PURE__ */ f(j, { present: o || n.open, children: /* @__PURE__ */ f(ao, { ...a, ref: r }) }) : null;
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
|
-
|
|
1129
|
-
var
|
|
1128
|
+
Jr.displayName = we;
|
|
1129
|
+
var ao = c.forwardRef(
|
|
1130
1130
|
(e, r) => {
|
|
1131
1131
|
const { __scopeDialog: t, ...o } = e, a = M(we, t);
|
|
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(zr, { as: ze, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1136
1136
|
O.div,
|
|
1137
1137
|
{
|
|
1138
1138
|
"data-state": Ge(a.open),
|
|
@@ -1143,21 +1143,21 @@ var oo = c.forwardRef(
|
|
|
1143
1143
|
) })
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
), V = "DialogContent",
|
|
1146
|
+
), V = "DialogContent", et = c.forwardRef(
|
|
1147
1147
|
(e, r) => {
|
|
1148
|
-
const t =
|
|
1149
|
-
return /* @__PURE__ */ f(j, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(
|
|
1148
|
+
const t = Zr(V, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = M(V, e.__scopeDialog);
|
|
1149
|
+
return /* @__PURE__ */ f(j, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(io, { ...a, ref: r }) : /* @__PURE__ */ f(so, { ...a, ref: r }) });
|
|
1150
1150
|
}
|
|
1151
1151
|
);
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1152
|
+
et.displayName = V;
|
|
1153
|
+
var io = c.forwardRef(
|
|
1154
1154
|
(e, r) => {
|
|
1155
1155
|
const t = M(V, e.__scopeDialog), o = c.useRef(null), a = L(r, t.contentRef, o);
|
|
1156
1156
|
return c.useEffect(() => {
|
|
1157
1157
|
const n = o.current;
|
|
1158
|
-
if (n) return
|
|
1158
|
+
if (n) return to(n);
|
|
1159
1159
|
}, []), /* @__PURE__ */ f(
|
|
1160
|
-
|
|
1160
|
+
rt,
|
|
1161
1161
|
{
|
|
1162
1162
|
...e,
|
|
1163
1163
|
ref: a,
|
|
@@ -1178,11 +1178,11 @@ var ao = c.forwardRef(
|
|
|
1178
1178
|
}
|
|
1179
1179
|
);
|
|
1180
1180
|
}
|
|
1181
|
-
),
|
|
1181
|
+
), so = c.forwardRef(
|
|
1182
1182
|
(e, r) => {
|
|
1183
1183
|
const t = M(V, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
|
|
1184
1184
|
return /* @__PURE__ */ f(
|
|
1185
|
-
|
|
1185
|
+
rt,
|
|
1186
1186
|
{
|
|
1187
1187
|
...e,
|
|
1188
1188
|
ref: r,
|
|
@@ -1201,12 +1201,12 @@ var ao = c.forwardRef(
|
|
|
1201
1201
|
}
|
|
1202
1202
|
);
|
|
1203
1203
|
}
|
|
1204
|
-
),
|
|
1204
|
+
), rt = c.forwardRef(
|
|
1205
1205
|
(e, r) => {
|
|
1206
1206
|
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = M(V, t), u = c.useRef(null), l = L(r, u);
|
|
1207
|
-
return
|
|
1207
|
+
return mn(), /* @__PURE__ */ D(H, { children: [
|
|
1208
1208
|
/* @__PURE__ */ f(
|
|
1209
|
-
|
|
1209
|
+
Mr,
|
|
1210
1210
|
{
|
|
1211
1211
|
asChild: !0,
|
|
1212
1212
|
loop: !0,
|
|
@@ -1214,7 +1214,7 @@ var ao = c.forwardRef(
|
|
|
1214
1214
|
onMountAutoFocus: a,
|
|
1215
1215
|
onUnmountAutoFocus: n,
|
|
1216
1216
|
children: /* @__PURE__ */ f(
|
|
1217
|
-
|
|
1217
|
+
Lr,
|
|
1218
1218
|
{
|
|
1219
1219
|
role: "dialog",
|
|
1220
1220
|
id: i.contentId,
|
|
@@ -1229,28 +1229,28 @@ var ao = c.forwardRef(
|
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
1231
|
/* @__PURE__ */ D(H, { children: [
|
|
1232
|
-
/* @__PURE__ */ f(
|
|
1233
|
-
/* @__PURE__ */ f(
|
|
1232
|
+
/* @__PURE__ */ f(co, { titleId: i.titleId }),
|
|
1233
|
+
/* @__PURE__ */ f(uo, { contentRef: u, descriptionId: i.descriptionId })
|
|
1234
1234
|
] })
|
|
1235
1235
|
] });
|
|
1236
1236
|
}
|
|
1237
|
-
), Xe = "DialogTitle",
|
|
1237
|
+
), Xe = "DialogTitle", tt = c.forwardRef(
|
|
1238
1238
|
(e, r) => {
|
|
1239
1239
|
const { __scopeDialog: t, ...o } = e, a = M(Xe, t);
|
|
1240
1240
|
return /* @__PURE__ */ f(O.h2, { id: a.titleId, ...o, ref: r });
|
|
1241
1241
|
}
|
|
1242
1242
|
);
|
|
1243
|
-
|
|
1244
|
-
var
|
|
1243
|
+
tt.displayName = Xe;
|
|
1244
|
+
var nt = "DialogDescription", ot = c.forwardRef(
|
|
1245
1245
|
(e, r) => {
|
|
1246
|
-
const { __scopeDialog: t, ...o } = e, a = M(
|
|
1246
|
+
const { __scopeDialog: t, ...o } = e, a = M(nt, t);
|
|
1247
1247
|
return /* @__PURE__ */ f(O.p, { id: a.descriptionId, ...o, ref: r });
|
|
1248
1248
|
}
|
|
1249
1249
|
);
|
|
1250
|
-
|
|
1251
|
-
var
|
|
1250
|
+
ot.displayName = nt;
|
|
1251
|
+
var at = "DialogClose", it = c.forwardRef(
|
|
1252
1252
|
(e, r) => {
|
|
1253
|
-
const { __scopeDialog: t, ...o } = e, a = M(
|
|
1253
|
+
const { __scopeDialog: t, ...o } = e, a = M(at, t);
|
|
1254
1254
|
return /* @__PURE__ */ f(
|
|
1255
1255
|
O.button,
|
|
1256
1256
|
{
|
|
@@ -1262,16 +1262,16 @@ var ot = "DialogClose", at = c.forwardRef(
|
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
1264
1264
|
);
|
|
1265
|
-
|
|
1265
|
+
it.displayName = at;
|
|
1266
1266
|
function Ge(e) {
|
|
1267
1267
|
return e ? "open" : "closed";
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1269
|
+
var st = "DialogTitleWarning", [Ka, ct] = Wt(st, {
|
|
1270
1270
|
contentName: V,
|
|
1271
1271
|
titleName: Xe,
|
|
1272
1272
|
docsSlug: "dialog"
|
|
1273
|
-
}),
|
|
1274
|
-
const r = st
|
|
1273
|
+
}), co = ({ titleId: e }) => {
|
|
1274
|
+
const r = ct(st), t = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
1275
1275
|
|
|
1276
1276
|
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1277
1277
|
|
|
@@ -1279,15 +1279,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${r.do
|
|
|
1279
1279
|
return c.useEffect(() => {
|
|
1280
1280
|
e && (document.getElementById(e) || console.error(t));
|
|
1281
1281
|
}, [t, e]), null;
|
|
1282
|
-
},
|
|
1283
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
1282
|
+
}, lo = "DialogDescriptionWarning", uo = ({ contentRef: e, descriptionId: r }) => {
|
|
1283
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ct(lo).contentName}}.`;
|
|
1284
1284
|
return c.useEffect(() => {
|
|
1285
1285
|
var n;
|
|
1286
1286
|
const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
|
|
1287
1287
|
r && a && (document.getElementById(r) || console.warn(o));
|
|
1288
1288
|
}, [o, e, r]), null;
|
|
1289
|
-
},
|
|
1290
|
-
function
|
|
1289
|
+
}, fo = Xr, po = Kr, vo = Qr, ho = Jr, mo = et, ve = tt, go = ot, _o = it;
|
|
1290
|
+
function wo(e) {
|
|
1291
1291
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1292
1292
|
}
|
|
1293
1293
|
var Le = { exports: {} };
|
|
@@ -1296,9 +1296,9 @@ var Le = { exports: {} };
|
|
|
1296
1296
|
Licensed under the MIT License (MIT), see
|
|
1297
1297
|
http://jedwatson.github.io/classnames
|
|
1298
1298
|
*/
|
|
1299
|
-
var
|
|
1300
|
-
function
|
|
1301
|
-
return
|
|
1299
|
+
var hr;
|
|
1300
|
+
function bo() {
|
|
1301
|
+
return hr || (hr = 1, function(e) {
|
|
1302
1302
|
(function() {
|
|
1303
1303
|
var r = {}.hasOwnProperty;
|
|
1304
1304
|
function t() {
|
|
@@ -1329,24 +1329,24 @@ function wo() {
|
|
|
1329
1329
|
})();
|
|
1330
1330
|
}(Le)), Le.exports;
|
|
1331
1331
|
}
|
|
1332
|
-
var
|
|
1333
|
-
const Y = /* @__PURE__ */
|
|
1332
|
+
var yo = bo();
|
|
1333
|
+
const Y = /* @__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
|
-
drawerSmallScreenAnimation:
|
|
1335
|
+
drawerSmallScreenAnimation: Eo,
|
|
1336
1336
|
"purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_5mlbf_16",
|
|
1337
|
-
drawerLargeScreenAnimation:
|
|
1337
|
+
drawerLargeScreenAnimation: Co,
|
|
1338
1338
|
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_5mlbf_43",
|
|
1339
1339
|
"purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-frame_5mlbf_48",
|
|
1340
|
-
slideDown:
|
|
1340
|
+
slideDown: Po,
|
|
1341
1341
|
"purpur-drawer-content__description": "_purpur-drawer-content__description_5mlbf_58",
|
|
1342
1342
|
"purpur-drawer-overlay": "_purpur-drawer-overlay_5mlbf_69",
|
|
1343
|
-
overlayAnimation:
|
|
1344
|
-
},
|
|
1343
|
+
overlayAnimation: No
|
|
1344
|
+
}, Ro = {
|
|
1345
1345
|
"purpur-drawer-container--header": "_purpur-drawer-container--header_1u45h_1",
|
|
1346
1346
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1u45h_10",
|
|
1347
1347
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1u45h_18",
|
|
1348
1348
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1u45h_26"
|
|
1349
|
-
},
|
|
1349
|
+
}, xo = Y.bind(Ro), $e = "purpur-drawer-container", ee = B(
|
|
1350
1350
|
({
|
|
1351
1351
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1352
1352
|
children: r,
|
|
@@ -1355,7 +1355,7 @@ const Y = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "_drawerSmallScre
|
|
|
1355
1355
|
stickyFooter: a,
|
|
1356
1356
|
...n
|
|
1357
1357
|
}, s) => {
|
|
1358
|
-
const i =
|
|
1358
|
+
const i = xo([
|
|
1359
1359
|
t,
|
|
1360
1360
|
$e,
|
|
1361
1361
|
{
|
|
@@ -1369,7 +1369,7 @@ const Y = /* @__PURE__ */ _o(bo), ct = Tt(null), yo = {}, So = "_drawerSmallScre
|
|
|
1369
1369
|
}
|
|
1370
1370
|
);
|
|
1371
1371
|
ee.displayName = "DrawerContainer";
|
|
1372
|
-
const
|
|
1372
|
+
const Do = {
|
|
1373
1373
|
"purpur-drawer-frame": "_purpur-drawer-frame_1gdvv_1",
|
|
1374
1374
|
"purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_1gdvv_17",
|
|
1375
1375
|
"purpur-drawer-frame__header": "_purpur-drawer-frame__header_1gdvv_20",
|
|
@@ -1378,9 +1378,9 @@ const xo = {
|
|
|
1378
1378
|
"purpur-drawer-frame__footer": "_purpur-drawer-frame__footer_1gdvv_36",
|
|
1379
1379
|
"purpur-drawer-frame__content-container": "_purpur-drawer-frame__content-container_1gdvv_39",
|
|
1380
1380
|
"purpur-drawer-frame__content-container--no-footer": "_purpur-drawer-frame__content-container--no-footer_1gdvv_44"
|
|
1381
|
-
},
|
|
1381
|
+
}, To = {
|
|
1382
1382
|
"purpur-drawer-handle": "_purpur-drawer-handle_3n0ew_1"
|
|
1383
|
-
},
|
|
1383
|
+
}, Oo = (e, r, t, o, a, n) => ({
|
|
1384
1384
|
onPointerDown: (l) => {
|
|
1385
1385
|
e.current = { y: l.clientY };
|
|
1386
1386
|
},
|
|
@@ -1388,18 +1388,18 @@ const xo = {
|
|
|
1388
1388
|
if (!e.current)
|
|
1389
1389
|
return;
|
|
1390
1390
|
const d = l.clientY - e.current.y, p = !!r.current, v = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2, w = { y: v }, h = { originalEvent: l, delta: w };
|
|
1391
|
-
p ? (r.current = w, o(h)) :
|
|
1391
|
+
p ? (r.current = w, o(h)) : mr(w, 0) ? (r.current = w, t(), l.target.setPointerCapture(l.pointerId)) : Math.abs(d) > m && (e.current = null);
|
|
1392
1392
|
},
|
|
1393
1393
|
onPointerUp: (l) => {
|
|
1394
1394
|
const d = r.current, p = l.target;
|
|
1395
1395
|
if (p.hasPointerCapture(l.pointerId) && p.releasePointerCapture(l.pointerId), r.current = null, e.current = null, d) {
|
|
1396
1396
|
const v = l.currentTarget, m = { originalEvent: l, delta: d };
|
|
1397
|
-
|
|
1397
|
+
mr(d, 0) && d.y > 200 ? n(m) : a(), v.addEventListener("click", (w) => w.preventDefault(), {
|
|
1398
1398
|
once: !0
|
|
1399
1399
|
});
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
-
}),
|
|
1402
|
+
}), mr = (e, r = 0) => Math.abs(e.y) > r, Lo = Y.bind(To), $o = "purpur-drawer-handle", ut = B(
|
|
1403
1403
|
({
|
|
1404
1404
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1405
1405
|
className: r,
|
|
@@ -1409,7 +1409,7 @@ const xo = {
|
|
|
1409
1409
|
onSwipeEnd: n,
|
|
1410
1410
|
...s
|
|
1411
1411
|
}, i) => {
|
|
1412
|
-
const u =
|
|
1412
|
+
const u = Lo([r, $o]), l = Ie.useRef(null), d = Ie.useRef(null), { onPointerDown: p, onPointerMove: v, onPointerUp: m } = Oo(
|
|
1413
1413
|
d,
|
|
1414
1414
|
l,
|
|
1415
1415
|
t,
|
|
@@ -1431,43 +1431,43 @@ const xo = {
|
|
|
1431
1431
|
);
|
|
1432
1432
|
}
|
|
1433
1433
|
);
|
|
1434
|
-
|
|
1435
|
-
const
|
|
1434
|
+
ut.displayName = "DrawerHandle";
|
|
1435
|
+
const Mo = {
|
|
1436
1436
|
LG: "lg"
|
|
1437
1437
|
};
|
|
1438
|
-
function
|
|
1438
|
+
function Io(e) {
|
|
1439
1439
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1440
1440
|
}
|
|
1441
|
-
var
|
|
1441
|
+
var gr = { exports: {} };
|
|
1442
1442
|
/*!
|
|
1443
1443
|
Copyright (c) 2018 Jed Watson.
|
|
1444
1444
|
Licensed under the MIT License (MIT), see
|
|
1445
1445
|
http://jedwatson.github.io/classnames
|
|
1446
1446
|
*/
|
|
1447
|
-
var
|
|
1448
|
-
function
|
|
1449
|
-
return
|
|
1447
|
+
var _r;
|
|
1448
|
+
function ko() {
|
|
1449
|
+
return _r || (_r = 1, function(e) {
|
|
1450
1450
|
(function() {
|
|
1451
1451
|
var r = {}.hasOwnProperty;
|
|
1452
1452
|
function t() {
|
|
1453
1453
|
for (var n = "", s = 0; s < arguments.length; s++) {
|
|
1454
1454
|
var i = arguments[s];
|
|
1455
|
-
i && (n = a(n, o(i)));
|
|
1455
|
+
i && (n = a(n, o.call(this, i)));
|
|
1456
1456
|
}
|
|
1457
1457
|
return n;
|
|
1458
1458
|
}
|
|
1459
1459
|
function o(n) {
|
|
1460
1460
|
if (typeof n == "string" || typeof n == "number")
|
|
1461
|
-
return n;
|
|
1461
|
+
return this && this[n] || n;
|
|
1462
1462
|
if (typeof n != "object")
|
|
1463
1463
|
return "";
|
|
1464
1464
|
if (Array.isArray(n))
|
|
1465
|
-
return t.apply(
|
|
1465
|
+
return t.apply(this, n);
|
|
1466
1466
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
1467
1467
|
return n.toString();
|
|
1468
1468
|
var s = "";
|
|
1469
1469
|
for (var i in n)
|
|
1470
|
-
r.call(n, i) && n[i] && (s = a(s, i));
|
|
1470
|
+
r.call(n, i) && n[i] && (s = a(s, this && this[i] || i));
|
|
1471
1471
|
return s;
|
|
1472
1472
|
}
|
|
1473
1473
|
function a(n, s) {
|
|
@@ -1475,61 +1475,52 @@ function Io() {
|
|
|
1475
1475
|
}
|
|
1476
1476
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1477
1477
|
})();
|
|
1478
|
-
}(
|
|
1478
|
+
}(gr)), gr.exports;
|
|
1479
1479
|
}
|
|
1480
|
-
var
|
|
1481
|
-
const
|
|
1480
|
+
var Wo = ko();
|
|
1481
|
+
const Fo = /* @__PURE__ */ Io(Wo), Uo = "_rotate_12t9p_1", qo = "_dash_12t9p_1", Ho = {
|
|
1482
1482
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1483
|
-
rotate:
|
|
1483
|
+
rotate: Uo,
|
|
1484
1484
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1485
1485
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1486
1486
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
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: qo,
|
|
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
|
-
}, oe = "purpur-spinner",
|
|
1493
|
+
}, wr = Fo.bind(Ho), oe = "purpur-spinner", Bo = {
|
|
1494
1494
|
SM: "sm"
|
|
1495
|
-
},
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
"div",
|
|
1495
|
+
}, jo = ({
|
|
1496
|
+
disabled: e = !1,
|
|
1497
|
+
negative: r = !1,
|
|
1498
|
+
size: t = Bo.SM,
|
|
1499
|
+
...o
|
|
1500
|
+
}) => /* @__PURE__ */ f("div", { className: wr(oe, `${oe}--${t}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1501
|
+
"circle",
|
|
1503
1502
|
{
|
|
1504
|
-
className:
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
[ne[`${oe}__circle--disabled`]]: r,
|
|
1512
|
-
[ne[`${oe}__circle--negative`]]: t
|
|
1513
|
-
}),
|
|
1514
|
-
cx: "25",
|
|
1515
|
-
cy: "25",
|
|
1516
|
-
r: "20"
|
|
1517
|
-
}
|
|
1518
|
-
) })
|
|
1503
|
+
className: wr(`${oe}__circle`, {
|
|
1504
|
+
[`${oe}__circle--disabled`]: e,
|
|
1505
|
+
[`${oe}__circle--negative`]: r
|
|
1506
|
+
}),
|
|
1507
|
+
cx: "25",
|
|
1508
|
+
cy: "25",
|
|
1509
|
+
r: "20"
|
|
1519
1510
|
}
|
|
1520
|
-
);
|
|
1521
|
-
function
|
|
1511
|
+
) }) });
|
|
1512
|
+
function zo(e) {
|
|
1522
1513
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1523
1514
|
}
|
|
1524
|
-
var
|
|
1515
|
+
var br = { exports: {} };
|
|
1525
1516
|
/*!
|
|
1526
1517
|
Copyright (c) 2018 Jed Watson.
|
|
1527
1518
|
Licensed under the MIT License (MIT), see
|
|
1528
1519
|
http://jedwatson.github.io/classnames
|
|
1529
1520
|
*/
|
|
1530
|
-
var
|
|
1531
|
-
function
|
|
1532
|
-
return
|
|
1521
|
+
var yr;
|
|
1522
|
+
function Vo() {
|
|
1523
|
+
return yr || (yr = 1, function(e) {
|
|
1533
1524
|
(function() {
|
|
1534
1525
|
var r = {}.hasOwnProperty;
|
|
1535
1526
|
function t() {
|
|
@@ -1558,10 +1549,10 @@ function Bo() {
|
|
|
1558
1549
|
}
|
|
1559
1550
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1560
1551
|
})();
|
|
1561
|
-
}(
|
|
1552
|
+
}(br)), br.exports;
|
|
1562
1553
|
}
|
|
1563
|
-
var
|
|
1564
|
-
const
|
|
1554
|
+
var Yo = Vo();
|
|
1555
|
+
const Xo = /* @__PURE__ */ zo(Yo), Go = {
|
|
1565
1556
|
"purpur-button": "_purpur-button_w455q_1",
|
|
1566
1557
|
"purpur-button--xs": "_purpur-button--xs_w455q_33",
|
|
1567
1558
|
"purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
|
|
@@ -1586,70 +1577,77 @@ const zo = /* @__PURE__ */ Ho(jo), Vo = {
|
|
|
1586
1577
|
}, Me = {
|
|
1587
1578
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1588
1579
|
TEXT: "text"
|
|
1589
|
-
},
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
},
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1580
|
+
}, Ko = Xo.bind(Go), z = "purpur-button", Ue = B(
|
|
1581
|
+
({
|
|
1582
|
+
children: e,
|
|
1583
|
+
className: r,
|
|
1584
|
+
disabled: t = !1,
|
|
1585
|
+
fullWidth: o = !1,
|
|
1586
|
+
iconOnly: a,
|
|
1587
|
+
loading: n = !1,
|
|
1588
|
+
negative: s = !1,
|
|
1589
|
+
onClick: i,
|
|
1590
|
+
size: u = "md",
|
|
1591
|
+
variant: l,
|
|
1592
|
+
type: d = "button",
|
|
1593
|
+
...p
|
|
1594
|
+
}, v) => {
|
|
1595
|
+
if (a && l === "destructive")
|
|
1596
|
+
return null;
|
|
1597
|
+
const m = Ko(
|
|
1598
|
+
[
|
|
1599
|
+
z,
|
|
1600
|
+
`${z}--${s ? `${l}-negative` : l}`,
|
|
1601
|
+
`${z}--${u}`
|
|
1602
|
+
],
|
|
1603
|
+
{
|
|
1604
|
+
[`${z}--icon-only`]: a,
|
|
1605
|
+
[`${z}--negative`]: s,
|
|
1606
|
+
[`${z}--full-width`]: o,
|
|
1607
|
+
[`${z}--disabled`]: t || n
|
|
1608
|
+
},
|
|
1609
|
+
r
|
|
1610
|
+
), w = (g) => {
|
|
1611
|
+
t || n ? g.preventDefault() : i && i(g);
|
|
1612
|
+
}, h = !!p["aria-disabled"] || t || n;
|
|
1613
|
+
return /* @__PURE__ */ D(
|
|
1614
|
+
"button",
|
|
1615
|
+
{
|
|
1616
|
+
className: m,
|
|
1617
|
+
type: d,
|
|
1618
|
+
ref: v,
|
|
1619
|
+
"aria-disabled": h,
|
|
1620
|
+
onClick: w,
|
|
1621
|
+
...p,
|
|
1622
|
+
children: [
|
|
1623
|
+
n && /* @__PURE__ */ f(
|
|
1624
|
+
jo,
|
|
1625
|
+
{
|
|
1626
|
+
size: u === Mo.LG ? "xs" : "xxs",
|
|
1627
|
+
negative: s,
|
|
1628
|
+
disabled: h
|
|
1629
|
+
}
|
|
1630
|
+
),
|
|
1631
|
+
" ",
|
|
1632
|
+
e
|
|
1633
|
+
]
|
|
1634
|
+
}
|
|
1635
|
+
);
|
|
1636
|
+
}
|
|
1637
|
+
);
|
|
1640
1638
|
Ue.displayName = "Button";
|
|
1641
|
-
function
|
|
1639
|
+
function Zo(e) {
|
|
1642
1640
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1643
1641
|
}
|
|
1644
|
-
var
|
|
1642
|
+
var Sr = { exports: {} };
|
|
1645
1643
|
/*!
|
|
1646
1644
|
Copyright (c) 2018 Jed Watson.
|
|
1647
1645
|
Licensed under the MIT License (MIT), see
|
|
1648
1646
|
http://jedwatson.github.io/classnames
|
|
1649
1647
|
*/
|
|
1650
|
-
var
|
|
1651
|
-
function
|
|
1652
|
-
return
|
|
1648
|
+
var Er;
|
|
1649
|
+
function Qo() {
|
|
1650
|
+
return Er || (Er = 1, function(e) {
|
|
1653
1651
|
(function() {
|
|
1654
1652
|
var r = {}.hasOwnProperty;
|
|
1655
1653
|
function t() {
|
|
@@ -1678,10 +1676,10 @@ function Ko() {
|
|
|
1678
1676
|
}
|
|
1679
1677
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1680
1678
|
})();
|
|
1681
|
-
}(
|
|
1679
|
+
}(Sr)), Sr.exports;
|
|
1682
1680
|
}
|
|
1683
|
-
var
|
|
1684
|
-
const
|
|
1681
|
+
var Jo = Qo();
|
|
1682
|
+
const ea = /* @__PURE__ */ Zo(Jo), he = {
|
|
1685
1683
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1686
1684
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1687
1685
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1709,7 +1707,7 @@ const Qo = /* @__PURE__ */ Go(Zo), he = {
|
|
|
1709
1707
|
variant: n = qe.TITLE100,
|
|
1710
1708
|
...s
|
|
1711
1709
|
}) => {
|
|
1712
|
-
const i = a, u =
|
|
1710
|
+
const i = a, u = ea([
|
|
1713
1711
|
r,
|
|
1714
1712
|
he[me],
|
|
1715
1713
|
he[`${me}--${n}`],
|
|
@@ -1721,18 +1719,18 @@ const Qo = /* @__PURE__ */ Go(Zo), he = {
|
|
|
1721
1719
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1722
1720
|
};
|
|
1723
1721
|
He.displayName = "Heading";
|
|
1724
|
-
function
|
|
1722
|
+
function ra(e) {
|
|
1725
1723
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1726
1724
|
}
|
|
1727
|
-
var
|
|
1725
|
+
var Cr = { exports: {} };
|
|
1728
1726
|
/*!
|
|
1729
1727
|
Copyright (c) 2018 Jed Watson.
|
|
1730
1728
|
Licensed under the MIT License (MIT), see
|
|
1731
1729
|
http://jedwatson.github.io/classnames
|
|
1732
1730
|
*/
|
|
1733
|
-
var
|
|
1734
|
-
function
|
|
1735
|
-
return
|
|
1731
|
+
var Pr;
|
|
1732
|
+
function ta() {
|
|
1733
|
+
return Pr || (Pr = 1, function(e) {
|
|
1736
1734
|
(function() {
|
|
1737
1735
|
var r = {}.hasOwnProperty;
|
|
1738
1736
|
function t() {
|
|
@@ -1761,10 +1759,10 @@ function ea() {
|
|
|
1761
1759
|
}
|
|
1762
1760
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1763
1761
|
})();
|
|
1764
|
-
}(
|
|
1762
|
+
}(Cr)), Cr.exports;
|
|
1765
1763
|
}
|
|
1766
|
-
var
|
|
1767
|
-
const
|
|
1764
|
+
var na = ta();
|
|
1765
|
+
const oa = /* @__PURE__ */ ra(na), aa = {
|
|
1768
1766
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1769
1767
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1770
1768
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1772,95 +1770,80 @@ const ta = /* @__PURE__ */ Jo(ra), na = {
|
|
|
1772
1770
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1773
1771
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1774
1772
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1775
|
-
},
|
|
1773
|
+
}, ia = oa.bind(aa), Nr = "purpur-icon", sa = "md", ca = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), la = ({ content: e = "", title: r } = {}) => {
|
|
1776
1774
|
const t = [
|
|
1777
1775
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1778
1776
|
{ name: "fill", value: "currentColor" },
|
|
1779
1777
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1780
1778
|
r ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1781
1779
|
], o = r ? `<title>${r}</title>` : "";
|
|
1782
|
-
return `<svg ${
|
|
1783
|
-
},
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
...n
|
|
1790
|
-
}) => {
|
|
1791
|
-
const s = sa({
|
|
1792
|
-
content: ca(r.svg),
|
|
1793
|
-
title: t
|
|
1794
|
-
}), i = oa(o, Pr, `${Pr}--${a}`);
|
|
1795
|
-
return /* @__PURE__ */ f(
|
|
1796
|
-
"span",
|
|
1797
|
-
{
|
|
1798
|
-
className: i,
|
|
1799
|
-
"data-testid": e,
|
|
1800
|
-
dangerouslySetInnerHTML: { __html: s },
|
|
1801
|
-
...n
|
|
1802
|
-
}
|
|
1803
|
-
);
|
|
1780
|
+
return `<svg ${ca(t)}>${o}${e}</svg>`;
|
|
1781
|
+
}, ua = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ke = ({ svg: e, allyTitle: r, className: t, size: o = sa, ...a }) => {
|
|
1782
|
+
const n = la({
|
|
1783
|
+
content: ua(e.svg),
|
|
1784
|
+
title: r
|
|
1785
|
+
}), s = ia(t, Nr, `${Nr}--${o}`);
|
|
1786
|
+
return /* @__PURE__ */ f("span", { className: s, dangerouslySetInnerHTML: { __html: n }, ...a });
|
|
1804
1787
|
};
|
|
1805
1788
|
Ke.displayName = "Icon";
|
|
1806
|
-
const
|
|
1789
|
+
const da = {
|
|
1807
1790
|
name: "arrow-left",
|
|
1808
1791
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 12a.9.9 0 0 1 .264-.636l5.5-5.5a.9.9 0 0 1 1.272 1.272L6.173 11.1H20a.9.9 0 0 1 0 1.8H6.173l3.963 3.964a.9.9 0 1 1-1.272 1.272l-5.5-5.5A.9.9 0 0 1 3.1 12Z" clip-rule="evenodd"/></svg>',
|
|
1809
1792
|
keywords: ["arrow-left"],
|
|
1810
1793
|
category: "utility"
|
|
1811
|
-
},
|
|
1812
|
-
|
|
1813
|
-
const
|
|
1794
|
+
}, dt = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: da });
|
|
1795
|
+
dt.displayName = "IconArrowLeft";
|
|
1796
|
+
const fa = {
|
|
1814
1797
|
name: "close",
|
|
1815
1798
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
1816
1799
|
keywords: ["close"],
|
|
1817
1800
|
category: "utility"
|
|
1818
|
-
},
|
|
1819
|
-
|
|
1820
|
-
function
|
|
1801
|
+
}, ft = (e) => /* @__PURE__ */ f(Ke, { ...e, svg: fa });
|
|
1802
|
+
ft.displayName = "IconClose";
|
|
1803
|
+
function Ar(e, r) {
|
|
1821
1804
|
if (typeof e == "function")
|
|
1822
1805
|
return e(r);
|
|
1823
1806
|
e != null && (e.current = r);
|
|
1824
1807
|
}
|
|
1825
|
-
function
|
|
1808
|
+
function pa(...e) {
|
|
1826
1809
|
return (r) => {
|
|
1827
1810
|
let t = !1;
|
|
1828
1811
|
const o = e.map((a) => {
|
|
1829
|
-
const n =
|
|
1812
|
+
const n = Ar(a, r);
|
|
1830
1813
|
return !t && typeof n == "function" && (t = !0), n;
|
|
1831
1814
|
});
|
|
1832
1815
|
if (t)
|
|
1833
1816
|
return () => {
|
|
1834
1817
|
for (let a = 0; a < o.length; a++) {
|
|
1835
1818
|
const n = o[a];
|
|
1836
|
-
typeof n == "function" ? n() :
|
|
1819
|
+
typeof n == "function" ? n() : Ar(e[a], null);
|
|
1837
1820
|
}
|
|
1838
1821
|
};
|
|
1839
1822
|
};
|
|
1840
1823
|
}
|
|
1841
|
-
var
|
|
1842
|
-
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(
|
|
1824
|
+
var pt = c.forwardRef((e, r) => {
|
|
1825
|
+
const { children: t, ...o } = e, a = c.Children.toArray(t), n = a.find(ha);
|
|
1843
1826
|
if (n) {
|
|
1844
1827
|
const s = n.props.children, i = a.map((u) => u === n ? c.Children.count(s) > 1 ? c.Children.only(null) : c.isValidElement(s) ? s.props.children : null : u);
|
|
1845
1828
|
return /* @__PURE__ */ f(Be, { ...o, ref: r, children: c.isValidElement(s) ? c.cloneElement(s, void 0, i) : null });
|
|
1846
1829
|
}
|
|
1847
1830
|
return /* @__PURE__ */ f(Be, { ...o, ref: r, children: t });
|
|
1848
1831
|
});
|
|
1849
|
-
|
|
1832
|
+
pt.displayName = "Slot";
|
|
1850
1833
|
var Be = c.forwardRef((e, r) => {
|
|
1851
1834
|
const { children: t, ...o } = e;
|
|
1852
1835
|
if (c.isValidElement(t)) {
|
|
1853
|
-
const a =
|
|
1854
|
-
return t.type !== c.Fragment && (n.ref = r ?
|
|
1836
|
+
const a = ga(t), n = ma(o, t.props);
|
|
1837
|
+
return t.type !== c.Fragment && (n.ref = r ? pa(r, a) : a), c.cloneElement(t, n);
|
|
1855
1838
|
}
|
|
1856
1839
|
return c.Children.count(t) > 1 ? c.Children.only(null) : null;
|
|
1857
1840
|
});
|
|
1858
1841
|
Be.displayName = "SlotClone";
|
|
1859
|
-
var
|
|
1860
|
-
function
|
|
1861
|
-
return c.isValidElement(e) && e.type ===
|
|
1842
|
+
var va = ({ children: e }) => /* @__PURE__ */ f(H, { children: e });
|
|
1843
|
+
function ha(e) {
|
|
1844
|
+
return c.isValidElement(e) && e.type === va;
|
|
1862
1845
|
}
|
|
1863
|
-
function
|
|
1846
|
+
function ma(e, r) {
|
|
1864
1847
|
const t = { ...r };
|
|
1865
1848
|
for (const o in r) {
|
|
1866
1849
|
const a = e[o], n = r[o];
|
|
@@ -1870,12 +1853,12 @@ function va(e, r) {
|
|
|
1870
1853
|
}
|
|
1871
1854
|
return { ...e, ...t };
|
|
1872
1855
|
}
|
|
1873
|
-
function
|
|
1856
|
+
function ga(e) {
|
|
1874
1857
|
var r, t;
|
|
1875
1858
|
let o = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning;
|
|
1876
1859
|
return a ? e.ref : (o = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
|
|
1877
1860
|
}
|
|
1878
|
-
var
|
|
1861
|
+
var _a = [
|
|
1879
1862
|
"a",
|
|
1880
1863
|
"button",
|
|
1881
1864
|
"div",
|
|
@@ -1892,15 +1875,15 @@ var ma = [
|
|
|
1892
1875
|
"span",
|
|
1893
1876
|
"svg",
|
|
1894
1877
|
"ul"
|
|
1895
|
-
],
|
|
1878
|
+
], wa = _a.reduce((e, r) => {
|
|
1896
1879
|
const t = c.forwardRef((o, a) => {
|
|
1897
|
-
const { asChild: n, ...s } = o, i = n ?
|
|
1880
|
+
const { asChild: n, ...s } = o, i = n ? pt : r;
|
|
1898
1881
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...s, ref: a });
|
|
1899
1882
|
});
|
|
1900
1883
|
return t.displayName = `Primitive.${r}`, { ...e, [r]: t };
|
|
1901
|
-
}, {}),
|
|
1884
|
+
}, {}), ba = "VisuallyHidden", vt = c.forwardRef(
|
|
1902
1885
|
(e, r) => /* @__PURE__ */ f(
|
|
1903
|
-
|
|
1886
|
+
wa.span,
|
|
1904
1887
|
{
|
|
1905
1888
|
...e,
|
|
1906
1889
|
ref: r,
|
|
@@ -1921,21 +1904,16 @@ var ma = [
|
|
|
1921
1904
|
}
|
|
1922
1905
|
)
|
|
1923
1906
|
);
|
|
1924
|
-
|
|
1925
|
-
var
|
|
1926
|
-
const
|
|
1927
|
-
asChild: e,
|
|
1928
|
-
children: r,
|
|
1929
|
-
className: t = "",
|
|
1930
|
-
["data-testid"]: o
|
|
1931
|
-
}) => /* @__PURE__ */ f(wa, { asChild: e, "data-testid": o, className: t, children: r }), ba = {
|
|
1907
|
+
vt.displayName = ba;
|
|
1908
|
+
var ya = vt;
|
|
1909
|
+
const Rr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(ya, { asChild: e, ...t, children: r }), Sa = {
|
|
1932
1910
|
"purpur-drawer-header__row": "_purpur-drawer-header__row_1yg5w_1",
|
|
1933
1911
|
"purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-button_1yg5w_6",
|
|
1934
1912
|
"purpur-drawer-header__left": "_purpur-drawer-header__left_1yg5w_9",
|
|
1935
1913
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1936
1914
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1937
1915
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1938
|
-
}, Z = Y.bind(
|
|
1916
|
+
}, Z = Y.bind(Sa), U = "purpur-drawer-header", ht = B(
|
|
1939
1917
|
({
|
|
1940
1918
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1941
1919
|
backButton: r,
|
|
@@ -1977,23 +1955,24 @@ const Ar = ({
|
|
|
1977
1955
|
size: "sm",
|
|
1978
1956
|
variant: o ? Me.TERTIARY_PURPLE : Me.TEXT,
|
|
1979
1957
|
children: [
|
|
1980
|
-
/* @__PURE__ */ f(
|
|
1958
|
+
/* @__PURE__ */ f(dt, { size: "sm" }),
|
|
1981
1959
|
!o && t
|
|
1982
1960
|
]
|
|
1983
1961
|
}
|
|
1984
1962
|
) : s ? /* @__PURE__ */ D(H, { children: [
|
|
1985
1963
|
s,
|
|
1986
|
-
/* @__PURE__ */ f(
|
|
1964
|
+
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
1987
1965
|
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1988
1966
|
He,
|
|
1989
1967
|
{
|
|
1990
1968
|
"data-testid": `${e}-title`,
|
|
1991
1969
|
tag: "h2",
|
|
1992
1970
|
variant: qe.TITLE200,
|
|
1971
|
+
tabIndex: -1,
|
|
1993
1972
|
children: u
|
|
1994
1973
|
}
|
|
1995
1974
|
) }) }),
|
|
1996
|
-
/* @__PURE__ */ f("div", { className: Z(`${U}__right`), children: /* @__PURE__ */ f(
|
|
1975
|
+
/* @__PURE__ */ f("div", { className: Z(`${U}__right`), children: /* @__PURE__ */ f(_o, { asChild: !0, children: /* @__PURE__ */ f(
|
|
1997
1976
|
Ue,
|
|
1998
1977
|
{
|
|
1999
1978
|
"aria-label": n,
|
|
@@ -2001,7 +1980,7 @@ const Ar = ({
|
|
|
2001
1980
|
iconOnly: !0,
|
|
2002
1981
|
size: "sm",
|
|
2003
1982
|
variant: Me.TERTIARY_PURPLE,
|
|
2004
|
-
children: /* @__PURE__ */ f(
|
|
1983
|
+
children: /* @__PURE__ */ f(ft, { size: "sm" })
|
|
2005
1984
|
}
|
|
2006
1985
|
) }) })
|
|
2007
1986
|
]
|
|
@@ -2009,12 +1988,13 @@ const Ar = ({
|
|
|
2009
1988
|
),
|
|
2010
1989
|
r && t && i && (s ? /* @__PURE__ */ D(H, { children: [
|
|
2011
1990
|
s,
|
|
2012
|
-
/* @__PURE__ */ f(
|
|
1991
|
+
/* @__PURE__ */ f(Rr, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
2013
1992
|
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2014
1993
|
He,
|
|
2015
1994
|
{
|
|
2016
1995
|
"data-testid": `${e}-title-with-back-button`,
|
|
2017
1996
|
tag: "h2",
|
|
1997
|
+
tabIndex: -1,
|
|
2018
1998
|
variant: qe.TITLE200,
|
|
2019
1999
|
children: u
|
|
2020
2000
|
}
|
|
@@ -2022,19 +2002,19 @@ const Ar = ({
|
|
|
2022
2002
|
] });
|
|
2023
2003
|
}
|
|
2024
2004
|
);
|
|
2025
|
-
|
|
2026
|
-
var
|
|
2027
|
-
function
|
|
2028
|
-
const r = c.useContext(
|
|
2005
|
+
ht.displayName = "DrawerHeader";
|
|
2006
|
+
var Ea = c.createContext(void 0);
|
|
2007
|
+
function Ca(e) {
|
|
2008
|
+
const r = c.useContext(Ea);
|
|
2029
2009
|
return e || r || "ltr";
|
|
2030
2010
|
}
|
|
2031
|
-
function
|
|
2011
|
+
function Pa(e, [r, t]) {
|
|
2032
2012
|
return Math.min(t, Math.max(r, e));
|
|
2033
2013
|
}
|
|
2034
|
-
function
|
|
2014
|
+
function Na(e, r) {
|
|
2035
2015
|
return c.useReducer((t, o) => r[t][o] ?? t, e);
|
|
2036
2016
|
}
|
|
2037
|
-
var Ze = "ScrollArea", [
|
|
2017
|
+
var Ze = "ScrollArea", [mt, Za] = Tr(Ze), [Aa, $] = mt(Ze), gt = c.forwardRef(
|
|
2038
2018
|
(e, r) => {
|
|
2039
2019
|
const {
|
|
2040
2020
|
__scopeScrollArea: t,
|
|
@@ -2042,9 +2022,9 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2042
2022
|
dir: a,
|
|
2043
2023
|
scrollHideDelay: n = 600,
|
|
2044
2024
|
...s
|
|
2045
|
-
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, v] = c.useState(null), [m, w] = c.useState(null), [h,
|
|
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, (F) => u(F)), A = Ca(a);
|
|
2046
2026
|
return /* @__PURE__ */ f(
|
|
2047
|
-
|
|
2027
|
+
Aa,
|
|
2048
2028
|
{
|
|
2049
2029
|
scope: t,
|
|
2050
2030
|
type: o,
|
|
@@ -2060,7 +2040,7 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2060
2040
|
scrollbarXEnabled: C,
|
|
2061
2041
|
onScrollbarXEnabledChange: N,
|
|
2062
2042
|
scrollbarY: h,
|
|
2063
|
-
onScrollbarYChange:
|
|
2043
|
+
onScrollbarYChange: g,
|
|
2064
2044
|
scrollbarYEnabled: S,
|
|
2065
2045
|
onScrollbarYEnabledChange: R,
|
|
2066
2046
|
onCornerWidthChange: E,
|
|
@@ -2074,7 +2054,7 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2074
2054
|
style: {
|
|
2075
2055
|
position: "relative",
|
|
2076
2056
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
2077
|
-
"--radix-scroll-area-corner-width":
|
|
2057
|
+
"--radix-scroll-area-corner-width": _ + "px",
|
|
2078
2058
|
"--radix-scroll-area-corner-height": b + "px",
|
|
2079
2059
|
...e.style
|
|
2080
2060
|
}
|
|
@@ -2084,10 +2064,10 @@ var Ze = "ScrollArea", [ht, Ka] = Dr(Ze), [Pa, $] = ht(Ze), mt = c.forwardRef(
|
|
|
2084
2064
|
);
|
|
2085
2065
|
}
|
|
2086
2066
|
);
|
|
2087
|
-
|
|
2088
|
-
var
|
|
2067
|
+
gt.displayName = Ze;
|
|
2068
|
+
var _t = "ScrollAreaViewport", wt = c.forwardRef(
|
|
2089
2069
|
(e, r) => {
|
|
2090
|
-
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(
|
|
2070
|
+
const { __scopeScrollArea: t, children: o, nonce: a, ...n } = e, s = $(_t, t), i = c.useRef(null), u = L(r, i, s.onViewportChange);
|
|
2091
2071
|
return /* @__PURE__ */ D(H, { children: [
|
|
2092
2072
|
/* @__PURE__ */ f(
|
|
2093
2073
|
"style",
|
|
@@ -2126,17 +2106,17 @@ var gt = "ScrollAreaViewport", _t = c.forwardRef(
|
|
|
2126
2106
|
] });
|
|
2127
2107
|
}
|
|
2128
2108
|
);
|
|
2129
|
-
|
|
2130
|
-
var k = "ScrollAreaScrollbar",
|
|
2109
|
+
wt.displayName = _t;
|
|
2110
|
+
var k = "ScrollAreaScrollbar", bt = c.forwardRef(
|
|
2131
2111
|
(e, r) => {
|
|
2132
2112
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2133
2113
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2134
2114
|
i ? n(!1) : s(!1);
|
|
2135
|
-
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(
|
|
2115
|
+
}), [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;
|
|
2136
2116
|
}
|
|
2137
2117
|
);
|
|
2138
|
-
|
|
2139
|
-
var
|
|
2118
|
+
bt.displayName = k;
|
|
2119
|
+
var Ra = c.forwardRef((e, r) => {
|
|
2140
2120
|
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2141
2121
|
return c.useEffect(() => {
|
|
2142
2122
|
const i = a.scrollArea;
|
|
@@ -2152,15 +2132,15 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2152
2132
|
};
|
|
2153
2133
|
}
|
|
2154
2134
|
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(j, { present: t || n, children: /* @__PURE__ */ f(
|
|
2155
|
-
|
|
2135
|
+
yt,
|
|
2156
2136
|
{
|
|
2157
2137
|
"data-state": n ? "visible" : "hidden",
|
|
2158
2138
|
...o,
|
|
2159
2139
|
ref: r
|
|
2160
2140
|
}
|
|
2161
2141
|
) });
|
|
2162
|
-
}),
|
|
2163
|
-
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Ce(() => u("SCROLL_END"), 100), [i, u] =
|
|
2142
|
+
}), xa = c.forwardRef((e, r) => {
|
|
2143
|
+
const { forceMount: t, ...o } = e, a = $(k, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Ce(() => u("SCROLL_END"), 100), [i, u] = Na("hidden", {
|
|
2164
2144
|
hidden: {
|
|
2165
2145
|
SCROLL: "scrolling"
|
|
2166
2146
|
},
|
|
@@ -2203,7 +2183,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2203
2183
|
onPointerLeave: x(e.onPointerLeave, () => u("POINTER_LEAVE"))
|
|
2204
2184
|
}
|
|
2205
2185
|
) });
|
|
2206
|
-
}),
|
|
2186
|
+
}), yt = c.forwardRef((e, r) => {
|
|
2207
2187
|
const t = $(k, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, s] = c.useState(!1), i = e.orientation === "horizontal", u = Ce(() => {
|
|
2208
2188
|
if (t.viewport) {
|
|
2209
2189
|
const l = t.viewport.offsetWidth < t.viewport.scrollWidth, d = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
@@ -2223,7 +2203,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2223
2203
|
content: 0,
|
|
2224
2204
|
viewport: 0,
|
|
2225
2205
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
2226
|
-
}), l =
|
|
2206
|
+
}), l = Pt(i.viewport, i.content), d = {
|
|
2227
2207
|
...o,
|
|
2228
2208
|
sizes: i,
|
|
2229
2209
|
onSizesChange: u,
|
|
@@ -2233,16 +2213,16 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2233
2213
|
onThumbPointerDown: (v) => s.current = v
|
|
2234
2214
|
};
|
|
2235
2215
|
function p(v, m) {
|
|
2236
|
-
return
|
|
2216
|
+
return Ia(v, s.current, i, m);
|
|
2237
2217
|
}
|
|
2238
2218
|
return t === "horizontal" ? /* @__PURE__ */ f(
|
|
2239
|
-
|
|
2219
|
+
Da,
|
|
2240
2220
|
{
|
|
2241
2221
|
...d,
|
|
2242
2222
|
ref: r,
|
|
2243
2223
|
onThumbPositionChange: () => {
|
|
2244
2224
|
if (a.viewport && n.current) {
|
|
2245
|
-
const v = a.viewport.scrollLeft, m =
|
|
2225
|
+
const v = a.viewport.scrollLeft, m = xr(v, i, a.dir);
|
|
2246
2226
|
n.current.style.transform = `translate3d(${m}px, 0, 0)`;
|
|
2247
2227
|
}
|
|
2248
2228
|
},
|
|
@@ -2254,13 +2234,13 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2254
2234
|
}
|
|
2255
2235
|
}
|
|
2256
2236
|
) : t === "vertical" ? /* @__PURE__ */ f(
|
|
2257
|
-
|
|
2237
|
+
Ta,
|
|
2258
2238
|
{
|
|
2259
2239
|
...d,
|
|
2260
2240
|
ref: r,
|
|
2261
2241
|
onThumbPositionChange: () => {
|
|
2262
2242
|
if (a.viewport && n.current) {
|
|
2263
|
-
const v = a.viewport.scrollTop, m =
|
|
2243
|
+
const v = a.viewport.scrollTop, m = xr(v, i);
|
|
2264
2244
|
n.current.style.transform = `translate3d(0, ${m}px, 0)`;
|
|
2265
2245
|
}
|
|
2266
2246
|
},
|
|
@@ -2272,12 +2252,12 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2272
2252
|
}
|
|
2273
2253
|
}
|
|
2274
2254
|
) : null;
|
|
2275
|
-
}),
|
|
2255
|
+
}), Da = c.forwardRef((e, r) => {
|
|
2276
2256
|
const { sizes: t, onSizesChange: o, ...a } = e, n = $(k, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarXChange);
|
|
2277
2257
|
return c.useEffect(() => {
|
|
2278
2258
|
u.current && i(getComputedStyle(u.current));
|
|
2279
2259
|
}, [u]), /* @__PURE__ */ f(
|
|
2280
|
-
|
|
2260
|
+
Et,
|
|
2281
2261
|
{
|
|
2282
2262
|
"data-orientation": "horizontal",
|
|
2283
2263
|
...a,
|
|
@@ -2295,7 +2275,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2295
2275
|
onWheelScroll: (d, p) => {
|
|
2296
2276
|
if (n.viewport) {
|
|
2297
2277
|
const v = n.viewport.scrollLeft + d.deltaX;
|
|
2298
|
-
e.onWheelScroll(v),
|
|
2278
|
+
e.onWheelScroll(v), At(v, p) && d.preventDefault();
|
|
2299
2279
|
}
|
|
2300
2280
|
},
|
|
2301
2281
|
onResize: () => {
|
|
@@ -2311,12 +2291,12 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2311
2291
|
}
|
|
2312
2292
|
}
|
|
2313
2293
|
);
|
|
2314
|
-
}),
|
|
2294
|
+
}), Ta = c.forwardRef((e, r) => {
|
|
2315
2295
|
const { sizes: t, onSizesChange: o, ...a } = e, n = $(k, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(r, u, n.onScrollbarYChange);
|
|
2316
2296
|
return c.useEffect(() => {
|
|
2317
2297
|
u.current && i(getComputedStyle(u.current));
|
|
2318
2298
|
}, [u]), /* @__PURE__ */ f(
|
|
2319
|
-
|
|
2299
|
+
Et,
|
|
2320
2300
|
{
|
|
2321
2301
|
"data-orientation": "vertical",
|
|
2322
2302
|
...a,
|
|
@@ -2335,7 +2315,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2335
2315
|
onWheelScroll: (d, p) => {
|
|
2336
2316
|
if (n.viewport) {
|
|
2337
2317
|
const v = n.viewport.scrollTop + d.deltaY;
|
|
2338
|
-
e.onWheelScroll(v),
|
|
2318
|
+
e.onWheelScroll(v), At(v, p) && d.preventDefault();
|
|
2339
2319
|
}
|
|
2340
2320
|
},
|
|
2341
2321
|
onResize: () => {
|
|
@@ -2351,7 +2331,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2351
2331
|
}
|
|
2352
2332
|
}
|
|
2353
2333
|
);
|
|
2354
|
-
}), [
|
|
2334
|
+
}), [Oa, St] = mt(k), Et = c.forwardRef((e, r) => {
|
|
2355
2335
|
const {
|
|
2356
2336
|
__scopeScrollArea: t,
|
|
2357
2337
|
sizes: o,
|
|
@@ -2364,10 +2344,10 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2364
2344
|
onWheelScroll: d,
|
|
2365
2345
|
onResize: p,
|
|
2366
2346
|
...v
|
|
2367
|
-
} = e, m = $(k, t), [w, h] = c.useState(null),
|
|
2347
|
+
} = e, m = $(k, 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);
|
|
2368
2348
|
function R(P) {
|
|
2369
|
-
if (
|
|
2370
|
-
const A = P.clientX -
|
|
2349
|
+
if (_.current) {
|
|
2350
|
+
const A = P.clientX - _.current.left, F = P.clientY - _.current.top;
|
|
2371
2351
|
l({ x: A, y: F });
|
|
2372
2352
|
}
|
|
2373
2353
|
}
|
|
@@ -2378,7 +2358,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2378
2358
|
};
|
|
2379
2359
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2380
2360
|
}, [b, w, y, C]), c.useEffect(N, [o, N]), te(w, S), te(m.content, S), /* @__PURE__ */ f(
|
|
2381
|
-
|
|
2361
|
+
Oa,
|
|
2382
2362
|
{
|
|
2383
2363
|
scope: t,
|
|
2384
2364
|
scrollbar: w,
|
|
@@ -2391,28 +2371,28 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2391
2371
|
O.div,
|
|
2392
2372
|
{
|
|
2393
2373
|
...v,
|
|
2394
|
-
ref:
|
|
2374
|
+
ref: g,
|
|
2395
2375
|
style: { position: "absolute", ...v.style },
|
|
2396
2376
|
onPointerDown: x(e.onPointerDown, (P) => {
|
|
2397
|
-
P.button === 0 && (P.target.setPointerCapture(P.pointerId),
|
|
2377
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), _.current = w.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), R(P));
|
|
2398
2378
|
}),
|
|
2399
2379
|
onPointerMove: x(e.onPointerMove, R),
|
|
2400
2380
|
onPointerUp: x(e.onPointerUp, (P) => {
|
|
2401
2381
|
const A = P.target;
|
|
2402
|
-
A.hasPointerCapture(P.pointerId) && A.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = E.current, m.viewport && (m.viewport.style.scrollBehavior = ""),
|
|
2382
|
+
A.hasPointerCapture(P.pointerId) && A.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = E.current, m.viewport && (m.viewport.style.scrollBehavior = ""), _.current = null;
|
|
2403
2383
|
})
|
|
2404
2384
|
}
|
|
2405
2385
|
)
|
|
2406
2386
|
}
|
|
2407
2387
|
);
|
|
2408
|
-
}), be = "ScrollAreaThumb",
|
|
2388
|
+
}), be = "ScrollAreaThumb", Ct = c.forwardRef(
|
|
2409
2389
|
(e, r) => {
|
|
2410
|
-
const { forceMount: t, ...o } = e, a =
|
|
2411
|
-
return /* @__PURE__ */ f(j, { present: t || a.hasThumb, children: /* @__PURE__ */ f(
|
|
2390
|
+
const { forceMount: t, ...o } = e, a = St(be, e.__scopeScrollArea);
|
|
2391
|
+
return /* @__PURE__ */ f(j, { present: t || a.hasThumb, children: /* @__PURE__ */ f(La, { ref: r, ...o }) });
|
|
2412
2392
|
}
|
|
2413
|
-
),
|
|
2393
|
+
), La = c.forwardRef(
|
|
2414
2394
|
(e, r) => {
|
|
2415
|
-
const { __scopeScrollArea: t, style: o, ...a } = e, n = $(be, t), s =
|
|
2395
|
+
const { __scopeScrollArea: t, style: o, ...a } = e, n = $(be, t), s = St(be, t), { onThumbPositionChange: i } = s, u = L(
|
|
2416
2396
|
r,
|
|
2417
2397
|
(p) => s.onThumbChange(p)
|
|
2418
2398
|
), l = c.useRef(void 0), d = Ce(() => {
|
|
@@ -2423,7 +2403,7 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2423
2403
|
if (p) {
|
|
2424
2404
|
const v = () => {
|
|
2425
2405
|
if (d(), !l.current) {
|
|
2426
|
-
const m =
|
|
2406
|
+
const m = ka(p, i);
|
|
2427
2407
|
l.current = m, i();
|
|
2428
2408
|
}
|
|
2429
2409
|
};
|
|
@@ -2449,15 +2429,15 @@ var Na = c.forwardRef((e, r) => {
|
|
|
2449
2429
|
);
|
|
2450
2430
|
}
|
|
2451
2431
|
);
|
|
2452
|
-
|
|
2453
|
-
var Je = "ScrollAreaCorner",
|
|
2432
|
+
Ct.displayName = be;
|
|
2433
|
+
var Je = "ScrollAreaCorner", $a = c.forwardRef(
|
|
2454
2434
|
(e, r) => {
|
|
2455
2435
|
const t = $(Je, e.__scopeScrollArea), o = !!(t.scrollbarX && t.scrollbarY);
|
|
2456
|
-
return t.type !== "scroll" && o ? /* @__PURE__ */ f(
|
|
2436
|
+
return t.type !== "scroll" && o ? /* @__PURE__ */ f(Ma, { ...e, ref: r }) : null;
|
|
2457
2437
|
}
|
|
2458
2438
|
);
|
|
2459
|
-
|
|
2460
|
-
var
|
|
2439
|
+
$a.displayName = Je;
|
|
2440
|
+
var Ma = c.forwardRef((e, r) => {
|
|
2461
2441
|
const { __scopeScrollArea: t, ...o } = e, a = $(Je, t), [n, s] = c.useState(0), [i, u] = c.useState(0), l = !!(n && i);
|
|
2462
2442
|
return te(a.scrollbarX, () => {
|
|
2463
2443
|
var p;
|
|
@@ -2487,33 +2467,33 @@ var La = c.forwardRef((e, r) => {
|
|
|
2487
2467
|
function ye(e) {
|
|
2488
2468
|
return e ? parseInt(e, 10) : 0;
|
|
2489
2469
|
}
|
|
2490
|
-
function
|
|
2470
|
+
function Pt(e, r) {
|
|
2491
2471
|
const t = e / r;
|
|
2492
2472
|
return isNaN(t) ? 0 : t;
|
|
2493
2473
|
}
|
|
2494
2474
|
function Ee(e) {
|
|
2495
|
-
const r =
|
|
2475
|
+
const r = Pt(e.viewport, e.content), t = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - t) * r;
|
|
2496
2476
|
return Math.max(o, 18);
|
|
2497
2477
|
}
|
|
2498
|
-
function
|
|
2478
|
+
function Ia(e, r, t, o = "ltr") {
|
|
2499
2479
|
const a = Ee(t), n = a / 2, s = r || n, i = a - s, u = t.scrollbar.paddingStart + s, l = t.scrollbar.size - t.scrollbar.paddingEnd - i, d = t.content - t.viewport, p = o === "ltr" ? [0, d] : [d * -1, 0];
|
|
2500
|
-
return
|
|
2480
|
+
return Nt([u, l], p)(e);
|
|
2501
2481
|
}
|
|
2502
|
-
function
|
|
2503
|
-
const o = Ee(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, s = r.content - r.viewport, i = n - o, u = t === "ltr" ? [0, s] : [s * -1, 0], l =
|
|
2504
|
-
return
|
|
2482
|
+
function xr(e, r, t = "ltr") {
|
|
2483
|
+
const o = Ee(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, s = r.content - r.viewport, i = n - o, u = t === "ltr" ? [0, s] : [s * -1, 0], l = Pa(e, u);
|
|
2484
|
+
return Nt([0, s], [0, i])(l);
|
|
2505
2485
|
}
|
|
2506
|
-
function
|
|
2486
|
+
function Nt(e, r) {
|
|
2507
2487
|
return (t) => {
|
|
2508
2488
|
if (e[0] === e[1] || r[0] === r[1]) return r[0];
|
|
2509
2489
|
const o = (r[1] - r[0]) / (e[1] - e[0]);
|
|
2510
2490
|
return r[0] + o * (t - e[0]);
|
|
2511
2491
|
};
|
|
2512
2492
|
}
|
|
2513
|
-
function
|
|
2493
|
+
function At(e, r) {
|
|
2514
2494
|
return e > 0 && e < r;
|
|
2515
2495
|
}
|
|
2516
|
-
var
|
|
2496
|
+
var ka = (e, r = () => {
|
|
2517
2497
|
}) => {
|
|
2518
2498
|
let t = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
|
|
2519
2499
|
return function a() {
|
|
@@ -2541,14 +2521,14 @@ function te(e, r) {
|
|
|
2541
2521
|
}
|
|
2542
2522
|
}, [e, t]);
|
|
2543
2523
|
}
|
|
2544
|
-
var
|
|
2545
|
-
const
|
|
2524
|
+
var Wa = gt, Fa = wt, Ua = bt, qa = Ct;
|
|
2525
|
+
const Ha = {
|
|
2546
2526
|
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1r0fa_1",
|
|
2547
2527
|
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1r0fa_4",
|
|
2548
2528
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1r0fa_10",
|
|
2549
2529
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1r0fa_13",
|
|
2550
2530
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1r0fa_24"
|
|
2551
|
-
}, ae = Y.bind(
|
|
2531
|
+
}, ae = Y.bind(Ha), Q = "purpur-drawer-scroll-area", je = B(
|
|
2552
2532
|
({
|
|
2553
2533
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2554
2534
|
children: r,
|
|
@@ -2558,19 +2538,19 @@ const Ua = {
|
|
|
2558
2538
|
}, n) => {
|
|
2559
2539
|
const s = ae([t, Q]);
|
|
2560
2540
|
return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ D(
|
|
2561
|
-
|
|
2541
|
+
Wa,
|
|
2562
2542
|
{
|
|
2563
2543
|
className: ae(`${Q}__root`, {
|
|
2564
2544
|
[`${Q}__root--fit-to-content`]: o
|
|
2565
2545
|
}),
|
|
2566
2546
|
children: [
|
|
2567
|
-
/* @__PURE__ */ f(
|
|
2547
|
+
/* @__PURE__ */ f(Fa, { className: ae(`${Q}__viewport`), children: r }),
|
|
2568
2548
|
/* @__PURE__ */ f(
|
|
2569
|
-
|
|
2549
|
+
Ua,
|
|
2570
2550
|
{
|
|
2571
2551
|
className: ae(`${Q}__scrollbar`),
|
|
2572
2552
|
orientation: "vertical",
|
|
2573
|
-
children: /* @__PURE__ */ f(
|
|
2553
|
+
children: /* @__PURE__ */ f(qa, { className: ae(`${Q}__thumb`) })
|
|
2574
2554
|
}
|
|
2575
2555
|
)
|
|
2576
2556
|
]
|
|
@@ -2579,7 +2559,7 @@ const Ua = {
|
|
|
2579
2559
|
}
|
|
2580
2560
|
);
|
|
2581
2561
|
je.displayName = "DrawerScrollArea";
|
|
2582
|
-
const J = Y.bind(
|
|
2562
|
+
const J = Y.bind(Do), W = "purpur-drawer-frame", Rt = B(
|
|
2583
2563
|
({
|
|
2584
2564
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2585
2565
|
backButton: r,
|
|
@@ -2597,8 +2577,8 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2597
2577
|
onSwipeMove: m,
|
|
2598
2578
|
onSwipeCancel: w,
|
|
2599
2579
|
onSwipeEnd: h,
|
|
2600
|
-
title:
|
|
2601
|
-
stickyFooter:
|
|
2580
|
+
title: g,
|
|
2581
|
+
stickyFooter: _,
|
|
2602
2582
|
...E
|
|
2603
2583
|
}, b) => {
|
|
2604
2584
|
const y = J([
|
|
@@ -2606,7 +2586,7 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2606
2586
|
W,
|
|
2607
2587
|
{
|
|
2608
2588
|
[`${W}--fit-to-content`]: i,
|
|
2609
|
-
[`${W}--sticky-footer`]:
|
|
2589
|
+
[`${W}--sticky-footer`]: _
|
|
2610
2590
|
}
|
|
2611
2591
|
]);
|
|
2612
2592
|
return /* @__PURE__ */ D(
|
|
@@ -2619,7 +2599,7 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2619
2599
|
...E,
|
|
2620
2600
|
children: [
|
|
2621
2601
|
/* @__PURE__ */ f(
|
|
2622
|
-
|
|
2602
|
+
ut,
|
|
2623
2603
|
{
|
|
2624
2604
|
onSwipeStart: v,
|
|
2625
2605
|
onSwipeMove: m,
|
|
@@ -2632,11 +2612,11 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2632
2612
|
{
|
|
2633
2613
|
className: J(`${W}__header`),
|
|
2634
2614
|
variant: "header",
|
|
2635
|
-
stickyFooter:
|
|
2615
|
+
stickyFooter: _,
|
|
2636
2616
|
children: /* @__PURE__ */ f(
|
|
2637
|
-
|
|
2617
|
+
ht,
|
|
2638
2618
|
{
|
|
2639
|
-
title:
|
|
2619
|
+
title: g,
|
|
2640
2620
|
headerContent: l,
|
|
2641
2621
|
backButtonOnlyIcon: o,
|
|
2642
2622
|
backButton: r,
|
|
@@ -2647,7 +2627,7 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2647
2627
|
)
|
|
2648
2628
|
}
|
|
2649
2629
|
),
|
|
2650
|
-
|
|
2630
|
+
_ ? /* @__PURE__ */ D(H, { children: [
|
|
2651
2631
|
/* @__PURE__ */ f(
|
|
2652
2632
|
je,
|
|
2653
2633
|
{
|
|
@@ -2663,7 +2643,7 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2663
2643
|
className: J(`${W}__footer`),
|
|
2664
2644
|
"data-testid": `${e}-sticky-footer`,
|
|
2665
2645
|
variant: "footer",
|
|
2666
|
-
stickyFooter:
|
|
2646
|
+
stickyFooter: _,
|
|
2667
2647
|
children: u
|
|
2668
2648
|
}
|
|
2669
2649
|
)
|
|
@@ -2681,12 +2661,12 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2681
2661
|
{ [`${W}__content-container--no-footer`]: !u }
|
|
2682
2662
|
]),
|
|
2683
2663
|
children: [
|
|
2684
|
-
/* @__PURE__ */ f(ee, { stickyFooter:
|
|
2664
|
+
/* @__PURE__ */ f(ee, { stickyFooter: _, children: a }),
|
|
2685
2665
|
u && /* @__PURE__ */ f(
|
|
2686
2666
|
ee,
|
|
2687
2667
|
{
|
|
2688
2668
|
"data-testid": `${e}-footer`,
|
|
2689
|
-
stickyFooter:
|
|
2669
|
+
stickyFooter: _,
|
|
2690
2670
|
variant: "footer",
|
|
2691
2671
|
children: u
|
|
2692
2672
|
}
|
|
@@ -2701,8 +2681,8 @@ const J = Y.bind(xo), W = "purpur-drawer-frame", At = B(
|
|
|
2701
2681
|
);
|
|
2702
2682
|
}
|
|
2703
2683
|
);
|
|
2704
|
-
|
|
2705
|
-
const
|
|
2684
|
+
Rt.displayName = "DrawerFrame";
|
|
2685
|
+
const Ba = (e, r) => ({
|
|
2706
2686
|
onAnimationEnd: (i) => {
|
|
2707
2687
|
i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
2708
2688
|
},
|
|
@@ -2724,7 +2704,7 @@ const qa = (e, r) => ({
|
|
|
2724
2704
|
const { y: u } = i.delta;
|
|
2725
2705
|
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${u}px`);
|
|
2726
2706
|
}
|
|
2727
|
-
}), ie = Y.bind(
|
|
2707
|
+
}), ie = Y.bind(Ao), se = "purpur-drawer-content", xt = B(
|
|
2728
2708
|
({
|
|
2729
2709
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2730
2710
|
backButton: r = !1,
|
|
@@ -2742,32 +2722,41 @@ const qa = (e, r) => ({
|
|
|
2742
2722
|
stickyFooter: m = !1,
|
|
2743
2723
|
title: w,
|
|
2744
2724
|
zIndex: h,
|
|
2745
|
-
...
|
|
2746
|
-
},
|
|
2725
|
+
...g
|
|
2726
|
+
}, _) => {
|
|
2747
2727
|
const E = ie([
|
|
2748
2728
|
s,
|
|
2749
2729
|
se,
|
|
2750
2730
|
{ [`${se}--fit-to-content`]: l }
|
|
2751
|
-
]), b =
|
|
2752
|
-
u &&
|
|
2731
|
+
]), b = Lt(null), y = $t(lt), { onAnimationEnd: C, onSwipeStart: N, onSwipeMove: S, onSwipeCancel: R, onSwipeEnd: P } = Ba(b, y), A = (ne) => {
|
|
2732
|
+
u && ne.preventDefault();
|
|
2733
|
+
}, F = () => {
|
|
2734
|
+
const ne = b.current;
|
|
2735
|
+
if (ne) {
|
|
2736
|
+
const rr = ne.querySelector("h2");
|
|
2737
|
+
rr && setTimeout(() => {
|
|
2738
|
+
rr.focus();
|
|
2739
|
+
});
|
|
2740
|
+
}
|
|
2753
2741
|
};
|
|
2754
|
-
return /* @__PURE__ */ f(
|
|
2755
|
-
|
|
2742
|
+
return /* @__PURE__ */ f(vo, { children: /* @__PURE__ */ f(
|
|
2743
|
+
ho,
|
|
2756
2744
|
{
|
|
2757
2745
|
className: ie("purpur-drawer-overlay"),
|
|
2758
2746
|
style: h ? { zIndex: h } : void 0,
|
|
2759
2747
|
"data-testid": `${e}-overlay`,
|
|
2760
2748
|
children: /* @__PURE__ */ f(
|
|
2761
|
-
|
|
2749
|
+
mo,
|
|
2762
2750
|
{
|
|
2763
2751
|
onPointerDownOutside: A,
|
|
2752
|
+
onOpenAutoFocus: F,
|
|
2764
2753
|
className: E,
|
|
2765
2754
|
"data-testid": e,
|
|
2766
|
-
ref:
|
|
2755
|
+
ref: _,
|
|
2767
2756
|
...!a && { "aria-describedby": void 0 },
|
|
2768
|
-
...
|
|
2757
|
+
...g,
|
|
2769
2758
|
children: /* @__PURE__ */ f(
|
|
2770
|
-
|
|
2759
|
+
Rt,
|
|
2771
2760
|
{
|
|
2772
2761
|
backButton: r,
|
|
2773
2762
|
backButtonText: t,
|
|
@@ -2788,7 +2777,7 @@ const qa = (e, r) => ({
|
|
|
2788
2777
|
title: w,
|
|
2789
2778
|
children: a ? /* @__PURE__ */ D("div", { className: ie(`${se}__content-container`), children: [
|
|
2790
2779
|
/* @__PURE__ */ f(
|
|
2791
|
-
|
|
2780
|
+
go,
|
|
2792
2781
|
{
|
|
2793
2782
|
className: ie(`${se}__description`),
|
|
2794
2783
|
"data-testid": `${e}-description`,
|
|
@@ -2805,27 +2794,12 @@ const qa = (e, r) => ({
|
|
|
2805
2794
|
) });
|
|
2806
2795
|
}
|
|
2807
2796
|
);
|
|
2808
|
-
|
|
2809
|
-
const
|
|
2810
|
-
({
|
|
2811
|
-
["data-testid"]: e = "purpur-drawer-trigger",
|
|
2812
|
-
children: r,
|
|
2813
|
-
className: t,
|
|
2814
|
-
...o
|
|
2815
|
-
}, a) => /* @__PURE__ */ f(
|
|
2816
|
-
fo,
|
|
2817
|
-
{
|
|
2818
|
-
asChild: !0,
|
|
2819
|
-
className: t,
|
|
2820
|
-
"data-testid": e,
|
|
2821
|
-
ref: a,
|
|
2822
|
-
...o,
|
|
2823
|
-
children: r
|
|
2824
|
-
}
|
|
2825
|
-
)
|
|
2797
|
+
xt.displayName = "DrawerContent";
|
|
2798
|
+
const Dt = B(
|
|
2799
|
+
({ ["data-testid"]: e = "purpur-drawer-trigger", children: r, ...t }, o) => /* @__PURE__ */ f(po, { asChild: !0, "data-testid": e, ref: o, ...t, children: r })
|
|
2826
2800
|
);
|
|
2827
|
-
|
|
2828
|
-
const
|
|
2801
|
+
Dt.displayName = "DrawerTrigger";
|
|
2802
|
+
const ja = Y.bind(So), za = "purpur-drawer", er = ({
|
|
2829
2803
|
["data-testid"]: e = "purpur-drawer",
|
|
2830
2804
|
children: r,
|
|
2831
2805
|
className: t,
|
|
@@ -2833,15 +2807,15 @@ const Ha = Y.bind(yo), Ba = "purpur-drawer", er = ({
|
|
|
2833
2807
|
open: a = !1,
|
|
2834
2808
|
...n
|
|
2835
2809
|
}) => {
|
|
2836
|
-
const [s, i] = Ie.useState(a), u =
|
|
2810
|
+
const [s, i] = Ie.useState(a), u = ja([t, za]), l = (d) => {
|
|
2837
2811
|
i(d), o == null || o(d);
|
|
2838
2812
|
};
|
|
2839
|
-
return
|
|
2813
|
+
return Mt(() => {
|
|
2840
2814
|
i(a);
|
|
2841
|
-
}, [a]), /* @__PURE__ */ f(
|
|
2815
|
+
}, [a]), /* @__PURE__ */ f(lt.Provider, { value: l, children: /* @__PURE__ */ f("div", { className: u, "data-testid": e, ...n, children: /* @__PURE__ */ f(fo, { open: s, onOpenChange: l, children: r }) }) });
|
|
2842
2816
|
};
|
|
2843
|
-
er.Trigger =
|
|
2844
|
-
er.Content =
|
|
2817
|
+
er.Trigger = Dt;
|
|
2818
|
+
er.Content = xt;
|
|
2845
2819
|
er.displayName = "Drawer";
|
|
2846
2820
|
export {
|
|
2847
2821
|
er as Drawer
|