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