@arc-ui/components 12.0.0-beta.22 → 12.0.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Alert/Alert.cjs +38 -37
- package/lib/Alert/Alert.mjs +38 -37
- package/lib/Alert/styles.css +1 -1
- package/lib/Align/Align.cjs +4 -3
- package/lib/Align/Align.mjs +2 -1
- package/lib/Align/styles.css +1 -1
- package/lib/AppButton/AppButton.cjs +5 -4
- package/lib/AppButton/AppButton.mjs +3 -2
- package/lib/AppButton/styles.css +1 -1
- package/lib/Avatar/Avatar.cjs +9 -7
- package/lib/Avatar/Avatar.mjs +9 -7
- package/lib/Avatar/styles.css +1 -1
- package/lib/AvatarGroup/AvatarGroup.cjs +14 -12
- package/lib/AvatarGroup/AvatarGroup.mjs +9 -7
- package/lib/AvatarGroup/styles.css +1 -1
- package/lib/Badge/Badge.cjs +3 -2
- package/lib/Badge/Badge.mjs +3 -2
- package/lib/Badge/styles.css +1 -1
- package/lib/Banner/Banner.cjs +14 -12
- package/lib/Banner/Banner.mjs +12 -10
- package/lib/Box/Box.cjs +4 -3
- package/lib/Box/Box.mjs +4 -3
- package/lib/Box/styles.css +1 -1
- package/lib/BrandLogo/BrandLogo.cjs +4 -3
- package/lib/BrandLogo/BrandLogo.mjs +4 -3
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs +18 -8
- package/lib/Breadcrumbs/Breadcrumbs.mjs +16 -6
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/Button.cjs +6 -5
- package/lib/Button/Button.mjs +6 -5
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/ButtonGroup.cjs +11 -10
- package/lib/ButtonGroup/ButtonGroup.mjs +8 -7
- package/lib/ButtonGroup/styles.css +1 -1
- package/lib/ButtonV2/ButtonV2.cjs +6 -5
- package/lib/ButtonV2/ButtonV2.mjs +6 -5
- package/lib/ButtonV2/styles.css +1 -1
- package/lib/Calendar/Calendar.cjs +12 -10
- package/lib/Calendar/Calendar.mjs +12 -10
- package/lib/Calendar/styles.css +1 -1
- package/lib/CardFooter/CardFooter.cjs +5 -4
- package/lib/CardFooter/CardFooter.mjs +5 -4
- package/lib/CardFooter/styles.css +1 -1
- package/lib/CardHeading/CardHeading.cjs +6 -4
- package/lib/CardHeading/CardHeading.mjs +6 -4
- package/lib/CardHeading/styles.css +1 -1
- package/lib/Carousel/Carousel.cjs +17 -10
- package/lib/Carousel/Carousel.mjs +13 -6
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/Checkbox.cjs +54 -13
- package/lib/Checkbox/Checkbox.mjs +56 -11
- package/lib/Checkbox/styles.css +1 -1
- package/lib/CheckboxIcon/CheckboxIcon.cjs +19 -0
- package/lib/CheckboxIcon/CheckboxIcon.mjs +13 -0
- package/lib/CheckboxIcon/styles.css +1 -0
- package/lib/ClientSideVisible/ClientSideVisible.cjs +8 -0
- package/lib/ClientSideVisible/ClientSideVisible.mjs +2 -0
- package/lib/Columns/Columns.cjs +7 -6
- package/lib/Columns/Columns.mjs +3 -2
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/ComboBox.cjs +284 -18
- package/lib/ComboBox/ComboBox.mjs +287 -17
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.cjs +8 -8
- package/lib/ContentSwitcher/ContentSwitcher.mjs +8 -8
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +10 -9
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +10 -9
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +365 -51
- package/lib/DatePicker/DatePicker.mjs +339 -26
- package/lib/DatePicker/styles.css +1 -1
- package/lib/Disclosure/Disclosure.cjs +8 -6
- package/lib/Disclosure/Disclosure.mjs +6 -4
- package/lib/Disclosure/styles.css +1 -1
- package/lib/DisclosureMini/DisclosureMini.cjs +6 -5
- package/lib/DisclosureMini/DisclosureMini.mjs +6 -5
- package/lib/DisclosureMini/styles.css +1 -1
- package/lib/Download/Download.cjs +7 -6
- package/lib/Download/Download.mjs +7 -6
- package/lib/Download/styles.css +1 -1
- package/lib/Drawer/Drawer.cjs +154 -18
- package/lib/Drawer/Drawer.mjs +154 -18
- package/lib/Drawer/styles.css +1 -1
- package/lib/Elevation/Elevation.cjs +9 -5
- package/lib/Elevation/Elevation.mjs +8 -4
- package/lib/Elevation/styles.css +1 -1
- package/lib/Filter/Filter.cjs +7 -6
- package/lib/Filter/Filter.mjs +4 -3
- package/lib/Filter/styles.css +1 -1
- package/lib/FormControl/FormControl.cjs +8 -7
- package/lib/FormControl/FormControl.mjs +8 -7
- package/lib/FormControl/styles.css +1 -1
- package/lib/GhostedHeroBanner/GhostedHeroBanner.cjs +12 -10
- package/lib/GhostedHeroBanner/GhostedHeroBanner.mjs +10 -8
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientPageBackground/GradientPageBackground.cjs +96 -197
- package/lib/GradientPageBackground/GradientPageBackground.mjs +96 -197
- package/lib/GradientPageBackground/styles.css +1 -1
- package/lib/Grid/Grid.cjs +3 -2
- package/lib/Grid/Grid.mjs +3 -2
- package/lib/Grid/styles.css +1 -1
- package/lib/Group/Group.cjs +7 -6
- package/lib/Group/Group.mjs +3 -2
- package/lib/Group/styles.css +1 -1
- package/lib/Heading/Heading.cjs +5 -3
- package/lib/Heading/Heading.mjs +5 -3
- package/lib/Heading/styles.css +1 -1
- package/lib/HeroBanner/HeroBanner.cjs +14 -12
- package/lib/HeroBanner/HeroBanner.mjs +14 -12
- package/lib/HeroBanner/styles.css +1 -1
- package/lib/HeroButton/HeroButton.cjs +78 -9
- package/lib/HeroButton/HeroButton.mjs +81 -8
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/Hidden.cjs +3 -2
- package/lib/Hidden/Hidden.mjs +3 -2
- package/lib/Hidden/styles.css +1 -1
- package/lib/HorizontalCard/HorizontalCard.cjs +14 -12
- package/lib/HorizontalCard/HorizontalCard.mjs +11 -9
- package/lib/HorizontalCard/styles.css +1 -1
- package/lib/Icon/Icon.cjs +4 -3
- package/lib/Icon/Icon.mjs +4 -3
- package/lib/Icon/styles.css +1 -1
- package/lib/Image/Image.cjs +3 -2
- package/lib/Image/Image.mjs +3 -2
- package/lib/Image/styles.css +1 -1
- package/lib/ImpactCard/ImpactCard.cjs +15 -13
- package/lib/ImpactCard/ImpactCard.mjs +13 -11
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +32 -22
- package/lib/InformationCard/InformationCard.mjs +27 -17
- package/lib/InformationCard/styles.css +1 -1
- package/lib/Link/Link.cjs +6 -5
- package/lib/Link/Link.mjs +6 -5
- package/lib/Link/styles.css +1 -1
- package/lib/Markup/Markup.cjs +5 -4
- package/lib/Markup/Markup.mjs +3 -2
- package/lib/Markup/styles.css +1 -1
- package/lib/MediaCard/MediaCard.cjs +56 -15
- package/lib/MediaCard/MediaCard.mjs +58 -13
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/Menu.cjs +1513 -73
- package/lib/Menu/Menu.mjs +1480 -59
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/Modal.cjs +22 -20
- package/lib/Modal/Modal.mjs +18 -16
- package/lib/Modal/styles.css +1 -1
- package/lib/NavigationHeader/NavigationHeader.cjs +859 -114
- package/lib/NavigationHeader/NavigationHeader.mjs +836 -91
- package/lib/NavigationHeader/styles.css +1 -1
- package/lib/Pagination/Pagination.cjs +10 -9
- package/lib/Pagination/Pagination.mjs +6 -5
- package/lib/Pagination/styles.css +1 -1
- package/lib/PaginationSimple/PaginationSimple.cjs +7 -6
- package/lib/PaginationSimple/PaginationSimple.mjs +5 -4
- package/lib/PaginationSimple/styles.css +1 -1
- package/lib/Popover/Popover.cjs +8 -7
- package/lib/Popover/Popover.mjs +8 -7
- package/lib/Popover/styles.css +1 -1
- package/lib/Poster/Poster.cjs +10 -9
- package/lib/Poster/Poster.mjs +4 -3
- package/lib/Poster/styles.css +1 -1
- package/lib/ProgressBar/ProgressBar.cjs +15 -13
- package/lib/ProgressBar/ProgressBar.mjs +10 -8
- package/lib/ProgressBar/styles.css +1 -1
- package/lib/ProgressStepper/ProgressStepper.cjs +6 -6
- package/lib/ProgressStepper/ProgressStepper.mjs +6 -6
- package/lib/ProgressStepper/styles.css +1 -1
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.cjs +142 -11
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.mjs +144 -9
- package/lib/ProgressStepperOverflow/styles.css +1 -1
- package/lib/RadioCardGroup/RadioCardGroup.cjs +57 -15
- package/lib/RadioCardGroup/RadioCardGroup.mjs +55 -14
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/RadioGroup.cjs +59 -15
- package/lib/RadioGroup/RadioGroup.mjs +56 -13
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/Rule.cjs +4 -3
- package/lib/Rule/Rule.mjs +4 -3
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/ScrollToTop.cjs +11 -18
- package/lib/ScrollToTop/ScrollToTop.mjs +11 -18
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/Section.cjs +3 -2
- package/lib/Section/Section.mjs +3 -2
- package/lib/Section/styles.css +1 -1
- package/lib/Select/Select.cjs +25 -17
- package/lib/Select/Select.mjs +25 -17
- package/lib/Select/styles.css +1 -1
- package/lib/SemanticHeading/SemanticHeading.cjs +10 -0
- package/lib/SemanticHeading/SemanticHeading.mjs +4 -0
- package/lib/SemanticHeading/styles.css +1 -0
- package/lib/SiteFooter/SiteFooter.cjs +13 -12
- package/lib/SiteFooter/SiteFooter.mjs +7 -6
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.cjs +28 -26
- package/lib/SiteFooterV2/SiteFooterV2.mjs +15 -13
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +457 -31
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +440 -15
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/Skeleton.cjs +4 -3
- package/lib/Skeleton/Skeleton.mjs +2 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/SkipLink.cjs +5 -4
- package/lib/SkipLink/SkipLink.mjs +4 -3
- package/lib/SkipLink/styles.css +1 -1
- package/lib/Spinner/Spinner.cjs +3 -2
- package/lib/Spinner/Spinner.mjs +3 -2
- package/lib/Spinner/styles.css +1 -1
- package/lib/Surface/Surface.cjs +3 -2
- package/lib/Surface/Surface.mjs +3 -2
- package/lib/Surface/styles.css +1 -1
- package/lib/Switch/Switch.cjs +14 -13
- package/lib/Switch/Switch.mjs +12 -11
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +27 -26
- package/lib/TabbedBanner/TabbedBanner.mjs +23 -22
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/Tabs.cjs +12 -11
- package/lib/Tabs/Tabs.mjs +6 -5
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/Tag.cjs +18 -15
- package/lib/Tag/Tag.mjs +17 -14
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/TemplateBanner.cjs +12 -10
- package/lib/TemplateBanner/TemplateBanner.mjs +12 -10
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/Text.cjs +4 -3
- package/lib/Text/Text.mjs +4 -3
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/TextArea.cjs +12 -62
- package/lib/TextArea/TextArea.mjs +10 -60
- package/lib/TextArea/styles.css +1 -1
- package/lib/TextInput/TextInput.cjs +10 -9
- package/lib/TextInput/TextInput.mjs +10 -9
- package/lib/TextInput/styles.css +1 -1
- package/lib/Theme/Theme.cjs +5 -4
- package/lib/Theme/Theme.mjs +3 -2
- package/lib/Theme/styles.css +1 -1
- package/lib/ThemeIcon/ThemeIcon.cjs +4 -3
- package/lib/ThemeIcon/ThemeIcon.mjs +4 -3
- package/lib/ThemeIcon/styles.css +1 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +12 -11
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +8 -7
- package/lib/ThumbnailSignpost/styles.css +1 -1
- package/lib/Toast/Toast.cjs +12 -9
- package/lib/Toast/Toast.mjs +9 -6
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/Tooltip.cjs +6 -5
- package/lib/Tooltip/Tooltip.mjs +6 -5
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/Truncate.cjs +4 -3
- package/lib/Truncate/Truncate.mjs +2 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/TypographyCard.cjs +13 -11
- package/lib/TypographyCard/TypographyCard.mjs +12 -10
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/UniversalHeader.cjs +7 -6
- package/lib/UniversalHeader/UniversalHeader.mjs +3 -2
- package/lib/UniversalHeader/styles.css +1 -1
- package/lib/VerticalSpace/VerticalSpace.cjs +3 -2
- package/lib/VerticalSpace/VerticalSpace.mjs +3 -2
- package/lib/VerticalSpace/styles.css +1 -1
- package/lib/VideoPlayer/VideoPlayer.cjs +27 -26
- package/lib/VideoPlayer/VideoPlayer.mjs +26 -25
- package/lib/VideoPlayer/styles.css +1 -1
- package/lib/Visible/Visible.cjs +3 -2
- package/lib/Visible/Visible.mjs +3 -2
- package/lib/Visible/styles.css +1 -1
- package/lib/VisuallyHidden/VisuallyHidden.cjs +3 -2
- package/lib/VisuallyHidden/VisuallyHidden.mjs +3 -2
- package/lib/VisuallyHidden/styles.css +1 -1
- package/lib/_shared/cjs/{Avatar-CrUioj_6.cjs → Avatar-CecZTQdk.cjs} +11 -10
- package/lib/_shared/cjs/Badge-DX5PjtiZ.cjs +15 -0
- package/lib/_shared/cjs/BannerImage-qK8-w9rt.cjs +13 -0
- package/lib/_shared/cjs/{Box-COPXU1Jf.cjs → Box-Va2g7Gdp.cjs} +5 -4
- package/lib/_shared/cjs/{BrandLogo-D5wlIFmm.cjs → BrandLogo-coNfTwRv.cjs} +5 -4
- package/lib/_shared/cjs/{Button-uD9mR8w-.cjs → Button-MXE2zSmS.cjs} +9 -8
- package/lib/_shared/cjs/ButtonV2-BJlwsXlN.cjs +58 -0
- package/lib/_shared/cjs/{Calendar-B-va25n2.cjs → Calendar-CFUNKEyb.cjs} +35 -41
- package/lib/_shared/cjs/{CardFooter-ChphRFHe.cjs → CardFooter-BPtRFaCy.cjs} +5 -16
- package/lib/_shared/cjs/{CardHeading-Cl0D1Khp.cjs → CardHeading-1-dcxBUr.cjs} +4 -3
- package/lib/_shared/cjs/CheckboxIcon-B94mtYCX.cjs +52 -0
- package/lib/_shared/cjs/ClientSideVisible-BhW-T6kb.cjs +16 -0
- package/lib/_shared/cjs/{Combination-B-rSVLfT.cjs → Combination-6m6aOXZq.cjs} +9 -9
- package/lib/_shared/cjs/{ContentSwitcherDropdown-U5ZTbJTe.cjs → ContentSwitcherDropdown-BtEnzdMw.cjs} +23 -12
- package/lib/_shared/cjs/{ContentSwitcherList-bCEzIPN2.cjs → ContentSwitcherList-BgAW2IhJ.cjs} +19 -7
- package/lib/_shared/cjs/{DisclosureMini-CtvDxVaG.cjs → DisclosureMini-KEuIc8tE.cjs} +7 -6
- package/lib/_shared/cjs/{Download-CrIytI74.cjs → Download-NY3tbv9Q.cjs} +8 -5
- package/lib/_shared/cjs/{FormControl-BPnKQrCm.cjs → FormControl-DiERJpGW.cjs} +16 -13
- package/lib/_shared/cjs/GridRow-l_SePUqV.cjs +45 -0
- package/lib/_shared/cjs/{Heading-BEMSkLYR.cjs → Heading-CoiZ2EmD.cjs} +7 -8
- package/lib/_shared/cjs/{Hidden-Vsv1-xWO.cjs → Hidden-BN0Q0NpZ.cjs} +4 -3
- package/lib/_shared/cjs/{Icon-CzhyKqMd.cjs → Icon-Dk2XHa7V.cjs} +5 -4
- package/lib/_shared/cjs/{Image-C1pcrfnN.cjs → Image-CSe0KpDN.cjs} +8 -7
- package/lib/_shared/cjs/{Link-7xUgVf1I.cjs → Link-PWpx-rRO.cjs} +13 -10
- package/lib/_shared/cjs/{Popover-C5mmMkYU.cjs → Popover-hpvmhKV8.cjs} +9 -7
- package/lib/_shared/cjs/{ProgressStepper-BL9Y5c4X.cjs → ProgressStepper-DTZQabiV.cjs} +142 -10
- package/lib/_shared/cjs/{Rule-DMQsi2L6.cjs → Rule-jmvOpci7.cjs} +4 -3
- package/lib/_shared/cjs/{Section-wUVdzmGA.cjs → Section-BorWFfNe.cjs} +4 -3
- package/lib/_shared/cjs/SemanticHeading-BPXN_z49.cjs +12 -0
- package/lib/_shared/cjs/Spinner-427lpnHI.cjs +17 -0
- package/lib/_shared/cjs/{Surface-BFx1yNsq.cjs → Surface-DIU5ciDT.cjs} +6 -5
- package/lib/_shared/cjs/{TemplateBanner-CImrJ9ON.cjs → TemplateBanner-BlmWfDQD.cjs} +15 -14
- package/lib/_shared/cjs/{Text-Cr5nmYmx.cjs → Text-jwsn80lQ.cjs} +5 -4
- package/lib/_shared/cjs/{TextInput-ByySubi5.cjs → TextInput-B0JrZhOo.cjs} +13 -12
- package/lib/_shared/cjs/{ThemeIcon-BoxbjTaQ.cjs → ThemeIcon-Def4RZfK.cjs} +5 -4
- package/lib/_shared/cjs/{Tooltip-BPHL0ELI.cjs → Tooltip-CEb7YEP2.cjs} +10 -9
- package/lib/_shared/cjs/{VerticalSpace-BJvST6WP.cjs → VerticalSpace-DLQUYsvc.cjs} +5 -3
- package/lib/_shared/cjs/{Visible-vchtZSfm.cjs → Visible-DZWtZ5qG.cjs} +4 -3
- package/lib/_shared/cjs/VisuallyHidden-CQg3cOVK.cjs +15 -0
- package/lib/_shared/cjs/{arc-breakpoints-DWUgmeLA.cjs → arc-breakpoints-BDA1EnFK.cjs} +11 -1
- package/lib/_shared/cjs/filter-attrs-D19P2s1V.cjs +15 -0
- package/lib/_shared/cjs/{index-Dv1xvB_E.cjs → index-BGGFOAAx.cjs} +1 -1
- package/lib/_shared/cjs/{index-CaO6cOF0.cjs → index-BWfgSvRQ.cjs} +3 -3
- package/lib/_shared/cjs/{index-C_Rl7v2g.cjs → index-CDVpHNP8.cjs} +3 -3
- package/lib/_shared/cjs/{index-EFXw1jWg.cjs → index-CklPiHsS.cjs} +1 -1
- package/lib/_shared/cjs/{index-DAr_oO4-.cjs → index-D9onmVh5.cjs} +2 -2
- package/lib/_shared/cjs/{index-Bt7hfZBc.cjs → index-KrMgv4q_.cjs} +1 -1
- package/lib/_shared/cjs/{index.es-DlNskPlN.cjs → index.es-VcVPUNjD.cjs} +1 -1
- package/lib/_shared/cjs/{filter-attrs-eK6E_34o.cjs → tslib.es6-CCZ3TN_7.cjs} +0 -13
- package/lib/_shared/cjs/use-media-query-DqZqShGX.cjs +58 -0
- package/lib/_shared/esm/{Avatar-Fb1E5MA9.mjs → Avatar-Cyqjgj85.mjs} +6 -5
- package/lib/_shared/esm/{Badge-BZ7E0zcQ.mjs → Badge-C_3PBa0p.mjs} +2 -1
- package/lib/_shared/esm/{BannerImage-BTsixvUH.mjs → BannerImage-CgjgaYkJ.mjs} +2 -2
- package/lib/_shared/esm/{Box-BYm_GTct.mjs → Box-C8iK8x5c.mjs} +3 -2
- package/lib/_shared/esm/{BrandLogo-_2Z_8I2Y.mjs → BrandLogo-Dc-d_8ZN.mjs} +3 -2
- package/lib/_shared/esm/{Button-BxuM3_gz.mjs → Button-BpQQut8P.mjs} +5 -4
- package/lib/_shared/esm/{ButtonV2-DwYBAojW.mjs → ButtonV2-C4a_kkhh.mjs} +16 -13
- package/lib/_shared/esm/{Calendar-Bd2_eT1Y.mjs → Calendar-CFdUlPXh.mjs} +14 -20
- package/lib/_shared/esm/{CardFooter-fsAY4cc6.mjs → CardFooter-BpVSztgE.mjs} +5 -16
- package/lib/_shared/esm/{CardHeading-_setRRjq.mjs → CardHeading-q6k7obu0.mjs} +4 -3
- package/lib/_shared/esm/CheckboxIcon-Bzto2Tke.mjs +50 -0
- package/lib/_shared/esm/ClientSideVisible-D_iBE-3U.mjs +14 -0
- package/lib/_shared/esm/{Combination-BpO6XTeS.mjs → Combination-BQ4XBtF-.mjs} +1 -1
- package/lib/_shared/esm/{ContentSwitcherDropdown-BCkuAfwC.mjs → ContentSwitcherDropdown-DgrN4Bdb.mjs} +21 -10
- package/lib/_shared/esm/{ContentSwitcherList-bCQz0qkU.mjs → ContentSwitcherList-i4m4nAzP.mjs} +15 -4
- package/lib/_shared/esm/{DisclosureMini-B9LzsQC2.mjs → DisclosureMini-ClSe9sSt.mjs} +5 -4
- package/lib/_shared/esm/{Download-DFz_1HCG.mjs → Download-BD8Bigeq.mjs} +8 -5
- package/lib/_shared/esm/{FormControl-CWyrVi1u.mjs → FormControl-Pc1aHUNM.mjs} +13 -10
- package/lib/_shared/esm/{GridRow-Ddt5CtFn.mjs → GridRow-vjacXnq0.mjs} +3 -2
- package/lib/_shared/esm/{Heading-CxHWefi7.mjs → Heading-B9cbwfoz.mjs} +7 -8
- package/lib/_shared/esm/{Hidden-DsrAaC0z.mjs → Hidden-CGRhG3dU.mjs} +2 -1
- package/lib/_shared/esm/{Icon-CcPOJcQm.mjs → Icon-CCUbr_AO.mjs} +3 -2
- package/lib/_shared/esm/{Image-Dl8oH1Rn.mjs → Image-LemsonUX.mjs} +4 -3
- package/lib/_shared/esm/{Link-Biyg9qBH.mjs → Link-ogbR4K3O.mjs} +8 -5
- package/lib/_shared/esm/{Popover-8FfvgL4c.mjs → Popover-D0ePWPz_.mjs} +8 -6
- package/lib/_shared/esm/{ProgressStepper-CLBtBNy2.mjs → ProgressStepper-CujHLQsm.mjs} +137 -5
- package/lib/_shared/esm/{Rule-3gdMHH-R.mjs → Rule-I1w3EaZi.mjs} +3 -2
- package/lib/_shared/esm/{Section-DDygQ5Az.mjs → Section-COc1l3mp.mjs} +4 -3
- package/lib/_shared/esm/SemanticHeading-1tLcSJYD.mjs +10 -0
- package/lib/_shared/esm/{Spinner-Cd7LiPTy.mjs → Spinner-DvngCIwx.mjs} +2 -1
- package/lib/_shared/esm/{Surface-Colbp3Zx.mjs → Surface-C69KVzkY.mjs} +2 -1
- package/lib/_shared/esm/{TemplateBanner-DeHjliNP.mjs → TemplateBanner-DEYOSosH.mjs} +12 -11
- package/lib/_shared/esm/{Text-CBlnm5CT.mjs → Text-BAzOkkzN.mjs} +3 -2
- package/lib/_shared/esm/{TextInput-Dk7qNGoh.mjs → TextInput-CjDG2cIX.mjs} +8 -7
- package/lib/_shared/esm/{ThemeIcon-CN_Ed5b1.mjs → ThemeIcon-B0SruPZC.mjs} +3 -2
- package/lib/_shared/esm/{Tooltip-Dc82Ht7G.mjs → Tooltip-BpSzN3Tx.mjs} +7 -6
- package/lib/_shared/esm/{VerticalSpace-Duhm0zXP.mjs → VerticalSpace-BLWB02I7.mjs} +4 -2
- package/lib/_shared/esm/{Visible-B13QJn7R.mjs → Visible-B0d79VWZ.mjs} +2 -1
- package/lib/_shared/esm/{VisuallyHidden-DqAgoqJo.mjs → VisuallyHidden-aSQ4RA1o.mjs} +2 -1
- package/lib/_shared/esm/arc-breakpoints-Bs-at7wk.mjs +26 -0
- package/lib/_shared/esm/filter-attrs-v_SweZXP.mjs +13 -0
- package/lib/_shared/esm/{index-DLovItWo.mjs → index-BFKdmv_g.mjs} +1 -1
- package/lib/_shared/esm/{index-BDWwJ5x2.mjs → index-BWkI4Dwz.mjs} +1 -1
- package/lib/_shared/esm/{index-J5IHetgg.mjs → index-CN4hP3Wu.mjs} +2 -2
- package/lib/_shared/esm/{index-CxrL7jIX.mjs → index-Do2wfP-X.mjs} +3 -3
- package/lib/_shared/esm/{index-DXTwueLZ.mjs → index-GCEHSsY8.mjs} +1 -1
- package/lib/_shared/esm/{index-BbAu4d3T.mjs → index-u47CK8Y0.mjs} +1 -1
- package/lib/_shared/esm/{index-CYUcQl4W.mjs → index-vnVJe9rH.mjs} +3 -3
- package/lib/_shared/esm/{index.es-C3WqfFKH.mjs → index.es-tyrXzvpp.mjs} +2 -2
- package/lib/_shared/esm/{filter-attrs-B6CM-NUr.mjs → tslib.es6-w7hdJ3oZ.mjs} +1 -13
- package/lib/_shared/esm/use-media-query-BmsMeo2M.mjs +56 -0
- package/lib/index.cjs +1244 -999
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +349 -142
- package/lib/index.d.mts +349 -142
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1244 -1001
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +6 -14
- package/lib/use-media-query/use-media-query.cjs +1 -1
- package/lib/use-media-query/use-media-query.mjs +1 -1
- package/package.json +9 -8
- package/lib/_shared/cjs/Badge-CQVEPH9v.cjs +0 -14
- package/lib/_shared/cjs/BannerImage-kdAKagG-.cjs +0 -13
- package/lib/_shared/cjs/BreadcrumbsLink-CDmk3Y3m.cjs +0 -18
- package/lib/_shared/cjs/ButtonV2-Bta5SVVY.cjs +0 -55
- package/lib/_shared/cjs/Checkbox-DfZMjO1Y.cjs +0 -88
- package/lib/_shared/cjs/ComboBox-BGUhlqx1.cjs +0 -281
- package/lib/_shared/cjs/ContentSwitcherTab-B387Qs3I.cjs +0 -14
- package/lib/_shared/cjs/DatePicker-Dt4faA_N.cjs +0 -334
- package/lib/_shared/cjs/GridRow-BW2ZGtND.cjs +0 -44
- package/lib/_shared/cjs/HeroButton-CrzkTUwP.cjs +0 -82
- package/lib/_shared/cjs/MediaCard-BEZFbiYO.cjs +0 -57
- package/lib/_shared/cjs/MenuItemMultiLevelContent-vLr6hSBm.cjs +0 -1328
- package/lib/_shared/cjs/ProgressStepperOverflow-BAGZNC26.cjs +0 -142
- package/lib/_shared/cjs/RadioCardGroupInput-CeUM3yPS.cjs +0 -53
- package/lib/_shared/cjs/RadioGroupInput-w2qkfsnG.cjs +0 -54
- package/lib/_shared/cjs/SiteHeaderV2NavItemWithSubNav-CagFKPEa.cjs +0 -445
- package/lib/_shared/cjs/Spinner-bbrOwxv2.cjs +0 -16
- package/lib/_shared/cjs/VisuallyHidden-B4XCvPYP.cjs +0 -14
- package/lib/_shared/cjs/index-CqYNiqix.cjs +0 -137
- package/lib/_shared/cjs/kebabCase-D5yA6u-V.cjs +0 -743
- package/lib/_shared/cjs/keynames-Cx13-hWr.cjs +0 -8
- package/lib/_shared/cjs/use-media-query-BsUfHjPZ.cjs +0 -41
- package/lib/_shared/esm/BreadcrumbsLink-BxTurGNa.mjs +0 -16
- package/lib/_shared/esm/Checkbox-CwOHzlQF.mjs +0 -86
- package/lib/_shared/esm/ComboBox-CRlJjeev.mjs +0 -279
- package/lib/_shared/esm/ContentSwitcherTab-CfC3PGeZ.mjs +0 -12
- package/lib/_shared/esm/DatePicker-DT4OEzxP.mjs +0 -324
- package/lib/_shared/esm/HeroButton-jdjjV_Gf.mjs +0 -80
- package/lib/_shared/esm/MediaCard-DqMaNWsE.mjs +0 -55
- package/lib/_shared/esm/MenuItemMultiLevelContent-JTOHqpzg.mjs +0 -1296
- package/lib/_shared/esm/ProgressStepperOverflow-fPkLltVO.mjs +0 -140
- package/lib/_shared/esm/RadioCardGroupInput-D7W28geB.mjs +0 -50
- package/lib/_shared/esm/RadioGroupInput-zAWSV29m.mjs +0 -50
- package/lib/_shared/esm/SiteHeaderV2NavItemWithSubNav-CxGwdV6u.mjs +0 -439
- package/lib/_shared/esm/arc-breakpoints-D5hR5m3t.mjs +0 -21
- package/lib/_shared/esm/index-CL6dwOYV.mjs +0 -135
- package/lib/_shared/esm/kebabCase-CCEMRBfd.mjs +0 -737
- package/lib/_shared/esm/keynames-B5whqsjh.mjs +0 -8
- package/lib/_shared/esm/use-media-query-DmKuIDEM.mjs +0 -39
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var debounce = require('./debounce-uPMetQ6J.cjs');
|
|
6
|
-
var ProgressStepper = require('./ProgressStepper-BL9Y5c4X.cjs');
|
|
7
|
-
|
|
8
|
-
/** Use `ProgressStepperOverflow` to wrap `ProgressStepperItem`s and allow overflow behaviour. */
|
|
9
|
-
var ProgressStepperOverflow = React.forwardRef(function (_a, stepperRef) {
|
|
10
|
-
var children = _a.children, onIndexChange = _a.onIndexChange, onLoadStep = _a.onLoadStep, size = _a.size, invertLabelPosition = _a.invertLabelPosition, _b = _a.offsetLeft, offsetLeft = _b === void 0 ? 24 : _b, props = filterAttrs.__rest(_a, ["children", "onIndexChange", "onLoadStep", "size", "invertLabelPosition", "offsetLeft"]);
|
|
11
|
-
var _c = React.useState(onLoadStep ? onLoadStep : 0), activeIndex = _c[0], setActiveIndex = _c[1];
|
|
12
|
-
var _d = React.useState(0), closestScrolledIndex = _d[0], setClosestScrolledIndex = _d[1];
|
|
13
|
-
var _e = React.useState(true), lastStepVisible = _e[0], setLastStepVisible = _e[1];
|
|
14
|
-
var containerRef = React.useRef(null);
|
|
15
|
-
React.useImperativeHandle(stepperRef, function () { return ({
|
|
16
|
-
handleStepScroll: handleStepScroll,
|
|
17
|
-
scrollToStep: scrollToStep,
|
|
18
|
-
handleViewScroll: handleViewScroll,
|
|
19
|
-
isLastChildVisible: isLastChildVisible,
|
|
20
|
-
}); });
|
|
21
|
-
// Add Horizontal Scroll Event Listener
|
|
22
|
-
React.useEffect(function () {
|
|
23
|
-
var _a, _b;
|
|
24
|
-
var checkClosest = debounce.debounce(function () {
|
|
25
|
-
var closestIndex = findClosestIndex();
|
|
26
|
-
setClosestScrolledIndex(closestIndex);
|
|
27
|
-
}, 100);
|
|
28
|
-
var checkLastChild = debounce.debounce(function () {
|
|
29
|
-
var lastVisible = isLastChildVisible();
|
|
30
|
-
if (lastVisible) {
|
|
31
|
-
setLastStepVisible(true);
|
|
32
|
-
}
|
|
33
|
-
else
|
|
34
|
-
setLastStepVisible(false);
|
|
35
|
-
}, 100);
|
|
36
|
-
(_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", checkLastChild);
|
|
37
|
-
(_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener("scroll", checkClosest);
|
|
38
|
-
return function () {
|
|
39
|
-
var _a;
|
|
40
|
-
(_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", checkClosest);
|
|
41
|
-
checkLastChild.cancel();
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
|
-
// Scroll to activeIndex
|
|
45
|
-
React.useEffect(function () {
|
|
46
|
-
scrollTo();
|
|
47
|
-
}, [activeIndex]);
|
|
48
|
-
// Exposing changes in activeIndex outside of component
|
|
49
|
-
React.useEffect(function () {
|
|
50
|
-
onIndexChange === null || onIndexChange === void 0 ? void 0 : onIndexChange(closestScrolledIndex);
|
|
51
|
-
isLastChildVisible();
|
|
52
|
-
}, [closestScrolledIndex, onIndexChange, lastStepVisible]);
|
|
53
|
-
// helper functions - start
|
|
54
|
-
var getProgressStepper = function () { var _a; return (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.firstChild; };
|
|
55
|
-
var getStepChildren = function () {
|
|
56
|
-
var _a;
|
|
57
|
-
return Array.from(((_a = getProgressStepper()) === null || _a === void 0 ? void 0 : _a.children) || []);
|
|
58
|
-
};
|
|
59
|
-
var getLeftRects = function (children) {
|
|
60
|
-
var container = getProgressStepper();
|
|
61
|
-
if (!container)
|
|
62
|
-
return [];
|
|
63
|
-
var parentRect = container.getBoundingClientRect();
|
|
64
|
-
return children.map(function (child) {
|
|
65
|
-
var childRect = child.getBoundingClientRect();
|
|
66
|
-
return {
|
|
67
|
-
left: childRect.left - parentRect.left,
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
var indexOfClosest = function (values) {
|
|
72
|
-
return values.indexOf(Math.min.apply(Math, values));
|
|
73
|
-
};
|
|
74
|
-
// helper functions - end
|
|
75
|
-
var isLastChildVisible = function () {
|
|
76
|
-
var _a;
|
|
77
|
-
var steps = getStepChildren();
|
|
78
|
-
var lastStep = steps[steps.length - 1];
|
|
79
|
-
var rect = lastStep.getBoundingClientRect();
|
|
80
|
-
var containerRect = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
81
|
-
return rect.right <= containerRect.right;
|
|
82
|
-
};
|
|
83
|
-
// Used for onScroll function of scrolling without buttons
|
|
84
|
-
var findClosestIndex = function () {
|
|
85
|
-
var _a, _b;
|
|
86
|
-
var children = getStepChildren();
|
|
87
|
-
var scrolledAmount = (_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft) !== null && _b !== void 0 ? _b : 0;
|
|
88
|
-
// compare the scrolled amount to the intial left edge distance for each step
|
|
89
|
-
var getScrollDistances = function (children, scrolledAmount) {
|
|
90
|
-
return getLeftRects(children).map(function (rect) {
|
|
91
|
-
return Math.abs(scrolledAmount - rect.left);
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
var closestIndex = indexOfClosest(getScrollDistances(children, scrolledAmount));
|
|
95
|
-
return closestIndex;
|
|
96
|
-
};
|
|
97
|
-
// Scroll active step to the far left of the page
|
|
98
|
-
var scrollTo = function () {
|
|
99
|
-
var _a, _b;
|
|
100
|
-
var activeStep = (_a = getProgressStepper()) === null || _a === void 0 ? void 0 : _a.children[activeIndex];
|
|
101
|
-
if (activeStep) {
|
|
102
|
-
(_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo({
|
|
103
|
-
left: activeStep.offsetLeft - offsetLeft,
|
|
104
|
-
behavior: "smooth",
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
var handleStepScroll = function (increment) {
|
|
109
|
-
// Account for any manual scrolling set closest index to active index
|
|
110
|
-
setActiveIndex(closestScrolledIndex);
|
|
111
|
-
var newIndex = closestScrolledIndex + increment;
|
|
112
|
-
setActiveIndex(newIndex);
|
|
113
|
-
// If clicking backwards to include half visible step
|
|
114
|
-
if (closestScrolledIndex + increment === activeIndex) {
|
|
115
|
-
scrollTo();
|
|
116
|
-
}
|
|
117
|
-
if (closestScrolledIndex + increment < 0) {
|
|
118
|
-
setActiveIndex(0);
|
|
119
|
-
scrollTo();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
// Used to scroll by Parent width
|
|
123
|
-
var handleViewScroll = function (direction) {
|
|
124
|
-
var _a;
|
|
125
|
-
var clientWidth = ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) || 0;
|
|
126
|
-
var stepper = containerRef.current;
|
|
127
|
-
if (!stepper)
|
|
128
|
-
return;
|
|
129
|
-
stepper.scrollBy({
|
|
130
|
-
left: direction ? clientWidth : -clientWidth,
|
|
131
|
-
behavior: "smooth",
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
// Used to set a specific step to jump to on a button click
|
|
135
|
-
var scrollToStep = function (step) {
|
|
136
|
-
setActiveIndex(step);
|
|
137
|
-
};
|
|
138
|
-
return (React.createElement("div", filterAttrs.__assign({ ref: containerRef, className: "arc-ProgressStepperOverflow", style: { paddingLeft: offsetLeft } }, filterAttrs.filterAttrs(props)),
|
|
139
|
-
React.createElement(ProgressStepper.ProgressStepper, { size: size, invertLabelPosition: invertLabelPosition, isFluid: false }, children)));
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
exports.ProgressStepperOverflow = ProgressStepperOverflow;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var index = require('./index-CTlXMLug.cjs');
|
|
6
|
-
var capitaliseFirstLetter = require('./capitalise-first-letter-CdhexpSx.cjs');
|
|
7
|
-
var Surface = require('./Surface-BFx1yNsq.cjs');
|
|
8
|
-
var Icon = require('./Icon-CzhyKqMd.cjs');
|
|
9
|
-
|
|
10
|
-
var RadioContext = React.createContext({});
|
|
11
|
-
var Provider = RadioContext.Provider;
|
|
12
|
-
var useRadioContext = function () {
|
|
13
|
-
var context = React.useContext(RadioContext);
|
|
14
|
-
return context;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var RadioCard = React.forwardRef(function (_a, ref) {
|
|
18
|
-
var id = _a.id, icon = _a.icon, label = _a.label, support = _a.support, isDisabled = _a.isDisabled, checked = _a.checked, defaultChecked = _a.defaultChecked, changeEvent = _a.changeEvent, name = _a.name, blurEvent = _a.blurEvent, value = _a.value, children = _a.children, _b = _a.controlLocation, controlLocation = _b === void 0 ? "right" : _b, _c = _a.hideButton, hideButton = _c === void 0 ? false : _c;
|
|
19
|
-
var surface = React.useContext(Surface.Context).surface;
|
|
20
|
-
var idLabel = "".concat(id, "-label");
|
|
21
|
-
return (React.createElement("div", { className: index.classNames("arc-RadioCard", {
|
|
22
|
-
"arc-RadioCard--isDisabled": isDisabled,
|
|
23
|
-
"arc-RadioCard--onDarkSurface": surface === "dark",
|
|
24
|
-
"arc-RadioCard--isSelected": checked,
|
|
25
|
-
}) },
|
|
26
|
-
React.createElement("label", { id: idLabel, htmlFor: id },
|
|
27
|
-
React.createElement("input", { className: "arc-RadioCard-input", id: id, checked: checked, defaultChecked: defaultChecked, disabled: isDisabled, onChange: changeEvent, onBlur: blurEvent, name: name, ref: ref, type: "radio", value: value, "aria-checked": checked }),
|
|
28
|
-
React.createElement("div", { className: "arc-RadioCard-inner arc-RadioCard--control".concat(capitaliseFirstLetter.capitaliseFirstLetter(controlLocation)) },
|
|
29
|
-
icon && (React.createElement("div", { className: "arc-RadioCard-icon" },
|
|
30
|
-
React.createElement(Icon.Icon, { icon: icon, size: 24 }))),
|
|
31
|
-
React.createElement("div", { className: "arc-RadioCard-content" },
|
|
32
|
-
React.createElement("span", { className: "arc-RadioCard-label" }, label),
|
|
33
|
-
support && (React.createElement("span", { className: "arc-RadioCard-support" }, support))),
|
|
34
|
-
children && (React.createElement("div", { className: "arc-RadioCard-customContent" }, children)),
|
|
35
|
-
!hideButton && (React.createElement("div", { className: index.classNames("arc-RadioCard-radioIcon", {
|
|
36
|
-
"arc-RadioCard-radioIcon--isSelected": checked,
|
|
37
|
-
}) }))))));
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Radio Card component.
|
|
42
|
-
*/
|
|
43
|
-
var RadioCardGroupInput = React.forwardRef(function (_a, ref) {
|
|
44
|
-
var icon = _a.icon, support = _a.support, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, value = _a.value, children = _a.children, controlLocation = _a.controlLocation, hideButton = _a.hideButton, props = filterAttrs.__rest(_a, ["icon", "support", "id", "isDisabled", "label", "value", "children", "controlLocation", "hideButton"]);
|
|
45
|
-
var _b = useRadioContext(), name = _b.name, changeEvent = _b.changeEvent, checkedValue = _b.checkedValue, groupDisabled = _b.groupDisabled;
|
|
46
|
-
var isChecked = checkedValue === value ? true : false;
|
|
47
|
-
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
48
|
-
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
49
|
-
return (React.createElement(RadioCard, filterAttrs.__assign({ icon: icon, ref: ref, id: id, support: support, label: label, name: name, defaultChecked: defaultChecked, checked: checked, changeEvent: changeEvent, value: value, isDisabled: isDisabled || groupDisabled, controlLocation: controlLocation, hideButton: hideButton }, props), children));
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
exports.Provider = Provider;
|
|
53
|
-
exports.RadioCardGroupInput = RadioCardGroupInput;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var index = require('./index-CTlXMLug.cjs');
|
|
6
|
-
var Surface = require('./Surface-BFx1yNsq.cjs');
|
|
7
|
-
var VisuallyHidden = require('./VisuallyHidden-B4XCvPYP.cjs');
|
|
8
|
-
|
|
9
|
-
var RadioContext = React.createContext({});
|
|
10
|
-
var Provider = RadioContext.Provider;
|
|
11
|
-
var useRadioContext = function () {
|
|
12
|
-
var context = React.useContext(RadioContext);
|
|
13
|
-
return context;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var RadioGroupButton = React.forwardRef(function (_a, ref) {
|
|
17
|
-
var id = _a.id, changeEvent = _a.changeEvent, isDisabled = _a.isDisabled, size = _a.size, labelSize = _a.labelSize, checked = _a.checked, defaultChecked = _a.defaultChecked, radioButtonAlignment = _a.radioButtonAlignment, name = _a.name, blurEvent = _a.blurEvent, value = _a.value, label = _a.label, helper = _a.helper, hideLabel = _a.hideLabel, withMargin = _a.withMargin;
|
|
18
|
-
var surface = React.useContext(Surface.Context).surface;
|
|
19
|
-
var idLabel = "".concat(id, "-label");
|
|
20
|
-
return (React.createElement("div", { className: index.classNames({
|
|
21
|
-
"arc-RadioGroupButton": true,
|
|
22
|
-
"arc-RadioGroupButton--withMargin": withMargin,
|
|
23
|
-
"arc-RadioGroupButton--withMarginSmall": withMargin && size === "s",
|
|
24
|
-
"arc-RadioGroupButton--disabled": isDisabled,
|
|
25
|
-
"arc-RadioGroupButton--small": size === "s",
|
|
26
|
-
"arc-RadioGroupButton--smallLabel": labelSize === "s",
|
|
27
|
-
"arc-RadioGroupButton--onDarkSurface": surface === "dark",
|
|
28
|
-
}) },
|
|
29
|
-
React.createElement("label", { className: index.classNames("arc-RadioGroupButton-label", {
|
|
30
|
-
"arc-RadioGroupButton-label--alignTop": radioButtonAlignment === "top",
|
|
31
|
-
}), htmlFor: id, id: idLabel },
|
|
32
|
-
React.createElement("input", { className: "arc-RadioGroupButton-input", checked: checked, defaultChecked: defaultChecked, disabled: isDisabled, id: id, name: name, onBlur: blurEvent, onChange: changeEvent, ref: ref, type: "radio", value: value, "aria-checked": checked }),
|
|
33
|
-
React.createElement("span", { className: index.classNames({
|
|
34
|
-
"arc-RadioGroupButton-label--marginTop": radioButtonAlignment === "top",
|
|
35
|
-
}) },
|
|
36
|
-
hideLabel ? React.createElement(VisuallyHidden.VisuallyHidden, null, label) : label,
|
|
37
|
-
helper && (React.createElement("span", { className: "arc-RadioGroupButton-helper" }, helper))))));
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Radio Button component.
|
|
42
|
-
*/
|
|
43
|
-
var RadioGroupInput = React.forwardRef(function (_a, ref) {
|
|
44
|
-
var helper = _a.helper, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, _b = _a.radioButtonAlignment, radioButtonAlignment = _b === void 0 ? "center" : _b, value = _a.value, props = filterAttrs.__rest(_a, ["helper", "id", "isDisabled", "label", "radioButtonAlignment", "value"]);
|
|
45
|
-
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, name = _c.name, size = _c.size;
|
|
46
|
-
var isChecked = checkedValue === value ? true : false;
|
|
47
|
-
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
48
|
-
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
49
|
-
return (React.createElement(RadioGroupButton, filterAttrs.__assign({ withMargin: true, ref: ref, id: id, name: name, helper: helper, isDisabled: isDisabled || groupDisabled, size: size, radioButtonAlignment: radioButtonAlignment, label: label, defaultChecked: defaultChecked, checked: checked, changeEvent: changeEvent, blurEvent: blurEvent, value: value }, props)));
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
exports.Provider = Provider;
|
|
53
|
-
exports.RadioGroupButton = RadioGroupButton;
|
|
54
|
-
exports.RadioGroupInput = RadioGroupInput;
|