@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
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,117 @@
|
|
|
1
|
+
## 12.1.0 (2025-09-10)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **menu:** new Menu component ([#744](https://github.com/migrationsverket/midas/pull/744))
|
|
6
|
+
- **combobox:** add loading indicator ([#772](https://github.com/migrationsverket/midas/pull/772), [#712](https://github.com/migrationsverket/midas/issues/712))
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- repair broken tokens ([e905bbf788](https://github.com/migrationsverket/midas/commit/e905bbf788))
|
|
11
|
+
- **select:** minor screen reader announcement bugs ([#775](https://github.com/migrationsverket/midas/pull/775))
|
|
12
|
+
- **accordion:** add margin for focus indicator ([#780](https://github.com/migrationsverket/midas/pull/780))
|
|
13
|
+
- broken tokens ([#782](https://github.com/migrationsverket/midas/pull/782))
|
|
14
|
+
- **layout:** add basepath to active link comparison ([4dec0a45ef](https://github.com/migrationsverket/midas/commit/4dec0a45ef))
|
|
15
|
+
- **badge:** change background color in dark mode ([f40f2dad67](https://github.com/migrationsverket/midas/commit/f40f2dad67))
|
|
16
|
+
- **select:** add aria label to checkbox ([e6cb387a7f](https://github.com/migrationsverket/midas/commit/e6cb387a7f))
|
|
17
|
+
- **components:** export missing listbox types from component lib ([1f06b98610](https://github.com/migrationsverket/midas/commit/1f06b98610))
|
|
18
|
+
- **textfield:** remove duplicate props spreading ([#769](https://github.com/migrationsverket/midas/pull/769))
|
|
19
|
+
- **textfield:** make textarea resizable and remove size from controls storybook ([6d04e25308](https://github.com/migrationsverket/midas/commit/6d04e25308))
|
|
20
|
+
|
|
21
|
+
### 💅 Refactors
|
|
22
|
+
|
|
23
|
+
- rename variables in \*.module.css ([42329bde56](https://github.com/migrationsverket/midas/commit/42329bde56))
|
|
24
|
+
- Migrate CSS custom properties from tokens.css to theme.css ([8a21fe5783](https://github.com/migrationsverket/midas/commit/8a21fe5783))
|
|
25
|
+
|
|
26
|
+
### 📖 Documentation changes
|
|
27
|
+
|
|
28
|
+
- update tokens page with headers and remove tokens from list that are only refs ([ded9bfa8c7](https://github.com/migrationsverket/midas/commit/ded9bfa8c7))
|
|
29
|
+
|
|
30
|
+
### 🔧 Maintenance
|
|
31
|
+
|
|
32
|
+
- **deps:** bump vite in the npm_and_yarn group across 1 directory ([7758e60274](https://github.com/migrationsverket/midas/commit/7758e60274))
|
|
33
|
+
- add css variable linting ([c39e488881](https://github.com/migrationsverket/midas/commit/c39e488881))
|
|
34
|
+
- add dummy comment ([0c12e51cec](https://github.com/migrationsverket/midas/commit/0c12e51cec))
|
|
35
|
+
- move sd config into components package ([4e61ffb05b](https://github.com/migrationsverket/midas/commit/4e61ffb05b))
|
|
36
|
+
- replace rgba() with hex color ([c03b3a7737](https://github.com/migrationsverket/midas/commit/c03b3a7737))
|
|
37
|
+
- set proper object relationship `white: {base: {$value: ...` ([a60bd1643e](https://github.com/migrationsverket/midas/commit/a60bd1643e))
|
|
38
|
+
- add comments to deprecations in tokens.ts ([1adf6a5ffa](https://github.com/migrationsverket/midas/commit/1adf6a5ffa))
|
|
39
|
+
- fix incorrect color generation for nested light-dark ([83b80912f9](https://github.com/migrationsverket/midas/commit/83b80912f9))
|
|
40
|
+
- deprecate tokens.ts and add a warning text to relevant docs ([3025708cc3](https://github.com/migrationsverket/midas/commit/3025708cc3))
|
|
41
|
+
- fix additional `base` variables ([f698b08f8f](https://github.com/migrationsverket/midas/commit/f698b08f8f))
|
|
42
|
+
- replace `@` with `base`, additional cleanup ([2c6bf1e35a](https://github.com/migrationsverket/midas/commit/2c6bf1e35a))
|
|
43
|
+
- correct badge style fixes ([dc8555d733](https://github.com/migrationsverket/midas/commit/dc8555d733))
|
|
44
|
+
- update new badge colors ([f287e78fab](https://github.com/migrationsverket/midas/commit/f287e78fab))
|
|
45
|
+
- add types to generated tokens ([ba3749bd68](https://github.com/migrationsverket/midas/commit/ba3749bd68))
|
|
46
|
+
- temporarily allow js to get a successful build ([2615fe4c40](https://github.com/migrationsverket/midas/commit/2615fe4c40))
|
|
47
|
+
- ignore variables.css in stylelint ([859dbfbd75](https://github.com/migrationsverket/midas/commit/859dbfbd75))
|
|
48
|
+
- start working on docs ([551e825e38](https://github.com/migrationsverket/midas/commit/551e825e38))
|
|
49
|
+
- clean and update style dictionary script ([4a9423ddb6](https://github.com/migrationsverket/midas/commit/4a9423ddb6))
|
|
50
|
+
- remove theme.css generator ([75adb9e1d5](https://github.com/migrationsverket/midas/commit/75adb9e1d5))
|
|
51
|
+
- rename custom css properties ([aa3eddcef9](https://github.com/migrationsverket/midas/commit/aa3eddcef9))
|
|
52
|
+
- update sd build script ([0b9eb9955e](https://github.com/migrationsverket/midas/commit/0b9eb9955e))
|
|
53
|
+
- add basic config and json input for style dictionary ([6af3212a6a](https://github.com/migrationsverket/midas/commit/6af3212a6a))
|
|
54
|
+
- **deps:** bump the npm_and_yarn group across 1 directory with 4 updates ([67b2b595a1](https://github.com/migrationsverket/midas/commit/67b2b595a1))
|
|
55
|
+
- relax stylelint config to allow media query syntax ([5b6955e604](https://github.com/migrationsverket/midas/commit/5b6955e604))
|
|
56
|
+
- remove check-values-import.js since it is no longer applicable ([f4c3ee95a4](https://github.com/migrationsverket/midas/commit/f4c3ee95a4))
|
|
57
|
+
- create separate storybook configs for serve and build ([642e155d8a](https://github.com/migrationsverket/midas/commit/642e155d8a))
|
|
58
|
+
- update dependencies ([#751](https://github.com/migrationsverket/midas/pull/751))
|
|
59
|
+
|
|
60
|
+
### 🧪 Tests updated
|
|
61
|
+
|
|
62
|
+
- **table:** add a11y test with links in a striped table ([f3cd83cee2](https://github.com/migrationsverket/midas/commit/f3cd83cee2))
|
|
63
|
+
- **table:** remove flaky test ([9b309c1ade](https://github.com/migrationsverket/midas/commit/9b309c1ade))
|
|
64
|
+
- **tag:** add textValue to mute console.warn ([d5d68e4363](https://github.com/migrationsverket/midas/commit/d5d68e4363))
|
|
65
|
+
|
|
66
|
+
# 12.0.0 (2025-08-27)
|
|
67
|
+
|
|
68
|
+
### 🚀 Features
|
|
69
|
+
|
|
70
|
+
- **info-banner:** add controlled state ([#754](https://github.com/migrationsverket/midas/pull/754))
|
|
71
|
+
- **modal:** change title to `h2`, remove margin and center vertically ([400b06702a](https://github.com/migrationsverket/midas/commit/400b06702a))
|
|
72
|
+
- **modal:** move modal title to the header ([4889b827d4](https://github.com/migrationsverket/midas/commit/4889b827d4))
|
|
73
|
+
- **theme:** Implement dynamic theme generation and CSS validation ([f50ee50a5b](https://github.com/migrationsverket/midas/commit/f50ee50a5b))
|
|
74
|
+
- ⚠️ Automate ESLint versioning and remove deprecated features ([577253d5bb](https://github.com/migrationsverket/midas/commit/577253d5bb))
|
|
75
|
+
- **dropdown:** add custom icon support ([6d34b3061a](https://github.com/migrationsverket/midas/commit/6d34b3061a))
|
|
76
|
+
- ⚠️ **components:** change feedback status icons to consistent pattern ([8075adb685](https://github.com/migrationsverket/midas/commit/8075adb685))
|
|
77
|
+
- **accordion:** add option to display more statuses ([3eb637fc17](https://github.com/migrationsverket/midas/commit/3eb637fc17))
|
|
78
|
+
- **table:** add virtualizer recipe ([#736](https://github.com/migrationsverket/midas/pull/736))
|
|
79
|
+
|
|
80
|
+
### 🩹 Fixes
|
|
81
|
+
|
|
82
|
+
- **badge:** replace label color ([cfda450f4e](https://github.com/migrationsverket/midas/commit/cfda450f4e))
|
|
83
|
+
- **date-picker:** remove explicit height for calendar button ([3fe21636ea](https://github.com/migrationsverket/midas/commit/3fe21636ea))
|
|
84
|
+
|
|
85
|
+
### 💅 Refactors
|
|
86
|
+
|
|
87
|
+
- extract `FeedbackStatus` type ([8396c9e628](https://github.com/migrationsverket/midas/commit/8396c9e628))
|
|
88
|
+
|
|
89
|
+
### 🔧 Maintenance
|
|
90
|
+
|
|
91
|
+
- **theme:** export css variables in theme.css from @midas-ds/components package ([f9eddbf186](https://github.com/migrationsverket/midas/commit/f9eddbf186))
|
|
92
|
+
- remove storybook global size control ([#749](https://github.com/migrationsverket/midas/pull/749))
|
|
93
|
+
- deploy docweb from dev branch ([80f58e46d2](https://github.com/migrationsverket/midas/commit/80f58e46d2))
|
|
94
|
+
|
|
95
|
+
### 🧪 Tests updated
|
|
96
|
+
|
|
97
|
+
- **button:** move interaction tests to a separate story ([9dfd1459cd](https://github.com/migrationsverket/midas/commit/9dfd1459cd))
|
|
98
|
+
- **link-button:** remove a11y test bypass ([a059db212a](https://github.com/migrationsverket/midas/commit/a059db212a))
|
|
99
|
+
- **search-field:** remove global size ([#759](https://github.com/migrationsverket/midas/pull/759))
|
|
100
|
+
- remove size test from button linkButton and table ([48a26e096e](https://github.com/migrationsverket/midas/commit/48a26e096e))
|
|
101
|
+
- **badge:** bypass a11y tests ([626ceaf98c](https://github.com/migrationsverket/midas/commit/626ceaf98c))
|
|
102
|
+
- **badge:** fix failing test in dark mode ([d91b690316](https://github.com/migrationsverket/midas/commit/d91b690316))
|
|
103
|
+
- **link-button:** bypass a11y test ([ad33fbfd58](https://github.com/migrationsverket/midas/commit/ad33fbfd58))
|
|
104
|
+
- emulate media in prepare test hook ([e4060227d4](https://github.com/migrationsverket/midas/commit/e4060227d4))
|
|
105
|
+
|
|
106
|
+
### ⏪ Revert
|
|
107
|
+
|
|
108
|
+
- **theme:** Revert "fix(theme): change dark mode values for danger button" ([6cb506566e](https://github.com/migrationsverket/midas/commit/6cb506566e))
|
|
109
|
+
|
|
110
|
+
### ⚠️ Breaking Changes
|
|
111
|
+
|
|
112
|
+
- ⚠️ Automate ESLint versioning and remove deprecated features ([577253d5bb](https://github.com/migrationsverket/midas/commit/577253d5bb))
|
|
113
|
+
- **components:** when using `type` (`'success'|'info'|'warning'|'important'`) the string `default` is
|
|
114
|
+
|
|
1
115
|
## 11.2.0 (2025-08-14)
|
|
2
116
|
|
|
3
117
|
### 🚀 Features
|
package/Card-BDDyGAMA.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as n } from "./clsx-OuTLNxxd.js";
|
|
3
|
+
import * as e from "react";
|
|
4
|
+
import { H as m } from "./Heading-BQlmb5Tm.js";
|
|
5
|
+
import { $ as _ } from "./Button-DD5_S-tD.js";
|
|
6
|
+
import { $ as C } from "./Link-CbFSuEI1.js";
|
|
7
|
+
import { A as x } from "./arrow-right-uemUGIg8.js";
|
|
8
|
+
import './assets/Card.css';const A = "_card_1tcxj_4", h = "_horizontal_1tcxj_10", I = "_cardLink_1tcxj_15", p = "_cardContent_1tcxj_20", u = "_cardActions_1tcxj_39", f = "_cardActionArea_1tcxj_49", z = "_cardImage_1tcxj_82", j = "_cardLinkIcon_1tcxj_114", o = {
|
|
9
|
+
card: A,
|
|
10
|
+
horizontal: h,
|
|
11
|
+
cardLink: I,
|
|
12
|
+
cardContent: p,
|
|
13
|
+
cardActions: u,
|
|
14
|
+
cardActionArea: f,
|
|
15
|
+
cardImage: z,
|
|
16
|
+
cardLinkIcon: j
|
|
17
|
+
}, d = e.createContext({
|
|
18
|
+
horizontal: void 0,
|
|
19
|
+
titleId: void 0
|
|
20
|
+
}), y = ({
|
|
21
|
+
horizontal: a,
|
|
22
|
+
className: c,
|
|
23
|
+
children: t,
|
|
24
|
+
...s
|
|
25
|
+
}) => {
|
|
26
|
+
const i = `card-title-${e.useId()}`;
|
|
27
|
+
return /* @__PURE__ */ r(d.Provider, { value: { horizontal: a, titleId: i }, children: /* @__PURE__ */ r(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
...s,
|
|
31
|
+
className: n(
|
|
32
|
+
o.card,
|
|
33
|
+
a && o.horizontal,
|
|
34
|
+
c
|
|
35
|
+
),
|
|
36
|
+
children: t
|
|
37
|
+
}
|
|
38
|
+
) });
|
|
39
|
+
}, H = ({
|
|
40
|
+
children: a,
|
|
41
|
+
...c
|
|
42
|
+
}) => {
|
|
43
|
+
const { horizontal: t } = e.useContext(d);
|
|
44
|
+
return /* @__PURE__ */ r(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
...c,
|
|
48
|
+
className: n(o.cardContent, t && o.horizontal),
|
|
49
|
+
children: a
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}, R = ({
|
|
53
|
+
elementType: a = "h2",
|
|
54
|
+
children: c
|
|
55
|
+
}) => {
|
|
56
|
+
const { horizontal: t, titleId: s } = e.useContext(d);
|
|
57
|
+
return /* @__PURE__ */ r(
|
|
58
|
+
m,
|
|
59
|
+
{
|
|
60
|
+
level: t ? 5 : 3,
|
|
61
|
+
elementType: a,
|
|
62
|
+
isExpressive: t,
|
|
63
|
+
className: n(o.cardTitle, t && o.horizontal),
|
|
64
|
+
id: s,
|
|
65
|
+
children: c
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}, T = ({
|
|
69
|
+
children: a,
|
|
70
|
+
...c
|
|
71
|
+
}) => {
|
|
72
|
+
const { horizontal: t } = e.useContext(d);
|
|
73
|
+
return /* @__PURE__ */ r(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
...c,
|
|
77
|
+
className: n(o.cardActions, t && o.horizontal),
|
|
78
|
+
children: a
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}, w = ({ children: a, className: c, ...t }) => {
|
|
82
|
+
const { titleId: s } = e.useContext(d);
|
|
83
|
+
return /* @__PURE__ */ r(
|
|
84
|
+
_,
|
|
85
|
+
{
|
|
86
|
+
...t,
|
|
87
|
+
"aria-labelledby": s,
|
|
88
|
+
className: n(o.cardActionArea, c),
|
|
89
|
+
children: a
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}, E = ({
|
|
93
|
+
as: a = "img",
|
|
94
|
+
className: c,
|
|
95
|
+
...t
|
|
96
|
+
}) => /* @__PURE__ */ r(
|
|
97
|
+
a,
|
|
98
|
+
{
|
|
99
|
+
...t,
|
|
100
|
+
className: n(o.cardImage, c)
|
|
101
|
+
}
|
|
102
|
+
), P = ({
|
|
103
|
+
children: a,
|
|
104
|
+
as: c,
|
|
105
|
+
...t
|
|
106
|
+
}) => /* @__PURE__ */ l(
|
|
107
|
+
c || C,
|
|
108
|
+
{
|
|
109
|
+
...t,
|
|
110
|
+
className: n(o.cardLink, t.className),
|
|
111
|
+
children: [
|
|
112
|
+
a,
|
|
113
|
+
/* @__PURE__ */ r(
|
|
114
|
+
x,
|
|
115
|
+
{
|
|
116
|
+
className: o.cardLinkIcon,
|
|
117
|
+
size: 24
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
export {
|
|
124
|
+
y as C,
|
|
125
|
+
H as a,
|
|
126
|
+
R as b,
|
|
127
|
+
T as c,
|
|
128
|
+
w as d,
|
|
129
|
+
E as e,
|
|
130
|
+
P as f
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Card.css');const a=require("react/jsx-runtime"),o=require("./clsx-C11secjj.cjs"),l=require("react"),x=require("./Heading-D3FR_KXb.cjs"),u=require("./Button-CMIbSc4-.cjs"),C=require("./Link-wM7cVPlS.cjs"),_=require("./arrow-right-BGd86zzR.cjs");function j(c){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>c[t]})}}return e.default=c,Object.freeze(e)}const s=j(l),m="_card_1tcxj_4",A="_horizontal_1tcxj_10",g="_cardLink_1tcxj_15",h="_cardContent_1tcxj_20",I="_cardActions_1tcxj_39",b="_cardActionArea_1tcxj_49",f="_cardImage_1tcxj_82",k="_cardLinkIcon_1tcxj_114",n={card:m,horizontal:A,cardLink:g,cardContent:h,cardActions:I,cardActionArea:b,cardImage:f,cardLinkIcon:k},i=s.createContext({horizontal:void 0,titleId:void 0}),z=({horizontal:c,className:e,children:t,...r})=>{const d=`card-title-${s.useId()}`;return a.jsx(i.Provider,{value:{horizontal:c,titleId:d},children:a.jsx("div",{...r,className:o.clsx(n.card,c&&n.horizontal,e),children:t})})},L=({children:c,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(n.cardContent,t&&n.horizontal),children:c})},p=({elementType:c="h2",children:e})=>{const{horizontal:t,titleId:r}=s.useContext(i);return a.jsx(x.Heading,{level:t?5:3,elementType:c,isExpressive:t,className:o.clsx(n.cardTitle,t&&n.horizontal),id:r,children:e})},v=({children:c,...e})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...e,className:o.clsx(n.cardActions,t&&n.horizontal),children:c})},N=({children:c,className:e,...t})=>{const{titleId:r}=s.useContext(i);return a.jsx(u.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...t,"aria-labelledby":r,className:o.clsx(n.cardActionArea,e),children:c})},q=({as:c="img",className:e,...t})=>a.jsx(c,{...t,className:o.clsx(n.cardImage,e)}),$=({children:c,as:e,...t})=>{const r=e||C.$4f118338184dc1d9$export$a6c7ac8248d6e38a;return a.jsxs(r,{...t,className:o.clsx(n.cardLink,t.className),children:[c,a.jsx(_.ArrowRight,{className:n.cardLinkIcon,size:24})]})};exports.Card=z;exports.CardActionArea=N;exports.CardActions=v;exports.CardContent=L;exports.CardImage=q;exports.CardLink=$;exports.CardTitle=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/CharacterCounter.css');const s=require("react/jsx-runtime"),u=require("react"),i=require("./utils-
|
|
1
|
+
"use strict";require('./assets/CharacterCounter.css');const s=require("react/jsx-runtime"),u=require("react"),i=require("./utils-CMHKYKlz.cjs"),f=require("./Input-CzMx2mfl.cjs");function d(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=d(u),h="_characterCounter_4nrnf_1",b={characterCounter:h},g=l.forwardRef((e,n)=>{[e]=i.$64fa3d84918910a7$export$29f1550f4b0d4415(e,n,f.$3985021b0ad6602f$export$37fb8590cf2c088c);const{maxLength:t,value:r,isLonely:o}=e,{length:c}=(r==null?void 0:r.toString())??"",a=t!==void 0;return s.jsx("span",{className:b.characterCounter,"data-exceeded":a&&c>t||void 0,"data-lonely":o||void 0,children:a?`${c} / ${t}`:c})});exports.CharacterCounter=g;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { $ as
|
|
4
|
-
import { $ as i } from "./Input-
|
|
5
|
-
import './assets/CharacterCounter.css';const m = "
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { $ as d } from "./utils-Cpcjg55U.js";
|
|
4
|
+
import { $ as i } from "./Input-BLVRv0FK.js";
|
|
5
|
+
import './assets/CharacterCounter.css';const m = "_characterCounter_4nrnf_1", $ = {
|
|
6
6
|
characterCounter: m
|
|
7
|
-
}, l =
|
|
8
|
-
[t] =
|
|
9
|
-
const { maxLength: r, value: e, isLonely:
|
|
7
|
+
}, l = f.forwardRef((t, n) => {
|
|
8
|
+
[t] = d(t, n, i);
|
|
9
|
+
const { maxLength: r, value: e, isLonely: c } = t, { length: a } = (e == null ? void 0 : e.toString()) ?? "", o = r !== void 0;
|
|
10
10
|
return /* @__PURE__ */ s(
|
|
11
11
|
"span",
|
|
12
12
|
{
|
|
13
13
|
className: $.characterCounter,
|
|
14
14
|
"data-exceeded": o && a > r || void 0,
|
|
15
|
-
"data-lonely":
|
|
15
|
+
"data-lonely": c || void 0,
|
|
16
16
|
children: o ? `${a} / ${r}` : a
|
|
17
17
|
}
|
|
18
18
|
);
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { jsxs as F, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import * as R from "react";
|
|
3
|
+
import H, { useEffect as S, useRef as W } from "react";
|
|
4
|
+
import { a as z } from "./RSPContexts-BW2SEIqe.js";
|
|
5
|
+
import { $ as J, c as K } from "./utils-Cpcjg55U.js";
|
|
6
|
+
import { $ as Q } from "./Form-CXcEMuBf.js";
|
|
7
|
+
import { c as V } from "./clsx-OuTLNxxd.js";
|
|
8
|
+
import { a as y } from "./mergeProps-BSsN7Bgk.js";
|
|
9
|
+
import { $ as T } from "./VisuallyHidden-CGEtjAP7.js";
|
|
10
|
+
import { a as X, $ as D, b as Y, d as _, e as Z } from "./useFormValidation-L0UHvOsP.js";
|
|
11
|
+
import { b as I } from "./usePress-DMUpU0GU.js";
|
|
12
|
+
import { $ as ee } from "./filterDOMProps-wsa9OcNI.js";
|
|
13
|
+
import { a as ae } from "./useFocusable-DXlMChFC.js";
|
|
14
|
+
import { $ as B } from "./useToggleState-BVOqL4hI.js";
|
|
15
|
+
import { $ as ie } from "./useHover-D6bNIkU0.js";
|
|
16
|
+
import { $ as de } from "./useFocusRing-DMo8ctYV.js";
|
|
17
|
+
import './assets/Checkbox.css';function ne(e, a, i) {
|
|
18
|
+
let { isDisabled: d = !1, isReadOnly: n = !1, value: o, name: s, form: t, children: l, "aria-label": v, "aria-labelledby": $, validationState: b = "valid", isInvalid: m, onPressStart: h, onPressEnd: P, onPressChange: f, onPress: u, onPressUp: r, onClick: g } = e, E = (x) => {
|
|
19
|
+
x.stopPropagation(), a.setSelected(x.target.checked);
|
|
20
|
+
}, p = l != null, w = v != null || $ != null;
|
|
21
|
+
!p && !w && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
22
|
+
let { pressProps: G, isPressed: N } = I({
|
|
23
|
+
onPressStart: h,
|
|
24
|
+
onPressEnd: P,
|
|
25
|
+
onPressChange: f,
|
|
26
|
+
onPress: u,
|
|
27
|
+
onPressUp: r,
|
|
28
|
+
onClick: g,
|
|
29
|
+
isDisabled: d
|
|
30
|
+
}), { pressProps: L, isPressed: U } = I({
|
|
31
|
+
onPressStart: h,
|
|
32
|
+
onPressEnd: P,
|
|
33
|
+
onPressChange: f,
|
|
34
|
+
onPressUp: r,
|
|
35
|
+
onClick: g,
|
|
36
|
+
onPress(x) {
|
|
37
|
+
var k;
|
|
38
|
+
u == null || u(x), a.toggle(), (k = i.current) === null || k === void 0 || k.focus();
|
|
39
|
+
},
|
|
40
|
+
isDisabled: d || n
|
|
41
|
+
}), { focusableProps: j } = ae(e, i), A = y(G, j), M = ee(e, {
|
|
42
|
+
labelable: !0
|
|
43
|
+
});
|
|
44
|
+
return X(i, a.defaultSelected, a.setSelected), {
|
|
45
|
+
labelProps: y(L, {
|
|
46
|
+
onClick: (x) => x.preventDefault()
|
|
47
|
+
}),
|
|
48
|
+
inputProps: y(M, {
|
|
49
|
+
"aria-invalid": m || b === "invalid" || void 0,
|
|
50
|
+
"aria-errormessage": e["aria-errormessage"],
|
|
51
|
+
"aria-controls": e["aria-controls"],
|
|
52
|
+
"aria-readonly": n || void 0,
|
|
53
|
+
onChange: E,
|
|
54
|
+
disabled: d,
|
|
55
|
+
...o == null ? {} : {
|
|
56
|
+
value: o
|
|
57
|
+
},
|
|
58
|
+
name: s,
|
|
59
|
+
form: t,
|
|
60
|
+
type: "checkbox",
|
|
61
|
+
...A
|
|
62
|
+
}),
|
|
63
|
+
isSelected: a.isSelected,
|
|
64
|
+
isPressed: N || U,
|
|
65
|
+
isDisabled: d,
|
|
66
|
+
isReadOnly: n,
|
|
67
|
+
isInvalid: m || b === "invalid"
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function O(e, a, i) {
|
|
71
|
+
let d = D({
|
|
72
|
+
...e,
|
|
73
|
+
value: a.isSelected
|
|
74
|
+
}), { isInvalid: n, validationErrors: o, validationDetails: s } = d.displayValidation, { labelProps: t, inputProps: l, isSelected: v, isPressed: $, isDisabled: b, isReadOnly: m } = ne({
|
|
75
|
+
...e,
|
|
76
|
+
isInvalid: n
|
|
77
|
+
}, a, i);
|
|
78
|
+
Y(e, d, i);
|
|
79
|
+
let { isIndeterminate: h, isRequired: P, validationBehavior: f = "aria" } = e;
|
|
80
|
+
S(() => {
|
|
81
|
+
i.current && (i.current.indeterminate = !!h);
|
|
82
|
+
});
|
|
83
|
+
let { pressProps: u } = I({
|
|
84
|
+
isDisabled: b || m,
|
|
85
|
+
onPress() {
|
|
86
|
+
let { [_]: r } = e, { commitValidation: g } = r || d;
|
|
87
|
+
g();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return {
|
|
91
|
+
labelProps: y(t, u),
|
|
92
|
+
inputProps: {
|
|
93
|
+
...l,
|
|
94
|
+
checked: v,
|
|
95
|
+
"aria-required": P && f === "aria" || void 0,
|
|
96
|
+
required: P && f === "native"
|
|
97
|
+
},
|
|
98
|
+
isSelected: v,
|
|
99
|
+
isPressed: $,
|
|
100
|
+
isDisabled: b,
|
|
101
|
+
isReadOnly: m,
|
|
102
|
+
isInvalid: n,
|
|
103
|
+
validationErrors: o,
|
|
104
|
+
validationDetails: s
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
const le = /* @__PURE__ */ new WeakMap();
|
|
108
|
+
function oe(e, a, i) {
|
|
109
|
+
const d = B({
|
|
110
|
+
isReadOnly: e.isReadOnly || a.isReadOnly,
|
|
111
|
+
isSelected: a.isSelected(e.value),
|
|
112
|
+
defaultSelected: a.defaultValue.includes(e.value),
|
|
113
|
+
onChange(r) {
|
|
114
|
+
r ? a.addValue(e.value) : a.removeValue(e.value), e.onChange && e.onChange(r);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
let { name: n, form: o, descriptionId: s, errorMessageId: t, validationBehavior: l } = le.get(a);
|
|
118
|
+
var v;
|
|
119
|
+
l = (v = e.validationBehavior) !== null && v !== void 0 ? v : l;
|
|
120
|
+
let { realtimeValidation: $ } = D({
|
|
121
|
+
...e,
|
|
122
|
+
value: d.isSelected,
|
|
123
|
+
// Server validation is handled at the group level.
|
|
124
|
+
name: void 0,
|
|
125
|
+
validationBehavior: "aria"
|
|
126
|
+
}), b = W(Z), m = () => {
|
|
127
|
+
a.setInvalid(e.value, $.isInvalid ? $ : b.current);
|
|
128
|
+
};
|
|
129
|
+
S(m);
|
|
130
|
+
let h = a.realtimeValidation.isInvalid ? a.realtimeValidation : $, P = l === "native" ? a.displayValidation : h;
|
|
131
|
+
var f;
|
|
132
|
+
let u = O({
|
|
133
|
+
...e,
|
|
134
|
+
isReadOnly: e.isReadOnly || a.isReadOnly,
|
|
135
|
+
isDisabled: e.isDisabled || a.isDisabled,
|
|
136
|
+
name: e.name || n,
|
|
137
|
+
form: e.form || o,
|
|
138
|
+
isRequired: (f = e.isRequired) !== null && f !== void 0 ? f : a.isRequired,
|
|
139
|
+
validationBehavior: l,
|
|
140
|
+
[_]: {
|
|
141
|
+
realtimeValidation: h,
|
|
142
|
+
displayValidation: P,
|
|
143
|
+
resetValidation: a.resetValidation,
|
|
144
|
+
commitValidation: a.commitValidation,
|
|
145
|
+
updateValidation(r) {
|
|
146
|
+
b.current = r, m();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}, d, i);
|
|
150
|
+
return {
|
|
151
|
+
...u,
|
|
152
|
+
inputProps: {
|
|
153
|
+
...u.inputProps,
|
|
154
|
+
"aria-describedby": [
|
|
155
|
+
e["aria-describedby"],
|
|
156
|
+
a.isInvalid ? t : null,
|
|
157
|
+
s
|
|
158
|
+
].filter(Boolean).join(" ") || void 0
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const se = H.createContext(null), te = "_checkboxInner_1a9gx_4", re = "_checkbox_1a9gx_4", ce = "_checkboxGroup_1a9gx_124", C = {
|
|
163
|
+
checkboxInner: te,
|
|
164
|
+
checkbox: re,
|
|
165
|
+
checkboxGroup: ce
|
|
166
|
+
}, q = R.forwardRef((e, a) => {
|
|
167
|
+
const { hoverProps: i, isHovered: d } = e.hoverResult, { pressProps: n, isPressed: o } = e.pressResult, { isFocused: s, isFocusVisible: t, focusProps: l } = e.focusRingAria;
|
|
168
|
+
return /* @__PURE__ */ F(
|
|
169
|
+
"label",
|
|
170
|
+
{
|
|
171
|
+
ref: a,
|
|
172
|
+
...y(i, n, e.labelProps),
|
|
173
|
+
slot: e.slot || void 0,
|
|
174
|
+
className: V(C.checkbox, e.className),
|
|
175
|
+
"data-hovered": d || void 0,
|
|
176
|
+
"data-selected": e.isSelected || void 0,
|
|
177
|
+
"data-indeterminate": e.isIndeterminate || void 0,
|
|
178
|
+
"data-pressed": o || void 0,
|
|
179
|
+
"data-disabled": e.isDisabled || void 0,
|
|
180
|
+
"data-readonly": e.isReadOnly || void 0,
|
|
181
|
+
"data-invalid": e.isInvalid || void 0,
|
|
182
|
+
"data-focused": s || void 0,
|
|
183
|
+
"data-focus-visible": t || void 0,
|
|
184
|
+
"data-required": e.isRequired || void 0,
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ c("div", { className: V(C.checkboxInner), children: /* @__PURE__ */ c(
|
|
187
|
+
"svg",
|
|
188
|
+
{
|
|
189
|
+
width: 16,
|
|
190
|
+
height: 16,
|
|
191
|
+
viewBox: "0 0 18 18",
|
|
192
|
+
"aria-hidden": "true",
|
|
193
|
+
children: e.isIndeterminate ? /* @__PURE__ */ c(
|
|
194
|
+
"rect",
|
|
195
|
+
{
|
|
196
|
+
x: 4,
|
|
197
|
+
y: 8,
|
|
198
|
+
width: 10,
|
|
199
|
+
height: 2
|
|
200
|
+
}
|
|
201
|
+
) : /* @__PURE__ */ c("polyline", { points: "3,9 7,13 15,4" })
|
|
202
|
+
}
|
|
203
|
+
) }),
|
|
204
|
+
/* @__PURE__ */ c(T, { children: /* @__PURE__ */ c(
|
|
205
|
+
"input",
|
|
206
|
+
{
|
|
207
|
+
...y(e.inputProps, l),
|
|
208
|
+
ref: e.inputRef
|
|
209
|
+
}
|
|
210
|
+
) }),
|
|
211
|
+
e.children
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}), fe = R.forwardRef((e, a) => {
|
|
216
|
+
const i = oe(
|
|
217
|
+
{
|
|
218
|
+
...e,
|
|
219
|
+
value: e.value || ""
|
|
220
|
+
},
|
|
221
|
+
e.state,
|
|
222
|
+
e.inputRef
|
|
223
|
+
);
|
|
224
|
+
return /* @__PURE__ */ c(
|
|
225
|
+
q,
|
|
226
|
+
{
|
|
227
|
+
...e,
|
|
228
|
+
...i,
|
|
229
|
+
ref: a
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
}), ue = R.forwardRef((e, a) => {
|
|
233
|
+
const i = O(e, B(e), e.inputRef);
|
|
234
|
+
return /* @__PURE__ */ c(
|
|
235
|
+
q,
|
|
236
|
+
{
|
|
237
|
+
...e,
|
|
238
|
+
...i,
|
|
239
|
+
ref: a
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}), De = R.forwardRef(
|
|
243
|
+
(e, a) => {
|
|
244
|
+
[e, a] = J(e, a, z);
|
|
245
|
+
const i = K(Q), d = e.validationBehavior ?? (i == null ? void 0 : i.validationBehavior) ?? "native", n = R.useContext(se), o = R.useRef(null), s = ie(e), t = I({
|
|
246
|
+
ref: a,
|
|
247
|
+
isDisabled: e.isDisabled
|
|
248
|
+
}), l = de();
|
|
249
|
+
return n ? /* @__PURE__ */ c(
|
|
250
|
+
fe,
|
|
251
|
+
{
|
|
252
|
+
...e,
|
|
253
|
+
state: n,
|
|
254
|
+
inputRef: o,
|
|
255
|
+
hoverResult: s,
|
|
256
|
+
pressResult: t,
|
|
257
|
+
focusRingAria: l,
|
|
258
|
+
validationBehavior: d
|
|
259
|
+
}
|
|
260
|
+
) : /* @__PURE__ */ c(
|
|
261
|
+
ue,
|
|
262
|
+
{
|
|
263
|
+
...e,
|
|
264
|
+
inputRef: o,
|
|
265
|
+
hoverResult: s,
|
|
266
|
+
pressResult: t,
|
|
267
|
+
focusRingAria: l,
|
|
268
|
+
validationBehavior: d
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
export {
|
|
274
|
+
le as $,
|
|
275
|
+
De as C,
|
|
276
|
+
se as a,
|
|
277
|
+
C as s
|
|
278
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Checkbox.css');const r=require("react/jsx-runtime"),k=require("react"),T=require("./RSPContexts-D8hmBfGm.cjs"),q=require("./utils-CMHKYKlz.cjs"),z=require("./Form-BuOomA4T.cjs"),D=require("./clsx-C11secjj.cjs"),R=require("./mergeProps-JhcJ7uJL.cjs"),W=require("./VisuallyHidden-EjrqodVh.cjs"),m=require("./useFormValidation-BQIRxgbU.cjs"),C=require("./usePress-CicXV7UO.cjs"),J=require("./filterDOMProps-RRlKPKX0.cjs"),K=require("./useFocusable-CsG-IPuC.cjs"),O=require("./useToggleState-SqDyNfRi.cjs"),Q=require("./useHover-DGAmG7jt.cjs"),X=require("./useFocusRing-BcbYske2.cjs");function Y(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,d.get?d:{enumerable:!0,get:()=>e[a]})}}return i.default=e,Object.freeze(i)}const y=Y(k);function Z(e,i,a){let{isDisabled:d=!1,isReadOnly:n=!1,value:s,name:o,form:l,children:t,"aria-label":b,"aria-labelledby":x,validationState:v="valid",isInvalid:$,onPressStart:h,onPressEnd:P,onPressChange:f,onPress:u,onPressUp:c,onClick:I}=e,E=g=>{g.stopPropagation(),i.setSelected(g.target.checked)},w=t!=null,G=b!=null||x!=null;!w&&!G&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:F,isPressed:N}=C.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:f,onPress:u,onPressUp:c,onClick:I,isDisabled:d}),{pressProps:M,isPressed:L}=C.$f6c31cce2adf654f$export$45712eceda6fad21({onPressStart:h,onPressEnd:P,onPressChange:f,onPressUp:c,onClick:I,onPress(g){var S;u==null||u(g),i.toggle(),(S=a.current)===null||S===void 0||S.focus()},isDisabled:d||n}),{focusableProps:U}=K.$f645667febf57a63$export$4c014de7c8940b4c(e,a),A=R.$3ef42575df84b30b$export$9d1611c77c2fe928(F,U),H=J.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});return m.$99facab73266f662$export$5add1d006293d136(a,i.defaultSelected,i.setSelected),{labelProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(M,{onClick:g=>g.preventDefault()}),inputProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(H,{"aria-invalid":$||v==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":n||void 0,onChange:E,disabled:d,...s==null?{}:{value:s},name:o,form:l,type:"checkbox",...A}),isSelected:i.isSelected,isPressed:N||L,isDisabled:d,isReadOnly:n,isInvalid:$||v==="invalid"}}function _(e,i,a){let d=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:i.isSelected}),{isInvalid:n,validationErrors:s,validationDetails:o}=d.displayValidation,{labelProps:l,inputProps:t,isSelected:b,isPressed:x,isDisabled:v,isReadOnly:$}=Z({...e,isInvalid:n},i,a);m.$e93e671b31057976$export$b8473d3665f3a75a(e,d,a);let{isIndeterminate:h,isRequired:P,validationBehavior:f="aria"}=e;k.useEffect(()=>{a.current&&(a.current.indeterminate=!!h)});let{pressProps:u}=C.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:v||$,onPress(){let{[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:c}=e,{commitValidation:I}=c||d;I()}});return{labelProps:R.$3ef42575df84b30b$export$9d1611c77c2fe928(l,u),inputProps:{...t,checked:b,"aria-required":P&&f==="aria"||void 0,required:P&&f==="native"},isSelected:b,isPressed:x,isDisabled:v,isReadOnly:$,isInvalid:n,validationErrors:s,validationDetails:o}}const j=new WeakMap;function ee(e,i,a){const d=O.$3017fa7ffdddec74$export$8042c6c013fd5226({isReadOnly:e.isReadOnly||i.isReadOnly,isSelected:i.isSelected(e.value),defaultSelected:i.defaultValue.includes(e.value),onChange(c){c?i.addValue(e.value):i.removeValue(e.value),e.onChange&&e.onChange(c)}});let{name:n,form:s,descriptionId:o,errorMessageId:l,validationBehavior:t}=j.get(i);var b;t=(b=e.validationBehavior)!==null&&b!==void 0?b:t;let{realtimeValidation:x}=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:d.isSelected,name:void 0,validationBehavior:"aria"}),v=k.useRef(m.$e5be200c675c3b3a$export$dad6ae84456c676a),$=()=>{i.setInvalid(e.value,x.isInvalid?x:v.current)};k.useEffect($);let h=i.realtimeValidation.isInvalid?i.realtimeValidation:x,P=t==="native"?i.displayValidation:h;var f;let u=_({...e,isReadOnly:e.isReadOnly||i.isReadOnly,isDisabled:e.isDisabled||i.isDisabled,name:e.name||n,form:e.form||s,isRequired:(f=e.isRequired)!==null&&f!==void 0?f:i.isRequired,validationBehavior:t,[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:{realtimeValidation:h,displayValidation:P,resetValidation:i.resetValidation,commitValidation:i.commitValidation,updateValidation(c){v.current=c,$()}}},d,a);return{...u,inputProps:{...u.inputProps,"aria-describedby":[e["aria-describedby"],i.isInvalid?l:null,o].filter(Boolean).join(" ")||void 0}}}const B=k.createContext(null),ie="_checkboxInner_1a9gx_4",ae="_checkbox_1a9gx_4",de="_checkboxGroup_1a9gx_124",V={checkboxInner:ie,checkbox:ae,checkboxGroup:de},p=y.forwardRef((e,i)=>{const{hoverProps:a,isHovered:d}=e.hoverResult,{pressProps:n,isPressed:s}=e.pressResult,{isFocused:o,isFocusVisible:l,focusProps:t}=e.focusRingAria;return r.jsxs("label",{ref:i,...R.$3ef42575df84b30b$export$9d1611c77c2fe928(a,n,e.labelProps),slot:e.slot||void 0,className:D.clsx(V.checkbox,e.className),"data-hovered":d||void 0,"data-selected":e.isSelected||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-pressed":s||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-invalid":e.isInvalid||void 0,"data-focused":o||void 0,"data-focus-visible":l||void 0,"data-required":e.isRequired||void 0,children:[r.jsx("div",{className:D.clsx(V.checkboxInner),children:r.jsx("svg",{width:16,height:16,viewBox:"0 0 18 18","aria-hidden":"true",children:e.isIndeterminate?r.jsx("rect",{x:4,y:8,width:10,height:2}):r.jsx("polyline",{points:"3,9 7,13 15,4"})})}),r.jsx(W.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:r.jsx("input",{...R.$3ef42575df84b30b$export$9d1611c77c2fe928(e.inputProps,t),ref:e.inputRef})}),e.children]})}),ne=y.forwardRef((e,i)=>{const a=ee({...e,value:e.value||""},e.state,e.inputRef);return r.jsx(p,{...e,...a,ref:i})}),te=y.forwardRef((e,i)=>{const a=_(e,O.$3017fa7ffdddec74$export$8042c6c013fd5226(e),e.inputRef);return r.jsx(p,{...e,...a,ref:i})}),se=y.forwardRef((e,i)=>{[e,i]=q.$64fa3d84918910a7$export$29f1550f4b0d4415(e,i,T.$4e85f108e88277b8$export$b085522c77523c51);const a=q.$64fa3d84918910a7$export$fabf2dc03a41866e(z.$d3e0e05bdfcf66bd$export$c24727297075ec6a),d=e.validationBehavior??(a==null?void 0:a.validationBehavior)??"native",n=y.useContext(B),s=y.useRef(null),o=Q.$6179b936705e76d3$export$ae780daf29e6d456(e),l=C.$f6c31cce2adf654f$export$45712eceda6fad21({ref:i,isDisabled:e.isDisabled}),t=X.$f7dceffc5ad7768b$export$4e328f61c538687f();return n?r.jsx(ne,{...e,state:n,inputRef:s,hoverResult:o,pressResult:l,focusRingAria:t,validationBehavior:d}):r.jsx(te,{...e,inputRef:s,hoverResult:o,pressResult:l,focusRingAria:t,validationBehavior:d})});exports.$1ae600c947479353$export$ec98120685d4f57d=j;exports.Checkbox=se;exports.CheckboxGroupContext=B;exports.styles=V;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),m=require("./Label-C00qz3kQ.cjs"),C=require("./Text-BAFsaON-.cjs"),$=require("react"),h=require("./Checkbox-CvdIG43J.cjs"),g=require("./FieldError-Cornph2A.cjs"),P=require("./useFormValidation-BQIRxgbU.cjs"),y=require("./useControlledState-D0L6S_5r.cjs"),j=require("./mergeProps-JhcJ7uJL.cjs"),q=require("./filterDOMProps-RRlKPKX0.cjs"),k=require("./useField-DyeD7MLj.cjs"),D=require("./useFocusWithin-DTnk0e8a.cjs"),F=require("./useLocalizedStringFormatter-BO2iZEL0.cjs");function O(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const v=O($);function R(e,t){let{isDisabled:a,name:n,form:u,validationBehavior:c="aria"}=e,{isInvalid:r,validationErrors:d,validationDetails:l}=t.displayValidation,{labelProps:f,fieldProps:x,descriptionProps:i,errorMessageProps:o}=k.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span",isInvalid:r,errorMessage:e.errorMessage||d});h.$1ae600c947479353$export$ec98120685d4f57d.set(t,{name:n,form:u,descriptionId:i.id,errorMessageId:o.id,validationBehavior:c});let b=q.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),{focusWithinProps:S}=D.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});return{groupProps:j.$3ef42575df84b30b$export$9d1611c77c2fe928(b,{role:"group","aria-disabled":a||void 0,...x,...S}),labelProps:f,descriptionProps:i,errorMessageProps:o,isInvalid:r,validationErrors:d,validationDetails:l}}function I(e={}){let[t,a]=y.$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue||[],e.onChange),[n]=$.useState(t),u=!!e.isRequired&&t.length===0,c=$.useRef(new Map),r=P.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:t}),d=r.displayValidation.isInvalid;var l,f;return{...r,value:t,defaultValue:(l=e.defaultValue)!==null&&l!==void 0?l:n,setValue(i){e.isReadOnly||e.isDisabled||a(i)},isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isSelected(i){return t.includes(i)},addValue(i){e.isReadOnly||e.isDisabled||t.includes(i)||(t=t.concat(i),a(t))},removeValue(i){e.isReadOnly||e.isDisabled||t.includes(i)&&a(t.filter(o=>o!==i))},toggleValue(i){e.isReadOnly||e.isDisabled||(t.includes(i)?a(t.filter(o=>o!==i)):a(t.concat(i)))},setInvalid(i,o){let b=new Map(c.current);o.isInvalid?b.set(i,o):b.delete(i),c.current=b,r.updateValidation(P.$e5be200c675c3b3a$export$75ee7c75d68f5b0e(...b.values()))},validationState:(f=e.validationState)!==null&&f!==void 0?f:d?"invalid":null,isInvalid:d,isRequired:u}}const M=(e,{value:t})=>{const a=v.Children.toArray(e).filter(l=>v.isValidElement(l)&&l.type===h.Checkbox),n=v.Children.count(a),u=v.Children.toArray(e).filter(l=>v.isValidElement(l)).filter(l=>!!l&&l.type===h.Checkbox).map(l=>l.props.value),c=t.length===0,r=t.length===n;return{allSelected:r,someSelected:!c&&!r,checkboxValues:u}},V=({state:e,errorMessage:t})=>s.jsx(g.$ee014567cb39d3f0$export$ff05c3ac10437e03.Provider,{value:e.displayValidation,children:s.jsx(g.FieldError,{children:t})}),E={selectAll:"Select all"},A={selectAll:"Välj alla"},W={en:E,sv:A};function _(e){const t=I(e),a=F.useLocalizedStringFormatter(W),{groupProps:n,labelProps:u,descriptionProps:c}=R(e,t),{allSelected:r,someSelected:d,checkboxValues:l}=M(e.children,t),f=x=>{t.setValue(x?l:[])};return s.jsxs("div",{...n,className:h.styles.checkboxGroup,children:[s.jsx(m.LabelWrapper,{popover:e.popover,children:e.label&&s.jsx(m.Label,{...u,children:e.label})}),e.description&&s.jsx(C.Text,{slot:"description",...c,children:e.description}),e.errorPosition==="top"&&s.jsx(V,{...e,state:t}),e.showSelectAll&&s.jsx(h.Checkbox,{isSelected:r,isIndeterminate:d,onChange:f,children:e.selectAllLabel||a.format("selectAll")}),s.jsx(h.CheckboxGroupContext.Provider,{value:t,children:e.children}),e.errorPosition==="bottom"&&s.jsx(V,{...e,state:t})]})}exports.CheckboxGroup=_;
|