@arc-ui/components 11.5.0 → 11.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert/Alert.cjs.d.ts +1 -1
- package/dist/Alert/Alert.cjs.js +4 -4
- package/dist/Alert/Alert.esm.d.ts +1 -1
- package/dist/Alert/Alert.esm.js +4 -4
- package/dist/Badge/Badge.cjs.js +2 -2
- package/dist/Badge/Badge.esm.js +2 -2
- package/dist/Box/Box.cjs.d.ts +1 -0
- package/dist/Box/Box.cjs.js +13 -0
- package/dist/Box/Box.esm.d.ts +1 -0
- package/dist/Box/Box.esm.js +5 -0
- package/dist/Box/package.json +7 -0
- package/dist/BrandLogo/BrandLogo.cjs.d.ts +1 -1
- package/dist/BrandLogo/BrandLogo.cjs.js +2 -2
- package/dist/BrandLogo/BrandLogo.esm.d.ts +1 -1
- package/dist/BrandLogo/BrandLogo.esm.js +2 -2
- package/dist/Breadcrumbs/Breadcrumbs.cjs.d.ts +1 -61
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +10 -642
- package/dist/Breadcrumbs/Breadcrumbs.esm.d.ts +1 -61
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +9 -641
- package/dist/Button/Button.cjs.d.ts +1 -1
- package/dist/Button/Button.cjs.js +4 -3
- package/dist/Button/Button.esm.d.ts +1 -1
- package/dist/Button/Button.esm.js +4 -3
- package/dist/Card/Card.cjs.d.ts +1 -130
- package/dist/Card/Card.cjs.js +12 -119
- package/dist/Card/Card.esm.d.ts +1 -130
- package/dist/Card/Card.esm.js +11 -118
- package/dist/Checkbox/Checkbox.cjs.d.ts +1 -64
- package/dist/Checkbox/Checkbox.cjs.js +11 -60
- package/dist/Checkbox/Checkbox.esm.d.ts +1 -64
- package/dist/Checkbox/Checkbox.esm.js +10 -59
- package/dist/Columns/Columns.cjs.d.ts +1 -76
- package/dist/Columns/Columns.cjs.js +6 -52
- package/dist/Columns/Columns.esm.d.ts +1 -76
- package/dist/Columns/Columns.esm.js +5 -51
- package/dist/Disclosure/Disclosure.cjs.d.ts +1 -1
- package/dist/Disclosure/Disclosure.cjs.js +2 -2
- package/dist/Disclosure/Disclosure.esm.d.ts +1 -1
- package/dist/Disclosure/Disclosure.esm.js +2 -2
- package/dist/DisclosureMini/DisclosureMini.cjs.d.ts +1 -1
- package/dist/DisclosureMini/DisclosureMini.cjs.js +3 -3
- package/dist/DisclosureMini/DisclosureMini.esm.d.ts +1 -1
- package/dist/DisclosureMini/DisclosureMini.esm.js +3 -3
- package/dist/Filter/Filter.cjs.d.ts +1 -0
- package/dist/Filter/Filter.cjs.js +13 -0
- package/dist/Filter/Filter.esm.d.ts +1 -0
- package/dist/Filter/Filter.esm.js +5 -0
- package/dist/Filter/package.json +7 -0
- package/dist/FormControl/FormControl.cjs.d.ts +1 -1
- package/dist/FormControl/FormControl.cjs.js +4 -5
- package/dist/FormControl/FormControl.esm.d.ts +1 -1
- package/dist/FormControl/FormControl.esm.js +4 -5
- package/dist/Group/Group.cjs.d.ts +1 -46
- package/dist/Group/Group.cjs.js +6 -43
- package/dist/Group/Group.esm.d.ts +1 -46
- package/dist/Group/Group.esm.js +5 -42
- package/dist/Heading/Heading.cjs.d.ts +1 -1
- package/dist/Heading/Heading.cjs.js +2 -2
- package/dist/Heading/Heading.esm.d.ts +1 -1
- package/dist/Heading/Heading.esm.js +2 -2
- package/dist/Icon/Icon.cjs.d.ts +1 -1
- package/dist/Icon/Icon.cjs.js +2 -2
- package/dist/Icon/Icon.esm.d.ts +1 -1
- package/dist/Icon/Icon.esm.js +2 -2
- package/dist/Image/Image.cjs.d.ts +1 -1
- package/dist/Image/Image.cjs.js +2 -1
- package/dist/Image/Image.esm.d.ts +1 -1
- package/dist/Image/Image.esm.js +1 -1
- package/dist/Markup/Markup.cjs.js +1 -1
- package/dist/Markup/Markup.esm.js +1 -1
- package/dist/MediaCard/MediaCard.cjs.d.ts +61 -0
- package/dist/MediaCard/MediaCard.cjs.js +31 -0
- package/dist/MediaCard/MediaCard.esm.d.ts +61 -0
- package/dist/MediaCard/MediaCard.esm.js +23 -0
- package/dist/MediaCard/package.json +7 -0
- package/dist/Modal/Modal.cjs.d.ts +31 -0
- package/dist/Modal/Modal.cjs.js +388 -0
- package/dist/Modal/Modal.esm.d.ts +31 -0
- package/dist/Modal/Modal.esm.js +380 -0
- package/dist/Modal/package.json +7 -0
- package/dist/Pagination/Pagination.cjs.d.ts +20 -0
- package/dist/Pagination/Pagination.cjs.js +87 -0
- package/dist/Pagination/Pagination.esm.d.ts +20 -0
- package/dist/Pagination/Pagination.esm.js +79 -0
- package/dist/Pagination/package.json +7 -0
- package/dist/PaginationSimple/PaginationSimple.cjs.d.ts +28 -0
- package/dist/PaginationSimple/PaginationSimple.cjs.js +47 -0
- package/dist/PaginationSimple/PaginationSimple.esm.d.ts +28 -0
- package/dist/PaginationSimple/PaginationSimple.esm.js +39 -0
- package/dist/PaginationSimple/package.json +7 -0
- package/dist/Poster/Poster.cjs.d.ts +1 -81
- package/dist/Poster/Poster.cjs.js +8 -45
- package/dist/Poster/Poster.esm.d.ts +1 -81
- package/dist/Poster/Poster.esm.js +7 -44
- package/dist/ProgressBar/ProgressBar.cjs.js +4 -4
- package/dist/ProgressBar/ProgressBar.esm.js +4 -4
- package/dist/ProgressStepper/ProgressStepper.cjs.d.ts +89 -0
- package/dist/ProgressStepper/ProgressStepper.cjs.js +152 -0
- package/dist/ProgressStepper/ProgressStepper.esm.d.ts +89 -0
- package/dist/ProgressStepper/ProgressStepper.esm.js +144 -0
- package/dist/ProgressStepper/package.json +7 -0
- package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -85
- package/dist/RadioGroup/RadioGroup.cjs.js +9 -68
- package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -85
- package/dist/RadioGroup/RadioGroup.esm.js +8 -67
- package/dist/Rule/Rule.cjs.js +1 -1
- package/dist/Rule/Rule.esm.js +1 -1
- package/dist/ScrollToTop/ScrollToTop.cjs.d.ts +25 -0
- package/dist/ScrollToTop/ScrollToTop.cjs.js +68 -0
- package/dist/ScrollToTop/ScrollToTop.esm.d.ts +25 -0
- package/dist/ScrollToTop/ScrollToTop.esm.js +60 -0
- package/dist/ScrollToTop/package.json +7 -0
- package/dist/Select/Select.cjs.d.ts +2 -2
- package/dist/Select/Select.cjs.js +20 -1419
- package/dist/Select/Select.esm.d.ts +2 -2
- package/dist/Select/Select.esm.js +10 -1390
- package/dist/SiteFooter/SiteFooter.cjs.d.ts +2 -62
- package/dist/SiteFooter/SiteFooter.cjs.js +10 -65
- package/dist/SiteFooter/SiteFooter.esm.d.ts +2 -62
- package/dist/SiteFooter/SiteFooter.esm.js +12 -66
- package/dist/SiteHeader/SiteHeader.cjs.d.ts +2 -260
- package/dist/SiteHeader/SiteHeader.cjs.js +17 -669
- package/dist/SiteHeader/SiteHeader.esm.d.ts +2 -260
- package/dist/SiteHeader/SiteHeader.esm.js +15 -667
- package/dist/Surface/Surface.cjs.d.ts +1 -1
- package/dist/Surface/Surface.cjs.js +1 -1
- package/dist/Surface/Surface.esm.d.ts +1 -1
- package/dist/Surface/Surface.esm.js +1 -1
- package/dist/Switch/Switch.cjs.d.ts +2 -2
- package/dist/Switch/Switch.cjs.js +8 -7
- package/dist/Switch/Switch.esm.d.ts +2 -2
- package/dist/Switch/Switch.esm.js +7 -6
- package/dist/Tag/Tag.cjs.js +2 -2
- package/dist/Tag/Tag.esm.js +2 -2
- package/dist/Text/Text.cjs.d.ts +1 -1
- package/dist/Text/Text.cjs.js +2 -2
- package/dist/Text/Text.esm.d.ts +1 -1
- package/dist/Text/Text.esm.js +2 -2
- package/dist/TextArea/TextArea.cjs.d.ts +61 -0
- package/dist/TextArea/TextArea.cjs.js +87 -0
- package/dist/TextArea/TextArea.esm.d.ts +61 -0
- package/dist/TextArea/TextArea.esm.js +79 -0
- package/dist/TextArea/package.json +7 -0
- package/dist/TextInput/TextInput.cjs.d.ts +1 -75
- package/dist/TextInput/TextInput.cjs.js +10 -76
- package/dist/TextInput/TextInput.esm.d.ts +1 -75
- package/dist/TextInput/TextInput.esm.js +9 -75
- package/dist/UniversalHeader/UniversalHeader.cjs.d.ts +1 -26
- package/dist/UniversalHeader/UniversalHeader.cjs.js +5 -30
- package/dist/UniversalHeader/UniversalHeader.esm.d.ts +1 -26
- package/dist/UniversalHeader/UniversalHeader.esm.js +4 -29
- package/dist/_shared/cjs/Box-ebe2b7be.d.ts +39 -0
- package/dist/_shared/cjs/Box-ebe2b7be.js +30 -0
- package/dist/_shared/cjs/{BrandLogo-8008f0c4.js → BrandLogo-8107d59f.js} +1 -1
- package/dist/_shared/cjs/Breadcrumbs-9f580f69.d.ts +61 -0
- package/dist/_shared/cjs/Breadcrumbs-9f580f69.js +106 -0
- package/dist/_shared/cjs/BtIconChevronLeftMid-df952a3e.js +31 -0
- package/dist/_shared/cjs/{Button-5dff284a.js → Button-b4d6ccc8.js} +8 -29
- package/dist/_shared/cjs/Card-f1108bfe.d.ts +136 -0
- package/dist/_shared/cjs/Card-f1108bfe.js +124 -0
- package/dist/_shared/cjs/Checkbox-c927b62f.d.ts +64 -0
- package/dist/_shared/cjs/Checkbox-c927b62f.js +62 -0
- package/dist/_shared/cjs/Columns-e90798f8.d.ts +76 -0
- package/dist/_shared/cjs/Columns-e90798f8.js +57 -0
- package/dist/_shared/cjs/{DisclosureMini-5af13d3c.js → DisclosureMini-2a10006e.js} +5 -3
- package/dist/_shared/cjs/Filter-a7574fe7.d.ts +83 -0
- package/dist/_shared/cjs/Filter-a7574fe7.js +121 -0
- package/dist/_shared/{esm/FormControl-0744f93f.d.ts → cjs/FormControl-78b007b7.d.ts} +4 -0
- package/dist/_shared/cjs/{FormControl-42360ae8.js → FormControl-78b007b7.js} +10 -10
- package/dist/_shared/cjs/Group-f85dd4c0.d.ts +46 -0
- package/dist/_shared/cjs/Group-f85dd4c0.js +48 -0
- package/dist/_shared/cjs/{Heading-d45f6a7f.js → Heading-ed1cb455.js} +1 -1
- package/dist/_shared/cjs/{Icon-9ae8dbe1.js → Icon-e1dd45eb.js} +1 -1
- package/dist/_shared/cjs/{Image-3bf4b4f3.js → Image-0e393cbf.js} +2 -0
- package/dist/_shared/cjs/ItemGroup-5af4d600.d.ts +27 -0
- package/dist/_shared/cjs/NavItem-df20237c.d.ts +43 -0
- package/dist/_shared/cjs/NavItemWithSubNav-65f21828.d.ts +49 -0
- package/dist/_shared/cjs/Poster-faea1ad3.d.ts +81 -0
- package/dist/_shared/cjs/Poster-faea1ad3.js +50 -0
- package/dist/_shared/cjs/RadioGroup-8e17de70.d.ts +97 -0
- package/dist/_shared/cjs/RadioGroup-8e17de70.js +70 -0
- package/dist/_shared/cjs/SiteFooter-9f7f9c2d.d.ts +62 -0
- package/dist/_shared/cjs/SiteFooter-9f7f9c2d.js +73 -0
- package/dist/_shared/cjs/SiteHeader-c25ee36e.d.ts +78 -0
- package/dist/_shared/cjs/SiteHeader.rehydrator-ccbebde6.d.ts +78 -0
- package/dist/_shared/cjs/SiteHeader.rehydrator-ccbebde6.js +673 -0
- package/dist/_shared/cjs/SubNavItem-a84d1bf4.d.ts +48 -0
- package/dist/_shared/cjs/{Surface-6da0a78e.d.ts → Surface-b7c51b2b.d.ts} +3 -2
- package/dist/_shared/cjs/{Surface-6da0a78e.js → Surface-b7c51b2b.js} +1 -1
- package/dist/_shared/cjs/{Text-6f2827e6.js → Text-555a29a4.js} +1 -1
- package/dist/_shared/cjs/TextInput-7ed03a48.d.ts +75 -0
- package/dist/_shared/cjs/TextInput-b768e346.d.ts +10 -0
- package/dist/_shared/cjs/TextInput-b768e346.js +78 -0
- package/dist/_shared/cjs/UniversalHeader-da622e1a.d.ts +26 -0
- package/dist/_shared/cjs/UniversalHeader-da622e1a.js +35 -0
- package/dist/_shared/cjs/debounce-506538c5.js +544 -0
- package/dist/_shared/cjs/index-31fbb076.js +1416 -0
- package/dist/_shared/cjs/index-699086a7.d.ts +2 -0
- package/dist/_shared/cjs/index-74488a9f.d.ts +2 -0
- package/dist/_shared/cjs/index-c81c9401.d.ts +3 -3
- package/dist/_shared/cjs/index-e340924e.d.ts +2 -0
- package/dist/_shared/cjs/index-e6d20018.d.ts +3 -0
- package/dist/_shared/cjs/index-eb06f640.d.ts +2 -0
- package/dist/_shared/cjs/index-f419cf04.d.ts +2 -0
- package/dist/_shared/cjs/index.module-5ea728f4.js +23 -0
- package/dist/_shared/cjs/{index.module-af7c85f2.js → index.module-9b87a34d.js} +84 -103
- package/dist/_shared/esm/Box-06d99d8a.d.ts +39 -0
- package/dist/_shared/esm/Box-06d99d8a.js +24 -0
- package/dist/_shared/esm/{BrandLogo-56699561.js → BrandLogo-9ec620e8.js} +1 -1
- package/dist/_shared/esm/Breadcrumbs-5dc0afa7.d.ts +61 -0
- package/dist/_shared/esm/Breadcrumbs-5dc0afa7.js +100 -0
- package/dist/_shared/esm/BtIconChevronLeftMid-9f4f3a3d.js +25 -0
- package/dist/_shared/esm/{Button-61241dd0.js → Button-9c3b0b11.js} +4 -25
- package/dist/_shared/esm/Card-79b6eae0.d.ts +136 -0
- package/dist/_shared/esm/Card-79b6eae0.js +118 -0
- package/dist/_shared/esm/Checkbox-2d144384.d.ts +64 -0
- package/dist/_shared/esm/Checkbox-2d144384.js +56 -0
- package/dist/_shared/esm/Columns-8704515b.d.ts +76 -0
- package/dist/_shared/esm/Columns-8704515b.js +51 -0
- package/dist/_shared/esm/{DisclosureMini-322fccc0.js → DisclosureMini-78a8f392.js} +5 -3
- package/dist/_shared/esm/Filter-a01aed11.d.ts +83 -0
- package/dist/_shared/esm/Filter-a01aed11.js +115 -0
- package/dist/_shared/{cjs/FormControl-42360ae8.d.ts → esm/FormControl-2fa7aae5.d.ts} +4 -0
- package/dist/_shared/esm/{FormControl-0744f93f.js → FormControl-2fa7aae5.js} +10 -10
- package/dist/_shared/esm/Group-fb26fd32.d.ts +46 -0
- package/dist/_shared/esm/Group-fb26fd32.js +42 -0
- package/dist/_shared/esm/{Heading-b61432fb.js → Heading-ee6bec51.js} +1 -1
- package/dist/_shared/esm/{Icon-fd247973.js → Icon-c1af47bc.js} +1 -1
- package/dist/_shared/esm/{Image-3596ce55.js → Image-3ed3863c.js} +2 -1
- package/dist/_shared/esm/ItemGroup-5af4d600.d.ts +27 -0
- package/dist/_shared/esm/NavItem-df20237c.d.ts +43 -0
- package/dist/_shared/esm/NavItemWithSubNav-65f21828.d.ts +49 -0
- package/dist/_shared/esm/Poster-a83ae770.d.ts +81 -0
- package/dist/_shared/esm/Poster-a83ae770.js +44 -0
- package/dist/_shared/esm/RadioGroup-65b8c8bf.d.ts +97 -0
- package/dist/_shared/esm/RadioGroup-65b8c8bf.js +64 -0
- package/dist/_shared/esm/SiteFooter-51bdc7df.d.ts +62 -0
- package/dist/_shared/esm/SiteFooter-51bdc7df.js +67 -0
- package/dist/_shared/esm/SiteHeader-c25ee36e.d.ts +78 -0
- package/dist/_shared/esm/SiteHeader.rehydrator-382d1c03.d.ts +78 -0
- package/dist/_shared/esm/SiteHeader.rehydrator-382d1c03.js +666 -0
- package/dist/_shared/esm/SubNavItem-a84d1bf4.d.ts +48 -0
- package/dist/_shared/esm/{Surface-bb100ef8.d.ts → Surface-dde51789.d.ts} +3 -2
- package/dist/_shared/esm/{Surface-bb100ef8.js → Surface-dde51789.js} +1 -1
- package/dist/_shared/esm/{Text-00e9743b.js → Text-14deb70e.js} +1 -1
- package/dist/_shared/esm/TextInput-62bb7dee.d.ts +10 -0
- package/dist/_shared/esm/TextInput-62bb7dee.js +72 -0
- package/dist/_shared/esm/TextInput-7ed03a48.d.ts +75 -0
- package/dist/_shared/esm/UniversalHeader-1c5a886d.d.ts +26 -0
- package/dist/_shared/esm/UniversalHeader-1c5a886d.js +29 -0
- package/dist/_shared/esm/debounce-e228705f.js +542 -0
- package/dist/_shared/esm/index-4fa635bd.js +1386 -0
- package/dist/_shared/esm/index-699086a7.d.ts +2 -0
- package/dist/_shared/esm/index-74488a9f.d.ts +2 -0
- package/dist/_shared/esm/index-c81c9401.d.ts +3 -3
- package/dist/_shared/esm/index-e340924e.d.ts +2 -0
- package/dist/_shared/esm/index-e6d20018.d.ts +3 -0
- package/dist/_shared/esm/index-eb06f640.d.ts +2 -0
- package/dist/_shared/esm/index-f419cf04.d.ts +2 -0
- package/dist/_shared/esm/{index.module-599b86dd.js → index.module-216016b5.js} +86 -104
- package/dist/_shared/esm/index.module-88179159.js +21 -0
- package/dist/index.es.js +179 -28
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +180 -27
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Box/Box.d.ts +36 -0
- package/dist/types/components/Box/index.d.ts +1 -0
- package/dist/types/components/Filter/Filter.d.ts +38 -0
- package/dist/types/components/Filter/FilterControls/FilterControl/FilterControl.d.ts +16 -0
- package/dist/types/components/Filter/FilterControls/FilterControls.d.ts +12 -0
- package/dist/types/components/Filter/FilterItems/FilterItem/FilterItem.d.ts +12 -0
- package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +12 -0
- package/dist/types/components/Filter/index.d.ts +1 -0
- package/dist/types/components/FormControl/FormControl.d.ts +4 -0
- package/dist/types/components/Image/index.d.ts +1 -1
- package/dist/types/components/MediaCard/MediaCard.d.ts +57 -0
- package/dist/types/components/MediaCard/index.d.ts +1 -0
- package/dist/types/components/Modal/Modal.stories-wip.d.ts +9 -0
- package/dist/types/components/Pagination/Pagination.d.ts +19 -0
- package/dist/types/components/Pagination/index.d.ts +1 -0
- package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +27 -0
- package/dist/types/components/PaginationSimple/index.d.ts +1 -0
- package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +28 -0
- package/dist/types/components/ProgressStepper/ProgressStepperItem/ProgressStepperItem.d.ts +62 -0
- package/dist/types/components/ProgressStepper/index.d.ts +1 -0
- package/dist/types/components/ProgressStepper/progressStatus.d.ts +1 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/ScrollToTop/ScrollToTop.d.ts +24 -0
- package/dist/types/components/ScrollToTop/index.d.ts +1 -0
- package/dist/types/components/Select/Select.d.ts +1 -1
- package/dist/types/components/Surface/Surface.d.ts +2 -1
- package/dist/types/components/Surface/index.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components/TextArea/TextArea.d.ts +60 -0
- package/dist/types/components/TextArea/index.d.ts +1 -0
- package/dist/types/components/TextInput/TextInput.d.ts +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/hooks/use-pagination.d.ts +1 -0
- package/dist/types/styles.d.ts +10 -0
- package/package.json +4 -4
- /package/dist/_shared/cjs/{BrandLogo-8008f0c4.d.ts → BrandLogo-8107d59f.d.ts} +0 -0
- /package/dist/_shared/cjs/{Button-5dff284a.d.ts → Button-b4d6ccc8.d.ts} +0 -0
- /package/dist/_shared/cjs/{DisclosureMini-5af13d3c.d.ts → DisclosureMini-2a10006e.d.ts} +0 -0
- /package/dist/_shared/cjs/{Heading-d45f6a7f.d.ts → Heading-ed1cb455.d.ts} +0 -0
- /package/dist/_shared/cjs/{Icon-9ae8dbe1.d.ts → Icon-e1dd45eb.d.ts} +0 -0
- /package/dist/_shared/cjs/{Image-3bf4b4f3.d.ts → Image-0e393cbf.d.ts} +0 -0
- /package/dist/_shared/cjs/{Text-6f2827e6.d.ts → Text-555a29a4.d.ts} +0 -0
- /package/dist/_shared/esm/{BrandLogo-56699561.d.ts → BrandLogo-9ec620e8.d.ts} +0 -0
- /package/dist/_shared/esm/{Button-61241dd0.d.ts → Button-9c3b0b11.d.ts} +0 -0
- /package/dist/_shared/esm/{DisclosureMini-322fccc0.d.ts → DisclosureMini-78a8f392.d.ts} +0 -0
- /package/dist/_shared/esm/{Heading-b61432fb.d.ts → Heading-ee6bec51.d.ts} +0 -0
- /package/dist/_shared/esm/{Icon-fd247973.d.ts → Icon-c1af47bc.d.ts} +0 -0
- /package/dist/_shared/esm/{Image-3596ce55.d.ts → Image-3ed3863c.d.ts} +0 -0
- /package/dist/_shared/esm/{Text-00e9743b.d.ts → Text-14deb70e.d.ts} +0 -0
|
@@ -2,46 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('../_shared/cjs/index-45bfb67b.js');
|
|
5
|
+
var index$1 = require('../_shared/cjs/index-45bfb67b.js');
|
|
6
6
|
var React$1 = require('react');
|
|
7
|
-
var index_module = require('../_shared/cjs/index.module-
|
|
7
|
+
var index_module = require('../_shared/cjs/index.module-9b87a34d.js');
|
|
8
8
|
var $7SXl2$reactdom = require('react-dom');
|
|
9
|
+
var index = require('../_shared/cjs/index-31fbb076.js');
|
|
10
|
+
var index_module$1 = require('../_shared/cjs/index.module-5ea728f4.js');
|
|
9
11
|
var BtIconChevronDown2Px = require('../_shared/cjs/BtIconChevronDown2Px-8fb4e2eb.js');
|
|
10
12
|
var BtIconTickAlt2Px = require('../_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js');
|
|
11
|
-
var Icon = require('../_shared/cjs/Icon-
|
|
12
|
-
var FormControl = require('../_shared/cjs/FormControl-
|
|
13
|
-
var Surface = require('../_shared/cjs/Surface-
|
|
13
|
+
var Icon = require('../_shared/cjs/Icon-e1dd45eb.js');
|
|
14
|
+
var FormControl = require('../_shared/cjs/FormControl-78b007b7.js');
|
|
15
|
+
var Surface = require('../_shared/cjs/Surface-b7c51b2b.js');
|
|
14
16
|
var Base = require('../_shared/cjs/Base-569e4334.js');
|
|
15
17
|
require('../_shared/cjs/filter-data-attrs-a30dcf5f.js');
|
|
16
18
|
require('../_shared/cjs/suffix-modifier-1ee2da04.js');
|
|
17
19
|
require('../_shared/cjs/BtIconAlert-637db790.js');
|
|
18
|
-
require('../_shared/cjs/DisclosureMini-
|
|
19
|
-
require('../_shared/cjs/Text-
|
|
20
|
-
require('../_shared/cjs/VerticalSpace-86f697e7.js');
|
|
20
|
+
require('../_shared/cjs/DisclosureMini-2a10006e.js');
|
|
21
|
+
require('../_shared/cjs/Text-555a29a4.js');
|
|
21
22
|
|
|
22
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
24
|
|
|
24
|
-
function _interopNamespace(e) {
|
|
25
|
-
if (e && e.__esModule) return e;
|
|
26
|
-
var n = Object.create(null);
|
|
27
|
-
if (e) {
|
|
28
|
-
Object.keys(e).forEach(function (k) {
|
|
29
|
-
if (k !== 'default') {
|
|
30
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
31
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return e[k]; }
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
n["default"] = e;
|
|
39
|
-
return Object.freeze(n);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
|
|
43
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React$1);
|
|
44
|
-
var $7SXl2$reactdom__default = /*#__PURE__*/_interopDefaultLegacy($7SXl2$reactdom);
|
|
45
26
|
|
|
46
27
|
function $ae6933e535247d3d$export$7d15b64cf5a3a4c4(value, [min, max]) {
|
|
47
28
|
return Math.min(max, Math.max(min, value));
|
|
@@ -140,543 +121,6 @@ const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ React$1.createConte
|
|
|
140
121
|
return localDir || globalDir || 'ltr';
|
|
141
122
|
}
|
|
142
123
|
|
|
143
|
-
/**
|
|
144
|
-
* Listens for when the escape key is down
|
|
145
|
-
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
146
|
-
const onEscapeKeyDown = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
147
|
-
React$1.useEffect(()=>{
|
|
148
|
-
const handleKeyDown = (event)=>{
|
|
149
|
-
if (event.key === 'Escape') onEscapeKeyDown(event);
|
|
150
|
-
};
|
|
151
|
-
ownerDocument.addEventListener('keydown', handleKeyDown);
|
|
152
|
-
return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown)
|
|
153
|
-
;
|
|
154
|
-
}, [
|
|
155
|
-
onEscapeKeyDown,
|
|
156
|
-
ownerDocument
|
|
157
|
-
]);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
|
|
161
|
-
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
|
|
162
|
-
const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
|
|
163
|
-
let $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
164
|
-
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ React$1.createContext({
|
|
165
|
-
layers: new Set(),
|
|
166
|
-
layersWithOutsidePointerEventsDisabled: new Set(),
|
|
167
|
-
branches: new Set()
|
|
168
|
-
});
|
|
169
|
-
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
170
|
-
var _node$ownerDocument;
|
|
171
|
-
const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
|
|
172
|
-
const context = React$1.useContext($5cb92bef7577960e$var$DismissableLayerContext);
|
|
173
|
-
const [node1, setNode] = React$1.useState(null);
|
|
174
|
-
const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
175
|
-
const [, force] = React$1.useState({});
|
|
176
|
-
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
|
|
177
|
-
);
|
|
178
|
-
const layers = Array.from(context.layers);
|
|
179
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
180
|
-
...context.layersWithOutsidePointerEventsDisabled
|
|
181
|
-
].slice(-1); // prettier-ignore
|
|
182
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
|
|
183
|
-
const index = node1 ? layers.indexOf(node1) : -1;
|
|
184
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
185
|
-
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
186
|
-
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
|
|
187
|
-
const target = event.target;
|
|
188
|
-
const isPointerDownOnBranch = [
|
|
189
|
-
...context.branches
|
|
190
|
-
].some((branch)=>branch.contains(target)
|
|
191
|
-
);
|
|
192
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
193
|
-
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
|
|
194
|
-
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
195
|
-
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
196
|
-
}, ownerDocument);
|
|
197
|
-
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
|
|
198
|
-
const target = event.target;
|
|
199
|
-
const isFocusInBranch = [
|
|
200
|
-
...context.branches
|
|
201
|
-
].some((branch)=>branch.contains(target)
|
|
202
|
-
);
|
|
203
|
-
if (isFocusInBranch) return;
|
|
204
|
-
onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
|
|
205
|
-
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
206
|
-
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
207
|
-
}, ownerDocument);
|
|
208
|
-
$addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
|
|
209
|
-
const isHighestLayer = index === context.layers.size - 1;
|
|
210
|
-
if (!isHighestLayer) return;
|
|
211
|
-
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
|
|
212
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
213
|
-
event.preventDefault();
|
|
214
|
-
onDismiss();
|
|
215
|
-
}
|
|
216
|
-
}, ownerDocument);
|
|
217
|
-
React$1.useEffect(()=>{
|
|
218
|
-
if (!node1) return;
|
|
219
|
-
if (disableOutsidePointerEvents) {
|
|
220
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
221
|
-
$5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
222
|
-
ownerDocument.body.style.pointerEvents = 'none';
|
|
223
|
-
}
|
|
224
|
-
context.layersWithOutsidePointerEventsDisabled.add(node1);
|
|
225
|
-
}
|
|
226
|
-
context.layers.add(node1);
|
|
227
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
228
|
-
return ()=>{
|
|
229
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
230
|
-
};
|
|
231
|
-
}, [
|
|
232
|
-
node1,
|
|
233
|
-
ownerDocument,
|
|
234
|
-
disableOutsidePointerEvents,
|
|
235
|
-
context
|
|
236
|
-
]);
|
|
237
|
-
/**
|
|
238
|
-
* We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
|
|
239
|
-
* because a change to `disableOutsidePointerEvents` would remove this layer from the stack
|
|
240
|
-
* and add it to the end again so the layering order wouldn't be _creation order_.
|
|
241
|
-
* We only want them to be removed from context stacks when unmounted.
|
|
242
|
-
*/ React$1.useEffect(()=>{
|
|
243
|
-
return ()=>{
|
|
244
|
-
if (!node1) return;
|
|
245
|
-
context.layers.delete(node1);
|
|
246
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node1);
|
|
247
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
248
|
-
};
|
|
249
|
-
}, [
|
|
250
|
-
node1,
|
|
251
|
-
context
|
|
252
|
-
]);
|
|
253
|
-
React$1.useEffect(()=>{
|
|
254
|
-
const handleUpdate = ()=>force({})
|
|
255
|
-
;
|
|
256
|
-
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
257
|
-
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
|
|
258
|
-
;
|
|
259
|
-
}, []);
|
|
260
|
-
return /*#__PURE__*/ React$1.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_module._extends({}, layerProps, {
|
|
261
|
-
ref: composedRefs,
|
|
262
|
-
style: {
|
|
263
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
|
|
264
|
-
...props.style
|
|
265
|
-
},
|
|
266
|
-
onFocusCapture: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
267
|
-
onBlurCapture: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
268
|
-
onPointerDownCapture: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
269
|
-
}));
|
|
270
|
-
});
|
|
271
|
-
/* -----------------------------------------------------------------------------------------------*/ /**
|
|
272
|
-
* Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
|
|
273
|
-
* to mimic layer dismissing behaviour present in OS.
|
|
274
|
-
* Returns props to pass to the node we want to check for outside events.
|
|
275
|
-
*/ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
276
|
-
const handlePointerDownOutside = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
277
|
-
const isPointerInsideReactTreeRef = React$1.useRef(false);
|
|
278
|
-
const handleClickRef = React$1.useRef(()=>{});
|
|
279
|
-
React$1.useEffect(()=>{
|
|
280
|
-
const handlePointerDown = (event)=>{
|
|
281
|
-
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
282
|
-
const eventDetail = {
|
|
283
|
-
originalEvent: event
|
|
284
|
-
};
|
|
285
|
-
function handleAndDispatchPointerDownOutsideEvent() {
|
|
286
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
287
|
-
discrete: true
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* On touch devices, we need to wait for a click event because browsers implement
|
|
292
|
-
* a ~350ms delay between the time the user stops touching the display and when the
|
|
293
|
-
* browser executres events. We need to ensure we don't reactivate pointer-events within
|
|
294
|
-
* this timeframe otherwise the browser may execute events that should have been prevented.
|
|
295
|
-
*
|
|
296
|
-
* Additionally, this also lets us deal automatically with cancellations when a click event
|
|
297
|
-
* isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
|
|
298
|
-
*
|
|
299
|
-
* This is why we also continuously remove the previous listener, because we cannot be
|
|
300
|
-
* certain that it was raised, and therefore cleaned-up.
|
|
301
|
-
*/ if (event.pointerType === 'touch') {
|
|
302
|
-
ownerDocument.removeEventListener('click', handleClickRef.current);
|
|
303
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
|
|
304
|
-
ownerDocument.addEventListener('click', handleClickRef.current, {
|
|
305
|
-
once: true
|
|
306
|
-
});
|
|
307
|
-
} else handleAndDispatchPointerDownOutsideEvent();
|
|
308
|
-
}
|
|
309
|
-
isPointerInsideReactTreeRef.current = false;
|
|
310
|
-
};
|
|
311
|
-
/**
|
|
312
|
-
* if this hook executes in a component that mounts via a `pointerdown` event, the event
|
|
313
|
-
* would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
|
|
314
|
-
* this by delaying the event listener registration on the document.
|
|
315
|
-
* This is not React specific, but rather how the DOM works, ie:
|
|
316
|
-
* ```
|
|
317
|
-
* button.addEventListener('pointerdown', () => {
|
|
318
|
-
* console.log('I will log');
|
|
319
|
-
* document.addEventListener('pointerdown', () => {
|
|
320
|
-
* console.log('I will also log');
|
|
321
|
-
* })
|
|
322
|
-
* });
|
|
323
|
-
*/ const timerId = window.setTimeout(()=>{
|
|
324
|
-
ownerDocument.addEventListener('pointerdown', handlePointerDown);
|
|
325
|
-
}, 0);
|
|
326
|
-
return ()=>{
|
|
327
|
-
window.clearTimeout(timerId);
|
|
328
|
-
ownerDocument.removeEventListener('pointerdown', handlePointerDown);
|
|
329
|
-
ownerDocument.removeEventListener('click', handleClickRef.current);
|
|
330
|
-
};
|
|
331
|
-
}, [
|
|
332
|
-
ownerDocument,
|
|
333
|
-
handlePointerDownOutside
|
|
334
|
-
]);
|
|
335
|
-
return {
|
|
336
|
-
// ensures we check React component tree (not just DOM tree)
|
|
337
|
-
onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Listens for when focus happens outside a react subtree.
|
|
342
|
-
* Returns props to pass to the root (node) of the subtree we want to check.
|
|
343
|
-
*/ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
344
|
-
const handleFocusOutside = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
345
|
-
const isFocusInsideReactTreeRef = React$1.useRef(false);
|
|
346
|
-
React$1.useEffect(()=>{
|
|
347
|
-
const handleFocus = (event)=>{
|
|
348
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
349
|
-
const eventDetail = {
|
|
350
|
-
originalEvent: event
|
|
351
|
-
};
|
|
352
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
353
|
-
discrete: false
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
ownerDocument.addEventListener('focusin', handleFocus);
|
|
358
|
-
return ()=>ownerDocument.removeEventListener('focusin', handleFocus)
|
|
359
|
-
;
|
|
360
|
-
}, [
|
|
361
|
-
ownerDocument,
|
|
362
|
-
handleFocusOutside
|
|
363
|
-
]);
|
|
364
|
-
return {
|
|
365
|
-
onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true
|
|
366
|
-
,
|
|
367
|
-
onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
function $5cb92bef7577960e$var$dispatchUpdate() {
|
|
371
|
-
const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
|
|
372
|
-
document.dispatchEvent(event);
|
|
373
|
-
}
|
|
374
|
-
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
|
|
375
|
-
const target = detail.originalEvent.target;
|
|
376
|
-
const event = new CustomEvent(name, {
|
|
377
|
-
bubbles: false,
|
|
378
|
-
cancelable: true,
|
|
379
|
-
detail: detail
|
|
380
|
-
});
|
|
381
|
-
if (handler) target.addEventListener(name, handler, {
|
|
382
|
-
once: true
|
|
383
|
-
});
|
|
384
|
-
if (discrete) index_module.$8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
|
|
385
|
-
else target.dispatchEvent(event);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
/** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;
|
|
389
|
-
/**
|
|
390
|
-
* Injects a pair of focus guards at the edges of the whole DOM tree
|
|
391
|
-
* to ensure `focusin` & `focusout` events can be caught consistently.
|
|
392
|
-
*/ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
|
|
393
|
-
React$1.useEffect(()=>{
|
|
394
|
-
var _edgeGuards$, _edgeGuards$2;
|
|
395
|
-
const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
|
|
396
|
-
document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
|
|
397
|
-
document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
|
|
398
|
-
$3db38b7d1fb3fe6a$var$count++;
|
|
399
|
-
return ()=>{
|
|
400
|
-
if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
|
|
401
|
-
);
|
|
402
|
-
$3db38b7d1fb3fe6a$var$count--;
|
|
403
|
-
};
|
|
404
|
-
}, []);
|
|
405
|
-
}
|
|
406
|
-
function $3db38b7d1fb3fe6a$var$createFocusGuard() {
|
|
407
|
-
const element = document.createElement('span');
|
|
408
|
-
element.setAttribute('data-radix-focus-guard', '');
|
|
409
|
-
element.tabIndex = 0;
|
|
410
|
-
element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
|
|
411
|
-
return element;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
|
|
415
|
-
const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
|
|
416
|
-
const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
|
|
417
|
-
bubbles: false,
|
|
418
|
-
cancelable: true
|
|
419
|
-
};
|
|
420
|
-
const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
421
|
-
const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
|
|
422
|
-
const [container1, setContainer] = React$1.useState(null);
|
|
423
|
-
const onMountAutoFocus = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
|
|
424
|
-
const onUnmountAutoFocus = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
|
|
425
|
-
const lastFocusedElementRef = React$1.useRef(null);
|
|
426
|
-
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
|
|
427
|
-
);
|
|
428
|
-
const focusScope = React$1.useRef({
|
|
429
|
-
paused: false,
|
|
430
|
-
pause () {
|
|
431
|
-
this.paused = true;
|
|
432
|
-
},
|
|
433
|
-
resume () {
|
|
434
|
-
this.paused = false;
|
|
435
|
-
}
|
|
436
|
-
}).current; // Takes care of trapping focus if focus is moved outside programmatically for example
|
|
437
|
-
React$1.useEffect(()=>{
|
|
438
|
-
if (trapped) {
|
|
439
|
-
function handleFocusIn(event) {
|
|
440
|
-
if (focusScope.paused || !container1) return;
|
|
441
|
-
const target = event.target;
|
|
442
|
-
if (container1.contains(target)) lastFocusedElementRef.current = target;
|
|
443
|
-
else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
|
|
444
|
-
select: true
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
function handleFocusOut(event) {
|
|
448
|
-
if (focusScope.paused || !container1) return;
|
|
449
|
-
if (!container1.contains(event.relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
|
|
450
|
-
select: true
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
document.addEventListener('focusin', handleFocusIn);
|
|
454
|
-
document.addEventListener('focusout', handleFocusOut);
|
|
455
|
-
return ()=>{
|
|
456
|
-
document.removeEventListener('focusin', handleFocusIn);
|
|
457
|
-
document.removeEventListener('focusout', handleFocusOut);
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
}, [
|
|
461
|
-
trapped,
|
|
462
|
-
container1,
|
|
463
|
-
focusScope.paused
|
|
464
|
-
]);
|
|
465
|
-
React$1.useEffect(()=>{
|
|
466
|
-
if (container1) {
|
|
467
|
-
$d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
|
|
468
|
-
const previouslyFocusedElement = document.activeElement;
|
|
469
|
-
const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
|
|
470
|
-
if (!hasFocusedCandidate) {
|
|
471
|
-
const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
|
|
472
|
-
container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
473
|
-
container1.dispatchEvent(mountEvent);
|
|
474
|
-
if (!mountEvent.defaultPrevented) {
|
|
475
|
-
$d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
|
|
476
|
-
select: true
|
|
477
|
-
});
|
|
478
|
-
if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
return ()=>{
|
|
482
|
-
container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
|
|
483
|
-
// We need to delay the focus a little to get around it for now.
|
|
484
|
-
// See: https://github.com/facebook/react/issues/17894
|
|
485
|
-
setTimeout(()=>{
|
|
486
|
-
const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
|
|
487
|
-
container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
488
|
-
container1.dispatchEvent(unmountEvent);
|
|
489
|
-
if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
|
|
490
|
-
select: true
|
|
491
|
-
});
|
|
492
|
-
// we need to remove the listener after we `dispatchEvent`
|
|
493
|
-
container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
494
|
-
$d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
|
|
495
|
-
}, 0);
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
}, [
|
|
499
|
-
container1,
|
|
500
|
-
onMountAutoFocus,
|
|
501
|
-
onUnmountAutoFocus,
|
|
502
|
-
focusScope
|
|
503
|
-
]); // Takes care of looping focus (when tabbing whilst at the edges)
|
|
504
|
-
const handleKeyDown = React$1.useCallback((event)=>{
|
|
505
|
-
if (!loop && !trapped) return;
|
|
506
|
-
if (focusScope.paused) return;
|
|
507
|
-
const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
508
|
-
const focusedElement = document.activeElement;
|
|
509
|
-
if (isTabKey && focusedElement) {
|
|
510
|
-
const container = event.currentTarget;
|
|
511
|
-
const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
|
|
512
|
-
const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
|
|
513
|
-
if (!hasTabbableElementsInside) {
|
|
514
|
-
if (focusedElement === container) event.preventDefault();
|
|
515
|
-
} else {
|
|
516
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
517
|
-
event.preventDefault();
|
|
518
|
-
if (loop) $d3863c46a17e8a28$var$focus(first, {
|
|
519
|
-
select: true
|
|
520
|
-
});
|
|
521
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
522
|
-
event.preventDefault();
|
|
523
|
-
if (loop) $d3863c46a17e8a28$var$focus(last, {
|
|
524
|
-
select: true
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}, [
|
|
530
|
-
loop,
|
|
531
|
-
trapped,
|
|
532
|
-
focusScope.paused
|
|
533
|
-
]);
|
|
534
|
-
return /*#__PURE__*/ React$1.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_module._extends({
|
|
535
|
-
tabIndex: -1
|
|
536
|
-
}, scopeProps, {
|
|
537
|
-
ref: composedRefs,
|
|
538
|
-
onKeyDown: handleKeyDown
|
|
539
|
-
}));
|
|
540
|
-
});
|
|
541
|
-
/* -------------------------------------------------------------------------------------------------
|
|
542
|
-
* Utils
|
|
543
|
-
* -----------------------------------------------------------------------------------------------*/ /**
|
|
544
|
-
* Attempts focusing the first element in a list of candidates.
|
|
545
|
-
* Stops when focus has actually moved.
|
|
546
|
-
*/ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {
|
|
547
|
-
const previouslyFocusedElement = document.activeElement;
|
|
548
|
-
for (const candidate of candidates){
|
|
549
|
-
$d3863c46a17e8a28$var$focus(candidate, {
|
|
550
|
-
select: select
|
|
551
|
-
});
|
|
552
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Returns the first and last tabbable elements inside a container.
|
|
557
|
-
*/ function $d3863c46a17e8a28$var$getTabbableEdges(container) {
|
|
558
|
-
const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
|
|
559
|
-
const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
|
|
560
|
-
const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
|
|
561
|
-
return [
|
|
562
|
-
first,
|
|
563
|
-
last
|
|
564
|
-
];
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Returns a list of potential tabbable candidates.
|
|
568
|
-
*
|
|
569
|
-
* NOTE: This is only a close approximation. For example it doesn't take into account cases like when
|
|
570
|
-
* elements are not visible. This cannot be worked out easily by just reading a property, but rather
|
|
571
|
-
* necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
|
|
572
|
-
*
|
|
573
|
-
* See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
|
|
574
|
-
* Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
|
|
575
|
-
*/ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
|
|
576
|
-
const nodes = [];
|
|
577
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
578
|
-
acceptNode: (node)=>{
|
|
579
|
-
const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
|
|
580
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
|
|
581
|
-
// runtime's understanding of tabbability, so this automatically accounts
|
|
582
|
-
// for any kind of element that could be tabbed to.
|
|
583
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
584
|
-
}
|
|
585
|
-
});
|
|
586
|
-
while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
|
|
587
|
-
// hinders accessibility to have tab order different from visual order.
|
|
588
|
-
return nodes;
|
|
589
|
-
}
|
|
590
|
-
/**
|
|
591
|
-
* Returns the first visible element in a list.
|
|
592
|
-
* NOTE: Only checks visibility up to the `container`.
|
|
593
|
-
*/ function $d3863c46a17e8a28$var$findVisible(elements, container) {
|
|
594
|
-
for (const element of elements){
|
|
595
|
-
// we stop checking if it's hidden at the `container` level (excluding)
|
|
596
|
-
if (!$d3863c46a17e8a28$var$isHidden(element, {
|
|
597
|
-
upTo: container
|
|
598
|
-
})) return element;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
function $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {
|
|
602
|
-
if (getComputedStyle(node).visibility === 'hidden') return true;
|
|
603
|
-
while(node){
|
|
604
|
-
// we stop at `upTo` (excluding it)
|
|
605
|
-
if (upTo !== undefined && node === upTo) return false;
|
|
606
|
-
if (getComputedStyle(node).display === 'none') return true;
|
|
607
|
-
node = node.parentElement;
|
|
608
|
-
}
|
|
609
|
-
return false;
|
|
610
|
-
}
|
|
611
|
-
function $d3863c46a17e8a28$var$isSelectableInput(element) {
|
|
612
|
-
return element instanceof HTMLInputElement && 'select' in element;
|
|
613
|
-
}
|
|
614
|
-
function $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {
|
|
615
|
-
// only focus if that element is focusable
|
|
616
|
-
if (element && element.focus) {
|
|
617
|
-
const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
|
|
618
|
-
element.focus({
|
|
619
|
-
preventScroll: true
|
|
620
|
-
}); // only select if its not the same element, it supports selection and we need to select
|
|
621
|
-
if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
/* -------------------------------------------------------------------------------------------------
|
|
625
|
-
* FocusScope stack
|
|
626
|
-
* -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
|
|
627
|
-
function $d3863c46a17e8a28$var$createFocusScopesStack() {
|
|
628
|
-
/** A stack of focus scopes, with the active one at the top */ let stack = [];
|
|
629
|
-
return {
|
|
630
|
-
add (focusScope) {
|
|
631
|
-
// pause the currently active focus scope (at the top of the stack)
|
|
632
|
-
const activeFocusScope = stack[0];
|
|
633
|
-
if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
|
|
634
|
-
// remove in case it already exists (because we'll re-add it at the top of the stack)
|
|
635
|
-
stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
|
|
636
|
-
stack.unshift(focusScope);
|
|
637
|
-
},
|
|
638
|
-
remove (focusScope) {
|
|
639
|
-
var _stack$;
|
|
640
|
-
stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
|
|
641
|
-
(_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
function $d3863c46a17e8a28$var$arrayRemove(array, item) {
|
|
646
|
-
const updatedArray = [
|
|
647
|
-
...array
|
|
648
|
-
];
|
|
649
|
-
const index = updatedArray.indexOf(item);
|
|
650
|
-
if (index !== -1) updatedArray.splice(index, 1);
|
|
651
|
-
return updatedArray;
|
|
652
|
-
}
|
|
653
|
-
function $d3863c46a17e8a28$var$removeLinks(items) {
|
|
654
|
-
return items.filter((item)=>item.tagName !== 'A'
|
|
655
|
-
);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
const $1746a345f3d73bb7$var$useReactId = React__namespace['useId'.toString()] || (()=>undefined
|
|
659
|
-
);
|
|
660
|
-
let $1746a345f3d73bb7$var$count = 0;
|
|
661
|
-
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
662
|
-
const [id, setId] = React__namespace.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
|
|
663
|
-
index_module.$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
664
|
-
if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
|
|
665
|
-
);
|
|
666
|
-
}, [
|
|
667
|
-
deterministicId
|
|
668
|
-
]);
|
|
669
|
-
return deterministicId || (id ? `radix-${id}` : '');
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
673
|
-
var _globalThis$document;
|
|
674
|
-
const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;
|
|
675
|
-
return container ? /*#__PURE__*/ $7SXl2$reactdom__default["default"].createPortal(/*#__PURE__*/ React$1.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, index_module._extends({}, portalProps, {
|
|
676
|
-
ref: forwardedRef
|
|
677
|
-
})), container) : null;
|
|
678
|
-
});
|
|
679
|
-
|
|
680
124
|
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
681
125
|
return /*#__PURE__*/ React$1.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.span, index_module._extends({}, props, {
|
|
682
126
|
ref: forwardedRef,
|
|
@@ -697,849 +141,6 @@ const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ React$1.forwardR
|
|
|
697
141
|
}));
|
|
698
142
|
});
|
|
699
143
|
|
|
700
|
-
var getDefaultParent = function (originalTarget) {
|
|
701
|
-
if (typeof document === 'undefined') {
|
|
702
|
-
return null;
|
|
703
|
-
}
|
|
704
|
-
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
705
|
-
return sampleTarget.ownerDocument.body;
|
|
706
|
-
};
|
|
707
|
-
var counterMap = new WeakMap();
|
|
708
|
-
var uncontrolledNodes = new WeakMap();
|
|
709
|
-
var markerMap = {};
|
|
710
|
-
var lockCount = 0;
|
|
711
|
-
var unwrapHost = function (node) {
|
|
712
|
-
return node && (node.host || unwrapHost(node.parentNode));
|
|
713
|
-
};
|
|
714
|
-
var correctTargets = function (parent, targets) {
|
|
715
|
-
return targets.map(function (target) {
|
|
716
|
-
if (parent.contains(target)) {
|
|
717
|
-
return target;
|
|
718
|
-
}
|
|
719
|
-
var correctedTarget = unwrapHost(target);
|
|
720
|
-
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
721
|
-
return correctedTarget;
|
|
722
|
-
}
|
|
723
|
-
console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
|
|
724
|
-
return null;
|
|
725
|
-
}).filter(function (x) { return Boolean(x); });
|
|
726
|
-
};
|
|
727
|
-
/**
|
|
728
|
-
* Marks everything except given node(or nodes) as aria-hidden
|
|
729
|
-
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
730
|
-
* @param [parentNode] - top element, defaults to document.body
|
|
731
|
-
* @param {String} [markerName] - a special attribute to mark every node
|
|
732
|
-
* @param {String} [controlAttribute] - html Attribute to control
|
|
733
|
-
* @return {Undo} undo command
|
|
734
|
-
*/
|
|
735
|
-
var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
|
|
736
|
-
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
737
|
-
if (!markerMap[markerName]) {
|
|
738
|
-
markerMap[markerName] = new WeakMap();
|
|
739
|
-
}
|
|
740
|
-
var markerCounter = markerMap[markerName];
|
|
741
|
-
var hiddenNodes = [];
|
|
742
|
-
var elementsToKeep = new Set();
|
|
743
|
-
var elementsToStop = new Set(targets);
|
|
744
|
-
var keep = function (el) {
|
|
745
|
-
if (!el || elementsToKeep.has(el)) {
|
|
746
|
-
return;
|
|
747
|
-
}
|
|
748
|
-
elementsToKeep.add(el);
|
|
749
|
-
keep(el.parentNode);
|
|
750
|
-
};
|
|
751
|
-
targets.forEach(keep);
|
|
752
|
-
var deep = function (parent) {
|
|
753
|
-
if (!parent || elementsToStop.has(parent)) {
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
Array.prototype.forEach.call(parent.children, function (node) {
|
|
757
|
-
if (elementsToKeep.has(node)) {
|
|
758
|
-
deep(node);
|
|
759
|
-
}
|
|
760
|
-
else {
|
|
761
|
-
var attr = node.getAttribute(controlAttribute);
|
|
762
|
-
var alreadyHidden = attr !== null && attr !== 'false';
|
|
763
|
-
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
764
|
-
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
765
|
-
counterMap.set(node, counterValue);
|
|
766
|
-
markerCounter.set(node, markerValue);
|
|
767
|
-
hiddenNodes.push(node);
|
|
768
|
-
if (counterValue === 1 && alreadyHidden) {
|
|
769
|
-
uncontrolledNodes.set(node, true);
|
|
770
|
-
}
|
|
771
|
-
if (markerValue === 1) {
|
|
772
|
-
node.setAttribute(markerName, 'true');
|
|
773
|
-
}
|
|
774
|
-
if (!alreadyHidden) {
|
|
775
|
-
node.setAttribute(controlAttribute, 'true');
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
};
|
|
780
|
-
deep(parentNode);
|
|
781
|
-
elementsToKeep.clear();
|
|
782
|
-
lockCount++;
|
|
783
|
-
return function () {
|
|
784
|
-
hiddenNodes.forEach(function (node) {
|
|
785
|
-
var counterValue = counterMap.get(node) - 1;
|
|
786
|
-
var markerValue = markerCounter.get(node) - 1;
|
|
787
|
-
counterMap.set(node, counterValue);
|
|
788
|
-
markerCounter.set(node, markerValue);
|
|
789
|
-
if (!counterValue) {
|
|
790
|
-
if (!uncontrolledNodes.has(node)) {
|
|
791
|
-
node.removeAttribute(controlAttribute);
|
|
792
|
-
}
|
|
793
|
-
uncontrolledNodes.delete(node);
|
|
794
|
-
}
|
|
795
|
-
if (!markerValue) {
|
|
796
|
-
node.removeAttribute(markerName);
|
|
797
|
-
}
|
|
798
|
-
});
|
|
799
|
-
lockCount--;
|
|
800
|
-
if (!lockCount) {
|
|
801
|
-
// clear
|
|
802
|
-
counterMap = new WeakMap();
|
|
803
|
-
counterMap = new WeakMap();
|
|
804
|
-
uncontrolledNodes = new WeakMap();
|
|
805
|
-
markerMap = {};
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
};
|
|
809
|
-
/**
|
|
810
|
-
* Marks everything except given node(or nodes) as aria-hidden
|
|
811
|
-
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
812
|
-
* @param [parentNode] - top element, defaults to document.body
|
|
813
|
-
* @param {String} [markerName] - a special attribute to mark every node
|
|
814
|
-
* @return {Undo} undo command
|
|
815
|
-
*/
|
|
816
|
-
var hideOthers = function (originalTarget, parentNode, markerName) {
|
|
817
|
-
if (markerName === void 0) { markerName = 'data-aria-hidden'; }
|
|
818
|
-
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
819
|
-
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
820
|
-
if (!activeParentNode) {
|
|
821
|
-
return function () { return null; };
|
|
822
|
-
}
|
|
823
|
-
// we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10
|
|
824
|
-
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));
|
|
825
|
-
return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
|
|
826
|
-
};
|
|
827
|
-
|
|
828
|
-
/******************************************************************************
|
|
829
|
-
Copyright (c) Microsoft Corporation.
|
|
830
|
-
|
|
831
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
832
|
-
purpose with or without fee is hereby granted.
|
|
833
|
-
|
|
834
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
835
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
836
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
837
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
838
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
839
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
840
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
841
|
-
***************************************************************************** */
|
|
842
|
-
|
|
843
|
-
var __assign$1 = function() {
|
|
844
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
845
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
846
|
-
s = arguments[i];
|
|
847
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
848
|
-
}
|
|
849
|
-
return t;
|
|
850
|
-
};
|
|
851
|
-
return __assign$1.apply(this, arguments);
|
|
852
|
-
};
|
|
853
|
-
|
|
854
|
-
function __rest$1(s, e) {
|
|
855
|
-
var t = {};
|
|
856
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
857
|
-
t[p] = s[p];
|
|
858
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
859
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
860
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
861
|
-
t[p[i]] = s[p[i]];
|
|
862
|
-
}
|
|
863
|
-
return t;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
function __spreadArray(to, from, pack) {
|
|
867
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
868
|
-
if (ar || !(i in from)) {
|
|
869
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
870
|
-
ar[i] = from[i];
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
var zeroRightClassName = 'right-scroll-bar-position';
|
|
877
|
-
var fullWidthClassName = 'width-before-scroll-bar';
|
|
878
|
-
var noScrollbarsClassName = 'with-scroll-bars-hidden';
|
|
879
|
-
/**
|
|
880
|
-
* Name of a CSS variable containing the amount of "hidden" scrollbar
|
|
881
|
-
* ! might be undefined ! use will fallback!
|
|
882
|
-
*/
|
|
883
|
-
var removedBarSizeVariable = '--removed-body-scroll-bar-size';
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* Assigns a value for a given ref, no matter of the ref format
|
|
887
|
-
* @param {RefObject} ref - a callback function or ref object
|
|
888
|
-
* @param value - a new value
|
|
889
|
-
*
|
|
890
|
-
* @see https://github.com/theKashey/use-callback-ref#assignref
|
|
891
|
-
* @example
|
|
892
|
-
* const refObject = useRef();
|
|
893
|
-
* const refFn = (ref) => {....}
|
|
894
|
-
*
|
|
895
|
-
* assignRef(refObject, "refValue");
|
|
896
|
-
* assignRef(refFn, "refValue");
|
|
897
|
-
*/
|
|
898
|
-
function assignRef(ref, value) {
|
|
899
|
-
if (typeof ref === 'function') {
|
|
900
|
-
ref(value);
|
|
901
|
-
}
|
|
902
|
-
else if (ref) {
|
|
903
|
-
ref.current = value;
|
|
904
|
-
}
|
|
905
|
-
return ref;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* creates a MutableRef with ref change callback
|
|
910
|
-
* @param initialValue - initial ref value
|
|
911
|
-
* @param {Function} callback - a callback to run when value changes
|
|
912
|
-
*
|
|
913
|
-
* @example
|
|
914
|
-
* const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
|
|
915
|
-
* ref.current = 1;
|
|
916
|
-
* // prints 0 -> 1
|
|
917
|
-
*
|
|
918
|
-
* @see https://reactjs.org/docs/hooks-reference.html#useref
|
|
919
|
-
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
|
|
920
|
-
* @returns {MutableRefObject}
|
|
921
|
-
*/
|
|
922
|
-
function useCallbackRef(initialValue, callback) {
|
|
923
|
-
var ref = React$1.useState(function () { return ({
|
|
924
|
-
// value
|
|
925
|
-
value: initialValue,
|
|
926
|
-
// last callback
|
|
927
|
-
callback: callback,
|
|
928
|
-
// "memoized" public interface
|
|
929
|
-
facade: {
|
|
930
|
-
get current() {
|
|
931
|
-
return ref.value;
|
|
932
|
-
},
|
|
933
|
-
set current(value) {
|
|
934
|
-
var last = ref.value;
|
|
935
|
-
if (last !== value) {
|
|
936
|
-
ref.value = value;
|
|
937
|
-
ref.callback(value, last);
|
|
938
|
-
}
|
|
939
|
-
},
|
|
940
|
-
},
|
|
941
|
-
}); })[0];
|
|
942
|
-
// update callback
|
|
943
|
-
ref.callback = callback;
|
|
944
|
-
return ref.facade;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* Merges two or more refs together providing a single interface to set their value
|
|
949
|
-
* @param {RefObject|Ref} refs
|
|
950
|
-
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
|
|
951
|
-
*
|
|
952
|
-
* @see {@link mergeRefs} a version without buit-in memoization
|
|
953
|
-
* @see https://github.com/theKashey/use-callback-ref#usemergerefs
|
|
954
|
-
* @example
|
|
955
|
-
* const Component = React.forwardRef((props, ref) => {
|
|
956
|
-
* const ownRef = useRef();
|
|
957
|
-
* const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
|
|
958
|
-
* return <div ref={domRef}>...</div>
|
|
959
|
-
* }
|
|
960
|
-
*/
|
|
961
|
-
function useMergeRefs(refs, defaultValue) {
|
|
962
|
-
return useCallbackRef(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
/*! *****************************************************************************
|
|
966
|
-
Copyright (c) Microsoft Corporation.
|
|
967
|
-
|
|
968
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
969
|
-
purpose with or without fee is hereby granted.
|
|
970
|
-
|
|
971
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
972
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
973
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
974
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
975
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
976
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
977
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
978
|
-
***************************************************************************** */
|
|
979
|
-
|
|
980
|
-
var __assign = function() {
|
|
981
|
-
__assign = Object.assign || function __assign(t) {
|
|
982
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
983
|
-
s = arguments[i];
|
|
984
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
985
|
-
}
|
|
986
|
-
return t;
|
|
987
|
-
};
|
|
988
|
-
return __assign.apply(this, arguments);
|
|
989
|
-
};
|
|
990
|
-
|
|
991
|
-
function __rest(s, e) {
|
|
992
|
-
var t = {};
|
|
993
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
994
|
-
t[p] = s[p];
|
|
995
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
996
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
997
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
998
|
-
t[p[i]] = s[p[i]];
|
|
999
|
-
}
|
|
1000
|
-
return t;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
function ItoI(a) {
|
|
1004
|
-
return a;
|
|
1005
|
-
}
|
|
1006
|
-
function innerCreateMedium(defaults, middleware) {
|
|
1007
|
-
if (middleware === void 0) { middleware = ItoI; }
|
|
1008
|
-
var buffer = [];
|
|
1009
|
-
var assigned = false;
|
|
1010
|
-
var medium = {
|
|
1011
|
-
read: function () {
|
|
1012
|
-
if (assigned) {
|
|
1013
|
-
throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
|
|
1014
|
-
}
|
|
1015
|
-
if (buffer.length) {
|
|
1016
|
-
return buffer[buffer.length - 1];
|
|
1017
|
-
}
|
|
1018
|
-
return defaults;
|
|
1019
|
-
},
|
|
1020
|
-
useMedium: function (data) {
|
|
1021
|
-
var item = middleware(data, assigned);
|
|
1022
|
-
buffer.push(item);
|
|
1023
|
-
return function () {
|
|
1024
|
-
buffer = buffer.filter(function (x) { return x !== item; });
|
|
1025
|
-
};
|
|
1026
|
-
},
|
|
1027
|
-
assignSyncMedium: function (cb) {
|
|
1028
|
-
assigned = true;
|
|
1029
|
-
while (buffer.length) {
|
|
1030
|
-
var cbs = buffer;
|
|
1031
|
-
buffer = [];
|
|
1032
|
-
cbs.forEach(cb);
|
|
1033
|
-
}
|
|
1034
|
-
buffer = {
|
|
1035
|
-
push: function (x) { return cb(x); },
|
|
1036
|
-
filter: function () { return buffer; },
|
|
1037
|
-
};
|
|
1038
|
-
},
|
|
1039
|
-
assignMedium: function (cb) {
|
|
1040
|
-
assigned = true;
|
|
1041
|
-
var pendingQueue = [];
|
|
1042
|
-
if (buffer.length) {
|
|
1043
|
-
var cbs = buffer;
|
|
1044
|
-
buffer = [];
|
|
1045
|
-
cbs.forEach(cb);
|
|
1046
|
-
pendingQueue = buffer;
|
|
1047
|
-
}
|
|
1048
|
-
var executeQueue = function () {
|
|
1049
|
-
var cbs = pendingQueue;
|
|
1050
|
-
pendingQueue = [];
|
|
1051
|
-
cbs.forEach(cb);
|
|
1052
|
-
};
|
|
1053
|
-
var cycle = function () { return Promise.resolve().then(executeQueue); };
|
|
1054
|
-
cycle();
|
|
1055
|
-
buffer = {
|
|
1056
|
-
push: function (x) {
|
|
1057
|
-
pendingQueue.push(x);
|
|
1058
|
-
cycle();
|
|
1059
|
-
},
|
|
1060
|
-
filter: function (filter) {
|
|
1061
|
-
pendingQueue = pendingQueue.filter(filter);
|
|
1062
|
-
return buffer;
|
|
1063
|
-
},
|
|
1064
|
-
};
|
|
1065
|
-
},
|
|
1066
|
-
};
|
|
1067
|
-
return medium;
|
|
1068
|
-
}
|
|
1069
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
1070
|
-
function createSidecarMedium(options) {
|
|
1071
|
-
if (options === void 0) { options = {}; }
|
|
1072
|
-
var medium = innerCreateMedium(null);
|
|
1073
|
-
medium.options = __assign({ async: true, ssr: false }, options);
|
|
1074
|
-
return medium;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
var SideCar$1 = function (_a) {
|
|
1078
|
-
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
1079
|
-
if (!sideCar) {
|
|
1080
|
-
throw new Error('Sidecar: please provide `sideCar` property to import the right car');
|
|
1081
|
-
}
|
|
1082
|
-
var Target = sideCar.read();
|
|
1083
|
-
if (!Target) {
|
|
1084
|
-
throw new Error('Sidecar medium not found');
|
|
1085
|
-
}
|
|
1086
|
-
return React__namespace.createElement(Target, __assign({}, rest));
|
|
1087
|
-
};
|
|
1088
|
-
SideCar$1.isSideCarExport = true;
|
|
1089
|
-
function exportSidecar(medium, exported) {
|
|
1090
|
-
medium.useMedium(exported);
|
|
1091
|
-
return SideCar$1;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
var effectCar = createSidecarMedium();
|
|
1095
|
-
|
|
1096
|
-
var nothing = function () {
|
|
1097
|
-
return;
|
|
1098
|
-
};
|
|
1099
|
-
/**
|
|
1100
|
-
* Removes scrollbar from the page and contain the scroll within the Lock
|
|
1101
|
-
*/
|
|
1102
|
-
var RemoveScroll = React__namespace.forwardRef(function (props, parentRef) {
|
|
1103
|
-
var ref = React__namespace.useRef(null);
|
|
1104
|
-
var _a = React__namespace.useState({
|
|
1105
|
-
onScrollCapture: nothing,
|
|
1106
|
-
onWheelCapture: nothing,
|
|
1107
|
-
onTouchMoveCapture: nothing,
|
|
1108
|
-
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
1109
|
-
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, rest = __rest$1(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
|
|
1110
|
-
var SideCar = sideCar;
|
|
1111
|
-
var containerRef = useMergeRefs([ref, parentRef]);
|
|
1112
|
-
var containerProps = __assign$1(__assign$1({}, rest), callbacks);
|
|
1113
|
-
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1114
|
-
enabled && (React__namespace.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
|
|
1115
|
-
forwardProps ? (React__namespace.cloneElement(React__namespace.Children.only(children), __assign$1(__assign$1({}, containerProps), { ref: containerRef }))) : (React__namespace.createElement(Container, __assign$1({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
1116
|
-
});
|
|
1117
|
-
RemoveScroll.defaultProps = {
|
|
1118
|
-
enabled: true,
|
|
1119
|
-
removeScrollBar: true,
|
|
1120
|
-
inert: false,
|
|
1121
|
-
};
|
|
1122
|
-
RemoveScroll.classNames = {
|
|
1123
|
-
fullWidth: fullWidthClassName,
|
|
1124
|
-
zeroRight: zeroRightClassName,
|
|
1125
|
-
};
|
|
1126
|
-
|
|
1127
|
-
var getNonce = function () {
|
|
1128
|
-
if (typeof __webpack_nonce__ !== 'undefined') {
|
|
1129
|
-
return __webpack_nonce__;
|
|
1130
|
-
}
|
|
1131
|
-
return undefined;
|
|
1132
|
-
};
|
|
1133
|
-
|
|
1134
|
-
function makeStyleTag() {
|
|
1135
|
-
if (!document)
|
|
1136
|
-
return null;
|
|
1137
|
-
var tag = document.createElement('style');
|
|
1138
|
-
tag.type = 'text/css';
|
|
1139
|
-
var nonce = getNonce();
|
|
1140
|
-
if (nonce) {
|
|
1141
|
-
tag.setAttribute('nonce', nonce);
|
|
1142
|
-
}
|
|
1143
|
-
return tag;
|
|
1144
|
-
}
|
|
1145
|
-
function injectStyles(tag, css) {
|
|
1146
|
-
// @ts-ignore
|
|
1147
|
-
if (tag.styleSheet) {
|
|
1148
|
-
// @ts-ignore
|
|
1149
|
-
tag.styleSheet.cssText = css;
|
|
1150
|
-
}
|
|
1151
|
-
else {
|
|
1152
|
-
tag.appendChild(document.createTextNode(css));
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
function insertStyleTag(tag) {
|
|
1156
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
1157
|
-
head.appendChild(tag);
|
|
1158
|
-
}
|
|
1159
|
-
var stylesheetSingleton = function () {
|
|
1160
|
-
var counter = 0;
|
|
1161
|
-
var stylesheet = null;
|
|
1162
|
-
return {
|
|
1163
|
-
add: function (style) {
|
|
1164
|
-
if (counter == 0) {
|
|
1165
|
-
if ((stylesheet = makeStyleTag())) {
|
|
1166
|
-
injectStyles(stylesheet, style);
|
|
1167
|
-
insertStyleTag(stylesheet);
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
counter++;
|
|
1171
|
-
},
|
|
1172
|
-
remove: function () {
|
|
1173
|
-
counter--;
|
|
1174
|
-
if (!counter && stylesheet) {
|
|
1175
|
-
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
1176
|
-
stylesheet = null;
|
|
1177
|
-
}
|
|
1178
|
-
},
|
|
1179
|
-
};
|
|
1180
|
-
};
|
|
1181
|
-
|
|
1182
|
-
/**
|
|
1183
|
-
* creates a hook to control style singleton
|
|
1184
|
-
* @see {@link styleSingleton} for a safer component version
|
|
1185
|
-
* @example
|
|
1186
|
-
* ```tsx
|
|
1187
|
-
* const useStyle = styleHookSingleton();
|
|
1188
|
-
* ///
|
|
1189
|
-
* useStyle('body { overflow: hidden}');
|
|
1190
|
-
*/
|
|
1191
|
-
var styleHookSingleton = function () {
|
|
1192
|
-
var sheet = stylesheetSingleton();
|
|
1193
|
-
return function (styles, isDynamic) {
|
|
1194
|
-
React__namespace.useEffect(function () {
|
|
1195
|
-
sheet.add(styles);
|
|
1196
|
-
return function () {
|
|
1197
|
-
sheet.remove();
|
|
1198
|
-
};
|
|
1199
|
-
}, [styles && isDynamic]);
|
|
1200
|
-
};
|
|
1201
|
-
};
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* create a Component to add styles on demand
|
|
1205
|
-
* - styles are added when first instance is mounted
|
|
1206
|
-
* - styles are removed when the last instance is unmounted
|
|
1207
|
-
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
|
|
1208
|
-
*/
|
|
1209
|
-
var styleSingleton = function () {
|
|
1210
|
-
var useStyle = styleHookSingleton();
|
|
1211
|
-
var Sheet = function (_a) {
|
|
1212
|
-
var styles = _a.styles, dynamic = _a.dynamic;
|
|
1213
|
-
useStyle(styles, dynamic);
|
|
1214
|
-
return null;
|
|
1215
|
-
};
|
|
1216
|
-
return Sheet;
|
|
1217
|
-
};
|
|
1218
|
-
|
|
1219
|
-
var zeroGap = {
|
|
1220
|
-
left: 0,
|
|
1221
|
-
top: 0,
|
|
1222
|
-
right: 0,
|
|
1223
|
-
gap: 0,
|
|
1224
|
-
};
|
|
1225
|
-
var parse = function (x) { return parseInt(x || '', 10) || 0; };
|
|
1226
|
-
var getOffset = function (gapMode) {
|
|
1227
|
-
var cs = window.getComputedStyle(document.body);
|
|
1228
|
-
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
|
|
1229
|
-
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
|
|
1230
|
-
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
|
|
1231
|
-
return [parse(left), parse(top), parse(right)];
|
|
1232
|
-
};
|
|
1233
|
-
var getGapWidth = function (gapMode) {
|
|
1234
|
-
if (gapMode === void 0) { gapMode = 'margin'; }
|
|
1235
|
-
if (typeof window === 'undefined') {
|
|
1236
|
-
return zeroGap;
|
|
1237
|
-
}
|
|
1238
|
-
var offsets = getOffset(gapMode);
|
|
1239
|
-
var documentWidth = document.documentElement.clientWidth;
|
|
1240
|
-
var windowWidth = window.innerWidth;
|
|
1241
|
-
return {
|
|
1242
|
-
left: offsets[0],
|
|
1243
|
-
top: offsets[1],
|
|
1244
|
-
right: offsets[2],
|
|
1245
|
-
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
|
|
1246
|
-
};
|
|
1247
|
-
};
|
|
1248
|
-
|
|
1249
|
-
var Style = styleSingleton();
|
|
1250
|
-
// important tip - once we measure scrollBar width and remove them
|
|
1251
|
-
// we could not repeat this operation
|
|
1252
|
-
// thus we are using style-singleton - only the first "yet correct" style will be applied.
|
|
1253
|
-
var getStyles = function (_a, allowRelative, gapMode, important) {
|
|
1254
|
-
var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
|
|
1255
|
-
if (gapMode === void 0) { gapMode = 'margin'; }
|
|
1256
|
-
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
|
|
1257
|
-
allowRelative && "position: relative ".concat(important, ";"),
|
|
1258
|
-
gapMode === 'margin' &&
|
|
1259
|
-
"\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
|
|
1260
|
-
gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"),
|
|
1261
|
-
]
|
|
1262
|
-
.filter(Boolean)
|
|
1263
|
-
.join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
|
|
1264
|
-
};
|
|
1265
|
-
/**
|
|
1266
|
-
* Removes page scrollbar and blocks page scroll when mounted
|
|
1267
|
-
*/
|
|
1268
|
-
var RemoveScrollBar = function (props) {
|
|
1269
|
-
var noRelative = props.noRelative, noImportant = props.noImportant, _a = props.gapMode, gapMode = _a === void 0 ? 'margin' : _a;
|
|
1270
|
-
/*
|
|
1271
|
-
gap will be measured on every component mount
|
|
1272
|
-
however it will be used only by the "first" invocation
|
|
1273
|
-
due to singleton nature of <Style
|
|
1274
|
-
*/
|
|
1275
|
-
var gap = React__namespace.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
|
|
1276
|
-
return React__namespace.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
|
|
1277
|
-
};
|
|
1278
|
-
|
|
1279
|
-
var passiveSupported = false;
|
|
1280
|
-
if (typeof window !== 'undefined') {
|
|
1281
|
-
try {
|
|
1282
|
-
var options = Object.defineProperty({}, 'passive', {
|
|
1283
|
-
get: function () {
|
|
1284
|
-
passiveSupported = true;
|
|
1285
|
-
return true;
|
|
1286
|
-
},
|
|
1287
|
-
});
|
|
1288
|
-
// @ts-ignore
|
|
1289
|
-
window.addEventListener('test', options, options);
|
|
1290
|
-
// @ts-ignore
|
|
1291
|
-
window.removeEventListener('test', options, options);
|
|
1292
|
-
}
|
|
1293
|
-
catch (err) {
|
|
1294
|
-
passiveSupported = false;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
1298
|
-
|
|
1299
|
-
var alwaysContainsScroll = function (node) {
|
|
1300
|
-
// textarea will always _contain_ scroll inside self. It only can be hidden
|
|
1301
|
-
return node.tagName === 'TEXTAREA';
|
|
1302
|
-
};
|
|
1303
|
-
var elementCanBeScrolled = function (node, overflow) {
|
|
1304
|
-
var styles = window.getComputedStyle(node);
|
|
1305
|
-
return (
|
|
1306
|
-
// not-not-scrollable
|
|
1307
|
-
styles[overflow] !== 'hidden' &&
|
|
1308
|
-
// contains scroll inside self
|
|
1309
|
-
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
|
|
1310
|
-
};
|
|
1311
|
-
var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
|
|
1312
|
-
var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
|
|
1313
|
-
var locationCouldBeScrolled = function (axis, node) {
|
|
1314
|
-
var current = node;
|
|
1315
|
-
do {
|
|
1316
|
-
// Skip over shadow root
|
|
1317
|
-
if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
|
|
1318
|
-
current = current.host;
|
|
1319
|
-
}
|
|
1320
|
-
var isScrollable = elementCouldBeScrolled(axis, current);
|
|
1321
|
-
if (isScrollable) {
|
|
1322
|
-
var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
|
|
1323
|
-
if (s > d) {
|
|
1324
|
-
return true;
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
current = current.parentNode;
|
|
1328
|
-
} while (current && current !== document.body);
|
|
1329
|
-
return false;
|
|
1330
|
-
};
|
|
1331
|
-
var getVScrollVariables = function (_a) {
|
|
1332
|
-
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
1333
|
-
return [
|
|
1334
|
-
scrollTop,
|
|
1335
|
-
scrollHeight,
|
|
1336
|
-
clientHeight,
|
|
1337
|
-
];
|
|
1338
|
-
};
|
|
1339
|
-
var getHScrollVariables = function (_a) {
|
|
1340
|
-
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
1341
|
-
return [
|
|
1342
|
-
scrollLeft,
|
|
1343
|
-
scrollWidth,
|
|
1344
|
-
clientWidth,
|
|
1345
|
-
];
|
|
1346
|
-
};
|
|
1347
|
-
var elementCouldBeScrolled = function (axis, node) {
|
|
1348
|
-
return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
|
|
1349
|
-
};
|
|
1350
|
-
var getScrollVariables = function (axis, node) {
|
|
1351
|
-
return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
|
|
1352
|
-
};
|
|
1353
|
-
var getDirectionFactor = function (axis, direction) {
|
|
1354
|
-
/**
|
|
1355
|
-
* If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
|
|
1356
|
-
* and then increasingly negative as you scroll towards the end of the content.
|
|
1357
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
|
|
1358
|
-
*/
|
|
1359
|
-
return axis === 'h' && direction === 'rtl' ? -1 : 1;
|
|
1360
|
-
};
|
|
1361
|
-
var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
1362
|
-
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
1363
|
-
var delta = directionFactor * sourceDelta;
|
|
1364
|
-
// find scrollable target
|
|
1365
|
-
var target = event.target;
|
|
1366
|
-
var targetInLock = endTarget.contains(target);
|
|
1367
|
-
var shouldCancelScroll = false;
|
|
1368
|
-
var isDeltaPositive = delta > 0;
|
|
1369
|
-
var availableScroll = 0;
|
|
1370
|
-
var availableScrollTop = 0;
|
|
1371
|
-
do {
|
|
1372
|
-
var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
1373
|
-
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
|
1374
|
-
if (position || elementScroll) {
|
|
1375
|
-
if (elementCouldBeScrolled(axis, target)) {
|
|
1376
|
-
availableScroll += elementScroll;
|
|
1377
|
-
availableScrollTop += position;
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
target = target.parentNode;
|
|
1381
|
-
} while (
|
|
1382
|
-
// portaled content
|
|
1383
|
-
(!targetInLock && target !== document.body) ||
|
|
1384
|
-
// self content
|
|
1385
|
-
(targetInLock && (endTarget.contains(target) || endTarget === target)));
|
|
1386
|
-
if (isDeltaPositive && ((noOverscroll && availableScroll === 0) || (!noOverscroll && delta > availableScroll))) {
|
|
1387
|
-
shouldCancelScroll = true;
|
|
1388
|
-
}
|
|
1389
|
-
else if (!isDeltaPositive &&
|
|
1390
|
-
((noOverscroll && availableScrollTop === 0) || (!noOverscroll && -delta > availableScrollTop))) {
|
|
1391
|
-
shouldCancelScroll = true;
|
|
1392
|
-
}
|
|
1393
|
-
return shouldCancelScroll;
|
|
1394
|
-
};
|
|
1395
|
-
|
|
1396
|
-
var getTouchXY = function (event) {
|
|
1397
|
-
return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
1398
|
-
};
|
|
1399
|
-
var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
|
|
1400
|
-
var extractRef = function (ref) {
|
|
1401
|
-
return ref && 'current' in ref ? ref.current : ref;
|
|
1402
|
-
};
|
|
1403
|
-
var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
|
|
1404
|
-
var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
|
|
1405
|
-
var idCounter = 0;
|
|
1406
|
-
var lockStack = [];
|
|
1407
|
-
function RemoveScrollSideCar(props) {
|
|
1408
|
-
var shouldPreventQueue = React__namespace.useRef([]);
|
|
1409
|
-
var touchStartRef = React__namespace.useRef([0, 0]);
|
|
1410
|
-
var activeAxis = React__namespace.useRef();
|
|
1411
|
-
var id = React__namespace.useState(idCounter++)[0];
|
|
1412
|
-
var Style = React__namespace.useState(function () { return styleSingleton(); })[0];
|
|
1413
|
-
var lastProps = React__namespace.useRef(props);
|
|
1414
|
-
React__namespace.useEffect(function () {
|
|
1415
|
-
lastProps.current = props;
|
|
1416
|
-
}, [props]);
|
|
1417
|
-
React__namespace.useEffect(function () {
|
|
1418
|
-
if (props.inert) {
|
|
1419
|
-
document.body.classList.add("block-interactivity-".concat(id));
|
|
1420
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
1421
|
-
allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
|
|
1422
|
-
return function () {
|
|
1423
|
-
document.body.classList.remove("block-interactivity-".concat(id));
|
|
1424
|
-
allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
|
|
1425
|
-
};
|
|
1426
|
-
}
|
|
1427
|
-
return;
|
|
1428
|
-
}, [props.inert, props.lockRef.current, props.shards]);
|
|
1429
|
-
var shouldCancelEvent = React__namespace.useCallback(function (event, parent) {
|
|
1430
|
-
if ('touches' in event && event.touches.length === 2) {
|
|
1431
|
-
return !lastProps.current.allowPinchZoom;
|
|
1432
|
-
}
|
|
1433
|
-
var touch = getTouchXY(event);
|
|
1434
|
-
var touchStart = touchStartRef.current;
|
|
1435
|
-
var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
|
|
1436
|
-
var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
|
|
1437
|
-
var currentAxis;
|
|
1438
|
-
var target = event.target;
|
|
1439
|
-
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
|
|
1440
|
-
// allow horizontal touch move on Range inputs. They will not cause any scroll
|
|
1441
|
-
if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
|
|
1442
|
-
return false;
|
|
1443
|
-
}
|
|
1444
|
-
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
1445
|
-
if (!canBeScrolledInMainDirection) {
|
|
1446
|
-
return true;
|
|
1447
|
-
}
|
|
1448
|
-
if (canBeScrolledInMainDirection) {
|
|
1449
|
-
currentAxis = moveDirection;
|
|
1450
|
-
}
|
|
1451
|
-
else {
|
|
1452
|
-
currentAxis = moveDirection === 'v' ? 'h' : 'v';
|
|
1453
|
-
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
1454
|
-
// other axis might be not scrollable
|
|
1455
|
-
}
|
|
1456
|
-
if (!canBeScrolledInMainDirection) {
|
|
1457
|
-
return false;
|
|
1458
|
-
}
|
|
1459
|
-
if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
|
|
1460
|
-
activeAxis.current = currentAxis;
|
|
1461
|
-
}
|
|
1462
|
-
if (!currentAxis) {
|
|
1463
|
-
return true;
|
|
1464
|
-
}
|
|
1465
|
-
var cancelingAxis = activeAxis.current || currentAxis;
|
|
1466
|
-
return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
|
|
1467
|
-
}, []);
|
|
1468
|
-
var shouldPrevent = React__namespace.useCallback(function (_event) {
|
|
1469
|
-
var event = _event;
|
|
1470
|
-
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
|
|
1471
|
-
// not the last active
|
|
1472
|
-
return;
|
|
1473
|
-
}
|
|
1474
|
-
var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
|
|
1475
|
-
var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0];
|
|
1476
|
-
// self event, and should be canceled
|
|
1477
|
-
if (sourceEvent && sourceEvent.should) {
|
|
1478
|
-
if (event.cancelable) {
|
|
1479
|
-
event.preventDefault();
|
|
1480
|
-
}
|
|
1481
|
-
return;
|
|
1482
|
-
}
|
|
1483
|
-
// outside or shard event
|
|
1484
|
-
if (!sourceEvent) {
|
|
1485
|
-
var shardNodes = (lastProps.current.shards || [])
|
|
1486
|
-
.map(extractRef)
|
|
1487
|
-
.filter(Boolean)
|
|
1488
|
-
.filter(function (node) { return node.contains(event.target); });
|
|
1489
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
1490
|
-
if (shouldStop) {
|
|
1491
|
-
if (event.cancelable) {
|
|
1492
|
-
event.preventDefault();
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
}, []);
|
|
1497
|
-
var shouldCancel = React__namespace.useCallback(function (name, delta, target, should) {
|
|
1498
|
-
var event = { name: name, delta: delta, target: target, should: should };
|
|
1499
|
-
shouldPreventQueue.current.push(event);
|
|
1500
|
-
setTimeout(function () {
|
|
1501
|
-
shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
|
|
1502
|
-
}, 1);
|
|
1503
|
-
}, []);
|
|
1504
|
-
var scrollTouchStart = React__namespace.useCallback(function (event) {
|
|
1505
|
-
touchStartRef.current = getTouchXY(event);
|
|
1506
|
-
activeAxis.current = undefined;
|
|
1507
|
-
}, []);
|
|
1508
|
-
var scrollWheel = React__namespace.useCallback(function (event) {
|
|
1509
|
-
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1510
|
-
}, []);
|
|
1511
|
-
var scrollTouchMove = React__namespace.useCallback(function (event) {
|
|
1512
|
-
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1513
|
-
}, []);
|
|
1514
|
-
React__namespace.useEffect(function () {
|
|
1515
|
-
lockStack.push(Style);
|
|
1516
|
-
props.setCallbacks({
|
|
1517
|
-
onScrollCapture: scrollWheel,
|
|
1518
|
-
onWheelCapture: scrollWheel,
|
|
1519
|
-
onTouchMoveCapture: scrollTouchMove,
|
|
1520
|
-
});
|
|
1521
|
-
document.addEventListener('wheel', shouldPrevent, nonPassive);
|
|
1522
|
-
document.addEventListener('touchmove', shouldPrevent, nonPassive);
|
|
1523
|
-
document.addEventListener('touchstart', scrollTouchStart, nonPassive);
|
|
1524
|
-
return function () {
|
|
1525
|
-
lockStack = lockStack.filter(function (inst) { return inst !== Style; });
|
|
1526
|
-
document.removeEventListener('wheel', shouldPrevent, nonPassive);
|
|
1527
|
-
document.removeEventListener('touchmove', shouldPrevent, nonPassive);
|
|
1528
|
-
document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
|
|
1529
|
-
};
|
|
1530
|
-
}, []);
|
|
1531
|
-
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
1532
|
-
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1533
|
-
inert ? React__namespace.createElement(Style, { styles: generateStyle(id) }) : null,
|
|
1534
|
-
removeScrollBar ? React__namespace.createElement(RemoveScrollBar, { gapMode: "margin" }) : null));
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
1538
|
-
|
|
1539
|
-
var ReactRemoveScroll = React__namespace.forwardRef(function (props, ref) { return (React__namespace.createElement(RemoveScroll, __assign$1({}, props, { ref: ref, sideCar: SideCar }))); });
|
|
1540
|
-
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
1541
|
-
var $01b9c$RemoveScroll = ReactRemoveScroll;
|
|
1542
|
-
|
|
1543
144
|
const $cc7e05a45900e73f$var$OPEN_KEYS = [
|
|
1544
145
|
' ',
|
|
1545
146
|
'Enter',
|
|
@@ -1593,7 +194,7 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
|
1593
194
|
onValueNodeChange: setValueNode,
|
|
1594
195
|
valueNodeHasChildren: valueNodeHasChildren,
|
|
1595
196
|
onValueNodeHasChildrenChange: setValueNodeHasChildren,
|
|
1596
|
-
contentId:
|
|
197
|
+
contentId: index.$1746a345f3d73bb7$export$f680877a34711e37(),
|
|
1597
198
|
value: value,
|
|
1598
199
|
onValueChange: setValue,
|
|
1599
200
|
open: open,
|
|
@@ -1739,7 +340,7 @@ const $cc7e05a45900e73f$export$99b400cabb58c515 = /*#__PURE__*/ React$1.forwardR
|
|
|
1739
340
|
}), children || '▼');
|
|
1740
341
|
});
|
|
1741
342
|
const $cc7e05a45900e73f$export$b2af6c9944296213 = (props)=>{
|
|
1742
|
-
return /*#__PURE__*/ React$1.createElement(
|
|
343
|
+
return /*#__PURE__*/ React$1.createElement(index.$f1701beae083dbae$export$602eac185826482c, index_module._extends({
|
|
1743
344
|
asChild: true
|
|
1744
345
|
}, props));
|
|
1745
346
|
};
|
|
@@ -1778,12 +379,12 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1778
379
|
const shouldExpandOnScrollRef = React$1.useRef(false);
|
|
1779
380
|
const firstValidItemFoundRef = React$1.useRef(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
|
|
1780
381
|
React$1.useEffect(()=>{
|
|
1781
|
-
if (content) return hideOthers(content);
|
|
382
|
+
if (content) return index.hideOthers(content);
|
|
1782
383
|
}, [
|
|
1783
384
|
content
|
|
1784
385
|
]); // Make sure the whole tree has focus guards as our `Select` may be
|
|
1785
386
|
// the last element in the DOM (because of the `Portal`)
|
|
1786
|
-
|
|
387
|
+
index.$3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
|
|
1787
388
|
const [contentZIndex, setContentZIndex] = React$1.useState();
|
|
1788
389
|
index_module.$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
1789
390
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -2036,7 +637,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
2036
637
|
isPositioned: isPositioned,
|
|
2037
638
|
shouldExpandOnScrollRef: shouldExpandOnScrollRef,
|
|
2038
639
|
searchRef: searchRef
|
|
2039
|
-
}, /*#__PURE__*/ React$1.createElement(
|
|
640
|
+
}, /*#__PURE__*/ React$1.createElement(index.$01b9c$RemoveScroll, {
|
|
2040
641
|
as: index_module.$5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
|
2041
642
|
allowPinchZoom: true
|
|
2042
643
|
}, /*#__PURE__*/ React$1.createElement("div", {
|
|
@@ -2047,7 +648,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
2047
648
|
position: 'fixed',
|
|
2048
649
|
zIndex: contentZIndex
|
|
2049
650
|
}
|
|
2050
|
-
}, /*#__PURE__*/ React$1.createElement(
|
|
651
|
+
}, /*#__PURE__*/ React$1.createElement(index.$d3863c46a17e8a28$export$20e40289641fbbb6, {
|
|
2051
652
|
asChild: true // we make sure we're not trapping once it's been closed
|
|
2052
653
|
,
|
|
2053
654
|
trapped: context.open,
|
|
@@ -2062,7 +663,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
2062
663
|
});
|
|
2063
664
|
event.preventDefault();
|
|
2064
665
|
})
|
|
2065
|
-
}, /*#__PURE__*/ React$1.createElement(
|
|
666
|
+
}, /*#__PURE__*/ React$1.createElement(index.$5cb92bef7577960e$export$177fb62ff3ec1f22, index_module._extends({
|
|
2066
667
|
role: "listbox",
|
|
2067
668
|
id: context.contentId,
|
|
2068
669
|
"data-state": context.open ? 'open' : 'closed',
|
|
@@ -2195,7 +796,7 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$1.forwardR
|
|
|
2195
796
|
var _contentContext$itemR;
|
|
2196
797
|
return (_contentContext$itemR = contentContext.itemRefCallback) === null || _contentContext$itemR === void 0 ? void 0 : _contentContext$itemR.call(contentContext, node, value, disabled);
|
|
2197
798
|
});
|
|
2198
|
-
const textId =
|
|
799
|
+
const textId = index.$1746a345f3d73bb7$export$f680877a34711e37();
|
|
2199
800
|
const handleSelect = ()=>{
|
|
2200
801
|
if (!disabled) {
|
|
2201
802
|
context.onValueChange(value);
|
|
@@ -2432,7 +1033,7 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$1.forwa
|
|
|
2432
1033
|
const { value: value , ...selectProps } = props;
|
|
2433
1034
|
const ref = React$1.useRef(null);
|
|
2434
1035
|
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
2435
|
-
const prevValue = index_module.$010c2913dbd2fe3d$export$5cae361ad82dce8b(value); // Bubble value change to parents (e.g form change event)
|
|
1036
|
+
const prevValue = index_module$1.$010c2913dbd2fe3d$export$5cae361ad82dce8b(value); // Bubble value change to parents (e.g form change event)
|
|
2436
1037
|
React$1.useEffect(()=>{
|
|
2437
1038
|
const select = ref.current;
|
|
2438
1039
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
@@ -2584,7 +1185,7 @@ var Select = function (_a) {
|
|
|
2584
1185
|
};
|
|
2585
1186
|
return (React__default["default"].createElement(FormControl.FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, label: label, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", isDisabled: isDisabled, disclosureText: disclosureText, disclosureTitle: disclosureTitle, onClickDisclosure: onClickDisclosure },
|
|
2586
1187
|
React__default["default"].createElement($cc7e05a45900e73f$export$be92b6f5f03c0fe9, { name: name, required: isRequired, disabled: isDisabled, defaultOpen: isDefaultOpen, value: selectedValue, onOpenChange: onOpenChange, onValueChange: function (value) { return onValueChange(value); } },
|
|
2587
|
-
React__default["default"].createElement($cc7e05a45900e73f$export$41fb9f06171c75f4, { id: id, name: name, onBlur: onBlur, className: index.classNames("arc-Select-trigger", {
|
|
1188
|
+
React__default["default"].createElement($cc7e05a45900e73f$export$41fb9f06171c75f4, { id: id, name: name, onBlur: onBlur, className: index$1.classNames("arc-Select-trigger", {
|
|
2588
1189
|
"arc-Select-trigger--constrained": !isFluid,
|
|
2589
1190
|
"arc-Select-trigger--onDarkSurface": surface === "dark",
|
|
2590
1191
|
"arc-Select-trigger--invalid": errorMessage
|
|
@@ -2593,7 +1194,7 @@ var Select = function (_a) {
|
|
|
2593
1194
|
React__default["default"].createElement($cc7e05a45900e73f$export$f04a61298a47a40f, { className: "arc-Select-triggerIcon" },
|
|
2594
1195
|
React__default["default"].createElement(Icon.Icon, { icon: BtIconChevronDown2Px.BtIconChevronDown2Px_2, size: 20 }))),
|
|
2595
1196
|
React__default["default"].createElement($cc7e05a45900e73f$export$602eac185826482c, { container: arcRootElement },
|
|
2596
|
-
React__default["default"].createElement($cc7e05a45900e73f$export$7c6e2c02157bb7d2, { className: index.classNames("arc-Select-content", {
|
|
1197
|
+
React__default["default"].createElement($cc7e05a45900e73f$export$7c6e2c02157bb7d2, { className: index$1.classNames("arc-Select-content", {
|
|
2597
1198
|
"arc-Select-content--onDarkSurface": surface === "dark"
|
|
2598
1199
|
}) },
|
|
2599
1200
|
React__default["default"].createElement($cc7e05a45900e73f$export$2f60d3ec9ad468f2, { className: "arc-Select-scrollButton" },
|