@purpurds/drawer 5.24.3 → 5.25.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +5 -5
- package/dist/drawer.cjs.js +10 -10
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.es.js +632 -622
- package/dist/drawer.es.js.map +1 -1
- package/package.json +6 -6
package/dist/drawer.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as _, jsxs as Y, Fragment as
|
|
1
|
+
import { jsx as _, jsxs as Y, Fragment as ur } from "react/jsx-runtime";
|
|
2
2
|
import * as $ from "react";
|
|
3
|
-
import Ue, { useCallback as
|
|
4
|
-
import
|
|
3
|
+
import Ue, { useCallback as ie, useMemo as pe, createElement as h, createContext as ae, useContext as ve, useLayoutEffect as dr, useRef as T, useEffect as N, useState as D, forwardRef as w, Children as Z, isValidElement as xe, Fragment as Qe, cloneElement as Je, useReducer as yt } from "react";
|
|
4
|
+
import fr, { flushSync as St } from "react-dom";
|
|
5
5
|
function y() {
|
|
6
6
|
return y = Object.assign ? Object.assign.bind() : function(e) {
|
|
7
7
|
for (var r = 1; r < arguments.length; r++) {
|
|
@@ -16,27 +16,49 @@ function L(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
|
16
16
|
if (e == null || e(a), t === !1 || !a.defaultPrevented) return r == null ? void 0 : r(a);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function pr(e, r) {
|
|
20
20
|
typeof e == "function" ? e(r) : e != null && (e.current = r);
|
|
21
21
|
}
|
|
22
22
|
function Et(...e) {
|
|
23
23
|
return (r) => e.forEach(
|
|
24
|
-
(t) =>
|
|
24
|
+
(t) => pr(t, r)
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
function k(...e) {
|
|
28
|
-
return
|
|
28
|
+
return ie(Et(...e), e);
|
|
29
|
+
}
|
|
30
|
+
function vr(e, r) {
|
|
31
|
+
const t = /* @__PURE__ */ ae(r);
|
|
32
|
+
function o(n) {
|
|
33
|
+
const { children: i, ...c } = n, s = pe(
|
|
34
|
+
() => c,
|
|
35
|
+
Object.values(c)
|
|
36
|
+
);
|
|
37
|
+
return /* @__PURE__ */ h(t.Provider, {
|
|
38
|
+
value: s
|
|
39
|
+
}, i);
|
|
40
|
+
}
|
|
41
|
+
function a(n) {
|
|
42
|
+
const i = ve(t);
|
|
43
|
+
if (i) return i;
|
|
44
|
+
if (r !== void 0) return r;
|
|
45
|
+
throw new Error(`\`${n}\` must be used within \`${e}\``);
|
|
46
|
+
}
|
|
47
|
+
return o.displayName = e + "Provider", [
|
|
48
|
+
o,
|
|
49
|
+
a
|
|
50
|
+
];
|
|
29
51
|
}
|
|
30
52
|
function xt(e, r = []) {
|
|
31
53
|
let t = [];
|
|
32
54
|
function o(n, i) {
|
|
33
|
-
const c = /* @__PURE__ */
|
|
55
|
+
const c = /* @__PURE__ */ ae(i), s = t.length;
|
|
34
56
|
t = [
|
|
35
57
|
...t,
|
|
36
58
|
i
|
|
37
59
|
];
|
|
38
|
-
function
|
|
39
|
-
const { scope: f, children: v, ...m } = d, p = (f == null ? void 0 : f[e][
|
|
60
|
+
function l(d) {
|
|
61
|
+
const { scope: f, children: v, ...m } = d, p = (f == null ? void 0 : f[e][s]) || c, b = pe(
|
|
40
62
|
() => m,
|
|
41
63
|
Object.values(m)
|
|
42
64
|
);
|
|
@@ -45,40 +67,40 @@ function xt(e, r = []) {
|
|
|
45
67
|
}, v);
|
|
46
68
|
}
|
|
47
69
|
function u(d, f) {
|
|
48
|
-
const v = (f == null ? void 0 : f[e][
|
|
70
|
+
const v = (f == null ? void 0 : f[e][s]) || c, m = ve(v);
|
|
49
71
|
if (m) return m;
|
|
50
72
|
if (i !== void 0) return i;
|
|
51
73
|
throw new Error(`\`${d}\` must be used within \`${n}\``);
|
|
52
74
|
}
|
|
53
|
-
return
|
|
54
|
-
|
|
75
|
+
return l.displayName = n + "Provider", [
|
|
76
|
+
l,
|
|
55
77
|
u
|
|
56
78
|
];
|
|
57
79
|
}
|
|
58
80
|
const a = () => {
|
|
59
|
-
const n = t.map((i) => /* @__PURE__ */
|
|
81
|
+
const n = t.map((i) => /* @__PURE__ */ ae(i));
|
|
60
82
|
return function(c) {
|
|
61
|
-
const
|
|
62
|
-
return
|
|
83
|
+
const s = (c == null ? void 0 : c[e]) || n;
|
|
84
|
+
return pe(
|
|
63
85
|
() => ({
|
|
64
86
|
[`__scope${e}`]: {
|
|
65
87
|
...c,
|
|
66
|
-
[e]:
|
|
88
|
+
[e]: s
|
|
67
89
|
}
|
|
68
90
|
}),
|
|
69
91
|
[
|
|
70
92
|
c,
|
|
71
|
-
|
|
93
|
+
s
|
|
72
94
|
]
|
|
73
95
|
);
|
|
74
96
|
};
|
|
75
97
|
};
|
|
76
98
|
return a.scopeName = e, [
|
|
77
99
|
o,
|
|
78
|
-
|
|
100
|
+
hr(a, ...r)
|
|
79
101
|
];
|
|
80
102
|
}
|
|
81
|
-
function
|
|
103
|
+
function hr(...e) {
|
|
82
104
|
const r = e[0];
|
|
83
105
|
if (e.length === 1) return r;
|
|
84
106
|
const t = () => {
|
|
@@ -89,14 +111,14 @@ function pr(...e) {
|
|
|
89
111
|
})
|
|
90
112
|
);
|
|
91
113
|
return function(n) {
|
|
92
|
-
const i = o.reduce((c, { useScope:
|
|
93
|
-
const d =
|
|
114
|
+
const i = o.reduce((c, { useScope: s, scopeName: l }) => {
|
|
115
|
+
const d = s(n)[`__scope${l}`];
|
|
94
116
|
return {
|
|
95
117
|
...c,
|
|
96
118
|
...d
|
|
97
119
|
};
|
|
98
120
|
}, {});
|
|
99
|
-
return
|
|
121
|
+
return pe(
|
|
100
122
|
() => ({
|
|
101
123
|
[`__scope${r.scopeName}`]: i
|
|
102
124
|
}),
|
|
@@ -108,25 +130,25 @@ function pr(...e) {
|
|
|
108
130
|
};
|
|
109
131
|
return t.scopeName = r.scopeName, t;
|
|
110
132
|
}
|
|
111
|
-
const
|
|
112
|
-
},
|
|
133
|
+
const Pe = globalThis != null && globalThis.document ? dr : () => {
|
|
134
|
+
}, br = $.useId || (() => {
|
|
113
135
|
});
|
|
114
|
-
let
|
|
136
|
+
let mr = 0;
|
|
115
137
|
function Oe(e) {
|
|
116
|
-
const [r, t] = $.useState(
|
|
117
|
-
return
|
|
138
|
+
const [r, t] = $.useState(br());
|
|
139
|
+
return Pe(() => {
|
|
118
140
|
e || t(
|
|
119
|
-
(o) => o ?? String(
|
|
141
|
+
(o) => o ?? String(mr++)
|
|
120
142
|
);
|
|
121
143
|
}, [
|
|
122
144
|
e
|
|
123
145
|
]), e || (r ? `radix-${r}` : "");
|
|
124
146
|
}
|
|
125
147
|
function M(e) {
|
|
126
|
-
const r =
|
|
127
|
-
return
|
|
148
|
+
const r = T(e);
|
|
149
|
+
return N(() => {
|
|
128
150
|
r.current = e;
|
|
129
|
-
}),
|
|
151
|
+
}), pe(
|
|
130
152
|
() => (...t) => {
|
|
131
153
|
var o;
|
|
132
154
|
return (o = r.current) === null || o === void 0 ? void 0 : o.call(r, ...t);
|
|
@@ -134,16 +156,16 @@ function M(e) {
|
|
|
134
156
|
[]
|
|
135
157
|
);
|
|
136
158
|
}
|
|
137
|
-
function
|
|
159
|
+
function gr({ prop: e, defaultProp: r, onChange: t = () => {
|
|
138
160
|
} }) {
|
|
139
|
-
const [o, a] =
|
|
161
|
+
const [o, a] = _r({
|
|
140
162
|
defaultProp: r,
|
|
141
163
|
onChange: t
|
|
142
|
-
}), n = e !== void 0, i = n ? e : o, c = M(t),
|
|
164
|
+
}), n = e !== void 0, i = n ? e : o, c = M(t), s = ie((l) => {
|
|
143
165
|
if (n) {
|
|
144
|
-
const d = typeof
|
|
166
|
+
const d = typeof l == "function" ? l(e) : l;
|
|
145
167
|
d !== e && c(d);
|
|
146
|
-
} else a(
|
|
168
|
+
} else a(l);
|
|
147
169
|
}, [
|
|
148
170
|
n,
|
|
149
171
|
e,
|
|
@@ -152,12 +174,12 @@ function br({ prop: e, defaultProp: r, onChange: t = () => {
|
|
|
152
174
|
]);
|
|
153
175
|
return [
|
|
154
176
|
i,
|
|
155
|
-
|
|
177
|
+
s
|
|
156
178
|
];
|
|
157
179
|
}
|
|
158
|
-
function
|
|
159
|
-
const t =
|
|
160
|
-
return
|
|
180
|
+
function _r({ defaultProp: e, onChange: r }) {
|
|
181
|
+
const t = D(e), [o] = t, a = T(o), n = M(r);
|
|
182
|
+
return N(() => {
|
|
161
183
|
a.current !== o && (n(o), a.current = o);
|
|
162
184
|
}, [
|
|
163
185
|
o,
|
|
@@ -166,12 +188,12 @@ function mr({ defaultProp: e, onChange: r }) {
|
|
|
166
188
|
]), t;
|
|
167
189
|
}
|
|
168
190
|
const et = /* @__PURE__ */ w((e, r) => {
|
|
169
|
-
const { children: t, ...o } = e, a = Z.toArray(t), n = a.find(
|
|
191
|
+
const { children: t, ...o } = e, a = Z.toArray(t), n = a.find(wr);
|
|
170
192
|
if (n) {
|
|
171
|
-
const i = n.props.children, c = a.map((
|
|
193
|
+
const i = n.props.children, c = a.map((s) => s === n ? Z.count(i) > 1 ? Z.only(null) : /* @__PURE__ */ xe(i) ? i.props.children : null : s);
|
|
172
194
|
return /* @__PURE__ */ h(He, y({}, o, {
|
|
173
195
|
ref: r
|
|
174
|
-
}), /* @__PURE__ */
|
|
196
|
+
}), /* @__PURE__ */ xe(i) ? /* @__PURE__ */ Je(i, void 0, c) : null);
|
|
175
197
|
}
|
|
176
198
|
return /* @__PURE__ */ h(He, y({}, o, {
|
|
177
199
|
ref: r
|
|
@@ -180,17 +202,17 @@ const et = /* @__PURE__ */ w((e, r) => {
|
|
|
180
202
|
et.displayName = "Slot";
|
|
181
203
|
const He = /* @__PURE__ */ w((e, r) => {
|
|
182
204
|
const { children: t, ...o } = e;
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
|
|
205
|
+
return /* @__PURE__ */ xe(t) ? /* @__PURE__ */ Je(t, {
|
|
206
|
+
...yr(o, t.props),
|
|
185
207
|
ref: r ? Et(r, t.ref) : t.ref
|
|
186
208
|
}) : Z.count(t) > 1 ? Z.only(null) : null;
|
|
187
209
|
});
|
|
188
210
|
He.displayName = "SlotClone";
|
|
189
|
-
const
|
|
190
|
-
function
|
|
191
|
-
return /* @__PURE__ */
|
|
211
|
+
const $r = ({ children: e }) => /* @__PURE__ */ h(Qe, null, e);
|
|
212
|
+
function wr(e) {
|
|
213
|
+
return /* @__PURE__ */ xe(e) && e.type === $r;
|
|
192
214
|
}
|
|
193
|
-
function
|
|
215
|
+
function yr(e, r) {
|
|
194
216
|
const t = {
|
|
195
217
|
...r
|
|
196
218
|
};
|
|
@@ -211,7 +233,7 @@ function $r(e, r) {
|
|
|
211
233
|
...t
|
|
212
234
|
};
|
|
213
235
|
}
|
|
214
|
-
const
|
|
236
|
+
const Sr = [
|
|
215
237
|
"a",
|
|
216
238
|
"button",
|
|
217
239
|
"div",
|
|
@@ -228,10 +250,10 @@ const wr = [
|
|
|
228
250
|
"span",
|
|
229
251
|
"svg",
|
|
230
252
|
"ul"
|
|
231
|
-
], F =
|
|
253
|
+
], F = Sr.reduce((e, r) => {
|
|
232
254
|
const t = /* @__PURE__ */ w((o, a) => {
|
|
233
255
|
const { asChild: n, ...i } = o, c = n ? et : r;
|
|
234
|
-
return
|
|
256
|
+
return N(() => {
|
|
235
257
|
window[Symbol.for("radix-ui")] = !0;
|
|
236
258
|
}, []), /* @__PURE__ */ h(c, y({}, i, {
|
|
237
259
|
ref: a
|
|
@@ -242,14 +264,14 @@ const wr = [
|
|
|
242
264
|
[r]: t
|
|
243
265
|
};
|
|
244
266
|
}, {});
|
|
245
|
-
function
|
|
267
|
+
function Er(e, r) {
|
|
246
268
|
e && St(
|
|
247
269
|
() => e.dispatchEvent(r)
|
|
248
270
|
);
|
|
249
271
|
}
|
|
250
|
-
function
|
|
272
|
+
function xr(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
251
273
|
const t = M(e);
|
|
252
|
-
|
|
274
|
+
N(() => {
|
|
253
275
|
const o = (a) => {
|
|
254
276
|
a.key === "Escape" && t(a);
|
|
255
277
|
};
|
|
@@ -259,37 +281,37 @@ function Sr(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
259
281
|
r
|
|
260
282
|
]);
|
|
261
283
|
}
|
|
262
|
-
const Ye = "dismissableLayer.update",
|
|
284
|
+
const Ye = "dismissableLayer.update", Pr = "dismissableLayer.pointerDownOutside", Cr = "dismissableLayer.focusOutside";
|
|
263
285
|
let at;
|
|
264
|
-
const
|
|
286
|
+
const Ar = /* @__PURE__ */ ae({
|
|
265
287
|
layers: /* @__PURE__ */ new Set(),
|
|
266
288
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
267
289
|
branches: /* @__PURE__ */ new Set()
|
|
268
|
-
}),
|
|
290
|
+
}), Tr = /* @__PURE__ */ w((e, r) => {
|
|
269
291
|
var t;
|
|
270
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: n, onFocusOutside: i, onInteractOutside: c, onDismiss:
|
|
292
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: n, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...l } = e, u = ve(Ar), [d, f] = D(null), v = (t = d == null ? void 0 : d.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, m] = D({}), p = k(
|
|
271
293
|
r,
|
|
272
294
|
(x) => f(x)
|
|
273
295
|
), b = Array.from(u.layers), [g] = [
|
|
274
296
|
...u.layersWithOutsidePointerEventsDisabled
|
|
275
|
-
].slice(-1),
|
|
276
|
-
const
|
|
297
|
+
].slice(-1), C = b.indexOf(g), S = d ? b.indexOf(d) : -1, E = u.layersWithOutsidePointerEventsDisabled.size > 0, A = S >= C, I = Nr((x) => {
|
|
298
|
+
const P = x.target, R = [
|
|
277
299
|
...u.branches
|
|
278
300
|
].some(
|
|
279
|
-
(W) => W.contains(
|
|
301
|
+
(W) => W.contains(P)
|
|
280
302
|
);
|
|
281
|
-
!
|
|
282
|
-
}, v), O =
|
|
283
|
-
const
|
|
303
|
+
!A || R || (n == null || n(x), c == null || c(x), x.defaultPrevented || s == null || s());
|
|
304
|
+
}, v), O = Dr((x) => {
|
|
305
|
+
const P = x.target;
|
|
284
306
|
[
|
|
285
307
|
...u.branches
|
|
286
308
|
].some(
|
|
287
|
-
(W) => W.contains(
|
|
288
|
-
) || (i == null || i(x), c == null || c(x), x.defaultPrevented ||
|
|
309
|
+
(W) => W.contains(P)
|
|
310
|
+
) || (i == null || i(x), c == null || c(x), x.defaultPrevented || s == null || s());
|
|
289
311
|
}, v);
|
|
290
|
-
return
|
|
291
|
-
S === u.layers.size - 1 && (a == null || a(x), !x.defaultPrevented &&
|
|
292
|
-
}, v),
|
|
312
|
+
return xr((x) => {
|
|
313
|
+
S === u.layers.size - 1 && (a == null || a(x), !x.defaultPrevented && s && (x.preventDefault(), s()));
|
|
314
|
+
}, v), N(() => {
|
|
293
315
|
if (d)
|
|
294
316
|
return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (at = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), ct(), () => {
|
|
295
317
|
o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = at);
|
|
@@ -299,18 +321,18 @@ const Cr = /* @__PURE__ */ de({
|
|
|
299
321
|
v,
|
|
300
322
|
o,
|
|
301
323
|
u
|
|
302
|
-
]),
|
|
324
|
+
]), N(() => () => {
|
|
303
325
|
d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), ct());
|
|
304
326
|
}, [
|
|
305
327
|
d,
|
|
306
328
|
u
|
|
307
|
-
]),
|
|
329
|
+
]), N(() => {
|
|
308
330
|
const x = () => m({});
|
|
309
331
|
return document.addEventListener(Ye, x), () => document.removeEventListener(Ye, x);
|
|
310
|
-
}, []), /* @__PURE__ */ h(F.div, y({},
|
|
332
|
+
}, []), /* @__PURE__ */ h(F.div, y({}, l, {
|
|
311
333
|
ref: p,
|
|
312
334
|
style: {
|
|
313
|
-
pointerEvents: E ?
|
|
335
|
+
pointerEvents: E ? A ? "auto" : "none" : void 0,
|
|
314
336
|
...e.style
|
|
315
337
|
},
|
|
316
338
|
onFocusCapture: L(e.onFocusCapture, O.onFocusCapture),
|
|
@@ -318,23 +340,23 @@ const Cr = /* @__PURE__ */ de({
|
|
|
318
340
|
onPointerDownCapture: L(e.onPointerDownCapture, I.onPointerDownCapture)
|
|
319
341
|
}));
|
|
320
342
|
});
|
|
321
|
-
function
|
|
322
|
-
const t = M(e), o =
|
|
343
|
+
function Nr(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
344
|
+
const t = M(e), o = T(!1), a = T(() => {
|
|
323
345
|
});
|
|
324
|
-
return
|
|
346
|
+
return N(() => {
|
|
325
347
|
const n = (c) => {
|
|
326
348
|
if (c.target && !o.current) {
|
|
327
|
-
let
|
|
328
|
-
|
|
349
|
+
let l = function() {
|
|
350
|
+
Pt(Pr, t, s, {
|
|
329
351
|
discrete: !0
|
|
330
352
|
});
|
|
331
353
|
};
|
|
332
|
-
const
|
|
354
|
+
const s = {
|
|
333
355
|
originalEvent: c
|
|
334
356
|
};
|
|
335
|
-
c.pointerType === "touch" ? (r.removeEventListener("click", a.current), a.current =
|
|
357
|
+
c.pointerType === "touch" ? (r.removeEventListener("click", a.current), a.current = l, r.addEventListener("click", a.current, {
|
|
336
358
|
once: !0
|
|
337
|
-
})) :
|
|
359
|
+
})) : l();
|
|
338
360
|
} else
|
|
339
361
|
r.removeEventListener("click", a.current);
|
|
340
362
|
o.current = !1;
|
|
@@ -352,11 +374,11 @@ function Tr(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
|
352
374
|
onPointerDownCapture: () => o.current = !0
|
|
353
375
|
};
|
|
354
376
|
}
|
|
355
|
-
function
|
|
356
|
-
const t = M(e), o =
|
|
357
|
-
return
|
|
377
|
+
function Dr(e, r = globalThis == null ? void 0 : globalThis.document) {
|
|
378
|
+
const t = M(e), o = T(!1);
|
|
379
|
+
return N(() => {
|
|
358
380
|
const a = (n) => {
|
|
359
|
-
n.target && !o.current &&
|
|
381
|
+
n.target && !o.current && Pt(Cr, t, {
|
|
360
382
|
originalEvent: n
|
|
361
383
|
}, {
|
|
362
384
|
discrete: !1
|
|
@@ -375,7 +397,7 @@ function ct() {
|
|
|
375
397
|
const e = new CustomEvent(Ye);
|
|
376
398
|
document.dispatchEvent(e);
|
|
377
399
|
}
|
|
378
|
-
function
|
|
400
|
+
function Pt(e, r, t, { discrete: o }) {
|
|
379
401
|
const a = t.originalEvent.target, n = new CustomEvent(e, {
|
|
380
402
|
bubbles: !1,
|
|
381
403
|
cancelable: !0,
|
|
@@ -383,16 +405,16 @@ function Ct(e, r, t, { discrete: o }) {
|
|
|
383
405
|
});
|
|
384
406
|
r && a.addEventListener(e, r, {
|
|
385
407
|
once: !0
|
|
386
|
-
}), o ?
|
|
408
|
+
}), o ? Er(a, n) : a.dispatchEvent(n);
|
|
387
409
|
}
|
|
388
410
|
const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount", it = {
|
|
389
411
|
bubbles: !1,
|
|
390
412
|
cancelable: !0
|
|
391
|
-
},
|
|
392
|
-
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: n, ...i } = e, [c,
|
|
413
|
+
}, Or = /* @__PURE__ */ w((e, r) => {
|
|
414
|
+
const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: n, ...i } = e, [c, s] = D(null), l = M(a), u = M(n), d = T(null), f = k(
|
|
393
415
|
r,
|
|
394
|
-
(p) =>
|
|
395
|
-
), v =
|
|
416
|
+
(p) => s(p)
|
|
417
|
+
), v = T({
|
|
396
418
|
paused: !1,
|
|
397
419
|
pause() {
|
|
398
420
|
this.paused = !0;
|
|
@@ -401,7 +423,7 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
401
423
|
this.paused = !1;
|
|
402
424
|
}
|
|
403
425
|
}).current;
|
|
404
|
-
|
|
426
|
+
N(() => {
|
|
405
427
|
if (o) {
|
|
406
428
|
let p = function(S) {
|
|
407
429
|
if (v.paused || !c) return;
|
|
@@ -417,33 +439,33 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
417
439
|
}));
|
|
418
440
|
}, g = function(S) {
|
|
419
441
|
if (document.activeElement === document.body)
|
|
420
|
-
for (const
|
|
442
|
+
for (const A of S) A.removedNodes.length > 0 && V(c);
|
|
421
443
|
};
|
|
422
444
|
document.addEventListener("focusin", p), document.addEventListener("focusout", b);
|
|
423
|
-
const
|
|
424
|
-
return c &&
|
|
445
|
+
const C = new MutationObserver(g);
|
|
446
|
+
return c && C.observe(c, {
|
|
425
447
|
childList: !0,
|
|
426
448
|
subtree: !0
|
|
427
449
|
}), () => {
|
|
428
|
-
document.removeEventListener("focusin", p), document.removeEventListener("focusout", b),
|
|
450
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", b), C.disconnect();
|
|
429
451
|
};
|
|
430
452
|
}
|
|
431
453
|
}, [
|
|
432
454
|
o,
|
|
433
455
|
c,
|
|
434
456
|
v.paused
|
|
435
|
-
]),
|
|
457
|
+
]), N(() => {
|
|
436
458
|
if (c) {
|
|
437
459
|
lt.add(v);
|
|
438
460
|
const p = document.activeElement;
|
|
439
461
|
if (!c.contains(p)) {
|
|
440
462
|
const g = new CustomEvent(Le, it);
|
|
441
|
-
c.addEventListener(Le,
|
|
463
|
+
c.addEventListener(Le, l), c.dispatchEvent(g), g.defaultPrevented || (Lr(Fr(Ct(c)), {
|
|
442
464
|
select: !0
|
|
443
465
|
}), document.activeElement === p && V(c));
|
|
444
466
|
}
|
|
445
467
|
return () => {
|
|
446
|
-
c.removeEventListener(Le,
|
|
468
|
+
c.removeEventListener(Le, l), setTimeout(() => {
|
|
447
469
|
const g = new CustomEvent(Re, it);
|
|
448
470
|
c.addEventListener(Re, u), c.dispatchEvent(g), g.defaultPrevented || V(p ?? document.body, {
|
|
449
471
|
select: !0
|
|
@@ -453,20 +475,20 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
453
475
|
}
|
|
454
476
|
}, [
|
|
455
477
|
c,
|
|
456
|
-
|
|
478
|
+
l,
|
|
457
479
|
u,
|
|
458
480
|
v
|
|
459
481
|
]);
|
|
460
|
-
const m =
|
|
482
|
+
const m = ie((p) => {
|
|
461
483
|
if (!t && !o || v.paused) return;
|
|
462
484
|
const b = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, g = document.activeElement;
|
|
463
485
|
if (b && g) {
|
|
464
|
-
const
|
|
486
|
+
const C = p.currentTarget, [S, E] = Rr(C);
|
|
465
487
|
S && E ? !p.shiftKey && g === E ? (p.preventDefault(), t && V(S, {
|
|
466
488
|
select: !0
|
|
467
489
|
})) : p.shiftKey && g === S && (p.preventDefault(), t && V(E, {
|
|
468
490
|
select: !0
|
|
469
|
-
})) : g ===
|
|
491
|
+
})) : g === C && p.preventDefault();
|
|
470
492
|
}
|
|
471
493
|
}, [
|
|
472
494
|
t,
|
|
@@ -480,21 +502,21 @@ const Le = "focusScope.autoFocusOnMount", Re = "focusScope.autoFocusOnUnmount",
|
|
|
480
502
|
onKeyDown: m
|
|
481
503
|
}));
|
|
482
504
|
});
|
|
483
|
-
function
|
|
505
|
+
function Lr(e, { select: r = !1 } = {}) {
|
|
484
506
|
const t = document.activeElement;
|
|
485
507
|
for (const o of e)
|
|
486
508
|
if (V(o, {
|
|
487
509
|
select: r
|
|
488
510
|
}), document.activeElement !== t) return;
|
|
489
511
|
}
|
|
490
|
-
function
|
|
491
|
-
const r =
|
|
512
|
+
function Rr(e) {
|
|
513
|
+
const r = Ct(e), t = st(r, e), o = st(r.reverse(), e);
|
|
492
514
|
return [
|
|
493
515
|
t,
|
|
494
516
|
o
|
|
495
517
|
];
|
|
496
518
|
}
|
|
497
|
-
function
|
|
519
|
+
function Ct(e) {
|
|
498
520
|
const r = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
499
521
|
acceptNode: (o) => {
|
|
500
522
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -506,11 +528,11 @@ function Pt(e) {
|
|
|
506
528
|
}
|
|
507
529
|
function st(e, r) {
|
|
508
530
|
for (const t of e)
|
|
509
|
-
if (!
|
|
531
|
+
if (!Mr(t, {
|
|
510
532
|
upTo: r
|
|
511
533
|
})) return t;
|
|
512
534
|
}
|
|
513
|
-
function
|
|
535
|
+
function Mr(e, { upTo: r }) {
|
|
514
536
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
515
537
|
for (; e; ) {
|
|
516
538
|
if (r !== void 0 && e === r) return !1;
|
|
@@ -519,7 +541,7 @@ function Lr(e, { upTo: r }) {
|
|
|
519
541
|
}
|
|
520
542
|
return !1;
|
|
521
543
|
}
|
|
522
|
-
function
|
|
544
|
+
function Ir(e) {
|
|
523
545
|
return e instanceof HTMLInputElement && "select" in e;
|
|
524
546
|
}
|
|
525
547
|
function V(e, { select: r = !1 } = {}) {
|
|
@@ -527,11 +549,11 @@ function V(e, { select: r = !1 } = {}) {
|
|
|
527
549
|
const t = document.activeElement;
|
|
528
550
|
e.focus({
|
|
529
551
|
preventScroll: !0
|
|
530
|
-
}), e !== t &&
|
|
552
|
+
}), e !== t && Ir(e) && r && e.select();
|
|
531
553
|
}
|
|
532
554
|
}
|
|
533
|
-
const lt =
|
|
534
|
-
function
|
|
555
|
+
const lt = kr();
|
|
556
|
+
function kr() {
|
|
535
557
|
let e = [];
|
|
536
558
|
return {
|
|
537
559
|
add(r) {
|
|
@@ -550,35 +572,35 @@ function ut(e, r) {
|
|
|
550
572
|
], o = t.indexOf(r);
|
|
551
573
|
return o !== -1 && t.splice(o, 1), t;
|
|
552
574
|
}
|
|
553
|
-
function
|
|
575
|
+
function Fr(e) {
|
|
554
576
|
return e.filter(
|
|
555
577
|
(r) => r.tagName !== "A"
|
|
556
578
|
);
|
|
557
579
|
}
|
|
558
|
-
const
|
|
580
|
+
const jr = /* @__PURE__ */ w((e, r) => {
|
|
559
581
|
var t;
|
|
560
582
|
const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
|
|
561
|
-
return o ? /* @__PURE__ */
|
|
583
|
+
return o ? /* @__PURE__ */ fr.createPortal(/* @__PURE__ */ h(F.div, y({}, a, {
|
|
562
584
|
ref: r
|
|
563
585
|
})), o) : null;
|
|
564
586
|
});
|
|
565
|
-
function
|
|
587
|
+
function Wr(e, r) {
|
|
566
588
|
return yt((t, o) => {
|
|
567
589
|
const a = r[t][o];
|
|
568
590
|
return a ?? t;
|
|
569
591
|
}, e);
|
|
570
592
|
}
|
|
571
593
|
const q = (e) => {
|
|
572
|
-
const { present: r, children: t } = e, o =
|
|
594
|
+
const { present: r, children: t } = e, o = zr(r), a = typeof t == "function" ? t({
|
|
573
595
|
present: o.isPresent
|
|
574
596
|
}) : Z.only(t), n = k(o.ref, a.ref);
|
|
575
|
-
return typeof t == "function" || o.isPresent ? /* @__PURE__ */
|
|
597
|
+
return typeof t == "function" || o.isPresent ? /* @__PURE__ */ Je(a, {
|
|
576
598
|
ref: n
|
|
577
599
|
}) : null;
|
|
578
600
|
};
|
|
579
601
|
q.displayName = "Presence";
|
|
580
|
-
function
|
|
581
|
-
const [r, t] =
|
|
602
|
+
function zr(e) {
|
|
603
|
+
const [r, t] = D(), o = T({}), a = T(e), n = T("none"), i = e ? "mounted" : "unmounted", [c, s] = Wr(i, {
|
|
582
604
|
mounted: {
|
|
583
605
|
UNMOUNT: "unmounted",
|
|
584
606
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -591,54 +613,54 @@ function jr(e) {
|
|
|
591
613
|
MOUNT: "mounted"
|
|
592
614
|
}
|
|
593
615
|
});
|
|
594
|
-
return
|
|
595
|
-
const
|
|
596
|
-
n.current = c === "mounted" ?
|
|
616
|
+
return N(() => {
|
|
617
|
+
const l = he(o.current);
|
|
618
|
+
n.current = c === "mounted" ? l : "none";
|
|
597
619
|
}, [
|
|
598
620
|
c
|
|
599
|
-
]),
|
|
600
|
-
const
|
|
621
|
+
]), Pe(() => {
|
|
622
|
+
const l = o.current, u = a.current;
|
|
601
623
|
if (u !== e) {
|
|
602
|
-
const f = n.current, v =
|
|
603
|
-
e ?
|
|
624
|
+
const f = n.current, v = he(l);
|
|
625
|
+
e ? s("MOUNT") : v === "none" || (l == null ? void 0 : l.display) === "none" ? s("UNMOUNT") : s(u && f !== v ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
604
626
|
}
|
|
605
627
|
}, [
|
|
606
628
|
e,
|
|
607
|
-
|
|
608
|
-
]),
|
|
629
|
+
s
|
|
630
|
+
]), Pe(() => {
|
|
609
631
|
if (r) {
|
|
610
|
-
const
|
|
611
|
-
const v =
|
|
632
|
+
const l = (d) => {
|
|
633
|
+
const v = he(o.current).includes(d.animationName);
|
|
612
634
|
d.target === r && v && St(
|
|
613
|
-
() =>
|
|
635
|
+
() => s("ANIMATION_END")
|
|
614
636
|
);
|
|
615
637
|
}, u = (d) => {
|
|
616
|
-
d.target === r && (n.current =
|
|
638
|
+
d.target === r && (n.current = he(o.current));
|
|
617
639
|
};
|
|
618
|
-
return r.addEventListener("animationstart", u), r.addEventListener("animationcancel",
|
|
619
|
-
r.removeEventListener("animationstart", u), r.removeEventListener("animationcancel",
|
|
640
|
+
return r.addEventListener("animationstart", u), r.addEventListener("animationcancel", l), r.addEventListener("animationend", l), () => {
|
|
641
|
+
r.removeEventListener("animationstart", u), r.removeEventListener("animationcancel", l), r.removeEventListener("animationend", l);
|
|
620
642
|
};
|
|
621
643
|
} else
|
|
622
|
-
|
|
644
|
+
s("ANIMATION_END");
|
|
623
645
|
}, [
|
|
624
646
|
r,
|
|
625
|
-
|
|
647
|
+
s
|
|
626
648
|
]), {
|
|
627
649
|
isPresent: [
|
|
628
650
|
"mounted",
|
|
629
651
|
"unmountSuspended"
|
|
630
652
|
].includes(c),
|
|
631
|
-
ref:
|
|
632
|
-
|
|
653
|
+
ref: ie((l) => {
|
|
654
|
+
l && (o.current = getComputedStyle(l)), t(l);
|
|
633
655
|
}, [])
|
|
634
656
|
};
|
|
635
657
|
}
|
|
636
|
-
function
|
|
658
|
+
function he(e) {
|
|
637
659
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
638
660
|
}
|
|
639
661
|
let Me = 0;
|
|
640
|
-
function
|
|
641
|
-
|
|
662
|
+
function Ur() {
|
|
663
|
+
N(() => {
|
|
642
664
|
var e, r;
|
|
643
665
|
const t = document.querySelectorAll("[data-radix-focus-guard]");
|
|
644
666
|
return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : dt()), document.body.insertAdjacentElement("beforeend", (r = t[1]) !== null && r !== void 0 ? r : dt()), Me++, () => {
|
|
@@ -661,7 +683,7 @@ var z = function() {
|
|
|
661
683
|
return r;
|
|
662
684
|
}, z.apply(this, arguments);
|
|
663
685
|
};
|
|
664
|
-
function
|
|
686
|
+
function At(e, r) {
|
|
665
687
|
var t = {};
|
|
666
688
|
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (t[o] = e[o]);
|
|
667
689
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -669,17 +691,17 @@ function Tt(e, r) {
|
|
|
669
691
|
r.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
|
|
670
692
|
return t;
|
|
671
693
|
}
|
|
672
|
-
function
|
|
694
|
+
function Hr(e, r, t) {
|
|
673
695
|
if (t || arguments.length === 2) for (var o = 0, a = r.length, n; o < a; o++)
|
|
674
696
|
(n || !(o in r)) && (n || (n = Array.prototype.slice.call(r, 0, o)), n[o] = r[o]);
|
|
675
697
|
return e.concat(n || Array.prototype.slice.call(r));
|
|
676
698
|
}
|
|
677
|
-
var
|
|
699
|
+
var Se = "right-scroll-bar-position", Ee = "width-before-scroll-bar", Yr = "with-scroll-bars-hidden", Br = "--removed-body-scroll-bar-size";
|
|
678
700
|
function Ie(e, r) {
|
|
679
701
|
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
680
702
|
}
|
|
681
|
-
function
|
|
682
|
-
var t =
|
|
703
|
+
function Xr(e, r) {
|
|
704
|
+
var t = D(function() {
|
|
683
705
|
return {
|
|
684
706
|
// value
|
|
685
707
|
value: e,
|
|
@@ -699,14 +721,14 @@ function Yr(e, r) {
|
|
|
699
721
|
})[0];
|
|
700
722
|
return t.callback = r, t.facade;
|
|
701
723
|
}
|
|
702
|
-
var
|
|
703
|
-
function
|
|
704
|
-
var t =
|
|
724
|
+
var Vr = typeof window < "u" ? $.useLayoutEffect : $.useEffect, ft = /* @__PURE__ */ new WeakMap();
|
|
725
|
+
function qr(e, r) {
|
|
726
|
+
var t = Xr(null, function(o) {
|
|
705
727
|
return e.forEach(function(a) {
|
|
706
728
|
return Ie(a, o);
|
|
707
729
|
});
|
|
708
730
|
});
|
|
709
|
-
return
|
|
731
|
+
return Vr(function() {
|
|
710
732
|
var o = ft.get(t);
|
|
711
733
|
if (o) {
|
|
712
734
|
var a = new Set(o), n = new Set(e), i = t.current;
|
|
@@ -719,11 +741,11 @@ function Br(e, r) {
|
|
|
719
741
|
ft.set(t, e);
|
|
720
742
|
}, [e]), t;
|
|
721
743
|
}
|
|
722
|
-
function
|
|
744
|
+
function Kr(e) {
|
|
723
745
|
return e;
|
|
724
746
|
}
|
|
725
|
-
function
|
|
726
|
-
r === void 0 && (r =
|
|
747
|
+
function Gr(e, r) {
|
|
748
|
+
r === void 0 && (r = Kr);
|
|
727
749
|
var t = [], o = !1, a = {
|
|
728
750
|
read: function() {
|
|
729
751
|
if (o)
|
|
@@ -759,15 +781,15 @@ function qr(e, r) {
|
|
|
759
781
|
var c = t;
|
|
760
782
|
t = [], c.forEach(n), i = t;
|
|
761
783
|
}
|
|
762
|
-
var
|
|
784
|
+
var s = function() {
|
|
763
785
|
var u = i;
|
|
764
786
|
i = [], u.forEach(n);
|
|
765
|
-
},
|
|
766
|
-
return Promise.resolve().then(
|
|
787
|
+
}, l = function() {
|
|
788
|
+
return Promise.resolve().then(s);
|
|
767
789
|
};
|
|
768
|
-
|
|
790
|
+
l(), t = {
|
|
769
791
|
push: function(u) {
|
|
770
|
-
i.push(u),
|
|
792
|
+
i.push(u), l();
|
|
771
793
|
},
|
|
772
794
|
filter: function(u) {
|
|
773
795
|
return i = i.filter(u), t;
|
|
@@ -777,13 +799,13 @@ function qr(e, r) {
|
|
|
777
799
|
};
|
|
778
800
|
return a;
|
|
779
801
|
}
|
|
780
|
-
function
|
|
802
|
+
function Zr(e) {
|
|
781
803
|
e === void 0 && (e = {});
|
|
782
|
-
var r =
|
|
804
|
+
var r = Gr(null);
|
|
783
805
|
return r.options = z({ async: !0, ssr: !1 }, e), r;
|
|
784
806
|
}
|
|
785
|
-
var
|
|
786
|
-
var r = e.sideCar, t =
|
|
807
|
+
var Tt = function(e) {
|
|
808
|
+
var r = e.sideCar, t = At(e, ["sideCar"]);
|
|
787
809
|
if (!r)
|
|
788
810
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
789
811
|
var o = r.read();
|
|
@@ -791,64 +813,64 @@ var At = function(e) {
|
|
|
791
813
|
throw new Error("Sidecar medium not found");
|
|
792
814
|
return $.createElement(o, z({}, t));
|
|
793
815
|
};
|
|
794
|
-
|
|
795
|
-
function
|
|
796
|
-
return e.useMedium(r),
|
|
816
|
+
Tt.isSideCarExport = !0;
|
|
817
|
+
function Qr(e, r) {
|
|
818
|
+
return e.useMedium(r), Tt;
|
|
797
819
|
}
|
|
798
|
-
var
|
|
799
|
-
},
|
|
820
|
+
var Nt = Zr(), ke = function() {
|
|
821
|
+
}, Te = $.forwardRef(function(e, r) {
|
|
800
822
|
var t = $.useRef(null), o = $.useState({
|
|
801
823
|
onScrollCapture: ke,
|
|
802
824
|
onWheelCapture: ke,
|
|
803
825
|
onTouchMoveCapture: ke
|
|
804
|
-
}), a = o[0], n = o[1], i = e.forwardProps, c = e.children,
|
|
826
|
+
}), a = o[0], n = o[1], i = e.forwardProps, c = e.children, s = e.className, l = e.removeScrollBar, u = e.enabled, d = e.shards, f = e.sideCar, v = e.noIsolation, m = e.inert, p = e.allowPinchZoom, b = e.as, g = b === void 0 ? "div" : b, C = At(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), S = f, E = qr([t, r]), A = z(z({}, C), a);
|
|
805
827
|
return $.createElement(
|
|
806
828
|
$.Fragment,
|
|
807
829
|
null,
|
|
808
|
-
u && $.createElement(S, { sideCar:
|
|
809
|
-
i ? $.cloneElement($.Children.only(c), z(z({},
|
|
830
|
+
u && $.createElement(S, { sideCar: Nt, removeScrollBar: l, shards: d, noIsolation: v, inert: m, setCallbacks: n, allowPinchZoom: !!p, lockRef: t }),
|
|
831
|
+
i ? $.cloneElement($.Children.only(c), z(z({}, A), { ref: E })) : $.createElement(g, z({}, A, { className: s, ref: E }), c)
|
|
810
832
|
);
|
|
811
833
|
});
|
|
812
|
-
|
|
834
|
+
Te.defaultProps = {
|
|
813
835
|
enabled: !0,
|
|
814
836
|
removeScrollBar: !0,
|
|
815
837
|
inert: !1
|
|
816
838
|
};
|
|
817
|
-
|
|
818
|
-
fullWidth:
|
|
819
|
-
zeroRight:
|
|
839
|
+
Te.classNames = {
|
|
840
|
+
fullWidth: Ee,
|
|
841
|
+
zeroRight: Se
|
|
820
842
|
};
|
|
821
|
-
var
|
|
843
|
+
var Jr = function() {
|
|
822
844
|
if (typeof __webpack_nonce__ < "u")
|
|
823
845
|
return __webpack_nonce__;
|
|
824
846
|
};
|
|
825
|
-
function
|
|
847
|
+
function en() {
|
|
826
848
|
if (!document)
|
|
827
849
|
return null;
|
|
828
850
|
var e = document.createElement("style");
|
|
829
851
|
e.type = "text/css";
|
|
830
|
-
var r =
|
|
852
|
+
var r = Jr();
|
|
831
853
|
return r && e.setAttribute("nonce", r), e;
|
|
832
854
|
}
|
|
833
|
-
function
|
|
855
|
+
function tn(e, r) {
|
|
834
856
|
e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
|
|
835
857
|
}
|
|
836
|
-
function
|
|
858
|
+
function rn(e) {
|
|
837
859
|
var r = document.head || document.getElementsByTagName("head")[0];
|
|
838
860
|
r.appendChild(e);
|
|
839
861
|
}
|
|
840
|
-
var
|
|
862
|
+
var nn = function() {
|
|
841
863
|
var e = 0, r = null;
|
|
842
864
|
return {
|
|
843
865
|
add: function(t) {
|
|
844
|
-
e == 0 && (r =
|
|
866
|
+
e == 0 && (r = en()) && (tn(r, t), rn(r)), e++;
|
|
845
867
|
},
|
|
846
868
|
remove: function() {
|
|
847
869
|
e--, !e && r && (r.parentNode && r.parentNode.removeChild(r), r = null);
|
|
848
870
|
}
|
|
849
871
|
};
|
|
850
|
-
},
|
|
851
|
-
var e =
|
|
872
|
+
}, on = function() {
|
|
873
|
+
var e = nn();
|
|
852
874
|
return function(r, t) {
|
|
853
875
|
$.useEffect(function() {
|
|
854
876
|
return e.add(r), function() {
|
|
@@ -856,36 +878,36 @@ var tn = function() {
|
|
|
856
878
|
};
|
|
857
879
|
}, [r && t]);
|
|
858
880
|
};
|
|
859
|
-
},
|
|
860
|
-
var e =
|
|
881
|
+
}, Dt = function() {
|
|
882
|
+
var e = on(), r = function(t) {
|
|
861
883
|
var o = t.styles, a = t.dynamic;
|
|
862
884
|
return e(o, a), null;
|
|
863
885
|
};
|
|
864
886
|
return r;
|
|
865
|
-
},
|
|
887
|
+
}, an = {
|
|
866
888
|
left: 0,
|
|
867
889
|
top: 0,
|
|
868
890
|
right: 0,
|
|
869
891
|
gap: 0
|
|
870
892
|
}, Fe = function(e) {
|
|
871
893
|
return parseInt(e || "", 10) || 0;
|
|
872
|
-
},
|
|
894
|
+
}, cn = function(e) {
|
|
873
895
|
var r = window.getComputedStyle(document.body), t = r[e === "padding" ? "paddingLeft" : "marginLeft"], o = r[e === "padding" ? "paddingTop" : "marginTop"], a = r[e === "padding" ? "paddingRight" : "marginRight"];
|
|
874
896
|
return [Fe(t), Fe(o), Fe(a)];
|
|
875
|
-
},
|
|
897
|
+
}, sn = function(e) {
|
|
876
898
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
877
|
-
return
|
|
878
|
-
var r =
|
|
899
|
+
return an;
|
|
900
|
+
var r = cn(e), t = document.documentElement.clientWidth, o = window.innerWidth;
|
|
879
901
|
return {
|
|
880
902
|
left: r[0],
|
|
881
903
|
top: r[1],
|
|
882
904
|
right: r[2],
|
|
883
905
|
gap: Math.max(0, o - t + r[2] - r[0])
|
|
884
906
|
};
|
|
885
|
-
},
|
|
907
|
+
}, ln = Dt(), oe = "data-scroll-locked", un = function(e, r, t, o) {
|
|
886
908
|
var a = e.left, n = e.top, i = e.right, c = e.gap;
|
|
887
909
|
return t === void 0 && (t = "margin"), `
|
|
888
|
-
.`.concat(
|
|
910
|
+
.`.concat(Yr, ` {
|
|
889
911
|
overflow: hidden `).concat(o, `;
|
|
890
912
|
padding-right: `).concat(c, "px ").concat(o, `;
|
|
891
913
|
}
|
|
@@ -906,67 +928,67 @@ var tn = function() {
|
|
|
906
928
|
].filter(Boolean).join(""), `
|
|
907
929
|
}
|
|
908
930
|
|
|
909
|
-
.`).concat(
|
|
931
|
+
.`).concat(Se, ` {
|
|
910
932
|
right: `).concat(c, "px ").concat(o, `;
|
|
911
933
|
}
|
|
912
934
|
|
|
913
|
-
.`).concat(
|
|
935
|
+
.`).concat(Ee, ` {
|
|
914
936
|
margin-right: `).concat(c, "px ").concat(o, `;
|
|
915
937
|
}
|
|
916
938
|
|
|
917
|
-
.`).concat(
|
|
939
|
+
.`).concat(Se, " .").concat(Se, ` {
|
|
918
940
|
right: 0 `).concat(o, `;
|
|
919
941
|
}
|
|
920
942
|
|
|
921
|
-
.`).concat(
|
|
943
|
+
.`).concat(Ee, " .").concat(Ee, ` {
|
|
922
944
|
margin-right: 0 `).concat(o, `;
|
|
923
945
|
}
|
|
924
946
|
|
|
925
947
|
body[`).concat(oe, `] {
|
|
926
|
-
`).concat(
|
|
948
|
+
`).concat(Br, ": ").concat(c, `px;
|
|
927
949
|
}
|
|
928
950
|
`);
|
|
929
951
|
}, pt = function() {
|
|
930
952
|
var e = parseInt(document.body.getAttribute(oe) || "0", 10);
|
|
931
953
|
return isFinite(e) ? e : 0;
|
|
932
|
-
},
|
|
954
|
+
}, dn = function() {
|
|
933
955
|
$.useEffect(function() {
|
|
934
956
|
return document.body.setAttribute(oe, (pt() + 1).toString()), function() {
|
|
935
957
|
var e = pt() - 1;
|
|
936
958
|
e <= 0 ? document.body.removeAttribute(oe) : document.body.setAttribute(oe, e.toString());
|
|
937
959
|
};
|
|
938
960
|
}, []);
|
|
939
|
-
},
|
|
961
|
+
}, fn = function(e) {
|
|
940
962
|
var r = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
941
|
-
|
|
963
|
+
dn();
|
|
942
964
|
var n = $.useMemo(function() {
|
|
943
|
-
return
|
|
965
|
+
return sn(a);
|
|
944
966
|
}, [a]);
|
|
945
|
-
return $.createElement(
|
|
946
|
-
},
|
|
967
|
+
return $.createElement(ln, { styles: un(n, !r, a, t ? "" : "!important") });
|
|
968
|
+
}, Be = !1;
|
|
947
969
|
if (typeof window < "u")
|
|
948
970
|
try {
|
|
949
|
-
var
|
|
971
|
+
var be = Object.defineProperty({}, "passive", {
|
|
950
972
|
get: function() {
|
|
951
|
-
return
|
|
973
|
+
return Be = !0, !0;
|
|
952
974
|
}
|
|
953
975
|
});
|
|
954
|
-
window.addEventListener("test",
|
|
976
|
+
window.addEventListener("test", be, be), window.removeEventListener("test", be, be);
|
|
955
977
|
} catch {
|
|
956
|
-
|
|
978
|
+
Be = !1;
|
|
957
979
|
}
|
|
958
|
-
var J =
|
|
980
|
+
var J = Be ? {} : !1, pn = function(e) {
|
|
959
981
|
return e.tagName === "TEXTAREA";
|
|
960
982
|
}, Ot = function(e, r) {
|
|
961
983
|
var t = window.getComputedStyle(e);
|
|
962
984
|
return (
|
|
963
985
|
// not-not-scrollable
|
|
964
986
|
t[r] !== "hidden" && // contains scroll inside self
|
|
965
|
-
!(t.overflowY === t.overflowX && !
|
|
987
|
+
!(t.overflowY === t.overflowX && !pn(e) && t[r] === "visible")
|
|
966
988
|
);
|
|
967
|
-
},
|
|
989
|
+
}, vn = function(e) {
|
|
968
990
|
return Ot(e, "overflowY");
|
|
969
|
-
},
|
|
991
|
+
}, hn = function(e) {
|
|
970
992
|
return Ot(e, "overflowX");
|
|
971
993
|
}, vt = function(e, r) {
|
|
972
994
|
var t = r;
|
|
@@ -981,14 +1003,14 @@ var J = Xe ? { passive: !1 } : !1, dn = function(e) {
|
|
|
981
1003
|
t = t.parentNode;
|
|
982
1004
|
} while (t && t !== document.body);
|
|
983
1005
|
return !1;
|
|
984
|
-
},
|
|
1006
|
+
}, bn = function(e) {
|
|
985
1007
|
var r = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
|
|
986
1008
|
return [
|
|
987
1009
|
r,
|
|
988
1010
|
t,
|
|
989
1011
|
o
|
|
990
1012
|
];
|
|
991
|
-
},
|
|
1013
|
+
}, mn = function(e) {
|
|
992
1014
|
var r = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
|
|
993
1015
|
return [
|
|
994
1016
|
r,
|
|
@@ -996,46 +1018,46 @@ var J = Xe ? { passive: !1 } : !1, dn = function(e) {
|
|
|
996
1018
|
o
|
|
997
1019
|
];
|
|
998
1020
|
}, Lt = function(e, r) {
|
|
999
|
-
return e === "v" ? fn(r) : pn(r);
|
|
1000
|
-
}, Rt = function(e, r) {
|
|
1001
1021
|
return e === "v" ? vn(r) : hn(r);
|
|
1002
|
-
},
|
|
1022
|
+
}, Rt = function(e, r) {
|
|
1023
|
+
return e === "v" ? bn(r) : mn(r);
|
|
1024
|
+
}, gn = function(e, r) {
|
|
1003
1025
|
return e === "h" && r === "rtl" ? -1 : 1;
|
|
1004
|
-
},
|
|
1005
|
-
var n =
|
|
1026
|
+
}, _n = function(e, r, t, o, a) {
|
|
1027
|
+
var n = gn(e, window.getComputedStyle(r).direction), i = n * o, c = t.target, s = r.contains(c), l = !1, u = i > 0, d = 0, f = 0;
|
|
1006
1028
|
do {
|
|
1007
1029
|
var v = Rt(e, c), m = v[0], p = v[1], b = v[2], g = p - b - n * m;
|
|
1008
1030
|
(m || g) && Lt(e, c) && (d += g, f += m), c = c.parentNode;
|
|
1009
1031
|
} while (
|
|
1010
1032
|
// portaled content
|
|
1011
|
-
!
|
|
1012
|
-
|
|
1033
|
+
!s && c !== document.body || // self content
|
|
1034
|
+
s && (r.contains(c) || r === c)
|
|
1013
1035
|
);
|
|
1014
|
-
return (u && (d === 0 || !a) || !u && (f === 0 || !a)) && (
|
|
1015
|
-
},
|
|
1036
|
+
return (u && (d === 0 || !a) || !u && (f === 0 || !a)) && (l = !0), l;
|
|
1037
|
+
}, me = function(e) {
|
|
1016
1038
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1017
1039
|
}, ht = function(e) {
|
|
1018
1040
|
return [e.deltaX, e.deltaY];
|
|
1019
1041
|
}, bt = function(e) {
|
|
1020
1042
|
return e && "current" in e ? e.current : e;
|
|
1021
|
-
},
|
|
1043
|
+
}, $n = function(e, r) {
|
|
1022
1044
|
return e[0] === r[0] && e[1] === r[1];
|
|
1023
|
-
},
|
|
1045
|
+
}, wn = function(e) {
|
|
1024
1046
|
return `
|
|
1025
1047
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1026
1048
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1027
1049
|
`);
|
|
1028
|
-
},
|
|
1029
|
-
function
|
|
1030
|
-
var r = $.useRef([]), t = $.useRef([0, 0]), o = $.useRef(), a = $.useState(
|
|
1031
|
-
return
|
|
1050
|
+
}, yn = 0, ee = [];
|
|
1051
|
+
function Sn(e) {
|
|
1052
|
+
var r = $.useRef([]), t = $.useRef([0, 0]), o = $.useRef(), a = $.useState(yn++)[0], n = $.useState(function() {
|
|
1053
|
+
return Dt();
|
|
1032
1054
|
})[0], i = $.useRef(e);
|
|
1033
1055
|
$.useEffect(function() {
|
|
1034
1056
|
i.current = e;
|
|
1035
1057
|
}, [e]), $.useEffect(function() {
|
|
1036
1058
|
if (e.inert) {
|
|
1037
1059
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
1038
|
-
var p =
|
|
1060
|
+
var p = Hr([e.lockRef.current], (e.shards || []).map(bt), !0).filter(Boolean);
|
|
1039
1061
|
return p.forEach(function(b) {
|
|
1040
1062
|
return b.classList.add("allow-interactivity-".concat(a));
|
|
1041
1063
|
}), function() {
|
|
@@ -1048,81 +1070,81 @@ function wn(e) {
|
|
|
1048
1070
|
var c = $.useCallback(function(p, b) {
|
|
1049
1071
|
if ("touches" in p && p.touches.length === 2)
|
|
1050
1072
|
return !i.current.allowPinchZoom;
|
|
1051
|
-
var g =
|
|
1073
|
+
var g = me(p), C = t.current, S = "deltaX" in p ? p.deltaX : C[0] - g[0], E = "deltaY" in p ? p.deltaY : C[1] - g[1], A, I = p.target, O = Math.abs(S) > Math.abs(E) ? "h" : "v";
|
|
1052
1074
|
if ("touches" in p && O === "h" && I.type === "range")
|
|
1053
1075
|
return !1;
|
|
1054
1076
|
var x = vt(O, I);
|
|
1055
1077
|
if (!x)
|
|
1056
1078
|
return !0;
|
|
1057
|
-
if (x ?
|
|
1079
|
+
if (x ? A = O : (A = O === "v" ? "h" : "v", x = vt(O, I)), !x)
|
|
1058
1080
|
return !1;
|
|
1059
|
-
if (!o.current && "changedTouches" in p && (S || E) && (o.current =
|
|
1081
|
+
if (!o.current && "changedTouches" in p && (S || E) && (o.current = A), !A)
|
|
1060
1082
|
return !0;
|
|
1061
|
-
var
|
|
1062
|
-
return
|
|
1063
|
-
}, []),
|
|
1083
|
+
var P = o.current || A;
|
|
1084
|
+
return _n(P, b, p, P === "h" ? S : E, !0);
|
|
1085
|
+
}, []), s = $.useCallback(function(p) {
|
|
1064
1086
|
var b = p;
|
|
1065
1087
|
if (!(!ee.length || ee[ee.length - 1] !== n)) {
|
|
1066
|
-
var g = "deltaY" in b ? ht(b) :
|
|
1067
|
-
return
|
|
1088
|
+
var g = "deltaY" in b ? ht(b) : me(b), C = r.current.filter(function(A) {
|
|
1089
|
+
return A.name === b.type && A.target === b.target && $n(A.delta, g);
|
|
1068
1090
|
})[0];
|
|
1069
|
-
if (
|
|
1091
|
+
if (C && C.should) {
|
|
1070
1092
|
b.cancelable && b.preventDefault();
|
|
1071
1093
|
return;
|
|
1072
1094
|
}
|
|
1073
|
-
if (!
|
|
1074
|
-
var S = (i.current.shards || []).map(bt).filter(Boolean).filter(function(
|
|
1075
|
-
return
|
|
1095
|
+
if (!C) {
|
|
1096
|
+
var S = (i.current.shards || []).map(bt).filter(Boolean).filter(function(A) {
|
|
1097
|
+
return A.contains(b.target);
|
|
1076
1098
|
}), E = S.length > 0 ? c(b, S[0]) : !i.current.noIsolation;
|
|
1077
1099
|
E && b.cancelable && b.preventDefault();
|
|
1078
1100
|
}
|
|
1079
1101
|
}
|
|
1080
|
-
}, []),
|
|
1081
|
-
var S = { name: p, delta: b, target: g, should:
|
|
1102
|
+
}, []), l = $.useCallback(function(p, b, g, C) {
|
|
1103
|
+
var S = { name: p, delta: b, target: g, should: C };
|
|
1082
1104
|
r.current.push(S), setTimeout(function() {
|
|
1083
1105
|
r.current = r.current.filter(function(E) {
|
|
1084
1106
|
return E !== S;
|
|
1085
1107
|
});
|
|
1086
1108
|
}, 1);
|
|
1087
1109
|
}, []), u = $.useCallback(function(p) {
|
|
1088
|
-
t.current =
|
|
1110
|
+
t.current = me(p), o.current = void 0;
|
|
1089
1111
|
}, []), d = $.useCallback(function(p) {
|
|
1090
|
-
|
|
1112
|
+
l(p.type, ht(p), p.target, c(p, e.lockRef.current));
|
|
1091
1113
|
}, []), f = $.useCallback(function(p) {
|
|
1092
|
-
|
|
1114
|
+
l(p.type, me(p), p.target, c(p, e.lockRef.current));
|
|
1093
1115
|
}, []);
|
|
1094
1116
|
$.useEffect(function() {
|
|
1095
1117
|
return ee.push(n), e.setCallbacks({
|
|
1096
1118
|
onScrollCapture: d,
|
|
1097
1119
|
onWheelCapture: d,
|
|
1098
1120
|
onTouchMoveCapture: f
|
|
1099
|
-
}), document.addEventListener("wheel",
|
|
1121
|
+
}), document.addEventListener("wheel", s, J), document.addEventListener("touchmove", s, J), document.addEventListener("touchstart", u, J), function() {
|
|
1100
1122
|
ee = ee.filter(function(p) {
|
|
1101
1123
|
return p !== n;
|
|
1102
|
-
}), document.removeEventListener("wheel",
|
|
1124
|
+
}), document.removeEventListener("wheel", s, J), document.removeEventListener("touchmove", s, J), document.removeEventListener("touchstart", u, J);
|
|
1103
1125
|
};
|
|
1104
1126
|
}, []);
|
|
1105
1127
|
var v = e.removeScrollBar, m = e.inert;
|
|
1106
1128
|
return $.createElement(
|
|
1107
1129
|
$.Fragment,
|
|
1108
1130
|
null,
|
|
1109
|
-
m ? $.createElement(n, { styles:
|
|
1110
|
-
v ? $.createElement(
|
|
1131
|
+
m ? $.createElement(n, { styles: wn(a) }) : null,
|
|
1132
|
+
v ? $.createElement(fn, { gapMode: "margin" }) : null
|
|
1111
1133
|
);
|
|
1112
1134
|
}
|
|
1113
|
-
const
|
|
1135
|
+
const En = Qr(Nt, Sn);
|
|
1114
1136
|
var Mt = $.forwardRef(function(e, r) {
|
|
1115
|
-
return $.createElement(
|
|
1137
|
+
return $.createElement(Te, z({}, e, { ref: r, sideCar: En }));
|
|
1116
1138
|
});
|
|
1117
|
-
Mt.classNames =
|
|
1118
|
-
var
|
|
1139
|
+
Mt.classNames = Te.classNames;
|
|
1140
|
+
var xn = function(e) {
|
|
1119
1141
|
if (typeof document > "u")
|
|
1120
1142
|
return null;
|
|
1121
1143
|
var r = Array.isArray(e) ? e[0] : e;
|
|
1122
1144
|
return r.ownerDocument.body;
|
|
1123
|
-
}, te = /* @__PURE__ */ new WeakMap(),
|
|
1145
|
+
}, te = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = {}, je = 0, It = function(e) {
|
|
1124
1146
|
return e && (e.host || It(e.parentNode));
|
|
1125
|
-
},
|
|
1147
|
+
}, Pn = function(e, r) {
|
|
1126
1148
|
return r.map(function(t) {
|
|
1127
1149
|
if (e.contains(t))
|
|
1128
1150
|
return t;
|
|
@@ -1131,21 +1153,21 @@ var Sn = function(e) {
|
|
|
1131
1153
|
}).filter(function(t) {
|
|
1132
1154
|
return !!t;
|
|
1133
1155
|
});
|
|
1134
|
-
},
|
|
1135
|
-
var a =
|
|
1136
|
-
|
|
1137
|
-
var n =
|
|
1138
|
-
!d || c.has(d) || (c.add(d),
|
|
1156
|
+
}, Cn = function(e, r, t, o) {
|
|
1157
|
+
var a = Pn(r, Array.isArray(e) ? e : [e]);
|
|
1158
|
+
_e[t] || (_e[t] = /* @__PURE__ */ new WeakMap());
|
|
1159
|
+
var n = _e[t], i = [], c = /* @__PURE__ */ new Set(), s = new Set(a), l = function(d) {
|
|
1160
|
+
!d || c.has(d) || (c.add(d), l(d.parentNode));
|
|
1139
1161
|
};
|
|
1140
|
-
a.forEach(
|
|
1162
|
+
a.forEach(l);
|
|
1141
1163
|
var u = function(d) {
|
|
1142
|
-
!d ||
|
|
1164
|
+
!d || s.has(d) || Array.prototype.forEach.call(d.children, function(f) {
|
|
1143
1165
|
if (c.has(f))
|
|
1144
1166
|
u(f);
|
|
1145
1167
|
else
|
|
1146
1168
|
try {
|
|
1147
1169
|
var v = f.getAttribute(o), m = v !== null && v !== "false", p = (te.get(f) || 0) + 1, b = (n.get(f) || 0) + 1;
|
|
1148
|
-
te.set(f, p), n.set(f, b), i.push(f), p === 1 && m &&
|
|
1170
|
+
te.set(f, p), n.set(f, b), i.push(f), p === 1 && m && ge.set(f, !0), b === 1 && f.setAttribute(t, "true"), m || f.setAttribute(o, "true");
|
|
1149
1171
|
} catch (g) {
|
|
1150
1172
|
console.error("aria-hidden: cannot operate on ", f, g);
|
|
1151
1173
|
}
|
|
@@ -1154,32 +1176,32 @@ var Sn = function(e) {
|
|
|
1154
1176
|
return u(r), c.clear(), je++, function() {
|
|
1155
1177
|
i.forEach(function(d) {
|
|
1156
1178
|
var f = te.get(d) - 1, v = n.get(d) - 1;
|
|
1157
|
-
te.set(d, f), n.set(d, v), f || (
|
|
1158
|
-
}), je--, je || (te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(),
|
|
1179
|
+
te.set(d, f), n.set(d, v), f || (ge.has(d) || d.removeAttribute(o), ge.delete(d)), v || d.removeAttribute(t);
|
|
1180
|
+
}), je--, je || (te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = {});
|
|
1159
1181
|
};
|
|
1160
|
-
},
|
|
1182
|
+
}, An = function(e, r, t) {
|
|
1161
1183
|
t === void 0 && (t = "data-aria-hidden");
|
|
1162
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1163
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))),
|
|
1184
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = xn(e);
|
|
1185
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Cn(o, a, t, "aria-hidden")) : function() {
|
|
1164
1186
|
return null;
|
|
1165
1187
|
};
|
|
1166
1188
|
};
|
|
1167
|
-
const kt = "Dialog", [Ft,
|
|
1168
|
-
const { __scopeDialog: r, children: t, open: o, defaultOpen: a, onOpenChange: n, modal: i = !0 } = e, c =
|
|
1189
|
+
const kt = "Dialog", [Ft, _a] = xt(kt), [Tn, j] = Ft(kt), Nn = (e) => {
|
|
1190
|
+
const { __scopeDialog: r, children: t, open: o, defaultOpen: a, onOpenChange: n, modal: i = !0 } = e, c = T(null), s = T(null), [l = !1, u] = gr({
|
|
1169
1191
|
prop: o,
|
|
1170
1192
|
defaultProp: a,
|
|
1171
1193
|
onChange: n
|
|
1172
1194
|
});
|
|
1173
|
-
return /* @__PURE__ */ h(
|
|
1195
|
+
return /* @__PURE__ */ h(Tn, {
|
|
1174
1196
|
scope: r,
|
|
1175
1197
|
triggerRef: c,
|
|
1176
|
-
contentRef:
|
|
1198
|
+
contentRef: s,
|
|
1177
1199
|
contentId: Oe(),
|
|
1178
1200
|
titleId: Oe(),
|
|
1179
1201
|
descriptionId: Oe(),
|
|
1180
|
-
open:
|
|
1202
|
+
open: l,
|
|
1181
1203
|
onOpenChange: u,
|
|
1182
|
-
onOpenToggle:
|
|
1204
|
+
onOpenToggle: ie(
|
|
1183
1205
|
() => u(
|
|
1184
1206
|
(d) => !d
|
|
1185
1207
|
),
|
|
@@ -1189,8 +1211,8 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1189
1211
|
),
|
|
1190
1212
|
modal: i
|
|
1191
1213
|
}, t);
|
|
1192
|
-
},
|
|
1193
|
-
const { __scopeDialog: t, ...o } = e, a = j(
|
|
1214
|
+
}, Dn = "DialogTrigger", On = /* @__PURE__ */ w((e, r) => {
|
|
1215
|
+
const { __scopeDialog: t, ...o } = e, a = j(Dn, t), n = k(r, a.triggerRef);
|
|
1194
1216
|
return /* @__PURE__ */ h(F.button, y({
|
|
1195
1217
|
type: "button",
|
|
1196
1218
|
"aria-haspopup": "dialog",
|
|
@@ -1201,31 +1223,31 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1201
1223
|
ref: n,
|
|
1202
1224
|
onClick: L(e.onClick, a.onOpenToggle)
|
|
1203
1225
|
}));
|
|
1204
|
-
}), jt = "DialogPortal", [
|
|
1226
|
+
}), jt = "DialogPortal", [Ln, Wt] = Ft(jt, {
|
|
1205
1227
|
forceMount: void 0
|
|
1206
|
-
}),
|
|
1228
|
+
}), Rn = (e) => {
|
|
1207
1229
|
const { __scopeDialog: r, forceMount: t, children: o, container: a } = e, n = j(jt, r);
|
|
1208
|
-
return /* @__PURE__ */ h(
|
|
1230
|
+
return /* @__PURE__ */ h(Ln, {
|
|
1209
1231
|
scope: r,
|
|
1210
1232
|
forceMount: t
|
|
1211
1233
|
}, Z.map(
|
|
1212
1234
|
o,
|
|
1213
1235
|
(i) => /* @__PURE__ */ h(q, {
|
|
1214
1236
|
present: t || n.open
|
|
1215
|
-
}, /* @__PURE__ */ h(
|
|
1237
|
+
}, /* @__PURE__ */ h(jr, {
|
|
1216
1238
|
asChild: !0,
|
|
1217
1239
|
container: a
|
|
1218
1240
|
}, i))
|
|
1219
1241
|
));
|
|
1220
|
-
},
|
|
1221
|
-
const t = Wt(
|
|
1242
|
+
}, Xe = "DialogOverlay", Mn = /* @__PURE__ */ w((e, r) => {
|
|
1243
|
+
const t = Wt(Xe, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = j(Xe, e.__scopeDialog);
|
|
1222
1244
|
return n.modal ? /* @__PURE__ */ h(q, {
|
|
1223
1245
|
present: o || n.open
|
|
1224
|
-
}, /* @__PURE__ */ h(
|
|
1246
|
+
}, /* @__PURE__ */ h(In, y({}, a, {
|
|
1225
1247
|
ref: r
|
|
1226
1248
|
}))) : null;
|
|
1227
|
-
}),
|
|
1228
|
-
const { __scopeDialog: t, ...o } = e, a = j(
|
|
1249
|
+
}), In = /* @__PURE__ */ w((e, r) => {
|
|
1250
|
+
const { __scopeDialog: t, ...o } = e, a = j(Xe, t);
|
|
1229
1251
|
return (
|
|
1230
1252
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1231
1253
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -1245,20 +1267,20 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1245
1267
|
}
|
|
1246
1268
|
})))
|
|
1247
1269
|
);
|
|
1248
|
-
}),
|
|
1249
|
-
const t = Wt(
|
|
1270
|
+
}), ce = "DialogContent", kn = /* @__PURE__ */ w((e, r) => {
|
|
1271
|
+
const t = Wt(ce, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, n = j(ce, e.__scopeDialog);
|
|
1250
1272
|
return /* @__PURE__ */ h(q, {
|
|
1251
1273
|
present: o || n.open
|
|
1252
|
-
}, n.modal ? /* @__PURE__ */ h(
|
|
1274
|
+
}, n.modal ? /* @__PURE__ */ h(Fn, y({}, a, {
|
|
1253
1275
|
ref: r
|
|
1254
|
-
})) : /* @__PURE__ */ h(
|
|
1276
|
+
})) : /* @__PURE__ */ h(jn, y({}, a, {
|
|
1255
1277
|
ref: r
|
|
1256
1278
|
})));
|
|
1257
|
-
}),
|
|
1258
|
-
const t = j(
|
|
1259
|
-
return
|
|
1279
|
+
}), Fn = /* @__PURE__ */ w((e, r) => {
|
|
1280
|
+
const t = j(ce, e.__scopeDialog), o = T(null), a = k(r, t.contentRef, o);
|
|
1281
|
+
return N(() => {
|
|
1260
1282
|
const n = o.current;
|
|
1261
|
-
if (n) return
|
|
1283
|
+
if (n) return An(n);
|
|
1262
1284
|
}, []), /* @__PURE__ */ h(zt, y({}, e, {
|
|
1263
1285
|
ref: a,
|
|
1264
1286
|
trapFocus: t.open,
|
|
@@ -1276,8 +1298,8 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1276
1298
|
(n) => n.preventDefault()
|
|
1277
1299
|
)
|
|
1278
1300
|
}));
|
|
1279
|
-
}),
|
|
1280
|
-
const t = j(
|
|
1301
|
+
}), jn = /* @__PURE__ */ w((e, r) => {
|
|
1302
|
+
const t = j(ce, e.__scopeDialog), o = T(!1), a = T(!1);
|
|
1281
1303
|
return /* @__PURE__ */ h(zt, y({}, e, {
|
|
1282
1304
|
ref: r,
|
|
1283
1305
|
trapFocus: !1,
|
|
@@ -1293,44 +1315,44 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1293
1315
|
onInteractOutside: (n) => {
|
|
1294
1316
|
var i, c;
|
|
1295
1317
|
(i = e.onInteractOutside) === null || i === void 0 || i.call(e, n), n.defaultPrevented || (o.current = !0, n.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
1296
|
-
const
|
|
1297
|
-
((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(
|
|
1318
|
+
const s = n.target;
|
|
1319
|
+
((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(s)) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
|
|
1298
1320
|
}
|
|
1299
1321
|
}));
|
|
1300
1322
|
}), zt = /* @__PURE__ */ w((e, r) => {
|
|
1301
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...i } = e, c = j(
|
|
1302
|
-
return
|
|
1323
|
+
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...i } = e, c = j(ce, t), s = T(null), l = k(r, s);
|
|
1324
|
+
return Ur(), /* @__PURE__ */ h(Qe, null, /* @__PURE__ */ h(Or, {
|
|
1303
1325
|
asChild: !0,
|
|
1304
1326
|
loop: !0,
|
|
1305
1327
|
trapped: o,
|
|
1306
1328
|
onMountAutoFocus: a,
|
|
1307
1329
|
onUnmountAutoFocus: n
|
|
1308
|
-
}, /* @__PURE__ */ h(
|
|
1330
|
+
}, /* @__PURE__ */ h(Tr, y({
|
|
1309
1331
|
role: "dialog",
|
|
1310
1332
|
id: c.contentId,
|
|
1311
1333
|
"aria-describedby": c.descriptionId,
|
|
1312
1334
|
"aria-labelledby": c.titleId,
|
|
1313
1335
|
"data-state": tt(c.open)
|
|
1314
1336
|
}, i, {
|
|
1315
|
-
ref:
|
|
1337
|
+
ref: l,
|
|
1316
1338
|
onDismiss: () => c.onOpenChange(!1)
|
|
1317
1339
|
}))), !1);
|
|
1318
|
-
}),
|
|
1319
|
-
const { __scopeDialog: t, ...o } = e, a = j(
|
|
1340
|
+
}), Ut = "DialogTitle", Wn = /* @__PURE__ */ w((e, r) => {
|
|
1341
|
+
const { __scopeDialog: t, ...o } = e, a = j(Ut, t);
|
|
1320
1342
|
return /* @__PURE__ */ h(F.h2, y({
|
|
1321
1343
|
id: a.titleId
|
|
1322
1344
|
}, o, {
|
|
1323
1345
|
ref: r
|
|
1324
1346
|
}));
|
|
1325
|
-
}),
|
|
1326
|
-
const { __scopeDialog: t, ...o } = e, a = j(
|
|
1347
|
+
}), zn = "DialogDescription", Un = /* @__PURE__ */ w((e, r) => {
|
|
1348
|
+
const { __scopeDialog: t, ...o } = e, a = j(zn, t);
|
|
1327
1349
|
return /* @__PURE__ */ h(F.p, y({
|
|
1328
1350
|
id: a.descriptionId
|
|
1329
1351
|
}, o, {
|
|
1330
1352
|
ref: r
|
|
1331
1353
|
}));
|
|
1332
|
-
}),
|
|
1333
|
-
const { __scopeDialog: t, ...o } = e, a = j(
|
|
1354
|
+
}), Hn = "DialogClose", Yn = /* @__PURE__ */ w((e, r) => {
|
|
1355
|
+
const { __scopeDialog: t, ...o } = e, a = j(Hn, t);
|
|
1334
1356
|
return /* @__PURE__ */ h(F.button, y({
|
|
1335
1357
|
type: "button"
|
|
1336
1358
|
}, o, {
|
|
@@ -1344,11 +1366,17 @@ const kt = "Dialog", [Ft, ga] = xt(kt), [Pn, j] = Ft(kt), Tn = (e) => {
|
|
|
1344
1366
|
function tt(e) {
|
|
1345
1367
|
return e ? "open" : "closed";
|
|
1346
1368
|
}
|
|
1347
|
-
const
|
|
1348
|
-
|
|
1369
|
+
const Bn = "DialogTitleWarning";
|
|
1370
|
+
vr(Bn, {
|
|
1371
|
+
contentName: ce,
|
|
1372
|
+
titleName: Ut,
|
|
1373
|
+
docsSlug: "dialog"
|
|
1374
|
+
});
|
|
1375
|
+
const Xn = Nn, Vn = On, qn = Rn, Kn = Mn, Gn = kn, mt = Wn, Zn = Un, Qn = Yn;
|
|
1376
|
+
function Jn(e) {
|
|
1349
1377
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1350
1378
|
}
|
|
1351
|
-
var
|
|
1379
|
+
var Ht = { exports: {} };
|
|
1352
1380
|
/*!
|
|
1353
1381
|
Copyright (c) 2018 Jed Watson.
|
|
1354
1382
|
Licensed under the MIT License (MIT), see
|
|
@@ -1383,24 +1411,24 @@ var Ut = { exports: {} };
|
|
|
1383
1411
|
}
|
|
1384
1412
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1385
1413
|
})();
|
|
1386
|
-
})(
|
|
1387
|
-
var
|
|
1388
|
-
const Q = /* @__PURE__ */
|
|
1414
|
+
})(Ht);
|
|
1415
|
+
var eo = Ht.exports;
|
|
1416
|
+
const Q = /* @__PURE__ */ Jn(eo), Yt = ae(null), to = {}, ro = "_drawerSmallScreenAnimation_10vdf_1", no = "_drawerLargeScreenAnimation_10vdf_1", oo = "_slideDown_10vdf_1", ao = "_overlayAnimation_10vdf_1", co = {
|
|
1389
1417
|
"purpur-drawer-content": "_purpur-drawer-content_10vdf_1",
|
|
1390
|
-
drawerSmallScreenAnimation:
|
|
1391
|
-
drawerLargeScreenAnimation:
|
|
1418
|
+
drawerSmallScreenAnimation: ro,
|
|
1419
|
+
drawerLargeScreenAnimation: no,
|
|
1392
1420
|
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_10vdf_22",
|
|
1393
1421
|
"purpur-drawer-content__drawer-frame": "_purpur-drawer-content__drawer-frame_10vdf_27",
|
|
1394
|
-
slideDown:
|
|
1422
|
+
slideDown: oo,
|
|
1395
1423
|
"purpur-drawer-content__description": "_purpur-drawer-content__description_10vdf_37",
|
|
1396
1424
|
"purpur-drawer-overlay": "_purpur-drawer-overlay_10vdf_48",
|
|
1397
|
-
overlayAnimation:
|
|
1398
|
-
},
|
|
1425
|
+
overlayAnimation: ao
|
|
1426
|
+
}, io = {
|
|
1399
1427
|
"purpur-drawer-container--header": "_purpur-drawer-container--header_1r6tb_1",
|
|
1400
1428
|
"purpur-drawer-container--body": "_purpur-drawer-container--body_1r6tb_5",
|
|
1401
1429
|
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1r6tb_8",
|
|
1402
1430
|
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1r6tb_11"
|
|
1403
|
-
},
|
|
1431
|
+
}, so = Q.bind(io), We = "purpur-drawer-container", ne = w(
|
|
1404
1432
|
({
|
|
1405
1433
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1406
1434
|
children: r,
|
|
@@ -1409,7 +1437,7 @@ const Q = /* @__PURE__ */ Zn(Qn), Ht = de(null), Jn = {}, eo = "_drawerSmallScre
|
|
|
1409
1437
|
stickyFooter: a,
|
|
1410
1438
|
...n
|
|
1411
1439
|
}, i) => {
|
|
1412
|
-
const c =
|
|
1440
|
+
const c = so([
|
|
1413
1441
|
t,
|
|
1414
1442
|
We,
|
|
1415
1443
|
{
|
|
@@ -1423,7 +1451,7 @@ const Q = /* @__PURE__ */ Zn(Qn), Ht = de(null), Jn = {}, eo = "_drawerSmallScre
|
|
|
1423
1451
|
}
|
|
1424
1452
|
);
|
|
1425
1453
|
ne.displayName = "DrawerContainer";
|
|
1426
|
-
const
|
|
1454
|
+
const lo = {
|
|
1427
1455
|
"purpur-drawer-frame": "_purpur-drawer-frame_jj7dt_1",
|
|
1428
1456
|
"purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_jj7dt_17",
|
|
1429
1457
|
"purpur-drawer-frame__header": "_purpur-drawer-frame__header_jj7dt_20",
|
|
@@ -1431,28 +1459,28 @@ const io = {
|
|
|
1431
1459
|
"purpur-drawer-frame__footer": "_purpur-drawer-frame__footer_jj7dt_27",
|
|
1432
1460
|
"purpur-drawer-frame__content-container": "_purpur-drawer-frame__content-container_jj7dt_30",
|
|
1433
1461
|
"purpur-drawer-frame__content-container--no-footer": "_purpur-drawer-frame__content-container--no-footer_jj7dt_35"
|
|
1434
|
-
},
|
|
1462
|
+
}, uo = {
|
|
1435
1463
|
"purpur-drawer-handle": "_purpur-drawer-handle_3n0ew_1"
|
|
1436
|
-
},
|
|
1437
|
-
onPointerDown: (
|
|
1438
|
-
e.current = { y:
|
|
1464
|
+
}, fo = (e, r, t, o, a, n) => ({
|
|
1465
|
+
onPointerDown: (l) => {
|
|
1466
|
+
e.current = { y: l.clientY };
|
|
1439
1467
|
},
|
|
1440
|
-
onPointerMove: (
|
|
1468
|
+
onPointerMove: (l) => {
|
|
1441
1469
|
if (!e.current)
|
|
1442
1470
|
return;
|
|
1443
|
-
const u =
|
|
1444
|
-
d ? (r.current = m, o(p)) : gt(m, 0) ? (r.current = m, t(),
|
|
1471
|
+
const u = l.clientY - e.current.y, d = !!r.current, f = Math.max(0, u), v = l.pointerType === "touch" ? 10 : 2, m = { y: f }, p = { originalEvent: l, delta: m };
|
|
1472
|
+
d ? (r.current = m, o(p)) : gt(m, 0) ? (r.current = m, t(), l.target.setPointerCapture(l.pointerId)) : Math.abs(u) > v && (e.current = null);
|
|
1445
1473
|
},
|
|
1446
|
-
onPointerUp: (
|
|
1447
|
-
const u = r.current, d =
|
|
1448
|
-
if (d.hasPointerCapture(
|
|
1449
|
-
const f =
|
|
1474
|
+
onPointerUp: (l) => {
|
|
1475
|
+
const u = r.current, d = l.target;
|
|
1476
|
+
if (d.hasPointerCapture(l.pointerId) && d.releasePointerCapture(l.pointerId), r.current = null, e.current = null, u) {
|
|
1477
|
+
const f = l.currentTarget, v = { originalEvent: l, delta: u };
|
|
1450
1478
|
gt(u, 0) && u.y > 200 ? n(v) : a(), f.addEventListener("click", (m) => m.preventDefault(), {
|
|
1451
1479
|
once: !0
|
|
1452
1480
|
});
|
|
1453
1481
|
}
|
|
1454
1482
|
}
|
|
1455
|
-
}), gt = (e, r = 0) => Math.abs(e.y) > r,
|
|
1483
|
+
}), gt = (e, r = 0) => Math.abs(e.y) > r, po = Q.bind(uo), vo = "purpur-drawer-handle", Bt = w(
|
|
1456
1484
|
({
|
|
1457
1485
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1458
1486
|
className: r,
|
|
@@ -1462,9 +1490,9 @@ const io = {
|
|
|
1462
1490
|
onSwipeEnd: n,
|
|
1463
1491
|
...i
|
|
1464
1492
|
}, c) => {
|
|
1465
|
-
const
|
|
1493
|
+
const s = po([r, vo]), l = Ue.useRef(null), u = Ue.useRef(null), { onPointerDown: d, onPointerMove: f, onPointerUp: v } = fo(
|
|
1466
1494
|
u,
|
|
1467
|
-
|
|
1495
|
+
l,
|
|
1468
1496
|
t,
|
|
1469
1497
|
o,
|
|
1470
1498
|
a,
|
|
@@ -1473,7 +1501,7 @@ const io = {
|
|
|
1473
1501
|
return /* @__PURE__ */ _(
|
|
1474
1502
|
"div",
|
|
1475
1503
|
{
|
|
1476
|
-
className:
|
|
1504
|
+
className: s,
|
|
1477
1505
|
"data-testid": e,
|
|
1478
1506
|
onPointerDown: d,
|
|
1479
1507
|
onPointerMove: f,
|
|
@@ -1484,17 +1512,11 @@ const io = {
|
|
|
1484
1512
|
);
|
|
1485
1513
|
}
|
|
1486
1514
|
);
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
PRIMARY: "primary",
|
|
1490
|
-
SECONDARY: "secondary",
|
|
1491
|
-
EXPRESSIVE: "expressive"
|
|
1492
|
-
}, vo = {
|
|
1493
|
-
SM: "sm",
|
|
1494
|
-
MD: "md",
|
|
1515
|
+
Bt.displayName = "DrawerHandle";
|
|
1516
|
+
const ho = {
|
|
1495
1517
|
LG: "lg"
|
|
1496
1518
|
};
|
|
1497
|
-
function
|
|
1519
|
+
function bo(e) {
|
|
1498
1520
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1499
1521
|
}
|
|
1500
1522
|
var Xt = { exports: {} };
|
|
@@ -1533,43 +1555,39 @@ var Xt = { exports: {} };
|
|
|
1533
1555
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1534
1556
|
})();
|
|
1535
1557
|
})(Xt);
|
|
1536
|
-
var
|
|
1537
|
-
const _t = /* @__PURE__ */
|
|
1558
|
+
var mo = Xt.exports;
|
|
1559
|
+
const _t = /* @__PURE__ */ bo(mo), go = "_rotate_1xozj_1", _o = "_dash_1xozj_1", se = {
|
|
1538
1560
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
1539
|
-
rotate:
|
|
1561
|
+
rotate: go,
|
|
1540
1562
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
1541
1563
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
1542
1564
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
1543
1565
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
1544
1566
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
1545
1567
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
1546
|
-
dash:
|
|
1568
|
+
dash: _o,
|
|
1547
1569
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
1548
1570
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
SM: "sm",
|
|
1553
|
-
MD: "md",
|
|
1554
|
-
LG: "lg"
|
|
1555
|
-
}, $o = ({
|
|
1571
|
+
}, le = "purpur-spinner", $o = {
|
|
1572
|
+
SM: "sm"
|
|
1573
|
+
}, wo = ({
|
|
1556
1574
|
["data-testid"]: e,
|
|
1557
1575
|
disabled: r = !1,
|
|
1558
1576
|
negative: t = !1,
|
|
1559
|
-
size: o =
|
|
1577
|
+
size: o = $o.SM,
|
|
1560
1578
|
...a
|
|
1561
1579
|
}) => /* @__PURE__ */ _(
|
|
1562
1580
|
"div",
|
|
1563
1581
|
{
|
|
1564
|
-
className: _t([
|
|
1582
|
+
className: _t([se[le], se[`${le}--${o}`]]),
|
|
1565
1583
|
"data-testid": e,
|
|
1566
1584
|
...a,
|
|
1567
1585
|
children: /* @__PURE__ */ _("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ _(
|
|
1568
1586
|
"circle",
|
|
1569
1587
|
{
|
|
1570
|
-
className: _t(
|
|
1571
|
-
[
|
|
1572
|
-
[
|
|
1588
|
+
className: _t(se[`${le}__circle`], {
|
|
1589
|
+
[se[`${le}__circle--disabled`]]: r,
|
|
1590
|
+
[se[`${le}__circle--negative`]]: t
|
|
1573
1591
|
}),
|
|
1574
1592
|
cx: "25",
|
|
1575
1593
|
cy: "25",
|
|
@@ -1578,10 +1596,10 @@ const _t = /* @__PURE__ */ ho(bo), mo = "_rotate_1xozj_1", go = "_dash_1xozj_1",
|
|
|
1578
1596
|
) })
|
|
1579
1597
|
}
|
|
1580
1598
|
);
|
|
1581
|
-
function
|
|
1599
|
+
function yo(e) {
|
|
1582
1600
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1583
1601
|
}
|
|
1584
|
-
var
|
|
1602
|
+
var Vt = { exports: {} };
|
|
1585
1603
|
/*!
|
|
1586
1604
|
Copyright (c) 2018 Jed Watson.
|
|
1587
1605
|
Licensed under the MIT License (MIT), see
|
|
@@ -1616,9 +1634,9 @@ var Bt = { exports: {} };
|
|
|
1616
1634
|
}
|
|
1617
1635
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1618
1636
|
})();
|
|
1619
|
-
})(
|
|
1620
|
-
var
|
|
1621
|
-
const
|
|
1637
|
+
})(Vt);
|
|
1638
|
+
var So = Vt.exports;
|
|
1639
|
+
const Eo = /* @__PURE__ */ yo(So), xo = {
|
|
1622
1640
|
"purpur-button": "_purpur-button_1acxn_1",
|
|
1623
1641
|
"purpur-button--sm": "_purpur-button--sm_1acxn_33",
|
|
1624
1642
|
"purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
|
|
@@ -1640,11 +1658,9 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1640
1658
|
"purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
|
|
1641
1659
|
"purpur-button--text": "_purpur-button--text_1acxn_175"
|
|
1642
1660
|
}, ze = {
|
|
1643
|
-
...po,
|
|
1644
|
-
DESTRUCTIVE: "destructive",
|
|
1645
1661
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1646
1662
|
TEXT: "text"
|
|
1647
|
-
},
|
|
1663
|
+
}, Po = Eo.bind(xo), K = "purpur-button", Co = ({
|
|
1648
1664
|
children: e,
|
|
1649
1665
|
className: r,
|
|
1650
1666
|
["data-testid"]: t,
|
|
@@ -1653,19 +1669,19 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1653
1669
|
iconOnly: n,
|
|
1654
1670
|
loading: i = !1,
|
|
1655
1671
|
negative: c = !1,
|
|
1656
|
-
onClick:
|
|
1657
|
-
size:
|
|
1672
|
+
onClick: s,
|
|
1673
|
+
size: l = "md",
|
|
1658
1674
|
variant: u,
|
|
1659
1675
|
type: d = "button",
|
|
1660
1676
|
...f
|
|
1661
1677
|
}, v) => {
|
|
1662
1678
|
if (n && u === "destructive")
|
|
1663
1679
|
return null;
|
|
1664
|
-
const m =
|
|
1680
|
+
const m = Po(
|
|
1665
1681
|
[
|
|
1666
1682
|
K,
|
|
1667
1683
|
`${K}--${c ? `${u}-negative` : u}`,
|
|
1668
|
-
`${K}--${
|
|
1684
|
+
`${K}--${l}`
|
|
1669
1685
|
],
|
|
1670
1686
|
{
|
|
1671
1687
|
[`${K}--icon-only`]: n,
|
|
@@ -1675,7 +1691,7 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1675
1691
|
},
|
|
1676
1692
|
r
|
|
1677
1693
|
), p = (g) => {
|
|
1678
|
-
o || i ? g.preventDefault() :
|
|
1694
|
+
o || i ? g.preventDefault() : s && s(g);
|
|
1679
1695
|
}, b = !!f["aria-disabled"] || o || i;
|
|
1680
1696
|
return /* @__PURE__ */ Y(
|
|
1681
1697
|
"button",
|
|
@@ -1688,7 +1704,7 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1688
1704
|
onClick: p,
|
|
1689
1705
|
...f,
|
|
1690
1706
|
children: [
|
|
1691
|
-
i && /* @__PURE__ */ _(
|
|
1707
|
+
i && /* @__PURE__ */ _(wo, { size: l === ho.LG ? "xs" : "xxs", negative: c, disabled: b }),
|
|
1692
1708
|
" ",
|
|
1693
1709
|
e
|
|
1694
1710
|
]
|
|
@@ -1696,10 +1712,10 @@ const So = /* @__PURE__ */ wo(yo), Eo = {
|
|
|
1696
1712
|
);
|
|
1697
1713
|
}, Ve = w(Co);
|
|
1698
1714
|
Ve.displayName = "Button";
|
|
1699
|
-
function
|
|
1715
|
+
function Ao(e) {
|
|
1700
1716
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1701
1717
|
}
|
|
1702
|
-
var
|
|
1718
|
+
var qt = { exports: {} };
|
|
1703
1719
|
/*!
|
|
1704
1720
|
Copyright (c) 2018 Jed Watson.
|
|
1705
1721
|
Licensed under the MIT License (MIT), see
|
|
@@ -1734,9 +1750,9 @@ var Vt = { exports: {} };
|
|
|
1734
1750
|
}
|
|
1735
1751
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1736
1752
|
})();
|
|
1737
|
-
})(
|
|
1738
|
-
var To =
|
|
1739
|
-
const
|
|
1753
|
+
})(qt);
|
|
1754
|
+
var To = qt.exports;
|
|
1755
|
+
const No = /* @__PURE__ */ Ao(To), $e = {
|
|
1740
1756
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
1741
1757
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
1742
1758
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -1754,14 +1770,8 @@ const Ao = /* @__PURE__ */ Po(To), ge = {
|
|
|
1754
1770
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
1755
1771
|
}, qe = {
|
|
1756
1772
|
TITLE100: "title-100",
|
|
1757
|
-
TITLE200: "title-200"
|
|
1758
|
-
|
|
1759
|
-
TITLE400: "title-400",
|
|
1760
|
-
TITLE500: "title-500",
|
|
1761
|
-
TITLE600: "title-600",
|
|
1762
|
-
TITLE700: "title-700",
|
|
1763
|
-
SUBSECTION100: "subsection-100"
|
|
1764
|
-
}, _e = "purpur-heading", Ke = ({
|
|
1773
|
+
TITLE200: "title-200"
|
|
1774
|
+
}, we = "purpur-heading", Ke = ({
|
|
1765
1775
|
["data-testid"]: e,
|
|
1766
1776
|
children: r,
|
|
1767
1777
|
className: t = "",
|
|
@@ -1771,22 +1781,22 @@ const Ao = /* @__PURE__ */ Po(To), ge = {
|
|
|
1771
1781
|
variant: i = qe.TITLE100,
|
|
1772
1782
|
...c
|
|
1773
1783
|
}) => {
|
|
1774
|
-
const
|
|
1784
|
+
const s = n, l = No([
|
|
1775
1785
|
t,
|
|
1776
|
-
|
|
1777
|
-
|
|
1786
|
+
$e[we],
|
|
1787
|
+
$e[`${we}--${i}`],
|
|
1778
1788
|
{
|
|
1779
|
-
[
|
|
1780
|
-
[
|
|
1789
|
+
[$e[`${we}--hyphens`]]: o,
|
|
1790
|
+
[$e[`${we}--negative`]]: a
|
|
1781
1791
|
}
|
|
1782
1792
|
]);
|
|
1783
|
-
return /* @__PURE__ */ _(
|
|
1793
|
+
return /* @__PURE__ */ _(s, { ...c, className: l, "data-testid": e, children: r });
|
|
1784
1794
|
};
|
|
1785
1795
|
Ke.displayName = "Heading";
|
|
1786
1796
|
function Do(e) {
|
|
1787
1797
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1788
1798
|
}
|
|
1789
|
-
var
|
|
1799
|
+
var Kt = { exports: {} };
|
|
1790
1800
|
/*!
|
|
1791
1801
|
Copyright (c) 2018 Jed Watson.
|
|
1792
1802
|
Licensed under the MIT License (MIT), see
|
|
@@ -1821,9 +1831,9 @@ var qt = { exports: {} };
|
|
|
1821
1831
|
}
|
|
1822
1832
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1823
1833
|
})();
|
|
1824
|
-
})(
|
|
1825
|
-
var
|
|
1826
|
-
const
|
|
1834
|
+
})(Kt);
|
|
1835
|
+
var Oo = Kt.exports;
|
|
1836
|
+
const Lo = /* @__PURE__ */ Do(Oo), Ro = {
|
|
1827
1837
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1828
1838
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1829
1839
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1831,52 +1841,52 @@ const Oo = /* @__PURE__ */ Do(No), Lo = {
|
|
|
1831
1841
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1832
1842
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1833
1843
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1834
|
-
},
|
|
1844
|
+
}, Mo = {
|
|
1835
1845
|
name: "arrow-left",
|
|
1836
1846
|
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>',
|
|
1837
1847
|
keywords: ["arrow-left"],
|
|
1838
1848
|
category: "utility"
|
|
1839
|
-
},
|
|
1849
|
+
}, Io = {
|
|
1840
1850
|
name: "close",
|
|
1841
1851
|
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>',
|
|
1842
1852
|
keywords: ["close"],
|
|
1843
1853
|
category: "utility"
|
|
1844
|
-
},
|
|
1854
|
+
}, Gt = (e) => /* @__PURE__ */ _(
|
|
1845
1855
|
rt,
|
|
1846
1856
|
{
|
|
1847
1857
|
...e,
|
|
1848
|
-
svg:
|
|
1858
|
+
svg: Mo
|
|
1849
1859
|
}
|
|
1850
1860
|
);
|
|
1851
|
-
|
|
1852
|
-
const
|
|
1861
|
+
Gt.displayName = "IconArrowLeft";
|
|
1862
|
+
const Zt = (e) => /* @__PURE__ */ _(
|
|
1853
1863
|
rt,
|
|
1854
1864
|
{
|
|
1855
1865
|
...e,
|
|
1856
|
-
svg:
|
|
1866
|
+
svg: Io
|
|
1857
1867
|
}
|
|
1858
1868
|
);
|
|
1859
|
-
|
|
1860
|
-
const
|
|
1869
|
+
Zt.displayName = "IconClose";
|
|
1870
|
+
const ko = Lo.bind(Ro), $t = "purpur-icon", Fo = "md", jo = (e) => e.filter((r) => Object.keys(r).length >= 1).map((r) => `${r.name}="${r.value}"`).join(" "), Wo = ({ content: e = "", title: r } = {}) => {
|
|
1861
1871
|
const t = [
|
|
1862
1872
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1863
1873
|
{ name: "fill", value: "currentColor" },
|
|
1864
1874
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1865
1875
|
r ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1866
1876
|
], o = r ? `<title>${r}</title>` : "";
|
|
1867
|
-
return `<svg ${
|
|
1868
|
-
},
|
|
1877
|
+
return `<svg ${jo(t)}>${o}${e}</svg>`;
|
|
1878
|
+
}, zo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), rt = ({
|
|
1869
1879
|
["data-testid"]: e,
|
|
1870
1880
|
svg: r,
|
|
1871
1881
|
allyTitle: t,
|
|
1872
1882
|
className: o,
|
|
1873
|
-
size: a =
|
|
1883
|
+
size: a = Fo,
|
|
1874
1884
|
...n
|
|
1875
1885
|
}) => {
|
|
1876
|
-
const i =
|
|
1877
|
-
content:
|
|
1886
|
+
const i = Wo({
|
|
1887
|
+
content: zo(r.svg),
|
|
1878
1888
|
title: t
|
|
1879
|
-
}), c =
|
|
1889
|
+
}), c = ko(o, $t, `${$t}--${a}`);
|
|
1880
1890
|
return /* @__PURE__ */ _(
|
|
1881
1891
|
"span",
|
|
1882
1892
|
{
|
|
@@ -1889,14 +1899,14 @@ const Io = Oo.bind(Lo), $t = "purpur-icon", ko = "md", Fo = (e) => e.filter((r)
|
|
|
1889
1899
|
);
|
|
1890
1900
|
};
|
|
1891
1901
|
rt.displayName = "Icon";
|
|
1892
|
-
const
|
|
1902
|
+
const Uo = {
|
|
1893
1903
|
"purpur-drawer-header__row": "_purpur-drawer-header__row_1yg5w_1",
|
|
1894
1904
|
"purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-button_1yg5w_6",
|
|
1895
1905
|
"purpur-drawer-header__left": "_purpur-drawer-header__left_1yg5w_9",
|
|
1896
1906
|
"purpur-drawer-header__right": "_purpur-drawer-header__right_1yg5w_12",
|
|
1897
1907
|
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_1yg5w_15",
|
|
1898
1908
|
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_1yg5w_18"
|
|
1899
|
-
}, G = Q.bind(
|
|
1909
|
+
}, G = Q.bind(Uo), H = "purpur-drawer-header", Qt = w(
|
|
1900
1910
|
({
|
|
1901
1911
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1902
1912
|
backButton: r,
|
|
@@ -1906,10 +1916,10 @@ const zo = {
|
|
|
1906
1916
|
closeButtonText: n,
|
|
1907
1917
|
onBackButtonClick: i,
|
|
1908
1918
|
title: c,
|
|
1909
|
-
...
|
|
1910
|
-
},
|
|
1919
|
+
...s
|
|
1920
|
+
}, l) => {
|
|
1911
1921
|
const u = G([a, H]);
|
|
1912
|
-
return /* @__PURE__ */ Y("div", { className: u, "data-testid": e, ref:
|
|
1922
|
+
return /* @__PURE__ */ Y("div", { className: u, "data-testid": e, ref: l, ...s, children: [
|
|
1913
1923
|
/* @__PURE__ */ Y(
|
|
1914
1924
|
"div",
|
|
1915
1925
|
{
|
|
@@ -1937,7 +1947,7 @@ const zo = {
|
|
|
1937
1947
|
size: "sm",
|
|
1938
1948
|
variant: o ? ze.TERTIARY_PURPLE : ze.TEXT,
|
|
1939
1949
|
children: [
|
|
1940
|
-
/* @__PURE__ */ _(
|
|
1950
|
+
/* @__PURE__ */ _(Gt, { size: "sm" }),
|
|
1941
1951
|
!o && t
|
|
1942
1952
|
]
|
|
1943
1953
|
}
|
|
@@ -1950,7 +1960,7 @@ const zo = {
|
|
|
1950
1960
|
children: c
|
|
1951
1961
|
}
|
|
1952
1962
|
) }) }),
|
|
1953
|
-
/* @__PURE__ */ _("div", { className: G(`${H}__right`), children: /* @__PURE__ */ _(
|
|
1963
|
+
/* @__PURE__ */ _("div", { className: G(`${H}__right`), children: /* @__PURE__ */ _(Qn, { asChild: !0, children: /* @__PURE__ */ _(
|
|
1954
1964
|
Ve,
|
|
1955
1965
|
{
|
|
1956
1966
|
"aria-label": n,
|
|
@@ -1958,7 +1968,7 @@ const zo = {
|
|
|
1958
1968
|
iconOnly: !0,
|
|
1959
1969
|
size: "sm",
|
|
1960
1970
|
variant: ze.TERTIARY_PURPLE,
|
|
1961
|
-
children: /* @__PURE__ */ _(
|
|
1971
|
+
children: /* @__PURE__ */ _(Zt, { size: "sm" })
|
|
1962
1972
|
}
|
|
1963
1973
|
) }) })
|
|
1964
1974
|
]
|
|
@@ -1977,13 +1987,13 @@ const zo = {
|
|
|
1977
1987
|
] });
|
|
1978
1988
|
}
|
|
1979
1989
|
);
|
|
1980
|
-
|
|
1981
|
-
const
|
|
1982
|
-
function
|
|
1983
|
-
const r =
|
|
1990
|
+
Qt.displayName = "DrawerHeader";
|
|
1991
|
+
const Ho = /* @__PURE__ */ ae(void 0);
|
|
1992
|
+
function Yo(e) {
|
|
1993
|
+
const r = ve(Ho);
|
|
1984
1994
|
return e || r || "ltr";
|
|
1985
1995
|
}
|
|
1986
|
-
function
|
|
1996
|
+
function Bo(e, [r, t]) {
|
|
1987
1997
|
return Math.min(t, Math.max(r, e));
|
|
1988
1998
|
}
|
|
1989
1999
|
function Xo(e, r) {
|
|
@@ -1992,35 +2002,35 @@ function Xo(e, r) {
|
|
|
1992
2002
|
return a ?? t;
|
|
1993
2003
|
}, e);
|
|
1994
2004
|
}
|
|
1995
|
-
const
|
|
1996
|
-
const { __scopeScrollArea: t, type: o = "hover", dir: a, scrollHideDelay: n = 600, ...i } = e, [c,
|
|
2005
|
+
const Jt = "ScrollArea", [er, $a] = xt(Jt), [Vo, U] = er(Jt), qo = /* @__PURE__ */ w((e, r) => {
|
|
2006
|
+
const { __scopeScrollArea: t, type: o = "hover", dir: a, scrollHideDelay: n = 600, ...i } = e, [c, s] = D(null), [l, u] = D(null), [d, f] = D(null), [v, m] = D(null), [p, b] = D(null), [g, C] = D(0), [S, E] = D(0), [A, I] = D(!1), [O, x] = D(!1), P = k(
|
|
1997
2007
|
r,
|
|
1998
|
-
(W) =>
|
|
1999
|
-
), R =
|
|
2000
|
-
return /* @__PURE__ */ h(
|
|
2008
|
+
(W) => s(W)
|
|
2009
|
+
), R = Yo(a);
|
|
2010
|
+
return /* @__PURE__ */ h(Vo, {
|
|
2001
2011
|
scope: t,
|
|
2002
2012
|
type: o,
|
|
2003
2013
|
dir: R,
|
|
2004
2014
|
scrollHideDelay: n,
|
|
2005
2015
|
scrollArea: c,
|
|
2006
|
-
viewport:
|
|
2016
|
+
viewport: l,
|
|
2007
2017
|
onViewportChange: u,
|
|
2008
2018
|
content: d,
|
|
2009
2019
|
onContentChange: f,
|
|
2010
2020
|
scrollbarX: v,
|
|
2011
2021
|
onScrollbarXChange: m,
|
|
2012
|
-
scrollbarXEnabled:
|
|
2022
|
+
scrollbarXEnabled: A,
|
|
2013
2023
|
onScrollbarXEnabledChange: I,
|
|
2014
2024
|
scrollbarY: p,
|
|
2015
2025
|
onScrollbarYChange: b,
|
|
2016
2026
|
scrollbarYEnabled: O,
|
|
2017
2027
|
onScrollbarYEnabledChange: x,
|
|
2018
|
-
onCornerWidthChange:
|
|
2028
|
+
onCornerWidthChange: C,
|
|
2019
2029
|
onCornerHeightChange: E
|
|
2020
2030
|
}, /* @__PURE__ */ h(F.div, y({
|
|
2021
2031
|
dir: R
|
|
2022
2032
|
}, i, {
|
|
2023
|
-
ref:
|
|
2033
|
+
ref: P,
|
|
2024
2034
|
style: {
|
|
2025
2035
|
position: "relative",
|
|
2026
2036
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
@@ -2029,9 +2039,9 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2029
2039
|
...e.style
|
|
2030
2040
|
}
|
|
2031
2041
|
})));
|
|
2032
|
-
}),
|
|
2033
|
-
const { __scopeScrollArea: t, children: o, ...a } = e, n = U(
|
|
2034
|
-
return /* @__PURE__ */ h(
|
|
2042
|
+
}), Ko = "ScrollAreaViewport", Go = /* @__PURE__ */ w((e, r) => {
|
|
2043
|
+
const { __scopeScrollArea: t, children: o, ...a } = e, n = U(Ko, t), i = T(null), c = k(r, i, n.onViewportChange);
|
|
2044
|
+
return /* @__PURE__ */ h(Qe, null, /* @__PURE__ */ h("style", {
|
|
2035
2045
|
dangerouslySetInnerHTML: {
|
|
2036
2046
|
__html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
|
|
2037
2047
|
}
|
|
@@ -2062,42 +2072,42 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2062
2072
|
display: "table"
|
|
2063
2073
|
}
|
|
2064
2074
|
}, o)));
|
|
2065
|
-
}),
|
|
2066
|
-
const { forceMount: t, ...o } = e, a = U(
|
|
2067
|
-
return
|
|
2075
|
+
}), B = "ScrollAreaScrollbar", Zo = /* @__PURE__ */ w((e, r) => {
|
|
2076
|
+
const { forceMount: t, ...o } = e, a = U(B, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: i } = a, c = e.orientation === "horizontal";
|
|
2077
|
+
return N(() => (c ? n(!0) : i(!0), () => {
|
|
2068
2078
|
c ? n(!1) : i(!1);
|
|
2069
2079
|
}), [
|
|
2070
2080
|
c,
|
|
2071
2081
|
n,
|
|
2072
2082
|
i
|
|
2073
|
-
]), a.type === "hover" ? /* @__PURE__ */ h(
|
|
2083
|
+
]), a.type === "hover" ? /* @__PURE__ */ h(Qo, y({}, o, {
|
|
2074
2084
|
ref: r,
|
|
2075
2085
|
forceMount: t
|
|
2076
|
-
})) : a.type === "scroll" ? /* @__PURE__ */ h(
|
|
2086
|
+
})) : a.type === "scroll" ? /* @__PURE__ */ h(Jo, y({}, o, {
|
|
2077
2087
|
ref: r,
|
|
2078
2088
|
forceMount: t
|
|
2079
|
-
})) : a.type === "auto" ? /* @__PURE__ */ h(
|
|
2089
|
+
})) : a.type === "auto" ? /* @__PURE__ */ h(tr, y({}, o, {
|
|
2080
2090
|
ref: r,
|
|
2081
2091
|
forceMount: t
|
|
2082
2092
|
})) : a.type === "always" ? /* @__PURE__ */ h(nt, y({}, o, {
|
|
2083
2093
|
ref: r
|
|
2084
2094
|
})) : null;
|
|
2085
|
-
}),
|
|
2086
|
-
const { forceMount: t, ...o } = e, a = U(
|
|
2087
|
-
return
|
|
2095
|
+
}), Qo = /* @__PURE__ */ w((e, r) => {
|
|
2096
|
+
const { forceMount: t, ...o } = e, a = U(B, e.__scopeScrollArea), [n, i] = D(!1);
|
|
2097
|
+
return N(() => {
|
|
2088
2098
|
const c = a.scrollArea;
|
|
2089
|
-
let
|
|
2099
|
+
let s = 0;
|
|
2090
2100
|
if (c) {
|
|
2091
|
-
const
|
|
2092
|
-
window.clearTimeout(
|
|
2101
|
+
const l = () => {
|
|
2102
|
+
window.clearTimeout(s), i(!0);
|
|
2093
2103
|
}, u = () => {
|
|
2094
|
-
|
|
2104
|
+
s = window.setTimeout(
|
|
2095
2105
|
() => i(!1),
|
|
2096
2106
|
a.scrollHideDelay
|
|
2097
2107
|
);
|
|
2098
2108
|
};
|
|
2099
|
-
return c.addEventListener("pointerenter",
|
|
2100
|
-
window.clearTimeout(
|
|
2109
|
+
return c.addEventListener("pointerenter", l), c.addEventListener("pointerleave", u), () => {
|
|
2110
|
+
window.clearTimeout(s), c.removeEventListener("pointerenter", l), c.removeEventListener("pointerleave", u);
|
|
2101
2111
|
};
|
|
2102
2112
|
}
|
|
2103
2113
|
}, [
|
|
@@ -2105,16 +2115,16 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2105
2115
|
a.scrollHideDelay
|
|
2106
2116
|
]), /* @__PURE__ */ h(q, {
|
|
2107
2117
|
present: t || n
|
|
2108
|
-
}, /* @__PURE__ */ h(
|
|
2118
|
+
}, /* @__PURE__ */ h(tr, y({
|
|
2109
2119
|
"data-state": n ? "visible" : "hidden"
|
|
2110
2120
|
}, o, {
|
|
2111
2121
|
ref: r
|
|
2112
2122
|
})));
|
|
2113
|
-
}),
|
|
2114
|
-
const { forceMount: t, ...o } = e, a = U(
|
|
2115
|
-
() =>
|
|
2123
|
+
}), Jo = /* @__PURE__ */ w((e, r) => {
|
|
2124
|
+
const { forceMount: t, ...o } = e, a = U(B, e.__scopeScrollArea), n = e.orientation === "horizontal", i = De(
|
|
2125
|
+
() => s("SCROLL_END"),
|
|
2116
2126
|
100
|
|
2117
|
-
), [c,
|
|
2127
|
+
), [c, s] = Xo("hidden", {
|
|
2118
2128
|
hidden: {
|
|
2119
2129
|
SCROLL: "scrolling"
|
|
2120
2130
|
},
|
|
@@ -2132,32 +2142,32 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2132
2142
|
POINTER_ENTER: "interacting"
|
|
2133
2143
|
}
|
|
2134
2144
|
});
|
|
2135
|
-
return
|
|
2145
|
+
return N(() => {
|
|
2136
2146
|
if (c === "idle") {
|
|
2137
|
-
const
|
|
2138
|
-
() =>
|
|
2147
|
+
const l = window.setTimeout(
|
|
2148
|
+
() => s("HIDE"),
|
|
2139
2149
|
a.scrollHideDelay
|
|
2140
2150
|
);
|
|
2141
|
-
return () => window.clearTimeout(
|
|
2151
|
+
return () => window.clearTimeout(l);
|
|
2142
2152
|
}
|
|
2143
2153
|
}, [
|
|
2144
2154
|
c,
|
|
2145
2155
|
a.scrollHideDelay,
|
|
2146
|
-
|
|
2147
|
-
]),
|
|
2148
|
-
const
|
|
2149
|
-
if (
|
|
2150
|
-
let d =
|
|
2156
|
+
s
|
|
2157
|
+
]), N(() => {
|
|
2158
|
+
const l = a.viewport, u = n ? "scrollLeft" : "scrollTop";
|
|
2159
|
+
if (l) {
|
|
2160
|
+
let d = l[u];
|
|
2151
2161
|
const f = () => {
|
|
2152
|
-
const v =
|
|
2153
|
-
d !== v && (
|
|
2162
|
+
const v = l[u];
|
|
2163
|
+
d !== v && (s("SCROLL"), i()), d = v;
|
|
2154
2164
|
};
|
|
2155
|
-
return
|
|
2165
|
+
return l.addEventListener("scroll", f), () => l.removeEventListener("scroll", f);
|
|
2156
2166
|
}
|
|
2157
2167
|
}, [
|
|
2158
2168
|
a.viewport,
|
|
2159
2169
|
n,
|
|
2160
|
-
|
|
2170
|
+
s,
|
|
2161
2171
|
i
|
|
2162
2172
|
]), /* @__PURE__ */ h(q, {
|
|
2163
2173
|
present: t || c !== "hidden"
|
|
@@ -2167,21 +2177,21 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2167
2177
|
ref: r,
|
|
2168
2178
|
onPointerEnter: L(
|
|
2169
2179
|
e.onPointerEnter,
|
|
2170
|
-
() =>
|
|
2180
|
+
() => s("POINTER_ENTER")
|
|
2171
2181
|
),
|
|
2172
2182
|
onPointerLeave: L(
|
|
2173
2183
|
e.onPointerLeave,
|
|
2174
|
-
() =>
|
|
2184
|
+
() => s("POINTER_LEAVE")
|
|
2175
2185
|
)
|
|
2176
2186
|
})));
|
|
2177
|
-
}),
|
|
2178
|
-
const t = U(
|
|
2187
|
+
}), tr = /* @__PURE__ */ w((e, r) => {
|
|
2188
|
+
const t = U(B, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, i] = D(!1), c = e.orientation === "horizontal", s = De(() => {
|
|
2179
2189
|
if (t.viewport) {
|
|
2180
|
-
const
|
|
2181
|
-
i(c ?
|
|
2190
|
+
const l = t.viewport.offsetWidth < t.viewport.scrollWidth, u = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
2191
|
+
i(c ? l : u);
|
|
2182
2192
|
}
|
|
2183
2193
|
}, 10);
|
|
2184
|
-
return
|
|
2194
|
+
return Ae(t.viewport, s), Ae(t.content, s), /* @__PURE__ */ h(q, {
|
|
2185
2195
|
present: o || n
|
|
2186
2196
|
}, /* @__PURE__ */ h(nt, y({
|
|
2187
2197
|
"data-state": n ? "visible" : "hidden"
|
|
@@ -2189,7 +2199,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2189
2199
|
ref: r
|
|
2190
2200
|
})));
|
|
2191
2201
|
}), nt = /* @__PURE__ */ w((e, r) => {
|
|
2192
|
-
const { orientation: t = "vertical", ...o } = e, a = U(
|
|
2202
|
+
const { orientation: t = "vertical", ...o } = e, a = U(B, e.__scopeScrollArea), n = T(null), i = T(0), [c, s] = D({
|
|
2193
2203
|
content: 0,
|
|
2194
2204
|
viewport: 0,
|
|
2195
2205
|
scrollbar: {
|
|
@@ -2197,19 +2207,19 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2197
2207
|
paddingStart: 0,
|
|
2198
2208
|
paddingEnd: 0
|
|
2199
2209
|
}
|
|
2200
|
-
}),
|
|
2210
|
+
}), l = or(c.viewport, c.content), u = {
|
|
2201
2211
|
...o,
|
|
2202
2212
|
sizes: c,
|
|
2203
|
-
onSizesChange:
|
|
2204
|
-
hasThumb:
|
|
2213
|
+
onSizesChange: s,
|
|
2214
|
+
hasThumb: l > 0 && l < 1,
|
|
2205
2215
|
onThumbChange: (f) => n.current = f,
|
|
2206
2216
|
onThumbPointerUp: () => i.current = 0,
|
|
2207
2217
|
onThumbPointerDown: (f) => i.current = f
|
|
2208
2218
|
};
|
|
2209
2219
|
function d(f, v) {
|
|
2210
|
-
return
|
|
2220
|
+
return aa(f, i.current, c, v);
|
|
2211
2221
|
}
|
|
2212
|
-
return t === "horizontal" ? /* @__PURE__ */ h(
|
|
2222
|
+
return t === "horizontal" ? /* @__PURE__ */ h(ea, y({}, u, {
|
|
2213
2223
|
ref: r,
|
|
2214
2224
|
onThumbPositionChange: () => {
|
|
2215
2225
|
if (a.viewport && n.current) {
|
|
@@ -2223,7 +2233,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2223
2233
|
onDragScroll: (f) => {
|
|
2224
2234
|
a.viewport && (a.viewport.scrollLeft = d(f, a.dir));
|
|
2225
2235
|
}
|
|
2226
|
-
})) : t === "vertical" ? /* @__PURE__ */ h(
|
|
2236
|
+
})) : t === "vertical" ? /* @__PURE__ */ h(ta, y({}, u, {
|
|
2227
2237
|
ref: r,
|
|
2228
2238
|
onThumbPositionChange: () => {
|
|
2229
2239
|
if (a.viewport && n.current) {
|
|
@@ -2238,22 +2248,22 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2238
2248
|
a.viewport && (a.viewport.scrollTop = d(f));
|
|
2239
2249
|
}
|
|
2240
2250
|
})) : null;
|
|
2241
|
-
}),
|
|
2242
|
-
const { sizes: t, onSizesChange: o, ...a } = e, n = U(
|
|
2243
|
-
return
|
|
2244
|
-
|
|
2251
|
+
}), ea = /* @__PURE__ */ w((e, r) => {
|
|
2252
|
+
const { sizes: t, onSizesChange: o, ...a } = e, n = U(B, e.__scopeScrollArea), [i, c] = D(), s = T(null), l = k(r, s, n.onScrollbarXChange);
|
|
2253
|
+
return N(() => {
|
|
2254
|
+
s.current && c(getComputedStyle(s.current));
|
|
2245
2255
|
}, [
|
|
2246
|
-
|
|
2247
|
-
]), /* @__PURE__ */ h(
|
|
2256
|
+
s
|
|
2257
|
+
]), /* @__PURE__ */ h(nr, y({
|
|
2248
2258
|
"data-orientation": "horizontal"
|
|
2249
2259
|
}, a, {
|
|
2250
|
-
ref:
|
|
2260
|
+
ref: l,
|
|
2251
2261
|
sizes: t,
|
|
2252
2262
|
style: {
|
|
2253
2263
|
bottom: 0,
|
|
2254
2264
|
left: n.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2255
2265
|
right: n.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2256
|
-
"--radix-scroll-area-thumb-width":
|
|
2266
|
+
"--radix-scroll-area-thumb-width": Ne(t) + "px",
|
|
2257
2267
|
...e.style
|
|
2258
2268
|
},
|
|
2259
2269
|
onThumbPointerDown: (u) => e.onThumbPointerDown(u.x),
|
|
@@ -2261,38 +2271,38 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2261
2271
|
onWheelScroll: (u, d) => {
|
|
2262
2272
|
if (n.viewport) {
|
|
2263
2273
|
const f = n.viewport.scrollLeft + u.deltaX;
|
|
2264
|
-
e.onWheelScroll(f),
|
|
2274
|
+
e.onWheelScroll(f), cr(f, d) && u.preventDefault();
|
|
2265
2275
|
}
|
|
2266
2276
|
},
|
|
2267
2277
|
onResize: () => {
|
|
2268
|
-
|
|
2278
|
+
s.current && n.viewport && i && o({
|
|
2269
2279
|
content: n.viewport.scrollWidth,
|
|
2270
2280
|
viewport: n.viewport.offsetWidth,
|
|
2271
2281
|
scrollbar: {
|
|
2272
|
-
size:
|
|
2282
|
+
size: s.current.clientWidth,
|
|
2273
2283
|
paddingStart: Ce(i.paddingLeft),
|
|
2274
2284
|
paddingEnd: Ce(i.paddingRight)
|
|
2275
2285
|
}
|
|
2276
2286
|
});
|
|
2277
2287
|
}
|
|
2278
2288
|
}));
|
|
2279
|
-
}),
|
|
2280
|
-
const { sizes: t, onSizesChange: o, ...a } = e, n = U(
|
|
2281
|
-
return
|
|
2282
|
-
|
|
2289
|
+
}), ta = /* @__PURE__ */ w((e, r) => {
|
|
2290
|
+
const { sizes: t, onSizesChange: o, ...a } = e, n = U(B, e.__scopeScrollArea), [i, c] = D(), s = T(null), l = k(r, s, n.onScrollbarYChange);
|
|
2291
|
+
return N(() => {
|
|
2292
|
+
s.current && c(getComputedStyle(s.current));
|
|
2283
2293
|
}, [
|
|
2284
|
-
|
|
2285
|
-
]), /* @__PURE__ */ h(
|
|
2294
|
+
s
|
|
2295
|
+
]), /* @__PURE__ */ h(nr, y({
|
|
2286
2296
|
"data-orientation": "vertical"
|
|
2287
2297
|
}, a, {
|
|
2288
|
-
ref:
|
|
2298
|
+
ref: l,
|
|
2289
2299
|
sizes: t,
|
|
2290
2300
|
style: {
|
|
2291
2301
|
top: 0,
|
|
2292
2302
|
right: n.dir === "ltr" ? 0 : void 0,
|
|
2293
2303
|
left: n.dir === "rtl" ? 0 : void 0,
|
|
2294
2304
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
2295
|
-
"--radix-scroll-area-thumb-height":
|
|
2305
|
+
"--radix-scroll-area-thumb-height": Ne(t) + "px",
|
|
2296
2306
|
...e.style
|
|
2297
2307
|
},
|
|
2298
2308
|
onThumbPointerDown: (u) => e.onThumbPointerDown(u.y),
|
|
@@ -2300,54 +2310,54 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2300
2310
|
onWheelScroll: (u, d) => {
|
|
2301
2311
|
if (n.viewport) {
|
|
2302
2312
|
const f = n.viewport.scrollTop + u.deltaY;
|
|
2303
|
-
e.onWheelScroll(f),
|
|
2313
|
+
e.onWheelScroll(f), cr(f, d) && u.preventDefault();
|
|
2304
2314
|
}
|
|
2305
2315
|
},
|
|
2306
2316
|
onResize: () => {
|
|
2307
|
-
|
|
2317
|
+
s.current && n.viewport && i && o({
|
|
2308
2318
|
content: n.viewport.scrollHeight,
|
|
2309
2319
|
viewport: n.viewport.offsetHeight,
|
|
2310
2320
|
scrollbar: {
|
|
2311
|
-
size:
|
|
2321
|
+
size: s.current.clientHeight,
|
|
2312
2322
|
paddingStart: Ce(i.paddingTop),
|
|
2313
2323
|
paddingEnd: Ce(i.paddingBottom)
|
|
2314
2324
|
}
|
|
2315
2325
|
});
|
|
2316
2326
|
}
|
|
2317
2327
|
}));
|
|
2318
|
-
}), [
|
|
2319
|
-
const { __scopeScrollArea: t, sizes: o, hasThumb: a, onThumbChange: n, onThumbPointerUp: i, onThumbPointerDown: c, onThumbPositionChange:
|
|
2328
|
+
}), [ra, rr] = er(B), nr = /* @__PURE__ */ w((e, r) => {
|
|
2329
|
+
const { __scopeScrollArea: t, sizes: o, hasThumb: a, onThumbChange: n, onThumbPointerUp: i, onThumbPointerDown: c, onThumbPositionChange: s, onDragScroll: l, onWheelScroll: u, onResize: d, ...f } = e, v = U(B, t), [m, p] = D(null), b = k(
|
|
2320
2330
|
r,
|
|
2321
|
-
(
|
|
2322
|
-
), g =
|
|
2323
|
-
function x(
|
|
2331
|
+
(P) => p(P)
|
|
2332
|
+
), g = T(null), C = T(""), S = v.viewport, E = o.content - o.viewport, A = M(u), I = M(s), O = De(d, 10);
|
|
2333
|
+
function x(P) {
|
|
2324
2334
|
if (g.current) {
|
|
2325
|
-
const R =
|
|
2326
|
-
|
|
2335
|
+
const R = P.clientX - g.current.left, W = P.clientY - g.current.top;
|
|
2336
|
+
l({
|
|
2327
2337
|
x: R,
|
|
2328
2338
|
y: W
|
|
2329
2339
|
});
|
|
2330
2340
|
}
|
|
2331
2341
|
}
|
|
2332
|
-
return
|
|
2333
|
-
const
|
|
2342
|
+
return N(() => {
|
|
2343
|
+
const P = (R) => {
|
|
2334
2344
|
const W = R.target;
|
|
2335
|
-
(m == null ? void 0 : m.contains(W)) &&
|
|
2345
|
+
(m == null ? void 0 : m.contains(W)) && A(R, E);
|
|
2336
2346
|
};
|
|
2337
|
-
return document.addEventListener("wheel",
|
|
2347
|
+
return document.addEventListener("wheel", P, {
|
|
2338
2348
|
passive: !1
|
|
2339
|
-
}), () => document.removeEventListener("wheel",
|
|
2349
|
+
}), () => document.removeEventListener("wheel", P, {
|
|
2340
2350
|
passive: !1
|
|
2341
2351
|
});
|
|
2342
2352
|
}, [
|
|
2343
2353
|
S,
|
|
2344
2354
|
m,
|
|
2345
2355
|
E,
|
|
2346
|
-
|
|
2347
|
-
]),
|
|
2356
|
+
A
|
|
2357
|
+
]), N(I, [
|
|
2348
2358
|
o,
|
|
2349
2359
|
I
|
|
2350
|
-
]),
|
|
2360
|
+
]), Ae(m, O), Ae(v.content, O), /* @__PURE__ */ h(ra, {
|
|
2351
2361
|
scope: t,
|
|
2352
2362
|
scrollbar: m,
|
|
2353
2363
|
hasThumb: a,
|
|
@@ -2361,36 +2371,36 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2361
2371
|
position: "absolute",
|
|
2362
2372
|
...f.style
|
|
2363
2373
|
},
|
|
2364
|
-
onPointerDown: L(e.onPointerDown, (
|
|
2365
|
-
|
|
2374
|
+
onPointerDown: L(e.onPointerDown, (P) => {
|
|
2375
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), g.current = m.getBoundingClientRect(), C.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", v.viewport && (v.viewport.style.scrollBehavior = "auto"), x(P));
|
|
2366
2376
|
}),
|
|
2367
2377
|
onPointerMove: L(e.onPointerMove, x),
|
|
2368
|
-
onPointerUp: L(e.onPointerUp, (
|
|
2369
|
-
const R =
|
|
2370
|
-
R.hasPointerCapture(
|
|
2378
|
+
onPointerUp: L(e.onPointerUp, (P) => {
|
|
2379
|
+
const R = P.target;
|
|
2380
|
+
R.hasPointerCapture(P.pointerId) && R.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = C.current, v.viewport && (v.viewport.style.scrollBehavior = ""), g.current = null;
|
|
2371
2381
|
})
|
|
2372
2382
|
})));
|
|
2373
|
-
}), Ge = "ScrollAreaThumb",
|
|
2374
|
-
const { forceMount: t, ...o } = e, a =
|
|
2383
|
+
}), Ge = "ScrollAreaThumb", na = /* @__PURE__ */ w((e, r) => {
|
|
2384
|
+
const { forceMount: t, ...o } = e, a = rr(Ge, e.__scopeScrollArea);
|
|
2375
2385
|
return /* @__PURE__ */ h(q, {
|
|
2376
2386
|
present: t || a.hasThumb
|
|
2377
|
-
}, /* @__PURE__ */ h(
|
|
2387
|
+
}, /* @__PURE__ */ h(oa, y({
|
|
2378
2388
|
ref: r
|
|
2379
2389
|
}, o)));
|
|
2380
|
-
}),
|
|
2381
|
-
const { __scopeScrollArea: t, style: o, ...a } = e, n = U(Ge, t), i =
|
|
2390
|
+
}), oa = /* @__PURE__ */ w((e, r) => {
|
|
2391
|
+
const { __scopeScrollArea: t, style: o, ...a } = e, n = U(Ge, t), i = rr(Ge, t), { onThumbPositionChange: c } = i, s = k(
|
|
2382
2392
|
r,
|
|
2383
2393
|
(d) => i.onThumbChange(d)
|
|
2384
|
-
),
|
|
2385
|
-
|
|
2394
|
+
), l = T(), u = De(() => {
|
|
2395
|
+
l.current && (l.current(), l.current = void 0);
|
|
2386
2396
|
}, 100);
|
|
2387
|
-
return
|
|
2397
|
+
return N(() => {
|
|
2388
2398
|
const d = n.viewport;
|
|
2389
2399
|
if (d) {
|
|
2390
2400
|
const f = () => {
|
|
2391
|
-
if (u(), !
|
|
2392
|
-
const v =
|
|
2393
|
-
|
|
2401
|
+
if (u(), !l.current) {
|
|
2402
|
+
const v = ca(d, c);
|
|
2403
|
+
l.current = v, c();
|
|
2394
2404
|
}
|
|
2395
2405
|
};
|
|
2396
2406
|
return c(), d.addEventListener("scroll", f), () => d.removeEventListener("scroll", f);
|
|
@@ -2402,7 +2412,7 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2402
2412
|
]), /* @__PURE__ */ h(F.div, y({
|
|
2403
2413
|
"data-state": i.hasThumb ? "visible" : "hidden"
|
|
2404
2414
|
}, a, {
|
|
2405
|
-
ref:
|
|
2415
|
+
ref: s,
|
|
2406
2416
|
style: {
|
|
2407
2417
|
width: "var(--radix-scroll-area-thumb-width)",
|
|
2408
2418
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
@@ -2421,54 +2431,54 @@ const Qt = "ScrollArea", [Jt, _a] = xt(Qt), [Bo, U] = Jt(Qt), Vo = /* @__PURE__
|
|
|
2421
2431
|
function Ce(e) {
|
|
2422
2432
|
return e ? parseInt(e, 10) : 0;
|
|
2423
2433
|
}
|
|
2424
|
-
function
|
|
2434
|
+
function or(e, r) {
|
|
2425
2435
|
const t = e / r;
|
|
2426
2436
|
return isNaN(t) ? 0 : t;
|
|
2427
2437
|
}
|
|
2428
|
-
function
|
|
2429
|
-
const r =
|
|
2438
|
+
function Ne(e) {
|
|
2439
|
+
const r = or(e.viewport, e.content), t = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - t) * r;
|
|
2430
2440
|
return Math.max(o, 18);
|
|
2431
2441
|
}
|
|
2432
|
-
function
|
|
2433
|
-
const a =
|
|
2442
|
+
function aa(e, r, t, o = "ltr") {
|
|
2443
|
+
const a = Ne(t), n = a / 2, i = r || n, c = a - i, s = t.scrollbar.paddingStart + i, l = t.scrollbar.size - t.scrollbar.paddingEnd - c, u = t.content - t.viewport, d = o === "ltr" ? [
|
|
2434
2444
|
0,
|
|
2435
2445
|
u
|
|
2436
2446
|
] : [
|
|
2437
2447
|
u * -1,
|
|
2438
2448
|
0
|
|
2439
2449
|
];
|
|
2440
|
-
return
|
|
2441
|
-
|
|
2442
|
-
|
|
2450
|
+
return ar([
|
|
2451
|
+
s,
|
|
2452
|
+
l
|
|
2443
2453
|
], d)(e);
|
|
2444
2454
|
}
|
|
2445
2455
|
function wt(e, r, t = "ltr") {
|
|
2446
|
-
const o =
|
|
2456
|
+
const o = Ne(r), a = r.scrollbar.paddingStart + r.scrollbar.paddingEnd, n = r.scrollbar.size - a, i = r.content - r.viewport, c = n - o, s = t === "ltr" ? [
|
|
2447
2457
|
0,
|
|
2448
2458
|
i
|
|
2449
2459
|
] : [
|
|
2450
2460
|
i * -1,
|
|
2451
2461
|
0
|
|
2452
|
-
],
|
|
2453
|
-
return
|
|
2462
|
+
], l = Bo(e, s);
|
|
2463
|
+
return ar([
|
|
2454
2464
|
0,
|
|
2455
2465
|
i
|
|
2456
2466
|
], [
|
|
2457
2467
|
0,
|
|
2458
2468
|
c
|
|
2459
|
-
])(
|
|
2469
|
+
])(l);
|
|
2460
2470
|
}
|
|
2461
|
-
function
|
|
2471
|
+
function ar(e, r) {
|
|
2462
2472
|
return (t) => {
|
|
2463
2473
|
if (e[0] === e[1] || r[0] === r[1]) return r[0];
|
|
2464
2474
|
const o = (r[1] - r[0]) / (e[1] - e[0]);
|
|
2465
2475
|
return r[0] + o * (t - e[0]);
|
|
2466
2476
|
};
|
|
2467
2477
|
}
|
|
2468
|
-
function
|
|
2478
|
+
function cr(e, r) {
|
|
2469
2479
|
return e > 0 && e < r;
|
|
2470
2480
|
}
|
|
2471
|
-
const
|
|
2481
|
+
const ca = (e, r = () => {
|
|
2472
2482
|
}) => {
|
|
2473
2483
|
let t = {
|
|
2474
2484
|
left: e.scrollLeft,
|
|
@@ -2482,21 +2492,21 @@ const aa = (e, r = () => {
|
|
|
2482
2492
|
(i || c) && r(), t = n, o = window.requestAnimationFrame(a);
|
|
2483
2493
|
}(), () => window.cancelAnimationFrame(o);
|
|
2484
2494
|
};
|
|
2485
|
-
function
|
|
2486
|
-
const t = M(e), o =
|
|
2487
|
-
return
|
|
2495
|
+
function De(e, r) {
|
|
2496
|
+
const t = M(e), o = T(0);
|
|
2497
|
+
return N(
|
|
2488
2498
|
() => () => window.clearTimeout(o.current),
|
|
2489
2499
|
[]
|
|
2490
|
-
),
|
|
2500
|
+
), ie(() => {
|
|
2491
2501
|
window.clearTimeout(o.current), o.current = window.setTimeout(t, r);
|
|
2492
2502
|
}, [
|
|
2493
2503
|
t,
|
|
2494
2504
|
r
|
|
2495
2505
|
]);
|
|
2496
2506
|
}
|
|
2497
|
-
function
|
|
2507
|
+
function Ae(e, r) {
|
|
2498
2508
|
const t = M(r);
|
|
2499
|
-
|
|
2509
|
+
Pe(() => {
|
|
2500
2510
|
let o = 0;
|
|
2501
2511
|
if (e) {
|
|
2502
2512
|
const a = new ResizeObserver(() => {
|
|
@@ -2511,34 +2521,34 @@ function Pe(e, r) {
|
|
|
2511
2521
|
t
|
|
2512
2522
|
]);
|
|
2513
2523
|
}
|
|
2514
|
-
const
|
|
2524
|
+
const ia = qo, sa = Go, la = Zo, ua = na, da = {
|
|
2515
2525
|
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1p63i_1",
|
|
2516
2526
|
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1p63i_4",
|
|
2517
2527
|
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1p63i_7",
|
|
2518
2528
|
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1p63i_18"
|
|
2519
|
-
},
|
|
2529
|
+
}, ue = Q.bind(da), de = "purpur-drawer-scroll-area", Ze = w(
|
|
2520
2530
|
({
|
|
2521
2531
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2522
2532
|
children: r,
|
|
2523
2533
|
className: t,
|
|
2524
2534
|
...o
|
|
2525
2535
|
}, a) => {
|
|
2526
|
-
const n =
|
|
2527
|
-
return /* @__PURE__ */ _("div", { className: n, "data-testid": e, ref: a, ...o, children: /* @__PURE__ */ Y(
|
|
2528
|
-
/* @__PURE__ */ _(
|
|
2536
|
+
const n = ue([t, de]);
|
|
2537
|
+
return /* @__PURE__ */ _("div", { className: n, "data-testid": e, ref: a, ...o, children: /* @__PURE__ */ Y(ia, { className: ue(`${de}__root`), children: [
|
|
2538
|
+
/* @__PURE__ */ _(sa, { className: ue(`${de}__viewport`), children: r }),
|
|
2529
2539
|
/* @__PURE__ */ _(
|
|
2530
|
-
|
|
2540
|
+
la,
|
|
2531
2541
|
{
|
|
2532
|
-
className:
|
|
2542
|
+
className: ue(`${de}__scrollbar`),
|
|
2533
2543
|
orientation: "vertical",
|
|
2534
|
-
children: /* @__PURE__ */ _(
|
|
2544
|
+
children: /* @__PURE__ */ _(ua, { className: ue(`${de}__thumb`) })
|
|
2535
2545
|
}
|
|
2536
2546
|
)
|
|
2537
2547
|
] }) });
|
|
2538
2548
|
}
|
|
2539
2549
|
);
|
|
2540
2550
|
Ze.displayName = "DrawerScrollArea";
|
|
2541
|
-
const re = Q.bind(
|
|
2551
|
+
const re = Q.bind(lo), X = "purpur-drawer-frame", ir = w(
|
|
2542
2552
|
({
|
|
2543
2553
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2544
2554
|
backButton: r,
|
|
@@ -2548,8 +2558,8 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2548
2558
|
className: n,
|
|
2549
2559
|
closeButtonText: i,
|
|
2550
2560
|
footerContent: c,
|
|
2551
|
-
onAnimationEnd:
|
|
2552
|
-
onBackButtonClick:
|
|
2561
|
+
onAnimationEnd: s,
|
|
2562
|
+
onBackButtonClick: l,
|
|
2553
2563
|
onSwipeStart: u,
|
|
2554
2564
|
onSwipeMove: d,
|
|
2555
2565
|
onSwipeCancel: f,
|
|
@@ -2558,24 +2568,24 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2558
2568
|
stickyFooter: p,
|
|
2559
2569
|
...b
|
|
2560
2570
|
}, g) => {
|
|
2561
|
-
const
|
|
2571
|
+
const C = re([
|
|
2562
2572
|
n,
|
|
2563
|
-
|
|
2573
|
+
X,
|
|
2564
2574
|
{
|
|
2565
|
-
[`${
|
|
2575
|
+
[`${X}--sticky-footer`]: p
|
|
2566
2576
|
}
|
|
2567
2577
|
]);
|
|
2568
2578
|
return /* @__PURE__ */ Y(
|
|
2569
2579
|
"div",
|
|
2570
2580
|
{
|
|
2571
|
-
className:
|
|
2581
|
+
className: C,
|
|
2572
2582
|
"data-testid": e,
|
|
2573
2583
|
ref: g,
|
|
2574
|
-
onAnimationEnd:
|
|
2584
|
+
onAnimationEnd: s,
|
|
2575
2585
|
...b,
|
|
2576
2586
|
children: [
|
|
2577
2587
|
/* @__PURE__ */ _(
|
|
2578
|
-
|
|
2588
|
+
Bt,
|
|
2579
2589
|
{
|
|
2580
2590
|
onSwipeStart: u,
|
|
2581
2591
|
onSwipeMove: d,
|
|
@@ -2586,27 +2596,27 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2586
2596
|
/* @__PURE__ */ _(
|
|
2587
2597
|
ne,
|
|
2588
2598
|
{
|
|
2589
|
-
className: re(`${
|
|
2599
|
+
className: re(`${X}__header`),
|
|
2590
2600
|
variant: "header",
|
|
2591
2601
|
stickyFooter: p,
|
|
2592
2602
|
children: /* @__PURE__ */ _(
|
|
2593
|
-
|
|
2603
|
+
Qt,
|
|
2594
2604
|
{
|
|
2595
2605
|
title: m,
|
|
2596
2606
|
backButtonOnlyIcon: o,
|
|
2597
2607
|
backButton: r,
|
|
2598
2608
|
backButtonText: t,
|
|
2599
2609
|
closeButtonText: i,
|
|
2600
|
-
onBackButtonClick:
|
|
2610
|
+
onBackButtonClick: l
|
|
2601
2611
|
}
|
|
2602
2612
|
)
|
|
2603
2613
|
}
|
|
2604
2614
|
),
|
|
2605
|
-
p ? /* @__PURE__ */ Y(
|
|
2615
|
+
p ? /* @__PURE__ */ Y(ur, { children: [
|
|
2606
2616
|
/* @__PURE__ */ _(
|
|
2607
2617
|
Ze,
|
|
2608
2618
|
{
|
|
2609
|
-
className: re(`${
|
|
2619
|
+
className: re(`${X}__body`),
|
|
2610
2620
|
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
2611
2621
|
children: /* @__PURE__ */ _(ne, { stickyFooter: !0, children: a })
|
|
2612
2622
|
}
|
|
@@ -2614,7 +2624,7 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2614
2624
|
c && /* @__PURE__ */ _(
|
|
2615
2625
|
ne,
|
|
2616
2626
|
{
|
|
2617
|
-
className: re(`${
|
|
2627
|
+
className: re(`${X}__footer`),
|
|
2618
2628
|
"data-testid": `${e}-sticky-footer`,
|
|
2619
2629
|
variant: "footer",
|
|
2620
2630
|
stickyFooter: p,
|
|
@@ -2624,14 +2634,14 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2624
2634
|
] }) : /* @__PURE__ */ _(
|
|
2625
2635
|
Ze,
|
|
2626
2636
|
{
|
|
2627
|
-
className: re(`${
|
|
2637
|
+
className: re(`${X}__body`),
|
|
2628
2638
|
"data-testid": `${e}-scroll-area`,
|
|
2629
2639
|
children: /* @__PURE__ */ Y(
|
|
2630
2640
|
"div",
|
|
2631
2641
|
{
|
|
2632
2642
|
className: re([
|
|
2633
|
-
`${
|
|
2634
|
-
{ [`${
|
|
2643
|
+
`${X}__content-container`,
|
|
2644
|
+
{ [`${X}__content-container--no-footer`]: !c }
|
|
2635
2645
|
]),
|
|
2636
2646
|
children: [
|
|
2637
2647
|
/* @__PURE__ */ _(ne, { stickyFooter: p, children: a }),
|
|
@@ -2654,8 +2664,8 @@ const re = Q.bind(io), B = "purpur-drawer-frame", cr = w(
|
|
|
2654
2664
|
);
|
|
2655
2665
|
}
|
|
2656
2666
|
);
|
|
2657
|
-
|
|
2658
|
-
const
|
|
2667
|
+
ir.displayName = "DrawerFrame";
|
|
2668
|
+
const fa = (e, r) => ({
|
|
2659
2669
|
onAnimationEnd: (c) => {
|
|
2660
2670
|
c.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
2661
2671
|
},
|
|
@@ -2665,8 +2675,8 @@ const da = (e, r) => ({
|
|
|
2665
2675
|
onSwipeMove: (c) => {
|
|
2666
2676
|
if (!e.current)
|
|
2667
2677
|
return;
|
|
2668
|
-
const { y:
|
|
2669
|
-
e.current.setAttribute("data-swipe", "move"), e.current.style.setProperty("--purpur-drawer-swipe-move-y", `${
|
|
2678
|
+
const { y: s } = c.delta;
|
|
2679
|
+
e.current.setAttribute("data-swipe", "move"), e.current.style.setProperty("--purpur-drawer-swipe-move-y", `${s}px`);
|
|
2670
2680
|
},
|
|
2671
2681
|
onSwipeCancel: () => {
|
|
2672
2682
|
e.current && (e.current.setAttribute("data-swipe", "cancel"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.removeProperty("--purpur-drawer-swipe-end-y"));
|
|
@@ -2674,10 +2684,10 @@ const da = (e, r) => ({
|
|
|
2674
2684
|
onSwipeEnd: (c) => {
|
|
2675
2685
|
if (!e.current)
|
|
2676
2686
|
return;
|
|
2677
|
-
const { y:
|
|
2678
|
-
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${
|
|
2687
|
+
const { y: s } = c.delta;
|
|
2688
|
+
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${s}px`);
|
|
2679
2689
|
}
|
|
2680
|
-
}),
|
|
2690
|
+
}), fe = Q.bind(co), ye = "purpur-drawer-content", sr = w(
|
|
2681
2691
|
({
|
|
2682
2692
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2683
2693
|
backButton: r = !1,
|
|
@@ -2687,25 +2697,25 @@ const da = (e, r) => ({
|
|
|
2687
2697
|
children: n,
|
|
2688
2698
|
className: i,
|
|
2689
2699
|
closeButtonText: c,
|
|
2690
|
-
disableCloseOnClickOutside:
|
|
2691
|
-
footerContent:
|
|
2700
|
+
disableCloseOnClickOutside: s = !1,
|
|
2701
|
+
footerContent: l,
|
|
2692
2702
|
onBackButtonClick: u,
|
|
2693
2703
|
stickyFooter: d = !1,
|
|
2694
2704
|
title: f,
|
|
2695
2705
|
zIndex: v,
|
|
2696
2706
|
...m
|
|
2697
2707
|
}, p) => {
|
|
2698
|
-
const b =
|
|
2699
|
-
|
|
2708
|
+
const b = fe([i, ye]), g = T(null), C = ve(Yt), { onAnimationEnd: S, onSwipeStart: E, onSwipeMove: A, onSwipeCancel: I, onSwipeEnd: O } = fa(g, C), x = (P) => {
|
|
2709
|
+
s && P.preventDefault();
|
|
2700
2710
|
};
|
|
2701
|
-
return /* @__PURE__ */ _(
|
|
2702
|
-
|
|
2711
|
+
return /* @__PURE__ */ _(qn, { children: /* @__PURE__ */ _(
|
|
2712
|
+
Kn,
|
|
2703
2713
|
{
|
|
2704
|
-
className:
|
|
2714
|
+
className: fe("purpur-drawer-overlay"),
|
|
2705
2715
|
style: v ? { zIndex: v } : void 0,
|
|
2706
2716
|
"data-testid": `${e}-overlay`,
|
|
2707
2717
|
children: /* @__PURE__ */ _(
|
|
2708
|
-
|
|
2718
|
+
Gn,
|
|
2709
2719
|
{
|
|
2710
2720
|
onPointerDownOutside: x,
|
|
2711
2721
|
className: b,
|
|
@@ -2713,28 +2723,28 @@ const da = (e, r) => ({
|
|
|
2713
2723
|
ref: p,
|
|
2714
2724
|
...m,
|
|
2715
2725
|
children: /* @__PURE__ */ _(
|
|
2716
|
-
|
|
2726
|
+
ir,
|
|
2717
2727
|
{
|
|
2718
2728
|
backButton: r,
|
|
2719
2729
|
backButtonText: t,
|
|
2720
2730
|
backButtonOnlyIcon: o,
|
|
2721
2731
|
closeButtonText: c,
|
|
2722
|
-
className:
|
|
2723
|
-
footerContent:
|
|
2732
|
+
className: fe(`${ye}__drawer-frame`),
|
|
2733
|
+
footerContent: l,
|
|
2724
2734
|
ref: g,
|
|
2725
2735
|
onAnimationEnd: S,
|
|
2726
2736
|
onBackButtonClick: u,
|
|
2727
2737
|
onSwipeStart: E,
|
|
2728
|
-
onSwipeMove:
|
|
2738
|
+
onSwipeMove: A,
|
|
2729
2739
|
onSwipeCancel: I,
|
|
2730
2740
|
onSwipeEnd: O,
|
|
2731
2741
|
stickyFooter: d,
|
|
2732
2742
|
title: f,
|
|
2733
|
-
children: a ? /* @__PURE__ */ Y("div", { className:
|
|
2743
|
+
children: a ? /* @__PURE__ */ Y("div", { className: fe(`${ye}__content-container`), children: [
|
|
2734
2744
|
/* @__PURE__ */ _(
|
|
2735
|
-
|
|
2745
|
+
Zn,
|
|
2736
2746
|
{
|
|
2737
|
-
className:
|
|
2747
|
+
className: fe(`${ye}__description`),
|
|
2738
2748
|
"data-testid": `${e}-description`,
|
|
2739
2749
|
children: a
|
|
2740
2750
|
}
|
|
@@ -2749,15 +2759,15 @@ const da = (e, r) => ({
|
|
|
2749
2759
|
) });
|
|
2750
2760
|
}
|
|
2751
2761
|
);
|
|
2752
|
-
|
|
2753
|
-
const
|
|
2762
|
+
sr.displayName = "DrawerContent";
|
|
2763
|
+
const lr = w(
|
|
2754
2764
|
({
|
|
2755
2765
|
["data-testid"]: e = "purpur-drawer-trigger",
|
|
2756
2766
|
children: r,
|
|
2757
2767
|
className: t,
|
|
2758
2768
|
...o
|
|
2759
2769
|
}, a) => /* @__PURE__ */ _(
|
|
2760
|
-
|
|
2770
|
+
Vn,
|
|
2761
2771
|
{
|
|
2762
2772
|
asChild: !0,
|
|
2763
2773
|
className: t,
|
|
@@ -2768,8 +2778,8 @@ const sr = w(
|
|
|
2768
2778
|
}
|
|
2769
2779
|
)
|
|
2770
2780
|
);
|
|
2771
|
-
|
|
2772
|
-
const
|
|
2781
|
+
lr.displayName = "DrawerTrigger";
|
|
2782
|
+
const pa = Q.bind(to), va = "purpur-drawer", ot = ({
|
|
2773
2783
|
["data-testid"]: e = "purpur-drawer",
|
|
2774
2784
|
children: r,
|
|
2775
2785
|
className: t,
|
|
@@ -2777,15 +2787,15 @@ const fa = Q.bind(Jn), pa = "purpur-drawer", ot = ({
|
|
|
2777
2787
|
open: a = !1,
|
|
2778
2788
|
...n
|
|
2779
2789
|
}) => {
|
|
2780
|
-
const [i, c] = Ue.useState(a),
|
|
2790
|
+
const [i, c] = Ue.useState(a), s = pa([t, va]), l = (u) => {
|
|
2781
2791
|
c(u), o == null || o(u);
|
|
2782
2792
|
};
|
|
2783
|
-
return
|
|
2793
|
+
return N(() => {
|
|
2784
2794
|
c(a);
|
|
2785
|
-
}, [a]), /* @__PURE__ */ _(
|
|
2795
|
+
}, [a]), /* @__PURE__ */ _(Yt.Provider, { value: l, children: /* @__PURE__ */ _("div", { className: s, "data-testid": e, ...n, children: /* @__PURE__ */ _(Xn, { open: i, onOpenChange: l, children: r }) }) });
|
|
2786
2796
|
};
|
|
2787
|
-
ot.Trigger =
|
|
2788
|
-
ot.Content =
|
|
2797
|
+
ot.Trigger = lr;
|
|
2798
|
+
ot.Content = sr;
|
|
2789
2799
|
ot.displayName = "Drawer";
|
|
2790
2800
|
export {
|
|
2791
2801
|
ot as Drawer
|