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