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