@iress-oss/ids-components 5.14.2 → 5.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AutocompleteNoResults-CA3kLIMp.js → AutocompleteNoResults-CvhIxKQI.js} +1 -1
- package/dist/{ComboboxHiddenInput-3nXQLXWs.js → ComboboxHiddenInput-B7ztqo0l.js} +5 -5
- package/dist/{FieldAppendToLabel-fLFwdVe0.js → FieldAppendToLabel-DgXoSKDG.js} +6 -5
- package/dist/{InputBase-Gu84XDiJ.js → InputBase-nWIFJcGj.js} +1 -1
- package/dist/Loading.module-Bs6DSfb4.js +13 -0
- package/dist/{LoadingSuspense-CbdTDOzY.js → LoadingSuspense-BdXYIsHy.js} +2325 -2300
- package/dist/LogoFromSrc-CtJE0Fsr.js +59 -0
- package/dist/MenuItem.module-Bj20OWCC.js +24 -0
- package/dist/Popover.module-DJ-RK5B3.js +11 -0
- package/dist/{SelectControl-CzcS0y-K.js → SelectControl-CYKkf3rM.js} +1 -1
- package/dist/{SliderTicks-Dfc9Q2il.js → SliderTicks-Dqz-k-xS.js} +1 -1
- package/dist/TabSet.module-Cu1itlcf.js +13 -0
- package/dist/Table.module-Bb7fJIr8.js +32 -0
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +5 -4
- package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Badge/Badge.js +4 -4
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/CloseButton/CloseButton.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +6 -6
- package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
- package/dist/components/Combobox/Combobox.js +5 -4
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +5 -4
- package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
- package/dist/components/Combobox/components/ComboboxResults.js +5 -4
- package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +4 -3
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/Expander/Expander.js +1 -1
- package/dist/components/Field/Field.js +1 -1
- package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
- package/dist/components/Field/components/FieldAppendToLabel.js +5 -4
- package/dist/components/Filter/Filter.js +5 -4
- package/dist/components/Filter/components/FilterResetButton.js +4 -3
- package/dist/components/Filter/components/FilterSearch.js +4 -3
- package/dist/components/Filter/index.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormField/FormField.js +9 -8
- package/dist/components/Form/FormField/FormFieldset.js +5 -4
- package/dist/components/Form/HookForm/HookForm.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Hide/Hide.js +1 -1
- package/dist/components/Hide/helpers/composeHideClasses.js +5 -4
- package/dist/components/Hide/index.js +1 -1
- package/dist/components/Icon/Icon.js +4 -3
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inline/Inline.js +4 -3
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/Input/ClearButton/ClearButton.js +1 -1
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/InputBase/InputBase.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputCurrency/InputCurrency.js +1 -1
- package/dist/components/InputCurrency/index.js +1 -1
- package/dist/components/Label/LabelBase/LabelBase.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDivider/MenuDivider.js +4 -3
- package/dist/components/Menu/MenuHeading/MenuHeading.js +2 -2
- package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
- package/dist/components/Menu/MenuText/MenuText.js +5 -4
- package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
- package/dist/components/Menu/hooks/useMenuStyles.js +3 -3
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Navbar/Navbar.js +2 -2
- package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
- package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
- package/dist/components/Navbar/components/NavbarLogo.js +2 -2
- package/dist/components/Navbar/index.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopover.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopoverProvider.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/PopoverProvider.js +1 -1
- package/dist/components/Popover/components/NestedPopoverActivator.js +1 -1
- package/dist/components/Popover/components/PopoverActivator.js +1 -1
- package/dist/components/Popover/components/PopoverContent.js +2 -2
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +1 -1
- package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
- package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
- package/dist/components/Progress/Progress.js +1 -1
- package/dist/components/Provider/Provider.js +38 -0
- package/dist/components/Provider/index.js +4 -0
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/Readonly/Readonly.js +5 -4
- package/dist/components/Readonly/index.js +1 -1
- package/dist/components/RichSelect/RichSelect.js +4 -3
- package/dist/components/RichSelect/SelectBody/SelectBody.js +5 -4
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +9 -8
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +4 -3
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +4 -3
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +4 -3
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +4 -3
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
- package/dist/components/RichSelect/SelectTags/SelectTags.js +4 -3
- package/dist/components/RichSelect/components/SelectActivator.js +1 -1
- package/dist/components/RichSelect/components/SelectOptions.js +4 -3
- package/dist/components/RichSelect/index.js +1 -1
- package/dist/components/Row/Row.js +4 -3
- package/dist/components/Row/index.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/components/SelectControl.js +1 -1
- package/dist/components/Select/components/SelectReadonly.js +4 -3
- package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
- package/dist/components/Select/helpers/nodesToSelectOptions.js +3 -3
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/Slideout/Slideout.js +2 -2
- package/dist/components/Slideout/components/SlideoutInner.js +1 -1
- package/dist/components/Slideout/index.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/components/SliderTicks.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +1 -1
- package/dist/components/TabSet/TabSet.js +2 -2
- package/dist/components/TabSet/components/TabSetItem.js +2 -2
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/TableBody/TableBody.js +15 -15
- package/dist/components/Table/components/TableEmpty.js +1 -1
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/components/TableSortButton.js +3 -3
- package/dist/components/Table/hooks/useIDSTableColumnStyles.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/TagInput/TagInput.js +1 -1
- package/dist/components/Tag/components/TagListInput/TagListInput.js +1 -1
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Toaster/Toast/Toast.js +1 -1
- package/dist/components/Toaster/Toast/ToastAnimated.js +2 -2
- package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
- package/dist/components/Toaster/Toaster.js +2 -2
- package/dist/components/Toaster/ToasterProvider.js +1 -1
- package/dist/components/Toaster/hooks/useToaster.js +24 -3
- package/dist/components/Toaster/index.js +11 -10
- package/dist/components/Toggle/Toggle.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +1 -1
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
- package/dist/constants.js +11 -11
- package/dist/{floating-ui.react-DfZ-vbiG.js → floating-ui.react-SmaXvp4L.js} +189 -183
- package/dist/main.js +287 -284
- package/dist/patterns/Loading/Loading.js +1 -1
- package/dist/patterns/Loading/LoadingSuspense.js +1 -1
- package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
- package/dist/patterns/Loading/components/DefaultLoading.js +3 -3
- package/dist/patterns/Loading/components/LongLoading.js +2 -2
- package/dist/patterns/Loading/components/PageLoading.js +3 -3
- package/dist/patterns/Loading/components/StartUpLoading.js +2 -2
- package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
- package/dist/patterns/Loading/index.js +1 -1
- package/dist/src/components/Form/Form.types.d.ts +10 -1
- package/dist/src/components/Provider/Provider.d.ts +20 -0
- package/dist/src/components/Provider/index.d.ts +1 -0
- package/dist/src/components/Toaster/Toast/Toast.types.d.ts +2 -1
- package/dist/src/components/Toaster/ToasterProvider.d.ts +5 -2
- package/dist/src/components/Toaster/hooks/useToaster.d.ts +3 -3
- package/dist/src/constants.d.ts +7 -7
- package/dist/src/main.d.ts +1 -0
- package/dist/src/patterns/Loading/components/PageLoading.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/{useIDSButtonGroupItem-DUZ2VDnl.js → useIDSButtonGroupItem-CniAJ9N5.js} +1 -1
- package/dist/vite.config.d.ts +1 -1
- package/package.json +2 -2
- package/dist/Loading.module-BoPWGcXe.js +0 -13
- package/dist/LogoFromSrc-C3T9li5n.js +0 -59
- package/dist/MenuItem.module-36-M9GIW.js +0 -24
- package/dist/Popover.module-qeMQ2uo5.js +0 -11
- package/dist/TabSet.module-BduoH_21.js +0 -13
- package/dist/Table.module-CONHit0r.js +0 -32
|
@@ -6,7 +6,7 @@ import * as tn from "react-dom";
|
|
|
6
6
|
function Mt() {
|
|
7
7
|
return typeof window < "u";
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ke(e) {
|
|
10
10
|
return zn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
11
11
|
}
|
|
12
12
|
function he(e) {
|
|
@@ -39,9 +39,9 @@ function ut(e) {
|
|
|
39
39
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
40
40
|
}
|
|
41
41
|
function Mr(e) {
|
|
42
|
-
return ["table", "td", "th"].includes(
|
|
42
|
+
return ["table", "td", "th"].includes(Ke(e));
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function St(e) {
|
|
45
45
|
return [":popover-open", ":modal"].some((t) => {
|
|
46
46
|
try {
|
|
47
47
|
return e.matches(t);
|
|
@@ -51,25 +51,25 @@ function Pt(e) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
function nn(e) {
|
|
54
|
-
const t =
|
|
54
|
+
const t = Pt(), n = Y(e) ? we(e) : e;
|
|
55
55
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
let t =
|
|
59
|
-
for (; re(t) && !
|
|
57
|
+
function Sr(e) {
|
|
58
|
+
let t = ke(e);
|
|
59
|
+
for (; re(t) && !De(t); ) {
|
|
60
60
|
if (nn(t))
|
|
61
61
|
return t;
|
|
62
|
-
if (
|
|
62
|
+
if (St(t))
|
|
63
63
|
return null;
|
|
64
|
-
t =
|
|
64
|
+
t = ke(t);
|
|
65
65
|
}
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Pt() {
|
|
69
69
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return ["html", "body", "#document"].includes(
|
|
71
|
+
function De(e) {
|
|
72
|
+
return ["html", "body", "#document"].includes(Ke(e));
|
|
73
73
|
}
|
|
74
74
|
function we(e) {
|
|
75
75
|
return he(e).getComputedStyle(e);
|
|
@@ -83,8 +83,8 @@ function Dt(e) {
|
|
|
83
83
|
scrollTop: e.scrollY
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
if (
|
|
86
|
+
function ke(e) {
|
|
87
|
+
if (Ke(e) === "html")
|
|
88
88
|
return e;
|
|
89
89
|
const t = (
|
|
90
90
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
@@ -96,23 +96,23 @@ function De(e) {
|
|
|
96
96
|
return Xt(t) ? t.host : t;
|
|
97
97
|
}
|
|
98
98
|
function Un(e) {
|
|
99
|
-
const t =
|
|
100
|
-
return
|
|
99
|
+
const t = ke(e);
|
|
100
|
+
return De(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : re(t) && ut(t) ? t : Un(t);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Fe(e, t, n) {
|
|
103
103
|
var r;
|
|
104
104
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
105
105
|
const o = Un(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = he(o);
|
|
106
106
|
if (s) {
|
|
107
107
|
const c = Jt(i);
|
|
108
|
-
return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ?
|
|
108
|
+
return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Fe(c) : []);
|
|
109
109
|
}
|
|
110
|
-
return t.concat(o,
|
|
110
|
+
return t.concat(o, Fe(o, [], n));
|
|
111
111
|
}
|
|
112
112
|
function Jt(e) {
|
|
113
113
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Pr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Pr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Qe = Math.min, be = Math.max, wt = Math.round, je = Math.floor, Ce = (e) => ({
|
|
116
116
|
x: e,
|
|
117
117
|
y: e
|
|
118
118
|
}), Dr = {
|
|
@@ -142,11 +142,11 @@ function Gn(e) {
|
|
|
142
142
|
function jn(e) {
|
|
143
143
|
return e === "y" ? "height" : "width";
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Pe(e) {
|
|
146
146
|
return ["top", "bottom"].includes(Te(e)) ? "y" : "x";
|
|
147
147
|
}
|
|
148
148
|
function qn(e) {
|
|
149
|
-
return Gn(
|
|
149
|
+
return Gn(Pe(e));
|
|
150
150
|
}
|
|
151
151
|
function Yn(e, t, n) {
|
|
152
152
|
n === void 0 && (n = !1);
|
|
@@ -269,7 +269,7 @@ function ce(e, t) {
|
|
|
269
269
|
}
|
|
270
270
|
return !1;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Se(e) {
|
|
273
273
|
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
274
274
|
}
|
|
275
275
|
function Kt(e, t) {
|
|
@@ -405,7 +405,7 @@ function ue(e, t) {
|
|
|
405
405
|
} = t === void 0 ? {} : t, i = n;
|
|
406
406
|
do
|
|
407
407
|
i += r ? -s : s;
|
|
408
|
-
while (i >= 0 && i <= e.current.length - 1 &&
|
|
408
|
+
while (i >= 0 && i <= e.current.length - 1 && ze(e, i, o));
|
|
409
409
|
return i;
|
|
410
410
|
}
|
|
411
411
|
function tr(e, t) {
|
|
@@ -514,7 +514,7 @@ function rr(e, t, n, r, o) {
|
|
|
514
514
|
function or(e, t) {
|
|
515
515
|
return t.flatMap((n, r) => e.includes(n) ? [r] : []);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function ze(e, t, n) {
|
|
518
518
|
if (typeof n == "function")
|
|
519
519
|
return n(t);
|
|
520
520
|
if (n)
|
|
@@ -563,7 +563,7 @@ function bn(e, t, n) {
|
|
|
563
563
|
reference: r,
|
|
564
564
|
floating: o
|
|
565
565
|
} = e;
|
|
566
|
-
const s =
|
|
566
|
+
const s = Pe(t), i = qn(t), c = jn(i), a = Te(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
|
|
567
567
|
let d;
|
|
568
568
|
switch (a) {
|
|
569
569
|
case "top":
|
|
@@ -807,7 +807,7 @@ const to = function(e) {
|
|
|
807
807
|
} = Ze(e, t);
|
|
808
808
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
809
809
|
return {};
|
|
810
|
-
const R = Te(o), v =
|
|
810
|
+
const R = Te(o), v = Pe(c), x = Te(c) === c, C = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : Lr(c)), k = h !== "none";
|
|
811
811
|
!g && k && A.push(...Nr(c, m, h, C));
|
|
812
812
|
const N = [c, ...A], D = await kt(t, y), L = [];
|
|
813
813
|
let F = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -821,7 +821,9 @@ const to = function(e) {
|
|
|
821
821
|
}], !L.every((O) => O <= 0)) {
|
|
822
822
|
var _, U;
|
|
823
823
|
const O = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, w = N[O];
|
|
824
|
-
if (w)
|
|
824
|
+
if (w && (!(p === "alignment" ? v !== Pe(w) : !1) || // We leave the current main axis only if every placement on that axis
|
|
825
|
+
// overflows the main axis.
|
|
826
|
+
F.every((b) => b.overflows[0] > 0 && Pe(b.placement) === v)))
|
|
825
827
|
return {
|
|
826
828
|
data: {
|
|
827
829
|
index: O,
|
|
@@ -838,13 +840,13 @@ const to = function(e) {
|
|
|
838
840
|
var K;
|
|
839
841
|
const T = (K = F.filter((b) => {
|
|
840
842
|
if (k) {
|
|
841
|
-
const E =
|
|
843
|
+
const E = Pe(b.placement);
|
|
842
844
|
return E === v || // Create a bias to the `y` side axis due to horizontal
|
|
843
845
|
// reading directions favoring greater width.
|
|
844
846
|
E === "y";
|
|
845
847
|
}
|
|
846
848
|
return !0;
|
|
847
|
-
}).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E,
|
|
849
|
+
}).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, S) => E + S, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : K[0];
|
|
848
850
|
T && (W = T);
|
|
849
851
|
break;
|
|
850
852
|
}
|
|
@@ -868,7 +870,7 @@ async function ro(e, t) {
|
|
|
868
870
|
placement: n,
|
|
869
871
|
platform: r,
|
|
870
872
|
elements: o
|
|
871
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a =
|
|
873
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a = Pe(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
|
|
872
874
|
let {
|
|
873
875
|
mainAxis: g,
|
|
874
876
|
crossAxis: d,
|
|
@@ -940,7 +942,7 @@ const oo = function(e) {
|
|
|
940
942
|
} = Ze(e, t), u = {
|
|
941
943
|
x: n,
|
|
942
944
|
y: r
|
|
943
|
-
}, l = await kt(t, a), p =
|
|
945
|
+
}, l = await kt(t, a), p = Pe(Te(o)), g = Gn(p);
|
|
944
946
|
let d = u[g], h = u[p];
|
|
945
947
|
if (s) {
|
|
946
948
|
const y = g === "y" ? "top" : "left", R = g === "y" ? "bottom" : "right", v = d + l[y], x = d - l[R];
|
|
@@ -983,7 +985,7 @@ const oo = function(e) {
|
|
|
983
985
|
apply: a = () => {
|
|
984
986
|
},
|
|
985
987
|
...u
|
|
986
|
-
} = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d =
|
|
988
|
+
} = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d = Pe(o) === "y", {
|
|
987
989
|
width: h,
|
|
988
990
|
height: m
|
|
989
991
|
} = s.floating;
|
|
@@ -1040,7 +1042,7 @@ function Xe(e) {
|
|
|
1040
1042
|
const co = /* @__PURE__ */ Ce(0);
|
|
1041
1043
|
function lr(e) {
|
|
1042
1044
|
const t = he(e);
|
|
1043
|
-
return !
|
|
1045
|
+
return !Pt() || !t.visualViewport ? co : {
|
|
1044
1046
|
x: t.visualViewport.offsetLeft,
|
|
1045
1047
|
y: t.visualViewport.offsetTop
|
|
1046
1048
|
};
|
|
@@ -1092,7 +1094,7 @@ function lo(e) {
|
|
|
1092
1094
|
offsetParent: r,
|
|
1093
1095
|
strategy: o
|
|
1094
1096
|
} = e;
|
|
1095
|
-
const s = o === "fixed", i = Oe(r), c = t ?
|
|
1097
|
+
const s = o === "fixed", i = Oe(r), c = t ? St(t.floating) : !1;
|
|
1096
1098
|
if (r === i || c && s)
|
|
1097
1099
|
return n;
|
|
1098
1100
|
let a = {
|
|
@@ -1100,7 +1102,7 @@ function lo(e) {
|
|
|
1100
1102
|
scrollTop: 0
|
|
1101
1103
|
}, u = Ce(1);
|
|
1102
1104
|
const l = Ce(0), p = re(r);
|
|
1103
|
-
if ((p || !p && !s) && ((
|
|
1105
|
+
if ((p || !p && !s) && ((Ke(r) !== "body" || ut(i)) && (a = Dt(r)), re(r))) {
|
|
1104
1106
|
const d = Ue(r);
|
|
1105
1107
|
u = Xe(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
|
|
1106
1108
|
}
|
|
@@ -1131,7 +1133,7 @@ function mo(e, t) {
|
|
|
1131
1133
|
let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
|
|
1132
1134
|
if (o) {
|
|
1133
1135
|
s = o.width, i = o.height;
|
|
1134
|
-
const u =
|
|
1136
|
+
const u = Pt();
|
|
1135
1137
|
(!u || u && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
|
|
1136
1138
|
}
|
|
1137
1139
|
return {
|
|
@@ -1170,19 +1172,19 @@ function yn(e, t, n) {
|
|
|
1170
1172
|
return Ct(r);
|
|
1171
1173
|
}
|
|
1172
1174
|
function fr(e, t) {
|
|
1173
|
-
const n =
|
|
1174
|
-
return n === t || !Y(n) ||
|
|
1175
|
+
const n = ke(e);
|
|
1176
|
+
return n === t || !Y(n) || De(n) ? !1 : we(n).position === "fixed" || fr(n, t);
|
|
1175
1177
|
}
|
|
1176
1178
|
function go(e, t) {
|
|
1177
1179
|
const n = t.get(e);
|
|
1178
1180
|
if (n)
|
|
1179
1181
|
return n;
|
|
1180
|
-
let r =
|
|
1182
|
+
let r = Fe(e, [], !1).filter((c) => Y(c) && Ke(c) !== "body"), o = null;
|
|
1181
1183
|
const s = we(e).position === "fixed";
|
|
1182
|
-
let i = s ?
|
|
1183
|
-
for (; Y(i) && !
|
|
1184
|
+
let i = s ? ke(e) : e;
|
|
1185
|
+
for (; Y(i) && !De(i); ) {
|
|
1184
1186
|
const c = we(i), a = nn(i);
|
|
1185
|
-
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i =
|
|
1187
|
+
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = ke(i);
|
|
1186
1188
|
}
|
|
1187
1189
|
return t.set(e, r), r;
|
|
1188
1190
|
}
|
|
@@ -1193,7 +1195,7 @@ function ho(e) {
|
|
|
1193
1195
|
rootBoundary: r,
|
|
1194
1196
|
strategy: o
|
|
1195
1197
|
} = e;
|
|
1196
|
-
const i = [...n === "clippingAncestors" ?
|
|
1198
|
+
const i = [...n === "clippingAncestors" ? St(t) ? [] : go(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
|
|
1197
1199
|
const p = yn(t, l, o);
|
|
1198
1200
|
return u.top = be(p.top, u.top), u.right = Qe(p.right, u.right), u.bottom = Qe(p.bottom, u.bottom), u.left = be(p.left, u.left), u;
|
|
1199
1201
|
}, yn(t, c, o));
|
|
@@ -1221,15 +1223,19 @@ function bo(e, t, n) {
|
|
|
1221
1223
|
scrollTop: 0
|
|
1222
1224
|
};
|
|
1223
1225
|
const a = Ce(0);
|
|
1226
|
+
function u() {
|
|
1227
|
+
a.x = cn(o);
|
|
1228
|
+
}
|
|
1224
1229
|
if (r || !r && !s)
|
|
1225
|
-
if ((
|
|
1226
|
-
const
|
|
1227
|
-
a.x =
|
|
1228
|
-
} else o && (
|
|
1229
|
-
|
|
1230
|
+
if ((Ke(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
|
|
1231
|
+
const d = Ue(t, !0, s, t);
|
|
1232
|
+
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
1233
|
+
} else o && u();
|
|
1234
|
+
s && !r && o && u();
|
|
1235
|
+
const l = o && !r && !s ? ar(o, c) : Ce(0), p = i.left + c.scrollLeft - a.x - l.x, g = i.top + c.scrollTop - a.y - l.y;
|
|
1230
1236
|
return {
|
|
1231
|
-
x:
|
|
1232
|
-
y:
|
|
1237
|
+
x: p,
|
|
1238
|
+
y: g,
|
|
1233
1239
|
width: i.width,
|
|
1234
1240
|
height: i.height
|
|
1235
1241
|
};
|
|
@@ -1247,21 +1253,21 @@ function xn(e, t) {
|
|
|
1247
1253
|
}
|
|
1248
1254
|
function dr(e, t) {
|
|
1249
1255
|
const n = he(e);
|
|
1250
|
-
if (
|
|
1256
|
+
if (St(e))
|
|
1251
1257
|
return n;
|
|
1252
1258
|
if (!re(e)) {
|
|
1253
|
-
let o =
|
|
1254
|
-
for (; o && !
|
|
1259
|
+
let o = ke(e);
|
|
1260
|
+
for (; o && !De(o); ) {
|
|
1255
1261
|
if (Y(o) && !Vt(o))
|
|
1256
1262
|
return o;
|
|
1257
|
-
o =
|
|
1263
|
+
o = ke(o);
|
|
1258
1264
|
}
|
|
1259
1265
|
return n;
|
|
1260
1266
|
}
|
|
1261
1267
|
let r = xn(e, t);
|
|
1262
1268
|
for (; r && Mr(r) && Vt(r); )
|
|
1263
1269
|
r = xn(r, t);
|
|
1264
|
-
return r &&
|
|
1270
|
+
return r && De(r) && Vt(r) && !nn(r) ? n : r || Sr(e) || n;
|
|
1265
1271
|
}
|
|
1266
1272
|
const yo = async function(e) {
|
|
1267
1273
|
const t = this.getOffsetParent || dr, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -1347,7 +1353,7 @@ function ui(e, t, n, r) {
|
|
|
1347
1353
|
elementResize: i = typeof ResizeObserver == "function",
|
|
1348
1354
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1349
1355
|
animationFrame: a = !1
|
|
1350
|
-
} = r, u = sn(e), l = o || s ? [...u ?
|
|
1356
|
+
} = r, u = sn(e), l = o || s ? [...u ? Fe(u) : [], ...Fe(t)] : [];
|
|
1351
1357
|
l.forEach((R) => {
|
|
1352
1358
|
o && R.addEventListener("scroll", n, {
|
|
1353
1359
|
passive: !0
|
|
@@ -1388,8 +1394,8 @@ const Eo = oo, Co = to, Io = io, To = no, Oo = so, Ao = (e, t, n) => {
|
|
|
1388
1394
|
platform: s
|
|
1389
1395
|
});
|
|
1390
1396
|
};
|
|
1391
|
-
var Mo = typeof document < "u",
|
|
1392
|
-
}, xt = Mo ? $n :
|
|
1397
|
+
var Mo = typeof document < "u", So = function() {
|
|
1398
|
+
}, xt = Mo ? $n : So;
|
|
1393
1399
|
function Tt(e, t) {
|
|
1394
1400
|
if (e === t)
|
|
1395
1401
|
return !0;
|
|
@@ -1433,7 +1439,7 @@ function $t(e) {
|
|
|
1433
1439
|
t.current = e;
|
|
1434
1440
|
}), t;
|
|
1435
1441
|
}
|
|
1436
|
-
function
|
|
1442
|
+
function Po(e) {
|
|
1437
1443
|
e === void 0 && (e = {});
|
|
1438
1444
|
const {
|
|
1439
1445
|
placement: t = "bottom",
|
|
@@ -1469,7 +1475,7 @@ function So(e) {
|
|
|
1469
1475
|
middleware: g
|
|
1470
1476
|
};
|
|
1471
1477
|
_.current && (b.platform = _.current), Ao(k.current, N.current, b).then((E) => {
|
|
1472
|
-
const
|
|
1478
|
+
const S = {
|
|
1473
1479
|
...E,
|
|
1474
1480
|
// The floating element's position may be recomputed while it's closed
|
|
1475
1481
|
// but still mounted (such as when transitioning out). To ensure
|
|
@@ -1477,8 +1483,8 @@ function So(e) {
|
|
|
1477
1483
|
// setting it to `true` when `open === false` (must be specified).
|
|
1478
1484
|
isPositioned: U.current !== !1
|
|
1479
1485
|
};
|
|
1480
|
-
O.current && !Tt(D.current,
|
|
1481
|
-
p(
|
|
1486
|
+
O.current && !Tt(D.current, S) && (D.current = S, tn.flushSync(() => {
|
|
1487
|
+
p(S);
|
|
1482
1488
|
}));
|
|
1483
1489
|
});
|
|
1484
1490
|
}, [g, t, n, _, U]);
|
|
@@ -1514,17 +1520,17 @@ function So(e) {
|
|
|
1514
1520
|
};
|
|
1515
1521
|
if (!W.floating)
|
|
1516
1522
|
return b;
|
|
1517
|
-
const E = wn(W.floating, l.x),
|
|
1523
|
+
const E = wn(W.floating, l.x), S = wn(W.floating, l.y);
|
|
1518
1524
|
return c ? {
|
|
1519
1525
|
...b,
|
|
1520
|
-
transform: "translate(" + E + "px, " +
|
|
1526
|
+
transform: "translate(" + E + "px, " + S + "px)",
|
|
1521
1527
|
...pr(W.floating) >= 1.5 && {
|
|
1522
1528
|
willChange: "transform"
|
|
1523
1529
|
}
|
|
1524
1530
|
} : {
|
|
1525
1531
|
position: n,
|
|
1526
1532
|
left: E,
|
|
1527
|
-
top:
|
|
1533
|
+
top: S
|
|
1528
1534
|
};
|
|
1529
1535
|
}, [n, c, W.floating, l.x, l.y]);
|
|
1530
1536
|
return f.useMemo(() => ({
|
|
@@ -1648,7 +1654,7 @@ function Fo(e) {
|
|
|
1648
1654
|
index: c ?? -1
|
|
1649
1655
|
}), [c, l]);
|
|
1650
1656
|
}
|
|
1651
|
-
const No = "data-floating-ui-focusable", Rn = "active", En = "selected",
|
|
1657
|
+
const No = "data-floating-ui-focusable", Rn = "active", En = "selected", _e = "ArrowLeft", We = "ArrowRight", st = "ArrowUp", Ne = "ArrowDown";
|
|
1652
1658
|
function hr(e, t) {
|
|
1653
1659
|
return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ ge("div", {
|
|
1654
1660
|
...t
|
|
@@ -1658,7 +1664,7 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1658
1664
|
activeIndex: 0,
|
|
1659
1665
|
onNavigate: () => {
|
|
1660
1666
|
}
|
|
1661
|
-
}), br = [
|
|
1667
|
+
}), br = [_e, We], yr = [st, Ne], Bt = [...br, ...yr], pi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
1662
1668
|
const {
|
|
1663
1669
|
render: r,
|
|
1664
1670
|
orientation: o = "both",
|
|
@@ -1678,14 +1684,14 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1678
1684
|
function k(D) {
|
|
1679
1685
|
if (!Bt.includes(D.key)) return;
|
|
1680
1686
|
let L = y;
|
|
1681
|
-
const F = yt(v, a), _ = en(v, a), U = i ?
|
|
1687
|
+
const F = yt(v, a), _ = en(v, a), U = i ? _e : We, K = i ? We : _e;
|
|
1682
1688
|
if (A) {
|
|
1683
1689
|
const b = p || Array.from({
|
|
1684
1690
|
length: v.current.length
|
|
1685
1691
|
}, () => ({
|
|
1686
1692
|
width: 1,
|
|
1687
1693
|
height: 1
|
|
1688
|
-
})), E = nr(b, c, g),
|
|
1694
|
+
})), E = nr(b, c, g), S = E.findIndex((V) => V != null && !ze(v, V, a)), G = E.reduce((V, ee, ae) => ee != null && !ze(v, ee, a) ? ae : V, -1), I = E[tr({
|
|
1689
1695
|
current: E.map((V) => V ? v.current[V] : null)
|
|
1690
1696
|
}, {
|
|
1691
1697
|
event: D,
|
|
@@ -1695,8 +1701,8 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1695
1701
|
cols: c,
|
|
1696
1702
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
1697
1703
|
// don't end up in them
|
|
1698
|
-
disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) =>
|
|
1699
|
-
minIndex:
|
|
1704
|
+
disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) => ze(v, ee, a) ? ee : void 0), void 0], E),
|
|
1705
|
+
minIndex: S,
|
|
1700
1706
|
maxIndex: G,
|
|
1701
1707
|
prevIndex: rr(
|
|
1702
1708
|
y > _ ? F : y,
|
|
@@ -1706,15 +1712,15 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1706
1712
|
// use a corner matching the edge closest to the direction we're
|
|
1707
1713
|
// moving in so we don't end up in the same item. Prefer
|
|
1708
1714
|
// top/left over bottom/right.
|
|
1709
|
-
D.key ===
|
|
1715
|
+
D.key === Ne ? "bl" : D.key === U ? "tr" : "tl"
|
|
1710
1716
|
)
|
|
1711
1717
|
})];
|
|
1712
1718
|
I != null && (L = I);
|
|
1713
1719
|
}
|
|
1714
1720
|
const O = {
|
|
1715
1721
|
horizontal: [U],
|
|
1716
|
-
vertical: [
|
|
1717
|
-
both: [U,
|
|
1722
|
+
vertical: [Ne],
|
|
1723
|
+
both: [U, Ne]
|
|
1718
1724
|
}[o], w = {
|
|
1719
1725
|
horizontal: [K],
|
|
1720
1726
|
vertical: [st],
|
|
@@ -1937,8 +1943,8 @@ function yi(e, t) {
|
|
|
1937
1943
|
}, [i.floating, n, r, c, m, _]);
|
|
1938
1944
|
const U = f.useCallback(function(T, b, E) {
|
|
1939
1945
|
b === void 0 && (b = !0), E === void 0 && (E = "hover");
|
|
1940
|
-
const
|
|
1941
|
-
|
|
1946
|
+
const S = zt(y.current, "close", x.current);
|
|
1947
|
+
S && !A.current ? (ve(C), C.current = window.setTimeout(() => r(!1, T, E), S)) : b && (ve(C), r(!1, T, E));
|
|
1942
1948
|
}, [y, r]), K = se(() => {
|
|
1943
1949
|
L.current(), A.current = void 0;
|
|
1944
1950
|
}), O = se(() => {
|
|
@@ -1993,7 +1999,7 @@ function yi(e, t) {
|
|
|
1993
1999
|
}
|
|
1994
2000
|
})(I));
|
|
1995
2001
|
}
|
|
1996
|
-
function
|
|
2002
|
+
function S() {
|
|
1997
2003
|
ve(C);
|
|
1998
2004
|
}
|
|
1999
2005
|
function G(I) {
|
|
@@ -2003,8 +2009,8 @@ function yi(e, t) {
|
|
|
2003
2009
|
const I = i.domReference, V = i.floating;
|
|
2004
2010
|
return n && I.addEventListener("mouseleave", E), g && I.addEventListener("mousemove", T, {
|
|
2005
2011
|
once: !0
|
|
2006
|
-
}), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter",
|
|
2007
|
-
n && I.removeEventListener("mouseleave", E), g && I.removeEventListener("mousemove", T), I.removeEventListener("mouseenter", T), I.removeEventListener("mouseleave", b), V && (V.removeEventListener("mouseleave", E), V.removeEventListener("mouseenter",
|
|
2012
|
+
}), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter", S), V.addEventListener("mouseleave", G)), () => {
|
|
2013
|
+
n && I.removeEventListener("mouseleave", E), g && I.removeEventListener("mousemove", T), I.removeEventListener("mouseenter", T), I.removeEventListener("mouseleave", b), V && (V.removeEventListener("mouseleave", E), V.removeEventListener("mouseenter", S), V.removeEventListener("mouseleave", G));
|
|
2008
2014
|
};
|
|
2009
2015
|
}
|
|
2010
2016
|
}, [i, c, e, l, g, U, K, O, r, n, R, d, y, m, o, w, v]), X(() => {
|
|
@@ -2014,11 +2020,11 @@ function yi(e, t) {
|
|
|
2014
2020
|
const E = i.floating;
|
|
2015
2021
|
if (Y(i.domReference) && E) {
|
|
2016
2022
|
var b;
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2023
|
+
const S = le(i.floating).body;
|
|
2024
|
+
S.setAttribute(Tn, "");
|
|
2019
2025
|
const G = i.domReference, I = d == null || (b = d.nodesRef.current.find((V) => V.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
|
|
2020
|
-
return I && (I.style.pointerEvents = ""),
|
|
2021
|
-
|
|
2026
|
+
return I && (I.style.pointerEvents = ""), S.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
|
|
2027
|
+
S.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
|
|
2022
2028
|
};
|
|
2023
2029
|
}
|
|
2024
2030
|
}
|
|
@@ -2038,10 +2044,10 @@ function yi(e, t) {
|
|
|
2038
2044
|
const {
|
|
2039
2045
|
nativeEvent: E
|
|
2040
2046
|
} = b;
|
|
2041
|
-
function
|
|
2047
|
+
function S() {
|
|
2042
2048
|
!N.current && !R.current && r(!0, E, "hover");
|
|
2043
2049
|
}
|
|
2044
|
-
l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ?
|
|
2050
|
+
l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? S() : (F.current = !0, k.current = window.setTimeout(S, Ut(v.current))));
|
|
2045
2051
|
}
|
|
2046
2052
|
};
|
|
2047
2053
|
}, [l, r, n, R, v]);
|
|
@@ -2050,7 +2056,7 @@ function yi(e, t) {
|
|
|
2050
2056
|
} : {}, [c, W]);
|
|
2051
2057
|
}
|
|
2052
2058
|
let On = 0;
|
|
2053
|
-
function
|
|
2059
|
+
function Be(e, t) {
|
|
2054
2060
|
t === void 0 && (t = {});
|
|
2055
2061
|
const {
|
|
2056
2062
|
preventScroll: n = !1,
|
|
@@ -2091,7 +2097,7 @@ function Uo(e, t, n, r) {
|
|
|
2091
2097
|
}
|
|
2092
2098
|
function g(d) {
|
|
2093
2099
|
!d || a.has(d) || [].forEach.call(d.children, (h) => {
|
|
2094
|
-
if (
|
|
2100
|
+
if (Ke(h) !== "script")
|
|
2095
2101
|
if (c.has(h))
|
|
2096
2102
|
g(h);
|
|
2097
2103
|
else {
|
|
@@ -2142,7 +2148,7 @@ const Ft = {
|
|
|
2142
2148
|
...t,
|
|
2143
2149
|
...s
|
|
2144
2150
|
});
|
|
2145
|
-
}), Cr = /* @__PURE__ */ f.createContext(null),
|
|
2151
|
+
}), Cr = /* @__PURE__ */ f.createContext(null), Sn = /* @__PURE__ */ Ge("portal");
|
|
2146
2152
|
function Go(e) {
|
|
2147
2153
|
e === void 0 && (e = {});
|
|
2148
2154
|
const {
|
|
@@ -2158,7 +2164,7 @@ function Go(e) {
|
|
|
2158
2164
|
const a = t ? document.getElementById(t) : null;
|
|
2159
2165
|
if (!a) return;
|
|
2160
2166
|
const u = document.createElement("div");
|
|
2161
|
-
u.id = r, u.setAttribute(
|
|
2167
|
+
u.id = r, u.setAttribute(Sn, ""), a.appendChild(u), c.current = u, i(u);
|
|
2162
2168
|
}, [t, r]), X(() => {
|
|
2163
2169
|
if (n === null || !r || c.current) return;
|
|
2164
2170
|
let a = n || (o == null ? void 0 : o.portalNode);
|
|
@@ -2166,7 +2172,7 @@ function Go(e) {
|
|
|
2166
2172
|
let u = null;
|
|
2167
2173
|
t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
|
|
2168
2174
|
const l = document.createElement("div");
|
|
2169
|
-
l.id = r, l.setAttribute(
|
|
2175
|
+
l.id = r, l.setAttribute(Sn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
|
|
2170
2176
|
}, [t, n, r, o]), s;
|
|
2171
2177
|
}
|
|
2172
2178
|
function xi(e) {
|
|
@@ -2237,7 +2243,7 @@ function xi(e) {
|
|
|
2237
2243
|
});
|
|
2238
2244
|
}
|
|
2239
2245
|
const Ir = () => f.useContext(Cr);
|
|
2240
|
-
function
|
|
2246
|
+
function Pn(e) {
|
|
2241
2247
|
return f.useMemo(() => (t) => {
|
|
2242
2248
|
e.forEach((n) => {
|
|
2243
2249
|
n && (n.current = t);
|
|
@@ -2245,12 +2251,12 @@ function Sn(e) {
|
|
|
2245
2251
|
}, e);
|
|
2246
2252
|
}
|
|
2247
2253
|
const jo = 20;
|
|
2248
|
-
let
|
|
2254
|
+
let He = [];
|
|
2249
2255
|
function qo(e) {
|
|
2250
|
-
|
|
2256
|
+
He = He.filter((t) => t.isConnected), e && Ke(e) !== "body" && (He.push(e), He.length > jo && (He = He.slice(-20)));
|
|
2251
2257
|
}
|
|
2252
2258
|
function Dn() {
|
|
2253
|
-
return
|
|
2259
|
+
return He.slice().reverse().find((e) => e.isConnected);
|
|
2254
2260
|
}
|
|
2255
2261
|
function Yo(e) {
|
|
2256
2262
|
const t = lt();
|
|
@@ -2302,7 +2308,7 @@ function wi(e) {
|
|
|
2302
2308
|
} = t, C = se(() => {
|
|
2303
2309
|
var H;
|
|
2304
2310
|
return (H = R.current.floatingContext) == null ? void 0 : H.nodeId;
|
|
2305
|
-
}), A = se(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, D = Ho(), L = D ? s : !0, F = !L || D && g, _ = xe(o), U = xe(i), K = xe(c), O = tt(), w = Ir(), W = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1),
|
|
2311
|
+
}), A = se(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, D = Ho(), L = D ? s : !0, F = !L || D && g, _ = xe(o), U = xe(i), K = xe(c), O = tt(), w = Ir(), W = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1), S = f.useRef(-1), G = w != null, I = It(x), V = se(function(H) {
|
|
2306
2312
|
return H === void 0 && (H = I), H ? At(H, lt()) : [];
|
|
2307
2313
|
}), ee = se((H) => {
|
|
2308
2314
|
const z = V(H);
|
|
@@ -2313,8 +2319,8 @@ function wi(e) {
|
|
|
2313
2319
|
function H($) {
|
|
2314
2320
|
if ($.key === "Tab") {
|
|
2315
2321
|
ce(I, Ee(le(I))) && V().length === 0 && !N && pe($);
|
|
2316
|
-
const B = ee(), oe =
|
|
2317
|
-
_.current[0] === "reference" && oe === v && (pe($), $.shiftKey ?
|
|
2322
|
+
const B = ee(), oe = Se($);
|
|
2323
|
+
_.current[0] === "reference" && oe === v && (pe($), $.shiftKey ? Be(B[B.length - 1]) : Be(B[1])), _.current[1] === "floating" && oe === I && $.shiftKey && (pe($), Be(B[0]));
|
|
2318
2324
|
}
|
|
2319
2325
|
}
|
|
2320
2326
|
const z = le(I);
|
|
@@ -2324,8 +2330,8 @@ function wi(e) {
|
|
|
2324
2330
|
}, [r, v, I, u, _, N, V, ee]), f.useEffect(() => {
|
|
2325
2331
|
if (r || !x) return;
|
|
2326
2332
|
function H(z) {
|
|
2327
|
-
const $ =
|
|
2328
|
-
oe !== -1 && (
|
|
2333
|
+
const $ = Se(z), oe = V().indexOf($);
|
|
2334
|
+
oe !== -1 && (S.current = oe);
|
|
2329
2335
|
}
|
|
2330
2336
|
return x.addEventListener("focusin", H), () => {
|
|
2331
2337
|
x.removeEventListener("focusin", H);
|
|
@@ -2338,7 +2344,7 @@ function wi(e) {
|
|
|
2338
2344
|
});
|
|
2339
2345
|
}
|
|
2340
2346
|
function z($) {
|
|
2341
|
-
const B = $.relatedTarget, oe = $.currentTarget, ne =
|
|
2347
|
+
const B = $.relatedTarget, oe = $.currentTarget, ne = Se($);
|
|
2342
2348
|
queueMicrotask(() => {
|
|
2343
2349
|
const de = C(), me = !(ce(v, B) || ce(x, B) || ce(B, x) || ce(w == null ? void 0 : w.portalNode, B) || B != null && B.hasAttribute(Ge("focus-guard")) || O && (qe(O.nodesRef.current, de).find((q) => {
|
|
2344
2350
|
var J, Re;
|
|
@@ -2349,7 +2355,7 @@ function wi(e) {
|
|
|
2349
2355
|
})));
|
|
2350
2356
|
if (oe === v && I && kn(I, _), a && oe !== v && !(ne != null && ne.isConnected) && Ee(le(I)) === le(I).body) {
|
|
2351
2357
|
re(I) && I.focus();
|
|
2352
|
-
const q =
|
|
2358
|
+
const q = S.current, J = V(), Re = J[q] || J[J.length - 1] || I;
|
|
2353
2359
|
re(Re) && Re.focus();
|
|
2354
2360
|
}
|
|
2355
2361
|
if (R.current.insideReactTree) {
|
|
@@ -2365,7 +2371,7 @@ function wi(e) {
|
|
|
2365
2371
|
v.removeEventListener("focusout", z), v.removeEventListener("pointerdown", H), x.removeEventListener("focusout", z);
|
|
2366
2372
|
};
|
|
2367
2373
|
}, [r, v, x, I, u, O, w, m, p, a, V, N, C, _, R]);
|
|
2368
|
-
const ae = f.useRef(null), te = f.useRef(null), fe =
|
|
2374
|
+
const ae = f.useRef(null), te = f.useRef(null), fe = Pn([ae, w == null ? void 0 : w.beforeInsideRef]), Ae = Pn([te, w == null ? void 0 : w.afterInsideRef]);
|
|
2369
2375
|
f.useEffect(() => {
|
|
2370
2376
|
var H, z;
|
|
2371
2377
|
if (r || !x) return;
|
|
@@ -2384,7 +2390,7 @@ function wi(e) {
|
|
|
2384
2390
|
const H = le(I), z = Ee(H);
|
|
2385
2391
|
queueMicrotask(() => {
|
|
2386
2392
|
const $ = ee(I), B = U.current, oe = (typeof B == "number" ? $[B] : B.current) || I, ne = ce(I, z);
|
|
2387
|
-
!k && !ne && h &&
|
|
2393
|
+
!k && !ne && h && Be(oe, {
|
|
2388
2394
|
preventScroll: oe === I
|
|
2389
2395
|
});
|
|
2390
2396
|
});
|
|
@@ -2457,7 +2463,7 @@ function wi(e) {
|
|
|
2457
2463
|
}, [r, w, u, h, m, p, v]), X(() => {
|
|
2458
2464
|
r || I && kn(I, _);
|
|
2459
2465
|
}, [r, I, _]);
|
|
2460
|
-
function
|
|
2466
|
+
function Ve(H) {
|
|
2461
2467
|
return r || !l || !u ? null : /* @__PURE__ */ ge(Xo, {
|
|
2462
2468
|
ref: H === "start" ? W : T,
|
|
2463
2469
|
onClick: (z) => m(!1, z.nativeEvent),
|
|
@@ -2472,7 +2478,7 @@ function wi(e) {
|
|
|
2472
2478
|
onFocus: (H) => {
|
|
2473
2479
|
if (u) {
|
|
2474
2480
|
const $ = ee();
|
|
2475
|
-
|
|
2481
|
+
Be(o[0] === "reference" ? $[0] : $[$.length - 1]);
|
|
2476
2482
|
} else if (w != null && w.preserveTabOrder && w.portalNode)
|
|
2477
2483
|
if (b.current = !1, ot(H, w.portalNode)) {
|
|
2478
2484
|
const $ = sr(v);
|
|
@@ -2482,12 +2488,12 @@ function wi(e) {
|
|
|
2482
2488
|
(z = w.beforeOutsideRef.current) == null || z.focus();
|
|
2483
2489
|
}
|
|
2484
2490
|
}
|
|
2485
|
-
}), !N &&
|
|
2491
|
+
}), !N && Ve("start"), n, Ve("end"), Me && /* @__PURE__ */ ge(Ot, {
|
|
2486
2492
|
"data-type": "inside",
|
|
2487
2493
|
ref: Ae,
|
|
2488
2494
|
onFocus: (H) => {
|
|
2489
2495
|
if (u)
|
|
2490
|
-
|
|
2496
|
+
Be(ee()[0]);
|
|
2491
2497
|
else if (w != null && w.preserveTabOrder && w.portalNode)
|
|
2492
2498
|
if (p && (b.current = !0), ot(H, w.portalNode)) {
|
|
2493
2499
|
const $ = cr(v);
|
|
@@ -2650,9 +2656,9 @@ function Ci(e, t) {
|
|
|
2650
2656
|
const T = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, b = m ? qe(m.nodesRef.current, T) : [];
|
|
2651
2657
|
if (!x && (w.stopPropagation(), b.length > 0)) {
|
|
2652
2658
|
let E = !0;
|
|
2653
|
-
if (b.forEach((
|
|
2659
|
+
if (b.forEach((S) => {
|
|
2654
2660
|
var G;
|
|
2655
|
-
if ((G =
|
|
2661
|
+
if ((G = S.context) != null && G.open && !S.context.dataRef.current.__escapeKeyBubbles) {
|
|
2656
2662
|
E = !1;
|
|
2657
2663
|
return;
|
|
2658
2664
|
}
|
|
@@ -2664,9 +2670,9 @@ function Ci(e, t) {
|
|
|
2664
2670
|
var W;
|
|
2665
2671
|
const T = () => {
|
|
2666
2672
|
var b;
|
|
2667
|
-
L(w), (b =
|
|
2673
|
+
L(w), (b = Se(w)) == null || b.removeEventListener("keydown", T);
|
|
2668
2674
|
};
|
|
2669
|
-
(W =
|
|
2675
|
+
(W = Se(w)) == null || W.addEventListener("keydown", T);
|
|
2670
2676
|
}), _ = se((w) => {
|
|
2671
2677
|
var W;
|
|
2672
2678
|
const T = s.current.insideReactTree;
|
|
@@ -2674,11 +2680,11 @@ function Ci(e, t) {
|
|
|
2674
2680
|
const b = v.current;
|
|
2675
2681
|
if (v.current = !1, u === "click" && b || T || typeof R == "function" && !R(w))
|
|
2676
2682
|
return;
|
|
2677
|
-
const E =
|
|
2683
|
+
const E = Se(w), S = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(S);
|
|
2678
2684
|
let I = Y(E) ? E : null;
|
|
2679
|
-
for (; I && !
|
|
2680
|
-
const te =
|
|
2681
|
-
if (
|
|
2685
|
+
for (; I && !De(I); ) {
|
|
2686
|
+
const te = ke(I);
|
|
2687
|
+
if (De(te) || !Y(te))
|
|
2682
2688
|
break;
|
|
2683
2689
|
I = te;
|
|
2684
2690
|
}
|
|
@@ -2688,7 +2694,7 @@ function Ci(e, t) {
|
|
|
2688
2694
|
Array.from(G).every((te) => !ce(I, te)))
|
|
2689
2695
|
return;
|
|
2690
2696
|
if (re(E) && O) {
|
|
2691
|
-
const te =
|
|
2697
|
+
const te = De(E), fe = we(E), Ae = /auto|scroll/, Ve = te || Ae.test(fe.overflowX), Me = te || Ae.test(fe.overflowY), H = Ve && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, z = Me && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, $ = fe.direction === "rtl", B = z && ($ ? w.offsetX <= E.offsetWidth - E.clientWidth : w.offsetX > E.clientWidth), oe = H && w.offsetY > E.clientHeight;
|
|
2692
2698
|
if (B || oe)
|
|
2693
2699
|
return;
|
|
2694
2700
|
}
|
|
@@ -2715,9 +2721,9 @@ function Ci(e, t) {
|
|
|
2715
2721
|
var W;
|
|
2716
2722
|
const T = () => {
|
|
2717
2723
|
var b;
|
|
2718
|
-
_(w), (b =
|
|
2724
|
+
_(w), (b = Se(w)) == null || b.removeEventListener(u, T);
|
|
2719
2725
|
};
|
|
2720
|
-
(W =
|
|
2726
|
+
(W = Se(w)) == null || W.addEventListener(u, T);
|
|
2721
2727
|
});
|
|
2722
2728
|
f.useEffect(() => {
|
|
2723
2729
|
if (!n || !i)
|
|
@@ -2737,21 +2743,21 @@ function Ci(e, t) {
|
|
|
2737
2743
|
},
|
|
2738
2744
|
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
2739
2745
|
// Only apply to WebKit for the test to remain 0ms.
|
|
2740
|
-
|
|
2746
|
+
Pt() ? 5 : 0
|
|
2741
2747
|
);
|
|
2742
2748
|
}
|
|
2743
2749
|
const E = le(o.floating);
|
|
2744
2750
|
c && (E.addEventListener("keydown", A ? F : L, A), E.addEventListener("compositionstart", T), E.addEventListener("compositionend", b)), R && E.addEventListener(u, k ? U : _, k);
|
|
2745
|
-
let
|
|
2746
|
-
return g && (Y(o.domReference) && (
|
|
2751
|
+
let S = [];
|
|
2752
|
+
return g && (Y(o.domReference) && (S = Fe(o.domReference)), Y(o.floating) && (S = S.concat(Fe(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (S = S.concat(Fe(o.reference.contextElement)))), S = S.filter((G) => {
|
|
2747
2753
|
var I;
|
|
2748
2754
|
return G !== ((I = E.defaultView) == null ? void 0 : I.visualViewport);
|
|
2749
|
-
}),
|
|
2755
|
+
}), S.forEach((G) => {
|
|
2750
2756
|
G.addEventListener("scroll", W, {
|
|
2751
2757
|
passive: !0
|
|
2752
2758
|
});
|
|
2753
2759
|
}), () => {
|
|
2754
|
-
c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k),
|
|
2760
|
+
c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), S.forEach((G) => {
|
|
2755
2761
|
G.removeEventListener("scroll", W);
|
|
2756
2762
|
}), window.clearTimeout(w);
|
|
2757
2763
|
};
|
|
@@ -2841,7 +2847,7 @@ function Ii(e) {
|
|
|
2841
2847
|
X(() => {
|
|
2842
2848
|
l && (p.current = l);
|
|
2843
2849
|
}, [l]);
|
|
2844
|
-
const d =
|
|
2850
|
+
const d = Po({
|
|
2845
2851
|
...e,
|
|
2846
2852
|
elements: {
|
|
2847
2853
|
...o,
|
|
@@ -2937,7 +2943,7 @@ function Ti(e, t) {
|
|
|
2937
2943
|
},
|
|
2938
2944
|
onFocus(d) {
|
|
2939
2945
|
if (u.current) return;
|
|
2940
|
-
const h =
|
|
2946
|
+
const h = Se(d.nativeEvent);
|
|
2941
2947
|
if (a && Y(h)) {
|
|
2942
2948
|
if (jt() && !d.relatedTarget) {
|
|
2943
2949
|
if (!p.current && !on(h))
|
|
@@ -3031,16 +3037,16 @@ function Nt(e, t, n) {
|
|
|
3031
3037
|
}
|
|
3032
3038
|
}
|
|
3033
3039
|
function bt(e, t) {
|
|
3034
|
-
return Nt(t, e === st || e ===
|
|
3040
|
+
return Nt(t, e === st || e === Ne, e === _e || e === We);
|
|
3035
3041
|
}
|
|
3036
3042
|
function Yt(e, t, n) {
|
|
3037
|
-
return Nt(t, e ===
|
|
3043
|
+
return Nt(t, e === Ne, n ? e === _e : e === We) || e === "Enter" || e === " " || e === "";
|
|
3038
3044
|
}
|
|
3039
3045
|
function Kn(e, t, n) {
|
|
3040
|
-
return Nt(t, n ? e ===
|
|
3046
|
+
return Nt(t, n ? e === _e : e === We, e === Ne);
|
|
3041
3047
|
}
|
|
3042
3048
|
function Vn(e, t, n, r) {
|
|
3043
|
-
const o = n ? e ===
|
|
3049
|
+
const o = n ? e === We : e === _e, s = e === st;
|
|
3044
3050
|
return t === "both" || t === "horizontal" && r && r > 1 ? e === ni : Nt(t, o, s);
|
|
3045
3051
|
}
|
|
3046
3052
|
function Ai(e, t) {
|
|
@@ -3080,24 +3086,24 @@ function Ai(e, t) {
|
|
|
3080
3086
|
}, [e, C]);
|
|
3081
3087
|
const w = se(() => {
|
|
3082
3088
|
a(b.current === -1 ? null : b.current);
|
|
3083
|
-
}), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null),
|
|
3089
|
+
}), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), S = f.useRef(!0), G = f.useRef(w), I = f.useRef(!!o.floating), V = f.useRef(n), ee = f.useRef(!1), ae = f.useRef(!1), te = xe(x), fe = xe(n), Ae = xe(N), Ve = xe(l), [Me, H] = f.useState(), [z, $] = f.useState(), B = se(() => {
|
|
3084
3090
|
function M(Z) {
|
|
3085
3091
|
if (m) {
|
|
3086
3092
|
var ie;
|
|
3087
3093
|
(ie = Z.id) != null && ie.endsWith("-fui-option") && (Z.id = s + "-" + Math.random().toString(16).slice(2, 10)), H(Z.id), O == null || O.events.emit("virtualfocus", Z), D && (D.current = Z);
|
|
3088
3094
|
} else
|
|
3089
|
-
|
|
3095
|
+
Be(Z, {
|
|
3090
3096
|
sync: ee.current,
|
|
3091
3097
|
preventScroll: !0
|
|
3092
3098
|
});
|
|
3093
3099
|
}
|
|
3094
|
-
const j = i.current[b.current],
|
|
3100
|
+
const j = i.current[b.current], P = ae.current;
|
|
3095
3101
|
j && M(j), (ee.current ? (Z) => Z() : requestAnimationFrame)(() => {
|
|
3096
3102
|
const Z = i.current[b.current] || j;
|
|
3097
3103
|
if (!Z) return;
|
|
3098
3104
|
j || M(Z);
|
|
3099
3105
|
const ie = Ae.current;
|
|
3100
|
-
ie && ne && (
|
|
3106
|
+
ie && ne && (P || !S.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof ie == "boolean" ? {
|
|
3101
3107
|
block: "nearest",
|
|
3102
3108
|
inline: "nearest"
|
|
3103
3109
|
} : ie));
|
|
@@ -3108,7 +3114,7 @@ function Ai(e, t) {
|
|
|
3108
3114
|
}, [u, n, o.floating, l, w]), X(() => {
|
|
3109
3115
|
if (u && n && o.floating)
|
|
3110
3116
|
if (c == null) {
|
|
3111
|
-
if (ee.current = !1,
|
|
3117
|
+
if (ee.current = !1, Ve.current != null)
|
|
3112
3118
|
return;
|
|
3113
3119
|
if (I.current && (b.current = -1, B()), (!V.current || !I.current) && T.current && (E.current != null || T.current === !0 && E.current == null)) {
|
|
3114
3120
|
let M = 0;
|
|
@@ -3118,12 +3124,12 @@ function Ai(e, t) {
|
|
|
3118
3124
|
j();
|
|
3119
3125
|
}
|
|
3120
3126
|
} else Ye(i, c) || (b.current = c, B(), ae.current = !1);
|
|
3121
|
-
}, [u, n, o.floating, c,
|
|
3127
|
+
}, [u, n, o.floating, c, Ve, d, i, C, h, w, B, te]), X(() => {
|
|
3122
3128
|
var M;
|
|
3123
3129
|
if (!u || o.floating || !O || m || !I.current)
|
|
3124
3130
|
return;
|
|
3125
|
-
const j = O.nodesRef.current,
|
|
3126
|
-
|
|
3131
|
+
const j = O.nodesRef.current, P = (M = j.find((ie) => ie.id === K)) == null || (M = M.context) == null ? void 0 : M.elements.floating, Q = Ee(le(o.floating)), Z = j.some((ie) => ie.context && ce(ie.context.elements.floating, Q));
|
|
3132
|
+
P && !Z && S.current && P.focus({
|
|
3127
3133
|
preventScroll: !0
|
|
3128
3134
|
});
|
|
3129
3135
|
}, [u, o.floating, O, K, m]), X(() => {
|
|
@@ -3140,39 +3146,39 @@ function Ai(e, t) {
|
|
|
3140
3146
|
n || (E.current = null, T.current = y);
|
|
3141
3147
|
}, [n, y]);
|
|
3142
3148
|
const oe = c != null, ne = f.useMemo(() => {
|
|
3143
|
-
function M(
|
|
3149
|
+
function M(P) {
|
|
3144
3150
|
if (!fe.current) return;
|
|
3145
|
-
const Q = i.current.indexOf(
|
|
3151
|
+
const Q = i.current.indexOf(P);
|
|
3146
3152
|
Q !== -1 && b.current !== Q && (b.current = Q, w());
|
|
3147
3153
|
}
|
|
3148
3154
|
return {
|
|
3149
|
-
onFocus(
|
|
3155
|
+
onFocus(P) {
|
|
3150
3156
|
let {
|
|
3151
3157
|
currentTarget: Q
|
|
3152
|
-
} =
|
|
3158
|
+
} = P;
|
|
3153
3159
|
ee.current = !0, M(Q);
|
|
3154
3160
|
},
|
|
3155
|
-
onClick: (
|
|
3161
|
+
onClick: (P) => {
|
|
3156
3162
|
let {
|
|
3157
3163
|
currentTarget: Q
|
|
3158
|
-
} =
|
|
3164
|
+
} = P;
|
|
3159
3165
|
return Q.focus({
|
|
3160
3166
|
preventScroll: !0
|
|
3161
3167
|
});
|
|
3162
3168
|
},
|
|
3163
3169
|
// Safari
|
|
3164
3170
|
...R && {
|
|
3165
|
-
onMouseMove(
|
|
3171
|
+
onMouseMove(P) {
|
|
3166
3172
|
let {
|
|
3167
3173
|
currentTarget: Q
|
|
3168
|
-
} =
|
|
3174
|
+
} = P;
|
|
3169
3175
|
ee.current = !0, ae.current = !1, M(Q);
|
|
3170
3176
|
},
|
|
3171
|
-
onPointerLeave(
|
|
3177
|
+
onPointerLeave(P) {
|
|
3172
3178
|
let {
|
|
3173
3179
|
pointerType: Q
|
|
3174
|
-
} =
|
|
3175
|
-
if (!(!
|
|
3180
|
+
} = P;
|
|
3181
|
+
if (!(!S.current || Q === "touch") && (ee.current = !0, b.current = -1, w(), !m)) {
|
|
3176
3182
|
var Z;
|
|
3177
3183
|
(Z = U.current) == null || Z.focus({
|
|
3178
3184
|
preventScroll: !0
|
|
@@ -3185,20 +3191,20 @@ function Ai(e, t) {
|
|
|
3185
3191
|
var M;
|
|
3186
3192
|
return A ?? (O == null || (M = O.nodesRef.current.find((j) => j.id === K)) == null || (M = M.context) == null || (M = M.dataRef) == null ? void 0 : M.current.orientation);
|
|
3187
3193
|
}, [K, O, A]), me = se((M) => {
|
|
3188
|
-
if (
|
|
3194
|
+
if (S.current = !1, ee.current = !0, M.which === 229 || !fe.current && M.currentTarget === U.current)
|
|
3189
3195
|
return;
|
|
3190
3196
|
if (d && Vn(M.key, C, h, k)) {
|
|
3191
3197
|
bt(M.key, de()) || pe(M), r(!1, M.nativeEvent, "list-navigation"), re(o.domReference) && (m ? O == null || O.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
|
|
3192
3198
|
return;
|
|
3193
3199
|
}
|
|
3194
|
-
const j = b.current,
|
|
3195
|
-
if (W || (M.key === "Home" && (pe(M), b.current =
|
|
3200
|
+
const j = b.current, P = yt(i, x), Q = en(i, x);
|
|
3201
|
+
if (W || (M.key === "Home" && (pe(M), b.current = P, w()), M.key === "End" && (pe(M), b.current = Q, w())), k > 1) {
|
|
3196
3202
|
const Z = L || Array.from({
|
|
3197
3203
|
length: i.current.length
|
|
3198
3204
|
}, () => ({
|
|
3199
3205
|
width: 1,
|
|
3200
3206
|
height: 1
|
|
3201
|
-
})), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !
|
|
3207
|
+
})), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !ze(i, ye, x)), at = ie.reduce((ye, $e, ft) => $e != null && !ze(i, $e, x) ? ft : ye, -1), rt = ie[tr({
|
|
3202
3208
|
current: ie.map((ye) => ye != null ? i.current[ye] : null)
|
|
3203
3209
|
}, {
|
|
3204
3210
|
event: M,
|
|
@@ -3208,18 +3214,18 @@ function Ai(e, t) {
|
|
|
3208
3214
|
cols: k,
|
|
3209
3215
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
3210
3216
|
// don't end up in them
|
|
3211
|
-
disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye,
|
|
3217
|
+
disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, $e) => ze(i, $e, x) ? $e : void 0), void 0], ie),
|
|
3212
3218
|
minIndex: nt,
|
|
3213
3219
|
maxIndex: at,
|
|
3214
3220
|
prevIndex: rr(
|
|
3215
|
-
b.current > Q ?
|
|
3221
|
+
b.current > Q ? P : b.current,
|
|
3216
3222
|
Z,
|
|
3217
3223
|
ie,
|
|
3218
3224
|
k,
|
|
3219
3225
|
// use a corner matching the edge closest to the direction
|
|
3220
3226
|
// we're moving in so we don't end up in the same item. Prefer
|
|
3221
3227
|
// top/left over bottom/right.
|
|
3222
|
-
M.key ===
|
|
3228
|
+
M.key === Ne ? "bl" : M.key === (h ? _e : We) ? "tr" : "tl"
|
|
3223
3229
|
),
|
|
3224
3230
|
stopEvent: !0
|
|
3225
3231
|
})];
|
|
@@ -3228,20 +3234,20 @@ function Ai(e, t) {
|
|
|
3228
3234
|
}
|
|
3229
3235
|
if (bt(M.key, C)) {
|
|
3230
3236
|
if (pe(M), n && !m && Ee(M.currentTarget.ownerDocument) === M.currentTarget) {
|
|
3231
|
-
b.current = Yt(M.key, C, h) ?
|
|
3237
|
+
b.current = Yt(M.key, C, h) ? P : Q, w();
|
|
3232
3238
|
return;
|
|
3233
3239
|
}
|
|
3234
|
-
Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 :
|
|
3240
|
+
Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 : P : ue(i, {
|
|
3235
3241
|
startingIndex: j,
|
|
3236
3242
|
disabledIndices: x
|
|
3237
3243
|
}) : b.current = Math.min(Q, ue(i, {
|
|
3238
3244
|
startingIndex: j,
|
|
3239
3245
|
disabledIndices: x
|
|
3240
|
-
})) : g ? b.current = j <=
|
|
3246
|
+
})) : g ? b.current = j <= P ? p && j !== -1 ? i.current.length : Q : ue(i, {
|
|
3241
3247
|
startingIndex: j,
|
|
3242
3248
|
decrement: !0,
|
|
3243
3249
|
disabledIndices: x
|
|
3244
|
-
}) : b.current = Math.max(
|
|
3250
|
+
}) : b.current = Math.max(P, ue(i, {
|
|
3245
3251
|
startingIndex: j,
|
|
3246
3252
|
decrement: !0,
|
|
3247
3253
|
disabledIndices: x
|
|
@@ -3254,50 +3260,50 @@ function Ai(e, t) {
|
|
|
3254
3260
|
...W ? {} : q,
|
|
3255
3261
|
onKeyDown: me,
|
|
3256
3262
|
onPointerMove() {
|
|
3257
|
-
|
|
3263
|
+
S.current = !0;
|
|
3258
3264
|
}
|
|
3259
3265
|
}), [q, me, C, W]), Re = f.useMemo(() => {
|
|
3260
|
-
function M(
|
|
3261
|
-
y === "auto" && Zn(
|
|
3266
|
+
function M(P) {
|
|
3267
|
+
y === "auto" && Zn(P.nativeEvent) && (T.current = !0);
|
|
3262
3268
|
}
|
|
3263
|
-
function j(
|
|
3264
|
-
T.current = y, y === "auto" && er(
|
|
3269
|
+
function j(P) {
|
|
3270
|
+
T.current = y, y === "auto" && er(P.nativeEvent) && (T.current = !0);
|
|
3265
3271
|
}
|
|
3266
3272
|
return {
|
|
3267
3273
|
...q,
|
|
3268
|
-
onKeyDown(
|
|
3269
|
-
|
|
3270
|
-
const Q =
|
|
3274
|
+
onKeyDown(P) {
|
|
3275
|
+
S.current = !1;
|
|
3276
|
+
const Q = P.key.startsWith("Arrow"), Z = ["Home", "End"].includes(P.key), ie = Q || Z, nt = Kn(P.key, C, h), at = Vn(P.key, C, h, k), rt = Kn(P.key, de(), h), ye = bt(P.key, C), $e = (d ? rt : ye) || P.key === "Enter" || P.key.trim() === "";
|
|
3271
3277
|
if (m && n) {
|
|
3272
|
-
const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null),
|
|
3273
|
-
if (ie &&
|
|
3278
|
+
const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), Le = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
|
|
3279
|
+
if (ie && Le && D) {
|
|
3274
3280
|
const mt = new KeyboardEvent("keydown", {
|
|
3275
|
-
key:
|
|
3281
|
+
key: P.key,
|
|
3276
3282
|
bubbles: !0
|
|
3277
3283
|
});
|
|
3278
3284
|
if (nt || at) {
|
|
3279
3285
|
var ft, un;
|
|
3280
|
-
const Tr = ((ft =
|
|
3281
|
-
an && (pe(
|
|
3286
|
+
const Tr = ((ft = Le.context) == null ? void 0 : ft.elements.domReference) === P.currentTarget, an = at && !Tr ? (un = Le.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
|
|
3287
|
+
an && (pe(P), an.dispatchEvent(mt), $(void 0));
|
|
3282
3288
|
}
|
|
3283
|
-
if ((ye || Z) &&
|
|
3289
|
+
if ((ye || Z) && Le.context && Le.context.open && Le.parentId && P.currentTarget !== Le.context.elements.domReference) {
|
|
3284
3290
|
var ln;
|
|
3285
|
-
pe(
|
|
3291
|
+
pe(P), (ln = Le.context.elements.domReference) == null || ln.dispatchEvent(mt);
|
|
3286
3292
|
return;
|
|
3287
3293
|
}
|
|
3288
3294
|
}
|
|
3289
|
-
return me(
|
|
3295
|
+
return me(P);
|
|
3290
3296
|
}
|
|
3291
3297
|
if (!(!n && !v && Q)) {
|
|
3292
|
-
if (
|
|
3293
|
-
const dt = bt(
|
|
3294
|
-
E.current = d && dt ? null :
|
|
3298
|
+
if ($e) {
|
|
3299
|
+
const dt = bt(P.key, de());
|
|
3300
|
+
E.current = d && dt ? null : P.key;
|
|
3295
3301
|
}
|
|
3296
3302
|
if (d) {
|
|
3297
|
-
rt && (pe(
|
|
3303
|
+
rt && (pe(P), n ? (b.current = yt(i, te.current), w()) : r(!0, P.nativeEvent, "list-navigation"));
|
|
3298
3304
|
return;
|
|
3299
3305
|
}
|
|
3300
|
-
ye && (l != null && (b.current = l), pe(
|
|
3306
|
+
ye && (l != null && (b.current = l), pe(P), !n && v ? r(!0, P.nativeEvent, "list-navigation") : me(P), n && w());
|
|
3301
3307
|
}
|
|
3302
3308
|
},
|
|
3303
3309
|
onFocus() {
|
|
@@ -3403,7 +3409,7 @@ function oi(e, t) {
|
|
|
3403
3409
|
}
|
|
3404
3410
|
}, [e, n, t]), n;
|
|
3405
3411
|
}
|
|
3406
|
-
function
|
|
3412
|
+
function Si(e, t) {
|
|
3407
3413
|
t === void 0 && (t = {});
|
|
3408
3414
|
const {
|
|
3409
3415
|
open: n,
|
|
@@ -3458,6 +3464,6 @@ export {
|
|
|
3458
3464
|
yi as t,
|
|
3459
3465
|
Fo as u,
|
|
3460
3466
|
Ti as v,
|
|
3461
|
-
|
|
3467
|
+
Si as w,
|
|
3462
3468
|
Ri as x
|
|
3463
3469
|
};
|