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