@midas-ds/components 10.2.0 → 10.3.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-Z_c9MpAM.cjs → AccordionItem-BGWiWjxA.cjs} +1 -1
- package/{AccordionItem-DZT76sWu.js → AccordionItem-ChHpW8EW.js} +11 -11
- package/{BadgeContainer-D3RtqcPF.js → BadgeContainer-DM8TdyMT.js} +4 -4
- package/{BadgeContainer-DeUgqGqb.cjs → BadgeContainer-I1XA3OCl.cjs} +1 -1
- package/{Breadcrumbs-CmZXtTiS.js → Breadcrumbs-CwDUNIqF.js} +34 -34
- package/{Breadcrumbs-Cx09jwZZ.cjs → Breadcrumbs-DtjJ1UmU.cjs} +1 -1
- package/{Button-iSiWjocA.cjs → Button-BoJl6JGM.cjs} +1 -1
- package/{Button-CbFRzRrF.js → Button-Csih3v23.js} +2 -2
- package/Button-DjBChs7s.js +340 -0
- package/Button-htW9qIsS.cjs +1 -0
- package/Button.module-DEQtBYe5.cjs +1 -0
- package/Button.module-tti8HGxs.js +14 -0
- package/CHANGELOG.md +20 -0
- package/Card-0G0mj9q5.cjs +1 -0
- package/{Card-CaKKKv9k.js → Card-yrtGzt70.js} +5 -5
- package/CharacterCounter-BL_nZHya.js +22 -0
- package/{CharacterCounter-CrY8QRuY.cjs → CharacterCounter-CHcTDHO-.cjs} +1 -1
- package/Checkbox-5HINZdGu.js +263 -0
- package/Checkbox-DqcPg5hz.cjs +1 -0
- package/CheckboxGroup-BBrSMuDY.cjs +1 -0
- package/CheckboxGroup-CLgixk2p.js +243 -0
- package/{Collection-Csx3L9gh.cjs → Collection-BIDsXNhi.cjs} +1 -1
- package/{Collection-C5ONNBqd.js → Collection-Brgjpkne.js} +4 -4
- package/{ColorSchemeSwitch-CbAWIJCg.js → ColorSchemeSwitch-BpzQ7g0b.js} +9 -9
- package/{ColorSchemeSwitch-JRrCyYVv.cjs → ColorSchemeSwitch-C-qWuqkU.cjs} +2 -2
- package/{ComboBox-BCaqPEIH.js → ComboBox-CVDyp2a-.js} +331 -327
- package/ComboBox-CWJUg9Xx.cjs +1 -0
- package/DateField-DeDhiYnW.cjs +1 -0
- package/DateField-DhU3q-rG.js +47 -0
- package/DateInputDivider-ADvOavHw.cjs +1 -0
- package/{DateInputDivider-Dx8n1Lxp.js → DateInputDivider-CF4xWsMT.js} +71 -75
- package/DateRangePicker-BsAHhy99.cjs +6 -0
- package/{DateRangePicker-BmBvwqo6.js → DateRangePicker-ziD1_k1W.js} +194 -194
- package/Dialog-B8GTYbvu.cjs +1 -0
- package/{Dialog-CwTEAujZ.cjs → Dialog-BOrYdX50.cjs} +1 -1
- package/{Dialog-Bxx8cBEq.js → Dialog-CXNu48AC.js} +25 -25
- package/{Dialog-CYxThuMl.js → Dialog-D14MbJ7o.js} +564 -540
- package/{DragAndDrop-HvycSrKY.cjs → DragAndDrop-DNth776R.cjs} +1 -1
- package/{DragAndDrop-CSwmPhxC.js → DragAndDrop-o3ruz_SR.js} +8 -8
- package/{Dropdown-CaGon9OR.cjs → Dropdown-CJ6My6EI.cjs} +1 -1
- package/{Dropdown-nkjzsVYX.js → Dropdown-Df58j43I.js} +2 -2
- package/FieldError-CAcjosk_.js +46 -0
- package/FieldError-CKBb2-mp.cjs +1 -0
- package/{FileUpload-DYRZ0M9F.cjs → FileUpload-CxCOtyB9.cjs} +2 -2
- package/{FileUpload-ULwcYDxs.js → FileUpload-D6qoEAjn.js} +149 -148
- package/FocusScope-5c9SVBcR.cjs +1 -0
- package/{FocusScope-DwIqdYpQ.js → FocusScope-CxkURfoc.js} +16 -16
- package/{Group-CeSsSQVC.js → Group-B6EslsHZ.js} +5 -5
- package/{Heading-BY5-QN4S.js → Heading-BFtiin0g.js} +7 -7
- package/{Heading-DoJAtYZf.cjs → Heading-mHhCbGjY.cjs} +1 -1
- package/{Hidden-B5ir3Lei.js → Hidden-C9KWUR7b.js} +2 -2
- package/{InfoBanner-CVIBFSWx.js → InfoBanner-BLM-TJJ6.js} +15 -14
- package/InfoBanner-C2kTIsrB.cjs +1 -0
- package/{Input-D8Ku_FQz.js → Input-BTzwcf72.js} +10 -10
- package/Label-7Ybb99CE.cjs +1 -0
- package/Label-BwJrdqEE.js +70 -0
- package/{Layout-BWeHHnqU.cjs → Layout-1g6bMH62.cjs} +2 -2
- package/{Layout-CCt_2L1k.js → Layout-Ey8flY7E.js} +9 -9
- package/{Link-DsnCtNeI.cjs → Link-B88l_oaE.cjs} +1 -1
- package/{Link-SHMbeyIP.cjs → Link-BQhauBuw.cjs} +1 -1
- package/{Link-uFowN4qv.js → Link-DX5BbBnn.js} +1 -1
- package/{Link-B-nus-FT.js → Link-yNO2-sqx.js} +17 -17
- package/LinkButton-CBpGLETx.cjs +6 -0
- package/LinkButton-o6uS1XsR.js +69 -0
- package/ListBox-DP9M4H6R.cjs +1 -0
- package/{ListBox-DOi_y_Lt.js → ListBox-GnVK_Pdq.js} +72 -73
- package/{ListBoxButton-CFeNhJhr.cjs → ListBoxButton-DPBrtXyv.cjs} +1 -1
- package/{ListBoxButton-O6zN3P4W.js → ListBoxButton-D_J3jlP0.js} +1 -1
- package/{ListBoxSection-DGCP6xpf.cjs → ListBoxSection-BGaigBnG.cjs} +1 -1
- package/{ListBoxSection-C1aLKL9p.js → ListBoxSection-C0BGnpB4.js} +9 -9
- package/{ListKeyboardDelegate-DNOzQ8nc.js → ListKeyboardDelegate-DNI8GQtX.js} +24 -15
- package/ListKeyboardDelegate-DTg9h4v6.cjs +1 -0
- package/{OverlayArrow-DorA4Rbr.js → OverlayArrow-CDLXPTew.js} +44 -44
- package/Popover-BGGXeD54.js +38 -0
- package/Popover-CqNWzPf-.cjs +1 -0
- package/{ProgressBar-gmAzSsrz.js → ProgressBar-DMSg-Prr.js} +2 -2
- package/ProgressBar-Jbg28j2a.cjs +1 -0
- package/Radio-BwqrdhQE.cjs +1 -0
- package/{Radio-_ukSkxPT.js → Radio-Cz29wPXd.js} +71 -71
- package/RangeCalendar-BehUaydF.cjs +11 -0
- package/{RangeCalendar-uXwoBL-O.js → RangeCalendar-RAlAHlNL.js} +25 -27
- package/{SearchField-6yBGiojX.cjs → SearchField-CxMwDeUM.cjs} +2 -2
- package/{SearchField-DYl2uo7o.js → SearchField-IlvZ3Kh6.js} +11 -11
- package/Select-2q1iSzAX.cjs +1 -0
- package/{Select-PvCqY7Lp.js → Select-BVQZtoi9.js} +232 -232
- package/{SelectionManager-6H88Cv6B.js → SelectionManager-B4ORduja.js} +26 -27
- package/SelectionManager-CwYux2h3.cjs +1 -0
- package/{Separator-LYnFqh4L.js → Separator-Cu9fYKUM.js} +19 -20
- package/Separator-DECIYLtZ.cjs +1 -0
- package/{Spinner-DAJtfxqJ.cjs → Spinner-P35rvvsl.cjs} +1 -1
- package/Table-B40CGLT-.cjs +16 -0
- package/{Table-B_N7wUmA.js → Table-F4oYBtUM.js} +69 -73
- package/{Tabs-Ct6D83aR.js → Tabs-B4oZJkZG.js} +39 -39
- package/{Tabs-Dtcl2oK2.cjs → Tabs-DA2qXhzb.cjs} +1 -1
- package/Tag-DPAGmcMK.cjs +1 -0
- package/{Tag-g6HN-YCv.js → Tag-Du7GvSv2.js} +151 -154
- package/Text-BoXuUVVH.js +15 -0
- package/{Text-BN-g1iWi.js → Text-jWWg0B20.js} +1 -1
- package/TextArea-C7JZ_pQd.cjs +1 -0
- package/TextArea-XeBCSyzl.js +191 -0
- package/TextField-BgNdhZi_.cjs +1 -0
- package/{TextField-DBaRuNj7.js → TextField-C-hTPukq.js} +16 -16
- package/Toast-AbDA1BOs.cjs +1 -0
- package/{Toast-CjpldAI8.js → Toast-Btg21Xge.js} +32 -31
- package/{ToggleButtonGroup-Ceh9_yBM.js → ToggleButtonGroup-B5yz1tm2.js} +7 -7
- package/{ToggleButtonGroup-BuU_6dYe.cjs → ToggleButtonGroup-BFDoj0P6.cjs} +1 -1
- package/{Tooltip-BAIjaYax.js → Tooltip-CMLs7WMw.js} +33 -33
- package/{Tooltip-CiWg4zIC.cjs → Tooltip-DeBuBKhS.cjs} +1 -1
- package/{VisuallyHidden-CtXvK_Tw.cjs → VisuallyHidden-CLWHbz2n.cjs} +1 -1
- package/{VisuallyHidden-D-4z1VgU.js → VisuallyHidden-ZCYf65q4.js} +8 -8
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/{arrow-right-Cw48o2oW.cjs → arrow-right-QJ2gXPKQ.cjs} +1 -1
- package/assets/Button.css +1 -1
- package/assets/Label.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/Popover.css +1 -0
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +1 -1
- 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/{check-Dw9c62O4.cjs → check-D_KoootC.cjs} +1 -1
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/CheckboxGroup.d.ts +8 -8
- package/checkbox/CheckboxGroupFieldError.d.ts +8 -0
- package/checkbox/CheckboxGroupItem.d.ts +3 -0
- package/checkbox/CheckboxInner.d.ts +2 -0
- package/checkbox/SingleCheckbox.d.ts +3 -0
- package/checkbox/context.d.ts +3 -0
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.d.ts +2 -1
- package/checkbox/index.js +2 -2
- package/checkbox/intl/translations.json.d.ts +35 -0
- package/checkbox/types.d.ts +14 -0
- package/checkbox/useSelectAll.d.ts +7 -0
- package/{chevron-down-C2E7aZ3N.cjs → chevron-down-jl83cllc.cjs} +1 -1
- package/{info-DkzVqB8I.js → circle-check-B9HYcH7Z.js} +4 -16
- package/{info-DlzSeKbc.cjs → circle-check-BGo8gML8.cjs} +2 -7
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/ComboBox.d.ts +3 -1
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -1
- package/{context-B8cn10po.js → context-C81gPYvC.js} +11 -11
- package/{createLucideIcon-DAY4oS-S.cjs → createLucideIcon-Cg_wkoIA.cjs} +1 -1
- package/date-field/DateField.d.ts +3 -0
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/DatePicker.d.ts +3 -0
- package/date-picker/DateRangePicker.d.ts +3 -0
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/dropdown/index.cjs +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.cjs +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/FileUpload.d.ts +3 -0
- package/file-upload/index.cjs +1 -1
- package/file-upload/index.js +1 -1
- package/{getScrollParent-Ru2U2LlM.js → getScrollParent-BhFcYrwL.js} +1 -1
- package/{getScrollParent-DuKmPmUa.cjs → getScrollParent-DDJu9WHU.cjs} +1 -1
- package/heading/index.cjs +1 -1
- package/heading/index.js +1 -1
- package/{index-BSMrH_Du.js → index-CGRFP4CC.js} +7 -7
- package/{index-D97L3EBk.cjs → index-Dsz3aiWt.cjs} +2 -2
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +80 -78
- package/inertValue-B3AFhVG4.cjs +1 -0
- package/info-BZwphdye.js +15 -0
- package/info-CIEIENo6.cjs +6 -0
- package/info-banner/index.cjs +1 -1
- package/info-banner/index.js +1 -1
- package/label/InfoPopover.d.ts +9 -0
- package/label/LabelWrapper.d.ts +11 -0
- package/label/index.cjs +1 -1
- package/label/index.d.ts +1 -0
- 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/index.cjs +1 -1
- package/list-box/index.js +2 -2
- package/modal/index.cjs +1 -1
- package/modal/index.js +2 -2
- package/package.json +1 -1
- package/popover/Popover.d.ts +7 -0
- package/popover/index.cjs +1 -0
- package/popover/index.d.ts +1 -0
- package/popover/index.js +4 -0
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/Radio.d.ts +3 -0
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/scrollIntoView-C8doLzDd.cjs +1 -0
- package/scrollIntoView-Hwb_aaNf.js +87 -0
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/spinner/index.cjs +1 -1
- package/{square-arrow-out-up-right-BCAO2eJs.cjs → square-arrow-out-up-right-V4Gd08uI.cjs} +1 -1
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text/index.js +1 -1
- package/textfield/TextFieldBase.d.ts +2 -0
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -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/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/{triangle-alert-C0lvfCYH.cjs → triangle-alert-DJW8U7jL.cjs} +1 -1
- package/{useButton-C-Lq7CNY.js → useButton-B8dB9sot.js} +6 -6
- package/{useButton-B1Fa-6qE.cjs → useButton-cpNi-fY4.cjs} +1 -1
- package/{useDateFormatter-g2maMTGH.cjs → useDateFormatter-CnxoJ4jF.cjs} +1 -1
- package/{useDateFormatter-C53Uxdli.js → useDateFormatter-EHm4auIg.js} +2 -2
- package/{useEvent-CjkbBniY.cjs → useEvent-DxBxMX2V.cjs} +1 -1
- package/{useEvent-Cyd2ZL0c.js → useEvent-IsD2Awnh.js} +1 -1
- package/useField-CXKYU74k.cjs +1 -0
- package/{useField-BPMAlIbU.js → useField-DvpGZkw_.js} +7 -7
- package/useFilter-BTgDWHVx.cjs +1 -0
- package/{useFilter-ChIbnALW.js → useFilter-CUq74PQ2.js} +1 -1
- package/{useFocusRing-BDGH3lpn.js → useFocusRing-XnR3cZjO.js} +1 -1
- package/useFocusable-C8uh8K4g.js +125 -0
- package/useFocusable-NUVSFcRC.cjs +1 -0
- package/{useFormValidation-R8hQIjWP.js → useFormValidation-BIGzfO9h.js} +5 -5
- package/{useHasTabbableChild-DsD9AJwE.js → useHasTabbableChild-C-1mZUQe.js} +2 -2
- package/useHasTabbableChild-DCBTulUQ.cjs +1 -0
- package/{useHighlightSelectionDescription-DFfcgbUj.js → useHighlightSelectionDescription-CnBDT86u.js} +14 -14
- package/useHighlightSelectionDescription-CzYucm61.cjs +1 -0
- package/{useHover-qRAon4nS.js → useHover-DjIHtjGN.js} +17 -17
- package/{useLabels-BZjoZA1Z.js → useLabels-BDwkBYbE.js} +1 -1
- package/{useListState-Ca2-uZMO.cjs → useListState-Bx8u4IFG.cjs} +1 -1
- package/{useListState-DFQ9d-uE.js → useListState-CrZFZffI.js} +7 -7
- package/useLocalizedStringFormatter-BKoxGZf1.js +96 -0
- package/useLocalizedStringFormatter-BsxLt89S.cjs +1 -0
- package/useLocalizedStringFormatter-D3JQyjb4.js +21 -0
- package/useLocalizedStringFormatter-ioacM-Yt.cjs +1 -0
- package/useObserveElement-MhzEsCkX.cjs +1 -0
- package/usePress-0AjDbW9R.cjs +7 -0
- package/{usePress-CUJ3pMOw.js → usePress-CNjmDzap.js} +48 -48
- package/{useSingleSelectListState-C-nB8cug.js → useSingleSelectListState-0AGHxvy3.js} +1 -1
- package/{useSingleSelectListState-MGNxUTum.cjs → useSingleSelectListState-Cl3KV5E1.cjs} +1 -1
- package/{useTextField-CtUDWsUl.cjs → useTextField--czJtyNd.cjs} +1 -1
- package/{useTextField-5OZQPyOW.js → useTextField-Cw-33OP_.js} +11 -11
- package/{useUpdateEffect-sk3kiVGz.cjs → useUpdateEffect-C5YQs_1w.cjs} +1 -1
- package/{utils-HNTsIwux.js → utils-DIMfEPAt.js} +10 -10
- package/{x-CvxiAZTW.cjs → x-H8Zrx8-x.cjs} +1 -1
- package/Button-DnhqHU01.cjs +0 -1
- package/Button-ZOQy9Ivu.js +0 -78
- package/Button.module-CMMhIrkn.js +0 -14
- package/Button.module-DO5s9hOk.cjs +0 -1
- package/Card-C0BFW3wJ.cjs +0 -1
- package/CharacterCounter-CPGdboVJ.js +0 -22
- package/Checkbox-CvFsn_FL.js +0 -380
- package/Checkbox-DSxGAJX2.cjs +0 -1
- package/CheckboxGroup-Bk9DPq4I.cjs +0 -1
- package/CheckboxGroup-Dij9zKlF.js +0 -54
- package/ComboBox-gveQKHU3.cjs +0 -1
- package/DateField-CAQlzuDD.js +0 -46
- package/DateField-deVVFwKA.cjs +0 -1
- package/DateInputDivider-DnUxETEC.cjs +0 -1
- package/DateRangePicker-BzfitoK0.cjs +0 -6
- package/Dialog-Bd5hK360.cjs +0 -1
- package/FieldError-BZw8UzBk.cjs +0 -1
- package/FieldError-CZikNDxX.js +0 -28
- package/FieldError-DqdfJ3fs.cjs +0 -1
- package/FieldError-Dv3bBEjh.js +0 -23
- package/FocusScope-NaPbvuuS.cjs +0 -1
- package/InfoBanner-BS-dAfzO.cjs +0 -1
- package/Label-C9ivwkAd.js +0 -21
- package/Label-CUV21CAv.cjs +0 -1
- package/Label-DkDOsmUF.js +0 -16
- package/Label-IMWAyoKb.cjs +0 -1
- package/LinkButton-CuBilDML.js +0 -69
- package/LinkButton-CymMrcGL.cjs +0 -6
- package/ListBox-CDOsQChA.cjs +0 -1
- package/ListKeyboardDelegate-BqMETvPv.cjs +0 -1
- package/LiveAnnouncer-B6177m92.js +0 -51
- package/LiveAnnouncer-CwEWPU8b.cjs +0 -1
- package/LocalizedStringFormatter-C0C54hjf.cjs +0 -1
- package/LocalizedStringFormatter-D-4Qyql0.js +0 -77
- package/NumberFormatter-DewVDY5w.cjs +0 -1
- package/NumberFormatter-DgOUVrge.js +0 -119
- package/PressResponder-C06O3Z5P.cjs +0 -1
- package/PressResponder-CVEg5kND.js +0 -33
- package/ProgressBar-Bkw9zavs.cjs +0 -1
- package/ProgressBar-CEX2WNoW.js +0 -77
- package/ProgressBar-Dqh3ftSP.cjs +0 -1
- package/Radio-CDKrvQe4.cjs +0 -1
- package/RangeCalendar-cbCKBPZv.cjs +0 -11
- package/Select-CpHjd1tp.cjs +0 -1
- package/SelectionManager-C5NGBzvz.cjs +0 -1
- package/Separator-nPra6kD-.cjs +0 -1
- package/Table-D9vNc_y-.cjs +0 -16
- package/Tag-CVFkzg3s.cjs +0 -1
- package/Text-B_H68Tvq.js +0 -15
- package/TextArea-DSiQ578a.js +0 -206
- package/TextArea-cVyGBRbL.cjs +0 -1
- package/TextField-B70CL2qz.cjs +0 -1
- package/Toast-DrkOGy4d.cjs +0 -1
- package/focusSafely-Bqfo_DH7.cjs +0 -1
- package/focusSafely-C48ucRUz.js +0 -56
- package/inertValue-BWmZ1afe.cjs +0 -1
- package/scrollIntoView-ClEACHUk.js +0 -57
- package/scrollIntoView-DRSoJp89.cjs +0 -1
- package/useCollator-C_ozeWLo.cjs +0 -1
- package/useCollator-CgZcHC8N.js +0 -11
- package/useDescription-CVKhFa3c.js +0 -32
- package/useDescription-DmQYSEES.cjs +0 -1
- package/useField-B1RU0GKs.cjs +0 -1
- package/useFilter-CtIwF2qW.cjs +0 -1
- package/useFocusable-CaedRTpB.js +0 -74
- package/useFocusable-CuPQ7Cm5.cjs +0 -1
- package/useHasTabbableChild-DgphNvnk.cjs +0 -1
- package/useHighlightSelectionDescription-BizKjvPU.cjs +0 -1
- package/useLabel-DDdAJ1JO.js +0 -23
- package/useLabel-m_S5xkHy.cjs +0 -1
- package/useLocalizedStringFormatter-D07YB2e1.js +0 -22
- package/useLocalizedStringFormatter-u9SJaOwk.cjs +0 -1
- package/useObserveElement-BzEr5D32.cjs +0 -1
- package/usePress-BFa6cT9o.cjs +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("./utils-BNtZbAib.cjs"),D=require("./Hidden-BxRZGdEW.cjs"),f=require("react"),F=require("./number-E0x3H9cL.cjs"),C=require("./filterDOMProps-BS2lrgFA.cjs"),M=require("./useLabels-BLOfc6Y-.cjs"),q=require("./context-DjwhtgxQ.cjs"),j=require("./useButton-cpNi-fY4.cjs"),B=require("./useFocusRing-CbImDrwF.cjs"),H=require("./useHover-_mv5J4_q.cjs");let g=new Map,P=!1;try{P=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let v=!1;try{v=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const R={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class A{format(e){let t="";if(!P&&this.options.signDisplay!=null?t=_(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!v){var i;let{unit:r,unitDisplay:n="short",locale:l}=this.resolvedOptions();if(!r)return t;let o=(i=R[r])===null||i===void 0?void 0:i[n];t+=o[l]||o.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let i=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...i.map(n=>({...n,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(n=>({...n,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!P&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!v&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=S(e,t),this.options=t}}function S(a,e={}){let{numberingSystem:t}=e;if(t&&a.includes("-nu-")&&(a.includes("-u-")||(a+="-u-"),a+=`-nu-${t}`),e.style==="unit"&&!v){var i;let{unit:l,unitDisplay:o="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=R[l])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${o}`);e={...e,style:"decimal"}}let r=a+(e?Object.entries(e).sort((l,o)=>l[0]<o[0]?-1:1).join():"");if(g.has(r))return g.get(r);let n=new Intl.NumberFormat(a,e);return g.set(r,n),n}function _(a,e,t){if(e==="auto")return a.format(t);if(e==="never")return a.format(Math.abs(t));{let i=!1;if(e==="always"?i=t>0||Object.is(t,0):e==="exceptZero"&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):i=t>0),i){let r=a.format(-t),n=a.format(t),l=r.replace(n,"").replace(/\u200e|\u061C/,"");return[...l].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(n,"!!!").replace(l,"+").replace("!!!",n)}else return a.format(t)}}function K(a={}){let{locale:e}=q.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();return f.useMemo(()=>new A(e,a),[e,a])}const O=7e3;let s=null;function E(a,e="assertive",t=O){s?s.announce(a,e,t):(s=new Z,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?s.announce(a,e,t):setTimeout(()=>{s!=null&&s.isAttached()&&(s==null||s.announce(a,e,t))},100))}function U(a){s&&s.clear(a)}class Z{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",i=O){var r,n;if(!this.node)return;let l=document.createElement("div");typeof e=="object"?(l.setAttribute("role","img"),l.setAttribute("aria-labelledby",e["aria-labelledby"])):l.textContent=e,t==="assertive"?(r=this.assertiveLog)===null||r===void 0||r.appendChild(l):(n=this.politeLog)===null||n===void 0||n.appendChild(l),e!==""&&setTimeout(()=>{l.remove()},i)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function I(a){let{id:e,label:t,"aria-labelledby":i,"aria-label":r,labelElementType:n="label"}=a;e=d.$bdb11010cef70236$export$f680877a34711e37(e);let l=d.$bdb11010cef70236$export$f680877a34711e37(),o={};t?(i=i?`${l} ${i}`:l,o={id:l,htmlFor:n==="label"?e:void 0}):!i&&!r&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=M.$313b98861ee5dd6c$export$d6875122194c7b44({id:e,"aria-label":r,"aria-labelledby":i});return{labelProps:o,fieldProps:c}}function k(a){let{value:e=0,minValue:t=0,maxValue:i=100,valueLabel:r,isIndeterminate:n,formatOptions:l={style:"percent"}}=a,o=C.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),{labelProps:c,fieldProps:u}=I({...a,labelElementType:"span"});e=F.$9446cca9a3875146$export$7d15b64cf5a3a4c4(e,t,i);let m=(e-t)/(i-t),p=K(l);if(!n&&!r){let b=l.style==="percent"?m:e;r=p.format(b)}return{progressBarProps:d.$3ef42575df84b30b$export$9d1611c77c2fe928(o,{...u,"aria-valuenow":n?void 0:e,"aria-valuemin":t,"aria-valuemax":i,"aria-valuetext":n?void 0:r,role:"progressbar"}),labelProps:c}}const L=f.createContext({}),z=D.$f39a9eba43920ace$export$86427a43e3e48ebb(function(e,t){[e,t]=d.$64fa3d84918910a7$export$29f1550f4b0d4415(e,t,L);let{elementType:i="label",...r}=e;return f.createElement(i,{className:"react-aria-Label",...r,ref:t})}),V=f.createContext(null),G=f.forwardRef(function(e,t){[e,t]=d.$64fa3d84918910a7$export$29f1550f4b0d4415(e,t,V);let{value:i=0,minValue:r=0,maxValue:n=100,isIndeterminate:l=!1}=e;i=F.$9446cca9a3875146$export$7d15b64cf5a3a4c4(i,r,n);let[o,c]=d.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!e["aria-label"]&&!e["aria-labelledby"]),{progressBarProps:u,labelProps:m}=k({...e,label:c}),p=l?void 0:(i-r)/(n-r)*100,b=d.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:p,valueText:u["aria-valuetext"],isIndeterminate:l}});return f.createElement("div",{...u,...b,ref:t,slot:e.slot||void 0},f.createElement(L.Provider,{value:{...m,ref:o,elementType:"span"}},b.children))}),J=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),N=f.createContext({}),W=D.$f39a9eba43920ace$export$86427a43e3e48ebb(function(e,t){[e,t]=d.$64fa3d84918910a7$export$29f1550f4b0d4415(e,t,N),e=Y(e);let i=e,{isPending:r}=i,{buttonProps:n,isPressed:l}=j.$701a24aa0da5b062$export$ea18c227d4417cc3(e,t),{focusProps:o,isFocused:c,isFocusVisible:u}=B.$f7dceffc5ad7768b$export$4e328f61c538687f(e),{hoverProps:m,isHovered:p}=H.$6179b936705e76d3$export$ae780daf29e6d456({...e,isDisabled:e.isDisabled||r}),b={isHovered:p,isPressed:(i.isPressed||l)&&!r,isFocused:c,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:r??!1},w=d.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,values:b,defaultClassName:"react-aria-Button"}),h=d.$bdb11010cef70236$export$f680877a34711e37(n.id),y=d.$bdb11010cef70236$export$f680877a34711e37(),$=n["aria-labelledby"];r&&($?$=`${$} ${y}`:n["aria-label"]&&($=`${h} ${y}`));let x=f.useRef(r);return f.useEffect(()=>{let T={"aria-labelledby":$||h};(!x.current&&c&&r||x.current&&c&&!r)&&E(T,"assertive"),x.current=r},[r,c,$,h]),f.createElement("button",{...C.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{propNames:J}),...d.$3ef42575df84b30b$export$9d1611c77c2fe928(n,o,m),...w,type:n.type==="submit"&&r?"button":n.type,id:h,ref:t,"aria-labelledby":$,slot:e.slot||void 0,"aria-disabled":r?"true":n["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":b.isPressed||void 0,"data-hovered":p||void 0,"data-focused":c||void 0,"data-pending":r||void 0,"data-focus-visible":u||void 0},f.createElement(V.Provider,{value:{id:y}},w.children))});function Y(a){return a.isPending&&(a.onPress=void 0,a.onPressStart=void 0,a.onPressEnd=void 0,a.onPressChange=void 0,a.onPressUp=void 0,a.onKeyDown=void 0,a.onKeyUp=void 0,a.onClick=void 0,a.href=void 0),a}exports.$01b77f81d0f07f68$export$75b6ee27786ba447=L;exports.$01b77f81d0f07f68$export$b04be29aa201d4f5=z;exports.$0393f8ab869a0f1a$export$c17561cb55d4db30=G;exports.$319e236875307eab$export$a9b970dcc4ae71a9=E;exports.$319e236875307eab$export$d10ae4f68404609a=U;exports.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5=A;exports.$d191a55c9702f145$export$8467354a121f1b9f=I;exports.$d2b4bc8c273e7be6$export$24d547caef80ccd1=N;exports.$d2b4bc8c273e7be6$export$353f5b6fc5456de1=W;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Button.css');const t="_button_cz5bk_4",n="_secondary_cz5bk_51",c="_tertiary_cz5bk_74",_="_iconBtn_cz5bk_94",o="_medium_cz5bk_114",i="_danger_cz5bk_119",r="_iconRight_cz5bk_141",s="_fullwidth_cz5bk_145",e="_primary_cz5bk_155",a={button:t,secondary:n,tertiary:c,iconBtn:_,medium:o,danger:i,iconRight:r,fullwidth:s,primary:e};exports.ButtonStyles=a;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './assets/Button.css';const t = "_button_cz5bk_4", n = "_secondary_cz5bk_51", c = "_tertiary_cz5bk_74", _ = "_iconBtn_cz5bk_94", o = "_medium_cz5bk_114", i = "_danger_cz5bk_119", r = "_iconRight_cz5bk_141", s = "_fullwidth_cz5bk_145", e = "_primary_cz5bk_155", a = {
|
|
2
|
+
button: t,
|
|
3
|
+
secondary: n,
|
|
4
|
+
tertiary: c,
|
|
5
|
+
iconBtn: _,
|
|
6
|
+
medium: o,
|
|
7
|
+
danger: i,
|
|
8
|
+
iconRight: r,
|
|
9
|
+
fullwidth: s,
|
|
10
|
+
primary: e
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
a as B
|
|
14
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 10.3.0 (2025-06-25)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **popover:** new component popover ([#672](https://github.com/migrationsverket/midas/pull/672))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **combobox:** select the previous value on click ([b2440e9d2b](https://github.com/migrationsverket/midas/commit/b2440e9d2b))
|
|
10
|
+
|
|
11
|
+
### 💅 Refactors
|
|
12
|
+
|
|
13
|
+
- ♻️ checkbox ([#640](https://github.com/migrationsverket/midas/pull/640))
|
|
14
|
+
|
|
15
|
+
### 🧪 Tests updated
|
|
16
|
+
|
|
17
|
+
- **grid:** remove a11y test bypass ([ca09acfd1c](https://github.com/migrationsverket/midas/commit/ca09acfd1c))
|
|
18
|
+
- opt-in for chromatic on PRs ([#675](https://github.com/migrationsverket/midas/pull/675))
|
|
19
|
+
- remove storybook background transiton ([a7b633dca8](https://github.com/migrationsverket/midas/commit/a7b633dca8))
|
|
20
|
+
|
|
1
21
|
## 10.2.0 (2025-06-18)
|
|
2
22
|
|
|
3
23
|
### 🚀 Features
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Card.css');const a=require("react/jsx-runtime"),o=require("./clsx-C11secjj.cjs"),l=require("react"),u=require("./Heading-mHhCbGjY.cjs"),C=require("./Button-htW9qIsS.cjs"),x=require("./Link-BQhauBuw.cjs"),_=require("./arrow-right-QJ2gXPKQ.cjs");function h(e){const c=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(c,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return c.default=e,Object.freeze(c)}const s=h(l),m="_card_1hl11_4",A="_horizontal_1hl11_10",g="_cardLink_1hl11_15",I="_cardContent_1hl11_20",j="_cardActions_1hl11_39",b="_cardActionArea_1hl11_49",f="_cardImage_1hl11_82",k="_cardLinkIcon_1hl11_114",n={card:m,horizontal:A,cardLink:g,cardContent:I,cardActions:j,cardActionArea:b,cardImage:f,cardLinkIcon:k},i=s.createContext({horizontal:void 0,titleId:void 0}),z=({horizontal:e,className:c,children:t,...r})=>{const d=`card-title-${s.useId()}`;return a.jsx(i.Provider,{value:{horizontal:e,titleId:d},children:a.jsx("div",{...r,className:o.clsx(n.card,e&&n.horizontal,c),children:t})})},L=({children:e,...c})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...c,className:o.clsx(n.cardContent,t&&n.horizontal),children:e})},p=({elementType:e="h2",children:c})=>{const{horizontal:t,titleId:r}=s.useContext(i);return a.jsx(u.Heading,{level:t?5:3,elementType:e,isExpressive:t,className:o.clsx(n.cardTitle,t&&n.horizontal),id:r,children:c})},v=({children:e,...c})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...c,className:o.clsx(n.cardActions,t&&n.horizontal),children:e})},N=({children:e,className:c,...t})=>{const{titleId:r}=s.useContext(i);return a.jsx(C.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...t,"aria-labelledby":r,className:o.clsx(n.cardActionArea,c),children:e})},q=({as:e="img",className:c,...t})=>a.jsx(e,{...t,className:o.clsx(n.cardImage,c)}),$=({children:e,as:c,...t})=>{const r=c||x.$4f118338184dc1d9$export$a6c7ac8248d6e38a;return a.jsxs(r,{...t,className:o.clsx(n.cardLink,t.className),children:[e,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,11 +1,11 @@
|
|
|
1
1
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { c as n } from "./clsx-OuTLNxxd.js";
|
|
3
3
|
import * as e from "react";
|
|
4
|
-
import { H as m } from "./Heading-
|
|
5
|
-
import { $ as _ } from "./Button-
|
|
6
|
-
import { $ as h } from "./Link-
|
|
4
|
+
import { H as m } from "./Heading-BFtiin0g.js";
|
|
5
|
+
import { $ as _ } from "./Button-DjBChs7s.js";
|
|
6
|
+
import { $ as h } from "./Link-yNO2-sqx.js";
|
|
7
7
|
import { A as C } from "./arrow-right-Dg8sttFO.js";
|
|
8
|
-
import './assets/Card.css';const A = "_card_1hl11_4", I = "_horizontal_1hl11_10", p = "_cardLink_1hl11_15", u = "_cardContent_1hl11_20", x = "_cardActions_1hl11_39", f = "_cardActionArea_1hl11_49", z = "_cardImage_1hl11_82",
|
|
8
|
+
import './assets/Card.css';const A = "_card_1hl11_4", I = "_horizontal_1hl11_10", p = "_cardLink_1hl11_15", u = "_cardContent_1hl11_20", x = "_cardActions_1hl11_39", f = "_cardActionArea_1hl11_49", z = "_cardImage_1hl11_82", k = "_cardLinkIcon_1hl11_114", r = {
|
|
9
9
|
card: A,
|
|
10
10
|
horizontal: I,
|
|
11
11
|
cardLink: p,
|
|
@@ -13,7 +13,7 @@ import './assets/Card.css';const A = "_card_1hl11_4", I = "_horizontal_1hl11_10"
|
|
|
13
13
|
cardActions: x,
|
|
14
14
|
cardActionArea: f,
|
|
15
15
|
cardImage: z,
|
|
16
|
-
cardLinkIcon:
|
|
16
|
+
cardLinkIcon: k
|
|
17
17
|
}, d = e.createContext({
|
|
18
18
|
horizontal: void 0,
|
|
19
19
|
titleId: void 0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { a as f } from "./utils-DIMfEPAt.js";
|
|
4
|
+
import { $ as i } from "./Input-BTzwcf72.js";
|
|
5
|
+
import './assets/CharacterCounter.css';const m = "_characterCounter_4224k_4", h = {
|
|
6
|
+
characterCounter: m
|
|
7
|
+
}, l = d.forwardRef((t, c) => {
|
|
8
|
+
[t] = f(t, c, i);
|
|
9
|
+
const { maxLength: r, value: e, isLonely: n } = t, { length: a } = (e == null ? void 0 : e.toString()) ?? "", o = r !== void 0;
|
|
10
|
+
return /* @__PURE__ */ s(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
className: h.characterCounter,
|
|
14
|
+
"data-exceeded": o && a > r || void 0,
|
|
15
|
+
"data-lonely": n || void 0,
|
|
16
|
+
children: o ? `${a} / ${r}` : a
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
l as C
|
|
22
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/CharacterCounter.css');const s=require("react/jsx-runtime"),u=require("react"),i=require("./utils-BNtZbAib.cjs"),d=require("./Input-DKSAYvsw.cjs");function f(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=f(u)
|
|
1
|
+
"use strict";require('./assets/CharacterCounter.css');const s=require("react/jsx-runtime"),u=require("react"),i=require("./utils-BNtZbAib.cjs"),d=require("./Input-DKSAYvsw.cjs");function f(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=f(u),h="_characterCounter_4224k_4",b={characterCounter:h},g=l.forwardRef((e,n)=>{[e]=i.$64fa3d84918910a7$export$29f1550f4b0d4415(e,n,d.$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;
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { jsxs as w, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import E, { useEffect as k, useRef as G } from "react";
|
|
4
|
+
import { a as L } from "./RSPContexts-BW2SEIqe.js";
|
|
5
|
+
import { c as R, a as N, g as j } from "./utils-DIMfEPAt.js";
|
|
6
|
+
import { $ as A } from "./Form-CXcEMuBf.js";
|
|
7
|
+
import { c as M } from "./clsx-OuTLNxxd.js";
|
|
8
|
+
import { $ as F } from "./VisuallyHidden-ZCYf65q4.js";
|
|
9
|
+
import { a as H, $ as D, b as W, d as S, e as z } from "./useFormValidation-BIGzfO9h.js";
|
|
10
|
+
import { a as I } from "./usePress-CNjmDzap.js";
|
|
11
|
+
import { $ as J } from "./filterDOMProps-D6KHYVBX.js";
|
|
12
|
+
import { $ as K } from "./useFocusable-C8uh8K4g.js";
|
|
13
|
+
import { $ as _ } from "./useToggleState-Bz5rAf4C.js";
|
|
14
|
+
import { $ as Q } from "./useHover-DjIHtjGN.js";
|
|
15
|
+
import { $ as T } from "./useFocusRing-XnR3cZjO.js";
|
|
16
|
+
import './assets/Checkbox.css';function U(e, i, a) {
|
|
17
|
+
let { isDisabled: d = !1, isReadOnly: l = !1, value: o, name: r, children: t, "aria-label": n, "aria-labelledby": c, validationState: $ = "valid", isInvalid: f } = e, m = (v) => {
|
|
18
|
+
v.stopPropagation(), i.setSelected(v.target.checked);
|
|
19
|
+
}, P = t != null, u = n != null || c != null;
|
|
20
|
+
!P && !u && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
21
|
+
let { pressProps: h, isPressed: b } = I({
|
|
22
|
+
isDisabled: d
|
|
23
|
+
}), { pressProps: y, isPressed: g } = I({
|
|
24
|
+
onPress() {
|
|
25
|
+
var v;
|
|
26
|
+
i.toggle(), (v = a.current) === null || v === void 0 || v.focus();
|
|
27
|
+
},
|
|
28
|
+
isDisabled: d || l
|
|
29
|
+
}), { focusableProps: O } = K(e, a), p = R(h, O), q = J(e, {
|
|
30
|
+
labelable: !0
|
|
31
|
+
});
|
|
32
|
+
return H(a, i.isSelected, i.setSelected), {
|
|
33
|
+
labelProps: R(y, {
|
|
34
|
+
onClick: (v) => v.preventDefault()
|
|
35
|
+
}),
|
|
36
|
+
inputProps: R(q, {
|
|
37
|
+
"aria-invalid": f || $ === "invalid" || void 0,
|
|
38
|
+
"aria-errormessage": e["aria-errormessage"],
|
|
39
|
+
"aria-controls": e["aria-controls"],
|
|
40
|
+
"aria-readonly": l || void 0,
|
|
41
|
+
onChange: m,
|
|
42
|
+
disabled: d,
|
|
43
|
+
...o == null ? {} : {
|
|
44
|
+
value: o
|
|
45
|
+
},
|
|
46
|
+
name: r,
|
|
47
|
+
type: "checkbox",
|
|
48
|
+
...p
|
|
49
|
+
}),
|
|
50
|
+
isSelected: i.isSelected,
|
|
51
|
+
isPressed: b || g,
|
|
52
|
+
isDisabled: d,
|
|
53
|
+
isReadOnly: l,
|
|
54
|
+
isInvalid: f || $ === "invalid"
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function C(e, i, a) {
|
|
58
|
+
let d = D({
|
|
59
|
+
...e,
|
|
60
|
+
value: i.isSelected
|
|
61
|
+
}), { isInvalid: l, validationErrors: o, validationDetails: r } = d.displayValidation, { labelProps: t, inputProps: n, isSelected: c, isPressed: $, isDisabled: f, isReadOnly: m } = U({
|
|
62
|
+
...e,
|
|
63
|
+
isInvalid: l
|
|
64
|
+
}, i, a);
|
|
65
|
+
W(e, d, a);
|
|
66
|
+
let { isIndeterminate: P, isRequired: u, validationBehavior: h = "aria" } = e;
|
|
67
|
+
k(() => {
|
|
68
|
+
a.current && (a.current.indeterminate = !!P);
|
|
69
|
+
});
|
|
70
|
+
let { pressProps: b } = I({
|
|
71
|
+
isDisabled: f || m,
|
|
72
|
+
onPress() {
|
|
73
|
+
let { [S]: y } = e, { commitValidation: g } = y || d;
|
|
74
|
+
g();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
labelProps: R(t, b),
|
|
79
|
+
inputProps: {
|
|
80
|
+
...n,
|
|
81
|
+
checked: c,
|
|
82
|
+
"aria-required": u && h === "aria" || void 0,
|
|
83
|
+
required: u && h === "native"
|
|
84
|
+
},
|
|
85
|
+
isSelected: c,
|
|
86
|
+
isPressed: $,
|
|
87
|
+
isDisabled: f,
|
|
88
|
+
isReadOnly: m,
|
|
89
|
+
isInvalid: l,
|
|
90
|
+
validationErrors: o,
|
|
91
|
+
validationDetails: r
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const X = /* @__PURE__ */ new WeakMap();
|
|
95
|
+
function Y(e, i, a) {
|
|
96
|
+
const d = _({
|
|
97
|
+
isReadOnly: e.isReadOnly || i.isReadOnly,
|
|
98
|
+
isSelected: i.isSelected(e.value),
|
|
99
|
+
onChange(b) {
|
|
100
|
+
b ? i.addValue(e.value) : i.removeValue(e.value), e.onChange && e.onChange(b);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
let { name: l, descriptionId: o, errorMessageId: r, validationBehavior: t } = X.get(i);
|
|
104
|
+
var n;
|
|
105
|
+
t = (n = e.validationBehavior) !== null && n !== void 0 ? n : t;
|
|
106
|
+
let { realtimeValidation: c } = D({
|
|
107
|
+
...e,
|
|
108
|
+
value: d.isSelected,
|
|
109
|
+
// Server validation is handled at the group level.
|
|
110
|
+
name: void 0,
|
|
111
|
+
validationBehavior: "aria"
|
|
112
|
+
}), $ = G(z), f = () => {
|
|
113
|
+
i.setInvalid(e.value, c.isInvalid ? c : $.current);
|
|
114
|
+
};
|
|
115
|
+
k(f);
|
|
116
|
+
let m = i.realtimeValidation.isInvalid ? i.realtimeValidation : c, P = t === "native" ? i.displayValidation : m;
|
|
117
|
+
var u;
|
|
118
|
+
let h = C({
|
|
119
|
+
...e,
|
|
120
|
+
isReadOnly: e.isReadOnly || i.isReadOnly,
|
|
121
|
+
isDisabled: e.isDisabled || i.isDisabled,
|
|
122
|
+
name: e.name || l,
|
|
123
|
+
isRequired: (u = e.isRequired) !== null && u !== void 0 ? u : i.isRequired,
|
|
124
|
+
validationBehavior: t,
|
|
125
|
+
[S]: {
|
|
126
|
+
realtimeValidation: m,
|
|
127
|
+
displayValidation: P,
|
|
128
|
+
resetValidation: i.resetValidation,
|
|
129
|
+
commitValidation: i.commitValidation,
|
|
130
|
+
updateValidation(b) {
|
|
131
|
+
$.current = b, f();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, d, a);
|
|
135
|
+
return {
|
|
136
|
+
...h,
|
|
137
|
+
inputProps: {
|
|
138
|
+
...h.inputProps,
|
|
139
|
+
"aria-describedby": [
|
|
140
|
+
e["aria-describedby"],
|
|
141
|
+
i.isInvalid ? r : null,
|
|
142
|
+
o
|
|
143
|
+
].filter(Boolean).join(" ") || void 0
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
const Z = E.createContext(null), ee = "_checkboxInner_lpri7_11", ie = "_checkbox_lpri7_11", ae = "_checkboxGroup_lpri7_127", V = {
|
|
148
|
+
checkboxInner: ee,
|
|
149
|
+
checkbox: ie,
|
|
150
|
+
checkboxGroup: ae
|
|
151
|
+
}, B = x.forwardRef((e, i) => {
|
|
152
|
+
const { hoverProps: a, isHovered: d } = e.hoverResult, { pressProps: l, isPressed: o } = e.pressResult, { isFocused: r, isFocusVisible: t, focusProps: n } = e.focusRingAria;
|
|
153
|
+
return /* @__PURE__ */ w(
|
|
154
|
+
"label",
|
|
155
|
+
{
|
|
156
|
+
ref: i,
|
|
157
|
+
...R(a, l, e.labelProps),
|
|
158
|
+
slot: e.slot || void 0,
|
|
159
|
+
className: V.checkbox,
|
|
160
|
+
"data-hovered": d || void 0,
|
|
161
|
+
"data-selected": e.isSelected || void 0,
|
|
162
|
+
"data-indeterminate": e.isIndeterminate || void 0,
|
|
163
|
+
"data-pressed": o || void 0,
|
|
164
|
+
"data-disabled": e.isDisabled || void 0,
|
|
165
|
+
"data-readonly": e.isReadOnly || void 0,
|
|
166
|
+
"data-invalid": e.isInvalid || void 0,
|
|
167
|
+
"data-focused": r || void 0,
|
|
168
|
+
"data-focus-visible": t || void 0,
|
|
169
|
+
"data-required": e.isRequired || void 0,
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ s("div", { className: M(V.checkboxInner), children: /* @__PURE__ */ s(
|
|
172
|
+
"svg",
|
|
173
|
+
{
|
|
174
|
+
width: 16,
|
|
175
|
+
height: 16,
|
|
176
|
+
viewBox: "0 0 18 18",
|
|
177
|
+
"aria-hidden": "true",
|
|
178
|
+
children: e.isIndeterminate ? /* @__PURE__ */ s(
|
|
179
|
+
"rect",
|
|
180
|
+
{
|
|
181
|
+
x: 4,
|
|
182
|
+
y: 8,
|
|
183
|
+
width: 10,
|
|
184
|
+
height: 2
|
|
185
|
+
}
|
|
186
|
+
) : /* @__PURE__ */ s("polyline", { points: "3,9 7,13 15,4" })
|
|
187
|
+
}
|
|
188
|
+
) }),
|
|
189
|
+
/* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(
|
|
190
|
+
"input",
|
|
191
|
+
{
|
|
192
|
+
...R(e.inputProps, n),
|
|
193
|
+
ref: e.inputRef
|
|
194
|
+
}
|
|
195
|
+
) }),
|
|
196
|
+
e.children
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}), de = x.forwardRef((e, i) => {
|
|
201
|
+
const a = Y(
|
|
202
|
+
{
|
|
203
|
+
...e,
|
|
204
|
+
value: e.value || ""
|
|
205
|
+
},
|
|
206
|
+
e.state,
|
|
207
|
+
e.inputRef
|
|
208
|
+
);
|
|
209
|
+
return /* @__PURE__ */ s(
|
|
210
|
+
B,
|
|
211
|
+
{
|
|
212
|
+
...e,
|
|
213
|
+
...a,
|
|
214
|
+
ref: i
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}), le = x.forwardRef((e, i) => {
|
|
218
|
+
const a = C(e, _(e), e.inputRef);
|
|
219
|
+
return /* @__PURE__ */ s(
|
|
220
|
+
B,
|
|
221
|
+
{
|
|
222
|
+
...e,
|
|
223
|
+
...a,
|
|
224
|
+
ref: i
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}), Re = x.forwardRef(
|
|
228
|
+
(e, i) => {
|
|
229
|
+
[e, i] = N(e, i, L);
|
|
230
|
+
const a = j(A), d = e.validationBehavior ?? (a == null ? void 0 : a.validationBehavior) ?? "native", l = x.useContext(Z), o = x.useRef(null), r = Q(e), t = I({
|
|
231
|
+
ref: i,
|
|
232
|
+
isDisabled: e.isDisabled
|
|
233
|
+
}), n = T();
|
|
234
|
+
return l ? /* @__PURE__ */ s(
|
|
235
|
+
de,
|
|
236
|
+
{
|
|
237
|
+
...e,
|
|
238
|
+
state: l,
|
|
239
|
+
inputRef: o,
|
|
240
|
+
hoverResult: r,
|
|
241
|
+
pressResult: t,
|
|
242
|
+
focusRingAria: n,
|
|
243
|
+
validationBehavior: d
|
|
244
|
+
}
|
|
245
|
+
) : /* @__PURE__ */ s(
|
|
246
|
+
le,
|
|
247
|
+
{
|
|
248
|
+
...e,
|
|
249
|
+
inputRef: o,
|
|
250
|
+
hoverResult: r,
|
|
251
|
+
pressResult: t,
|
|
252
|
+
focusRingAria: n,
|
|
253
|
+
validationBehavior: d
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
export {
|
|
259
|
+
X as $,
|
|
260
|
+
Re as C,
|
|
261
|
+
Z as a,
|
|
262
|
+
V as s
|
|
263
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/Checkbox.css');const o=require("react/jsx-runtime"),g=require("react"),w=require("./RSPContexts-D8hmBfGm.cjs"),v=require("./utils-BNtZbAib.cjs"),E=require("./Form-BuOomA4T.cjs"),G=require("./clsx-C11secjj.cjs"),F=require("./VisuallyHidden-CLWHbz2n.cjs"),P=require("./useFormValidation-ClximP89.cjs"),V=require("./usePress-0AjDbW9R.cjs"),M=require("./filterDOMProps-BS2lrgFA.cjs"),N=require("./useFocusable-NUVSFcRC.cjs"),D=require("./useToggleState-DoIkSQdj.cjs"),L=require("./useHover-_mv5J4_q.cjs"),A=require("./useFocusRing-CbImDrwF.cjs");function H(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 R=H(g);function T(e,i,a){let{isDisabled:d=!1,isReadOnly:t=!1,value:r,name:s,children:n,"aria-label":l,"aria-labelledby":c,validationState:x="valid",isInvalid:u}=e,h=$=>{$.stopPropagation(),i.setSelected($.target.checked)},y=n!=null,f=l!=null||c!=null;!y&&!f&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:b}=V.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:d}),{pressProps:I,isPressed:k}=V.$f6c31cce2adf654f$export$45712eceda6fad21({onPress(){var $;i.toggle(),($=a.current)===null||$===void 0||$.focus()},isDisabled:d||t}),{focusableProps:j}=N.$f645667febf57a63$export$4c014de7c8940b4c(e,a),p=v.$3ef42575df84b30b$export$9d1611c77c2fe928(m,j),B=M.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});return P.$99facab73266f662$export$5add1d006293d136(a,i.isSelected,i.setSelected),{labelProps:v.$3ef42575df84b30b$export$9d1611c77c2fe928(I,{onClick:$=>$.preventDefault()}),inputProps:v.$3ef42575df84b30b$export$9d1611c77c2fe928(B,{"aria-invalid":u||x==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":t||void 0,onChange:h,disabled:d,...r==null?{}:{value:r},name:s,type:"checkbox",...p}),isSelected:i.isSelected,isPressed:b||k,isDisabled:d,isReadOnly:t,isInvalid:u||x==="invalid"}}function S(e,i,a){let d=P.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:i.isSelected}),{isInvalid:t,validationErrors:r,validationDetails:s}=d.displayValidation,{labelProps:n,inputProps:l,isSelected:c,isPressed:x,isDisabled:u,isReadOnly:h}=T({...e,isInvalid:t},i,a);P.$e93e671b31057976$export$b8473d3665f3a75a(e,d,a);let{isIndeterminate:y,isRequired:f,validationBehavior:m="aria"}=e;g.useEffect(()=>{a.current&&(a.current.indeterminate=!!y)});let{pressProps:b}=V.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:u||h,onPress(){let{[P.$e5be200c675c3b3a$export$a763b9476acd3eb]:I}=e,{commitValidation:k}=I||d;k()}});return{labelProps:v.$3ef42575df84b30b$export$9d1611c77c2fe928(n,b),inputProps:{...l,checked:c,"aria-required":f&&m==="aria"||void 0,required:f&&m==="native"},isSelected:c,isPressed:x,isDisabled:u,isReadOnly:h,isInvalid:t,validationErrors:r,validationDetails:s}}const O=new WeakMap;function z(e,i,a){const d=D.$3017fa7ffdddec74$export$8042c6c013fd5226({isReadOnly:e.isReadOnly||i.isReadOnly,isSelected:i.isSelected(e.value),onChange(b){b?i.addValue(e.value):i.removeValue(e.value),e.onChange&&e.onChange(b)}});let{name:t,descriptionId:r,errorMessageId:s,validationBehavior:n}=O.get(i);var l;n=(l=e.validationBehavior)!==null&&l!==void 0?l:n;let{realtimeValidation:c}=P.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:d.isSelected,name:void 0,validationBehavior:"aria"}),x=g.useRef(P.$e5be200c675c3b3a$export$dad6ae84456c676a),u=()=>{i.setInvalid(e.value,c.isInvalid?c:x.current)};g.useEffect(u);let h=i.realtimeValidation.isInvalid?i.realtimeValidation:c,y=n==="native"?i.displayValidation:h;var f;let m=S({...e,isReadOnly:e.isReadOnly||i.isReadOnly,isDisabled:e.isDisabled||i.isDisabled,name:e.name||t,isRequired:(f=e.isRequired)!==null&&f!==void 0?f:i.isRequired,validationBehavior:n,[P.$e5be200c675c3b3a$export$a763b9476acd3eb]:{realtimeValidation:h,displayValidation:y,resetValidation:i.resetValidation,commitValidation:i.commitValidation,updateValidation(b){x.current=b,u()}}},d,a);return{...m,inputProps:{...m.inputProps,"aria-describedby":[e["aria-describedby"],i.isInvalid?s:null,r].filter(Boolean).join(" ")||void 0}}}const C=g.createContext(null),W="_checkboxInner_lpri7_11",J="_checkbox_lpri7_11",K="_checkboxGroup_lpri7_127",q={checkboxInner:W,checkbox:J,checkboxGroup:K},_=R.forwardRef((e,i)=>{const{hoverProps:a,isHovered:d}=e.hoverResult,{pressProps:t,isPressed:r}=e.pressResult,{isFocused:s,isFocusVisible:n,focusProps:l}=e.focusRingAria;return o.jsxs("label",{ref:i,...v.$3ef42575df84b30b$export$9d1611c77c2fe928(a,t,e.labelProps),slot:e.slot||void 0,className:q.checkbox,"data-hovered":d||void 0,"data-selected":e.isSelected||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-pressed":r||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-invalid":e.isInvalid||void 0,"data-focused":s||void 0,"data-focus-visible":n||void 0,"data-required":e.isRequired||void 0,children:[o.jsx("div",{className:G.clsx(q.checkboxInner),children:o.jsx("svg",{width:16,height:16,viewBox:"0 0 18 18","aria-hidden":"true",children:e.isIndeterminate?o.jsx("rect",{x:4,y:8,width:10,height:2}):o.jsx("polyline",{points:"3,9 7,13 15,4"})})}),o.jsx(F.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:o.jsx("input",{...v.$3ef42575df84b30b$export$9d1611c77c2fe928(e.inputProps,l),ref:e.inputRef})}),e.children]})}),Q=R.forwardRef((e,i)=>{const a=z({...e,value:e.value||""},e.state,e.inputRef);return o.jsx(_,{...e,...a,ref:i})}),U=R.forwardRef((e,i)=>{const a=S(e,D.$3017fa7ffdddec74$export$8042c6c013fd5226(e),e.inputRef);return o.jsx(_,{...e,...a,ref:i})}),X=R.forwardRef((e,i)=>{[e,i]=v.$64fa3d84918910a7$export$29f1550f4b0d4415(e,i,w.$4e85f108e88277b8$export$b085522c77523c51);const a=v.$64fa3d84918910a7$export$fabf2dc03a41866e(E.$d3e0e05bdfcf66bd$export$c24727297075ec6a),d=e.validationBehavior??(a==null?void 0:a.validationBehavior)??"native",t=R.useContext(C),r=R.useRef(null),s=L.$6179b936705e76d3$export$ae780daf29e6d456(e),n=V.$f6c31cce2adf654f$export$45712eceda6fad21({ref:i,isDisabled:e.isDisabled}),l=A.$f7dceffc5ad7768b$export$4e328f61c538687f();return t?o.jsx(Q,{...e,state:t,inputRef:r,hoverResult:s,pressResult:n,focusRingAria:l,validationBehavior:d}):o.jsx(U,{...e,inputRef:r,hoverResult:s,pressResult:n,focusRingAria:l,validationBehavior:d})});exports.$1ae600c947479353$export$ec98120685d4f57d=O;exports.Checkbox=X;exports.CheckboxGroupContext=C;exports.styles=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),v=require("./Label-7Ybb99CE.cjs"),m=require("./Text-3MNwRMpI.cjs"),g=require("react"),b=require("./Checkbox-DqcPg5hz.cjs"),A=require("./FieldError-CKBb2-mp.cjs"),x=require("./useFormValidation-ClximP89.cjs"),V=require("./useControlledState-D0L6S_5r.cjs"),C=require("./useLocalizedStringFormatter-ioacM-Yt.cjs"),k=require("./utils-BNtZbAib.cjs"),y=require("./filterDOMProps-BS2lrgFA.cjs"),R=require("./useField-CXKYU74k.cjs"),j=require("./useFocusRing-CbImDrwF.cjs");function D(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(l,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return l.default=e,Object.freeze(l)}const h=D(g);function q(e,l){let{isDisabled:i,name:n,validationBehavior:d="aria"}=e,{isInvalid:r,validationErrors:c,validationDetails:u}=l.displayValidation,{labelProps:a,fieldProps:t,descriptionProps:s,errorMessageProps:f}=R.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span",isInvalid:r,errorMessage:e.errorMessage||c});b.$1ae600c947479353$export$ec98120685d4f57d.set(l,{name:n,descriptionId:s.id,errorMessageId:f.id,validationBehavior:d});let P=y.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),{focusWithinProps:S}=j.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});return{groupProps:k.$3ef42575df84b30b$export$9d1611c77c2fe928(P,{role:"group","aria-disabled":i||void 0,...t,...S}),labelProps:a,descriptionProps:s,errorMessageProps:f,isInvalid:r,validationErrors:c,validationDetails:u}}function I(e={}){let[l,i]=V.$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue||[],e.onChange),n=!!e.isRequired&&l.length===0,d=g.useRef(new Map),r=x.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:l}),c=r.displayValidation.isInvalid;var u;return{...r,value:l,setValue(t){e.isReadOnly||e.isDisabled||i(t)},isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isSelected(t){return l.includes(t)},addValue(t){e.isReadOnly||e.isDisabled||l.includes(t)||i(l.concat(t))},removeValue(t){e.isReadOnly||e.isDisabled||l.includes(t)&&i(l.filter(s=>s!==t))},toggleValue(t){e.isReadOnly||e.isDisabled||(l.includes(t)?i(l.filter(s=>s!==t)):i(l.concat(t)))},setInvalid(t,s){let f=new Map(d.current);s.isInvalid?f.set(t,s):f.delete(t),d.current=f,r.updateValidation(x.$e5be200c675c3b3a$export$75ee7c75d68f5b0e(...f.values()))},validationState:(u=e.validationState)!==null&&u!==void 0?u:c?"invalid":null,isInvalid:c,isRequired:n}}const F=(e,{value:l})=>{const i=h.Children.toArray(e).filter(a=>h.isValidElement(a)&&a.type===b.Checkbox),n=h.Children.count(i),d=h.Children.toArray(e).filter(a=>h.isValidElement(a)).filter(a=>!!a&&a.type===b.Checkbox).map(a=>a.props.value),r=l.length===0,c=l.length===n;return{allSelected:c,someSelected:!r&&!c,checkboxValues:d}},$=({state:e,errorMessage:l})=>o.jsx(A.$ee014567cb39d3f0$export$ff05c3ac10437e03.Provider,{value:e.displayValidation,children:o.jsx(A.FieldError,{children:l})}),O={"en-US":{selectAll:"Select all"},"en-GB":{selectAll:"Select all"},"es-ES":{selectAll:"Seleccionar todos"},"es-MX":{selectAll:"Seleccionar todos"},"fr-FR":{selectAll:"Tout sélectionner"},"fr-CA":{selectAll:"Tout sélectionner"},"de-DE":{selectAll:"Alle auswählen"},"it-IT":{selectAll:"Seleziona tutti"},"pt-PT":{selectAll:"Selecionar todos"},"pt-BR":{selectAll:"Selecionar todos"},"ru-RU":{selectAll:"Выбрать все"},"zh-CN":{selectAll:"全选"},"zh-TW":{selectAll:"全選"},"ja-JP":{selectAll:"すべて選択"},"ko-KR":{selectAll:"전체 선택"},"ar-SA":{selectAll:"تحديد الكل"},"hi-IN":{selectAll:"सभी चुनें"},"tr-TR":{selectAll:"Tümünü seç"},"nl-NL":{selectAll:"Alles selecteren"},"sv-SE":{selectAll:"Välj alla"},"fi-FI":{selectAll:"Valitse kaikki"},"no-NO":{selectAll:"Velg alle"},"da-DK":{selectAll:"Vælg alle"},"pl-PL":{selectAll:"Zaznacz wszystkie"},"cs-CZ":{selectAll:"Vybrat vše"},"he-IL":{selectAll:"בחר הכול"},"th-TH":{selectAll:"เลือกทั้งหมด"},"vi-VN":{selectAll:"Chọn tất cả"},"id-ID":{selectAll:"Pilih semua"},"uk-UA":{selectAll:"Вибрати все"}};function E(e){const l=I(e),i=C.useLocalizedStringFormatter(O),{groupProps:n,labelProps:d,descriptionProps:r}=q(e,l),{allSelected:c,someSelected:u,checkboxValues:a}=F(e.children,l),t=s=>{l.setValue(s?a:[])};return o.jsxs("div",{...n,className:b.styles.checkboxGroup,children:[o.jsx(v.LabelWrapper,{popover:e.popover,children:e.label&&o.jsx(v.Label,{...d,children:e.label})}),e.description&&o.jsx(m.Text,{slot:"description",...r,children:e.description}),e.errorPosition==="top"&&o.jsx($,{...e,state:l}),e.showSelectAll&&o.jsx(b.Checkbox,{isSelected:c,isIndeterminate:u,onChange:t,children:e.selectAllLabel||i.format("selectAll")}),o.jsx(b.CheckboxGroupContext.Provider,{value:l,children:e.children}),e.errorPosition==="bottom"&&o.jsx($,{...e,state:l})]})}exports.CheckboxGroup=E;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { jsx as n, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
+
import { a as P, L as x } from "./Label-BwJrdqEE.js";
|
|
3
|
+
import { T as S } from "./Text-jWWg0B20.js";
|
|
4
|
+
import * as b from "react";
|
|
5
|
+
import { useRef as g } from "react";
|
|
6
|
+
import { $ as V, C as m, s as C, a as y } from "./Checkbox-5HINZdGu.js";
|
|
7
|
+
import { $ as I, F as R } from "./FieldError-CAcjosk_.js";
|
|
8
|
+
import { $ as k, c as p } from "./useFormValidation-BIGzfO9h.js";
|
|
9
|
+
import { $ as D } from "./useControlledState-u436Wbp1.js";
|
|
10
|
+
import { u as E } from "./useLocalizedStringFormatter-D3JQyjb4.js";
|
|
11
|
+
import { c as F } from "./utils-DIMfEPAt.js";
|
|
12
|
+
import { $ as T } from "./filterDOMProps-D6KHYVBX.js";
|
|
13
|
+
import { $ as M } from "./useField-DvpGZkw_.js";
|
|
14
|
+
import { a as L } from "./useFocusRing-XnR3cZjO.js";
|
|
15
|
+
function O(e, l) {
|
|
16
|
+
let { isDisabled: i, name: f, validationBehavior: c = "aria" } = e, { isInvalid: o, validationErrors: r, validationDetails: d } = l.displayValidation, { labelProps: a, fieldProps: t, descriptionProps: s, errorMessageProps: u } = M({
|
|
17
|
+
...e,
|
|
18
|
+
// Checkbox group is not an HTML input element so it
|
|
19
|
+
// shouldn't be labeled by a <label> element.
|
|
20
|
+
labelElementType: "span",
|
|
21
|
+
isInvalid: o,
|
|
22
|
+
errorMessage: e.errorMessage || r
|
|
23
|
+
});
|
|
24
|
+
V.set(l, {
|
|
25
|
+
name: f,
|
|
26
|
+
descriptionId: s.id,
|
|
27
|
+
errorMessageId: u.id,
|
|
28
|
+
validationBehavior: c
|
|
29
|
+
});
|
|
30
|
+
let A = T(e, {
|
|
31
|
+
labelable: !0
|
|
32
|
+
}), { focusWithinProps: v } = L({
|
|
33
|
+
onBlurWithin: e.onBlur,
|
|
34
|
+
onFocusWithin: e.onFocus,
|
|
35
|
+
onFocusWithinChange: e.onFocusChange
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
groupProps: F(A, {
|
|
39
|
+
role: "group",
|
|
40
|
+
"aria-disabled": i || void 0,
|
|
41
|
+
...t,
|
|
42
|
+
...v
|
|
43
|
+
}),
|
|
44
|
+
labelProps: a,
|
|
45
|
+
descriptionProps: s,
|
|
46
|
+
errorMessageProps: u,
|
|
47
|
+
isInvalid: o,
|
|
48
|
+
validationErrors: r,
|
|
49
|
+
validationDetails: d
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function z(e = {}) {
|
|
53
|
+
let [l, i] = D(e.value, e.defaultValue || [], e.onChange), f = !!e.isRequired && l.length === 0, c = g(/* @__PURE__ */ new Map()), o = k({
|
|
54
|
+
...e,
|
|
55
|
+
value: l
|
|
56
|
+
}), r = o.displayValidation.isInvalid;
|
|
57
|
+
var d;
|
|
58
|
+
return {
|
|
59
|
+
...o,
|
|
60
|
+
value: l,
|
|
61
|
+
setValue(t) {
|
|
62
|
+
e.isReadOnly || e.isDisabled || i(t);
|
|
63
|
+
},
|
|
64
|
+
isDisabled: e.isDisabled || !1,
|
|
65
|
+
isReadOnly: e.isReadOnly || !1,
|
|
66
|
+
isSelected(t) {
|
|
67
|
+
return l.includes(t);
|
|
68
|
+
},
|
|
69
|
+
addValue(t) {
|
|
70
|
+
e.isReadOnly || e.isDisabled || l.includes(t) || i(l.concat(t));
|
|
71
|
+
},
|
|
72
|
+
removeValue(t) {
|
|
73
|
+
e.isReadOnly || e.isDisabled || l.includes(t) && i(l.filter((s) => s !== t));
|
|
74
|
+
},
|
|
75
|
+
toggleValue(t) {
|
|
76
|
+
e.isReadOnly || e.isDisabled || (l.includes(t) ? i(l.filter((s) => s !== t)) : i(l.concat(t)));
|
|
77
|
+
},
|
|
78
|
+
setInvalid(t, s) {
|
|
79
|
+
let u = new Map(c.current);
|
|
80
|
+
s.isInvalid ? u.set(t, s) : u.delete(t), c.current = u, o.updateValidation(p(...u.values()));
|
|
81
|
+
},
|
|
82
|
+
validationState: (d = e.validationState) !== null && d !== void 0 ? d : r ? "invalid" : null,
|
|
83
|
+
isInvalid: r,
|
|
84
|
+
isRequired: f
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const B = (e, { value: l }) => {
|
|
88
|
+
const i = b.Children.toArray(e).filter(
|
|
89
|
+
(a) => b.isValidElement(a) && a.type === m
|
|
90
|
+
), f = b.Children.count(i), c = b.Children.toArray(e).filter((a) => b.isValidElement(a)).filter((a) => !!a && a.type === m).map((a) => a.props.value), o = l.length === 0, r = l.length === f;
|
|
91
|
+
return {
|
|
92
|
+
allSelected: r,
|
|
93
|
+
someSelected: !o && !r,
|
|
94
|
+
checkboxValues: c
|
|
95
|
+
};
|
|
96
|
+
}, h = ({ state: e, errorMessage: l }) => /* @__PURE__ */ n(I.Provider, { value: e.displayValidation, children: /* @__PURE__ */ n(R, { children: l }) }), W = {
|
|
97
|
+
"en-US": {
|
|
98
|
+
selectAll: "Select all"
|
|
99
|
+
},
|
|
100
|
+
"en-GB": {
|
|
101
|
+
selectAll: "Select all"
|
|
102
|
+
},
|
|
103
|
+
"es-ES": {
|
|
104
|
+
selectAll: "Seleccionar todos"
|
|
105
|
+
},
|
|
106
|
+
"es-MX": {
|
|
107
|
+
selectAll: "Seleccionar todos"
|
|
108
|
+
},
|
|
109
|
+
"fr-FR": {
|
|
110
|
+
selectAll: "Tout sélectionner"
|
|
111
|
+
},
|
|
112
|
+
"fr-CA": {
|
|
113
|
+
selectAll: "Tout sélectionner"
|
|
114
|
+
},
|
|
115
|
+
"de-DE": {
|
|
116
|
+
selectAll: "Alle auswählen"
|
|
117
|
+
},
|
|
118
|
+
"it-IT": {
|
|
119
|
+
selectAll: "Seleziona tutti"
|
|
120
|
+
},
|
|
121
|
+
"pt-PT": {
|
|
122
|
+
selectAll: "Selecionar todos"
|
|
123
|
+
},
|
|
124
|
+
"pt-BR": {
|
|
125
|
+
selectAll: "Selecionar todos"
|
|
126
|
+
},
|
|
127
|
+
"ru-RU": {
|
|
128
|
+
selectAll: "Выбрать все"
|
|
129
|
+
},
|
|
130
|
+
"zh-CN": {
|
|
131
|
+
selectAll: "全选"
|
|
132
|
+
},
|
|
133
|
+
"zh-TW": {
|
|
134
|
+
selectAll: "全選"
|
|
135
|
+
},
|
|
136
|
+
"ja-JP": {
|
|
137
|
+
selectAll: "すべて選択"
|
|
138
|
+
},
|
|
139
|
+
"ko-KR": {
|
|
140
|
+
selectAll: "전체 선택"
|
|
141
|
+
},
|
|
142
|
+
"ar-SA": {
|
|
143
|
+
selectAll: "تحديد الكل"
|
|
144
|
+
},
|
|
145
|
+
"hi-IN": {
|
|
146
|
+
selectAll: "सभी चुनें"
|
|
147
|
+
},
|
|
148
|
+
"tr-TR": {
|
|
149
|
+
selectAll: "Tümünü seç"
|
|
150
|
+
},
|
|
151
|
+
"nl-NL": {
|
|
152
|
+
selectAll: "Alles selecteren"
|
|
153
|
+
},
|
|
154
|
+
"sv-SE": {
|
|
155
|
+
selectAll: "Välj alla"
|
|
156
|
+
},
|
|
157
|
+
"fi-FI": {
|
|
158
|
+
selectAll: "Valitse kaikki"
|
|
159
|
+
},
|
|
160
|
+
"no-NO": {
|
|
161
|
+
selectAll: "Velg alle"
|
|
162
|
+
},
|
|
163
|
+
"da-DK": {
|
|
164
|
+
selectAll: "Vælg alle"
|
|
165
|
+
},
|
|
166
|
+
"pl-PL": {
|
|
167
|
+
selectAll: "Zaznacz wszystkie"
|
|
168
|
+
},
|
|
169
|
+
"cs-CZ": {
|
|
170
|
+
selectAll: "Vybrat vše"
|
|
171
|
+
},
|
|
172
|
+
"he-IL": {
|
|
173
|
+
selectAll: "בחר הכול"
|
|
174
|
+
},
|
|
175
|
+
"th-TH": {
|
|
176
|
+
selectAll: "เลือกทั้งหมด"
|
|
177
|
+
},
|
|
178
|
+
"vi-VN": {
|
|
179
|
+
selectAll: "Chọn tất cả"
|
|
180
|
+
},
|
|
181
|
+
"id-ID": {
|
|
182
|
+
selectAll: "Pilih semua"
|
|
183
|
+
},
|
|
184
|
+
"uk-UA": {
|
|
185
|
+
selectAll: "Вибрати все"
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
function Y(e) {
|
|
189
|
+
const l = z(e), i = E(W), { groupProps: f, labelProps: c, descriptionProps: o } = O(
|
|
190
|
+
e,
|
|
191
|
+
l
|
|
192
|
+
), { allSelected: r, someSelected: d, checkboxValues: a } = B(
|
|
193
|
+
e.children,
|
|
194
|
+
l
|
|
195
|
+
), t = (s) => {
|
|
196
|
+
l.setValue(s ? a : []);
|
|
197
|
+
};
|
|
198
|
+
return /* @__PURE__ */ $(
|
|
199
|
+
"div",
|
|
200
|
+
{
|
|
201
|
+
...f,
|
|
202
|
+
className: C.checkboxGroup,
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ n(P, { popover: e.popover, children: e.label && /* @__PURE__ */ n(x, { ...c, children: e.label }) }),
|
|
205
|
+
e.description && /* @__PURE__ */ n(
|
|
206
|
+
S,
|
|
207
|
+
{
|
|
208
|
+
slot: "description",
|
|
209
|
+
...o,
|
|
210
|
+
children: e.description
|
|
211
|
+
}
|
|
212
|
+
),
|
|
213
|
+
e.errorPosition === "top" && /* @__PURE__ */ n(
|
|
214
|
+
h,
|
|
215
|
+
{
|
|
216
|
+
...e,
|
|
217
|
+
state: l
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
e.showSelectAll && /* @__PURE__ */ n(
|
|
221
|
+
m,
|
|
222
|
+
{
|
|
223
|
+
isSelected: r,
|
|
224
|
+
isIndeterminate: d,
|
|
225
|
+
onChange: t,
|
|
226
|
+
children: e.selectAllLabel || i.format("selectAll")
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
/* @__PURE__ */ n(y.Provider, { value: l, children: e.children }),
|
|
230
|
+
e.errorPosition === "bottom" && /* @__PURE__ */ n(
|
|
231
|
+
h,
|
|
232
|
+
{
|
|
233
|
+
...e,
|
|
234
|
+
state: l
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
export {
|
|
242
|
+
Y as C
|
|
243
|
+
};
|