lizaui 12.0.19 → 12.0.21
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/button-group/index.cjs.js +1 -1
- package/dist/button-group/index.es.js +2 -2
- package/dist/button-v2/index.cjs.js +3 -3
- package/dist/button-v2/index.es.js +3 -3
- package/dist/chunks/{Button-daStTTzk.js → Button-Bumy9bze.js} +7 -56
- package/dist/chunks/Button-Bumy9bze.js.map +1 -0
- package/dist/chunks/{Button-DK8vIKEw.js → Button-CFYOfByw.js} +9 -58
- package/dist/chunks/Button-CFYOfByw.js.map +1 -0
- package/dist/chunks/{FocusScope-D-jCzxHq.js → FocusScope-4TdD5fCA.js} +3 -3
- package/dist/chunks/{FocusScope-D-jCzxHq.js.map → FocusScope-4TdD5fCA.js.map} +1 -1
- package/dist/chunks/{FocusScope-BJBTKF3R.js → FocusScope-jSNMAXzg.js} +3 -3
- package/dist/chunks/{FocusScope-BJBTKF3R.js.map → FocusScope-jSNMAXzg.js.map} +1 -1
- package/dist/chunks/Hidden-BY45Dc0j.js +54 -0
- package/dist/chunks/Hidden-BY45Dc0j.js.map +1 -0
- package/dist/chunks/Hidden-C55DpjMP.js +55 -0
- package/dist/chunks/Hidden-C55DpjMP.js.map +1 -0
- package/dist/chunks/{I18nProvider-8HiWALvM.js → I18nProvider-BUfkOEhQ.js} +2 -2
- package/dist/chunks/{I18nProvider-8HiWALvM.js.map → I18nProvider-BUfkOEhQ.js.map} +1 -1
- package/dist/chunks/{I18nProvider-DSyuLrKX.js → I18nProvider-Coj9x7B8.js} +2 -2
- package/dist/chunks/{I18nProvider-DSyuLrKX.js.map → I18nProvider-Coj9x7B8.js.map} +1 -1
- package/dist/chunks/{ProgressBar-CYj13G9N.js → ProgressBar-542C1mif.js} +5 -5
- package/dist/chunks/{ProgressBar-CYj13G9N.js.map → ProgressBar-542C1mif.js.map} +1 -1
- package/dist/chunks/{ProgressBar-BiWM84v5.js → ProgressBar-BiKRsJ8m.js} +5 -5
- package/dist/chunks/{ProgressBar-BiWM84v5.js.map → ProgressBar-BiKRsJ8m.js.map} +1 -1
- package/dist/chunks/SharedElementTransition-BSCoaphV.js +106 -0
- package/dist/chunks/{SharedElementTransition-D87oSBzB.js.map → SharedElementTransition-BSCoaphV.js.map} +1 -1
- package/dist/chunks/SharedElementTransition-CJVe1D_I.js +107 -0
- package/dist/chunks/{SharedElementTransition-BxczX23g.js.map → SharedElementTransition-CJVe1D_I.js.map} +1 -1
- package/dist/chunks/VisuallyHidden-CTe1-RoI.js +49 -0
- package/dist/chunks/VisuallyHidden-CTe1-RoI.js.map +1 -0
- package/dist/chunks/VisuallyHidden-DPJuOMsW.js +50 -0
- package/dist/chunks/VisuallyHidden-DPJuOMsW.js.map +1 -0
- package/dist/chunks/{button-group-CXxfE0Nh.js → button-group-CJ72SS4c.js} +2 -2
- package/dist/chunks/{button-group-CXxfE0Nh.js.map → button-group-CJ72SS4c.js.map} +1 -1
- package/dist/chunks/{button-group-CAIXp_CY.js → button-group-DJ5IdBp6.js} +2 -2
- package/dist/chunks/{button-group-CAIXp_CY.js.map → button-group-DJ5IdBp6.js.map} +1 -1
- package/dist/chunks/{compose-zqddfADC.js → compose-Cfw0sImv.js} +2 -2
- package/dist/chunks/{compose-zqddfADC.js.map → compose-Cfw0sImv.js.map} +1 -1
- package/dist/chunks/{compose-DVjlikkg.js → compose-DOOi0Yan.js} +2 -2
- package/dist/chunks/{compose-DVjlikkg.js.map → compose-DOOi0Yan.js.map} +1 -1
- package/dist/chunks/{focusSafely-CoIRf3xM.js → focusSafely-CKxVSn6H.js} +40 -2
- package/dist/chunks/{focusSafely-CoIRf3xM.js.map → focusSafely-CKxVSn6H.js.map} +1 -1
- package/dist/chunks/{focusSafely-kwqdsDlJ.js → focusSafely-DfEgLKh6.js} +46 -8
- package/dist/chunks/{focusSafely-kwqdsDlJ.js.map → focusSafely-DfEgLKh6.js.map} +1 -1
- package/dist/chunks/mergeRefs-Y9oG13yB.js +24 -0
- package/dist/chunks/mergeRefs-Y9oG13yB.js.map +1 -0
- package/dist/chunks/mergeRefs-t6d4XvXq.js +25 -0
- package/dist/chunks/mergeRefs-t6d4XvXq.js.map +1 -0
- package/dist/chunks/{number-ClNYm70x.js → number-CYgYWykt.js} +2 -2
- package/dist/chunks/{number-ClNYm70x.js.map → number-CYgYWykt.js.map} +1 -1
- package/dist/chunks/{number-apyCzMO6.js → number-DDpsLN2d.js} +2 -2
- package/dist/chunks/{number-apyCzMO6.js.map → number-DDpsLN2d.js.map} +1 -1
- package/dist/chunks/{radio-group-dNkQoY2h.js → radio-group-BwXvYzSm.js} +15 -13
- package/dist/chunks/{radio-group-dNkQoY2h.js.map → radio-group-BwXvYzSm.js.map} +1 -1
- package/dist/chunks/{radio-group-V6X0yA63.js → radio-group-hO2beGF6.js} +17 -15
- package/dist/chunks/{radio-group-V6X0yA63.js.map → radio-group-hO2beGF6.js.map} +1 -1
- package/dist/chunks/useControlledState-DE_m1RML.js +39 -0
- package/dist/chunks/useControlledState-DE_m1RML.js.map +1 -0
- package/dist/chunks/useControlledState-DZA25XHU.js +40 -0
- package/dist/chunks/useControlledState-DZA25XHU.js.map +1 -0
- package/dist/chunks/{useFormReset-Cf2fzi86.js → useFormReset-BYRGk5vb.js} +2 -2
- package/dist/chunks/{useFormReset-Cf2fzi86.js.map → useFormReset-BYRGk5vb.js.map} +1 -1
- package/dist/chunks/{useFormReset-Bwwr8ivc.js → useFormReset-Bgv2ktIE.js} +2 -2
- package/dist/chunks/{useFormReset-Bwwr8ivc.js.map → useFormReset-Bgv2ktIE.js.map} +1 -1
- package/dist/chunks/useHasTabbableChild-CSJ0P5QT.js +2577 -0
- package/dist/chunks/useHasTabbableChild-CSJ0P5QT.js.map +1 -0
- package/dist/chunks/useHasTabbableChild-kl2T5gEX.js +2576 -0
- package/dist/chunks/useHasTabbableChild-kl2T5gEX.js.map +1 -0
- package/dist/chunks/{useHover-B3gEex-2.js → useHover-BHCSbkLb.js} +3 -3
- package/dist/chunks/{useHover-B3gEex-2.js.map → useHover-BHCSbkLb.js.map} +1 -1
- package/dist/chunks/{useHover-Dn1CIUT8.js → useHover-D9f9xyxz.js} +3 -3
- package/dist/chunks/{useHover-Dn1CIUT8.js.map → useHover-D9f9xyxz.js.map} +1 -1
- package/dist/chunks/{useLabel-ClsFWJD0.js → useLabel-CzhH-Tov.js} +4 -23
- package/dist/chunks/useLabel-CzhH-Tov.js.map +1 -0
- package/dist/chunks/{useLabel-todYehRc.js → useLabel-YLbDMN-c.js} +4 -23
- package/dist/chunks/useLabel-YLbDMN-c.js.map +1 -0
- package/dist/chunks/useLabels-BiXnWBSL.js +23 -0
- package/dist/chunks/useLabels-BiXnWBSL.js.map +1 -0
- package/dist/chunks/useLabels-Bl0mJafM.js +24 -0
- package/dist/chunks/useLabels-Bl0mJafM.js.map +1 -0
- package/dist/chunks/{useMove-BifTPO2Z.js → useMove-DeuS9PRx.js} +3 -3
- package/dist/chunks/{useMove-BifTPO2Z.js.map → useMove-DeuS9PRx.js.map} +1 -1
- package/dist/chunks/{useMove-C6JNYkjM.js → useMove-Xpbmb6OD.js} +3 -3
- package/dist/chunks/{useMove-C6JNYkjM.js.map → useMove-Xpbmb6OD.js.map} +1 -1
- package/dist/chunks/{usePress-D_rPVnKY.js → usePress-Arf10jW0.js} +4 -4
- package/dist/chunks/{usePress-D_rPVnKY.js.map → usePress-Arf10jW0.js.map} +1 -1
- package/dist/chunks/{usePress-BtBLddLY.js → usePress-B1yQk_p8.js} +4 -4
- package/dist/chunks/{usePress-BtBLddLY.js.map → usePress-B1yQk_p8.js.map} +1 -1
- package/dist/chunks/{useProgressBar-B1VDzYE6.js → useProgressBar-BsO-Q5JP.js} +4 -4
- package/dist/chunks/{useProgressBar-B1VDzYE6.js.map → useProgressBar-BsO-Q5JP.js.map} +1 -1
- package/dist/chunks/{useProgressBar--b8hyT4v.js → useProgressBar-d2k0k8r0.js} +4 -4
- package/dist/chunks/{useProgressBar--b8hyT4v.js.map → useProgressBar-d2k0k8r0.js.map} +1 -1
- package/dist/chunks/{useSlot-DnUNwd8f.js → useSlot-CFaaZeQE.js} +4 -4
- package/dist/chunks/{useSlot-DnUNwd8f.js.map → useSlot-CFaaZeQE.js.map} +1 -1
- package/dist/chunks/{useSlot-Dwd3MQYT.js → useSlot-TNtJf1z8.js} +4 -4
- package/dist/chunks/{useSlot-Dwd3MQYT.js.map → useSlot-TNtJf1z8.js.map} +1 -1
- package/dist/chunks/{utils-Ki_DdjNi.js → utils-BCEhcDlv.js} +12 -33
- package/dist/chunks/utils-BCEhcDlv.js.map +1 -0
- package/dist/chunks/{utils-GD-7Nve2.js → utils-DvHk9ofL.js} +5 -26
- package/dist/chunks/utils-DvHk9ofL.js.map +1 -0
- package/dist/components/icons/icons.d.ts +20 -0
- package/dist/components/icons/icons.d.ts.map +1 -0
- package/dist/components/scroll-shadow/index.d.ts +22 -0
- package/dist/components/scroll-shadow/index.d.ts.map +1 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts +33 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts.map +1 -0
- package/dist/components/scroll-shadow/scroll-shadow.styles.d.ts +70 -0
- package/dist/components/scroll-shadow/scroll-shadow.styles.d.ts.map +1 -0
- package/dist/components/scroll-shadow/use-safe-layout-effect.d.ts +3 -0
- package/dist/components/scroll-shadow/use-safe-layout-effect.d.ts.map +1 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +12 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +26 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +40 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.styles.d.ts +87 -0
- package/dist/components/tabs/tabs.styles.d.ts.map +1 -0
- package/dist/data-table/index.cjs.js +297 -2813
- package/dist/data-table/index.cjs.js.map +1 -1
- package/dist/data-table/index.es.js +208 -2724
- package/dist/data-table/index.es.js.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +3 -3
- package/dist/lib/utils/assertion.d.ts +10 -0
- package/dist/lib/utils/assertion.d.ts.map +1 -0
- package/dist/lib/utils/class-name.d.ts +8 -0
- package/dist/lib/utils/class-name.d.ts.map +1 -0
- package/dist/lib/utils/cn.d.ts +23 -0
- package/dist/lib/utils/cn.d.ts.map +1 -0
- package/dist/lib/utils/collection-prop-injection.d.ts +32 -0
- package/dist/lib/utils/collection-prop-injection.d.ts.map +1 -0
- package/dist/lib/utils/compose.d.ts +8 -0
- package/dist/lib/utils/compose.d.ts.map +1 -0
- package/dist/lib/utils/dom.d.ts +22 -0
- package/dist/lib/utils/dom.d.ts.map +1 -0
- package/dist/lib/utils/field-slots-gate.d.ts +10 -0
- package/dist/lib/utils/field-slots-gate.d.ts.map +1 -0
- package/dist/lib/utils/logger.d.ts +24 -0
- package/dist/lib/utils/logger.d.ts.map +1 -0
- package/dist/lib/utils/normalize.d.ts +6 -0
- package/dist/lib/utils/normalize.d.ts.map +1 -0
- package/dist/lib/utils/use-has-text-slot.d.ts +14 -0
- package/dist/lib/utils/use-has-text-slot.d.ts.map +1 -0
- package/dist/lizaui.css +632 -0
- package/dist/meter/index.cjs.js +4 -4
- package/dist/meter/index.es.js +4 -4
- package/dist/progress-bar/index.cjs.js +2 -2
- package/dist/progress-bar/index.es.js +2 -2
- package/dist/radio/index.cjs.js +2 -2
- package/dist/radio/index.es.js +2 -2
- package/dist/radio-group/index.cjs.js +1 -1
- package/dist/radio-group/index.es.js +2 -2
- package/dist/scroll-shadow/index.cjs.js +394 -0
- package/dist/scroll-shadow/index.cjs.js.map +1 -0
- package/dist/scroll-shadow/index.es.js +394 -0
- package/dist/scroll-shadow/index.es.js.map +1 -0
- package/dist/scroll-shadow.d.ts +2 -0
- package/dist/slider/index.cjs.js +11 -10
- package/dist/slider/index.cjs.js.map +1 -1
- package/dist/slider/index.es.js +10 -9
- package/dist/slider/index.es.js.map +1 -1
- package/dist/tabs/index.cjs.js +1400 -0
- package/dist/tabs/index.cjs.js.map +1 -0
- package/dist/tabs/index.es.js +1400 -0
- package/dist/tabs/index.es.js.map +1 -0
- package/dist/tabs.d.ts +2 -0
- package/dist/toggle-switch/index.cjs.js +11 -9
- package/dist/toggle-switch/index.cjs.js.map +1 -1
- package/dist/toggle-switch/index.es.js +9 -7
- package/dist/toggle-switch/index.es.js.map +1 -1
- package/dist/toolbar/index.cjs.js +4 -4
- package/dist/toolbar/index.es.js +4 -4
- package/package.json +12 -1
- package/dist/chunks/Button-DK8vIKEw.js.map +0 -1
- package/dist/chunks/Button-daStTTzk.js.map +0 -1
- package/dist/chunks/SharedElementTransition-BxczX23g.js +0 -12
- package/dist/chunks/SharedElementTransition-D87oSBzB.js +0 -13
- package/dist/chunks/VisuallyHidden-BbvdASBh.js +0 -85
- package/dist/chunks/VisuallyHidden-BbvdASBh.js.map +0 -1
- package/dist/chunks/VisuallyHidden-C-WtISJo.js +0 -86
- package/dist/chunks/VisuallyHidden-C-WtISJo.js.map +0 -1
- package/dist/chunks/useLabel-ClsFWJD0.js.map +0 -1
- package/dist/chunks/useLabel-todYehRc.js.map +0 -1
- package/dist/chunks/utils-GD-7Nve2.js.map +0 -1
- package/dist/chunks/utils-Ki_DdjNi.js.map +0 -1
|
@@ -4,227 +4,24 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const compilerRuntime = require("react/compiler-runtime");
|
|
5
5
|
const dataTable = require("../chunks/data-table-DCG8ApMG.js");
|
|
6
6
|
const React = require("react");
|
|
7
|
-
const utils = require("../chunks/utils-
|
|
8
|
-
const Button = require("../chunks/Button-
|
|
9
|
-
const
|
|
7
|
+
const utils = require("../chunks/utils-DvHk9ofL.js");
|
|
8
|
+
const Button = require("../chunks/Button-Bumy9bze.js");
|
|
9
|
+
const useHasTabbableChild = require("../chunks/useHasTabbableChild-kl2T5gEX.js");
|
|
10
|
+
const SharedElementTransition = require("../chunks/SharedElementTransition-BSCoaphV.js");
|
|
10
11
|
const BaseCollection = require("../chunks/BaseCollection-DxI8p0cP.js");
|
|
11
|
-
const useHover = require("../chunks/useHover-Dn1CIUT8.js");
|
|
12
|
-
const ReactDOM = require("react-dom");
|
|
13
12
|
const filterDOMProps = require("../chunks/filterDOMProps-JgzPXl3Q.js");
|
|
14
|
-
const FocusScope = require("../chunks/FocusScope-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
13
|
+
const FocusScope = require("../chunks/FocusScope-4TdD5fCA.js");
|
|
14
|
+
const useHover = require("../chunks/useHover-D9f9xyxz.js");
|
|
15
|
+
const mergeRefs = require("../chunks/mergeRefs-Y9oG13yB.js");
|
|
16
|
+
const ReactDOM = require("react-dom");
|
|
17
|
+
const useControlledState = require("../chunks/useControlledState-DE_m1RML.js");
|
|
18
|
+
const I18nProvider = require("../chunks/I18nProvider-BUfkOEhQ.js");
|
|
19
|
+
const focusSafely = require("../chunks/focusSafely-CKxVSn6H.js");
|
|
20
|
+
const usePress = require("../chunks/usePress-B1yQk_p8.js");
|
|
21
|
+
const useLabels = require("../chunks/useLabels-BiXnWBSL.js");
|
|
22
|
+
const useMove = require("../chunks/useMove-DeuS9PRx.js");
|
|
23
|
+
const VisuallyHidden = require("../chunks/VisuallyHidden-CTe1-RoI.js");
|
|
21
24
|
const tailwindVariants = require("tailwind-variants");
|
|
22
|
-
const $8b2399d051d06d4c$export$447a38995de2c711 = "react-aria-clear-focus";
|
|
23
|
-
const $8b2399d051d06d4c$export$831c820ad60f9d12 = "react-aria-focus";
|
|
24
|
-
function $b72f3f7b3b5f42c6$export$76e4e37e5339496d(to) {
|
|
25
|
-
let from = $b72f3f7b3b5f42c6$export$759df0d867455a91(focusSafely.$d447af545b77c9f1$export$b204af158042fbac(to));
|
|
26
|
-
if (from !== to) {
|
|
27
|
-
if (from) $b72f3f7b3b5f42c6$export$6c5dc7e81d2cc29a(from, to);
|
|
28
|
-
if (to) $b72f3f7b3b5f42c6$export$2b35b76d2e30e129(to, from);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function $b72f3f7b3b5f42c6$export$6c5dc7e81d2cc29a(from, to) {
|
|
32
|
-
from.dispatchEvent(new FocusEvent("blur", {
|
|
33
|
-
relatedTarget: to
|
|
34
|
-
}));
|
|
35
|
-
from.dispatchEvent(new FocusEvent("focusout", {
|
|
36
|
-
bubbles: true,
|
|
37
|
-
relatedTarget: to
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
function $b72f3f7b3b5f42c6$export$2b35b76d2e30e129(to, from) {
|
|
41
|
-
to.dispatchEvent(new FocusEvent("focus", {
|
|
42
|
-
relatedTarget: from
|
|
43
|
-
}));
|
|
44
|
-
to.dispatchEvent(new FocusEvent("focusin", {
|
|
45
|
-
bubbles: true,
|
|
46
|
-
relatedTarget: from
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
function $b72f3f7b3b5f42c6$export$759df0d867455a91(document2) {
|
|
50
|
-
let activeElement = focusSafely.$23f2114a1b82827e$export$cd4e5573fbe2b576(document2);
|
|
51
|
-
let activeDescendant = activeElement?.getAttribute("aria-activedescendant");
|
|
52
|
-
if (activeDescendant) return document2.getElementById(activeDescendant) || activeElement;
|
|
53
|
-
return activeElement;
|
|
54
|
-
}
|
|
55
|
-
const $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT = 100;
|
|
56
|
-
const $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT = 600;
|
|
57
|
-
const $bb39c0fc1c19b34c$var$state = {
|
|
58
|
-
isOpen: false,
|
|
59
|
-
screenWidth: 0,
|
|
60
|
-
screenHeight: 0,
|
|
61
|
-
screenAngle: 0,
|
|
62
|
-
screenTimeout: 0,
|
|
63
|
-
startTimeStamp: 0,
|
|
64
|
-
endTimeStamp: 0,
|
|
65
|
-
resizeTimeStamp: 0,
|
|
66
|
-
resizeTimeout: 0
|
|
67
|
-
};
|
|
68
|
-
const $bb39c0fc1c19b34c$var$nonTextInputTypes = /* @__PURE__ */ new Set([
|
|
69
|
-
"checkbox",
|
|
70
|
-
"radio",
|
|
71
|
-
"range",
|
|
72
|
-
"color",
|
|
73
|
-
"file",
|
|
74
|
-
"image",
|
|
75
|
-
"button",
|
|
76
|
-
"submit",
|
|
77
|
-
"reset"
|
|
78
|
-
]);
|
|
79
|
-
if (process.env.NODE_ENV === "test" && typeof window !== "undefined" && !Reflect.has(window, "visualViewport")) {
|
|
80
|
-
const visualViewport = Object.assign(new EventTarget(), {
|
|
81
|
-
offsetTop: 0,
|
|
82
|
-
offsetLeft: 0,
|
|
83
|
-
pageTop: 0,
|
|
84
|
-
pageLeft: 0,
|
|
85
|
-
scale: 1
|
|
86
|
-
});
|
|
87
|
-
Reflect.defineProperty(visualViewport, "width", {
|
|
88
|
-
get: () => window.innerWidth,
|
|
89
|
-
configurable: true
|
|
90
|
-
});
|
|
91
|
-
Reflect.defineProperty(visualViewport, "height", {
|
|
92
|
-
get: () => window.innerHeight,
|
|
93
|
-
configurable: true
|
|
94
|
-
});
|
|
95
|
-
Reflect.defineProperty(window, "visualViewport", {
|
|
96
|
-
value: visualViewport,
|
|
97
|
-
configurable: true,
|
|
98
|
-
writable: true
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
if (process.env.NODE_ENV === "test" && typeof window !== "undefined" && !Reflect.has(window.screen, "orientation")) {
|
|
102
|
-
const orientation = Object.assign(new EventTarget(), {
|
|
103
|
-
type: "landscape-primary"
|
|
104
|
-
});
|
|
105
|
-
Reflect.defineProperty(window.screen, "orientation", {
|
|
106
|
-
value: orientation,
|
|
107
|
-
configurable: true,
|
|
108
|
-
writable: true
|
|
109
|
-
});
|
|
110
|
-
Reflect.defineProperty(window.screen.orientation, "angle", {
|
|
111
|
-
get: () => window.orientation ?? 0,
|
|
112
|
-
configurable: true
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
function $bb39c0fc1c19b34c$var$getTouchScreen() {
|
|
116
|
-
let screenWidth = Number(window.visualViewport?.width ?? window.innerWidth);
|
|
117
|
-
let screenHeight = Number(window.visualViewport?.height ?? window.innerHeight);
|
|
118
|
-
let visualScale = Number(window.visualViewport?.scale ?? 1);
|
|
119
|
-
return {
|
|
120
|
-
width: screenWidth * visualScale,
|
|
121
|
-
height: screenHeight * visualScale,
|
|
122
|
-
angle: window.screen.orientation.angle
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function $bb39c0fc1c19b34c$var$onResizeStart(e) {
|
|
126
|
-
if ($bb39c0fc1c19b34c$var$state.resizeTimeStamp <= e.timeStamp + 50) {
|
|
127
|
-
$bb39c0fc1c19b34c$var$state.resizeTimeStamp = e.timeStamp + 150;
|
|
128
|
-
window.clearTimeout($bb39c0fc1c19b34c$var$state.resizeTimeout);
|
|
129
|
-
$bb39c0fc1c19b34c$var$state.resizeTimeout = window.setTimeout($bb39c0fc1c19b34c$var$onResizeEnd, 150);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function $bb39c0fc1c19b34c$var$onResizeEnd() {
|
|
133
|
-
let viewportMeta = usePress.$7096878c21af5e66$export$a929f3f93e2cc67e("viewport");
|
|
134
|
-
if (focusSafely.$2add3ce32c6007eb$export$a11b0059900ceec8() && viewportMeta?.includes("overlays-content")) return;
|
|
135
|
-
let time = performance.now();
|
|
136
|
-
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
137
|
-
let elapsed = time - $bb39c0fc1c19b34c$var$state.startTimeStamp;
|
|
138
|
-
let delta = $bb39c0fc1c19b34c$var$state.screenHeight - screen.height;
|
|
139
|
-
let rotation = $bb39c0fc1c19b34c$var$state.screenAngle - screen.angle;
|
|
140
|
-
if (Math.abs(rotation) % 180 && $bb39c0fc1c19b34c$var$state.screenWidth - screen.height < $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT) {
|
|
141
|
-
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
142
|
-
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
143
|
-
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
144
|
-
delta = 0;
|
|
145
|
-
}
|
|
146
|
-
if (elapsed > $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT) {
|
|
147
|
-
window.clearTimeout($bb39c0fc1c19b34c$var$state.screenTimeout);
|
|
148
|
-
$bb39c0fc1c19b34c$var$state.screenTimeout = window.setTimeout(() => {
|
|
149
|
-
let activeElement = document.hasFocus() ? focusSafely.$23f2114a1b82827e$export$cd4e5573fbe2b576() : null;
|
|
150
|
-
let willKeyboardOpen = $bb39c0fc1c19b34c$export$c57958e35f31ed73(activeElement);
|
|
151
|
-
let screen2 = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
152
|
-
if (Math.abs($bb39c0fc1c19b34c$var$state.screenAngle - screen2.angle) % 180) return;
|
|
153
|
-
if ($bb39c0fc1c19b34c$var$state.isOpen && willKeyboardOpen) return;
|
|
154
|
-
$bb39c0fc1c19b34c$var$state.screenWidth = screen2.width;
|
|
155
|
-
$bb39c0fc1c19b34c$var$state.screenHeight = screen2.height;
|
|
156
|
-
$bb39c0fc1c19b34c$var$state.screenAngle = screen2.angle;
|
|
157
|
-
$bb39c0fc1c19b34c$var$state.isOpen = false;
|
|
158
|
-
}, $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT);
|
|
159
|
-
}
|
|
160
|
-
if (elapsed <= $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT && delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT) $bb39c0fc1c19b34c$var$state.endTimeStamp = time;
|
|
161
|
-
$bb39c0fc1c19b34c$var$state.isOpen = delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT;
|
|
162
|
-
}
|
|
163
|
-
function $bb39c0fc1c19b34c$var$onOrientationChange() {
|
|
164
|
-
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
165
|
-
let rotation = $bb39c0fc1c19b34c$var$state.screenAngle - screen.angle;
|
|
166
|
-
if (Math.abs(rotation) % 180 && !$bb39c0fc1c19b34c$var$state.isOpen) {
|
|
167
|
-
let width = $bb39c0fc1c19b34c$var$state.screenWidth;
|
|
168
|
-
let height = $bb39c0fc1c19b34c$var$state.screenHeight;
|
|
169
|
-
$bb39c0fc1c19b34c$var$state.screenWidth = height;
|
|
170
|
-
$bb39c0fc1c19b34c$var$state.screenHeight = width;
|
|
171
|
-
}
|
|
172
|
-
if (!$bb39c0fc1c19b34c$var$state.isOpen) $bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
173
|
-
}
|
|
174
|
-
function $bb39c0fc1c19b34c$var$onFocus(e) {
|
|
175
|
-
let target = focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
176
|
-
let willKeyboardOpen = $bb39c0fc1c19b34c$export$c57958e35f31ed73(target);
|
|
177
|
-
let time = performance.now();
|
|
178
|
-
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
179
|
-
let delta = $bb39c0fc1c19b34c$var$state.screenHeight - screen.height;
|
|
180
|
-
if (delta < $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT && willKeyboardOpen) {
|
|
181
|
-
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
182
|
-
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
183
|
-
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
184
|
-
$bb39c0fc1c19b34c$var$state.startTimeStamp = time;
|
|
185
|
-
}
|
|
186
|
-
if (willKeyboardOpen) window.clearTimeout($bb39c0fc1c19b34c$var$state.screenTimeout);
|
|
187
|
-
if (delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT && willKeyboardOpen) $bb39c0fc1c19b34c$var$state.endTimeStamp = time;
|
|
188
|
-
}
|
|
189
|
-
function $bb39c0fc1c19b34c$var$setupGlobalEvents() {
|
|
190
|
-
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
191
|
-
focusSafely.$d447af545b77c9f1$export$f531f92e2a15358f(window.visualViewport, "resize", focusSafely.$2add3ce32c6007eb$export$78551043582a6a98() ? $bb39c0fc1c19b34c$var$onResizeEnd : $bb39c0fc1c19b34c$var$onResizeStart);
|
|
192
|
-
focusSafely.$d447af545b77c9f1$export$f531f92e2a15358f(window.screen.orientation, "change", $bb39c0fc1c19b34c$var$onOrientationChange);
|
|
193
|
-
focusSafely.$d447af545b77c9f1$export$f531f92e2a15358f(window, "focus", $bb39c0fc1c19b34c$var$onFocus, {
|
|
194
|
-
capture: true,
|
|
195
|
-
passive: true
|
|
196
|
-
});
|
|
197
|
-
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
198
|
-
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
199
|
-
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
200
|
-
}
|
|
201
|
-
if (typeof document !== "undefined") {
|
|
202
|
-
if (document.readyState !== "loading") $bb39c0fc1c19b34c$var$setupGlobalEvents();
|
|
203
|
-
else focusSafely.$d447af545b77c9f1$export$f531f92e2a15358f(document, "DOMContentLoaded", $bb39c0fc1c19b34c$var$setupGlobalEvents);
|
|
204
|
-
}
|
|
205
|
-
function $bb39c0fc1c19b34c$export$c57958e35f31ed73(target) {
|
|
206
|
-
if (!(target instanceof Element) || !focusSafely.$3b8b240c1bf84ab9$export$4c063cf1350e6fed(target)) return false;
|
|
207
|
-
let isTextArea = target instanceof HTMLTextAreaElement;
|
|
208
|
-
let isEditable = target instanceof HTMLElement && target.isContentEditable;
|
|
209
|
-
let isTextInput = target instanceof HTMLInputElement && !$bb39c0fc1c19b34c$var$nonTextInputTypes.has(target.type);
|
|
210
|
-
return isTextArea || isEditable || isTextInput;
|
|
211
|
-
}
|
|
212
|
-
function $bb39c0fc1c19b34c$export$16792effe837dba3(event) {
|
|
213
|
-
return focusSafely.$2add3ce32c6007eb$export$9ac100e40613ea10() ? event.metaKey : event.ctrlKey;
|
|
214
|
-
}
|
|
215
|
-
function $600b3cf69ae46262$export$90fc3a17d93f704c(ref, event, listener, options) {
|
|
216
|
-
let handleEvent = useHover.$fe16bffc7a557bf0$export$7f54fc3180508a52(listener);
|
|
217
|
-
let isDisabled = listener == null;
|
|
218
|
-
React.useEffect(() => {
|
|
219
|
-
if (isDisabled || ref.current == null) return;
|
|
220
|
-
return focusSafely.$d447af545b77c9f1$export$f531f92e2a15358f(ref.current, event, handleEvent, options);
|
|
221
|
-
}, [
|
|
222
|
-
ref,
|
|
223
|
-
event,
|
|
224
|
-
options,
|
|
225
|
-
isDisabled
|
|
226
|
-
]);
|
|
227
|
-
}
|
|
228
25
|
const $a747a10fe70a57da$var$localeSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.locale");
|
|
229
26
|
const $a747a10fe70a57da$var$stringsSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.strings");
|
|
230
27
|
let $a747a10fe70a57da$var$cachedGlobalStrings = void 0;
|
|
@@ -348,733 +145,6 @@ function $cf2482eff2eeeec2$export$f12b703ca79dfbb1(strings, packageName) {
|
|
|
348
145
|
}
|
|
349
146
|
const $4b38b5b75ecc6208$export$b0d3ecf7112093a7 = /* @__PURE__ */ React.createContext(null);
|
|
350
147
|
const $4b38b5b75ecc6208$export$698f465ec27e93df = /* @__PURE__ */ React.createContext(null);
|
|
351
|
-
class $96ead35620b8fd36$export$410b0c854570d131 {
|
|
352
|
-
constructor(ownerDocument) {
|
|
353
|
-
this._firstChild = null;
|
|
354
|
-
this._lastChild = null;
|
|
355
|
-
this._previousSibling = null;
|
|
356
|
-
this._nextSibling = null;
|
|
357
|
-
this._parentNode = null;
|
|
358
|
-
this._minInvalidChildIndex = null;
|
|
359
|
-
this.ownerDocument = ownerDocument;
|
|
360
|
-
}
|
|
361
|
-
*[Symbol.iterator]() {
|
|
362
|
-
let node = this.firstChild;
|
|
363
|
-
while (node) {
|
|
364
|
-
yield node;
|
|
365
|
-
node = node.nextSibling;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
get firstChild() {
|
|
369
|
-
return this._firstChild;
|
|
370
|
-
}
|
|
371
|
-
set firstChild(firstChild) {
|
|
372
|
-
this._firstChild = firstChild;
|
|
373
|
-
this.ownerDocument.markDirty(this);
|
|
374
|
-
}
|
|
375
|
-
get lastChild() {
|
|
376
|
-
return this._lastChild;
|
|
377
|
-
}
|
|
378
|
-
set lastChild(lastChild) {
|
|
379
|
-
this._lastChild = lastChild;
|
|
380
|
-
this.ownerDocument.markDirty(this);
|
|
381
|
-
}
|
|
382
|
-
get previousSibling() {
|
|
383
|
-
return this._previousSibling;
|
|
384
|
-
}
|
|
385
|
-
set previousSibling(previousSibling) {
|
|
386
|
-
this._previousSibling = previousSibling;
|
|
387
|
-
this.ownerDocument.markDirty(this);
|
|
388
|
-
}
|
|
389
|
-
get nextSibling() {
|
|
390
|
-
return this._nextSibling;
|
|
391
|
-
}
|
|
392
|
-
set nextSibling(nextSibling) {
|
|
393
|
-
this._nextSibling = nextSibling;
|
|
394
|
-
this.ownerDocument.markDirty(this);
|
|
395
|
-
}
|
|
396
|
-
get parentNode() {
|
|
397
|
-
return this._parentNode;
|
|
398
|
-
}
|
|
399
|
-
set parentNode(parentNode) {
|
|
400
|
-
this._parentNode = parentNode;
|
|
401
|
-
this.ownerDocument.markDirty(this);
|
|
402
|
-
}
|
|
403
|
-
get isConnected() {
|
|
404
|
-
return this.parentNode?.isConnected || false;
|
|
405
|
-
}
|
|
406
|
-
invalidateChildIndices(child) {
|
|
407
|
-
if (this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || child.index < this._minInvalidChildIndex.index) {
|
|
408
|
-
this._minInvalidChildIndex = child;
|
|
409
|
-
this.ownerDocument.markDirty(this);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
updateChildIndices() {
|
|
413
|
-
let node = this._minInvalidChildIndex;
|
|
414
|
-
while (node) {
|
|
415
|
-
node.index = node.previousSibling ? node.previousSibling.index + 1 : 0;
|
|
416
|
-
node = node.nextSibling;
|
|
417
|
-
}
|
|
418
|
-
this._minInvalidChildIndex = null;
|
|
419
|
-
}
|
|
420
|
-
appendChild(child) {
|
|
421
|
-
if (child.parentNode) child.parentNode.removeChild(child);
|
|
422
|
-
if (this.firstChild == null) this.firstChild = child;
|
|
423
|
-
if (this.lastChild) {
|
|
424
|
-
this.lastChild.nextSibling = child;
|
|
425
|
-
child.index = this.lastChild.index + 1;
|
|
426
|
-
child.previousSibling = this.lastChild;
|
|
427
|
-
} else {
|
|
428
|
-
child.previousSibling = null;
|
|
429
|
-
child.index = 0;
|
|
430
|
-
}
|
|
431
|
-
child.parentNode = this;
|
|
432
|
-
child.nextSibling = null;
|
|
433
|
-
this.lastChild = child;
|
|
434
|
-
this.ownerDocument.markDirty(this);
|
|
435
|
-
if (this.isConnected) this.ownerDocument.queueUpdate();
|
|
436
|
-
}
|
|
437
|
-
insertBefore(newNode, referenceNode) {
|
|
438
|
-
if (referenceNode == null) return this.appendChild(newNode);
|
|
439
|
-
if (newNode.parentNode) newNode.parentNode.removeChild(newNode);
|
|
440
|
-
newNode.nextSibling = referenceNode;
|
|
441
|
-
newNode.previousSibling = referenceNode.previousSibling;
|
|
442
|
-
newNode.index = referenceNode.index - 1;
|
|
443
|
-
if (this.firstChild === referenceNode) this.firstChild = newNode;
|
|
444
|
-
else if (referenceNode.previousSibling) referenceNode.previousSibling.nextSibling = newNode;
|
|
445
|
-
referenceNode.previousSibling = newNode;
|
|
446
|
-
newNode.parentNode = referenceNode.parentNode;
|
|
447
|
-
this.invalidateChildIndices(newNode);
|
|
448
|
-
if (this.isConnected) this.ownerDocument.queueUpdate();
|
|
449
|
-
}
|
|
450
|
-
removeChild(child) {
|
|
451
|
-
if (child.parentNode !== this) return;
|
|
452
|
-
if (this._minInvalidChildIndex === child) this._minInvalidChildIndex = null;
|
|
453
|
-
if (child.nextSibling) {
|
|
454
|
-
this.invalidateChildIndices(child.nextSibling);
|
|
455
|
-
child.nextSibling.previousSibling = child.previousSibling;
|
|
456
|
-
}
|
|
457
|
-
if (child.previousSibling) child.previousSibling.nextSibling = child.nextSibling;
|
|
458
|
-
if (this.firstChild === child) this.firstChild = child.nextSibling;
|
|
459
|
-
if (this.lastChild === child) this.lastChild = child.previousSibling;
|
|
460
|
-
child.parentNode = null;
|
|
461
|
-
child.nextSibling = null;
|
|
462
|
-
child.previousSibling = null;
|
|
463
|
-
child.index = 0;
|
|
464
|
-
this.ownerDocument.markDirty(child);
|
|
465
|
-
if (this.isConnected) this.ownerDocument.queueUpdate();
|
|
466
|
-
}
|
|
467
|
-
addEventListener() {
|
|
468
|
-
}
|
|
469
|
-
removeEventListener() {
|
|
470
|
-
}
|
|
471
|
-
get previousVisibleSibling() {
|
|
472
|
-
let node = this.previousSibling;
|
|
473
|
-
while (node && node.isHidden) node = node.previousSibling;
|
|
474
|
-
return node;
|
|
475
|
-
}
|
|
476
|
-
get nextVisibleSibling() {
|
|
477
|
-
let node = this.nextSibling;
|
|
478
|
-
while (node && node.isHidden) node = node.nextSibling;
|
|
479
|
-
return node;
|
|
480
|
-
}
|
|
481
|
-
get firstVisibleChild() {
|
|
482
|
-
let node = this.firstChild;
|
|
483
|
-
while (node && node.isHidden) node = node.nextSibling;
|
|
484
|
-
return node;
|
|
485
|
-
}
|
|
486
|
-
get lastVisibleChild() {
|
|
487
|
-
let node = this.lastChild;
|
|
488
|
-
while (node && node.isHidden) node = node.previousSibling;
|
|
489
|
-
return node;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
class $96ead35620b8fd36$export$dc064fe9e59310fd extends $96ead35620b8fd36$export$410b0c854570d131 {
|
|
493
|
-
constructor(type, ownerDocument) {
|
|
494
|
-
super(ownerDocument), this.nodeType = 8, this.isMutated = true, this._index = 0, this.isHidden = false;
|
|
495
|
-
this.node = null;
|
|
496
|
-
}
|
|
497
|
-
get index() {
|
|
498
|
-
return this._index;
|
|
499
|
-
}
|
|
500
|
-
set index(index) {
|
|
501
|
-
this._index = index;
|
|
502
|
-
this.ownerDocument.markDirty(this);
|
|
503
|
-
}
|
|
504
|
-
get level() {
|
|
505
|
-
if (this.parentNode instanceof $96ead35620b8fd36$export$dc064fe9e59310fd) return this.parentNode.level + (this.parentNode.node?.type === "item" ? 1 : 0);
|
|
506
|
-
return 0;
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Lazily gets a mutable instance of a Node. If the node has already
|
|
510
|
-
* been cloned during this update cycle, it just returns the existing one.
|
|
511
|
-
*/
|
|
512
|
-
getMutableNode() {
|
|
513
|
-
if (this.node == null) return null;
|
|
514
|
-
if (!this.isMutated) {
|
|
515
|
-
this.node = this.node.clone();
|
|
516
|
-
this.isMutated = true;
|
|
517
|
-
}
|
|
518
|
-
this.ownerDocument.markDirty(this);
|
|
519
|
-
return this.node;
|
|
520
|
-
}
|
|
521
|
-
updateNode() {
|
|
522
|
-
let nextSibling = this.nextVisibleSibling;
|
|
523
|
-
let node = this.getMutableNode();
|
|
524
|
-
if (node == null) return;
|
|
525
|
-
node.index = this.index;
|
|
526
|
-
node.level = this.level;
|
|
527
|
-
node.parentKey = this.parentNode instanceof $96ead35620b8fd36$export$dc064fe9e59310fd ? this.parentNode.node?.key ?? null : null;
|
|
528
|
-
node.prevKey = this.previousVisibleSibling?.node?.key ?? null;
|
|
529
|
-
node.nextKey = nextSibling?.node?.key ?? null;
|
|
530
|
-
node.hasChildNodes = !!this.firstChild;
|
|
531
|
-
node.firstChildKey = this.firstVisibleChild?.node?.key ?? null;
|
|
532
|
-
node.lastChildKey = this.lastVisibleChild?.node?.key ?? null;
|
|
533
|
-
if ((node.colSpan != null || node.colIndex != null) && nextSibling) {
|
|
534
|
-
let nextColIndex = (node.colIndex ?? node.index) + (node.colSpan ?? 1);
|
|
535
|
-
if (nextSibling.node != null && nextColIndex !== nextSibling.node.colIndex) {
|
|
536
|
-
let siblingNode = nextSibling.getMutableNode();
|
|
537
|
-
siblingNode.colIndex = nextColIndex;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
setProps(obj, ref, CollectionNodeClass, rendered, render) {
|
|
542
|
-
let node;
|
|
543
|
-
let { value: value1, textValue, id, ...props } = obj;
|
|
544
|
-
if (this.node == null) {
|
|
545
|
-
node = new CollectionNodeClass(id ?? `react-aria-${++this.ownerDocument.nodeId}`);
|
|
546
|
-
this.node = node;
|
|
547
|
-
} else node = this.getMutableNode();
|
|
548
|
-
props.ref = ref;
|
|
549
|
-
node.props = props;
|
|
550
|
-
node.rendered = rendered;
|
|
551
|
-
node.render = render;
|
|
552
|
-
node.value = value1;
|
|
553
|
-
if (obj["aria-label"]) node["aria-label"] = obj["aria-label"];
|
|
554
|
-
node.textValue = textValue || (typeof props.children === "string" ? props.children : "") || obj["aria-label"] || "";
|
|
555
|
-
if (id != null && id !== node.key) throw new Error("Cannot change the id of an item");
|
|
556
|
-
if (props.colSpan != null) node.colSpan = props.colSpan;
|
|
557
|
-
if (this.isConnected) this.ownerDocument.queueUpdate();
|
|
558
|
-
}
|
|
559
|
-
get style() {
|
|
560
|
-
let element = this;
|
|
561
|
-
return {
|
|
562
|
-
get display() {
|
|
563
|
-
return element.isHidden ? "none" : "";
|
|
564
|
-
},
|
|
565
|
-
set display(value) {
|
|
566
|
-
let isHidden = value === "none";
|
|
567
|
-
if (element.isHidden !== isHidden) {
|
|
568
|
-
if (element.parentNode?.firstVisibleChild === element || element.parentNode?.lastVisibleChild === element) element.ownerDocument.markDirty(element.parentNode);
|
|
569
|
-
let prev = element.previousVisibleSibling;
|
|
570
|
-
let next = element.nextVisibleSibling;
|
|
571
|
-
if (prev) element.ownerDocument.markDirty(prev);
|
|
572
|
-
if (next) element.ownerDocument.markDirty(next);
|
|
573
|
-
element.isHidden = isHidden;
|
|
574
|
-
element.ownerDocument.markDirty(element);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
}
|
|
579
|
-
hasAttribute() {
|
|
580
|
-
}
|
|
581
|
-
setAttribute() {
|
|
582
|
-
}
|
|
583
|
-
setAttributeNS() {
|
|
584
|
-
}
|
|
585
|
-
removeAttribute() {
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
class $96ead35620b8fd36$export$b34a105447964f9f extends $96ead35620b8fd36$export$410b0c854570d131 {
|
|
589
|
-
constructor(collection) {
|
|
590
|
-
super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.keyOwners = /* @__PURE__ */ new Map(), this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = false, this.inSubscription = false;
|
|
591
|
-
this.collection = collection;
|
|
592
|
-
this.nextCollection = collection;
|
|
593
|
-
}
|
|
594
|
-
get isConnected() {
|
|
595
|
-
return true;
|
|
596
|
-
}
|
|
597
|
-
createElement(type) {
|
|
598
|
-
return new $96ead35620b8fd36$export$dc064fe9e59310fd(type, this);
|
|
599
|
-
}
|
|
600
|
-
getMutableCollection() {
|
|
601
|
-
if (!this.nextCollection) this.nextCollection = this.collection.clone();
|
|
602
|
-
return this.nextCollection;
|
|
603
|
-
}
|
|
604
|
-
markDirty(node) {
|
|
605
|
-
this.dirtyNodes.add(node);
|
|
606
|
-
}
|
|
607
|
-
addNode(element) {
|
|
608
|
-
if (element.isHidden || element.node == null) return;
|
|
609
|
-
if (process.env.NODE_ENV !== "production") {
|
|
610
|
-
let key = element.node.key;
|
|
611
|
-
let owner = this.keyOwners.get(key);
|
|
612
|
-
if (owner && owner !== element) throw new Error(`Duplicate key "${String(key)}" found in collection. Every item in a collection must have a unique key.`);
|
|
613
|
-
this.keyOwners.set(key, element);
|
|
614
|
-
}
|
|
615
|
-
let collection = this.getMutableCollection();
|
|
616
|
-
if (!collection.getItem(element.node.key)) for (let child of element) this.addNode(child);
|
|
617
|
-
collection.addNode(element.node);
|
|
618
|
-
}
|
|
619
|
-
removeNode(node) {
|
|
620
|
-
for (let child of node) this.removeNode(child);
|
|
621
|
-
if (node.node) {
|
|
622
|
-
let collection = this.getMutableCollection();
|
|
623
|
-
collection.removeNode(node.node.key);
|
|
624
|
-
if (process.env.NODE_ENV !== "production" && this.keyOwners.get(node.node.key) === node) this.keyOwners.delete(node.node.key);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
/** Finalizes the collection update, updating all nodes and freezing the collection. */
|
|
628
|
-
getCollection() {
|
|
629
|
-
if (this.inSubscription) return this.collection;
|
|
630
|
-
this.queuedRender = false;
|
|
631
|
-
this.updateCollection();
|
|
632
|
-
return this.collection;
|
|
633
|
-
}
|
|
634
|
-
updateCollection() {
|
|
635
|
-
for (let element of this.dirtyNodes) if (element instanceof $96ead35620b8fd36$export$dc064fe9e59310fd && (!element.isConnected || element.isHidden)) this.removeNode(element);
|
|
636
|
-
else element.updateChildIndices();
|
|
637
|
-
for (let element of this.dirtyNodes) if (element instanceof $96ead35620b8fd36$export$dc064fe9e59310fd) {
|
|
638
|
-
if (element.isConnected && !element.isHidden) {
|
|
639
|
-
element.updateNode();
|
|
640
|
-
this.addNode(element);
|
|
641
|
-
}
|
|
642
|
-
if (element.node) this.dirtyNodes.delete(element);
|
|
643
|
-
element.isMutated = false;
|
|
644
|
-
} else this.dirtyNodes.delete(element);
|
|
645
|
-
if (this.nextCollection) {
|
|
646
|
-
this.nextCollection.commit(this.firstVisibleChild?.node?.key ?? null, this.lastVisibleChild?.node?.key ?? null, this.isSSR);
|
|
647
|
-
if (!this.isSSR) {
|
|
648
|
-
this.collection = this.nextCollection;
|
|
649
|
-
this.nextCollection = null;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
queueUpdate() {
|
|
654
|
-
if (this.dirtyNodes.size === 0 || this.queuedRender) return;
|
|
655
|
-
this.queuedRender = true;
|
|
656
|
-
this.inSubscription = true;
|
|
657
|
-
if (!this.isSSR) this.collection = this.collection.clone();
|
|
658
|
-
for (let fn of this.subscriptions) fn();
|
|
659
|
-
this.inSubscription = false;
|
|
660
|
-
}
|
|
661
|
-
subscribe(fn) {
|
|
662
|
-
this.subscriptions.add(fn);
|
|
663
|
-
if (this.queuedRender) fn();
|
|
664
|
-
return () => this.subscriptions.delete(fn);
|
|
665
|
-
}
|
|
666
|
-
resetAfterSSR() {
|
|
667
|
-
if (this.isSSR) {
|
|
668
|
-
this.isSSR = false;
|
|
669
|
-
this.firstChild = null;
|
|
670
|
-
this.lastChild = null;
|
|
671
|
-
this.nodeId = 0;
|
|
672
|
-
this.keyOwners.clear();
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
function $a80bd3e9349588e7$export$727c8fc270210f13(props) {
|
|
677
|
-
let { children, items, idScope, addIdAndValue, dependencies = [] } = props;
|
|
678
|
-
let childrenString = React.useMemo(() => process.env.NODE_ENV !== "production" && typeof children === "function" ? children.toString() : void 0, [
|
|
679
|
-
children
|
|
680
|
-
]);
|
|
681
|
-
let cache = React.useMemo(() => /* @__PURE__ */ new WeakMap(), [
|
|
682
|
-
...dependencies,
|
|
683
|
-
childrenString
|
|
684
|
-
]);
|
|
685
|
-
return React.useMemo(() => {
|
|
686
|
-
if (items && typeof children === "function") {
|
|
687
|
-
let res = [];
|
|
688
|
-
for (let item of items) {
|
|
689
|
-
let cacheKey = $a80bd3e9349588e7$var$isWeakKey(item) ? item : null;
|
|
690
|
-
let rendered = cacheKey ? cache.get(cacheKey) : null;
|
|
691
|
-
if (!rendered) {
|
|
692
|
-
rendered = children(item);
|
|
693
|
-
let id = rendered.props.id ?? item?.key ?? item?.id;
|
|
694
|
-
if (idScope != null && rendered.props.id == null && id != null) id = idScope + ":" + id;
|
|
695
|
-
let key = id ?? res.length;
|
|
696
|
-
rendered = React.cloneElement(rendered, addIdAndValue ? {
|
|
697
|
-
key,
|
|
698
|
-
id,
|
|
699
|
-
value: item
|
|
700
|
-
} : {
|
|
701
|
-
key
|
|
702
|
-
});
|
|
703
|
-
if (cacheKey) cache.set(cacheKey, rendered);
|
|
704
|
-
}
|
|
705
|
-
res.push(rendered);
|
|
706
|
-
}
|
|
707
|
-
return res;
|
|
708
|
-
} else if (typeof children !== "function") return children;
|
|
709
|
-
}, [
|
|
710
|
-
children,
|
|
711
|
-
items,
|
|
712
|
-
cache,
|
|
713
|
-
idScope,
|
|
714
|
-
addIdAndValue
|
|
715
|
-
]);
|
|
716
|
-
}
|
|
717
|
-
function $a80bd3e9349588e7$var$isWeakKey(value) {
|
|
718
|
-
switch (typeof value) {
|
|
719
|
-
case "object":
|
|
720
|
-
return value != null;
|
|
721
|
-
case "function":
|
|
722
|
-
case "symbol":
|
|
723
|
-
return true;
|
|
724
|
-
default:
|
|
725
|
-
return false;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
var shim = { exports: {} };
|
|
729
|
-
var useSyncExternalStoreShim_production = {};
|
|
730
|
-
var hasRequiredUseSyncExternalStoreShim_production;
|
|
731
|
-
function requireUseSyncExternalStoreShim_production() {
|
|
732
|
-
if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
|
|
733
|
-
hasRequiredUseSyncExternalStoreShim_production = 1;
|
|
734
|
-
var React$1 = React;
|
|
735
|
-
function is(x, y) {
|
|
736
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
737
|
-
}
|
|
738
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React$1.useState, useEffect = React$1.useEffect, useLayoutEffect = React$1.useLayoutEffect, useDebugValue = React$1.useDebugValue;
|
|
739
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
740
|
-
var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
741
|
-
useLayoutEffect(
|
|
742
|
-
function() {
|
|
743
|
-
inst.value = value;
|
|
744
|
-
inst.getSnapshot = getSnapshot;
|
|
745
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
746
|
-
},
|
|
747
|
-
[subscribe, value, getSnapshot]
|
|
748
|
-
);
|
|
749
|
-
useEffect(
|
|
750
|
-
function() {
|
|
751
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
752
|
-
return subscribe(function() {
|
|
753
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
754
|
-
});
|
|
755
|
-
},
|
|
756
|
-
[subscribe]
|
|
757
|
-
);
|
|
758
|
-
useDebugValue(value);
|
|
759
|
-
return value;
|
|
760
|
-
}
|
|
761
|
-
function checkIfSnapshotChanged(inst) {
|
|
762
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
763
|
-
inst = inst.value;
|
|
764
|
-
try {
|
|
765
|
-
var nextValue = latestGetSnapshot();
|
|
766
|
-
return !objectIs(inst, nextValue);
|
|
767
|
-
} catch (error) {
|
|
768
|
-
return true;
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
772
|
-
return getSnapshot();
|
|
773
|
-
}
|
|
774
|
-
var shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
775
|
-
useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim2;
|
|
776
|
-
return useSyncExternalStoreShim_production;
|
|
777
|
-
}
|
|
778
|
-
var useSyncExternalStoreShim_development = {};
|
|
779
|
-
var hasRequiredUseSyncExternalStoreShim_development;
|
|
780
|
-
function requireUseSyncExternalStoreShim_development() {
|
|
781
|
-
if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
|
|
782
|
-
hasRequiredUseSyncExternalStoreShim_development = 1;
|
|
783
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
784
|
-
function is(x, y) {
|
|
785
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
786
|
-
}
|
|
787
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
788
|
-
didWarnOld18Alpha || void 0 === React$1.startTransition || (didWarnOld18Alpha = true, void 0);
|
|
789
|
-
var value = getSnapshot();
|
|
790
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
791
|
-
var cachedValue = getSnapshot();
|
|
792
|
-
objectIs(value, cachedValue) || (void 0, didWarnUncachedGetSnapshot = true);
|
|
793
|
-
}
|
|
794
|
-
cachedValue = useState({
|
|
795
|
-
inst: { value, getSnapshot }
|
|
796
|
-
});
|
|
797
|
-
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
798
|
-
useLayoutEffect(
|
|
799
|
-
function() {
|
|
800
|
-
inst.value = value;
|
|
801
|
-
inst.getSnapshot = getSnapshot;
|
|
802
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
803
|
-
},
|
|
804
|
-
[subscribe, value, getSnapshot]
|
|
805
|
-
);
|
|
806
|
-
useEffect(
|
|
807
|
-
function() {
|
|
808
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
809
|
-
return subscribe(function() {
|
|
810
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
811
|
-
});
|
|
812
|
-
},
|
|
813
|
-
[subscribe]
|
|
814
|
-
);
|
|
815
|
-
useDebugValue(value);
|
|
816
|
-
return value;
|
|
817
|
-
}
|
|
818
|
-
function checkIfSnapshotChanged(inst) {
|
|
819
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
820
|
-
inst = inst.value;
|
|
821
|
-
try {
|
|
822
|
-
var nextValue = latestGetSnapshot();
|
|
823
|
-
return !objectIs(inst, nextValue);
|
|
824
|
-
} catch (error) {
|
|
825
|
-
return true;
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
829
|
-
return getSnapshot();
|
|
830
|
-
}
|
|
831
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
832
|
-
var React$1 = React, objectIs = "function" === typeof Object.is ? Object.is : is, useState = React$1.useState, useEffect = React$1.useEffect, useLayoutEffect = React$1.useLayoutEffect, useDebugValue = React$1.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
833
|
-
useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim2;
|
|
834
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
835
|
-
})();
|
|
836
|
-
return useSyncExternalStoreShim_development;
|
|
837
|
-
}
|
|
838
|
-
var hasRequiredShim;
|
|
839
|
-
function requireShim() {
|
|
840
|
-
if (hasRequiredShim) return shim.exports;
|
|
841
|
-
hasRequiredShim = 1;
|
|
842
|
-
if (process.env.NODE_ENV === "production") {
|
|
843
|
-
shim.exports = requireUseSyncExternalStoreShim_production();
|
|
844
|
-
} else {
|
|
845
|
-
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
846
|
-
}
|
|
847
|
-
return shim.exports;
|
|
848
|
-
}
|
|
849
|
-
var shimExports = requireShim();
|
|
850
|
-
const $42ceafc619f9c3ba$var$ShallowRenderContext = /* @__PURE__ */ React.createContext(false);
|
|
851
|
-
const $42ceafc619f9c3ba$var$CollectionDocumentContext = /* @__PURE__ */ React.createContext(null);
|
|
852
|
-
function $42ceafc619f9c3ba$export$bf788dd355e3a401(props) {
|
|
853
|
-
let doc = React.useContext($42ceafc619f9c3ba$var$CollectionDocumentContext);
|
|
854
|
-
if (doc)
|
|
855
|
-
return props.content;
|
|
856
|
-
let { collection, document: document2 } = $42ceafc619f9c3ba$var$useCollectionDocument(props.createCollection);
|
|
857
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button.$d7f64c32b702fe2c$export$8dc98ba7eadeaa56, null, /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$CollectionDocumentContext.Provider, {
|
|
858
|
-
value: document2
|
|
859
|
-
}, props.content)), /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$CollectionInner, {
|
|
860
|
-
render: props.children,
|
|
861
|
-
collection
|
|
862
|
-
}));
|
|
863
|
-
}
|
|
864
|
-
function $42ceafc619f9c3ba$var$CollectionInner({ collection, render }) {
|
|
865
|
-
return render(collection);
|
|
866
|
-
}
|
|
867
|
-
function $42ceafc619f9c3ba$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {
|
|
868
|
-
let isSSR = utils.$c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
869
|
-
let isSSRRef = React.useRef(isSSR);
|
|
870
|
-
isSSRRef.current = isSSR;
|
|
871
|
-
let getSnapshotWrapper = React.useCallback(() => {
|
|
872
|
-
return isSSRRef.current ? getServerSnapshot() : getSnapshot();
|
|
873
|
-
}, [
|
|
874
|
-
getSnapshot,
|
|
875
|
-
getServerSnapshot
|
|
876
|
-
]);
|
|
877
|
-
return shimExports.useSyncExternalStore(subscribe, getSnapshotWrapper);
|
|
878
|
-
}
|
|
879
|
-
const $42ceafc619f9c3ba$var$useSyncExternalStore = typeof React["useSyncExternalStore"] === "function" ? React["useSyncExternalStore"] : $42ceafc619f9c3ba$var$useSyncExternalStoreFallback;
|
|
880
|
-
function $42ceafc619f9c3ba$var$useCollectionDocument(createCollection) {
|
|
881
|
-
let [document2] = React.useState(() => new $96ead35620b8fd36$export$b34a105447964f9f(createCollection?.() || new BaseCollection.$6f0c29017aeec335$export$408d25a4e12db025()));
|
|
882
|
-
let subscribe = React.useCallback((fn) => document2.subscribe(fn), [
|
|
883
|
-
document2
|
|
884
|
-
]);
|
|
885
|
-
let getSnapshot = React.useCallback(() => {
|
|
886
|
-
let collection2 = document2.getCollection();
|
|
887
|
-
if (document2.isSSR)
|
|
888
|
-
document2.resetAfterSSR();
|
|
889
|
-
return collection2;
|
|
890
|
-
}, [
|
|
891
|
-
document2
|
|
892
|
-
]);
|
|
893
|
-
let getServerSnapshot = React.useCallback(() => {
|
|
894
|
-
document2.isSSR = true;
|
|
895
|
-
return document2.getCollection();
|
|
896
|
-
}, [
|
|
897
|
-
document2
|
|
898
|
-
]);
|
|
899
|
-
let collection = $42ceafc619f9c3ba$var$useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
900
|
-
return {
|
|
901
|
-
collection,
|
|
902
|
-
document: document2
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
const $42ceafc619f9c3ba$var$SSRContext = /* @__PURE__ */ React.createContext(null);
|
|
906
|
-
function $42ceafc619f9c3ba$var$createCollectionNodeClass(type) {
|
|
907
|
-
var _a;
|
|
908
|
-
let NodeClass = (_a = class extends BaseCollection.$6f0c29017aeec335$export$d68d59712b04d9d1 {
|
|
909
|
-
}, _a.type = type, _a);
|
|
910
|
-
return NodeClass;
|
|
911
|
-
}
|
|
912
|
-
function $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {
|
|
913
|
-
if (typeof CollectionNodeClass === "string")
|
|
914
|
-
CollectionNodeClass = $42ceafc619f9c3ba$var$createCollectionNodeClass(CollectionNodeClass);
|
|
915
|
-
let itemRef = React.useCallback((element) => {
|
|
916
|
-
element?.setProps(props, ref, CollectionNodeClass, rendered, render);
|
|
917
|
-
}, [
|
|
918
|
-
props,
|
|
919
|
-
ref,
|
|
920
|
-
rendered,
|
|
921
|
-
render,
|
|
922
|
-
CollectionNodeClass
|
|
923
|
-
]);
|
|
924
|
-
let parentNode = React.useContext($42ceafc619f9c3ba$var$SSRContext);
|
|
925
|
-
if (parentNode) {
|
|
926
|
-
let element = parentNode.ownerDocument.nodesByProps.get(props);
|
|
927
|
-
if (!element) {
|
|
928
|
-
element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);
|
|
929
|
-
element.setProps(props, ref, CollectionNodeClass, rendered, render);
|
|
930
|
-
parentNode.appendChild(element);
|
|
931
|
-
parentNode.ownerDocument.updateCollection();
|
|
932
|
-
parentNode.ownerDocument.nodesByProps.set(props, element);
|
|
933
|
-
}
|
|
934
|
-
return children ? /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$SSRContext.Provider, {
|
|
935
|
-
value: element
|
|
936
|
-
}, children) : null;
|
|
937
|
-
}
|
|
938
|
-
return /* @__PURE__ */ React.createElement(CollectionNodeClass.type, {
|
|
939
|
-
ref: itemRef
|
|
940
|
-
}, children);
|
|
941
|
-
}
|
|
942
|
-
function $42ceafc619f9c3ba$export$18af5c7a9e9b3664(CollectionNodeClass, render) {
|
|
943
|
-
let Component = ({ node }) => render(node.props, node.props.ref, node);
|
|
944
|
-
let Result = React.forwardRef((props, ref) => {
|
|
945
|
-
let focusableProps = React.useContext(useHover.$d1116acdf220c2da$export$f9762fab77588ecb);
|
|
946
|
-
let isShallow = React.useContext($42ceafc619f9c3ba$var$ShallowRenderContext);
|
|
947
|
-
if (!isShallow) {
|
|
948
|
-
if (render.length >= 3) throw new Error(render.name + " cannot be rendered outside a collection.");
|
|
949
|
-
return render(props, ref);
|
|
950
|
-
}
|
|
951
|
-
return $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, "children" in props ? props.children : null, null, (node) => (
|
|
952
|
-
// Forward FocusableContext to real DOM tree so tooltips work.
|
|
953
|
-
/* @__PURE__ */ React.createElement(useHover.$d1116acdf220c2da$export$f9762fab77588ecb.Provider, {
|
|
954
|
-
value: focusableProps
|
|
955
|
-
}, /* @__PURE__ */ React.createElement(Component, {
|
|
956
|
-
node
|
|
957
|
-
}))
|
|
958
|
-
));
|
|
959
|
-
});
|
|
960
|
-
Result.displayName = render.name;
|
|
961
|
-
return Result;
|
|
962
|
-
}
|
|
963
|
-
function $42ceafc619f9c3ba$export$e953bb1cd0f19726(CollectionNodeClass, render, useChildren = $42ceafc619f9c3ba$var$useCollectionChildren) {
|
|
964
|
-
let Component = ({ node }) => render(node.props, node.props.ref, node);
|
|
965
|
-
let Result = React.forwardRef((props, ref) => {
|
|
966
|
-
let children = useChildren(props);
|
|
967
|
-
return $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, (node) => /* @__PURE__ */ React.createElement(Component, {
|
|
968
|
-
node
|
|
969
|
-
})) ?? /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
970
|
-
});
|
|
971
|
-
Result.displayName = render.name;
|
|
972
|
-
return Result;
|
|
973
|
-
}
|
|
974
|
-
function $42ceafc619f9c3ba$var$useCollectionChildren(options) {
|
|
975
|
-
return $a80bd3e9349588e7$export$727c8fc270210f13({
|
|
976
|
-
...options,
|
|
977
|
-
addIdAndValue: true
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
const $42ceafc619f9c3ba$var$CollectionContext = /* @__PURE__ */ React.createContext(null);
|
|
981
|
-
function $42ceafc619f9c3ba$export$fb8073518f34e6ec(props) {
|
|
982
|
-
let ctx = React.useContext($42ceafc619f9c3ba$var$CollectionContext);
|
|
983
|
-
let dependencies = (ctx?.dependencies || []).concat(props.dependencies);
|
|
984
|
-
let idScope = props.idScope ?? ctx?.idScope;
|
|
985
|
-
let children = $42ceafc619f9c3ba$var$useCollectionChildren({
|
|
986
|
-
...props,
|
|
987
|
-
idScope,
|
|
988
|
-
dependencies
|
|
989
|
-
});
|
|
990
|
-
let doc = React.useContext($42ceafc619f9c3ba$var$CollectionDocumentContext);
|
|
991
|
-
if (doc) children = /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$CollectionRoot, null, children);
|
|
992
|
-
ctx = React.useMemo(
|
|
993
|
-
() => ({
|
|
994
|
-
dependencies: (
|
|
995
|
-
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
996
|
-
dependencies
|
|
997
|
-
),
|
|
998
|
-
idScope
|
|
999
|
-
}),
|
|
1000
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1001
|
-
// oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps
|
|
1002
|
-
[
|
|
1003
|
-
idScope,
|
|
1004
|
-
...dependencies
|
|
1005
|
-
]
|
|
1006
|
-
);
|
|
1007
|
-
return /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$CollectionContext.Provider, {
|
|
1008
|
-
value: ctx
|
|
1009
|
-
}, children);
|
|
1010
|
-
}
|
|
1011
|
-
function $42ceafc619f9c3ba$var$CollectionRoot({ children }) {
|
|
1012
|
-
let doc = React.useContext($42ceafc619f9c3ba$var$CollectionDocumentContext);
|
|
1013
|
-
let wrappedChildren = React.useMemo(() => /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$CollectionDocumentContext.Provider, {
|
|
1014
|
-
value: null
|
|
1015
|
-
}, /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$ShallowRenderContext.Provider, {
|
|
1016
|
-
value: true
|
|
1017
|
-
}, children)), [
|
|
1018
|
-
children
|
|
1019
|
-
]);
|
|
1020
|
-
return utils.$c7eafbbe1ea5834e$export$535bd6ca7f90a273() ? /* @__PURE__ */ React.createElement($42ceafc619f9c3ba$var$SSRContext.Provider, {
|
|
1021
|
-
value: doc
|
|
1022
|
-
}, wrappedChildren) : /* @__PURE__ */ ReactDOM.createPortal(wrappedChildren, doc);
|
|
1023
|
-
}
|
|
1024
|
-
const $263ab7fc0f95ccdb$export$a164736487e3f0ae = {
|
|
1025
|
-
CollectionRoot({ collection, renderDropIndicator }) {
|
|
1026
|
-
return $263ab7fc0f95ccdb$var$useCollectionRender(collection, null, renderDropIndicator);
|
|
1027
|
-
},
|
|
1028
|
-
CollectionBranch({ collection, parent, renderDropIndicator }) {
|
|
1029
|
-
return $263ab7fc0f95ccdb$var$useCollectionRender(collection, parent, renderDropIndicator);
|
|
1030
|
-
}
|
|
1031
|
-
};
|
|
1032
|
-
function $263ab7fc0f95ccdb$var$useCollectionRender(collection, parent, renderDropIndicator) {
|
|
1033
|
-
return $a80bd3e9349588e7$export$727c8fc270210f13({
|
|
1034
|
-
items: parent ? collection.getChildren(parent.key) : collection,
|
|
1035
|
-
dependencies: [
|
|
1036
|
-
renderDropIndicator
|
|
1037
|
-
],
|
|
1038
|
-
children(node) {
|
|
1039
|
-
if (node.type === "content") return /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
1040
|
-
let rendered = node.render(node);
|
|
1041
|
-
if (!renderDropIndicator || node.type !== "item") return rendered;
|
|
1042
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderDropIndicator({
|
|
1043
|
-
type: "item",
|
|
1044
|
-
key: node.key,
|
|
1045
|
-
dropPosition: "before"
|
|
1046
|
-
}), rendered, $263ab7fc0f95ccdb$export$2dbbd341daed716d(collection, node, renderDropIndicator));
|
|
1047
|
-
}
|
|
1048
|
-
});
|
|
1049
|
-
}
|
|
1050
|
-
function $263ab7fc0f95ccdb$export$2dbbd341daed716d(collection, node, renderDropIndicator) {
|
|
1051
|
-
let key = node.key;
|
|
1052
|
-
let keyAfter = collection.getKeyAfter(key);
|
|
1053
|
-
let nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
|
|
1054
|
-
while (nextItemInFlattenedCollection != null && nextItemInFlattenedCollection.type !== "item") {
|
|
1055
|
-
keyAfter = collection.getKeyAfter(nextItemInFlattenedCollection.key);
|
|
1056
|
-
nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
|
|
1057
|
-
}
|
|
1058
|
-
let nextItemInSameLevel = node.nextKey != null ? collection.getItem(node.nextKey) : null;
|
|
1059
|
-
while (nextItemInSameLevel != null && nextItemInSameLevel.type !== "item") nextItemInSameLevel = nextItemInSameLevel.nextKey != null ? collection.getItem(nextItemInSameLevel.nextKey) : null;
|
|
1060
|
-
let afterIndicators = [];
|
|
1061
|
-
if (nextItemInSameLevel == null) {
|
|
1062
|
-
let current = node;
|
|
1063
|
-
while (current?.type === "item" && (!nextItemInFlattenedCollection || current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level)) {
|
|
1064
|
-
let indicator = renderDropIndicator({
|
|
1065
|
-
type: "item",
|
|
1066
|
-
key: current.key,
|
|
1067
|
-
dropPosition: "after"
|
|
1068
|
-
});
|
|
1069
|
-
if (/* @__PURE__ */ React.isValidElement(indicator)) afterIndicators.push(/* @__PURE__ */ React.cloneElement(indicator, {
|
|
1070
|
-
key: `${current.key}-after`
|
|
1071
|
-
}));
|
|
1072
|
-
current = current.parentKey != null ? collection.getItem(current.parentKey) : null;
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
return afterIndicators;
|
|
1076
|
-
}
|
|
1077
|
-
const $263ab7fc0f95ccdb$export$4feb769f8ddf26c5 = /* @__PURE__ */ React.createContext($263ab7fc0f95ccdb$export$a164736487e3f0ae);
|
|
1078
148
|
function $3c71b1595a147f24$export$496315a1608d9602(cb, dependencies) {
|
|
1079
149
|
const isInitialMount = React.useRef(true);
|
|
1080
150
|
const lastDeps = React.useRef(null);
|
|
@@ -1092,174 +162,12 @@ function $3c71b1595a147f24$export$496315a1608d9602(cb, dependencies) {
|
|
|
1092
162
|
lastDeps.current = dependencies;
|
|
1093
163
|
}, dependencies);
|
|
1094
164
|
}
|
|
1095
|
-
function $901761b40e390936$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
1096
|
-
if (!node) return false;
|
|
1097
|
-
let style = window.getComputedStyle(node);
|
|
1098
|
-
let root = document.scrollingElement || document.documentElement;
|
|
1099
|
-
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
1100
|
-
if (node === root && style.overflow !== "hidden") isScrollable = true;
|
|
1101
|
-
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
1102
|
-
return isScrollable;
|
|
1103
|
-
}
|
|
1104
165
|
function $3578607fe3d4b096$export$cfa2225e87938781(node, checkForOverflow) {
|
|
1105
166
|
let scrollableNode = node;
|
|
1106
|
-
if (
|
|
1107
|
-
while (scrollableNode &&
|
|
167
|
+
if (useHasTabbableChild.$901761b40e390936$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
168
|
+
while (scrollableNode && !useHasTabbableChild.$901761b40e390936$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
1108
169
|
return scrollableNode || document.scrollingElement || document.documentElement;
|
|
1109
170
|
}
|
|
1110
|
-
function $76d97191f0f90600$export$94ed1c92c7beeb22(node, checkForOverflow) {
|
|
1111
|
-
let parentElements = [];
|
|
1112
|
-
let root = document.scrollingElement || document.documentElement;
|
|
1113
|
-
while (node) {
|
|
1114
|
-
if ($901761b40e390936$export$2bb74740c4e19def(node, checkForOverflow)) parentElements.push(node);
|
|
1115
|
-
if (node === root) break;
|
|
1116
|
-
node = node.parentElement;
|
|
1117
|
-
}
|
|
1118
|
-
return parentElements;
|
|
1119
|
-
}
|
|
1120
|
-
function $51a3e22a5186a962$export$53a0910f038337bd(scrollView, element, opts = {}) {
|
|
1121
|
-
if (scrollView === element) return;
|
|
1122
|
-
let target = element.getBoundingClientRect();
|
|
1123
|
-
$51a3e22a5186a962$export$f064fd83a2c6e9ca(scrollView, element, target, opts);
|
|
1124
|
-
}
|
|
1125
|
-
function $51a3e22a5186a962$export$f064fd83a2c6e9ca(scrollView, element, target, opts = {}) {
|
|
1126
|
-
let { block = "nearest", inline = "nearest" } = opts;
|
|
1127
|
-
let y = scrollView.scrollTop;
|
|
1128
|
-
let x = scrollView.scrollLeft;
|
|
1129
|
-
let view = scrollView.getBoundingClientRect();
|
|
1130
|
-
let itemStyle = window.getComputedStyle(element);
|
|
1131
|
-
let viewStyle = window.getComputedStyle(scrollView);
|
|
1132
|
-
let root = document.scrollingElement || document.documentElement;
|
|
1133
|
-
let isRoot = scrollView === root;
|
|
1134
|
-
let viewTop = scrollView === root ? 0 : view.top;
|
|
1135
|
-
let viewBottom = scrollView === root ? scrollView.clientHeight : view.bottom;
|
|
1136
|
-
let viewLeft = scrollView === root ? 0 : view.left;
|
|
1137
|
-
let viewRight = scrollView === root ? scrollView.clientWidth : view.right;
|
|
1138
|
-
let scrollMarginTop = parseFloat(itemStyle.scrollMarginTop) || 0;
|
|
1139
|
-
let scrollMarginBottom = parseFloat(itemStyle.scrollMarginBottom) || 0;
|
|
1140
|
-
let scrollMarginLeft = parseFloat(itemStyle.scrollMarginLeft) || 0;
|
|
1141
|
-
let scrollMarginRight = parseFloat(itemStyle.scrollMarginRight) || 0;
|
|
1142
|
-
let scrollPaddingTop = parseFloat(viewStyle.scrollPaddingTop) || 0;
|
|
1143
|
-
let scrollPaddingBottom = parseFloat(viewStyle.scrollPaddingBottom) || 0;
|
|
1144
|
-
let scrollPaddingLeft = parseFloat(viewStyle.scrollPaddingLeft) || 0;
|
|
1145
|
-
let scrollPaddingRight = parseFloat(viewStyle.scrollPaddingRight) || 0;
|
|
1146
|
-
let borderTopWidth = parseFloat(viewStyle.borderTopWidth) || 0;
|
|
1147
|
-
let borderBottomWidth = parseFloat(viewStyle.borderBottomWidth) || 0;
|
|
1148
|
-
let borderLeftWidth = parseFloat(viewStyle.borderLeftWidth) || 0;
|
|
1149
|
-
let borderRightWidth = parseFloat(viewStyle.borderRightWidth) || 0;
|
|
1150
|
-
let scrollAreaTop = target.top - scrollMarginTop;
|
|
1151
|
-
let scrollAreaBottom = target.bottom + scrollMarginBottom;
|
|
1152
|
-
let scrollAreaLeft = target.left - scrollMarginLeft;
|
|
1153
|
-
let scrollAreaRight = target.right + scrollMarginRight;
|
|
1154
|
-
let scrollBarOffsetX = scrollView === root ? 0 : borderLeftWidth + borderRightWidth;
|
|
1155
|
-
let scrollBarOffsetY = scrollView === root ? 0 : borderTopWidth + borderBottomWidth;
|
|
1156
|
-
let scrollBarWidth = scrollView === root ? 0 : scrollView.offsetWidth - scrollView.clientWidth - scrollBarOffsetX;
|
|
1157
|
-
let scrollBarHeight = scrollView === root ? 0 : scrollView.offsetHeight - scrollView.clientHeight - scrollBarOffsetY;
|
|
1158
|
-
let scrollPortTop = viewTop + (isRoot ? 0 : borderTopWidth) + scrollPaddingTop;
|
|
1159
|
-
let scrollPortBottom = viewBottom - (isRoot ? 0 : borderBottomWidth) - scrollPaddingBottom - scrollBarHeight;
|
|
1160
|
-
let scrollPortLeft = viewLeft + (isRoot ? 0 : borderLeftWidth) + scrollPaddingLeft;
|
|
1161
|
-
let scrollPortRight = viewRight - (isRoot ? 0 : borderRightWidth) - scrollPaddingRight;
|
|
1162
|
-
if (focusSafely.$2add3ce32c6007eb$export$fedb369cb70207f1() && focusSafely.$2add3ce32c6007eb$export$78551043582a6a98() || viewStyle.direction === "ltr") scrollPortRight -= scrollBarWidth;
|
|
1163
|
-
else if (viewStyle.direction === "rtl") scrollPortLeft += scrollBarWidth;
|
|
1164
|
-
let shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;
|
|
1165
|
-
let shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;
|
|
1166
|
-
if (shouldScrollBlock && block === "start") y += scrollAreaTop - scrollPortTop;
|
|
1167
|
-
else if (shouldScrollBlock && block === "center") y += (scrollAreaTop + scrollAreaBottom) / 2 - (scrollPortTop + scrollPortBottom) / 2;
|
|
1168
|
-
else if (shouldScrollBlock && block === "end") y += scrollAreaBottom - scrollPortBottom;
|
|
1169
|
-
else if (shouldScrollBlock && block === "nearest") {
|
|
1170
|
-
let start = scrollAreaTop - scrollPortTop;
|
|
1171
|
-
let end = scrollAreaBottom - scrollPortBottom;
|
|
1172
|
-
y += Math.abs(start) <= Math.abs(end) ? start : end;
|
|
1173
|
-
}
|
|
1174
|
-
if (shouldScrollInline && inline === "start") x += scrollAreaLeft - scrollPortLeft;
|
|
1175
|
-
else if (shouldScrollInline && inline === "center") x += (scrollAreaLeft + scrollAreaRight) / 2 - (scrollPortLeft + scrollPortRight) / 2;
|
|
1176
|
-
else if (shouldScrollInline && inline === "end") x += scrollAreaRight - scrollPortRight;
|
|
1177
|
-
else if (shouldScrollInline && inline === "nearest") {
|
|
1178
|
-
let start = scrollAreaLeft - scrollPortLeft;
|
|
1179
|
-
let end = scrollAreaRight - scrollPortRight;
|
|
1180
|
-
x += Math.abs(start) <= Math.abs(end) ? start : end;
|
|
1181
|
-
}
|
|
1182
|
-
if (process.env.NODE_ENV === "test") {
|
|
1183
|
-
scrollView.scrollLeft = x;
|
|
1184
|
-
scrollView.scrollTop = y;
|
|
1185
|
-
return;
|
|
1186
|
-
}
|
|
1187
|
-
scrollView.scrollTo({
|
|
1188
|
-
left: x,
|
|
1189
|
-
top: y
|
|
1190
|
-
});
|
|
1191
|
-
}
|
|
1192
|
-
function $51a3e22a5186a962$export$c826860796309d1b(targetElement, opts = {}) {
|
|
1193
|
-
let { containingElement } = opts;
|
|
1194
|
-
if (targetElement && targetElement.isConnected) {
|
|
1195
|
-
let root = document.scrollingElement || document.documentElement;
|
|
1196
|
-
let isScrollPrevented = window.getComputedStyle(root).overflow === "hidden";
|
|
1197
|
-
if (!isScrollPrevented) {
|
|
1198
|
-
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
1199
|
-
targetElement?.scrollIntoView?.({
|
|
1200
|
-
block: "nearest"
|
|
1201
|
-
});
|
|
1202
|
-
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1203
|
-
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1204
|
-
containingElement?.scrollIntoView?.({
|
|
1205
|
-
block: "center",
|
|
1206
|
-
inline: "center"
|
|
1207
|
-
});
|
|
1208
|
-
targetElement.scrollIntoView?.({
|
|
1209
|
-
block: "nearest"
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
} else {
|
|
1213
|
-
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
1214
|
-
let scrollParents = $76d97191f0f90600$export$94ed1c92c7beeb22(targetElement, true);
|
|
1215
|
-
for (let scrollParent of scrollParents) $51a3e22a5186a962$export$53a0910f038337bd(scrollParent, targetElement);
|
|
1216
|
-
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1217
|
-
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1218
|
-
scrollParents = containingElement ? $76d97191f0f90600$export$94ed1c92c7beeb22(containingElement, true) : [];
|
|
1219
|
-
for (let scrollParent of scrollParents) $51a3e22a5186a962$export$53a0910f038337bd(scrollParent, containingElement, {
|
|
1220
|
-
block: "center",
|
|
1221
|
-
inline: "center"
|
|
1222
|
-
});
|
|
1223
|
-
for (let scrollParent of $76d97191f0f90600$export$94ed1c92c7beeb22(targetElement, true)) $51a3e22a5186a962$export$53a0910f038337bd(scrollParent, targetElement);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
let $121970af65029459$var$descriptionId = 0;
|
|
1229
|
-
const $121970af65029459$var$descriptionNodes = /* @__PURE__ */ new Map();
|
|
1230
|
-
function $121970af65029459$export$f8aeda7b10753fa1(description) {
|
|
1231
|
-
let [id, setId] = React.useState();
|
|
1232
|
-
utils.$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
1233
|
-
if (!description) return;
|
|
1234
|
-
let desc = $121970af65029459$var$descriptionNodes.get(description);
|
|
1235
|
-
if (!desc) {
|
|
1236
|
-
let id2 = `react-aria-description-${$121970af65029459$var$descriptionId++}`;
|
|
1237
|
-
setId(id2);
|
|
1238
|
-
let node = document.createElement("div");
|
|
1239
|
-
node.id = id2;
|
|
1240
|
-
node.style.display = "none";
|
|
1241
|
-
node.textContent = description;
|
|
1242
|
-
document.body.appendChild(node);
|
|
1243
|
-
desc = {
|
|
1244
|
-
refCount: 0,
|
|
1245
|
-
element: node
|
|
1246
|
-
};
|
|
1247
|
-
$121970af65029459$var$descriptionNodes.set(description, desc);
|
|
1248
|
-
} else setId(desc.element.id);
|
|
1249
|
-
desc.refCount++;
|
|
1250
|
-
return () => {
|
|
1251
|
-
if (desc && --desc.refCount === 0) {
|
|
1252
|
-
desc.element.remove();
|
|
1253
|
-
$121970af65029459$var$descriptionNodes.delete(description);
|
|
1254
|
-
}
|
|
1255
|
-
};
|
|
1256
|
-
}, [
|
|
1257
|
-
description
|
|
1258
|
-
]);
|
|
1259
|
-
return {
|
|
1260
|
-
"aria-describedby": description ? id : void 0
|
|
1261
|
-
};
|
|
1262
|
-
}
|
|
1263
171
|
const $ed8ccb2e23e76301$export$b085522c77523c51 = /* @__PURE__ */ React.createContext(null);
|
|
1264
172
|
const $ed8ccb2e23e76301$export$c32003b803b6c22e = /* @__PURE__ */ React.createContext(null);
|
|
1265
173
|
var $8700ca6f74b7a3bb$exports = {};
|
|
@@ -1597,1634 +505,241 @@ function $f9554a667e4f0374$export$d1e8e3fbb7461f6(selectionManager, dragAndDropH
|
|
|
1597
505
|
dropTargetKey
|
|
1598
506
|
]);
|
|
1599
507
|
}
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
return id;
|
|
1617
|
-
}
|
|
1618
|
-
function $22bbea12c2567021$export$6aeb1680a0ae8741(collection) {
|
|
1619
|
-
return $22bbea12c2567021$var$collectionMap.get(collection);
|
|
1620
|
-
}
|
|
1621
|
-
const $f5a4a9a3486154da$var$TYPEAHEAD_DEBOUNCE_WAIT_MS = 1e3;
|
|
1622
|
-
function $f5a4a9a3486154da$export$e32c88dfddc6e1d8(options) {
|
|
1623
|
-
let { keyboardDelegate, selectionManager, onTypeSelect } = options;
|
|
1624
|
-
let state = React.useRef({
|
|
1625
|
-
search: "",
|
|
1626
|
-
timeout: void 0
|
|
1627
|
-
});
|
|
1628
|
-
let onKeyDownCapture = (e) => {
|
|
1629
|
-
if (state.current.search.length > 0 && e.key === " ") {
|
|
1630
|
-
e.preventDefault();
|
|
1631
|
-
if (!("continuePropagation" in e) || "continuePropagation" in e && !e.isPropagationStopped()) e.stopPropagation();
|
|
1632
|
-
state.current.search += " ";
|
|
1633
|
-
if (keyboardDelegate.getKeyForSearch != null) {
|
|
1634
|
-
let key = keyboardDelegate.getKeyForSearch(state.current.search, selectionManager.focusedKey);
|
|
1635
|
-
if (key == null) key = keyboardDelegate.getKeyForSearch(state.current.search);
|
|
1636
|
-
if (key != null) {
|
|
1637
|
-
selectionManager.setFocusedKey(key);
|
|
1638
|
-
if (onTypeSelect) onTypeSelect(key);
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
clearTimeout(state.current.timeout);
|
|
1642
|
-
state.current.timeout = setTimeout(() => {
|
|
1643
|
-
state.current.search = "";
|
|
1644
|
-
}, $f5a4a9a3486154da$var$TYPEAHEAD_DEBOUNCE_WAIT_MS);
|
|
1645
|
-
}
|
|
1646
|
-
};
|
|
1647
|
-
let onKeyDown = (e) => {
|
|
1648
|
-
let character = $f5a4a9a3486154da$var$getStringForKey(e.key);
|
|
1649
|
-
if (!character || e.ctrlKey || e.metaKey || e.altKey || !focusSafely.$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e)) || state.current.search.length === 0 && character === " ") return;
|
|
1650
|
-
state.current.search += character;
|
|
1651
|
-
if (keyboardDelegate.getKeyForSearch != null) {
|
|
1652
|
-
let key = keyboardDelegate.getKeyForSearch(state.current.search, selectionManager.focusedKey);
|
|
1653
|
-
if (key == null) key = keyboardDelegate.getKeyForSearch(state.current.search);
|
|
1654
|
-
if (key != null) {
|
|
1655
|
-
selectionManager.setFocusedKey(key);
|
|
1656
|
-
if (onTypeSelect) onTypeSelect(key);
|
|
1657
|
-
e.preventDefault();
|
|
1658
|
-
if (!("continuePropagation" in e)) e.stopPropagation();
|
|
1659
|
-
} else {
|
|
1660
|
-
state.current.search = "";
|
|
1661
|
-
clearTimeout(state.current.timeout);
|
|
1662
|
-
state.current.timeout = void 0;
|
|
1663
|
-
return;
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
clearTimeout(state.current.timeout);
|
|
1667
|
-
state.current.timeout = setTimeout(() => {
|
|
1668
|
-
state.current.search = "";
|
|
1669
|
-
}, $f5a4a9a3486154da$var$TYPEAHEAD_DEBOUNCE_WAIT_MS);
|
|
1670
|
-
};
|
|
1671
|
-
React.useEffect(() => {
|
|
1672
|
-
let timeout = state.current.timeout;
|
|
1673
|
-
return () => {
|
|
1674
|
-
clearTimeout(timeout);
|
|
1675
|
-
};
|
|
1676
|
-
}, [
|
|
1677
|
-
state
|
|
1678
|
-
]);
|
|
1679
|
-
return {
|
|
1680
|
-
typeSelectProps: {
|
|
1681
|
-
// Using a capturing listener to catch the keydown event before
|
|
1682
|
-
// other hooks in order to handle the Spacebar event.
|
|
1683
|
-
onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDownCapture : void 0,
|
|
1684
|
-
onKeyDown: keyboardDelegate.getKeyForSearch ? onKeyDown : void 0
|
|
1685
|
-
}
|
|
1686
|
-
};
|
|
1687
|
-
}
|
|
1688
|
-
function $f5a4a9a3486154da$var$getStringForKey(key) {
|
|
1689
|
-
if (key.length === 1 || !/^[A-Z]/i.test(key)) return key;
|
|
1690
|
-
return "";
|
|
1691
|
-
}
|
|
1692
|
-
function $a475cdc2445827b5$export$72ef708ab07251f1(effect, dependencies) {
|
|
1693
|
-
const isInitialMount = React.useRef(true);
|
|
1694
|
-
const lastDeps = React.useRef(null);
|
|
1695
|
-
utils.$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
1696
|
-
isInitialMount.current = true;
|
|
1697
|
-
return () => {
|
|
1698
|
-
isInitialMount.current = false;
|
|
1699
|
-
};
|
|
1700
|
-
}, []);
|
|
1701
|
-
utils.$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
1702
|
-
if (isInitialMount.current) isInitialMount.current = false;
|
|
1703
|
-
else if (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i]))) effect();
|
|
1704
|
-
lastDeps.current = dependencies;
|
|
1705
|
-
}, dependencies);
|
|
1706
|
-
}
|
|
1707
|
-
function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
1708
|
-
let { selectionManager: manager, keyboardDelegate: delegate, ref, autoFocus = false, shouldFocusWrap = false, disallowEmptySelection = false, disallowSelectAll = false, escapeKeyBehavior = "clearSelection", selectOnFocus = manager.selectionBehavior === "replace", disallowTypeAhead = false, shouldUseVirtualFocus, allowsTabNavigation = false, scrollRef = ref, linkBehavior = "action", UNSTABLE_focusOnEntry } = options;
|
|
1709
|
-
let { direction } = I18nProvider.$2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
1710
|
-
let router = focusSafely.$caaf0dd3060ed57c$export$9a302a45f65d0572();
|
|
1711
|
-
const navigateToKey = (e, key, childFocus) => {
|
|
1712
|
-
if (key != null) {
|
|
1713
|
-
if (manager.isLink(key) && linkBehavior === "selection" && selectOnFocus && !$22bbea12c2567021$export$d3e3bd3e26688c04(e)) {
|
|
1714
|
-
ReactDOM.flushSync(() => {
|
|
1715
|
-
manager.setFocusedKey(key, childFocus);
|
|
1716
|
-
});
|
|
1717
|
-
let item = $22bbea12c2567021$export$c3d8340acf92597f(ref, key);
|
|
1718
|
-
let itemProps = manager.getItemProps(key);
|
|
1719
|
-
if (item) {
|
|
1720
|
-
router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
1721
|
-
return;
|
|
1722
|
-
}
|
|
1723
|
-
return false;
|
|
1724
|
-
}
|
|
1725
|
-
manager.setFocusedKey(key, childFocus);
|
|
1726
|
-
if (manager.isLink(key) && linkBehavior === "override") return false;
|
|
1727
|
-
if (e.shiftKey && manager.selectionMode === "multiple") {
|
|
1728
|
-
manager.extendSelection(key);
|
|
1729
|
-
return;
|
|
1730
|
-
} else if (selectOnFocus && !$22bbea12c2567021$export$d3e3bd3e26688c04(e)) {
|
|
1731
|
-
manager.replaceSelection(key);
|
|
1732
|
-
return;
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
return false;
|
|
1736
|
-
};
|
|
1737
|
-
let arrowDown = (e) => {
|
|
1738
|
-
if (delegate.getKeyBelow) {
|
|
1739
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1740
|
-
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getFirstKey?.(manager.focusedKey);
|
|
1741
|
-
if (nextKey != null) {
|
|
1742
|
-
navigateToKey(e, nextKey);
|
|
1743
|
-
return;
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
return false;
|
|
1747
|
-
};
|
|
1748
|
-
let arrowUp = (e) => {
|
|
1749
|
-
if (delegate.getKeyAbove) {
|
|
1750
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove?.(manager.focusedKey) : delegate.getLastKey?.();
|
|
1751
|
-
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getLastKey?.(manager.focusedKey);
|
|
1752
|
-
if (nextKey != null) {
|
|
1753
|
-
navigateToKey(e, nextKey);
|
|
1754
|
-
return;
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
return false;
|
|
1758
|
-
};
|
|
1759
|
-
let home = (e) => {
|
|
1760
|
-
if (delegate.getFirstKey) {
|
|
1761
|
-
if (manager.focusedKey === null && e.shiftKey) return false;
|
|
1762
|
-
let firstKey2 = delegate.getFirstKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1763
|
-
manager.setFocusedKey(firstKey2);
|
|
1764
|
-
if (firstKey2 != null) {
|
|
1765
|
-
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") {
|
|
1766
|
-
manager.extendSelection(firstKey2);
|
|
1767
|
-
return;
|
|
1768
|
-
} else if (selectOnFocus) {
|
|
1769
|
-
manager.replaceSelection(firstKey2);
|
|
1770
|
-
return;
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
return false;
|
|
1775
|
-
};
|
|
1776
|
-
let arrowLeft = (e) => {
|
|
1777
|
-
if (delegate.getKeyLeftOf) {
|
|
1778
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyLeftOf?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1779
|
-
if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? delegate.getFirstKey?.(manager.focusedKey) : delegate.getLastKey?.(manager.focusedKey);
|
|
1780
|
-
if (nextKey != null) {
|
|
1781
|
-
navigateToKey(e, nextKey, direction === "rtl" ? "first" : "last");
|
|
1782
|
-
return;
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
return false;
|
|
1786
|
-
};
|
|
1787
|
-
let arrowRight = (e) => {
|
|
1788
|
-
if (delegate.getKeyRightOf) {
|
|
1789
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyRightOf?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1790
|
-
if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? delegate.getLastKey?.(manager.focusedKey) : delegate.getFirstKey?.(manager.focusedKey);
|
|
1791
|
-
if (nextKey != null) {
|
|
1792
|
-
navigateToKey(e, nextKey, direction === "rtl" ? "last" : "first");
|
|
1793
|
-
return;
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
return false;
|
|
1797
|
-
};
|
|
1798
|
-
let end = (e) => {
|
|
1799
|
-
if (delegate.getLastKey) {
|
|
1800
|
-
if (manager.focusedKey === null && e.shiftKey) return false;
|
|
1801
|
-
let lastKey = delegate.getLastKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1802
|
-
manager.setFocusedKey(lastKey);
|
|
1803
|
-
if (lastKey != null) {
|
|
1804
|
-
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") {
|
|
1805
|
-
manager.extendSelection(lastKey);
|
|
1806
|
-
return;
|
|
1807
|
-
} else if (selectOnFocus) {
|
|
1808
|
-
manager.replaceSelection(lastKey);
|
|
1809
|
-
return;
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
return false;
|
|
1814
|
-
};
|
|
1815
|
-
let pageDown = (e) => {
|
|
1816
|
-
if (delegate.getKeyPageBelow && manager.focusedKey != null) {
|
|
1817
|
-
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
|
|
1818
|
-
if (nextKey != null) return navigateToKey(e, nextKey);
|
|
1819
|
-
}
|
|
1820
|
-
return false;
|
|
1821
|
-
};
|
|
1822
|
-
let pageUp = (e) => {
|
|
1823
|
-
if (delegate.getKeyPageAbove && manager.focusedKey != null) {
|
|
1824
|
-
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
|
|
1825
|
-
if (nextKey != null) return navigateToKey(e, nextKey);
|
|
1826
|
-
}
|
|
1827
|
-
return false;
|
|
1828
|
-
};
|
|
1829
|
-
let aHandler = () => {
|
|
1830
|
-
if (manager.selectionMode === "multiple" && disallowSelectAll !== true) {
|
|
1831
|
-
manager.selectAll();
|
|
1832
|
-
return;
|
|
1833
|
-
}
|
|
1834
|
-
return false;
|
|
1835
|
-
};
|
|
1836
|
-
let escape = () => {
|
|
1837
|
-
if (escapeKeyBehavior === "clearSelection" && !disallowEmptySelection && manager.selectedKeys.size !== 0) {
|
|
1838
|
-
manager.clearSelection();
|
|
1839
|
-
return;
|
|
1840
|
-
}
|
|
1841
|
-
return false;
|
|
1842
|
-
};
|
|
1843
|
-
let tab = () => {
|
|
1844
|
-
if (!allowsTabNavigation && ref.current) {
|
|
1845
|
-
let walker = FocusScope.$535772f9d2c1f38d$export$2d6ec8fc375ceafa(ref.current, {
|
|
1846
|
-
tabbable: true
|
|
1847
|
-
});
|
|
1848
|
-
let next = void 0;
|
|
1849
|
-
let last;
|
|
1850
|
-
do {
|
|
1851
|
-
last = walker.lastChild();
|
|
1852
|
-
if (last) next = last;
|
|
1853
|
-
} while (last);
|
|
1854
|
-
let activeElement = focusSafely.$23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
1855
|
-
if (next && (!focusSafely.$23f2114a1b82827e$export$b4f377a2b6254582(next) || activeElement && !focusSafely.$3b8b240c1bf84ab9$export$bebd5a1431fec25d(activeElement))) focusSafely.$1969ac565cfec8d0$export$de79e2c695e052f3(next);
|
|
1856
|
-
}
|
|
1857
|
-
return {
|
|
1858
|
-
shouldContinuePropagation: true,
|
|
1859
|
-
shouldPreventDefault: false
|
|
1860
|
-
};
|
|
1861
|
-
};
|
|
1862
|
-
let shiftTab = () => {
|
|
1863
|
-
if (!allowsTabNavigation && ref.current) ref.current.focus();
|
|
1864
|
-
return {
|
|
1865
|
-
shouldContinuePropagation: true,
|
|
1866
|
-
shouldPreventDefault: false
|
|
1867
|
-
};
|
|
1868
|
-
};
|
|
1869
|
-
let withShiftSel = (key, callback) => {
|
|
1870
|
-
return {
|
|
1871
|
-
[focusSafely.$2add3ce32c6007eb$export$9ac100e40613ea10() ? key + "+Shift+Alt" : key + "+Shift+Control"]: callback,
|
|
1872
|
-
[key + "+Shift"]: callback,
|
|
1873
|
-
[focusSafely.$2add3ce32c6007eb$export$9ac100e40613ea10() ? key + "+Alt" : key + "+Control"]: callback,
|
|
1874
|
-
[key]: callback
|
|
1875
|
-
};
|
|
1876
|
-
};
|
|
1877
|
-
let { keyboardProps: repeatKeyboardProps } = useHover.$8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
1878
|
-
shortcuts: {
|
|
1879
|
-
...withShiftSel("ArrowDown", arrowDown),
|
|
1880
|
-
...withShiftSel("ArrowUp", arrowUp),
|
|
1881
|
-
...withShiftSel("ArrowLeft", arrowLeft),
|
|
1882
|
-
...withShiftSel("ArrowRight", arrowRight),
|
|
1883
|
-
...withShiftSel("PageDown", pageDown),
|
|
1884
|
-
...withShiftSel("PageUp", pageUp)
|
|
1885
|
-
},
|
|
1886
|
-
allowRepeats: true
|
|
1887
|
-
});
|
|
1888
|
-
let { keyboardProps } = useHover.$8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
1889
|
-
shortcuts: {
|
|
1890
|
-
...withShiftSel("Home", home),
|
|
1891
|
-
...withShiftSel("End", end),
|
|
1892
|
-
"Mod+A": aHandler,
|
|
1893
|
-
Escape: escape,
|
|
1894
|
-
Tab: tab,
|
|
1895
|
-
"Tab+Shift": shiftTab
|
|
1896
|
-
}
|
|
1897
|
-
});
|
|
1898
|
-
let scrollPos = React.useRef({
|
|
1899
|
-
top: 0,
|
|
1900
|
-
left: 0
|
|
1901
|
-
});
|
|
1902
|
-
$600b3cf69ae46262$export$90fc3a17d93f704c(scrollRef, "scroll", () => {
|
|
1903
|
-
scrollPos.current = {
|
|
1904
|
-
top: scrollRef.current?.scrollTop ?? 0,
|
|
1905
|
-
left: scrollRef.current?.scrollLeft ?? 0
|
|
1906
|
-
};
|
|
1907
|
-
});
|
|
1908
|
-
let onFocus = (e) => {
|
|
1909
|
-
if (manager.isFocused) {
|
|
1910
|
-
if (!focusSafely.$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e))) manager.setFocused(false);
|
|
1911
|
-
return;
|
|
1912
|
-
}
|
|
1913
|
-
if (!focusSafely.$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
|
|
1914
|
-
let modality = focusSafely.$8f5a2122b0992be3$export$630ff653c5ada6a9();
|
|
1915
|
-
manager.setFocused(true);
|
|
1916
|
-
let navigateToKey2 = (key) => {
|
|
1917
|
-
if (key != null) {
|
|
1918
|
-
manager.setFocusedKey(key);
|
|
1919
|
-
if (selectOnFocus && !manager.isSelected(key)) manager.replaceSelection(key);
|
|
1920
|
-
}
|
|
1921
|
-
};
|
|
1922
|
-
if (UNSTABLE_focusOnEntry && (modality === "keyboard" || modality === "virtual"))
|
|
1923
|
-
navigateToKey2(UNSTABLE_focusOnEntry === "first" ? delegate.getFirstKey?.() : delegate.getLastKey?.());
|
|
1924
|
-
else if (manager.focusedKey == null) {
|
|
1925
|
-
let relatedTarget = e.relatedTarget;
|
|
1926
|
-
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToKey2(manager.lastSelectedKey ?? delegate.getLastKey?.());
|
|
1927
|
-
else navigateToKey2(manager.firstSelectedKey ?? delegate.getFirstKey?.());
|
|
1928
|
-
} else if (scrollRef.current) {
|
|
1929
|
-
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
1930
|
-
scrollRef.current.scrollLeft = scrollPos.current.left;
|
|
1931
|
-
}
|
|
1932
|
-
if (manager.focusedKey != null && scrollRef.current) {
|
|
1933
|
-
let element = $22bbea12c2567021$export$c3d8340acf92597f(ref, manager.focusedKey);
|
|
1934
|
-
if (element instanceof HTMLElement) {
|
|
1935
|
-
if (!focusSafely.$23f2114a1b82827e$export$b4f377a2b6254582(element) && !shouldUseVirtualFocus) focusSafely.$1969ac565cfec8d0$export$de79e2c695e052f3(element);
|
|
1936
|
-
if (modality === "keyboard" || UNSTABLE_focusOnEntry && modality === "virtual") $51a3e22a5186a962$export$c826860796309d1b(element, {
|
|
1937
|
-
containingElement: ref.current
|
|
1938
|
-
});
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
};
|
|
1942
|
-
let onBlur = (e) => {
|
|
1943
|
-
if (!focusSafely.$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, e.relatedTarget)) manager.setFocused(false);
|
|
1944
|
-
};
|
|
1945
|
-
let shouldVirtualFocusFirst = React.useRef(false);
|
|
1946
|
-
$600b3cf69ae46262$export$90fc3a17d93f704c(ref, $8b2399d051d06d4c$export$831c820ad60f9d12, !shouldUseVirtualFocus ? void 0 : (e) => {
|
|
1947
|
-
let { detail } = e;
|
|
1948
|
-
e.stopPropagation();
|
|
1949
|
-
manager.setFocused(true);
|
|
1950
|
-
if (detail?.focusStrategy === "first") shouldVirtualFocusFirst.current = true;
|
|
1951
|
-
});
|
|
1952
|
-
let firstKey = delegate.getFirstKey?.() ?? null;
|
|
1953
|
-
$a475cdc2445827b5$export$72ef708ab07251f1(() => {
|
|
1954
|
-
if (shouldVirtualFocusFirst.current) {
|
|
1955
|
-
if (firstKey == null) {
|
|
1956
|
-
let previousActiveElement = focusSafely.$23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
1957
|
-
$b72f3f7b3b5f42c6$export$76e4e37e5339496d(ref.current);
|
|
1958
|
-
$b72f3f7b3b5f42c6$export$2b35b76d2e30e129(previousActiveElement, null);
|
|
1959
|
-
if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
|
|
1960
|
-
} else {
|
|
1961
|
-
manager.setFocusedKey(firstKey);
|
|
1962
|
-
shouldVirtualFocusFirst.current = false;
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
}, [
|
|
1966
|
-
firstKey,
|
|
1967
|
-
manager.collection.size
|
|
1968
|
-
]);
|
|
1969
|
-
$a475cdc2445827b5$export$72ef708ab07251f1(() => {
|
|
1970
|
-
if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
|
|
1971
|
-
}, [
|
|
1972
|
-
manager.focusedKey
|
|
1973
|
-
]);
|
|
1974
|
-
$600b3cf69ae46262$export$90fc3a17d93f704c(ref, $8b2399d051d06d4c$export$447a38995de2c711, !shouldUseVirtualFocus ? void 0 : (e) => {
|
|
1975
|
-
e.stopPropagation();
|
|
1976
|
-
manager.setFocused(false);
|
|
1977
|
-
if (e.detail?.clearFocusKey) manager.setFocusedKey(null);
|
|
1978
|
-
});
|
|
1979
|
-
const autoFocusRef = React.useRef(autoFocus);
|
|
1980
|
-
const didAutoFocusRef = React.useRef(false);
|
|
1981
|
-
React.useEffect(() => {
|
|
1982
|
-
if (autoFocusRef.current) {
|
|
1983
|
-
let focusedKey = null;
|
|
1984
|
-
if (autoFocus === "first") focusedKey = delegate.getFirstKey?.() ?? null;
|
|
1985
|
-
if (autoFocus === "last") focusedKey = delegate.getLastKey?.() ?? null;
|
|
1986
|
-
let selectedKeys = manager.selectedKeys;
|
|
1987
|
-
if (selectedKeys.size) {
|
|
1988
|
-
for (let key of selectedKeys) if (manager.canSelectItem(key)) {
|
|
1989
|
-
focusedKey = key;
|
|
1990
|
-
break;
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
manager.setFocused(true);
|
|
1994
|
-
manager.setFocusedKey(focusedKey);
|
|
1995
|
-
if (focusedKey != null && selectOnFocus && !selectedKeys.size && manager.canSelectItem(focusedKey)) manager.replaceSelection(focusedKey);
|
|
1996
|
-
if (focusedKey == null && !shouldUseVirtualFocus && ref.current) focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
1997
|
-
if (manager.collection.size > 0) {
|
|
1998
|
-
autoFocusRef.current = false;
|
|
1999
|
-
didAutoFocusRef.current = true;
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
});
|
|
2003
|
-
let lastFocusedKey = React.useRef(manager.focusedKey);
|
|
2004
|
-
let raf = React.useRef(null);
|
|
2005
|
-
React.useEffect(() => {
|
|
2006
|
-
if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || didAutoFocusRef.current) && scrollRef.current && ref.current) {
|
|
2007
|
-
let modality = focusSafely.$8f5a2122b0992be3$export$630ff653c5ada6a9();
|
|
2008
|
-
let element = $22bbea12c2567021$export$c3d8340acf92597f(ref, manager.focusedKey);
|
|
2009
|
-
if (!(element instanceof HTMLElement))
|
|
2010
|
-
return;
|
|
2011
|
-
if (modality === "keyboard" || didAutoFocusRef.current) {
|
|
2012
|
-
if (raf.current) cancelAnimationFrame(raf.current);
|
|
2013
|
-
raf.current = requestAnimationFrame(() => {
|
|
2014
|
-
if (scrollRef.current) {
|
|
2015
|
-
$51a3e22a5186a962$export$53a0910f038337bd(scrollRef.current, element);
|
|
2016
|
-
if (modality !== "virtual") $51a3e22a5186a962$export$c826860796309d1b(element, {
|
|
2017
|
-
containingElement: ref.current
|
|
2018
|
-
});
|
|
2019
|
-
}
|
|
2020
|
-
});
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null && ref.current) focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
2024
|
-
lastFocusedKey.current = manager.focusedKey;
|
|
2025
|
-
didAutoFocusRef.current = false;
|
|
2026
|
-
});
|
|
2027
|
-
React.useEffect(() => {
|
|
2028
|
-
return () => {
|
|
2029
|
-
if (raf.current) cancelAnimationFrame(raf.current);
|
|
2030
|
-
};
|
|
2031
|
-
}, []);
|
|
2032
|
-
$600b3cf69ae46262$export$90fc3a17d93f704c(ref, "react-aria-focus-scope-restore", (e) => {
|
|
2033
|
-
e.preventDefault();
|
|
2034
|
-
manager.setFocused(true);
|
|
2035
|
-
});
|
|
2036
|
-
let handlers = {
|
|
2037
|
-
...utils.$bbaa08b3cd72f041$export$9d1611c77c2fe928(keyboardProps, repeatKeyboardProps),
|
|
2038
|
-
onFocus,
|
|
2039
|
-
onBlur,
|
|
2040
|
-
onMouseDown(e) {
|
|
2041
|
-
if (scrollRef.current === focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e))
|
|
2042
|
-
e.preventDefault();
|
|
2043
|
-
}
|
|
2044
|
-
};
|
|
2045
|
-
let { typeSelectProps } = $f5a4a9a3486154da$export$e32c88dfddc6e1d8({
|
|
2046
|
-
keyboardDelegate: delegate,
|
|
2047
|
-
selectionManager: manager
|
|
2048
|
-
});
|
|
2049
|
-
if (!disallowTypeAhead)
|
|
2050
|
-
handlers = utils.$bbaa08b3cd72f041$export$9d1611c77c2fe928(typeSelectProps, handlers);
|
|
2051
|
-
let tabIndex = void 0;
|
|
2052
|
-
if (!shouldUseVirtualFocus) tabIndex = manager.focusedKey == null ? 0 : -1;
|
|
2053
|
-
let collectionId = $22bbea12c2567021$export$881eb0d9f3605d9d(manager.collection);
|
|
2054
|
-
return {
|
|
2055
|
-
// oxlint-disable-next-line react/react-compiler
|
|
2056
|
-
collectionProps: utils.$bbaa08b3cd72f041$export$9d1611c77c2fe928(handlers, {
|
|
2057
|
-
tabIndex,
|
|
2058
|
-
"data-collection": collectionId
|
|
2059
|
-
})
|
|
2060
|
-
};
|
|
2061
|
-
}
|
|
2062
|
-
class $a83747cc3f035330$export$8f5ed9ff9f511381 {
|
|
2063
|
-
constructor(ref) {
|
|
2064
|
-
this.ref = ref;
|
|
2065
|
-
}
|
|
2066
|
-
getItemRect(key) {
|
|
2067
|
-
let container = this.ref.current;
|
|
2068
|
-
if (!container) return null;
|
|
2069
|
-
let item = key != null ? $22bbea12c2567021$export$c3d8340acf92597f(this.ref, key) : null;
|
|
2070
|
-
if (!item) return null;
|
|
2071
|
-
let containerRect = container.getBoundingClientRect();
|
|
2072
|
-
let itemRect = item.getBoundingClientRect();
|
|
2073
|
-
return {
|
|
2074
|
-
x: itemRect.left - containerRect.left - container.clientLeft + container.scrollLeft,
|
|
2075
|
-
y: itemRect.top - containerRect.top - container.clientTop + container.scrollTop,
|
|
2076
|
-
width: itemRect.width,
|
|
2077
|
-
height: itemRect.height
|
|
508
|
+
class $a83747cc3f035330$export$8f5ed9ff9f511381 {
|
|
509
|
+
constructor(ref) {
|
|
510
|
+
this.ref = ref;
|
|
511
|
+
}
|
|
512
|
+
getItemRect(key) {
|
|
513
|
+
let container = this.ref.current;
|
|
514
|
+
if (!container) return null;
|
|
515
|
+
let item = key != null ? useHasTabbableChild.$22bbea12c2567021$export$c3d8340acf92597f(this.ref, key) : null;
|
|
516
|
+
if (!item) return null;
|
|
517
|
+
let containerRect = container.getBoundingClientRect();
|
|
518
|
+
let itemRect = item.getBoundingClientRect();
|
|
519
|
+
return {
|
|
520
|
+
x: itemRect.left - containerRect.left - container.clientLeft + container.scrollLeft,
|
|
521
|
+
y: itemRect.top - containerRect.top - container.clientTop + container.scrollTop,
|
|
522
|
+
width: itemRect.width,
|
|
523
|
+
height: itemRect.height
|
|
2078
524
|
};
|
|
2079
525
|
}
|
|
2080
526
|
getContentSize() {
|
|
2081
527
|
let container = this.ref.current;
|
|
2082
528
|
return {
|
|
2083
529
|
width: container?.scrollWidth ?? 0,
|
|
2084
|
-
height: container?.scrollHeight ?? 0
|
|
2085
|
-
};
|
|
2086
|
-
}
|
|
2087
|
-
getVisibleRect() {
|
|
2088
|
-
let container = this.ref.current;
|
|
2089
|
-
return {
|
|
2090
|
-
x: container?.scrollLeft ?? 0,
|
|
2091
|
-
y: container?.scrollTop ?? 0,
|
|
2092
|
-
width: container?.clientWidth ?? 0,
|
|
2093
|
-
height: container?.clientHeight ?? 0
|
|
2094
|
-
};
|
|
2095
|
-
}
|
|
2096
|
-
}
|
|
2097
|
-
class $ae8f8d98b2b18f2f$export$a05409b8bb224a5a {
|
|
2098
|
-
constructor(...args) {
|
|
2099
|
-
if (args.length === 1) {
|
|
2100
|
-
let opts = args[0];
|
|
2101
|
-
this.collection = opts.collection;
|
|
2102
|
-
this.ref = opts.ref;
|
|
2103
|
-
this.collator = opts.collator;
|
|
2104
|
-
this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set();
|
|
2105
|
-
this.disabledBehavior = opts.disabledBehavior || "all";
|
|
2106
|
-
this.orientation = opts.orientation || "vertical";
|
|
2107
|
-
this.direction = opts.direction;
|
|
2108
|
-
this.layout = opts.layout || "stack";
|
|
2109
|
-
this.layoutDelegate = opts.layoutDelegate || new $a83747cc3f035330$export$8f5ed9ff9f511381(opts.ref);
|
|
2110
|
-
} else {
|
|
2111
|
-
this.collection = args[0];
|
|
2112
|
-
this.disabledKeys = args[1];
|
|
2113
|
-
this.ref = args[2];
|
|
2114
|
-
this.collator = args[3];
|
|
2115
|
-
this.layout = "stack";
|
|
2116
|
-
this.orientation = "vertical";
|
|
2117
|
-
this.disabledBehavior = "all";
|
|
2118
|
-
this.layoutDelegate = new $a83747cc3f035330$export$8f5ed9ff9f511381(this.ref);
|
|
2119
|
-
}
|
|
2120
|
-
if (this.layout === "stack" && this.orientation === "vertical") {
|
|
2121
|
-
this.getKeyLeftOf = void 0;
|
|
2122
|
-
this.getKeyRightOf = void 0;
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
isDisabled(item) {
|
|
2126
|
-
return this.disabledBehavior === "all" && (item.props?.isDisabled || this.disabledKeys.has(item.key)) && item.props?.disabledBehavior !== "selection";
|
|
2127
|
-
}
|
|
2128
|
-
findNextNonDisabled(key, getNext, includeDisabled = false) {
|
|
2129
|
-
let nextKey = key;
|
|
2130
|
-
while (nextKey != null) {
|
|
2131
|
-
let item = this.collection.getItem(nextKey);
|
|
2132
|
-
if (item?.type === "item" && (includeDisabled || !this.isDisabled(item))) return nextKey;
|
|
2133
|
-
nextKey = getNext(nextKey);
|
|
2134
|
-
}
|
|
2135
|
-
return null;
|
|
2136
|
-
}
|
|
2137
|
-
getNextKey(key, options) {
|
|
2138
|
-
let nextKey = key;
|
|
2139
|
-
nextKey = this.collection.getKeyAfter(nextKey);
|
|
2140
|
-
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyAfter(key2), options?.includeDisabled);
|
|
2141
|
-
}
|
|
2142
|
-
getPreviousKey(key, options) {
|
|
2143
|
-
let nextKey = key;
|
|
2144
|
-
nextKey = this.collection.getKeyBefore(nextKey);
|
|
2145
|
-
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyBefore(key2), options?.includeDisabled);
|
|
2146
|
-
}
|
|
2147
|
-
findKey(key, nextKey, shouldSkip) {
|
|
2148
|
-
let tempKey = key;
|
|
2149
|
-
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
2150
|
-
if (!itemRect || tempKey == null) return null;
|
|
2151
|
-
let prevRect = itemRect;
|
|
2152
|
-
do {
|
|
2153
|
-
tempKey = nextKey(tempKey);
|
|
2154
|
-
if (tempKey == null) break;
|
|
2155
|
-
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
2156
|
-
} while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
2157
|
-
return tempKey;
|
|
2158
|
-
}
|
|
2159
|
-
isSameRow(prevRect, itemRect) {
|
|
2160
|
-
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
2161
|
-
}
|
|
2162
|
-
isSameColumn(prevRect, itemRect) {
|
|
2163
|
-
return prevRect.x === itemRect.x || prevRect.y !== itemRect.y;
|
|
2164
|
-
}
|
|
2165
|
-
// checks to see if the next/prev key is spatially above/below the current key. If not, that means we are in
|
|
2166
|
-
// a reversed column layout and need to adjust appropriately
|
|
2167
|
-
// TODO: still need to see how this works with virtualizer once there is handling for the reverse layout
|
|
2168
|
-
// this felt like a simpler approach then changing getKeyAbove/Below to be purely spatial calculations
|
|
2169
|
-
isReversed(key) {
|
|
2170
|
-
let nextKey = this.getNextKey(key);
|
|
2171
|
-
let currentEl = $22bbea12c2567021$export$c3d8340acf92597f(this.ref, key);
|
|
2172
|
-
if (nextKey != null) {
|
|
2173
|
-
let nextEl = $22bbea12c2567021$export$c3d8340acf92597f(this.ref, nextKey);
|
|
2174
|
-
if (!currentEl || !nextEl) return false;
|
|
2175
|
-
return currentEl.getBoundingClientRect().top > nextEl.getBoundingClientRect().top;
|
|
2176
|
-
}
|
|
2177
|
-
let prevKey = this.getPreviousKey(key);
|
|
2178
|
-
if (prevKey != null) {
|
|
2179
|
-
let prevEl = $22bbea12c2567021$export$c3d8340acf92597f(this.ref, prevKey);
|
|
2180
|
-
if (!currentEl || !prevEl) return false;
|
|
2181
|
-
return prevEl.getBoundingClientRect().top > currentEl.getBoundingClientRect().top;
|
|
2182
|
-
}
|
|
2183
|
-
return false;
|
|
2184
|
-
}
|
|
2185
|
-
getKeyBelow(key, options) {
|
|
2186
|
-
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getNextKey(key2, options), this.isSameRow);
|
|
2187
|
-
else if (this.orientation === "vertical") return this.isReversed(key) ? this.getPreviousKey(key, options) : this.getNextKey(key, options);
|
|
2188
|
-
else return this.getNextKey(key, options);
|
|
2189
|
-
}
|
|
2190
|
-
getKeyAbove(key, options) {
|
|
2191
|
-
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getPreviousKey(key2, options), this.isSameRow);
|
|
2192
|
-
else if (this.orientation === "vertical") return this.isReversed(key) ? this.getNextKey(key, options) : this.getPreviousKey(key, options);
|
|
2193
|
-
else return this.getPreviousKey(key, options);
|
|
2194
|
-
}
|
|
2195
|
-
getNextColumn(key, right, options) {
|
|
2196
|
-
return right ? this.getPreviousKey(key, options) : this.getNextKey(key, options);
|
|
2197
|
-
}
|
|
2198
|
-
getKeyRightOf(key, options) {
|
|
2199
|
-
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
|
|
2200
|
-
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
2201
|
-
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
2202
|
-
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2), options?.includeDisabled);
|
|
2203
|
-
}
|
|
2204
|
-
if (this.layout === "grid") {
|
|
2205
|
-
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "rtl", options);
|
|
2206
|
-
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "rtl", options), this.isSameColumn);
|
|
2207
|
-
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "rtl", options);
|
|
2208
|
-
return null;
|
|
2209
|
-
}
|
|
2210
|
-
getKeyLeftOf(key, options) {
|
|
2211
|
-
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
|
|
2212
|
-
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
2213
|
-
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
2214
|
-
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2), options?.includeDisabled);
|
|
2215
|
-
}
|
|
2216
|
-
if (this.layout === "grid") {
|
|
2217
|
-
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "ltr", options);
|
|
2218
|
-
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "ltr", options), this.isSameColumn);
|
|
2219
|
-
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "ltr", options);
|
|
2220
|
-
return null;
|
|
2221
|
-
}
|
|
2222
|
-
getFirstKey() {
|
|
2223
|
-
let key = this.collection.getFirstKey();
|
|
2224
|
-
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyAfter(key2));
|
|
2225
|
-
}
|
|
2226
|
-
getLastKey() {
|
|
2227
|
-
let key = this.collection.getLastKey();
|
|
2228
|
-
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyBefore(key2));
|
|
2229
|
-
}
|
|
2230
|
-
getKeyPageAbove(key) {
|
|
2231
|
-
let menu = this.ref.current;
|
|
2232
|
-
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
2233
|
-
if (!itemRect) return null;
|
|
2234
|
-
let reversed = this.isReversed(key);
|
|
2235
|
-
if (menu && !$901761b40e390936$export$2bb74740c4e19def(menu)) return this.getFirstKey();
|
|
2236
|
-
let nextKey = key;
|
|
2237
|
-
if (this.orientation === "horizontal") {
|
|
2238
|
-
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
2239
|
-
while (itemRect && itemRect.x > pageX && nextKey != null) {
|
|
2240
|
-
nextKey = this.getKeyAbove(nextKey);
|
|
2241
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
2242
|
-
}
|
|
2243
|
-
} else {
|
|
2244
|
-
let visibleRect = this.layoutDelegate.getVisibleRect();
|
|
2245
|
-
let pageY = reversed ? itemRect.y - visibleRect.height : Math.max(0, itemRect.y + itemRect.height - visibleRect.height);
|
|
2246
|
-
while (itemRect && itemRect.y > pageY && nextKey != null) {
|
|
2247
|
-
nextKey = this.getKeyAbove(nextKey);
|
|
2248
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
return nextKey ?? (reversed ? this.getLastKey() : this.getFirstKey());
|
|
2252
|
-
}
|
|
2253
|
-
getKeyPageBelow(key) {
|
|
2254
|
-
let menu = this.ref.current;
|
|
2255
|
-
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
2256
|
-
if (!itemRect) return null;
|
|
2257
|
-
let reversed = this.isReversed(key);
|
|
2258
|
-
if (menu && !$901761b40e390936$export$2bb74740c4e19def(menu)) return this.getLastKey();
|
|
2259
|
-
let nextKey = key;
|
|
2260
|
-
if (this.orientation === "horizontal") {
|
|
2261
|
-
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.x - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
2262
|
-
while (itemRect && itemRect.x < pageX && nextKey != null) {
|
|
2263
|
-
nextKey = this.getKeyBelow(nextKey);
|
|
2264
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
2265
|
-
}
|
|
2266
|
-
} else {
|
|
2267
|
-
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
2268
|
-
while (itemRect && itemRect.y < pageY && nextKey != null) {
|
|
2269
|
-
nextKey = this.getKeyBelow(nextKey);
|
|
2270
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
2271
|
-
}
|
|
2272
|
-
}
|
|
2273
|
-
return nextKey ?? (reversed ? this.getFirstKey() : this.getLastKey());
|
|
2274
|
-
}
|
|
2275
|
-
getKeyForSearch(search, fromKey) {
|
|
2276
|
-
if (!this.collator) return null;
|
|
2277
|
-
let collection = this.collection;
|
|
2278
|
-
let key = fromKey || this.getFirstKey();
|
|
2279
|
-
while (key != null) {
|
|
2280
|
-
let item = collection.getItem(key);
|
|
2281
|
-
if (!item) return null;
|
|
2282
|
-
let substring = item.textValue.slice(0, search.length);
|
|
2283
|
-
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
2284
|
-
key = this.getNextKey(key);
|
|
2285
|
-
}
|
|
2286
|
-
return null;
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
let $673d46fce3e5717d$var$cache = /* @__PURE__ */ new Map();
|
|
2290
|
-
function $673d46fce3e5717d$export$a16aca283550c30d(options) {
|
|
2291
|
-
let { locale } = I18nProvider.$2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
2292
|
-
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
2293
|
-
if ($673d46fce3e5717d$var$cache.has(cacheKey)) return $673d46fce3e5717d$var$cache.get(cacheKey);
|
|
2294
|
-
let formatter = new Intl.Collator(locale, options);
|
|
2295
|
-
$673d46fce3e5717d$var$cache.set(cacheKey, formatter);
|
|
2296
|
-
return formatter;
|
|
2297
|
-
}
|
|
2298
|
-
const $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD = 500;
|
|
2299
|
-
function $7b01448eaad0fe7c$export$c24ed0104d07eab9(props) {
|
|
2300
|
-
let { isDisabled, pointerType, onLongPressStart, onLongPressEnd, onLongPress, threshold = $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD, accessibilityDescription } = props;
|
|
2301
|
-
const timeRef = React.useRef(void 0);
|
|
2302
|
-
let { addGlobalListener, removeAllGlobalListeners } = useHover.$48a7d519b337145d$export$4eaf04e54aa8eed6();
|
|
2303
|
-
let isAcceptedPointerType = (e) => pointerType ? e.pointerType === pointerType : e.pointerType === "mouse" || e.pointerType === "touch";
|
|
2304
|
-
let { pressProps } = usePress.$d27d541f9569d26d$export$45712eceda6fad21({
|
|
2305
|
-
isDisabled,
|
|
2306
|
-
onPressStart(e) {
|
|
2307
|
-
e.continuePropagation();
|
|
2308
|
-
if (isAcceptedPointerType(e)) {
|
|
2309
|
-
if (onLongPressStart) onLongPressStart({
|
|
2310
|
-
...e,
|
|
2311
|
-
type: "longpressstart"
|
|
2312
|
-
});
|
|
2313
|
-
timeRef.current = setTimeout(() => {
|
|
2314
|
-
e.target.dispatchEvent(new PointerEvent("pointercancel", {
|
|
2315
|
-
bubbles: true
|
|
2316
|
-
}));
|
|
2317
|
-
addGlobalListener(e.target, "click", (e2) => e2.preventDefault(), {
|
|
2318
|
-
once: true
|
|
2319
|
-
});
|
|
2320
|
-
if (focusSafely.$d447af545b77c9f1$export$b204af158042fbac(e.target).activeElement !== e.target) focusSafely.$1969ac565cfec8d0$export$de79e2c695e052f3(e.target);
|
|
2321
|
-
if (onLongPress) onLongPress({
|
|
2322
|
-
...e,
|
|
2323
|
-
type: "longpress"
|
|
2324
|
-
});
|
|
2325
|
-
timeRef.current = void 0;
|
|
2326
|
-
}, threshold);
|
|
2327
|
-
if (e.pointerType === "touch") addGlobalListener(e.target, "contextmenu", (e2) => e2.preventDefault(), {
|
|
2328
|
-
once: true
|
|
2329
|
-
});
|
|
2330
|
-
let ownerWindow = focusSafely.$d447af545b77c9f1$export$f21a1ffae260145a(e.target);
|
|
2331
|
-
addGlobalListener(ownerWindow, "pointerup", () => {
|
|
2332
|
-
setTimeout(() => {
|
|
2333
|
-
removeAllGlobalListeners();
|
|
2334
|
-
}, 100);
|
|
2335
|
-
}, {
|
|
2336
|
-
once: true
|
|
2337
|
-
});
|
|
2338
|
-
}
|
|
2339
|
-
},
|
|
2340
|
-
onPressEnd(e) {
|
|
2341
|
-
if (timeRef.current) clearTimeout(timeRef.current);
|
|
2342
|
-
if (onLongPressEnd && isAcceptedPointerType(e)) onLongPressEnd({
|
|
2343
|
-
...e,
|
|
2344
|
-
type: "longpressend"
|
|
2345
|
-
});
|
|
2346
|
-
}
|
|
2347
|
-
});
|
|
2348
|
-
let descriptionProps = $121970af65029459$export$f8aeda7b10753fa1(onLongPress && !isDisabled ? accessibilityDescription : void 0);
|
|
2349
|
-
return {
|
|
2350
|
-
longPressProps: utils.$bbaa08b3cd72f041$export$9d1611c77c2fe928(pressProps, descriptionProps)
|
|
2351
|
-
};
|
|
2352
|
-
}
|
|
2353
|
-
function $f6ba6936bfd098a0$export$ecf600387e221c37(options) {
|
|
2354
|
-
let { id, selectionManager: manager, key, ref, shouldSelectOnPressUp, shouldUseVirtualFocus, focus, isDisabled, onAction, allowsDifferentPressOrigin, linkBehavior = "action" } = options;
|
|
2355
|
-
let router = focusSafely.$caaf0dd3060ed57c$export$9a302a45f65d0572();
|
|
2356
|
-
id = utils.$390e54f620492c70$export$f680877a34711e37(id);
|
|
2357
|
-
let onSelect = (e) => {
|
|
2358
|
-
if (e.pointerType === "keyboard" && $22bbea12c2567021$export$d3e3bd3e26688c04(e)) manager.toggleSelection(key);
|
|
2359
|
-
else {
|
|
2360
|
-
if (manager.selectionMode === "none") return;
|
|
2361
|
-
if (manager.isLink(key)) {
|
|
2362
|
-
if (linkBehavior === "selection" && ref.current) {
|
|
2363
|
-
let itemProps2 = manager.getItemProps(key);
|
|
2364
|
-
router.open(ref.current, e, itemProps2.href, itemProps2.routerOptions);
|
|
2365
|
-
manager.setSelectedKeys(manager.selectedKeys);
|
|
2366
|
-
return;
|
|
2367
|
-
} else if (linkBehavior === "override" || linkBehavior === "none") return;
|
|
2368
|
-
}
|
|
2369
|
-
if (manager.selectionMode === "single") {
|
|
2370
|
-
if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
|
|
2371
|
-
else manager.replaceSelection(key);
|
|
2372
|
-
} else if (e && e.shiftKey) manager.extendSelection(key);
|
|
2373
|
-
else if (manager.selectionBehavior === "toggle" || e && ($bb39c0fc1c19b34c$export$16792effe837dba3(e) || e.pointerType === "touch" || e.pointerType === "virtual"))
|
|
2374
|
-
manager.toggleSelection(key);
|
|
2375
|
-
else manager.replaceSelection(key);
|
|
2376
|
-
}
|
|
2377
|
-
};
|
|
2378
|
-
React.useEffect(() => {
|
|
2379
|
-
let isFocused = key === manager.focusedKey;
|
|
2380
|
-
if (isFocused && manager.isFocused) {
|
|
2381
|
-
if (!shouldUseVirtualFocus) {
|
|
2382
|
-
if (focus) focus();
|
|
2383
|
-
else if (focusSafely.$23f2114a1b82827e$export$cd4e5573fbe2b576() !== ref.current && ref.current) focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
2384
|
-
} else $b72f3f7b3b5f42c6$export$76e4e37e5339496d(ref.current);
|
|
2385
|
-
}
|
|
2386
|
-
}, [
|
|
2387
|
-
ref,
|
|
2388
|
-
key,
|
|
2389
|
-
manager.focusedKey,
|
|
2390
|
-
manager.childFocusStrategy,
|
|
2391
|
-
manager.isFocused,
|
|
2392
|
-
shouldUseVirtualFocus
|
|
2393
|
-
]);
|
|
2394
|
-
isDisabled = isDisabled || manager.isDisabled(key);
|
|
2395
|
-
let itemProps = {};
|
|
2396
|
-
if (!shouldUseVirtualFocus && !isDisabled) itemProps = {
|
|
2397
|
-
tabIndex: key === manager.focusedKey ? 0 : -1,
|
|
2398
|
-
onFocus(e) {
|
|
2399
|
-
if (focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e) === ref.current) manager.setFocusedKey(key);
|
|
2400
|
-
}
|
|
2401
|
-
};
|
|
2402
|
-
else if (isDisabled) itemProps.onMouseDown = (e) => {
|
|
2403
|
-
e.preventDefault();
|
|
2404
|
-
};
|
|
2405
|
-
React.useEffect(() => {
|
|
2406
|
-
if (isDisabled && manager.focusedKey === key) manager.setFocusedKey(null);
|
|
2407
|
-
}, [
|
|
2408
|
-
manager,
|
|
2409
|
-
isDisabled,
|
|
2410
|
-
key
|
|
2411
|
-
]);
|
|
2412
|
-
let isLinkOverride = manager.isLink(key) && linkBehavior === "override";
|
|
2413
|
-
let isActionOverride = onAction && options["UNSTABLE_itemBehavior"] === "action";
|
|
2414
|
-
let hasLinkAction = manager.isLink(key) && linkBehavior !== "selection" && linkBehavior !== "none";
|
|
2415
|
-
let allowsSelection = !isDisabled && manager.canSelectItem(key) && !isLinkOverride && !isActionOverride;
|
|
2416
|
-
let allowsActions = (onAction || hasLinkAction) && !isDisabled;
|
|
2417
|
-
let hasPrimaryAction = allowsActions && (manager.selectionBehavior === "replace" ? !allowsSelection : !allowsSelection || manager.isEmpty);
|
|
2418
|
-
let hasSecondaryAction = allowsActions && allowsSelection && manager.selectionBehavior === "replace";
|
|
2419
|
-
let hasAction = hasPrimaryAction || hasSecondaryAction;
|
|
2420
|
-
let modality = React.useRef(null);
|
|
2421
|
-
let longPressEnabled = hasAction && allowsSelection;
|
|
2422
|
-
let longPressEnabledOnPressStart = React.useRef(false);
|
|
2423
|
-
let hadPrimaryActionOnPressStart = React.useRef(false);
|
|
2424
|
-
let collectionItemProps = manager.getItemProps(key);
|
|
2425
|
-
let performAction = (e) => {
|
|
2426
|
-
if (onAction) {
|
|
2427
|
-
onAction();
|
|
2428
|
-
ref.current?.dispatchEvent(new CustomEvent("react-aria-item-action", {
|
|
2429
|
-
bubbles: true
|
|
2430
|
-
}));
|
|
2431
|
-
}
|
|
2432
|
-
if (hasLinkAction && ref.current) router.open(ref.current, e, collectionItemProps.href, collectionItemProps.routerOptions);
|
|
2433
|
-
};
|
|
2434
|
-
let itemPressProps = {
|
|
2435
|
-
ref
|
|
2436
|
-
};
|
|
2437
|
-
if (shouldSelectOnPressUp) {
|
|
2438
|
-
itemPressProps.onPressStart = (e) => {
|
|
2439
|
-
modality.current = e.pointerType;
|
|
2440
|
-
longPressEnabledOnPressStart.current = longPressEnabled;
|
|
2441
|
-
if (e.pointerType === "keyboard" && (!hasAction || $f6ba6936bfd098a0$var$isSelectionKey(e.key))) onSelect(e);
|
|
2442
|
-
};
|
|
2443
|
-
if (!allowsDifferentPressOrigin)
|
|
2444
|
-
itemPressProps.onPress = (e) => {
|
|
2445
|
-
if (hasPrimaryAction || hasSecondaryAction && e.pointerType !== "mouse") {
|
|
2446
|
-
if (e.pointerType === "keyboard" && !$f6ba6936bfd098a0$var$isActionKey(e.key)) return;
|
|
2447
|
-
performAction(e);
|
|
2448
|
-
} else if (e.pointerType !== "keyboard" && allowsSelection) onSelect(e);
|
|
2449
|
-
};
|
|
2450
|
-
else {
|
|
2451
|
-
itemPressProps.onPressUp = hasPrimaryAction ? void 0 : (e) => {
|
|
2452
|
-
if (e.pointerType === "mouse" && allowsSelection) onSelect(e);
|
|
2453
|
-
};
|
|
2454
|
-
itemPressProps.onPress = hasPrimaryAction ? performAction : (e) => {
|
|
2455
|
-
if (e.pointerType !== "keyboard" && e.pointerType !== "mouse" && allowsSelection) onSelect(e);
|
|
2456
|
-
};
|
|
2457
|
-
}
|
|
2458
|
-
} else {
|
|
2459
|
-
itemPressProps.onPressStart = (e) => {
|
|
2460
|
-
modality.current = e.pointerType;
|
|
2461
|
-
longPressEnabledOnPressStart.current = longPressEnabled;
|
|
2462
|
-
hadPrimaryActionOnPressStart.current = hasPrimaryAction;
|
|
2463
|
-
if (allowsSelection && (e.pointerType === "mouse" && !hasPrimaryAction || e.pointerType === "keyboard" && (!allowsActions || $f6ba6936bfd098a0$var$isSelectionKey(e.key)))) onSelect(e);
|
|
2464
|
-
};
|
|
2465
|
-
itemPressProps.onPress = (e) => {
|
|
2466
|
-
if (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && hasAction && $f6ba6936bfd098a0$var$isActionKey(e.key) || e.pointerType === "mouse" && hadPrimaryActionOnPressStart.current) {
|
|
2467
|
-
if (hasAction) performAction(e);
|
|
2468
|
-
else if (allowsSelection) onSelect(e);
|
|
2469
|
-
}
|
|
2470
|
-
};
|
|
2471
|
-
}
|
|
2472
|
-
let collectionId = $22bbea12c2567021$export$6aeb1680a0ae8741(manager.collection);
|
|
2473
|
-
itemProps["data-collection"] = collectionId;
|
|
2474
|
-
itemProps["data-key"] = key;
|
|
2475
|
-
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
|
|
2476
|
-
if (shouldUseVirtualFocus)
|
|
2477
|
-
itemPressProps = utils.$bbaa08b3cd72f041$export$9d1611c77c2fe928(itemPressProps, {
|
|
2478
|
-
onPressStart(e) {
|
|
2479
|
-
if (e.pointerType !== "touch") {
|
|
2480
|
-
manager.setFocused(true);
|
|
2481
|
-
manager.setFocusedKey(key);
|
|
2482
|
-
}
|
|
2483
|
-
},
|
|
2484
|
-
onPress(e) {
|
|
2485
|
-
if (e.pointerType === "touch") {
|
|
2486
|
-
manager.setFocused(true);
|
|
2487
|
-
manager.setFocusedKey(key);
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
});
|
|
2491
|
-
if (collectionItemProps) {
|
|
2492
|
-
for (let key2 of [
|
|
2493
|
-
"onPressStart",
|
|
2494
|
-
"onPressEnd",
|
|
2495
|
-
"onPressChange",
|
|
2496
|
-
"onPress",
|
|
2497
|
-
"onPressUp",
|
|
2498
|
-
"onClick"
|
|
2499
|
-
]) if (collectionItemProps[key2])
|
|
2500
|
-
itemPressProps[key2] = utils.$a4e76a5424781910$export$e08e3b67e392101e(itemPressProps[key2], collectionItemProps[key2]);
|
|
2501
|
-
}
|
|
2502
|
-
let { pressProps, isPressed } = usePress.$d27d541f9569d26d$export$45712eceda6fad21(itemPressProps);
|
|
2503
|
-
let onDoubleClick = hasSecondaryAction ? (e) => {
|
|
2504
|
-
if (modality.current === "mouse") {
|
|
2505
|
-
e.stopPropagation();
|
|
2506
|
-
e.preventDefault();
|
|
2507
|
-
performAction(e);
|
|
2508
|
-
}
|
|
2509
|
-
} : void 0;
|
|
2510
|
-
let { longPressProps } = $7b01448eaad0fe7c$export$c24ed0104d07eab9({
|
|
2511
|
-
isDisabled: !longPressEnabled,
|
|
2512
|
-
onLongPress(e) {
|
|
2513
|
-
if (e.pointerType === "touch") {
|
|
2514
|
-
onSelect(e);
|
|
2515
|
-
manager.setSelectionBehavior("toggle");
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
});
|
|
2519
|
-
let onDragStartCapture = (e) => {
|
|
2520
|
-
if (modality.current === "touch" && longPressEnabledOnPressStart.current) e.preventDefault();
|
|
2521
|
-
};
|
|
2522
|
-
let onClick = linkBehavior !== "none" && manager.isLink(key) ? (e) => {
|
|
2523
|
-
if (!focusSafely.$caaf0dd3060ed57c$export$95185d699e05d4d7.isOpening) e.preventDefault();
|
|
2524
|
-
} : void 0;
|
|
2525
|
-
let mergedItemProps = utils.$bbaa08b3cd72f041$export$9d1611c77c2fe928(
|
|
2526
|
-
// oxlint-disable-next-line react/react-compiler
|
|
2527
|
-
itemProps,
|
|
2528
|
-
allowsSelection || hasPrimaryAction || shouldUseVirtualFocus && !isDisabled ? pressProps : {},
|
|
2529
|
-
longPressEnabled ? longPressProps : {},
|
|
2530
|
-
// oxlint-disable-next-line react/react-compiler
|
|
2531
|
-
{
|
|
2532
|
-
onDoubleClick,
|
|
2533
|
-
onDragStartCapture,
|
|
2534
|
-
onClick,
|
|
2535
|
-
id
|
|
2536
|
-
},
|
|
2537
|
-
// Prevent DOM focus from moving on mouse down when using virtual focus
|
|
2538
|
-
shouldUseVirtualFocus ? {
|
|
2539
|
-
onMouseDown: (e) => e.preventDefault()
|
|
2540
|
-
} : void 0
|
|
2541
|
-
);
|
|
2542
|
-
let isChildInteraction = (target) => {
|
|
2543
|
-
let el = target;
|
|
2544
|
-
while (el && el !== ref.current) {
|
|
2545
|
-
let elCollection = el.getAttribute("data-collection");
|
|
2546
|
-
if (elCollection != null) return elCollection !== collectionId;
|
|
2547
|
-
el = el.parentElement;
|
|
2548
|
-
}
|
|
2549
|
-
return focusSafely.$3b8b240c1bf84ab9$export$bebd5a1431fec25d(target);
|
|
2550
|
-
};
|
|
2551
|
-
let baseOnPointerDown = mergedItemProps.onPointerDown;
|
|
2552
|
-
mergedItemProps.onPointerDown = (e) => {
|
|
2553
|
-
let target = focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
2554
|
-
if (target && target !== ref.current && isChildInteraction(target)) {
|
|
2555
|
-
e.stopPropagation();
|
|
2556
|
-
return;
|
|
2557
|
-
}
|
|
2558
|
-
baseOnPointerDown?.(e);
|
|
2559
|
-
};
|
|
2560
|
-
let baseOnMouseDown = mergedItemProps.onMouseDown;
|
|
2561
|
-
mergedItemProps.onMouseDown = (e) => {
|
|
2562
|
-
let target = focusSafely.$23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
2563
|
-
if (target && target !== ref.current && isChildInteraction(target)) {
|
|
2564
|
-
e.stopPropagation();
|
|
2565
|
-
return;
|
|
2566
|
-
}
|
|
2567
|
-
baseOnMouseDown?.(e);
|
|
2568
|
-
};
|
|
2569
|
-
return {
|
|
2570
|
-
itemProps: mergedItemProps,
|
|
2571
|
-
isPressed,
|
|
2572
|
-
isSelected: manager.isSelected(key),
|
|
2573
|
-
isFocused: manager.isFocused && manager.focusedKey === key,
|
|
2574
|
-
isDisabled,
|
|
2575
|
-
allowsSelection,
|
|
2576
|
-
hasAction
|
|
2577
|
-
};
|
|
2578
|
-
}
|
|
2579
|
-
function $f6ba6936bfd098a0$var$isActionKey(key) {
|
|
2580
|
-
return key === "Enter";
|
|
2581
|
-
}
|
|
2582
|
-
function $f6ba6936bfd098a0$var$isSelectionKey(key) {
|
|
2583
|
-
return key === " ";
|
|
2584
|
-
}
|
|
2585
|
-
function $cd5ea4b915021f1d$export$1005530eda016c13(node, collection) {
|
|
2586
|
-
if (typeof collection.getChildren === "function") return collection.getChildren(node.key);
|
|
2587
|
-
return node.childNodes;
|
|
2588
|
-
}
|
|
2589
|
-
function $cd5ea4b915021f1d$export$fbdeaa6a76694f71(iterable) {
|
|
2590
|
-
return $cd5ea4b915021f1d$export$5f3398f8733f90e2(iterable, 0);
|
|
2591
|
-
}
|
|
2592
|
-
function $cd5ea4b915021f1d$export$5f3398f8733f90e2(iterable, index) {
|
|
2593
|
-
if (index < 0) return void 0;
|
|
2594
|
-
let i = 0;
|
|
2595
|
-
for (let item of iterable) {
|
|
2596
|
-
if (i === index) return item;
|
|
2597
|
-
i++;
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2600
|
-
function $cd5ea4b915021f1d$export$7475b2c64539e4cf(iterable) {
|
|
2601
|
-
let lastItem = void 0;
|
|
2602
|
-
for (let value of iterable) lastItem = value;
|
|
2603
|
-
return lastItem;
|
|
2604
|
-
}
|
|
2605
|
-
function $cd5ea4b915021f1d$export$8c434b3a7a4dad6(collection, a, b) {
|
|
2606
|
-
if (a.parentKey === b.parentKey) return a.index - b.index;
|
|
2607
|
-
let aAncestors = [
|
|
2608
|
-
...$cd5ea4b915021f1d$var$getAncestors(collection, a),
|
|
2609
|
-
a
|
|
2610
|
-
];
|
|
2611
|
-
let bAncestors = [
|
|
2612
|
-
...$cd5ea4b915021f1d$var$getAncestors(collection, b),
|
|
2613
|
-
b
|
|
2614
|
-
];
|
|
2615
|
-
let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a2, i) => a2 !== bAncestors[i]);
|
|
2616
|
-
if (firstNonMatchingAncestor !== -1) {
|
|
2617
|
-
a = aAncestors[firstNonMatchingAncestor];
|
|
2618
|
-
b = bAncestors[firstNonMatchingAncestor];
|
|
2619
|
-
return a.index - b.index;
|
|
2620
|
-
}
|
|
2621
|
-
if (aAncestors.findIndex((node) => node === b) >= 0) return 1;
|
|
2622
|
-
else if (bAncestors.findIndex((node) => node === a) >= 0) return -1;
|
|
2623
|
-
return -1;
|
|
2624
|
-
}
|
|
2625
|
-
function $cd5ea4b915021f1d$var$getAncestors(collection, node) {
|
|
2626
|
-
let parents = [];
|
|
2627
|
-
let currNode = node;
|
|
2628
|
-
while (currNode?.parentKey != null) {
|
|
2629
|
-
currNode = collection.getItem(currNode.parentKey);
|
|
2630
|
-
if (currNode) parents.unshift(currNode);
|
|
2631
|
-
}
|
|
2632
|
-
return parents;
|
|
2633
|
-
}
|
|
2634
|
-
function $b24d1bc31a0f941d$export$a9d04c5684123369(value) {
|
|
2635
|
-
const pieces = React.version.split(".");
|
|
2636
|
-
const major = parseInt(pieces[0], 10);
|
|
2637
|
-
if (major >= 19) return value;
|
|
2638
|
-
return value ? "true" : void 0;
|
|
2639
|
-
}
|
|
2640
|
-
class $8b2540e09867b15e$export$52baac22726c72bf extends Set {
|
|
2641
|
-
constructor(keys, anchorKey, currentKey) {
|
|
2642
|
-
super(keys);
|
|
2643
|
-
if (keys instanceof $8b2540e09867b15e$export$52baac22726c72bf) {
|
|
2644
|
-
this.anchorKey = anchorKey ?? keys.anchorKey;
|
|
2645
|
-
this.currentKey = currentKey ?? keys.currentKey;
|
|
2646
|
-
} else {
|
|
2647
|
-
this.anchorKey = anchorKey ?? null;
|
|
2648
|
-
this.currentKey = currentKey ?? null;
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
function $60f19cefd567a3e4$var$equalSets(setA, setB) {
|
|
2653
|
-
if (setA.size !== setB.size) return false;
|
|
2654
|
-
for (let item of setA) {
|
|
2655
|
-
if (!setB.has(item)) return false;
|
|
2656
|
-
}
|
|
2657
|
-
return true;
|
|
2658
|
-
}
|
|
2659
|
-
function $60f19cefd567a3e4$export$253fe78d46329472(props) {
|
|
2660
|
-
let { selectionMode = "none", disallowEmptySelection = false, allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = "toggle", disabledBehavior = "all" } = props;
|
|
2661
|
-
let isFocusedRef = React.useRef(false);
|
|
2662
|
-
let [, setFocused] = React.useState(false);
|
|
2663
|
-
let focusedKeyRef = React.useRef(null);
|
|
2664
|
-
let childFocusStrategyRef = React.useRef(null);
|
|
2665
|
-
let [, setFocusedKey] = React.useState(null);
|
|
2666
|
-
let selectedKeysProp = React.useMemo(() => $60f19cefd567a3e4$var$convertSelection(props.selectedKeys), [
|
|
2667
|
-
props.selectedKeys
|
|
2668
|
-
]);
|
|
2669
|
-
let defaultSelectedKeys = React.useMemo(() => $60f19cefd567a3e4$var$convertSelection(props.defaultSelectedKeys, new $8b2540e09867b15e$export$52baac22726c72bf()), [
|
|
2670
|
-
props.defaultSelectedKeys
|
|
2671
|
-
]);
|
|
2672
|
-
let [selectedKeys, setSelectedKeys] = VisuallyHidden.$3e6197669829fe11$export$40bfa8c7b0832715(selectedKeysProp, defaultSelectedKeys, props.onSelectionChange);
|
|
2673
|
-
let disabledKeysProp = React.useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
2674
|
-
props.disabledKeys
|
|
2675
|
-
]);
|
|
2676
|
-
let [selectionBehavior, setSelectionBehavior] = React.useState(selectionBehaviorProp);
|
|
2677
|
-
if (selectionBehaviorProp === "replace" && selectionBehavior === "toggle" && typeof selectedKeys === "object" && selectedKeys.size === 0) setSelectionBehavior("replace");
|
|
2678
|
-
let lastSelectionBehavior = React.useRef(selectionBehaviorProp);
|
|
2679
|
-
React.useEffect(() => {
|
|
2680
|
-
if (selectionBehaviorProp !== lastSelectionBehavior.current) {
|
|
2681
|
-
setSelectionBehavior(selectionBehaviorProp);
|
|
2682
|
-
lastSelectionBehavior.current = selectionBehaviorProp;
|
|
2683
|
-
}
|
|
2684
|
-
}, [
|
|
2685
|
-
selectionBehaviorProp
|
|
2686
|
-
]);
|
|
2687
|
-
return {
|
|
2688
|
-
selectionMode,
|
|
2689
|
-
disallowEmptySelection,
|
|
2690
|
-
selectionBehavior,
|
|
2691
|
-
setSelectionBehavior,
|
|
2692
|
-
get isFocused() {
|
|
2693
|
-
return isFocusedRef.current;
|
|
2694
|
-
},
|
|
2695
|
-
setFocused(f) {
|
|
2696
|
-
isFocusedRef.current = f;
|
|
2697
|
-
setFocused(f);
|
|
2698
|
-
},
|
|
2699
|
-
get focusedKey() {
|
|
2700
|
-
return focusedKeyRef.current;
|
|
2701
|
-
},
|
|
2702
|
-
get childFocusStrategy() {
|
|
2703
|
-
return childFocusStrategyRef.current;
|
|
2704
|
-
},
|
|
2705
|
-
setFocusedKey(k, childFocusStrategy = "first") {
|
|
2706
|
-
focusedKeyRef.current = k;
|
|
2707
|
-
childFocusStrategyRef.current = childFocusStrategy;
|
|
2708
|
-
setFocusedKey(k);
|
|
2709
|
-
},
|
|
2710
|
-
selectedKeys,
|
|
2711
|
-
setSelectedKeys(keys) {
|
|
2712
|
-
if (allowDuplicateSelectionEvents || !$60f19cefd567a3e4$var$equalSets(keys, selectedKeys)) setSelectedKeys(keys);
|
|
2713
|
-
},
|
|
2714
|
-
disabledKeys: disabledKeysProp,
|
|
2715
|
-
disabledBehavior
|
|
2716
|
-
};
|
|
2717
|
-
}
|
|
2718
|
-
function $60f19cefd567a3e4$var$convertSelection(selection, defaultValue) {
|
|
2719
|
-
if (!selection) return defaultValue;
|
|
2720
|
-
return selection === "all" ? "all" : new $8b2540e09867b15e$export$52baac22726c72bf(selection);
|
|
2721
|
-
}
|
|
2722
|
-
class $4a07ac835f260f78$export$6c8a5aaad13c9852 {
|
|
2723
|
-
constructor(collection, state, options) {
|
|
2724
|
-
this.collection = collection;
|
|
2725
|
-
this.state = state;
|
|
2726
|
-
this.allowsCellSelection = options?.allowsCellSelection ?? false;
|
|
2727
|
-
this._isSelectAll = null;
|
|
2728
|
-
this.layoutDelegate = options?.layoutDelegate || null;
|
|
2729
|
-
this.fullCollection = options?.fullCollection || null;
|
|
2730
|
-
}
|
|
2731
|
-
/**
|
|
2732
|
-
* The type of selection that is allowed in the collection.
|
|
2733
|
-
*/
|
|
2734
|
-
get selectionMode() {
|
|
2735
|
-
return this.state.selectionMode;
|
|
2736
|
-
}
|
|
2737
|
-
/**
|
|
2738
|
-
* Whether the collection allows empty selection.
|
|
2739
|
-
*/
|
|
2740
|
-
get disallowEmptySelection() {
|
|
2741
|
-
return this.state.disallowEmptySelection;
|
|
2742
|
-
}
|
|
2743
|
-
/**
|
|
2744
|
-
* The selection behavior for the collection.
|
|
2745
|
-
*/
|
|
2746
|
-
get selectionBehavior() {
|
|
2747
|
-
return this.state.selectionBehavior;
|
|
2748
|
-
}
|
|
2749
|
-
/**
|
|
2750
|
-
* Sets the selection behavior for the collection.
|
|
2751
|
-
*/
|
|
2752
|
-
setSelectionBehavior(selectionBehavior) {
|
|
2753
|
-
this.state.setSelectionBehavior(selectionBehavior);
|
|
2754
|
-
}
|
|
2755
|
-
/**
|
|
2756
|
-
* Whether the collection is currently focused.
|
|
2757
|
-
*/
|
|
2758
|
-
get isFocused() {
|
|
2759
|
-
return this.state.isFocused;
|
|
2760
|
-
}
|
|
2761
|
-
/**
|
|
2762
|
-
* Sets whether the collection is focused.
|
|
2763
|
-
*/
|
|
2764
|
-
setFocused(isFocused) {
|
|
2765
|
-
this.state.setFocused(isFocused);
|
|
2766
|
-
}
|
|
2767
|
-
/**
|
|
2768
|
-
* The current focused key in the collection.
|
|
2769
|
-
*/
|
|
2770
|
-
get focusedKey() {
|
|
2771
|
-
return this.state.focusedKey;
|
|
2772
|
-
}
|
|
2773
|
-
/** Whether the first or last child of the focused key should receive focus. */
|
|
2774
|
-
get childFocusStrategy() {
|
|
2775
|
-
return this.state.childFocusStrategy;
|
|
2776
|
-
}
|
|
2777
|
-
/**
|
|
2778
|
-
* Sets the focused key.
|
|
2779
|
-
*/
|
|
2780
|
-
setFocusedKey(key, childFocusStrategy) {
|
|
2781
|
-
if (key == null || this.collection.getItem(key)) this.state.setFocusedKey(key, childFocusStrategy);
|
|
2782
|
-
}
|
|
2783
|
-
/**
|
|
2784
|
-
* The currently selected keys in the collection.
|
|
2785
|
-
*/
|
|
2786
|
-
get selectedKeys() {
|
|
2787
|
-
return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
|
|
2788
|
-
}
|
|
2789
|
-
/**
|
|
2790
|
-
* The raw selection value for the collection.
|
|
2791
|
-
* Either 'all' for select all, or a set of keys.
|
|
2792
|
-
*/
|
|
2793
|
-
get rawSelection() {
|
|
2794
|
-
return this.state.selectedKeys;
|
|
2795
|
-
}
|
|
2796
|
-
/**
|
|
2797
|
-
* Returns whether a key is selected.
|
|
2798
|
-
*/
|
|
2799
|
-
isSelected(key) {
|
|
2800
|
-
if (this.state.selectionMode === "none") return false;
|
|
2801
|
-
let mappedKey = this.getKey(key);
|
|
2802
|
-
if (mappedKey == null) return false;
|
|
2803
|
-
return this.state.selectedKeys === "all" ? this.canSelectItem(mappedKey) : this.state.selectedKeys.has(mappedKey);
|
|
2804
|
-
}
|
|
2805
|
-
/**
|
|
2806
|
-
* Whether the selection is empty.
|
|
2807
|
-
*/
|
|
2808
|
-
get isEmpty() {
|
|
2809
|
-
return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
|
|
2810
|
-
}
|
|
2811
|
-
/**
|
|
2812
|
-
* Whether all items in the collection are selected.
|
|
2813
|
-
*/
|
|
2814
|
-
get isSelectAll() {
|
|
2815
|
-
if (this.isEmpty) return false;
|
|
2816
|
-
if (this.state.selectedKeys === "all") return true;
|
|
2817
|
-
if (this._isSelectAll != null) return this._isSelectAll;
|
|
2818
|
-
let allKeys = this.getSelectAllKeys();
|
|
2819
|
-
let selectedKeys = this.state.selectedKeys;
|
|
2820
|
-
this._isSelectAll = allKeys.every((k) => selectedKeys.has(k));
|
|
2821
|
-
return this._isSelectAll;
|
|
2822
|
-
}
|
|
2823
|
-
get firstSelectedKey() {
|
|
2824
|
-
let first = null;
|
|
2825
|
-
for (let key of this.state.selectedKeys) {
|
|
2826
|
-
let item = this.collection.getItem(key);
|
|
2827
|
-
if (!first || item && $cd5ea4b915021f1d$export$8c434b3a7a4dad6(this.collection, item, first) < 0) first = item;
|
|
2828
|
-
}
|
|
2829
|
-
return first?.key ?? null;
|
|
2830
|
-
}
|
|
2831
|
-
get lastSelectedKey() {
|
|
2832
|
-
let last = null;
|
|
2833
|
-
for (let key of this.state.selectedKeys) {
|
|
2834
|
-
let item = this.collection.getItem(key);
|
|
2835
|
-
if (!last || item && $cd5ea4b915021f1d$export$8c434b3a7a4dad6(this.collection, item, last) > 0) last = item;
|
|
2836
|
-
}
|
|
2837
|
-
return last?.key ?? null;
|
|
2838
|
-
}
|
|
2839
|
-
get disabledKeys() {
|
|
2840
|
-
return this.state.disabledKeys;
|
|
530
|
+
height: container?.scrollHeight ?? 0
|
|
531
|
+
};
|
|
2841
532
|
}
|
|
2842
|
-
|
|
2843
|
-
|
|
533
|
+
getVisibleRect() {
|
|
534
|
+
let container = this.ref.current;
|
|
535
|
+
return {
|
|
536
|
+
x: container?.scrollLeft ?? 0,
|
|
537
|
+
y: container?.scrollTop ?? 0,
|
|
538
|
+
width: container?.clientWidth ?? 0,
|
|
539
|
+
height: container?.clientHeight ?? 0
|
|
540
|
+
};
|
|
2844
541
|
}
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
this.
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
}
|
|
2869
|
-
getKeyRange(from, to) {
|
|
2870
|
-
let fromItem = this.collection.getItem(from);
|
|
2871
|
-
let toItem = this.collection.getItem(to);
|
|
2872
|
-
if (fromItem && toItem) {
|
|
2873
|
-
if ($cd5ea4b915021f1d$export$8c434b3a7a4dad6(this.collection, fromItem, toItem) <= 0) return this.getKeyRangeInternal(from, to);
|
|
2874
|
-
return this.getKeyRangeInternal(to, from);
|
|
542
|
+
}
|
|
543
|
+
class $ae8f8d98b2b18f2f$export$a05409b8bb224a5a {
|
|
544
|
+
constructor(...args) {
|
|
545
|
+
if (args.length === 1) {
|
|
546
|
+
let opts = args[0];
|
|
547
|
+
this.collection = opts.collection;
|
|
548
|
+
this.ref = opts.ref;
|
|
549
|
+
this.collator = opts.collator;
|
|
550
|
+
this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set();
|
|
551
|
+
this.disabledBehavior = opts.disabledBehavior || "all";
|
|
552
|
+
this.orientation = opts.orientation || "vertical";
|
|
553
|
+
this.direction = opts.direction;
|
|
554
|
+
this.layout = opts.layout || "stack";
|
|
555
|
+
this.layoutDelegate = opts.layoutDelegate || new $a83747cc3f035330$export$8f5ed9ff9f511381(opts.ref);
|
|
556
|
+
} else {
|
|
557
|
+
this.collection = args[0];
|
|
558
|
+
this.disabledKeys = args[1];
|
|
559
|
+
this.ref = args[2];
|
|
560
|
+
this.collator = args[3];
|
|
561
|
+
this.layout = "stack";
|
|
562
|
+
this.orientation = "vertical";
|
|
563
|
+
this.disabledBehavior = "all";
|
|
564
|
+
this.layoutDelegate = new $a83747cc3f035330$export$8f5ed9ff9f511381(this.ref);
|
|
2875
565
|
}
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
if (this.layoutDelegate?.getKeyRange) return this.layoutDelegate.getKeyRange(from, to);
|
|
2880
|
-
let keys = [];
|
|
2881
|
-
let key = from;
|
|
2882
|
-
while (key != null) {
|
|
2883
|
-
let item = this.collection.getItem(key);
|
|
2884
|
-
if (item && (item.type === "item" || item.type === "cell" && this.allowsCellSelection)) keys.push(key);
|
|
2885
|
-
if (key === to) return keys;
|
|
2886
|
-
key = this.collection.getKeyAfter(key);
|
|
566
|
+
if (this.layout === "stack" && this.orientation === "vertical") {
|
|
567
|
+
this.getKeyLeftOf = void 0;
|
|
568
|
+
this.getKeyRightOf = void 0;
|
|
2887
569
|
}
|
|
2888
|
-
return [];
|
|
2889
570
|
}
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
if (!item)
|
|
2893
|
-
return key;
|
|
2894
|
-
if (item.type === "cell" && this.allowsCellSelection) return key;
|
|
2895
|
-
while (item && item.type !== "item" && item.parentKey != null) item = this.collection.getItem(item.parentKey);
|
|
2896
|
-
if (!item || item.type !== "item") return null;
|
|
2897
|
-
return item.key;
|
|
571
|
+
isDisabled(item) {
|
|
572
|
+
return this.disabledBehavior === "all" && (item.props?.isDisabled || this.disabledKeys.has(item.key)) && item.props?.disabledBehavior !== "selection";
|
|
2898
573
|
}
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
this.replaceSelection(key);
|
|
2906
|
-
return;
|
|
2907
|
-
}
|
|
2908
|
-
let mappedKey = this.getKey(key);
|
|
2909
|
-
if (mappedKey == null) return;
|
|
2910
|
-
let keys = new $8b2540e09867b15e$export$52baac22726c72bf(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
2911
|
-
if (keys.has(mappedKey)) keys.delete(mappedKey);
|
|
2912
|
-
else if (this.canSelectItem(mappedKey)) {
|
|
2913
|
-
keys.add(mappedKey);
|
|
2914
|
-
keys.anchorKey = mappedKey;
|
|
2915
|
-
keys.currentKey = mappedKey;
|
|
574
|
+
findNextNonDisabled(key, getNext, includeDisabled = false) {
|
|
575
|
+
let nextKey = key;
|
|
576
|
+
while (nextKey != null) {
|
|
577
|
+
let item = this.collection.getItem(nextKey);
|
|
578
|
+
if (item?.type === "item" && (includeDisabled || !this.isDisabled(item))) return nextKey;
|
|
579
|
+
nextKey = getNext(nextKey);
|
|
2916
580
|
}
|
|
2917
|
-
|
|
2918
|
-
this.state.setSelectedKeys(keys);
|
|
581
|
+
return null;
|
|
2919
582
|
}
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
if (this.selectionMode === "none") return;
|
|
2925
|
-
let mappedKey = this.getKey(key);
|
|
2926
|
-
if (mappedKey == null) return;
|
|
2927
|
-
let selection = this.canSelectItem(mappedKey) ? new $8b2540e09867b15e$export$52baac22726c72bf([
|
|
2928
|
-
mappedKey
|
|
2929
|
-
], mappedKey, mappedKey) : new $8b2540e09867b15e$export$52baac22726c72bf();
|
|
2930
|
-
this.state.setSelectedKeys(selection);
|
|
583
|
+
getNextKey(key, options) {
|
|
584
|
+
let nextKey = key;
|
|
585
|
+
nextKey = this.collection.getKeyAfter(nextKey);
|
|
586
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyAfter(key2), options?.includeDisabled);
|
|
2931
587
|
}
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
if (this.selectionMode === "none") return;
|
|
2937
|
-
let selection = new $8b2540e09867b15e$export$52baac22726c72bf();
|
|
2938
|
-
for (let key of keys) {
|
|
2939
|
-
let mappedKey = this.getKey(key);
|
|
2940
|
-
if (mappedKey != null) {
|
|
2941
|
-
selection.add(mappedKey);
|
|
2942
|
-
if (this.selectionMode === "single") break;
|
|
2943
|
-
}
|
|
2944
|
-
}
|
|
2945
|
-
this.state.setSelectedKeys(selection);
|
|
2946
|
-
}
|
|
2947
|
-
getSelectAllKeys() {
|
|
2948
|
-
let collection = this.fullCollection ?? this.collection;
|
|
2949
|
-
let keys = [];
|
|
2950
|
-
let addKeys = (key) => {
|
|
2951
|
-
while (key != null) {
|
|
2952
|
-
if (this.canSelectItemIn(key, collection)) {
|
|
2953
|
-
let item = collection.getItem(key);
|
|
2954
|
-
if (item?.type === "item") keys.push(key);
|
|
2955
|
-
if (item?.hasChildNodes && (this.allowsCellSelection || item.type !== "item")) addKeys($cd5ea4b915021f1d$export$fbdeaa6a76694f71($cd5ea4b915021f1d$export$1005530eda016c13(item, collection))?.key ?? null);
|
|
2956
|
-
}
|
|
2957
|
-
key = collection.getKeyAfter(key);
|
|
2958
|
-
}
|
|
2959
|
-
};
|
|
2960
|
-
addKeys(collection.getFirstKey());
|
|
2961
|
-
return keys;
|
|
588
|
+
getPreviousKey(key, options) {
|
|
589
|
+
let nextKey = key;
|
|
590
|
+
nextKey = this.collection.getKeyBefore(nextKey);
|
|
591
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyBefore(key2), options?.includeDisabled);
|
|
2962
592
|
}
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
593
|
+
findKey(key, nextKey, shouldSkip) {
|
|
594
|
+
let tempKey = key;
|
|
595
|
+
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
596
|
+
if (!itemRect || tempKey == null) return null;
|
|
597
|
+
let prevRect = itemRect;
|
|
598
|
+
do {
|
|
599
|
+
tempKey = nextKey(tempKey);
|
|
600
|
+
if (tempKey == null) break;
|
|
601
|
+
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
602
|
+
} while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
603
|
+
return tempKey;
|
|
2968
604
|
}
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
*/
|
|
2972
|
-
clearSelection() {
|
|
2973
|
-
if (!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0)) this.state.setSelectedKeys(new $8b2540e09867b15e$export$52baac22726c72bf());
|
|
605
|
+
isSameRow(prevRect, itemRect) {
|
|
606
|
+
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
2974
607
|
}
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
*/
|
|
2978
|
-
toggleSelectAll() {
|
|
2979
|
-
if (this.isSelectAll) this.clearSelection();
|
|
2980
|
-
else this.selectAll();
|
|
2981
|
-
}
|
|
2982
|
-
select(key, e) {
|
|
2983
|
-
if (this.selectionMode === "none") return;
|
|
2984
|
-
if (this.selectionMode === "single") {
|
|
2985
|
-
if (this.isSelected(key) && !this.disallowEmptySelection) this.toggleSelection(key);
|
|
2986
|
-
else this.replaceSelection(key);
|
|
2987
|
-
} else if (this.selectionBehavior === "toggle" || e && (e.pointerType === "touch" || e.pointerType === "virtual"))
|
|
2988
|
-
this.toggleSelection(key);
|
|
2989
|
-
else this.replaceSelection(key);
|
|
608
|
+
isSameColumn(prevRect, itemRect) {
|
|
609
|
+
return prevRect.x === itemRect.x || prevRect.y !== itemRect.y;
|
|
2990
610
|
}
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
let
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
611
|
+
// checks to see if the next/prev key is spatially above/below the current key. If not, that means we are in
|
|
612
|
+
// a reversed column layout and need to adjust appropriately
|
|
613
|
+
// TODO: still need to see how this works with virtualizer once there is handling for the reverse layout
|
|
614
|
+
// this felt like a simpler approach then changing getKeyAbove/Below to be purely spatial calculations
|
|
615
|
+
isReversed(key) {
|
|
616
|
+
let nextKey = this.getNextKey(key);
|
|
617
|
+
let currentEl = useHasTabbableChild.$22bbea12c2567021$export$c3d8340acf92597f(this.ref, key);
|
|
618
|
+
if (nextKey != null) {
|
|
619
|
+
let nextEl = useHasTabbableChild.$22bbea12c2567021$export$c3d8340acf92597f(this.ref, nextKey);
|
|
620
|
+
if (!currentEl || !nextEl) return false;
|
|
621
|
+
return currentEl.getBoundingClientRect().top > nextEl.getBoundingClientRect().top;
|
|
3000
622
|
}
|
|
3001
|
-
|
|
3002
|
-
|
|
623
|
+
let prevKey = this.getPreviousKey(key);
|
|
624
|
+
if (prevKey != null) {
|
|
625
|
+
let prevEl = useHasTabbableChild.$22bbea12c2567021$export$c3d8340acf92597f(this.ref, prevKey);
|
|
626
|
+
if (!currentEl || !prevEl) return false;
|
|
627
|
+
return prevEl.getBoundingClientRect().top > currentEl.getBoundingClientRect().top;
|
|
3003
628
|
}
|
|
3004
|
-
return
|
|
629
|
+
return false;
|
|
630
|
+
}
|
|
631
|
+
getKeyBelow(key, options) {
|
|
632
|
+
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getNextKey(key2, options), this.isSameRow);
|
|
633
|
+
else if (this.orientation === "vertical") return this.isReversed(key) ? this.getPreviousKey(key, options) : this.getNextKey(key, options);
|
|
634
|
+
else return this.getNextKey(key, options);
|
|
3005
635
|
}
|
|
3006
|
-
|
|
3007
|
-
return this.
|
|
636
|
+
getKeyAbove(key, options) {
|
|
637
|
+
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getPreviousKey(key2, options), this.isSameRow);
|
|
638
|
+
else if (this.orientation === "vertical") return this.isReversed(key) ? this.getNextKey(key, options) : this.getPreviousKey(key, options);
|
|
639
|
+
else return this.getPreviousKey(key, options);
|
|
3008
640
|
}
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
let item = collection.getItem(key);
|
|
3012
|
-
if (!item || item?.props?.isDisabled || item.type === "cell" && !this.allowsCellSelection) return false;
|
|
3013
|
-
return true;
|
|
641
|
+
getNextColumn(key, right, options) {
|
|
642
|
+
return right ? this.getPreviousKey(key, options) : this.getNextKey(key, options);
|
|
3014
643
|
}
|
|
3015
|
-
|
|
3016
|
-
let
|
|
3017
|
-
|
|
644
|
+
getKeyRightOf(key, options) {
|
|
645
|
+
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
|
|
646
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
647
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
648
|
+
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2), options?.includeDisabled);
|
|
649
|
+
}
|
|
650
|
+
if (this.layout === "grid") {
|
|
651
|
+
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "rtl", options);
|
|
652
|
+
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "rtl", options), this.isSameColumn);
|
|
653
|
+
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "rtl", options);
|
|
654
|
+
return null;
|
|
3018
655
|
}
|
|
3019
|
-
|
|
3020
|
-
|
|
656
|
+
getKeyLeftOf(key, options) {
|
|
657
|
+
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
|
|
658
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
659
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
660
|
+
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2), options?.includeDisabled);
|
|
661
|
+
}
|
|
662
|
+
if (this.layout === "grid") {
|
|
663
|
+
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "ltr", options);
|
|
664
|
+
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "ltr", options), this.isSameColumn);
|
|
665
|
+
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "ltr", options);
|
|
666
|
+
return null;
|
|
3021
667
|
}
|
|
3022
|
-
|
|
3023
|
-
|
|
668
|
+
getFirstKey() {
|
|
669
|
+
let key = this.collection.getFirstKey();
|
|
670
|
+
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyAfter(key2));
|
|
3024
671
|
}
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
layoutDelegate: this.layoutDelegate || void 0,
|
|
3029
|
-
fullCollection: this.fullCollection ?? this.collection
|
|
3030
|
-
});
|
|
672
|
+
getLastKey() {
|
|
673
|
+
let key = this.collection.getLastKey();
|
|
674
|
+
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyBefore(key2));
|
|
3031
675
|
}
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
else if (typeof children === "function") {
|
|
3045
|
-
if (!items) throw new Error("props.children was a function but props.items is missing");
|
|
3046
|
-
let index = 0;
|
|
3047
|
-
for (let item of items) {
|
|
3048
|
-
yield* this.getFullNode({
|
|
3049
|
-
value: item,
|
|
3050
|
-
index
|
|
3051
|
-
}, {
|
|
3052
|
-
renderer: children
|
|
3053
|
-
});
|
|
3054
|
-
index++;
|
|
676
|
+
getKeyPageAbove(key) {
|
|
677
|
+
let menu = this.ref.current;
|
|
678
|
+
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
679
|
+
if (!itemRect) return null;
|
|
680
|
+
let reversed = this.isReversed(key);
|
|
681
|
+
if (menu && !useHasTabbableChild.$901761b40e390936$export$2bb74740c4e19def(menu)) return this.getFirstKey();
|
|
682
|
+
let nextKey = key;
|
|
683
|
+
if (this.orientation === "horizontal") {
|
|
684
|
+
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
685
|
+
while (itemRect && itemRect.x > pageX && nextKey != null) {
|
|
686
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
687
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
3055
688
|
}
|
|
3056
689
|
} else {
|
|
3057
|
-
let
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
for (let item of items2) {
|
|
3063
|
-
let nodes = this.getFullNode({
|
|
3064
|
-
element: item,
|
|
3065
|
-
index
|
|
3066
|
-
}, {});
|
|
3067
|
-
for (let node of nodes) {
|
|
3068
|
-
index++;
|
|
3069
|
-
yield node;
|
|
3070
|
-
}
|
|
690
|
+
let visibleRect = this.layoutDelegate.getVisibleRect();
|
|
691
|
+
let pageY = reversed ? itemRect.y - visibleRect.height : Math.max(0, itemRect.y + itemRect.height - visibleRect.height);
|
|
692
|
+
while (itemRect && itemRect.y > pageY && nextKey != null) {
|
|
693
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
694
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
3071
695
|
}
|
|
3072
696
|
}
|
|
697
|
+
return nextKey ?? (reversed ? this.getLastKey() : this.getFirstKey());
|
|
3073
698
|
}
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
return {
|
|
3087
|
-
renderer: partialNode.renderer || state.renderer
|
|
3088
|
-
};
|
|
3089
|
-
}
|
|
3090
|
-
*getFullNode(partialNode, state, parentKey, parentNode) {
|
|
3091
|
-
if (React.isValidElement(partialNode.element) && partialNode.element.type === React.Fragment) {
|
|
3092
|
-
let children = [];
|
|
3093
|
-
React.Children.forEach(partialNode.element.props.children, (child) => {
|
|
3094
|
-
children.push(child);
|
|
3095
|
-
});
|
|
3096
|
-
let index = partialNode.index ?? 0;
|
|
3097
|
-
for (const child of children) yield* this.getFullNode({
|
|
3098
|
-
element: child,
|
|
3099
|
-
index: index++
|
|
3100
|
-
}, state, parentKey, parentNode);
|
|
3101
|
-
return;
|
|
3102
|
-
}
|
|
3103
|
-
let element = partialNode.element;
|
|
3104
|
-
if (!element && partialNode.value && state && state.renderer) {
|
|
3105
|
-
let cached = this.cache.get(partialNode.value);
|
|
3106
|
-
if (cached && (!cached.shouldInvalidate || !cached.shouldInvalidate(this.context))) {
|
|
3107
|
-
cached.index = partialNode.index;
|
|
3108
|
-
cached.parentKey = parentNode ? parentNode.key : null;
|
|
3109
|
-
yield cached;
|
|
3110
|
-
return;
|
|
3111
|
-
}
|
|
3112
|
-
element = state.renderer(partialNode.value);
|
|
3113
|
-
}
|
|
3114
|
-
if (React.isValidElement(element)) {
|
|
3115
|
-
let type = element.type;
|
|
3116
|
-
if (typeof type !== "function" && typeof type.getCollectionNode !== "function") {
|
|
3117
|
-
let name = element.type;
|
|
3118
|
-
throw new Error(`Unknown element <${name}> in collection.`);
|
|
699
|
+
getKeyPageBelow(key) {
|
|
700
|
+
let menu = this.ref.current;
|
|
701
|
+
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
702
|
+
if (!itemRect) return null;
|
|
703
|
+
let reversed = this.isReversed(key);
|
|
704
|
+
if (menu && !useHasTabbableChild.$901761b40e390936$export$2bb74740c4e19def(menu)) return this.getLastKey();
|
|
705
|
+
let nextKey = key;
|
|
706
|
+
if (this.orientation === "horizontal") {
|
|
707
|
+
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.x - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
708
|
+
while (itemRect && itemRect.x < pageX && nextKey != null) {
|
|
709
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
710
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
3119
711
|
}
|
|
3120
|
-
|
|
3121
|
-
let
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
partialNode.index = index;
|
|
3126
|
-
let nodeKey = childNode.key ?? null;
|
|
3127
|
-
if (nodeKey == null) nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
|
|
3128
|
-
let nodes = this.getFullNode({
|
|
3129
|
-
...childNode,
|
|
3130
|
-
key: nodeKey,
|
|
3131
|
-
index,
|
|
3132
|
-
wrapper: $bda7a7e55e1ff206$var$compose(partialNode.wrapper, childNode.wrapper)
|
|
3133
|
-
}, this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode);
|
|
3134
|
-
let children = [
|
|
3135
|
-
...nodes
|
|
3136
|
-
];
|
|
3137
|
-
for (let node2 of children) {
|
|
3138
|
-
node2.value = childNode.value ?? partialNode.value ?? null;
|
|
3139
|
-
if (node2.value) this.cache.set(node2.value, node2);
|
|
3140
|
-
if (partialNode.type && node2.type !== partialNode.type) throw new Error(`Unsupported type <${$bda7a7e55e1ff206$var$capitalize(node2.type)}> in <${$bda7a7e55e1ff206$var$capitalize(parentNode?.type ?? "unknown parent type")}>. Only <${$bda7a7e55e1ff206$var$capitalize(partialNode.type)}> is supported.`);
|
|
3141
|
-
index++;
|
|
3142
|
-
yield node2;
|
|
3143
|
-
}
|
|
3144
|
-
result = childNodes.next(children);
|
|
712
|
+
} else {
|
|
713
|
+
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
714
|
+
while (itemRect && itemRect.y < pageY && nextKey != null) {
|
|
715
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
716
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
3145
717
|
}
|
|
3146
|
-
return;
|
|
3147
718
|
}
|
|
3148
|
-
|
|
3149
|
-
let builder = this;
|
|
3150
|
-
let node = {
|
|
3151
|
-
type: partialNode.type,
|
|
3152
|
-
props: partialNode.props,
|
|
3153
|
-
key: partialNode.key,
|
|
3154
|
-
parentKey: parentNode ? parentNode.key : null,
|
|
3155
|
-
value: partialNode.value ?? null,
|
|
3156
|
-
level: (parentNode?.level ?? 0) + (parentNode?.type === "item" ? 1 : 0),
|
|
3157
|
-
index: partialNode.index,
|
|
3158
|
-
rendered: partialNode.rendered,
|
|
3159
|
-
textValue: partialNode.textValue ?? "",
|
|
3160
|
-
"aria-label": partialNode["aria-label"],
|
|
3161
|
-
wrapper: partialNode.wrapper,
|
|
3162
|
-
shouldInvalidate: partialNode.shouldInvalidate,
|
|
3163
|
-
hasChildNodes: partialNode.hasChildNodes || false,
|
|
3164
|
-
childNodes: $bda7a7e55e1ff206$var$iterable(function* () {
|
|
3165
|
-
if (!partialNode.hasChildNodes || !partialNode.childNodes) return;
|
|
3166
|
-
let index = 0;
|
|
3167
|
-
for (let child of partialNode.childNodes()) {
|
|
3168
|
-
if (child.key != null)
|
|
3169
|
-
child.key = `${node.key}${child.key}`;
|
|
3170
|
-
let nodes = builder.getFullNode({
|
|
3171
|
-
...child,
|
|
3172
|
-
index
|
|
3173
|
-
}, builder.getChildState(state, child), node.key, node);
|
|
3174
|
-
for (let node2 of nodes) {
|
|
3175
|
-
index++;
|
|
3176
|
-
yield node2;
|
|
3177
|
-
}
|
|
3178
|
-
}
|
|
3179
|
-
})
|
|
3180
|
-
};
|
|
3181
|
-
yield node;
|
|
3182
|
-
}
|
|
3183
|
-
constructor() {
|
|
3184
|
-
this.cache = /* @__PURE__ */ new WeakMap();
|
|
719
|
+
return nextKey ?? (reversed ? this.getFirstKey() : this.getLastKey());
|
|
3185
720
|
}
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
yield item;
|
|
3197
|
-
}
|
|
721
|
+
getKeyForSearch(search, fromKey) {
|
|
722
|
+
if (!this.collator) return null;
|
|
723
|
+
let collection = this.collection;
|
|
724
|
+
let key = fromKey || this.getFirstKey();
|
|
725
|
+
while (key != null) {
|
|
726
|
+
let item = collection.getItem(key);
|
|
727
|
+
if (!item) return null;
|
|
728
|
+
let substring = item.textValue.slice(0, search.length);
|
|
729
|
+
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
730
|
+
key = this.getNextKey(key);
|
|
3198
731
|
}
|
|
3199
|
-
|
|
3200
|
-
}
|
|
3201
|
-
function $bda7a7e55e1ff206$var$compose(outer, inner) {
|
|
3202
|
-
if (outer && inner) return (element) => outer(inner(element));
|
|
3203
|
-
if (outer) return outer;
|
|
3204
|
-
if (inner) return inner;
|
|
3205
|
-
}
|
|
3206
|
-
function $bda7a7e55e1ff206$var$capitalize(str) {
|
|
3207
|
-
return str[0].toUpperCase() + str.slice(1);
|
|
732
|
+
return null;
|
|
733
|
+
}
|
|
3208
734
|
}
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
let {
|
|
3212
|
-
let
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
}, context);
|
|
3218
|
-
return factory(nodes);
|
|
3219
|
-
}, [
|
|
3220
|
-
builder,
|
|
3221
|
-
children,
|
|
3222
|
-
items,
|
|
3223
|
-
collection,
|
|
3224
|
-
context,
|
|
3225
|
-
factory
|
|
3226
|
-
]);
|
|
3227
|
-
return result;
|
|
735
|
+
let $673d46fce3e5717d$var$cache = /* @__PURE__ */ new Map();
|
|
736
|
+
function $673d46fce3e5717d$export$a16aca283550c30d(options) {
|
|
737
|
+
let { locale } = I18nProvider.$2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
738
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
739
|
+
if ($673d46fce3e5717d$var$cache.has(cacheKey)) return $673d46fce3e5717d$var$cache.get(cacheKey);
|
|
740
|
+
let formatter = new Intl.Collator(locale, options);
|
|
741
|
+
$673d46fce3e5717d$var$cache.set(cacheKey, formatter);
|
|
742
|
+
return formatter;
|
|
3228
743
|
}
|
|
3229
744
|
function $0407362eaf54473e$export$ccaea96c28e8b9e7(props, ref) {
|
|
3230
745
|
let { collection, onLoadMore, scrollOffset = 1, direction = "end" } = props;
|
|
@@ -3839,37 +1354,6 @@ function $2b2556a8276954c1$var$diffSelection(a, b) {
|
|
|
3839
1354
|
for (let key of a.keys()) if (!b.has(key)) res.add(key);
|
|
3840
1355
|
return res;
|
|
3841
1356
|
}
|
|
3842
|
-
function $bf14c9739fda2eb3$export$eac1895992b9f3d6(ref, options) {
|
|
3843
|
-
let isDisabled = options?.isDisabled;
|
|
3844
|
-
let [hasTabbableChild, setHasTabbableChild] = React.useState(false);
|
|
3845
|
-
utils.$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
3846
|
-
if (ref?.current && !isDisabled) {
|
|
3847
|
-
let update = () => {
|
|
3848
|
-
if (ref.current) {
|
|
3849
|
-
let walker = FocusScope.$535772f9d2c1f38d$export$2d6ec8fc375ceafa(ref.current, {
|
|
3850
|
-
tabbable: true
|
|
3851
|
-
});
|
|
3852
|
-
setHasTabbableChild(!!walker.nextNode());
|
|
3853
|
-
}
|
|
3854
|
-
};
|
|
3855
|
-
update();
|
|
3856
|
-
let observer = new MutationObserver(update);
|
|
3857
|
-
observer.observe(ref.current, {
|
|
3858
|
-
subtree: true,
|
|
3859
|
-
childList: true,
|
|
3860
|
-
attributes: true,
|
|
3861
|
-
attributeFilter: [
|
|
3862
|
-
"tabIndex",
|
|
3863
|
-
"disabled"
|
|
3864
|
-
]
|
|
3865
|
-
});
|
|
3866
|
-
return () => {
|
|
3867
|
-
observer.disconnect();
|
|
3868
|
-
};
|
|
3869
|
-
}
|
|
3870
|
-
});
|
|
3871
|
-
return isDisabled ? false : hasTabbableChild;
|
|
3872
|
-
}
|
|
3873
1357
|
function $parcel$interopDefault$7(a) {
|
|
3874
1358
|
return a && a.__esModule ? a.default : a;
|
|
3875
1359
|
}
|
|
@@ -3890,7 +1374,7 @@ function $40ae3c60ef0e2e61$export$be42ebdab07ae4c2(props) {
|
|
|
3890
1374
|
stringFormatter,
|
|
3891
1375
|
shouldLongPress
|
|
3892
1376
|
]);
|
|
3893
|
-
let descriptionProps =
|
|
1377
|
+
let descriptionProps = useHasTabbableChild.$121970af65029459$export$f8aeda7b10753fa1(interactionDescription);
|
|
3894
1378
|
return descriptionProps;
|
|
3895
1379
|
}
|
|
3896
1380
|
function $parcel$interopDefault$6(a) {
|
|
@@ -4440,10 +1924,10 @@ class $3b14a8cc70843920$export$596e1b2e2cf93690 extends $22f4441660dfbf05$export
|
|
|
4440
1924
|
return node?.nextKey ?? null;
|
|
4441
1925
|
}
|
|
4442
1926
|
getFirstKey() {
|
|
4443
|
-
return
|
|
1927
|
+
return useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(this.body.childNodes)?.key ?? null;
|
|
4444
1928
|
}
|
|
4445
1929
|
getLastKey() {
|
|
4446
|
-
return
|
|
1930
|
+
return useHasTabbableChild.$cd5ea4b915021f1d$export$7475b2c64539e4cf(this.body.childNodes)?.key ?? null;
|
|
4447
1931
|
}
|
|
4448
1932
|
getItem(key) {
|
|
4449
1933
|
if (key === this.body.key) return this.body;
|
|
@@ -4767,7 +2251,7 @@ function $f6cebac1c03d2516$export$cb895dcf85db1319(props, state) {
|
|
|
4767
2251
|
}
|
|
4768
2252
|
function $183b79a1dd6664c1$export$4007ac09ff9c68ed(props) {
|
|
4769
2253
|
let { collection, focusMode } = props;
|
|
4770
|
-
let selectionState = props.UNSAFE_selectionState ||
|
|
2254
|
+
let selectionState = props.UNSAFE_selectionState || useHasTabbableChild.$60f19cefd567a3e4$export$253fe78d46329472(props);
|
|
4771
2255
|
let disabledKeys = React.useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
4772
2256
|
props.disabledKeys
|
|
4773
2257
|
]);
|
|
@@ -4776,14 +2260,14 @@ function $183b79a1dd6664c1$export$4007ac09ff9c68ed(props) {
|
|
|
4776
2260
|
if (focusMode === "cell" && key != null) {
|
|
4777
2261
|
let item = collection.getItem(key);
|
|
4778
2262
|
if (item?.type === "item") {
|
|
4779
|
-
let children =
|
|
4780
|
-
if (child === "last") key =
|
|
4781
|
-
else key =
|
|
2263
|
+
let children = useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item, collection);
|
|
2264
|
+
if (child === "last") key = useHasTabbableChild.$cd5ea4b915021f1d$export$7475b2c64539e4cf(children)?.key ?? null;
|
|
2265
|
+
else key = useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(children)?.key ?? null;
|
|
4782
2266
|
}
|
|
4783
2267
|
}
|
|
4784
2268
|
setFocusedKey(key, child);
|
|
4785
2269
|
};
|
|
4786
|
-
let selectionManager = React.useMemo(() => new
|
|
2270
|
+
let selectionManager = React.useMemo(() => new useHasTabbableChild.$4a07ac835f260f78$export$6c8a5aaad13c9852(collection, selectionState), [
|
|
4787
2271
|
collection,
|
|
4788
2272
|
selectionState
|
|
4789
2273
|
]);
|
|
@@ -4813,7 +2297,7 @@ function $183b79a1dd6664c1$export$4007ac09ff9c68ed(props) {
|
|
|
4813
2297
|
}
|
|
4814
2298
|
if (newRow) {
|
|
4815
2299
|
const childNodes = newRow.hasChildNodes ? [
|
|
4816
|
-
|
|
2300
|
+
...useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(newRow, collection)
|
|
4817
2301
|
] : [];
|
|
4818
2302
|
const keyToFocus = newRow.hasChildNodes && parentNode !== node && node && node.index < childNodes.length ? childNodes[node.index].key : newRow.key;
|
|
4819
2303
|
selectionState.setFocusedKey(keyToFocus);
|
|
@@ -4856,7 +2340,7 @@ function $178a7f94e1b4b497$export$907bcc6c48325fd6(props) {
|
|
|
4856
2340
|
showDragButtons
|
|
4857
2341
|
]
|
|
4858
2342
|
);
|
|
4859
|
-
let collection =
|
|
2343
|
+
let collection = useHasTabbableChild.$d03379b88399b8c5$export$6cd28814d92fa9c9(props, React.useCallback((nodes) => new $3b14a8cc70843920$export$596e1b2e2cf93690(nodes, null, context), [
|
|
4860
2344
|
context
|
|
4861
2345
|
]), context);
|
|
4862
2346
|
let { disabledKeys, selectionManager } = $183b79a1dd6664c1$export$4007ac09ff9c68ed({
|
|
@@ -4864,7 +2348,7 @@ function $178a7f94e1b4b497$export$907bcc6c48325fd6(props) {
|
|
|
4864
2348
|
collection,
|
|
4865
2349
|
disabledBehavior: props.disabledBehavior || "selection"
|
|
4866
2350
|
});
|
|
4867
|
-
let [expandedKeys, setExpandedKeys] =
|
|
2351
|
+
let [expandedKeys, setExpandedKeys] = useControlledState.$3e6197669829fe11$export$40bfa8c7b0832715(props.expandedKeys ? new Set(props.expandedKeys) : void 0, props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : /* @__PURE__ */ new Set(), props.onExpandedChange);
|
|
4868
2352
|
return {
|
|
4869
2353
|
collection,
|
|
4870
2354
|
disabledKeys,
|
|
@@ -4949,7 +2433,7 @@ class $c7bb87e55e1ab755$export$de9feff04fda126e {
|
|
|
4949
2433
|
let item = this.collection.getItem(key);
|
|
4950
2434
|
if (!item) return null;
|
|
4951
2435
|
let i = 0;
|
|
4952
|
-
for (let child of
|
|
2436
|
+
for (let child of useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item, this.collection)) {
|
|
4953
2437
|
if (child.colSpan && child.colSpan + i > index) return child.key ?? null;
|
|
4954
2438
|
if (child.colSpan) i = i + child.colSpan - 1;
|
|
4955
2439
|
if (i === index) return child.key ?? null;
|
|
@@ -4993,14 +2477,14 @@ class $c7bb87e55e1ab755$export$de9feff04fda126e {
|
|
|
4993
2477
|
let item = this.collection.getItem(key);
|
|
4994
2478
|
if (!item) return null;
|
|
4995
2479
|
if (this.isRow(item)) {
|
|
4996
|
-
let children =
|
|
4997
|
-
return (this.direction === "rtl" ?
|
|
2480
|
+
let children = useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item, this.collection);
|
|
2481
|
+
return (this.direction === "rtl" ? useHasTabbableChild.$cd5ea4b915021f1d$export$7475b2c64539e4cf(children)?.key : useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(children)?.key) ?? null;
|
|
4998
2482
|
}
|
|
4999
2483
|
if (this.isCell(item) && item.parentKey != null) {
|
|
5000
2484
|
let parent = this.collection.getItem(item.parentKey);
|
|
5001
2485
|
if (!parent) return null;
|
|
5002
|
-
let children =
|
|
5003
|
-
let next = (this.direction === "rtl" ?
|
|
2486
|
+
let children = useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(parent, this.collection);
|
|
2487
|
+
let next = (this.direction === "rtl" ? useHasTabbableChild.$cd5ea4b915021f1d$export$5f3398f8733f90e2(children, item.index - 1) : useHasTabbableChild.$cd5ea4b915021f1d$export$5f3398f8733f90e2(children, item.index + 1)) ?? null;
|
|
5004
2488
|
if (next) return next.key ?? null;
|
|
5005
2489
|
if (this.focusMode === "row") return item.parentKey ?? null;
|
|
5006
2490
|
return (this.direction === "rtl" ? this.getFirstKey(key) : this.getLastKey(key)) ?? null;
|
|
@@ -5011,14 +2495,14 @@ class $c7bb87e55e1ab755$export$de9feff04fda126e {
|
|
|
5011
2495
|
let item = this.collection.getItem(key);
|
|
5012
2496
|
if (!item) return null;
|
|
5013
2497
|
if (this.isRow(item)) {
|
|
5014
|
-
let children =
|
|
5015
|
-
return (this.direction === "rtl" ?
|
|
2498
|
+
let children = useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item, this.collection);
|
|
2499
|
+
return (this.direction === "rtl" ? useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(children)?.key : useHasTabbableChild.$cd5ea4b915021f1d$export$7475b2c64539e4cf(children)?.key) ?? null;
|
|
5016
2500
|
}
|
|
5017
2501
|
if (this.isCell(item) && item.parentKey != null) {
|
|
5018
2502
|
let parent = this.collection.getItem(item.parentKey);
|
|
5019
2503
|
if (!parent) return null;
|
|
5020
|
-
let children =
|
|
5021
|
-
let prev = (this.direction === "rtl" ?
|
|
2504
|
+
let children = useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(parent, this.collection);
|
|
2505
|
+
let prev = (this.direction === "rtl" ? useHasTabbableChild.$cd5ea4b915021f1d$export$5f3398f8733f90e2(children, item.index + 1) : useHasTabbableChild.$cd5ea4b915021f1d$export$5f3398f8733f90e2(children, item.index - 1)) ?? null;
|
|
5022
2506
|
if (prev) return prev.key ?? null;
|
|
5023
2507
|
if (this.focusMode === "row") return item.parentKey ?? null;
|
|
5024
2508
|
return (this.direction === "rtl" ? this.getLastKey(key) : this.getFirstKey(key)) ?? null;
|
|
@@ -5034,14 +2518,14 @@ class $c7bb87e55e1ab755$export$de9feff04fda126e {
|
|
|
5034
2518
|
if (this.isCell(item) && !global && item.parentKey != null) {
|
|
5035
2519
|
let parent = this.collection.getItem(item.parentKey);
|
|
5036
2520
|
if (!parent) return null;
|
|
5037
|
-
return
|
|
2521
|
+
return useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(parent, this.collection))?.key ?? null;
|
|
5038
2522
|
}
|
|
5039
2523
|
}
|
|
5040
2524
|
key = this.findNextKey(void 0, (item2) => item2.type === "item");
|
|
5041
2525
|
if (key != null && (item && this.isCell(item) && global || this.focusMode === "cell")) {
|
|
5042
2526
|
let item2 = this.collection.getItem(key);
|
|
5043
2527
|
if (!item2) return null;
|
|
5044
|
-
key =
|
|
2528
|
+
key = useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item2, this.collection))?.key ?? null;
|
|
5045
2529
|
}
|
|
5046
2530
|
return key;
|
|
5047
2531
|
}
|
|
@@ -5054,16 +2538,16 @@ class $c7bb87e55e1ab755$export$de9feff04fda126e {
|
|
|
5054
2538
|
if (this.isCell(item) && !global && item.parentKey != null) {
|
|
5055
2539
|
let parent = this.collection.getItem(item.parentKey);
|
|
5056
2540
|
if (!parent) return null;
|
|
5057
|
-
let children =
|
|
5058
|
-
return
|
|
2541
|
+
let children = useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(parent, this.collection);
|
|
2542
|
+
return useHasTabbableChild.$cd5ea4b915021f1d$export$7475b2c64539e4cf(children)?.key ?? null;
|
|
5059
2543
|
}
|
|
5060
2544
|
}
|
|
5061
2545
|
key = this.findPreviousKey(void 0, (item2) => item2.type === "item");
|
|
5062
2546
|
if (key != null && (item && this.isCell(item) && global || this.focusMode === "cell")) {
|
|
5063
2547
|
let item2 = this.collection.getItem(key);
|
|
5064
2548
|
if (!item2) return null;
|
|
5065
|
-
let children =
|
|
5066
|
-
key =
|
|
2549
|
+
let children = useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item2, this.collection);
|
|
2550
|
+
key = useHasTabbableChild.$cd5ea4b915021f1d$export$7475b2c64539e4cf(children)?.key ?? null;
|
|
5067
2551
|
}
|
|
5068
2552
|
return key;
|
|
5069
2553
|
}
|
|
@@ -5109,7 +2593,7 @@ class $c7bb87e55e1ab755$export$de9feff04fda126e {
|
|
|
5109
2593
|
if (item.textValue) {
|
|
5110
2594
|
let substring = item.textValue.slice(0, search.length);
|
|
5111
2595
|
if (this.collator.compare(substring, search) === 0) {
|
|
5112
|
-
if (this.isRow(item) && this.focusMode === "cell") return
|
|
2596
|
+
if (this.isRow(item) && this.focusMode === "cell") return useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item, this.collection))?.key ?? null;
|
|
5113
2597
|
return item.key;
|
|
5114
2598
|
}
|
|
5115
2599
|
}
|
|
@@ -5165,7 +2649,7 @@ function $e9c0503d101e30f9$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
5165
2649
|
collator,
|
|
5166
2650
|
focusMode
|
|
5167
2651
|
]);
|
|
5168
|
-
let { collectionProps } =
|
|
2652
|
+
let { collectionProps } = useHasTabbableChild.$d667c2af82d35a98$export$d6daf82dcd84e87c({
|
|
5169
2653
|
ref,
|
|
5170
2654
|
selectionManager: manager,
|
|
5171
2655
|
keyboardDelegate: delegate,
|
|
@@ -5208,7 +2692,7 @@ function $e9c0503d101e30f9$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
5208
2692
|
onFocus,
|
|
5209
2693
|
collectionProps.onBlur
|
|
5210
2694
|
]);
|
|
5211
|
-
let hasTabbableChild =
|
|
2695
|
+
let hasTabbableChild = useHasTabbableChild.$bf14c9739fda2eb3$export$eac1895992b9f3d6(ref, {
|
|
5212
2696
|
isDisabled: state.collection.size !== 0
|
|
5213
2697
|
});
|
|
5214
2698
|
let gridProps = utils.$bbaa08b3cd72f041$export$9d1611c77c2fe928(
|
|
@@ -5777,7 +3261,7 @@ class $0048eb146240e3fa$export$da43f8f5cb04028d extends $c7bb87e55e1ab755$export
|
|
|
5777
3261
|
let startItem = this.collection.getItem(key);
|
|
5778
3262
|
if (!startItem) return null;
|
|
5779
3263
|
if (startItem.type === "column") {
|
|
5780
|
-
let child =
|
|
3264
|
+
let child = useHasTabbableChild.$cd5ea4b915021f1d$export$fbdeaa6a76694f71(useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(startItem, this.collection));
|
|
5781
3265
|
if (child) return child.key;
|
|
5782
3266
|
let firstKey = this.getFirstKey();
|
|
5783
3267
|
if (firstKey == null) return null;
|
|
@@ -5805,7 +3289,7 @@ class $0048eb146240e3fa$export$da43f8f5cb04028d extends $c7bb87e55e1ab755$export
|
|
|
5805
3289
|
let key = this.findNextKey(column.key, (item) => item.type === "column");
|
|
5806
3290
|
if (key != null) return key;
|
|
5807
3291
|
let row = this.collection.headerRows[column.level];
|
|
5808
|
-
for (let item of
|
|
3292
|
+
for (let item of useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(row, this.collection)) {
|
|
5809
3293
|
if (item.type === "column") return item.key;
|
|
5810
3294
|
}
|
|
5811
3295
|
return null;
|
|
@@ -5815,7 +3299,7 @@ class $0048eb146240e3fa$export$da43f8f5cb04028d extends $c7bb87e55e1ab755$export
|
|
|
5815
3299
|
if (key != null) return key;
|
|
5816
3300
|
let row = this.collection.headerRows[column.level];
|
|
5817
3301
|
let childNodes = [
|
|
5818
|
-
|
|
3302
|
+
...useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(row, this.collection)
|
|
5819
3303
|
];
|
|
5820
3304
|
for (let i = childNodes.length - 1; i >= 0; i--) {
|
|
5821
3305
|
let item = childNodes[i];
|
|
@@ -5850,7 +3334,7 @@ class $0048eb146240e3fa$export$da43f8f5cb04028d extends $c7bb87e55e1ab755$export
|
|
|
5850
3334
|
let substring = item.textValue.slice(0, search.length);
|
|
5851
3335
|
if (this.collator.compare(substring, search) === 0) return item.key;
|
|
5852
3336
|
}
|
|
5853
|
-
for (let cell of
|
|
3337
|
+
for (let cell of useHasTabbableChild.$cd5ea4b915021f1d$export$1005530eda016c13(item, this.collection)) {
|
|
5854
3338
|
let column = collection.columns[cell.index];
|
|
5855
3339
|
if (collection.rowHeaderColumnKeys.has(column.key) && cell.textValue) {
|
|
5856
3340
|
let substring = cell.textValue.slice(0, search.length);
|
|
@@ -5923,7 +3407,7 @@ function $fb95af427cd4e876$export$25bceaac3c7e4dc7(props, state, ref) {
|
|
|
5923
3407
|
column,
|
|
5924
3408
|
state.collection.columns
|
|
5925
3409
|
]);
|
|
5926
|
-
let descriptionProps =
|
|
3410
|
+
let descriptionProps = useHasTabbableChild.$121970af65029459$export$f8aeda7b10753fa1(sortDescription);
|
|
5927
3411
|
$3c71b1595a147f24$export$496315a1608d9602(() => {
|
|
5928
3412
|
if (sortDescription) Button.$a46cf152bb926da5$export$a9b970dcc4ae71a9(sortDescription, "assertive", 500);
|
|
5929
3413
|
}, [
|
|
@@ -5970,7 +3454,7 @@ function $a4d729ad50b8576a$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
5970
3454
|
if (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !focusSafely.$23f2114a1b82827e$export$b4f377a2b6254582(ref.current)) focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
5971
3455
|
}
|
|
5972
3456
|
};
|
|
5973
|
-
let { itemProps, isPressed } =
|
|
3457
|
+
let { itemProps, isPressed } = useHasTabbableChild.$f6ba6936bfd098a0$export$ecf600387e221c37({
|
|
5974
3458
|
selectionManager: state.selectionManager,
|
|
5975
3459
|
key: node.key,
|
|
5976
3460
|
ref,
|
|
@@ -5993,7 +3477,7 @@ function $a4d729ad50b8576a$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
5993
3477
|
e.stopPropagation();
|
|
5994
3478
|
if (focusable) {
|
|
5995
3479
|
focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(focusable);
|
|
5996
|
-
|
|
3480
|
+
useHasTabbableChild.$51a3e22a5186a962$export$c826860796309d1b(focusable, {
|
|
5997
3481
|
containingElement: $3578607fe3d4b096$export$cfa2225e87938781(ref.current)
|
|
5998
3482
|
});
|
|
5999
3483
|
} else {
|
|
@@ -6004,7 +3488,7 @@ function $a4d729ad50b8576a$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
6004
3488
|
}
|
|
6005
3489
|
if (focusMode === "cell" && direction === "rtl") {
|
|
6006
3490
|
focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
6007
|
-
|
|
3491
|
+
useHasTabbableChild.$51a3e22a5186a962$export$c826860796309d1b(ref.current, {
|
|
6008
3492
|
containingElement: $3578607fe3d4b096$export$cfa2225e87938781(ref.current)
|
|
6009
3493
|
});
|
|
6010
3494
|
} else {
|
|
@@ -6012,7 +3496,7 @@ function $a4d729ad50b8576a$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
6012
3496
|
focusable = direction === "rtl" ? walker.firstChild() : $a4d729ad50b8576a$var$last(walker);
|
|
6013
3497
|
if (focusable) {
|
|
6014
3498
|
focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(focusable);
|
|
6015
|
-
|
|
3499
|
+
useHasTabbableChild.$51a3e22a5186a962$export$c826860796309d1b(focusable, {
|
|
6016
3500
|
containingElement: $3578607fe3d4b096$export$cfa2225e87938781(ref.current)
|
|
6017
3501
|
});
|
|
6018
3502
|
}
|
|
@@ -6027,7 +3511,7 @@ function $a4d729ad50b8576a$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
6027
3511
|
e.stopPropagation();
|
|
6028
3512
|
if (focusable) {
|
|
6029
3513
|
focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(focusable);
|
|
6030
|
-
|
|
3514
|
+
useHasTabbableChild.$51a3e22a5186a962$export$c826860796309d1b(focusable, {
|
|
6031
3515
|
containingElement: $3578607fe3d4b096$export$cfa2225e87938781(ref.current)
|
|
6032
3516
|
});
|
|
6033
3517
|
} else {
|
|
@@ -6038,7 +3522,7 @@ function $a4d729ad50b8576a$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
6038
3522
|
}
|
|
6039
3523
|
if (focusMode === "cell" && direction === "ltr") {
|
|
6040
3524
|
focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
6041
|
-
|
|
3525
|
+
useHasTabbableChild.$51a3e22a5186a962$export$c826860796309d1b(ref.current, {
|
|
6042
3526
|
containingElement: $3578607fe3d4b096$export$cfa2225e87938781(ref.current)
|
|
6043
3527
|
});
|
|
6044
3528
|
} else {
|
|
@@ -6046,7 +3530,7 @@ function $a4d729ad50b8576a$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
6046
3530
|
focusable = direction === "rtl" ? $a4d729ad50b8576a$var$last(walker) : walker.firstChild();
|
|
6047
3531
|
if (focusable) {
|
|
6048
3532
|
focusSafely.$f192c2f16961cbe0$export$80f3e147d781571c(focusable);
|
|
6049
|
-
|
|
3533
|
+
useHasTabbableChild.$51a3e22a5186a962$export$c826860796309d1b(focusable, {
|
|
6050
3534
|
containingElement: $3578607fe3d4b096$export$cfa2225e87938781(ref.current)
|
|
6051
3535
|
});
|
|
6052
3536
|
}
|
|
@@ -6164,7 +3648,7 @@ function $7354db473d14c864$export$9514819a8c81e960(props, state, ref) {
|
|
|
6164
3648
|
sortDescription = `${stringFormatter.format("sortable")}`;
|
|
6165
3649
|
if (isSortedColumn && sortDirection && focusSafely.$2add3ce32c6007eb$export$a11b0059900ceec8()) sortDescription = `${sortDescription}, ${stringFormatter.format(sortDirection)}`;
|
|
6166
3650
|
}
|
|
6167
|
-
let descriptionProps =
|
|
3651
|
+
let descriptionProps = useHasTabbableChild.$121970af65029459$export$f8aeda7b10753fa1(sortDescription);
|
|
6168
3652
|
let shouldDisableFocus = state.collection.size === 0;
|
|
6169
3653
|
React.useEffect(() => {
|
|
6170
3654
|
if (shouldDisableFocus && state.selectionManager.focusedKey === node.key) state.selectionManager.setFocusedKey(null);
|
|
@@ -6197,7 +3681,7 @@ function $6b16276e8bbdaf8e$export$96357d5a73f686fa(props, state, ref) {
|
|
|
6197
3681
|
let { node, isVirtualized, shouldSelectOnPressUp, onAction } = props;
|
|
6198
3682
|
let { actions, shouldSelectOnPressUp: gridShouldSelectOnPressUp } = $90a81c508a5c0de1$export$e6235c0d09b995d0.get(state);
|
|
6199
3683
|
let onRowAction = actions.onRowAction ? () => actions.onRowAction?.(node.key) : onAction;
|
|
6200
|
-
let { itemProps, ...states } =
|
|
3684
|
+
let { itemProps, ...states } = useHasTabbableChild.$f6ba6936bfd098a0$export$ecf600387e221c37({
|
|
6201
3685
|
selectionManager: state.selectionManager,
|
|
6202
3686
|
key: node.key,
|
|
6203
3687
|
ref,
|
|
@@ -6242,7 +3726,7 @@ function $d5954d038bf91c37$export$7f2f6ae19e707aa5(props, state, ref) {
|
|
|
6242
3726
|
delete rowProps["aria-rowindex"];
|
|
6243
3727
|
let isExpanded = state.treeColumn != null && (state.expandedKeys === "all" || state.expandedKeys.has(node.key));
|
|
6244
3728
|
let stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault$3($b0fbbc5fdcc6603a$exports), "@react-aria/table");
|
|
6245
|
-
let labelProps =
|
|
3729
|
+
let labelProps = useLabels.$e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
6246
3730
|
"aria-label": isExpanded ? stringFormatter.format("collapse") : stringFormatter.format("expand"),
|
|
6247
3731
|
"aria-labelledby": $cf56c58f505db99a$export$85069b70317f543(state, node.key)
|
|
6248
3732
|
});
|
|
@@ -6478,7 +3962,7 @@ function $963a203da37f9c8f$export$52994e973806c219(props, state, ref) {
|
|
|
6478
3962
|
// oxlint-disable-next-line react/react-compiler
|
|
6479
3963
|
triggerRef?.current == null && (modality === "keyboard" || modality === "virtual") && !isResizing ? stringFormatter.format("resizerDescription") : void 0
|
|
6480
3964
|
);
|
|
6481
|
-
let descriptionProps =
|
|
3965
|
+
let descriptionProps = useHasTabbableChild.$121970af65029459$export$f8aeda7b10753fa1(description);
|
|
6482
3966
|
let ariaProps = {
|
|
6483
3967
|
"aria-label": ariaLabel,
|
|
6484
3968
|
"aria-orientation": "horizontal",
|
|
@@ -6762,7 +4246,7 @@ const $76d00c5a4edb230a$export$7063e69b8a954175 = /* @__PURE__ */ React.forwardR
|
|
|
6762
4246
|
let [width, setWidth] = React.useState(0);
|
|
6763
4247
|
utils.$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
6764
4248
|
let table = tableRef.current;
|
|
6765
|
-
while (table && table !== containerRef.current &&
|
|
4249
|
+
while (table && table !== containerRef.current && !useHasTabbableChild.$901761b40e390936$export$2bb74740c4e19def(table)) table = table.parentElement;
|
|
6766
4250
|
scrollRef.current = table;
|
|
6767
4251
|
}, [
|
|
6768
4252
|
containerRef
|
|
@@ -6813,7 +4297,7 @@ const $76d00c5a4edb230a$export$38de1cb0526c21fb = /* @__PURE__ */ React.createCo
|
|
|
6813
4297
|
const $76d00c5a4edb230a$export$a2680a798823803c = /* @__PURE__ */ React.createContext(null);
|
|
6814
4298
|
const $76d00c5a4edb230a$export$54ec01a60f47d33d = /* @__PURE__ */ React.forwardRef(function Table(props, ref) {
|
|
6815
4299
|
[props, ref] = utils.$7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $76d00c5a4edb230a$export$93e4b0b2cc49b648);
|
|
6816
|
-
let selectionState =
|
|
4300
|
+
let selectionState = useHasTabbableChild.$60f19cefd567a3e4$export$253fe78d46329472(props);
|
|
6817
4301
|
let { selectionBehavior, selectionMode, disallowEmptySelection } = selectionState;
|
|
6818
4302
|
let hasDragHooks = !!props.dragAndDropHooks?.useDraggableCollectionState;
|
|
6819
4303
|
let ctx = React.useMemo(() => ({
|
|
@@ -6829,8 +4313,8 @@ const $76d00c5a4edb230a$export$54ec01a60f47d33d = /* @__PURE__ */ React.forwardR
|
|
|
6829
4313
|
]);
|
|
6830
4314
|
let content = /* @__PURE__ */ React.createElement($76d00c5a4edb230a$var$TableOptionsContext.Provider, {
|
|
6831
4315
|
value: ctx
|
|
6832
|
-
}, /* @__PURE__ */ React.createElement(
|
|
6833
|
-
return /* @__PURE__ */ React.createElement(
|
|
4316
|
+
}, /* @__PURE__ */ React.createElement(useHasTabbableChild.$42ceafc619f9c3ba$export$fb8073518f34e6ec, props));
|
|
4317
|
+
return /* @__PURE__ */ React.createElement(useHasTabbableChild.$42ceafc619f9c3ba$export$bf788dd355e3a401, {
|
|
6834
4318
|
content,
|
|
6835
4319
|
createCollection: () => new $76d00c5a4edb230a$var$TableCollection()
|
|
6836
4320
|
}, (collection) => /* @__PURE__ */ React.createElement($76d00c5a4edb230a$var$TableInner, {
|
|
@@ -6841,7 +4325,7 @@ const $76d00c5a4edb230a$export$54ec01a60f47d33d = /* @__PURE__ */ React.forwardR
|
|
|
6841
4325
|
}));
|
|
6842
4326
|
});
|
|
6843
4327
|
let $76d00c5a4edb230a$var$TableElementType = /* @__PURE__ */ React.forwardRef(function TableElementType(props, ref) {
|
|
6844
|
-
let { isVirtualized } = React.useContext(
|
|
4328
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
6845
4329
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
6846
4330
|
...props,
|
|
6847
4331
|
ref
|
|
@@ -6865,11 +4349,11 @@ function $76d00c5a4edb230a$var$TableInner({ props, forwardedRef: ref, selectionS
|
|
|
6865
4349
|
[props, ref] = utils.$7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $4b38b5b75ecc6208$export$b0d3ecf7112093a7);
|
|
6866
4350
|
let { shouldUseVirtualFocus, disallowTypeAhead, filter, ...DOMCollectionProps } = props;
|
|
6867
4351
|
let tableContainerContext = React.useContext($76d00c5a4edb230a$var$ResizableTableContainerContext);
|
|
6868
|
-
ref = utils.$03e8ab2d84d7657a$export$4338b53315abf666(React.useMemo(() =>
|
|
4352
|
+
ref = utils.$03e8ab2d84d7657a$export$4338b53315abf666(React.useMemo(() => mergeRefs.$4064df0d6f9620e1$export$c9058316764c140e(ref, tableContainerContext?.tableRef), [
|
|
6869
4353
|
ref,
|
|
6870
4354
|
tableContainerContext?.tableRef
|
|
6871
4355
|
]));
|
|
6872
|
-
let [expandedKeys, setExpandedKeys] =
|
|
4356
|
+
let [expandedKeys, setExpandedKeys] = useControlledState.$3e6197669829fe11$export$40bfa8c7b0832715(props.expandedKeys ? new Set(props.expandedKeys) : void 0, props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : /* @__PURE__ */ new Set(), props.onExpandedChange);
|
|
6873
4357
|
collection = React.useMemo(() => collection.withExpandedKeys(expandedKeys), [
|
|
6874
4358
|
collection,
|
|
6875
4359
|
expandedKeys
|
|
@@ -6883,7 +4367,7 @@ function $76d00c5a4edb230a$var$TableInner({ props, forwardedRef: ref, selectionS
|
|
|
6883
4367
|
onExpandedChange: setExpandedKeys
|
|
6884
4368
|
});
|
|
6885
4369
|
let filteredState = $178a7f94e1b4b497$export$31447e17397b15c2(tableState, filter);
|
|
6886
|
-
let { isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate, CollectionRoot } = React.useContext(
|
|
4370
|
+
let { isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate, CollectionRoot } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
6887
4371
|
let { dragAndDropHooks } = props;
|
|
6888
4372
|
let { gridProps } = $fb95af427cd4e876$export$25bceaac3c7e4dc7({
|
|
6889
4373
|
...DOMCollectionProps,
|
|
@@ -7046,7 +4530,7 @@ const _$76d00c5a4edb230a$var$TableHeaderNode = class _$76d00c5a4edb230a$var$Tabl
|
|
|
7046
4530
|
_$76d00c5a4edb230a$var$TableHeaderNode.type = "tableheader";
|
|
7047
4531
|
let $76d00c5a4edb230a$var$TableHeaderNode = _$76d00c5a4edb230a$var$TableHeaderNode;
|
|
7048
4532
|
let $76d00c5a4edb230a$var$THeadElementType = /* @__PURE__ */ React.forwardRef(function THeadElementType(props, ref) {
|
|
7049
|
-
let { isVirtualized } = React.useContext(
|
|
4533
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7050
4534
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
7051
4535
|
...props,
|
|
7052
4536
|
ref
|
|
@@ -7056,9 +4540,9 @@ let $76d00c5a4edb230a$var$THeadElementType = /* @__PURE__ */ React.forwardRef(fu
|
|
|
7056
4540
|
ref
|
|
7057
4541
|
});
|
|
7058
4542
|
});
|
|
7059
|
-
const $76d00c5a4edb230a$export$f850895b287ef28e = /* @__PURE__ */
|
|
4543
|
+
const $76d00c5a4edb230a$export$f850895b287ef28e = /* @__PURE__ */ useHasTabbableChild.$42ceafc619f9c3ba$export$e953bb1cd0f19726($76d00c5a4edb230a$var$TableHeaderNode, (props, ref) => {
|
|
7060
4544
|
let collection = React.useContext($76d00c5a4edb230a$export$38de1cb0526c21fb).collection;
|
|
7061
|
-
let headerRows =
|
|
4545
|
+
let headerRows = useHasTabbableChild.$a80bd3e9349588e7$export$727c8fc270210f13({
|
|
7062
4546
|
items: collection.headerRows,
|
|
7063
4547
|
children: React.useCallback((item) => {
|
|
7064
4548
|
switch (item.type) {
|
|
@@ -7093,12 +4577,12 @@ const $76d00c5a4edb230a$export$f850895b287ef28e = /* @__PURE__ */ $42ceafc619f9c
|
|
|
7093
4577
|
ref,
|
|
7094
4578
|
"data-hovered": isHovered || void 0
|
|
7095
4579
|
}, headerRows);
|
|
7096
|
-
}, (props) => /* @__PURE__ */ React.createElement(
|
|
4580
|
+
}, (props) => /* @__PURE__ */ React.createElement(useHasTabbableChild.$42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
7097
4581
|
dependencies: props.dependencies,
|
|
7098
4582
|
items: props.columns
|
|
7099
4583
|
}, props.children));
|
|
7100
4584
|
let $76d00c5a4edb230a$var$TableHeaderRowElementType = /* @__PURE__ */ React.forwardRef(function TableHeaderRowElementType(props, ref) {
|
|
7101
|
-
let { isVirtualized } = React.useContext(
|
|
4585
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7102
4586
|
if (isVirtualized) return /* @__PURE__ */ React.createElement("div", {
|
|
7103
4587
|
...props,
|
|
7104
4588
|
ref
|
|
@@ -7111,7 +4595,7 @@ let $76d00c5a4edb230a$var$TableHeaderRowElementType = /* @__PURE__ */ React.forw
|
|
|
7111
4595
|
function $76d00c5a4edb230a$var$TableHeaderRow({ item }) {
|
|
7112
4596
|
let ref = React.useRef(null);
|
|
7113
4597
|
let state = React.useContext($76d00c5a4edb230a$export$38de1cb0526c21fb);
|
|
7114
|
-
let { isVirtualized, CollectionBranch } = React.useContext(
|
|
4598
|
+
let { isVirtualized, CollectionBranch } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7115
4599
|
let { rowProps } = $b79421b14039b021$export$1b95a7d2d517b841({
|
|
7116
4600
|
node: item,
|
|
7117
4601
|
isVirtualized
|
|
@@ -7149,7 +4633,7 @@ const _$76d00c5a4edb230a$var$TableColumnNode = class _$76d00c5a4edb230a$var$Tabl
|
|
|
7149
4633
|
_$76d00c5a4edb230a$var$TableColumnNode.type = "column";
|
|
7150
4634
|
let $76d00c5a4edb230a$var$TableColumnNode = _$76d00c5a4edb230a$var$TableColumnNode;
|
|
7151
4635
|
let $76d00c5a4edb230a$var$ColumnElementType = /* @__PURE__ */ React.forwardRef(function ColumnElementType(props, ref) {
|
|
7152
|
-
let { isVirtualized } = React.useContext(
|
|
4636
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7153
4637
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
7154
4638
|
...props,
|
|
7155
4639
|
ref
|
|
@@ -7159,10 +4643,10 @@ let $76d00c5a4edb230a$var$ColumnElementType = /* @__PURE__ */ React.forwardRef(f
|
|
|
7159
4643
|
ref
|
|
7160
4644
|
});
|
|
7161
4645
|
});
|
|
7162
|
-
const $76d00c5a4edb230a$export$816b5d811295e6bc = /* @__PURE__ */
|
|
4646
|
+
const $76d00c5a4edb230a$export$816b5d811295e6bc = /* @__PURE__ */ useHasTabbableChild.$42ceafc619f9c3ba$export$18af5c7a9e9b3664($76d00c5a4edb230a$var$TableColumnNode, (props, forwardedRef, column) => {
|
|
7163
4647
|
let ref = utils.$03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
7164
4648
|
let state = React.useContext($76d00c5a4edb230a$export$38de1cb0526c21fb);
|
|
7165
|
-
let { isVirtualized } = React.useContext(
|
|
4649
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7166
4650
|
let { columnHeaderProps, isPressed } = $7354db473d14c864$export$9514819a8c81e960({
|
|
7167
4651
|
node: column,
|
|
7168
4652
|
isVirtualized,
|
|
@@ -7239,8 +4723,8 @@ const $76d00c5a4edb230a$export$816b5d811295e6bc = /* @__PURE__ */ $42ceafc619f9c
|
|
|
7239
4723
|
}
|
|
7240
4724
|
],
|
|
7241
4725
|
[
|
|
7242
|
-
|
|
7243
|
-
|
|
4726
|
+
useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5,
|
|
4727
|
+
useHasTabbableChild.$263ab7fc0f95ccdb$export$a164736487e3f0ae
|
|
7244
4728
|
]
|
|
7245
4729
|
]
|
|
7246
4730
|
}, renderProps.children));
|
|
@@ -7323,7 +4807,7 @@ const _$76d00c5a4edb230a$var$TableBodyNode = class _$76d00c5a4edb230a$var$TableB
|
|
|
7323
4807
|
_$76d00c5a4edb230a$var$TableBodyNode.type = "tablebody";
|
|
7324
4808
|
let $76d00c5a4edb230a$var$TableBodyNode = _$76d00c5a4edb230a$var$TableBodyNode;
|
|
7325
4809
|
let $76d00c5a4edb230a$var$TableBodyElementType = /* @__PURE__ */ React.forwardRef(function TableBodyElementType(props, ref) {
|
|
7326
|
-
let { isVirtualized } = React.useContext(
|
|
4810
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7327
4811
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
7328
4812
|
...props,
|
|
7329
4813
|
ref
|
|
@@ -7333,11 +4817,11 @@ let $76d00c5a4edb230a$var$TableBodyElementType = /* @__PURE__ */ React.forwardRe
|
|
|
7333
4817
|
ref
|
|
7334
4818
|
});
|
|
7335
4819
|
});
|
|
7336
|
-
const $76d00c5a4edb230a$export$76ccd210b9029917 = /* @__PURE__ */
|
|
4820
|
+
const $76d00c5a4edb230a$export$76ccd210b9029917 = /* @__PURE__ */ useHasTabbableChild.$42ceafc619f9c3ba$export$e953bb1cd0f19726($76d00c5a4edb230a$var$TableBodyNode, (props, ref, node) => {
|
|
7337
4821
|
let state = React.useContext($76d00c5a4edb230a$export$38de1cb0526c21fb);
|
|
7338
|
-
let { isVirtualized } = React.useContext(
|
|
4822
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7339
4823
|
let collection = state.collection;
|
|
7340
|
-
let { CollectionBranch } = React.useContext(
|
|
4824
|
+
let { CollectionBranch } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7341
4825
|
let { dragAndDropHooks, dropState } = React.useContext($f9554a667e4f0374$export$d188a835a7bc5783);
|
|
7342
4826
|
let isDroppable = !!dragAndDropHooks?.useDroppableCollectionState && !dropState?.isDisabled;
|
|
7343
4827
|
let isRootDropTarget = isDroppable && !!dropState && (dropState.isDropTarget({
|
|
@@ -7412,7 +4896,7 @@ const _$76d00c5a4edb230a$var$TableRowNode = class _$76d00c5a4edb230a$var$TableRo
|
|
|
7412
4896
|
_$76d00c5a4edb230a$var$TableRowNode.type = "item";
|
|
7413
4897
|
let $76d00c5a4edb230a$var$TableRowNode = _$76d00c5a4edb230a$var$TableRowNode;
|
|
7414
4898
|
let $76d00c5a4edb230a$var$TableRowElementType = /* @__PURE__ */ React.forwardRef(function TableRowElementType(props, ref) {
|
|
7415
|
-
let { isVirtualized } = React.useContext(
|
|
4899
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7416
4900
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
7417
4901
|
...props,
|
|
7418
4902
|
ref
|
|
@@ -7422,11 +4906,11 @@ let $76d00c5a4edb230a$var$TableRowElementType = /* @__PURE__ */ React.forwardRef
|
|
|
7422
4906
|
ref
|
|
7423
4907
|
});
|
|
7424
4908
|
});
|
|
7425
|
-
const $76d00c5a4edb230a$export$b59bdbef9ce70de2 = /* @__PURE__ */
|
|
4909
|
+
const $76d00c5a4edb230a$export$b59bdbef9ce70de2 = /* @__PURE__ */ useHasTabbableChild.$42ceafc619f9c3ba$export$e953bb1cd0f19726($76d00c5a4edb230a$var$TableRowNode, (props, forwardedRef, item) => {
|
|
7426
4910
|
let ref = utils.$03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
7427
4911
|
let state = React.useContext($76d00c5a4edb230a$export$38de1cb0526c21fb);
|
|
7428
4912
|
let { dragAndDropHooks, dragState, dropState } = React.useContext($f9554a667e4f0374$export$d188a835a7bc5783);
|
|
7429
|
-
let { isVirtualized, CollectionBranch } = React.useContext(
|
|
4913
|
+
let { isVirtualized, CollectionBranch } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7430
4914
|
let isDraggable = dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));
|
|
7431
4915
|
let { rowProps, expandButtonProps, ...states } = $d5954d038bf91c37$export$7f2f6ae19e707aa5({
|
|
7432
4916
|
node: item,
|
|
@@ -7570,7 +5054,7 @@ const $76d00c5a4edb230a$export$b59bdbef9ce70de2 = /* @__PURE__ */ $42ceafc619f9c
|
|
|
7570
5054
|
}
|
|
7571
5055
|
],
|
|
7572
5056
|
[
|
|
7573
|
-
|
|
5057
|
+
useHasTabbableChild.$91fe5e721c7f36c1$export$c9549807523555e0,
|
|
7574
5058
|
{
|
|
7575
5059
|
isSelected: states.isSelected
|
|
7576
5060
|
}
|
|
@@ -7591,7 +5075,7 @@ const $76d00c5a4edb230a$export$b59bdbef9ce70de2 = /* @__PURE__ */ $42ceafc619f9c
|
|
|
7591
5075
|
let dependencies = [
|
|
7592
5076
|
props.value
|
|
7593
5077
|
].concat(props.dependencies);
|
|
7594
|
-
return /* @__PURE__ */ React.createElement(
|
|
5078
|
+
return /* @__PURE__ */ React.createElement(useHasTabbableChild.$42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
7595
5079
|
dependencies,
|
|
7596
5080
|
items: props.columns,
|
|
7597
5081
|
idScope: props.id
|
|
@@ -7602,7 +5086,7 @@ const _$76d00c5a4edb230a$var$TableCellNode = class _$76d00c5a4edb230a$var$TableC
|
|
|
7602
5086
|
_$76d00c5a4edb230a$var$TableCellNode.type = "cell";
|
|
7603
5087
|
let $76d00c5a4edb230a$var$TableCellNode = _$76d00c5a4edb230a$var$TableCellNode;
|
|
7604
5088
|
let $76d00c5a4edb230a$var$TableCellElementType = /* @__PURE__ */ React.forwardRef(function TableCellElementType(props, ref) {
|
|
7605
|
-
let { isVirtualized } = React.useContext(
|
|
5089
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7606
5090
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
7607
5091
|
...props,
|
|
7608
5092
|
ref
|
|
@@ -7612,11 +5096,11 @@ let $76d00c5a4edb230a$var$TableCellElementType = /* @__PURE__ */ React.forwardRe
|
|
|
7612
5096
|
ref
|
|
7613
5097
|
});
|
|
7614
5098
|
});
|
|
7615
|
-
const $76d00c5a4edb230a$export$f6f0c3fe4ec306ea = /* @__PURE__ */
|
|
5099
|
+
const $76d00c5a4edb230a$export$f6f0c3fe4ec306ea = /* @__PURE__ */ useHasTabbableChild.$42ceafc619f9c3ba$export$18af5c7a9e9b3664($76d00c5a4edb230a$var$TableCellNode, (props, forwardedRef, cell) => {
|
|
7616
5100
|
let ref = utils.$03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
7617
5101
|
let state = React.useContext($76d00c5a4edb230a$export$38de1cb0526c21fb);
|
|
7618
5102
|
let { dragState } = React.useContext($f9554a667e4f0374$export$d188a835a7bc5783);
|
|
7619
|
-
let { isVirtualized } = React.useContext(
|
|
5103
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7620
5104
|
cell.column = state.collection.columns[cell.index];
|
|
7621
5105
|
let { gridCellProps, isPressed } = $059e6e023d86289a$export$49571c903d73624c({
|
|
7622
5106
|
node: cell,
|
|
@@ -7672,8 +5156,8 @@ const $76d00c5a4edb230a$export$f6f0c3fe4ec306ea = /* @__PURE__ */ $42ceafc619f9c
|
|
|
7672
5156
|
"data-level": row.level + 1,
|
|
7673
5157
|
"data-tree-column": cell.column.key === state.treeColumn || void 0,
|
|
7674
5158
|
"data-disabled": isDisabled || void 0
|
|
7675
|
-
}, /* @__PURE__ */ React.createElement(
|
|
7676
|
-
value:
|
|
5159
|
+
}, /* @__PURE__ */ React.createElement(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5.Provider, {
|
|
5160
|
+
value: useHasTabbableChild.$263ab7fc0f95ccdb$export$a164736487e3f0ae
|
|
7677
5161
|
}, renderProps.children));
|
|
7678
5162
|
});
|
|
7679
5163
|
function $76d00c5a4edb230a$var$TableDropIndicatorWrapper(props, ref) {
|
|
@@ -7693,7 +5177,7 @@ function $76d00c5a4edb230a$var$TableDropIndicatorWrapper(props, ref) {
|
|
|
7693
5177
|
});
|
|
7694
5178
|
}
|
|
7695
5179
|
let $76d00c5a4edb230a$var$TableDropIndicatorRowElementType = /* @__PURE__ */ React.forwardRef(function TableDropIndicatorRowElementType(props, ref) {
|
|
7696
|
-
let { isVirtualized } = React.useContext(
|
|
5180
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7697
5181
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
7698
5182
|
...props,
|
|
7699
5183
|
ref
|
|
@@ -7704,7 +5188,7 @@ let $76d00c5a4edb230a$var$TableDropIndicatorRowElementType = /* @__PURE__ */ Rea
|
|
|
7704
5188
|
});
|
|
7705
5189
|
});
|
|
7706
5190
|
let $76d00c5a4edb230a$var$TableDropIndicatorTDElementType = /* @__PURE__ */ React.forwardRef(function TableDropIndicatorTDElementType(props, ref) {
|
|
7707
|
-
let { isVirtualized } = React.useContext(
|
|
5191
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7708
5192
|
if (isVirtualized) return /* @__PURE__ */ React.createElement(utils.$7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
7709
5193
|
...props,
|
|
7710
5194
|
ref
|
|
@@ -7785,9 +5269,9 @@ function $76d00c5a4edb230a$var$RootDropIndicator() {
|
|
|
7785
5269
|
ref
|
|
7786
5270
|
})));
|
|
7787
5271
|
}
|
|
7788
|
-
const $76d00c5a4edb230a$export$8f5bea0338ed243c =
|
|
5272
|
+
const $76d00c5a4edb230a$export$8f5bea0338ed243c = useHasTabbableChild.$42ceafc619f9c3ba$export$18af5c7a9e9b3664(BaseCollection.$6f0c29017aeec335$export$8258a0665a675899, function TableLoadingIndicator(props, ref, item) {
|
|
7789
5273
|
let state = React.useContext($76d00c5a4edb230a$export$38de1cb0526c21fb);
|
|
7790
|
-
let { isVirtualized } = React.useContext(
|
|
5274
|
+
let { isVirtualized } = React.useContext(useHasTabbableChild.$263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
7791
5275
|
let { isLoading, onLoadMore, scrollOffset, ...otherProps } = props;
|
|
7792
5276
|
let numColumns = state.collection.columns.length;
|
|
7793
5277
|
let sentinelRef = React.useRef(null);
|
|
@@ -7826,7 +5310,7 @@ const $76d00c5a4edb230a$export$8f5bea0338ed243c = $42ceafc619f9c3ba$export$18af5
|
|
|
7826
5310
|
style: {
|
|
7827
5311
|
height: 0
|
|
7828
5312
|
},
|
|
7829
|
-
inert:
|
|
5313
|
+
inert: useHasTabbableChild.$b24d1bc31a0f941d$export$a9d04c5684123369(true)
|
|
7830
5314
|
}, /* @__PURE__ */ React.createElement($76d00c5a4edb230a$var$TableCellElementType, {
|
|
7831
5315
|
style: {
|
|
7832
5316
|
padding: 0,
|
|
@@ -8436,7 +5920,7 @@ const TableLoadMoreContent = React.forwardRef((t0, ref) => {
|
|
|
8436
5920
|
return t3;
|
|
8437
5921
|
});
|
|
8438
5922
|
TableLoadMoreContent.displayName = "LizaUI.DataTable.LoadMoreContent";
|
|
8439
|
-
const TableCollection =
|
|
5923
|
+
const TableCollection = useHasTabbableChild.$42ceafc619f9c3ba$export$fb8073518f34e6ec;
|
|
8440
5924
|
const Table2 = Object.assign(TableRoot, {
|
|
8441
5925
|
Body: TableBody,
|
|
8442
5926
|
Cell: TableCell,
|