@midas-ds/components 11.2.0 → 12.1.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-C9dBt-tQ.js +335 -0
- package/AccordionItem-SOfjXh3V.cjs +1 -0
- package/BadgeContainer-iNNgJKD9.js +37 -0
- package/{BadgeContainer-DWVHS5dn.cjs → BadgeContainer-su0iCJKy.cjs} +1 -1
- package/Breadcrumbs-BAHJMPsu.js +271 -0
- package/Breadcrumbs-DUcHHI_2.cjs +1 -0
- package/Button-CMIbSc4-.cjs +1 -0
- package/{Button-CepQFEit.js → Button-DD5_S-tD.js} +154 -160
- package/{Button-BjMaGya2.js → Button-DYcmg49Z.js} +2 -2
- package/{Button-Dq6ugqxT.cjs → Button-DrL5Jv-s.cjs} +1 -1
- package/Button.module-BNLcvARn.cjs +1 -0
- package/Button.module-Bax2YU6N.js +14 -0
- package/ButtonGroup-ClYTgaRc.cjs +1 -0
- package/{ButtonGroup-DvVvear6.js → ButtonGroup-WZZDPu9Z.js} +1 -1
- package/CHANGELOG.md +114 -0
- package/Card-BDDyGAMA.js +131 -0
- package/Card-mj5lCIR4.cjs +1 -0
- package/{CharacterCounter-DSFBv3Rw.cjs → CharacterCounter-CnRv-iUP.cjs} +1 -1
- package/{CharacterCounter-DpBDwvLw.js → CharacterCounter-DT7A0wWP.js} +8 -8
- package/Checkbox-BtM2rFh9.js +278 -0
- package/Checkbox-CvdIG43J.cjs +1 -0
- package/CheckboxGroup-C94as9Xt.cjs +1 -0
- package/CheckboxGroup-CjcDYBRk.js +157 -0
- package/Collection-B0_WAieZ.js +625 -0
- package/Collection-BvWp2xBd.cjs +1 -0
- package/{ColorSchemeSwitch-PiEHptw1.js → ColorSchemeSwitch-C4PMYeD5.js} +17 -25
- package/{ColorSchemeSwitch-owUryjYz.cjs → ColorSchemeSwitch-CKcoGZM1.cjs} +1 -1
- package/ComboBox-B2EmfOyr.cjs +1 -0
- package/{ComboBox-DfJ_aJrf.js → ComboBox-BWXJZyOR.js} +522 -511
- package/DateField-CcQJYDLD.js +47 -0
- package/DateField-IpCiF81R.cjs +1 -0
- package/{DateInputDivider-BmvqW1Hk.js → DateInputDivider-CXkUdlzc.js} +936 -839
- package/DateInputDivider-Cf5GZHlM.cjs +1 -0
- package/DateRangePicker-B2BJO1KC.js +889 -0
- package/DateRangePicker-Dfwe9RhJ.cjs +6 -0
- package/Dialog-B8swxl24.js +1643 -0
- package/Dialog-DR6nEqMT.cjs +1 -0
- package/Dialog-DgJobm71.cjs +1 -0
- package/Dialog-P3frHOdq.js +240 -0
- package/DragAndDrop-Dw8JZmrn.cjs +1 -0
- package/DragAndDrop-PrUJv--B.js +75 -0
- package/{Dropdown-Cpc2EszJ.js → Dropdown-CIvWpN3v.js} +33 -32
- package/Dropdown-DJ2vWAqk.cjs +6 -0
- package/FieldError-Cornph2A.cjs +1 -0
- package/{FieldError-CDCvUjK5.js → FieldError-DdvFyIf4.js} +16 -14
- package/{FileUpload-BokzdXVc.js → FileUpload-D2gnQKdn.js} +76 -74
- package/{FileUpload-Bz9md5zc.cjs → FileUpload-D3RaARDV.cjs} +2 -2
- package/{FocusScope-DMsfA3bj.js → FocusScope-Bj40Ir-g.js} +192 -195
- package/FocusScope-Uy3DiY0-.cjs +1 -0
- package/Grid-WbEkSCGh.cjs +1 -0
- package/{Grid--OhtgCo6.js → Grid-s8ovKDi8.js} +6 -9
- package/GridItem-CIVF1fRW.cjs +1 -0
- package/GridItem-D3FZyyO-.js +243 -0
- package/{Group-DOpbdoAi.cjs → Group-BKYGeOBr.cjs} +1 -1
- package/{Group-B0vQfHDy.js → Group-C73mD_-i.js} +6 -6
- package/Heading-BQlmb5Tm.js +46 -0
- package/Heading-D3FR_KXb.cjs +1 -0
- package/InfoBanner-CqjnTYaa.cjs +1 -0
- package/InfoBanner-CrA8MS3v.js +83 -0
- package/{Input-n-Z20KbW.js → Input-BLVRv0FK.js} +4 -4
- package/{Input-MJji5hhq.cjs → Input-CzMx2mfl.cjs} +1 -1
- package/{Label-endv1fkJ.js → Label-BG7G0iyG.js} +23 -27
- package/Label-C00qz3kQ.cjs +1 -0
- package/Layout-Bta_Cpq_.cjs +16 -0
- package/Layout-CG-Qxr_1.js +482 -0
- package/{Link-ovwNVMfg.js → Link-BtxKZ0h3.js} +16 -16
- package/Link-Bx6avHVl.cjs +6 -0
- package/Link-CbFSuEI1.js +73 -0
- package/Link-wM7cVPlS.cjs +1 -0
- package/LinkButton-BvXu6vAH.cjs +6 -0
- package/LinkButton-D3EnZ65v.js +69 -0
- package/ListBox-ICZKGluC.cjs +1 -0
- package/ListBox-LncMQt6I.js +523 -0
- package/ListBoxLoadMoreItem-Ceo73a2q.cjs +1 -0
- package/ListBoxLoadMoreItem-W11V-Lef.js +41 -0
- package/ListBoxSection-BCPv9H50.js +1085 -0
- package/ListBoxSection-Dx75ZinL.cjs +1 -0
- package/{ListKeyboardDelegate-CHki611g.js → ListKeyboardDelegate-CVxkAn5D.js} +13 -9
- package/ListKeyboardDelegate-C_X1wLkh.cjs +1 -0
- package/{Logo-BpH0HC91.cjs → Logo-CFjZc5u2.cjs} +1 -1
- package/{Logo-ME4ffCue.js → Logo-DkagDdKQ.js} +14 -18
- package/OverlayArrow-ByH6lM-H.cjs +1 -0
- package/OverlayArrow-CvNuu3e3.js +519 -0
- package/{Popover-BDvKByTT.cjs → Popover-Bi5yJEoE.cjs} +1 -1
- package/{Popover-Tniqbaes.js → Popover-CyEVqpJ6.js} +11 -11
- package/{PressResponder-C3APAKsz.js → PressResponder-CxVtArtP.js} +4 -4
- package/{PressResponder-4jE_HLu3.cjs → PressResponder-DbnYqwGB.cjs} +1 -1
- package/ProgressBar-CdXHEJh6.js +53 -0
- package/ProgressBar-CjuHokVZ.cjs +1 -0
- package/Radio-Bll-7H8O.cjs +1 -0
- package/Radio-DoWx2AE1.js +333 -0
- package/RangeCalendar-A4WQIG7P.cjs +6 -0
- package/{RangeCalendar-BCruEq9d.js → RangeCalendar-D7eFVAPP.js} +637 -629
- package/{SearchField-QFyuaT-K.cjs → SearchField-BbrUZpQm.cjs} +2 -2
- package/{SearchField-nwlyszwt.js → SearchField-F2FKgYds.js} +27 -31
- package/Select-BnbDXwgD.cjs +1 -0
- package/Select-Dpi3LhbI.js +654 -0
- package/{SelectionManager-BKrZ_mMO.js → SelectionManager-Bq-Gw1UT.js} +291 -282
- package/SelectionManager-BtbHoHpA.cjs +1 -0
- package/Separator-CM0KPvsX.js +105 -0
- package/Separator-Cfv2pbWf.cjs +1 -0
- package/Separator-DH-5wu9X.js +77 -0
- package/Separator-Dgin8BNW.cjs +1 -0
- package/Skeleton-BpYj25p8.js +37 -0
- package/Skeleton-DMOxEwnd.cjs +1 -0
- package/Spinner-D1UBuLy4.cjs +6 -0
- package/Spinner-DTKb_LAA.js +47 -0
- package/TabList-D4WwgQY3.cjs +1 -0
- package/TabList-D9tl2s85.js +397 -0
- package/Table-C6k3PiiC.cjs +16 -0
- package/{Table-DGTwyh7U.js → Table-CkN3y69S.js} +883 -804
- package/Tag-7dHEMQum.cjs +1 -0
- package/Tag-BUJ20HHw.js +765 -0
- package/Text-BAFsaON-.cjs +1 -0
- package/{Text-DcZqSUN9.js → Text-Be7WIOwv.js} +1 -1
- package/{Text-CfcjRtke.cjs → Text-BtPiT2P1.cjs} +1 -1
- package/Text-CmlsaWMA.js +32 -0
- package/TextArea-BCikUXaD.cjs +1 -0
- package/TextArea-h5_oBQH1.js +125 -0
- package/TextField-Bm5916AD.cjs +1 -0
- package/TextField-_UY8CXtW.js +134 -0
- package/TextField.module-C9Zm9unF.js +13 -0
- package/TextField.module-GTQtNO0r.cjs +1 -0
- package/{Toast-CWt_mNIg.js → Toast-BBkWczCk.js} +234 -253
- package/Toast-DclaxvZM.cjs +1 -0
- package/ToggleButtonGroup-BGG64PK1.js +214 -0
- package/ToggleButtonGroup-Da330GRT.cjs +1 -0
- package/Tooltip-BHAtsp9k.js +281 -0
- package/Tooltip-CZa9n5sT.cjs +1 -0
- package/{VisuallyHidden-CYfmTSCD.js → VisuallyHidden-CGEtjAP7.js} +2 -2
- package/{VisuallyHidden-Doyzl0F7.cjs → VisuallyHidden-EjrqodVh.cjs} +1 -1
- package/accordion/Accordion.d.ts +8 -2
- package/accordion/AccordionContext.d.ts +4 -0
- package/accordion/AccordionItem.d.ts +6 -4
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/assets/AccordionItem.css +1 -1
- package/assets/BadgeContainer.css +1 -1
- package/assets/Breadcrumbs.css +1 -1
- package/assets/Button.css +1 -1
- package/assets/ButtonGroup.css +1 -1
- package/assets/Card.css +1 -1
- package/assets/CharacterCounter.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/ComboBox.css +1 -1
- package/assets/DateField.css +1 -1
- package/assets/DateInputDivider.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Dialog.css +1 -1
- package/assets/Dropdown.css +1 -1
- package/assets/FieldError.css +1 -1
- package/assets/FileUpload.css +1 -1
- package/assets/GridItem.css +1 -1
- package/assets/Heading.css +1 -1
- package/assets/InfoBanner.css +1 -1
- package/assets/Label.css +1 -1
- package/assets/Layout.css +1 -1
- package/assets/Link.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/ListBoxSection.css +1 -1
- package/assets/Logo.css +1 -1
- package/assets/Popover.css +1 -1
- package/assets/ProgressBar.css +1 -1
- package/assets/Radio.css +1 -1
- package/assets/RangeCalendar.css +1 -1
- package/assets/SearchField.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Separator.css +1 -0
- package/assets/Skeleton.css +1 -1
- package/assets/Spinner.css +1 -1
- package/assets/TabList.css +1 -1
- package/assets/Table.css +1 -1
- package/assets/Tag.css +1 -1
- package/assets/Text.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/Toast.css +1 -1
- package/assets/ToggleButtonGroup.css +1 -1
- package/assets/Tooltip.css +1 -1
- package/assets/theme.css +1 -0
- package/assets/variables.css +1 -0
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/Breadcrumbs.d.ts +0 -2
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +2 -2
- 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/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/chevron-right-0-sUFBiR.cjs +6 -0
- package/chevron-right-BYYHEJjK.js +11 -0
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/ComboBox.d.ts +0 -4
- package/combobox/index.cjs +1 -1
- package/combobox/index.d.ts +1 -2
- package/combobox/index.js +2 -3
- package/combobox/intl/translations.json.d.ts +4 -2
- package/combobox/types.d.ts +0 -13
- package/common/icon-map.d.ts +6 -0
- package/common/types.d.ts +8 -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/Dropdown.d.ts +25 -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/index.cjs +1 -1
- package/file-upload/index.js +1 -1
- package/filterDOMProps-RRlKPKX0.cjs +1 -0
- package/filterDOMProps-wsa9OcNI.js +65 -0
- package/grid/Grid.d.ts +0 -8
- package/grid/GridItem.d.ts +0 -8
- package/grid/index.cjs +1 -1
- package/grid/index.d.ts +2 -2
- package/grid/index.js +4 -6
- package/heading/index.cjs +1 -1
- package/heading/index.js +1 -1
- package/icon-map-9XcghDra.cjs +11 -0
- package/icon-map-uS87FT_Q.js +43 -0
- package/{index-CGRFP4CC.js → index-BLPblar-.js} +34 -31
- package/index-DSFSh2sC.cjs +17 -0
- package/index.cjs +1 -1
- package/index.d.ts +2 -0
- package/index.js +133 -121
- package/info-banner/InfoBanner.d.ts +18 -10
- package/info-banner/index.cjs +1 -1
- package/info-banner/index.js +1 -1
- package/label/index.cjs +1 -1
- package/label/index.js +1 -1
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- 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/ListBoxLoadMoreItem.d.ts +4 -0
- package/list-box/index.cjs +1 -1
- package/list-box/index.d.ts +1 -0
- package/list-box/index.js +6 -5
- package/list-box/intl/translations.json.d.ts +11 -0
- package/logo/index.cjs +1 -1
- package/logo/index.js +1 -1
- package/menu/Menu.d.ts +13 -0
- package/menu/MenuItem.d.ts +5 -0
- package/menu/MenuPopover.d.ts +3 -0
- package/menu/MenuSection.d.ts +3 -0
- package/menu/Separator.d.ts +3 -0
- package/menu/index.cjs +1 -0
- package/menu/index.d.ts +5 -0
- package/menu/index.js +8 -0
- package/{mergeProps-C1U1OIeJ.js → mergeProps-BSsN7Bgk.js} +36 -34
- package/mergeProps-JhcJ7uJL.cjs +1 -0
- package/modal/index.cjs +1 -1
- package/modal/index.js +2 -2
- package/package.json +9 -4
- 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/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/select/Select.d.ts +1 -1
- package/select/index.cjs +1 -1
- package/select/index.d.ts +1 -1
- package/select/index.js +1 -1
- package/select/types.d.ts +1 -13
- package/skeleton/index.cjs +1 -1
- package/skeleton/index.js +1 -1
- package/spinner/index.cjs +1 -1
- package/spinner/index.js +1 -1
- package/table/Table.d.ts +7 -12
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/Tabs.d.ts +0 -12
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/Tag.d.ts +2 -1
- 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/Input.d.ts +7 -2
- package/textfield/PasswordField.d.ts +1 -1
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/theme/generated-object.d.ts +384 -0
- package/theme/generated-tokens.d.ts +334 -0
- package/theme/index.cjs +1 -1
- package/theme/index.d.ts +39 -12
- package/theme/index.js +4037 -13
- package/theme/tokens.d.ts +65 -18
- package/toast/Toast.d.ts +2 -1
- 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-B3FfJ-rY.cjs +1 -0
- package/{tokens-CqvelUoA.js → tokens-B9ooUP4g.js} +69 -32
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/useButton-D6iUB8cN.js +56 -0
- package/useButton-R8-i3HLC.cjs +1 -0
- package/useDateFormatter-2B0vgHc-.cjs +1 -0
- package/{useDateFormatter-C7BJgoDR.js → useDateFormatter-BJ1ZyaH1.js} +431 -407
- package/{useDescription-DYfKjGGU.js → useDescription-BLmIkYCq.js} +1 -1
- package/{useDescription-CPo72trh.cjs → useDescription-BMuiAqI5.cjs} +1 -1
- package/{useEvent-DPxMu-X9.cjs → useEvent-3ZO5TPSH.cjs} +1 -1
- package/{useEvent-CigwyJOw.js → useEvent-DpBHTuHJ.js} +1 -1
- package/{useField-CefQB81E.js → useField-BMegM8fA.js} +2 -2
- package/{useField-D1UkzeaI.cjs → useField-DyeD7MLj.cjs} +1 -1
- package/{useFilter-DsOxD9JB.js → useFilter-BFnSe_Eq.js} +1 -1
- package/{useFilter-BhM2yVO3.cjs → useFilter-aoggM85n.cjs} +1 -1
- package/{useFocusRing-B-A1OLhU.cjs → useFocusRing-BcbYske2.cjs} +1 -1
- package/{useFocusRing-DOfBqnUN.js → useFocusRing-DMo8ctYV.js} +2 -2
- package/{useFocusWithin-T1ifEM_s.js → useFocusWithin-ClMkhYcq.js} +1 -1
- package/{useFocusWithin-CG8mAt2D.cjs → useFocusWithin-DTnk0e8a.cjs} +1 -1
- package/{useFocusable-D7I1ujkW.cjs → useFocusable-CsG-IPuC.cjs} +1 -1
- package/{useFocusable-BjE42axF.js → useFocusable-DXlMChFC.js} +4 -4
- package/useFormValidation-BQIRxgbU.cjs +1 -0
- package/useFormValidation-L0UHvOsP.js +217 -0
- package/{useHasTabbableChild-BgEe5J35.js → useHasTabbableChild-BDaxMsGu.js} +2 -2
- package/{useHasTabbableChild-CoQRpNbC.cjs → useHasTabbableChild-CJcLnolh.cjs} +1 -1
- package/{useHighlightSelectionDescription-xr_16pKd.js → useHighlightSelectionDescription-BkEv9Jye.js} +4 -4
- package/{useHighlightSelectionDescription-DmbDkFGY.cjs → useHighlightSelectionDescription-CQaG611l.cjs} +1 -1
- package/{useHover-DQvJ3Y-W.js → useHover-D6bNIkU0.js} +76 -74
- package/useHover-DGAmG7jt.cjs +1 -0
- package/{useLabels-CSU0kbtJ.cjs → useLabels-CvUk-yS3.cjs} +1 -1
- package/{useLabels-LrKQiY11.js → useLabels-Kmq5JCp_.js} +1 -1
- package/useListState-D2IEg6_e.cjs +1 -0
- package/{useListState-B3c3xcNW.js → useListState-pixYqSLl.js} +43 -42
- package/usePress-CicXV7UO.cjs +7 -0
- package/{usePress-BW47IcyU.js → usePress-DMUpU0GU.js} +153 -149
- package/{useSingleSelectListState-DdBsBWKG.js → useSingleSelectListState-BlvpP8y-.js} +1 -1
- package/{useSingleSelectListState-DlO5H9N-.cjs → useSingleSelectListState-CwWK_Dx2.cjs} +1 -1
- package/{useTextField-DjxayZsV.js → useTextField-BC5X_AO_.js} +30 -27
- package/useTextField-Cxpfu0U3.cjs +1 -0
- package/useToggleState-BVOqL4hI.js +21 -0
- package/useToggleState-SqDyNfRi.cjs +1 -0
- package/utils/types.d.ts +4 -0
- package/{utils-DHNZrQmj.cjs → utils-CMHKYKlz.cjs} +1 -1
- package/{utils-KLjWgdLR.js → utils-Cpcjg55U.js} +1 -1
- package/utils-DFIwp4PB.js +262 -0
- package/utils-__vrf9VZ.cjs +1 -0
- package/AccordionItem-BPOQqTkQ.js +0 -323
- package/AccordionItem-CS-QKqrU.cjs +0 -1
- package/BadgeContainer-CKBIZWsc.js +0 -37
- package/Breadcrumbs-BBzSV4SK.js +0 -262
- package/Breadcrumbs-CFUryOhf.cjs +0 -1
- package/Button-DExMoP5f.cjs +0 -1
- package/Button.module-D-mPLRxe.js +0 -14
- package/Button.module-goCEz5qs.cjs +0 -1
- package/ButtonGroup-DUqW5dzM.cjs +0 -1
- package/Card-BRs1FKX5.js +0 -131
- package/Card-cdL5669N.cjs +0 -1
- package/Checkbox-Co3h0hur.cjs +0 -1
- package/Checkbox-EB_SCBEo.js +0 -264
- package/CheckboxGroup-CT_eqERw.cjs +0 -1
- package/CheckboxGroup-DvrN1oyw.js +0 -159
- package/Collection-BtBX5IMY.cjs +0 -1
- package/Collection-D2jVTmDW.js +0 -577
- package/ComboBox-D_jh7TKo.cjs +0 -1
- package/DateField-BURrxhil.cjs +0 -1
- package/DateField-DKCbEonm.js +0 -47
- package/DateInputDivider-ToFY-yjB.cjs +0 -1
- package/DateRangePicker-B5vx9onl.js +0 -870
- package/DateRangePicker-DkIAEIIj.cjs +0 -6
- package/Dialog-CxHiZorC.cjs +0 -1
- package/Dialog-D5c_dUnB.js +0 -1611
- package/Dialog-DtHk3eXI.cjs +0 -1
- package/Dialog-DuGcBeNN.js +0 -212
- package/DragAndDrop-CSg60YQE.cjs +0 -1
- package/DragAndDrop-DOXLfJaA.js +0 -60
- package/Dropdown-CYakzdJg.cjs +0 -6
- package/FieldError-Bv3Q6ZP-.cjs +0 -1
- package/FocusScope-vcXLOQiu.cjs +0 -1
- package/Grid-DVQtOcu9.cjs +0 -1
- package/GridItem-DlbSdRmB.js +0 -246
- package/GridItem-XgHmZWXY.cjs +0 -1
- package/Heading-CKTR4sOz.cjs +0 -1
- package/Heading-D2y_kiC0.js +0 -46
- package/InfoBanner-CzwbOdRG.cjs +0 -1
- package/InfoBanner-D05poAe3.js +0 -91
- package/Label-ChjDdBlv.cjs +0 -1
- package/Layout-D0E1fOgZ.cjs +0 -16
- package/Layout-DtyhUz-G.js +0 -498
- package/Link-CibH8uRY.js +0 -72
- package/Link-CidjjqHb.cjs +0 -1
- package/Link-ESjrl63P.cjs +0 -6
- package/LinkButton-B6AWNiRn.cjs +0 -6
- package/LinkButton-BkZULm2a.js +0 -69
- package/ListBox-B0E1hdEt.cjs +0 -1
- package/ListBox-Djy7244v.js +0 -531
- package/ListBoxButton-CIqNRR3y.cjs +0 -1
- package/ListBoxButton-sqirI6I4.js +0 -15
- package/ListBoxSection-BYJccE4T.cjs +0 -1
- package/ListBoxSection-Cicbu8pS.js +0 -1058
- package/ListKeyboardDelegate-ZKBk2IId.cjs +0 -1
- package/OverlayArrow-DB_aVTVM.js +0 -507
- package/OverlayArrow-DpZ1FqOd.cjs +0 -1
- package/ProgressBar-ClysdvqU.cjs +0 -1
- package/ProgressBar-DTn23Zkr.js +0 -53
- package/Radio-CCN3o3s-.js +0 -313
- package/Radio-Cz0vLIBw.cjs +0 -1
- package/RangeCalendar-BY82hPRu.cjs +0 -11
- package/Select-MwvnbChP.js +0 -664
- package/Select-lhIwwJL7.cjs +0 -1
- package/SelectionManager-BJjqIWtf.cjs +0 -1
- package/Separator-DPLEx950.cjs +0 -1
- package/Separator-DvvVAypT.js +0 -59
- package/Skeleton-BAwbfKBW.cjs +0 -1
- package/Skeleton-BePDRmrO.js +0 -40
- package/Spinner-VSyPhiJ9.js +0 -51
- package/Spinner-vof0Y9Hh.cjs +0 -6
- package/TabList-CWMlbijV.cjs +0 -1
- package/TabList-VpTv_Xff.js +0 -435
- package/Table-DGYC-sDq.cjs +0 -16
- package/Tag-bYq-wf5D.cjs +0 -1
- package/Tag-rI-NhuT0.js +0 -748
- package/Text-BPcfhYQ9.js +0 -32
- package/Text-DBHWi5gA.cjs +0 -1
- package/TextArea-CrEALC58.js +0 -119
- package/TextArea-DJKHFKuI.cjs +0 -1
- package/TextField-BAX93sq7.cjs +0 -1
- package/TextField-Dma22dnD.js +0 -120
- package/TextField.module-BcpPBWnD.js +0 -13
- package/TextField.module-Dw5Rtn9y.cjs +0 -1
- package/Toast-DdmSvNaO.cjs +0 -1
- package/ToggleButtonGroup-98z8Dw8-.js +0 -211
- package/ToggleButtonGroup-DZ_wo0qx.cjs +0 -1
- package/Tooltip-DjNc93tV.js +0 -285
- package/Tooltip-pN5W3IK6.cjs +0 -1
- package/circle-check-BErh6TKu.js +0 -26
- package/circle-check-OVUGxwp9.cjs +0 -11
- package/filterDOMProps-BS2lrgFA.cjs +0 -1
- package/filterDOMProps-D6KHYVBX.js +0 -24
- package/index-Dsz3aiWt.cjs +0 -17
- package/mergeProps-B5KXZAI3.cjs +0 -1
- package/tokens-5PzK5zK7.cjs +0 -1
- package/triangle-alert-B_qAPmWC.js +0 -21
- package/triangle-alert-BviJNFjf.cjs +0 -6
- package/useButton-BoIV3kDJ.js +0 -47
- package/useButton-D60q0SQw.cjs +0 -1
- package/useDateFormatter-BJBt0jk_.cjs +0 -1
- package/useFormValidation-BlFGdPZB.cjs +0 -1
- package/useFormValidation-BzzruZKm.js +0 -215
- package/useHover-BE_XKZKe.cjs +0 -1
- package/useListState-wLau6fXo.cjs +0 -1
- package/usePress-BooY_CAy.cjs +0 -7
- package/useTextField-DnRrCg5o.cjs +0 -1
- package/useToggleState-Bz5rAf4C.js +0 -18
- package/useToggleState-DoIkSQdj.cjs +0 -1
- package/utils-CoCR_Fce.js +0 -234
- package/utils-Dvdohqm9.cjs +0 -1
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
import { jsx as i, jsxs as g, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import x, { useMemo as F, useState as D, useCallback as E, useEffect as L, useRef as O } from "react";
|
|
4
|
+
import { c as P } from "./clsx-OuTLNxxd.js";
|
|
5
|
+
import { b as z } from "./utils-Cpcjg55U.js";
|
|
6
|
+
import { a as R, $ as G, T as W } from "./Tag-BUJ20HHw.js";
|
|
7
|
+
import { $ as H } from "./TextField-_UY8CXtW.js";
|
|
8
|
+
import { c as U } from "./Collection-B0_WAieZ.js";
|
|
9
|
+
import { C as k } from "./Checkbox-BtM2rFh9.js";
|
|
10
|
+
import { L as q, c as X, a as J, b as Q } from "./ListBoxSection-BCPv9H50.js";
|
|
11
|
+
import { C as Y } from "./check-B5h1DvDs.js";
|
|
12
|
+
import { g as Z } from "./useHover-D6bNIkU0.js";
|
|
13
|
+
import { p as ee, q as te } from "./Dialog-B8swxl24.js";
|
|
14
|
+
import { $ as le, c as ae } from "./ListKeyboardDelegate-CVxkAn5D.js";
|
|
15
|
+
import { g as ie } from "./SelectionManager-Bq-Gw1UT.js";
|
|
16
|
+
import { a as _, c as oe, e as ne } from "./mergeProps-BSsN7Bgk.js";
|
|
17
|
+
import { $ as re } from "./filterDOMProps-wsa9OcNI.js";
|
|
18
|
+
import { $ as ce } from "./useField-BMegM8fA.js";
|
|
19
|
+
import { $ as se, a as de, b as ue } from "./useFormValidation-L0UHvOsP.js";
|
|
20
|
+
import { $ as fe } from "./useListState-pixYqSLl.js";
|
|
21
|
+
import { u as me } from "./useObserveElement-BdI4zgd7.js";
|
|
22
|
+
import { a as pe } from "./VisuallyHidden-CGEtjAP7.js";
|
|
23
|
+
import { a as be, L as he } from "./Label-BG7G0iyG.js";
|
|
24
|
+
import { T as ge } from "./Text-CmlsaWMA.js";
|
|
25
|
+
import { X as ye } from "./x-C2xUHAEl.js";
|
|
26
|
+
import { u as B } from "./useLocalizedStringFormatter-N0AyjzbM.js";
|
|
27
|
+
import { $ as $e } from "./useButton-D6iUB8cN.js";
|
|
28
|
+
import { C as ve } from "./chevron-down-DmZMdOiC.js";
|
|
29
|
+
import { $ as xe, F as Se } from "./FieldError-DdvFyIf4.js";
|
|
30
|
+
import './assets/Select.css';function I(e) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
I.getCollectionNode = function* (t, o) {
|
|
34
|
+
let { childItems: r, title: a, children: n } = t, l = t.title || t.children, s = t.textValue || (typeof l == "string" ? l : "") || t["aria-label"] || "";
|
|
35
|
+
!s && !(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 {
|
|
36
|
+
type: "item",
|
|
37
|
+
props: t,
|
|
38
|
+
rendered: l,
|
|
39
|
+
textValue: s,
|
|
40
|
+
"aria-label": t["aria-label"],
|
|
41
|
+
hasChildNodes: Ce(t),
|
|
42
|
+
*childNodes() {
|
|
43
|
+
if (r) for (let c of r) yield {
|
|
44
|
+
type: "item",
|
|
45
|
+
value: c
|
|
46
|
+
};
|
|
47
|
+
else if (a) {
|
|
48
|
+
let c = [];
|
|
49
|
+
x.Children.forEach(n, (u) => {
|
|
50
|
+
c.push({
|
|
51
|
+
type: "item",
|
|
52
|
+
element: u
|
|
53
|
+
});
|
|
54
|
+
}), yield* c;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
function Ce(e) {
|
|
60
|
+
return e.hasChildItems != null ? e.hasChildItems : !!(e.childItems || e.title && x.Children.count(e.children) > 0);
|
|
61
|
+
}
|
|
62
|
+
let K = I;
|
|
63
|
+
function N(e) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
N.getCollectionNode = function* (t) {
|
|
67
|
+
let { children: o, title: r, items: a } = t;
|
|
68
|
+
yield {
|
|
69
|
+
type: "section",
|
|
70
|
+
props: t,
|
|
71
|
+
hasChildNodes: !0,
|
|
72
|
+
rendered: r,
|
|
73
|
+
"aria-label": t["aria-label"],
|
|
74
|
+
*childNodes() {
|
|
75
|
+
if (typeof o == "function") {
|
|
76
|
+
if (!a) throw new Error("props.children was a function but props.items is missing");
|
|
77
|
+
for (let n of a) yield {
|
|
78
|
+
type: "item",
|
|
79
|
+
value: n,
|
|
80
|
+
renderer: o
|
|
81
|
+
};
|
|
82
|
+
} else {
|
|
83
|
+
let n = [];
|
|
84
|
+
x.Children.forEach(o, (l) => {
|
|
85
|
+
n.push({
|
|
86
|
+
type: "item",
|
|
87
|
+
element: l
|
|
88
|
+
});
|
|
89
|
+
}), yield* n;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
let _e = N;
|
|
95
|
+
const Ke = "_wrapper_1ijiv_10", Ve = "_trigger_1ijiv_21", we = "_medium_1ijiv_35", Pe = "_icon_1ijiv_71", ke = "_tagGroup_1ijiv_77", Be = "_listBoxItemCheckmark_1ijiv_93", Ie = "_triggerContainer_1ijiv_98", Ne = "_selectValueTag_1ijiv_104", Ae = "_clearButton_1ijiv_120", Me = "_truncate_1ijiv_132", je = "_checkboxContainer_1ijiv_169", Te = "_selectAll_1ijiv_175", p = {
|
|
96
|
+
wrapper: Ke,
|
|
97
|
+
trigger: Ve,
|
|
98
|
+
medium: we,
|
|
99
|
+
icon: Pe,
|
|
100
|
+
tagGroup: ke,
|
|
101
|
+
listBoxItemCheckmark: Be,
|
|
102
|
+
triggerContainer: Ie,
|
|
103
|
+
selectValueTag: Ne,
|
|
104
|
+
clearButton: Ae,
|
|
105
|
+
truncate: Me,
|
|
106
|
+
checkboxContainer: je,
|
|
107
|
+
selectAll: Te
|
|
108
|
+
}, A = ({ item: e }) => /* @__PURE__ */ i(
|
|
109
|
+
J,
|
|
110
|
+
{
|
|
111
|
+
...e.value,
|
|
112
|
+
textValue: e.textValue,
|
|
113
|
+
"aria-label": e.textValue,
|
|
114
|
+
children: ({ isDisabled: t, isSelected: o, selectionMode: r }) => /* @__PURE__ */ g(T, { children: [
|
|
115
|
+
r === "multiple" ? /* @__PURE__ */ i(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: p.checkboxContainer,
|
|
119
|
+
"aria-hidden": !0,
|
|
120
|
+
children: /* @__PURE__ */ i(
|
|
121
|
+
k,
|
|
122
|
+
{
|
|
123
|
+
isDisabled: t,
|
|
124
|
+
isSelected: o,
|
|
125
|
+
isReadOnly: !0,
|
|
126
|
+
excludeFromTabOrder: !0,
|
|
127
|
+
"aria-label": e.textValue
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
) : null,
|
|
132
|
+
e.rendered,
|
|
133
|
+
o && r === "single" ? /* @__PURE__ */ i(
|
|
134
|
+
Y,
|
|
135
|
+
{
|
|
136
|
+
size: 20,
|
|
137
|
+
className: p.listBoxItemCheckmark
|
|
138
|
+
}
|
|
139
|
+
) : null
|
|
140
|
+
] })
|
|
141
|
+
}
|
|
142
|
+
), Fe = ({ section: e, state: t }) => /* @__PURE__ */ i(X, { ...e.value, children: t.collection.getChildren ? /* @__PURE__ */ i(U, { items: t.collection.getChildren(e.key), children: (o) => /* @__PURE__ */ i(A, { item: o }) }) : null }), De = ({
|
|
143
|
+
state: e,
|
|
144
|
+
...t
|
|
145
|
+
}) => /* @__PURE__ */ i(
|
|
146
|
+
q,
|
|
147
|
+
{
|
|
148
|
+
...t,
|
|
149
|
+
...e,
|
|
150
|
+
escapeKeyBehavior: "none",
|
|
151
|
+
onSelectionChange: e.setSelectedKeys,
|
|
152
|
+
items: e.collection,
|
|
153
|
+
children: (o) => o.type === "section" ? /* @__PURE__ */ i(
|
|
154
|
+
Fe,
|
|
155
|
+
{
|
|
156
|
+
state: e,
|
|
157
|
+
section: o
|
|
158
|
+
}
|
|
159
|
+
) : /* @__PURE__ */ i(A, { item: o })
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
function Ee(e, t, o) {
|
|
163
|
+
const { disallowEmptySelection: r, isDisabled: a } = e, n = le({ usage: "search", sensitivity: "base" }), l = F(
|
|
164
|
+
() => new ae(
|
|
165
|
+
t.collection,
|
|
166
|
+
t.disabledKeys,
|
|
167
|
+
null,
|
|
168
|
+
n
|
|
169
|
+
),
|
|
170
|
+
[t.collection, t.disabledKeys, n]
|
|
171
|
+
), { menuTriggerProps: s, menuProps: c } = ee(
|
|
172
|
+
{
|
|
173
|
+
isDisabled: a,
|
|
174
|
+
type: "listbox"
|
|
175
|
+
},
|
|
176
|
+
t,
|
|
177
|
+
o
|
|
178
|
+
), u = (f) => {
|
|
179
|
+
const { selectedKeys: v, selectionMode: j } = t, C = v.values().next().value;
|
|
180
|
+
if (j === "single")
|
|
181
|
+
switch (f.key) {
|
|
182
|
+
case "ArrowLeft": {
|
|
183
|
+
f.preventDefault();
|
|
184
|
+
const $ = v.size > 0 ? l.getKeyAbove(C) : l.getFirstKey();
|
|
185
|
+
$ && t.setSelectedKeys([$]);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
case "ArrowRight": {
|
|
189
|
+
f.preventDefault();
|
|
190
|
+
const $ = v.size > 0 ? l.getKeyBelow(C) : l.getFirstKey();
|
|
191
|
+
$ && t.setSelectedKeys([$]);
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, { typeSelectProps: d } = ie({
|
|
196
|
+
keyboardDelegate: l,
|
|
197
|
+
selectionManager: t.selectionManager,
|
|
198
|
+
onTypeSelect(f) {
|
|
199
|
+
t.setSelectedKeys([f]);
|
|
200
|
+
}
|
|
201
|
+
}), { labelProps: y, fieldProps: b } = ce({
|
|
202
|
+
...e,
|
|
203
|
+
labelElementType: "span"
|
|
204
|
+
});
|
|
205
|
+
d.onKeyDown = d.onKeyDownCapture, delete d.onKeyDownCapture;
|
|
206
|
+
const m = re(e, { labelable: !0 }), h = _(d, s, b), S = oe();
|
|
207
|
+
return {
|
|
208
|
+
labelProps: {
|
|
209
|
+
...y,
|
|
210
|
+
onClick: () => {
|
|
211
|
+
var f;
|
|
212
|
+
e.isDisabled || ((f = o.current) == null || f.focus(), Z("keyboard"));
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
triggerProps: _(m, {
|
|
216
|
+
...h,
|
|
217
|
+
onKeyDown: ne(
|
|
218
|
+
h.onKeyDown,
|
|
219
|
+
u,
|
|
220
|
+
e.onKeyDown
|
|
221
|
+
),
|
|
222
|
+
onKeyUp: e.onKeyUp,
|
|
223
|
+
"aria-labelledby": [
|
|
224
|
+
h["aria-labelledby"],
|
|
225
|
+
h["aria-label"] && !h["aria-labelledby"] ? h.id : null,
|
|
226
|
+
S
|
|
227
|
+
].filter(Boolean).join(" "),
|
|
228
|
+
onFocus(f) {
|
|
229
|
+
t.isFocused || (e.onFocus && e.onFocus(f), t.setFocused(!0));
|
|
230
|
+
},
|
|
231
|
+
onBlur(f) {
|
|
232
|
+
t.isOpen || (e.onBlur && e.onBlur(f), t.setFocused(!1));
|
|
233
|
+
}
|
|
234
|
+
}),
|
|
235
|
+
valueProps: {
|
|
236
|
+
id: S
|
|
237
|
+
},
|
|
238
|
+
menuProps: {
|
|
239
|
+
...c,
|
|
240
|
+
disallowEmptySelection: r,
|
|
241
|
+
autoFocus: t.focusStrategy || !0,
|
|
242
|
+
shouldSelectOnPressUp: !0,
|
|
243
|
+
shouldFocusOnHover: !0,
|
|
244
|
+
onBlur: (f) => {
|
|
245
|
+
f.currentTarget.contains(f.relatedTarget) || (e.onBlur && e.onBlur(f), t.setFocused(!1));
|
|
246
|
+
},
|
|
247
|
+
"aria-labelledby": [
|
|
248
|
+
b["aria-labelledby"],
|
|
249
|
+
h["aria-label"] && !b["aria-labelledby"] ? h.id : null
|
|
250
|
+
].filter(Boolean).join(" ")
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
function Le(e) {
|
|
255
|
+
const {
|
|
256
|
+
collection: t,
|
|
257
|
+
disabledKeys: o,
|
|
258
|
+
selectionManager: r,
|
|
259
|
+
selectionManager: { setSelectedKeys: a, selectedKeys: n, selectionMode: l }
|
|
260
|
+
} = fe(e), s = [], c = n.size !== 0 ? Array.from(n).map((u) => {
|
|
261
|
+
const d = t.getItem(u);
|
|
262
|
+
return d || s.push(u), d;
|
|
263
|
+
}).filter(Boolean) : null;
|
|
264
|
+
return s.length && console.warn(
|
|
265
|
+
`Select: Keys "${s.join(
|
|
266
|
+
", "
|
|
267
|
+
)}" passed to "selectedKeys" are not present in the collection.`
|
|
268
|
+
), {
|
|
269
|
+
collection: t,
|
|
270
|
+
disabledKeys: o,
|
|
271
|
+
selectionManager: r,
|
|
272
|
+
selectionMode: l,
|
|
273
|
+
selectedKeys: n,
|
|
274
|
+
setSelectedKeys: a.bind(r),
|
|
275
|
+
selectedItems: c
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function Oe(e) {
|
|
279
|
+
const [t, o] = D(!1), r = te(e), a = e.selectionMode === "single", n = Le({
|
|
280
|
+
...e,
|
|
281
|
+
onSelectionChange: (d) => {
|
|
282
|
+
e.onSelectionChange && e.onSelectionChange(d), a && r.close();
|
|
283
|
+
}
|
|
284
|
+
}), l = se({
|
|
285
|
+
...e,
|
|
286
|
+
validationBehavior: "native",
|
|
287
|
+
value: n.selectedKeys
|
|
288
|
+
}), s = n.collection.size === 0, c = !!n.selectedKeys.size, u = E(() => {
|
|
289
|
+
l.resetValidation(), l.commitValidation();
|
|
290
|
+
}, [l]);
|
|
291
|
+
return L(() => {
|
|
292
|
+
a && c && u();
|
|
293
|
+
}, [c, a, u]), {
|
|
294
|
+
...n,
|
|
295
|
+
...r,
|
|
296
|
+
close() {
|
|
297
|
+
r.close(), c && u();
|
|
298
|
+
},
|
|
299
|
+
open() {
|
|
300
|
+
s || r.open();
|
|
301
|
+
},
|
|
302
|
+
toggle(d) {
|
|
303
|
+
s || r.toggle(d);
|
|
304
|
+
},
|
|
305
|
+
isFocused: t,
|
|
306
|
+
setFocused: o,
|
|
307
|
+
...l
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function ze({
|
|
311
|
+
autoComplete: e,
|
|
312
|
+
name: t,
|
|
313
|
+
isDisabled: o,
|
|
314
|
+
isRequired: r,
|
|
315
|
+
selectRef: a
|
|
316
|
+
}, n, l) {
|
|
317
|
+
const { visuallyHiddenProps: s } = pe();
|
|
318
|
+
return de(a, n.selectedKeys, n.setSelectedKeys), ue(
|
|
319
|
+
{
|
|
320
|
+
validationBehavior: "native",
|
|
321
|
+
focus: () => {
|
|
322
|
+
var c;
|
|
323
|
+
return (c = l.current) == null ? void 0 : c.focus();
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
n,
|
|
327
|
+
a
|
|
328
|
+
), {
|
|
329
|
+
containerProps: {
|
|
330
|
+
...s,
|
|
331
|
+
"aria-hidden": !0,
|
|
332
|
+
// @ts-expect-error - data-a11y-ignore is not a standard attribute
|
|
333
|
+
"data-react-aria-prevent-focus": !0,
|
|
334
|
+
"data-a11y-ignore": "aria-hidden-focus"
|
|
335
|
+
},
|
|
336
|
+
inputProps: {
|
|
337
|
+
style: { display: "none" }
|
|
338
|
+
},
|
|
339
|
+
selectProps: {
|
|
340
|
+
tabIndex: -1,
|
|
341
|
+
autoComplete: e,
|
|
342
|
+
disabled: o,
|
|
343
|
+
required: r,
|
|
344
|
+
name: t,
|
|
345
|
+
value: Array.from(n.selectedKeys).map((c) => c.toString()),
|
|
346
|
+
onChange: (c) => n.setSelectedKeys(c.target.value),
|
|
347
|
+
multiple: !0
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function Re(e) {
|
|
352
|
+
const { state: t, triggerRef: o, name: r, isDisabled: a } = e, n = `${e.label}-hidden`, l = O(null), { containerProps: s, selectProps: c } = ze(
|
|
353
|
+
{ ...e, selectRef: l },
|
|
354
|
+
t,
|
|
355
|
+
o
|
|
356
|
+
);
|
|
357
|
+
return t.collection.size <= 300 ? /* @__PURE__ */ i(
|
|
358
|
+
"div",
|
|
359
|
+
{
|
|
360
|
+
...s,
|
|
361
|
+
"data-testid": "hidden-select-container",
|
|
362
|
+
children: /* @__PURE__ */ g("label", { children: [
|
|
363
|
+
n,
|
|
364
|
+
/* @__PURE__ */ g(
|
|
365
|
+
"select",
|
|
366
|
+
{
|
|
367
|
+
...c,
|
|
368
|
+
ref: l,
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ i("option", {}),
|
|
371
|
+
[...t.collection.getKeys()].map((u) => {
|
|
372
|
+
const d = t.collection.getItem(u);
|
|
373
|
+
return d && d.type === "item" ? /* @__PURE__ */ i(
|
|
374
|
+
"option",
|
|
375
|
+
{
|
|
376
|
+
value: d.key,
|
|
377
|
+
children: d.textValue
|
|
378
|
+
},
|
|
379
|
+
d.key
|
|
380
|
+
) : null;
|
|
381
|
+
})
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
)
|
|
385
|
+
] })
|
|
386
|
+
}
|
|
387
|
+
) : r ? /* @__PURE__ */ i(
|
|
388
|
+
"input",
|
|
389
|
+
{
|
|
390
|
+
type: "hidden",
|
|
391
|
+
autoComplete: c.autoComplete,
|
|
392
|
+
name: r,
|
|
393
|
+
disabled: a,
|
|
394
|
+
value: Array.from(t.selectedKeys).map((u) => u.toString()) ?? [""]
|
|
395
|
+
}
|
|
396
|
+
) : null;
|
|
397
|
+
}
|
|
398
|
+
const Ge = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", chosen: "chosen" }, We = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", chosen: "valda" }, M = {
|
|
399
|
+
en: Ge,
|
|
400
|
+
sv: We
|
|
401
|
+
}, He = ({
|
|
402
|
+
state: { selectedItems: e },
|
|
403
|
+
isDisabled: t,
|
|
404
|
+
parentWidth: o,
|
|
405
|
+
onClear: r,
|
|
406
|
+
triggerRef: a,
|
|
407
|
+
isClearable: n
|
|
408
|
+
}) => {
|
|
409
|
+
const l = B(M);
|
|
410
|
+
return /* @__PURE__ */ g(
|
|
411
|
+
"div",
|
|
412
|
+
{
|
|
413
|
+
className: p.selectValueTag,
|
|
414
|
+
"data-disabled": t || void 0,
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ i(
|
|
417
|
+
"span",
|
|
418
|
+
{
|
|
419
|
+
className: p.truncate,
|
|
420
|
+
style: { maxWidth: o - 92 },
|
|
421
|
+
children: e != null && e.length && e.length > 1 ? `${e.length} ${l.format("chosen")}` : e == null ? void 0 : e[0].textValue
|
|
422
|
+
}
|
|
423
|
+
),
|
|
424
|
+
n && /* @__PURE__ */ i(
|
|
425
|
+
"button",
|
|
426
|
+
{
|
|
427
|
+
disabled: t,
|
|
428
|
+
"aria-label": l.format("clearAll"),
|
|
429
|
+
className: p.clearButton,
|
|
430
|
+
onClick: () => {
|
|
431
|
+
var s;
|
|
432
|
+
r(), (s = a == null ? void 0 : a.current) == null || s.focus();
|
|
433
|
+
},
|
|
434
|
+
children: /* @__PURE__ */ i(
|
|
435
|
+
ye,
|
|
436
|
+
{
|
|
437
|
+
width: 20,
|
|
438
|
+
height: 20
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
}
|
|
442
|
+
)
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
);
|
|
446
|
+
}, Ue = ({
|
|
447
|
+
autoFocus: e,
|
|
448
|
+
excludeFromTabOrder: t,
|
|
449
|
+
isDisabled: o,
|
|
450
|
+
size: r = "large",
|
|
451
|
+
isOpen: a,
|
|
452
|
+
isInvalid: n,
|
|
453
|
+
selectionMode: l,
|
|
454
|
+
state: { selectedItems: s },
|
|
455
|
+
placeholder: c,
|
|
456
|
+
children: u,
|
|
457
|
+
triggerRef: d,
|
|
458
|
+
...y
|
|
459
|
+
}) => {
|
|
460
|
+
const { buttonProps: b } = $e(
|
|
461
|
+
{ autoFocus: e, excludeFromTabOrder: t, isDisabled: o, ...y },
|
|
462
|
+
d
|
|
463
|
+
), m = l === "multiple";
|
|
464
|
+
return /* @__PURE__ */ g(
|
|
465
|
+
"div",
|
|
466
|
+
{
|
|
467
|
+
className: p.triggerContainer,
|
|
468
|
+
"data-disabled": o || void 0,
|
|
469
|
+
children: [
|
|
470
|
+
/* @__PURE__ */ g(
|
|
471
|
+
"button",
|
|
472
|
+
{
|
|
473
|
+
...b,
|
|
474
|
+
autoFocus: e,
|
|
475
|
+
className: P(p.trigger, {
|
|
476
|
+
[p.medium]: r === "medium"
|
|
477
|
+
}),
|
|
478
|
+
"data-disabled": o || void 0,
|
|
479
|
+
"data-invalid": n || void 0,
|
|
480
|
+
"data-open": a || void 0,
|
|
481
|
+
ref: d,
|
|
482
|
+
type: "button",
|
|
483
|
+
children: [
|
|
484
|
+
m && !s ? /* @__PURE__ */ i("span", { children: c }) : null,
|
|
485
|
+
m ? null : /* @__PURE__ */ i("span", { children: s ? s[0].textValue : c }),
|
|
486
|
+
/* @__PURE__ */ i(
|
|
487
|
+
"div",
|
|
488
|
+
{
|
|
489
|
+
className: p.icon,
|
|
490
|
+
"aria-hidden": "true",
|
|
491
|
+
children: /* @__PURE__ */ i(ve, { size: 20 })
|
|
492
|
+
}
|
|
493
|
+
)
|
|
494
|
+
]
|
|
495
|
+
}
|
|
496
|
+
),
|
|
497
|
+
u
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
}, V = ({
|
|
502
|
+
state: e,
|
|
503
|
+
errorMessage: t
|
|
504
|
+
}) => /* @__PURE__ */ i(xe.Provider, { value: { ...e.displayValidation }, children: /* @__PURE__ */ i(Se, { children: t }) }), qe = w.forwardRef(
|
|
505
|
+
({ isClearable: e = !0, popover: t, ...o }, r) => {
|
|
506
|
+
const a = {
|
|
507
|
+
selectionMode: "single",
|
|
508
|
+
errorPosition: "top",
|
|
509
|
+
disallowEmptySelection: !e,
|
|
510
|
+
isClearable: e,
|
|
511
|
+
size: "large",
|
|
512
|
+
popover: t,
|
|
513
|
+
...o
|
|
514
|
+
}, n = z(r), l = Oe(a), s = B(M), { labelProps: c, triggerProps: u, valueProps: d, menuProps: y } = Ee(
|
|
515
|
+
a,
|
|
516
|
+
l,
|
|
517
|
+
n
|
|
518
|
+
), { width: b } = me(n.current, {
|
|
519
|
+
includePadding: !0
|
|
520
|
+
});
|
|
521
|
+
return /* @__PURE__ */ g(
|
|
522
|
+
H,
|
|
523
|
+
{
|
|
524
|
+
...a,
|
|
525
|
+
className: P(p.wrapper, a.className),
|
|
526
|
+
children: [
|
|
527
|
+
/* @__PURE__ */ i(
|
|
528
|
+
Re,
|
|
529
|
+
{
|
|
530
|
+
...a,
|
|
531
|
+
state: l,
|
|
532
|
+
triggerRef: n
|
|
533
|
+
}
|
|
534
|
+
),
|
|
535
|
+
/* @__PURE__ */ i(be, { popover: t, children: a.label && /* @__PURE__ */ i(
|
|
536
|
+
he,
|
|
537
|
+
{
|
|
538
|
+
...c,
|
|
539
|
+
"data-disabled": a.isDisabled || void 0,
|
|
540
|
+
children: a.label
|
|
541
|
+
}
|
|
542
|
+
) }),
|
|
543
|
+
a.description && /* @__PURE__ */ i(ge, { slot: "description", children: a.description }),
|
|
544
|
+
a.errorPosition === "top" && /* @__PURE__ */ i(
|
|
545
|
+
V,
|
|
546
|
+
{
|
|
547
|
+
...a,
|
|
548
|
+
state: l
|
|
549
|
+
}
|
|
550
|
+
),
|
|
551
|
+
/* @__PURE__ */ i(
|
|
552
|
+
Ue,
|
|
553
|
+
{
|
|
554
|
+
...a,
|
|
555
|
+
...u,
|
|
556
|
+
isInvalid: l.displayValidation.isInvalid,
|
|
557
|
+
triggerRef: n,
|
|
558
|
+
state: l,
|
|
559
|
+
children: a.selectionMode === "multiple" && l.selectedItems ? /* @__PURE__ */ i("span", { ...d, children: /* @__PURE__ */ i(
|
|
560
|
+
He,
|
|
561
|
+
{
|
|
562
|
+
...a,
|
|
563
|
+
state: l,
|
|
564
|
+
parentWidth: b,
|
|
565
|
+
onClear: () => l.selectionManager.clearSelection(),
|
|
566
|
+
triggerRef: n
|
|
567
|
+
}
|
|
568
|
+
) }) : null
|
|
569
|
+
}
|
|
570
|
+
),
|
|
571
|
+
a.errorPosition === "bottom" && /* @__PURE__ */ i(
|
|
572
|
+
V,
|
|
573
|
+
{
|
|
574
|
+
...a,
|
|
575
|
+
state: l
|
|
576
|
+
}
|
|
577
|
+
),
|
|
578
|
+
/* @__PURE__ */ g(
|
|
579
|
+
Q,
|
|
580
|
+
{
|
|
581
|
+
isOpen: l.isOpen,
|
|
582
|
+
onOpenChange: (m) => {
|
|
583
|
+
m || l.close();
|
|
584
|
+
},
|
|
585
|
+
triggerRef: n,
|
|
586
|
+
style: { width: b },
|
|
587
|
+
children: [
|
|
588
|
+
a.isSelectableAll && /* @__PURE__ */ i(
|
|
589
|
+
k,
|
|
590
|
+
{
|
|
591
|
+
isSelected: l.selectionManager.isSelectAll,
|
|
592
|
+
isIndeterminate: !l.selectionManager.isSelectAll && !l.selectionManager.isEmpty,
|
|
593
|
+
className: p.selectAll,
|
|
594
|
+
onChange: () => l.selectionManager.toggleSelectAll(),
|
|
595
|
+
children: s.format("selectAll")
|
|
596
|
+
}
|
|
597
|
+
),
|
|
598
|
+
/* @__PURE__ */ i(
|
|
599
|
+
De,
|
|
600
|
+
{
|
|
601
|
+
...y,
|
|
602
|
+
state: l
|
|
603
|
+
}
|
|
604
|
+
)
|
|
605
|
+
]
|
|
606
|
+
}
|
|
607
|
+
),
|
|
608
|
+
a.showTags && !!l.selectedItems && /* @__PURE__ */ i(
|
|
609
|
+
R,
|
|
610
|
+
{
|
|
611
|
+
"aria-label": s.format("selectedItems"),
|
|
612
|
+
selectionBehavior: "toggle",
|
|
613
|
+
onRemove: (m) => l.selectionManager.toggleSelection(Array.from(m)[0]),
|
|
614
|
+
className: p.tagGroup,
|
|
615
|
+
children: /* @__PURE__ */ i(G, { items: l.selectedItems, children: (m) => /* @__PURE__ */ i(
|
|
616
|
+
W,
|
|
617
|
+
{
|
|
618
|
+
textValue: m.textValue,
|
|
619
|
+
id: m.key,
|
|
620
|
+
dismissable: !0,
|
|
621
|
+
isDisabled: a.isDisabled,
|
|
622
|
+
children: m.textValue
|
|
623
|
+
},
|
|
624
|
+
m.key
|
|
625
|
+
) })
|
|
626
|
+
}
|
|
627
|
+
)
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
), Xe = w.forwardRef(
|
|
633
|
+
({ options: e, ...t }, o) => /* @__PURE__ */ i(
|
|
634
|
+
qe,
|
|
635
|
+
{
|
|
636
|
+
...t,
|
|
637
|
+
items: e,
|
|
638
|
+
ref: o,
|
|
639
|
+
children: (r) => r.children ? /* @__PURE__ */ i(
|
|
640
|
+
_e,
|
|
641
|
+
{
|
|
642
|
+
items: r.children,
|
|
643
|
+
title: r.name,
|
|
644
|
+
children: (a) => /* @__PURE__ */ i(K, { textValue: a.textValue, children: a.name })
|
|
645
|
+
},
|
|
646
|
+
r.name
|
|
647
|
+
) : /* @__PURE__ */ i(K, { textValue: r.textValue, children: r.name })
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
);
|
|
651
|
+
Xe.displayName = "Select";
|
|
652
|
+
export {
|
|
653
|
+
Xe as S
|
|
654
|
+
};
|