@cfx-dev/ui-components 3.0.3 → 3.0.5
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/Select-Ds-fm4CN.js +3245 -0
- package/dist/assets/all_css.css +2 -0
- package/dist/assets/css/DropdownSelect.css +1 -0
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/Slider.css +1 -0
- package/dist/components/Checkbox/Checkbox.js +190 -118
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +16 -0
- package/dist/components/DropdownSelect/DropdownSelect.js +2393 -0
- package/dist/components/DropdownSelect/DropdownSelectShowcase.d.ts +5 -0
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +52 -0
- package/dist/components/DropdownSelect/index.d.ts +1 -0
- package/dist/components/DropdownSelect/index.js +4 -0
- package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +9 -8
- package/dist/components/Input/Input.js +4 -4
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Select/Select.js +7 -3092
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.js +3 -2
- package/dist/components/Slider/Slider.d.ts +11 -0
- package/dist/components/Slider/Slider.js +606 -0
- package/dist/components/Slider/SliderShowcase.d.ts +5 -0
- package/dist/components/Slider/SliderShowcase.js +63 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +4 -0
- package/dist/components/Switch/Switch.js +131 -68
- package/dist/index-BCnz73Lm.js +72 -0
- package/dist/index-BW3WdIgK.js +14 -0
- package/dist/index-BlbvKsmN.js +82 -0
- package/dist/index-CjTSD6zB.js +161 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +69 -65
- package/package.json +3 -1
- package/dist/index-CjWRnNpt.js +0 -210
|
@@ -0,0 +1,2393 @@
|
|
|
1
|
+
import { jsx as v, Fragment as Xe, jsxs as st } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { useState as Rt, useRef as jn, useEffect as Xn } from "react";
|
|
4
|
+
import { d as X, b as Hn, c as be, u as Pt } from "../../index-BCnz73Lm.js";
|
|
5
|
+
import { r as zn } from "../../index-2hJuj4UN.js";
|
|
6
|
+
import { c as Mt } from "../../index-CjTSD6zB.js";
|
|
7
|
+
import { u as xt } from "../../index-BW3WdIgK.js";
|
|
8
|
+
import { u as Zn, a as Qn, b as qn, o as Jn, s as er, l as tr, f as nr, c as rr, d as or, h as ar, e as We, g as cr, i as ir, I as sr } from "../../Select-Ds-fm4CN.js";
|
|
9
|
+
import { _ as j, f as Nt, c as ur } from "../../tslib.es6-CBKHJX9H.js";
|
|
10
|
+
import { Icon as lr } from "../Icon/Icon.js";
|
|
11
|
+
import { Flex as dr } from "../Layout/Flex/Flex.js";
|
|
12
|
+
import { clsx as Ae } from "../../utils/clsx.js";
|
|
13
|
+
function Se(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
14
|
+
return function(o) {
|
|
15
|
+
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
16
|
+
return t == null ? void 0 : t(o);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function ut(e, t) {
|
|
20
|
+
if (typeof e == "function")
|
|
21
|
+
return e(t);
|
|
22
|
+
e != null && (e.current = t);
|
|
23
|
+
}
|
|
24
|
+
function It(...e) {
|
|
25
|
+
return (t) => {
|
|
26
|
+
let n = !1;
|
|
27
|
+
const r = e.map((o) => {
|
|
28
|
+
const c = ut(o, t);
|
|
29
|
+
return !n && typeof c == "function" && (n = !0), c;
|
|
30
|
+
});
|
|
31
|
+
if (n)
|
|
32
|
+
return () => {
|
|
33
|
+
for (let o = 0; o < r.length; o++) {
|
|
34
|
+
const c = r[o];
|
|
35
|
+
typeof c == "function" ? c() : ut(e[o], null);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function fr(e, t = []) {
|
|
41
|
+
let n = [];
|
|
42
|
+
function r(c, s) {
|
|
43
|
+
const i = a.createContext(s), l = n.length;
|
|
44
|
+
n = [...n, s];
|
|
45
|
+
const u = (f) => {
|
|
46
|
+
var w;
|
|
47
|
+
const { scope: m, children: g, ...h } = f, d = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[l]) || i, y = a.useMemo(() => h, Object.values(h));
|
|
48
|
+
return /* @__PURE__ */ v(d.Provider, { value: y, children: g });
|
|
49
|
+
};
|
|
50
|
+
u.displayName = c + "Provider";
|
|
51
|
+
function p(f, m) {
|
|
52
|
+
var d;
|
|
53
|
+
const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || i, h = a.useContext(g);
|
|
54
|
+
if (h) return h;
|
|
55
|
+
if (s !== void 0) return s;
|
|
56
|
+
throw new Error(`\`${f}\` must be used within \`${c}\``);
|
|
57
|
+
}
|
|
58
|
+
return [u, p];
|
|
59
|
+
}
|
|
60
|
+
const o = () => {
|
|
61
|
+
const c = n.map((s) => a.createContext(s));
|
|
62
|
+
return function(i) {
|
|
63
|
+
const l = (i == null ? void 0 : i[e]) || c;
|
|
64
|
+
return a.useMemo(
|
|
65
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: l } }),
|
|
66
|
+
[i, l]
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
return o.scopeName = e, [r, pr(o, ...t)];
|
|
71
|
+
}
|
|
72
|
+
function pr(...e) {
|
|
73
|
+
const t = e[0];
|
|
74
|
+
if (e.length === 1) return t;
|
|
75
|
+
const n = () => {
|
|
76
|
+
const r = e.map((o) => ({
|
|
77
|
+
useScope: o(),
|
|
78
|
+
scopeName: o.scopeName
|
|
79
|
+
}));
|
|
80
|
+
return function(c) {
|
|
81
|
+
const s = r.reduce((i, { useScope: l, scopeName: u }) => {
|
|
82
|
+
const f = l(c)[`__scope${u}`];
|
|
83
|
+
return { ...i, ...f };
|
|
84
|
+
}, {});
|
|
85
|
+
return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
return n.scopeName = t.scopeName, n;
|
|
89
|
+
}
|
|
90
|
+
var At = a.forwardRef((e, t) => {
|
|
91
|
+
const { children: n, ...r } = e, o = a.Children.toArray(n), c = o.find(vr);
|
|
92
|
+
if (c) {
|
|
93
|
+
const s = c.props.children, i = o.map((l) => l === c ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : l);
|
|
94
|
+
return /* @__PURE__ */ v(Be, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, i) : null });
|
|
95
|
+
}
|
|
96
|
+
return /* @__PURE__ */ v(Be, { ...r, ref: t, children: n });
|
|
97
|
+
});
|
|
98
|
+
At.displayName = "Slot";
|
|
99
|
+
var Be = a.forwardRef((e, t) => {
|
|
100
|
+
const { children: n, ...r } = e;
|
|
101
|
+
if (a.isValidElement(n)) {
|
|
102
|
+
const o = gr(n);
|
|
103
|
+
return a.cloneElement(n, {
|
|
104
|
+
...hr(r, n.props),
|
|
105
|
+
// @ts-ignore
|
|
106
|
+
ref: t ? It(t, o) : o
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return a.Children.count(n) > 1 ? a.Children.only(null) : null;
|
|
110
|
+
});
|
|
111
|
+
Be.displayName = "SlotClone";
|
|
112
|
+
var mr = ({ children: e }) => /* @__PURE__ */ v(Xe, { children: e });
|
|
113
|
+
function vr(e) {
|
|
114
|
+
return a.isValidElement(e) && e.type === mr;
|
|
115
|
+
}
|
|
116
|
+
function hr(e, t) {
|
|
117
|
+
const n = { ...t };
|
|
118
|
+
for (const r in t) {
|
|
119
|
+
const o = e[r], c = t[r];
|
|
120
|
+
/^on[A-Z]/.test(r) ? o && c ? n[r] = (...i) => {
|
|
121
|
+
c(...i), o(...i);
|
|
122
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...c } : r === "className" && (n[r] = [o, c].filter(Boolean).join(" "));
|
|
123
|
+
}
|
|
124
|
+
return { ...e, ...n };
|
|
125
|
+
}
|
|
126
|
+
function gr(e) {
|
|
127
|
+
var r, o;
|
|
128
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
129
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
130
|
+
}
|
|
131
|
+
var wr = [
|
|
132
|
+
"a",
|
|
133
|
+
"button",
|
|
134
|
+
"div",
|
|
135
|
+
"form",
|
|
136
|
+
"h2",
|
|
137
|
+
"h3",
|
|
138
|
+
"img",
|
|
139
|
+
"input",
|
|
140
|
+
"label",
|
|
141
|
+
"li",
|
|
142
|
+
"nav",
|
|
143
|
+
"ol",
|
|
144
|
+
"p",
|
|
145
|
+
"span",
|
|
146
|
+
"svg",
|
|
147
|
+
"ul"
|
|
148
|
+
], yr = wr.reduce((e, t) => {
|
|
149
|
+
const n = a.forwardRef((r, o) => {
|
|
150
|
+
const { asChild: c, ...s } = r, i = c ? At : t;
|
|
151
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(i, { ...s, ref: o });
|
|
152
|
+
});
|
|
153
|
+
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
154
|
+
}, {});
|
|
155
|
+
function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
156
|
+
return function(o) {
|
|
157
|
+
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
158
|
+
return t == null ? void 0 : t(o);
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function lt(e, t) {
|
|
162
|
+
if (typeof e == "function")
|
|
163
|
+
return e(t);
|
|
164
|
+
e != null && (e.current = t);
|
|
165
|
+
}
|
|
166
|
+
function He(...e) {
|
|
167
|
+
return (t) => {
|
|
168
|
+
let n = !1;
|
|
169
|
+
const r = e.map((o) => {
|
|
170
|
+
const c = lt(o, t);
|
|
171
|
+
return !n && typeof c == "function" && (n = !0), c;
|
|
172
|
+
});
|
|
173
|
+
if (n)
|
|
174
|
+
return () => {
|
|
175
|
+
for (let o = 0; o < r.length; o++) {
|
|
176
|
+
const c = r[o];
|
|
177
|
+
typeof c == "function" ? c() : lt(e[o], null);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function W(...e) {
|
|
183
|
+
return a.useCallback(He(...e), e);
|
|
184
|
+
}
|
|
185
|
+
function Dt(e, t = []) {
|
|
186
|
+
let n = [];
|
|
187
|
+
function r(c, s) {
|
|
188
|
+
const i = a.createContext(s), l = n.length;
|
|
189
|
+
n = [...n, s];
|
|
190
|
+
const u = (f) => {
|
|
191
|
+
var w;
|
|
192
|
+
const { scope: m, children: g, ...h } = f, d = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[l]) || i, y = a.useMemo(() => h, Object.values(h));
|
|
193
|
+
return /* @__PURE__ */ v(d.Provider, { value: y, children: g });
|
|
194
|
+
};
|
|
195
|
+
u.displayName = c + "Provider";
|
|
196
|
+
function p(f, m) {
|
|
197
|
+
var d;
|
|
198
|
+
const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || i, h = a.useContext(g);
|
|
199
|
+
if (h) return h;
|
|
200
|
+
if (s !== void 0) return s;
|
|
201
|
+
throw new Error(`\`${f}\` must be used within \`${c}\``);
|
|
202
|
+
}
|
|
203
|
+
return [u, p];
|
|
204
|
+
}
|
|
205
|
+
const o = () => {
|
|
206
|
+
const c = n.map((s) => a.createContext(s));
|
|
207
|
+
return function(i) {
|
|
208
|
+
const l = (i == null ? void 0 : i[e]) || c;
|
|
209
|
+
return a.useMemo(
|
|
210
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: l } }),
|
|
211
|
+
[i, l]
|
|
212
|
+
);
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
return o.scopeName = e, [r, Cr(o, ...t)];
|
|
216
|
+
}
|
|
217
|
+
function Cr(...e) {
|
|
218
|
+
const t = e[0];
|
|
219
|
+
if (e.length === 1) return t;
|
|
220
|
+
const n = () => {
|
|
221
|
+
const r = e.map((o) => ({
|
|
222
|
+
useScope: o(),
|
|
223
|
+
scopeName: o.scopeName
|
|
224
|
+
}));
|
|
225
|
+
return function(c) {
|
|
226
|
+
const s = r.reduce((i, { useScope: l, scopeName: u }) => {
|
|
227
|
+
const f = l(c)[`__scope${u}`];
|
|
228
|
+
return { ...i, ...f };
|
|
229
|
+
}, {});
|
|
230
|
+
return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
return n.scopeName = t.scopeName, n;
|
|
234
|
+
}
|
|
235
|
+
var ze = a.forwardRef((e, t) => {
|
|
236
|
+
const { children: n, ...r } = e, o = a.Children.toArray(n), c = o.find(br);
|
|
237
|
+
if (c) {
|
|
238
|
+
const s = c.props.children, i = o.map((l) => l === c ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : l);
|
|
239
|
+
return /* @__PURE__ */ v(Ue, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, i) : null });
|
|
240
|
+
}
|
|
241
|
+
return /* @__PURE__ */ v(Ue, { ...r, ref: t, children: n });
|
|
242
|
+
});
|
|
243
|
+
ze.displayName = "Slot";
|
|
244
|
+
var Ue = a.forwardRef((e, t) => {
|
|
245
|
+
const { children: n, ...r } = e;
|
|
246
|
+
if (a.isValidElement(n)) {
|
|
247
|
+
const o = _r(n);
|
|
248
|
+
return a.cloneElement(n, {
|
|
249
|
+
...Sr(r, n.props),
|
|
250
|
+
// @ts-ignore
|
|
251
|
+
ref: t ? He(t, o) : o
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return a.Children.count(n) > 1 ? a.Children.only(null) : null;
|
|
255
|
+
});
|
|
256
|
+
Ue.displayName = "SlotClone";
|
|
257
|
+
var Er = ({ children: e }) => /* @__PURE__ */ v(Xe, { children: e });
|
|
258
|
+
function br(e) {
|
|
259
|
+
return a.isValidElement(e) && e.type === Er;
|
|
260
|
+
}
|
|
261
|
+
function Sr(e, t) {
|
|
262
|
+
const n = { ...t };
|
|
263
|
+
for (const r in t) {
|
|
264
|
+
const o = e[r], c = t[r];
|
|
265
|
+
/^on[A-Z]/.test(r) ? o && c ? n[r] = (...i) => {
|
|
266
|
+
c(...i), o(...i);
|
|
267
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...c } : r === "className" && (n[r] = [o, c].filter(Boolean).join(" "));
|
|
268
|
+
}
|
|
269
|
+
return { ...e, ...n };
|
|
270
|
+
}
|
|
271
|
+
function _r(e) {
|
|
272
|
+
var r, o;
|
|
273
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
274
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
275
|
+
}
|
|
276
|
+
var Rr = [
|
|
277
|
+
"a",
|
|
278
|
+
"button",
|
|
279
|
+
"div",
|
|
280
|
+
"form",
|
|
281
|
+
"h2",
|
|
282
|
+
"h3",
|
|
283
|
+
"img",
|
|
284
|
+
"input",
|
|
285
|
+
"label",
|
|
286
|
+
"li",
|
|
287
|
+
"nav",
|
|
288
|
+
"ol",
|
|
289
|
+
"p",
|
|
290
|
+
"span",
|
|
291
|
+
"svg",
|
|
292
|
+
"ul"
|
|
293
|
+
], B = Rr.reduce((e, t) => {
|
|
294
|
+
const n = a.forwardRef((r, o) => {
|
|
295
|
+
const { asChild: c, ...s } = r, i = c ? ze : t;
|
|
296
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(i, { ...s, ref: o });
|
|
297
|
+
});
|
|
298
|
+
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
299
|
+
}, {});
|
|
300
|
+
function Tt(e, t) {
|
|
301
|
+
e && zn.flushSync(() => e.dispatchEvent(t));
|
|
302
|
+
}
|
|
303
|
+
var Pr = "DismissableLayer", Ke = "dismissableLayer.update", Mr = "dismissableLayer.pointerDownOutside", xr = "dismissableLayer.focusOutside", dt, Ot = a.createContext({
|
|
304
|
+
layers: /* @__PURE__ */ new Set(),
|
|
305
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
306
|
+
branches: /* @__PURE__ */ new Set()
|
|
307
|
+
}), Ft = a.forwardRef(
|
|
308
|
+
(e, t) => {
|
|
309
|
+
const {
|
|
310
|
+
disableOutsidePointerEvents: n = !1,
|
|
311
|
+
onEscapeKeyDown: r,
|
|
312
|
+
onPointerDownOutside: o,
|
|
313
|
+
onFocusOutside: c,
|
|
314
|
+
onInteractOutside: s,
|
|
315
|
+
onDismiss: i,
|
|
316
|
+
...l
|
|
317
|
+
} = e, u = a.useContext(Ot), [p, f] = a.useState(null), m = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = a.useState({}), h = W(t, (S) => f(S)), d = Array.from(u.layers), [y] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = d.indexOf(y), E = p ? d.indexOf(p) : -1, b = u.layersWithOutsidePointerEventsDisabled.size > 0, _ = E >= w, R = Ar((S) => {
|
|
318
|
+
const P = S.target, I = [...u.branches].some((T) => T.contains(P));
|
|
319
|
+
!_ || I || (o == null || o(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
320
|
+
}, m), x = Dr((S) => {
|
|
321
|
+
const P = S.target;
|
|
322
|
+
[...u.branches].some((T) => T.contains(P)) || (c == null || c(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
323
|
+
}, m);
|
|
324
|
+
return Zn((S) => {
|
|
325
|
+
E === u.layers.size - 1 && (r == null || r(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
326
|
+
}, m), a.useEffect(() => {
|
|
327
|
+
if (p)
|
|
328
|
+
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (dt = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(p)), u.layers.add(p), ft(), () => {
|
|
329
|
+
n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = dt);
|
|
330
|
+
};
|
|
331
|
+
}, [p, m, n, u]), a.useEffect(() => () => {
|
|
332
|
+
p && (u.layers.delete(p), u.layersWithOutsidePointerEventsDisabled.delete(p), ft());
|
|
333
|
+
}, [p, u]), a.useEffect(() => {
|
|
334
|
+
const S = () => g({});
|
|
335
|
+
return document.addEventListener(Ke, S), () => document.removeEventListener(Ke, S);
|
|
336
|
+
}, []), /* @__PURE__ */ v(
|
|
337
|
+
B.div,
|
|
338
|
+
{
|
|
339
|
+
...l,
|
|
340
|
+
ref: h,
|
|
341
|
+
style: {
|
|
342
|
+
pointerEvents: b ? _ ? "auto" : "none" : void 0,
|
|
343
|
+
...e.style
|
|
344
|
+
},
|
|
345
|
+
onFocusCapture: M(e.onFocusCapture, x.onFocusCapture),
|
|
346
|
+
onBlurCapture: M(e.onBlurCapture, x.onBlurCapture),
|
|
347
|
+
onPointerDownCapture: M(
|
|
348
|
+
e.onPointerDownCapture,
|
|
349
|
+
R.onPointerDownCapture
|
|
350
|
+
)
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
Ft.displayName = Pr;
|
|
356
|
+
var Nr = "DismissableLayerBranch", Ir = a.forwardRef((e, t) => {
|
|
357
|
+
const n = a.useContext(Ot), r = a.useRef(null), o = W(t, r);
|
|
358
|
+
return a.useEffect(() => {
|
|
359
|
+
const c = r.current;
|
|
360
|
+
if (c)
|
|
361
|
+
return n.branches.add(c), () => {
|
|
362
|
+
n.branches.delete(c);
|
|
363
|
+
};
|
|
364
|
+
}, [n.branches]), /* @__PURE__ */ v(B.div, { ...e, ref: o });
|
|
365
|
+
});
|
|
366
|
+
Ir.displayName = Nr;
|
|
367
|
+
function Ar(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
368
|
+
const n = X(e), r = a.useRef(!1), o = a.useRef(() => {
|
|
369
|
+
});
|
|
370
|
+
return a.useEffect(() => {
|
|
371
|
+
const c = (i) => {
|
|
372
|
+
if (i.target && !r.current) {
|
|
373
|
+
let l = function() {
|
|
374
|
+
Lt(
|
|
375
|
+
Mr,
|
|
376
|
+
n,
|
|
377
|
+
u,
|
|
378
|
+
{ discrete: !0 }
|
|
379
|
+
);
|
|
380
|
+
};
|
|
381
|
+
const u = { originalEvent: i };
|
|
382
|
+
i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = l, t.addEventListener("click", o.current, { once: !0 })) : l();
|
|
383
|
+
} else
|
|
384
|
+
t.removeEventListener("click", o.current);
|
|
385
|
+
r.current = !1;
|
|
386
|
+
}, s = window.setTimeout(() => {
|
|
387
|
+
t.addEventListener("pointerdown", c);
|
|
388
|
+
}, 0);
|
|
389
|
+
return () => {
|
|
390
|
+
window.clearTimeout(s), t.removeEventListener("pointerdown", c), t.removeEventListener("click", o.current);
|
|
391
|
+
};
|
|
392
|
+
}, [t, n]), {
|
|
393
|
+
// ensures we check React component tree (not just DOM tree)
|
|
394
|
+
onPointerDownCapture: () => r.current = !0
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
function Dr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
398
|
+
const n = X(e), r = a.useRef(!1);
|
|
399
|
+
return a.useEffect(() => {
|
|
400
|
+
const o = (c) => {
|
|
401
|
+
c.target && !r.current && Lt(xr, n, { originalEvent: c }, {
|
|
402
|
+
discrete: !1
|
|
403
|
+
});
|
|
404
|
+
};
|
|
405
|
+
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
|
|
406
|
+
}, [t, n]), {
|
|
407
|
+
onFocusCapture: () => r.current = !0,
|
|
408
|
+
onBlurCapture: () => r.current = !1
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
function ft() {
|
|
412
|
+
const e = new CustomEvent(Ke);
|
|
413
|
+
document.dispatchEvent(e);
|
|
414
|
+
}
|
|
415
|
+
function Lt(e, t, n, { discrete: r }) {
|
|
416
|
+
const o = n.originalEvent.target, c = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
417
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? Tt(o, c) : o.dispatchEvent(c);
|
|
418
|
+
}
|
|
419
|
+
var De = 0;
|
|
420
|
+
function Tr() {
|
|
421
|
+
a.useEffect(() => {
|
|
422
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
423
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? pt()), document.body.insertAdjacentElement("beforeend", e[1] ?? pt()), De++, () => {
|
|
424
|
+
De === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), De--;
|
|
425
|
+
};
|
|
426
|
+
}, []);
|
|
427
|
+
}
|
|
428
|
+
function pt() {
|
|
429
|
+
const e = document.createElement("span");
|
|
430
|
+
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;
|
|
431
|
+
}
|
|
432
|
+
var Te = "focusScope.autoFocusOnMount", Oe = "focusScope.autoFocusOnUnmount", mt = { bubbles: !1, cancelable: !0 }, Or = "FocusScope", kt = a.forwardRef((e, t) => {
|
|
433
|
+
const {
|
|
434
|
+
loop: n = !1,
|
|
435
|
+
trapped: r = !1,
|
|
436
|
+
onMountAutoFocus: o,
|
|
437
|
+
onUnmountAutoFocus: c,
|
|
438
|
+
...s
|
|
439
|
+
} = e, [i, l] = a.useState(null), u = X(o), p = X(c), f = a.useRef(null), m = W(t, (d) => l(d)), g = a.useRef({
|
|
440
|
+
paused: !1,
|
|
441
|
+
pause() {
|
|
442
|
+
this.paused = !0;
|
|
443
|
+
},
|
|
444
|
+
resume() {
|
|
445
|
+
this.paused = !1;
|
|
446
|
+
}
|
|
447
|
+
}).current;
|
|
448
|
+
a.useEffect(() => {
|
|
449
|
+
if (r) {
|
|
450
|
+
let d = function(b) {
|
|
451
|
+
if (g.paused || !i) return;
|
|
452
|
+
const _ = b.target;
|
|
453
|
+
i.contains(_) ? f.current = _ : Y(f.current, { select: !0 });
|
|
454
|
+
}, y = function(b) {
|
|
455
|
+
if (g.paused || !i) return;
|
|
456
|
+
const _ = b.relatedTarget;
|
|
457
|
+
_ !== null && (i.contains(_) || Y(f.current, { select: !0 }));
|
|
458
|
+
}, w = function(b) {
|
|
459
|
+
if (document.activeElement === document.body)
|
|
460
|
+
for (const R of b)
|
|
461
|
+
R.removedNodes.length > 0 && Y(i);
|
|
462
|
+
};
|
|
463
|
+
document.addEventListener("focusin", d), document.addEventListener("focusout", y);
|
|
464
|
+
const E = new MutationObserver(w);
|
|
465
|
+
return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
466
|
+
document.removeEventListener("focusin", d), document.removeEventListener("focusout", y), E.disconnect();
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
}, [r, i, g.paused]), a.useEffect(() => {
|
|
470
|
+
if (i) {
|
|
471
|
+
ht.add(g);
|
|
472
|
+
const d = document.activeElement;
|
|
473
|
+
if (!i.contains(d)) {
|
|
474
|
+
const w = new CustomEvent(Te, mt);
|
|
475
|
+
i.addEventListener(Te, u), i.dispatchEvent(w), w.defaultPrevented || (Fr(Br($t(i)), { select: !0 }), document.activeElement === d && Y(i));
|
|
476
|
+
}
|
|
477
|
+
return () => {
|
|
478
|
+
i.removeEventListener(Te, u), setTimeout(() => {
|
|
479
|
+
const w = new CustomEvent(Oe, mt);
|
|
480
|
+
i.addEventListener(Oe, p), i.dispatchEvent(w), w.defaultPrevented || Y(d ?? document.body, { select: !0 }), i.removeEventListener(Oe, p), ht.remove(g);
|
|
481
|
+
}, 0);
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
}, [i, u, p, g]);
|
|
485
|
+
const h = a.useCallback(
|
|
486
|
+
(d) => {
|
|
487
|
+
if (!n && !r || g.paused) return;
|
|
488
|
+
const y = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, w = document.activeElement;
|
|
489
|
+
if (y && w) {
|
|
490
|
+
const E = d.currentTarget, [b, _] = Lr(E);
|
|
491
|
+
b && _ ? !d.shiftKey && w === _ ? (d.preventDefault(), n && Y(b, { select: !0 })) : d.shiftKey && w === b && (d.preventDefault(), n && Y(_, { select: !0 })) : w === E && d.preventDefault();
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
[n, r, g.paused]
|
|
495
|
+
);
|
|
496
|
+
return /* @__PURE__ */ v(B.div, { tabIndex: -1, ...s, ref: m, onKeyDown: h });
|
|
497
|
+
});
|
|
498
|
+
kt.displayName = Or;
|
|
499
|
+
function Fr(e, { select: t = !1 } = {}) {
|
|
500
|
+
const n = document.activeElement;
|
|
501
|
+
for (const r of e)
|
|
502
|
+
if (Y(r, { select: t }), document.activeElement !== n) return;
|
|
503
|
+
}
|
|
504
|
+
function Lr(e) {
|
|
505
|
+
const t = $t(e), n = vt(t, e), r = vt(t.reverse(), e);
|
|
506
|
+
return [n, r];
|
|
507
|
+
}
|
|
508
|
+
function $t(e) {
|
|
509
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
510
|
+
acceptNode: (r) => {
|
|
511
|
+
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
512
|
+
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
516
|
+
return t;
|
|
517
|
+
}
|
|
518
|
+
function vt(e, t) {
|
|
519
|
+
for (const n of e)
|
|
520
|
+
if (!kr(n, { upTo: t })) return n;
|
|
521
|
+
}
|
|
522
|
+
function kr(e, { upTo: t }) {
|
|
523
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
524
|
+
for (; e; ) {
|
|
525
|
+
if (t !== void 0 && e === t) return !1;
|
|
526
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
527
|
+
e = e.parentElement;
|
|
528
|
+
}
|
|
529
|
+
return !1;
|
|
530
|
+
}
|
|
531
|
+
function $r(e) {
|
|
532
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
533
|
+
}
|
|
534
|
+
function Y(e, { select: t = !1 } = {}) {
|
|
535
|
+
if (e && e.focus) {
|
|
536
|
+
const n = document.activeElement;
|
|
537
|
+
e.focus({ preventScroll: !0 }), e !== n && $r(e) && t && e.select();
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
var ht = Wr();
|
|
541
|
+
function Wr() {
|
|
542
|
+
let e = [];
|
|
543
|
+
return {
|
|
544
|
+
add(t) {
|
|
545
|
+
const n = e[0];
|
|
546
|
+
t !== n && (n == null || n.pause()), e = gt(e, t), e.unshift(t);
|
|
547
|
+
},
|
|
548
|
+
remove(t) {
|
|
549
|
+
var n;
|
|
550
|
+
e = gt(e, t), (n = e[0]) == null || n.resume();
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function gt(e, t) {
|
|
555
|
+
const n = [...e], r = n.indexOf(t);
|
|
556
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
557
|
+
}
|
|
558
|
+
function Br(e) {
|
|
559
|
+
return e.filter((t) => t.tagName !== "A");
|
|
560
|
+
}
|
|
561
|
+
var Ur = "Arrow", Wt = a.forwardRef((e, t) => {
|
|
562
|
+
const { children: n, width: r = 10, height: o = 5, ...c } = e;
|
|
563
|
+
return /* @__PURE__ */ v(
|
|
564
|
+
B.svg,
|
|
565
|
+
{
|
|
566
|
+
...c,
|
|
567
|
+
ref: t,
|
|
568
|
+
width: r,
|
|
569
|
+
height: o,
|
|
570
|
+
viewBox: "0 0 30 10",
|
|
571
|
+
preserveAspectRatio: "none",
|
|
572
|
+
children: e.asChild ? n : /* @__PURE__ */ v("polygon", { points: "0,0 30,0 15,10" })
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
});
|
|
576
|
+
Wt.displayName = Ur;
|
|
577
|
+
var Kr = Wt, Ze = "Popper", [Bt, Ut] = Dt(Ze), [Gr, Kt] = Bt(Ze), Gt = (e) => {
|
|
578
|
+
const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
|
|
579
|
+
return /* @__PURE__ */ v(Gr, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
580
|
+
};
|
|
581
|
+
Gt.displayName = Ze;
|
|
582
|
+
var Vt = "PopperAnchor", Yt = a.forwardRef(
|
|
583
|
+
(e, t) => {
|
|
584
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, c = Kt(Vt, n), s = a.useRef(null), i = W(t, s);
|
|
585
|
+
return a.useEffect(() => {
|
|
586
|
+
c.onAnchorChange((r == null ? void 0 : r.current) || s.current);
|
|
587
|
+
}), r ? null : /* @__PURE__ */ v(B.div, { ...o, ref: i });
|
|
588
|
+
}
|
|
589
|
+
);
|
|
590
|
+
Yt.displayName = Vt;
|
|
591
|
+
var Qe = "PopperContent", [Vr, Yr] = Bt(Qe), jt = a.forwardRef(
|
|
592
|
+
(e, t) => {
|
|
593
|
+
var G, ie, F, se, at, ct;
|
|
594
|
+
const {
|
|
595
|
+
__scopePopper: n,
|
|
596
|
+
side: r = "bottom",
|
|
597
|
+
sideOffset: o = 0,
|
|
598
|
+
align: c = "center",
|
|
599
|
+
alignOffset: s = 0,
|
|
600
|
+
arrowPadding: i = 0,
|
|
601
|
+
avoidCollisions: l = !0,
|
|
602
|
+
collisionBoundary: u = [],
|
|
603
|
+
collisionPadding: p = 0,
|
|
604
|
+
sticky: f = "partial",
|
|
605
|
+
hideWhenDetached: m = !1,
|
|
606
|
+
updatePositionStrategy: g = "optimized",
|
|
607
|
+
onPlaced: h,
|
|
608
|
+
...d
|
|
609
|
+
} = e, y = Kt(Qe, n), [w, E] = a.useState(null), b = W(t, (ue) => E(ue)), [_, R] = a.useState(null), x = Hn(_), S = (x == null ? void 0 : x.width) ?? 0, P = (x == null ? void 0 : x.height) ?? 0, I = r + (c !== "center" ? "-" + c : ""), T = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, V = Array.isArray(u) ? u : [u], H = V.length > 0, K = {
|
|
610
|
+
padding: T,
|
|
611
|
+
boundary: V.filter(Xr),
|
|
612
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
613
|
+
altBoundary: H
|
|
614
|
+
}, { refs: Q, floatingStyles: q, placement: $, isPositioned: J, middlewareData: O } = Qn({
|
|
615
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
616
|
+
strategy: "fixed",
|
|
617
|
+
placement: I,
|
|
618
|
+
whileElementsMounted: (...ue) => qn(...ue, {
|
|
619
|
+
animationFrame: g === "always"
|
|
620
|
+
}),
|
|
621
|
+
elements: {
|
|
622
|
+
reference: y.anchor
|
|
623
|
+
},
|
|
624
|
+
middleware: [
|
|
625
|
+
Jn({ mainAxis: o + P, alignmentAxis: s }),
|
|
626
|
+
l && er({
|
|
627
|
+
mainAxis: !0,
|
|
628
|
+
crossAxis: !1,
|
|
629
|
+
limiter: f === "partial" ? tr() : void 0,
|
|
630
|
+
...K
|
|
631
|
+
}),
|
|
632
|
+
l && nr({ ...K }),
|
|
633
|
+
rr({
|
|
634
|
+
...K,
|
|
635
|
+
apply: ({ elements: ue, rects: it, availableWidth: Kn, availableHeight: Gn }) => {
|
|
636
|
+
const { width: Vn, height: Yn } = it.reference, he = ue.floating.style;
|
|
637
|
+
he.setProperty("--radix-popper-available-width", `${Kn}px`), he.setProperty("--radix-popper-available-height", `${Gn}px`), he.setProperty("--radix-popper-anchor-width", `${Vn}px`), he.setProperty("--radix-popper-anchor-height", `${Yn}px`);
|
|
638
|
+
}
|
|
639
|
+
}),
|
|
640
|
+
_ && or({ element: _, padding: i }),
|
|
641
|
+
Hr({ arrowWidth: S, arrowHeight: P }),
|
|
642
|
+
m && ar({ strategy: "referenceHidden", ...K })
|
|
643
|
+
]
|
|
644
|
+
}), [C, A] = zt($), N = X(h);
|
|
645
|
+
be(() => {
|
|
646
|
+
J && (N == null || N());
|
|
647
|
+
}, [J, N]);
|
|
648
|
+
const U = (G = O.arrow) == null ? void 0 : G.x, ae = (ie = O.arrow) == null ? void 0 : ie.y, ce = ((F = O.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, z] = a.useState();
|
|
649
|
+
return be(() => {
|
|
650
|
+
w && z(window.getComputedStyle(w).zIndex);
|
|
651
|
+
}, [w]), /* @__PURE__ */ v(
|
|
652
|
+
"div",
|
|
653
|
+
{
|
|
654
|
+
ref: Q.setFloating,
|
|
655
|
+
"data-radix-popper-content-wrapper": "",
|
|
656
|
+
style: {
|
|
657
|
+
...q,
|
|
658
|
+
transform: J ? q.transform : "translate(0, -200%)",
|
|
659
|
+
// keep off the page when measuring
|
|
660
|
+
minWidth: "max-content",
|
|
661
|
+
zIndex: ve,
|
|
662
|
+
"--radix-popper-transform-origin": [
|
|
663
|
+
(se = O.transformOrigin) == null ? void 0 : se.x,
|
|
664
|
+
(at = O.transformOrigin) == null ? void 0 : at.y
|
|
665
|
+
].join(" "),
|
|
666
|
+
// hide the content if using the hide middleware and should be hidden
|
|
667
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
668
|
+
// as if the PopperContent isn't there at all
|
|
669
|
+
...((ct = O.hide) == null ? void 0 : ct.referenceHidden) && {
|
|
670
|
+
visibility: "hidden",
|
|
671
|
+
pointerEvents: "none"
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
dir: e.dir,
|
|
675
|
+
children: /* @__PURE__ */ v(
|
|
676
|
+
Vr,
|
|
677
|
+
{
|
|
678
|
+
scope: n,
|
|
679
|
+
placedSide: C,
|
|
680
|
+
onArrowChange: R,
|
|
681
|
+
arrowX: U,
|
|
682
|
+
arrowY: ae,
|
|
683
|
+
shouldHideArrow: ce,
|
|
684
|
+
children: /* @__PURE__ */ v(
|
|
685
|
+
B.div,
|
|
686
|
+
{
|
|
687
|
+
"data-side": C,
|
|
688
|
+
"data-align": A,
|
|
689
|
+
...d,
|
|
690
|
+
ref: b,
|
|
691
|
+
style: {
|
|
692
|
+
...d.style,
|
|
693
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
694
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
695
|
+
animation: J ? void 0 : "none"
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
)
|
|
699
|
+
}
|
|
700
|
+
)
|
|
701
|
+
}
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
);
|
|
705
|
+
jt.displayName = Qe;
|
|
706
|
+
var Xt = "PopperArrow", jr = {
|
|
707
|
+
top: "bottom",
|
|
708
|
+
right: "left",
|
|
709
|
+
bottom: "top",
|
|
710
|
+
left: "right"
|
|
711
|
+
}, Ht = a.forwardRef(function(t, n) {
|
|
712
|
+
const { __scopePopper: r, ...o } = t, c = Yr(Xt, r), s = jr[c.placedSide];
|
|
713
|
+
return (
|
|
714
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
715
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
716
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
717
|
+
/* @__PURE__ */ v(
|
|
718
|
+
"span",
|
|
719
|
+
{
|
|
720
|
+
ref: c.onArrowChange,
|
|
721
|
+
style: {
|
|
722
|
+
position: "absolute",
|
|
723
|
+
left: c.arrowX,
|
|
724
|
+
top: c.arrowY,
|
|
725
|
+
[s]: 0,
|
|
726
|
+
transformOrigin: {
|
|
727
|
+
top: "",
|
|
728
|
+
right: "0 0",
|
|
729
|
+
bottom: "center 0",
|
|
730
|
+
left: "100% 0"
|
|
731
|
+
}[c.placedSide],
|
|
732
|
+
transform: {
|
|
733
|
+
top: "translateY(100%)",
|
|
734
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
735
|
+
bottom: "rotate(180deg)",
|
|
736
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
737
|
+
}[c.placedSide],
|
|
738
|
+
visibility: c.shouldHideArrow ? "hidden" : void 0
|
|
739
|
+
},
|
|
740
|
+
children: /* @__PURE__ */ v(
|
|
741
|
+
Kr,
|
|
742
|
+
{
|
|
743
|
+
...o,
|
|
744
|
+
ref: n,
|
|
745
|
+
style: {
|
|
746
|
+
...o.style,
|
|
747
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
748
|
+
display: "block"
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
)
|
|
752
|
+
}
|
|
753
|
+
)
|
|
754
|
+
);
|
|
755
|
+
});
|
|
756
|
+
Ht.displayName = Xt;
|
|
757
|
+
function Xr(e) {
|
|
758
|
+
return e !== null;
|
|
759
|
+
}
|
|
760
|
+
var Hr = (e) => ({
|
|
761
|
+
name: "transformOrigin",
|
|
762
|
+
options: e,
|
|
763
|
+
fn(t) {
|
|
764
|
+
var y, w, E;
|
|
765
|
+
const { placement: n, rects: r, middlewareData: o } = t, s = ((y = o.arrow) == null ? void 0 : y.centerOffset) !== 0, i = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [u, p] = zt(n), f = { start: "0%", center: "50%", end: "100%" }[p], m = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + i / 2, g = (((E = o.arrow) == null ? void 0 : E.y) ?? 0) + l / 2;
|
|
766
|
+
let h = "", d = "";
|
|
767
|
+
return u === "bottom" ? (h = s ? f : `${m}px`, d = `${-l}px`) : u === "top" ? (h = s ? f : `${m}px`, d = `${r.floating.height + l}px`) : u === "right" ? (h = `${-l}px`, d = s ? f : `${g}px`) : u === "left" && (h = `${r.floating.width + l}px`, d = s ? f : `${g}px`), { data: { x: h, y: d } };
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
function zt(e) {
|
|
771
|
+
const [t, n = "center"] = e.split("-");
|
|
772
|
+
return [t, n];
|
|
773
|
+
}
|
|
774
|
+
var zr = Gt, Zr = Yt, Qr = jt, qr = Ht;
|
|
775
|
+
function Jr(e, t) {
|
|
776
|
+
return a.useReducer((n, r) => t[n][r] ?? n, e);
|
|
777
|
+
}
|
|
778
|
+
var Pe = (e) => {
|
|
779
|
+
const { present: t, children: n } = e, r = eo(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), c = W(r.ref, to(o));
|
|
780
|
+
return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: c }) : null;
|
|
781
|
+
};
|
|
782
|
+
Pe.displayName = "Presence";
|
|
783
|
+
function eo(e) {
|
|
784
|
+
const [t, n] = a.useState(), r = a.useRef({}), o = a.useRef(e), c = a.useRef("none"), s = e ? "mounted" : "unmounted", [i, l] = Jr(s, {
|
|
785
|
+
mounted: {
|
|
786
|
+
UNMOUNT: "unmounted",
|
|
787
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
788
|
+
},
|
|
789
|
+
unmountSuspended: {
|
|
790
|
+
MOUNT: "mounted",
|
|
791
|
+
ANIMATION_END: "unmounted"
|
|
792
|
+
},
|
|
793
|
+
unmounted: {
|
|
794
|
+
MOUNT: "mounted"
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
return a.useEffect(() => {
|
|
798
|
+
const u = ge(r.current);
|
|
799
|
+
c.current = i === "mounted" ? u : "none";
|
|
800
|
+
}, [i]), be(() => {
|
|
801
|
+
const u = r.current, p = o.current;
|
|
802
|
+
if (p !== e) {
|
|
803
|
+
const m = c.current, g = ge(u);
|
|
804
|
+
e ? l("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? l("UNMOUNT") : l(p && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
805
|
+
}
|
|
806
|
+
}, [e, l]), be(() => {
|
|
807
|
+
if (t) {
|
|
808
|
+
let u;
|
|
809
|
+
const p = t.ownerDocument.defaultView ?? window, f = (g) => {
|
|
810
|
+
const d = ge(r.current).includes(g.animationName);
|
|
811
|
+
if (g.target === t && d && (l("ANIMATION_END"), !o.current)) {
|
|
812
|
+
const y = t.style.animationFillMode;
|
|
813
|
+
t.style.animationFillMode = "forwards", u = p.setTimeout(() => {
|
|
814
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
}, m = (g) => {
|
|
818
|
+
g.target === t && (c.current = ge(r.current));
|
|
819
|
+
};
|
|
820
|
+
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
821
|
+
p.clearTimeout(u), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
822
|
+
};
|
|
823
|
+
} else
|
|
824
|
+
l("ANIMATION_END");
|
|
825
|
+
}, [t, l]), {
|
|
826
|
+
isPresent: ["mounted", "unmountSuspended"].includes(i),
|
|
827
|
+
ref: a.useCallback((u) => {
|
|
828
|
+
u && (r.current = getComputedStyle(u)), n(u);
|
|
829
|
+
}, [])
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
function ge(e) {
|
|
833
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
834
|
+
}
|
|
835
|
+
function to(e) {
|
|
836
|
+
var r, o;
|
|
837
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
838
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
839
|
+
}
|
|
840
|
+
function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
841
|
+
return function(o) {
|
|
842
|
+
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
843
|
+
return t == null ? void 0 : t(o);
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
function wt(e, t) {
|
|
847
|
+
if (typeof e == "function")
|
|
848
|
+
return e(t);
|
|
849
|
+
e != null && (e.current = t);
|
|
850
|
+
}
|
|
851
|
+
function Zt(...e) {
|
|
852
|
+
return (t) => {
|
|
853
|
+
let n = !1;
|
|
854
|
+
const r = e.map((o) => {
|
|
855
|
+
const c = wt(o, t);
|
|
856
|
+
return !n && typeof c == "function" && (n = !0), c;
|
|
857
|
+
});
|
|
858
|
+
if (n)
|
|
859
|
+
return () => {
|
|
860
|
+
for (let o = 0; o < r.length; o++) {
|
|
861
|
+
const c = r[o];
|
|
862
|
+
typeof c == "function" ? c() : wt(e[o], null);
|
|
863
|
+
}
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
function no(...e) {
|
|
868
|
+
return a.useCallback(Zt(...e), e);
|
|
869
|
+
}
|
|
870
|
+
function ro(e, t = []) {
|
|
871
|
+
let n = [];
|
|
872
|
+
function r(c, s) {
|
|
873
|
+
const i = a.createContext(s), l = n.length;
|
|
874
|
+
n = [...n, s];
|
|
875
|
+
const u = (f) => {
|
|
876
|
+
var w;
|
|
877
|
+
const { scope: m, children: g, ...h } = f, d = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[l]) || i, y = a.useMemo(() => h, Object.values(h));
|
|
878
|
+
return /* @__PURE__ */ v(d.Provider, { value: y, children: g });
|
|
879
|
+
};
|
|
880
|
+
u.displayName = c + "Provider";
|
|
881
|
+
function p(f, m) {
|
|
882
|
+
var d;
|
|
883
|
+
const g = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[l]) || i, h = a.useContext(g);
|
|
884
|
+
if (h) return h;
|
|
885
|
+
if (s !== void 0) return s;
|
|
886
|
+
throw new Error(`\`${f}\` must be used within \`${c}\``);
|
|
887
|
+
}
|
|
888
|
+
return [u, p];
|
|
889
|
+
}
|
|
890
|
+
const o = () => {
|
|
891
|
+
const c = n.map((s) => a.createContext(s));
|
|
892
|
+
return function(i) {
|
|
893
|
+
const l = (i == null ? void 0 : i[e]) || c;
|
|
894
|
+
return a.useMemo(
|
|
895
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: l } }),
|
|
896
|
+
[i, l]
|
|
897
|
+
);
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
return o.scopeName = e, [r, oo(o, ...t)];
|
|
901
|
+
}
|
|
902
|
+
function oo(...e) {
|
|
903
|
+
const t = e[0];
|
|
904
|
+
if (e.length === 1) return t;
|
|
905
|
+
const n = () => {
|
|
906
|
+
const r = e.map((o) => ({
|
|
907
|
+
useScope: o(),
|
|
908
|
+
scopeName: o.scopeName
|
|
909
|
+
}));
|
|
910
|
+
return function(c) {
|
|
911
|
+
const s = r.reduce((i, { useScope: l, scopeName: u }) => {
|
|
912
|
+
const f = l(c)[`__scope${u}`];
|
|
913
|
+
return { ...i, ...f };
|
|
914
|
+
}, {});
|
|
915
|
+
return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
return n.scopeName = t.scopeName, n;
|
|
919
|
+
}
|
|
920
|
+
var Qt = a.forwardRef((e, t) => {
|
|
921
|
+
const { children: n, ...r } = e, o = a.Children.toArray(n), c = o.find(co);
|
|
922
|
+
if (c) {
|
|
923
|
+
const s = c.props.children, i = o.map((l) => l === c ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : l);
|
|
924
|
+
return /* @__PURE__ */ v(Ge, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, i) : null });
|
|
925
|
+
}
|
|
926
|
+
return /* @__PURE__ */ v(Ge, { ...r, ref: t, children: n });
|
|
927
|
+
});
|
|
928
|
+
Qt.displayName = "Slot";
|
|
929
|
+
var Ge = a.forwardRef((e, t) => {
|
|
930
|
+
const { children: n, ...r } = e;
|
|
931
|
+
if (a.isValidElement(n)) {
|
|
932
|
+
const o = so(n);
|
|
933
|
+
return a.cloneElement(n, {
|
|
934
|
+
...io(r, n.props),
|
|
935
|
+
// @ts-ignore
|
|
936
|
+
ref: t ? Zt(t, o) : o
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
return a.Children.count(n) > 1 ? a.Children.only(null) : null;
|
|
940
|
+
});
|
|
941
|
+
Ge.displayName = "SlotClone";
|
|
942
|
+
var ao = ({ children: e }) => /* @__PURE__ */ v(Xe, { children: e });
|
|
943
|
+
function co(e) {
|
|
944
|
+
return a.isValidElement(e) && e.type === ao;
|
|
945
|
+
}
|
|
946
|
+
function io(e, t) {
|
|
947
|
+
const n = { ...t };
|
|
948
|
+
for (const r in t) {
|
|
949
|
+
const o = e[r], c = t[r];
|
|
950
|
+
/^on[A-Z]/.test(r) ? o && c ? n[r] = (...i) => {
|
|
951
|
+
c(...i), o(...i);
|
|
952
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...c } : r === "className" && (n[r] = [o, c].filter(Boolean).join(" "));
|
|
953
|
+
}
|
|
954
|
+
return { ...e, ...n };
|
|
955
|
+
}
|
|
956
|
+
function so(e) {
|
|
957
|
+
var r, o;
|
|
958
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
959
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
960
|
+
}
|
|
961
|
+
var uo = [
|
|
962
|
+
"a",
|
|
963
|
+
"button",
|
|
964
|
+
"div",
|
|
965
|
+
"form",
|
|
966
|
+
"h2",
|
|
967
|
+
"h3",
|
|
968
|
+
"img",
|
|
969
|
+
"input",
|
|
970
|
+
"label",
|
|
971
|
+
"li",
|
|
972
|
+
"nav",
|
|
973
|
+
"ol",
|
|
974
|
+
"p",
|
|
975
|
+
"span",
|
|
976
|
+
"svg",
|
|
977
|
+
"ul"
|
|
978
|
+
], qt = uo.reduce((e, t) => {
|
|
979
|
+
const n = a.forwardRef((r, o) => {
|
|
980
|
+
const { asChild: c, ...s } = r, i = c ? Qt : t;
|
|
981
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(i, { ...s, ref: o });
|
|
982
|
+
});
|
|
983
|
+
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
984
|
+
}, {}), Fe = "rovingFocusGroup.onEntryFocus", lo = { bubbles: !1, cancelable: !0 }, Me = "RovingFocusGroup", [Ve, Jt, fo] = Mt(Me), [po, en] = ro(
|
|
985
|
+
Me,
|
|
986
|
+
[fo]
|
|
987
|
+
), [mo, vo] = po(Me), tn = a.forwardRef(
|
|
988
|
+
(e, t) => /* @__PURE__ */ v(Ve.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(Ve.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(ho, { ...e, ref: t }) }) })
|
|
989
|
+
);
|
|
990
|
+
tn.displayName = Me;
|
|
991
|
+
var ho = a.forwardRef((e, t) => {
|
|
992
|
+
const {
|
|
993
|
+
__scopeRovingFocusGroup: n,
|
|
994
|
+
orientation: r,
|
|
995
|
+
loop: o = !1,
|
|
996
|
+
dir: c,
|
|
997
|
+
currentTabStopId: s,
|
|
998
|
+
defaultCurrentTabStopId: i,
|
|
999
|
+
onCurrentTabStopIdChange: l,
|
|
1000
|
+
onEntryFocus: u,
|
|
1001
|
+
preventScrollOnEntryFocus: p = !1,
|
|
1002
|
+
...f
|
|
1003
|
+
} = e, m = a.useRef(null), g = no(t, m), h = xt(c), [d = null, y] = Pt({
|
|
1004
|
+
prop: s,
|
|
1005
|
+
defaultProp: i,
|
|
1006
|
+
onChange: l
|
|
1007
|
+
}), [w, E] = a.useState(!1), b = X(u), _ = Jt(n), R = a.useRef(!1), [x, S] = a.useState(0);
|
|
1008
|
+
return a.useEffect(() => {
|
|
1009
|
+
const P = m.current;
|
|
1010
|
+
if (P)
|
|
1011
|
+
return P.addEventListener(Fe, b), () => P.removeEventListener(Fe, b);
|
|
1012
|
+
}, [b]), /* @__PURE__ */ v(
|
|
1013
|
+
mo,
|
|
1014
|
+
{
|
|
1015
|
+
scope: n,
|
|
1016
|
+
orientation: r,
|
|
1017
|
+
dir: h,
|
|
1018
|
+
loop: o,
|
|
1019
|
+
currentTabStopId: d,
|
|
1020
|
+
onItemFocus: a.useCallback(
|
|
1021
|
+
(P) => y(P),
|
|
1022
|
+
[y]
|
|
1023
|
+
),
|
|
1024
|
+
onItemShiftTab: a.useCallback(() => E(!0), []),
|
|
1025
|
+
onFocusableItemAdd: a.useCallback(
|
|
1026
|
+
() => S((P) => P + 1),
|
|
1027
|
+
[]
|
|
1028
|
+
),
|
|
1029
|
+
onFocusableItemRemove: a.useCallback(
|
|
1030
|
+
() => S((P) => P - 1),
|
|
1031
|
+
[]
|
|
1032
|
+
),
|
|
1033
|
+
children: /* @__PURE__ */ v(
|
|
1034
|
+
qt.div,
|
|
1035
|
+
{
|
|
1036
|
+
tabIndex: w || x === 0 ? -1 : 0,
|
|
1037
|
+
"data-orientation": r,
|
|
1038
|
+
...f,
|
|
1039
|
+
ref: g,
|
|
1040
|
+
style: { outline: "none", ...e.style },
|
|
1041
|
+
onMouseDown: ne(e.onMouseDown, () => {
|
|
1042
|
+
R.current = !0;
|
|
1043
|
+
}),
|
|
1044
|
+
onFocus: ne(e.onFocus, (P) => {
|
|
1045
|
+
const I = !R.current;
|
|
1046
|
+
if (P.target === P.currentTarget && I && !w) {
|
|
1047
|
+
const T = new CustomEvent(Fe, lo);
|
|
1048
|
+
if (P.currentTarget.dispatchEvent(T), !T.defaultPrevented) {
|
|
1049
|
+
const V = _().filter(($) => $.focusable), H = V.find(($) => $.active), K = V.find(($) => $.id === d), q = [H, K, ...V].filter(
|
|
1050
|
+
Boolean
|
|
1051
|
+
).map(($) => $.ref.current);
|
|
1052
|
+
on(q, p);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
R.current = !1;
|
|
1056
|
+
}),
|
|
1057
|
+
onBlur: ne(e.onBlur, () => E(!1))
|
|
1058
|
+
}
|
|
1059
|
+
)
|
|
1060
|
+
}
|
|
1061
|
+
);
|
|
1062
|
+
}), nn = "RovingFocusGroupItem", rn = a.forwardRef(
|
|
1063
|
+
(e, t) => {
|
|
1064
|
+
const {
|
|
1065
|
+
__scopeRovingFocusGroup: n,
|
|
1066
|
+
focusable: r = !0,
|
|
1067
|
+
active: o = !1,
|
|
1068
|
+
tabStopId: c,
|
|
1069
|
+
...s
|
|
1070
|
+
} = e, i = We(), l = c || i, u = vo(nn, n), p = u.currentTabStopId === l, f = Jt(n), { onFocusableItemAdd: m, onFocusableItemRemove: g } = u;
|
|
1071
|
+
return a.useEffect(() => {
|
|
1072
|
+
if (r)
|
|
1073
|
+
return m(), () => g();
|
|
1074
|
+
}, [r, m, g]), /* @__PURE__ */ v(
|
|
1075
|
+
Ve.ItemSlot,
|
|
1076
|
+
{
|
|
1077
|
+
scope: n,
|
|
1078
|
+
id: l,
|
|
1079
|
+
focusable: r,
|
|
1080
|
+
active: o,
|
|
1081
|
+
children: /* @__PURE__ */ v(
|
|
1082
|
+
qt.span,
|
|
1083
|
+
{
|
|
1084
|
+
tabIndex: p ? 0 : -1,
|
|
1085
|
+
"data-orientation": u.orientation,
|
|
1086
|
+
...s,
|
|
1087
|
+
ref: t,
|
|
1088
|
+
onMouseDown: ne(e.onMouseDown, (h) => {
|
|
1089
|
+
r ? u.onItemFocus(l) : h.preventDefault();
|
|
1090
|
+
}),
|
|
1091
|
+
onFocus: ne(e.onFocus, () => u.onItemFocus(l)),
|
|
1092
|
+
onKeyDown: ne(e.onKeyDown, (h) => {
|
|
1093
|
+
if (h.key === "Tab" && h.shiftKey) {
|
|
1094
|
+
u.onItemShiftTab();
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
if (h.target !== h.currentTarget) return;
|
|
1098
|
+
const d = yo(h, u.orientation, u.dir);
|
|
1099
|
+
if (d !== void 0) {
|
|
1100
|
+
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
1101
|
+
h.preventDefault();
|
|
1102
|
+
let w = f().filter((E) => E.focusable).map((E) => E.ref.current);
|
|
1103
|
+
if (d === "last") w.reverse();
|
|
1104
|
+
else if (d === "prev" || d === "next") {
|
|
1105
|
+
d === "prev" && w.reverse();
|
|
1106
|
+
const E = w.indexOf(h.currentTarget);
|
|
1107
|
+
w = u.loop ? Co(w, E + 1) : w.slice(E + 1);
|
|
1108
|
+
}
|
|
1109
|
+
setTimeout(() => on(w));
|
|
1110
|
+
}
|
|
1111
|
+
})
|
|
1112
|
+
}
|
|
1113
|
+
)
|
|
1114
|
+
}
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
);
|
|
1118
|
+
rn.displayName = nn;
|
|
1119
|
+
var go = {
|
|
1120
|
+
ArrowLeft: "prev",
|
|
1121
|
+
ArrowUp: "prev",
|
|
1122
|
+
ArrowRight: "next",
|
|
1123
|
+
ArrowDown: "next",
|
|
1124
|
+
PageUp: "first",
|
|
1125
|
+
Home: "first",
|
|
1126
|
+
PageDown: "last",
|
|
1127
|
+
End: "last"
|
|
1128
|
+
};
|
|
1129
|
+
function wo(e, t) {
|
|
1130
|
+
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
1131
|
+
}
|
|
1132
|
+
function yo(e, t, n) {
|
|
1133
|
+
const r = wo(e.key, n);
|
|
1134
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
1135
|
+
return go[r];
|
|
1136
|
+
}
|
|
1137
|
+
function on(e, t = !1) {
|
|
1138
|
+
const n = document.activeElement;
|
|
1139
|
+
for (const r of e)
|
|
1140
|
+
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
1141
|
+
}
|
|
1142
|
+
function Co(e, t) {
|
|
1143
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1144
|
+
}
|
|
1145
|
+
var Eo = tn, bo = rn, Ce = "right-scroll-bar-position", Ee = "width-before-scroll-bar", So = "with-scroll-bars-hidden", _o = "--removed-body-scroll-bar-size";
|
|
1146
|
+
function Le(e, t) {
|
|
1147
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
1148
|
+
}
|
|
1149
|
+
function Ro(e, t) {
|
|
1150
|
+
var n = Rt(function() {
|
|
1151
|
+
return {
|
|
1152
|
+
// value
|
|
1153
|
+
value: e,
|
|
1154
|
+
// last callback
|
|
1155
|
+
callback: t,
|
|
1156
|
+
// "memoized" public interface
|
|
1157
|
+
facade: {
|
|
1158
|
+
get current() {
|
|
1159
|
+
return n.value;
|
|
1160
|
+
},
|
|
1161
|
+
set current(r) {
|
|
1162
|
+
var o = n.value;
|
|
1163
|
+
o !== r && (n.value = r, n.callback(r, o));
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
})[0];
|
|
1168
|
+
return n.callback = t, n.facade;
|
|
1169
|
+
}
|
|
1170
|
+
var Po = typeof window < "u" ? a.useLayoutEffect : a.useEffect, yt = /* @__PURE__ */ new WeakMap();
|
|
1171
|
+
function Mo(e, t) {
|
|
1172
|
+
var n = Ro(null, function(r) {
|
|
1173
|
+
return e.forEach(function(o) {
|
|
1174
|
+
return Le(o, r);
|
|
1175
|
+
});
|
|
1176
|
+
});
|
|
1177
|
+
return Po(function() {
|
|
1178
|
+
var r = yt.get(n);
|
|
1179
|
+
if (r) {
|
|
1180
|
+
var o = new Set(r), c = new Set(e), s = n.current;
|
|
1181
|
+
o.forEach(function(i) {
|
|
1182
|
+
c.has(i) || Le(i, null);
|
|
1183
|
+
}), c.forEach(function(i) {
|
|
1184
|
+
o.has(i) || Le(i, s);
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
yt.set(n, e);
|
|
1188
|
+
}, [e]), n;
|
|
1189
|
+
}
|
|
1190
|
+
function xo(e) {
|
|
1191
|
+
return e;
|
|
1192
|
+
}
|
|
1193
|
+
function No(e, t) {
|
|
1194
|
+
t === void 0 && (t = xo);
|
|
1195
|
+
var n = [], r = !1, o = {
|
|
1196
|
+
read: function() {
|
|
1197
|
+
if (r)
|
|
1198
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
1199
|
+
return n.length ? n[n.length - 1] : e;
|
|
1200
|
+
},
|
|
1201
|
+
useMedium: function(c) {
|
|
1202
|
+
var s = t(c, r);
|
|
1203
|
+
return n.push(s), function() {
|
|
1204
|
+
n = n.filter(function(i) {
|
|
1205
|
+
return i !== s;
|
|
1206
|
+
});
|
|
1207
|
+
};
|
|
1208
|
+
},
|
|
1209
|
+
assignSyncMedium: function(c) {
|
|
1210
|
+
for (r = !0; n.length; ) {
|
|
1211
|
+
var s = n;
|
|
1212
|
+
n = [], s.forEach(c);
|
|
1213
|
+
}
|
|
1214
|
+
n = {
|
|
1215
|
+
push: function(i) {
|
|
1216
|
+
return c(i);
|
|
1217
|
+
},
|
|
1218
|
+
filter: function() {
|
|
1219
|
+
return n;
|
|
1220
|
+
}
|
|
1221
|
+
};
|
|
1222
|
+
},
|
|
1223
|
+
assignMedium: function(c) {
|
|
1224
|
+
r = !0;
|
|
1225
|
+
var s = [];
|
|
1226
|
+
if (n.length) {
|
|
1227
|
+
var i = n;
|
|
1228
|
+
n = [], i.forEach(c), s = n;
|
|
1229
|
+
}
|
|
1230
|
+
var l = function() {
|
|
1231
|
+
var p = s;
|
|
1232
|
+
s = [], p.forEach(c);
|
|
1233
|
+
}, u = function() {
|
|
1234
|
+
return Promise.resolve().then(l);
|
|
1235
|
+
};
|
|
1236
|
+
u(), n = {
|
|
1237
|
+
push: function(p) {
|
|
1238
|
+
s.push(p), u();
|
|
1239
|
+
},
|
|
1240
|
+
filter: function(p) {
|
|
1241
|
+
return s = s.filter(p), n;
|
|
1242
|
+
}
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
};
|
|
1246
|
+
return o;
|
|
1247
|
+
}
|
|
1248
|
+
function Io(e) {
|
|
1249
|
+
e === void 0 && (e = {});
|
|
1250
|
+
var t = No(null);
|
|
1251
|
+
return t.options = j({ async: !0, ssr: !1 }, e), t;
|
|
1252
|
+
}
|
|
1253
|
+
var an = function(e) {
|
|
1254
|
+
var t = e.sideCar, n = Nt(e, ["sideCar"]);
|
|
1255
|
+
if (!t)
|
|
1256
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
1257
|
+
var r = t.read();
|
|
1258
|
+
if (!r)
|
|
1259
|
+
throw new Error("Sidecar medium not found");
|
|
1260
|
+
return a.createElement(r, j({}, n));
|
|
1261
|
+
};
|
|
1262
|
+
an.isSideCarExport = !0;
|
|
1263
|
+
function Ao(e, t) {
|
|
1264
|
+
return e.useMedium(t), an;
|
|
1265
|
+
}
|
|
1266
|
+
var cn = Io(), ke = function() {
|
|
1267
|
+
}, xe = a.forwardRef(function(e, t) {
|
|
1268
|
+
var n = a.useRef(null), r = a.useState({
|
|
1269
|
+
onScrollCapture: ke,
|
|
1270
|
+
onWheelCapture: ke,
|
|
1271
|
+
onTouchMoveCapture: ke
|
|
1272
|
+
}), o = r[0], c = r[1], s = e.forwardProps, i = e.children, l = e.className, u = e.removeScrollBar, p = e.enabled, f = e.shards, m = e.sideCar, g = e.noIsolation, h = e.inert, d = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, E = e.gapMode, b = Nt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), _ = m, R = Mo([n, t]), x = j(j({}, b), o);
|
|
1273
|
+
return a.createElement(
|
|
1274
|
+
a.Fragment,
|
|
1275
|
+
null,
|
|
1276
|
+
p && a.createElement(_, { sideCar: cn, removeScrollBar: u, shards: f, noIsolation: g, inert: h, setCallbacks: c, allowPinchZoom: !!d, lockRef: n, gapMode: E }),
|
|
1277
|
+
s ? a.cloneElement(a.Children.only(i), j(j({}, x), { ref: R })) : a.createElement(w, j({}, x, { className: l, ref: R }), i)
|
|
1278
|
+
);
|
|
1279
|
+
});
|
|
1280
|
+
xe.defaultProps = {
|
|
1281
|
+
enabled: !0,
|
|
1282
|
+
removeScrollBar: !0,
|
|
1283
|
+
inert: !1
|
|
1284
|
+
};
|
|
1285
|
+
xe.classNames = {
|
|
1286
|
+
fullWidth: Ee,
|
|
1287
|
+
zeroRight: Ce
|
|
1288
|
+
};
|
|
1289
|
+
function Do() {
|
|
1290
|
+
if (!document)
|
|
1291
|
+
return null;
|
|
1292
|
+
var e = document.createElement("style");
|
|
1293
|
+
e.type = "text/css";
|
|
1294
|
+
var t = cr();
|
|
1295
|
+
return t && e.setAttribute("nonce", t), e;
|
|
1296
|
+
}
|
|
1297
|
+
function To(e, t) {
|
|
1298
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1299
|
+
}
|
|
1300
|
+
function Oo(e) {
|
|
1301
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1302
|
+
t.appendChild(e);
|
|
1303
|
+
}
|
|
1304
|
+
var Fo = function() {
|
|
1305
|
+
var e = 0, t = null;
|
|
1306
|
+
return {
|
|
1307
|
+
add: function(n) {
|
|
1308
|
+
e == 0 && (t = Do()) && (To(t, n), Oo(t)), e++;
|
|
1309
|
+
},
|
|
1310
|
+
remove: function() {
|
|
1311
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
}, Lo = function() {
|
|
1315
|
+
var e = Fo();
|
|
1316
|
+
return function(t, n) {
|
|
1317
|
+
a.useEffect(function() {
|
|
1318
|
+
return e.add(t), function() {
|
|
1319
|
+
e.remove();
|
|
1320
|
+
};
|
|
1321
|
+
}, [t && n]);
|
|
1322
|
+
};
|
|
1323
|
+
}, sn = function() {
|
|
1324
|
+
var e = Lo(), t = function(n) {
|
|
1325
|
+
var r = n.styles, o = n.dynamic;
|
|
1326
|
+
return e(r, o), null;
|
|
1327
|
+
};
|
|
1328
|
+
return t;
|
|
1329
|
+
}, ko = {
|
|
1330
|
+
left: 0,
|
|
1331
|
+
top: 0,
|
|
1332
|
+
right: 0,
|
|
1333
|
+
gap: 0
|
|
1334
|
+
}, $e = function(e) {
|
|
1335
|
+
return parseInt(e || "", 10) || 0;
|
|
1336
|
+
}, $o = function(e) {
|
|
1337
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1338
|
+
return [$e(n), $e(r), $e(o)];
|
|
1339
|
+
}, Wo = function(e) {
|
|
1340
|
+
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1341
|
+
return ko;
|
|
1342
|
+
var t = $o(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1343
|
+
return {
|
|
1344
|
+
left: t[0],
|
|
1345
|
+
top: t[1],
|
|
1346
|
+
right: t[2],
|
|
1347
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1348
|
+
};
|
|
1349
|
+
}, Bo = sn(), re = "data-scroll-locked", Uo = function(e, t, n, r) {
|
|
1350
|
+
var o = e.left, c = e.top, s = e.right, i = e.gap;
|
|
1351
|
+
return n === void 0 && (n = "margin"), `
|
|
1352
|
+
.`.concat(So, ` {
|
|
1353
|
+
overflow: hidden `).concat(r, `;
|
|
1354
|
+
padding-right: `).concat(i, "px ").concat(r, `;
|
|
1355
|
+
}
|
|
1356
|
+
body[`).concat(re, `] {
|
|
1357
|
+
overflow: hidden `).concat(r, `;
|
|
1358
|
+
overscroll-behavior: contain;
|
|
1359
|
+
`).concat([
|
|
1360
|
+
t && "position: relative ".concat(r, ";"),
|
|
1361
|
+
n === "margin" && `
|
|
1362
|
+
padding-left: `.concat(o, `px;
|
|
1363
|
+
padding-top: `).concat(c, `px;
|
|
1364
|
+
padding-right: `).concat(s, `px;
|
|
1365
|
+
margin-left:0;
|
|
1366
|
+
margin-top:0;
|
|
1367
|
+
margin-right: `).concat(i, "px ").concat(r, `;
|
|
1368
|
+
`),
|
|
1369
|
+
n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
|
|
1370
|
+
].filter(Boolean).join(""), `
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
.`).concat(Ce, ` {
|
|
1374
|
+
right: `).concat(i, "px ").concat(r, `;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
.`).concat(Ee, ` {
|
|
1378
|
+
margin-right: `).concat(i, "px ").concat(r, `;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
.`).concat(Ce, " .").concat(Ce, ` {
|
|
1382
|
+
right: 0 `).concat(r, `;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
.`).concat(Ee, " .").concat(Ee, ` {
|
|
1386
|
+
margin-right: 0 `).concat(r, `;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
body[`).concat(re, `] {
|
|
1390
|
+
`).concat(_o, ": ").concat(i, `px;
|
|
1391
|
+
}
|
|
1392
|
+
`);
|
|
1393
|
+
}, Ct = function() {
|
|
1394
|
+
var e = parseInt(document.body.getAttribute(re) || "0", 10);
|
|
1395
|
+
return isFinite(e) ? e : 0;
|
|
1396
|
+
}, Ko = function() {
|
|
1397
|
+
a.useEffect(function() {
|
|
1398
|
+
return document.body.setAttribute(re, (Ct() + 1).toString()), function() {
|
|
1399
|
+
var e = Ct() - 1;
|
|
1400
|
+
e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
|
|
1401
|
+
};
|
|
1402
|
+
}, []);
|
|
1403
|
+
}, Go = function(e) {
|
|
1404
|
+
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
1405
|
+
Ko();
|
|
1406
|
+
var c = a.useMemo(function() {
|
|
1407
|
+
return Wo(o);
|
|
1408
|
+
}, [o]);
|
|
1409
|
+
return a.createElement(Bo, { styles: Uo(c, !t, o, n ? "" : "!important") });
|
|
1410
|
+
}, Ye = !1;
|
|
1411
|
+
if (typeof window < "u")
|
|
1412
|
+
try {
|
|
1413
|
+
var we = Object.defineProperty({}, "passive", {
|
|
1414
|
+
get: function() {
|
|
1415
|
+
return Ye = !0, !0;
|
|
1416
|
+
}
|
|
1417
|
+
});
|
|
1418
|
+
window.addEventListener("test", we, we), window.removeEventListener("test", we, we);
|
|
1419
|
+
} catch {
|
|
1420
|
+
Ye = !1;
|
|
1421
|
+
}
|
|
1422
|
+
var ee = Ye ? { passive: !1 } : !1, Vo = function(e) {
|
|
1423
|
+
return e.tagName === "TEXTAREA";
|
|
1424
|
+
}, un = function(e, t) {
|
|
1425
|
+
if (!(e instanceof Element))
|
|
1426
|
+
return !1;
|
|
1427
|
+
var n = window.getComputedStyle(e);
|
|
1428
|
+
return (
|
|
1429
|
+
// not-not-scrollable
|
|
1430
|
+
n[t] !== "hidden" && // contains scroll inside self
|
|
1431
|
+
!(n.overflowY === n.overflowX && !Vo(e) && n[t] === "visible")
|
|
1432
|
+
);
|
|
1433
|
+
}, Yo = function(e) {
|
|
1434
|
+
return un(e, "overflowY");
|
|
1435
|
+
}, jo = function(e) {
|
|
1436
|
+
return un(e, "overflowX");
|
|
1437
|
+
}, Et = function(e, t) {
|
|
1438
|
+
var n = t.ownerDocument, r = t;
|
|
1439
|
+
do {
|
|
1440
|
+
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
1441
|
+
var o = ln(e, r);
|
|
1442
|
+
if (o) {
|
|
1443
|
+
var c = dn(e, r), s = c[1], i = c[2];
|
|
1444
|
+
if (s > i)
|
|
1445
|
+
return !0;
|
|
1446
|
+
}
|
|
1447
|
+
r = r.parentNode;
|
|
1448
|
+
} while (r && r !== n.body);
|
|
1449
|
+
return !1;
|
|
1450
|
+
}, Xo = function(e) {
|
|
1451
|
+
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
1452
|
+
return [
|
|
1453
|
+
t,
|
|
1454
|
+
n,
|
|
1455
|
+
r
|
|
1456
|
+
];
|
|
1457
|
+
}, Ho = function(e) {
|
|
1458
|
+
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
1459
|
+
return [
|
|
1460
|
+
t,
|
|
1461
|
+
n,
|
|
1462
|
+
r
|
|
1463
|
+
];
|
|
1464
|
+
}, ln = function(e, t) {
|
|
1465
|
+
return e === "v" ? Yo(t) : jo(t);
|
|
1466
|
+
}, dn = function(e, t) {
|
|
1467
|
+
return e === "v" ? Xo(t) : Ho(t);
|
|
1468
|
+
}, zo = function(e, t) {
|
|
1469
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1470
|
+
}, Zo = function(e, t, n, r, o) {
|
|
1471
|
+
var c = zo(e, window.getComputedStyle(t).direction), s = c * r, i = n.target, l = t.contains(i), u = !1, p = s > 0, f = 0, m = 0;
|
|
1472
|
+
do {
|
|
1473
|
+
var g = dn(e, i), h = g[0], d = g[1], y = g[2], w = d - y - c * h;
|
|
1474
|
+
(h || w) && ln(e, i) && (f += w, m += h), i instanceof ShadowRoot ? i = i.host : i = i.parentNode;
|
|
1475
|
+
} while (
|
|
1476
|
+
// portaled content
|
|
1477
|
+
!l && i !== document.body || // self content
|
|
1478
|
+
l && (t.contains(i) || t === i)
|
|
1479
|
+
);
|
|
1480
|
+
return (p && (Math.abs(f) < 1 || !o) || !p && (Math.abs(m) < 1 || !o)) && (u = !0), u;
|
|
1481
|
+
}, ye = function(e) {
|
|
1482
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1483
|
+
}, bt = function(e) {
|
|
1484
|
+
return [e.deltaX, e.deltaY];
|
|
1485
|
+
}, St = function(e) {
|
|
1486
|
+
return e && "current" in e ? e.current : e;
|
|
1487
|
+
}, Qo = function(e, t) {
|
|
1488
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
1489
|
+
}, qo = function(e) {
|
|
1490
|
+
return `
|
|
1491
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1492
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1493
|
+
`);
|
|
1494
|
+
}, Jo = 0, te = [];
|
|
1495
|
+
function ea(e) {
|
|
1496
|
+
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Jo++)[0], c = a.useState(sn)[0], s = a.useRef(e);
|
|
1497
|
+
a.useEffect(function() {
|
|
1498
|
+
s.current = e;
|
|
1499
|
+
}, [e]), a.useEffect(function() {
|
|
1500
|
+
if (e.inert) {
|
|
1501
|
+
document.body.classList.add("block-interactivity-".concat(o));
|
|
1502
|
+
var d = ur([e.lockRef.current], (e.shards || []).map(St), !0).filter(Boolean);
|
|
1503
|
+
return d.forEach(function(y) {
|
|
1504
|
+
return y.classList.add("allow-interactivity-".concat(o));
|
|
1505
|
+
}), function() {
|
|
1506
|
+
document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(y) {
|
|
1507
|
+
return y.classList.remove("allow-interactivity-".concat(o));
|
|
1508
|
+
});
|
|
1509
|
+
};
|
|
1510
|
+
}
|
|
1511
|
+
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1512
|
+
var i = a.useCallback(function(d, y) {
|
|
1513
|
+
if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
|
|
1514
|
+
return !s.current.allowPinchZoom;
|
|
1515
|
+
var w = ye(d), E = n.current, b = "deltaX" in d ? d.deltaX : E[0] - w[0], _ = "deltaY" in d ? d.deltaY : E[1] - w[1], R, x = d.target, S = Math.abs(b) > Math.abs(_) ? "h" : "v";
|
|
1516
|
+
if ("touches" in d && S === "h" && x.type === "range")
|
|
1517
|
+
return !1;
|
|
1518
|
+
var P = Et(S, x);
|
|
1519
|
+
if (!P)
|
|
1520
|
+
return !0;
|
|
1521
|
+
if (P ? R = S : (R = S === "v" ? "h" : "v", P = Et(S, x)), !P)
|
|
1522
|
+
return !1;
|
|
1523
|
+
if (!r.current && "changedTouches" in d && (b || _) && (r.current = R), !R)
|
|
1524
|
+
return !0;
|
|
1525
|
+
var I = r.current || R;
|
|
1526
|
+
return Zo(I, y, d, I === "h" ? b : _, !0);
|
|
1527
|
+
}, []), l = a.useCallback(function(d) {
|
|
1528
|
+
var y = d;
|
|
1529
|
+
if (!(!te.length || te[te.length - 1] !== c)) {
|
|
1530
|
+
var w = "deltaY" in y ? bt(y) : ye(y), E = t.current.filter(function(R) {
|
|
1531
|
+
return R.name === y.type && (R.target === y.target || y.target === R.shadowParent) && Qo(R.delta, w);
|
|
1532
|
+
})[0];
|
|
1533
|
+
if (E && E.should) {
|
|
1534
|
+
y.cancelable && y.preventDefault();
|
|
1535
|
+
return;
|
|
1536
|
+
}
|
|
1537
|
+
if (!E) {
|
|
1538
|
+
var b = (s.current.shards || []).map(St).filter(Boolean).filter(function(R) {
|
|
1539
|
+
return R.contains(y.target);
|
|
1540
|
+
}), _ = b.length > 0 ? i(y, b[0]) : !s.current.noIsolation;
|
|
1541
|
+
_ && y.cancelable && y.preventDefault();
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}, []), u = a.useCallback(function(d, y, w, E) {
|
|
1545
|
+
var b = { name: d, delta: y, target: w, should: E, shadowParent: ta(w) };
|
|
1546
|
+
t.current.push(b), setTimeout(function() {
|
|
1547
|
+
t.current = t.current.filter(function(_) {
|
|
1548
|
+
return _ !== b;
|
|
1549
|
+
});
|
|
1550
|
+
}, 1);
|
|
1551
|
+
}, []), p = a.useCallback(function(d) {
|
|
1552
|
+
n.current = ye(d), r.current = void 0;
|
|
1553
|
+
}, []), f = a.useCallback(function(d) {
|
|
1554
|
+
u(d.type, bt(d), d.target, i(d, e.lockRef.current));
|
|
1555
|
+
}, []), m = a.useCallback(function(d) {
|
|
1556
|
+
u(d.type, ye(d), d.target, i(d, e.lockRef.current));
|
|
1557
|
+
}, []);
|
|
1558
|
+
a.useEffect(function() {
|
|
1559
|
+
return te.push(c), e.setCallbacks({
|
|
1560
|
+
onScrollCapture: f,
|
|
1561
|
+
onWheelCapture: f,
|
|
1562
|
+
onTouchMoveCapture: m
|
|
1563
|
+
}), document.addEventListener("wheel", l, ee), document.addEventListener("touchmove", l, ee), document.addEventListener("touchstart", p, ee), function() {
|
|
1564
|
+
te = te.filter(function(d) {
|
|
1565
|
+
return d !== c;
|
|
1566
|
+
}), document.removeEventListener("wheel", l, ee), document.removeEventListener("touchmove", l, ee), document.removeEventListener("touchstart", p, ee);
|
|
1567
|
+
};
|
|
1568
|
+
}, []);
|
|
1569
|
+
var g = e.removeScrollBar, h = e.inert;
|
|
1570
|
+
return a.createElement(
|
|
1571
|
+
a.Fragment,
|
|
1572
|
+
null,
|
|
1573
|
+
h ? a.createElement(c, { styles: qo(o) }) : null,
|
|
1574
|
+
g ? a.createElement(Go, { gapMode: e.gapMode }) : null
|
|
1575
|
+
);
|
|
1576
|
+
}
|
|
1577
|
+
function ta(e) {
|
|
1578
|
+
for (var t = null; e !== null; )
|
|
1579
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1580
|
+
return t;
|
|
1581
|
+
}
|
|
1582
|
+
const na = Ao(cn, ea);
|
|
1583
|
+
var fn = a.forwardRef(function(e, t) {
|
|
1584
|
+
return a.createElement(xe, j({}, e, { ref: t, sideCar: na }));
|
|
1585
|
+
});
|
|
1586
|
+
fn.classNames = xe.classNames;
|
|
1587
|
+
var je = ["Enter", " "], ra = ["ArrowDown", "PageUp", "Home"], pn = ["ArrowUp", "PageDown", "End"], oa = [...ra, ...pn], aa = {
|
|
1588
|
+
ltr: [...je, "ArrowRight"],
|
|
1589
|
+
rtl: [...je, "ArrowLeft"]
|
|
1590
|
+
}, ca = {
|
|
1591
|
+
ltr: ["ArrowLeft"],
|
|
1592
|
+
rtl: ["ArrowRight"]
|
|
1593
|
+
}, pe = "Menu", [de, ia, sa] = Mt(pe), [Z, mn] = Dt(pe, [
|
|
1594
|
+
sa,
|
|
1595
|
+
Ut,
|
|
1596
|
+
en
|
|
1597
|
+
]), Ne = Ut(), vn = en(), [ua, oe] = Z(pe), [la, me] = Z(pe), hn = (e) => {
|
|
1598
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: c, modal: s = !0 } = e, i = Ne(t), [l, u] = a.useState(null), p = a.useRef(!1), f = X(c), m = xt(o);
|
|
1599
|
+
return a.useEffect(() => {
|
|
1600
|
+
const g = () => {
|
|
1601
|
+
p.current = !0, document.addEventListener("pointerdown", h, { capture: !0, once: !0 }), document.addEventListener("pointermove", h, { capture: !0, once: !0 });
|
|
1602
|
+
}, h = () => p.current = !1;
|
|
1603
|
+
return document.addEventListener("keydown", g, { capture: !0 }), () => {
|
|
1604
|
+
document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", h, { capture: !0 }), document.removeEventListener("pointermove", h, { capture: !0 });
|
|
1605
|
+
};
|
|
1606
|
+
}, []), /* @__PURE__ */ v(zr, { ...i, children: /* @__PURE__ */ v(
|
|
1607
|
+
ua,
|
|
1608
|
+
{
|
|
1609
|
+
scope: t,
|
|
1610
|
+
open: n,
|
|
1611
|
+
onOpenChange: f,
|
|
1612
|
+
content: l,
|
|
1613
|
+
onContentChange: u,
|
|
1614
|
+
children: /* @__PURE__ */ v(
|
|
1615
|
+
la,
|
|
1616
|
+
{
|
|
1617
|
+
scope: t,
|
|
1618
|
+
onClose: a.useCallback(() => f(!1), [f]),
|
|
1619
|
+
isUsingKeyboardRef: p,
|
|
1620
|
+
dir: m,
|
|
1621
|
+
modal: s,
|
|
1622
|
+
children: r
|
|
1623
|
+
}
|
|
1624
|
+
)
|
|
1625
|
+
}
|
|
1626
|
+
) });
|
|
1627
|
+
};
|
|
1628
|
+
hn.displayName = pe;
|
|
1629
|
+
var da = "MenuAnchor", qe = a.forwardRef(
|
|
1630
|
+
(e, t) => {
|
|
1631
|
+
const { __scopeMenu: n, ...r } = e, o = Ne(n);
|
|
1632
|
+
return /* @__PURE__ */ v(Zr, { ...o, ...r, ref: t });
|
|
1633
|
+
}
|
|
1634
|
+
);
|
|
1635
|
+
qe.displayName = da;
|
|
1636
|
+
var fa = "MenuPortal", [kc, gn] = Z(fa, {
|
|
1637
|
+
forceMount: void 0
|
|
1638
|
+
}), k = "MenuContent", [pa, Je] = Z(k), wn = a.forwardRef(
|
|
1639
|
+
(e, t) => {
|
|
1640
|
+
const n = gn(k, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, c = oe(k, e.__scopeMenu), s = me(k, e.__scopeMenu);
|
|
1641
|
+
return /* @__PURE__ */ v(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(Pe, { present: r || c.open, children: /* @__PURE__ */ v(de.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ v(ma, { ...o, ref: t }) : /* @__PURE__ */ v(va, { ...o, ref: t }) }) }) });
|
|
1642
|
+
}
|
|
1643
|
+
), ma = a.forwardRef(
|
|
1644
|
+
(e, t) => {
|
|
1645
|
+
const n = oe(k, e.__scopeMenu), r = a.useRef(null), o = W(t, r);
|
|
1646
|
+
return a.useEffect(() => {
|
|
1647
|
+
const c = r.current;
|
|
1648
|
+
if (c) return ir(c);
|
|
1649
|
+
}, []), /* @__PURE__ */ v(
|
|
1650
|
+
et,
|
|
1651
|
+
{
|
|
1652
|
+
...e,
|
|
1653
|
+
ref: o,
|
|
1654
|
+
trapFocus: n.open,
|
|
1655
|
+
disableOutsidePointerEvents: n.open,
|
|
1656
|
+
disableOutsideScroll: !0,
|
|
1657
|
+
onFocusOutside: M(
|
|
1658
|
+
e.onFocusOutside,
|
|
1659
|
+
(c) => c.preventDefault(),
|
|
1660
|
+
{ checkForDefaultPrevented: !1 }
|
|
1661
|
+
),
|
|
1662
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
1663
|
+
}
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
), va = a.forwardRef((e, t) => {
|
|
1667
|
+
const n = oe(k, e.__scopeMenu);
|
|
1668
|
+
return /* @__PURE__ */ v(
|
|
1669
|
+
et,
|
|
1670
|
+
{
|
|
1671
|
+
...e,
|
|
1672
|
+
ref: t,
|
|
1673
|
+
trapFocus: !1,
|
|
1674
|
+
disableOutsidePointerEvents: !1,
|
|
1675
|
+
disableOutsideScroll: !1,
|
|
1676
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
1677
|
+
}
|
|
1678
|
+
);
|
|
1679
|
+
}), et = a.forwardRef(
|
|
1680
|
+
(e, t) => {
|
|
1681
|
+
const {
|
|
1682
|
+
__scopeMenu: n,
|
|
1683
|
+
loop: r = !1,
|
|
1684
|
+
trapFocus: o,
|
|
1685
|
+
onOpenAutoFocus: c,
|
|
1686
|
+
onCloseAutoFocus: s,
|
|
1687
|
+
disableOutsidePointerEvents: i,
|
|
1688
|
+
onEntryFocus: l,
|
|
1689
|
+
onEscapeKeyDown: u,
|
|
1690
|
+
onPointerDownOutside: p,
|
|
1691
|
+
onFocusOutside: f,
|
|
1692
|
+
onInteractOutside: m,
|
|
1693
|
+
onDismiss: g,
|
|
1694
|
+
disableOutsideScroll: h,
|
|
1695
|
+
...d
|
|
1696
|
+
} = e, y = oe(k, n), w = me(k, n), E = Ne(n), b = vn(n), _ = ia(n), [R, x] = a.useState(null), S = a.useRef(null), P = W(t, S, y.onContentChange), I = a.useRef(0), T = a.useRef(""), V = a.useRef(0), H = a.useRef(null), K = a.useRef("right"), Q = a.useRef(0), q = h ? fn : a.Fragment, $ = h ? { as: ze, allowPinchZoom: !0 } : void 0, J = (C) => {
|
|
1697
|
+
var G, ie;
|
|
1698
|
+
const A = T.current + C, N = _().filter((F) => !F.disabled), U = document.activeElement, ae = (G = N.find((F) => F.ref.current === U)) == null ? void 0 : G.textValue, ce = N.map((F) => F.textValue), ve = Ma(ce, A, ae), z = (ie = N.find((F) => F.textValue === ve)) == null ? void 0 : ie.ref.current;
|
|
1699
|
+
(function F(se) {
|
|
1700
|
+
T.current = se, window.clearTimeout(I.current), se !== "" && (I.current = window.setTimeout(() => F(""), 1e3));
|
|
1701
|
+
})(A), z && setTimeout(() => z.focus());
|
|
1702
|
+
};
|
|
1703
|
+
a.useEffect(() => () => window.clearTimeout(I.current), []), Tr();
|
|
1704
|
+
const O = a.useCallback((C) => {
|
|
1705
|
+
var N, U;
|
|
1706
|
+
return K.current === ((N = H.current) == null ? void 0 : N.side) && Na(C, (U = H.current) == null ? void 0 : U.area);
|
|
1707
|
+
}, []);
|
|
1708
|
+
return /* @__PURE__ */ v(
|
|
1709
|
+
pa,
|
|
1710
|
+
{
|
|
1711
|
+
scope: n,
|
|
1712
|
+
searchRef: T,
|
|
1713
|
+
onItemEnter: a.useCallback(
|
|
1714
|
+
(C) => {
|
|
1715
|
+
O(C) && C.preventDefault();
|
|
1716
|
+
},
|
|
1717
|
+
[O]
|
|
1718
|
+
),
|
|
1719
|
+
onItemLeave: a.useCallback(
|
|
1720
|
+
(C) => {
|
|
1721
|
+
var A;
|
|
1722
|
+
O(C) || ((A = S.current) == null || A.focus(), x(null));
|
|
1723
|
+
},
|
|
1724
|
+
[O]
|
|
1725
|
+
),
|
|
1726
|
+
onTriggerLeave: a.useCallback(
|
|
1727
|
+
(C) => {
|
|
1728
|
+
O(C) && C.preventDefault();
|
|
1729
|
+
},
|
|
1730
|
+
[O]
|
|
1731
|
+
),
|
|
1732
|
+
pointerGraceTimerRef: V,
|
|
1733
|
+
onPointerGraceIntentChange: a.useCallback((C) => {
|
|
1734
|
+
H.current = C;
|
|
1735
|
+
}, []),
|
|
1736
|
+
children: /* @__PURE__ */ v(q, { ...$, children: /* @__PURE__ */ v(
|
|
1737
|
+
kt,
|
|
1738
|
+
{
|
|
1739
|
+
asChild: !0,
|
|
1740
|
+
trapped: o,
|
|
1741
|
+
onMountAutoFocus: M(c, (C) => {
|
|
1742
|
+
var A;
|
|
1743
|
+
C.preventDefault(), (A = S.current) == null || A.focus({ preventScroll: !0 });
|
|
1744
|
+
}),
|
|
1745
|
+
onUnmountAutoFocus: s,
|
|
1746
|
+
children: /* @__PURE__ */ v(
|
|
1747
|
+
Ft,
|
|
1748
|
+
{
|
|
1749
|
+
asChild: !0,
|
|
1750
|
+
disableOutsidePointerEvents: i,
|
|
1751
|
+
onEscapeKeyDown: u,
|
|
1752
|
+
onPointerDownOutside: p,
|
|
1753
|
+
onFocusOutside: f,
|
|
1754
|
+
onInteractOutside: m,
|
|
1755
|
+
onDismiss: g,
|
|
1756
|
+
children: /* @__PURE__ */ v(
|
|
1757
|
+
Eo,
|
|
1758
|
+
{
|
|
1759
|
+
asChild: !0,
|
|
1760
|
+
...b,
|
|
1761
|
+
dir: w.dir,
|
|
1762
|
+
orientation: "vertical",
|
|
1763
|
+
loop: r,
|
|
1764
|
+
currentTabStopId: R,
|
|
1765
|
+
onCurrentTabStopIdChange: x,
|
|
1766
|
+
onEntryFocus: M(l, (C) => {
|
|
1767
|
+
w.isUsingKeyboardRef.current || C.preventDefault();
|
|
1768
|
+
}),
|
|
1769
|
+
preventScrollOnEntryFocus: !0,
|
|
1770
|
+
children: /* @__PURE__ */ v(
|
|
1771
|
+
Qr,
|
|
1772
|
+
{
|
|
1773
|
+
role: "menu",
|
|
1774
|
+
"aria-orientation": "vertical",
|
|
1775
|
+
"data-state": On(y.open),
|
|
1776
|
+
"data-radix-menu-content": "",
|
|
1777
|
+
dir: w.dir,
|
|
1778
|
+
...E,
|
|
1779
|
+
...d,
|
|
1780
|
+
ref: P,
|
|
1781
|
+
style: { outline: "none", ...d.style },
|
|
1782
|
+
onKeyDown: M(d.onKeyDown, (C) => {
|
|
1783
|
+
const N = C.target.closest("[data-radix-menu-content]") === C.currentTarget, U = C.ctrlKey || C.altKey || C.metaKey, ae = C.key.length === 1;
|
|
1784
|
+
N && (C.key === "Tab" && C.preventDefault(), !U && ae && J(C.key));
|
|
1785
|
+
const ce = S.current;
|
|
1786
|
+
if (C.target !== ce || !oa.includes(C.key)) return;
|
|
1787
|
+
C.preventDefault();
|
|
1788
|
+
const z = _().filter((G) => !G.disabled).map((G) => G.ref.current);
|
|
1789
|
+
pn.includes(C.key) && z.reverse(), Ra(z);
|
|
1790
|
+
}),
|
|
1791
|
+
onBlur: M(e.onBlur, (C) => {
|
|
1792
|
+
C.currentTarget.contains(C.target) || (window.clearTimeout(I.current), T.current = "");
|
|
1793
|
+
}),
|
|
1794
|
+
onPointerMove: M(
|
|
1795
|
+
e.onPointerMove,
|
|
1796
|
+
fe((C) => {
|
|
1797
|
+
const A = C.target, N = Q.current !== C.clientX;
|
|
1798
|
+
if (C.currentTarget.contains(A) && N) {
|
|
1799
|
+
const U = C.clientX > Q.current ? "right" : "left";
|
|
1800
|
+
K.current = U, Q.current = C.clientX;
|
|
1801
|
+
}
|
|
1802
|
+
})
|
|
1803
|
+
)
|
|
1804
|
+
}
|
|
1805
|
+
)
|
|
1806
|
+
}
|
|
1807
|
+
)
|
|
1808
|
+
}
|
|
1809
|
+
)
|
|
1810
|
+
}
|
|
1811
|
+
) })
|
|
1812
|
+
}
|
|
1813
|
+
);
|
|
1814
|
+
}
|
|
1815
|
+
);
|
|
1816
|
+
wn.displayName = k;
|
|
1817
|
+
var ha = "MenuGroup", tt = a.forwardRef(
|
|
1818
|
+
(e, t) => {
|
|
1819
|
+
const { __scopeMenu: n, ...r } = e;
|
|
1820
|
+
return /* @__PURE__ */ v(B.div, { role: "group", ...r, ref: t });
|
|
1821
|
+
}
|
|
1822
|
+
);
|
|
1823
|
+
tt.displayName = ha;
|
|
1824
|
+
var ga = "MenuLabel", yn = a.forwardRef(
|
|
1825
|
+
(e, t) => {
|
|
1826
|
+
const { __scopeMenu: n, ...r } = e;
|
|
1827
|
+
return /* @__PURE__ */ v(B.div, { ...r, ref: t });
|
|
1828
|
+
}
|
|
1829
|
+
);
|
|
1830
|
+
yn.displayName = ga;
|
|
1831
|
+
var _e = "MenuItem", _t = "menu.itemSelect", Ie = a.forwardRef(
|
|
1832
|
+
(e, t) => {
|
|
1833
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, c = a.useRef(null), s = me(_e, e.__scopeMenu), i = Je(_e, e.__scopeMenu), l = W(t, c), u = a.useRef(!1), p = () => {
|
|
1834
|
+
const f = c.current;
|
|
1835
|
+
if (!n && f) {
|
|
1836
|
+
const m = new CustomEvent(_t, { bubbles: !0, cancelable: !0 });
|
|
1837
|
+
f.addEventListener(_t, (g) => r == null ? void 0 : r(g), { once: !0 }), Tt(f, m), m.defaultPrevented ? u.current = !1 : s.onClose();
|
|
1838
|
+
}
|
|
1839
|
+
};
|
|
1840
|
+
return /* @__PURE__ */ v(
|
|
1841
|
+
Cn,
|
|
1842
|
+
{
|
|
1843
|
+
...o,
|
|
1844
|
+
ref: l,
|
|
1845
|
+
disabled: n,
|
|
1846
|
+
onClick: M(e.onClick, p),
|
|
1847
|
+
onPointerDown: (f) => {
|
|
1848
|
+
var m;
|
|
1849
|
+
(m = e.onPointerDown) == null || m.call(e, f), u.current = !0;
|
|
1850
|
+
},
|
|
1851
|
+
onPointerUp: M(e.onPointerUp, (f) => {
|
|
1852
|
+
var m;
|
|
1853
|
+
u.current || (m = f.currentTarget) == null || m.click();
|
|
1854
|
+
}),
|
|
1855
|
+
onKeyDown: M(e.onKeyDown, (f) => {
|
|
1856
|
+
const m = i.searchRef.current !== "";
|
|
1857
|
+
n || m && f.key === " " || je.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
|
|
1858
|
+
})
|
|
1859
|
+
}
|
|
1860
|
+
);
|
|
1861
|
+
}
|
|
1862
|
+
);
|
|
1863
|
+
Ie.displayName = _e;
|
|
1864
|
+
var Cn = a.forwardRef(
|
|
1865
|
+
(e, t) => {
|
|
1866
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...c } = e, s = Je(_e, n), i = vn(n), l = a.useRef(null), u = W(t, l), [p, f] = a.useState(!1), [m, g] = a.useState("");
|
|
1867
|
+
return a.useEffect(() => {
|
|
1868
|
+
const h = l.current;
|
|
1869
|
+
h && g((h.textContent ?? "").trim());
|
|
1870
|
+
}, [c.children]), /* @__PURE__ */ v(
|
|
1871
|
+
de.ItemSlot,
|
|
1872
|
+
{
|
|
1873
|
+
scope: n,
|
|
1874
|
+
disabled: r,
|
|
1875
|
+
textValue: o ?? m,
|
|
1876
|
+
children: /* @__PURE__ */ v(bo, { asChild: !0, ...i, focusable: !r, children: /* @__PURE__ */ v(
|
|
1877
|
+
B.div,
|
|
1878
|
+
{
|
|
1879
|
+
role: "menuitem",
|
|
1880
|
+
"data-highlighted": p ? "" : void 0,
|
|
1881
|
+
"aria-disabled": r || void 0,
|
|
1882
|
+
"data-disabled": r ? "" : void 0,
|
|
1883
|
+
...c,
|
|
1884
|
+
ref: u,
|
|
1885
|
+
onPointerMove: M(
|
|
1886
|
+
e.onPointerMove,
|
|
1887
|
+
fe((h) => {
|
|
1888
|
+
r ? s.onItemLeave(h) : (s.onItemEnter(h), h.defaultPrevented || h.currentTarget.focus({ preventScroll: !0 }));
|
|
1889
|
+
})
|
|
1890
|
+
),
|
|
1891
|
+
onPointerLeave: M(
|
|
1892
|
+
e.onPointerLeave,
|
|
1893
|
+
fe((h) => s.onItemLeave(h))
|
|
1894
|
+
),
|
|
1895
|
+
onFocus: M(e.onFocus, () => f(!0)),
|
|
1896
|
+
onBlur: M(e.onBlur, () => f(!1))
|
|
1897
|
+
}
|
|
1898
|
+
) })
|
|
1899
|
+
}
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
), wa = "MenuCheckboxItem", En = a.forwardRef(
|
|
1903
|
+
(e, t) => {
|
|
1904
|
+
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
1905
|
+
return /* @__PURE__ */ v(Pn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ v(
|
|
1906
|
+
Ie,
|
|
1907
|
+
{
|
|
1908
|
+
role: "menuitemcheckbox",
|
|
1909
|
+
"aria-checked": Re(n) ? "mixed" : n,
|
|
1910
|
+
...o,
|
|
1911
|
+
ref: t,
|
|
1912
|
+
"data-state": rt(n),
|
|
1913
|
+
onSelect: M(
|
|
1914
|
+
o.onSelect,
|
|
1915
|
+
() => r == null ? void 0 : r(Re(n) ? !0 : !n),
|
|
1916
|
+
{ checkForDefaultPrevented: !1 }
|
|
1917
|
+
)
|
|
1918
|
+
}
|
|
1919
|
+
) });
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1922
|
+
En.displayName = wa;
|
|
1923
|
+
var bn = "MenuRadioGroup", [ya, Ca] = Z(
|
|
1924
|
+
bn,
|
|
1925
|
+
{ value: void 0, onValueChange: () => {
|
|
1926
|
+
} }
|
|
1927
|
+
), Sn = a.forwardRef(
|
|
1928
|
+
(e, t) => {
|
|
1929
|
+
const { value: n, onValueChange: r, ...o } = e, c = X(r);
|
|
1930
|
+
return /* @__PURE__ */ v(ya, { scope: e.__scopeMenu, value: n, onValueChange: c, children: /* @__PURE__ */ v(tt, { ...o, ref: t }) });
|
|
1931
|
+
}
|
|
1932
|
+
);
|
|
1933
|
+
Sn.displayName = bn;
|
|
1934
|
+
var _n = "MenuRadioItem", Rn = a.forwardRef(
|
|
1935
|
+
(e, t) => {
|
|
1936
|
+
const { value: n, ...r } = e, o = Ca(_n, e.__scopeMenu), c = n === o.value;
|
|
1937
|
+
return /* @__PURE__ */ v(Pn, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ v(
|
|
1938
|
+
Ie,
|
|
1939
|
+
{
|
|
1940
|
+
role: "menuitemradio",
|
|
1941
|
+
"aria-checked": c,
|
|
1942
|
+
...r,
|
|
1943
|
+
ref: t,
|
|
1944
|
+
"data-state": rt(c),
|
|
1945
|
+
onSelect: M(
|
|
1946
|
+
r.onSelect,
|
|
1947
|
+
() => {
|
|
1948
|
+
var s;
|
|
1949
|
+
return (s = o.onValueChange) == null ? void 0 : s.call(o, n);
|
|
1950
|
+
},
|
|
1951
|
+
{ checkForDefaultPrevented: !1 }
|
|
1952
|
+
)
|
|
1953
|
+
}
|
|
1954
|
+
) });
|
|
1955
|
+
}
|
|
1956
|
+
);
|
|
1957
|
+
Rn.displayName = _n;
|
|
1958
|
+
var nt = "MenuItemIndicator", [Pn, Ea] = Z(
|
|
1959
|
+
nt,
|
|
1960
|
+
{ checked: !1 }
|
|
1961
|
+
), Mn = a.forwardRef(
|
|
1962
|
+
(e, t) => {
|
|
1963
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, c = Ea(nt, n);
|
|
1964
|
+
return /* @__PURE__ */ v(
|
|
1965
|
+
Pe,
|
|
1966
|
+
{
|
|
1967
|
+
present: r || Re(c.checked) || c.checked === !0,
|
|
1968
|
+
children: /* @__PURE__ */ v(
|
|
1969
|
+
B.span,
|
|
1970
|
+
{
|
|
1971
|
+
...o,
|
|
1972
|
+
ref: t,
|
|
1973
|
+
"data-state": rt(c.checked)
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
}
|
|
1977
|
+
);
|
|
1978
|
+
}
|
|
1979
|
+
);
|
|
1980
|
+
Mn.displayName = nt;
|
|
1981
|
+
var ba = "MenuSeparator", xn = a.forwardRef(
|
|
1982
|
+
(e, t) => {
|
|
1983
|
+
const { __scopeMenu: n, ...r } = e;
|
|
1984
|
+
return /* @__PURE__ */ v(
|
|
1985
|
+
B.div,
|
|
1986
|
+
{
|
|
1987
|
+
role: "separator",
|
|
1988
|
+
"aria-orientation": "horizontal",
|
|
1989
|
+
...r,
|
|
1990
|
+
ref: t
|
|
1991
|
+
}
|
|
1992
|
+
);
|
|
1993
|
+
}
|
|
1994
|
+
);
|
|
1995
|
+
xn.displayName = ba;
|
|
1996
|
+
var Sa = "MenuArrow", Nn = a.forwardRef(
|
|
1997
|
+
(e, t) => {
|
|
1998
|
+
const { __scopeMenu: n, ...r } = e, o = Ne(n);
|
|
1999
|
+
return /* @__PURE__ */ v(qr, { ...o, ...r, ref: t });
|
|
2000
|
+
}
|
|
2001
|
+
);
|
|
2002
|
+
Nn.displayName = Sa;
|
|
2003
|
+
var _a = "MenuSub", [$c, In] = Z(_a), le = "MenuSubTrigger", An = a.forwardRef(
|
|
2004
|
+
(e, t) => {
|
|
2005
|
+
const n = oe(le, e.__scopeMenu), r = me(le, e.__scopeMenu), o = In(le, e.__scopeMenu), c = Je(le, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange: l } = c, u = { __scopeMenu: e.__scopeMenu }, p = a.useCallback(() => {
|
|
2006
|
+
s.current && window.clearTimeout(s.current), s.current = null;
|
|
2007
|
+
}, []);
|
|
2008
|
+
return a.useEffect(() => p, [p]), a.useEffect(() => {
|
|
2009
|
+
const f = i.current;
|
|
2010
|
+
return () => {
|
|
2011
|
+
window.clearTimeout(f), l(null);
|
|
2012
|
+
};
|
|
2013
|
+
}, [i, l]), /* @__PURE__ */ v(qe, { asChild: !0, ...u, children: /* @__PURE__ */ v(
|
|
2014
|
+
Cn,
|
|
2015
|
+
{
|
|
2016
|
+
id: o.triggerId,
|
|
2017
|
+
"aria-haspopup": "menu",
|
|
2018
|
+
"aria-expanded": n.open,
|
|
2019
|
+
"aria-controls": o.contentId,
|
|
2020
|
+
"data-state": On(n.open),
|
|
2021
|
+
...e,
|
|
2022
|
+
ref: He(t, o.onTriggerChange),
|
|
2023
|
+
onClick: (f) => {
|
|
2024
|
+
var m;
|
|
2025
|
+
(m = e.onClick) == null || m.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
2026
|
+
},
|
|
2027
|
+
onPointerMove: M(
|
|
2028
|
+
e.onPointerMove,
|
|
2029
|
+
fe((f) => {
|
|
2030
|
+
c.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !s.current && (c.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
|
|
2031
|
+
n.onOpenChange(!0), p();
|
|
2032
|
+
}, 100));
|
|
2033
|
+
})
|
|
2034
|
+
),
|
|
2035
|
+
onPointerLeave: M(
|
|
2036
|
+
e.onPointerLeave,
|
|
2037
|
+
fe((f) => {
|
|
2038
|
+
var g, h;
|
|
2039
|
+
p();
|
|
2040
|
+
const m = (g = n.content) == null ? void 0 : g.getBoundingClientRect();
|
|
2041
|
+
if (m) {
|
|
2042
|
+
const d = (h = n.content) == null ? void 0 : h.dataset.side, y = d === "right", w = y ? -5 : 5, E = m[y ? "left" : "right"], b = m[y ? "right" : "left"];
|
|
2043
|
+
c.onPointerGraceIntentChange({
|
|
2044
|
+
area: [
|
|
2045
|
+
// Apply a bleed on clientX to ensure that our exit point is
|
|
2046
|
+
// consistently within polygon bounds
|
|
2047
|
+
{ x: f.clientX + w, y: f.clientY },
|
|
2048
|
+
{ x: E, y: m.top },
|
|
2049
|
+
{ x: b, y: m.top },
|
|
2050
|
+
{ x: b, y: m.bottom },
|
|
2051
|
+
{ x: E, y: m.bottom }
|
|
2052
|
+
],
|
|
2053
|
+
side: d
|
|
2054
|
+
}), window.clearTimeout(i.current), i.current = window.setTimeout(
|
|
2055
|
+
() => c.onPointerGraceIntentChange(null),
|
|
2056
|
+
300
|
|
2057
|
+
);
|
|
2058
|
+
} else {
|
|
2059
|
+
if (c.onTriggerLeave(f), f.defaultPrevented) return;
|
|
2060
|
+
c.onPointerGraceIntentChange(null);
|
|
2061
|
+
}
|
|
2062
|
+
})
|
|
2063
|
+
),
|
|
2064
|
+
onKeyDown: M(e.onKeyDown, (f) => {
|
|
2065
|
+
var g;
|
|
2066
|
+
const m = c.searchRef.current !== "";
|
|
2067
|
+
e.disabled || m && f.key === " " || aa[r.dir].includes(f.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), f.preventDefault());
|
|
2068
|
+
})
|
|
2069
|
+
}
|
|
2070
|
+
) });
|
|
2071
|
+
}
|
|
2072
|
+
);
|
|
2073
|
+
An.displayName = le;
|
|
2074
|
+
var Dn = "MenuSubContent", Tn = a.forwardRef(
|
|
2075
|
+
(e, t) => {
|
|
2076
|
+
const n = gn(k, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, c = oe(k, e.__scopeMenu), s = me(k, e.__scopeMenu), i = In(Dn, e.__scopeMenu), l = a.useRef(null), u = W(t, l);
|
|
2077
|
+
return /* @__PURE__ */ v(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(Pe, { present: r || c.open, children: /* @__PURE__ */ v(de.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(
|
|
2078
|
+
et,
|
|
2079
|
+
{
|
|
2080
|
+
id: i.contentId,
|
|
2081
|
+
"aria-labelledby": i.triggerId,
|
|
2082
|
+
...o,
|
|
2083
|
+
ref: u,
|
|
2084
|
+
align: "start",
|
|
2085
|
+
side: s.dir === "rtl" ? "left" : "right",
|
|
2086
|
+
disableOutsidePointerEvents: !1,
|
|
2087
|
+
disableOutsideScroll: !1,
|
|
2088
|
+
trapFocus: !1,
|
|
2089
|
+
onOpenAutoFocus: (p) => {
|
|
2090
|
+
var f;
|
|
2091
|
+
s.isUsingKeyboardRef.current && ((f = l.current) == null || f.focus()), p.preventDefault();
|
|
2092
|
+
},
|
|
2093
|
+
onCloseAutoFocus: (p) => p.preventDefault(),
|
|
2094
|
+
onFocusOutside: M(e.onFocusOutside, (p) => {
|
|
2095
|
+
p.target !== i.trigger && c.onOpenChange(!1);
|
|
2096
|
+
}),
|
|
2097
|
+
onEscapeKeyDown: M(e.onEscapeKeyDown, (p) => {
|
|
2098
|
+
s.onClose(), p.preventDefault();
|
|
2099
|
+
}),
|
|
2100
|
+
onKeyDown: M(e.onKeyDown, (p) => {
|
|
2101
|
+
var g;
|
|
2102
|
+
const f = p.currentTarget.contains(p.target), m = ca[s.dir].includes(p.key);
|
|
2103
|
+
f && m && (c.onOpenChange(!1), (g = i.trigger) == null || g.focus(), p.preventDefault());
|
|
2104
|
+
})
|
|
2105
|
+
}
|
|
2106
|
+
) }) }) });
|
|
2107
|
+
}
|
|
2108
|
+
);
|
|
2109
|
+
Tn.displayName = Dn;
|
|
2110
|
+
function On(e) {
|
|
2111
|
+
return e ? "open" : "closed";
|
|
2112
|
+
}
|
|
2113
|
+
function Re(e) {
|
|
2114
|
+
return e === "indeterminate";
|
|
2115
|
+
}
|
|
2116
|
+
function rt(e) {
|
|
2117
|
+
return Re(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
2118
|
+
}
|
|
2119
|
+
function Ra(e) {
|
|
2120
|
+
const t = document.activeElement;
|
|
2121
|
+
for (const n of e)
|
|
2122
|
+
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
2123
|
+
}
|
|
2124
|
+
function Pa(e, t) {
|
|
2125
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
2126
|
+
}
|
|
2127
|
+
function Ma(e, t, n) {
|
|
2128
|
+
const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
|
|
2129
|
+
let s = Pa(e, Math.max(c, 0));
|
|
2130
|
+
o.length === 1 && (s = s.filter((u) => u !== n));
|
|
2131
|
+
const l = s.find(
|
|
2132
|
+
(u) => u.toLowerCase().startsWith(o.toLowerCase())
|
|
2133
|
+
);
|
|
2134
|
+
return l !== n ? l : void 0;
|
|
2135
|
+
}
|
|
2136
|
+
function xa(e, t) {
|
|
2137
|
+
const { x: n, y: r } = e;
|
|
2138
|
+
let o = !1;
|
|
2139
|
+
for (let c = 0, s = t.length - 1; c < t.length; s = c++) {
|
|
2140
|
+
const i = t[c].x, l = t[c].y, u = t[s].x, p = t[s].y;
|
|
2141
|
+
l > r != p > r && n < (u - i) * (r - l) / (p - l) + i && (o = !o);
|
|
2142
|
+
}
|
|
2143
|
+
return o;
|
|
2144
|
+
}
|
|
2145
|
+
function Na(e, t) {
|
|
2146
|
+
if (!t) return !1;
|
|
2147
|
+
const n = { x: e.clientX, y: e.clientY };
|
|
2148
|
+
return xa(n, t);
|
|
2149
|
+
}
|
|
2150
|
+
function fe(e) {
|
|
2151
|
+
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
2152
|
+
}
|
|
2153
|
+
var Ia = hn, Aa = qe, Da = wn, Ta = tt, Oa = yn, Fa = Ie, La = En, ka = Sn, $a = Rn, Wa = Mn, Ba = xn, Ua = Nn, Ka = An, Ga = Tn, ot = "DropdownMenu", [Va, Wc] = fr(
|
|
2154
|
+
ot,
|
|
2155
|
+
[mn]
|
|
2156
|
+
), D = mn(), [Ya, Fn] = Va(ot), Ln = (e) => {
|
|
2157
|
+
const {
|
|
2158
|
+
__scopeDropdownMenu: t,
|
|
2159
|
+
children: n,
|
|
2160
|
+
dir: r,
|
|
2161
|
+
open: o,
|
|
2162
|
+
defaultOpen: c,
|
|
2163
|
+
onOpenChange: s,
|
|
2164
|
+
modal: i = !0
|
|
2165
|
+
} = e, l = D(t), u = a.useRef(null), [p = !1, f] = Pt({
|
|
2166
|
+
prop: o,
|
|
2167
|
+
defaultProp: c,
|
|
2168
|
+
onChange: s
|
|
2169
|
+
});
|
|
2170
|
+
return /* @__PURE__ */ v(
|
|
2171
|
+
Ya,
|
|
2172
|
+
{
|
|
2173
|
+
scope: t,
|
|
2174
|
+
triggerId: We(),
|
|
2175
|
+
triggerRef: u,
|
|
2176
|
+
contentId: We(),
|
|
2177
|
+
open: p,
|
|
2178
|
+
onOpenChange: f,
|
|
2179
|
+
onOpenToggle: a.useCallback(() => f((m) => !m), [f]),
|
|
2180
|
+
modal: i,
|
|
2181
|
+
children: /* @__PURE__ */ v(Ia, { ...l, open: p, onOpenChange: f, dir: r, modal: i, children: n })
|
|
2182
|
+
}
|
|
2183
|
+
);
|
|
2184
|
+
};
|
|
2185
|
+
Ln.displayName = ot;
|
|
2186
|
+
var kn = "DropdownMenuTrigger", $n = a.forwardRef(
|
|
2187
|
+
(e, t) => {
|
|
2188
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, c = Fn(kn, n), s = D(n);
|
|
2189
|
+
return /* @__PURE__ */ v(Aa, { asChild: !0, ...s, children: /* @__PURE__ */ v(
|
|
2190
|
+
yr.button,
|
|
2191
|
+
{
|
|
2192
|
+
type: "button",
|
|
2193
|
+
id: c.triggerId,
|
|
2194
|
+
"aria-haspopup": "menu",
|
|
2195
|
+
"aria-expanded": c.open,
|
|
2196
|
+
"aria-controls": c.open ? c.contentId : void 0,
|
|
2197
|
+
"data-state": c.open ? "open" : "closed",
|
|
2198
|
+
"data-disabled": r ? "" : void 0,
|
|
2199
|
+
disabled: r,
|
|
2200
|
+
...o,
|
|
2201
|
+
ref: It(t, c.triggerRef),
|
|
2202
|
+
onPointerDown: Se(e.onPointerDown, (i) => {
|
|
2203
|
+
!r && i.button === 0 && i.ctrlKey === !1 && (c.onOpenToggle(), c.open || i.preventDefault());
|
|
2204
|
+
}),
|
|
2205
|
+
onKeyDown: Se(e.onKeyDown, (i) => {
|
|
2206
|
+
r || (["Enter", " "].includes(i.key) && c.onOpenToggle(), i.key === "ArrowDown" && c.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(i.key) && i.preventDefault());
|
|
2207
|
+
})
|
|
2208
|
+
}
|
|
2209
|
+
) });
|
|
2210
|
+
}
|
|
2211
|
+
);
|
|
2212
|
+
$n.displayName = kn;
|
|
2213
|
+
var Wn = "DropdownMenuContent", Bn = a.forwardRef(
|
|
2214
|
+
(e, t) => {
|
|
2215
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Fn(Wn, n), c = D(n), s = a.useRef(!1);
|
|
2216
|
+
return /* @__PURE__ */ v(
|
|
2217
|
+
Da,
|
|
2218
|
+
{
|
|
2219
|
+
id: o.contentId,
|
|
2220
|
+
"aria-labelledby": o.triggerId,
|
|
2221
|
+
...c,
|
|
2222
|
+
...r,
|
|
2223
|
+
ref: t,
|
|
2224
|
+
onCloseAutoFocus: Se(e.onCloseAutoFocus, (i) => {
|
|
2225
|
+
var l;
|
|
2226
|
+
s.current || (l = o.triggerRef.current) == null || l.focus(), s.current = !1, i.preventDefault();
|
|
2227
|
+
}),
|
|
2228
|
+
onInteractOutside: Se(e.onInteractOutside, (i) => {
|
|
2229
|
+
const l = i.detail.originalEvent, u = l.button === 0 && l.ctrlKey === !0, p = l.button === 2 || u;
|
|
2230
|
+
(!o.modal || p) && (s.current = !0);
|
|
2231
|
+
}),
|
|
2232
|
+
style: {
|
|
2233
|
+
...e.style,
|
|
2234
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
2235
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
2236
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
2237
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2238
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
);
|
|
2242
|
+
}
|
|
2243
|
+
);
|
|
2244
|
+
Bn.displayName = Wn;
|
|
2245
|
+
var ja = "DropdownMenuGroup", Xa = a.forwardRef(
|
|
2246
|
+
(e, t) => {
|
|
2247
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2248
|
+
return /* @__PURE__ */ v(Ta, { ...o, ...r, ref: t });
|
|
2249
|
+
}
|
|
2250
|
+
);
|
|
2251
|
+
Xa.displayName = ja;
|
|
2252
|
+
var Ha = "DropdownMenuLabel", za = a.forwardRef(
|
|
2253
|
+
(e, t) => {
|
|
2254
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2255
|
+
return /* @__PURE__ */ v(Oa, { ...o, ...r, ref: t });
|
|
2256
|
+
}
|
|
2257
|
+
);
|
|
2258
|
+
za.displayName = Ha;
|
|
2259
|
+
var Za = "DropdownMenuItem", Un = a.forwardRef(
|
|
2260
|
+
(e, t) => {
|
|
2261
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2262
|
+
return /* @__PURE__ */ v(Fa, { ...o, ...r, ref: t });
|
|
2263
|
+
}
|
|
2264
|
+
);
|
|
2265
|
+
Un.displayName = Za;
|
|
2266
|
+
var Qa = "DropdownMenuCheckboxItem", qa = a.forwardRef((e, t) => {
|
|
2267
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2268
|
+
return /* @__PURE__ */ v(La, { ...o, ...r, ref: t });
|
|
2269
|
+
});
|
|
2270
|
+
qa.displayName = Qa;
|
|
2271
|
+
var Ja = "DropdownMenuRadioGroup", ec = a.forwardRef((e, t) => {
|
|
2272
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2273
|
+
return /* @__PURE__ */ v(ka, { ...o, ...r, ref: t });
|
|
2274
|
+
});
|
|
2275
|
+
ec.displayName = Ja;
|
|
2276
|
+
var tc = "DropdownMenuRadioItem", nc = a.forwardRef((e, t) => {
|
|
2277
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2278
|
+
return /* @__PURE__ */ v($a, { ...o, ...r, ref: t });
|
|
2279
|
+
});
|
|
2280
|
+
nc.displayName = tc;
|
|
2281
|
+
var rc = "DropdownMenuItemIndicator", oc = a.forwardRef((e, t) => {
|
|
2282
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2283
|
+
return /* @__PURE__ */ v(Wa, { ...o, ...r, ref: t });
|
|
2284
|
+
});
|
|
2285
|
+
oc.displayName = rc;
|
|
2286
|
+
var ac = "DropdownMenuSeparator", cc = a.forwardRef((e, t) => {
|
|
2287
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2288
|
+
return /* @__PURE__ */ v(Ba, { ...o, ...r, ref: t });
|
|
2289
|
+
});
|
|
2290
|
+
cc.displayName = ac;
|
|
2291
|
+
var ic = "DropdownMenuArrow", sc = a.forwardRef(
|
|
2292
|
+
(e, t) => {
|
|
2293
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2294
|
+
return /* @__PURE__ */ v(Ua, { ...o, ...r, ref: t });
|
|
2295
|
+
}
|
|
2296
|
+
);
|
|
2297
|
+
sc.displayName = ic;
|
|
2298
|
+
var uc = "DropdownMenuSubTrigger", lc = a.forwardRef((e, t) => {
|
|
2299
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2300
|
+
return /* @__PURE__ */ v(Ka, { ...o, ...r, ref: t });
|
|
2301
|
+
});
|
|
2302
|
+
lc.displayName = uc;
|
|
2303
|
+
var dc = "DropdownMenuSubContent", fc = a.forwardRef((e, t) => {
|
|
2304
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
|
|
2305
|
+
return /* @__PURE__ */ v(
|
|
2306
|
+
Ga,
|
|
2307
|
+
{
|
|
2308
|
+
...o,
|
|
2309
|
+
...r,
|
|
2310
|
+
ref: t,
|
|
2311
|
+
style: {
|
|
2312
|
+
...e.style,
|
|
2313
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
2314
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
2315
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
2316
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2317
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
);
|
|
2321
|
+
});
|
|
2322
|
+
fc.displayName = dc;
|
|
2323
|
+
var pc = Ln, mc = $n, vc = Bn, hc = Un;
|
|
2324
|
+
const gc = "cfxui__DropdownSelect__content__05ed8", wc = "cfxui__DropdownSelect__item__0e45f", yc = "cfxui__DropdownSelect__trigger__c03df", Cc = "cfxui__DropdownSelect__small__e614b", Ec = "cfxui__DropdownSelect__large__dd0b2", bc = "cfxui__DropdownSelect__onlight__f0191", Sc = "cfxui__DropdownSelect__icon__d05b8", _c = "cfxui__DropdownSelect__placeholder__e0d89", Rc = "cfxui__DropdownSelect__fullWidth__dce56", L = {
|
|
2325
|
+
content: gc,
|
|
2326
|
+
item: wc,
|
|
2327
|
+
trigger: yc,
|
|
2328
|
+
small: Cc,
|
|
2329
|
+
large: Ec,
|
|
2330
|
+
onlight: bc,
|
|
2331
|
+
icon: Sc,
|
|
2332
|
+
placeholder: _c,
|
|
2333
|
+
fullWidth: Rc
|
|
2334
|
+
}, Bc = function({
|
|
2335
|
+
options: t,
|
|
2336
|
+
value: n,
|
|
2337
|
+
onChange: r,
|
|
2338
|
+
size: o = "normal",
|
|
2339
|
+
fullWidth: c = !1,
|
|
2340
|
+
onlight: s = !1,
|
|
2341
|
+
disabled: i,
|
|
2342
|
+
placeholder: l = "Select..."
|
|
2343
|
+
}) {
|
|
2344
|
+
const u = jn(null), [p, f] = Rt(void 0);
|
|
2345
|
+
return Xn(() => {
|
|
2346
|
+
c && u.current && f(u.current.offsetWidth);
|
|
2347
|
+
}, [c]), /* @__PURE__ */ st(pc, { children: [
|
|
2348
|
+
/* @__PURE__ */ v(
|
|
2349
|
+
mc,
|
|
2350
|
+
{
|
|
2351
|
+
ref: u,
|
|
2352
|
+
className: Ae(L.trigger, L[o], {
|
|
2353
|
+
[L.placeholder]: !n,
|
|
2354
|
+
[L.fullWidth]: c,
|
|
2355
|
+
[L.onlight]: s
|
|
2356
|
+
}),
|
|
2357
|
+
disabled: i,
|
|
2358
|
+
children: /* @__PURE__ */ st(dr, { gap: "small", centered: !0, spaceBetween: !0, children: [
|
|
2359
|
+
n || l,
|
|
2360
|
+
/* @__PURE__ */ v(lr, { size: sr[o], className: L.icon, name: "DownChevron" })
|
|
2361
|
+
] })
|
|
2362
|
+
}
|
|
2363
|
+
),
|
|
2364
|
+
/* @__PURE__ */ v(
|
|
2365
|
+
vc,
|
|
2366
|
+
{
|
|
2367
|
+
align: "end",
|
|
2368
|
+
side: "bottom",
|
|
2369
|
+
className: Ae(L.content, {
|
|
2370
|
+
[L.fullWidth]: c,
|
|
2371
|
+
[L.onlight]: s
|
|
2372
|
+
}),
|
|
2373
|
+
style: { width: p },
|
|
2374
|
+
children: t.map((m) => /* @__PURE__ */ v(
|
|
2375
|
+
hc,
|
|
2376
|
+
{
|
|
2377
|
+
className: Ae(L.item, L[o], {
|
|
2378
|
+
[L.fullWidth]: c
|
|
2379
|
+
}),
|
|
2380
|
+
onSelect: () => r(m.value),
|
|
2381
|
+
style: { width: p },
|
|
2382
|
+
children: m.label
|
|
2383
|
+
},
|
|
2384
|
+
m.value
|
|
2385
|
+
))
|
|
2386
|
+
}
|
|
2387
|
+
)
|
|
2388
|
+
] });
|
|
2389
|
+
};
|
|
2390
|
+
export {
|
|
2391
|
+
Bc as DropdownSelect,
|
|
2392
|
+
Bc as default
|
|
2393
|
+
};
|