@midas-ds/components 13.0.1 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccordionItem-CAi-XFOc.js +343 -0
- package/AccordionItem-tWS22wDv.cjs +1 -0
- package/BadgeContainer-BZl6mSeb.cjs +1 -0
- package/{BadgeContainer-iNNgJKD9.js → BadgeContainer-DilMiV6u.js} +9 -9
- package/{Breadcrumbs-BQLxFZVm.cjs → Breadcrumbs-BBDGxc68.cjs} +1 -1
- package/{Breadcrumbs-C6B4fyk3.js → Breadcrumbs-BenPNv8Z.js} +15 -15
- package/Button-1sEX8jKn.cjs +1 -0
- package/{Button-D_tRdPW9.cjs → Button-BEWKXjlP.cjs} +1 -1
- package/{Button-CUMHt7MG.js → Button-CF97piBl.js} +10 -4
- package/{Button-DD5_S-tD.js → Button-CGe3Nyos.js} +122 -116
- package/Button.module-COONZqNU.cjs +1 -0
- package/Button.module-Cm0H98vy.js +14 -0
- package/{ButtonGroup-zx-9mxbJ.cjs → ButtonGroup-BpvDDECt.cjs} +1 -1
- package/{ButtonGroup-DC8925jD.js → ButtonGroup-Swh2E6Es.js} +1 -1
- package/CHANGELOG.md +59 -0
- package/Card-DJ8E5Rzd.js +131 -0
- package/Card-Db9xdzJ0.cjs +1 -0
- package/{CharacterCounter-CnRv-iUP.cjs → CharacterCounter-CTpQ12f7.cjs} +1 -1
- package/{CharacterCounter-DT7A0wWP.js → CharacterCounter-gbDGfize.js} +8 -8
- package/Checkbox-BgrLxY6P.cjs +1 -0
- package/{Checkbox-DTuryJdM.js → Checkbox-CdN1D5pD.js} +91 -87
- package/{CheckboxGroup-BmFdy-K6.js → CheckboxGroup-B1b-6bKq.js} +12 -12
- package/{CheckboxGroup-LrqCwPET.cjs → CheckboxGroup-BfZyy5yU.cjs} +1 -1
- package/{Collection-B0_WAieZ.js → Collection-BkxwF21i.js} +205 -213
- package/Collection-vGO6v3_U.cjs +1 -0
- package/{ColorSchemeSwitch-D5juAHPc.cjs → ColorSchemeSwitch-BOooU0iy.cjs} +3 -3
- package/{ColorSchemeSwitch-CgZfgCG4.js → ColorSchemeSwitch-KjnsdbDr.js} +10 -10
- package/{ComboBox-B2btGwWe.js → ComboBox-D1ZSZ6m-.js} +286 -278
- package/ComboBox-Dztk_jtC.cjs +1 -0
- package/DateField-BogEOseq.cjs +1 -0
- package/DateField-lsr_1fw4.js +47 -0
- package/{DateInputDivider-LxS0Kw1H.js → DateInputDivider-CRv3YuXd.js} +199 -196
- package/DateInputDivider-CYqm6PZP.cjs +1 -0
- package/{DateRangePicker-BmPPDZIF.js → DateRangePicker-5k1swaEt.js} +123 -119
- package/DateRangePicker-CgNXWOT6.cjs +6 -0
- package/Dialog-B1N4Ndyx.js +256 -0
- package/{Dialog-COeUapMW.js → Dialog-BUAp30Wc.js} +710 -692
- package/Dialog-BgSxz1JW.cjs +1 -0
- package/Dialog-PrnV8KTh.cjs +6 -0
- package/{DragAndDrop-Dw8JZmrn.cjs → DragAndDrop-Cs-V-9ak.cjs} +1 -1
- package/{DragAndDrop-PrUJv--B.js → DragAndDrop-DF0VoPJw.js} +2 -2
- package/{Dropdown-C_W6Sizy.cjs → Dropdown-DBFLb8Tl.cjs} +2 -2
- package/{Dropdown-CGQbf7OT.js → Dropdown-DaARa89l.js} +8 -8
- package/FieldError-Cimgm8qD.cjs +1 -0
- package/FieldError-l3xULRa0.js +48 -0
- package/{FileUpload-D2gnQKdn.js → FileUpload-CN0HNJ_Y.js} +14 -14
- package/{FileUpload-D3RaARDV.cjs → FileUpload-DHmsupSe.cjs} +1 -1
- package/{Grid-BmX6arAO.js → Grid-0XOQPryP.js} +2 -2
- package/{Grid-Bn1bCTH8.cjs → Grid-B6G4PWn5.cjs} +1 -1
- package/{GridItem-luVsL9lu.cjs → GridItem-BZ8eOXMB.cjs} +1 -1
- package/{GridItem-BtO9kCX9.js → GridItem-YtIpL5V2.js} +1 -1
- package/Group-B0Wj9pI8.cjs +1 -0
- package/Group-BAd7alBM.js +46 -0
- package/Heading-CCoGfKQ8.js +48 -0
- package/Heading-x7y3xadc.cjs +1 -0
- package/{Hidden-C9KWUR7b.js → Hidden-B5ir3Lei.js} +2 -2
- package/InfoBanner-BW3vy9mc.js +72 -0
- package/InfoBanner-_M_rGQiu.cjs +1 -0
- package/{Input-CzMx2mfl.cjs → Input-Bda0PCu5.cjs} +1 -1
- package/{Input-BLVRv0FK.js → Input-CQzv-D9g.js} +9 -9
- package/{Label-1N6ddn5w.js → Label-BGMXsSFb.js} +15 -15
- package/Label-CNTODOFg.cjs +1 -0
- package/Layout-BrEuHajQ.cjs +16 -0
- package/{Layout-B-A-s7B0.js → Layout-JL9l-y7w.js} +144 -145
- package/{Link-lO-Ke97K.js → Link-BudFjYrw.js} +22 -22
- package/Link-BvUSTIip.cjs +6 -0
- package/{Link-wM7cVPlS.cjs → Link-DRU6Qzia.cjs} +1 -1
- package/{Link-CbFSuEI1.js → Link-l-nMP-Zd.js} +10 -10
- package/LinkButton-DGdnbTgR.cjs +6 -0
- package/LinkButton-DP9W-E32.js +69 -0
- package/ListBox-TGCxrXIJ.cjs +1 -0
- package/ListBox-mOCZvKD4.js +534 -0
- package/{ListBoxLoadMoreItem-C4jnDcYH.js → ListBoxLoadMoreItem-CLdTe6-z.js} +5 -5
- package/{ListBoxLoadMoreItem-3jGpi90m.cjs → ListBoxLoadMoreItem-UX0jFQN4.cjs} +1 -1
- package/ListBoxSection-BNBHosou.cjs +1 -0
- package/{ListBoxSection-D7BcbjUt.js → ListBoxSection-D_kTkvgG.js} +139 -140
- package/{ListKeyboardDelegate-CVxkAn5D.js → ListKeyboardDelegate-BHnZMUhW.js} +36 -40
- package/ListKeyboardDelegate-CLRlDto7.cjs +1 -0
- package/{Logo-CFjZc5u2.cjs → Logo-4tRnV4Su.cjs} +1 -1
- package/{Logo-DkagDdKQ.js → Logo-DLlt576_.js} +17 -17
- package/{OverlayArrow-CvNuu3e3.js → OverlayArrow-CjGslX2c.js} +4 -4
- package/{OverlayArrow-ByH6lM-H.cjs → OverlayArrow-bcrb_syE.cjs} +1 -1
- package/{Popover-Bf5YH53o.js → Popover-CZFi2YGz.js} +13 -13
- package/Popover-uYTWBGHa.cjs +1 -0
- package/{PressResponder-CxVtArtP.js → PressResponder-BMj6Zvbn.js} +9 -9
- package/PressResponder-ChvCuOue.cjs +1 -0
- package/ProgressBar-BGemuJIq.cjs +1 -0
- package/ProgressBar-DhRmckYM.js +53 -0
- package/{RSPContexts-BW2SEIqe.js → RSPContexts-B0lEq7qq.js} +5 -3
- package/RSPContexts-XUvspq3j.cjs +1 -0
- package/Radio-Bp_31Z59.js +340 -0
- package/Radio-D3RGVrEd.cjs +1 -0
- package/{RangeCalendar-Bi9jc61A.js → RangeCalendar-9C96gMvy.js} +146 -145
- package/RangeCalendar-ChfmP_ql.cjs +6 -0
- package/{SSRProvider-40TXmsUG.js → SSRProvider-D8lZ0o6A.js} +5 -5
- package/{SSRProvider-Bc-sMhsT.cjs → SSRProvider-DZRLwxPS.cjs} +1 -1
- package/{SearchField-BevjTbcW.js → SearchField-DrEdzWAy.js} +44 -44
- package/SearchField-JaDXLq5W.cjs +6 -0
- package/Select-BCUH-Z7q.cjs +1 -0
- package/{Select-CEwJo1BT.js → Select-CpPE78Ke.js} +210 -188
- package/SelectionIndicator-BiSN1toV.cjs +1 -0
- package/{FocusScope-Bj40Ir-g.js → SelectionIndicator-ant6jeC1.js} +256 -165
- package/SelectionManager-C469yQeD.js +1063 -0
- package/SelectionManager-uFYC4wpu.cjs +1 -0
- package/{Separator-Bj24aGrT.js → Separator-B6l5qSpR.js} +28 -28
- package/{Separator-CM0KPvsX.js → Separator-BWAnBMVN.js} +5 -5
- package/Separator-DbhmtwDa.cjs +1 -0
- package/{Separator-Dgin8BNW.cjs → Separator-J0pLW4BN.cjs} +1 -1
- package/Skeleton-8onymGEG.cjs +1 -0
- package/Skeleton-BjTEGRpe.js +35 -0
- package/Spinner-D6Fcu_Dp.js +54 -0
- package/Spinner-DIapnvIz.cjs +6 -0
- package/TabList-C0tRVI6Q.cjs +1 -0
- package/TabList-DmkxO7MM.js +394 -0
- package/Table-BLqjyYKk.cjs +16 -0
- package/{Table-BzJktg2G.js → Table-CyWZO9uf.js} +710 -706
- package/Tag-DJqYiBLR.js +774 -0
- package/Tag-FDHGu_WP.cjs +1 -0
- package/{Text-BtPiT2P1.cjs → Text-0wXj3J8E.cjs} +1 -1
- package/Text-BBFWBNAH.js +32 -0
- package/{Text-BAFsaON-.cjs → Text-D5OSv6Uv.cjs} +1 -1
- package/{Text-Be7WIOwv.js → Text-bqP9NeVg.js} +3 -3
- package/TextArea-CZxwvBcS.cjs +1 -0
- package/TextArea-CrY7P18c.js +125 -0
- package/{TextField-_UY8CXtW.js → TextField-BWea-IT-.js} +26 -26
- package/TextField-DsN-kBfh.cjs +1 -0
- package/TextField.module-C03d0VY9.js +13 -0
- package/TextField.module-DmRrFHra.cjs +1 -0
- package/{Toast-Cs0CEbRr.cjs → Toast-DUZ5jfG1.cjs} +1 -1
- package/{Toast-B74PMVL9.js → Toast-Di3h8A14.js} +101 -101
- package/{ToggleButtonGroup-CwHPu7w5.js → ToggleButtonGroup-Bh4hP6Lk.js} +83 -79
- package/ToggleButtonGroup-D7r34GCt.cjs +1 -0
- package/{Tooltip-BHAtsp9k.js → Tooltip-CUdmOznK.js} +13 -13
- package/{Tooltip-CZa9n5sT.cjs → Tooltip-D-ATlbIM.cjs} +1 -1
- package/{VisuallyHidden-EjrqodVh.cjs → VisuallyHidden-BMelU6B0.cjs} +1 -1
- package/{VisuallyHidden-CGEtjAP7.js → VisuallyHidden-DuW70K-5.js} +8 -8
- package/accordion/Accordion.d.ts +0 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +2 -3
- package/assets/AccordionItem.css +1 -1
- package/assets/Button.css +1 -1
- package/assets/Card.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/ComboBox.css +1 -1
- package/assets/DateField.css +1 -1
- package/assets/DateInputDivider.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Dialog.css +1 -1
- package/assets/Dropdown.css +1 -1
- package/assets/FieldError.css +1 -1
- package/assets/Heading.css +1 -1
- package/assets/InfoBanner.css +1 -1
- package/assets/Label.css +1 -1
- package/assets/Layout.css +1 -1
- package/assets/Link.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/ListBoxSection.css +1 -1
- package/assets/Logo.css +1 -1
- package/assets/Popover.css +1 -1
- package/assets/ProgressBar.css +1 -1
- package/assets/Radio.css +1 -1
- package/assets/RangeCalendar.css +1 -1
- package/assets/SearchField.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Separator.css +1 -1
- package/assets/Skeleton.css +1 -1
- package/assets/Spinner.css +1 -1
- package/assets/TabList.css +1 -1
- package/assets/Text.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/Toast.css +1 -1
- package/assets/Tooltip.css +1 -1
- package/assets/default.css +1 -1
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.cjs +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/clsx-DKOfLqne.cjs +1 -0
- package/clsx-jbLnTBqA.js +11 -0
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -1
- package/{context-CGNJ3grH.js → context-Dl_saGB6.js} +11 -11
- package/{context-Df3XbgBG.cjs → context-UOrD6Zxk.cjs} +1 -1
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/dropdown/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/{getScrollParent-Ru2U2LlM.js → getScrollParent-DFCzfqHG.js} +1 -1
- package/{getScrollParent-DuKmPmUa.cjs → getScrollParent-DjULaF_q.cjs} +1 -1
- package/grid/index.cjs +1 -1
- package/grid/index.js +2 -2
- package/heading/Heading.d.ts +6 -0
- package/heading/index.cjs +1 -1
- package/heading/index.js +1 -1
- package/{index-BLPblar-.js → index-DEx4upZl.js} +19 -19
- package/{index-DSFSh2sC.cjs → index-hURPlN0u.cjs} +2 -2
- package/index.cjs +1 -1
- package/index.js +126 -127
- package/inertValue-BWmZ1afe.cjs +1 -0
- 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/menu/index.cjs +1 -1
- package/menu/index.js +2 -2
- package/{mergeProps-BSsN7Bgk.js → mergeProps-Ct8m5-xW.js} +1 -1
- package/{mergeProps-JhcJ7uJL.cjs → mergeProps-Du5A8xi8.cjs} +1 -1
- package/modal/Dialog.d.ts +16 -3
- package/modal/index.cjs +1 -1
- package/modal/index.d.ts +1 -1
- package/modal/index.js +2 -2
- package/package.json +4 -4
- package/popover/index.cjs +1 -1
- package/popover/index.js +1 -1
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/scrollIntoView-BVI21Y4-.js +65 -0
- package/scrollIntoView-BueMOyGp.cjs +1 -0
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/select/types.d.ts +1 -1
- package/select/useMultiSelect.d.ts +2 -2
- package/skeleton/index.cjs +1 -1
- package/skeleton/index.js +1 -1
- package/spinner/Spinner.d.ts +5 -1
- package/spinner/index.cjs +1 -1
- package/spinner/index.js +1 -1
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/Tabs.d.ts +2 -9
- package/tabs/index.cjs +1 -1
- package/tabs/index.d.ts +0 -1
- package/tabs/index.js +1 -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/TextArea.d.ts +3 -2
- package/textfield/TextField.d.ts +3 -2
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.cjs +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.cjs +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/{useButton-R8-i3HLC.cjs → useButton-C0r5nrqs.cjs} +1 -1
- package/{useButton-D6iUB8cN.js → useButton-CRgN6aZf.js} +3 -3
- package/useDateFormatter-BrrFo4nY.cjs +1 -0
- package/{useDateFormatter-BJ1ZyaH1.js → useDateFormatter-Bs5A6Xtu.js} +353 -322
- package/{useDescription-BMuiAqI5.cjs → useDescription-6BYtQxe6.cjs} +1 -1
- package/{useDescription-BLmIkYCq.js → useDescription-BFwQx7Rp.js} +1 -1
- package/useEvent-C125NAue.cjs +1 -0
- package/{useEvent-DpBHTuHJ.js → useEvent-smuTnX4G.js} +1 -1
- package/{useField-BMegM8fA.js → useField-BhJ9dM2g.js} +2 -2
- package/{useField-DyeD7MLj.cjs → useField-DvszkIMx.cjs} +1 -1
- package/{useFilter-BFnSe_Eq.js → useFilter-BdUU-HQZ.js} +1 -1
- package/{useFilter-aoggM85n.cjs → useFilter-R2IPvbS8.cjs} +1 -1
- package/{useFocusRing-BcbYske2.cjs → useFocusRing-C-XVcAE5.cjs} +1 -1
- package/{useFocusRing-DMo8ctYV.js → useFocusRing-CcxI7nbg.js} +2 -2
- package/{useFocusWithin-ClMkhYcq.js → useFocusWithin-DhXBuB2O.js} +1 -1
- package/{useFocusWithin-DTnk0e8a.cjs → useFocusWithin-GBjoTL5o.cjs} +1 -1
- package/{useFocusable-DXlMChFC.js → useFocusable-BJj-Bkig.js} +14 -14
- package/{useFocusable-CsG-IPuC.cjs → useFocusable-M4se1KJt.cjs} +1 -1
- package/{useFormValidation-L0UHvOsP.js → useFormValidation-By7G-T7y.js} +2 -2
- package/{useFormValidation-BQIRxgbU.cjs → useFormValidation-DV2Ioblb.cjs} +1 -1
- package/useHasTabbableChild-CIZGg_iG.cjs +1 -0
- package/{useHasTabbableChild-BDaxMsGu.js → useHasTabbableChild-CnpSoDuJ.js} +2 -2
- package/{useHighlightSelectionDescription-CQaG611l.cjs → useHighlightSelectionDescription-CBZfyrhy.cjs} +1 -1
- package/{useHighlightSelectionDescription-BkEv9Jye.js → useHighlightSelectionDescription-DPiqOr_Z.js} +5 -5
- package/{useHover-DGAmG7jt.cjs → useHover-DULSfLuK.cjs} +1 -1
- package/{useHover-D6bNIkU0.js → useHover-DkC5FyNd.js} +5 -5
- package/{useLabels-CvUk-yS3.cjs → useLabels-B5pmat1S.cjs} +1 -1
- package/{useLabels-Kmq5JCp_.js → useLabels-D24on06F.js} +1 -1
- package/{useListState-D2IEg6_e.cjs → useListState-DBawAMhF.cjs} +1 -1
- package/{useListState-pixYqSLl.js → useListState-PZF3ahpk.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/{usePress-DMUpU0GU.js → usePress-BqQIhkNY.js} +54 -54
- package/usePress-DmU79HEg.cjs +7 -0
- package/{useSingleSelectListState-BlvpP8y-.js → useSingleSelectListState-BLRBEJC7.js} +1 -1
- package/{useSingleSelectListState-CwWK_Dx2.cjs → useSingleSelectListState-CNETmoj5.cjs} +1 -1
- package/{useTextField-BC5X_AO_.js → useTextField-B8pM0p6X.js} +7 -7
- package/{useTextField-Cxpfu0U3.cjs → useTextField-CiWV3eeD.cjs} +1 -1
- package/useToggleState-DaxmInOW.cjs +1 -0
- package/{useUpdateEffect-C5YQs_1w.cjs → useUpdateEffect-sk3kiVGz.cjs} +1 -1
- package/utils/clsx.d.ts +8 -0
- package/utils/types.d.ts +5 -0
- package/utils-CtICjCYt.cjs +1 -0
- package/{utils-Cpcjg55U.js → utils-D2iKpxcZ.js} +47 -43
- package/utils-DRIRjPUS.cjs +1 -0
- package/{utils-DFIwp4PB.js → utils-Dxh86KaB.js} +20 -18
- package/AccordionItem-Bq8nUKg4.cjs +0 -1
- package/AccordionItem-D2Y0gJZB.js +0 -335
- package/BadgeContainer-su0iCJKy.cjs +0 -1
- package/Button-CMIbSc4-.cjs +0 -1
- package/Button.module-BT9wZenr.cjs +0 -1
- package/Button.module-CGIVvzVm.js +0 -14
- package/Card-D2UbrhDW.js +0 -131
- package/Card-UolcSL5O.cjs +0 -1
- package/Checkbox-dtZfsSfx.cjs +0 -1
- package/Collection-BvWp2xBd.cjs +0 -1
- package/ComboBox-uMsVrOYu.cjs +0 -1
- package/DateField-B5dlDwdH.cjs +0 -1
- package/DateField-CEpRn4wR.js +0 -47
- package/DateInputDivider-BnSo_Aox.cjs +0 -1
- package/DateRangePicker-It4M98bT.cjs +0 -6
- package/Dialog-B1HuzqOX.js +0 -240
- package/Dialog-DR6nEqMT.cjs +0 -1
- package/Dialog-doGnVsJJ.cjs +0 -1
- package/FieldError-Cornph2A.cjs +0 -1
- package/FieldError-DdvFyIf4.js +0 -48
- package/FocusScope-Uy3DiY0-.cjs +0 -1
- package/Group-BKYGeOBr.cjs +0 -1
- package/Group-C73mD_-i.js +0 -45
- package/Heading-BQlmb5Tm.js +0 -46
- package/Heading-D3FR_KXb.cjs +0 -1
- package/InfoBanner-C82hcpzj.cjs +0 -1
- package/InfoBanner-Dz_0wVSa.js +0 -83
- package/Label-06gf6yKQ.cjs +0 -1
- package/Layout-DlE30BHE.cjs +0 -16
- package/Link-ePZ3nrAW.cjs +0 -6
- package/LinkButton-CJyZh3BS.js +0 -69
- package/LinkButton-Cw73pOM2.cjs +0 -6
- package/ListBox-ICZKGluC.cjs +0 -1
- package/ListBox-LncMQt6I.js +0 -523
- package/ListBoxSection-BeDwnVZx.cjs +0 -1
- package/ListKeyboardDelegate-C_X1wLkh.cjs +0 -1
- package/Popover-DIq3kp6B.cjs +0 -1
- package/PressResponder-DbnYqwGB.cjs +0 -1
- package/ProgressBar-DRhXkSE6.js +0 -53
- package/ProgressBar-i7almbvK.cjs +0 -1
- package/RSPContexts-D8hmBfGm.cjs +0 -1
- package/Radio-BpQoJB8e.cjs +0 -1
- package/Radio-D4wUZfW9.js +0 -333
- package/RangeCalendar-KcJooXYf.cjs +0 -6
- package/SearchField-BA-X9dzb.cjs +0 -6
- package/Select-1QuVY4f5.cjs +0 -1
- package/SelectionManager-Bq-Gw1UT.js +0 -1043
- package/SelectionManager-BtbHoHpA.cjs +0 -1
- package/Separator-Cfv2pbWf.cjs +0 -1
- package/Skeleton-Iovq135_.js +0 -35
- package/Skeleton-MaBUPqhT.cjs +0 -1
- package/Spinner-BZ7i01Kt.js +0 -47
- package/Spinner-DxWDMW6e.cjs +0 -6
- package/TabList-3fErCDyP.cjs +0 -1
- package/TabList-CXaxruLg.js +0 -397
- package/Table-Dyqa6_rE.cjs +0 -16
- package/Tag-BYUPXbhG.js +0 -765
- package/Tag-BweDKw1v.cjs +0 -1
- package/Text-CmlsaWMA.js +0 -32
- package/TextArea-B4BZUoJp.cjs +0 -1
- package/TextArea-Df1fR5R4.js +0 -124
- package/TextField-Bm5916AD.cjs +0 -1
- package/TextField.module-CH39P8ZE.js +0 -13
- package/TextField.module-gJ-ruFra.cjs +0 -1
- package/ToggleButtonGroup-DY9S3USc.cjs +0 -1
- package/inertValue-B3AFhVG4.cjs +0 -1
- package/scrollIntoView-ClEACHUk.js +0 -57
- package/scrollIntoView-DRSoJp89.cjs +0 -1
- package/useDateFormatter-2B0vgHc-.cjs +0 -1
- package/useEvent-3ZO5TPSH.cjs +0 -1
- package/useHasTabbableChild-CJcLnolh.cjs +0 -1
- package/useLocalizedStringFormatter-BiX5BTlb.cjs +0 -1
- package/useObserveElement-BdI4zgd7.js +0 -27
- package/useObserveElement-MhzEsCkX.cjs +0 -1
- package/usePress-CicXV7UO.cjs +0 -7
- package/useToggleState-SqDyNfRi.cjs +0 -1
- package/utils/storybook.d.ts +0 -5
- package/utils/test.d.ts +0 -11
- package/utils-CMHKYKlz.cjs +0 -1
- package/utils-__vrf9VZ.cjs +0 -1
- package/variables-B3KEYyhW.cjs +0 -1
- package/variables-DzXcMW2k.js +0 -5
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import { $ as J, a as ue, b as fe, c as $e, d as be, e as pe, f as ve, g as K, h as ge } from "./Collection-BkxwF21i.js";
|
|
2
|
+
import { $ as Q, b as X, a as I, f as Y, g as me, d as he } from "./utils-D2iKpxcZ.js";
|
|
3
|
+
import { $ as N, a as xe, b as Pe, c as Z, d as De } from "./DragAndDrop-DF0VoPJw.js";
|
|
4
|
+
import { $ as ye, a as Se, b as Ee, c as ke } from "./Separator-BWAnBMVN.js";
|
|
5
|
+
import { b as Be } from "./RSPContexts-B0lEq7qq.js";
|
|
6
|
+
import { a as Me, b as Fe, c as we } from "./SelectionIndicator-ant6jeC1.js";
|
|
7
|
+
import { $ as Le } from "./Text-bqP9NeVg.js";
|
|
8
|
+
import { c as ee, a as k, b as j, e as He } from "./mergeProps-Ct8m5-xW.js";
|
|
9
|
+
import { $ as L } from "./filterDOMProps-wsa9OcNI.js";
|
|
10
|
+
import { $ as Ie } from "./inertValue-B7loUihk.js";
|
|
11
|
+
import d, { forwardRef as oe, createContext as te, useContext as x, useEffect as ae, useRef as C, useMemo as re } from "react";
|
|
12
|
+
import { d as Ve } from "./usePress-BqQIhkNY.js";
|
|
13
|
+
import { h as _e, i as Ae, $ as le, a as G } from "./useHover-DkC5FyNd.js";
|
|
14
|
+
import { d as Te } from "./SelectionManager-C469yQeD.js";
|
|
15
|
+
import { $ as Oe } from "./useFocusWithin-DhXBuB2O.js";
|
|
16
|
+
import { a as Ce } from "./Button-CGe3Nyos.js";
|
|
17
|
+
import { a as Ne, $ as Ue } from "./useListState-PZF3ahpk.js";
|
|
18
|
+
import { $ as ze } from "./context-Dl_saGB6.js";
|
|
19
|
+
import { $ as Ke, a as Re } from "./ListKeyboardDelegate-BHnZMUhW.js";
|
|
20
|
+
import { $ as We } from "./useFocusRing-CcxI7nbg.js";
|
|
21
|
+
const R = /* @__PURE__ */ new WeakMap();
|
|
22
|
+
function qe(t) {
|
|
23
|
+
return typeof t == "string" ? t.replace(/\s*/g, "") : "" + t;
|
|
24
|
+
}
|
|
25
|
+
function je(t, e) {
|
|
26
|
+
let r = R.get(t);
|
|
27
|
+
if (!r) throw new Error("Unknown list");
|
|
28
|
+
return `${r.id}-option-${qe(e)}`;
|
|
29
|
+
}
|
|
30
|
+
function Ge(t, e, r) {
|
|
31
|
+
let o = L(t, {
|
|
32
|
+
labelable: !0
|
|
33
|
+
}), l = t.selectionBehavior || "toggle", i = t.linkBehavior || (l === "replace" ? "action" : "override");
|
|
34
|
+
l === "toggle" && i === "action" && (i = "override");
|
|
35
|
+
let { listProps: a } = ye({
|
|
36
|
+
...t,
|
|
37
|
+
ref: r,
|
|
38
|
+
selectionManager: e.selectionManager,
|
|
39
|
+
collection: e.collection,
|
|
40
|
+
disabledKeys: e.disabledKeys,
|
|
41
|
+
linkBehavior: i
|
|
42
|
+
}), { focusWithinProps: n } = Oe({
|
|
43
|
+
onFocusWithin: t.onFocus,
|
|
44
|
+
onBlurWithin: t.onBlur,
|
|
45
|
+
onFocusWithinChange: t.onFocusChange
|
|
46
|
+
}), s = ee(t.id);
|
|
47
|
+
R.set(e, {
|
|
48
|
+
id: s,
|
|
49
|
+
shouldUseVirtualFocus: t.shouldUseVirtualFocus,
|
|
50
|
+
shouldSelectOnPressUp: t.shouldSelectOnPressUp,
|
|
51
|
+
shouldFocusOnHover: t.shouldFocusOnHover,
|
|
52
|
+
isVirtualized: t.isVirtualized,
|
|
53
|
+
onAction: t.onAction,
|
|
54
|
+
linkBehavior: i,
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
UNSTABLE_itemBehavior: t.UNSTABLE_itemBehavior
|
|
57
|
+
});
|
|
58
|
+
let { labelProps: f, fieldProps: u } = Ce({
|
|
59
|
+
...t,
|
|
60
|
+
id: s,
|
|
61
|
+
// listbox is not an HTML input element so it
|
|
62
|
+
// shouldn't be labeled by a <label> element.
|
|
63
|
+
labelElementType: "span"
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
labelProps: f,
|
|
67
|
+
listBoxProps: k(o, n, e.selectionManager.selectionMode === "multiple" ? {
|
|
68
|
+
"aria-multiselectable": "true"
|
|
69
|
+
} : {}, {
|
|
70
|
+
role: "listbox",
|
|
71
|
+
...k(u, a)
|
|
72
|
+
})
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function Je(t, e, r) {
|
|
76
|
+
var o, l;
|
|
77
|
+
let { key: i } = t, a = R.get(e);
|
|
78
|
+
var n;
|
|
79
|
+
let s = (n = t.isDisabled) !== null && n !== void 0 ? n : e.selectionManager.isDisabled(i);
|
|
80
|
+
var f;
|
|
81
|
+
let u = (f = t.isSelected) !== null && f !== void 0 ? f : e.selectionManager.isSelected(i);
|
|
82
|
+
var b;
|
|
83
|
+
let c = (b = t.shouldSelectOnPressUp) !== null && b !== void 0 ? b : a == null ? void 0 : a.shouldSelectOnPressUp;
|
|
84
|
+
var m;
|
|
85
|
+
let v = (m = t.shouldFocusOnHover) !== null && m !== void 0 ? m : a == null ? void 0 : a.shouldFocusOnHover;
|
|
86
|
+
var g;
|
|
87
|
+
let p = (g = t.shouldUseVirtualFocus) !== null && g !== void 0 ? g : a == null ? void 0 : a.shouldUseVirtualFocus;
|
|
88
|
+
var P;
|
|
89
|
+
let E = (P = t.isVirtualized) !== null && P !== void 0 ? P : a == null ? void 0 : a.isVirtualized, B = j(), D = j(), y = {
|
|
90
|
+
role: "option",
|
|
91
|
+
"aria-disabled": s || void 0,
|
|
92
|
+
"aria-selected": e.selectionManager.selectionMode !== "none" ? u : void 0
|
|
93
|
+
};
|
|
94
|
+
_e() && Ae() || (y["aria-label"] = t["aria-label"], y["aria-labelledby"] = B, y["aria-describedby"] = D);
|
|
95
|
+
let $ = e.collection.getItem(i);
|
|
96
|
+
if (E) {
|
|
97
|
+
let h = Number($ == null ? void 0 : $.index);
|
|
98
|
+
y["aria-posinset"] = Number.isNaN(h) ? void 0 : h + 1, y["aria-setsize"] = Se(e.collection);
|
|
99
|
+
}
|
|
100
|
+
let _ = a != null && a.onAction ? () => {
|
|
101
|
+
var h;
|
|
102
|
+
return a == null || (h = a.onAction) === null || h === void 0 ? void 0 : h.call(a, i);
|
|
103
|
+
} : void 0, M = je(e, i), { itemProps: S, isPressed: F, isFocused: w, hasAction: A, allowsSelection: T } = Te({
|
|
104
|
+
selectionManager: e.selectionManager,
|
|
105
|
+
key: i,
|
|
106
|
+
ref: r,
|
|
107
|
+
shouldSelectOnPressUp: c,
|
|
108
|
+
allowsDifferentPressOrigin: c && v,
|
|
109
|
+
isVirtualized: E,
|
|
110
|
+
shouldUseVirtualFocus: p,
|
|
111
|
+
isDisabled: s,
|
|
112
|
+
onAction: _ || !($ == null || (o = $.props) === null || o === void 0) && o.onAction ? He($ == null || (l = $.props) === null || l === void 0 ? void 0 : l.onAction, _) : void 0,
|
|
113
|
+
linkBehavior: a == null ? void 0 : a.linkBehavior,
|
|
114
|
+
// @ts-ignore
|
|
115
|
+
UNSTABLE_itemBehavior: a == null ? void 0 : a.UNSTABLE_itemBehavior,
|
|
116
|
+
id: M
|
|
117
|
+
}), { hoverProps: U } = le({
|
|
118
|
+
isDisabled: s || !v,
|
|
119
|
+
onHoverStart() {
|
|
120
|
+
G() || (e.selectionManager.setFocused(!0), e.selectionManager.setFocusedKey(i));
|
|
121
|
+
}
|
|
122
|
+
}), H = L($ == null ? void 0 : $.props);
|
|
123
|
+
delete H.id;
|
|
124
|
+
let O = Ve($ == null ? void 0 : $.props);
|
|
125
|
+
return {
|
|
126
|
+
optionProps: {
|
|
127
|
+
...y,
|
|
128
|
+
...k(H, S, U, O),
|
|
129
|
+
id: M
|
|
130
|
+
},
|
|
131
|
+
labelProps: {
|
|
132
|
+
id: B
|
|
133
|
+
},
|
|
134
|
+
descriptionProps: {
|
|
135
|
+
id: D
|
|
136
|
+
},
|
|
137
|
+
isFocused: w,
|
|
138
|
+
isFocusVisible: w && e.selectionManager.isFocused && G(),
|
|
139
|
+
isSelected: u,
|
|
140
|
+
isDisabled: s,
|
|
141
|
+
isPressed: F,
|
|
142
|
+
allowsSelection: T,
|
|
143
|
+
hasAction: A
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function Qe(t) {
|
|
147
|
+
let { heading: e, "aria-label": r } = t, o = ee();
|
|
148
|
+
return {
|
|
149
|
+
itemProps: {
|
|
150
|
+
role: "presentation"
|
|
151
|
+
},
|
|
152
|
+
headingProps: e ? {
|
|
153
|
+
// Techincally, listbox cannot contain headings according to ARIA.
|
|
154
|
+
// We hide the heading from assistive technology, using role="presentation",
|
|
155
|
+
// and only use it as a visual label for the nested group.
|
|
156
|
+
id: o,
|
|
157
|
+
role: "presentation"
|
|
158
|
+
} : {},
|
|
159
|
+
groupProps: {
|
|
160
|
+
role: "group",
|
|
161
|
+
"aria-label": r,
|
|
162
|
+
"aria-labelledby": e ? o : void 0
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const ie = /* @__PURE__ */ te(null), V = /* @__PURE__ */ te(null), Do = /* @__PURE__ */ oe(function(e, r) {
|
|
167
|
+
[e, r] = Q(e, r, ie);
|
|
168
|
+
let o = x(V);
|
|
169
|
+
return o ? /* @__PURE__ */ d.createElement(de, {
|
|
170
|
+
state: o,
|
|
171
|
+
props: e,
|
|
172
|
+
listBoxRef: r
|
|
173
|
+
}) : /* @__PURE__ */ d.createElement(fe, {
|
|
174
|
+
content: /* @__PURE__ */ d.createElement($e, e)
|
|
175
|
+
}, (l) => /* @__PURE__ */ d.createElement(Xe, {
|
|
176
|
+
props: e,
|
|
177
|
+
listBoxRef: r,
|
|
178
|
+
collection: l
|
|
179
|
+
}));
|
|
180
|
+
});
|
|
181
|
+
function Xe({ props: t, listBoxRef: e, collection: r }) {
|
|
182
|
+
t = {
|
|
183
|
+
...t,
|
|
184
|
+
collection: r,
|
|
185
|
+
children: null,
|
|
186
|
+
items: null
|
|
187
|
+
};
|
|
188
|
+
let { layoutDelegate: o } = x(K), l = Ue({
|
|
189
|
+
...t,
|
|
190
|
+
layoutDelegate: o
|
|
191
|
+
});
|
|
192
|
+
return /* @__PURE__ */ d.createElement(de, {
|
|
193
|
+
state: l,
|
|
194
|
+
props: t,
|
|
195
|
+
listBoxRef: e
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function de({ state: t, props: e, listBoxRef: r }) {
|
|
199
|
+
[e, r] = Q(e, r, Be);
|
|
200
|
+
let { dragAndDropHooks: o, layout: l = "stack", orientation: i = "vertical", filter: a } = e, n = Ne(t, a), { collection: s, selectionManager: f } = n, u = !!(o != null && o.useDraggableCollectionState), b = !!(o != null && o.useDroppableCollectionState), { direction: c } = ze(), { disabledBehavior: m, disabledKeys: v } = f, g = Ke({
|
|
201
|
+
usage: "search",
|
|
202
|
+
sensitivity: "base"
|
|
203
|
+
}), { isVirtualized: p, layoutDelegate: P, dropTargetDelegate: E, CollectionRoot: B } = x(K), D = re(() => e.keyboardDelegate || new Re({
|
|
204
|
+
collection: s,
|
|
205
|
+
collator: g,
|
|
206
|
+
ref: r,
|
|
207
|
+
disabledKeys: v,
|
|
208
|
+
disabledBehavior: m,
|
|
209
|
+
layout: l,
|
|
210
|
+
orientation: i,
|
|
211
|
+
direction: c,
|
|
212
|
+
layoutDelegate: P
|
|
213
|
+
}), [
|
|
214
|
+
s,
|
|
215
|
+
g,
|
|
216
|
+
r,
|
|
217
|
+
m,
|
|
218
|
+
v,
|
|
219
|
+
i,
|
|
220
|
+
c,
|
|
221
|
+
e.keyboardDelegate,
|
|
222
|
+
l,
|
|
223
|
+
P
|
|
224
|
+
]), { listBoxProps: y } = Ge({
|
|
225
|
+
...e,
|
|
226
|
+
shouldSelectOnPressUp: u || e.shouldSelectOnPressUp,
|
|
227
|
+
keyboardDelegate: D,
|
|
228
|
+
isVirtualized: p
|
|
229
|
+
}, n, r), $ = C(u), _ = C(b);
|
|
230
|
+
ae(() => {
|
|
231
|
+
process.env.NODE_ENV !== "production" && ($.current !== u && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), _.current !== b && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));
|
|
232
|
+
}, [
|
|
233
|
+
u,
|
|
234
|
+
b
|
|
235
|
+
]);
|
|
236
|
+
let M, S, F, w = !1, A = null, T = C(null);
|
|
237
|
+
if (u && o) {
|
|
238
|
+
M = o.useDraggableCollectionState({
|
|
239
|
+
collection: s,
|
|
240
|
+
selectionManager: f,
|
|
241
|
+
preview: o.renderDragPreview ? T : void 0
|
|
242
|
+
}), o.useDraggableCollection({}, M, r);
|
|
243
|
+
let z = o.DragPreview;
|
|
244
|
+
A = o.renderDragPreview ? /* @__PURE__ */ d.createElement(z, {
|
|
245
|
+
ref: T
|
|
246
|
+
}, o.renderDragPreview) : null;
|
|
247
|
+
}
|
|
248
|
+
if (b && o) {
|
|
249
|
+
S = o.useDroppableCollectionState({
|
|
250
|
+
collection: s,
|
|
251
|
+
selectionManager: f
|
|
252
|
+
});
|
|
253
|
+
let z = o.dropTargetDelegate || E || new o.ListDropTargetDelegate(s, r, {
|
|
254
|
+
orientation: i,
|
|
255
|
+
layout: l,
|
|
256
|
+
direction: c
|
|
257
|
+
});
|
|
258
|
+
F = o.useDroppableCollection({
|
|
259
|
+
keyboardDelegate: D,
|
|
260
|
+
dropTargetDelegate: z
|
|
261
|
+
}, S, r), w = S.isDropTarget({
|
|
262
|
+
type: "root"
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
let { focusProps: U, isFocused: H, isFocusVisible: O } = We(), h = n.collection.size === 0, W = {
|
|
266
|
+
isDropTarget: w,
|
|
267
|
+
isEmpty: h,
|
|
268
|
+
isFocused: H,
|
|
269
|
+
isFocusVisible: O,
|
|
270
|
+
layout: e.layout || "stack",
|
|
271
|
+
state: n
|
|
272
|
+
}, se = I({
|
|
273
|
+
className: e.className,
|
|
274
|
+
style: e.style,
|
|
275
|
+
defaultClassName: "react-aria-ListBox",
|
|
276
|
+
values: W
|
|
277
|
+
}), q = null;
|
|
278
|
+
h && e.renderEmptyState && (q = /* @__PURE__ */ d.createElement("div", {
|
|
279
|
+
// eslint-disable-next-line
|
|
280
|
+
role: "option",
|
|
281
|
+
style: {
|
|
282
|
+
display: "contents"
|
|
283
|
+
}
|
|
284
|
+
}, e.renderEmptyState(W)));
|
|
285
|
+
let ce = L(e, {
|
|
286
|
+
global: !0
|
|
287
|
+
});
|
|
288
|
+
return /* @__PURE__ */ d.createElement(Fe, null, /* @__PURE__ */ d.createElement("div", {
|
|
289
|
+
...k(ce, se, y, U, F == null ? void 0 : F.collectionProps),
|
|
290
|
+
ref: r,
|
|
291
|
+
slot: e.slot || void 0,
|
|
292
|
+
onScroll: e.onScroll,
|
|
293
|
+
"data-drop-target": w || void 0,
|
|
294
|
+
"data-empty": h || void 0,
|
|
295
|
+
"data-focused": H || void 0,
|
|
296
|
+
"data-focus-visible": O || void 0,
|
|
297
|
+
"data-layout": e.layout || "stack",
|
|
298
|
+
"data-orientation": e.orientation || "vertical"
|
|
299
|
+
}, /* @__PURE__ */ d.createElement(Y, {
|
|
300
|
+
values: [
|
|
301
|
+
[
|
|
302
|
+
ie,
|
|
303
|
+
e
|
|
304
|
+
],
|
|
305
|
+
[
|
|
306
|
+
V,
|
|
307
|
+
n
|
|
308
|
+
],
|
|
309
|
+
[
|
|
310
|
+
N,
|
|
311
|
+
{
|
|
312
|
+
dragAndDropHooks: o,
|
|
313
|
+
dragState: M,
|
|
314
|
+
dropState: S
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
[
|
|
318
|
+
Ee,
|
|
319
|
+
{
|
|
320
|
+
elementType: "div"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
[
|
|
324
|
+
Pe,
|
|
325
|
+
{
|
|
326
|
+
render: Ye
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
[
|
|
330
|
+
ge,
|
|
331
|
+
{
|
|
332
|
+
name: "ListBoxSection",
|
|
333
|
+
render: ne
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
]
|
|
337
|
+
}, /* @__PURE__ */ d.createElement(we, null, /* @__PURE__ */ d.createElement(B, {
|
|
338
|
+
collection: s,
|
|
339
|
+
scrollRef: r,
|
|
340
|
+
persistedKeys: De(f, o, S),
|
|
341
|
+
renderDropIndicator: Z(o, S)
|
|
342
|
+
}))), q, A));
|
|
343
|
+
}
|
|
344
|
+
function ne(t, e, r, o = "react-aria-ListBoxSection") {
|
|
345
|
+
let l = x(V), { dragAndDropHooks: i, dropState: a } = x(N), { CollectionBranch: n } = x(K), [s, f] = he();
|
|
346
|
+
var u;
|
|
347
|
+
let { headingProps: b, groupProps: c } = Qe({
|
|
348
|
+
heading: f,
|
|
349
|
+
"aria-label": (u = t["aria-label"]) !== null && u !== void 0 ? u : void 0
|
|
350
|
+
}), m = I({
|
|
351
|
+
defaultClassName: o,
|
|
352
|
+
className: t.className,
|
|
353
|
+
style: t.style,
|
|
354
|
+
values: {}
|
|
355
|
+
}), v = L(t, {
|
|
356
|
+
global: !0
|
|
357
|
+
});
|
|
358
|
+
return delete v.id, /* @__PURE__ */ d.createElement("section", {
|
|
359
|
+
...k(v, m, c),
|
|
360
|
+
ref: e
|
|
361
|
+
}, /* @__PURE__ */ d.createElement(ke.Provider, {
|
|
362
|
+
value: {
|
|
363
|
+
...b,
|
|
364
|
+
ref: s
|
|
365
|
+
}
|
|
366
|
+
}, /* @__PURE__ */ d.createElement(n, {
|
|
367
|
+
collection: l.collection,
|
|
368
|
+
parent: r,
|
|
369
|
+
renderDropIndicator: Z(i, a)
|
|
370
|
+
})));
|
|
371
|
+
}
|
|
372
|
+
const yo = /* @__PURE__ */ ue(pe, ne), So = /* @__PURE__ */ J(be, function(e, r, o) {
|
|
373
|
+
let l = X(r), i = x(V), { dragAndDropHooks: a, dragState: n, dropState: s } = x(N), { optionProps: f, labelProps: u, descriptionProps: b, ...c } = Je({
|
|
374
|
+
key: o.key,
|
|
375
|
+
"aria-label": e == null ? void 0 : e["aria-label"]
|
|
376
|
+
}, i, l), { hoverProps: m, isHovered: v } = le({
|
|
377
|
+
isDisabled: !c.allowsSelection && !c.hasAction,
|
|
378
|
+
onHoverStart: o.props.onHoverStart,
|
|
379
|
+
onHoverChange: o.props.onHoverChange,
|
|
380
|
+
onHoverEnd: o.props.onHoverEnd
|
|
381
|
+
}), g = null;
|
|
382
|
+
n && a && (g = a.useDraggableItem({
|
|
383
|
+
key: o.key
|
|
384
|
+
}, n));
|
|
385
|
+
let p = null;
|
|
386
|
+
s && a && (p = a.useDroppableItem({
|
|
387
|
+
target: {
|
|
388
|
+
type: "item",
|
|
389
|
+
key: o.key,
|
|
390
|
+
dropPosition: "on"
|
|
391
|
+
}
|
|
392
|
+
}, s, l));
|
|
393
|
+
let P = n && n.isDragging(o.key), E = I({
|
|
394
|
+
...e,
|
|
395
|
+
id: void 0,
|
|
396
|
+
children: e.children,
|
|
397
|
+
defaultClassName: "react-aria-ListBoxItem",
|
|
398
|
+
values: {
|
|
399
|
+
...c,
|
|
400
|
+
isHovered: v,
|
|
401
|
+
selectionMode: i.selectionManager.selectionMode,
|
|
402
|
+
selectionBehavior: i.selectionManager.selectionBehavior,
|
|
403
|
+
allowsDragging: !!n,
|
|
404
|
+
isDragging: P,
|
|
405
|
+
isDropTarget: p == null ? void 0 : p.isDropTarget
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
ae(() => {
|
|
409
|
+
!o.textValue && process.env.NODE_ENV !== "production" && console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");
|
|
410
|
+
}, [
|
|
411
|
+
o.textValue
|
|
412
|
+
]);
|
|
413
|
+
let B = e.href ? "a" : "div", D = L(e, {
|
|
414
|
+
global: !0
|
|
415
|
+
});
|
|
416
|
+
return delete D.id, delete D.onClick, /* @__PURE__ */ d.createElement(B, {
|
|
417
|
+
...k(D, E, f, m, g == null ? void 0 : g.dragProps, p == null ? void 0 : p.dropProps),
|
|
418
|
+
ref: l,
|
|
419
|
+
"data-allows-dragging": !!n || void 0,
|
|
420
|
+
"data-selected": c.isSelected || void 0,
|
|
421
|
+
"data-disabled": c.isDisabled || void 0,
|
|
422
|
+
"data-hovered": v || void 0,
|
|
423
|
+
"data-focused": c.isFocused || void 0,
|
|
424
|
+
"data-focus-visible": c.isFocusVisible || void 0,
|
|
425
|
+
"data-pressed": c.isPressed || void 0,
|
|
426
|
+
"data-dragging": P || void 0,
|
|
427
|
+
"data-drop-target": (p == null ? void 0 : p.isDropTarget) || void 0,
|
|
428
|
+
"data-selection-mode": i.selectionManager.selectionMode === "none" ? void 0 : i.selectionManager.selectionMode
|
|
429
|
+
}, /* @__PURE__ */ d.createElement(Y, {
|
|
430
|
+
values: [
|
|
431
|
+
[
|
|
432
|
+
Le,
|
|
433
|
+
{
|
|
434
|
+
slots: {
|
|
435
|
+
[me]: u,
|
|
436
|
+
label: u,
|
|
437
|
+
description: b
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
[
|
|
442
|
+
Me,
|
|
443
|
+
{
|
|
444
|
+
isSelected: c.isSelected
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
]
|
|
448
|
+
}, E.children));
|
|
449
|
+
});
|
|
450
|
+
function Ye(t, e) {
|
|
451
|
+
e = X(e);
|
|
452
|
+
let { dragAndDropHooks: r, dropState: o } = x(N), { dropIndicatorProps: l, isHidden: i, isDropTarget: a } = r.useDropIndicator(t, o, e);
|
|
453
|
+
return i ? null : /* @__PURE__ */ d.createElement(eo, {
|
|
454
|
+
...t,
|
|
455
|
+
dropIndicatorProps: l,
|
|
456
|
+
isDropTarget: a,
|
|
457
|
+
ref: e
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
function Ze(t, e) {
|
|
461
|
+
let { dropIndicatorProps: r, isDropTarget: o, ...l } = t, i = I({
|
|
462
|
+
...l,
|
|
463
|
+
defaultClassName: "react-aria-DropIndicator",
|
|
464
|
+
values: {
|
|
465
|
+
isDropTarget: o
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
return /* @__PURE__ */ d.createElement("div", {
|
|
469
|
+
...r,
|
|
470
|
+
...i,
|
|
471
|
+
// eslint-disable-next-line
|
|
472
|
+
role: "option",
|
|
473
|
+
ref: e,
|
|
474
|
+
"data-drop-target": o || void 0
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
const eo = /* @__PURE__ */ oe(Ze), Eo = J(ve, function(e, r, o) {
|
|
478
|
+
let l = x(V), { isLoading: i, onLoadMore: a, scrollOffset: n, ...s } = e, f = C(null), u = re(() => ({
|
|
479
|
+
onLoadMore: a,
|
|
480
|
+
collection: l == null ? void 0 : l.collection,
|
|
481
|
+
sentinelRef: f,
|
|
482
|
+
scrollOffset: n
|
|
483
|
+
}), [
|
|
484
|
+
a,
|
|
485
|
+
n,
|
|
486
|
+
l == null ? void 0 : l.collection
|
|
487
|
+
]);
|
|
488
|
+
xe(u, f);
|
|
489
|
+
let b = I({
|
|
490
|
+
...s,
|
|
491
|
+
id: void 0,
|
|
492
|
+
children: o.rendered,
|
|
493
|
+
defaultClassName: "react-aria-ListBoxLoadingIndicator",
|
|
494
|
+
values: null
|
|
495
|
+
}), c = {
|
|
496
|
+
// For Android talkback
|
|
497
|
+
tabIndex: -1
|
|
498
|
+
};
|
|
499
|
+
return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement("div", {
|
|
500
|
+
style: {
|
|
501
|
+
position: "relative",
|
|
502
|
+
width: 0,
|
|
503
|
+
height: 0
|
|
504
|
+
},
|
|
505
|
+
inert: Ie(!0)
|
|
506
|
+
}, /* @__PURE__ */ d.createElement("div", {
|
|
507
|
+
"data-testid": "loadMoreSentinel",
|
|
508
|
+
ref: f,
|
|
509
|
+
style: {
|
|
510
|
+
position: "absolute",
|
|
511
|
+
height: 1,
|
|
512
|
+
width: 1
|
|
513
|
+
}
|
|
514
|
+
})), i && b.children && /* @__PURE__ */ d.createElement("div", {
|
|
515
|
+
...k(L(e, {
|
|
516
|
+
global: !0
|
|
517
|
+
}), c),
|
|
518
|
+
...b,
|
|
519
|
+
// aria-selected isn't needed here since this option is not selectable.
|
|
520
|
+
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
521
|
+
role: "option",
|
|
522
|
+
ref: r
|
|
523
|
+
}, b.children));
|
|
524
|
+
});
|
|
525
|
+
export {
|
|
526
|
+
Eo as $,
|
|
527
|
+
Do as a,
|
|
528
|
+
So as b,
|
|
529
|
+
yo as c,
|
|
530
|
+
R as d,
|
|
531
|
+
je as e,
|
|
532
|
+
ie as f,
|
|
533
|
+
V as g
|
|
534
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
|
2
|
-
import { c as e } from "./clsx-
|
|
3
|
-
import { s as a } from "./ListBoxSection-
|
|
4
|
-
import { $ as c } from "./ListBox-
|
|
5
|
-
import { S as l } from "./Spinner-
|
|
6
|
-
import { u as p } from "./useLocalizedStringFormatter-
|
|
2
|
+
import { c as e } from "./clsx-jbLnTBqA.js";
|
|
3
|
+
import { s as a } from "./ListBoxSection-D_kTkvgG.js";
|
|
4
|
+
import { $ as c } from "./ListBox-mOCZvKD4.js";
|
|
5
|
+
import { S as l } from "./Spinner-D6Fcu_Dp.js";
|
|
6
|
+
import { u as p } from "./useLocalizedStringFormatter-aOhh7wdl.js";
|
|
7
7
|
const S = ({ className: o, children: s, ...r }) => /* @__PURE__ */ t(
|
|
8
8
|
"button",
|
|
9
9
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),r=require("./clsx-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),r=require("./clsx-DKOfLqne.cjs"),n=require("./ListBoxSection-BNBHosou.cjs"),c=require("./ListBox-TGCxrXIJ.cjs"),l=require("./Spinner-DIapnvIz.cjs"),d=require("./useLocalizedStringFormatter-BSac43NO.cjs"),x=({className:s,children:e,...o})=>t.jsx("button",{type:"button",className:r.clsx(n.styles.listBoxItem,n.styles.listBoxButton,s),...o,children:e}),u={"loading...":"Loading..."},m={"loading...":"Laddar..."},L={en:u,sv:m},B=({className:s,children:e,isLoading:o,...i})=>{const a=d.useLocalizedStringFormatter(L);return t.jsx(c.$eed445e0843c11d0$export$8e6d031a08cf56a1,{className:r.clsx(n.styles.listBoxLoadMoreItem,s),isLoading:o,...i,children:e||t.jsxs(t.Fragment,{children:[t.jsx(l.Spinner,{small:!0}),t.jsx("span",{"aria-hidden":!0,children:a.format("loading...")})]})})};exports.ListBoxButton=x;exports.ListBoxLoadMoreItem=B;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/ListBoxSection.css');const S=require("react/jsx-runtime"),M=require("./ListBox-TGCxrXIJ.cjs"),Y=require("./Collection-vGO6v3_U.cjs"),c=require("react"),L=require("./mergeProps-Du5A8xi8.cjs"),D=require("./context-UOrD6Zxk.cjs"),T=require("react-dom"),Z=require("./OverlayArrow-bcrb_syE.cjs"),ee=require("./useEvent-C125NAue.cjs"),V=require("./clsx-DKOfLqne.cjs"),q=require("./SelectionManager-uFYC4wpu.cjs"),te=require("./Dialog-PrnV8KTh.cjs"),ie=require("./Separator-J0pLW4BN.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 g{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(process.env.NODE_ENV==="test"&&!process.env.VIRT_ON||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 g(t,i,l,o)}intersection(e){if(!this.intersects(e))return new g(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new g(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new g(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 W{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 W{constructor(e){super(e,"root")}}class se extends W{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 g}}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 g(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 g(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 g(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 g,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}}const de=typeof document<"u"?c.useLayoutEffect:()=>{};function ce(n){let[e,t]=c.useState(new g(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(p){t(p),a.current=!0},renderView:n.renderView,invalidate:s}}));de(()=>{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,f=c.useCallback(()=>{l(!0)},[]),v=c.useCallback(()=>{l(!1)},[]);return c.useMemo(()=>({virtualizer:h,visibleViews:d,setVisibleRect:t,contentSize:u,isScrolling:i,startScrolling:f,endScrolling:v}),[h,d,t,u,i,f,v])}const $=48;class ue 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 g(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new g(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 f of this.lastCollection.getKeys())t.getItem(f)||this.layoutNodes.get(f)&&this.layoutNodes.delete(f);this.lastCollection=t,this.invalidateEverything=!1,this.validRect=this.requestedRect.copy()}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=[...t],l=i.filter(r=>r.type==="loader"),o=[],s=(t==null?void 0:t.size)===0;s&&(e=0);for(let r of i){var a,h;let d=((h=(a=this.rowHeight)!==null&&a!==void 0?a:this.estimatedRowHeight)!==null&&h!==void 0?h:$)+this.gap;if(r.type==="item"&&e+d<this.requestedRect.y&&!this.isValid(r,e)){e+=d;continue}let u=this.buildChild(r,this.padding,e,null);if(e=u.layoutInfo.rect.maxY+this.gap,o.push(u),r.type==="loader"){let f=l.indexOf(r);l.splice(f,1)}if((r.type==="item"||r.type==="loader")&&e>this.requestedRect.maxY){let f=i.indexOf(r);for(let v of l){let y=i.indexOf(v);e+=(y-f-1)*d;let p=this.buildChild(v,this.padding,e,null);o.push(p),e=p.layoutInfo.rect.maxY,f=y}e+=(i.length-f-1)*d;break}}return e-=this.gap,e+=s?0:this.padding,this.contentSize=new z(this.virtualizer.visibleRect.width,e),o}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 g(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 g(t,i,o-t,0),a=new b(e.type,e.key,s),h=i,r=0,d=[];for(let v of q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)){var u,f;let y=((f=(u=this.rowHeight)!==null&&u!==void 0?u:this.estimatedRowHeight)!==null&&f!==void 0?f:$)+this.gap;if(i+y<this.requestedRect.y&&!this.isValid(e,i)){i+=y,r++;continue}let p=this.buildChild(v,t,i,a.key);if(i=p.layoutInfo.rect.maxY+this.gap,d.push(p),i>this.requestedRect.maxY){i+=([...q.$c5a24bc478652b5f$export$1005530eda016c13(e,l)].length-(d.length+r))*y;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),f=this.lastCollection?this.lastCollection.getItem(e.key):null;o=d.rect.height,s=l!==d.rect.width||u!==f||d.estimatedSize}else o=e.rendered?this.estimatedHeadingHeight:0,s=!0}o==null&&(o=$);let a=new g(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 g(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 g(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 f=Math.abs(u.rect.y-t),v=Math.abs(u.rect.maxY-t),y=Math.min(f,v);y<a&&(a=y,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;if(e.dropPosition==="before")i=new g(t.rect.x,Math.max(0,t.rect.y-this.dropIndicatorThickness/2),t.rect.width,this.dropIndicatorThickness);else if(e.dropPosition==="after"){let o=this.collection.getItem(e.key);if(o){var l;let s=(l=o.level)!==null&&l!==void 0?l:0,a=this.collection.getKeyAfter(e.key);for(;a!=null;){let h=this.collection.getItem(a);if(!h||h.level<=s)break;t=this.getLayoutInfo(a)||t,a=this.collection.getKeyAfter(a)}}i=new g(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness)}else i=t.rect;return 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 g,this.requestedRect=new g,this.contentSize=new z}}let R=null;function fe(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 ge(n,e){let{scrollLeft:t}=n;if(e==="rtl"){let{scrollWidth:i,clientWidth:l}=n;switch(fe()){case"negative":t=-t;break;case"positive-descending":t=i-l-t;break}}return t}function ye(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}=D.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),[u,f]=c.useState(!1),v=c.useCallback(w=>{w.target===w.currentTarget&&(n.onScroll&&n.onScroll(w),T.flushSync(()=>{let m=w.currentTarget.scrollTop,H=ge(w.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 g(r.scrollLeft,r.scrollTop,r.width,r.height)),r.isScrolling||(r.isScrolling=!0,f(!0),window.dispatchEvent(new Event("tk.disconnect-observer")),o&&o());let _=Date.now();r.scrollEndTime<=_+50&&(r.scrollEndTime=_+300,r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(()=>{r.isScrolling=!1,f(!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",v),c.useEffect(()=>()=>{r.scrollTimeout!=null&&clearTimeout(r.scrollTimeout),r.isScrolling&&window.dispatchEvent(new Event("tk.connect-observer"))},[]);let y=c.useRef(!1),p=L.$8ae05eaa5c114e9c$export$7f54fc3180508a52(w=>{let m=e.current;if(!m||y.current)return;y.current=!0;let H=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,_=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"),Q=Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"),O=m.clientWidth,P=m.clientHeight,N=H&&!_?1/0:O,E=H&&!Q?1/0:P;(r.width!==N||r.height!==E)&&(r.width=N,r.height=E,w(()=>{i(new g(r.scrollLeft,r.scrollTop,N,E))}),(!H&&O!==m.clientWidth||P!==m.clientHeight)&&(r.width=m.clientWidth,r.height=m.clientHeight,w(()=>{i(new g(r.scrollLeft,r.scrollTop,r.width,r.height))}))),y.current=!1}),k=c.useRef(null),[U,G]=c.useState({});L.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!y.current&&(k.current==null||!t.equals(k.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){G({}),k.current=t;return}else queueMicrotask(()=>p(T.flushSync));k.current=t}),L.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{p(w=>w())},[U]);let J=c.useCallback(()=>{p(T.flushSync)},[p]);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},{isScrolling:u,scrollViewProps:{...h,style:I},contentProps:{role:"presentation",style:l}}}function ve(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=pe(i.current);t.updateItemSize(l,s)}},[t,l,i]);return L.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{e!=null&&e.estimatedSize&&o()}),{updateSize:o}}function pe(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}=D.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),h=c.useRef(null);return ve({layoutInfo:i,virtualizer:l,ref:h}),c.createElement("div",{role:"presentation",ref:h,className:t,style:{...we(i,a,o),...e}},s)}let B=new WeakMap;function we(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 me(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:be,CollectionBranch:xe}),[l]);return c.createElement(Y.$7135fc7d473fd974$export$4feb769f8ddf26c5.Provider,{value:o},c.createElement(A.Provider,{value:{layout:l,layoutOptions:i}},e))}function be({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=ce({layout:o,collection:n,renderView:(d,u)=>{var f;return u==null||(f=u.render)===null||f===void 0?void 0:f.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}=ye({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 xe({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=>Ie(n,i,t))}function Ie(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 ue{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 Re="_listBox_ts7z5_4",Se="_listBoxPopover_ts7z5_16",ze="_listBoxSectionHeading_ts7z5_31",He="_listBoxButton_ts7z5_41",Ce="_listBoxItem_ts7z5_53",ke="_listBoxLoadMoreItem_ts7z5_99",C={listBox:Re,listBoxPopover:Se,listBoxSectionHeading:ze,listBoxButton:He,listBoxItem:Ce,listBoxLoadMoreItem:ke},_e=({className:n,children:e,...t})=>S.jsx(me,{layout:$e,layoutOptions:{headingHeight:44},children:S.jsx(M.$eed445e0843c11d0$export$41f133550aa26f48,{className:V.clsx(C.listBox,n),...t,children:e})}),Le=({children:n,className:e,...t})=>S.jsx(M.$eed445e0843c11d0$export$a11e76429ed99b4,{className:V.clsx(C.listBoxItem,e),...t,children:n}),Ne=({className:n,children:e,...t})=>S.jsx(te.$07b14b47974efb58$export$5b6b19405a83ff9d,{className:V.clsx(n,C.listBoxPopover),offset:0,...t,children:e}),Ee=({children:n,name:e,...t})=>S.jsxs(M.$eed445e0843c11d0$export$dca12b0bb56e4fc,{...t,children:[S.jsx(ie.$72a5793c14baf454$export$8b251419efc915eb,{className:C.listBoxSectionHeading,children:e}),n]});exports.ListBox=_e;exports.ListBoxItem=Le;exports.ListBoxPopover=Ne;exports.ListBoxSection=Ee;exports.styles=C;
|