@midas-ds/components 10.3.0 → 10.4.1
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-D2QYNgZS.cjs +1 -0
- package/{AccordionItem-ChHpW8EW.js → AccordionItem-oeN1Cc09.js} +41 -39
- package/{Breadcrumbs-CwDUNIqF.js → Breadcrumbs-D8ad6xvL.js} +77 -65
- package/Breadcrumbs-DkJIkGG5.cjs +1 -0
- package/{Button-DjBChs7s.js → Button-CFYdzG0H.js} +24 -23
- package/Button-DExMoP5f.cjs +1 -0
- package/{Button-BoJl6JGM.cjs → Button-Dq6ugqxT.cjs} +1 -1
- package/{Button-Csih3v23.js → Button-DtSrCAf6.js} +2 -2
- package/Button.module-D-mPLRxe.js +14 -0
- package/Button.module-goCEz5qs.cjs +1 -0
- package/CHANGELOG.md +41 -0
- package/{Card-yrtGzt70.js → Card-BzJ_OEe6.js} +4 -4
- package/{Card-0G0mj9q5.cjs → Card-cdL5669N.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-CcTfzurp.js +160 -0
- package/CheckboxGroup-DWxQTABg.cjs +1 -0
- package/{Collection-Brgjpkne.js → Collection--62xKPm9.js} +17 -16
- package/Collection-BtBX5IMY.cjs +1 -0
- package/ColorSchemeSwitch-owUryjYz.cjs +16 -0
- package/{ColorSchemeSwitch-BpzQ7g0b.js → ColorSchemeSwitch-y8qKczjQ.js} +53 -36
- package/{ComboBox-CVDyp2a-.js → ComboBox-CZyP8Dfh.js} +310 -299
- package/ComboBox-Dg2xhkLC.cjs +1 -0
- package/{DateField-DeDhiYnW.cjs → DateField-1w5J_iyF.cjs} +1 -1
- package/{DateField-DhU3q-rG.js → DateField-BTROlenJ.js} +4 -4
- package/DateInputDivider-3BvwXXa9.cjs +1 -0
- package/{DateInputDivider-CF4xWsMT.js → DateInputDivider-Bi5N-C0c.js} +90 -86
- package/DateRangePicker-CX3830ZF.cjs +6 -0
- package/{DateRangePicker-ziD1_k1W.js → DateRangePicker-DmZP9laM.js} +120 -117
- package/Dialog-0ZBhhPyd.js +221 -0
- package/Dialog-CSnN6baf.cjs +1 -0
- package/{Dialog-D14MbJ7o.js → Dialog-CtVrVuMr.js} +101 -98
- package/Dialog-DnMwnqiC.cjs +1 -0
- package/DragAndDrop-BoEd260f.cjs +1 -0
- package/{DragAndDrop-o3ruz_SR.js → DragAndDrop-DkSTL28C.js} +2 -2
- package/{Dropdown-Df58j43I.js → Dropdown-BEAMfAxj.js} +19 -19
- package/Dropdown-By91MEV2.cjs +6 -0
- 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-DvQdIZ6k.js} +496 -475
- package/{FileUpload-CxCOtyB9.cjs → FileUpload-vf0oJd0K.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-CzwbOdRG.cjs +1 -0
- package/{InfoBanner-BLM-TJJ6.js → InfoBanner-yj90XVEP.js} +47 -39
- package/{Input-BTzwcf72.js → Input-LnjmFI1x.js} +13 -12
- package/Input-MJji5hhq.cjs +1 -0
- package/Label-D2GmP8_2.js +78 -0
- package/Label-E3LhQfNv.cjs +1 -0
- package/Layout-BMNgqjXv.js +498 -0
- package/Layout-Ri7XQHFp.cjs +16 -0
- package/Link-BCVI5W_i.js +59 -0
- package/{Link-yNO2-sqx.js → Link-Bn8V3ZI0.js} +8 -7
- package/Link-CVvnCOGP.cjs +6 -0
- package/Link-CidjjqHb.cjs +1 -0
- package/LinkButton-B6AWNiRn.cjs +6 -0
- package/LinkButton-Cui-gvAk.js +69 -0
- 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-Bpq-hyZa.js} +2 -2
- package/{ProgressBar-Jbg28j2a.cjs → ProgressBar-D4lOEhAh.cjs} +1 -1
- package/{Radio-Cz29wPXd.js → Radio-BPcq9kW5.js} +50 -47
- package/Radio-CwNbUGah.cjs +1 -0
- package/{RangeCalendar-RAlAHlNL.js → RangeCalendar-6miAJVoO.js} +349 -342
- package/RangeCalendar-CAI1PRDo.cjs +11 -0
- package/SSRProvider-40TXmsUG.js +50 -0
- package/SSRProvider-Bc-sMhsT.cjs +1 -0
- package/SearchField-CDyD5iWr.js +371 -0
- package/SearchField-DEoGi9xv.cjs +6 -0
- package/Select-B2wYDnAU.js +665 -0
- package/Select-nRN944QZ.cjs +1 -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-VSyPhiJ9.js +51 -0
- package/Spinner-vof0Y9Hh.cjs +6 -0
- package/TabList-CheXtBJm.cjs +1 -0
- package/TabList-D0qzIjSx.js +435 -0
- package/Table-DAhnYYIA.cjs +16 -0
- package/{Table-F4oYBtUM.js → Table-zKvjzd9t.js} +66 -64
- package/{Tag-Du7GvSv2.js → Tag-BoqT5nbh.js} +142 -140
- package/Tag-t-aJVo3W.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-B5und61h.cjs +1 -0
- package/TextArea-Pxr-eLXe.js +119 -0
- package/TextField-BdK9KEQ5.cjs +1 -0
- package/{TextField-C-hTPukq.js → TextField-ByDJkig9.js} +23 -22
- package/Toast-DdmSvNaO.cjs +1 -0
- package/{Toast-Btg21Xge.js → Toast-DfKiA5hp.js} +79 -72
- package/ToggleButtonGroup-DZ_wo0qx.cjs +1 -0
- package/{ToggleButtonGroup-B5yz1tm2.js → ToggleButtonGroup-DhlfvYGg.js} +47 -46
- 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/arrow-right-BGd86zzR.cjs +6 -0
- package/{arrow-right-Dg8sttFO.js → arrow-right-uemUGIg8.js} +5 -5
- package/assets/Button.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/FileUpload.css +1 -1
- package/assets/LinkButton.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/assets/Tag.css +1 -1
- 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/Card.d.ts +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/check-B0aKTFe5.cjs +6 -0
- package/check-B5h1DvDs.js +11 -0
- 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/chevron-down-5hFlg_lR.cjs +6 -0
- package/chevron-down-DmZMdOiC.js +11 -0
- package/{circle-check-B9HYcH7Z.js → circle-check-BErh6TKu.js} +9 -9
- package/circle-check-OVUGxwp9.cjs +11 -0
- 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/createLucideIcon-CTVXwe6i.cjs +21 -0
- package/createLucideIcon-XRdN60yz.js +94 -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-BZwphdye.js → info-CPK1vbOJ.js} +5 -5
- package/info-Dj6SyPex.cjs +6 -0
- 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/Link.d.ts +1 -1
- package/link/index.cjs +1 -1
- package/link/index.js +2 -2
- package/link-button/LinkButton.d.ts +1 -1
- 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/{square-arrow-out-up-right-BkyqV2PN.js → square-arrow-out-up-right-ok0A3Ovo.js} +4 -4
- package/square-arrow-out-up-right-xCFdJTzY.cjs +6 -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/{triangle-alert-wxyxspAl.js → triangle-alert-B_qAPmWC.js} +5 -5
- package/triangle-alert-BviJNFjf.cjs +6 -0
- 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/{x-JK7i-TQC.js → x-C2xUHAEl.js} +5 -5
- package/x-rV-nu490.cjs +6 -0
- package/AccordionItem-BGWiWjxA.cjs +0 -1
- package/Breadcrumbs-DtjJ1UmU.cjs +0 -1
- package/Button-htW9qIsS.cjs +0 -1
- package/Button.module-DEQtBYe5.cjs +0 -1
- package/Button.module-tti8HGxs.js +0 -14
- 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/Dropdown-CJ6My6EI.cjs +0 -6
- 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-B88l_oaE.cjs +0 -6
- package/Link-BQhauBuw.cjs +0 -1
- package/Link-DX5BbBnn.js +0 -59
- package/LinkButton-CBpGLETx.cjs +0 -6
- package/LinkButton-o6uS1XsR.js +0 -69
- 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/SearchField-IlvZ3Kh6.js +0 -362
- 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/arrow-right-QJ2gXPKQ.cjs +0 -6
- package/assets/Tabs.css +0 -1
- package/check-CLF6Yxza.js +0 -11
- package/check-D_KoootC.cjs +0 -6
- package/chevron-down-Cd1bkzXT.js +0 -13
- package/chevron-down-jl83cllc.cjs +0 -6
- package/circle-check-BGo8gML8.cjs +0 -11
- package/context-DjwhtgxQ.cjs +0 -1
- package/createLucideIcon-Cg_wkoIA.cjs +0 -21
- package/createLucideIcon-DeWljiyi.js +0 -79
- package/info-CIEIENo6.cjs +0 -6
- package/scrollIntoView-C8doLzDd.cjs +0 -1
- package/square-arrow-out-up-right-V4Gd08uI.cjs +0 -6
- package/triangle-alert-DJW8U7jL.cjs +0 -6
- 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/x-H8Zrx8-x.cjs +0 -6
|
@@ -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-BoqT5nbh.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-B5h1DvDs.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-D2GmP8_2.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-C2xUHAEl.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-DmZMdOiC.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Select.css');const l=require("react/jsx-runtime"),x=require("react"),B=require("./clsx-C11secjj.cjs"),E=require("./utils-DHNZrQmj.cjs"),j=require("./Tag-t-aJVo3W.cjs"),z=require("./TextField-BdK9KEQ5.cjs"),R=require("./Collection-BtBX5IMY.cjs"),V=require("./Checkbox-Co3h0hur.cjs"),S=require("./ListBoxSection-CfQZoURJ.cjs"),H=require("./check-B0aKTFe5.cjs"),G=require("./useHover-BE_XKZKe.cjs"),I=require("./Dialog-CSnN6baf.cjs"),_=require("./ListKeyboardDelegate-CPsZ7D83.cjs"),W=require("./SelectionManager-D0jYUYcy.cjs"),$=require("./mergeProps-B5KXZAI3.cjs"),U=require("./filterDOMProps-BS2lrgFA.cjs"),X=require("./useField-D1UkzeaI.cjs"),C=require("./useFormValidation-BlFGdPZB.cjs"),J=require("./useListState-DymkJGDF.cjs"),Q=require("./useObserveElement-MhzEsCkX.cjs"),Y=require("./VisuallyHidden-Doyzl0F7.cjs"),k=require("./Label-E3LhQfNv.cjs"),Z=require("./Text-DBHWi5gA.cjs"),ee=require("./ListBoxButton-DNm3gvcT.cjs"),te=require("./x-rV-nu490.cjs"),F=require("./useLocalizedStringFormatter-BO2iZEL0.cjs"),le=require("./useButton-D60q0SQw.cjs"),ne=require("./chevron-down-5hFlg_lR.cjs"),re=require("./FieldError-MVsU-Mgw.cjs"),oe=require("./FieldError-bRTpchvr.cjs");function ie(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const M=ie(x);function N(e){return null}N.getCollectionNode=function*(t,o){let{childItems:i,title:r,children:s}=t,n=t.title||t.children,a=t.textValue||(typeof n=="string"?n:"")||t["aria-label"]||"";!a&&!(o!=null&&o.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{type:"item",props:t,rendered:n,textValue:a,"aria-label":t["aria-label"],hasChildNodes:se(t),*childNodes(){if(i)for(let c of i)yield{type:"item",value:c};else if(r){let c=[];x.Children.forEach(s,u=>{c.push({type:"item",element:u})}),yield*c}}}};function se(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&x.Children.count(e.children)>0)}let P=N;function T(e){return null}T.getCollectionNode=function*(t){let{children:o,title:i,items:r}=t;yield{type:"section",props:t,hasChildNodes:!0,rendered:i,"aria-label":t["aria-label"],*childNodes(){if(typeof o=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let s of r)yield{type:"item",value:s,renderer:o}}else{let s=[];x.Children.forEach(o,n=>{s.push({type:"item",element:n})}),yield*s}}}};let ce=T;const ae="_wrapper_1rlqo_10",de="_trigger_1rlqo_21",ue="_medium_1rlqo_35",fe="_icon_1rlqo_71",be="_tagGroup_1rlqo_77",he="_listBoxItemCheckmark_1rlqo_93",xe="_triggerContainer_1rlqo_98",ge="_selectValueTag_1rlqo_104",me="_clearButton_1rlqo_120",ye="_truncate_1rlqo_132",pe="_checkboxContainer_1rlqo_169",h={wrapper:ae,trigger:de,medium:ue,icon:fe,tagGroup:be,listBoxItemCheckmark:he,triggerContainer:xe,selectValueTag:ge,clearButton:me,truncate:ye,checkboxContainer:pe},D=({item:e})=>l.jsx(S.ListBoxItem,{...e.value,textValue:e.textValue,children:({isDisabled:t,isSelected:o,selectionMode:i})=>l.jsxs(l.Fragment,{children:[i==="multiple"?l.jsx("div",{className:h.checkboxContainer,children:l.jsx(V.Checkbox,{isDisabled:t,isSelected:o,isReadOnly:!0,excludeFromTabOrder:!0,"aria-label":e.textValue})}):null,e.rendered,o&&i==="single"?l.jsx(H.Check,{size:20,className:h.listBoxItemCheckmark}):null]})}),$e=({section:e,state:t})=>l.jsx(S.ListBoxSection,{...e.value,children:t.collection.getChildren?l.jsx(R.$e1995378a142960e$export$fb8073518f34e6ec,{items:t.collection.getChildren(e.key),children:o=>l.jsx(D,{item:o})}):null}),Se=({state:e,...t})=>l.jsx(S.ListBox,{...t,...e,escapeKeyBehavior:"none",onSelectionChange:e.setSelectedKeys,items:e.collection,children:o=>o.type==="section"?l.jsx($e,{state:e,section:o}):l.jsx(D,{item:o})});function ve(e,t,o){const{disallowEmptySelection:i,isDisabled:r}=e,s=_.$325a3faab7a68acd$export$a16aca283550c30d({usage:"search",sensitivity:"base"}),n=x.useMemo(()=>new _.$2a25aae57d74318e$export$a05409b8bb224a5a(t.collection,t.disabledKeys,null,s),[t.collection,t.disabledKeys,s]),{menuTriggerProps:a,menuProps:c}=I.$168583247155ddda$export$dc9c12ed27dd1b49({isDisabled:r,type:"listbox"},t,o),u=f=>{const{selectedKeys:v,selectionMode:A}=t,K=v.values().next().value;if(A==="single")switch(f.key){case"ArrowLeft":{f.preventDefault();const p=v.size>0?n.getKeyAbove(K):n.getFirstKey();p&&t.setSelectedKeys([p]);break}case"ArrowRight":{f.preventDefault();const p=v.size>0?n.getKeyBelow(K):n.getFirstKey();p&&t.setSelectedKeys([p]);break}}},{typeSelectProps:d}=W.$fb3050f43d946246$export$e32c88dfddc6e1d8({keyboardDelegate:n,selectionManager:t.selectionManager,onTypeSelect(f){t.setSelectedKeys([f])}}),{labelProps:y,fieldProps:g}=X.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span"});d.onKeyDown=d.onKeyDownCapture,delete d.onKeyDownCapture;const b=U.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),m=$.$3ef42575df84b30b$export$9d1611c77c2fe928(d,a,g),q=$.$bdb11010cef70236$export$f680877a34711e37();return{labelProps:{...y,onClick:()=>{var f;e.isDisabled||((f=o.current)==null||f.focus(),G.$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard"))}},triggerProps:$.$3ef42575df84b30b$export$9d1611c77c2fe928(b,{...m,onKeyDown:$.$ff5963eb1fccf552$export$e08e3b67e392101e(m.onKeyDown,u,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[m["aria-labelledby"],m["aria-label"]&&!m["aria-labelledby"]?m.id:null,q].filter(Boolean).join(" "),onFocus(f){t.isFocused||(e.onFocus&&e.onFocus(f),t.setFocused(!0))},onBlur(f){t.isOpen||(e.onBlur&&e.onBlur(f),t.setFocused(!1))}}),valueProps:{id:q},menuProps:{...c,disallowEmptySelection:i,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,onBlur:f=>{f.currentTarget.contains(f.relatedTarget)||(e.onBlur&&e.onBlur(f),t.setFocused(!1))},"aria-labelledby":[g["aria-labelledby"],m["aria-label"]&&!g["aria-labelledby"]?m.id:null].filter(Boolean).join(" ")}}}function je(e){const{collection:t,disabledKeys:o,selectionManager:i,selectionManager:{setSelectedKeys:r,selectedKeys:s,selectionMode:n}}=J.$e72dd72e1c76a225$export$2f645645f7bca764(e),a=[],c=s.size!==0?Array.from(s).map(u=>{const d=t.getItem(u);return d||a.push(u),d}).filter(Boolean):null;return a.length&&console.warn(`Select: Keys "${a.join(", ")}" passed to "selectedKeys" are not present in the collection.`),{collection:t,disabledKeys:o,selectionManager:i,selectionMode:n,selectedKeys:s,setSelectedKeys:r.bind(i),selectedItems:c}}function Ce(e){const[t,o]=x.useState(!1),i=I.$a28c903ee9ad8dc5$export$79fefeb1c2091ac3(e),r=e.selectionMode==="single",s=je({...e,onSelectionChange:d=>{e.onSelectionChange&&e.onSelectionChange(d),r&&i.close()}}),n=C.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,validationBehavior:"native",value:s.selectedKeys}),a=s.collection.size===0,c=!!s.selectedKeys.size,u=x.useCallback(()=>{n.resetValidation(),n.commitValidation()},[n]);return x.useEffect(()=>{r&&c&&u()},[c,r,u]),{...s,...i,close(){i.close(),c&&u()},open(){a||i.open()},toggle(d){a||i.toggle(d)},isFocused:t,setFocused:o,...n}}function qe({autoComplete:e,name:t,isDisabled:o,isRequired:i,selectRef:r},s,n){const{visuallyHiddenProps:a}=Y.$5c3e21d68f1c4674$export$a966af930f325cab();return C.$99facab73266f662$export$5add1d006293d136(r,s.selectedKeys,s.setSelectedKeys),C.$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:"native",focus:()=>{var c;return(c=n.current)==null?void 0:c.focus()}},s,r),{containerProps:{...a,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:e,disabled:o,required:i,name:t,value:Array.from(s.selectedKeys).map(c=>c.toString()),onChange:c=>s.setSelectedKeys(c.target.value),multiple:!0}}}function Ke(e){const{state:t,triggerRef:o,name:i,isDisabled:r}=e,s=`${e.label}-hidden`,n=x.useRef(null),{containerProps:a,selectProps:c}=qe({...e,selectRef:n},t,o);return t.collection.size<=300?l.jsx("div",{...a,"data-testid":"hidden-select-container",children:l.jsxs("label",{children:[s,l.jsxs("select",{...c,ref:n,children:[l.jsx("option",{}),[...t.collection.getKeys()].map(u=>{const d=t.collection.getItem(u);return d&&d.type==="item"?l.jsx("option",{value:d.key,children:d.textValue},d.key):null})]})]})}):i?l.jsx("input",{type:"hidden",autoComplete:c.autoComplete,name:i,disabled:r,value:Array.from(t.selectedKeys).map(u=>u.toString())??[""]}):null}const _e={clearAll:"Clear all",selectAll:"Select all",selectedItems:"Selected items",chosen:"chosen"},ke={clearAll:"Rensa alla",selectAll:"Välj alla",selectedItems:"Valda objekt",chosen:"valda"},O={en:_e,sv:ke},Pe=({state:{selectedItems:e},isDisabled:t,parentWidth:o,onClear:i,triggerRef:r,isClearable:s})=>{const n=F.useLocalizedStringFormatter(O);return l.jsxs("div",{className:h.selectValueTag,"data-disabled":t||void 0,children:[l.jsx("span",{className:h.truncate,style:{maxWidth:o-92},children:e!=null&&e.length&&e.length>1?`${e.length} ${n.format("chosen")}`:e==null?void 0:e[0].textValue}),s&&l.jsx("button",{disabled:t,"aria-label":n.format("clearAll"),className:h.clearButton,onClick:()=>{var a;i(),(a=r==null?void 0:r.current)==null||a.focus()},children:l.jsx(te.X,{width:20,height:20})})]})},we=({autoFocus:e,excludeFromTabOrder:t,isDisabled:o,size:i="large",isOpen:r,isInvalid:s,selectionMode:n,state:{selectedItems:a},placeholder:c,children:u,triggerRef:d,...y})=>{const{buttonProps:g}=le.$701a24aa0da5b062$export$ea18c227d4417cc3({autoFocus:e,excludeFromTabOrder:t,isDisabled:o,...y},d),b=n==="multiple";return l.jsxs("div",{className:h.triggerContainer,"data-disabled":o||void 0,children:[l.jsxs("button",{...g,autoFocus:e,className:B.clsx(h.trigger,{[h.medium]:i==="medium"}),"data-disabled":o||void 0,"data-invalid":s||void 0,"data-open":r||void 0,ref:d,type:"button",children:[b&&!a?l.jsx("span",{children:c}):null,b?null:l.jsx("span",{children:a?a[0].textValue:c}),l.jsx("div",{className:h.icon,"aria-hidden":"true",children:l.jsx(ne.ChevronDown,{size:20})})]}),u]})},w=({state:e,errorMessage:t})=>l.jsx(re.$ee014567cb39d3f0$export$ff05c3ac10437e03.Provider,{value:{...e.displayValidation},children:l.jsx(oe.FieldError,{children:t})}),Be=M.forwardRef(({isClearable:e=!0,popover:t,...o},i)=>{const r={selectionMode:"single",errorPosition:"top",disallowEmptySelection:!e,isClearable:e,size:"large",popover:t,...o},s=E.$df56164dff5785e2$export$4338b53315abf666(i),n=Ce(r),a=F.useLocalizedStringFormatter(O),{labelProps:c,triggerProps:u,valueProps:d,menuProps:y}=ve(r,n,s),{width:g}=Q.useObserveElement(s.current,{includePadding:!0});return l.jsxs(z.$bcdf0525bf22703d$export$2c73285ae9390cec,{...r,className:B.clsx(h.wrapper,r.className),children:[l.jsx(Ke,{...r,state:n,triggerRef:s}),l.jsx(k.LabelWrapper,{popover:t,children:r.label&&l.jsx(k.Label,{...c,"data-disabled":r.isDisabled||void 0,children:r.label})}),r.description&&l.jsx(Z.Text,{slot:"description",children:r.description}),r.errorPosition==="top"&&l.jsx(w,{...r,state:n}),l.jsx(we,{...r,...u,isInvalid:n.displayValidation.isInvalid,triggerRef:s,state:n,children:r.selectionMode==="multiple"&&n.selectedItems?l.jsx("span",{...d,children:l.jsx(Pe,{...r,state:n,parentWidth:g,onClear:()=>n.selectionManager.clearSelection(),triggerRef:s})}):null}),r.errorPosition==="bottom"&&l.jsx(w,{...r,state:n}),l.jsxs(S.ListBoxPopover,{isOpen:n.isOpen,onOpenChange:b=>{b||n.close()},triggerRef:s,style:{width:g},children:[r.isSelectableAll&&l.jsxs(ee.ListBoxButton,{onClick:()=>n.selectionManager.toggleSelectAll(),children:[l.jsx("div",{className:h.checkboxContainer,children:l.jsx(V.Checkbox,{isSelected:n.selectionManager.isSelectAll,isIndeterminate:!n.selectionManager.isSelectAll&&!n.selectionManager.isEmpty,isReadOnly:!0,excludeFromTabOrder:!0})}),l.jsx("span",{children:a.format("selectAll")})]}),l.jsx(Se,{...y,state:n})]}),r.showTags&&!!n.selectedItems&&l.jsx(j.TagGroup,{"aria-label":a.format("selectedItems"),selectionBehavior:"toggle",onRemove:b=>n.selectionManager.toggleSelection(Array.from(b)[0]),className:h.tagGroup,children:l.jsx(j.$eaf9e70818b436db$export$f9fef0f55402315b,{items:n.selectedItems,children:b=>l.jsx(j.Tag,{textValue:b.textValue,id:b.key,dismissable:!0,isDisabled:r.isDisabled,children:b.textValue},b.key)})})]})}),L=M.forwardRef(({options:e,...t},o)=>l.jsx(Be,{...t,items:e,ref:o,children:i=>i.children?l.jsx(ce,{items:i.children,title:i.name,children:r=>l.jsx(P,{textValue:r.textValue,children:r.name})},i.name):l.jsx(P,{textValue:i.textValue,children:i.name})}));L.displayName="Select";exports.Select=L;
|