@midas-ds/components 12.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccordionItem-C9dBt-tQ.js +335 -0
- package/AccordionItem-SOfjXh3V.cjs +1 -0
- package/{BadgeContainer-DGJGJMPi.js → BadgeContainer-iNNgJKD9.js} +8 -8
- package/BadgeContainer-su0iCJKy.cjs +1 -0
- package/Breadcrumbs-BAHJMPsu.js +271 -0
- package/Breadcrumbs-DUcHHI_2.cjs +1 -0
- package/Button-CMIbSc4-.cjs +1 -0
- package/{Button-DtC_ZOyd.js → Button-DD5_S-tD.js} +155 -161
- package/{Button-akT6Hvug.js → Button-DYcmg49Z.js} +2 -2
- package/{Button-DQm2iqKU.cjs → Button-DrL5Jv-s.cjs} +1 -1
- package/Button.module-BNLcvARn.cjs +1 -0
- package/Button.module-Bax2YU6N.js +14 -0
- package/ButtonGroup-ClYTgaRc.cjs +1 -0
- package/{ButtonGroup-DvVvear6.js → ButtonGroup-WZZDPu9Z.js} +1 -1
- package/CHANGELOG.md +65 -0
- package/Card-BDDyGAMA.js +131 -0
- package/Card-mj5lCIR4.cjs +1 -0
- package/{CharacterCounter-DQJVM-mZ.cjs → CharacterCounter-CnRv-iUP.cjs} +1 -1
- package/CharacterCounter-DT7A0wWP.js +22 -0
- package/Checkbox-BtM2rFh9.js +278 -0
- package/Checkbox-CvdIG43J.cjs +1 -0
- package/CheckboxGroup-C94as9Xt.cjs +1 -0
- package/CheckboxGroup-CjcDYBRk.js +157 -0
- package/Collection-B0_WAieZ.js +625 -0
- package/Collection-BvWp2xBd.cjs +1 -0
- package/{ColorSchemeSwitch-DyZ9FAKG.js → ColorSchemeSwitch-C4PMYeD5.js} +20 -28
- package/{ColorSchemeSwitch-DtyJ9-5B.cjs → ColorSchemeSwitch-CKcoGZM1.cjs} +3 -3
- package/ComboBox-B2EmfOyr.cjs +1 -0
- package/{ComboBox-Dn3tQzri.js → ComboBox-BWXJZyOR.js} +522 -507
- package/DateField-CcQJYDLD.js +47 -0
- package/DateField-IpCiF81R.cjs +1 -0
- package/{DateInputDivider-CJEGWmG0.js → DateInputDivider-CXkUdlzc.js} +936 -839
- package/DateInputDivider-Cf5GZHlM.cjs +1 -0
- package/DateRangePicker-B2BJO1KC.js +889 -0
- package/DateRangePicker-Dfwe9RhJ.cjs +6 -0
- package/Dialog-B8swxl24.js +1643 -0
- package/Dialog-DR6nEqMT.cjs +1 -0
- package/Dialog-DgJobm71.cjs +1 -0
- package/Dialog-P3frHOdq.js +240 -0
- package/DragAndDrop-Dw8JZmrn.cjs +1 -0
- package/DragAndDrop-PrUJv--B.js +75 -0
- package/{Dropdown-BWbdSQ9U.js → Dropdown-CIvWpN3v.js} +8 -8
- package/{Dropdown-CJ-sujKv.cjs → Dropdown-DJ2vWAqk.cjs} +2 -2
- package/FieldError-Cornph2A.cjs +1 -0
- package/FieldError-DdvFyIf4.js +48 -0
- package/{FileUpload-B89QfnCB.js → FileUpload-D2gnQKdn.js} +76 -74
- package/{FileUpload-KQ1XAKAc.cjs → FileUpload-D3RaARDV.cjs} +2 -2
- package/{FocusScope-CEgd3xCY.js → FocusScope-Bj40Ir-g.js} +192 -195
- package/FocusScope-Uy3DiY0-.cjs +1 -0
- package/{Grid-Db5wZrw6.cjs → Grid-WbEkSCGh.cjs} +1 -1
- package/{Grid-B2av0vt8.js → Grid-s8ovKDi8.js} +1 -1
- package/GridItem-CIVF1fRW.cjs +1 -0
- package/GridItem-D3FZyyO-.js +243 -0
- package/{Group-Cdy6z9ra.cjs → Group-BKYGeOBr.cjs} +1 -1
- package/{Group-B3mRMVy7.js → Group-C73mD_-i.js} +13 -13
- package/Heading-BQlmb5Tm.js +46 -0
- package/Heading-D3FR_KXb.cjs +1 -0
- package/{Hidden-B5ir3Lei.js → Hidden-C9KWUR7b.js} +2 -2
- package/InfoBanner-CqjnTYaa.cjs +1 -0
- package/InfoBanner-CrA8MS3v.js +83 -0
- package/{Input-BnpBRnJz.js → Input-BLVRv0FK.js} +9 -9
- package/{Input-DIhhWEPW.cjs → Input-CzMx2mfl.cjs} +1 -1
- package/{Label-ByWt6Lfh.js → Label-BG7G0iyG.js} +24 -28
- package/Label-C00qz3kQ.cjs +1 -0
- package/Layout-Bta_Cpq_.cjs +16 -0
- package/Layout-CG-Qxr_1.js +482 -0
- package/{Link-Dnnv00g9.js → Link-BtxKZ0h3.js} +16 -16
- package/Link-Bx6avHVl.cjs +6 -0
- package/Link-CbFSuEI1.js +73 -0
- package/Link-wM7cVPlS.cjs +1 -0
- package/LinkButton-BvXu6vAH.cjs +6 -0
- package/LinkButton-D3EnZ65v.js +69 -0
- package/ListBox-ICZKGluC.cjs +1 -0
- package/ListBox-LncMQt6I.js +523 -0
- package/ListBoxLoadMoreItem-Ceo73a2q.cjs +1 -0
- package/ListBoxLoadMoreItem-W11V-Lef.js +41 -0
- package/ListBoxSection-BCPv9H50.js +1085 -0
- package/ListBoxSection-Dx75ZinL.cjs +1 -0
- package/{ListKeyboardDelegate-mcrZobNa.js → ListKeyboardDelegate-CVxkAn5D.js} +13 -9
- package/ListKeyboardDelegate-C_X1wLkh.cjs +1 -0
- package/{Logo-BW5NXAdu.cjs → Logo-CFjZc5u2.cjs} +1 -1
- package/{Logo-qkVS1MCN.js → Logo-DkagDdKQ.js} +15 -19
- package/OverlayArrow-ByH6lM-H.cjs +1 -0
- package/OverlayArrow-CvNuu3e3.js +519 -0
- package/{Popover-C5chAY42.cjs → Popover-Bi5yJEoE.cjs} +1 -1
- package/{Popover-viLqHHX2.js → Popover-CyEVqpJ6.js} +11 -11
- package/{PressResponder-B_Zqu7b1.js → PressResponder-CxVtArtP.js} +9 -9
- package/PressResponder-DbnYqwGB.cjs +1 -0
- package/ProgressBar-CdXHEJh6.js +53 -0
- package/ProgressBar-CjuHokVZ.cjs +1 -0
- package/Radio-Bll-7H8O.cjs +1 -0
- package/Radio-DoWx2AE1.js +333 -0
- package/RangeCalendar-A4WQIG7P.cjs +6 -0
- package/{RangeCalendar-DGGMbb0j.js → RangeCalendar-D7eFVAPP.js} +638 -630
- package/{SSRProvider-D8lZ0o6A.js → SSRProvider-40TXmsUG.js} +5 -5
- package/{SSRProvider-DZRLwxPS.cjs → SSRProvider-Bc-sMhsT.cjs} +1 -1
- package/{SearchField-Ma3KB8Em.cjs → SearchField-BbrUZpQm.cjs} +2 -2
- package/{SearchField-B0dlPqsW.js → SearchField-F2FKgYds.js} +29 -33
- package/Select-BnbDXwgD.cjs +1 -0
- package/Select-Dpi3LhbI.js +654 -0
- package/{SelectionManager-BdKKuso-.js → SelectionManager-Bq-Gw1UT.js} +291 -282
- package/SelectionManager-BtbHoHpA.cjs +1 -0
- package/Separator-CM0KPvsX.js +105 -0
- package/Separator-Cfv2pbWf.cjs +1 -0
- package/Separator-DH-5wu9X.js +77 -0
- package/Separator-Dgin8BNW.cjs +1 -0
- package/Skeleton-BpYj25p8.js +37 -0
- package/Skeleton-DMOxEwnd.cjs +1 -0
- package/Spinner-D1UBuLy4.cjs +6 -0
- package/Spinner-DTKb_LAA.js +47 -0
- package/TabList-D4WwgQY3.cjs +1 -0
- package/TabList-D9tl2s85.js +397 -0
- package/Table-C6k3PiiC.cjs +16 -0
- package/{Table-CTS0J_sQ.js → Table-CkN3y69S.js} +856 -798
- package/Tag-7dHEMQum.cjs +1 -0
- package/Tag-BUJ20HHw.js +765 -0
- package/Text-BAFsaON-.cjs +1 -0
- package/{Text--KL3Auo7.js → Text-Be7WIOwv.js} +3 -3
- package/{Text-wuw0HQoa.cjs → Text-BtPiT2P1.cjs} +1 -1
- package/Text-CmlsaWMA.js +32 -0
- package/TextArea-BCikUXaD.cjs +1 -0
- package/TextArea-h5_oBQH1.js +125 -0
- package/TextField-Bm5916AD.cjs +1 -0
- package/TextField-_UY8CXtW.js +134 -0
- package/TextField.module-C9Zm9unF.js +13 -0
- package/TextField.module-GTQtNO0r.cjs +1 -0
- package/{Toast-BnzpC_5v.js → Toast-BBkWczCk.js} +202 -214
- package/{Toast-BEh5yYzO.cjs → Toast-DclaxvZM.cjs} +1 -1
- package/ToggleButtonGroup-BGG64PK1.js +214 -0
- package/ToggleButtonGroup-Da330GRT.cjs +1 -0
- package/Tooltip-BHAtsp9k.js +281 -0
- package/Tooltip-CZa9n5sT.cjs +1 -0
- package/{VisuallyHidden-BKslUoMJ.js → VisuallyHidden-CGEtjAP7.js} +8 -8
- package/{VisuallyHidden-DxDOcIsh.cjs → VisuallyHidden-EjrqodVh.cjs} +1 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/assets/AccordionItem.css +1 -1
- package/assets/BadgeContainer.css +1 -1
- package/assets/Breadcrumbs.css +1 -1
- package/assets/Button.css +1 -1
- package/assets/ButtonGroup.css +1 -1
- package/assets/Card.css +1 -1
- package/assets/CharacterCounter.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/ComboBox.css +1 -1
- package/assets/DateField.css +1 -1
- package/assets/DateInputDivider.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Dialog.css +1 -1
- package/assets/Dropdown.css +1 -1
- package/assets/FieldError.css +1 -1
- package/assets/FileUpload.css +1 -1
- package/assets/GridItem.css +1 -1
- package/assets/Heading.css +1 -1
- package/assets/InfoBanner.css +1 -1
- package/assets/Label.css +1 -1
- package/assets/Layout.css +1 -1
- package/assets/Link.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/ListBoxSection.css +1 -1
- package/assets/Logo.css +1 -1
- package/assets/Popover.css +1 -1
- package/assets/ProgressBar.css +1 -1
- package/assets/Radio.css +1 -1
- package/assets/RangeCalendar.css +1 -1
- package/assets/SearchField.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Separator.css +1 -0
- package/assets/Skeleton.css +1 -1
- package/assets/Spinner.css +1 -1
- package/assets/TabList.css +1 -1
- package/assets/Table.css +1 -1
- package/assets/Tag.css +1 -1
- package/assets/Text.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/Toast.css +1 -1
- package/assets/ToggleButtonGroup.css +1 -1
- package/assets/Tooltip.css +1 -1
- package/assets/theme.css +1 -1
- package/assets/variables.css +1 -0
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.cjs +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/chevron-right-0-sUFBiR.cjs +6 -0
- package/chevron-right-BYYHEJjK.js +11 -0
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.cjs +1 -1
- package/combobox/index.d.ts +1 -1
- package/combobox/index.js +1 -1
- package/combobox/intl/translations.json.d.ts +4 -2
- package/{context-Dl_saGB6.js → context-CGNJ3grH.js} +11 -11
- package/{context-UOrD6Zxk.cjs → context-Df3XbgBG.cjs} +1 -1
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/dropdown/Dropdown.d.ts +18 -0
- package/dropdown/index.cjs +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.cjs +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/index.cjs +1 -1
- package/file-upload/index.js +1 -1
- package/filterDOMProps-RRlKPKX0.cjs +1 -0
- package/filterDOMProps-wsa9OcNI.js +65 -0
- package/grid/index.cjs +1 -1
- package/grid/index.js +2 -2
- package/heading/index.cjs +1 -1
- package/heading/index.js +1 -1
- package/{index-BSMrH_Du.js → index-BLPblar-.js} +33 -30
- package/{index-D97L3EBk.cjs → index-DSFSh2sC.cjs} +3 -3
- package/index.cjs +1 -1
- package/index.d.ts +2 -0
- package/index.js +140 -125
- package/inertValue-B3AFhVG4.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/ListBoxLoadMoreItem.d.ts +4 -0
- package/list-box/index.cjs +1 -1
- package/list-box/index.d.ts +1 -0
- package/list-box/index.js +6 -5
- package/list-box/intl/translations.json.d.ts +11 -0
- package/logo/index.cjs +1 -1
- package/logo/index.js +1 -1
- package/menu/Menu.d.ts +13 -0
- package/menu/MenuItem.d.ts +5 -0
- package/menu/MenuPopover.d.ts +3 -0
- package/menu/MenuSection.d.ts +3 -0
- package/menu/Separator.d.ts +3 -0
- package/menu/index.cjs +1 -0
- package/menu/index.d.ts +5 -0
- package/menu/index.js +8 -0
- package/mergeProps-BSsN7Bgk.js +117 -0
- package/mergeProps-JhcJ7uJL.cjs +1 -0
- package/modal/index.cjs +1 -1
- package/modal/index.js +2 -2
- package/package.json +6 -4
- package/popover/index.cjs +1 -1
- package/popover/index.js +1 -1
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/select/Select.d.ts +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/skeleton/index.cjs +1 -1
- package/skeleton/index.js +1 -1
- package/spinner/index.cjs +1 -1
- package/spinner/index.js +1 -1
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text/index.cjs +1 -1
- package/text/index.js +1 -1
- package/textfield/Input.d.ts +7 -2
- package/textfield/PasswordField.d.ts +1 -1
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/theme/generated-object.d.ts +384 -0
- package/theme/generated-tokens.d.ts +334 -0
- package/theme/index.cjs +1 -1
- package/theme/index.d.ts +4 -1
- package/theme/index.js +4037 -14
- package/theme/tokens.d.ts +30 -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 → tokens-B3FfJ-rY.cjs} +1 -1
- package/{tokens-BtEBd3jO.js → tokens-B9ooUP4g.js} +1 -2
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/useButton-D6iUB8cN.js +56 -0
- package/useButton-R8-i3HLC.cjs +1 -0
- package/useDateFormatter-2B0vgHc-.cjs +1 -0
- package/{useDateFormatter-DiIUdTak.js → useDateFormatter-BJ1ZyaH1.js} +431 -407
- package/{useDescription-LmB1V4Tg.js → useDescription-BLmIkYCq.js} +1 -1
- package/{useDescription-ByNlNIRU.cjs → useDescription-BMuiAqI5.cjs} +1 -1
- package/useEvent-3ZO5TPSH.cjs +1 -0
- package/{useEvent-DqWz89vg.js → useEvent-DpBHTuHJ.js} +1 -1
- package/{useField-5CEdtfab.js → useField-BMegM8fA.js} +2 -2
- package/{useField-CoQAzygg.cjs → useField-DyeD7MLj.cjs} +1 -1
- package/{useFilter-BKQT28sh.js → useFilter-BFnSe_Eq.js} +1 -1
- package/{useFilter-Bjh5dq2Q.cjs → useFilter-aoggM85n.cjs} +1 -1
- package/{useFocusRing-BM-zcH6L.cjs → useFocusRing-BcbYske2.cjs} +1 -1
- package/{useFocusRing-HoJn20X5.js → useFocusRing-DMo8ctYV.js} +2 -2
- package/{useFocusWithin-Cn18Myw6.js → useFocusWithin-ClMkhYcq.js} +1 -1
- package/{useFocusWithin-o0WjCpEB.cjs → useFocusWithin-DTnk0e8a.cjs} +1 -1
- package/{useFocusable-DbmryjUH.cjs → useFocusable-CsG-IPuC.cjs} +1 -1
- package/{useFocusable-ZjCKo1ed.js → useFocusable-DXlMChFC.js} +14 -14
- package/useFormValidation-BQIRxgbU.cjs +1 -0
- package/useFormValidation-L0UHvOsP.js +217 -0
- package/{useHasTabbableChild-CyOmqumh.js → useHasTabbableChild-BDaxMsGu.js} +2 -2
- package/useHasTabbableChild-CJcLnolh.cjs +1 -0
- package/{useHighlightSelectionDescription-DTxHtOsw.js → useHighlightSelectionDescription-BkEv9Jye.js} +5 -5
- package/{useHighlightSelectionDescription-DAhPdEG6.cjs → useHighlightSelectionDescription-CQaG611l.cjs} +1 -1
- package/{useHover-D8fja4GW.js → useHover-D6bNIkU0.js} +81 -79
- package/useHover-DGAmG7jt.cjs +1 -0
- package/{useLabels-BtDN_ALM.cjs → useLabels-CvUk-yS3.cjs} +1 -1
- package/{useLabels-DZlvh4P4.js → useLabels-Kmq5JCp_.js} +1 -1
- package/useListState-D2IEg6_e.cjs +1 -0
- package/{useListState-e7cL-FOK.js → useListState-pixYqSLl.js} +43 -42
- package/{useLocalizedStringFormatter-BSac43NO.cjs → useLocalizedStringFormatter-BO2iZEL0.cjs} +1 -1
- package/useLocalizedStringFormatter-BiX5BTlb.cjs +1 -0
- package/{useLocalizedStringFormatter-CSEh15AZ.js → useLocalizedStringFormatter-CL9MUZ8A.js} +1 -1
- package/{useLocalizedStringFormatter-aOhh7wdl.js → useLocalizedStringFormatter-N0AyjzbM.js} +1 -1
- package/useObserveElement-MhzEsCkX.cjs +1 -0
- package/usePress-CicXV7UO.cjs +7 -0
- package/{usePress-B_jgTf4k.js → usePress-DMUpU0GU.js} +84 -80
- package/{useSingleSelectListState-D7LjjoUJ.js → useSingleSelectListState-BlvpP8y-.js} +1 -1
- package/{useSingleSelectListState-BiJMNaOl.cjs → useSingleSelectListState-CwWK_Dx2.cjs} +1 -1
- package/useTextField-BC5X_AO_.js +89 -0
- package/useTextField-Cxpfu0U3.cjs +1 -0
- package/useToggleState-BVOqL4hI.js +21 -0
- package/useToggleState-SqDyNfRi.cjs +1 -0
- package/{useUpdateEffect-sk3kiVGz.cjs → useUpdateEffect-C5YQs_1w.cjs} +1 -1
- package/utils/types.d.ts +4 -0
- package/{utils-BM2vxlNA.cjs → utils-CMHKYKlz.cjs} +1 -1
- package/{utils-KYuflGZt.js → utils-Cpcjg55U.js} +10 -10
- package/utils-DFIwp4PB.js +262 -0
- package/utils-__vrf9VZ.cjs +1 -0
- package/AccordionItem-DEiRuizp.js +0 -361
- package/AccordionItem-Dhr7uo8u.cjs +0 -1
- package/BadgeContainer-CxVmqJ7g.cjs +0 -1
- package/Breadcrumbs-CEyKlcGU.js +0 -262
- package/Breadcrumbs-CnGzvtbn.cjs +0 -1
- package/Button-DZzQGk-L.cjs +0 -1
- package/Button.module-D-mPLRxe.js +0 -14
- package/Button.module-goCEz5qs.cjs +0 -1
- package/ButtonGroup-DUqW5dzM.cjs +0 -1
- package/Card-CwwVnA_a.js +0 -131
- package/Card-DPfOZC7f.cjs +0 -1
- package/CharacterCounter-DPphWPzA.js +0 -22
- package/Checkbox-BN_3F2Hl.js +0 -264
- package/Checkbox-CZtCj4yR.cjs +0 -1
- package/CheckboxGroup--xgOT1Do.js +0 -159
- package/CheckboxGroup-DGHaqRvb.cjs +0 -1
- package/Collection-B1xL4EdF.cjs +0 -1
- package/Collection-C5vE9MtJ.js +0 -577
- package/ComboBox-UadZMhiR.cjs +0 -1
- package/DateField-CNEoLyf5.cjs +0 -1
- package/DateField-CZmLugT0.js +0 -47
- package/DateInputDivider-CCjiq90K.cjs +0 -1
- package/DateRangePicker-DhgLEa9P.cjs +0 -6
- package/DateRangePicker-WQ97Psz7.js +0 -870
- package/Dialog-BT0tVGQb.cjs +0 -1
- package/Dialog-BuJdAr0D.js +0 -1611
- package/Dialog-DYK8lySl.cjs +0 -1
- package/Dialog-L53DWF0Z.js +0 -220
- package/DragAndDrop-DKxsUpmW.js +0 -60
- package/DragAndDrop-Dgfq6uJ0.cjs +0 -1
- package/FieldError-BlKkw9YL.js +0 -46
- package/FieldError-BvU0sueN.cjs +0 -1
- package/FocusScope-CAgWgk3N.cjs +0 -1
- package/GridItem-BnyULDnc.cjs +0 -1
- package/GridItem-orSzD7H5.js +0 -243
- package/Heading-DDhdwRAW.js +0 -46
- package/Heading-OUPkdoEJ.cjs +0 -1
- package/InfoBanner-DpLcq_1R.cjs +0 -1
- package/InfoBanner-U5hxOipC.js +0 -99
- package/Label-COpr4xVt.cjs +0 -1
- package/Layout-BR3Or1Ga.cjs +0 -16
- package/Layout-Bdqauktv.js +0 -498
- package/Link-CM2N5Jq-.js +0 -72
- package/Link-Dq8IFDBx.cjs +0 -6
- package/Link-ceVlGaWQ.cjs +0 -1
- package/LinkButton-BJA9_HzL.cjs +0 -6
- package/LinkButton-DH3Nfdis.js +0 -69
- package/ListBox-D0u9svwm.cjs +0 -1
- package/ListBox-y_dw__MI.js +0 -531
- package/ListBoxButton-C2zp-gXD.cjs +0 -1
- package/ListBoxButton-DiseS_LX.js +0 -15
- package/ListBoxSection-Cv-gN76G.js +0 -1058
- package/ListBoxSection-DtsigmC1.cjs +0 -1
- package/ListKeyboardDelegate-fZKXmHAk.cjs +0 -1
- package/OverlayArrow-8praV_Xy.cjs +0 -1
- package/OverlayArrow-DfkRZlgG.js +0 -507
- package/PressResponder-Bm3_RM9c.cjs +0 -1
- package/ProgressBar-D5mNQTID.cjs +0 -1
- package/ProgressBar-wQirOG1N.js +0 -53
- package/Radio-BIomn_sP.js +0 -313
- package/Radio-CxvJ5Wrl.cjs +0 -1
- package/RangeCalendar-BvvZ2SBj.cjs +0 -11
- package/Select-769RSZ9V.js +0 -664
- package/Select-Go5x0zWl.cjs +0 -1
- package/SelectionManager-BvREZgeu.cjs +0 -1
- package/Separator-CggS0R7Q.js +0 -59
- package/Separator-DBsDhqCr.cjs +0 -1
- package/Skeleton-BAwbfKBW.cjs +0 -1
- package/Skeleton-BePDRmrO.js +0 -40
- package/Spinner-AXFRWuT6.js +0 -51
- package/Spinner-yHx_DX_4.cjs +0 -6
- package/TabList-0gj27e_e.js +0 -386
- package/TabList-Cqpup53E.cjs +0 -1
- package/Table-BhtlNY9P.cjs +0 -16
- package/Tag-B9M-nBTM.js +0 -748
- package/Tag-DkW6zaIS.cjs +0 -1
- package/Text-BUDAzDjW.js +0 -32
- package/Text-DA_gK6a2.cjs +0 -1
- package/TextArea-CSrrYY05.cjs +0 -1
- package/TextArea-DphcH6wE.js +0 -119
- package/TextField-CsyRTSEG.js +0 -120
- package/TextField-P5yICj5z.cjs +0 -1
- package/TextField.module-BcpPBWnD.js +0 -13
- package/TextField.module-Dw5Rtn9y.cjs +0 -1
- package/ToggleButtonGroup-BwFAhFEi.cjs +0 -1
- package/ToggleButtonGroup-CuxAKB3-.js +0 -211
- package/Tooltip-Bz0xCZSw.cjs +0 -1
- package/Tooltip-EuEQtHZj.js +0 -285
- package/filterDOMProps-BS2lrgFA.cjs +0 -1
- package/filterDOMProps-D6KHYVBX.js +0 -24
- package/inertValue-BWmZ1afe.cjs +0 -1
- package/mergeProps-BYJQ6N1s.js +0 -115
- package/mergeProps-C7Sx47fA.cjs +0 -1
- package/useButton-CWHoXYnj.js +0 -47
- package/useButton-CwOQUGtY.cjs +0 -1
- package/useDateFormatter-bzjwqA2K.cjs +0 -1
- package/useEvent-CGRyLM2c.cjs +0 -1
- package/useFormValidation-BW2NSTM4.js +0 -215
- package/useFormValidation-DSRwb9US.cjs +0 -1
- package/useHasTabbableChild-CogBR_6o.cjs +0 -1
- package/useHover-CaFzQrR_.cjs +0 -1
- package/useListState-TtWy_rDI.cjs +0 -1
- package/useLocalizedStringFormatter-CHAo1AyN.cjs +0 -1
- package/useObserveElement-BzEr5D32.cjs +0 -1
- package/usePress-BOGIOlm8.cjs +0 -7
- package/useTextField-BVIOd8Ld.cjs +0 -1
- package/useTextField-DFkSHoQN.js +0 -86
- package/useToggleState-Bz5rAf4C.js +0 -18
- package/useToggleState-DoIkSQdj.cjs +0 -1
- package/utils-C5-CzvX2.cjs +0 -1
- package/utils-CuqJqFqQ.js +0 -234
|
@@ -1,1058 +0,0 @@
|
|
|
1
|
-
import { jsx as k, jsxs as lt } from "react/jsx-runtime";
|
|
2
|
-
import { $ as ot, a as nt, b as st } from "./ListBox-y_dw__MI.js";
|
|
3
|
-
import { d as rt, h as at } from "./Collection-C5vE9MtJ.js";
|
|
4
|
-
import w, { useState as S, useRef as C, useMemo as _, useCallback as L, useEffect as ht, createContext as X, useContext as A } from "react";
|
|
5
|
-
import { $ as E, d as dt } from "./mergeProps-BYJQ6N1s.js";
|
|
6
|
-
import { $ as F } from "./context-Dl_saGB6.js";
|
|
7
|
-
import { flushSync as P } from "react-dom";
|
|
8
|
-
import { g as ct } from "./OverlayArrow-DfkRZlgG.js";
|
|
9
|
-
import { $ as ut } from "./useEvent-DqWz89vg.js";
|
|
10
|
-
import { c as K } from "./clsx-OuTLNxxd.js";
|
|
11
|
-
import { f as Y } from "./SelectionManager-BdKKuso-.js";
|
|
12
|
-
import { a as ft } from "./Dialog-BuJdAr0D.js";
|
|
13
|
-
import { e as gt } from "./Separator-CggS0R7Q.js";
|
|
14
|
-
import './assets/ListBoxSection.css';class yt {
|
|
15
|
-
/**
|
|
16
|
-
* Returns whether the layout should invalidate in response to
|
|
17
|
-
* visible rectangle changes. By default, it only invalidates
|
|
18
|
-
* when the virtualizer's size changes. Return true always
|
|
19
|
-
* to make the layout invalidate while scrolling (e.g. sticky headers).
|
|
20
|
-
*/
|
|
21
|
-
shouldInvalidate(t, e) {
|
|
22
|
-
return t.width !== e.width || t.height !== e.height;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Returns whether the layout should invalidate when the layout options change.
|
|
26
|
-
* By default it invalidates when the object identity changes. Override this
|
|
27
|
-
* method to optimize layout updates based on specific option changes.
|
|
28
|
-
*/
|
|
29
|
-
shouldInvalidateLayoutOptions(t, e) {
|
|
30
|
-
return t !== e;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* This method allows the layout to perform any pre-computation
|
|
34
|
-
* it needs to in order to prepare LayoutInfos for retrieval.
|
|
35
|
-
* Called by the virtualizer before `getVisibleLayoutInfos`
|
|
36
|
-
* or `getLayoutInfo` are called.
|
|
37
|
-
*/
|
|
38
|
-
update(t) {
|
|
39
|
-
}
|
|
40
|
-
/** @private */
|
|
41
|
-
getItemRect(t) {
|
|
42
|
-
var e, i;
|
|
43
|
-
return (i = (e = this.getLayoutInfo(t)) === null || e === void 0 ? void 0 : e.rect) !== null && i !== void 0 ? i : null;
|
|
44
|
-
}
|
|
45
|
-
/** @private */
|
|
46
|
-
getVisibleRect() {
|
|
47
|
-
return this.virtualizer.visibleRect;
|
|
48
|
-
}
|
|
49
|
-
constructor() {
|
|
50
|
-
this.virtualizer = null;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
class b {
|
|
54
|
-
/**
|
|
55
|
-
* Returns a copy of the LayoutInfo.
|
|
56
|
-
*/
|
|
57
|
-
copy() {
|
|
58
|
-
let t = new b(this.type, this.key, this.rect.copy());
|
|
59
|
-
return t.estimatedSize = this.estimatedSize, t.opacity = this.opacity, t.transform = this.transform, t.parentKey = this.parentKey, t.content = this.content, t.isSticky = this.isSticky, t.zIndex = this.zIndex, t.allowOverflow = this.allowOverflow, t;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @param type The type of element represented by this LayoutInfo. Should match the `type` of the corresponding collection node.
|
|
63
|
-
* @param key A unique key for this LayoutInfo. Should match the `key` of the corresponding collection node.
|
|
64
|
-
* @param rect The rectangle describing the size and position of this element.
|
|
65
|
-
*/
|
|
66
|
-
constructor(t, e, i) {
|
|
67
|
-
this.type = t, this.key = e, 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;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
class x {
|
|
71
|
-
/**
|
|
72
|
-
* Returns a copy of this point.
|
|
73
|
-
*/
|
|
74
|
-
copy() {
|
|
75
|
-
return new x(this.x, this.y);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Checks if two points are equal.
|
|
79
|
-
*/
|
|
80
|
-
equals(t) {
|
|
81
|
-
return this.x === t.x && this.y === t.y;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Returns true if this point is the origin.
|
|
85
|
-
*/
|
|
86
|
-
isOrigin() {
|
|
87
|
-
return this.x === 0 && this.y === 0;
|
|
88
|
-
}
|
|
89
|
-
constructor(t = 0, e = 0) {
|
|
90
|
-
this.x = t, this.y = e;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
class u {
|
|
94
|
-
/**
|
|
95
|
-
* The maximum x-coordinate in the rectangle.
|
|
96
|
-
*/
|
|
97
|
-
get maxX() {
|
|
98
|
-
return this.x + this.width;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* The maximum y-coordinate in the rectangle.
|
|
102
|
-
*/
|
|
103
|
-
get maxY() {
|
|
104
|
-
return this.y + this.height;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* The area of the rectangle.
|
|
108
|
-
*/
|
|
109
|
-
get area() {
|
|
110
|
-
return this.width * this.height;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* The top left corner of the rectangle.
|
|
114
|
-
*/
|
|
115
|
-
get topLeft() {
|
|
116
|
-
return new x(this.x, this.y);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* The top right corner of the rectangle.
|
|
120
|
-
*/
|
|
121
|
-
get topRight() {
|
|
122
|
-
return new x(this.maxX, this.y);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* The bottom left corner of the rectangle.
|
|
126
|
-
*/
|
|
127
|
-
get bottomLeft() {
|
|
128
|
-
return new x(this.x, this.maxY);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* The bottom right corner of the rectangle.
|
|
132
|
-
*/
|
|
133
|
-
get bottomRight() {
|
|
134
|
-
return new x(this.maxX, this.maxY);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Returns whether this rectangle intersects another rectangle.
|
|
138
|
-
* @param rect - The rectangle to check.
|
|
139
|
-
*/
|
|
140
|
-
intersects(t) {
|
|
141
|
-
return this.area > 0 && t.area > 0 && this.x <= t.x + t.width && t.x <= this.x + this.width && this.y <= t.y + t.height && t.y <= this.y + this.height;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Returns whether this rectangle fully contains another rectangle.
|
|
145
|
-
* @param rect - The rectangle to check.
|
|
146
|
-
*/
|
|
147
|
-
containsRect(t) {
|
|
148
|
-
return this.x <= t.x && this.y <= t.y && this.maxX >= t.maxX && this.maxY >= t.maxY;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Returns whether the rectangle contains the given point.
|
|
152
|
-
* @param point - The point to check.
|
|
153
|
-
*/
|
|
154
|
-
containsPoint(t) {
|
|
155
|
-
return this.x <= t.x && this.y <= t.y && this.maxX >= t.x && this.maxY >= t.y;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Returns the first corner of this rectangle (from top to bottom, left to right)
|
|
159
|
-
* that is contained in the given rectangle, or null of the rectangles do not intersect.
|
|
160
|
-
* @param rect - The rectangle to check.
|
|
161
|
-
*/
|
|
162
|
-
getCornerInRect(t) {
|
|
163
|
-
for (let e of [
|
|
164
|
-
"topLeft",
|
|
165
|
-
"topRight",
|
|
166
|
-
"bottomLeft",
|
|
167
|
-
"bottomRight"
|
|
168
|
-
])
|
|
169
|
-
if (t.containsPoint(this[e])) return e;
|
|
170
|
-
return null;
|
|
171
|
-
}
|
|
172
|
-
equals(t) {
|
|
173
|
-
return t.x === this.x && t.y === this.y && t.width === this.width && t.height === this.height;
|
|
174
|
-
}
|
|
175
|
-
pointEquals(t) {
|
|
176
|
-
return this.x === t.x && this.y === t.y;
|
|
177
|
-
}
|
|
178
|
-
sizeEquals(t) {
|
|
179
|
-
return this.width === t.width && this.height === t.height;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Returns the union of this Rect and another.
|
|
183
|
-
*/
|
|
184
|
-
union(t) {
|
|
185
|
-
let e = Math.min(this.x, t.x), i = Math.min(this.y, t.y), l = Math.max(this.maxX, t.maxX) - e, o = Math.max(this.maxY, t.maxY) - i;
|
|
186
|
-
return new u(e, i, l, o);
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Returns the intersection of this Rect with another.
|
|
190
|
-
* If the rectangles do not intersect, an all zero Rect is returned.
|
|
191
|
-
*/
|
|
192
|
-
intersection(t) {
|
|
193
|
-
if (!this.intersects(t)) return new u(0, 0, 0, 0);
|
|
194
|
-
let e = Math.max(this.x, t.x), i = Math.max(this.y, t.y);
|
|
195
|
-
return new u(e, i, Math.min(this.maxX, t.maxX) - e, Math.min(this.maxY, t.maxY) - i);
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Returns a copy of this rectangle.
|
|
199
|
-
*/
|
|
200
|
-
copy() {
|
|
201
|
-
return new u(this.x, this.y, this.width, this.height);
|
|
202
|
-
}
|
|
203
|
-
constructor(t = 0, e = 0, i = 0, l = 0) {
|
|
204
|
-
this.x = t, this.y = e, this.width = i, this.height = l;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
class z {
|
|
208
|
-
/**
|
|
209
|
-
* Returns a copy of this size.
|
|
210
|
-
*/
|
|
211
|
-
copy() {
|
|
212
|
-
return new z(this.width, this.height);
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Returns whether this size is equal to another one.
|
|
216
|
-
*/
|
|
217
|
-
equals(t) {
|
|
218
|
-
return this.width === t.width && this.height === t.height;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* The total area of the Size.
|
|
222
|
-
*/
|
|
223
|
-
get area() {
|
|
224
|
-
return this.width * this.height;
|
|
225
|
-
}
|
|
226
|
-
constructor(t = 0, e = 0) {
|
|
227
|
-
this.width = Math.max(t, 0), this.height = Math.max(e, 0);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
let vt = 0;
|
|
231
|
-
class j {
|
|
232
|
-
/**
|
|
233
|
-
* Prepares the view for reuse. Called just before the view is removed from the DOM.
|
|
234
|
-
*/
|
|
235
|
-
prepareForReuse() {
|
|
236
|
-
this.content = null, this.rendered = null, this.layoutInfo = null;
|
|
237
|
-
}
|
|
238
|
-
getReusableView(t) {
|
|
239
|
-
let e = this.reusableViews.get(t);
|
|
240
|
-
return e && e.length > 0 ? e.shift() : new mt(this.virtualizer, this, t);
|
|
241
|
-
}
|
|
242
|
-
reuseChild(t) {
|
|
243
|
-
t.prepareForReuse();
|
|
244
|
-
let e = this.reusableViews.get(t.viewType);
|
|
245
|
-
e || (e = [], this.reusableViews.set(t.viewType, e)), e.push(t);
|
|
246
|
-
}
|
|
247
|
-
constructor(t, e) {
|
|
248
|
-
this.virtualizer = t, this.key = ++vt, this.viewType = e, this.children = /* @__PURE__ */ new Set(), this.reusableViews = /* @__PURE__ */ new Map(), this.layoutInfo = null, this.content = null, this.rendered = null;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
class pt extends j {
|
|
252
|
-
constructor(t) {
|
|
253
|
-
super(t, "root");
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
class mt extends j {
|
|
257
|
-
constructor(t, e, i) {
|
|
258
|
-
super(t, i), this.parent = e;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
function wt(n, t) {
|
|
262
|
-
if (n === t) return !0;
|
|
263
|
-
if (n.size !== t.size) return !1;
|
|
264
|
-
for (let e of n)
|
|
265
|
-
if (!t.has(e)) return !1;
|
|
266
|
-
return !0;
|
|
267
|
-
}
|
|
268
|
-
class bt {
|
|
269
|
-
setVisibleRect(t) {
|
|
270
|
-
let e = performance.now() - this.startTime;
|
|
271
|
-
e < 500 && (t.x !== this.visibleRect.x && e > 0 && (this.velocity.x = (t.x - this.visibleRect.x) / e), t.y !== this.visibleRect.y && e > 0 && (this.velocity.y = (t.y - this.visibleRect.y) / e)), this.startTime = performance.now(), this.visibleRect = t;
|
|
272
|
-
}
|
|
273
|
-
getOverscannedRect() {
|
|
274
|
-
let t = this.visibleRect.copy(), e = this.visibleRect.height / 3;
|
|
275
|
-
if (t.height += e, this.velocity.y < 0 && (t.y -= e), this.velocity.x !== 0) {
|
|
276
|
-
let i = this.visibleRect.width / 3;
|
|
277
|
-
t.width += i, this.velocity.x < 0 && (t.x -= i);
|
|
278
|
-
}
|
|
279
|
-
return t;
|
|
280
|
-
}
|
|
281
|
-
constructor() {
|
|
282
|
-
this.startTime = 0, this.velocity = new x(0, 0), this.visibleRect = new u();
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
class xt {
|
|
286
|
-
/** Returns whether the given key, or an ancestor, is persisted. */
|
|
287
|
-
isPersistedKey(t) {
|
|
288
|
-
if (this.persistedKeys.has(t)) return !0;
|
|
289
|
-
for (let e of this.persistedKeys) for (; e != null; ) {
|
|
290
|
-
let i = this.layout.getLayoutInfo(e);
|
|
291
|
-
if (!i || i.parentKey == null) break;
|
|
292
|
-
if (e = i.parentKey, e === t) return !0;
|
|
293
|
-
}
|
|
294
|
-
return !1;
|
|
295
|
-
}
|
|
296
|
-
getParentView(t) {
|
|
297
|
-
return t.parentKey != null ? this._visibleViews.get(t.parentKey) : this._rootView;
|
|
298
|
-
}
|
|
299
|
-
getReusableView(t) {
|
|
300
|
-
let i = this.getParentView(t).getReusableView(t.type);
|
|
301
|
-
return i.layoutInfo = t, this._renderView(i), i;
|
|
302
|
-
}
|
|
303
|
-
_renderView(t) {
|
|
304
|
-
if (t.layoutInfo) {
|
|
305
|
-
let { type: e, key: i, content: l } = t.layoutInfo;
|
|
306
|
-
t.content = l || this.collection.getItem(i), t.rendered = this._renderContent(e, t.content);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
_renderContent(t, e) {
|
|
310
|
-
let i = e != null ? this._renderedContent.get(e) : null;
|
|
311
|
-
if (i != null) return i;
|
|
312
|
-
let l = this.delegate.renderView(t, e);
|
|
313
|
-
return e && this._renderedContent.set(e, l), l;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Returns the key for the item view currently at the given point.
|
|
317
|
-
*/
|
|
318
|
-
keyAtPoint(t) {
|
|
319
|
-
let e = new u(t.x, t.y, 1, 1), i = e.area === 0 ? [] : this.layout.getVisibleLayoutInfos(e);
|
|
320
|
-
for (let l of i)
|
|
321
|
-
if (l.rect.intersects(e)) return l.key;
|
|
322
|
-
return null;
|
|
323
|
-
}
|
|
324
|
-
relayout(t = {}) {
|
|
325
|
-
this.layout.update(t), this.contentSize = this.layout.getContentSize();
|
|
326
|
-
let e = this.visibleRect, i = t.contentChanged ? 0 : e.x, l = t.contentChanged ? 0 : e.y;
|
|
327
|
-
if (i = Math.max(0, Math.min(this.contentSize.width - e.width, i)), l = Math.max(0, Math.min(this.contentSize.height - e.height, l)), i !== e.x || l !== e.y) {
|
|
328
|
-
let o = new u(i, l, e.width, e.height);
|
|
329
|
-
this.delegate.setVisibleRect(o);
|
|
330
|
-
} else this.updateSubviews();
|
|
331
|
-
}
|
|
332
|
-
getVisibleLayoutInfos() {
|
|
333
|
-
let t = process.env.NODE_ENV === "test" && !process.env.VIRT_ON, e = t && typeof HTMLElement < "u" && Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"), i = t && typeof HTMLElement < "u" && Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"), l;
|
|
334
|
-
t && !(e && i) ? l = new u(0, 0, this.contentSize.width, this.contentSize.height) : l = this._overscanManager.getOverscannedRect();
|
|
335
|
-
let o = this.layout.getVisibleLayoutInfos(l), s = /* @__PURE__ */ new Map();
|
|
336
|
-
for (let a of o) s.set(a.key, a);
|
|
337
|
-
return s;
|
|
338
|
-
}
|
|
339
|
-
updateSubviews() {
|
|
340
|
-
let t = this.getVisibleLayoutInfos(), e = /* @__PURE__ */ new Set();
|
|
341
|
-
for (let [i, l] of this._visibleViews) {
|
|
342
|
-
let o = t.get(i);
|
|
343
|
-
(!o || l.parent !== this.getParentView(o)) && (this._visibleViews.delete(i), l.parent.reuseChild(l), e.add(l));
|
|
344
|
-
}
|
|
345
|
-
for (let [i, l] of t) {
|
|
346
|
-
let o = this._visibleViews.get(i);
|
|
347
|
-
if (!o)
|
|
348
|
-
o = this.getReusableView(l), o.parent.children.add(o), this._visibleViews.set(i, o), e.delete(o);
|
|
349
|
-
else {
|
|
350
|
-
o.layoutInfo = l;
|
|
351
|
-
let s = this.collection.getItem(l.key);
|
|
352
|
-
o.content !== s && (o.content != null && this._renderedContent.delete(o.content), this._renderView(o));
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
for (let i of e)
|
|
356
|
-
i.parent.children.delete(i), i.parent.reusableViews.clear();
|
|
357
|
-
if (!this._isScrolling)
|
|
358
|
-
for (let i of t.keys()) {
|
|
359
|
-
let l = this._visibleViews.get(i);
|
|
360
|
-
l.parent.children.delete(l), l.parent.children.add(l);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
/** Performs layout and updates visible views as needed. */
|
|
364
|
-
render(t) {
|
|
365
|
-
let e = this, i = !1, l = !1, o = !1, s = !1, a = !1, h = !1;
|
|
366
|
-
return t.collection !== this.collection && (e.collection = t.collection, i = !0), (t.layout !== this.layout || this.layout.virtualizer !== this) && (this.layout && (this.layout.virtualizer = null), t.layout.virtualizer = this, e.layout = t.layout, i = !0), t.persistedKeys && !wt(t.persistedKeys, this.persistedKeys) && (e.persistedKeys = t.persistedKeys, h = !0), this.visibleRect.equals(t.visibleRect) || (this._overscanManager.setVisibleRect(t.visibleRect), this.layout.shouldInvalidate(t.visibleRect, this.visibleRect) ? (l = !t.visibleRect.pointEquals(this.visibleRect), o = !t.visibleRect.sizeEquals(this.visibleRect), i = !0) : h = !0, e.visibleRect = t.visibleRect), t.invalidationContext !== this._invalidationContext && (t.invalidationContext && (o || (o = t.invalidationContext.sizeChanged || !1), l || (l = t.invalidationContext.offsetChanged || !1), s || (s = t.invalidationContext.itemSizeChanged || !1), a || (a = t.invalidationContext.layoutOptions != null && this._invalidationContext.layoutOptions != null && t.invalidationContext.layoutOptions !== this._invalidationContext.layoutOptions && this.layout.shouldInvalidateLayoutOptions(t.invalidationContext.layoutOptions, this._invalidationContext.layoutOptions)), i || (i = s || o || l || a)), this._invalidationContext = t.invalidationContext), t.isScrolling !== this._isScrolling && (this._isScrolling = t.isScrolling, t.isScrolling || (h = !0)), i ? this.relayout({
|
|
367
|
-
offsetChanged: l,
|
|
368
|
-
sizeChanged: o,
|
|
369
|
-
itemSizeChanged: s,
|
|
370
|
-
layoutOptionsChanged: a,
|
|
371
|
-
layoutOptions: this._invalidationContext.layoutOptions
|
|
372
|
-
}) : h && this.updateSubviews(), Array.from(this._rootView.children);
|
|
373
|
-
}
|
|
374
|
-
getVisibleView(t) {
|
|
375
|
-
return this._visibleViews.get(t);
|
|
376
|
-
}
|
|
377
|
-
invalidate(t) {
|
|
378
|
-
this.delegate.invalidate(t);
|
|
379
|
-
}
|
|
380
|
-
updateItemSize(t, e) {
|
|
381
|
-
if (!this.layout.updateItemSize) return;
|
|
382
|
-
this.layout.updateItemSize(t, e) && this.invalidate({
|
|
383
|
-
itemSizeChanged: !0
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
constructor(t) {
|
|
387
|
-
this.delegate = t.delegate, this.collection = t.collection, this.layout = t.layout, this.contentSize = new z(), this.visibleRect = new u(), this.persistedKeys = /* @__PURE__ */ new Set(), this._visibleViews = /* @__PURE__ */ new Map(), this._renderedContent = /* @__PURE__ */ new WeakMap(), this._rootView = new pt(this), this._isScrolling = !1, this._invalidationContext = {}, this._overscanManager = new bt();
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
function It(n) {
|
|
391
|
-
let [t, e] = S(new u(0, 0, 0, 0)), [i, l] = S(!1), [o, s] = S({}), a = C(!1), [h] = S(() => new xt({
|
|
392
|
-
collection: n.collection,
|
|
393
|
-
layout: n.layout,
|
|
394
|
-
delegate: {
|
|
395
|
-
setVisibleRect(p) {
|
|
396
|
-
e(p), a.current = !0;
|
|
397
|
-
},
|
|
398
|
-
// TODO: should changing these invalidate the entire cache?
|
|
399
|
-
renderView: n.renderView,
|
|
400
|
-
invalidate: s
|
|
401
|
-
}
|
|
402
|
-
}));
|
|
403
|
-
E(() => {
|
|
404
|
-
a.current && (a.current = !1, n.onVisibleRectChange(t));
|
|
405
|
-
});
|
|
406
|
-
let r = _(() => n.layoutOptions != null ? {
|
|
407
|
-
...o,
|
|
408
|
-
layoutOptions: n.layoutOptions
|
|
409
|
-
} : o, [
|
|
410
|
-
o,
|
|
411
|
-
n.layoutOptions
|
|
412
|
-
]), d = h.render({
|
|
413
|
-
layout: n.layout,
|
|
414
|
-
collection: n.collection,
|
|
415
|
-
persistedKeys: n.persistedKeys,
|
|
416
|
-
layoutOptions: n.layoutOptions,
|
|
417
|
-
visibleRect: t,
|
|
418
|
-
invalidationContext: r,
|
|
419
|
-
isScrolling: i
|
|
420
|
-
}), c = h.contentSize, f = L(() => {
|
|
421
|
-
l(!0);
|
|
422
|
-
}, []), g = L(() => {
|
|
423
|
-
l(!1);
|
|
424
|
-
}, []);
|
|
425
|
-
return _(() => ({
|
|
426
|
-
virtualizer: h,
|
|
427
|
-
visibleViews: d,
|
|
428
|
-
setVisibleRect: e,
|
|
429
|
-
contentSize: c,
|
|
430
|
-
isScrolling: i,
|
|
431
|
-
startScrolling: f,
|
|
432
|
-
endScrolling: g
|
|
433
|
-
}), [
|
|
434
|
-
h,
|
|
435
|
-
d,
|
|
436
|
-
e,
|
|
437
|
-
c,
|
|
438
|
-
i,
|
|
439
|
-
f,
|
|
440
|
-
g
|
|
441
|
-
]);
|
|
442
|
-
}
|
|
443
|
-
const R = 48;
|
|
444
|
-
class Rt extends yt {
|
|
445
|
-
// Backward compatibility for subclassing.
|
|
446
|
-
get collection() {
|
|
447
|
-
return this.virtualizer.collection;
|
|
448
|
-
}
|
|
449
|
-
getLayoutInfo(t) {
|
|
450
|
-
var e;
|
|
451
|
-
return this.ensureLayoutInfo(t), ((e = this.layoutNodes.get(t)) === null || e === void 0 ? void 0 : e.layoutInfo) || null;
|
|
452
|
-
}
|
|
453
|
-
getVisibleLayoutInfos(t) {
|
|
454
|
-
if (t.height > 1) {
|
|
455
|
-
var e, i;
|
|
456
|
-
let s = ((i = (e = this.rowHeight) !== null && e !== void 0 ? e : this.estimatedRowHeight) !== null && i !== void 0 ? i : R) + this.gap;
|
|
457
|
-
t.y = Math.floor(t.y / s) * s, t.height = Math.ceil(t.height / s) * s;
|
|
458
|
-
}
|
|
459
|
-
this.layoutIfNeeded(t);
|
|
460
|
-
let l = [], o = (s) => {
|
|
461
|
-
for (let a of s) this.isVisible(a, t) && (l.push(a.layoutInfo), a.children && o(a.children));
|
|
462
|
-
};
|
|
463
|
-
return o(this.rootNodes), l;
|
|
464
|
-
}
|
|
465
|
-
layoutIfNeeded(t) {
|
|
466
|
-
if (this.lastCollection) {
|
|
467
|
-
this.requestedRect.containsRect(t) || (this.requestedRect = this.requestedRect.union(t), this.rootNodes = this.buildCollection());
|
|
468
|
-
for (let e of this.virtualizer.persistedKeys)
|
|
469
|
-
if (this.ensureLayoutInfo(e)) return;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
ensureLayoutInfo(t) {
|
|
473
|
-
return !this.layoutNodes.has(t) && this.requestedRect.area < this.contentSize.area && this.lastCollection ? (this.requestedRect = new u(0, 0, 1 / 0, 1 / 0), this.rootNodes = this.buildCollection(), this.requestedRect = new u(0, 0, this.contentSize.width, this.contentSize.height), !0) : !1;
|
|
474
|
-
}
|
|
475
|
-
isVisible(t, e) {
|
|
476
|
-
return t.layoutInfo.rect.intersects(e) || t.layoutInfo.isSticky || t.layoutInfo.type === "header" || t.layoutInfo.type === "loader" || this.virtualizer.isPersistedKey(t.layoutInfo.key);
|
|
477
|
-
}
|
|
478
|
-
shouldInvalidateEverything(t) {
|
|
479
|
-
let e = t.layoutOptions;
|
|
480
|
-
var i, l, o, s, a;
|
|
481
|
-
return t.sizeChanged || this.rowHeight !== ((i = e == null ? void 0 : e.rowHeight) !== null && i !== void 0 ? i : this.rowHeight) || this.headingHeight !== ((l = e == null ? void 0 : e.headingHeight) !== null && l !== void 0 ? l : this.headingHeight) || this.loaderHeight !== ((o = e == null ? void 0 : e.loaderHeight) !== null && o !== void 0 ? o : this.loaderHeight) || this.gap !== ((s = e == null ? void 0 : e.gap) !== null && s !== void 0 ? s : this.gap) || this.padding !== ((a = e == null ? void 0 : e.padding) !== null && a !== void 0 ? a : this.padding);
|
|
482
|
-
}
|
|
483
|
-
shouldInvalidateLayoutOptions(t, e) {
|
|
484
|
-
return t.rowHeight !== e.rowHeight || t.estimatedRowHeight !== e.estimatedRowHeight || t.headingHeight !== e.headingHeight || t.estimatedHeadingHeight !== e.estimatedHeadingHeight || t.loaderHeight !== e.loaderHeight || t.dropIndicatorThickness !== e.dropIndicatorThickness || t.gap !== e.gap || t.padding !== e.padding;
|
|
485
|
-
}
|
|
486
|
-
update(t) {
|
|
487
|
-
let e = this.virtualizer.collection;
|
|
488
|
-
this.invalidateEverything = this.shouldInvalidateEverything(t), this.invalidateEverything && (this.requestedRect = this.virtualizer.visibleRect.copy(), this.layoutNodes.clear());
|
|
489
|
-
let i = t.layoutOptions;
|
|
490
|
-
var l;
|
|
491
|
-
this.rowHeight = (l = i == null ? void 0 : i.rowHeight) !== null && l !== void 0 ? l : this.rowHeight;
|
|
492
|
-
var o;
|
|
493
|
-
this.estimatedRowHeight = (o = i == null ? void 0 : i.estimatedRowHeight) !== null && o !== void 0 ? o : this.estimatedRowHeight;
|
|
494
|
-
var s;
|
|
495
|
-
this.headingHeight = (s = i == null ? void 0 : i.headingHeight) !== null && s !== void 0 ? s : this.headingHeight;
|
|
496
|
-
var a;
|
|
497
|
-
this.estimatedHeadingHeight = (a = i == null ? void 0 : i.estimatedHeadingHeight) !== null && a !== void 0 ? a : this.estimatedHeadingHeight;
|
|
498
|
-
var h;
|
|
499
|
-
this.loaderHeight = (h = i == null ? void 0 : i.loaderHeight) !== null && h !== void 0 ? h : this.loaderHeight;
|
|
500
|
-
var r;
|
|
501
|
-
this.dropIndicatorThickness = (r = i == null ? void 0 : i.dropIndicatorThickness) !== null && r !== void 0 ? r : this.dropIndicatorThickness;
|
|
502
|
-
var d;
|
|
503
|
-
this.gap = (d = i == null ? void 0 : i.gap) !== null && d !== void 0 ? d : this.gap;
|
|
504
|
-
var c;
|
|
505
|
-
if (this.padding = (c = i == null ? void 0 : i.padding) !== null && c !== void 0 ? c : this.padding, this.rootNodes = this.buildCollection(), this.lastCollection && e !== this.lastCollection)
|
|
506
|
-
for (let f of this.lastCollection.getKeys()) e.getItem(f) || this.layoutNodes.get(f) && this.layoutNodes.delete(f);
|
|
507
|
-
this.lastCollection = e, this.invalidateEverything = !1, this.validRect = this.requestedRect.copy();
|
|
508
|
-
}
|
|
509
|
-
buildCollection(t = this.padding) {
|
|
510
|
-
let e = this.virtualizer.collection, i = 0, l = [], o = (e == null ? void 0 : e.size) === 0 || e.size === 1 && e.getItem(e.getFirstKey()).type === "loader";
|
|
511
|
-
o && (t = 0);
|
|
512
|
-
for (let r of e) {
|
|
513
|
-
var s, a;
|
|
514
|
-
let d = ((a = (s = this.rowHeight) !== null && s !== void 0 ? s : this.estimatedRowHeight) !== null && a !== void 0 ? a : R) + this.gap;
|
|
515
|
-
if (r.type === "item" && t + d < this.requestedRect.y && !this.isValid(r, t)) {
|
|
516
|
-
t += d, i++;
|
|
517
|
-
continue;
|
|
518
|
-
}
|
|
519
|
-
let c = this.buildChild(r, this.padding, t, null);
|
|
520
|
-
if (t = c.layoutInfo.rect.maxY + this.gap, l.push(c), r.type === "item" && t > this.requestedRect.maxY) {
|
|
521
|
-
var h;
|
|
522
|
-
let f = e.size - (l.length + i), g = e.getItem(e.getLastKey());
|
|
523
|
-
if ((g == null ? void 0 : g.type) === "loader" && f--, t += f * d, (g == null ? void 0 : g.type) === "loader" && ((h = l.at(-1)) === null || h === void 0 ? void 0 : h.layoutInfo.type) !== "loader") {
|
|
524
|
-
let y = this.buildChild(g, this.padding, t, null);
|
|
525
|
-
l.push(y), t = y.layoutInfo.rect.maxY;
|
|
526
|
-
}
|
|
527
|
-
break;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
return t -= this.gap, t += o ? 0 : this.padding, this.contentSize = new z(this.virtualizer.visibleRect.width, t), l;
|
|
531
|
-
}
|
|
532
|
-
isValid(t, e) {
|
|
533
|
-
let i = this.layoutNodes.get(t.key);
|
|
534
|
-
return !this.invalidateEverything && !!i && i.node === t && e === i.layoutInfo.rect.y && i.layoutInfo.rect.intersects(this.validRect) && i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect));
|
|
535
|
-
}
|
|
536
|
-
buildChild(t, e, i, l) {
|
|
537
|
-
if (this.isValid(t, i)) return this.layoutNodes.get(t.key);
|
|
538
|
-
let o = this.buildNode(t, e, i);
|
|
539
|
-
return o.layoutInfo.parentKey = l ?? null, o.layoutInfo.allowOverflow = !0, this.layoutNodes.set(t.key, o), o;
|
|
540
|
-
}
|
|
541
|
-
buildNode(t, e, i) {
|
|
542
|
-
switch (t.type) {
|
|
543
|
-
case "section":
|
|
544
|
-
return this.buildSection(t, e, i);
|
|
545
|
-
case "item":
|
|
546
|
-
return this.buildItem(t, e, i);
|
|
547
|
-
case "header":
|
|
548
|
-
return this.buildSectionHeader(t, e, i);
|
|
549
|
-
case "loader":
|
|
550
|
-
return this.buildLoader(t, e, i);
|
|
551
|
-
case "separator":
|
|
552
|
-
return this.buildItem(t, e, i);
|
|
553
|
-
default:
|
|
554
|
-
throw new Error("Unsupported node type: " + t.type);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
buildLoader(t, e, i) {
|
|
558
|
-
let l = new u(e, i, this.padding, 0), o = new b("loader", t.key, l);
|
|
559
|
-
l.width = this.virtualizer.contentSize.width - this.padding - e;
|
|
560
|
-
var s, a, h;
|
|
561
|
-
return l.height = t.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 : R : 0, {
|
|
562
|
-
layoutInfo: o,
|
|
563
|
-
validRect: l.intersection(this.requestedRect)
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
buildSection(t, e, i) {
|
|
567
|
-
let l = this.virtualizer.collection, o = this.virtualizer.visibleRect.width - this.padding, s = new u(e, i, o - e, 0), a = new b(t.type, t.key, s), h = i, r = 0, d = [];
|
|
568
|
-
for (let g of Y(t, l)) {
|
|
569
|
-
var c, f;
|
|
570
|
-
let y = ((f = (c = this.rowHeight) !== null && c !== void 0 ? c : this.estimatedRowHeight) !== null && f !== void 0 ? f : R) + this.gap;
|
|
571
|
-
if (i + y < this.requestedRect.y && !this.isValid(t, i)) {
|
|
572
|
-
i += y, r++;
|
|
573
|
-
continue;
|
|
574
|
-
}
|
|
575
|
-
let p = this.buildChild(g, e, i, a.key);
|
|
576
|
-
if (i = p.layoutInfo.rect.maxY + this.gap, d.push(p), i > this.requestedRect.maxY) {
|
|
577
|
-
i += ([
|
|
578
|
-
...Y(t, l)
|
|
579
|
-
].length - (d.length + r)) * y;
|
|
580
|
-
break;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
return i -= this.gap, s.height = i - h, {
|
|
584
|
-
layoutInfo: a,
|
|
585
|
-
children: d,
|
|
586
|
-
validRect: a.rect.intersection(this.requestedRect),
|
|
587
|
-
node: t
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
buildSectionHeader(t, e, i) {
|
|
591
|
-
let l = this.virtualizer.visibleRect.width - this.padding, o = this.headingHeight, s = !1;
|
|
592
|
-
if (o == null) {
|
|
593
|
-
let r = this.layoutNodes.get(t.key), d = r == null ? void 0 : r.layoutInfo;
|
|
594
|
-
if (d) {
|
|
595
|
-
let c = this.virtualizer.collection.getItem(t.key), f = this.lastCollection ? this.lastCollection.getItem(t.key) : null;
|
|
596
|
-
o = d.rect.height, s = l !== d.rect.width || c !== f || d.estimatedSize;
|
|
597
|
-
} else
|
|
598
|
-
o = t.rendered ? this.estimatedHeadingHeight : 0, s = !0;
|
|
599
|
-
}
|
|
600
|
-
o == null && (o = R);
|
|
601
|
-
let a = new u(e, i, l - e, o), h = new b("header", t.key, a);
|
|
602
|
-
return h.estimatedSize = s, {
|
|
603
|
-
layoutInfo: h,
|
|
604
|
-
children: [],
|
|
605
|
-
validRect: h.rect.intersection(this.requestedRect),
|
|
606
|
-
node: t
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
buildItem(t, e, i) {
|
|
610
|
-
let l = this.virtualizer.visibleRect.width - this.padding - e, o = this.rowHeight, s = !1;
|
|
611
|
-
if (o == null) {
|
|
612
|
-
let r = this.layoutNodes.get(t.key);
|
|
613
|
-
r ? (o = r.layoutInfo.rect.height, s = l !== r.layoutInfo.rect.width || t !== r.node || r.layoutInfo.estimatedSize) : (o = this.estimatedRowHeight, s = !0);
|
|
614
|
-
}
|
|
615
|
-
o == null && (o = R);
|
|
616
|
-
let a = new u(e, i, l, o), h = new b(t.type, t.key, a);
|
|
617
|
-
return h.estimatedSize = s, {
|
|
618
|
-
layoutInfo: h,
|
|
619
|
-
children: [],
|
|
620
|
-
validRect: h.rect,
|
|
621
|
-
node: t
|
|
622
|
-
};
|
|
623
|
-
}
|
|
624
|
-
updateItemSize(t, e) {
|
|
625
|
-
let i = this.layoutNodes.get(t);
|
|
626
|
-
if (!i) return !1;
|
|
627
|
-
let l = this.virtualizer.collection, o = i.layoutInfo;
|
|
628
|
-
if (o.estimatedSize = !1, o.rect.height !== e.height) {
|
|
629
|
-
let s = o.copy();
|
|
630
|
-
s.rect.height = e.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(t, o, s);
|
|
631
|
-
let a = o.parentKey != null ? l.getItem(o.parentKey) : null;
|
|
632
|
-
for (; a; )
|
|
633
|
-
this.updateLayoutNode(a.key, o, s), a = a.parentKey != null ? l.getItem(a.parentKey) : null;
|
|
634
|
-
return !0;
|
|
635
|
-
}
|
|
636
|
-
return !1;
|
|
637
|
-
}
|
|
638
|
-
updateLayoutNode(t, e, i) {
|
|
639
|
-
let l = this.layoutNodes.get(t);
|
|
640
|
-
l && (l.validRect = l.validRect.intersection(this.validRect), l.layoutInfo === e && (l.layoutInfo = i));
|
|
641
|
-
}
|
|
642
|
-
getContentSize() {
|
|
643
|
-
return this.contentSize;
|
|
644
|
-
}
|
|
645
|
-
getDropTargetFromPoint(t, e, i) {
|
|
646
|
-
t += this.virtualizer.visibleRect.x, e += this.virtualizer.visibleRect.y;
|
|
647
|
-
let l = new u(t, Math.max(0, e - this.gap), 1, Math.max(1, this.gap * 2)), o = this.getVisibleLayoutInfos(l), s = null, a = 1 / 0;
|
|
648
|
-
for (let c of o) {
|
|
649
|
-
if (!c.rect.intersects(l)) continue;
|
|
650
|
-
let f = Math.abs(c.rect.y - e), g = Math.abs(c.rect.maxY - e), y = Math.min(f, g);
|
|
651
|
-
y < a && (a = y, s = c.key);
|
|
652
|
-
}
|
|
653
|
-
if (s == null || this.virtualizer.collection.size === 0) return {
|
|
654
|
-
type: "root"
|
|
655
|
-
};
|
|
656
|
-
let h = this.getLayoutInfo(s);
|
|
657
|
-
if (!h) return null;
|
|
658
|
-
let r = h.rect, d = {
|
|
659
|
-
type: "item",
|
|
660
|
-
key: h.key,
|
|
661
|
-
dropPosition: "on"
|
|
662
|
-
};
|
|
663
|
-
return i(d) ? e <= r.y + 10 && i({
|
|
664
|
-
...d,
|
|
665
|
-
dropPosition: "before"
|
|
666
|
-
}) ? d.dropPosition = "before" : e >= r.maxY - 10 && i({
|
|
667
|
-
...d,
|
|
668
|
-
dropPosition: "after"
|
|
669
|
-
}) && (d.dropPosition = "after") : e <= r.y + r.height / 2 && i({
|
|
670
|
-
...d,
|
|
671
|
-
dropPosition: "before"
|
|
672
|
-
}) ? d.dropPosition = "before" : i({
|
|
673
|
-
...d,
|
|
674
|
-
dropPosition: "after"
|
|
675
|
-
}) && (d.dropPosition = "after"), d;
|
|
676
|
-
}
|
|
677
|
-
getDropTargetLayoutInfo(t) {
|
|
678
|
-
let e = this.getLayoutInfo(t.key), i;
|
|
679
|
-
return t.dropPosition === "before" ? i = new u(e.rect.x, e.rect.y - this.dropIndicatorThickness / 2, e.rect.width, this.dropIndicatorThickness) : t.dropPosition === "after" ? i = new u(e.rect.x, e.rect.maxY - this.dropIndicatorThickness / 2, e.rect.width, this.dropIndicatorThickness) : i = e.rect, new b("dropIndicator", t.key + ":" + t.dropPosition, i);
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* Creates a new ListLayout with options. See the list of properties below for a description
|
|
683
|
-
* of the options that can be provided.
|
|
684
|
-
*/
|
|
685
|
-
constructor(t = {}) {
|
|
686
|
-
super();
|
|
687
|
-
var e;
|
|
688
|
-
this.rowHeight = (e = t.rowHeight) !== null && e !== void 0 ? e : null;
|
|
689
|
-
var i;
|
|
690
|
-
this.estimatedRowHeight = (i = t.estimatedRowHeight) !== null && i !== void 0 ? i : null;
|
|
691
|
-
var l;
|
|
692
|
-
this.headingHeight = (l = t.headingHeight) !== null && l !== void 0 ? l : null;
|
|
693
|
-
var o;
|
|
694
|
-
this.estimatedHeadingHeight = (o = t.estimatedHeadingHeight) !== null && o !== void 0 ? o : null;
|
|
695
|
-
var s;
|
|
696
|
-
this.loaderHeight = (s = t.loaderHeight) !== null && s !== void 0 ? s : null, this.dropIndicatorThickness = t.dropIndicatorThickness || 2, this.gap = t.gap || 0, this.padding = t.padding || 0, this.layoutNodes = /* @__PURE__ */ new Map(), this.rootNodes = [], this.lastCollection = null, this.invalidateEverything = !1, this.validRect = new u(), this.requestedRect = new u(), this.contentSize = new z();
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
let $ = null;
|
|
700
|
-
function $t(n = !1) {
|
|
701
|
-
if ($ === null || n) {
|
|
702
|
-
const t = document.createElement("div"), e = t.style;
|
|
703
|
-
e.width = "50px", e.height = "50px", e.overflow = "scroll", e.direction = "rtl";
|
|
704
|
-
const i = document.createElement("div"), l = i.style;
|
|
705
|
-
return l.width = "100px", l.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? $ = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? $ = "negative" : $ = "positive-ascending"), document.body.removeChild(t), $;
|
|
706
|
-
}
|
|
707
|
-
return $;
|
|
708
|
-
}
|
|
709
|
-
function St(n, t) {
|
|
710
|
-
let { scrollLeft: e } = n;
|
|
711
|
-
if (t === "rtl") {
|
|
712
|
-
let { scrollWidth: i, clientWidth: l } = n;
|
|
713
|
-
switch ($t()) {
|
|
714
|
-
case "negative":
|
|
715
|
-
e = -e;
|
|
716
|
-
break;
|
|
717
|
-
case "positive-descending":
|
|
718
|
-
e = i - l - e;
|
|
719
|
-
break;
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
return e;
|
|
723
|
-
}
|
|
724
|
-
function zt(n, t) {
|
|
725
|
-
let { contentSize: e, onVisibleRectChange: i, innerStyle: l, onScrollStart: o, onScrollEnd: s, scrollDirection: a = "both", ...h } = n, r = C({
|
|
726
|
-
scrollTop: 0,
|
|
727
|
-
scrollLeft: 0,
|
|
728
|
-
scrollEndTime: 0,
|
|
729
|
-
scrollTimeout: null,
|
|
730
|
-
width: 0,
|
|
731
|
-
height: 0,
|
|
732
|
-
isScrolling: !1
|
|
733
|
-
}).current, { direction: d } = F(), [c, f] = S(!1), g = L((v) => {
|
|
734
|
-
v.target === v.currentTarget && (n.onScroll && n.onScroll(v), P(() => {
|
|
735
|
-
let m = v.currentTarget.scrollTop, H = St(v.currentTarget, d);
|
|
736
|
-
r.scrollTop = Math.max(0, Math.min(m, e.height - r.height)), r.scrollLeft = Math.max(0, Math.min(H, e.width - r.width)), i(new u(r.scrollLeft, r.scrollTop, r.width, r.height)), r.isScrolling || (r.isScrolling = !0, f(!0), window.dispatchEvent(new Event("tk.disconnect-observer")), o && o());
|
|
737
|
-
let T = Date.now();
|
|
738
|
-
r.scrollEndTime <= T + 50 && (r.scrollEndTime = T + 300, r.scrollTimeout != null && clearTimeout(r.scrollTimeout), r.scrollTimeout = setTimeout(() => {
|
|
739
|
-
r.isScrolling = !1, f(!1), r.scrollTimeout = null, window.dispatchEvent(new Event("tk.connect-observer")), s && s();
|
|
740
|
-
}, 300));
|
|
741
|
-
}));
|
|
742
|
-
}, [
|
|
743
|
-
n,
|
|
744
|
-
d,
|
|
745
|
-
r,
|
|
746
|
-
e,
|
|
747
|
-
i,
|
|
748
|
-
o,
|
|
749
|
-
s
|
|
750
|
-
]);
|
|
751
|
-
ut(t, "scroll", g), ht(() => () => {
|
|
752
|
-
r.scrollTimeout != null && clearTimeout(r.scrollTimeout), r.isScrolling && window.dispatchEvent(new Event("tk.connect-observer"));
|
|
753
|
-
}, []);
|
|
754
|
-
let y = C(!1), p = dt((v) => {
|
|
755
|
-
let m = t.current;
|
|
756
|
-
if (!m || y.current) return;
|
|
757
|
-
y.current = !0;
|
|
758
|
-
let H = process.env.NODE_ENV === "test" && !process.env.VIRT_ON, T = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientWidth"), it = Object.getOwnPropertyNames(window.HTMLElement.prototype).includes("clientHeight"), q = m.clientWidth, B = m.clientHeight, M = H && !T ? 1 / 0 : q, O = H && !it ? 1 / 0 : B;
|
|
759
|
-
(r.width !== M || r.height !== O) && (r.width = M, r.height = O, v(() => {
|
|
760
|
-
i(new u(r.scrollLeft, r.scrollTop, M, O));
|
|
761
|
-
}), (!H && q !== m.clientWidth || B !== m.clientHeight) && (r.width = m.clientWidth, r.height = m.clientHeight, v(() => {
|
|
762
|
-
i(new u(r.scrollLeft, r.scrollTop, r.width, r.height));
|
|
763
|
-
}))), y.current = !1;
|
|
764
|
-
}), N = C(null), [Z, tt] = S({});
|
|
765
|
-
E(() => {
|
|
766
|
-
if (!y.current && (N.current == null || !e.equals(N.current)))
|
|
767
|
-
if (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") {
|
|
768
|
-
tt({}), N.current = e;
|
|
769
|
-
return;
|
|
770
|
-
} else queueMicrotask(() => p(P));
|
|
771
|
-
N.current = e;
|
|
772
|
-
}), E(() => {
|
|
773
|
-
p((v) => v());
|
|
774
|
-
}, [
|
|
775
|
-
Z
|
|
776
|
-
]);
|
|
777
|
-
let et = L(() => {
|
|
778
|
-
p(P);
|
|
779
|
-
}, [
|
|
780
|
-
p
|
|
781
|
-
]);
|
|
782
|
-
ct({
|
|
783
|
-
ref: t,
|
|
784
|
-
box: "border-box",
|
|
785
|
-
onResize: et
|
|
786
|
-
});
|
|
787
|
-
let I = {
|
|
788
|
-
// Reset padding so that relative positioning works correctly. Padding will be done in JS layout.
|
|
789
|
-
padding: 0,
|
|
790
|
-
...h.style
|
|
791
|
-
};
|
|
792
|
-
return a === "horizontal" ? (I.overflowX = "auto", I.overflowY = "hidden") : a === "vertical" || e.width === r.width ? (I.overflowY = "auto", I.overflowX = "hidden") : I.overflow = "auto", l = {
|
|
793
|
-
width: Number.isFinite(e.width) ? e.width : void 0,
|
|
794
|
-
height: Number.isFinite(e.height) ? e.height : void 0,
|
|
795
|
-
pointerEvents: c ? "none" : "auto",
|
|
796
|
-
position: "relative",
|
|
797
|
-
...l
|
|
798
|
-
}, {
|
|
799
|
-
scrollViewProps: {
|
|
800
|
-
...h,
|
|
801
|
-
style: I
|
|
802
|
-
},
|
|
803
|
-
contentProps: {
|
|
804
|
-
role: "presentation",
|
|
805
|
-
style: l
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
function Ht(n) {
|
|
810
|
-
let { layoutInfo: t, virtualizer: e, ref: i } = n, l = t == null ? void 0 : t.key, o = L(() => {
|
|
811
|
-
if (l != null && i.current) {
|
|
812
|
-
let s = Ct(i.current);
|
|
813
|
-
e.updateItemSize(l, s);
|
|
814
|
-
}
|
|
815
|
-
}, [
|
|
816
|
-
e,
|
|
817
|
-
l,
|
|
818
|
-
i
|
|
819
|
-
]);
|
|
820
|
-
return E(() => {
|
|
821
|
-
t != null && t.estimatedSize && o();
|
|
822
|
-
}), {
|
|
823
|
-
updateSize: o
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
function Ct(n) {
|
|
827
|
-
let t = n.style.height;
|
|
828
|
-
n.style.height = "";
|
|
829
|
-
let e = new z(n.scrollWidth, n.scrollHeight);
|
|
830
|
-
return n.style.height = t, e;
|
|
831
|
-
}
|
|
832
|
-
function U(n) {
|
|
833
|
-
let { style: t, className: e, layoutInfo: i, virtualizer: l, parent: o, children: s } = n, { direction: a } = F(), h = C(null);
|
|
834
|
-
return Ht({
|
|
835
|
-
layoutInfo: i,
|
|
836
|
-
virtualizer: l,
|
|
837
|
-
ref: h
|
|
838
|
-
}), /* @__PURE__ */ w.createElement("div", {
|
|
839
|
-
role: "presentation",
|
|
840
|
-
ref: h,
|
|
841
|
-
className: e,
|
|
842
|
-
style: {
|
|
843
|
-
...kt(i, a, o),
|
|
844
|
-
...t
|
|
845
|
-
}
|
|
846
|
-
}, s);
|
|
847
|
-
}
|
|
848
|
-
let W = /* @__PURE__ */ new WeakMap();
|
|
849
|
-
function kt(n, t, e) {
|
|
850
|
-
let i = t === "rtl" ? "right" : "left", l = W.get(n);
|
|
851
|
-
if (l && l[i] != null) {
|
|
852
|
-
if (!e) return l;
|
|
853
|
-
let h = n.rect.y - e.rect.y, r = n.rect.x - e.rect.x;
|
|
854
|
-
if (l.top === h && l[i] === r) return l;
|
|
855
|
-
}
|
|
856
|
-
let o = {
|
|
857
|
-
// TODO: For layoutInfos that are sticky that have parents with overflow visible, their "top" will be relative to the to the nearest scrolling container
|
|
858
|
-
// which WON'T be the parent since the parent has overflow visible. This means we shouldn't offset the height by the parent's position
|
|
859
|
-
// Not 100% about this change here since it is quite ambigious what the scrolling container maybe and how its top is positioned with respect to the
|
|
860
|
-
// calculated layoutInfo.y here
|
|
861
|
-
top: n.rect.y - (e && !(e.allowOverflow && n.isSticky) ? e.rect.y : 0),
|
|
862
|
-
[i]: n.rect.x - (e && !(e.allowOverflow && n.isSticky) ? e.rect.x : 0),
|
|
863
|
-
width: n.rect.width,
|
|
864
|
-
height: n.rect.height
|
|
865
|
-
};
|
|
866
|
-
Object.entries(o).forEach(([h, r]) => {
|
|
867
|
-
Number.isFinite(r) || (o[h] = void 0);
|
|
868
|
-
});
|
|
869
|
-
var s;
|
|
870
|
-
let a = {
|
|
871
|
-
position: n.isSticky ? "sticky" : "absolute",
|
|
872
|
-
// Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
|
|
873
|
-
display: n.isSticky ? "inline-block" : void 0,
|
|
874
|
-
overflow: n.allowOverflow ? "visible" : "hidden",
|
|
875
|
-
opacity: n.opacity,
|
|
876
|
-
zIndex: n.zIndex,
|
|
877
|
-
transform: (s = n.transform) !== null && s !== void 0 ? s : void 0,
|
|
878
|
-
contain: "size layout style",
|
|
879
|
-
...o
|
|
880
|
-
};
|
|
881
|
-
return W.set(n, a), a;
|
|
882
|
-
}
|
|
883
|
-
const G = /* @__PURE__ */ X(null), J = /* @__PURE__ */ X(null);
|
|
884
|
-
function _t(n) {
|
|
885
|
-
let { children: t, layout: e, layoutOptions: i } = n, l = _(() => typeof e == "function" ? new e() : e, [
|
|
886
|
-
e
|
|
887
|
-
]), o = _(() => ({
|
|
888
|
-
isVirtualized: !0,
|
|
889
|
-
layoutDelegate: l,
|
|
890
|
-
dropTargetDelegate: l.getDropTargetFromPoint ? l : void 0,
|
|
891
|
-
CollectionRoot: Lt,
|
|
892
|
-
CollectionBranch: Nt
|
|
893
|
-
}), [
|
|
894
|
-
l
|
|
895
|
-
]);
|
|
896
|
-
return /* @__PURE__ */ w.createElement(rt.Provider, {
|
|
897
|
-
value: o
|
|
898
|
-
}, /* @__PURE__ */ w.createElement(J.Provider, {
|
|
899
|
-
value: {
|
|
900
|
-
layout: l,
|
|
901
|
-
layoutOptions: i
|
|
902
|
-
}
|
|
903
|
-
}, t));
|
|
904
|
-
}
|
|
905
|
-
function Lt({ collection: n, persistedKeys: t, scrollRef: e, renderDropIndicator: i }) {
|
|
906
|
-
var l;
|
|
907
|
-
let { layout: o, layoutOptions: s } = A(J), a = (l = o.useLayoutOptions) === null || l === void 0 ? void 0 : l.call(o), h = It({
|
|
908
|
-
layout: o,
|
|
909
|
-
collection: n,
|
|
910
|
-
renderView: (d, c) => {
|
|
911
|
-
var f;
|
|
912
|
-
return c == null || (f = c.render) === null || f === void 0 ? void 0 : f.call(c, c);
|
|
913
|
-
},
|
|
914
|
-
onVisibleRectChange(d) {
|
|
915
|
-
let c = e == null ? void 0 : e.current;
|
|
916
|
-
c && (c.scrollLeft = d.x, c.scrollTop = d.y);
|
|
917
|
-
},
|
|
918
|
-
persistedKeys: t,
|
|
919
|
-
layoutOptions: _(() => s && a ? {
|
|
920
|
-
...s,
|
|
921
|
-
...a
|
|
922
|
-
} : s || a, [
|
|
923
|
-
s,
|
|
924
|
-
a
|
|
925
|
-
])
|
|
926
|
-
}), { contentProps: r } = zt({
|
|
927
|
-
onVisibleRectChange: h.setVisibleRect,
|
|
928
|
-
contentSize: h.contentSize,
|
|
929
|
-
onScrollStart: h.startScrolling,
|
|
930
|
-
onScrollEnd: h.endScrolling
|
|
931
|
-
}, e);
|
|
932
|
-
return /* @__PURE__ */ w.createElement("div", r, /* @__PURE__ */ w.createElement(G.Provider, {
|
|
933
|
-
value: h
|
|
934
|
-
}, Q(null, h.visibleViews, i)));
|
|
935
|
-
}
|
|
936
|
-
function Nt({ parent: n, renderDropIndicator: t }) {
|
|
937
|
-
let i = A(G).virtualizer.getVisibleView(n.key);
|
|
938
|
-
return Q(i, Array.from(i.children), t);
|
|
939
|
-
}
|
|
940
|
-
function Q(n, t, e) {
|
|
941
|
-
return t.map((i) => Tt(n, i, e));
|
|
942
|
-
}
|
|
943
|
-
function Tt(n, t, e) {
|
|
944
|
-
let i = /* @__PURE__ */ w.createElement(U, {
|
|
945
|
-
key: t.key,
|
|
946
|
-
layoutInfo: t.layoutInfo,
|
|
947
|
-
virtualizer: t.virtualizer,
|
|
948
|
-
parent: n == null ? void 0 : n.layoutInfo
|
|
949
|
-
}, t.rendered), { collection: l, layout: o } = t.virtualizer, s = t.content;
|
|
950
|
-
return (s == null ? void 0 : s.type) === "item" && e && o.getDropTargetLayoutInfo && (i = /* @__PURE__ */ w.createElement(w.Fragment, {
|
|
951
|
-
key: t.key
|
|
952
|
-
}, D(n, t, {
|
|
953
|
-
type: "item",
|
|
954
|
-
key: t.content.key,
|
|
955
|
-
dropPosition: "before"
|
|
956
|
-
}, e), i, at(l, s, (a) => D(n, t, a, e)))), i;
|
|
957
|
-
}
|
|
958
|
-
function D(n, t, e, i) {
|
|
959
|
-
let l = i(e);
|
|
960
|
-
if (l) {
|
|
961
|
-
let o = t.virtualizer.layout.getDropTargetLayoutInfo(e);
|
|
962
|
-
l = /* @__PURE__ */ w.createElement(U, {
|
|
963
|
-
layoutInfo: o,
|
|
964
|
-
virtualizer: t.virtualizer,
|
|
965
|
-
parent: n == null ? void 0 : n.layoutInfo
|
|
966
|
-
}, l);
|
|
967
|
-
}
|
|
968
|
-
return l;
|
|
969
|
-
}
|
|
970
|
-
class Et extends Rt {
|
|
971
|
-
/**
|
|
972
|
-
* When using the ListLayout our scroll container height is not calculated properly when the content is partially sectioned.
|
|
973
|
-
* ```ts
|
|
974
|
-
* const partiallySectionedContent = [
|
|
975
|
-
* {
|
|
976
|
-
* name: 'fruit section',
|
|
977
|
-
* children: [{ id: 'kiwi', name: 'Kiwi' }]
|
|
978
|
-
* },
|
|
979
|
-
* // berries have no section, because it's optional
|
|
980
|
-
* { id: 'lingonberries', name: 'Lingonberries' }
|
|
981
|
-
* ];
|
|
982
|
-
* ```
|
|
983
|
-
* If we load the layout info for each key in the collection the calculation is correct.
|
|
984
|
-
*
|
|
985
|
-
* This might not be optional for performance, FYI
|
|
986
|
-
*/
|
|
987
|
-
getContentSize() {
|
|
988
|
-
var e;
|
|
989
|
-
const t = (e = this == null ? void 0 : this.virtualizer) == null ? void 0 : e.collection.getKeys();
|
|
990
|
-
return Array.from(t || []).forEach((i) => {
|
|
991
|
-
this.getLayoutInfo(i);
|
|
992
|
-
}), this.contentSize;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
const Vt = "_listBox_1f4kp_7", Mt = "_listBoxPopover_1f4kp_19", Ot = "_listBoxSectionHeading_1f4kp_31", Pt = "_listBoxButton_1f4kp_40", Kt = "_listBoxItem_1f4kp_52", V = {
|
|
996
|
-
listBox: Vt,
|
|
997
|
-
listBoxPopover: Mt,
|
|
998
|
-
listBoxSectionHeading: Ot,
|
|
999
|
-
listBoxButton: Pt,
|
|
1000
|
-
listBoxItem: Kt
|
|
1001
|
-
}, Zt = ({
|
|
1002
|
-
className: n,
|
|
1003
|
-
children: t,
|
|
1004
|
-
...e
|
|
1005
|
-
}) => /* @__PURE__ */ k(
|
|
1006
|
-
_t,
|
|
1007
|
-
{
|
|
1008
|
-
layout: Et,
|
|
1009
|
-
layoutOptions: {
|
|
1010
|
-
headingHeight: 44
|
|
1011
|
-
},
|
|
1012
|
-
children: /* @__PURE__ */ k(
|
|
1013
|
-
ot,
|
|
1014
|
-
{
|
|
1015
|
-
className: K(V.listBox, n),
|
|
1016
|
-
...e,
|
|
1017
|
-
children: t
|
|
1018
|
-
}
|
|
1019
|
-
)
|
|
1020
|
-
}
|
|
1021
|
-
), te = ({
|
|
1022
|
-
children: n,
|
|
1023
|
-
className: t,
|
|
1024
|
-
...e
|
|
1025
|
-
}) => /* @__PURE__ */ k(
|
|
1026
|
-
nt,
|
|
1027
|
-
{
|
|
1028
|
-
className: K(V.listBoxItem, t),
|
|
1029
|
-
...e,
|
|
1030
|
-
children: n
|
|
1031
|
-
}
|
|
1032
|
-
), ee = ({
|
|
1033
|
-
className: n,
|
|
1034
|
-
children: t,
|
|
1035
|
-
...e
|
|
1036
|
-
}) => /* @__PURE__ */ k(
|
|
1037
|
-
ft,
|
|
1038
|
-
{
|
|
1039
|
-
className: K(n, V.listBoxPopover),
|
|
1040
|
-
offset: 0,
|
|
1041
|
-
...e,
|
|
1042
|
-
children: t
|
|
1043
|
-
}
|
|
1044
|
-
), ie = ({
|
|
1045
|
-
children: n,
|
|
1046
|
-
name: t,
|
|
1047
|
-
...e
|
|
1048
|
-
}) => /* @__PURE__ */ lt(st, { ...e, children: [
|
|
1049
|
-
/* @__PURE__ */ k(gt, { className: V.listBoxSectionHeading, children: t }),
|
|
1050
|
-
n
|
|
1051
|
-
] });
|
|
1052
|
-
export {
|
|
1053
|
-
Zt as L,
|
|
1054
|
-
te as a,
|
|
1055
|
-
ee as b,
|
|
1056
|
-
ie as c,
|
|
1057
|
-
V as s
|
|
1058
|
-
};
|