@midas-ds/components 11.2.0 → 12.0.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-DEiRuizp.js +361 -0
- package/AccordionItem-Dhr7uo8u.cjs +1 -0
- package/BadgeContainer-CxVmqJ7g.cjs +1 -0
- package/BadgeContainer-DGJGJMPi.js +37 -0
- package/{Breadcrumbs-BBzSV4SK.js → Breadcrumbs-CEyKlcGU.js} +11 -11
- package/{Breadcrumbs-CFUryOhf.cjs → Breadcrumbs-CnGzvtbn.cjs} +1 -1
- package/{Button-Dq6ugqxT.cjs → Button-DQm2iqKU.cjs} +1 -1
- package/{Button-DExMoP5f.cjs → Button-DZzQGk-L.cjs} +1 -1
- package/{Button-CepQFEit.js → Button-DtC_ZOyd.js} +12 -12
- package/{Button-BjMaGya2.js → Button-akT6Hvug.js} +1 -1
- package/CHANGELOG.md +49 -0
- package/{Card-BRs1FKX5.js → Card-CwwVnA_a.js} +5 -5
- package/Card-DPfOZC7f.cjs +1 -0
- package/{CharacterCounter-DpBDwvLw.js → CharacterCounter-DPphWPzA.js} +5 -5
- package/{CharacterCounter-DSFBv3Rw.cjs → CharacterCounter-DQJVM-mZ.cjs} +1 -1
- package/{Checkbox-EB_SCBEo.js → Checkbox-BN_3F2Hl.js} +21 -21
- package/{Checkbox-Co3h0hur.cjs → Checkbox-CZtCj4yR.cjs} +1 -1
- package/{CheckboxGroup-DvrN1oyw.js → CheckboxGroup--xgOT1Do.js} +11 -11
- package/{CheckboxGroup-CT_eqERw.cjs → CheckboxGroup-DGHaqRvb.cjs} +1 -1
- package/{Collection-BtBX5IMY.cjs → Collection-B1xL4EdF.cjs} +1 -1
- package/{Collection-D2jVTmDW.js → Collection-C5vE9MtJ.js} +11 -11
- package/{ColorSchemeSwitch-owUryjYz.cjs → ColorSchemeSwitch-DtyJ9-5B.cjs} +3 -3
- package/{ColorSchemeSwitch-PiEHptw1.js → ColorSchemeSwitch-DyZ9FAKG.js} +12 -12
- package/{ComboBox-DfJ_aJrf.js → ComboBox-Dn3tQzri.js} +93 -97
- package/{ComboBox-D_jh7TKo.cjs → ComboBox-UadZMhiR.cjs} +1 -1
- package/{DateField-BURrxhil.cjs → DateField-CNEoLyf5.cjs} +1 -1
- package/{DateField-DKCbEonm.js → DateField-CZmLugT0.js} +4 -4
- package/{DateInputDivider-ToFY-yjB.cjs → DateInputDivider-CCjiq90K.cjs} +1 -1
- package/{DateInputDivider-BmvqW1Hk.js → DateInputDivider-CJEGWmG0.js} +22 -22
- package/{DateRangePicker-DkIAEIIj.cjs → DateRangePicker-DhgLEa9P.cjs} +2 -2
- package/{DateRangePicker-B5vx9onl.js → DateRangePicker-WQ97Psz7.js} +22 -22
- package/{Dialog-DtHk3eXI.cjs → Dialog-BT0tVGQb.cjs} +1 -1
- package/{Dialog-D5c_dUnB.js → Dialog-BuJdAr0D.js} +48 -48
- package/Dialog-DYK8lySl.cjs +1 -0
- package/Dialog-L53DWF0Z.js +220 -0
- package/{DragAndDrop-DOXLfJaA.js → DragAndDrop-DKxsUpmW.js} +9 -9
- package/{DragAndDrop-CSg60YQE.cjs → DragAndDrop-Dgfq6uJ0.cjs} +1 -1
- package/{Dropdown-Cpc2EszJ.js → Dropdown-BWbdSQ9U.js} +35 -34
- package/Dropdown-CJ-sujKv.cjs +6 -0
- package/FieldError-BlKkw9YL.js +46 -0
- package/{FieldError-Bv3Q6ZP-.cjs → FieldError-BvU0sueN.cjs} +1 -1
- package/{FileUpload-BokzdXVc.js → FileUpload-B89QfnCB.js} +13 -13
- package/{FileUpload-Bz9md5zc.cjs → FileUpload-KQ1XAKAc.cjs} +1 -1
- package/{FocusScope-vcXLOQiu.cjs → FocusScope-CAgWgk3N.cjs} +1 -1
- package/{FocusScope-DMsfA3bj.js → FocusScope-CEgd3xCY.js} +17 -17
- package/{Grid--OhtgCo6.js → Grid-B2av0vt8.js} +6 -9
- package/Grid-Db5wZrw6.cjs +1 -0
- package/{GridItem-XgHmZWXY.cjs → GridItem-BnyULDnc.cjs} +1 -1
- package/{GridItem-DlbSdRmB.js → GridItem-orSzD7H5.js} +27 -30
- package/{Group-B0vQfHDy.js → Group-B3mRMVy7.js} +11 -11
- package/{Group-DOpbdoAi.cjs → Group-Cdy6z9ra.cjs} +1 -1
- package/{Heading-D2y_kiC0.js → Heading-DDhdwRAW.js} +7 -7
- package/Heading-OUPkdoEJ.cjs +1 -0
- package/{Hidden-C9KWUR7b.js → Hidden-B5ir3Lei.js} +2 -2
- package/InfoBanner-DpLcq_1R.cjs +1 -0
- package/InfoBanner-U5hxOipC.js +99 -0
- package/{Input-n-Z20KbW.js → Input-BnpBRnJz.js} +9 -9
- package/{Input-MJji5hhq.cjs → Input-DIhhWEPW.cjs} +1 -1
- package/{Label-endv1fkJ.js → Label-ByWt6Lfh.js} +24 -24
- package/Label-COpr4xVt.cjs +1 -0
- package/{Layout-D0E1fOgZ.cjs → Layout-BR3Or1Ga.cjs} +2 -2
- package/{Layout-DtyhUz-G.js → Layout-Bdqauktv.js} +17 -17
- package/{Link-CibH8uRY.js → Link-CM2N5Jq-.js} +7 -7
- package/{Link-ovwNVMfg.js → Link-Dnnv00g9.js} +1 -1
- package/{Link-ESjrl63P.cjs → Link-Dq8IFDBx.cjs} +1 -1
- package/{Link-CidjjqHb.cjs → Link-ceVlGaWQ.cjs} +1 -1
- package/{LinkButton-B6AWNiRn.cjs → LinkButton-BJA9_HzL.cjs} +1 -1
- package/{LinkButton-BkZULm2a.js → LinkButton-DH3Nfdis.js} +1 -1
- package/{ListBox-B0E1hdEt.cjs → ListBox-D0u9svwm.cjs} +1 -1
- package/{ListBox-Djy7244v.js → ListBox-y_dw__MI.js} +16 -16
- package/{ListBoxButton-CIqNRR3y.cjs → ListBoxButton-C2zp-gXD.cjs} +1 -1
- package/{ListBoxButton-sqirI6I4.js → ListBoxButton-DiseS_LX.js} +1 -1
- package/{ListBoxSection-Cicbu8pS.js → ListBoxSection-Cv-gN76G.js} +9 -9
- package/{ListBoxSection-BYJccE4T.cjs → ListBoxSection-DtsigmC1.cjs} +1 -1
- package/{ListKeyboardDelegate-ZKBk2IId.cjs → ListKeyboardDelegate-fZKXmHAk.cjs} +1 -1
- package/{ListKeyboardDelegate-CHki611g.js → ListKeyboardDelegate-mcrZobNa.js} +2 -2
- package/{Logo-BpH0HC91.cjs → Logo-BW5NXAdu.cjs} +1 -1
- package/{Logo-ME4ffCue.js → Logo-qkVS1MCN.js} +1 -1
- package/{OverlayArrow-DpZ1FqOd.cjs → OverlayArrow-8praV_Xy.cjs} +1 -1
- package/{OverlayArrow-DB_aVTVM.js → OverlayArrow-DfkRZlgG.js} +4 -4
- package/{Popover-BDvKByTT.cjs → Popover-C5chAY42.cjs} +1 -1
- package/{Popover-Tniqbaes.js → Popover-viLqHHX2.js} +2 -2
- package/{PressResponder-C3APAKsz.js → PressResponder-B_Zqu7b1.js} +9 -9
- package/PressResponder-Bm3_RM9c.cjs +1 -0
- package/{ProgressBar-ClysdvqU.cjs → ProgressBar-D5mNQTID.cjs} +1 -1
- package/{ProgressBar-DTn23Zkr.js → ProgressBar-wQirOG1N.js} +2 -2
- package/{Radio-CCN3o3s-.js → Radio-BIomn_sP.js} +23 -23
- package/{Radio-Cz0vLIBw.cjs → Radio-CxvJ5Wrl.cjs} +1 -1
- package/{RangeCalendar-BY82hPRu.cjs → RangeCalendar-BvvZ2SBj.cjs} +1 -1
- package/{RangeCalendar-BCruEq9d.js → RangeCalendar-DGGMbb0j.js} +19 -19
- package/{SSRProvider-40TXmsUG.js → SSRProvider-D8lZ0o6A.js} +5 -5
- package/{SSRProvider-Bc-sMhsT.cjs → SSRProvider-DZRLwxPS.cjs} +1 -1
- package/{SearchField-nwlyszwt.js → SearchField-B0dlPqsW.js} +6 -6
- package/{SearchField-QFyuaT-K.cjs → SearchField-Ma3KB8Em.cjs} +2 -2
- package/{Select-MwvnbChP.js → Select-769RSZ9V.js} +114 -114
- package/{Select-lhIwwJL7.cjs → Select-Go5x0zWl.cjs} +1 -1
- package/{SelectionManager-BKrZ_mMO.js → SelectionManager-BdKKuso-.js} +9 -9
- package/{SelectionManager-BJjqIWtf.cjs → SelectionManager-BvREZgeu.cjs} +1 -1
- package/{Separator-DvvVAypT.js → Separator-CggS0R7Q.js} +4 -4
- package/{Separator-DPLEx950.cjs → Separator-DBsDhqCr.cjs} +1 -1
- package/{Spinner-VSyPhiJ9.js → Spinner-AXFRWuT6.js} +2 -2
- package/{Spinner-vof0Y9Hh.cjs → Spinner-yHx_DX_4.cjs} +1 -1
- package/TabList-0gj27e_e.js +386 -0
- package/TabList-Cqpup53E.cjs +1 -0
- package/Table-BhtlNY9P.cjs +16 -0
- package/{Table-DGTwyh7U.js → Table-CTS0J_sQ.js} +289 -268
- package/{Tag-rI-NhuT0.js → Tag-B9M-nBTM.js} +49 -49
- package/{Tag-bYq-wf5D.cjs → Tag-DkW6zaIS.cjs} +1 -1
- package/{Text-DcZqSUN9.js → Text--KL3Auo7.js} +3 -3
- package/{Text-BPcfhYQ9.js → Text-BUDAzDjW.js} +1 -1
- package/{Text-DBHWi5gA.cjs → Text-DA_gK6a2.cjs} +1 -1
- package/{Text-CfcjRtke.cjs → Text-wuw0HQoa.cjs} +1 -1
- package/TextArea-CSrrYY05.cjs +1 -0
- package/{TextArea-CrEALC58.js → TextArea-DphcH6wE.js} +16 -16
- package/{TextField-Dma22dnD.js → TextField-CsyRTSEG.js} +13 -13
- package/{TextField-BAX93sq7.cjs → TextField-P5yICj5z.cjs} +1 -1
- package/Toast-BEh5yYzO.cjs +1 -0
- package/{Toast-CWt_mNIg.js → Toast-BnzpC_5v.js} +130 -137
- package/{ToggleButtonGroup-DZ_wo0qx.cjs → ToggleButtonGroup-BwFAhFEi.cjs} +1 -1
- package/{ToggleButtonGroup-98z8Dw8-.js → ToggleButtonGroup-CuxAKB3-.js} +7 -7
- package/{Tooltip-pN5W3IK6.cjs → Tooltip-Bz0xCZSw.cjs} +1 -1
- package/{Tooltip-DjNc93tV.js → Tooltip-EuEQtHZj.js} +12 -12
- package/{VisuallyHidden-CYfmTSCD.js → VisuallyHidden-BKslUoMJ.js} +8 -8
- package/{VisuallyHidden-Doyzl0F7.cjs → VisuallyHidden-DxDOcIsh.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/Button.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Dialog.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/Table.css +1 -1
- package/assets/theme.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 +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/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- 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/types.d.ts +0 -13
- package/common/icon-map.d.ts +6 -0
- package/common/types.d.ts +8 -0
- package/{context-CGNJ3grH.js → context-Dl_saGB6.js} +11 -11
- package/{context-Df3XbgBG.cjs → context-UOrD6Zxk.cjs} +1 -1
- 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 +7 -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/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-BSMrH_Du.js} +7 -7
- package/{index-Dsz3aiWt.cjs → index-D97L3EBk.cjs} +2 -2
- package/index.cjs +1 -1
- package/index.js +108 -111
- package/inertValue-BWmZ1afe.cjs +1 -0
- 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/index.cjs +1 -1
- package/list-box/index.js +2 -2
- package/logo/index.cjs +1 -1
- package/logo/index.js +1 -1
- package/{mergeProps-C1U1OIeJ.js → mergeProps-BYJQ6N1s.js} +11 -11
- package/{mergeProps-B5KXZAI3.cjs → mergeProps-C7Sx47fA.cjs} +1 -1
- package/modal/index.cjs +1 -1
- package/modal/index.js +2 -2
- package/package.json +4 -1
- package/popover/index.cjs +1 -1
- package/popover/index.js +1 -1
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/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/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/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/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/theme/index.cjs +1 -1
- package/theme/index.d.ts +36 -12
- package/theme/index.js +12 -11
- package/theme/tokens.d.ts +36 -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-BWo7EvNX.cjs +1 -0
- package/{tokens-CqvelUoA.js → tokens-BtEBd3jO.js} +69 -31
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/{useButton-BoIV3kDJ.js → useButton-CWHoXYnj.js} +3 -3
- package/{useButton-D60q0SQw.cjs → useButton-CwOQUGtY.cjs} +1 -1
- package/{useDateFormatter-C7BJgoDR.js → useDateFormatter-DiIUdTak.js} +2 -2
- package/{useDateFormatter-BJBt0jk_.cjs → useDateFormatter-bzjwqA2K.cjs} +1 -1
- package/{useDescription-CPo72trh.cjs → useDescription-ByNlNIRU.cjs} +1 -1
- package/{useDescription-DYfKjGGU.js → useDescription-LmB1V4Tg.js} +1 -1
- package/useEvent-CGRyLM2c.cjs +1 -0
- package/{useEvent-CigwyJOw.js → useEvent-DqWz89vg.js} +1 -1
- package/{useField-CefQB81E.js → useField-5CEdtfab.js} +2 -2
- package/{useField-D1UkzeaI.cjs → useField-CoQAzygg.cjs} +1 -1
- package/{useFilter-DsOxD9JB.js → useFilter-BKQT28sh.js} +1 -1
- package/{useFilter-BhM2yVO3.cjs → useFilter-Bjh5dq2Q.cjs} +1 -1
- package/{useFocusRing-B-A1OLhU.cjs → useFocusRing-BM-zcH6L.cjs} +1 -1
- package/{useFocusRing-DOfBqnUN.js → useFocusRing-HoJn20X5.js} +2 -2
- package/{useFocusWithin-T1ifEM_s.js → useFocusWithin-Cn18Myw6.js} +1 -1
- package/{useFocusWithin-CG8mAt2D.cjs → useFocusWithin-o0WjCpEB.cjs} +1 -1
- package/{useFocusable-D7I1ujkW.cjs → useFocusable-DbmryjUH.cjs} +1 -1
- package/{useFocusable-BjE42axF.js → useFocusable-ZjCKo1ed.js} +14 -14
- package/{useFormValidation-BzzruZKm.js → useFormValidation-BW2NSTM4.js} +2 -2
- package/{useFormValidation-BlFGdPZB.cjs → useFormValidation-DSRwb9US.cjs} +1 -1
- package/useHasTabbableChild-CogBR_6o.cjs +1 -0
- package/{useHasTabbableChild-BgEe5J35.js → useHasTabbableChild-CyOmqumh.js} +2 -2
- package/{useHighlightSelectionDescription-DmbDkFGY.cjs → useHighlightSelectionDescription-DAhPdEG6.cjs} +1 -1
- package/{useHighlightSelectionDescription-xr_16pKd.js → useHighlightSelectionDescription-DTxHtOsw.js} +5 -5
- package/{useHover-BE_XKZKe.cjs → useHover-CaFzQrR_.cjs} +1 -1
- package/{useHover-DQvJ3Y-W.js → useHover-D8fja4GW.js} +6 -6
- package/{useLabels-CSU0kbtJ.cjs → useLabels-BtDN_ALM.cjs} +1 -1
- package/{useLabels-LrKQiY11.js → useLabels-DZlvh4P4.js} +1 -1
- package/{useListState-wLau6fXo.cjs → useListState-TtWy_rDI.cjs} +1 -1
- package/{useListState-B3c3xcNW.js → useListState-e7cL-FOK.js} +1 -1
- package/{useLocalizedStringFormatter-BO2iZEL0.cjs → useLocalizedStringFormatter-BSac43NO.cjs} +1 -1
- package/useLocalizedStringFormatter-CHAo1AyN.cjs +1 -0
- package/{useLocalizedStringFormatter-CL9MUZ8A.js → useLocalizedStringFormatter-CSEh15AZ.js} +1 -1
- package/{useLocalizedStringFormatter-N0AyjzbM.js → useLocalizedStringFormatter-aOhh7wdl.js} +1 -1
- package/useObserveElement-BzEr5D32.cjs +1 -0
- package/{usePress-BooY_CAy.cjs → usePress-BOGIOlm8.cjs} +2 -2
- package/{usePress-BW47IcyU.js → usePress-B_jgTf4k.js} +105 -105
- package/{useSingleSelectListState-DlO5H9N-.cjs → useSingleSelectListState-BiJMNaOl.cjs} +1 -1
- package/{useSingleSelectListState-DdBsBWKG.js → useSingleSelectListState-D7LjjoUJ.js} +1 -1
- package/{useTextField-DnRrCg5o.cjs → useTextField-BVIOd8Ld.cjs} +1 -1
- package/{useTextField-DjxayZsV.js → useTextField-DFkSHoQN.js} +11 -11
- package/{useUpdateEffect-C5YQs_1w.cjs → useUpdateEffect-sk3kiVGz.cjs} +1 -1
- package/{utils-DHNZrQmj.cjs → utils-BM2vxlNA.cjs} +1 -1
- package/{utils-Dvdohqm9.cjs → utils-C5-CzvX2.cjs} +1 -1
- package/{utils-CoCR_Fce.js → utils-CuqJqFqQ.js} +1 -1
- package/{utils-KLjWgdLR.js → utils-KYuflGZt.js} +10 -10
- package/AccordionItem-BPOQqTkQ.js +0 -323
- package/AccordionItem-CS-QKqrU.cjs +0 -1
- package/BadgeContainer-CKBIZWsc.js +0 -37
- package/BadgeContainer-DWVHS5dn.cjs +0 -1
- package/Card-cdL5669N.cjs +0 -1
- package/Dialog-CxHiZorC.cjs +0 -1
- package/Dialog-DuGcBeNN.js +0 -212
- package/Dropdown-CYakzdJg.cjs +0 -6
- package/FieldError-CDCvUjK5.js +0 -46
- package/Grid-DVQtOcu9.cjs +0 -1
- package/Heading-CKTR4sOz.cjs +0 -1
- package/InfoBanner-CzwbOdRG.cjs +0 -1
- package/InfoBanner-D05poAe3.js +0 -91
- package/Label-ChjDdBlv.cjs +0 -1
- package/PressResponder-4jE_HLu3.cjs +0 -1
- package/TabList-CWMlbijV.cjs +0 -1
- package/TabList-VpTv_Xff.js +0 -435
- package/Table-DGYC-sDq.cjs +0 -16
- package/TextArea-DJKHFKuI.cjs +0 -1
- package/Toast-DdmSvNaO.cjs +0 -1
- package/circle-check-BErh6TKu.js +0 -26
- package/circle-check-OVUGxwp9.cjs +0 -11
- package/inertValue-B3AFhVG4.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/useEvent-DPxMu-X9.cjs +0 -1
- package/useHasTabbableChild-CoQRpNbC.cjs +0 -1
- package/useLocalizedStringFormatter-BiX5BTlb.cjs +0 -1
- package/useObserveElement-MhzEsCkX.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
+
# 12.0.0 (2025-08-27)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **info-banner:** add controlled state ([#754](https://github.com/migrationsverket/midas/pull/754))
|
|
6
|
+
- **modal:** change title to `h2`, remove margin and center vertically ([400b06702a](https://github.com/migrationsverket/midas/commit/400b06702a))
|
|
7
|
+
- **modal:** move modal title to the header ([4889b827d4](https://github.com/migrationsverket/midas/commit/4889b827d4))
|
|
8
|
+
- **theme:** Implement dynamic theme generation and CSS validation ([f50ee50a5b](https://github.com/migrationsverket/midas/commit/f50ee50a5b))
|
|
9
|
+
- ⚠️ Automate ESLint versioning and remove deprecated features ([577253d5bb](https://github.com/migrationsverket/midas/commit/577253d5bb))
|
|
10
|
+
- **dropdown:** add custom icon support ([6d34b3061a](https://github.com/migrationsverket/midas/commit/6d34b3061a))
|
|
11
|
+
- ⚠️ **components:** change feedback status icons to consistent pattern ([8075adb685](https://github.com/migrationsverket/midas/commit/8075adb685))
|
|
12
|
+
- **accordion:** add option to display more statuses ([3eb637fc17](https://github.com/migrationsverket/midas/commit/3eb637fc17))
|
|
13
|
+
- **table:** add virtualizer recipe ([#736](https://github.com/migrationsverket/midas/pull/736))
|
|
14
|
+
|
|
15
|
+
### 🩹 Fixes
|
|
16
|
+
|
|
17
|
+
- **badge:** replace label color ([cfda450f4e](https://github.com/migrationsverket/midas/commit/cfda450f4e))
|
|
18
|
+
- **date-picker:** remove explicit height for calendar button ([3fe21636ea](https://github.com/migrationsverket/midas/commit/3fe21636ea))
|
|
19
|
+
|
|
20
|
+
### 💅 Refactors
|
|
21
|
+
|
|
22
|
+
- extract `FeedbackStatus` type ([8396c9e628](https://github.com/migrationsverket/midas/commit/8396c9e628))
|
|
23
|
+
|
|
24
|
+
### 🔧 Maintenance
|
|
25
|
+
|
|
26
|
+
- **theme:** export css variables in theme.css from @midas-ds/components package ([f9eddbf186](https://github.com/migrationsverket/midas/commit/f9eddbf186))
|
|
27
|
+
- remove storybook global size control ([#749](https://github.com/migrationsverket/midas/pull/749))
|
|
28
|
+
- deploy docweb from dev branch ([80f58e46d2](https://github.com/migrationsverket/midas/commit/80f58e46d2))
|
|
29
|
+
|
|
30
|
+
### 🧪 Tests updated
|
|
31
|
+
|
|
32
|
+
- **button:** move interaction tests to a separate story ([9dfd1459cd](https://github.com/migrationsverket/midas/commit/9dfd1459cd))
|
|
33
|
+
- **link-button:** remove a11y test bypass ([a059db212a](https://github.com/migrationsverket/midas/commit/a059db212a))
|
|
34
|
+
- **search-field:** remove global size ([#759](https://github.com/migrationsverket/midas/pull/759))
|
|
35
|
+
- remove size test from button linkButton and table ([48a26e096e](https://github.com/migrationsverket/midas/commit/48a26e096e))
|
|
36
|
+
- **badge:** bypass a11y tests ([626ceaf98c](https://github.com/migrationsverket/midas/commit/626ceaf98c))
|
|
37
|
+
- **badge:** fix failing test in dark mode ([d91b690316](https://github.com/migrationsverket/midas/commit/d91b690316))
|
|
38
|
+
- **link-button:** bypass a11y test ([ad33fbfd58](https://github.com/migrationsverket/midas/commit/ad33fbfd58))
|
|
39
|
+
- emulate media in prepare test hook ([e4060227d4](https://github.com/migrationsverket/midas/commit/e4060227d4))
|
|
40
|
+
|
|
41
|
+
### ⏪ Revert
|
|
42
|
+
|
|
43
|
+
- **theme:** Revert "fix(theme): change dark mode values for danger button" ([6cb506566e](https://github.com/migrationsverket/midas/commit/6cb506566e))
|
|
44
|
+
|
|
45
|
+
### ⚠️ Breaking Changes
|
|
46
|
+
|
|
47
|
+
- ⚠️ Automate ESLint versioning and remove deprecated features ([577253d5bb](https://github.com/migrationsverket/midas/commit/577253d5bb))
|
|
48
|
+
- **components:** when using `type` (`'success'|'info'|'warning'|'important'`) the string `default` is
|
|
49
|
+
|
|
1
50
|
## 11.2.0 (2025-08-14)
|
|
2
51
|
|
|
3
52
|
### 🚀 Features
|
|
@@ -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-DDhdwRAW.js";
|
|
5
|
+
import { $ as _ } from "./Button-DtC_ZOyd.js";
|
|
6
|
+
import { $ as h } from "./Link-CM2N5Jq-.js";
|
|
7
7
|
import { A as C } from "./arrow-right-uemUGIg8.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", $ = "_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: $
|
|
17
17
|
}, d = e.createContext({
|
|
18
18
|
horizontal: void 0,
|
|
19
19
|
titleId: void 0
|
|
@@ -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-OUPkdoEJ.cjs"),C=require("./Button-DZzQGk-L.cjs"),x=require("./Link-ceVlGaWQ.cjs"),_=require("./arrow-right-BGd86zzR.cjs");function h(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(c,t,n.get?n:{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",b="_cardActions_1hl11_39",j="_cardActionArea_1hl11_49",f="_cardImage_1hl11_82",k="_cardLinkIcon_1hl11_114",r={card:m,horizontal:A,cardLink:g,cardContent:I,cardActions:b,cardActionArea:j,cardImage:f,cardLinkIcon:k},i=s.createContext({horizontal:void 0,titleId:void 0}),z=({horizontal:e,className:c,children:t,...n})=>{const d=`card-title-${s.useId()}`;return a.jsx(i.Provider,{value:{horizontal:e,titleId:d},children:a.jsx("div",{...n,className:o.clsx(r.card,e&&r.horizontal,c),children:t})})},L=({children:e,...c})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...c,className:o.clsx(r.cardContent,t&&r.horizontal),children:e})},$=({elementType:e="h2",children:c})=>{const{horizontal:t,titleId:n}=s.useContext(i);return a.jsx(u.Heading,{level:t?5:3,elementType:e,isExpressive:t,className:o.clsx(r.cardTitle,t&&r.horizontal),id:n,children:c})},p=({children:e,...c})=>{const{horizontal:t}=s.useContext(i);return a.jsx("div",{...c,className:o.clsx(r.cardActions,t&&r.horizontal),children:e})},v=({children:e,className:c,...t})=>{const{titleId:n}=s.useContext(i);return a.jsx(C.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...t,"aria-labelledby":n,className:o.clsx(r.cardActionArea,c),children:e})},N=({as:e="img",className:c,...t})=>a.jsx(e,{...t,className:o.clsx(r.cardImage,c)}),q=({children:e,as:c,...t})=>{const n=c||x.$4f118338184dc1d9$export$a6c7ac8248d6e38a;return a.jsxs(n,{...t,className:o.clsx(r.cardLink,t.className),children:[e,a.jsx(_.ArrowRight,{className:r.cardLinkIcon,size:24})]})};exports.Card=z;exports.CardActionArea=v;exports.CardActions=p;exports.CardContent=L;exports.CardImage=N;exports.CardLink=q;exports.CardTitle=$;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { $ as f } from "./utils-
|
|
4
|
-
import { $ as i } from "./Input-
|
|
5
|
-
import './assets/CharacterCounter.css';const
|
|
6
|
-
characterCounter:
|
|
3
|
+
import { $ as f } from "./utils-KYuflGZt.js";
|
|
4
|
+
import { $ as i } from "./Input-BnpBRnJz.js";
|
|
5
|
+
import './assets/CharacterCounter.css';const $ = "_characterCounter_4224k_4", m = {
|
|
6
|
+
characterCounter: $
|
|
7
7
|
}, l = d.forwardRef((t, c) => {
|
|
8
8
|
[t] = f(t, c, i);
|
|
9
9
|
const { maxLength: r, value: e, isLonely: n } = t, { length: a } = (e == null ? void 0 : e.toString()) ?? "", o = r !== void 0;
|
|
10
10
|
return /* @__PURE__ */ s(
|
|
11
11
|
"span",
|
|
12
12
|
{
|
|
13
|
-
className:
|
|
13
|
+
className: m.characterCounter,
|
|
14
14
|
"data-exceeded": o && a > r || void 0,
|
|
15
15
|
"data-lonely": n || void 0,
|
|
16
16
|
children: o ? `${a} / ${r}` : a
|
|
@@ -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-BM2vxlNA.cjs"),d=require("./Input-DIhhWEPW.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),$="_characterCounter_4224k_4",b={characterCounter:$},h=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=h;
|
|
@@ -2,29 +2,29 @@ import { jsxs as E, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import * as x from "react";
|
|
3
3
|
import G, { useEffect as D, useRef as N } from "react";
|
|
4
4
|
import { a as L } from "./RSPContexts-BW2SEIqe.js";
|
|
5
|
-
import { $ as j, c as A } from "./utils-
|
|
5
|
+
import { $ as j, c as A } from "./utils-KYuflGZt.js";
|
|
6
6
|
import { $ as M } from "./Form-CXcEMuBf.js";
|
|
7
7
|
import { c as g } from "./clsx-OuTLNxxd.js";
|
|
8
|
-
import { a as R } from "./mergeProps-
|
|
9
|
-
import { $ as F } from "./VisuallyHidden-
|
|
10
|
-
import { a as H, $ as S, b as W, d as _, e as z } from "./useFormValidation-
|
|
11
|
-
import { b as I } from "./usePress-
|
|
8
|
+
import { a as R } from "./mergeProps-BYJQ6N1s.js";
|
|
9
|
+
import { $ as F } from "./VisuallyHidden-BKslUoMJ.js";
|
|
10
|
+
import { a as H, $ as S, b as W, d as _, e as z } from "./useFormValidation-BW2NSTM4.js";
|
|
11
|
+
import { b as I } from "./usePress-B_jgTf4k.js";
|
|
12
12
|
import { $ as J } from "./filterDOMProps-D6KHYVBX.js";
|
|
13
|
-
import { a as K } from "./useFocusable-
|
|
13
|
+
import { a as K } from "./useFocusable-ZjCKo1ed.js";
|
|
14
14
|
import { $ as C } from "./useToggleState-Bz5rAf4C.js";
|
|
15
|
-
import { $ as Q } from "./useHover-
|
|
16
|
-
import { $ as T } from "./useFocusRing-
|
|
15
|
+
import { $ as Q } from "./useHover-D8fja4GW.js";
|
|
16
|
+
import { $ as T } from "./useFocusRing-HoJn20X5.js";
|
|
17
17
|
import './assets/Checkbox.css';function U(e, i, a) {
|
|
18
|
-
let { isDisabled: d = !1, isReadOnly: l = !1, value: o, name: s, children: t, "aria-label": n, "aria-labelledby": c, validationState: $ = "valid", isInvalid: f } = e, m = (
|
|
19
|
-
|
|
18
|
+
let { isDisabled: d = !1, isReadOnly: l = !1, value: o, name: s, children: t, "aria-label": n, "aria-labelledby": c, validationState: $ = "valid", isInvalid: f } = e, m = (v) => {
|
|
19
|
+
v.stopPropagation(), i.setSelected(v.target.checked);
|
|
20
20
|
}, P = t != null, u = n != null || c != null;
|
|
21
21
|
!P && !u && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
22
|
-
let { pressProps: h, isPressed:
|
|
22
|
+
let { pressProps: h, isPressed: b } = I({
|
|
23
23
|
isDisabled: d
|
|
24
24
|
}), { pressProps: y, isPressed: V } = I({
|
|
25
25
|
onPress() {
|
|
26
|
-
var
|
|
27
|
-
i.toggle(), (
|
|
26
|
+
var v;
|
|
27
|
+
i.toggle(), (v = a.current) === null || v === void 0 || v.focus();
|
|
28
28
|
},
|
|
29
29
|
isDisabled: d || l
|
|
30
30
|
}), { focusableProps: q } = K(e, a), p = R(h, q), w = J(e, {
|
|
@@ -32,7 +32,7 @@ import './assets/Checkbox.css';function U(e, i, a) {
|
|
|
32
32
|
});
|
|
33
33
|
return H(a, i.isSelected, i.setSelected), {
|
|
34
34
|
labelProps: R(y, {
|
|
35
|
-
onClick: (
|
|
35
|
+
onClick: (v) => v.preventDefault()
|
|
36
36
|
}),
|
|
37
37
|
inputProps: R(w, {
|
|
38
38
|
"aria-invalid": f || $ === "invalid" || void 0,
|
|
@@ -49,7 +49,7 @@ import './assets/Checkbox.css';function U(e, i, a) {
|
|
|
49
49
|
...p
|
|
50
50
|
}),
|
|
51
51
|
isSelected: i.isSelected,
|
|
52
|
-
isPressed:
|
|
52
|
+
isPressed: b || V,
|
|
53
53
|
isDisabled: d,
|
|
54
54
|
isReadOnly: l,
|
|
55
55
|
isInvalid: f || $ === "invalid"
|
|
@@ -68,7 +68,7 @@ function B(e, i, a) {
|
|
|
68
68
|
D(() => {
|
|
69
69
|
a.current && (a.current.indeterminate = !!P);
|
|
70
70
|
});
|
|
71
|
-
let { pressProps:
|
|
71
|
+
let { pressProps: b } = I({
|
|
72
72
|
isDisabled: f || m,
|
|
73
73
|
onPress() {
|
|
74
74
|
let { [_]: y } = e, { commitValidation: V } = y || d;
|
|
@@ -76,7 +76,7 @@ function B(e, i, a) {
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
return {
|
|
79
|
-
labelProps: R(t,
|
|
79
|
+
labelProps: R(t, b),
|
|
80
80
|
inputProps: {
|
|
81
81
|
...n,
|
|
82
82
|
checked: c,
|
|
@@ -97,8 +97,8 @@ function Y(e, i, a) {
|
|
|
97
97
|
const d = C({
|
|
98
98
|
isReadOnly: e.isReadOnly || i.isReadOnly,
|
|
99
99
|
isSelected: i.isSelected(e.value),
|
|
100
|
-
onChange(
|
|
101
|
-
|
|
100
|
+
onChange(b) {
|
|
101
|
+
b ? i.addValue(e.value) : i.removeValue(e.value), e.onChange && e.onChange(b);
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
let { name: l, descriptionId: o, errorMessageId: s, validationBehavior: t } = X.get(i);
|
|
@@ -128,8 +128,8 @@ function Y(e, i, a) {
|
|
|
128
128
|
displayValidation: P,
|
|
129
129
|
resetValidation: i.resetValidation,
|
|
130
130
|
commitValidation: i.commitValidation,
|
|
131
|
-
updateValidation(
|
|
132
|
-
$.current =
|
|
131
|
+
updateValidation(b) {
|
|
132
|
+
$.current = b, f();
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}, d, a);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/Checkbox.css');const s=require("react/jsx-runtime"),g=require("react"),G=require("./RSPContexts-D8hmBfGm.cjs"),
|
|
1
|
+
"use strict";require('./assets/Checkbox.css');const s=require("react/jsx-runtime"),g=require("react"),G=require("./RSPContexts-D8hmBfGm.cjs"),S=require("./utils-BM2vxlNA.cjs"),F=require("./Form-BuOomA4T.cjs"),D=require("./clsx-C11secjj.cjs"),P=require("./mergeProps-C7Sx47fA.cjs"),N=require("./VisuallyHidden-DxDOcIsh.cjs"),m=require("./useFormValidation-DSRwb9US.cjs"),V=require("./usePress-BOGIOlm8.cjs"),M=require("./filterDOMProps-BS2lrgFA.cjs"),L=require("./useFocusable-DbmryjUH.cjs"),O=require("./useToggleState-DoIkSQdj.cjs"),A=require("./useHover-CaFzQrR_.cjs"),H=require("./useFocusRing-BM-zcH6L.cjs");function T(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=T(g);function z(e,i,a){let{isDisabled:d=!1,isReadOnly:t=!1,value:r,name:o,children:n,"aria-label":l,"aria-labelledby":c,validationState:v="valid",isInvalid:u}=e,x=$=>{$.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:h,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:p}=L.$f645667febf57a63$export$4c014de7c8940b4c(e,a),w=P.$3ef42575df84b30b$export$9d1611c77c2fe928(h,p),E=M.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});return m.$99facab73266f662$export$5add1d006293d136(a,i.isSelected,i.setSelected),{labelProps:P.$3ef42575df84b30b$export$9d1611c77c2fe928(I,{onClick:$=>$.preventDefault()}),inputProps:P.$3ef42575df84b30b$export$9d1611c77c2fe928(E,{"aria-invalid":u||v==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":t||void 0,onChange:x,disabled:d,...r==null?{}:{value:r},name:o,type:"checkbox",...w}),isSelected:i.isSelected,isPressed:b||k,isDisabled:d,isReadOnly:t,isInvalid:u||v==="invalid"}}function C(e,i,a){let d=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:i.isSelected}),{isInvalid:t,validationErrors:r,validationDetails:o}=d.displayValidation,{labelProps:n,inputProps:l,isSelected:c,isPressed:v,isDisabled:u,isReadOnly:x}=z({...e,isInvalid:t},i,a);m.$e93e671b31057976$export$b8473d3665f3a75a(e,d,a);let{isIndeterminate:y,isRequired:f,validationBehavior:h="aria"}=e;g.useEffect(()=>{a.current&&(a.current.indeterminate=!!y)});let{pressProps:b}=V.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:u||x,onPress(){let{[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:I}=e,{commitValidation:k}=I||d;k()}});return{labelProps:P.$3ef42575df84b30b$export$9d1611c77c2fe928(n,b),inputProps:{...l,checked:c,"aria-required":f&&h==="aria"||void 0,required:f&&h==="native"},isSelected:c,isPressed:v,isDisabled:u,isReadOnly:x,isInvalid:t,validationErrors:r,validationDetails:o}}const _=new WeakMap;function W(e,i,a){const d=O.$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:o,validationBehavior:n}=_.get(i);var l;n=(l=e.validationBehavior)!==null&&l!==void 0?l:n;let{realtimeValidation:c}=m.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:d.isSelected,name:void 0,validationBehavior:"aria"}),v=g.useRef(m.$e5be200c675c3b3a$export$dad6ae84456c676a),u=()=>{i.setInvalid(e.value,c.isInvalid?c:v.current)};g.useEffect(u);let x=i.realtimeValidation.isInvalid?i.realtimeValidation:c,y=n==="native"?i.displayValidation:x;var f;let h=C({...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,[m.$e5be200c675c3b3a$export$a763b9476acd3eb]:{realtimeValidation:x,displayValidation:y,resetValidation:i.resetValidation,commitValidation:i.commitValidation,updateValidation(b){v.current=b,u()}}},d,a);return{...h,inputProps:{...h.inputProps,"aria-describedby":[e["aria-describedby"],i.isInvalid?o:null,r].filter(Boolean).join(" ")||void 0}}}const j=g.createContext(null),J="_checkboxInner_5vl7s_4",K="_checkbox_5vl7s_4",Q="_checkboxGroup_5vl7s_124",q={checkboxInner:J,checkbox:K,checkboxGroup:Q},B=R.forwardRef((e,i)=>{const{hoverProps:a,isHovered:d}=e.hoverResult,{pressProps:t,isPressed:r}=e.pressResult,{isFocused:o,isFocusVisible:n,focusProps:l}=e.focusRingAria;return s.jsxs("label",{ref:i,...P.$3ef42575df84b30b$export$9d1611c77c2fe928(a,t,e.labelProps),slot:e.slot||void 0,className:D.clsx(q.checkbox,e.className),"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":o||void 0,"data-focus-visible":n||void 0,"data-required":e.isRequired||void 0,children:[s.jsx("div",{className:D.clsx(q.checkboxInner),children:s.jsx("svg",{width:16,height:16,viewBox:"0 0 18 18","aria-hidden":"true",children:e.isIndeterminate?s.jsx("rect",{x:4,y:8,width:10,height:2}):s.jsx("polyline",{points:"3,9 7,13 15,4"})})}),s.jsx(N.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:s.jsx("input",{...P.$3ef42575df84b30b$export$9d1611c77c2fe928(e.inputProps,l),ref:e.inputRef})}),e.children]})}),U=R.forwardRef((e,i)=>{const a=W({...e,value:e.value||""},e.state,e.inputRef);return s.jsx(B,{...e,...a,ref:i})}),X=R.forwardRef((e,i)=>{const a=C(e,O.$3017fa7ffdddec74$export$8042c6c013fd5226(e),e.inputRef);return s.jsx(B,{...e,...a,ref:i})}),Y=R.forwardRef((e,i)=>{[e,i]=S.$64fa3d84918910a7$export$29f1550f4b0d4415(e,i,G.$4e85f108e88277b8$export$b085522c77523c51);const a=S.$64fa3d84918910a7$export$fabf2dc03a41866e(F.$d3e0e05bdfcf66bd$export$c24727297075ec6a),d=e.validationBehavior??(a==null?void 0:a.validationBehavior)??"native",t=R.useContext(j),r=R.useRef(null),o=A.$6179b936705e76d3$export$ae780daf29e6d456(e),n=V.$f6c31cce2adf654f$export$45712eceda6fad21({ref:i,isDisabled:e.isDisabled}),l=H.$f7dceffc5ad7768b$export$4e328f61c538687f();return t?s.jsx(U,{...e,state:t,inputRef:r,hoverResult:o,pressResult:n,focusRingAria:l,validationBehavior:d}):s.jsx(X,{...e,inputRef:r,hoverResult:o,pressResult:n,focusRingAria:l,validationBehavior:d})});exports.$1ae600c947479353$export$ec98120685d4f57d=_;exports.Checkbox=Y;exports.CheckboxGroupContext=j;exports.styles=q;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as n, jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import { a as g, L as P } from "./Label-
|
|
3
|
-
import { T as V } from "./Text-
|
|
2
|
+
import { a as g, L as P } from "./Label-ByWt6Lfh.js";
|
|
3
|
+
import { T as V } from "./Text-BUDAzDjW.js";
|
|
4
4
|
import * as b from "react";
|
|
5
5
|
import { useRef as C } from "react";
|
|
6
|
-
import { $ as
|
|
7
|
-
import { $ as D, F as I } from "./FieldError-
|
|
8
|
-
import { $ as R, c as k } from "./useFormValidation-
|
|
6
|
+
import { $ as S, C as m, s as y, a as p } from "./Checkbox-BN_3F2Hl.js";
|
|
7
|
+
import { $ as D, F as I } from "./FieldError-BlKkw9YL.js";
|
|
8
|
+
import { $ as R, c as k } from "./useFormValidation-BW2NSTM4.js";
|
|
9
9
|
import { $ as F } from "./useControlledState-u436Wbp1.js";
|
|
10
|
-
import { a as A } from "./mergeProps-
|
|
10
|
+
import { a as A } from "./mergeProps-BYJQ6N1s.js";
|
|
11
11
|
import { $ as E } from "./filterDOMProps-D6KHYVBX.js";
|
|
12
|
-
import { $ as M } from "./useField-
|
|
13
|
-
import { $ as O } from "./useFocusWithin-
|
|
14
|
-
import { u as W } from "./useLocalizedStringFormatter-
|
|
12
|
+
import { $ as M } from "./useField-5CEdtfab.js";
|
|
13
|
+
import { $ as O } from "./useFocusWithin-Cn18Myw6.js";
|
|
14
|
+
import { u as W } from "./useLocalizedStringFormatter-aOhh7wdl.js";
|
|
15
15
|
function B(e, a) {
|
|
16
16
|
let { isDisabled: t, name: f, validationBehavior: d = "aria" } = e, { isInvalid: o, validationErrors: s, validationDetails: c } = a.displayValidation, { labelProps: l, fieldProps: i, descriptionProps: r, errorMessageProps: u } = M({
|
|
17
17
|
...e,
|
|
@@ -21,7 +21,7 @@ function B(e, a) {
|
|
|
21
21
|
isInvalid: o,
|
|
22
22
|
errorMessage: e.errorMessage || s
|
|
23
23
|
});
|
|
24
|
-
|
|
24
|
+
S.set(a, {
|
|
25
25
|
name: f,
|
|
26
26
|
descriptionId: r.id,
|
|
27
27
|
errorMessageId: u.id,
|
|
@@ -115,7 +115,7 @@ function ae(e) {
|
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
...f,
|
|
118
|
-
className:
|
|
118
|
+
className: y.checkboxGroup,
|
|
119
119
|
children: [
|
|
120
120
|
/* @__PURE__ */ n(g, { popover: e.popover, children: e.label && /* @__PURE__ */ n(P, { ...d, children: e.label }) }),
|
|
121
121
|
e.description && /* @__PURE__ */ n(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),v=require("./Label-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),v=require("./Label-COpr4xVt.cjs"),C=require("./Text-DA_gK6a2.cjs"),m=require("react"),f=require("./Checkbox-CZtCj4yR.cjs"),x=require("./FieldError-BvU0sueN.cjs"),$=require("./useFormValidation-DSRwb9US.cjs"),V=require("./useControlledState-D0L6S_5r.cjs"),y=require("./mergeProps-C7Sx47fA.cjs"),j=require("./filterDOMProps-BS2lrgFA.cjs"),q=require("./useField-CoQAzygg.cjs"),k=require("./useFocusWithin-o0WjCpEB.cjs"),D=require("./useLocalizedStringFormatter-BSac43NO.cjs");function F(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,n.get?n:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const h=F(m);function O(e,t){let{isDisabled:l,name:n,validationBehavior:d="aria"}=e,{isInvalid:s,validationErrors:o,validationDetails:u}=t.displayValidation,{labelProps:a,fieldProps:i,descriptionProps:r,errorMessageProps:b}=q.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span",isInvalid:s,errorMessage:e.errorMessage||o});f.$1ae600c947479353$export$ec98120685d4f57d.set(t,{name:n,descriptionId:r.id,errorMessageId:b.id,validationBehavior:d});let P=j.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),{focusWithinProps:S}=k.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});return{groupProps:y.$3ef42575df84b30b$export$9d1611c77c2fe928(P,{role:"group","aria-disabled":l||void 0,...i,...S}),labelProps:a,descriptionProps:r,errorMessageProps:b,isInvalid:s,validationErrors:o,validationDetails:u}}function R(e={}){let[t,l]=V.$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue||[],e.onChange),n=!!e.isRequired&&t.length===0,d=m.useRef(new Map),s=$.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:t}),o=s.displayValidation.isInvalid;var u;return{...s,value:t,setValue(i){e.isReadOnly||e.isDisabled||l(i)},isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isSelected(i){return t.includes(i)},addValue(i){e.isReadOnly||e.isDisabled||t.includes(i)||l(t.concat(i))},removeValue(i){e.isReadOnly||e.isDisabled||t.includes(i)&&l(t.filter(r=>r!==i))},toggleValue(i){e.isReadOnly||e.isDisabled||(t.includes(i)?l(t.filter(r=>r!==i)):l(t.concat(i)))},setInvalid(i,r){let b=new Map(d.current);r.isInvalid?b.set(i,r):b.delete(i),d.current=b,s.updateValidation($.$e5be200c675c3b3a$export$75ee7c75d68f5b0e(...b.values()))},validationState:(u=e.validationState)!==null&&u!==void 0?u:o?"invalid":null,isInvalid:o,isRequired:n}}const I=(e,{value:t})=>{const l=h.Children.toArray(e).filter(a=>h.isValidElement(a)&&a.type===f.Checkbox),n=h.Children.count(l),d=h.Children.toArray(e).filter(a=>h.isValidElement(a)).filter(a=>!!a&&a.type===f.Checkbox).map(a=>a.props.value),s=t.length===0,o=t.length===n;return{allSelected:o,someSelected:!s&&!o,checkboxValues:d}},g=({state:e,errorMessage:t})=>c.jsx(x.$ee014567cb39d3f0$export$ff05c3ac10437e03.Provider,{value:e.displayValidation,children:c.jsx(x.FieldError,{children:t})}),M={selectAll:"Select all"},E={selectAll:"Välj alla"},A={en:M,sv:E};function W(e){const t=R(e),l=D.useLocalizedStringFormatter(A),{groupProps:n,labelProps:d,descriptionProps:s}=O(e,t),{allSelected:o,someSelected:u,checkboxValues:a}=I(e.children,t),i=r=>{t.setValue(r?a:[])};return c.jsxs("div",{...n,className:f.styles.checkboxGroup,children:[c.jsx(v.LabelWrapper,{popover:e.popover,children:e.label&&c.jsx(v.Label,{...d,children:e.label})}),e.description&&c.jsx(C.Text,{slot:"description",...s,children:e.description}),e.errorPosition==="top"&&c.jsx(g,{...e,state:t}),e.showSelectAll&&c.jsx(f.Checkbox,{isSelected:o,isIndeterminate:u,onChange:i,children:e.selectAllLabel||l.format("selectAll")}),c.jsx(f.CheckboxGroupContext.Provider,{value:t,children:e.children}),e.errorPosition==="bottom"&&c.jsx(g,{...e,state:t})]})}exports.CheckboxGroup=W;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const R=require("./Hidden-BxRZGdEW.cjs"),V=require("react-dom"),m=require("./useFocusable-D7I1ujkW.cjs"),s=require("react"),K=require("./SSRProvider-Bc-sMhsT.cjs"),P=require("./mergeProps-B5KXZAI3.cjs"),q=require("./index-Dsz3aiWt.cjs");class v{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new v(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=t}}class x{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),l=(n==null?void 0:n.firstChildKey)!=null?t.get(n.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?t.get(l.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!=="item"&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!n}UNSTABLE_filter(e){let t=new x,n=null;for(let l of this)if(l.type==="section"&&l.hasChildNodes){let i=l.clone(),d=null;for(let u of this.getChildren(l.key))if(g(u,e,this,t)){let o=u.clone();d==null&&(i.firstChildKey=o.key),t.firstKey==null&&(t.firstKey=i.key),d&&d.parentKey===o.parentKey?(d.nextKey=o.key,o.prevKey=d.key):o.prevKey=null,o.nextKey=null,t.addNode(o),d=o}d&&(d.type!=="header"?(i.lastChildKey=d.key,n==null?i.prevKey=null:(n.type==="section"||n.type==="separator")&&(n.nextKey=i.key,i.prevKey=n.key),i.nextKey=null,n=i,t.addNode(i)):(t.firstKey===i.key&&(t.firstKey=null),t.removeNode(d.key)))}else if(l.type==="separator"){let i=l.clone();i.nextKey=null,(n==null?void 0:n.type)==="section"&&(n.nextKey=i.key,i.prevKey=n.key,n=i,t.addNode(i))}else{let i=l.clone();g(i,e,this,t)&&(t.firstKey==null&&(t.firstKey=i.key),n!=null&&n.type!=="section"&&n.type!=="separator"&&n.parentKey===i.parentKey?(n.nextKey=i.key,i.prevKey=n.key):i.prevKey=null,i.nextKey=null,t.addNode(i),n=i)}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let l;n.prevKey!=null&&(l=t.getItem(n.prevKey),l.nextKey=null),t.removeNode(n.key),n=l}return t.lastKey=(n==null?void 0:n.key)||null,t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function g(r,e,t,n){if(r.type==="subdialogtrigger"||r.type==="submenutrigger"){let l=[...t.getChildren(r.key)][0];if(l&&e(l.textValue)){let i=l.clone();return n.addNode(i),!0}else return!1}else return r.type==="header"?!0:e(r.textValue)}class k{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class p extends k{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof p?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,t,n;let l=this.nextVisibleSibling,i=this.getMutableNode();i.index=this.index,i.level=this.level,i.parentKey=this.parentNode instanceof p?this.parentNode.node.key:null;var d;i.prevKey=(d=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&d!==void 0?d:null;var u;i.nextKey=(u=l==null?void 0:l.node.key)!==null&&u!==void 0?u:null,i.hasChildNodes=!!this.firstChild;var o;i.firstChildKey=(o=(t=this.firstVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&o!==void 0?o:null;var a;if(i.lastChildKey=(a=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&a!==void 0?a:null,(i.colSpan!=null||i.colIndex!=null)&&l){var c,h;let f=((c=i.colIndex)!==null&&c!==void 0?c:i.index)+((h=i.colSpan)!==null&&h!==void 0?h:1);if(f!==l.node.colIndex){let E=l.getMutableNode();E.colIndex=f}}}setProps(e,t,n,l){let i=this.getMutableNode(),{value:d,textValue:u,id:o,...a}=e;if(a.ref=t,i.props=a,i.rendered=n,i.render=l,i.value=d,i.textValue=u||(typeof a.children=="string"?a.children:"")||e["aria-label"]||"",o!=null&&o!==i.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");i.key=o}a.colSpan!=null&&(i.colSpan=a.colSpan),this.hasSetProps=!0,this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(t){let n=t==="none";if(e.isHidden!==n){var l,i;(((l=e.parentNode)===null||l===void 0?void 0:l.firstVisibleChild)===e||((i=e.parentNode)===null||i===void 0?void 0:i.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let d=e.previousVisibleSibling,u=e.nextVisibleSibling;d&&e.ownerDocument.markDirty(d),u&&e.ownerDocument.markDirty(u),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new v(e,`react-aria-${++t.nodeId}`)}}class A extends k{get isConnected(){return this.isMounted}createElement(e){return new p(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let n of e)this.addNode(n);t.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let i of this.dirtyNodes)i instanceof p&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof p&&(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,n,l;this.nextCollection.commit((n=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&n!==void 0?n:null,(l=(t=this.lastVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&l!==void 0?l:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function b(r){let{children:e,items:t,idScope:n,addIdAndValue:l,dependencies:i=[]}=r,d=s.useMemo(()=>new WeakMap,i);return s.useMemo(()=>{if(t&&typeof e=="function"){let a=[];for(let c of t){let h=d.get(c);if(!h){h=e(c);var u,o;let f=(o=(u=h.props.id)!==null&&u!==void 0?u:c.key)!==null&&o!==void 0?o:c.id;if(f==null)throw new Error("Could not determine key for item");n&&(f=n+":"+f),h=s.cloneElement(h,l?{key:f,id:f,value:c}:{key:f}),d.set(c,h)}a.push(h)}return a}else if(typeof e!="function")return e},[e,t,d,n,l])}const w=s.createContext(!1),y=s.createContext(null);function H(r){if(s.useContext(y))return r.content;let{collection:t,document:n}=F(r.createCollection);return s.createElement(s.Fragment,null,s.createElement(R.$f39a9eba43920ace$export$8dc98ba7eadeaa56,null,s.createElement(y.Provider,{value:n},r.content)),s.createElement(z,{render:r.children,collection:t}))}function z({collection:r,render:e}){return e(r)}function B(r,e,t){let n=K.$b5e257d569688ac6$export$535bd6ca7f90a273(),l=s.useRef(n);l.current=n;let i=s.useCallback(()=>l.current?t():e(),[e,t]);return q.shimExports.useSyncExternalStore(r,i)}const U=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:B;function F(r){let[e]=s.useState(()=>new A((r==null?void 0:r())||new x)),t=s.useCallback(d=>e.subscribe(d),[e]),n=s.useCallback(()=>{let d=e.getCollection();return e.isSSR&&e.resetAfterSSR(),d},[e]),l=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=U(t,n,l);return P.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const C=s.createContext(null);function I(r,e,t,n,l,i){let d=s.useCallback(o=>{o==null||o.setProps(e,t,n,i)},[e,t,n,i]),u=s.useContext(C);if(u){let o=u.ownerDocument.nodesByProps.get(e);return o||(o=u.ownerDocument.createElement(r),o.setProps(e,t,n,i),u.appendChild(o),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,o)),l?s.createElement(C.Provider,{value:o},l):null}return s.createElement(r,{ref:d},l)}function L(r,e){let t=({node:l})=>e(l.props,l.props.ref,l),n=s.forwardRef((l,i)=>{let d=s.useContext(m.$f645667febf57a63$export$f9762fab77588ecb);if(!s.useContext(w)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,i)}return I(r,l,i,"children"in l?l.children:null,null,o=>s.createElement(m.$f645667febf57a63$export$f9762fab77588ecb.Provider,{value:d},s.createElement(t,{node:o})))});return n.displayName=e.name,n}function W(r,e,t=N){let n=({node:i})=>e(i.props,i.props.ref,i),l=s.forwardRef((i,d)=>{let u=t(i);var o;return(o=I(r,i,d,null,u,a=>s.createElement(n,{node:a})))!==null&&o!==void 0?o:s.createElement(s.Fragment,null)});return l.displayName=e.name,l}function N(r){return b({...r,addIdAndValue:!0})}const S=s.createContext(null);function T(r){let e=s.useContext(S),t=((e==null?void 0:e.dependencies)||[]).concat(r.dependencies),n=r.idScope||(e==null?void 0:e.idScope),l=N({...r,idScope:n,dependencies:t});return s.useContext(y)&&(l=s.createElement(O,null,l)),e=s.useMemo(()=>({dependencies:t,idScope:n}),[n,...t]),s.createElement(S.Provider,{value:e},l)}function O({children:r}){let e=s.useContext(y),t=s.useMemo(()=>s.createElement(y.Provider,{value:null},s.createElement(w.Provider,{value:!0},r)),[r]);return K.$b5e257d569688ac6$export$535bd6ca7f90a273()?s.createElement(C.Provider,{value:e},t):V.createPortal(t,e)}const _=s.createContext(null),M={CollectionRoot({collection:r,renderDropIndicator:e}){return $(r,null,e)},CollectionBranch({collection:r,parent:e,renderDropIndicator:t}){return $(r,e,t)}};function $(r,e,t){return b({items:e?r.getChildren(e.key):r,dependencies:[t],children(n){let l=n.render(n);return!t||n.type!=="item"?l:s.createElement(s.Fragment,null,t({type:"item",key:n.key,dropPosition:"before"}),l,D(r,n,t))}})}function D(r,e,t){let n=e.key,l=r.getKeyAfter(n),i=l!=null?r.getItem(l):null;for(;i!=null&&i.type!=="item";)l=r.getKeyAfter(i.key),i=l!=null?r.getItem(l):null;let d=e.nextKey!=null?r.getItem(e.nextKey):null;for(;d!=null&&d.type!=="item";)d=d.nextKey!=null?r.getItem(d.nextKey):null;let u=[];if(d==null){let o=e;for(;o&&(!i||o.parentKey!==i.parentKey&&i.level<o.level);){let a=t({type:"item",key:o.key,dropPosition:"after"});s.isValidElement(a)&&u.push(s.cloneElement(a,{key:`${o.key}-after`})),o=o.parentKey!=null?r.getItem(o.parentKey):null}}return u}const G=s.createContext(M);function J(r){return s.useMemo(()=>r!=null?new Set([r]):null,[r])}exports.$23b9f4fcf0fe224b$export$408d25a4e12db025=x;exports.$23b9f4fcf0fe224b$export$d68d59712b04d9d1=v;exports.$7135fc7d473fd974$export$2dbbd341daed716d=D;exports.$7135fc7d473fd974$export$4feb769f8ddf26c5=G;exports.$7135fc7d473fd974$export$90e00781bc59d8f9=J;exports.$7135fc7d473fd974$export$a164736487e3f0ae=M;exports.$7135fc7d473fd974$export$d40e14dec8b060a8=_;exports.$e1995378a142960e$export$18af5c7a9e9b3664=L;exports.$e1995378a142960e$export$bf788dd355e3a401=H;exports.$e1995378a142960e$export$e953bb1cd0f19726=W;exports.$e1995378a142960e$export$fb8073518f34e6ec=T;exports.$e948873055cbafe4$export$727c8fc270210f13=b;
|
|
1
|
+
"use strict";const R=require("./Hidden-BxRZGdEW.cjs"),V=require("react-dom"),m=require("./useFocusable-DbmryjUH.cjs"),s=require("react"),K=require("./SSRProvider-DZRLwxPS.cjs"),P=require("./mergeProps-C7Sx47fA.cjs"),q=require("./index-D97L3EBk.cjs");class v{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new v(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=t}}class x{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),l=(n==null?void 0:n.firstChildKey)!=null?t.get(n.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?t.get(l.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!=="item"&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!n}UNSTABLE_filter(e){let t=new x,n=null;for(let l of this)if(l.type==="section"&&l.hasChildNodes){let i=l.clone(),d=null;for(let u of this.getChildren(l.key))if(S(u,e,this,t)){let o=u.clone();d==null&&(i.firstChildKey=o.key),t.firstKey==null&&(t.firstKey=i.key),d&&d.parentKey===o.parentKey?(d.nextKey=o.key,o.prevKey=d.key):o.prevKey=null,o.nextKey=null,t.addNode(o),d=o}d&&(d.type!=="header"?(i.lastChildKey=d.key,n==null?i.prevKey=null:(n.type==="section"||n.type==="separator")&&(n.nextKey=i.key,i.prevKey=n.key),i.nextKey=null,n=i,t.addNode(i)):(t.firstKey===i.key&&(t.firstKey=null),t.removeNode(d.key)))}else if(l.type==="separator"){let i=l.clone();i.nextKey=null,(n==null?void 0:n.type)==="section"&&(n.nextKey=i.key,i.prevKey=n.key,n=i,t.addNode(i))}else{let i=l.clone();S(i,e,this,t)&&(t.firstKey==null&&(t.firstKey=i.key),n!=null&&n.type!=="section"&&n.type!=="separator"&&n.parentKey===i.parentKey?(n.nextKey=i.key,i.prevKey=n.key):i.prevKey=null,i.nextKey=null,t.addNode(i),n=i)}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let l;n.prevKey!=null&&(l=t.getItem(n.prevKey),l.nextKey=null),t.removeNode(n.key),n=l}return t.lastKey=(n==null?void 0:n.key)||null,t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function S(r,e,t,n){if(r.type==="subdialogtrigger"||r.type==="submenutrigger"){let l=[...t.getChildren(r.key)][0];if(l&&e(l.textValue)){let i=l.clone();return n.addNode(i),!0}else return!1}else return r.type==="header"?!0:e(r.textValue)}class k{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class p extends k{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof p?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,t,n;let l=this.nextVisibleSibling,i=this.getMutableNode();i.index=this.index,i.level=this.level,i.parentKey=this.parentNode instanceof p?this.parentNode.node.key:null;var d;i.prevKey=(d=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&d!==void 0?d:null;var u;i.nextKey=(u=l==null?void 0:l.node.key)!==null&&u!==void 0?u:null,i.hasChildNodes=!!this.firstChild;var o;i.firstChildKey=(o=(t=this.firstVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&o!==void 0?o:null;var a;if(i.lastChildKey=(a=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&a!==void 0?a:null,(i.colSpan!=null||i.colIndex!=null)&&l){var c,h;let f=((c=i.colIndex)!==null&&c!==void 0?c:i.index)+((h=i.colSpan)!==null&&h!==void 0?h:1);if(f!==l.node.colIndex){let E=l.getMutableNode();E.colIndex=f}}}setProps(e,t,n,l){let i=this.getMutableNode(),{value:d,textValue:u,id:o,...a}=e;if(a.ref=t,i.props=a,i.rendered=n,i.render=l,i.value=d,i.textValue=u||(typeof a.children=="string"?a.children:"")||e["aria-label"]||"",o!=null&&o!==i.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");i.key=o}a.colSpan!=null&&(i.colSpan=a.colSpan),this.hasSetProps=!0,this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(t){let n=t==="none";if(e.isHidden!==n){var l,i;(((l=e.parentNode)===null||l===void 0?void 0:l.firstVisibleChild)===e||((i=e.parentNode)===null||i===void 0?void 0:i.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let d=e.previousVisibleSibling,u=e.nextVisibleSibling;d&&e.ownerDocument.markDirty(d),u&&e.ownerDocument.markDirty(u),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new v(e,`react-aria-${++t.nodeId}`)}}class A extends k{get isConnected(){return this.isMounted}createElement(e){return new p(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let n of e)this.addNode(n);t.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let i of this.dirtyNodes)i instanceof p&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof p&&(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,n,l;this.nextCollection.commit((n=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&n!==void 0?n:null,(l=(t=this.lastVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&l!==void 0?l:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function C(r){let{children:e,items:t,idScope:n,addIdAndValue:l,dependencies:i=[]}=r,d=s.useMemo(()=>new WeakMap,i);return s.useMemo(()=>{if(t&&typeof e=="function"){let a=[];for(let c of t){let h=d.get(c);if(!h){h=e(c);var u,o;let f=(o=(u=h.props.id)!==null&&u!==void 0?u:c.key)!==null&&o!==void 0?o:c.id;if(f==null)throw new Error("Could not determine key for item");n&&(f=n+":"+f),h=s.cloneElement(h,l?{key:f,id:f,value:c}:{key:f}),d.set(c,h)}a.push(h)}return a}else if(typeof e!="function")return e},[e,t,d,n,l])}const w=s.createContext(!1),y=s.createContext(null);function H(r){if(s.useContext(y))return r.content;let{collection:t,document:n}=F(r.createCollection);return s.createElement(s.Fragment,null,s.createElement(R.$f39a9eba43920ace$export$8dc98ba7eadeaa56,null,s.createElement(y.Provider,{value:n},r.content)),s.createElement(z,{render:r.children,collection:t}))}function z({collection:r,render:e}){return e(r)}function B(r,e,t){let n=K.$b5e257d569688ac6$export$535bd6ca7f90a273(),l=s.useRef(n);l.current=n;let i=s.useCallback(()=>l.current?t():e(),[e,t]);return q.shimExports.useSyncExternalStore(r,i)}const U=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:B;function F(r){let[e]=s.useState(()=>new A((r==null?void 0:r())||new x)),t=s.useCallback(d=>e.subscribe(d),[e]),n=s.useCallback(()=>{let d=e.getCollection();return e.isSSR&&e.resetAfterSSR(),d},[e]),l=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=U(t,n,l);return P.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const b=s.createContext(null);function I(r,e,t,n,l,i){let d=s.useCallback(o=>{o==null||o.setProps(e,t,n,i)},[e,t,n,i]),u=s.useContext(b);if(u){let o=u.ownerDocument.nodesByProps.get(e);return o||(o=u.ownerDocument.createElement(r),o.setProps(e,t,n,i),u.appendChild(o),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,o)),l?s.createElement(b.Provider,{value:o},l):null}return s.createElement(r,{ref:d},l)}function L(r,e){let t=({node:l})=>e(l.props,l.props.ref,l),n=s.forwardRef((l,i)=>{let d=s.useContext(m.$f645667febf57a63$export$f9762fab77588ecb);if(!s.useContext(w)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,i)}return I(r,l,i,"children"in l?l.children:null,null,o=>s.createElement(m.$f645667febf57a63$export$f9762fab77588ecb.Provider,{value:d},s.createElement(t,{node:o})))});return n.displayName=e.name,n}function W(r,e,t=N){let n=({node:i})=>e(i.props,i.props.ref,i),l=s.forwardRef((i,d)=>{let u=t(i);var o;return(o=I(r,i,d,null,u,a=>s.createElement(n,{node:a})))!==null&&o!==void 0?o:s.createElement(s.Fragment,null)});return l.displayName=e.name,l}function N(r){return C({...r,addIdAndValue:!0})}const g=s.createContext(null);function T(r){let e=s.useContext(g),t=((e==null?void 0:e.dependencies)||[]).concat(r.dependencies),n=r.idScope||(e==null?void 0:e.idScope),l=N({...r,idScope:n,dependencies:t});return s.useContext(y)&&(l=s.createElement(O,null,l)),e=s.useMemo(()=>({dependencies:t,idScope:n}),[n,...t]),s.createElement(g.Provider,{value:e},l)}function O({children:r}){let e=s.useContext(y),t=s.useMemo(()=>s.createElement(y.Provider,{value:null},s.createElement(w.Provider,{value:!0},r)),[r]);return K.$b5e257d569688ac6$export$535bd6ca7f90a273()?s.createElement(b.Provider,{value:e},t):V.createPortal(t,e)}const _=s.createContext(null),M={CollectionRoot({collection:r,renderDropIndicator:e}){return $(r,null,e)},CollectionBranch({collection:r,parent:e,renderDropIndicator:t}){return $(r,e,t)}};function $(r,e,t){return C({items:e?r.getChildren(e.key):r,dependencies:[t],children(n){let l=n.render(n);return!t||n.type!=="item"?l:s.createElement(s.Fragment,null,t({type:"item",key:n.key,dropPosition:"before"}),l,D(r,n,t))}})}function D(r,e,t){let n=e.key,l=r.getKeyAfter(n),i=l!=null?r.getItem(l):null;for(;i!=null&&i.type!=="item";)l=r.getKeyAfter(i.key),i=l!=null?r.getItem(l):null;let d=e.nextKey!=null?r.getItem(e.nextKey):null;for(;d!=null&&d.type!=="item";)d=d.nextKey!=null?r.getItem(d.nextKey):null;let u=[];if(d==null){let o=e;for(;o&&(!i||o.parentKey!==i.parentKey&&i.level<o.level);){let a=t({type:"item",key:o.key,dropPosition:"after"});s.isValidElement(a)&&u.push(s.cloneElement(a,{key:`${o.key}-after`})),o=o.parentKey!=null?r.getItem(o.parentKey):null}}return u}const G=s.createContext(M);function J(r){return s.useMemo(()=>r!=null?new Set([r]):null,[r])}exports.$23b9f4fcf0fe224b$export$408d25a4e12db025=x;exports.$23b9f4fcf0fe224b$export$d68d59712b04d9d1=v;exports.$7135fc7d473fd974$export$2dbbd341daed716d=D;exports.$7135fc7d473fd974$export$4feb769f8ddf26c5=G;exports.$7135fc7d473fd974$export$90e00781bc59d8f9=J;exports.$7135fc7d473fd974$export$a164736487e3f0ae=M;exports.$7135fc7d473fd974$export$d40e14dec8b060a8=_;exports.$e1995378a142960e$export$18af5c7a9e9b3664=L;exports.$e1995378a142960e$export$bf788dd355e3a401=H;exports.$e1995378a142960e$export$e953bb1cd0f19726=W;exports.$e1995378a142960e$export$fb8073518f34e6ec=T;exports.$e948873055cbafe4$export$727c8fc270210f13=C;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as H } from "./Hidden-
|
|
1
|
+
import { a as H } from "./Hidden-B5ir3Lei.js";
|
|
2
2
|
import { createPortal as z } from "react-dom";
|
|
3
|
-
import { c as K } from "./useFocusable-
|
|
3
|
+
import { c as K } from "./useFocusable-ZjCKo1ed.js";
|
|
4
4
|
import u, { useMemo as C, cloneElement as I, forwardRef as N, useContext as y, createContext as v, useCallback as m, useState as q, useRef as B, isValidElement as U } from "react";
|
|
5
|
-
import { $ as M } from "./SSRProvider-
|
|
6
|
-
import { $ as L } from "./mergeProps-
|
|
7
|
-
import { s as F } from "./index-
|
|
5
|
+
import { $ as M } from "./SSRProvider-D8lZ0o6A.js";
|
|
6
|
+
import { $ as L } from "./mergeProps-BYJQ6N1s.js";
|
|
7
|
+
import { s as F } from "./index-BSMrH_Du.js";
|
|
8
8
|
class b {
|
|
9
9
|
get childNodes() {
|
|
10
10
|
throw new Error("childNodes is not supported");
|
|
@@ -101,7 +101,7 @@ class S {
|
|
|
101
101
|
for (let l of this)
|
|
102
102
|
if (l.type === "section" && l.hasChildNodes) {
|
|
103
103
|
let i = l.clone(), o = null;
|
|
104
|
-
for (let d of this.getChildren(l.key)) if (
|
|
104
|
+
for (let d of this.getChildren(l.key)) if ($(d, e, this, t)) {
|
|
105
105
|
let s = d.clone();
|
|
106
106
|
o == null && (i.firstChildKey = s.key), t.firstKey == null && (t.firstKey = i.key), o && o.parentKey === s.parentKey ? (o.nextKey = s.key, s.prevKey = o.key) : s.prevKey = null, s.nextKey = null, t.addNode(s), o = s;
|
|
107
107
|
}
|
|
@@ -111,7 +111,7 @@ class S {
|
|
|
111
111
|
i.nextKey = null, (n == null ? void 0 : n.type) === "section" && (n.nextKey = i.key, i.prevKey = n.key, n = i, t.addNode(i));
|
|
112
112
|
} else {
|
|
113
113
|
let i = l.clone();
|
|
114
|
-
|
|
114
|
+
$(i, e, this, t) && (t.firstKey == null && (t.firstKey = i.key), n != null && n.type !== "section" && n.type !== "separator" && n.parentKey === i.parentKey ? (n.nextKey = i.key, i.prevKey = n.key) : i.prevKey = null, i.nextKey = null, t.addNode(i), n = i);
|
|
115
115
|
}
|
|
116
116
|
if ((n == null ? void 0 : n.type) === "separator" && n.nextKey === null) {
|
|
117
117
|
let l;
|
|
@@ -123,7 +123,7 @@ class S {
|
|
|
123
123
|
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function $(r, e, t, n) {
|
|
127
127
|
if (r.type === "subdialogtrigger" || r.type === "submenutrigger") {
|
|
128
128
|
let l = [
|
|
129
129
|
...t.getChildren(r.key)
|
|
@@ -478,9 +478,9 @@ function P(r) {
|
|
|
478
478
|
addIdAndValue: !0
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
|
-
const
|
|
481
|
+
const k = /* @__PURE__ */ v(null);
|
|
482
482
|
function oe(r) {
|
|
483
|
-
let e = y(
|
|
483
|
+
let e = y(k), t = ((e == null ? void 0 : e.dependencies) || []).concat(r.dependencies), n = r.idScope || (e == null ? void 0 : e.idScope), l = P({
|
|
484
484
|
...r,
|
|
485
485
|
idScope: n,
|
|
486
486
|
dependencies: t
|
|
@@ -491,7 +491,7 @@ function oe(r) {
|
|
|
491
491
|
}), [
|
|
492
492
|
n,
|
|
493
493
|
...t
|
|
494
|
-
]), /* @__PURE__ */ u.createElement(
|
|
494
|
+
]), /* @__PURE__ */ u.createElement(k.Provider, {
|
|
495
495
|
value: e
|
|
496
496
|
}, l);
|
|
497
497
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require('./assets/ColorSchemeSwitch.css');const e=require("react/jsx-runtime"),m=require("react"),s=require("./ToggleButtonGroup-
|
|
1
|
+
"use strict";require('./assets/ColorSchemeSwitch.css');const e=require("react/jsx-runtime"),m=require("react"),s=require("./ToggleButtonGroup-BwFAhFEi.cjs"),i=require("./createLucideIcon-CTVXwe6i.cjs"),a=require("./VisuallyHidden-DxDOcIsh.cjs"),g=require("./useLocalizedStringFormatter-BSac43NO.cjs");function p(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(c,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return c.default=t,Object.freeze(c)}const u=p(m);/**
|
|
2
2
|
* @license lucide-react v0.525.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const k=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],
|
|
11
|
+
*/const k=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],S=i.createLucideIcon("moon",k);/**
|
|
12
12
|
* @license lucide-react v0.525.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const j=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],M=i.createLucideIcon("sun",j),x="_button_1dy1i_1",d={button:x},b={darkMode:"Dark Mode",lightMode:"Light Mode",system:"System Setting"},$={darkMode:"Mörkt läge",lightMode:"Ljust läge",system:"Systeminställning"},_={en:b,sv:$},L=({selector:t="body",defaultValue:c=new Set(["light dark"]),className:o})=>{const[n,h]=u.useState(c);u.useEffect(()=>{const l=document.querySelector(t);l?l.style.setProperty("color-scheme",Array.from(n).join(" ")):console.warn(`No element found for selector: "${t}"`)},[n,t]);const r=g.useLocalizedStringFormatter(_);return e.jsxs(s.ToggleButtonGroup,{selectionMode:"single",selectedKeys:n,onSelectionChange:h,disallowEmptySelection:!0,className:o,children:[e.jsxs(s.ToggleButton,{id:"light dark",className:d.button,children:[e.jsx(f,{}),e.jsx(a.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:r.format("system")})]}),e.jsxs(s.ToggleButton,{id:"light",className:d.button,children:[e.jsx(M,{}),e.jsx(a.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:r.format("lightMode")})]}),e.jsxs(s.ToggleButton,{id:"dark",className:d.button,children:[e.jsx(S,{}),e.jsx(a.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:r.format("darkMode")})]})]})};exports.ColorSchemeSwitch=L;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { a as y, T as a } from "./ToggleButtonGroup-
|
|
3
|
+
import { a as y, T as a } from "./ToggleButtonGroup-CuxAKB3-.js";
|
|
4
4
|
import { c as d } from "./createLucideIcon-XRdN60yz.js";
|
|
5
|
-
import { $ as r } from "./VisuallyHidden-
|
|
6
|
-
import { u as g } from "./useLocalizedStringFormatter-
|
|
5
|
+
import { $ as r } from "./VisuallyHidden-BKslUoMJ.js";
|
|
6
|
+
import { u as g } from "./useLocalizedStringFormatter-aOhh7wdl.js";
|
|
7
7
|
import './assets/ColorSchemeSwitch.css';/**
|
|
8
8
|
* @license lucide-react v0.525.0 - ISC
|
|
9
9
|
*
|
|
@@ -45,19 +45,19 @@ const S = [
|
|
|
45
45
|
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
46
46
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
47
47
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
48
|
-
],
|
|
49
|
-
button:
|
|
50
|
-
},
|
|
48
|
+
], b = d("sun", S), _ = "_button_1dy1i_1", c = {
|
|
49
|
+
button: _
|
|
50
|
+
}, $ = {
|
|
51
51
|
darkMode: "Dark Mode",
|
|
52
52
|
lightMode: "Light Mode",
|
|
53
53
|
system: "System Setting"
|
|
54
|
-
},
|
|
54
|
+
}, v = {
|
|
55
55
|
darkMode: "Mörkt läge",
|
|
56
56
|
lightMode: "Ljust läge",
|
|
57
57
|
system: "Systeminställning"
|
|
58
|
-
},
|
|
59
|
-
en:
|
|
60
|
-
sv:
|
|
58
|
+
}, x = {
|
|
59
|
+
en: $,
|
|
60
|
+
sv: v
|
|
61
61
|
}, C = ({
|
|
62
62
|
selector: o = "body",
|
|
63
63
|
defaultValue: m = /* @__PURE__ */ new Set(["light dark"]),
|
|
@@ -71,7 +71,7 @@ const S = [
|
|
|
71
71
|
Array.from(s).join(" ")
|
|
72
72
|
) : console.warn(`No element found for selector: "${o}"`);
|
|
73
73
|
}, [s, o]);
|
|
74
|
-
const n = g(
|
|
74
|
+
const n = g(x);
|
|
75
75
|
return /* @__PURE__ */ t(
|
|
76
76
|
y,
|
|
77
77
|
{
|
|
@@ -98,7 +98,7 @@ const S = [
|
|
|
98
98
|
id: "light",
|
|
99
99
|
className: c.button,
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ e(b, {}),
|
|
102
102
|
/* @__PURE__ */ e(r, { children: n.format("lightMode") })
|
|
103
103
|
]
|
|
104
104
|
}
|