@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
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
import { jsx as a, jsxs as h, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import v, { useMemo as D, useState as L, useCallback as E, useEffect as O, useRef as q } from "react";
|
|
4
|
+
import { c as V } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
import { f as z } from "./utils-DJhAJHk_.js";
|
|
6
|
+
import { a as j, $ as R, T as G } from "./Tag-Bs8T2Ei7.js";
|
|
7
|
+
import { $ as W } from "./TextField-ByDJkig9.js";
|
|
8
|
+
import { c as H } from "./Collection--62xKPm9.js";
|
|
9
|
+
import { C as P } from "./Checkbox-LuUwTZ3W.js";
|
|
10
|
+
import { L as U, c as X, a as J, b as Q } from "./ListBoxSection-BVR2xtOH.js";
|
|
11
|
+
import { C as Y } from "./check-CLF6Yxza.js";
|
|
12
|
+
import { g as Z } from "./useHover-DQvJ3Y-W.js";
|
|
13
|
+
import { o as ee, p as te } from "./Dialog-CtVrVuMr.js";
|
|
14
|
+
import { $ as le, a as oe } from "./ListKeyboardDelegate-CY6t6y1t.js";
|
|
15
|
+
import { g as ae } from "./SelectionManager-zsWy3vsd.js";
|
|
16
|
+
import { a as K, c as re, e as ne } from "./mergeProps-C1U1OIeJ.js";
|
|
17
|
+
import { $ as ie } from "./filterDOMProps-D6KHYVBX.js";
|
|
18
|
+
import { $ as ce } from "./useField-BEBXv5Mh.js";
|
|
19
|
+
import { $ as se, a as de, b as ue } from "./useFormValidation-BzzruZKm.js";
|
|
20
|
+
import { $ as fe } from "./useListState-CebsX_1d.js";
|
|
21
|
+
import { u as me } from "./useObserveElement-BdI4zgd7.js";
|
|
22
|
+
import { a as pe } from "./VisuallyHidden-CYfmTSCD.js";
|
|
23
|
+
import { a as he, L as be } from "./Label-TVxwGZ-O.js";
|
|
24
|
+
import { T as ge } from "./Text-DlKqpvSa.js";
|
|
25
|
+
import { L as ye } from "./ListBoxButton-C_krklY0.js";
|
|
26
|
+
import { X as $e } from "./x-JK7i-TQC.js";
|
|
27
|
+
import { u as B } from "./useLocalizedStringFormatter-N0AyjzbM.js";
|
|
28
|
+
import { $ as xe } from "./useButton-1-Jf-oHj.js";
|
|
29
|
+
import { C as ve } from "./chevron-down-Cd1bkzXT.js";
|
|
30
|
+
import { $ as Se } from "./FieldError-BbR-29BM.js";
|
|
31
|
+
import { F as Ce } from "./FieldError-B3YFj-an.js";
|
|
32
|
+
import './assets/Select.css';function I(e) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
I.getCollectionNode = function* (t, r) {
|
|
36
|
+
let { childItems: i, title: o, children: n } = t, l = t.title || t.children, s = t.textValue || (typeof l == "string" ? l : "") || t["aria-label"] || "";
|
|
37
|
+
!s && !(r != null && r.suppressTextValueWarning) && process.env.NODE_ENV !== "production" && console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."), yield {
|
|
38
|
+
type: "item",
|
|
39
|
+
props: t,
|
|
40
|
+
rendered: l,
|
|
41
|
+
textValue: s,
|
|
42
|
+
"aria-label": t["aria-label"],
|
|
43
|
+
hasChildNodes: Ke(t),
|
|
44
|
+
*childNodes() {
|
|
45
|
+
if (i) for (let c of i) yield {
|
|
46
|
+
type: "item",
|
|
47
|
+
value: c
|
|
48
|
+
};
|
|
49
|
+
else if (o) {
|
|
50
|
+
let c = [];
|
|
51
|
+
v.Children.forEach(n, (u) => {
|
|
52
|
+
c.push({
|
|
53
|
+
type: "item",
|
|
54
|
+
element: u
|
|
55
|
+
});
|
|
56
|
+
}), yield* c;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
function Ke(e) {
|
|
62
|
+
return e.hasChildItems != null ? e.hasChildItems : !!(e.childItems || e.title && v.Children.count(e.children) > 0);
|
|
63
|
+
}
|
|
64
|
+
let _ = I;
|
|
65
|
+
function N(e) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
N.getCollectionNode = function* (t) {
|
|
69
|
+
let { children: r, title: i, items: o } = t;
|
|
70
|
+
yield {
|
|
71
|
+
type: "section",
|
|
72
|
+
props: t,
|
|
73
|
+
hasChildNodes: !0,
|
|
74
|
+
rendered: i,
|
|
75
|
+
"aria-label": t["aria-label"],
|
|
76
|
+
*childNodes() {
|
|
77
|
+
if (typeof r == "function") {
|
|
78
|
+
if (!o) throw new Error("props.children was a function but props.items is missing");
|
|
79
|
+
for (let n of o) yield {
|
|
80
|
+
type: "item",
|
|
81
|
+
value: n,
|
|
82
|
+
renderer: r
|
|
83
|
+
};
|
|
84
|
+
} else {
|
|
85
|
+
let n = [];
|
|
86
|
+
v.Children.forEach(r, (l) => {
|
|
87
|
+
n.push({
|
|
88
|
+
type: "item",
|
|
89
|
+
element: l
|
|
90
|
+
});
|
|
91
|
+
}), yield* n;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
let _e = N;
|
|
97
|
+
const ke = "_wrapper_1rlqo_10", we = "_trigger_1rlqo_21", Ve = "_medium_1rlqo_35", Pe = "_icon_1rlqo_71", Be = "_tagGroup_1rlqo_77", Ie = "_listBoxItemCheckmark_1rlqo_93", Ne = "_triggerContainer_1rlqo_98", Me = "_selectValueTag_1rlqo_104", Te = "_clearButton_1rlqo_120", Fe = "_truncate_1rlqo_132", Ae = "_checkboxContainer_1rlqo_169", p = {
|
|
98
|
+
wrapper: ke,
|
|
99
|
+
trigger: we,
|
|
100
|
+
medium: Ve,
|
|
101
|
+
icon: Pe,
|
|
102
|
+
tagGroup: Be,
|
|
103
|
+
listBoxItemCheckmark: Ie,
|
|
104
|
+
triggerContainer: Ne,
|
|
105
|
+
selectValueTag: Me,
|
|
106
|
+
clearButton: Te,
|
|
107
|
+
truncate: Fe,
|
|
108
|
+
checkboxContainer: Ae
|
|
109
|
+
}, M = ({ item: e }) => /* @__PURE__ */ a(
|
|
110
|
+
J,
|
|
111
|
+
{
|
|
112
|
+
...e.value,
|
|
113
|
+
textValue: e.textValue,
|
|
114
|
+
children: ({ isDisabled: t, isSelected: r, selectionMode: i }) => /* @__PURE__ */ h(A, { children: [
|
|
115
|
+
i === "multiple" ? /* @__PURE__ */ a("div", { className: p.checkboxContainer, children: /* @__PURE__ */ a(
|
|
116
|
+
P,
|
|
117
|
+
{
|
|
118
|
+
isDisabled: t,
|
|
119
|
+
isSelected: r,
|
|
120
|
+
isReadOnly: !0,
|
|
121
|
+
excludeFromTabOrder: !0,
|
|
122
|
+
"aria-label": e.textValue
|
|
123
|
+
}
|
|
124
|
+
) }) : null,
|
|
125
|
+
e.rendered,
|
|
126
|
+
r && i === "single" ? /* @__PURE__ */ a(
|
|
127
|
+
Y,
|
|
128
|
+
{
|
|
129
|
+
size: 20,
|
|
130
|
+
className: p.listBoxItemCheckmark
|
|
131
|
+
}
|
|
132
|
+
) : null
|
|
133
|
+
] })
|
|
134
|
+
}
|
|
135
|
+
), De = ({ section: e, state: t }) => /* @__PURE__ */ a(X, { ...e.value, children: t.collection.getChildren ? /* @__PURE__ */ a(H, { items: t.collection.getChildren(e.key), children: (r) => /* @__PURE__ */ a(M, { item: r }) }) : null }), Le = ({
|
|
136
|
+
state: e,
|
|
137
|
+
...t
|
|
138
|
+
}) => /* @__PURE__ */ a(
|
|
139
|
+
U,
|
|
140
|
+
{
|
|
141
|
+
...t,
|
|
142
|
+
...e,
|
|
143
|
+
escapeKeyBehavior: "none",
|
|
144
|
+
onSelectionChange: e.setSelectedKeys,
|
|
145
|
+
items: e.collection,
|
|
146
|
+
children: (r) => r.type === "section" ? /* @__PURE__ */ a(
|
|
147
|
+
De,
|
|
148
|
+
{
|
|
149
|
+
state: e,
|
|
150
|
+
section: r
|
|
151
|
+
}
|
|
152
|
+
) : /* @__PURE__ */ a(M, { item: r })
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
function Ee(e, t, r) {
|
|
156
|
+
const { disallowEmptySelection: i, isDisabled: o } = e, n = le({ usage: "search", sensitivity: "base" }), l = D(
|
|
157
|
+
() => new oe(
|
|
158
|
+
t.collection,
|
|
159
|
+
t.disabledKeys,
|
|
160
|
+
null,
|
|
161
|
+
n
|
|
162
|
+
),
|
|
163
|
+
[t.collection, t.disabledKeys, n]
|
|
164
|
+
), { menuTriggerProps: s, menuProps: c } = ee(
|
|
165
|
+
{
|
|
166
|
+
isDisabled: o,
|
|
167
|
+
type: "listbox"
|
|
168
|
+
},
|
|
169
|
+
t,
|
|
170
|
+
r
|
|
171
|
+
), u = (f) => {
|
|
172
|
+
const { selectedKeys: x, selectionMode: F } = t, C = x.values().next().value;
|
|
173
|
+
if (F === "single")
|
|
174
|
+
switch (f.key) {
|
|
175
|
+
case "ArrowLeft": {
|
|
176
|
+
f.preventDefault();
|
|
177
|
+
const $ = x.size > 0 ? l.getKeyAbove(C) : l.getFirstKey();
|
|
178
|
+
$ && t.setSelectedKeys([$]);
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
case "ArrowRight": {
|
|
182
|
+
f.preventDefault();
|
|
183
|
+
const $ = x.size > 0 ? l.getKeyBelow(C) : l.getFirstKey();
|
|
184
|
+
$ && t.setSelectedKeys([$]);
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}, { typeSelectProps: d } = ae({
|
|
189
|
+
keyboardDelegate: l,
|
|
190
|
+
selectionManager: t.selectionManager,
|
|
191
|
+
onTypeSelect(f) {
|
|
192
|
+
t.setSelectedKeys([f]);
|
|
193
|
+
}
|
|
194
|
+
}), { labelProps: y, fieldProps: b } = ce({
|
|
195
|
+
...e,
|
|
196
|
+
labelElementType: "span"
|
|
197
|
+
});
|
|
198
|
+
d.onKeyDown = d.onKeyDownCapture, delete d.onKeyDownCapture;
|
|
199
|
+
const m = ie(e, { labelable: !0 }), g = K(d, s, b), S = re();
|
|
200
|
+
return {
|
|
201
|
+
labelProps: {
|
|
202
|
+
...y,
|
|
203
|
+
onClick: () => {
|
|
204
|
+
var f;
|
|
205
|
+
e.isDisabled || ((f = r.current) == null || f.focus(), Z("keyboard"));
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
triggerProps: K(m, {
|
|
209
|
+
...g,
|
|
210
|
+
onKeyDown: ne(
|
|
211
|
+
g.onKeyDown,
|
|
212
|
+
u,
|
|
213
|
+
e.onKeyDown
|
|
214
|
+
),
|
|
215
|
+
onKeyUp: e.onKeyUp,
|
|
216
|
+
"aria-labelledby": [
|
|
217
|
+
g["aria-labelledby"],
|
|
218
|
+
g["aria-label"] && !g["aria-labelledby"] ? g.id : null,
|
|
219
|
+
S
|
|
220
|
+
].filter(Boolean).join(" "),
|
|
221
|
+
onFocus(f) {
|
|
222
|
+
t.isFocused || (e.onFocus && e.onFocus(f), t.setFocused(!0));
|
|
223
|
+
},
|
|
224
|
+
onBlur(f) {
|
|
225
|
+
t.isOpen || (e.onBlur && e.onBlur(f), t.setFocused(!1));
|
|
226
|
+
}
|
|
227
|
+
}),
|
|
228
|
+
valueProps: {
|
|
229
|
+
id: S
|
|
230
|
+
},
|
|
231
|
+
menuProps: {
|
|
232
|
+
...c,
|
|
233
|
+
disallowEmptySelection: i,
|
|
234
|
+
autoFocus: t.focusStrategy || !0,
|
|
235
|
+
shouldSelectOnPressUp: !0,
|
|
236
|
+
shouldFocusOnHover: !0,
|
|
237
|
+
onBlur: (f) => {
|
|
238
|
+
f.currentTarget.contains(f.relatedTarget) || (e.onBlur && e.onBlur(f), t.setFocused(!1));
|
|
239
|
+
},
|
|
240
|
+
"aria-labelledby": [
|
|
241
|
+
b["aria-labelledby"],
|
|
242
|
+
g["aria-label"] && !b["aria-labelledby"] ? g.id : null
|
|
243
|
+
].filter(Boolean).join(" ")
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function Oe(e) {
|
|
248
|
+
const {
|
|
249
|
+
collection: t,
|
|
250
|
+
disabledKeys: r,
|
|
251
|
+
selectionManager: i,
|
|
252
|
+
selectionManager: { setSelectedKeys: o, selectedKeys: n, selectionMode: l }
|
|
253
|
+
} = fe(e), s = [], c = n.size !== 0 ? Array.from(n).map((u) => {
|
|
254
|
+
const d = t.getItem(u);
|
|
255
|
+
return d || s.push(u), d;
|
|
256
|
+
}).filter(Boolean) : null;
|
|
257
|
+
return s.length && console.warn(
|
|
258
|
+
`Select: Keys "${s.join(
|
|
259
|
+
", "
|
|
260
|
+
)}" passed to "selectedKeys" are not present in the collection.`
|
|
261
|
+
), {
|
|
262
|
+
collection: t,
|
|
263
|
+
disabledKeys: r,
|
|
264
|
+
selectionManager: i,
|
|
265
|
+
selectionMode: l,
|
|
266
|
+
selectedKeys: n,
|
|
267
|
+
setSelectedKeys: o.bind(i),
|
|
268
|
+
selectedItems: c
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function qe(e) {
|
|
272
|
+
const [t, r] = L(!1), i = te(e), o = e.selectionMode === "single", n = Oe({
|
|
273
|
+
...e,
|
|
274
|
+
onSelectionChange: (d) => {
|
|
275
|
+
e.onSelectionChange && e.onSelectionChange(d), o && i.close();
|
|
276
|
+
}
|
|
277
|
+
}), l = se({
|
|
278
|
+
...e,
|
|
279
|
+
validationBehavior: "native",
|
|
280
|
+
value: n.selectedKeys
|
|
281
|
+
}), s = n.collection.size === 0, c = !!n.selectedKeys.size, u = E(() => {
|
|
282
|
+
l.resetValidation(), l.commitValidation();
|
|
283
|
+
}, [l]);
|
|
284
|
+
return O(() => {
|
|
285
|
+
o && c && u();
|
|
286
|
+
}, [c, o, u]), {
|
|
287
|
+
...n,
|
|
288
|
+
...i,
|
|
289
|
+
close() {
|
|
290
|
+
i.close(), c && u();
|
|
291
|
+
},
|
|
292
|
+
open() {
|
|
293
|
+
s || i.open();
|
|
294
|
+
},
|
|
295
|
+
toggle(d) {
|
|
296
|
+
s || i.toggle(d);
|
|
297
|
+
},
|
|
298
|
+
isFocused: t,
|
|
299
|
+
setFocused: r,
|
|
300
|
+
...l
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function ze({
|
|
304
|
+
autoComplete: e,
|
|
305
|
+
name: t,
|
|
306
|
+
isDisabled: r,
|
|
307
|
+
isRequired: i,
|
|
308
|
+
selectRef: o
|
|
309
|
+
}, n, l) {
|
|
310
|
+
const { visuallyHiddenProps: s } = pe();
|
|
311
|
+
return de(o, n.selectedKeys, n.setSelectedKeys), ue(
|
|
312
|
+
{
|
|
313
|
+
validationBehavior: "native",
|
|
314
|
+
focus: () => {
|
|
315
|
+
var c;
|
|
316
|
+
return (c = l.current) == null ? void 0 : c.focus();
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
n,
|
|
320
|
+
o
|
|
321
|
+
), {
|
|
322
|
+
containerProps: {
|
|
323
|
+
...s,
|
|
324
|
+
"aria-hidden": !0,
|
|
325
|
+
// @ts-expect-error - data-a11y-ignore is not a standard attribute
|
|
326
|
+
"data-react-aria-prevent-focus": !0,
|
|
327
|
+
"data-a11y-ignore": "aria-hidden-focus"
|
|
328
|
+
},
|
|
329
|
+
inputProps: {
|
|
330
|
+
style: { display: "none" }
|
|
331
|
+
},
|
|
332
|
+
selectProps: {
|
|
333
|
+
tabIndex: -1,
|
|
334
|
+
autoComplete: e,
|
|
335
|
+
disabled: r,
|
|
336
|
+
required: i,
|
|
337
|
+
name: t,
|
|
338
|
+
value: Array.from(n.selectedKeys).map((c) => c.toString()),
|
|
339
|
+
onChange: (c) => n.setSelectedKeys(c.target.value),
|
|
340
|
+
multiple: !0
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function je(e) {
|
|
345
|
+
const { state: t, triggerRef: r, name: i, isDisabled: o } = e, n = `${e.label}-hidden`, l = q(null), { containerProps: s, selectProps: c } = ze(
|
|
346
|
+
{ ...e, selectRef: l },
|
|
347
|
+
t,
|
|
348
|
+
r
|
|
349
|
+
);
|
|
350
|
+
return t.collection.size <= 300 ? /* @__PURE__ */ a(
|
|
351
|
+
"div",
|
|
352
|
+
{
|
|
353
|
+
...s,
|
|
354
|
+
"data-testid": "hidden-select-container",
|
|
355
|
+
children: /* @__PURE__ */ h("label", { children: [
|
|
356
|
+
n,
|
|
357
|
+
/* @__PURE__ */ h(
|
|
358
|
+
"select",
|
|
359
|
+
{
|
|
360
|
+
...c,
|
|
361
|
+
ref: l,
|
|
362
|
+
children: [
|
|
363
|
+
/* @__PURE__ */ a("option", {}),
|
|
364
|
+
[...t.collection.getKeys()].map((u) => {
|
|
365
|
+
const d = t.collection.getItem(u);
|
|
366
|
+
return d && d.type === "item" ? /* @__PURE__ */ a(
|
|
367
|
+
"option",
|
|
368
|
+
{
|
|
369
|
+
value: d.key,
|
|
370
|
+
children: d.textValue
|
|
371
|
+
},
|
|
372
|
+
d.key
|
|
373
|
+
) : null;
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
)
|
|
378
|
+
] })
|
|
379
|
+
}
|
|
380
|
+
) : i ? /* @__PURE__ */ a(
|
|
381
|
+
"input",
|
|
382
|
+
{
|
|
383
|
+
type: "hidden",
|
|
384
|
+
autoComplete: c.autoComplete,
|
|
385
|
+
name: i,
|
|
386
|
+
disabled: o,
|
|
387
|
+
value: Array.from(t.selectedKeys).map((u) => u.toString()) ?? [""]
|
|
388
|
+
}
|
|
389
|
+
) : null;
|
|
390
|
+
}
|
|
391
|
+
const Re = {
|
|
392
|
+
clearAll: "Clear all",
|
|
393
|
+
selectAll: "Select all",
|
|
394
|
+
selectedItems: "Selected items",
|
|
395
|
+
chosen: "chosen"
|
|
396
|
+
}, Ge = {
|
|
397
|
+
clearAll: "Rensa alla",
|
|
398
|
+
selectAll: "Välj alla",
|
|
399
|
+
selectedItems: "Valda objekt",
|
|
400
|
+
chosen: "valda"
|
|
401
|
+
}, T = {
|
|
402
|
+
en: Re,
|
|
403
|
+
sv: Ge
|
|
404
|
+
}, We = ({
|
|
405
|
+
state: { selectedItems: e },
|
|
406
|
+
isDisabled: t,
|
|
407
|
+
parentWidth: r,
|
|
408
|
+
onClear: i,
|
|
409
|
+
triggerRef: o,
|
|
410
|
+
isClearable: n
|
|
411
|
+
}) => {
|
|
412
|
+
const l = B(T);
|
|
413
|
+
return /* @__PURE__ */ h(
|
|
414
|
+
"div",
|
|
415
|
+
{
|
|
416
|
+
className: p.selectValueTag,
|
|
417
|
+
"data-disabled": t || void 0,
|
|
418
|
+
children: [
|
|
419
|
+
/* @__PURE__ */ a(
|
|
420
|
+
"span",
|
|
421
|
+
{
|
|
422
|
+
className: p.truncate,
|
|
423
|
+
style: { maxWidth: r - 92 },
|
|
424
|
+
children: e != null && e.length && e.length > 1 ? `${e.length} ${l.format("chosen")}` : e == null ? void 0 : e[0].textValue
|
|
425
|
+
}
|
|
426
|
+
),
|
|
427
|
+
n && /* @__PURE__ */ a(
|
|
428
|
+
"button",
|
|
429
|
+
{
|
|
430
|
+
disabled: t,
|
|
431
|
+
"aria-label": l.format("clearAll"),
|
|
432
|
+
className: p.clearButton,
|
|
433
|
+
onClick: () => {
|
|
434
|
+
var s;
|
|
435
|
+
i(), (s = o == null ? void 0 : o.current) == null || s.focus();
|
|
436
|
+
},
|
|
437
|
+
children: /* @__PURE__ */ a(
|
|
438
|
+
$e,
|
|
439
|
+
{
|
|
440
|
+
width: 20,
|
|
441
|
+
height: 20
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
}
|
|
445
|
+
)
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
}, He = ({
|
|
450
|
+
autoFocus: e,
|
|
451
|
+
excludeFromTabOrder: t,
|
|
452
|
+
isDisabled: r,
|
|
453
|
+
size: i = "large",
|
|
454
|
+
isOpen: o,
|
|
455
|
+
isInvalid: n,
|
|
456
|
+
selectionMode: l,
|
|
457
|
+
state: { selectedItems: s },
|
|
458
|
+
placeholder: c,
|
|
459
|
+
children: u,
|
|
460
|
+
triggerRef: d,
|
|
461
|
+
...y
|
|
462
|
+
}) => {
|
|
463
|
+
const { buttonProps: b } = xe(
|
|
464
|
+
{ autoFocus: e, excludeFromTabOrder: t, isDisabled: r, ...y },
|
|
465
|
+
d
|
|
466
|
+
), m = l === "multiple";
|
|
467
|
+
return /* @__PURE__ */ h(
|
|
468
|
+
"div",
|
|
469
|
+
{
|
|
470
|
+
className: p.triggerContainer,
|
|
471
|
+
"data-disabled": r || void 0,
|
|
472
|
+
children: [
|
|
473
|
+
/* @__PURE__ */ h(
|
|
474
|
+
"button",
|
|
475
|
+
{
|
|
476
|
+
...b,
|
|
477
|
+
autoFocus: e,
|
|
478
|
+
className: V(p.trigger, {
|
|
479
|
+
[p.medium]: i === "medium"
|
|
480
|
+
}),
|
|
481
|
+
"data-disabled": r || void 0,
|
|
482
|
+
"data-invalid": n || void 0,
|
|
483
|
+
"data-open": o || void 0,
|
|
484
|
+
ref: d,
|
|
485
|
+
type: "button",
|
|
486
|
+
children: [
|
|
487
|
+
m && !s ? /* @__PURE__ */ a("span", { children: c }) : null,
|
|
488
|
+
m ? null : /* @__PURE__ */ a("span", { children: s ? s[0].textValue : c }),
|
|
489
|
+
/* @__PURE__ */ a(
|
|
490
|
+
"div",
|
|
491
|
+
{
|
|
492
|
+
className: p.icon,
|
|
493
|
+
"aria-hidden": "true",
|
|
494
|
+
children: /* @__PURE__ */ a(ve, { size: 20 })
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
),
|
|
500
|
+
u
|
|
501
|
+
]
|
|
502
|
+
}
|
|
503
|
+
);
|
|
504
|
+
}, k = ({
|
|
505
|
+
state: e,
|
|
506
|
+
errorMessage: t
|
|
507
|
+
}) => /* @__PURE__ */ a(Se.Provider, { value: { ...e.displayValidation }, children: /* @__PURE__ */ a(Ce, { children: t }) }), Ue = w.forwardRef(
|
|
508
|
+
({ isClearable: e = !0, popover: t, ...r }, i) => {
|
|
509
|
+
const o = {
|
|
510
|
+
selectionMode: "single",
|
|
511
|
+
errorPosition: "top",
|
|
512
|
+
disallowEmptySelection: !e,
|
|
513
|
+
isClearable: e,
|
|
514
|
+
size: "large",
|
|
515
|
+
popover: t,
|
|
516
|
+
...r
|
|
517
|
+
}, n = z(i), l = qe(o), s = B(T), { labelProps: c, triggerProps: u, valueProps: d, menuProps: y } = Ee(
|
|
518
|
+
o,
|
|
519
|
+
l,
|
|
520
|
+
n
|
|
521
|
+
), { width: b } = me(n.current, {
|
|
522
|
+
includePadding: !0
|
|
523
|
+
});
|
|
524
|
+
return /* @__PURE__ */ h(
|
|
525
|
+
W,
|
|
526
|
+
{
|
|
527
|
+
...o,
|
|
528
|
+
className: V(p.wrapper, o.className),
|
|
529
|
+
children: [
|
|
530
|
+
/* @__PURE__ */ a(
|
|
531
|
+
je,
|
|
532
|
+
{
|
|
533
|
+
...o,
|
|
534
|
+
state: l,
|
|
535
|
+
triggerRef: n
|
|
536
|
+
}
|
|
537
|
+
),
|
|
538
|
+
/* @__PURE__ */ a(he, { popover: t, children: o.label && /* @__PURE__ */ a(
|
|
539
|
+
be,
|
|
540
|
+
{
|
|
541
|
+
...c,
|
|
542
|
+
"data-disabled": o.isDisabled || void 0,
|
|
543
|
+
children: o.label
|
|
544
|
+
}
|
|
545
|
+
) }),
|
|
546
|
+
o.description && /* @__PURE__ */ a(ge, { slot: "description", children: o.description }),
|
|
547
|
+
o.errorPosition === "top" && /* @__PURE__ */ a(
|
|
548
|
+
k,
|
|
549
|
+
{
|
|
550
|
+
...o,
|
|
551
|
+
state: l
|
|
552
|
+
}
|
|
553
|
+
),
|
|
554
|
+
/* @__PURE__ */ a(
|
|
555
|
+
He,
|
|
556
|
+
{
|
|
557
|
+
...o,
|
|
558
|
+
...u,
|
|
559
|
+
isInvalid: l.displayValidation.isInvalid,
|
|
560
|
+
triggerRef: n,
|
|
561
|
+
state: l,
|
|
562
|
+
children: o.selectionMode === "multiple" && l.selectedItems ? /* @__PURE__ */ a("span", { ...d, children: /* @__PURE__ */ a(
|
|
563
|
+
We,
|
|
564
|
+
{
|
|
565
|
+
...o,
|
|
566
|
+
state: l,
|
|
567
|
+
parentWidth: b,
|
|
568
|
+
onClear: () => l.selectionManager.clearSelection(),
|
|
569
|
+
triggerRef: n
|
|
570
|
+
}
|
|
571
|
+
) }) : null
|
|
572
|
+
}
|
|
573
|
+
),
|
|
574
|
+
o.errorPosition === "bottom" && /* @__PURE__ */ a(
|
|
575
|
+
k,
|
|
576
|
+
{
|
|
577
|
+
...o,
|
|
578
|
+
state: l
|
|
579
|
+
}
|
|
580
|
+
),
|
|
581
|
+
/* @__PURE__ */ h(
|
|
582
|
+
Q,
|
|
583
|
+
{
|
|
584
|
+
isOpen: l.isOpen,
|
|
585
|
+
onOpenChange: (m) => {
|
|
586
|
+
m || l.close();
|
|
587
|
+
},
|
|
588
|
+
triggerRef: n,
|
|
589
|
+
style: { width: b },
|
|
590
|
+
children: [
|
|
591
|
+
o.isSelectableAll && /* @__PURE__ */ h(
|
|
592
|
+
ye,
|
|
593
|
+
{
|
|
594
|
+
onClick: () => l.selectionManager.toggleSelectAll(),
|
|
595
|
+
children: [
|
|
596
|
+
/* @__PURE__ */ a("div", { className: p.checkboxContainer, children: /* @__PURE__ */ a(
|
|
597
|
+
P,
|
|
598
|
+
{
|
|
599
|
+
isSelected: l.selectionManager.isSelectAll,
|
|
600
|
+
isIndeterminate: !l.selectionManager.isSelectAll && !l.selectionManager.isEmpty,
|
|
601
|
+
isReadOnly: !0,
|
|
602
|
+
excludeFromTabOrder: !0
|
|
603
|
+
}
|
|
604
|
+
) }),
|
|
605
|
+
/* @__PURE__ */ a("span", { children: s.format("selectAll") })
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
/* @__PURE__ */ a(
|
|
610
|
+
Le,
|
|
611
|
+
{
|
|
612
|
+
...y,
|
|
613
|
+
state: l
|
|
614
|
+
}
|
|
615
|
+
)
|
|
616
|
+
]
|
|
617
|
+
}
|
|
618
|
+
),
|
|
619
|
+
o.showTags && !!l.selectedItems && /* @__PURE__ */ a(
|
|
620
|
+
j,
|
|
621
|
+
{
|
|
622
|
+
"aria-label": s.format("selectedItems"),
|
|
623
|
+
selectionBehavior: "toggle",
|
|
624
|
+
onRemove: (m) => l.selectionManager.toggleSelection(Array.from(m)[0]),
|
|
625
|
+
className: p.tagGroup,
|
|
626
|
+
children: /* @__PURE__ */ a(R, { items: l.selectedItems, children: (m) => /* @__PURE__ */ a(
|
|
627
|
+
G,
|
|
628
|
+
{
|
|
629
|
+
textValue: m.textValue,
|
|
630
|
+
id: m.key,
|
|
631
|
+
dismissable: !0,
|
|
632
|
+
isDisabled: o.isDisabled,
|
|
633
|
+
children: m.textValue
|
|
634
|
+
},
|
|
635
|
+
m.key
|
|
636
|
+
) })
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
}
|
|
643
|
+
), Xe = w.forwardRef(
|
|
644
|
+
({ options: e, ...t }, r) => /* @__PURE__ */ a(
|
|
645
|
+
Ue,
|
|
646
|
+
{
|
|
647
|
+
...t,
|
|
648
|
+
items: e,
|
|
649
|
+
ref: r,
|
|
650
|
+
children: (i) => i.children ? /* @__PURE__ */ a(
|
|
651
|
+
_e,
|
|
652
|
+
{
|
|
653
|
+
items: i.children,
|
|
654
|
+
title: i.name,
|
|
655
|
+
children: (o) => /* @__PURE__ */ a(_, { textValue: o.textValue, children: o.name })
|
|
656
|
+
},
|
|
657
|
+
i.name
|
|
658
|
+
) : /* @__PURE__ */ a(_, { textValue: i.textValue, children: i.name })
|
|
659
|
+
}
|
|
660
|
+
)
|
|
661
|
+
);
|
|
662
|
+
Xe.displayName = "Select";
|
|
663
|
+
export {
|
|
664
|
+
Xe as S
|
|
665
|
+
};
|