@midas-ds/components 10.1.0 → 10.2.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-DZT76sWu.js +320 -0
- package/AccordionItem-Z_c9MpAM.cjs +1 -0
- package/BadgeContainer-D3RtqcPF.js +37 -0
- package/BadgeContainer-DeUgqGqb.cjs +1 -0
- package/Breadcrumbs-CmZXtTiS.js +250 -0
- package/Breadcrumbs-Cx09jwZZ.cjs +1 -0
- package/Button-CbFRzRrF.js +38 -0
- package/Button-DnhqHU01.cjs +1 -0
- package/Button-ZOQy9Ivu.js +78 -0
- package/Button-iSiWjocA.cjs +1 -0
- package/Button.module-CMMhIrkn.js +14 -0
- package/Button.module-DO5s9hOk.cjs +1 -0
- package/ButtonGroup-DUqW5dzM.cjs +1 -0
- package/ButtonGroup-DvVvear6.js +22 -0
- package/CHANGELOG.md +81 -0
- package/Card-C0BFW3wJ.cjs +1 -0
- package/Card-CaKKKv9k.js +131 -0
- package/CharacterCounter-CPGdboVJ.js +22 -0
- package/CharacterCounter-CrY8QRuY.cjs +1 -0
- package/Checkbox-CvFsn_FL.js +380 -0
- package/Checkbox-DSxGAJX2.cjs +1 -0
- package/CheckboxGroup-Bk9DPq4I.cjs +1 -0
- package/CheckboxGroup-Dij9zKlF.js +54 -0
- package/Collection-C5ONNBqd.js +576 -0
- package/Collection-Csx3L9gh.cjs +1 -0
- package/ColorSchemeSwitch-CbAWIJCg.js +106 -0
- package/ColorSchemeSwitch-JRrCyYVv.cjs +16 -0
- package/ComboBox-BCaqPEIH.js +1375 -0
- package/ComboBox-gveQKHU3.cjs +1 -0
- package/DateField-CAQlzuDD.js +46 -0
- package/DateField-deVVFwKA.cjs +1 -0
- package/DateInputDivider-DnUxETEC.cjs +1 -0
- package/DateInputDivider-Dx8n1Lxp.js +2908 -0
- package/DateRangePicker-BmBvwqo6.js +881 -0
- package/DateRangePicker-BzfitoK0.cjs +6 -0
- package/Dialog-Bd5hK360.cjs +1 -0
- package/Dialog-Bxx8cBEq.js +208 -0
- package/Dialog-CYxThuMl.js +1609 -0
- package/Dialog-CwTEAujZ.cjs +1 -0
- package/DragAndDrop-CSwmPhxC.js +60 -0
- package/DragAndDrop-HvycSrKY.cjs +1 -0
- package/Dropdown-CaGon9OR.cjs +6 -0
- package/Dropdown-nkjzsVYX.js +84 -0
- package/FieldError-BZw8UzBk.cjs +1 -0
- package/FieldError-CZikNDxX.js +28 -0
- package/FieldError-DqdfJ3fs.cjs +1 -0
- package/FieldError-Dv3bBEjh.js +23 -0
- package/FileUpload-DYRZ0M9F.cjs +2 -0
- package/FileUpload-ULwcYDxs.js +2372 -0
- package/FocusScope-DwIqdYpQ.js +625 -0
- package/FocusScope-NaPbvuuS.cjs +1 -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-CeSsSQVC.js +44 -0
- package/Group-CgiqQHH1.cjs +1 -0
- package/Heading-BY5-QN4S.js +46 -0
- package/Heading-DoJAtYZf.cjs +1 -0
- package/Hidden-B5ir3Lei.js +34 -0
- package/Hidden-BxRZGdEW.cjs +1 -0
- package/InfoBanner-BS-dAfzO.cjs +1 -0
- package/InfoBanner-CVIBFSWx.js +82 -0
- package/Input-D8Ku_FQz.js +41 -0
- package/Input-DKSAYvsw.cjs +1 -0
- package/Label-C9ivwkAd.js +21 -0
- package/Label-CUV21CAv.cjs +1 -0
- package/Label-DkDOsmUF.js +16 -0
- package/Label-IMWAyoKb.cjs +1 -0
- package/Layout-BWeHHnqU.cjs +16 -0
- package/Layout-CCt_2L1k.js +468 -0
- package/Link-B-nus-FT.js +71 -0
- package/Link-DsnCtNeI.cjs +6 -0
- package/Link-SHMbeyIP.cjs +1 -0
- package/Link-uFowN4qv.js +59 -0
- package/LinkButton-CuBilDML.js +69 -0
- package/LinkButton-CymMrcGL.cjs +6 -0
- package/ListBox-CDOsQChA.cjs +1 -0
- package/ListBox-DOi_y_Lt.js +530 -0
- package/ListBoxButton-CFeNhJhr.cjs +1 -0
- package/ListBoxButton-O6zN3P4W.js +15 -0
- package/ListBoxSection-C1aLKL9p.js +1058 -0
- package/ListBoxSection-DGCP6xpf.cjs +1 -0
- package/ListKeyboardDelegate-BqMETvPv.cjs +1 -0
- package/ListKeyboardDelegate-DNOzQ8nc.js +158 -0
- package/LiveAnnouncer-B6177m92.js +51 -0
- package/LiveAnnouncer-CwEWPU8b.cjs +1 -0
- package/LocalizedStringFormatter-C0C54hjf.cjs +1 -0
- package/LocalizedStringFormatter-D-4Qyql0.js +77 -0
- package/Logo-BIrOEINM.js +133 -0
- package/Logo-DT2_2O43.cjs +1 -0
- package/NumberFormatter-DewVDY5w.cjs +1 -0
- package/NumberFormatter-DgOUVrge.js +119 -0
- package/OverlayArrow-D75k-EMl.cjs +1 -0
- package/OverlayArrow-DorA4Rbr.js +506 -0
- package/PressResponder-C06O3Z5P.cjs +1 -0
- package/PressResponder-CVEg5kND.js +33 -0
- package/ProgressBar-Bkw9zavs.cjs +1 -0
- package/ProgressBar-CEX2WNoW.js +77 -0
- package/ProgressBar-Dqh3ftSP.cjs +1 -0
- package/ProgressBar-gmAzSsrz.js +53 -0
- package/RSPContexts-BW2SEIqe.js +11 -0
- package/RSPContexts-D8hmBfGm.cjs +1 -0
- package/Radio-CDKrvQe4.cjs +1 -0
- package/Radio-_ukSkxPT.js +311 -0
- package/RangeCalendar-cbCKBPZv.cjs +11 -0
- package/RangeCalendar-uXwoBL-O.js +1685 -0
- package/SearchField-6yBGiojX.cjs +6 -0
- package/SearchField-DYl2uo7o.js +362 -0
- package/Select-CpHjd1tp.cjs +1 -0
- package/Select-PvCqY7Lp.js +646 -0
- package/SelectionManager-6H88Cv6B.js +1033 -0
- package/SelectionManager-C5NGBzvz.cjs +1 -0
- package/Separator-LYnFqh4L.js +60 -0
- package/Separator-nPra6kD-.cjs +1 -0
- package/Skeleton-BAwbfKBW.cjs +1 -0
- package/Skeleton-BePDRmrO.js +40 -0
- package/Spinner-D31SXm-U.js +41 -0
- package/Spinner-DAJtfxqJ.cjs +6 -0
- package/Table-B_N7wUmA.js +2451 -0
- package/Table-D9vNc_y-.cjs +16 -0
- package/Tabs-Ct6D83aR.js +404 -0
- package/Tabs-Dtcl2oK2.cjs +1 -0
- package/Tag-CVFkzg3s.cjs +1 -0
- package/Tag-g6HN-YCv.js +748 -0
- package/Text-3MNwRMpI.cjs +1 -0
- package/Text-B2K-BJKQ.cjs +1 -0
- package/Text-BN-g1iWi.js +32 -0
- package/Text-B_H68Tvq.js +15 -0
- package/TextArea-DSiQ578a.js +206 -0
- package/TextArea-cVyGBRbL.cjs +1 -0
- package/TextField-B70CL2qz.cjs +1 -0
- package/TextField-DBaRuNj7.js +119 -0
- package/TextField.module-BcpPBWnD.js +13 -0
- package/TextField.module-Dw5Rtn9y.cjs +1 -0
- package/Toast-CjpldAI8.js +988 -0
- package/Toast-DrkOGy4d.cjs +1 -0
- package/ToggleButtonGroup-BuU_6dYe.cjs +1 -0
- package/ToggleButtonGroup-Ceh9_yBM.js +210 -0
- package/Tooltip-BAIjaYax.js +283 -0
- package/Tooltip-CiWg4zIC.cjs +1 -0
- package/VisuallyHidden-CtXvK_Tw.cjs +1 -0
- package/VisuallyHidden-D-4z1VgU.js +40 -0
- package/accordion/index.cjs +1 -0
- package/accordion/index.js +5 -0
- package/arrow-right-Cw48o2oW.cjs +6 -0
- package/arrow-right-Dg8sttFO.js +14 -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/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/Card.d.ts +3 -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-Dw9c62O4.cjs +6 -0
- package/checkbox/index.cjs +1 -0
- package/checkbox/index.js +6 -0
- package/chevron-down-C2E7aZ3N.cjs +6 -0
- package/chevron-down-Cd1bkzXT.js +13 -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 +9 -5
- package/combobox/index.cjs +1 -0
- package/combobox/index.d.ts +1 -1
- package/combobox/index.js +7 -0
- package/combobox/types.d.ts +6 -0
- package/combobox/utils.d.ts +3 -10
- package/common/types.d.ts +2 -0
- package/context-B8cn10po.js +80 -0
- package/context-DjwhtgxQ.cjs +1 -0
- package/createLucideIcon-DAY4oS-S.cjs +21 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-field/index.cjs +1 -0
- package/date-field/index.js +8 -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/index.cjs +1 -0
- package/file-upload/index.js +4 -0
- package/filterDOMProps-BS2lrgFA.cjs +1 -0
- package/filterDOMProps-D6KHYVBX.js +24 -0
- package/focusSafely-Bqfo_DH7.cjs +1 -0
- package/focusSafely-C48ucRUz.js +56 -0
- package/getScrollParent-DuKmPmUa.cjs +1 -0
- package/getScrollParent-Ru2U2LlM.js +9 -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-BSMrH_Du.js +120 -0
- package/index-D97L3EBk.cjs +17 -0
- package/index.cjs +1 -164
- package/index.d.ts +1 -1
- package/index.js +127 -30044
- package/inertValue-B7loUihk.js +8 -0
- package/inertValue-BWmZ1afe.cjs +1 -0
- package/info-DkzVqB8I.js +38 -0
- package/info-DlzSeKbc.cjs +16 -0
- package/info-banner/index.cjs +1 -0
- package/info-banner/index.js +4 -0
- package/label/index.cjs +1 -0
- package/label/index.js +4 -0
- package/layout/index.cjs +1 -0
- package/layout/index.js +8 -0
- package/link/Link.d.ts +4 -1
- package/link/index.cjs +1 -0
- package/link/index.js +6 -0
- package/link-button/LinkButton.d.ts +24 -1
- package/link-button/index.cjs +1 -0
- package/link-button/index.js +6 -0
- package/list-box/ListBox.d.ts +4 -0
- package/list-box/ListBoxButton.d.ts +2 -0
- package/list-box/ListBoxItem.d.ts +3 -0
- package/list-box/ListBoxPopover.d.ts +3 -0
- package/list-box/ListBoxSection.d.ts +8 -0
- package/list-box/index.cjs +1 -0
- package/list-box/index.d.ts +6 -0
- package/list-box/index.js +9 -0
- package/list-box/types.d.ts +23 -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/progress-bar/index.cjs +1 -0
- package/progress-bar/index.js +4 -0
- package/radio/index.cjs +1 -0
- package/radio/index.js +5 -0
- package/scrollIntoView-ClEACHUk.js +57 -0
- package/scrollIntoView-DRSoJp89.cjs +1 -0
- package/search-field/index.cjs +1 -0
- package/search-field/index.js +4 -0
- package/select/HiddenMultiSelect.d.ts +5 -4
- package/select/MultiSelectValueTag.d.ts +11 -0
- package/select/Select.d.ts +2 -77
- package/select/SelectFieldError.d.ts +8 -0
- package/select/SelectListBox.d.ts +4 -3
- package/select/SelectTrigger.d.ts +10 -0
- package/select/index.cjs +1 -0
- package/select/index.d.ts +1 -0
- package/select/index.js +4 -0
- package/select/types.d.ts +188 -0
- package/select/useMultiSelect.d.ts +4 -21
- package/select/useMultiSelectListState.d.ts +3 -15
- package/select/useMultiSelectState.d.ts +3 -19
- 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-BCAO2eJs.cjs +6 -0
- package/square-arrow-out-up-right-BkyqV2PN.js +15 -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/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-C0lvfCYH.cjs +6 -0
- package/triangle-alert-wxyxspAl.js +21 -0
- package/useButton-B1Fa-6qE.cjs +1 -0
- package/useButton-C-Lq7CNY.js +47 -0
- package/useCollator-C_ozeWLo.cjs +1 -0
- package/useCollator-CgZcHC8N.js +11 -0
- package/useControlledState-D0L6S_5r.cjs +1 -0
- package/useControlledState-u436Wbp1.js +30 -0
- package/useDateFormatter-C53Uxdli.js +1571 -0
- package/useDateFormatter-g2maMTGH.cjs +1 -0
- package/useDescription-CVKhFa3c.js +32 -0
- package/useDescription-DmQYSEES.cjs +1 -0
- package/useEvent-CjkbBniY.cjs +1 -0
- package/useEvent-Cyd2ZL0c.js +21 -0
- package/useField-B1RU0GKs.cjs +1 -0
- package/useField-BPMAlIbU.js +35 -0
- package/useFilter-ChIbnALW.js +35 -0
- package/useFilter-CtIwF2qW.cjs +1 -0
- package/useFocusRing-BDGH3lpn.js +82 -0
- package/useFocusRing-CbImDrwF.cjs +1 -0
- package/useFocusable-CaedRTpB.js +74 -0
- package/useFocusable-CuPQ7Cm5.cjs +1 -0
- package/useFormValidation-ClximP89.cjs +1 -0
- package/useFormValidation-R8hQIjWP.js +215 -0
- package/useHasTabbableChild-DgphNvnk.cjs +1 -0
- package/useHasTabbableChild-DsD9AJwE.js +34 -0
- package/useHighlightSelectionDescription-BizKjvPU.cjs +1 -0
- package/useHighlightSelectionDescription-DFfcgbUj.js +567 -0
- package/useHover-_mv5J4_q.cjs +1 -0
- package/useHover-qRAon4nS.js +490 -0
- package/useLabel-DDdAJ1JO.js +23 -0
- package/useLabel-m_S5xkHy.cjs +1 -0
- package/useLabels-BLOfc6Y-.cjs +1 -0
- package/useLabels-BZjoZA1Z.js +17 -0
- package/useListState-Ca2-uZMO.cjs +1 -0
- package/useListState-DFQ9d-uE.js +132 -0
- package/useLocalizedStringFormatter-D07YB2e1.js +22 -0
- package/useLocalizedStringFormatter-u9SJaOwk.cjs +1 -0
- package/useObserveElement-BdI4zgd7.js +27 -0
- package/useObserveElement-BzEr5D32.cjs +1 -0
- package/usePress-BFa6cT9o.cjs +7 -0
- package/usePress-CUJ3pMOw.js +542 -0
- package/useSingleSelectListState-C-nB8cug.js +34 -0
- package/useSingleSelectListState-MGNxUTum.cjs +1 -0
- package/useTextField-5OZQPyOW.js +86 -0
- package/useTextField-CtUDWsUl.cjs +1 -0
- package/useToggleState-Bz5rAf4C.js +18 -0
- package/useToggleState-DoIkSQdj.cjs +1 -0
- package/useUpdateEffect-CCDx8D4X.js +13 -0
- package/useUpdateEffect-sk3kiVGz.cjs +1 -0
- package/utils/test.d.ts +1 -1
- package/utils-BNtZbAib.cjs +1 -0
- package/utils-HNTsIwux.js +308 -0
- package/x-CvxiAZTW.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/select/SelectPopover.d.ts +0 -10
- package/theme.cjs +0 -1
- package/tokens-COoF1t17.cjs +0 -1
- /package/{global.css → assets/global.css} +0 -0
- /package/{select → list-box}/SectionedListLayout.d.ts +0 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { useRef as k, useCallback as L, useEffect as y, useState as U, useMemo as Z } from "react";
|
|
2
|
+
import { $ as ee, g as te, l as ne } from "./utils-HNTsIwux.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 = k(/* @__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 Ce(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 ke(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 = k({
|
|
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 C() {
|
|
380
|
+
F = !0, setTimeout(() => {
|
|
381
|
+
F = !1;
|
|
382
|
+
}, 50);
|
|
383
|
+
}
|
|
384
|
+
function W(e) {
|
|
385
|
+
e.pointerType === "touch" && C();
|
|
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", C), _++, () => {
|
|
390
|
+
_--, !(_ > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", W) : process.env.NODE_ENV === "test" && document.removeEventListener("touchend", C));
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function We(e) {
|
|
394
|
+
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: o } = e, [u, i] = U(!1), a = k({
|
|
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
|
+
ke as p,
|
|
480
|
+
Le as q,
|
|
481
|
+
Ge as r,
|
|
482
|
+
V as s,
|
|
483
|
+
je as t,
|
|
484
|
+
G as u,
|
|
485
|
+
_e as v,
|
|
486
|
+
Ae as w,
|
|
487
|
+
be as x,
|
|
488
|
+
ve as y,
|
|
489
|
+
Ce as z
|
|
490
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { c as i } from "./utils-HNTsIwux.js";
|
|
2
|
+
import { $ as p } from "./useLabels-BZjoZA1Z.js";
|
|
3
|
+
function $(o) {
|
|
4
|
+
let { id: l, label: t, "aria-labelledby": e, "aria-label": b, labelElementType: d = "label" } = o;
|
|
5
|
+
l = i(l);
|
|
6
|
+
let a = i(), r = {};
|
|
7
|
+
t ? (e = e ? `${a} ${e}` : a, r = {
|
|
8
|
+
id: a,
|
|
9
|
+
htmlFor: d === "label" ? l : void 0
|
|
10
|
+
}) : !e && !b && process.env.NODE_ENV !== "production" && console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
|
|
11
|
+
let f = p({
|
|
12
|
+
id: l,
|
|
13
|
+
"aria-label": b,
|
|
14
|
+
"aria-labelledby": e
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
labelProps: r,
|
|
18
|
+
fieldProps: f
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
$
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./utils-BNtZbAib.cjs"),f=require("./useLabels-BLOfc6Y-.cjs");function $(t){let{id:l,label:o,"aria-labelledby":e,"aria-label":b,labelElementType:d="label"}=t;l=i.$bdb11010cef70236$export$f680877a34711e37(l);let a=i.$bdb11010cef70236$export$f680877a34711e37(),r={};o?(e=e?`${a} ${e}`:a,r={id:a,htmlFor:d==="label"?l:void 0}):!e&&!b&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let s=f.$313b98861ee5dd6c$export$d6875122194c7b44({id:l,"aria-label":b,"aria-labelledby":e});return{labelProps:r,fieldProps:s}}exports.$d191a55c9702f145$export$8467354a121f1b9f=$;
|
|
@@ -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,17 @@
|
|
|
1
|
+
import { c as t } from "./utils-HNTsIwux.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 h=require("./SelectionManager-C5NGBzvz.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),$=[...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=$==null?void 0:$.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),b=null,k=!1;for(;a>=0;){if(!l.isDisabled(s[a].key)){b=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(b?b.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 { a as x, b as M, c as m } from "./SelectionManager-6H88Cv6B.js";
|
|
2
|
+
import { useMemo as K, useCallback as w, useRef as S, useEffect as C } from "react";
|
|
3
|
+
class $ {
|
|
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 $(l(v)) : new $(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, p = !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 && !p) a++;
|
|
114
|
+
else {
|
|
115
|
+
p = !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
|
+
$ as b
|
|
132
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { $ } from "./context-B8cn10po.js";
|
|
2
|
+
import { $ as r, a as c } from "./LocalizedStringFormatter-D-4Qyql0.js";
|
|
3
|
+
import { useMemo as b } from "react";
|
|
4
|
+
const t = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function n(e) {
|
|
6
|
+
let a = t.get(e);
|
|
7
|
+
return a || (a = new c(e), t.set(e, a)), a;
|
|
8
|
+
}
|
|
9
|
+
function i(e, a) {
|
|
10
|
+
return a && c.getGlobalDictionaryForPackage(a) || n(e);
|
|
11
|
+
}
|
|
12
|
+
function u(e, a) {
|
|
13
|
+
let { locale: f } = $(), o = i(e, a);
|
|
14
|
+
return b(() => new r(f, o), [
|
|
15
|
+
f,
|
|
16
|
+
o
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
u as $,
|
|
21
|
+
i as a
|
|
22
|
+
};
|