@midas-ds/components 10.1.1 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccordionItem-BGWiWjxA.cjs +1 -0
- package/AccordionItem-ChHpW8EW.js +320 -0
- package/BadgeContainer-DM8TdyMT.js +37 -0
- package/BadgeContainer-I1XA3OCl.cjs +1 -0
- package/Breadcrumbs-CwDUNIqF.js +250 -0
- package/Breadcrumbs-DtjJ1UmU.cjs +1 -0
- package/Button-BoJl6JGM.cjs +1 -0
- package/Button-Csih3v23.js +38 -0
- package/Button-DjBChs7s.js +340 -0
- package/Button-htW9qIsS.cjs +1 -0
- package/Button.module-DEQtBYe5.cjs +1 -0
- package/Button.module-tti8HGxs.js +14 -0
- package/ButtonGroup-DUqW5dzM.cjs +1 -0
- package/ButtonGroup-DvVvear6.js +22 -0
- package/CHANGELOG.md +68 -0
- package/Card-0G0mj9q5.cjs +1 -0
- package/Card-yrtGzt70.js +131 -0
- package/CharacterCounter-BL_nZHya.js +22 -0
- package/CharacterCounter-CHcTDHO-.cjs +1 -0
- package/Checkbox-5HINZdGu.js +263 -0
- package/Checkbox-DqcPg5hz.cjs +1 -0
- package/CheckboxGroup-BBrSMuDY.cjs +1 -0
- package/CheckboxGroup-CLgixk2p.js +243 -0
- package/Collection-BIDsXNhi.cjs +1 -0
- package/Collection-Brgjpkne.js +576 -0
- package/ColorSchemeSwitch-BpzQ7g0b.js +106 -0
- package/ColorSchemeSwitch-C-qWuqkU.cjs +16 -0
- package/ComboBox-CVDyp2a-.js +1379 -0
- package/ComboBox-CWJUg9Xx.cjs +1 -0
- package/DateField-DeDhiYnW.cjs +1 -0
- package/DateField-DhU3q-rG.js +47 -0
- package/DateInputDivider-ADvOavHw.cjs +1 -0
- package/DateInputDivider-CF4xWsMT.js +2904 -0
- package/DateRangePicker-BsAHhy99.cjs +6 -0
- package/DateRangePicker-ziD1_k1W.js +881 -0
- package/Dialog-B8GTYbvu.cjs +1 -0
- package/Dialog-BOrYdX50.cjs +1 -0
- package/Dialog-CXNu48AC.js +208 -0
- package/Dialog-D14MbJ7o.js +1633 -0
- package/DragAndDrop-DNth776R.cjs +1 -0
- package/DragAndDrop-o3ruz_SR.js +60 -0
- package/Dropdown-CJ6My6EI.cjs +6 -0
- package/Dropdown-Df58j43I.js +84 -0
- package/FieldError-CAcjosk_.js +46 -0
- package/FieldError-CKBb2-mp.cjs +1 -0
- package/FileUpload-CxCOtyB9.cjs +2 -0
- package/FileUpload-D6qoEAjn.js +2373 -0
- package/FocusScope-5c9SVBcR.cjs +1 -0
- package/FocusScope-CxkURfoc.js +625 -0
- package/Form-BuOomA4T.cjs +1 -0
- package/Form-CXcEMuBf.js +5 -0
- package/Grid--OhtgCo6.js +27 -0
- package/Grid-DVQtOcu9.cjs +1 -0
- package/GridItem-DlbSdRmB.js +246 -0
- package/GridItem-XgHmZWXY.cjs +1 -0
- package/Group-B6EslsHZ.js +44 -0
- package/Group-CgiqQHH1.cjs +1 -0
- package/Heading-BFtiin0g.js +46 -0
- package/Heading-mHhCbGjY.cjs +1 -0
- package/Hidden-BxRZGdEW.cjs +1 -0
- package/Hidden-C9KWUR7b.js +34 -0
- package/InfoBanner-BLM-TJJ6.js +83 -0
- package/InfoBanner-C2kTIsrB.cjs +1 -0
- package/Input-BTzwcf72.js +41 -0
- package/Input-DKSAYvsw.cjs +1 -0
- package/Label-7Ybb99CE.cjs +1 -0
- package/Label-BwJrdqEE.js +70 -0
- package/Layout-1g6bMH62.cjs +16 -0
- package/Layout-Ey8flY7E.js +468 -0
- package/Link-B88l_oaE.cjs +6 -0
- package/Link-BQhauBuw.cjs +1 -0
- package/Link-DX5BbBnn.js +59 -0
- package/Link-yNO2-sqx.js +71 -0
- package/LinkButton-CBpGLETx.cjs +6 -0
- package/LinkButton-o6uS1XsR.js +69 -0
- package/ListBox-DP9M4H6R.cjs +1 -0
- package/ListBox-GnVK_Pdq.js +529 -0
- package/ListBoxButton-DPBrtXyv.cjs +1 -0
- package/ListBoxButton-D_J3jlP0.js +15 -0
- package/ListBoxSection-BGaigBnG.cjs +1 -0
- package/ListBoxSection-C0BGnpB4.js +1058 -0
- package/ListKeyboardDelegate-DNI8GQtX.js +167 -0
- package/ListKeyboardDelegate-DTg9h4v6.cjs +1 -0
- package/Logo-BIrOEINM.js +133 -0
- package/Logo-DT2_2O43.cjs +1 -0
- package/OverlayArrow-CDLXPTew.js +506 -0
- package/OverlayArrow-D75k-EMl.cjs +1 -0
- package/Popover-BGGXeD54.js +38 -0
- package/Popover-CqNWzPf-.cjs +1 -0
- package/ProgressBar-DMSg-Prr.js +53 -0
- package/ProgressBar-Jbg28j2a.cjs +1 -0
- package/RSPContexts-BW2SEIqe.js +11 -0
- package/RSPContexts-D8hmBfGm.cjs +1 -0
- package/Radio-BwqrdhQE.cjs +1 -0
- package/Radio-Cz29wPXd.js +311 -0
- package/RangeCalendar-BehUaydF.cjs +11 -0
- package/RangeCalendar-RAlAHlNL.js +1683 -0
- package/SearchField-CxMwDeUM.cjs +6 -0
- package/SearchField-IlvZ3Kh6.js +362 -0
- package/Select-2q1iSzAX.cjs +1 -0
- package/Select-BVQZtoi9.js +646 -0
- package/SelectionManager-B4ORduja.js +1032 -0
- package/SelectionManager-CwYux2h3.cjs +1 -0
- package/Separator-Cu9fYKUM.js +59 -0
- package/Separator-DECIYLtZ.cjs +1 -0
- package/Skeleton-BAwbfKBW.cjs +1 -0
- package/Skeleton-BePDRmrO.js +40 -0
- package/Spinner-D31SXm-U.js +41 -0
- package/Spinner-P35rvvsl.cjs +6 -0
- package/Table-B40CGLT-.cjs +16 -0
- package/Table-F4oYBtUM.js +2447 -0
- package/Tabs-B4oZJkZG.js +404 -0
- package/Tabs-DA2qXhzb.cjs +1 -0
- package/Tag-DPAGmcMK.cjs +1 -0
- package/Tag-Du7GvSv2.js +745 -0
- package/Text-3MNwRMpI.cjs +1 -0
- package/Text-B2K-BJKQ.cjs +1 -0
- package/Text-BoXuUVVH.js +15 -0
- package/Text-jWWg0B20.js +32 -0
- package/TextArea-C7JZ_pQd.cjs +1 -0
- package/TextArea-XeBCSyzl.js +191 -0
- package/TextField-BgNdhZi_.cjs +1 -0
- package/TextField-C-hTPukq.js +119 -0
- package/TextField.module-BcpPBWnD.js +13 -0
- package/TextField.module-Dw5Rtn9y.cjs +1 -0
- package/Toast-AbDA1BOs.cjs +1 -0
- package/Toast-Btg21Xge.js +989 -0
- package/ToggleButtonGroup-B5yz1tm2.js +210 -0
- package/ToggleButtonGroup-BFDoj0P6.cjs +1 -0
- package/Tooltip-CMLs7WMw.js +283 -0
- package/Tooltip-DeBuBKhS.cjs +1 -0
- package/VisuallyHidden-CLWHbz2n.cjs +1 -0
- package/VisuallyHidden-ZCYf65q4.js +40 -0
- package/accordion/index.cjs +1 -0
- package/accordion/index.js +5 -0
- package/arrow-right-Dg8sttFO.js +14 -0
- package/arrow-right-QJ2gXPKQ.cjs +6 -0
- package/assets/AccordionItem.css +1 -0
- package/assets/BadgeContainer.css +1 -0
- package/assets/Breadcrumbs.css +1 -0
- package/assets/Button.css +1 -0
- package/assets/ButtonGroup.css +1 -0
- package/assets/Card.css +1 -0
- package/assets/CharacterCounter.css +1 -0
- package/assets/Checkbox.css +1 -0
- package/assets/ColorSchemeSwitch.css +1 -0
- package/assets/ComboBox.css +1 -0
- package/assets/DateField.css +1 -0
- package/assets/DateInputDivider.css +1 -0
- package/assets/DateRangePicker.css +1 -0
- package/assets/Dialog.css +1 -0
- package/assets/Dropdown.css +1 -0
- package/assets/FieldError.css +1 -0
- package/assets/FileUpload.css +1 -0
- package/assets/GridItem.css +1 -0
- package/assets/Heading.css +1 -0
- package/assets/InfoBanner.css +1 -0
- package/assets/Label.css +1 -0
- package/assets/Layout.css +1 -0
- package/assets/Link.css +1 -0
- package/assets/LinkButton.css +1 -0
- package/assets/ListBoxSection.css +1 -0
- package/assets/Logo.css +1 -0
- package/assets/Popover.css +1 -0
- package/assets/ProgressBar.css +1 -0
- package/assets/Radio.css +1 -0
- package/assets/RangeCalendar.css +1 -0
- package/assets/SearchField.css +1 -0
- package/assets/Select.css +1 -0
- package/assets/Skeleton.css +1 -0
- package/assets/Spinner.css +1 -0
- package/assets/Table.css +1 -0
- package/assets/Tabs.css +1 -0
- package/assets/Tag.css +1 -0
- package/assets/Text.css +1 -0
- package/assets/TextField.css +1 -0
- package/assets/Toast.css +1 -0
- package/assets/ToggleButtonGroup.css +1 -0
- package/assets/Tooltip.css +1 -0
- package/badge/index.cjs +1 -0
- package/badge/index.js +5 -0
- package/breadcrumbs/index.cjs +1 -0
- package/breadcrumbs/index.js +4 -0
- package/button/index.cjs +1 -0
- package/button/index.js +6 -0
- package/calendar/CalendarHeader.d.ts +2 -1
- package/calendar/index.cjs +1 -0
- package/calendar/index.js +5 -0
- package/card/index.cjs +1 -0
- package/card/index.js +10 -0
- package/character-counter/index.cjs +1 -0
- package/character-counter/index.js +4 -0
- package/check-CLF6Yxza.js +11 -0
- package/check-D_KoootC.cjs +6 -0
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/CheckboxGroup.d.ts +8 -8
- package/checkbox/CheckboxGroupFieldError.d.ts +8 -0
- package/checkbox/CheckboxGroupItem.d.ts +3 -0
- package/checkbox/CheckboxInner.d.ts +2 -0
- package/checkbox/SingleCheckbox.d.ts +3 -0
- package/checkbox/context.d.ts +3 -0
- package/checkbox/index.cjs +1 -0
- package/checkbox/index.d.ts +2 -1
- package/checkbox/index.js +6 -0
- package/checkbox/intl/translations.json.d.ts +35 -0
- package/checkbox/types.d.ts +14 -0
- package/checkbox/useSelectAll.d.ts +7 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/chevron-down-jl83cllc.cjs +6 -0
- package/circle-check-B9HYcH7Z.js +26 -0
- package/circle-check-BGo8gML8.cjs +11 -0
- package/clsx-C11secjj.cjs +1 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/color-scheme-switch/index.cjs +1 -0
- package/color-scheme-switch/index.js +4 -0
- package/combobox/ComboBox.d.ts +3 -1
- package/combobox/index.cjs +1 -0
- package/combobox/index.js +7 -0
- package/common/types.d.ts +2 -0
- package/context-C81gPYvC.js +80 -0
- package/context-DjwhtgxQ.cjs +1 -0
- package/createLucideIcon-Cg_wkoIA.cjs +21 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-field/DateField.d.ts +3 -0
- package/date-field/index.cjs +1 -0
- package/date-field/index.js +8 -0
- package/date-picker/DatePicker.d.ts +3 -0
- package/date-picker/DateRangePicker.d.ts +3 -0
- package/date-picker/index.cjs +1 -0
- package/date-picker/index.js +5 -0
- package/dropdown/index.cjs +1 -0
- package/dropdown/index.js +5 -0
- package/field-error/FieldError.d.ts +4 -1
- package/field-error/index.cjs +1 -0
- package/field-error/index.js +4 -0
- package/file-upload/FileUpload.d.ts +3 -0
- package/file-upload/index.cjs +1 -0
- package/file-upload/index.js +4 -0
- package/filterDOMProps-BS2lrgFA.cjs +1 -0
- package/filterDOMProps-D6KHYVBX.js +24 -0
- package/getScrollParent-BhFcYrwL.js +9 -0
- package/getScrollParent-DDJu9WHU.cjs +1 -0
- package/grid/Grid.d.ts +15 -4
- package/grid/GridItem.d.ts +31 -2
- package/grid/index.cjs +1 -0
- package/grid/index.d.ts +2 -2
- package/grid/index.js +8 -0
- package/heading/index.cjs +1 -0
- package/heading/index.js +4 -0
- package/index-CGRFP4CC.js +120 -0
- package/index-Dsz3aiWt.cjs +17 -0
- package/index.cjs +1 -169
- package/index.d.ts +1 -1
- package/index.js +129 -29979
- package/inertValue-B3AFhVG4.cjs +1 -0
- package/inertValue-B7loUihk.js +8 -0
- package/info-BZwphdye.js +15 -0
- package/info-CIEIENo6.cjs +6 -0
- package/info-banner/index.cjs +1 -0
- package/info-banner/index.js +4 -0
- package/label/InfoPopover.d.ts +9 -0
- package/label/LabelWrapper.d.ts +11 -0
- package/label/index.cjs +1 -0
- package/label/index.d.ts +1 -0
- package/label/index.js +4 -0
- package/layout/index.cjs +1 -0
- package/layout/index.js +8 -0
- package/link/index.cjs +1 -0
- package/link/index.js +6 -0
- package/link-button/index.cjs +1 -0
- package/link-button/index.js +6 -0
- package/list-box/index.cjs +1 -0
- package/list-box/index.js +9 -0
- package/logo/index.cjs +1 -0
- package/logo/index.js +4 -0
- package/modal/index.cjs +1 -0
- package/modal/index.js +6 -0
- package/number-BE8InLgI.js +6 -0
- package/number-E0x3H9cL.cjs +1 -0
- package/package.json +4 -4
- package/popover/Popover.d.ts +7 -0
- package/popover/index.cjs +1 -0
- package/popover/index.d.ts +1 -0
- package/popover/index.js +4 -0
- package/progress-bar/index.cjs +1 -0
- package/progress-bar/index.js +4 -0
- package/radio/Radio.d.ts +3 -0
- package/radio/index.cjs +1 -0
- package/radio/index.js +5 -0
- package/scrollIntoView-C8doLzDd.cjs +1 -0
- package/scrollIntoView-Hwb_aaNf.js +87 -0
- package/search-field/index.cjs +1 -0
- package/search-field/index.js +4 -0
- package/select/index.cjs +1 -0
- package/select/index.js +4 -0
- package/skeleton/Skeleton.d.ts +5 -0
- package/skeleton/index.cjs +1 -0
- package/skeleton/index.js +4 -0
- package/spinner/index.cjs +1 -0
- package/spinner/index.js +4 -0
- package/square-arrow-out-up-right-BkyqV2PN.js +15 -0
- package/square-arrow-out-up-right-V4Gd08uI.cjs +6 -0
- package/table/Table.d.ts +7 -1
- package/table/index.cjs +1 -0
- package/table/index.js +9 -0
- package/tabs/index.cjs +1 -0
- package/tabs/index.js +4 -0
- package/tag/index.cjs +1 -0
- package/tag/index.js +5 -0
- package/text/index.cjs +1 -0
- package/text/index.js +4 -0
- package/textfield/TextFieldBase.d.ts +2 -0
- package/textfield/index.cjs +1 -0
- package/textfield/index.js +7 -0
- package/theme/index.cjs +1 -0
- package/theme/index.d.ts +4 -0
- package/{theme.js → theme/index.js} +2 -2
- package/theme/tokens.d.ts +10 -0
- package/toast/index.cjs +1 -0
- package/toast/index.js +9 -0
- package/toggle-button/index.cjs +1 -0
- package/toggle-button/index.js +5 -0
- package/tokens-p6pg1Cea.cjs +1 -0
- package/{tokens-C0U7hdoO.js → tokens-xp-7KMK7.js} +18 -8
- package/tooltip/index.cjs +1 -0
- package/tooltip/index.js +5 -0
- package/triangle-alert-DJW8U7jL.cjs +6 -0
- package/triangle-alert-wxyxspAl.js +21 -0
- package/useButton-B8dB9sot.js +47 -0
- package/useButton-cpNi-fY4.cjs +1 -0
- package/useControlledState-D0L6S_5r.cjs +1 -0
- package/useControlledState-u436Wbp1.js +30 -0
- package/useDateFormatter-CnxoJ4jF.cjs +1 -0
- package/useDateFormatter-EHm4auIg.js +1571 -0
- package/useEvent-DxBxMX2V.cjs +1 -0
- package/useEvent-IsD2Awnh.js +21 -0
- package/useField-CXKYU74k.cjs +1 -0
- package/useField-DvpGZkw_.js +35 -0
- package/useFilter-BTgDWHVx.cjs +1 -0
- package/useFilter-CUq74PQ2.js +35 -0
- package/useFocusRing-CbImDrwF.cjs +1 -0
- package/useFocusRing-XnR3cZjO.js +82 -0
- package/useFocusable-C8uh8K4g.js +125 -0
- package/useFocusable-NUVSFcRC.cjs +1 -0
- package/useFormValidation-BIGzfO9h.js +215 -0
- package/useFormValidation-ClximP89.cjs +1 -0
- package/useHasTabbableChild-C-1mZUQe.js +34 -0
- package/useHasTabbableChild-DCBTulUQ.cjs +1 -0
- package/useHighlightSelectionDescription-CnBDT86u.js +567 -0
- package/useHighlightSelectionDescription-CzYucm61.cjs +1 -0
- package/useHover-DjIHtjGN.js +490 -0
- package/useHover-_mv5J4_q.cjs +1 -0
- package/useLabels-BDwkBYbE.js +17 -0
- package/useLabels-BLOfc6Y-.cjs +1 -0
- package/useListState-Bx8u4IFG.cjs +1 -0
- package/useListState-CrZFZffI.js +132 -0
- package/useLocalizedStringFormatter-BKoxGZf1.js +96 -0
- package/useLocalizedStringFormatter-BsxLt89S.cjs +1 -0
- package/useLocalizedStringFormatter-D3JQyjb4.js +21 -0
- package/useLocalizedStringFormatter-ioacM-Yt.cjs +1 -0
- package/useObserveElement-BdI4zgd7.js +27 -0
- package/useObserveElement-MhzEsCkX.cjs +1 -0
- package/usePress-0AjDbW9R.cjs +7 -0
- package/usePress-CNjmDzap.js +542 -0
- package/useSingleSelectListState-0AGHxvy3.js +34 -0
- package/useSingleSelectListState-Cl3KV5E1.cjs +1 -0
- package/useTextField--czJtyNd.cjs +1 -0
- package/useTextField-Cw-33OP_.js +86 -0
- package/useToggleState-Bz5rAf4C.js +18 -0
- package/useToggleState-DoIkSQdj.cjs +1 -0
- package/useUpdateEffect-C5YQs_1w.cjs +1 -0
- package/useUpdateEffect-CCDx8D4X.js +13 -0
- package/utils-BNtZbAib.cjs +1 -0
- package/utils-DIMfEPAt.js +308 -0
- package/x-H8Zrx8-x.cjs +6 -0
- package/x-JK7i-TQC.js +14 -0
- package/flex/Flex.d.ts +0 -17
- package/flex/FlexItem.d.ts +0 -15
- package/flex/index.d.ts +0 -2
- package/index.css +0 -1
- package/theme.cjs +0 -1
- package/tokens-COoF1t17.cjs +0 -1
- /package/{global.css → assets/global.css} +0 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { useRef as C, useCallback as L, useEffect as y, useState as U, useMemo as Z } from "react";
|
|
2
|
+
import { $ as ee, f as te, k as ne } from "./utils-DIMfEPAt.js";
|
|
3
|
+
const E = (e) => {
|
|
4
|
+
var t;
|
|
5
|
+
return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
6
|
+
}, $ = (e) => e && "window" in e && e.window === e ? e : E(e).defaultView || window;
|
|
7
|
+
function re(e) {
|
|
8
|
+
return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
|
|
9
|
+
}
|
|
10
|
+
function oe(e) {
|
|
11
|
+
return re(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
|
|
12
|
+
}
|
|
13
|
+
let ae = !1, ie = !1;
|
|
14
|
+
function Oe() {
|
|
15
|
+
return ae;
|
|
16
|
+
}
|
|
17
|
+
function I() {
|
|
18
|
+
return ie;
|
|
19
|
+
}
|
|
20
|
+
function se(e, t) {
|
|
21
|
+
if (!I()) return t && e ? e.contains(t) : !1;
|
|
22
|
+
if (!e || !t) return !1;
|
|
23
|
+
let n = t;
|
|
24
|
+
for (; n !== null; ) {
|
|
25
|
+
if (n === e) return !0;
|
|
26
|
+
n.tagName === "SLOT" && n.assignedSlot ? n = n.assignedSlot.parentNode : oe(n) ? n = n.host : n = n.parentNode;
|
|
27
|
+
}
|
|
28
|
+
return !1;
|
|
29
|
+
}
|
|
30
|
+
const R = (e = document) => {
|
|
31
|
+
var t;
|
|
32
|
+
if (!I()) return e.activeElement;
|
|
33
|
+
let n = e.activeElement;
|
|
34
|
+
for (; n && "shadowRoot" in n && (!((t = n.shadowRoot) === null || t === void 0) && t.activeElement); ) n = n.shadowRoot.activeElement;
|
|
35
|
+
return n;
|
|
36
|
+
};
|
|
37
|
+
function ue(e) {
|
|
38
|
+
return I() && e.target.shadowRoot && e.composedPath ? e.composedPath()[0] : e.target;
|
|
39
|
+
}
|
|
40
|
+
function V(e) {
|
|
41
|
+
if (de()) e.focus({
|
|
42
|
+
preventScroll: !0
|
|
43
|
+
});
|
|
44
|
+
else {
|
|
45
|
+
let t = ce(e);
|
|
46
|
+
e.focus(), fe(t);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
let H = null;
|
|
50
|
+
function de() {
|
|
51
|
+
if (H == null) {
|
|
52
|
+
H = !1;
|
|
53
|
+
try {
|
|
54
|
+
document.createElement("div").focus({
|
|
55
|
+
get preventScroll() {
|
|
56
|
+
return H = !0, !0;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return H;
|
|
63
|
+
}
|
|
64
|
+
function ce(e) {
|
|
65
|
+
let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
|
|
66
|
+
for (; t instanceof HTMLElement && t !== r; )
|
|
67
|
+
(t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
|
|
68
|
+
element: t,
|
|
69
|
+
scrollTop: t.scrollTop,
|
|
70
|
+
scrollLeft: t.scrollLeft
|
|
71
|
+
}), t = t.parentNode;
|
|
72
|
+
return r instanceof HTMLElement && n.push({
|
|
73
|
+
element: r,
|
|
74
|
+
scrollTop: r.scrollTop,
|
|
75
|
+
scrollLeft: r.scrollLeft
|
|
76
|
+
}), n;
|
|
77
|
+
}
|
|
78
|
+
function fe(e) {
|
|
79
|
+
for (let { element: t, scrollTop: n, scrollLeft: r } of e)
|
|
80
|
+
t.scrollTop = n, t.scrollLeft = r;
|
|
81
|
+
}
|
|
82
|
+
function D(e) {
|
|
83
|
+
var t;
|
|
84
|
+
return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((n) => e.test(n.brand))) || e.test(window.navigator.userAgent);
|
|
85
|
+
}
|
|
86
|
+
function B(e) {
|
|
87
|
+
var t;
|
|
88
|
+
return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
|
|
89
|
+
}
|
|
90
|
+
function v(e) {
|
|
91
|
+
if (process.env.NODE_ENV === "test") return e;
|
|
92
|
+
let t = null;
|
|
93
|
+
return () => (t == null && (t = e()), t);
|
|
94
|
+
}
|
|
95
|
+
const G = v(function() {
|
|
96
|
+
return B(/^Mac/i);
|
|
97
|
+
}), le = v(function() {
|
|
98
|
+
return B(/^iPhone/i);
|
|
99
|
+
}), be = v(function() {
|
|
100
|
+
return B(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
101
|
+
G() && navigator.maxTouchPoints > 1;
|
|
102
|
+
}), ve = v(function() {
|
|
103
|
+
return le() || be();
|
|
104
|
+
}), Ne = v(function() {
|
|
105
|
+
return G() || ve();
|
|
106
|
+
}), _e = v(function() {
|
|
107
|
+
return D(/AppleWebKit/i) && !$e();
|
|
108
|
+
}), $e = v(function() {
|
|
109
|
+
return D(/Chrome/i);
|
|
110
|
+
}), q = v(function() {
|
|
111
|
+
return D(/Android/i);
|
|
112
|
+
}), Ae = v(function() {
|
|
113
|
+
return D(/Firefox/i);
|
|
114
|
+
});
|
|
115
|
+
function pe() {
|
|
116
|
+
let e = C(/* @__PURE__ */ new Map()), t = L((o, u, i, a) => {
|
|
117
|
+
let s = a != null && a.once ? (...l) => {
|
|
118
|
+
e.current.delete(i), i(...l);
|
|
119
|
+
} : i;
|
|
120
|
+
e.current.set(i, {
|
|
121
|
+
type: u,
|
|
122
|
+
eventTarget: o,
|
|
123
|
+
fn: s,
|
|
124
|
+
options: a
|
|
125
|
+
}), o.addEventListener(u, s, a);
|
|
126
|
+
}, []), n = L((o, u, i, a) => {
|
|
127
|
+
var s;
|
|
128
|
+
let l = ((s = e.current.get(i)) === null || s === void 0 ? void 0 : s.fn) || i;
|
|
129
|
+
o.removeEventListener(u, l, a), e.current.delete(i);
|
|
130
|
+
}, []), r = L(() => {
|
|
131
|
+
e.current.forEach((o, u) => {
|
|
132
|
+
n(o.eventTarget, o.type, u, o.options);
|
|
133
|
+
});
|
|
134
|
+
}, [
|
|
135
|
+
n
|
|
136
|
+
]);
|
|
137
|
+
return y(() => r, [
|
|
138
|
+
r
|
|
139
|
+
]), {
|
|
140
|
+
addGlobalListener: t,
|
|
141
|
+
removeGlobalListener: n,
|
|
142
|
+
removeAllGlobalListeners: r
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function Ee(e) {
|
|
146
|
+
return e.mozInputSource === 0 && e.isTrusted ? !0 : q() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
147
|
+
}
|
|
148
|
+
function ke(e) {
|
|
149
|
+
return !q() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
|
|
150
|
+
}
|
|
151
|
+
const j = [
|
|
152
|
+
"input:not([disabled]):not([type=hidden])",
|
|
153
|
+
"select:not([disabled])",
|
|
154
|
+
"textarea:not([disabled])",
|
|
155
|
+
"button:not([disabled])",
|
|
156
|
+
"a[href]",
|
|
157
|
+
"area[href]",
|
|
158
|
+
"summary",
|
|
159
|
+
"iframe",
|
|
160
|
+
"object",
|
|
161
|
+
"embed",
|
|
162
|
+
"audio[controls]",
|
|
163
|
+
"video[controls]",
|
|
164
|
+
'[contenteditable]:not([contenteditable^="false"])'
|
|
165
|
+
], me = j.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
166
|
+
j.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
167
|
+
const ge = j.join(':not([hidden]):not([tabindex="-1"]),');
|
|
168
|
+
function Le(e) {
|
|
169
|
+
return e.matches(me);
|
|
170
|
+
}
|
|
171
|
+
function Ce(e) {
|
|
172
|
+
return e.matches(ge);
|
|
173
|
+
}
|
|
174
|
+
function he(e) {
|
|
175
|
+
let t = e;
|
|
176
|
+
return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {
|
|
177
|
+
}, t;
|
|
178
|
+
}
|
|
179
|
+
function Ie(e, t) {
|
|
180
|
+
Object.defineProperty(e, "target", {
|
|
181
|
+
value: t
|
|
182
|
+
}), Object.defineProperty(e, "currentTarget", {
|
|
183
|
+
value: t
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
function we(e) {
|
|
187
|
+
let t = C({
|
|
188
|
+
isFocused: !1,
|
|
189
|
+
observer: null
|
|
190
|
+
});
|
|
191
|
+
ee(() => {
|
|
192
|
+
const r = t.current;
|
|
193
|
+
return () => {
|
|
194
|
+
r.observer && (r.observer.disconnect(), r.observer = null);
|
|
195
|
+
};
|
|
196
|
+
}, []);
|
|
197
|
+
let n = te((r) => {
|
|
198
|
+
e == null || e(r);
|
|
199
|
+
});
|
|
200
|
+
return L((r) => {
|
|
201
|
+
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
|
202
|
+
t.current.isFocused = !0;
|
|
203
|
+
let o = r.target, u = (i) => {
|
|
204
|
+
if (t.current.isFocused = !1, o.disabled) {
|
|
205
|
+
let a = he(i);
|
|
206
|
+
n(a);
|
|
207
|
+
}
|
|
208
|
+
t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
209
|
+
};
|
|
210
|
+
o.addEventListener("focusout", u, {
|
|
211
|
+
once: !0
|
|
212
|
+
}), t.current.observer = new MutationObserver(() => {
|
|
213
|
+
if (t.current.isFocused && o.disabled) {
|
|
214
|
+
var i;
|
|
215
|
+
(i = t.current.observer) === null || i === void 0 || i.disconnect();
|
|
216
|
+
let a = o === document.activeElement ? null : document.activeElement;
|
|
217
|
+
o.dispatchEvent(new FocusEvent("blur", {
|
|
218
|
+
relatedTarget: a
|
|
219
|
+
})), o.dispatchEvent(new FocusEvent("focusout", {
|
|
220
|
+
bubbles: !0,
|
|
221
|
+
relatedTarget: a
|
|
222
|
+
}));
|
|
223
|
+
}
|
|
224
|
+
}), t.current.observer.observe(o, {
|
|
225
|
+
attributes: !0,
|
|
226
|
+
attributeFilter: [
|
|
227
|
+
"disabled"
|
|
228
|
+
]
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}, [
|
|
232
|
+
n
|
|
233
|
+
]);
|
|
234
|
+
}
|
|
235
|
+
let M = !1;
|
|
236
|
+
function Be(e) {
|
|
237
|
+
for (; e && !Le(e); ) e = e.parentElement;
|
|
238
|
+
let t = $(e), n = t.document.activeElement;
|
|
239
|
+
if (!n || n === e) return;
|
|
240
|
+
M = !0;
|
|
241
|
+
let r = !1, o = (c) => {
|
|
242
|
+
(c.target === n || r) && c.stopImmediatePropagation();
|
|
243
|
+
}, u = (c) => {
|
|
244
|
+
(c.target === n || r) && (c.stopImmediatePropagation(), !e && !r && (r = !0, V(n), s()));
|
|
245
|
+
}, i = (c) => {
|
|
246
|
+
(c.target === e || r) && c.stopImmediatePropagation();
|
|
247
|
+
}, a = (c) => {
|
|
248
|
+
(c.target === e || r) && (c.stopImmediatePropagation(), r || (r = !0, V(n), s()));
|
|
249
|
+
};
|
|
250
|
+
t.addEventListener("blur", o, !0), t.addEventListener("focusout", u, !0), t.addEventListener("focusin", a, !0), t.addEventListener("focus", i, !0);
|
|
251
|
+
let s = () => {
|
|
252
|
+
cancelAnimationFrame(l), t.removeEventListener("blur", o, !0), t.removeEventListener("focusout", u, !0), t.removeEventListener("focusin", a, !0), t.removeEventListener("focus", i, !0), M = !1, r = !1;
|
|
253
|
+
}, l = requestAnimationFrame(s);
|
|
254
|
+
return s;
|
|
255
|
+
}
|
|
256
|
+
let b = null, T = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map(), p = !1, A = !1;
|
|
257
|
+
const ye = {
|
|
258
|
+
Tab: !0,
|
|
259
|
+
Escape: !0
|
|
260
|
+
};
|
|
261
|
+
function O(e, t) {
|
|
262
|
+
for (let n of T) n(e, t);
|
|
263
|
+
}
|
|
264
|
+
function Te(e) {
|
|
265
|
+
return !(e.metaKey || !G() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
266
|
+
}
|
|
267
|
+
function P(e) {
|
|
268
|
+
p = !0, Te(e) && (b = "keyboard", O("keyboard", e));
|
|
269
|
+
}
|
|
270
|
+
function f(e) {
|
|
271
|
+
b = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (p = !0, O("pointer", e));
|
|
272
|
+
}
|
|
273
|
+
function z(e) {
|
|
274
|
+
Ee(e) && (p = !0, b = "virtual");
|
|
275
|
+
}
|
|
276
|
+
function Y(e) {
|
|
277
|
+
e.target === window || e.target === document || M || !e.isTrusted || (!p && !A && (b = "virtual", O("virtual", e)), p = !1, A = !1);
|
|
278
|
+
}
|
|
279
|
+
function J() {
|
|
280
|
+
M || (p = !1, A = !0);
|
|
281
|
+
}
|
|
282
|
+
function S(e) {
|
|
283
|
+
if (typeof window > "u" || typeof document > "u" || w.get($(e))) return;
|
|
284
|
+
const t = $(e), n = E(e);
|
|
285
|
+
let r = t.HTMLElement.prototype.focus;
|
|
286
|
+
t.HTMLElement.prototype.focus = function() {
|
|
287
|
+
p = !0, r.apply(this, arguments);
|
|
288
|
+
}, n.addEventListener("keydown", P, !0), n.addEventListener("keyup", P, !0), n.addEventListener("click", z, !0), t.addEventListener("focus", Y, !0), t.addEventListener("blur", J, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", f, !0), n.addEventListener("pointermove", f, !0), n.addEventListener("pointerup", f, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", f, !0), n.addEventListener("mousemove", f, !0), n.addEventListener("mouseup", f, !0)), t.addEventListener("beforeunload", () => {
|
|
289
|
+
Q(e);
|
|
290
|
+
}, {
|
|
291
|
+
once: !0
|
|
292
|
+
}), w.set(t, {
|
|
293
|
+
focus: r
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
const Q = (e, t) => {
|
|
297
|
+
const n = $(e), r = E(e);
|
|
298
|
+
t && r.removeEventListener("DOMContentLoaded", t), w.has(n) && (n.HTMLElement.prototype.focus = w.get(n).focus, r.removeEventListener("keydown", P, !0), r.removeEventListener("keyup", P, !0), r.removeEventListener("click", z, !0), n.removeEventListener("focus", Y, !0), n.removeEventListener("blur", J, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", f, !0), r.removeEventListener("pointermove", f, !0), r.removeEventListener("pointerup", f, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", f, !0), r.removeEventListener("mousemove", f, !0), r.removeEventListener("mouseup", f, !0)), w.delete(n));
|
|
299
|
+
};
|
|
300
|
+
function xe(e) {
|
|
301
|
+
const t = E(e);
|
|
302
|
+
let n;
|
|
303
|
+
return t.readyState !== "loading" ? S(e) : (n = () => {
|
|
304
|
+
S(e);
|
|
305
|
+
}, t.addEventListener("DOMContentLoaded", n)), () => Q(e, n);
|
|
306
|
+
}
|
|
307
|
+
typeof document < "u" && xe();
|
|
308
|
+
function He() {
|
|
309
|
+
return b !== "pointer";
|
|
310
|
+
}
|
|
311
|
+
function Ge() {
|
|
312
|
+
return b;
|
|
313
|
+
}
|
|
314
|
+
function je(e) {
|
|
315
|
+
b = e, O(e, null);
|
|
316
|
+
}
|
|
317
|
+
function Ke() {
|
|
318
|
+
S();
|
|
319
|
+
let [e, t] = U(b);
|
|
320
|
+
return y(() => {
|
|
321
|
+
let n = () => {
|
|
322
|
+
t(b);
|
|
323
|
+
};
|
|
324
|
+
return T.add(n), () => {
|
|
325
|
+
T.delete(n);
|
|
326
|
+
};
|
|
327
|
+
}, []), ne() ? null : e;
|
|
328
|
+
}
|
|
329
|
+
const Me = /* @__PURE__ */ new Set([
|
|
330
|
+
"checkbox",
|
|
331
|
+
"radio",
|
|
332
|
+
"range",
|
|
333
|
+
"color",
|
|
334
|
+
"file",
|
|
335
|
+
"image",
|
|
336
|
+
"button",
|
|
337
|
+
"submit",
|
|
338
|
+
"reset"
|
|
339
|
+
]);
|
|
340
|
+
function Pe(e, t, n) {
|
|
341
|
+
let r = E(n == null ? void 0 : n.target);
|
|
342
|
+
const o = typeof window < "u" ? $(n == null ? void 0 : n.target).HTMLInputElement : HTMLInputElement, u = typeof window < "u" ? $(n == null ? void 0 : n.target).HTMLTextAreaElement : HTMLTextAreaElement, i = typeof window < "u" ? $(n == null ? void 0 : n.target).HTMLElement : HTMLElement, a = typeof window < "u" ? $(n == null ? void 0 : n.target).KeyboardEvent : KeyboardEvent;
|
|
343
|
+
return e = e || r.activeElement instanceof o && !Me.has(r.activeElement.type) || r.activeElement instanceof u || r.activeElement instanceof i && r.activeElement.isContentEditable, !(e && t === "keyboard" && n instanceof a && !ye[n.key]);
|
|
344
|
+
}
|
|
345
|
+
function Re(e, t, n) {
|
|
346
|
+
S(), y(() => {
|
|
347
|
+
let r = (o, u) => {
|
|
348
|
+
Pe(!!(n != null && n.isTextInput), o, u) && e(He());
|
|
349
|
+
};
|
|
350
|
+
return T.add(r), () => {
|
|
351
|
+
T.delete(r);
|
|
352
|
+
};
|
|
353
|
+
}, t);
|
|
354
|
+
}
|
|
355
|
+
function Ve(e) {
|
|
356
|
+
let { isDisabled: t, onFocus: n, onBlur: r, onFocusChange: o } = e;
|
|
357
|
+
const u = L((s) => {
|
|
358
|
+
if (s.target === s.currentTarget)
|
|
359
|
+
return r && r(s), o && o(!1), !0;
|
|
360
|
+
}, [
|
|
361
|
+
r,
|
|
362
|
+
o
|
|
363
|
+
]), i = we(u), a = L((s) => {
|
|
364
|
+
const l = E(s.target), c = l ? R(l) : R();
|
|
365
|
+
s.target === s.currentTarget && c === ue(s.nativeEvent) && (n && n(s), o && o(!0), i(s));
|
|
366
|
+
}, [
|
|
367
|
+
o,
|
|
368
|
+
n,
|
|
369
|
+
i
|
|
370
|
+
]);
|
|
371
|
+
return {
|
|
372
|
+
focusProps: {
|
|
373
|
+
onFocus: !t && (n || o || r) ? a : void 0,
|
|
374
|
+
onBlur: !t && (r || o) ? u : void 0
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
let F = !1, _ = 0;
|
|
379
|
+
function k() {
|
|
380
|
+
F = !0, setTimeout(() => {
|
|
381
|
+
F = !1;
|
|
382
|
+
}, 50);
|
|
383
|
+
}
|
|
384
|
+
function W(e) {
|
|
385
|
+
e.pointerType === "touch" && k();
|
|
386
|
+
}
|
|
387
|
+
function Se() {
|
|
388
|
+
if (!(typeof document > "u"))
|
|
389
|
+
return typeof PointerEvent < "u" ? document.addEventListener("pointerup", W) : process.env.NODE_ENV === "test" && document.addEventListener("touchend", k), _++, () => {
|
|
390
|
+
_--, !(_ > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", W) : process.env.NODE_ENV === "test" && document.removeEventListener("touchend", k));
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function We(e) {
|
|
394
|
+
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: o } = e, [u, i] = U(!1), a = C({
|
|
395
|
+
isHovered: !1,
|
|
396
|
+
ignoreEmulatedMouseEvents: !1,
|
|
397
|
+
pointerType: "",
|
|
398
|
+
target: null
|
|
399
|
+
}).current;
|
|
400
|
+
y(Se, []);
|
|
401
|
+
let { addGlobalListener: s, removeAllGlobalListeners: l } = pe(), { hoverProps: c, triggerHoverEnd: X } = Z(() => {
|
|
402
|
+
let K = (d, g) => {
|
|
403
|
+
if (a.pointerType = g, o || g === "touch" || a.isHovered || !d.currentTarget.contains(d.target)) return;
|
|
404
|
+
a.isHovered = !0;
|
|
405
|
+
let h = d.currentTarget;
|
|
406
|
+
a.target = h, s(E(d.target), "pointerover", (N) => {
|
|
407
|
+
a.isHovered && a.target && !se(a.target, N.target) && x(N, N.pointerType);
|
|
408
|
+
}, {
|
|
409
|
+
capture: !0
|
|
410
|
+
}), t && t({
|
|
411
|
+
type: "hoverstart",
|
|
412
|
+
target: h,
|
|
413
|
+
pointerType: g
|
|
414
|
+
}), n && n(!0), i(!0);
|
|
415
|
+
}, x = (d, g) => {
|
|
416
|
+
let h = a.target;
|
|
417
|
+
a.pointerType = "", a.target = null, !(g === "touch" || !a.isHovered || !h) && (a.isHovered = !1, l(), r && r({
|
|
418
|
+
type: "hoverend",
|
|
419
|
+
target: h,
|
|
420
|
+
pointerType: g
|
|
421
|
+
}), n && n(!1), i(!1));
|
|
422
|
+
}, m = {};
|
|
423
|
+
return typeof PointerEvent < "u" ? (m.onPointerEnter = (d) => {
|
|
424
|
+
F && d.pointerType === "mouse" || K(d, d.pointerType);
|
|
425
|
+
}, m.onPointerLeave = (d) => {
|
|
426
|
+
!o && d.currentTarget.contains(d.target) && x(d, d.pointerType);
|
|
427
|
+
}) : process.env.NODE_ENV === "test" && (m.onTouchStart = () => {
|
|
428
|
+
a.ignoreEmulatedMouseEvents = !0;
|
|
429
|
+
}, m.onMouseEnter = (d) => {
|
|
430
|
+
!a.ignoreEmulatedMouseEvents && !F && K(d, "mouse"), a.ignoreEmulatedMouseEvents = !1;
|
|
431
|
+
}, m.onMouseLeave = (d) => {
|
|
432
|
+
!o && d.currentTarget.contains(d.target) && x(d, "mouse");
|
|
433
|
+
}), {
|
|
434
|
+
hoverProps: m,
|
|
435
|
+
triggerHoverEnd: x
|
|
436
|
+
};
|
|
437
|
+
}, [
|
|
438
|
+
t,
|
|
439
|
+
n,
|
|
440
|
+
r,
|
|
441
|
+
o,
|
|
442
|
+
a,
|
|
443
|
+
s,
|
|
444
|
+
l
|
|
445
|
+
]);
|
|
446
|
+
return y(() => {
|
|
447
|
+
o && X({
|
|
448
|
+
currentTarget: a.target
|
|
449
|
+
}, a.pointerType);
|
|
450
|
+
}, [
|
|
451
|
+
o
|
|
452
|
+
]), {
|
|
453
|
+
hoverProps: c,
|
|
454
|
+
isHovered: u
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
export {
|
|
458
|
+
We as $,
|
|
459
|
+
Be as A,
|
|
460
|
+
Ee as B,
|
|
461
|
+
Ne as C,
|
|
462
|
+
Ke as D,
|
|
463
|
+
Oe as E,
|
|
464
|
+
$ as a,
|
|
465
|
+
pe as b,
|
|
466
|
+
we as c,
|
|
467
|
+
E as d,
|
|
468
|
+
R as e,
|
|
469
|
+
ue as f,
|
|
470
|
+
se as g,
|
|
471
|
+
Ie as h,
|
|
472
|
+
he as i,
|
|
473
|
+
He as j,
|
|
474
|
+
Re as k,
|
|
475
|
+
Ve as l,
|
|
476
|
+
I as m,
|
|
477
|
+
q as n,
|
|
478
|
+
$e as o,
|
|
479
|
+
Ce as p,
|
|
480
|
+
Le as q,
|
|
481
|
+
Ge as r,
|
|
482
|
+
je as s,
|
|
483
|
+
G as t,
|
|
484
|
+
_e as u,
|
|
485
|
+
V as v,
|
|
486
|
+
Ae as w,
|
|
487
|
+
be as x,
|
|
488
|
+
ve as y,
|
|
489
|
+
ke as z
|
|
490
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("react"),k=require("./utils-BNtZbAib.cjs"),E=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},b=e=>e&&"window"in e&&e.window===e?e:E(e).defaultView||window;function ie(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function fe(e){return ie(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let ue=!1,se=!1;function le(){return ue}function F(){return se}function U(e,t){if(!F())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:fe(n)?n=n.host:n=n.parentNode}return!1}const A=(e=document)=>{var t;if(!F())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function q(e){return F()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function I(e){if($e())e.focus({preventScroll:!0});else{let t=be(e);e.focus(),ve(t)}}let T=null;function $e(){if(T==null){T=!1;try{document.createElement("div").focus({get preventScroll(){return T=!0,!0}})}catch{}}return T}function be(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function ve(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function O(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function R(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function p(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const C=p(function(){return R(/^Mac/i)}),pe=p(function(){return R(/^iPhone/i)}),z=p(function(){return R(/^iPad/i)||C()&&navigator.maxTouchPoints>1}),Y=p(function(){return pe()||z()}),Ee=p(function(){return C()||Y()}),me=p(function(){return O(/AppleWebKit/i)&&!J()}),J=p(function(){return O(/Chrome/i)}),j=p(function(){return O(/Android/i)}),ge=p(function(){return O(/Firefox/i)});function Q(){let e=u.useRef(new Map),t=u.useCallback((o,i,c,a)=>{let d=a!=null&&a.once?(...$)=>{e.current.delete(c),c(...$)}:c;e.current.set(c,{type:i,eventTarget:o,fn:d,options:a}),o.addEventListener(i,d,a)},[]),n=u.useCallback((o,i,c,a)=>{var d;let $=((d=e.current.get(c))===null||d===void 0?void 0:d.fn)||c;o.removeEventListener(i,$,a),e.current.delete(c)},[]),r=u.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return u.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function X(e){return e.mozInputSource===0&&e.isTrusted?!0:j()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Le(e){return!j()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const K=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],xe=K.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";K.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const he=K.join(':not([hidden]):not([tabindex="-1"]),');function Z(e){return e.matches(xe)}function we(e){return e.matches(he)}function ee(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function ye(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function te(e){let t=u.useRef({isFocused:!1,observer:null});k.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=k.$8ae05eaa5c114e9c$export$7f54fc3180508a52(r=>{e==null||e(r)});return u.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=c=>{if(t.current.isFocused=!1,o.disabled){let a=ee(c);n(a)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var c;(c=t.current.observer)===null||c===void 0||c.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let H=!1;function Te(e){for(;e&&!Z(e);)e=e.parentElement;let t=b(e),n=t.document.activeElement;if(!n||n===e)return;H=!0;let r=!1,o=s=>{(s.target===n||r)&&s.stopImmediatePropagation()},i=s=>{(s.target===n||r)&&(s.stopImmediatePropagation(),!e&&!r&&(r=!0,I(n),d()))},c=s=>{(s.target===e||r)&&s.stopImmediatePropagation()},a=s=>{(s.target===e||r)&&(s.stopImmediatePropagation(),r||(r=!0,I(n),d()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",a,!0),t.addEventListener("focus",c,!0);let d=()=>{cancelAnimationFrame($),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",a,!0),t.removeEventListener("focus",c,!0),H=!1,r=!1},$=requestAnimationFrame(d);return d}let v=null,w=new Set,h=new Map,m=!1,B=!1;const He={Tab:!0,Escape:!0};function D(e,t){for(let n of w)n(e,t)}function Me(e){return!(e.metaKey||!C()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function M(e){m=!0,Me(e)&&(v="keyboard",D("keyboard",e))}function l(e){v="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(m=!0,D("pointer",e))}function ne(e){X(e)&&(m=!0,v="virtual")}function re(e){e.target===window||e.target===document||H||!e.isTrusted||(!m&&!B&&(v="virtual",D("virtual",e)),m=!1,B=!1)}function oe(){H||(m=!1,B=!0)}function P(e){if(typeof window>"u"||typeof document>"u"||h.get(b(e)))return;const t=b(e),n=E(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){m=!0,r.apply(this,arguments)},n.addEventListener("keydown",M,!0),n.addEventListener("keyup",M,!0),n.addEventListener("click",ne,!0),t.addEventListener("focus",re,!0),t.addEventListener("blur",oe,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",l,!0),n.addEventListener("pointermove",l,!0),n.addEventListener("pointerup",l,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",l,!0),n.addEventListener("mousemove",l,!0),n.addEventListener("mouseup",l,!0)),t.addEventListener("beforeunload",()=>{ae(e)},{once:!0}),h.set(t,{focus:r})}const ae=(e,t)=>{const n=b(e),r=E(e);t&&r.removeEventListener("DOMContentLoaded",t),h.has(n)&&(n.HTMLElement.prototype.focus=h.get(n).focus,r.removeEventListener("keydown",M,!0),r.removeEventListener("keyup",M,!0),r.removeEventListener("click",ne,!0),n.removeEventListener("focus",re,!0),n.removeEventListener("blur",oe,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",l,!0),r.removeEventListener("pointermove",l,!0),r.removeEventListener("pointerup",l,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",l,!0),r.removeEventListener("mousemove",l,!0),r.removeEventListener("mouseup",l,!0)),h.delete(n))};function Pe(e){const t=E(e);let n;return t.readyState!=="loading"?P(e):(n=()=>{P(e)},t.addEventListener("DOMContentLoaded",n)),()=>ae(e,n)}typeof document<"u"&&Pe();function ce(){return v!=="pointer"}function Se(){return v}function Fe(e){v=e,D(e,null)}function Oe(){P();let[e,t]=u.useState(v);return u.useEffect(()=>{let n=()=>{t(v)};return w.add(n),()=>{w.delete(n)}},[]),k.$b5e257d569688ac6$export$535bd6ca7f90a273()?null:e}const Ce=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function De(e,t,n){let r=E(n==null?void 0:n.target);const o=typeof window<"u"?b(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?b(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,c=typeof window<"u"?b(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?b(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Ce.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof c&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!He[n.key])}function Ne(e,t,n){P(),u.useEffect(()=>{let r=(o,i)=>{De(!!(n!=null&&n.isTextInput),o,i)&&e(ce())};return w.add(r),()=>{w.delete(r)}},t)}function _e(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=u.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),o&&o(!1),!0},[r,o]),c=te(i),a=u.useCallback(d=>{const $=E(d.target),s=$?A($):A();d.target===d.currentTarget&&s===q(d.nativeEvent)&&(n&&n(d),o&&o(!0),c(d))},[o,n,c]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}let S=!1,_=0;function G(){S=!0,setTimeout(()=>{S=!1},50)}function W(e){e.pointerType==="touch"&&G()}function ke(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",W):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",G),_++,()=>{_--,!(_>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",W):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",G))}}function Ae(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,c]=u.useState(!1),a=u.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;u.useEffect(ke,[]);let{addGlobalListener:d,removeAllGlobalListeners:$}=Q(),{hoverProps:s,triggerHoverEnd:de}=u.useMemo(()=>{let V=(f,L)=>{if(a.pointerType=L,o||L==="touch"||a.isHovered||!f.currentTarget.contains(f.target))return;a.isHovered=!0;let x=f.currentTarget;a.target=x,d(E(f.target),"pointerover",N=>{a.isHovered&&a.target&&!U(a.target,N.target)&&y(N,N.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:L}),n&&n(!0),c(!0)},y=(f,L)=>{let x=a.target;a.pointerType="",a.target=null,!(L==="touch"||!a.isHovered||!x)&&(a.isHovered=!1,$(),r&&r({type:"hoverend",target:x,pointerType:L}),n&&n(!1),c(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=f=>{S&&f.pointerType==="mouse"||V(f,f.pointerType)},g.onPointerLeave=f=>{!o&&f.currentTarget.contains(f.target)&&y(f,f.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=f=>{!a.ignoreEmulatedMouseEvents&&!S&&V(f,"mouse"),a.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=f=>{!o&&f.currentTarget.contains(f.target)&&y(f,"mouse")}),{hoverProps:g,triggerHoverEnd:y}},[t,n,r,o,a,d,$]);return u.useEffect(()=>{o&&de({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:s,isHovered:i}}exports.$03deb23ff14920c4$export$4eaf04e54aa8eed6=Q;exports.$431fbd86ca7dc216$export$b204af158042fbac=E;exports.$431fbd86ca7dc216$export$f21a1ffae260145a=b;exports.$507fabe10e71c6fb$export$630ff653c5ada6a9=Se;exports.$507fabe10e71c6fb$export$8397ddfc504fdb9a=Fe;exports.$507fabe10e71c6fb$export$98e20ec92f614cfe=Oe;exports.$507fabe10e71c6fb$export$b9b3dfddab17db27=ce;exports.$507fabe10e71c6fb$export$ec71b4b83ac08ec3=Ne;exports.$6179b936705e76d3$export$ae780daf29e6d456=Ae;exports.$6a7db85432448f7f$export$29bf1b5f2c56cf63=Le;exports.$6a7db85432448f7f$export$60278871457622de=X;exports.$7215afc6de606d6b$export$de79e2c695e052f3=I;exports.$8a9cb279dc87e130$export$525bc4921d56d4a=ee;exports.$8a9cb279dc87e130$export$715c682d09d639cc=te;exports.$8a9cb279dc87e130$export$c2b7abe5d61ec696=ye;exports.$8a9cb279dc87e130$export$cabe61c495ee3649=Te;exports.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6=_e;exports.$b4b717babfbb907b$export$4c063cf1350e6fed=Z;exports.$b4b717babfbb907b$export$bebd5a1431fec25d=we;exports.$c87311424ea30a05$export$6446a186d09e379e=J;exports.$c87311424ea30a05$export$78551043582a6a98=me;exports.$c87311424ea30a05$export$7bef049ce92e4224=z;exports.$c87311424ea30a05$export$9ac100e40613ea10=C;exports.$c87311424ea30a05$export$a11b0059900ceec8=j;exports.$c87311424ea30a05$export$b7d78993b74f766d=ge;exports.$c87311424ea30a05$export$e1865c3bedcd822b=Ee;exports.$c87311424ea30a05$export$fedb369cb70207f1=Y;exports.$d4ee10de306f2510$export$4282f70798064fe0=U;exports.$d4ee10de306f2510$export$cd4e5573fbe2b576=A;exports.$d4ee10de306f2510$export$e58f029f0fbfdb29=q;exports.$f4e2df6bd15f8569$export$1b00cb14a96194e6=le;exports.$f4e2df6bd15f8569$export$98658e8c59125e6a=F;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { e as t } from "./utils-DIMfEPAt.js";
|
|
2
|
+
function s(r, a) {
|
|
3
|
+
let { id: i, "aria-label": l, "aria-labelledby": e } = r;
|
|
4
|
+
return i = t(i), e && l ? e = [
|
|
5
|
+
.../* @__PURE__ */ new Set([
|
|
6
|
+
i,
|
|
7
|
+
...e.trim().split(/\s+/)
|
|
8
|
+
])
|
|
9
|
+
].join(" ") : e && (e = e.trim().split(/\s+/).join(" ")), !l && !e && a && (l = a), {
|
|
10
|
+
id: i,
|
|
11
|
+
"aria-label": l,
|
|
12
|
+
"aria-labelledby": e
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
s as $
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./utils-BNtZbAib.cjs");function a(d,t){let{id:i,"aria-label":l,"aria-labelledby":e}=d;return i=r.$bdb11010cef70236$export$f680877a34711e37(i),e&&l?e=[...new Set([i,...e.trim().split(/\s+/)])].join(" "):e&&(e=e.trim().split(/\s+/).join(" ")),!l&&!e&&t&&(l=t),{id:i,"aria-label":l,"aria-labelledby":e}}exports.$313b98861ee5dd6c$export$d6875122194c7b44=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("./SelectionManager-CwYux2h3.cjs"),f=require("react");class g{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(l){let e=this.keyMap.get(l);var t;return e&&(t=e.prevKey)!==null&&t!==void 0?t:null}getKeyAfter(l){let e=this.keyMap.get(l);var t;return e&&(t=e.nextKey)!==null&&t!==void 0?t:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(l){var e;return(e=this.keyMap.get(l))!==null&&e!==void 0?e:null}at(l){const e=[...this.getKeys()];return this.getItem(e[l])}getChildren(l){let e=this.keyMap.get(l);return(e==null?void 0:e.childNodes)||[]}constructor(l){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=l;let e=n=>{if(this.keyMap.set(n.key,n),n.childNodes&&n.type==="section")for(let d of n.childNodes)e(d)};for(let n of l)e(n);let t=null,c=0;for(let[n,d]of this.keyMap)t?(t.nextKey=n,d.prevKey=t.key):(this.firstKey=n,d.prevKey=void 0),d.type==="item"&&(d.index=c++),t=d,t.nextKey=void 0;var u;this.lastKey=(u=t==null?void 0:t.key)!==null&&u!==void 0?u:null}}function x(i){let{filter:l,layoutDelegate:e}=i,t=h.$7af3f5b51489e0b5$export$253fe78d46329472(i),c=f.useMemo(()=>i.disabledKeys?new Set(i.disabledKeys):new Set,[i.disabledKeys]),u=f.useCallback(K=>l?new g(l(K)):new g(K),[l]),n=f.useMemo(()=>({suppressTextValueWarning:i.suppressTextValueWarning}),[i.suppressTextValueWarning]),d=h.$7613b1592d41b092$export$6cd28814d92fa9c9(i,u,n),v=f.useMemo(()=>new h.$d496c0a20b6e58ec$export$6c8a5aaad13c9852(d,t,{layoutDelegate:e}),[d,t,e]);return M(d,v),{collection:d,disabledKeys:c,selectionManager:v}}function m(i,l){let e=f.useMemo(()=>l?i.collection.UNSTABLE_filter(l):i.collection,[i.collection,l]),t=i.selectionManager.withCollection(e);return M(e,t),{collection:e,selectionManager:t,disabledKeys:i.disabledKeys}}function M(i,l){const e=f.useRef(null);f.useEffect(()=>{if(l.focusedKey!=null&&!i.getItem(l.focusedKey)&&e.current){const o=e.current.getItem(l.focusedKey),b=[...e.current.getKeys()].map(y=>{const r=e.current.getItem(y);return(r==null?void 0:r.type)==="item"?r:null}).filter(y=>y!==null),s=[...i.getKeys()].map(y=>{const r=i.getItem(y);return(r==null?void 0:r.type)==="item"?r:null}).filter(y=>y!==null);var t,c;const p=((t=b==null?void 0:b.length)!==null&&t!==void 0?t:0)-((c=s==null?void 0:s.length)!==null&&c!==void 0?c:0);var u,n,d;let a=Math.min(p>1?Math.max(((u=o==null?void 0:o.index)!==null&&u!==void 0?u:0)-p+1,0):(n=o==null?void 0:o.index)!==null&&n!==void 0?n:0,((d=s==null?void 0:s.length)!==null&&d!==void 0?d:0)-1),$=null,k=!1;for(;a>=0;){if(!l.isDisabled(s[a].key)){$=s[a];break}if(a<s.length-1&&!k)a++;else{k=!0;var v,K;a>((v=o==null?void 0:o.index)!==null&&v!==void 0?v:0)&&(a=(K=o==null?void 0:o.index)!==null&&K!==void 0?K:0),a--}}l.setFocusedKey($?$.key:null)}e.current=i},[i,l])}exports.$a02d57049d202695$export$d085fb9e920b5ca7=g;exports.$e72dd72e1c76a225$export$2f645645f7bca764=x;exports.$e72dd72e1c76a225$export$ba9d38c0f1bf2b36=m;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { $ as x, a as M, b as m } from "./SelectionManager-B4ORduja.js";
|
|
2
|
+
import { useMemo as K, useCallback as w, useRef as S, useEffect as C } from "react";
|
|
3
|
+
class p {
|
|
4
|
+
*[Symbol.iterator]() {
|
|
5
|
+
yield* this.iterable;
|
|
6
|
+
}
|
|
7
|
+
get size() {
|
|
8
|
+
return this.keyMap.size;
|
|
9
|
+
}
|
|
10
|
+
getKeys() {
|
|
11
|
+
return this.keyMap.keys();
|
|
12
|
+
}
|
|
13
|
+
getKeyBefore(l) {
|
|
14
|
+
let e = this.keyMap.get(l);
|
|
15
|
+
var t;
|
|
16
|
+
return e && (t = e.prevKey) !== null && t !== void 0 ? t : null;
|
|
17
|
+
}
|
|
18
|
+
getKeyAfter(l) {
|
|
19
|
+
let e = this.keyMap.get(l);
|
|
20
|
+
var t;
|
|
21
|
+
return e && (t = e.nextKey) !== null && t !== void 0 ? t : null;
|
|
22
|
+
}
|
|
23
|
+
getFirstKey() {
|
|
24
|
+
return this.firstKey;
|
|
25
|
+
}
|
|
26
|
+
getLastKey() {
|
|
27
|
+
return this.lastKey;
|
|
28
|
+
}
|
|
29
|
+
getItem(l) {
|
|
30
|
+
var e;
|
|
31
|
+
return (e = this.keyMap.get(l)) !== null && e !== void 0 ? e : null;
|
|
32
|
+
}
|
|
33
|
+
at(l) {
|
|
34
|
+
const e = [
|
|
35
|
+
...this.getKeys()
|
|
36
|
+
];
|
|
37
|
+
return this.getItem(e[l]);
|
|
38
|
+
}
|
|
39
|
+
getChildren(l) {
|
|
40
|
+
let e = this.keyMap.get(l);
|
|
41
|
+
return (e == null ? void 0 : e.childNodes) || [];
|
|
42
|
+
}
|
|
43
|
+
constructor(l) {
|
|
44
|
+
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = l;
|
|
45
|
+
let e = (n) => {
|
|
46
|
+
if (this.keyMap.set(n.key, n), n.childNodes && n.type === "section") for (let o of n.childNodes) e(o);
|
|
47
|
+
};
|
|
48
|
+
for (let n of l) e(n);
|
|
49
|
+
let t = null, y = 0;
|
|
50
|
+
for (let [n, o] of this.keyMap)
|
|
51
|
+
t ? (t.nextKey = n, o.prevKey = t.key) : (this.firstKey = n, o.prevKey = void 0), o.type === "item" && (o.index = y++), t = o, t.nextKey = void 0;
|
|
52
|
+
var d;
|
|
53
|
+
this.lastKey = (d = t == null ? void 0 : t.key) !== null && d !== void 0 ? d : null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function F(i) {
|
|
57
|
+
let { filter: l, layoutDelegate: e } = i, t = x(i), y = K(() => i.disabledKeys ? new Set(i.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
58
|
+
i.disabledKeys
|
|
59
|
+
]), d = w((v) => l ? new p(l(v)) : new p(v), [
|
|
60
|
+
l
|
|
61
|
+
]), n = K(() => ({
|
|
62
|
+
suppressTextValueWarning: i.suppressTextValueWarning
|
|
63
|
+
}), [
|
|
64
|
+
i.suppressTextValueWarning
|
|
65
|
+
]), o = M(i, d, n), f = K(() => new m(o, t, {
|
|
66
|
+
layoutDelegate: e
|
|
67
|
+
}), [
|
|
68
|
+
o,
|
|
69
|
+
t,
|
|
70
|
+
e
|
|
71
|
+
]);
|
|
72
|
+
return k(o, f), {
|
|
73
|
+
collection: o,
|
|
74
|
+
disabledKeys: y,
|
|
75
|
+
selectionManager: f
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function N(i, l) {
|
|
79
|
+
let e = K(() => l ? i.collection.UNSTABLE_filter(l) : i.collection, [
|
|
80
|
+
i.collection,
|
|
81
|
+
l
|
|
82
|
+
]), t = i.selectionManager.withCollection(e);
|
|
83
|
+
return k(e, t), {
|
|
84
|
+
collection: e,
|
|
85
|
+
selectionManager: t,
|
|
86
|
+
disabledKeys: i.disabledKeys
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function k(i, l) {
|
|
90
|
+
const e = S(null);
|
|
91
|
+
C(() => {
|
|
92
|
+
if (l.focusedKey != null && !i.getItem(l.focusedKey) && e.current) {
|
|
93
|
+
const u = e.current.getItem(l.focusedKey), h = [
|
|
94
|
+
...e.current.getKeys()
|
|
95
|
+
].map((c) => {
|
|
96
|
+
const r = e.current.getItem(c);
|
|
97
|
+
return (r == null ? void 0 : r.type) === "item" ? r : null;
|
|
98
|
+
}).filter((c) => c !== null), s = [
|
|
99
|
+
...i.getKeys()
|
|
100
|
+
].map((c) => {
|
|
101
|
+
const r = i.getItem(c);
|
|
102
|
+
return (r == null ? void 0 : r.type) === "item" ? r : null;
|
|
103
|
+
}).filter((c) => c !== null);
|
|
104
|
+
var t, y;
|
|
105
|
+
const g = ((t = h == null ? void 0 : h.length) !== null && t !== void 0 ? t : 0) - ((y = s == null ? void 0 : s.length) !== null && y !== void 0 ? y : 0);
|
|
106
|
+
var d, n, o;
|
|
107
|
+
let a = Math.min(g > 1 ? Math.max(((d = u == null ? void 0 : u.index) !== null && d !== void 0 ? d : 0) - g + 1, 0) : (n = u == null ? void 0 : u.index) !== null && n !== void 0 ? n : 0, ((o = s == null ? void 0 : s.length) !== null && o !== void 0 ? o : 0) - 1), b = null, $ = !1;
|
|
108
|
+
for (; a >= 0; ) {
|
|
109
|
+
if (!l.isDisabled(s[a].key)) {
|
|
110
|
+
b = s[a];
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
if (a < s.length - 1 && !$) a++;
|
|
114
|
+
else {
|
|
115
|
+
$ = !0;
|
|
116
|
+
var f, v;
|
|
117
|
+
a > ((f = u == null ? void 0 : u.index) !== null && f !== void 0 ? f : 0) && (a = (v = u == null ? void 0 : u.index) !== null && v !== void 0 ? v : 0), a--;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
l.setFocusedKey(b ? b.key : null);
|
|
121
|
+
}
|
|
122
|
+
e.current = i;
|
|
123
|
+
}, [
|
|
124
|
+
i,
|
|
125
|
+
l
|
|
126
|
+
]);
|
|
127
|
+
}
|
|
128
|
+
export {
|
|
129
|
+
F as $,
|
|
130
|
+
N as a,
|
|
131
|
+
p as b
|
|
132
|
+
};
|