@commercetools/nimbus 0.0.9-rc6 → 0.0.9-rc8
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/dist/accordion.d.ts +157 -0
- package/dist/alert.d.ts +173 -0
- package/dist/avatar.d.ts +70 -0
- package/dist/badge.d.ts +102 -0
- package/dist/box.d.ts +14 -0
- package/dist/button.d.ts +38 -0
- package/dist/calendar.d.ts +26 -0
- package/dist/card.d.ts +134 -0
- package/dist/checkbox.d.ts +73 -0
- package/dist/chunks/Button-BxcMDv2N.js +79 -0
- package/dist/chunks/Button-BxcMDv2N.js.map +1 -0
- package/dist/chunks/Button-tPOlfQRd.js +2 -0
- package/dist/chunks/Button-tPOlfQRd.js.map +1 -0
- package/dist/chunks/DateField-CaR3Qeda.js +2564 -0
- package/dist/chunks/DateField-CaR3Qeda.js.map +1 -0
- package/dist/chunks/DateField-D3h6vCMK.js +2 -0
- package/dist/chunks/DateField-D3h6vCMK.js.map +1 -0
- package/dist/chunks/Dialog-5VrXdl86.js +2 -0
- package/dist/chunks/Dialog-5VrXdl86.js.map +1 -0
- package/dist/chunks/Dialog-DJv-Zg_L.js +870 -0
- package/dist/chunks/Dialog-DJv-Zg_L.js.map +1 -0
- package/dist/chunks/FocusScope-CsXy0kJw.js +627 -0
- package/dist/chunks/FocusScope-CsXy0kJw.js.map +1 -0
- package/dist/chunks/FocusScope-Cysx7oI0.js +2 -0
- package/dist/chunks/FocusScope-Cysx7oI0.js.map +1 -0
- package/dist/chunks/Form-DdaqVtM4.js +8 -0
- package/dist/chunks/Form-DdaqVtM4.js.map +1 -0
- package/dist/chunks/Form-DqkTf3LZ.js +2 -0
- package/dist/chunks/Form-DqkTf3LZ.js.map +1 -0
- package/dist/chunks/Group-CTpcJZmt.js +2 -0
- package/dist/chunks/Group-CTpcJZmt.js.map +1 -0
- package/dist/chunks/Group-D3CaEDfr.js +78 -0
- package/dist/chunks/Group-D3CaEDfr.js.map +1 -0
- package/dist/chunks/Hidden-CNJIJ63M.js +2 -0
- package/dist/chunks/Hidden-CNJIJ63M.js.map +1 -0
- package/dist/chunks/Hidden-CeBYiBUb.js +28 -0
- package/dist/chunks/Hidden-CeBYiBUb.js.map +1 -0
- package/dist/chunks/Input-0vJb_5Js.js +43 -0
- package/dist/chunks/Input-0vJb_5Js.js.map +1 -0
- package/dist/chunks/Input-rMOtwpe-.js +2 -0
- package/dist/chunks/Input-rMOtwpe-.js.map +1 -0
- package/dist/chunks/ListBox-Dmkou3Hm.js +18 -0
- package/dist/chunks/ListBox-Dmkou3Hm.js.map +1 -0
- package/dist/chunks/ListBox-Dss9OMcn.js +3004 -0
- package/dist/chunks/ListBox-Dss9OMcn.js.map +1 -0
- package/dist/chunks/LiveAnnouncer-B6177m92.js +52 -0
- package/dist/chunks/LiveAnnouncer-B6177m92.js.map +1 -0
- package/dist/chunks/LiveAnnouncer-CwEWPU8b.js +2 -0
- package/dist/chunks/LiveAnnouncer-CwEWPU8b.js.map +1 -0
- package/dist/chunks/NumberFormatter-DewVDY5w.js +2 -0
- package/dist/chunks/NumberFormatter-DewVDY5w.js.map +1 -0
- package/dist/chunks/NumberFormatter-DgOUVrge.js +120 -0
- package/dist/chunks/NumberFormatter-DgOUVrge.js.map +1 -0
- package/dist/chunks/OverlayArrow-Bs2caVoG.js +2 -0
- package/dist/chunks/OverlayArrow-Bs2caVoG.js.map +1 -0
- package/dist/chunks/OverlayArrow-qjQZbu8u.js +479 -0
- package/dist/chunks/OverlayArrow-qjQZbu8u.js.map +1 -0
- package/dist/chunks/RSPContexts-AkhSBHGO.js +6 -0
- package/dist/chunks/RSPContexts-AkhSBHGO.js.map +1 -0
- package/dist/chunks/RSPContexts-CIAIlAKH.js +2 -0
- package/dist/chunks/RSPContexts-CIAIlAKH.js.map +1 -0
- package/dist/chunks/SSRProvider-DZRLwxPS.js +2 -0
- package/dist/chunks/SSRProvider-DZRLwxPS.js.map +1 -0
- package/dist/chunks/SSRProvider-eIEwc-2s.js +51 -0
- package/dist/chunks/SSRProvider-eIEwc-2s.js.map +1 -0
- package/dist/chunks/Text-BWSfeB9p.js +2 -0
- package/dist/chunks/Text-BWSfeB9p.js.map +1 -0
- package/dist/chunks/Text-DOcU1ycg.js +6 -0
- package/dist/chunks/Text-DOcU1ycg.js.map +1 -0
- package/dist/chunks/TextArea-BfVV0_3h.js +2 -0
- package/dist/chunks/TextArea-BfVV0_3h.js.map +1 -0
- package/dist/chunks/TextArea-Q-NI2yW5.js +42 -0
- package/dist/chunks/TextArea-Q-NI2yW5.js.map +1 -0
- package/dist/chunks/VisuallyHidden-2REhp9RT.js +41 -0
- package/dist/chunks/VisuallyHidden-2REhp9RT.js.map +1 -0
- package/dist/chunks/VisuallyHidden-Cg0LJ1Dh.js +2 -0
- package/dist/chunks/VisuallyHidden-Cg0LJ1Dh.js.map +1 -0
- package/dist/chunks/accordion-D4Qqg89m.js +221 -0
- package/dist/chunks/accordion-D4Qqg89m.js.map +1 -0
- package/dist/chunks/accordion-vrKLW-re.js +2 -0
- package/dist/chunks/accordion-vrKLW-re.js.map +1 -0
- package/dist/chunks/alert-B738R1TJ.js +2 -0
- package/dist/chunks/alert-B738R1TJ.js.map +1 -0
- package/dist/chunks/alert-BX5IPnc_.js +186 -0
- package/dist/chunks/alert-BX5IPnc_.js.map +1 -0
- package/dist/chunks/avatar-85FE_L0r.js +37 -0
- package/dist/chunks/avatar-85FE_L0r.js.map +1 -0
- package/dist/chunks/avatar-Aa0LrRpo.js +2 -0
- package/dist/chunks/avatar-Aa0LrRpo.js.map +1 -0
- package/dist/chunks/avatar.recipe-BSmmqvwQ.js +39 -0
- package/dist/chunks/avatar.recipe-BSmmqvwQ.js.map +1 -0
- package/dist/chunks/avatar.recipe-aGNBZhVF.js +2 -0
- package/dist/chunks/avatar.recipe-aGNBZhVF.js.map +1 -0
- package/dist/chunks/badge-BFbBB0US.js +2 -0
- package/dist/chunks/badge-BFbBB0US.js.map +1 -0
- package/dist/chunks/badge-C1bFH3CB.js +76 -0
- package/dist/chunks/badge-C1bFH3CB.js.map +1 -0
- package/dist/chunks/box-DD4jYgS7.js +11 -0
- package/dist/chunks/box-DD4jYgS7.js.map +1 -0
- package/dist/chunks/box-FU6tRPFs.js +2 -0
- package/dist/chunks/box-FU6tRPFs.js.map +1 -0
- package/dist/chunks/button-BLZONb0_.js +2 -0
- package/dist/chunks/button-BLZONb0_.js.map +1 -0
- package/dist/chunks/button-zSDA7FRw.js +66 -0
- package/dist/chunks/button-zSDA7FRw.js.map +1 -0
- package/dist/chunks/button.recipe-DHk13lGU.js +2 -0
- package/dist/chunks/button.recipe-DHk13lGU.js.map +1 -0
- package/dist/chunks/button.recipe-DzOS_Bqm.js +191 -0
- package/dist/chunks/button.recipe-DzOS_Bqm.js.map +1 -0
- package/dist/chunks/calendar-BIB7Bqqn.js +1577 -0
- package/dist/chunks/calendar-BIB7Bqqn.js.map +1 -0
- package/dist/chunks/calendar-DRE_oZOp.js +2 -0
- package/dist/chunks/calendar-DRE_oZOp.js.map +1 -0
- package/dist/chunks/calendar.recipe-B2sMokBn.js +101 -0
- package/dist/chunks/calendar.recipe-B2sMokBn.js.map +1 -0
- package/dist/chunks/calendar.recipe-gUaUNltl.js +2 -0
- package/dist/chunks/calendar.recipe-gUaUNltl.js.map +1 -0
- package/dist/chunks/card-DAC7L3R0.js +2 -0
- package/dist/chunks/card-DAC7L3R0.js.map +1 -0
- package/dist/chunks/card-DSC-PYAU.js +138 -0
- package/dist/chunks/card-DSC-PYAU.js.map +1 -0
- package/dist/chunks/checkbox-B1w8RLi0.js +2 -0
- package/dist/chunks/checkbox-B1w8RLi0.js.map +1 -0
- package/dist/chunks/checkbox-CJQ1O9W5.js +89 -0
- package/dist/chunks/checkbox-CJQ1O9W5.js.map +1 -0
- package/dist/chunks/code-CI8aUhmu.js +6 -0
- package/dist/chunks/code-CI8aUhmu.js.map +1 -0
- package/dist/chunks/code-Dg4Larbo.js +2 -0
- package/dist/chunks/code-Dg4Larbo.js.map +1 -0
- package/dist/chunks/combobox-DLABf790.js +2 -0
- package/dist/chunks/combobox-DLABf790.js.map +1 -0
- package/dist/chunks/combobox-ZcHPms3T.js +1896 -0
- package/dist/chunks/combobox-ZcHPms3T.js.map +1 -0
- package/dist/chunks/combobox.recipe-BIn4O0NT.js +407 -0
- package/dist/chunks/combobox.recipe-BIn4O0NT.js.map +1 -0
- package/dist/chunks/combobox.recipe-Da71Y6ye.js +2 -0
- package/dist/chunks/combobox.recipe-Da71Y6ye.js.map +1 -0
- package/dist/chunks/context-BmQ51HC8.js +2 -0
- package/dist/chunks/context-BmQ51HC8.js.map +1 -0
- package/dist/chunks/context-CI0Y3O6x.js +94 -0
- package/dist/chunks/context-CI0Y3O6x.js.map +1 -0
- package/dist/chunks/date-input-DnjW061n.js +2 -0
- package/dist/chunks/date-input-DnjW061n.js.map +1 -0
- package/dist/chunks/date-input-tzOJ2b9K.js +16 -0
- package/dist/chunks/date-input-tzOJ2b9K.js.map +1 -0
- package/dist/chunks/date-input.recipe-BtWEmJGK.js +119 -0
- package/dist/chunks/date-input.recipe-BtWEmJGK.js.map +1 -0
- package/dist/chunks/date-input.recipe-Cf9e8VAr.js +2 -0
- package/dist/chunks/date-input.recipe-Cf9e8VAr.js.map +1 -0
- package/dist/chunks/date-picker-BOJn_b_Y.js +2 -0
- package/dist/chunks/date-picker-BOJn_b_Y.js.map +1 -0
- package/dist/chunks/date-picker-npElUeVw.js +483 -0
- package/dist/chunks/date-picker-npElUeVw.js.map +1 -0
- package/dist/chunks/date-picker.recipe-5Avb06qp.js +2 -0
- package/dist/chunks/date-picker.recipe-5Avb06qp.js.map +1 -0
- package/dist/chunks/date-picker.recipe-Dy6NmKHA.js +82 -0
- package/dist/chunks/date-picker.recipe-Dy6NmKHA.js.map +1 -0
- package/dist/chunks/dialog-C1HRMUcF.js +33 -0
- package/dist/chunks/dialog-C1HRMUcF.js.map +1 -0
- package/dist/chunks/dialog-amEwvIoM.js +2 -0
- package/dist/chunks/dialog-amEwvIoM.js.map +1 -0
- package/dist/chunks/extractStyleProps-CxgBrz3O.js +11 -0
- package/dist/chunks/extractStyleProps-CxgBrz3O.js.map +1 -0
- package/dist/chunks/extractStyleProps-lyk7D-zN.js +2 -0
- package/dist/chunks/extractStyleProps-lyk7D-zN.js.map +1 -0
- package/dist/chunks/filterDOMProps-BS2lrgFA.js +2 -0
- package/dist/chunks/filterDOMProps-BS2lrgFA.js.map +1 -0
- package/dist/chunks/filterDOMProps-D6KHYVBX.js +25 -0
- package/dist/chunks/filterDOMProps-D6KHYVBX.js.map +1 -0
- package/dist/chunks/focusSafely-DKDcdc1Z.js +36 -0
- package/dist/chunks/focusSafely-DKDcdc1Z.js.map +1 -0
- package/dist/chunks/focusSafely-DTxIMq-P.js +2 -0
- package/dist/chunks/focusSafely-DTxIMq-P.js.map +1 -0
- package/dist/chunks/form-field-CblzjGEw.js +11 -0
- package/dist/chunks/form-field-CblzjGEw.js.map +1 -0
- package/dist/chunks/form-field-D_qT2LNU.js +309 -0
- package/dist/chunks/form-field-D_qT2LNU.js.map +1 -0
- package/dist/chunks/getScrollParent-DE66eQI-.js +15 -0
- package/dist/chunks/getScrollParent-DE66eQI-.js.map +1 -0
- package/dist/chunks/getScrollParent-Dc1cnLDE.js +2 -0
- package/dist/chunks/getScrollParent-Dc1cnLDE.js.map +1 -0
- package/dist/chunks/grid-CugcJxRP.js +14 -0
- package/dist/chunks/grid-CugcJxRP.js.map +1 -0
- package/dist/chunks/grid-xr2A-OqD.js +2 -0
- package/dist/chunks/grid-xr2A-OqD.js.map +1 -0
- package/dist/chunks/icon-BFNYuilh.js +31 -0
- package/dist/chunks/icon-BFNYuilh.js.map +1 -0
- package/dist/chunks/icon-D50i-dqv.js +2 -0
- package/dist/chunks/icon-D50i-dqv.js.map +1 -0
- package/dist/chunks/icon-button-DVBfoOHT.js +14 -0
- package/dist/chunks/icon-button-DVBfoOHT.js.map +1 -0
- package/dist/chunks/icon-button-Ds1Wzyc1.js +2 -0
- package/dist/chunks/icon-button-Ds1Wzyc1.js.map +1 -0
- package/dist/chunks/image-DCirAAnr.js +2 -0
- package/dist/chunks/image-DCirAAnr.js.map +1 -0
- package/dist/chunks/image-rXPA3shk.js +8 -0
- package/dist/chunks/image-rXPA3shk.js.map +1 -0
- package/dist/chunks/kbd-BKH_SGCC.js +6 -0
- package/dist/chunks/kbd-BKH_SGCC.js.map +1 -0
- package/dist/chunks/kbd-Bhv8ae1I.js +2 -0
- package/dist/chunks/kbd-Bhv8ae1I.js.map +1 -0
- package/dist/chunks/link-BfHXJGo9.js +2 -0
- package/dist/chunks/link-BfHXJGo9.js.map +1 -0
- package/dist/chunks/link-CE73eHS0.js +49 -0
- package/dist/chunks/link-CE73eHS0.js.map +1 -0
- package/dist/chunks/link.recipe-Ba2by0OG.js +51 -0
- package/dist/chunks/link.recipe-Ba2by0OG.js.map +1 -0
- package/dist/chunks/link.recipe-CG3leGAx.js +2 -0
- package/dist/chunks/link.recipe-CG3leGAx.js.map +1 -0
- package/dist/chunks/list-8yfreyzi.js +2 -0
- package/dist/chunks/list-8yfreyzi.js.map +1 -0
- package/dist/chunks/list-B21joBrq.js +13 -0
- package/dist/chunks/list-B21joBrq.js.map +1 -0
- package/dist/chunks/loading-spinner-AhRrVHKd.js +137 -0
- package/dist/chunks/loading-spinner-AhRrVHKd.js.map +1 -0
- package/dist/chunks/loading-spinner-B2I1CsuC.js +2 -0
- package/dist/chunks/loading-spinner-B2I1CsuC.js.map +1 -0
- package/dist/chunks/make-element-focusable-_kgqlXGc.js +22 -0
- package/dist/chunks/make-element-focusable-_kgqlXGc.js.map +1 -0
- package/dist/chunks/make-element-focusable-ijZC9F3C.js +2 -0
- package/dist/chunks/make-element-focusable-ijZC9F3C.js.map +1 -0
- package/dist/chunks/mergeProps-BeIu4MsM.js +2 -0
- package/dist/chunks/mergeProps-BeIu4MsM.js.map +1 -0
- package/dist/chunks/mergeProps-tCFA9wZ1.js +128 -0
- package/dist/chunks/mergeProps-tCFA9wZ1.js.map +1 -0
- package/dist/chunks/multiline-text-input-C8yclL-x.js +12 -0
- package/dist/chunks/multiline-text-input-C8yclL-x.js.map +1 -0
- package/dist/chunks/multiline-text-input-D6P_NVi6.js +116 -0
- package/dist/chunks/multiline-text-input-D6P_NVi6.js.map +1 -0
- package/dist/chunks/nimbus-provider-CTg-F7UD.js +2 -0
- package/dist/chunks/nimbus-provider-CTg-F7UD.js.map +1 -0
- package/dist/chunks/nimbus-provider-h_Fu03Zk.js +1530 -0
- package/dist/chunks/nimbus-provider-h_Fu03Zk.js.map +1 -0
- package/dist/chunks/number-5qMXmHyn.js +21 -0
- package/dist/chunks/number-5qMXmHyn.js.map +1 -0
- package/dist/chunks/number-CnrRPi4_.js +2 -0
- package/dist/chunks/number-CnrRPi4_.js.map +1 -0
- package/dist/chunks/number-input-BTbzj3aN.js +652 -0
- package/dist/chunks/number-input-BTbzj3aN.js.map +1 -0
- package/dist/chunks/number-input-D7D2ahNb.js +2 -0
- package/dist/chunks/number-input-D7D2ahNb.js.map +1 -0
- package/dist/chunks/number-input.recipe-2n6A2w0m.js +2 -0
- package/dist/chunks/number-input.recipe-2n6A2w0m.js.map +1 -0
- package/dist/chunks/number-input.recipe-8gbsGnLJ.js +209 -0
- package/dist/chunks/number-input.recipe-8gbsGnLJ.js.map +1 -0
- package/dist/chunks/password-input-BD5GZKX7.js +2 -0
- package/dist/chunks/password-input-BD5GZKX7.js.map +1 -0
- package/dist/chunks/password-input-fiypX-6w.js +50 -0
- package/dist/chunks/password-input-fiypX-6w.js.map +1 -0
- package/dist/chunks/radio-input-4v_6tT94.js +319 -0
- package/dist/chunks/radio-input-4v_6tT94.js.map +1 -0
- package/dist/chunks/radio-input-B2IVmel0.js +2 -0
- package/dist/chunks/radio-input-B2IVmel0.js.map +1 -0
- package/dist/chunks/radio-input.recipe-CM9R2ilP.js +75 -0
- package/dist/chunks/radio-input.recipe-CM9R2ilP.js.map +1 -0
- package/dist/chunks/radio-input.recipe-DdXB4lqs.js +2 -0
- package/dist/chunks/radio-input.recipe-DdXB4lqs.js.map +1 -0
- package/dist/chunks/scrollIntoView-B01y55fg.js +2 -0
- package/dist/chunks/scrollIntoView-B01y55fg.js.map +1 -0
- package/dist/chunks/scrollIntoView-CXOsfZIS.js +83 -0
- package/dist/chunks/scrollIntoView-CXOsfZIS.js.map +1 -0
- package/dist/chunks/select-7cuL-dmI.js +2 -0
- package/dist/chunks/select-7cuL-dmI.js.map +1 -0
- package/dist/chunks/select-DH4OUn_y.js +791 -0
- package/dist/chunks/select-DH4OUn_y.js.map +1 -0
- package/dist/chunks/select.recipe-CXWsUldF.js +203 -0
- package/dist/chunks/select.recipe-CXWsUldF.js.map +1 -0
- package/dist/chunks/select.recipe-DUHFWlQt.js +2 -0
- package/dist/chunks/select.recipe-DUHFWlQt.js.map +1 -0
- package/dist/chunks/simple-grid-CFOP9g2P.js +14 -0
- package/dist/chunks/simple-grid-CFOP9g2P.js.map +1 -0
- package/dist/chunks/simple-grid-CHgTayx6.js +2 -0
- package/dist/chunks/simple-grid-CHgTayx6.js.map +1 -0
- package/dist/chunks/stack-__ugxVHD.js +11 -0
- package/dist/chunks/stack-__ugxVHD.js.map +1 -0
- package/dist/chunks/stack-wFUhYQQb.js +2 -0
- package/dist/chunks/stack-wFUhYQQb.js.map +1 -0
- package/dist/chunks/switch-CnbvTSF9.js +2 -0
- package/dist/chunks/switch-CnbvTSF9.js.map +1 -0
- package/dist/chunks/switch-DdmbHa5R.js +78 -0
- package/dist/chunks/switch-DdmbHa5R.js.map +1 -0
- package/dist/chunks/switch.recipe-CWOjEnIy.js +100 -0
- package/dist/chunks/switch.recipe-CWOjEnIy.js.map +1 -0
- package/dist/chunks/switch.recipe-DHopLj_g.js +2 -0
- package/dist/chunks/switch.recipe-DHopLj_g.js.map +1 -0
- package/dist/chunks/tag-group-B6w2MEyf.js +2 -0
- package/dist/chunks/tag-group-B6w2MEyf.js.map +1 -0
- package/dist/chunks/tag-group-CdLfw2gL.js +1347 -0
- package/dist/chunks/tag-group-CdLfw2gL.js.map +1 -0
- package/dist/chunks/text-BjzNgHxv.js +2 -0
- package/dist/chunks/text-BjzNgHxv.js.map +1 -0
- package/dist/chunks/text-MzQiG_1j.js +24 -0
- package/dist/chunks/text-MzQiG_1j.js.map +1 -0
- package/dist/chunks/text-input-CtJ2FHJ3.js +2 -0
- package/dist/chunks/text-input-CtJ2FHJ3.js.map +1 -0
- package/dist/chunks/text-input-SYXEV4sT.js +17 -0
- package/dist/chunks/text-input-SYXEV4sT.js.map +1 -0
- package/dist/chunks/text-input.recipe-DxzvFMOB.js +2 -0
- package/dist/chunks/text-input.recipe-DxzvFMOB.js.map +1 -0
- package/dist/chunks/text-input.recipe-KNoUuq-g.js +64 -0
- package/dist/chunks/text-input.recipe-KNoUuq-g.js.map +1 -0
- package/dist/chunks/time-input-DCJYjKRY.js +129 -0
- package/dist/chunks/time-input-DCJYjKRY.js.map +1 -0
- package/dist/chunks/time-input-sjvN5iZ-.js +2 -0
- package/dist/chunks/time-input-sjvN5iZ-.js.map +1 -0
- package/dist/chunks/toggle-button-group-D-3UQLdL.js +2 -0
- package/dist/chunks/toggle-button-group-D-3UQLdL.js.map +1 -0
- package/dist/chunks/toggle-button-group-bjkXTCxu.js +275 -0
- package/dist/chunks/toggle-button-group-bjkXTCxu.js.map +1 -0
- package/dist/chunks/tooltip-C-K5iatf.js +2 -0
- package/dist/chunks/tooltip-C-K5iatf.js.map +1 -0
- package/dist/chunks/tooltip-DvoZxHgo.js +273 -0
- package/dist/chunks/tooltip-DvoZxHgo.js.map +1 -0
- package/dist/chunks/tooltip.recipe-B9-7OFCi.js +24 -0
- package/dist/chunks/tooltip.recipe-B9-7OFCi.js.map +1 -0
- package/dist/chunks/tooltip.recipe-CkNOA8Sg.js +2 -0
- package/dist/chunks/tooltip.recipe-CkNOA8Sg.js.map +1 -0
- package/dist/chunks/useButton-BZrUUsJ0.js +2 -0
- package/dist/chunks/useButton-BZrUUsJ0.js.map +1 -0
- package/dist/chunks/useButton-C5ATfvOf.js +48 -0
- package/dist/chunks/useButton-C5ATfvOf.js.map +1 -0
- package/dist/chunks/useCollator-BbJYfLGN.js +12 -0
- package/dist/chunks/useCollator-BbJYfLGN.js.map +1 -0
- package/dist/chunks/useCollator-ajK3YU47.js +2 -0
- package/dist/chunks/useCollator-ajK3YU47.js.map +1 -0
- package/dist/chunks/useControlledState-D0L6S_5r.js +2 -0
- package/dist/chunks/useControlledState-D0L6S_5r.js.map +1 -0
- package/dist/chunks/useControlledState-u436Wbp1.js +31 -0
- package/dist/chunks/useControlledState-u436Wbp1.js.map +1 -0
- package/dist/chunks/useDateFormatter-5Oe96jpR.js +1581 -0
- package/dist/chunks/useDateFormatter-5Oe96jpR.js.map +1 -0
- package/dist/chunks/useDateFormatter-6FAMsnNT.js +2 -0
- package/dist/chunks/useDateFormatter-6FAMsnNT.js.map +1 -0
- package/dist/chunks/useEvent-COOhq9E7.js +22 -0
- package/dist/chunks/useEvent-COOhq9E7.js.map +1 -0
- package/dist/chunks/useEvent-DCXRKhH2.js +2 -0
- package/dist/chunks/useEvent-DCXRKhH2.js.map +1 -0
- package/dist/chunks/useField-BY58-2Ft.js +36 -0
- package/dist/chunks/useField-BY58-2Ft.js.map +1 -0
- package/dist/chunks/useField-BeaT9Ud9.js +2 -0
- package/dist/chunks/useField-BeaT9Ud9.js.map +1 -0
- package/dist/chunks/useFocus-C1BtlMbo.js +2 -0
- package/dist/chunks/useFocus-C1BtlMbo.js.map +1 -0
- package/dist/chunks/useFocus-CuXxpIRa.js +176 -0
- package/dist/chunks/useFocus-CuXxpIRa.js.map +1 -0
- package/dist/chunks/useFocusRing-CYHdvund.js +2 -0
- package/dist/chunks/useFocusRing-CYHdvund.js.map +1 -0
- package/dist/chunks/useFocusRing-DNviWqC5.js +34 -0
- package/dist/chunks/useFocusRing-DNviWqC5.js.map +1 -0
- package/dist/chunks/useFocusWithin-AKRo9mz0.js +55 -0
- package/dist/chunks/useFocusWithin-AKRo9mz0.js.map +1 -0
- package/dist/chunks/useFocusWithin-hB6WzPnG.js +2 -0
- package/dist/chunks/useFocusWithin-hB6WzPnG.js.map +1 -0
- package/dist/chunks/useFocusable-DBEQCS1T.js +75 -0
- package/dist/chunks/useFocusable-DBEQCS1T.js.map +1 -0
- package/dist/chunks/useFocusable-DbCayKl8.js +2 -0
- package/dist/chunks/useFocusable-DbCayKl8.js.map +1 -0
- package/dist/chunks/useFormReset-BgCb2h6r.js +21 -0
- package/dist/chunks/useFormReset-BgCb2h6r.js.map +1 -0
- package/dist/chunks/useFormReset-Bt5-6Arg.js +2 -0
- package/dist/chunks/useFormReset-Bt5-6Arg.js.map +1 -0
- package/dist/chunks/useFormValidation-CbunG7dK.js +2 -0
- package/dist/chunks/useFormValidation-CbunG7dK.js.map +1 -0
- package/dist/chunks/useFormValidation-DoG8pVu2.js +179 -0
- package/dist/chunks/useFormValidation-DoG8pVu2.js.map +1 -0
- package/dist/chunks/useHover-3Zee5Ds5.js +85 -0
- package/dist/chunks/useHover-3Zee5Ds5.js.map +1 -0
- package/dist/chunks/useHover-BxTJz4Qm.js +2 -0
- package/dist/chunks/useHover-BxTJz4Qm.js.map +1 -0
- package/dist/chunks/useLabel-As7K6zBZ.js +2 -0
- package/dist/chunks/useLabel-As7K6zBZ.js.map +1 -0
- package/dist/chunks/useLabel-lLz9KH79.js +24 -0
- package/dist/chunks/useLabel-lLz9KH79.js.map +1 -0
- package/dist/chunks/useLabels-B-BeKbzR.js +2 -0
- package/dist/chunks/useLabels-B-BeKbzR.js.map +1 -0
- package/dist/chunks/useLabels-CrNu-inr.js +18 -0
- package/dist/chunks/useLabels-CrNu-inr.js.map +1 -0
- package/dist/chunks/useLocalizedStringFormatter-CDXOVKSV.js +2 -0
- package/dist/chunks/useLocalizedStringFormatter-CDXOVKSV.js.map +1 -0
- package/dist/chunks/useLocalizedStringFormatter-D1iIJE39.js +97 -0
- package/dist/chunks/useLocalizedStringFormatter-D1iIJE39.js.map +1 -0
- package/dist/chunks/useNumberFormatter-C8xwHQXb.js +14 -0
- package/dist/chunks/useNumberFormatter-C8xwHQXb.js.map +1 -0
- package/dist/chunks/useNumberFormatter-DS6s5teN.js +2 -0
- package/dist/chunks/useNumberFormatter-DS6s5teN.js.map +1 -0
- package/dist/chunks/useObjectRef-4v2MxSjQ.js +2 -0
- package/dist/chunks/useObjectRef-4v2MxSjQ.js.map +1 -0
- package/dist/chunks/useObjectRef-CaJ5pgjX.js +30 -0
- package/dist/chunks/useObjectRef-CaJ5pgjX.js.map +1 -0
- package/dist/chunks/usePress-CGAMyl6q.js +8 -0
- package/dist/chunks/usePress-CGAMyl6q.js.map +1 -0
- package/dist/chunks/usePress-Dk0M2Js8.js +526 -0
- package/dist/chunks/usePress-Dk0M2Js8.js.map +1 -0
- package/dist/chunks/useSingleSelectListState--jan8NiD.js +269 -0
- package/dist/chunks/useSingleSelectListState--jan8NiD.js.map +1 -0
- package/dist/chunks/useSingleSelectListState-DqtAmt8K.js +2 -0
- package/dist/chunks/useSingleSelectListState-DqtAmt8K.js.map +1 -0
- package/dist/chunks/useSpinButton-CQ8U5KZS.js +2 -0
- package/dist/chunks/useSpinButton-CQ8U5KZS.js.map +1 -0
- package/dist/chunks/useSpinButton-DQzgsW5H.js +432 -0
- package/dist/chunks/useSpinButton-DQzgsW5H.js.map +1 -0
- package/dist/chunks/useTextField-CNy4kFwI.js +88 -0
- package/dist/chunks/useTextField-CNy4kFwI.js.map +1 -0
- package/dist/chunks/useTextField-Dkkh1L-K.js +2 -0
- package/dist/chunks/useTextField-Dkkh1L-K.js.map +1 -0
- package/dist/chunks/useToggle-BEYjmALQ.js +2 -0
- package/dist/chunks/useToggle-BEYjmALQ.js.map +1 -0
- package/dist/chunks/useToggle-Cf0OB-T-.js +50 -0
- package/dist/chunks/useToggle-Cf0OB-T-.js.map +1 -0
- package/dist/chunks/useToggleState-B5pE_WmM.js +2 -0
- package/dist/chunks/useToggleState-B5pE_WmM.js.map +1 -0
- package/dist/chunks/useToggleState-Bz5rAf4C.js +19 -0
- package/dist/chunks/useToggleState-Bz5rAf4C.js.map +1 -0
- package/dist/chunks/useUpdateEffect-CCDx8D4X.js +14 -0
- package/dist/chunks/useUpdateEffect-CCDx8D4X.js.map +1 -0
- package/dist/chunks/useUpdateEffect-sk3kiVGz.js +2 -0
- package/dist/chunks/useUpdateEffect-sk3kiVGz.js.map +1 -0
- package/dist/chunks/utils-7n9JR4ke.js +128 -0
- package/dist/chunks/utils-7n9JR4ke.js.map +1 -0
- package/dist/chunks/utils-D6ZV0jyp.js +2 -0
- package/dist/chunks/utils-D6ZV0jyp.js.map +1 -0
- package/dist/chunks/utils-DSssdw4e.js +229 -0
- package/dist/chunks/utils-DSssdw4e.js.map +1 -0
- package/dist/chunks/utils-XbOVivul.js +2 -0
- package/dist/chunks/utils-XbOVivul.js.map +1 -0
- package/dist/chunks/visually-hidden-7U4LGJiI.js +11 -0
- package/dist/chunks/visually-hidden-7U4LGJiI.js.map +1 -0
- package/dist/chunks/visually-hidden-CRnniCks.js +2 -0
- package/dist/chunks/visually-hidden-CRnniCks.js.map +1 -0
- package/dist/code.d.ts +10 -0
- package/dist/combobox.d.ts +275 -0
- package/dist/components/accordion.cjs +2 -0
- package/dist/components/accordion.cjs.map +1 -0
- package/dist/components/accordion.es.js +10 -0
- package/dist/components/accordion.es.js.map +1 -0
- package/dist/components/alert.cjs +2 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.es.js +10 -0
- package/dist/components/alert.es.js.map +1 -0
- package/dist/components/avatar.cjs +2 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.es.js +5 -0
- package/dist/components/avatar.es.js.map +1 -0
- package/dist/components/badge.cjs +2 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.es.js +5 -0
- package/dist/components/badge.es.js.map +1 -0
- package/dist/components/box.cjs +2 -0
- package/dist/components/box.cjs.map +1 -0
- package/dist/components/box.es.js +5 -0
- package/dist/components/box.es.js.map +1 -0
- package/dist/components/button.cjs +2 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.es.js +5 -0
- package/dist/components/button.es.js.map +1 -0
- package/dist/components/calendar.cjs +2 -0
- package/dist/components/calendar.cjs.map +1 -0
- package/dist/components/calendar.es.js +5 -0
- package/dist/components/calendar.es.js.map +1 -0
- package/dist/components/card.cjs +2 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.es.js +8 -0
- package/dist/components/card.es.js.map +1 -0
- package/dist/components/checkbox.cjs +2 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.es.js +5 -0
- package/dist/components/checkbox.es.js.map +1 -0
- package/dist/components/code.cjs +2 -0
- package/dist/components/code.cjs.map +1 -0
- package/dist/components/code.es.js +5 -0
- package/dist/components/code.es.js.map +1 -0
- package/dist/components/combobox.cjs +2 -0
- package/dist/components/combobox.cjs.map +1 -0
- package/dist/components/combobox.es.js +8 -0
- package/dist/components/combobox.es.js.map +1 -0
- package/dist/components/components.cjs +2 -0
- package/dist/components/components.cjs.map +1 -0
- package/dist/components/components.es.js +125 -0
- package/dist/components/components.es.js.map +1 -0
- package/dist/components/date-input.cjs +2 -0
- package/dist/components/date-input.cjs.map +1 -0
- package/dist/components/date-input.es.js +5 -0
- package/dist/components/date-input.es.js.map +1 -0
- package/dist/components/date-picker.cjs +2 -0
- package/dist/components/date-picker.cjs.map +1 -0
- package/dist/components/date-picker.es.js +5 -0
- package/dist/components/date-picker.es.js.map +1 -0
- package/dist/components/dialog.cjs +2 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.es.js +5 -0
- package/dist/components/dialog.es.js.map +1 -0
- package/dist/components/flex.cjs +2 -0
- package/dist/components/flex.cjs.map +1 -0
- package/dist/components/flex.es.js +5 -0
- package/dist/components/flex.es.js.map +1 -0
- package/dist/components/form-field.cjs +2 -0
- package/dist/components/form-field.cjs.map +1 -0
- package/dist/components/form-field.es.js +11 -0
- package/dist/components/form-field.es.js.map +1 -0
- package/dist/components/grid.cjs +2 -0
- package/dist/components/grid.cjs.map +1 -0
- package/dist/components/grid.es.js +5 -0
- package/dist/components/grid.es.js.map +1 -0
- package/dist/components/heading.cjs +2 -0
- package/dist/components/heading.cjs.map +1 -0
- package/dist/components/heading.es.js +5 -0
- package/dist/components/heading.es.js.map +1 -0
- package/dist/components/icon-button.cjs +2 -0
- package/dist/components/icon-button.cjs.map +1 -0
- package/dist/components/icon-button.es.js +5 -0
- package/dist/components/icon-button.es.js.map +1 -0
- package/dist/components/icon.cjs +2 -0
- package/dist/components/icon.cjs.map +1 -0
- package/dist/components/icon.es.js +5 -0
- package/dist/components/icon.es.js.map +1 -0
- package/dist/components/image.cjs +2 -0
- package/dist/components/image.cjs.map +1 -0
- package/dist/components/image.es.js +5 -0
- package/dist/components/image.es.js.map +1 -0
- package/dist/components/kbd.cjs +2 -0
- package/dist/components/kbd.cjs.map +1 -0
- package/dist/components/kbd.es.js +5 -0
- package/dist/components/kbd.es.js.map +1 -0
- package/dist/components/link.cjs +2 -0
- package/dist/components/link.cjs.map +1 -0
- package/dist/components/link.es.js +5 -0
- package/dist/components/link.es.js.map +1 -0
- package/dist/components/list.cjs +2 -0
- package/dist/components/list.cjs.map +1 -0
- package/dist/components/list.es.js +8 -0
- package/dist/components/list.es.js.map +1 -0
- package/dist/components/loading-spinner.cjs +2 -0
- package/dist/components/loading-spinner.cjs.map +1 -0
- package/dist/components/loading-spinner.es.js +5 -0
- package/dist/components/loading-spinner.es.js.map +1 -0
- package/dist/components/multiline-text-input.cjs +2 -0
- package/dist/components/multiline-text-input.cjs.map +1 -0
- package/dist/components/multiline-text-input.es.js +5 -0
- package/dist/components/multiline-text-input.es.js.map +1 -0
- package/dist/components/nimbus-provider.cjs +2 -0
- package/dist/components/nimbus-provider.cjs.map +1 -0
- package/dist/components/nimbus-provider.es.js +8 -0
- package/dist/components/nimbus-provider.es.js.map +1 -0
- package/dist/components/number-input.cjs +2 -0
- package/dist/components/number-input.cjs.map +1 -0
- package/dist/components/number-input.es.js +5 -0
- package/dist/components/number-input.es.js.map +1 -0
- package/dist/components/password-input.cjs +2 -0
- package/dist/components/password-input.cjs.map +1 -0
- package/dist/components/password-input.es.js +5 -0
- package/dist/components/password-input.es.js.map +1 -0
- package/dist/components/radio-input.cjs +2 -0
- package/dist/components/radio-input.cjs.map +1 -0
- package/dist/components/radio-input.es.js +7 -0
- package/dist/components/radio-input.es.js.map +1 -0
- package/dist/components/select.cjs +2 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.es.js +9 -0
- package/dist/components/select.es.js.map +1 -0
- package/dist/components/simple-grid.cjs +2 -0
- package/dist/components/simple-grid.cjs.map +1 -0
- package/dist/components/simple-grid.es.js +5 -0
- package/dist/components/simple-grid.es.js.map +1 -0
- package/dist/components/stack.cjs +2 -0
- package/dist/components/stack.cjs.map +1 -0
- package/dist/components/stack.es.js +5 -0
- package/dist/components/stack.es.js.map +1 -0
- package/dist/components/switch.cjs +2 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.es.js +5 -0
- package/dist/components/switch.es.js.map +1 -0
- package/dist/components/table.cjs +2 -0
- package/dist/components/table.cjs.map +1 -0
- package/dist/components/table.es.js +5 -0
- package/dist/components/table.es.js.map +1 -0
- package/dist/components/tag-group.cjs +2 -0
- package/dist/components/tag-group.cjs.map +1 -0
- package/dist/components/tag-group.es.js +5 -0
- package/dist/components/tag-group.es.js.map +1 -0
- package/dist/components/text-input.cjs +2 -0
- package/dist/components/text-input.cjs.map +1 -0
- package/dist/components/text-input.es.js +5 -0
- package/dist/components/text-input.es.js.map +1 -0
- package/dist/components/text.cjs +2 -0
- package/dist/components/text.cjs.map +1 -0
- package/dist/components/text.es.js +5 -0
- package/dist/components/text.es.js.map +1 -0
- package/dist/components/time-input.cjs +2 -0
- package/dist/components/time-input.cjs.map +1 -0
- package/dist/components/time-input.es.js +5 -0
- package/dist/components/time-input.es.js.map +1 -0
- package/dist/components/toggle-button-group.cjs +2 -0
- package/dist/components/toggle-button-group.cjs.map +1 -0
- package/dist/components/toggle-button-group.es.js +7 -0
- package/dist/components/toggle-button-group.es.js.map +1 -0
- package/dist/components/tooltip.cjs +2 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.es.js +9 -0
- package/dist/components/tooltip.es.js.map +1 -0
- package/dist/components/visually-hidden.cjs +2 -0
- package/dist/components/visually-hidden.cjs.map +1 -0
- package/dist/components/visually-hidden.es.js +5 -0
- package/dist/components/visually-hidden.es.js.map +1 -0
- package/dist/components.d.ts +2668 -0
- package/dist/date-input.d.ts +94 -0
- package/dist/date-picker.d.ts +164 -0
- package/dist/dialog.d.ts +33 -0
- package/dist/flex.d.ts +5 -0
- package/dist/form-field.d.ts +131 -0
- package/dist/grid.d.ts +28 -0
- package/dist/heading.d.ts +5 -0
- package/dist/icon-button.d.ts +53 -0
- package/dist/icon.d.ts +99 -0
- package/dist/image.d.ts +18 -0
- package/dist/index.cjs +1 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +934 -748
- package/dist/index.es.js +305 -22047
- package/dist/index.es.js.map +1 -1
- package/dist/kbd.d.ts +10 -0
- package/dist/link.d.ts +92 -0
- package/dist/list.d.ts +21 -0
- package/dist/loading-spinner.d.ts +88 -0
- package/dist/multiline-text-input.d.ts +76 -0
- package/dist/nimbus-provider.d.ts +23 -0
- package/dist/number-input.d.ts +143 -0
- package/dist/password-input.d.ts +74 -0
- package/dist/radio-input.d.ts +70 -0
- package/dist/select.d.ts +143 -0
- package/dist/setup-jsdom-polyfills.cjs +1 -1
- package/dist/setup-jsdom-polyfills.cjs.map +1 -1
- package/dist/setup-jsdom-polyfills.es.js +2 -22
- package/dist/setup-jsdom-polyfills.es.js.map +1 -1
- package/dist/simple-grid.d.ts +28 -0
- package/dist/stack.d.ts +14 -0
- package/dist/switch.d.ts +75 -0
- package/dist/table.d.ts +5 -0
- package/dist/tag-group.d.ts +99 -0
- package/dist/text-input.d.ts +68 -0
- package/dist/text.d.ts +20 -0
- package/dist/time-input.d.ts +102 -0
- package/dist/toggle-button-group.d.ts +107 -0
- package/dist/tooltip.d.ts +134 -0
- package/dist/visually-hidden.d.ts +15 -0
- package/package.json +6 -4
|
@@ -0,0 +1,3004 @@
|
|
|
1
|
+
import m, { useRef as P, version as en, useEffect as Y, useMemo as T, cloneElement as ct, forwardRef as ne, useContext as R, createContext as O, useCallback as J, useState as te, isValidElement as Cl } from "react";
|
|
2
|
+
import { $ as ce, b as ft, c as ht, d as pt, a as oe, e as fe, f as vt, g as El } from "./utils-7n9JR4ke.js";
|
|
3
|
+
import { b as Pl, $ as kl } from "./Hidden-CeBYiBUb.js";
|
|
4
|
+
import { flushSync as Il, createPortal as Fl } from "react-dom";
|
|
5
|
+
import { b as We } from "./useFocusable-DBEQCS1T.js";
|
|
6
|
+
import { $ as yt } from "./SSRProvider-eIEwc-2s.js";
|
|
7
|
+
import { d as Ee, b as ee, $ as W, c as re, a as _e, e as Ml } from "./mergeProps-tCFA9wZ1.js";
|
|
8
|
+
import { $ as bt } from "./Text-DOcU1ycg.js";
|
|
9
|
+
import { a as Pe } from "./Input-0vJb_5Js.js";
|
|
10
|
+
import { $ as Tl, a as Ll, b as Al } from "./Form-DdaqVtM4.js";
|
|
11
|
+
import { a as Rl } from "./TextArea-Q-NI2yW5.js";
|
|
12
|
+
import { $ as se } from "./filterDOMProps-D6KHYVBX.js";
|
|
13
|
+
import { $ as Bl } from "./useTextField-CNy4kFwI.js";
|
|
14
|
+
import { a as Vl, b as Be, i as ke, e as Ie } from "./utils-DSssdw4e.js";
|
|
15
|
+
import { $ as Ol } from "./useLabels-CrNu-inr.js";
|
|
16
|
+
import { $ as he } from "./useObjectRef-CaJ5pgjX.js";
|
|
17
|
+
import { i as gt, o as Nl, d as Fe, g as zl, $ as Ge } from "./useFocus-CuXxpIRa.js";
|
|
18
|
+
import { $ as Ul } from "./useLocalizedStringFormatter-D1iIJE39.js";
|
|
19
|
+
import { $ as $t } from "./useControlledState-u436Wbp1.js";
|
|
20
|
+
import { a as xn, $ as je } from "./getScrollParent-DE66eQI-.js";
|
|
21
|
+
import { $ as mt, a as xt, e as Hl, b as ql } from "./usePress-Dk0M2Js8.js";
|
|
22
|
+
import { $ as St } from "./useHover-3Zee5Ds5.js";
|
|
23
|
+
import { $ as Wl, b as _l, a as Ye } from "./scrollIntoView-CXOsfZIS.js";
|
|
24
|
+
import { $ as Me } from "./focusSafely-DKDcdc1Z.js";
|
|
25
|
+
import { $ as Gl } from "./useFocusWithin-AKRo9mz0.js";
|
|
26
|
+
import { $ as jl } from "./useLabel-lLz9KH79.js";
|
|
27
|
+
import { $ as ae } from "./useEvent-COOhq9E7.js";
|
|
28
|
+
import { a as Yl, c as Jl } from "./FocusScope-CsXy0kJw.js";
|
|
29
|
+
import { $ as Kt } from "./context-CI0Y3O6x.js";
|
|
30
|
+
import { $ as Dt } from "./useCollator-BbJYfLGN.js";
|
|
31
|
+
import { $ as Xl } from "./useFocusRing-DNviWqC5.js";
|
|
32
|
+
function Je(n, e) {
|
|
33
|
+
const t = P(!0), l = P(null);
|
|
34
|
+
Ee(() => (t.current = !0, () => {
|
|
35
|
+
t.current = !1;
|
|
36
|
+
}), []), Ee(() => {
|
|
37
|
+
t.current ? t.current = !1 : (!l.current || e.some((i, o) => !Object.is(i, l[o]))) && n(), l.current = e;
|
|
38
|
+
}, e);
|
|
39
|
+
}
|
|
40
|
+
const wt = "react-aria-clear-focus", Te = "react-aria-focus";
|
|
41
|
+
function Q(n) {
|
|
42
|
+
return gt() ? n.metaKey : n.ctrlKey;
|
|
43
|
+
}
|
|
44
|
+
const Zl = 500;
|
|
45
|
+
function Ql(n) {
|
|
46
|
+
let { isDisabled: e, onLongPressStart: t, onLongPressEnd: l, onLongPress: i, threshold: o = Zl, accessibilityDescription: r } = n;
|
|
47
|
+
const s = P(void 0);
|
|
48
|
+
let { addGlobalListener: a, removeGlobalListener: c } = Vl(), { pressProps: v } = mt({
|
|
49
|
+
isDisabled: e,
|
|
50
|
+
onPressStart(d) {
|
|
51
|
+
if (d.continuePropagation(), (d.pointerType === "mouse" || d.pointerType === "touch") && (t && t({
|
|
52
|
+
...d,
|
|
53
|
+
type: "longpressstart"
|
|
54
|
+
}), s.current = setTimeout(() => {
|
|
55
|
+
d.target.dispatchEvent(new PointerEvent("pointercancel", {
|
|
56
|
+
bubbles: !0
|
|
57
|
+
})), Be(d.target).activeElement !== d.target && ke(d.target), i && i({
|
|
58
|
+
...d,
|
|
59
|
+
type: "longpress"
|
|
60
|
+
}), s.current = void 0;
|
|
61
|
+
}, o), d.pointerType === "touch")) {
|
|
62
|
+
let y = (b) => {
|
|
63
|
+
b.preventDefault();
|
|
64
|
+
};
|
|
65
|
+
a(d.target, "contextmenu", y, {
|
|
66
|
+
once: !0
|
|
67
|
+
}), a(window, "pointerup", () => {
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
c(d.target, "contextmenu", y);
|
|
70
|
+
}, 30);
|
|
71
|
+
}, {
|
|
72
|
+
once: !0
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
onPressEnd(d) {
|
|
77
|
+
s.current && clearTimeout(s.current), l && (d.pointerType === "mouse" || d.pointerType === "touch") && l({
|
|
78
|
+
...d,
|
|
79
|
+
type: "longpressend"
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}), h = Wl(i && !e ? r : void 0);
|
|
83
|
+
return {
|
|
84
|
+
longPressProps: W(v, h)
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function Ve(n) {
|
|
88
|
+
let e = ei(Be(n));
|
|
89
|
+
e !== n && (e && Le(e, n), n && Ct(n, e));
|
|
90
|
+
}
|
|
91
|
+
function Le(n, e) {
|
|
92
|
+
n.dispatchEvent(new FocusEvent("blur", {
|
|
93
|
+
relatedTarget: e
|
|
94
|
+
})), n.dispatchEvent(new FocusEvent("focusout", {
|
|
95
|
+
bubbles: !0,
|
|
96
|
+
relatedTarget: e
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
function Ct(n, e) {
|
|
100
|
+
n.dispatchEvent(new FocusEvent("focus", {
|
|
101
|
+
relatedTarget: e
|
|
102
|
+
})), n.dispatchEvent(new FocusEvent("focusin", {
|
|
103
|
+
bubbles: !0,
|
|
104
|
+
relatedTarget: e
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
function ei(n) {
|
|
108
|
+
let e = Ie(n), t = e == null ? void 0 : e.getAttribute("aria-activedescendant");
|
|
109
|
+
return t && n.getElementById(t) || e;
|
|
110
|
+
}
|
|
111
|
+
const Oe = /* @__PURE__ */ new WeakMap();
|
|
112
|
+
function ti(n) {
|
|
113
|
+
return typeof n == "string" ? n.replace(/\s*/g, "") : "" + n;
|
|
114
|
+
}
|
|
115
|
+
function li(n, e) {
|
|
116
|
+
let t = Oe.get(n);
|
|
117
|
+
if (!t) throw new Error("Unknown list");
|
|
118
|
+
return `${t.id}-option-${ti(e)}`;
|
|
119
|
+
}
|
|
120
|
+
function Ae(n) {
|
|
121
|
+
return Nl() ? n.altKey : n.ctrlKey;
|
|
122
|
+
}
|
|
123
|
+
function de(n, e) {
|
|
124
|
+
var t, l;
|
|
125
|
+
let i = `[data-key="${CSS.escape(String(e))}"]`, o = (t = n.current) === null || t === void 0 ? void 0 : t.dataset.collection;
|
|
126
|
+
return o && (i = `[data-collection="${CSS.escape(o)}"]${i}`), (l = n.current) === null || l === void 0 ? void 0 : l.querySelector(i);
|
|
127
|
+
}
|
|
128
|
+
const Et = /* @__PURE__ */ new WeakMap();
|
|
129
|
+
function ii(n) {
|
|
130
|
+
let e = re();
|
|
131
|
+
return Et.set(n, e), e;
|
|
132
|
+
}
|
|
133
|
+
function ni(n) {
|
|
134
|
+
return Et.get(n);
|
|
135
|
+
}
|
|
136
|
+
const oi = 1e3;
|
|
137
|
+
function ri(n) {
|
|
138
|
+
let { keyboardDelegate: e, selectionManager: t, onTypeSelect: l } = n, i = P({
|
|
139
|
+
search: "",
|
|
140
|
+
timeout: void 0
|
|
141
|
+
}).current, o = (r) => {
|
|
142
|
+
let s = si(r.key);
|
|
143
|
+
if (!(!s || r.ctrlKey || r.metaKey || !r.currentTarget.contains(r.target))) {
|
|
144
|
+
if (s === " " && i.search.trim().length > 0 && (r.preventDefault(), "continuePropagation" in r || r.stopPropagation()), i.search += s, e.getKeyForSearch != null) {
|
|
145
|
+
let a = e.getKeyForSearch(i.search, t.focusedKey);
|
|
146
|
+
a == null && (a = e.getKeyForSearch(i.search)), a != null && (t.setFocusedKey(a), l && l(a));
|
|
147
|
+
}
|
|
148
|
+
clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
|
149
|
+
i.search = "";
|
|
150
|
+
}, oi);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
return {
|
|
154
|
+
typeSelectProps: {
|
|
155
|
+
// Using a capturing listener to catch the keydown event before
|
|
156
|
+
// other hooks in order to handle the Spacebar event.
|
|
157
|
+
onKeyDownCapture: e.getKeyForSearch ? o : void 0
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function si(n) {
|
|
162
|
+
return n.length === 1 || !/^[A-Z]/i.test(n) ? n : "";
|
|
163
|
+
}
|
|
164
|
+
function ai(n) {
|
|
165
|
+
let { selectionManager: e, keyboardDelegate: t, ref: l, autoFocus: i = !1, shouldFocusWrap: o = !1, disallowEmptySelection: r = !1, disallowSelectAll: s = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: c = e.selectionBehavior === "replace", disallowTypeAhead: v = !1, shouldUseVirtualFocus: h, allowsTabNavigation: d = !1, isVirtualized: y, scrollRef: b = l, linkBehavior: x = "action" } = n, { direction: g } = Kt(), $ = xt(), S = (f) => {
|
|
166
|
+
var u;
|
|
167
|
+
if (f.altKey && f.key === "Tab" && f.preventDefault(), !(!((u = l.current) === null || u === void 0) && u.contains(f.target))) return;
|
|
168
|
+
const E = (D, X) => {
|
|
169
|
+
if (D != null) {
|
|
170
|
+
if (e.isLink(D) && x === "selection" && c && !Ae(f)) {
|
|
171
|
+
Il(() => {
|
|
172
|
+
e.setFocusedKey(D, X);
|
|
173
|
+
});
|
|
174
|
+
let Z = de(l, D), qe = e.getItemProps(D);
|
|
175
|
+
Z && $.open(Z, f, qe.href, qe.routerOptions);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (e.setFocusedKey(D, X), e.isLink(D) && x === "override") return;
|
|
179
|
+
f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(D) : c && !Ae(f) && e.replaceSelection(D);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
switch (f.key) {
|
|
183
|
+
case "ArrowDown":
|
|
184
|
+
if (t.getKeyBelow) {
|
|
185
|
+
var L, N, z;
|
|
186
|
+
let D = e.focusedKey != null ? (L = t.getKeyBelow) === null || L === void 0 ? void 0 : L.call(t, e.focusedKey) : (N = t.getFirstKey) === null || N === void 0 ? void 0 : N.call(t);
|
|
187
|
+
D == null && o && (D = (z = t.getFirstKey) === null || z === void 0 ? void 0 : z.call(t, e.focusedKey)), D != null && (f.preventDefault(), E(D));
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
case "ArrowUp":
|
|
191
|
+
if (t.getKeyAbove) {
|
|
192
|
+
var q, _, ye;
|
|
193
|
+
let D = e.focusedKey != null ? (q = t.getKeyAbove) === null || q === void 0 ? void 0 : q.call(t, e.focusedKey) : (_ = t.getLastKey) === null || _ === void 0 ? void 0 : _.call(t);
|
|
194
|
+
D == null && o && (D = (ye = t.getLastKey) === null || ye === void 0 ? void 0 : ye.call(t, e.focusedKey)), D != null && (f.preventDefault(), E(D));
|
|
195
|
+
}
|
|
196
|
+
break;
|
|
197
|
+
case "ArrowLeft":
|
|
198
|
+
if (t.getKeyLeftOf) {
|
|
199
|
+
var be, ge, $e;
|
|
200
|
+
let D = e.focusedKey != null ? (be = t.getKeyLeftOf) === null || be === void 0 ? void 0 : be.call(t, e.focusedKey) : null;
|
|
201
|
+
D == null && o && (D = g === "rtl" ? (ge = t.getFirstKey) === null || ge === void 0 ? void 0 : ge.call(t, e.focusedKey) : ($e = t.getLastKey) === null || $e === void 0 ? void 0 : $e.call(t, e.focusedKey)), D != null && (f.preventDefault(), E(D, g === "rtl" ? "first" : "last"));
|
|
202
|
+
}
|
|
203
|
+
break;
|
|
204
|
+
case "ArrowRight":
|
|
205
|
+
if (t.getKeyRightOf) {
|
|
206
|
+
var me, xe, Se;
|
|
207
|
+
let D = e.focusedKey != null ? (me = t.getKeyRightOf) === null || me === void 0 ? void 0 : me.call(t, e.focusedKey) : null;
|
|
208
|
+
D == null && o && (D = g === "rtl" ? (xe = t.getLastKey) === null || xe === void 0 ? void 0 : xe.call(t, e.focusedKey) : (Se = t.getFirstKey) === null || Se === void 0 ? void 0 : Se.call(t, e.focusedKey)), D != null && (f.preventDefault(), E(D, g === "rtl" ? "last" : "first"));
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
case "Home":
|
|
212
|
+
if (t.getFirstKey) {
|
|
213
|
+
if (e.focusedKey === null && f.shiftKey) return;
|
|
214
|
+
f.preventDefault();
|
|
215
|
+
let D = t.getFirstKey(e.focusedKey, Q(f));
|
|
216
|
+
e.setFocusedKey(D), D != null && (Q(f) && f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(D) : c && e.replaceSelection(D));
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
case "End":
|
|
220
|
+
if (t.getLastKey) {
|
|
221
|
+
if (e.focusedKey === null && f.shiftKey) return;
|
|
222
|
+
f.preventDefault();
|
|
223
|
+
let D = t.getLastKey(e.focusedKey, Q(f));
|
|
224
|
+
e.setFocusedKey(D), D != null && (Q(f) && f.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(D) : c && e.replaceSelection(D));
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
case "PageDown":
|
|
228
|
+
if (t.getKeyPageBelow && e.focusedKey != null) {
|
|
229
|
+
let D = t.getKeyPageBelow(e.focusedKey);
|
|
230
|
+
D != null && (f.preventDefault(), E(D));
|
|
231
|
+
}
|
|
232
|
+
break;
|
|
233
|
+
case "PageUp":
|
|
234
|
+
if (t.getKeyPageAbove && e.focusedKey != null) {
|
|
235
|
+
let D = t.getKeyPageAbove(e.focusedKey);
|
|
236
|
+
D != null && (f.preventDefault(), E(D));
|
|
237
|
+
}
|
|
238
|
+
break;
|
|
239
|
+
case "a":
|
|
240
|
+
Q(f) && e.selectionMode === "multiple" && s !== !0 && (f.preventDefault(), e.selectAll());
|
|
241
|
+
break;
|
|
242
|
+
case "Escape":
|
|
243
|
+
a === "clearSelection" && !r && e.selectedKeys.size !== 0 && (f.stopPropagation(), f.preventDefault(), e.clearSelection());
|
|
244
|
+
break;
|
|
245
|
+
case "Tab":
|
|
246
|
+
if (!d) {
|
|
247
|
+
if (f.shiftKey) l.current.focus();
|
|
248
|
+
else {
|
|
249
|
+
let D = Yl(l.current, {
|
|
250
|
+
tabbable: !0
|
|
251
|
+
}), X, Z;
|
|
252
|
+
do
|
|
253
|
+
Z = D.lastChild(), Z && (X = Z);
|
|
254
|
+
while (Z);
|
|
255
|
+
X && !X.contains(document.activeElement) && ke(X);
|
|
256
|
+
}
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}, w = P({
|
|
261
|
+
top: 0,
|
|
262
|
+
left: 0
|
|
263
|
+
});
|
|
264
|
+
ae(b, "scroll", y ? void 0 : () => {
|
|
265
|
+
var f, u, E, L;
|
|
266
|
+
w.current = {
|
|
267
|
+
top: (E = (f = b.current) === null || f === void 0 ? void 0 : f.scrollTop) !== null && E !== void 0 ? E : 0,
|
|
268
|
+
left: (L = (u = b.current) === null || u === void 0 ? void 0 : u.scrollLeft) !== null && L !== void 0 ? L : 0
|
|
269
|
+
};
|
|
270
|
+
});
|
|
271
|
+
let k = (f) => {
|
|
272
|
+
if (e.isFocused) {
|
|
273
|
+
f.currentTarget.contains(f.target) || e.setFocused(!1);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (f.currentTarget.contains(f.target)) {
|
|
277
|
+
if (e.setFocused(!0), e.focusedKey == null) {
|
|
278
|
+
var u, E;
|
|
279
|
+
let z = (_) => {
|
|
280
|
+
_ != null && (e.setFocusedKey(_), c && !e.isSelected(_) && e.replaceSelection(_));
|
|
281
|
+
}, q = f.relatedTarget;
|
|
282
|
+
var L, N;
|
|
283
|
+
q && f.currentTarget.compareDocumentPosition(q) & Node.DOCUMENT_POSITION_FOLLOWING ? z((L = e.lastSelectedKey) !== null && L !== void 0 ? L : (u = t.getLastKey) === null || u === void 0 ? void 0 : u.call(t)) : z((N = e.firstSelectedKey) !== null && N !== void 0 ? N : (E = t.getFirstKey) === null || E === void 0 ? void 0 : E.call(t));
|
|
284
|
+
} else !y && b.current && (b.current.scrollTop = w.current.top, b.current.scrollLeft = w.current.left);
|
|
285
|
+
if (e.focusedKey != null && b.current) {
|
|
286
|
+
let z = de(l, e.focusedKey);
|
|
287
|
+
z instanceof HTMLElement && (!z.contains(document.activeElement) && !h && ke(z), Fe() === "keyboard" && Ye(z, {
|
|
288
|
+
containingElement: l.current
|
|
289
|
+
}));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}, F = (f) => {
|
|
293
|
+
f.currentTarget.contains(f.relatedTarget) || e.setFocused(!1);
|
|
294
|
+
}, C = P(!1);
|
|
295
|
+
ae(l, Te, h ? (f) => {
|
|
296
|
+
let { detail: u } = f;
|
|
297
|
+
f.stopPropagation(), e.setFocused(!0), (u == null ? void 0 : u.focusStrategy) === "first" && (C.current = !0);
|
|
298
|
+
} : void 0);
|
|
299
|
+
let A = ee(() => {
|
|
300
|
+
var f, u;
|
|
301
|
+
let E = (u = (f = t.getFirstKey) === null || f === void 0 ? void 0 : f.call(t)) !== null && u !== void 0 ? u : null;
|
|
302
|
+
E == null ? (Ve(l.current), e.collection.size > 0 && (C.current = !1)) : (e.setFocusedKey(E), C.current = !1);
|
|
303
|
+
});
|
|
304
|
+
Je(() => {
|
|
305
|
+
C.current && A();
|
|
306
|
+
}, [
|
|
307
|
+
e.collection,
|
|
308
|
+
A
|
|
309
|
+
]);
|
|
310
|
+
let M = ee(() => {
|
|
311
|
+
e.collection.size > 0 && (C.current = !1);
|
|
312
|
+
});
|
|
313
|
+
Je(() => {
|
|
314
|
+
M();
|
|
315
|
+
}, [
|
|
316
|
+
e.focusedKey,
|
|
317
|
+
M
|
|
318
|
+
]), ae(l, wt, h ? (f) => {
|
|
319
|
+
var u;
|
|
320
|
+
f.stopPropagation(), e.setFocused(!1), !((u = f.detail) === null || u === void 0) && u.clearFocusKey && e.setFocusedKey(null);
|
|
321
|
+
} : void 0);
|
|
322
|
+
const G = P(i), B = P(!1);
|
|
323
|
+
Y(() => {
|
|
324
|
+
if (G.current) {
|
|
325
|
+
var f, u;
|
|
326
|
+
let N = null;
|
|
327
|
+
var E;
|
|
328
|
+
i === "first" && (N = (E = (f = t.getFirstKey) === null || f === void 0 ? void 0 : f.call(t)) !== null && E !== void 0 ? E : null);
|
|
329
|
+
var L;
|
|
330
|
+
i === "last" && (N = (L = (u = t.getLastKey) === null || u === void 0 ? void 0 : u.call(t)) !== null && L !== void 0 ? L : null);
|
|
331
|
+
let z = e.selectedKeys;
|
|
332
|
+
if (z.size) {
|
|
333
|
+
for (let q of z) if (e.canSelectItem(q)) {
|
|
334
|
+
N = q;
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
e.setFocused(!0), e.setFocusedKey(N), N == null && !h && l.current && Me(l.current), e.collection.size > 0 && (G.current = !1, B.current = !0);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
let p = P(e.focusedKey), K = P(null);
|
|
342
|
+
Y(() => {
|
|
343
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== p.current || B.current) && b.current && l.current) {
|
|
344
|
+
let f = Fe(), u = de(l, e.focusedKey);
|
|
345
|
+
if (!(u instanceof HTMLElement))
|
|
346
|
+
return;
|
|
347
|
+
(f === "keyboard" || B.current) && (K.current && cancelAnimationFrame(K.current), K.current = requestAnimationFrame(() => {
|
|
348
|
+
b.current && (_l(b.current, u), f !== "virtual" && Ye(u, {
|
|
349
|
+
containingElement: l.current
|
|
350
|
+
}));
|
|
351
|
+
}));
|
|
352
|
+
}
|
|
353
|
+
!h && e.isFocused && e.focusedKey == null && p.current != null && l.current && Me(l.current), p.current = e.focusedKey, B.current = !1;
|
|
354
|
+
}), Y(() => () => {
|
|
355
|
+
K.current && cancelAnimationFrame(K.current);
|
|
356
|
+
}, []), ae(l, "react-aria-focus-scope-restore", (f) => {
|
|
357
|
+
f.preventDefault(), e.setFocused(!0);
|
|
358
|
+
});
|
|
359
|
+
let I = {
|
|
360
|
+
onKeyDown: S,
|
|
361
|
+
onFocus: k,
|
|
362
|
+
onBlur: F,
|
|
363
|
+
onMouseDown(f) {
|
|
364
|
+
b.current === f.target && f.preventDefault();
|
|
365
|
+
}
|
|
366
|
+
}, { typeSelectProps: V } = ri({
|
|
367
|
+
keyboardDelegate: t,
|
|
368
|
+
selectionManager: e
|
|
369
|
+
});
|
|
370
|
+
v || (I = W(V, I));
|
|
371
|
+
let U;
|
|
372
|
+
h || (U = e.focusedKey == null ? 0 : -1);
|
|
373
|
+
let H = ii(e.collection);
|
|
374
|
+
return {
|
|
375
|
+
collectionProps: W(I, {
|
|
376
|
+
tabIndex: U,
|
|
377
|
+
"data-collection": H
|
|
378
|
+
})
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
function ui(n) {
|
|
382
|
+
let { id: e, selectionManager: t, key: l, ref: i, shouldSelectOnPressUp: o, shouldUseVirtualFocus: r, focus: s, isDisabled: a, onAction: c, allowsDifferentPressOrigin: v, linkBehavior: h = "action" } = n, d = xt();
|
|
383
|
+
e = re(e);
|
|
384
|
+
let y = (u) => {
|
|
385
|
+
if (u.pointerType === "keyboard" && Ae(u)) t.toggleSelection(l);
|
|
386
|
+
else {
|
|
387
|
+
if (t.selectionMode === "none") return;
|
|
388
|
+
if (t.isLink(l)) {
|
|
389
|
+
if (h === "selection" && i.current) {
|
|
390
|
+
let E = t.getItemProps(l);
|
|
391
|
+
d.open(i.current, u, E.href, E.routerOptions), t.setSelectedKeys(t.selectedKeys);
|
|
392
|
+
return;
|
|
393
|
+
} else if (h === "override" || h === "none") return;
|
|
394
|
+
}
|
|
395
|
+
t.selectionMode === "single" ? t.isSelected(l) && !t.disallowEmptySelection ? t.toggleSelection(l) : t.replaceSelection(l) : u && u.shiftKey ? t.extendSelection(l) : t.selectionBehavior === "toggle" || u && (Q(u) || u.pointerType === "touch" || u.pointerType === "virtual") ? t.toggleSelection(l) : t.replaceSelection(l);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
Y(() => {
|
|
399
|
+
l === t.focusedKey && t.isFocused && (r ? Ve(i.current) : s ? s() : document.activeElement !== i.current && i.current && Me(i.current));
|
|
400
|
+
}, [
|
|
401
|
+
i,
|
|
402
|
+
l,
|
|
403
|
+
t.focusedKey,
|
|
404
|
+
t.childFocusStrategy,
|
|
405
|
+
t.isFocused,
|
|
406
|
+
r
|
|
407
|
+
]), a = a || t.isDisabled(l);
|
|
408
|
+
let b = {};
|
|
409
|
+
!r && !a ? b = {
|
|
410
|
+
tabIndex: l === t.focusedKey ? 0 : -1,
|
|
411
|
+
onFocus(u) {
|
|
412
|
+
u.target === i.current && t.setFocusedKey(l);
|
|
413
|
+
}
|
|
414
|
+
} : a && (b.onMouseDown = (u) => {
|
|
415
|
+
u.preventDefault();
|
|
416
|
+
});
|
|
417
|
+
let x = t.isLink(l) && h === "override", g = t.isLink(l) && h !== "selection" && h !== "none", $ = !a && t.canSelectItem(l) && !x, S = (c || g) && !a, w = S && (t.selectionBehavior === "replace" ? !$ : !$ || t.isEmpty), k = S && $ && t.selectionBehavior === "replace", F = w || k, C = P(null), A = F && $, M = P(!1), G = P(!1), B = (u) => {
|
|
418
|
+
if (c && c(), g && i.current) {
|
|
419
|
+
let E = t.getItemProps(l);
|
|
420
|
+
d.open(i.current, u, E.href, E.routerOptions);
|
|
421
|
+
}
|
|
422
|
+
}, p = {
|
|
423
|
+
ref: i
|
|
424
|
+
};
|
|
425
|
+
o ? (p.onPressStart = (u) => {
|
|
426
|
+
C.current = u.pointerType, M.current = A, u.pointerType === "keyboard" && (!F || Ze()) && y(u);
|
|
427
|
+
}, v ? (p.onPressUp = w ? void 0 : (u) => {
|
|
428
|
+
u.pointerType === "mouse" && $ && y(u);
|
|
429
|
+
}, p.onPress = w ? B : (u) => {
|
|
430
|
+
u.pointerType !== "keyboard" && u.pointerType !== "mouse" && $ && y(u);
|
|
431
|
+
}) : p.onPress = (u) => {
|
|
432
|
+
if (w || k && u.pointerType !== "mouse") {
|
|
433
|
+
if (u.pointerType === "keyboard" && !Xe()) return;
|
|
434
|
+
B(u);
|
|
435
|
+
} else u.pointerType !== "keyboard" && $ && y(u);
|
|
436
|
+
}) : (p.onPressStart = (u) => {
|
|
437
|
+
C.current = u.pointerType, M.current = A, G.current = w, $ && (u.pointerType === "mouse" && !w || u.pointerType === "keyboard" && (!S || Ze())) && y(u);
|
|
438
|
+
}, p.onPress = (u) => {
|
|
439
|
+
(u.pointerType === "touch" || u.pointerType === "pen" || u.pointerType === "virtual" || u.pointerType === "keyboard" && F && Xe() || u.pointerType === "mouse" && G.current) && (F ? B(u) : $ && y(u));
|
|
440
|
+
}), b["data-collection"] = ni(t.collection), b["data-key"] = l, p.preventFocusOnPress = r, r && (p = W(p, {
|
|
441
|
+
onPressStart(u) {
|
|
442
|
+
u.pointerType !== "touch" && (t.setFocused(!0), t.setFocusedKey(l));
|
|
443
|
+
},
|
|
444
|
+
onPress(u) {
|
|
445
|
+
u.pointerType === "touch" && (t.setFocused(!0), t.setFocusedKey(l));
|
|
446
|
+
}
|
|
447
|
+
}));
|
|
448
|
+
let { pressProps: K, isPressed: I } = mt(p), V = k ? (u) => {
|
|
449
|
+
C.current === "mouse" && (u.stopPropagation(), u.preventDefault(), B(u));
|
|
450
|
+
} : void 0, { longPressProps: U } = Ql({
|
|
451
|
+
isDisabled: !A,
|
|
452
|
+
onLongPress(u) {
|
|
453
|
+
u.pointerType === "touch" && (y(u), t.setSelectionBehavior("toggle"));
|
|
454
|
+
}
|
|
455
|
+
}), H = (u) => {
|
|
456
|
+
C.current === "touch" && M.current && u.preventDefault();
|
|
457
|
+
}, f = t.isLink(l) ? (u) => {
|
|
458
|
+
Hl.isOpening || u.preventDefault();
|
|
459
|
+
} : void 0;
|
|
460
|
+
return {
|
|
461
|
+
itemProps: W(
|
|
462
|
+
b,
|
|
463
|
+
$ || w || r && !a ? K : {},
|
|
464
|
+
A ? U : {},
|
|
465
|
+
{
|
|
466
|
+
onDoubleClick: V,
|
|
467
|
+
onDragStartCapture: H,
|
|
468
|
+
onClick: f,
|
|
469
|
+
id: e
|
|
470
|
+
},
|
|
471
|
+
// Prevent DOM focus from moving on mouse down when using virtual focus
|
|
472
|
+
r ? {
|
|
473
|
+
onMouseDown: (u) => u.preventDefault()
|
|
474
|
+
} : void 0
|
|
475
|
+
),
|
|
476
|
+
isPressed: I,
|
|
477
|
+
isSelected: t.isSelected(l),
|
|
478
|
+
isFocused: t.isFocused && t.focusedKey === l,
|
|
479
|
+
isDisabled: a,
|
|
480
|
+
allowsSelection: $,
|
|
481
|
+
hasAction: F
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
function Xe() {
|
|
485
|
+
let n = window.event;
|
|
486
|
+
return (n == null ? void 0 : n.key) === "Enter";
|
|
487
|
+
}
|
|
488
|
+
function Ze() {
|
|
489
|
+
let n = window.event;
|
|
490
|
+
return (n == null ? void 0 : n.key) === " " || (n == null ? void 0 : n.code) === "Space";
|
|
491
|
+
}
|
|
492
|
+
class Qe {
|
|
493
|
+
getItemRect(e) {
|
|
494
|
+
let t = this.ref.current;
|
|
495
|
+
if (!t) return null;
|
|
496
|
+
let l = e != null ? de(this.ref, e) : null;
|
|
497
|
+
if (!l) return null;
|
|
498
|
+
let i = t.getBoundingClientRect(), o = l.getBoundingClientRect();
|
|
499
|
+
return {
|
|
500
|
+
x: o.left - i.left + t.scrollLeft,
|
|
501
|
+
y: o.top - i.top + t.scrollTop,
|
|
502
|
+
width: o.width,
|
|
503
|
+
height: o.height
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
getContentSize() {
|
|
507
|
+
let e = this.ref.current;
|
|
508
|
+
var t, l;
|
|
509
|
+
return {
|
|
510
|
+
width: (t = e == null ? void 0 : e.scrollWidth) !== null && t !== void 0 ? t : 0,
|
|
511
|
+
height: (l = e == null ? void 0 : e.scrollHeight) !== null && l !== void 0 ? l : 0
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
getVisibleRect() {
|
|
515
|
+
let e = this.ref.current;
|
|
516
|
+
var t, l, i, o;
|
|
517
|
+
return {
|
|
518
|
+
x: (t = e == null ? void 0 : e.scrollLeft) !== null && t !== void 0 ? t : 0,
|
|
519
|
+
y: (l = e == null ? void 0 : e.scrollTop) !== null && l !== void 0 ? l : 0,
|
|
520
|
+
width: (i = e == null ? void 0 : e.offsetWidth) !== null && i !== void 0 ? i : 0,
|
|
521
|
+
height: (o = e == null ? void 0 : e.offsetHeight) !== null && o !== void 0 ? o : 0
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
constructor(e) {
|
|
525
|
+
this.ref = e;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
class Pt {
|
|
529
|
+
isDisabled(e) {
|
|
530
|
+
var t;
|
|
531
|
+
return this.disabledBehavior === "all" && (((t = e.props) === null || t === void 0 ? void 0 : t.isDisabled) || this.disabledKeys.has(e.key));
|
|
532
|
+
}
|
|
533
|
+
findNextNonDisabled(e, t) {
|
|
534
|
+
let l = e;
|
|
535
|
+
for (; l != null; ) {
|
|
536
|
+
let i = this.collection.getItem(l);
|
|
537
|
+
if ((i == null ? void 0 : i.type) === "item" && !this.isDisabled(i)) return l;
|
|
538
|
+
l = t(l);
|
|
539
|
+
}
|
|
540
|
+
return null;
|
|
541
|
+
}
|
|
542
|
+
getNextKey(e) {
|
|
543
|
+
let t = e;
|
|
544
|
+
return t = this.collection.getKeyAfter(t), this.findNextNonDisabled(t, (l) => this.collection.getKeyAfter(l));
|
|
545
|
+
}
|
|
546
|
+
getPreviousKey(e) {
|
|
547
|
+
let t = e;
|
|
548
|
+
return t = this.collection.getKeyBefore(t), this.findNextNonDisabled(t, (l) => this.collection.getKeyBefore(l));
|
|
549
|
+
}
|
|
550
|
+
findKey(e, t, l) {
|
|
551
|
+
let i = e, o = this.layoutDelegate.getItemRect(i);
|
|
552
|
+
if (!o || i == null) return null;
|
|
553
|
+
let r = o;
|
|
554
|
+
do {
|
|
555
|
+
if (i = t(i), i == null) break;
|
|
556
|
+
o = this.layoutDelegate.getItemRect(i);
|
|
557
|
+
} while (o && l(r, o) && i != null);
|
|
558
|
+
return i;
|
|
559
|
+
}
|
|
560
|
+
isSameRow(e, t) {
|
|
561
|
+
return e.y === t.y || e.x !== t.x;
|
|
562
|
+
}
|
|
563
|
+
isSameColumn(e, t) {
|
|
564
|
+
return e.x === t.x || e.y !== t.y;
|
|
565
|
+
}
|
|
566
|
+
getKeyBelow(e) {
|
|
567
|
+
return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(e, (t) => this.getNextKey(t), this.isSameRow) : this.getNextKey(e);
|
|
568
|
+
}
|
|
569
|
+
getKeyAbove(e) {
|
|
570
|
+
return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(e, (t) => this.getPreviousKey(t), this.isSameRow) : this.getPreviousKey(e);
|
|
571
|
+
}
|
|
572
|
+
getNextColumn(e, t) {
|
|
573
|
+
return t ? this.getPreviousKey(e) : this.getNextKey(e);
|
|
574
|
+
}
|
|
575
|
+
getKeyRightOf(e) {
|
|
576
|
+
let t = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
|
|
577
|
+
return this.layoutDelegate[t] ? (e = this.layoutDelegate[t](e), this.findNextNonDisabled(e, (l) => this.layoutDelegate[t](l))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(e, this.direction === "rtl") : this.findKey(e, (l) => this.getNextColumn(l, this.direction === "rtl"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(e, this.direction === "rtl") : null;
|
|
578
|
+
}
|
|
579
|
+
getKeyLeftOf(e) {
|
|
580
|
+
let t = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
|
|
581
|
+
return this.layoutDelegate[t] ? (e = this.layoutDelegate[t](e), this.findNextNonDisabled(e, (l) => this.layoutDelegate[t](l))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(e, this.direction === "ltr") : this.findKey(e, (l) => this.getNextColumn(l, this.direction === "ltr"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(e, this.direction === "ltr") : null;
|
|
582
|
+
}
|
|
583
|
+
getFirstKey() {
|
|
584
|
+
let e = this.collection.getFirstKey();
|
|
585
|
+
return this.findNextNonDisabled(e, (t) => this.collection.getKeyAfter(t));
|
|
586
|
+
}
|
|
587
|
+
getLastKey() {
|
|
588
|
+
let e = this.collection.getLastKey();
|
|
589
|
+
return this.findNextNonDisabled(e, (t) => this.collection.getKeyBefore(t));
|
|
590
|
+
}
|
|
591
|
+
getKeyPageAbove(e) {
|
|
592
|
+
let t = this.ref.current, l = this.layoutDelegate.getItemRect(e);
|
|
593
|
+
if (!l) return null;
|
|
594
|
+
if (t && !je(t)) return this.getFirstKey();
|
|
595
|
+
let i = e;
|
|
596
|
+
if (this.orientation === "horizontal") {
|
|
597
|
+
let o = Math.max(0, l.x + l.width - this.layoutDelegate.getVisibleRect().width);
|
|
598
|
+
for (; l && l.x > o && i != null; )
|
|
599
|
+
i = this.getKeyAbove(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
600
|
+
} else {
|
|
601
|
+
let o = Math.max(0, l.y + l.height - this.layoutDelegate.getVisibleRect().height);
|
|
602
|
+
for (; l && l.y > o && i != null; )
|
|
603
|
+
i = this.getKeyAbove(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
604
|
+
}
|
|
605
|
+
return i ?? this.getFirstKey();
|
|
606
|
+
}
|
|
607
|
+
getKeyPageBelow(e) {
|
|
608
|
+
let t = this.ref.current, l = this.layoutDelegate.getItemRect(e);
|
|
609
|
+
if (!l) return null;
|
|
610
|
+
if (t && !je(t)) return this.getLastKey();
|
|
611
|
+
let i = e;
|
|
612
|
+
if (this.orientation === "horizontal") {
|
|
613
|
+
let o = Math.min(this.layoutDelegate.getContentSize().width, l.y - l.width + this.layoutDelegate.getVisibleRect().width);
|
|
614
|
+
for (; l && l.x < o && i != null; )
|
|
615
|
+
i = this.getKeyBelow(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
616
|
+
} else {
|
|
617
|
+
let o = Math.min(this.layoutDelegate.getContentSize().height, l.y - l.height + this.layoutDelegate.getVisibleRect().height);
|
|
618
|
+
for (; l && l.y < o && i != null; )
|
|
619
|
+
i = this.getKeyBelow(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
620
|
+
}
|
|
621
|
+
return i ?? this.getLastKey();
|
|
622
|
+
}
|
|
623
|
+
getKeyForSearch(e, t) {
|
|
624
|
+
if (!this.collator) return null;
|
|
625
|
+
let l = this.collection, i = t || this.getFirstKey();
|
|
626
|
+
for (; i != null; ) {
|
|
627
|
+
let o = l.getItem(i);
|
|
628
|
+
if (!o) return null;
|
|
629
|
+
let r = o.textValue.slice(0, e.length);
|
|
630
|
+
if (o.textValue && this.collator.compare(r, e) === 0) return i;
|
|
631
|
+
i = this.getNextKey(i);
|
|
632
|
+
}
|
|
633
|
+
return null;
|
|
634
|
+
}
|
|
635
|
+
constructor(...e) {
|
|
636
|
+
if (e.length === 1) {
|
|
637
|
+
let t = e[0];
|
|
638
|
+
this.collection = t.collection, this.ref = t.ref, this.collator = t.collator, this.disabledKeys = t.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = t.disabledBehavior || "all", this.orientation = t.orientation || "vertical", this.direction = t.direction, this.layout = t.layout || "stack", this.layoutDelegate = t.layoutDelegate || new Qe(t.ref);
|
|
639
|
+
} else
|
|
640
|
+
this.collection = e[0], this.disabledKeys = e[1], this.ref = e[2], this.collator = e[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all", this.layoutDelegate = new Qe(this.ref);
|
|
641
|
+
this.layout === "stack" && this.orientation === "vertical" && (this.getKeyLeftOf = void 0, this.getKeyRightOf = void 0);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
function di(n) {
|
|
645
|
+
let { selectionManager: e, collection: t, disabledKeys: l, ref: i, keyboardDelegate: o, layoutDelegate: r } = n, s = Dt({
|
|
646
|
+
usage: "search",
|
|
647
|
+
sensitivity: "base"
|
|
648
|
+
}), a = e.disabledBehavior, c = T(() => o || new Pt({
|
|
649
|
+
collection: t,
|
|
650
|
+
disabledKeys: l,
|
|
651
|
+
disabledBehavior: a,
|
|
652
|
+
ref: i,
|
|
653
|
+
collator: s,
|
|
654
|
+
layoutDelegate: r
|
|
655
|
+
}), [
|
|
656
|
+
o,
|
|
657
|
+
r,
|
|
658
|
+
t,
|
|
659
|
+
l,
|
|
660
|
+
i,
|
|
661
|
+
s,
|
|
662
|
+
a
|
|
663
|
+
]), { collectionProps: v } = ai({
|
|
664
|
+
...n,
|
|
665
|
+
ref: i,
|
|
666
|
+
selectionManager: e,
|
|
667
|
+
keyboardDelegate: c
|
|
668
|
+
});
|
|
669
|
+
return {
|
|
670
|
+
listProps: v
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
function ci(n, e, t) {
|
|
674
|
+
let l = se(n, {
|
|
675
|
+
labelable: !0
|
|
676
|
+
}), i = n.selectionBehavior || "toggle", o = n.linkBehavior || (i === "replace" ? "action" : "override");
|
|
677
|
+
i === "toggle" && o === "action" && (o = "override");
|
|
678
|
+
let { listProps: r } = di({
|
|
679
|
+
...n,
|
|
680
|
+
ref: t,
|
|
681
|
+
selectionManager: e.selectionManager,
|
|
682
|
+
collection: e.collection,
|
|
683
|
+
disabledKeys: e.disabledKeys,
|
|
684
|
+
linkBehavior: o
|
|
685
|
+
}), { focusWithinProps: s } = Gl({
|
|
686
|
+
onFocusWithin: n.onFocus,
|
|
687
|
+
onBlurWithin: n.onBlur,
|
|
688
|
+
onFocusWithinChange: n.onFocusChange
|
|
689
|
+
}), a = re(n.id);
|
|
690
|
+
Oe.set(e, {
|
|
691
|
+
id: a,
|
|
692
|
+
shouldUseVirtualFocus: n.shouldUseVirtualFocus,
|
|
693
|
+
shouldSelectOnPressUp: n.shouldSelectOnPressUp,
|
|
694
|
+
shouldFocusOnHover: n.shouldFocusOnHover,
|
|
695
|
+
isVirtualized: n.isVirtualized,
|
|
696
|
+
onAction: n.onAction,
|
|
697
|
+
linkBehavior: o
|
|
698
|
+
});
|
|
699
|
+
let { labelProps: c, fieldProps: v } = jl({
|
|
700
|
+
...n,
|
|
701
|
+
id: a,
|
|
702
|
+
// listbox is not an HTML input element so it
|
|
703
|
+
// shouldn't be labeled by a <label> element.
|
|
704
|
+
labelElementType: "span"
|
|
705
|
+
});
|
|
706
|
+
return {
|
|
707
|
+
labelProps: c,
|
|
708
|
+
listBoxProps: W(l, s, e.selectionManager.selectionMode === "multiple" ? {
|
|
709
|
+
"aria-multiselectable": "true"
|
|
710
|
+
} : {}, {
|
|
711
|
+
role: "listbox",
|
|
712
|
+
...W(v, r)
|
|
713
|
+
})
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
class fi {
|
|
717
|
+
build(e, t) {
|
|
718
|
+
return this.context = t, et(() => this.iterateCollection(e));
|
|
719
|
+
}
|
|
720
|
+
*iterateCollection(e) {
|
|
721
|
+
let { children: t, items: l } = e;
|
|
722
|
+
if (m.isValidElement(t) && t.type === m.Fragment) yield* this.iterateCollection({
|
|
723
|
+
children: t.props.children,
|
|
724
|
+
items: l
|
|
725
|
+
});
|
|
726
|
+
else if (typeof t == "function") {
|
|
727
|
+
if (!l) throw new Error("props.children was a function but props.items is missing");
|
|
728
|
+
let i = 0;
|
|
729
|
+
for (let o of l)
|
|
730
|
+
yield* this.getFullNode({
|
|
731
|
+
value: o,
|
|
732
|
+
index: i
|
|
733
|
+
}, {
|
|
734
|
+
renderer: t
|
|
735
|
+
}), i++;
|
|
736
|
+
} else {
|
|
737
|
+
let i = [];
|
|
738
|
+
m.Children.forEach(t, (r) => {
|
|
739
|
+
r && i.push(r);
|
|
740
|
+
});
|
|
741
|
+
let o = 0;
|
|
742
|
+
for (let r of i) {
|
|
743
|
+
let s = this.getFullNode({
|
|
744
|
+
element: r,
|
|
745
|
+
index: o
|
|
746
|
+
}, {});
|
|
747
|
+
for (let a of s)
|
|
748
|
+
o++, yield a;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
getKey(e, t, l, i) {
|
|
753
|
+
if (e.key != null) return e.key;
|
|
754
|
+
if (t.type === "cell" && t.key != null) return `${i}${t.key}`;
|
|
755
|
+
let o = t.value;
|
|
756
|
+
if (o != null) {
|
|
757
|
+
var r;
|
|
758
|
+
let s = (r = o.key) !== null && r !== void 0 ? r : o.id;
|
|
759
|
+
if (s == null) throw new Error("No key found for item");
|
|
760
|
+
return s;
|
|
761
|
+
}
|
|
762
|
+
return i ? `${i}.${t.index}` : `$.${t.index}`;
|
|
763
|
+
}
|
|
764
|
+
getChildState(e, t) {
|
|
765
|
+
return {
|
|
766
|
+
renderer: t.renderer || e.renderer
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
*getFullNode(e, t, l, i) {
|
|
770
|
+
if (m.isValidElement(e.element) && e.element.type === m.Fragment) {
|
|
771
|
+
let g = [];
|
|
772
|
+
m.Children.forEach(e.element.props.children, (S) => {
|
|
773
|
+
g.push(S);
|
|
774
|
+
});
|
|
775
|
+
var o;
|
|
776
|
+
let $ = (o = e.index) !== null && o !== void 0 ? o : 0;
|
|
777
|
+
for (const S of g) yield* this.getFullNode({
|
|
778
|
+
element: S,
|
|
779
|
+
index: $++
|
|
780
|
+
}, t, l, i);
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
let r = e.element;
|
|
784
|
+
if (!r && e.value && t && t.renderer) {
|
|
785
|
+
let g = this.cache.get(e.value);
|
|
786
|
+
if (g && (!g.shouldInvalidate || !g.shouldInvalidate(this.context))) {
|
|
787
|
+
g.index = e.index, g.parentKey = i ? i.key : null, yield g;
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
r = t.renderer(e.value);
|
|
791
|
+
}
|
|
792
|
+
if (m.isValidElement(r)) {
|
|
793
|
+
let g = r.type;
|
|
794
|
+
if (typeof g != "function" && typeof g.getCollectionNode != "function") {
|
|
795
|
+
let k = r.type;
|
|
796
|
+
throw new Error(`Unknown element <${k}> in collection.`);
|
|
797
|
+
}
|
|
798
|
+
let $ = g.getCollectionNode(r.props, this.context);
|
|
799
|
+
var s;
|
|
800
|
+
let S = (s = e.index) !== null && s !== void 0 ? s : 0, w = $.next();
|
|
801
|
+
for (; !w.done && w.value; ) {
|
|
802
|
+
let k = w.value;
|
|
803
|
+
e.index = S;
|
|
804
|
+
var a;
|
|
805
|
+
let F = (a = k.key) !== null && a !== void 0 ? a : null;
|
|
806
|
+
F == null && (F = k.element ? null : this.getKey(r, e, t, l));
|
|
807
|
+
let A = [
|
|
808
|
+
...this.getFullNode({
|
|
809
|
+
...k,
|
|
810
|
+
key: F,
|
|
811
|
+
index: S,
|
|
812
|
+
wrapper: hi(e.wrapper, k.wrapper)
|
|
813
|
+
}, this.getChildState(t, k), l ? `${l}${r.key}` : r.key, i)
|
|
814
|
+
];
|
|
815
|
+
for (let M of A) {
|
|
816
|
+
var c, v;
|
|
817
|
+
M.value = (v = (c = k.value) !== null && c !== void 0 ? c : e.value) !== null && v !== void 0 ? v : null, M.value && this.cache.set(M.value, M);
|
|
818
|
+
var h;
|
|
819
|
+
if (e.type && M.type !== e.type) throw new Error(`Unsupported type <${Ke(M.type)}> in <${Ke((h = i == null ? void 0 : i.type) !== null && h !== void 0 ? h : "unknown parent type")}>. Only <${Ke(e.type)}> is supported.`);
|
|
820
|
+
S++, yield M;
|
|
821
|
+
}
|
|
822
|
+
w = $.next(A);
|
|
823
|
+
}
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
if (e.key == null || e.type == null) return;
|
|
827
|
+
let d = this;
|
|
828
|
+
var y, b;
|
|
829
|
+
let x = {
|
|
830
|
+
type: e.type,
|
|
831
|
+
props: e.props,
|
|
832
|
+
key: e.key,
|
|
833
|
+
parentKey: i ? i.key : null,
|
|
834
|
+
value: (y = e.value) !== null && y !== void 0 ? y : null,
|
|
835
|
+
level: i ? i.level + 1 : 0,
|
|
836
|
+
index: e.index,
|
|
837
|
+
rendered: e.rendered,
|
|
838
|
+
textValue: (b = e.textValue) !== null && b !== void 0 ? b : "",
|
|
839
|
+
"aria-label": e["aria-label"],
|
|
840
|
+
wrapper: e.wrapper,
|
|
841
|
+
shouldInvalidate: e.shouldInvalidate,
|
|
842
|
+
hasChildNodes: e.hasChildNodes || !1,
|
|
843
|
+
childNodes: et(function* () {
|
|
844
|
+
if (!e.hasChildNodes || !e.childNodes) return;
|
|
845
|
+
let g = 0;
|
|
846
|
+
for (let $ of e.childNodes()) {
|
|
847
|
+
$.key != null && ($.key = `${x.key}${$.key}`);
|
|
848
|
+
let S = d.getFullNode({
|
|
849
|
+
...$,
|
|
850
|
+
index: g
|
|
851
|
+
}, d.getChildState(t, $), x.key, x);
|
|
852
|
+
for (let w of S)
|
|
853
|
+
g++, yield w;
|
|
854
|
+
}
|
|
855
|
+
})
|
|
856
|
+
};
|
|
857
|
+
yield x;
|
|
858
|
+
}
|
|
859
|
+
constructor() {
|
|
860
|
+
this.cache = /* @__PURE__ */ new WeakMap();
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
function et(n) {
|
|
864
|
+
let e = [], t = null;
|
|
865
|
+
return {
|
|
866
|
+
*[Symbol.iterator]() {
|
|
867
|
+
for (let l of e) yield l;
|
|
868
|
+
t || (t = n());
|
|
869
|
+
for (let l of t)
|
|
870
|
+
e.push(l), yield l;
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
function hi(n, e) {
|
|
875
|
+
if (n && e) return (t) => n(e(t));
|
|
876
|
+
if (n) return n;
|
|
877
|
+
if (e) return e;
|
|
878
|
+
}
|
|
879
|
+
function Ke(n) {
|
|
880
|
+
return n[0].toUpperCase() + n.slice(1);
|
|
881
|
+
}
|
|
882
|
+
function pi(n, e, t) {
|
|
883
|
+
let l = T(() => new fi(), []), { children: i, items: o, collection: r } = n;
|
|
884
|
+
return T(() => {
|
|
885
|
+
if (r) return r;
|
|
886
|
+
let a = l.build({
|
|
887
|
+
children: i,
|
|
888
|
+
items: o
|
|
889
|
+
}, t);
|
|
890
|
+
return e(a);
|
|
891
|
+
}, [
|
|
892
|
+
l,
|
|
893
|
+
i,
|
|
894
|
+
o,
|
|
895
|
+
r,
|
|
896
|
+
t,
|
|
897
|
+
e
|
|
898
|
+
]);
|
|
899
|
+
}
|
|
900
|
+
function kt(n, e) {
|
|
901
|
+
return typeof e.getChildren == "function" ? e.getChildren(n.key) : n.childNodes;
|
|
902
|
+
}
|
|
903
|
+
function vi(n) {
|
|
904
|
+
return yi(n);
|
|
905
|
+
}
|
|
906
|
+
function yi(n, e) {
|
|
907
|
+
for (let t of n)
|
|
908
|
+
return t;
|
|
909
|
+
}
|
|
910
|
+
function Tn(n) {
|
|
911
|
+
let e;
|
|
912
|
+
for (let t of n) e = t;
|
|
913
|
+
return e;
|
|
914
|
+
}
|
|
915
|
+
function De(n, e, t) {
|
|
916
|
+
if (e.parentKey === t.parentKey) return e.index - t.index;
|
|
917
|
+
let l = [
|
|
918
|
+
...tt(n, e),
|
|
919
|
+
e
|
|
920
|
+
], i = [
|
|
921
|
+
...tt(n, t),
|
|
922
|
+
t
|
|
923
|
+
], o = l.slice(0, i.length).findIndex((r, s) => r !== i[s]);
|
|
924
|
+
return o !== -1 ? (e = l[o], t = i[o], e.index - t.index) : l.findIndex((r) => r === t) >= 0 ? 1 : (i.findIndex((r) => r === e) >= 0, -1);
|
|
925
|
+
}
|
|
926
|
+
function tt(n, e) {
|
|
927
|
+
let t = [], l = e;
|
|
928
|
+
for (; (l == null ? void 0 : l.parentKey) != null; )
|
|
929
|
+
l = n.getItem(l.parentKey), l && t.unshift(l);
|
|
930
|
+
return t;
|
|
931
|
+
}
|
|
932
|
+
const lt = /* @__PURE__ */ new WeakMap();
|
|
933
|
+
function bi(n) {
|
|
934
|
+
let e = lt.get(n);
|
|
935
|
+
if (e != null) return e;
|
|
936
|
+
let t = 0, l = (i) => {
|
|
937
|
+
for (let o of i)
|
|
938
|
+
o.type === "section" ? l(kt(o, n)) : o.type === "item" && t++;
|
|
939
|
+
};
|
|
940
|
+
return l(n), lt.set(n, t), t;
|
|
941
|
+
}
|
|
942
|
+
function gi(n, e, t) {
|
|
943
|
+
var l, i;
|
|
944
|
+
let { key: o } = n, r = Oe.get(e);
|
|
945
|
+
var s;
|
|
946
|
+
let a = (s = n.isDisabled) !== null && s !== void 0 ? s : e.selectionManager.isDisabled(o);
|
|
947
|
+
var c;
|
|
948
|
+
let v = (c = n.isSelected) !== null && c !== void 0 ? c : e.selectionManager.isSelected(o);
|
|
949
|
+
var h;
|
|
950
|
+
let d = (h = n.shouldSelectOnPressUp) !== null && h !== void 0 ? h : r == null ? void 0 : r.shouldSelectOnPressUp;
|
|
951
|
+
var y;
|
|
952
|
+
let b = (y = n.shouldFocusOnHover) !== null && y !== void 0 ? y : r == null ? void 0 : r.shouldFocusOnHover;
|
|
953
|
+
var x;
|
|
954
|
+
let g = (x = n.shouldUseVirtualFocus) !== null && x !== void 0 ? x : r == null ? void 0 : r.shouldUseVirtualFocus;
|
|
955
|
+
var $;
|
|
956
|
+
let S = ($ = n.isVirtualized) !== null && $ !== void 0 ? $ : r == null ? void 0 : r.isVirtualized, w = _e(), k = _e(), F = {
|
|
957
|
+
role: "option",
|
|
958
|
+
"aria-disabled": a || void 0,
|
|
959
|
+
"aria-selected": e.selectionManager.selectionMode !== "none" ? v : void 0
|
|
960
|
+
};
|
|
961
|
+
gt() && zl() || (F["aria-label"] = n["aria-label"], F["aria-labelledby"] = w, F["aria-describedby"] = k);
|
|
962
|
+
let C = e.collection.getItem(o);
|
|
963
|
+
if (S) {
|
|
964
|
+
let f = Number(C == null ? void 0 : C.index);
|
|
965
|
+
F["aria-posinset"] = Number.isNaN(f) ? void 0 : f + 1, F["aria-setsize"] = bi(e.collection);
|
|
966
|
+
}
|
|
967
|
+
let A = r != null && r.onAction ? () => {
|
|
968
|
+
var f;
|
|
969
|
+
return r == null || (f = r.onAction) === null || f === void 0 ? void 0 : f.call(r, o);
|
|
970
|
+
} : void 0, M = li(e, o), { itemProps: G, isPressed: B, isFocused: p, hasAction: K, allowsSelection: I } = ui({
|
|
971
|
+
selectionManager: e.selectionManager,
|
|
972
|
+
key: o,
|
|
973
|
+
ref: t,
|
|
974
|
+
shouldSelectOnPressUp: d,
|
|
975
|
+
allowsDifferentPressOrigin: d && b,
|
|
976
|
+
isVirtualized: S,
|
|
977
|
+
shouldUseVirtualFocus: g,
|
|
978
|
+
isDisabled: a,
|
|
979
|
+
onAction: A || !(C == null || (l = C.props) === null || l === void 0) && l.onAction ? Ml(C == null || (i = C.props) === null || i === void 0 ? void 0 : i.onAction, A) : void 0,
|
|
980
|
+
linkBehavior: r == null ? void 0 : r.linkBehavior,
|
|
981
|
+
id: M
|
|
982
|
+
}), { hoverProps: V } = St({
|
|
983
|
+
isDisabled: a || !b,
|
|
984
|
+
onHoverStart() {
|
|
985
|
+
Ge() || (e.selectionManager.setFocused(!0), e.selectionManager.setFocusedKey(o));
|
|
986
|
+
}
|
|
987
|
+
}), U = se(C == null ? void 0 : C.props);
|
|
988
|
+
delete U.id;
|
|
989
|
+
let H = ql(C == null ? void 0 : C.props);
|
|
990
|
+
return {
|
|
991
|
+
optionProps: {
|
|
992
|
+
...F,
|
|
993
|
+
...W(U, G, V, H),
|
|
994
|
+
id: M
|
|
995
|
+
},
|
|
996
|
+
labelProps: {
|
|
997
|
+
id: w
|
|
998
|
+
},
|
|
999
|
+
descriptionProps: {
|
|
1000
|
+
id: k
|
|
1001
|
+
},
|
|
1002
|
+
isFocused: p,
|
|
1003
|
+
isFocusVisible: p && e.selectionManager.isFocused && Ge(),
|
|
1004
|
+
isSelected: v,
|
|
1005
|
+
isDisabled: a,
|
|
1006
|
+
isPressed: B,
|
|
1007
|
+
allowsSelection: I,
|
|
1008
|
+
hasAction: K
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function $i(n) {
|
|
1012
|
+
let { heading: e, "aria-label": t } = n, l = re();
|
|
1013
|
+
return {
|
|
1014
|
+
itemProps: {
|
|
1015
|
+
role: "presentation"
|
|
1016
|
+
},
|
|
1017
|
+
headingProps: e ? {
|
|
1018
|
+
// Techincally, listbox cannot contain headings according to ARIA.
|
|
1019
|
+
// We hide the heading from assistive technology, using role="presentation",
|
|
1020
|
+
// and only use it as a visual label for the nested group.
|
|
1021
|
+
id: l,
|
|
1022
|
+
role: "presentation"
|
|
1023
|
+
} : {},
|
|
1024
|
+
groupProps: {
|
|
1025
|
+
role: "group",
|
|
1026
|
+
"aria-label": t,
|
|
1027
|
+
"aria-labelledby": e ? l : void 0
|
|
1028
|
+
}
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
var ue = { exports: {} }, we = {};
|
|
1032
|
+
/**
|
|
1033
|
+
* @license React
|
|
1034
|
+
* use-sync-external-store-shim.production.js
|
|
1035
|
+
*
|
|
1036
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1037
|
+
*
|
|
1038
|
+
* This source code is licensed under the MIT license found in the
|
|
1039
|
+
* LICENSE file in the root directory of this source tree.
|
|
1040
|
+
*/
|
|
1041
|
+
var it;
|
|
1042
|
+
function mi() {
|
|
1043
|
+
if (it) return we;
|
|
1044
|
+
it = 1;
|
|
1045
|
+
var n = m;
|
|
1046
|
+
function e(h, d) {
|
|
1047
|
+
return h === d && (h !== 0 || 1 / h === 1 / d) || h !== h && d !== d;
|
|
1048
|
+
}
|
|
1049
|
+
var t = typeof Object.is == "function" ? Object.is : e, l = n.useState, i = n.useEffect, o = n.useLayoutEffect, r = n.useDebugValue;
|
|
1050
|
+
function s(h, d) {
|
|
1051
|
+
var y = d(), b = l({ inst: { value: y, getSnapshot: d } }), x = b[0].inst, g = b[1];
|
|
1052
|
+
return o(
|
|
1053
|
+
function() {
|
|
1054
|
+
x.value = y, x.getSnapshot = d, a(x) && g({ inst: x });
|
|
1055
|
+
},
|
|
1056
|
+
[h, y, d]
|
|
1057
|
+
), i(
|
|
1058
|
+
function() {
|
|
1059
|
+
return a(x) && g({ inst: x }), h(function() {
|
|
1060
|
+
a(x) && g({ inst: x });
|
|
1061
|
+
});
|
|
1062
|
+
},
|
|
1063
|
+
[h]
|
|
1064
|
+
), r(y), y;
|
|
1065
|
+
}
|
|
1066
|
+
function a(h) {
|
|
1067
|
+
var d = h.getSnapshot;
|
|
1068
|
+
h = h.value;
|
|
1069
|
+
try {
|
|
1070
|
+
var y = d();
|
|
1071
|
+
return !t(h, y);
|
|
1072
|
+
} catch {
|
|
1073
|
+
return !0;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
function c(h, d) {
|
|
1077
|
+
return d();
|
|
1078
|
+
}
|
|
1079
|
+
var v = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? c : s;
|
|
1080
|
+
return we.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : v, we;
|
|
1081
|
+
}
|
|
1082
|
+
var Ce = {};
|
|
1083
|
+
/**
|
|
1084
|
+
* @license React
|
|
1085
|
+
* use-sync-external-store-shim.development.js
|
|
1086
|
+
*
|
|
1087
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1088
|
+
*
|
|
1089
|
+
* This source code is licensed under the MIT license found in the
|
|
1090
|
+
* LICENSE file in the root directory of this source tree.
|
|
1091
|
+
*/
|
|
1092
|
+
var nt;
|
|
1093
|
+
function xi() {
|
|
1094
|
+
return nt || (nt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1095
|
+
function n(y, b) {
|
|
1096
|
+
return y === b && (y !== 0 || 1 / y === 1 / b) || y !== y && b !== b;
|
|
1097
|
+
}
|
|
1098
|
+
function e(y, b) {
|
|
1099
|
+
v || i.startTransition === void 0 || (v = !0, console.error(
|
|
1100
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
1101
|
+
));
|
|
1102
|
+
var x = b();
|
|
1103
|
+
if (!h) {
|
|
1104
|
+
var g = b();
|
|
1105
|
+
o(x, g) || (console.error(
|
|
1106
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
1107
|
+
), h = !0);
|
|
1108
|
+
}
|
|
1109
|
+
g = r({
|
|
1110
|
+
inst: { value: x, getSnapshot: b }
|
|
1111
|
+
});
|
|
1112
|
+
var $ = g[0].inst, S = g[1];
|
|
1113
|
+
return a(
|
|
1114
|
+
function() {
|
|
1115
|
+
$.value = x, $.getSnapshot = b, t($) && S({ inst: $ });
|
|
1116
|
+
},
|
|
1117
|
+
[y, x, b]
|
|
1118
|
+
), s(
|
|
1119
|
+
function() {
|
|
1120
|
+
return t($) && S({ inst: $ }), y(function() {
|
|
1121
|
+
t($) && S({ inst: $ });
|
|
1122
|
+
});
|
|
1123
|
+
},
|
|
1124
|
+
[y]
|
|
1125
|
+
), c(x), x;
|
|
1126
|
+
}
|
|
1127
|
+
function t(y) {
|
|
1128
|
+
var b = y.getSnapshot;
|
|
1129
|
+
y = y.value;
|
|
1130
|
+
try {
|
|
1131
|
+
var x = b();
|
|
1132
|
+
return !o(y, x);
|
|
1133
|
+
} catch {
|
|
1134
|
+
return !0;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
function l(y, b) {
|
|
1138
|
+
return b();
|
|
1139
|
+
}
|
|
1140
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1141
|
+
var i = m, o = typeof Object.is == "function" ? Object.is : n, r = i.useState, s = i.useEffect, a = i.useLayoutEffect, c = i.useDebugValue, v = !1, h = !1, d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? l : e;
|
|
1142
|
+
Ce.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : d, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1143
|
+
}()), Ce;
|
|
1144
|
+
}
|
|
1145
|
+
var ot;
|
|
1146
|
+
function Si() {
|
|
1147
|
+
return ot || (ot = 1, process.env.NODE_ENV === "production" ? ue.exports = mi() : ue.exports = xi()), ue.exports;
|
|
1148
|
+
}
|
|
1149
|
+
var Ki = /* @__PURE__ */ Si();
|
|
1150
|
+
class Ne {
|
|
1151
|
+
get childNodes() {
|
|
1152
|
+
throw new Error("childNodes is not supported");
|
|
1153
|
+
}
|
|
1154
|
+
clone() {
|
|
1155
|
+
let e = new Ne(this.type, this.key);
|
|
1156
|
+
return e.value = this.value, e.level = this.level, e.hasChildNodes = this.hasChildNodes, e.rendered = this.rendered, e.textValue = this.textValue, e["aria-label"] = this["aria-label"], e.index = this.index, e.parentKey = this.parentKey, e.prevKey = this.prevKey, e.nextKey = this.nextKey, e.firstChildKey = this.firstChildKey, e.lastChildKey = this.lastChildKey, e.props = this.props, e.render = this.render, e.colSpan = this.colSpan, e.colIndex = this.colIndex, e;
|
|
1157
|
+
}
|
|
1158
|
+
constructor(e, t) {
|
|
1159
|
+
this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.colSpan = null, this.colIndex = null, this.type = e, this.key = t;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
class ze {
|
|
1163
|
+
get size() {
|
|
1164
|
+
return this.keyMap.size;
|
|
1165
|
+
}
|
|
1166
|
+
getKeys() {
|
|
1167
|
+
return this.keyMap.keys();
|
|
1168
|
+
}
|
|
1169
|
+
*[Symbol.iterator]() {
|
|
1170
|
+
let e = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
|
|
1171
|
+
for (; e; )
|
|
1172
|
+
yield e, e = e.nextKey != null ? this.keyMap.get(e.nextKey) : void 0;
|
|
1173
|
+
}
|
|
1174
|
+
getChildren(e) {
|
|
1175
|
+
let t = this.keyMap;
|
|
1176
|
+
return {
|
|
1177
|
+
*[Symbol.iterator]() {
|
|
1178
|
+
let l = t.get(e), i = (l == null ? void 0 : l.firstChildKey) != null ? t.get(l.firstChildKey) : null;
|
|
1179
|
+
for (; i; )
|
|
1180
|
+
yield i, i = i.nextKey != null ? t.get(i.nextKey) : void 0;
|
|
1181
|
+
}
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
getKeyBefore(e) {
|
|
1185
|
+
let t = this.keyMap.get(e);
|
|
1186
|
+
if (!t) return null;
|
|
1187
|
+
if (t.prevKey != null) {
|
|
1188
|
+
for (t = this.keyMap.get(t.prevKey); t && t.type !== "item" && t.lastChildKey != null; ) t = this.keyMap.get(t.lastChildKey);
|
|
1189
|
+
var l;
|
|
1190
|
+
return (l = t == null ? void 0 : t.key) !== null && l !== void 0 ? l : null;
|
|
1191
|
+
}
|
|
1192
|
+
return t.parentKey;
|
|
1193
|
+
}
|
|
1194
|
+
getKeyAfter(e) {
|
|
1195
|
+
let t = this.keyMap.get(e);
|
|
1196
|
+
if (!t) return null;
|
|
1197
|
+
if (t.type !== "item" && t.firstChildKey != null) return t.firstChildKey;
|
|
1198
|
+
for (; t; ) {
|
|
1199
|
+
if (t.nextKey != null) return t.nextKey;
|
|
1200
|
+
if (t.parentKey != null) t = this.keyMap.get(t.parentKey);
|
|
1201
|
+
else return null;
|
|
1202
|
+
}
|
|
1203
|
+
return null;
|
|
1204
|
+
}
|
|
1205
|
+
getFirstKey() {
|
|
1206
|
+
return this.firstKey;
|
|
1207
|
+
}
|
|
1208
|
+
getLastKey() {
|
|
1209
|
+
let e = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
|
|
1210
|
+
for (; (e == null ? void 0 : e.lastChildKey) != null; ) e = this.keyMap.get(e.lastChildKey);
|
|
1211
|
+
var t;
|
|
1212
|
+
return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
|
|
1213
|
+
}
|
|
1214
|
+
getItem(e) {
|
|
1215
|
+
var t;
|
|
1216
|
+
return (t = this.keyMap.get(e)) !== null && t !== void 0 ? t : null;
|
|
1217
|
+
}
|
|
1218
|
+
at() {
|
|
1219
|
+
throw new Error("Not implemented");
|
|
1220
|
+
}
|
|
1221
|
+
clone() {
|
|
1222
|
+
let e = this.constructor, t = new e();
|
|
1223
|
+
return t.keyMap = new Map(this.keyMap), t.firstKey = this.firstKey, t.lastKey = this.lastKey, t;
|
|
1224
|
+
}
|
|
1225
|
+
addNode(e) {
|
|
1226
|
+
if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
|
|
1227
|
+
this.keyMap.set(e.key, e);
|
|
1228
|
+
}
|
|
1229
|
+
removeNode(e) {
|
|
1230
|
+
if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
|
|
1231
|
+
this.keyMap.delete(e);
|
|
1232
|
+
}
|
|
1233
|
+
commit(e, t, l = !1) {
|
|
1234
|
+
if (this.frozen) throw new Error("Cannot commit a frozen collection");
|
|
1235
|
+
this.firstKey = e, this.lastKey = t, this.frozen = !l;
|
|
1236
|
+
}
|
|
1237
|
+
// TODO: this is pretty specific to menu, will need to check if it is generic enough
|
|
1238
|
+
// Will need to handle varying levels I assume but will revisit after I get searchable menu working for base menu
|
|
1239
|
+
// TODO: an alternative is to simply walk the collection and add all item nodes that match the filter and any sections/separators we encounter
|
|
1240
|
+
// to an array, then walk that new array and fix all the next/Prev keys while adding them to the new collection
|
|
1241
|
+
UNSTABLE_filter(e) {
|
|
1242
|
+
let t = new ze(), l = null;
|
|
1243
|
+
for (let i of this)
|
|
1244
|
+
if (i.type === "section" && i.hasChildNodes) {
|
|
1245
|
+
let o = i.clone(), r = null;
|
|
1246
|
+
for (let s of this.getChildren(i.key)) if (rt(s, e, this, t)) {
|
|
1247
|
+
let a = s.clone();
|
|
1248
|
+
r == null && (o.firstChildKey = a.key), t.firstKey == null && (t.firstKey = o.key), r && r.parentKey === a.parentKey ? (r.nextKey = a.key, a.prevKey = r.key) : a.prevKey = null, a.nextKey = null, t.addNode(a), r = a;
|
|
1249
|
+
}
|
|
1250
|
+
r && (r.type !== "header" ? (o.lastChildKey = r.key, l == null ? o.prevKey = null : (l.type === "section" || l.type === "separator") && (l.nextKey = o.key, o.prevKey = l.key), o.nextKey = null, l = o, t.addNode(o)) : (t.firstKey === o.key && (t.firstKey = null), t.removeNode(r.key)));
|
|
1251
|
+
} else if (i.type === "separator") {
|
|
1252
|
+
let o = i.clone();
|
|
1253
|
+
o.nextKey = null, (l == null ? void 0 : l.type) === "section" && (l.nextKey = o.key, o.prevKey = l.key, l = o, t.addNode(o));
|
|
1254
|
+
} else {
|
|
1255
|
+
let o = i.clone();
|
|
1256
|
+
rt(o, e, this, t) && (t.firstKey == null && (t.firstKey = o.key), l != null && l.type !== "section" && l.type !== "separator" && l.parentKey === o.parentKey ? (l.nextKey = o.key, o.prevKey = l.key) : o.prevKey = null, o.nextKey = null, t.addNode(o), l = o);
|
|
1257
|
+
}
|
|
1258
|
+
if ((l == null ? void 0 : l.type) === "separator" && l.nextKey === null) {
|
|
1259
|
+
let i;
|
|
1260
|
+
l.prevKey != null && (i = t.getItem(l.prevKey), i.nextKey = null), t.removeNode(l.key), l = i;
|
|
1261
|
+
}
|
|
1262
|
+
return t.lastKey = (l == null ? void 0 : l.key) || null, t;
|
|
1263
|
+
}
|
|
1264
|
+
constructor() {
|
|
1265
|
+
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
function rt(n, e, t, l) {
|
|
1269
|
+
if (n.type === "subdialogtrigger" || n.type === "submenutrigger") {
|
|
1270
|
+
let i = [
|
|
1271
|
+
...t.getChildren(n.key)
|
|
1272
|
+
][0];
|
|
1273
|
+
if (i && e(i.textValue)) {
|
|
1274
|
+
let o = i.clone();
|
|
1275
|
+
return l.addNode(o), !0;
|
|
1276
|
+
} else return !1;
|
|
1277
|
+
} else return n.type === "header" ? !0 : e(n.textValue);
|
|
1278
|
+
}
|
|
1279
|
+
class It {
|
|
1280
|
+
*[Symbol.iterator]() {
|
|
1281
|
+
let e = this.firstChild;
|
|
1282
|
+
for (; e; )
|
|
1283
|
+
yield e, e = e.nextSibling;
|
|
1284
|
+
}
|
|
1285
|
+
get firstChild() {
|
|
1286
|
+
return this._firstChild;
|
|
1287
|
+
}
|
|
1288
|
+
set firstChild(e) {
|
|
1289
|
+
this._firstChild = e, this.ownerDocument.markDirty(this);
|
|
1290
|
+
}
|
|
1291
|
+
get lastChild() {
|
|
1292
|
+
return this._lastChild;
|
|
1293
|
+
}
|
|
1294
|
+
set lastChild(e) {
|
|
1295
|
+
this._lastChild = e, this.ownerDocument.markDirty(this);
|
|
1296
|
+
}
|
|
1297
|
+
get previousSibling() {
|
|
1298
|
+
return this._previousSibling;
|
|
1299
|
+
}
|
|
1300
|
+
set previousSibling(e) {
|
|
1301
|
+
this._previousSibling = e, this.ownerDocument.markDirty(this);
|
|
1302
|
+
}
|
|
1303
|
+
get nextSibling() {
|
|
1304
|
+
return this._nextSibling;
|
|
1305
|
+
}
|
|
1306
|
+
set nextSibling(e) {
|
|
1307
|
+
this._nextSibling = e, this.ownerDocument.markDirty(this);
|
|
1308
|
+
}
|
|
1309
|
+
get parentNode() {
|
|
1310
|
+
return this._parentNode;
|
|
1311
|
+
}
|
|
1312
|
+
set parentNode(e) {
|
|
1313
|
+
this._parentNode = e, this.ownerDocument.markDirty(this);
|
|
1314
|
+
}
|
|
1315
|
+
get isConnected() {
|
|
1316
|
+
var e;
|
|
1317
|
+
return ((e = this.parentNode) === null || e === void 0 ? void 0 : e.isConnected) || !1;
|
|
1318
|
+
}
|
|
1319
|
+
invalidateChildIndices(e) {
|
|
1320
|
+
(this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || e.index < this._minInvalidChildIndex.index) && (this._minInvalidChildIndex = e, this.ownerDocument.markDirty(this));
|
|
1321
|
+
}
|
|
1322
|
+
updateChildIndices() {
|
|
1323
|
+
let e = this._minInvalidChildIndex;
|
|
1324
|
+
for (; e; )
|
|
1325
|
+
e.index = e.previousSibling ? e.previousSibling.index + 1 : 0, e = e.nextSibling;
|
|
1326
|
+
this._minInvalidChildIndex = null;
|
|
1327
|
+
}
|
|
1328
|
+
appendChild(e) {
|
|
1329
|
+
e.parentNode && e.parentNode.removeChild(e), this.firstChild == null && (this.firstChild = e), this.lastChild ? (this.lastChild.nextSibling = e, e.index = this.lastChild.index + 1, e.previousSibling = this.lastChild) : (e.previousSibling = null, e.index = 0), e.parentNode = this, e.nextSibling = null, this.lastChild = e, this.ownerDocument.markDirty(this), this.isConnected && this.ownerDocument.queueUpdate();
|
|
1330
|
+
}
|
|
1331
|
+
insertBefore(e, t) {
|
|
1332
|
+
if (t == null) return this.appendChild(e);
|
|
1333
|
+
e.parentNode && e.parentNode.removeChild(e), e.nextSibling = t, e.previousSibling = t.previousSibling, e.index = t.index - 1, this.firstChild === t ? this.firstChild = e : t.previousSibling && (t.previousSibling.nextSibling = e), t.previousSibling = e, e.parentNode = t.parentNode, this.invalidateChildIndices(e), this.isConnected && this.ownerDocument.queueUpdate();
|
|
1334
|
+
}
|
|
1335
|
+
removeChild(e) {
|
|
1336
|
+
e.parentNode !== this || !this.ownerDocument.isMounted || (this._minInvalidChildIndex === e && (this._minInvalidChildIndex = null), e.nextSibling && (this.invalidateChildIndices(e.nextSibling), e.nextSibling.previousSibling = e.previousSibling), e.previousSibling && (e.previousSibling.nextSibling = e.nextSibling), this.firstChild === e && (this.firstChild = e.nextSibling), this.lastChild === e && (this.lastChild = e.previousSibling), e.parentNode = null, e.nextSibling = null, e.previousSibling = null, e.index = 0, this.ownerDocument.markDirty(e), this.isConnected && this.ownerDocument.queueUpdate());
|
|
1337
|
+
}
|
|
1338
|
+
addEventListener() {
|
|
1339
|
+
}
|
|
1340
|
+
removeEventListener() {
|
|
1341
|
+
}
|
|
1342
|
+
get previousVisibleSibling() {
|
|
1343
|
+
let e = this.previousSibling;
|
|
1344
|
+
for (; e && e.isHidden; ) e = e.previousSibling;
|
|
1345
|
+
return e;
|
|
1346
|
+
}
|
|
1347
|
+
get nextVisibleSibling() {
|
|
1348
|
+
let e = this.nextSibling;
|
|
1349
|
+
for (; e && e.isHidden; ) e = e.nextSibling;
|
|
1350
|
+
return e;
|
|
1351
|
+
}
|
|
1352
|
+
get firstVisibleChild() {
|
|
1353
|
+
let e = this.firstChild;
|
|
1354
|
+
for (; e && e.isHidden; ) e = e.nextSibling;
|
|
1355
|
+
return e;
|
|
1356
|
+
}
|
|
1357
|
+
get lastVisibleChild() {
|
|
1358
|
+
let e = this.lastChild;
|
|
1359
|
+
for (; e && e.isHidden; ) e = e.previousSibling;
|
|
1360
|
+
return e;
|
|
1361
|
+
}
|
|
1362
|
+
constructor(e) {
|
|
1363
|
+
this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this._minInvalidChildIndex = null, this.ownerDocument = e;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
class le extends It {
|
|
1367
|
+
get index() {
|
|
1368
|
+
return this._index;
|
|
1369
|
+
}
|
|
1370
|
+
set index(e) {
|
|
1371
|
+
this._index = e, this.ownerDocument.markDirty(this);
|
|
1372
|
+
}
|
|
1373
|
+
get level() {
|
|
1374
|
+
return this.parentNode instanceof le ? this.parentNode.level + (this.node.type === "item" ? 1 : 0) : 0;
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Lazily gets a mutable instance of a Node. If the node has already
|
|
1378
|
+
* been cloned during this update cycle, it just returns the existing one.
|
|
1379
|
+
*/
|
|
1380
|
+
getMutableNode() {
|
|
1381
|
+
return this.isMutated || (this.node = this.node.clone(), this.isMutated = !0), this.ownerDocument.markDirty(this), this.node;
|
|
1382
|
+
}
|
|
1383
|
+
updateNode() {
|
|
1384
|
+
var e, t, l;
|
|
1385
|
+
let i = this.nextVisibleSibling, o = this.getMutableNode();
|
|
1386
|
+
o.index = this.index, o.level = this.level, o.parentKey = this.parentNode instanceof le ? this.parentNode.node.key : null;
|
|
1387
|
+
var r;
|
|
1388
|
+
o.prevKey = (r = (e = this.previousVisibleSibling) === null || e === void 0 ? void 0 : e.node.key) !== null && r !== void 0 ? r : null;
|
|
1389
|
+
var s;
|
|
1390
|
+
o.nextKey = (s = i == null ? void 0 : i.node.key) !== null && s !== void 0 ? s : null, o.hasChildNodes = !!this.firstChild;
|
|
1391
|
+
var a;
|
|
1392
|
+
o.firstChildKey = (a = (t = this.firstVisibleChild) === null || t === void 0 ? void 0 : t.node.key) !== null && a !== void 0 ? a : null;
|
|
1393
|
+
var c;
|
|
1394
|
+
if (o.lastChildKey = (c = (l = this.lastVisibleChild) === null || l === void 0 ? void 0 : l.node.key) !== null && c !== void 0 ? c : null, (o.colSpan != null || o.colIndex != null) && i) {
|
|
1395
|
+
var v, h;
|
|
1396
|
+
let d = ((v = o.colIndex) !== null && v !== void 0 ? v : o.index) + ((h = o.colSpan) !== null && h !== void 0 ? h : 1);
|
|
1397
|
+
if (d !== i.node.colIndex) {
|
|
1398
|
+
let y = i.getMutableNode();
|
|
1399
|
+
y.colIndex = d;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
setProps(e, t, l, i) {
|
|
1404
|
+
let o = this.getMutableNode(), { value: r, textValue: s, id: a, ...c } = e;
|
|
1405
|
+
if (c.ref = t, o.props = c, o.rendered = l, o.render = i, o.value = r, o.textValue = s || (typeof c.children == "string" ? c.children : "") || e["aria-label"] || "", a != null && a !== o.key) {
|
|
1406
|
+
if (this.hasSetProps) throw new Error("Cannot change the id of an item");
|
|
1407
|
+
o.key = a;
|
|
1408
|
+
}
|
|
1409
|
+
c.colSpan != null && (o.colSpan = c.colSpan), this.hasSetProps = !0, this.isConnected && this.ownerDocument.queueUpdate();
|
|
1410
|
+
}
|
|
1411
|
+
get style() {
|
|
1412
|
+
let e = this;
|
|
1413
|
+
return {
|
|
1414
|
+
get display() {
|
|
1415
|
+
return e.isHidden ? "none" : "";
|
|
1416
|
+
},
|
|
1417
|
+
set display(t) {
|
|
1418
|
+
let l = t === "none";
|
|
1419
|
+
if (e.isHidden !== l) {
|
|
1420
|
+
var i, o;
|
|
1421
|
+
(((i = e.parentNode) === null || i === void 0 ? void 0 : i.firstVisibleChild) === e || ((o = e.parentNode) === null || o === void 0 ? void 0 : o.lastVisibleChild) === e) && e.ownerDocument.markDirty(e.parentNode);
|
|
1422
|
+
let r = e.previousVisibleSibling, s = e.nextVisibleSibling;
|
|
1423
|
+
r && e.ownerDocument.markDirty(r), s && e.ownerDocument.markDirty(s), e.isHidden = l, e.ownerDocument.markDirty(e);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1428
|
+
hasAttribute() {
|
|
1429
|
+
}
|
|
1430
|
+
setAttribute() {
|
|
1431
|
+
}
|
|
1432
|
+
setAttributeNS() {
|
|
1433
|
+
}
|
|
1434
|
+
removeAttribute() {
|
|
1435
|
+
}
|
|
1436
|
+
constructor(e, t) {
|
|
1437
|
+
super(t), this.nodeType = 8, this.isMutated = !0, this._index = 0, this.hasSetProps = !1, this.isHidden = !1, this.node = new Ne(e, `react-aria-${++t.nodeId}`);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
class Di extends It {
|
|
1441
|
+
get isConnected() {
|
|
1442
|
+
return this.isMounted;
|
|
1443
|
+
}
|
|
1444
|
+
createElement(e) {
|
|
1445
|
+
return new le(e, this);
|
|
1446
|
+
}
|
|
1447
|
+
getMutableCollection() {
|
|
1448
|
+
return this.nextCollection || (this.nextCollection = this.collection.clone()), this.nextCollection;
|
|
1449
|
+
}
|
|
1450
|
+
markDirty(e) {
|
|
1451
|
+
this.dirtyNodes.add(e);
|
|
1452
|
+
}
|
|
1453
|
+
addNode(e) {
|
|
1454
|
+
if (e.isHidden) return;
|
|
1455
|
+
let t = this.getMutableCollection();
|
|
1456
|
+
if (!t.getItem(e.node.key)) for (let l of e) this.addNode(l);
|
|
1457
|
+
t.addNode(e.node);
|
|
1458
|
+
}
|
|
1459
|
+
removeNode(e) {
|
|
1460
|
+
for (let l of e) this.removeNode(l);
|
|
1461
|
+
this.getMutableCollection().removeNode(e.node.key);
|
|
1462
|
+
}
|
|
1463
|
+
/** Finalizes the collection update, updating all nodes and freezing the collection. */
|
|
1464
|
+
getCollection() {
|
|
1465
|
+
return this.inSubscription ? this.collection.clone() : (this.queuedRender = !1, this.updateCollection(), this.collection);
|
|
1466
|
+
}
|
|
1467
|
+
updateCollection() {
|
|
1468
|
+
for (let o of this.dirtyNodes) o instanceof le && (!o.isConnected || o.isHidden) ? this.removeNode(o) : o.updateChildIndices();
|
|
1469
|
+
for (let o of this.dirtyNodes) o instanceof le && (o.isConnected && !o.isHidden && (o.updateNode(), this.addNode(o)), o.isMutated = !1);
|
|
1470
|
+
if (this.dirtyNodes.clear(), this.nextCollection) {
|
|
1471
|
+
var e, t, l, i;
|
|
1472
|
+
this.nextCollection.commit((l = (e = this.firstVisibleChild) === null || e === void 0 ? void 0 : e.node.key) !== null && l !== void 0 ? l : null, (i = (t = this.lastVisibleChild) === null || t === void 0 ? void 0 : t.node.key) !== null && i !== void 0 ? i : null, this.isSSR), this.isSSR || (this.collection = this.nextCollection, this.nextCollection = null);
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
queueUpdate() {
|
|
1476
|
+
if (!(this.dirtyNodes.size === 0 || this.queuedRender)) {
|
|
1477
|
+
this.queuedRender = !0, this.inSubscription = !0;
|
|
1478
|
+
for (let e of this.subscriptions) e();
|
|
1479
|
+
this.inSubscription = !1;
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
subscribe(e) {
|
|
1483
|
+
return this.subscriptions.add(e), () => this.subscriptions.delete(e);
|
|
1484
|
+
}
|
|
1485
|
+
resetAfterSSR() {
|
|
1486
|
+
this.isSSR && (this.isSSR = !1, this.firstChild = null, this.lastChild = null, this.nodeId = 0);
|
|
1487
|
+
}
|
|
1488
|
+
constructor(e) {
|
|
1489
|
+
super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = !1, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.isMounted = !0, this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = !1, this.inSubscription = !1, this.collection = e, this.nextCollection = e;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
function Ft(n) {
|
|
1493
|
+
let { children: e, items: t, idScope: l, addIdAndValue: i, dependencies: o = [] } = n, r = T(() => /* @__PURE__ */ new WeakMap(), o);
|
|
1494
|
+
return T(() => {
|
|
1495
|
+
if (t && typeof e == "function") {
|
|
1496
|
+
let c = [];
|
|
1497
|
+
for (let v of t) {
|
|
1498
|
+
let h = r.get(v);
|
|
1499
|
+
if (!h) {
|
|
1500
|
+
h = e(v);
|
|
1501
|
+
var s, a;
|
|
1502
|
+
let d = (a = (s = h.props.id) !== null && s !== void 0 ? s : v.key) !== null && a !== void 0 ? a : v.id;
|
|
1503
|
+
if (d == null) throw new Error("Could not determine key for item");
|
|
1504
|
+
l && (d = l + ":" + d), h = ct(h, i ? {
|
|
1505
|
+
key: d,
|
|
1506
|
+
id: d,
|
|
1507
|
+
value: v
|
|
1508
|
+
} : {
|
|
1509
|
+
key: d
|
|
1510
|
+
}), r.set(v, h);
|
|
1511
|
+
}
|
|
1512
|
+
c.push(h);
|
|
1513
|
+
}
|
|
1514
|
+
return c;
|
|
1515
|
+
} else if (typeof e != "function") return e;
|
|
1516
|
+
}, [
|
|
1517
|
+
e,
|
|
1518
|
+
t,
|
|
1519
|
+
r,
|
|
1520
|
+
l,
|
|
1521
|
+
i
|
|
1522
|
+
]);
|
|
1523
|
+
}
|
|
1524
|
+
const Mt = /* @__PURE__ */ O(!1), ie = /* @__PURE__ */ O(null);
|
|
1525
|
+
function wi(n) {
|
|
1526
|
+
if (R(ie))
|
|
1527
|
+
return n.content;
|
|
1528
|
+
let { collection: t, document: l } = ki(n.createCollection);
|
|
1529
|
+
return /* @__PURE__ */ m.createElement(m.Fragment, null, /* @__PURE__ */ m.createElement(Pl, null, /* @__PURE__ */ m.createElement(ie.Provider, {
|
|
1530
|
+
value: l
|
|
1531
|
+
}, n.content)), /* @__PURE__ */ m.createElement(Ci, {
|
|
1532
|
+
render: n.children,
|
|
1533
|
+
collection: t
|
|
1534
|
+
}));
|
|
1535
|
+
}
|
|
1536
|
+
function Ci({ collection: n, render: e }) {
|
|
1537
|
+
return e(n);
|
|
1538
|
+
}
|
|
1539
|
+
function Ei(n, e, t) {
|
|
1540
|
+
let l = yt(), i = P(l);
|
|
1541
|
+
i.current = l;
|
|
1542
|
+
let o = J(() => i.current ? t() : e(), [
|
|
1543
|
+
e,
|
|
1544
|
+
t
|
|
1545
|
+
]);
|
|
1546
|
+
return Ki.useSyncExternalStore(n, o);
|
|
1547
|
+
}
|
|
1548
|
+
const Pi = typeof m.useSyncExternalStore == "function" ? m.useSyncExternalStore : Ei;
|
|
1549
|
+
function ki(n) {
|
|
1550
|
+
let [e] = te(() => new Di((n == null ? void 0 : n()) || new ze())), t = J((r) => e.subscribe(r), [
|
|
1551
|
+
e
|
|
1552
|
+
]), l = J(() => {
|
|
1553
|
+
let r = e.getCollection();
|
|
1554
|
+
return e.isSSR && e.resetAfterSSR(), r;
|
|
1555
|
+
}, [
|
|
1556
|
+
e
|
|
1557
|
+
]), i = J(() => (e.isSSR = !0, e.getCollection()), [
|
|
1558
|
+
e
|
|
1559
|
+
]), o = Pi(t, l, i);
|
|
1560
|
+
return Ee(() => (e.isMounted = !0, () => {
|
|
1561
|
+
e.isMounted = !1;
|
|
1562
|
+
}), [
|
|
1563
|
+
e
|
|
1564
|
+
]), {
|
|
1565
|
+
collection: o,
|
|
1566
|
+
document: e
|
|
1567
|
+
};
|
|
1568
|
+
}
|
|
1569
|
+
const Re = /* @__PURE__ */ O(null);
|
|
1570
|
+
function Tt(n, e, t, l, i, o) {
|
|
1571
|
+
let r = J((a) => {
|
|
1572
|
+
a == null || a.setProps(e, t, l, o);
|
|
1573
|
+
}, [
|
|
1574
|
+
e,
|
|
1575
|
+
t,
|
|
1576
|
+
l,
|
|
1577
|
+
o
|
|
1578
|
+
]), s = R(Re);
|
|
1579
|
+
if (s) {
|
|
1580
|
+
let a = s.ownerDocument.nodesByProps.get(e);
|
|
1581
|
+
return a || (a = s.ownerDocument.createElement(n), a.setProps(e, t, l, o), s.appendChild(a), s.ownerDocument.updateCollection(), s.ownerDocument.nodesByProps.set(e, a)), i ? /* @__PURE__ */ m.createElement(Re.Provider, {
|
|
1582
|
+
value: a
|
|
1583
|
+
}, i) : null;
|
|
1584
|
+
}
|
|
1585
|
+
return /* @__PURE__ */ m.createElement(n, {
|
|
1586
|
+
ref: r
|
|
1587
|
+
}, i);
|
|
1588
|
+
}
|
|
1589
|
+
function Lt(n, e) {
|
|
1590
|
+
let t = ({ node: i }) => e(i.props, i.props.ref, i), l = ne((i, o) => {
|
|
1591
|
+
let r = R(We);
|
|
1592
|
+
if (!R(Mt)) {
|
|
1593
|
+
if (e.length >= 3) throw new Error(e.name + " cannot be rendered outside a collection.");
|
|
1594
|
+
return e(i, o);
|
|
1595
|
+
}
|
|
1596
|
+
return Tt(n, i, o, "children" in i ? i.children : null, null, (a) => (
|
|
1597
|
+
// Forward FocusableContext to real DOM tree so tooltips work.
|
|
1598
|
+
/* @__PURE__ */ m.createElement(We.Provider, {
|
|
1599
|
+
value: r
|
|
1600
|
+
}, /* @__PURE__ */ m.createElement(t, {
|
|
1601
|
+
node: a
|
|
1602
|
+
}))
|
|
1603
|
+
));
|
|
1604
|
+
});
|
|
1605
|
+
return l.displayName = e.name, l;
|
|
1606
|
+
}
|
|
1607
|
+
function Ii(n, e, t = At) {
|
|
1608
|
+
let l = ({ node: o }) => e(o.props, o.props.ref, o), i = ne((o, r) => {
|
|
1609
|
+
let s = t(o);
|
|
1610
|
+
var a;
|
|
1611
|
+
return (a = Tt(n, o, r, null, s, (c) => /* @__PURE__ */ m.createElement(l, {
|
|
1612
|
+
node: c
|
|
1613
|
+
}))) !== null && a !== void 0 ? a : /* @__PURE__ */ m.createElement(m.Fragment, null);
|
|
1614
|
+
});
|
|
1615
|
+
return i.displayName = e.name, i;
|
|
1616
|
+
}
|
|
1617
|
+
function At(n) {
|
|
1618
|
+
return Ft({
|
|
1619
|
+
...n,
|
|
1620
|
+
addIdAndValue: !0
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
const st = /* @__PURE__ */ O(null);
|
|
1624
|
+
function Fi(n) {
|
|
1625
|
+
let e = R(st), t = ((e == null ? void 0 : e.dependencies) || []).concat(n.dependencies), l = n.idScope || (e == null ? void 0 : e.idScope), i = At({
|
|
1626
|
+
...n,
|
|
1627
|
+
idScope: l,
|
|
1628
|
+
dependencies: t
|
|
1629
|
+
});
|
|
1630
|
+
return R(ie) && (i = /* @__PURE__ */ m.createElement(Mi, null, i)), e = T(() => ({
|
|
1631
|
+
dependencies: t,
|
|
1632
|
+
idScope: l
|
|
1633
|
+
}), [
|
|
1634
|
+
l,
|
|
1635
|
+
...t
|
|
1636
|
+
]), /* @__PURE__ */ m.createElement(st.Provider, {
|
|
1637
|
+
value: e
|
|
1638
|
+
}, i);
|
|
1639
|
+
}
|
|
1640
|
+
function Mi({ children: n }) {
|
|
1641
|
+
let e = R(ie), t = T(() => /* @__PURE__ */ m.createElement(ie.Provider, {
|
|
1642
|
+
value: null
|
|
1643
|
+
}, /* @__PURE__ */ m.createElement(Mt.Provider, {
|
|
1644
|
+
value: !0
|
|
1645
|
+
}, n)), [
|
|
1646
|
+
n
|
|
1647
|
+
]);
|
|
1648
|
+
return yt() ? /* @__PURE__ */ m.createElement(Re.Provider, {
|
|
1649
|
+
value: e
|
|
1650
|
+
}, t) : /* @__PURE__ */ Fl(t, e);
|
|
1651
|
+
}
|
|
1652
|
+
class at {
|
|
1653
|
+
*[Symbol.iterator]() {
|
|
1654
|
+
yield* this.iterable;
|
|
1655
|
+
}
|
|
1656
|
+
get size() {
|
|
1657
|
+
return this.keyMap.size;
|
|
1658
|
+
}
|
|
1659
|
+
getKeys() {
|
|
1660
|
+
return this.keyMap.keys();
|
|
1661
|
+
}
|
|
1662
|
+
getKeyBefore(e) {
|
|
1663
|
+
let t = this.keyMap.get(e);
|
|
1664
|
+
var l;
|
|
1665
|
+
return t && (l = t.prevKey) !== null && l !== void 0 ? l : null;
|
|
1666
|
+
}
|
|
1667
|
+
getKeyAfter(e) {
|
|
1668
|
+
let t = this.keyMap.get(e);
|
|
1669
|
+
var l;
|
|
1670
|
+
return t && (l = t.nextKey) !== null && l !== void 0 ? l : null;
|
|
1671
|
+
}
|
|
1672
|
+
getFirstKey() {
|
|
1673
|
+
return this.firstKey;
|
|
1674
|
+
}
|
|
1675
|
+
getLastKey() {
|
|
1676
|
+
return this.lastKey;
|
|
1677
|
+
}
|
|
1678
|
+
getItem(e) {
|
|
1679
|
+
var t;
|
|
1680
|
+
return (t = this.keyMap.get(e)) !== null && t !== void 0 ? t : null;
|
|
1681
|
+
}
|
|
1682
|
+
at(e) {
|
|
1683
|
+
const t = [
|
|
1684
|
+
...this.getKeys()
|
|
1685
|
+
];
|
|
1686
|
+
return this.getItem(t[e]);
|
|
1687
|
+
}
|
|
1688
|
+
getChildren(e) {
|
|
1689
|
+
let t = this.keyMap.get(e);
|
|
1690
|
+
return (t == null ? void 0 : t.childNodes) || [];
|
|
1691
|
+
}
|
|
1692
|
+
constructor(e) {
|
|
1693
|
+
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
|
|
1694
|
+
let t = (r) => {
|
|
1695
|
+
if (this.keyMap.set(r.key, r), r.childNodes && r.type === "section") for (let s of r.childNodes) t(s);
|
|
1696
|
+
};
|
|
1697
|
+
for (let r of e) t(r);
|
|
1698
|
+
let l = null, i = 0;
|
|
1699
|
+
for (let [r, s] of this.keyMap)
|
|
1700
|
+
l ? (l.nextKey = r, s.prevKey = l.key) : (this.firstKey = r, s.prevKey = void 0), s.type === "item" && (s.index = i++), l = s, l.nextKey = void 0;
|
|
1701
|
+
var o;
|
|
1702
|
+
this.lastKey = (o = l == null ? void 0 : l.key) !== null && o !== void 0 ? o : null;
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
class j extends Set {
|
|
1706
|
+
constructor(e, t, l) {
|
|
1707
|
+
super(e), e instanceof j ? (this.anchorKey = t ?? e.anchorKey, this.currentKey = l ?? e.currentKey) : (this.anchorKey = t ?? null, this.currentKey = l ?? null);
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
function Ti(n, e) {
|
|
1711
|
+
if (n.size !== e.size) return !1;
|
|
1712
|
+
for (let t of n)
|
|
1713
|
+
if (!e.has(t)) return !1;
|
|
1714
|
+
return !0;
|
|
1715
|
+
}
|
|
1716
|
+
function Li(n) {
|
|
1717
|
+
let { selectionMode: e = "none", disallowEmptySelection: t = !1, allowDuplicateSelectionEvents: l, selectionBehavior: i = "toggle", disabledBehavior: o = "all" } = n, r = P(!1), [, s] = te(!1), a = P(null), c = P(null), [, v] = te(null), h = T(() => ut(n.selectedKeys), [
|
|
1718
|
+
n.selectedKeys
|
|
1719
|
+
]), d = T(() => ut(n.defaultSelectedKeys, new j()), [
|
|
1720
|
+
n.defaultSelectedKeys
|
|
1721
|
+
]), [y, b] = $t(h, d, n.onSelectionChange), x = T(() => n.disabledKeys ? new Set(n.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
1722
|
+
n.disabledKeys
|
|
1723
|
+
]), [g, $] = te(i);
|
|
1724
|
+
i === "replace" && g === "toggle" && typeof y == "object" && y.size === 0 && $("replace");
|
|
1725
|
+
let S = P(i);
|
|
1726
|
+
return Y(() => {
|
|
1727
|
+
i !== S.current && ($(i), S.current = i);
|
|
1728
|
+
}, [
|
|
1729
|
+
i
|
|
1730
|
+
]), {
|
|
1731
|
+
selectionMode: e,
|
|
1732
|
+
disallowEmptySelection: t,
|
|
1733
|
+
selectionBehavior: g,
|
|
1734
|
+
setSelectionBehavior: $,
|
|
1735
|
+
get isFocused() {
|
|
1736
|
+
return r.current;
|
|
1737
|
+
},
|
|
1738
|
+
setFocused(w) {
|
|
1739
|
+
r.current = w, s(w);
|
|
1740
|
+
},
|
|
1741
|
+
get focusedKey() {
|
|
1742
|
+
return a.current;
|
|
1743
|
+
},
|
|
1744
|
+
get childFocusStrategy() {
|
|
1745
|
+
return c.current;
|
|
1746
|
+
},
|
|
1747
|
+
setFocusedKey(w, k = "first") {
|
|
1748
|
+
a.current = w, c.current = k, v(w);
|
|
1749
|
+
},
|
|
1750
|
+
selectedKeys: y,
|
|
1751
|
+
setSelectedKeys(w) {
|
|
1752
|
+
(l || !Ti(w, y)) && b(w);
|
|
1753
|
+
},
|
|
1754
|
+
disabledKeys: x,
|
|
1755
|
+
disabledBehavior: o
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1758
|
+
function ut(n, e) {
|
|
1759
|
+
return n ? n === "all" ? "all" : new j(n) : e;
|
|
1760
|
+
}
|
|
1761
|
+
class Ue {
|
|
1762
|
+
/**
|
|
1763
|
+
* The type of selection that is allowed in the collection.
|
|
1764
|
+
*/
|
|
1765
|
+
get selectionMode() {
|
|
1766
|
+
return this.state.selectionMode;
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Whether the collection allows empty selection.
|
|
1770
|
+
*/
|
|
1771
|
+
get disallowEmptySelection() {
|
|
1772
|
+
return this.state.disallowEmptySelection;
|
|
1773
|
+
}
|
|
1774
|
+
/**
|
|
1775
|
+
* The selection behavior for the collection.
|
|
1776
|
+
*/
|
|
1777
|
+
get selectionBehavior() {
|
|
1778
|
+
return this.state.selectionBehavior;
|
|
1779
|
+
}
|
|
1780
|
+
/**
|
|
1781
|
+
* Sets the selection behavior for the collection.
|
|
1782
|
+
*/
|
|
1783
|
+
setSelectionBehavior(e) {
|
|
1784
|
+
this.state.setSelectionBehavior(e);
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* Whether the collection is currently focused.
|
|
1788
|
+
*/
|
|
1789
|
+
get isFocused() {
|
|
1790
|
+
return this.state.isFocused;
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Sets whether the collection is focused.
|
|
1794
|
+
*/
|
|
1795
|
+
setFocused(e) {
|
|
1796
|
+
this.state.setFocused(e);
|
|
1797
|
+
}
|
|
1798
|
+
/**
|
|
1799
|
+
* The current focused key in the collection.
|
|
1800
|
+
*/
|
|
1801
|
+
get focusedKey() {
|
|
1802
|
+
return this.state.focusedKey;
|
|
1803
|
+
}
|
|
1804
|
+
/** Whether the first or last child of the focused key should receive focus. */
|
|
1805
|
+
get childFocusStrategy() {
|
|
1806
|
+
return this.state.childFocusStrategy;
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Sets the focused key.
|
|
1810
|
+
*/
|
|
1811
|
+
setFocusedKey(e, t) {
|
|
1812
|
+
(e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, t);
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* The currently selected keys in the collection.
|
|
1816
|
+
*/
|
|
1817
|
+
get selectedKeys() {
|
|
1818
|
+
return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* The raw selection value for the collection.
|
|
1822
|
+
* Either 'all' for select all, or a set of keys.
|
|
1823
|
+
*/
|
|
1824
|
+
get rawSelection() {
|
|
1825
|
+
return this.state.selectedKeys;
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Returns whether a key is selected.
|
|
1829
|
+
*/
|
|
1830
|
+
isSelected(e) {
|
|
1831
|
+
if (this.state.selectionMode === "none") return !1;
|
|
1832
|
+
let t = this.getKey(e);
|
|
1833
|
+
return t == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(t) : this.state.selectedKeys.has(t);
|
|
1834
|
+
}
|
|
1835
|
+
/**
|
|
1836
|
+
* Whether the selection is empty.
|
|
1837
|
+
*/
|
|
1838
|
+
get isEmpty() {
|
|
1839
|
+
return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* Whether all items in the collection are selected.
|
|
1843
|
+
*/
|
|
1844
|
+
get isSelectAll() {
|
|
1845
|
+
if (this.isEmpty) return !1;
|
|
1846
|
+
if (this.state.selectedKeys === "all") return !0;
|
|
1847
|
+
if (this._isSelectAll != null) return this._isSelectAll;
|
|
1848
|
+
let e = this.getSelectAllKeys(), t = this.state.selectedKeys;
|
|
1849
|
+
return this._isSelectAll = e.every((l) => t.has(l)), this._isSelectAll;
|
|
1850
|
+
}
|
|
1851
|
+
get firstSelectedKey() {
|
|
1852
|
+
let e = null;
|
|
1853
|
+
for (let l of this.state.selectedKeys) {
|
|
1854
|
+
let i = this.collection.getItem(l);
|
|
1855
|
+
(!e || i && De(this.collection, i, e) < 0) && (e = i);
|
|
1856
|
+
}
|
|
1857
|
+
var t;
|
|
1858
|
+
return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
|
|
1859
|
+
}
|
|
1860
|
+
get lastSelectedKey() {
|
|
1861
|
+
let e = null;
|
|
1862
|
+
for (let l of this.state.selectedKeys) {
|
|
1863
|
+
let i = this.collection.getItem(l);
|
|
1864
|
+
(!e || i && De(this.collection, i, e) > 0) && (e = i);
|
|
1865
|
+
}
|
|
1866
|
+
var t;
|
|
1867
|
+
return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
|
|
1868
|
+
}
|
|
1869
|
+
get disabledKeys() {
|
|
1870
|
+
return this.state.disabledKeys;
|
|
1871
|
+
}
|
|
1872
|
+
get disabledBehavior() {
|
|
1873
|
+
return this.state.disabledBehavior;
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* Extends the selection to the given key.
|
|
1877
|
+
*/
|
|
1878
|
+
extendSelection(e) {
|
|
1879
|
+
if (this.selectionMode === "none") return;
|
|
1880
|
+
if (this.selectionMode === "single") {
|
|
1881
|
+
this.replaceSelection(e);
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
let t = this.getKey(e);
|
|
1885
|
+
if (t == null) return;
|
|
1886
|
+
let l;
|
|
1887
|
+
if (this.state.selectedKeys === "all") l = new j([
|
|
1888
|
+
t
|
|
1889
|
+
], t, t);
|
|
1890
|
+
else {
|
|
1891
|
+
let r = this.state.selectedKeys;
|
|
1892
|
+
var i;
|
|
1893
|
+
let s = (i = r.anchorKey) !== null && i !== void 0 ? i : t;
|
|
1894
|
+
l = new j(r, s, t);
|
|
1895
|
+
var o;
|
|
1896
|
+
for (let a of this.getKeyRange(s, (o = r.currentKey) !== null && o !== void 0 ? o : t)) l.delete(a);
|
|
1897
|
+
for (let a of this.getKeyRange(t, s)) this.canSelectItem(a) && l.add(a);
|
|
1898
|
+
}
|
|
1899
|
+
this.state.setSelectedKeys(l);
|
|
1900
|
+
}
|
|
1901
|
+
getKeyRange(e, t) {
|
|
1902
|
+
let l = this.collection.getItem(e), i = this.collection.getItem(t);
|
|
1903
|
+
return l && i ? De(this.collection, l, i) <= 0 ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
|
|
1904
|
+
}
|
|
1905
|
+
getKeyRangeInternal(e, t) {
|
|
1906
|
+
var l;
|
|
1907
|
+
if (!((l = this.layoutDelegate) === null || l === void 0) && l.getKeyRange) return this.layoutDelegate.getKeyRange(e, t);
|
|
1908
|
+
let i = [], o = e;
|
|
1909
|
+
for (; o != null; ) {
|
|
1910
|
+
let r = this.collection.getItem(o);
|
|
1911
|
+
if (r && (r.type === "item" || r.type === "cell" && this.allowsCellSelection) && i.push(o), o === t) return i;
|
|
1912
|
+
o = this.collection.getKeyAfter(o);
|
|
1913
|
+
}
|
|
1914
|
+
return [];
|
|
1915
|
+
}
|
|
1916
|
+
getKey(e) {
|
|
1917
|
+
let t = this.collection.getItem(e);
|
|
1918
|
+
if (!t || t.type === "cell" && this.allowsCellSelection) return e;
|
|
1919
|
+
for (; t && t.type !== "item" && t.parentKey != null; ) t = this.collection.getItem(t.parentKey);
|
|
1920
|
+
return !t || t.type !== "item" ? null : t.key;
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Toggles whether the given key is selected.
|
|
1924
|
+
*/
|
|
1925
|
+
toggleSelection(e) {
|
|
1926
|
+
if (this.selectionMode === "none") return;
|
|
1927
|
+
if (this.selectionMode === "single" && !this.isSelected(e)) {
|
|
1928
|
+
this.replaceSelection(e);
|
|
1929
|
+
return;
|
|
1930
|
+
}
|
|
1931
|
+
let t = this.getKey(e);
|
|
1932
|
+
if (t == null) return;
|
|
1933
|
+
let l = new j(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
1934
|
+
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);
|
|
1935
|
+
}
|
|
1936
|
+
/**
|
|
1937
|
+
* Replaces the selection with only the given key.
|
|
1938
|
+
*/
|
|
1939
|
+
replaceSelection(e) {
|
|
1940
|
+
if (this.selectionMode === "none") return;
|
|
1941
|
+
let t = this.getKey(e);
|
|
1942
|
+
if (t == null) return;
|
|
1943
|
+
let l = this.canSelectItem(t) ? new j([
|
|
1944
|
+
t
|
|
1945
|
+
], t, t) : new j();
|
|
1946
|
+
this.state.setSelectedKeys(l);
|
|
1947
|
+
}
|
|
1948
|
+
/**
|
|
1949
|
+
* Replaces the selection with the given keys.
|
|
1950
|
+
*/
|
|
1951
|
+
setSelectedKeys(e) {
|
|
1952
|
+
if (this.selectionMode === "none") return;
|
|
1953
|
+
let t = new j();
|
|
1954
|
+
for (let l of e) {
|
|
1955
|
+
let i = this.getKey(l);
|
|
1956
|
+
if (i != null && (t.add(i), this.selectionMode === "single"))
|
|
1957
|
+
break;
|
|
1958
|
+
}
|
|
1959
|
+
this.state.setSelectedKeys(t);
|
|
1960
|
+
}
|
|
1961
|
+
getSelectAllKeys() {
|
|
1962
|
+
let e = [], t = (l) => {
|
|
1963
|
+
for (; l != null; ) {
|
|
1964
|
+
if (this.canSelectItem(l)) {
|
|
1965
|
+
var i;
|
|
1966
|
+
let r = this.collection.getItem(l);
|
|
1967
|
+
(r == null ? void 0 : r.type) === "item" && e.push(l);
|
|
1968
|
+
var o;
|
|
1969
|
+
r != null && r.hasChildNodes && (this.allowsCellSelection || r.type !== "item") && t((o = (i = vi(kt(r, this.collection))) === null || i === void 0 ? void 0 : i.key) !== null && o !== void 0 ? o : null);
|
|
1970
|
+
}
|
|
1971
|
+
l = this.collection.getKeyAfter(l);
|
|
1972
|
+
}
|
|
1973
|
+
};
|
|
1974
|
+
return t(this.collection.getFirstKey()), e;
|
|
1975
|
+
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Selects all items in the collection.
|
|
1978
|
+
*/
|
|
1979
|
+
selectAll() {
|
|
1980
|
+
!this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
|
|
1981
|
+
}
|
|
1982
|
+
/**
|
|
1983
|
+
* Removes all keys from the selection.
|
|
1984
|
+
*/
|
|
1985
|
+
clearSelection() {
|
|
1986
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new j());
|
|
1987
|
+
}
|
|
1988
|
+
/**
|
|
1989
|
+
* Toggles between select all and an empty selection.
|
|
1990
|
+
*/
|
|
1991
|
+
toggleSelectAll() {
|
|
1992
|
+
this.isSelectAll ? this.clearSelection() : this.selectAll();
|
|
1993
|
+
}
|
|
1994
|
+
select(e, t) {
|
|
1995
|
+
this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || t && (t.pointerType === "touch" || t.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
|
|
1996
|
+
}
|
|
1997
|
+
/**
|
|
1998
|
+
* Returns whether the current selection is equal to the given selection.
|
|
1999
|
+
*/
|
|
2000
|
+
isSelectionEqual(e) {
|
|
2001
|
+
if (e === this.state.selectedKeys) return !0;
|
|
2002
|
+
let t = this.selectedKeys;
|
|
2003
|
+
if (e.size !== t.size) return !1;
|
|
2004
|
+
for (let l of e)
|
|
2005
|
+
if (!t.has(l)) return !1;
|
|
2006
|
+
for (let l of t)
|
|
2007
|
+
if (!e.has(l)) return !1;
|
|
2008
|
+
return !0;
|
|
2009
|
+
}
|
|
2010
|
+
canSelectItem(e) {
|
|
2011
|
+
var t;
|
|
2012
|
+
if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
|
|
2013
|
+
let l = this.collection.getItem(e);
|
|
2014
|
+
return !(!l || !(l == null || (t = l.props) === null || t === void 0) && t.isDisabled || l.type === "cell" && !this.allowsCellSelection);
|
|
2015
|
+
}
|
|
2016
|
+
isDisabled(e) {
|
|
2017
|
+
var t, l;
|
|
2018
|
+
return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((l = this.collection.getItem(e)) === null || l === void 0 || (t = l.props) === null || t === void 0) && t.isDisabled));
|
|
2019
|
+
}
|
|
2020
|
+
isLink(e) {
|
|
2021
|
+
var t, l;
|
|
2022
|
+
return !!(!((l = this.collection.getItem(e)) === null || l === void 0 || (t = l.props) === null || t === void 0) && t.href);
|
|
2023
|
+
}
|
|
2024
|
+
getItemProps(e) {
|
|
2025
|
+
var t;
|
|
2026
|
+
return (t = this.collection.getItem(e)) === null || t === void 0 ? void 0 : t.props;
|
|
2027
|
+
}
|
|
2028
|
+
withCollection(e) {
|
|
2029
|
+
return new Ue(e, this.state, {
|
|
2030
|
+
allowsCellSelection: this.allowsCellSelection,
|
|
2031
|
+
layoutDelegate: this.layoutDelegate || void 0
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
constructor(e, t, l) {
|
|
2035
|
+
this.collection = e, this.state = t;
|
|
2036
|
+
var i;
|
|
2037
|
+
this.allowsCellSelection = (i = l == null ? void 0 : l.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null, this.layoutDelegate = (l == null ? void 0 : l.layoutDelegate) || null;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
function Ai(n) {
|
|
2041
|
+
let { filter: e, layoutDelegate: t } = n, l = Li(n), i = T(() => n.disabledKeys ? new Set(n.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
2042
|
+
n.disabledKeys
|
|
2043
|
+
]), o = J((c) => e ? new at(e(c)) : new at(c), [
|
|
2044
|
+
e
|
|
2045
|
+
]), r = T(() => ({
|
|
2046
|
+
suppressTextValueWarning: n.suppressTextValueWarning
|
|
2047
|
+
}), [
|
|
2048
|
+
n.suppressTextValueWarning
|
|
2049
|
+
]), s = pi(n, o, r), a = T(() => new Ue(s, l, {
|
|
2050
|
+
layoutDelegate: t
|
|
2051
|
+
}), [
|
|
2052
|
+
s,
|
|
2053
|
+
l,
|
|
2054
|
+
t
|
|
2055
|
+
]);
|
|
2056
|
+
return Rt(s, a), {
|
|
2057
|
+
collection: s,
|
|
2058
|
+
disabledKeys: i,
|
|
2059
|
+
selectionManager: a
|
|
2060
|
+
};
|
|
2061
|
+
}
|
|
2062
|
+
function Ri(n, e) {
|
|
2063
|
+
let t = T(() => e ? n.collection.UNSTABLE_filter(e) : n.collection, [
|
|
2064
|
+
n.collection,
|
|
2065
|
+
e
|
|
2066
|
+
]), l = n.selectionManager.withCollection(t);
|
|
2067
|
+
return Rt(t, l), {
|
|
2068
|
+
collection: t,
|
|
2069
|
+
selectionManager: l,
|
|
2070
|
+
disabledKeys: n.disabledKeys
|
|
2071
|
+
};
|
|
2072
|
+
}
|
|
2073
|
+
function Rt(n, e) {
|
|
2074
|
+
const t = P(null);
|
|
2075
|
+
Y(() => {
|
|
2076
|
+
if (e.focusedKey != null && !n.getItem(e.focusedKey) && t.current) {
|
|
2077
|
+
const v = t.current.getItem(e.focusedKey), h = [
|
|
2078
|
+
...t.current.getKeys()
|
|
2079
|
+
].map(($) => {
|
|
2080
|
+
const S = t.current.getItem($);
|
|
2081
|
+
return (S == null ? void 0 : S.type) === "item" ? S : null;
|
|
2082
|
+
}).filter(($) => $ !== null), d = [
|
|
2083
|
+
...n.getKeys()
|
|
2084
|
+
].map(($) => {
|
|
2085
|
+
const S = n.getItem($);
|
|
2086
|
+
return (S == null ? void 0 : S.type) === "item" ? S : null;
|
|
2087
|
+
}).filter(($) => $ !== null);
|
|
2088
|
+
var l, i;
|
|
2089
|
+
const y = ((l = h == null ? void 0 : h.length) !== null && l !== void 0 ? l : 0) - ((i = d == null ? void 0 : d.length) !== null && i !== void 0 ? i : 0);
|
|
2090
|
+
var o, r, s;
|
|
2091
|
+
let b = Math.min(y > 1 ? Math.max(((o = v == null ? void 0 : v.index) !== null && o !== void 0 ? o : 0) - y + 1, 0) : (r = v == null ? void 0 : v.index) !== null && r !== void 0 ? r : 0, ((s = d == null ? void 0 : d.length) !== null && s !== void 0 ? s : 0) - 1), x = null, g = !1;
|
|
2092
|
+
for (; b >= 0; ) {
|
|
2093
|
+
if (!e.isDisabled(d[b].key)) {
|
|
2094
|
+
x = d[b];
|
|
2095
|
+
break;
|
|
2096
|
+
}
|
|
2097
|
+
if (b < d.length - 1 && !g) b++;
|
|
2098
|
+
else {
|
|
2099
|
+
g = !0;
|
|
2100
|
+
var a, c;
|
|
2101
|
+
b > ((a = v == null ? void 0 : v.index) !== null && a !== void 0 ? a : 0) && (b = (c = v == null ? void 0 : v.index) !== null && c !== void 0 ? c : 0), b--;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
e.setFocusedKey(x ? x.key : null);
|
|
2105
|
+
}
|
|
2106
|
+
t.current = n;
|
|
2107
|
+
}, [
|
|
2108
|
+
n,
|
|
2109
|
+
e
|
|
2110
|
+
]);
|
|
2111
|
+
}
|
|
2112
|
+
const Bi = /* @__PURE__ */ O(null), Bt = /* @__PURE__ */ O(null), Ln = /* @__PURE__ */ kl(function(e, t) {
|
|
2113
|
+
[e, t] = ce(e, t, Bt);
|
|
2114
|
+
let { validationBehavior: l } = ft(Tl) || {};
|
|
2115
|
+
var i, o;
|
|
2116
|
+
let r = (o = (i = e.validationBehavior) !== null && i !== void 0 ? i : l) !== null && o !== void 0 ? o : "native", s = P(null), [a, c] = ce({}, s, Pe), [v, h] = ht(!e["aria-label"] && !e["aria-labelledby"]), [d, y] = te("input"), { labelProps: b, inputProps: x, descriptionProps: g, errorMessageProps: $, ...S } = Bl({
|
|
2117
|
+
...pt(e),
|
|
2118
|
+
inputElementType: d,
|
|
2119
|
+
label: h,
|
|
2120
|
+
validationBehavior: r
|
|
2121
|
+
}, c), w = J((C) => {
|
|
2122
|
+
c.current = C, C && y(C instanceof HTMLTextAreaElement ? "textarea" : "input");
|
|
2123
|
+
}, [
|
|
2124
|
+
c
|
|
2125
|
+
]), k = oe({
|
|
2126
|
+
...e,
|
|
2127
|
+
values: {
|
|
2128
|
+
isDisabled: e.isDisabled || !1,
|
|
2129
|
+
isInvalid: S.isInvalid,
|
|
2130
|
+
isReadOnly: e.isReadOnly || !1,
|
|
2131
|
+
isRequired: e.isRequired || !1
|
|
2132
|
+
},
|
|
2133
|
+
defaultClassName: "react-aria-TextField"
|
|
2134
|
+
}), F = se(e);
|
|
2135
|
+
return delete F.id, /* @__PURE__ */ m.createElement("div", {
|
|
2136
|
+
...F,
|
|
2137
|
+
...k,
|
|
2138
|
+
ref: t,
|
|
2139
|
+
slot: e.slot || void 0,
|
|
2140
|
+
"data-disabled": e.isDisabled || void 0,
|
|
2141
|
+
"data-invalid": S.isInvalid || void 0,
|
|
2142
|
+
"data-readonly": e.isReadOnly || void 0,
|
|
2143
|
+
"data-required": e.isRequired || void 0
|
|
2144
|
+
}, /* @__PURE__ */ m.createElement(fe, {
|
|
2145
|
+
values: [
|
|
2146
|
+
[
|
|
2147
|
+
Ll,
|
|
2148
|
+
{
|
|
2149
|
+
...b,
|
|
2150
|
+
ref: v
|
|
2151
|
+
}
|
|
2152
|
+
],
|
|
2153
|
+
[
|
|
2154
|
+
Pe,
|
|
2155
|
+
{
|
|
2156
|
+
...W(x, a),
|
|
2157
|
+
ref: w
|
|
2158
|
+
}
|
|
2159
|
+
],
|
|
2160
|
+
[
|
|
2161
|
+
Rl,
|
|
2162
|
+
{
|
|
2163
|
+
...x,
|
|
2164
|
+
ref: w
|
|
2165
|
+
}
|
|
2166
|
+
],
|
|
2167
|
+
[
|
|
2168
|
+
bt,
|
|
2169
|
+
{
|
|
2170
|
+
slots: {
|
|
2171
|
+
description: g,
|
|
2172
|
+
errorMessage: $
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
],
|
|
2176
|
+
[
|
|
2177
|
+
Al,
|
|
2178
|
+
S
|
|
2179
|
+
]
|
|
2180
|
+
]
|
|
2181
|
+
}, k.children));
|
|
2182
|
+
});
|
|
2183
|
+
var Vt = {};
|
|
2184
|
+
Vt = {
|
|
2185
|
+
collectionLabel: "مقترحات"
|
|
2186
|
+
};
|
|
2187
|
+
var Ot = {};
|
|
2188
|
+
Ot = {
|
|
2189
|
+
collectionLabel: "Предложения"
|
|
2190
|
+
};
|
|
2191
|
+
var Nt = {};
|
|
2192
|
+
Nt = {
|
|
2193
|
+
collectionLabel: "Návrhy"
|
|
2194
|
+
};
|
|
2195
|
+
var zt = {};
|
|
2196
|
+
zt = {
|
|
2197
|
+
collectionLabel: "Forslag"
|
|
2198
|
+
};
|
|
2199
|
+
var Ut = {};
|
|
2200
|
+
Ut = {
|
|
2201
|
+
collectionLabel: "Empfehlungen"
|
|
2202
|
+
};
|
|
2203
|
+
var Ht = {};
|
|
2204
|
+
Ht = {
|
|
2205
|
+
collectionLabel: "Προτάσεις"
|
|
2206
|
+
};
|
|
2207
|
+
var qt = {};
|
|
2208
|
+
qt = {
|
|
2209
|
+
collectionLabel: "Suggestions"
|
|
2210
|
+
};
|
|
2211
|
+
var Wt = {};
|
|
2212
|
+
Wt = {
|
|
2213
|
+
collectionLabel: "Sugerencias"
|
|
2214
|
+
};
|
|
2215
|
+
var _t = {};
|
|
2216
|
+
_t = {
|
|
2217
|
+
collectionLabel: "Soovitused"
|
|
2218
|
+
};
|
|
2219
|
+
var Gt = {};
|
|
2220
|
+
Gt = {
|
|
2221
|
+
collectionLabel: "Ehdotukset"
|
|
2222
|
+
};
|
|
2223
|
+
var jt = {};
|
|
2224
|
+
jt = {
|
|
2225
|
+
collectionLabel: "Suggestions"
|
|
2226
|
+
};
|
|
2227
|
+
var Yt = {};
|
|
2228
|
+
Yt = {
|
|
2229
|
+
collectionLabel: "הצעות"
|
|
2230
|
+
};
|
|
2231
|
+
var Jt = {};
|
|
2232
|
+
Jt = {
|
|
2233
|
+
collectionLabel: "Prijedlozi"
|
|
2234
|
+
};
|
|
2235
|
+
var Xt = {};
|
|
2236
|
+
Xt = {
|
|
2237
|
+
collectionLabel: "Javaslatok"
|
|
2238
|
+
};
|
|
2239
|
+
var Zt = {};
|
|
2240
|
+
Zt = {
|
|
2241
|
+
collectionLabel: "Suggerimenti"
|
|
2242
|
+
};
|
|
2243
|
+
var Qt = {};
|
|
2244
|
+
Qt = {
|
|
2245
|
+
collectionLabel: "候補"
|
|
2246
|
+
};
|
|
2247
|
+
var el = {};
|
|
2248
|
+
el = {
|
|
2249
|
+
collectionLabel: "제안"
|
|
2250
|
+
};
|
|
2251
|
+
var tl = {};
|
|
2252
|
+
tl = {
|
|
2253
|
+
collectionLabel: "Pasiūlymai"
|
|
2254
|
+
};
|
|
2255
|
+
var ll = {};
|
|
2256
|
+
ll = {
|
|
2257
|
+
collectionLabel: "Ieteikumi"
|
|
2258
|
+
};
|
|
2259
|
+
var il = {};
|
|
2260
|
+
il = {
|
|
2261
|
+
collectionLabel: "Forslag"
|
|
2262
|
+
};
|
|
2263
|
+
var nl = {};
|
|
2264
|
+
nl = {
|
|
2265
|
+
collectionLabel: "Suggesties"
|
|
2266
|
+
};
|
|
2267
|
+
var ol = {};
|
|
2268
|
+
ol = {
|
|
2269
|
+
collectionLabel: "Sugestie"
|
|
2270
|
+
};
|
|
2271
|
+
var rl = {};
|
|
2272
|
+
rl = {
|
|
2273
|
+
collectionLabel: "Sugestões"
|
|
2274
|
+
};
|
|
2275
|
+
var sl = {};
|
|
2276
|
+
sl = {
|
|
2277
|
+
collectionLabel: "Sugestões"
|
|
2278
|
+
};
|
|
2279
|
+
var al = {};
|
|
2280
|
+
al = {
|
|
2281
|
+
collectionLabel: "Sugestii"
|
|
2282
|
+
};
|
|
2283
|
+
var ul = {};
|
|
2284
|
+
ul = {
|
|
2285
|
+
collectionLabel: "Предложения"
|
|
2286
|
+
};
|
|
2287
|
+
var dl = {};
|
|
2288
|
+
dl = {
|
|
2289
|
+
collectionLabel: "Návrhy"
|
|
2290
|
+
};
|
|
2291
|
+
var cl = {};
|
|
2292
|
+
cl = {
|
|
2293
|
+
collectionLabel: "Predlogi"
|
|
2294
|
+
};
|
|
2295
|
+
var fl = {};
|
|
2296
|
+
fl = {
|
|
2297
|
+
collectionLabel: "Predlozi"
|
|
2298
|
+
};
|
|
2299
|
+
var hl = {};
|
|
2300
|
+
hl = {
|
|
2301
|
+
collectionLabel: "Förslag"
|
|
2302
|
+
};
|
|
2303
|
+
var pl = {};
|
|
2304
|
+
pl = {
|
|
2305
|
+
collectionLabel: "Öneriler"
|
|
2306
|
+
};
|
|
2307
|
+
var vl = {};
|
|
2308
|
+
vl = {
|
|
2309
|
+
collectionLabel: "Пропозиції"
|
|
2310
|
+
};
|
|
2311
|
+
var yl = {};
|
|
2312
|
+
yl = {
|
|
2313
|
+
collectionLabel: "建议"
|
|
2314
|
+
};
|
|
2315
|
+
var bl = {};
|
|
2316
|
+
bl = {
|
|
2317
|
+
collectionLabel: "建議"
|
|
2318
|
+
};
|
|
2319
|
+
var gl = {};
|
|
2320
|
+
gl = {
|
|
2321
|
+
"ar-AE": Vt,
|
|
2322
|
+
"bg-BG": Ot,
|
|
2323
|
+
"cs-CZ": Nt,
|
|
2324
|
+
"da-DK": zt,
|
|
2325
|
+
"de-DE": Ut,
|
|
2326
|
+
"el-GR": Ht,
|
|
2327
|
+
"en-US": qt,
|
|
2328
|
+
"es-ES": Wt,
|
|
2329
|
+
"et-EE": _t,
|
|
2330
|
+
"fi-FI": Gt,
|
|
2331
|
+
"fr-FR": jt,
|
|
2332
|
+
"he-IL": Yt,
|
|
2333
|
+
"hr-HR": Jt,
|
|
2334
|
+
"hu-HU": Xt,
|
|
2335
|
+
"it-IT": Zt,
|
|
2336
|
+
"ja-JP": Qt,
|
|
2337
|
+
"ko-KR": el,
|
|
2338
|
+
"lt-LT": tl,
|
|
2339
|
+
"lv-LV": ll,
|
|
2340
|
+
"nb-NO": il,
|
|
2341
|
+
"nl-NL": nl,
|
|
2342
|
+
"pl-PL": ol,
|
|
2343
|
+
"pt-BR": rl,
|
|
2344
|
+
"pt-PT": sl,
|
|
2345
|
+
"ro-RO": al,
|
|
2346
|
+
"ru-RU": ul,
|
|
2347
|
+
"sk-SK": dl,
|
|
2348
|
+
"sl-SI": cl,
|
|
2349
|
+
"sr-SP": fl,
|
|
2350
|
+
"sv-SE": hl,
|
|
2351
|
+
"tr-TR": pl,
|
|
2352
|
+
"uk-UA": vl,
|
|
2353
|
+
"zh-CN": yl,
|
|
2354
|
+
"zh-TW": bl
|
|
2355
|
+
};
|
|
2356
|
+
function Vi(n) {
|
|
2357
|
+
return n && n.__esModule ? n.default : n;
|
|
2358
|
+
}
|
|
2359
|
+
function Oi(n, e) {
|
|
2360
|
+
let { inputRef: t, collectionRef: l, filter: i, disableAutoFocusFirst: o = !1 } = n, r = re(), s = P(void 0), a = P(!1), c = P(null), v = P(null), h = Fe() !== "virtual";
|
|
2361
|
+
Y(() => () => clearTimeout(s.current), []);
|
|
2362
|
+
let d = ee((p) => {
|
|
2363
|
+
!p.isTrusted && h && t.current && Ie(Be(t.current)) !== t.current && t.current.focus();
|
|
2364
|
+
let K = p.target;
|
|
2365
|
+
p.isTrusted || !K || c.current === K.id || (clearTimeout(s.current), K !== l.current ? a.current ? (c.current = K.id, s.current = setTimeout(() => {
|
|
2366
|
+
e.setFocusedNodeId(K.id);
|
|
2367
|
+
}, 500)) : (c.current = K.id, e.setFocusedNodeId(K.id)) : (c.current = null, e.setFocusedNodeId(null)), a.current = !1);
|
|
2368
|
+
}), y = J((p) => {
|
|
2369
|
+
var K;
|
|
2370
|
+
if (p != null) {
|
|
2371
|
+
var I;
|
|
2372
|
+
(I = v.current) === null || I === void 0 || I.removeEventListener("focusin", d), v.current = p, p.addEventListener("focusin", d);
|
|
2373
|
+
} else (K = v.current) === null || K === void 0 || K.removeEventListener("focusin", d);
|
|
2374
|
+
}, [
|
|
2375
|
+
d
|
|
2376
|
+
]), b = he(T(() => vt(l, y), [
|
|
2377
|
+
l,
|
|
2378
|
+
y
|
|
2379
|
+
])), x = ee(() => {
|
|
2380
|
+
var p;
|
|
2381
|
+
a.current = !0, (p = l.current) === null || p === void 0 || p.dispatchEvent(new CustomEvent(Te, {
|
|
2382
|
+
cancelable: !0,
|
|
2383
|
+
bubbles: !0,
|
|
2384
|
+
detail: {
|
|
2385
|
+
focusStrategy: "first"
|
|
2386
|
+
}
|
|
2387
|
+
}));
|
|
2388
|
+
}), g = ee((p) => {
|
|
2389
|
+
var K;
|
|
2390
|
+
Ve(Ie()), c.current = null, e.setFocusedNodeId(null);
|
|
2391
|
+
let I = new CustomEvent(wt, {
|
|
2392
|
+
cancelable: !0,
|
|
2393
|
+
bubbles: !0,
|
|
2394
|
+
detail: {
|
|
2395
|
+
clearFocusKey: p
|
|
2396
|
+
}
|
|
2397
|
+
});
|
|
2398
|
+
clearTimeout(s.current), a.current = !1, (K = l.current) === null || K === void 0 || K.dispatchEvent(I);
|
|
2399
|
+
}), $ = (p) => {
|
|
2400
|
+
e.inputValue !== p && e.inputValue.length <= p.length && !o ? x() : g(!0), e.setInputValue(p);
|
|
2401
|
+
}, S = P(null), w = (p) => {
|
|
2402
|
+
var K;
|
|
2403
|
+
if (S.current = p.target, p.nativeEvent.isComposing) return;
|
|
2404
|
+
let I = c.current;
|
|
2405
|
+
switch (p.key) {
|
|
2406
|
+
case "a":
|
|
2407
|
+
if (Q(p)) return;
|
|
2408
|
+
break;
|
|
2409
|
+
case "Escape":
|
|
2410
|
+
if (p.isDefaultPrevented()) return;
|
|
2411
|
+
break;
|
|
2412
|
+
case " ":
|
|
2413
|
+
return;
|
|
2414
|
+
case "Tab":
|
|
2415
|
+
"continuePropagation" in p && p.continuePropagation();
|
|
2416
|
+
return;
|
|
2417
|
+
case "Home":
|
|
2418
|
+
case "End":
|
|
2419
|
+
case "PageDown":
|
|
2420
|
+
case "PageUp":
|
|
2421
|
+
case "ArrowUp":
|
|
2422
|
+
case "ArrowDown": {
|
|
2423
|
+
var V;
|
|
2424
|
+
if ((p.key === "Home" || p.key === "End") && I == null && p.shiftKey) return;
|
|
2425
|
+
p.preventDefault();
|
|
2426
|
+
let H = new CustomEvent(Te, {
|
|
2427
|
+
cancelable: !0,
|
|
2428
|
+
bubbles: !0
|
|
2429
|
+
});
|
|
2430
|
+
(V = l.current) === null || V === void 0 || V.dispatchEvent(H);
|
|
2431
|
+
break;
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
p.isPropagationStopped() || p.stopPropagation();
|
|
2435
|
+
let U = !0;
|
|
2436
|
+
if (I == null) U = ((K = l.current) === null || K === void 0 ? void 0 : K.dispatchEvent(new KeyboardEvent(p.nativeEvent.type, p.nativeEvent))) || !1;
|
|
2437
|
+
else {
|
|
2438
|
+
let H = document.getElementById(I);
|
|
2439
|
+
U = (H == null ? void 0 : H.dispatchEvent(new KeyboardEvent(p.nativeEvent.type, p.nativeEvent))) || !1;
|
|
2440
|
+
}
|
|
2441
|
+
if (U) switch (p.key) {
|
|
2442
|
+
case "ArrowLeft":
|
|
2443
|
+
case "ArrowRight":
|
|
2444
|
+
g();
|
|
2445
|
+
break;
|
|
2446
|
+
}
|
|
2447
|
+
}, k = ee((p) => {
|
|
2448
|
+
if (p.target === S.current) {
|
|
2449
|
+
var K;
|
|
2450
|
+
p.stopImmediatePropagation();
|
|
2451
|
+
let I = c.current;
|
|
2452
|
+
if (I == null) (K = l.current) === null || K === void 0 || K.dispatchEvent(new KeyboardEvent(p.type, p));
|
|
2453
|
+
else {
|
|
2454
|
+
let V = document.getElementById(I);
|
|
2455
|
+
V == null || V.dispatchEvent(new KeyboardEvent(p.type, p));
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
});
|
|
2459
|
+
Y(() => (document.addEventListener("keyup", k, !0), () => {
|
|
2460
|
+
document.removeEventListener("keyup", k, !0);
|
|
2461
|
+
}), [
|
|
2462
|
+
k
|
|
2463
|
+
]);
|
|
2464
|
+
let F = Ul(Vi(gl), "@react-aria/autocomplete"), C = Ol({
|
|
2465
|
+
id: r,
|
|
2466
|
+
"aria-label": F.format("collectionLabel")
|
|
2467
|
+
}), A = J((p) => i ? i(p, e.inputValue) : !0, [
|
|
2468
|
+
e.inputValue,
|
|
2469
|
+
i
|
|
2470
|
+
]), M = (p) => {
|
|
2471
|
+
if (!p.isTrusted) return;
|
|
2472
|
+
let K = c.current ? document.getElementById(c.current) : null;
|
|
2473
|
+
K && Le(K, p.relatedTarget);
|
|
2474
|
+
}, G = (p) => {
|
|
2475
|
+
if (!p.isTrusted) return;
|
|
2476
|
+
let K = c.current ? document.getElementById(c.current) : null;
|
|
2477
|
+
if (K) {
|
|
2478
|
+
let I = p.target;
|
|
2479
|
+
queueMicrotask(() => {
|
|
2480
|
+
Le(I, K), Ct(K, I);
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
};
|
|
2484
|
+
var B;
|
|
2485
|
+
return {
|
|
2486
|
+
textFieldProps: {
|
|
2487
|
+
value: e.inputValue,
|
|
2488
|
+
onChange: $,
|
|
2489
|
+
onKeyDown: w,
|
|
2490
|
+
autoComplete: "off",
|
|
2491
|
+
"aria-haspopup": "listbox",
|
|
2492
|
+
"aria-controls": r,
|
|
2493
|
+
// TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
|
|
2494
|
+
"aria-autocomplete": "list",
|
|
2495
|
+
"aria-activedescendant": (B = e.focusedNodeId) !== null && B !== void 0 ? B : void 0,
|
|
2496
|
+
// This disable's iOS's autocorrect suggestions, since the autocomplete provides its own suggestions.
|
|
2497
|
+
autoCorrect: "off",
|
|
2498
|
+
// This disable's the macOS Safari spell check auto corrections.
|
|
2499
|
+
spellCheck: "false",
|
|
2500
|
+
enterKeyHint: "go",
|
|
2501
|
+
onBlur: M,
|
|
2502
|
+
onFocus: G
|
|
2503
|
+
},
|
|
2504
|
+
collectionProps: W(C, {
|
|
2505
|
+
shouldUseVirtualFocus: h,
|
|
2506
|
+
disallowTypeAhead: !0
|
|
2507
|
+
}),
|
|
2508
|
+
collectionRef: b,
|
|
2509
|
+
filter: i != null ? A : void 0
|
|
2510
|
+
};
|
|
2511
|
+
}
|
|
2512
|
+
function Ni(n) {
|
|
2513
|
+
let { onInputChange: e, inputValue: t, defaultInputValue: l = "" } = n, i = (c) => {
|
|
2514
|
+
e && e(c);
|
|
2515
|
+
}, [o, r] = te(null), [s, a] = $t(t, l, i);
|
|
2516
|
+
return {
|
|
2517
|
+
inputValue: s,
|
|
2518
|
+
setInputValue: a,
|
|
2519
|
+
focusedNodeId: o,
|
|
2520
|
+
setFocusedNodeId: r
|
|
2521
|
+
};
|
|
2522
|
+
}
|
|
2523
|
+
const zi = /* @__PURE__ */ O(null), Ui = /* @__PURE__ */ O(null), $l = /* @__PURE__ */ O(null);
|
|
2524
|
+
function An(n) {
|
|
2525
|
+
let e = ft(zi, n.slot);
|
|
2526
|
+
n = W(e, n);
|
|
2527
|
+
let { filter: t, disableAutoFocusFirst: l } = n, i = Ni(n), o = P(null), r = P(null), { textFieldProps: s, collectionProps: a, collectionRef: c, filter: v } = Oi({
|
|
2528
|
+
...pt(n),
|
|
2529
|
+
filter: t,
|
|
2530
|
+
disableAutoFocusFirst: l,
|
|
2531
|
+
inputRef: o,
|
|
2532
|
+
collectionRef: r
|
|
2533
|
+
}, i);
|
|
2534
|
+
return /* @__PURE__ */ m.createElement(fe, {
|
|
2535
|
+
values: [
|
|
2536
|
+
[
|
|
2537
|
+
Ui,
|
|
2538
|
+
i
|
|
2539
|
+
],
|
|
2540
|
+
[
|
|
2541
|
+
Bi,
|
|
2542
|
+
s
|
|
2543
|
+
],
|
|
2544
|
+
[
|
|
2545
|
+
Bt,
|
|
2546
|
+
s
|
|
2547
|
+
],
|
|
2548
|
+
[
|
|
2549
|
+
Pe,
|
|
2550
|
+
{
|
|
2551
|
+
ref: o
|
|
2552
|
+
}
|
|
2553
|
+
],
|
|
2554
|
+
[
|
|
2555
|
+
$l,
|
|
2556
|
+
{
|
|
2557
|
+
filter: v,
|
|
2558
|
+
collectionProps: a,
|
|
2559
|
+
collectionRef: c
|
|
2560
|
+
}
|
|
2561
|
+
]
|
|
2562
|
+
]
|
|
2563
|
+
}, n.children);
|
|
2564
|
+
}
|
|
2565
|
+
const Hi = /* @__PURE__ */ O(null), qi = {
|
|
2566
|
+
CollectionRoot({ collection: n, renderDropIndicator: e }) {
|
|
2567
|
+
return dt(n, null, e);
|
|
2568
|
+
},
|
|
2569
|
+
CollectionBranch({ collection: n, parent: e, renderDropIndicator: t }) {
|
|
2570
|
+
return dt(n, e, t);
|
|
2571
|
+
}
|
|
2572
|
+
};
|
|
2573
|
+
function dt(n, e, t) {
|
|
2574
|
+
return Ft({
|
|
2575
|
+
items: e ? n.getChildren(e.key) : n,
|
|
2576
|
+
dependencies: [
|
|
2577
|
+
t
|
|
2578
|
+
],
|
|
2579
|
+
children(l) {
|
|
2580
|
+
let i = l.render(l);
|
|
2581
|
+
return !t || l.type !== "item" ? i : /* @__PURE__ */ m.createElement(m.Fragment, null, t({
|
|
2582
|
+
type: "item",
|
|
2583
|
+
key: l.key,
|
|
2584
|
+
dropPosition: "before"
|
|
2585
|
+
}), i, Wi(n, l, t));
|
|
2586
|
+
}
|
|
2587
|
+
});
|
|
2588
|
+
}
|
|
2589
|
+
function Wi(n, e, t) {
|
|
2590
|
+
let l = e.key, i = n.getKeyAfter(l), o = i != null ? n.getItem(i) : null;
|
|
2591
|
+
for (; o != null && o.type !== "item"; )
|
|
2592
|
+
i = n.getKeyAfter(o.key), o = i != null ? n.getItem(i) : null;
|
|
2593
|
+
let r = e.nextKey != null ? n.getItem(e.nextKey) : null;
|
|
2594
|
+
for (; r != null && r.type !== "item"; ) r = r.nextKey != null ? n.getItem(r.nextKey) : null;
|
|
2595
|
+
let s = [];
|
|
2596
|
+
if (r == null) {
|
|
2597
|
+
let a = e;
|
|
2598
|
+
for (; a && (!o || a.parentKey !== o.parentKey && o.level < a.level); ) {
|
|
2599
|
+
let c = t({
|
|
2600
|
+
type: "item",
|
|
2601
|
+
key: a.key,
|
|
2602
|
+
dropPosition: "after"
|
|
2603
|
+
});
|
|
2604
|
+
/* @__PURE__ */ Cl(c) && s.push(/* @__PURE__ */ ct(c, {
|
|
2605
|
+
key: `${a.key}-after`
|
|
2606
|
+
})), a = a.parentKey != null ? n.getItem(a.parentKey) : null;
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
return s;
|
|
2610
|
+
}
|
|
2611
|
+
const He = /* @__PURE__ */ O(qi);
|
|
2612
|
+
function Rn(n) {
|
|
2613
|
+
return T(() => n != null ? /* @__PURE__ */ new Set([
|
|
2614
|
+
n
|
|
2615
|
+
]) : null, [
|
|
2616
|
+
n
|
|
2617
|
+
]);
|
|
2618
|
+
}
|
|
2619
|
+
const pe = /* @__PURE__ */ O({}), ml = /* @__PURE__ */ O(null), _i = /* @__PURE__ */ ne(function(e, t) {
|
|
2620
|
+
let { render: l } = R(ml);
|
|
2621
|
+
return /* @__PURE__ */ m.createElement(m.Fragment, null, l(e, t));
|
|
2622
|
+
});
|
|
2623
|
+
function xl(n, e) {
|
|
2624
|
+
var t;
|
|
2625
|
+
let l = n == null ? void 0 : n.renderDropIndicator, i = n == null || (t = n.isVirtualDragging) === null || t === void 0 ? void 0 : t.call(n), o = J((r) => {
|
|
2626
|
+
if (i || e != null && e.isDropTarget(r)) return l ? l(r) : /* @__PURE__ */ m.createElement(_i, {
|
|
2627
|
+
target: r
|
|
2628
|
+
});
|
|
2629
|
+
}, [
|
|
2630
|
+
e == null ? void 0 : e.target,
|
|
2631
|
+
i,
|
|
2632
|
+
l
|
|
2633
|
+
]);
|
|
2634
|
+
return n != null && n.useDropIndicator ? o : void 0;
|
|
2635
|
+
}
|
|
2636
|
+
function Gi(n, e, t) {
|
|
2637
|
+
var l, i;
|
|
2638
|
+
let o = n.focusedKey, r = null;
|
|
2639
|
+
if (!(e == null || (l = e.isVirtualDragging) === null || l === void 0) && l.call(e) && (t == null || (i = t.target) === null || i === void 0 ? void 0 : i.type) === "item") {
|
|
2640
|
+
r = t.target.key;
|
|
2641
|
+
var s;
|
|
2642
|
+
t.target.dropPosition === "after" && (r = (s = t.collection.getKeyAfter(r)) !== null && s !== void 0 ? s : r);
|
|
2643
|
+
}
|
|
2644
|
+
return T(() => new Set([
|
|
2645
|
+
o,
|
|
2646
|
+
r
|
|
2647
|
+
].filter((a) => a != null)), [
|
|
2648
|
+
o,
|
|
2649
|
+
r
|
|
2650
|
+
]);
|
|
2651
|
+
}
|
|
2652
|
+
const Sl = /* @__PURE__ */ O({}), Bn = /* @__PURE__ */ Lt("header", function(e, t) {
|
|
2653
|
+
return [e, t] = ce(e, t, Sl), /* @__PURE__ */ m.createElement("header", {
|
|
2654
|
+
className: "react-aria-Header",
|
|
2655
|
+
...e,
|
|
2656
|
+
ref: t
|
|
2657
|
+
}, e.children);
|
|
2658
|
+
}), ji = /* @__PURE__ */ O({}), Kl = /* @__PURE__ */ O(null), ve = /* @__PURE__ */ O(null), Vn = /* @__PURE__ */ ne(function(e, t) {
|
|
2659
|
+
[e, t] = ce(e, t, Kl);
|
|
2660
|
+
let l = R(ve);
|
|
2661
|
+
return l ? /* @__PURE__ */ m.createElement(Dl, {
|
|
2662
|
+
state: l,
|
|
2663
|
+
props: e,
|
|
2664
|
+
listBoxRef: t
|
|
2665
|
+
}) : /* @__PURE__ */ m.createElement(wi, {
|
|
2666
|
+
content: /* @__PURE__ */ m.createElement(Fi, e)
|
|
2667
|
+
}, (i) => /* @__PURE__ */ m.createElement(Yi, {
|
|
2668
|
+
props: e,
|
|
2669
|
+
listBoxRef: t,
|
|
2670
|
+
collection: i
|
|
2671
|
+
}));
|
|
2672
|
+
});
|
|
2673
|
+
function Yi({ props: n, listBoxRef: e, collection: t }) {
|
|
2674
|
+
n = {
|
|
2675
|
+
...n,
|
|
2676
|
+
collection: t,
|
|
2677
|
+
children: null,
|
|
2678
|
+
items: null
|
|
2679
|
+
};
|
|
2680
|
+
let { layoutDelegate: l } = R(He), i = Ai({
|
|
2681
|
+
...n,
|
|
2682
|
+
layoutDelegate: l
|
|
2683
|
+
});
|
|
2684
|
+
return /* @__PURE__ */ m.createElement(Dl, {
|
|
2685
|
+
state: i,
|
|
2686
|
+
props: n,
|
|
2687
|
+
listBoxRef: e
|
|
2688
|
+
});
|
|
2689
|
+
}
|
|
2690
|
+
function Dl({ state: n, props: e, listBoxRef: t }) {
|
|
2691
|
+
var l;
|
|
2692
|
+
let { filter: i, collectionProps: o, collectionRef: r } = R($l) || {};
|
|
2693
|
+
e = T(() => o ? {
|
|
2694
|
+
...e,
|
|
2695
|
+
...o
|
|
2696
|
+
} : e, [
|
|
2697
|
+
e,
|
|
2698
|
+
o
|
|
2699
|
+
]);
|
|
2700
|
+
let { dragAndDropHooks: s, layout: a = "stack", orientation: c = "vertical" } = e;
|
|
2701
|
+
t = he(T(() => vt(t, r !== void 0 ? r : null), [
|
|
2702
|
+
r,
|
|
2703
|
+
t
|
|
2704
|
+
]));
|
|
2705
|
+
let v = Ri(n, i), { collection: h, selectionManager: d } = v, y = !!(s != null && s.useDraggableCollectionState), b = !!(s != null && s.useDroppableCollectionState), { direction: x } = Kt(), { disabledBehavior: g, disabledKeys: $ } = d, S = Dt({
|
|
2706
|
+
usage: "search",
|
|
2707
|
+
sensitivity: "base"
|
|
2708
|
+
}), { isVirtualized: w, layoutDelegate: k, dropTargetDelegate: F, CollectionRoot: C } = R(He), A = T(() => e.keyboardDelegate || new Pt({
|
|
2709
|
+
collection: h,
|
|
2710
|
+
collator: S,
|
|
2711
|
+
ref: t,
|
|
2712
|
+
disabledKeys: $,
|
|
2713
|
+
disabledBehavior: g,
|
|
2714
|
+
layout: a,
|
|
2715
|
+
orientation: c,
|
|
2716
|
+
direction: x,
|
|
2717
|
+
layoutDelegate: k
|
|
2718
|
+
}), [
|
|
2719
|
+
h,
|
|
2720
|
+
S,
|
|
2721
|
+
t,
|
|
2722
|
+
g,
|
|
2723
|
+
$,
|
|
2724
|
+
c,
|
|
2725
|
+
x,
|
|
2726
|
+
e.keyboardDelegate,
|
|
2727
|
+
a,
|
|
2728
|
+
k
|
|
2729
|
+
]), { listBoxProps: M } = ci({
|
|
2730
|
+
...e,
|
|
2731
|
+
shouldSelectOnPressUp: y || e.shouldSelectOnPressUp,
|
|
2732
|
+
keyboardDelegate: A,
|
|
2733
|
+
isVirtualized: w
|
|
2734
|
+
}, v, t), G = P(y), B = P(b);
|
|
2735
|
+
Y(() => {
|
|
2736
|
+
process.env.NODE_ENV !== "production" && (G.current !== y && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), B.current !== b && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));
|
|
2737
|
+
}, [
|
|
2738
|
+
y,
|
|
2739
|
+
b
|
|
2740
|
+
]);
|
|
2741
|
+
let p, K, I, V = !1, U = null, H = P(null);
|
|
2742
|
+
if (y && s) {
|
|
2743
|
+
p = s.useDraggableCollectionState({
|
|
2744
|
+
collection: h,
|
|
2745
|
+
selectionManager: d,
|
|
2746
|
+
preview: s.renderDragPreview ? H : void 0
|
|
2747
|
+
}), s.useDraggableCollection({}, p, t);
|
|
2748
|
+
let _ = s.DragPreview;
|
|
2749
|
+
U = s.renderDragPreview ? /* @__PURE__ */ m.createElement(_, {
|
|
2750
|
+
ref: H
|
|
2751
|
+
}, s.renderDragPreview) : null;
|
|
2752
|
+
}
|
|
2753
|
+
if (b && s) {
|
|
2754
|
+
K = s.useDroppableCollectionState({
|
|
2755
|
+
collection: h,
|
|
2756
|
+
selectionManager: d
|
|
2757
|
+
});
|
|
2758
|
+
let _ = s.dropTargetDelegate || F || new s.ListDropTargetDelegate(h, t, {
|
|
2759
|
+
orientation: c,
|
|
2760
|
+
layout: a,
|
|
2761
|
+
direction: x
|
|
2762
|
+
});
|
|
2763
|
+
I = s.useDroppableCollection({
|
|
2764
|
+
keyboardDelegate: A,
|
|
2765
|
+
dropTargetDelegate: _
|
|
2766
|
+
}, K, t), V = K.isDropTarget({
|
|
2767
|
+
type: "root"
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2770
|
+
let { focusProps: f, isFocused: u, isFocusVisible: E } = Xl(), L = v.collection.size === 0 || v.collection.size === 1 && ((l = v.collection.getItem(v.collection.getFirstKey())) === null || l === void 0 ? void 0 : l.type) === "loader", N = {
|
|
2771
|
+
isDropTarget: V,
|
|
2772
|
+
isEmpty: L,
|
|
2773
|
+
isFocused: u,
|
|
2774
|
+
isFocusVisible: E,
|
|
2775
|
+
layout: e.layout || "stack",
|
|
2776
|
+
state: v
|
|
2777
|
+
}, z = oe({
|
|
2778
|
+
className: e.className,
|
|
2779
|
+
style: e.style,
|
|
2780
|
+
defaultClassName: "react-aria-ListBox",
|
|
2781
|
+
values: N
|
|
2782
|
+
}), q = null;
|
|
2783
|
+
return L && e.renderEmptyState && (q = /* @__PURE__ */ m.createElement("div", {
|
|
2784
|
+
// eslint-disable-next-line
|
|
2785
|
+
role: "option",
|
|
2786
|
+
style: {
|
|
2787
|
+
display: "contents"
|
|
2788
|
+
}
|
|
2789
|
+
}, e.renderEmptyState(N))), /* @__PURE__ */ m.createElement(Jl, null, /* @__PURE__ */ m.createElement("div", {
|
|
2790
|
+
...se(e),
|
|
2791
|
+
...W(M, f, I == null ? void 0 : I.collectionProps),
|
|
2792
|
+
...z,
|
|
2793
|
+
ref: t,
|
|
2794
|
+
slot: e.slot || void 0,
|
|
2795
|
+
onScroll: e.onScroll,
|
|
2796
|
+
"data-drop-target": V || void 0,
|
|
2797
|
+
"data-empty": L || void 0,
|
|
2798
|
+
"data-focused": u || void 0,
|
|
2799
|
+
"data-focus-visible": E || void 0,
|
|
2800
|
+
"data-layout": e.layout || "stack",
|
|
2801
|
+
"data-orientation": e.orientation || "vertical"
|
|
2802
|
+
}, /* @__PURE__ */ m.createElement(fe, {
|
|
2803
|
+
values: [
|
|
2804
|
+
[
|
|
2805
|
+
Kl,
|
|
2806
|
+
e
|
|
2807
|
+
],
|
|
2808
|
+
[
|
|
2809
|
+
ve,
|
|
2810
|
+
v
|
|
2811
|
+
],
|
|
2812
|
+
[
|
|
2813
|
+
pe,
|
|
2814
|
+
{
|
|
2815
|
+
dragAndDropHooks: s,
|
|
2816
|
+
dragState: p,
|
|
2817
|
+
dropState: K
|
|
2818
|
+
}
|
|
2819
|
+
],
|
|
2820
|
+
[
|
|
2821
|
+
ji,
|
|
2822
|
+
{
|
|
2823
|
+
elementType: "div"
|
|
2824
|
+
}
|
|
2825
|
+
],
|
|
2826
|
+
[
|
|
2827
|
+
ml,
|
|
2828
|
+
{
|
|
2829
|
+
render: Ji
|
|
2830
|
+
}
|
|
2831
|
+
],
|
|
2832
|
+
[
|
|
2833
|
+
Hi,
|
|
2834
|
+
{
|
|
2835
|
+
name: "ListBoxSection",
|
|
2836
|
+
render: wl
|
|
2837
|
+
}
|
|
2838
|
+
]
|
|
2839
|
+
]
|
|
2840
|
+
}, /* @__PURE__ */ m.createElement(C, {
|
|
2841
|
+
collection: h,
|
|
2842
|
+
scrollRef: t,
|
|
2843
|
+
persistedKeys: Gi(d, s, K),
|
|
2844
|
+
renderDropIndicator: xl(s, K)
|
|
2845
|
+
})), q, U));
|
|
2846
|
+
}
|
|
2847
|
+
function wl(n, e, t, l = "react-aria-ListBoxSection") {
|
|
2848
|
+
let i = R(ve), { dragAndDropHooks: o, dropState: r } = R(pe), { CollectionBranch: s } = R(He), [a, c] = ht();
|
|
2849
|
+
var v;
|
|
2850
|
+
let { headingProps: h, groupProps: d } = $i({
|
|
2851
|
+
heading: c,
|
|
2852
|
+
"aria-label": (v = n["aria-label"]) !== null && v !== void 0 ? v : void 0
|
|
2853
|
+
}), y = oe({
|
|
2854
|
+
defaultClassName: l,
|
|
2855
|
+
className: n.className,
|
|
2856
|
+
style: n.style,
|
|
2857
|
+
values: {}
|
|
2858
|
+
});
|
|
2859
|
+
return /* @__PURE__ */ m.createElement("section", {
|
|
2860
|
+
...se(n),
|
|
2861
|
+
...d,
|
|
2862
|
+
...y,
|
|
2863
|
+
ref: e
|
|
2864
|
+
}, /* @__PURE__ */ m.createElement(Sl.Provider, {
|
|
2865
|
+
value: {
|
|
2866
|
+
...h,
|
|
2867
|
+
ref: a
|
|
2868
|
+
}
|
|
2869
|
+
}, /* @__PURE__ */ m.createElement(s, {
|
|
2870
|
+
collection: i.collection,
|
|
2871
|
+
parent: t,
|
|
2872
|
+
renderDropIndicator: xl(o, r)
|
|
2873
|
+
})));
|
|
2874
|
+
}
|
|
2875
|
+
const On = /* @__PURE__ */ Ii("section", wl), Nn = /* @__PURE__ */ Lt("item", function(e, t, l) {
|
|
2876
|
+
let i = he(t), o = R(ve), { dragAndDropHooks: r, dragState: s, dropState: a } = R(pe), { optionProps: c, labelProps: v, descriptionProps: h, ...d } = gi({
|
|
2877
|
+
key: l.key,
|
|
2878
|
+
"aria-label": e == null ? void 0 : e["aria-label"]
|
|
2879
|
+
}, o, i), { hoverProps: y, isHovered: b } = St({
|
|
2880
|
+
isDisabled: !d.allowsSelection && !d.hasAction,
|
|
2881
|
+
onHoverStart: l.props.onHoverStart,
|
|
2882
|
+
onHoverChange: l.props.onHoverChange,
|
|
2883
|
+
onHoverEnd: l.props.onHoverEnd
|
|
2884
|
+
}), x = null;
|
|
2885
|
+
s && r && (x = r.useDraggableItem({
|
|
2886
|
+
key: l.key
|
|
2887
|
+
}, s));
|
|
2888
|
+
let g = null;
|
|
2889
|
+
a && r && (g = r.useDroppableItem({
|
|
2890
|
+
target: {
|
|
2891
|
+
type: "item",
|
|
2892
|
+
key: l.key,
|
|
2893
|
+
dropPosition: "on"
|
|
2894
|
+
}
|
|
2895
|
+
}, a, i));
|
|
2896
|
+
let $ = s && s.isDragging(l.key), S = oe({
|
|
2897
|
+
...e,
|
|
2898
|
+
id: void 0,
|
|
2899
|
+
children: e.children,
|
|
2900
|
+
defaultClassName: "react-aria-ListBoxItem",
|
|
2901
|
+
values: {
|
|
2902
|
+
...d,
|
|
2903
|
+
isHovered: b,
|
|
2904
|
+
selectionMode: o.selectionManager.selectionMode,
|
|
2905
|
+
selectionBehavior: o.selectionManager.selectionBehavior,
|
|
2906
|
+
allowsDragging: !!s,
|
|
2907
|
+
isDragging: $,
|
|
2908
|
+
isDropTarget: g == null ? void 0 : g.isDropTarget
|
|
2909
|
+
}
|
|
2910
|
+
});
|
|
2911
|
+
Y(() => {
|
|
2912
|
+
!l.textValue && process.env.NODE_ENV !== "production" && console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");
|
|
2913
|
+
}, [
|
|
2914
|
+
l.textValue
|
|
2915
|
+
]);
|
|
2916
|
+
let w = e.href ? "a" : "div";
|
|
2917
|
+
return /* @__PURE__ */ m.createElement(w, {
|
|
2918
|
+
...W(c, y, x == null ? void 0 : x.dragProps, g == null ? void 0 : g.dropProps),
|
|
2919
|
+
...S,
|
|
2920
|
+
ref: i,
|
|
2921
|
+
"data-allows-dragging": !!s || void 0,
|
|
2922
|
+
"data-selected": d.isSelected || void 0,
|
|
2923
|
+
"data-disabled": d.isDisabled || void 0,
|
|
2924
|
+
"data-hovered": b || void 0,
|
|
2925
|
+
"data-focused": d.isFocused || void 0,
|
|
2926
|
+
"data-focus-visible": d.isFocusVisible || void 0,
|
|
2927
|
+
"data-pressed": d.isPressed || void 0,
|
|
2928
|
+
"data-dragging": $ || void 0,
|
|
2929
|
+
"data-drop-target": (g == null ? void 0 : g.isDropTarget) || void 0,
|
|
2930
|
+
"data-selection-mode": o.selectionManager.selectionMode === "none" ? void 0 : o.selectionManager.selectionMode
|
|
2931
|
+
}, /* @__PURE__ */ m.createElement(fe, {
|
|
2932
|
+
values: [
|
|
2933
|
+
[
|
|
2934
|
+
bt,
|
|
2935
|
+
{
|
|
2936
|
+
slots: {
|
|
2937
|
+
[El]: v,
|
|
2938
|
+
label: v,
|
|
2939
|
+
description: h
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
]
|
|
2943
|
+
]
|
|
2944
|
+
}, S.children));
|
|
2945
|
+
});
|
|
2946
|
+
function Ji(n, e) {
|
|
2947
|
+
e = he(e);
|
|
2948
|
+
let { dragAndDropHooks: t, dropState: l } = R(pe), { dropIndicatorProps: i, isHidden: o, isDropTarget: r } = t.useDropIndicator(n, l, e);
|
|
2949
|
+
return o ? null : /* @__PURE__ */ m.createElement(Zi, {
|
|
2950
|
+
...n,
|
|
2951
|
+
dropIndicatorProps: i,
|
|
2952
|
+
isDropTarget: r,
|
|
2953
|
+
ref: e
|
|
2954
|
+
});
|
|
2955
|
+
}
|
|
2956
|
+
function Xi(n, e) {
|
|
2957
|
+
let { dropIndicatorProps: t, isDropTarget: l, ...i } = n, o = oe({
|
|
2958
|
+
...i,
|
|
2959
|
+
defaultClassName: "react-aria-DropIndicator",
|
|
2960
|
+
values: {
|
|
2961
|
+
isDropTarget: l
|
|
2962
|
+
}
|
|
2963
|
+
});
|
|
2964
|
+
return /* @__PURE__ */ m.createElement("div", {
|
|
2965
|
+
...t,
|
|
2966
|
+
...o,
|
|
2967
|
+
// eslint-disable-next-line
|
|
2968
|
+
role: "option",
|
|
2969
|
+
ref: e,
|
|
2970
|
+
"data-drop-target": l || void 0
|
|
2971
|
+
});
|
|
2972
|
+
}
|
|
2973
|
+
const Zi = /* @__PURE__ */ ne(Xi);
|
|
2974
|
+
export {
|
|
2975
|
+
Ql as $,
|
|
2976
|
+
Rn as A,
|
|
2977
|
+
Ai as a,
|
|
2978
|
+
Pt as b,
|
|
2979
|
+
ri as c,
|
|
2980
|
+
wi as d,
|
|
2981
|
+
Kl as e,
|
|
2982
|
+
ve as f,
|
|
2983
|
+
Vn as g,
|
|
2984
|
+
Nn as h,
|
|
2985
|
+
On as i,
|
|
2986
|
+
Bn as j,
|
|
2987
|
+
Fi as k,
|
|
2988
|
+
Oe as l,
|
|
2989
|
+
ai as m,
|
|
2990
|
+
kt as n,
|
|
2991
|
+
bi as o,
|
|
2992
|
+
Ct as p,
|
|
2993
|
+
li as q,
|
|
2994
|
+
at as r,
|
|
2995
|
+
An as s,
|
|
2996
|
+
Ln as t,
|
|
2997
|
+
di as u,
|
|
2998
|
+
Tn as v,
|
|
2999
|
+
ui as w,
|
|
3000
|
+
Lt as x,
|
|
3001
|
+
He as y,
|
|
3002
|
+
qi as z
|
|
3003
|
+
};
|
|
3004
|
+
//# sourceMappingURL=ListBox-Dss9OMcn.js.map
|