@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,54 +1,54 @@
|
|
|
1
|
-
import V, { useRef as
|
|
2
|
-
import { $ as
|
|
3
|
-
import { $ as
|
|
4
|
-
import { b as
|
|
5
|
-
import { $ as J } from "./useEvent-
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import { h as
|
|
9
|
-
import { b as ae } from "./useFocusable-
|
|
10
|
-
import {
|
|
11
|
-
import { $ as
|
|
12
|
-
import { $ as
|
|
13
|
-
import { $ as
|
|
1
|
+
import V, { useRef as x, useEffect as q, useMemo as j, useState as se } from "react";
|
|
2
|
+
import { $ as Ie, b as we, m as ue, c as xe } from "./utils-DFIwp4PB.js";
|
|
3
|
+
import { $ as he, a as Y, c as Fe, d as ye, e as Ce } from "./mergeProps-BSsN7Bgk.js";
|
|
4
|
+
import { b as Pe, c as De, f as Me } from "./usePress-DMUpU0GU.js";
|
|
5
|
+
import { $ as J } from "./useEvent-DpBHTuHJ.js";
|
|
6
|
+
import { a as Be, b as pe } from "./scrollIntoView-ClEACHUk.js";
|
|
7
|
+
import { $ as Re } from "./FocusScope-Bj40Ir-g.js";
|
|
8
|
+
import { h as Le, o as Oe, f as ve } from "./useHover-D6bNIkU0.js";
|
|
9
|
+
import { b as ae } from "./useFocusable-DXlMChFC.js";
|
|
10
|
+
import { flushSync as ze } from "react-dom";
|
|
11
|
+
import { $ as Ue } from "./context-CGNJ3grH.js";
|
|
12
|
+
import { $ as Ve } from "./useDescription-BLmIkYCq.js";
|
|
13
|
+
import { $ as He } from "./useControlledState-u436Wbp1.js";
|
|
14
14
|
function be(n, e) {
|
|
15
|
-
const t =
|
|
15
|
+
const t = x(!0), l = x(null);
|
|
16
16
|
he(() => (t.current = !0, () => {
|
|
17
17
|
t.current = !1;
|
|
18
18
|
}), []), he(() => {
|
|
19
19
|
t.current ? t.current = !1 : (!l.current || e.some((i, c) => !Object.is(i, l[c]))) && n(), l.current = e;
|
|
20
20
|
}, e);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const We = "react-aria-clear-focus", Ge = "react-aria-focus";
|
|
23
23
|
function H(n) {
|
|
24
|
-
return
|
|
24
|
+
return Le() ? n.metaKey : n.ctrlKey;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
28
|
-
let { isDisabled: e, onLongPressStart: t, onLongPressEnd: l, onLongPress: i, threshold: c =
|
|
29
|
-
const
|
|
30
|
-
let { addGlobalListener: a, removeGlobalListener:
|
|
26
|
+
const qe = 500;
|
|
27
|
+
function je(n) {
|
|
28
|
+
let { isDisabled: e, onLongPressStart: t, onLongPressEnd: l, onLongPress: i, threshold: c = qe, accessibilityDescription: r } = n;
|
|
29
|
+
const d = x(void 0);
|
|
30
|
+
let { addGlobalListener: a, removeGlobalListener: K } = Ie(), { pressProps: E } = Pe({
|
|
31
31
|
isDisabled: e,
|
|
32
32
|
onPressStart(v) {
|
|
33
33
|
if (v.continuePropagation(), (v.pointerType === "mouse" || v.pointerType === "touch") && (t && t({
|
|
34
34
|
...v,
|
|
35
35
|
type: "longpressstart"
|
|
36
|
-
}),
|
|
36
|
+
}), d.current = setTimeout(() => {
|
|
37
37
|
v.target.dispatchEvent(new PointerEvent("pointercancel", {
|
|
38
38
|
bubbles: !0
|
|
39
|
-
})),
|
|
39
|
+
})), we(v.target).activeElement !== v.target && ue(v.target), i && i({
|
|
40
40
|
...v,
|
|
41
41
|
type: "longpress"
|
|
42
|
-
}),
|
|
42
|
+
}), d.current = void 0;
|
|
43
43
|
}, c), v.pointerType === "touch")) {
|
|
44
|
-
let
|
|
44
|
+
let m = (b) => {
|
|
45
45
|
b.preventDefault();
|
|
46
46
|
};
|
|
47
|
-
a(v.target, "contextmenu",
|
|
47
|
+
a(v.target, "contextmenu", m, {
|
|
48
48
|
once: !0
|
|
49
49
|
}), a(window, "pointerup", () => {
|
|
50
50
|
setTimeout(() => {
|
|
51
|
-
|
|
51
|
+
K(v.target, "contextmenu", m);
|
|
52
52
|
}, 30);
|
|
53
53
|
}, {
|
|
54
54
|
once: !0
|
|
@@ -56,21 +56,21 @@ function Ge(n) {
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
onPressEnd(v) {
|
|
59
|
-
|
|
59
|
+
d.current && clearTimeout(d.current), l && (v.pointerType === "mouse" || v.pointerType === "touch") && l({
|
|
60
60
|
...v,
|
|
61
61
|
type: "longpressend"
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
64
|
+
}), $ = Ve(i && !e ? r : void 0);
|
|
65
65
|
return {
|
|
66
|
-
longPressProps: Y(E,
|
|
66
|
+
longPressProps: Y(E, $)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
let e =
|
|
71
|
-
e !== n && (e &&
|
|
69
|
+
function Te(n) {
|
|
70
|
+
let e = Ze(we(n));
|
|
71
|
+
e !== n && (e && Ye(e, n), n && Ee(n, e));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ye(n, e) {
|
|
74
74
|
n.dispatchEvent(new FocusEvent("blur", {
|
|
75
75
|
relatedTarget: e
|
|
76
76
|
})), n.dispatchEvent(new FocusEvent("focusout", {
|
|
@@ -78,7 +78,7 @@ function qe(n, e) {
|
|
|
78
78
|
relatedTarget: e
|
|
79
79
|
}));
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Ee(n, e) {
|
|
82
82
|
n.dispatchEvent(new FocusEvent("focus", {
|
|
83
83
|
relatedTarget: e
|
|
84
84
|
})), n.dispatchEvent(new FocusEvent("focusin", {
|
|
@@ -86,41 +86,41 @@ function je(n, e) {
|
|
|
86
86
|
relatedTarget: e
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
let e =
|
|
89
|
+
function Ze(n) {
|
|
90
|
+
let e = xe(n), t = e == null ? void 0 : e.getAttribute("aria-activedescendant");
|
|
91
91
|
return t && n.getElementById(t) || e;
|
|
92
92
|
}
|
|
93
93
|
function fe(n) {
|
|
94
|
-
return
|
|
94
|
+
return Oe() ? n.altKey : n.ctrlKey;
|
|
95
95
|
}
|
|
96
96
|
function re(n, e) {
|
|
97
97
|
var t, l;
|
|
98
98
|
let i = `[data-key="${CSS.escape(String(e))}"]`, c = (t = n.current) === null || t === void 0 ? void 0 : t.dataset.collection;
|
|
99
99
|
return c && (i = `[data-collection="${CSS.escape(c)}"]${i}`), (l = n.current) === null || l === void 0 ? void 0 : l.querySelector(i);
|
|
100
100
|
}
|
|
101
|
-
const
|
|
102
|
-
function Ze(n) {
|
|
103
|
-
let e = we();
|
|
104
|
-
return Te.set(n, e), e;
|
|
105
|
-
}
|
|
101
|
+
const ke = /* @__PURE__ */ new WeakMap();
|
|
106
102
|
function Je(n) {
|
|
107
|
-
|
|
103
|
+
let e = Fe();
|
|
104
|
+
return ke.set(n, e), e;
|
|
105
|
+
}
|
|
106
|
+
function Qe(n) {
|
|
107
|
+
return ke.get(n);
|
|
108
108
|
}
|
|
109
|
-
const
|
|
110
|
-
function
|
|
111
|
-
let { keyboardDelegate: e, selectionManager: t, onTypeSelect: l } = n, i =
|
|
109
|
+
const Xe = 1e3;
|
|
110
|
+
function Ne(n) {
|
|
111
|
+
let { keyboardDelegate: e, selectionManager: t, onTypeSelect: l } = n, i = x({
|
|
112
112
|
search: "",
|
|
113
113
|
timeout: void 0
|
|
114
114
|
}).current, c = (r) => {
|
|
115
|
-
let
|
|
116
|
-
if (!(!
|
|
117
|
-
if (
|
|
115
|
+
let d = _e(r.key);
|
|
116
|
+
if (!(!d || r.ctrlKey || r.metaKey || !r.currentTarget.contains(r.target) || i.search.length === 0 && d === " ")) {
|
|
117
|
+
if (d === " " && i.search.trim().length > 0 && (r.preventDefault(), "continuePropagation" in r || r.stopPropagation()), i.search += d, e.getKeyForSearch != null) {
|
|
118
118
|
let a = e.getKeyForSearch(i.search, t.focusedKey);
|
|
119
119
|
a == null && (a = e.getKeyForSearch(i.search)), a != null && (t.setFocusedKey(a), l && l(a));
|
|
120
120
|
}
|
|
121
121
|
clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
|
122
122
|
i.search = "";
|
|
123
|
-
},
|
|
123
|
+
}, Xe);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
return {
|
|
@@ -131,54 +131,54 @@ function Xe(n) {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function _e(n) {
|
|
135
135
|
return n.length === 1 || !/^[A-Z]/i.test(n) ? n : "";
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
let { selectionManager: e, keyboardDelegate: t, ref: l, autoFocus: i = !1, shouldFocusWrap: c = !1, disallowEmptySelection: r = !1, disallowSelectAll:
|
|
139
|
-
var
|
|
140
|
-
if (o.altKey && o.key === "Tab" && o.preventDefault(), !(!((
|
|
141
|
-
const
|
|
137
|
+
function mt(n) {
|
|
138
|
+
let { selectionManager: e, keyboardDelegate: t, ref: l, autoFocus: i = !1, shouldFocusWrap: c = !1, disallowEmptySelection: r = !1, disallowSelectAll: d = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: K = e.selectionBehavior === "replace", disallowTypeAhead: E = !1, shouldUseVirtualFocus: $, allowsTabNavigation: v = !1, isVirtualized: m, scrollRef: b = l, linkBehavior: k = "action" } = n, { direction: y } = Ue(), h = De(), S = (o) => {
|
|
139
|
+
var f;
|
|
140
|
+
if (o.altKey && o.key === "Tab" && o.preventDefault(), !(!((f = l.current) === null || f === void 0) && f.contains(o.target))) return;
|
|
141
|
+
const s = (u, z) => {
|
|
142
142
|
if (u != null) {
|
|
143
|
-
if (e.isLink(u) && k === "selection" &&
|
|
144
|
-
|
|
143
|
+
if (e.isLink(u) && k === "selection" && K && !fe(o)) {
|
|
144
|
+
ze(() => {
|
|
145
145
|
e.setFocusedKey(u, z);
|
|
146
146
|
});
|
|
147
147
|
let U = re(l, u), de = e.getItemProps(u);
|
|
148
|
-
U &&
|
|
148
|
+
U && h.open(U, o, de.href, de.routerOptions);
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
if (e.setFocusedKey(u, z), e.isLink(u) && k === "override") return;
|
|
152
|
-
o.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) :
|
|
152
|
+
o.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : K && !fe(o) && e.replaceSelection(u);
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
switch (o.key) {
|
|
156
156
|
case "ArrowDown":
|
|
157
157
|
if (t.getKeyBelow) {
|
|
158
|
-
var
|
|
159
|
-
let u = e.focusedKey != null ? (
|
|
160
|
-
u == null && c && (u = (D = t.getFirstKey) === null || D === void 0 ? void 0 : D.call(t, e.focusedKey)), u != null && (o.preventDefault(),
|
|
158
|
+
var g, T, D;
|
|
159
|
+
let u = e.focusedKey != null ? (g = t.getKeyBelow) === null || g === void 0 ? void 0 : g.call(t, e.focusedKey) : (T = t.getFirstKey) === null || T === void 0 ? void 0 : T.call(t);
|
|
160
|
+
u == null && c && (u = (D = t.getFirstKey) === null || D === void 0 ? void 0 : D.call(t, e.focusedKey)), u != null && (o.preventDefault(), s(u));
|
|
161
161
|
}
|
|
162
162
|
break;
|
|
163
163
|
case "ArrowUp":
|
|
164
164
|
if (t.getKeyAbove) {
|
|
165
|
-
var
|
|
166
|
-
let u = e.focusedKey != null ? (
|
|
167
|
-
u == null && c && (u = (N = t.getLastKey) === null || N === void 0 ? void 0 : N.call(t, e.focusedKey)), u != null && (o.preventDefault(),
|
|
165
|
+
var R, O, N;
|
|
166
|
+
let u = e.focusedKey != null ? (R = t.getKeyAbove) === null || R === void 0 ? void 0 : R.call(t, e.focusedKey) : (O = t.getLastKey) === null || O === void 0 ? void 0 : O.call(t);
|
|
167
|
+
u == null && c && (u = (N = t.getLastKey) === null || N === void 0 ? void 0 : N.call(t, e.focusedKey)), u != null && (o.preventDefault(), s(u));
|
|
168
168
|
}
|
|
169
169
|
break;
|
|
170
170
|
case "ArrowLeft":
|
|
171
171
|
if (t.getKeyLeftOf) {
|
|
172
172
|
var _, ee, te;
|
|
173
173
|
let u = e.focusedKey != null ? (_ = t.getKeyLeftOf) === null || _ === void 0 ? void 0 : _.call(t, e.focusedKey) : null;
|
|
174
|
-
u == null && c && (u =
|
|
174
|
+
u == null && c && (u = y === "rtl" ? (ee = t.getFirstKey) === null || ee === void 0 ? void 0 : ee.call(t, e.focusedKey) : (te = t.getLastKey) === null || te === void 0 ? void 0 : te.call(t, e.focusedKey)), u != null && (o.preventDefault(), s(u, y === "rtl" ? "first" : "last"));
|
|
175
175
|
}
|
|
176
176
|
break;
|
|
177
177
|
case "ArrowRight":
|
|
178
178
|
if (t.getKeyRightOf) {
|
|
179
179
|
var le, ie, ne;
|
|
180
180
|
let u = e.focusedKey != null ? (le = t.getKeyRightOf) === null || le === void 0 ? void 0 : le.call(t, e.focusedKey) : null;
|
|
181
|
-
u == null && c && (u =
|
|
181
|
+
u == null && c && (u = y === "rtl" ? (ie = t.getLastKey) === null || ie === void 0 ? void 0 : ie.call(t, e.focusedKey) : (ne = t.getFirstKey) === null || ne === void 0 ? void 0 : ne.call(t, e.focusedKey)), u != null && (o.preventDefault(), s(u, y === "rtl" ? "last" : "first"));
|
|
182
182
|
}
|
|
183
183
|
break;
|
|
184
184
|
case "Home":
|
|
@@ -186,7 +186,7 @@ function $t(n) {
|
|
|
186
186
|
if (e.focusedKey === null && o.shiftKey) return;
|
|
187
187
|
o.preventDefault();
|
|
188
188
|
let u = t.getFirstKey(e.focusedKey, H(o));
|
|
189
|
-
e.setFocusedKey(u), u != null && (H(o) && o.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) :
|
|
189
|
+
e.setFocusedKey(u), u != null && (H(o) && o.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : K && e.replaceSelection(u));
|
|
190
190
|
}
|
|
191
191
|
break;
|
|
192
192
|
case "End":
|
|
@@ -194,23 +194,23 @@ function $t(n) {
|
|
|
194
194
|
if (e.focusedKey === null && o.shiftKey) return;
|
|
195
195
|
o.preventDefault();
|
|
196
196
|
let u = t.getLastKey(e.focusedKey, H(o));
|
|
197
|
-
e.setFocusedKey(u), u != null && (H(o) && o.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) :
|
|
197
|
+
e.setFocusedKey(u), u != null && (H(o) && o.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : K && e.replaceSelection(u));
|
|
198
198
|
}
|
|
199
199
|
break;
|
|
200
200
|
case "PageDown":
|
|
201
201
|
if (t.getKeyPageBelow && e.focusedKey != null) {
|
|
202
202
|
let u = t.getKeyPageBelow(e.focusedKey);
|
|
203
|
-
u != null && (o.preventDefault(),
|
|
203
|
+
u != null && (o.preventDefault(), s(u));
|
|
204
204
|
}
|
|
205
205
|
break;
|
|
206
206
|
case "PageUp":
|
|
207
207
|
if (t.getKeyPageAbove && e.focusedKey != null) {
|
|
208
208
|
let u = t.getKeyPageAbove(e.focusedKey);
|
|
209
|
-
u != null && (o.preventDefault(),
|
|
209
|
+
u != null && (o.preventDefault(), s(u));
|
|
210
210
|
}
|
|
211
211
|
break;
|
|
212
212
|
case "a":
|
|
213
|
-
H(o) && e.selectionMode === "multiple" &&
|
|
213
|
+
H(o) && e.selectionMode === "multiple" && d !== !0 && (o.preventDefault(), e.selectAll());
|
|
214
214
|
break;
|
|
215
215
|
case "Escape":
|
|
216
216
|
a === "clearSelection" && !r && e.selectedKeys.size !== 0 && (o.stopPropagation(), o.preventDefault(), e.clearSelection());
|
|
@@ -219,7 +219,7 @@ function $t(n) {
|
|
|
219
219
|
if (!v) {
|
|
220
220
|
if (o.shiftKey) l.current.focus();
|
|
221
221
|
else {
|
|
222
|
-
let u =
|
|
222
|
+
let u = Re(l.current, {
|
|
223
223
|
tabbable: !0
|
|
224
224
|
}), z, U;
|
|
225
225
|
do
|
|
@@ -230,120 +230,124 @@ function $t(n) {
|
|
|
230
230
|
break;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
},
|
|
233
|
+
}, p = x({
|
|
234
234
|
top: 0,
|
|
235
235
|
left: 0
|
|
236
236
|
});
|
|
237
|
-
J(b, "scroll",
|
|
238
|
-
var o,
|
|
239
|
-
|
|
240
|
-
top: (
|
|
241
|
-
left: (
|
|
237
|
+
J(b, "scroll", m ? void 0 : () => {
|
|
238
|
+
var o, f, s, g;
|
|
239
|
+
p.current = {
|
|
240
|
+
top: (s = (o = b.current) === null || o === void 0 ? void 0 : o.scrollTop) !== null && s !== void 0 ? s : 0,
|
|
241
|
+
left: (g = (f = b.current) === null || f === void 0 ? void 0 : f.scrollLeft) !== null && g !== void 0 ? g : 0
|
|
242
242
|
};
|
|
243
243
|
});
|
|
244
|
-
let
|
|
244
|
+
let F = (o) => {
|
|
245
245
|
if (e.isFocused) {
|
|
246
246
|
o.currentTarget.contains(o.target) || e.setFocused(!1);
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
249
|
if (o.currentTarget.contains(o.target)) {
|
|
250
250
|
if (e.setFocused(!0), e.focusedKey == null) {
|
|
251
|
-
var
|
|
252
|
-
let D = (
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
var
|
|
256
|
-
|
|
257
|
-
} else
|
|
251
|
+
var f, s;
|
|
252
|
+
let D = (O) => {
|
|
253
|
+
O != null && (e.setFocusedKey(O), K && !e.isSelected(O) && e.replaceSelection(O));
|
|
254
|
+
}, R = o.relatedTarget;
|
|
255
|
+
var g, T;
|
|
256
|
+
R && o.currentTarget.compareDocumentPosition(R) & Node.DOCUMENT_POSITION_FOLLOWING ? D((g = e.lastSelectedKey) !== null && g !== void 0 ? g : (f = t.getLastKey) === null || f === void 0 ? void 0 : f.call(t)) : D((T = e.firstSelectedKey) !== null && T !== void 0 ? T : (s = t.getFirstKey) === null || s === void 0 ? void 0 : s.call(t));
|
|
257
|
+
} else !m && b.current && (b.current.scrollTop = p.current.top, b.current.scrollLeft = p.current.left);
|
|
258
258
|
if (e.focusedKey != null && b.current) {
|
|
259
259
|
let D = re(l, e.focusedKey);
|
|
260
|
-
D instanceof HTMLElement && (!D.contains(document.activeElement) &&
|
|
260
|
+
D instanceof HTMLElement && (!D.contains(document.activeElement) && !$ && ue(D), ve() === "keyboard" && pe(D, {
|
|
261
261
|
containingElement: l.current
|
|
262
262
|
}));
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
}, A = (o) => {
|
|
266
266
|
o.currentTarget.contains(o.relatedTarget) || e.setFocused(!1);
|
|
267
|
-
}, I =
|
|
268
|
-
J(l,
|
|
269
|
-
let { detail:
|
|
270
|
-
o.stopPropagation(), e.setFocused(!0), (
|
|
267
|
+
}, I = x(!1);
|
|
268
|
+
J(l, Ge, $ ? (o) => {
|
|
269
|
+
let { detail: f } = o;
|
|
270
|
+
o.stopPropagation(), e.setFocused(!0), (f == null ? void 0 : f.focusStrategy) === "first" && (I.current = !0);
|
|
271
271
|
} : void 0);
|
|
272
|
-
let
|
|
273
|
-
var o,
|
|
274
|
-
let
|
|
275
|
-
|
|
272
|
+
let M = ye(() => {
|
|
273
|
+
var o, f;
|
|
274
|
+
let s = (f = (o = t.getFirstKey) === null || o === void 0 ? void 0 : o.call(t)) !== null && f !== void 0 ? f : null;
|
|
275
|
+
if (s == null) {
|
|
276
|
+
let g = xe();
|
|
277
|
+
Te(l.current), Ee(g, null), e.collection.size > 0 && (I.current = !1);
|
|
278
|
+
} else
|
|
279
|
+
e.setFocusedKey(s), I.current = !1;
|
|
276
280
|
});
|
|
277
281
|
be(() => {
|
|
278
|
-
I.current &&
|
|
282
|
+
I.current && M();
|
|
279
283
|
}, [
|
|
280
284
|
e.collection,
|
|
281
|
-
|
|
285
|
+
M
|
|
282
286
|
]);
|
|
283
|
-
let
|
|
287
|
+
let P = ye(() => {
|
|
284
288
|
e.collection.size > 0 && (I.current = !1);
|
|
285
289
|
});
|
|
286
290
|
be(() => {
|
|
287
|
-
|
|
291
|
+
P();
|
|
288
292
|
}, [
|
|
289
293
|
e.focusedKey,
|
|
290
|
-
|
|
291
|
-
]), J(l,
|
|
292
|
-
var
|
|
293
|
-
o.stopPropagation(), e.setFocused(!1), !((
|
|
294
|
+
P
|
|
295
|
+
]), J(l, We, $ ? (o) => {
|
|
296
|
+
var f;
|
|
297
|
+
o.stopPropagation(), e.setFocused(!1), !((f = o.detail) === null || f === void 0) && f.clearFocusKey && e.setFocusedKey(null);
|
|
294
298
|
} : void 0);
|
|
295
|
-
const W =
|
|
299
|
+
const W = x(i), B = x(!1);
|
|
296
300
|
q(() => {
|
|
297
301
|
if (W.current) {
|
|
298
|
-
var o,
|
|
302
|
+
var o, f;
|
|
299
303
|
let T = null;
|
|
300
|
-
var
|
|
301
|
-
i === "first" && (T = (
|
|
302
|
-
var
|
|
303
|
-
i === "last" && (T = (
|
|
304
|
+
var s;
|
|
305
|
+
i === "first" && (T = (s = (o = t.getFirstKey) === null || o === void 0 ? void 0 : o.call(t)) !== null && s !== void 0 ? s : null);
|
|
306
|
+
var g;
|
|
307
|
+
i === "last" && (T = (g = (f = t.getLastKey) === null || f === void 0 ? void 0 : f.call(t)) !== null && g !== void 0 ? g : null);
|
|
304
308
|
let D = e.selectedKeys;
|
|
305
309
|
if (D.size) {
|
|
306
|
-
for (let
|
|
307
|
-
T =
|
|
310
|
+
for (let R of D) if (e.canSelectItem(R)) {
|
|
311
|
+
T = R;
|
|
308
312
|
break;
|
|
309
313
|
}
|
|
310
314
|
}
|
|
311
|
-
e.setFocused(!0), e.setFocusedKey(T), T == null &&
|
|
315
|
+
e.setFocused(!0), e.setFocusedKey(T), T == null && !$ && l.current && ae(l.current), e.collection.size > 0 && (W.current = !1, B.current = !0);
|
|
312
316
|
}
|
|
313
317
|
});
|
|
314
|
-
let
|
|
318
|
+
let L = x(e.focusedKey), w = x(null);
|
|
315
319
|
q(() => {
|
|
316
|
-
if (e.isFocused && e.focusedKey != null && (e.focusedKey !==
|
|
317
|
-
let o = ve(),
|
|
318
|
-
if (!(
|
|
320
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== L.current || B.current) && b.current && l.current) {
|
|
321
|
+
let o = ve(), f = re(l, e.focusedKey);
|
|
322
|
+
if (!(f instanceof HTMLElement))
|
|
319
323
|
return;
|
|
320
|
-
(o === "keyboard" ||
|
|
321
|
-
b.current && (
|
|
324
|
+
(o === "keyboard" || B.current) && (w.current && cancelAnimationFrame(w.current), w.current = requestAnimationFrame(() => {
|
|
325
|
+
b.current && (Be(b.current, f), o !== "virtual" && pe(f, {
|
|
322
326
|
containingElement: l.current
|
|
323
327
|
}));
|
|
324
328
|
}));
|
|
325
329
|
}
|
|
326
|
-
|
|
330
|
+
!$ && e.isFocused && e.focusedKey == null && L.current != null && l.current && ae(l.current), L.current = e.focusedKey, B.current = !1;
|
|
327
331
|
}), q(() => () => {
|
|
328
|
-
|
|
332
|
+
w.current && cancelAnimationFrame(w.current);
|
|
329
333
|
}, []), J(l, "react-aria-focus-scope-restore", (o) => {
|
|
330
334
|
o.preventDefault(), e.setFocused(!0);
|
|
331
335
|
});
|
|
332
336
|
let G = {
|
|
333
|
-
onKeyDown:
|
|
334
|
-
onFocus:
|
|
337
|
+
onKeyDown: S,
|
|
338
|
+
onFocus: F,
|
|
335
339
|
onBlur: A,
|
|
336
340
|
onMouseDown(o) {
|
|
337
341
|
b.current === o.target && o.preventDefault();
|
|
338
342
|
}
|
|
339
|
-
}, { typeSelectProps: Q } =
|
|
343
|
+
}, { typeSelectProps: Q } = Ne({
|
|
340
344
|
keyboardDelegate: t,
|
|
341
345
|
selectionManager: e
|
|
342
346
|
});
|
|
343
347
|
E || (G = Y(Q, G));
|
|
344
348
|
let Z;
|
|
345
|
-
|
|
346
|
-
let X =
|
|
349
|
+
$ || (Z = e.focusedKey == null ? 0 : -1);
|
|
350
|
+
let X = Je(e.collection);
|
|
347
351
|
return {
|
|
348
352
|
collectionProps: Y(G, {
|
|
349
353
|
tabIndex: Z,
|
|
@@ -351,25 +355,25 @@ function $t(n) {
|
|
|
351
355
|
})
|
|
352
356
|
};
|
|
353
357
|
}
|
|
354
|
-
function
|
|
355
|
-
let { id: e, selectionManager: t, key: l, ref: i, shouldSelectOnPressUp: c, shouldUseVirtualFocus: r, focus:
|
|
356
|
-
e =
|
|
357
|
-
let
|
|
358
|
+
function gt(n) {
|
|
359
|
+
let { id: e, selectionManager: t, key: l, ref: i, shouldSelectOnPressUp: c, shouldUseVirtualFocus: r, focus: d, isDisabled: a, onAction: K, allowsDifferentPressOrigin: E, linkBehavior: $ = "action" } = n, v = De();
|
|
360
|
+
e = Fe(e);
|
|
361
|
+
let m = (s) => {
|
|
358
362
|
if (s.pointerType === "keyboard" && fe(s)) t.toggleSelection(l);
|
|
359
363
|
else {
|
|
360
364
|
if (t.selectionMode === "none") return;
|
|
361
365
|
if (t.isLink(l)) {
|
|
362
|
-
if (
|
|
363
|
-
let
|
|
364
|
-
v.open(i.current, s,
|
|
366
|
+
if ($ === "selection" && i.current) {
|
|
367
|
+
let g = t.getItemProps(l);
|
|
368
|
+
v.open(i.current, s, g.href, g.routerOptions), t.setSelectedKeys(t.selectedKeys);
|
|
365
369
|
return;
|
|
366
|
-
} else if (
|
|
370
|
+
} else if ($ === "override" || $ === "none") return;
|
|
367
371
|
}
|
|
368
372
|
t.selectionMode === "single" ? t.isSelected(l) && !t.disallowEmptySelection ? t.toggleSelection(l) : t.replaceSelection(l) : s && s.shiftKey ? t.extendSelection(l) : t.selectionBehavior === "toggle" || s && (H(s) || s.pointerType === "touch" || s.pointerType === "virtual") ? t.toggleSelection(l) : t.replaceSelection(l);
|
|
369
373
|
}
|
|
370
374
|
};
|
|
371
375
|
q(() => {
|
|
372
|
-
l === t.focusedKey && t.isFocused && (r ?
|
|
376
|
+
l === t.focusedKey && t.isFocused && (r ? Te(i.current) : d ? d() : document.activeElement !== i.current && i.current && ae(i.current));
|
|
373
377
|
}, [
|
|
374
378
|
i,
|
|
375
379
|
l,
|
|
@@ -387,58 +391,63 @@ function mt(n) {
|
|
|
387
391
|
} : a && (b.onMouseDown = (s) => {
|
|
388
392
|
s.preventDefault();
|
|
389
393
|
});
|
|
390
|
-
let k = t.isLink(l) &&
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
v.open(i.current, s, p.href, p.routerOptions);
|
|
394
|
-
}
|
|
395
|
-
}, P = {
|
|
394
|
+
let k = t.isLink(l) && $ === "override", y = t.isLink(l) && $ !== "selection" && $ !== "none", h = !a && t.canSelectItem(l) && !k, S = (K || y) && !a, p = S && (t.selectionBehavior === "replace" ? !h : !h || t.isEmpty), F = S && h && t.selectionBehavior === "replace", A = p || F, I = x(null), M = A && h, P = x(!1), W = x(!1), B = t.getItemProps(l), L = (s) => {
|
|
395
|
+
K && K(), y && i.current && v.open(i.current, s, B.href, B.routerOptions);
|
|
396
|
+
}, w = {
|
|
396
397
|
ref: i
|
|
397
398
|
};
|
|
398
|
-
c ? (
|
|
399
|
-
I.current = s.pointerType,
|
|
400
|
-
}, E ? (
|
|
401
|
-
s.pointerType === "mouse" &&
|
|
402
|
-
},
|
|
403
|
-
s.pointerType !== "keyboard" && s.pointerType !== "mouse" &&
|
|
404
|
-
}) :
|
|
405
|
-
if (
|
|
399
|
+
if (c ? (w.onPressStart = (s) => {
|
|
400
|
+
I.current = s.pointerType, P.current = M, s.pointerType === "keyboard" && (!A || me()) && m(s);
|
|
401
|
+
}, E ? (w.onPressUp = p ? void 0 : (s) => {
|
|
402
|
+
s.pointerType === "mouse" && h && m(s);
|
|
403
|
+
}, w.onPress = p ? L : (s) => {
|
|
404
|
+
s.pointerType !== "keyboard" && s.pointerType !== "mouse" && h && m(s);
|
|
405
|
+
}) : w.onPress = (s) => {
|
|
406
|
+
if (p || F && s.pointerType !== "mouse") {
|
|
406
407
|
if (s.pointerType === "keyboard" && !$e()) return;
|
|
407
|
-
|
|
408
|
-
} else s.pointerType !== "keyboard" &&
|
|
409
|
-
}) : (
|
|
410
|
-
I.current = s.pointerType,
|
|
411
|
-
},
|
|
412
|
-
(s.pointerType === "touch" || s.pointerType === "pen" || s.pointerType === "virtual" || s.pointerType === "keyboard" && A && $e() || s.pointerType === "mouse" && W.current) && (A ?
|
|
413
|
-
}), b["data-collection"] =
|
|
408
|
+
L(s);
|
|
409
|
+
} else s.pointerType !== "keyboard" && h && m(s);
|
|
410
|
+
}) : (w.onPressStart = (s) => {
|
|
411
|
+
I.current = s.pointerType, P.current = M, W.current = p, h && (s.pointerType === "mouse" && !p || s.pointerType === "keyboard" && (!S || me())) && m(s);
|
|
412
|
+
}, w.onPress = (s) => {
|
|
413
|
+
(s.pointerType === "touch" || s.pointerType === "pen" || s.pointerType === "virtual" || s.pointerType === "keyboard" && A && $e() || s.pointerType === "mouse" && W.current) && (A ? L(s) : h && m(s));
|
|
414
|
+
}), b["data-collection"] = Qe(t.collection), b["data-key"] = l, w.preventFocusOnPress = r, r && (w = Y(w, {
|
|
414
415
|
onPressStart(s) {
|
|
415
416
|
s.pointerType !== "touch" && (t.setFocused(!0), t.setFocusedKey(l));
|
|
416
417
|
},
|
|
417
418
|
onPress(s) {
|
|
418
419
|
s.pointerType === "touch" && (t.setFocused(!0), t.setFocusedKey(l));
|
|
419
420
|
}
|
|
420
|
-
}))
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
421
|
+
})), B)
|
|
422
|
+
for (let s of [
|
|
423
|
+
"onPressStart",
|
|
424
|
+
"onPressEnd",
|
|
425
|
+
"onPressChange",
|
|
426
|
+
"onPress",
|
|
427
|
+
"onPressUp",
|
|
428
|
+
"onClick"
|
|
429
|
+
]) B[s] && (w[s] = Ce(w[s], B[s]));
|
|
430
|
+
let { pressProps: G, isPressed: Q } = Pe(w), Z = F ? (s) => {
|
|
431
|
+
I.current === "mouse" && (s.stopPropagation(), s.preventDefault(), L(s));
|
|
432
|
+
} : void 0, { longPressProps: X } = je({
|
|
433
|
+
isDisabled: !M,
|
|
425
434
|
onLongPress(s) {
|
|
426
|
-
s.pointerType === "touch" && (
|
|
435
|
+
s.pointerType === "touch" && (m(s), t.setSelectionBehavior("toggle"));
|
|
427
436
|
}
|
|
428
|
-
}),
|
|
429
|
-
I.current === "touch" &&
|
|
430
|
-
},
|
|
431
|
-
|
|
437
|
+
}), o = (s) => {
|
|
438
|
+
I.current === "touch" && P.current && s.preventDefault();
|
|
439
|
+
}, f = $ !== "none" && t.isLink(l) ? (s) => {
|
|
440
|
+
Me.isOpening || s.preventDefault();
|
|
432
441
|
} : void 0;
|
|
433
442
|
return {
|
|
434
443
|
itemProps: Y(
|
|
435
444
|
b,
|
|
436
|
-
|
|
437
|
-
|
|
445
|
+
h || p || r && !a ? G : {},
|
|
446
|
+
M ? X : {},
|
|
438
447
|
{
|
|
439
|
-
onDoubleClick:
|
|
440
|
-
onDragStartCapture:
|
|
441
|
-
onClick:
|
|
448
|
+
onDoubleClick: Z,
|
|
449
|
+
onDragStartCapture: o,
|
|
450
|
+
onClick: f,
|
|
442
451
|
id: e
|
|
443
452
|
},
|
|
444
453
|
// Prevent DOM focus from moving on mouse down when using virtual focus
|
|
@@ -446,11 +455,11 @@ function mt(n) {
|
|
|
446
455
|
onMouseDown: (s) => s.preventDefault()
|
|
447
456
|
} : void 0
|
|
448
457
|
),
|
|
449
|
-
isPressed:
|
|
458
|
+
isPressed: Q,
|
|
450
459
|
isSelected: t.isSelected(l),
|
|
451
460
|
isFocused: t.isFocused && t.focusedKey === l,
|
|
452
461
|
isDisabled: a,
|
|
453
|
-
allowsSelection:
|
|
462
|
+
allowsSelection: h,
|
|
454
463
|
hasAction: A
|
|
455
464
|
};
|
|
456
465
|
}
|
|
@@ -462,7 +471,7 @@ function me() {
|
|
|
462
471
|
let n = window.event;
|
|
463
472
|
return (n == null ? void 0 : n.key) === " " || (n == null ? void 0 : n.code) === "Space";
|
|
464
473
|
}
|
|
465
|
-
class
|
|
474
|
+
class et {
|
|
466
475
|
build(e, t) {
|
|
467
476
|
return this.context = t, ge(() => this.iterateCollection(e));
|
|
468
477
|
}
|
|
@@ -489,11 +498,11 @@ class _e {
|
|
|
489
498
|
});
|
|
490
499
|
let c = 0;
|
|
491
500
|
for (let r of i) {
|
|
492
|
-
let
|
|
501
|
+
let d = this.getFullNode({
|
|
493
502
|
element: r,
|
|
494
503
|
index: c
|
|
495
504
|
}, {});
|
|
496
|
-
for (let a of
|
|
505
|
+
for (let a of d)
|
|
497
506
|
c++, yield a;
|
|
498
507
|
}
|
|
499
508
|
}
|
|
@@ -504,9 +513,9 @@ class _e {
|
|
|
504
513
|
let c = t.value;
|
|
505
514
|
if (c != null) {
|
|
506
515
|
var r;
|
|
507
|
-
let
|
|
508
|
-
if (
|
|
509
|
-
return
|
|
516
|
+
let d = (r = c.key) !== null && r !== void 0 ? r : c.id;
|
|
517
|
+
if (d == null) throw new Error("No key found for item");
|
|
518
|
+
return d;
|
|
510
519
|
}
|
|
511
520
|
return i ? `${i}.${t.index}` : `$.${t.index}`;
|
|
512
521
|
}
|
|
@@ -517,70 +526,70 @@ class _e {
|
|
|
517
526
|
}
|
|
518
527
|
*getFullNode(e, t, l, i) {
|
|
519
528
|
if (V.isValidElement(e.element) && e.element.type === V.Fragment) {
|
|
520
|
-
let
|
|
521
|
-
V.Children.forEach(e.element.props.children, (
|
|
522
|
-
|
|
529
|
+
let y = [];
|
|
530
|
+
V.Children.forEach(e.element.props.children, (S) => {
|
|
531
|
+
y.push(S);
|
|
523
532
|
});
|
|
524
533
|
var c;
|
|
525
|
-
let
|
|
526
|
-
for (const
|
|
527
|
-
element:
|
|
528
|
-
index:
|
|
534
|
+
let h = (c = e.index) !== null && c !== void 0 ? c : 0;
|
|
535
|
+
for (const S of y) yield* this.getFullNode({
|
|
536
|
+
element: S,
|
|
537
|
+
index: h++
|
|
529
538
|
}, t, l, i);
|
|
530
539
|
return;
|
|
531
540
|
}
|
|
532
541
|
let r = e.element;
|
|
533
542
|
if (!r && e.value && t && t.renderer) {
|
|
534
|
-
let
|
|
535
|
-
if (
|
|
536
|
-
|
|
543
|
+
let y = this.cache.get(e.value);
|
|
544
|
+
if (y && (!y.shouldInvalidate || !y.shouldInvalidate(this.context))) {
|
|
545
|
+
y.index = e.index, y.parentKey = i ? i.key : null, yield y;
|
|
537
546
|
return;
|
|
538
547
|
}
|
|
539
548
|
r = t.renderer(e.value);
|
|
540
549
|
}
|
|
541
550
|
if (V.isValidElement(r)) {
|
|
542
|
-
let
|
|
543
|
-
if (typeof
|
|
544
|
-
let
|
|
545
|
-
throw new Error(`Unknown element <${
|
|
551
|
+
let y = r.type;
|
|
552
|
+
if (typeof y != "function" && typeof y.getCollectionNode != "function") {
|
|
553
|
+
let F = r.type;
|
|
554
|
+
throw new Error(`Unknown element <${F}> in collection.`);
|
|
546
555
|
}
|
|
547
|
-
let
|
|
548
|
-
var
|
|
549
|
-
let
|
|
550
|
-
for (; !
|
|
551
|
-
let
|
|
552
|
-
e.index =
|
|
556
|
+
let h = y.getCollectionNode(r.props, this.context);
|
|
557
|
+
var d;
|
|
558
|
+
let S = (d = e.index) !== null && d !== void 0 ? d : 0, p = h.next();
|
|
559
|
+
for (; !p.done && p.value; ) {
|
|
560
|
+
let F = p.value;
|
|
561
|
+
e.index = S;
|
|
553
562
|
var a;
|
|
554
|
-
let A = (a =
|
|
555
|
-
A == null && (A =
|
|
556
|
-
let
|
|
563
|
+
let A = (a = F.key) !== null && a !== void 0 ? a : null;
|
|
564
|
+
A == null && (A = F.element ? null : this.getKey(r, e, t, l));
|
|
565
|
+
let M = [
|
|
557
566
|
...this.getFullNode({
|
|
558
|
-
...
|
|
567
|
+
...F,
|
|
559
568
|
key: A,
|
|
560
|
-
index:
|
|
561
|
-
wrapper:
|
|
562
|
-
}, this.getChildState(t,
|
|
569
|
+
index: S,
|
|
570
|
+
wrapper: tt(e.wrapper, F.wrapper)
|
|
571
|
+
}, this.getChildState(t, F), l ? `${l}${r.key}` : r.key, i)
|
|
563
572
|
];
|
|
564
|
-
for (let
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
var
|
|
568
|
-
if (e.type &&
|
|
569
|
-
|
|
573
|
+
for (let P of M) {
|
|
574
|
+
var K, E;
|
|
575
|
+
P.value = (E = (K = F.value) !== null && K !== void 0 ? K : e.value) !== null && E !== void 0 ? E : null, P.value && this.cache.set(P.value, P);
|
|
576
|
+
var $;
|
|
577
|
+
if (e.type && P.type !== e.type) throw new Error(`Unsupported type <${oe(P.type)}> in <${oe(($ = i == null ? void 0 : i.type) !== null && $ !== void 0 ? $ : "unknown parent type")}>. Only <${oe(e.type)}> is supported.`);
|
|
578
|
+
S++, yield P;
|
|
570
579
|
}
|
|
571
|
-
|
|
580
|
+
p = h.next(M);
|
|
572
581
|
}
|
|
573
582
|
return;
|
|
574
583
|
}
|
|
575
584
|
if (e.key == null || e.type == null) return;
|
|
576
585
|
let v = this;
|
|
577
|
-
var
|
|
586
|
+
var m, b;
|
|
578
587
|
let k = {
|
|
579
588
|
type: e.type,
|
|
580
589
|
props: e.props,
|
|
581
590
|
key: e.key,
|
|
582
591
|
parentKey: i ? i.key : null,
|
|
583
|
-
value: (
|
|
592
|
+
value: (m = e.value) !== null && m !== void 0 ? m : null,
|
|
584
593
|
level: i ? i.level + 1 : 0,
|
|
585
594
|
index: e.index,
|
|
586
595
|
rendered: e.rendered,
|
|
@@ -591,15 +600,15 @@ class _e {
|
|
|
591
600
|
hasChildNodes: e.hasChildNodes || !1,
|
|
592
601
|
childNodes: ge(function* () {
|
|
593
602
|
if (!e.hasChildNodes || !e.childNodes) return;
|
|
594
|
-
let
|
|
595
|
-
for (let
|
|
596
|
-
|
|
597
|
-
let
|
|
598
|
-
...
|
|
599
|
-
index:
|
|
600
|
-
}, v.getChildState(t,
|
|
601
|
-
for (let
|
|
602
|
-
|
|
603
|
+
let y = 0;
|
|
604
|
+
for (let h of e.childNodes()) {
|
|
605
|
+
h.key != null && (h.key = `${k.key}${h.key}`);
|
|
606
|
+
let S = v.getFullNode({
|
|
607
|
+
...h,
|
|
608
|
+
index: y
|
|
609
|
+
}, v.getChildState(t, h), k.key, k);
|
|
610
|
+
for (let p of S)
|
|
611
|
+
y++, yield p;
|
|
603
612
|
}
|
|
604
613
|
})
|
|
605
614
|
};
|
|
@@ -620,7 +629,7 @@ function ge(n) {
|
|
|
620
629
|
}
|
|
621
630
|
};
|
|
622
631
|
}
|
|
623
|
-
function
|
|
632
|
+
function tt(n, e) {
|
|
624
633
|
if (n && e) return (t) => n(e(t));
|
|
625
634
|
if (n) return n;
|
|
626
635
|
if (e) return e;
|
|
@@ -628,8 +637,8 @@ function et(n, e) {
|
|
|
628
637
|
function oe(n) {
|
|
629
638
|
return n[0].toUpperCase() + n.slice(1);
|
|
630
639
|
}
|
|
631
|
-
function
|
|
632
|
-
let l = j(() => new
|
|
640
|
+
function Kt(n, e, t) {
|
|
641
|
+
let l = j(() => new et(), []), { children: i, items: c, collection: r } = n;
|
|
633
642
|
return j(() => {
|
|
634
643
|
if (r) return r;
|
|
635
644
|
let a = l.build({
|
|
@@ -646,13 +655,13 @@ function gt(n, e, t) {
|
|
|
646
655
|
e
|
|
647
656
|
]);
|
|
648
657
|
}
|
|
649
|
-
function
|
|
658
|
+
function lt(n, e) {
|
|
650
659
|
return typeof e.getChildren == "function" ? e.getChildren(n.key) : n.childNodes;
|
|
651
660
|
}
|
|
652
|
-
function
|
|
653
|
-
return
|
|
661
|
+
function it(n) {
|
|
662
|
+
return nt(n, 0);
|
|
654
663
|
}
|
|
655
|
-
function
|
|
664
|
+
function nt(n, e) {
|
|
656
665
|
if (e < 0) return;
|
|
657
666
|
let t = 0;
|
|
658
667
|
for (let l of n) {
|
|
@@ -660,7 +669,7 @@ function it(n, e) {
|
|
|
660
669
|
t++;
|
|
661
670
|
}
|
|
662
671
|
}
|
|
663
|
-
function
|
|
672
|
+
function St(n) {
|
|
664
673
|
let e;
|
|
665
674
|
for (let t of n) e = t;
|
|
666
675
|
return e;
|
|
@@ -673,7 +682,7 @@ function ce(n, e, t) {
|
|
|
673
682
|
], i = [
|
|
674
683
|
...Ke(n, t),
|
|
675
684
|
t
|
|
676
|
-
], c = l.slice(0, i.length).findIndex((r,
|
|
685
|
+
], c = l.slice(0, i.length).findIndex((r, d) => r !== i[d]);
|
|
677
686
|
return c !== -1 ? (e = l[c], t = i[c], e.index - t.index) : l.findIndex((r) => r === t) >= 0 ? 1 : (i.findIndex((r) => r === e) >= 0, -1);
|
|
678
687
|
}
|
|
679
688
|
function Ke(n, e) {
|
|
@@ -682,63 +691,63 @@ function Ke(n, e) {
|
|
|
682
691
|
l = n.getItem(l.parentKey), l && t.unshift(l);
|
|
683
692
|
return t;
|
|
684
693
|
}
|
|
685
|
-
class
|
|
694
|
+
class C extends Set {
|
|
686
695
|
constructor(e, t, l) {
|
|
687
|
-
super(e), e instanceof
|
|
696
|
+
super(e), e instanceof C ? (this.anchorKey = t ?? e.anchorKey, this.currentKey = l ?? e.currentKey) : (this.anchorKey = t ?? null, this.currentKey = l ?? null);
|
|
688
697
|
}
|
|
689
698
|
}
|
|
690
|
-
function
|
|
699
|
+
function st(n, e) {
|
|
691
700
|
if (n.size !== e.size) return !1;
|
|
692
701
|
for (let t of n)
|
|
693
702
|
if (!e.has(t)) return !1;
|
|
694
703
|
return !0;
|
|
695
704
|
}
|
|
696
|
-
function
|
|
697
|
-
let { selectionMode: e = "none", disallowEmptySelection: t = !1, allowDuplicateSelectionEvents: l, selectionBehavior: i = "toggle", disabledBehavior: c = "all" } = n, r =
|
|
705
|
+
function wt(n) {
|
|
706
|
+
let { selectionMode: e = "none", disallowEmptySelection: t = !1, allowDuplicateSelectionEvents: l, selectionBehavior: i = "toggle", disabledBehavior: c = "all" } = n, r = x(!1), [, d] = se(!1), a = x(null), K = x(null), [, E] = se(null), $ = j(() => Se(n.selectedKeys), [
|
|
698
707
|
n.selectedKeys
|
|
699
|
-
]), v = j(() => Se(n.defaultSelectedKeys, new
|
|
708
|
+
]), v = j(() => Se(n.defaultSelectedKeys, new C()), [
|
|
700
709
|
n.defaultSelectedKeys
|
|
701
|
-
]), [
|
|
710
|
+
]), [m, b] = He($, v, n.onSelectionChange), k = j(() => n.disabledKeys ? new Set(n.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
702
711
|
n.disabledKeys
|
|
703
|
-
]), [
|
|
704
|
-
i === "replace" &&
|
|
705
|
-
let
|
|
712
|
+
]), [y, h] = se(i);
|
|
713
|
+
i === "replace" && y === "toggle" && typeof m == "object" && m.size === 0 && h("replace");
|
|
714
|
+
let S = x(i);
|
|
706
715
|
return q(() => {
|
|
707
|
-
i !==
|
|
716
|
+
i !== S.current && (h(i), S.current = i);
|
|
708
717
|
}, [
|
|
709
718
|
i
|
|
710
719
|
]), {
|
|
711
720
|
selectionMode: e,
|
|
712
721
|
disallowEmptySelection: t,
|
|
713
|
-
selectionBehavior:
|
|
714
|
-
setSelectionBehavior:
|
|
722
|
+
selectionBehavior: y,
|
|
723
|
+
setSelectionBehavior: h,
|
|
715
724
|
get isFocused() {
|
|
716
725
|
return r.current;
|
|
717
726
|
},
|
|
718
|
-
setFocused(
|
|
719
|
-
r.current =
|
|
727
|
+
setFocused(p) {
|
|
728
|
+
r.current = p, d(p);
|
|
720
729
|
},
|
|
721
730
|
get focusedKey() {
|
|
722
731
|
return a.current;
|
|
723
732
|
},
|
|
724
733
|
get childFocusStrategy() {
|
|
725
|
-
return
|
|
734
|
+
return K.current;
|
|
726
735
|
},
|
|
727
|
-
setFocusedKey(
|
|
728
|
-
a.current =
|
|
736
|
+
setFocusedKey(p, F = "first") {
|
|
737
|
+
a.current = p, K.current = F, E(p);
|
|
729
738
|
},
|
|
730
|
-
selectedKeys:
|
|
731
|
-
setSelectedKeys(
|
|
732
|
-
(l || !
|
|
739
|
+
selectedKeys: m,
|
|
740
|
+
setSelectedKeys(p) {
|
|
741
|
+
(l || !st(p, m)) && b(p);
|
|
733
742
|
},
|
|
734
743
|
disabledKeys: k,
|
|
735
744
|
disabledBehavior: c
|
|
736
745
|
};
|
|
737
746
|
}
|
|
738
747
|
function Se(n, e) {
|
|
739
|
-
return n ? n === "all" ? "all" : new
|
|
748
|
+
return n ? n === "all" ? "all" : new C(n) : e;
|
|
740
749
|
}
|
|
741
|
-
class
|
|
750
|
+
class Ae {
|
|
742
751
|
/**
|
|
743
752
|
* The type of selection that is allowed in the collection.
|
|
744
753
|
*/
|
|
@@ -864,17 +873,17 @@ class Ee {
|
|
|
864
873
|
let t = this.getKey(e);
|
|
865
874
|
if (t == null) return;
|
|
866
875
|
let l;
|
|
867
|
-
if (this.state.selectedKeys === "all") l = new
|
|
876
|
+
if (this.state.selectedKeys === "all") l = new C([
|
|
868
877
|
t
|
|
869
878
|
], t, t);
|
|
870
879
|
else {
|
|
871
880
|
let r = this.state.selectedKeys;
|
|
872
881
|
var i;
|
|
873
|
-
let
|
|
874
|
-
l = new
|
|
882
|
+
let d = (i = r.anchorKey) !== null && i !== void 0 ? i : t;
|
|
883
|
+
l = new C(r, d, t);
|
|
875
884
|
var c;
|
|
876
|
-
for (let a of this.getKeyRange(
|
|
877
|
-
for (let a of this.getKeyRange(t,
|
|
885
|
+
for (let a of this.getKeyRange(d, (c = r.currentKey) !== null && c !== void 0 ? c : t)) l.delete(a);
|
|
886
|
+
for (let a of this.getKeyRange(t, d)) this.canSelectItem(a) && l.add(a);
|
|
878
887
|
}
|
|
879
888
|
this.state.setSelectedKeys(l);
|
|
880
889
|
}
|
|
@@ -910,7 +919,7 @@ class Ee {
|
|
|
910
919
|
}
|
|
911
920
|
let t = this.getKey(e);
|
|
912
921
|
if (t == null) return;
|
|
913
|
-
let l = new
|
|
922
|
+
let l = new C(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
914
923
|
l.has(t) ? l.delete(t) : this.canSelectItem(t) && (l.add(t), l.anchorKey = t, l.currentKey = t), !(this.disallowEmptySelection && l.size === 0) && this.state.setSelectedKeys(l);
|
|
915
924
|
}
|
|
916
925
|
/**
|
|
@@ -920,9 +929,9 @@ class Ee {
|
|
|
920
929
|
if (this.selectionMode === "none") return;
|
|
921
930
|
let t = this.getKey(e);
|
|
922
931
|
if (t == null) return;
|
|
923
|
-
let l = this.canSelectItem(t) ? new
|
|
932
|
+
let l = this.canSelectItem(t) ? new C([
|
|
924
933
|
t
|
|
925
|
-
], t, t) : new
|
|
934
|
+
], t, t) : new C();
|
|
926
935
|
this.state.setSelectedKeys(l);
|
|
927
936
|
}
|
|
928
937
|
/**
|
|
@@ -930,7 +939,7 @@ class Ee {
|
|
|
930
939
|
*/
|
|
931
940
|
setSelectedKeys(e) {
|
|
932
941
|
if (this.selectionMode === "none") return;
|
|
933
|
-
let t = new
|
|
942
|
+
let t = new C();
|
|
934
943
|
for (let l of e) {
|
|
935
944
|
let i = this.getKey(l);
|
|
936
945
|
if (i != null && (t.add(i), this.selectionMode === "single"))
|
|
@@ -946,7 +955,7 @@ class Ee {
|
|
|
946
955
|
let r = this.collection.getItem(l);
|
|
947
956
|
(r == null ? void 0 : r.type) === "item" && e.push(l);
|
|
948
957
|
var c;
|
|
949
|
-
r != null && r.hasChildNodes && (this.allowsCellSelection || r.type !== "item") && t((c = (i = lt(
|
|
958
|
+
r != null && r.hasChildNodes && (this.allowsCellSelection || r.type !== "item") && t((c = (i = it(lt(r, this.collection))) === null || i === void 0 ? void 0 : i.key) !== null && c !== void 0 ? c : null);
|
|
950
959
|
}
|
|
951
960
|
l = this.collection.getKeyAfter(l);
|
|
952
961
|
}
|
|
@@ -963,7 +972,7 @@ class Ee {
|
|
|
963
972
|
* Removes all keys from the selection.
|
|
964
973
|
*/
|
|
965
974
|
clearSelection() {
|
|
966
|
-
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new
|
|
975
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new C());
|
|
967
976
|
}
|
|
968
977
|
/**
|
|
969
978
|
* Toggles between select all and an empty selection.
|
|
@@ -1006,7 +1015,7 @@ class Ee {
|
|
|
1006
1015
|
return (t = this.collection.getItem(e)) === null || t === void 0 ? void 0 : t.props;
|
|
1007
1016
|
}
|
|
1008
1017
|
withCollection(e) {
|
|
1009
|
-
return new
|
|
1018
|
+
return new Ae(e, this.state, {
|
|
1010
1019
|
allowsCellSelection: this.allowsCellSelection,
|
|
1011
1020
|
layoutDelegate: this.layoutDelegate || void 0
|
|
1012
1021
|
});
|
|
@@ -1018,17 +1027,17 @@ class Ee {
|
|
|
1018
1027
|
}
|
|
1019
1028
|
}
|
|
1020
1029
|
export {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1030
|
+
wt as $,
|
|
1031
|
+
Kt as a,
|
|
1032
|
+
Ae as b,
|
|
1024
1033
|
re as c,
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
+
gt as d,
|
|
1035
|
+
mt as e,
|
|
1036
|
+
lt as f,
|
|
1037
|
+
Ne as g,
|
|
1038
|
+
Ee as h,
|
|
1039
|
+
St as i,
|
|
1040
|
+
it as j,
|
|
1041
|
+
nt as k,
|
|
1042
|
+
je as l
|
|
1034
1043
|
};
|