@midas-ds/components 10.3.0 → 10.4.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-BcsoC78F.cjs +1 -0
- package/{AccordionItem-ChHpW8EW.js → AccordionItem-BqsgiVWV.js} +38 -36
- package/Breadcrumbs-CfW5IuyE.cjs +1 -0
- package/{Breadcrumbs-CwDUNIqF.js → Breadcrumbs-D7eoibWk.js} +77 -65
- package/{Button-BoJl6JGM.cjs → Button-BXY5ZhqI.cjs} +1 -1
- package/{Button-Csih3v23.js → Button-BZUo7vsZ.js} +1 -1
- package/{Button-DjBChs7s.js → Button-CFYdzG0H.js} +24 -23
- package/Button-DExMoP5f.cjs +1 -0
- package/CHANGELOG.md +28 -0
- package/{Card-yrtGzt70.js → Card-BaWSgtSF.js} +3 -3
- package/{Card-0G0mj9q5.cjs → Card-Cc1TNPcQ.cjs} +1 -1
- package/{CharacterCounter-CHcTDHO-.cjs → CharacterCounter-DSFBv3Rw.cjs} +1 -1
- package/{CharacterCounter-BL_nZHya.js → CharacterCounter-cLhqPZlk.js} +4 -4
- package/Checkbox-Co3h0hur.cjs +1 -0
- package/{Checkbox-5HINZdGu.js → Checkbox-LuUwTZ3W.js} +69 -68
- package/CheckboxGroup-CUA8_xSx.js +160 -0
- package/CheckboxGroup-DmUOM0xl.cjs +1 -0
- package/{Collection-Brgjpkne.js → Collection--62xKPm9.js} +17 -16
- package/Collection-BtBX5IMY.cjs +1 -0
- package/{ColorSchemeSwitch-BpzQ7g0b.js → ColorSchemeSwitch-Cwono7Ap.js} +51 -35
- package/ColorSchemeSwitch-DDXdSzqg.cjs +16 -0
- package/ComboBox-BBC7jhnm.cjs +1 -0
- package/{ComboBox-CVDyp2a-.js → ComboBox-HLIAbb2q.js} +309 -298
- package/{DateField-DeDhiYnW.cjs → DateField-B3VjOSde.cjs} +1 -1
- package/{DateField-DhU3q-rG.js → DateField-CnLEi7uX.js} +4 -4
- package/DateInputDivider-3BvwXXa9.cjs +1 -0
- package/{DateInputDivider-CF4xWsMT.js → DateInputDivider-Bi5N-C0c.js} +90 -86
- package/DateRangePicker-BPlZ12r8.cjs +6 -0
- package/{DateRangePicker-ziD1_k1W.js → DateRangePicker-CFOoGvut.js} +86 -83
- package/Dialog-CSnN6baf.cjs +1 -0
- package/{Dialog-D14MbJ7o.js → Dialog-CtVrVuMr.js} +101 -98
- package/Dialog-SqciohRY.js +221 -0
- package/Dialog-pSSy1zwf.cjs +1 -0
- package/DragAndDrop-BoEd260f.cjs +1 -0
- package/{DragAndDrop-o3ruz_SR.js → DragAndDrop-DkSTL28C.js} +2 -2
- package/{Dropdown-Df58j43I.js → Dropdown-CkBp70BH.js} +2 -2
- package/{Dropdown-CJ6My6EI.cjs → Dropdown-DAsVShlt.cjs} +1 -1
- package/FieldError-B3YFj-an.js +23 -0
- package/FieldError-BbR-29BM.js +28 -0
- package/FieldError-MVsU-Mgw.cjs +1 -0
- package/FieldError-bRTpchvr.cjs +1 -0
- package/{FileUpload-D6qoEAjn.js → FileUpload-B4rv-wke.js} +496 -475
- package/{FileUpload-CxCOtyB9.cjs → FileUpload-BwMhyLjG.cjs} +2 -2
- package/{FocusScope-CxkURfoc.js → FocusScope-D_hwN_TJ.js} +25 -24
- package/FocusScope-vcXLOQiu.cjs +1 -0
- package/Group-CpkUzEAs.js +45 -0
- package/Group-DOpbdoAi.cjs +1 -0
- package/{Heading-mHhCbGjY.cjs → Heading-CKTR4sOz.cjs} +1 -1
- package/{Heading-BFtiin0g.js → Heading-NxtGri2i.js} +1 -1
- package/{InfoBanner-BLM-TJJ6.js → InfoBanner-CBUoad7A.js} +47 -39
- package/InfoBanner-CVry6Y8i.cjs +1 -0
- package/{Input-BTzwcf72.js → Input-LnjmFI1x.js} +13 -12
- package/Input-MJji5hhq.cjs +1 -0
- package/Label-CNmTN1YY.cjs +1 -0
- package/Label-TVxwGZ-O.js +78 -0
- package/Layout-Dw-oCqxd.cjs +16 -0
- package/Layout-amz9BESl.js +498 -0
- package/{Link-yNO2-sqx.js → Link-Bn8V3ZI0.js} +8 -7
- package/Link-CidjjqHb.cjs +1 -0
- package/{Link-B88l_oaE.cjs → Link-D92ftFi2.cjs} +1 -1
- package/{Link-DX5BbBnn.js → Link-DegonJfl.js} +1 -1
- package/{LinkButton-o6uS1XsR.js → LinkButton-CckYzfJ8.js} +1 -1
- package/{LinkButton-CBpGLETx.cjs → LinkButton-DKZ4z6zu.cjs} +1 -1
- package/ListBox-BCz5-23H.cjs +1 -0
- package/{ListBox-GnVK_Pdq.js → ListBox-C-isJIHL.js} +101 -99
- package/{ListBoxButton-D_J3jlP0.js → ListBoxButton-C_krklY0.js} +1 -1
- package/{ListBoxButton-DPBrtXyv.cjs → ListBoxButton-DNm3gvcT.cjs} +1 -1
- package/{ListBoxSection-C0BGnpB4.js → ListBoxSection-BVR2xtOH.js} +9 -9
- package/ListBoxSection-CfQZoURJ.cjs +1 -0
- package/{ListKeyboardDelegate-DTg9h4v6.cjs → ListKeyboardDelegate-CPsZ7D83.cjs} +1 -1
- package/{ListKeyboardDelegate-DNI8GQtX.js → ListKeyboardDelegate-CY6t6y1t.js} +3 -3
- package/LocalizedStringFormatter-C0C54hjf.cjs +1 -0
- package/LocalizedStringFormatter-D-4Qyql0.js +77 -0
- package/Logo-BpH0HC91.cjs +1 -0
- package/{Logo-BIrOEINM.js → Logo-ME4ffCue.js} +34 -26
- package/{OverlayArrow-CDLXPTew.js → OverlayArrow-CfhSYL46.js} +57 -56
- package/OverlayArrow-DpZ1FqOd.cjs +1 -0
- package/{Popover-BGGXeD54.js → Popover-C8VY1YKi.js} +2 -2
- package/{Popover-CqNWzPf-.cjs → Popover-CnAsw3wI.cjs} +1 -1
- package/{ProgressBar-DMSg-Prr.js → ProgressBar-BNCjpcv8.js} +2 -2
- package/{ProgressBar-Jbg28j2a.cjs → ProgressBar-CcbxcWdT.cjs} +1 -1
- package/Radio-B2zfEFdq.cjs +1 -0
- package/{Radio-Cz29wPXd.js → Radio-CZYibh9r.js} +50 -47
- package/{RangeCalendar-RAlAHlNL.js → RangeCalendar-B16b6tJD.js} +304 -293
- package/RangeCalendar-C1LFeOVk.cjs +11 -0
- package/SSRProvider-40TXmsUG.js +50 -0
- package/SSRProvider-Bc-sMhsT.cjs +1 -0
- package/SearchField-CML0kjtn.cjs +6 -0
- package/{SearchField-IlvZ3Kh6.js → SearchField-giwECmXS.js} +175 -166
- package/Select-DKey6CeS.cjs +1 -0
- package/Select-mwaAv20X.js +665 -0
- package/SelectionManager-D0jYUYcy.cjs +1 -0
- package/{SelectionManager-B4ORduja.js → SelectionManager-zsWy3vsd.js} +91 -90
- package/{Separator-DECIYLtZ.cjs → Separator-CxF-3jhR.cjs} +1 -1
- package/{Separator-Cu9fYKUM.js → Separator-Dn5LYN5I.js} +4 -4
- package/Spinner-CbJ6YAz-.js +53 -0
- package/Spinner-yHcy8YHC.cjs +6 -0
- package/TabList-7VtCiXxX.cjs +1 -0
- package/TabList-CthsM5h6.js +435 -0
- package/{Table-F4oYBtUM.js → Table-BcQPvJT3.js} +46 -44
- package/Table-DkvNp6xm.cjs +16 -0
- package/{Tag-Du7GvSv2.js → Tag-Bs8T2Ei7.js} +131 -129
- package/Tag-CFWZ2LQW.cjs +1 -0
- package/Text-92cPh38G.js +15 -0
- package/{Text-B2K-BJKQ.cjs → Text-CfcjRtke.cjs} +1 -1
- package/{Text-3MNwRMpI.cjs → Text-DBHWi5gA.cjs} +1 -1
- package/{Text-jWWg0B20.js → Text-DlKqpvSa.js} +1 -1
- package/TextArea-DBNAVWqL.js +119 -0
- package/TextArea-XJDfeXRs.cjs +1 -0
- package/TextField-BdK9KEQ5.cjs +1 -0
- package/{TextField-C-hTPukq.js → TextField-ByDJkig9.js} +23 -22
- package/{Toast-Btg21Xge.js → Toast-DPPvPhrF.js} +75 -68
- package/Toast-l1bKo2oA.cjs +1 -0
- package/ToggleButtonGroup-DH8IgR4G.cjs +1 -0
- package/{ToggleButtonGroup-B5yz1tm2.js → ToggleButtonGroup-HOWNWtQZ.js} +46 -45
- package/{Tooltip-CMLs7WMw.js → Tooltip-5mLWn_wO.js} +29 -27
- package/Tooltip-pN5W3IK6.cjs +1 -0
- package/{VisuallyHidden-ZCYf65q4.js → VisuallyHidden-CYfmTSCD.js} +2 -2
- package/VisuallyHidden-Doyzl0F7.cjs +1 -0
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/FileUpload.css +1 -1
- package/assets/RangeCalendar.css +1 -1
- package/assets/SearchField.css +1 -1
- package/assets/Spinner.css +1 -1
- package/assets/TabList.css +1 -0
- package/breadcrumbs/Breadcrumbs.d.ts +11 -7
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.d.ts +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +1 -1
- package/calendar/CalendarGrid.d.ts +1 -0
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.cjs +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/Checkbox.d.ts +3 -1
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/checkbox/intl/translations.json.d.ts +2 -30
- package/checkbox/types.d.ts +3 -1
- package/color-scheme-switch/ColorSchemeSwitch.d.ts +1 -0
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/color-scheme-switch/intl/translations.json.d.ts +15 -0
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -1
- package/combobox/intl/translations.json.d.ts +11 -0
- package/{context-C81gPYvC.js → context-CGNJ3grH.js} +1 -1
- package/context-Df3XbgBG.cjs +1 -0
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/dropdown/index.cjs +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.cjs +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/FileUpload.d.ts +1 -0
- package/file-upload/index.cjs +1 -1
- package/file-upload/index.js +1 -1
- package/file-upload/intl/translations.json.d.ts +17 -0
- package/{getScrollParent-BhFcYrwL.js → getScrollParent-CT_L9LUr.js} +1 -1
- package/{getScrollParent-DDJu9WHU.cjs → getScrollParent-CsZ9ciml.cjs} +1 -1
- package/heading/index.cjs +1 -1
- package/heading/index.js +1 -1
- package/index.cjs +1 -1
- package/index.js +100 -97
- package/info-banner/index.cjs +1 -1
- package/info-banner/index.js +1 -1
- package/info-banner/intl/translations.json.d.ts +11 -0
- package/label/index.cjs +1 -1
- package/label/index.js +1 -1
- package/label/intl/translations.json.d.ts +11 -0
- package/layout/Layout.d.ts +1 -0
- package/layout/context/LayoutContext.d.ts +1 -0
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/layout/intl/translations.json.d.ts +23 -0
- package/link/index.cjs +1 -1
- package/link/index.js +2 -2
- package/link-button/index.cjs +1 -1
- package/link-button/index.js +2 -2
- package/list-box/index.cjs +1 -1
- package/list-box/index.js +2 -2
- package/logo/index.cjs +1 -1
- package/logo/index.js +1 -1
- package/logo/intl/translations.json.d.ts +11 -0
- package/mergeProps-B5KXZAI3.cjs +1 -0
- package/mergeProps-C1U1OIeJ.js +115 -0
- package/modal/index.cjs +1 -1
- package/modal/index.js +2 -2
- package/modal/intl/translations.json.d.ts +11 -0
- package/package.json +1 -1
- package/popover/index.cjs +1 -1
- package/popover/index.js +1 -1
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/Radio.d.ts +1 -4
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/{scrollIntoView-Hwb_aaNf.js → scrollIntoView-BLnsPvFA.js} +1 -1
- package/scrollIntoView-joIyo-Jt.cjs +1 -0
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/search-field/intl/translations.json.d.ts +11 -0
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/select/intl/translations.json.d.ts +17 -0
- package/spinner/Spinner.d.ts +1 -0
- package/spinner/index.cjs +1 -1
- package/spinner/index.js +1 -1
- package/spinner/intl/translations.json.d.ts +11 -0
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/Tab.d.ts +4 -0
- package/tabs/TabList.d.ts +3 -0
- package/tabs/TabPanel.d.ts +4 -0
- package/tabs/Tabs.d.ts +11 -5
- package/tabs/index.cjs +1 -1
- package/tabs/index.d.ts +3 -0
- package/tabs/index.js +5 -2
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text/index.cjs +1 -1
- package/text/index.js +1 -1
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/textfield/intl/translations.json.d.ts +0 -72
- package/theme/index.cjs +1 -1
- package/theme/index.d.ts +5 -0
- package/theme/index.js +2 -2
- package/theme/tokens.d.ts +5 -0
- package/toast/Toast.d.ts +5 -2
- package/toast/index.cjs +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.cjs +1 -1
- package/toggle-button/index.js +1 -1
- package/{tokens-p6pg1Cea.cjs → tokens-BghDnMdO.cjs} +1 -1
- package/{tokens-xp-7KMK7.js → tokens-fEwCQXDv.js} +16 -11
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/{useButton-B8dB9sot.js → useButton-1-Jf-oHj.js} +3 -3
- package/useButton-D60q0SQw.cjs +1 -0
- package/{useDateFormatter-CnxoJ4jF.cjs → useDateFormatter-BJBt0jk_.cjs} +1 -1
- package/{useDateFormatter-EHm4auIg.js → useDateFormatter-BVCkxVdw.js} +2 -2
- package/{useEvent-IsD2Awnh.js → useEvent-CigwyJOw.js} +3 -3
- package/useEvent-DPxMu-X9.cjs +1 -0
- package/{useField-DvpGZkw_.js → useField-BEBXv5Mh.js} +4 -4
- package/useField-D1UkzeaI.cjs +1 -0
- package/{useFilter-CUq74PQ2.js → useFilter-CousKe2K.js} +1 -1
- package/{useFilter-BTgDWHVx.cjs → useFilter-e2oIVF_O.cjs} +1 -1
- package/useFocusRing-B-A1OLhU.cjs +1 -0
- package/useFocusRing-DOfBqnUN.js +33 -0
- package/useFocusWithin-CG8mAt2D.cjs +1 -0
- package/useFocusWithin-T1ifEM_s.js +54 -0
- package/{useFocusable-C8uh8K4g.js → useFocusable-ChPA2Jc7.js} +20 -18
- package/useFocusable-D7I1ujkW.cjs +1 -0
- package/useFormValidation-BlFGdPZB.cjs +1 -0
- package/{useFormValidation-BIGzfO9h.js → useFormValidation-BzzruZKm.js} +2 -2
- package/{useHasTabbableChild-C-1mZUQe.js → useHasTabbableChild-BE81d_ab.js} +2 -2
- package/useHasTabbableChild-CoQRpNbC.cjs +1 -0
- package/useHighlightSelectionDescription-BfR_vGOe.cjs +1 -0
- package/{useHighlightSelectionDescription-CnBDT86u.js → useHighlightSelectionDescription-D73hrkmn.js} +5 -5
- package/useHover-BE_XKZKe.cjs +1 -0
- package/useHover-DQvJ3Y-W.js +262 -0
- package/useLabels-CSU0kbtJ.cjs +1 -0
- package/{useLabels-BDwkBYbE.js → useLabels-LrKQiY11.js} +1 -1
- package/{useListState-CrZFZffI.js → useListState-CebsX_1d.js} +1 -1
- package/{useListState-Bx8u4IFG.cjs → useListState-DymkJGDF.cjs} +1 -1
- package/useLocalizedStringFormatter-BO2iZEL0.cjs +1 -0
- package/useLocalizedStringFormatter-BiX5BTlb.cjs +1 -0
- package/useLocalizedStringFormatter-CL9MUZ8A.js +22 -0
- package/useLocalizedStringFormatter-N0AyjzbM.js +25 -0
- package/usePress-BooY_CAy.cjs +7 -0
- package/{usePress-CNjmDzap.js → usePress-DuR4pVsE.js} +129 -128
- package/{useSingleSelectListState-0AGHxvy3.js → useSingleSelectListState-BLXvGjLI.js} +1 -1
- package/{useSingleSelectListState-Cl3KV5E1.cjs → useSingleSelectListState-BPhlCU26.cjs} +1 -1
- package/{useTextField-Cw-33OP_.js → useTextField-C-sUypsx.js} +8 -8
- package/useTextField-DnRrCg5o.cjs +1 -0
- package/utils/intl/useLocalizedStringFormatter.d.ts +2 -0
- package/utils-CoCR_Fce.js +234 -0
- package/utils-DHNZrQmj.cjs +1 -0
- package/utils-DJhAJHk_.js +152 -0
- package/utils-Dvdohqm9.cjs +1 -0
- package/AccordionItem-BGWiWjxA.cjs +0 -1
- package/Breadcrumbs-DtjJ1UmU.cjs +0 -1
- package/Button-htW9qIsS.cjs +0 -1
- package/Checkbox-DqcPg5hz.cjs +0 -1
- package/CheckboxGroup-BBrSMuDY.cjs +0 -1
- package/CheckboxGroup-CLgixk2p.js +0 -243
- package/Collection-BIDsXNhi.cjs +0 -1
- package/ColorSchemeSwitch-C-qWuqkU.cjs +0 -16
- package/ComboBox-CWJUg9Xx.cjs +0 -1
- package/DateInputDivider-ADvOavHw.cjs +0 -1
- package/DateRangePicker-BsAHhy99.cjs +0 -6
- package/Dialog-B8GTYbvu.cjs +0 -1
- package/Dialog-BOrYdX50.cjs +0 -1
- package/Dialog-CXNu48AC.js +0 -208
- package/DragAndDrop-DNth776R.cjs +0 -1
- package/FieldError-CAcjosk_.js +0 -46
- package/FieldError-CKBb2-mp.cjs +0 -1
- package/FocusScope-5c9SVBcR.cjs +0 -1
- package/Group-B6EslsHZ.js +0 -44
- package/Group-CgiqQHH1.cjs +0 -1
- package/InfoBanner-C2kTIsrB.cjs +0 -1
- package/Input-DKSAYvsw.cjs +0 -1
- package/Label-7Ybb99CE.cjs +0 -1
- package/Label-BwJrdqEE.js +0 -70
- package/Layout-1g6bMH62.cjs +0 -16
- package/Layout-Ey8flY7E.js +0 -468
- package/Link-BQhauBuw.cjs +0 -1
- package/ListBox-DP9M4H6R.cjs +0 -1
- package/ListBoxSection-BGaigBnG.cjs +0 -1
- package/Logo-DT2_2O43.cjs +0 -1
- package/OverlayArrow-D75k-EMl.cjs +0 -1
- package/Radio-BwqrdhQE.cjs +0 -1
- package/RangeCalendar-BehUaydF.cjs +0 -11
- package/SearchField-CxMwDeUM.cjs +0 -6
- package/Select-2q1iSzAX.cjs +0 -1
- package/Select-BVQZtoi9.js +0 -646
- package/SelectionManager-CwYux2h3.cjs +0 -1
- package/Spinner-D31SXm-U.js +0 -41
- package/Spinner-P35rvvsl.cjs +0 -6
- package/Table-B40CGLT-.cjs +0 -16
- package/Tabs-B4oZJkZG.js +0 -404
- package/Tabs-DA2qXhzb.cjs +0 -1
- package/Tag-DPAGmcMK.cjs +0 -1
- package/Text-BoXuUVVH.js +0 -15
- package/TextArea-C7JZ_pQd.cjs +0 -1
- package/TextArea-XeBCSyzl.js +0 -191
- package/TextField-BgNdhZi_.cjs +0 -1
- package/Toast-AbDA1BOs.cjs +0 -1
- package/ToggleButtonGroup-BFDoj0P6.cjs +0 -1
- package/Tooltip-DeBuBKhS.cjs +0 -1
- package/VisuallyHidden-CLWHbz2n.cjs +0 -1
- package/assets/Tabs.css +0 -1
- package/context-DjwhtgxQ.cjs +0 -1
- package/scrollIntoView-C8doLzDd.cjs +0 -1
- package/useButton-cpNi-fY4.cjs +0 -1
- package/useEvent-DxBxMX2V.cjs +0 -1
- package/useField-CXKYU74k.cjs +0 -1
- package/useFocusRing-CbImDrwF.cjs +0 -1
- package/useFocusRing-XnR3cZjO.js +0 -82
- package/useFocusable-NUVSFcRC.cjs +0 -1
- package/useFormValidation-ClximP89.cjs +0 -1
- package/useHasTabbableChild-DCBTulUQ.cjs +0 -1
- package/useHighlightSelectionDescription-CzYucm61.cjs +0 -1
- package/useHover-DjIHtjGN.js +0 -490
- package/useHover-_mv5J4_q.cjs +0 -1
- package/useLabels-BLOfc6Y-.cjs +0 -1
- package/useLocalizedStringFormatter-BKoxGZf1.js +0 -96
- package/useLocalizedStringFormatter-BsxLt89S.cjs +0 -1
- package/useLocalizedStringFormatter-D3JQyjb4.js +0 -21
- package/useLocalizedStringFormatter-ioacM-Yt.cjs +0 -1
- package/usePress-0AjDbW9R.cjs +0 -7
- package/useTextField--czJtyNd.cjs +0 -1
- package/utils-BNtZbAib.cjs +0 -1
- package/utils-DIMfEPAt.js +0 -308
package/useHover-DjIHtjGN.js
DELETED
|
@@ -1,490 +0,0 @@
|
|
|
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
|
-
};
|
package/useHover-_mv5J4_q.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;
|
package/useLabels-BLOfc6Y-.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { $ } from "./context-C81gPYvC.js";
|
|
2
|
-
import { useMemo as b } from "react";
|
|
3
|
-
const g = Symbol.for("react-aria.i18n.locale"), h = Symbol.for("react-aria.i18n.strings");
|
|
4
|
-
let i;
|
|
5
|
-
class c {
|
|
6
|
-
/** Returns a localized string for the given key and locale. */
|
|
7
|
-
getStringForLocale(e, t) {
|
|
8
|
-
let a = this.getStringsForLocale(t)[e];
|
|
9
|
-
if (!a) throw new Error(`Could not find intl message ${e} in ${t} locale`);
|
|
10
|
-
return a;
|
|
11
|
-
}
|
|
12
|
-
/** Returns all localized strings for the given locale. */
|
|
13
|
-
getStringsForLocale(e) {
|
|
14
|
-
let t = this.strings[e];
|
|
15
|
-
return t || (t = w(e, this.strings, this.defaultLocale), this.strings[e] = t), t;
|
|
16
|
-
}
|
|
17
|
-
static getGlobalDictionaryForPackage(e) {
|
|
18
|
-
if (typeof window > "u") return null;
|
|
19
|
-
let t = window[g];
|
|
20
|
-
if (i === void 0) {
|
|
21
|
-
let a = window[h];
|
|
22
|
-
if (!a) return null;
|
|
23
|
-
i = {};
|
|
24
|
-
for (let o in a) i[o] = new c({
|
|
25
|
-
[t]: a[o]
|
|
26
|
-
}, t);
|
|
27
|
-
}
|
|
28
|
-
let r = i == null ? void 0 : i[e];
|
|
29
|
-
if (!r) throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
|
|
30
|
-
return r;
|
|
31
|
-
}
|
|
32
|
-
constructor(e, t = "en-US") {
|
|
33
|
-
this.strings = Object.fromEntries(Object.entries(e).filter(([, r]) => r)), this.defaultLocale = t;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function w(n, e, t = "en-US") {
|
|
37
|
-
if (e[n]) return e[n];
|
|
38
|
-
let r = m(n);
|
|
39
|
-
if (e[r]) return e[r];
|
|
40
|
-
for (let a in e)
|
|
41
|
-
if (a.startsWith(r + "-")) return e[a];
|
|
42
|
-
return e[t];
|
|
43
|
-
}
|
|
44
|
-
function m(n) {
|
|
45
|
-
return Intl.Locale ? new Intl.Locale(n).language : n.split("-")[0];
|
|
46
|
-
}
|
|
47
|
-
const s = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
|
|
48
|
-
class p {
|
|
49
|
-
/** Formats a localized string for the given key with the provided variables. */
|
|
50
|
-
format(e, t) {
|
|
51
|
-
let r = this.strings.getStringForLocale(e, this.locale);
|
|
52
|
-
return typeof r == "function" ? r(t, this) : r;
|
|
53
|
-
}
|
|
54
|
-
plural(e, t, r = "cardinal") {
|
|
55
|
-
let a = t["=" + e];
|
|
56
|
-
if (a) return typeof a == "function" ? a() : a;
|
|
57
|
-
let o = this.locale + ":" + r, l = s.get(o);
|
|
58
|
-
l || (l = new Intl.PluralRules(this.locale, {
|
|
59
|
-
type: r
|
|
60
|
-
}), s.set(o, l));
|
|
61
|
-
let d = l.select(e);
|
|
62
|
-
return a = t[d] || t.other, typeof a == "function" ? a() : a;
|
|
63
|
-
}
|
|
64
|
-
number(e) {
|
|
65
|
-
let t = f.get(this.locale);
|
|
66
|
-
return t || (t = new Intl.NumberFormat(this.locale), f.set(this.locale, t)), t.format(e);
|
|
67
|
-
}
|
|
68
|
-
select(e, t) {
|
|
69
|
-
let r = e[t] || e.other;
|
|
70
|
-
return typeof r == "function" ? r() : r;
|
|
71
|
-
}
|
|
72
|
-
constructor(e, t) {
|
|
73
|
-
this.locale = e, this.strings = t;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
const u = /* @__PURE__ */ new WeakMap();
|
|
77
|
-
function y(n) {
|
|
78
|
-
let e = u.get(n);
|
|
79
|
-
return e || (e = new c(n), u.set(n, e)), e;
|
|
80
|
-
}
|
|
81
|
-
function S(n, e) {
|
|
82
|
-
return e && c.getGlobalDictionaryForPackage(e) || y(n);
|
|
83
|
-
}
|
|
84
|
-
function F(n, e) {
|
|
85
|
-
let { locale: t } = $(), r = S(n, e);
|
|
86
|
-
return b(() => new p(t, r), [
|
|
87
|
-
t,
|
|
88
|
-
r
|
|
89
|
-
]);
|
|
90
|
-
}
|
|
91
|
-
export {
|
|
92
|
-
p as $,
|
|
93
|
-
c as a,
|
|
94
|
-
F as b,
|
|
95
|
-
S as c
|
|
96
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const g=require("./context-DjwhtgxQ.cjs"),h=require("react"),p=Symbol.for("react-aria.i18n.locale"),w=Symbol.for("react-aria.i18n.strings");let i;class l{getStringForLocale(e,t){let a=this.getStringsForLocale(t)[e];if(!a)throw new Error(`Could not find intl message ${e} in ${t} locale`);return a}getStringsForLocale(e){let t=this.strings[e];return t||(t=y(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[p];if(i===void 0){let a=window[w];if(!a)return null;i={};for(let o in a)i[o]=new l({[t]:a[o]},t)}let r=i==null?void 0:i[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=t}}function y(n,e,t="en-US"){if(e[n])return e[n];let r=S(n);if(e[r])return e[r];for(let a in e)if(a.startsWith(r+"-"))return e[a];return e[t]}function S(n){return Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]}const f=new Map,s=new Map;class d{format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(t,this):r}plural(e,t,r="cardinal"){let a=t["="+e];if(a)return typeof a=="function"?a():a;let o=this.locale+":"+r,c=f.get(o);c||(c=new Intl.PluralRules(this.locale,{type:r}),f.set(o,c));let b=c.select(e);return a=t[b]||t.other,typeof a=="function"?a():a}number(e){let t=s.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),s.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return typeof r=="function"?r():r}constructor(e,t){this.locale=e,this.strings=t}}const u=new WeakMap;function m(n){let e=u.get(n);return e||(e=new l(n),u.set(n,e)),e}function $(n,e){return e&&l.getGlobalDictionaryForPackage(e)||m(n)}function v(n,e){let{locale:t}=g.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=$(n,e);return h.useMemo(()=>new d(t,r),[t,r])}exports.$5b160d28a433310d$export$c17fa47878dc55b6=l;exports.$6db58dc88e78b024$export$2f817fcdc4b89ae0=d;exports.$fca6afa0e843324b$export$87b761675e8eaa10=$;exports.$fca6afa0e843324b$export$f12b703ca79dfbb1=v;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { $ as r, a as n } from "./useLocalizedStringFormatter-BKoxGZf1.js";
|
|
2
|
-
import { useMemo as i } from "react";
|
|
3
|
-
import { $ as f } from "./context-C81gPYvC.js";
|
|
4
|
-
const c = /* @__PURE__ */ new WeakMap();
|
|
5
|
-
function d(e) {
|
|
6
|
-
let a = c.get(e);
|
|
7
|
-
return a || (a = new n(e, "sv-SE"), c.set(e, a)), a;
|
|
8
|
-
}
|
|
9
|
-
function $(e, a) {
|
|
10
|
-
return d(e);
|
|
11
|
-
}
|
|
12
|
-
function b(e, a) {
|
|
13
|
-
const { locale: t } = f(), o = $(e);
|
|
14
|
-
return i(
|
|
15
|
-
() => new r(t, o),
|
|
16
|
-
[o, t]
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
b as u
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./useLocalizedStringFormatter-BsxLt89S.cjs"),n=require("react"),i=require("./context-DjwhtgxQ.cjs"),a=new WeakMap;function u(e){let t=a.get(e);return t||(t=new o.$5b160d28a433310d$export$c17fa47878dc55b6(e,"sv-SE"),a.set(e,t)),t}function d(e,t){return u(e)}function f(e,t){const{locale:c}=i.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=d(e);return n.useMemo(()=>new o.$6db58dc88e78b024$export$2f817fcdc4b89ae0(c,r),[r,c])}exports.useLocalizedStringFormatter=f;
|