@arc-ui/components 11.4.2 → 11.6.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 +57 -0
- package/dist/Alert/Alert.cjs.js +142 -0
- package/dist/Alert/Alert.esm.d.ts +57 -0
- package/dist/Alert/Alert.esm.js +134 -0
- package/dist/Alert/package.json +7 -0
- package/dist/Align/Align.cjs.js +6 -6
- package/dist/Align/Align.esm.js +2 -2
- package/dist/Badge/Badge.cjs.js +7 -7
- package/dist/Badge/Badge.esm.js +4 -4
- package/dist/Base/Base.cjs.d.ts +1 -1
- package/dist/Base/Base.cjs.js +2 -2
- package/dist/Base/Base.esm.d.ts +1 -1
- package/dist/Base/Base.esm.js +2 -2
- package/dist/BrandLogo/BrandLogo.cjs.d.ts +1 -1
- package/dist/BrandLogo/BrandLogo.cjs.js +4 -4
- package/dist/BrandLogo/BrandLogo.esm.d.ts +1 -1
- package/dist/BrandLogo/BrandLogo.esm.js +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.cjs.d.ts +1 -61
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +11 -643
- package/dist/Breadcrumbs/Breadcrumbs.esm.d.ts +1 -61
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +10 -642
- package/dist/Button/Button.cjs.d.ts +1 -1
- package/dist/Button/Button.cjs.js +6 -5
- package/dist/Button/Button.esm.d.ts +1 -1
- package/dist/Button/Button.esm.js +6 -5
- 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 -59
- package/dist/Checkbox/Checkbox.cjs.js +13 -55
- package/dist/Checkbox/Checkbox.esm.d.ts +1 -59
- package/dist/Checkbox/Checkbox.esm.js +12 -54
- package/dist/Clock/Clock.cjs.js +6 -6
- package/dist/Clock/Clock.esm.js +1 -1
- 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/Curve/Curve.cjs.d.ts +1 -1
- package/dist/Curve/Curve.cjs.js +3 -3
- package/dist/Curve/Curve.esm.d.ts +1 -1
- package/dist/Curve/Curve.esm.js +3 -3
- package/dist/Disclosure/Disclosure.cjs.d.ts +1 -1
- package/dist/Disclosure/Disclosure.cjs.js +8 -8
- package/dist/Disclosure/Disclosure.esm.d.ts +1 -1
- package/dist/Disclosure/Disclosure.esm.js +4 -4
- package/dist/DisclosureMini/DisclosureMini.cjs.d.ts +1 -0
- package/dist/DisclosureMini/DisclosureMini.cjs.js +16 -0
- package/dist/DisclosureMini/DisclosureMini.esm.d.ts +1 -0
- package/dist/DisclosureMini/DisclosureMini.esm.js +8 -0
- package/dist/DisclosureMini/package.json +7 -0
- package/dist/Elevation/Elevation.cjs.d.ts +4 -0
- package/dist/Elevation/Elevation.cjs.js +7 -5
- package/dist/Elevation/Elevation.esm.d.ts +4 -0
- package/dist/Elevation/Elevation.esm.js +4 -2
- 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 +8 -6
- package/dist/FormControl/FormControl.esm.d.ts +1 -1
- package/dist/FormControl/FormControl.esm.js +8 -6
- 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 +4 -4
- package/dist/Heading/Heading.esm.d.ts +1 -1
- package/dist/Heading/Heading.esm.js +4 -4
- package/dist/Icon/Icon.cjs.d.ts +1 -1
- package/dist/Icon/Icon.cjs.js +4 -4
- package/dist/Icon/Icon.esm.d.ts +1 -1
- package/dist/Icon/Icon.esm.js +4 -4
- package/dist/Image/Image.cjs.d.ts +1 -1
- package/dist/Image/Image.cjs.js +3 -3
- package/dist/Image/Image.esm.d.ts +1 -1
- package/dist/Image/Image.esm.js +3 -3
- package/dist/Markup/Markup.cjs.js +6 -6
- package/dist/Markup/Markup.esm.js +2 -2
- 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 +22 -41
- package/dist/ProgressBar/ProgressBar.esm.js +13 -32
- package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -85
- package/dist/RadioGroup/RadioGroup.cjs.js +12 -68
- package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -85
- package/dist/RadioGroup/RadioGroup.esm.js +11 -67
- package/dist/Rule/Rule.cjs.js +5 -5
- package/dist/Rule/Rule.esm.js +2 -2
- 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/Section/Section.cjs.d.ts +1 -1
- package/dist/Section/Section.cjs.js +2 -2
- package/dist/Section/Section.esm.d.ts +1 -1
- package/dist/Section/Section.esm.js +2 -2
- package/dist/Select/Select.cjs.d.ts +2 -2
- package/dist/Select/Select.cjs.js +9 -8
- package/dist/Select/Select.esm.d.ts +2 -2
- package/dist/Select/Select.esm.js +9 -8
- package/dist/SiteFooter/SiteFooter.cjs.d.ts +2 -62
- package/dist/SiteFooter/SiteFooter.cjs.js +14 -69
- package/dist/SiteFooter/SiteFooter.esm.d.ts +2 -62
- package/dist/SiteFooter/SiteFooter.esm.js +13 -67
- package/dist/SiteHeader/SiteHeader.cjs.d.ts +2 -252
- package/dist/SiteHeader/SiteHeader.cjs.js +17 -661
- package/dist/SiteHeader/SiteHeader.esm.d.ts +2 -252
- package/dist/SiteHeader/SiteHeader.esm.js +15 -659
- package/dist/Surface/Surface.cjs.d.ts +1 -1
- package/dist/Surface/Surface.cjs.js +2 -2
- package/dist/Surface/Surface.esm.d.ts +1 -1
- package/dist/Surface/Surface.esm.js +2 -2
- package/dist/Switch/Switch.cjs.d.ts +2 -2
- package/dist/Switch/Switch.cjs.js +10 -8
- package/dist/Switch/Switch.esm.d.ts +2 -2
- package/dist/Switch/Switch.esm.js +10 -8
- package/dist/Tag/Tag.cjs.js +39 -18
- package/dist/Tag/Tag.esm.js +31 -10
- package/dist/Text/Text.cjs.d.ts +1 -1
- package/dist/Text/Text.cjs.js +4 -4
- package/dist/Text/Text.esm.d.ts +1 -1
- package/dist/Text/Text.esm.js +4 -4
- 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 +13 -76
- package/dist/TextInput/TextInput.esm.d.ts +1 -75
- package/dist/TextInput/TextInput.esm.js +12 -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/VerticalSpace/VerticalSpace.cjs.d.ts +1 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.js +2 -2
- package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -1
- package/dist/VerticalSpace/VerticalSpace.esm.js +2 -2
- package/dist/_shared/cjs/{Base-e2b846fe.js → Base-569e4334.js} +3 -3
- package/dist/_shared/cjs/{BrandLogo-3c6102ef.js → BrandLogo-8008f0c4.js} +7 -7
- package/dist/_shared/cjs/Breadcrumbs-8b554370.d.ts +61 -0
- package/dist/_shared/cjs/Breadcrumbs-8b554370.js +106 -0
- package/dist/_shared/cjs/BtIconAlert-637db790.js +38 -0
- package/dist/_shared/cjs/BtIconChevronLeftMid-df952a3e.js +31 -0
- package/dist/_shared/cjs/BtIconCrossAlt2Px-30dc2688.js +29 -0
- package/dist/_shared/cjs/{Button-1af6868c.js → Button-27512fee.js} +16 -37
- package/dist/_shared/cjs/Card-804ab0e5.d.ts +136 -0
- package/dist/_shared/cjs/Card-804ab0e5.js +124 -0
- package/dist/_shared/cjs/Checkbox-21d3c4f6.d.ts +64 -0
- package/dist/_shared/cjs/Checkbox-21d3c4f6.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/{Curve-e72ce25b.js → Curve-b05589d8.js} +6 -6
- package/dist/_shared/cjs/DisclosureMini-067e0319.d.ts +37 -0
- package/dist/_shared/cjs/DisclosureMini-067e0319.js +44 -0
- package/dist/_shared/cjs/Filter-f7d2fbda.d.ts +83 -0
- package/dist/_shared/cjs/Filter-f7d2fbda.js +121 -0
- package/dist/_shared/cjs/{FormControl-d4d9c665.d.ts → FormControl-9aaddd54.d.ts} +6 -29
- package/dist/_shared/cjs/FormControl-9aaddd54.js +96 -0
- package/dist/_shared/cjs/Group-d83f8c2e.d.ts +46 -0
- package/dist/_shared/cjs/Group-d83f8c2e.js +48 -0
- package/dist/_shared/cjs/{Heading-cc38c3ec.js → Heading-d45f6a7f.js} +7 -7
- package/dist/_shared/cjs/{Icon-719d13d4.js → Icon-9ae8dbe1.js} +7 -7
- package/dist/_shared/cjs/{Image-fe760a06.js → Image-3bf4b4f3.js} +8 -8
- 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-e05bbe13.d.ts +81 -0
- package/dist/_shared/cjs/Poster-e05bbe13.js +50 -0
- package/dist/_shared/cjs/RadioGroup-81805ef9.d.ts +97 -0
- package/dist/_shared/cjs/RadioGroup-81805ef9.js +70 -0
- package/dist/_shared/cjs/{Section-780f2377.js → Section-48aca5f5.js} +5 -5
- package/dist/_shared/cjs/SiteFooter-c540b5f1.d.ts +62 -0
- package/dist/_shared/cjs/SiteFooter-c540b5f1.js +73 -0
- package/dist/_shared/cjs/SiteHeader-c25ee36e.d.ts +78 -0
- package/dist/_shared/cjs/SiteHeader.rehydrator-f7fa2efe.d.ts +78 -0
- package/dist/_shared/cjs/SiteHeader.rehydrator-f7fa2efe.js +673 -0
- package/dist/_shared/cjs/SubNavItem-a84d1bf4.d.ts +48 -0
- package/dist/_shared/cjs/{Surface-d6b8010e.js → Surface-6da0a78e.js} +8 -8
- package/dist/_shared/cjs/{Text-1d3844be.js → Text-6f2827e6.js} +7 -7
- package/dist/_shared/cjs/TextInput-33314fc4.d.ts +10 -0
- package/dist/_shared/cjs/TextInput-33314fc4.js +78 -0
- package/dist/_shared/cjs/TextInput-7ed03a48.d.ts +75 -0
- package/dist/_shared/cjs/UniversalHeader-cc1d9e5a.d.ts +26 -0
- package/dist/_shared/cjs/UniversalHeader-cc1d9e5a.js +35 -0
- package/dist/_shared/cjs/{VerticalSpace-7aed88ab.js → VerticalSpace-86f697e7.js} +5 -5
- package/dist/_shared/cjs/debounce-506538c5.js +544 -0
- package/dist/_shared/cjs/{index-78b35bc1.js → filter-data-attrs-a30dcf5f.js} +12 -12
- 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-9483ad5f.d.ts +2 -2
- 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/{suffix-modifier-edf7851e.js → suffix-modifier-1ee2da04.js} +2 -2
- package/dist/_shared/esm/{Base-c235dc45.js → Base-6c01e0ec.js} +1 -1
- package/dist/_shared/esm/{BrandLogo-4f13fe85.js → BrandLogo-56699561.js} +3 -3
- package/dist/_shared/esm/Breadcrumbs-04590057.d.ts +61 -0
- package/dist/_shared/esm/Breadcrumbs-04590057.js +100 -0
- package/dist/_shared/esm/BtIconAlert-55a6ed5c.js +32 -0
- package/dist/_shared/esm/BtIconChevronLeftMid-9f4f3a3d.js +25 -0
- package/dist/_shared/esm/BtIconCrossAlt2Px-a6a9f431.js +23 -0
- package/dist/_shared/esm/{Button-10700df4.js → Button-d319fa11.js} +6 -27
- package/dist/_shared/esm/Card-e79eb6c8.d.ts +136 -0
- package/dist/_shared/esm/Card-e79eb6c8.js +118 -0
- package/dist/_shared/esm/Checkbox-94300d8c.d.ts +64 -0
- package/dist/_shared/esm/Checkbox-94300d8c.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/{Curve-50697f7e.js → Curve-3e87b1bc.js} +2 -2
- package/dist/_shared/esm/DisclosureMini-022beae3.d.ts +37 -0
- package/dist/_shared/esm/DisclosureMini-022beae3.js +38 -0
- package/dist/_shared/esm/Filter-41b391e3.d.ts +83 -0
- package/dist/_shared/esm/Filter-41b391e3.js +115 -0
- package/dist/_shared/esm/{FormControl-2cb96de7.d.ts → FormControl-5e3fdca3.d.ts} +6 -29
- package/dist/_shared/esm/FormControl-5e3fdca3.js +88 -0
- package/dist/_shared/esm/Group-d62c3f56.d.ts +46 -0
- package/dist/_shared/esm/Group-d62c3f56.js +42 -0
- package/dist/_shared/esm/{Heading-eb1e42db.js → Heading-b61432fb.js} +3 -3
- package/dist/_shared/esm/{Icon-61f7237a.js → Icon-fd247973.js} +3 -3
- package/dist/_shared/esm/{Image-c0f3d42f.js → Image-3596ce55.js} +2 -2
- 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-107d6954.d.ts +81 -0
- package/dist/_shared/esm/Poster-107d6954.js +44 -0
- package/dist/_shared/esm/RadioGroup-1fd0f389.d.ts +97 -0
- package/dist/_shared/esm/RadioGroup-1fd0f389.js +64 -0
- package/dist/_shared/esm/{Section-7bc71e26.js → Section-b8038d66.js} +1 -1
- package/dist/_shared/esm/SiteFooter-8075a9bd.d.ts +62 -0
- package/dist/_shared/esm/SiteFooter-8075a9bd.js +67 -0
- package/dist/_shared/esm/SiteHeader-c25ee36e.d.ts +78 -0
- package/dist/_shared/esm/SiteHeader.rehydrator-4da8ac64.d.ts +78 -0
- package/dist/_shared/esm/SiteHeader.rehydrator-4da8ac64.js +666 -0
- package/dist/_shared/esm/SubNavItem-a84d1bf4.d.ts +48 -0
- package/dist/_shared/esm/{Surface-bf201530.js → Surface-bb100ef8.js} +1 -1
- package/dist/_shared/esm/{Text-6b958ad8.js → Text-00e9743b.js} +3 -3
- package/dist/_shared/esm/TextInput-1631dbc4.d.ts +10 -0
- package/dist/_shared/esm/TextInput-1631dbc4.js +72 -0
- package/dist/_shared/esm/TextInput-7ed03a48.d.ts +75 -0
- package/dist/_shared/esm/UniversalHeader-7926abde.d.ts +26 -0
- package/dist/_shared/esm/UniversalHeader-7926abde.js +29 -0
- package/dist/_shared/esm/{VerticalSpace-3579b20e.js → VerticalSpace-93980c9c.js} +1 -1
- package/dist/_shared/esm/debounce-e228705f.js +542 -0
- package/dist/_shared/esm/{index-229fc864.js → filter-data-attrs-afdb7d32.js} +12 -12
- 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-9483ad5f.d.ts +2 -2
- 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/{suffix-modifier-f5e28822.js → suffix-modifier-7e640670.js} +1 -1
- package/dist/index.es.js +304 -113
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +534 -341
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Alert/Alert.d.ts +56 -0
- package/dist/types/components/Alert/index.d.ts +1 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +6 -1
- package/dist/types/components/DisclosureMini/DisclosureMini.d.ts +36 -0
- package/dist/types/components/DisclosureMini/index.d.ts +1 -0
- package/dist/types/components/Elevation/Elevation.d.ts +4 -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/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/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/SiteHeader/SiteHeader.d.ts +2 -0
- package/dist/types/components/SiteHeader/components/NodeItem/NodeItem.d.ts +8 -0
- 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 -4
- package/package.json +4 -4
- package/dist/_shared/cjs/FormControl-d4d9c665.js +0 -148
- package/dist/_shared/esm/FormControl-2cb96de7.js +0 -139
- package/dist/types/components/FormControl/FormControlDisclosure/FormControlDisclosure.d.ts +0 -28
- package/dist/types/components/FormControl/FormControlDisclosure/index.d.ts +0 -1
- /package/dist/_shared/cjs/{Base-e2b846fe.d.ts → Base-569e4334.d.ts} +0 -0
- /package/dist/_shared/cjs/{BrandLogo-3c6102ef.d.ts → BrandLogo-8008f0c4.d.ts} +0 -0
- /package/dist/_shared/cjs/{Button-1af6868c.d.ts → Button-27512fee.d.ts} +0 -0
- /package/dist/_shared/cjs/{Curve-e72ce25b.d.ts → Curve-b05589d8.d.ts} +0 -0
- /package/dist/_shared/cjs/{Heading-cc38c3ec.d.ts → Heading-d45f6a7f.d.ts} +0 -0
- /package/dist/_shared/cjs/{Icon-719d13d4.d.ts → Icon-9ae8dbe1.d.ts} +0 -0
- /package/dist/_shared/cjs/{Image-fe760a06.d.ts → Image-3bf4b4f3.d.ts} +0 -0
- /package/dist/_shared/cjs/{Section-780f2377.d.ts → Section-48aca5f5.d.ts} +0 -0
- /package/dist/_shared/cjs/{Surface-d6b8010e.d.ts → Surface-6da0a78e.d.ts} +0 -0
- /package/dist/_shared/cjs/{Text-1d3844be.d.ts → Text-6f2827e6.d.ts} +0 -0
- /package/dist/_shared/cjs/{VerticalSpace-7aed88ab.d.ts → VerticalSpace-86f697e7.d.ts} +0 -0
- /package/dist/_shared/cjs/{index-78b35bc1.d.ts → filter-data-attrs-a30dcf5f.d.ts} +0 -0
- /package/dist/_shared/cjs/{suffix-modifier-edf7851e.d.ts → suffix-modifier-1ee2da04.d.ts} +0 -0
- /package/dist/_shared/esm/{Base-c235dc45.d.ts → Base-6c01e0ec.d.ts} +0 -0
- /package/dist/_shared/esm/{BrandLogo-4f13fe85.d.ts → BrandLogo-56699561.d.ts} +0 -0
- /package/dist/_shared/esm/{Button-10700df4.d.ts → Button-d319fa11.d.ts} +0 -0
- /package/dist/_shared/esm/{Curve-50697f7e.d.ts → Curve-3e87b1bc.d.ts} +0 -0
- /package/dist/_shared/esm/{Heading-eb1e42db.d.ts → Heading-b61432fb.d.ts} +0 -0
- /package/dist/_shared/esm/{Icon-61f7237a.d.ts → Icon-fd247973.d.ts} +0 -0
- /package/dist/_shared/esm/{Image-c0f3d42f.d.ts → Image-3596ce55.d.ts} +0 -0
- /package/dist/_shared/esm/{Section-7bc71e26.d.ts → Section-b8038d66.d.ts} +0 -0
- /package/dist/_shared/esm/{Surface-bf201530.d.ts → Surface-bb100ef8.d.ts} +0 -0
- /package/dist/_shared/esm/{Text-6b958ad8.d.ts → Text-00e9743b.d.ts} +0 -0
- /package/dist/_shared/esm/{VerticalSpace-3579b20e.d.ts → VerticalSpace-93980c9c.d.ts} +0 -0
- /package/dist/_shared/esm/{index-229fc864.d.ts → filter-data-attrs-afdb7d32.d.ts} +0 -0
- /package/dist/_shared/esm/{suffix-modifier-f5e28822.d.ts → suffix-modifier-7e640670.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var React$
|
|
5
|
+
var React$b = require('react');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -24,8 +24,8 @@ function _interopNamespace(e) {
|
|
|
24
24
|
return Object.freeze(n);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$
|
|
28
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React$
|
|
27
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$b);
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React$b);
|
|
29
29
|
|
|
30
30
|
/*! *****************************************************************************
|
|
31
31
|
Copyright (c) Microsoft Corporation.
|
|
@@ -329,7 +329,7 @@ var AlignItem = function (_a) {
|
|
|
329
329
|
return React__default["default"].createElement("div", { className: "arc-Align-item" }, children);
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
var ArcRootElementContext = React$
|
|
332
|
+
var ArcRootElementContext = React$b.createContext(null);
|
|
333
333
|
/**
|
|
334
334
|
* Use `Base` as the root component of the arc system.
|
|
335
335
|
*/
|
|
@@ -879,9 +879,9 @@ function debounce(func, wait, options) {
|
|
|
879
879
|
|
|
880
880
|
var debounce_1 = debounce;
|
|
881
881
|
|
|
882
|
-
const React$
|
|
882
|
+
const React$a = React__default["default"];
|
|
883
883
|
const BtIconChevronLeft2Px = props =>
|
|
884
|
-
/*#__PURE__*/ React$
|
|
884
|
+
/*#__PURE__*/ React$a.createElement(
|
|
885
885
|
"svg",
|
|
886
886
|
Object.assign(
|
|
887
887
|
{
|
|
@@ -890,8 +890,8 @@ const BtIconChevronLeft2Px = props =>
|
|
|
890
890
|
},
|
|
891
891
|
props
|
|
892
892
|
),
|
|
893
|
-
/*#__PURE__*/ React$
|
|
894
|
-
/*#__PURE__*/ React$
|
|
893
|
+
/*#__PURE__*/ React$a.createElement("defs", null),
|
|
894
|
+
/*#__PURE__*/ React$a.createElement("path", {
|
|
895
895
|
d:
|
|
896
896
|
"M22.5,29.99854a.99676.99676,0,0,1-.707-.293L8.08594,15.99268,21.793,2.294A1.00023,1.00023,0,0,1,23.207,3.709l-12.293,12.28467L23.207,28.2915a1,1,0,0,1-.707,1.707Z",
|
|
897
897
|
fill: "currentColor"
|
|
@@ -899,9 +899,9 @@ const BtIconChevronLeft2Px = props =>
|
|
|
899
899
|
);
|
|
900
900
|
var BtIconChevronLeft2Px_2 = BtIconChevronLeft2Px;
|
|
901
901
|
|
|
902
|
-
const React$
|
|
902
|
+
const React$9 = React__default["default"];
|
|
903
903
|
const BtIconChevronRight2Px = props =>
|
|
904
|
-
/*#__PURE__*/ React$
|
|
904
|
+
/*#__PURE__*/ React$9.createElement(
|
|
905
905
|
"svg",
|
|
906
906
|
Object.assign(
|
|
907
907
|
{
|
|
@@ -910,8 +910,8 @@ const BtIconChevronRight2Px = props =>
|
|
|
910
910
|
},
|
|
911
911
|
props
|
|
912
912
|
),
|
|
913
|
-
/*#__PURE__*/ React$
|
|
914
|
-
/*#__PURE__*/ React$
|
|
913
|
+
/*#__PURE__*/ React$9.createElement("defs", null),
|
|
914
|
+
/*#__PURE__*/ React$9.createElement("path", {
|
|
915
915
|
d:
|
|
916
916
|
"M9.5,29.99854A1.00025,1.00025,0,0,1,8.793,28.291l12.293-12.28467L8.793,3.7085A.99989.99989,0,0,1,10.207,2.29443l13.707,13.71289L10.207,29.70605A.99827.99827,0,0,1,9.5,29.99854Z",
|
|
917
917
|
fill: "currentColor"
|
|
@@ -919,9 +919,9 @@ const BtIconChevronRight2Px = props =>
|
|
|
919
919
|
);
|
|
920
920
|
var BtIconChevronRight2Px_2 = BtIconChevronRight2Px;
|
|
921
921
|
|
|
922
|
-
const React$
|
|
922
|
+
const React$8 = React__default["default"];
|
|
923
923
|
const ArcIconArc = props =>
|
|
924
|
-
/*#__PURE__*/ React$
|
|
924
|
+
/*#__PURE__*/ React$8.createElement(
|
|
925
925
|
"svg",
|
|
926
926
|
Object.assign(
|
|
927
927
|
{
|
|
@@ -930,7 +930,7 @@ const ArcIconArc = props =>
|
|
|
930
930
|
},
|
|
931
931
|
props
|
|
932
932
|
),
|
|
933
|
-
/*#__PURE__*/ React$
|
|
933
|
+
/*#__PURE__*/ React$8.createElement("path", {
|
|
934
934
|
fill: "none",
|
|
935
935
|
d: "M3.472 11.69a6.5 6.5 0 012.321-6.839A6.5 6.5 0 0113 4.38",
|
|
936
936
|
stroke: "currentColor"
|
|
@@ -939,7 +939,7 @@ const ArcIconArc = props =>
|
|
|
939
939
|
var ArcIconArc_2 = ArcIconArc;
|
|
940
940
|
|
|
941
941
|
var defaultContext$3 = { surface: "light" };
|
|
942
|
-
var Context$3 = React$
|
|
942
|
+
var Context$3 = React$b.createContext(defaultContext$3);
|
|
943
943
|
var Provider$4 = Context$3.Provider;
|
|
944
944
|
/**
|
|
945
945
|
* Use `Surface` to compose content using the Arc system.
|
|
@@ -988,7 +988,7 @@ __spreadArray$1([], backgroundsShared, true);
|
|
|
988
988
|
var Icon = function (_a) {
|
|
989
989
|
var _b;
|
|
990
990
|
var testId = _a.testId, _c = _a.color, color = _c === void 0 ? "auto" : _c, _d = _a.icon, icon = _d === void 0 ? ArcIconArc_2 : _d, _e = _a.isInline, isInline = _e === void 0 ? false : _e, label = _a.label, size = _a.size, props = __rest$2(_a, ["testId", "color", "icon", "isInline", "label", "size"]);
|
|
991
|
-
var surface = React$
|
|
991
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
992
992
|
var Icon = icon;
|
|
993
993
|
return (React__default["default"].createElement("span", __assign$2({ "data-testid": testId, "aria-label": label, className: classNames((_b = {},
|
|
994
994
|
_b["arc-Icon"] = true,
|
|
@@ -1037,17 +1037,17 @@ var BreadcrumbsLink = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
1037
1037
|
/** Use `Breadcrumbs` to add a secondary navigation scheme that reveals the user’s location. Each item should be wrapped with `Breadcrumbs.Item` */
|
|
1038
1038
|
var Breadcrumbs = function (_a) {
|
|
1039
1039
|
var isLight = _a.isLight, children = _a.children;
|
|
1040
|
-
var breadcrumbsList = React$
|
|
1041
|
-
var _b = React$
|
|
1042
|
-
var _c = React$
|
|
1043
|
-
React$
|
|
1040
|
+
var breadcrumbsList = React$b.useRef(null);
|
|
1041
|
+
var _b = React$b.useState(false), isCompressed = _b[0], setIsCompressed = _b[1];
|
|
1042
|
+
var _c = React$b.useState(false), showBackTrail = _c[0], setShowBackTrail = _c[1];
|
|
1043
|
+
React$b.useEffect(function () {
|
|
1044
1044
|
React__default["default"].Children.map(children, function (item) {
|
|
1045
1045
|
if (item && item.type !== BreadcrumbsItem) {
|
|
1046
1046
|
throw new Error("Illegal child passed to <Breadcrumbs />. Ensure to only use <Breadcrumbs.Item />");
|
|
1047
1047
|
}
|
|
1048
1048
|
});
|
|
1049
1049
|
}, [children]);
|
|
1050
|
-
React$
|
|
1050
|
+
React$b.useEffect(function () {
|
|
1051
1051
|
var handleResize = debounce_1(function () {
|
|
1052
1052
|
var _a;
|
|
1053
1053
|
setShowBackTrail(false);
|
|
@@ -1111,7 +1111,7 @@ Breadcrumbs.Link = BreadcrumbsLink;
|
|
|
1111
1111
|
var BrandLogo = function (_a) {
|
|
1112
1112
|
var _b;
|
|
1113
1113
|
var _c = _a.color, color = _c === void 0 ? "auto" : _c, label = _a.label, _d = _a.size, size = _d === void 0 ? 34 : _d, subBrand = _a.subBrand, props = __rest$2(_a, ["color", "label", "size", "subBrand"]);
|
|
1114
|
-
var surface = React$
|
|
1114
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1115
1115
|
return (React__default["default"].createElement("div", __assign$2({ className: classNames((_b = {
|
|
1116
1116
|
"arc-BrandLogo": true,
|
|
1117
1117
|
"arc-BrandLogo--colorBrand": color === "brand",
|
|
@@ -1123,9 +1123,9 @@ var BrandLogo = function (_a) {
|
|
|
1123
1123
|
} }, filterDataAttrs(props)), label ? React__default["default"].createElement("span", { className: "arc-BrandLogo-text" }, label) : null));
|
|
1124
1124
|
};
|
|
1125
1125
|
|
|
1126
|
-
const React$
|
|
1126
|
+
const React$7 = React__default["default"];
|
|
1127
1127
|
const BtIconChevronLeftMid = props =>
|
|
1128
|
-
/*#__PURE__*/ React$
|
|
1128
|
+
/*#__PURE__*/ React$7.createElement(
|
|
1129
1129
|
"svg",
|
|
1130
1130
|
Object.assign(
|
|
1131
1131
|
{
|
|
@@ -1135,7 +1135,7 @@ const BtIconChevronLeftMid = props =>
|
|
|
1135
1135
|
},
|
|
1136
1136
|
props
|
|
1137
1137
|
),
|
|
1138
|
-
/*#__PURE__*/ React$
|
|
1138
|
+
/*#__PURE__*/ React$7.createElement("path", {
|
|
1139
1139
|
fillRule: "evenodd",
|
|
1140
1140
|
clipRule: "evenodd",
|
|
1141
1141
|
d:
|
|
@@ -1145,9 +1145,9 @@ const BtIconChevronLeftMid = props =>
|
|
|
1145
1145
|
);
|
|
1146
1146
|
var BtIconChevronLeftMid_2 = BtIconChevronLeftMid;
|
|
1147
1147
|
|
|
1148
|
-
const React$
|
|
1148
|
+
const React$6 = React__default["default"];
|
|
1149
1149
|
const BtIconChevronRightMid = props =>
|
|
1150
|
-
/*#__PURE__*/ React$
|
|
1150
|
+
/*#__PURE__*/ React$6.createElement(
|
|
1151
1151
|
"svg",
|
|
1152
1152
|
Object.assign(
|
|
1153
1153
|
{
|
|
@@ -1157,7 +1157,7 @@ const BtIconChevronRightMid = props =>
|
|
|
1157
1157
|
},
|
|
1158
1158
|
props
|
|
1159
1159
|
),
|
|
1160
|
-
/*#__PURE__*/ React$
|
|
1160
|
+
/*#__PURE__*/ React$6.createElement("path", {
|
|
1161
1161
|
fillRule: "evenodd",
|
|
1162
1162
|
clipRule: "evenodd",
|
|
1163
1163
|
d:
|
|
@@ -1170,10 +1170,10 @@ var BtIconChevronRightMid_2 = BtIconChevronRightMid;
|
|
|
1170
1170
|
/**
|
|
1171
1171
|
* Use `Button` to allow users to take actions with clicks and taps.
|
|
1172
1172
|
*/
|
|
1173
|
-
var Button = React$
|
|
1173
|
+
var Button = React$b.forwardRef(function (_a, ref) {
|
|
1174
1174
|
var _b;
|
|
1175
1175
|
var ariaLabel = _a.ariaLabel, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, supportingText = _a.supportingText, target = _a.target, type = _a.type, props = __rest$2(_a, ["ariaLabel", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "supportingText", "target", "type"]);
|
|
1176
|
-
var surface = React$
|
|
1176
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1177
1177
|
var buttonClasses = classNames((_b = {
|
|
1178
1178
|
"arc-Button": true,
|
|
1179
1179
|
"arc-Button--displayBlock": isDisplayBlock
|
|
@@ -1214,7 +1214,7 @@ var ButtonIcon = function (_a) {
|
|
|
1214
1214
|
var Image = function (_a) {
|
|
1215
1215
|
var _b;
|
|
1216
1216
|
var alt = _a.alt, _c = _a.anchor, anchor = _c === void 0 ? "C" : _c, children = _a.children, fillColor = _a.fillColor, fit = _a.fit, height = _a.height, loading = _a.loading, overlay = _a.overlay, sizes = _a.sizes, src = _a.src, srcSet = _a.srcSet, width = _a.width, props = __rest$2(_a, ["alt", "anchor", "children", "fillColor", "fit", "height", "loading", "overlay", "sizes", "src", "srcSet", "width"]);
|
|
1217
|
-
React$
|
|
1217
|
+
React$b.useEffect(function () {
|
|
1218
1218
|
React__default["default"].Children.map(children, function (item) {
|
|
1219
1219
|
if (item && item.type !== ImageSource) {
|
|
1220
1220
|
throw new Error("Illegal child passed to <Image />. Ensure to only use <Image.Source />.");
|
|
@@ -1246,7 +1246,7 @@ Image.Source = ImageSource;
|
|
|
1246
1246
|
var Heading = function (_a) {
|
|
1247
1247
|
var _b;
|
|
1248
1248
|
var _c = _a.align, align = _c === void 0 ? "left" : _c, _d = _a.casing, casing = _d === void 0 ? "auto" : _d, children = _a.children, _e = _a.color, color = _e === void 0 ? "auto" : _e, level = _a.level, size = _a.size, props = __rest$2(_a, ["align", "casing", "children", "color", "level", "size"]);
|
|
1249
|
-
var surface = React$
|
|
1249
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1250
1250
|
var Element = "span";
|
|
1251
1251
|
if (level) {
|
|
1252
1252
|
Element = "h".concat(level);
|
|
@@ -1299,8 +1299,8 @@ var useAriaDescribedby = function (_a) {
|
|
|
1299
1299
|
* Detect interaction mode
|
|
1300
1300
|
*/
|
|
1301
1301
|
var useInteractionMode = function () {
|
|
1302
|
-
var _a = React$
|
|
1303
|
-
React$
|
|
1302
|
+
var _a = React$b.useState("pointer"), interactionMode = _a[0], setInteractionMode = _a[1];
|
|
1303
|
+
React$b.useEffect(function () {
|
|
1304
1304
|
var onKeyDown = function (event) {
|
|
1305
1305
|
if (event.altKey || event.ctrlKey || event.metaKey) {
|
|
1306
1306
|
return;
|
|
@@ -1343,13 +1343,13 @@ var useInteractionMode = function () {
|
|
|
1343
1343
|
*/
|
|
1344
1344
|
var useMediaQuery = function (mediaQuery) {
|
|
1345
1345
|
var mediaQueryList = typeof window !== "undefined" ? window.matchMedia(mediaQuery) : undefined;
|
|
1346
|
-
var _a = React$
|
|
1347
|
-
React$
|
|
1346
|
+
var _a = React$b.useState(false), matches = _a[0], setMatches = _a[1];
|
|
1347
|
+
React$b.useEffect(function () {
|
|
1348
1348
|
setMatches(typeof window !== "undefined"
|
|
1349
1349
|
? window.matchMedia(mediaQuery).matches
|
|
1350
1350
|
: false);
|
|
1351
1351
|
}, [mediaQuery]);
|
|
1352
|
-
React$
|
|
1352
|
+
React$b.useEffect(function () {
|
|
1353
1353
|
var onMatchMedia = function (event) { return setMatches(event.matches); };
|
|
1354
1354
|
// Using deprecated addListener methods here for IE & Safari 13 support
|
|
1355
1355
|
if (mediaQueryList) {
|
|
@@ -1393,7 +1393,7 @@ var useNumericInput = function (props) {
|
|
|
1393
1393
|
var Card = function (_a) {
|
|
1394
1394
|
var _b;
|
|
1395
1395
|
var actionId = _a.actionId, _c = _a.actionLabel, actionLabel = _c === void 0 ? "Read more" : _c, children = _a.children, _d = _a.fill, fill = _d === void 0 ? "solid" : _d, href = _a.href, imageAlt = _a.imageAlt, imageHeight = _a.imageHeight, imageLoading = _a.imageLoading, imageSrc = _a.imageSrc, imageSrcSet = _a.imageSrcSet, linkData = _a.linkData, minHeight = _a.minHeight, onClick = _a.onClick, target = _a.target, title = _a.title, _e = _a.titleSize, titleSize = _e === void 0 ? "s" : _e, props = __rest$2(_a, ["actionId", "actionLabel", "children", "fill", "href", "imageAlt", "imageHeight", "imageLoading", "imageSrc", "imageSrcSet", "linkData", "minHeight", "onClick", "target", "title", "titleSize"]);
|
|
1396
|
-
var surface = React$
|
|
1396
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1397
1397
|
var interactionMode = useInteractionMode().interactionMode;
|
|
1398
1398
|
var Wrapper = function (_a) {
|
|
1399
1399
|
var children = _a.children;
|
|
@@ -1452,7 +1452,7 @@ Card.Image = CardImage;
|
|
|
1452
1452
|
*/
|
|
1453
1453
|
var CardLink = function (_a) {
|
|
1454
1454
|
var actionId = _a.actionId, isButton = _a.isButton, children = _a.children, fill = _a.fill, href = _a.href, _b = _a.linkData, linkData = _b === void 0 ? {} : _b, onClick = _a.onClick, stretch = _a.stretch, target = _a.target;
|
|
1455
|
-
var surface = React$
|
|
1455
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1456
1456
|
return (React__default["default"].createElement("a", __assign$2({ onClick: handleLinkClick({ handler: onClick }), "aria-describedby": actionId, className: classNames({
|
|
1457
1457
|
"arc-Card-link": true,
|
|
1458
1458
|
"arc-Card-link--button": isButton,
|
|
@@ -1464,9 +1464,9 @@ var CardLink = function (_a) {
|
|
|
1464
1464
|
React__default["default"].createElement(Icon, { testId: "cardIcon", icon: BtIconChevronRightMid_2, size: 24 })))));
|
|
1465
1465
|
};
|
|
1466
1466
|
|
|
1467
|
-
const React$
|
|
1467
|
+
const React$5 = React__default["default"];
|
|
1468
1468
|
const BtIconTickAlt2Px = props =>
|
|
1469
|
-
/*#__PURE__*/ React$
|
|
1469
|
+
/*#__PURE__*/ React$5.createElement(
|
|
1470
1470
|
"svg",
|
|
1471
1471
|
Object.assign(
|
|
1472
1472
|
{
|
|
@@ -1475,8 +1475,8 @@ const BtIconTickAlt2Px = props =>
|
|
|
1475
1475
|
},
|
|
1476
1476
|
props
|
|
1477
1477
|
),
|
|
1478
|
-
/*#__PURE__*/ React$
|
|
1479
|
-
/*#__PURE__*/ React$
|
|
1478
|
+
/*#__PURE__*/ React$5.createElement("defs", null),
|
|
1479
|
+
/*#__PURE__*/ React$5.createElement("path", {
|
|
1480
1480
|
d:
|
|
1481
1481
|
"M13.49963,21.91418l-4.707-4.707a1.0014,1.0014,0,0,1,0-1.41406,1.02353,1.02353,0,0,1,1.41406,0l3.293,3.293,8.293-8.293a.99989.99989,0,1,1,1.41406,1.41406Z",
|
|
1482
1482
|
fill: "currentColor"
|
|
@@ -1484,9 +1484,9 @@ const BtIconTickAlt2Px = props =>
|
|
|
1484
1484
|
);
|
|
1485
1485
|
var BtIconTickAlt2Px_2 = BtIconTickAlt2Px;
|
|
1486
1486
|
|
|
1487
|
-
const React$
|
|
1487
|
+
const React$4 = React__default["default"];
|
|
1488
1488
|
const BtIconAlert = props =>
|
|
1489
|
-
/*#__PURE__*/ React$
|
|
1489
|
+
/*#__PURE__*/ React$4.createElement(
|
|
1490
1490
|
"svg",
|
|
1491
1491
|
Object.assign(
|
|
1492
1492
|
{
|
|
@@ -1495,17 +1495,17 @@ const BtIconAlert = props =>
|
|
|
1495
1495
|
},
|
|
1496
1496
|
props
|
|
1497
1497
|
),
|
|
1498
|
-
/*#__PURE__*/ React$
|
|
1499
|
-
/*#__PURE__*/ React$
|
|
1498
|
+
/*#__PURE__*/ React$4.createElement("defs", null),
|
|
1499
|
+
/*#__PURE__*/ React$4.createElement("path", {
|
|
1500
1500
|
d:
|
|
1501
1501
|
"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
|
|
1502
1502
|
fill: "currentColor"
|
|
1503
1503
|
}),
|
|
1504
|
-
/*#__PURE__*/ React$
|
|
1504
|
+
/*#__PURE__*/ React$4.createElement("path", {
|
|
1505
1505
|
fill: "currentColor",
|
|
1506
1506
|
d: "M16 20.99335A1 1 0 1 0 16 22.99335 1 1 0 1 0 16 20.99335z"
|
|
1507
1507
|
}),
|
|
1508
|
-
/*#__PURE__*/ React$
|
|
1508
|
+
/*#__PURE__*/ React$4.createElement("path", {
|
|
1509
1509
|
d:
|
|
1510
1510
|
"M16.00488,19.00977a.49972.49972,0,0,0,.5-.5L16.50684,9.5a.5.5,0,0,0-1,0l-.002,9.00977A.5.5,0,0,0,16.00488,19.00977Z",
|
|
1511
1511
|
fill: "currentColor"
|
|
@@ -1513,13 +1513,33 @@ const BtIconAlert = props =>
|
|
|
1513
1513
|
);
|
|
1514
1514
|
var BtIconAlert_2 = BtIconAlert;
|
|
1515
1515
|
|
|
1516
|
+
const React$3 = React__default["default"];
|
|
1517
|
+
const BtIconChevronDown2Px = props =>
|
|
1518
|
+
/*#__PURE__*/ React$3.createElement(
|
|
1519
|
+
"svg",
|
|
1520
|
+
Object.assign(
|
|
1521
|
+
{
|
|
1522
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1523
|
+
viewBox: "0 0 32 32"
|
|
1524
|
+
},
|
|
1525
|
+
props
|
|
1526
|
+
),
|
|
1527
|
+
/*#__PURE__*/ React$3.createElement("defs", null),
|
|
1528
|
+
/*#__PURE__*/ React$3.createElement("path", {
|
|
1529
|
+
d:
|
|
1530
|
+
"M15.99316,23.91406,2.294,10.207A.99989.99989,0,1,1,3.708,8.793l12.28515,12.293L28.292,8.793A.99989.99989,0,1,1,29.70605,10.207Z",
|
|
1531
|
+
fill: "currentColor"
|
|
1532
|
+
})
|
|
1533
|
+
);
|
|
1534
|
+
var BtIconChevronDown2Px_2 = BtIconChevronDown2Px;
|
|
1535
|
+
|
|
1516
1536
|
/**
|
|
1517
1537
|
* Use `Text` to display text.
|
|
1518
1538
|
*/
|
|
1519
1539
|
var Text = function (_a) {
|
|
1520
1540
|
var _b;
|
|
1521
1541
|
var _c = _a.align, align = _c === void 0 ? "left" : _c, children = _a.children, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isMeasured, isMeasured = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "m" : _f, _g = _a.tone, tone = _g === void 0 ? "default" : _g, props = __rest$2(_a, ["align", "children", "isInline", "isMeasured", "size", "tone"]);
|
|
1522
|
-
var surface = React$
|
|
1542
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1523
1543
|
return (React__default["default"].createElement("span", __assign$2({ className: classNames((_b = {
|
|
1524
1544
|
"arc-Text": true
|
|
1525
1545
|
},
|
|
@@ -1533,26 +1553,31 @@ var Text = function (_a) {
|
|
|
1533
1553
|
};
|
|
1534
1554
|
|
|
1535
1555
|
/**
|
|
1536
|
-
* Use `
|
|
1556
|
+
* Use `DisclosureMini` to display content that is only visible when toggled into
|
|
1537
1557
|
* an "open" state.
|
|
1538
1558
|
*/
|
|
1539
|
-
var
|
|
1540
|
-
var children = _a.children, summary = _a.summary, onClick = _a.onClick, _b = _a.
|
|
1541
|
-
var surface = React$
|
|
1542
|
-
var
|
|
1559
|
+
var DisclosureMini = function (_a) {
|
|
1560
|
+
var children = _a.children, summary = _a.summary, onClick = _a.onClick, id = _a.id, _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, _c = _a.iconPosition, iconPosition = _c === void 0 ? "left" : _c, _d = _a.size, size = _d === void 0 ? "l" : _d, props = __rest$2(_a, ["children", "summary", "onClick", "id", "isOpen", "iconPosition", "size"]);
|
|
1561
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1562
|
+
var _e = React$b.useState(false), disclousreState = _e[0], setDisclosureState = _e[1];
|
|
1543
1563
|
var handleOnClick = function () {
|
|
1544
1564
|
onClick && onClick();
|
|
1545
1565
|
setDisclosureState(function (prevState) { return !prevState; });
|
|
1546
1566
|
};
|
|
1547
|
-
return (React__default["default"].createElement("details", __assign$2({ className: classNames({
|
|
1548
|
-
"arc-
|
|
1549
|
-
"arc-
|
|
1550
|
-
}) }, filterDataAttrs(props)
|
|
1551
|
-
React__default["default"].createElement("summary", {
|
|
1552
|
-
|
|
1553
|
-
|
|
1567
|
+
return (React__default["default"].createElement("details", __assign$2({ "data-testid": "DisclosureMini", className: classNames({
|
|
1568
|
+
"arc-DisclosureMini": true,
|
|
1569
|
+
"arc-DisclosureMini--onDarkSurface": surface === "dark"
|
|
1570
|
+
}), open: isOpen }, filterDataAttrs(props)),
|
|
1571
|
+
React__default["default"].createElement("summary", { "data-testid": "DisclosureMiniSummary", className: classNames("arc-DisclosureMini-summary", {
|
|
1572
|
+
"arc-DisclosureMini-summary--icon-left": iconPosition === "left",
|
|
1573
|
+
"arc-DisclosureMini-summary--icon-right": iconPosition === "right"
|
|
1574
|
+
}), onClick: handleOnClick, "aria-expanded": disclousreState },
|
|
1575
|
+
React__default["default"].createElement("div", { className: classNames("arc-DisclosureMini-summary-icon", {
|
|
1576
|
+
"arc-DisclosureMini-summary-icon--small": size === "s"
|
|
1577
|
+
}) },
|
|
1578
|
+
React__default["default"].createElement(BtIconChevronDown2Px_2, null)),
|
|
1554
1579
|
React__default["default"].createElement(Text, { size: size === "l" ? "m" : "s" }, summary)),
|
|
1555
|
-
React__default["default"].createElement("div", { className: "arc-
|
|
1580
|
+
React__default["default"].createElement("div", { className: "arc-DisclosureMini-details" },
|
|
1556
1581
|
React__default["default"].createElement(Text, { size: size === "l" ? "m" : "s" },
|
|
1557
1582
|
React__default["default"].createElement("span", { id: id }, children)))));
|
|
1558
1583
|
};
|
|
@@ -1560,14 +1585,14 @@ var FormControlDisclosure = function (_a) {
|
|
|
1560
1585
|
var defaultContext$2 = {
|
|
1561
1586
|
requirementStatus: null
|
|
1562
1587
|
};
|
|
1563
|
-
var Context$2 = React$
|
|
1588
|
+
var Context$2 = React$b.createContext(defaultContext$2);
|
|
1564
1589
|
var Provider$3 = Context$2.Provider;
|
|
1565
1590
|
/**
|
|
1566
1591
|
* Use `FormControl` to provide inputs with labels, helper text and error messages
|
|
1567
1592
|
*/
|
|
1568
1593
|
var FormControl = function (_a) {
|
|
1569
|
-
var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, _e = _a.helperUnderLabel, helperUnderLabel = _e === void 0 ? false : _e, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest$2(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "id", "label", "labelSize", "requirementStatus", "helperUnderLabel", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
1570
|
-
var surface = React$
|
|
1594
|
+
var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, supplementaryInfo = _a.supplementaryInfo, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, _e = _a.helperUnderLabel, helperUnderLabel = _e === void 0 ? false : _e, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest$2(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "supplementaryInfo", "id", "label", "labelSize", "requirementStatus", "helperUnderLabel", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
1595
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1571
1596
|
var _f = useAriaDescribedby({
|
|
1572
1597
|
disclosureText: disclosureText,
|
|
1573
1598
|
errorMessage: errorMessage,
|
|
@@ -1601,23 +1626,26 @@ var FormControl = function (_a) {
|
|
|
1601
1626
|
requirementStatus === "optional" && (React__default["default"].createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))),
|
|
1602
1627
|
helperUnderLabel && (React__default["default"].createElement(React__default["default"].Fragment, null, helper && (React__default["default"].createElement("div", { className: "arc-FormControl-helper arc-FormControl-helper--underLabel", id: idHelper }, helper)))),
|
|
1603
1628
|
children,
|
|
1604
|
-
|
|
1605
|
-
React__default["default"].createElement("
|
|
1606
|
-
React__default["default"].createElement(
|
|
1607
|
-
|
|
1629
|
+
React__default["default"].createElement("div", { className: "arc-FormControl-info" },
|
|
1630
|
+
!helperUnderLabel && (React__default["default"].createElement("div", { className: "arc-FormControl-helperContainer" }, errorMessage ? (React__default["default"].createElement("div", { className: "arc-FormControl-error", id: idError },
|
|
1631
|
+
React__default["default"].createElement("span", { className: "arc-FormControl-error--icon" },
|
|
1632
|
+
React__default["default"].createElement(BtIconAlert_2, null)),
|
|
1633
|
+
errorMessage)) : disclosureTitle ? (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1634
|
+
React__default["default"].createElement(DisclosureMini, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText))) : (helper && (React__default["default"].createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))),
|
|
1635
|
+
supplementaryInfo && (React__default["default"].createElement("div", { className: "arc-FormControl-supplementaryInfo" }, supplementaryInfo))))));
|
|
1608
1636
|
};
|
|
1609
1637
|
|
|
1610
1638
|
/**
|
|
1611
1639
|
* Use `Checkbox` to allow users to select individual options.
|
|
1612
1640
|
*/
|
|
1613
|
-
var Checkbox = React$
|
|
1614
|
-
var _b = _a.checked, checked = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, label = _a.label, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _e = _a.size, size = _e === void 0 ? "l" : _e, value = _a.value, props = __rest$2(_a, ["checked", "errorMessage", "helper", "id", "isDisabled", "isRequired", "label", "name", "onBlur", "onChange", "size", "value"]);
|
|
1615
|
-
var requirementStatus = React$
|
|
1616
|
-
var surface = React$
|
|
1617
|
-
var
|
|
1641
|
+
var Checkbox = React$b.forwardRef(function (_a, ref) {
|
|
1642
|
+
var _b = _a.checked, checked = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, label = _a.label, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _e = _a.size, size = _e === void 0 ? "l" : _e, value = _a.value, _f = _a.checkboxAlignment, checkboxAlignment = _f === void 0 ? "center" : _f, props = __rest$2(_a, ["checked", "errorMessage", "helper", "id", "isDisabled", "isRequired", "label", "name", "onBlur", "onChange", "size", "value", "checkboxAlignment"]);
|
|
1643
|
+
var requirementStatus = React$b.useContext(Context$2).requirementStatus;
|
|
1644
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1645
|
+
var _g = useAriaDescribedby({
|
|
1618
1646
|
id: id,
|
|
1619
1647
|
errorMessage: errorMessage
|
|
1620
|
-
}), ariaDescribedby =
|
|
1648
|
+
}), ariaDescribedby = _g.ariaDescribedby, idError = _g.idError;
|
|
1621
1649
|
var idLabel = "".concat(id, "-label");
|
|
1622
1650
|
var checkedProps = {};
|
|
1623
1651
|
if (typeof onChange === "function") {
|
|
@@ -1636,11 +1664,15 @@ var Checkbox = React$a.forwardRef(function (_a, ref) {
|
|
|
1636
1664
|
"arc-Checkbox--small": size === "s",
|
|
1637
1665
|
"arc-Checkbox--onDarkSurface": surface === "dark"
|
|
1638
1666
|
}) },
|
|
1639
|
-
React__default["default"].createElement("label", { id: idLabel, htmlFor: id, className: "arc-Checkbox-label"
|
|
1667
|
+
React__default["default"].createElement("label", { id: idLabel, htmlFor: id, className: classNames("arc-Checkbox-label", {
|
|
1668
|
+
"arc-Checkbox-label--top": checkboxAlignment === "top"
|
|
1669
|
+
}) },
|
|
1640
1670
|
React__default["default"].createElement("input", __assign$2({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, filterDataAttrs(props))),
|
|
1641
1671
|
React__default["default"].createElement("span", { className: "arc-Checkbox-box" },
|
|
1642
1672
|
React__default["default"].createElement(BtIconTickAlt2Px_2, null)),
|
|
1643
|
-
React__default["default"].createElement("span",
|
|
1673
|
+
React__default["default"].createElement("span", __assign$2({}, (checkboxAlignment === "top" && {
|
|
1674
|
+
className: "arc-Checkbox-content--marginTop"
|
|
1675
|
+
})),
|
|
1644
1676
|
label,
|
|
1645
1677
|
!isRequired && requirementStatus !== "optional" ? (React__default["default"].createElement("span", { className: "arc-Checkbox-labelOptional" }, "(optional)")) : null,
|
|
1646
1678
|
helper && React__default["default"].createElement("span", { className: "arc-Checkbox-helper" }, helper))),
|
|
@@ -1655,9 +1687,9 @@ var Checkbox = React$a.forwardRef(function (_a, ref) {
|
|
|
1655
1687
|
*/
|
|
1656
1688
|
var Clock = function (_a) {
|
|
1657
1689
|
var _b = _a.locale, locale = _b === void 0 ? "en-GB" : _b, props = __rest$2(_a, ["locale"]);
|
|
1658
|
-
var _c = React$
|
|
1659
|
-
var _d = React$
|
|
1660
|
-
React$
|
|
1690
|
+
var _c = React$b.useState(new Date()), time = _c[0], setTime = _c[1];
|
|
1691
|
+
var _d = React$b.useState(time.toLocaleTimeString(locale)), humanTime = _d[0], setHumanTime = _d[1];
|
|
1692
|
+
React$b.useEffect(function () {
|
|
1661
1693
|
var tick = function () {
|
|
1662
1694
|
var newTime = new Date();
|
|
1663
1695
|
setTime(newTime);
|
|
@@ -1685,7 +1717,7 @@ var Clock_rehydrator = (function (el) { return __awaiter(void 0, void 0, void 0,
|
|
|
1685
1717
|
*/
|
|
1686
1718
|
var Columns = function (_a) {
|
|
1687
1719
|
var children = _a.children, _b = _a.isGutterless, isGutterless = _b === void 0 ? false : _b, props = __rest$2(_a, ["children", "isGutterless"]);
|
|
1688
|
-
React$
|
|
1720
|
+
React$b.useEffect(function () {
|
|
1689
1721
|
React__default["default"].Children.map(children, function (item) {
|
|
1690
1722
|
if (item && item.type !== Col) {
|
|
1691
1723
|
throw new Error("Illegal child passed to <Columns />. Ensure to only use <Columns.Col />.");
|
|
@@ -1743,33 +1775,13 @@ var Curve = function (_a) {
|
|
|
1743
1775
|
_b)) }, filterDataAttrs(props))));
|
|
1744
1776
|
};
|
|
1745
1777
|
|
|
1746
|
-
const React$2 = React__default["default"];
|
|
1747
|
-
const BtIconChevronDown2Px = props =>
|
|
1748
|
-
/*#__PURE__*/ React$2.createElement(
|
|
1749
|
-
"svg",
|
|
1750
|
-
Object.assign(
|
|
1751
|
-
{
|
|
1752
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1753
|
-
viewBox: "0 0 32 32"
|
|
1754
|
-
},
|
|
1755
|
-
props
|
|
1756
|
-
),
|
|
1757
|
-
/*#__PURE__*/ React$2.createElement("defs", null),
|
|
1758
|
-
/*#__PURE__*/ React$2.createElement("path", {
|
|
1759
|
-
d:
|
|
1760
|
-
"M15.99316,23.91406,2.294,10.207A.99989.99989,0,1,1,3.708,8.793l12.28515,12.293L28.292,8.793A.99989.99989,0,1,1,29.70605,10.207Z",
|
|
1761
|
-
fill: "currentColor"
|
|
1762
|
-
})
|
|
1763
|
-
);
|
|
1764
|
-
var BtIconChevronDown2Px_2 = BtIconChevronDown2Px;
|
|
1765
|
-
|
|
1766
1778
|
/**
|
|
1767
1779
|
* Use `Disclosure` to display content that is only visible when toggled into
|
|
1768
1780
|
* an "open" state.
|
|
1769
1781
|
*/
|
|
1770
1782
|
var Disclosure = function (_a) {
|
|
1771
1783
|
var children = _a.children, headingLevel = _a.headingLevel, _b = _a.indentDetails, indentDetails = _b === void 0 ? false : _b, _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, summary = _a.summary, props = __rest$2(_a, ["children", "headingLevel", "indentDetails", "isOpen", "summary"]);
|
|
1772
|
-
var surface = React$
|
|
1784
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1773
1785
|
return (React__default["default"].createElement("details", __assign$2({ className: classNames({
|
|
1774
1786
|
"arc-Disclosure": true,
|
|
1775
1787
|
"arc-Disclosure--indentDetails": indentDetails,
|
|
@@ -1787,21 +1799,132 @@ var Disclosure = function (_a) {
|
|
|
1787
1799
|
*/
|
|
1788
1800
|
var Elevation = function (_a) {
|
|
1789
1801
|
var _b;
|
|
1790
|
-
var children = _a.children, _c = _a.isFullWidth, isFullWidth =
|
|
1802
|
+
var children = _a.children, _c = _a.elevationLevel, elevationLevel = _c === void 0 ? "2" : _c, _d = _a.isFullWidth, isFullWidth = _d === void 0 ? false : _d, props = __rest$2(_a, ["children", "elevationLevel", "isFullWidth"]);
|
|
1791
1803
|
return (React__default["default"].createElement("div", __assign$2({ className: classNames((_b = {},
|
|
1792
1804
|
_b["arc-Elevation"] = true,
|
|
1805
|
+
_b["arc-Elevation--levelOne"] = elevationLevel === "1",
|
|
1806
|
+
_b["arc-Elevation--levelTwo"] = elevationLevel === "2",
|
|
1793
1807
|
_b["arc-Elevation--fullWidth"] = isFullWidth,
|
|
1794
1808
|
_b)) }, filterDataAttrs(props)), children));
|
|
1795
1809
|
};
|
|
1796
1810
|
|
|
1811
|
+
var FilterControl = function (_a) {
|
|
1812
|
+
var children = _a.children, onClick = _a.onClick, _b = _a.isSelected, isSelected = _b === void 0 ? false : _b;
|
|
1813
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1814
|
+
var _c = React$b.useState(isSelected), selected = _c[0], setSelected = _c[1];
|
|
1815
|
+
var onClickHandler = function () {
|
|
1816
|
+
onClick && onClick();
|
|
1817
|
+
setSelected(function (previousValue) { return !previousValue; });
|
|
1818
|
+
};
|
|
1819
|
+
return (React__default["default"].createElement("button", { className: classNames("arc-FilterControl", {
|
|
1820
|
+
"arc-FilterControl--onDarkSurface": surface === "dark",
|
|
1821
|
+
"arc-FilterControl--selected": selected
|
|
1822
|
+
}), onClick: onClickHandler, tabIndex: 0 },
|
|
1823
|
+
React__default["default"].createElement("div", { className: "arc-FilterControl-text" }, children)));
|
|
1824
|
+
};
|
|
1825
|
+
|
|
1826
|
+
var FilterControls = function (_a) {
|
|
1827
|
+
var children = _a.children, controlsAlignment = _a.controlsAlignment, props = __rest$2(_a, ["children", "controlsAlignment"]);
|
|
1828
|
+
return (React__default["default"].createElement("div", __assign$2({ className: classNames("arc-FilterControls", {
|
|
1829
|
+
"arc-FilterControls--alignLeft": controlsAlignment === "left",
|
|
1830
|
+
"arc-FilterControls--alignRight": controlsAlignment === "right"
|
|
1831
|
+
}) }, filterDataAttrs(props)), children));
|
|
1832
|
+
};
|
|
1833
|
+
|
|
1834
|
+
var FilterItem = function (_a) {
|
|
1835
|
+
var children = _a.children, props = __rest$2(_a, ["children"]);
|
|
1836
|
+
return (React__default["default"].createElement("div", __assign$2({ className: "arc-FilterItem" }, filterDataAttrs(props)), children));
|
|
1837
|
+
};
|
|
1838
|
+
|
|
1839
|
+
var FilterItems = function (_a) {
|
|
1840
|
+
var children = _a.children, _b = _a.displayType, displayType = _b === void 0 ? "grid" : _b, props = __rest$2(_a, ["children", "displayType"]);
|
|
1841
|
+
return (React__default["default"].createElement("div", __assign$2({ className: classNames("arc-FilterItems", {
|
|
1842
|
+
"arc-FilterItems--list": displayType === "list",
|
|
1843
|
+
"arc-FilterItems--grid": displayType === "grid"
|
|
1844
|
+
}) }, filterDataAttrs(props)), displayType === "list"
|
|
1845
|
+
? React__default["default"].Children.toArray(children).map(function (child, index, array) { return (React__default["default"].createElement(React__default["default"].Fragment, { key: index },
|
|
1846
|
+
child,
|
|
1847
|
+
index !== array.length - 1 && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1848
|
+
React__default["default"].createElement("div", { className: "arc-FilterItems-separator", "data-testid": "arc-FilterItems-separator" }))))); })
|
|
1849
|
+
: children));
|
|
1850
|
+
};
|
|
1851
|
+
|
|
1852
|
+
/** use `Filter` for interactive elements that filter and categorise page content. */
|
|
1853
|
+
var Filter = function (_a) {
|
|
1854
|
+
var children = _a.children, onChange = _a.onChange, displayType = _a.displayType, controlsAlignment = _a.controlsAlignment, _b = _a.logicType, logicType = _b === void 0 ? "OR" : _b, error = _a.error, props = __rest$2(_a, ["children", "onChange", "displayType", "controlsAlignment", "logicType", "error"]);
|
|
1855
|
+
var _c = React$b.useState([]), selectedControls = _c[0], setSelectedControls = _c[1];
|
|
1856
|
+
var controls = React__default["default"].Children.toArray(children).find(function (child) { return React__default["default"].isValidElement(child) && child.type === FilterControls; });
|
|
1857
|
+
var items = React__default["default"].Children.toArray(children).find(function (child) { return React__default["default"].isValidElement(child) && child.type === FilterItems; });
|
|
1858
|
+
React$b.useEffect(function () {
|
|
1859
|
+
var initialSelectedControls = [];
|
|
1860
|
+
if (controls && React__default["default"].isValidElement(controls)) {
|
|
1861
|
+
React__default["default"].Children.forEach(controls.props.children, function (child) {
|
|
1862
|
+
if (child.props.isSelected) {
|
|
1863
|
+
initialSelectedControls.push(child.props.children);
|
|
1864
|
+
}
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
setSelectedControls(initialSelectedControls);
|
|
1868
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1869
|
+
}, []);
|
|
1870
|
+
var handleControlClick = function (clickedControl) {
|
|
1871
|
+
if (selectedControls.includes(clickedControl)) {
|
|
1872
|
+
var updatedControls = selectedControls.filter(function (control) { return control !== clickedControl; });
|
|
1873
|
+
setSelectedControls(updatedControls);
|
|
1874
|
+
if (onChange) {
|
|
1875
|
+
onChange(updatedControls);
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
else {
|
|
1879
|
+
var updatedControls = __spreadArray$1(__spreadArray$1([], selectedControls, true), [clickedControl], false);
|
|
1880
|
+
setSelectedControls(updatedControls);
|
|
1881
|
+
if (onChange) {
|
|
1882
|
+
onChange(updatedControls);
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
};
|
|
1886
|
+
var filterItems = React__default["default"].Children.toArray(items && React__default["default"].isValidElement(items) && items.props.children);
|
|
1887
|
+
var filteredItems = filterItems.filter(function (filteredItem) {
|
|
1888
|
+
// If no tags are selected, show all items
|
|
1889
|
+
if (selectedControls.length === 0) {
|
|
1890
|
+
return true;
|
|
1891
|
+
}
|
|
1892
|
+
// If logicType is "AND", all selected tags should be present in the item's tags
|
|
1893
|
+
if (logicType === "AND") {
|
|
1894
|
+
return selectedControls.every(function (control) {
|
|
1895
|
+
return filteredItem.props.tags.includes(control);
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
else {
|
|
1899
|
+
// Check if item has tags property and if any selected tags are present in item's tags
|
|
1900
|
+
return selectedControls.some(function (control) {
|
|
1901
|
+
return filteredItem.props.tags.includes(control);
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
});
|
|
1905
|
+
return (React__default["default"].createElement("div", __assign$2({ className: "arc-Filter" }, filterDataAttrs(props)),
|
|
1906
|
+
React__default["default"].createElement(FilterControls, { controlsAlignment: controlsAlignment }, controls &&
|
|
1907
|
+
React__default["default"].isValidElement(controls) &&
|
|
1908
|
+
React__default["default"].Children.map(controls.props.children, function (control, index) { return (React__default["default"].createElement(FilterControl, { key: index, onClick: function () { return handleControlClick(control.props.children); }, isSelected: control.props.isSelected }, control.props.children)); })),
|
|
1909
|
+
filteredItems.length === 0 ? (React__default["default"].createElement(React__default["default"].Fragment, null, error)) : (React__default["default"].createElement(FilterItems, { displayType: displayType }, filteredItems.map(function (item) { return item.props.children; })))));
|
|
1910
|
+
};
|
|
1911
|
+
Filter.Controls = FilterControls;
|
|
1912
|
+
Filter.Control = FilterControl;
|
|
1913
|
+
Filter.Items = FilterItems;
|
|
1914
|
+
Filter.Item = FilterItem;
|
|
1915
|
+
FilterControls.displayName = "Filter.Controls";
|
|
1916
|
+
FilterControl.displayName = "Filter.Control";
|
|
1917
|
+
FilterItems.displayName = "Filter.Items";
|
|
1918
|
+
FilterItem.displayName = "Filter.Item";
|
|
1919
|
+
|
|
1797
1920
|
/**
|
|
1798
1921
|
* Use `Group` to arrange flexible items in a row.
|
|
1799
1922
|
*/
|
|
1800
1923
|
var Group = function (_a) {
|
|
1801
1924
|
var _b;
|
|
1802
1925
|
var children = _a.children, _c = _a.grow, grow = _c === void 0 ? false : _c, _d = _a.growEqual, growEqual = _d === void 0 ? false : _d, _e = _a.gutterBorder, gutterBorder = _e === void 0 ? false : _e, _f = _a.noWrap, noWrap = _f === void 0 ? false : _f, props = __rest$2(_a, ["children", "grow", "growEqual", "gutterBorder", "noWrap"]);
|
|
1803
|
-
var surface = React$
|
|
1804
|
-
React$
|
|
1926
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1927
|
+
React$b.useEffect(function () {
|
|
1805
1928
|
React__default["default"].Children.map(children, function (item) {
|
|
1806
1929
|
if (item && item.type !== GroupItem) {
|
|
1807
1930
|
throw new Error("Illegal child passed to <Group />. Ensure to only use <Group.Item />.");
|
|
@@ -1835,7 +1958,7 @@ Group.Item = GroupItem;
|
|
|
1835
1958
|
*/
|
|
1836
1959
|
var Markup = function (_a) {
|
|
1837
1960
|
var children = _a.children, _b = _a.isMeasured, isMeasured = _b === void 0 ? false : _b, props = __rest$2(_a, ["children", "isMeasured"]);
|
|
1838
|
-
var surface = React$
|
|
1961
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1839
1962
|
return (React__default["default"].createElement("div", __assign$2({ className: classNames({
|
|
1840
1963
|
"arc-Markup": true,
|
|
1841
1964
|
"arc-Markup--measured": isMeasured,
|
|
@@ -1848,7 +1971,7 @@ var Markup = function (_a) {
|
|
|
1848
1971
|
*/
|
|
1849
1972
|
var UniversalHeader = function (_a) {
|
|
1850
1973
|
var children = _a.children, props = __rest$2(_a, ["children"]);
|
|
1851
|
-
React$
|
|
1974
|
+
React$b.useEffect(function () {
|
|
1852
1975
|
React__default["default"].Children.map(children, function (item) {
|
|
1853
1976
|
if (item && item.type !== UniversalHeaderItem) {
|
|
1854
1977
|
throw new Error("Illegal child passed to <UniversalHeader />. Ensure to only use <UniversalHeader.Item />.");
|
|
@@ -1903,20 +2026,20 @@ Poster.Image = PosterImage;
|
|
|
1903
2026
|
PosterVideo.displayName = "Poster.Video";
|
|
1904
2027
|
Poster.Video = PosterVideo;
|
|
1905
2028
|
|
|
1906
|
-
var RadioContext = React$
|
|
2029
|
+
var RadioContext = React$b.createContext({});
|
|
1907
2030
|
var Provider$2 = RadioContext.Provider;
|
|
1908
2031
|
var useRadioContext = function () {
|
|
1909
|
-
var context = React$
|
|
2032
|
+
var context = React$b.useContext(RadioContext);
|
|
1910
2033
|
return context;
|
|
1911
2034
|
};
|
|
1912
2035
|
|
|
1913
2036
|
/**
|
|
1914
2037
|
* Radio Button component.
|
|
1915
2038
|
*/
|
|
1916
|
-
var RadioButton = React$
|
|
2039
|
+
var RadioButton = React$b.forwardRef(function (_a, ref) {
|
|
1917
2040
|
var helper = _a.helper, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, value = _a.value, props = __rest$2(_a, ["helper", "id", "isDisabled", "label", "value"]);
|
|
1918
2041
|
var _b = useRadioContext(), blurEvent = _b.blurEvent, changeEvent = _b.changeEvent, groupDisabled = _b.groupDisabled, checkedValue = _b.checkedValue, labelSize = _b.labelSize, name = _b.name, size = _b.size;
|
|
1919
|
-
var surface = React$
|
|
2042
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1920
2043
|
var idLabel = "".concat(id, "-label");
|
|
1921
2044
|
var checked = checkedValue === value ? true : false;
|
|
1922
2045
|
return (React__default["default"].createElement("div", __assign$2({ className: classNames({
|
|
@@ -1938,7 +2061,7 @@ var RadioButton = React$a.forwardRef(function (_a, ref) {
|
|
|
1938
2061
|
*/
|
|
1939
2062
|
var RadioGroup = function (_a) {
|
|
1940
2063
|
var children = _a.children, checkedValue = _a.checkedValue, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, id = _a.id, helper = _a.helper, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _d = _a.size, size = _d === void 0 ? "l" : _d, props = __rest$2(_a, ["children", "checkedValue", "isDisabled", "id", "helper", "label", "labelSize", "name", "onBlur", "onChange", "size"]);
|
|
1941
|
-
React$
|
|
2064
|
+
React$b.useEffect(function () {
|
|
1942
2065
|
React__default["default"].Children.map(children, function (item) {
|
|
1943
2066
|
if (item && item.type !== RadioButton) {
|
|
1944
2067
|
throw new Error("Illegal child passed to <RadioGroup />. Ensure to only use <RadioGroup.RadioButton />.");
|
|
@@ -1964,7 +2087,7 @@ RadioGroup.RadioButton = RadioButton;
|
|
|
1964
2087
|
* Use `Rule` to display a horizontal rule.
|
|
1965
2088
|
*/
|
|
1966
2089
|
var Rule = function (props) {
|
|
1967
|
-
var surface = React$
|
|
2090
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
1968
2091
|
return (React__default["default"].createElement("hr", __assign$2({ className: classNames({
|
|
1969
2092
|
"arc-Rule": true,
|
|
1970
2093
|
"arc-Rule--onDarkSurface": surface === "dark"
|
|
@@ -32880,7 +33003,7 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
32880
33003
|
/* -----------------------------------------------------------------------------------------------
|
|
32881
33004
|
* createContext
|
|
32882
33005
|
* ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
32883
|
-
const BaseContext = /*#__PURE__*/ React$
|
|
33006
|
+
const BaseContext = /*#__PURE__*/ React$b.createContext(defaultContext);
|
|
32884
33007
|
const index = defaultContexts.length;
|
|
32885
33008
|
defaultContexts = [
|
|
32886
33009
|
...defaultContexts,
|
|
@@ -32890,15 +33013,15 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
32890
33013
|
const { scope: scope , children: children , ...context } = props;
|
|
32891
33014
|
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
|
|
32892
33015
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32893
|
-
const value = React$
|
|
33016
|
+
const value = React$b.useMemo(()=>context
|
|
32894
33017
|
, Object.values(context));
|
|
32895
|
-
return /*#__PURE__*/ React$
|
|
33018
|
+
return /*#__PURE__*/ React$b.createElement(Context.Provider, {
|
|
32896
33019
|
value: value
|
|
32897
33020
|
}, children);
|
|
32898
33021
|
}
|
|
32899
33022
|
function useContext(consumerName, scope) {
|
|
32900
33023
|
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
32901
|
-
const context = React$
|
|
33024
|
+
const context = React$b.useContext(Context);
|
|
32902
33025
|
if (context) return context;
|
|
32903
33026
|
if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
|
|
32904
33027
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -32913,11 +33036,11 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
32913
33036
|
* createScope
|
|
32914
33037
|
* ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{
|
|
32915
33038
|
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
|
32916
|
-
return /*#__PURE__*/ React$
|
|
33039
|
+
return /*#__PURE__*/ React$b.createContext(defaultContext);
|
|
32917
33040
|
});
|
|
32918
33041
|
return function useScope(scope) {
|
|
32919
33042
|
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
32920
|
-
return React$
|
|
33043
|
+
return React$b.useMemo(()=>({
|
|
32921
33044
|
[`__scope${scopeName}`]: {
|
|
32922
33045
|
...scope,
|
|
32923
33046
|
[scopeName]: contexts
|
|
@@ -32958,7 +33081,7 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
32958
33081
|
...currentScope
|
|
32959
33082
|
};
|
|
32960
33083
|
}, {});
|
|
32961
|
-
return React$
|
|
33084
|
+
return React$b.useMemo(()=>({
|
|
32962
33085
|
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
32963
33086
|
})
|
|
32964
33087
|
, [
|
|
@@ -32990,14 +33113,14 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
32990
33113
|
* Accepts callback refs and RefObject(s)
|
|
32991
33114
|
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
32992
33115
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32993
|
-
return React$
|
|
33116
|
+
return React$b.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
32994
33117
|
}
|
|
32995
33118
|
|
|
32996
33119
|
/* -------------------------------------------------------------------------------------------------
|
|
32997
33120
|
* Slot
|
|
32998
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React$
|
|
33121
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
32999
33122
|
const { children: children , ...slotProps } = props;
|
|
33000
|
-
const childrenArray = React$
|
|
33123
|
+
const childrenArray = React$b.Children.toArray(children);
|
|
33001
33124
|
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
33002
33125
|
if (slottable) {
|
|
33003
33126
|
// the new element to render is the one passed as a child of `Slottable`
|
|
@@ -33006,37 +33129,37 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
33006
33129
|
if (child === slottable) {
|
|
33007
33130
|
// because the new element will be the one rendered, we are only interested
|
|
33008
33131
|
// in grabbing its children (`newElement.props.children`)
|
|
33009
|
-
if (React$
|
|
33010
|
-
return /*#__PURE__*/ React$
|
|
33132
|
+
if (React$b.Children.count(newElement) > 1) return React$b.Children.only(null);
|
|
33133
|
+
return /*#__PURE__*/ React$b.isValidElement(newElement) ? newElement.props.children : null;
|
|
33011
33134
|
} else return child;
|
|
33012
33135
|
});
|
|
33013
|
-
return /*#__PURE__*/ React$
|
|
33136
|
+
return /*#__PURE__*/ React$b.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
33014
33137
|
ref: forwardedRef
|
|
33015
|
-
}), /*#__PURE__*/ React$
|
|
33138
|
+
}), /*#__PURE__*/ React$b.isValidElement(newElement) ? /*#__PURE__*/ React$b.cloneElement(newElement, undefined, newChildren) : null);
|
|
33016
33139
|
}
|
|
33017
|
-
return /*#__PURE__*/ React$
|
|
33140
|
+
return /*#__PURE__*/ React$b.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
33018
33141
|
ref: forwardedRef
|
|
33019
33142
|
}), children);
|
|
33020
33143
|
});
|
|
33021
33144
|
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
33022
33145
|
/* -------------------------------------------------------------------------------------------------
|
|
33023
33146
|
* SlotClone
|
|
33024
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React$
|
|
33147
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
33025
33148
|
const { children: children , ...slotProps } = props;
|
|
33026
|
-
if (/*#__PURE__*/ React$
|
|
33149
|
+
if (/*#__PURE__*/ React$b.isValidElement(children)) return /*#__PURE__*/ React$b.cloneElement(children, {
|
|
33027
33150
|
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
33028
33151
|
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
|
33029
33152
|
});
|
|
33030
|
-
return React$
|
|
33153
|
+
return React$b.Children.count(children) > 1 ? React$b.Children.only(null) : null;
|
|
33031
33154
|
});
|
|
33032
33155
|
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
33033
33156
|
/* -------------------------------------------------------------------------------------------------
|
|
33034
33157
|
* Slottable
|
|
33035
33158
|
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
33036
|
-
return /*#__PURE__*/ React$
|
|
33159
|
+
return /*#__PURE__*/ React$b.createElement(React$b.Fragment, null, children);
|
|
33037
33160
|
};
|
|
33038
33161
|
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
33039
|
-
return /*#__PURE__*/ React$
|
|
33162
|
+
return /*#__PURE__*/ React$b.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
33040
33163
|
}
|
|
33041
33164
|
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
33042
33165
|
// all child props should override
|
|
@@ -33156,9 +33279,9 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
33156
33279
|
];
|
|
33157
33280
|
}
|
|
33158
33281
|
|
|
33159
|
-
const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ React$
|
|
33282
|
+
const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ React$b.createContext(undefined);
|
|
33160
33283
|
/* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
33161
|
-
const globalDir = React$
|
|
33284
|
+
const globalDir = React$b.useContext($f631663db3294ace$var$DirectionContext);
|
|
33162
33285
|
return localDir || globalDir || 'ltr';
|
|
33163
33286
|
}
|
|
33164
33287
|
|
|
@@ -33183,13 +33306,13 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
33183
33306
|
/* -------------------------------------------------------------------------------------------------
|
|
33184
33307
|
* Primitive
|
|
33185
33308
|
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
33186
|
-
const Node = /*#__PURE__*/ React$
|
|
33309
|
+
const Node = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
33187
33310
|
const { asChild: asChild , ...primitiveProps } = props;
|
|
33188
33311
|
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
33189
|
-
React$
|
|
33312
|
+
React$b.useEffect(()=>{
|
|
33190
33313
|
window[Symbol.for('radix-ui')] = true;
|
|
33191
33314
|
}, []);
|
|
33192
|
-
return /*#__PURE__*/ React$
|
|
33315
|
+
return /*#__PURE__*/ React$b.createElement(Comp, _extends({}, primitiveProps, {
|
|
33193
33316
|
ref: forwardedRef
|
|
33194
33317
|
}));
|
|
33195
33318
|
});
|
|
@@ -33245,11 +33368,11 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
33245
33368
|
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
33246
33369
|
* prop or avoid re-executing effects when passed as a dependency
|
|
33247
33370
|
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
33248
|
-
const callbackRef = React$
|
|
33249
|
-
React$
|
|
33371
|
+
const callbackRef = React$b.useRef(callback);
|
|
33372
|
+
React$b.useEffect(()=>{
|
|
33250
33373
|
callbackRef.current = callback;
|
|
33251
33374
|
}); // https://github.com/facebook/react/issues/19240
|
|
33252
|
-
return React$
|
|
33375
|
+
return React$b.useMemo(()=>(...args)=>{
|
|
33253
33376
|
var _callbackRef$current;
|
|
33254
33377
|
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
33255
33378
|
}
|
|
@@ -33260,7 +33383,7 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
33260
33383
|
* Listens for when the escape key is down
|
|
33261
33384
|
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
33262
33385
|
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
33263
|
-
React$
|
|
33386
|
+
React$b.useEffect(()=>{
|
|
33264
33387
|
const handleKeyDown = (event)=>{
|
|
33265
33388
|
if (event.key === 'Escape') onEscapeKeyDown(event);
|
|
33266
33389
|
};
|
|
@@ -33277,18 +33400,18 @@ const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
|
|
|
33277
33400
|
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
|
|
33278
33401
|
const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
|
|
33279
33402
|
let $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
33280
|
-
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ React$
|
|
33403
|
+
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ React$b.createContext({
|
|
33281
33404
|
layers: new Set(),
|
|
33282
33405
|
layersWithOutsidePointerEventsDisabled: new Set(),
|
|
33283
33406
|
branches: new Set()
|
|
33284
33407
|
});
|
|
33285
|
-
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$
|
|
33408
|
+
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
33286
33409
|
var _node$ownerDocument;
|
|
33287
33410
|
const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
|
|
33288
|
-
const context = React$
|
|
33289
|
-
const [node1, setNode] = React$
|
|
33411
|
+
const context = React$b.useContext($5cb92bef7577960e$var$DismissableLayerContext);
|
|
33412
|
+
const [node1, setNode] = React$b.useState(null);
|
|
33290
33413
|
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;
|
|
33291
|
-
const [, force] = React$
|
|
33414
|
+
const [, force] = React$b.useState({});
|
|
33292
33415
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
|
|
33293
33416
|
);
|
|
33294
33417
|
const layers = Array.from(context.layers);
|
|
@@ -33330,7 +33453,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$a.forwardR
|
|
|
33330
33453
|
onDismiss();
|
|
33331
33454
|
}
|
|
33332
33455
|
}, ownerDocument);
|
|
33333
|
-
React$
|
|
33456
|
+
React$b.useEffect(()=>{
|
|
33334
33457
|
if (!node1) return;
|
|
33335
33458
|
if (disableOutsidePointerEvents) {
|
|
33336
33459
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -33355,7 +33478,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$a.forwardR
|
|
|
33355
33478
|
* because a change to `disableOutsidePointerEvents` would remove this layer from the stack
|
|
33356
33479
|
* and add it to the end again so the layering order wouldn't be _creation order_.
|
|
33357
33480
|
* We only want them to be removed from context stacks when unmounted.
|
|
33358
|
-
*/ React$
|
|
33481
|
+
*/ React$b.useEffect(()=>{
|
|
33359
33482
|
return ()=>{
|
|
33360
33483
|
if (!node1) return;
|
|
33361
33484
|
context.layers.delete(node1);
|
|
@@ -33366,14 +33489,14 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$a.forwardR
|
|
|
33366
33489
|
node1,
|
|
33367
33490
|
context
|
|
33368
33491
|
]);
|
|
33369
|
-
React$
|
|
33492
|
+
React$b.useEffect(()=>{
|
|
33370
33493
|
const handleUpdate = ()=>force({})
|
|
33371
33494
|
;
|
|
33372
33495
|
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
33373
33496
|
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
|
|
33374
33497
|
;
|
|
33375
33498
|
}, []);
|
|
33376
|
-
return /*#__PURE__*/ React$
|
|
33499
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
|
|
33377
33500
|
ref: composedRefs,
|
|
33378
33501
|
style: {
|
|
33379
33502
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
|
|
@@ -33390,9 +33513,9 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$a.forwardR
|
|
|
33390
33513
|
* Returns props to pass to the node we want to check for outside events.
|
|
33391
33514
|
*/ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
33392
33515
|
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
33393
|
-
const isPointerInsideReactTreeRef = React$
|
|
33394
|
-
const handleClickRef = React$
|
|
33395
|
-
React$
|
|
33516
|
+
const isPointerInsideReactTreeRef = React$b.useRef(false);
|
|
33517
|
+
const handleClickRef = React$b.useRef(()=>{});
|
|
33518
|
+
React$b.useEffect(()=>{
|
|
33396
33519
|
const handlePointerDown = (event)=>{
|
|
33397
33520
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
33398
33521
|
const eventDetail = {
|
|
@@ -33458,8 +33581,8 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$a.forwardR
|
|
|
33458
33581
|
* Returns props to pass to the root (node) of the subtree we want to check.
|
|
33459
33582
|
*/ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
33460
33583
|
const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
33461
|
-
const isFocusInsideReactTreeRef = React$
|
|
33462
|
-
React$
|
|
33584
|
+
const isFocusInsideReactTreeRef = React$b.useRef(false);
|
|
33585
|
+
React$b.useEffect(()=>{
|
|
33463
33586
|
const handleFocus = (event)=>{
|
|
33464
33587
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
33465
33588
|
const eventDetail = {
|
|
@@ -33506,7 +33629,7 @@ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detai
|
|
|
33506
33629
|
* Injects a pair of focus guards at the edges of the whole DOM tree
|
|
33507
33630
|
* to ensure `focusin` & `focusout` events can be caught consistently.
|
|
33508
33631
|
*/ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
|
|
33509
|
-
React$
|
|
33632
|
+
React$b.useEffect(()=>{
|
|
33510
33633
|
var _edgeGuards$, _edgeGuards$2;
|
|
33511
33634
|
const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
|
|
33512
33635
|
document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
|
|
@@ -33533,15 +33656,15 @@ const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
|
|
|
33533
33656
|
bubbles: false,
|
|
33534
33657
|
cancelable: true
|
|
33535
33658
|
};
|
|
33536
|
-
const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$
|
|
33659
|
+
const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
33537
33660
|
const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
|
|
33538
|
-
const [container1, setContainer] = React$
|
|
33661
|
+
const [container1, setContainer] = React$b.useState(null);
|
|
33539
33662
|
const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
|
|
33540
33663
|
const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
|
|
33541
|
-
const lastFocusedElementRef = React$
|
|
33664
|
+
const lastFocusedElementRef = React$b.useRef(null);
|
|
33542
33665
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
|
|
33543
33666
|
);
|
|
33544
|
-
const focusScope = React$
|
|
33667
|
+
const focusScope = React$b.useRef({
|
|
33545
33668
|
paused: false,
|
|
33546
33669
|
pause () {
|
|
33547
33670
|
this.paused = true;
|
|
@@ -33550,7 +33673,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$a.forwardR
|
|
|
33550
33673
|
this.paused = false;
|
|
33551
33674
|
}
|
|
33552
33675
|
}).current; // Takes care of trapping focus if focus is moved outside programmatically for example
|
|
33553
|
-
React$
|
|
33676
|
+
React$b.useEffect(()=>{
|
|
33554
33677
|
if (trapped) {
|
|
33555
33678
|
function handleFocusIn(event) {
|
|
33556
33679
|
if (focusScope.paused || !container1) return;
|
|
@@ -33578,7 +33701,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$a.forwardR
|
|
|
33578
33701
|
container1,
|
|
33579
33702
|
focusScope.paused
|
|
33580
33703
|
]);
|
|
33581
|
-
React$
|
|
33704
|
+
React$b.useEffect(()=>{
|
|
33582
33705
|
if (container1) {
|
|
33583
33706
|
$d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
|
|
33584
33707
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -33617,7 +33740,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$a.forwardR
|
|
|
33617
33740
|
onUnmountAutoFocus,
|
|
33618
33741
|
focusScope
|
|
33619
33742
|
]); // Takes care of looping focus (when tabbing whilst at the edges)
|
|
33620
|
-
const handleKeyDown = React$
|
|
33743
|
+
const handleKeyDown = React$b.useCallback((event)=>{
|
|
33621
33744
|
if (!loop && !trapped) return;
|
|
33622
33745
|
if (focusScope.paused) return;
|
|
33623
33746
|
const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
@@ -33647,7 +33770,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$a.forwardR
|
|
|
33647
33770
|
trapped,
|
|
33648
33771
|
focusScope.paused
|
|
33649
33772
|
]);
|
|
33650
|
-
return /*#__PURE__*/ React$
|
|
33773
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
33651
33774
|
tabIndex: -1
|
|
33652
33775
|
}, scopeProps, {
|
|
33653
33776
|
ref: composedRefs,
|
|
@@ -33777,7 +33900,7 @@ function $d3863c46a17e8a28$var$removeLinks(items) {
|
|
|
33777
33900
|
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
33778
33901
|
*
|
|
33779
33902
|
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
33780
|
-
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React$
|
|
33903
|
+
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React$b.useLayoutEffect : ()=>{};
|
|
33781
33904
|
|
|
33782
33905
|
const $1746a345f3d73bb7$var$useReactId = React__namespace['useId'.toString()] || (()=>undefined
|
|
33783
33906
|
);
|
|
@@ -33793,10 +33916,10 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
|
33793
33916
|
return deterministicId || (id ? `radix-${id}` : '');
|
|
33794
33917
|
}
|
|
33795
33918
|
|
|
33796
|
-
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ React$
|
|
33919
|
+
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
33797
33920
|
var _globalThis$document;
|
|
33798
33921
|
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;
|
|
33799
|
-
return container ? /*#__PURE__*/ $7SXl2$reactdom.createPortal(/*#__PURE__*/ React$
|
|
33922
|
+
return container ? /*#__PURE__*/ $7SXl2$reactdom.createPortal(/*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
|
|
33800
33923
|
ref: forwardedRef
|
|
33801
33924
|
})), container) : null;
|
|
33802
33925
|
});
|
|
@@ -33809,7 +33932,7 @@ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: de
|
|
|
33809
33932
|
const isControlled = prop !== undefined;
|
|
33810
33933
|
const value1 = isControlled ? prop : uncontrolledProp;
|
|
33811
33934
|
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
33812
|
-
const setValue = React$
|
|
33935
|
+
const setValue = React$b.useCallback((nextValue)=>{
|
|
33813
33936
|
if (isControlled) {
|
|
33814
33937
|
const setter = nextValue;
|
|
33815
33938
|
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
@@ -33827,11 +33950,11 @@ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: de
|
|
|
33827
33950
|
];
|
|
33828
33951
|
}
|
|
33829
33952
|
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
|
|
33830
|
-
const uncontrolledState = React$
|
|
33953
|
+
const uncontrolledState = React$b.useState(defaultProp);
|
|
33831
33954
|
const [value] = uncontrolledState;
|
|
33832
|
-
const prevValueRef = React$
|
|
33955
|
+
const prevValueRef = React$b.useRef(value);
|
|
33833
33956
|
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
33834
|
-
React$
|
|
33957
|
+
React$b.useEffect(()=>{
|
|
33835
33958
|
if (prevValueRef.current !== value) {
|
|
33836
33959
|
handleChange(value);
|
|
33837
33960
|
prevValueRef.current = value;
|
|
@@ -33845,13 +33968,13 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp ,
|
|
|
33845
33968
|
}
|
|
33846
33969
|
|
|
33847
33970
|
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
33848
|
-
const ref = React$
|
|
33971
|
+
const ref = React$b.useRef({
|
|
33849
33972
|
value: value,
|
|
33850
33973
|
previous: value
|
|
33851
33974
|
}); // We compare values before making an update to ensure that
|
|
33852
33975
|
// a change has been made. This ensures the previous value is
|
|
33853
33976
|
// persisted correctly between renders.
|
|
33854
|
-
return React$
|
|
33977
|
+
return React$b.useMemo(()=>{
|
|
33855
33978
|
if (ref.current.value !== value) {
|
|
33856
33979
|
ref.current.previous = ref.current.value;
|
|
33857
33980
|
ref.current.value = value;
|
|
@@ -33862,8 +33985,8 @@ function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
|
33862
33985
|
]);
|
|
33863
33986
|
}
|
|
33864
33987
|
|
|
33865
|
-
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ React$
|
|
33866
|
-
return /*#__PURE__*/ React$
|
|
33988
|
+
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
33989
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
|
|
33867
33990
|
ref: forwardedRef,
|
|
33868
33991
|
style: {
|
|
33869
33992
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -34105,7 +34228,7 @@ function assignRef(ref, value) {
|
|
|
34105
34228
|
* @returns {MutableRefObject}
|
|
34106
34229
|
*/
|
|
34107
34230
|
function useCallbackRef(initialValue, callback) {
|
|
34108
|
-
var ref = React$
|
|
34231
|
+
var ref = React$b.useState(function () { return ({
|
|
34109
34232
|
// value
|
|
34110
34233
|
value: initialValue,
|
|
34111
34234
|
// last callback
|
|
@@ -34746,9 +34869,9 @@ const [$cc7e05a45900e73f$var$SelectProvider, $cc7e05a45900e73f$var$useSelectCont
|
|
|
34746
34869
|
const [$cc7e05a45900e73f$var$SelectNativeOptionsProvider, $cc7e05a45900e73f$var$useSelectNativeOptionsContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME);
|
|
34747
34870
|
const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
34748
34871
|
const { __scopeSelect: __scopeSelect , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , value: valueProp , defaultValue: defaultValue , onValueChange: onValueChange , dir: dir , name: name , autoComplete: autoComplete , disabled: disabled , required: required } = props;
|
|
34749
|
-
const [trigger, setTrigger] = React$
|
|
34750
|
-
const [valueNode, setValueNode] = React$
|
|
34751
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] = React$
|
|
34872
|
+
const [trigger, setTrigger] = React$b.useState(null);
|
|
34873
|
+
const [valueNode, setValueNode] = React$b.useState(null);
|
|
34874
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React$b.useState(false);
|
|
34752
34875
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
34753
34876
|
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
34754
34877
|
prop: openProp,
|
|
@@ -34760,16 +34883,16 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
|
34760
34883
|
defaultProp: defaultValue,
|
|
34761
34884
|
onChange: onValueChange
|
|
34762
34885
|
});
|
|
34763
|
-
const triggerPointerDownPosRef = React$
|
|
34886
|
+
const triggerPointerDownPosRef = React$b.useRef(null); // We set this to true by default so that events bubble to forms without JS (SSR)
|
|
34764
34887
|
const isFormControl = trigger ? Boolean(trigger.closest('form')) : true;
|
|
34765
|
-
const [nativeOptionsSet, setNativeOptionsSet] = React$
|
|
34888
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React$b.useState(new Set()); // The native `select` only associates the correct default value if the corresponding
|
|
34766
34889
|
// `option` is rendered as a child **at the same time** as itself.
|
|
34767
34890
|
// Because it might take a few renders for our items to gather the information to build
|
|
34768
34891
|
// the native `option`(s), we generate a key on the `select` to make sure React re-builds it
|
|
34769
34892
|
// each time the options change.
|
|
34770
34893
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option)=>option.props.value
|
|
34771
34894
|
).join(';');
|
|
34772
|
-
return /*#__PURE__*/ React$
|
|
34895
|
+
return /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectProvider, {
|
|
34773
34896
|
required: required,
|
|
34774
34897
|
scope: __scopeSelect,
|
|
34775
34898
|
trigger: trigger,
|
|
@@ -34786,22 +34909,22 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
|
34786
34909
|
dir: direction,
|
|
34787
34910
|
triggerPointerDownPosRef: triggerPointerDownPosRef,
|
|
34788
34911
|
disabled: disabled
|
|
34789
|
-
}, /*#__PURE__*/ React$
|
|
34912
|
+
}, /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$Collection.Provider, {
|
|
34790
34913
|
scope: __scopeSelect
|
|
34791
|
-
}, /*#__PURE__*/ React$
|
|
34914
|
+
}, /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectNativeOptionsProvider, {
|
|
34792
34915
|
scope: props.__scopeSelect,
|
|
34793
|
-
onNativeOptionAdd: React$
|
|
34916
|
+
onNativeOptionAdd: React$b.useCallback((option)=>{
|
|
34794
34917
|
setNativeOptionsSet((prev)=>new Set(prev).add(option)
|
|
34795
34918
|
);
|
|
34796
34919
|
}, []),
|
|
34797
|
-
onNativeOptionRemove: React$
|
|
34920
|
+
onNativeOptionRemove: React$b.useCallback((option)=>{
|
|
34798
34921
|
setNativeOptionsSet((prev)=>{
|
|
34799
34922
|
const optionsSet = new Set(prev);
|
|
34800
34923
|
optionsSet.delete(option);
|
|
34801
34924
|
return optionsSet;
|
|
34802
34925
|
});
|
|
34803
34926
|
}, [])
|
|
34804
|
-
}, children)), isFormControl ? /*#__PURE__*/ React$
|
|
34927
|
+
}, children)), isFormControl ? /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$BubbleSelect, {
|
|
34805
34928
|
key: nativeSelectKey,
|
|
34806
34929
|
"aria-hidden": true,
|
|
34807
34930
|
required: required,
|
|
@@ -34813,14 +34936,14 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
|
34813
34936
|
onChange: (event)=>setValue(event.target.value)
|
|
34814
34937
|
,
|
|
34815
34938
|
disabled: disabled
|
|
34816
|
-
}, value === undefined ? /*#__PURE__*/ React$
|
|
34939
|
+
}, value === undefined ? /*#__PURE__*/ React$b.createElement("option", {
|
|
34817
34940
|
value: ""
|
|
34818
34941
|
}) : null, Array.from(nativeOptionsSet)) : null);
|
|
34819
34942
|
};
|
|
34820
34943
|
/* -------------------------------------------------------------------------------------------------
|
|
34821
34944
|
* SelectTrigger
|
|
34822
34945
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$TRIGGER_NAME = 'SelectTrigger';
|
|
34823
|
-
const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$
|
|
34946
|
+
const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
34824
34947
|
const { __scopeSelect: __scopeSelect , disabled: disabled = false , ...triggerProps } = props;
|
|
34825
34948
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$TRIGGER_NAME, __scopeSelect);
|
|
34826
34949
|
const isDisabled = context.disabled || disabled;
|
|
@@ -34840,7 +34963,7 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$a.forwardRe
|
|
|
34840
34963
|
resetTypeahead();
|
|
34841
34964
|
}
|
|
34842
34965
|
};
|
|
34843
|
-
return /*#__PURE__*/ React$
|
|
34966
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
34844
34967
|
type: "button",
|
|
34845
34968
|
role: "combobox",
|
|
34846
34969
|
"aria-controls": context.contentId,
|
|
@@ -34894,7 +35017,7 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$a.forwardRe
|
|
|
34894
35017
|
/* -------------------------------------------------------------------------------------------------
|
|
34895
35018
|
* SelectValue
|
|
34896
35019
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$VALUE_NAME = 'SelectValue';
|
|
34897
|
-
const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ React$
|
|
35020
|
+
const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
34898
35021
|
// We ignore `className` and `style` as this part shouldn't be styled.
|
|
34899
35022
|
const { __scopeSelect: __scopeSelect , className: className , style: style , children: children , placeholder: placeholder , ...valueProps } = props;
|
|
34900
35023
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$VALUE_NAME, __scopeSelect);
|
|
@@ -34907,7 +35030,7 @@ const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ React$a.forwardR
|
|
|
34907
35030
|
onValueNodeHasChildrenChange,
|
|
34908
35031
|
hasChildren
|
|
34909
35032
|
]);
|
|
34910
|
-
return /*#__PURE__*/ React$
|
|
35033
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, valueProps, {
|
|
34911
35034
|
ref: composedRefs // we don't want events from the portalled `SelectValue` children to bubble
|
|
34912
35035
|
,
|
|
34913
35036
|
style: {
|
|
@@ -34915,67 +35038,67 @@ const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ React$a.forwardR
|
|
|
34915
35038
|
}
|
|
34916
35039
|
}), context.value === undefined && placeholder !== undefined ? placeholder : children);
|
|
34917
35040
|
});
|
|
34918
|
-
const $cc7e05a45900e73f$export$99b400cabb58c515 = /*#__PURE__*/ React$
|
|
35041
|
+
const $cc7e05a45900e73f$export$99b400cabb58c515 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
34919
35042
|
const { __scopeSelect: __scopeSelect , children: children , ...iconProps } = props;
|
|
34920
|
-
return /*#__PURE__*/ React$
|
|
35043
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
34921
35044
|
"aria-hidden": true
|
|
34922
35045
|
}, iconProps, {
|
|
34923
35046
|
ref: forwardedRef
|
|
34924
35047
|
}), children || '▼');
|
|
34925
35048
|
});
|
|
34926
35049
|
const $cc7e05a45900e73f$export$b2af6c9944296213 = (props)=>{
|
|
34927
|
-
return /*#__PURE__*/ React$
|
|
35050
|
+
return /*#__PURE__*/ React$b.createElement($f1701beae083dbae$export$602eac185826482c, _extends({
|
|
34928
35051
|
asChild: true
|
|
34929
35052
|
}, props));
|
|
34930
35053
|
};
|
|
34931
35054
|
/* -------------------------------------------------------------------------------------------------
|
|
34932
35055
|
* SelectContent
|
|
34933
35056
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$CONTENT_NAME = 'SelectContent';
|
|
34934
|
-
const $cc7e05a45900e73f$export$c973a4b3cb86a03d = /*#__PURE__*/ React$
|
|
35057
|
+
const $cc7e05a45900e73f$export$c973a4b3cb86a03d = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
34935
35058
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, props.__scopeSelect);
|
|
34936
|
-
const [fragment, setFragment] = React$
|
|
35059
|
+
const [fragment, setFragment] = React$b.useState(); // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server
|
|
34937
35060
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
34938
35061
|
setFragment(new DocumentFragment());
|
|
34939
35062
|
}, []);
|
|
34940
|
-
return /*#__PURE__*/ React$
|
|
35063
|
+
return /*#__PURE__*/ React$b.createElement(React$b.Fragment, null, context.open ? /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectContentImpl, _extends({}, props, {
|
|
34941
35064
|
ref: forwardedRef
|
|
34942
|
-
})) : fragment ? /*#__PURE__*/ reactDom.exports.createPortal(/*#__PURE__*/ React$
|
|
35065
|
+
})) : fragment ? /*#__PURE__*/ reactDom.exports.createPortal(/*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectContentProvider, {
|
|
34943
35066
|
scope: props.__scopeSelect
|
|
34944
|
-
}, /*#__PURE__*/ React$
|
|
35067
|
+
}, /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$Collection.Slot, {
|
|
34945
35068
|
scope: props.__scopeSelect
|
|
34946
|
-
}, /*#__PURE__*/ React$
|
|
35069
|
+
}, /*#__PURE__*/ React$b.createElement("div", null, props.children))), fragment) : null);
|
|
34947
35070
|
});
|
|
34948
35071
|
const $cc7e05a45900e73f$var$CONTENT_MARGIN = 10;
|
|
34949
35072
|
const [$cc7e05a45900e73f$var$SelectContentProvider, $cc7e05a45900e73f$var$useSelectContentContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME);
|
|
34950
|
-
const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$
|
|
35073
|
+
const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
34951
35074
|
const { __scopeSelect: __scopeSelect , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props;
|
|
34952
35075
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);
|
|
34953
|
-
const [contentWrapper, setContentWrapper] = React$
|
|
34954
|
-
const [content, setContent] = React$
|
|
34955
|
-
const [viewport, setViewport] = React$
|
|
35076
|
+
const [contentWrapper, setContentWrapper] = React$b.useState(null);
|
|
35077
|
+
const [content, setContent] = React$b.useState(null);
|
|
35078
|
+
const [viewport, setViewport] = React$b.useState(null);
|
|
34956
35079
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContent(node)
|
|
34957
35080
|
);
|
|
34958
|
-
const [selectedItem, setSelectedItem] = React$
|
|
34959
|
-
const [selectedItemText, setSelectedItemText] = React$
|
|
35081
|
+
const [selectedItem, setSelectedItem] = React$b.useState(null);
|
|
35082
|
+
const [selectedItemText, setSelectedItemText] = React$b.useState(null);
|
|
34960
35083
|
const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
|
|
34961
|
-
const [isPositioned, setIsPositioned] = React$
|
|
34962
|
-
const shouldRepositionRef = React$
|
|
34963
|
-
const shouldExpandOnScrollRef = React$
|
|
34964
|
-
const firstValidItemFoundRef = React$
|
|
34965
|
-
React$
|
|
35084
|
+
const [isPositioned, setIsPositioned] = React$b.useState(false);
|
|
35085
|
+
const shouldRepositionRef = React$b.useRef(true);
|
|
35086
|
+
const shouldExpandOnScrollRef = React$b.useRef(false);
|
|
35087
|
+
const firstValidItemFoundRef = React$b.useRef(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
|
|
35088
|
+
React$b.useEffect(()=>{
|
|
34966
35089
|
if (content) return hideOthers(content);
|
|
34967
35090
|
}, [
|
|
34968
35091
|
content
|
|
34969
35092
|
]); // Make sure the whole tree has focus guards as our `Select` may be
|
|
34970
35093
|
// the last element in the DOM (because of the `Portal`)
|
|
34971
35094
|
$3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
|
|
34972
|
-
const [contentZIndex, setContentZIndex] = React$
|
|
35095
|
+
const [contentZIndex, setContentZIndex] = React$b.useState();
|
|
34973
35096
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
34974
35097
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
34975
35098
|
}, [
|
|
34976
35099
|
content
|
|
34977
35100
|
]);
|
|
34978
|
-
const focusFirst = React$
|
|
35101
|
+
const focusFirst = React$b.useCallback((candidates)=>{
|
|
34979
35102
|
const [firstItem, ...restItems] = getItems().map((item)=>item.ref.current
|
|
34980
35103
|
);
|
|
34981
35104
|
const [lastItem] = restItems.slice(-1);
|
|
@@ -34995,7 +35118,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
34995
35118
|
getItems,
|
|
34996
35119
|
viewport
|
|
34997
35120
|
]);
|
|
34998
|
-
const position = React$
|
|
35121
|
+
const position = React$b.useCallback(()=>{
|
|
34999
35122
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
35000
35123
|
const triggerRect = context.trigger.getBoundingClientRect(); // -----------------------------------------------------------------------------------------
|
|
35001
35124
|
// Horizontal positioning
|
|
@@ -35090,7 +35213,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35090
35213
|
, [
|
|
35091
35214
|
position
|
|
35092
35215
|
]);
|
|
35093
|
-
const focusSelectedItem = React$
|
|
35216
|
+
const focusSelectedItem = React$b.useCallback(()=>focusFirst([
|
|
35094
35217
|
selectedItem,
|
|
35095
35218
|
content
|
|
35096
35219
|
])
|
|
@@ -35100,7 +35223,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35100
35223
|
content
|
|
35101
35224
|
]); // Since this is not dependent on layout, we want to ensure this runs at the same time as
|
|
35102
35225
|
// other effects across components. Hence why we don't call `focusSelectedItem` inside `position`.
|
|
35103
|
-
React$
|
|
35226
|
+
React$b.useEffect(()=>{
|
|
35104
35227
|
if (isPositioned) focusSelectedItem();
|
|
35105
35228
|
}, [
|
|
35106
35229
|
isPositioned,
|
|
@@ -35109,7 +35232,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35109
35232
|
// Because it is part of the normal flow, it will push down the viewport, thus throwing our
|
|
35110
35233
|
// trigger => selectedItem alignment off by the amount the viewport was pushed down.
|
|
35111
35234
|
// We wait for this to happen and then re-run the positining logic one more time to account for it.
|
|
35112
|
-
const handleScrollButtonChange = React$
|
|
35235
|
+
const handleScrollButtonChange = React$b.useCallback((node)=>{
|
|
35113
35236
|
if (node && shouldRepositionRef.current === true) {
|
|
35114
35237
|
position();
|
|
35115
35238
|
focusSelectedItem();
|
|
@@ -35121,7 +35244,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35121
35244
|
]); // prevent selecting items on `pointerup` in some cases after opening from `pointerdown`
|
|
35122
35245
|
// and close on `pointerup` outside.
|
|
35123
35246
|
const { onOpenChange: onOpenChange , triggerPointerDownPosRef: triggerPointerDownPosRef } = context;
|
|
35124
|
-
React$
|
|
35247
|
+
React$b.useEffect(()=>{
|
|
35125
35248
|
if (content) {
|
|
35126
35249
|
let pointerMoveDelta = {
|
|
35127
35250
|
x: 0,
|
|
@@ -35161,7 +35284,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35161
35284
|
onOpenChange,
|
|
35162
35285
|
triggerPointerDownPosRef
|
|
35163
35286
|
]);
|
|
35164
|
-
React$
|
|
35287
|
+
React$b.useEffect(()=>{
|
|
35165
35288
|
const close = ()=>onOpenChange(false)
|
|
35166
35289
|
;
|
|
35167
35290
|
window.addEventListener('blur', close);
|
|
@@ -35185,7 +35308,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35185
35308
|
*/ setTimeout(()=>nextItem.ref.current.focus()
|
|
35186
35309
|
);
|
|
35187
35310
|
});
|
|
35188
|
-
const itemRefCallback = React$
|
|
35311
|
+
const itemRefCallback = React$b.useCallback((node, value, disabled)=>{
|
|
35189
35312
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
35190
35313
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
35191
35314
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -35195,18 +35318,18 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35195
35318
|
}, [
|
|
35196
35319
|
context.value
|
|
35197
35320
|
]);
|
|
35198
|
-
const handleItemLeave = React$
|
|
35321
|
+
const handleItemLeave = React$b.useCallback(()=>content === null || content === void 0 ? void 0 : content.focus()
|
|
35199
35322
|
, [
|
|
35200
35323
|
content
|
|
35201
35324
|
]);
|
|
35202
|
-
const itemTextRefCallback = React$
|
|
35325
|
+
const itemTextRefCallback = React$b.useCallback((node, value, disabled)=>{
|
|
35203
35326
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
35204
35327
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
35205
35328
|
if (isSelectedItem || isFirstValidItem) setSelectedItemText(node);
|
|
35206
35329
|
}, [
|
|
35207
35330
|
context.value
|
|
35208
35331
|
]);
|
|
35209
|
-
return /*#__PURE__*/ React$
|
|
35332
|
+
return /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectContentProvider, {
|
|
35210
35333
|
scope: __scopeSelect,
|
|
35211
35334
|
contentWrapper: contentWrapper,
|
|
35212
35335
|
content: content,
|
|
@@ -35221,10 +35344,10 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35221
35344
|
isPositioned: isPositioned,
|
|
35222
35345
|
shouldExpandOnScrollRef: shouldExpandOnScrollRef,
|
|
35223
35346
|
searchRef: searchRef
|
|
35224
|
-
}, /*#__PURE__*/ React$
|
|
35347
|
+
}, /*#__PURE__*/ React$b.createElement($01b9c$RemoveScroll, {
|
|
35225
35348
|
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
|
35226
35349
|
allowPinchZoom: true
|
|
35227
|
-
}, /*#__PURE__*/ React$
|
|
35350
|
+
}, /*#__PURE__*/ React$b.createElement("div", {
|
|
35228
35351
|
ref: setContentWrapper,
|
|
35229
35352
|
style: {
|
|
35230
35353
|
display: 'flex',
|
|
@@ -35232,7 +35355,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35232
35355
|
position: 'fixed',
|
|
35233
35356
|
zIndex: contentZIndex
|
|
35234
35357
|
}
|
|
35235
|
-
}, /*#__PURE__*/ React$
|
|
35358
|
+
}, /*#__PURE__*/ React$b.createElement($d3863c46a17e8a28$export$20e40289641fbbb6, {
|
|
35236
35359
|
asChild: true // we make sure we're not trapping once it's been closed
|
|
35237
35360
|
,
|
|
35238
35361
|
trapped: context.open,
|
|
@@ -35247,7 +35370,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35247
35370
|
});
|
|
35248
35371
|
event.preventDefault();
|
|
35249
35372
|
})
|
|
35250
|
-
}, /*#__PURE__*/ React$
|
|
35373
|
+
}, /*#__PURE__*/ React$b.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
|
|
35251
35374
|
role: "listbox",
|
|
35252
35375
|
id: context.contentId,
|
|
35253
35376
|
"data-state": context.open ? 'open' : 'closed',
|
|
@@ -35310,18 +35433,18 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$a.forwardRef
|
|
|
35310
35433
|
/* -------------------------------------------------------------------------------------------------
|
|
35311
35434
|
* SelectViewport
|
|
35312
35435
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$VIEWPORT_NAME = 'SelectViewport';
|
|
35313
|
-
const $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/ React$
|
|
35436
|
+
const $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35314
35437
|
const { __scopeSelect: __scopeSelect , ...viewportProps } = props;
|
|
35315
35438
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);
|
|
35316
35439
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentContext.onViewportChange);
|
|
35317
|
-
const prevScrollTopRef = React$
|
|
35318
|
-
return /*#__PURE__*/ React$
|
|
35440
|
+
const prevScrollTopRef = React$b.useRef(0);
|
|
35441
|
+
return /*#__PURE__*/ React$b.createElement(React$b.Fragment, null, /*#__PURE__*/ React$b.createElement("style", {
|
|
35319
35442
|
dangerouslySetInnerHTML: {
|
|
35320
35443
|
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
|
35321
35444
|
}
|
|
35322
|
-
}), /*#__PURE__*/ React$
|
|
35445
|
+
}), /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$Collection.Slot, {
|
|
35323
35446
|
scope: __scopeSelect
|
|
35324
|
-
}, /*#__PURE__*/ React$
|
|
35447
|
+
}, /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
35325
35448
|
"data-radix-select-viewport": "",
|
|
35326
35449
|
role: "presentation"
|
|
35327
35450
|
}, viewportProps, {
|
|
@@ -35369,13 +35492,13 @@ $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$GROUP_NAME);
|
|
|
35369
35492
|
* SelectItem
|
|
35370
35493
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$ITEM_NAME = 'SelectItem';
|
|
35371
35494
|
const [$cc7e05a45900e73f$var$SelectItemContextProvider, $cc7e05a45900e73f$var$useSelectItemContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$ITEM_NAME);
|
|
35372
|
-
const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$
|
|
35495
|
+
const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35373
35496
|
const { __scopeSelect: __scopeSelect , value: value , disabled: disabled = false , textValue: textValueProp , ...itemProps } = props;
|
|
35374
35497
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);
|
|
35375
35498
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);
|
|
35376
35499
|
const isSelected = context.value === value;
|
|
35377
|
-
const [textValue, setTextValue] = React$
|
|
35378
|
-
const [isFocused, setIsFocused] = React$
|
|
35500
|
+
const [textValue, setTextValue] = React$b.useState(textValueProp !== null && textValueProp !== void 0 ? textValueProp : '');
|
|
35501
|
+
const [isFocused, setIsFocused] = React$b.useState(false);
|
|
35379
35502
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>{
|
|
35380
35503
|
var _contentContext$itemR;
|
|
35381
35504
|
return (_contentContext$itemR = contentContext.itemRefCallback) === null || _contentContext$itemR === void 0 ? void 0 : _contentContext$itemR.call(contentContext, node, value, disabled);
|
|
@@ -35387,24 +35510,24 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$a.forwardR
|
|
|
35387
35510
|
context.onOpenChange(false);
|
|
35388
35511
|
}
|
|
35389
35512
|
};
|
|
35390
|
-
return /*#__PURE__*/ React$
|
|
35513
|
+
return /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectItemContextProvider, {
|
|
35391
35514
|
scope: __scopeSelect,
|
|
35392
35515
|
value: value,
|
|
35393
35516
|
disabled: disabled,
|
|
35394
35517
|
textId: textId,
|
|
35395
35518
|
isSelected: isSelected,
|
|
35396
|
-
onItemTextChange: React$
|
|
35519
|
+
onItemTextChange: React$b.useCallback((node)=>{
|
|
35397
35520
|
setTextValue((prevTextValue)=>{
|
|
35398
35521
|
var _node$textContent;
|
|
35399
35522
|
return prevTextValue || ((_node$textContent = node === null || node === void 0 ? void 0 : node.textContent) !== null && _node$textContent !== void 0 ? _node$textContent : '').trim();
|
|
35400
35523
|
});
|
|
35401
35524
|
}, [])
|
|
35402
|
-
}, /*#__PURE__*/ React$
|
|
35525
|
+
}, /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$Collection.ItemSlot, {
|
|
35403
35526
|
scope: __scopeSelect,
|
|
35404
35527
|
value: value,
|
|
35405
35528
|
disabled: disabled,
|
|
35406
35529
|
textValue: textValue
|
|
35407
|
-
}, /*#__PURE__*/ React$
|
|
35530
|
+
}, /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
35408
35531
|
role: "option",
|
|
35409
35532
|
"aria-labelledby": textId,
|
|
35410
35533
|
"data-highlighted": isFocused ? '' : undefined // `isFocused` caveat fixes stuttering in VoiceOver
|
|
@@ -35449,21 +35572,21 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$a.forwardR
|
|
|
35449
35572
|
/* -------------------------------------------------------------------------------------------------
|
|
35450
35573
|
* SelectItemText
|
|
35451
35574
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$ITEM_TEXT_NAME = 'SelectItemText';
|
|
35452
|
-
const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React$
|
|
35575
|
+
const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35453
35576
|
// We ignore `className` and `style` as this part shouldn't be styled.
|
|
35454
35577
|
const { __scopeSelect: __scopeSelect , className: className , style: style , ...itemTextProps } = props;
|
|
35455
35578
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
35456
35579
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
35457
35580
|
const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
35458
35581
|
const nativeOptionsContext = $cc7e05a45900e73f$var$useSelectNativeOptionsContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
35459
|
-
const [itemTextNode, setItemTextNode] = React$
|
|
35582
|
+
const [itemTextNode, setItemTextNode] = React$b.useState(null);
|
|
35460
35583
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setItemTextNode(node)
|
|
35461
35584
|
, itemContext.onItemTextChange, (node)=>{
|
|
35462
35585
|
var _contentContext$itemT;
|
|
35463
35586
|
return (_contentContext$itemT = contentContext.itemTextRefCallback) === null || _contentContext$itemT === void 0 ? void 0 : _contentContext$itemT.call(contentContext, node, itemContext.value, itemContext.disabled);
|
|
35464
35587
|
});
|
|
35465
35588
|
const textContent = itemTextNode === null || itemTextNode === void 0 ? void 0 : itemTextNode.textContent;
|
|
35466
|
-
const nativeOption = React$
|
|
35589
|
+
const nativeOption = React$b.useMemo(()=>/*#__PURE__*/ React$b.createElement("option", {
|
|
35467
35590
|
key: itemContext.value,
|
|
35468
35591
|
value: itemContext.value,
|
|
35469
35592
|
disabled: itemContext.disabled
|
|
@@ -35483,7 +35606,7 @@ const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React$a.forwardR
|
|
|
35483
35606
|
onNativeOptionRemove,
|
|
35484
35607
|
nativeOption
|
|
35485
35608
|
]);
|
|
35486
|
-
return /*#__PURE__*/ React$
|
|
35609
|
+
return /*#__PURE__*/ React$b.createElement(React$b.Fragment, null, /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
35487
35610
|
id: itemContext.textId
|
|
35488
35611
|
}, itemTextProps, {
|
|
35489
35612
|
ref: composedRefs
|
|
@@ -35492,10 +35615,10 @@ const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React$a.forwardR
|
|
|
35492
35615
|
/* -------------------------------------------------------------------------------------------------
|
|
35493
35616
|
* SelectItemIndicator
|
|
35494
35617
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$ITEM_INDICATOR_NAME = 'SelectItemIndicator';
|
|
35495
|
-
const $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/ React$
|
|
35618
|
+
const $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35496
35619
|
const { __scopeSelect: __scopeSelect , ...itemIndicatorProps } = props;
|
|
35497
35620
|
const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_INDICATOR_NAME, __scopeSelect);
|
|
35498
|
-
return itemContext.isSelected ? /*#__PURE__*/ React$
|
|
35621
|
+
return itemContext.isSelected ? /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
35499
35622
|
"aria-hidden": true
|
|
35500
35623
|
}, itemIndicatorProps, {
|
|
35501
35624
|
ref: forwardedRef
|
|
@@ -35504,9 +35627,9 @@ const $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/ React$a.forwardR
|
|
|
35504
35627
|
/* -------------------------------------------------------------------------------------------------
|
|
35505
35628
|
* SelectScrollUpButton
|
|
35506
35629
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton';
|
|
35507
|
-
const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React$
|
|
35630
|
+
const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35508
35631
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
35509
|
-
const [canScrollUp1, setCanScrollUp] = React$
|
|
35632
|
+
const [canScrollUp1, setCanScrollUp] = React$b.useState(false);
|
|
35510
35633
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentContext.onScrollButtonChange);
|
|
35511
35634
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
35512
35635
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -35524,7 +35647,7 @@ const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React$a.forwardR
|
|
|
35524
35647
|
contentContext.viewport,
|
|
35525
35648
|
contentContext.isPositioned
|
|
35526
35649
|
]);
|
|
35527
|
-
return canScrollUp1 ? /*#__PURE__*/ React$
|
|
35650
|
+
return canScrollUp1 ? /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, _extends({}, props, {
|
|
35528
35651
|
ref: composedRefs,
|
|
35529
35652
|
onAutoScroll: ()=>{
|
|
35530
35653
|
const { viewport: viewport , selectedItem: selectedItem } = contentContext;
|
|
@@ -35535,9 +35658,9 @@ const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React$a.forwardR
|
|
|
35535
35658
|
/* -------------------------------------------------------------------------------------------------
|
|
35536
35659
|
* SelectScrollDownButton
|
|
35537
35660
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton';
|
|
35538
|
-
const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React$
|
|
35661
|
+
const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35539
35662
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
35540
|
-
const [canScrollDown1, setCanScrollDown] = React$
|
|
35663
|
+
const [canScrollDown1, setCanScrollDown] = React$b.useState(false);
|
|
35541
35664
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentContext.onScrollButtonChange);
|
|
35542
35665
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
35543
35666
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -35557,7 +35680,7 @@ const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React$a.forwardRe
|
|
|
35557
35680
|
contentContext.viewport,
|
|
35558
35681
|
contentContext.isPositioned
|
|
35559
35682
|
]);
|
|
35560
|
-
return canScrollDown1 ? /*#__PURE__*/ React$
|
|
35683
|
+
return canScrollDown1 ? /*#__PURE__*/ React$b.createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, _extends({}, props, {
|
|
35561
35684
|
ref: composedRefs,
|
|
35562
35685
|
onAutoScroll: ()=>{
|
|
35563
35686
|
const { viewport: viewport , selectedItem: selectedItem } = contentContext;
|
|
@@ -35565,18 +35688,18 @@ const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React$a.forwardRe
|
|
|
35565
35688
|
}
|
|
35566
35689
|
})) : null;
|
|
35567
35690
|
});
|
|
35568
|
-
const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$
|
|
35691
|
+
const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35569
35692
|
const { __scopeSelect: __scopeSelect , onAutoScroll: onAutoScroll , ...scrollIndicatorProps } = props;
|
|
35570
35693
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext('SelectScrollButton', __scopeSelect);
|
|
35571
|
-
const autoScrollTimerRef = React$
|
|
35694
|
+
const autoScrollTimerRef = React$b.useRef(null);
|
|
35572
35695
|
const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
|
|
35573
|
-
const clearAutoScrollTimer = React$
|
|
35696
|
+
const clearAutoScrollTimer = React$b.useCallback(()=>{
|
|
35574
35697
|
if (autoScrollTimerRef.current !== null) {
|
|
35575
35698
|
window.clearInterval(autoScrollTimerRef.current);
|
|
35576
35699
|
autoScrollTimerRef.current = null;
|
|
35577
35700
|
}
|
|
35578
35701
|
}, []);
|
|
35579
|
-
React$
|
|
35702
|
+
React$b.useEffect(()=>{
|
|
35580
35703
|
return ()=>clearAutoScrollTimer()
|
|
35581
35704
|
;
|
|
35582
35705
|
}, [
|
|
@@ -35595,7 +35718,7 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$a.forwa
|
|
|
35595
35718
|
}, [
|
|
35596
35719
|
getItems
|
|
35597
35720
|
]);
|
|
35598
|
-
return /*#__PURE__*/ React$
|
|
35721
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
35599
35722
|
"aria-hidden": true
|
|
35600
35723
|
}, scrollIndicatorProps, {
|
|
35601
35724
|
ref: forwardedRef,
|
|
@@ -35613,12 +35736,12 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$a.forwa
|
|
|
35613
35736
|
})
|
|
35614
35737
|
}));
|
|
35615
35738
|
});
|
|
35616
|
-
/* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$BubbleSelect = /*#__PURE__*/ React$
|
|
35739
|
+
/* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$BubbleSelect = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
35617
35740
|
const { value: value , ...selectProps } = props;
|
|
35618
|
-
const ref = React$
|
|
35741
|
+
const ref = React$b.useRef(null);
|
|
35619
35742
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
35620
35743
|
const prevValue = $010c2913dbd2fe3d$export$5cae361ad82dce8b(value); // Bubble value change to parents (e.g form change event)
|
|
35621
|
-
React$
|
|
35744
|
+
React$b.useEffect(()=>{
|
|
35622
35745
|
const select = ref.current;
|
|
35623
35746
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
35624
35747
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, 'value');
|
|
@@ -35645,9 +35768,9 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$a.forwa
|
|
|
35645
35768
|
*
|
|
35646
35769
|
* We use `VisuallyHidden` rather than `display: "none"` because Safari autofill
|
|
35647
35770
|
* won't work otherwise.
|
|
35648
|
-
*/ return /*#__PURE__*/ React$
|
|
35771
|
+
*/ return /*#__PURE__*/ React$b.createElement($ea1ef594cf570d83$export$439d29a4e110a164, {
|
|
35649
35772
|
asChild: true
|
|
35650
|
-
}, /*#__PURE__*/ React$
|
|
35773
|
+
}, /*#__PURE__*/ React$b.createElement("select", _extends({}, selectProps, {
|
|
35651
35774
|
ref: composedRefs,
|
|
35652
35775
|
defaultValue: value
|
|
35653
35776
|
})));
|
|
@@ -35655,9 +35778,9 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$a.forwa
|
|
|
35655
35778
|
$cc7e05a45900e73f$var$BubbleSelect.displayName = 'BubbleSelect';
|
|
35656
35779
|
function $cc7e05a45900e73f$var$useTypeaheadSearch(onSearchChange) {
|
|
35657
35780
|
const handleSearchChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onSearchChange);
|
|
35658
|
-
const searchRef = React$
|
|
35659
|
-
const timerRef = React$
|
|
35660
|
-
const handleTypeaheadSearch = React$
|
|
35781
|
+
const searchRef = React$b.useRef('');
|
|
35782
|
+
const timerRef = React$b.useRef(0);
|
|
35783
|
+
const handleTypeaheadSearch = React$b.useCallback((key)=>{
|
|
35661
35784
|
const search = searchRef.current + key;
|
|
35662
35785
|
handleSearchChange(search);
|
|
35663
35786
|
(function updateSearch(value) {
|
|
@@ -35669,11 +35792,11 @@ function $cc7e05a45900e73f$var$useTypeaheadSearch(onSearchChange) {
|
|
|
35669
35792
|
}, [
|
|
35670
35793
|
handleSearchChange
|
|
35671
35794
|
]);
|
|
35672
|
-
const resetTypeahead = React$
|
|
35795
|
+
const resetTypeahead = React$b.useCallback(()=>{
|
|
35673
35796
|
searchRef.current = '';
|
|
35674
35797
|
window.clearTimeout(timerRef.current);
|
|
35675
35798
|
}, []);
|
|
35676
|
-
React$
|
|
35799
|
+
React$b.useEffect(()=>{
|
|
35677
35800
|
return ()=>window.clearTimeout(timerRef.current)
|
|
35678
35801
|
;
|
|
35679
35802
|
}, []);
|
|
@@ -35732,9 +35855,9 @@ const $cc7e05a45900e73f$export$c3468e2714d175fa = $cc7e05a45900e73f$export$6b919
|
|
|
35732
35855
|
const $cc7e05a45900e73f$export$2f60d3ec9ad468f2 = $cc7e05a45900e73f$export$d8117927658af6d7;
|
|
35733
35856
|
const $cc7e05a45900e73f$export$bf1aedc3039c8d63 = $cc7e05a45900e73f$export$ff951e476c12189;
|
|
35734
35857
|
|
|
35735
|
-
const React$
|
|
35858
|
+
const React$2 = React__default["default"];
|
|
35736
35859
|
const BtIconChevronUp2Px = props =>
|
|
35737
|
-
/*#__PURE__*/ React$
|
|
35860
|
+
/*#__PURE__*/ React$2.createElement(
|
|
35738
35861
|
"svg",
|
|
35739
35862
|
Object.assign(
|
|
35740
35863
|
{
|
|
@@ -35743,8 +35866,8 @@ const BtIconChevronUp2Px = props =>
|
|
|
35743
35866
|
},
|
|
35744
35867
|
props
|
|
35745
35868
|
),
|
|
35746
|
-
/*#__PURE__*/ React$
|
|
35747
|
-
/*#__PURE__*/ React$
|
|
35869
|
+
/*#__PURE__*/ React$2.createElement("defs", null),
|
|
35870
|
+
/*#__PURE__*/ React$2.createElement("path", {
|
|
35748
35871
|
d:
|
|
35749
35872
|
"M28.999,23.5a.99676.99676,0,0,1-.707-.293l-12.28515-12.293L3.708,23.207A.99989.99989,0,0,1,2.294,21.793l13.71289-13.707L29.70605,21.793a.99976.99976,0,0,1-.707,1.707Z",
|
|
35750
35873
|
fill: "currentColor"
|
|
@@ -35755,10 +35878,10 @@ var BtIconChevronUp2Px_2 = BtIconChevronUp2Px;
|
|
|
35755
35878
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
35756
35879
|
var Select = function (_a) {
|
|
35757
35880
|
var isRequired = _a.isRequired, isDisabled = _a.isDisabled, placeholder = _a.placeholder, label = _a.label, options = _a.options, onOpenChange = _a.onOpenChange, isDefaultOpen = _a.isDefaultOpen, defaultValue = _a.defaultValue, errorMessage = _a.errorMessage, labelSize = _a.labelSize, helper = _a.helper, name = _a.name, isFluid = _a.isFluid, onBlur = _a.onBlur, onChange = _a.onChange, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure;
|
|
35758
|
-
var id = React$
|
|
35759
|
-
var arcRootElement = React$
|
|
35760
|
-
var surface = React$
|
|
35761
|
-
var _b = React$
|
|
35881
|
+
var id = React$b.useId();
|
|
35882
|
+
var arcRootElement = React$b.useContext(ArcRootElementContext);
|
|
35883
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
35884
|
+
var _b = React$b.useState(defaultValue), selectedValue = _b[0], setSelectedValue = _b[1];
|
|
35762
35885
|
var onValueChange = function (value) {
|
|
35763
35886
|
onChange && onChange(value);
|
|
35764
35887
|
setSelectedValue(value);
|
|
@@ -35808,7 +35931,7 @@ var ArcBreakpointL = 1024;
|
|
|
35808
35931
|
*/
|
|
35809
35932
|
var SiteFooter = function (_a) {
|
|
35810
35933
|
var children = _a.children, currentYear = _a.currentYear, _b = _a.curve, curve = _b === void 0 ? true : _b, logoLabel = _a.logoLabel, main = _a.main, siteName = _a.siteName, props = __rest$2(_a, ["children", "currentYear", "curve", "logoLabel", "main", "siteName"]);
|
|
35811
|
-
React$
|
|
35934
|
+
React$b.useEffect(function () {
|
|
35812
35935
|
React__default["default"].Children.map(children, function (item) {
|
|
35813
35936
|
if (item && item.type !== SiteFooterItem) {
|
|
35814
35937
|
throw new Error("Illegal child passed to <SiteFooter />. Ensure to only use <SiteFooter.Item />.");
|
|
@@ -35835,9 +35958,9 @@ var SiteFooter = function (_a) {
|
|
|
35835
35958
|
var SiteFooterItemGroup = function (_a) {
|
|
35836
35959
|
var children = _a.children, title = _a.title;
|
|
35837
35960
|
var isMinWidthArcBreakpointM = useMediaQuery("(min-width: ".concat(ArcBreakpointM, "px)"));
|
|
35838
|
-
React$
|
|
35961
|
+
React$b.useEffect(function () {
|
|
35839
35962
|
React__default["default"].Children.map(children, function (item) {
|
|
35840
|
-
if (item && item.type !== SiteFooterItem && item.type !== React$
|
|
35963
|
+
if (item && item.type !== SiteFooterItem && item.type !== React$b.Fragment) {
|
|
35841
35964
|
throw new Error("Illegal child passed to <SiteFooterItemGroup />. Ensure to only use <SiteFooter.Item />.");
|
|
35842
35965
|
}
|
|
35843
35966
|
});
|
|
@@ -35895,16 +36018,16 @@ var Item = function (_a) {
|
|
|
35895
36018
|
|
|
35896
36019
|
var ItemGroup = function (_a) {
|
|
35897
36020
|
var children = _a.children, href = _a.href, title = _a.title, onClick = _a.onClick, viewAllTitle = _a.viewAllTitle, props = __rest$2(_a, ["children", "href", "title", "onClick", "viewAllTitle"]);
|
|
35898
|
-
var _b = React$
|
|
36021
|
+
var _b = React$b.useState(false), hasClientSideJavaScript = _b[0], setHasClientSideJavaScript = _b[1];
|
|
35899
36022
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcBreakpointL, "px)"));
|
|
35900
|
-
React$
|
|
36023
|
+
React$b.useEffect(function () {
|
|
35901
36024
|
React__default["default"].Children.map(children, function (item) {
|
|
35902
|
-
if (item && item.type !== Item && item.type !== React$
|
|
36025
|
+
if (item && item.type !== Item && item.type !== React$b.Fragment) {
|
|
35903
36026
|
throw new Error("Illegal child passed to <SiteHeader.ItemGroup />. Ensure to only use <SiteHeader.Item />.");
|
|
35904
36027
|
}
|
|
35905
36028
|
});
|
|
35906
36029
|
}, [children]);
|
|
35907
|
-
React$
|
|
36030
|
+
React$b.useEffect(function () {
|
|
35908
36031
|
// useEffect does not run in ReactDomServer renders
|
|
35909
36032
|
setHasClientSideJavaScript(true);
|
|
35910
36033
|
}, [setHasClientSideJavaScript]);
|
|
@@ -35960,7 +36083,7 @@ var ItemGroupRehydrator = (function (el, hydrate) { return __awaiter(void 0, voi
|
|
|
35960
36083
|
|
|
35961
36084
|
var Column = function (_a) {
|
|
35962
36085
|
var children = _a.children, props = __rest$2(_a, ["children"]);
|
|
35963
|
-
React$
|
|
36086
|
+
React$b.useEffect(function () {
|
|
35964
36087
|
React__default["default"].Children.map(children, function (item) {
|
|
35965
36088
|
if (item && item.type !== ItemGroup) {
|
|
35966
36089
|
throw new Error("Illegal child passed to <SiteHeader.Column />. Ensure to only use <SiteHeader.ItemGroup />.");
|
|
@@ -35984,8 +36107,8 @@ var BackButton = function (_a) {
|
|
|
35984
36107
|
var Panel = function (_a) {
|
|
35985
36108
|
var _b;
|
|
35986
36109
|
var children = _a.children, navItemRef = _a.navItemRef, open = _a.open, promo = _a.promo, setOpen = _a.setOpen, subNavItemRef = _a.subNavItemRef, _c = _a.subNavLink, subNavLink = _c === void 0 ? "" : _c, title = _a.title, viewAll = _a.viewAll, withSubNav = _a.withSubNav, props = __rest$2(_a, ["children", "navItemRef", "open", "promo", "setOpen", "subNavItemRef", "subNavLink", "title", "viewAll", "withSubNav"]);
|
|
35987
|
-
var transparent = React$
|
|
35988
|
-
React$
|
|
36110
|
+
var transparent = React$b.useContext(Context).transparent;
|
|
36111
|
+
React$b.useEffect(function () {
|
|
35989
36112
|
// Where appropriate, close the Panel when clicking outside of it,
|
|
35990
36113
|
// by listening to clicks on the entire document and acting accordingly.
|
|
35991
36114
|
var handleClick = function (e) {
|
|
@@ -36021,7 +36144,7 @@ var Panel = function (_a) {
|
|
|
36021
36144
|
document.removeEventListener("click", handleClick);
|
|
36022
36145
|
};
|
|
36023
36146
|
}, [navItemRef, setOpen, subNavItemRef, subNavLink]);
|
|
36024
|
-
React$
|
|
36147
|
+
React$b.useEffect(function () {
|
|
36025
36148
|
var handleKeydown = function (e) {
|
|
36026
36149
|
// Check the viewport width at time of press
|
|
36027
36150
|
var isMinWidthArcBreakpointL = window.matchMedia("(min-width: ".concat(ArcBreakpointL, "px)")).matches;
|
|
@@ -36069,15 +36192,15 @@ Panel.ViewAll = ViewAll;
|
|
|
36069
36192
|
var NavItem = function (_a) {
|
|
36070
36193
|
var _b, _c;
|
|
36071
36194
|
var children = _a.children, href = _a.href, isCurrent = _a.isCurrent, onClick = _a.onClick, promo = _a.promo, title = _a.title, viewAllTitle = _a.viewAllTitle, props = __rest$2(_a, ["children", "href", "isCurrent", "onClick", "promo", "title", "viewAllTitle"]);
|
|
36072
|
-
var navItem = React$
|
|
36073
|
-
var _d = React$
|
|
36195
|
+
var navItem = React$b.useRef();
|
|
36196
|
+
var _d = React$b.useState(false), panelOpen = _d[0], setPanelOpen = _d[1];
|
|
36074
36197
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcBreakpointL, "px)"));
|
|
36075
|
-
React$
|
|
36198
|
+
React$b.useEffect(function () {
|
|
36076
36199
|
React__default["default"].Children.map(children, function (item) {
|
|
36077
36200
|
if (item &&
|
|
36078
36201
|
item.type !== ItemGroup &&
|
|
36079
36202
|
item.type !== Column &&
|
|
36080
|
-
item.type !== React$
|
|
36203
|
+
item.type !== React$b.Fragment) {
|
|
36081
36204
|
throw new Error("Illegal child passed to <SiteHeader.NavItem />. Ensure to only use <SiteHeader.ItemGroup /> or <SiteHeader.Column />.");
|
|
36082
36205
|
}
|
|
36083
36206
|
});
|
|
@@ -36145,21 +36268,21 @@ var NavItemRehydrator = (function (el, hydrate) { return __awaiter(void 0, void
|
|
|
36145
36268
|
var SubNavItem = function (_a) {
|
|
36146
36269
|
var _b, _c;
|
|
36147
36270
|
var children = _a.children, _d = _a.isDefaultItem, isDefaultItem = _d === void 0 ? false : _d, href = _a.href, onClick = _a.onClick, offsetXL = _a.offsetXL, promo = _a.promo, subTitle = _a.subTitle, title = _a.title, viewAllTitle = _a.viewAllTitle, props = __rest$2(_a, ["children", "isDefaultItem", "href", "onClick", "offsetXL", "promo", "subTitle", "title", "viewAllTitle"]);
|
|
36148
|
-
var navItem = React$
|
|
36149
|
-
var subNavItem = React$
|
|
36150
|
-
var _e = React$
|
|
36271
|
+
var navItem = React$b.useContext(Context$1).navItem;
|
|
36272
|
+
var subNavItem = React$b.useRef();
|
|
36273
|
+
var _e = React$b.useState(false), panelOpen = _e[0], setPanelOpen = _e[1];
|
|
36151
36274
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcBreakpointL, "px)"));
|
|
36152
|
-
React$
|
|
36275
|
+
React$b.useEffect(function () {
|
|
36153
36276
|
React__default["default"].Children.map(children, function (item) {
|
|
36154
36277
|
if (item &&
|
|
36155
36278
|
item.type !== ItemGroup &&
|
|
36156
36279
|
item.type !== Column &&
|
|
36157
|
-
item.type !== React$
|
|
36280
|
+
item.type !== React$b.Fragment) {
|
|
36158
36281
|
throw new Error("Illegal child passed to <SiteHeader.SubNavItem />. Ensure to only use <SiteHeader.ItemGroup /> or <SiteHeader.Column />.");
|
|
36159
36282
|
}
|
|
36160
36283
|
});
|
|
36161
36284
|
}, [children]);
|
|
36162
|
-
React$
|
|
36285
|
+
React$b.useEffect(function () {
|
|
36163
36286
|
if (isDefaultItem && isMinWidthArcBreakpointL) {
|
|
36164
36287
|
setPanelOpen(true);
|
|
36165
36288
|
}
|
|
@@ -36246,18 +36369,18 @@ var SubNavItemRehydrator = (function (el, hydrate) { return __awaiter(void 0, vo
|
|
|
36246
36369
|
}); });
|
|
36247
36370
|
|
|
36248
36371
|
var defaultContext$1 = { navItem: null, subTitle: null };
|
|
36249
|
-
var Context$1 = React$
|
|
36372
|
+
var Context$1 = React$b.createContext(defaultContext$1);
|
|
36250
36373
|
var Provider$1 = Context$1.Provider;
|
|
36251
36374
|
var NavItemWithSubNav = function (_a) {
|
|
36252
36375
|
var _b, _c;
|
|
36253
36376
|
var href = _a.href, slot1 = _a.slot1, slot2 = _a.slot2, slot3 = _a.slot3, _d = _a.subTitle, subTitle = _d === void 0 ? null : _d, title = _a.title, onViewAllClick = _a.onViewAllClick, viewAllTitle = _a.viewAllTitle, props = __rest$2(_a, ["href", "slot1", "slot2", "slot3", "subTitle", "title", "onViewAllClick", "viewAllTitle"]);
|
|
36254
|
-
var navItem = React$
|
|
36255
|
-
var _e = React$
|
|
36256
|
-
var _f = React$
|
|
36377
|
+
var navItem = React$b.useRef();
|
|
36378
|
+
var _e = React$b.useState(true), defaultItem = _e[0], setDefaultItem = _e[1];
|
|
36379
|
+
var _f = React$b.useState(false), panelOpen = _f[0], setPanelOpen = _f[1];
|
|
36257
36380
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcBreakpointL, "px)"));
|
|
36258
|
-
React$
|
|
36381
|
+
React$b.useEffect(function () {
|
|
36259
36382
|
React__default["default"].Children.map(slot1, function (item) {
|
|
36260
|
-
if (item && item.type !== SubNavItem && item.type !== React$
|
|
36383
|
+
if (item && item.type !== SubNavItem && item.type !== React$b.Fragment) {
|
|
36261
36384
|
throw new Error("Illegal child passed to <SiteHeader.NavItemWithSubNav /> `slot1` prop. Ensure to only use <SiteHeader.SubNavItem />.");
|
|
36262
36385
|
}
|
|
36263
36386
|
if (item.props.isDefaultItem) {
|
|
@@ -36265,7 +36388,7 @@ var NavItemWithSubNav = function (_a) {
|
|
|
36265
36388
|
}
|
|
36266
36389
|
});
|
|
36267
36390
|
React__default["default"].Children.map(slot2, function (item) {
|
|
36268
|
-
if (item && item.type !== SubNavItem && item.type !== React$
|
|
36391
|
+
if (item && item.type !== SubNavItem && item.type !== React$b.Fragment) {
|
|
36269
36392
|
throw new Error("Illegal child passed to <SiteHeader.NavItemWithSubNav /> `slot2` prop. Ensure to only use <SiteHeader.SubNavItem />.");
|
|
36270
36393
|
}
|
|
36271
36394
|
if (item.props.isDefaultItem) {
|
|
@@ -36273,7 +36396,7 @@ var NavItemWithSubNav = function (_a) {
|
|
|
36273
36396
|
}
|
|
36274
36397
|
});
|
|
36275
36398
|
React__default["default"].Children.map(slot3, function (item) {
|
|
36276
|
-
if (item && item.type !== SubNavItem && item.type !== React$
|
|
36399
|
+
if (item && item.type !== SubNavItem && item.type !== React$b.Fragment) {
|
|
36277
36400
|
throw new Error("Illegal child passed to <SiteHeader.NavItemWithSubNav /> `slot3` prop. Ensure to only use <SiteHeader.SubNavItem />.");
|
|
36278
36401
|
}
|
|
36279
36402
|
if (item.props.isDefaultItem) {
|
|
@@ -36358,6 +36481,11 @@ var NavItemWithSubNavRehydrator = (function (el, hydrate) { return __awaiter(voi
|
|
|
36358
36481
|
});
|
|
36359
36482
|
}); });
|
|
36360
36483
|
|
|
36484
|
+
var NodeItem = function (_a) {
|
|
36485
|
+
var children = _a.children, props = __rest$2(_a, ["children"]);
|
|
36486
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, __assign$2({}, filterDataAttrs(props)), children));
|
|
36487
|
+
};
|
|
36488
|
+
|
|
36361
36489
|
var MenuButton = function (_a) {
|
|
36362
36490
|
var _b;
|
|
36363
36491
|
var menuOpen = _a.menuOpen, setMenuOpen = _a.setMenuOpen;
|
|
@@ -36373,7 +36501,7 @@ var MenuButton = function (_a) {
|
|
|
36373
36501
|
};
|
|
36374
36502
|
|
|
36375
36503
|
var defaultContext = { transparent: false };
|
|
36376
|
-
var Context = React$
|
|
36504
|
+
var Context = React$b.createContext(defaultContext);
|
|
36377
36505
|
var Provider = Context.Provider;
|
|
36378
36506
|
/**
|
|
36379
36507
|
* Use `SiteHeader` to display brand logo and navigation at the top of a page.
|
|
@@ -36381,20 +36509,21 @@ var Provider = Context.Provider;
|
|
|
36381
36509
|
var SiteHeader = function (_a) {
|
|
36382
36510
|
var _b;
|
|
36383
36511
|
var children = _a.children, basket = _a.basket, _c = _a.hasLogin, hasLogin = _c === void 0 ? true : _c, _d = _a.isTransparent, isTransparent = _d === void 0 ? false : _d, _e = _a.loginHref, loginHref = _e === void 0 ? "/login" : _e, logoOnClick = _a.logoOnClick, loginOnClick = _a.loginOnClick, _f = _a.loginTitle, loginTitle = _f === void 0 ? "Log in / Register" : _f, _g = _a.logoHref, logoHref = _g === void 0 ? "/" : _g, _h = _a.logoLabel, logoLabel = _h === void 0 ? "Home" : _h, search = _a.search, subBrand = _a.subBrand, props = __rest$2(_a, ["children", "basket", "hasLogin", "isTransparent", "loginHref", "logoOnClick", "loginOnClick", "loginTitle", "logoHref", "logoLabel", "search", "subBrand"]);
|
|
36384
|
-
var _j = React$
|
|
36385
|
-
var _k = React$
|
|
36512
|
+
var _j = React$b.useState(false), hasClientSideJavaScript = _j[0], setHasClientSideJavaScript = _j[1];
|
|
36513
|
+
var _k = React$b.useState(false), menuOpen = _k[0], setMenuOpen = _k[1];
|
|
36386
36514
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcBreakpointL, "px)"));
|
|
36387
|
-
React$
|
|
36515
|
+
React$b.useEffect(function () {
|
|
36388
36516
|
React__default["default"].Children.map(children, function (item) {
|
|
36389
36517
|
if (item &&
|
|
36518
|
+
item.type !== NodeItem &&
|
|
36390
36519
|
item.type !== NavItem &&
|
|
36391
36520
|
item.type !== NavItemWithSubNav &&
|
|
36392
|
-
item.type !== React$
|
|
36521
|
+
item.type !== React$b.Fragment) {
|
|
36393
36522
|
throw new Error("Illegal child passed to <SiteHeader />. Ensure to only use <SiteHeader.NavItem /> or <SiteHeader.NavItemWithSubNav />");
|
|
36394
36523
|
}
|
|
36395
36524
|
});
|
|
36396
36525
|
}, [children]);
|
|
36397
|
-
React$
|
|
36526
|
+
React$b.useEffect(function () {
|
|
36398
36527
|
if (!isMinWidthArcBreakpointL && menuOpen) {
|
|
36399
36528
|
document.body.classList.add("arc-body--overflowHidden");
|
|
36400
36529
|
}
|
|
@@ -36405,7 +36534,7 @@ var SiteHeader = function (_a) {
|
|
|
36405
36534
|
document.body.classList.remove("arc-body--overflowHidden");
|
|
36406
36535
|
};
|
|
36407
36536
|
}, [isMinWidthArcBreakpointL, menuOpen]);
|
|
36408
|
-
React$
|
|
36537
|
+
React$b.useEffect(function () {
|
|
36409
36538
|
var handleKeydown = function (e) {
|
|
36410
36539
|
if (e.key === "Escape" || e.keyCode === 27) {
|
|
36411
36540
|
setMenuOpen(false);
|
|
@@ -36416,7 +36545,7 @@ var SiteHeader = function (_a) {
|
|
|
36416
36545
|
window.removeEventListener("keydown", handleKeydown);
|
|
36417
36546
|
};
|
|
36418
36547
|
}, [setMenuOpen]);
|
|
36419
|
-
React$
|
|
36548
|
+
React$b.useEffect(function () {
|
|
36420
36549
|
var handleClick = function (e) {
|
|
36421
36550
|
if (e.target.getAttribute("href")) {
|
|
36422
36551
|
setMenuOpen(false);
|
|
@@ -36427,7 +36556,7 @@ var SiteHeader = function (_a) {
|
|
|
36427
36556
|
document.removeEventListener("click", handleClick);
|
|
36428
36557
|
};
|
|
36429
36558
|
}, [setMenuOpen]);
|
|
36430
|
-
React$
|
|
36559
|
+
React$b.useEffect(function () {
|
|
36431
36560
|
// useEffect does not run in ReactDomServer renders
|
|
36432
36561
|
setHasClientSideJavaScript(true);
|
|
36433
36562
|
}, [setHasClientSideJavaScript]);
|
|
@@ -36462,12 +36591,14 @@ Column.displayName = "SiteHeader.Column";
|
|
|
36462
36591
|
Item.displayName = "SiteHeader.Item";
|
|
36463
36592
|
ItemGroup.displayName = "SiteHeader.ItemGroup";
|
|
36464
36593
|
NavItem.displayName = "SiteHeader.NavItem";
|
|
36594
|
+
NodeItem.displayName = "SiteHeader.NodeItem";
|
|
36465
36595
|
NavItemWithSubNav.displayName = "SiteHeader.NavItemWithSubNav";
|
|
36466
36596
|
SubNavItem.displayName = "SiteHeader.SubNavItem";
|
|
36467
36597
|
SiteHeader.Column = Column;
|
|
36468
36598
|
SiteHeader.Item = Item;
|
|
36469
36599
|
SiteHeader.ItemGroup = ItemGroup;
|
|
36470
36600
|
SiteHeader.NavItem = NavItem;
|
|
36601
|
+
SiteHeader.NodeItem = NodeItem;
|
|
36471
36602
|
SiteHeader.NavItemWithSubNav = NavItemWithSubNav;
|
|
36472
36603
|
SiteHeader.SubNavItem = SubNavItem;
|
|
36473
36604
|
|
|
@@ -36525,7 +36656,7 @@ SiteHeaderRehydrator.NavItemWithSubNavRehydrator = NavItemWithSubNavRehydrator;
|
|
|
36525
36656
|
SiteHeaderRehydrator.SubNavItemRehydrator = SubNavItemRehydrator;
|
|
36526
36657
|
|
|
36527
36658
|
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
36528
|
-
const [size, setSize] = React$
|
|
36659
|
+
const [size, setSize] = React$b.useState(undefined);
|
|
36529
36660
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
36530
36661
|
if (element) {
|
|
36531
36662
|
// provide size as early as possible
|
|
@@ -36576,23 +36707,23 @@ function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
|
36576
36707
|
* -----------------------------------------------------------------------------------------------*/ const $6be4966fd9bbc698$var$SWITCH_NAME = 'Switch';
|
|
36577
36708
|
const [$6be4966fd9bbc698$var$createSwitchContext, $6be4966fd9bbc698$export$cf7f5f17f69cbd43] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($6be4966fd9bbc698$var$SWITCH_NAME);
|
|
36578
36709
|
const [$6be4966fd9bbc698$var$SwitchProvider, $6be4966fd9bbc698$var$useSwitchContext] = $6be4966fd9bbc698$var$createSwitchContext($6be4966fd9bbc698$var$SWITCH_NAME);
|
|
36579
|
-
const $6be4966fd9bbc698$export$b5d5cf8927ab7262 = /*#__PURE__*/ React$
|
|
36710
|
+
const $6be4966fd9bbc698$export$b5d5cf8927ab7262 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
36580
36711
|
const { __scopeSwitch: __scopeSwitch , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...switchProps } = props;
|
|
36581
|
-
const [button, setButton] = React$
|
|
36712
|
+
const [button, setButton] = React$b.useState(null);
|
|
36582
36713
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setButton(node)
|
|
36583
36714
|
);
|
|
36584
|
-
const hasConsumerStoppedPropagationRef = React$
|
|
36715
|
+
const hasConsumerStoppedPropagationRef = React$b.useRef(false); // We set this to true by default so that events bubble to forms without JS (SSR)
|
|
36585
36716
|
const isFormControl = button ? Boolean(button.closest('form')) : true;
|
|
36586
36717
|
const [checked = false, setChecked] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
36587
36718
|
prop: checkedProp,
|
|
36588
36719
|
defaultProp: defaultChecked,
|
|
36589
36720
|
onChange: onCheckedChange
|
|
36590
36721
|
});
|
|
36591
|
-
return /*#__PURE__*/ React$
|
|
36722
|
+
return /*#__PURE__*/ React$b.createElement($6be4966fd9bbc698$var$SwitchProvider, {
|
|
36592
36723
|
scope: __scopeSwitch,
|
|
36593
36724
|
checked: checked,
|
|
36594
36725
|
disabled: disabled
|
|
36595
|
-
}, /*#__PURE__*/ React$
|
|
36726
|
+
}, /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
36596
36727
|
type: "button",
|
|
36597
36728
|
role: "switch",
|
|
36598
36729
|
"aria-checked": checked,
|
|
@@ -36613,7 +36744,7 @@ const $6be4966fd9bbc698$export$b5d5cf8927ab7262 = /*#__PURE__*/ React$a.forwardR
|
|
|
36613
36744
|
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
36614
36745
|
}
|
|
36615
36746
|
})
|
|
36616
|
-
})), isFormControl && /*#__PURE__*/ React$
|
|
36747
|
+
})), isFormControl && /*#__PURE__*/ React$b.createElement($6be4966fd9bbc698$var$BubbleInput, {
|
|
36617
36748
|
control: button,
|
|
36618
36749
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
36619
36750
|
name: name,
|
|
@@ -36630,10 +36761,10 @@ const $6be4966fd9bbc698$export$b5d5cf8927ab7262 = /*#__PURE__*/ React$a.forwardR
|
|
|
36630
36761
|
/* -------------------------------------------------------------------------------------------------
|
|
36631
36762
|
* SwitchThumb
|
|
36632
36763
|
* -----------------------------------------------------------------------------------------------*/ const $6be4966fd9bbc698$var$THUMB_NAME = 'SwitchThumb';
|
|
36633
|
-
const $6be4966fd9bbc698$export$4d07bf653ea69106 = /*#__PURE__*/ React$
|
|
36764
|
+
const $6be4966fd9bbc698$export$4d07bf653ea69106 = /*#__PURE__*/ React$b.forwardRef((props, forwardedRef)=>{
|
|
36634
36765
|
const { __scopeSwitch: __scopeSwitch , ...thumbProps } = props;
|
|
36635
36766
|
const context = $6be4966fd9bbc698$var$useSwitchContext($6be4966fd9bbc698$var$THUMB_NAME, __scopeSwitch);
|
|
36636
|
-
return /*#__PURE__*/ React$
|
|
36767
|
+
return /*#__PURE__*/ React$b.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
36637
36768
|
"data-state": $6be4966fd9bbc698$var$getState(context.checked),
|
|
36638
36769
|
"data-disabled": context.disabled ? '' : undefined
|
|
36639
36770
|
}, thumbProps, {
|
|
@@ -36642,10 +36773,10 @@ const $6be4966fd9bbc698$export$4d07bf653ea69106 = /*#__PURE__*/ React$a.forwardR
|
|
|
36642
36773
|
});
|
|
36643
36774
|
/* ---------------------------------------------------------------------------------------------- */ const $6be4966fd9bbc698$var$BubbleInput = (props)=>{
|
|
36644
36775
|
const { control: control , checked: checked , bubbles: bubbles = true , ...inputProps } = props;
|
|
36645
|
-
const ref = React$
|
|
36776
|
+
const ref = React$b.useRef(null);
|
|
36646
36777
|
const prevChecked = $010c2913dbd2fe3d$export$5cae361ad82dce8b(checked);
|
|
36647
36778
|
const controlSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(control); // Bubble checked change to parents (e.g form change event)
|
|
36648
|
-
React$
|
|
36779
|
+
React$b.useEffect(()=>{
|
|
36649
36780
|
const input = ref.current;
|
|
36650
36781
|
const inputProto = window.HTMLInputElement.prototype;
|
|
36651
36782
|
const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'checked');
|
|
@@ -36662,7 +36793,7 @@ const $6be4966fd9bbc698$export$4d07bf653ea69106 = /*#__PURE__*/ React$a.forwardR
|
|
|
36662
36793
|
checked,
|
|
36663
36794
|
bubbles
|
|
36664
36795
|
]);
|
|
36665
|
-
return /*#__PURE__*/ React$
|
|
36796
|
+
return /*#__PURE__*/ React$b.createElement("input", _extends({
|
|
36666
36797
|
type: "checkbox",
|
|
36667
36798
|
"aria-hidden": true,
|
|
36668
36799
|
defaultChecked: checked
|
|
@@ -36706,7 +36837,7 @@ var VerticalSpace = function (_a) {
|
|
|
36706
36837
|
/** Use `Switch` to toggle between checked and not checked. */
|
|
36707
36838
|
var Switch = function (_a) {
|
|
36708
36839
|
var defaultChecked = _a.defaultChecked, onCheckedChange = _a.onCheckedChange, label = _a.label, name = _a.name, onBlur = _a.onBlur, value = _a.value, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, id = _a.id, _c = _a.labelSize, labelSize = _c === void 0 ? "s" : _c, statusText = _a.statusText, _d = _a.hideLabel, hideLabel = _d === void 0 ? false : _d;
|
|
36709
|
-
var surface = React$
|
|
36840
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
36710
36841
|
return (React__default["default"].createElement(FormControl, { errorMessage: errorMessage, htmlFor: id, isDisabled: isDisabled, label: hideLabel ? "" : label, labelSize: labelSize, requirementStatus: "not-applicable" },
|
|
36711
36842
|
!hideLabel && React__default["default"].createElement(VerticalSpace, { size: "8" }),
|
|
36712
36843
|
React__default["default"].createElement("div", { className: "arc-Switch-container" },
|
|
@@ -36734,7 +36865,7 @@ var Switch = function (_a) {
|
|
|
36734
36865
|
var Badge = function (_a) {
|
|
36735
36866
|
var _b, _c;
|
|
36736
36867
|
var children = _a.children, _d = _a.state, state = _d === void 0 ? "default" : _d, _e = _a.size, size = _e === void 0 ? "default" : _e, _f = _a.fill, fill = _f === void 0 ? "solid" : _f, ariaLabel = _a.ariaLabel;
|
|
36737
|
-
var surface = React$
|
|
36868
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
36738
36869
|
return (React__default["default"].createElement("div", __assign$2({}, (ariaLabel && { "aria-label": ariaLabel }), { className: classNames((_b = {
|
|
36739
36870
|
"arc-Badge": true,
|
|
36740
36871
|
"arc-Badge--onDarkSurface": surface === "dark",
|
|
@@ -36751,9 +36882,9 @@ var Badge = function (_a) {
|
|
|
36751
36882
|
React__default["default"].createElement(Text, { size: size === "default" ? "xs" : "m" }, children))));
|
|
36752
36883
|
};
|
|
36753
36884
|
|
|
36754
|
-
const React = React__default["default"];
|
|
36885
|
+
const React$1 = React__default["default"];
|
|
36755
36886
|
const BtIconCross = props =>
|
|
36756
|
-
/*#__PURE__*/ React.createElement(
|
|
36887
|
+
/*#__PURE__*/ React$1.createElement(
|
|
36757
36888
|
"svg",
|
|
36758
36889
|
Object.assign(
|
|
36759
36890
|
{
|
|
@@ -36762,13 +36893,13 @@ const BtIconCross = props =>
|
|
|
36762
36893
|
},
|
|
36763
36894
|
props
|
|
36764
36895
|
),
|
|
36765
|
-
/*#__PURE__*/ React.createElement("defs", null),
|
|
36766
|
-
/*#__PURE__*/ React.createElement("path", {
|
|
36896
|
+
/*#__PURE__*/ React$1.createElement("defs", null),
|
|
36897
|
+
/*#__PURE__*/ React$1.createElement("path", {
|
|
36767
36898
|
d:
|
|
36768
36899
|
"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
|
|
36769
36900
|
fill: "currentColor"
|
|
36770
36901
|
}),
|
|
36771
|
-
/*#__PURE__*/ React.createElement("path", {
|
|
36902
|
+
/*#__PURE__*/ React$1.createElement("path", {
|
|
36772
36903
|
d:
|
|
36773
36904
|
"M20.85352,11.14648a.49983.49983,0,0,0-.707,0L16,15.293l-4.14648-4.14649a.5.5,0,0,0-.707.707L15.293,16l-4.14649,4.14648a.5.5,0,1,0,.707.707L16,16.707l4.14648,4.14649a.5.5,0,0,0,.707-.707L16.707,16l4.14649-4.14648A.49983.49983,0,0,0,20.85352,11.14648Z",
|
|
36774
36905
|
fill: "currentColor"
|
|
@@ -36776,13 +36907,33 @@ const BtIconCross = props =>
|
|
|
36776
36907
|
);
|
|
36777
36908
|
var BtIconCross_2 = BtIconCross;
|
|
36778
36909
|
|
|
36910
|
+
const React = React__default["default"];
|
|
36911
|
+
const BtIconCrossFill = props =>
|
|
36912
|
+
/*#__PURE__*/ React.createElement(
|
|
36913
|
+
"svg",
|
|
36914
|
+
Object.assign(
|
|
36915
|
+
{
|
|
36916
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36917
|
+
viewBox: "0 0 32 32"
|
|
36918
|
+
},
|
|
36919
|
+
props
|
|
36920
|
+
),
|
|
36921
|
+
/*#__PURE__*/ React.createElement("defs", null),
|
|
36922
|
+
/*#__PURE__*/ React.createElement("path", {
|
|
36923
|
+
d:
|
|
36924
|
+
"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm4.85352,18.14648a.5.5,0,1,1-.707.707L16,16.707l-4.14648,4.14649a.5.5,0,0,1-.707-.707L15.293,16l-4.14649-4.14648a.5.5,0,0,1,.707-.707L16,15.293l4.14648-4.14649a.5.5,0,0,1,.707.707L16.707,16Z",
|
|
36925
|
+
fill: "currentColor"
|
|
36926
|
+
})
|
|
36927
|
+
);
|
|
36928
|
+
var BtIconCrossFill_2 = BtIconCrossFill;
|
|
36929
|
+
|
|
36779
36930
|
/**
|
|
36780
36931
|
* use `Tag` to promote features and manage filtering.
|
|
36781
36932
|
*/
|
|
36782
36933
|
var Tag = function (_a) {
|
|
36783
36934
|
var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, props = __rest$2(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove"]);
|
|
36784
|
-
var surface = React$
|
|
36785
|
-
var _b = React$
|
|
36935
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
36936
|
+
var _b = React$b.useState(false), isRemoved = _b[0], setIsRemoved = _b[1];
|
|
36786
36937
|
var onRemoveHandler = function () {
|
|
36787
36938
|
setIsRemoved(function (p) { return !p; });
|
|
36788
36939
|
onRemove && onRemove();
|
|
@@ -36805,7 +36956,8 @@ var Tag = function (_a) {
|
|
|
36805
36956
|
React__default["default"].createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
36806
36957
|
React__default["default"].createElement("div", { className: "arc-Tag-label" }, children))))),
|
|
36807
36958
|
isRemovable && (React__default["default"].createElement("button", { className: "arc-Tag-icon arc-Tag-icon--removable", onClick: onRemoveHandler, "data-testid": "arc-Tag-icon-removable", "aria-live": "polite", "aria-roledescription": "remove tag" },
|
|
36808
|
-
React__default["default"].createElement(Icon, { icon: BtIconCross_2, color: "brand", size: 20 })
|
|
36959
|
+
React__default["default"].createElement(Icon, { icon: BtIconCross_2, color: "brand", size: 20 }),
|
|
36960
|
+
React__default["default"].createElement(Icon, { icon: BtIconCrossFill_2, color: "brand", size: 20 })))));
|
|
36809
36961
|
};
|
|
36810
36962
|
|
|
36811
36963
|
/**
|
|
@@ -36819,10 +36971,10 @@ var VisuallyHidden = function (_a) {
|
|
|
36819
36971
|
/**
|
|
36820
36972
|
* Use `TextInput` to allow custom user text entry with a keyboard.
|
|
36821
36973
|
*/
|
|
36822
|
-
var TextInput = React$
|
|
36974
|
+
var TextInput = React$b.forwardRef(function (_a, ref) {
|
|
36823
36975
|
var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, inputMode = _a.inputMode, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, label = _a.label, _f = _a.labelSize, labelSize = _f === void 0 ? "l" : _f, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _g = _a.type, type = _g === void 0 ? "text" : _g, _h = _a.showPassword, showPassword = _h === void 0 ? false : _h, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, props = __rest$2(_a, ["defaultValue", "errorMessage", "helper", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "labelSize", "maxLength", "minLength", "name", "onBlur", "onChange", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText"]);
|
|
36824
|
-
var surface = React$
|
|
36825
|
-
var _j = React$
|
|
36976
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
36977
|
+
var _j = React$b.useState(false), showPasswordToggle = _j[0], setShowPasswordToggle = _j[1];
|
|
36826
36978
|
var inferredInputProps = useNumericInput({
|
|
36827
36979
|
inputMode: inputMode,
|
|
36828
36980
|
pattern: pattern,
|
|
@@ -36853,6 +37005,45 @@ var TextInput = React$a.forwardRef(function (_a, ref) {
|
|
|
36853
37005
|
: "Your password is hidden")))))))));
|
|
36854
37006
|
});
|
|
36855
37007
|
|
|
37008
|
+
var TextArea = React$b.forwardRef(function (_a, ref) {
|
|
37009
|
+
var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.resize, resize = _c === void 0 ? "manual" : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.showCharacterCount, showCharacterCount = _g === void 0 ? true : _g, label = _a.label, _h = _a.labelSize, labelSize = _h === void 0 ? "l" : _h, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, props = __rest$2(_a, ["defaultValue", "errorMessage", "helper", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText"]);
|
|
37010
|
+
var surface = React$b.useContext(Context$3).surface;
|
|
37011
|
+
var ourRef = React$b.useRef(null);
|
|
37012
|
+
var _j = React$b.useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _j[0], setCharacterCount = _j[1];
|
|
37013
|
+
var setSmartHeight = function (el) {
|
|
37014
|
+
el.style.height = "auto";
|
|
37015
|
+
el.style.height = "".concat(parseInt(getComputedStyle(el).getPropertyValue("border-width")) *
|
|
37016
|
+
2 +
|
|
37017
|
+
el.scrollHeight, "px");
|
|
37018
|
+
};
|
|
37019
|
+
var getTextAreaRef = function (elementRef) {
|
|
37020
|
+
ourRef.current = elementRef;
|
|
37021
|
+
if (ref && typeof ref === "object") {
|
|
37022
|
+
ref.current = elementRef;
|
|
37023
|
+
}
|
|
37024
|
+
if (ref && typeof ref === "function") {
|
|
37025
|
+
ref(elementRef);
|
|
37026
|
+
}
|
|
37027
|
+
};
|
|
37028
|
+
var handleOnChange = function (e) {
|
|
37029
|
+
resize === "auto" && ourRef.current && setSmartHeight(ourRef.current);
|
|
37030
|
+
onChange && onChange(e);
|
|
37031
|
+
setCharacterCount(e.target.value.length);
|
|
37032
|
+
};
|
|
37033
|
+
return (React__default["default"].createElement(FormControl, __assign$2({ errorMessage: errorMessage, helper: helper, htmlFor: id, isDisabled: isDisabled, label: label, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", disclosureTitle: disclosureTitle, disclosureText: disclosureText, onClickDisclosure: onClickDisclosure, supplementaryInfo: maxLength &&
|
|
37034
|
+
showCharacterCount && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
37035
|
+
React__default["default"].createElement(Text, { tone: isDisabled ? "muted" : "default" },
|
|
37036
|
+
React__default["default"].createElement("span", { className: "arc-TextArea-characterCount" },
|
|
37037
|
+
characterCount,
|
|
37038
|
+
" / ",
|
|
37039
|
+
maxLength)))) }, filterDataAttrs(props)),
|
|
37040
|
+
React__default["default"].createElement("textarea", { id: id, className: classNames("arc-TextArea", {
|
|
37041
|
+
"arc-TextArea--noResize": resize !== "manual",
|
|
37042
|
+
"arc-TextArea--onDarkSurface": surface === "dark",
|
|
37043
|
+
"arc-TextArea--invalid": errorMessage
|
|
37044
|
+
}), defaultValue: typeof value !== "undefined" ? undefined : defaultValue, disabled: isDisabled, value: value, readOnly: isReadOnly, maxLength: maxLength, name: name, onChange: handleOnChange, onBlur: onBlur, ref: getTextAreaRef })));
|
|
37045
|
+
});
|
|
37046
|
+
|
|
36856
37047
|
/** Use `Truncate` component to shorten text with an ellipsis. Add a `title` attribute to the truncated element so the full text remains accessible. */
|
|
36857
37048
|
var Truncate = function (_a) {
|
|
36858
37049
|
var _b = _a.maxWidth, maxWidth = _b === void 0 ? 100 : _b, title = _a.title, children = _a.children;
|
|
@@ -36873,6 +37064,7 @@ exports.Columns = Columns;
|
|
|
36873
37064
|
exports.Curve = Curve;
|
|
36874
37065
|
exports.Disclosure = Disclosure;
|
|
36875
37066
|
exports.Elevation = Elevation;
|
|
37067
|
+
exports.Filter = Filter;
|
|
36876
37068
|
exports.FormControl = FormControl;
|
|
36877
37069
|
exports.Group = Group;
|
|
36878
37070
|
exports.Heading = Heading;
|
|
@@ -36893,6 +37085,7 @@ exports.SurfaceContext = Context$3;
|
|
|
36893
37085
|
exports.Switch = Switch;
|
|
36894
37086
|
exports.Tag = Tag;
|
|
36895
37087
|
exports.Text = Text;
|
|
37088
|
+
exports.TextArea = TextArea;
|
|
36896
37089
|
exports.TextInput = TextInput;
|
|
36897
37090
|
exports.Truncate = Truncate;
|
|
36898
37091
|
exports.UniversalHeader = UniversalHeader;
|