@servicetitan/anvil2 1.44.2 → 1.45.1
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/CHANGELOG.md +20 -7
- package/README.md +0 -8
- package/dist/Alert-BNGvfMAV.js +112 -0
- package/dist/Alert-BNGvfMAV.js.map +1 -0
- package/dist/{Alert-C3WoRkeN.css → Alert.css} +0 -1
- package/dist/Alert.js +1 -1
- package/dist/{Announcement-ButSjdLn.js → Announcement-CoheCP1i.js} +23 -28
- package/dist/Announcement-CoheCP1i.js.map +1 -0
- package/dist/Announcement.css +0 -1
- package/dist/Announcement.js +1 -1
- package/dist/{HammerProvider-vt3DkcCZ-06BeBrPu.js → AnvilProvider-C_qRQnE6.js} +22 -12
- package/dist/AnvilProvider-C_qRQnE6.js.map +1 -0
- package/dist/AnvilProvider.js +1 -1
- package/dist/{Avatar-DREZJN2K.js → Avatar-CyGjhToG.js} +3 -10
- package/dist/Avatar-CyGjhToG.js.map +1 -0
- package/dist/{Avatar-C7cbRTCt-DCvzmr2C.js → Avatar-D07f9NH_.js} +9 -9
- package/dist/Avatar-D07f9NH_.js.map +1 -0
- package/dist/{Avatar-C7cbRTCt.css → Avatar.css} +0 -1
- package/dist/Avatar.js +2 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/{Badge-7aZfE-LH.js → Badge-DCA9mfc2.js} +5 -12
- package/dist/Badge-DCA9mfc2.js.map +1 -0
- package/dist/Badge.css +0 -1
- package/dist/Badge.js +1 -1
- package/dist/{Breadcrumbs-BMbkH9hL-BUjQksuj.js → Breadcrumbs-C4_PEolS.js} +7 -7
- package/dist/Breadcrumbs-C4_PEolS.js.map +1 -0
- package/dist/{Breadcrumbs-BMbkH9hL.css → Breadcrumbs.css} +0 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Button-BaHFf1AT-BQy-PFB5.js → Button-BxFXQ0-n.js} +31 -16
- package/dist/Button-BxFXQ0-n.js.map +1 -0
- package/dist/Button.css +59 -46
- package/dist/Button.js +1 -1
- package/dist/Button.module-pUNSKoVC.js +25 -0
- package/dist/Button.module-pUNSKoVC.js.map +1 -0
- package/dist/ButtonCompound-BF2Q6gGX.js +64 -0
- package/dist/ButtonCompound-BF2Q6gGX.js.map +1 -0
- package/dist/ButtonCompound.js +1 -1
- package/dist/{ButtonLink-5qlX0uZx-b9H7MGhk.js → ButtonLink-CXv65WVV.js} +35 -17
- package/dist/ButtonLink-CXv65WVV.js.map +1 -0
- package/dist/ButtonLink.js +1 -1
- package/dist/{ButtonToggle-Bm4KRl3o-B1-LbfjY.js → ButtonToggle-pSwg7NvT.js} +26 -5
- package/dist/ButtonToggle-pSwg7NvT.js.map +1 -0
- package/dist/ButtonToggle.js +1 -1
- package/dist/{Calendar-BvftKznl-D4_xp9Rv.js → Calendar-Dq_of5A3.js} +324 -255
- package/dist/Calendar-Dq_of5A3.js.map +1 -0
- package/dist/{Calendar-BvftKznl.css → Calendar.css} +0 -1
- package/dist/Calendar.js +1 -1
- package/dist/{Card-ZknG-yim-7W6rYSFV.js → Card-vTYeSkxt.js} +3 -3
- package/dist/Card-vTYeSkxt.js.map +1 -0
- package/dist/{Card-ZknG-yim.css → Card.css} +0 -1
- package/dist/Card.js +1 -1
- package/dist/{Checkbox-zg8LVvB6.js → Checkbox-3y2d9mBd.js} +4 -10
- package/dist/Checkbox-3y2d9mBd.js.map +1 -0
- package/dist/{Checkbox-DyHm7Ntt-DYw5QL3l.js → Checkbox-BiOzGpgJ.js} +9 -11
- package/dist/Checkbox-BiOzGpgJ.js.map +1 -0
- package/dist/Checkbox.js +2 -1
- package/dist/Checkbox.js.map +1 -1
- package/dist/{Chip-MbBEXeAm-DmAcwPRJ.js → Chip-Bz-vlQ4D.js} +37 -10
- package/dist/Chip-Bz-vlQ4D.js.map +1 -0
- package/dist/{Chip-MbBEXeAm.css → Chip.css} +0 -1
- package/dist/Chip.js +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DateField-Bqsnpt8S.js → DateField-B2mnasH5.js} +42 -45
- package/dist/DateField-B2mnasH5.js.map +1 -0
- package/dist/DateField.js +1 -1
- package/dist/DateFieldRange-DPbyzuHb.js +557 -0
- package/dist/DateFieldRange-DPbyzuHb.js.map +1 -0
- package/dist/DateFieldRange.js +1 -1
- package/dist/DateFieldSingle-CfAJDcx9.js +450 -0
- package/dist/DateFieldSingle-CfAJDcx9.js.map +1 -0
- package/dist/DateFieldSingle.js +1 -1
- package/dist/DateFieldYearless-ydxcsmRV.js +266 -0
- package/dist/DateFieldYearless-ydxcsmRV.js.map +1 -0
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DaysOfTheWeek-ImBPjEvl.js → DaysOfTheWeek-BYvE9QK5.js} +9 -28
- package/dist/DaysOfTheWeek-BYvE9QK5.js.map +1 -0
- package/dist/DaysOfTheWeek.css +0 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Details-DVg0EOkv.js → Details-CF8DImjw.js} +34 -100
- package/dist/Details-CF8DImjw.js.map +1 -0
- package/dist/Details.css +0 -1
- package/dist/Details.js +1 -1
- package/dist/{Dialog-BR6f-XRH.js → Dialog-DpH2Qvbd.js} +71 -166
- package/dist/Dialog-DpH2Qvbd.js.map +1 -0
- package/dist/Dialog.css +29 -30
- package/dist/Dialog.js +1 -1
- package/dist/{Divider-B0xGfyWE-f5-ThMiS.js → Divider-DJe8kLf2.js} +3 -3
- package/dist/Divider-DJe8kLf2.js.map +1 -0
- package/dist/{Divider-B0xGfyWE.css → Divider.css} +0 -1
- package/dist/Divider.js +1 -1
- package/dist/Dnd.js +1 -1
- package/dist/DndSort.css +0 -1
- package/dist/DndSort.js +5545 -1
- package/dist/DndSort.js.map +1 -1
- package/dist/Drawer-DI_k6W2k.js +377 -0
- package/dist/Drawer-DI_k6W2k.js.map +1 -0
- package/dist/Drawer.css +161 -0
- package/dist/Drawer.js +1 -1
- package/dist/{floating-ui.react-BFNinq1w.js → DrawerContext-DboTgTmo.js} +958 -908
- package/dist/DrawerContext-DboTgTmo.js.map +1 -0
- package/dist/{EditCard-B_n1uFkv.js → EditCard-WKzZ2XCz.js} +12 -19
- package/dist/EditCard-WKzZ2XCz.js.map +1 -0
- package/dist/EditCard.css +0 -1
- package/dist/EditCard.js +1 -1
- package/dist/FieldLabel-BfnCXung.js +87 -0
- package/dist/FieldLabel-BfnCXung.js.map +1 -0
- package/dist/FieldLabel.css +60 -0
- package/dist/FieldLabel.js +1 -1
- package/dist/{FieldMessage-Bobp105T-DYhStLY4.js → FieldMessage-B7uQ8vmr.js} +3 -3
- package/dist/FieldMessage-B7uQ8vmr.js.map +1 -0
- package/dist/{FieldMessage-Bobp105T.css → FieldMessage.css} +0 -2
- package/dist/FieldMessage.js +1 -1
- package/dist/{Flex-CiK7uNUu-BfxHG4L0.js → Flex-BdQMekvA.js} +3 -3
- package/dist/Flex-BdQMekvA.js.map +1 -0
- package/dist/{Flex-CiK7uNUu.css → Flex.css} +0 -1
- package/dist/Flex.js +1 -1
- package/dist/{Grid-DFAd8mTe.js → Grid-MGUC698u.js} +48 -30
- package/dist/Grid-MGUC698u.js.map +1 -0
- package/dist/Grid.css +0 -1
- package/dist/Grid.js +1 -1
- package/dist/{Helper-h7k80qls-DHPFHTvI.js → Helper-BkIDJqgA.js} +4 -4
- package/dist/Helper-BkIDJqgA.js.map +1 -0
- package/dist/{Helper-h7k80qls.css → Helper.css} +0 -1
- package/dist/{Icon-B6HmlQiR-BxQkO3X5.js → Icon-D8SPKeO4.js} +3 -3
- package/dist/Icon-D8SPKeO4.js.map +1 -0
- package/dist/{Icon-B6HmlQiR.css → Icon.css} +0 -1
- package/dist/Icon.js +1 -1
- package/dist/{InputMask-BuO8lNAB-DdxdO5Jw.js → InputMask-O_qi1p_3.js} +88 -67
- package/dist/InputMask-O_qi1p_3.js.map +1 -0
- package/dist/InputMask.js +1 -1
- package/dist/Link-eRsLWPaQ.js +103 -0
- package/dist/Link-eRsLWPaQ.js.map +1 -0
- package/dist/{Link-MiffPrW9.css → Link.css} +0 -1
- package/dist/Link.js +1 -1
- package/dist/Link.module-Cf17JWod.js +12 -0
- package/dist/Link.module-Cf17JWod.js.map +1 -0
- package/dist/LinkButton-2lXfrVoU.js +64 -0
- package/dist/LinkButton-2lXfrVoU.js.map +1 -0
- package/dist/LinkButton.js +1 -75
- package/dist/LinkButton.js.map +1 -1
- package/dist/{ListView-DVPhWDCM.js → ListView-jR2ZkBB7.js} +151 -234
- package/dist/ListView-jR2ZkBB7.js.map +1 -0
- package/dist/ListView.css +0 -1
- package/dist/ListView.js +1 -1
- package/dist/{ListView.module-MVsNF0X0-MVsNF0X0.js → ListView.module-MVsNF0X0.js} +1 -1
- package/dist/ListView.module-MVsNF0X0.js.map +1 -0
- package/dist/{Listbox-B-WUuj-_-BWWeWtLW.js → Listbox-CUhMbFm2.js} +67 -50
- package/dist/Listbox-CUhMbFm2.js.map +1 -0
- package/dist/Listbox.css +0 -1
- package/dist/Listbox.js +1 -1
- package/dist/{Listbox.module-DcBE8Zmo-DcBE8Zmo.js → Listbox.module-DcBE8Zmo.js} +1 -1
- package/dist/Listbox.module-DcBE8Zmo.js.map +1 -0
- package/dist/{LocalizationContext-UsmB5mnR-BUIYgNp2.js → LocalizationContext-UsmB5mnR.js} +2 -2
- package/dist/LocalizationContext-UsmB5mnR.js.map +1 -0
- package/dist/{LocalizationProvider-VtRAfGBT-Bo8XuFoE.js → LocalizationProvider-DEZyjW5d.js} +3 -3
- package/dist/LocalizationProvider-DEZyjW5d.js.map +1 -0
- package/dist/LocalizationProvider.d.ts +0 -4
- package/dist/LocalizationProvider.js +2 -2
- package/dist/{Menu-TtVJnSrA-yBYichuJ.js → Menu-C8we5CHP.js} +52 -22
- package/dist/Menu-C8we5CHP.js.map +1 -0
- package/dist/{Menu-TtVJnSrA.css → Menu.css} +0 -2
- package/dist/Menu.js +1 -1
- package/dist/{NumberField-C9lMsPMD.js → NumberField-1_gRsWT4.js} +158 -175
- package/dist/NumberField-1_gRsWT4.js.map +1 -0
- package/dist/NumberField.css +7 -8
- package/dist/NumberField.js +1 -1
- package/dist/{Overflow-CFClqFVC.css → Overflow.css} +0 -2
- package/dist/Overflow.js +400 -1
- package/dist/Overflow.js.map +1 -1
- package/dist/{Page-CGAylFKz.js → Page-CY6QRlvb.js} +14 -14
- package/dist/Page-CY6QRlvb.js.map +1 -0
- package/dist/Page.js +1 -1
- package/dist/{Pagination-DU_qvFRR.js → Pagination-ta8a2cJN.js} +29 -30
- package/dist/Pagination-ta8a2cJN.js.map +1 -0
- package/dist/Pagination.css +28 -28
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CU2cGVD8-Casl3vM1.js → Popover-r26xMIfm.js} +260 -229
- package/dist/Popover-r26xMIfm.js.map +1 -0
- package/dist/{Popover-CU2cGVD8.css → Popover.css} +0 -2
- package/dist/Popover.js +1 -1
- package/dist/{PortalProvider-9lXkQ0xY-BKoGegS1.js → PortalProvider-9lXkQ0xY.js} +2 -2
- package/dist/PortalProvider-9lXkQ0xY.js.map +1 -0
- package/dist/PortalProvider.d.ts +0 -4
- package/dist/PortalProvider.js +1 -1
- package/dist/ProgressBar-BnXuQ6Bx.js +130 -0
- package/dist/ProgressBar-BnXuQ6Bx.js.map +1 -0
- package/dist/ProgressBar.css +89 -0
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-DnOuBPi_.js → Radio-CwmRUIzo.js} +4 -10
- package/dist/Radio-CwmRUIzo.js.map +1 -0
- package/dist/Radio.js +2 -1
- package/dist/Radio.js.map +1 -1
- package/dist/{Radio-DQ_VQFGZ-SdFBlDnE.js → RadioGroup-BNCWIHOG.js} +84 -105
- package/dist/RadioGroup-BNCWIHOG.js.map +1 -0
- package/dist/{Radio-DQ_VQFGZ.css → RadioGroup.css} +0 -1
- package/dist/{SearchField-BGPqpnVd.js → SearchField-BKXkoWPs.js} +21 -27
- package/dist/SearchField-BKXkoWPs.js.map +1 -0
- package/dist/SearchField.css +0 -1
- package/dist/SearchField.js +1 -1
- package/dist/{SegmentedControl-DY1PSYmd.js → SegmentedControl-CsjjV1Dz.js} +32 -80
- package/dist/SegmentedControl-CsjjV1Dz.js.map +1 -0
- package/dist/SegmentedControl.css +0 -1
- package/dist/SegmentedControl.js +1 -1
- package/dist/{SelectCard-LSAl_7Lh-BYtfe9PC.js → SelectCard-DOGCG0zr.js} +17 -17
- package/dist/SelectCard-DOGCG0zr.js.map +1 -0
- package/dist/{SelectCard-LSAl_7Lh.css → SelectCard.css} +0 -1
- package/dist/SelectCard.js +1 -1
- package/dist/{SelectTrigger-C2w-flvK.js → SelectTrigger-BMo0e-F7.js} +31 -44
- package/dist/SelectTrigger-BMo0e-F7.js.map +1 -0
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-Dj154EN4-BtTvR-Nh.js → SelectTriggerBase-BMMxnXrw.js} +54 -40
- package/dist/SelectTriggerBase-BMMxnXrw.js.map +1 -0
- package/dist/{SelectTriggerBase-Dj154EN4.css → SelectTriggerBase.css} +68 -54
- package/dist/{SideNav-Bh_pVeEw.js → SideNav-CBAzYyML.js} +71 -154
- package/dist/SideNav-CBAzYyML.js.map +1 -0
- package/dist/SideNav.css +0 -1
- package/dist/SideNav.js +1 -1
- package/dist/Skeleton.css +0 -1
- package/dist/Skeleton.d.ts +0 -4
- package/dist/Skeleton.js +190 -1
- package/dist/Skeleton.js.map +1 -1
- package/dist/{Spinner-DliJVzdW-BQlZEj4V.js → Spinner-wmO8Epw0.js} +2 -2
- package/dist/Spinner-wmO8Epw0.js.map +1 -0
- package/dist/{Spinner-DliJVzdW.css → Spinner.css} +0 -1
- package/dist/Spinner.js +1 -1
- package/dist/{SrOnly-BsKDHetF-B93X65F1.js → SrOnly-CTsYSuby.js} +2 -2
- package/dist/SrOnly-CTsYSuby.js.map +1 -0
- package/dist/{SrOnly-BsKDHetF.css → SrOnly.css} +0 -1
- package/dist/SrOnly.js +1 -1
- package/dist/{Stepper-BtbDBIzz.js → Stepper-D-fOH9TF.js} +142 -326
- package/dist/Stepper-D-fOH9TF.js.map +1 -0
- package/dist/Stepper.css +43 -44
- package/dist/Stepper.js +1 -1
- package/dist/{Switch-DAQFzi-X.js → Switch-C2ddZcr9.js} +22 -28
- package/dist/Switch-C2ddZcr9.js.map +1 -0
- package/dist/Switch.css +0 -1
- package/dist/Switch.js +1 -1
- package/dist/{Tab-BSC7e4rM.js → Tab-wNucMTgo.js} +42 -120
- package/dist/Tab-wNucMTgo.js.map +1 -0
- package/dist/Tab.css +0 -1
- package/dist/Tab.js +1 -1
- package/dist/{Text-CED_yrId-DsRYZw2-.js → Text-BqvcbXyp.js} +3 -3
- package/dist/Text-BqvcbXyp.js.map +1 -0
- package/dist/{Text-CED_yrId.css → Text.css} +0 -1
- package/dist/Text.js +1 -1
- package/dist/TextField-CwgE_JJU.js +13 -0
- package/dist/TextField-CwgE_JJU.js.map +1 -0
- package/dist/{TextField-DoPP1CQ--UWAOTYiv.js → TextField-DlsZEkS0.js} +29 -12
- package/dist/TextField-DlsZEkS0.js.map +1 -0
- package/dist/TextField.css +0 -1
- package/dist/TextField.js +1 -1
- package/dist/{TextField.module-EkKlj66e-EkKlj66e.js → TextField.module-EkKlj66e.js} +1 -1
- package/dist/TextField.module-EkKlj66e.js.map +1 -0
- package/dist/{Textarea-D2AAZ1L3.js → Textarea-DU-SpoDL.js} +38 -44
- package/dist/Textarea-DU-SpoDL.js.map +1 -0
- package/dist/Textarea.css +0 -1
- package/dist/Textarea.js +1 -1
- package/dist/{ThemeProvider-Q3ji6Rpx-DBXlAuQ8.js → ThemeProvider-Be3Pvtpz.js} +6 -8
- package/dist/ThemeProvider-Be3Pvtpz.js.map +1 -0
- package/dist/{ThemeProvider-Q3ji6Rpx.css → ThemeProvider.css} +0 -1
- package/dist/ThemeProvider.d.ts +0 -4
- package/dist/ThemeProvider.js +2 -1
- package/dist/ThemeProvider.js.map +1 -1
- package/dist/ThemeProviderContext-l52GohYT.js +8 -0
- package/dist/ThemeProviderContext-l52GohYT.js.map +1 -0
- package/dist/{TimeField-tA9uo4lK.js → TimeField-CfhyRfX9.js} +229 -215
- package/dist/TimeField-CfhyRfX9.js.map +1 -0
- package/dist/TimeField.css +0 -1
- package/dist/TimeField.d.ts +4 -0
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Toaster-BgjT0p8b.js +1124 -0
- package/dist/Toaster-BgjT0p8b.js.map +1 -0
- package/dist/{toast-BhV_Ask2.js → Toaster-CfC9wod0.js} +5 -7
- package/dist/Toaster-CfC9wod0.js.map +1 -0
- package/dist/Toaster.css +235 -0
- package/dist/{Toolbar-CSWhVSUM.js → Toolbar-DK7tXy_W.js} +163 -279
- package/dist/Toolbar-DK7tXy_W.js.map +1 -0
- package/dist/Toolbar.css +28 -19
- package/dist/Toolbar.js +1 -1
- package/dist/Tooltip-BI3Xs75X.js +730 -0
- package/dist/Tooltip-BI3Xs75X.js.map +1 -0
- package/dist/Tooltip.css +99 -0
- package/dist/Tooltip.js +1 -1
- package/dist/assets/icons/st/atlas_gradient.svg +1 -0
- package/dist/assets/icons/st/atlas_logo.svg +1 -0
- package/dist/assets/icons/st/atlas_simple.svg +1 -0
- package/dist/assets/icons/st.ts +3 -0
- package/dist/{check_circle-BGfigqq-.js → check_circle-Dja-C2lM.js} +2 -4
- package/dist/check_circle-Dja-C2lM.js.map +1 -0
- package/dist/{childrenToString-Bz9MqbHb-Bz9MqbHb.js → childrenToString-Bz9MqbHb.js} +1 -1
- package/dist/childrenToString-Bz9MqbHb.js.map +1 -0
- package/dist/components/Alert/Alert.d.ts +26 -8
- package/dist/components/Announcement/Announcement.d.ts +26 -8
- package/dist/components/Avatar/Avatar.d.ts +2 -48
- package/dist/components/Avatar/AvatarGroup.d.ts +39 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/internal/Avatar.d.ts +58 -0
- package/dist/components/Avatar/internal/AvatarBase.d.ts +75 -0
- package/dist/components/Badge/Badge.d.ts +31 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +23 -14
- package/dist/components/Breadcrumbs/BreadcrumbsLink.d.ts +23 -0
- package/dist/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +43 -9
- package/dist/components/ButtonCompound/ButtonCompound.d.ts +20 -7
- package/dist/components/ButtonLink/ButtonLink.d.ts +66 -15
- package/dist/components/ButtonToggle/ButtonToggle.d.ts +46 -11
- package/dist/components/Calendar/Calendar.d.ts +149 -36
- package/dist/components/Calendar/CalendarContext.d.ts +153 -0
- package/dist/components/Calendar/CalendarMonth.d.ts +9 -0
- package/dist/components/Calendar/CalendarMonthButton.d.ts +16 -0
- package/dist/components/Calendar/CalendarNextButton.d.ts +11 -0
- package/dist/components/Calendar/CalendarNowButton.d.ts +20 -0
- package/dist/components/Calendar/CalendarPrevButton.d.ts +11 -0
- package/dist/components/Calendar/CalendarYearButton.d.ts +15 -0
- package/dist/components/Calendar/index.d.ts +9 -2
- package/dist/components/Calendar/internal/CalendarDay.d.ts +21 -0
- package/dist/components/Calendar/internal/CalendarMonthSelection.d.ts +25 -0
- package/dist/components/Calendar/internal/CalendarWeek.d.ts +28 -0
- package/dist/components/Calendar/internal/CalendarYearSelection.d.ts +25 -0
- package/dist/components/Calendar/internal/utils.d.ts +12 -0
- package/dist/components/Card/Card.d.ts +26 -16
- package/dist/components/Checkbox/Checkbox.d.ts +3 -29
- package/dist/components/Checkbox/CheckboxGroup.d.ts +53 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/internal/Checkbox.d.ts +133 -0
- package/dist/components/Checkbox/types.d.ts +4 -0
- package/dist/components/Chip/Chip.d.ts +4 -3
- package/dist/components/Chip/internal/Chip.d.ts +108 -0
- package/dist/components/Combobox/Combobox.d.ts +11 -283
- package/dist/components/Combobox/ComboboxContent.d.ts +59 -0
- package/dist/components/Combobox/ComboboxEmpty.d.ts +26 -0
- package/dist/components/Combobox/ComboboxItem.d.ts +34 -0
- package/dist/components/Combobox/ComboboxList.d.ts +31 -0
- package/dist/components/Combobox/ComboboxMockData.d.ts +44 -0
- package/dist/components/Combobox/ComboboxSelect.d.ts +59 -0
- package/dist/components/Combobox/ComboboxTrigger.d.ts +43 -0
- package/dist/components/Combobox/ComboboxTypes.d.ts +374 -0
- package/dist/components/Combobox/index.d.ts +10 -3
- package/dist/components/Combobox/internal/ComboboxContext.d.ts +8 -0
- package/dist/components/Combobox/internal/ComboboxGroupContext.d.ts +8 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacy.d.ts +131 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyContent.d.ts +20 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyEmpty.d.ts +5 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyItem.d.ts +26 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyList.d.ts +5 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyMockData.d.ts +37 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyTrigger.d.ts +21 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyUtils.d.ts +38 -0
- package/dist/components/Combobox/internal/ComboboxLegacy/index.d.ts +7 -0
- package/dist/components/Combobox/internal/ComboboxMockData.d.ts +44 -0
- package/dist/components/Combobox/internal/ComboboxUtils.d.ts +74 -0
- package/dist/components/Combobox/internal/useGroups.d.ts +14 -0
- package/dist/components/Combobox/useInfiniteCombobox.d.ts +69 -1
- package/dist/components/DateField/DateField.d.ts +23 -61
- package/dist/components/DateField/internal/DateFieldLegacy/DateFieldLegacy.d.ts +37 -0
- package/dist/components/DateField/internal/DateFieldLegacy/index.d.ts +1 -0
- package/dist/components/DateField/internal/isoToDateFormat.d.ts +1 -0
- package/dist/components/DateField/types.d.ts +47 -0
- package/dist/components/DateFieldRange/DateFieldRange.d.ts +57 -6
- package/dist/components/DateFieldRange/internal/DateFieldRangeCalendar.d.ts +17 -0
- package/dist/components/DateFieldRange/internal/MaskedDateRangeInput.d.ts +41 -0
- package/dist/components/DateFieldRange/internal/maskito/dateRangePlaceholderMask.d.ts +18 -0
- package/dist/components/DateFieldRange/internal/useDateFieldRangeConversion.d.ts +29 -0
- package/dist/components/DateFieldRange/internal/useDateFieldRangeState.d.ts +70 -0
- package/dist/components/DateFieldRange/internal/utils.d.ts +17 -0
- package/dist/components/DateFieldSingle/DateFieldSingle.d.ts +55 -5
- package/dist/components/DateFieldSingle/index.d.ts +1 -0
- package/dist/components/DateFieldSingle/internal/DateFieldSingleCalendar.d.ts +15 -0
- package/dist/components/DateFieldSingle/internal/MaskedDateInput.d.ts +35 -0
- package/dist/components/DateFieldSingle/internal/constants.d.ts +3 -0
- package/dist/components/DateFieldSingle/internal/maskito/datePlaceholderMask.d.ts +16 -0
- package/dist/components/DateFieldSingle/internal/maskito/makeZeroShortcutPreprocessor.d.ts +10 -0
- package/dist/components/DateFieldSingle/internal/useDateFieldOrchestration.d.ts +17 -0
- package/dist/components/DateFieldSingle/internal/useDateFieldSingleConversion.d.ts +45 -0
- package/dist/components/DateFieldSingle/internal/useDateFieldSingleState.d.ts +49 -0
- package/dist/components/DateFieldSingle/internal/utils.d.ts +14 -0
- package/dist/components/DateFieldSingle/types.d.ts +2 -0
- package/dist/components/DateFieldYearless/DateFieldYearless.d.ts +61 -36
- package/dist/components/DateFieldYearless/index.d.ts +1 -0
- package/dist/components/DateFieldYearless/internal/MaskedYearlessDateInput.d.ts +35 -0
- package/dist/components/DateFieldYearless/internal/maskito/yearlessDatePlaceholderMask.d.ts +16 -0
- package/dist/components/DateFieldYearless/internal/utils.d.ts +12 -0
- package/dist/components/DateFieldYearless/types.d.ts +7 -0
- package/dist/components/DaysOfTheWeek/DaysOfTheWeek.d.ts +117 -20
- package/dist/components/Details/Details.d.ts +30 -58
- package/dist/components/Details/DetailsContent.d.ts +41 -0
- package/dist/components/Details/DetailsSummary.d.ts +24 -0
- package/dist/components/Details/index.d.ts +2 -0
- package/dist/components/Details/internal/DetailsArrow.d.ts +20 -0
- package/dist/components/Details/internal/DetailsContext.d.ts +8 -0
- package/dist/components/Dialog/Dialog.d.ts +97 -109
- package/dist/components/Dialog/DialogCancelButton.d.ts +21 -0
- package/dist/components/Dialog/DialogContent.d.ts +22 -0
- package/dist/components/Dialog/DialogFooter.d.ts +33 -0
- package/dist/components/Dialog/DialogHeader.d.ts +21 -0
- package/dist/components/Dialog/index.d.ts +6 -2
- package/dist/components/Dialog/internal/DialogContext.d.ts +8 -0
- package/dist/components/Dialog/internal/useDialogContext.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +34 -7
- package/dist/components/Dnd/DndHandle.d.ts +26 -0
- package/dist/components/Dnd/DndHandleButton.d.ts +32 -0
- package/dist/components/Dnd/DndSortLine.d.ts +39 -0
- package/dist/components/Dnd/DndZone.d.ts +55 -0
- package/dist/components/Dnd/index.d.ts +7 -1
- package/dist/components/DndSort/DndSort.d.ts +40 -0
- package/dist/components/DndSort/DndSortCard.d.ts +63 -0
- package/dist/components/DndSort/DndSortZone.d.ts +130 -0
- package/dist/components/DndSort/index.d.ts +12 -2
- package/dist/components/DndSort/internal/DndSortContext.d.ts +21 -0
- package/dist/components/DndSort/internal/DndSortItem.d.ts +30 -0
- package/dist/components/DndSort/internal/DndSortOverlay.d.ts +5 -0
- package/dist/components/DndSort/internal/DndSortZoneContext.d.ts +24 -0
- package/dist/components/DndSort/internal/announcements.d.ts +8 -0
- package/dist/components/DndSort/internal/collisionDetection.d.ts +3 -0
- package/dist/components/DndSort/internal/getNextCoordinates.d.ts +17 -0
- package/dist/components/DndSort/internal/test-utils.d.ts +24 -0
- package/dist/components/DndSort/internal/utils.d.ts +55 -0
- package/dist/components/DndSort/types.d.ts +55 -0
- package/dist/components/Drawer/Drawer.d.ts +63 -118
- package/dist/components/Drawer/DrawerCancelButton.d.ts +25 -0
- package/dist/components/Drawer/DrawerContent.d.ts +26 -0
- package/dist/components/Drawer/DrawerFooter.d.ts +37 -0
- package/dist/components/Drawer/DrawerHeader.d.ts +23 -0
- package/dist/components/Drawer/index.d.ts +6 -2
- package/dist/components/Drawer/internal/DrawerContext.d.ts +15 -0
- package/dist/components/Drawer/internal/useDrawerContext.d.ts +7 -0
- package/dist/components/EditCard/EditCard.d.ts +71 -14
- package/dist/components/FieldLabel/FieldLabel.d.ts +62 -4
- package/dist/components/FieldLabel/internal/FieldLabelMoreInfoIcon.d.ts +12 -0
- package/dist/components/FieldMessage/FieldMessage.d.ts +48 -12
- package/dist/components/Flex/Flex.d.ts +46 -61
- package/dist/components/Flex/internal/FlexSpecificProps.d.ts +34 -0
- package/dist/components/Grid/Grid.d.ts +55 -27
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/internal/GridItem.d.ts +27 -0
- package/dist/components/Grid/internal/GridSpecificProps.d.ts +28 -0
- package/dist/components/Icon/Icon.d.ts +42 -15
- package/dist/components/InputMask/InputMask.d.ts +109 -48
- package/dist/components/InputMask/internal/constants.d.ts +1 -0
- package/dist/components/InputMask/internal/utils.d.ts +41 -0
- package/dist/components/Link/Link.d.ts +5 -17
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Link/internal/Link.d.ts +57 -0
- package/dist/components/Link/internal/LinkHeadless.d.ts +24 -0
- package/dist/components/Link/useLinkStyles.d.ts +17 -0
- package/dist/components/LinkButton/LinkButton.d.ts +5 -31
- package/dist/components/ListView/ListView.d.ts +17 -46
- package/dist/components/ListView/ListViewOption.d.ts +38 -0
- package/dist/components/ListView/ListViewOptionCell.d.ts +12 -0
- package/dist/components/ListView/index.d.ts +3 -1
- package/dist/components/ListView/internal/ListViewContext.d.ts +28 -0
- package/dist/components/ListView/internal/types.d.ts +52 -0
- package/dist/components/ListView/internal/utils.d.ts +4 -0
- package/dist/components/Listbox/Listbox.d.ts +97 -61
- package/dist/components/Listbox/ListboxOption.d.ts +53 -0
- package/dist/components/Listbox/ListboxOptionGroup.d.ts +32 -0
- package/dist/components/Listbox/index.d.ts +3 -1
- package/dist/components/Listbox/internal/ListboxContext.d.ts +38 -0
- package/dist/components/Listbox/internal/ListboxOptionGroupContext.d.ts +5 -0
- package/dist/components/Listbox/internal/utils.d.ts +4 -0
- package/dist/components/Menu/Menu.d.ts +20 -46
- package/dist/components/Menu/MenuItem.d.ts +57 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Menu/internal/MenuContext.d.ts +15 -0
- package/dist/components/Menu/internal/MenuLegacy/MenuLegacy.d.ts +50 -0
- package/dist/components/Menu/internal/MenuLegacy/MenuLegacyContext.d.ts +9 -0
- package/dist/components/Menu/internal/MenuLegacy/MenuLegacyItem.d.ts +12 -0
- package/dist/components/Menu/internal/MenuLegacy/index.d.ts +3 -0
- package/dist/components/Menu/internal/MenuNested.d.ts +42 -0
- package/dist/components/Menu/types.d.ts +72 -0
- package/dist/components/NumberField/NumberField.d.ts +48 -7
- package/dist/components/Overflow/Overflow.d.ts +51 -84
- package/dist/components/Overflow/OverflowText.d.ts +82 -0
- package/dist/components/Overflow/index.d.ts +31 -2
- package/dist/components/Page/Page.d.ts +7 -7
- package/dist/components/Page/PageFooter.d.ts +1 -1
- package/dist/components/Page/PageHeader.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts +4 -6
- package/dist/components/Pagination/internal/Pagination.d.ts +55 -0
- package/dist/components/Pagination/internal/PaginationItem.d.ts +52 -0
- package/dist/components/Pagination/internal/PaginationItemsPerPageMenu.d.ts +37 -0
- package/dist/components/Pagination/internal/PaginationList.d.ts +9 -0
- package/dist/components/Pagination/internal/PaginationOverflowMenu.d.ts +61 -0
- package/dist/components/Pagination/internal/PaginationTotalCount.d.ts +6 -0
- package/dist/components/Popover/Popover.d.ts +146 -134
- package/dist/components/Popover/PopoverButton.d.ts +34 -0
- package/dist/components/Popover/PopoverClose.d.ts +33 -0
- package/dist/components/Popover/PopoverContent.d.ts +46 -0
- package/dist/components/Popover/PopoverTrigger.d.ts +63 -0
- package/dist/components/Popover/index.d.ts +4 -0
- package/dist/components/Popover/internal/PopoverContext.d.ts +40 -0
- package/dist/components/Popover/internal/PopoverLegacy/PopoverLegacy.d.ts +8 -0
- package/dist/components/Popover/internal/PopoverLegacy/PopoverLegacyButton.d.ts +3 -0
- package/dist/components/Popover/internal/PopoverLegacy/PopoverLegacyClose.d.ts +3 -0
- package/dist/components/Popover/internal/PopoverLegacy/PopoverLegacyContent.d.ts +3 -0
- package/dist/components/Popover/internal/PopoverLegacy/PopoverLegacyTrigger.d.ts +9 -0
- package/dist/components/Popover/internal/PopoverLegacy/index.d.ts +8 -0
- package/dist/components/Popover/internal/PopoverLegacy/usePopoverLegacy.d.ts +121 -0
- package/dist/components/Popover/internal/PopoverLegacy/usePopoverLegacyContext.d.ts +79 -0
- package/dist/components/Popover/internal/compareElements.d.ts +1 -0
- package/dist/components/Popover/internal/usePopoverContext.d.ts +50 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +59 -14
- package/dist/components/Radio/Radio.d.ts +3 -44
- package/dist/components/Radio/RadioGroup.d.ts +61 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/internal/Radio.d.ts +145 -0
- package/dist/components/Radio/types.d.ts +13 -0
- package/dist/components/SearchField/SearchField.d.ts +33 -8
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +54 -49
- package/dist/components/SegmentedControl/SegmentedControlSegment.d.ts +69 -0
- package/dist/components/SegmentedControl/index.d.ts +1 -0
- package/dist/components/SegmentedControl/internal/SegmentedControlContext.d.ts +24 -0
- package/dist/components/SelectCard/SelectCard.d.ts +45 -16
- package/dist/components/SelectCard/SelectCardGroup.d.ts +24 -13
- package/dist/components/SelectCard/index.d.ts +1 -2
- package/dist/components/SelectCard/internal/SelectCardProvider.d.ts +83 -0
- package/dist/components/SelectTrigger/SelectTrigger.d.ts +22 -8
- package/dist/components/SelectTrigger/internal/SelectTriggerBase.d.ts +40 -0
- package/dist/components/SideNav/SideNav.d.ts +32 -114
- package/dist/components/SideNav/SideNavCollapsible.d.ts +73 -0
- package/dist/components/SideNav/SideNavGroup.d.ts +37 -0
- package/dist/components/SideNav/SideNavLink.d.ts +46 -0
- package/dist/components/SideNav/index.d.ts +4 -1
- package/dist/components/SideNav/internal/SideNavLink.d.ts +74 -0
- package/dist/components/SideNav/internal/utils.d.ts +16 -0
- package/dist/components/Skeleton/SkeletonCircle.d.ts +41 -0
- package/dist/components/Skeleton/SkeletonPill.d.ts +41 -0
- package/dist/components/Skeleton/SkeletonRectangle.d.ts +42 -0
- package/dist/components/Skeleton/SkeletonText.d.ts +52 -0
- package/dist/components/Skeleton/index.d.ts +16 -2
- package/dist/components/Spinner/Spinner.d.ts +11 -6
- package/dist/components/SrOnly/SrOnly.d.ts +3 -7
- package/dist/components/Stepper/Stepper.d.ts +119 -239
- package/dist/components/Stepper/StepperFinalPanel.d.ts +30 -0
- package/dist/components/Stepper/StepperList.d.ts +28 -0
- package/dist/components/Stepper/StepperNextButton.d.ts +73 -0
- package/dist/components/Stepper/StepperPanel.d.ts +52 -0
- package/dist/components/Stepper/StepperPrevButton.d.ts +44 -0
- package/dist/components/Stepper/StepperStep.d.ts +58 -0
- package/dist/components/Stepper/index.d.ts +6 -0
- package/dist/components/Stepper/internal/StepperContext.d.ts +15 -0
- package/dist/components/Switch/Switch.d.ts +47 -11
- package/dist/components/Tab/Tab.d.ts +22 -88
- package/dist/components/Tab/TabButton.d.ts +54 -0
- package/dist/components/Tab/TabList.d.ts +26 -0
- package/dist/components/Tab/TabPanel.d.ts +34 -0
- package/dist/components/Tab/index.d.ts +3 -0
- package/dist/components/Tab/internal/TabContext.d.ts +15 -0
- package/dist/components/Text/Text.d.ts +7 -17
- package/dist/components/Text/types.d.ts +93 -0
- package/dist/components/TextField/TextField.d.ts +4 -5
- package/dist/components/TextField/internal/TextField.d.ts +20 -0
- package/dist/components/Textarea/Textarea.d.ts +52 -19
- package/dist/components/Textarea/index.d.ts +1 -2
- package/dist/components/Textarea/types.d.ts +35 -0
- package/dist/components/TimeField/TimeField.d.ts +55 -18
- package/dist/components/TimeField/index.d.ts +2 -0
- package/dist/components/TimeField/internal/MaskedTimeInput.d.ts +87 -0
- package/dist/components/TimeField/internal/constants.d.ts +25 -0
- package/dist/components/TimeField/internal/maskito/timePlaceholderMask.d.ts +28 -0
- package/dist/components/TimeField/internal/types.d.ts +27 -0
- package/dist/components/TimeField/internal/utils/timeFormatting.d.ts +10 -0
- package/dist/components/TimeField/internal/utils/timeOptions.d.ts +24 -0
- package/dist/components/TimeField/internal/utils/timeParsing.d.ts +43 -0
- package/dist/components/TimeField/internal/utils/timeRounding.d.ts +58 -0
- package/dist/components/TimeField/internal/utils/timeValidation.d.ts +28 -0
- package/dist/components/Toast/Toaster.d.ts +4 -4
- package/dist/components/Toast/internal/Toast.d.ts +106 -0
- package/dist/components/Toast/internal/ToastProvider.d.ts +90 -0
- package/dist/components/Toast/internal/ToastStack.d.ts +81 -0
- package/dist/components/Toast/internal/Toaster.d.ts +108 -0
- package/dist/components/Toast/internal/ToasterPopover.d.ts +19 -0
- package/dist/components/Toast/internal/addOrUpdateToastHeight.d.ts +8 -0
- package/dist/components/Toast/internal/constants.d.ts +4 -0
- package/dist/components/Toast/internal/types.d.ts +18 -0
- package/dist/components/Toast/internal/useCloseToast.d.ts +7 -0
- package/dist/components/Toast/internal/useHotkeyFocus.d.ts +25 -0
- package/dist/components/Toast/internal/useShowMoreButtonPositionStyles.d.ts +6 -0
- package/dist/components/Toast/internal/useToastPositionStyles.d.ts +7 -0
- package/dist/components/Toast/internal/useToasts.d.ts +6 -0
- package/dist/components/Toast/toast.d.ts +113 -38
- package/dist/components/Toolbar/Toolbar.d.ts +99 -141
- package/dist/components/Toolbar/ToolbarButton.d.ts +41 -0
- package/dist/components/Toolbar/ToolbarButtonLink.d.ts +43 -0
- package/dist/components/Toolbar/ToolbarButtonToggle.d.ts +37 -0
- package/dist/components/Toolbar/ToolbarSelect.d.ts +108 -0
- package/dist/components/Toolbar/index.d.ts +6 -1
- package/dist/components/Toolbar/internal/ToolbarItemOverflowContext.d.ts +19 -0
- package/dist/components/Toolbar/internal/ToolbarItemWrapper.d.ts +33 -0
- package/dist/components/Toolbar/internal/ToolbarOverflowContext.d.ts +35 -0
- package/dist/components/Toolbar/internal/ToolbarOverflowMenu.d.ts +29 -0
- package/dist/components/Toolbar/internal/utils/accessibility.d.ts +21 -0
- package/dist/components/Toolbar/internal/utils/test.d.ts +29 -0
- package/dist/components/Toolbar/types.d.ts +48 -0
- package/dist/components/Tooltip/Tooltip.d.ts +73 -71
- package/dist/components/Tooltip/TooltipContent.d.ts +26 -0
- package/dist/components/Tooltip/TooltipTrigger.d.ts +30 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/internal/TooltipContext.d.ts +92 -0
- package/dist/components/Tooltip/internal/TooltipLegacy/TooltipLegacy.d.ts +6 -0
- package/dist/components/Tooltip/internal/TooltipLegacy/TooltipLegacyContent.d.ts +3 -0
- package/dist/components/Tooltip/internal/TooltipLegacy/TooltipLegacyTrigger.d.ts +5 -0
- package/dist/components/Tooltip/internal/TooltipLegacy/index.d.ts +6 -0
- package/dist/components/Tooltip/internal/TooltipLegacy/useTooltipLegacy.d.ts +70 -0
- package/dist/components/Tooltip/internal/TooltipLegacy/useTooltipLegacyContext.d.ts +58 -0
- package/dist/components/Tooltip/internal/isNonInteractiveTrigger.d.ts +1 -0
- package/dist/components/Tooltip/internal/useTooltipContext.d.ts +47 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/extends-Bg2s_OKl.js.map +1 -1
- package/dist/getActiveElement-BcSyVE7S.js +25 -0
- package/dist/getActiveElement-BcSyVE7S.js.map +1 -0
- package/dist/getKeyboardFocusableElements-QqcABz0D.js.map +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useAccessibleColor/index.d.ts +1 -1
- package/dist/hooks/useAccessibleColor/useAccessibleColor.d.ts +38 -0
- package/dist/hooks/useBreakpoint/index.d.ts +1 -1
- package/dist/hooks/useBreakpoint/useBreakpoint.d.ts +49 -0
- package/dist/hooks/useMergeRefs/index.d.ts +1 -1
- package/dist/hooks/useMergeRefs/useMergeRefs.d.ts +17 -0
- package/dist/hooks/usePrefersColorScheme/index.d.ts +1 -1
- package/dist/hooks/usePrefersColorScheme/usePrefersColorScheme.d.ts +16 -0
- package/dist/hooks/useSwipe/index.d.ts +1 -1
- package/dist/hooks/useSwipe/useSwipe.d.ts +32 -0
- package/dist/{Checkbox.module-DZ58p15b-BUsQC1lW.js → indeterminate_check_box-Bg24oeHy.js} +8 -8
- package/dist/indeterminate_check_box-Bg24oeHy.js.map +1 -0
- package/dist/{Checkbox.css → indeterminate_check_box.css} +0 -1
- package/dist/{index-CKfiQx8n-4nziUo7G.js → index-CqdP5W00.js} +5 -5
- package/dist/index-CqdP5W00.js.map +1 -0
- package/dist/{ProgressBar-BRvB-bD4.css → index.css} +0 -641
- package/dist/index.d.ts +1 -0
- package/dist/{index.esm-dyoPQhi6.js → index.esm-D889iexm.js} +115 -115
- package/dist/index.esm-D889iexm.js.map +1 -0
- package/dist/index.js +508 -72
- package/dist/index.js.map +1 -1
- package/dist/{index-CKfiQx8n.css → index2.css} +0 -1
- package/dist/info-CYpG6tcI.js +6 -0
- package/dist/info-CYpG6tcI.js.map +1 -0
- package/dist/internal/components/Helper/Helper.d.ts +18 -0
- package/dist/internal/components/Helper/index.d.ts +1 -0
- package/dist/internal/components/Label/Label.d.ts +77 -0
- package/dist/internal/components/Label/index.d.ts +2 -0
- package/dist/internal/components/index.d.ts +2 -0
- package/dist/internal/functions/childrenToString.d.ts +25 -0
- package/dist/internal/functions/getActiveElement.d.ts +1 -0
- package/dist/internal/functions/getInitial.d.ts +16 -0
- package/dist/internal/functions/getKeyboardFocusableElements.d.ts +25 -0
- package/dist/internal/functions/index.d.ts +9 -0
- package/dist/internal/functions/kebabize.d.ts +16 -0
- package/dist/internal/functions/mapOrder.d.ts +1 -0
- package/dist/internal/functions/safePopover.d.ts +2 -0
- package/dist/internal/functions/sizeToToken.d.ts +2 -0
- package/dist/internal/functions/supportsPopover.d.ts +1 -0
- package/dist/internal/hooks/index.d.ts +17 -0
- package/dist/internal/hooks/useDialogScrollLock/index.d.ts +1 -0
- package/dist/internal/hooks/useDialogScrollLock/useDialogScrollLock.d.ts +40 -0
- package/dist/internal/hooks/useDialogTransitionStates/index.d.ts +1 -0
- package/dist/internal/hooks/useDialogTransitionStates/useDialogTransitionStates.d.ts +32 -0
- package/dist/internal/hooks/useFocusWithin/index.d.ts +1 -0
- package/dist/internal/hooks/useFocusWithin/useFocusWithin.d.ts +33 -0
- package/dist/internal/hooks/useIntersectionObserver/index.d.ts +1 -0
- package/dist/internal/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +67 -0
- package/dist/internal/hooks/useIsScrollable/index.d.ts +1 -0
- package/dist/internal/hooks/useIsScrollable/useIsScrollable.d.ts +6 -0
- package/dist/internal/hooks/useKeyboardFocusables/index.d.ts +1 -0
- package/dist/internal/hooks/useKeyboardFocusables/useKeyboardFocusables.d.ts +54 -0
- package/dist/internal/hooks/useLayoutPropsUtil/index.d.ts +1 -0
- package/dist/internal/hooks/useLayoutPropsUtil/useLayoutPropsUtil.d.ts +56 -0
- package/dist/internal/hooks/useNumberField/index.d.ts +1 -0
- package/dist/internal/hooks/useNumberField/internal/useNumberFieldInputMode.d.ts +24 -0
- package/dist/internal/hooks/useNumberField/internal/useNumberFieldKeys.d.ts +43 -0
- package/dist/internal/hooks/useNumberField/useNumberField.d.ts +118 -0
- package/dist/internal/hooks/useOnClickOutside/index.d.ts +1 -0
- package/dist/internal/hooks/useOnClickOutside/useOnClickOutside.d.ts +34 -0
- package/dist/internal/hooks/useOpenCloseTransitionStates/index.d.ts +1 -0
- package/dist/internal/hooks/useOpenCloseTransitionStates/useOpenCloseTransitionStates.d.ts +51 -0
- package/dist/internal/hooks/useOptionallyControlledState/index.d.ts +1 -0
- package/dist/internal/hooks/useOptionallyControlledState/useOptionallyControlledState.d.ts +59 -0
- package/dist/internal/hooks/usePlatform/index.d.ts +1 -0
- package/dist/internal/hooks/usePlatform/usePlatform.d.ts +65 -0
- package/dist/internal/hooks/usePopoverCloseDelayWorkaround/index.d.ts +1 -0
- package/dist/internal/hooks/usePopoverCloseDelayWorkaround/usePopoverCloseDelayWorkaround.d.ts +1 -0
- package/dist/internal/hooks/usePopoverSupport/index.d.ts +1 -0
- package/dist/internal/hooks/usePopoverSupport/usePopoverSupport.d.ts +1 -0
- package/dist/internal/hooks/usePopoverTransitionStates/index.d.ts +1 -0
- package/dist/internal/hooks/usePopoverTransitionStates/usePopoverTransitionStates.d.ts +25 -0
- package/dist/internal/hooks/usePrevious/index.d.ts +1 -0
- package/dist/internal/hooks/usePrevious/usePrevious.d.ts +1 -0
- package/dist/internal/hooks/useTypeAhead/index.d.ts +1 -0
- package/dist/internal/hooks/useTypeAhead/useTypeAhead.d.ts +15 -0
- package/dist/internal/types/index.d.ts +1 -0
- package/dist/internal/types/props.d.ts +7 -0
- package/dist/internal/utils/index.d.ts +1 -0
- package/dist/makeZeroShortcutPreprocessor-CxsiGTRW.js +47 -0
- package/dist/makeZeroShortcutPreprocessor-CxsiGTRW.js.map +1 -0
- package/dist/providers/AnvilProvider/AnvilProvider.d.ts +29 -6
- package/dist/providers/LocalizationProvider/LocalizationContext.d.ts +6 -0
- package/dist/providers/LocalizationProvider/LocalizationProvider.d.ts +17 -0
- package/dist/providers/LocalizationProvider/LocalizationStoryWrapper.d.ts +6 -0
- package/dist/providers/LocalizationProvider/index.d.ts +2 -1
- package/dist/providers/LocalizationProvider/useTranslations.d.ts +4 -0
- package/dist/providers/PortalProvider/PortalProvider.d.ts +10 -0
- package/dist/providers/PortalProvider/index.d.ts +1 -1
- package/dist/providers/ThemeProvider/ThemeProvider.d.ts +14 -4
- package/dist/providers/ThemeProvider/index.d.ts +7 -1
- package/dist/providers/ThemeProvider/internal/ThemeProviderContext.d.ts +6 -0
- package/dist/providers/ThemeProvider/useTheme.d.ts +1 -0
- package/dist/types/MaxLengthCounterProps.d.ts +8 -0
- package/dist/types/ianaZones.d.ts +2 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/locales.d.ts +3 -0
- package/dist/types/props.d.ts +66 -0
- package/dist/{useAccessibleColor-Dc6B_M-Z-BYKjkGRg.js → useAccessibleColor-BYKjkGRg.js} +1 -1
- package/dist/useAccessibleColor-BYKjkGRg.js.map +1 -0
- package/dist/useAccessibleColor.js +1 -1
- package/dist/{useBreakpoint-7QkBkSeP-Cv5fnZxs.js → useBreakpoint-Cv5fnZxs.js} +1 -1
- package/dist/useBreakpoint-Cv5fnZxs.js.map +1 -0
- package/dist/useBreakpoint.js +1 -1
- package/dist/useDateFieldOrchestration-Cqa7dxtr.js +138 -0
- package/dist/useDateFieldOrchestration-Cqa7dxtr.js.map +1 -0
- package/dist/useDialogTransitionStates-2NaE_noq.js +64 -0
- package/dist/useDialogTransitionStates-2NaE_noq.js.map +1 -0
- package/dist/{useFocusWithin-Cxz14Zyz-DEudRcSI.js → useFocusWithin-BhU7hoAD.js} +2 -10
- package/dist/useFocusWithin-BhU7hoAD.js.map +1 -0
- package/dist/{Combobox-BOpe_NUu.js → useInfiniteCombobox-BN2uGhBh.js} +1791 -1847
- package/dist/useInfiniteCombobox-BN2uGhBh.js.map +1 -0
- package/dist/{Combobox.css → useInfiniteCombobox.css} +102 -45
- package/dist/{useLayoutPropsUtil-DWACCL8v-CZNrcQT-.js → useLayoutPropsUtil-DjD5IMh0.js} +2 -2
- package/dist/useLayoutPropsUtil-DjD5IMh0.js.map +1 -0
- package/dist/{useMergeRefs-Bde85AWI-Bde85AWI.js → useMergeRefs-Bde85AWI.js} +1 -1
- package/dist/useMergeRefs-Bde85AWI.js.map +1 -0
- package/dist/useMergeRefs.js +1 -1
- package/dist/useOnClickOutside-BHEWMLa9.js +170 -0
- package/dist/useOnClickOutside-BHEWMLa9.js.map +1 -0
- package/dist/{useOptionallyControlledState-DbDuos5L-DbDuos5L.js → useOptionallyControlledState-DbDuos5L.js} +1 -1
- package/dist/useOptionallyControlledState-DbDuos5L.js.map +1 -0
- package/dist/{usePopoverCloseDelayWorkaround-BZcjPkvT-BZcjPkvT.js → usePopoverCloseDelayWorkaround-BZcjPkvT.js} +1 -1
- package/dist/usePopoverCloseDelayWorkaround-BZcjPkvT.js.map +1 -0
- package/dist/{usePopoverSupport-B9Lsqryr-CYJxXiun.js → usePopoverSupport-DIjjfodl.js} +2 -2
- package/dist/usePopoverSupport-DIjjfodl.js.map +1 -0
- package/dist/{usePrefersColorScheme-_hT7dK7_-_hT7dK7_.js → usePrefersColorScheme-_hT7dK7_.js} +1 -1
- package/dist/usePrefersColorScheme-_hT7dK7_.js.map +1 -0
- package/dist/usePrefersColorScheme.js +1 -1
- package/dist/usePrevious-Bvq-5auG.js +12 -0
- package/dist/usePrevious-Bvq-5auG.js.map +1 -0
- package/dist/{useSwipe-CULmVQEk-CULmVQEk.js → useSwipe-CULmVQEk.js} +1 -1
- package/dist/useSwipe-CULmVQEk.js.map +1 -0
- package/dist/useSwipe.js +1 -1
- package/dist/useTheme-B4i6a3bM.js +9 -0
- package/dist/useTheme-B4i6a3bM.js.map +1 -0
- package/package.json +29 -4
- package/dist/Alert-C3WoRkeN-D_6Yf63F.js +0 -98
- package/dist/Alert-C3WoRkeN-D_6Yf63F.js.map +0 -1
- package/dist/Alert-DipY5OlC.js +0 -23
- package/dist/Alert-DipY5OlC.js.map +0 -1
- package/dist/Announcement-ButSjdLn.js.map +0 -1
- package/dist/AnvilProvider-BLYCqIbb.js +0 -16
- package/dist/AnvilProvider-BLYCqIbb.js.map +0 -1
- package/dist/Avatar-C7cbRTCt-DCvzmr2C.js.map +0 -1
- package/dist/Avatar-DREZJN2K.js.map +0 -1
- package/dist/Badge-7aZfE-LH.js.map +0 -1
- package/dist/Breadcrumbs-BMbkH9hL-BUjQksuj.js.map +0 -1
- package/dist/Breadcrumbs-fthw3qaL.js +0 -36
- package/dist/Breadcrumbs-fthw3qaL.js.map +0 -1
- package/dist/Button-BaHFf1AT-BQy-PFB5.js.map +0 -1
- package/dist/Button-DMQKV2sV.js +0 -27
- package/dist/Button-DMQKV2sV.js.map +0 -1
- package/dist/Button.module-BqTaW8HK-BqTaW8HK.js +0 -25
- package/dist/Button.module-BqTaW8HK-BqTaW8HK.js.map +0 -1
- package/dist/ButtonCompound-Cs2A5X-Z-Dl3InVab.js +0 -49
- package/dist/ButtonCompound-Cs2A5X-Z-Dl3InVab.js.map +0 -1
- package/dist/ButtonCompound-DGuF0zzT.js +0 -25
- package/dist/ButtonCompound-DGuF0zzT.js.map +0 -1
- package/dist/ButtonLink-5qlX0uZx-b9H7MGhk.js.map +0 -1
- package/dist/ButtonLink-B0NJuVk5.js +0 -28
- package/dist/ButtonLink-B0NJuVk5.js.map +0 -1
- package/dist/ButtonToggle-Bm4KRl3o-B1-LbfjY.js.map +0 -1
- package/dist/ButtonToggle-CKVyEODc.js +0 -27
- package/dist/ButtonToggle-CKVyEODc.js.map +0 -1
- package/dist/Calendar-BvftKznl-D4_xp9Rv.js.map +0 -1
- package/dist/Calendar-DdOR9T_K.js +0 -130
- package/dist/Calendar-DdOR9T_K.js.map +0 -1
- package/dist/Card-U2IJPk8B.js +0 -11
- package/dist/Card-U2IJPk8B.js.map +0 -1
- package/dist/Card-ZknG-yim-7W6rYSFV.js.map +0 -1
- package/dist/Checkbox-DyHm7Ntt-DYw5QL3l.js.map +0 -1
- package/dist/Checkbox-zg8LVvB6.js.map +0 -1
- package/dist/Checkbox.module-DZ58p15b-BUsQC1lW.js.map +0 -1
- package/dist/Chip-DXQiqF8k.js +0 -34
- package/dist/Chip-DXQiqF8k.js.map +0 -1
- package/dist/Chip-MbBEXeAm-DmAcwPRJ.js.map +0 -1
- package/dist/Combobox-BOpe_NUu.js.map +0 -1
- package/dist/DateField-Bqsnpt8S.js.map +0 -1
- package/dist/DateFieldRange-Cax7Kl9A.js +0 -22
- package/dist/DateFieldRange-Cax7Kl9A.js.map +0 -1
- package/dist/DateFieldSingle-bMX770gU.js +0 -22
- package/dist/DateFieldSingle-bMX770gU.js.map +0 -1
- package/dist/DateFieldYearless-ClNYTBK_.js +0 -22
- package/dist/DateFieldYearless-ClNYTBK_.js.map +0 -1
- package/dist/DateFieldYearless-pejtv7-x-DBHpW83U.js +0 -1373
- package/dist/DateFieldYearless-pejtv7-x-DBHpW83U.js.map +0 -1
- package/dist/DaysOfTheWeek-ImBPjEvl.js.map +0 -1
- package/dist/Details-DVg0EOkv.js.map +0 -1
- package/dist/Dialog-BR6f-XRH.js.map +0 -1
- package/dist/Divider-B0xGfyWE-f5-ThMiS.js.map +0 -1
- package/dist/Divider-azRKjITG.js +0 -13
- package/dist/Divider-azRKjITG.js.map +0 -1
- package/dist/DndSort-Cl0FCNQm.js +0 -5546
- package/dist/DndSort-Cl0FCNQm.js.map +0 -1
- package/dist/Drawer-0ayAWgAA.js +0 -142
- package/dist/Drawer-0ayAWgAA.js.map +0 -1
- package/dist/EditCard-B_n1uFkv.js.map +0 -1
- package/dist/FieldLabel-DWl5qsRY.js +0 -13
- package/dist/FieldLabel-DWl5qsRY.js.map +0 -1
- package/dist/FieldMessage-Bobp105T-DYhStLY4.js.map +0 -1
- package/dist/FieldMessage-DkJ0K5s-.js +0 -13
- package/dist/FieldMessage-DkJ0K5s-.js.map +0 -1
- package/dist/Flex-CiK7uNUu-BfxHG4L0.js.map +0 -1
- package/dist/Flex-Ln6PmaDl.js +0 -11
- package/dist/Flex-Ln6PmaDl.js.map +0 -1
- package/dist/Grid-CMcDeSYT.js +0 -33
- package/dist/Grid-CMcDeSYT.js.map +0 -1
- package/dist/Grid-DFAd8mTe.js.map +0 -1
- package/dist/HammerProvider-vt3DkcCZ-06BeBrPu.js.map +0 -1
- package/dist/Helper-h7k80qls-DHPFHTvI.js.map +0 -1
- package/dist/Icon-B6HmlQiR-BxQkO3X5.js.map +0 -1
- package/dist/Icon-BgKqBmlj.js +0 -13
- package/dist/Icon-BgKqBmlj.js.map +0 -1
- package/dist/InputMask-BOUlnmiF.js +0 -30
- package/dist/InputMask-BOUlnmiF.js.map +0 -1
- package/dist/InputMask-BuO8lNAB-DdxdO5Jw.js.map +0 -1
- package/dist/Link-C4N_cV3i.js +0 -45
- package/dist/Link-C4N_cV3i.js.map +0 -1
- package/dist/Link-MiffPrW9-Cx1zYWSF.js +0 -67
- package/dist/Link-MiffPrW9-Cx1zYWSF.js.map +0 -1
- package/dist/ListView-DVPhWDCM.js.map +0 -1
- package/dist/ListView.module-MVsNF0X0-MVsNF0X0.js.map +0 -1
- package/dist/Listbox-B-WUuj-_-BWWeWtLW.js.map +0 -1
- package/dist/Listbox-Di6OS1Fk.js +0 -67
- package/dist/Listbox-Di6OS1Fk.js.map +0 -1
- package/dist/Listbox.module-DcBE8Zmo-DcBE8Zmo.js.map +0 -1
- package/dist/LocalizationContext-UsmB5mnR-BUIYgNp2.js.map +0 -1
- package/dist/LocalizationProvider-VtRAfGBT-Bo8XuFoE.js.map +0 -1
- package/dist/Menu-DHCOMJx2.js +0 -60
- package/dist/Menu-DHCOMJx2.js.map +0 -1
- package/dist/Menu-TtVJnSrA-yBYichuJ.js.map +0 -1
- package/dist/NumberField-C9lMsPMD.js.map +0 -1
- package/dist/Overflow-CFClqFVC-BKqOBCan.js +0 -393
- package/dist/Overflow-CFClqFVC-BKqOBCan.js.map +0 -1
- package/dist/Overflow-w-3_04fS.js +0 -69
- package/dist/Overflow-w-3_04fS.js.map +0 -1
- package/dist/Page-CGAylFKz.js.map +0 -1
- package/dist/Pagination-DU_qvFRR.js.map +0 -1
- package/dist/Popover-BPiqdyu1.js +0 -135
- package/dist/Popover-BPiqdyu1.js.map +0 -1
- package/dist/Popover-CU2cGVD8-Casl3vM1.js.map +0 -1
- package/dist/PortalProvider-9lXkQ0xY-BKoGegS1.js.map +0 -1
- package/dist/ProgressBar-BRvB-bD4-DppwBrFg.js +0 -2616
- package/dist/ProgressBar-BRvB-bD4-DppwBrFg.js.map +0 -1
- package/dist/ProgressBar-lPKNTz6i.js +0 -13
- package/dist/ProgressBar-lPKNTz6i.js.map +0 -1
- package/dist/Radio-DQ_VQFGZ-SdFBlDnE.js.map +0 -1
- package/dist/Radio-DnOuBPi_.js.map +0 -1
- package/dist/SearchField-BGPqpnVd.js.map +0 -1
- package/dist/SegmentedControl-DY1PSYmd.js.map +0 -1
- package/dist/SelectCard-LSAl_7Lh-BYtfe9PC.js.map +0 -1
- package/dist/SelectCardGroup-u_QKdeRZ.js +0 -49
- package/dist/SelectCardGroup-u_QKdeRZ.js.map +0 -1
- package/dist/SelectTrigger-C2w-flvK.js.map +0 -1
- package/dist/SelectTrigger.css +0 -16
- package/dist/SelectTriggerBase-Dj154EN4-BtTvR-Nh.js.map +0 -1
- package/dist/SideNav-Bh_pVeEw.js.map +0 -1
- package/dist/Skeleton-COxTdwjO.js +0 -398
- package/dist/Skeleton-COxTdwjO.js.map +0 -1
- package/dist/Spinner-C1r3COiQ.js +0 -13
- package/dist/Spinner-C1r3COiQ.js.map +0 -1
- package/dist/Spinner-DliJVzdW-BQlZEj4V.js.map +0 -1
- package/dist/SrOnly-BsKDHetF-B93X65F1.js.map +0 -1
- package/dist/SrOnly-C_I8eH4C.js +0 -9
- package/dist/SrOnly-C_I8eH4C.js.map +0 -1
- package/dist/Stepper-BtbDBIzz.js.map +0 -1
- package/dist/Switch-DAQFzi-X.js.map +0 -1
- package/dist/Tab-BSC7e4rM.js.map +0 -1
- package/dist/Text-35Ve4Uq0.js +0 -13
- package/dist/Text-35Ve4Uq0.js.map +0 -1
- package/dist/Text-CED_yrId-DsRYZw2-.js.map +0 -1
- package/dist/TextField-B364hxo8.js +0 -29
- package/dist/TextField-B364hxo8.js.map +0 -1
- package/dist/TextField-DoPP1CQ--UWAOTYiv.js.map +0 -1
- package/dist/TextField.module-EkKlj66e-EkKlj66e.js.map +0 -1
- package/dist/Textarea-D2AAZ1L3.js.map +0 -1
- package/dist/ThemeProvider-DwJqkbiU.js +0 -7
- package/dist/ThemeProvider-DwJqkbiU.js.map +0 -1
- package/dist/ThemeProvider-Q3ji6Rpx-DBXlAuQ8.js.map +0 -1
- package/dist/TimeField-tA9uo4lK.js.map +0 -1
- package/dist/Toolbar-CSWhVSUM.js.map +0 -1
- package/dist/Tooltip-C2HQDvYj.js +0 -73
- package/dist/Tooltip-C2HQDvYj.js.map +0 -1
- package/dist/check_circle-BGfigqq-.js.map +0 -1
- package/dist/childrenToString-Bz9MqbHb-Bz9MqbHb.js.map +0 -1
- package/dist/components/Skeleton/Skeleton.d.ts +0 -153
- package/dist/floating-ui.react-BFNinq1w.js.map +0 -1
- package/dist/hooks/useLinkStyles/index.d.ts +0 -1
- package/dist/index-CKfiQx8n-4nziUo7G.js.map +0 -1
- package/dist/index.esm-dyoPQhi6.js.map +0 -1
- package/dist/toast-BhV_Ask2.js.map +0 -1
- package/dist/useAccessibleColor-Dc6B_M-Z-BYKjkGRg.js.map +0 -1
- package/dist/useBreakpoint-7QkBkSeP-Cv5fnZxs.js.map +0 -1
- package/dist/useFocusWithin-Cxz14Zyz-DEudRcSI.js.map +0 -1
- package/dist/useLayoutPropsUtil-DWACCL8v-CZNrcQT-.js.map +0 -1
- package/dist/useLinkStyles.d.ts +0 -6
- package/dist/useLinkStyles.js +0 -2
- package/dist/useLinkStyles.js.map +0 -1
- package/dist/useMergeRefs-Bde85AWI-Bde85AWI.js.map +0 -1
- package/dist/useOptionallyControlledState-DbDuos5L-DbDuos5L.js.map +0 -1
- package/dist/usePopoverCloseDelayWorkaround-BZcjPkvT-BZcjPkvT.js.map +0 -1
- package/dist/usePopoverSupport-B9Lsqryr-CYJxXiun.js.map +0 -1
- package/dist/usePrefersColorScheme-_hT7dK7_-_hT7dK7_.js.map +0 -1
- package/dist/useSwipe-CULmVQEk-CULmVQEk.js.map +0 -1
- /package/dist/components/SideNav/{SideNavProvider.d.ts → internal/SideNavProvider.d.ts} +0 -0
|
@@ -1,977 +1,1004 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useLayoutEffect, useEffect, useRef } from 'react';
|
|
2
|
+
import { useLayoutEffect, useEffect, useRef, createContext } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
function isNode(value) {
|
|
26
|
-
if (!hasWindow()) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
30
|
-
}
|
|
31
|
-
function isElement(value) {
|
|
32
|
-
if (!hasWindow()) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
36
|
-
}
|
|
37
|
-
function isHTMLElement(value) {
|
|
38
|
-
if (!hasWindow()) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
42
|
-
}
|
|
43
|
-
function isShadowRoot(value) {
|
|
44
|
-
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
48
|
-
}
|
|
49
|
-
function isOverflowElement(element) {
|
|
50
|
-
const {
|
|
51
|
-
overflow,
|
|
52
|
-
overflowX,
|
|
53
|
-
overflowY,
|
|
54
|
-
display
|
|
55
|
-
} = getComputedStyle$1(element);
|
|
56
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
57
|
-
}
|
|
58
|
-
function isTableElement(element) {
|
|
59
|
-
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
60
|
-
}
|
|
61
|
-
function isTopLayer(element) {
|
|
62
|
-
return [':popover-open', ':modal'].some(selector => {
|
|
63
|
-
try {
|
|
64
|
-
return element.matches(selector);
|
|
65
|
-
} catch (e) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function isContainingBlock(elementOrCss) {
|
|
71
|
-
const webkit = isWebKit();
|
|
72
|
-
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
5
|
+
/*!
|
|
6
|
+
* tabbable 6.2.0
|
|
7
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
8
|
+
*/
|
|
9
|
+
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
10
|
+
// `:not([inert], [inert] *)` (Feb 2023)
|
|
11
|
+
// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
|
|
12
|
+
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
13
|
+
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
14
|
+
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
15
|
+
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
16
|
+
var NoElement = typeof Element === 'undefined';
|
|
17
|
+
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
18
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
19
|
+
var _element$getRootNode;
|
|
20
|
+
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
21
|
+
} : function (element) {
|
|
22
|
+
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
23
|
+
};
|
|
73
24
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
currentNode = getParentNode(currentNode);
|
|
87
|
-
}
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
function isWebKit() {
|
|
91
|
-
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
92
|
-
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
93
|
-
}
|
|
94
|
-
function isLastTraversableNode(node) {
|
|
95
|
-
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
96
|
-
}
|
|
97
|
-
function getComputedStyle$1(element) {
|
|
98
|
-
return getWindow(element).getComputedStyle(element);
|
|
99
|
-
}
|
|
100
|
-
function getNodeScroll(element) {
|
|
101
|
-
if (isElement(element)) {
|
|
102
|
-
return {
|
|
103
|
-
scrollLeft: element.scrollLeft,
|
|
104
|
-
scrollTop: element.scrollTop
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
scrollLeft: element.scrollX,
|
|
109
|
-
scrollTop: element.scrollY
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
function getParentNode(node) {
|
|
113
|
-
if (getNodeName(node) === 'html') {
|
|
114
|
-
return node;
|
|
115
|
-
}
|
|
116
|
-
const result =
|
|
117
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
118
|
-
node.assignedSlot ||
|
|
119
|
-
// DOM Element detected.
|
|
120
|
-
node.parentNode ||
|
|
121
|
-
// ShadowRoot detected.
|
|
122
|
-
isShadowRoot(node) && node.host ||
|
|
123
|
-
// Fallback.
|
|
124
|
-
getDocumentElement(node);
|
|
125
|
-
return isShadowRoot(result) ? result.host : result;
|
|
126
|
-
}
|
|
127
|
-
function getNearestOverflowAncestor(node) {
|
|
128
|
-
const parentNode = getParentNode(node);
|
|
129
|
-
if (isLastTraversableNode(parentNode)) {
|
|
130
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
131
|
-
}
|
|
132
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
133
|
-
return parentNode;
|
|
134
|
-
}
|
|
135
|
-
return getNearestOverflowAncestor(parentNode);
|
|
136
|
-
}
|
|
137
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
138
|
-
var _node$ownerDocument2;
|
|
139
|
-
if (list === void 0) {
|
|
140
|
-
list = [];
|
|
141
|
-
}
|
|
142
|
-
if (traverseIframes === void 0) {
|
|
143
|
-
traverseIframes = true;
|
|
144
|
-
}
|
|
145
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
146
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
147
|
-
const win = getWindow(scrollableAncestor);
|
|
148
|
-
if (isBody) {
|
|
149
|
-
const frameElement = getFrameElement(win);
|
|
150
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
25
|
+
/**
|
|
26
|
+
* Determines if a node is inert or in an inert ancestor.
|
|
27
|
+
* @param {Element} [node]
|
|
28
|
+
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
|
|
29
|
+
* see if any of them are inert. If false, only `node` itself is considered.
|
|
30
|
+
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
31
|
+
* False if `node` is falsy.
|
|
32
|
+
*/
|
|
33
|
+
var isInert = function isInert(node, lookUp) {
|
|
34
|
+
var _node$getAttribute;
|
|
35
|
+
if (lookUp === void 0) {
|
|
36
|
+
lookUp = true;
|
|
151
37
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
38
|
+
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
39
|
+
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
40
|
+
// if it's `null` (not specified) or 'false', it's an active element
|
|
41
|
+
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
42
|
+
var inert = inertAtt === '' || inertAtt === 'true';
|
|
157
43
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
return activeElement;
|
|
165
|
-
}
|
|
166
|
-
function contains(parent, child) {
|
|
167
|
-
if (!parent || !child) {
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
170
|
-
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();
|
|
44
|
+
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
45
|
+
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
46
|
+
// code works for any kind of node
|
|
47
|
+
// CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
|
|
48
|
+
// so it likely would not support `:is([inert] *)` either...
|
|
49
|
+
var result = inert || lookUp && node && isInert(node.parentNode); // recursive
|
|
171
50
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
176
53
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Determines if a node's content is editable.
|
|
56
|
+
* @param {Element} [node]
|
|
57
|
+
* @returns True if it's content-editable; false if it's not or `node` is falsy.
|
|
58
|
+
*/
|
|
59
|
+
var isContentEditable = function isContentEditable(node) {
|
|
60
|
+
var _node$getAttribute2;
|
|
61
|
+
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
62
|
+
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
63
|
+
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
64
|
+
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
65
|
+
return attValue === '' || attValue === 'true';
|
|
66
|
+
};
|
|
188
67
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
68
|
+
/**
|
|
69
|
+
* @param {Element} el container to check in
|
|
70
|
+
* @param {boolean} includeContainer add container to check
|
|
71
|
+
* @param {(node: Element) => boolean} filter filter candidates
|
|
72
|
+
* @returns {Element[]}
|
|
73
|
+
*/
|
|
74
|
+
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
75
|
+
// even if `includeContainer=false`, we still have to check it for inertness because
|
|
76
|
+
// if it's inert, all its children are inert
|
|
77
|
+
if (isInert(el)) {
|
|
78
|
+
return [];
|
|
197
79
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const uaData = navigator.userAgentData;
|
|
202
|
-
if (uaData && Array.isArray(uaData.brands)) {
|
|
203
|
-
return uaData.brands.map(_ref => {
|
|
204
|
-
let {
|
|
205
|
-
brand,
|
|
206
|
-
version
|
|
207
|
-
} = _ref;
|
|
208
|
-
return brand + "/" + version;
|
|
209
|
-
}).join(' ');
|
|
80
|
+
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
81
|
+
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
82
|
+
candidates.unshift(el);
|
|
210
83
|
}
|
|
211
|
-
|
|
212
|
-
|
|
84
|
+
candidates = candidates.filter(filter);
|
|
85
|
+
return candidates;
|
|
86
|
+
};
|
|
213
87
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return true;
|
|
220
|
-
}
|
|
221
|
-
if (isAndroid() && event.pointerType) {
|
|
222
|
-
return event.type === 'click' && event.buttons === 1;
|
|
223
|
-
}
|
|
224
|
-
return event.detail === 0 && !event.pointerType;
|
|
225
|
-
}
|
|
226
|
-
function isVirtualPointerEvent(event) {
|
|
227
|
-
if (isJSDOM()) return false;
|
|
228
|
-
return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||
|
|
229
|
-
// iOS VoiceOver returns 0.333• for width/height.
|
|
230
|
-
event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';
|
|
231
|
-
}
|
|
232
|
-
function isSafari() {
|
|
233
|
-
// Chrome DevTools does not complain about navigator.vendor
|
|
234
|
-
return /apple/i.test(navigator.vendor);
|
|
235
|
-
}
|
|
236
|
-
function isAndroid() {
|
|
237
|
-
const re = /android/i;
|
|
238
|
-
return re.test(getPlatform()) || re.test(getUserAgent());
|
|
239
|
-
}
|
|
240
|
-
function isMac() {
|
|
241
|
-
return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;
|
|
242
|
-
}
|
|
243
|
-
function isJSDOM() {
|
|
244
|
-
return getUserAgent().includes('jsdom/');
|
|
245
|
-
}
|
|
246
|
-
function isMouseLikePointerType(pointerType, strict) {
|
|
247
|
-
// On some Linux machines with Chromium, mouse inputs return a `pointerType`
|
|
248
|
-
// of "pen": https://github.com/floating-ui/floating-ui/issues/2015
|
|
249
|
-
const values = ['mouse', 'pen'];
|
|
250
|
-
if (!strict) {
|
|
251
|
-
values.push('', undefined);
|
|
252
|
-
}
|
|
253
|
-
return values.includes(pointerType);
|
|
254
|
-
}
|
|
255
|
-
function isReactEvent(event) {
|
|
256
|
-
return 'nativeEvent' in event;
|
|
257
|
-
}
|
|
258
|
-
function isRootElement(element) {
|
|
259
|
-
return element.matches('html,body');
|
|
260
|
-
}
|
|
261
|
-
function getDocument(node) {
|
|
262
|
-
return (node == null ? void 0 : node.ownerDocument) || document;
|
|
263
|
-
}
|
|
264
|
-
function isEventTargetWithin(event, node) {
|
|
265
|
-
if (node == null) {
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
if ('composedPath' in event) {
|
|
269
|
-
return event.composedPath().includes(node);
|
|
270
|
-
}
|
|
88
|
+
/**
|
|
89
|
+
* @callback GetShadowRoot
|
|
90
|
+
* @param {Element} element to check for shadow root
|
|
91
|
+
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
|
|
92
|
+
*/
|
|
271
93
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if ('composedPath' in event) {
|
|
278
|
-
return event.composedPath()[0];
|
|
279
|
-
}
|
|
94
|
+
/**
|
|
95
|
+
* @callback ShadowRootFilter
|
|
96
|
+
* @param {Element} shadowHostNode the element which contains shadow content
|
|
97
|
+
* @returns {boolean} true if a shadow root could potentially contain valid candidates.
|
|
98
|
+
*/
|
|
280
99
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function isTypeableElement(element) {
|
|
287
|
-
return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
|
|
288
|
-
}
|
|
289
|
-
function stopEvent(event) {
|
|
290
|
-
event.preventDefault();
|
|
291
|
-
event.stopPropagation();
|
|
292
|
-
}
|
|
293
|
-
function isTypeableCombobox(element) {
|
|
294
|
-
if (!element) return false;
|
|
295
|
-
return element.getAttribute('role') === 'combobox' && isTypeableElement(element);
|
|
296
|
-
}
|
|
100
|
+
/**
|
|
101
|
+
* @typedef {Object} CandidateScope
|
|
102
|
+
* @property {Element} scopeParent contains inner candidates
|
|
103
|
+
* @property {Element[]} candidates list of candidates found in the scope parent
|
|
104
|
+
*/
|
|
297
105
|
|
|
298
106
|
/**
|
|
299
|
-
*
|
|
300
|
-
* @
|
|
107
|
+
* @typedef {Object} IterativeOptions
|
|
108
|
+
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
|
|
109
|
+
* if a function, implies shadow support is enabled and either returns the shadow root of an element
|
|
110
|
+
* or a boolean stating if it has an undisclosed shadow root
|
|
111
|
+
* @property {(node: Element) => boolean} filter filter candidates
|
|
112
|
+
* @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
|
|
113
|
+
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
|
|
301
114
|
*/
|
|
302
115
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
function
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
const bt = ['bottom', 'top'];
|
|
370
|
-
switch (side) {
|
|
371
|
-
case 'top':
|
|
372
|
-
case 'bottom':
|
|
373
|
-
if (rtl) return isStart ? rl : lr;
|
|
374
|
-
return isStart ? lr : rl;
|
|
375
|
-
case 'left':
|
|
376
|
-
case 'right':
|
|
377
|
-
return isStart ? tb : bt;
|
|
378
|
-
default:
|
|
379
|
-
return [];
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
383
|
-
const alignment = getAlignment(placement);
|
|
384
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
385
|
-
if (alignment) {
|
|
386
|
-
list = list.map(side => side + "-" + alignment);
|
|
387
|
-
if (flipAlignment) {
|
|
388
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
116
|
+
/**
|
|
117
|
+
* @param {Element[]} elements list of element containers to match candidates from
|
|
118
|
+
* @param {boolean} includeContainer add container list to check
|
|
119
|
+
* @param {IterativeOptions} options
|
|
120
|
+
* @returns {Array.<Element|CandidateScope>}
|
|
121
|
+
*/
|
|
122
|
+
var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
123
|
+
var candidates = [];
|
|
124
|
+
var elementsToCheck = Array.from(elements);
|
|
125
|
+
while (elementsToCheck.length) {
|
|
126
|
+
var element = elementsToCheck.shift();
|
|
127
|
+
if (isInert(element, false)) {
|
|
128
|
+
// no need to look up since we're drilling down
|
|
129
|
+
// anything inside this container will also be inert
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (element.tagName === 'SLOT') {
|
|
133
|
+
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
134
|
+
var assigned = element.assignedElements();
|
|
135
|
+
var content = assigned.length ? assigned : element.children;
|
|
136
|
+
var nestedCandidates = getCandidatesIteratively(content, true, options);
|
|
137
|
+
if (options.flatten) {
|
|
138
|
+
candidates.push.apply(candidates, nestedCandidates);
|
|
139
|
+
} else {
|
|
140
|
+
candidates.push({
|
|
141
|
+
scopeParent: element,
|
|
142
|
+
candidates: nestedCandidates
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
// check candidate element
|
|
147
|
+
var validCandidate = matches.call(element, candidateSelector);
|
|
148
|
+
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
149
|
+
candidates.push(element);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// iterate over shadow content if possible
|
|
153
|
+
var shadowRoot = element.shadowRoot ||
|
|
154
|
+
// check for an undisclosed shadow
|
|
155
|
+
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
156
|
+
|
|
157
|
+
// no inert look up because we're already drilling down and checking for inertness
|
|
158
|
+
// on the way down, so all containers to this root node should have already been
|
|
159
|
+
// vetted as non-inert
|
|
160
|
+
var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
|
|
161
|
+
if (shadowRoot && validShadowRoot) {
|
|
162
|
+
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
163
|
+
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
164
|
+
// child candidates found because they're likely slotted elements (elements that are
|
|
165
|
+
// children of the web component element (which has the shadow), in the light dom, but
|
|
166
|
+
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
167
|
+
// _after_ we return from this recursive call
|
|
168
|
+
var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
169
|
+
if (options.flatten) {
|
|
170
|
+
candidates.push.apply(candidates, _nestedCandidates);
|
|
171
|
+
} else {
|
|
172
|
+
candidates.push({
|
|
173
|
+
scopeParent: element,
|
|
174
|
+
candidates: _nestedCandidates
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
// there's not shadow so just dig into the element's (light dom) children
|
|
179
|
+
// __without__ giving the element special scope treatment
|
|
180
|
+
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
181
|
+
}
|
|
389
182
|
}
|
|
390
183
|
}
|
|
391
|
-
return
|
|
392
|
-
}
|
|
393
|
-
function getOppositePlacement(placement) {
|
|
394
|
-
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
395
|
-
}
|
|
396
|
-
function expandPaddingObject(padding) {
|
|
397
|
-
return {
|
|
398
|
-
top: 0,
|
|
399
|
-
right: 0,
|
|
400
|
-
bottom: 0,
|
|
401
|
-
left: 0,
|
|
402
|
-
...padding
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
function getPaddingObject(padding) {
|
|
406
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
407
|
-
top: padding,
|
|
408
|
-
right: padding,
|
|
409
|
-
bottom: padding,
|
|
410
|
-
left: padding
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
function rectToClientRect(rect) {
|
|
414
|
-
const {
|
|
415
|
-
x,
|
|
416
|
-
y,
|
|
417
|
-
width,
|
|
418
|
-
height
|
|
419
|
-
} = rect;
|
|
420
|
-
return {
|
|
421
|
-
width,
|
|
422
|
-
height,
|
|
423
|
-
top: y,
|
|
424
|
-
left: x,
|
|
425
|
-
right: x + width,
|
|
426
|
-
bottom: y + height,
|
|
427
|
-
x,
|
|
428
|
-
y
|
|
429
|
-
};
|
|
430
|
-
}
|
|
184
|
+
return candidates;
|
|
185
|
+
};
|
|
431
186
|
|
|
432
|
-
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
441
|
-
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
442
|
-
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
443
|
-
var NoElement = typeof Element === 'undefined';
|
|
444
|
-
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
445
|
-
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
446
|
-
var _element$getRootNode;
|
|
447
|
-
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
448
|
-
} : function (element) {
|
|
449
|
-
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
187
|
+
/**
|
|
188
|
+
* @private
|
|
189
|
+
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
190
|
+
* @param {HTMLElement} node
|
|
191
|
+
* @returns {boolean} True if so; false if not.
|
|
192
|
+
*/
|
|
193
|
+
var hasTabIndex = function hasTabIndex(node) {
|
|
194
|
+
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
450
195
|
};
|
|
451
196
|
|
|
452
197
|
/**
|
|
453
|
-
*
|
|
454
|
-
* @param {
|
|
455
|
-
* @
|
|
456
|
-
*
|
|
457
|
-
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
458
|
-
* False if `node` is falsy.
|
|
198
|
+
* Determine the tab index of a given node.
|
|
199
|
+
* @param {HTMLElement} node
|
|
200
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
201
|
+
* @throws {Error} If `node` is falsy.
|
|
459
202
|
*/
|
|
460
|
-
var
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
lookUp = true;
|
|
203
|
+
var getTabIndex = function getTabIndex(node) {
|
|
204
|
+
if (!node) {
|
|
205
|
+
throw new Error('No node provided');
|
|
464
206
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
return result;
|
|
207
|
+
if (node.tabIndex < 0) {
|
|
208
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
209
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
210
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
211
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
212
|
+
// order, consider their tab index to be 0.
|
|
213
|
+
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
214
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
215
|
+
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
216
|
+
return 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return node.tabIndex;
|
|
479
220
|
};
|
|
480
221
|
|
|
481
222
|
/**
|
|
482
|
-
*
|
|
483
|
-
* @param {
|
|
484
|
-
* @
|
|
223
|
+
* Determine the tab index of a given node __for sort order purposes__.
|
|
224
|
+
* @param {HTMLElement} node
|
|
225
|
+
* @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
|
|
226
|
+
* has tabIndex -1, but needs to be sorted by document order in order for its content to be
|
|
227
|
+
* inserted into the correct sort position.
|
|
228
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
485
229
|
*/
|
|
486
|
-
var
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
230
|
+
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
|
|
231
|
+
var tabIndex = getTabIndex(node);
|
|
232
|
+
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
233
|
+
return 0;
|
|
234
|
+
}
|
|
235
|
+
return tabIndex;
|
|
236
|
+
};
|
|
237
|
+
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
238
|
+
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
239
|
+
};
|
|
240
|
+
var isInput = function isInput(node) {
|
|
241
|
+
return node.tagName === 'INPUT';
|
|
242
|
+
};
|
|
243
|
+
var isHiddenInput = function isHiddenInput(node) {
|
|
244
|
+
return isInput(node) && node.type === 'hidden';
|
|
245
|
+
};
|
|
246
|
+
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
247
|
+
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
248
|
+
return child.tagName === 'SUMMARY';
|
|
249
|
+
});
|
|
250
|
+
return r;
|
|
251
|
+
};
|
|
252
|
+
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
253
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
254
|
+
if (nodes[i].checked && nodes[i].form === form) {
|
|
255
|
+
return nodes[i];
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
var isTabbableRadio = function isTabbableRadio(node) {
|
|
260
|
+
if (!node.name) {
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
var radioScope = node.form || getRootNode(node);
|
|
264
|
+
var queryRadios = function queryRadios(name) {
|
|
265
|
+
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
266
|
+
};
|
|
267
|
+
var radioSet;
|
|
268
|
+
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
269
|
+
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
270
|
+
} else {
|
|
271
|
+
try {
|
|
272
|
+
radioSet = queryRadios(node.name);
|
|
273
|
+
} catch (err) {
|
|
274
|
+
// eslint-disable-next-line no-console
|
|
275
|
+
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
var checked = getCheckedRadio(radioSet, node.form);
|
|
280
|
+
return !checked || checked === node;
|
|
281
|
+
};
|
|
282
|
+
var isRadio = function isRadio(node) {
|
|
283
|
+
return isInput(node) && node.type === 'radio';
|
|
284
|
+
};
|
|
285
|
+
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
286
|
+
return isRadio(node) && !isTabbableRadio(node);
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// determines if a node is ultimately attached to the window's document
|
|
290
|
+
var isNodeAttached = function isNodeAttached(node) {
|
|
291
|
+
var _nodeRoot;
|
|
292
|
+
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
293
|
+
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
294
|
+
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
295
|
+
// is attached, and the one we need to check if it's in the document or not (because the
|
|
296
|
+
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
297
|
+
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
298
|
+
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
299
|
+
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
300
|
+
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
301
|
+
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
302
|
+
// tested).
|
|
303
|
+
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
304
|
+
// that is attached (or find none) because the node might be in nested shadows...
|
|
305
|
+
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
306
|
+
// document (per the docs) and while it's a Document-type object, that document does not
|
|
307
|
+
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
308
|
+
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
309
|
+
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
310
|
+
// node is actually detached.
|
|
311
|
+
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
312
|
+
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
313
|
+
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
314
|
+
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
315
|
+
var nodeRoot = node && getRootNode(node);
|
|
316
|
+
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
317
|
+
|
|
318
|
+
// in some cases, a detached node will return itself as the root instead of a document or
|
|
319
|
+
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
320
|
+
var attached = false;
|
|
321
|
+
if (nodeRoot && nodeRoot !== node) {
|
|
322
|
+
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
323
|
+
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
324
|
+
while (!attached && nodeRootHost) {
|
|
325
|
+
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
326
|
+
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
327
|
+
// which means we need to get the host's host and check if that parent host is contained
|
|
328
|
+
// in (i.e. attached to) the document
|
|
329
|
+
nodeRoot = getRootNode(nodeRootHost);
|
|
330
|
+
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
331
|
+
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return attached;
|
|
493
335
|
};
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
var
|
|
502
|
-
|
|
503
|
-
//
|
|
504
|
-
|
|
505
|
-
|
|
336
|
+
var isZeroArea = function isZeroArea(node) {
|
|
337
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
338
|
+
width = _node$getBoundingClie.width,
|
|
339
|
+
height = _node$getBoundingClie.height;
|
|
340
|
+
return width === 0 && height === 0;
|
|
341
|
+
};
|
|
342
|
+
var isHidden = function isHidden(node, _ref) {
|
|
343
|
+
var displayCheck = _ref.displayCheck,
|
|
344
|
+
getShadowRoot = _ref.getShadowRoot;
|
|
345
|
+
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
346
|
+
// (see notes about this further down), which means we will consider it visible
|
|
347
|
+
// (this is legacy behavior from a very long way back)
|
|
348
|
+
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
349
|
+
// _visibility_ check, not a _display_ check
|
|
350
|
+
if (getComputedStyle(node).visibility === 'hidden') {
|
|
351
|
+
return true;
|
|
506
352
|
}
|
|
507
|
-
var
|
|
508
|
-
|
|
509
|
-
|
|
353
|
+
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
354
|
+
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
355
|
+
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
356
|
+
return true;
|
|
510
357
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
358
|
+
if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
|
|
359
|
+
if (typeof getShadowRoot === 'function') {
|
|
360
|
+
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
361
|
+
// 'non-zero-area' fallback
|
|
362
|
+
var originalNode = node;
|
|
363
|
+
while (node) {
|
|
364
|
+
var parentElement = node.parentElement;
|
|
365
|
+
var rootNode = getRootNode(node);
|
|
366
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
367
|
+
) {
|
|
368
|
+
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
369
|
+
// fall back to a non-zero-area test
|
|
370
|
+
return isZeroArea(node);
|
|
371
|
+
} else if (node.assignedSlot) {
|
|
372
|
+
// iterate up slot
|
|
373
|
+
node = node.assignedSlot;
|
|
374
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
375
|
+
// cross shadow boundary
|
|
376
|
+
node = rootNode.host;
|
|
377
|
+
} else {
|
|
378
|
+
// iterate up normal dom
|
|
379
|
+
node = parentElement;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
node = originalNode;
|
|
383
|
+
}
|
|
384
|
+
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
385
|
+
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
386
|
+
// it might be a falsy value, which means shadow DOM support is disabled
|
|
526
387
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
388
|
+
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
389
|
+
// now we can just test to see if it would normally be visible or not, provided it's
|
|
390
|
+
// attached to the main document.
|
|
391
|
+
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
392
|
+
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
532
393
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
|
|
541
|
-
*/
|
|
394
|
+
if (isNodeAttached(node)) {
|
|
395
|
+
// this works wherever the node is: if there's at least one client rect, it's
|
|
396
|
+
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
397
|
+
// node itself is hidden in place of its contents; and there's no need to search
|
|
398
|
+
// up the hierarchy either
|
|
399
|
+
return !node.getClientRects().length;
|
|
400
|
+
}
|
|
542
401
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
402
|
+
// Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
403
|
+
// API will __always__ return zero rects (this can happen, for example, if React
|
|
404
|
+
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
405
|
+
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
406
|
+
//
|
|
407
|
+
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
408
|
+
// because styles are only computed for nodes that are in the document.
|
|
409
|
+
//
|
|
410
|
+
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
411
|
+
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
412
|
+
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
413
|
+
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
414
|
+
// considering __everything__ to be visible because of the innability to determine styles.
|
|
415
|
+
//
|
|
416
|
+
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
417
|
+
// nodes as visible with the 'none' fallback.__
|
|
418
|
+
if (displayCheck !== 'legacy-full') {
|
|
419
|
+
return true; // hidden
|
|
558
420
|
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
scopeParent: element,
|
|
569
|
-
candidates: nestedCandidates
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
} else {
|
|
573
|
-
// check candidate element
|
|
574
|
-
var validCandidate = matches.call(element, candidateSelector);
|
|
575
|
-
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
576
|
-
candidates.push(element);
|
|
577
|
-
}
|
|
421
|
+
// else, fallback to 'none' mode and consider the node visible
|
|
422
|
+
} else if (displayCheck === 'non-zero-area') {
|
|
423
|
+
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
424
|
+
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
425
|
+
// client rect, we don't special-case for whether the node is attached or not. In
|
|
426
|
+
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
427
|
+
// times, and that includes attached or not.
|
|
428
|
+
return isZeroArea(node);
|
|
429
|
+
}
|
|
578
430
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
431
|
+
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
|
|
432
|
+
// it's visible
|
|
433
|
+
return false;
|
|
434
|
+
};
|
|
583
435
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
//
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
});
|
|
436
|
+
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
437
|
+
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
438
|
+
// fieldset
|
|
439
|
+
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
440
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
441
|
+
var parentNode = node.parentElement;
|
|
442
|
+
// check if `node` is contained in a disabled <fieldset>
|
|
443
|
+
while (parentNode) {
|
|
444
|
+
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
445
|
+
// look for the first <legend> among the children of the disabled <fieldset>
|
|
446
|
+
for (var i = 0; i < parentNode.children.length; i++) {
|
|
447
|
+
var child = parentNode.children.item(i);
|
|
448
|
+
// when the first <legend> (in document order) is found
|
|
449
|
+
if (child.tagName === 'LEGEND') {
|
|
450
|
+
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
451
|
+
// return whether `node` is a descendant of its first <legend>
|
|
452
|
+
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
453
|
+
}
|
|
603
454
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
// __without__ giving the element special scope treatment
|
|
607
|
-
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
455
|
+
// the disabled <fieldset> containing `node` has no <legend>
|
|
456
|
+
return true;
|
|
608
457
|
}
|
|
458
|
+
parentNode = parentNode.parentElement;
|
|
609
459
|
}
|
|
610
460
|
}
|
|
611
|
-
|
|
461
|
+
|
|
462
|
+
// else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
463
|
+
// enabled/disabled state
|
|
464
|
+
return false;
|
|
465
|
+
};
|
|
466
|
+
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
467
|
+
if (node.disabled ||
|
|
468
|
+
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
469
|
+
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
470
|
+
// note related to `candidateSelectors`)
|
|
471
|
+
isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
472
|
+
// For a details element with a summary, the summary element gets the focus
|
|
473
|
+
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
return true;
|
|
477
|
+
};
|
|
478
|
+
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
479
|
+
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
480
|
+
return false;
|
|
481
|
+
}
|
|
482
|
+
return true;
|
|
483
|
+
};
|
|
484
|
+
var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
|
|
485
|
+
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
|
|
486
|
+
if (isNaN(tabIndex) || tabIndex >= 0) {
|
|
487
|
+
return true;
|
|
488
|
+
}
|
|
489
|
+
// If a custom element has an explicit negative tabindex,
|
|
490
|
+
// browsers will not allow tab targeting said element's children.
|
|
491
|
+
return false;
|
|
612
492
|
};
|
|
613
493
|
|
|
614
494
|
/**
|
|
615
|
-
* @
|
|
616
|
-
*
|
|
617
|
-
* @param {HTMLElement} node
|
|
618
|
-
* @returns {boolean} True if so; false if not.
|
|
495
|
+
* @param {Array.<Element|CandidateScope>} candidates
|
|
496
|
+
* @returns Element[]
|
|
619
497
|
*/
|
|
620
|
-
var
|
|
621
|
-
|
|
498
|
+
var sortByOrder = function sortByOrder(candidates) {
|
|
499
|
+
var regularTabbables = [];
|
|
500
|
+
var orderedTabbables = [];
|
|
501
|
+
candidates.forEach(function (item, i) {
|
|
502
|
+
var isScope = !!item.scopeParent;
|
|
503
|
+
var element = isScope ? item.scopeParent : item;
|
|
504
|
+
var candidateTabindex = getSortOrderTabIndex(element, isScope);
|
|
505
|
+
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
506
|
+
if (candidateTabindex === 0) {
|
|
507
|
+
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
508
|
+
} else {
|
|
509
|
+
orderedTabbables.push({
|
|
510
|
+
documentOrder: i,
|
|
511
|
+
tabIndex: candidateTabindex,
|
|
512
|
+
item: item,
|
|
513
|
+
isScope: isScope,
|
|
514
|
+
content: elements
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
519
|
+
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
520
|
+
return acc;
|
|
521
|
+
}, []).concat(regularTabbables);
|
|
622
522
|
};
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
523
|
+
var tabbable = function tabbable(container, options) {
|
|
524
|
+
options = options || {};
|
|
525
|
+
var candidates;
|
|
526
|
+
if (options.getShadowRoot) {
|
|
527
|
+
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
528
|
+
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
529
|
+
flatten: false,
|
|
530
|
+
getShadowRoot: options.getShadowRoot,
|
|
531
|
+
shadowRootFilter: isValidShadowRootTabbable
|
|
532
|
+
});
|
|
533
|
+
} else {
|
|
534
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
535
|
+
}
|
|
536
|
+
return sortByOrder(candidates);
|
|
537
|
+
};
|
|
538
|
+
var isTabbable = function isTabbable(node, options) {
|
|
539
|
+
options = options || {};
|
|
631
540
|
if (!node) {
|
|
632
541
|
throw new Error('No node provided');
|
|
633
542
|
}
|
|
634
|
-
if (node
|
|
635
|
-
|
|
636
|
-
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
637
|
-
// yet they are still part of the regular tab order; in FF, they get a default
|
|
638
|
-
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
639
|
-
// order, consider their tab index to be 0.
|
|
640
|
-
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
641
|
-
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
642
|
-
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
643
|
-
return 0;
|
|
644
|
-
}
|
|
543
|
+
if (matches.call(node, candidateSelector) === false) {
|
|
544
|
+
return false;
|
|
645
545
|
}
|
|
646
|
-
return node
|
|
546
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
|
647
547
|
};
|
|
648
548
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
var tabIndex = getTabIndex(node);
|
|
659
|
-
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
660
|
-
return 0;
|
|
549
|
+
function supportsPopover() {
|
|
550
|
+
return Object.prototype.hasOwnProperty.call(HTMLElement.prototype, "popover");
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
const safeShowPopover = (element) => {
|
|
554
|
+
try {
|
|
555
|
+
element?.showPopover();
|
|
556
|
+
} catch (e) {
|
|
557
|
+
console.warn(e);
|
|
661
558
|
}
|
|
662
|
-
return tabIndex;
|
|
663
|
-
};
|
|
664
|
-
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
665
|
-
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
666
|
-
};
|
|
667
|
-
var isInput = function isInput(node) {
|
|
668
|
-
return node.tagName === 'INPUT';
|
|
669
|
-
};
|
|
670
|
-
var isHiddenInput = function isHiddenInput(node) {
|
|
671
|
-
return isInput(node) && node.type === 'hidden';
|
|
672
559
|
};
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
})
|
|
677
|
-
|
|
678
|
-
};
|
|
679
|
-
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
680
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
681
|
-
if (nodes[i].checked && nodes[i].form === form) {
|
|
682
|
-
return nodes[i];
|
|
683
|
-
}
|
|
560
|
+
const safeHidePopover = (element) => {
|
|
561
|
+
try {
|
|
562
|
+
element?.hidePopover();
|
|
563
|
+
} catch (e) {
|
|
564
|
+
console.warn(e);
|
|
684
565
|
}
|
|
685
566
|
};
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
567
|
+
|
|
568
|
+
function hasWindow() {
|
|
569
|
+
return typeof window !== 'undefined';
|
|
570
|
+
}
|
|
571
|
+
function getNodeName(node) {
|
|
572
|
+
if (isNode(node)) {
|
|
573
|
+
return (node.nodeName || '').toLowerCase();
|
|
689
574
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
575
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
576
|
+
// returning `#document` an infinite loop won't occur.
|
|
577
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
578
|
+
return '#document';
|
|
579
|
+
}
|
|
580
|
+
function getWindow(node) {
|
|
581
|
+
var _node$ownerDocument;
|
|
582
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
583
|
+
}
|
|
584
|
+
function getDocumentElement(node) {
|
|
585
|
+
var _ref;
|
|
586
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
587
|
+
}
|
|
588
|
+
function isNode(value) {
|
|
589
|
+
if (!hasWindow()) {
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
593
|
+
}
|
|
594
|
+
function isElement(value) {
|
|
595
|
+
if (!hasWindow()) {
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
599
|
+
}
|
|
600
|
+
function isHTMLElement(value) {
|
|
601
|
+
if (!hasWindow()) {
|
|
602
|
+
return false;
|
|
603
|
+
}
|
|
604
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
605
|
+
}
|
|
606
|
+
function isShadowRoot(value) {
|
|
607
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
611
|
+
}
|
|
612
|
+
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
613
|
+
function isOverflowElement(element) {
|
|
614
|
+
const {
|
|
615
|
+
overflow,
|
|
616
|
+
overflowX,
|
|
617
|
+
overflowY,
|
|
618
|
+
display
|
|
619
|
+
} = getComputedStyle$1(element);
|
|
620
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
621
|
+
}
|
|
622
|
+
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
623
|
+
function isTableElement(element) {
|
|
624
|
+
return tableElements.has(getNodeName(element));
|
|
625
|
+
}
|
|
626
|
+
const topLayerSelectors = [':popover-open', ':modal'];
|
|
627
|
+
function isTopLayer(element) {
|
|
628
|
+
return topLayerSelectors.some(selector => {
|
|
698
629
|
try {
|
|
699
|
-
|
|
700
|
-
} catch (
|
|
701
|
-
// eslint-disable-next-line no-console
|
|
702
|
-
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
630
|
+
return element.matches(selector);
|
|
631
|
+
} catch (_e) {
|
|
703
632
|
return false;
|
|
704
633
|
}
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
|
|
637
|
+
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
|
|
638
|
+
const containValues = ['paint', 'layout', 'strict', 'content'];
|
|
639
|
+
function isContainingBlock(elementOrCss) {
|
|
640
|
+
const webkit = isWebKit();
|
|
641
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
642
|
+
|
|
643
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
644
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
645
|
+
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
|
|
646
|
+
}
|
|
647
|
+
function getContainingBlock(element) {
|
|
648
|
+
let currentNode = getParentNode(element);
|
|
649
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
650
|
+
if (isContainingBlock(currentNode)) {
|
|
651
|
+
return currentNode;
|
|
652
|
+
} else if (isTopLayer(currentNode)) {
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
currentNode = getParentNode(currentNode);
|
|
656
|
+
}
|
|
657
|
+
return null;
|
|
658
|
+
}
|
|
659
|
+
function isWebKit() {
|
|
660
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
661
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
662
|
+
}
|
|
663
|
+
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
664
|
+
function isLastTraversableNode(node) {
|
|
665
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
666
|
+
}
|
|
667
|
+
function getComputedStyle$1(element) {
|
|
668
|
+
return getWindow(element).getComputedStyle(element);
|
|
669
|
+
}
|
|
670
|
+
function getNodeScroll(element) {
|
|
671
|
+
if (isElement(element)) {
|
|
672
|
+
return {
|
|
673
|
+
scrollLeft: element.scrollLeft,
|
|
674
|
+
scrollTop: element.scrollTop
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
return {
|
|
678
|
+
scrollLeft: element.scrollX,
|
|
679
|
+
scrollTop: element.scrollY
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
function getParentNode(node) {
|
|
683
|
+
if (getNodeName(node) === 'html') {
|
|
684
|
+
return node;
|
|
685
|
+
}
|
|
686
|
+
const result =
|
|
687
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
688
|
+
node.assignedSlot ||
|
|
689
|
+
// DOM Element detected.
|
|
690
|
+
node.parentNode ||
|
|
691
|
+
// ShadowRoot detected.
|
|
692
|
+
isShadowRoot(node) && node.host ||
|
|
693
|
+
// Fallback.
|
|
694
|
+
getDocumentElement(node);
|
|
695
|
+
return isShadowRoot(result) ? result.host : result;
|
|
696
|
+
}
|
|
697
|
+
function getNearestOverflowAncestor(node) {
|
|
698
|
+
const parentNode = getParentNode(node);
|
|
699
|
+
if (isLastTraversableNode(parentNode)) {
|
|
700
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
701
|
+
}
|
|
702
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
703
|
+
return parentNode;
|
|
704
|
+
}
|
|
705
|
+
return getNearestOverflowAncestor(parentNode);
|
|
706
|
+
}
|
|
707
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
708
|
+
var _node$ownerDocument2;
|
|
709
|
+
if (list === void 0) {
|
|
710
|
+
list = [];
|
|
711
|
+
}
|
|
712
|
+
if (traverseIframes === void 0) {
|
|
713
|
+
traverseIframes = true;
|
|
714
|
+
}
|
|
715
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
716
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
717
|
+
const win = getWindow(scrollableAncestor);
|
|
718
|
+
if (isBody) {
|
|
719
|
+
const frameElement = getFrameElement(win);
|
|
720
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
705
721
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
};
|
|
712
|
-
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
713
|
-
return isRadio(node) && !isTabbableRadio(node);
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
// determines if a node is ultimately attached to the window's document
|
|
717
|
-
var isNodeAttached = function isNodeAttached(node) {
|
|
718
|
-
var _nodeRoot;
|
|
719
|
-
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
720
|
-
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
721
|
-
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
722
|
-
// is attached, and the one we need to check if it's in the document or not (because the
|
|
723
|
-
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
724
|
-
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
725
|
-
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
726
|
-
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
727
|
-
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
728
|
-
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
729
|
-
// tested).
|
|
730
|
-
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
731
|
-
// that is attached (or find none) because the node might be in nested shadows...
|
|
732
|
-
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
733
|
-
// document (per the docs) and while it's a Document-type object, that document does not
|
|
734
|
-
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
735
|
-
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
736
|
-
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
737
|
-
// node is actually detached.
|
|
738
|
-
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
739
|
-
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
740
|
-
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
741
|
-
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
742
|
-
var nodeRoot = node && getRootNode(node);
|
|
743
|
-
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
722
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
723
|
+
}
|
|
724
|
+
function getFrameElement(win) {
|
|
725
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
726
|
+
}
|
|
744
727
|
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
751
|
-
while (!attached && nodeRootHost) {
|
|
752
|
-
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
753
|
-
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
754
|
-
// which means we need to get the host's host and check if that parent host is contained
|
|
755
|
-
// in (i.e. attached to) the document
|
|
756
|
-
nodeRoot = getRootNode(nodeRootHost);
|
|
757
|
-
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
758
|
-
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
759
|
-
}
|
|
728
|
+
function activeElement(doc) {
|
|
729
|
+
let activeElement = doc.activeElement;
|
|
730
|
+
while (((_activeElement = activeElement) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {
|
|
731
|
+
var _activeElement;
|
|
732
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
760
733
|
}
|
|
761
|
-
return
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
height = _node$getBoundingClie.height;
|
|
767
|
-
return width === 0 && height === 0;
|
|
768
|
-
};
|
|
769
|
-
var isHidden = function isHidden(node, _ref) {
|
|
770
|
-
var displayCheck = _ref.displayCheck,
|
|
771
|
-
getShadowRoot = _ref.getShadowRoot;
|
|
772
|
-
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
773
|
-
// (see notes about this further down), which means we will consider it visible
|
|
774
|
-
// (this is legacy behavior from a very long way back)
|
|
775
|
-
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
776
|
-
// _visibility_ check, not a _display_ check
|
|
777
|
-
if (getComputedStyle(node).visibility === 'hidden') {
|
|
778
|
-
return true;
|
|
734
|
+
return activeElement;
|
|
735
|
+
}
|
|
736
|
+
function contains(parent, child) {
|
|
737
|
+
if (!parent || !child) {
|
|
738
|
+
return false;
|
|
779
739
|
}
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
740
|
+
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();
|
|
741
|
+
|
|
742
|
+
// First, attempt with faster native method
|
|
743
|
+
if (parent.contains(child)) {
|
|
783
744
|
return true;
|
|
784
745
|
}
|
|
785
|
-
if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
|
|
786
|
-
if (typeof getShadowRoot === 'function') {
|
|
787
|
-
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
788
|
-
// 'non-zero-area' fallback
|
|
789
|
-
var originalNode = node;
|
|
790
|
-
while (node) {
|
|
791
|
-
var parentElement = node.parentElement;
|
|
792
|
-
var rootNode = getRootNode(node);
|
|
793
|
-
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
794
|
-
) {
|
|
795
|
-
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
796
|
-
// fall back to a non-zero-area test
|
|
797
|
-
return isZeroArea(node);
|
|
798
|
-
} else if (node.assignedSlot) {
|
|
799
|
-
// iterate up slot
|
|
800
|
-
node = node.assignedSlot;
|
|
801
|
-
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
802
|
-
// cross shadow boundary
|
|
803
|
-
node = rootNode.host;
|
|
804
|
-
} else {
|
|
805
|
-
// iterate up normal dom
|
|
806
|
-
node = parentElement;
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
node = originalNode;
|
|
810
|
-
}
|
|
811
|
-
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
812
|
-
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
813
|
-
// it might be a falsy value, which means shadow DOM support is disabled
|
|
814
|
-
|
|
815
|
-
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
816
|
-
// now we can just test to see if it would normally be visible or not, provided it's
|
|
817
|
-
// attached to the main document.
|
|
818
|
-
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
819
|
-
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
820
|
-
|
|
821
|
-
if (isNodeAttached(node)) {
|
|
822
|
-
// this works wherever the node is: if there's at least one client rect, it's
|
|
823
|
-
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
824
|
-
// node itself is hidden in place of its contents; and there's no need to search
|
|
825
|
-
// up the hierarchy either
|
|
826
|
-
return !node.getClientRects().length;
|
|
827
|
-
}
|
|
828
746
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
839
|
-
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
840
|
-
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
841
|
-
// considering __everything__ to be visible because of the innability to determine styles.
|
|
842
|
-
//
|
|
843
|
-
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
844
|
-
// nodes as visible with the 'none' fallback.__
|
|
845
|
-
if (displayCheck !== 'legacy-full') {
|
|
846
|
-
return true; // hidden
|
|
747
|
+
// then fallback to custom implementation with Shadow DOM support
|
|
748
|
+
if (rootNode && isShadowRoot(rootNode)) {
|
|
749
|
+
let next = child;
|
|
750
|
+
while (next) {
|
|
751
|
+
if (parent === next) {
|
|
752
|
+
return true;
|
|
753
|
+
}
|
|
754
|
+
// @ts-ignore
|
|
755
|
+
next = next.parentNode || next.host;
|
|
847
756
|
}
|
|
848
|
-
// else, fallback to 'none' mode and consider the node visible
|
|
849
|
-
} else if (displayCheck === 'non-zero-area') {
|
|
850
|
-
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
851
|
-
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
852
|
-
// client rect, we don't special-case for whether the node is attached or not. In
|
|
853
|
-
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
854
|
-
// times, and that includes attached or not.
|
|
855
|
-
return isZeroArea(node);
|
|
856
757
|
}
|
|
857
758
|
|
|
858
|
-
//
|
|
859
|
-
// it's visible
|
|
759
|
+
// Give up, the result is false
|
|
860
760
|
return false;
|
|
861
|
-
}
|
|
761
|
+
}
|
|
762
|
+
// Avoid Chrome DevTools blue warning.
|
|
763
|
+
function getPlatform() {
|
|
764
|
+
const uaData = navigator.userAgentData;
|
|
765
|
+
if (uaData != null && uaData.platform) {
|
|
766
|
+
return uaData.platform;
|
|
767
|
+
}
|
|
768
|
+
return navigator.platform;
|
|
769
|
+
}
|
|
770
|
+
function getUserAgent() {
|
|
771
|
+
const uaData = navigator.userAgentData;
|
|
772
|
+
if (uaData && Array.isArray(uaData.brands)) {
|
|
773
|
+
return uaData.brands.map(_ref => {
|
|
774
|
+
let {
|
|
775
|
+
brand,
|
|
776
|
+
version
|
|
777
|
+
} = _ref;
|
|
778
|
+
return brand + "/" + version;
|
|
779
|
+
}).join(' ');
|
|
780
|
+
}
|
|
781
|
+
return navigator.userAgent;
|
|
782
|
+
}
|
|
862
783
|
|
|
863
|
-
//
|
|
864
|
-
|
|
865
|
-
//
|
|
866
|
-
|
|
867
|
-
if (
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
784
|
+
// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts
|
|
785
|
+
function isVirtualClick(event) {
|
|
786
|
+
// FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.
|
|
787
|
+
// Try to find a workaround for this. `react-aria` source still has the check.
|
|
788
|
+
if (event.mozInputSource === 0 && event.isTrusted) {
|
|
789
|
+
return true;
|
|
790
|
+
}
|
|
791
|
+
if (isAndroid() && event.pointerType) {
|
|
792
|
+
return event.type === 'click' && event.buttons === 1;
|
|
793
|
+
}
|
|
794
|
+
return event.detail === 0 && !event.pointerType;
|
|
795
|
+
}
|
|
796
|
+
function isVirtualPointerEvent(event) {
|
|
797
|
+
if (isJSDOM()) return false;
|
|
798
|
+
return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||
|
|
799
|
+
// iOS VoiceOver returns 0.333• for width/height.
|
|
800
|
+
event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';
|
|
801
|
+
}
|
|
802
|
+
function isSafari() {
|
|
803
|
+
// Chrome DevTools does not complain about navigator.vendor
|
|
804
|
+
return /apple/i.test(navigator.vendor);
|
|
805
|
+
}
|
|
806
|
+
function isAndroid() {
|
|
807
|
+
const re = /android/i;
|
|
808
|
+
return re.test(getPlatform()) || re.test(getUserAgent());
|
|
809
|
+
}
|
|
810
|
+
function isMac() {
|
|
811
|
+
return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;
|
|
812
|
+
}
|
|
813
|
+
function isJSDOM() {
|
|
814
|
+
return getUserAgent().includes('jsdom/');
|
|
815
|
+
}
|
|
816
|
+
function isMouseLikePointerType(pointerType, strict) {
|
|
817
|
+
// On some Linux machines with Chromium, mouse inputs return a `pointerType`
|
|
818
|
+
// of "pen": https://github.com/floating-ui/floating-ui/issues/2015
|
|
819
|
+
const values = ['mouse', 'pen'];
|
|
820
|
+
if (!strict) {
|
|
821
|
+
values.push('', undefined);
|
|
887
822
|
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
return
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
823
|
+
return values.includes(pointerType);
|
|
824
|
+
}
|
|
825
|
+
function isReactEvent(event) {
|
|
826
|
+
return 'nativeEvent' in event;
|
|
827
|
+
}
|
|
828
|
+
function isRootElement(element) {
|
|
829
|
+
return element.matches('html,body');
|
|
830
|
+
}
|
|
831
|
+
function getDocument(node) {
|
|
832
|
+
return (node == null ? void 0 : node.ownerDocument) || document;
|
|
833
|
+
}
|
|
834
|
+
function isEventTargetWithin(event, node) {
|
|
835
|
+
if (node == null) {
|
|
901
836
|
return false;
|
|
902
837
|
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
906
|
-
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
907
|
-
return false;
|
|
838
|
+
if ('composedPath' in event) {
|
|
839
|
+
return event.composedPath().includes(node);
|
|
908
840
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
841
|
+
|
|
842
|
+
// TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't
|
|
843
|
+
const e = event;
|
|
844
|
+
return e.target != null && node.contains(e.target);
|
|
845
|
+
}
|
|
846
|
+
function getTarget(event) {
|
|
847
|
+
if ('composedPath' in event) {
|
|
848
|
+
return event.composedPath()[0];
|
|
915
849
|
}
|
|
916
|
-
|
|
917
|
-
//
|
|
918
|
-
|
|
919
|
-
|
|
850
|
+
|
|
851
|
+
// TS thinks `event` is of type never as it assumes all browsers support
|
|
852
|
+
// `composedPath()`, but browsers without shadow DOM don't.
|
|
853
|
+
return event.target;
|
|
854
|
+
}
|
|
855
|
+
const TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled])," + "[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
856
|
+
function isTypeableElement(element) {
|
|
857
|
+
return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
|
|
858
|
+
}
|
|
859
|
+
function stopEvent(event) {
|
|
860
|
+
event.preventDefault();
|
|
861
|
+
event.stopPropagation();
|
|
862
|
+
}
|
|
863
|
+
function isTypeableCombobox(element) {
|
|
864
|
+
if (!element) return false;
|
|
865
|
+
return element.getAttribute('role') === 'combobox' && isTypeableElement(element);
|
|
866
|
+
}
|
|
920
867
|
|
|
921
868
|
/**
|
|
922
|
-
*
|
|
923
|
-
* @
|
|
869
|
+
* Custom positioning reference element.
|
|
870
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
924
871
|
*/
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
item: item,
|
|
940
|
-
isScope: isScope,
|
|
941
|
-
content: elements
|
|
942
|
-
});
|
|
943
|
-
}
|
|
944
|
-
});
|
|
945
|
-
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
946
|
-
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
947
|
-
return acc;
|
|
948
|
-
}, []).concat(regularTabbables);
|
|
872
|
+
|
|
873
|
+
const min = Math.min;
|
|
874
|
+
const max = Math.max;
|
|
875
|
+
const round = Math.round;
|
|
876
|
+
const floor = Math.floor;
|
|
877
|
+
const createCoords = v => ({
|
|
878
|
+
x: v,
|
|
879
|
+
y: v
|
|
880
|
+
});
|
|
881
|
+
const oppositeSideMap = {
|
|
882
|
+
left: 'right',
|
|
883
|
+
right: 'left',
|
|
884
|
+
bottom: 'top',
|
|
885
|
+
top: 'bottom'
|
|
949
886
|
};
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
if (options.getShadowRoot) {
|
|
954
|
-
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
955
|
-
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
956
|
-
flatten: false,
|
|
957
|
-
getShadowRoot: options.getShadowRoot,
|
|
958
|
-
shadowRootFilter: isValidShadowRootTabbable
|
|
959
|
-
});
|
|
960
|
-
} else {
|
|
961
|
-
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
962
|
-
}
|
|
963
|
-
return sortByOrder(candidates);
|
|
887
|
+
const oppositeAlignmentMap = {
|
|
888
|
+
start: 'end',
|
|
889
|
+
end: 'start'
|
|
964
890
|
};
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
891
|
+
function clamp(start, value, end) {
|
|
892
|
+
return max(start, min(value, end));
|
|
893
|
+
}
|
|
894
|
+
function evaluate(value, param) {
|
|
895
|
+
return typeof value === 'function' ? value(param) : value;
|
|
896
|
+
}
|
|
897
|
+
function getSide(placement) {
|
|
898
|
+
return placement.split('-')[0];
|
|
899
|
+
}
|
|
900
|
+
function getAlignment(placement) {
|
|
901
|
+
return placement.split('-')[1];
|
|
902
|
+
}
|
|
903
|
+
function getOppositeAxis(axis) {
|
|
904
|
+
return axis === 'x' ? 'y' : 'x';
|
|
905
|
+
}
|
|
906
|
+
function getAxisLength(axis) {
|
|
907
|
+
return axis === 'y' ? 'height' : 'width';
|
|
908
|
+
}
|
|
909
|
+
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
910
|
+
function getSideAxis(placement) {
|
|
911
|
+
return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
|
|
912
|
+
}
|
|
913
|
+
function getAlignmentAxis(placement) {
|
|
914
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
915
|
+
}
|
|
916
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
917
|
+
if (rtl === void 0) {
|
|
918
|
+
rtl = false;
|
|
969
919
|
}
|
|
970
|
-
|
|
971
|
-
|
|
920
|
+
const alignment = getAlignment(placement);
|
|
921
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
922
|
+
const length = getAxisLength(alignmentAxis);
|
|
923
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
924
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
925
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
972
926
|
}
|
|
973
|
-
return
|
|
974
|
-
}
|
|
927
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
928
|
+
}
|
|
929
|
+
function getExpandedPlacements(placement) {
|
|
930
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
931
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
932
|
+
}
|
|
933
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
934
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
935
|
+
}
|
|
936
|
+
const lrPlacement = ['left', 'right'];
|
|
937
|
+
const rlPlacement = ['right', 'left'];
|
|
938
|
+
const tbPlacement = ['top', 'bottom'];
|
|
939
|
+
const btPlacement = ['bottom', 'top'];
|
|
940
|
+
function getSideList(side, isStart, rtl) {
|
|
941
|
+
switch (side) {
|
|
942
|
+
case 'top':
|
|
943
|
+
case 'bottom':
|
|
944
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
945
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
946
|
+
case 'left':
|
|
947
|
+
case 'right':
|
|
948
|
+
return isStart ? tbPlacement : btPlacement;
|
|
949
|
+
default:
|
|
950
|
+
return [];
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
954
|
+
const alignment = getAlignment(placement);
|
|
955
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
956
|
+
if (alignment) {
|
|
957
|
+
list = list.map(side => side + "-" + alignment);
|
|
958
|
+
if (flipAlignment) {
|
|
959
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return list;
|
|
963
|
+
}
|
|
964
|
+
function getOppositePlacement(placement) {
|
|
965
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
966
|
+
}
|
|
967
|
+
function expandPaddingObject(padding) {
|
|
968
|
+
return {
|
|
969
|
+
top: 0,
|
|
970
|
+
right: 0,
|
|
971
|
+
bottom: 0,
|
|
972
|
+
left: 0,
|
|
973
|
+
...padding
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
function getPaddingObject(padding) {
|
|
977
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
978
|
+
top: padding,
|
|
979
|
+
right: padding,
|
|
980
|
+
bottom: padding,
|
|
981
|
+
left: padding
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
function rectToClientRect(rect) {
|
|
985
|
+
const {
|
|
986
|
+
x,
|
|
987
|
+
y,
|
|
988
|
+
width,
|
|
989
|
+
height
|
|
990
|
+
} = rect;
|
|
991
|
+
return {
|
|
992
|
+
width,
|
|
993
|
+
height,
|
|
994
|
+
top: y,
|
|
995
|
+
left: x,
|
|
996
|
+
right: x + width,
|
|
997
|
+
bottom: y + height,
|
|
998
|
+
x,
|
|
999
|
+
y
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
975
1002
|
|
|
976
1003
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
977
1004
|
let {
|
|
@@ -1338,16 +1365,22 @@ const flip$2 = function (options) {
|
|
|
1338
1365
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1339
1366
|
const nextPlacement = placements[nextIndex];
|
|
1340
1367
|
if (nextPlacement) {
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1368
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1369
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1370
|
+
// We leave the current main axis only if every placement on that axis
|
|
1371
|
+
// overflows the main axis.
|
|
1372
|
+
overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
1373
|
+
// Try next placement and re-run the lifecycle.
|
|
1374
|
+
return {
|
|
1375
|
+
data: {
|
|
1376
|
+
index: nextIndex,
|
|
1377
|
+
overflows: overflowsData
|
|
1378
|
+
},
|
|
1379
|
+
reset: {
|
|
1380
|
+
placement: nextPlacement
|
|
1381
|
+
}
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1351
1384
|
}
|
|
1352
1385
|
|
|
1353
1386
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
@@ -1393,6 +1426,8 @@ const flip$2 = function (options) {
|
|
|
1393
1426
|
};
|
|
1394
1427
|
};
|
|
1395
1428
|
|
|
1429
|
+
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
1430
|
+
|
|
1396
1431
|
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
1397
1432
|
// Derivable.
|
|
1398
1433
|
|
|
@@ -1406,7 +1441,7 @@ async function convertValueToCoords(state, options) {
|
|
|
1406
1441
|
const side = getSide(placement);
|
|
1407
1442
|
const alignment = getAlignment(placement);
|
|
1408
1443
|
const isVertical = getSideAxis(placement) === 'y';
|
|
1409
|
-
const mainAxisMulti =
|
|
1444
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
1410
1445
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
1411
1446
|
const rawValue = evaluate(options, state);
|
|
1412
1447
|
|
|
@@ -1606,7 +1641,7 @@ const limitShift$2 = function (options) {
|
|
|
1606
1641
|
if (checkCrossAxis) {
|
|
1607
1642
|
var _middlewareData$offse, _middlewareData$offse2;
|
|
1608
1643
|
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
1609
|
-
const isOriginSide =
|
|
1644
|
+
const isOriginSide = originSides.has(getSide(placement));
|
|
1610
1645
|
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
1611
1646
|
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
1612
1647
|
if (crossAxisCoord < limitMin) {
|
|
@@ -1949,6 +1984,7 @@ function getViewportRect(element, strategy) {
|
|
|
1949
1984
|
};
|
|
1950
1985
|
}
|
|
1951
1986
|
|
|
1987
|
+
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
1952
1988
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1953
1989
|
function getInnerBoundingClientRect(element, strategy) {
|
|
1954
1990
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -2013,7 +2049,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
2013
2049
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
2014
2050
|
currentContainingBlockComputedStyle = null;
|
|
2015
2051
|
}
|
|
2016
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
2052
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
2017
2053
|
if (shouldDropCurrentNode) {
|
|
2018
2054
|
// Drop non-containing blocks.
|
|
2019
2055
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -2076,6 +2112,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
2076
2112
|
scrollTop: 0
|
|
2077
2113
|
};
|
|
2078
2114
|
const offsets = createCoords(0);
|
|
2115
|
+
|
|
2116
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
2117
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
2118
|
+
function setLeftRTLScrollbarOffset() {
|
|
2119
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
2120
|
+
}
|
|
2079
2121
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
2080
2122
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
2081
2123
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -2085,11 +2127,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
2085
2127
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
2086
2128
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
2087
2129
|
} else if (documentElement) {
|
|
2088
|
-
|
|
2089
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
2090
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
2130
|
+
setLeftRTLScrollbarOffset();
|
|
2091
2131
|
}
|
|
2092
2132
|
}
|
|
2133
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
2134
|
+
setLeftRTLScrollbarOffset();
|
|
2135
|
+
}
|
|
2093
2136
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
2094
2137
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
2095
2138
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -2266,7 +2309,7 @@ function observeMove(element, onMove) {
|
|
|
2266
2309
|
// Handle <iframe>s
|
|
2267
2310
|
root: root.ownerDocument
|
|
2268
2311
|
});
|
|
2269
|
-
} catch (
|
|
2312
|
+
} catch (_e) {
|
|
2270
2313
|
io = new IntersectionObserver(handleObserve, options);
|
|
2271
2314
|
}
|
|
2272
2315
|
io.observe(element);
|
|
@@ -2421,7 +2464,10 @@ const computePosition = (reference, floating, options) => {
|
|
|
2421
2464
|
});
|
|
2422
2465
|
};
|
|
2423
2466
|
|
|
2424
|
-
var
|
|
2467
|
+
var isClient = typeof document !== 'undefined';
|
|
2468
|
+
|
|
2469
|
+
var noop = function noop() {};
|
|
2470
|
+
var index$1 = isClient ? useLayoutEffect : noop;
|
|
2425
2471
|
|
|
2426
2472
|
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
|
|
2427
2473
|
// functions
|
|
@@ -6528,5 +6574,9 @@ function safePolygon(options) {
|
|
|
6528
6574
|
return fn;
|
|
6529
6575
|
}
|
|
6530
6576
|
|
|
6531
|
-
|
|
6532
|
-
|
|
6577
|
+
const DialogContext = createContext(null);
|
|
6578
|
+
|
|
6579
|
+
const DrawerContext = createContext(null);
|
|
6580
|
+
|
|
6581
|
+
export { autoUpdate as A, computePosition as B, safeShowPopover as C, DialogContext as D, safeHidePopover as E, FloatingTree as F, useDelayGroup as G, FloatingArrow as H, useDelayGroupContext as I, arrow as J, useFocus as K, DrawerContext as a, useListItem as b, useFloatingTree as c, useFloatingParentNodeId as d, useFloatingNodeId as e, useFloating as f, flip as g, shift as h, size as i, useHover as j, safePolygon as k, limitShift as l, useClick as m, useRole as n, offset as o, useDismiss as p, useListNavigation as q, useTypeahead as r, supportsPopover as s, tabbable as t, useMergeRefs as u, useInteractions as v, FloatingNode as w, FloatingList as x, FloatingPortal as y, FloatingFocusManager as z };
|
|
6582
|
+
//# sourceMappingURL=DrawerContext-DboTgTmo.js.map
|