@cfx-dev/ui-components 5.0.22 → 5.0.23
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/CarouselControls-CJ3tupLr.js +41 -0
- package/dist/Combination-BNueeiCk.js +2227 -0
- package/dist/{Combination-N-vN9BB-.js → Combination-DFRGuWx2.js} +50 -48
- package/dist/{DropdownContent-BTzahw95.js → DropdownContent-DCqFWnzj.js} +10 -10
- package/dist/assets/all_css.css +2 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/CarouselControls.css +1 -0
- package/dist/assets/css/CarouselItem.css +1 -0
- package/dist/assets/css/RangeInput.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/assets/general/themes.css +1 -1
- package/dist/cfxIcons-YyDWNxmM.js +110 -0
- package/dist/cfxIconsXLarge-Dw37ZSw2.js +110 -0
- package/dist/components/Accordion/AccordionShowcase.js +2 -2
- package/dist/components/Badge/BadgeShowcase.js +3 -3
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +4 -4
- package/dist/components/Carousel/Carousel.d.ts +24 -0
- package/dist/components/Carousel/Carousel.js +125 -0
- package/dist/components/Carousel/Carousel.types.d.ts +41 -0
- package/dist/components/Carousel/Carousel.types.js +1 -0
- package/dist/components/Carousel/CarouselControls.d.ts +8 -0
- package/dist/components/Carousel/CarouselControls.js +8 -0
- package/dist/components/Carousel/CarouselItem.d.ts +11 -0
- package/dist/components/Carousel/CarouselItem.js +85 -0
- package/dist/components/Carousel/CarouselShowcase.d.ts +6 -0
- package/dist/components/Carousel/CarouselShowcase.js +177 -0
- package/dist/components/Carousel/index.d.ts +4 -0
- package/dist/components/Carousel/index.js +6 -0
- package/dist/components/Carousel/playIcon.d.ts +6 -0
- package/dist/components/Carousel/playIcon.js +25 -0
- package/dist/components/Checkbox/Checkbox.js +7 -7
- package/dist/components/Checkbox/CheckboxShowcase.js +5 -5
- package/dist/components/ClipboardButton/ClipboardButton.js +9 -9
- package/dist/components/ControlBox/ControlBox.js +10 -10
- package/dist/components/Decorate/Decorate.js +5 -5
- package/dist/components/DropdownContent/DropdownContent.js +1 -1
- package/dist/components/DropdownContent/index.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +12 -12
- package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +4 -4
- package/dist/components/Flex/FlexShowcase.js +4 -4
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Flyout/FlyoutShowcase.js +3 -3
- package/dist/components/FormField/FormFieldShowcase.js +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Close.js +2 -2
- package/dist/components/Icons/cfx-icons/Copy.js +3 -3
- package/dist/components/Icons/cfx-icons/DownChevron.js +2 -2
- package/dist/components/Icons/cfx-icons/Filter.js +6 -6
- package/dist/components/Icons/cfx-icons/Heart.js +2 -2
- package/dist/components/Icons/cfx-icons/HeartFilled.js +2 -2
- package/dist/components/Icons/cfx-icons/LeftArrow.js +2 -2
- package/dist/components/Icons/cfx-icons/LeftChevron.js +2 -2
- package/dist/components/Icons/cfx-icons/MoreInfo.js +4 -4
- package/dist/components/Icons/cfx-icons/Play.js +5 -5
- package/dist/components/Icons/cfx-icons/Plus.js +2 -2
- package/dist/components/Icons/cfx-icons/Refresh.js +3 -3
- package/dist/components/Icons/cfx-icons/Search.js +2 -2
- package/dist/components/Icons/cfx-icons/ServerList.js +2 -2
- package/dist/components/Icons/cfx-icons/ServerReconnect.js +7 -7
- package/dist/components/Icons/cfx-icons/Square.js +3 -3
- package/dist/components/Icons/cfx-icons/SquareFilled.js +7 -7
- package/dist/components/Icons/cfx-icons/Trash.js +2 -2
- package/dist/components/Icons/cfx-icons/Undo.js +3 -3
- package/dist/components/Icons/cfx-icons/User.js +5 -5
- package/dist/components/Icons/cfx-icons/Users.js +3 -3
- package/dist/components/Icons/cfx-icons/Verified.js +4 -4
- package/dist/components/Icons/cfx-icons/Warning.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Close.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Copy.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/DownChevron.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Filter.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Heart.js +5 -5
- package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/Play.js +5 -5
- package/dist/components/Icons/cfx-iconsXLarge/Plus.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Refresh.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/Search.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/ServerList.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.js +7 -7
- package/dist/components/Icons/cfx-iconsXLarge/Square.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/Trash.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Undo.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/User.js +5 -5
- package/dist/components/Icons/cfx-iconsXLarge/Users.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/Verified.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Warning.js +2 -2
- package/dist/components/Icons/index.js +2 -2
- package/dist/components/InfoPanel/InfoPanelShowcase.js +9 -9
- package/dist/components/Input/InputShowcase.js +19 -19
- package/dist/components/Input/RichInput.js +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +340 -304
- package/dist/components/Link/LinkShowcase.js +5 -5
- package/dist/components/Logos/LogosShowcase.js +2 -2
- package/dist/components/Logos/cfx/Icon.js +7 -7
- package/dist/components/Logos/cfx/Logo.js +3 -3
- package/dist/components/Logos/cfx/Wordmark.js +2 -2
- package/dist/components/Logos/discord/Icon.js +5 -5
- package/dist/components/Logos/fivem/Icon.js +2 -2
- package/dist/components/Logos/fivem/WhiteLogo.js +2 -2
- package/dist/components/Logos/github/Icon.js +7 -7
- package/dist/components/Logos/google/Icon.js +6 -6
- package/dist/components/Logos/google/Wordmark.js +3 -3
- package/dist/components/Logos/index.js +7 -7
- package/dist/components/Logos/patreon/Icon.js +7 -7
- package/dist/components/Logos/patreon/Wordmark.js +5 -5
- package/dist/components/Logos/redm/CompositeLogo.js +2 -2
- package/dist/components/Logos/rockstar/Icon.js +2 -2
- package/dist/components/Logos/tebex/Icon.js +7 -7
- package/dist/components/Logos/tebex/Wordmark.js +2 -2
- package/dist/components/Logos/x/Icon.js +3 -3
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalShowcase.js +3 -3
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Popover/PopoverShowcase.js +6 -6
- package/dist/components/Prose/Prose.js +3 -3
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Scrollable/ScrollableShowcase.js +2 -2
- package/dist/components/Select/Select.js +109 -109
- package/dist/components/Select/SelectShowcase.js +21 -21
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +14 -14
- package/dist/components/TableResponsiveText/TableResponsiveText.js +2 -2
- package/dist/components/Tabular/TabularShowcase.js +12 -12
- package/dist/{index-CfQtbUfi.js → index-8cuIcSMB.js} +5 -5
- package/dist/index-BcJ929FX.js +20 -0
- package/dist/{index-kbBuAY0m.js → index-BcnrbBqR.js} +2 -2
- package/dist/{index-BgyFvlVL.js → index-Bg26abkD.js} +2 -2
- package/dist/{index-9LBuZ7x4.js → index-BzirdFxK.js} +5 -5
- package/dist/{index-Cl_RnsqN.js → index-CUyjBl1Y.js} +2 -2
- package/dist/index-CZVyC53C.js +20 -0
- package/dist/{index-DwfZyjnS.js → index-CaQzR2YA.js} +2 -2
- package/dist/{index-D5SMGei3.js → index-CzUzkeQx.js} +9 -9
- package/dist/{index-Cy4ZbWBL.js → index-DqqOUOlj.js} +2 -2
- package/dist/{index-3ctv5u9o.js → index-DwdZ_SPo.js} +2 -2
- package/dist/{index-Bj7QGXdt.js → index-DxFgF-nY.js} +2 -2
- package/dist/main.d.ts +11 -2
- package/dist/main.js +279 -257
- package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.d.ts +12 -0
- package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.js +9 -0
- package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.d.ts +9 -0
- package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.js +33 -0
- package/dist/utils/contexts/AnalyticsContext/index.d.ts +6 -0
- package/dist/utils/contexts/AnalyticsContext/index.js +10 -0
- package/dist/utils/contexts/AnalyticsContext/useAnalytics.d.ts +1 -0
- package/dist/utils/contexts/AnalyticsContext/useAnalytics.js +8 -0
- package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.d.ts +7 -0
- package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.js +22 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.d.ts +11 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.js +11 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.d.ts +6 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.js +38 -0
- package/dist/utils/contexts/MediaQueryContext/index.d.ts +4 -0
- package/dist/utils/contexts/MediaQueryContext/index.js +8 -0
- package/dist/utils/contexts/MediaQueryContext/useMediaQuery.d.ts +2 -0
- package/dist/utils/contexts/MediaQueryContext/useMediaQuery.js +8 -0
- package/dist/utils/contexts/StoreContext/StoreContext.d.ts +15 -0
- package/dist/utils/contexts/StoreContext/StoreContext.js +21 -0
- package/dist/utils/contexts/StoreContext/index.d.ts +2 -0
- package/dist/utils/contexts/StoreContext/index.js +4 -0
- package/dist/utils/formatBytes.d.ts +1 -0
- package/dist/utils/formatBytes.js +12 -0
- package/dist/utils/hooks/useCarousel.d.ts +11 -0
- package/dist/utils/hooks/useCarousel.js +1276 -0
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/truncateWithEllipsis.d.ts +1 -0
- package/dist/utils/truncateWithEllipsis.js +6 -0
- package/package.json +2 -1
- package/dist/Combination-CcTTSYNP.js +0 -2209
- package/dist/assets/css/CountryFlag.css +0 -1
- package/dist/cfxIcons-0xD_EEXT.js +0 -110
- package/dist/cfxIconsXLarge-D0vz6Yd_.js +0 -110
- package/dist/components/CountryFlag/CountryFlag.d.ts +0 -12
- package/dist/components/CountryFlag/CountryFlag.js +0 -25
- package/dist/components/CountryFlag/index.d.ts +0 -2
- package/dist/components/CountryFlag/index.js +0 -4
- package/dist/index-B_NGoq0d.js +0 -20
- package/dist/index-Cn_D8a9-.js +0 -20
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as i, jsxs as $, Fragment as be } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import q from "react";
|
|
4
|
-
import { R as ft, r as De } from "../../index-
|
|
4
|
+
import { R as ft, r as De } from "../../index-CUyjBl1Y.js";
|
|
5
5
|
import { c as Re } from "../../index-rKs9bXHr.js";
|
|
6
|
-
import { e as z, P as N, u as Oe,
|
|
7
|
-
import { u as vt, c as gt } from "../../index-
|
|
8
|
-
import {
|
|
6
|
+
import { e as z, P as N, u as Oe, a as V, c as b, d as mt, f as ht } from "../../index-8cuIcSMB.js";
|
|
7
|
+
import { u as vt, c as gt } from "../../index-BzirdFxK.js";
|
|
8
|
+
import { d as St, u as Ne, A as wt, c as Le, a as yt, h as Ct, b as xt, R as _t, F as It, D as Tt, C as Pt, e as bt } from "../../Combination-BNueeiCk.js";
|
|
9
9
|
import { u as Nt } from "../../index-BZPx6jYI.js";
|
|
10
10
|
import { Icon as Et } from "../Icon/Icon.js";
|
|
11
11
|
import { clsx as Ce } from "../../utils/clsx.js";
|
|
12
12
|
var Rt = "Portal", ke = l.forwardRef((t, o) => {
|
|
13
|
-
var
|
|
13
|
+
var c;
|
|
14
14
|
const { container: e, ...r } = t, [n, d] = l.useState(!1);
|
|
15
15
|
z(() => d(!0), []);
|
|
16
|
-
const a = e || n && ((
|
|
16
|
+
const a = e || n && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
|
|
17
17
|
return a ? ft.createPortal(/* @__PURE__ */ i(N.div, { ...r, ref: o }), a) : null;
|
|
18
18
|
});
|
|
19
19
|
ke.displayName = Rt;
|
|
@@ -40,7 +40,7 @@ var Be = Object.freeze({
|
|
|
40
40
|
)
|
|
41
41
|
);
|
|
42
42
|
Mt.displayName = Ot;
|
|
43
|
-
var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Select", [pe, fe, Lt] = gt(oe), [le
|
|
43
|
+
var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Select", [pe, fe, Lt] = gt(oe), [le] = mt(oe, [
|
|
44
44
|
Lt,
|
|
45
45
|
Le
|
|
46
46
|
]), me = Le(), [kt, Z] = le(oe), [Bt, Vt] = le(oe), Ve = (t) => {
|
|
@@ -51,23 +51,23 @@ var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Sele
|
|
|
51
51
|
defaultOpen: n,
|
|
52
52
|
onOpenChange: d,
|
|
53
53
|
value: a,
|
|
54
|
-
defaultValue:
|
|
55
|
-
onValueChange:
|
|
54
|
+
defaultValue: c,
|
|
55
|
+
onValueChange: s,
|
|
56
56
|
dir: p,
|
|
57
57
|
name: g,
|
|
58
58
|
autoComplete: S,
|
|
59
59
|
disabled: _,
|
|
60
60
|
required: P,
|
|
61
61
|
form: T
|
|
62
|
-
} = t, u = me(o), [v, C] = l.useState(null), [f, h] = l.useState(null), [M, A] = l.useState(!1),
|
|
62
|
+
} = t, u = me(o), [v, C] = l.useState(null), [f, h] = l.useState(null), [M, A] = l.useState(!1), se = vt(p), [E, L] = Oe({
|
|
63
63
|
prop: r,
|
|
64
64
|
defaultProp: n ?? !1,
|
|
65
65
|
onChange: d,
|
|
66
66
|
caller: oe
|
|
67
67
|
}), [j, Q] = Oe({
|
|
68
68
|
prop: a,
|
|
69
|
-
defaultProp:
|
|
70
|
-
onChange:
|
|
69
|
+
defaultProp: c,
|
|
70
|
+
onChange: s,
|
|
71
71
|
caller: oe
|
|
72
72
|
}), H = l.useRef(null), W = v ? T || !!v.closest("form") : !0, [G, U] = l.useState(/* @__PURE__ */ new Set()), F = Array.from(G).map((R) => R.props.value).join(";");
|
|
73
73
|
return /* @__PURE__ */ i(St, { ...u, children: /* @__PURE__ */ $(
|
|
@@ -86,7 +86,7 @@ var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Sele
|
|
|
86
86
|
onValueChange: Q,
|
|
87
87
|
open: E,
|
|
88
88
|
onOpenChange: L,
|
|
89
|
-
dir:
|
|
89
|
+
dir: se,
|
|
90
90
|
triggerPointerDownPosRef: H,
|
|
91
91
|
disabled: _,
|
|
92
92
|
children: [
|
|
@@ -107,7 +107,7 @@ var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Sele
|
|
|
107
107
|
}
|
|
108
108
|
) }),
|
|
109
109
|
W ? /* @__PURE__ */ $(
|
|
110
|
-
|
|
110
|
+
st,
|
|
111
111
|
{
|
|
112
112
|
"aria-hidden": !0,
|
|
113
113
|
required: P,
|
|
@@ -132,11 +132,11 @@ var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Sele
|
|
|
132
132
|
Ve.displayName = oe;
|
|
133
133
|
var He = "SelectTrigger", We = l.forwardRef(
|
|
134
134
|
(t, o) => {
|
|
135
|
-
const { __scopeSelect: e, disabled: r = !1, ...n } = t, d = me(e), a = Z(He, e),
|
|
135
|
+
const { __scopeSelect: e, disabled: r = !1, ...n } = t, d = me(e), a = Z(He, e), c = a.disabled || r, s = V(o, a.onTriggerChange), p = fe(e), g = l.useRef("touch"), [S, _, P] = at((u) => {
|
|
136
136
|
const v = p().filter((h) => !h.disabled), C = v.find((h) => h.value === a.value), f = it(v, u, C);
|
|
137
137
|
f !== void 0 && a.onValueChange(f.value);
|
|
138
138
|
}), T = (u) => {
|
|
139
|
-
|
|
139
|
+
c || (a.onOpenChange(!0), P()), u && (a.triggerPointerDownPosRef.current = {
|
|
140
140
|
x: Math.round(u.pageX),
|
|
141
141
|
y: Math.round(u.pageY)
|
|
142
142
|
});
|
|
@@ -152,11 +152,11 @@ var He = "SelectTrigger", We = l.forwardRef(
|
|
|
152
152
|
"aria-autocomplete": "none",
|
|
153
153
|
dir: a.dir,
|
|
154
154
|
"data-state": a.open ? "open" : "closed",
|
|
155
|
-
disabled:
|
|
156
|
-
"data-disabled":
|
|
157
|
-
"data-placeholder":
|
|
155
|
+
disabled: c,
|
|
156
|
+
"data-disabled": c ? "" : void 0,
|
|
157
|
+
"data-placeholder": ct(a.value) ? "" : void 0,
|
|
158
158
|
...n,
|
|
159
|
-
ref:
|
|
159
|
+
ref: s,
|
|
160
160
|
onClick: b(n.onClick, (u) => {
|
|
161
161
|
u.currentTarget.focus(), g.current !== "mouse" && T(u);
|
|
162
162
|
}),
|
|
@@ -176,16 +176,16 @@ var He = "SelectTrigger", We = l.forwardRef(
|
|
|
176
176
|
We.displayName = He;
|
|
177
177
|
var Ue = "SelectValue", Fe = l.forwardRef(
|
|
178
178
|
(t, o) => {
|
|
179
|
-
const { __scopeSelect: e, className: r, style: n, children: d, placeholder: a = "", ...
|
|
179
|
+
const { __scopeSelect: e, className: r, style: n, children: d, placeholder: a = "", ...c } = t, s = Z(Ue, e), { onValueNodeHasChildrenChange: p } = s, g = d !== void 0, S = V(o, s.onValueNodeChange);
|
|
180
180
|
return z(() => {
|
|
181
181
|
p(g);
|
|
182
182
|
}, [p, g]), /* @__PURE__ */ i(
|
|
183
183
|
N.span,
|
|
184
184
|
{
|
|
185
|
-
...
|
|
185
|
+
...c,
|
|
186
186
|
ref: S,
|
|
187
187
|
style: { pointerEvents: "none" },
|
|
188
|
-
children:
|
|
188
|
+
children: ct(s.value) ? /* @__PURE__ */ i(be, { children: a }) : d
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
191
|
}
|
|
@@ -226,8 +226,8 @@ var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.R
|
|
|
226
226
|
onPointerDownOutside: a,
|
|
227
227
|
//
|
|
228
228
|
// PopperContent props
|
|
229
|
-
side:
|
|
230
|
-
sideOffset:
|
|
229
|
+
side: c,
|
|
230
|
+
sideOffset: s,
|
|
231
231
|
align: p,
|
|
232
232
|
alignOffset: g,
|
|
233
233
|
arrowPadding: S,
|
|
@@ -238,7 +238,7 @@ var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.R
|
|
|
238
238
|
avoidCollisions: v,
|
|
239
239
|
//
|
|
240
240
|
...C
|
|
241
|
-
} = t, f = Z(ne, e), [h, M] = l.useState(null), [A,
|
|
241
|
+
} = t, f = Z(ne, e), [h, M] = l.useState(null), [A, se] = l.useState(null), E = V(o, (m) => M(m)), [L, j] = l.useState(null), [Q, H] = l.useState(
|
|
242
242
|
null
|
|
243
243
|
), W = fe(e), [G, U] = l.useState(!1), F = l.useRef(!1);
|
|
244
244
|
l.useEffect(() => {
|
|
@@ -296,9 +296,9 @@ var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.R
|
|
|
296
296
|
(f.value !== void 0 && f.value === I || x) && H(m);
|
|
297
297
|
},
|
|
298
298
|
[f.value]
|
|
299
|
-
), de = r === "popper" ? xe : $e,
|
|
300
|
-
side:
|
|
301
|
-
sideOffset:
|
|
299
|
+
), de = r === "popper" ? xe : $e, ce = de === xe ? {
|
|
300
|
+
side: c,
|
|
301
|
+
sideOffset: s,
|
|
302
302
|
align: p,
|
|
303
303
|
alignOffset: g,
|
|
304
304
|
arrowPadding: S,
|
|
@@ -314,7 +314,7 @@ var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.R
|
|
|
314
314
|
scope: e,
|
|
315
315
|
content: h,
|
|
316
316
|
viewport: A,
|
|
317
|
-
onViewportChange:
|
|
317
|
+
onViewportChange: se,
|
|
318
318
|
itemRefCallback: ve,
|
|
319
319
|
selectedItem: L,
|
|
320
320
|
onItemLeave: ge,
|
|
@@ -354,7 +354,7 @@ var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.R
|
|
|
354
354
|
dir: f.dir,
|
|
355
355
|
onContextMenu: (m) => m.preventDefault(),
|
|
356
356
|
...C,
|
|
357
|
-
...
|
|
357
|
+
...ce,
|
|
358
358
|
onPlaced: () => U(!0),
|
|
359
359
|
ref: E,
|
|
360
360
|
style: {
|
|
@@ -388,8 +388,8 @@ var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.R
|
|
|
388
388
|
);
|
|
389
389
|
Ye.displayName = Ut;
|
|
390
390
|
var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
391
|
-
const { __scopeSelect: e, onPlaced: r, ...n } = t, d = Z(ne, e), a = J(ne, e), [
|
|
392
|
-
if (d.trigger && d.valueNode &&
|
|
391
|
+
const { __scopeSelect: e, onPlaced: r, ...n } = t, d = Z(ne, e), a = J(ne, e), [c, s] = l.useState(null), [p, g] = l.useState(null), S = V(o, (E) => g(E)), _ = fe(e), P = l.useRef(!1), T = l.useRef(!0), { viewport: u, selectedItem: v, selectedItemText: C, focusSelectedItem: f } = a, h = l.useCallback(() => {
|
|
392
|
+
if (d.trigger && d.valueNode && c && p && u && v && C) {
|
|
393
393
|
const E = d.trigger.getBoundingClientRect(), L = p.getBoundingClientRect(), j = d.valueNode.getBoundingClientRect(), Q = C.getBoundingClientRect();
|
|
394
394
|
if (d.dir !== "rtl") {
|
|
395
395
|
const w = Q.left - L.left, y = j.left - w, ee = E.left - y, te = E.width + ee, Se = Math.max(te, L.width), we = window.innerWidth - D, ye = Re(y, [
|
|
@@ -401,41 +401,41 @@ var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
|
401
401
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
402
402
|
Math.max(D, we - Se)
|
|
403
403
|
]);
|
|
404
|
-
|
|
404
|
+
c.style.minWidth = te + "px", c.style.left = ye + "px";
|
|
405
405
|
} else {
|
|
406
406
|
const w = L.right - Q.right, y = window.innerWidth - j.right - w, ee = window.innerWidth - E.right - y, te = E.width + ee, Se = Math.max(te, L.width), we = window.innerWidth - D, ye = Re(y, [
|
|
407
407
|
D,
|
|
408
408
|
Math.max(D, we - Se)
|
|
409
409
|
]);
|
|
410
|
-
|
|
410
|
+
c.style.minWidth = te + "px", c.style.right = ye + "px";
|
|
411
411
|
}
|
|
412
|
-
const H = _(), W = window.innerHeight - D * 2, G = u.scrollHeight, U = window.getComputedStyle(p), F = parseInt(U.borderTopWidth, 10), R = parseInt(U.paddingTop, 10), k = parseInt(U.borderBottomWidth, 10), K = parseInt(U.paddingBottom, 10), Y = F + R + G + K + k, he = Math.min(v.offsetHeight * 5, Y), ie = window.getComputedStyle(u), ve = parseInt(ie.paddingTop, 10), ge = parseInt(ie.paddingBottom, 10), re = E.top + E.height / 2 - D, de = W - re,
|
|
412
|
+
const H = _(), W = window.innerHeight - D * 2, G = u.scrollHeight, U = window.getComputedStyle(p), F = parseInt(U.borderTopWidth, 10), R = parseInt(U.paddingTop, 10), k = parseInt(U.borderBottomWidth, 10), K = parseInt(U.paddingBottom, 10), Y = F + R + G + K + k, he = Math.min(v.offsetHeight * 5, Y), ie = window.getComputedStyle(u), ve = parseInt(ie.paddingTop, 10), ge = parseInt(ie.paddingBottom, 10), re = E.top + E.height / 2 - D, de = W - re, ce = v.offsetHeight / 2, m = v.offsetTop + ce, I = F + R + m, O = Y - I;
|
|
413
413
|
if (I <= re) {
|
|
414
414
|
const w = H.length > 0 && v === H[H.length - 1].ref.current;
|
|
415
|
-
|
|
415
|
+
c.style.bottom = "0px";
|
|
416
416
|
const y = p.clientHeight - u.offsetTop - u.offsetHeight, ee = Math.max(
|
|
417
417
|
de,
|
|
418
|
-
|
|
418
|
+
ce + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
419
419
|
(w ? ge : 0) + y + k
|
|
420
420
|
), te = I + ee;
|
|
421
|
-
|
|
421
|
+
c.style.height = te + "px";
|
|
422
422
|
} else {
|
|
423
423
|
const w = H.length > 0 && v === H[0].ref.current;
|
|
424
|
-
|
|
424
|
+
c.style.top = "0px";
|
|
425
425
|
const ee = Math.max(
|
|
426
426
|
re,
|
|
427
427
|
F + u.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
428
|
-
(w ? ve : 0) +
|
|
428
|
+
(w ? ve : 0) + ce
|
|
429
429
|
) + O;
|
|
430
|
-
|
|
430
|
+
c.style.height = ee + "px", u.scrollTop = I - re + u.offsetTop;
|
|
431
431
|
}
|
|
432
|
-
|
|
432
|
+
c.style.margin = `${D}px 0`, c.style.minHeight = he + "px", c.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => P.current = !0);
|
|
433
433
|
}
|
|
434
434
|
}, [
|
|
435
435
|
_,
|
|
436
436
|
d.trigger,
|
|
437
437
|
d.valueNode,
|
|
438
|
-
|
|
438
|
+
c,
|
|
439
439
|
p,
|
|
440
440
|
u,
|
|
441
441
|
v,
|
|
@@ -448,7 +448,7 @@ var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
|
448
448
|
z(() => {
|
|
449
449
|
p && A(window.getComputedStyle(p).zIndex);
|
|
450
450
|
}, [p]);
|
|
451
|
-
const
|
|
451
|
+
const se = l.useCallback(
|
|
452
452
|
(E) => {
|
|
453
453
|
E && T.current === !0 && (h(), f == null || f(), T.current = !1);
|
|
454
454
|
},
|
|
@@ -458,13 +458,13 @@ var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
|
458
458
|
jt,
|
|
459
459
|
{
|
|
460
460
|
scope: e,
|
|
461
|
-
contentWrapper:
|
|
461
|
+
contentWrapper: c,
|
|
462
462
|
shouldExpandOnScrollRef: P,
|
|
463
|
-
onScrollButtonChange:
|
|
463
|
+
onScrollButtonChange: se,
|
|
464
464
|
children: /* @__PURE__ */ i(
|
|
465
465
|
"div",
|
|
466
466
|
{
|
|
467
|
-
ref:
|
|
467
|
+
ref: s,
|
|
468
468
|
style: {
|
|
469
469
|
display: "flex",
|
|
470
470
|
flexDirection: "column",
|
|
@@ -523,7 +523,7 @@ var zt = "SelectPopperPosition", xe = l.forwardRef((t, o) => {
|
|
|
523
523
|
xe.displayName = zt;
|
|
524
524
|
var [jt, Ee] = le(ne, {}), _e = "SelectViewport", qe = l.forwardRef(
|
|
525
525
|
(t, o) => {
|
|
526
|
-
const { __scopeSelect: e, nonce: r, ...n } = t, d = J(_e, e), a = Ee(_e, e),
|
|
526
|
+
const { __scopeSelect: e, nonce: r, ...n } = t, d = J(_e, e), a = Ee(_e, e), c = V(o, d.onViewportChange), s = l.useRef(0);
|
|
527
527
|
return /* @__PURE__ */ $(be, { children: [
|
|
528
528
|
/* @__PURE__ */ i(
|
|
529
529
|
"style",
|
|
@@ -540,7 +540,7 @@ var [jt, Ee] = le(ne, {}), _e = "SelectViewport", qe = l.forwardRef(
|
|
|
540
540
|
"data-radix-select-viewport": "",
|
|
541
541
|
role: "presentation",
|
|
542
542
|
...n,
|
|
543
|
-
ref:
|
|
543
|
+
ref: c,
|
|
544
544
|
style: {
|
|
545
545
|
// we use position: 'relative' here on the `viewport` so that when we call
|
|
546
546
|
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
@@ -557,7 +557,7 @@ var [jt, Ee] = le(ne, {}), _e = "SelectViewport", qe = l.forwardRef(
|
|
|
557
557
|
onScroll: b(n.onScroll, (p) => {
|
|
558
558
|
const g = p.currentTarget, { contentWrapper: S, shouldExpandOnScrollRef: _ } = a;
|
|
559
559
|
if (_ != null && _.current && S) {
|
|
560
|
-
const P = Math.abs(
|
|
560
|
+
const P = Math.abs(s.current - g.scrollTop);
|
|
561
561
|
if (P > 0) {
|
|
562
562
|
const T = window.innerHeight - D * 2, u = parseFloat(S.style.minHeight), v = parseFloat(S.style.height), C = Math.max(u, v);
|
|
563
563
|
if (C < T) {
|
|
@@ -566,7 +566,7 @@ var [jt, Ee] = le(ne, {}), _e = "SelectViewport", qe = l.forwardRef(
|
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
|
|
569
|
+
s.current = g.scrollTop;
|
|
570
570
|
})
|
|
571
571
|
}
|
|
572
572
|
) })
|
|
@@ -596,14 +596,14 @@ var ue = "SelectItem", [Xt, Je] = le(ue), Qe = l.forwardRef(
|
|
|
596
596
|
disabled: n = !1,
|
|
597
597
|
textValue: d,
|
|
598
598
|
...a
|
|
599
|
-
} = t,
|
|
599
|
+
} = t, c = Z(ue, e), s = J(ue, e), p = c.value === r, [g, S] = l.useState(d ?? ""), [_, P] = l.useState(!1), T = V(
|
|
600
600
|
o,
|
|
601
601
|
(f) => {
|
|
602
602
|
var h;
|
|
603
|
-
return (h =
|
|
603
|
+
return (h = s.itemRefCallback) == null ? void 0 : h.call(s, f, r, n);
|
|
604
604
|
}
|
|
605
605
|
), u = Ne(), v = l.useRef("touch"), C = () => {
|
|
606
|
-
n || (
|
|
606
|
+
n || (c.onValueChange(r), c.onOpenChange(!1));
|
|
607
607
|
};
|
|
608
608
|
if (r === "")
|
|
609
609
|
throw new Error(
|
|
@@ -653,15 +653,15 @@ var ue = "SelectItem", [Xt, Je] = le(ue), Qe = l.forwardRef(
|
|
|
653
653
|
}),
|
|
654
654
|
onPointerMove: b(a.onPointerMove, (f) => {
|
|
655
655
|
var h;
|
|
656
|
-
v.current = f.pointerType, n ? (h =
|
|
656
|
+
v.current = f.pointerType, n ? (h = s.onItemLeave) == null || h.call(s) : v.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
|
|
657
657
|
}),
|
|
658
658
|
onPointerLeave: b(a.onPointerLeave, (f) => {
|
|
659
659
|
var h;
|
|
660
|
-
f.currentTarget === document.activeElement && ((h =
|
|
660
|
+
f.currentTarget === document.activeElement && ((h = s.onItemLeave) == null || h.call(s));
|
|
661
661
|
}),
|
|
662
662
|
onKeyDown: b(a.onKeyDown, (f) => {
|
|
663
663
|
var M;
|
|
664
|
-
((M =
|
|
664
|
+
((M = s.searchRef) == null ? void 0 : M.current) !== "" && f.key === " " || (Dt.includes(f.key) && C(), f.key === " " && f.preventDefault());
|
|
665
665
|
})
|
|
666
666
|
}
|
|
667
667
|
)
|
|
@@ -674,21 +674,21 @@ var ue = "SelectItem", [Xt, Je] = le(ue), Qe = l.forwardRef(
|
|
|
674
674
|
Qe.displayName = ue;
|
|
675
675
|
var ae = "SelectItemText", et = l.forwardRef(
|
|
676
676
|
(t, o) => {
|
|
677
|
-
const { __scopeSelect: e, className: r, style: n, ...d } = t, a = Z(ae, e),
|
|
677
|
+
const { __scopeSelect: e, className: r, style: n, ...d } = t, a = Z(ae, e), c = J(ae, e), s = Je(ae, e), p = Vt(ae, e), [g, S] = l.useState(null), _ = V(
|
|
678
678
|
o,
|
|
679
679
|
(C) => S(C),
|
|
680
|
-
|
|
680
|
+
s.onItemTextChange,
|
|
681
681
|
(C) => {
|
|
682
682
|
var f;
|
|
683
|
-
return (f =
|
|
683
|
+
return (f = c.itemTextRefCallback) == null ? void 0 : f.call(c, C, s.value, s.disabled);
|
|
684
684
|
}
|
|
685
685
|
), P = g == null ? void 0 : g.textContent, T = l.useMemo(
|
|
686
|
-
() => /* @__PURE__ */ i("option", { value:
|
|
687
|
-
[
|
|
686
|
+
() => /* @__PURE__ */ i("option", { value: s.value, disabled: s.disabled, children: P }, s.value),
|
|
687
|
+
[s.disabled, s.value, P]
|
|
688
688
|
), { onNativeOptionAdd: u, onNativeOptionRemove: v } = p;
|
|
689
689
|
return z(() => (u(T), () => v(T)), [u, v, T]), /* @__PURE__ */ $(be, { children: [
|
|
690
|
-
/* @__PURE__ */ i(N.span, { id:
|
|
691
|
-
|
|
690
|
+
/* @__PURE__ */ i(N.span, { id: s.textId, ...d, ref: _ }),
|
|
691
|
+
s.isSelected && a.valueNode && !a.valueNodeHasChildren ? De.createPortal(d.children, a.valueNode) : null
|
|
692
692
|
] });
|
|
693
693
|
}
|
|
694
694
|
);
|
|
@@ -704,12 +704,12 @@ var Ie = "SelectScrollUpButton", nt = l.forwardRef((t, o) => {
|
|
|
704
704
|
const e = J(Ie, t.__scopeSelect), r = Ee(Ie, t.__scopeSelect), [n, d] = l.useState(!1), a = V(o, r.onScrollButtonChange);
|
|
705
705
|
return z(() => {
|
|
706
706
|
if (e.viewport && e.isPositioned) {
|
|
707
|
-
let
|
|
708
|
-
const p =
|
|
707
|
+
let c = function() {
|
|
708
|
+
const p = s.scrollTop > 0;
|
|
709
709
|
d(p);
|
|
710
710
|
};
|
|
711
|
-
const
|
|
712
|
-
return
|
|
711
|
+
const s = e.viewport;
|
|
712
|
+
return c(), s.addEventListener("scroll", c), () => s.removeEventListener("scroll", c);
|
|
713
713
|
}
|
|
714
714
|
}, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
|
|
715
715
|
lt,
|
|
@@ -717,8 +717,8 @@ var Ie = "SelectScrollUpButton", nt = l.forwardRef((t, o) => {
|
|
|
717
717
|
...t,
|
|
718
718
|
ref: a,
|
|
719
719
|
onAutoScroll: () => {
|
|
720
|
-
const { viewport:
|
|
721
|
-
|
|
720
|
+
const { viewport: c, selectedItem: s } = e;
|
|
721
|
+
c && s && (c.scrollTop = c.scrollTop - s.offsetHeight);
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
) : null;
|
|
@@ -728,12 +728,12 @@ var Te = "SelectScrollDownButton", rt = l.forwardRef((t, o) => {
|
|
|
728
728
|
const e = J(Te, t.__scopeSelect), r = Ee(Te, t.__scopeSelect), [n, d] = l.useState(!1), a = V(o, r.onScrollButtonChange);
|
|
729
729
|
return z(() => {
|
|
730
730
|
if (e.viewport && e.isPositioned) {
|
|
731
|
-
let
|
|
732
|
-
const p =
|
|
731
|
+
let c = function() {
|
|
732
|
+
const p = s.scrollHeight - s.clientHeight, g = Math.ceil(s.scrollTop) < p;
|
|
733
733
|
d(g);
|
|
734
734
|
};
|
|
735
|
-
const
|
|
736
|
-
return
|
|
735
|
+
const s = e.viewport;
|
|
736
|
+
return c(), s.addEventListener("scroll", c), () => s.removeEventListener("scroll", c);
|
|
737
737
|
}
|
|
738
738
|
}, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
|
|
739
739
|
lt,
|
|
@@ -741,22 +741,22 @@ var Te = "SelectScrollDownButton", rt = l.forwardRef((t, o) => {
|
|
|
741
741
|
...t,
|
|
742
742
|
ref: a,
|
|
743
743
|
onAutoScroll: () => {
|
|
744
|
-
const { viewport:
|
|
745
|
-
|
|
744
|
+
const { viewport: c, selectedItem: s } = e;
|
|
745
|
+
c && s && (c.scrollTop = c.scrollTop + s.offsetHeight);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
) : null;
|
|
749
749
|
});
|
|
750
750
|
rt.displayName = Te;
|
|
751
751
|
var lt = l.forwardRef((t, o) => {
|
|
752
|
-
const { __scopeSelect: e, onAutoScroll: r, ...n } = t, d = J("SelectScrollButton", e), a = l.useRef(null),
|
|
752
|
+
const { __scopeSelect: e, onAutoScroll: r, ...n } = t, d = J("SelectScrollButton", e), a = l.useRef(null), c = fe(e), s = l.useCallback(() => {
|
|
753
753
|
a.current !== null && (window.clearInterval(a.current), a.current = null);
|
|
754
754
|
}, []);
|
|
755
|
-
return l.useEffect(() => () =>
|
|
755
|
+
return l.useEffect(() => () => s(), [s]), z(() => {
|
|
756
756
|
var g;
|
|
757
|
-
const p =
|
|
757
|
+
const p = c().find((S) => S.ref.current === document.activeElement);
|
|
758
758
|
(g = p == null ? void 0 : p.ref.current) == null || g.scrollIntoView({ block: "nearest" });
|
|
759
|
-
}, [
|
|
759
|
+
}, [c]), /* @__PURE__ */ i(
|
|
760
760
|
N.div,
|
|
761
761
|
{
|
|
762
762
|
"aria-hidden": !0,
|
|
@@ -771,7 +771,7 @@ var lt = l.forwardRef((t, o) => {
|
|
|
771
771
|
(p = d.onItemLeave) == null || p.call(d), a.current === null && (a.current = window.setInterval(r, 50));
|
|
772
772
|
}),
|
|
773
773
|
onPointerLeave: b(n.onPointerLeave, () => {
|
|
774
|
-
|
|
774
|
+
s();
|
|
775
775
|
})
|
|
776
776
|
}
|
|
777
777
|
);
|
|
@@ -789,19 +789,19 @@ var Pe = "SelectArrow", Qt = l.forwardRef(
|
|
|
789
789
|
}
|
|
790
790
|
);
|
|
791
791
|
Qt.displayName = Pe;
|
|
792
|
-
var eo = "SelectBubbleInput",
|
|
792
|
+
var eo = "SelectBubbleInput", st = l.forwardRef(
|
|
793
793
|
({ __scopeSelect: t, value: o, ...e }, r) => {
|
|
794
794
|
const n = l.useRef(null), d = V(r, n), a = Nt(o);
|
|
795
795
|
return l.useEffect(() => {
|
|
796
|
-
const
|
|
797
|
-
if (!
|
|
798
|
-
const
|
|
799
|
-
|
|
796
|
+
const c = n.current;
|
|
797
|
+
if (!c) return;
|
|
798
|
+
const s = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
|
|
799
|
+
s,
|
|
800
800
|
"value"
|
|
801
801
|
).set;
|
|
802
802
|
if (a !== o && g) {
|
|
803
803
|
const S = new Event("change", { bubbles: !0 });
|
|
804
|
-
g.call(
|
|
804
|
+
g.call(c, o), c.dispatchEvent(S);
|
|
805
805
|
}
|
|
806
806
|
}, [a, o]), /* @__PURE__ */ i(
|
|
807
807
|
N.select,
|
|
@@ -814,17 +814,17 @@ var eo = "SelectBubbleInput", ct = l.forwardRef(
|
|
|
814
814
|
);
|
|
815
815
|
}
|
|
816
816
|
);
|
|
817
|
-
|
|
818
|
-
function
|
|
817
|
+
st.displayName = eo;
|
|
818
|
+
function ct(t) {
|
|
819
819
|
return t === "" || t === void 0;
|
|
820
820
|
}
|
|
821
821
|
function at(t) {
|
|
822
822
|
const o = yt(t), e = l.useRef(""), r = l.useRef(0), n = l.useCallback(
|
|
823
823
|
(a) => {
|
|
824
|
-
const
|
|
825
|
-
o(
|
|
826
|
-
e.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() =>
|
|
827
|
-
}(
|
|
824
|
+
const c = e.current + a;
|
|
825
|
+
o(c), function s(p) {
|
|
826
|
+
e.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() => s(""), 1e3));
|
|
827
|
+
}(c);
|
|
828
828
|
},
|
|
829
829
|
[o]
|
|
830
830
|
), d = l.useCallback(() => {
|
|
@@ -836,15 +836,15 @@ function it(t, o, e) {
|
|
|
836
836
|
const n = o.length > 1 && Array.from(o).every((p) => p === o[0]) ? o[0] : o, d = e ? t.indexOf(e) : -1;
|
|
837
837
|
let a = to(t, Math.max(d, 0));
|
|
838
838
|
n.length === 1 && (a = a.filter((p) => p !== e));
|
|
839
|
-
const
|
|
839
|
+
const s = a.find(
|
|
840
840
|
(p) => p.textValue.toLowerCase().startsWith(n.toLowerCase())
|
|
841
841
|
);
|
|
842
|
-
return
|
|
842
|
+
return s !== e ? s : void 0;
|
|
843
843
|
}
|
|
844
844
|
function to(t, o) {
|
|
845
845
|
return t.map((e, r) => t[(o + r) % t.length]);
|
|
846
846
|
}
|
|
847
|
-
var oo = Ve, no = We, ro = Fe, lo = Ke,
|
|
847
|
+
var oo = Ve, no = We, ro = Fe, lo = Ke, so = ze, co = je, ao = qe, io = Qe, uo = et, po = ot, fo = nt, mo = rt, dt = {
|
|
848
848
|
color: void 0,
|
|
849
849
|
size: void 0,
|
|
850
850
|
className: void 0,
|
|
@@ -881,18 +881,18 @@ function pt(t) {
|
|
|
881
881
|
}
|
|
882
882
|
function vo(t) {
|
|
883
883
|
var o = function(e) {
|
|
884
|
-
var r = t.attr, n = t.size, d = t.title, a = ho(t, ["attr", "size", "title"]),
|
|
885
|
-
return e.className && (
|
|
884
|
+
var r = t.attr, n = t.size, d = t.title, a = ho(t, ["attr", "size", "title"]), c = n || e.size || "1em", s;
|
|
885
|
+
return e.className && (s = e.className), t.className && (s = (s ? s + " " : "") + t.className), q.createElement("svg", X({
|
|
886
886
|
stroke: "currentColor",
|
|
887
887
|
fill: "currentColor",
|
|
888
888
|
strokeWidth: "0"
|
|
889
889
|
}, e.attr, r, a, {
|
|
890
|
-
className:
|
|
890
|
+
className: s,
|
|
891
891
|
style: X(X({
|
|
892
892
|
color: t.color || e.color
|
|
893
893
|
}, e.style), t.style),
|
|
894
|
-
height:
|
|
895
|
-
width:
|
|
894
|
+
height: c,
|
|
895
|
+
width: c,
|
|
896
896
|
xmlns: "http://www.w3.org/2000/svg"
|
|
897
897
|
}), d && q.createElement("title", null, d), t.children);
|
|
898
898
|
};
|
|
@@ -915,7 +915,7 @@ const So = "cfxui__Select__trigger__232e4", wo = "cfxui__Select__fullWidth__739d
|
|
|
915
915
|
option: _o,
|
|
916
916
|
tickIcon: Io
|
|
917
917
|
};
|
|
918
|
-
function
|
|
918
|
+
function Lo(t) {
|
|
919
919
|
const {
|
|
920
920
|
value: o,
|
|
921
921
|
options: e,
|
|
@@ -923,9 +923,9 @@ function ko(t) {
|
|
|
923
923
|
placeholder: n,
|
|
924
924
|
disabled: d = !1,
|
|
925
925
|
fullWidth: a = !1,
|
|
926
|
-
className:
|
|
927
|
-
} = t, [
|
|
928
|
-
|
|
926
|
+
className: c
|
|
927
|
+
} = t, [s, p] = q.useState(!1), g = Ce(
|
|
928
|
+
c,
|
|
929
929
|
B.trigger,
|
|
930
930
|
{
|
|
931
931
|
[B.disabled]: d,
|
|
@@ -934,12 +934,12 @@ function ko(t) {
|
|
|
934
934
|
), S = Ce(
|
|
935
935
|
B.content
|
|
936
936
|
);
|
|
937
|
-
return /* @__PURE__ */ $(oo, { value: o, onValueChange: r, onOpenChange: p, open:
|
|
937
|
+
return /* @__PURE__ */ $(oo, { value: o, onValueChange: r, onOpenChange: p, open: s, children: [
|
|
938
938
|
/* @__PURE__ */ $(no, { disabled: d, className: g, children: [
|
|
939
939
|
/* @__PURE__ */ i(ro, { placeholder: n }),
|
|
940
940
|
/* @__PURE__ */ i(lo, { className: B.icon, children: /* @__PURE__ */ i(Ae, {}) })
|
|
941
941
|
] }),
|
|
942
|
-
/* @__PURE__ */ i(
|
|
942
|
+
/* @__PURE__ */ i(so, { children: /* @__PURE__ */ $(co, { className: S, children: [
|
|
943
943
|
/* @__PURE__ */ i(fo, { className: B.arrow, children: /* @__PURE__ */ i(go, {}) }),
|
|
944
944
|
/* @__PURE__ */ i(ao, { children: e.map((_) => /* @__PURE__ */ $(io, { value: _.value, className: Ce(B.option), children: [
|
|
945
945
|
/* @__PURE__ */ i(uo, { children: _.label }),
|
|
@@ -950,5 +950,5 @@ function ko(t) {
|
|
|
950
950
|
] });
|
|
951
951
|
}
|
|
952
952
|
export {
|
|
953
|
-
|
|
953
|
+
Lo as Select
|
|
954
954
|
};
|