@arc-ui/components 12.0.0-beta.5 → 12.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert/Alert.cjs.js +9 -10
- package/dist/Alert/Alert.esm.js +4 -5
- package/dist/Alert/styles.css +1 -0
- package/dist/Align/Align.cjs.js +7 -8
- package/dist/Align/Align.esm.js +1 -2
- package/dist/Align/styles.css +1 -0
- package/dist/AppButton/AppButton.cjs.js +4 -3
- package/dist/AppButton/AppButton.esm.js +4 -3
- package/dist/AppButton/styles.css +1 -0
- package/dist/Avatar/Avatar.cjs.js +7 -8
- package/dist/Avatar/Avatar.esm.js +7 -8
- package/dist/Avatar/styles.css +1 -0
- package/dist/AvatarGroup/AvatarGroup.cjs.js +14 -15
- package/dist/AvatarGroup/AvatarGroup.esm.js +7 -8
- package/dist/AvatarGroup/styles.css +1 -0
- package/dist/Badge/Badge.cjs.js +4 -5
- package/dist/Badge/Badge.esm.js +1 -2
- package/dist/Badge/styles.css +1 -0
- package/dist/Box/Box.cjs.js +6 -6
- package/dist/Box/Box.esm.js +2 -2
- package/dist/Box/styles.css +1 -0
- package/dist/BrandLogo/BrandLogo.cjs.js +3 -4
- package/dist/BrandLogo/BrandLogo.esm.js +3 -4
- package/dist/BrandLogo/styles.css +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +4 -5
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +4 -5
- package/dist/Breadcrumbs/styles.css +1 -0
- package/dist/Button/Button.cjs.js +5 -6
- package/dist/Button/Button.esm.js +5 -6
- package/dist/Button/styles.css +1 -0
- package/dist/ButtonV2/ButtonV2.cjs.js +4 -5
- package/dist/ButtonV2/ButtonV2.esm.js +4 -5
- package/dist/ButtonV2/styles.css +1 -0
- package/dist/Calendar/Calendar.cjs.js +9 -10
- package/dist/Calendar/Calendar.esm.js +9 -10
- package/dist/Calendar/styles.css +1 -0
- package/dist/CardFooter/CardFooter.cjs.js +17 -0
- package/dist/CardFooter/CardFooter.esm.js +9 -0
- package/dist/CardFooter/package.json +7 -0
- package/dist/CardFooter/styles.css +1 -0
- package/dist/CardHeading/CardHeading.cjs.js +14 -0
- package/dist/CardHeading/CardHeading.esm.js +6 -0
- package/dist/CardHeading/package.json +7 -0
- package/dist/CardHeading/styles.css +1 -0
- package/dist/Checkbox/Checkbox.cjs.js +8 -9
- package/dist/Checkbox/Checkbox.esm.js +8 -9
- package/dist/Checkbox/styles.css +1 -0
- package/dist/Columns/Columns.cjs.js +2 -3
- package/dist/Columns/Columns.esm.js +2 -3
- package/dist/Columns/styles.css +1 -0
- package/dist/ConditionalWrapper/ConditionalWrapper.cjs.js +10 -0
- package/dist/ConditionalWrapper/ConditionalWrapper.esm.js +2 -0
- package/dist/ConditionalWrapper/package.json +7 -0
- package/dist/DatePicker/DatePicker.cjs.js +18 -22
- package/dist/DatePicker/DatePicker.esm.js +18 -22
- package/dist/DatePicker/styles.css +1 -0
- package/dist/Disclosure/Disclosure.cjs.js +8 -9
- package/dist/Disclosure/Disclosure.esm.js +4 -5
- package/dist/Disclosure/styles.css +1 -0
- package/dist/DisclosureMini/DisclosureMini.cjs.js +5 -6
- package/dist/DisclosureMini/DisclosureMini.esm.js +5 -6
- package/dist/DisclosureMini/styles.css +1 -0
- package/dist/Elevation/Elevation.cjs.js +5 -5
- package/dist/Elevation/Elevation.esm.js +1 -1
- package/dist/Elevation/styles.css +1 -0
- package/dist/Filter/Filter.cjs.js +4 -4
- package/dist/Filter/Filter.esm.js +4 -4
- package/dist/Filter/styles.css +1 -0
- package/dist/FormControl/FormControl.cjs.js +7 -8
- package/dist/FormControl/FormControl.esm.js +7 -8
- package/dist/FormControl/styles.css +1 -0
- package/dist/Grid/Grid.cjs.js +2 -3
- package/dist/Grid/Grid.esm.js +2 -3
- package/dist/Grid/styles.css +1 -0
- package/dist/Group/Group.cjs.js +3 -3
- package/dist/Group/Group.esm.js +3 -3
- package/dist/Group/styles.css +1 -0
- package/dist/Heading/Heading.cjs.js +3 -4
- package/dist/Heading/Heading.esm.js +3 -4
- package/dist/Heading/styles.css +1 -0
- package/dist/HeroButton/HeroButton.cjs.js +4 -5
- package/dist/HeroButton/HeroButton.esm.js +4 -5
- package/dist/HeroButton/styles.css +1 -0
- package/dist/Hidden/Hidden.cjs.js +5 -5
- package/dist/Hidden/Hidden.esm.js +1 -1
- package/dist/Hidden/styles.css +1 -0
- package/dist/Icon/Icon.cjs.js +3 -4
- package/dist/Icon/Icon.esm.js +3 -4
- package/dist/Icon/styles.css +1 -0
- package/dist/Image/Image.cjs.js +2 -3
- package/dist/Image/Image.esm.js +2 -3
- package/dist/Image/styles.css +1 -0
- package/dist/ImpactCard/ImpactCard.cjs.js +15 -15
- package/dist/ImpactCard/ImpactCard.esm.js +9 -9
- package/dist/ImpactCard/styles.css +1 -0
- package/dist/InformationCard/InformationCard.cjs.js +25 -25
- package/dist/InformationCard/InformationCard.esm.js +13 -13
- package/dist/InformationCard/styles.css +1 -0
- package/dist/Link/Link.cjs.js +11 -12
- package/dist/Link/Link.esm.js +4 -5
- package/dist/Link/styles.css +1 -0
- package/dist/Markup/Markup.cjs.js +6 -6
- package/dist/Markup/Markup.esm.js +2 -2
- package/dist/Markup/styles.css +1 -0
- package/dist/MediaCard/MediaCard.cjs.js +14 -14
- package/dist/MediaCard/MediaCard.esm.js +14 -14
- package/dist/MediaCard/styles.css +1 -0
- package/dist/Modal/Modal.cjs.js +43 -1200
- package/dist/Modal/Modal.esm.js +12 -1168
- package/dist/Modal/styles.css +1 -0
- package/dist/Pagination/Pagination.cjs.js +12 -13
- package/dist/Pagination/Pagination.esm.js +3 -4
- package/dist/Pagination/styles.css +1 -0
- package/dist/PaginationSimple/PaginationSimple.cjs.js +9 -10
- package/dist/PaginationSimple/PaginationSimple.esm.js +3 -4
- package/dist/PaginationSimple/styles.css +1 -0
- package/dist/Poster/Poster.cjs.js +4 -5
- package/dist/Poster/Poster.esm.js +4 -5
- package/dist/Poster/styles.css +1 -0
- package/dist/ProgressBar/ProgressBar.cjs.js +12 -13
- package/dist/ProgressBar/ProgressBar.esm.js +6 -7
- package/dist/ProgressBar/styles.css +1 -0
- package/dist/ProgressStepper/ProgressStepper.cjs.js +5 -6
- package/dist/ProgressStepper/ProgressStepper.esm.js +5 -6
- package/dist/ProgressStepper/styles.css +1 -0
- package/dist/RadioGroup/RadioGroup.cjs.js +8 -9
- package/dist/RadioGroup/RadioGroup.esm.js +8 -9
- package/dist/RadioGroup/styles.css +1 -0
- package/dist/Rule/Rule.cjs.js +5 -5
- package/dist/Rule/Rule.esm.js +2 -2
- package/dist/Rule/styles.css +1 -0
- package/dist/ScrollToTop/ScrollToTop.cjs.js +8 -9
- package/dist/ScrollToTop/ScrollToTop.esm.js +3 -4
- package/dist/ScrollToTop/styles.css +1 -0
- package/dist/Section/Section.cjs.js +2 -2
- package/dist/Section/Section.esm.js +2 -2
- package/dist/Section/styles.css +1 -0
- package/dist/Select/Select.cjs.js +1165 -91
- package/dist/Select/Select.esm.js +1076 -21
- package/dist/Select/styles.css +1 -0
- package/dist/SiteFooter/SiteFooter.cjs.js +7 -8
- package/dist/SiteFooter/SiteFooter.esm.js +7 -8
- package/dist/SiteFooter/styles.css +1 -0
- package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +10 -12
- package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +10 -12
- package/dist/SiteHeaderV2/styles.css +1 -0
- package/dist/SkipLink/SkipLink.cjs.js +4 -4
- package/dist/SkipLink/SkipLink.esm.js +3 -3
- package/dist/SkipLink/styles.css +1 -0
- package/dist/Surface/Surface.cjs.js +2 -2
- package/dist/Surface/Surface.esm.js +2 -2
- package/dist/Surface/styles.css +1 -0
- package/dist/Switch/Switch.cjs.js +16 -18
- package/dist/Switch/Switch.esm.js +12 -14
- package/dist/Switch/styles.css +1 -0
- package/dist/Tabs/Tabs.cjs.js +9 -11
- package/dist/Tabs/Tabs.esm.js +9 -11
- package/dist/Tabs/styles.css +1 -0
- package/dist/Tag/Tag.cjs.js +5 -6
- package/dist/Tag/Tag.esm.js +5 -6
- package/dist/Tag/styles.css +1 -0
- package/dist/Text/Text.cjs.js +3 -4
- package/dist/Text/Text.esm.js +3 -4
- package/dist/Text/styles.css +1 -0
- package/dist/TextArea/TextArea.cjs.js +55 -56
- package/dist/TextArea/TextArea.esm.js +51 -52
- package/dist/TextArea/styles.css +1 -0
- package/dist/TextInput/TextInput.cjs.js +9 -10
- package/dist/TextInput/TextInput.esm.js +9 -10
- package/dist/TextInput/styles.css +1 -0
- package/dist/Theme/Theme.cjs.js +5 -5
- package/dist/Theme/Theme.esm.js +1 -1
- package/dist/Theme/styles.css +1 -0
- package/dist/ThemeIcon/ThemeIcon.cjs.js +3 -4
- package/dist/ThemeIcon/ThemeIcon.esm.js +3 -4
- package/dist/ThemeIcon/styles.css +1 -0
- package/dist/Toast/Toast.cjs.js +8 -10
- package/dist/Toast/Toast.esm.js +8 -10
- package/dist/Toast/styles.css +1 -0
- package/dist/Truncate/Truncate.cjs.js +3 -3
- package/dist/Truncate/Truncate.esm.js +1 -1
- package/dist/Truncate/styles.css +1 -0
- package/dist/TypographyCard/TypographyCard.cjs.js +13 -13
- package/dist/TypographyCard/TypographyCard.esm.js +8 -8
- package/dist/TypographyCard/styles.css +1 -0
- package/dist/UniversalHeader/UniversalHeader.cjs.js +3 -3
- package/dist/UniversalHeader/UniversalHeader.esm.js +3 -3
- package/dist/UniversalHeader/styles.css +1 -0
- package/dist/VerticalSpace/VerticalSpace.cjs.js +2 -2
- package/dist/VerticalSpace/VerticalSpace.esm.js +2 -2
- package/dist/VerticalSpace/styles.css +1 -0
- package/dist/VideoPlayer/VideoPlayer.cjs.js +11 -12
- package/dist/VideoPlayer/VideoPlayer.esm.js +8 -9
- package/dist/VideoPlayer/styles.css +1 -0
- package/dist/Visible/Visible.cjs.js +5 -5
- package/dist/Visible/Visible.esm.js +1 -1
- package/dist/Visible/styles.css +1 -0
- package/dist/VisuallyHidden/VisuallyHidden.cjs.js +2 -1
- package/dist/VisuallyHidden/VisuallyHidden.esm.js +2 -1
- package/dist/VisuallyHidden/styles.css +1 -0
- package/dist/_shared/cjs/{Avatar-fc0d9b8b.js → Avatar-9277512a.js} +11 -12
- package/dist/_shared/cjs/{BrandLogo-1d2ca2c7.js → BrandLogo-ce65cd74.js} +7 -8
- package/dist/_shared/cjs/{Breadcrumbs-7af0af2c.js → Breadcrumbs-c7821aa9.js} +12 -12
- package/dist/_shared/cjs/{BtIconArrowRight.esm-5989f2ca.js → BtIconArrowRight.esm-6053bb79.js} +0 -8
- package/dist/_shared/cjs/{Button-7d891a89.js → Button-ea665c9c.js} +12 -13
- package/dist/_shared/cjs/{ButtonV2-b2db3f46.js → ButtonV2-373877da.js} +11 -11
- package/dist/_shared/cjs/{Calendar-649cc139.js → Calendar-e5184158.js} +912 -912
- package/dist/_shared/cjs/{CardFooter-5414bc4f.js → CardFooter-a1bb3ded.js} +3 -3
- package/dist/_shared/cjs/CardHeading-3ddcf774.js +16 -0
- package/dist/_shared/cjs/{Checkbox-0e423653.js → Checkbox-850dcf99.js} +11 -11
- package/dist/_shared/cjs/{Columns-1224bdff.js → Columns-5c6bab74.js} +9 -10
- package/dist/_shared/cjs/Combination-854a36ce.js +1203 -0
- package/dist/_shared/cjs/DatePicker-2bf10a10.js +956 -0
- package/dist/_shared/cjs/{DisclosureMini-c01ecce0.js → DisclosureMini-c730c24d.js} +10 -10
- package/dist/_shared/cjs/{Filter-3b897d92.js → Filter-c42eee70.js} +14 -14
- package/dist/_shared/cjs/{FormControl-88d48f42.js → FormControl-5c963e6e.js} +12 -12
- package/dist/_shared/cjs/{Grid-9e91fb3d.js → Grid-69ed0e5c.js} +10 -11
- package/dist/_shared/cjs/{Group-3d5ea240.js → Group-5233a907.js} +9 -9
- package/dist/_shared/cjs/{Heading-fb63844f.js → Heading-14378b72.js} +7 -8
- package/dist/_shared/cjs/{HeroButton-0586a7c4.js → HeroButton-db7d03d6.js} +11 -11
- package/dist/_shared/cjs/{Icon-0ec0c1fb.js → Icon-7f1e8a19.js} +8 -9
- package/dist/_shared/cjs/{Image-e9a5a326.js → Image-c8969ad9.js} +9 -10
- package/dist/_shared/cjs/{MediaCard-8f41b411.js → MediaCard-4ff9f5c0.js} +18 -18
- package/dist/_shared/cjs/{Poster-b7242b37.js → Poster-8fba5492.js} +13 -14
- package/dist/_shared/cjs/{ProgressStepper-fb8405c2.js → ProgressStepper-aaff6b51.js} +13 -13
- package/dist/_shared/cjs/{RadioGroup-a4186267.js → RadioGroup-6142dceb.js} +14 -14
- package/dist/_shared/cjs/{Section-ecfc659b.js → Section-46646353.js} +5 -5
- package/dist/_shared/cjs/{SiteFooter-7c4072b5.js → SiteFooter-cfe7163f.js} +11 -11
- package/dist/_shared/cjs/{SiteHeaderV2-94687999.js → SiteHeaderV2-043d976a.js} +63 -65
- package/dist/_shared/cjs/Surface-7500f314.js +174 -0
- package/dist/_shared/cjs/{Tabs-75c34f43.js → Tabs-bd1f208d.js} +24 -25
- package/dist/_shared/cjs/{Tag-452048f6.js → Tag-4eb2ed9e.js} +8 -8
- package/dist/_shared/cjs/{Text-1c1110a4.js → Text-284a7314.js} +7 -8
- package/dist/_shared/cjs/{TextInput-762e2309.js → TextInput-bcc3f86c.js} +12 -12
- package/dist/_shared/cjs/{ThemeIcon-ee814862.js → ThemeIcon-c3dc056d.js} +8 -9
- package/dist/_shared/cjs/{Toast-d06a89e0.js → Toast-69020185.js} +16 -17
- package/dist/_shared/cjs/{UniversalHeader-f6d9c63a.js → UniversalHeader-07be88fd.js} +6 -6
- package/dist/_shared/cjs/{VerticalSpace-e128ec68.js → VerticalSpace-973deefe.js} +5 -5
- package/dist/_shared/cjs/{VisuallyHidden-b0de4c7b.js → VisuallyHidden-25393f58.js} +3 -2
- package/dist/_shared/cjs/{component-df82bc05.js → component-4e71e3d3.js} +4 -4
- package/dist/_shared/cjs/{Combination-3a639f6d.js → floating-ui.react-dom-08b8b87c.js} +37 -1103
- package/dist/_shared/cjs/{index-7aa7f96a.js → index-568bc1da.js} +8 -1
- package/dist/_shared/cjs/{index-0c6319ec.js → index-677557a4.js} +1 -1
- package/dist/_shared/cjs/{index-3d629205.js → index-6cbaf5e0.js} +19 -1
- package/dist/_shared/cjs/{index-41b09e85.js → index-c137700a.js} +20 -1
- package/dist/_shared/cjs/{index-996dec94.js → index-dbab0ad6.js} +1 -1
- package/dist/_shared/cjs/{index.es-16759329.js → index.es-ba095ee5.js} +1 -1
- package/dist/_shared/cjs/{index-df60851b.js → index.es-c26e8978.js} +20 -6
- package/dist/_shared/esm/{Avatar-38cc0595.js → Avatar-b5ac0a89.js} +5 -6
- package/dist/_shared/esm/{BrandLogo-7ed8aeda.js → BrandLogo-fb863b5b.js} +2 -3
- package/dist/_shared/esm/{Breadcrumbs-9078b68e.js → Breadcrumbs-01ebed9b.js} +8 -8
- package/dist/_shared/esm/BtIconArrowRight.esm-93da96bb.js +24 -0
- package/dist/_shared/esm/{Button-dde2b46a.js → Button-1491784f.js} +4 -5
- package/dist/_shared/esm/{ButtonV2-49cd0615.js → ButtonV2-f9019e00.js} +3 -3
- package/dist/_shared/esm/{Calendar-60591442.js → Calendar-5c2fb044.js} +889 -889
- package/dist/_shared/esm/{CardFooter-c79fb2db.js → CardFooter-e4380cda.js} +3 -3
- package/dist/_shared/esm/CardHeading-4223432d.js +10 -0
- package/dist/_shared/esm/{Checkbox-0baca464.js → Checkbox-97def257.js} +5 -5
- package/dist/_shared/esm/{Columns-6a8f6fbb.js → Columns-9aa5df4a.js} +1 -2
- package/dist/_shared/esm/Combination-2af75870.js +1163 -0
- package/dist/_shared/esm/DatePicker-2d891441.js +927 -0
- package/dist/_shared/esm/{DisclosureMini-38f4c459.js → DisclosureMini-6292f721.js} +4 -4
- package/dist/_shared/esm/{Filter-49dcf5ce.js → Filter-71e06965.js} +11 -11
- package/dist/_shared/esm/{FormControl-d873f7fa.js → FormControl-e0acdf7a.js} +5 -5
- package/dist/_shared/esm/{Grid-fb9fc522.js → Grid-727d05d6.js} +1 -2
- package/dist/_shared/esm/{Group-66196f07.js → Group-b1b14ab4.js} +2 -2
- package/dist/_shared/esm/{Heading-906c7c7c.js → Heading-0dfbdb24.js} +2 -3
- package/dist/_shared/esm/{HeroButton-7ea692bf.js → HeroButton-bb983125.js} +3 -3
- package/dist/_shared/esm/{Icon-512f834f.js → Icon-428e8061.js} +2 -3
- package/dist/_shared/esm/{Image-57d08939.js → Image-c1dc10b5.js} +1 -2
- package/dist/_shared/esm/{MediaCard-c12d89ea.js → MediaCard-d83b5561.js} +10 -10
- package/dist/_shared/esm/{Poster-e05a8b45.js → Poster-ac72059a.js} +4 -5
- package/dist/_shared/esm/{ProgressStepper-189ed0f9.js → ProgressStepper-e3e7b392.js} +4 -4
- package/dist/_shared/esm/{RadioGroup-8ff17cbb.js → RadioGroup-0d337240.js} +7 -7
- package/dist/_shared/esm/{Section-1acbc06a.js → Section-c1dc6e37.js} +1 -1
- package/dist/_shared/esm/{SiteFooter-b65497e8.js → SiteFooter-7e924fb4.js} +6 -6
- package/dist/_shared/esm/{SiteHeaderV2-784b3bf8.js → SiteHeaderV2-94b9a407.js} +9 -11
- package/dist/_shared/esm/Surface-c425e5e6.js +164 -0
- package/dist/_shared/esm/{Tabs-21ac7dfe.js → Tabs-028cee5d.js} +10 -11
- package/dist/_shared/esm/{Tag-2513c185.js → Tag-1ae027ee.js} +4 -4
- package/dist/_shared/esm/{Text-a46fb76b.js → Text-96d8a35f.js} +2 -3
- package/dist/_shared/esm/{TextInput-94c7b1a4.js → TextInput-8e3b81bf.js} +5 -5
- package/dist/_shared/esm/{ThemeIcon-c2dc41a6.js → ThemeIcon-9fac63d0.js} +2 -3
- package/dist/_shared/esm/{Toast-de6ca2f3.js → Toast-ebe2cd97.js} +6 -7
- package/dist/_shared/esm/{UniversalHeader-456ad60c.js → UniversalHeader-22ff848b.js} +3 -3
- package/dist/_shared/esm/{VerticalSpace-b07cd8e6.js → VerticalSpace-6a3533db.js} +1 -1
- package/dist/_shared/esm/VisuallyHidden-cf45ac18.js +12 -0
- package/dist/_shared/esm/{component-d0a555cf.js → component-3e60a45e.js} +1 -1
- package/dist/_shared/esm/{Combination-ae3a3f08.js → floating-ui.react-dom-1bb71aae.js} +15 -1079
- package/dist/_shared/esm/{index-cace3545.js → index-3a2c1ceb.js} +25 -25
- package/dist/_shared/esm/{index-f97466e9.js → index-61497bd9.js} +1 -1
- package/dist/_shared/esm/{index-605031ca.js → index-ce6dee84.js} +53 -53
- package/dist/_shared/esm/{index-4e58de24.js → index-cf208294.js} +21 -3
- package/dist/_shared/esm/{index-fa93ec97.js → index-d083425f.js} +1 -1
- package/dist/_shared/esm/index-f6cc48d2.js +41 -0
- package/dist/_shared/esm/{index-7740883c.js → index-fb8b9df7.js} +9 -2
- package/dist/_shared/esm/{index-288c66b5.js → index.es-5496ec12.js} +20 -6
- package/dist/_shared/esm/{index.es-1b6d33c2.js → index.es-974af4a2.js} +1 -1
- package/dist/index.es.js +8433 -7929
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +8417 -7913
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3 -3
- package/dist/types/components/CardHeading/index.d.ts +1 -0
- package/dist/types/components/ImpactCard/ImpactCard.d.ts +2 -2
- package/dist/types/components/MediaCard/MediaCard.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +4 -0
- package/dist/types/components/TypographyCard/TypographyCard.d.ts +2 -2
- package/dist/types/helpers/index.d.ts +0 -2
- package/dist/types/styles.d.ts +3 -3
- package/package.json +17 -12
- package/dist/_shared/cjs/DatePicker-2417e55b.js +0 -550
- package/dist/_shared/cjs/Surface-8599dbe4.js +0 -57
- package/dist/_shared/cjs/index-039a9d35.js +0 -23
- package/dist/_shared/cjs/index-28447df0.js +0 -23
- package/dist/_shared/cjs/index-dcfdd5da.js +0 -11
- package/dist/_shared/cjs/suffix-modifier-c8a34402.js +0 -19
- package/dist/_shared/esm/BtIconArrowRight.esm-6a17d0ce.js +0 -31
- package/dist/_shared/esm/DatePicker-c7bb178e.js +0 -539
- package/dist/_shared/esm/Surface-71d21a9e.js +0 -48
- package/dist/_shared/esm/VisuallyHidden-06692fd3.js +0 -11
- package/dist/_shared/esm/index-5113ed53.js +0 -24
- package/dist/_shared/esm/index-6028d797.js +0 -21
- package/dist/_shared/esm/index-69089474.js +0 -21
- package/dist/_shared/esm/index-a624de47.js +0 -9
- package/dist/_shared/esm/suffix-modifier-1ce05abe.js +0 -17
- package/dist/types/helpers/filter-data-attrs.d.ts +0 -1
- package/dist/types/helpers/suffix-modifier.d.ts +0 -9
- package/dist/types/private-components/CardHeading/index.d.ts +0 -1
- package/dist/types/private-components/index.d.ts +0 -3
- package/dist/_shared/cjs/{ConditionalWrapper-be3b2625.js → ConditionalWrapper-bf944594.js} +0 -0
- package/dist/_shared/cjs/{index-7e31a45b.js → index-28fbfd5b.js} +52 -52
- package/dist/_shared/cjs/{index-3dd54df1.js → index-6f33b8c0.js} +23 -23
- /package/dist/_shared/esm/{ConditionalWrapper-59be8f35.js → ConditionalWrapper-b85979de.js} +0 -0
- /package/dist/types/{private-components → components}/CardFooter/CardFooter.d.ts +0 -0
- /package/dist/types/{private-components → components}/CardFooter/index.d.ts +0 -0
- /package/dist/types/{private-components → components}/CardHeading/CardHeading.d.ts +0 -0
- /package/dist/types/{private-components → components}/ConditionalWrapper/ConditionalWrapper.d.ts +0 -0
- /package/dist/types/{private-components → components}/ConditionalWrapper/index.d.ts +0 -0
package/dist/Modal/Modal.esm.js
CHANGED
|
@@ -1,1176 +1,20 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign,
|
|
1
|
+
import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/index.es-5496ec12.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useRef } from 'react';
|
|
4
4
|
import { c as classNames } from '../_shared/esm/index-2e73c2e9.js';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import '../_shared/esm/
|
|
16
|
-
import '../_shared/esm/Icon-512f834f.js';
|
|
5
|
+
import { c as createContextScope, a as useComposedRefs, P as Primitive, d as composeEventHandlers, e as Presence, R as RemoveScroll, S as Slot, f as useFocusGuards, F as FocusScope, D as DismissableLayer, j as createContext2, g as useControllableState, h as useId, i as Portal$1 } from '../_shared/esm/Combination-2af75870.js';
|
|
6
|
+
import { h as hideOthers, u as useThemeElement } from '../_shared/esm/component-3e60a45e.js';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
import { H as Heading } from '../_shared/esm/Heading-0dfbdb24.js';
|
|
9
|
+
import { B as ButtonV2 } from '../_shared/esm/ButtonV2-f9019e00.js';
|
|
10
|
+
import { T as Text } from '../_shared/esm/Text-96d8a35f.js';
|
|
11
|
+
import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-6a3533db.js';
|
|
12
|
+
import { T as ThemeIcon } from '../_shared/esm/ThemeIcon-9fac63d0.js';
|
|
13
|
+
import { S as Surface } from '../_shared/esm/Surface-c425e5e6.js';
|
|
14
|
+
import 'react-dom';
|
|
15
|
+
import '../_shared/esm/Icon-428e8061.js';
|
|
17
16
|
import '../_shared/esm/ArcIconEclipse.esm-bb48b82a.js';
|
|
18
17
|
|
|
19
|
-
// packages/core/primitive/src/primitive.tsx
|
|
20
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
21
|
-
return function handleEvent(event) {
|
|
22
|
-
originalEventHandler?.(event);
|
|
23
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
24
|
-
return ourEventHandler?.(event);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// packages/react/compose-refs/src/composeRefs.tsx
|
|
30
|
-
function setRef(ref, value) {
|
|
31
|
-
if (typeof ref === "function") {
|
|
32
|
-
ref(value);
|
|
33
|
-
} else if (ref !== null && ref !== void 0) {
|
|
34
|
-
ref.current = value;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function composeRefs(...refs) {
|
|
38
|
-
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
39
|
-
}
|
|
40
|
-
function useComposedRefs(...refs) {
|
|
41
|
-
return React.useCallback(composeRefs(...refs), refs);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// packages/react/context/src/createContext.tsx
|
|
45
|
-
function createContext2(rootComponentName, defaultContext) {
|
|
46
|
-
const Context = React.createContext(defaultContext);
|
|
47
|
-
function Provider(props) {
|
|
48
|
-
const { children, ...context } = props;
|
|
49
|
-
const value = React.useMemo(() => context, Object.values(context));
|
|
50
|
-
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
51
|
-
}
|
|
52
|
-
function useContext2(consumerName) {
|
|
53
|
-
const context = React.useContext(Context);
|
|
54
|
-
if (context) return context;
|
|
55
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
56
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
57
|
-
}
|
|
58
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
59
|
-
return [Provider, useContext2];
|
|
60
|
-
}
|
|
61
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
62
|
-
let defaultContexts = [];
|
|
63
|
-
function createContext3(rootComponentName, defaultContext) {
|
|
64
|
-
const BaseContext = React.createContext(defaultContext);
|
|
65
|
-
const index = defaultContexts.length;
|
|
66
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
67
|
-
function Provider(props) {
|
|
68
|
-
const { scope, children, ...context } = props;
|
|
69
|
-
const Context = scope?.[scopeName][index] || BaseContext;
|
|
70
|
-
const value = React.useMemo(() => context, Object.values(context));
|
|
71
|
-
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
72
|
-
}
|
|
73
|
-
function useContext2(consumerName, scope) {
|
|
74
|
-
const Context = scope?.[scopeName][index] || BaseContext;
|
|
75
|
-
const context = React.useContext(Context);
|
|
76
|
-
if (context) return context;
|
|
77
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
78
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
79
|
-
}
|
|
80
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
81
|
-
return [Provider, useContext2];
|
|
82
|
-
}
|
|
83
|
-
const createScope = () => {
|
|
84
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
85
|
-
return React.createContext(defaultContext);
|
|
86
|
-
});
|
|
87
|
-
return function useScope(scope) {
|
|
88
|
-
const contexts = scope?.[scopeName] || scopeContexts;
|
|
89
|
-
return React.useMemo(
|
|
90
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
91
|
-
[scope, contexts]
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
createScope.scopeName = scopeName;
|
|
96
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
97
|
-
}
|
|
98
|
-
function composeContextScopes(...scopes) {
|
|
99
|
-
const baseScope = scopes[0];
|
|
100
|
-
if (scopes.length === 1) return baseScope;
|
|
101
|
-
const createScope = () => {
|
|
102
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
103
|
-
useScope: createScope2(),
|
|
104
|
-
scopeName: createScope2.scopeName
|
|
105
|
-
}));
|
|
106
|
-
return function useComposedScopes(overrideScopes) {
|
|
107
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
108
|
-
const scopeProps = useScope(overrideScopes);
|
|
109
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
110
|
-
return { ...nextScopes2, ...currentScope };
|
|
111
|
-
}, {});
|
|
112
|
-
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
createScope.scopeName = baseScope.scopeName;
|
|
116
|
-
return createScope;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
120
|
-
var useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
// packages/react/id/src/id.tsx
|
|
124
|
-
var useReactId = React["useId".toString()] || (() => void 0);
|
|
125
|
-
var count$1 = 0;
|
|
126
|
-
function useId(deterministicId) {
|
|
127
|
-
const [id, setId] = React.useState(useReactId());
|
|
128
|
-
useLayoutEffect2(() => {
|
|
129
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
|
|
130
|
-
}, [deterministicId]);
|
|
131
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
135
|
-
function useCallbackRef(callback) {
|
|
136
|
-
const callbackRef = React.useRef(callback);
|
|
137
|
-
React.useEffect(() => {
|
|
138
|
-
callbackRef.current = callback;
|
|
139
|
-
});
|
|
140
|
-
return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
144
|
-
function useControllableState({
|
|
145
|
-
prop,
|
|
146
|
-
defaultProp,
|
|
147
|
-
onChange = () => {
|
|
148
|
-
}
|
|
149
|
-
}) {
|
|
150
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
151
|
-
const isControlled = prop !== void 0;
|
|
152
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
153
|
-
const handleChange = useCallbackRef(onChange);
|
|
154
|
-
const setValue = React.useCallback(
|
|
155
|
-
(nextValue) => {
|
|
156
|
-
if (isControlled) {
|
|
157
|
-
const setter = nextValue;
|
|
158
|
-
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
159
|
-
if (value2 !== prop) handleChange(value2);
|
|
160
|
-
} else {
|
|
161
|
-
setUncontrolledProp(nextValue);
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
165
|
-
);
|
|
166
|
-
return [value, setValue];
|
|
167
|
-
}
|
|
168
|
-
function useUncontrolledState({
|
|
169
|
-
defaultProp,
|
|
170
|
-
onChange
|
|
171
|
-
}) {
|
|
172
|
-
const uncontrolledState = React.useState(defaultProp);
|
|
173
|
-
const [value] = uncontrolledState;
|
|
174
|
-
const prevValueRef = React.useRef(value);
|
|
175
|
-
const handleChange = useCallbackRef(onChange);
|
|
176
|
-
React.useEffect(() => {
|
|
177
|
-
if (prevValueRef.current !== value) {
|
|
178
|
-
handleChange(value);
|
|
179
|
-
prevValueRef.current = value;
|
|
180
|
-
}
|
|
181
|
-
}, [value, prevValueRef, handleChange]);
|
|
182
|
-
return uncontrolledState;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// packages/react/slot/src/Slot.tsx
|
|
186
|
-
var Slot = React.forwardRef((props, forwardedRef) => {
|
|
187
|
-
const { children, ...slotProps } = props;
|
|
188
|
-
const childrenArray = React.Children.toArray(children);
|
|
189
|
-
const slottable = childrenArray.find(isSlottable);
|
|
190
|
-
if (slottable) {
|
|
191
|
-
const newElement = slottable.props.children;
|
|
192
|
-
const newChildren = childrenArray.map((child) => {
|
|
193
|
-
if (child === slottable) {
|
|
194
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
195
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
196
|
-
} else {
|
|
197
|
-
return child;
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
201
|
-
}
|
|
202
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
203
|
-
});
|
|
204
|
-
Slot.displayName = "Slot";
|
|
205
|
-
var SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
206
|
-
const { children, ...slotProps } = props;
|
|
207
|
-
if (React.isValidElement(children)) {
|
|
208
|
-
const childrenRef = getElementRef$1(children);
|
|
209
|
-
return React.cloneElement(children, {
|
|
210
|
-
...mergeProps(slotProps, children.props),
|
|
211
|
-
// @ts-ignore
|
|
212
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
216
|
-
});
|
|
217
|
-
SlotClone.displayName = "SlotClone";
|
|
218
|
-
var Slottable = ({ children }) => {
|
|
219
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
220
|
-
};
|
|
221
|
-
function isSlottable(child) {
|
|
222
|
-
return React.isValidElement(child) && child.type === Slottable;
|
|
223
|
-
}
|
|
224
|
-
function mergeProps(slotProps, childProps) {
|
|
225
|
-
const overrideProps = { ...childProps };
|
|
226
|
-
for (const propName in childProps) {
|
|
227
|
-
const slotPropValue = slotProps[propName];
|
|
228
|
-
const childPropValue = childProps[propName];
|
|
229
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
230
|
-
if (isHandler) {
|
|
231
|
-
if (slotPropValue && childPropValue) {
|
|
232
|
-
overrideProps[propName] = (...args) => {
|
|
233
|
-
childPropValue(...args);
|
|
234
|
-
slotPropValue(...args);
|
|
235
|
-
};
|
|
236
|
-
} else if (slotPropValue) {
|
|
237
|
-
overrideProps[propName] = slotPropValue;
|
|
238
|
-
}
|
|
239
|
-
} else if (propName === "style") {
|
|
240
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
241
|
-
} else if (propName === "className") {
|
|
242
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return { ...slotProps, ...overrideProps };
|
|
246
|
-
}
|
|
247
|
-
function getElementRef$1(element) {
|
|
248
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
249
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
250
|
-
if (mayWarn) {
|
|
251
|
-
return element.ref;
|
|
252
|
-
}
|
|
253
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
254
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
255
|
-
if (mayWarn) {
|
|
256
|
-
return element.props.ref;
|
|
257
|
-
}
|
|
258
|
-
return element.props.ref || element.ref;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// packages/react/primitive/src/Primitive.tsx
|
|
262
|
-
var NODES = [
|
|
263
|
-
"a",
|
|
264
|
-
"button",
|
|
265
|
-
"div",
|
|
266
|
-
"form",
|
|
267
|
-
"h2",
|
|
268
|
-
"h3",
|
|
269
|
-
"img",
|
|
270
|
-
"input",
|
|
271
|
-
"label",
|
|
272
|
-
"li",
|
|
273
|
-
"nav",
|
|
274
|
-
"ol",
|
|
275
|
-
"p",
|
|
276
|
-
"span",
|
|
277
|
-
"svg",
|
|
278
|
-
"ul"
|
|
279
|
-
];
|
|
280
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
281
|
-
const Node = React.forwardRef((props, forwardedRef) => {
|
|
282
|
-
const { asChild, ...primitiveProps } = props;
|
|
283
|
-
const Comp = asChild ? Slot : node;
|
|
284
|
-
if (typeof window !== "undefined") {
|
|
285
|
-
window[Symbol.for("radix-ui")] = true;
|
|
286
|
-
}
|
|
287
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
288
|
-
});
|
|
289
|
-
Node.displayName = `Primitive.${node}`;
|
|
290
|
-
return { ...primitive, [node]: Node };
|
|
291
|
-
}, {});
|
|
292
|
-
function dispatchDiscreteCustomEvent(target, event) {
|
|
293
|
-
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
297
|
-
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
298
|
-
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
299
|
-
React.useEffect(() => {
|
|
300
|
-
const handleKeyDown = (event) => {
|
|
301
|
-
if (event.key === "Escape") {
|
|
302
|
-
onEscapeKeyDown(event);
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
306
|
-
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
307
|
-
}, [onEscapeKeyDown, ownerDocument]);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
311
|
-
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
312
|
-
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
313
|
-
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
314
|
-
var originalBodyPointerEvents;
|
|
315
|
-
var DismissableLayerContext = React.createContext({
|
|
316
|
-
layers: /* @__PURE__ */ new Set(),
|
|
317
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
318
|
-
branches: /* @__PURE__ */ new Set()
|
|
319
|
-
});
|
|
320
|
-
var DismissableLayer = React.forwardRef(
|
|
321
|
-
(props, forwardedRef) => {
|
|
322
|
-
const {
|
|
323
|
-
disableOutsidePointerEvents = false,
|
|
324
|
-
onEscapeKeyDown,
|
|
325
|
-
onPointerDownOutside,
|
|
326
|
-
onFocusOutside,
|
|
327
|
-
onInteractOutside,
|
|
328
|
-
onDismiss,
|
|
329
|
-
...layerProps
|
|
330
|
-
} = props;
|
|
331
|
-
const context = React.useContext(DismissableLayerContext);
|
|
332
|
-
const [node, setNode] = React.useState(null);
|
|
333
|
-
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
334
|
-
const [, force] = React.useState({});
|
|
335
|
-
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
336
|
-
const layers = Array.from(context.layers);
|
|
337
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
338
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
339
|
-
const index = node ? layers.indexOf(node) : -1;
|
|
340
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
341
|
-
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
342
|
-
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
343
|
-
const target = event.target;
|
|
344
|
-
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
345
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
346
|
-
onPointerDownOutside?.(event);
|
|
347
|
-
onInteractOutside?.(event);
|
|
348
|
-
if (!event.defaultPrevented) onDismiss?.();
|
|
349
|
-
}, ownerDocument);
|
|
350
|
-
const focusOutside = useFocusOutside((event) => {
|
|
351
|
-
const target = event.target;
|
|
352
|
-
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
353
|
-
if (isFocusInBranch) return;
|
|
354
|
-
onFocusOutside?.(event);
|
|
355
|
-
onInteractOutside?.(event);
|
|
356
|
-
if (!event.defaultPrevented) onDismiss?.();
|
|
357
|
-
}, ownerDocument);
|
|
358
|
-
useEscapeKeydown((event) => {
|
|
359
|
-
const isHighestLayer = index === context.layers.size - 1;
|
|
360
|
-
if (!isHighestLayer) return;
|
|
361
|
-
onEscapeKeyDown?.(event);
|
|
362
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
363
|
-
event.preventDefault();
|
|
364
|
-
onDismiss();
|
|
365
|
-
}
|
|
366
|
-
}, ownerDocument);
|
|
367
|
-
React.useEffect(() => {
|
|
368
|
-
if (!node) return;
|
|
369
|
-
if (disableOutsidePointerEvents) {
|
|
370
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
371
|
-
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
372
|
-
ownerDocument.body.style.pointerEvents = "none";
|
|
373
|
-
}
|
|
374
|
-
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
375
|
-
}
|
|
376
|
-
context.layers.add(node);
|
|
377
|
-
dispatchUpdate();
|
|
378
|
-
return () => {
|
|
379
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
380
|
-
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
384
|
-
React.useEffect(() => {
|
|
385
|
-
return () => {
|
|
386
|
-
if (!node) return;
|
|
387
|
-
context.layers.delete(node);
|
|
388
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
389
|
-
dispatchUpdate();
|
|
390
|
-
};
|
|
391
|
-
}, [node, context]);
|
|
392
|
-
React.useEffect(() => {
|
|
393
|
-
const handleUpdate = () => force({});
|
|
394
|
-
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
395
|
-
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
396
|
-
}, []);
|
|
397
|
-
return /* @__PURE__ */ jsx(
|
|
398
|
-
Primitive.div,
|
|
399
|
-
{
|
|
400
|
-
...layerProps,
|
|
401
|
-
ref: composedRefs,
|
|
402
|
-
style: {
|
|
403
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
404
|
-
...props.style
|
|
405
|
-
},
|
|
406
|
-
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
407
|
-
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
408
|
-
onPointerDownCapture: composeEventHandlers(
|
|
409
|
-
props.onPointerDownCapture,
|
|
410
|
-
pointerDownOutside.onPointerDownCapture
|
|
411
|
-
)
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
);
|
|
416
|
-
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
417
|
-
var BRANCH_NAME = "DismissableLayerBranch";
|
|
418
|
-
var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
419
|
-
const context = React.useContext(DismissableLayerContext);
|
|
420
|
-
const ref = React.useRef(null);
|
|
421
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
422
|
-
React.useEffect(() => {
|
|
423
|
-
const node = ref.current;
|
|
424
|
-
if (node) {
|
|
425
|
-
context.branches.add(node);
|
|
426
|
-
return () => {
|
|
427
|
-
context.branches.delete(node);
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
}, [context.branches]);
|
|
431
|
-
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
432
|
-
});
|
|
433
|
-
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
434
|
-
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
435
|
-
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
436
|
-
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
437
|
-
const handleClickRef = React.useRef(() => {
|
|
438
|
-
});
|
|
439
|
-
React.useEffect(() => {
|
|
440
|
-
const handlePointerDown = (event) => {
|
|
441
|
-
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
442
|
-
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
443
|
-
handleAndDispatchCustomEvent(
|
|
444
|
-
POINTER_DOWN_OUTSIDE,
|
|
445
|
-
handlePointerDownOutside,
|
|
446
|
-
eventDetail,
|
|
447
|
-
{ discrete: true }
|
|
448
|
-
);
|
|
449
|
-
};
|
|
450
|
-
const eventDetail = { originalEvent: event };
|
|
451
|
-
if (event.pointerType === "touch") {
|
|
452
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
453
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
454
|
-
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
455
|
-
} else {
|
|
456
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
457
|
-
}
|
|
458
|
-
} else {
|
|
459
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
460
|
-
}
|
|
461
|
-
isPointerInsideReactTreeRef.current = false;
|
|
462
|
-
};
|
|
463
|
-
const timerId = window.setTimeout(() => {
|
|
464
|
-
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
465
|
-
}, 0);
|
|
466
|
-
return () => {
|
|
467
|
-
window.clearTimeout(timerId);
|
|
468
|
-
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
469
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
470
|
-
};
|
|
471
|
-
}, [ownerDocument, handlePointerDownOutside]);
|
|
472
|
-
return {
|
|
473
|
-
// ensures we check React component tree (not just DOM tree)
|
|
474
|
-
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
478
|
-
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
479
|
-
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
480
|
-
React.useEffect(() => {
|
|
481
|
-
const handleFocus = (event) => {
|
|
482
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
483
|
-
const eventDetail = { originalEvent: event };
|
|
484
|
-
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
485
|
-
discrete: false
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
};
|
|
489
|
-
ownerDocument.addEventListener("focusin", handleFocus);
|
|
490
|
-
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
491
|
-
}, [ownerDocument, handleFocusOutside]);
|
|
492
|
-
return {
|
|
493
|
-
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
494
|
-
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
function dispatchUpdate() {
|
|
498
|
-
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
499
|
-
document.dispatchEvent(event);
|
|
500
|
-
}
|
|
501
|
-
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
502
|
-
const target = detail.originalEvent.target;
|
|
503
|
-
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
504
|
-
if (handler) target.addEventListener(name, handler, { once: true });
|
|
505
|
-
if (discrete) {
|
|
506
|
-
dispatchDiscreteCustomEvent(target, event);
|
|
507
|
-
} else {
|
|
508
|
-
target.dispatchEvent(event);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
513
|
-
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
514
|
-
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
515
|
-
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
516
|
-
var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
517
|
-
const {
|
|
518
|
-
loop = false,
|
|
519
|
-
trapped = false,
|
|
520
|
-
onMountAutoFocus: onMountAutoFocusProp,
|
|
521
|
-
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
522
|
-
...scopeProps
|
|
523
|
-
} = props;
|
|
524
|
-
const [container, setContainer] = React.useState(null);
|
|
525
|
-
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
526
|
-
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
527
|
-
const lastFocusedElementRef = React.useRef(null);
|
|
528
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
529
|
-
const focusScope = React.useRef({
|
|
530
|
-
paused: false,
|
|
531
|
-
pause() {
|
|
532
|
-
this.paused = true;
|
|
533
|
-
},
|
|
534
|
-
resume() {
|
|
535
|
-
this.paused = false;
|
|
536
|
-
}
|
|
537
|
-
}).current;
|
|
538
|
-
React.useEffect(() => {
|
|
539
|
-
if (trapped) {
|
|
540
|
-
let handleFocusIn2 = function(event) {
|
|
541
|
-
if (focusScope.paused || !container) return;
|
|
542
|
-
const target = event.target;
|
|
543
|
-
if (container.contains(target)) {
|
|
544
|
-
lastFocusedElementRef.current = target;
|
|
545
|
-
} else {
|
|
546
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
547
|
-
}
|
|
548
|
-
}, handleFocusOut2 = function(event) {
|
|
549
|
-
if (focusScope.paused || !container) return;
|
|
550
|
-
const relatedTarget = event.relatedTarget;
|
|
551
|
-
if (relatedTarget === null) return;
|
|
552
|
-
if (!container.contains(relatedTarget)) {
|
|
553
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
554
|
-
}
|
|
555
|
-
}, handleMutations2 = function(mutations) {
|
|
556
|
-
const focusedElement = document.activeElement;
|
|
557
|
-
if (focusedElement !== document.body) return;
|
|
558
|
-
for (const mutation of mutations) {
|
|
559
|
-
if (mutation.removedNodes.length > 0) focus(container);
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
document.addEventListener("focusin", handleFocusIn2);
|
|
563
|
-
document.addEventListener("focusout", handleFocusOut2);
|
|
564
|
-
const mutationObserver = new MutationObserver(handleMutations2);
|
|
565
|
-
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
566
|
-
return () => {
|
|
567
|
-
document.removeEventListener("focusin", handleFocusIn2);
|
|
568
|
-
document.removeEventListener("focusout", handleFocusOut2);
|
|
569
|
-
mutationObserver.disconnect();
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
}, [trapped, container, focusScope.paused]);
|
|
573
|
-
React.useEffect(() => {
|
|
574
|
-
if (container) {
|
|
575
|
-
focusScopesStack.add(focusScope);
|
|
576
|
-
const previouslyFocusedElement = document.activeElement;
|
|
577
|
-
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
578
|
-
if (!hasFocusedCandidate) {
|
|
579
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
580
|
-
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
581
|
-
container.dispatchEvent(mountEvent);
|
|
582
|
-
if (!mountEvent.defaultPrevented) {
|
|
583
|
-
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
584
|
-
if (document.activeElement === previouslyFocusedElement) {
|
|
585
|
-
focus(container);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
return () => {
|
|
590
|
-
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
591
|
-
setTimeout(() => {
|
|
592
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
593
|
-
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
594
|
-
container.dispatchEvent(unmountEvent);
|
|
595
|
-
if (!unmountEvent.defaultPrevented) {
|
|
596
|
-
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
597
|
-
}
|
|
598
|
-
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
599
|
-
focusScopesStack.remove(focusScope);
|
|
600
|
-
}, 0);
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
604
|
-
const handleKeyDown = React.useCallback(
|
|
605
|
-
(event) => {
|
|
606
|
-
if (!loop && !trapped) return;
|
|
607
|
-
if (focusScope.paused) return;
|
|
608
|
-
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
609
|
-
const focusedElement = document.activeElement;
|
|
610
|
-
if (isTabKey && focusedElement) {
|
|
611
|
-
const container2 = event.currentTarget;
|
|
612
|
-
const [first, last] = getTabbableEdges(container2);
|
|
613
|
-
const hasTabbableElementsInside = first && last;
|
|
614
|
-
if (!hasTabbableElementsInside) {
|
|
615
|
-
if (focusedElement === container2) event.preventDefault();
|
|
616
|
-
} else {
|
|
617
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
618
|
-
event.preventDefault();
|
|
619
|
-
if (loop) focus(first, { select: true });
|
|
620
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
621
|
-
event.preventDefault();
|
|
622
|
-
if (loop) focus(last, { select: true });
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
},
|
|
627
|
-
[loop, trapped, focusScope.paused]
|
|
628
|
-
);
|
|
629
|
-
return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
630
|
-
});
|
|
631
|
-
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
632
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
633
|
-
const previouslyFocusedElement = document.activeElement;
|
|
634
|
-
for (const candidate of candidates) {
|
|
635
|
-
focus(candidate, { select });
|
|
636
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
function getTabbableEdges(container) {
|
|
640
|
-
const candidates = getTabbableCandidates(container);
|
|
641
|
-
const first = findVisible(candidates, container);
|
|
642
|
-
const last = findVisible(candidates.reverse(), container);
|
|
643
|
-
return [first, last];
|
|
644
|
-
}
|
|
645
|
-
function getTabbableCandidates(container) {
|
|
646
|
-
const nodes = [];
|
|
647
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
648
|
-
acceptNode: (node) => {
|
|
649
|
-
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
650
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
651
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
655
|
-
return nodes;
|
|
656
|
-
}
|
|
657
|
-
function findVisible(elements, container) {
|
|
658
|
-
for (const element of elements) {
|
|
659
|
-
if (!isHidden(element, { upTo: container })) return element;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
function isHidden(node, { upTo }) {
|
|
663
|
-
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
664
|
-
while (node) {
|
|
665
|
-
if (upTo !== void 0 && node === upTo) return false;
|
|
666
|
-
if (getComputedStyle(node).display === "none") return true;
|
|
667
|
-
node = node.parentElement;
|
|
668
|
-
}
|
|
669
|
-
return false;
|
|
670
|
-
}
|
|
671
|
-
function isSelectableInput(element) {
|
|
672
|
-
return element instanceof HTMLInputElement && "select" in element;
|
|
673
|
-
}
|
|
674
|
-
function focus(element, { select = false } = {}) {
|
|
675
|
-
if (element && element.focus) {
|
|
676
|
-
const previouslyFocusedElement = document.activeElement;
|
|
677
|
-
element.focus({ preventScroll: true });
|
|
678
|
-
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
679
|
-
element.select();
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
var focusScopesStack = createFocusScopesStack();
|
|
683
|
-
function createFocusScopesStack() {
|
|
684
|
-
let stack = [];
|
|
685
|
-
return {
|
|
686
|
-
add(focusScope) {
|
|
687
|
-
const activeFocusScope = stack[0];
|
|
688
|
-
if (focusScope !== activeFocusScope) {
|
|
689
|
-
activeFocusScope?.pause();
|
|
690
|
-
}
|
|
691
|
-
stack = arrayRemove(stack, focusScope);
|
|
692
|
-
stack.unshift(focusScope);
|
|
693
|
-
},
|
|
694
|
-
remove(focusScope) {
|
|
695
|
-
stack = arrayRemove(stack, focusScope);
|
|
696
|
-
stack[0]?.resume();
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
function arrayRemove(array, item) {
|
|
701
|
-
const updatedArray = [...array];
|
|
702
|
-
const index = updatedArray.indexOf(item);
|
|
703
|
-
if (index !== -1) {
|
|
704
|
-
updatedArray.splice(index, 1);
|
|
705
|
-
}
|
|
706
|
-
return updatedArray;
|
|
707
|
-
}
|
|
708
|
-
function removeLinks(items) {
|
|
709
|
-
return items.filter((item) => item.tagName !== "A");
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
var PORTAL_NAME$1 = "Portal";
|
|
713
|
-
var Portal$1 = React.forwardRef((props, forwardedRef) => {
|
|
714
|
-
const { container: containerProp, ...portalProps } = props;
|
|
715
|
-
const [mounted, setMounted] = React.useState(false);
|
|
716
|
-
useLayoutEffect2(() => setMounted(true), []);
|
|
717
|
-
const container = containerProp || mounted && globalThis?.document?.body;
|
|
718
|
-
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
719
|
-
});
|
|
720
|
-
Portal$1.displayName = PORTAL_NAME$1;
|
|
721
|
-
|
|
722
|
-
function useStateMachine(initialState, machine) {
|
|
723
|
-
return React.useReducer((state, event) => {
|
|
724
|
-
const nextState = machine[state][event];
|
|
725
|
-
return nextState ?? state;
|
|
726
|
-
}, initialState);
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
// packages/react/presence/src/Presence.tsx
|
|
730
|
-
var Presence = (props) => {
|
|
731
|
-
const { present, children } = props;
|
|
732
|
-
const presence = usePresence(present);
|
|
733
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
|
|
734
|
-
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
|
735
|
-
const forceMount = typeof children === "function";
|
|
736
|
-
return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
|
|
737
|
-
};
|
|
738
|
-
Presence.displayName = "Presence";
|
|
739
|
-
function usePresence(present) {
|
|
740
|
-
const [node, setNode] = React.useState();
|
|
741
|
-
const stylesRef = React.useRef({});
|
|
742
|
-
const prevPresentRef = React.useRef(present);
|
|
743
|
-
const prevAnimationNameRef = React.useRef("none");
|
|
744
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
745
|
-
const [state, send] = useStateMachine(initialState, {
|
|
746
|
-
mounted: {
|
|
747
|
-
UNMOUNT: "unmounted",
|
|
748
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
749
|
-
},
|
|
750
|
-
unmountSuspended: {
|
|
751
|
-
MOUNT: "mounted",
|
|
752
|
-
ANIMATION_END: "unmounted"
|
|
753
|
-
},
|
|
754
|
-
unmounted: {
|
|
755
|
-
MOUNT: "mounted"
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
React.useEffect(() => {
|
|
759
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
760
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
761
|
-
}, [state]);
|
|
762
|
-
useLayoutEffect2(() => {
|
|
763
|
-
const styles = stylesRef.current;
|
|
764
|
-
const wasPresent = prevPresentRef.current;
|
|
765
|
-
const hasPresentChanged = wasPresent !== present;
|
|
766
|
-
if (hasPresentChanged) {
|
|
767
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
768
|
-
const currentAnimationName = getAnimationName(styles);
|
|
769
|
-
if (present) {
|
|
770
|
-
send("MOUNT");
|
|
771
|
-
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
772
|
-
send("UNMOUNT");
|
|
773
|
-
} else {
|
|
774
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
775
|
-
if (wasPresent && isAnimating) {
|
|
776
|
-
send("ANIMATION_OUT");
|
|
777
|
-
} else {
|
|
778
|
-
send("UNMOUNT");
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
prevPresentRef.current = present;
|
|
782
|
-
}
|
|
783
|
-
}, [present, send]);
|
|
784
|
-
useLayoutEffect2(() => {
|
|
785
|
-
if (node) {
|
|
786
|
-
const handleAnimationEnd = (event) => {
|
|
787
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
788
|
-
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
789
|
-
if (event.target === node && isCurrentAnimation) {
|
|
790
|
-
ReactDOM.flushSync(() => send("ANIMATION_END"));
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
const handleAnimationStart = (event) => {
|
|
794
|
-
if (event.target === node) {
|
|
795
|
-
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
796
|
-
}
|
|
797
|
-
};
|
|
798
|
-
node.addEventListener("animationstart", handleAnimationStart);
|
|
799
|
-
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
800
|
-
node.addEventListener("animationend", handleAnimationEnd);
|
|
801
|
-
return () => {
|
|
802
|
-
node.removeEventListener("animationstart", handleAnimationStart);
|
|
803
|
-
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
804
|
-
node.removeEventListener("animationend", handleAnimationEnd);
|
|
805
|
-
};
|
|
806
|
-
} else {
|
|
807
|
-
send("ANIMATION_END");
|
|
808
|
-
}
|
|
809
|
-
}, [node, send]);
|
|
810
|
-
return {
|
|
811
|
-
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
812
|
-
ref: React.useCallback((node2) => {
|
|
813
|
-
if (node2) stylesRef.current = getComputedStyle(node2);
|
|
814
|
-
setNode(node2);
|
|
815
|
-
}, [])
|
|
816
|
-
};
|
|
817
|
-
}
|
|
818
|
-
function getAnimationName(styles) {
|
|
819
|
-
return styles?.animationName || "none";
|
|
820
|
-
}
|
|
821
|
-
function getElementRef(element) {
|
|
822
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
823
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
824
|
-
if (mayWarn) {
|
|
825
|
-
return element.ref;
|
|
826
|
-
}
|
|
827
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
828
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
829
|
-
if (mayWarn) {
|
|
830
|
-
return element.props.ref;
|
|
831
|
-
}
|
|
832
|
-
return element.props.ref || element.ref;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
var count = 0;
|
|
836
|
-
function useFocusGuards() {
|
|
837
|
-
React.useEffect(() => {
|
|
838
|
-
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
839
|
-
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
840
|
-
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
841
|
-
count++;
|
|
842
|
-
return () => {
|
|
843
|
-
if (count === 1) {
|
|
844
|
-
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
845
|
-
}
|
|
846
|
-
count--;
|
|
847
|
-
};
|
|
848
|
-
}, []);
|
|
849
|
-
}
|
|
850
|
-
function createFocusGuard() {
|
|
851
|
-
const element = document.createElement("span");
|
|
852
|
-
element.setAttribute("data-radix-focus-guard", "");
|
|
853
|
-
element.tabIndex = 0;
|
|
854
|
-
element.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none";
|
|
855
|
-
return element;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
var effectCar = createSidecarMedium();
|
|
859
|
-
|
|
860
|
-
var nothing = function () {
|
|
861
|
-
return;
|
|
862
|
-
};
|
|
863
|
-
/**
|
|
864
|
-
* Removes scrollbar from the page and contain the scroll within the Lock
|
|
865
|
-
*/
|
|
866
|
-
var RemoveScroll$1 = React.forwardRef(function (props, parentRef) {
|
|
867
|
-
var ref = React.useRef(null);
|
|
868
|
-
var _a = React.useState({
|
|
869
|
-
onScrollCapture: nothing,
|
|
870
|
-
onWheelCapture: nothing,
|
|
871
|
-
onTouchMoveCapture: nothing,
|
|
872
|
-
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
873
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
874
|
-
var SideCar = sideCar;
|
|
875
|
-
var containerRef = useMergeRefs([ref, parentRef]);
|
|
876
|
-
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
877
|
-
return (React.createElement(React.Fragment, null,
|
|
878
|
-
enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
|
|
879
|
-
forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
880
|
-
});
|
|
881
|
-
RemoveScroll$1.defaultProps = {
|
|
882
|
-
enabled: true,
|
|
883
|
-
removeScrollBar: true,
|
|
884
|
-
inert: false,
|
|
885
|
-
};
|
|
886
|
-
RemoveScroll$1.classNames = {
|
|
887
|
-
fullWidth: fullWidthClassName,
|
|
888
|
-
zeroRight: zeroRightClassName,
|
|
889
|
-
};
|
|
890
|
-
|
|
891
|
-
var passiveSupported = false;
|
|
892
|
-
if (typeof window !== 'undefined') {
|
|
893
|
-
try {
|
|
894
|
-
var options = Object.defineProperty({}, 'passive', {
|
|
895
|
-
get: function () {
|
|
896
|
-
passiveSupported = true;
|
|
897
|
-
return true;
|
|
898
|
-
},
|
|
899
|
-
});
|
|
900
|
-
// @ts-ignore
|
|
901
|
-
window.addEventListener('test', options, options);
|
|
902
|
-
// @ts-ignore
|
|
903
|
-
window.removeEventListener('test', options, options);
|
|
904
|
-
}
|
|
905
|
-
catch (err) {
|
|
906
|
-
passiveSupported = false;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
910
|
-
|
|
911
|
-
var alwaysContainsScroll = function (node) {
|
|
912
|
-
// textarea will always _contain_ scroll inside self. It only can be hidden
|
|
913
|
-
return node.tagName === 'TEXTAREA';
|
|
914
|
-
};
|
|
915
|
-
var elementCanBeScrolled = function (node, overflow) {
|
|
916
|
-
var styles = window.getComputedStyle(node);
|
|
917
|
-
return (
|
|
918
|
-
// not-not-scrollable
|
|
919
|
-
styles[overflow] !== 'hidden' &&
|
|
920
|
-
// contains scroll inside self
|
|
921
|
-
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
|
|
922
|
-
};
|
|
923
|
-
var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
|
|
924
|
-
var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
|
|
925
|
-
var locationCouldBeScrolled = function (axis, node) {
|
|
926
|
-
var ownerDocument = node.ownerDocument;
|
|
927
|
-
var current = node;
|
|
928
|
-
do {
|
|
929
|
-
// Skip over shadow root
|
|
930
|
-
if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
|
|
931
|
-
current = current.host;
|
|
932
|
-
}
|
|
933
|
-
var isScrollable = elementCouldBeScrolled(axis, current);
|
|
934
|
-
if (isScrollable) {
|
|
935
|
-
var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
|
|
936
|
-
if (s > d) {
|
|
937
|
-
return true;
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
current = current.parentNode;
|
|
941
|
-
} while (current && current !== ownerDocument.body);
|
|
942
|
-
return false;
|
|
943
|
-
};
|
|
944
|
-
var getVScrollVariables = function (_a) {
|
|
945
|
-
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
946
|
-
return [
|
|
947
|
-
scrollTop,
|
|
948
|
-
scrollHeight,
|
|
949
|
-
clientHeight,
|
|
950
|
-
];
|
|
951
|
-
};
|
|
952
|
-
var getHScrollVariables = function (_a) {
|
|
953
|
-
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
954
|
-
return [
|
|
955
|
-
scrollLeft,
|
|
956
|
-
scrollWidth,
|
|
957
|
-
clientWidth,
|
|
958
|
-
];
|
|
959
|
-
};
|
|
960
|
-
var elementCouldBeScrolled = function (axis, node) {
|
|
961
|
-
return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
|
|
962
|
-
};
|
|
963
|
-
var getScrollVariables = function (axis, node) {
|
|
964
|
-
return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
|
|
965
|
-
};
|
|
966
|
-
var getDirectionFactor = function (axis, direction) {
|
|
967
|
-
/**
|
|
968
|
-
* If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
|
|
969
|
-
* and then increasingly negative as you scroll towards the end of the content.
|
|
970
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
|
|
971
|
-
*/
|
|
972
|
-
return axis === 'h' && direction === 'rtl' ? -1 : 1;
|
|
973
|
-
};
|
|
974
|
-
var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
975
|
-
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
976
|
-
var delta = directionFactor * sourceDelta;
|
|
977
|
-
// find scrollable target
|
|
978
|
-
var target = event.target;
|
|
979
|
-
var targetInLock = endTarget.contains(target);
|
|
980
|
-
var shouldCancelScroll = false;
|
|
981
|
-
var isDeltaPositive = delta > 0;
|
|
982
|
-
var availableScroll = 0;
|
|
983
|
-
var availableScrollTop = 0;
|
|
984
|
-
do {
|
|
985
|
-
var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
986
|
-
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
|
987
|
-
if (position || elementScroll) {
|
|
988
|
-
if (elementCouldBeScrolled(axis, target)) {
|
|
989
|
-
availableScroll += elementScroll;
|
|
990
|
-
availableScrollTop += position;
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
if (target instanceof ShadowRoot) {
|
|
994
|
-
target = target.host;
|
|
995
|
-
}
|
|
996
|
-
else {
|
|
997
|
-
target = target.parentNode;
|
|
998
|
-
}
|
|
999
|
-
} while (
|
|
1000
|
-
// portaled content
|
|
1001
|
-
(!targetInLock && target !== document.body) ||
|
|
1002
|
-
// self content
|
|
1003
|
-
(targetInLock && (endTarget.contains(target) || endTarget === target)));
|
|
1004
|
-
// handle epsilon around 0 (non standard zoom levels)
|
|
1005
|
-
if (isDeltaPositive &&
|
|
1006
|
-
((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {
|
|
1007
|
-
shouldCancelScroll = true;
|
|
1008
|
-
}
|
|
1009
|
-
else if (!isDeltaPositive &&
|
|
1010
|
-
((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {
|
|
1011
|
-
shouldCancelScroll = true;
|
|
1012
|
-
}
|
|
1013
|
-
return shouldCancelScroll;
|
|
1014
|
-
};
|
|
1015
|
-
|
|
1016
|
-
var getTouchXY = function (event) {
|
|
1017
|
-
return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
1018
|
-
};
|
|
1019
|
-
var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
|
|
1020
|
-
var extractRef = function (ref) {
|
|
1021
|
-
return ref && 'current' in ref ? ref.current : ref;
|
|
1022
|
-
};
|
|
1023
|
-
var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
|
|
1024
|
-
var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
|
|
1025
|
-
var idCounter = 0;
|
|
1026
|
-
var lockStack = [];
|
|
1027
|
-
function RemoveScrollSideCar(props) {
|
|
1028
|
-
var shouldPreventQueue = React.useRef([]);
|
|
1029
|
-
var touchStartRef = React.useRef([0, 0]);
|
|
1030
|
-
var activeAxis = React.useRef();
|
|
1031
|
-
var id = React.useState(idCounter++)[0];
|
|
1032
|
-
var Style = React.useState(styleSingleton)[0];
|
|
1033
|
-
var lastProps = React.useRef(props);
|
|
1034
|
-
React.useEffect(function () {
|
|
1035
|
-
lastProps.current = props;
|
|
1036
|
-
}, [props]);
|
|
1037
|
-
React.useEffect(function () {
|
|
1038
|
-
if (props.inert) {
|
|
1039
|
-
document.body.classList.add("block-interactivity-".concat(id));
|
|
1040
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
1041
|
-
allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
|
|
1042
|
-
return function () {
|
|
1043
|
-
document.body.classList.remove("block-interactivity-".concat(id));
|
|
1044
|
-
allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
return;
|
|
1048
|
-
}, [props.inert, props.lockRef.current, props.shards]);
|
|
1049
|
-
var shouldCancelEvent = React.useCallback(function (event, parent) {
|
|
1050
|
-
if ('touches' in event && event.touches.length === 2) {
|
|
1051
|
-
return !lastProps.current.allowPinchZoom;
|
|
1052
|
-
}
|
|
1053
|
-
var touch = getTouchXY(event);
|
|
1054
|
-
var touchStart = touchStartRef.current;
|
|
1055
|
-
var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
|
|
1056
|
-
var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
|
|
1057
|
-
var currentAxis;
|
|
1058
|
-
var target = event.target;
|
|
1059
|
-
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
|
|
1060
|
-
// allow horizontal touch move on Range inputs. They will not cause any scroll
|
|
1061
|
-
if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
|
|
1062
|
-
return false;
|
|
1063
|
-
}
|
|
1064
|
-
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
1065
|
-
if (!canBeScrolledInMainDirection) {
|
|
1066
|
-
return true;
|
|
1067
|
-
}
|
|
1068
|
-
if (canBeScrolledInMainDirection) {
|
|
1069
|
-
currentAxis = moveDirection;
|
|
1070
|
-
}
|
|
1071
|
-
else {
|
|
1072
|
-
currentAxis = moveDirection === 'v' ? 'h' : 'v';
|
|
1073
|
-
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
1074
|
-
// other axis might be not scrollable
|
|
1075
|
-
}
|
|
1076
|
-
if (!canBeScrolledInMainDirection) {
|
|
1077
|
-
return false;
|
|
1078
|
-
}
|
|
1079
|
-
if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
|
|
1080
|
-
activeAxis.current = currentAxis;
|
|
1081
|
-
}
|
|
1082
|
-
if (!currentAxis) {
|
|
1083
|
-
return true;
|
|
1084
|
-
}
|
|
1085
|
-
var cancelingAxis = activeAxis.current || currentAxis;
|
|
1086
|
-
return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
|
|
1087
|
-
}, []);
|
|
1088
|
-
var shouldPrevent = React.useCallback(function (_event) {
|
|
1089
|
-
var event = _event;
|
|
1090
|
-
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
|
|
1091
|
-
// not the last active
|
|
1092
|
-
return;
|
|
1093
|
-
}
|
|
1094
|
-
var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
|
|
1095
|
-
var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];
|
|
1096
|
-
// self event, and should be canceled
|
|
1097
|
-
if (sourceEvent && sourceEvent.should) {
|
|
1098
|
-
if (event.cancelable) {
|
|
1099
|
-
event.preventDefault();
|
|
1100
|
-
}
|
|
1101
|
-
return;
|
|
1102
|
-
}
|
|
1103
|
-
// outside or shard event
|
|
1104
|
-
if (!sourceEvent) {
|
|
1105
|
-
var shardNodes = (lastProps.current.shards || [])
|
|
1106
|
-
.map(extractRef)
|
|
1107
|
-
.filter(Boolean)
|
|
1108
|
-
.filter(function (node) { return node.contains(event.target); });
|
|
1109
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
1110
|
-
if (shouldStop) {
|
|
1111
|
-
if (event.cancelable) {
|
|
1112
|
-
event.preventDefault();
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
}, []);
|
|
1117
|
-
var shouldCancel = React.useCallback(function (name, delta, target, should) {
|
|
1118
|
-
var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };
|
|
1119
|
-
shouldPreventQueue.current.push(event);
|
|
1120
|
-
setTimeout(function () {
|
|
1121
|
-
shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
|
|
1122
|
-
}, 1);
|
|
1123
|
-
}, []);
|
|
1124
|
-
var scrollTouchStart = React.useCallback(function (event) {
|
|
1125
|
-
touchStartRef.current = getTouchXY(event);
|
|
1126
|
-
activeAxis.current = undefined;
|
|
1127
|
-
}, []);
|
|
1128
|
-
var scrollWheel = React.useCallback(function (event) {
|
|
1129
|
-
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1130
|
-
}, []);
|
|
1131
|
-
var scrollTouchMove = React.useCallback(function (event) {
|
|
1132
|
-
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1133
|
-
}, []);
|
|
1134
|
-
React.useEffect(function () {
|
|
1135
|
-
lockStack.push(Style);
|
|
1136
|
-
props.setCallbacks({
|
|
1137
|
-
onScrollCapture: scrollWheel,
|
|
1138
|
-
onWheelCapture: scrollWheel,
|
|
1139
|
-
onTouchMoveCapture: scrollTouchMove,
|
|
1140
|
-
});
|
|
1141
|
-
document.addEventListener('wheel', shouldPrevent, nonPassive);
|
|
1142
|
-
document.addEventListener('touchmove', shouldPrevent, nonPassive);
|
|
1143
|
-
document.addEventListener('touchstart', scrollTouchStart, nonPassive);
|
|
1144
|
-
return function () {
|
|
1145
|
-
lockStack = lockStack.filter(function (inst) { return inst !== Style; });
|
|
1146
|
-
document.removeEventListener('wheel', shouldPrevent, nonPassive);
|
|
1147
|
-
document.removeEventListener('touchmove', shouldPrevent, nonPassive);
|
|
1148
|
-
document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
|
|
1149
|
-
};
|
|
1150
|
-
}, []);
|
|
1151
|
-
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
1152
|
-
return (React.createElement(React.Fragment, null,
|
|
1153
|
-
inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,
|
|
1154
|
-
removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null));
|
|
1155
|
-
}
|
|
1156
|
-
function getOutermostShadowParent(node) {
|
|
1157
|
-
var shadowParent = null;
|
|
1158
|
-
while (node !== null) {
|
|
1159
|
-
if (node instanceof ShadowRoot) {
|
|
1160
|
-
shadowParent = node.host;
|
|
1161
|
-
node = node.host;
|
|
1162
|
-
}
|
|
1163
|
-
node = node.parentNode;
|
|
1164
|
-
}
|
|
1165
|
-
return shadowParent;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
1169
|
-
|
|
1170
|
-
var ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll$1, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
|
|
1171
|
-
ReactRemoveScroll.classNames = RemoveScroll$1.classNames;
|
|
1172
|
-
var RemoveScroll = ReactRemoveScroll;
|
|
1173
|
-
|
|
1174
18
|
var DIALOG_NAME = "Dialog";
|
|
1175
19
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
1176
20
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|