@midas-ds/components 11.1.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 +74 -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-oosHSGAt.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-Cnyb9EKC.js → ColorSchemeSwitch-DyZ9FAKG.js} +12 -12
- package/{ComboBox-D4MsSPBu.js → ComboBox-Dn3tQzri.js} +93 -97
- package/{ComboBox-CQ49PhNd.cjs → ComboBox-UadZMhiR.cjs} +1 -1
- package/{DateField-BURrxhil.cjs → DateField-CNEoLyf5.cjs} +1 -1
- package/{DateField-COs1-CkQ.js → DateField-CZmLugT0.js} +4 -4
- package/{DateInputDivider-ToFY-yjB.cjs → DateInputDivider-CCjiq90K.cjs} +1 -1
- package/{DateInputDivider-B3oE1_tB.js → DateInputDivider-CJEGWmG0.js} +22 -22
- package/DateRangePicker-DhgLEa9P.cjs +6 -0
- package/{DateRangePicker-CvEycxmX.js → DateRangePicker-WQ97Psz7.js} +184 -197
- package/{Dialog-DtHk3eXI.cjs → Dialog-BT0tVGQb.cjs} +1 -1
- package/{Dialog-DKHo0W9B.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-D6WCi_Ll.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-BCsrRPqD.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-DA6FZwy0.js → Label-ByWt6Lfh.js} +24 -24
- package/Label-COpr4xVt.cjs +1 -0
- package/Layout-BR3Or1Ga.cjs +16 -0
- package/Layout-Bdqauktv.js +498 -0
- 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-CsxDGpCA.js → ListBox-y_dw__MI.js} +16 -16
- package/{ListBoxButton-BsuHFd_O.cjs → ListBoxButton-C2zp-gXD.cjs} +1 -1
- package/{ListBoxButton-DawRfuny.js → ListBoxButton-DiseS_LX.js} +1 -1
- package/{ListBoxSection-Cc2cx0_S.js → ListBoxSection-Cv-gN76G.js} +376 -376
- package/{ListBoxSection-C-Rz358T.cjs → ListBoxSection-DtsigmC1.cjs} +1 -1
- package/{ListKeyboardDelegate-ZKBk2IId.cjs → ListKeyboardDelegate-fZKXmHAk.cjs} +1 -1
- package/{ListKeyboardDelegate-C-sPNj0f.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-DHoXfBp2.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-C0IBfi5I.js → ProgressBar-wQirOG1N.js} +2 -2
- package/{Radio-B6N9dCtB.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-DMVj2lrG.js → Select-769RSZ9V.js} +114 -114
- package/{Select-DiCEyap1.cjs → Select-Go5x0zWl.cjs} +1 -1
- package/{SelectionManager-BubxiIKu.js → SelectionManager-BdKKuso-.js} +9 -9
- package/{SelectionManager-BJjqIWtf.cjs → SelectionManager-BvREZgeu.cjs} +1 -1
- package/{Separator-CEZ5y7tZ.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-B5Aine4F.js → Table-CTS0J_sQ.js} +289 -268
- package/{Tag-Byva_Xuy.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-eK7Jx3qs.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-HjvaTYD4.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/Layout.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/ListBoxSection.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/DatePickerPopover.d.ts +1 -1
- 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 +37 -12
- package/theme/index.js +12 -11
- package/theme/tokens.d.ts +37 -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-r1r3wC04.js → tokens-BtEBd3jO.js} +82 -43
- 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-DginflOU.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-DP62kzkG.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-DNB7JWoj.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-B0OMoHd_.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/DateRangePicker-Bfibl08v.cjs +0 -6
- package/Dialog-B3R3WtL5.cjs +0 -1
- package/Dialog-BkUw6PlA.js +0 -221
- 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/Layout-BwLxIwtY.cjs +0 -16
- package/Layout-CcADAhds.js +0 -498
- package/PressResponder-4jE_HLu3.cjs +0 -1
- package/TabList-BkSWzbDG.cjs +0 -1
- package/TabList-QApx8qRC.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-BF-dPard.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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/ListBoxSection.css');const S=require("react/jsx-runtime"),V=require("./ListBox-B0E1hdEt.cjs"),Y=require("./Collection-BtBX5IMY.cjs"),c=require("react"),C=require("./mergeProps-B5KXZAI3.cjs"),W=require("./context-Df3XbgBG.cjs"),T=require("react-dom"),Z=require("./OverlayArrow-DpZ1FqOd.cjs"),ee=require("./useEvent-DPxMu-X9.cjs"),M=require("./clsx-C11secjj.cjs"),q=require("./SelectionManager-BJjqIWtf.cjs"),te=require("./Dialog-DtHk3eXI.cjs"),ie=require("./Separator-DPLEx950.cjs");class le{shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){var t,i;return(i=(t=this.getLayoutInfo(e))===null||t===void 0?void 0:t.rect)!==null&&i!==void 0?i:null}getVisibleRect(){return this.virtualizer.visibleRect}constructor(){this.virtualizer=null}}class b{copy(){let e=new b(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=!1,this.isSticky=!1,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=!1}}class x{copy(){return new x(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}constructor(e=0,t=0){this.x=e,this.y=t}}class f{get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new x(this.x,this.y)}get topRight(){return new x(this.maxX,this.y)}get bottomLeft(){return new x(this.x,this.maxY)}get bottomRight(){return new x(this.maxX,this.maxY)}intersects(e){return this.area>0&&e.area>0&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),l=Math.max(this.maxX,e.maxX)-t,o=Math.max(this.maxY,e.maxY)-i;return new f(t,i,l,o)}intersection(e){if(!this.intersects(e))return new f(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new f(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new f(this.x,this.y,this.width,this.height)}constructor(e=0,t=0,i=0,l=0){this.x=e,this.y=t,this.width=i,this.height=l}}class z{copy(){return new z(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0)}}let oe=0;class D{prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new se(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e)}constructor(e,t){this.virtualizer=e,this.key=++oe,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}}class ne extends D{constructor(e){super(e,"root")}}class se extends D{constructor(e,t,i){super(e,i),this.parent=t}}function re(n,e){if(n===e)return!0;if(n.size!==e.size)return!1;for(let t of n)if(!e.has(t))return!1;return!0}class ae{setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;if(e.height+=t,this.velocity.y<0&&(e.y-=t),this.velocity.x!==0){let i=this.visibleRect.width/3;e.width+=i,this.velocity.x<0&&(e.x-=i)}return e}constructor(){this.startTime=0,this.velocity=new x(0,0),this.visibleRect=new f}}class he{isPersistedKey(e){if(this.persistedKeys.has(e))return!0;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return!0}return!1}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:l}=e.layoutInfo;e.content=l||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content)}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let l=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,l),l}keyAtPoint(e){let t=new f(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let l of i)if(l.rect.intersects(t))return l.key;return null}relayout(e={}){this.layout.update(e),this.contentSize=this.layout.getContentSize();let t=this.visibleRect,i=e.contentChanged?0:t.x,l=e.contentChanged?0:t.y;if(i=Math.max(0,Math.min(this.contentSize.width-t.width,i)),l=Math.max(0,Math.min(this.contentSize.height-t.height,l)),i!==t.x||l!==t.y){let o=new f(i,l,t.width,t.height);this.delegate.setVisibleRect(o)}else this.updateSubviews()}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),l;e&&!(t&&i)?l=new f(0,0,this.contentSize.width,this.contentSize.height):l=this._overscanManager.getOverscannedRect();let o=this.layout.getVisibleLayoutInfos(l),s=new Map;for(let a of o)s.set(a.key,a);return s}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,l]of this._visibleViews){let o=e.get(i);(!o||l.parent!==this.getParentView(o))&&(this._visibleViews.delete(i),l.parent.reuseChild(l),t.add(l))}for(let[i,l]of e){let o=this._visibleViews.get(i);if(!o)o=this.getReusableView(l),o.parent.children.add(o),this._visibleViews.set(i,o),t.delete(o);else{o.layoutInfo=l;let s=this.collection.getItem(l.key);o.content!==s&&(o.content!=null&&this._renderedContent.delete(o.content),this._renderView(o))}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let l=this._visibleViews.get(i);l.parent.children.delete(l),l.parent.children.add(l)}}render(e){let t=this,i=!1,l=!1,o=!1,s=!1,a=!1,h=!1;return e.collection!==this.collection&&(t.collection=e.collection,i=!0),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,i=!0),e.persistedKeys&&!re(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,h=!0),this.visibleRect.equals(e.visibleRect)||(this._overscanManager.setVisibleRect(e.visibleRect),this.layout.shouldInvalidate(e.visibleRect,this.visibleRect)?(l=!e.visibleRect.pointEquals(this.visibleRect),o=!e.visibleRect.sizeEquals(this.visibleRect),i=!0):h=!0,t.visibleRect=e.visibleRect),e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(o||(o=e.invalidationContext.sizeChanged||!1),l||(l=e.invalidationContext.offsetChanged||!1),s||(s=e.invalidationContext.itemSizeChanged||!1),a||(a=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions)),i||(i=s||o||l||a)),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(h=!0)),i?this.relayout({offsetChanged:l,sizeChanged:o,itemSizeChanged:s,layoutOptionsChanged:a,layoutOptions:this._invalidationContext.layoutOptions}):h&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e)}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:!0})}constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new z,this.visibleRect=new f,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new ne(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new ae}}function de(n){let[e,t]=c.useState(new f(0,0,0,0)),[i,l]=c.useState(!1),[o,s]=c.useState({}),a=c.useRef(!1),[h]=c.useState(()=>new he({collection:n.collection,layout:n.layout,delegate:{setVisibleRect(w){t(w),a.current=!0},renderView:n.renderView,invalidate:s}}));C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{a.current&&(a.current=!1,n.onVisibleRectChange(e))});let r=c.useMemo(()=>n.layoutOptions!=null?{...o,layoutOptions:n.layoutOptions}:o,[o,n.layoutOptions]),d=h.render({layout:n.layout,collection:n.collection,persistedKeys:n.persistedKeys,layoutOptions:n.layoutOptions,visibleRect:e,invalidationContext:r,isScrolling:i}),u=h.contentSize,g=c.useCallback(()=>{l(!0)},[]),y=c.useCallback(()=>{l(!1)},[]);return c.useMemo(()=>({virtualizer:h,visibleViews:d,setVisibleRect:t,contentSize:u,isScrolling:i,startScrolling:g,endScrolling:y}),[h,d,t,u,i,g,y])}const $=48;class ce extends le{get collection(){return this.virtualizer.collection}getLayoutInfo(e){var t;return this.ensureLayoutInfo(e),((t=this.layoutNodes.get(e))===null||t===void 0?void 0:t.layoutInfo)||null}getVisibleLayoutInfos(e){if(e.height>1){var t,i;let s=((i=(t=this.rowHeight)!==null&&t!==void 0?t:this.estimatedRowHeight)!==null&&i!==void 0?i:$)+this.gap;e.y=Math.floor(e.y/s)*s,e.height=Math.ceil(e.height/s)*s}this.layoutIfNeeded(e);let l=[],o=s=>{for(let a of s)this.isVisible(a,e)&&(l.push(a.layoutInfo),a.children&&o(a.children))};return o(this.rootNodes),l}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return!this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new f(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new f(0,0,this.contentSize.width,this.contentSize.height),!0):!1}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;var i,l,o,s,a;return e.sizeChanged||this.rowHeight!==((i=t==null?void 0:t.rowHeight)!==null&&i!==void 0?i:this.rowHeight)||this.headingHeight!==((l=t==null?void 0:t.headingHeight)!==null&&l!==void 0?l:this.headingHeight)||this.loaderHeight!==((o=t==null?void 0:t.loaderHeight)!==null&&o!==void 0?o:this.loaderHeight)||this.gap!==((s=t==null?void 0:t.gap)!==null&&s!==void 0?s:this.gap)||this.padding!==((a=t==null?void 0:t.padding)!==null&&a!==void 0?a:this.padding)}shouldInvalidateLayoutOptions(e,t){return e.rowHeight!==t.rowHeight||e.estimatedRowHeight!==t.estimatedRowHeight||e.headingHeight!==t.headingHeight||e.estimatedHeadingHeight!==t.estimatedHeadingHeight||e.loaderHeight!==t.loaderHeight||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;var l;this.rowHeight=(l=i==null?void 0:i.rowHeight)!==null&&l!==void 0?l:this.rowHeight;var o;this.estimatedRowHeight=(o=i==null?void 0:i.estimatedRowHeight)!==null&&o!==void 0?o:this.estimatedRowHeight;var s;this.headingHeight=(s=i==null?void 0:i.headingHeight)!==null&&s!==void 0?s:this.headingHeight;var a;this.estimatedHeadingHeight=(a=i==null?void 0:i.estimatedHeadingHeight)!==null&&a!==void 0?a:this.estimatedHeadingHeight;var h;this.loaderHeight=(h=i==null?void 0:i.loaderHeight)!==null&&h!==void 0?h:this.loaderHeight;var r;this.dropIndicatorThickness=(r=i==null?void 0:i.dropIndicatorThickness)!==null&&r!==void 0?r:this.dropIndicatorThickness;var d;this.gap=(d=i==null?void 0:i.gap)!==null&&d!==void 0?d:this.gap;var u;if(this.padding=(u=i==null?void 0:i.padding)!==null&&u!==void 0?u:this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let g of this.lastCollection.getKeys())t.getItem(g)||this.layoutNodes.get(g)&&this.layoutNodes.delete(g);this.lastCollection=t,this.invalidateEverything=!1,this.validRect=this.requestedRect.copy()}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=0,l=[],o=(t==null?void 0:t.size)===0||t.size===1&&t.getItem(t.getFirstKey()).type==="loader";o&&(e=0);for(let r of t){var s,a;let d=((a=(s=this.rowHeight)!==null&&s!==void 0?s:this.estimatedRowHeight)!==null&&a!==void 0?a:$)+this.gap;if(r.type==="item"&&e+d<this.requestedRect.y&&!this.isValid(r,e)){e+=d,i++;continue}let u=this.buildChild(r,this.padding,e,null);if(e=u.layoutInfo.rect.maxY+this.gap,l.push(u),r.type==="item"&&e>this.requestedRect.maxY){var h;let g=t.size-(l.length+i),y=t.getItem(t.getLastKey());if((y==null?void 0:y.type)==="loader"&&g--,e+=g*d,(y==null?void 0:y.type)==="loader"&&((h=l.at(-1))===null||h===void 0?void 0:h.layoutInfo.type)!=="loader"){let v=this.buildChild(y,this.padding,e,null);l.push(v),e=v.layoutInfo.rect.maxY}break}}return e-=this.gap,e+=o?0:this.padding,this.contentSize=new z(this.virtualizer.visibleRect.width,e),l}isValid(e,t){let i=this.layoutNodes.get(e.key);return!this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect.y&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,l){if(this.isValid(e,i))return this.layoutNodes.get(e.key);let o=this.buildNode(e,t,i);return o.layoutInfo.parentKey=l??null,o.layoutInfo.allowOverflow=!0,this.layoutNodes.set(e.key,o),o}buildNode(e,t,i){switch(e.type){case"section":return this.buildSection(e,t,i);case"item":return this.buildItem(e,t,i);case"header":return this.buildSectionHeader(e,t,i);case"loader":return this.buildLoader(e,t,i);case"separator":return this.buildItem(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let l=new f(t,i,this.padding,0),o=new b("loader",e.key,l);l.width=this.virtualizer.contentSize.width-this.padding-t;var s,a,h;return l.height=e.props.isLoading?(h=(a=(s=this.loaderHeight)!==null&&s!==void 0?s:this.rowHeight)!==null&&a!==void 0?a:this.estimatedRowHeight)!==null&&h!==void 0?h:$:0,{layoutInfo:o,validRect:l.intersection(this.requestedRect)}}buildSection(e,t,i){let l=this.virtualizer.collection,o=this.virtualizer.visibleRect.width-this.padding,s=new f(t,i,o-t,0),a=new b(e.type,e.key,s),h=i,r=0,d=[];for(let y of q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)){var u,g;let v=((g=(u=this.rowHeight)!==null&&u!==void 0?u:this.estimatedRowHeight)!==null&&g!==void 0?g:$)+this.gap;if(i+v<this.requestedRect.y&&!this.isValid(e,i)){i+=v,r++;continue}let w=this.buildChild(y,t,i,a.key);if(i=w.layoutInfo.rect.maxY+this.gap,d.push(w),i>this.requestedRect.maxY){i+=([...q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)].length-(d.length+r))*v;break}}return i-=this.gap,s.height=i-h,{layoutInfo:a,children:d,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let l=this.virtualizer.visibleRect.width-this.padding,o=this.headingHeight,s=!1;if(o==null){let r=this.layoutNodes.get(e.key),d=r==null?void 0:r.layoutInfo;if(d){let u=this.virtualizer.collection.getItem(e.key),g=this.lastCollection?this.lastCollection.getItem(e.key):null;o=d.rect.height,s=l!==d.rect.width||u!==g||d.estimatedSize}else o=e.rendered?this.estimatedHeadingHeight:0,s=!0}o==null&&(o=$);let a=new f(t,i,l-t,o),h=new b("header",e.key,a);return h.estimatedSize=s,{layoutInfo:h,children:[],validRect:h.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let l=this.virtualizer.visibleRect.width-this.padding-t,o=this.rowHeight,s=!1;if(o==null){let r=this.layoutNodes.get(e.key);r?(o=r.layoutInfo.rect.height,s=l!==r.layoutInfo.rect.width||e!==r.node||r.layoutInfo.estimatedSize):(o=this.estimatedRowHeight,s=!0)}o==null&&(o=$);let a=new f(t,i,l,o),h=new b(e.type,e.key,a);return h.estimatedSize=s,{layoutInfo:h,children:[],validRect:h.rect,node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return!1;let l=this.virtualizer.collection,o=i.layoutInfo;if(o.estimatedSize=!1,o.rect.height!==t.height){let s=o.copy();s.rect.height=t.height,i.layoutInfo=s,this.validRect.height=Math.min(this.validRect.height,o.rect.y-this.validRect.y),this.requestedRect.height+=s.rect.height-o.rect.height,this.updateLayoutNode(e,o,s);let a=o.parentKey!=null?l.getItem(o.parentKey):null;for(;a;)this.updateLayoutNode(a.key,o,s),a=a.parentKey!=null?l.getItem(a.parentKey):null;return!0}return!1}updateLayoutNode(e,t,i){let l=this.layoutNodes.get(e);l&&(l.validRect=l.validRect.intersection(this.validRect),l.layoutInfo===t&&(l.layoutInfo=i))}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let l=new f(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),o=this.getVisibleLayoutInfos(l),s=null,a=1/0;for(let u of o){if(!u.rect.intersects(l))continue;let g=Math.abs(u.rect.y-t),y=Math.abs(u.rect.maxY-t),v=Math.min(g,y);v<a&&(a=v,s=u.key)}if(s==null||this.virtualizer.collection.size===0)return{type:"root"};let h=this.getLayoutInfo(s);if(!h)return null;let r=h.rect,d={type:"item",key:h.key,dropPosition:"on"};return i(d)?t<=r.y+10&&i({...d,dropPosition:"before"})?d.dropPosition="before":t>=r.maxY-10&&i({...d,dropPosition:"after"})&&(d.dropPosition="after"):t<=r.y+r.height/2&&i({...d,dropPosition:"before"})?d.dropPosition="before":i({...d,dropPosition:"after"})&&(d.dropPosition="after"),d}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;return e.dropPosition==="before"?i=new f(t.rect.x,t.rect.y-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):e.dropPosition==="after"?i=new f(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):i=t.rect,new b("dropIndicator",e.key+":"+e.dropPosition,i)}constructor(e={}){super();var t;this.rowHeight=(t=e.rowHeight)!==null&&t!==void 0?t:null;var i;this.estimatedRowHeight=(i=e.estimatedRowHeight)!==null&&i!==void 0?i:null;var l;this.headingHeight=(l=e.headingHeight)!==null&&l!==void 0?l:null;var o;this.estimatedHeadingHeight=(o=e.estimatedHeadingHeight)!==null&&o!==void 0?o:null;var s;this.loaderHeight=(s=e.loaderHeight)!==null&&s!==void 0?s:null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=!1,this.validRect=new f,this.requestedRect=new f,this.contentSize=new z}}let R=null;function ue(n=!1){if(R===null||n){const e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";const i=document.createElement("div"),l=i.style;return l.width="100px",l.height="100px",e.appendChild(i),document.body.appendChild(e),e.scrollLeft>0?R="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?R="negative":R="positive-ascending"),document.body.removeChild(e),R}return R}function fe(n,e){let{scrollLeft:t}=n;if(e==="rtl"){let{scrollWidth:i,clientWidth:l}=n;switch(ue()){case"negative":t=-t;break;case"positive-descending":t=i-l-t;break}}return t}function ge(n,e){let{contentSize:t,onVisibleRectChange:i,innerStyle:l,onScrollStart:o,onScrollEnd:s,scrollDirection:a="both",...h}=n,r=c.useRef({scrollTop:0,scrollLeft:0,scrollEndTime:0,scrollTimeout:null,width:0,height:0,isScrolling:!1}).current,{direction:d}=W.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),[u,g]=c.useState(!1),y=c.useCallback(p=>{p.target===p.currentTarget&&(n.onScroll&&n.onScroll(p),T.flushSync(()=>{let m=p.currentTarget.scrollTop,H=fe(p.currentTarget,d);r.scrollTop=Math.max(0,Math.min(m,t.height-r.height)),r.scrollLeft=Math.max(0,Math.min(H,t.width-r.width)),i(new f(r.scrollLeft,r.scrollTop,r.width,r.height)),r.isScrolling||(r.isScrolling=!0,g(!0),window.dispatchEvent(new Event("tk.disconnect-observer")),o&&o());let L=Date.now();r.scrollEndTime<=L+50&&(r.scrollEndTime=L+300,r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(()=>{r.isScrolling=!1,g(!1),r.scrollTimeout=null,window.dispatchEvent(new Event("tk.connect-observer")),s&&s()},300))}))},[n,d,r,t,i,o,s]);ee.$e9faafb641e167db$export$90fc3a17d93f704c(e,"scroll",y),c.useEffect(()=>()=>{r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.isScrolling&&window.dispatchEvent(new Event("tk.connect-observer"))},[]);let v=c.useRef(!1),w=C.$8ae05eaa5c114e9c$export$7f54fc3180508a52(p=>{let m=e.current;if(!m||v.current)return;v.current=!0;let H=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,L=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"),Q=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"),O=m.clientWidth,P=m.clientHeight,N=H&&!L?1/0:O,E=H&&!Q?1/0:P;(r.width!==N||r.height!==E)&&(r.width=N,r.height=E,p(()=>{i(new f(r.scrollLeft,r.scrollTop,N,E))}),(!H&&O!==m.clientWidth||P!==m.clientHeight)&&(r.width=m.clientWidth,r.height=m.clientHeight,p(()=>{i(new f(r.scrollLeft,r.scrollTop,r.width,r.height))}))),v.current=!1}),_=c.useRef(null),[U,G]=c.useState({});C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!v.current&&(_.current==null||!t.equals(_.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){G({}),_.current=t;return}else queueMicrotask(()=>w(T.flushSync));_.current=t}),C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{w(p=>p())},[U]);let J=c.useCallback(()=>{w(T.flushSync)},[w]);Z.$9daab02d461809db$export$683480f191c0e3ea({ref:e,box:"border-box",onResize:J});let I={padding:0,...h.style};return a==="horizontal"?(I.overflowX="auto",I.overflowY="hidden"):a==="vertical"||t.width===r.width?(I.overflowY="auto",I.overflowX="hidden"):I.overflow="auto",l={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:u?"none":"auto",position:"relative",...l},{scrollViewProps:{...h,style:I},contentProps:{role:"presentation",style:l}}}function ye(n){let{layoutInfo:e,virtualizer:t,ref:i}=n,l=e==null?void 0:e.key,o=c.useCallback(()=>{if(l!=null&&i.current){let s=ve(i.current);t.updateItemSize(l,s)}},[t,l,i]);return C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{e!=null&&e.estimatedSize&&o()}),{updateSize:o}}function ve(n){let e=n.style.height;n.style.height="";let t=new z(n.scrollWidth,n.scrollHeight);return n.style.height=e,t}function X(n){let{style:e,className:t,layoutInfo:i,virtualizer:l,parent:o,children:s}=n,{direction:a}=W.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),h=c.useRef(null);return ye({layoutInfo:i,virtualizer:l,ref:h}),c.createElement("div",{role:"presentation",ref:h,className:t,style:{...pe(i,a,o),...e}},s)}let B=new WeakMap;function pe(n,e,t){let i=e==="rtl"?"right":"left",l=B.get(n);if(l&&l[i]!=null){if(!t)return l;let h=n.rect.y-t.rect.y,r=n.rect.x-t.rect.x;if(l.top===h&&l[i]===r)return l}let o={top:n.rect.y-(t&&!(t.allowOverflow&&n.isSticky)?t.rect.y:0),[i]:n.rect.x-(t&&!(t.allowOverflow&&n.isSticky)?t.rect.x:0),width:n.rect.width,height:n.rect.height};Object.entries(o).forEach(([h,r])=>{Number.isFinite(r)||(o[h]=void 0)});var s;let a={position:n.isSticky?"sticky":"absolute",display:n.isSticky?"inline-block":void 0,overflow:n.allowOverflow?"visible":"hidden",opacity:n.opacity,zIndex:n.zIndex,transform:(s=n.transform)!==null&&s!==void 0?s:void 0,contain:"size layout style",...o};return B.set(n,a),a}const j=c.createContext(null),A=c.createContext(null);function we(n){let{children:e,layout:t,layoutOptions:i}=n,l=c.useMemo(()=>typeof t=="function"?new t:t,[t]),o=c.useMemo(()=>({isVirtualized:!0,layoutDelegate:l,dropTargetDelegate:l.getDropTargetFromPoint?l:void 0,CollectionRoot:me,CollectionBranch:be}),[l]);return c.createElement(Y.$7135fc7d473fd974$export$4feb769f8ddf26c5.Provider,{value:o},c.createElement(A.Provider,{value:{layout:l,layoutOptions:i}},e))}function me({collection:n,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){var l;let{layout:o,layoutOptions:s}=c.useContext(A),a=(l=o.useLayoutOptions)===null||l===void 0?void 0:l.call(o),h=de({layout:o,collection:n,renderView:(d,u)=>{var g;return u==null||(g=u.render)===null||g===void 0?void 0:g.call(u,u)},onVisibleRectChange(d){let u=t==null?void 0:t.current;u&&(u.scrollLeft=d.x,u.scrollTop=d.y)},persistedKeys:e,layoutOptions:c.useMemo(()=>s&&a?{...s,...a}:s||a,[s,a])}),{contentProps:r}=ge({onVisibleRectChange:h.setVisibleRect,contentSize:h.contentSize,onScrollStart:h.startScrolling,onScrollEnd:h.endScrolling},t);return c.createElement("div",r,c.createElement(j.Provider,{value:h},F(null,h.visibleViews,i)))}function be({parent:n,renderDropIndicator:e}){let i=c.useContext(j).virtualizer.getVisibleView(n.key);return F(i,Array.from(i.children),e)}function F(n,e,t){return e.map(i=>xe(n,i,t))}function xe(n,e,t){let i=c.createElement(X,{key:e.key,layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:n==null?void 0:n.layoutInfo},e.rendered),{collection:l,layout:o}=e.virtualizer,s=e.content;return(s==null?void 0:s.type)==="item"&&t&&o.getDropTargetLayoutInfo&&(i=c.createElement(c.Fragment,{key:e.key},K(n,e,{type:"item",key:e.content.key,dropPosition:"before"},t),i,Y.$7135fc7d473fd974$export$2dbbd341daed716d(l,s,a=>K(n,e,a,t)))),i}function K(n,e,t,i){let l=i(t);if(l){let o=e.virtualizer.layout.getDropTargetLayoutInfo(t);l=c.createElement(X,{layoutInfo:o,virtualizer:e.virtualizer,parent:n==null?void 0:n.layoutInfo},l)}return l}class Ie extends ce{getContentSize(){var t;const e=(t=this==null?void 0:this.virtualizer)==null?void 0:t.collection.getKeys();return Array.from(e||[]).forEach(i=>{this.getLayoutInfo(i)}),this.contentSize}}const $e="_listBox_iev2c_7",Re="_listBoxPopover_iev2c_19",Se="_listBoxSectionHeading_iev2c_31",ze="_listBoxButton_iev2c_38",He="_listBoxItem_iev2c_50",k={listBox:$e,listBoxPopover:Re,listBoxSectionHeading:Se,listBoxButton:ze,listBoxItem:He},Ce=({className:n,children:e,...t})=>S.jsx(we,{layout:Ie,layoutOptions:{headingHeight:44},children:S.jsx(V.$eed445e0843c11d0$export$41f133550aa26f48,{className:M.clsx(k.listBox,n),...t,children:e})}),ke=({children:n,className:e,...t})=>S.jsx(V.$eed445e0843c11d0$export$a11e76429ed99b4,{className:M.clsx(k.listBoxItem,e),...t,children:n}),_e=({className:n,children:e,...t})=>S.jsx(te.$07b14b47974efb58$export$5b6b19405a83ff9d,{className:M.clsx(n,k.listBoxPopover),offset:0,...t,children:e}),Le=({children:n,name:e,...t})=>S.jsxs(V.$eed445e0843c11d0$export$dca12b0bb56e4fc,{...t,children:[S.jsx(ie.$72a5793c14baf454$export$8b251419efc915eb,{className:k.listBoxSectionHeading,children:e}),n]});exports.ListBox=Ce;exports.ListBoxItem=ke;exports.ListBoxPopover=_e;exports.ListBoxSection=Le;exports.styles=k;
|
|
1
|
+
"use strict";require('./assets/ListBoxSection.css');const S=require("react/jsx-runtime"),V=require("./ListBox-D0u9svwm.cjs"),Y=require("./Collection-B1xL4EdF.cjs"),c=require("react"),C=require("./mergeProps-C7Sx47fA.cjs"),W=require("./context-UOrD6Zxk.cjs"),T=require("react-dom"),Z=require("./OverlayArrow-8praV_Xy.cjs"),ee=require("./useEvent-CGRyLM2c.cjs"),M=require("./clsx-C11secjj.cjs"),q=require("./SelectionManager-BvREZgeu.cjs"),te=require("./Dialog-BT0tVGQb.cjs"),ie=require("./Separator-DBsDhqCr.cjs");class le{shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){var t,i;return(i=(t=this.getLayoutInfo(e))===null||t===void 0?void 0:t.rect)!==null&&i!==void 0?i:null}getVisibleRect(){return this.virtualizer.visibleRect}constructor(){this.virtualizer=null}}class b{copy(){let e=new b(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=!1,this.isSticky=!1,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=!1}}class x{copy(){return new x(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}constructor(e=0,t=0){this.x=e,this.y=t}}class f{get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new x(this.x,this.y)}get topRight(){return new x(this.maxX,this.y)}get bottomLeft(){return new x(this.x,this.maxY)}get bottomRight(){return new x(this.maxX,this.maxY)}intersects(e){return this.area>0&&e.area>0&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),l=Math.max(this.maxX,e.maxX)-t,o=Math.max(this.maxY,e.maxY)-i;return new f(t,i,l,o)}intersection(e){if(!this.intersects(e))return new f(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new f(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new f(this.x,this.y,this.width,this.height)}constructor(e=0,t=0,i=0,l=0){this.x=e,this.y=t,this.width=i,this.height=l}}class z{copy(){return new z(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0)}}let oe=0;class D{prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new se(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e)}constructor(e,t){this.virtualizer=e,this.key=++oe,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}}class ne extends D{constructor(e){super(e,"root")}}class se extends D{constructor(e,t,i){super(e,i),this.parent=t}}function re(n,e){if(n===e)return!0;if(n.size!==e.size)return!1;for(let t of n)if(!e.has(t))return!1;return!0}class ae{setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;if(e.height+=t,this.velocity.y<0&&(e.y-=t),this.velocity.x!==0){let i=this.visibleRect.width/3;e.width+=i,this.velocity.x<0&&(e.x-=i)}return e}constructor(){this.startTime=0,this.velocity=new x(0,0),this.visibleRect=new f}}class he{isPersistedKey(e){if(this.persistedKeys.has(e))return!0;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return!0}return!1}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:l}=e.layoutInfo;e.content=l||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content)}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let l=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,l),l}keyAtPoint(e){let t=new f(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let l of i)if(l.rect.intersects(t))return l.key;return null}relayout(e={}){this.layout.update(e),this.contentSize=this.layout.getContentSize();let t=this.visibleRect,i=e.contentChanged?0:t.x,l=e.contentChanged?0:t.y;if(i=Math.max(0,Math.min(this.contentSize.width-t.width,i)),l=Math.max(0,Math.min(this.contentSize.height-t.height,l)),i!==t.x||l!==t.y){let o=new f(i,l,t.width,t.height);this.delegate.setVisibleRect(o)}else this.updateSubviews()}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),l;e&&!(t&&i)?l=new f(0,0,this.contentSize.width,this.contentSize.height):l=this._overscanManager.getOverscannedRect();let o=this.layout.getVisibleLayoutInfos(l),s=new Map;for(let a of o)s.set(a.key,a);return s}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,l]of this._visibleViews){let o=e.get(i);(!o||l.parent!==this.getParentView(o))&&(this._visibleViews.delete(i),l.parent.reuseChild(l),t.add(l))}for(let[i,l]of e){let o=this._visibleViews.get(i);if(!o)o=this.getReusableView(l),o.parent.children.add(o),this._visibleViews.set(i,o),t.delete(o);else{o.layoutInfo=l;let s=this.collection.getItem(l.key);o.content!==s&&(o.content!=null&&this._renderedContent.delete(o.content),this._renderView(o))}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let l=this._visibleViews.get(i);l.parent.children.delete(l),l.parent.children.add(l)}}render(e){let t=this,i=!1,l=!1,o=!1,s=!1,a=!1,h=!1;return e.collection!==this.collection&&(t.collection=e.collection,i=!0),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,i=!0),e.persistedKeys&&!re(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,h=!0),this.visibleRect.equals(e.visibleRect)||(this._overscanManager.setVisibleRect(e.visibleRect),this.layout.shouldInvalidate(e.visibleRect,this.visibleRect)?(l=!e.visibleRect.pointEquals(this.visibleRect),o=!e.visibleRect.sizeEquals(this.visibleRect),i=!0):h=!0,t.visibleRect=e.visibleRect),e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(o||(o=e.invalidationContext.sizeChanged||!1),l||(l=e.invalidationContext.offsetChanged||!1),s||(s=e.invalidationContext.itemSizeChanged||!1),a||(a=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions)),i||(i=s||o||l||a)),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(h=!0)),i?this.relayout({offsetChanged:l,sizeChanged:o,itemSizeChanged:s,layoutOptionsChanged:a,layoutOptions:this._invalidationContext.layoutOptions}):h&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e)}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:!0})}constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new z,this.visibleRect=new f,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new ne(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new ae}}function de(n){let[e,t]=c.useState(new f(0,0,0,0)),[i,l]=c.useState(!1),[o,s]=c.useState({}),a=c.useRef(!1),[h]=c.useState(()=>new he({collection:n.collection,layout:n.layout,delegate:{setVisibleRect(w){t(w),a.current=!0},renderView:n.renderView,invalidate:s}}));C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{a.current&&(a.current=!1,n.onVisibleRectChange(e))});let r=c.useMemo(()=>n.layoutOptions!=null?{...o,layoutOptions:n.layoutOptions}:o,[o,n.layoutOptions]),d=h.render({layout:n.layout,collection:n.collection,persistedKeys:n.persistedKeys,layoutOptions:n.layoutOptions,visibleRect:e,invalidationContext:r,isScrolling:i}),u=h.contentSize,g=c.useCallback(()=>{l(!0)},[]),y=c.useCallback(()=>{l(!1)},[]);return c.useMemo(()=>({virtualizer:h,visibleViews:d,setVisibleRect:t,contentSize:u,isScrolling:i,startScrolling:g,endScrolling:y}),[h,d,t,u,i,g,y])}const I=48;class ce extends le{get collection(){return this.virtualizer.collection}getLayoutInfo(e){var t;return this.ensureLayoutInfo(e),((t=this.layoutNodes.get(e))===null||t===void 0?void 0:t.layoutInfo)||null}getVisibleLayoutInfos(e){if(e.height>1){var t,i;let s=((i=(t=this.rowHeight)!==null&&t!==void 0?t:this.estimatedRowHeight)!==null&&i!==void 0?i:I)+this.gap;e.y=Math.floor(e.y/s)*s,e.height=Math.ceil(e.height/s)*s}this.layoutIfNeeded(e);let l=[],o=s=>{for(let a of s)this.isVisible(a,e)&&(l.push(a.layoutInfo),a.children&&o(a.children))};return o(this.rootNodes),l}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return!this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new f(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new f(0,0,this.contentSize.width,this.contentSize.height),!0):!1}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;var i,l,o,s,a;return e.sizeChanged||this.rowHeight!==((i=t==null?void 0:t.rowHeight)!==null&&i!==void 0?i:this.rowHeight)||this.headingHeight!==((l=t==null?void 0:t.headingHeight)!==null&&l!==void 0?l:this.headingHeight)||this.loaderHeight!==((o=t==null?void 0:t.loaderHeight)!==null&&o!==void 0?o:this.loaderHeight)||this.gap!==((s=t==null?void 0:t.gap)!==null&&s!==void 0?s:this.gap)||this.padding!==((a=t==null?void 0:t.padding)!==null&&a!==void 0?a:this.padding)}shouldInvalidateLayoutOptions(e,t){return e.rowHeight!==t.rowHeight||e.estimatedRowHeight!==t.estimatedRowHeight||e.headingHeight!==t.headingHeight||e.estimatedHeadingHeight!==t.estimatedHeadingHeight||e.loaderHeight!==t.loaderHeight||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;var l;this.rowHeight=(l=i==null?void 0:i.rowHeight)!==null&&l!==void 0?l:this.rowHeight;var o;this.estimatedRowHeight=(o=i==null?void 0:i.estimatedRowHeight)!==null&&o!==void 0?o:this.estimatedRowHeight;var s;this.headingHeight=(s=i==null?void 0:i.headingHeight)!==null&&s!==void 0?s:this.headingHeight;var a;this.estimatedHeadingHeight=(a=i==null?void 0:i.estimatedHeadingHeight)!==null&&a!==void 0?a:this.estimatedHeadingHeight;var h;this.loaderHeight=(h=i==null?void 0:i.loaderHeight)!==null&&h!==void 0?h:this.loaderHeight;var r;this.dropIndicatorThickness=(r=i==null?void 0:i.dropIndicatorThickness)!==null&&r!==void 0?r:this.dropIndicatorThickness;var d;this.gap=(d=i==null?void 0:i.gap)!==null&&d!==void 0?d:this.gap;var u;if(this.padding=(u=i==null?void 0:i.padding)!==null&&u!==void 0?u:this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let g of this.lastCollection.getKeys())t.getItem(g)||this.layoutNodes.get(g)&&this.layoutNodes.delete(g);this.lastCollection=t,this.invalidateEverything=!1,this.validRect=this.requestedRect.copy()}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=0,l=[],o=(t==null?void 0:t.size)===0||t.size===1&&t.getItem(t.getFirstKey()).type==="loader";o&&(e=0);for(let r of t){var s,a;let d=((a=(s=this.rowHeight)!==null&&s!==void 0?s:this.estimatedRowHeight)!==null&&a!==void 0?a:I)+this.gap;if(r.type==="item"&&e+d<this.requestedRect.y&&!this.isValid(r,e)){e+=d,i++;continue}let u=this.buildChild(r,this.padding,e,null);if(e=u.layoutInfo.rect.maxY+this.gap,l.push(u),r.type==="item"&&e>this.requestedRect.maxY){var h;let g=t.size-(l.length+i),y=t.getItem(t.getLastKey());if((y==null?void 0:y.type)==="loader"&&g--,e+=g*d,(y==null?void 0:y.type)==="loader"&&((h=l.at(-1))===null||h===void 0?void 0:h.layoutInfo.type)!=="loader"){let v=this.buildChild(y,this.padding,e,null);l.push(v),e=v.layoutInfo.rect.maxY}break}}return e-=this.gap,e+=o?0:this.padding,this.contentSize=new z(this.virtualizer.visibleRect.width,e),l}isValid(e,t){let i=this.layoutNodes.get(e.key);return!this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect.y&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,l){if(this.isValid(e,i))return this.layoutNodes.get(e.key);let o=this.buildNode(e,t,i);return o.layoutInfo.parentKey=l??null,o.layoutInfo.allowOverflow=!0,this.layoutNodes.set(e.key,o),o}buildNode(e,t,i){switch(e.type){case"section":return this.buildSection(e,t,i);case"item":return this.buildItem(e,t,i);case"header":return this.buildSectionHeader(e,t,i);case"loader":return this.buildLoader(e,t,i);case"separator":return this.buildItem(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let l=new f(t,i,this.padding,0),o=new b("loader",e.key,l);l.width=this.virtualizer.contentSize.width-this.padding-t;var s,a,h;return l.height=e.props.isLoading?(h=(a=(s=this.loaderHeight)!==null&&s!==void 0?s:this.rowHeight)!==null&&a!==void 0?a:this.estimatedRowHeight)!==null&&h!==void 0?h:I:0,{layoutInfo:o,validRect:l.intersection(this.requestedRect)}}buildSection(e,t,i){let l=this.virtualizer.collection,o=this.virtualizer.visibleRect.width-this.padding,s=new f(t,i,o-t,0),a=new b(e.type,e.key,s),h=i,r=0,d=[];for(let y of q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)){var u,g;let v=((g=(u=this.rowHeight)!==null&&u!==void 0?u:this.estimatedRowHeight)!==null&&g!==void 0?g:I)+this.gap;if(i+v<this.requestedRect.y&&!this.isValid(e,i)){i+=v,r++;continue}let w=this.buildChild(y,t,i,a.key);if(i=w.layoutInfo.rect.maxY+this.gap,d.push(w),i>this.requestedRect.maxY){i+=([...q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)].length-(d.length+r))*v;break}}return i-=this.gap,s.height=i-h,{layoutInfo:a,children:d,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let l=this.virtualizer.visibleRect.width-this.padding,o=this.headingHeight,s=!1;if(o==null){let r=this.layoutNodes.get(e.key),d=r==null?void 0:r.layoutInfo;if(d){let u=this.virtualizer.collection.getItem(e.key),g=this.lastCollection?this.lastCollection.getItem(e.key):null;o=d.rect.height,s=l!==d.rect.width||u!==g||d.estimatedSize}else o=e.rendered?this.estimatedHeadingHeight:0,s=!0}o==null&&(o=I);let a=new f(t,i,l-t,o),h=new b("header",e.key,a);return h.estimatedSize=s,{layoutInfo:h,children:[],validRect:h.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let l=this.virtualizer.visibleRect.width-this.padding-t,o=this.rowHeight,s=!1;if(o==null){let r=this.layoutNodes.get(e.key);r?(o=r.layoutInfo.rect.height,s=l!==r.layoutInfo.rect.width||e!==r.node||r.layoutInfo.estimatedSize):(o=this.estimatedRowHeight,s=!0)}o==null&&(o=I);let a=new f(t,i,l,o),h=new b(e.type,e.key,a);return h.estimatedSize=s,{layoutInfo:h,children:[],validRect:h.rect,node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return!1;let l=this.virtualizer.collection,o=i.layoutInfo;if(o.estimatedSize=!1,o.rect.height!==t.height){let s=o.copy();s.rect.height=t.height,i.layoutInfo=s,this.validRect.height=Math.min(this.validRect.height,o.rect.y-this.validRect.y),this.requestedRect.height+=s.rect.height-o.rect.height,this.updateLayoutNode(e,o,s);let a=o.parentKey!=null?l.getItem(o.parentKey):null;for(;a;)this.updateLayoutNode(a.key,o,s),a=a.parentKey!=null?l.getItem(a.parentKey):null;return!0}return!1}updateLayoutNode(e,t,i){let l=this.layoutNodes.get(e);l&&(l.validRect=l.validRect.intersection(this.validRect),l.layoutInfo===t&&(l.layoutInfo=i))}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let l=new f(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),o=this.getVisibleLayoutInfos(l),s=null,a=1/0;for(let u of o){if(!u.rect.intersects(l))continue;let g=Math.abs(u.rect.y-t),y=Math.abs(u.rect.maxY-t),v=Math.min(g,y);v<a&&(a=v,s=u.key)}if(s==null||this.virtualizer.collection.size===0)return{type:"root"};let h=this.getLayoutInfo(s);if(!h)return null;let r=h.rect,d={type:"item",key:h.key,dropPosition:"on"};return i(d)?t<=r.y+10&&i({...d,dropPosition:"before"})?d.dropPosition="before":t>=r.maxY-10&&i({...d,dropPosition:"after"})&&(d.dropPosition="after"):t<=r.y+r.height/2&&i({...d,dropPosition:"before"})?d.dropPosition="before":i({...d,dropPosition:"after"})&&(d.dropPosition="after"),d}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;return e.dropPosition==="before"?i=new f(t.rect.x,t.rect.y-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):e.dropPosition==="after"?i=new f(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):i=t.rect,new b("dropIndicator",e.key+":"+e.dropPosition,i)}constructor(e={}){super();var t;this.rowHeight=(t=e.rowHeight)!==null&&t!==void 0?t:null;var i;this.estimatedRowHeight=(i=e.estimatedRowHeight)!==null&&i!==void 0?i:null;var l;this.headingHeight=(l=e.headingHeight)!==null&&l!==void 0?l:null;var o;this.estimatedHeadingHeight=(o=e.estimatedHeadingHeight)!==null&&o!==void 0?o:null;var s;this.loaderHeight=(s=e.loaderHeight)!==null&&s!==void 0?s:null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=!1,this.validRect=new f,this.requestedRect=new f,this.contentSize=new z}}let R=null;function ue(n=!1){if(R===null||n){const e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";const i=document.createElement("div"),l=i.style;return l.width="100px",l.height="100px",e.appendChild(i),document.body.appendChild(e),e.scrollLeft>0?R="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?R="negative":R="positive-ascending"),document.body.removeChild(e),R}return R}function fe(n,e){let{scrollLeft:t}=n;if(e==="rtl"){let{scrollWidth:i,clientWidth:l}=n;switch(ue()){case"negative":t=-t;break;case"positive-descending":t=i-l-t;break}}return t}function ge(n,e){let{contentSize:t,onVisibleRectChange:i,innerStyle:l,onScrollStart:o,onScrollEnd:s,scrollDirection:a="both",...h}=n,r=c.useRef({scrollTop:0,scrollLeft:0,scrollEndTime:0,scrollTimeout:null,width:0,height:0,isScrolling:!1}).current,{direction:d}=W.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),[u,g]=c.useState(!1),y=c.useCallback(p=>{p.target===p.currentTarget&&(n.onScroll&&n.onScroll(p),T.flushSync(()=>{let m=p.currentTarget.scrollTop,H=fe(p.currentTarget,d);r.scrollTop=Math.max(0,Math.min(m,t.height-r.height)),r.scrollLeft=Math.max(0,Math.min(H,t.width-r.width)),i(new f(r.scrollLeft,r.scrollTop,r.width,r.height)),r.isScrolling||(r.isScrolling=!0,g(!0),window.dispatchEvent(new Event("tk.disconnect-observer")),o&&o());let L=Date.now();r.scrollEndTime<=L+50&&(r.scrollEndTime=L+300,r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(()=>{r.isScrolling=!1,g(!1),r.scrollTimeout=null,window.dispatchEvent(new Event("tk.connect-observer")),s&&s()},300))}))},[n,d,r,t,i,o,s]);ee.$e9faafb641e167db$export$90fc3a17d93f704c(e,"scroll",y),c.useEffect(()=>()=>{r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.isScrolling&&window.dispatchEvent(new Event("tk.connect-observer"))},[]);let v=c.useRef(!1),w=C.$8ae05eaa5c114e9c$export$7f54fc3180508a52(p=>{let m=e.current;if(!m||v.current)return;v.current=!0;let H=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,L=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"),Q=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"),O=m.clientWidth,P=m.clientHeight,N=H&&!L?1/0:O,E=H&&!Q?1/0:P;(r.width!==N||r.height!==E)&&(r.width=N,r.height=E,p(()=>{i(new f(r.scrollLeft,r.scrollTop,N,E))}),(!H&&O!==m.clientWidth||P!==m.clientHeight)&&(r.width=m.clientWidth,r.height=m.clientHeight,p(()=>{i(new f(r.scrollLeft,r.scrollTop,r.width,r.height))}))),v.current=!1}),_=c.useRef(null),[U,G]=c.useState({});C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!v.current&&(_.current==null||!t.equals(_.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){G({}),_.current=t;return}else queueMicrotask(()=>w(T.flushSync));_.current=t}),C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{w(p=>p())},[U]);let J=c.useCallback(()=>{w(T.flushSync)},[w]);Z.$9daab02d461809db$export$683480f191c0e3ea({ref:e,box:"border-box",onResize:J});let $={padding:0,...h.style};return a==="horizontal"?($.overflowX="auto",$.overflowY="hidden"):a==="vertical"||t.width===r.width?($.overflowY="auto",$.overflowX="hidden"):$.overflow="auto",l={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:u?"none":"auto",position:"relative",...l},{scrollViewProps:{...h,style:$},contentProps:{role:"presentation",style:l}}}function ye(n){let{layoutInfo:e,virtualizer:t,ref:i}=n,l=e==null?void 0:e.key,o=c.useCallback(()=>{if(l!=null&&i.current){let s=ve(i.current);t.updateItemSize(l,s)}},[t,l,i]);return C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{e!=null&&e.estimatedSize&&o()}),{updateSize:o}}function ve(n){let e=n.style.height;n.style.height="";let t=new z(n.scrollWidth,n.scrollHeight);return n.style.height=e,t}function X(n){let{style:e,className:t,layoutInfo:i,virtualizer:l,parent:o,children:s}=n,{direction:a}=W.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),h=c.useRef(null);return ye({layoutInfo:i,virtualizer:l,ref:h}),c.createElement("div",{role:"presentation",ref:h,className:t,style:{...pe(i,a,o),...e}},s)}let B=new WeakMap;function pe(n,e,t){let i=e==="rtl"?"right":"left",l=B.get(n);if(l&&l[i]!=null){if(!t)return l;let h=n.rect.y-t.rect.y,r=n.rect.x-t.rect.x;if(l.top===h&&l[i]===r)return l}let o={top:n.rect.y-(t&&!(t.allowOverflow&&n.isSticky)?t.rect.y:0),[i]:n.rect.x-(t&&!(t.allowOverflow&&n.isSticky)?t.rect.x:0),width:n.rect.width,height:n.rect.height};Object.entries(o).forEach(([h,r])=>{Number.isFinite(r)||(o[h]=void 0)});var s;let a={position:n.isSticky?"sticky":"absolute",display:n.isSticky?"inline-block":void 0,overflow:n.allowOverflow?"visible":"hidden",opacity:n.opacity,zIndex:n.zIndex,transform:(s=n.transform)!==null&&s!==void 0?s:void 0,contain:"size layout style",...o};return B.set(n,a),a}const j=c.createContext(null),A=c.createContext(null);function we(n){let{children:e,layout:t,layoutOptions:i}=n,l=c.useMemo(()=>typeof t=="function"?new t:t,[t]),o=c.useMemo(()=>({isVirtualized:!0,layoutDelegate:l,dropTargetDelegate:l.getDropTargetFromPoint?l:void 0,CollectionRoot:me,CollectionBranch:be}),[l]);return c.createElement(Y.$7135fc7d473fd974$export$4feb769f8ddf26c5.Provider,{value:o},c.createElement(A.Provider,{value:{layout:l,layoutOptions:i}},e))}function me({collection:n,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){var l;let{layout:o,layoutOptions:s}=c.useContext(A),a=(l=o.useLayoutOptions)===null||l===void 0?void 0:l.call(o),h=de({layout:o,collection:n,renderView:(d,u)=>{var g;return u==null||(g=u.render)===null||g===void 0?void 0:g.call(u,u)},onVisibleRectChange(d){let u=t==null?void 0:t.current;u&&(u.scrollLeft=d.x,u.scrollTop=d.y)},persistedKeys:e,layoutOptions:c.useMemo(()=>s&&a?{...s,...a}:s||a,[s,a])}),{contentProps:r}=ge({onVisibleRectChange:h.setVisibleRect,contentSize:h.contentSize,onScrollStart:h.startScrolling,onScrollEnd:h.endScrolling},t);return c.createElement("div",r,c.createElement(j.Provider,{value:h},F(null,h.visibleViews,i)))}function be({parent:n,renderDropIndicator:e}){let i=c.useContext(j).virtualizer.getVisibleView(n.key);return F(i,Array.from(i.children),e)}function F(n,e,t){return e.map(i=>xe(n,i,t))}function xe(n,e,t){let i=c.createElement(X,{key:e.key,layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:n==null?void 0:n.layoutInfo},e.rendered),{collection:l,layout:o}=e.virtualizer,s=e.content;return(s==null?void 0:s.type)==="item"&&t&&o.getDropTargetLayoutInfo&&(i=c.createElement(c.Fragment,{key:e.key},K(n,e,{type:"item",key:e.content.key,dropPosition:"before"},t),i,Y.$7135fc7d473fd974$export$2dbbd341daed716d(l,s,a=>K(n,e,a,t)))),i}function K(n,e,t,i){let l=i(t);if(l){let o=e.virtualizer.layout.getDropTargetLayoutInfo(t);l=c.createElement(X,{layoutInfo:o,virtualizer:e.virtualizer,parent:n==null?void 0:n.layoutInfo},l)}return l}class $e extends ce{getContentSize(){var t;const e=(t=this==null?void 0:this.virtualizer)==null?void 0:t.collection.getKeys();return Array.from(e||[]).forEach(i=>{this.getLayoutInfo(i)}),this.contentSize}}const Ie="_listBox_1f4kp_7",Re="_listBoxPopover_1f4kp_19",Se="_listBoxSectionHeading_1f4kp_31",ze="_listBoxButton_1f4kp_40",He="_listBoxItem_1f4kp_52",k={listBox:Ie,listBoxPopover:Re,listBoxSectionHeading:Se,listBoxButton:ze,listBoxItem:He},Ce=({className:n,children:e,...t})=>S.jsx(we,{layout:$e,layoutOptions:{headingHeight:44},children:S.jsx(V.$eed445e0843c11d0$export$41f133550aa26f48,{className:M.clsx(k.listBox,n),...t,children:e})}),ke=({children:n,className:e,...t})=>S.jsx(V.$eed445e0843c11d0$export$a11e76429ed99b4,{className:M.clsx(k.listBoxItem,e),...t,children:n}),_e=({className:n,children:e,...t})=>S.jsx(te.$07b14b47974efb58$export$5b6b19405a83ff9d,{className:M.clsx(n,k.listBoxPopover),offset:0,...t,children:e}),Le=({children:n,name:e,...t})=>S.jsxs(V.$eed445e0843c11d0$export$dca12b0bb56e4fc,{...t,children:[S.jsx(ie.$72a5793c14baf454$export$8b251419efc915eb,{className:k.listBoxSectionHeading,children:e}),n]});exports.ListBox=Ce;exports.ListBoxItem=ke;exports.ListBoxPopover=_e;exports.ListBoxSection=Le;exports.styles=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("./context-
|
|
1
|
+
"use strict";const u=require("./context-UOrD6Zxk.cjs"),c=require("./SelectionManager-BvREZgeu.cjs"),h=require("./scrollIntoView-DRSoJp89.cjs");let s=new Map;function g(n){let{locale:e}=u.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=e+(n?Object.entries(n).sort((l,o)=>l[0]<o[0]?-1:1).join():"");if(s.has(t))return s.get(t);let i=new Intl.Collator(e,n);return s.set(t,i),i}class a{getItemRect(e){let t=this.ref.current;if(!t)return null;let i=e!=null?c.$feb5ffebff200149$export$c3d8340acf92597f(this.ref,e):null;if(!i)return null;let l=t.getBoundingClientRect(),o=i.getBoundingClientRect();return{x:o.left-l.left+t.scrollLeft,y:o.top-l.top+t.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;var t,i;return{width:(t=e==null?void 0:e.scrollWidth)!==null&&t!==void 0?t:0,height:(i=e==null?void 0:e.scrollHeight)!==null&&i!==void 0?i:0}}getVisibleRect(){let e=this.ref.current;var t,i,l,o;return{x:(t=e==null?void 0:e.scrollLeft)!==null&&t!==void 0?t:0,y:(i=e==null?void 0:e.scrollTop)!==null&&i!==void 0?i:0,width:(l=e==null?void 0:e.offsetWidth)!==null&&l!==void 0?l:0,height:(o=e==null?void 0:e.offsetHeight)!==null&&o!==void 0?o:0}}constructor(e){this.ref=e}}class d{isDisabled(e){var t;return this.disabledBehavior==="all"&&(((t=e.props)===null||t===void 0?void 0:t.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let i=e;for(;i!=null;){let l=this.collection.getItem(i);if((l==null?void 0:l.type)==="item"&&!this.isDisabled(l))return i;i=t(i)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,i=>this.collection.getKeyAfter(i))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,i=>this.collection.getKeyBefore(i))}findKey(e,t,i){let l=e,o=this.layoutDelegate.getItemRect(l);if(!o||l==null)return null;let r=o;do{if(l=t(l),l==null)break;o=this.layoutDelegate.getItemRect(l)}while(o&&i(r,o)&&l!=null);return l}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getNextKey(t),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getPreviousKey(t),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,i=>this.layoutDelegate[t](i))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,i=>this.getNextColumn(i,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let t=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,i=>this.layoutDelegate[t](i))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,i=>this.getNextColumn(i,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyAfter(t))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyBefore(t))}getKeyPageAbove(e){let t=this.ref.current,i=this.layoutDelegate.getItemRect(e);if(!i)return null;if(t&&!h.$cc38e7bd3fc7b213$export$2bb74740c4e19def(t))return this.getFirstKey();let l=e;if(this.orientation==="horizontal"){let o=Math.max(0,i.x+i.width-this.layoutDelegate.getVisibleRect().width);for(;i&&i.x>o&&l!=null;)l=this.getKeyAbove(l),i=l==null?null:this.layoutDelegate.getItemRect(l)}else{let o=Math.max(0,i.y+i.height-this.layoutDelegate.getVisibleRect().height);for(;i&&i.y>o&&l!=null;)l=this.getKeyAbove(l),i=l==null?null:this.layoutDelegate.getItemRect(l)}return l??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,i=this.layoutDelegate.getItemRect(e);if(!i)return null;if(t&&!h.$cc38e7bd3fc7b213$export$2bb74740c4e19def(t))return this.getLastKey();let l=e;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,i.y-i.width+this.layoutDelegate.getVisibleRect().width);for(;i&&i.x<o&&l!=null;)l=this.getKeyBelow(l),i=l==null?null:this.layoutDelegate.getItemRect(l)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,i.y-i.height+this.layoutDelegate.getVisibleRect().height);for(;i&&i.y<o&&l!=null;)l=this.getKeyBelow(l),i=l==null?null:this.layoutDelegate.getItemRect(l)}return l??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let i=this.collection,l=t||this.getFirstKey();for(;l!=null;){let o=i.getItem(l);if(!o)return null;let r=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(r,e)===0)return l;l=this.getNextKey(l)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||"all",this.orientation=t.orientation||"vertical",this.direction=t.direction,this.layout=t.layout||"stack",this.layoutDelegate=t.layoutDelegate||new a(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new a(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}exports.$2a25aae57d74318e$export$a05409b8bb224a5a=d;exports.$325a3faab7a68acd$export$a16aca283550c30d=g;exports.$657e4dc4a6e88df0$export$8f5ed9ff9f511381=a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as u } from "./context-
|
|
2
|
-
import { c } from "./SelectionManager-
|
|
1
|
+
import { $ as u } from "./context-Dl_saGB6.js";
|
|
2
|
+
import { c } from "./SelectionManager-BdKKuso-.js";
|
|
3
3
|
import { $ as a } from "./scrollIntoView-ClEACHUk.js";
|
|
4
4
|
let s = /* @__PURE__ */ new Map();
|
|
5
5
|
function y(n) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/Logo.css');const c=require("react/jsx-runtime"),h=require("./clsx-C11secjj.cjs"),v=require("./useLocalizedStringFormatter-
|
|
1
|
+
"use strict";require('./assets/Logo.css');const c=require("react/jsx-runtime"),h=require("./clsx-C11secjj.cjs"),v=require("./useLocalizedStringFormatter-BSac43NO.cjs"),i="_container_1sx1z_4",x="_noPadding_1sx1z_9",g="_logo_1sx1z_13",m="_primary_1sx1z_18",p="_dark_1sx1z_22",M="_xSmall_1sx1z_26",Z="_small_1sx1z_30",u="_large_1sx1z_34",l={container:i,noPadding:x,logo:g,primary:m,dark:p,xSmall:M,small:Z,large:u},j={logotype:"Logotype of the Swedish Migration Agency"},_={logotype:"Migrationsverkets logotyp"},f={en:j,sv:_},y=({primary:o=!0,size:s="medium",padding:t=!0,className:n,...d})=>{const e=h.clsx(l.logo,o?l.primary:l.dark,s==="x-small"&&l.xSmall,s==="medium"&&l.medium,s==="large"&&l.large,s==="small"&&l.small),a=v.useLocalizedStringFormatter(f),r=()=>s==="x-small"?c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 92",className:e,role:"img","aria-hidden":"false",focusable:"false","aria-label":a.format("logotype"),children:c.jsx("path",{d:"M99.99,91.69c-1.84-1.11-4.05-4.55-4.05-9.46V9.15c0-4.79,1.96-7.25,3.81-8.85h-14.75l-33.91,65.47L12.41.3H0c1.6,1.59,3.93,3.07,3.93,8.23v75.55c0,3.56-2.21,6.51-3.81,7.61h16.34c-1.72-1.22-3.93-4.18-3.93-7.98V25.97l36.24,61.42,33.04-63.26v58.96c0,5.53-2.21,7.61-3.81,8.6h21.99Z"})}):c.jsxs("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 112 40",className:e,"aria-hidden":"false",focusable:"false","aria-label":a.format("logotype"),children:[c.jsx("path",{d:"M97.78,21.61c-7.48-9.73-20.06-16.03-34.32-16.03-13.07,0-24.86,5.27-32.46,13.65,6.56-5.83,15.64-9.44,25.66-9.44,11.37,0,21.52,4.56,28.18,11.83h12.94Z"}),c.jsx("path",{d:"M90.45,12.58C70.67-1.51,41.26,2.77,27.49,21.61h-12.23C30.56-2.89,68.29-7.47,90.45,12.58h0Z"}),c.jsx("path",{d:"M11.89,37.13c-.22-.13-.48-.53-.48-1.11v-8.58c0-.56.23-.85.45-1.04h-1.73l-3.98,7.69-4.54-7.69H.15c.19.19.46.36.46.97v8.87c0,.42-.26.76-.45.89h1.92c-.2-.14-.46-.49-.46-.94v-6.78l4.25,7.21,3.88-7.43v6.92c0,.65-.26.89-.45,1.01h2.58Z"}),c.jsx("path",{d:"M15.81,26.86c0-.45-.36-.81-.81-.81s-.81.36-.81.81.36.81.81.81.81-.36.81-.81h0ZM16.22,37.13c-.3-.23-.45-.5-.45-1.07v-6.4h-1.98c.37.19.49.58.49,1.17v5.23c0,.48-.09.79-.46,1.07h2.39Z",fillRule:"evenodd"}),c.jsx("path",{d:"M24.52,30.97c-.04-.33-.17-.68-.37-.95h-1.36c-.29-.26-.87-.58-1.96-.58-1.53,0-2.8.92-2.8,2.58,0,1.02.52,1.86,1.31,2.26-.43.37-1.38.98-1.38,1.61,0,.71.79.99,1.38,1.1-.88.26-1.67.82-1.67,1.59,0,1.14,1.73,1.41,2.64,1.41,1.54,0,3.91-.78,3.91-2.64,0-1.21-1.23-1.49-2.22-1.5-2.42-.06-2.51-.2-2.51-.56,0-.2.42-.68.55-.81.23.03.48.06.71.06,1.76,0,2.93-.94,2.93-2.7,0-.48-.14-.91-.29-1.11.12-.04.25-.04.37-.04.27,0,.55.12.76.27h0ZM22.27,32.21c0,.79-.37,1.61-1.36,1.61-1.07,0-1.47-1.21-1.47-2.09,0-.95.5-1.57,1.31-1.57,1.2,0,1.51,1.25,1.51,2.05h0ZM22.89,37.92c0,.76-.82,1.31-1.93,1.31-.59,0-1.7-.3-1.69-1.15,0-.45.26-.74.59-.99l1.96.04c.5.01,1.07.1,1.07.79h0Z",fillRule:"evenodd"}),c.jsx("path",{d:"M30.11,31.22l-.23-1.63c-.2-.1-.43-.14-.65-.14-.85,0-1.46.68-1.79,1.37v-1.15h-1.96c.45.27.48.76.48,1.14v5.19c0,.58-.1.89-.45,1.14h2.35c-.36-.29-.42-.63-.42-1.12v-4.27c.22-.58.78-1.04,1.43-1.04.46,0,.97.26,1.24.52h0Z"}),c.jsx("path",{d:"M36.87,37.13c-.37-.33-.43-.59-.43-1.25v-3.89c0-2.21-1.43-2.55-2.8-2.55-.61,0-1.67.22-2.03.42-.2.4-.3,1.24-.4,1.67.46-.56,1.27-1.37,2.39-1.37,1.18,0,1.36.82,1.36,1.7v.39l-2.21.76c-1.04.36-1.87,1.08-1.87,2.26,0,1.31.88,2.08,2.15,2.08.87,0,1.46-.43,1.93-.94v.72h1.92ZM34.95,35.62c-.26.32-.74.85-1.37.85-.75,0-1.18-.79-1.18-1.54,0-.71.35-1.15.89-1.37l1.66-.63v2.7h0Z",fillRule:"evenodd"}),c.jsx("path",{d:"M42.58,36.15c-.29.27-.71.46-1.11.46-.87,0-1.07-.98-1.07-1.66v-4.51h.85c.43,0,.94.13,1.33.35l-.17-1.12h-2v-1.76c-.68.95-1.54,1.96-2.58,2.54h1.1v4.43c0,1.43.32,2.47,1.95,2.47.48,0,.98-.1,1.38-.36.14-.25.25-.55.33-.82h0Z"}),c.jsx("path",{d:"M45.63,26.86c0-.45-.36-.81-.81-.81s-.81.36-.81.81.36.81.81.81.81-.36.81-.81h0ZM46.04,37.13c-.3-.23-.45-.5-.45-1.07v-6.4h-1.98c.37.19.49.58.49,1.17v5.23c0,.48-.09.79-.46,1.07h2.39Z",fillRule:"evenodd"}),c.jsx("path",{d:"M54.96,33.37c0-2.06-1.3-3.95-3.5-3.95s-3.84,1.76-3.84,4.01c0,2.06,1.28,3.95,3.49,3.95s3.85-1.76,3.85-4.01h0ZM53.43,34.04c0,1.27-.52,2.57-1.86,2.57-1.79,0-2.42-2.44-2.42-3.86,0-1.21.48-2.57,1.87-2.57,1.79,0,2.41,2.44,2.41,3.86h0Z",fillRule:"evenodd"}),c.jsx("path",{d:"M63.37,37.13c-.27-.22-.45-.42-.45-1.11v-3.94c0-1.63-.39-2.64-2.18-2.64-1.01,0-1.79.56-2.38,1.12v-.91h-1.98c.3.17.49.46.49,1.05v5.33c0,.59-.14.88-.48,1.08h2.39c-.23-.23-.43-.37-.43-1.17v-4.4c.32-.45,1.07-1.24,1.85-1.24,1.01,0,1.23,1.01,1.23,1.8v3.95c0,.74-.26.87-.46,1.05h2.39Z"}),c.jsx("path",{d:"M69.79,35.2c0-2.21-3.42-2.71-3.42-4.07,0-.75.71-.98,1.34-.98s1.33.29,1.74.81l-.07-1.18c-.46-.17-1.11-.35-1.69-.35-1.44,0-2.68.63-2.68,1.89,0,2.36,3.46,2.68,3.46,4.25,0,.79-.62,1.05-1.31,1.05-1.01,0-1.86-.46-2.52-1.21v.1c0,.4-.03.99.3,1.27.53.43,1.53.56,2.18.56,1.36,0,2.67-.62,2.67-2.15h0Z",fillRule:"evenodd"}),c.jsx("path",{d:"M77.98,29.66h-1.43c.13.1.11.56-.19,1.33l-1.86,4.72-1.87-4.7c-.26-.65-.32-1.15-.16-1.34h-2.06c.19.1.49.85.82,1.67l2.31,5.8h1.31l2.35-5.97c.32-.81.56-1.36.78-1.5h0Z"}),c.jsx("path",{d:"M84.91,33.54v-.23c0-1.92-.62-3.88-2.88-3.88s-3.56,2.02-3.56,4.11,1.41,3.81,3.58,3.81c.78,0,1.62-.17,2.13-.45.32-.35.49-.79.59-1.27-.69.5-1.41.84-2.31.84-1.49,0-2.35-1.57-2.38-2.88l4.83-.04h0ZM83.34,32.88c-1.1.09-2.16.1-3.27.1.01-.78.29-2.83,1.7-2.83,1.33,0,1.57,1.72,1.57,2.73h0Z",fillRule:"evenodd"}),c.jsx("path",{d:"M90.95,31.22l-.23-1.63c-.2-.1-.43-.14-.65-.14-.85,0-1.46.68-1.79,1.37v-1.15h-1.96c.45.27.48.76.48,1.14v5.19c0,.58-.1.89-.45,1.14h2.35c-.36-.29-.42-.63-.42-1.12v-4.27c.22-.58.78-1.04,1.43-1.04.46,0,.97.26,1.24.52h0Z"}),c.jsx("path",{d:"M99.79,37.16c-2.26-.37-2.49-4.04-4.7-4.04l2.62-2.8c.22-.23.5-.48.75-.66h-1.77c.14.14.13.39-.13.66l-2.65,2.83v-7.07h-1.98c.33.2.49.56.49,1.01v9.01c0,.58-.22.81-.46,1.02h2.35c-.26-.25-.4-.49-.4-1.02v-2.57c.27,0,.62.13.82.26,1.28.82,1.95,3.11,2.67,3.45.14.07.94.1,1.14.1.45,0,.84-.03,1.25-.19h0Z"}),c.jsx("path",{d:"M106.3,33.54v-.23c0-1.92-.62-3.88-2.88-3.88s-3.56,2.02-3.56,4.11,1.41,3.81,3.58,3.81c.78,0,1.62-.17,2.13-.45.32-.35.49-.79.59-1.27-.69.5-1.41.84-2.31.84-1.49,0-2.35-1.57-2.38-2.88l4.83-.04h0ZM104.73,32.88c-1.1.09-2.16.1-3.27.1.01-.78.29-2.83,1.7-2.83,1.33,0,1.57,1.72,1.57,2.73h0Z",fillRule:"evenodd"}),c.jsx("path",{d:"M111.85,36.15c-.29.27-.71.46-1.11.46-.86,0-1.07-.98-1.07-1.66v-4.51h.85c.43,0,.94.13,1.33.35l-.17-1.12h-2v-1.76c-.68.95-1.54,1.96-2.58,2.54h1.1v4.43c0,1.43.32,2.47,1.95,2.47.48,0,.98-.1,1.38-.36.14-.25.25-.55.33-.82h0Z"})]});return c.jsx("div",{className:h.clsx(l.container,t===!1&&l.noPadding,n),...d,children:c.jsx(r,{})})};exports.Logo=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c, jsxs as v } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "./clsx-OuTLNxxd.js";
|
|
3
|
-
import { u as i } from "./useLocalizedStringFormatter-
|
|
3
|
+
import { u as i } from "./useLocalizedStringFormatter-aOhh7wdl.js";
|
|
4
4
|
import './assets/Logo.css';const m = "_container_1sx1z_4", p = "_noPadding_1sx1z_9", g = "_logo_1sx1z_13", M = "_primary_1sx1z_18", Z = "_dark_1sx1z_22", _ = "_xSmall_1sx1z_26", f = "_small_1sx1z_30", x = "_large_1sx1z_34", l = {
|
|
5
5
|
container: m,
|
|
6
6
|
noPadding: p,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const B=require("./mergeProps-B5KXZAI3.cjs"),fe=require("react-dom"),w=require("react"),ue=require("./useHover-BE_XKZKe.cjs"),G=require("./number-E0x3H9cL.cjs"),pe=require("./context-Df3XbgBG.cjs"),$e=require("./useControlledState-D0L6S_5r.cjs"),Q=require("./utils-DHNZrQmj.cjs"),me=require("./filterDOMProps-BS2lrgFA.cjs");function ve(){return typeof window.ResizeObserver<"u"}function J(t){const{ref:e,box:l,onResize:n}=t;w.useEffect(()=>{let o=e==null?void 0:e.current;if(o)if(ve()){const r=new window.ResizeObserver(c=>{c.length&&n()});return r.observe(o,{box:l}),()=>{o&&r.unobserve(o)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,e,l])}function ge(t,e=!0){let[l,n]=w.useState(!0),o=l&&e;return B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let r of t.current.getAnimations())r instanceof CSSTransition&&r.cancel()},[t,o]),le(t,o,w.useCallback(()=>n(!1),[])),o}function be(t,e){let[l,n]=w.useState(e?"open":"closed");switch(l){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=l==="exiting";return le(t,o,w.useCallback(()=>{n(r=>r==="exiting"?"closed":r)},[])),o}function le(t,e,l){B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){l();return}let n=t.current.getAnimations();if(n.length===0){l();return}let o=!1;return Promise.all(n.map(r=>r.finished)).then(()=>{o||fe.flushSync(()=>{l()})}).catch(()=>{}),()=>{o=!0}}},[t,e,l])}const M={top:"top",bottom:"top",left:"left",right:"left"},X={top:"bottom",bottom:"top",left:"right",right:"left"},he={top:"left",left:"top"},K={top:"height",left:"width"},ne={width:"totalWidth",height:"totalHeight"},Y={};let P=typeof document<"u"?window.visualViewport:null;function W(t){let e=0,l=0,n=0,o=0,r=0,c=0,i={};var g;let d=((g=P==null?void 0:P.scale)!==null&&g!==void 0?g:1)>1;if(t.tagName==="BODY"){let f=document.documentElement;n=f.clientWidth,o=f.clientHeight;var u;e=(u=P==null?void 0:P.width)!==null&&u!==void 0?u:n;var v;l=(v=P==null?void 0:P.height)!==null&&v!==void 0?v:o,i.top=f.scrollTop||t.scrollTop,i.left=f.scrollLeft||t.scrollLeft,P&&(r=P.offsetTop,c=P.offsetLeft)}else({width:e,height:l,top:r,left:c}=q(t)),i.top=t.scrollTop,i.left=t.scrollLeft,n=e,o=l;if(ue.$c87311424ea30a05$export$78551043582a6a98()&&(t.tagName==="BODY"||t.tagName==="HTML")&&d){i.top=0,i.left=0;var p;r=(p=P==null?void 0:P.pageTop)!==null&&p!==void 0?p:0;var a;c=(a=P==null?void 0:P.pageLeft)!==null&&a!==void 0?a:0}return{width:e,height:l,totalWidth:n,totalHeight:o,scroll:i,top:r,left:c}}function xe(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function D(t,e,l,n,o,r,c){var i;let g=(i=o.scroll[t])!==null&&i!==void 0?i:0,d=n[K[t]],u=n.scroll[M[t]]+r,v=d+n.scroll[M[t]]-r,p=e-g+c[t]-n[M[t]],a=e-g+l+c[t]-n[M[t]];return p<u?u-p:a>v?Math.max(v-a,u-p):0}function we(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function V(t){if(Y[t])return Y[t];let[e,l]=t.split(" "),n=M[e]||"right",o=he[n];M[l]||(l="center");let r=K[n],c=K[o];return Y[t]={placement:e,crossPlacement:l,axis:n,crossAxis:o,size:r,crossSize:c},Y[t]}function U(t,e,l,n,o,r,c,i,g,d){let{placement:u,crossPlacement:v,axis:p,crossAxis:a,size:f,crossSize:b}=n,s={};var $;s[a]=($=t[a])!==null&&$!==void 0?$:0;var m,C,T,S;v==="center"?s[a]+=(((m=t[b])!==null&&m!==void 0?m:0)-((C=l[b])!==null&&C!==void 0?C:0))/2:v!==a&&(s[a]+=((T=t[b])!==null&&T!==void 0?T:0)-((S=l[b])!==null&&S!==void 0?S:0)),s[a]+=r;const h=t[a]-l[b]+g+d,y=t[a]+t[b]-g-d;if(s[a]=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(s[a],h,y),u===p){const A=i?c[f]:e[ne[f]];s[X[p]]=Math.floor(A-t[p]+o)}else s[p]=Math.floor(t[p]+t[f]+o);return s}function Ee(t,e,l,n,o,r,c,i){const g=n?l.height:e[ne.height];var d;let u=t.top!=null?l.top+t.top:l.top+(g-((d=t.bottom)!==null&&d!==void 0?d:0)-c);var v,p,a,f,b,s;let $=i!=="top"?Math.max(0,e.height+e.top+((v=e.scroll.top)!==null&&v!==void 0?v:0)-u-(((p=o.top)!==null&&p!==void 0?p:0)+((a=o.bottom)!==null&&a!==void 0?a:0)+r)):Math.max(0,u+c-(e.top+((f=e.scroll.top)!==null&&f!==void 0?f:0))-(((b=o.top)!==null&&b!==void 0?b:0)+((s=o.bottom)!==null&&s!==void 0?s:0)+r));return Math.min(e.height-r*2,$)}function ee(t,e,l,n,o,r){let{placement:c,axis:i,size:g}=r;var d,u;if(c===i)return Math.max(0,l[i]-t[i]-((d=t.scroll[i])!==null&&d!==void 0?d:0)+e[i]-((u=n[i])!==null&&u!==void 0?u:0)-n[X[i]]-o);var v;return Math.max(0,t[g]+t[i]+t.scroll[i]-e[i]-l[i]-l[g]-((v=n[i])!==null&&v!==void 0?v:0)-n[X[i]]-o)}function Ce(t,e,l,n,o,r,c,i,g,d,u,v,p,a,f,b){let s=V(t),{size:$,crossAxis:m,crossSize:C,placement:T,crossPlacement:S}=s,h=U(e,i,l,s,u,v,d,p,f,b),y=u,A=ee(i,d,e,o,r+u,s);if(c&&n[$]>A){let j=V(`${X[T]} ${S}`),de=U(e,i,l,j,u,v,d,p,f,b);ee(i,d,e,o,r+u,j)>A&&(s=j,h=de,y=u)}let z="bottom";s.axis==="top"?s.placement==="top"?z="top":s.placement==="bottom"&&(z="bottom"):s.crossAxis==="top"&&(s.crossPlacement==="top"?z="bottom":s.crossPlacement==="bottom"&&(z="top"));let E=D(m,h[m],l[C],i,g,r,d);h[m]+=E;let R=Ee(h,i,d,p,o,r,l.height,z);a&&a<R&&(R=a),l.height=Math.min(l.height,R),h=U(e,i,l,s,y,v,d,p,f,b),E=D(m,h[m],l[C],i,g,r,d),h[m]+=E;let H={},O=e[m]+.5*e[C]-h[m]-o[M[m]];const _=f/2+b;var k,N,I,L;const F=M[m]==="left"?((k=o.left)!==null&&k!==void 0?k:0)+((N=o.right)!==null&&N!==void 0?N:0):((I=o.top)!==null&&I!==void 0?I:0)+((L=o.bottom)!==null&&L!==void 0?L:0),Z=l[C]-F-f/2-b,ae=e[m]+f/2-(h[m]+o[M[m]]),ce=e[m]+e[C]-f/2-(h[m]+o[M[m]]),se=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(O,ae,ce);return H[m]=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(se,_,Z),{position:h,maxHeight:R,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:s.placement}}function Pe(t){let{placement:e,targetNode:l,overlayNode:n,scrollNode:o,padding:r,shouldFlip:c,boundaryElement:i,offset:g,crossOffset:d,maxHeight:u,arrowSize:v=0,arrowBoundaryOffset:p=0}=t,a=n instanceof HTMLElement?Se(n):document.documentElement,f=a===document.documentElement;const b=window.getComputedStyle(a).position;let s=!!b&&b!=="static",$=f?q(l):te(l,a);if(!f){let{marginTop:H,marginLeft:O}=window.getComputedStyle(l);$.top+=parseInt(H,10)||0,$.left+=parseInt(O,10)||0}let m=q(n),C=we(n);var T,S;m.width+=((T=C.left)!==null&&T!==void 0?T:0)+((S=C.right)!==null&&S!==void 0?S:0);var h,y;m.height+=((h=C.top)!==null&&h!==void 0?h:0)+((y=C.bottom)!==null&&y!==void 0?y:0);let A=xe(o),z=W(i),E=W(a),R=i.tagName==="BODY"?q(a):te(a,i);return a.tagName==="HTML"&&i.tagName==="BODY"&&(E.scroll.top=0,E.scroll.left=0),Ce(e,$,m,A,C,r,c,z,E,R,g,d,s,u,v,p)}function q(t){let{top:e,left:l,width:n,height:o}=t.getBoundingClientRect(),{scrollTop:r,scrollLeft:c,clientTop:i,clientLeft:g}=document.documentElement;return{top:e+r-i,left:l+c-g,width:n,height:o}}function te(t,e){let l=window.getComputedStyle(t),n;if(l.position==="fixed"){let{top:o,left:r,width:c,height:i}=t.getBoundingClientRect();n={top:o,left:r,width:c,height:i}}else{n=q(t);let o=q(e),r=window.getComputedStyle(e);o.top+=(parseInt(r.borderTopWidth,10)||0)-e.scrollTop,o.left+=(parseInt(r.borderLeftWidth,10)||0)-e.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(l.marginTop,10)||0,n.left-=parseInt(l.marginLeft,10)||0,n}function Se(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!oe(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!oe(e);)e=e.parentElement;return e||document.documentElement}function oe(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const re=new WeakMap;function Le(t){let{triggerRef:e,isOpen:l,onClose:n}=t;w.useEffect(()=>{if(!l||n===null)return;let o=r=>{let c=r.target;if(!e.current||c instanceof Node&&!c.contains(e.current)||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement)return;let i=n||re.get(e.current);i&&i()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[l,n,e])}let x=typeof document<"u"?window.visualViewport:null;function Re(t){let{direction:e}=pe.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{arrowSize:l=0,targetRef:n,overlayRef:o,scrollRef:r=o,placement:c="bottom",containerPadding:i=12,shouldFlip:g=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:u=0,crossOffset:v=0,shouldUpdatePosition:p=!0,isOpen:a=!0,onClose:f,maxHeight:b,arrowBoundaryOffset:s=0}=t,[$,m]=w.useState(null),C=[p,c,o.current,n.current,r.current,i,g,d,u,v,a,e,b,s,l],T=w.useRef(x==null?void 0:x.scale);w.useEffect(()=>{a&&(T.current=x==null?void 0:x.scale)},[a]);let S=w.useCallback(()=>{if(p===!1||!a||!o.current||!n.current||!d||(x==null?void 0:x.scale)!==T.current)return;let E=null;if(r.current&&r.current.contains(document.activeElement)){var R;let L=(R=document.activeElement)===null||R===void 0?void 0:R.getBoundingClientRect(),F=r.current.getBoundingClientRect();var H;if(E={type:"top",offset:((H=L==null?void 0:L.top)!==null&&H!==void 0?H:0)-F.top},E.offset>F.height/2){E.type="bottom";var O;E.offset=((O=L==null?void 0:L.bottom)!==null&&O!==void 0?O:0)-F.bottom}}let _=o.current;if(!b&&o.current){var k;_.style.top="0px",_.style.bottom="";var N;_.style.maxHeight=((N=(k=window.visualViewport)===null||k===void 0?void 0:k.height)!==null&&N!==void 0?N:window.innerHeight)+"px"}let I=Pe({placement:He(c,e),overlayNode:o.current,targetNode:n.current,scrollNode:r.current||o.current,padding:i,shouldFlip:g,boundaryElement:d,offset:u,crossOffset:v,maxHeight:b,arrowSize:l,arrowBoundaryOffset:s});if(I.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(I.position).forEach(L=>_.style[L]=I.position[L]+"px"),_.style.maxHeight=I.maxHeight!=null?I.maxHeight+"px":"",E&&document.activeElement&&r.current){let L=document.activeElement.getBoundingClientRect(),F=r.current.getBoundingClientRect(),Z=L[E.type]-F[E.type];r.current.scrollTop+=Z-E.offset}m(I)}},C);B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(S,C),Te(S),J({ref:o,onResize:S}),J({ref:n,onResize:S});let h=w.useRef(!1);B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let E,R=()=>{h.current=!0,clearTimeout(E),E=setTimeout(()=>{h.current=!1},500),S()},H=()=>{h.current&&R()};return x==null||x.addEventListener("resize",R),x==null||x.addEventListener("scroll",H),()=>{x==null||x.removeEventListener("resize",R),x==null||x.removeEventListener("scroll",H)}},[S]);let y=w.useCallback(()=>{h.current||f==null||f()},[f,h]);Le({triggerRef:n,isOpen:a,onClose:f&&y});var A,z;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...$==null?void 0:$.position,maxHeight:(A=$==null?void 0:$.maxHeight)!==null&&A!==void 0?A:"100vh"}},placement:(z=$==null?void 0:$.placement)!==null&&z!==void 0?z:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$==null?void 0:$.arrowOffsetLeft,top:$==null?void 0:$.arrowOffsetTop}},updatePosition:S}}function Te(t){B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function He(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const ze=w.createContext({});function _e(){var t;return(t=w.useContext(ze))!==null&&t!==void 0?t:{}}function ye(t){let[e,l]=$e.$458b0a5536c1a7cf$export$40bfa8c7b0832715(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const n=w.useCallback(()=>{l(!0)},[l]),o=w.useCallback(()=>{l(!1)},[l]),r=w.useCallback(()=>{l(!e)},[l,e]);return{isOpen:e,setOpen:l,open:n,close:o,toggle:r}}const ie=w.createContext({placement:"bottom"}),Ae=w.forwardRef(function(e,l){[e,l]=Q.$64fa3d84918910a7$export$29f1550f4b0d4415(e,l,ie);let n=e.placement,o={position:"absolute",transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"};n!=null&&(o[n]="100%");let r=Q.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-OverlayArrow",values:{placement:n}});r.style&&Object.keys(r.style).forEach(i=>r.style[i]===void 0&&delete r.style[i]);let c=me.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e);return w.createElement("div",{...c,...r,style:{...o,...r.style},ref:l,"data-placement":n})});exports.$2a41e45df1593e64$export$d39e1813b3bdd0e1=Re;exports.$44f671af83e7d9e0$export$2de4954e8ae13b9f=ie;exports.$44f671af83e7d9e0$export$746d02f47f4d381=Ae;exports.$96b38030c423d352$export$9fc1347d4195ccb3=_e;exports.$9daab02d461809db$export$683480f191c0e3ea=J;exports.$d3f049242431219c$export$45fda7c47f93fd48=be;exports.$d3f049242431219c$export$6d3443f2c48bfc20=ge;exports.$dd149f63282afbbf$export$f6211563215e3b37=re;exports.$fc909762b330b746$export$61c6a8c84e605fb6=ye;
|
|
1
|
+
"use strict";const B=require("./mergeProps-C7Sx47fA.cjs"),fe=require("react-dom"),w=require("react"),ue=require("./useHover-CaFzQrR_.cjs"),G=require("./number-E0x3H9cL.cjs"),pe=require("./context-UOrD6Zxk.cjs"),$e=require("./useControlledState-D0L6S_5r.cjs"),Q=require("./utils-BM2vxlNA.cjs"),me=require("./filterDOMProps-BS2lrgFA.cjs");function ve(){return typeof window.ResizeObserver<"u"}function J(t){const{ref:e,box:l,onResize:n}=t;w.useEffect(()=>{let o=e==null?void 0:e.current;if(o)if(ve()){const r=new window.ResizeObserver(c=>{c.length&&n()});return r.observe(o,{box:l}),()=>{o&&r.unobserve(o)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,e,l])}function ge(t,e=!0){let[l,n]=w.useState(!0),o=l&&e;return B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let r of t.current.getAnimations())r instanceof CSSTransition&&r.cancel()},[t,o]),le(t,o,w.useCallback(()=>n(!1),[])),o}function be(t,e){let[l,n]=w.useState(e?"open":"closed");switch(l){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=l==="exiting";return le(t,o,w.useCallback(()=>{n(r=>r==="exiting"?"closed":r)},[])),o}function le(t,e,l){B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){l();return}let n=t.current.getAnimations();if(n.length===0){l();return}let o=!1;return Promise.all(n.map(r=>r.finished)).then(()=>{o||fe.flushSync(()=>{l()})}).catch(()=>{}),()=>{o=!0}}},[t,e,l])}const M={top:"top",bottom:"top",left:"left",right:"left"},X={top:"bottom",bottom:"top",left:"right",right:"left"},he={top:"left",left:"top"},K={top:"height",left:"width"},ne={width:"totalWidth",height:"totalHeight"},Y={};let P=typeof document<"u"?window.visualViewport:null;function W(t){let e=0,l=0,n=0,o=0,r=0,c=0,i={};var g;let d=((g=P==null?void 0:P.scale)!==null&&g!==void 0?g:1)>1;if(t.tagName==="BODY"){let f=document.documentElement;n=f.clientWidth,o=f.clientHeight;var u;e=(u=P==null?void 0:P.width)!==null&&u!==void 0?u:n;var v;l=(v=P==null?void 0:P.height)!==null&&v!==void 0?v:o,i.top=f.scrollTop||t.scrollTop,i.left=f.scrollLeft||t.scrollLeft,P&&(r=P.offsetTop,c=P.offsetLeft)}else({width:e,height:l,top:r,left:c}=q(t)),i.top=t.scrollTop,i.left=t.scrollLeft,n=e,o=l;if(ue.$c87311424ea30a05$export$78551043582a6a98()&&(t.tagName==="BODY"||t.tagName==="HTML")&&d){i.top=0,i.left=0;var p;r=(p=P==null?void 0:P.pageTop)!==null&&p!==void 0?p:0;var a;c=(a=P==null?void 0:P.pageLeft)!==null&&a!==void 0?a:0}return{width:e,height:l,totalWidth:n,totalHeight:o,scroll:i,top:r,left:c}}function xe(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function D(t,e,l,n,o,r,c){var i;let g=(i=o.scroll[t])!==null&&i!==void 0?i:0,d=n[K[t]],u=n.scroll[M[t]]+r,v=d+n.scroll[M[t]]-r,p=e-g+c[t]-n[M[t]],a=e-g+l+c[t]-n[M[t]];return p<u?u-p:a>v?Math.max(v-a,u-p):0}function we(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function V(t){if(Y[t])return Y[t];let[e,l]=t.split(" "),n=M[e]||"right",o=he[n];M[l]||(l="center");let r=K[n],c=K[o];return Y[t]={placement:e,crossPlacement:l,axis:n,crossAxis:o,size:r,crossSize:c},Y[t]}function U(t,e,l,n,o,r,c,i,g,d){let{placement:u,crossPlacement:v,axis:p,crossAxis:a,size:f,crossSize:b}=n,s={};var $;s[a]=($=t[a])!==null&&$!==void 0?$:0;var m,C,T,S;v==="center"?s[a]+=(((m=t[b])!==null&&m!==void 0?m:0)-((C=l[b])!==null&&C!==void 0?C:0))/2:v!==a&&(s[a]+=((T=t[b])!==null&&T!==void 0?T:0)-((S=l[b])!==null&&S!==void 0?S:0)),s[a]+=r;const h=t[a]-l[b]+g+d,y=t[a]+t[b]-g-d;if(s[a]=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(s[a],h,y),u===p){const A=i?c[f]:e[ne[f]];s[X[p]]=Math.floor(A-t[p]+o)}else s[p]=Math.floor(t[p]+t[f]+o);return s}function Ee(t,e,l,n,o,r,c,i){const g=n?l.height:e[ne.height];var d;let u=t.top!=null?l.top+t.top:l.top+(g-((d=t.bottom)!==null&&d!==void 0?d:0)-c);var v,p,a,f,b,s;let $=i!=="top"?Math.max(0,e.height+e.top+((v=e.scroll.top)!==null&&v!==void 0?v:0)-u-(((p=o.top)!==null&&p!==void 0?p:0)+((a=o.bottom)!==null&&a!==void 0?a:0)+r)):Math.max(0,u+c-(e.top+((f=e.scroll.top)!==null&&f!==void 0?f:0))-(((b=o.top)!==null&&b!==void 0?b:0)+((s=o.bottom)!==null&&s!==void 0?s:0)+r));return Math.min(e.height-r*2,$)}function ee(t,e,l,n,o,r){let{placement:c,axis:i,size:g}=r;var d,u;if(c===i)return Math.max(0,l[i]-t[i]-((d=t.scroll[i])!==null&&d!==void 0?d:0)+e[i]-((u=n[i])!==null&&u!==void 0?u:0)-n[X[i]]-o);var v;return Math.max(0,t[g]+t[i]+t.scroll[i]-e[i]-l[i]-l[g]-((v=n[i])!==null&&v!==void 0?v:0)-n[X[i]]-o)}function Ce(t,e,l,n,o,r,c,i,g,d,u,v,p,a,f,b){let s=V(t),{size:$,crossAxis:m,crossSize:C,placement:T,crossPlacement:S}=s,h=U(e,i,l,s,u,v,d,p,f,b),y=u,A=ee(i,d,e,o,r+u,s);if(c&&n[$]>A){let j=V(`${X[T]} ${S}`),de=U(e,i,l,j,u,v,d,p,f,b);ee(i,d,e,o,r+u,j)>A&&(s=j,h=de,y=u)}let z="bottom";s.axis==="top"?s.placement==="top"?z="top":s.placement==="bottom"&&(z="bottom"):s.crossAxis==="top"&&(s.crossPlacement==="top"?z="bottom":s.crossPlacement==="bottom"&&(z="top"));let E=D(m,h[m],l[C],i,g,r,d);h[m]+=E;let R=Ee(h,i,d,p,o,r,l.height,z);a&&a<R&&(R=a),l.height=Math.min(l.height,R),h=U(e,i,l,s,y,v,d,p,f,b),E=D(m,h[m],l[C],i,g,r,d),h[m]+=E;let H={},O=e[m]+.5*e[C]-h[m]-o[M[m]];const _=f/2+b;var k,N,I,L;const F=M[m]==="left"?((k=o.left)!==null&&k!==void 0?k:0)+((N=o.right)!==null&&N!==void 0?N:0):((I=o.top)!==null&&I!==void 0?I:0)+((L=o.bottom)!==null&&L!==void 0?L:0),Z=l[C]-F-f/2-b,ae=e[m]+f/2-(h[m]+o[M[m]]),ce=e[m]+e[C]-f/2-(h[m]+o[M[m]]),se=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(O,ae,ce);return H[m]=G.$9446cca9a3875146$export$7d15b64cf5a3a4c4(se,_,Z),{position:h,maxHeight:R,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:s.placement}}function Pe(t){let{placement:e,targetNode:l,overlayNode:n,scrollNode:o,padding:r,shouldFlip:c,boundaryElement:i,offset:g,crossOffset:d,maxHeight:u,arrowSize:v=0,arrowBoundaryOffset:p=0}=t,a=n instanceof HTMLElement?Se(n):document.documentElement,f=a===document.documentElement;const b=window.getComputedStyle(a).position;let s=!!b&&b!=="static",$=f?q(l):te(l,a);if(!f){let{marginTop:H,marginLeft:O}=window.getComputedStyle(l);$.top+=parseInt(H,10)||0,$.left+=parseInt(O,10)||0}let m=q(n),C=we(n);var T,S;m.width+=((T=C.left)!==null&&T!==void 0?T:0)+((S=C.right)!==null&&S!==void 0?S:0);var h,y;m.height+=((h=C.top)!==null&&h!==void 0?h:0)+((y=C.bottom)!==null&&y!==void 0?y:0);let A=xe(o),z=W(i),E=W(a),R=i.tagName==="BODY"?q(a):te(a,i);return a.tagName==="HTML"&&i.tagName==="BODY"&&(E.scroll.top=0,E.scroll.left=0),Ce(e,$,m,A,C,r,c,z,E,R,g,d,s,u,v,p)}function q(t){let{top:e,left:l,width:n,height:o}=t.getBoundingClientRect(),{scrollTop:r,scrollLeft:c,clientTop:i,clientLeft:g}=document.documentElement;return{top:e+r-i,left:l+c-g,width:n,height:o}}function te(t,e){let l=window.getComputedStyle(t),n;if(l.position==="fixed"){let{top:o,left:r,width:c,height:i}=t.getBoundingClientRect();n={top:o,left:r,width:c,height:i}}else{n=q(t);let o=q(e),r=window.getComputedStyle(e);o.top+=(parseInt(r.borderTopWidth,10)||0)-e.scrollTop,o.left+=(parseInt(r.borderLeftWidth,10)||0)-e.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(l.marginTop,10)||0,n.left-=parseInt(l.marginLeft,10)||0,n}function Se(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!oe(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!oe(e);)e=e.parentElement;return e||document.documentElement}function oe(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const re=new WeakMap;function Le(t){let{triggerRef:e,isOpen:l,onClose:n}=t;w.useEffect(()=>{if(!l||n===null)return;let o=r=>{let c=r.target;if(!e.current||c instanceof Node&&!c.contains(e.current)||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement)return;let i=n||re.get(e.current);i&&i()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[l,n,e])}let x=typeof document<"u"?window.visualViewport:null;function Re(t){let{direction:e}=pe.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{arrowSize:l=0,targetRef:n,overlayRef:o,scrollRef:r=o,placement:c="bottom",containerPadding:i=12,shouldFlip:g=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:u=0,crossOffset:v=0,shouldUpdatePosition:p=!0,isOpen:a=!0,onClose:f,maxHeight:b,arrowBoundaryOffset:s=0}=t,[$,m]=w.useState(null),C=[p,c,o.current,n.current,r.current,i,g,d,u,v,a,e,b,s,l],T=w.useRef(x==null?void 0:x.scale);w.useEffect(()=>{a&&(T.current=x==null?void 0:x.scale)},[a]);let S=w.useCallback(()=>{if(p===!1||!a||!o.current||!n.current||!d||(x==null?void 0:x.scale)!==T.current)return;let E=null;if(r.current&&r.current.contains(document.activeElement)){var R;let L=(R=document.activeElement)===null||R===void 0?void 0:R.getBoundingClientRect(),F=r.current.getBoundingClientRect();var H;if(E={type:"top",offset:((H=L==null?void 0:L.top)!==null&&H!==void 0?H:0)-F.top},E.offset>F.height/2){E.type="bottom";var O;E.offset=((O=L==null?void 0:L.bottom)!==null&&O!==void 0?O:0)-F.bottom}}let _=o.current;if(!b&&o.current){var k;_.style.top="0px",_.style.bottom="";var N;_.style.maxHeight=((N=(k=window.visualViewport)===null||k===void 0?void 0:k.height)!==null&&N!==void 0?N:window.innerHeight)+"px"}let I=Pe({placement:He(c,e),overlayNode:o.current,targetNode:n.current,scrollNode:r.current||o.current,padding:i,shouldFlip:g,boundaryElement:d,offset:u,crossOffset:v,maxHeight:b,arrowSize:l,arrowBoundaryOffset:s});if(I.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(I.position).forEach(L=>_.style[L]=I.position[L]+"px"),_.style.maxHeight=I.maxHeight!=null?I.maxHeight+"px":"",E&&document.activeElement&&r.current){let L=document.activeElement.getBoundingClientRect(),F=r.current.getBoundingClientRect(),Z=L[E.type]-F[E.type];r.current.scrollTop+=Z-E.offset}m(I)}},C);B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(S,C),Te(S),J({ref:o,onResize:S}),J({ref:n,onResize:S});let h=w.useRef(!1);B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let E,R=()=>{h.current=!0,clearTimeout(E),E=setTimeout(()=>{h.current=!1},500),S()},H=()=>{h.current&&R()};return x==null||x.addEventListener("resize",R),x==null||x.addEventListener("scroll",H),()=>{x==null||x.removeEventListener("resize",R),x==null||x.removeEventListener("scroll",H)}},[S]);let y=w.useCallback(()=>{h.current||f==null||f()},[f,h]);Le({triggerRef:n,isOpen:a,onClose:f&&y});var A,z;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...$==null?void 0:$.position,maxHeight:(A=$==null?void 0:$.maxHeight)!==null&&A!==void 0?A:"100vh"}},placement:(z=$==null?void 0:$.placement)!==null&&z!==void 0?z:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$==null?void 0:$.arrowOffsetLeft,top:$==null?void 0:$.arrowOffsetTop}},updatePosition:S}}function Te(t){B.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function He(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const ze=w.createContext({});function _e(){var t;return(t=w.useContext(ze))!==null&&t!==void 0?t:{}}function ye(t){let[e,l]=$e.$458b0a5536c1a7cf$export$40bfa8c7b0832715(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const n=w.useCallback(()=>{l(!0)},[l]),o=w.useCallback(()=>{l(!1)},[l]),r=w.useCallback(()=>{l(!e)},[l,e]);return{isOpen:e,setOpen:l,open:n,close:o,toggle:r}}const ie=w.createContext({placement:"bottom"}),Ae=w.forwardRef(function(e,l){[e,l]=Q.$64fa3d84918910a7$export$29f1550f4b0d4415(e,l,ie);let n=e.placement,o={position:"absolute",transform:n==="top"||n==="bottom"?"translateX(-50%)":"translateY(-50%)"};n!=null&&(o[n]="100%");let r=Q.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-OverlayArrow",values:{placement:n}});r.style&&Object.keys(r.style).forEach(i=>r.style[i]===void 0&&delete r.style[i]);let c=me.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e);return w.createElement("div",{...c,...r,style:{...o,...r.style},ref:l,"data-placement":n})});exports.$2a41e45df1593e64$export$d39e1813b3bdd0e1=Re;exports.$44f671af83e7d9e0$export$2de4954e8ae13b9f=ie;exports.$44f671af83e7d9e0$export$746d02f47f4d381=Ae;exports.$96b38030c423d352$export$9fc1347d4195ccb3=_e;exports.$9daab02d461809db$export$683480f191c0e3ea=J;exports.$d3f049242431219c$export$45fda7c47f93fd48=be;exports.$d3f049242431219c$export$6d3443f2c48bfc20=ge;exports.$dd149f63282afbbf$export$f6211563215e3b37=re;exports.$fc909762b330b746$export$61c6a8c84e605fb6=ye;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as Y } from "./mergeProps-
|
|
1
|
+
import { $ as Y } from "./mergeProps-BYJQ6N1s.js";
|
|
2
2
|
import { flushSync as ue } from "react-dom";
|
|
3
3
|
import pe, { useEffect as K, useState as Q, useCallback as F, useRef as W, useContext as me, createContext as re, forwardRef as ve } from "react";
|
|
4
|
-
import { i as $e } from "./useHover-
|
|
4
|
+
import { i as $e } from "./useHover-D8fja4GW.js";
|
|
5
5
|
import { $ as q } from "./number-BE8InLgI.js";
|
|
6
|
-
import { $ as ge } from "./context-
|
|
6
|
+
import { $ as ge } from "./context-Dl_saGB6.js";
|
|
7
7
|
import { $ as he } from "./useControlledState-u436Wbp1.js";
|
|
8
|
-
import { $ as be, a as xe } from "./utils-
|
|
8
|
+
import { $ as be, a as xe } from "./utils-KYuflGZt.js";
|
|
9
9
|
import { $ as we } from "./filterDOMProps-D6KHYVBX.js";
|
|
10
10
|
function Ee() {
|
|
11
11
|
return typeof window.ResizeObserver < "u";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/Popover.css');const r=require("react/jsx-runtime"),i=require("./clsx-C11secjj.cjs"),n=require("./OverlayArrow-
|
|
1
|
+
"use strict";require('./assets/Popover.css');const r=require("react/jsx-runtime"),i=require("./clsx-C11secjj.cjs"),n=require("./OverlayArrow-8praV_Xy.cjs"),a=require("./Dialog-BT0tVGQb.cjs"),p="_popover_1xqs8_4",x="_arrow_1xqs8_18",e={popover:p,arrow:x};function l({children:o,className:s,offset:t=4,...c}){return r.jsxs(a.$07b14b47974efb58$export$5b6b19405a83ff9d,{...c,offset:t,className:i.clsx(e.popover,s),children:[r.jsx(n.$44f671af83e7d9e0$export$746d02f47f4d381,{className:e.arrow,children:r.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:r.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),o]})}exports.Popover=l;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as f } from "./clsx-OuTLNxxd.js";
|
|
3
|
-
import { $ as c } from "./OverlayArrow-
|
|
4
|
-
import { a as i } from "./Dialog-
|
|
3
|
+
import { $ as c } from "./OverlayArrow-DfkRZlgG.js";
|
|
4
|
+
import { a as i } from "./Dialog-BuJdAr0D.js";
|
|
5
5
|
import './assets/Popover.css';const m = "_popover_1xqs8_4", d = "_arrow_1xqs8_18", r = {
|
|
6
6
|
popover: m,
|
|
7
7
|
arrow: d
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as s } from "./usePress-
|
|
2
|
-
import { a as n } from "./mergeProps-
|
|
3
|
-
import { b as
|
|
4
|
-
import { $ as
|
|
5
|
-
import f, { useRef as b, useContext as
|
|
1
|
+
import { a as s } from "./usePress-B_jgTf4k.js";
|
|
2
|
+
import { a as n } from "./mergeProps-BYJQ6N1s.js";
|
|
3
|
+
import { b as d } from "./utils-KYuflGZt.js";
|
|
4
|
+
import { $ as i } from "./useFocusable-ZjCKo1ed.js";
|
|
5
|
+
import f, { useRef as b, useContext as $, useEffect as l, useMemo as u } from "react";
|
|
6
6
|
const w = /* @__PURE__ */ f.forwardRef(({ children: t, ...o }, r) => {
|
|
7
|
-
let a = b(!1), e =
|
|
8
|
-
r =
|
|
7
|
+
let a = b(!1), e = $(s);
|
|
8
|
+
r = d(r || (e == null ? void 0 : e.ref));
|
|
9
9
|
let c = n(e || {}, {
|
|
10
10
|
...o,
|
|
11
11
|
ref: r,
|
|
@@ -13,14 +13,14 @@ const w = /* @__PURE__ */ f.forwardRef(({ children: t, ...o }, r) => {
|
|
|
13
13
|
a.current = !0, e && e.register();
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
return
|
|
16
|
+
return i(e, r), l(() => {
|
|
17
17
|
a.current || (process.env.NODE_ENV !== "production" && console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."), a.current = !0);
|
|
18
18
|
}, []), /* @__PURE__ */ f.createElement(s.Provider, {
|
|
19
19
|
value: c
|
|
20
20
|
}, t);
|
|
21
21
|
});
|
|
22
22
|
function E({ children: t }) {
|
|
23
|
-
let o =
|
|
23
|
+
let o = u(() => ({
|
|
24
24
|
register: () => {
|
|
25
25
|
}
|
|
26
26
|
}), []);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./usePress-BOGIOlm8.cjs"),$=require("./mergeProps-C7Sx47fA.cjs"),f=require("./utils-BM2vxlNA.cjs"),n=require("./useFocusable-DbmryjUH.cjs"),r=require("react"),d=r.forwardRef(({children:a,...c},t)=>{let o=r.useRef(!1),e=r.useContext(s.$ae1eeba8b9eafd08$export$5165eccb35aaadb5);t=f.$df56164dff5785e2$export$4338b53315abf666(t||(e==null?void 0:e.ref));let b=$.$3ef42575df84b30b$export$9d1611c77c2fe928(e||{},{...c,ref:t,register(){o.current=!0,e&&e.register()}});return n.$e7801be82b4b2a53$export$4debdb1a3f0fa79e(e,t),r.useEffect(()=>{o.current||(process.env.NODE_ENV!=="production"&&console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),o.current=!0)},[]),r.createElement(s.$ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider,{value:b},a)});function u({children:a}){let c=r.useMemo(()=>({register:()=>{}}),[]);return r.createElement(s.$ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider,{value:c},a)}exports.$f1ab8c75478c6f73$export$3351871ee4b288b8=d;exports.$f1ab8c75478c6f73$export$cf75428e0b9ed1ea=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/ProgressBar.css');const s=require("react/jsx-runtime"),x=require("./Button-
|
|
1
|
+
"use strict";require('./assets/ProgressBar.css');const s=require("react/jsx-runtime"),x=require("./Button-DZzQGk-L.cjs"),n=require("./Label-COpr4xVt.cjs"),c=require("./clsx-C11secjj.cjs"),m="_progressBar_1ekuq_4",d="_label_1ekuq_12",q="_value_1ekuq_17",N="_bar_1ekuq_22",f="_fill_1ekuq_28",a={progressBar:m,label:d,value:q,bar:N,fill:f},j=({label:r,labelProps:e,showValueLabel:l=!1,...t})=>s.jsx(x.$0393f8ab869a0f1a$export$c17561cb55d4db30,{...t,className:c.clsx(a.progressBar,t.className),children:({percentage:i,valueText:u,isIndeterminate:_})=>s.jsxs(s.Fragment,{children:[r&&s.jsx(n.Label,{elementType:"span",...e,className:c.clsx(e==null?void 0:e.className,a.label),children:r}),l&&s.jsx(n.Label,{elementType:"span",...e,id:"",className:c.clsx(e==null?void 0:e.className,a.value),children:u}),s.jsx("div",{className:a.bar,children:s.jsx("div",{className:a.fill,style:{width:`${_?50:i}%`}})})]})});exports.ProgressBar=j;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as d, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { c as u } from "./Button-
|
|
3
|
-
import { L as m } from "./Label-
|
|
2
|
+
import { c as u } from "./Button-DtC_ZOyd.js";
|
|
3
|
+
import { L as m } from "./Label-ByWt6Lfh.js";
|
|
4
4
|
import { c } from "./clsx-OuTLNxxd.js";
|
|
5
5
|
import './assets/ProgressBar.css';const o = "_progressBar_1ekuq_4", N = "_label_1ekuq_12", v = "_value_1ekuq_17", h = "_bar_1ekuq_22", x = "_fill_1ekuq_28", s = {
|
|
6
6
|
progressBar: o,
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as y, jsxs as G } from "react/jsx-runtime";
|
|
2
|
-
import { $ as T } from "./Group-
|
|
3
|
-
import { $ as M, b as W, h as A, e as j, a as
|
|
4
|
-
import { $ as z, F as q } from "./FieldError-
|
|
2
|
+
import { $ as T } from "./Group-B3mRMVy7.js";
|
|
3
|
+
import { $ as M, b as W, h as A, e as j, a as S, c as H, d as K, f as U } from "./utils-KYuflGZt.js";
|
|
4
|
+
import { $ as z, F as q } from "./FieldError-BlKkw9YL.js";
|
|
5
5
|
import { $ as J } from "./Form-CXcEMuBf.js";
|
|
6
|
-
import { b as Q } from "./Button-
|
|
7
|
-
import { $ as X } from "./Text
|
|
8
|
-
import { a as V, c as Y } from "./mergeProps-
|
|
6
|
+
import { b as Q } from "./Button-DtC_ZOyd.js";
|
|
7
|
+
import { $ as X } from "./Text--KL3Auo7.js";
|
|
8
|
+
import { a as V, c as Y } from "./mergeProps-BYJQ6N1s.js";
|
|
9
9
|
import { $ as w } from "./filterDOMProps-D6KHYVBX.js";
|
|
10
|
-
import I, { useMemo as
|
|
11
|
-
import { a as ee, b as ae, $ as ie } from "./useFormValidation-
|
|
12
|
-
import { b as E } from "./usePress-
|
|
13
|
-
import { a as de } from "./useFocusable-
|
|
14
|
-
import { $ as re } from "./FocusScope-
|
|
15
|
-
import { $ as le } from "./useFocusWithin-
|
|
16
|
-
import { $ as oe } from "./useField-
|
|
17
|
-
import { $ as te } from "./context-
|
|
18
|
-
import { $ as se } from "./useFocusRing-
|
|
19
|
-
import { $ as ne } from "./useHover-
|
|
20
|
-
import { $ as ce } from "./VisuallyHidden-
|
|
10
|
+
import I, { useMemo as O, useState as Z, forwardRef as C, createContext as B } from "react";
|
|
11
|
+
import { a as ee, b as ae, $ as ie } from "./useFormValidation-BW2NSTM4.js";
|
|
12
|
+
import { b as E } from "./usePress-B_jgTf4k.js";
|
|
13
|
+
import { a as de } from "./useFocusable-ZjCKo1ed.js";
|
|
14
|
+
import { $ as re } from "./FocusScope-CEgd3xCY.js";
|
|
15
|
+
import { $ as le } from "./useFocusWithin-Cn18Myw6.js";
|
|
16
|
+
import { $ as oe } from "./useField-5CEdtfab.js";
|
|
17
|
+
import { $ as te } from "./context-Dl_saGB6.js";
|
|
18
|
+
import { $ as se } from "./useFocusRing-HoJn20X5.js";
|
|
19
|
+
import { $ as ne } from "./useHover-D8fja4GW.js";
|
|
20
|
+
import { $ as ce } from "./VisuallyHidden-BKslUoMJ.js";
|
|
21
21
|
import { $ as fe } from "./useControlledState-u436Wbp1.js";
|
|
22
22
|
import { c as L } from "./clsx-OuTLNxxd.js";
|
|
23
|
-
import { a as ue, L as be } from "./Label-
|
|
24
|
-
import { T as $e } from "./Text-
|
|
23
|
+
import { a as ue, L as be } from "./Label-ByWt6Lfh.js";
|
|
24
|
+
import { T as $e } from "./Text-BUDAzDjW.js";
|
|
25
25
|
import './assets/Radio.css';const N = /* @__PURE__ */ new WeakMap();
|
|
26
26
|
function ve(a, e, d) {
|
|
27
27
|
let { value: l, children: t, "aria-label": r, "aria-labelledby": o } = a;
|
|
@@ -142,7 +142,7 @@ function pe(a, e) {
|
|
|
142
142
|
}
|
|
143
143
|
let me = Math.round(Math.random() * 1e10), he = 0;
|
|
144
144
|
function xe(a) {
|
|
145
|
-
let e =
|
|
145
|
+
let e = O(() => a.name || `radio-group-${me}-${++he}`, [
|
|
146
146
|
a.name
|
|
147
147
|
]);
|
|
148
148
|
var d;
|
|
@@ -177,7 +177,7 @@ const Pe = /* @__PURE__ */ B(null), Re = /* @__PURE__ */ B(null), k = /* @__PURE
|
|
|
177
177
|
...e,
|
|
178
178
|
label: f,
|
|
179
179
|
validationBehavior: o
|
|
180
|
-
}, i), $ =
|
|
180
|
+
}, i), $ = S({
|
|
181
181
|
...e,
|
|
182
182
|
values: {
|
|
183
183
|
orientation: e.orientation || "vertical",
|
|
@@ -231,7 +231,7 @@ const Pe = /* @__PURE__ */ B(null), Re = /* @__PURE__ */ B(null), k = /* @__PURE
|
|
|
231
231
|
}), Ve = /* @__PURE__ */ C(function(e, d) {
|
|
232
232
|
let { inputRef: l = null, ...t } = e;
|
|
233
233
|
[e, d] = M(t, d, Re);
|
|
234
|
-
let r = I.useContext(k), o = W(
|
|
234
|
+
let r = I.useContext(k), o = W(O(() => A(l, e.inputRef !== void 0 ? e.inputRef : null), [
|
|
235
235
|
l,
|
|
236
236
|
e.inputRef
|
|
237
237
|
])), { labelProps: i, inputProps: u, isSelected: f, isDisabled: s, isPressed: p } = ve({
|
|
@@ -241,7 +241,7 @@ const Pe = /* @__PURE__ */ B(null), Re = /* @__PURE__ */ B(null), k = /* @__PURE
|
|
|
241
241
|
}, r, o), { isFocused: m, isFocusVisible: h, focusProps: x } = se(), $ = s || r.isReadOnly, { hoverProps: F, isHovered: D } = ne({
|
|
242
242
|
...e,
|
|
243
243
|
isDisabled: $
|
|
244
|
-
}), g =
|
|
244
|
+
}), g = S({
|
|
245
245
|
...e,
|
|
246
246
|
defaultClassName: "react-aria-Radio",
|
|
247
247
|
values: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/Radio.css');const y=require("react/jsx-runtime"),L=require("./Group-
|
|
1
|
+
"use strict";require('./assets/Radio.css');const y=require("react/jsx-runtime"),L=require("./Group-Cdy6z9ra.cjs"),v=require("./utils-BM2vxlNA.cjs"),w=require("./FieldError-BvU0sueN.cjs"),N=require("./Form-BuOomA4T.cjs"),j=require("./Button-DZzQGk-L.cjs"),k=require("./Text-wuw0HQoa.cjs"),V=require("./mergeProps-C7Sx47fA.cjs"),E=require("./filterDOMProps-BS2lrgFA.cjs"),o=require("react"),_=require("./useFormValidation-DSRwb9US.cjs"),M=require("./usePress-BOGIOlm8.cjs"),T=require("./useFocusable-DbmryjUH.cjs"),W=require("./FocusScope-CAgWgk3N.cjs"),A=require("./useFocusWithin-o0WjCpEB.cjs"),H=require("./useField-CoQAzygg.cjs"),K=require("./context-UOrD6Zxk.cjs"),U=require("./useFocusRing-BM-zcH6L.cjs"),z=require("./useHover-CaFzQrR_.cjs"),J=require("./VisuallyHidden-DxDOcIsh.cjs"),Q=require("./useControlledState-D0L6S_5r.cjs"),C=require("./clsx-C11secjj.cjs"),S=require("./Label-COpr4xVt.cjs"),X=require("./Text-DA_gK6a2.cjs"),O=new WeakMap;function Y(a,e,d){let{value:l,children:s,"aria-label":r,"aria-labelledby":t}=a;const i=a.isDisabled||e.isDisabled;let b=s!=null,f=r!=null||t!=null;!b&&!f&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let n=e.selectedValue===l,P=D=>{D.stopPropagation(),e.setSelectedValue(l)},{pressProps:h,isPressed:R}=M.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:i}),{pressProps:m,isPressed:p}=M.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:i,onPress(){var D;e.setSelectedValue(l),(D=d.current)===null||D===void 0||D.focus()}}),{focusableProps:I}=T.$f645667febf57a63$export$4c014de7c8940b4c(V.$3ef42575df84b30b$export$9d1611c77c2fe928(a,{onFocus:()=>e.setLastFocusedValue(l)}),d),g=V.$3ef42575df84b30b$export$9d1611c77c2fe928(h,I),F=E.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),x=-1;e.selectedValue!=null?e.selectedValue===l&&(x=0):(e.lastFocusedValue===l||e.lastFocusedValue==null)&&(x=0),i&&(x=void 0);let{name:$,descriptionId:c,errorMessageId:q,validationBehavior:u}=O.get(e);return _.$99facab73266f662$export$5add1d006293d136(d,e.selectedValue,e.setSelectedValue),_.$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:u},e,d),{labelProps:V.$3ef42575df84b30b$export$9d1611c77c2fe928(m,{onClick:D=>D.preventDefault()}),inputProps:V.$3ef42575df84b30b$export$9d1611c77c2fe928(F,{...g,type:"radio",name:$,tabIndex:x,disabled:i,required:e.isRequired&&u==="native",checked:n,value:l,onChange:P,"aria-describedby":[a["aria-describedby"],e.isInvalid?q:null,c].filter(Boolean).join(" ")||void 0}),isDisabled:i,isSelected:n,isPressed:R||p}}function Z(a,e){let{name:d,isReadOnly:l,isRequired:s,isDisabled:r,orientation:t="vertical",validationBehavior:i="aria"}=a,{direction:b}=K.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{isInvalid:f,validationErrors:n,validationDetails:P}=e.displayValidation,{labelProps:h,fieldProps:R,descriptionProps:m,errorMessageProps:p}=H.$2baaea4c71418dea$export$294aa081a6c6f55d({...a,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:a.errorMessage||n}),I=E.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(a,{labelable:!0}),{focusWithinProps:g}=A.$9ab94262bd0047c7$export$420e68273165f4ec({onBlurWithin($){var c;(c=a.onBlur)===null||c===void 0||c.call(a,$),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:a.onFocus,onFocusWithinChange:a.onFocusChange}),F=$=>{let c;switch($.key){case"ArrowRight":b==="rtl"&&t!=="vertical"?c="prev":c="next";break;case"ArrowLeft":b==="rtl"&&t!=="vertical"?c="next":c="prev";break;case"ArrowDown":c="next";break;case"ArrowUp":c="prev";break;default:return}$.preventDefault();let q=W.$9bf71ea28793e738$export$2d6ec8fc375ceafa($.currentTarget,{from:$.target}),u;c==="next"?(u=q.nextNode(),u||(q.currentNode=$.currentTarget,u=q.firstChild())):(u=q.previousNode(),u||(q.currentNode=$.currentTarget,u=q.lastChild())),u&&(u.focus(),e.setSelectedValue(u.value))},x=V.$bdb11010cef70236$export$f680877a34711e37(d);return O.set(e,{name:x,descriptionId:m.id,errorMessageId:p.id,validationBehavior:i}),{radioGroupProps:V.$3ef42575df84b30b$export$9d1611c77c2fe928(I,{role:"radiogroup",onKeyDown:F,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":a["aria-errormessage"],"aria-readonly":l||void 0,"aria-required":s||void 0,"aria-disabled":r||void 0,"aria-orientation":t,...R,...g}),labelProps:h,descriptionProps:m,errorMessageProps:p,isInvalid:f,validationErrors:n,validationDetails:P}}let ee=Math.round(Math.random()*1e10),ae=0;function ie(a){let e=o.useMemo(()=>a.name||`radio-group-${ee}-${++ae}`,[a.name]);var d;let[l,s]=Q.$458b0a5536c1a7cf$export$40bfa8c7b0832715(a.value,(d=a.defaultValue)!==null&&d!==void 0?d:null,a.onChange),[r,t]=o.useState(null),i=_.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...a,value:l}),b=n=>{!a.isReadOnly&&!a.isDisabled&&(s(n),i.commitValidation())},f=i.displayValidation.isInvalid;return{...i,name:e,selectedValue:l,setSelectedValue:b,lastFocusedValue:r,setLastFocusedValue:t,isDisabled:a.isDisabled||!1,isReadOnly:a.isReadOnly||!1,isRequired:a.isRequired||!1,validationState:a.validationState||(f?"invalid":null),isInvalid:f}}const de=o.createContext(null),re=o.createContext(null),G=o.createContext(null),le=o.forwardRef(function(e,d){[e,d]=v.$64fa3d84918910a7$export$29f1550f4b0d4415(e,d,de);let{validationBehavior:l}=v.$64fa3d84918910a7$export$fabf2dc03a41866e(N.$d3e0e05bdfcf66bd$export$c24727297075ec6a)||{};var s,r;let t=(r=(s=e.validationBehavior)!==null&&s!==void 0?s:l)!==null&&r!==void 0?r:"native",i=ie({...e,validationBehavior:t}),[b,f]=v.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!e["aria-label"]&&!e["aria-labelledby"]),{radioGroupProps:n,labelProps:P,descriptionProps:h,errorMessageProps:R,...m}=Z({...e,label:f,validationBehavior:t},i),p=v.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,values:{orientation:e.orientation||"vertical",isDisabled:i.isDisabled,isReadOnly:i.isReadOnly,isRequired:i.isRequired,isInvalid:i.isInvalid,state:i},defaultClassName:"react-aria-RadioGroup"});return o.createElement("div",{...n,...p,ref:d,slot:e.slot||void 0,"data-orientation":e.orientation||"vertical","data-invalid":i.isInvalid||void 0,"data-disabled":i.isDisabled||void 0,"data-readonly":i.isReadOnly||void 0,"data-required":i.isRequired||void 0},o.createElement(v.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[G,i],[j.$01b77f81d0f07f68$export$75b6ee27786ba447,{...P,ref:b,elementType:"span"}],[k.$514c0188e459b4c0$export$9afb8bc826b033ea,{slots:{description:h,errorMessage:R}}],[w.$ee014567cb39d3f0$export$ff05c3ac10437e03,m]]},p.children))}),te=o.forwardRef(function(e,d){let{inputRef:l=null,...s}=e;[e,d]=v.$64fa3d84918910a7$export$29f1550f4b0d4415(s,d,re);let r=o.useContext(G),t=v.$df56164dff5785e2$export$4338b53315abf666(o.useMemo(()=>v.$5dc95899b306f630$export$c9058316764c140e(l,e.inputRef!==void 0?e.inputRef:null),[l,e.inputRef])),{labelProps:i,inputProps:b,isSelected:f,isDisabled:n,isPressed:P}=Y({...v.$64fa3d84918910a7$export$ef03459518577ad4(e),children:typeof e.children=="function"?!0:e.children},r,t),{isFocused:h,isFocusVisible:R,focusProps:m}=U.$f7dceffc5ad7768b$export$4e328f61c538687f(),p=n||r.isReadOnly,{hoverProps:I,isHovered:g}=z.$6179b936705e76d3$export$ae780daf29e6d456({...e,isDisabled:p}),F=v.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-Radio",values:{isSelected:f,isPressed:P,isHovered:g,isFocused:h,isFocusVisible:R,isDisabled:n,isReadOnly:r.isReadOnly,isInvalid:r.isInvalid,isRequired:r.isRequired}}),x=E.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e);return delete x.id,o.createElement("label",{...V.$3ef42575df84b30b$export$9d1611c77c2fe928(x,i,I,F),ref:d,"data-selected":f||void 0,"data-pressed":P||void 0,"data-hovered":g||void 0,"data-focused":h||void 0,"data-focus-visible":R||void 0,"data-disabled":n||void 0,"data-readonly":r.isReadOnly||void 0,"data-invalid":r.isInvalid||void 0,"data-required":r.isRequired||void 0},o.createElement(J.$5c3e21d68f1c4674$export$439d29a4e110a164,{elementType:"span"},o.createElement("input",{...V.$3ef42575df84b30b$export$9d1611c77c2fe928(b,m),ref:t})),F.children)}),oe="_radioGroup_i4hw0_4",se="_wrap_i4hw0_15",ne="_radio_i4hw0_4",B={radioGroup:oe,wrap:se,radio:ne},ce=({label:a,description:e,errorMessage:d,children:l,className:s,errorPosition:r="top",popover:t,...i})=>y.jsxs(le,{...i,className:C.clsx(B.radioGroup,s),children:[y.jsx(S.LabelWrapper,{popover:t,children:a&&y.jsx(S.Label,{children:a})}),e&&y.jsx(X.Text,{slot:"description",children:e}),r==="top"&&y.jsx(w.FieldError,{"data-testid":"fieldError",children:d}),y.jsx(L.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{className:B.wrap,children:l}),r==="bottom"&&y.jsx(w.FieldError,{"data-testid":"fieldError",children:d})]}),ue=({className:a,...e})=>y.jsx(te,{className:C.clsx(B.radio,a),...e});exports.Radio=ue;exports.RadioGroup=ce;
|