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