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