@cfx-dev/ui-components 5.0.13 → 5.0.15
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/{DropdownContent-BMfQCuaP.js → DropdownContent-BqQZ17mb.js} +158 -155
- package/dist/assets/css/DropdownContent.css +1 -1
- package/dist/components/DropdownContent/DropdownContent.d.ts +3 -1
- package/dist/components/DropdownContent/DropdownContent.js +1 -1
- package/dist/components/DropdownContent/index.d.ts +1 -1
- package/dist/components/DropdownContent/index.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/components/Logos/Logos.types.d.ts +2 -0
- package/dist/components/Logos/index.d.ts +2 -0
- package/dist/components/Logos/index.js +14 -12
- package/dist/components/Logos/portal/CompositeLogo.d.ts +5 -0
- package/dist/components/Logos/portal/CompositeLogo.js +15 -0
- package/dist/components/Logos/portal/index.d.ts +1 -0
- package/dist/components/Logos/portal/index.js +4 -0
- package/dist/index-D3KngHO9.js +8 -0
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
3
|
import gn from "react";
|
|
4
|
-
import { c as me, P as N, a as g, b as U, u as ye, g as wn, f as
|
|
4
|
+
import { c as me, P as N, a as g, b as U, u as ye, g as wn, f as _n, h as Pe } from "./index-CfQtbUfi.js";
|
|
5
5
|
import { c as xe, u as Te } from "./index-9LBuZ7x4.js";
|
|
6
|
-
import { u as le, a as ve, c as Ae, h as
|
|
6
|
+
import { u as le, a as ve, c as Ae, h as Mn, b as hn, R as Cn, F as Rn, D as In, C as bn, d as En, A as Sn, e as Dn } from "./Combination-CcTTSYNP.js";
|
|
7
7
|
import { P as ge } from "./index-3ctv5u9o.js";
|
|
8
8
|
import { clsx as Se } from "./utils/clsx.js";
|
|
9
9
|
import { ui as yn } from "./utils/ui/ui.js";
|
|
10
|
-
var de = "rovingFocusGroup.onEntryFocus", Pn = { bubbles: !1, cancelable: !0 },
|
|
11
|
-
|
|
10
|
+
var de = "rovingFocusGroup.onEntryFocus", Pn = { bubbles: !1, cancelable: !0 }, Z = "RovingFocusGroup", [fe, Ne, xn] = xe(Z), [Tn, Oe] = me(
|
|
11
|
+
Z,
|
|
12
12
|
[xn]
|
|
13
|
-
), [An, Nn] = Tn(
|
|
13
|
+
), [An, Nn] = Tn(Z), Fe = a.forwardRef(
|
|
14
14
|
(e, t) => /* @__PURE__ */ s(fe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(fe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(On, { ...e, ref: t }) }) })
|
|
15
15
|
);
|
|
16
|
-
Fe.displayName =
|
|
16
|
+
Fe.displayName = Z;
|
|
17
17
|
var On = a.forwardRef((e, t) => {
|
|
18
18
|
const {
|
|
19
19
|
__scopeRovingFocusGroup: n,
|
|
@@ -22,16 +22,16 @@ var On = a.forwardRef((e, t) => {
|
|
|
22
22
|
dir: c,
|
|
23
23
|
currentTabStopId: i,
|
|
24
24
|
defaultCurrentTabStopId: l,
|
|
25
|
-
onCurrentTabStopIdChange:
|
|
26
|
-
onEntryFocus:
|
|
25
|
+
onCurrentTabStopIdChange: v,
|
|
26
|
+
onEntryFocus: p,
|
|
27
27
|
preventScrollOnEntryFocus: d = !1,
|
|
28
28
|
...u
|
|
29
|
-
} = e, f = a.useRef(null),
|
|
29
|
+
} = e, f = a.useRef(null), _ = U(t, f), w = Te(c), [b, M] = ye({
|
|
30
30
|
prop: i,
|
|
31
31
|
defaultProp: l ?? null,
|
|
32
|
-
onChange:
|
|
33
|
-
caller:
|
|
34
|
-
}), [R, T] = a.useState(!1), h = ve(
|
|
32
|
+
onChange: v,
|
|
33
|
+
caller: Z
|
|
34
|
+
}), [R, T] = a.useState(!1), h = ve(p), D = Ne(n), B = a.useRef(!1), [Q, O] = a.useState(0);
|
|
35
35
|
return a.useEffect(() => {
|
|
36
36
|
const C = f.current;
|
|
37
37
|
if (C)
|
|
@@ -45,8 +45,8 @@ var On = a.forwardRef((e, t) => {
|
|
|
45
45
|
loop: r,
|
|
46
46
|
currentTabStopId: b,
|
|
47
47
|
onItemFocus: a.useCallback(
|
|
48
|
-
(C) =>
|
|
49
|
-
[
|
|
48
|
+
(C) => M(C),
|
|
49
|
+
[M]
|
|
50
50
|
),
|
|
51
51
|
onItemShiftTab: a.useCallback(() => T(!0), []),
|
|
52
52
|
onFocusableItemAdd: a.useCallback(
|
|
@@ -60,10 +60,10 @@ var On = a.forwardRef((e, t) => {
|
|
|
60
60
|
children: /* @__PURE__ */ s(
|
|
61
61
|
N.div,
|
|
62
62
|
{
|
|
63
|
-
tabIndex: R ||
|
|
63
|
+
tabIndex: R || Q === 0 ? -1 : 0,
|
|
64
64
|
"data-orientation": o,
|
|
65
65
|
...u,
|
|
66
|
-
ref:
|
|
66
|
+
ref: _,
|
|
67
67
|
style: { outline: "none", ...e.style },
|
|
68
68
|
onMouseDown: g(e.onMouseDown, () => {
|
|
69
69
|
B.current = !0;
|
|
@@ -73,7 +73,7 @@ var On = a.forwardRef((e, t) => {
|
|
|
73
73
|
if (C.target === C.currentTarget && G && !R) {
|
|
74
74
|
const F = new CustomEvent(de, Pn);
|
|
75
75
|
if (C.currentTarget.dispatchEvent(F), !F.defaultPrevented) {
|
|
76
|
-
const V = D().filter((P) => P.focusable), W = V.find((P) => P.active),
|
|
76
|
+
const V = D().filter((P) => P.focusable), W = V.find((P) => P.active), ee = V.find((P) => P.id === b), se = [W, ee, ...V].filter(
|
|
77
77
|
Boolean
|
|
78
78
|
).map((P) => P.ref.current);
|
|
79
79
|
Le(se, d);
|
|
@@ -95,15 +95,15 @@ var On = a.forwardRef((e, t) => {
|
|
|
95
95
|
tabStopId: c,
|
|
96
96
|
children: i,
|
|
97
97
|
...l
|
|
98
|
-
} = e,
|
|
98
|
+
} = e, v = le(), p = c || v, d = Nn(ke, n), u = d.currentTabStopId === p, f = Ne(n), { onFocusableItemAdd: _, onFocusableItemRemove: w, currentTabStopId: b } = d;
|
|
99
99
|
return a.useEffect(() => {
|
|
100
100
|
if (o)
|
|
101
|
-
return
|
|
102
|
-
}, [o,
|
|
101
|
+
return _(), () => w();
|
|
102
|
+
}, [o, _, w]), /* @__PURE__ */ s(
|
|
103
103
|
fe.ItemSlot,
|
|
104
104
|
{
|
|
105
105
|
scope: n,
|
|
106
|
-
id:
|
|
106
|
+
id: p,
|
|
107
107
|
focusable: o,
|
|
108
108
|
active: r,
|
|
109
109
|
children: /* @__PURE__ */ s(
|
|
@@ -113,25 +113,25 @@ var On = a.forwardRef((e, t) => {
|
|
|
113
113
|
"data-orientation": d.orientation,
|
|
114
114
|
...l,
|
|
115
115
|
ref: t,
|
|
116
|
-
onMouseDown: g(e.onMouseDown, (
|
|
117
|
-
o ? d.onItemFocus(
|
|
116
|
+
onMouseDown: g(e.onMouseDown, (M) => {
|
|
117
|
+
o ? d.onItemFocus(p) : M.preventDefault();
|
|
118
118
|
}),
|
|
119
|
-
onFocus: g(e.onFocus, () => d.onItemFocus(
|
|
120
|
-
onKeyDown: g(e.onKeyDown, (
|
|
121
|
-
if (
|
|
119
|
+
onFocus: g(e.onFocus, () => d.onItemFocus(p)),
|
|
120
|
+
onKeyDown: g(e.onKeyDown, (M) => {
|
|
121
|
+
if (M.key === "Tab" && M.shiftKey) {
|
|
122
122
|
d.onItemShiftTab();
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
if (
|
|
126
|
-
const R = Gn(
|
|
125
|
+
if (M.target !== M.currentTarget) return;
|
|
126
|
+
const R = Gn(M, d.orientation, d.dir);
|
|
127
127
|
if (R !== void 0) {
|
|
128
|
-
if (
|
|
129
|
-
|
|
128
|
+
if (M.metaKey || M.ctrlKey || M.altKey || M.shiftKey) return;
|
|
129
|
+
M.preventDefault();
|
|
130
130
|
let h = f().filter((D) => D.focusable).map((D) => D.ref.current);
|
|
131
131
|
if (R === "last") h.reverse();
|
|
132
132
|
else if (R === "prev" || R === "next") {
|
|
133
133
|
R === "prev" && h.reverse();
|
|
134
|
-
const D = h.indexOf(
|
|
134
|
+
const D = h.indexOf(M.currentTarget);
|
|
135
135
|
h = d.loop ? Ln(h, D + 1) : h.slice(D + 1);
|
|
136
136
|
}
|
|
137
137
|
setTimeout(() => Le(h));
|
|
@@ -177,18 +177,18 @@ var Kn = Fe, Un = Ge, pe = ["Enter", " "], $n = ["ArrowDown", "PageUp", "Home"],
|
|
|
177
177
|
}, Wn = {
|
|
178
178
|
ltr: ["ArrowLeft"],
|
|
179
179
|
rtl: ["ArrowRight"]
|
|
180
|
-
},
|
|
180
|
+
}, q = "Menu", [j, Yn, Xn] = xe(q), [k, Ue] = me(q, [
|
|
181
181
|
Xn,
|
|
182
182
|
Ae,
|
|
183
183
|
Oe
|
|
184
|
-
]), re = Ae(), $e = Oe(), [Hn, $] = k(
|
|
185
|
-
const { __scopeMenu: t, open: n = !1, children: o, dir: r, onOpenChange: c, modal: i = !0 } = e, l = re(t), [
|
|
184
|
+
]), re = Ae(), $e = Oe(), [Hn, $] = k(q), [jn, J] = k(q), Be = (e) => {
|
|
185
|
+
const { __scopeMenu: t, open: n = !1, children: o, dir: r, onOpenChange: c, modal: i = !0 } = e, l = re(t), [v, p] = a.useState(null), d = a.useRef(!1), u = ve(c), f = Te(r);
|
|
186
186
|
return a.useEffect(() => {
|
|
187
|
-
const
|
|
187
|
+
const _ = () => {
|
|
188
188
|
d.current = !0, document.addEventListener("pointerdown", w, { capture: !0, once: !0 }), document.addEventListener("pointermove", w, { capture: !0, once: !0 });
|
|
189
189
|
}, w = () => d.current = !1;
|
|
190
|
-
return document.addEventListener("keydown",
|
|
191
|
-
document.removeEventListener("keydown",
|
|
190
|
+
return document.addEventListener("keydown", _, { capture: !0 }), () => {
|
|
191
|
+
document.removeEventListener("keydown", _, { capture: !0 }), document.removeEventListener("pointerdown", w, { capture: !0 }), document.removeEventListener("pointermove", w, { capture: !0 });
|
|
192
192
|
};
|
|
193
193
|
}, []), /* @__PURE__ */ s(En, { ...l, children: /* @__PURE__ */ s(
|
|
194
194
|
Hn,
|
|
@@ -196,8 +196,8 @@ var Kn = Fe, Un = Ge, pe = ["Enter", " "], $n = ["ArrowDown", "PageUp", "Home"],
|
|
|
196
196
|
scope: t,
|
|
197
197
|
open: n,
|
|
198
198
|
onOpenChange: u,
|
|
199
|
-
content:
|
|
200
|
-
onContentChange:
|
|
199
|
+
content: v,
|
|
200
|
+
onContentChange: p,
|
|
201
201
|
children: /* @__PURE__ */ s(
|
|
202
202
|
jn,
|
|
203
203
|
{
|
|
@@ -212,7 +212,7 @@ var Kn = Fe, Un = Ge, pe = ["Enter", " "], $n = ["ArrowDown", "PageUp", "Home"],
|
|
|
212
212
|
}
|
|
213
213
|
) });
|
|
214
214
|
};
|
|
215
|
-
Be.displayName =
|
|
215
|
+
Be.displayName = q;
|
|
216
216
|
var zn = "MenuAnchor", we = a.forwardRef(
|
|
217
217
|
(e, t) => {
|
|
218
218
|
const { __scopeMenu: n, ...o } = e, r = re(n);
|
|
@@ -220,21 +220,21 @@ var zn = "MenuAnchor", we = a.forwardRef(
|
|
|
220
220
|
}
|
|
221
221
|
);
|
|
222
222
|
we.displayName = zn;
|
|
223
|
-
var Zn = "MenuPortal", [
|
|
223
|
+
var Zn = "MenuPortal", [vo, Ve] = k(Zn, {
|
|
224
224
|
forceMount: void 0
|
|
225
|
-
}), S = "MenuContent", [qn,
|
|
225
|
+
}), S = "MenuContent", [qn, _e] = k(S), We = a.forwardRef(
|
|
226
226
|
(e, t) => {
|
|
227
|
-
const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), i =
|
|
228
|
-
return /* @__PURE__ */ s(
|
|
227
|
+
const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), i = J(S, e.__scopeMenu);
|
|
228
|
+
return /* @__PURE__ */ s(j.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: o || c.open, children: /* @__PURE__ */ s(j.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ s(Jn, { ...r, ref: t }) : /* @__PURE__ */ s(Qn, { ...r, ref: t }) }) }) });
|
|
229
229
|
}
|
|
230
230
|
), Jn = a.forwardRef(
|
|
231
231
|
(e, t) => {
|
|
232
232
|
const n = $(S, e.__scopeMenu), o = a.useRef(null), r = U(t, o);
|
|
233
233
|
return a.useEffect(() => {
|
|
234
234
|
const c = o.current;
|
|
235
|
-
if (c) return
|
|
235
|
+
if (c) return Mn(c);
|
|
236
236
|
}, []), /* @__PURE__ */ s(
|
|
237
|
-
|
|
237
|
+
Me,
|
|
238
238
|
{
|
|
239
239
|
...e,
|
|
240
240
|
ref: r,
|
|
@@ -253,7 +253,7 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
|
|
|
253
253
|
), Qn = a.forwardRef((e, t) => {
|
|
254
254
|
const n = $(S, e.__scopeMenu);
|
|
255
255
|
return /* @__PURE__ */ s(
|
|
256
|
-
|
|
256
|
+
Me,
|
|
257
257
|
{
|
|
258
258
|
...e,
|
|
259
259
|
ref: t,
|
|
@@ -263,7 +263,7 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
|
|
|
263
263
|
onDismiss: () => n.onOpenChange(!1)
|
|
264
264
|
}
|
|
265
265
|
);
|
|
266
|
-
}), et =
|
|
266
|
+
}), et = _n("MenuContent.ScrollLock"), Me = a.forwardRef(
|
|
267
267
|
(e, t) => {
|
|
268
268
|
const {
|
|
269
269
|
__scopeMenu: n,
|
|
@@ -272,25 +272,25 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
|
|
|
272
272
|
onOpenAutoFocus: c,
|
|
273
273
|
onCloseAutoFocus: i,
|
|
274
274
|
disableOutsidePointerEvents: l,
|
|
275
|
-
onEntryFocus:
|
|
276
|
-
onEscapeKeyDown:
|
|
275
|
+
onEntryFocus: v,
|
|
276
|
+
onEscapeKeyDown: p,
|
|
277
277
|
onPointerDownOutside: d,
|
|
278
278
|
onFocusOutside: u,
|
|
279
279
|
onInteractOutside: f,
|
|
280
|
-
onDismiss:
|
|
280
|
+
onDismiss: _,
|
|
281
281
|
disableOutsideScroll: w,
|
|
282
282
|
...b
|
|
283
|
-
} = e,
|
|
283
|
+
} = e, M = $(S, n), R = J(S, n), T = re(n), h = $e(n), D = Yn(n), [B, Q] = a.useState(null), O = a.useRef(null), C = U(t, O, M.onContentChange), G = a.useRef(0), F = a.useRef(""), V = a.useRef(0), W = a.useRef(null), ee = a.useRef("right"), ne = a.useRef(0), se = w ? Cn : a.Fragment, P = w ? { as: et, allowPinchZoom: !0 } : void 0, vn = (m) => {
|
|
284
284
|
var K, be;
|
|
285
|
-
const E = F.current +
|
|
285
|
+
const E = F.current + m, y = D().filter((x) => !x.disabled), A = document.activeElement, ue = (K = y.find((x) => x.ref.current === A)) == null ? void 0 : K.textValue, ie = y.map((x) => x.textValue), Ie = ft(ie, E, ue), Y = (be = y.find((x) => x.textValue === Ie)) == null ? void 0 : be.ref.current;
|
|
286
286
|
(function x(Ee) {
|
|
287
287
|
F.current = Ee, window.clearTimeout(G.current), Ee !== "" && (G.current = window.setTimeout(() => x(""), 1e3));
|
|
288
288
|
})(E), Y && setTimeout(() => Y.focus());
|
|
289
289
|
};
|
|
290
290
|
a.useEffect(() => () => window.clearTimeout(G.current), []), hn();
|
|
291
|
-
const L = a.useCallback((
|
|
291
|
+
const L = a.useCallback((m) => {
|
|
292
292
|
var y, A;
|
|
293
|
-
return
|
|
293
|
+
return ee.current === ((y = W.current) == null ? void 0 : y.side) && mt(m, (A = W.current) == null ? void 0 : A.area);
|
|
294
294
|
}, []);
|
|
295
295
|
return /* @__PURE__ */ s(
|
|
296
296
|
qn,
|
|
@@ -298,36 +298,36 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
|
|
|
298
298
|
scope: n,
|
|
299
299
|
searchRef: F,
|
|
300
300
|
onItemEnter: a.useCallback(
|
|
301
|
-
(
|
|
302
|
-
L(
|
|
301
|
+
(m) => {
|
|
302
|
+
L(m) && m.preventDefault();
|
|
303
303
|
},
|
|
304
304
|
[L]
|
|
305
305
|
),
|
|
306
306
|
onItemLeave: a.useCallback(
|
|
307
|
-
(
|
|
307
|
+
(m) => {
|
|
308
308
|
var E;
|
|
309
|
-
L(
|
|
309
|
+
L(m) || ((E = O.current) == null || E.focus(), Q(null));
|
|
310
310
|
},
|
|
311
311
|
[L]
|
|
312
312
|
),
|
|
313
313
|
onTriggerLeave: a.useCallback(
|
|
314
|
-
(
|
|
315
|
-
L(
|
|
314
|
+
(m) => {
|
|
315
|
+
L(m) && m.preventDefault();
|
|
316
316
|
},
|
|
317
317
|
[L]
|
|
318
318
|
),
|
|
319
319
|
pointerGraceTimerRef: V,
|
|
320
|
-
onPointerGraceIntentChange: a.useCallback((
|
|
321
|
-
W.current =
|
|
320
|
+
onPointerGraceIntentChange: a.useCallback((m) => {
|
|
321
|
+
W.current = m;
|
|
322
322
|
}, []),
|
|
323
323
|
children: /* @__PURE__ */ s(se, { ...P, children: /* @__PURE__ */ s(
|
|
324
324
|
Rn,
|
|
325
325
|
{
|
|
326
326
|
asChild: !0,
|
|
327
327
|
trapped: r,
|
|
328
|
-
onMountAutoFocus: g(c, (
|
|
328
|
+
onMountAutoFocus: g(c, (m) => {
|
|
329
329
|
var E;
|
|
330
|
-
|
|
330
|
+
m.preventDefault(), (E = O.current) == null || E.focus({ preventScroll: !0 });
|
|
331
331
|
}),
|
|
332
332
|
onUnmountAutoFocus: i,
|
|
333
333
|
children: /* @__PURE__ */ s(
|
|
@@ -335,11 +335,11 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
|
|
|
335
335
|
{
|
|
336
336
|
asChild: !0,
|
|
337
337
|
disableOutsidePointerEvents: l,
|
|
338
|
-
onEscapeKeyDown:
|
|
338
|
+
onEscapeKeyDown: p,
|
|
339
339
|
onPointerDownOutside: d,
|
|
340
340
|
onFocusOutside: u,
|
|
341
341
|
onInteractOutside: f,
|
|
342
|
-
onDismiss:
|
|
342
|
+
onDismiss: _,
|
|
343
343
|
children: /* @__PURE__ */ s(
|
|
344
344
|
Kn,
|
|
345
345
|
{
|
|
@@ -349,9 +349,9 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
|
|
|
349
349
|
orientation: "vertical",
|
|
350
350
|
loop: o,
|
|
351
351
|
currentTabStopId: B,
|
|
352
|
-
onCurrentTabStopIdChange:
|
|
353
|
-
onEntryFocus: g(
|
|
354
|
-
R.isUsingKeyboardRef.current ||
|
|
352
|
+
onCurrentTabStopIdChange: Q,
|
|
353
|
+
onEntryFocus: g(v, (m) => {
|
|
354
|
+
R.isUsingKeyboardRef.current || m.preventDefault();
|
|
355
355
|
}),
|
|
356
356
|
preventScrollOnEntryFocus: !0,
|
|
357
357
|
children: /* @__PURE__ */ s(
|
|
@@ -359,32 +359,32 @@ var Zn = "MenuPortal", [mo, Ve] = k(Zn, {
|
|
|
359
359
|
{
|
|
360
360
|
role: "menu",
|
|
361
361
|
"aria-orientation": "vertical",
|
|
362
|
-
"data-state": cn(
|
|
362
|
+
"data-state": cn(M.open),
|
|
363
363
|
"data-radix-menu-content": "",
|
|
364
364
|
dir: R.dir,
|
|
365
365
|
...T,
|
|
366
366
|
...b,
|
|
367
367
|
ref: C,
|
|
368
368
|
style: { outline: "none", ...b.style },
|
|
369
|
-
onKeyDown: g(b.onKeyDown, (
|
|
370
|
-
const y =
|
|
371
|
-
y && (
|
|
369
|
+
onKeyDown: g(b.onKeyDown, (m) => {
|
|
370
|
+
const y = m.target.closest("[data-radix-menu-content]") === m.currentTarget, A = m.ctrlKey || m.altKey || m.metaKey, ue = m.key.length === 1;
|
|
371
|
+
y && (m.key === "Tab" && m.preventDefault(), !A && ue && vn(m.key));
|
|
372
372
|
const ie = O.current;
|
|
373
|
-
if (
|
|
374
|
-
|
|
373
|
+
if (m.target !== ie || !Bn.includes(m.key)) return;
|
|
374
|
+
m.preventDefault();
|
|
375
375
|
const Y = D().filter((K) => !K.disabled).map((K) => K.ref.current);
|
|
376
|
-
Ke.includes(
|
|
376
|
+
Ke.includes(m.key) && Y.reverse(), dt(Y);
|
|
377
377
|
}),
|
|
378
|
-
onBlur: g(e.onBlur, (
|
|
379
|
-
|
|
378
|
+
onBlur: g(e.onBlur, (m) => {
|
|
379
|
+
m.currentTarget.contains(m.target) || (window.clearTimeout(G.current), F.current = "");
|
|
380
380
|
}),
|
|
381
381
|
onPointerMove: g(
|
|
382
382
|
e.onPointerMove,
|
|
383
|
-
|
|
384
|
-
const E =
|
|
385
|
-
if (
|
|
386
|
-
const A =
|
|
387
|
-
|
|
383
|
+
z((m) => {
|
|
384
|
+
const E = m.target, y = ne.current !== m.clientX;
|
|
385
|
+
if (m.currentTarget.contains(E) && y) {
|
|
386
|
+
const A = m.clientX > ne.current ? "right" : "left";
|
|
387
|
+
ee.current = A, ne.current = m.clientX;
|
|
388
388
|
}
|
|
389
389
|
})
|
|
390
390
|
)
|
|
@@ -417,27 +417,27 @@ var tt = "MenuLabel", Ye = a.forwardRef(
|
|
|
417
417
|
Ye.displayName = tt;
|
|
418
418
|
var te = "MenuItem", De = "menu.itemSelect", ae = a.forwardRef(
|
|
419
419
|
(e, t) => {
|
|
420
|
-
const { disabled: n = !1, onSelect: o, ...r } = e, c = a.useRef(null), i =
|
|
420
|
+
const { disabled: n = !1, onSelect: o, ...r } = e, c = a.useRef(null), i = J(te, e.__scopeMenu), l = _e(te, e.__scopeMenu), v = U(t, c), p = a.useRef(!1), d = () => {
|
|
421
421
|
const u = c.current;
|
|
422
422
|
if (!n && u) {
|
|
423
423
|
const f = new CustomEvent(De, { bubbles: !0, cancelable: !0 });
|
|
424
|
-
u.addEventListener(De, (
|
|
424
|
+
u.addEventListener(De, (_) => o == null ? void 0 : o(_), { once: !0 }), wn(u, f), f.defaultPrevented ? p.current = !1 : i.onClose();
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
return /* @__PURE__ */ s(
|
|
428
428
|
Xe,
|
|
429
429
|
{
|
|
430
430
|
...r,
|
|
431
|
-
ref:
|
|
431
|
+
ref: v,
|
|
432
432
|
disabled: n,
|
|
433
433
|
onClick: g(e.onClick, d),
|
|
434
434
|
onPointerDown: (u) => {
|
|
435
435
|
var f;
|
|
436
|
-
(f = e.onPointerDown) == null || f.call(e, u),
|
|
436
|
+
(f = e.onPointerDown) == null || f.call(e, u), p.current = !0;
|
|
437
437
|
},
|
|
438
438
|
onPointerUp: g(e.onPointerUp, (u) => {
|
|
439
439
|
var f;
|
|
440
|
-
|
|
440
|
+
p.current || (f = u.currentTarget) == null || f.click();
|
|
441
441
|
}),
|
|
442
442
|
onKeyDown: g(e.onKeyDown, (u) => {
|
|
443
443
|
const f = l.searchRef.current !== "";
|
|
@@ -450,12 +450,12 @@ var te = "MenuItem", De = "menu.itemSelect", ae = a.forwardRef(
|
|
|
450
450
|
ae.displayName = te;
|
|
451
451
|
var Xe = a.forwardRef(
|
|
452
452
|
(e, t) => {
|
|
453
|
-
const { __scopeMenu: n, disabled: o = !1, textValue: r, ...c } = e, i =
|
|
453
|
+
const { __scopeMenu: n, disabled: o = !1, textValue: r, ...c } = e, i = _e(te, n), l = $e(n), v = a.useRef(null), p = U(t, v), [d, u] = a.useState(!1), [f, _] = a.useState("");
|
|
454
454
|
return a.useEffect(() => {
|
|
455
|
-
const w =
|
|
456
|
-
w &&
|
|
455
|
+
const w = v.current;
|
|
456
|
+
w && _((w.textContent ?? "").trim());
|
|
457
457
|
}, [c.children]), /* @__PURE__ */ s(
|
|
458
|
-
|
|
458
|
+
j.ItemSlot,
|
|
459
459
|
{
|
|
460
460
|
scope: n,
|
|
461
461
|
disabled: o,
|
|
@@ -468,16 +468,16 @@ var Xe = a.forwardRef(
|
|
|
468
468
|
"aria-disabled": o || void 0,
|
|
469
469
|
"data-disabled": o ? "" : void 0,
|
|
470
470
|
...c,
|
|
471
|
-
ref:
|
|
471
|
+
ref: p,
|
|
472
472
|
onPointerMove: g(
|
|
473
473
|
e.onPointerMove,
|
|
474
|
-
|
|
474
|
+
z((w) => {
|
|
475
475
|
o ? i.onItemLeave(w) : (i.onItemEnter(w), w.defaultPrevented || w.currentTarget.focus({ preventScroll: !0 }));
|
|
476
476
|
})
|
|
477
477
|
),
|
|
478
478
|
onPointerLeave: g(
|
|
479
479
|
e.onPointerLeave,
|
|
480
|
-
|
|
480
|
+
z((w) => i.onItemLeave(w))
|
|
481
481
|
),
|
|
482
482
|
onFocus: g(e.onFocus, () => u(!0)),
|
|
483
483
|
onBlur: g(e.onBlur, () => u(!1))
|
|
@@ -587,17 +587,17 @@ var ut = "MenuArrow", nn = a.forwardRef(
|
|
|
587
587
|
}
|
|
588
588
|
);
|
|
589
589
|
nn.displayName = ut;
|
|
590
|
-
var it = "MenuSub", [
|
|
590
|
+
var it = "MenuSub", [go, tn] = k(it), H = "MenuSubTrigger", on = a.forwardRef(
|
|
591
591
|
(e, t) => {
|
|
592
|
-
const n = $(
|
|
592
|
+
const n = $(H, e.__scopeMenu), o = J(H, e.__scopeMenu), r = tn(H, e.__scopeMenu), c = _e(H, e.__scopeMenu), i = a.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: v } = c, p = { __scopeMenu: e.__scopeMenu }, d = a.useCallback(() => {
|
|
593
593
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
594
594
|
}, []);
|
|
595
595
|
return a.useEffect(() => d, [d]), a.useEffect(() => {
|
|
596
596
|
const u = l.current;
|
|
597
597
|
return () => {
|
|
598
|
-
window.clearTimeout(u),
|
|
598
|
+
window.clearTimeout(u), v(null);
|
|
599
599
|
};
|
|
600
|
-
}, [l,
|
|
600
|
+
}, [l, v]), /* @__PURE__ */ s(we, { asChild: !0, ...p, children: /* @__PURE__ */ s(
|
|
601
601
|
Xe,
|
|
602
602
|
{
|
|
603
603
|
id: r.triggerId,
|
|
@@ -613,7 +613,7 @@ var it = "MenuSub", [vo, tn] = k(it), X = "MenuSubTrigger", on = a.forwardRef(
|
|
|
613
613
|
},
|
|
614
614
|
onPointerMove: g(
|
|
615
615
|
e.onPointerMove,
|
|
616
|
-
|
|
616
|
+
z((u) => {
|
|
617
617
|
c.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !i.current && (c.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
618
618
|
n.onOpenChange(!0), d();
|
|
619
619
|
}, 100));
|
|
@@ -621,12 +621,12 @@ var it = "MenuSub", [vo, tn] = k(it), X = "MenuSubTrigger", on = a.forwardRef(
|
|
|
621
621
|
),
|
|
622
622
|
onPointerLeave: g(
|
|
623
623
|
e.onPointerLeave,
|
|
624
|
-
|
|
625
|
-
var
|
|
624
|
+
z((u) => {
|
|
625
|
+
var _, w;
|
|
626
626
|
d();
|
|
627
|
-
const f = (
|
|
627
|
+
const f = (_ = n.content) == null ? void 0 : _.getBoundingClientRect();
|
|
628
628
|
if (f) {
|
|
629
|
-
const b = (w = n.content) == null ? void 0 : w.dataset.side,
|
|
629
|
+
const b = (w = n.content) == null ? void 0 : w.dataset.side, M = b === "right", R = M ? -5 : 5, T = f[M ? "left" : "right"], h = f[M ? "right" : "left"];
|
|
630
630
|
c.onPointerGraceIntentChange({
|
|
631
631
|
area: [
|
|
632
632
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
@@ -649,25 +649,25 @@ var it = "MenuSub", [vo, tn] = k(it), X = "MenuSubTrigger", on = a.forwardRef(
|
|
|
649
649
|
})
|
|
650
650
|
),
|
|
651
651
|
onKeyDown: g(e.onKeyDown, (u) => {
|
|
652
|
-
var
|
|
652
|
+
var _;
|
|
653
653
|
const f = c.searchRef.current !== "";
|
|
654
|
-
e.disabled || f && u.key === " " || Vn[o.dir].includes(u.key) && (n.onOpenChange(!0), (
|
|
654
|
+
e.disabled || f && u.key === " " || Vn[o.dir].includes(u.key) && (n.onOpenChange(!0), (_ = n.content) == null || _.focus(), u.preventDefault());
|
|
655
655
|
})
|
|
656
656
|
}
|
|
657
657
|
) });
|
|
658
658
|
}
|
|
659
659
|
);
|
|
660
|
-
on.displayName =
|
|
660
|
+
on.displayName = H;
|
|
661
661
|
var rn = "MenuSubContent", an = a.forwardRef(
|
|
662
662
|
(e, t) => {
|
|
663
|
-
const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), i =
|
|
664
|
-
return /* @__PURE__ */ s(
|
|
665
|
-
|
|
663
|
+
const n = Ve(S, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, c = $(S, e.__scopeMenu), i = J(S, e.__scopeMenu), l = tn(rn, e.__scopeMenu), v = a.useRef(null), p = U(t, v);
|
|
664
|
+
return /* @__PURE__ */ s(j.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(ge, { present: o || c.open, children: /* @__PURE__ */ s(j.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(
|
|
665
|
+
Me,
|
|
666
666
|
{
|
|
667
667
|
id: l.contentId,
|
|
668
668
|
"aria-labelledby": l.triggerId,
|
|
669
669
|
...r,
|
|
670
|
-
ref:
|
|
670
|
+
ref: p,
|
|
671
671
|
align: "start",
|
|
672
672
|
side: i.dir === "rtl" ? "left" : "right",
|
|
673
673
|
disableOutsidePointerEvents: !1,
|
|
@@ -675,7 +675,7 @@ var rn = "MenuSubContent", an = a.forwardRef(
|
|
|
675
675
|
trapFocus: !1,
|
|
676
676
|
onOpenAutoFocus: (d) => {
|
|
677
677
|
var u;
|
|
678
|
-
i.isUsingKeyboardRef.current && ((u =
|
|
678
|
+
i.isUsingKeyboardRef.current && ((u = v.current) == null || u.focus()), d.preventDefault();
|
|
679
679
|
},
|
|
680
680
|
onCloseAutoFocus: (d) => d.preventDefault(),
|
|
681
681
|
onFocusOutside: g(e.onFocusOutside, (d) => {
|
|
@@ -685,9 +685,9 @@ var rn = "MenuSubContent", an = a.forwardRef(
|
|
|
685
685
|
i.onClose(), d.preventDefault();
|
|
686
686
|
}),
|
|
687
687
|
onKeyDown: g(e.onKeyDown, (d) => {
|
|
688
|
-
var
|
|
688
|
+
var _;
|
|
689
689
|
const u = d.currentTarget.contains(d.target), f = Wn[i.dir].includes(d.key);
|
|
690
|
-
u && f && (c.onOpenChange(!1), (
|
|
690
|
+
u && f && (c.onOpenChange(!1), (_ = l.trigger) == null || _.focus(), d.preventDefault());
|
|
691
691
|
})
|
|
692
692
|
}
|
|
693
693
|
) }) }) });
|
|
@@ -712,20 +712,20 @@ function lt(e, t) {
|
|
|
712
712
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
713
713
|
}
|
|
714
714
|
function ft(e, t, n) {
|
|
715
|
-
const r = t.length > 1 && Array.from(t).every((
|
|
715
|
+
const r = t.length > 1 && Array.from(t).every((p) => p === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
|
|
716
716
|
let i = lt(e, Math.max(c, 0));
|
|
717
|
-
r.length === 1 && (i = i.filter((
|
|
718
|
-
const
|
|
719
|
-
(
|
|
717
|
+
r.length === 1 && (i = i.filter((p) => p !== n));
|
|
718
|
+
const v = i.find(
|
|
719
|
+
(p) => p.toLowerCase().startsWith(r.toLowerCase())
|
|
720
720
|
);
|
|
721
|
-
return
|
|
721
|
+
return v !== n ? v : void 0;
|
|
722
722
|
}
|
|
723
723
|
function pt(e, t) {
|
|
724
724
|
const { x: n, y: o } = e;
|
|
725
725
|
let r = !1;
|
|
726
726
|
for (let c = 0, i = t.length - 1; c < t.length; i = c++) {
|
|
727
|
-
const l = t[c],
|
|
728
|
-
d > o != f > o && n < (u -
|
|
727
|
+
const l = t[c], v = t[i], p = l.x, d = l.y, u = v.x, f = v.y;
|
|
728
|
+
d > o != f > o && n < (u - p) * (o - d) / (f - d) + p && (r = !r);
|
|
729
729
|
}
|
|
730
730
|
return r;
|
|
731
731
|
}
|
|
@@ -734,10 +734,10 @@ function mt(e, t) {
|
|
|
734
734
|
const n = { x: e.clientX, y: e.clientY };
|
|
735
735
|
return pt(n, t);
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function z(e) {
|
|
738
738
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
739
739
|
}
|
|
740
|
-
var vt = Be, gt = we, wt = We,
|
|
740
|
+
var vt = Be, gt = we, wt = We, _t = he, Mt = Ye, ht = ae, Ct = He, Rt = ze, It = qe, bt = Qe, Et = en, St = nn, Dt = on, yt = an, ce = "DropdownMenu", [Pt, wo] = me(
|
|
741
741
|
ce,
|
|
742
742
|
[Ue]
|
|
743
743
|
), I = Ue(), [xt, sn] = Pt(ce), un = (e) => {
|
|
@@ -749,7 +749,7 @@ var vt = Be, gt = we, wt = We, Mt = he, _t = Ye, ht = ae, Ct = He, Rt = ze, It =
|
|
|
749
749
|
defaultOpen: c,
|
|
750
750
|
onOpenChange: i,
|
|
751
751
|
modal: l = !0
|
|
752
|
-
} = e,
|
|
752
|
+
} = e, v = I(t), p = a.useRef(null), [d, u] = ye({
|
|
753
753
|
prop: r,
|
|
754
754
|
defaultProp: c ?? !1,
|
|
755
755
|
onChange: i,
|
|
@@ -760,13 +760,13 @@ var vt = Be, gt = we, wt = We, Mt = he, _t = Ye, ht = ae, Ct = He, Rt = ze, It =
|
|
|
760
760
|
{
|
|
761
761
|
scope: t,
|
|
762
762
|
triggerId: le(),
|
|
763
|
-
triggerRef:
|
|
763
|
+
triggerRef: p,
|
|
764
764
|
contentId: le(),
|
|
765
765
|
open: d,
|
|
766
766
|
onOpenChange: u,
|
|
767
767
|
onOpenToggle: a.useCallback(() => u((f) => !f), [u]),
|
|
768
768
|
modal: l,
|
|
769
|
-
children: /* @__PURE__ */ s(vt, { ...
|
|
769
|
+
children: /* @__PURE__ */ s(vt, { ...v, open: d, onOpenChange: u, dir: o, modal: l, children: n })
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
772
|
};
|
|
@@ -810,11 +810,11 @@ var fn = "DropdownMenuContent", pn = a.forwardRef(
|
|
|
810
810
|
...o,
|
|
811
811
|
ref: t,
|
|
812
812
|
onCloseAutoFocus: g(e.onCloseAutoFocus, (l) => {
|
|
813
|
-
var
|
|
814
|
-
i.current || (
|
|
813
|
+
var v;
|
|
814
|
+
i.current || (v = r.triggerRef.current) == null || v.focus(), i.current = !1, l.preventDefault();
|
|
815
815
|
}),
|
|
816
816
|
onInteractOutside: g(e.onInteractOutside, (l) => {
|
|
817
|
-
const
|
|
817
|
+
const v = l.detail.originalEvent, p = v.button === 0 && v.ctrlKey === !0, d = v.button === 2 || p;
|
|
818
818
|
(!r.modal || d) && (i.current = !0);
|
|
819
819
|
}),
|
|
820
820
|
style: {
|
|
@@ -833,14 +833,14 @@ pn.displayName = fn;
|
|
|
833
833
|
var Tt = "DropdownMenuGroup", At = a.forwardRef(
|
|
834
834
|
(e, t) => {
|
|
835
835
|
const { __scopeDropdownMenu: n, ...o } = e, r = I(n);
|
|
836
|
-
return /* @__PURE__ */ s(
|
|
836
|
+
return /* @__PURE__ */ s(_t, { ...r, ...o, ref: t });
|
|
837
837
|
}
|
|
838
838
|
);
|
|
839
839
|
At.displayName = Tt;
|
|
840
840
|
var Nt = "DropdownMenuLabel", Ot = a.forwardRef(
|
|
841
841
|
(e, t) => {
|
|
842
842
|
const { __scopeDropdownMenu: n, ...o } = e, r = I(n);
|
|
843
|
-
return /* @__PURE__ */ s(
|
|
843
|
+
return /* @__PURE__ */ s(Mt, { ...r, ...o, ref: t });
|
|
844
844
|
}
|
|
845
845
|
);
|
|
846
846
|
Ot.displayName = Nt;
|
|
@@ -908,26 +908,28 @@ var Zt = "DropdownMenuSubContent", qt = a.forwardRef((e, t) => {
|
|
|
908
908
|
);
|
|
909
909
|
});
|
|
910
910
|
qt.displayName = Zt;
|
|
911
|
-
var
|
|
912
|
-
const eo = "cfxui__DropdownContent__fullWidth__c56c3", no = "cfxui__DropdownContent__item__8feac", to = "cfxui__DropdownContent__content__ea3aa", oo = "cfxui__DropdownContent__disabled__9002a",
|
|
911
|
+
var _o = un, Mo = ln, Jt = pn, Qt = mn;
|
|
912
|
+
const eo = "cfxui__DropdownContent__fullWidth__c56c3", no = "cfxui__DropdownContent__item__8feac", to = "cfxui__DropdownContent__content__ea3aa", oo = "cfxui__DropdownContent__disabled__9002a", ro = "cfxui__DropdownContent__selected__91015", X = {
|
|
913
913
|
fullWidth: eo,
|
|
914
914
|
item: no,
|
|
915
915
|
content: to,
|
|
916
|
-
disabled: oo
|
|
916
|
+
disabled: oo,
|
|
917
|
+
selected: ro
|
|
917
918
|
};
|
|
918
|
-
function
|
|
919
|
+
function ao(e) {
|
|
919
920
|
const {
|
|
920
921
|
triggerWidth: t,
|
|
921
922
|
options: n,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
923
|
+
selectedValue: o,
|
|
924
|
+
fullWidth: r = !1,
|
|
925
|
+
className: c,
|
|
926
|
+
itemClassName: i,
|
|
927
|
+
onSelect: l
|
|
928
|
+
} = e, v = Se(
|
|
929
|
+
c,
|
|
930
|
+
X.content,
|
|
929
931
|
{
|
|
930
|
-
[
|
|
932
|
+
[X.fullWidth]: r
|
|
931
933
|
}
|
|
932
934
|
);
|
|
933
935
|
return /* @__PURE__ */ s(
|
|
@@ -935,30 +937,31 @@ function ro(e) {
|
|
|
935
937
|
{
|
|
936
938
|
align: "end",
|
|
937
939
|
side: "bottom",
|
|
938
|
-
className:
|
|
940
|
+
className: v,
|
|
939
941
|
style: {
|
|
940
942
|
width: t,
|
|
941
943
|
zIndex: yn.zindex("max")
|
|
942
944
|
},
|
|
943
|
-
children: n.map((
|
|
945
|
+
children: n.map((p) => /* @__PURE__ */ s(
|
|
944
946
|
Qt,
|
|
945
947
|
{
|
|
946
|
-
disabled:
|
|
947
|
-
className: Se(
|
|
948
|
-
[
|
|
948
|
+
disabled: p.disabled,
|
|
949
|
+
className: Se(X.item, i, {
|
|
950
|
+
[X.disabled]: p.disabled,
|
|
951
|
+
[X.selected]: p.value === o
|
|
949
952
|
}),
|
|
950
|
-
onSelect: () =>
|
|
953
|
+
onSelect: () => l(p.value),
|
|
951
954
|
style: { width: t },
|
|
952
|
-
children:
|
|
955
|
+
children: p.label
|
|
953
956
|
},
|
|
954
|
-
|
|
957
|
+
p.value
|
|
955
958
|
))
|
|
956
959
|
}
|
|
957
960
|
);
|
|
958
961
|
}
|
|
959
|
-
const
|
|
962
|
+
const ho = gn.memo(ao);
|
|
960
963
|
export {
|
|
961
|
-
|
|
962
|
-
|
|
964
|
+
ho as D,
|
|
965
|
+
_o as R,
|
|
963
966
|
Mo as T
|
|
964
967
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.cfxui__DropdownContent__fullWidth__c56c3{width:100%}.cfxui__DropdownContent__fullWidth__c56c3 .cfxui__DropdownContent__item__8feac{width:100%;padding-left:calc(var(--quant) * 2.5);padding-right:calc(var(--quant) * 2.5)}.cfxui__DropdownContent__content__ea3aa{--border-color: var(--color-input-border);border-radius:var(--border-radius-medium);box-shadow:0 0 0 var(--input-border-size, initial) var(--border-color) inset;background-color:rgba(var(--color-bg),1);overflow:hidden}.cfxui__DropdownContent__content__ea3aa.cfxui__DropdownContent__onlight__352dc{--border-color: var(--color-input-onlight-border)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac{height:var(--button-height, initial);display:flex;align-items:center;padding:calc(var(--quant) * 2) var(--spacer-xsmall) calc(var(--quant) * 2) var(--spacer-xsmall);cursor:pointer}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:not(:last-child){box-shadow:0 calc(-1 * var(--input-border-size, initial)) 0 0 var(--border-color) inset}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:hover:not(.cfxui__DropdownContent__disabled__9002a){background-color:rgba(var(--color-bg-light),1)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac.cfxui__DropdownContent__disabled__9002a{cursor:not-allowed;color:rgba(var(--color-secondary),1);background-color:rgba(var(--color-bg-dark),.5)}
|
|
1
|
+
.cfxui__DropdownContent__fullWidth__c56c3{width:100%}.cfxui__DropdownContent__fullWidth__c56c3 .cfxui__DropdownContent__item__8feac{width:100%;padding-left:calc(var(--quant) * 2.5);padding-right:calc(var(--quant) * 2.5)}.cfxui__DropdownContent__content__ea3aa{--border-color: var(--color-input-border);border-radius:var(--border-radius-medium);box-shadow:0 0 0 var(--input-border-size, initial) var(--border-color) inset;background-color:rgba(var(--color-bg),1);overflow:hidden}.cfxui__DropdownContent__content__ea3aa.cfxui__DropdownContent__onlight__352dc{--border-color: var(--color-input-onlight-border)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac{height:var(--button-height, initial);display:flex;align-items:center;padding:calc(var(--quant) * 2) var(--spacer-xsmall) calc(var(--quant) * 2) var(--spacer-xsmall);cursor:pointer}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:not(:last-child){box-shadow:0 calc(-1 * var(--input-border-size, initial)) 0 0 var(--border-color) inset}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac:hover:not(.cfxui__DropdownContent__disabled__9002a,.cfxui__DropdownContent__selected__91015){background-color:rgba(var(--color-bg-light),1)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac.cfxui__DropdownContent__disabled__9002a{cursor:not-allowed;color:rgba(var(--color-secondary),1);background-color:rgba(var(--color-bg-dark),.5)}.cfxui__DropdownContent__content__ea3aa .cfxui__DropdownContent__item__8feac.cfxui__DropdownContent__selected__91015{background-color:rgba(var(--color-secondary),.5);font-weight:var(--font-weight-bold)}
|
|
@@ -6,9 +6,11 @@ export interface DropdownOption<T extends string> {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export type ExtraClassNameType = 'content' | 'trigger';
|
|
9
|
-
export type
|
|
9
|
+
export type DropdownOptionValueType = string;
|
|
10
|
+
export type DropdownContentOption = DropdownOption<DropdownOptionValueType>;
|
|
10
11
|
export interface DropdownContentProps {
|
|
11
12
|
options: DropdownContentOption[];
|
|
13
|
+
selectedValue?: DropdownOptionValueType;
|
|
12
14
|
className?: string;
|
|
13
15
|
itemClassName?: string;
|
|
14
16
|
triggerWidth?: React.CSSProperties['width'];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as DropdownContent } from './DropdownContent';
|
|
2
|
-
export type { DropdownContentProps, DropdownContentOption, } from './DropdownContent';
|
|
2
|
+
export type { DropdownContentProps, DropdownContentOption, DropdownOptionValueType, } from './DropdownContent';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { R as D, T as W, D as C } from "../../DropdownContent-
|
|
2
|
+
import { R as D, T as W, D as C } from "../../DropdownContent-BqQZ17mb.js";
|
|
3
3
|
import a, { useRef as R, useState as v, useEffect as b } from "react";
|
|
4
4
|
import N from "../Flex/Flex.js";
|
|
5
5
|
import { clsx as T } from "../../utils/clsx.js";
|
|
@@ -4,6 +4,7 @@ import * as ESX from './esx';
|
|
|
4
4
|
import * as FiveM from './fivem';
|
|
5
5
|
import * as Google from './google';
|
|
6
6
|
import * as Patreon from './patreon';
|
|
7
|
+
import * as Portal from './portal';
|
|
7
8
|
import * as QBcore from './qbcore';
|
|
8
9
|
import * as RedemRP from './redemrp';
|
|
9
10
|
import * as RedM from './redm';
|
|
@@ -11,6 +12,7 @@ import * as Rockstar from './rockstar';
|
|
|
11
12
|
import * as Tebex from './tebex';
|
|
12
13
|
import * as VorpCore from './vorpcore';
|
|
13
14
|
export type CfxLogoName = keyof typeof Cfx;
|
|
15
|
+
export type PortalLogoName = keyof typeof Portal;
|
|
14
16
|
export type FiveMLogoName = keyof typeof FiveM;
|
|
15
17
|
export type RedMLogoName = keyof typeof RedM;
|
|
16
18
|
export type RockstarLogoName = keyof typeof Rockstar;
|
|
@@ -5,6 +5,7 @@ import * as FiveM from './fivem';
|
|
|
5
5
|
import * as Github from './github';
|
|
6
6
|
import * as Google from './google';
|
|
7
7
|
import * as Patreon from './patreon';
|
|
8
|
+
import * as Portal from './portal';
|
|
8
9
|
import * as QBcore from './qbcore';
|
|
9
10
|
import * as RedemRP from './redemrp';
|
|
10
11
|
import * as RedM from './redm';
|
|
@@ -14,6 +15,7 @@ import * as VorpCore from './vorpcore';
|
|
|
14
15
|
import * as X from './x';
|
|
15
16
|
export declare const Logos: {
|
|
16
17
|
Cfx: typeof Cfx;
|
|
18
|
+
Portal: typeof Portal;
|
|
17
19
|
FiveM: typeof FiveM;
|
|
18
20
|
RedM: typeof RedM;
|
|
19
21
|
Rockstar: typeof Rockstar;
|
|
@@ -5,31 +5,33 @@ import { F as t } from "../../index-B_NGoq0d.js";
|
|
|
5
5
|
import { G as s } from "../../index-SuteELrX.js";
|
|
6
6
|
import { G as a } from "../../index-zDYfHjPd.js";
|
|
7
7
|
import { P as i } from "../../index-kbBuAY0m.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { R as e } from "../../index-
|
|
11
|
-
import { R } from "../../index-
|
|
8
|
+
import { P as p } from "../../index-D3KngHO9.js";
|
|
9
|
+
import { Q as f } from "../../index-Cy4ZbWBL.js";
|
|
10
|
+
import { R as e } from "../../index-BFDtbr-9.js";
|
|
11
|
+
import { R } from "../../index-Cn_D8a9-.js";
|
|
12
|
+
import { R as P } from "../../index-DmiGJpGO.js";
|
|
12
13
|
import { T as c } from "../../index-Bj7QGXdt.js";
|
|
13
14
|
import { V as x } from "../../index-DXAZagKA.js";
|
|
14
15
|
import { X as G } from "../../index-Bc4HE9pX.js";
|
|
15
|
-
import { L as
|
|
16
|
-
const
|
|
16
|
+
import { L as v } from "../../Logos.types-Bdec3F0Q.js";
|
|
17
|
+
const h = {
|
|
17
18
|
Cfx: o,
|
|
19
|
+
Portal: p,
|
|
18
20
|
FiveM: t,
|
|
19
|
-
RedM:
|
|
20
|
-
Rockstar:
|
|
21
|
+
RedM: R,
|
|
22
|
+
Rockstar: P,
|
|
21
23
|
Google: a,
|
|
22
24
|
Patreon: i,
|
|
23
25
|
Tebex: c,
|
|
24
|
-
QBcore:
|
|
26
|
+
QBcore: f,
|
|
25
27
|
ESX: m,
|
|
26
28
|
VorpCore: x,
|
|
27
|
-
RedemRP:
|
|
29
|
+
RedemRP: e,
|
|
28
30
|
Discord: r,
|
|
29
31
|
Github: s,
|
|
30
32
|
X: G
|
|
31
33
|
};
|
|
32
34
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
v as LogoNames,
|
|
36
|
+
h as Logos
|
|
35
37
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import L from "react";
|
|
3
|
+
function V(H) {
|
|
4
|
+
return /* @__PURE__ */ C("svg", { viewBox: "0 0 368 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...H, children: /* @__PURE__ */ C(
|
|
5
|
+
"path",
|
|
6
|
+
{
|
|
7
|
+
fill: "#F1F1E4",
|
|
8
|
+
d: "M82.6829 0H85.6098V59.2683H82.6829V0ZM0 41.1732H8.50244L10.9683 29.4H16.6171C19.4415 29.4 20.8537 30.8561 20.8537 33.7683C20.8537 35.2098 20.7732 37.0537 20.6049 39.3073C20.6049 40.6537 20.8098 41.5463 21.2195 41.9854H29.9561C29.2537 40.7854 28.9024 39.3732 28.9024 37.7341C29.0195 35.2902 29.0781 33.2854 29.0781 31.7195C29.0561 28.661 27.9439 26.8683 25.7488 26.3268V26.2537C30.7244 25.5439 33.2122 22.5366 33.2122 17.2317C33.2122 14.0049 32.2098 11.7366 30.2049 10.4122C28.5659 9.33659 26.078 8.80976 22.7415 8.83171L6.80488 8.79512L0 41.1732ZM20.2756 15.5341C23.3415 15.5341 24.878 16.661 24.878 18.9073C24.8561 21.8707 22.9463 23.3488 19.1561 23.3488H12.3805L14.0122 15.5341H20.2756ZM49.8732 42.0146L40.1707 48.9146L41.722 59.7366L33.322 53.2098L22.0244 60L27.3073 48.4756L21.1463 41.9122L31.1049 41.9415L37.4122 31.1195L39.1098 42.0146H49.8659H49.8732ZM38.4585 48.1463L44.9049 43.6024H37.778L36.5415 35.7146L32.0122 43.522H24.8049L29.1805 48.1829L25.5585 55.9976L33.4171 51.3L39.6146 56.1073L38.4512 48.139L38.4585 48.1463ZM148.749 46.5585C151.983 43.9317 153.834 40.1927 154.317 35.3488H149.685C149.21 38.9122 147.79 41.6195 145.441 43.4781C143.093 45.3366 140.407 46.2585 137.4 46.2585C133.398 46.2585 130.185 44.8171 127.756 41.9341C125.334 39.0512 124.12 35.0707 124.12 30.0073C124.12 24.9439 125.334 20.9634 127.756 18.0805C130.178 15.1976 133.398 13.7561 137.4 13.7561C140.305 13.7561 142.815 14.4878 144.951 15.9585C147.08 17.4293 148.566 19.778 149.415 23.0122H154.098C153.139 18.4976 151.149 15.1171 148.12 12.8707C145.09 10.6317 141.52 9.5122 137.4 9.5122C132.073 9.5122 127.72 11.3707 124.339 15.0805C120.959 18.7902 119.268 23.7659 119.268 30.0146C119.268 36.2634 120.959 41.239 124.339 44.9488C127.72 48.6585 132.073 50.5171 137.4 50.5171C141.732 50.5171 145.515 49.2073 148.749 46.5805V46.5585ZM173.32 14.1293V10.3829C172.441 10.3098 171.505 10.2732 170.51 10.2732C165.22 10.2732 162.578 12.9366 162.578 18.2634V21.1829H157.895V25.039H162.578V49.6098H166.983V25.039H173.041V21.1829H166.983V18.1537C166.983 15.4756 168.249 14.1293 170.788 14.1293H173.32ZM196.624 21.1829L194.473 24.2122C192.673 26.7146 190.837 29.2829 188.963 31.9244C187.456 29.722 185.62 27.1463 183.454 24.2122L181.251 21.1829H176.071L186.373 35.0707L175.522 49.6171H180.644L182.129 47.5244C183.563 45.4683 185.817 42.3659 188.905 38.2098C190.998 41.0415 193.222 44.122 195.571 47.4659L197.115 49.6171H202.295L191.444 35.0707L201.746 21.1829H196.624ZM219.878 10.3829V49.6171H227.32V35.8976H237.124C241.529 35.8976 244.946 34.7415 247.376 32.4293C249.798 30.1171 251.012 27.0293 251.012 23.1732C251.012 19.3171 249.798 16.178 247.376 13.8585C244.954 11.5463 241.537 10.3902 237.124 10.3902H219.878V10.3829ZM227.32 16.778H236.795C238.961 16.778 240.622 17.3268 241.778 18.4317C242.934 19.5366 243.512 21.1171 243.512 23.1732C243.512 25.2293 242.934 26.8024 241.778 27.8854C240.622 28.9683 238.961 29.5098 236.795 29.5098H227.32V16.778ZM282.417 35.4C282.417 30.878 281.093 27.2707 278.451 24.5707C275.81 21.8707 272.32 20.5244 267.98 20.5244C263.641 20.5244 260.144 21.8854 257.48 24.6C254.817 27.322 253.485 30.9146 253.485 35.4C253.485 39.8854 254.817 43.4781 257.48 46.2C260.144 48.922 263.641 50.2756 267.98 50.2756C272.32 50.2756 275.802 48.9293 278.451 46.2293C281.093 43.5293 282.417 39.922 282.417 35.4ZM262.551 42.1756C261.249 40.5951 260.598 38.3341 260.598 35.4C260.598 32.4659 261.249 30.2049 262.551 28.6244C263.854 27.0439 265.661 26.2537 267.98 26.2537C270.3 26.2537 272.056 27.0439 273.38 28.6244C274.705 30.2049 275.363 32.4659 275.363 35.4C275.363 38.3341 274.705 40.5951 273.38 42.1756C272.056 43.7561 270.256 44.5463 267.98 44.5463C265.705 44.5463 263.854 43.7561 262.551 42.1756ZM294.593 26.2537V21.1829H287.868V49.6171H294.812V35.1805C294.812 32.539 295.529 30.5488 296.963 29.2317C298.398 27.9073 300.417 27.2488 303.022 27.2488H304.785V20.8537C304.383 20.7805 303.812 20.7439 303.08 20.7439C299.005 20.7439 296.173 22.5805 294.593 26.2537ZM319.112 21.1829V12.9146H312.227V21.1829H307.822V26.5829H312.227V42.5634C312.227 45.1317 312.944 46.9829 314.378 48.1024C315.812 49.222 318.051 49.7854 321.102 49.7854C322.317 49.7854 323.524 49.7268 324.739 49.6171V44.2756H322.368C321.19 44.2756 320.356 44.0927 319.859 43.7268C319.361 43.361 319.112 42.7171 319.112 41.7951V26.5902H324.732V21.1902H319.112V21.1829ZM354.154 44.2171V29.0634C354.154 23.3707 350.202 20.5244 342.307 20.5244C334.412 20.5244 329.927 23.7585 329.524 30.2195H336.359C336.505 28.5293 337.017 27.3512 337.902 26.6927C338.78 26.0341 340.237 25.6976 342.256 25.6976C344.166 25.6976 345.505 25.9902 346.28 26.5829C347.049 27.1683 347.437 28.0537 347.437 29.2244C347.437 30.2561 347.115 31.0098 346.471 31.4854C345.827 31.961 344.81 32.2902 343.412 32.4805L339.117 32.8683C331.844 33.5707 328.207 36.5268 328.207 41.7366C328.207 44.4585 329.144 46.5585 331.017 48.0439C332.89 49.5293 335.371 50.2756 338.459 50.2756C342.607 50.2756 345.659 48.9 347.605 46.1415C347.751 47.7951 348.007 48.9512 348.373 49.6098H355.317C354.549 48.5049 354.161 46.7122 354.161 44.2098L354.154 44.2171ZM336.527 44.2976C335.722 43.6171 335.312 42.6732 335.312 41.4585C335.312 40.2439 335.7 39.3659 336.468 38.7C337.237 38.0341 338.561 37.5951 340.434 37.3756L344.181 36.9366C345.688 36.7537 346.771 36.3659 347.429 35.7805V38.3707C347.429 40.6829 346.72 42.4244 345.307 43.5805C343.895 44.7366 342.154 45.3146 340.098 45.3146C338.517 45.3146 337.324 44.9781 336.512 44.2976H336.527ZM367.324 10.3829H360.38V49.6171H367.324V10.3829Z"
|
|
9
|
+
}
|
|
10
|
+
) });
|
|
11
|
+
}
|
|
12
|
+
const Z = L.memo(V);
|
|
13
|
+
export {
|
|
14
|
+
Z as default
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CompositeLogo } from './CompositeLogo';
|