@arc-ui/components 11.8.0 → 11.10.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.js +15 -15
- package/dist/Alert/Alert.esm.js +15 -15
- package/dist/Alert/package.json +1 -1
- package/dist/Align/Align.cjs.js +3 -3
- package/dist/Align/Align.esm.js +3 -3
- package/dist/Align/package.json +1 -1
- package/dist/Badge/Badge.cjs.js +8 -8
- package/dist/Badge/Badge.esm.js +8 -8
- package/dist/Badge/package.json +1 -1
- package/dist/Base/Base.cjs.js +2 -2
- package/dist/Base/Base.esm.js +2 -2
- package/dist/Base/package.json +1 -1
- package/dist/Box/Box.cjs.js +3 -3
- package/dist/Box/Box.esm.js +3 -3
- package/dist/Box/package.json +1 -1
- package/dist/BrandLogo/BrandLogo.cjs.js +5 -5
- package/dist/BrandLogo/BrandLogo.esm.js +5 -5
- package/dist/BrandLogo/package.json +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +8 -8
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +8 -8
- package/dist/Breadcrumbs/package.json +1 -1
- package/dist/Button/Button.cjs.js +8 -8
- package/dist/Button/Button.esm.js +8 -8
- package/dist/Button/package.json +1 -1
- package/dist/Card/Card.cjs.js +9 -9
- package/dist/Card/Card.esm.js +9 -9
- package/dist/Card/package.json +1 -1
- package/dist/Checkbox/Checkbox.cjs.js +11 -11
- package/dist/Checkbox/Checkbox.esm.js +11 -11
- package/dist/Checkbox/package.json +1 -1
- package/dist/Clock/Clock.cjs.js +1 -1
- package/dist/Clock/Clock.esm.js +1 -1
- package/dist/Clock/package.json +1 -1
- package/dist/Columns/Columns.cjs.js +4 -4
- package/dist/Columns/Columns.esm.js +4 -4
- package/dist/Columns/package.json +1 -1
- package/dist/Curve/Curve.cjs.js +4 -4
- package/dist/Curve/Curve.esm.js +4 -4
- package/dist/Curve/package.json +1 -1
- package/dist/Disclosure/Disclosure.cjs.js +7 -7
- package/dist/Disclosure/Disclosure.esm.js +7 -7
- package/dist/Disclosure/package.json +1 -1
- package/dist/DisclosureMini/DisclosureMini.cjs.js +7 -7
- package/dist/DisclosureMini/DisclosureMini.esm.js +7 -7
- package/dist/DisclosureMini/package.json +1 -1
- package/dist/Elevation/Elevation.cjs.js +2 -2
- package/dist/Elevation/Elevation.esm.js +2 -2
- package/dist/Elevation/package.json +1 -1
- package/dist/Filter/Filter.cjs.js +4 -4
- package/dist/Filter/Filter.esm.js +4 -4
- package/dist/Filter/package.json +1 -1
- package/dist/FormControl/FormControl.cjs.js +9 -9
- package/dist/FormControl/FormControl.esm.js +9 -9
- package/dist/FormControl/package.json +1 -1
- package/dist/Group/Group.cjs.js +4 -4
- package/dist/Group/Group.esm.js +4 -4
- package/dist/Group/package.json +1 -1
- package/dist/Heading/Heading.cjs.js +5 -5
- package/dist/Heading/Heading.esm.js +5 -5
- package/dist/Heading/package.json +1 -1
- package/dist/Icon/Icon.cjs.js +5 -5
- package/dist/Icon/Icon.esm.js +5 -5
- package/dist/Icon/package.json +1 -1
- package/dist/Image/Image.cjs.js +4 -4
- package/dist/Image/Image.esm.js +4 -4
- package/dist/Image/package.json +1 -1
- package/dist/Markup/Markup.cjs.js +3 -3
- package/dist/Markup/Markup.esm.js +3 -3
- package/dist/Markup/package.json +1 -1
- package/dist/Modal/Modal.cjs.js +21 -97
- package/dist/Modal/Modal.esm.js +21 -97
- package/dist/Modal/package.json +1 -1
- package/dist/Pagination/Pagination.cjs.js +9 -9
- package/dist/Pagination/Pagination.esm.js +9 -9
- package/dist/Pagination/package.json +1 -1
- package/dist/PaginationSimple/PaginationSimple.cjs.js +9 -9
- package/dist/PaginationSimple/PaginationSimple.esm.js +9 -9
- package/dist/PaginationSimple/package.json +1 -1
- package/dist/Poster/Poster.cjs.js +6 -6
- package/dist/Poster/Poster.esm.js +6 -6
- package/dist/Poster/package.json +1 -1
- package/dist/ProgressBar/ProgressBar.cjs.js +20 -22
- package/dist/ProgressBar/ProgressBar.esm.js +17 -19
- package/dist/ProgressBar/package.json +1 -1
- package/dist/ProgressStepper/ProgressStepper.cjs.js +11 -145
- package/dist/ProgressStepper/ProgressStepper.esm.js +10 -144
- package/dist/ProgressStepper/package.json +1 -1
- package/dist/RadioGroup/RadioGroup.cjs.js +10 -10
- package/dist/RadioGroup/RadioGroup.esm.js +10 -10
- package/dist/RadioGroup/package.json +1 -1
- package/dist/Rule/Rule.cjs.js +3 -3
- package/dist/Rule/Rule.esm.js +3 -3
- package/dist/Rule/package.json +1 -1
- package/dist/ScrollToTop/ScrollToTop.cjs.js +14 -16
- package/dist/ScrollToTop/ScrollToTop.esm.js +10 -12
- package/dist/ScrollToTop/package.json +1 -1
- package/dist/Section/Section.cjs.js +3 -3
- package/dist/Section/Section.esm.js +3 -3
- package/dist/Section/package.json +1 -1
- package/dist/Select/Select.cjs.js +192 -572
- package/dist/Select/Select.esm.js +55 -435
- package/dist/Select/package.json +1 -1
- package/dist/SiteFooter/SiteFooter.cjs.js +9 -9
- package/dist/SiteFooter/SiteFooter.esm.js +10 -10
- package/dist/SiteFooter/package.json +1 -1
- package/dist/SiteHeader/SiteHeader.cjs.js +13 -13
- package/dist/SiteHeader/SiteHeader.esm.js +13 -13
- package/dist/SiteHeader/package.json +1 -1
- package/dist/Surface/Surface.cjs.js +3 -3
- package/dist/Surface/Surface.esm.js +3 -3
- package/dist/Surface/package.json +1 -1
- package/dist/Switch/Switch.cjs.js +21 -244
- package/dist/Switch/Switch.esm.js +16 -239
- package/dist/Switch/package.json +1 -1
- package/dist/Tabs/Tabs.cjs.js +12 -506
- package/dist/Tabs/Tabs.esm.js +11 -505
- package/dist/Tabs/package.json +1 -1
- package/dist/Tag/Tag.cjs.js +18 -22
- package/dist/Tag/Tag.esm.js +14 -18
- package/dist/Tag/package.json +1 -1
- package/dist/Text/Text.cjs.js +5 -5
- package/dist/Text/Text.esm.js +5 -5
- package/dist/Text/package.json +1 -1
- package/dist/TextArea/TextArea.cjs.js +47 -35
- package/dist/TextArea/TextArea.esm.js +47 -35
- package/dist/TextArea/package.json +1 -1
- package/dist/TextInput/TextInput.cjs.js +10 -10
- package/dist/TextInput/TextInput.esm.js +10 -10
- package/dist/TextInput/package.json +1 -1
- package/dist/Toast/Toast.cjs.js +19 -739
- package/dist/Toast/Toast.esm.js +15 -735
- package/dist/Toast/package.json +1 -1
- package/dist/Truncate/Truncate.cjs.js +1 -1
- package/dist/Truncate/Truncate.esm.js +1 -1
- package/dist/Truncate/package.json +1 -1
- package/dist/UniversalHeader/UniversalHeader.cjs.js +4 -4
- package/dist/UniversalHeader/UniversalHeader.esm.js +4 -4
- package/dist/UniversalHeader/package.json +1 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.js +3 -3
- package/dist/VerticalSpace/VerticalSpace.esm.js +3 -3
- package/dist/VerticalSpace/package.json +1 -1
- package/dist/VisuallyHidden/package.json +1 -1
- package/dist/_shared/cjs/{Base-569e4334.js → Base-f5a86eed.js} +1 -1
- package/dist/_shared/cjs/{BrandLogo-8107d59f.js → BrandLogo-f001e0c0.js} +4 -4
- package/dist/_shared/cjs/{Breadcrumbs-0906dd10.js → Breadcrumbs-9aa1d18b.js} +7 -9
- package/dist/_shared/cjs/{BtIconAlert-637db790.js → BtIconAlert.esm-e62a75b7.js} +8 -10
- package/dist/_shared/cjs/{BtIconChevronDown2Px-8fb4e2eb.js → BtIconChevronDown2Px.esm-c6f8ced2.js} +6 -8
- package/dist/_shared/cjs/{BtIconChevronLeftMid-df952a3e.js → BtIconChevronLeftMid.esm-7c2fc822.js} +5 -7
- package/dist/_shared/cjs/{BtIconChevronRight2Px-a8e40136.js → BtIconChevronRight2Px.esm-3c438341.js} +10 -14
- package/dist/_shared/cjs/{BtIconChevronRightMid-5a38d855.js → BtIconChevronRightMid.esm-cce080c8.js} +5 -7
- package/dist/_shared/cjs/{BtIconCrossAlt2Px-30dc2688.js → BtIconCrossAlt2Px.esm-c002bf55.js} +6 -8
- package/dist/_shared/cjs/{BtIconTick-42fcc5ec.js → BtIconTick.esm-613dfd8a.js} +18 -24
- package/dist/_shared/cjs/{BtIconTickAlt2Px-bdf06f8c.js → BtIconTickAlt2Px.esm-4862184c.js} +6 -8
- package/dist/_shared/cjs/{Button-5aaa6776.js → Button-c22c9787.js} +8 -8
- package/dist/_shared/cjs/{Card-fd189ba8.js → Card-55a1c129.js} +9 -11
- package/dist/_shared/cjs/{Checkbox-02c546ca.js → Checkbox-7ce718e7.js} +8 -8
- package/dist/_shared/cjs/{Columns-e90798f8.js → Columns-ae4f8cef.js} +3 -4
- package/dist/_shared/cjs/{Curve-781ef633.js → Curve-d038052b.js} +3 -3
- package/dist/_shared/cjs/{DisclosureMini-52706ee6.js → DisclosureMini-c666cc4d.js} +6 -6
- package/dist/_shared/cjs/{Filter-a7574fe7.js → Filter-22b8b171.js} +3 -7
- package/dist/_shared/cjs/{FormControl-1e1bf2bf.js → FormControl-5541ac3a.js} +6 -6
- package/dist/_shared/cjs/{Group-f85dd4c0.js → Group-143a4578.js} +4 -5
- package/dist/_shared/cjs/{Heading-e3332dcf.js → Heading-ba2f74ad.js} +4 -5
- package/dist/_shared/cjs/{Icon-e1dd45eb.js → Icon-cf30e736.js} +10 -12
- package/dist/_shared/cjs/{Image-0e393cbf.js → Image-e873b8fc.js} +3 -4
- package/dist/_shared/cjs/{Poster-faea1ad3.js → Poster-62e2ba67.js} +5 -9
- package/dist/_shared/cjs/ProgressStepper-92668367.js +144 -0
- package/dist/_shared/cjs/{RadioGroup-d7664b0c.js → RadioGroup-66c1e882.js} +4 -5
- package/dist/_shared/cjs/{Section-48aca5f5.js → Section-59804166.js} +2 -2
- package/dist/_shared/cjs/{SiteFooter-5da774e1.js → SiteFooter-d3babe07.js} +7 -9
- package/dist/_shared/cjs/{SiteHeader.rehydrator-acc9d8c4.js → SiteHeader.rehydrator-b7284004.js} +16 -24
- package/dist/_shared/cjs/{Surface-b7c51b2b.js → Surface-80c0909a.js} +2 -2
- package/dist/_shared/cjs/Tabs-65e7af8a.js +503 -0
- package/dist/_shared/cjs/{Text-fa447e2d.js → Text-76b7fea1.js} +4 -4
- package/dist/_shared/cjs/{TextInput-f4549637.js → TextInput-5bee337d.js} +4 -4
- package/dist/_shared/cjs/Toast-874d9be4.js +730 -0
- package/dist/_shared/cjs/{UniversalHeader-da622e1a.js → UniversalHeader-f5a225b6.js} +2 -3
- package/dist/_shared/cjs/{VerticalSpace-86f697e7.js → VerticalSpace-dc53bb70.js} +2 -2
- package/dist/_shared/cjs/{extends-bb8ffacd.js → extends-8c5e4b48.js} +1 -4
- package/dist/_shared/cjs/filter-data-attrs-1c9a530c.js +227 -0
- package/dist/_shared/cjs/{index-ec260f5e.js → index-43458549.js} +13 -96
- package/dist/_shared/cjs/{index-96c4d581.js → index-6b2a9ac3.js} +2 -2
- package/dist/_shared/cjs/{index-45bfb67b.js → index-9947ac13.js} +11 -10
- package/dist/_shared/cjs/{index-fb4b8fda.js → index-adbb63da.js} +2 -9
- package/dist/_shared/cjs/{index-27b53d49.js → index-b2fd6338.js} +3 -80
- package/dist/_shared/cjs/{index-952918c9.js → index-c575a255.js} +11 -10
- package/dist/_shared/cjs/index.module-dd1d7d0b.js +382 -0
- package/dist/_shared/cjs/{suffix-modifier-1ee2da04.js → suffix-modifier-64dcd338.js} +1 -1
- package/dist/_shared/esm/{Base-6c01e0ec.js → Base-f200653c.js} +1 -1
- package/dist/_shared/esm/{BrandLogo-9ec620e8.js → BrandLogo-51fc6f15.js} +4 -4
- package/dist/_shared/esm/{Breadcrumbs-dafa8dde.js → Breadcrumbs-50d0f406.js} +7 -9
- package/dist/_shared/esm/{BtIconAlert-55a6ed5c.js → BtIconAlert.esm-09346130.js} +6 -8
- package/dist/_shared/esm/{BtIconChevronDown2Px-782876e2.js → BtIconChevronDown2Px.esm-345d78fe.js} +4 -6
- package/dist/_shared/esm/{BtIconChevronLeftMid-9f4f3a3d.js → BtIconChevronLeftMid.esm-e69276cb.js} +3 -5
- package/dist/_shared/esm/{BtIconChevronRight2Px-b8e7b4ad.js → BtIconChevronRight2Px.esm-2c693ef3.js} +7 -11
- package/dist/_shared/esm/{BtIconChevronRightMid-d9b11761.js → BtIconChevronRightMid.esm-24809a93.js} +3 -5
- package/dist/_shared/esm/{BtIconCrossAlt2Px-a6a9f431.js → BtIconCrossAlt2Px.esm-425a6beb.js} +4 -6
- package/dist/_shared/esm/{BtIconTick-5fe50cc7.js → BtIconTick.esm-673282f5.js} +14 -20
- package/dist/_shared/esm/{BtIconTickAlt2Px-da97e9ae.js → BtIconTickAlt2Px.esm-ce22224b.js} +4 -6
- package/dist/_shared/esm/{Button-d1dbcf79.js → Button-67f68b14.js} +8 -8
- package/dist/_shared/esm/{Card-e62c3ff6.js → Card-bf0c3b0b.js} +9 -11
- package/dist/_shared/esm/{Checkbox-d8891198.js → Checkbox-50e2d4ab.js} +8 -8
- package/dist/_shared/esm/{Columns-8704515b.js → Columns-d96b7425.js} +3 -4
- package/dist/_shared/esm/{Curve-bbc5589c.js → Curve-d8679dde.js} +3 -3
- package/dist/_shared/esm/{DisclosureMini-9b819941.js → DisclosureMini-376c013c.js} +6 -6
- package/dist/_shared/esm/{Filter-a01aed11.js → Filter-f7ac126b.js} +3 -7
- package/dist/_shared/esm/{FormControl-f18e2f59.js → FormControl-aad4288c.js} +6 -6
- package/dist/_shared/esm/{Group-fb26fd32.js → Group-0129c979.js} +4 -5
- package/dist/_shared/esm/{Heading-0f629151.js → Heading-8bb7b7c0.js} +4 -5
- package/dist/_shared/esm/{Icon-c1af47bc.js → Icon-3bfabb14.js} +7 -9
- package/dist/_shared/esm/{Image-3ed3863c.js → Image-12fbd327.js} +3 -4
- package/dist/_shared/esm/{Poster-a83ae770.js → Poster-046b0f77.js} +5 -9
- package/dist/_shared/esm/ProgressStepper-3ffbdb73.js +138 -0
- package/dist/_shared/esm/{RadioGroup-be16d5d3.js → RadioGroup-1273a716.js} +4 -5
- package/dist/_shared/esm/{Section-b8038d66.js → Section-73781b56.js} +2 -2
- package/dist/_shared/esm/{SiteFooter-a182cb18.js → SiteFooter-60d1b216.js} +7 -9
- package/dist/_shared/esm/{SiteHeader.rehydrator-023b7b76.js → SiteHeader.rehydrator-029f568e.js} +16 -24
- package/dist/_shared/esm/{Surface-dde51789.js → Surface-c6e817cd.js} +2 -2
- package/dist/_shared/esm/Tabs-ec960828.js +497 -0
- package/dist/_shared/esm/{Text-40457811.js → Text-a3720712.js} +4 -4
- package/dist/_shared/esm/{TextInput-4424c195.js → TextInput-732f0b51.js} +4 -4
- package/dist/_shared/esm/Toast-b81384a4.js +724 -0
- package/dist/_shared/esm/{UniversalHeader-1c5a886d.js → UniversalHeader-354a1867.js} +2 -3
- package/dist/_shared/esm/{VerticalSpace-93980c9c.js → VerticalSpace-43cd9138.js} +2 -2
- package/dist/_shared/esm/{extends-4575346e.js → extends-8cc61aad.js} +1 -4
- package/dist/_shared/esm/filter-data-attrs-ea8f4ed4.js +220 -0
- package/dist/_shared/esm/{index-22aad354.js → index-13d575cc.js} +11 -11
- package/dist/_shared/esm/{index-2ae58626.js → index-2e73c2e9.js} +11 -10
- package/dist/_shared/esm/{index-94ecc5f8.js → index-3797d77e.js} +2 -2
- package/dist/_shared/esm/{index-369dce7f.js → index-41d7af2b.js} +9 -92
- package/dist/_shared/esm/{index-8000d9e3.js → index-a1d2d9b3.js} +2 -79
- package/dist/_shared/esm/{index-bed18a88.js → index-efd9ef1c.js} +1 -9
- package/dist/_shared/esm/index.module-44714d3f.js +371 -0
- package/dist/_shared/esm/{suffix-modifier-7e640670.js → suffix-modifier-3d548e45.js} +1 -1
- package/dist/index.es.js +2541 -1304
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2865 -1617
- package/dist/index.js.map +1 -1
- package/dist/styles.css +11 -1
- package/dist/types/components/Badge/Badge.d.ts +4 -0
- package/dist/types/components/Button/Button.d.ts +2 -2
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/components/Clock/Clock.d.ts +1 -1
- package/dist/types/components/Columns/Columns.d.ts +2 -2
- package/dist/types/components/FormControl/FormControl.d.ts +1 -1
- package/dist/types/components/Group/GroupItem/GroupItem.d.ts +17 -0
- package/dist/types/components/Heading/Heading.d.ts +4 -4
- package/dist/types/components/MediaCard/MediaCard.stories-wip.d.ts +15 -0
- package/dist/types/components/ProgressBar/types/progress-bar-icons.d.ts +1 -1
- package/dist/types/components/ProgressBar/types/progress-bar-state.d.ts +1 -1
- package/dist/types/components/ProgressStepper/progressStatus.d.ts +1 -1
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/RadioGroup/context.d.ts +2 -2
- package/dist/types/components/Surface/Surface.d.ts +3 -3
- package/dist/types/components/Text/Text.d.ts +2 -2
- package/dist/types/components/TextArea/TextArea.d.ts +1 -1
- package/dist/types/components/TextInput/TextInput.d.ts +1 -1
- package/dist/types/components/Toast/Toast.d.ts +5 -2
- package/dist/types/components/Toast/ToastNotification.d.ts +2 -2
- package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +1 -1
- package/dist/types/components/index.d.ts +17 -6
- package/dist/types/types/arc-icon.d.ts +1 -1
- package/package.json +44 -15
- package/dist/Alert/Alert.cjs.d.ts +0 -57
- package/dist/Alert/Alert.esm.d.ts +0 -57
- package/dist/Align/Align.cjs.d.ts +0 -25
- package/dist/Align/Align.esm.d.ts +0 -25
- package/dist/Badge/Badge.cjs.d.ts +0 -26
- package/dist/Badge/Badge.esm.d.ts +0 -26
- package/dist/Base/Base.cjs.d.ts +0 -1
- package/dist/Base/Base.esm.d.ts +0 -1
- package/dist/Box/Box.cjs.d.ts +0 -40
- package/dist/Box/Box.esm.d.ts +0 -40
- package/dist/BrandLogo/BrandLogo.cjs.d.ts +0 -1
- package/dist/BrandLogo/BrandLogo.esm.d.ts +0 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs.d.ts +0 -1
- package/dist/Breadcrumbs/Breadcrumbs.esm.d.ts +0 -1
- package/dist/Button/Button.cjs.d.ts +0 -1
- package/dist/Button/Button.esm.d.ts +0 -1
- package/dist/Card/Card.cjs.d.ts +0 -1
- package/dist/Card/Card.esm.d.ts +0 -1
- package/dist/Checkbox/Checkbox.cjs.d.ts +0 -1
- package/dist/Checkbox/Checkbox.esm.d.ts +0 -1
- package/dist/Clock/Clock.cjs.d.ts +0 -15
- package/dist/Clock/Clock.esm.d.ts +0 -15
- package/dist/Columns/Columns.cjs.d.ts +0 -1
- package/dist/Columns/Columns.esm.d.ts +0 -1
- package/dist/Curve/Curve.cjs.d.ts +0 -1
- package/dist/Curve/Curve.esm.d.ts +0 -1
- package/dist/Disclosure/Disclosure.cjs.d.ts +0 -31
- package/dist/Disclosure/Disclosure.esm.d.ts +0 -31
- package/dist/DisclosureMini/DisclosureMini.cjs.d.ts +0 -1
- package/dist/DisclosureMini/DisclosureMini.esm.d.ts +0 -1
- package/dist/Elevation/Elevation.cjs.d.ts +0 -20
- package/dist/Elevation/Elevation.esm.d.ts +0 -20
- package/dist/Filter/Filter.cjs.d.ts +0 -1
- package/dist/Filter/Filter.esm.d.ts +0 -1
- package/dist/FormControl/FormControl.cjs.d.ts +0 -1
- package/dist/FormControl/FormControl.esm.d.ts +0 -1
- package/dist/Group/Group.cjs.d.ts +0 -1
- package/dist/Group/Group.esm.d.ts +0 -1
- package/dist/Heading/Heading.cjs.d.ts +0 -1
- package/dist/Heading/Heading.esm.d.ts +0 -1
- package/dist/Icon/Icon.cjs.d.ts +0 -1
- package/dist/Icon/Icon.esm.d.ts +0 -1
- package/dist/Image/Image.cjs.d.ts +0 -1
- package/dist/Image/Image.esm.d.ts +0 -1
- package/dist/Markup/Markup.cjs.d.ts +0 -16
- package/dist/Markup/Markup.esm.d.ts +0 -16
- package/dist/Modal/Modal.cjs.d.ts +0 -53
- package/dist/Modal/Modal.esm.d.ts +0 -53
- package/dist/Pagination/Pagination.cjs.d.ts +0 -20
- package/dist/Pagination/Pagination.esm.d.ts +0 -20
- package/dist/PaginationSimple/PaginationSimple.cjs.d.ts +0 -28
- package/dist/PaginationSimple/PaginationSimple.esm.d.ts +0 -28
- package/dist/Poster/Poster.cjs.d.ts +0 -1
- package/dist/Poster/Poster.esm.d.ts +0 -1
- package/dist/ProgressBar/ProgressBar.cjs.d.ts +0 -47
- package/dist/ProgressBar/ProgressBar.esm.d.ts +0 -47
- package/dist/ProgressStepper/ProgressStepper.cjs.d.ts +0 -89
- package/dist/ProgressStepper/ProgressStepper.esm.d.ts +0 -89
- package/dist/RadioGroup/RadioGroup.cjs.d.ts +0 -1
- package/dist/RadioGroup/RadioGroup.esm.d.ts +0 -1
- package/dist/Rule/Rule.cjs.d.ts +0 -8
- package/dist/Rule/Rule.esm.d.ts +0 -8
- package/dist/ScrollToTop/ScrollToTop.cjs.d.ts +0 -25
- package/dist/ScrollToTop/ScrollToTop.esm.d.ts +0 -25
- package/dist/Section/Section.cjs.d.ts +0 -1
- package/dist/Section/Section.esm.d.ts +0 -1
- package/dist/Select/Select.cjs.d.ts +0 -25
- package/dist/Select/Select.esm.d.ts +0 -25
- package/dist/SiteFooter/SiteFooter.cjs.d.ts +0 -4
- package/dist/SiteFooter/SiteFooter.esm.d.ts +0 -4
- package/dist/SiteHeader/SiteHeader.cjs.d.ts +0 -2
- package/dist/SiteHeader/SiteHeader.esm.d.ts +0 -2
- package/dist/Surface/Surface.cjs.d.ts +0 -1
- package/dist/Surface/Surface.esm.d.ts +0 -1
- package/dist/Switch/Switch.cjs.d.ts +0 -40
- package/dist/Switch/Switch.esm.d.ts +0 -40
- package/dist/Tabs/Tabs.cjs.d.ts +0 -75
- package/dist/Tabs/Tabs.esm.d.ts +0 -75
- package/dist/Tag/Tag.cjs.d.ts +0 -33
- package/dist/Tag/Tag.esm.d.ts +0 -33
- package/dist/Text/Text.cjs.d.ts +0 -1
- package/dist/Text/Text.esm.d.ts +0 -1
- package/dist/TextArea/TextArea.cjs.d.ts +0 -64
- package/dist/TextArea/TextArea.esm.d.ts +0 -64
- package/dist/TextInput/TextInput.cjs.d.ts +0 -1
- package/dist/TextInput/TextInput.esm.d.ts +0 -1
- package/dist/Toast/Toast.cjs.d.ts +0 -52
- package/dist/Toast/Toast.esm.d.ts +0 -52
- package/dist/Truncate/Truncate.cjs.d.ts +0 -18
- package/dist/Truncate/Truncate.esm.d.ts +0 -18
- package/dist/UniversalHeader/UniversalHeader.cjs.d.ts +0 -1
- package/dist/UniversalHeader/UniversalHeader.esm.d.ts +0 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.d.ts +0 -1
- package/dist/VerticalSpace/VerticalSpace.esm.d.ts +0 -1
- package/dist/VisuallyHidden/VisuallyHidden.cjs.d.ts +0 -1
- package/dist/VisuallyHidden/VisuallyHidden.esm.d.ts +0 -1
- package/dist/_shared/cjs/Base-569e4334.d.ts +0 -19
- package/dist/_shared/cjs/BrandLogo-8107d59f.d.ts +0 -26
- package/dist/_shared/cjs/Breadcrumbs-0906dd10.d.ts +0 -61
- package/dist/_shared/cjs/Button-5aaa6776.d.ts +0 -102
- package/dist/_shared/cjs/Card-fd189ba8.d.ts +0 -136
- package/dist/_shared/cjs/Checkbox-02c546ca.d.ts +0 -64
- package/dist/_shared/cjs/Columns-e90798f8.d.ts +0 -76
- package/dist/_shared/cjs/Curve-781ef633.d.ts +0 -35
- package/dist/_shared/cjs/DisclosureMini-52706ee6.d.ts +0 -37
- package/dist/_shared/cjs/Filter-a7574fe7.d.ts +0 -83
- package/dist/_shared/cjs/FormControl-1e1bf2bf.d.ts +0 -99
- package/dist/_shared/cjs/Group-f85dd4c0.d.ts +0 -46
- package/dist/_shared/cjs/Heading-e3332dcf.d.ts +0 -50
- package/dist/_shared/cjs/Icon-e1dd45eb.d.ts +0 -34
- package/dist/_shared/cjs/Image-0e393cbf.d.ts +0 -94
- package/dist/_shared/cjs/ItemGroup-5af4d600.d.ts +0 -27
- package/dist/_shared/cjs/NavItem-df20237c.d.ts +0 -43
- package/dist/_shared/cjs/NavItemWithSubNav-65f21828.d.ts +0 -49
- package/dist/_shared/cjs/Poster-faea1ad3.d.ts +0 -81
- package/dist/_shared/cjs/RadioGroup-d7664b0c.d.ts +0 -97
- package/dist/_shared/cjs/Section-48aca5f5.d.ts +0 -21
- package/dist/_shared/cjs/SiteFooter-5da774e1.d.ts +0 -62
- package/dist/_shared/cjs/SiteHeader-c25ee36e.d.ts +0 -78
- package/dist/_shared/cjs/SiteHeader.rehydrator-acc9d8c4.d.ts +0 -78
- package/dist/_shared/cjs/SubNavItem-a84d1bf4.d.ts +0 -48
- package/dist/_shared/cjs/Surface-b7c51b2b.d.ts +0 -51
- package/dist/_shared/cjs/Text-fa447e2d.d.ts +0 -38
- package/dist/_shared/cjs/TextInput-13050538.d.ts +0 -77
- package/dist/_shared/cjs/TextInput-f4549637.d.ts +0 -10
- package/dist/_shared/cjs/UniversalHeader-da622e1a.d.ts +0 -26
- package/dist/_shared/cjs/VerticalSpace-86f697e7.d.ts +0 -34
- package/dist/_shared/cjs/VisuallyHidden-e2c8b291.d.ts +0 -12
- package/dist/_shared/cjs/arc-icon-17594b2f.d.ts +0 -4
- package/dist/_shared/cjs/filter-data-attrs-a30dcf5f.d.ts +0 -2
- package/dist/_shared/cjs/filter-data-attrs-a30dcf5f.js +0 -215
- package/dist/_shared/cjs/handle-link-click-17a44cf4.d.ts +0 -7
- package/dist/_shared/cjs/index-699086a7.d.ts +0 -2
- package/dist/_shared/cjs/index-74488a9f.d.ts +0 -2
- package/dist/_shared/cjs/index-9483ad5f.d.ts +0 -14
- package/dist/_shared/cjs/index-c81c9401.d.ts +0 -4
- package/dist/_shared/cjs/index-e340924e.d.ts +0 -2
- package/dist/_shared/cjs/index-e6d20018.d.ts +0 -3
- package/dist/_shared/cjs/index-eb06f640.d.ts +0 -2
- package/dist/_shared/cjs/index-f419cf04.d.ts +0 -2
- package/dist/_shared/cjs/index.es-77def0c9.d.ts +0 -19
- package/dist/_shared/cjs/index.module-bbcc4e18.js +0 -126
- package/dist/_shared/cjs/suffix-modifier-1ee2da04.d.ts +0 -10
- package/dist/_shared/esm/Base-6c01e0ec.d.ts +0 -19
- package/dist/_shared/esm/BrandLogo-9ec620e8.d.ts +0 -26
- package/dist/_shared/esm/Breadcrumbs-dafa8dde.d.ts +0 -61
- package/dist/_shared/esm/Button-d1dbcf79.d.ts +0 -102
- package/dist/_shared/esm/Card-e62c3ff6.d.ts +0 -136
- package/dist/_shared/esm/Checkbox-d8891198.d.ts +0 -64
- package/dist/_shared/esm/Columns-8704515b.d.ts +0 -76
- package/dist/_shared/esm/Curve-bbc5589c.d.ts +0 -35
- package/dist/_shared/esm/DisclosureMini-9b819941.d.ts +0 -37
- package/dist/_shared/esm/Filter-a01aed11.d.ts +0 -83
- package/dist/_shared/esm/FormControl-f18e2f59.d.ts +0 -99
- package/dist/_shared/esm/Group-fb26fd32.d.ts +0 -46
- package/dist/_shared/esm/Heading-0f629151.d.ts +0 -50
- package/dist/_shared/esm/Icon-c1af47bc.d.ts +0 -34
- package/dist/_shared/esm/Image-3ed3863c.d.ts +0 -94
- package/dist/_shared/esm/ItemGroup-5af4d600.d.ts +0 -27
- package/dist/_shared/esm/NavItem-df20237c.d.ts +0 -43
- package/dist/_shared/esm/NavItemWithSubNav-65f21828.d.ts +0 -49
- package/dist/_shared/esm/Poster-a83ae770.d.ts +0 -81
- package/dist/_shared/esm/RadioGroup-be16d5d3.d.ts +0 -97
- package/dist/_shared/esm/Section-b8038d66.d.ts +0 -21
- package/dist/_shared/esm/SiteFooter-a182cb18.d.ts +0 -62
- package/dist/_shared/esm/SiteHeader-c25ee36e.d.ts +0 -78
- package/dist/_shared/esm/SiteHeader.rehydrator-023b7b76.d.ts +0 -78
- package/dist/_shared/esm/SubNavItem-a84d1bf4.d.ts +0 -48
- package/dist/_shared/esm/Surface-dde51789.d.ts +0 -51
- package/dist/_shared/esm/Text-40457811.d.ts +0 -38
- package/dist/_shared/esm/TextInput-13050538.d.ts +0 -77
- package/dist/_shared/esm/TextInput-4424c195.d.ts +0 -10
- package/dist/_shared/esm/UniversalHeader-1c5a886d.d.ts +0 -26
- package/dist/_shared/esm/VerticalSpace-93980c9c.d.ts +0 -34
- package/dist/_shared/esm/VisuallyHidden-b9eebf71.d.ts +0 -12
- package/dist/_shared/esm/arc-icon-17594b2f.d.ts +0 -4
- package/dist/_shared/esm/filter-data-attrs-afdb7d32.d.ts +0 -2
- package/dist/_shared/esm/filter-data-attrs-afdb7d32.js +0 -208
- package/dist/_shared/esm/handle-link-click-f64f55a2.d.ts +0 -7
- package/dist/_shared/esm/index-699086a7.d.ts +0 -2
- package/dist/_shared/esm/index-74488a9f.d.ts +0 -2
- package/dist/_shared/esm/index-9483ad5f.d.ts +0 -14
- package/dist/_shared/esm/index-c81c9401.d.ts +0 -4
- package/dist/_shared/esm/index-e340924e.d.ts +0 -2
- package/dist/_shared/esm/index-e6d20018.d.ts +0 -3
- package/dist/_shared/esm/index-eb06f640.d.ts +0 -2
- package/dist/_shared/esm/index-f419cf04.d.ts +0 -2
- package/dist/_shared/esm/index.es-00cb3bcb.d.ts +0 -19
- package/dist/_shared/esm/index.module-5ed90b21.js +0 -122
- package/dist/_shared/esm/suffix-modifier-7e640670.d.ts +0 -10
- /package/dist/_shared/cjs/{debounce-506538c5.js → debounce-123468fb.js} +0 -0
- /package/dist/_shared/esm/{debounce-e228705f.js → debounce-6fed6b84.js} +0 -0
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var filterDataAttrs = require('../_shared/cjs/filter-data-attrs-
|
|
6
|
-
var index$1 = require('../_shared/cjs/index-
|
|
7
|
-
var React
|
|
8
|
-
var _extends = require('../_shared/cjs/extends-
|
|
5
|
+
var filterDataAttrs = require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
6
|
+
var index$1 = require('../_shared/cjs/index-9947ac13.js');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var _extends = require('../_shared/cjs/extends-8c5e4b48.js');
|
|
9
9
|
var $7SXl2$reactdom = require('react-dom');
|
|
10
|
-
var index_module = require('../_shared/cjs/index.module-
|
|
11
|
-
var index = require('../_shared/cjs/index-
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var Icon = require('../_shared/cjs/Icon-
|
|
15
|
-
var FormControl = require('../_shared/cjs/FormControl-
|
|
16
|
-
var Surface = require('../_shared/cjs/Surface-
|
|
17
|
-
var Base = require('../_shared/cjs/Base-
|
|
18
|
-
require('../_shared/cjs/suffix-modifier-
|
|
19
|
-
require('../_shared/cjs/BtIconAlert-
|
|
20
|
-
require('../_shared/cjs/DisclosureMini-
|
|
21
|
-
require('../_shared/cjs/Text-
|
|
10
|
+
var index_module = require('../_shared/cjs/index.module-dd1d7d0b.js');
|
|
11
|
+
var index = require('../_shared/cjs/index-43458549.js');
|
|
12
|
+
var BtIconChevronDown2Px_esm = require('../_shared/cjs/BtIconChevronDown2Px.esm-c6f8ced2.js');
|
|
13
|
+
var BtIconTickAlt2Px_esm = require('../_shared/cjs/BtIconTickAlt2Px.esm-4862184c.js');
|
|
14
|
+
var Icon = require('../_shared/cjs/Icon-cf30e736.js');
|
|
15
|
+
var FormControl = require('../_shared/cjs/FormControl-5541ac3a.js');
|
|
16
|
+
var Surface = require('../_shared/cjs/Surface-80c0909a.js');
|
|
17
|
+
var Base = require('../_shared/cjs/Base-f5a86eed.js');
|
|
18
|
+
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
19
|
+
require('../_shared/cjs/BtIconAlert.esm-e62a75b7.js');
|
|
20
|
+
require('../_shared/cjs/DisclosureMini-c666cc4d.js');
|
|
21
|
+
require('../_shared/cjs/Text-76b7fea1.js');
|
|
22
22
|
|
|
23
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
24
|
|
|
@@ -40,141 +40,14 @@ function _interopNamespace(e) {
|
|
|
40
40
|
return Object.freeze(n);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React
|
|
44
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React
|
|
43
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
44
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
45
45
|
var $7SXl2$reactdom__default = /*#__PURE__*/_interopDefaultLegacy($7SXl2$reactdom);
|
|
46
46
|
|
|
47
47
|
function $ae6933e535247d3d$export$7d15b64cf5a3a4c4(value, [min, max]) {
|
|
48
48
|
return Math.min(max, Math.max(min, value));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
52
|
-
return function handleEvent(event) {
|
|
53
|
-
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
54
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* -------------------------------------------------------------------------------------------------
|
|
59
|
-
* createContextScope
|
|
60
|
-
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
61
|
-
let defaultContexts = [];
|
|
62
|
-
/* -----------------------------------------------------------------------------------------------
|
|
63
|
-
* createContext
|
|
64
|
-
* ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
65
|
-
const BaseContext = /*#__PURE__*/ React$1.createContext(defaultContext);
|
|
66
|
-
const index = defaultContexts.length;
|
|
67
|
-
defaultContexts = [
|
|
68
|
-
...defaultContexts,
|
|
69
|
-
defaultContext
|
|
70
|
-
];
|
|
71
|
-
function Provider(props) {
|
|
72
|
-
const { scope: scope , children: children , ...context } = props;
|
|
73
|
-
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
|
|
74
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
-
const value = React$1.useMemo(()=>context
|
|
76
|
-
, Object.values(context));
|
|
77
|
-
return /*#__PURE__*/ React$1.createElement(Context.Provider, {
|
|
78
|
-
value: value
|
|
79
|
-
}, children);
|
|
80
|
-
}
|
|
81
|
-
function useContext(consumerName, scope) {
|
|
82
|
-
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
83
|
-
const context = React$1.useContext(Context);
|
|
84
|
-
if (context) return context;
|
|
85
|
-
if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
|
|
86
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
87
|
-
}
|
|
88
|
-
Provider.displayName = rootComponentName + 'Provider';
|
|
89
|
-
return [
|
|
90
|
-
Provider,
|
|
91
|
-
useContext
|
|
92
|
-
];
|
|
93
|
-
}
|
|
94
|
-
/* -----------------------------------------------------------------------------------------------
|
|
95
|
-
* createScope
|
|
96
|
-
* ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{
|
|
97
|
-
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
|
98
|
-
return /*#__PURE__*/ React$1.createContext(defaultContext);
|
|
99
|
-
});
|
|
100
|
-
return function useScope(scope) {
|
|
101
|
-
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
102
|
-
return React$1.useMemo(()=>({
|
|
103
|
-
[`__scope${scopeName}`]: {
|
|
104
|
-
...scope,
|
|
105
|
-
[scopeName]: contexts
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
, [
|
|
109
|
-
scope,
|
|
110
|
-
contexts
|
|
111
|
-
]);
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
createScope.scopeName = scopeName;
|
|
115
|
-
return [
|
|
116
|
-
$c512c27ab02ef895$export$fd42f52fd3ae1109,
|
|
117
|
-
$c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
|
|
118
|
-
];
|
|
119
|
-
}
|
|
120
|
-
/* -------------------------------------------------------------------------------------------------
|
|
121
|
-
* composeContextScopes
|
|
122
|
-
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
123
|
-
const baseScope = scopes[0];
|
|
124
|
-
if (scopes.length === 1) return baseScope;
|
|
125
|
-
const createScope1 = ()=>{
|
|
126
|
-
const scopeHooks = scopes.map((createScope)=>({
|
|
127
|
-
useScope: createScope(),
|
|
128
|
-
scopeName: createScope.scopeName
|
|
129
|
-
})
|
|
130
|
-
);
|
|
131
|
-
return function useComposedScopes(overrideScopes) {
|
|
132
|
-
const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope: useScope , scopeName: scopeName })=>{
|
|
133
|
-
// We are calling a hook inside a callback which React warns against to avoid inconsistent
|
|
134
|
-
// renders, however, scoping doesn't have render side effects so we ignore the rule.
|
|
135
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
136
|
-
const scopeProps = useScope(overrideScopes);
|
|
137
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
138
|
-
return {
|
|
139
|
-
...nextScopes,
|
|
140
|
-
...currentScope
|
|
141
|
-
};
|
|
142
|
-
}, {});
|
|
143
|
-
return React$1.useMemo(()=>({
|
|
144
|
-
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
145
|
-
})
|
|
146
|
-
, [
|
|
147
|
-
nextScopes1
|
|
148
|
-
]);
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
createScope1.scopeName = baseScope.scopeName;
|
|
152
|
-
return createScope1;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Set a given ref to a given value
|
|
157
|
-
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
158
|
-
*/ function $6ed0406888f73fc4$var$setRef$1(ref, value) {
|
|
159
|
-
if (typeof ref === 'function') ref(value);
|
|
160
|
-
else if (ref !== null && ref !== undefined) ref.current = value;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* A utility to compose multiple refs together
|
|
164
|
-
* Accepts callback refs and RefObject(s)
|
|
165
|
-
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af$1(...refs) {
|
|
166
|
-
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef$1(ref, node)
|
|
167
|
-
)
|
|
168
|
-
;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* A custom hook that composes multiple refs
|
|
172
|
-
* Accepts callback refs and RefObject(s)
|
|
173
|
-
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05$1(...refs) {
|
|
174
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
175
|
-
return React$1.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af$1(...refs), refs);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
51
|
// We have resorted to returning slots directly rather than exposing primitives that can then
|
|
179
52
|
// be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
|
|
180
53
|
// This is because we encountered issues with generic types that cannot be statically analysed
|
|
@@ -183,7 +56,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
183
56
|
/* -----------------------------------------------------------------------------------------------
|
|
184
57
|
* CollectionProvider
|
|
185
58
|
* ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';
|
|
186
|
-
const [createCollectionContext, createCollectionScope] =
|
|
59
|
+
const [createCollectionContext, createCollectionScope] = index_module.$c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
|
|
187
60
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
188
61
|
collectionRef: {
|
|
189
62
|
current: null
|
|
@@ -206,7 +79,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
206
79
|
const CollectionSlot = /*#__PURE__*/ React__default["default"].forwardRef((props, forwardedRef)=>{
|
|
207
80
|
const { scope: scope , children: children } = props;
|
|
208
81
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
209
|
-
const composedRefs =
|
|
82
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
|
|
210
83
|
return /*#__PURE__*/ React__default["default"].createElement(index_module.$5e63c961fc1ce211$export$8c6ed5c666ac1360, {
|
|
211
84
|
ref: composedRefs
|
|
212
85
|
}, children);
|
|
@@ -218,7 +91,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
218
91
|
const CollectionItemSlot = /*#__PURE__*/ React__default["default"].forwardRef((props, forwardedRef)=>{
|
|
219
92
|
const { scope: scope , children: children , ...itemData } = props;
|
|
220
93
|
const ref = React__default["default"].useRef(null);
|
|
221
|
-
const composedRefs =
|
|
94
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
222
95
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
223
96
|
React__default["default"].useEffect(()=>{
|
|
224
97
|
context.itemMap.set(ref, {
|
|
@@ -262,111 +135,17 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
262
135
|
];
|
|
263
136
|
}
|
|
264
137
|
|
|
265
|
-
const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ React
|
|
138
|
+
const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ React.createContext(undefined);
|
|
266
139
|
/* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
267
|
-
const globalDir = React
|
|
140
|
+
const globalDir = React.useContext($f631663db3294ace$var$DirectionContext);
|
|
268
141
|
return localDir || globalDir || 'ltr';
|
|
269
142
|
}
|
|
270
143
|
|
|
271
|
-
const $8927f6f2acc4f386$var$NODES$2 = [
|
|
272
|
-
'a',
|
|
273
|
-
'button',
|
|
274
|
-
'div',
|
|
275
|
-
'h2',
|
|
276
|
-
'h3',
|
|
277
|
-
'img',
|
|
278
|
-
'label',
|
|
279
|
-
'li',
|
|
280
|
-
'nav',
|
|
281
|
-
'ol',
|
|
282
|
-
'p',
|
|
283
|
-
'span',
|
|
284
|
-
'svg',
|
|
285
|
-
'ul'
|
|
286
|
-
]; // Temporary while we await merge of this fix:
|
|
287
|
-
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
288
|
-
// prettier-ignore
|
|
289
|
-
/* -------------------------------------------------------------------------------------------------
|
|
290
|
-
* Primitive
|
|
291
|
-
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$2 = $8927f6f2acc4f386$var$NODES$2.reduce((primitive, node)=>{
|
|
292
|
-
const Node = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
293
|
-
const { asChild: asChild , ...primitiveProps } = props;
|
|
294
|
-
const Comp = asChild ? index_module.$5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
295
|
-
React$1.useEffect(()=>{
|
|
296
|
-
window[Symbol.for('radix-ui')] = true;
|
|
297
|
-
}, []);
|
|
298
|
-
return /*#__PURE__*/ React$1.createElement(Comp, _extends._extends({}, primitiveProps, {
|
|
299
|
-
ref: forwardedRef
|
|
300
|
-
}));
|
|
301
|
-
});
|
|
302
|
-
Node.displayName = `Primitive.${node}`;
|
|
303
|
-
return {
|
|
304
|
-
...primitive,
|
|
305
|
-
[node]: Node
|
|
306
|
-
};
|
|
307
|
-
}, {});
|
|
308
|
-
/* -------------------------------------------------------------------------------------------------
|
|
309
|
-
* Utils
|
|
310
|
-
* -----------------------------------------------------------------------------------------------*/ /**
|
|
311
|
-
* Flush custom event dispatch
|
|
312
|
-
* https://github.com/radix-ui/primitives/pull/1378
|
|
313
|
-
*
|
|
314
|
-
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
|
315
|
-
*
|
|
316
|
-
* Internally, React prioritises events in the following order:
|
|
317
|
-
* - discrete
|
|
318
|
-
* - continuous
|
|
319
|
-
* - default
|
|
320
|
-
*
|
|
321
|
-
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
|
322
|
-
*
|
|
323
|
-
* `discrete` is an important distinction as updates within these events are applied immediately.
|
|
324
|
-
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
|
325
|
-
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
|
326
|
-
* dispatched by another `discrete` event.
|
|
327
|
-
*
|
|
328
|
-
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
|
329
|
-
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
|
330
|
-
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
|
331
|
-
* For example:
|
|
332
|
-
*
|
|
333
|
-
* dispatching a known click 👎
|
|
334
|
-
* target.dispatchEvent(new Event(‘click’))
|
|
335
|
-
*
|
|
336
|
-
* dispatching a custom type within a non-discrete event 👎
|
|
337
|
-
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
|
338
|
-
*
|
|
339
|
-
* dispatching a custom type within a `discrete` event 👍
|
|
340
|
-
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
|
341
|
-
*
|
|
342
|
-
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
|
343
|
-
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
|
344
|
-
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
|
345
|
-
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
346
|
-
if (target) $7SXl2$reactdom.flushSync(()=>target.dispatchEvent(event)
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
352
|
-
* prop or avoid re-executing effects when passed as a dependency
|
|
353
|
-
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(callback) {
|
|
354
|
-
const callbackRef = React$1.useRef(callback);
|
|
355
|
-
React$1.useEffect(()=>{
|
|
356
|
-
callbackRef.current = callback;
|
|
357
|
-
}); // https://github.com/facebook/react/issues/19240
|
|
358
|
-
return React$1.useMemo(()=>(...args)=>{
|
|
359
|
-
var _callbackRef$current;
|
|
360
|
-
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
361
|
-
}
|
|
362
|
-
, []);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
144
|
/**
|
|
366
145
|
* Listens for when the escape key is down
|
|
367
146
|
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
368
|
-
const onEscapeKeyDown =
|
|
369
|
-
React
|
|
147
|
+
const onEscapeKeyDown = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
148
|
+
React.useEffect(()=>{
|
|
370
149
|
const handleKeyDown = (event)=>{
|
|
371
150
|
if (event.key === 'Escape') onEscapeKeyDown(event);
|
|
372
151
|
};
|
|
@@ -383,19 +162,19 @@ const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
|
|
|
383
162
|
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
|
|
384
163
|
const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
|
|
385
164
|
let $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
386
|
-
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ React
|
|
165
|
+
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ React.createContext({
|
|
387
166
|
layers: new Set(),
|
|
388
167
|
layersWithOutsidePointerEventsDisabled: new Set(),
|
|
389
168
|
branches: new Set()
|
|
390
169
|
});
|
|
391
|
-
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React
|
|
170
|
+
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
392
171
|
var _node$ownerDocument;
|
|
393
172
|
const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
|
|
394
|
-
const context = React
|
|
395
|
-
const [node1, setNode] = React
|
|
173
|
+
const context = React.useContext($5cb92bef7577960e$var$DismissableLayerContext);
|
|
174
|
+
const [node1, setNode] = React.useState(null);
|
|
396
175
|
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;
|
|
397
|
-
const [, force] = React
|
|
398
|
-
const composedRefs =
|
|
176
|
+
const [, force] = React.useState({});
|
|
177
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
|
|
399
178
|
);
|
|
400
179
|
const layers = Array.from(context.layers);
|
|
401
180
|
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
@@ -436,7 +215,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$1.forwardR
|
|
|
436
215
|
onDismiss();
|
|
437
216
|
}
|
|
438
217
|
}, ownerDocument);
|
|
439
|
-
React
|
|
218
|
+
React.useEffect(()=>{
|
|
440
219
|
if (!node1) return;
|
|
441
220
|
if (disableOutsidePointerEvents) {
|
|
442
221
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -461,7 +240,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$1.forwardR
|
|
|
461
240
|
* because a change to `disableOutsidePointerEvents` would remove this layer from the stack
|
|
462
241
|
* and add it to the end again so the layering order wouldn't be _creation order_.
|
|
463
242
|
* We only want them to be removed from context stacks when unmounted.
|
|
464
|
-
*/ React
|
|
243
|
+
*/ React.useEffect(()=>{
|
|
465
244
|
return ()=>{
|
|
466
245
|
if (!node1) return;
|
|
467
246
|
context.layers.delete(node1);
|
|
@@ -472,22 +251,22 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$1.forwardR
|
|
|
472
251
|
node1,
|
|
473
252
|
context
|
|
474
253
|
]);
|
|
475
|
-
React
|
|
254
|
+
React.useEffect(()=>{
|
|
476
255
|
const handleUpdate = ()=>force({})
|
|
477
256
|
;
|
|
478
257
|
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
479
258
|
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
|
|
480
259
|
;
|
|
481
260
|
}, []);
|
|
482
|
-
return /*#__PURE__*/ React
|
|
261
|
+
return /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends._extends({}, layerProps, {
|
|
483
262
|
ref: composedRefs,
|
|
484
263
|
style: {
|
|
485
264
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
|
|
486
265
|
...props.style
|
|
487
266
|
},
|
|
488
|
-
onFocusCapture:
|
|
489
|
-
onBlurCapture:
|
|
490
|
-
onPointerDownCapture:
|
|
267
|
+
onFocusCapture: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
268
|
+
onBlurCapture: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
269
|
+
onPointerDownCapture: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
491
270
|
}));
|
|
492
271
|
});
|
|
493
272
|
/* -----------------------------------------------------------------------------------------------*/ /**
|
|
@@ -495,10 +274,10 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$1.forwardR
|
|
|
495
274
|
* to mimic layer dismissing behaviour present in OS.
|
|
496
275
|
* Returns props to pass to the node we want to check for outside events.
|
|
497
276
|
*/ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
498
|
-
const handlePointerDownOutside =
|
|
499
|
-
const isPointerInsideReactTreeRef = React
|
|
500
|
-
const handleClickRef = React
|
|
501
|
-
React
|
|
277
|
+
const handlePointerDownOutside = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
278
|
+
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
279
|
+
const handleClickRef = React.useRef(()=>{});
|
|
280
|
+
React.useEffect(()=>{
|
|
502
281
|
const handlePointerDown = (event)=>{
|
|
503
282
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
504
283
|
const eventDetail = {
|
|
@@ -563,9 +342,9 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React$1.forwardR
|
|
|
563
342
|
* Listens for when focus happens outside a react subtree.
|
|
564
343
|
* Returns props to pass to the root (node) of the subtree we want to check.
|
|
565
344
|
*/ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
566
|
-
const handleFocusOutside =
|
|
567
|
-
const isFocusInsideReactTreeRef = React
|
|
568
|
-
React
|
|
345
|
+
const handleFocusOutside = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
346
|
+
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
347
|
+
React.useEffect(()=>{
|
|
569
348
|
const handleFocus = (event)=>{
|
|
570
349
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
571
350
|
const eventDetail = {
|
|
@@ -603,7 +382,7 @@ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detai
|
|
|
603
382
|
if (handler) target.addEventListener(name, handler, {
|
|
604
383
|
once: true
|
|
605
384
|
});
|
|
606
|
-
if (discrete)
|
|
385
|
+
if (discrete) index_module.$8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
|
|
607
386
|
else target.dispatchEvent(event);
|
|
608
387
|
}
|
|
609
388
|
|
|
@@ -612,7 +391,7 @@ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detai
|
|
|
612
391
|
* Injects a pair of focus guards at the edges of the whole DOM tree
|
|
613
392
|
* to ensure `focusin` & `focusout` events can be caught consistently.
|
|
614
393
|
*/ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
|
|
615
|
-
React
|
|
394
|
+
React.useEffect(()=>{
|
|
616
395
|
var _edgeGuards$, _edgeGuards$2;
|
|
617
396
|
const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
|
|
618
397
|
document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
|
|
@@ -633,97 +412,21 @@ function $3db38b7d1fb3fe6a$var$createFocusGuard() {
|
|
|
633
412
|
return element;
|
|
634
413
|
}
|
|
635
414
|
|
|
636
|
-
/**
|
|
637
|
-
* Set a given ref to a given value
|
|
638
|
-
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
639
|
-
*/ function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
640
|
-
if (typeof ref === 'function') ref(value);
|
|
641
|
-
else if (ref !== null && ref !== undefined) ref.current = value;
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* A utility to compose multiple refs together
|
|
645
|
-
* Accepts callback refs and RefObject(s)
|
|
646
|
-
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
647
|
-
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)
|
|
648
|
-
)
|
|
649
|
-
;
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* A custom hook that composes multiple refs
|
|
653
|
-
* Accepts callback refs and RefObject(s)
|
|
654
|
-
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
655
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
656
|
-
return React$1.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
const $8927f6f2acc4f386$var$NODES$1 = [
|
|
660
|
-
'a',
|
|
661
|
-
'button',
|
|
662
|
-
'div',
|
|
663
|
-
'h2',
|
|
664
|
-
'h3',
|
|
665
|
-
'img',
|
|
666
|
-
'label',
|
|
667
|
-
'li',
|
|
668
|
-
'nav',
|
|
669
|
-
'ol',
|
|
670
|
-
'p',
|
|
671
|
-
'span',
|
|
672
|
-
'svg',
|
|
673
|
-
'ul'
|
|
674
|
-
]; // Temporary while we await merge of this fix:
|
|
675
|
-
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
676
|
-
// prettier-ignore
|
|
677
|
-
/* -------------------------------------------------------------------------------------------------
|
|
678
|
-
* Primitive
|
|
679
|
-
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$1 = $8927f6f2acc4f386$var$NODES$1.reduce((primitive, node)=>{
|
|
680
|
-
const Node = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
681
|
-
const { asChild: asChild , ...primitiveProps } = props;
|
|
682
|
-
const Comp = asChild ? index_module.$5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
683
|
-
React$1.useEffect(()=>{
|
|
684
|
-
window[Symbol.for('radix-ui')] = true;
|
|
685
|
-
}, []);
|
|
686
|
-
return /*#__PURE__*/ React$1.createElement(Comp, _extends._extends({}, primitiveProps, {
|
|
687
|
-
ref: forwardedRef
|
|
688
|
-
}));
|
|
689
|
-
});
|
|
690
|
-
Node.displayName = `Primitive.${node}`;
|
|
691
|
-
return {
|
|
692
|
-
...primitive,
|
|
693
|
-
[node]: Node
|
|
694
|
-
};
|
|
695
|
-
}, {});
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
699
|
-
* prop or avoid re-executing effects when passed as a dependency
|
|
700
|
-
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
701
|
-
const callbackRef = React$1.useRef(callback);
|
|
702
|
-
React$1.useEffect(()=>{
|
|
703
|
-
callbackRef.current = callback;
|
|
704
|
-
}); // https://github.com/facebook/react/issues/19240
|
|
705
|
-
return React$1.useMemo(()=>(...args)=>{
|
|
706
|
-
var _callbackRef$current;
|
|
707
|
-
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
708
|
-
}
|
|
709
|
-
, []);
|
|
710
|
-
}
|
|
711
|
-
|
|
712
415
|
const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
|
|
713
416
|
const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
|
|
714
417
|
const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
|
|
715
418
|
bubbles: false,
|
|
716
419
|
cancelable: true
|
|
717
420
|
};
|
|
718
|
-
const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React
|
|
421
|
+
const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
719
422
|
const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
|
|
720
|
-
const [container1, setContainer] = React
|
|
721
|
-
const onMountAutoFocus =
|
|
722
|
-
const onUnmountAutoFocus =
|
|
723
|
-
const lastFocusedElementRef = React
|
|
724
|
-
const composedRefs =
|
|
423
|
+
const [container1, setContainer] = React.useState(null);
|
|
424
|
+
const onMountAutoFocus = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
|
|
425
|
+
const onUnmountAutoFocus = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
|
|
426
|
+
const lastFocusedElementRef = React.useRef(null);
|
|
427
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
|
|
725
428
|
);
|
|
726
|
-
const focusScope = React
|
|
429
|
+
const focusScope = React.useRef({
|
|
727
430
|
paused: false,
|
|
728
431
|
pause () {
|
|
729
432
|
this.paused = true;
|
|
@@ -732,7 +435,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$1.forwardR
|
|
|
732
435
|
this.paused = false;
|
|
733
436
|
}
|
|
734
437
|
}).current; // Takes care of trapping focus if focus is moved outside programmatically for example
|
|
735
|
-
React
|
|
438
|
+
React.useEffect(()=>{
|
|
736
439
|
if (trapped) {
|
|
737
440
|
function handleFocusIn(event) {
|
|
738
441
|
if (focusScope.paused || !container1) return;
|
|
@@ -760,7 +463,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$1.forwardR
|
|
|
760
463
|
container1,
|
|
761
464
|
focusScope.paused
|
|
762
465
|
]);
|
|
763
|
-
React
|
|
466
|
+
React.useEffect(()=>{
|
|
764
467
|
if (container1) {
|
|
765
468
|
$d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
|
|
766
469
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -799,7 +502,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$1.forwardR
|
|
|
799
502
|
onUnmountAutoFocus,
|
|
800
503
|
focusScope
|
|
801
504
|
]); // Takes care of looping focus (when tabbing whilst at the edges)
|
|
802
|
-
const handleKeyDown = React
|
|
505
|
+
const handleKeyDown = React.useCallback((event)=>{
|
|
803
506
|
if (!loop && !trapped) return;
|
|
804
507
|
if (focusScope.paused) return;
|
|
805
508
|
const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
@@ -829,7 +532,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React$1.forwardR
|
|
|
829
532
|
trapped,
|
|
830
533
|
focusScope.paused
|
|
831
534
|
]);
|
|
832
|
-
return /*#__PURE__*/ React
|
|
535
|
+
return /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends._extends({
|
|
833
536
|
tabIndex: -1
|
|
834
537
|
}, scopeProps, {
|
|
835
538
|
ref: composedRefs,
|
|
@@ -967,97 +670,16 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
|
967
670
|
return deterministicId || (id ? `radix-${id}` : '');
|
|
968
671
|
}
|
|
969
672
|
|
|
970
|
-
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ React
|
|
673
|
+
const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
971
674
|
var _globalThis$document;
|
|
972
675
|
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;
|
|
973
|
-
return container ? /*#__PURE__*/ $7SXl2$reactdom__default["default"].createPortal(/*#__PURE__*/ React
|
|
676
|
+
return container ? /*#__PURE__*/ $7SXl2$reactdom__default["default"].createPortal(/*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends._extends({}, portalProps, {
|
|
974
677
|
ref: forwardedRef
|
|
975
678
|
})), container) : null;
|
|
976
679
|
});
|
|
977
680
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
defaultProp: defaultProp,
|
|
981
|
-
onChange: onChange
|
|
982
|
-
});
|
|
983
|
-
const isControlled = prop !== undefined;
|
|
984
|
-
const value1 = isControlled ? prop : uncontrolledProp;
|
|
985
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
986
|
-
const setValue = React$1.useCallback((nextValue)=>{
|
|
987
|
-
if (isControlled) {
|
|
988
|
-
const setter = nextValue;
|
|
989
|
-
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
990
|
-
if (value !== prop) handleChange(value);
|
|
991
|
-
} else setUncontrolledProp(nextValue);
|
|
992
|
-
}, [
|
|
993
|
-
isControlled,
|
|
994
|
-
prop,
|
|
995
|
-
setUncontrolledProp,
|
|
996
|
-
handleChange
|
|
997
|
-
]);
|
|
998
|
-
return [
|
|
999
|
-
value1,
|
|
1000
|
-
setValue
|
|
1001
|
-
];
|
|
1002
|
-
}
|
|
1003
|
-
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
|
|
1004
|
-
const uncontrolledState = React$1.useState(defaultProp);
|
|
1005
|
-
const [value] = uncontrolledState;
|
|
1006
|
-
const prevValueRef = React$1.useRef(value);
|
|
1007
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a$1(onChange);
|
|
1008
|
-
React$1.useEffect(()=>{
|
|
1009
|
-
if (prevValueRef.current !== value) {
|
|
1010
|
-
handleChange(value);
|
|
1011
|
-
prevValueRef.current = value;
|
|
1012
|
-
}
|
|
1013
|
-
}, [
|
|
1014
|
-
value,
|
|
1015
|
-
prevValueRef,
|
|
1016
|
-
handleChange
|
|
1017
|
-
]);
|
|
1018
|
-
return uncontrolledState;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
const $8927f6f2acc4f386$var$NODES = [
|
|
1022
|
-
'a',
|
|
1023
|
-
'button',
|
|
1024
|
-
'div',
|
|
1025
|
-
'h2',
|
|
1026
|
-
'h3',
|
|
1027
|
-
'img',
|
|
1028
|
-
'label',
|
|
1029
|
-
'li',
|
|
1030
|
-
'nav',
|
|
1031
|
-
'ol',
|
|
1032
|
-
'p',
|
|
1033
|
-
'span',
|
|
1034
|
-
'svg',
|
|
1035
|
-
'ul'
|
|
1036
|
-
]; // Temporary while we await merge of this fix:
|
|
1037
|
-
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
1038
|
-
// prettier-ignore
|
|
1039
|
-
/* -------------------------------------------------------------------------------------------------
|
|
1040
|
-
* Primitive
|
|
1041
|
-
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
1042
|
-
const Node = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
1043
|
-
const { asChild: asChild , ...primitiveProps } = props;
|
|
1044
|
-
const Comp = asChild ? index_module.$5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
1045
|
-
React$1.useEffect(()=>{
|
|
1046
|
-
window[Symbol.for('radix-ui')] = true;
|
|
1047
|
-
}, []);
|
|
1048
|
-
return /*#__PURE__*/ React$1.createElement(Comp, _extends._extends({}, primitiveProps, {
|
|
1049
|
-
ref: forwardedRef
|
|
1050
|
-
}));
|
|
1051
|
-
});
|
|
1052
|
-
Node.displayName = `Primitive.${node}`;
|
|
1053
|
-
return {
|
|
1054
|
-
...primitive,
|
|
1055
|
-
[node]: Node
|
|
1056
|
-
};
|
|
1057
|
-
}, {});
|
|
1058
|
-
|
|
1059
|
-
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ React$1.forwardRef((props, forwardedRef)=>{
|
|
1060
|
-
return /*#__PURE__*/ React$1.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends._extends({}, props, {
|
|
681
|
+
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
682
|
+
return /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends._extends({}, props, {
|
|
1061
683
|
ref: forwardedRef,
|
|
1062
684
|
style: {
|
|
1063
685
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -1090,37 +712,37 @@ const $cc7e05a45900e73f$var$SELECTION_KEYS = [
|
|
|
1090
712
|
* Select
|
|
1091
713
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$SELECT_NAME = 'Select';
|
|
1092
714
|
const [$cc7e05a45900e73f$var$Collection, $cc7e05a45900e73f$var$useCollection, $cc7e05a45900e73f$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($cc7e05a45900e73f$var$SELECT_NAME);
|
|
1093
|
-
const [$cc7e05a45900e73f$var$createSelectContext, $cc7e05a45900e73f$export$286727a75dc039bd] =
|
|
715
|
+
const [$cc7e05a45900e73f$var$createSelectContext, $cc7e05a45900e73f$export$286727a75dc039bd] = index_module.$c512c27ab02ef895$export$50c7b4e9d9f19c1($cc7e05a45900e73f$var$SELECT_NAME, [
|
|
1094
716
|
$cc7e05a45900e73f$var$createCollectionScope
|
|
1095
717
|
]);
|
|
1096
718
|
const [$cc7e05a45900e73f$var$SelectProvider, $cc7e05a45900e73f$var$useSelectContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME);
|
|
1097
719
|
const [$cc7e05a45900e73f$var$SelectNativeOptionsProvider, $cc7e05a45900e73f$var$useSelectNativeOptionsContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME);
|
|
1098
720
|
const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
1099
721
|
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;
|
|
1100
|
-
const [trigger, setTrigger] = React
|
|
1101
|
-
const [valueNode, setValueNode] = React
|
|
1102
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] = React
|
|
722
|
+
const [trigger, setTrigger] = React.useState(null);
|
|
723
|
+
const [valueNode, setValueNode] = React.useState(null);
|
|
724
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);
|
|
1103
725
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
1104
|
-
const [open = false, setOpen] =
|
|
726
|
+
const [open = false, setOpen] = index_module.$71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
1105
727
|
prop: openProp,
|
|
1106
728
|
defaultProp: defaultOpen,
|
|
1107
729
|
onChange: onOpenChange
|
|
1108
730
|
});
|
|
1109
|
-
const [value, setValue] =
|
|
731
|
+
const [value, setValue] = index_module.$71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
1110
732
|
prop: valueProp,
|
|
1111
733
|
defaultProp: defaultValue,
|
|
1112
734
|
onChange: onValueChange
|
|
1113
735
|
});
|
|
1114
|
-
const triggerPointerDownPosRef = React
|
|
736
|
+
const triggerPointerDownPosRef = React.useRef(null); // We set this to true by default so that events bubble to forms without JS (SSR)
|
|
1115
737
|
const isFormControl = trigger ? Boolean(trigger.closest('form')) : true;
|
|
1116
|
-
const [nativeOptionsSet, setNativeOptionsSet] = React
|
|
738
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React.useState(new Set()); // The native `select` only associates the correct default value if the corresponding
|
|
1117
739
|
// `option` is rendered as a child **at the same time** as itself.
|
|
1118
740
|
// Because it might take a few renders for our items to gather the information to build
|
|
1119
741
|
// the native `option`(s), we generate a key on the `select` to make sure React re-builds it
|
|
1120
742
|
// each time the options change.
|
|
1121
743
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option)=>option.props.value
|
|
1122
744
|
).join(';');
|
|
1123
|
-
return /*#__PURE__*/ React
|
|
745
|
+
return /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectProvider, {
|
|
1124
746
|
required: required,
|
|
1125
747
|
scope: __scopeSelect,
|
|
1126
748
|
trigger: trigger,
|
|
@@ -1137,22 +759,22 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
|
1137
759
|
dir: direction,
|
|
1138
760
|
triggerPointerDownPosRef: triggerPointerDownPosRef,
|
|
1139
761
|
disabled: disabled
|
|
1140
|
-
}, /*#__PURE__*/ React
|
|
762
|
+
}, /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$Collection.Provider, {
|
|
1141
763
|
scope: __scopeSelect
|
|
1142
|
-
}, /*#__PURE__*/ React
|
|
764
|
+
}, /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectNativeOptionsProvider, {
|
|
1143
765
|
scope: props.__scopeSelect,
|
|
1144
|
-
onNativeOptionAdd: React
|
|
766
|
+
onNativeOptionAdd: React.useCallback((option)=>{
|
|
1145
767
|
setNativeOptionsSet((prev)=>new Set(prev).add(option)
|
|
1146
768
|
);
|
|
1147
769
|
}, []),
|
|
1148
|
-
onNativeOptionRemove: React
|
|
770
|
+
onNativeOptionRemove: React.useCallback((option)=>{
|
|
1149
771
|
setNativeOptionsSet((prev)=>{
|
|
1150
772
|
const optionsSet = new Set(prev);
|
|
1151
773
|
optionsSet.delete(option);
|
|
1152
774
|
return optionsSet;
|
|
1153
775
|
});
|
|
1154
776
|
}, [])
|
|
1155
|
-
}, children)), isFormControl ? /*#__PURE__*/ React
|
|
777
|
+
}, children)), isFormControl ? /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$BubbleSelect, {
|
|
1156
778
|
key: nativeSelectKey,
|
|
1157
779
|
"aria-hidden": true,
|
|
1158
780
|
required: required,
|
|
@@ -1164,18 +786,18 @@ const $cc7e05a45900e73f$export$ef9b1a59e592288f = (props)=>{
|
|
|
1164
786
|
onChange: (event)=>setValue(event.target.value)
|
|
1165
787
|
,
|
|
1166
788
|
disabled: disabled
|
|
1167
|
-
}, value === undefined ? /*#__PURE__*/ React
|
|
789
|
+
}, value === undefined ? /*#__PURE__*/ React.createElement("option", {
|
|
1168
790
|
value: ""
|
|
1169
791
|
}) : null, Array.from(nativeOptionsSet)) : null);
|
|
1170
792
|
};
|
|
1171
793
|
/* -------------------------------------------------------------------------------------------------
|
|
1172
794
|
* SelectTrigger
|
|
1173
795
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$TRIGGER_NAME = 'SelectTrigger';
|
|
1174
|
-
const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React
|
|
796
|
+
const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1175
797
|
const { __scopeSelect: __scopeSelect , disabled: disabled = false , ...triggerProps } = props;
|
|
1176
798
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$TRIGGER_NAME, __scopeSelect);
|
|
1177
799
|
const isDisabled = context.disabled || disabled;
|
|
1178
|
-
const composedRefs =
|
|
800
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onTriggerChange);
|
|
1179
801
|
const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
|
|
1180
802
|
const [searchRef, handleTypeaheadSearch, resetTypeahead] = $cc7e05a45900e73f$var$useTypeaheadSearch((search)=>{
|
|
1181
803
|
const enabledItems = getItems().filter((item)=>!item.disabled
|
|
@@ -1191,7 +813,7 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$1.forwardRe
|
|
|
1191
813
|
resetTypeahead();
|
|
1192
814
|
}
|
|
1193
815
|
};
|
|
1194
|
-
return /*#__PURE__*/ React
|
|
816
|
+
return /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends._extends({
|
|
1195
817
|
type: "button",
|
|
1196
818
|
role: "combobox",
|
|
1197
819
|
"aria-controls": context.contentId,
|
|
@@ -1206,7 +828,7 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$1.forwardRe
|
|
|
1206
828
|
}, triggerProps, {
|
|
1207
829
|
ref: composedRefs // Enable compatibility with native label or custom `Label` "click" for Safari:
|
|
1208
830
|
,
|
|
1209
|
-
onClick:
|
|
831
|
+
onClick: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(triggerProps.onClick, (event)=>{
|
|
1210
832
|
// Whilst browsers generally have no issue focusing the trigger when clicking
|
|
1211
833
|
// on a label, Safari seems to struggle with the fact that there's no `onClick`.
|
|
1212
834
|
// We force `focus` in this case. Note: this doesn't create any other side-effect
|
|
@@ -1214,7 +836,7 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$1.forwardRe
|
|
|
1214
836
|
// this only runs for a label "click"
|
|
1215
837
|
event.currentTarget.focus();
|
|
1216
838
|
}),
|
|
1217
|
-
onPointerDown:
|
|
839
|
+
onPointerDown: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(triggerProps.onPointerDown, (event)=>{
|
|
1218
840
|
// prevent implicit pointer capture
|
|
1219
841
|
// https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture
|
|
1220
842
|
const target = event.target;
|
|
@@ -1230,7 +852,7 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$1.forwardRe
|
|
|
1230
852
|
event.preventDefault();
|
|
1231
853
|
}
|
|
1232
854
|
}),
|
|
1233
|
-
onKeyDown:
|
|
855
|
+
onKeyDown: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(triggerProps.onKeyDown, (event)=>{
|
|
1234
856
|
const isTypingAhead = searchRef.current !== '';
|
|
1235
857
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
1236
858
|
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
|
|
@@ -1245,20 +867,20 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ React$1.forwardRe
|
|
|
1245
867
|
/* -------------------------------------------------------------------------------------------------
|
|
1246
868
|
* SelectValue
|
|
1247
869
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$VALUE_NAME = 'SelectValue';
|
|
1248
|
-
const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ React
|
|
870
|
+
const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1249
871
|
// We ignore `className` and `style` as this part shouldn't be styled.
|
|
1250
872
|
const { __scopeSelect: __scopeSelect , className: className , style: style , children: children , placeholder: placeholder , ...valueProps } = props;
|
|
1251
873
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$VALUE_NAME, __scopeSelect);
|
|
1252
874
|
const { onValueNodeHasChildrenChange: onValueNodeHasChildrenChange } = context;
|
|
1253
875
|
const hasChildren = children !== undefined;
|
|
1254
|
-
const composedRefs =
|
|
876
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onValueNodeChange);
|
|
1255
877
|
index_module.$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
1256
878
|
onValueNodeHasChildrenChange(hasChildren);
|
|
1257
879
|
}, [
|
|
1258
880
|
onValueNodeHasChildrenChange,
|
|
1259
881
|
hasChildren
|
|
1260
882
|
]);
|
|
1261
|
-
return /*#__PURE__*/ React
|
|
883
|
+
return /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends._extends({}, valueProps, {
|
|
1262
884
|
ref: composedRefs // we don't want events from the portalled `SelectValue` children to bubble
|
|
1263
885
|
,
|
|
1264
886
|
style: {
|
|
@@ -1266,67 +888,67 @@ const $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/ React$1.forwardR
|
|
|
1266
888
|
}
|
|
1267
889
|
}), context.value === undefined && placeholder !== undefined ? placeholder : children);
|
|
1268
890
|
});
|
|
1269
|
-
const $cc7e05a45900e73f$export$99b400cabb58c515 = /*#__PURE__*/ React
|
|
891
|
+
const $cc7e05a45900e73f$export$99b400cabb58c515 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1270
892
|
const { __scopeSelect: __scopeSelect , children: children , ...iconProps } = props;
|
|
1271
|
-
return /*#__PURE__*/ React
|
|
893
|
+
return /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends._extends({
|
|
1272
894
|
"aria-hidden": true
|
|
1273
895
|
}, iconProps, {
|
|
1274
896
|
ref: forwardedRef
|
|
1275
897
|
}), children || '▼');
|
|
1276
898
|
});
|
|
1277
899
|
const $cc7e05a45900e73f$export$b2af6c9944296213 = (props)=>{
|
|
1278
|
-
return /*#__PURE__*/ React
|
|
900
|
+
return /*#__PURE__*/ React.createElement($f1701beae083dbae$export$602eac185826482c, _extends._extends({
|
|
1279
901
|
asChild: true
|
|
1280
902
|
}, props));
|
|
1281
903
|
};
|
|
1282
904
|
/* -------------------------------------------------------------------------------------------------
|
|
1283
905
|
* SelectContent
|
|
1284
906
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$CONTENT_NAME = 'SelectContent';
|
|
1285
|
-
const $cc7e05a45900e73f$export$c973a4b3cb86a03d = /*#__PURE__*/ React
|
|
907
|
+
const $cc7e05a45900e73f$export$c973a4b3cb86a03d = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1286
908
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, props.__scopeSelect);
|
|
1287
|
-
const [fragment, setFragment] = React
|
|
909
|
+
const [fragment, setFragment] = React.useState(); // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server
|
|
1288
910
|
index_module.$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
1289
911
|
setFragment(new DocumentFragment());
|
|
1290
912
|
}, []);
|
|
1291
|
-
return /*#__PURE__*/ React
|
|
913
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, context.open ? /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectContentImpl, _extends._extends({}, props, {
|
|
1292
914
|
ref: forwardedRef
|
|
1293
|
-
})) : fragment ? /*#__PURE__*/ $7SXl2$reactdom.createPortal(/*#__PURE__*/ React
|
|
915
|
+
})) : fragment ? /*#__PURE__*/ $7SXl2$reactdom.createPortal(/*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectContentProvider, {
|
|
1294
916
|
scope: props.__scopeSelect
|
|
1295
|
-
}, /*#__PURE__*/ React
|
|
917
|
+
}, /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$Collection.Slot, {
|
|
1296
918
|
scope: props.__scopeSelect
|
|
1297
|
-
}, /*#__PURE__*/ React
|
|
919
|
+
}, /*#__PURE__*/ React.createElement("div", null, props.children))), fragment) : null);
|
|
1298
920
|
});
|
|
1299
921
|
const $cc7e05a45900e73f$var$CONTENT_MARGIN = 10;
|
|
1300
922
|
const [$cc7e05a45900e73f$var$SelectContentProvider, $cc7e05a45900e73f$var$useSelectContentContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME);
|
|
1301
|
-
const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React
|
|
923
|
+
const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1302
924
|
const { __scopeSelect: __scopeSelect , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props;
|
|
1303
925
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);
|
|
1304
|
-
const [contentWrapper, setContentWrapper] = React
|
|
1305
|
-
const [content, setContent] = React
|
|
1306
|
-
const [viewport, setViewport] = React
|
|
1307
|
-
const composedRefs =
|
|
926
|
+
const [contentWrapper, setContentWrapper] = React.useState(null);
|
|
927
|
+
const [content, setContent] = React.useState(null);
|
|
928
|
+
const [viewport, setViewport] = React.useState(null);
|
|
929
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContent(node)
|
|
1308
930
|
);
|
|
1309
|
-
const [selectedItem, setSelectedItem] = React
|
|
1310
|
-
const [selectedItemText, setSelectedItemText] = React
|
|
931
|
+
const [selectedItem, setSelectedItem] = React.useState(null);
|
|
932
|
+
const [selectedItemText, setSelectedItemText] = React.useState(null);
|
|
1311
933
|
const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
|
|
1312
|
-
const [isPositioned, setIsPositioned] = React
|
|
1313
|
-
const shouldRepositionRef = React
|
|
1314
|
-
const shouldExpandOnScrollRef = React
|
|
1315
|
-
const firstValidItemFoundRef = React
|
|
1316
|
-
React
|
|
934
|
+
const [isPositioned, setIsPositioned] = React.useState(false);
|
|
935
|
+
const shouldRepositionRef = React.useRef(true);
|
|
936
|
+
const shouldExpandOnScrollRef = React.useRef(false);
|
|
937
|
+
const firstValidItemFoundRef = React.useRef(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
|
|
938
|
+
React.useEffect(()=>{
|
|
1317
939
|
if (content) return index.hideOthers(content);
|
|
1318
940
|
}, [
|
|
1319
941
|
content
|
|
1320
942
|
]); // Make sure the whole tree has focus guards as our `Select` may be
|
|
1321
943
|
// the last element in the DOM (because of the `Portal`)
|
|
1322
944
|
$3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
|
|
1323
|
-
const [contentZIndex, setContentZIndex] = React
|
|
945
|
+
const [contentZIndex, setContentZIndex] = React.useState();
|
|
1324
946
|
index_module.$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
1325
947
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
1326
948
|
}, [
|
|
1327
949
|
content
|
|
1328
950
|
]);
|
|
1329
|
-
const focusFirst = React
|
|
951
|
+
const focusFirst = React.useCallback((candidates)=>{
|
|
1330
952
|
const [firstItem, ...restItems] = getItems().map((item)=>item.ref.current
|
|
1331
953
|
);
|
|
1332
954
|
const [lastItem] = restItems.slice(-1);
|
|
@@ -1346,7 +968,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1346
968
|
getItems,
|
|
1347
969
|
viewport
|
|
1348
970
|
]);
|
|
1349
|
-
const position = React
|
|
971
|
+
const position = React.useCallback(()=>{
|
|
1350
972
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
1351
973
|
const triggerRect = context.trigger.getBoundingClientRect(); // -----------------------------------------------------------------------------------------
|
|
1352
974
|
// Horizontal positioning
|
|
@@ -1441,7 +1063,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1441
1063
|
, [
|
|
1442
1064
|
position
|
|
1443
1065
|
]);
|
|
1444
|
-
const focusSelectedItem = React
|
|
1066
|
+
const focusSelectedItem = React.useCallback(()=>focusFirst([
|
|
1445
1067
|
selectedItem,
|
|
1446
1068
|
content
|
|
1447
1069
|
])
|
|
@@ -1451,7 +1073,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1451
1073
|
content
|
|
1452
1074
|
]); // Since this is not dependent on layout, we want to ensure this runs at the same time as
|
|
1453
1075
|
// other effects across components. Hence why we don't call `focusSelectedItem` inside `position`.
|
|
1454
|
-
React
|
|
1076
|
+
React.useEffect(()=>{
|
|
1455
1077
|
if (isPositioned) focusSelectedItem();
|
|
1456
1078
|
}, [
|
|
1457
1079
|
isPositioned,
|
|
@@ -1460,7 +1082,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1460
1082
|
// Because it is part of the normal flow, it will push down the viewport, thus throwing our
|
|
1461
1083
|
// trigger => selectedItem alignment off by the amount the viewport was pushed down.
|
|
1462
1084
|
// We wait for this to happen and then re-run the positining logic one more time to account for it.
|
|
1463
|
-
const handleScrollButtonChange = React
|
|
1085
|
+
const handleScrollButtonChange = React.useCallback((node)=>{
|
|
1464
1086
|
if (node && shouldRepositionRef.current === true) {
|
|
1465
1087
|
position();
|
|
1466
1088
|
focusSelectedItem();
|
|
@@ -1472,7 +1094,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1472
1094
|
]); // prevent selecting items on `pointerup` in some cases after opening from `pointerdown`
|
|
1473
1095
|
// and close on `pointerup` outside.
|
|
1474
1096
|
const { onOpenChange: onOpenChange , triggerPointerDownPosRef: triggerPointerDownPosRef } = context;
|
|
1475
|
-
React
|
|
1097
|
+
React.useEffect(()=>{
|
|
1476
1098
|
if (content) {
|
|
1477
1099
|
let pointerMoveDelta = {
|
|
1478
1100
|
x: 0,
|
|
@@ -1512,7 +1134,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1512
1134
|
onOpenChange,
|
|
1513
1135
|
triggerPointerDownPosRef
|
|
1514
1136
|
]);
|
|
1515
|
-
React
|
|
1137
|
+
React.useEffect(()=>{
|
|
1516
1138
|
const close = ()=>onOpenChange(false)
|
|
1517
1139
|
;
|
|
1518
1140
|
window.addEventListener('blur', close);
|
|
@@ -1536,7 +1158,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1536
1158
|
*/ setTimeout(()=>nextItem.ref.current.focus()
|
|
1537
1159
|
);
|
|
1538
1160
|
});
|
|
1539
|
-
const itemRefCallback = React
|
|
1161
|
+
const itemRefCallback = React.useCallback((node, value, disabled)=>{
|
|
1540
1162
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
1541
1163
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
1542
1164
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -1546,18 +1168,18 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1546
1168
|
}, [
|
|
1547
1169
|
context.value
|
|
1548
1170
|
]);
|
|
1549
|
-
const handleItemLeave = React
|
|
1171
|
+
const handleItemLeave = React.useCallback(()=>content === null || content === void 0 ? void 0 : content.focus()
|
|
1550
1172
|
, [
|
|
1551
1173
|
content
|
|
1552
1174
|
]);
|
|
1553
|
-
const itemTextRefCallback = React
|
|
1175
|
+
const itemTextRefCallback = React.useCallback((node, value, disabled)=>{
|
|
1554
1176
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
1555
1177
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
1556
1178
|
if (isSelectedItem || isFirstValidItem) setSelectedItemText(node);
|
|
1557
1179
|
}, [
|
|
1558
1180
|
context.value
|
|
1559
1181
|
]);
|
|
1560
|
-
return /*#__PURE__*/ React
|
|
1182
|
+
return /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectContentProvider, {
|
|
1561
1183
|
scope: __scopeSelect,
|
|
1562
1184
|
contentWrapper: contentWrapper,
|
|
1563
1185
|
content: content,
|
|
@@ -1572,10 +1194,10 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1572
1194
|
isPositioned: isPositioned,
|
|
1573
1195
|
shouldExpandOnScrollRef: shouldExpandOnScrollRef,
|
|
1574
1196
|
searchRef: searchRef
|
|
1575
|
-
}, /*#__PURE__*/ React
|
|
1197
|
+
}, /*#__PURE__*/ React.createElement(index.$01b9c$RemoveScroll, {
|
|
1576
1198
|
as: index_module.$5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
|
1577
1199
|
allowPinchZoom: true
|
|
1578
|
-
}, /*#__PURE__*/ React
|
|
1200
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
1579
1201
|
ref: setContentWrapper,
|
|
1580
1202
|
style: {
|
|
1581
1203
|
display: 'flex',
|
|
@@ -1583,7 +1205,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1583
1205
|
position: 'fixed',
|
|
1584
1206
|
zIndex: contentZIndex
|
|
1585
1207
|
}
|
|
1586
|
-
}, /*#__PURE__*/ React
|
|
1208
|
+
}, /*#__PURE__*/ React.createElement($d3863c46a17e8a28$export$20e40289641fbbb6, {
|
|
1587
1209
|
asChild: true // we make sure we're not trapping once it's been closed
|
|
1588
1210
|
,
|
|
1589
1211
|
trapped: context.open,
|
|
@@ -1591,14 +1213,14 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1591
1213
|
// we prevent open autofocus because we manually focus the selected item
|
|
1592
1214
|
event.preventDefault();
|
|
1593
1215
|
},
|
|
1594
|
-
onUnmountAutoFocus:
|
|
1216
|
+
onUnmountAutoFocus: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(onCloseAutoFocus, (event)=>{
|
|
1595
1217
|
var _context$trigger;
|
|
1596
1218
|
(_context$trigger = context.trigger) === null || _context$trigger === void 0 || _context$trigger.focus({
|
|
1597
1219
|
preventScroll: true
|
|
1598
1220
|
});
|
|
1599
1221
|
event.preventDefault();
|
|
1600
1222
|
})
|
|
1601
|
-
}, /*#__PURE__*/ React
|
|
1223
|
+
}, /*#__PURE__*/ React.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends._extends({
|
|
1602
1224
|
role: "listbox",
|
|
1603
1225
|
id: context.contentId,
|
|
1604
1226
|
"data-state": context.open ? 'open' : 'closed',
|
|
@@ -1622,7 +1244,7 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1622
1244
|
,
|
|
1623
1245
|
onDismiss: ()=>context.onOpenChange(false)
|
|
1624
1246
|
,
|
|
1625
|
-
onKeyDown:
|
|
1247
|
+
onKeyDown: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(contentProps.onKeyDown, (event)=>{
|
|
1626
1248
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; // select should not be navigated using tab key so we prevent it
|
|
1627
1249
|
if (event.key === 'Tab') event.preventDefault();
|
|
1628
1250
|
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
|
|
@@ -1661,18 +1283,18 @@ const $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/ React$1.forwardRef
|
|
|
1661
1283
|
/* -------------------------------------------------------------------------------------------------
|
|
1662
1284
|
* SelectViewport
|
|
1663
1285
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$VIEWPORT_NAME = 'SelectViewport';
|
|
1664
|
-
const $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/ React
|
|
1286
|
+
const $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1665
1287
|
const { __scopeSelect: __scopeSelect , ...viewportProps } = props;
|
|
1666
1288
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);
|
|
1667
|
-
const composedRefs =
|
|
1668
|
-
const prevScrollTopRef = React
|
|
1669
|
-
return /*#__PURE__*/ React
|
|
1289
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentContext.onViewportChange);
|
|
1290
|
+
const prevScrollTopRef = React.useRef(0);
|
|
1291
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("style", {
|
|
1670
1292
|
dangerouslySetInnerHTML: {
|
|
1671
1293
|
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
|
1672
1294
|
}
|
|
1673
|
-
}), /*#__PURE__*/ React
|
|
1295
|
+
}), /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$Collection.Slot, {
|
|
1674
1296
|
scope: __scopeSelect
|
|
1675
|
-
}, /*#__PURE__*/ React
|
|
1297
|
+
}, /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends._extends({
|
|
1676
1298
|
"data-radix-select-viewport": "",
|
|
1677
1299
|
role: "presentation"
|
|
1678
1300
|
}, viewportProps, {
|
|
@@ -1686,7 +1308,7 @@ const $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/ React$1.forwardR
|
|
|
1686
1308
|
overflow: 'auto',
|
|
1687
1309
|
...viewportProps.style
|
|
1688
1310
|
},
|
|
1689
|
-
onScroll:
|
|
1311
|
+
onScroll: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(viewportProps.onScroll, (event)=>{
|
|
1690
1312
|
const viewport = event.currentTarget;
|
|
1691
1313
|
const { contentWrapper: contentWrapper , shouldExpandOnScrollRef: shouldExpandOnScrollRef } = contentContext;
|
|
1692
1314
|
if (shouldExpandOnScrollRef !== null && shouldExpandOnScrollRef !== void 0 && shouldExpandOnScrollRef.current && contentWrapper) {
|
|
@@ -1720,14 +1342,14 @@ $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$GROUP_NAME);
|
|
|
1720
1342
|
* SelectItem
|
|
1721
1343
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$ITEM_NAME = 'SelectItem';
|
|
1722
1344
|
const [$cc7e05a45900e73f$var$SelectItemContextProvider, $cc7e05a45900e73f$var$useSelectItemContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$ITEM_NAME);
|
|
1723
|
-
const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React
|
|
1345
|
+
const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1724
1346
|
const { __scopeSelect: __scopeSelect , value: value , disabled: disabled = false , textValue: textValueProp , ...itemProps } = props;
|
|
1725
1347
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);
|
|
1726
1348
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);
|
|
1727
1349
|
const isSelected = context.value === value;
|
|
1728
|
-
const [textValue, setTextValue] = React
|
|
1729
|
-
const [isFocused, setIsFocused] = React
|
|
1730
|
-
const composedRefs =
|
|
1350
|
+
const [textValue, setTextValue] = React.useState(textValueProp !== null && textValueProp !== void 0 ? textValueProp : '');
|
|
1351
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
1352
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>{
|
|
1731
1353
|
var _contentContext$itemR;
|
|
1732
1354
|
return (_contentContext$itemR = contentContext.itemRefCallback) === null || _contentContext$itemR === void 0 ? void 0 : _contentContext$itemR.call(contentContext, node, value, disabled);
|
|
1733
1355
|
});
|
|
@@ -1738,24 +1360,24 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$1.forwardR
|
|
|
1738
1360
|
context.onOpenChange(false);
|
|
1739
1361
|
}
|
|
1740
1362
|
};
|
|
1741
|
-
return /*#__PURE__*/ React
|
|
1363
|
+
return /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectItemContextProvider, {
|
|
1742
1364
|
scope: __scopeSelect,
|
|
1743
1365
|
value: value,
|
|
1744
1366
|
disabled: disabled,
|
|
1745
1367
|
textId: textId,
|
|
1746
1368
|
isSelected: isSelected,
|
|
1747
|
-
onItemTextChange: React
|
|
1369
|
+
onItemTextChange: React.useCallback((node)=>{
|
|
1748
1370
|
setTextValue((prevTextValue)=>{
|
|
1749
1371
|
var _node$textContent;
|
|
1750
1372
|
return prevTextValue || ((_node$textContent = node === null || node === void 0 ? void 0 : node.textContent) !== null && _node$textContent !== void 0 ? _node$textContent : '').trim();
|
|
1751
1373
|
});
|
|
1752
1374
|
}, [])
|
|
1753
|
-
}, /*#__PURE__*/ React
|
|
1375
|
+
}, /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$Collection.ItemSlot, {
|
|
1754
1376
|
scope: __scopeSelect,
|
|
1755
1377
|
value: value,
|
|
1756
1378
|
disabled: disabled,
|
|
1757
1379
|
textValue: textValue
|
|
1758
|
-
}, /*#__PURE__*/ React
|
|
1380
|
+
}, /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends._extends({
|
|
1759
1381
|
role: "option",
|
|
1760
1382
|
"aria-labelledby": textId,
|
|
1761
1383
|
"data-highlighted": isFocused ? '' : undefined // `isFocused` caveat fixes stuttering in VoiceOver
|
|
@@ -1767,12 +1389,12 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$1.forwardR
|
|
|
1767
1389
|
tabIndex: disabled ? undefined : -1
|
|
1768
1390
|
}, itemProps, {
|
|
1769
1391
|
ref: composedRefs,
|
|
1770
|
-
onFocus:
|
|
1392
|
+
onFocus: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onFocus, ()=>setIsFocused(true)
|
|
1771
1393
|
),
|
|
1772
|
-
onBlur:
|
|
1394
|
+
onBlur: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onBlur, ()=>setIsFocused(false)
|
|
1773
1395
|
),
|
|
1774
|
-
onPointerUp:
|
|
1775
|
-
onPointerMove:
|
|
1396
|
+
onPointerUp: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onPointerUp, handleSelect),
|
|
1397
|
+
onPointerMove: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onPointerMove, (event)=>{
|
|
1776
1398
|
if (disabled) {
|
|
1777
1399
|
var _contentContext$onIte;
|
|
1778
1400
|
(_contentContext$onIte = contentContext.onItemLeave) === null || _contentContext$onIte === void 0 || _contentContext$onIte.call(contentContext);
|
|
@@ -1782,13 +1404,13 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$1.forwardR
|
|
|
1782
1404
|
preventScroll: true
|
|
1783
1405
|
});
|
|
1784
1406
|
}),
|
|
1785
|
-
onPointerLeave:
|
|
1407
|
+
onPointerLeave: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onPointerLeave, (event)=>{
|
|
1786
1408
|
if (event.currentTarget === document.activeElement) {
|
|
1787
1409
|
var _contentContext$onIte2;
|
|
1788
1410
|
(_contentContext$onIte2 = contentContext.onItemLeave) === null || _contentContext$onIte2 === void 0 || _contentContext$onIte2.call(contentContext);
|
|
1789
1411
|
}
|
|
1790
1412
|
}),
|
|
1791
|
-
onKeyDown:
|
|
1413
|
+
onKeyDown: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onKeyDown, (event)=>{
|
|
1792
1414
|
var _contentContext$searc;
|
|
1793
1415
|
const isTypingAhead = ((_contentContext$searc = contentContext.searchRef) === null || _contentContext$searc === void 0 ? void 0 : _contentContext$searc.current) !== '';
|
|
1794
1416
|
if (isTypingAhead && event.key === ' ') return;
|
|
@@ -1800,21 +1422,21 @@ const $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/ React$1.forwardR
|
|
|
1800
1422
|
/* -------------------------------------------------------------------------------------------------
|
|
1801
1423
|
* SelectItemText
|
|
1802
1424
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$ITEM_TEXT_NAME = 'SelectItemText';
|
|
1803
|
-
const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React
|
|
1425
|
+
const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1804
1426
|
// We ignore `className` and `style` as this part shouldn't be styled.
|
|
1805
1427
|
const { __scopeSelect: __scopeSelect , className: className , style: style , ...itemTextProps } = props;
|
|
1806
1428
|
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
1807
1429
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
1808
1430
|
const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
1809
1431
|
const nativeOptionsContext = $cc7e05a45900e73f$var$useSelectNativeOptionsContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
|
|
1810
|
-
const [itemTextNode, setItemTextNode] = React
|
|
1811
|
-
const composedRefs =
|
|
1432
|
+
const [itemTextNode, setItemTextNode] = React.useState(null);
|
|
1433
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setItemTextNode(node)
|
|
1812
1434
|
, itemContext.onItemTextChange, (node)=>{
|
|
1813
1435
|
var _contentContext$itemT;
|
|
1814
1436
|
return (_contentContext$itemT = contentContext.itemTextRefCallback) === null || _contentContext$itemT === void 0 ? void 0 : _contentContext$itemT.call(contentContext, node, itemContext.value, itemContext.disabled);
|
|
1815
1437
|
});
|
|
1816
1438
|
const textContent = itemTextNode === null || itemTextNode === void 0 ? void 0 : itemTextNode.textContent;
|
|
1817
|
-
const nativeOption = React
|
|
1439
|
+
const nativeOption = React.useMemo(()=>/*#__PURE__*/ React.createElement("option", {
|
|
1818
1440
|
key: itemContext.value,
|
|
1819
1441
|
value: itemContext.value,
|
|
1820
1442
|
disabled: itemContext.disabled
|
|
@@ -1834,7 +1456,7 @@ const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React$1.forwardR
|
|
|
1834
1456
|
onNativeOptionRemove,
|
|
1835
1457
|
nativeOption
|
|
1836
1458
|
]);
|
|
1837
|
-
return /*#__PURE__*/ React
|
|
1459
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends._extends({
|
|
1838
1460
|
id: itemContext.textId
|
|
1839
1461
|
}, itemTextProps, {
|
|
1840
1462
|
ref: composedRefs
|
|
@@ -1843,10 +1465,10 @@ const $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/ React$1.forwardR
|
|
|
1843
1465
|
/* -------------------------------------------------------------------------------------------------
|
|
1844
1466
|
* SelectItemIndicator
|
|
1845
1467
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$ITEM_INDICATOR_NAME = 'SelectItemIndicator';
|
|
1846
|
-
const $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/ React
|
|
1468
|
+
const $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1847
1469
|
const { __scopeSelect: __scopeSelect , ...itemIndicatorProps } = props;
|
|
1848
1470
|
const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_INDICATOR_NAME, __scopeSelect);
|
|
1849
|
-
return itemContext.isSelected ? /*#__PURE__*/ React
|
|
1471
|
+
return itemContext.isSelected ? /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends._extends({
|
|
1850
1472
|
"aria-hidden": true
|
|
1851
1473
|
}, itemIndicatorProps, {
|
|
1852
1474
|
ref: forwardedRef
|
|
@@ -1855,10 +1477,10 @@ const $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/ React$1.forwardR
|
|
|
1855
1477
|
/* -------------------------------------------------------------------------------------------------
|
|
1856
1478
|
* SelectScrollUpButton
|
|
1857
1479
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton';
|
|
1858
|
-
const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React
|
|
1480
|
+
const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1859
1481
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
1860
|
-
const [canScrollUp1, setCanScrollUp] = React
|
|
1861
|
-
const composedRefs =
|
|
1482
|
+
const [canScrollUp1, setCanScrollUp] = React.useState(false);
|
|
1483
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentContext.onScrollButtonChange);
|
|
1862
1484
|
index_module.$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
1863
1485
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
1864
1486
|
const viewport = contentContext.viewport;
|
|
@@ -1875,7 +1497,7 @@ const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React$1.forwardR
|
|
|
1875
1497
|
contentContext.viewport,
|
|
1876
1498
|
contentContext.isPositioned
|
|
1877
1499
|
]);
|
|
1878
|
-
return canScrollUp1 ? /*#__PURE__*/ React
|
|
1500
|
+
return canScrollUp1 ? /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, _extends._extends({}, props, {
|
|
1879
1501
|
ref: composedRefs,
|
|
1880
1502
|
onAutoScroll: ()=>{
|
|
1881
1503
|
const { viewport: viewport , selectedItem: selectedItem } = contentContext;
|
|
@@ -1886,10 +1508,10 @@ const $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/ React$1.forwardR
|
|
|
1886
1508
|
/* -------------------------------------------------------------------------------------------------
|
|
1887
1509
|
* SelectScrollDownButton
|
|
1888
1510
|
* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton';
|
|
1889
|
-
const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React
|
|
1511
|
+
const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1890
1512
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
1891
|
-
const [canScrollDown1, setCanScrollDown] = React
|
|
1892
|
-
const composedRefs =
|
|
1513
|
+
const [canScrollDown1, setCanScrollDown] = React.useState(false);
|
|
1514
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentContext.onScrollButtonChange);
|
|
1893
1515
|
index_module.$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
1894
1516
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
1895
1517
|
const viewport = contentContext.viewport;
|
|
@@ -1908,7 +1530,7 @@ const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React$1.forwardRe
|
|
|
1908
1530
|
contentContext.viewport,
|
|
1909
1531
|
contentContext.isPositioned
|
|
1910
1532
|
]);
|
|
1911
|
-
return canScrollDown1 ? /*#__PURE__*/ React
|
|
1533
|
+
return canScrollDown1 ? /*#__PURE__*/ React.createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, _extends._extends({}, props, {
|
|
1912
1534
|
ref: composedRefs,
|
|
1913
1535
|
onAutoScroll: ()=>{
|
|
1914
1536
|
const { viewport: viewport , selectedItem: selectedItem } = contentContext;
|
|
@@ -1916,18 +1538,18 @@ const $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/ React$1.forwardRe
|
|
|
1916
1538
|
}
|
|
1917
1539
|
})) : null;
|
|
1918
1540
|
});
|
|
1919
|
-
const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React
|
|
1541
|
+
const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1920
1542
|
const { __scopeSelect: __scopeSelect , onAutoScroll: onAutoScroll , ...scrollIndicatorProps } = props;
|
|
1921
1543
|
const contentContext = $cc7e05a45900e73f$var$useSelectContentContext('SelectScrollButton', __scopeSelect);
|
|
1922
|
-
const autoScrollTimerRef = React
|
|
1544
|
+
const autoScrollTimerRef = React.useRef(null);
|
|
1923
1545
|
const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
|
|
1924
|
-
const clearAutoScrollTimer = React
|
|
1546
|
+
const clearAutoScrollTimer = React.useCallback(()=>{
|
|
1925
1547
|
if (autoScrollTimerRef.current !== null) {
|
|
1926
1548
|
window.clearInterval(autoScrollTimerRef.current);
|
|
1927
1549
|
autoScrollTimerRef.current = null;
|
|
1928
1550
|
}
|
|
1929
1551
|
}, []);
|
|
1930
|
-
React
|
|
1552
|
+
React.useEffect(()=>{
|
|
1931
1553
|
return ()=>clearAutoScrollTimer()
|
|
1932
1554
|
;
|
|
1933
1555
|
}, [
|
|
@@ -1946,7 +1568,7 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$1.forwa
|
|
|
1946
1568
|
}, [
|
|
1947
1569
|
getItems
|
|
1948
1570
|
]);
|
|
1949
|
-
return /*#__PURE__*/ React
|
|
1571
|
+
return /*#__PURE__*/ React.createElement(index_module.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends._extends({
|
|
1950
1572
|
"aria-hidden": true
|
|
1951
1573
|
}, scrollIndicatorProps, {
|
|
1952
1574
|
ref: forwardedRef,
|
|
@@ -1954,22 +1576,22 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$1.forwa
|
|
|
1954
1576
|
flexShrink: 0,
|
|
1955
1577
|
...scrollIndicatorProps.style
|
|
1956
1578
|
},
|
|
1957
|
-
onPointerMove:
|
|
1579
|
+
onPointerMove: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(scrollIndicatorProps.onPointerMove, ()=>{
|
|
1958
1580
|
var _contentContext$onIte3;
|
|
1959
1581
|
(_contentContext$onIte3 = contentContext.onItemLeave) === null || _contentContext$onIte3 === void 0 || _contentContext$onIte3.call(contentContext);
|
|
1960
1582
|
if (autoScrollTimerRef.current === null) autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
|
1961
1583
|
}),
|
|
1962
|
-
onPointerLeave:
|
|
1584
|
+
onPointerLeave: index_module.$e42e1063c40fb3ef$export$b9ecd428b558ff10(scrollIndicatorProps.onPointerLeave, ()=>{
|
|
1963
1585
|
clearAutoScrollTimer();
|
|
1964
1586
|
})
|
|
1965
1587
|
}));
|
|
1966
1588
|
});
|
|
1967
|
-
/* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$BubbleSelect = /*#__PURE__*/ React
|
|
1589
|
+
/* -----------------------------------------------------------------------------------------------*/ const $cc7e05a45900e73f$var$BubbleSelect = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
1968
1590
|
const { value: value , ...selectProps } = props;
|
|
1969
|
-
const ref = React
|
|
1970
|
-
const composedRefs =
|
|
1591
|
+
const ref = React.useRef(null);
|
|
1592
|
+
const composedRefs = index_module.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
1971
1593
|
const prevValue = index_module.$010c2913dbd2fe3d$export$5cae361ad82dce8b(value); // Bubble value change to parents (e.g form change event)
|
|
1972
|
-
React
|
|
1594
|
+
React.useEffect(()=>{
|
|
1973
1595
|
const select = ref.current;
|
|
1974
1596
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
1975
1597
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, 'value');
|
|
@@ -1996,19 +1618,19 @@ const $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/ React$1.forwa
|
|
|
1996
1618
|
*
|
|
1997
1619
|
* We use `VisuallyHidden` rather than `display: "none"` because Safari autofill
|
|
1998
1620
|
* won't work otherwise.
|
|
1999
|
-
*/ return /*#__PURE__*/ React
|
|
1621
|
+
*/ return /*#__PURE__*/ React.createElement($ea1ef594cf570d83$export$439d29a4e110a164, {
|
|
2000
1622
|
asChild: true
|
|
2001
|
-
}, /*#__PURE__*/ React
|
|
1623
|
+
}, /*#__PURE__*/ React.createElement("select", _extends._extends({}, selectProps, {
|
|
2002
1624
|
ref: composedRefs,
|
|
2003
1625
|
defaultValue: value
|
|
2004
1626
|
})));
|
|
2005
1627
|
});
|
|
2006
1628
|
$cc7e05a45900e73f$var$BubbleSelect.displayName = 'BubbleSelect';
|
|
2007
1629
|
function $cc7e05a45900e73f$var$useTypeaheadSearch(onSearchChange) {
|
|
2008
|
-
const handleSearchChange =
|
|
2009
|
-
const searchRef = React
|
|
2010
|
-
const timerRef = React
|
|
2011
|
-
const handleTypeaheadSearch = React
|
|
1630
|
+
const handleSearchChange = index_module.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onSearchChange);
|
|
1631
|
+
const searchRef = React.useRef('');
|
|
1632
|
+
const timerRef = React.useRef(0);
|
|
1633
|
+
const handleTypeaheadSearch = React.useCallback((key)=>{
|
|
2012
1634
|
const search = searchRef.current + key;
|
|
2013
1635
|
handleSearchChange(search);
|
|
2014
1636
|
(function updateSearch(value) {
|
|
@@ -2020,11 +1642,11 @@ function $cc7e05a45900e73f$var$useTypeaheadSearch(onSearchChange) {
|
|
|
2020
1642
|
}, [
|
|
2021
1643
|
handleSearchChange
|
|
2022
1644
|
]);
|
|
2023
|
-
const resetTypeahead = React
|
|
1645
|
+
const resetTypeahead = React.useCallback(()=>{
|
|
2024
1646
|
searchRef.current = '';
|
|
2025
1647
|
window.clearTimeout(timerRef.current);
|
|
2026
1648
|
}, []);
|
|
2027
|
-
React
|
|
1649
|
+
React.useEffect(()=>{
|
|
2028
1650
|
return ()=>window.clearTimeout(timerRef.current)
|
|
2029
1651
|
;
|
|
2030
1652
|
}, []);
|
|
@@ -2083,9 +1705,8 @@ const $cc7e05a45900e73f$export$c3468e2714d175fa = $cc7e05a45900e73f$export$6b919
|
|
|
2083
1705
|
const $cc7e05a45900e73f$export$2f60d3ec9ad468f2 = $cc7e05a45900e73f$export$d8117927658af6d7;
|
|
2084
1706
|
const $cc7e05a45900e73f$export$bf1aedc3039c8d63 = $cc7e05a45900e73f$export$ff951e476c12189;
|
|
2085
1707
|
|
|
2086
|
-
const React = React__default["default"];
|
|
2087
1708
|
const BtIconChevronUp2Px = props =>
|
|
2088
|
-
/*#__PURE__*/
|
|
1709
|
+
/*#__PURE__*/ React__default["default"].createElement(
|
|
2089
1710
|
"svg",
|
|
2090
1711
|
Object.assign(
|
|
2091
1712
|
{
|
|
@@ -2094,22 +1715,21 @@ const BtIconChevronUp2Px = props =>
|
|
|
2094
1715
|
},
|
|
2095
1716
|
props
|
|
2096
1717
|
),
|
|
2097
|
-
/*#__PURE__*/
|
|
2098
|
-
/*#__PURE__*/
|
|
1718
|
+
/*#__PURE__*/ React__default["default"].createElement("defs", null),
|
|
1719
|
+
/*#__PURE__*/ React__default["default"].createElement("path", {
|
|
2099
1720
|
d:
|
|
2100
1721
|
"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",
|
|
2101
1722
|
fill: "currentColor"
|
|
2102
1723
|
})
|
|
2103
1724
|
);
|
|
2104
|
-
var BtIconChevronUp2Px_2 = BtIconChevronUp2Px;
|
|
2105
1725
|
|
|
2106
1726
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
2107
1727
|
var Select = function (_a) {
|
|
2108
1728
|
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, props = filterDataAttrs.__rest(_a, ["isRequired", "isDisabled", "placeholder", "label", "options", "onOpenChange", "isDefaultOpen", "defaultValue", "errorMessage", "labelSize", "helper", "name", "isFluid", "onBlur", "onChange", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
2109
|
-
var id = React
|
|
2110
|
-
var arcRootElement = React
|
|
2111
|
-
var surface = React
|
|
2112
|
-
var _b = React
|
|
1729
|
+
var id = React.useId();
|
|
1730
|
+
var arcRootElement = React.useContext(Base.ArcRootElementContext);
|
|
1731
|
+
var surface = React.useContext(Surface.Context).surface;
|
|
1732
|
+
var _b = React.useState(defaultValue), selectedValue = _b[0], setSelectedValue = _b[1];
|
|
2113
1733
|
var onValueChange = function (value) {
|
|
2114
1734
|
onChange && onChange(value);
|
|
2115
1735
|
setSelectedValue(value);
|
|
@@ -2127,13 +1747,13 @@ var Select = function (_a) {
|
|
|
2127
1747
|
}) }, filterDataAttrs.filterDataAttrs(props)),
|
|
2128
1748
|
React__default["default"].createElement($cc7e05a45900e73f$export$4c8d1a57a761ef94, { asChild: true, "aria-label": getSelectedValueName(selectedValue) }, !selectedValue ? (React__default["default"].createElement("span", { "aria-hidden": true, className: "arc-Select-placeHolder" }, placeholder)) : (React__default["default"].createElement("span", { className: "arc-Select-valueItem" }, getSelectedValueName(selectedValue)))),
|
|
2129
1749
|
React__default["default"].createElement($cc7e05a45900e73f$export$f04a61298a47a40f, { className: "arc-Select-triggerIcon" },
|
|
2130
|
-
React__default["default"].createElement(Icon.Icon, { icon: BtIconChevronDown2Px
|
|
2131
|
-
React__default["default"].createElement($cc7e05a45900e73f$export$602eac185826482c, { container: arcRootElement },
|
|
1750
|
+
React__default["default"].createElement(Icon.Icon, { icon: BtIconChevronDown2Px_esm.BtIconChevronDown2Px, size: 20 }))),
|
|
1751
|
+
React__default["default"].createElement($cc7e05a45900e73f$export$602eac185826482c, { container: arcRootElement || undefined },
|
|
2132
1752
|
React__default["default"].createElement($cc7e05a45900e73f$export$7c6e2c02157bb7d2, { className: index$1.classNames("arc-Select-content", {
|
|
2133
1753
|
"arc-Select-content--onDarkSurface": surface === "dark"
|
|
2134
1754
|
}) },
|
|
2135
1755
|
React__default["default"].createElement($cc7e05a45900e73f$export$2f60d3ec9ad468f2, { className: "arc-Select-scrollButton" },
|
|
2136
|
-
React__default["default"].createElement(Icon.Icon, { icon:
|
|
1756
|
+
React__default["default"].createElement(Icon.Icon, { icon: BtIconChevronUp2Px, size: 16 })),
|
|
2137
1757
|
React__default["default"].createElement($cc7e05a45900e73f$export$d5c6c08dc2d3ca7, null, options.map(function (_a, i) {
|
|
2138
1758
|
var name = _a.name, value = _a.value;
|
|
2139
1759
|
return (React__default["default"].createElement($cc7e05a45900e73f$export$6d08773d2e66f8f2, { className: "arc-Select-item", key: "select-item-".concat(i), value: value },
|
|
@@ -2141,10 +1761,10 @@ var Select = function (_a) {
|
|
|
2141
1761
|
React__default["default"].createElement($cc7e05a45900e73f$export$d6e5bf9c43ea9319, { asChild: true },
|
|
2142
1762
|
React__default["default"].createElement("span", { className: "arc-Select-itemText" }, name))),
|
|
2143
1763
|
React__default["default"].createElement($cc7e05a45900e73f$export$c3468e2714d175fa, null,
|
|
2144
|
-
React__default["default"].createElement(Icon.Icon, { icon: BtIconTickAlt2Px
|
|
1764
|
+
React__default["default"].createElement(Icon.Icon, { icon: BtIconTickAlt2Px_esm.BtIconTickAlt2Px, size: 20 }))));
|
|
2145
1765
|
})),
|
|
2146
1766
|
React__default["default"].createElement($cc7e05a45900e73f$export$bf1aedc3039c8d63, { className: "arc-Select-scrollButton" },
|
|
2147
|
-
React__default["default"].createElement(Icon.Icon, { icon: BtIconChevronDown2Px
|
|
1767
|
+
React__default["default"].createElement(Icon.Icon, { icon: BtIconChevronDown2Px_esm.BtIconChevronDown2Px, size: 16 })))))));
|
|
2148
1768
|
};
|
|
2149
1769
|
|
|
2150
1770
|
exports.Select = Select;
|