@arc-ui/components 12.0.0-beta.13 → 12.0.0-beta.14.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/lib/Alert/Alert.cjs +47 -0
- package/lib/Alert/Alert.mjs +45 -0
- package/lib/Alert/styles.css +1 -0
- package/lib/Align/Align.cjs +28 -0
- package/lib/Align/Align.mjs +26 -0
- package/lib/Align/styles.css +1 -0
- package/lib/AppButton/AppButton.cjs +68 -0
- package/lib/AppButton/AppButton.mjs +66 -0
- package/lib/AppButton/styles.css +1 -0
- package/lib/Avatar/Avatar.cjs +17 -0
- package/lib/Avatar/Avatar.mjs +11 -0
- package/lib/Avatar/styles.css +1 -0
- package/lib/AvatarGroup/AvatarGroup.cjs +33 -0
- package/lib/AvatarGroup/AvatarGroup.mjs +31 -0
- package/lib/AvatarGroup/styles.css +1 -0
- package/lib/Badge/Badge.cjs +12 -0
- package/lib/Badge/Badge.mjs +6 -0
- package/lib/Badge/styles.css +1 -0
- package/lib/Banner/Banner.cjs +24 -0
- package/lib/Banner/Banner.mjs +22 -0
- package/lib/Box/Box.cjs +12 -0
- package/lib/Box/Box.mjs +6 -0
- package/lib/Box/styles.css +1 -0
- package/lib/BrandLogo/BrandLogo.cjs +14 -0
- package/lib/BrandLogo/BrandLogo.mjs +7 -0
- package/lib/BrandLogo/styles.css +1 -0
- package/lib/Breadcrumbs/Breadcrumbs.cjs +17 -0
- package/lib/Breadcrumbs/Breadcrumbs.mjs +11 -0
- package/lib/Breadcrumbs/styles.css +1 -0
- package/lib/Button/Button.cjs +15 -0
- package/lib/Button/Button.mjs +9 -0
- package/lib/Button/styles.css +1 -0
- package/lib/ButtonGroup/ButtonGroup.cjs +33 -0
- package/lib/ButtonGroup/ButtonGroup.mjs +31 -0
- package/lib/ButtonGroup/styles.css +1 -0
- package/lib/ButtonV2/ButtonV2.cjs +15 -0
- package/lib/ButtonV2/ButtonV2.mjs +9 -0
- package/lib/ButtonV2/styles.css +1 -0
- package/lib/Calendar/Calendar.cjs +21 -0
- package/lib/Calendar/Calendar.mjs +15 -0
- package/lib/Calendar/styles.css +1 -0
- package/lib/CardFooter/CardFooter.cjs +17 -0
- package/lib/CardFooter/CardFooter.mjs +11 -0
- package/lib/CardFooter/styles.css +1 -0
- package/lib/CardHeading/CardHeading.cjs +14 -0
- package/lib/CardHeading/CardHeading.mjs +8 -0
- package/lib/CardHeading/styles.css +1 -0
- package/lib/Carousel/Carousel.cjs +1902 -0
- package/lib/Carousel/Carousel.mjs +1900 -0
- package/lib/Carousel/styles.css +1 -0
- package/lib/Checkbox/Checkbox.cjs +18 -0
- package/lib/Checkbox/Checkbox.mjs +12 -0
- package/lib/Checkbox/styles.css +1 -0
- package/lib/Columns/Columns.cjs +12 -0
- package/lib/Columns/Columns.mjs +6 -0
- package/lib/Columns/styles.css +1 -0
- package/lib/ComboBox/ComboBox.cjs +27 -0
- package/lib/ComboBox/ComboBox.mjs +21 -0
- package/lib/ComboBox/styles.css +1 -0
- package/lib/ConditionalWrapper/ConditionalWrapper.cjs +8 -0
- package/lib/ConditionalWrapper/ConditionalWrapper.mjs +2 -0
- package/lib/ContentSwitcher/ContentSwitcher.cjs +22 -0
- package/lib/ContentSwitcher/ContentSwitcher.mjs +13 -0
- package/lib/ContentSwitcher/styles.css +1 -0
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +21 -0
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +15 -0
- package/lib/ContentSwitcherDropdown/styles.css +1 -0
- package/lib/DatePicker/DatePicker.cjs +39 -0
- package/lib/DatePicker/DatePicker.mjs +28 -0
- package/lib/DatePicker/styles.css +1 -0
- package/lib/Disclosure/Disclosure.cjs +34 -0
- package/lib/Disclosure/Disclosure.mjs +32 -0
- package/lib/Disclosure/styles.css +1 -0
- package/lib/DisclosureMini/DisclosureMini.cjs +15 -0
- package/lib/DisclosureMini/DisclosureMini.mjs +9 -0
- package/lib/DisclosureMini/styles.css +1 -0
- package/lib/Download/Download.cjs +16 -0
- package/lib/Download/Download.mjs +10 -0
- package/lib/Download/styles.css +1 -0
- package/lib/Drawer/Drawer.cjs +374 -0
- package/lib/Drawer/Drawer.mjs +354 -0
- package/lib/Drawer/styles.css +1 -0
- package/lib/Elevation/Elevation.cjs +21 -0
- package/lib/Elevation/Elevation.mjs +19 -0
- package/lib/Elevation/styles.css +1 -0
- package/lib/Filter/Filter.cjs +13 -0
- package/lib/Filter/Filter.mjs +7 -0
- package/lib/Filter/styles.css +1 -0
- package/lib/FormControl/FormControl.cjs +18 -0
- package/lib/FormControl/FormControl.mjs +11 -0
- package/lib/FormControl/styles.css +1 -0
- package/lib/Grid/Grid.cjs +12 -0
- package/lib/Grid/Grid.mjs +6 -0
- package/lib/Grid/styles.css +1 -0
- package/lib/Group/Group.cjs +12 -0
- package/lib/Group/Group.mjs +6 -0
- package/lib/Group/styles.css +1 -0
- package/lib/Heading/Heading.cjs +14 -0
- package/lib/Heading/Heading.mjs +7 -0
- package/lib/Heading/styles.css +1 -0
- package/lib/HeroBanner/HeroBanner.cjs +28 -0
- package/lib/HeroBanner/HeroBanner.mjs +26 -0
- package/lib/HeroBanner/styles.css +1 -0
- package/lib/HeroButton/HeroButton.cjs +15 -0
- package/lib/HeroButton/HeroButton.mjs +9 -0
- package/lib/HeroButton/styles.css +1 -0
- package/lib/Hidden/Hidden.cjs +18 -0
- package/lib/Hidden/Hidden.mjs +16 -0
- package/lib/Hidden/styles.css +1 -0
- package/lib/Icon/Icon.cjs +14 -0
- package/lib/Icon/Icon.mjs +7 -0
- package/lib/Icon/styles.css +1 -0
- package/lib/Image/Image.cjs +15 -0
- package/lib/Image/Image.mjs +6 -0
- package/lib/Image/styles.css +1 -0
- package/lib/ImpactCard/ImpactCard.cjs +39 -0
- package/lib/ImpactCard/ImpactCard.mjs +37 -0
- package/lib/ImpactCard/styles.css +1 -0
- package/lib/InformationCard/InformationCard.cjs +94 -0
- package/lib/InformationCard/InformationCard.mjs +92 -0
- package/lib/InformationCard/styles.css +1 -0
- package/lib/Link/Link.cjs +71 -0
- package/lib/Link/Link.mjs +69 -0
- package/lib/Link/styles.css +1 -0
- package/lib/Markup/Markup.cjs +22 -0
- package/lib/Markup/Markup.mjs +20 -0
- package/lib/Markup/styles.css +1 -0
- package/lib/MediaCard/MediaCard.cjs +26 -0
- package/lib/MediaCard/MediaCard.mjs +20 -0
- package/lib/MediaCard/styles.css +1 -0
- package/lib/Modal/Modal.cjs +73 -0
- package/lib/Modal/Modal.mjs +71 -0
- package/lib/Modal/styles.css +1 -0
- package/lib/Pagination/Pagination.cjs +77 -0
- package/lib/Pagination/Pagination.mjs +75 -0
- package/lib/Pagination/styles.css +1 -0
- package/lib/PaginationSimple/PaginationSimple.cjs +106 -0
- package/lib/PaginationSimple/PaginationSimple.mjs +104 -0
- package/lib/PaginationSimple/styles.css +1 -0
- package/lib/Popover/Popover.cjs +36 -0
- package/lib/Popover/Popover.mjs +34 -0
- package/lib/Popover/styles.css +1 -0
- package/lib/Poster/Poster.cjs +14 -0
- package/lib/Poster/Poster.mjs +8 -0
- package/lib/Poster/styles.css +1 -0
- package/lib/ProgressBar/ProgressBar.cjs +65 -0
- package/lib/ProgressBar/ProgressBar.mjs +63 -0
- package/lib/ProgressBar/styles.css +1 -0
- package/lib/ProgressStepper/ProgressStepper.cjs +17 -0
- package/lib/ProgressStepper/ProgressStepper.mjs +10 -0
- package/lib/ProgressStepper/styles.css +1 -0
- package/lib/RadioCardGroup/RadioCardGroup.cjs +20 -0
- package/lib/RadioCardGroup/RadioCardGroup.mjs +14 -0
- package/lib/RadioCardGroup/styles.css +1 -0
- package/lib/RadioGroup/RadioGroup.cjs +19 -0
- package/lib/RadioGroup/RadioGroup.mjs +12 -0
- package/lib/RadioGroup/styles.css +1 -0
- package/lib/Rule/Rule.cjs +24 -0
- package/lib/Rule/Rule.mjs +22 -0
- package/lib/Rule/styles.css +1 -0
- package/lib/ScrollToTop/ScrollToTop.cjs +62 -0
- package/lib/ScrollToTop/ScrollToTop.mjs +60 -0
- package/lib/ScrollToTop/styles.css +1 -0
- package/lib/Section/Section.cjs +10 -0
- package/lib/Section/Section.mjs +4 -0
- package/lib/Section/styles.css +1 -0
- package/lib/Select/Select.cjs +82 -0
- package/lib/Select/Select.mjs +80 -0
- package/lib/Select/styles.css +1 -0
- package/lib/SiteFooter/SiteFooter.cjs +21 -0
- package/lib/SiteFooter/SiteFooter.mjs +13 -0
- package/lib/SiteFooter/styles.css +1 -0
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +24 -0
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +18 -0
- package/lib/SiteHeaderV2/styles.css +1 -0
- package/lib/Skeleton/Skeleton.cjs +20 -0
- package/lib/Skeleton/Skeleton.mjs +18 -0
- package/lib/Skeleton/styles.css +1 -0
- package/lib/SkipLink/SkipLink.cjs +9 -0
- package/lib/SkipLink/SkipLink.mjs +3 -0
- package/lib/SkipLink/styles.css +1 -0
- package/lib/Spinner/Spinner.cjs +10 -0
- package/lib/Spinner/Spinner.mjs +4 -0
- package/lib/Spinner/styles.css +1 -0
- package/lib/Surface/Surface.cjs +14 -0
- package/lib/Surface/Surface.mjs +5 -0
- package/lib/Surface/styles.css +1 -0
- package/lib/Switch/Switch.cjs +232 -0
- package/lib/Switch/Switch.mjs +230 -0
- package/lib/Switch/styles.css +1 -0
- package/lib/TabbedBanner/TabbedBanner.cjs +66 -0
- package/lib/TabbedBanner/TabbedBanner.mjs +64 -0
- package/lib/TabbedBanner/styles.css +1 -0
- package/lib/Tabs/Tabs.cjs +19 -0
- package/lib/Tabs/Tabs.mjs +12 -0
- package/lib/Tabs/styles.css +1 -0
- package/lib/Tag/Tag.cjs +80 -0
- package/lib/Tag/Tag.mjs +78 -0
- package/lib/Tag/styles.css +1 -0
- package/lib/TemplateBanner/TemplateBanner.cjs +21 -0
- package/lib/TemplateBanner/TemplateBanner.mjs +15 -0
- package/lib/TemplateBanner/styles.css +1 -0
- package/lib/Text/Text.cjs +13 -0
- package/lib/Text/Text.mjs +7 -0
- package/lib/Text/styles.css +1 -0
- package/lib/TextArea/TextArea.cjs +121 -0
- package/lib/TextArea/TextArea.mjs +119 -0
- package/lib/TextArea/styles.css +1 -0
- package/lib/TextInput/TextInput.cjs +19 -0
- package/lib/TextInput/TextInput.mjs +13 -0
- package/lib/TextInput/styles.css +1 -0
- package/lib/Theme/Theme.cjs +75 -0
- package/lib/Theme/Theme.mjs +72 -0
- package/lib/Theme/styles.css +1 -0
- package/lib/ThemeIcon/ThemeIcon.cjs +13 -0
- package/lib/ThemeIcon/ThemeIcon.mjs +7 -0
- package/lib/ThemeIcon/styles.css +1 -0
- package/lib/Toast/Toast.cjs +17 -0
- package/lib/Toast/Toast.mjs +11 -0
- package/lib/Toast/styles.css +1 -0
- package/lib/Tooltip/Tooltip.cjs +554 -0
- package/lib/Tooltip/Tooltip.mjs +534 -0
- package/lib/Tooltip/styles.css +1 -0
- package/lib/Truncate/Truncate.cjs +12 -0
- package/lib/Truncate/Truncate.mjs +10 -0
- package/lib/Truncate/styles.css +1 -0
- package/lib/TypographyCard/TypographyCard.cjs +36 -0
- package/lib/TypographyCard/TypographyCard.mjs +34 -0
- package/lib/TypographyCard/styles.css +1 -0
- package/lib/UniversalHeader/UniversalHeader.cjs +12 -0
- package/lib/UniversalHeader/UniversalHeader.mjs +6 -0
- package/lib/UniversalHeader/styles.css +1 -0
- package/lib/VerticalSpace/VerticalSpace.cjs +10 -0
- package/lib/VerticalSpace/VerticalSpace.mjs +4 -0
- package/lib/VerticalSpace/styles.css +1 -0
- package/lib/VideoPlayer/VideoPlayer.cjs +3203 -0
- package/lib/VideoPlayer/VideoPlayer.mjs +3201 -0
- package/lib/VideoPlayer/styles.css +1 -0
- package/lib/Visible/Visible.cjs +18 -0
- package/lib/Visible/Visible.mjs +16 -0
- package/lib/Visible/styles.css +1 -0
- package/lib/VisuallyHidden/VisuallyHidden.cjs +9 -0
- package/lib/VisuallyHidden/VisuallyHidden.mjs +3 -0
- package/lib/VisuallyHidden/styles.css +1 -0
- package/lib/_shared/cjs/Avatar-CO_KcWAu.cjs +44 -0
- package/lib/_shared/cjs/Badge-CQVEPH9v.cjs +14 -0
- package/lib/_shared/cjs/Box-COPXU1Jf.cjs +25 -0
- package/lib/_shared/cjs/BrandLogo-D5wlIFmm.cjs +29 -0
- package/lib/_shared/cjs/Breadcrumbs-Ct2tJs5-.cjs +101 -0
- package/lib/_shared/cjs/Button-b36K7-Cf.cjs +50 -0
- package/lib/_shared/cjs/ButtonV2-DitTW91Z.cjs +49 -0
- package/lib/_shared/cjs/Calendar-BC-wjsFG.cjs +1924 -0
- package/lib/_shared/cjs/CardFooter-BA8K3lsL.cjs +75 -0
- package/lib/_shared/cjs/CardHeading-DJHqAMXm.cjs +12 -0
- package/lib/_shared/cjs/Checkbox-D2UQsmiB.cjs +88 -0
- package/lib/_shared/cjs/Columns-vV_2g6iR.cjs +47 -0
- package/lib/_shared/cjs/Combination-C5xlVcaJ.cjs +1294 -0
- package/lib/_shared/cjs/ComboBox-BLV3qdpH.cjs +290 -0
- package/lib/_shared/cjs/ContentSwitcher-DN5eEyc3.cjs +108 -0
- package/lib/_shared/cjs/ContentSwitcherDropdown-3N9Hv-WU.cjs +71 -0
- package/lib/_shared/cjs/DatePicker-CmRbyMHi.cjs +316 -0
- package/lib/_shared/cjs/DisclosureMini-CtvDxVaG.cjs +37 -0
- package/lib/_shared/cjs/Download-CrIytI74.cjs +39 -0
- package/lib/_shared/cjs/Filter-qdfbndHd.cjs +120 -0
- package/lib/_shared/cjs/FormControl-D3-JbAVb.cjs +108 -0
- package/lib/_shared/cjs/Grid-D9hh5dMx.cjs +44 -0
- package/lib/_shared/cjs/Group-CXH1eTrP.cjs +38 -0
- package/lib/_shared/cjs/Heading-ByiXEHGj.cjs +38 -0
- package/lib/_shared/cjs/HeroButton-D0w6E67b.cjs +123 -0
- package/lib/_shared/cjs/Icon-DdqFr6bT.cjs +52 -0
- package/lib/_shared/cjs/Image-Bk-IOgez.cjs +56 -0
- package/lib/_shared/cjs/MediaCard-DEbY0pn4.cjs +61 -0
- package/lib/_shared/cjs/Poster-DD5EQ-X1.cjs +42 -0
- package/lib/_shared/cjs/Preview-BYuMaIh7.cjs +175 -0
- package/lib/_shared/cjs/ProgressStepper-SGsD7ZHy.cjs +93 -0
- package/lib/_shared/cjs/RadioCardGroup-BqDsRkMM.cjs +81 -0
- package/lib/_shared/cjs/RadioGroup-CTam1JqK.cjs +81 -0
- package/lib/_shared/cjs/Section-wUVdzmGA.cjs +21 -0
- package/lib/_shared/cjs/SiteFooter-KApsSEZz.cjs +68 -0
- package/lib/_shared/cjs/SiteHeaderV2-CYLoQkgz.cjs +645 -0
- package/lib/_shared/cjs/SkipLink-mJJv4-9E.cjs +18 -0
- package/lib/_shared/cjs/Spinner-bbrOwxv2.cjs +16 -0
- package/lib/_shared/cjs/Surface-BFx1yNsq.cjs +55 -0
- package/lib/_shared/cjs/Tabs-CsTC__0B.cjs +88 -0
- package/lib/_shared/cjs/TemplateBanner-DvwXqJMm.cjs +65 -0
- package/lib/_shared/cjs/Text-Cr5nmYmx.cjs +29 -0
- package/lib/_shared/cjs/TextInput-DT4hi02U.cjs +107 -0
- package/lib/_shared/cjs/ThemeIcon-BoxbjTaQ.cjs +23 -0
- package/lib/_shared/cjs/Toast-DLjxph76.cjs +995 -0
- package/lib/_shared/cjs/UniversalHeader-DUo1yR-g.cjs +29 -0
- package/lib/_shared/cjs/VerticalSpace-BJvST6WP.cjs +25 -0
- package/lib/_shared/cjs/VisuallyHidden-B4XCvPYP.cjs +14 -0
- package/lib/_shared/cjs/capitalise-first-letter-CdhexpSx.cjs +8 -0
- package/lib/_shared/cjs/debounce-BeIT3oyF.cjs +659 -0
- package/lib/_shared/cjs/filter-attrs-eK6E_34o.cjs +72 -0
- package/lib/_shared/cjs/index-B11wQrRa.cjs +2208 -0
- package/lib/_shared/cjs/index-BCsybVMl.cjs +1175 -0
- package/lib/_shared/cjs/index-BCu-VH8y.cjs +416 -0
- package/lib/_shared/cjs/index-BoR_yLsK.cjs +858 -0
- package/lib/_shared/cjs/index-CztwwwKE.cjs +375 -0
- package/lib/_shared/cjs/index-DCBkpeuX.cjs +457 -0
- package/lib/_shared/cjs/index-DM20WK5o.cjs +194 -0
- package/lib/_shared/cjs/index-DR8Rkav9.cjs +130 -0
- package/lib/_shared/cjs/index-DXNM3D1d.cjs +196 -0
- package/lib/_shared/cjs/index-DmvtEa22.cjs +219 -0
- package/lib/_shared/cjs/index-dEuvxpL3.cjs +1556 -0
- package/lib/_shared/cjs/index.es-gP1lKcqE.cjs +19 -0
- package/lib/_shared/cjs/suffix-modifier-DLUGR-yG.cjs +10 -0
- package/lib/_shared/esm/Avatar-RQ3Bn9NC.mjs +42 -0
- package/lib/_shared/esm/Badge-BZ7E0zcQ.mjs +12 -0
- package/lib/_shared/esm/Box-BYm_GTct.mjs +23 -0
- package/lib/_shared/esm/BrandLogo-_2Z_8I2Y.mjs +26 -0
- package/lib/_shared/esm/Breadcrumbs-Dvhyjy1c.mjs +99 -0
- package/lib/_shared/esm/Button-DtmI3xYm.mjs +48 -0
- package/lib/_shared/esm/ButtonV2-yixMtjeC.mjs +47 -0
- package/lib/_shared/esm/Calendar-BM7KALf9.mjs +1919 -0
- package/lib/_shared/esm/CardFooter-B1zkMZd9.mjs +73 -0
- package/lib/_shared/esm/CardHeading-C7ZPtnmj.mjs +10 -0
- package/lib/_shared/esm/Checkbox-NxnK40uZ.mjs +86 -0
- package/lib/_shared/esm/Columns-CxNZc7lV.mjs +45 -0
- package/lib/_shared/esm/Combination-BWqjRkSE.mjs +1267 -0
- package/lib/_shared/esm/ComboBox-Cww79__R.mjs +288 -0
- package/lib/_shared/esm/ContentSwitcher-CWxxoWTA.mjs +103 -0
- package/lib/_shared/esm/ContentSwitcherDropdown-CSsewSNR.mjs +69 -0
- package/lib/_shared/esm/DatePicker-DBX6wi3O.mjs +309 -0
- package/lib/_shared/esm/DisclosureMini-B9LzsQC2.mjs +35 -0
- package/lib/_shared/esm/Download-DFz_1HCG.mjs +37 -0
- package/lib/_shared/esm/Filter-C6tm6z36.mjs +118 -0
- package/lib/_shared/esm/FormControl-B9fp1ilz.mjs +104 -0
- package/lib/_shared/esm/Grid-YLHV9FOw.mjs +42 -0
- package/lib/_shared/esm/Group-IeAmNyQM.mjs +36 -0
- package/lib/_shared/esm/Heading-CtGuamJw.mjs +35 -0
- package/lib/_shared/esm/HeroButton-B1bJcYq3.mjs +121 -0
- package/lib/_shared/esm/Icon-B626JGP1.mjs +49 -0
- package/lib/_shared/esm/Image-Bx91_r2O.mjs +51 -0
- package/lib/_shared/esm/MediaCard-OZMQZjSh.mjs +59 -0
- package/lib/_shared/esm/Poster-B49pPgP_.mjs +40 -0
- package/lib/_shared/esm/Preview-AHYIJh9S.mjs +173 -0
- package/lib/_shared/esm/ProgressStepper-yMm9a5q7.mjs +90 -0
- package/lib/_shared/esm/RadioCardGroup-D2UZsecc.mjs +79 -0
- package/lib/_shared/esm/RadioGroup-Dt2GI6Ps.mjs +78 -0
- package/lib/_shared/esm/Section-DDygQ5Az.mjs +19 -0
- package/lib/_shared/esm/SiteFooter-C6OLx0Jn.mjs +64 -0
- package/lib/_shared/esm/SiteHeaderV2-BpTiemru.mjs +643 -0
- package/lib/_shared/esm/SkipLink-By4ViYhR.mjs +16 -0
- package/lib/_shared/esm/Spinner-Cd7LiPTy.mjs +14 -0
- package/lib/_shared/esm/Surface-Colbp3Zx.mjs +50 -0
- package/lib/_shared/esm/Tabs-DTxciSmI.mjs +85 -0
- package/lib/_shared/esm/TemplateBanner-mMKf6sDd.mjs +63 -0
- package/lib/_shared/esm/Text-CBlnm5CT.mjs +27 -0
- package/lib/_shared/esm/TextInput-Vp_cBbpQ.mjs +104 -0
- package/lib/_shared/esm/ThemeIcon-CN_Ed5b1.mjs +21 -0
- package/lib/_shared/esm/Toast-DjWsXi6n.mjs +993 -0
- package/lib/_shared/esm/UniversalHeader-4Qm-HxD7.mjs +27 -0
- package/lib/_shared/esm/VerticalSpace-Duhm0zXP.mjs +23 -0
- package/lib/_shared/esm/VisuallyHidden-DqAgoqJo.mjs +12 -0
- package/lib/_shared/esm/capitalise-first-letter-Cubg2CS1.mjs +6 -0
- package/lib/_shared/esm/debounce-mCD9-ufA.mjs +657 -0
- package/lib/_shared/esm/filter-attrs-B6CM-NUr.mjs +68 -0
- package/lib/_shared/esm/index-6HtUz28p.mjs +216 -0
- package/lib/_shared/esm/index-BYYnPaYO.mjs +431 -0
- package/lib/_shared/esm/index-CVbKsmi-.mjs +393 -0
- package/lib/_shared/esm/index-DAKCDHmP.mjs +171 -0
- package/lib/_shared/esm/index-DBBWLR4b.mjs +825 -0
- package/lib/_shared/esm/index-DKUZMeu5.mjs +169 -0
- package/lib/_shared/esm/index-DTF1_dbG.mjs +2178 -0
- package/lib/_shared/esm/index-DXHprNQ6.mjs +364 -0
- package/lib/_shared/esm/index-Spae4j7j.mjs +128 -0
- package/lib/_shared/esm/index-sjWSIoCo.mjs +1150 -0
- package/lib/_shared/esm/index-uZWnqtCw.mjs +1524 -0
- package/lib/_shared/esm/index.es-C7HkLzRN.mjs +12 -0
- package/lib/_shared/esm/suffix-modifier-B_pO0UkF.mjs +8 -0
- package/lib/index.cjs +25374 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.cts +4040 -0
- package/lib/index.d.mts +4040 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +25251 -0
- package/lib/index.mjs.map +1 -0
- package/lib/styles.css +15 -0
- package/lib/use-media-query/use-media-query.cjs +8 -0
- package/lib/use-media-query/use-media-query.mjs +2 -0
- package/package.json +87 -82
- package/dist/Alert/Alert.cjs.js +0 -45
- package/dist/Alert/Alert.esm.js +0 -43
- package/dist/Alert/package.json +0 -7
- package/dist/Alert/styles.css +0 -1
- package/dist/Align/Align.cjs.js +0 -26
- package/dist/Align/Align.esm.js +0 -24
- package/dist/Align/package.json +0 -7
- package/dist/Align/styles.css +0 -1
- package/dist/AppButton/AppButton.cjs.js +0 -68
- package/dist/AppButton/AppButton.esm.js +0 -66
- package/dist/AppButton/package.json +0 -7
- package/dist/AppButton/styles.css +0 -1
- package/dist/Avatar/Avatar.cjs.js +0 -15
- package/dist/Avatar/Avatar.esm.js +0 -9
- package/dist/Avatar/package.json +0 -7
- package/dist/Avatar/styles.css +0 -1
- package/dist/AvatarGroup/AvatarGroup.cjs.js +0 -31
- package/dist/AvatarGroup/AvatarGroup.esm.js +0 -29
- package/dist/AvatarGroup/package.json +0 -7
- package/dist/AvatarGroup/styles.css +0 -1
- package/dist/Badge/Badge.cjs.js +0 -10
- package/dist/Badge/Badge.esm.js +0 -4
- package/dist/Badge/package.json +0 -7
- package/dist/Badge/styles.css +0 -1
- package/dist/Banner/Banner.cjs.js +0 -22
- package/dist/Banner/Banner.esm.js +0 -20
- package/dist/Banner/package.json +0 -7
- package/dist/Box/Box.cjs.js +0 -11
- package/dist/Box/Box.esm.js +0 -5
- package/dist/Box/package.json +0 -7
- package/dist/Box/styles.css +0 -1
- package/dist/BrandLogo/BrandLogo.cjs.js +0 -11
- package/dist/BrandLogo/BrandLogo.esm.js +0 -5
- package/dist/BrandLogo/package.json +0 -7
- package/dist/BrandLogo/styles.css +0 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +0 -15
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +0 -9
- package/dist/Breadcrumbs/package.json +0 -7
- package/dist/Breadcrumbs/styles.css +0 -1
- package/dist/Button/Button.cjs.js +0 -13
- package/dist/Button/Button.esm.js +0 -7
- package/dist/Button/package.json +0 -7
- package/dist/Button/styles.css +0 -1
- package/dist/ButtonGroup/ButtonGroup.cjs.js +0 -31
- package/dist/ButtonGroup/ButtonGroup.esm.js +0 -29
- package/dist/ButtonGroup/package.json +0 -7
- package/dist/ButtonGroup/styles.css +0 -1
- package/dist/ButtonV2/ButtonV2.cjs.js +0 -13
- package/dist/ButtonV2/ButtonV2.esm.js +0 -7
- package/dist/ButtonV2/package.json +0 -7
- package/dist/ButtonV2/styles.css +0 -1
- package/dist/Calendar/Calendar.cjs.js +0 -19
- package/dist/Calendar/Calendar.esm.js +0 -13
- package/dist/Calendar/package.json +0 -7
- package/dist/Calendar/styles.css +0 -1
- package/dist/CardFooter/CardFooter.cjs.js +0 -15
- package/dist/CardFooter/CardFooter.esm.js +0 -9
- package/dist/CardFooter/package.json +0 -7
- package/dist/CardFooter/styles.css +0 -1
- package/dist/CardHeading/CardHeading.cjs.js +0 -12
- package/dist/CardHeading/CardHeading.esm.js +0 -6
- package/dist/CardHeading/package.json +0 -7
- package/dist/CardHeading/styles.css +0 -1
- package/dist/Carousel/Carousel.cjs.js +0 -1909
- package/dist/Carousel/Carousel.esm.js +0 -1907
- package/dist/Carousel/package.json +0 -7
- package/dist/Carousel/styles.css +0 -1
- package/dist/Checkbox/Checkbox.cjs.js +0 -16
- package/dist/Checkbox/Checkbox.esm.js +0 -10
- package/dist/Checkbox/package.json +0 -7
- package/dist/Checkbox/styles.css +0 -1
- package/dist/Columns/Columns.cjs.js +0 -10
- package/dist/Columns/Columns.esm.js +0 -4
- package/dist/Columns/package.json +0 -7
- package/dist/Columns/styles.css +0 -1
- package/dist/ComboBox/ComboBox.cjs.js +0 -27
- package/dist/ComboBox/ComboBox.esm.js +0 -21
- package/dist/ComboBox/package.json +0 -7
- package/dist/ComboBox/styles.css +0 -1
- package/dist/ConditionalWrapper/ConditionalWrapper.cjs.js +0 -8
- package/dist/ConditionalWrapper/ConditionalWrapper.esm.js +0 -2
- package/dist/ConditionalWrapper/package.json +0 -7
- package/dist/ContentSwitcher/ContentSwitcher.cjs.js +0 -18
- package/dist/ContentSwitcher/ContentSwitcher.esm.js +0 -12
- package/dist/ContentSwitcher/package.json +0 -7
- package/dist/ContentSwitcher/styles.css +0 -1
- package/dist/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs.js +0 -23
- package/dist/ContentSwitcherDropdown/ContentSwitcherDropdown.esm.js +0 -17
- package/dist/ContentSwitcherDropdown/package.json +0 -7
- package/dist/ContentSwitcherDropdown/styles.css +0 -1
- package/dist/DatePicker/DatePicker.cjs.js +0 -39
- package/dist/DatePicker/DatePicker.esm.js +0 -28
- package/dist/DatePicker/package.json +0 -7
- package/dist/DatePicker/styles.css +0 -1
- package/dist/Disclosure/Disclosure.cjs.js +0 -32
- package/dist/Disclosure/Disclosure.esm.js +0 -30
- package/dist/Disclosure/package.json +0 -7
- package/dist/Disclosure/styles.css +0 -1
- package/dist/DisclosureMini/DisclosureMini.cjs.js +0 -13
- package/dist/DisclosureMini/DisclosureMini.esm.js +0 -7
- package/dist/DisclosureMini/package.json +0 -7
- package/dist/DisclosureMini/styles.css +0 -1
- package/dist/Download/Download.cjs.js +0 -14
- package/dist/Download/Download.esm.js +0 -8
- package/dist/Download/package.json +0 -7
- package/dist/Download/styles.css +0 -1
- package/dist/Drawer/Drawer.cjs.js +0 -374
- package/dist/Drawer/Drawer.esm.js +0 -354
- package/dist/Drawer/package.json +0 -7
- package/dist/Drawer/styles.css +0 -1
- package/dist/Elevation/Elevation.cjs.js +0 -21
- package/dist/Elevation/Elevation.esm.js +0 -19
- package/dist/Elevation/package.json +0 -7
- package/dist/Elevation/styles.css +0 -1
- package/dist/Filter/Filter.cjs.js +0 -12
- package/dist/Filter/Filter.esm.js +0 -6
- package/dist/Filter/package.json +0 -7
- package/dist/Filter/styles.css +0 -1
- package/dist/FormControl/FormControl.cjs.js +0 -16
- package/dist/FormControl/FormControl.esm.js +0 -9
- package/dist/FormControl/package.json +0 -7
- package/dist/FormControl/styles.css +0 -1
- package/dist/Grid/Grid.cjs.js +0 -10
- package/dist/Grid/Grid.esm.js +0 -4
- package/dist/Grid/package.json +0 -7
- package/dist/Grid/styles.css +0 -1
- package/dist/Group/Group.cjs.js +0 -11
- package/dist/Group/Group.esm.js +0 -5
- package/dist/Group/package.json +0 -7
- package/dist/Group/styles.css +0 -1
- package/dist/Heading/Heading.cjs.js +0 -11
- package/dist/Heading/Heading.esm.js +0 -5
- package/dist/Heading/package.json +0 -7
- package/dist/Heading/styles.css +0 -1
- package/dist/HeroBanner/HeroBanner.cjs.js +0 -26
- package/dist/HeroBanner/HeroBanner.esm.js +0 -24
- package/dist/HeroBanner/package.json +0 -7
- package/dist/HeroBanner/styles.css +0 -1
- package/dist/HeroButton/HeroButton.cjs.js +0 -13
- package/dist/HeroButton/HeroButton.esm.js +0 -7
- package/dist/HeroButton/package.json +0 -7
- package/dist/HeroButton/styles.css +0 -1
- package/dist/Hidden/Hidden.cjs.js +0 -18
- package/dist/Hidden/Hidden.esm.js +0 -16
- package/dist/Hidden/package.json +0 -7
- package/dist/Hidden/styles.css +0 -1
- package/dist/Icon/Icon.cjs.js +0 -11
- package/dist/Icon/Icon.esm.js +0 -5
- package/dist/Icon/package.json +0 -7
- package/dist/Icon/styles.css +0 -1
- package/dist/Image/Image.cjs.js +0 -11
- package/dist/Image/Image.esm.js +0 -4
- package/dist/Image/package.json +0 -7
- package/dist/Image/styles.css +0 -1
- package/dist/ImpactCard/ImpactCard.cjs.js +0 -37
- package/dist/ImpactCard/ImpactCard.esm.js +0 -35
- package/dist/ImpactCard/package.json +0 -7
- package/dist/ImpactCard/styles.css +0 -1
- package/dist/InformationCard/InformationCard.cjs.js +0 -54
- package/dist/InformationCard/InformationCard.esm.js +0 -52
- package/dist/InformationCard/package.json +0 -7
- package/dist/InformationCard/styles.css +0 -1
- package/dist/Link/Link.cjs.js +0 -69
- package/dist/Link/Link.esm.js +0 -67
- package/dist/Link/package.json +0 -7
- package/dist/Link/styles.css +0 -1
- package/dist/Markup/Markup.cjs.js +0 -21
- package/dist/Markup/Markup.esm.js +0 -19
- package/dist/Markup/package.json +0 -7
- package/dist/Markup/styles.css +0 -1
- package/dist/MediaCard/MediaCard.cjs.js +0 -24
- package/dist/MediaCard/MediaCard.esm.js +0 -18
- package/dist/MediaCard/package.json +0 -7
- package/dist/MediaCard/styles.css +0 -1
- package/dist/Modal/Modal.cjs.js +0 -73
- package/dist/Modal/Modal.esm.js +0 -71
- package/dist/Modal/package.json +0 -7
- package/dist/Modal/styles.css +0 -1
- package/dist/Pagination/Pagination.cjs.js +0 -75
- package/dist/Pagination/Pagination.esm.js +0 -73
- package/dist/Pagination/package.json +0 -7
- package/dist/Pagination/styles.css +0 -1
- package/dist/PaginationSimple/PaginationSimple.cjs.js +0 -104
- package/dist/PaginationSimple/PaginationSimple.esm.js +0 -102
- package/dist/PaginationSimple/package.json +0 -7
- package/dist/PaginationSimple/styles.css +0 -1
- package/dist/Popover/Popover.cjs.js +0 -36
- package/dist/Popover/Popover.esm.js +0 -34
- package/dist/Popover/package.json +0 -7
- package/dist/Popover/styles.css +0 -1
- package/dist/Poster/Poster.cjs.js +0 -12
- package/dist/Poster/Poster.esm.js +0 -6
- package/dist/Poster/package.json +0 -7
- package/dist/Poster/styles.css +0 -1
- package/dist/ProgressBar/ProgressBar.cjs.js +0 -63
- package/dist/ProgressBar/ProgressBar.esm.js +0 -61
- package/dist/ProgressBar/package.json +0 -7
- package/dist/ProgressBar/styles.css +0 -1
- package/dist/ProgressStepper/ProgressStepper.cjs.js +0 -13
- package/dist/ProgressStepper/ProgressStepper.esm.js +0 -7
- package/dist/ProgressStepper/package.json +0 -7
- package/dist/ProgressStepper/styles.css +0 -1
- package/dist/RadioCardGroup/RadioCardGroup.cjs.js +0 -17
- package/dist/RadioCardGroup/RadioCardGroup.esm.js +0 -11
- package/dist/RadioCardGroup/package.json +0 -7
- package/dist/RadioCardGroup/styles.css +0 -1
- package/dist/RadioGroup/RadioGroup.cjs.js +0 -17
- package/dist/RadioGroup/RadioGroup.esm.js +0 -10
- package/dist/RadioGroup/package.json +0 -7
- package/dist/RadioGroup/styles.css +0 -1
- package/dist/Rule/Rule.cjs.js +0 -23
- package/dist/Rule/Rule.esm.js +0 -21
- package/dist/Rule/package.json +0 -7
- package/dist/Rule/styles.css +0 -1
- package/dist/ScrollToTop/ScrollToTop.cjs.js +0 -60
- package/dist/ScrollToTop/ScrollToTop.esm.js +0 -58
- package/dist/ScrollToTop/package.json +0 -7
- package/dist/ScrollToTop/styles.css +0 -1
- package/dist/Section/Section.cjs.js +0 -10
- package/dist/Section/Section.esm.js +0 -4
- package/dist/Section/package.json +0 -7
- package/dist/Section/styles.css +0 -1
- package/dist/Select/Select.cjs.js +0 -84
- package/dist/Select/Select.esm.js +0 -82
- package/dist/Select/package.json +0 -7
- package/dist/Select/styles.css +0 -1
- package/dist/SiteFooter/SiteFooter.cjs.js +0 -17
- package/dist/SiteFooter/SiteFooter.esm.js +0 -11
- package/dist/SiteFooter/package.json +0 -7
- package/dist/SiteFooter/styles.css +0 -1
- package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +0 -22
- package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +0 -16
- package/dist/SiteHeaderV2/package.json +0 -7
- package/dist/SiteHeaderV2/styles.css +0 -1
- package/dist/Skeleton/Skeleton.cjs.js +0 -20
- package/dist/Skeleton/Skeleton.esm.js +0 -18
- package/dist/Skeleton/package.json +0 -7
- package/dist/Skeleton/styles.css +0 -1
- package/dist/SkipLink/SkipLink.cjs.js +0 -9
- package/dist/SkipLink/SkipLink.esm.js +0 -3
- package/dist/SkipLink/package.json +0 -7
- package/dist/SkipLink/styles.css +0 -1
- package/dist/Spinner/Spinner.cjs.js +0 -10
- package/dist/Spinner/Spinner.esm.js +0 -4
- package/dist/Spinner/package.json +0 -7
- package/dist/Spinner/styles.css +0 -1
- package/dist/Surface/Surface.cjs.js +0 -13
- package/dist/Surface/Surface.esm.js +0 -4
- package/dist/Surface/package.json +0 -7
- package/dist/Surface/styles.css +0 -1
- package/dist/Switch/Switch.cjs.js +0 -162
- package/dist/Switch/Switch.esm.js +0 -160
- package/dist/Switch/package.json +0 -7
- package/dist/Switch/styles.css +0 -1
- package/dist/TabbedBanner/TabbedBanner.cjs.js +0 -66
- package/dist/TabbedBanner/TabbedBanner.esm.js +0 -64
- package/dist/TabbedBanner/package.json +0 -7
- package/dist/TabbedBanner/styles.css +0 -1
- package/dist/Tabs/Tabs.cjs.js +0 -18
- package/dist/Tabs/Tabs.esm.js +0 -12
- package/dist/Tabs/package.json +0 -7
- package/dist/Tabs/styles.css +0 -1
- package/dist/Tag/Tag.cjs.js +0 -78
- package/dist/Tag/Tag.esm.js +0 -76
- package/dist/Tag/package.json +0 -7
- package/dist/Tag/styles.css +0 -1
- package/dist/TemplateBanner/TemplateBanner.cjs.js +0 -19
- package/dist/TemplateBanner/TemplateBanner.esm.js +0 -13
- package/dist/TemplateBanner/package.json +0 -7
- package/dist/TemplateBanner/styles.css +0 -1
- package/dist/Text/Text.cjs.js +0 -11
- package/dist/Text/Text.esm.js +0 -5
- package/dist/Text/package.json +0 -7
- package/dist/Text/styles.css +0 -1
- package/dist/TextArea/TextArea.cjs.js +0 -124
- package/dist/TextArea/TextArea.esm.js +0 -122
- package/dist/TextArea/package.json +0 -7
- package/dist/TextArea/styles.css +0 -1
- package/dist/TextInput/TextInput.cjs.js +0 -17
- package/dist/TextInput/TextInput.esm.js +0 -11
- package/dist/TextInput/package.json +0 -7
- package/dist/TextInput/styles.css +0 -1
- package/dist/Theme/Theme.cjs.js +0 -25
- package/dist/Theme/Theme.esm.js +0 -22
- package/dist/Theme/package.json +0 -7
- package/dist/Theme/styles.css +0 -1
- package/dist/ThemeIcon/ThemeIcon.cjs.js +0 -11
- package/dist/ThemeIcon/ThemeIcon.esm.js +0 -5
- package/dist/ThemeIcon/package.json +0 -7
- package/dist/ThemeIcon/styles.css +0 -1
- package/dist/Toast/Toast.cjs.js +0 -17
- package/dist/Toast/Toast.esm.js +0 -11
- package/dist/Toast/package.json +0 -7
- package/dist/Toast/styles.css +0 -1
- package/dist/Tooltip/Tooltip.cjs.js +0 -553
- package/dist/Tooltip/Tooltip.esm.js +0 -533
- package/dist/Tooltip/package.json +0 -7
- package/dist/Tooltip/styles.css +0 -1
- package/dist/Truncate/Truncate.cjs.js +0 -12
- package/dist/Truncate/Truncate.esm.js +0 -10
- package/dist/Truncate/package.json +0 -7
- package/dist/Truncate/styles.css +0 -1
- package/dist/TypographyCard/TypographyCard.cjs.js +0 -34
- package/dist/TypographyCard/TypographyCard.esm.js +0 -32
- package/dist/TypographyCard/package.json +0 -7
- package/dist/TypographyCard/styles.css +0 -1
- package/dist/UniversalHeader/UniversalHeader.cjs.js +0 -11
- package/dist/UniversalHeader/UniversalHeader.esm.js +0 -5
- package/dist/UniversalHeader/package.json +0 -7
- package/dist/UniversalHeader/styles.css +0 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.js +0 -10
- package/dist/VerticalSpace/VerticalSpace.esm.js +0 -4
- package/dist/VerticalSpace/package.json +0 -7
- package/dist/VerticalSpace/styles.css +0 -1
- package/dist/VideoPlayer/VideoPlayer.cjs.js +0 -3201
- package/dist/VideoPlayer/VideoPlayer.esm.js +0 -3199
- package/dist/VideoPlayer/package.json +0 -7
- package/dist/VideoPlayer/styles.css +0 -1
- package/dist/Visible/Visible.cjs.js +0 -18
- package/dist/Visible/Visible.esm.js +0 -16
- package/dist/Visible/package.json +0 -7
- package/dist/Visible/styles.css +0 -1
- package/dist/VisuallyHidden/VisuallyHidden.cjs.js +0 -9
- package/dist/VisuallyHidden/VisuallyHidden.esm.js +0 -3
- package/dist/VisuallyHidden/package.json +0 -7
- package/dist/VisuallyHidden/styles.css +0 -1
- package/dist/_shared/cjs/Avatar-Caj5Cj5M.js +0 -44
- package/dist/_shared/cjs/Badge-CKKpzGxD.js +0 -13
- package/dist/_shared/cjs/Box-DHEgsHNm.js +0 -25
- package/dist/_shared/cjs/BrandLogo-IAXn8lnd.js +0 -26
- package/dist/_shared/cjs/Breadcrumbs-BwuRMZM-.js +0 -101
- package/dist/_shared/cjs/Button-DOYW7cIj.js +0 -49
- package/dist/_shared/cjs/ButtonV2-BhtTYaGh.js +0 -49
- package/dist/_shared/cjs/Calendar-HHjRQCvi.js +0 -1923
- package/dist/_shared/cjs/CardFooter-Bbn1wEJI.js +0 -75
- package/dist/_shared/cjs/CardHeading-BjSIrQC8.js +0 -12
- package/dist/_shared/cjs/Checkbox-D2j1GIQ6.js +0 -88
- package/dist/_shared/cjs/Columns-BFi_S894.js +0 -44
- package/dist/_shared/cjs/ComboBox-DUQckLrZ.js +0 -290
- package/dist/_shared/cjs/ContentSwitcher-ro4BnJjR.js +0 -17315
- package/dist/_shared/cjs/ContentSwitcherDropdown-COdUSVHm.js +0 -60
- package/dist/_shared/cjs/DatePicker-3lHRIkai.js +0 -316
- package/dist/_shared/cjs/DisclosureMini-Bln2KdOz.js +0 -37
- package/dist/_shared/cjs/Download-DEiQTPc3.js +0 -39
- package/dist/_shared/cjs/Filter-BheSbUnA.js +0 -120
- package/dist/_shared/cjs/FormControl-x7kC-Srg.js +0 -108
- package/dist/_shared/cjs/Grid-Bfnjhc5b.js +0 -41
- package/dist/_shared/cjs/Group-DZ8hdyp4.js +0 -36
- package/dist/_shared/cjs/Heading-lzfM5f17.js +0 -36
- package/dist/_shared/cjs/HeroButton-CNJkSeLs.js +0 -122
- package/dist/_shared/cjs/Icon-C5peYhWn.js +0 -43
- package/dist/_shared/cjs/Image-55IzIW6l.js +0 -51
- package/dist/_shared/cjs/MediaCard-DcApbyvL.js +0 -61
- package/dist/_shared/cjs/Poster-DbbbiYa_.js +0 -41
- package/dist/_shared/cjs/Preview-B-4AqOxZ.js +0 -175
- package/dist/_shared/cjs/ProgressStepper-CE6FGMTC.js +0 -91
- package/dist/_shared/cjs/RadioCardGroup-DWZrK-Cs.js +0 -80
- package/dist/_shared/cjs/RadioGroup-BoSuMksh.js +0 -81
- package/dist/_shared/cjs/Section-DXB0XocO.js +0 -19
- package/dist/_shared/cjs/SiteFooter-D5IeZC_c.js +0 -66
- package/dist/_shared/cjs/SiteHeaderV2-BtJmB-dG.js +0 -644
- package/dist/_shared/cjs/SkipLink-D3i06ZIl.js +0 -18
- package/dist/_shared/cjs/Spinner-DmTvG4x-.js +0 -16
- package/dist/_shared/cjs/Surface-BCplA5V_.js +0 -180
- package/dist/_shared/cjs/Tabs-BMWK-vMy.js +0 -86
- package/dist/_shared/cjs/TemplateBanner-BTbeT-Yz.js +0 -65
- package/dist/_shared/cjs/Text-DIA-MbS2.js +0 -28
- package/dist/_shared/cjs/TextInput-DyZc-njK.js +0 -107
- package/dist/_shared/cjs/ThemeIcon-CHgtRxWu.js +0 -22
- package/dist/_shared/cjs/Toast-DNC06aD5.js +0 -960
- package/dist/_shared/cjs/UniversalHeader-Cbxk9QRM.js +0 -25
- package/dist/_shared/cjs/VerticalSpace-B-ZFqw2Y.js +0 -25
- package/dist/_shared/cjs/VisuallyHidden-BItgxu3C.js +0 -14
- package/dist/_shared/cjs/component-BGCX8GK6.js +0 -96
- package/dist/_shared/cjs/component-DpycPOA_.js +0 -422
- package/dist/_shared/cjs/debounce-8awAB-Hj.js +0 -659
- package/dist/_shared/cjs/floating-ui.react-dom-CJlNwMgv.js +0 -1907
- package/dist/_shared/cjs/index-B349W-g3.js +0 -93
- package/dist/_shared/cjs/index-BWForWNw.js +0 -746
- package/dist/_shared/cjs/index-BqJfkZWj.js +0 -380
- package/dist/_shared/cjs/index-Bsexyvjp.js +0 -379
- package/dist/_shared/cjs/index-BtclGxUt.js +0 -999
- package/dist/_shared/cjs/index-CH4TSNdS.js +0 -753
- package/dist/_shared/cjs/index-CUkcChbR.js +0 -226
- package/dist/_shared/cjs/index-CalDQPRt.js +0 -330
- package/dist/_shared/cjs/index-D6hGsItk.js +0 -367
- package/dist/_shared/cjs/index-DYP3_Qh-.js +0 -14
- package/dist/_shared/cjs/index-DiFGFQH4.js +0 -44
- package/dist/_shared/cjs/index-Ds3p1an5.js +0 -131
- package/dist/_shared/cjs/index-Dvj8rZCZ.js +0 -46
- package/dist/_shared/cjs/index-Dx8AlCbY.js +0 -72
- package/dist/_shared/cjs/index-io8xALL_.js +0 -2264
- package/dist/_shared/cjs/index.es-y9hyGBEL.js +0 -13
- package/dist/_shared/esm/Avatar-Cnu84iB4.js +0 -42
- package/dist/_shared/esm/Badge-BCVel0Om.js +0 -11
- package/dist/_shared/esm/Box-DTTKhpiV.js +0 -23
- package/dist/_shared/esm/BrandLogo-DP-pw2qU.js +0 -24
- package/dist/_shared/esm/Breadcrumbs-CCK8JbEL.js +0 -99
- package/dist/_shared/esm/Button-i6svvyLV.js +0 -47
- package/dist/_shared/esm/ButtonV2-qvYPdE3y.js +0 -47
- package/dist/_shared/esm/Calendar-BheqKbaS.js +0 -1918
- package/dist/_shared/esm/CardFooter-Dor2jbTF.js +0 -73
- package/dist/_shared/esm/CardHeading-DnkJg4cS.js +0 -10
- package/dist/_shared/esm/Checkbox-BsVIoYs3.js +0 -86
- package/dist/_shared/esm/Columns-3lnyGVbo.js +0 -42
- package/dist/_shared/esm/ComboBox-BoNNJ010.js +0 -288
- package/dist/_shared/esm/ContentSwitcher-CsFy2wkg.js +0 -17313
- package/dist/_shared/esm/ContentSwitcherDropdown-Dsl0lVob.js +0 -58
- package/dist/_shared/esm/DatePicker-DxP3x_PU.js +0 -309
- package/dist/_shared/esm/DisclosureMini-C21SM9kp.js +0 -35
- package/dist/_shared/esm/Download-QSXeopnf.js +0 -37
- package/dist/_shared/esm/Filter-BWvcdo3D.js +0 -118
- package/dist/_shared/esm/FormControl-Dx4vj08j.js +0 -104
- package/dist/_shared/esm/Grid-3ulOWrk_.js +0 -39
- package/dist/_shared/esm/Group-CemLONoC.js +0 -34
- package/dist/_shared/esm/Heading-B4CveN1U.js +0 -34
- package/dist/_shared/esm/HeroButton-CCdiNf0U.js +0 -120
- package/dist/_shared/esm/Icon-PQa1SRbJ.js +0 -41
- package/dist/_shared/esm/Image-ByvKaYWN.js +0 -48
- package/dist/_shared/esm/MediaCard-BXs0Bn_k.js +0 -59
- package/dist/_shared/esm/Poster-BDAll4Is.js +0 -39
- package/dist/_shared/esm/Preview-C4XOmSrc.js +0 -173
- package/dist/_shared/esm/ProgressStepper-CzfbHcdz.js +0 -89
- package/dist/_shared/esm/RadioCardGroup-zNPknE5D.js +0 -78
- package/dist/_shared/esm/RadioGroup-DCQshSdc.js +0 -78
- package/dist/_shared/esm/Section-D_oywLIw.js +0 -17
- package/dist/_shared/esm/SiteFooter-DAJmYrdZ.js +0 -64
- package/dist/_shared/esm/SiteHeaderV2-X0qnDr53.js +0 -642
- package/dist/_shared/esm/SkipLink-U1oEgZ_e.js +0 -16
- package/dist/_shared/esm/Spinner-5EXh-1JS.js +0 -14
- package/dist/_shared/esm/Surface-DnIdJOp5.js +0 -174
- package/dist/_shared/esm/Tabs-CthwgnE8.js +0 -84
- package/dist/_shared/esm/TemplateBanner-C0WAd6x-.js +0 -63
- package/dist/_shared/esm/Text-pH7Fi5ml.js +0 -26
- package/dist/_shared/esm/TextInput-qy9_xgAX.js +0 -104
- package/dist/_shared/esm/ThemeIcon-a0WvZRNE.js +0 -20
- package/dist/_shared/esm/Toast-BW9P2Bsb.js +0 -958
- package/dist/_shared/esm/UniversalHeader-CKwbQWiu.js +0 -23
- package/dist/_shared/esm/VerticalSpace-CYle3p59.js +0 -23
- package/dist/_shared/esm/VisuallyHidden-DhtgCXQL.js +0 -12
- package/dist/_shared/esm/component-CyFG7PdP.js +0 -73
- package/dist/_shared/esm/component-SwsHiZS0.js +0 -398
- package/dist/_shared/esm/debounce-BpHLpQ2o.js +0 -657
- package/dist/_shared/esm/floating-ui.react-dom-RgnG-641.js +0 -1878
- package/dist/_shared/esm/index-2c7jWqIG.js +0 -25
- package/dist/_shared/esm/index-65dylwyZ.js +0 -720
- package/dist/_shared/esm/index-9kqlGfMG.js +0 -973
- package/dist/_shared/esm/index-Bnj2U8kS.js +0 -374
- package/dist/_shared/esm/index-C1FjNiZC.js +0 -296
- package/dist/_shared/esm/index-CXSorLUc.js +0 -41
- package/dist/_shared/esm/index-CXzJEJNs.js +0 -2233
- package/dist/_shared/esm/index-CbKHA_yL.js +0 -724
- package/dist/_shared/esm/index-Cf_Ki--9.js +0 -129
- package/dist/_shared/esm/index-CxovAi9d.js +0 -69
- package/dist/_shared/esm/index-DMMRfg3O.js +0 -359
- package/dist/_shared/esm/index-D_GX6ppB.js +0 -91
- package/dist/_shared/esm/index-UaaG1irA.js +0 -205
- package/dist/_shared/esm/index-_nBH8-GT.js +0 -12
- package/dist/_shared/esm/index-g5oDHuf6.js +0 -369
- package/dist/_shared/esm/index.es-DZ7a2pSw.js +0 -9
- package/dist/index.es.js +0 -42081
- package/dist/index.es.js.map +0 -1
- package/dist/index.js +0 -42178
- package/dist/index.js.map +0 -1
- package/dist/styles.css +0 -15
- package/dist/types/components/Alert/Alert.d.ts +0 -49
- package/dist/types/components/Alert/index.d.ts +0 -1
- package/dist/types/components/Align/Align.d.ts +0 -30
- package/dist/types/components/Align/index.d.ts +0 -1
- package/dist/types/components/AppButton/AppButton.d.ts +0 -9
- package/dist/types/components/AppButton/icons/AppStore.d.ts +0 -2
- package/dist/types/components/AppButton/icons/GooglePlay.d.ts +0 -2
- package/dist/types/components/AppButton/index.d.ts +0 -1
- package/dist/types/components/Avatar/Avatar.d.ts +0 -14
- package/dist/types/components/Avatar/components/AvatarContent/AvatarContent.d.ts +0 -9
- package/dist/types/components/Avatar/index.d.ts +0 -1
- package/dist/types/components/Avatar/types/avatar-icon-size.d.ts +0 -1
- package/dist/types/components/Avatar/types/avatar-image.d.ts +0 -2
- package/dist/types/components/Avatar/types/avatar-size.d.ts +0 -1
- package/dist/types/components/Avatar/types/avatar-text-size.d.ts +0 -2
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +0 -14
- package/dist/types/components/AvatarGroup/index.d.ts +0 -1
- package/dist/types/components/AvatarGroup/types/group-avatar.d.ts +0 -2
- package/dist/types/components/AvatarGroup/utils/get-avatars.d.ts +0 -2
- package/dist/types/components/Badge/Badge.d.ts +0 -21
- package/dist/types/components/Badge/index.d.ts +0 -1
- package/dist/types/components/Banner/Banner.d.ts +0 -4
- package/dist/types/components/Banner/index.d.ts +0 -1
- package/dist/types/components/Box/Box.d.ts +0 -40
- package/dist/types/components/Box/index.d.ts +0 -1
- package/dist/types/components/BrandLogo/BrandLogo.d.ts +0 -25
- package/dist/types/components/BrandLogo/index.d.ts +0 -1
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +0 -18
- package/dist/types/components/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.d.ts +0 -17
- package/dist/types/components/Breadcrumbs/BreadcrumbsLink/BreadcrumbsLink.d.ts +0 -29
- package/dist/types/components/Breadcrumbs/index.d.ts +0 -1
- package/dist/types/components/Button/Button.d.ts +0 -116
- package/dist/types/components/Button/index.d.ts +0 -1
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +0 -34
- package/dist/types/components/ButtonGroup/index.d.ts +0 -1
- package/dist/types/components/ButtonV2/ButtonV2.d.ts +0 -91
- package/dist/types/components/ButtonV2/index.d.ts +0 -1
- package/dist/types/components/Calendar/Calendar.d.ts +0 -50
- package/dist/types/components/Calendar/Calendar.provider.d.ts +0 -21
- package/dist/types/components/Calendar/components/CalendarDateSelect/CalendarDateSelect.d.ts +0 -15
- package/dist/types/components/Calendar/components/CalendarDateSelect/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarDayGrid/CalendarDayGrid.d.ts +0 -6
- package/dist/types/components/Calendar/components/CalendarDayGrid/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarDayNumber/CalendarDayNumber.d.ts +0 -8
- package/dist/types/components/Calendar/components/CalendarDayNumber/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarDoubleMonthView/CalendarDoubleMonthView.d.ts +0 -9
- package/dist/types/components/Calendar/components/CalendarDoubleMonthView/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarFooter/CalendarFooter.d.ts +0 -6
- package/dist/types/components/Calendar/components/CalendarFooter/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarMonthView/CalendarMonthView.d.ts +0 -9
- package/dist/types/components/Calendar/components/CalendarMonthView/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarMonthYearView/CalendarMonthYearView.d.ts +0 -11
- package/dist/types/components/Calendar/components/CalendarMonthYearView/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarNavButton/CalendarNavButton.d.ts +0 -10
- package/dist/types/components/Calendar/components/CalendarNavButton/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/CalendarWrapper/CalendarWrapper.d.ts +0 -5
- package/dist/types/components/Calendar/components/CalendarWrapper/index.d.ts +0 -1
- package/dist/types/components/Calendar/components/index.d.ts +0 -6
- package/dist/types/components/Calendar/constants/day-names.d.ts +0 -5
- package/dist/types/components/Calendar/constants/index.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/contains-date.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/contains-date.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/date-without-time.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/date-without-time.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-calendar-type.d.ts +0 -2
- package/dist/types/components/Calendar/helpers/get-calendar-type.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-dates-in-month.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-dates-in-month.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-double-month-display-range.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-double-month-display-range.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-focus-date.d.ts +0 -5
- package/dist/types/components/Calendar/helpers/get-focus-date.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-highlighted-range.d.ts +0 -6
- package/dist/types/components/Calendar/helpers/get-highlighted-range.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/get-keydown-date.d.ts +0 -6
- package/dist/types/components/Calendar/helpers/get-keydown-date.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/index.d.ts +0 -13
- package/dist/types/components/Calendar/helpers/is-day.d.ts +0 -2
- package/dist/types/components/Calendar/helpers/is-day.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/is-disabled-date.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/is-disabled-date.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/is-month-after-max-date.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/is-month-after-max-date.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/is-month-before-min-date.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/is-month-before-min-date.test.d.ts +0 -1
- package/dist/types/components/Calendar/helpers/process-selected-range.d.ts +0 -9
- package/dist/types/components/Calendar/helpers/process-selected-range.test.d.ts +0 -1
- package/dist/types/components/Calendar/index.d.ts +0 -2
- package/dist/types/components/Calendar/state/handlers/calendar-keydown-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/day-grid-leave-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/day-number-select-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/default-handler.d.ts +0 -2
- package/dist/types/components/Calendar/state/handlers/dropdown-change-month-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/dropdown-change-year-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/highlight-range-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/index.d.ts +0 -12
- package/dist/types/components/Calendar/state/handlers/range-select-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/show-next-double-month-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/show-next-month-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/show-previous-double-month-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/handlers/show-previous-month-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/index.d.ts +0 -2
- package/dist/types/components/Calendar/state/reducer.d.ts +0 -3
- package/dist/types/components/Calendar/state/reducer.test.d.ts +0 -1
- package/dist/types/components/Calendar/state/types/actions.d.ts +0 -81
- package/dist/types/components/Calendar/state/types/state-handler.d.ts +0 -3
- package/dist/types/components/Calendar/state/types/state.d.ts +0 -5
- package/dist/types/components/Calendar/types/calendar-type.d.ts +0 -1
- package/dist/types/components/Calendar/types/date-select-value.d.ts +0 -2
- package/dist/types/components/Calendar/types/index.d.ts +0 -6
- package/dist/types/components/Calendar/types/key-names.d.ts +0 -13
- package/dist/types/components/Calendar/types/range-selection.d.ts +0 -10
- package/dist/types/components/Calendar/types/selection-type.d.ts +0 -1
- package/dist/types/components/Calendar/types/week-days.d.ts +0 -18
- package/dist/types/components/CardFooter/CardFooter.d.ts +0 -11
- package/dist/types/components/CardFooter/index.d.ts +0 -1
- package/dist/types/components/CardHeading/CardHeading.d.ts +0 -19
- package/dist/types/components/CardHeading/index.d.ts +0 -1
- package/dist/types/components/Carousel/Carousel.d.ts +0 -34
- package/dist/types/components/Carousel/components/DotButton.d.ts +0 -10
- package/dist/types/components/Carousel/constants/breakpoints.d.ts +0 -5
- package/dist/types/components/Carousel/helpers/get-options.d.ts +0 -3
- package/dist/types/components/Carousel/helpers/get-slide-width.d.ts +0 -12
- package/dist/types/components/Carousel/index.d.ts +0 -1
- package/dist/types/components/Carousel/types/breakpoints.d.ts +0 -1
- package/dist/types/components/Carousel/types/keynames.d.ts +0 -5
- package/dist/types/components/Carousel/types/responsive.d.ts +0 -3
- package/dist/types/components/Carousel/types/screen-sizes.d.ts +0 -2
- package/dist/types/components/Carousel/types/slide-config.d.ts +0 -5
- package/dist/types/components/Checkbox/Checkbox.d.ts +0 -75
- package/dist/types/components/Checkbox/index.d.ts +0 -1
- package/dist/types/components/Columns/Columns.d.ts +0 -76
- package/dist/types/components/Columns/index.d.ts +0 -1
- package/dist/types/components/ComboBox/ComboBox.d.ts +0 -17
- package/dist/types/components/ComboBox/index.d.ts +0 -1
- package/dist/types/components/ComboBox/reducer.d.ts +0 -2
- package/dist/types/components/ComboBox/types/actions.d.ts +0 -45
- package/dist/types/components/ComboBox/types/index.d.ts +0 -3
- package/dist/types/components/ComboBox/types/keynames.d.ts +0 -7
- package/dist/types/components/ComboBox/types/state.d.ts +0 -7
- package/dist/types/components/ComboBox/utils.d.ts +0 -4
- package/dist/types/components/ConditionalWrapper/ConditionalWrapper.d.ts +0 -7
- package/dist/types/components/ConditionalWrapper/index.d.ts +0 -1
- package/dist/types/components/ContentSwitcher/ContentSwitcher.d.ts +0 -32
- package/dist/types/components/ContentSwitcher/ContentSwitcherContent/ContentSwitcherContent.d.ts +0 -12
- package/dist/types/components/ContentSwitcher/ContentSwitcherContent/index.d.ts +0 -1
- package/dist/types/components/ContentSwitcher/ContentSwitcherList/ContentSwitcherList.d.ts +0 -24
- package/dist/types/components/ContentSwitcher/ContentSwitcherList/index.d.ts +0 -1
- package/dist/types/components/ContentSwitcher/ContentSwitcherTab/ContentSwitcherTab.d.ts +0 -17
- package/dist/types/components/ContentSwitcher/ContentSwitcherTab/index.d.ts +0 -1
- package/dist/types/components/ContentSwitcher/index.d.ts +0 -1
- package/dist/types/components/ContentSwitcherDropdown/ContentSwitcherDropdown.d.ts +0 -57
- package/dist/types/components/ContentSwitcherDropdown/index.d.ts +0 -1
- package/dist/types/components/DatePicker/DatePicker.d.ts +0 -20
- package/dist/types/components/DatePicker/constants/date-format.d.ts +0 -1
- package/dist/types/components/DatePicker/constants/index.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/convert-date-string-to-date.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/convert-date-string-to-date.test.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/convert-range-string-to-dates.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/convert-range-string-to-dates.test.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/format-date.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/format-date.test.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/index.d.ts +0 -8
- package/dist/types/components/DatePicker/helpers/is-date-valid.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/is-date-valid.test.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/is-disabled-date.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/is-disabled-date.test.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/is-range-valid.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/is-range-valid.test.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/parse-date-string.d.ts +0 -5
- package/dist/types/components/DatePicker/helpers/parse-date-string.test.d.ts +0 -1
- package/dist/types/components/DatePicker/helpers/parse-range-string.d.ts +0 -14
- package/dist/types/components/DatePicker/helpers/parse-range-string.test.d.ts +0 -1
- package/dist/types/components/DatePicker/index.d.ts +0 -6
- package/dist/types/components/Disclosure/Disclosure.d.ts +0 -29
- package/dist/types/components/Disclosure/index.d.ts +0 -1
- package/dist/types/components/DisclosureMini/DisclosureMini.d.ts +0 -35
- package/dist/types/components/DisclosureMini/index.d.ts +0 -1
- package/dist/types/components/Download/Download.d.ts +0 -41
- package/dist/types/components/Download/index.d.ts +0 -1
- package/dist/types/components/Drawer/Drawer.d.ts +0 -40
- package/dist/types/components/Drawer/index.d.ts +0 -1
- package/dist/types/components/Elevation/Elevation.d.ts +0 -19
- package/dist/types/components/Elevation/index.d.ts +0 -1
- package/dist/types/components/Filter/Filter.d.ts +0 -38
- package/dist/types/components/Filter/FilterControls/FilterControl/FilterControl.d.ts +0 -16
- package/dist/types/components/Filter/FilterControls/FilterControls.d.ts +0 -12
- package/dist/types/components/Filter/FilterItems/FilterItem/FilterItem.d.ts +0 -12
- package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +0 -16
- package/dist/types/components/Filter/index.d.ts +0 -1
- package/dist/types/components/FormControl/FormControl.d.ts +0 -83
- package/dist/types/components/FormControl/index.d.ts +0 -1
- package/dist/types/components/Grid/Grid.constants.d.ts +0 -1
- package/dist/types/components/Grid/Grid.d.ts +0 -28
- package/dist/types/components/Grid/Grid.types.d.ts +0 -10
- package/dist/types/components/Grid/components/Col/Col.d.ts +0 -10
- package/dist/types/components/Grid/components/Col/index.d.ts +0 -1
- package/dist/types/components/Grid/components/Row/Row.d.ts +0 -10
- package/dist/types/components/Grid/components/Row/index.d.ts +0 -1
- package/dist/types/components/Grid/index.d.ts +0 -2
- package/dist/types/components/Group/Group.d.ts +0 -45
- package/dist/types/components/Group/GroupItem/GroupItem.d.ts +0 -17
- package/dist/types/components/Group/index.d.ts +0 -1
- package/dist/types/components/Heading/Heading.d.ts +0 -53
- package/dist/types/components/Heading/index.d.ts +0 -1
- package/dist/types/components/HeroBanner/HeroBanner.d.ts +0 -9
- package/dist/types/components/HeroBanner/index.d.ts +0 -1
- package/dist/types/components/HeroButton/HeroButton.d.ts +0 -66
- package/dist/types/components/HeroButton/index.d.ts +0 -1
- package/dist/types/components/Hidden/Hidden.d.ts +0 -11
- package/dist/types/components/Hidden/index.d.ts +0 -1
- package/dist/types/components/Icon/Icon.d.ts +0 -37
- package/dist/types/components/Icon/index.d.ts +0 -1
- package/dist/types/components/Image/Image.d.ts +0 -97
- package/dist/types/components/Image/index.d.ts +0 -1
- package/dist/types/components/ImpactCard/ImpactCard.d.ts +0 -58
- package/dist/types/components/ImpactCard/index.d.ts +0 -1
- package/dist/types/components/InformationCard/InformationCard.d.ts +0 -62
- package/dist/types/components/InformationCard/index.d.ts +0 -1
- package/dist/types/components/Link/Link.d.ts +0 -52
- package/dist/types/components/Link/index.d.ts +0 -1
- package/dist/types/components/Markup/Markup.d.ts +0 -15
- package/dist/types/components/Markup/index.d.ts +0 -1
- package/dist/types/components/MediaCard/MediaCard.d.ts +0 -56
- package/dist/types/components/MediaCard/index.d.ts +0 -1
- package/dist/types/components/MediaCard/types/index.d.ts +0 -2
- package/dist/types/components/MediaCard/types/media-card-image.d.ts +0 -4
- package/dist/types/components/MediaCard/types/media-card-video.d.ts +0 -4
- package/dist/types/components/Modal/Modal.d.ts +0 -50
- package/dist/types/components/Modal/index.d.ts +0 -1
- package/dist/types/components/Pagination/Pagination.d.ts +0 -19
- package/dist/types/components/Pagination/index.d.ts +0 -1
- package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +0 -43
- package/dist/types/components/PaginationSimple/index.d.ts +0 -1
- package/dist/types/components/Popover/Popover.d.ts +0 -73
- package/dist/types/components/Popover/index.d.ts +0 -1
- package/dist/types/components/Poster/Poster.d.ts +0 -29
- package/dist/types/components/Poster/PosterImage.d.ts +0 -34
- package/dist/types/components/Poster/PosterVideo.d.ts +0 -21
- package/dist/types/components/Poster/index.d.ts +0 -1
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +0 -50
- package/dist/types/components/ProgressBar/constants/progress-bar-icon-map.d.ts +0 -3
- package/dist/types/components/ProgressBar/index.d.ts +0 -1
- package/dist/types/components/ProgressBar/types/progress-bar-icons.d.ts +0 -1
- package/dist/types/components/ProgressBar/types/progress-bar-state.d.ts +0 -1
- package/dist/types/components/ProgressBar/utils/get-progress-bar-props.d.ts +0 -1
- package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +0 -32
- package/dist/types/components/ProgressStepper/ProgressStepperItem/ProgressStepperItem.d.ts +0 -62
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Complete.d.ts +0 -2
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Current.d.ts +0 -2
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Error.d.ts +0 -2
- package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Warning.d.ts +0 -2
- package/dist/types/components/ProgressStepper/index.d.ts +0 -1
- package/dist/types/components/ProgressStepper/progressStatus.d.ts +0 -1
- package/dist/types/components/RadioCardGroup/RadioCard/RadioCard.d.ts +0 -59
- package/dist/types/components/RadioCardGroup/RadioCard/index.d.ts +0 -1
- package/dist/types/components/RadioCardGroup/RadioCardGroup.d.ts +0 -74
- package/dist/types/components/RadioCardGroup/RadioCardGroupInput/RadioCardGroupInput.d.ts +0 -37
- package/dist/types/components/RadioCardGroup/RadioCardGroupInput/index.d.ts +0 -1
- package/dist/types/components/RadioCardGroup/context.d.ts +0 -12
- package/dist/types/components/RadioCardGroup/index.d.ts +0 -1
- package/dist/types/components/RadioGroup/RadioButton/RadioButton.d.ts +0 -21
- package/dist/types/components/RadioGroup/RadioButton/index.d.ts +0 -1
- package/dist/types/components/RadioGroup/RadioButtonGroupInput/RadioButtonGroupInput.d.ts +0 -36
- package/dist/types/components/RadioGroup/RadioButtonGroupInput/index.d.ts +0 -1
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +0 -66
- package/dist/types/components/RadioGroup/context.d.ts +0 -14
- package/dist/types/components/RadioGroup/index.d.ts +0 -2
- package/dist/types/components/Rule/Rule.d.ts +0 -8
- package/dist/types/components/Rule/index.d.ts +0 -1
- package/dist/types/components/ScrollToTop/ScrollToTop.d.ts +0 -24
- package/dist/types/components/ScrollToTop/index.d.ts +0 -1
- package/dist/types/components/Section/Section.d.ts +0 -20
- package/dist/types/components/Section/index.d.ts +0 -1
- package/dist/types/components/Select/Select.d.ts +0 -85
- package/dist/types/components/Select/index.d.ts +0 -1
- package/dist/types/components/SiteFooter/SiteFooter.d.ts +0 -57
- package/dist/types/components/SiteFooter/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/SiteHeaderV2.d.ts +0 -82
- package/dist/types/components/SiteHeaderV2/components/BackButton/BackButton.d.ts +0 -6
- package/dist/types/components/SiteHeaderV2/components/BackButton/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/Column/Column.d.ts +0 -8
- package/dist/types/components/SiteHeaderV2/components/Column/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/HorizontalPanel/HorizontalPanel.d.ts +0 -12
- package/dist/types/components/SiteHeaderV2/components/HorizontalPanel/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/Item/Item.d.ts +0 -16
- package/dist/types/components/SiteHeaderV2/components/Item/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/ItemGroup/ItemGroup.d.ts +0 -27
- package/dist/types/components/SiteHeaderV2/components/ItemGroup/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/MenuButton/MenuButton.d.ts +0 -6
- package/dist/types/components/SiteHeaderV2/components/MenuButton/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/NavItem/NavItem.d.ts +0 -35
- package/dist/types/components/SiteHeaderV2/components/NavItem/NavItemWithSubNav.d.ts +0 -56
- package/dist/types/components/SiteHeaderV2/components/NavItem/index.d.ts +0 -2
- package/dist/types/components/SiteHeaderV2/components/NodeItem/NodeItem.d.ts +0 -8
- package/dist/types/components/SiteHeaderV2/components/Panel/Panel.d.ts +0 -26
- package/dist/types/components/SiteHeaderV2/components/Panel/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/SubNavItem/SubNavItem.d.ts +0 -45
- package/dist/types/components/SiteHeaderV2/components/SubNavItem/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/components/VerticalDivider/VerticalDivider.d.ts +0 -2
- package/dist/types/components/SiteHeaderV2/components/VerticalDivider/index.d.ts +0 -1
- package/dist/types/components/SiteHeaderV2/index.d.ts +0 -1
- package/dist/types/components/Skeleton/Skeleton.d.ts +0 -23
- package/dist/types/components/Skeleton/index.d.ts +0 -1
- package/dist/types/components/SkipLink/SkipLink.d.ts +0 -12
- package/dist/types/components/SkipLink/SkipLinkItem/SkipLinkItem.d.ts +0 -16
- package/dist/types/components/SkipLink/index.d.ts +0 -1
- package/dist/types/components/Spinner/Spinner.d.ts +0 -16
- package/dist/types/components/Spinner/index.d.ts +0 -1
- package/dist/types/components/Surface/Surface.d.ts +0 -53
- package/dist/types/components/Surface/index.d.ts +0 -1
- package/dist/types/components/Switch/Switch.d.ts +0 -47
- package/dist/types/components/Switch/index.d.ts +0 -1
- package/dist/types/components/TabbedBanner/TabbedBanner.d.ts +0 -26
- package/dist/types/components/TabbedBanner/index.d.ts +0 -1
- package/dist/types/components/Tabs/Tab/Tab.d.ts +0 -22
- package/dist/types/components/Tabs/Tab/index.d.ts +0 -1
- package/dist/types/components/Tabs/TabContent/TabContent.d.ts +0 -12
- package/dist/types/components/Tabs/TabContent/index.d.ts +0 -1
- package/dist/types/components/Tabs/Tabs.d.ts +0 -28
- package/dist/types/components/Tabs/TabsList/TabsList.d.ts +0 -20
- package/dist/types/components/Tabs/TabsList/index.d.ts +0 -1
- package/dist/types/components/Tabs/index.d.ts +0 -1
- package/dist/types/components/Tag/Tag.d.ts +0 -36
- package/dist/types/components/Tag/index.d.ts +0 -1
- package/dist/types/components/TemplateBanner/TemplateBanner.d.ts +0 -68
- package/dist/types/components/TemplateBanner/index.d.ts +0 -1
- package/dist/types/components/Text/Text.d.ts +0 -41
- package/dist/types/components/Text/index.d.ts +0 -1
- package/dist/types/components/TextArea/TextArea.d.ts +0 -82
- package/dist/types/components/TextArea/index.d.ts +0 -1
- package/dist/types/components/TextInput/TextInput.d.ts +0 -129
- package/dist/types/components/TextInput/index.d.ts +0 -1
- package/dist/types/components/Theme/Theme.d.ts +0 -21
- package/dist/types/components/Theme/index.d.ts +0 -1
- package/dist/types/components/ThemeIcon/ThemeIcon.d.ts +0 -18
- package/dist/types/components/ThemeIcon/icon-names.d.ts +0 -1
- package/dist/types/components/ThemeIcon/index.d.ts +0 -1
- package/dist/types/components/Toast/Toast.d.ts +0 -17
- package/dist/types/components/Toast/ToastNotification.d.ts +0 -39
- package/dist/types/components/Toast/index.d.ts +0 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts +0 -54
- package/dist/types/components/Tooltip/index.d.ts +0 -1
- package/dist/types/components/Truncate/Truncate.d.ts +0 -17
- package/dist/types/components/Truncate/index.d.ts +0 -1
- package/dist/types/components/TypographyCard/TypographyCard.d.ts +0 -58
- package/dist/types/components/TypographyCard/index.d.ts +0 -1
- package/dist/types/components/UniversalHeader/UniversalHeader.d.ts +0 -29
- package/dist/types/components/UniversalHeader/index.d.ts +0 -1
- package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +0 -33
- package/dist/types/components/VerticalSpace/index.d.ts +0 -1
- package/dist/types/components/VideoPlayer/VideoPlayer.d.ts +0 -27
- package/dist/types/components/VideoPlayer/index.d.ts +0 -1
- package/dist/types/components/Visible/Visible.d.ts +0 -11
- package/dist/types/components/Visible/index.d.ts +0 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +0 -11
- package/dist/types/components/VisuallyHidden/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +0 -76
- package/dist/types/helpers/anchor-points.d.ts +0 -1
- package/dist/types/helpers/get-theme-img.d.ts +0 -6
- package/dist/types/helpers/handle-link-click.d.ts +0 -7
- package/dist/types/helpers/index.d.ts +0 -2
- package/dist/types/hooks/__tests__/use-aria-describedby.test.d.ts +0 -1
- package/dist/types/hooks/__tests__/use-numeric-input.test.d.ts +0 -1
- package/dist/types/hooks/index.d.ts +0 -2
- package/dist/types/hooks/private/index.d.ts +0 -5
- package/dist/types/hooks/private/use-aria-describedby/index.d.ts +0 -1
- package/dist/types/hooks/private/use-aria-describedby/use-aria-describedby.d.ts +0 -22
- package/dist/types/hooks/private/use-interaction-mode/index.d.ts +0 -1
- package/dist/types/hooks/private/use-interaction-mode/use-interaction-mode.d.ts +0 -6
- package/dist/types/hooks/private/use-numeric-input/index.d.ts +0 -1
- package/dist/types/hooks/private/use-numeric-input/use-numeric-input.d.ts +0 -9
- package/dist/types/hooks/private/use-pagination/index.d.ts +0 -1
- package/dist/types/hooks/private/use-pagination/use-pagination.d.ts +0 -1
- package/dist/types/hooks/private/use-theme-element/index.d.ts +0 -1
- package/dist/types/hooks/public/index.d.ts +0 -1
- package/dist/types/hooks/public/use-media-query/index.d.ts +0 -1
- package/dist/types/hooks/public/use-media-query/use-media-query.d.ts +0 -19
- package/dist/types/index.d.ts +0 -2
- package/dist/types/styles.d.ts +0 -81
- package/dist/types/types/arc-icon.d.ts +0 -2
- package/dist/types/types/auto-complete-types.d.ts +0 -1
- package/dist/use-media-query/package.json +0 -7
- package/dist/use-media-query/use-media-query.cjs.js +0 -8
- package/dist/use-media-query/use-media-query.esm.js +0 -2
- /package/{dist/_shared/cjs/BtIconArrowRight.esm-tlOxlRcu.js → lib/_shared/cjs/BtIconArrowRight-tlOxlRcu.cjs} +0 -0
- /package/{dist/_shared/cjs/BtIconChevronRight2Px.esm-Bi9czTg8.js → lib/_shared/cjs/BtIconChevronRight2Px-Bi9czTg8.cjs} +0 -0
- /package/{dist/_shared/cjs/BtIconChevronRightMid.esm-Dol_sskt.js → lib/_shared/cjs/BtIconChevronRightMid-Dol_sskt.cjs} +0 -0
- /package/{dist/_shared/cjs/BtIconPlayFill.esm-1FkY9-lL.js → lib/_shared/cjs/BtIconPlayFill-1FkY9-lL.cjs} +0 -0
- /package/{dist/_shared/cjs/ConditionalWrapper-C09Kw6EG.js → lib/_shared/cjs/ConditionalWrapper-C09Kw6EG.cjs} +0 -0
- /package/{dist/_shared/cjs/handle-link-click-C7BvOIYa.js → lib/_shared/cjs/handle-link-click-C7BvOIYa.cjs} +0 -0
- /package/{dist/_shared/cjs/index-BLRjGROQ.js → lib/_shared/cjs/index-BLRjGROQ.cjs} +0 -0
- /package/{dist/_shared/cjs/index-CTlXMLug.js → lib/_shared/cjs/index-CTlXMLug.cjs} +0 -0
- /package/{dist/_shared/cjs/keynames-Cx13-hWr.js → lib/_shared/cjs/keynames-Cx13-hWr.cjs} +0 -0
- /package/{dist/_shared/cjs/use-media-query-BsUfHjPZ.js → lib/_shared/cjs/use-media-query-BsUfHjPZ.cjs} +0 -0
- /package/{dist/_shared/esm/BtIconArrowRight.esm-26CZetOo.js → lib/_shared/esm/BtIconArrowRight-26CZetOo.mjs} +0 -0
- /package/{dist/_shared/esm/BtIconChevronRight2Px.esm-DXhBZyIV.js → lib/_shared/esm/BtIconChevronRight2Px-DXhBZyIV.mjs} +0 -0
- /package/{dist/_shared/esm/BtIconChevronRightMid.esm-CbaH-o1_.js → lib/_shared/esm/BtIconChevronRightMid-CbaH-o1_.mjs} +0 -0
- /package/{dist/_shared/esm/BtIconPlayFill.esm-Bi65YfLF.js → lib/_shared/esm/BtIconPlayFill-Bi65YfLF.mjs} +0 -0
- /package/{dist/_shared/esm/ConditionalWrapper-WoJxFYwS.js → lib/_shared/esm/ConditionalWrapper-WoJxFYwS.mjs} +0 -0
- /package/{dist/_shared/esm/handle-link-click-CIgZ7pa0.js → lib/_shared/esm/handle-link-click-CIgZ7pa0.mjs} +0 -0
- /package/{dist/_shared/esm/index-5C0-U8cc.js → lib/_shared/esm/index-5C0-U8cc.mjs} +0 -0
- /package/{dist/_shared/esm/index-Cr6KeQLU.js → lib/_shared/esm/index-Cr6KeQLU.mjs} +0 -0
- /package/{dist/_shared/esm/keynames-B5whqsjh.js → lib/_shared/esm/keynames-B5whqsjh.mjs} +0 -0
- /package/{dist/_shared/esm/use-media-query-DmKuIDEM.js → lib/_shared/esm/use-media-query-DmKuIDEM.mjs} +0 -0
|
@@ -1,1907 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var ReactDOM = require('react-dom');
|
|
5
|
-
|
|
6
|
-
function _interopNamespaceDefault(e) {
|
|
7
|
-
var n = Object.create(null);
|
|
8
|
-
if (e) {
|
|
9
|
-
Object.keys(e).forEach(function (k) {
|
|
10
|
-
if (k !== 'default') {
|
|
11
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return e[k]; }
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n.default = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
24
|
-
var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
|
|
25
|
-
|
|
26
|
-
const sides = ['top', 'right', 'bottom', 'left'];
|
|
27
|
-
const min = Math.min;
|
|
28
|
-
const max = Math.max;
|
|
29
|
-
const round = Math.round;
|
|
30
|
-
const floor = Math.floor;
|
|
31
|
-
const createCoords = v => ({
|
|
32
|
-
x: v,
|
|
33
|
-
y: v
|
|
34
|
-
});
|
|
35
|
-
const oppositeSideMap = {
|
|
36
|
-
left: 'right',
|
|
37
|
-
right: 'left',
|
|
38
|
-
bottom: 'top',
|
|
39
|
-
top: 'bottom'
|
|
40
|
-
};
|
|
41
|
-
const oppositeAlignmentMap = {
|
|
42
|
-
start: 'end',
|
|
43
|
-
end: 'start'
|
|
44
|
-
};
|
|
45
|
-
function clamp(start, value, end) {
|
|
46
|
-
return max(start, min(value, end));
|
|
47
|
-
}
|
|
48
|
-
function evaluate(value, param) {
|
|
49
|
-
return typeof value === 'function' ? value(param) : value;
|
|
50
|
-
}
|
|
51
|
-
function getSide(placement) {
|
|
52
|
-
return placement.split('-')[0];
|
|
53
|
-
}
|
|
54
|
-
function getAlignment(placement) {
|
|
55
|
-
return placement.split('-')[1];
|
|
56
|
-
}
|
|
57
|
-
function getOppositeAxis(axis) {
|
|
58
|
-
return axis === 'x' ? 'y' : 'x';
|
|
59
|
-
}
|
|
60
|
-
function getAxisLength(axis) {
|
|
61
|
-
return axis === 'y' ? 'height' : 'width';
|
|
62
|
-
}
|
|
63
|
-
function getSideAxis(placement) {
|
|
64
|
-
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
65
|
-
}
|
|
66
|
-
function getAlignmentAxis(placement) {
|
|
67
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
68
|
-
}
|
|
69
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
70
|
-
if (rtl === void 0) {
|
|
71
|
-
rtl = false;
|
|
72
|
-
}
|
|
73
|
-
const alignment = getAlignment(placement);
|
|
74
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
75
|
-
const length = getAxisLength(alignmentAxis);
|
|
76
|
-
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
77
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
78
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
79
|
-
}
|
|
80
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
81
|
-
}
|
|
82
|
-
function getExpandedPlacements(placement) {
|
|
83
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
84
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
85
|
-
}
|
|
86
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
87
|
-
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
88
|
-
}
|
|
89
|
-
function getSideList(side, isStart, rtl) {
|
|
90
|
-
const lr = ['left', 'right'];
|
|
91
|
-
const rl = ['right', 'left'];
|
|
92
|
-
const tb = ['top', 'bottom'];
|
|
93
|
-
const bt = ['bottom', 'top'];
|
|
94
|
-
switch (side) {
|
|
95
|
-
case 'top':
|
|
96
|
-
case 'bottom':
|
|
97
|
-
if (rtl) return isStart ? rl : lr;
|
|
98
|
-
return isStart ? lr : rl;
|
|
99
|
-
case 'left':
|
|
100
|
-
case 'right':
|
|
101
|
-
return isStart ? tb : bt;
|
|
102
|
-
default:
|
|
103
|
-
return [];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
107
|
-
const alignment = getAlignment(placement);
|
|
108
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
109
|
-
if (alignment) {
|
|
110
|
-
list = list.map(side => side + "-" + alignment);
|
|
111
|
-
if (flipAlignment) {
|
|
112
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return list;
|
|
116
|
-
}
|
|
117
|
-
function getOppositePlacement(placement) {
|
|
118
|
-
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
119
|
-
}
|
|
120
|
-
function expandPaddingObject(padding) {
|
|
121
|
-
return {
|
|
122
|
-
top: 0,
|
|
123
|
-
right: 0,
|
|
124
|
-
bottom: 0,
|
|
125
|
-
left: 0,
|
|
126
|
-
...padding
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function getPaddingObject(padding) {
|
|
130
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
131
|
-
top: padding,
|
|
132
|
-
right: padding,
|
|
133
|
-
bottom: padding,
|
|
134
|
-
left: padding
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function rectToClientRect(rect) {
|
|
138
|
-
return {
|
|
139
|
-
...rect,
|
|
140
|
-
top: rect.y,
|
|
141
|
-
left: rect.x,
|
|
142
|
-
right: rect.x + rect.width,
|
|
143
|
-
bottom: rect.y + rect.height
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
148
|
-
let {
|
|
149
|
-
reference,
|
|
150
|
-
floating
|
|
151
|
-
} = _ref;
|
|
152
|
-
const sideAxis = getSideAxis(placement);
|
|
153
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
154
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
155
|
-
const side = getSide(placement);
|
|
156
|
-
const isVertical = sideAxis === 'y';
|
|
157
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
158
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
159
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
160
|
-
let coords;
|
|
161
|
-
switch (side) {
|
|
162
|
-
case 'top':
|
|
163
|
-
coords = {
|
|
164
|
-
x: commonX,
|
|
165
|
-
y: reference.y - floating.height
|
|
166
|
-
};
|
|
167
|
-
break;
|
|
168
|
-
case 'bottom':
|
|
169
|
-
coords = {
|
|
170
|
-
x: commonX,
|
|
171
|
-
y: reference.y + reference.height
|
|
172
|
-
};
|
|
173
|
-
break;
|
|
174
|
-
case 'right':
|
|
175
|
-
coords = {
|
|
176
|
-
x: reference.x + reference.width,
|
|
177
|
-
y: commonY
|
|
178
|
-
};
|
|
179
|
-
break;
|
|
180
|
-
case 'left':
|
|
181
|
-
coords = {
|
|
182
|
-
x: reference.x - floating.width,
|
|
183
|
-
y: commonY
|
|
184
|
-
};
|
|
185
|
-
break;
|
|
186
|
-
default:
|
|
187
|
-
coords = {
|
|
188
|
-
x: reference.x,
|
|
189
|
-
y: reference.y
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
switch (getAlignment(placement)) {
|
|
193
|
-
case 'start':
|
|
194
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
195
|
-
break;
|
|
196
|
-
case 'end':
|
|
197
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
return coords;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
205
|
-
* next to a reference element when it is given a certain positioning strategy.
|
|
206
|
-
*
|
|
207
|
-
* This export does not have any `platform` interface logic. You will need to
|
|
208
|
-
* write one for the platform you are using Floating UI with.
|
|
209
|
-
*/
|
|
210
|
-
const computePosition$1 = async (reference, floating, config) => {
|
|
211
|
-
const {
|
|
212
|
-
placement = 'bottom',
|
|
213
|
-
strategy = 'absolute',
|
|
214
|
-
middleware = [],
|
|
215
|
-
platform
|
|
216
|
-
} = config;
|
|
217
|
-
const validMiddleware = middleware.filter(Boolean);
|
|
218
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
219
|
-
let rects = await platform.getElementRects({
|
|
220
|
-
reference,
|
|
221
|
-
floating,
|
|
222
|
-
strategy
|
|
223
|
-
});
|
|
224
|
-
let {
|
|
225
|
-
x,
|
|
226
|
-
y
|
|
227
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
228
|
-
let statefulPlacement = placement;
|
|
229
|
-
let middlewareData = {};
|
|
230
|
-
let resetCount = 0;
|
|
231
|
-
for (let i = 0; i < validMiddleware.length; i++) {
|
|
232
|
-
const {
|
|
233
|
-
name,
|
|
234
|
-
fn
|
|
235
|
-
} = validMiddleware[i];
|
|
236
|
-
const {
|
|
237
|
-
x: nextX,
|
|
238
|
-
y: nextY,
|
|
239
|
-
data,
|
|
240
|
-
reset
|
|
241
|
-
} = await fn({
|
|
242
|
-
x,
|
|
243
|
-
y,
|
|
244
|
-
initialPlacement: placement,
|
|
245
|
-
placement: statefulPlacement,
|
|
246
|
-
strategy,
|
|
247
|
-
middlewareData,
|
|
248
|
-
rects,
|
|
249
|
-
platform,
|
|
250
|
-
elements: {
|
|
251
|
-
reference,
|
|
252
|
-
floating
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
x = nextX != null ? nextX : x;
|
|
256
|
-
y = nextY != null ? nextY : y;
|
|
257
|
-
middlewareData = {
|
|
258
|
-
...middlewareData,
|
|
259
|
-
[name]: {
|
|
260
|
-
...middlewareData[name],
|
|
261
|
-
...data
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
if (reset && resetCount <= 50) {
|
|
265
|
-
resetCount++;
|
|
266
|
-
if (typeof reset === 'object') {
|
|
267
|
-
if (reset.placement) {
|
|
268
|
-
statefulPlacement = reset.placement;
|
|
269
|
-
}
|
|
270
|
-
if (reset.rects) {
|
|
271
|
-
rects = reset.rects === true ? await platform.getElementRects({
|
|
272
|
-
reference,
|
|
273
|
-
floating,
|
|
274
|
-
strategy
|
|
275
|
-
}) : reset.rects;
|
|
276
|
-
}
|
|
277
|
-
({
|
|
278
|
-
x,
|
|
279
|
-
y
|
|
280
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
281
|
-
}
|
|
282
|
-
i = -1;
|
|
283
|
-
continue;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
return {
|
|
287
|
-
x,
|
|
288
|
-
y,
|
|
289
|
-
placement: statefulPlacement,
|
|
290
|
-
strategy,
|
|
291
|
-
middlewareData
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
297
|
-
* element is overflowing a given clipping boundary on each side.
|
|
298
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
299
|
-
* - negative = how many pixels left before it will overflow
|
|
300
|
-
* - 0 = lies flush with the boundary
|
|
301
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
302
|
-
*/
|
|
303
|
-
async function detectOverflow(state, options) {
|
|
304
|
-
var _await$platform$isEle;
|
|
305
|
-
if (options === void 0) {
|
|
306
|
-
options = {};
|
|
307
|
-
}
|
|
308
|
-
const {
|
|
309
|
-
x,
|
|
310
|
-
y,
|
|
311
|
-
platform,
|
|
312
|
-
rects,
|
|
313
|
-
elements,
|
|
314
|
-
strategy
|
|
315
|
-
} = state;
|
|
316
|
-
const {
|
|
317
|
-
boundary = 'clippingAncestors',
|
|
318
|
-
rootBoundary = 'viewport',
|
|
319
|
-
elementContext = 'floating',
|
|
320
|
-
altBoundary = false,
|
|
321
|
-
padding = 0
|
|
322
|
-
} = evaluate(options, state);
|
|
323
|
-
const paddingObject = getPaddingObject(padding);
|
|
324
|
-
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
325
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
326
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
327
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
328
|
-
boundary,
|
|
329
|
-
rootBoundary,
|
|
330
|
-
strategy
|
|
331
|
-
}));
|
|
332
|
-
const rect = elementContext === 'floating' ? {
|
|
333
|
-
...rects.floating,
|
|
334
|
-
x,
|
|
335
|
-
y
|
|
336
|
-
} : rects.reference;
|
|
337
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
338
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
339
|
-
x: 1,
|
|
340
|
-
y: 1
|
|
341
|
-
} : {
|
|
342
|
-
x: 1,
|
|
343
|
-
y: 1
|
|
344
|
-
};
|
|
345
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
346
|
-
rect,
|
|
347
|
-
offsetParent,
|
|
348
|
-
strategy
|
|
349
|
-
}) : rect);
|
|
350
|
-
return {
|
|
351
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
352
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
353
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
354
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Provides data to position an inner element of the floating element so that it
|
|
360
|
-
* appears centered to the reference element.
|
|
361
|
-
* @see https://floating-ui.com/docs/arrow
|
|
362
|
-
*/
|
|
363
|
-
const arrow$1 = options => ({
|
|
364
|
-
name: 'arrow',
|
|
365
|
-
options,
|
|
366
|
-
async fn(state) {
|
|
367
|
-
const {
|
|
368
|
-
x,
|
|
369
|
-
y,
|
|
370
|
-
placement,
|
|
371
|
-
rects,
|
|
372
|
-
platform,
|
|
373
|
-
elements,
|
|
374
|
-
middlewareData
|
|
375
|
-
} = state;
|
|
376
|
-
// Since `element` is required, we don't Partial<> the type.
|
|
377
|
-
const {
|
|
378
|
-
element,
|
|
379
|
-
padding = 0
|
|
380
|
-
} = evaluate(options, state) || {};
|
|
381
|
-
if (element == null) {
|
|
382
|
-
return {};
|
|
383
|
-
}
|
|
384
|
-
const paddingObject = getPaddingObject(padding);
|
|
385
|
-
const coords = {
|
|
386
|
-
x,
|
|
387
|
-
y
|
|
388
|
-
};
|
|
389
|
-
const axis = getAlignmentAxis(placement);
|
|
390
|
-
const length = getAxisLength(axis);
|
|
391
|
-
const arrowDimensions = await platform.getDimensions(element);
|
|
392
|
-
const isYAxis = axis === 'y';
|
|
393
|
-
const minProp = isYAxis ? 'top' : 'left';
|
|
394
|
-
const maxProp = isYAxis ? 'bottom' : 'right';
|
|
395
|
-
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
|
396
|
-
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
397
|
-
const startDiff = coords[axis] - rects.reference[axis];
|
|
398
|
-
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
399
|
-
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
400
|
-
|
|
401
|
-
// DOM platform can return `window` as the `offsetParent`.
|
|
402
|
-
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
|
403
|
-
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
404
|
-
}
|
|
405
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
406
|
-
|
|
407
|
-
// If the padding is large enough that it causes the arrow to no longer be
|
|
408
|
-
// centered, modify the padding so that it is centered.
|
|
409
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
410
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
411
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
412
|
-
|
|
413
|
-
// Make sure the arrow doesn't overflow the floating element if the center
|
|
414
|
-
// point is outside the floating element's bounds.
|
|
415
|
-
const min$1 = minPadding;
|
|
416
|
-
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
417
|
-
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
418
|
-
const offset = clamp(min$1, center, max);
|
|
419
|
-
|
|
420
|
-
// If the reference is small enough that the arrow's padding causes it to
|
|
421
|
-
// to point to nothing for an aligned placement, adjust the offset of the
|
|
422
|
-
// floating element itself. To ensure `shift()` continues to take action,
|
|
423
|
-
// a single reset is performed when this is true.
|
|
424
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
425
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
|
426
|
-
return {
|
|
427
|
-
[axis]: coords[axis] + alignmentOffset,
|
|
428
|
-
data: {
|
|
429
|
-
[axis]: offset,
|
|
430
|
-
centerOffset: center - offset - alignmentOffset,
|
|
431
|
-
...(shouldAddOffset && {
|
|
432
|
-
alignmentOffset
|
|
433
|
-
})
|
|
434
|
-
},
|
|
435
|
-
reset: shouldAddOffset
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
442
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
443
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
444
|
-
* @see https://floating-ui.com/docs/flip
|
|
445
|
-
*/
|
|
446
|
-
const flip = function (options) {
|
|
447
|
-
if (options === void 0) {
|
|
448
|
-
options = {};
|
|
449
|
-
}
|
|
450
|
-
return {
|
|
451
|
-
name: 'flip',
|
|
452
|
-
options,
|
|
453
|
-
async fn(state) {
|
|
454
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
455
|
-
const {
|
|
456
|
-
placement,
|
|
457
|
-
middlewareData,
|
|
458
|
-
rects,
|
|
459
|
-
initialPlacement,
|
|
460
|
-
platform,
|
|
461
|
-
elements
|
|
462
|
-
} = state;
|
|
463
|
-
const {
|
|
464
|
-
mainAxis: checkMainAxis = true,
|
|
465
|
-
crossAxis: checkCrossAxis = true,
|
|
466
|
-
fallbackPlacements: specifiedFallbackPlacements,
|
|
467
|
-
fallbackStrategy = 'bestFit',
|
|
468
|
-
fallbackAxisSideDirection = 'none',
|
|
469
|
-
flipAlignment = true,
|
|
470
|
-
...detectOverflowOptions
|
|
471
|
-
} = evaluate(options, state);
|
|
472
|
-
|
|
473
|
-
// If a reset by the arrow was caused due to an alignment offset being
|
|
474
|
-
// added, we should skip any logic now since `flip()` has already done its
|
|
475
|
-
// work.
|
|
476
|
-
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
477
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
478
|
-
return {};
|
|
479
|
-
}
|
|
480
|
-
const side = getSide(placement);
|
|
481
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
482
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
483
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
484
|
-
if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
|
|
485
|
-
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
486
|
-
}
|
|
487
|
-
const placements = [initialPlacement, ...fallbackPlacements];
|
|
488
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
489
|
-
const overflows = [];
|
|
490
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
491
|
-
if (checkMainAxis) {
|
|
492
|
-
overflows.push(overflow[side]);
|
|
493
|
-
}
|
|
494
|
-
if (checkCrossAxis) {
|
|
495
|
-
const sides = getAlignmentSides(placement, rects, rtl);
|
|
496
|
-
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
497
|
-
}
|
|
498
|
-
overflowsData = [...overflowsData, {
|
|
499
|
-
placement,
|
|
500
|
-
overflows
|
|
501
|
-
}];
|
|
502
|
-
|
|
503
|
-
// One or more sides is overflowing.
|
|
504
|
-
if (!overflows.every(side => side <= 0)) {
|
|
505
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
506
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
507
|
-
const nextPlacement = placements[nextIndex];
|
|
508
|
-
if (nextPlacement) {
|
|
509
|
-
// Try next placement and re-run the lifecycle.
|
|
510
|
-
return {
|
|
511
|
-
data: {
|
|
512
|
-
index: nextIndex,
|
|
513
|
-
overflows: overflowsData
|
|
514
|
-
},
|
|
515
|
-
reset: {
|
|
516
|
-
placement: nextPlacement
|
|
517
|
-
}
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
522
|
-
// then find the placement that fits the best on the main crossAxis side.
|
|
523
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
524
|
-
|
|
525
|
-
// Otherwise fallback.
|
|
526
|
-
if (!resetPlacement) {
|
|
527
|
-
switch (fallbackStrategy) {
|
|
528
|
-
case 'bestFit':
|
|
529
|
-
{
|
|
530
|
-
var _overflowsData$map$so;
|
|
531
|
-
const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
|
|
532
|
-
if (placement) {
|
|
533
|
-
resetPlacement = placement;
|
|
534
|
-
}
|
|
535
|
-
break;
|
|
536
|
-
}
|
|
537
|
-
case 'initialPlacement':
|
|
538
|
-
resetPlacement = initialPlacement;
|
|
539
|
-
break;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
if (placement !== resetPlacement) {
|
|
543
|
-
return {
|
|
544
|
-
reset: {
|
|
545
|
-
placement: resetPlacement
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
return {};
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
function getSideOffsets(overflow, rect) {
|
|
556
|
-
return {
|
|
557
|
-
top: overflow.top - rect.height,
|
|
558
|
-
right: overflow.right - rect.width,
|
|
559
|
-
bottom: overflow.bottom - rect.height,
|
|
560
|
-
left: overflow.left - rect.width
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
function isAnySideFullyClipped(overflow) {
|
|
564
|
-
return sides.some(side => overflow[side] >= 0);
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Provides data to hide the floating element in applicable situations, such as
|
|
568
|
-
* when it is not in the same clipping context as the reference element.
|
|
569
|
-
* @see https://floating-ui.com/docs/hide
|
|
570
|
-
*/
|
|
571
|
-
const hide = function (options) {
|
|
572
|
-
if (options === void 0) {
|
|
573
|
-
options = {};
|
|
574
|
-
}
|
|
575
|
-
return {
|
|
576
|
-
name: 'hide',
|
|
577
|
-
options,
|
|
578
|
-
async fn(state) {
|
|
579
|
-
const {
|
|
580
|
-
rects
|
|
581
|
-
} = state;
|
|
582
|
-
const {
|
|
583
|
-
strategy = 'referenceHidden',
|
|
584
|
-
...detectOverflowOptions
|
|
585
|
-
} = evaluate(options, state);
|
|
586
|
-
switch (strategy) {
|
|
587
|
-
case 'referenceHidden':
|
|
588
|
-
{
|
|
589
|
-
const overflow = await detectOverflow(state, {
|
|
590
|
-
...detectOverflowOptions,
|
|
591
|
-
elementContext: 'reference'
|
|
592
|
-
});
|
|
593
|
-
const offsets = getSideOffsets(overflow, rects.reference);
|
|
594
|
-
return {
|
|
595
|
-
data: {
|
|
596
|
-
referenceHiddenOffsets: offsets,
|
|
597
|
-
referenceHidden: isAnySideFullyClipped(offsets)
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
case 'escaped':
|
|
602
|
-
{
|
|
603
|
-
const overflow = await detectOverflow(state, {
|
|
604
|
-
...detectOverflowOptions,
|
|
605
|
-
altBoundary: true
|
|
606
|
-
});
|
|
607
|
-
const offsets = getSideOffsets(overflow, rects.floating);
|
|
608
|
-
return {
|
|
609
|
-
data: {
|
|
610
|
-
escapedOffsets: offsets,
|
|
611
|
-
escaped: isAnySideFullyClipped(offsets)
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
default:
|
|
616
|
-
{
|
|
617
|
-
return {};
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
};
|
|
623
|
-
|
|
624
|
-
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
625
|
-
// Derivable.
|
|
626
|
-
async function convertValueToCoords(state, options) {
|
|
627
|
-
const {
|
|
628
|
-
placement,
|
|
629
|
-
platform,
|
|
630
|
-
elements
|
|
631
|
-
} = state;
|
|
632
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
633
|
-
const side = getSide(placement);
|
|
634
|
-
const alignment = getAlignment(placement);
|
|
635
|
-
const isVertical = getSideAxis(placement) === 'y';
|
|
636
|
-
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
637
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
638
|
-
const rawValue = evaluate(options, state);
|
|
639
|
-
|
|
640
|
-
// eslint-disable-next-line prefer-const
|
|
641
|
-
let {
|
|
642
|
-
mainAxis,
|
|
643
|
-
crossAxis,
|
|
644
|
-
alignmentAxis
|
|
645
|
-
} = typeof rawValue === 'number' ? {
|
|
646
|
-
mainAxis: rawValue,
|
|
647
|
-
crossAxis: 0,
|
|
648
|
-
alignmentAxis: null
|
|
649
|
-
} : {
|
|
650
|
-
mainAxis: 0,
|
|
651
|
-
crossAxis: 0,
|
|
652
|
-
alignmentAxis: null,
|
|
653
|
-
...rawValue
|
|
654
|
-
};
|
|
655
|
-
if (alignment && typeof alignmentAxis === 'number') {
|
|
656
|
-
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
657
|
-
}
|
|
658
|
-
return isVertical ? {
|
|
659
|
-
x: crossAxis * crossAxisMulti,
|
|
660
|
-
y: mainAxis * mainAxisMulti
|
|
661
|
-
} : {
|
|
662
|
-
x: mainAxis * mainAxisMulti,
|
|
663
|
-
y: crossAxis * crossAxisMulti
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
/**
|
|
668
|
-
* Modifies the placement by translating the floating element along the
|
|
669
|
-
* specified axes.
|
|
670
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
671
|
-
* object may be passed.
|
|
672
|
-
* @see https://floating-ui.com/docs/offset
|
|
673
|
-
*/
|
|
674
|
-
const offset = function (options) {
|
|
675
|
-
if (options === void 0) {
|
|
676
|
-
options = 0;
|
|
677
|
-
}
|
|
678
|
-
return {
|
|
679
|
-
name: 'offset',
|
|
680
|
-
options,
|
|
681
|
-
async fn(state) {
|
|
682
|
-
const {
|
|
683
|
-
x,
|
|
684
|
-
y
|
|
685
|
-
} = state;
|
|
686
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
687
|
-
return {
|
|
688
|
-
x: x + diffCoords.x,
|
|
689
|
-
y: y + diffCoords.y,
|
|
690
|
-
data: diffCoords
|
|
691
|
-
};
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
698
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
699
|
-
* @see https://floating-ui.com/docs/shift
|
|
700
|
-
*/
|
|
701
|
-
const shift = function (options) {
|
|
702
|
-
if (options === void 0) {
|
|
703
|
-
options = {};
|
|
704
|
-
}
|
|
705
|
-
return {
|
|
706
|
-
name: 'shift',
|
|
707
|
-
options,
|
|
708
|
-
async fn(state) {
|
|
709
|
-
const {
|
|
710
|
-
x,
|
|
711
|
-
y,
|
|
712
|
-
placement
|
|
713
|
-
} = state;
|
|
714
|
-
const {
|
|
715
|
-
mainAxis: checkMainAxis = true,
|
|
716
|
-
crossAxis: checkCrossAxis = false,
|
|
717
|
-
limiter = {
|
|
718
|
-
fn: _ref => {
|
|
719
|
-
let {
|
|
720
|
-
x,
|
|
721
|
-
y
|
|
722
|
-
} = _ref;
|
|
723
|
-
return {
|
|
724
|
-
x,
|
|
725
|
-
y
|
|
726
|
-
};
|
|
727
|
-
}
|
|
728
|
-
},
|
|
729
|
-
...detectOverflowOptions
|
|
730
|
-
} = evaluate(options, state);
|
|
731
|
-
const coords = {
|
|
732
|
-
x,
|
|
733
|
-
y
|
|
734
|
-
};
|
|
735
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
736
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
737
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
738
|
-
let mainAxisCoord = coords[mainAxis];
|
|
739
|
-
let crossAxisCoord = coords[crossAxis];
|
|
740
|
-
if (checkMainAxis) {
|
|
741
|
-
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
742
|
-
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
743
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
744
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
745
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
746
|
-
}
|
|
747
|
-
if (checkCrossAxis) {
|
|
748
|
-
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
749
|
-
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
750
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
751
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
752
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
753
|
-
}
|
|
754
|
-
const limitedCoords = limiter.fn({
|
|
755
|
-
...state,
|
|
756
|
-
[mainAxis]: mainAxisCoord,
|
|
757
|
-
[crossAxis]: crossAxisCoord
|
|
758
|
-
});
|
|
759
|
-
return {
|
|
760
|
-
...limitedCoords,
|
|
761
|
-
data: {
|
|
762
|
-
x: limitedCoords.x - x,
|
|
763
|
-
y: limitedCoords.y - y
|
|
764
|
-
}
|
|
765
|
-
};
|
|
766
|
-
}
|
|
767
|
-
};
|
|
768
|
-
};
|
|
769
|
-
/**
|
|
770
|
-
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
771
|
-
*/
|
|
772
|
-
const limitShift = function (options) {
|
|
773
|
-
if (options === void 0) {
|
|
774
|
-
options = {};
|
|
775
|
-
}
|
|
776
|
-
return {
|
|
777
|
-
options,
|
|
778
|
-
fn(state) {
|
|
779
|
-
const {
|
|
780
|
-
x,
|
|
781
|
-
y,
|
|
782
|
-
placement,
|
|
783
|
-
rects,
|
|
784
|
-
middlewareData
|
|
785
|
-
} = state;
|
|
786
|
-
const {
|
|
787
|
-
offset = 0,
|
|
788
|
-
mainAxis: checkMainAxis = true,
|
|
789
|
-
crossAxis: checkCrossAxis = true
|
|
790
|
-
} = evaluate(options, state);
|
|
791
|
-
const coords = {
|
|
792
|
-
x,
|
|
793
|
-
y
|
|
794
|
-
};
|
|
795
|
-
const crossAxis = getSideAxis(placement);
|
|
796
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
797
|
-
let mainAxisCoord = coords[mainAxis];
|
|
798
|
-
let crossAxisCoord = coords[crossAxis];
|
|
799
|
-
const rawOffset = evaluate(offset, state);
|
|
800
|
-
const computedOffset = typeof rawOffset === 'number' ? {
|
|
801
|
-
mainAxis: rawOffset,
|
|
802
|
-
crossAxis: 0
|
|
803
|
-
} : {
|
|
804
|
-
mainAxis: 0,
|
|
805
|
-
crossAxis: 0,
|
|
806
|
-
...rawOffset
|
|
807
|
-
};
|
|
808
|
-
if (checkMainAxis) {
|
|
809
|
-
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
810
|
-
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
811
|
-
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
812
|
-
if (mainAxisCoord < limitMin) {
|
|
813
|
-
mainAxisCoord = limitMin;
|
|
814
|
-
} else if (mainAxisCoord > limitMax) {
|
|
815
|
-
mainAxisCoord = limitMax;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
if (checkCrossAxis) {
|
|
819
|
-
var _middlewareData$offse, _middlewareData$offse2;
|
|
820
|
-
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
821
|
-
const isOriginSide = ['top', 'left'].includes(getSide(placement));
|
|
822
|
-
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);
|
|
823
|
-
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);
|
|
824
|
-
if (crossAxisCoord < limitMin) {
|
|
825
|
-
crossAxisCoord = limitMin;
|
|
826
|
-
} else if (crossAxisCoord > limitMax) {
|
|
827
|
-
crossAxisCoord = limitMax;
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
return {
|
|
831
|
-
[mainAxis]: mainAxisCoord,
|
|
832
|
-
[crossAxis]: crossAxisCoord
|
|
833
|
-
};
|
|
834
|
-
}
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* Provides data that allows you to change the size of the floating element —
|
|
840
|
-
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
841
|
-
* width of the reference element.
|
|
842
|
-
* @see https://floating-ui.com/docs/size
|
|
843
|
-
*/
|
|
844
|
-
const size = function (options) {
|
|
845
|
-
if (options === void 0) {
|
|
846
|
-
options = {};
|
|
847
|
-
}
|
|
848
|
-
return {
|
|
849
|
-
name: 'size',
|
|
850
|
-
options,
|
|
851
|
-
async fn(state) {
|
|
852
|
-
const {
|
|
853
|
-
placement,
|
|
854
|
-
rects,
|
|
855
|
-
platform,
|
|
856
|
-
elements
|
|
857
|
-
} = state;
|
|
858
|
-
const {
|
|
859
|
-
apply = () => {},
|
|
860
|
-
...detectOverflowOptions
|
|
861
|
-
} = evaluate(options, state);
|
|
862
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
863
|
-
const side = getSide(placement);
|
|
864
|
-
const alignment = getAlignment(placement);
|
|
865
|
-
const isYAxis = getSideAxis(placement) === 'y';
|
|
866
|
-
const {
|
|
867
|
-
width,
|
|
868
|
-
height
|
|
869
|
-
} = rects.floating;
|
|
870
|
-
let heightSide;
|
|
871
|
-
let widthSide;
|
|
872
|
-
if (side === 'top' || side === 'bottom') {
|
|
873
|
-
heightSide = side;
|
|
874
|
-
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
|
875
|
-
} else {
|
|
876
|
-
widthSide = side;
|
|
877
|
-
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
878
|
-
}
|
|
879
|
-
const overflowAvailableHeight = height - overflow[heightSide];
|
|
880
|
-
const overflowAvailableWidth = width - overflow[widthSide];
|
|
881
|
-
const noShift = !state.middlewareData.shift;
|
|
882
|
-
let availableHeight = overflowAvailableHeight;
|
|
883
|
-
let availableWidth = overflowAvailableWidth;
|
|
884
|
-
if (isYAxis) {
|
|
885
|
-
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
886
|
-
availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
|
887
|
-
} else {
|
|
888
|
-
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
889
|
-
availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
|
890
|
-
}
|
|
891
|
-
if (noShift && !alignment) {
|
|
892
|
-
const xMin = max(overflow.left, 0);
|
|
893
|
-
const xMax = max(overflow.right, 0);
|
|
894
|
-
const yMin = max(overflow.top, 0);
|
|
895
|
-
const yMax = max(overflow.bottom, 0);
|
|
896
|
-
if (isYAxis) {
|
|
897
|
-
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
898
|
-
} else {
|
|
899
|
-
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
await apply({
|
|
903
|
-
...state,
|
|
904
|
-
availableWidth,
|
|
905
|
-
availableHeight
|
|
906
|
-
});
|
|
907
|
-
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
908
|
-
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
909
|
-
return {
|
|
910
|
-
reset: {
|
|
911
|
-
rects: true
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
}
|
|
915
|
-
return {};
|
|
916
|
-
}
|
|
917
|
-
};
|
|
918
|
-
};
|
|
919
|
-
|
|
920
|
-
function getNodeName(node) {
|
|
921
|
-
if (isNode(node)) {
|
|
922
|
-
return (node.nodeName || '').toLowerCase();
|
|
923
|
-
}
|
|
924
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
925
|
-
// returning `#document` an infinite loop won't occur.
|
|
926
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
927
|
-
return '#document';
|
|
928
|
-
}
|
|
929
|
-
function getWindow(node) {
|
|
930
|
-
var _node$ownerDocument;
|
|
931
|
-
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
932
|
-
}
|
|
933
|
-
function getDocumentElement(node) {
|
|
934
|
-
var _ref;
|
|
935
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
936
|
-
}
|
|
937
|
-
function isNode(value) {
|
|
938
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
939
|
-
}
|
|
940
|
-
function isElement(value) {
|
|
941
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
942
|
-
}
|
|
943
|
-
function isHTMLElement(value) {
|
|
944
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
945
|
-
}
|
|
946
|
-
function isShadowRoot(value) {
|
|
947
|
-
// Browsers without `ShadowRoot` support.
|
|
948
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
949
|
-
return false;
|
|
950
|
-
}
|
|
951
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
952
|
-
}
|
|
953
|
-
function isOverflowElement(element) {
|
|
954
|
-
const {
|
|
955
|
-
overflow,
|
|
956
|
-
overflowX,
|
|
957
|
-
overflowY,
|
|
958
|
-
display
|
|
959
|
-
} = getComputedStyle(element);
|
|
960
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
961
|
-
}
|
|
962
|
-
function isTableElement(element) {
|
|
963
|
-
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
964
|
-
}
|
|
965
|
-
function isContainingBlock(element) {
|
|
966
|
-
const webkit = isWebKit();
|
|
967
|
-
const css = getComputedStyle(element);
|
|
968
|
-
|
|
969
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
970
|
-
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
971
|
-
}
|
|
972
|
-
function getContainingBlock(element) {
|
|
973
|
-
let currentNode = getParentNode(element);
|
|
974
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
975
|
-
if (isContainingBlock(currentNode)) {
|
|
976
|
-
return currentNode;
|
|
977
|
-
} else {
|
|
978
|
-
currentNode = getParentNode(currentNode);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
return null;
|
|
982
|
-
}
|
|
983
|
-
function isWebKit() {
|
|
984
|
-
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
985
|
-
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
986
|
-
}
|
|
987
|
-
function isLastTraversableNode(node) {
|
|
988
|
-
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
989
|
-
}
|
|
990
|
-
function getComputedStyle(element) {
|
|
991
|
-
return getWindow(element).getComputedStyle(element);
|
|
992
|
-
}
|
|
993
|
-
function getNodeScroll(element) {
|
|
994
|
-
if (isElement(element)) {
|
|
995
|
-
return {
|
|
996
|
-
scrollLeft: element.scrollLeft,
|
|
997
|
-
scrollTop: element.scrollTop
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
return {
|
|
1001
|
-
scrollLeft: element.pageXOffset,
|
|
1002
|
-
scrollTop: element.pageYOffset
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
function getParentNode(node) {
|
|
1006
|
-
if (getNodeName(node) === 'html') {
|
|
1007
|
-
return node;
|
|
1008
|
-
}
|
|
1009
|
-
const result =
|
|
1010
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
1011
|
-
node.assignedSlot ||
|
|
1012
|
-
// DOM Element detected.
|
|
1013
|
-
node.parentNode ||
|
|
1014
|
-
// ShadowRoot detected.
|
|
1015
|
-
isShadowRoot(node) && node.host ||
|
|
1016
|
-
// Fallback.
|
|
1017
|
-
getDocumentElement(node);
|
|
1018
|
-
return isShadowRoot(result) ? result.host : result;
|
|
1019
|
-
}
|
|
1020
|
-
function getNearestOverflowAncestor(node) {
|
|
1021
|
-
const parentNode = getParentNode(node);
|
|
1022
|
-
if (isLastTraversableNode(parentNode)) {
|
|
1023
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
1024
|
-
}
|
|
1025
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1026
|
-
return parentNode;
|
|
1027
|
-
}
|
|
1028
|
-
return getNearestOverflowAncestor(parentNode);
|
|
1029
|
-
}
|
|
1030
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1031
|
-
var _node$ownerDocument2;
|
|
1032
|
-
if (list === void 0) {
|
|
1033
|
-
list = [];
|
|
1034
|
-
}
|
|
1035
|
-
if (traverseIframes === void 0) {
|
|
1036
|
-
traverseIframes = true;
|
|
1037
|
-
}
|
|
1038
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1039
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1040
|
-
const win = getWindow(scrollableAncestor);
|
|
1041
|
-
if (isBody) {
|
|
1042
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
|
|
1043
|
-
}
|
|
1044
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
function getCssDimensions(element) {
|
|
1048
|
-
const css = getComputedStyle(element);
|
|
1049
|
-
// In testing environments, the `width` and `height` properties are empty
|
|
1050
|
-
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1051
|
-
let width = parseFloat(css.width) || 0;
|
|
1052
|
-
let height = parseFloat(css.height) || 0;
|
|
1053
|
-
const hasOffset = isHTMLElement(element);
|
|
1054
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
1055
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1056
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1057
|
-
if (shouldFallback) {
|
|
1058
|
-
width = offsetWidth;
|
|
1059
|
-
height = offsetHeight;
|
|
1060
|
-
}
|
|
1061
|
-
return {
|
|
1062
|
-
width,
|
|
1063
|
-
height,
|
|
1064
|
-
$: shouldFallback
|
|
1065
|
-
};
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
function unwrapElement(element) {
|
|
1069
|
-
return !isElement(element) ? element.contextElement : element;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
function getScale(element) {
|
|
1073
|
-
const domElement = unwrapElement(element);
|
|
1074
|
-
if (!isHTMLElement(domElement)) {
|
|
1075
|
-
return createCoords(1);
|
|
1076
|
-
}
|
|
1077
|
-
const rect = domElement.getBoundingClientRect();
|
|
1078
|
-
const {
|
|
1079
|
-
width,
|
|
1080
|
-
height,
|
|
1081
|
-
$
|
|
1082
|
-
} = getCssDimensions(domElement);
|
|
1083
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1084
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1085
|
-
|
|
1086
|
-
// 0, NaN, or Infinity should always fallback to 1.
|
|
1087
|
-
|
|
1088
|
-
if (!x || !Number.isFinite(x)) {
|
|
1089
|
-
x = 1;
|
|
1090
|
-
}
|
|
1091
|
-
if (!y || !Number.isFinite(y)) {
|
|
1092
|
-
y = 1;
|
|
1093
|
-
}
|
|
1094
|
-
return {
|
|
1095
|
-
x,
|
|
1096
|
-
y
|
|
1097
|
-
};
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
1101
|
-
function getVisualOffsets(element) {
|
|
1102
|
-
const win = getWindow(element);
|
|
1103
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
1104
|
-
return noOffsets;
|
|
1105
|
-
}
|
|
1106
|
-
return {
|
|
1107
|
-
x: win.visualViewport.offsetLeft,
|
|
1108
|
-
y: win.visualViewport.offsetTop
|
|
1109
|
-
};
|
|
1110
|
-
}
|
|
1111
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1112
|
-
if (isFixed === void 0) {
|
|
1113
|
-
isFixed = false;
|
|
1114
|
-
}
|
|
1115
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
1116
|
-
return false;
|
|
1117
|
-
}
|
|
1118
|
-
return isFixed;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1122
|
-
if (includeScale === void 0) {
|
|
1123
|
-
includeScale = false;
|
|
1124
|
-
}
|
|
1125
|
-
if (isFixedStrategy === void 0) {
|
|
1126
|
-
isFixedStrategy = false;
|
|
1127
|
-
}
|
|
1128
|
-
const clientRect = element.getBoundingClientRect();
|
|
1129
|
-
const domElement = unwrapElement(element);
|
|
1130
|
-
let scale = createCoords(1);
|
|
1131
|
-
if (includeScale) {
|
|
1132
|
-
if (offsetParent) {
|
|
1133
|
-
if (isElement(offsetParent)) {
|
|
1134
|
-
scale = getScale(offsetParent);
|
|
1135
|
-
}
|
|
1136
|
-
} else {
|
|
1137
|
-
scale = getScale(element);
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1141
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1142
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1143
|
-
let width = clientRect.width / scale.x;
|
|
1144
|
-
let height = clientRect.height / scale.y;
|
|
1145
|
-
if (domElement) {
|
|
1146
|
-
const win = getWindow(domElement);
|
|
1147
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1148
|
-
let currentIFrame = win.frameElement;
|
|
1149
|
-
while (currentIFrame && offsetParent && offsetWin !== win) {
|
|
1150
|
-
const iframeScale = getScale(currentIFrame);
|
|
1151
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1152
|
-
const css = getComputedStyle(currentIFrame);
|
|
1153
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1154
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1155
|
-
x *= iframeScale.x;
|
|
1156
|
-
y *= iframeScale.y;
|
|
1157
|
-
width *= iframeScale.x;
|
|
1158
|
-
height *= iframeScale.y;
|
|
1159
|
-
x += left;
|
|
1160
|
-
y += top;
|
|
1161
|
-
currentIFrame = getWindow(currentIFrame).frameElement;
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
return rectToClientRect({
|
|
1165
|
-
width,
|
|
1166
|
-
height,
|
|
1167
|
-
x,
|
|
1168
|
-
y
|
|
1169
|
-
});
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1173
|
-
let {
|
|
1174
|
-
rect,
|
|
1175
|
-
offsetParent,
|
|
1176
|
-
strategy
|
|
1177
|
-
} = _ref;
|
|
1178
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1179
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1180
|
-
if (offsetParent === documentElement) {
|
|
1181
|
-
return rect;
|
|
1182
|
-
}
|
|
1183
|
-
let scroll = {
|
|
1184
|
-
scrollLeft: 0,
|
|
1185
|
-
scrollTop: 0
|
|
1186
|
-
};
|
|
1187
|
-
let scale = createCoords(1);
|
|
1188
|
-
const offsets = createCoords(0);
|
|
1189
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
|
|
1190
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1191
|
-
scroll = getNodeScroll(offsetParent);
|
|
1192
|
-
}
|
|
1193
|
-
if (isHTMLElement(offsetParent)) {
|
|
1194
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1195
|
-
scale = getScale(offsetParent);
|
|
1196
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1197
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
return {
|
|
1201
|
-
width: rect.width * scale.x,
|
|
1202
|
-
height: rect.height * scale.y,
|
|
1203
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
1204
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
1205
|
-
};
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
function getClientRects(element) {
|
|
1209
|
-
return Array.from(element.getClientRects());
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
function getWindowScrollBarX(element) {
|
|
1213
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1214
|
-
// incorrect for RTL.
|
|
1215
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
// Gets the entire size of the scrollable document area, even extending outside
|
|
1219
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1220
|
-
function getDocumentRect(element) {
|
|
1221
|
-
const html = getDocumentElement(element);
|
|
1222
|
-
const scroll = getNodeScroll(element);
|
|
1223
|
-
const body = element.ownerDocument.body;
|
|
1224
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1225
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1226
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1227
|
-
const y = -scroll.scrollTop;
|
|
1228
|
-
if (getComputedStyle(body).direction === 'rtl') {
|
|
1229
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1230
|
-
}
|
|
1231
|
-
return {
|
|
1232
|
-
width,
|
|
1233
|
-
height,
|
|
1234
|
-
x,
|
|
1235
|
-
y
|
|
1236
|
-
};
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
function getViewportRect(element, strategy) {
|
|
1240
|
-
const win = getWindow(element);
|
|
1241
|
-
const html = getDocumentElement(element);
|
|
1242
|
-
const visualViewport = win.visualViewport;
|
|
1243
|
-
let width = html.clientWidth;
|
|
1244
|
-
let height = html.clientHeight;
|
|
1245
|
-
let x = 0;
|
|
1246
|
-
let y = 0;
|
|
1247
|
-
if (visualViewport) {
|
|
1248
|
-
width = visualViewport.width;
|
|
1249
|
-
height = visualViewport.height;
|
|
1250
|
-
const visualViewportBased = isWebKit();
|
|
1251
|
-
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
1252
|
-
x = visualViewport.offsetLeft;
|
|
1253
|
-
y = visualViewport.offsetTop;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
return {
|
|
1257
|
-
width,
|
|
1258
|
-
height,
|
|
1259
|
-
x,
|
|
1260
|
-
y
|
|
1261
|
-
};
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1265
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
1266
|
-
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1267
|
-
const top = clientRect.top + element.clientTop;
|
|
1268
|
-
const left = clientRect.left + element.clientLeft;
|
|
1269
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
1270
|
-
const width = element.clientWidth * scale.x;
|
|
1271
|
-
const height = element.clientHeight * scale.y;
|
|
1272
|
-
const x = left * scale.x;
|
|
1273
|
-
const y = top * scale.y;
|
|
1274
|
-
return {
|
|
1275
|
-
width,
|
|
1276
|
-
height,
|
|
1277
|
-
x,
|
|
1278
|
-
y
|
|
1279
|
-
};
|
|
1280
|
-
}
|
|
1281
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1282
|
-
let rect;
|
|
1283
|
-
if (clippingAncestor === 'viewport') {
|
|
1284
|
-
rect = getViewportRect(element, strategy);
|
|
1285
|
-
} else if (clippingAncestor === 'document') {
|
|
1286
|
-
rect = getDocumentRect(getDocumentElement(element));
|
|
1287
|
-
} else if (isElement(clippingAncestor)) {
|
|
1288
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1289
|
-
} else {
|
|
1290
|
-
const visualOffsets = getVisualOffsets(element);
|
|
1291
|
-
rect = {
|
|
1292
|
-
...clippingAncestor,
|
|
1293
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
1294
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
1295
|
-
};
|
|
1296
|
-
}
|
|
1297
|
-
return rectToClientRect(rect);
|
|
1298
|
-
}
|
|
1299
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
1300
|
-
const parentNode = getParentNode(element);
|
|
1301
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1302
|
-
return false;
|
|
1303
|
-
}
|
|
1304
|
-
return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1308
|
-
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1309
|
-
// of the given element up the tree.
|
|
1310
|
-
function getClippingElementAncestors(element, cache) {
|
|
1311
|
-
const cachedResult = cache.get(element);
|
|
1312
|
-
if (cachedResult) {
|
|
1313
|
-
return cachedResult;
|
|
1314
|
-
}
|
|
1315
|
-
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1316
|
-
let currentContainingBlockComputedStyle = null;
|
|
1317
|
-
const elementIsFixed = getComputedStyle(element).position === 'fixed';
|
|
1318
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1319
|
-
|
|
1320
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1321
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1322
|
-
const computedStyle = getComputedStyle(currentNode);
|
|
1323
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1324
|
-
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1325
|
-
currentContainingBlockComputedStyle = null;
|
|
1326
|
-
}
|
|
1327
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1328
|
-
if (shouldDropCurrentNode) {
|
|
1329
|
-
// Drop non-containing blocks.
|
|
1330
|
-
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1331
|
-
} else {
|
|
1332
|
-
// Record last containing block for next iteration.
|
|
1333
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
1334
|
-
}
|
|
1335
|
-
currentNode = getParentNode(currentNode);
|
|
1336
|
-
}
|
|
1337
|
-
cache.set(element, result);
|
|
1338
|
-
return result;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
// Gets the maximum area that the element is visible in due to any number of
|
|
1342
|
-
// clipping ancestors.
|
|
1343
|
-
function getClippingRect(_ref) {
|
|
1344
|
-
let {
|
|
1345
|
-
element,
|
|
1346
|
-
boundary,
|
|
1347
|
-
rootBoundary,
|
|
1348
|
-
strategy
|
|
1349
|
-
} = _ref;
|
|
1350
|
-
const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1351
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1352
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
1353
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1354
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1355
|
-
accRect.top = max(rect.top, accRect.top);
|
|
1356
|
-
accRect.right = min(rect.right, accRect.right);
|
|
1357
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1358
|
-
accRect.left = max(rect.left, accRect.left);
|
|
1359
|
-
return accRect;
|
|
1360
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1361
|
-
return {
|
|
1362
|
-
width: clippingRect.right - clippingRect.left,
|
|
1363
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
1364
|
-
x: clippingRect.left,
|
|
1365
|
-
y: clippingRect.top
|
|
1366
|
-
};
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
function getDimensions(element) {
|
|
1370
|
-
return getCssDimensions(element);
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1374
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1375
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1376
|
-
const isFixed = strategy === 'fixed';
|
|
1377
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1378
|
-
let scroll = {
|
|
1379
|
-
scrollLeft: 0,
|
|
1380
|
-
scrollTop: 0
|
|
1381
|
-
};
|
|
1382
|
-
const offsets = createCoords(0);
|
|
1383
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1384
|
-
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1385
|
-
scroll = getNodeScroll(offsetParent);
|
|
1386
|
-
}
|
|
1387
|
-
if (isOffsetParentAnElement) {
|
|
1388
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1389
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1390
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1391
|
-
} else if (documentElement) {
|
|
1392
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
return {
|
|
1396
|
-
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
1397
|
-
y: rect.top + scroll.scrollTop - offsets.y,
|
|
1398
|
-
width: rect.width,
|
|
1399
|
-
height: rect.height
|
|
1400
|
-
};
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
1404
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
|
|
1405
|
-
return null;
|
|
1406
|
-
}
|
|
1407
|
-
if (polyfill) {
|
|
1408
|
-
return polyfill(element);
|
|
1409
|
-
}
|
|
1410
|
-
return element.offsetParent;
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1414
|
-
// such as table ancestors and cross browser bugs.
|
|
1415
|
-
function getOffsetParent(element, polyfill) {
|
|
1416
|
-
const window = getWindow(element);
|
|
1417
|
-
if (!isHTMLElement(element)) {
|
|
1418
|
-
return window;
|
|
1419
|
-
}
|
|
1420
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1421
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
|
|
1422
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1423
|
-
}
|
|
1424
|
-
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
1425
|
-
return window;
|
|
1426
|
-
}
|
|
1427
|
-
return offsetParent || getContainingBlock(element) || window;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
const getElementRects = async function (_ref) {
|
|
1431
|
-
let {
|
|
1432
|
-
reference,
|
|
1433
|
-
floating,
|
|
1434
|
-
strategy
|
|
1435
|
-
} = _ref;
|
|
1436
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1437
|
-
const getDimensionsFn = this.getDimensions;
|
|
1438
|
-
return {
|
|
1439
|
-
reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
|
|
1440
|
-
floating: {
|
|
1441
|
-
x: 0,
|
|
1442
|
-
y: 0,
|
|
1443
|
-
...(await getDimensionsFn(floating))
|
|
1444
|
-
}
|
|
1445
|
-
};
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
function isRTL(element) {
|
|
1449
|
-
return getComputedStyle(element).direction === 'rtl';
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
const platform = {
|
|
1453
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1454
|
-
getDocumentElement,
|
|
1455
|
-
getClippingRect,
|
|
1456
|
-
getOffsetParent,
|
|
1457
|
-
getElementRects,
|
|
1458
|
-
getClientRects,
|
|
1459
|
-
getDimensions,
|
|
1460
|
-
getScale,
|
|
1461
|
-
isElement,
|
|
1462
|
-
isRTL
|
|
1463
|
-
};
|
|
1464
|
-
|
|
1465
|
-
// https://samthor.au/2021/observing-dom/
|
|
1466
|
-
function observeMove(element, onMove) {
|
|
1467
|
-
let io = null;
|
|
1468
|
-
let timeoutId;
|
|
1469
|
-
const root = getDocumentElement(element);
|
|
1470
|
-
function cleanup() {
|
|
1471
|
-
clearTimeout(timeoutId);
|
|
1472
|
-
io && io.disconnect();
|
|
1473
|
-
io = null;
|
|
1474
|
-
}
|
|
1475
|
-
function refresh(skip, threshold) {
|
|
1476
|
-
if (skip === void 0) {
|
|
1477
|
-
skip = false;
|
|
1478
|
-
}
|
|
1479
|
-
if (threshold === void 0) {
|
|
1480
|
-
threshold = 1;
|
|
1481
|
-
}
|
|
1482
|
-
cleanup();
|
|
1483
|
-
const {
|
|
1484
|
-
left,
|
|
1485
|
-
top,
|
|
1486
|
-
width,
|
|
1487
|
-
height
|
|
1488
|
-
} = element.getBoundingClientRect();
|
|
1489
|
-
if (!skip) {
|
|
1490
|
-
onMove();
|
|
1491
|
-
}
|
|
1492
|
-
if (!width || !height) {
|
|
1493
|
-
return;
|
|
1494
|
-
}
|
|
1495
|
-
const insetTop = floor(top);
|
|
1496
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
1497
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
1498
|
-
const insetLeft = floor(left);
|
|
1499
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1500
|
-
const options = {
|
|
1501
|
-
rootMargin,
|
|
1502
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
1503
|
-
};
|
|
1504
|
-
let isFirstUpdate = true;
|
|
1505
|
-
function handleObserve(entries) {
|
|
1506
|
-
const ratio = entries[0].intersectionRatio;
|
|
1507
|
-
if (ratio !== threshold) {
|
|
1508
|
-
if (!isFirstUpdate) {
|
|
1509
|
-
return refresh();
|
|
1510
|
-
}
|
|
1511
|
-
if (!ratio) {
|
|
1512
|
-
timeoutId = setTimeout(() => {
|
|
1513
|
-
refresh(false, 1e-7);
|
|
1514
|
-
}, 100);
|
|
1515
|
-
} else {
|
|
1516
|
-
refresh(false, ratio);
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
isFirstUpdate = false;
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
// Older browsers don't support a `document` as the root and will throw an
|
|
1523
|
-
// error.
|
|
1524
|
-
try {
|
|
1525
|
-
io = new IntersectionObserver(handleObserve, {
|
|
1526
|
-
...options,
|
|
1527
|
-
// Handle <iframe>s
|
|
1528
|
-
root: root.ownerDocument
|
|
1529
|
-
});
|
|
1530
|
-
} catch (e) {
|
|
1531
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
1532
|
-
}
|
|
1533
|
-
io.observe(element);
|
|
1534
|
-
}
|
|
1535
|
-
refresh(true);
|
|
1536
|
-
return cleanup;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
/**
|
|
1540
|
-
* Automatically updates the position of the floating element when necessary.
|
|
1541
|
-
* Should only be called when the floating element is mounted on the DOM or
|
|
1542
|
-
* visible on the screen.
|
|
1543
|
-
* @returns cleanup function that should be invoked when the floating element is
|
|
1544
|
-
* removed from the DOM or hidden from the screen.
|
|
1545
|
-
* @see https://floating-ui.com/docs/autoUpdate
|
|
1546
|
-
*/
|
|
1547
|
-
function autoUpdate(reference, floating, update, options) {
|
|
1548
|
-
if (options === void 0) {
|
|
1549
|
-
options = {};
|
|
1550
|
-
}
|
|
1551
|
-
const {
|
|
1552
|
-
ancestorScroll = true,
|
|
1553
|
-
ancestorResize = true,
|
|
1554
|
-
elementResize = typeof ResizeObserver === 'function',
|
|
1555
|
-
layoutShift = typeof IntersectionObserver === 'function',
|
|
1556
|
-
animationFrame = false
|
|
1557
|
-
} = options;
|
|
1558
|
-
const referenceEl = unwrapElement(reference);
|
|
1559
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
1560
|
-
ancestors.forEach(ancestor => {
|
|
1561
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
1562
|
-
passive: true
|
|
1563
|
-
});
|
|
1564
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
|
1565
|
-
});
|
|
1566
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1567
|
-
let reobserveFrame = -1;
|
|
1568
|
-
let resizeObserver = null;
|
|
1569
|
-
if (elementResize) {
|
|
1570
|
-
resizeObserver = new ResizeObserver(_ref => {
|
|
1571
|
-
let [firstEntry] = _ref;
|
|
1572
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
1573
|
-
// Prevent update loops when using the `size` middleware.
|
|
1574
|
-
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
1575
|
-
resizeObserver.unobserve(floating);
|
|
1576
|
-
cancelAnimationFrame(reobserveFrame);
|
|
1577
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
1578
|
-
resizeObserver && resizeObserver.observe(floating);
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
update();
|
|
1582
|
-
});
|
|
1583
|
-
if (referenceEl && !animationFrame) {
|
|
1584
|
-
resizeObserver.observe(referenceEl);
|
|
1585
|
-
}
|
|
1586
|
-
resizeObserver.observe(floating);
|
|
1587
|
-
}
|
|
1588
|
-
let frameId;
|
|
1589
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1590
|
-
if (animationFrame) {
|
|
1591
|
-
frameLoop();
|
|
1592
|
-
}
|
|
1593
|
-
function frameLoop() {
|
|
1594
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
1595
|
-
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
1596
|
-
update();
|
|
1597
|
-
}
|
|
1598
|
-
prevRefRect = nextRefRect;
|
|
1599
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
1600
|
-
}
|
|
1601
|
-
update();
|
|
1602
|
-
return () => {
|
|
1603
|
-
ancestors.forEach(ancestor => {
|
|
1604
|
-
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
1605
|
-
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
1606
|
-
});
|
|
1607
|
-
cleanupIo && cleanupIo();
|
|
1608
|
-
resizeObserver && resizeObserver.disconnect();
|
|
1609
|
-
resizeObserver = null;
|
|
1610
|
-
if (animationFrame) {
|
|
1611
|
-
cancelAnimationFrame(frameId);
|
|
1612
|
-
}
|
|
1613
|
-
};
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
/**
|
|
1617
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1618
|
-
* next to a reference element when it is given a certain CSS positioning
|
|
1619
|
-
* strategy.
|
|
1620
|
-
*/
|
|
1621
|
-
const computePosition = (reference, floating, options) => {
|
|
1622
|
-
// This caches the expensive `getClippingElementAncestors` function so that
|
|
1623
|
-
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1624
|
-
// single call. If other functions become expensive, we can add them as well.
|
|
1625
|
-
const cache = new Map();
|
|
1626
|
-
const mergedOptions = {
|
|
1627
|
-
platform,
|
|
1628
|
-
...options
|
|
1629
|
-
};
|
|
1630
|
-
const platformWithCache = {
|
|
1631
|
-
...mergedOptions.platform,
|
|
1632
|
-
_c: cache
|
|
1633
|
-
};
|
|
1634
|
-
return computePosition$1(reference, floating, {
|
|
1635
|
-
...mergedOptions,
|
|
1636
|
-
platform: platformWithCache
|
|
1637
|
-
});
|
|
1638
|
-
};
|
|
1639
|
-
|
|
1640
|
-
/**
|
|
1641
|
-
* Provides data to position an inner element of the floating element so that it
|
|
1642
|
-
* appears centered to the reference element.
|
|
1643
|
-
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
1644
|
-
* @see https://floating-ui.com/docs/arrow
|
|
1645
|
-
*/
|
|
1646
|
-
const arrow = options => {
|
|
1647
|
-
function isRef(value) {
|
|
1648
|
-
return {}.hasOwnProperty.call(value, 'current');
|
|
1649
|
-
}
|
|
1650
|
-
return {
|
|
1651
|
-
name: 'arrow',
|
|
1652
|
-
options,
|
|
1653
|
-
fn(state) {
|
|
1654
|
-
const {
|
|
1655
|
-
element,
|
|
1656
|
-
padding
|
|
1657
|
-
} = typeof options === 'function' ? options(state) : options;
|
|
1658
|
-
if (element && isRef(element)) {
|
|
1659
|
-
if (element.current != null) {
|
|
1660
|
-
return arrow$1({
|
|
1661
|
-
element: element.current,
|
|
1662
|
-
padding
|
|
1663
|
-
}).fn(state);
|
|
1664
|
-
}
|
|
1665
|
-
return {};
|
|
1666
|
-
} else if (element) {
|
|
1667
|
-
return arrow$1({
|
|
1668
|
-
element,
|
|
1669
|
-
padding
|
|
1670
|
-
}).fn(state);
|
|
1671
|
-
}
|
|
1672
|
-
return {};
|
|
1673
|
-
}
|
|
1674
|
-
};
|
|
1675
|
-
};
|
|
1676
|
-
|
|
1677
|
-
var index = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
1678
|
-
|
|
1679
|
-
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
|
|
1680
|
-
// functions
|
|
1681
|
-
function deepEqual(a, b) {
|
|
1682
|
-
if (a === b) {
|
|
1683
|
-
return true;
|
|
1684
|
-
}
|
|
1685
|
-
if (typeof a !== typeof b) {
|
|
1686
|
-
return false;
|
|
1687
|
-
}
|
|
1688
|
-
if (typeof a === 'function' && a.toString() === b.toString()) {
|
|
1689
|
-
return true;
|
|
1690
|
-
}
|
|
1691
|
-
let length, i, keys;
|
|
1692
|
-
if (a && b && typeof a == 'object') {
|
|
1693
|
-
if (Array.isArray(a)) {
|
|
1694
|
-
length = a.length;
|
|
1695
|
-
if (length != b.length) return false;
|
|
1696
|
-
for (i = length; i-- !== 0;) {
|
|
1697
|
-
if (!deepEqual(a[i], b[i])) {
|
|
1698
|
-
return false;
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
return true;
|
|
1702
|
-
}
|
|
1703
|
-
keys = Object.keys(a);
|
|
1704
|
-
length = keys.length;
|
|
1705
|
-
if (length !== Object.keys(b).length) {
|
|
1706
|
-
return false;
|
|
1707
|
-
}
|
|
1708
|
-
for (i = length; i-- !== 0;) {
|
|
1709
|
-
if (!{}.hasOwnProperty.call(b, keys[i])) {
|
|
1710
|
-
return false;
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
for (i = length; i-- !== 0;) {
|
|
1714
|
-
const key = keys[i];
|
|
1715
|
-
if (key === '_owner' && a.$$typeof) {
|
|
1716
|
-
continue;
|
|
1717
|
-
}
|
|
1718
|
-
if (!deepEqual(a[key], b[key])) {
|
|
1719
|
-
return false;
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
return true;
|
|
1723
|
-
}
|
|
1724
|
-
return a !== a && b !== b;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
function getDPR(element) {
|
|
1728
|
-
if (typeof window === 'undefined') {
|
|
1729
|
-
return 1;
|
|
1730
|
-
}
|
|
1731
|
-
const win = element.ownerDocument.defaultView || window;
|
|
1732
|
-
return win.devicePixelRatio || 1;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
function roundByDPR(element, value) {
|
|
1736
|
-
const dpr = getDPR(element);
|
|
1737
|
-
return Math.round(value * dpr) / dpr;
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
function useLatestRef(value) {
|
|
1741
|
-
const ref = React__namespace.useRef(value);
|
|
1742
|
-
index(() => {
|
|
1743
|
-
ref.current = value;
|
|
1744
|
-
});
|
|
1745
|
-
return ref;
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
/**
|
|
1749
|
-
* Provides data to position a floating element.
|
|
1750
|
-
* @see https://floating-ui.com/docs/react
|
|
1751
|
-
*/
|
|
1752
|
-
function useFloating(options) {
|
|
1753
|
-
if (options === void 0) {
|
|
1754
|
-
options = {};
|
|
1755
|
-
}
|
|
1756
|
-
const {
|
|
1757
|
-
placement = 'bottom',
|
|
1758
|
-
strategy = 'absolute',
|
|
1759
|
-
middleware = [],
|
|
1760
|
-
platform,
|
|
1761
|
-
elements: {
|
|
1762
|
-
reference: externalReference,
|
|
1763
|
-
floating: externalFloating
|
|
1764
|
-
} = {},
|
|
1765
|
-
transform = true,
|
|
1766
|
-
whileElementsMounted,
|
|
1767
|
-
open
|
|
1768
|
-
} = options;
|
|
1769
|
-
const [data, setData] = React__namespace.useState({
|
|
1770
|
-
x: 0,
|
|
1771
|
-
y: 0,
|
|
1772
|
-
strategy,
|
|
1773
|
-
placement,
|
|
1774
|
-
middlewareData: {},
|
|
1775
|
-
isPositioned: false
|
|
1776
|
-
});
|
|
1777
|
-
const [latestMiddleware, setLatestMiddleware] = React__namespace.useState(middleware);
|
|
1778
|
-
if (!deepEqual(latestMiddleware, middleware)) {
|
|
1779
|
-
setLatestMiddleware(middleware);
|
|
1780
|
-
}
|
|
1781
|
-
const [_reference, _setReference] = React__namespace.useState(null);
|
|
1782
|
-
const [_floating, _setFloating] = React__namespace.useState(null);
|
|
1783
|
-
const setReference = React__namespace.useCallback(node => {
|
|
1784
|
-
if (node != referenceRef.current) {
|
|
1785
|
-
referenceRef.current = node;
|
|
1786
|
-
_setReference(node);
|
|
1787
|
-
}
|
|
1788
|
-
}, [_setReference]);
|
|
1789
|
-
const setFloating = React__namespace.useCallback(node => {
|
|
1790
|
-
if (node !== floatingRef.current) {
|
|
1791
|
-
floatingRef.current = node;
|
|
1792
|
-
_setFloating(node);
|
|
1793
|
-
}
|
|
1794
|
-
}, [_setFloating]);
|
|
1795
|
-
const referenceEl = externalReference || _reference;
|
|
1796
|
-
const floatingEl = externalFloating || _floating;
|
|
1797
|
-
const referenceRef = React__namespace.useRef(null);
|
|
1798
|
-
const floatingRef = React__namespace.useRef(null);
|
|
1799
|
-
const dataRef = React__namespace.useRef(data);
|
|
1800
|
-
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
1801
|
-
const platformRef = useLatestRef(platform);
|
|
1802
|
-
const update = React__namespace.useCallback(() => {
|
|
1803
|
-
if (!referenceRef.current || !floatingRef.current) {
|
|
1804
|
-
return;
|
|
1805
|
-
}
|
|
1806
|
-
const config = {
|
|
1807
|
-
placement,
|
|
1808
|
-
strategy,
|
|
1809
|
-
middleware: latestMiddleware
|
|
1810
|
-
};
|
|
1811
|
-
if (platformRef.current) {
|
|
1812
|
-
config.platform = platformRef.current;
|
|
1813
|
-
}
|
|
1814
|
-
computePosition(referenceRef.current, floatingRef.current, config).then(data => {
|
|
1815
|
-
const fullData = {
|
|
1816
|
-
...data,
|
|
1817
|
-
isPositioned: true
|
|
1818
|
-
};
|
|
1819
|
-
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
1820
|
-
dataRef.current = fullData;
|
|
1821
|
-
ReactDOM__namespace.flushSync(() => {
|
|
1822
|
-
setData(fullData);
|
|
1823
|
-
});
|
|
1824
|
-
}
|
|
1825
|
-
});
|
|
1826
|
-
}, [latestMiddleware, placement, strategy, platformRef]);
|
|
1827
|
-
index(() => {
|
|
1828
|
-
if (open === false && dataRef.current.isPositioned) {
|
|
1829
|
-
dataRef.current.isPositioned = false;
|
|
1830
|
-
setData(data => ({
|
|
1831
|
-
...data,
|
|
1832
|
-
isPositioned: false
|
|
1833
|
-
}));
|
|
1834
|
-
}
|
|
1835
|
-
}, [open]);
|
|
1836
|
-
const isMountedRef = React__namespace.useRef(false);
|
|
1837
|
-
index(() => {
|
|
1838
|
-
isMountedRef.current = true;
|
|
1839
|
-
return () => {
|
|
1840
|
-
isMountedRef.current = false;
|
|
1841
|
-
};
|
|
1842
|
-
}, []);
|
|
1843
|
-
index(() => {
|
|
1844
|
-
if (referenceEl) referenceRef.current = referenceEl;
|
|
1845
|
-
if (floatingEl) floatingRef.current = floatingEl;
|
|
1846
|
-
if (referenceEl && floatingEl) {
|
|
1847
|
-
if (whileElementsMountedRef.current) {
|
|
1848
|
-
return whileElementsMountedRef.current(referenceEl, floatingEl, update);
|
|
1849
|
-
} else {
|
|
1850
|
-
update();
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
}, [referenceEl, floatingEl, update, whileElementsMountedRef]);
|
|
1854
|
-
const refs = React__namespace.useMemo(() => ({
|
|
1855
|
-
reference: referenceRef,
|
|
1856
|
-
floating: floatingRef,
|
|
1857
|
-
setReference,
|
|
1858
|
-
setFloating
|
|
1859
|
-
}), [setReference, setFloating]);
|
|
1860
|
-
const elements = React__namespace.useMemo(() => ({
|
|
1861
|
-
reference: referenceEl,
|
|
1862
|
-
floating: floatingEl
|
|
1863
|
-
}), [referenceEl, floatingEl]);
|
|
1864
|
-
const floatingStyles = React__namespace.useMemo(() => {
|
|
1865
|
-
const initialStyles = {
|
|
1866
|
-
position: strategy,
|
|
1867
|
-
left: 0,
|
|
1868
|
-
top: 0
|
|
1869
|
-
};
|
|
1870
|
-
if (!elements.floating) {
|
|
1871
|
-
return initialStyles;
|
|
1872
|
-
}
|
|
1873
|
-
const x = roundByDPR(elements.floating, data.x);
|
|
1874
|
-
const y = roundByDPR(elements.floating, data.y);
|
|
1875
|
-
if (transform) {
|
|
1876
|
-
return {
|
|
1877
|
-
...initialStyles,
|
|
1878
|
-
transform: "translate(" + x + "px, " + y + "px)",
|
|
1879
|
-
...(getDPR(elements.floating) >= 1.5 && {
|
|
1880
|
-
willChange: 'transform'
|
|
1881
|
-
})
|
|
1882
|
-
};
|
|
1883
|
-
}
|
|
1884
|
-
return {
|
|
1885
|
-
position: strategy,
|
|
1886
|
-
left: x,
|
|
1887
|
-
top: y
|
|
1888
|
-
};
|
|
1889
|
-
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
1890
|
-
return React__namespace.useMemo(() => ({
|
|
1891
|
-
...data,
|
|
1892
|
-
update,
|
|
1893
|
-
refs,
|
|
1894
|
-
elements,
|
|
1895
|
-
floatingStyles
|
|
1896
|
-
}), [data, update, refs, elements, floatingStyles]);
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
exports.arrow = arrow;
|
|
1900
|
-
exports.autoUpdate = autoUpdate;
|
|
1901
|
-
exports.flip = flip;
|
|
1902
|
-
exports.hide = hide;
|
|
1903
|
-
exports.limitShift = limitShift;
|
|
1904
|
-
exports.offset = offset;
|
|
1905
|
-
exports.shift = shift;
|
|
1906
|
-
exports.size = size;
|
|
1907
|
-
exports.useFloating = useFloating;
|