@cfx-dev/ui-components 4.2.24 → 4.3.0
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/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +6 -4
- package/dist/main.js +66 -65
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
|
@@ -1,1132 +1,149 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { R as
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as
|
|
9
|
-
import { u as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
20
|
-
var r = t.read();
|
|
21
|
-
if (!r)
|
|
22
|
-
throw new Error("Sidecar medium not found");
|
|
23
|
-
return s.createElement(r, ce({}, n));
|
|
24
|
-
};
|
|
25
|
-
vt.isSideCarExport = !0;
|
|
26
|
-
function $n(e, t) {
|
|
27
|
-
return e.useMedium(t), vt;
|
|
28
|
-
}
|
|
29
|
-
function B(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
30
|
-
return function(a) {
|
|
31
|
-
if (e == null || e(a), n === !1 || !a.defaultPrevented)
|
|
32
|
-
return t == null ? void 0 : t(a);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function gt(e, t = []) {
|
|
36
|
-
let n = [];
|
|
37
|
-
function r(i, c) {
|
|
38
|
-
const o = s.createContext(c), u = n.length;
|
|
39
|
-
n = [...n, c];
|
|
40
|
-
function d(S) {
|
|
41
|
-
const { scope: w, children: y, ...f } = S, l = (w == null ? void 0 : w[e][u]) || o, h = s.useMemo(() => f, Object.values(f));
|
|
42
|
-
return /* @__PURE__ */ v(l.Provider, { value: h, children: y });
|
|
43
|
-
}
|
|
44
|
-
function g(S, w) {
|
|
45
|
-
const y = (w == null ? void 0 : w[e][u]) || o, f = s.useContext(y);
|
|
46
|
-
if (f) return f;
|
|
47
|
-
if (c !== void 0) return c;
|
|
48
|
-
throw new Error(`\`${S}\` must be used within \`${i}\``);
|
|
49
|
-
}
|
|
50
|
-
return d.displayName = i + "Provider", [d, g];
|
|
51
|
-
}
|
|
52
|
-
const a = () => {
|
|
53
|
-
const i = n.map((c) => s.createContext(c));
|
|
54
|
-
return function(o) {
|
|
55
|
-
const u = (o == null ? void 0 : o[e]) || i;
|
|
56
|
-
return s.useMemo(
|
|
57
|
-
() => ({ [`__scope${e}`]: { ...o, [e]: u } }),
|
|
58
|
-
[o, u]
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
return a.scopeName = e, [r, Un(a, ...t)];
|
|
63
|
-
}
|
|
64
|
-
function Un(...e) {
|
|
65
|
-
const t = e[0];
|
|
66
|
-
if (e.length === 1) return t;
|
|
67
|
-
const n = () => {
|
|
68
|
-
const r = e.map((a) => ({
|
|
69
|
-
useScope: a(),
|
|
70
|
-
scopeName: a.scopeName
|
|
71
|
-
}));
|
|
72
|
-
return function(i) {
|
|
73
|
-
const c = r.reduce((o, { useScope: u, scopeName: d }) => {
|
|
74
|
-
const S = u(i)[`__scope${d}`];
|
|
75
|
-
return { ...o, ...S };
|
|
76
|
-
}, {});
|
|
77
|
-
return s.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
return n.scopeName = t.scopeName, n;
|
|
81
|
-
}
|
|
82
|
-
function Kn(e, t) {
|
|
83
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
84
|
-
}
|
|
85
|
-
function Yn(...e) {
|
|
86
|
-
return (t) => e.forEach((n) => Kn(n, t));
|
|
87
|
-
}
|
|
88
|
-
function K(...e) {
|
|
89
|
-
return s.useCallback(Yn(...e), e);
|
|
90
|
-
}
|
|
91
|
-
function jn(e) {
|
|
92
|
-
const t = e + "CollectionProvider", [n, r] = gt(t), [a, i] = n(
|
|
93
|
-
t,
|
|
94
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
95
|
-
), c = (y) => {
|
|
96
|
-
const { scope: f, children: l } = y, h = D.useRef(null), p = D.useRef(/* @__PURE__ */ new Map()).current;
|
|
97
|
-
return /* @__PURE__ */ v(a, { scope: f, itemMap: p, collectionRef: h, children: l });
|
|
98
|
-
};
|
|
99
|
-
c.displayName = t;
|
|
100
|
-
const o = e + "CollectionSlot", u = D.forwardRef(
|
|
101
|
-
(y, f) => {
|
|
102
|
-
const { scope: l, children: h } = y, p = i(o, l), m = K(f, p.collectionRef);
|
|
103
|
-
return /* @__PURE__ */ v(ze, { ref: m, children: h });
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
u.displayName = o;
|
|
107
|
-
const d = e + "CollectionItemSlot", g = "data-radix-collection-item", S = D.forwardRef(
|
|
108
|
-
(y, f) => {
|
|
109
|
-
const { scope: l, children: h, ...p } = y, m = D.useRef(null), C = K(f, m), x = i(d, l);
|
|
110
|
-
return D.useEffect(() => (x.itemMap.set(m, { ref: m, ...p }), () => void x.itemMap.delete(m))), /* @__PURE__ */ v(ze, { [g]: "", ref: C, children: h });
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
S.displayName = d;
|
|
114
|
-
function w(y) {
|
|
115
|
-
const f = i(e + "CollectionConsumer", y);
|
|
116
|
-
return D.useCallback(() => {
|
|
117
|
-
const h = f.collectionRef.current;
|
|
118
|
-
if (!h) return [];
|
|
119
|
-
const p = Array.from(h.querySelectorAll(`[${g}]`));
|
|
120
|
-
return Array.from(f.itemMap.values()).sort(
|
|
121
|
-
(x, E) => p.indexOf(x.ref.current) - p.indexOf(E.ref.current)
|
|
122
|
-
);
|
|
123
|
-
}, [f.collectionRef, f.itemMap]);
|
|
124
|
-
}
|
|
125
|
-
return [
|
|
126
|
-
{ Provider: c, Slot: u, ItemSlot: S },
|
|
127
|
-
w,
|
|
128
|
-
r
|
|
129
|
-
];
|
|
130
|
-
}
|
|
131
|
-
function Le(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
132
|
-
return function(a) {
|
|
133
|
-
if (e == null || e(a), n === !1 || !a.defaultPrevented)
|
|
134
|
-
return t == null ? void 0 : t(a);
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function Xn(e, t) {
|
|
138
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
139
|
-
}
|
|
140
|
-
function Gn(...e) {
|
|
141
|
-
return (t) => e.forEach((n) => Xn(n, t));
|
|
142
|
-
}
|
|
143
|
-
function St(...e) {
|
|
144
|
-
return s.useCallback(Gn(...e), e);
|
|
145
|
-
}
|
|
146
|
-
var Zn = "DismissableLayer", Ve = "dismissableLayer.update", qn = "dismissableLayer.pointerDownOutside", Qn = "dismissableLayer.focusOutside", tt, wt = s.createContext({
|
|
147
|
-
layers: /* @__PURE__ */ new Set(),
|
|
148
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
149
|
-
branches: /* @__PURE__ */ new Set()
|
|
150
|
-
}), yt = s.forwardRef(
|
|
151
|
-
(e, t) => {
|
|
152
|
-
const {
|
|
153
|
-
disableOutsidePointerEvents: n = !1,
|
|
154
|
-
onEscapeKeyDown: r,
|
|
155
|
-
onPointerDownOutside: a,
|
|
156
|
-
onFocusOutside: i,
|
|
157
|
-
onInteractOutside: c,
|
|
158
|
-
onDismiss: o,
|
|
159
|
-
...u
|
|
160
|
-
} = e, d = s.useContext(wt), [g, S] = s.useState(null), w = (g == null ? void 0 : g.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, y] = s.useState({}), f = St(t, (_) => S(_)), l = Array.from(d.layers), [h] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), p = l.indexOf(h), m = g ? l.indexOf(g) : -1, C = d.layersWithOutsidePointerEventsDisabled.size > 0, x = m >= p, E = tr((_) => {
|
|
161
|
-
const N = _.target, k = [...d.branches].some((H) => H.contains(N));
|
|
162
|
-
!x || k || (a == null || a(_), c == null || c(_), _.defaultPrevented || o == null || o());
|
|
163
|
-
}, w), A = nr((_) => {
|
|
164
|
-
const N = _.target;
|
|
165
|
-
[...d.branches].some((H) => H.contains(N)) || (i == null || i(_), c == null || c(_), _.defaultPrevented || o == null || o());
|
|
166
|
-
}, w);
|
|
167
|
-
return En((_) => {
|
|
168
|
-
m === d.layers.size - 1 && (r == null || r(_), !_.defaultPrevented && o && (_.preventDefault(), o()));
|
|
169
|
-
}, w), s.useEffect(() => {
|
|
170
|
-
if (g)
|
|
171
|
-
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (tt = w.body.style.pointerEvents, w.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(g)), d.layers.add(g), nt(), () => {
|
|
172
|
-
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (w.body.style.pointerEvents = tt);
|
|
173
|
-
};
|
|
174
|
-
}, [g, w, n, d]), s.useEffect(() => () => {
|
|
175
|
-
g && (d.layers.delete(g), d.layersWithOutsidePointerEventsDisabled.delete(g), nt());
|
|
176
|
-
}, [g, d]), s.useEffect(() => {
|
|
177
|
-
const _ = () => y({});
|
|
178
|
-
return document.addEventListener(Ve, _), () => document.removeEventListener(Ve, _);
|
|
179
|
-
}, []), /* @__PURE__ */ v(
|
|
180
|
-
O.div,
|
|
181
|
-
{
|
|
182
|
-
...u,
|
|
183
|
-
ref: f,
|
|
184
|
-
style: {
|
|
185
|
-
pointerEvents: C ? x ? "auto" : "none" : void 0,
|
|
186
|
-
...e.style
|
|
187
|
-
},
|
|
188
|
-
onFocusCapture: Le(e.onFocusCapture, A.onFocusCapture),
|
|
189
|
-
onBlurCapture: Le(e.onBlurCapture, A.onBlurCapture),
|
|
190
|
-
onPointerDownCapture: Le(
|
|
191
|
-
e.onPointerDownCapture,
|
|
192
|
-
E.onPointerDownCapture
|
|
193
|
-
)
|
|
194
|
-
}
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
yt.displayName = Zn;
|
|
199
|
-
var Jn = "DismissableLayerBranch", er = s.forwardRef((e, t) => {
|
|
200
|
-
const n = s.useContext(wt), r = s.useRef(null), a = St(t, r);
|
|
201
|
-
return s.useEffect(() => {
|
|
202
|
-
const i = r.current;
|
|
203
|
-
if (i)
|
|
204
|
-
return n.branches.add(i), () => {
|
|
205
|
-
n.branches.delete(i);
|
|
206
|
-
};
|
|
207
|
-
}, [n.branches]), /* @__PURE__ */ v(O.div, { ...e, ref: a });
|
|
208
|
-
});
|
|
209
|
-
er.displayName = Jn;
|
|
210
|
-
function tr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
211
|
-
const n = pe(e), r = s.useRef(!1), a = s.useRef(() => {
|
|
212
|
-
});
|
|
213
|
-
return s.useEffect(() => {
|
|
214
|
-
const i = (o) => {
|
|
215
|
-
if (o.target && !r.current) {
|
|
216
|
-
let u = function() {
|
|
217
|
-
Ct(
|
|
218
|
-
qn,
|
|
219
|
-
n,
|
|
220
|
-
d,
|
|
221
|
-
{ discrete: !0 }
|
|
222
|
-
);
|
|
223
|
-
};
|
|
224
|
-
const d = { originalEvent: o };
|
|
225
|
-
o.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = u, t.addEventListener("click", a.current, { once: !0 })) : u();
|
|
226
|
-
} else
|
|
227
|
-
t.removeEventListener("click", a.current);
|
|
228
|
-
r.current = !1;
|
|
229
|
-
}, c = window.setTimeout(() => {
|
|
230
|
-
t.addEventListener("pointerdown", i);
|
|
231
|
-
}, 0);
|
|
232
|
-
return () => {
|
|
233
|
-
window.clearTimeout(c), t.removeEventListener("pointerdown", i), t.removeEventListener("click", a.current);
|
|
234
|
-
};
|
|
235
|
-
}, [t, n]), {
|
|
236
|
-
// ensures we check React component tree (not just DOM tree)
|
|
237
|
-
onPointerDownCapture: () => r.current = !0
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
function nr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
241
|
-
const n = pe(e), r = s.useRef(!1);
|
|
242
|
-
return s.useEffect(() => {
|
|
243
|
-
const a = (i) => {
|
|
244
|
-
i.target && !r.current && Ct(Qn, n, { originalEvent: i }, {
|
|
245
|
-
discrete: !1
|
|
246
|
-
});
|
|
247
|
-
};
|
|
248
|
-
return t.addEventListener("focusin", a), () => t.removeEventListener("focusin", a);
|
|
249
|
-
}, [t, n]), {
|
|
250
|
-
onFocusCapture: () => r.current = !0,
|
|
251
|
-
onBlurCapture: () => r.current = !1
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
function nt() {
|
|
255
|
-
const e = new CustomEvent(Ve);
|
|
256
|
-
document.dispatchEvent(e);
|
|
257
|
-
}
|
|
258
|
-
function Ct(e, t, n, { discrete: r }) {
|
|
259
|
-
const a = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
260
|
-
t && a.addEventListener(e, t, { once: !0 }), r ? bn(a, i) : a.dispatchEvent(i);
|
|
261
|
-
}
|
|
262
|
-
var De = 0;
|
|
263
|
-
function rr() {
|
|
264
|
-
s.useEffect(() => {
|
|
265
|
-
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
266
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? rt()), document.body.insertAdjacentElement("beforeend", e[1] ?? rt()), De++, () => {
|
|
267
|
-
De === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), De--;
|
|
268
|
-
};
|
|
269
|
-
}, []);
|
|
270
|
-
}
|
|
271
|
-
function rt() {
|
|
272
|
-
const e = document.createElement("span");
|
|
273
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
274
|
-
}
|
|
275
|
-
function or(e, t) {
|
|
276
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
277
|
-
}
|
|
278
|
-
function ar(...e) {
|
|
279
|
-
return (t) => e.forEach((n) => or(n, t));
|
|
280
|
-
}
|
|
281
|
-
function sr(...e) {
|
|
282
|
-
return s.useCallback(ar(...e), e);
|
|
283
|
-
}
|
|
284
|
-
var ke = "focusScope.autoFocusOnMount", Be = "focusScope.autoFocusOnUnmount", ot = { bubbles: !1, cancelable: !0 }, cr = "FocusScope", bt = s.forwardRef((e, t) => {
|
|
285
|
-
const {
|
|
286
|
-
loop: n = !1,
|
|
287
|
-
trapped: r = !1,
|
|
288
|
-
onMountAutoFocus: a,
|
|
289
|
-
onUnmountAutoFocus: i,
|
|
290
|
-
...c
|
|
291
|
-
} = e, [o, u] = s.useState(null), d = pe(a), g = pe(i), S = s.useRef(null), w = sr(t, (l) => u(l)), y = s.useRef({
|
|
292
|
-
paused: !1,
|
|
293
|
-
pause() {
|
|
294
|
-
this.paused = !0;
|
|
295
|
-
},
|
|
296
|
-
resume() {
|
|
297
|
-
this.paused = !1;
|
|
298
|
-
}
|
|
299
|
-
}).current;
|
|
300
|
-
s.useEffect(() => {
|
|
301
|
-
if (r) {
|
|
302
|
-
let l = function(C) {
|
|
303
|
-
if (y.paused || !o) return;
|
|
304
|
-
const x = C.target;
|
|
305
|
-
o.contains(x) ? S.current = x : te(S.current, { select: !0 });
|
|
306
|
-
}, h = function(C) {
|
|
307
|
-
if (y.paused || !o) return;
|
|
308
|
-
const x = C.relatedTarget;
|
|
309
|
-
x !== null && (o.contains(x) || te(S.current, { select: !0 }));
|
|
310
|
-
}, p = function(C) {
|
|
311
|
-
if (document.activeElement === document.body)
|
|
312
|
-
for (const E of C)
|
|
313
|
-
E.removedNodes.length > 0 && te(o);
|
|
314
|
-
};
|
|
315
|
-
document.addEventListener("focusin", l), document.addEventListener("focusout", h);
|
|
316
|
-
const m = new MutationObserver(p);
|
|
317
|
-
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
318
|
-
document.removeEventListener("focusin", l), document.removeEventListener("focusout", h), m.disconnect();
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
}, [r, o, y.paused]), s.useEffect(() => {
|
|
322
|
-
if (o) {
|
|
323
|
-
st.add(y);
|
|
324
|
-
const l = document.activeElement;
|
|
325
|
-
if (!o.contains(l)) {
|
|
326
|
-
const p = new CustomEvent(ke, ot);
|
|
327
|
-
o.addEventListener(ke, d), o.dispatchEvent(p), p.defaultPrevented || (ir(pr(xt(o)), { select: !0 }), document.activeElement === l && te(o));
|
|
328
|
-
}
|
|
329
|
-
return () => {
|
|
330
|
-
o.removeEventListener(ke, d), setTimeout(() => {
|
|
331
|
-
const p = new CustomEvent(Be, ot);
|
|
332
|
-
o.addEventListener(Be, g), o.dispatchEvent(p), p.defaultPrevented || te(l ?? document.body, { select: !0 }), o.removeEventListener(Be, g), st.remove(y);
|
|
333
|
-
}, 0);
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
}, [o, d, g, y]);
|
|
337
|
-
const f = s.useCallback(
|
|
338
|
-
(l) => {
|
|
339
|
-
if (!n && !r || y.paused) return;
|
|
340
|
-
const h = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, p = document.activeElement;
|
|
341
|
-
if (h && p) {
|
|
342
|
-
const m = l.currentTarget, [C, x] = lr(m);
|
|
343
|
-
C && x ? !l.shiftKey && p === x ? (l.preventDefault(), n && te(C, { select: !0 })) : l.shiftKey && p === C && (l.preventDefault(), n && te(x, { select: !0 })) : p === m && l.preventDefault();
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
[n, r, y.paused]
|
|
347
|
-
);
|
|
348
|
-
return /* @__PURE__ */ v(O.div, { tabIndex: -1, ...c, ref: w, onKeyDown: f });
|
|
349
|
-
});
|
|
350
|
-
bt.displayName = cr;
|
|
351
|
-
function ir(e, { select: t = !1 } = {}) {
|
|
352
|
-
const n = document.activeElement;
|
|
353
|
-
for (const r of e)
|
|
354
|
-
if (te(r, { select: t }), document.activeElement !== n) return;
|
|
355
|
-
}
|
|
356
|
-
function lr(e) {
|
|
357
|
-
const t = xt(e), n = at(t, e), r = at(t.reverse(), e);
|
|
358
|
-
return [n, r];
|
|
359
|
-
}
|
|
360
|
-
function xt(e) {
|
|
361
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
362
|
-
acceptNode: (r) => {
|
|
363
|
-
const a = r.tagName === "INPUT" && r.type === "hidden";
|
|
364
|
-
return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
368
|
-
return t;
|
|
369
|
-
}
|
|
370
|
-
function at(e, t) {
|
|
371
|
-
for (const n of e)
|
|
372
|
-
if (!ur(n, { upTo: t })) return n;
|
|
373
|
-
}
|
|
374
|
-
function ur(e, { upTo: t }) {
|
|
375
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
376
|
-
for (; e; ) {
|
|
377
|
-
if (t !== void 0 && e === t) return !1;
|
|
378
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
379
|
-
e = e.parentElement;
|
|
380
|
-
}
|
|
381
|
-
return !1;
|
|
382
|
-
}
|
|
383
|
-
function dr(e) {
|
|
384
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
385
|
-
}
|
|
386
|
-
function te(e, { select: t = !1 } = {}) {
|
|
387
|
-
if (e && e.focus) {
|
|
388
|
-
const n = document.activeElement;
|
|
389
|
-
e.focus({ preventScroll: !0 }), e !== n && dr(e) && t && e.select();
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
var st = fr();
|
|
393
|
-
function fr() {
|
|
394
|
-
let e = [];
|
|
395
|
-
return {
|
|
396
|
-
add(t) {
|
|
397
|
-
const n = e[0];
|
|
398
|
-
t !== n && (n == null || n.pause()), e = ct(e, t), e.unshift(t);
|
|
399
|
-
},
|
|
400
|
-
remove(t) {
|
|
401
|
-
var n;
|
|
402
|
-
e = ct(e, t), (n = e[0]) == null || n.resume();
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
function ct(e, t) {
|
|
407
|
-
const n = [...e], r = n.indexOf(t);
|
|
408
|
-
return r !== -1 && n.splice(r, 1), n;
|
|
409
|
-
}
|
|
410
|
-
function pr(e) {
|
|
411
|
-
return e.filter((t) => t.tagName !== "A");
|
|
412
|
-
}
|
|
413
|
-
var mr = "Arrow", _t = s.forwardRef((e, t) => {
|
|
414
|
-
const { children: n, width: r = 10, height: a = 5, ...i } = e;
|
|
415
|
-
return /* @__PURE__ */ v(
|
|
416
|
-
O.svg,
|
|
417
|
-
{
|
|
418
|
-
...i,
|
|
419
|
-
ref: t,
|
|
420
|
-
width: r,
|
|
421
|
-
height: a,
|
|
422
|
-
viewBox: "0 0 30 10",
|
|
423
|
-
preserveAspectRatio: "none",
|
|
424
|
-
children: e.asChild ? n : /* @__PURE__ */ v("polygon", { points: "0,0 30,0 15,10" })
|
|
425
|
-
}
|
|
426
|
-
);
|
|
427
|
-
});
|
|
428
|
-
_t.displayName = mr;
|
|
429
|
-
var hr = _t;
|
|
430
|
-
function vr(e, t) {
|
|
431
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
432
|
-
}
|
|
433
|
-
function gr(...e) {
|
|
434
|
-
return (t) => e.forEach((n) => vr(n, t));
|
|
435
|
-
}
|
|
436
|
-
function Et(...e) {
|
|
437
|
-
return s.useCallback(gr(...e), e);
|
|
438
|
-
}
|
|
439
|
-
function Sr(e, t = []) {
|
|
440
|
-
let n = [];
|
|
441
|
-
function r(i, c) {
|
|
442
|
-
const o = s.createContext(c), u = n.length;
|
|
443
|
-
n = [...n, c];
|
|
444
|
-
function d(S) {
|
|
445
|
-
const { scope: w, children: y, ...f } = S, l = (w == null ? void 0 : w[e][u]) || o, h = s.useMemo(() => f, Object.values(f));
|
|
446
|
-
return /* @__PURE__ */ v(l.Provider, { value: h, children: y });
|
|
447
|
-
}
|
|
448
|
-
function g(S, w) {
|
|
449
|
-
const y = (w == null ? void 0 : w[e][u]) || o, f = s.useContext(y);
|
|
450
|
-
if (f) return f;
|
|
451
|
-
if (c !== void 0) return c;
|
|
452
|
-
throw new Error(`\`${S}\` must be used within \`${i}\``);
|
|
453
|
-
}
|
|
454
|
-
return d.displayName = i + "Provider", [d, g];
|
|
455
|
-
}
|
|
456
|
-
const a = () => {
|
|
457
|
-
const i = n.map((c) => s.createContext(c));
|
|
458
|
-
return function(o) {
|
|
459
|
-
const u = (o == null ? void 0 : o[e]) || i;
|
|
460
|
-
return s.useMemo(
|
|
461
|
-
() => ({ [`__scope${e}`]: { ...o, [e]: u } }),
|
|
462
|
-
[o, u]
|
|
463
|
-
);
|
|
464
|
-
};
|
|
465
|
-
};
|
|
466
|
-
return a.scopeName = e, [r, wr(a, ...t)];
|
|
467
|
-
}
|
|
468
|
-
function wr(...e) {
|
|
469
|
-
const t = e[0];
|
|
470
|
-
if (e.length === 1) return t;
|
|
471
|
-
const n = () => {
|
|
472
|
-
const r = e.map((a) => ({
|
|
473
|
-
useScope: a(),
|
|
474
|
-
scopeName: a.scopeName
|
|
475
|
-
}));
|
|
476
|
-
return function(i) {
|
|
477
|
-
const c = r.reduce((o, { useScope: u, scopeName: d }) => {
|
|
478
|
-
const S = u(i)[`__scope${d}`];
|
|
479
|
-
return { ...o, ...S };
|
|
480
|
-
}, {});
|
|
481
|
-
return s.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
|
-
return n.scopeName = t.scopeName, n;
|
|
485
|
-
}
|
|
486
|
-
var Ze = "Popper", [Pt, Rt] = Sr(Ze), [yr, Tt] = Pt(Ze), Nt = (e) => {
|
|
487
|
-
const { __scopePopper: t, children: n } = e, [r, a] = s.useState(null);
|
|
488
|
-
return /* @__PURE__ */ v(yr, { scope: t, anchor: r, onAnchorChange: a, children: n });
|
|
489
|
-
};
|
|
490
|
-
Nt.displayName = Ze;
|
|
491
|
-
var It = "PopperAnchor", At = s.forwardRef(
|
|
492
|
-
(e, t) => {
|
|
493
|
-
const { __scopePopper: n, virtualRef: r, ...a } = e, i = Tt(It, n), c = s.useRef(null), o = Et(t, c);
|
|
494
|
-
return s.useEffect(() => {
|
|
495
|
-
i.onAnchorChange((r == null ? void 0 : r.current) || c.current);
|
|
496
|
-
}), r ? null : /* @__PURE__ */ v(O.div, { ...a, ref: o });
|
|
497
|
-
}
|
|
498
|
-
);
|
|
499
|
-
At.displayName = It;
|
|
500
|
-
var qe = "PopperContent", [Cr, br] = Pt(qe), Ot = s.forwardRef(
|
|
501
|
-
(e, t) => {
|
|
502
|
-
var b, I, L, T, P, R;
|
|
503
|
-
const {
|
|
504
|
-
__scopePopper: n,
|
|
505
|
-
side: r = "bottom",
|
|
506
|
-
sideOffset: a = 0,
|
|
507
|
-
align: i = "center",
|
|
508
|
-
alignOffset: c = 0,
|
|
509
|
-
arrowPadding: o = 0,
|
|
510
|
-
avoidCollisions: u = !0,
|
|
511
|
-
collisionBoundary: d = [],
|
|
512
|
-
collisionPadding: g = 0,
|
|
513
|
-
sticky: S = "partial",
|
|
514
|
-
hideWhenDetached: w = !1,
|
|
515
|
-
updatePositionStrategy: y = "optimized",
|
|
516
|
-
onPlaced: f,
|
|
517
|
-
...l
|
|
518
|
-
} = e, h = Tt(qe, n), [p, m] = s.useState(null), C = Et(t, (V) => m(V)), [x, E] = s.useState(null), A = _n(x), _ = (A == null ? void 0 : A.width) ?? 0, N = (A == null ? void 0 : A.height) ?? 0, k = r + (i !== "center" ? "-" + i : ""), H = typeof g == "number" ? g : { top: 0, right: 0, bottom: 0, left: 0, ...g }, G = Array.isArray(d) ? d : [d], $ = G.length > 0, W = {
|
|
519
|
-
padding: H,
|
|
520
|
-
boundary: G.filter(_r),
|
|
521
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
522
|
-
altBoundary: $
|
|
523
|
-
}, { refs: Z, floatingStyles: M, placement: U, isPositioned: F, middlewareData: z } = Pn({
|
|
524
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
525
|
-
strategy: "fixed",
|
|
526
|
-
placement: k,
|
|
527
|
-
whileElementsMounted: (...V) => Rn(...V, {
|
|
528
|
-
animationFrame: y === "always"
|
|
529
|
-
}),
|
|
530
|
-
elements: {
|
|
531
|
-
reference: h.anchor
|
|
532
|
-
},
|
|
533
|
-
middleware: [
|
|
534
|
-
Tn({ mainAxis: a + N, alignmentAxis: c }),
|
|
535
|
-
u && Nn({
|
|
536
|
-
mainAxis: !0,
|
|
537
|
-
crossAxis: !1,
|
|
538
|
-
limiter: S === "partial" ? Ln() : void 0,
|
|
539
|
-
...W
|
|
540
|
-
}),
|
|
541
|
-
u && In({ ...W }),
|
|
542
|
-
An({
|
|
543
|
-
...W,
|
|
544
|
-
apply: ({ elements: V, rects: q, availableWidth: Se, availableHeight: we }) => {
|
|
545
|
-
const { width: ye, height: yn } = q.reference, xe = V.floating.style;
|
|
546
|
-
xe.setProperty("--radix-popper-available-width", `${Se}px`), xe.setProperty("--radix-popper-available-height", `${we}px`), xe.setProperty("--radix-popper-anchor-width", `${ye}px`), xe.setProperty("--radix-popper-anchor-height", `${yn}px`);
|
|
547
|
-
}
|
|
548
|
-
}),
|
|
549
|
-
x && On({ element: x, padding: o }),
|
|
550
|
-
Er({ arrowWidth: _, arrowHeight: N }),
|
|
551
|
-
w && Mn({ strategy: "referenceHidden", ...W })
|
|
552
|
-
]
|
|
553
|
-
}), [Y, he] = Dt(U), Q = pe(f);
|
|
554
|
-
X(() => {
|
|
555
|
-
F && (Q == null || Q());
|
|
556
|
-
}, [F, Q]);
|
|
557
|
-
const ve = (b = z.arrow) == null ? void 0 : b.x, ge = (I = z.arrow) == null ? void 0 : I.y, ee = ((L = z.arrow) == null ? void 0 : L.centerOffset) !== 0, [le, se] = s.useState();
|
|
558
|
-
return X(() => {
|
|
559
|
-
p && se(window.getComputedStyle(p).zIndex);
|
|
560
|
-
}, [p]), /* @__PURE__ */ v(
|
|
561
|
-
"div",
|
|
562
|
-
{
|
|
563
|
-
ref: Z.setFloating,
|
|
564
|
-
"data-radix-popper-content-wrapper": "",
|
|
565
|
-
style: {
|
|
566
|
-
...M,
|
|
567
|
-
transform: F ? M.transform : "translate(0, -200%)",
|
|
568
|
-
// keep off the page when measuring
|
|
569
|
-
minWidth: "max-content",
|
|
570
|
-
zIndex: le,
|
|
571
|
-
"--radix-popper-transform-origin": [
|
|
572
|
-
(T = z.transformOrigin) == null ? void 0 : T.x,
|
|
573
|
-
(P = z.transformOrigin) == null ? void 0 : P.y
|
|
574
|
-
].join(" "),
|
|
575
|
-
// hide the content if using the hide middleware and should be hidden
|
|
576
|
-
// set visibility to hidden and disable pointer events so the UI behaves
|
|
577
|
-
// as if the PopperContent isn't there at all
|
|
578
|
-
...((R = z.hide) == null ? void 0 : R.referenceHidden) && {
|
|
579
|
-
visibility: "hidden",
|
|
580
|
-
pointerEvents: "none"
|
|
581
|
-
}
|
|
582
|
-
},
|
|
583
|
-
dir: e.dir,
|
|
584
|
-
children: /* @__PURE__ */ v(
|
|
585
|
-
Cr,
|
|
586
|
-
{
|
|
587
|
-
scope: n,
|
|
588
|
-
placedSide: Y,
|
|
589
|
-
onArrowChange: E,
|
|
590
|
-
arrowX: ve,
|
|
591
|
-
arrowY: ge,
|
|
592
|
-
shouldHideArrow: ee,
|
|
593
|
-
children: /* @__PURE__ */ v(
|
|
594
|
-
O.div,
|
|
595
|
-
{
|
|
596
|
-
"data-side": Y,
|
|
597
|
-
"data-align": he,
|
|
598
|
-
...l,
|
|
599
|
-
ref: C,
|
|
600
|
-
style: {
|
|
601
|
-
...l.style,
|
|
602
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
603
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
604
|
-
animation: F ? void 0 : "none"
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
)
|
|
608
|
-
}
|
|
609
|
-
)
|
|
610
|
-
}
|
|
611
|
-
);
|
|
612
|
-
}
|
|
613
|
-
);
|
|
614
|
-
Ot.displayName = qe;
|
|
615
|
-
var Mt = "PopperArrow", xr = {
|
|
616
|
-
top: "bottom",
|
|
617
|
-
right: "left",
|
|
618
|
-
bottom: "top",
|
|
619
|
-
left: "right"
|
|
620
|
-
}, Lt = s.forwardRef(function(t, n) {
|
|
621
|
-
const { __scopePopper: r, ...a } = t, i = br(Mt, r), c = xr[i.placedSide];
|
|
622
|
-
return (
|
|
623
|
-
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
624
|
-
// doesn't report size as we'd expect on SVG elements.
|
|
625
|
-
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
626
|
-
/* @__PURE__ */ v(
|
|
627
|
-
"span",
|
|
628
|
-
{
|
|
629
|
-
ref: i.onArrowChange,
|
|
630
|
-
style: {
|
|
631
|
-
position: "absolute",
|
|
632
|
-
left: i.arrowX,
|
|
633
|
-
top: i.arrowY,
|
|
634
|
-
[c]: 0,
|
|
635
|
-
transformOrigin: {
|
|
636
|
-
top: "",
|
|
637
|
-
right: "0 0",
|
|
638
|
-
bottom: "center 0",
|
|
639
|
-
left: "100% 0"
|
|
640
|
-
}[i.placedSide],
|
|
641
|
-
transform: {
|
|
642
|
-
top: "translateY(100%)",
|
|
643
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
644
|
-
bottom: "rotate(180deg)",
|
|
645
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
646
|
-
}[i.placedSide],
|
|
647
|
-
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
648
|
-
},
|
|
649
|
-
children: /* @__PURE__ */ v(
|
|
650
|
-
hr,
|
|
651
|
-
{
|
|
652
|
-
...a,
|
|
653
|
-
ref: n,
|
|
654
|
-
style: {
|
|
655
|
-
...a.style,
|
|
656
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
657
|
-
display: "block"
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
)
|
|
661
|
-
}
|
|
662
|
-
)
|
|
663
|
-
);
|
|
1
|
+
import { jsx as i, jsxs as $, Fragment as Pe } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import q from "react";
|
|
4
|
+
import { R as ft, r as De } from "../../index-Cl_RnsqN.js";
|
|
5
|
+
import { c as Ee } from "../../index-rKs9bXHr.js";
|
|
6
|
+
import { a as K, P as N, d as Oe, c as mt, u as B, e as P, b as ht } from "../../index-BHuChyf5.js";
|
|
7
|
+
import { u as gt, c as vt } from "../../index-DZEAOJqB.js";
|
|
8
|
+
import { c as Le, R as _t, u as Ne, A as St, a as wt, h as xt, b as yt, d as Ct, F as It, D as Tt, C as bt, e as Pt } from "../../Combination-CSgOhzm-.js";
|
|
9
|
+
import { u as Nt } from "../../index-BZPx6jYI.js";
|
|
10
|
+
import { Icon as Rt } from "../Icon/Icon.js";
|
|
11
|
+
import { clsx as xe } from "../../utils/clsx.js";
|
|
12
|
+
import { ui as Et } from "../../utils/ui/ui.js";
|
|
13
|
+
var Ot = "Portal", ke = l.forwardRef((t, o) => {
|
|
14
|
+
var a;
|
|
15
|
+
const { container: e, ...r } = t, [n, d] = l.useState(!1);
|
|
16
|
+
K(() => d(!0), []);
|
|
17
|
+
const c = e || n && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
18
|
+
return c ? ft.createPortal(/* @__PURE__ */ i(N.div, { ...r, ref: o }), c) : null;
|
|
664
19
|
});
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
})
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
return [t, n];
|
|
682
|
-
}
|
|
683
|
-
var Pr = Nt, Rr = At, Tr = Ot, Nr = Lt, Ir = "Portal", kt = s.forwardRef((e, t) => {
|
|
684
|
-
var o;
|
|
685
|
-
const { container: n, ...r } = e, [a, i] = s.useState(!1);
|
|
686
|
-
X(() => i(!0), []);
|
|
687
|
-
const c = n || a && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
|
|
688
|
-
return c ? Cn.createPortal(/* @__PURE__ */ v(O.div, { ...r, ref: t }), c) : null;
|
|
689
|
-
});
|
|
690
|
-
kt.displayName = Ir;
|
|
691
|
-
var Ar = "VisuallyHidden", Bt = s.forwardRef(
|
|
692
|
-
(e, t) => /* @__PURE__ */ v(
|
|
693
|
-
O.span,
|
|
20
|
+
ke.displayName = Ot;
|
|
21
|
+
var ze = Object.freeze({
|
|
22
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
23
|
+
position: "absolute",
|
|
24
|
+
border: 0,
|
|
25
|
+
width: 1,
|
|
26
|
+
height: 1,
|
|
27
|
+
padding: 0,
|
|
28
|
+
margin: -1,
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
clip: "rect(0, 0, 0, 0)",
|
|
31
|
+
whiteSpace: "nowrap",
|
|
32
|
+
wordWrap: "normal"
|
|
33
|
+
}), Mt = "VisuallyHidden", At = l.forwardRef(
|
|
34
|
+
(t, o) => /* @__PURE__ */ i(
|
|
35
|
+
N.span,
|
|
694
36
|
{
|
|
695
|
-
...
|
|
696
|
-
ref:
|
|
697
|
-
style: {
|
|
698
|
-
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
699
|
-
position: "absolute",
|
|
700
|
-
border: 0,
|
|
701
|
-
width: 1,
|
|
702
|
-
height: 1,
|
|
703
|
-
padding: 0,
|
|
704
|
-
margin: -1,
|
|
705
|
-
overflow: "hidden",
|
|
706
|
-
clip: "rect(0, 0, 0, 0)",
|
|
707
|
-
whiteSpace: "nowrap",
|
|
708
|
-
wordWrap: "normal",
|
|
709
|
-
...e.style
|
|
710
|
-
}
|
|
37
|
+
...t,
|
|
38
|
+
ref: o,
|
|
39
|
+
style: { ...ze, ...t.style }
|
|
711
40
|
}
|
|
712
41
|
)
|
|
713
42
|
);
|
|
714
|
-
|
|
715
|
-
var
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
onWheelCapture: Fe,
|
|
720
|
-
onTouchMoveCapture: Fe
|
|
721
|
-
}), a = r[0], i = r[1], c = e.forwardProps, o = e.children, u = e.className, d = e.removeScrollBar, g = e.enabled, S = e.shards, w = e.sideCar, y = e.noIsolation, f = e.inert, l = e.allowPinchZoom, h = e.as, p = h === void 0 ? "div" : h, m = e.gapMode, C = ht(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = w, E = zn([n, t]), A = ce(ce({}, C), a);
|
|
722
|
-
return s.createElement(
|
|
723
|
-
s.Fragment,
|
|
724
|
-
null,
|
|
725
|
-
g && s.createElement(x, { sideCar: Ft, removeScrollBar: d, shards: S, noIsolation: y, inert: f, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: m }),
|
|
726
|
-
c ? s.cloneElement(s.Children.only(o), ce(ce({}, A), { ref: E })) : s.createElement(p, ce({}, A, { className: u, ref: E }), o)
|
|
727
|
-
);
|
|
728
|
-
});
|
|
729
|
-
Ne.defaultProps = {
|
|
730
|
-
enabled: !0,
|
|
731
|
-
removeScrollBar: !0,
|
|
732
|
-
inert: !1
|
|
733
|
-
};
|
|
734
|
-
Ne.classNames = {
|
|
735
|
-
fullWidth: Re,
|
|
736
|
-
zeroRight: Pe
|
|
737
|
-
};
|
|
738
|
-
function Lr() {
|
|
739
|
-
if (!document)
|
|
740
|
-
return null;
|
|
741
|
-
var e = document.createElement("style");
|
|
742
|
-
e.type = "text/css";
|
|
743
|
-
var t = Dn();
|
|
744
|
-
return t && e.setAttribute("nonce", t), e;
|
|
745
|
-
}
|
|
746
|
-
function Dr(e, t) {
|
|
747
|
-
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
748
|
-
}
|
|
749
|
-
function kr(e) {
|
|
750
|
-
var t = document.head || document.getElementsByTagName("head")[0];
|
|
751
|
-
t.appendChild(e);
|
|
752
|
-
}
|
|
753
|
-
var Br = function() {
|
|
754
|
-
var e = 0, t = null;
|
|
755
|
-
return {
|
|
756
|
-
add: function(n) {
|
|
757
|
-
e == 0 && (t = Lr()) && (Dr(t, n), kr(t)), e++;
|
|
758
|
-
},
|
|
759
|
-
remove: function() {
|
|
760
|
-
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
761
|
-
}
|
|
762
|
-
};
|
|
763
|
-
}, Fr = function() {
|
|
764
|
-
var e = Br();
|
|
765
|
-
return function(t, n) {
|
|
766
|
-
s.useEffect(function() {
|
|
767
|
-
return e.add(t), function() {
|
|
768
|
-
e.remove();
|
|
769
|
-
};
|
|
770
|
-
}, [t && n]);
|
|
771
|
-
};
|
|
772
|
-
}, Wt = function() {
|
|
773
|
-
var e = Fr(), t = function(n) {
|
|
774
|
-
var r = n.styles, a = n.dynamic;
|
|
775
|
-
return e(r, a), null;
|
|
776
|
-
};
|
|
777
|
-
return t;
|
|
778
|
-
}, Wr = {
|
|
779
|
-
left: 0,
|
|
780
|
-
top: 0,
|
|
781
|
-
right: 0,
|
|
782
|
-
gap: 0
|
|
783
|
-
}, We = function(e) {
|
|
784
|
-
return parseInt(e || "", 10) || 0;
|
|
785
|
-
}, zr = function(e) {
|
|
786
|
-
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
787
|
-
return [We(n), We(r), We(a)];
|
|
788
|
-
}, Vr = function(e) {
|
|
789
|
-
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
790
|
-
return Wr;
|
|
791
|
-
var t = zr(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
792
|
-
return {
|
|
793
|
-
left: t[0],
|
|
794
|
-
top: t[1],
|
|
795
|
-
right: t[2],
|
|
796
|
-
gap: Math.max(0, r - n + t[2] - t[0])
|
|
797
|
-
};
|
|
798
|
-
}, Hr = Wt(), fe = "data-scroll-locked", $r = function(e, t, n, r) {
|
|
799
|
-
var a = e.left, i = e.top, c = e.right, o = e.gap;
|
|
800
|
-
return n === void 0 && (n = "margin"), `
|
|
801
|
-
.`.concat(Or, ` {
|
|
802
|
-
overflow: hidden `).concat(r, `;
|
|
803
|
-
padding-right: `).concat(o, "px ").concat(r, `;
|
|
804
|
-
}
|
|
805
|
-
body[`).concat(fe, `] {
|
|
806
|
-
overflow: hidden `).concat(r, `;
|
|
807
|
-
overscroll-behavior: contain;
|
|
808
|
-
`).concat([
|
|
809
|
-
t && "position: relative ".concat(r, ";"),
|
|
810
|
-
n === "margin" && `
|
|
811
|
-
padding-left: `.concat(a, `px;
|
|
812
|
-
padding-top: `).concat(i, `px;
|
|
813
|
-
padding-right: `).concat(c, `px;
|
|
814
|
-
margin-left:0;
|
|
815
|
-
margin-top:0;
|
|
816
|
-
margin-right: `).concat(o, "px ").concat(r, `;
|
|
817
|
-
`),
|
|
818
|
-
n === "padding" && "padding-right: ".concat(o, "px ").concat(r, ";")
|
|
819
|
-
].filter(Boolean).join(""), `
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
.`).concat(Pe, ` {
|
|
823
|
-
right: `).concat(o, "px ").concat(r, `;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
.`).concat(Re, ` {
|
|
827
|
-
margin-right: `).concat(o, "px ").concat(r, `;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
.`).concat(Pe, " .").concat(Pe, ` {
|
|
831
|
-
right: 0 `).concat(r, `;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
.`).concat(Re, " .").concat(Re, ` {
|
|
835
|
-
margin-right: 0 `).concat(r, `;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
body[`).concat(fe, `] {
|
|
839
|
-
`).concat(Mr, ": ").concat(o, `px;
|
|
840
|
-
}
|
|
841
|
-
`);
|
|
842
|
-
}, it = function() {
|
|
843
|
-
var e = parseInt(document.body.getAttribute(fe) || "0", 10);
|
|
844
|
-
return isFinite(e) ? e : 0;
|
|
845
|
-
}, Ur = function() {
|
|
846
|
-
s.useEffect(function() {
|
|
847
|
-
return document.body.setAttribute(fe, (it() + 1).toString()), function() {
|
|
848
|
-
var e = it() - 1;
|
|
849
|
-
e <= 0 ? document.body.removeAttribute(fe) : document.body.setAttribute(fe, e.toString());
|
|
850
|
-
};
|
|
851
|
-
}, []);
|
|
852
|
-
}, Kr = function(e) {
|
|
853
|
-
var t = e.noRelative, n = e.noImportant, r = e.gapMode, a = r === void 0 ? "margin" : r;
|
|
854
|
-
Ur();
|
|
855
|
-
var i = s.useMemo(function() {
|
|
856
|
-
return Vr(a);
|
|
857
|
-
}, [a]);
|
|
858
|
-
return s.createElement(Hr, { styles: $r(i, !t, a, n ? "" : "!important") });
|
|
859
|
-
}, He = !1;
|
|
860
|
-
if (typeof window < "u")
|
|
861
|
-
try {
|
|
862
|
-
var _e = Object.defineProperty({}, "passive", {
|
|
863
|
-
get: function() {
|
|
864
|
-
return He = !0, !0;
|
|
865
|
-
}
|
|
866
|
-
});
|
|
867
|
-
window.addEventListener("test", _e, _e), window.removeEventListener("test", _e, _e);
|
|
868
|
-
} catch {
|
|
869
|
-
He = !1;
|
|
870
|
-
}
|
|
871
|
-
var ue = He ? { passive: !1 } : !1, Yr = function(e) {
|
|
872
|
-
return e.tagName === "TEXTAREA";
|
|
873
|
-
}, zt = function(e, t) {
|
|
874
|
-
var n = window.getComputedStyle(e);
|
|
875
|
-
return (
|
|
876
|
-
// not-not-scrollable
|
|
877
|
-
n[t] !== "hidden" && // contains scroll inside self
|
|
878
|
-
!(n.overflowY === n.overflowX && !Yr(e) && n[t] === "visible")
|
|
879
|
-
);
|
|
880
|
-
}, jr = function(e) {
|
|
881
|
-
return zt(e, "overflowY");
|
|
882
|
-
}, Xr = function(e) {
|
|
883
|
-
return zt(e, "overflowX");
|
|
884
|
-
}, lt = function(e, t) {
|
|
885
|
-
var n = t.ownerDocument, r = t;
|
|
886
|
-
do {
|
|
887
|
-
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
888
|
-
var a = Vt(e, r);
|
|
889
|
-
if (a) {
|
|
890
|
-
var i = Ht(e, r), c = i[1], o = i[2];
|
|
891
|
-
if (c > o)
|
|
892
|
-
return !0;
|
|
893
|
-
}
|
|
894
|
-
r = r.parentNode;
|
|
895
|
-
} while (r && r !== n.body);
|
|
896
|
-
return !1;
|
|
897
|
-
}, Gr = function(e) {
|
|
898
|
-
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
899
|
-
return [
|
|
900
|
-
t,
|
|
901
|
-
n,
|
|
902
|
-
r
|
|
903
|
-
];
|
|
904
|
-
}, Zr = function(e) {
|
|
905
|
-
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
906
|
-
return [
|
|
907
|
-
t,
|
|
908
|
-
n,
|
|
909
|
-
r
|
|
910
|
-
];
|
|
911
|
-
}, Vt = function(e, t) {
|
|
912
|
-
return e === "v" ? jr(t) : Xr(t);
|
|
913
|
-
}, Ht = function(e, t) {
|
|
914
|
-
return e === "v" ? Gr(t) : Zr(t);
|
|
915
|
-
}, qr = function(e, t) {
|
|
916
|
-
return e === "h" && t === "rtl" ? -1 : 1;
|
|
917
|
-
}, Qr = function(e, t, n, r, a) {
|
|
918
|
-
var i = qr(e, window.getComputedStyle(t).direction), c = i * r, o = n.target, u = t.contains(o), d = !1, g = c > 0, S = 0, w = 0;
|
|
919
|
-
do {
|
|
920
|
-
var y = Ht(e, o), f = y[0], l = y[1], h = y[2], p = l - h - i * f;
|
|
921
|
-
(f || p) && Vt(e, o) && (S += p, w += f), o instanceof ShadowRoot ? o = o.host : o = o.parentNode;
|
|
922
|
-
} while (
|
|
923
|
-
// portaled content
|
|
924
|
-
!u && o !== document.body || // self content
|
|
925
|
-
u && (t.contains(o) || t === o)
|
|
926
|
-
);
|
|
927
|
-
return (g && (Math.abs(S) < 1 || !a) || !g && (Math.abs(w) < 1 || !a)) && (d = !0), d;
|
|
928
|
-
}, Ee = function(e) {
|
|
929
|
-
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
930
|
-
}, ut = function(e) {
|
|
931
|
-
return [e.deltaX, e.deltaY];
|
|
932
|
-
}, dt = function(e) {
|
|
933
|
-
return e && "current" in e ? e.current : e;
|
|
934
|
-
}, Jr = function(e, t) {
|
|
935
|
-
return e[0] === t[0] && e[1] === t[1];
|
|
936
|
-
}, eo = function(e) {
|
|
937
|
-
return `
|
|
938
|
-
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
939
|
-
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
940
|
-
`);
|
|
941
|
-
}, to = 0, de = [];
|
|
942
|
-
function no(e) {
|
|
943
|
-
var t = s.useRef([]), n = s.useRef([0, 0]), r = s.useRef(), a = s.useState(to++)[0], i = s.useState(Wt)[0], c = s.useRef(e);
|
|
944
|
-
s.useEffect(function() {
|
|
945
|
-
c.current = e;
|
|
946
|
-
}, [e]), s.useEffect(function() {
|
|
947
|
-
if (e.inert) {
|
|
948
|
-
document.body.classList.add("block-interactivity-".concat(a));
|
|
949
|
-
var l = Fn([e.lockRef.current], (e.shards || []).map(dt), !0).filter(Boolean);
|
|
950
|
-
return l.forEach(function(h) {
|
|
951
|
-
return h.classList.add("allow-interactivity-".concat(a));
|
|
952
|
-
}), function() {
|
|
953
|
-
document.body.classList.remove("block-interactivity-".concat(a)), l.forEach(function(h) {
|
|
954
|
-
return h.classList.remove("allow-interactivity-".concat(a));
|
|
955
|
-
});
|
|
956
|
-
};
|
|
957
|
-
}
|
|
958
|
-
}, [e.inert, e.lockRef.current, e.shards]);
|
|
959
|
-
var o = s.useCallback(function(l, h) {
|
|
960
|
-
if ("touches" in l && l.touches.length === 2)
|
|
961
|
-
return !c.current.allowPinchZoom;
|
|
962
|
-
var p = Ee(l), m = n.current, C = "deltaX" in l ? l.deltaX : m[0] - p[0], x = "deltaY" in l ? l.deltaY : m[1] - p[1], E, A = l.target, _ = Math.abs(C) > Math.abs(x) ? "h" : "v";
|
|
963
|
-
if ("touches" in l && _ === "h" && A.type === "range")
|
|
964
|
-
return !1;
|
|
965
|
-
var N = lt(_, A);
|
|
966
|
-
if (!N)
|
|
967
|
-
return !0;
|
|
968
|
-
if (N ? E = _ : (E = _ === "v" ? "h" : "v", N = lt(_, A)), !N)
|
|
969
|
-
return !1;
|
|
970
|
-
if (!r.current && "changedTouches" in l && (C || x) && (r.current = E), !E)
|
|
971
|
-
return !0;
|
|
972
|
-
var k = r.current || E;
|
|
973
|
-
return Qr(k, h, l, k === "h" ? C : x, !0);
|
|
974
|
-
}, []), u = s.useCallback(function(l) {
|
|
975
|
-
var h = l;
|
|
976
|
-
if (!(!de.length || de[de.length - 1] !== i)) {
|
|
977
|
-
var p = "deltaY" in h ? ut(h) : Ee(h), m = t.current.filter(function(E) {
|
|
978
|
-
return E.name === h.type && (E.target === h.target || h.target === E.shadowParent) && Jr(E.delta, p);
|
|
979
|
-
})[0];
|
|
980
|
-
if (m && m.should) {
|
|
981
|
-
h.cancelable && h.preventDefault();
|
|
982
|
-
return;
|
|
983
|
-
}
|
|
984
|
-
if (!m) {
|
|
985
|
-
var C = (c.current.shards || []).map(dt).filter(Boolean).filter(function(E) {
|
|
986
|
-
return E.contains(h.target);
|
|
987
|
-
}), x = C.length > 0 ? o(h, C[0]) : !c.current.noIsolation;
|
|
988
|
-
x && h.cancelable && h.preventDefault();
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
}, []), d = s.useCallback(function(l, h, p, m) {
|
|
992
|
-
var C = { name: l, delta: h, target: p, should: m, shadowParent: ro(p) };
|
|
993
|
-
t.current.push(C), setTimeout(function() {
|
|
994
|
-
t.current = t.current.filter(function(x) {
|
|
995
|
-
return x !== C;
|
|
996
|
-
});
|
|
997
|
-
}, 1);
|
|
998
|
-
}, []), g = s.useCallback(function(l) {
|
|
999
|
-
n.current = Ee(l), r.current = void 0;
|
|
1000
|
-
}, []), S = s.useCallback(function(l) {
|
|
1001
|
-
d(l.type, ut(l), l.target, o(l, e.lockRef.current));
|
|
1002
|
-
}, []), w = s.useCallback(function(l) {
|
|
1003
|
-
d(l.type, Ee(l), l.target, o(l, e.lockRef.current));
|
|
1004
|
-
}, []);
|
|
1005
|
-
s.useEffect(function() {
|
|
1006
|
-
return de.push(i), e.setCallbacks({
|
|
1007
|
-
onScrollCapture: S,
|
|
1008
|
-
onWheelCapture: S,
|
|
1009
|
-
onTouchMoveCapture: w
|
|
1010
|
-
}), document.addEventListener("wheel", u, ue), document.addEventListener("touchmove", u, ue), document.addEventListener("touchstart", g, ue), function() {
|
|
1011
|
-
de = de.filter(function(l) {
|
|
1012
|
-
return l !== i;
|
|
1013
|
-
}), document.removeEventListener("wheel", u, ue), document.removeEventListener("touchmove", u, ue), document.removeEventListener("touchstart", g, ue);
|
|
1014
|
-
};
|
|
1015
|
-
}, []);
|
|
1016
|
-
var y = e.removeScrollBar, f = e.inert;
|
|
1017
|
-
return s.createElement(
|
|
1018
|
-
s.Fragment,
|
|
1019
|
-
null,
|
|
1020
|
-
f ? s.createElement(i, { styles: eo(a) }) : null,
|
|
1021
|
-
y ? s.createElement(Kr, { gapMode: e.gapMode }) : null
|
|
1022
|
-
);
|
|
1023
|
-
}
|
|
1024
|
-
function ro(e) {
|
|
1025
|
-
for (var t = null; e !== null; )
|
|
1026
|
-
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1027
|
-
return t;
|
|
1028
|
-
}
|
|
1029
|
-
const oo = $n(Ft, no);
|
|
1030
|
-
var $t = s.forwardRef(function(e, t) {
|
|
1031
|
-
return s.createElement(Ne, ce({}, e, { ref: t, sideCar: oo }));
|
|
1032
|
-
});
|
|
1033
|
-
$t.classNames = Ne.classNames;
|
|
1034
|
-
var ao = [" ", "Enter", "ArrowUp", "ArrowDown"], so = [" ", "Enter"], be = "Select", [Ie, Ae, co] = jn(be), [me, ua] = gt(be, [
|
|
1035
|
-
co,
|
|
1036
|
-
Rt
|
|
1037
|
-
]), Oe = Rt(), [io, oe] = me(be), [lo, uo] = me(be), Ut = (e) => {
|
|
43
|
+
At.displayName = Mt;
|
|
44
|
+
var Dt = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = [" ", "Enter"], oe = "Select", [pe, fe, kt] = vt(oe), [le, Bo] = mt(oe, [
|
|
45
|
+
kt,
|
|
46
|
+
Le
|
|
47
|
+
]), me = Le(), [zt, Z] = le(oe), [Bt, Vt] = le(oe), Be = (t) => {
|
|
1038
48
|
const {
|
|
1039
|
-
__scopeSelect:
|
|
1040
|
-
children:
|
|
49
|
+
__scopeSelect: o,
|
|
50
|
+
children: e,
|
|
1041
51
|
open: r,
|
|
1042
|
-
defaultOpen:
|
|
1043
|
-
onOpenChange:
|
|
52
|
+
defaultOpen: n,
|
|
53
|
+
onOpenChange: d,
|
|
1044
54
|
value: c,
|
|
1045
|
-
defaultValue:
|
|
1046
|
-
onValueChange:
|
|
1047
|
-
dir:
|
|
1048
|
-
name:
|
|
1049
|
-
autoComplete:
|
|
1050
|
-
disabled:
|
|
1051
|
-
required:
|
|
1052
|
-
|
|
55
|
+
defaultValue: a,
|
|
56
|
+
onValueChange: s,
|
|
57
|
+
dir: p,
|
|
58
|
+
name: v,
|
|
59
|
+
autoComplete: _,
|
|
60
|
+
disabled: T,
|
|
61
|
+
required: b,
|
|
62
|
+
form: S
|
|
63
|
+
} = t, u = me(o), [g, y] = l.useState(null), [f, h] = l.useState(null), [M, A] = l.useState(!1), se = gt(p), [R, k] = Oe({
|
|
1053
64
|
prop: r,
|
|
1054
|
-
defaultProp:
|
|
1055
|
-
onChange:
|
|
1056
|
-
|
|
65
|
+
defaultProp: n ?? !1,
|
|
66
|
+
onChange: d,
|
|
67
|
+
caller: oe
|
|
68
|
+
}), [j, Q] = Oe({
|
|
1057
69
|
prop: c,
|
|
1058
|
-
defaultProp:
|
|
1059
|
-
onChange:
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
70
|
+
defaultProp: a,
|
|
71
|
+
onChange: s,
|
|
72
|
+
caller: oe
|
|
73
|
+
}), V = l.useRef(null), H = g ? S || !!g.closest("form") : !0, [G, W] = l.useState(/* @__PURE__ */ new Set()), F = Array.from(G).map((E) => E.props.value).join(";");
|
|
74
|
+
return /* @__PURE__ */ i(_t, { ...u, children: /* @__PURE__ */ $(
|
|
75
|
+
zt,
|
|
1063
76
|
{
|
|
1064
|
-
required:
|
|
1065
|
-
scope:
|
|
1066
|
-
trigger:
|
|
1067
|
-
onTriggerChange:
|
|
1068
|
-
valueNode:
|
|
1069
|
-
onValueNodeChange:
|
|
1070
|
-
valueNodeHasChildren:
|
|
1071
|
-
onValueNodeHasChildrenChange:
|
|
1072
|
-
contentId:
|
|
1073
|
-
value:
|
|
1074
|
-
onValueChange:
|
|
1075
|
-
open:
|
|
1076
|
-
onOpenChange:
|
|
1077
|
-
dir:
|
|
1078
|
-
triggerPointerDownPosRef:
|
|
1079
|
-
disabled:
|
|
77
|
+
required: b,
|
|
78
|
+
scope: o,
|
|
79
|
+
trigger: g,
|
|
80
|
+
onTriggerChange: y,
|
|
81
|
+
valueNode: f,
|
|
82
|
+
onValueNodeChange: h,
|
|
83
|
+
valueNodeHasChildren: M,
|
|
84
|
+
onValueNodeHasChildrenChange: A,
|
|
85
|
+
contentId: Ne(),
|
|
86
|
+
value: j,
|
|
87
|
+
onValueChange: Q,
|
|
88
|
+
open: R,
|
|
89
|
+
onOpenChange: k,
|
|
90
|
+
dir: se,
|
|
91
|
+
triggerPointerDownPosRef: V,
|
|
92
|
+
disabled: T,
|
|
1080
93
|
children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
|
|
94
|
+
/* @__PURE__ */ i(pe.Provider, { scope: o, children: /* @__PURE__ */ i(
|
|
95
|
+
Bt,
|
|
1083
96
|
{
|
|
1084
|
-
scope:
|
|
1085
|
-
onNativeOptionAdd:
|
|
1086
|
-
W((
|
|
97
|
+
scope: t.__scopeSelect,
|
|
98
|
+
onNativeOptionAdd: l.useCallback((E) => {
|
|
99
|
+
W((z) => new Set(z).add(E));
|
|
1087
100
|
}, []),
|
|
1088
|
-
onNativeOptionRemove:
|
|
1089
|
-
W((
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
101
|
+
onNativeOptionRemove: l.useCallback((E) => {
|
|
102
|
+
W((z) => {
|
|
103
|
+
const U = new Set(z);
|
|
104
|
+
return U.delete(E), U;
|
|
1092
105
|
});
|
|
1093
106
|
}, []),
|
|
1094
|
-
children:
|
|
107
|
+
children: e
|
|
1095
108
|
}
|
|
1096
109
|
) }),
|
|
1097
|
-
|
|
1098
|
-
|
|
110
|
+
H ? /* @__PURE__ */ $(
|
|
111
|
+
st,
|
|
1099
112
|
{
|
|
1100
113
|
"aria-hidden": !0,
|
|
1101
|
-
required:
|
|
114
|
+
required: b,
|
|
1102
115
|
tabIndex: -1,
|
|
1103
|
-
name:
|
|
1104
|
-
autoComplete:
|
|
1105
|
-
value:
|
|
1106
|
-
onChange: (
|
|
1107
|
-
disabled:
|
|
116
|
+
name: v,
|
|
117
|
+
autoComplete: _,
|
|
118
|
+
value: j,
|
|
119
|
+
onChange: (E) => Q(E.target.value),
|
|
120
|
+
disabled: T,
|
|
121
|
+
form: S,
|
|
1108
122
|
children: [
|
|
1109
|
-
|
|
1110
|
-
Array.from(
|
|
123
|
+
j === void 0 ? /* @__PURE__ */ i("option", { value: "" }) : null,
|
|
124
|
+
Array.from(G)
|
|
1111
125
|
]
|
|
1112
126
|
},
|
|
1113
|
-
|
|
127
|
+
F
|
|
1114
128
|
) : null
|
|
1115
129
|
]
|
|
1116
130
|
}
|
|
1117
131
|
) });
|
|
1118
132
|
};
|
|
1119
|
-
|
|
1120
|
-
var
|
|
1121
|
-
(
|
|
1122
|
-
const { __scopeSelect:
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1125
|
-
}),
|
|
1126
|
-
|
|
133
|
+
Be.displayName = oe;
|
|
134
|
+
var Ve = "SelectTrigger", He = l.forwardRef(
|
|
135
|
+
(t, o) => {
|
|
136
|
+
const { __scopeSelect: e, disabled: r = !1, ...n } = t, d = me(e), c = Z(Ve, e), a = c.disabled || r, s = B(o, c.onTriggerChange), p = fe(e), v = l.useRef("touch"), [_, T, b] = at((u) => {
|
|
137
|
+
const g = p().filter((h) => !h.disabled), y = g.find((h) => h.value === c.value), f = it(g, u, y);
|
|
138
|
+
f !== void 0 && c.onValueChange(f.value);
|
|
139
|
+
}), S = (u) => {
|
|
140
|
+
a || (c.onOpenChange(!0), b()), u && (c.triggerPointerDownPosRef.current = {
|
|
141
|
+
x: Math.round(u.pageX),
|
|
142
|
+
y: Math.round(u.pageY)
|
|
143
|
+
});
|
|
1127
144
|
};
|
|
1128
|
-
return /* @__PURE__ */
|
|
1129
|
-
|
|
145
|
+
return /* @__PURE__ */ i(St, { asChild: !0, ...d, children: /* @__PURE__ */ i(
|
|
146
|
+
N.button,
|
|
1130
147
|
{
|
|
1131
148
|
type: "button",
|
|
1132
149
|
role: "combobox",
|
|
@@ -1136,230 +153,228 @@ var Kt = "SelectTrigger", Yt = s.forwardRef(
|
|
|
1136
153
|
"aria-autocomplete": "none",
|
|
1137
154
|
dir: c.dir,
|
|
1138
155
|
"data-state": c.open ? "open" : "closed",
|
|
1139
|
-
disabled:
|
|
1140
|
-
"data-disabled":
|
|
1141
|
-
"data-placeholder":
|
|
1142
|
-
...
|
|
1143
|
-
ref:
|
|
1144
|
-
onClick:
|
|
1145
|
-
|
|
156
|
+
disabled: a,
|
|
157
|
+
"data-disabled": a ? "" : void 0,
|
|
158
|
+
"data-placeholder": ct(c.value) ? "" : void 0,
|
|
159
|
+
...n,
|
|
160
|
+
ref: s,
|
|
161
|
+
onClick: P(n.onClick, (u) => {
|
|
162
|
+
u.currentTarget.focus(), v.current !== "mouse" && S(u);
|
|
1146
163
|
}),
|
|
1147
|
-
onPointerDown:
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
y: Math.round(f.pageY)
|
|
1152
|
-
}, f.preventDefault());
|
|
164
|
+
onPointerDown: P(n.onPointerDown, (u) => {
|
|
165
|
+
v.current = u.pointerType;
|
|
166
|
+
const g = u.target;
|
|
167
|
+
g.hasPointerCapture(u.pointerId) && g.releasePointerCapture(u.pointerId), u.button === 0 && u.ctrlKey === !1 && u.pointerType === "mouse" && (S(u), u.preventDefault());
|
|
1153
168
|
}),
|
|
1154
|
-
onKeyDown:
|
|
1155
|
-
const
|
|
1156
|
-
!(
|
|
169
|
+
onKeyDown: P(n.onKeyDown, (u) => {
|
|
170
|
+
const g = _.current !== "";
|
|
171
|
+
!(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 && T(u.key), !(g && u.key === " ") && Dt.includes(u.key) && (S(), u.preventDefault());
|
|
1157
172
|
})
|
|
1158
173
|
}
|
|
1159
174
|
) });
|
|
1160
175
|
}
|
|
1161
176
|
);
|
|
1162
|
-
|
|
1163
|
-
var
|
|
1164
|
-
(
|
|
1165
|
-
const { __scopeSelect:
|
|
1166
|
-
return
|
|
1167
|
-
|
|
1168
|
-
}, [
|
|
1169
|
-
|
|
177
|
+
He.displayName = Ve;
|
|
178
|
+
var We = "SelectValue", Fe = l.forwardRef(
|
|
179
|
+
(t, o) => {
|
|
180
|
+
const { __scopeSelect: e, className: r, style: n, children: d, placeholder: c = "", ...a } = t, s = Z(We, e), { onValueNodeHasChildrenChange: p } = s, v = d !== void 0, _ = B(o, s.onValueNodeChange);
|
|
181
|
+
return K(() => {
|
|
182
|
+
p(v);
|
|
183
|
+
}, [p, v]), /* @__PURE__ */ i(
|
|
184
|
+
N.span,
|
|
1170
185
|
{
|
|
1171
|
-
...
|
|
1172
|
-
ref:
|
|
186
|
+
...a,
|
|
187
|
+
ref: _,
|
|
1173
188
|
style: { pointerEvents: "none" },
|
|
1174
|
-
children:
|
|
189
|
+
children: ct(s.value) ? /* @__PURE__ */ i(Pe, { children: c }) : d
|
|
1175
190
|
}
|
|
1176
191
|
);
|
|
1177
192
|
}
|
|
1178
193
|
);
|
|
1179
|
-
|
|
1180
|
-
var
|
|
1181
|
-
(
|
|
1182
|
-
const { __scopeSelect:
|
|
1183
|
-
return /* @__PURE__ */
|
|
194
|
+
Fe.displayName = We;
|
|
195
|
+
var Ht = "SelectIcon", Ue = l.forwardRef(
|
|
196
|
+
(t, o) => {
|
|
197
|
+
const { __scopeSelect: e, children: r, ...n } = t;
|
|
198
|
+
return /* @__PURE__ */ i(N.span, { "aria-hidden": !0, ...n, ref: o, children: r || "▼" });
|
|
1184
199
|
}
|
|
1185
200
|
);
|
|
1186
|
-
|
|
1187
|
-
var
|
|
1188
|
-
|
|
1189
|
-
var
|
|
1190
|
-
(
|
|
1191
|
-
const
|
|
1192
|
-
if (
|
|
1193
|
-
|
|
1194
|
-
}, []), !
|
|
1195
|
-
const
|
|
1196
|
-
return
|
|
1197
|
-
/* @__PURE__ */
|
|
1198
|
-
|
|
201
|
+
Ue.displayName = Ht;
|
|
202
|
+
var Wt = "SelectPortal", Ke = (t) => /* @__PURE__ */ i(ke, { asChild: !0, ...t });
|
|
203
|
+
Ke.displayName = Wt;
|
|
204
|
+
var ne = "SelectContent", je = l.forwardRef(
|
|
205
|
+
(t, o) => {
|
|
206
|
+
const e = Z(ne, t.__scopeSelect), [r, n] = l.useState();
|
|
207
|
+
if (K(() => {
|
|
208
|
+
n(new DocumentFragment());
|
|
209
|
+
}, []), !e.open) {
|
|
210
|
+
const d = r;
|
|
211
|
+
return d ? De.createPortal(
|
|
212
|
+
/* @__PURE__ */ i(Ge, { scope: t.__scopeSelect, children: /* @__PURE__ */ i(pe.Slot, { scope: t.__scopeSelect, children: /* @__PURE__ */ i("div", { children: t.children }) }) }),
|
|
213
|
+
d
|
|
1199
214
|
) : null;
|
|
1200
215
|
}
|
|
1201
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ i(Ye, { ...t, ref: o });
|
|
1202
217
|
}
|
|
1203
218
|
);
|
|
1204
|
-
|
|
1205
|
-
var
|
|
1206
|
-
(
|
|
219
|
+
je.displayName = ne;
|
|
220
|
+
var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.RemoveScroll"), Ye = l.forwardRef(
|
|
221
|
+
(t, o) => {
|
|
1207
222
|
const {
|
|
1208
|
-
__scopeSelect:
|
|
223
|
+
__scopeSelect: e,
|
|
1209
224
|
position: r = "item-aligned",
|
|
1210
|
-
onCloseAutoFocus:
|
|
1211
|
-
onEscapeKeyDown:
|
|
225
|
+
onCloseAutoFocus: n,
|
|
226
|
+
onEscapeKeyDown: d,
|
|
1212
227
|
onPointerDownOutside: c,
|
|
1213
228
|
//
|
|
1214
229
|
// PopperContent props
|
|
1215
|
-
side:
|
|
1216
|
-
sideOffset:
|
|
1217
|
-
align:
|
|
1218
|
-
alignOffset:
|
|
1219
|
-
arrowPadding:
|
|
1220
|
-
collisionBoundary:
|
|
1221
|
-
collisionPadding:
|
|
1222
|
-
sticky:
|
|
1223
|
-
hideWhenDetached:
|
|
1224
|
-
avoidCollisions:
|
|
230
|
+
side: a,
|
|
231
|
+
sideOffset: s,
|
|
232
|
+
align: p,
|
|
233
|
+
alignOffset: v,
|
|
234
|
+
arrowPadding: _,
|
|
235
|
+
collisionBoundary: T,
|
|
236
|
+
collisionPadding: b,
|
|
237
|
+
sticky: S,
|
|
238
|
+
hideWhenDetached: u,
|
|
239
|
+
avoidCollisions: g,
|
|
1225
240
|
//
|
|
1226
|
-
...
|
|
1227
|
-
} =
|
|
241
|
+
...y
|
|
242
|
+
} = t, f = Z(ne, e), [h, M] = l.useState(null), [A, se] = l.useState(null), R = B(o, (m) => M(m)), [k, j] = l.useState(null), [Q, V] = l.useState(
|
|
1228
243
|
null
|
|
1229
|
-
),
|
|
1230
|
-
|
|
1231
|
-
if (
|
|
1232
|
-
}, [
|
|
1233
|
-
const
|
|
1234
|
-
(
|
|
1235
|
-
const [I, ...
|
|
1236
|
-
for (const
|
|
1237
|
-
if (
|
|
244
|
+
), H = fe(e), [G, W] = l.useState(!1), F = l.useRef(!1);
|
|
245
|
+
l.useEffect(() => {
|
|
246
|
+
if (h) return xt(h);
|
|
247
|
+
}, [h]), yt();
|
|
248
|
+
const E = l.useCallback(
|
|
249
|
+
(m) => {
|
|
250
|
+
const [I, ...O] = H().map((x) => x.ref.current), [C] = O.slice(-1), w = document.activeElement;
|
|
251
|
+
for (const x of m)
|
|
252
|
+
if (x === w || (x == null || x.scrollIntoView({ block: "nearest" }), x === I && A && (A.scrollTop = 0), x === C && A && (A.scrollTop = A.scrollHeight), x == null || x.focus(), document.activeElement !== w)) return;
|
|
1238
253
|
},
|
|
1239
|
-
[
|
|
1240
|
-
),
|
|
1241
|
-
() =>
|
|
1242
|
-
[
|
|
254
|
+
[H, A]
|
|
255
|
+
), z = l.useCallback(
|
|
256
|
+
() => E([k, h]),
|
|
257
|
+
[E, k, h]
|
|
1243
258
|
);
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
}, [
|
|
1247
|
-
const { onOpenChange:
|
|
1248
|
-
|
|
1249
|
-
if (
|
|
1250
|
-
let
|
|
1251
|
-
const I = (
|
|
1252
|
-
var
|
|
1253
|
-
|
|
1254
|
-
x: Math.abs(Math.round(
|
|
1255
|
-
y: Math.abs(Math.round(
|
|
259
|
+
l.useEffect(() => {
|
|
260
|
+
G && z();
|
|
261
|
+
}, [G, z]);
|
|
262
|
+
const { onOpenChange: U, triggerPointerDownPosRef: Y } = f;
|
|
263
|
+
l.useEffect(() => {
|
|
264
|
+
if (h) {
|
|
265
|
+
let m = { x: 0, y: 0 };
|
|
266
|
+
const I = (C) => {
|
|
267
|
+
var w, x;
|
|
268
|
+
m = {
|
|
269
|
+
x: Math.abs(Math.round(C.pageX) - (((w = Y.current) == null ? void 0 : w.x) ?? 0)),
|
|
270
|
+
y: Math.abs(Math.round(C.pageY) - (((x = Y.current) == null ? void 0 : x.y) ?? 0))
|
|
1256
271
|
};
|
|
1257
|
-
},
|
|
1258
|
-
|
|
272
|
+
}, O = (C) => {
|
|
273
|
+
m.x <= 10 && m.y <= 10 ? C.preventDefault() : h.contains(C.target) || U(!1), document.removeEventListener("pointermove", I), Y.current = null;
|
|
1259
274
|
};
|
|
1260
|
-
return Y.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup",
|
|
1261
|
-
document.removeEventListener("pointermove", I), document.removeEventListener("pointerup",
|
|
275
|
+
return Y.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", O, { capture: !0, once: !0 })), () => {
|
|
276
|
+
document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", O, { capture: !0 });
|
|
1262
277
|
};
|
|
1263
278
|
}
|
|
1264
|
-
}, [
|
|
1265
|
-
const
|
|
1266
|
-
return window.addEventListener("blur",
|
|
1267
|
-
window.removeEventListener("blur",
|
|
279
|
+
}, [h, U, Y]), l.useEffect(() => {
|
|
280
|
+
const m = () => U(!1);
|
|
281
|
+
return window.addEventListener("blur", m), window.addEventListener("resize", m), () => {
|
|
282
|
+
window.removeEventListener("blur", m), window.removeEventListener("resize", m);
|
|
1268
283
|
};
|
|
1269
|
-
}, [
|
|
1270
|
-
const [he,
|
|
1271
|
-
const I =
|
|
1272
|
-
|
|
1273
|
-
}),
|
|
1274
|
-
(
|
|
1275
|
-
const
|
|
1276
|
-
(
|
|
284
|
+
}, [U]);
|
|
285
|
+
const [he, ie] = at((m) => {
|
|
286
|
+
const I = H().filter((w) => !w.disabled), O = I.find((w) => w.ref.current === document.activeElement), C = it(I, m, O);
|
|
287
|
+
C && setTimeout(() => C.ref.current.focus());
|
|
288
|
+
}), ge = l.useCallback(
|
|
289
|
+
(m, I, O) => {
|
|
290
|
+
const C = !F.current && !O;
|
|
291
|
+
(f.value !== void 0 && f.value === I || C) && (j(m), C && (F.current = !0));
|
|
1277
292
|
},
|
|
1278
|
-
[
|
|
1279
|
-
),
|
|
1280
|
-
(
|
|
1281
|
-
const
|
|
1282
|
-
(
|
|
293
|
+
[f.value]
|
|
294
|
+
), ve = l.useCallback(() => h == null ? void 0 : h.focus(), [h]), re = l.useCallback(
|
|
295
|
+
(m, I, O) => {
|
|
296
|
+
const C = !F.current && !O;
|
|
297
|
+
(f.value !== void 0 && f.value === I || C) && V(m);
|
|
1283
298
|
},
|
|
1284
|
-
[
|
|
1285
|
-
),
|
|
1286
|
-
side:
|
|
1287
|
-
sideOffset:
|
|
1288
|
-
align:
|
|
1289
|
-
alignOffset:
|
|
1290
|
-
arrowPadding:
|
|
1291
|
-
collisionBoundary:
|
|
1292
|
-
collisionPadding:
|
|
1293
|
-
sticky:
|
|
1294
|
-
hideWhenDetached:
|
|
1295
|
-
avoidCollisions:
|
|
299
|
+
[f.value]
|
|
300
|
+
), de = r === "popper" ? ye : $e, ce = de === ye ? {
|
|
301
|
+
side: a,
|
|
302
|
+
sideOffset: s,
|
|
303
|
+
align: p,
|
|
304
|
+
alignOffset: v,
|
|
305
|
+
arrowPadding: _,
|
|
306
|
+
collisionBoundary: T,
|
|
307
|
+
collisionPadding: b,
|
|
308
|
+
sticky: S,
|
|
309
|
+
hideWhenDetached: u,
|
|
310
|
+
avoidCollisions: g
|
|
1296
311
|
} : {};
|
|
1297
|
-
return /* @__PURE__ */
|
|
1298
|
-
|
|
312
|
+
return /* @__PURE__ */ i(
|
|
313
|
+
Ge,
|
|
1299
314
|
{
|
|
1300
|
-
scope:
|
|
1301
|
-
content:
|
|
1302
|
-
viewport:
|
|
1303
|
-
onViewportChange:
|
|
1304
|
-
itemRefCallback:
|
|
1305
|
-
selectedItem:
|
|
1306
|
-
onItemLeave:
|
|
1307
|
-
itemTextRefCallback:
|
|
1308
|
-
focusSelectedItem:
|
|
1309
|
-
selectedItemText:
|
|
315
|
+
scope: e,
|
|
316
|
+
content: h,
|
|
317
|
+
viewport: A,
|
|
318
|
+
onViewportChange: se,
|
|
319
|
+
itemRefCallback: ge,
|
|
320
|
+
selectedItem: k,
|
|
321
|
+
onItemLeave: ve,
|
|
322
|
+
itemTextRefCallback: re,
|
|
323
|
+
focusSelectedItem: z,
|
|
324
|
+
selectedItemText: Q,
|
|
1310
325
|
position: r,
|
|
1311
|
-
isPositioned:
|
|
326
|
+
isPositioned: G,
|
|
1312
327
|
searchRef: he,
|
|
1313
|
-
children: /* @__PURE__ */
|
|
1314
|
-
|
|
328
|
+
children: /* @__PURE__ */ i(Ct, { as: Ut, allowPinchZoom: !0, children: /* @__PURE__ */ i(
|
|
329
|
+
It,
|
|
1315
330
|
{
|
|
1316
331
|
asChild: !0,
|
|
1317
|
-
trapped:
|
|
1318
|
-
onMountAutoFocus: (
|
|
1319
|
-
|
|
332
|
+
trapped: f.open,
|
|
333
|
+
onMountAutoFocus: (m) => {
|
|
334
|
+
m.preventDefault();
|
|
1320
335
|
},
|
|
1321
|
-
onUnmountAutoFocus:
|
|
336
|
+
onUnmountAutoFocus: P(n, (m) => {
|
|
1322
337
|
var I;
|
|
1323
|
-
(I =
|
|
338
|
+
(I = f.trigger) == null || I.focus({ preventScroll: !0 }), m.preventDefault();
|
|
1324
339
|
}),
|
|
1325
|
-
children: /* @__PURE__ */
|
|
1326
|
-
|
|
340
|
+
children: /* @__PURE__ */ i(
|
|
341
|
+
Tt,
|
|
1327
342
|
{
|
|
1328
343
|
asChild: !0,
|
|
1329
344
|
disableOutsidePointerEvents: !0,
|
|
1330
|
-
onEscapeKeyDown:
|
|
345
|
+
onEscapeKeyDown: d,
|
|
1331
346
|
onPointerDownOutside: c,
|
|
1332
|
-
onFocusOutside: (
|
|
1333
|
-
onDismiss: () =>
|
|
1334
|
-
children: /* @__PURE__ */
|
|
1335
|
-
|
|
347
|
+
onFocusOutside: (m) => m.preventDefault(),
|
|
348
|
+
onDismiss: () => f.onOpenChange(!1),
|
|
349
|
+
children: /* @__PURE__ */ i(
|
|
350
|
+
de,
|
|
1336
351
|
{
|
|
1337
352
|
role: "listbox",
|
|
1338
|
-
id:
|
|
1339
|
-
"data-state":
|
|
1340
|
-
dir:
|
|
1341
|
-
onContextMenu: (
|
|
1342
|
-
...
|
|
1343
|
-
...
|
|
1344
|
-
onPlaced: () =>
|
|
1345
|
-
ref:
|
|
353
|
+
id: f.contentId,
|
|
354
|
+
"data-state": f.open ? "open" : "closed",
|
|
355
|
+
dir: f.dir,
|
|
356
|
+
onContextMenu: (m) => m.preventDefault(),
|
|
357
|
+
...y,
|
|
358
|
+
...ce,
|
|
359
|
+
onPlaced: () => W(!0),
|
|
360
|
+
ref: R,
|
|
1346
361
|
style: {
|
|
1347
362
|
// flex layout so we can place the scroll buttons properly
|
|
1348
363
|
display: "flex",
|
|
1349
364
|
flexDirection: "column",
|
|
1350
365
|
// reset the outline by default as the content MAY get focused
|
|
1351
366
|
outline: "none",
|
|
1352
|
-
...
|
|
367
|
+
...y.style
|
|
1353
368
|
},
|
|
1354
|
-
onKeyDown:
|
|
1355
|
-
const I =
|
|
1356
|
-
if (
|
|
1357
|
-
let
|
|
1358
|
-
if (["ArrowUp", "End"].includes(
|
|
1359
|
-
const
|
|
1360
|
-
|
|
369
|
+
onKeyDown: P(y.onKeyDown, (m) => {
|
|
370
|
+
const I = m.ctrlKey || m.altKey || m.metaKey;
|
|
371
|
+
if (m.key === "Tab" && m.preventDefault(), !I && m.key.length === 1 && ie(m.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(m.key)) {
|
|
372
|
+
let C = H().filter((w) => !w.disabled).map((w) => w.ref.current);
|
|
373
|
+
if (["ArrowUp", "End"].includes(m.key) && (C = C.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(m.key)) {
|
|
374
|
+
const w = m.target, x = C.indexOf(w);
|
|
375
|
+
C = C.slice(x + 1);
|
|
1361
376
|
}
|
|
1362
|
-
setTimeout(() =>
|
|
377
|
+
setTimeout(() => E(C)), m.preventDefault();
|
|
1363
378
|
}
|
|
1364
379
|
})
|
|
1365
380
|
}
|
|
@@ -1372,92 +387,103 @@ var J = 10, [Qt, ae] = me(ie), mo = "SelectContentImpl", Jt = s.forwardRef(
|
|
|
1372
387
|
);
|
|
1373
388
|
}
|
|
1374
389
|
);
|
|
1375
|
-
|
|
1376
|
-
var
|
|
1377
|
-
const { __scopeSelect:
|
|
1378
|
-
if (
|
|
1379
|
-
const
|
|
1380
|
-
if (
|
|
1381
|
-
const
|
|
1382
|
-
|
|
390
|
+
Ye.displayName = Ft;
|
|
391
|
+
var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
|
|
392
|
+
const { __scopeSelect: e, onPlaced: r, ...n } = t, d = Z(ne, e), c = J(ne, e), [a, s] = l.useState(null), [p, v] = l.useState(null), _ = B(o, (R) => v(R)), T = fe(e), b = l.useRef(!1), S = l.useRef(!0), { viewport: u, selectedItem: g, selectedItemText: y, focusSelectedItem: f } = c, h = l.useCallback(() => {
|
|
393
|
+
if (d.trigger && d.valueNode && a && p && u && g && y) {
|
|
394
|
+
const R = d.trigger.getBoundingClientRect(), k = p.getBoundingClientRect(), j = d.valueNode.getBoundingClientRect(), Q = y.getBoundingClientRect();
|
|
395
|
+
if (d.dir !== "rtl") {
|
|
396
|
+
const w = Q.left - k.left, x = j.left - w, ee = R.left - x, te = R.width + ee, _e = Math.max(te, k.width), Se = window.innerWidth - L, we = Ee(x, [
|
|
397
|
+
L,
|
|
398
|
+
// Prevents the content from going off the starting edge of the
|
|
399
|
+
// viewport. It may still go off the ending edge, but this can be
|
|
400
|
+
// controlled by the user since they may want to manage overflow in a
|
|
401
|
+
// specific way.
|
|
402
|
+
// https://github.com/radix-ui/primitives/issues/2049
|
|
403
|
+
Math.max(L, Se - _e)
|
|
404
|
+
]);
|
|
405
|
+
a.style.minWidth = te + "px", a.style.left = we + "px";
|
|
1383
406
|
} else {
|
|
1384
|
-
const
|
|
1385
|
-
|
|
407
|
+
const w = k.right - Q.right, x = window.innerWidth - j.right - w, ee = window.innerWidth - R.right - x, te = R.width + ee, _e = Math.max(te, k.width), Se = window.innerWidth - L, we = Ee(x, [
|
|
408
|
+
L,
|
|
409
|
+
Math.max(L, Se - _e)
|
|
410
|
+
]);
|
|
411
|
+
a.style.minWidth = te + "px", a.style.right = we + "px";
|
|
1386
412
|
}
|
|
1387
|
-
const
|
|
1388
|
-
if (I <=
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
const
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
(
|
|
1395
|
-
),
|
|
1396
|
-
|
|
413
|
+
const V = T(), H = window.innerHeight - L * 2, G = u.scrollHeight, W = window.getComputedStyle(p), F = parseInt(W.borderTopWidth, 10), E = parseInt(W.paddingTop, 10), z = parseInt(W.borderBottomWidth, 10), U = parseInt(W.paddingBottom, 10), Y = F + E + G + U + z, he = Math.min(g.offsetHeight * 5, Y), ie = window.getComputedStyle(u), ge = parseInt(ie.paddingTop, 10), ve = parseInt(ie.paddingBottom, 10), re = R.top + R.height / 2 - L, de = H - re, ce = g.offsetHeight / 2, m = g.offsetTop + ce, I = F + E + m, O = Y - I;
|
|
414
|
+
if (I <= re) {
|
|
415
|
+
const w = V.length > 0 && g === V[V.length - 1].ref.current;
|
|
416
|
+
a.style.bottom = "0px";
|
|
417
|
+
const x = p.clientHeight - u.offsetTop - u.offsetHeight, ee = Math.max(
|
|
418
|
+
de,
|
|
419
|
+
ce + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
420
|
+
(w ? ve : 0) + x + z
|
|
421
|
+
), te = I + ee;
|
|
422
|
+
a.style.height = te + "px";
|
|
1397
423
|
} else {
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
const
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
(
|
|
1404
|
-
) +
|
|
1405
|
-
|
|
424
|
+
const w = V.length > 0 && g === V[0].ref.current;
|
|
425
|
+
a.style.top = "0px";
|
|
426
|
+
const ee = Math.max(
|
|
427
|
+
re,
|
|
428
|
+
F + u.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
429
|
+
(w ? ge : 0) + ce
|
|
430
|
+
) + O;
|
|
431
|
+
a.style.height = ee + "px", u.scrollTop = I - re + u.offsetTop;
|
|
1406
432
|
}
|
|
1407
|
-
|
|
433
|
+
a.style.margin = `${L}px 0`, a.style.minHeight = he + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => b.current = !0);
|
|
1408
434
|
}
|
|
1409
435
|
}, [
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
d,
|
|
1415
|
-
l,
|
|
1416
|
-
h,
|
|
436
|
+
T,
|
|
437
|
+
d.trigger,
|
|
438
|
+
d.valueNode,
|
|
439
|
+
a,
|
|
1417
440
|
p,
|
|
1418
|
-
|
|
441
|
+
u,
|
|
442
|
+
g,
|
|
443
|
+
y,
|
|
444
|
+
d.dir,
|
|
1419
445
|
r
|
|
1420
446
|
]);
|
|
1421
|
-
|
|
1422
|
-
const [
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
}, [
|
|
1426
|
-
const
|
|
1427
|
-
(
|
|
1428
|
-
|
|
447
|
+
K(() => h(), [h]);
|
|
448
|
+
const [M, A] = l.useState();
|
|
449
|
+
K(() => {
|
|
450
|
+
p && A(window.getComputedStyle(p).zIndex);
|
|
451
|
+
}, [p]);
|
|
452
|
+
const se = l.useCallback(
|
|
453
|
+
(R) => {
|
|
454
|
+
R && S.current === !0 && (h(), f == null || f(), S.current = !1);
|
|
1429
455
|
},
|
|
1430
|
-
[
|
|
456
|
+
[h, f]
|
|
1431
457
|
);
|
|
1432
|
-
return /* @__PURE__ */
|
|
1433
|
-
|
|
458
|
+
return /* @__PURE__ */ i(
|
|
459
|
+
Gt,
|
|
1434
460
|
{
|
|
1435
|
-
scope:
|
|
1436
|
-
contentWrapper:
|
|
1437
|
-
shouldExpandOnScrollRef:
|
|
1438
|
-
onScrollButtonChange:
|
|
1439
|
-
children: /* @__PURE__ */
|
|
461
|
+
scope: e,
|
|
462
|
+
contentWrapper: a,
|
|
463
|
+
shouldExpandOnScrollRef: b,
|
|
464
|
+
onScrollButtonChange: se,
|
|
465
|
+
children: /* @__PURE__ */ i(
|
|
1440
466
|
"div",
|
|
1441
467
|
{
|
|
1442
|
-
ref:
|
|
468
|
+
ref: s,
|
|
1443
469
|
style: {
|
|
1444
470
|
display: "flex",
|
|
1445
471
|
flexDirection: "column",
|
|
1446
472
|
position: "fixed",
|
|
1447
|
-
zIndex:
|
|
473
|
+
zIndex: M
|
|
1448
474
|
},
|
|
1449
|
-
children: /* @__PURE__ */
|
|
1450
|
-
|
|
475
|
+
children: /* @__PURE__ */ i(
|
|
476
|
+
N.div,
|
|
1451
477
|
{
|
|
1452
|
-
...
|
|
1453
|
-
ref:
|
|
478
|
+
...n,
|
|
479
|
+
ref: _,
|
|
1454
480
|
style: {
|
|
1455
481
|
// When we get the height of the content, it includes borders. If we were to set
|
|
1456
482
|
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
1457
483
|
boxSizing: "border-box",
|
|
1458
484
|
// We need to ensure the content doesn't get taller than the wrapper
|
|
1459
485
|
maxHeight: "100%",
|
|
1460
|
-
...
|
|
486
|
+
...n.style
|
|
1461
487
|
}
|
|
1462
488
|
}
|
|
1463
489
|
)
|
|
@@ -1466,26 +492,26 @@ var ho = "SelectItemAlignedPosition", en = s.forwardRef((e, t) => {
|
|
|
1466
492
|
}
|
|
1467
493
|
);
|
|
1468
494
|
});
|
|
1469
|
-
|
|
1470
|
-
var
|
|
495
|
+
$e.displayName = Kt;
|
|
496
|
+
var jt = "SelectPopperPosition", ye = l.forwardRef((t, o) => {
|
|
1471
497
|
const {
|
|
1472
|
-
__scopeSelect:
|
|
498
|
+
__scopeSelect: e,
|
|
1473
499
|
align: r = "start",
|
|
1474
|
-
collisionPadding:
|
|
1475
|
-
...
|
|
1476
|
-
} =
|
|
1477
|
-
return /* @__PURE__ */
|
|
1478
|
-
|
|
500
|
+
collisionPadding: n = L,
|
|
501
|
+
...d
|
|
502
|
+
} = t, c = me(e);
|
|
503
|
+
return /* @__PURE__ */ i(
|
|
504
|
+
bt,
|
|
1479
505
|
{
|
|
1480
506
|
...c,
|
|
1481
|
-
...
|
|
1482
|
-
ref:
|
|
507
|
+
...d,
|
|
508
|
+
ref: o,
|
|
1483
509
|
align: r,
|
|
1484
|
-
collisionPadding:
|
|
510
|
+
collisionPadding: n,
|
|
1485
511
|
style: {
|
|
1486
512
|
// Ensure border-box for floating-ui calculations
|
|
1487
513
|
boxSizing: "border-box",
|
|
1488
|
-
...
|
|
514
|
+
...d.style,
|
|
1489
515
|
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1490
516
|
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
1491
517
|
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -1495,12 +521,12 @@ var vo = "SelectPopperPosition", $e = s.forwardRef((e, t) => {
|
|
|
1495
521
|
}
|
|
1496
522
|
);
|
|
1497
523
|
});
|
|
1498
|
-
|
|
1499
|
-
var [
|
|
1500
|
-
(
|
|
1501
|
-
const { __scopeSelect:
|
|
1502
|
-
return /* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
524
|
+
ye.displayName = jt;
|
|
525
|
+
var [Gt, Re] = le(ne, {}), Ce = "SelectViewport", qe = l.forwardRef(
|
|
526
|
+
(t, o) => {
|
|
527
|
+
const { __scopeSelect: e, nonce: r, ...n } = t, d = J(Ce, e), c = Re(Ce, e), a = B(o, d.onViewportChange), s = l.useRef(0);
|
|
528
|
+
return /* @__PURE__ */ $(Pe, { children: [
|
|
529
|
+
/* @__PURE__ */ i(
|
|
1504
530
|
"style",
|
|
1505
531
|
{
|
|
1506
532
|
dangerouslySetInnerHTML: {
|
|
@@ -1509,122 +535,134 @@ var [go, Qe] = me(ie, {}), Ue = "SelectViewport", tn = s.forwardRef(
|
|
|
1509
535
|
nonce: r
|
|
1510
536
|
}
|
|
1511
537
|
),
|
|
1512
|
-
/* @__PURE__ */
|
|
1513
|
-
|
|
538
|
+
/* @__PURE__ */ i(pe.Slot, { scope: e, children: /* @__PURE__ */ i(
|
|
539
|
+
N.div,
|
|
1514
540
|
{
|
|
1515
541
|
"data-radix-select-viewport": "",
|
|
1516
542
|
role: "presentation",
|
|
1517
|
-
...
|
|
1518
|
-
ref:
|
|
543
|
+
...n,
|
|
544
|
+
ref: a,
|
|
1519
545
|
style: {
|
|
1520
546
|
// we use position: 'relative' here on the `viewport` so that when we call
|
|
1521
547
|
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
1522
548
|
// (independent of the scrollUpButton).
|
|
1523
549
|
position: "relative",
|
|
1524
550
|
flex: 1,
|
|
1525
|
-
|
|
1526
|
-
|
|
551
|
+
// Viewport should only be scrollable in the vertical direction.
|
|
552
|
+
// This won't work in vertical writing modes, so we'll need to
|
|
553
|
+
// revisit this if/when that is supported
|
|
554
|
+
// https://developer.chrome.com/blog/vertical-form-controls
|
|
555
|
+
overflow: "hidden auto",
|
|
556
|
+
...n.style
|
|
1527
557
|
},
|
|
1528
|
-
onScroll:
|
|
1529
|
-
const
|
|
1530
|
-
if (
|
|
1531
|
-
const
|
|
1532
|
-
if (
|
|
1533
|
-
const
|
|
1534
|
-
if (
|
|
1535
|
-
const
|
|
1536
|
-
|
|
558
|
+
onScroll: P(n.onScroll, (p) => {
|
|
559
|
+
const v = p.currentTarget, { contentWrapper: _, shouldExpandOnScrollRef: T } = c;
|
|
560
|
+
if (T != null && T.current && _) {
|
|
561
|
+
const b = Math.abs(s.current - v.scrollTop);
|
|
562
|
+
if (b > 0) {
|
|
563
|
+
const S = window.innerHeight - L * 2, u = parseFloat(_.style.minHeight), g = parseFloat(_.style.height), y = Math.max(u, g);
|
|
564
|
+
if (y < S) {
|
|
565
|
+
const f = y + b, h = Math.min(S, f), M = f - h;
|
|
566
|
+
_.style.height = h + "px", _.style.bottom === "0px" && (v.scrollTop = M > 0 ? M : 0, _.style.justifyContent = "flex-end");
|
|
1537
567
|
}
|
|
1538
568
|
}
|
|
1539
569
|
}
|
|
1540
|
-
|
|
570
|
+
s.current = v.scrollTop;
|
|
1541
571
|
})
|
|
1542
572
|
}
|
|
1543
573
|
) })
|
|
1544
574
|
] });
|
|
1545
575
|
}
|
|
1546
576
|
);
|
|
1547
|
-
|
|
1548
|
-
var
|
|
1549
|
-
(
|
|
1550
|
-
const { __scopeSelect:
|
|
1551
|
-
return /* @__PURE__ */
|
|
577
|
+
qe.displayName = Ce;
|
|
578
|
+
var Xe = "SelectGroup", [Yt, $t] = le(Xe), qt = l.forwardRef(
|
|
579
|
+
(t, o) => {
|
|
580
|
+
const { __scopeSelect: e, ...r } = t, n = Ne();
|
|
581
|
+
return /* @__PURE__ */ i(Yt, { scope: e, id: n, children: /* @__PURE__ */ i(N.div, { role: "group", "aria-labelledby": n, ...r, ref: o }) });
|
|
1552
582
|
}
|
|
1553
583
|
);
|
|
1554
|
-
|
|
1555
|
-
var
|
|
1556
|
-
(
|
|
1557
|
-
const { __scopeSelect:
|
|
1558
|
-
return /* @__PURE__ */
|
|
584
|
+
qt.displayName = Xe;
|
|
585
|
+
var Ze = "SelectLabel", Xt = l.forwardRef(
|
|
586
|
+
(t, o) => {
|
|
587
|
+
const { __scopeSelect: e, ...r } = t, n = $t(Ze, e);
|
|
588
|
+
return /* @__PURE__ */ i(N.div, { id: n.id, ...r, ref: o });
|
|
1559
589
|
}
|
|
1560
590
|
);
|
|
1561
|
-
|
|
1562
|
-
var
|
|
1563
|
-
(
|
|
591
|
+
Xt.displayName = Ze;
|
|
592
|
+
var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
|
|
593
|
+
(t, o) => {
|
|
1564
594
|
const {
|
|
1565
|
-
__scopeSelect:
|
|
595
|
+
__scopeSelect: e,
|
|
1566
596
|
value: r,
|
|
1567
|
-
disabled:
|
|
1568
|
-
textValue:
|
|
597
|
+
disabled: n = !1,
|
|
598
|
+
textValue: d,
|
|
1569
599
|
...c
|
|
1570
|
-
} =
|
|
1571
|
-
|
|
1572
|
-
(
|
|
1573
|
-
var
|
|
1574
|
-
return (
|
|
600
|
+
} = t, a = Z(ue, e), s = J(ue, e), p = a.value === r, [v, _] = l.useState(d ?? ""), [T, b] = l.useState(!1), S = B(
|
|
601
|
+
o,
|
|
602
|
+
(f) => {
|
|
603
|
+
var h;
|
|
604
|
+
return (h = s.itemRefCallback) == null ? void 0 : h.call(s, f, r, n);
|
|
1575
605
|
}
|
|
1576
|
-
),
|
|
1577
|
-
|
|
606
|
+
), u = Ne(), g = l.useRef("touch"), y = () => {
|
|
607
|
+
n || (a.onValueChange(r), a.onOpenChange(!1));
|
|
1578
608
|
};
|
|
1579
609
|
if (r === "")
|
|
1580
610
|
throw new Error(
|
|
1581
611
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
1582
612
|
);
|
|
1583
|
-
return /* @__PURE__ */
|
|
1584
|
-
|
|
613
|
+
return /* @__PURE__ */ i(
|
|
614
|
+
Zt,
|
|
1585
615
|
{
|
|
1586
|
-
scope:
|
|
616
|
+
scope: e,
|
|
1587
617
|
value: r,
|
|
1588
|
-
disabled:
|
|
1589
|
-
textId:
|
|
1590
|
-
isSelected:
|
|
1591
|
-
onItemTextChange:
|
|
1592
|
-
|
|
618
|
+
disabled: n,
|
|
619
|
+
textId: u,
|
|
620
|
+
isSelected: p,
|
|
621
|
+
onItemTextChange: l.useCallback((f) => {
|
|
622
|
+
_((h) => h || ((f == null ? void 0 : f.textContent) ?? "").trim());
|
|
1593
623
|
}, []),
|
|
1594
|
-
children: /* @__PURE__ */
|
|
1595
|
-
|
|
624
|
+
children: /* @__PURE__ */ i(
|
|
625
|
+
pe.ItemSlot,
|
|
1596
626
|
{
|
|
1597
|
-
scope:
|
|
627
|
+
scope: e,
|
|
1598
628
|
value: r,
|
|
1599
|
-
disabled:
|
|
1600
|
-
textValue:
|
|
1601
|
-
children: /* @__PURE__ */
|
|
1602
|
-
|
|
629
|
+
disabled: n,
|
|
630
|
+
textValue: v,
|
|
631
|
+
children: /* @__PURE__ */ i(
|
|
632
|
+
N.div,
|
|
1603
633
|
{
|
|
1604
634
|
role: "option",
|
|
1605
|
-
"aria-labelledby":
|
|
1606
|
-
"data-highlighted":
|
|
1607
|
-
"aria-selected":
|
|
1608
|
-
"data-state":
|
|
1609
|
-
"aria-disabled":
|
|
1610
|
-
"data-disabled":
|
|
1611
|
-
tabIndex:
|
|
635
|
+
"aria-labelledby": u,
|
|
636
|
+
"data-highlighted": T ? "" : void 0,
|
|
637
|
+
"aria-selected": p && T,
|
|
638
|
+
"data-state": p ? "checked" : "unchecked",
|
|
639
|
+
"aria-disabled": n || void 0,
|
|
640
|
+
"data-disabled": n ? "" : void 0,
|
|
641
|
+
tabIndex: n ? void 0 : -1,
|
|
1612
642
|
...c,
|
|
1613
|
-
ref:
|
|
1614
|
-
onFocus:
|
|
1615
|
-
onBlur:
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
643
|
+
ref: S,
|
|
644
|
+
onFocus: P(c.onFocus, () => b(!0)),
|
|
645
|
+
onBlur: P(c.onBlur, () => b(!1)),
|
|
646
|
+
onClick: P(c.onClick, () => {
|
|
647
|
+
g.current !== "mouse" && y();
|
|
648
|
+
}),
|
|
649
|
+
onPointerUp: P(c.onPointerUp, () => {
|
|
650
|
+
g.current === "mouse" && y();
|
|
651
|
+
}),
|
|
652
|
+
onPointerDown: P(c.onPointerDown, (f) => {
|
|
653
|
+
g.current = f.pointerType;
|
|
654
|
+
}),
|
|
655
|
+
onPointerMove: P(c.onPointerMove, (f) => {
|
|
656
|
+
var h;
|
|
657
|
+
g.current = f.pointerType, n ? (h = s.onItemLeave) == null || h.call(s) : g.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
|
|
1620
658
|
}),
|
|
1621
|
-
onPointerLeave:
|
|
1622
|
-
var
|
|
1623
|
-
|
|
659
|
+
onPointerLeave: P(c.onPointerLeave, (f) => {
|
|
660
|
+
var h;
|
|
661
|
+
f.currentTarget === document.activeElement && ((h = s.onItemLeave) == null || h.call(s));
|
|
1624
662
|
}),
|
|
1625
|
-
onKeyDown:
|
|
1626
|
-
var
|
|
1627
|
-
((
|
|
663
|
+
onKeyDown: P(c.onKeyDown, (f) => {
|
|
664
|
+
var M;
|
|
665
|
+
((M = s.searchRef) == null ? void 0 : M.current) !== "" && f.key === " " || (Lt.includes(f.key) && y(), f.key === " " && f.preventDefault());
|
|
1628
666
|
})
|
|
1629
667
|
}
|
|
1630
668
|
)
|
|
@@ -1634,240 +672,250 @@ var Te = "SelectItem", [bo, on] = me(Te), an = s.forwardRef(
|
|
|
1634
672
|
);
|
|
1635
673
|
}
|
|
1636
674
|
);
|
|
1637
|
-
|
|
1638
|
-
var
|
|
1639
|
-
(
|
|
1640
|
-
const { __scopeSelect:
|
|
1641
|
-
|
|
1642
|
-
(
|
|
1643
|
-
|
|
1644
|
-
(
|
|
1645
|
-
var
|
|
1646
|
-
return (
|
|
675
|
+
Qe.displayName = ue;
|
|
676
|
+
var ae = "SelectItemText", et = l.forwardRef(
|
|
677
|
+
(t, o) => {
|
|
678
|
+
const { __scopeSelect: e, className: r, style: n, ...d } = t, c = Z(ae, e), a = J(ae, e), s = Je(ae, e), p = Vt(ae, e), [v, _] = l.useState(null), T = B(
|
|
679
|
+
o,
|
|
680
|
+
(y) => _(y),
|
|
681
|
+
s.onItemTextChange,
|
|
682
|
+
(y) => {
|
|
683
|
+
var f;
|
|
684
|
+
return (f = a.itemTextRefCallback) == null ? void 0 : f.call(a, y, s.value, s.disabled);
|
|
1647
685
|
}
|
|
1648
|
-
),
|
|
1649
|
-
() => /* @__PURE__ */
|
|
1650
|
-
[
|
|
1651
|
-
), { onNativeOptionAdd:
|
|
1652
|
-
return
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
|
|
686
|
+
), b = v == null ? void 0 : v.textContent, S = l.useMemo(
|
|
687
|
+
() => /* @__PURE__ */ i("option", { value: s.value, disabled: s.disabled, children: b }, s.value),
|
|
688
|
+
[s.disabled, s.value, b]
|
|
689
|
+
), { onNativeOptionAdd: u, onNativeOptionRemove: g } = p;
|
|
690
|
+
return K(() => (u(S), () => g(S)), [u, g, S]), /* @__PURE__ */ $(Pe, { children: [
|
|
691
|
+
/* @__PURE__ */ i(N.span, { id: s.textId, ...d, ref: T }),
|
|
692
|
+
s.isSelected && c.valueNode && !c.valueNodeHasChildren ? De.createPortal(d.children, c.valueNode) : null
|
|
1655
693
|
] });
|
|
1656
694
|
}
|
|
1657
695
|
);
|
|
1658
|
-
|
|
1659
|
-
var
|
|
1660
|
-
(
|
|
1661
|
-
const { __scopeSelect:
|
|
1662
|
-
return
|
|
696
|
+
et.displayName = ae;
|
|
697
|
+
var tt = "SelectItemIndicator", ot = l.forwardRef(
|
|
698
|
+
(t, o) => {
|
|
699
|
+
const { __scopeSelect: e, ...r } = t;
|
|
700
|
+
return Je(tt, e).isSelected ? /* @__PURE__ */ i(N.span, { "aria-hidden": !0, ...r, ref: o }) : null;
|
|
1663
701
|
}
|
|
1664
702
|
);
|
|
1665
|
-
|
|
1666
|
-
var
|
|
1667
|
-
const
|
|
1668
|
-
return
|
|
1669
|
-
if (
|
|
1670
|
-
let
|
|
1671
|
-
const
|
|
1672
|
-
|
|
703
|
+
ot.displayName = tt;
|
|
704
|
+
var Ie = "SelectScrollUpButton", nt = l.forwardRef((t, o) => {
|
|
705
|
+
const e = J(Ie, t.__scopeSelect), r = Re(Ie, t.__scopeSelect), [n, d] = l.useState(!1), c = B(o, r.onScrollButtonChange);
|
|
706
|
+
return K(() => {
|
|
707
|
+
if (e.viewport && e.isPositioned) {
|
|
708
|
+
let a = function() {
|
|
709
|
+
const p = s.scrollTop > 0;
|
|
710
|
+
d(p);
|
|
1673
711
|
};
|
|
1674
|
-
const
|
|
1675
|
-
return
|
|
712
|
+
const s = e.viewport;
|
|
713
|
+
return a(), s.addEventListener("scroll", a), () => s.removeEventListener("scroll", a);
|
|
1676
714
|
}
|
|
1677
|
-
}, [
|
|
1678
|
-
|
|
715
|
+
}, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
|
|
716
|
+
lt,
|
|
1679
717
|
{
|
|
1680
|
-
...
|
|
718
|
+
...t,
|
|
1681
719
|
ref: c,
|
|
1682
720
|
onAutoScroll: () => {
|
|
1683
|
-
const { viewport:
|
|
1684
|
-
|
|
721
|
+
const { viewport: a, selectedItem: s } = e;
|
|
722
|
+
a && s && (a.scrollTop = a.scrollTop - s.offsetHeight);
|
|
1685
723
|
}
|
|
1686
724
|
}
|
|
1687
725
|
) : null;
|
|
1688
726
|
});
|
|
1689
|
-
|
|
1690
|
-
var
|
|
1691
|
-
const
|
|
1692
|
-
return
|
|
1693
|
-
if (
|
|
1694
|
-
let
|
|
1695
|
-
const
|
|
1696
|
-
|
|
727
|
+
nt.displayName = Ie;
|
|
728
|
+
var Te = "SelectScrollDownButton", rt = l.forwardRef((t, o) => {
|
|
729
|
+
const e = J(Te, t.__scopeSelect), r = Re(Te, t.__scopeSelect), [n, d] = l.useState(!1), c = B(o, r.onScrollButtonChange);
|
|
730
|
+
return K(() => {
|
|
731
|
+
if (e.viewport && e.isPositioned) {
|
|
732
|
+
let a = function() {
|
|
733
|
+
const p = s.scrollHeight - s.clientHeight, v = Math.ceil(s.scrollTop) < p;
|
|
734
|
+
d(v);
|
|
1697
735
|
};
|
|
1698
|
-
const
|
|
1699
|
-
return
|
|
736
|
+
const s = e.viewport;
|
|
737
|
+
return a(), s.addEventListener("scroll", a), () => s.removeEventListener("scroll", a);
|
|
1700
738
|
}
|
|
1701
|
-
}, [
|
|
1702
|
-
|
|
739
|
+
}, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
|
|
740
|
+
lt,
|
|
1703
741
|
{
|
|
1704
|
-
...
|
|
742
|
+
...t,
|
|
1705
743
|
ref: c,
|
|
1706
744
|
onAutoScroll: () => {
|
|
1707
|
-
const { viewport:
|
|
1708
|
-
|
|
745
|
+
const { viewport: a, selectedItem: s } = e;
|
|
746
|
+
a && s && (a.scrollTop = a.scrollTop + s.offsetHeight);
|
|
1709
747
|
}
|
|
1710
748
|
}
|
|
1711
749
|
) : null;
|
|
1712
750
|
});
|
|
1713
|
-
|
|
1714
|
-
var
|
|
1715
|
-
const { __scopeSelect:
|
|
751
|
+
rt.displayName = Te;
|
|
752
|
+
var lt = l.forwardRef((t, o) => {
|
|
753
|
+
const { __scopeSelect: e, onAutoScroll: r, ...n } = t, d = J("SelectScrollButton", e), c = l.useRef(null), a = fe(e), s = l.useCallback(() => {
|
|
1716
754
|
c.current !== null && (window.clearInterval(c.current), c.current = null);
|
|
1717
755
|
}, []);
|
|
1718
|
-
return
|
|
1719
|
-
var
|
|
1720
|
-
const
|
|
1721
|
-
(
|
|
1722
|
-
}, [
|
|
1723
|
-
|
|
756
|
+
return l.useEffect(() => () => s(), [s]), K(() => {
|
|
757
|
+
var v;
|
|
758
|
+
const p = a().find((_) => _.ref.current === document.activeElement);
|
|
759
|
+
(v = p == null ? void 0 : p.ref.current) == null || v.scrollIntoView({ block: "nearest" });
|
|
760
|
+
}, [a]), /* @__PURE__ */ i(
|
|
761
|
+
N.div,
|
|
1724
762
|
{
|
|
1725
763
|
"aria-hidden": !0,
|
|
1726
|
-
...
|
|
1727
|
-
ref:
|
|
1728
|
-
style: { flexShrink: 0, ...
|
|
1729
|
-
onPointerDown:
|
|
764
|
+
...n,
|
|
765
|
+
ref: o,
|
|
766
|
+
style: { flexShrink: 0, ...n.style },
|
|
767
|
+
onPointerDown: P(n.onPointerDown, () => {
|
|
1730
768
|
c.current === null && (c.current = window.setInterval(r, 50));
|
|
1731
769
|
}),
|
|
1732
|
-
onPointerMove:
|
|
1733
|
-
var
|
|
1734
|
-
(
|
|
770
|
+
onPointerMove: P(n.onPointerMove, () => {
|
|
771
|
+
var p;
|
|
772
|
+
(p = d.onItemLeave) == null || p.call(d), c.current === null && (c.current = window.setInterval(r, 50));
|
|
1735
773
|
}),
|
|
1736
|
-
onPointerLeave:
|
|
1737
|
-
|
|
774
|
+
onPointerLeave: P(n.onPointerLeave, () => {
|
|
775
|
+
s();
|
|
1738
776
|
})
|
|
1739
777
|
}
|
|
1740
778
|
);
|
|
1741
|
-
}),
|
|
1742
|
-
(
|
|
1743
|
-
const { __scopeSelect:
|
|
1744
|
-
return /* @__PURE__ */
|
|
779
|
+
}), Jt = "SelectSeparator", Qt = l.forwardRef(
|
|
780
|
+
(t, o) => {
|
|
781
|
+
const { __scopeSelect: e, ...r } = t;
|
|
782
|
+
return /* @__PURE__ */ i(N.div, { "aria-hidden": !0, ...r, ref: o });
|
|
1745
783
|
}
|
|
1746
784
|
);
|
|
1747
|
-
|
|
1748
|
-
var
|
|
1749
|
-
(
|
|
1750
|
-
const { __scopeSelect:
|
|
1751
|
-
return
|
|
785
|
+
Qt.displayName = Jt;
|
|
786
|
+
var be = "SelectArrow", eo = l.forwardRef(
|
|
787
|
+
(t, o) => {
|
|
788
|
+
const { __scopeSelect: e, ...r } = t, n = me(e), d = Z(be, e), c = J(be, e);
|
|
789
|
+
return d.open && c.position === "popper" ? /* @__PURE__ */ i(Pt, { ...n, ...r, ref: o }) : null;
|
|
1752
790
|
}
|
|
1753
791
|
);
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
u,
|
|
792
|
+
eo.displayName = be;
|
|
793
|
+
var to = "SelectBubbleInput", st = l.forwardRef(
|
|
794
|
+
({ __scopeSelect: t, value: o, ...e }, r) => {
|
|
795
|
+
const n = l.useRef(null), d = B(r, n), c = Nt(o);
|
|
796
|
+
return l.useEffect(() => {
|
|
797
|
+
const a = n.current;
|
|
798
|
+
if (!a) return;
|
|
799
|
+
const s = window.HTMLSelectElement.prototype, v = Object.getOwnPropertyDescriptor(
|
|
800
|
+
s,
|
|
1764
801
|
"value"
|
|
1765
802
|
).set;
|
|
1766
|
-
if (c !==
|
|
1767
|
-
const
|
|
1768
|
-
|
|
803
|
+
if (c !== o && v) {
|
|
804
|
+
const _ = new Event("change", { bubbles: !0 });
|
|
805
|
+
v.call(a, o), a.dispatchEvent(_);
|
|
806
|
+
}
|
|
807
|
+
}, [c, o]), /* @__PURE__ */ i(
|
|
808
|
+
N.select,
|
|
809
|
+
{
|
|
810
|
+
...e,
|
|
811
|
+
style: { ...ze, ...e.style },
|
|
812
|
+
ref: d,
|
|
813
|
+
defaultValue: o
|
|
1769
814
|
}
|
|
1770
|
-
|
|
815
|
+
);
|
|
1771
816
|
}
|
|
1772
817
|
);
|
|
1773
|
-
|
|
1774
|
-
function
|
|
1775
|
-
|
|
818
|
+
st.displayName = to;
|
|
819
|
+
function ct(t) {
|
|
820
|
+
return t === "" || t === void 0;
|
|
821
|
+
}
|
|
822
|
+
function at(t) {
|
|
823
|
+
const o = wt(t), e = l.useRef(""), r = l.useRef(0), n = l.useCallback(
|
|
1776
824
|
(c) => {
|
|
1777
|
-
const
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
}(
|
|
825
|
+
const a = e.current + c;
|
|
826
|
+
o(a), function s(p) {
|
|
827
|
+
e.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() => s(""), 1e3));
|
|
828
|
+
}(a);
|
|
1781
829
|
},
|
|
1782
|
-
[
|
|
1783
|
-
),
|
|
1784
|
-
|
|
830
|
+
[o]
|
|
831
|
+
), d = l.useCallback(() => {
|
|
832
|
+
e.current = "", window.clearTimeout(r.current);
|
|
1785
833
|
}, []);
|
|
1786
|
-
return
|
|
1787
|
-
}
|
|
1788
|
-
function
|
|
1789
|
-
const
|
|
1790
|
-
let c =
|
|
1791
|
-
|
|
1792
|
-
const
|
|
1793
|
-
(
|
|
834
|
+
return l.useEffect(() => () => window.clearTimeout(r.current), []), [e, n, d];
|
|
835
|
+
}
|
|
836
|
+
function it(t, o, e) {
|
|
837
|
+
const n = o.length > 1 && Array.from(o).every((p) => p === o[0]) ? o[0] : o, d = e ? t.indexOf(e) : -1;
|
|
838
|
+
let c = oo(t, Math.max(d, 0));
|
|
839
|
+
n.length === 1 && (c = c.filter((p) => p !== e));
|
|
840
|
+
const s = c.find(
|
|
841
|
+
(p) => p.textValue.toLowerCase().startsWith(n.toLowerCase())
|
|
1794
842
|
);
|
|
1795
|
-
return
|
|
843
|
+
return s !== e ? s : void 0;
|
|
1796
844
|
}
|
|
1797
|
-
function
|
|
1798
|
-
return
|
|
845
|
+
function oo(t, o) {
|
|
846
|
+
return t.map((e, r) => t[(o + r) % t.length]);
|
|
1799
847
|
}
|
|
1800
|
-
var
|
|
848
|
+
var no = Be, ro = He, lo = Fe, so = Ue, co = Ke, ao = je, io = qe, uo = Qe, po = et, fo = ot, mo = nt, ho = rt, dt = {
|
|
1801
849
|
color: void 0,
|
|
1802
850
|
size: void 0,
|
|
1803
851
|
className: void 0,
|
|
1804
852
|
style: void 0,
|
|
1805
853
|
attr: void 0
|
|
1806
|
-
},
|
|
1807
|
-
return
|
|
1808
|
-
for (var
|
|
1809
|
-
|
|
1810
|
-
for (var
|
|
854
|
+
}, Me = q.createContext && q.createContext(dt), X = function() {
|
|
855
|
+
return X = Object.assign || function(t) {
|
|
856
|
+
for (var o, e = 1, r = arguments.length; e < r; e++) {
|
|
857
|
+
o = arguments[e];
|
|
858
|
+
for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (t[n] = o[n]);
|
|
1811
859
|
}
|
|
1812
|
-
return
|
|
1813
|
-
},
|
|
1814
|
-
},
|
|
1815
|
-
var
|
|
1816
|
-
for (var r in
|
|
1817
|
-
if (
|
|
1818
|
-
|
|
1819
|
-
return
|
|
860
|
+
return t;
|
|
861
|
+
}, X.apply(this, arguments);
|
|
862
|
+
}, go = function(t, o) {
|
|
863
|
+
var e = {};
|
|
864
|
+
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && o.indexOf(r) < 0 && (e[r] = t[r]);
|
|
865
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, r = Object.getOwnPropertySymbols(t); n < r.length; n++)
|
|
866
|
+
o.indexOf(r[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[n]) && (e[r[n]] = t[r[n]]);
|
|
867
|
+
return e;
|
|
1820
868
|
};
|
|
1821
|
-
function
|
|
1822
|
-
return
|
|
1823
|
-
return
|
|
1824
|
-
key:
|
|
1825
|
-
},
|
|
869
|
+
function ut(t) {
|
|
870
|
+
return t && t.map(function(o, e) {
|
|
871
|
+
return q.createElement(o.tag, X({
|
|
872
|
+
key: e
|
|
873
|
+
}, o.attr), ut(o.child));
|
|
1826
874
|
});
|
|
1827
875
|
}
|
|
1828
|
-
function
|
|
1829
|
-
return function(
|
|
1830
|
-
return
|
|
1831
|
-
attr:
|
|
1832
|
-
},
|
|
876
|
+
function pt(t) {
|
|
877
|
+
return function(o) {
|
|
878
|
+
return q.createElement(vo, X({
|
|
879
|
+
attr: X({}, t.attr)
|
|
880
|
+
}, o), ut(t.child));
|
|
1833
881
|
};
|
|
1834
882
|
}
|
|
1835
|
-
function
|
|
1836
|
-
var
|
|
1837
|
-
var r =
|
|
1838
|
-
return
|
|
883
|
+
function vo(t) {
|
|
884
|
+
var o = function(e) {
|
|
885
|
+
var r = t.attr, n = t.size, d = t.title, c = go(t, ["attr", "size", "title"]), a = n || e.size || "1em", s;
|
|
886
|
+
return e.className && (s = e.className), t.className && (s = (s ? s + " " : "") + t.className), q.createElement("svg", X({
|
|
1839
887
|
stroke: "currentColor",
|
|
1840
888
|
fill: "currentColor",
|
|
1841
889
|
strokeWidth: "0"
|
|
1842
|
-
},
|
|
1843
|
-
className:
|
|
1844
|
-
style:
|
|
1845
|
-
color:
|
|
1846
|
-
},
|
|
1847
|
-
height:
|
|
1848
|
-
width:
|
|
890
|
+
}, e.attr, r, c, {
|
|
891
|
+
className: s,
|
|
892
|
+
style: X(X({
|
|
893
|
+
color: t.color || e.color
|
|
894
|
+
}, e.style), t.style),
|
|
895
|
+
height: a,
|
|
896
|
+
width: a,
|
|
1849
897
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1850
|
-
}),
|
|
898
|
+
}), d && q.createElement("title", null, d), t.children);
|
|
1851
899
|
};
|
|
1852
|
-
return
|
|
1853
|
-
return
|
|
1854
|
-
}) :
|
|
1855
|
-
}
|
|
1856
|
-
function
|
|
1857
|
-
return
|
|
1858
|
-
}
|
|
1859
|
-
function
|
|
1860
|
-
return
|
|
1861
|
-
}
|
|
1862
|
-
const
|
|
1863
|
-
trigger:
|
|
1864
|
-
fullWidth:
|
|
1865
|
-
icon:
|
|
1866
|
-
content:
|
|
1867
|
-
app:
|
|
1868
|
-
arrow:
|
|
1869
|
-
option:
|
|
1870
|
-
tickIcon:
|
|
900
|
+
return Me !== void 0 ? q.createElement(Me.Consumer, null, function(e) {
|
|
901
|
+
return o(e);
|
|
902
|
+
}) : o(dt);
|
|
903
|
+
}
|
|
904
|
+
function Ae(t) {
|
|
905
|
+
return pt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" } }] })(t);
|
|
906
|
+
}
|
|
907
|
+
function _o(t) {
|
|
908
|
+
return pt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" } }] })(t);
|
|
909
|
+
}
|
|
910
|
+
const So = "cfxui__Select__trigger__232e4", wo = "cfxui__Select__fullWidth__739d7", xo = "cfxui__Select__icon__36b6c", yo = "cfxui__Select__content__067da", Co = "cfxui__Select__app__e0114", Io = "cfxui__Select__arrow__8e7eb", To = "cfxui__Select__option__2de5d", bo = "cfxui__Select__tickIcon__71e80", D = {
|
|
911
|
+
trigger: So,
|
|
912
|
+
fullWidth: wo,
|
|
913
|
+
icon: xo,
|
|
914
|
+
content: yo,
|
|
915
|
+
app: Co,
|
|
916
|
+
arrow: Io,
|
|
917
|
+
option: To,
|
|
918
|
+
tickIcon: bo,
|
|
1871
919
|
"select-size-initial-large": "cfxui__Select__select-size-initial-large__5e47d",
|
|
1872
920
|
"select-size-initial-small": "cfxui__Select__select-size-initial-small__5ae12",
|
|
1873
921
|
"select-size-small-large": "cfxui__Select__select-size-small-large__79811",
|
|
@@ -1882,43 +930,44 @@ const Ho = "cfxui__Select__trigger__232e4", $o = "cfxui__Select__fullWidth__739d
|
|
|
1882
930
|
"select-size-large-small": "cfxui__Select__select-size-large-small__fb50b",
|
|
1883
931
|
"select-size-xlarge-large": "cfxui__Select__select-size-xlarge-large__5abb1",
|
|
1884
932
|
"select-size-xlarge-small": "cfxui__Select__select-size-xlarge-small__5ddbb"
|
|
1885
|
-
}
|
|
933
|
+
};
|
|
934
|
+
function Vo(t) {
|
|
1886
935
|
const {
|
|
1887
|
-
value:
|
|
1888
|
-
options:
|
|
1889
|
-
onChange:
|
|
1890
|
-
size:
|
|
1891
|
-
placeholder:
|
|
1892
|
-
disabled:
|
|
1893
|
-
fullWidth:
|
|
1894
|
-
className:
|
|
1895
|
-
} = t, [
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
936
|
+
value: o,
|
|
937
|
+
options: e,
|
|
938
|
+
onChange: r,
|
|
939
|
+
size: n = "normal",
|
|
940
|
+
placeholder: d,
|
|
941
|
+
disabled: c = !1,
|
|
942
|
+
fullWidth: a = !1,
|
|
943
|
+
className: s
|
|
944
|
+
} = t, [p, v] = q.useState(!1), _ = Et.getResponsiveFlatClassnames("select-size", n).map((S) => D[S]), T = xe(
|
|
945
|
+
s,
|
|
946
|
+
D.trigger,
|
|
947
|
+
_,
|
|
1899
948
|
{
|
|
1900
|
-
[
|
|
1901
|
-
[
|
|
949
|
+
[D.disabled]: c,
|
|
950
|
+
[D.fullWidth]: a
|
|
1902
951
|
}
|
|
1903
|
-
),
|
|
1904
|
-
|
|
1905
|
-
|
|
952
|
+
), b = xe(
|
|
953
|
+
D.content,
|
|
954
|
+
_
|
|
1906
955
|
);
|
|
1907
|
-
return /* @__PURE__ */
|
|
1908
|
-
/* @__PURE__ */
|
|
1909
|
-
/* @__PURE__ */
|
|
1910
|
-
/* @__PURE__ */
|
|
956
|
+
return /* @__PURE__ */ $(no, { value: o, onValueChange: r, onOpenChange: v, open: p, children: [
|
|
957
|
+
/* @__PURE__ */ $(ro, { disabled: c, className: T, children: [
|
|
958
|
+
/* @__PURE__ */ i(lo, { placeholder: d }),
|
|
959
|
+
/* @__PURE__ */ i(so, { className: D.icon, children: /* @__PURE__ */ i(Ae, {}) })
|
|
1911
960
|
] }),
|
|
1912
|
-
/* @__PURE__ */
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
1916
|
-
/* @__PURE__ */
|
|
1917
|
-
] },
|
|
1918
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ i(co, { children: /* @__PURE__ */ $(ao, { className: b, children: [
|
|
962
|
+
/* @__PURE__ */ i(mo, { className: D.arrow, children: /* @__PURE__ */ i(_o, {}) }),
|
|
963
|
+
/* @__PURE__ */ i(io, { children: e.map((S) => /* @__PURE__ */ $(uo, { value: S.value, className: xe(D.option), children: [
|
|
964
|
+
/* @__PURE__ */ i(po, { children: S.label }),
|
|
965
|
+
/* @__PURE__ */ i(fo, { className: D.indicator, children: /* @__PURE__ */ i(Rt, { name: "Tick", className: D.tickIcon }) })
|
|
966
|
+
] }, S.value)) }),
|
|
967
|
+
/* @__PURE__ */ i(ho, { className: D.arrow, children: /* @__PURE__ */ i(Ae, {}) })
|
|
1919
968
|
] }) })
|
|
1920
969
|
] });
|
|
1921
|
-
}
|
|
970
|
+
}
|
|
1922
971
|
export {
|
|
1923
|
-
|
|
972
|
+
Vo as Select
|
|
1924
973
|
};
|