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