@arc-ui/components 12.0.0 → 13.0.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/lib/Alert/styles.css +1 -1
- package/lib/Align/styles.css +1 -1
- package/lib/AppButton/styles.css +1 -1
- package/lib/Avatar/styles.css +1 -1
- package/lib/AvatarGroup/styles.css +1 -1
- package/lib/Badge/styles.css +1 -1
- package/lib/Banner/Banner.cjs +3 -3
- package/lib/Banner/Banner.mjs +3 -3
- package/lib/Box/styles.css +1 -1
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs +7 -7
- package/lib/Breadcrumbs/Breadcrumbs.mjs +7 -7
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/Button.cjs +1 -1
- package/lib/Button/Button.mjs +1 -1
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/ButtonGroup.cjs +6 -3
- package/lib/ButtonGroup/ButtonGroup.mjs +6 -3
- package/lib/ButtonGroup/styles.css +1 -1
- package/lib/ButtonV2/ButtonV2.cjs +1 -1
- package/lib/ButtonV2/ButtonV2.mjs +1 -1
- package/lib/ButtonV2/styles.css +1 -1
- package/lib/Calendar/Calendar.cjs +6 -6
- package/lib/Calendar/Calendar.mjs +6 -6
- package/lib/Calendar/styles.css +1 -1
- package/lib/CardFooter/styles.css +1 -1
- package/lib/CardHeading/CardHeading.cjs +1 -1
- package/lib/CardHeading/CardHeading.mjs +1 -1
- package/lib/CardHeading/styles.css +1 -1
- package/lib/Carousel/Carousel.cjs +348 -8
- package/lib/Carousel/Carousel.mjs +348 -8
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/Checkbox.cjs +7 -7
- package/lib/Checkbox/Checkbox.mjs +8 -8
- package/lib/Checkbox/styles.css +1 -1
- package/lib/CheckboxIcon/CheckboxIcon.cjs +1 -1
- package/lib/CheckboxIcon/CheckboxIcon.mjs +1 -1
- package/lib/CheckboxIcon/styles.css +1 -1
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/ComboBox.cjs +13 -13
- package/lib/ComboBox/ComboBox.mjs +14 -14
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.cjs +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.mjs +4 -4
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +7 -7
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +7 -7
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +18 -18
- package/lib/DatePicker/DatePicker.mjs +19 -19
- package/lib/DatePicker/styles.css +1 -1
- package/lib/Disclosure/styles.css +1 -1
- package/lib/DisclosureMini/styles.css +1 -1
- package/lib/Download/styles.css +1 -1
- package/lib/Drawer/Drawer.cjs +36 -28
- package/lib/Drawer/Drawer.mjs +36 -28
- package/lib/Drawer/styles.css +1 -1
- package/lib/Elevation/styles.css +1 -1
- package/lib/Filter/styles.css +1 -1
- package/lib/FormControl/styles.css +1 -1
- package/lib/GhostedHeroBanner/GhostedHeroBanner.cjs +2 -2
- package/lib/GhostedHeroBanner/GhostedHeroBanner.mjs +2 -2
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientPageBackground/GradientPageBackground.cjs +3 -3
- package/lib/GradientPageBackground/GradientPageBackground.mjs +3 -3
- package/lib/GradientPageBackground/styles.css +1 -1
- package/lib/Grid/styles.css +1 -1
- package/lib/Group/styles.css +1 -1
- package/lib/Heading/styles.css +1 -1
- package/lib/HeroBanner/HeroBanner.cjs +3 -3
- package/lib/HeroBanner/HeroBanner.mjs +3 -3
- package/lib/HeroBanner/styles.css +1 -1
- package/lib/HeroButton/HeroButton.cjs +3 -3
- package/lib/HeroButton/HeroButton.mjs +4 -4
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/styles.css +1 -1
- package/lib/HorizontalCard/HorizontalCard.cjs +1 -1
- package/lib/HorizontalCard/HorizontalCard.mjs +1 -1
- package/lib/HorizontalCard/styles.css +1 -1
- package/lib/Icon/styles.css +1 -1
- package/lib/Image/styles.css +1 -1
- package/lib/ImpactCard/ImpactCard.cjs +4 -4
- package/lib/ImpactCard/ImpactCard.mjs +4 -4
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +7 -7
- package/lib/InformationCard/InformationCard.mjs +7 -7
- package/lib/InformationCard/styles.css +1 -1
- package/lib/Link/styles.css +1 -1
- package/lib/Markup/styles.css +1 -1
- package/lib/MediaCard/MediaCard.cjs +5 -5
- package/lib/MediaCard/MediaCard.mjs +5 -5
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/Menu.cjs +17 -16
- package/lib/Menu/Menu.mjs +17 -16
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/Modal.cjs +7 -7
- package/lib/Modal/Modal.mjs +7 -7
- package/lib/Modal/styles.css +1 -1
- package/lib/NavigationHeader/NavigationHeader.cjs +38 -50
- package/lib/NavigationHeader/NavigationHeader.mjs +39 -51
- package/lib/NavigationHeader/styles.css +1 -1
- package/lib/Pagination/styles.css +1 -1
- package/lib/PaginationSimple/styles.css +1 -1
- package/lib/Popover/Popover.cjs +7 -7
- package/lib/Popover/Popover.mjs +7 -7
- package/lib/Popover/styles.css +1 -1
- package/lib/Poster/styles.css +1 -1
- package/lib/ProgressBar/ProgressBar.cjs +2 -2
- package/lib/ProgressBar/ProgressBar.mjs +2 -2
- package/lib/ProgressBar/styles.css +1 -1
- package/lib/ProgressStepper/ProgressStepper.cjs +2 -2
- package/lib/ProgressStepper/ProgressStepper.mjs +2 -2
- package/lib/ProgressStepper/styles.css +1 -1
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.cjs +76 -121
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.mjs +77 -123
- package/lib/ProgressStepperOverflow/styles.css +1 -1
- package/lib/RadioCardGroup/RadioCardGroup.cjs +12 -8
- package/lib/RadioCardGroup/RadioCardGroup.mjs +12 -8
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/RadioGroup.cjs +6 -6
- package/lib/RadioGroup/RadioGroup.mjs +7 -7
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/Rule.cjs +1 -1
- package/lib/Rule/Rule.mjs +1 -1
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/ScrollToTop.cjs +1 -1
- package/lib/ScrollToTop/ScrollToTop.mjs +1 -1
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/styles.css +1 -1
- package/lib/Select/Select.cjs +6 -6
- package/lib/Select/Select.mjs +6 -6
- package/lib/Select/styles.css +1 -1
- package/lib/SemanticHeading/styles.css +1 -1
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.cjs +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.mjs +1 -1
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +13 -9
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +13 -9
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/SkipLink.cjs +2 -2
- package/lib/SkipLink/SkipLink.mjs +3 -3
- package/lib/SkipLink/styles.css +1 -1
- package/lib/Spinner/styles.css +1 -1
- package/lib/Surface/styles.css +1 -1
- package/lib/Switch/Switch.mjs +1 -1
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +9 -9
- package/lib/TabbedBanner/TabbedBanner.mjs +12 -12
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/Tabs.mjs +3 -3
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/TemplateBanner.cjs +1 -1
- package/lib/TemplateBanner/TemplateBanner.mjs +1 -1
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/TextArea.cjs +3 -3
- package/lib/TextArea/TextArea.mjs +4 -4
- package/lib/TextArea/styles.css +1 -1
- package/lib/TextInput/TextInput.cjs +4 -4
- package/lib/TextInput/TextInput.mjs +4 -4
- package/lib/TextInput/styles.css +1 -1
- package/lib/Theme/Theme.cjs +1 -1
- package/lib/Theme/Theme.mjs +1 -1
- package/lib/Theme/styles.css +1 -1
- package/lib/ThemeIcon/styles.css +1 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +1 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +1 -1
- package/lib/ThumbnailSignpost/styles.css +1 -1
- package/lib/Toast/Toast.mjs +2 -2
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/Tooltip.cjs +3 -3
- package/lib/Tooltip/Tooltip.mjs +3 -3
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/TypographyCard.cjs +4 -4
- package/lib/TypographyCard/TypographyCard.mjs +4 -4
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/styles.css +1 -1
- package/lib/VerticalSpace/styles.css +1 -1
- package/lib/VideoPlayer/VideoPlayer.cjs +3 -3
- package/lib/VideoPlayer/VideoPlayer.mjs +3 -3
- package/lib/VideoPlayer/styles.css +1 -1
- package/lib/Visible/styles.css +1 -1
- package/lib/VisuallyHidden/styles.css +1 -1
- package/lib/_shared/cjs/{Button-BN4jUsg5.cjs → Button-CrevzrTg.cjs} +3 -3
- package/lib/_shared/cjs/{ButtonV2-bUu36xW8.cjs → ButtonV2-CxyploaQ.cjs} +3 -3
- package/lib/_shared/cjs/{Calendar-BvPNEvfm.cjs → Calendar-CdLn9iv6.cjs} +7 -7
- package/lib/_shared/cjs/{CardHeading-lGy1u6eD.cjs → CardHeading-C84m67_F.cjs} +2 -2
- package/lib/_shared/cjs/{CheckboxIcon-BTkdXfpp.cjs → CheckboxIcon-BzY1S_ud.cjs} +6 -5
- package/lib/_shared/cjs/{Combination-6m6aOXZq.cjs → Combination-Cm62lfyr.cjs} +1 -1
- package/lib/_shared/cjs/{ContentSwitcherDropdown-BLXyhXVS.cjs → ContentSwitcherDropdown-6IGRpV54.cjs} +2 -2
- package/lib/_shared/cjs/{ContentSwitcherList-BgAW2IhJ.cjs → ContentSwitcherList-Di7RS8ue.cjs} +28 -17
- package/lib/_shared/cjs/{Popover-CYcqjefw.cjs → Popover-BtvRErpC.cjs} +7 -4
- package/lib/_shared/cjs/{ProgressStepper-DTZQabiV.cjs → ProgressStepper-Cs6vX7Th.cjs} +19 -18
- package/lib/_shared/cjs/{Rule-jmvOpci7.cjs → Rule-essaguo_.cjs} +2 -2
- package/lib/_shared/cjs/{TemplateBanner-CzDAL0lq.cjs → TemplateBanner-DyXBKuMw.cjs} +2 -2
- package/lib/_shared/cjs/{TextInput-BHzuoI7E.cjs → TextInput-C_K2PLf5.cjs} +6 -6
- package/lib/_shared/cjs/{Tooltip-CEb7YEP2.cjs → Tooltip-CdmWvrnr.cjs} +2 -2
- package/lib/_shared/cjs/{arc-breakpoints-Cl4-g1TC.cjs → arc-breakpoints-uADxN-b4.cjs} +1 -1
- package/lib/_shared/cjs/{index-BGGFOAAx.cjs → index-BBDa9gnQ.cjs} +2 -2
- package/lib/_shared/cjs/{index-D9onmVh5.cjs → index-BDUrOKEW.cjs} +3 -3
- package/lib/_shared/cjs/{index-CklPiHsS.cjs → index-B_WZUATb.cjs} +2 -2
- package/lib/_shared/cjs/{index-B11wQrRa.cjs → index-BdJeAKfz.cjs} +1 -1
- package/lib/_shared/cjs/{index-CDVpHNP8.cjs → index-Dgn0408w.cjs} +4 -4
- package/lib/_shared/cjs/{index-DXNM3D1d.cjs → index-DlWZZNwu.cjs} +2 -2
- package/lib/_shared/cjs/{index-BWfgSvRQ.cjs → index-DsqYRMfM.cjs} +4 -4
- package/lib/_shared/cjs/{index-KrMgv4q_.cjs → index-WO7l1Mfx.cjs} +3 -3
- package/lib/_shared/cjs/{index.es-Dbvw_3_e.cjs → index.es-BAsay4oe.cjs} +1 -1
- package/lib/_shared/cjs/{use-media-query-DqZqShGX.cjs → use-media-query-BJV2IbHi.cjs} +4 -4
- package/lib/_shared/esm/{Button-DTiOFT9M.mjs → Button-Benn9Qop.mjs} +4 -4
- package/lib/_shared/esm/{ButtonV2-ByW5P8Hq.mjs → ButtonV2-CgjYgfZA.mjs} +4 -4
- package/lib/_shared/esm/{Calendar-DzsQqJlh.mjs → Calendar-CzFIMyD1.mjs} +8 -8
- package/lib/_shared/esm/{CardHeading-CfPEEmBO.mjs → CardHeading-CV14vmox.mjs} +2 -2
- package/lib/_shared/esm/{CheckboxIcon-BcVQe6mC.mjs → CheckboxIcon-CzRn1j8X.mjs} +6 -5
- package/lib/_shared/esm/{Combination-BQ4XBtF-.mjs → Combination-BW0YAEZD.mjs} +1 -1
- package/lib/_shared/esm/{ContentSwitcherDropdown-ckPG4pry.mjs → ContentSwitcherDropdown-CwoMd63a.mjs} +2 -2
- package/lib/_shared/esm/{ContentSwitcherList-i4m4nAzP.mjs → ContentSwitcherList-Bvp9Zl85.mjs} +30 -19
- package/lib/_shared/esm/{Popover-BHCEpLSa.mjs → Popover-DRQSgAog.mjs} +7 -4
- package/lib/_shared/esm/{ProgressStepper-CujHLQsm.mjs → ProgressStepper-DTPHHVFe.mjs} +20 -19
- package/lib/_shared/esm/{Rule-I1w3EaZi.mjs → Rule-Bz3QPezk.mjs} +3 -3
- package/lib/_shared/esm/{TemplateBanner-CZSTdma0.mjs → TemplateBanner-BPzuH5bz.mjs} +2 -2
- package/lib/_shared/esm/{TextInput-CZaNXVHl.mjs → TextInput-BCvKXfM_.mjs} +8 -8
- package/lib/_shared/esm/{Tooltip-BpSzN3Tx.mjs → Tooltip-DY8nS1to.mjs} +2 -2
- package/lib/_shared/esm/{arc-breakpoints-Br78xe-f.mjs → arc-breakpoints-ChQgbftE.mjs} +1 -1
- package/lib/_shared/esm/{index-u47CK8Y0.mjs → index-B3ewsmrD.mjs} +2 -2
- package/lib/_shared/esm/{index-GCEHSsY8.mjs → index-BMmvMegf.mjs} +2 -2
- package/lib/_shared/esm/{index-DXHprNQ6.mjs → index-C_mwuZg6.mjs} +1 -1
- package/lib/_shared/esm/{index-BWkI4Dwz.mjs → index-CfXVJXLq.mjs} +3 -3
- package/lib/_shared/esm/{index-CWHcEz3_.mjs → index-Cgsjp3NL.mjs} +1 -1
- package/lib/_shared/esm/{index-CN4hP3Wu.mjs → index-CjeQnMcn.mjs} +3 -3
- package/lib/_shared/esm/{index-BFKdmv_g.mjs → index-DNvlT7G_.mjs} +3 -3
- package/lib/_shared/esm/{index-Do2wfP-X.mjs → index-Dd3yZ_Kk.mjs} +4 -4
- package/lib/_shared/esm/{index-vnVJe9rH.mjs → index-Dfz5UgHo.mjs} +4 -4
- package/lib/_shared/esm/{index-Bz2JQq34.mjs → index-DkAfUbDx.mjs} +2 -2
- package/lib/_shared/esm/{index-6HtUz28p.mjs → index-Drb5ngQr.mjs} +1 -1
- package/lib/_shared/esm/{index.es-f0R-yhhl.mjs → index.es-99J0r2va.mjs} +2 -2
- package/lib/_shared/esm/{use-media-query-BmsMeo2M.mjs → use-media-query-l6Sou0dd.mjs} +4 -4
- package/lib/index.cjs +662 -346
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +1063 -328
- package/lib/index.d.mts +1063 -328
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +663 -348
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +2 -2
- 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 +14 -12
- package/lib/_shared/cjs/capitalise-first-letter-CdhexpSx.cjs +0 -8
- package/lib/_shared/esm/capitalise-first-letter-Cubg2CS1.mjs +0 -6
package/lib/index.cjs
CHANGED
|
@@ -867,7 +867,7 @@ var BannerRow = function (_a) {
|
|
|
867
867
|
|
|
868
868
|
/** Use `TemplateBanner` as a base structure for banner components; other banner variants extend or consume this template. */
|
|
869
869
|
var TemplateBanner = function (_a) {
|
|
870
|
-
var heading = _a.heading, _b = _a.fontStyle, fontStyle = _b === void 0 ? "default" : _b, label = _a.label, _c = _a.labelLevel, labelLevel = _c === void 0 ? "3" : _c, text = _a.text, img = _a.img, _d = _a.contentRatio, contentRatio = _d === void 0 ? "1/1" : _d, children = _a.children, _e = _a.alignment, alignment = _e === void 0 ? "center" : _e, additionalTopMargin = _a.additionalTopMargin, _f = _a.minHeight, minHeight = _f === void 0 ? 454 : _f, minHeightM = _a.minHeightM, minHeightL = _a.minHeightL, minHeightXL = _a.minHeightXL, _g = _a.headingSize, headingSize = _g === void 0 ? "xl" : _g, _h = _a.isReversed, isReversed = _h === void 0 ? false : _h, _j = _a.isElevated, isElevated = _j === void 0 ? false : _j, _k = _a.headingLevel, headingLevel = _k === void 0 ? "2" : _k, _l = _a.type, type =
|
|
870
|
+
var heading = _a.heading, _b = _a.fontStyle, fontStyle = _b === void 0 ? "default" : _b, label = _a.label, _c = _a.labelLevel, labelLevel = _c === void 0 ? "3" : _c, text = _a.text, img = _a.img, _d = _a.contentRatio, contentRatio = _d === void 0 ? "1/1" : _d, children = _a.children, _e = _a.alignment, alignment = _e === void 0 ? "center" : _e, additionalTopMargin = _a.additionalTopMargin, _f = _a.minHeight, minHeight = _f === void 0 ? 454 : _f, minHeightM = _a.minHeightM, minHeightL = _a.minHeightL, minHeightXL = _a.minHeightXL, _g = _a.headingSize, headingSize = _g === void 0 ? "xl" : _g, _h = _a.isReversed, isReversed = _h === void 0 ? false : _h, _j = _a.isElevated, isElevated = _j === void 0 ? false : _j, _k = _a.headingLevel, headingLevel = _k === void 0 ? "2" : _k, _l = _a.headingWordWrap, headingWordWrap = _l === void 0 ? false : _l, _m = _a.type, type = _m === void 0 ? "light" : _m, props = __rest(_a, ["heading", "fontStyle", "label", "labelLevel", "text", "img", "contentRatio", "children", "alignment", "additionalTopMargin", "minHeight", "minHeightM", "minHeightL", "minHeightXL", "headingSize", "isReversed", "isElevated", "headingLevel", "headingWordWrap", "type"]);
|
|
871
871
|
var backgrounds = {
|
|
872
872
|
dark: "dark-brand-02",
|
|
873
873
|
light: "light-white",
|
|
@@ -912,7 +912,7 @@ var TemplateBanner = function (_a) {
|
|
|
912
912
|
label && (React.createElement(React.Fragment, null,
|
|
913
913
|
React.createElement(Heading, { level: labelLevel, fontStyle: "overline", isWordWrap: false }, label),
|
|
914
914
|
React.createElement(VerticalSpace, { size: "8" }))),
|
|
915
|
-
React.createElement(Heading, { level: headingLevel, size: headingSize, fontStyle: fontStyle, isWordWrap:
|
|
915
|
+
React.createElement(Heading, { level: headingLevel, size: headingSize, fontStyle: fontStyle, isWordWrap: headingWordWrap }, heading),
|
|
916
916
|
text && (React.createElement(React.Fragment, null,
|
|
917
917
|
React.createElement(VerticalSpace, { size: "16" }),
|
|
918
918
|
React.createElement("span", { className: "arc-TemplateBanner-text" }, text))),
|
|
@@ -927,8 +927,8 @@ var TemplateBanner = function (_a) {
|
|
|
927
927
|
|
|
928
928
|
/** Use `Banner` to promote key content or products with bold visuals and messaging. */
|
|
929
929
|
var Banner = function (_a) {
|
|
930
|
-
var heading = _a.heading, label = _a.label, text = _a.text, img = _a.img, _b = _a.contentRatio, contentRatio = _b === void 0 ? "1/1" : _b, children = _a.children, minHeight = _a.minHeight, _c = _a.isReversed, isReversed = _c === void 0 ? false : _c, _d = _a.isElevated, isElevated = _d === void 0 ? false : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.type, type = _f === void 0 ? "light" : _f, _g = _a.alignment, alignment = _g === void 0 ? "center" : _g, props = __rest(_a, ["heading", "label", "text", "img", "contentRatio", "children", "minHeight", "isReversed", "isElevated", "headingLevel", "type", "alignment"]);
|
|
931
|
-
return (React.createElement(TemplateBanner, __assign({ heading: heading, label: label, text: text, img: img, contentRatio: contentRatio, minHeight: minHeight, isReversed: isReversed, isElevated: isElevated, headingLevel: headingLevel, type: type, headingSize: "m", alignment: alignment }, filterAttrs(props)), children));
|
|
930
|
+
var heading = _a.heading, label = _a.label, text = _a.text, img = _a.img, _b = _a.contentRatio, contentRatio = _b === void 0 ? "1/1" : _b, children = _a.children, minHeight = _a.minHeight, _c = _a.isReversed, isReversed = _c === void 0 ? false : _c, _d = _a.isElevated, isElevated = _d === void 0 ? false : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.type, type = _f === void 0 ? "light" : _f, _g = _a.alignment, alignment = _g === void 0 ? "center" : _g, _h = _a.headingWordWrap, headingWordWrap = _h === void 0 ? false : _h, props = __rest(_a, ["heading", "label", "text", "img", "contentRatio", "children", "minHeight", "isReversed", "isElevated", "headingLevel", "type", "alignment", "headingWordWrap"]);
|
|
931
|
+
return (React.createElement(TemplateBanner, __assign({ heading: heading, label: label, text: text, img: img, contentRatio: contentRatio, minHeight: minHeight, isReversed: isReversed, isElevated: isElevated, headingLevel: headingLevel, type: type, headingSize: "m", alignment: alignment, headingWordWrap: headingWordWrap }, filterAttrs(props)), children));
|
|
932
932
|
};
|
|
933
933
|
|
|
934
934
|
/**
|
|
@@ -1664,7 +1664,7 @@ var Breadcrumbs = function (_a) {
|
|
|
1664
1664
|
window.removeEventListener("resize", handleResize);
|
|
1665
1665
|
handleResize.cancel();
|
|
1666
1666
|
};
|
|
1667
|
-
}, []);
|
|
1667
|
+
}, [children]);
|
|
1668
1668
|
var items = React.Children.toArray(children);
|
|
1669
1669
|
return (React.createElement("nav", __assign({ "aria-label": "Breadcrumbs", className: classNames({
|
|
1670
1670
|
"arc-Breadcrumbs": true,
|
|
@@ -1704,22 +1704,22 @@ var handleLinkClick = function (_a) {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
};
|
|
1706
1706
|
|
|
1707
|
-
var BreadcrumbsLink =
|
|
1708
|
-
var onClick = _a.onClick, href = _a.href, isActive = _a.isActive, children = _a.children;
|
|
1709
|
-
return (React.createElement(React.Fragment, null, isActive || href === undefined ? (React.createElement("span", { onClick: onClick, className: classNames({
|
|
1707
|
+
var BreadcrumbsLink = function (_a) {
|
|
1708
|
+
var onClick = _a.onClick, href = _a.href, isActive = _a.isActive, children = _a.children, ref = _a.ref, props = __rest(_a, ["onClick", "href", "isActive", "children", "ref"]);
|
|
1709
|
+
return (React.createElement(React.Fragment, null, isActive || href === undefined ? (React.createElement("span", __assign({ onClick: onClick, className: classNames({
|
|
1710
1710
|
"arc-Breadcrumbs-text": true,
|
|
1711
1711
|
"arc-Breadcrumbs-text--active": isActive,
|
|
1712
|
-
}) }, children)) : (React.createElement("a", __assign({}, (onClick && ref
|
|
1712
|
+
}) }, filterAttrs(props)), children)) : (React.createElement("a", __assign({}, (onClick && ref
|
|
1713
1713
|
? { onClick: onClick }
|
|
1714
|
-
: { onClick: handleLinkClick({ handler: onClick }) }), { className: "arc-Breadcrumbs-text", ref: ref, href: href }), children))));
|
|
1715
|
-
}
|
|
1714
|
+
: { onClick: handleLinkClick({ handler: onClick }) }), { className: "arc-Breadcrumbs-text", ref: ref, href: href }, filterAttrs(props)), children))));
|
|
1715
|
+
};
|
|
1716
1716
|
|
|
1717
1717
|
/**
|
|
1718
1718
|
* Use `Button` to let a user complete an action like ‘Log in’ or ‘Register’.
|
|
1719
1719
|
*/
|
|
1720
|
-
var Button =
|
|
1720
|
+
var Button = function (_a) {
|
|
1721
1721
|
var _b;
|
|
1722
|
-
var ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, _h = _a.size, size = _h === void 0 ? "m" : _h, supportingText = _a.supportingText, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "size", "supportingText", "target", "type", "form"]);
|
|
1722
|
+
var ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, _h = _a.size, size = _h === void 0 ? "m" : _h, supportingText = _a.supportingText, target = _a.target, type = _a.type, form = _a.form, ref = _a.ref, props = __rest(_a, ["ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "size", "supportingText", "target", "type", "form", "ref"]);
|
|
1723
1723
|
var surface = React.useContext(Context$3).surface;
|
|
1724
1724
|
var buttonClasses = classNames((_b = {
|
|
1725
1725
|
"arc-Button": true,
|
|
@@ -1747,7 +1747,7 @@ var Button = React.forwardRef(function (_a, ref) {
|
|
|
1747
1747
|
React.createElement("span", { className: "arc-Button-inner" },
|
|
1748
1748
|
buttonText,
|
|
1749
1749
|
buttonIcon)));
|
|
1750
|
-
}
|
|
1750
|
+
};
|
|
1751
1751
|
var ButtonIcon = function (_a) {
|
|
1752
1752
|
var icon = _a.icon, isChevron = _a.isChevron, isBeforeText = _a.isBeforeText;
|
|
1753
1753
|
return (React.createElement("span", { className: "arc-Button-icon" }, isChevron ? (React.createElement(ThemeIcon, { icon: isBeforeText ? "buttonLeft" : "buttonRight" })) : (React.createElement(Icon$1, { icon: icon }))));
|
|
@@ -1765,8 +1765,8 @@ var Spinner = function (_a) {
|
|
|
1765
1765
|
/**
|
|
1766
1766
|
* Use `ButtonV2` for our most up to date Call To Action button, offering Primary, Secondary, Tertiary, Compact and Error states.
|
|
1767
1767
|
*/
|
|
1768
|
-
var ButtonV2 =
|
|
1769
|
-
var label = _a.label, _b = _a.buttonStyle, buttonStyle = _b === void 0 ? "primary" : _b, icon = _a.icon, iconActive = _a.iconActive, _c = _a.iconPosition, iconPosition = _c === void 0 ? "beforeText" : _c, _d = _a.size, size = _d === void 0 ? "m" : _d, ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _e = _a.isFullWidth, isFullWidth = _e === void 0 ? false : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, isSpan = _a.isSpan, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["label", "buttonStyle", "icon", "iconActive", "iconPosition", "size", "ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "isFullWidth", "isLoading", "isSpan", "onClick", "href", "id", "rel", "target", "type", "form"]);
|
|
1768
|
+
var ButtonV2 = function (_a) {
|
|
1769
|
+
var label = _a.label, _b = _a.buttonStyle, buttonStyle = _b === void 0 ? "primary" : _b, icon = _a.icon, iconActive = _a.iconActive, _c = _a.iconPosition, iconPosition = _c === void 0 ? "beforeText" : _c, _d = _a.size, size = _d === void 0 ? "m" : _d, ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, ariaExpanded = _a.ariaExpanded, ariaHasPopup = _a.ariaHasPopup, _e = _a.isFullWidth, isFullWidth = _e === void 0 ? false : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, isSpan = _a.isSpan, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, type = _a.type, form = _a.form, ref = _a.ref, props = __rest(_a, ["label", "buttonStyle", "icon", "iconActive", "iconPosition", "size", "ariaLabel", "ariaControls", "ariaExpanded", "ariaHasPopup", "isFullWidth", "isLoading", "isSpan", "onClick", "href", "id", "rel", "target", "type", "form", "ref"]);
|
|
1770
1770
|
var surface = React.useContext(Context$3).surface;
|
|
1771
1771
|
var ButtonElement = isSpan ? "span" : "button";
|
|
1772
1772
|
var iconSizes = {
|
|
@@ -1810,7 +1810,7 @@ var ButtonV2 = React.forwardRef(function (_a, ref) {
|
|
|
1810
1810
|
return (React.createElement("a", __assign({}, commonProps, { className: ButtonV2Classes, href: href, rel: rel, "aria-haspopup": ariaHasPopup, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, target: target }), renderButtonContent()));
|
|
1811
1811
|
}
|
|
1812
1812
|
return (React.createElement(ButtonElement, __assign({}, commonProps, { className: ButtonV2Classes, "aria-label": ariaLabel, "aria-haspopup": ariaHasPopup, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, disabled: isLoading, type: type, form: form }), renderButtonContent()));
|
|
1813
|
-
}
|
|
1813
|
+
};
|
|
1814
1814
|
|
|
1815
1815
|
/**
|
|
1816
1816
|
* Use `ButtonGroup` to group multiple buttons together, ensuring consistent sizing, spacing,
|
|
@@ -1828,7 +1828,10 @@ var ButtonGroup = function (_a) {
|
|
|
1828
1828
|
"arc-ButtonGroup--vertical": orientation === "vertical",
|
|
1829
1829
|
}), role: "group", "aria-label": ariaLabel }, filterAttrs(props)), React.Children.map(children, function (child) {
|
|
1830
1830
|
if (React.isValidElement(child) && isArcButton(child.type)) {
|
|
1831
|
-
return React.cloneElement(child,
|
|
1831
|
+
return React.cloneElement(child, {
|
|
1832
|
+
size: size,
|
|
1833
|
+
isFullWidth: isFullWidth,
|
|
1834
|
+
});
|
|
1832
1835
|
}
|
|
1833
1836
|
return null;
|
|
1834
1837
|
})));
|
|
@@ -2023,7 +2026,7 @@ function startOfMonth(dirtyDate) {
|
|
|
2023
2026
|
|
|
2024
2027
|
/**
|
|
2025
2028
|
* Do not edit directly
|
|
2026
|
-
* Generated on Tue,
|
|
2029
|
+
* Generated on Tue, 23 Dec 2025 14:36:38 GMT
|
|
2027
2030
|
*/
|
|
2028
2031
|
var ArcSizeBreakpointsXs = "320px";
|
|
2029
2032
|
var ArcSizeBreakpointsS = "636px";
|
|
@@ -2191,11 +2194,11 @@ var useMediaQuery = function (mediaQuery) {
|
|
|
2191
2194
|
return window.matchMedia(query).matches;
|
|
2192
2195
|
};
|
|
2193
2196
|
var _a = React.useState(false), matches = _a[0], setMatches = _a[1];
|
|
2194
|
-
// Handles the change event of the media query.
|
|
2195
|
-
var handleChange = function () {
|
|
2196
|
-
setMatches(getMatches(mediaQuery));
|
|
2197
|
-
};
|
|
2198
2197
|
React.useEffect(function () {
|
|
2198
|
+
// Handles the change event of the media query.
|
|
2199
|
+
var handleChange = function () {
|
|
2200
|
+
setMatches(getMatches(mediaQuery));
|
|
2201
|
+
};
|
|
2199
2202
|
var matchMedia = window.matchMedia(mediaQuery);
|
|
2200
2203
|
// Triggered at the first client-side load and if query changes
|
|
2201
2204
|
handleChange();
|
|
@@ -2807,9 +2810,9 @@ function subDays(dirtyDate, dirtyAmount) {
|
|
|
2807
2810
|
return addDays(dirtyDate, -amount);
|
|
2808
2811
|
}
|
|
2809
2812
|
|
|
2810
|
-
var defaultOptions$
|
|
2813
|
+
var defaultOptions$3 = {};
|
|
2811
2814
|
function getDefaultOptions() {
|
|
2812
|
-
return defaultOptions$
|
|
2815
|
+
return defaultOptions$3;
|
|
2813
2816
|
}
|
|
2814
2817
|
|
|
2815
2818
|
/**
|
|
@@ -5268,8 +5271,8 @@ function cleanEscapedString(input) {
|
|
|
5268
5271
|
|
|
5269
5272
|
var ArcCalendarContext = React.createContext(null);
|
|
5270
5273
|
|
|
5271
|
-
var CalendarDayNumber =
|
|
5272
|
-
var date = _a.date, shouldRender = _a.shouldRender, isFocusWithinDayGrid = _a.isFocusWithinDayGrid;
|
|
5274
|
+
var CalendarDayNumber = function (_a) {
|
|
5275
|
+
var autoFocusRef = _a.ref, date = _a.date, shouldRender = _a.shouldRender, isFocusWithinDayGrid = _a.isFocusWithinDayGrid;
|
|
5273
5276
|
var context = React.useContext(ArcCalendarContext);
|
|
5274
5277
|
var isFocusDate = context && isEqual$1(date, context.focusDate);
|
|
5275
5278
|
var tableCellRef = React.useCallback(function (el) {
|
|
@@ -5330,7 +5333,7 @@ var CalendarDayNumber = React.forwardRef(function (_a, autoFocusRef) {
|
|
|
5330
5333
|
React.createElement("div", { className: "arc-CalendarDayNumber-buttonInner" },
|
|
5331
5334
|
React.createElement(Text, { size: "s" },
|
|
5332
5335
|
React.createElement("span", { "aria-hidden": true }, getDate(date)))))))));
|
|
5333
|
-
}
|
|
5336
|
+
};
|
|
5334
5337
|
|
|
5335
5338
|
/**
|
|
5336
5339
|
* Do not edit directly
|
|
@@ -6095,6 +6098,131 @@ var Calendar = function (_a) {
|
|
|
6095
6098
|
onCancelClick && (React.createElement(CalendarFooter, { onCancelClick: onCancelButtonClick }))))));
|
|
6096
6099
|
};
|
|
6097
6100
|
|
|
6101
|
+
const defaultOptions$2 = {
|
|
6102
|
+
active: true,
|
|
6103
|
+
breakpoints: {},
|
|
6104
|
+
snapped: 'is-snapped',
|
|
6105
|
+
inView: 'is-in-view',
|
|
6106
|
+
draggable: 'is-draggable',
|
|
6107
|
+
dragging: 'is-dragging',
|
|
6108
|
+
loop: 'is-loop'
|
|
6109
|
+
};
|
|
6110
|
+
|
|
6111
|
+
function normalizeClassNames(classNames) {
|
|
6112
|
+
const normalized = Array.isArray(classNames) ? classNames : [classNames];
|
|
6113
|
+
return normalized.filter(Boolean);
|
|
6114
|
+
}
|
|
6115
|
+
function removeClass(node, classNames) {
|
|
6116
|
+
if (!node || !classNames.length) return;
|
|
6117
|
+
node.classList.remove(...classNames);
|
|
6118
|
+
}
|
|
6119
|
+
function addClass(node, classNames) {
|
|
6120
|
+
if (!node || !classNames.length) return;
|
|
6121
|
+
node.classList.add(...classNames);
|
|
6122
|
+
}
|
|
6123
|
+
|
|
6124
|
+
function ClassNames(userOptions = {}) {
|
|
6125
|
+
let options;
|
|
6126
|
+
let emblaApi;
|
|
6127
|
+
let root;
|
|
6128
|
+
let slides;
|
|
6129
|
+
let snappedIndexes = [];
|
|
6130
|
+
let inViewIndexes = [];
|
|
6131
|
+
const selectedEvents = ['select'];
|
|
6132
|
+
const draggingEvents = ['pointerDown', 'pointerUp'];
|
|
6133
|
+
const inViewEvents = ['slidesInView'];
|
|
6134
|
+
const classNames = {
|
|
6135
|
+
snapped: [],
|
|
6136
|
+
inView: [],
|
|
6137
|
+
draggable: [],
|
|
6138
|
+
dragging: [],
|
|
6139
|
+
loop: []
|
|
6140
|
+
};
|
|
6141
|
+
function init(emblaApiInstance, optionsHandler) {
|
|
6142
|
+
emblaApi = emblaApiInstance;
|
|
6143
|
+
const {
|
|
6144
|
+
mergeOptions,
|
|
6145
|
+
optionsAtMedia
|
|
6146
|
+
} = optionsHandler;
|
|
6147
|
+
const optionsBase = mergeOptions(defaultOptions$2, ClassNames.globalOptions);
|
|
6148
|
+
const allOptions = mergeOptions(optionsBase, userOptions);
|
|
6149
|
+
options = optionsAtMedia(allOptions);
|
|
6150
|
+
root = emblaApi.rootNode();
|
|
6151
|
+
slides = emblaApi.slideNodes();
|
|
6152
|
+
const {
|
|
6153
|
+
watchDrag,
|
|
6154
|
+
loop
|
|
6155
|
+
} = emblaApi.internalEngine().options;
|
|
6156
|
+
const isDraggable = !!watchDrag;
|
|
6157
|
+
if (options.loop && loop) {
|
|
6158
|
+
classNames.loop = normalizeClassNames(options.loop);
|
|
6159
|
+
addClass(root, classNames.loop);
|
|
6160
|
+
}
|
|
6161
|
+
if (options.draggable && isDraggable) {
|
|
6162
|
+
classNames.draggable = normalizeClassNames(options.draggable);
|
|
6163
|
+
addClass(root, classNames.draggable);
|
|
6164
|
+
}
|
|
6165
|
+
if (options.dragging) {
|
|
6166
|
+
classNames.dragging = normalizeClassNames(options.dragging);
|
|
6167
|
+
draggingEvents.forEach(evt => emblaApi.on(evt, toggleDraggingClass));
|
|
6168
|
+
}
|
|
6169
|
+
if (options.snapped) {
|
|
6170
|
+
classNames.snapped = normalizeClassNames(options.snapped);
|
|
6171
|
+
selectedEvents.forEach(evt => emblaApi.on(evt, toggleSnappedClasses));
|
|
6172
|
+
toggleSnappedClasses();
|
|
6173
|
+
}
|
|
6174
|
+
if (options.inView) {
|
|
6175
|
+
classNames.inView = normalizeClassNames(options.inView);
|
|
6176
|
+
inViewEvents.forEach(evt => emblaApi.on(evt, toggleInViewClasses));
|
|
6177
|
+
toggleInViewClasses();
|
|
6178
|
+
}
|
|
6179
|
+
}
|
|
6180
|
+
function destroy() {
|
|
6181
|
+
draggingEvents.forEach(evt => emblaApi.off(evt, toggleDraggingClass));
|
|
6182
|
+
selectedEvents.forEach(evt => emblaApi.off(evt, toggleSnappedClasses));
|
|
6183
|
+
inViewEvents.forEach(evt => emblaApi.off(evt, toggleInViewClasses));
|
|
6184
|
+
removeClass(root, classNames.loop);
|
|
6185
|
+
removeClass(root, classNames.draggable);
|
|
6186
|
+
removeClass(root, classNames.dragging);
|
|
6187
|
+
toggleSlideClasses([], snappedIndexes, classNames.snapped);
|
|
6188
|
+
toggleSlideClasses([], inViewIndexes, classNames.inView);
|
|
6189
|
+
Object.keys(classNames).forEach(classNameKey => {
|
|
6190
|
+
const key = classNameKey;
|
|
6191
|
+
classNames[key] = [];
|
|
6192
|
+
});
|
|
6193
|
+
}
|
|
6194
|
+
function toggleDraggingClass(_, evt) {
|
|
6195
|
+
const toggleClass = evt === 'pointerDown' ? addClass : removeClass;
|
|
6196
|
+
toggleClass(root, classNames.dragging);
|
|
6197
|
+
}
|
|
6198
|
+
function toggleSlideClasses(addClassIndexes = [], removeClassIndexes = [], classNames) {
|
|
6199
|
+
const removeClassSlides = removeClassIndexes.map(index => slides[index]);
|
|
6200
|
+
const addClassSlides = addClassIndexes.map(index => slides[index]);
|
|
6201
|
+
removeClassSlides.forEach(slide => removeClass(slide, classNames));
|
|
6202
|
+
addClassSlides.forEach(slide => addClass(slide, classNames));
|
|
6203
|
+
return addClassIndexes;
|
|
6204
|
+
}
|
|
6205
|
+
function toggleSnappedClasses() {
|
|
6206
|
+
const {
|
|
6207
|
+
slideRegistry
|
|
6208
|
+
} = emblaApi.internalEngine();
|
|
6209
|
+
const newSnappedIndexes = slideRegistry[emblaApi.selectedScrollSnap()];
|
|
6210
|
+
snappedIndexes = toggleSlideClasses(newSnappedIndexes, snappedIndexes, classNames.snapped);
|
|
6211
|
+
}
|
|
6212
|
+
function toggleInViewClasses() {
|
|
6213
|
+
const newInViewIndexes = emblaApi.slidesInView();
|
|
6214
|
+
inViewIndexes = toggleSlideClasses(newInViewIndexes, inViewIndexes, classNames.inView);
|
|
6215
|
+
}
|
|
6216
|
+
const self = {
|
|
6217
|
+
name: 'classNames',
|
|
6218
|
+
options: userOptions,
|
|
6219
|
+
init,
|
|
6220
|
+
destroy
|
|
6221
|
+
};
|
|
6222
|
+
return self;
|
|
6223
|
+
}
|
|
6224
|
+
ClassNames.globalOptions = undefined;
|
|
6225
|
+
|
|
6098
6226
|
function isObject$1(subject) {
|
|
6099
6227
|
return Object.prototype.toString.call(subject) === '[object Object]';
|
|
6100
6228
|
}
|
|
@@ -7546,7 +7674,7 @@ function EventHandler() {
|
|
|
7546
7674
|
return self;
|
|
7547
7675
|
}
|
|
7548
7676
|
|
|
7549
|
-
const defaultOptions = {
|
|
7677
|
+
const defaultOptions$1 = {
|
|
7550
7678
|
align: 'center',
|
|
7551
7679
|
axis: 'x',
|
|
7552
7680
|
container: null,
|
|
@@ -7630,7 +7758,7 @@ function EmblaCarousel(root, userOptions, userPlugins) {
|
|
|
7630
7758
|
const reInit = reActivate;
|
|
7631
7759
|
let destroyed = false;
|
|
7632
7760
|
let engine;
|
|
7633
|
-
let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
|
|
7761
|
+
let optionsBase = mergeOptions(defaultOptions$1, EmblaCarousel.globalOptions);
|
|
7634
7762
|
let options = mergeOptions(optionsBase);
|
|
7635
7763
|
let pluginList = [];
|
|
7636
7764
|
let pluginApis;
|
|
@@ -7821,6 +7949,199 @@ function useEmblaCarousel(options = {}, plugins = []) {
|
|
|
7821
7949
|
}
|
|
7822
7950
|
useEmblaCarousel.globalOptions = undefined;
|
|
7823
7951
|
|
|
7952
|
+
const defaultOptions = {
|
|
7953
|
+
active: true,
|
|
7954
|
+
breakpoints: {},
|
|
7955
|
+
delay: 4000,
|
|
7956
|
+
jump: false,
|
|
7957
|
+
playOnInit: true,
|
|
7958
|
+
stopOnFocusIn: true,
|
|
7959
|
+
stopOnInteraction: true,
|
|
7960
|
+
stopOnMouseEnter: false,
|
|
7961
|
+
stopOnLastSnap: false,
|
|
7962
|
+
rootNode: null
|
|
7963
|
+
};
|
|
7964
|
+
|
|
7965
|
+
function normalizeDelay(emblaApi, delay) {
|
|
7966
|
+
const scrollSnaps = emblaApi.scrollSnapList();
|
|
7967
|
+
if (typeof delay === 'number') {
|
|
7968
|
+
return scrollSnaps.map(() => delay);
|
|
7969
|
+
}
|
|
7970
|
+
return delay(scrollSnaps, emblaApi);
|
|
7971
|
+
}
|
|
7972
|
+
function getAutoplayRootNode(emblaApi, rootNode) {
|
|
7973
|
+
const emblaRootNode = emblaApi.rootNode();
|
|
7974
|
+
return rootNode && rootNode(emblaRootNode) || emblaRootNode;
|
|
7975
|
+
}
|
|
7976
|
+
|
|
7977
|
+
function Autoplay(userOptions = {}) {
|
|
7978
|
+
let options;
|
|
7979
|
+
let emblaApi;
|
|
7980
|
+
let destroyed;
|
|
7981
|
+
let delay;
|
|
7982
|
+
let timerStartTime = null;
|
|
7983
|
+
let timerId = 0;
|
|
7984
|
+
let autoplayActive = false;
|
|
7985
|
+
let mouseIsOver = false;
|
|
7986
|
+
let playOnDocumentVisible = false;
|
|
7987
|
+
let jump = false;
|
|
7988
|
+
function init(emblaApiInstance, optionsHandler) {
|
|
7989
|
+
emblaApi = emblaApiInstance;
|
|
7990
|
+
const {
|
|
7991
|
+
mergeOptions,
|
|
7992
|
+
optionsAtMedia
|
|
7993
|
+
} = optionsHandler;
|
|
7994
|
+
const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions);
|
|
7995
|
+
const allOptions = mergeOptions(optionsBase, userOptions);
|
|
7996
|
+
options = optionsAtMedia(allOptions);
|
|
7997
|
+
if (emblaApi.scrollSnapList().length <= 1) return;
|
|
7998
|
+
jump = options.jump;
|
|
7999
|
+
destroyed = false;
|
|
8000
|
+
delay = normalizeDelay(emblaApi, options.delay);
|
|
8001
|
+
const {
|
|
8002
|
+
eventStore,
|
|
8003
|
+
ownerDocument
|
|
8004
|
+
} = emblaApi.internalEngine();
|
|
8005
|
+
const isDraggable = !!emblaApi.internalEngine().options.watchDrag;
|
|
8006
|
+
const root = getAutoplayRootNode(emblaApi, options.rootNode);
|
|
8007
|
+
eventStore.add(ownerDocument, 'visibilitychange', visibilityChange);
|
|
8008
|
+
if (isDraggable) {
|
|
8009
|
+
emblaApi.on('pointerDown', pointerDown);
|
|
8010
|
+
}
|
|
8011
|
+
if (isDraggable && !options.stopOnInteraction) {
|
|
8012
|
+
emblaApi.on('pointerUp', pointerUp);
|
|
8013
|
+
}
|
|
8014
|
+
if (options.stopOnMouseEnter) {
|
|
8015
|
+
eventStore.add(root, 'mouseenter', mouseEnter);
|
|
8016
|
+
}
|
|
8017
|
+
if (options.stopOnMouseEnter && !options.stopOnInteraction) {
|
|
8018
|
+
eventStore.add(root, 'mouseleave', mouseLeave);
|
|
8019
|
+
}
|
|
8020
|
+
if (options.stopOnFocusIn) {
|
|
8021
|
+
emblaApi.on('slideFocusStart', stopAutoplay);
|
|
8022
|
+
}
|
|
8023
|
+
if (options.stopOnFocusIn && !options.stopOnInteraction) {
|
|
8024
|
+
eventStore.add(emblaApi.containerNode(), 'focusout', startAutoplay);
|
|
8025
|
+
}
|
|
8026
|
+
if (options.playOnInit) startAutoplay();
|
|
8027
|
+
}
|
|
8028
|
+
function destroy() {
|
|
8029
|
+
emblaApi.off('pointerDown', pointerDown).off('pointerUp', pointerUp).off('slideFocusStart', stopAutoplay);
|
|
8030
|
+
stopAutoplay();
|
|
8031
|
+
destroyed = true;
|
|
8032
|
+
autoplayActive = false;
|
|
8033
|
+
}
|
|
8034
|
+
function setTimer() {
|
|
8035
|
+
const {
|
|
8036
|
+
ownerWindow
|
|
8037
|
+
} = emblaApi.internalEngine();
|
|
8038
|
+
ownerWindow.clearTimeout(timerId);
|
|
8039
|
+
timerId = ownerWindow.setTimeout(next, delay[emblaApi.selectedScrollSnap()]);
|
|
8040
|
+
timerStartTime = new Date().getTime();
|
|
8041
|
+
emblaApi.emit('autoplay:timerset');
|
|
8042
|
+
}
|
|
8043
|
+
function clearTimer() {
|
|
8044
|
+
const {
|
|
8045
|
+
ownerWindow
|
|
8046
|
+
} = emblaApi.internalEngine();
|
|
8047
|
+
ownerWindow.clearTimeout(timerId);
|
|
8048
|
+
timerId = 0;
|
|
8049
|
+
timerStartTime = null;
|
|
8050
|
+
emblaApi.emit('autoplay:timerstopped');
|
|
8051
|
+
}
|
|
8052
|
+
function startAutoplay() {
|
|
8053
|
+
if (destroyed) return;
|
|
8054
|
+
if (documentIsHidden()) {
|
|
8055
|
+
playOnDocumentVisible = true;
|
|
8056
|
+
return;
|
|
8057
|
+
}
|
|
8058
|
+
if (!autoplayActive) emblaApi.emit('autoplay:play');
|
|
8059
|
+
setTimer();
|
|
8060
|
+
autoplayActive = true;
|
|
8061
|
+
}
|
|
8062
|
+
function stopAutoplay() {
|
|
8063
|
+
if (destroyed) return;
|
|
8064
|
+
if (autoplayActive) emblaApi.emit('autoplay:stop');
|
|
8065
|
+
clearTimer();
|
|
8066
|
+
autoplayActive = false;
|
|
8067
|
+
}
|
|
8068
|
+
function visibilityChange() {
|
|
8069
|
+
if (documentIsHidden()) {
|
|
8070
|
+
playOnDocumentVisible = autoplayActive;
|
|
8071
|
+
return stopAutoplay();
|
|
8072
|
+
}
|
|
8073
|
+
if (playOnDocumentVisible) startAutoplay();
|
|
8074
|
+
}
|
|
8075
|
+
function documentIsHidden() {
|
|
8076
|
+
const {
|
|
8077
|
+
ownerDocument
|
|
8078
|
+
} = emblaApi.internalEngine();
|
|
8079
|
+
return ownerDocument.visibilityState === 'hidden';
|
|
8080
|
+
}
|
|
8081
|
+
function pointerDown() {
|
|
8082
|
+
if (!mouseIsOver) stopAutoplay();
|
|
8083
|
+
}
|
|
8084
|
+
function pointerUp() {
|
|
8085
|
+
if (!mouseIsOver) startAutoplay();
|
|
8086
|
+
}
|
|
8087
|
+
function mouseEnter() {
|
|
8088
|
+
mouseIsOver = true;
|
|
8089
|
+
stopAutoplay();
|
|
8090
|
+
}
|
|
8091
|
+
function mouseLeave() {
|
|
8092
|
+
mouseIsOver = false;
|
|
8093
|
+
startAutoplay();
|
|
8094
|
+
}
|
|
8095
|
+
function play(jumpOverride) {
|
|
8096
|
+
if (typeof jumpOverride !== 'undefined') jump = jumpOverride;
|
|
8097
|
+
startAutoplay();
|
|
8098
|
+
}
|
|
8099
|
+
function stop() {
|
|
8100
|
+
if (autoplayActive) stopAutoplay();
|
|
8101
|
+
}
|
|
8102
|
+
function reset() {
|
|
8103
|
+
if (autoplayActive) startAutoplay();
|
|
8104
|
+
}
|
|
8105
|
+
function isPlaying() {
|
|
8106
|
+
return autoplayActive;
|
|
8107
|
+
}
|
|
8108
|
+
function next() {
|
|
8109
|
+
const {
|
|
8110
|
+
index
|
|
8111
|
+
} = emblaApi.internalEngine();
|
|
8112
|
+
const nextIndex = index.clone().add(1).get();
|
|
8113
|
+
const lastIndex = emblaApi.scrollSnapList().length - 1;
|
|
8114
|
+
const kill = options.stopOnLastSnap && nextIndex === lastIndex;
|
|
8115
|
+
if (emblaApi.canScrollNext()) {
|
|
8116
|
+
emblaApi.scrollNext(jump);
|
|
8117
|
+
} else {
|
|
8118
|
+
emblaApi.scrollTo(0, jump);
|
|
8119
|
+
}
|
|
8120
|
+
emblaApi.emit('autoplay:select');
|
|
8121
|
+
if (kill) return stopAutoplay();
|
|
8122
|
+
startAutoplay();
|
|
8123
|
+
}
|
|
8124
|
+
function timeUntilNext() {
|
|
8125
|
+
if (!timerStartTime) return null;
|
|
8126
|
+
const currentDelay = delay[emblaApi.selectedScrollSnap()];
|
|
8127
|
+
const timePastSinceStart = new Date().getTime() - timerStartTime;
|
|
8128
|
+
return currentDelay - timePastSinceStart;
|
|
8129
|
+
}
|
|
8130
|
+
const self = {
|
|
8131
|
+
name: 'autoplay',
|
|
8132
|
+
options: userOptions,
|
|
8133
|
+
init,
|
|
8134
|
+
destroy,
|
|
8135
|
+
play,
|
|
8136
|
+
stop,
|
|
8137
|
+
reset,
|
|
8138
|
+
isPlaying,
|
|
8139
|
+
timeUntilNext
|
|
8140
|
+
};
|
|
8141
|
+
return self;
|
|
8142
|
+
}
|
|
8143
|
+
Autoplay.globalOptions = undefined;
|
|
8144
|
+
|
|
7824
8145
|
var XS_BREAKPOINT = "(min-width: ".concat(ArcSizeBreakpointsXs, ")");
|
|
7825
8146
|
var S_BREAKPOINT = "(min-width: ".concat(ArcSizeBreakpointsS, ")");
|
|
7826
8147
|
var M_BREAKPOINT = "(min-width: ".concat(ArcSizeBreakpointsM, ")");
|
|
@@ -7895,9 +8216,29 @@ var KeyNames;
|
|
|
7895
8216
|
})(KeyNames || (KeyNames = {}));
|
|
7896
8217
|
|
|
7897
8218
|
var Carousel = function (_a) {
|
|
7898
|
-
var children = _a.children, responsive = _a.responsive, _b = _a.itemsToScroll, itemsToScroll = _b === void 0 ? 1 : _b, _c = _a.itemsPerSlide, itemsPerSlide = _c === void 0 ? 1 : _c, _d = _a.withGutter, withGutter = _d === void 0 ? true : _d, _e = _a.loop, loop = _e === void 0 ? false : _e, _f = _a.isPartialVisible, isPartialVisible = _f === void 0 ? false : _f;
|
|
8219
|
+
var children = _a.children, responsive = _a.responsive, _b = _a.itemsToScroll, itemsToScroll = _b === void 0 ? 1 : _b, _c = _a.itemsPerSlide, itemsPerSlide = _c === void 0 ? 1 : _c, _d = _a.withGutter, withGutter = _d === void 0 ? true : _d, _e = _a.loop, loop = _e === void 0 ? false : _e, _f = _a.isPartialVisible, isPartialVisible = _f === void 0 ? false : _f, autoplay = _a.autoplay, isPlaying = _a.isPlaying, fade = _a.fade;
|
|
7899
8220
|
var id = React.useId();
|
|
7900
|
-
var
|
|
8221
|
+
var autoPlayOptions = autoplay
|
|
8222
|
+
? __assign({ playOnInit: true, delay: 3000, stopOnInteraction: true, stopOnMouseEnter: false, stopOnFocusIn: true, stopOnLastSnap: false }, autoplay) : undefined;
|
|
8223
|
+
var _g = useEmblaCarousel(__assign(__assign({}, getOptions(itemsToScroll, loop, responsive)), (fade ? { inViewThreshold: 0.74 } : {})), __spreadArray(__spreadArray([], (autoPlayOptions ? [Autoplay(autoPlayOptions)] : []), true), (fade
|
|
8224
|
+
? [
|
|
8225
|
+
ClassNames({
|
|
8226
|
+
inView: "arc-Carousel-slide--isInView",
|
|
8227
|
+
}),
|
|
8228
|
+
]
|
|
8229
|
+
: []), true)), emblaRef = _g[0], emblaApi = _g[1];
|
|
8230
|
+
React.useEffect(function () {
|
|
8231
|
+
var _a;
|
|
8232
|
+
if (!emblaApi || !autoplay)
|
|
8233
|
+
return;
|
|
8234
|
+
var autoplayPlugin = (_a = emblaApi === null || emblaApi === void 0 ? void 0 : emblaApi.plugins()) === null || _a === void 0 ? void 0 : _a.autoplay;
|
|
8235
|
+
if (isPlaying) {
|
|
8236
|
+
autoplayPlugin.play();
|
|
8237
|
+
}
|
|
8238
|
+
if (isPlaying == false) {
|
|
8239
|
+
autoplayPlugin.stop();
|
|
8240
|
+
}
|
|
8241
|
+
}, [emblaApi, isPlaying, autoplay]);
|
|
7901
8242
|
var _h = React.useState(), dotButtonFocusIndex = _h[0], setCarouselDotButtonFocusIndex = _h[1];
|
|
7902
8243
|
var prevButtonRef = React.useRef(null);
|
|
7903
8244
|
var _j = React.useState(0), visibleSlideIndex = _j[0], setVisibleSlideIndex = _j[1];
|
|
@@ -7975,7 +8316,9 @@ var Carousel = function (_a) {
|
|
|
7975
8316
|
React.createElement("div", { ref: emblaRef, className: classNames("arc-Carousel-viewport", {
|
|
7976
8317
|
"arc-Carousel-viewport--gutter": withGutter,
|
|
7977
8318
|
}) },
|
|
7978
|
-
React.createElement("div", { className: "arc-Carousel-slider", role: "region", "aria-roledescription": "carousel" }, React.Children.map(children, function (child, i) { return (React.createElement("div", { onKeyDown: onSlideKeyDown, style: { flex: "0 0 ".concat(slideWidth, "%"), width: "".concat(slideWidth, "%") }, className: "arc-Carousel-slide",
|
|
8319
|
+
React.createElement("div", { className: "arc-Carousel-slider", role: "region", "aria-roledescription": "carousel" }, React.Children.map(children, function (child, i) { return (React.createElement("div", { onKeyDown: onSlideKeyDown, style: { flex: "0 0 ".concat(slideWidth, "%"), width: "".concat(slideWidth, "%") }, className: classNames("arc-Carousel-slide", {
|
|
8320
|
+
"arc-Carousel-slide--fade": fade,
|
|
8321
|
+
}), key: "".concat(id, "-option-").concat(i), role: "group", "aria-roledescription": "slide" }, child)); })))),
|
|
7979
8322
|
React.createElement("div", { className: "arc-Carousel-nav" },
|
|
7980
8323
|
React.createElement("button", { "data-testid": "previous-button", ref: prevButtonRef, className: classNames("arc-Carousel-navButton", {
|
|
7981
8324
|
"arc-Carousel-navButton--hidden": !prevButtonEnabled,
|
|
@@ -8095,15 +8438,16 @@ var FormControl = function (_a) {
|
|
|
8095
8438
|
|
|
8096
8439
|
/** Use `CheckboxIcon` to display a visual checkbox indicator that reflects a checked, unchecked, or indeterminate state. */
|
|
8097
8440
|
var CheckboxIcon = function (_a) {
|
|
8098
|
-
var id = _a.id, name = _a.name, checked = _a.checked, _b = _a.indeterminate, indeterminate = _b === void 0 ? false : _b, isDisabled = _a.isDisabled, isRequired = _a.isRequired, _c = _a.size, size = _c === void 0 ? "m" : _c, value = _a.value, error = _a.error, ariaDescribedBy = _a.ariaDescribedBy, onBlur = _a.onBlur, onChange = _a.onChange, props = __rest(_a, ["id", "name", "checked", "indeterminate", "isDisabled", "isRequired", "size", "value", "error", "ariaDescribedBy", "onBlur", "onChange"]);
|
|
8441
|
+
var id = _a.id, name = _a.name, checked = _a.checked, _b = _a.indeterminate, indeterminate = _b === void 0 ? false : _b, isDisabled = _a.isDisabled, isRequired = _a.isRequired, _c = _a.size, size = _c === void 0 ? "m" : _c, value = _a.value, error = _a.error, ariaDescribedBy = _a.ariaDescribedBy, onBlur = _a.onBlur, onChange = _a.onChange, ref = _a.ref, props = __rest(_a, ["id", "name", "checked", "indeterminate", "isDisabled", "isRequired", "size", "value", "error", "ariaDescribedBy", "onBlur", "onChange", "ref"]);
|
|
8099
8442
|
var requirementStatus = React.useContext(Context$2).requirementStatus;
|
|
8100
8443
|
var internalRef = React.useRef(null);
|
|
8101
8444
|
var surface = React.useContext(Context$3).surface;
|
|
8445
|
+
var inputRef = (ref || internalRef);
|
|
8102
8446
|
React.useEffect(function () {
|
|
8103
|
-
if (
|
|
8104
|
-
|
|
8447
|
+
if (inputRef.current) {
|
|
8448
|
+
inputRef.current.indeterminate = indeterminate;
|
|
8105
8449
|
}
|
|
8106
|
-
}, [indeterminate, checked]);
|
|
8450
|
+
}, [indeterminate, checked, inputRef]);
|
|
8107
8451
|
var tickSize = {
|
|
8108
8452
|
s: 14,
|
|
8109
8453
|
m: 18,
|
|
@@ -8131,7 +8475,7 @@ var CheckboxIcon = function (_a) {
|
|
|
8131
8475
|
? true
|
|
8132
8476
|
: indeterminate && checked
|
|
8133
8477
|
? "mixed"
|
|
8134
|
-
: false, className: classNames("arc-CheckboxIcon-input"), disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref:
|
|
8478
|
+
: false, className: classNames("arc-CheckboxIcon-input"), disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: inputRef, required: isRequired, type: "checkbox", value: value }, checkedProps, props)),
|
|
8135
8479
|
React.createElement("span", { className: classNames("arc-CheckboxIcon-box") }, indeterminate ? (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "none" },
|
|
8136
8480
|
React.createElement("rect", { x: "4", y: "8", width: "7.51", height: "1", rx: "0.5", fill: "currentColor" }))) : (React.createElement(ThemeIcon, { icon: "checkboxChecked", size: tickSize[size] })))));
|
|
8137
8481
|
};
|
|
@@ -8139,8 +8483,8 @@ var CheckboxIcon = function (_a) {
|
|
|
8139
8483
|
/**
|
|
8140
8484
|
* Use `Checkbox` to allow users to select individual options.
|
|
8141
8485
|
*/
|
|
8142
|
-
var Checkbox =
|
|
8143
|
-
var _b = _a.checked, checked = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, label = _a.label, _e = _a.hideLabel, hideLabel = _e === void 0 ? false : _e, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _f = _a.size, size = _f === void 0 ? "m" : _f, value = _a.value, _g = _a.checkboxAlignment, checkboxAlignment = _g === void 0 ? "center" : _g, _h = _a.indeterminate, indeterminate = _h === void 0 ? false : _h, _j = _a.isError, isError = _j === void 0 ? false : _j, _k = _a.isErrorAlert, isErrorAlert = _k === void 0 ? false : _k, props = __rest(_a, ["checked", "errorMessage", "helper", "id", "isDisabled", "isRequired", "label", "hideLabel", "name", "onBlur", "onChange", "size", "value", "checkboxAlignment", "indeterminate", "isError", "isErrorAlert"]);
|
|
8486
|
+
var Checkbox = function (_a) {
|
|
8487
|
+
var _b = _a.checked, checked = _b === void 0 ? false : _b, errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isRequired, isRequired = _d === void 0 ? false : _d, label = _a.label, _e = _a.hideLabel, hideLabel = _e === void 0 ? false : _e, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, _f = _a.size, size = _f === void 0 ? "m" : _f, value = _a.value, _g = _a.checkboxAlignment, checkboxAlignment = _g === void 0 ? "center" : _g, _h = _a.indeterminate, indeterminate = _h === void 0 ? false : _h, _j = _a.isError, isError = _j === void 0 ? false : _j, _k = _a.isErrorAlert, isErrorAlert = _k === void 0 ? false : _k, ref = _a.ref, props = __rest(_a, ["checked", "errorMessage", "helper", "id", "isDisabled", "isRequired", "label", "hideLabel", "name", "onBlur", "onChange", "size", "value", "checkboxAlignment", "indeterminate", "isError", "isErrorAlert", "ref"]);
|
|
8144
8488
|
var requirementStatus = React.useContext(Context$2).requirementStatus;
|
|
8145
8489
|
var surface = React.useContext(Context$3).surface;
|
|
8146
8490
|
var idError = useAriaDescribedby({
|
|
@@ -8158,7 +8502,7 @@ var Checkbox = React.forwardRef(function (_a) {
|
|
|
8158
8502
|
"arc-Checkbox--invalid": errorMessage || isError,
|
|
8159
8503
|
"arc-Checkbox--small": size === "s",
|
|
8160
8504
|
"arc-Checkbox--onDarkSurface": surface === "dark",
|
|
8161
|
-
}) }, filterAttrs(props)),
|
|
8505
|
+
}), ref: ref }, filterAttrs(props)),
|
|
8162
8506
|
React.createElement("label", { id: idLabel, htmlFor: id, className: classNames("arc-Checkbox-label", {
|
|
8163
8507
|
"arc-Checkbox-label--top": checkboxAlignment === "top",
|
|
8164
8508
|
}) },
|
|
@@ -8168,15 +8512,15 @@ var Checkbox = React.forwardRef(function (_a) {
|
|
|
8168
8512
|
})), hideLabel ? (React.createElement(VisuallyHidden$2, null,
|
|
8169
8513
|
label,
|
|
8170
8514
|
!isRequired && requirementStatus !== "optional" ? (React.createElement("span", { className: "arc-Checkbox-labelOptional" }, "(optional)")) : null,
|
|
8171
|
-
helper &&
|
|
8515
|
+
helper && React.createElement("span", { className: "arc-Checkbox-helper" }, helper))) : (React.createElement(React.Fragment, null,
|
|
8172
8516
|
label,
|
|
8173
8517
|
!isRequired && requirementStatus !== "optional" ? (React.createElement("span", { className: "arc-Checkbox-labelOptional" }, "(optional)")) : null,
|
|
8174
|
-
helper &&
|
|
8518
|
+
helper && React.createElement("span", { className: "arc-Checkbox-helper" }, helper))))),
|
|
8175
8519
|
errorMessage && (React.createElement("div", { id: idError, className: "arc-Checkbox-error", role: isErrorAlert ? "alert" : undefined },
|
|
8176
8520
|
React.createElement("span", { className: "arc-Checkbox-error--icon", "aria-label": "Error. " },
|
|
8177
8521
|
React.createElement(ThemeIcon, { icon: "checkboxError" })),
|
|
8178
8522
|
errorMessage))));
|
|
8179
|
-
}
|
|
8523
|
+
};
|
|
8180
8524
|
|
|
8181
8525
|
/**
|
|
8182
8526
|
* Use `Columns` to compose layouts on a 12-column grid. Place within `Section` components to align with any sibling `Grid` components.
|
|
@@ -8909,9 +9253,9 @@ var count = 0;
|
|
|
8909
9253
|
function useId(deterministicId) {
|
|
8910
9254
|
const [id, setId] = React__namespace.useState(useReactId());
|
|
8911
9255
|
useLayoutEffect2(() => {
|
|
8912
|
-
|
|
9256
|
+
setId((reactId) => reactId ?? String(count++));
|
|
8913
9257
|
}, [deterministicId]);
|
|
8914
|
-
return
|
|
9258
|
+
return (id ? `radix-${id}` : "");
|
|
8915
9259
|
}
|
|
8916
9260
|
|
|
8917
9261
|
/**
|
|
@@ -12763,8 +13107,8 @@ var reducer = function (initialOptions) {
|
|
|
12763
13107
|
};
|
|
12764
13108
|
|
|
12765
13109
|
/** Use `ComboBox` to provide a searchable dropdown list that allows users to select from or filter through multiple options. */
|
|
12766
|
-
var ComboBox =
|
|
12767
|
-
var name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, label = _a.label, helper = _a.helper, id = _a.id, initialOptions = _a.options, hideLabel = _a.hideLabel, isFluid = _a.isFluid, errorMessage = _a.errorMessage, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, listBoxAriaLabel = _a.listBoxAriaLabel, _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.isMultiSelectable, isMultiSelectable = _d === void 0 ? false : _d, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.isAutocomplete, isAutocomplete = _g === void 0 ? false : _g, props = __rest(_a, ["name", "onBlur", "onFocus", "label", "helper", "id", "options", "hideLabel", "isFluid", "errorMessage", "disclosureTitle", "disclosureText", "onClickDisclosure", "listBoxAriaLabel", "defaultValue", "labelSize", "isMultiSelectable", "isDisabled", "isRequired", "isAutocomplete"]);
|
|
13110
|
+
var ComboBox = function (_a) {
|
|
13111
|
+
var ref = _a.ref, name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, label = _a.label, helper = _a.helper, id = _a.id, initialOptions = _a.options, hideLabel = _a.hideLabel, isFluid = _a.isFluid, errorMessage = _a.errorMessage, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, listBoxAriaLabel = _a.listBoxAriaLabel, _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.isMultiSelectable, isMultiSelectable = _d === void 0 ? false : _d, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.isAutocomplete, isAutocomplete = _g === void 0 ? false : _g, props = __rest(_a, ["ref", "name", "onBlur", "onFocus", "label", "helper", "id", "options", "hideLabel", "isFluid", "errorMessage", "disclosureTitle", "disclosureText", "onClickDisclosure", "listBoxAriaLabel", "defaultValue", "labelSize", "isMultiSelectable", "isDisabled", "isRequired", "isAutocomplete"]);
|
|
12768
13112
|
var listBoxId = React.useId();
|
|
12769
13113
|
var listItemRefs = React.useRef([]);
|
|
12770
13114
|
var containerRef = React.useRef(null);
|
|
@@ -12800,9 +13144,7 @@ var ComboBox = React.forwardRef(function (_a, ref) {
|
|
|
12800
13144
|
var selectedOptionIsAboveOverFlow = listItemEl.offsetTop < listEl.scrollTop;
|
|
12801
13145
|
if (selectedOptionIsBelowOverFlow) {
|
|
12802
13146
|
listEl.scrollTop =
|
|
12803
|
-
listItemEl.offsetTop +
|
|
12804
|
-
listItemEl.offsetHeight -
|
|
12805
|
-
listEl.offsetHeight;
|
|
13147
|
+
listItemEl.offsetTop + listItemEl.offsetHeight - listEl.offsetHeight;
|
|
12806
13148
|
}
|
|
12807
13149
|
if (selectedOptionIsAboveOverFlow) {
|
|
12808
13150
|
listEl.scrollTop = listItemEl.offsetTop;
|
|
@@ -12915,7 +13257,9 @@ var ComboBox = React.forwardRef(function (_a, ref) {
|
|
|
12915
13257
|
React.createElement(Content2$4, { align: "start", sideOffset: 5, onInteractOutside: onInteractOutside, onOpenAutoFocus: onOpenAutoFocus },
|
|
12916
13258
|
React.createElement("div", { className: "arc-ComboBox-listboxContainer" },
|
|
12917
13259
|
React.createElement(Box, { elevationLevel: "1" },
|
|
12918
|
-
React.createElement("ul", { ref: setScrollPosition, id: listBoxId, className: "arc-ComboBox-list", role: "listbox", "aria-label": listBoxAriaLabel, "aria-multiselectable": isMultiSelectable }, options.length ? (options.map(function (option, i) { return (React.createElement("li", { id: "".concat(listBoxId, "-").concat(i), ref: function (el) {
|
|
13260
|
+
React.createElement("ul", { ref: setScrollPosition, id: listBoxId, className: "arc-ComboBox-list", role: "listbox", "aria-label": listBoxAriaLabel, "aria-multiselectable": isMultiSelectable }, options.length ? (options.map(function (option, i) { return (React.createElement("li", { id: "".concat(listBoxId, "-").concat(i), ref: function (el) {
|
|
13261
|
+
listItemRefs.current[i] = el;
|
|
13262
|
+
}, key: option, className: classNames("arc-ComboBox-listItem", {
|
|
12919
13263
|
"arc-ComboBox-listItem--highlighted": i === highlightedOptionIndex,
|
|
12920
13264
|
}), onMouseDown: onItemClick(option), role: "option", "aria-selected": isSelected(option, selectedOptions) },
|
|
12921
13265
|
React.createElement("div", { className: "arc-ComboBox-listItemText" }, option),
|
|
@@ -12923,7 +13267,7 @@ var ComboBox = React.forwardRef(function (_a, ref) {
|
|
|
12923
13267
|
"arc-ComboBox-listItemIcon--visible": isSelected(option, selectedOptions),
|
|
12924
13268
|
}) },
|
|
12925
13269
|
React.createElement(ThemeIcon, { size: 20, icon: "selectIndicator" })))); })) : (React.createElement("li", { className: "arc-ComboBox-listItem", role: "option", "aria-selected": false, "aria-disabled": true }, "No matches found")))))))))));
|
|
12926
|
-
}
|
|
13270
|
+
};
|
|
12927
13271
|
|
|
12928
13272
|
function _extends() {
|
|
12929
13273
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -13890,11 +14234,12 @@ var ContentSwitcher = function (_a) {
|
|
|
13890
14234
|
React.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, __assign({ className: "arc-ContentSwitcher-root", defaultValue: defaultValue, onValueChange: onValueChange, activationMode: activationMode, value: value }, filterAttrs(props)), children)));
|
|
13891
14235
|
};
|
|
13892
14236
|
|
|
13893
|
-
var ContentSwitcherTab =
|
|
13894
|
-
var label = _a.label, value = _a.value, onClick = _a.onClick, onFocus = _a.onFocus, props = __rest(_a, ["label", "value", "onClick", "onFocus"]);
|
|
13895
|
-
return (React.createElement(
|
|
13896
|
-
React.createElement(
|
|
13897
|
-
});
|
|
14237
|
+
var ContentSwitcherTab = function (_a) {
|
|
14238
|
+
var label = _a.label, value = _a.value, onClick = _a.onClick, onFocus = _a.onFocus, ref = _a.ref, props = __rest(_a, ["label", "value", "onClick", "onFocus", "ref"]);
|
|
14239
|
+
return (React.createElement(Surface, { isTransparent: true },
|
|
14240
|
+
React.createElement($69cb30bb0017df05$export$41fb9f06171c75f4, __assign({ className: "arc-ContentSwitcherTab", value: value, ref: ref, onClick: onClick, onFocus: onFocus }, filterAttrs(props)),
|
|
14241
|
+
React.createElement(Text, { size: "m" }, label))));
|
|
14242
|
+
};
|
|
13898
14243
|
|
|
13899
14244
|
var ContentSwitcherContent = function (_a) {
|
|
13900
14245
|
var children = _a.children, value = _a.value, _b = _a.hidden, hidden = _b === void 0 ? undefined : _b, _c = _a.forceMount, forceMount = _c === void 0 ? true : _c, props = __rest(_a, ["children", "value", "hidden", "forceMount"]);
|
|
@@ -13909,13 +14254,6 @@ var ContentSwitcherList = function (_a) {
|
|
|
13909
14254
|
var _d = React.useState(0), contentSwitcherListWidth = _d[0], setContentSwitcherListWidth = _d[1];
|
|
13910
14255
|
var tabRefs = React.useRef([]);
|
|
13911
14256
|
var listRef = React.useRef(null);
|
|
13912
|
-
var checkOverflow = function () {
|
|
13913
|
-
if (listRef.current) {
|
|
13914
|
-
setRightOverflow(listRef.current.scrollLeft + listRef.current.clientWidth <
|
|
13915
|
-
listRef.current.scrollWidth - 1);
|
|
13916
|
-
setLeftOverflow(listRef.current.scrollLeft > 0);
|
|
13917
|
-
}
|
|
13918
|
-
};
|
|
13919
14257
|
var scrollTabIntoView = function (tabRef) {
|
|
13920
14258
|
if (tabRef.current && listRef.current) {
|
|
13921
14259
|
var scrollLeft = tabRef.current.offsetLeft -
|
|
@@ -13934,6 +14272,13 @@ var ContentSwitcherList = function (_a) {
|
|
|
13934
14272
|
}, 100);
|
|
13935
14273
|
React.useEffect(function () {
|
|
13936
14274
|
var list = listRef.current;
|
|
14275
|
+
var checkOverflow = function () {
|
|
14276
|
+
if (listRef.current) {
|
|
14277
|
+
setRightOverflow(listRef.current.scrollLeft + listRef.current.clientWidth <
|
|
14278
|
+
listRef.current.scrollWidth - 1);
|
|
14279
|
+
setLeftOverflow(listRef.current.scrollLeft > 0);
|
|
14280
|
+
}
|
|
14281
|
+
};
|
|
13937
14282
|
var updateLayout = function () {
|
|
13938
14283
|
checkOverflow();
|
|
13939
14284
|
handleResize();
|
|
@@ -13951,7 +14296,7 @@ var ContentSwitcherList = function (_a) {
|
|
|
13951
14296
|
window.removeEventListener("resize", updateLayout);
|
|
13952
14297
|
handleResize.cancel();
|
|
13953
14298
|
};
|
|
13954
|
-
}, [children,
|
|
14299
|
+
}, [children, handleResize]);
|
|
13955
14300
|
return (React.createElement("span", { className: classNames("arc-ContentSwitcherList-wrapper", {
|
|
13956
14301
|
"arc-ContentSwitcherList-wrapper--isInset": isInset,
|
|
13957
14302
|
}), tabIndex: -1 },
|
|
@@ -13960,14 +14305,23 @@ var ContentSwitcherList = function (_a) {
|
|
|
13960
14305
|
"arc-ContentSwitcherList--isJustified": isJustified,
|
|
13961
14306
|
}), ref: listRef, "aria-label": ariaLabel }, filterAttrs(props)),
|
|
13962
14307
|
React.createElement("div", { className: "arc-ContentSwitcherList-inner" }, React.Children.map(children, function (child, index) {
|
|
13963
|
-
if (
|
|
14308
|
+
if (!React.isValidElement(child)) {
|
|
14309
|
+
return null;
|
|
14310
|
+
}
|
|
14311
|
+
if (tabRefs.current[index] !== null) {
|
|
13964
14312
|
return React.cloneElement(child, {
|
|
13965
|
-
ref: function (el) {
|
|
14313
|
+
ref: function (el) {
|
|
14314
|
+
tabRefs.current[index] = el;
|
|
14315
|
+
},
|
|
13966
14316
|
onClick: function () {
|
|
13967
|
-
|
|
14317
|
+
var el = tabRefs.current[index];
|
|
14318
|
+
if (el)
|
|
14319
|
+
scrollTabIntoView({ current: el });
|
|
13968
14320
|
},
|
|
13969
14321
|
onFocus: function () {
|
|
13970
|
-
|
|
14322
|
+
var el = tabRefs.current[index];
|
|
14323
|
+
if (el)
|
|
14324
|
+
scrollTabIntoView({ current: el });
|
|
13971
14325
|
},
|
|
13972
14326
|
});
|
|
13973
14327
|
}
|
|
@@ -16743,9 +17097,9 @@ var TrailingSlot = function (_a) {
|
|
|
16743
17097
|
};
|
|
16744
17098
|
|
|
16745
17099
|
/** Use `TextInput` as a single-line field that allows users to enter short text, such as names, email, search queries or passwords. */
|
|
16746
|
-
var TextInputComponent =
|
|
17100
|
+
var TextInputComponent = function (_a) {
|
|
16747
17101
|
var _b;
|
|
16748
|
-
var _c = _a.defaultValue, defaultValue = _c === void 0 ? "" : _c, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, inputMode = _a.inputMode, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, label = _a.label, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _g = _a.type, type = _g === void 0 ? "text" : _g, _h = _a.showPassword, showPassword = _h === void 0 ? false : _h, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _j = _a.size, size = _j === void 0 ? "m" : _j, leadingSlot = _a.leadingSlot, trailingSlot = _a.trailingSlot, _k = _a.inputAlignment, inputAlignment = _k === void 0 ? "left" : _k, width = _a.width, autoComplete = _a.autoComplete, isLoading = _a.isLoading, isErrorAlert = _a.isErrorAlert, prefix = _a.prefix, suffix = _a.suffix, clearButton = _a.clearButton, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "maxLength", "minLength", "name", "onBlur", "onFocus", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "size", "leadingSlot", "trailingSlot", "inputAlignment", "width", "autoComplete", "isLoading", "isErrorAlert", "prefix", "suffix", "clearButton"]);
|
|
17102
|
+
var ref = _a.ref, _c = _a.defaultValue, defaultValue = _c === void 0 ? "" : _c, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, inputMode = _a.inputMode, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, label = _a.label, maxLength = _a.maxLength, minLength = _a.minLength, name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, onChange = _a.onChange, placeholder = _a.placeholder, onClickDisclosure = _a.onClickDisclosure, pattern = _a.pattern, _g = _a.type, type = _g === void 0 ? "text" : _g, _h = _a.showPassword, showPassword = _h === void 0 ? false : _h, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, _j = _a.size, size = _j === void 0 ? "m" : _j, leadingSlot = _a.leadingSlot, trailingSlot = _a.trailingSlot, _k = _a.inputAlignment, inputAlignment = _k === void 0 ? "left" : _k, width = _a.width, autoComplete = _a.autoComplete, isLoading = _a.isLoading, isErrorAlert = _a.isErrorAlert, prefix = _a.prefix, suffix = _a.suffix, clearButton = _a.clearButton, props = __rest(_a, ["ref", "defaultValue", "errorMessage", "helper", "hideLabel", "id", "inputMode", "isDisabled", "isReadOnly", "isRequired", "label", "maxLength", "minLength", "name", "onBlur", "onFocus", "onChange", "placeholder", "onClickDisclosure", "pattern", "type", "showPassword", "value", "disclosureTitle", "disclosureText", "size", "leadingSlot", "trailingSlot", "inputAlignment", "width", "autoComplete", "isLoading", "isErrorAlert", "prefix", "suffix", "clearButton"]);
|
|
16749
17103
|
var _l = React.useState(false), showPasswordToggle = _l[0], setShowPasswordToggle = _l[1];
|
|
16750
17104
|
var inferredInputProps = useNumericInput({
|
|
16751
17105
|
inputMode: inputMode,
|
|
@@ -16784,12 +17138,12 @@ var TextInputComponent = React.forwardRef(function (_a, ref) {
|
|
|
16784
17138
|
isLoading ||
|
|
16785
17139
|
(clearButton === null || clearButton === void 0 ? void 0 : clearButton.onClick)) && (React.createElement(TrailingSlot, { showPassword: showPassword, isReadOnly: isReadOnly, isLoading: isLoading, clearButton: clearButton, trailingSlot: trailingSlot, isPasswordVisible: showPasswordToggle, onTogglePassword: function () { return setShowPasswordToggle(function (prev) { return !prev; }); }, size: size, isDisabled: isDisabled })),
|
|
16786
17140
|
suffix && (React.createElement("span", { className: "arc-TextInput-suffix arc-TextInput-affixes", "aria-hidden": true }, suffix))))));
|
|
16787
|
-
}
|
|
17141
|
+
};
|
|
16788
17142
|
/**
|
|
16789
17143
|
* Use `TextInput` to allow users to enter short form text.
|
|
16790
17144
|
*/
|
|
16791
|
-
var TextInput =
|
|
16792
|
-
var TextInputWithPlaceHolder =
|
|
17145
|
+
var TextInput = function (props) { return (React.createElement(TextInputComponent, __assign({}, props))); };
|
|
17146
|
+
var TextInputWithPlaceHolder = function (props) { return React.createElement(TextInputComponent, __assign({}, props)); };
|
|
16793
17147
|
|
|
16794
17148
|
var formatDate = function (value) {
|
|
16795
17149
|
return format(value, DATE_FORMAT);
|
|
@@ -16924,8 +17278,8 @@ function validateRangeOnBlur(_a) {
|
|
|
16924
17278
|
/**
|
|
16925
17279
|
* Use `DatePicker` to clearly present available dates and allow users to choose a way to enter information.
|
|
16926
17280
|
*/
|
|
16927
|
-
var DatePicker =
|
|
16928
|
-
var errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, label = _a.label, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, isRequired = _a.isRequired, _b = _a.size, size = _b === void 0 ? "m" : _b, _c = _a.value, value = _c === void 0 ? "" : _c, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onDateSelect = _a.onDateSelect, onRangeSelect = _a.onRangeSelect, onClickDisclosure = _a.onClickDisclosure, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, type = _a.type, _d = _a.isFluid, isFluid = _d === void 0 ? false : _d, _e = _a.selectionType, selectionType = _e === void 0 ? "single" : _e, disabledDates = _a.disabledDates, minDate = _a.minDate, maxDate = _a.maxDate, props = __rest(_a, ["errorMessage", "helper", "id", "label", "isDisabled", "isReadOnly", "isRequired", "size", "value", "name", "onBlur", "onChange", "onDateSelect", "onRangeSelect", "onClickDisclosure", "disclosureTitle", "disclosureText", "type", "isFluid", "selectionType", "disabledDates", "minDate", "maxDate"]);
|
|
17281
|
+
var DatePicker = function (_a) {
|
|
17282
|
+
var errorMessage = _a.errorMessage, helper = _a.helper, id = _a.id, label = _a.label, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, isRequired = _a.isRequired, _b = _a.size, size = _b === void 0 ? "m" : _b, _c = _a.value, value = _c === void 0 ? "" : _c, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onDateSelect = _a.onDateSelect, onRangeSelect = _a.onRangeSelect, onClickDisclosure = _a.onClickDisclosure, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, type = _a.type, _d = _a.isFluid, isFluid = _d === void 0 ? false : _d, _e = _a.selectionType, selectionType = _e === void 0 ? "single" : _e, disabledDates = _a.disabledDates, minDate = _a.minDate, maxDate = _a.maxDate, ref = _a.ref, props = __rest(_a, ["errorMessage", "helper", "id", "label", "isDisabled", "isReadOnly", "isRequired", "size", "value", "name", "onBlur", "onChange", "onDateSelect", "onRangeSelect", "onClickDisclosure", "disclosureTitle", "disclosureText", "type", "isFluid", "selectionType", "disabledDates", "minDate", "maxDate", "ref"]);
|
|
16929
17283
|
var _f = useThemeElement(), themeElement = _f[0], setThemeElement = _f[1];
|
|
16930
17284
|
var _g = React.useState("Choose date"), ariaLabel = _g[0], setAriaLabel = _g[1];
|
|
16931
17285
|
var _h = React.useState(false), showCalendar = _h[0], setShowCalendar = _h[1];
|
|
@@ -17069,7 +17423,7 @@ var DatePicker = React.forwardRef(function (_a, ref) {
|
|
|
17069
17423
|
React.createElement(Portal$5, { container: themeElement },
|
|
17070
17424
|
React.createElement(Content2$4, { align: "start", "aria-modal": "true", "aria-label": "Choose Date", className: "arc-DatePicker-modal", onOpenAutoFocus: handleAutoFocus, onCloseAutoFocus: handleCalendarClose },
|
|
17071
17425
|
React.createElement(Calendar, { autoFocusOnMount: true, type: type, onCancelClick: onCancelClick, selectionType: selectionType, selectedDate: convertDateStringToDate(value), selectedRange: convertRangeStringToDates(value), disabledDates: disabledDates, minDate: minDate, maxDate: maxDate, onDateSelect: handleDateSelect, onRangeSelect: handleRangeSelect }))))));
|
|
17072
|
-
}
|
|
17426
|
+
};
|
|
17073
17427
|
|
|
17074
17428
|
var lowerCaseDateFormat = DATE_FORMAT.toLowerCase();
|
|
17075
17429
|
var DatePickerRange = function (_a) {
|
|
@@ -17099,7 +17453,7 @@ var DatePickerRange = function (_a) {
|
|
|
17099
17453
|
if (inputEnd.value !== undefined && inputEnd.value !== endValue) {
|
|
17100
17454
|
setEndValue(inputEnd.value);
|
|
17101
17455
|
}
|
|
17102
|
-
}, [inputStart.value, inputEnd.value]);
|
|
17456
|
+
}, [inputStart.value, inputEnd.value, endValue, startValue]);
|
|
17103
17457
|
var handleIconClick = function (_a) {
|
|
17104
17458
|
var ref = _a.ref, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, input = _a.input;
|
|
17105
17459
|
if (ref &&
|
|
@@ -17634,6 +17988,17 @@ var Drawer = function (_a) {
|
|
|
17634
17988
|
var newHeight = dragRef.current.startH - dragRef.current.deltaY;
|
|
17635
17989
|
setDrawerHeight(Math.round(newHeight));
|
|
17636
17990
|
};
|
|
17991
|
+
var onHandleDown = function (e) {
|
|
17992
|
+
if (!contentRef.current)
|
|
17993
|
+
return;
|
|
17994
|
+
dragRef.current.active = true;
|
|
17995
|
+
// record where the pointer was when dragging started
|
|
17996
|
+
dragRef.current.startY = e.clientY;
|
|
17997
|
+
// record inital height of drawer
|
|
17998
|
+
dragRef.current.startH = contentRef.current.clientHeight;
|
|
17999
|
+
// keep moving drawer even if cursor has left pill
|
|
18000
|
+
e.target.setPointerCapture(e.pointerId);
|
|
18001
|
+
};
|
|
17637
18002
|
var resolveToPx = function (input) {
|
|
17638
18003
|
// if already a number, assume px
|
|
17639
18004
|
if (typeof input === "number")
|
|
@@ -17650,19 +18015,24 @@ var Drawer = function (_a) {
|
|
|
17650
18015
|
var numericValue = Number(str);
|
|
17651
18016
|
return Number.isFinite(numericValue) ? numericValue : undefined;
|
|
17652
18017
|
};
|
|
17653
|
-
var onHandleUpCore = function (e) {
|
|
17654
|
-
if (!
|
|
18018
|
+
var onHandleUpCore = function (e, keyboardDeltaY) {
|
|
18019
|
+
if (!contentRef.current)
|
|
17655
18020
|
return;
|
|
18021
|
+
// if the user scrolls down
|
|
17656
18022
|
if (dragDownToDismiss && contentRef.current.clientHeight < 100) {
|
|
17657
18023
|
dragRef.current.active = false;
|
|
17658
18024
|
dragRef.current.deltaY = 0;
|
|
17659
|
-
e
|
|
18025
|
+
if (e instanceof PointerEvent && (e === null || e === void 0 ? void 0 : e.currentTarget)) {
|
|
18026
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
18027
|
+
}
|
|
17660
18028
|
setDrawerHeight(undefined);
|
|
17661
18029
|
onRequestClose();
|
|
17662
18030
|
return;
|
|
17663
18031
|
}
|
|
17664
18032
|
dragRef.current.active = false;
|
|
17665
|
-
e
|
|
18033
|
+
if (e instanceof PointerEvent && (e === null || e === void 0 ? void 0 : e.currentTarget)) {
|
|
18034
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
18035
|
+
}
|
|
17666
18036
|
var currentHeight = contentRef.current.clientHeight;
|
|
17667
18037
|
// turn all snapPoints into px values. Order the values.
|
|
17668
18038
|
var snapsPx = (normalisedSnapPoints !== null && normalisedSnapPoints !== void 0 ? normalisedSnapPoints : [])
|
|
@@ -17670,9 +18040,9 @@ var Drawer = function (_a) {
|
|
|
17670
18040
|
.filter(function (value) { return value !== undefined; }) // remove undefined values
|
|
17671
18041
|
.sort(function (a, b) { return a - b; });
|
|
17672
18042
|
var targetSnap = undefined;
|
|
18043
|
+
var deltaY = Math.sign(dragRef.current.deltaY);
|
|
17673
18044
|
if (snapBehaviour === "next") {
|
|
17674
|
-
|
|
17675
|
-
if (deltaY === -1) {
|
|
18045
|
+
if (deltaY <= -1) {
|
|
17676
18046
|
// User scrolled up
|
|
17677
18047
|
for (var i = 0; i < snapsPx.length; i++) {
|
|
17678
18048
|
if (snapsPx[i] > currentHeight) {
|
|
@@ -17684,7 +18054,7 @@ var Drawer = function (_a) {
|
|
|
17684
18054
|
}
|
|
17685
18055
|
}
|
|
17686
18056
|
}
|
|
17687
|
-
else if (deltaY
|
|
18057
|
+
else if (deltaY >= 1) {
|
|
17688
18058
|
// User scrolled down
|
|
17689
18059
|
for (var i = 0; i < snapsPx.length; i++) {
|
|
17690
18060
|
if (snapsPx[i] < currentHeight) {
|
|
@@ -17725,17 +18095,6 @@ var Drawer = function (_a) {
|
|
|
17725
18095
|
}
|
|
17726
18096
|
setDrawerHeight(targetSnap);
|
|
17727
18097
|
};
|
|
17728
|
-
var onHandleDown = function (e) {
|
|
17729
|
-
if (!contentRef.current)
|
|
17730
|
-
return;
|
|
17731
|
-
dragRef.current.active = true;
|
|
17732
|
-
// record where the pointer was when dragging started
|
|
17733
|
-
dragRef.current.startY = e.clientY;
|
|
17734
|
-
// record inital height of drawer
|
|
17735
|
-
dragRef.current.startH = contentRef.current.clientHeight;
|
|
17736
|
-
// keep moving drawer even if cursor has left pill
|
|
17737
|
-
e.target.setPointerCapture(e.pointerId);
|
|
17738
|
-
};
|
|
17739
18098
|
return (React.createElement("div", { ref: setThemeElement },
|
|
17740
18099
|
React.createElement(Root$1, { open: isOpen },
|
|
17741
18100
|
React.createElement(Portal$1, { container: themeElement },
|
|
@@ -17752,16 +18111,16 @@ var Drawer = function (_a) {
|
|
|
17752
18111
|
React.createElement("button", { "aria-label": "close", onClick: onRequestClose, className: "arc-Drawer-closeButton" },
|
|
17753
18112
|
React.createElement(ThemeIcon, { size: 32, icon: "drawerClose" })),
|
|
17754
18113
|
draggable && position === "bottom" && (React.createElement("div", { className: "arc-Drawer-dragHandle", onPointerDown: onHandleDown, onPointerUp: onHandleUp, onPointerMove: onHandleMove, onClick: onHandleClick, role: "separator", "aria-label": "Drag to resize the drawer" },
|
|
17755
|
-
React.createElement("div", { className: "arc-Drawer-dragHandlePill", "data-testid": "arc-Drawer-dragHandlePill" })))),
|
|
18114
|
+
React.createElement("div", { className: "arc-Drawer-dragHandlePill", tabIndex: -1, "data-testid": "arc-Drawer-dragHandlePill" })))),
|
|
17756
18115
|
children)))))));
|
|
17757
18116
|
};
|
|
17758
18117
|
|
|
17759
18118
|
/**
|
|
17760
18119
|
* Use `Rule` to display a horizontal or vertical rule.
|
|
17761
18120
|
*/
|
|
17762
|
-
var Rule = function (_a
|
|
18121
|
+
var Rule = function (_a) {
|
|
17763
18122
|
var _b;
|
|
17764
|
-
var _c = _a.orientation, orientation = _c === void 0 ? "horizontal" : _c;
|
|
18123
|
+
var _c = _a.orientation, orientation = _c === void 0 ? "horizontal" : _c, props = __rest(_a, ["orientation"]);
|
|
17765
18124
|
var surface = React.useContext(Context$3).surface;
|
|
17766
18125
|
return (React.createElement("hr", __assign({ className: classNames((_b = {
|
|
17767
18126
|
"arc-Rule": true
|
|
@@ -17772,24 +18131,27 @@ var Rule = function (_a, props) {
|
|
|
17772
18131
|
};
|
|
17773
18132
|
|
|
17774
18133
|
var DrawerHeader = function (_a) {
|
|
17775
|
-
var title = _a.title, _b = _a.isFixed, isFixed = _b === void 0 ? false : _b, isResponsive = _a.isResponsive, props = __rest(_a, ["title", "isFixed", "isResponsive"]);
|
|
18134
|
+
var title = _a.title, _b = _a.isFixed, isFixed = _b === void 0 ? false : _b, isResponsive = _a.isResponsive, children = _a.children, _c = _a.isFullBleed, isFullBleed = _c === void 0 ? false : _c, _d = _a.titleWordWrap, titleWordWrap = _d === void 0 ? false : _d, props = __rest(_a, ["title", "isFixed", "isResponsive", "children", "isFullBleed", "titleWordWrap"]);
|
|
17776
18135
|
return (React.createElement(React.Fragment, null,
|
|
17777
18136
|
React.createElement("div", __assign({ className: classNames("arc-DrawerHeader", {
|
|
17778
18137
|
"arc-DrawerHeader--isFixed": isFixed,
|
|
18138
|
+
"arc-DrawerHeader--isFullBleed": isFullBleed,
|
|
17779
18139
|
}) }, filterAttrs(props)),
|
|
17780
18140
|
React.createElement("div", { className: "arc-DrawerHeader-content" },
|
|
17781
|
-
React.createElement("div", { className: "arc-DrawerHeader-titleContainer" },
|
|
18141
|
+
title && !children && (React.createElement("div", { className: "arc-DrawerHeader-titleContainer" },
|
|
17782
18142
|
React.createElement(Title, { asChild: true },
|
|
17783
|
-
React.createElement(Heading, { isResponsive: isResponsive, size: "m" }, title)))),
|
|
18143
|
+
React.createElement(Heading, { isResponsive: isResponsive, size: "m", isWordWrap: titleWordWrap }, title)))),
|
|
18144
|
+
children && !title && children),
|
|
17784
18145
|
isFixed && (React.createElement("div", { className: "arc-DrawerHeader-divider" },
|
|
17785
18146
|
React.createElement(Rule, null))))));
|
|
17786
18147
|
};
|
|
17787
18148
|
|
|
17788
18149
|
var DrawerFooter = function (_a) {
|
|
17789
|
-
var isFixed = _a.isFixed, children = _a.children;
|
|
18150
|
+
var isFixed = _a.isFixed, _b = _a.isFullBleed, isFullBleed = _b === void 0 ? false : _b, children = _a.children;
|
|
17790
18151
|
return (React.createElement(React.Fragment, null,
|
|
17791
18152
|
React.createElement("div", { className: classNames("arc-DrawerFooter", {
|
|
17792
18153
|
"arc-DrawerFooter--isFixed": isFixed,
|
|
18154
|
+
"arc-DrawerFooter--isFullBleed": isFullBleed,
|
|
17793
18155
|
}) },
|
|
17794
18156
|
isFixed && (React.createElement("div", { className: "arc-DrawerFooter-divider" },
|
|
17795
18157
|
React.createElement(Rule, null))),
|
|
@@ -17918,13 +18280,13 @@ var FilterItem = function (_a) {
|
|
|
17918
18280
|
* Use `GhostedHeroBanner` to grab attention and convey the main message or purpose of a webpage
|
|
17919
18281
|
*/
|
|
17920
18282
|
var GhostedHeroBanner = function (_a) {
|
|
17921
|
-
var heading = _a.heading, headingLevel = _a.headingLevel, label = _a.label, text = _a.text, img = _a.img, children = _a.children, _b = _a.fontStyle, fontStyle = _b === void 0 ? "default" : _b, props = __rest(_a, ["heading", "headingLevel", "label", "text", "img", "children", "fontStyle"]);
|
|
18283
|
+
var heading = _a.heading, headingLevel = _a.headingLevel, label = _a.label, text = _a.text, img = _a.img, children = _a.children, _b = _a.fontStyle, fontStyle = _b === void 0 ? "default" : _b, _c = _a.headingWordWrap, headingWordWrap = _c === void 0 ? false : _c, props = __rest(_a, ["heading", "headingLevel", "label", "text", "img", "children", "fontStyle", "headingWordWrap"]);
|
|
17922
18284
|
return (React.createElement("div", __assign({ className: "arc-GhostedHeroBanner" }, filterAttrs(props)),
|
|
17923
18285
|
React.createElement("div", { className: "arc-GhostedHeroBanner-content" },
|
|
17924
18286
|
label && (React.createElement(React.Fragment, null,
|
|
17925
18287
|
React.createElement(Heading, { fontStyle: "overline" }, label),
|
|
17926
18288
|
React.createElement(VerticalSpace, { size: "8" }))),
|
|
17927
|
-
React.createElement(Heading, { level: headingLevel, size: fontStyle === "default" ? "xl" : "xxl", fontStyle: fontStyle }, heading),
|
|
18289
|
+
React.createElement(Heading, { level: headingLevel, size: fontStyle === "default" ? "xl" : "xxl", fontStyle: fontStyle, isWordWrap: headingWordWrap }, heading),
|
|
17928
18290
|
text && (React.createElement(React.Fragment, null,
|
|
17929
18291
|
React.createElement(VerticalSpace, { size: "16" }),
|
|
17930
18292
|
React.createElement("span", { className: "arc-TemplateBanner-text" }, text))),
|
|
@@ -18125,11 +18487,11 @@ var GroupItem = function (_a) {
|
|
|
18125
18487
|
|
|
18126
18488
|
/** Use `HeroBanner` to promote key content or products with bold visuals and messaging. */
|
|
18127
18489
|
var HeroBanner = function (_a) {
|
|
18128
|
-
var heading = _a.heading, label = _a.label, text = _a.text, img = _a.img, _b = _a.contentRatio, contentRatio = _b === void 0 ? "1/1" : _b, children = _a.children, minHeight = _a.minHeight, _c = _a.isReversed, isReversed = _c === void 0 ? false : _c, _d = _a.isElevated, isElevated = _d === void 0 ? false : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.extendBeyondContainer, extendBeyondContainer = _f === void 0 ? false : _f, _g = _a.type, type = _g === void 0 ? "light" : _g, _h = _a.fontStyle, fontStyle = _h === void 0 ? "default" : _h, props = __rest(_a, ["heading", "label", "text", "img", "contentRatio", "children", "minHeight", "isReversed", "isElevated", "headingLevel", "extendBeyondContainer", "type", "fontStyle"]);
|
|
18490
|
+
var heading = _a.heading, label = _a.label, text = _a.text, img = _a.img, _b = _a.contentRatio, contentRatio = _b === void 0 ? "1/1" : _b, children = _a.children, minHeight = _a.minHeight, _c = _a.isReversed, isReversed = _c === void 0 ? false : _c, _d = _a.isElevated, isElevated = _d === void 0 ? false : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.extendBeyondContainer, extendBeyondContainer = _f === void 0 ? false : _f, _g = _a.type, type = _g === void 0 ? "light" : _g, _h = _a.fontStyle, fontStyle = _h === void 0 ? "default" : _h, _j = _a.headingWordWrap, headingWordWrap = _j === void 0 ? false : _j, props = __rest(_a, ["heading", "label", "text", "img", "contentRatio", "children", "minHeight", "isReversed", "isElevated", "headingLevel", "extendBeyondContainer", "type", "fontStyle", "headingWordWrap"]);
|
|
18129
18491
|
return (React.createElement(ConditionalWrapper, { condition: extendBeyondContainer, wrapper: function (children) { return (React.createElement("div", { className: classNames({
|
|
18130
18492
|
"arc-HeroBanner--expanded": extendBeyondContainer,
|
|
18131
18493
|
}) }, children)); } },
|
|
18132
|
-
React.createElement(TemplateBanner, __assign({ heading: heading, label: label, text: text, img: img, contentRatio: contentRatio, minHeight: minHeight, isReversed: isReversed, isElevated: isElevated, headingLevel: headingLevel, type: type, headingSize: fontStyle === "default" ? "xl" : "xxl", fontStyle: fontStyle, alignment: "center" }, filterAttrs(props)), children)));
|
|
18494
|
+
React.createElement(TemplateBanner, __assign({ heading: heading, label: label, text: text, img: img, contentRatio: contentRatio, minHeight: minHeight, isReversed: isReversed, isElevated: isElevated, headingLevel: headingLevel, type: type, headingSize: fontStyle === "default" ? "xl" : "xxl", fontStyle: fontStyle, alignment: "center", headingWordWrap: headingWordWrap }, filterAttrs(props)), children)));
|
|
18133
18495
|
};
|
|
18134
18496
|
|
|
18135
18497
|
/**
|
|
@@ -18167,8 +18529,8 @@ const ArcIconWarn =
|
|
|
18167
18529
|
/**
|
|
18168
18530
|
* Use `HeroButton` as the most prominent call-to-action. It should be used sparingly at the most important parts of a user journey only.
|
|
18169
18531
|
*/
|
|
18170
|
-
var HeroButton =
|
|
18171
|
-
var label = _a.label, _b = _a.buttonStyle, buttonStyle = _b === void 0 ? "primary" : _b, icon = _a.icon, ariaLabel = _a.ariaLabel, _c = _a.isLoading, isLoading = _c === void 0 ? false : _c, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["label", "buttonStyle", "icon", "ariaLabel", "isLoading", "onClick", "href", "id", "rel", "target", "type", "form"]);
|
|
18532
|
+
var HeroButton = function (_a) {
|
|
18533
|
+
var label = _a.label, _b = _a.buttonStyle, buttonStyle = _b === void 0 ? "primary" : _b, icon = _a.icon, ariaLabel = _a.ariaLabel, _c = _a.isLoading, isLoading = _c === void 0 ? false : _c, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, type = _a.type, form = _a.form, ref = _a.ref, props = __rest(_a, ["label", "buttonStyle", "icon", "ariaLabel", "isLoading", "onClick", "href", "id", "rel", "target", "type", "form", "ref"]);
|
|
18172
18534
|
var surface = React.useContext(Context$3).surface;
|
|
18173
18535
|
var HeroButtonClasses = classNames("arc-HeroButton", ["arc-HeroButton--".concat(camelcase(buttonStyle))], {
|
|
18174
18536
|
"arc-HeroButton--onDarkSurface": surface === "dark",
|
|
@@ -18204,7 +18566,7 @@ var HeroButton = React.forwardRef(function (_a, ref) {
|
|
|
18204
18566
|
: HeroButtonIcons[icon] }))),
|
|
18205
18567
|
isLoading && (React.createElement("span", { className: "arc-HeroButton-icon" },
|
|
18206
18568
|
React.createElement(Spinner, { size: "xxl" }))))));
|
|
18207
|
-
}
|
|
18569
|
+
};
|
|
18208
18570
|
|
|
18209
18571
|
/** Use `Hidden` to hide it's children at specific breakpoints */
|
|
18210
18572
|
var Hidden = function (_a) {
|
|
@@ -18245,8 +18607,8 @@ var CardFooter = function (_a) {
|
|
|
18245
18607
|
|
|
18246
18608
|
/** Use `CardHeading` internally within card components to display a title, icon, or leading content at the top of a card. */
|
|
18247
18609
|
var CardHeading = function (_a) {
|
|
18248
|
-
var onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onBlur = _a.onBlur, onFocus = _a.onFocus, href = _a.href, heading = _a.heading, _b = _a.size, size = _b === void 0 ? "m" : _b, _c = _a.linkData, linkData = _c === void 0 ? {} : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d;
|
|
18249
|
-
return (React.createElement(Heading, { level: headingLevel, size: size, isWordWrap:
|
|
18610
|
+
var onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onBlur = _a.onBlur, onFocus = _a.onFocus, href = _a.href, heading = _a.heading, _b = _a.size, size = _b === void 0 ? "m" : _b, _c = _a.linkData, linkData = _c === void 0 ? {} : _c, _d = _a.headingLevel, headingLevel = _d === void 0 ? "2" : _d, _e = _a.headingWordWrap, headingWordWrap = _e === void 0 ? false : _e;
|
|
18611
|
+
return (React.createElement(Heading, { level: headingLevel, size: size, isWordWrap: headingWordWrap }, href ? (React.createElement("a", __assign({ className: "arc-CardHeading-link", href: href, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur }, filterAttrs(linkData)), heading)) : (heading)));
|
|
18250
18612
|
};
|
|
18251
18613
|
|
|
18252
18614
|
/** Use `HorizontalCard` to display card content in a horizontal layout. */
|
|
@@ -18270,8 +18632,8 @@ var HorizontalCard = function (_a) {
|
|
|
18270
18632
|
|
|
18271
18633
|
/** Use `ImpactCard` for important content that needs additional hierarchy and prominence. */
|
|
18272
18634
|
var ImpactCard = function (_a) {
|
|
18273
|
-
var url = _a.url, onClick = _a.onClick, heading = _a.heading, img = _a.img, label = _a.label, minHeight = _a.minHeight, _b = _a.headingSize, headingSize = _b === void 0 ? "m" : _b, _c = _a.linkData, linkData =
|
|
18274
|
-
var
|
|
18635
|
+
var url = _a.url, onClick = _a.onClick, heading = _a.heading, img = _a.img, label = _a.label, minHeight = _a.minHeight, _b = _a.headingSize, headingSize = _b === void 0 ? "m" : _b, _c = _a.headingWordWrap, headingWordWrap = _c === void 0 ? false : _c, _d = _a.linkData, linkData = _d === void 0 ? {} : _d, _e = _a.pathway, pathway = _e === void 0 ? "light" : _e, _f = _a.headingLevel, headingLevel = _f === void 0 ? "2" : _f, _g = _a.buttonIcon, buttonIcon = _g === void 0 ? "arrow" : _g, _h = _a.labelLevel, labelLevel = _h === void 0 ? "3" : _h, props = __rest(_a, ["url", "onClick", "heading", "img", "label", "minHeight", "headingSize", "headingWordWrap", "linkData", "pathway", "headingLevel", "buttonIcon", "labelLevel"]);
|
|
18636
|
+
var _j = React.useState(false), showHoverState = _j[0], setShowHoverState = _j[1];
|
|
18275
18637
|
var surface = React.useContext(Context$3).surface;
|
|
18276
18638
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
18277
18639
|
var isDarkPathway = pathway === "dark";
|
|
@@ -18287,7 +18649,7 @@ var ImpactCard = function (_a) {
|
|
|
18287
18649
|
label && (React.createElement("div", { className: "arc-ImpactCard-label" },
|
|
18288
18650
|
React.createElement(Heading, { level: labelLevel, fontStyle: "overline" }, label),
|
|
18289
18651
|
React.createElement(VerticalSpace, { size: "16" }))),
|
|
18290
|
-
React.createElement(CardHeading, { heading: heading, size: headingSize, headingLevel: headingLevel, linkData: linkData, href: url, onClick: onClick, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false) })),
|
|
18652
|
+
React.createElement(CardHeading, { heading: heading, size: headingSize, headingLevel: headingLevel, linkData: linkData, href: url, onClick: onClick, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false), headingWordWrap: headingWordWrap })),
|
|
18291
18653
|
React.createElement(CardFooter, { buttonIcon: buttonIcon, showButton: true, isDarkPathway: isDarkPathway, isHovered: showHoverState })));
|
|
18292
18654
|
};
|
|
18293
18655
|
|
|
@@ -18309,7 +18671,7 @@ const BtIconArrowRightFill =
|
|
|
18309
18671
|
|
|
18310
18672
|
/** Use `InformationCard` for flexibility and the ability to focus and highlight product specific content. */
|
|
18311
18673
|
var InformationCard = function (_a) {
|
|
18312
|
-
var cardUrl = _a.cardUrl, onClick = _a.onClick, heading = _a.heading, text = _a.text, label = _a.label, footerLogo = _a.footerLogo, button = _a.button, image = _a.image, badges = _a.badges, icon = _a.icon, minHeight = _a.minHeight, minHeights = _a.minHeights, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, _c = _a.labelLevel, labelLevel = _c === void 0 ? "3" : _c, props = __rest(_a, ["cardUrl", "onClick", "heading", "text", "label", "footerLogo", "button", "image", "badges", "icon", "minHeight", "minHeights", "headingLevel", "labelLevel"]);
|
|
18674
|
+
var cardUrl = _a.cardUrl, onClick = _a.onClick, heading = _a.heading, text = _a.text, label = _a.label, footerLogo = _a.footerLogo, button = _a.button, image = _a.image, badges = _a.badges, icon = _a.icon, minHeight = _a.minHeight, minHeights = _a.minHeights, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, _c = _a.labelLevel, labelLevel = _c === void 0 ? "3" : _c, headingWordWrap = _a.headingWordWrap, props = __rest(_a, ["cardUrl", "onClick", "heading", "text", "label", "footerLogo", "button", "image", "badges", "icon", "minHeight", "minHeights", "headingLevel", "labelLevel", "headingWordWrap"]);
|
|
18313
18675
|
var surface = React.useContext(Context$3).surface;
|
|
18314
18676
|
var _d = React.useState(false), showHoverState = _d[0], setShowHoverState = _d[1];
|
|
18315
18677
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
@@ -18331,7 +18693,7 @@ var InformationCard = function (_a) {
|
|
|
18331
18693
|
window.removeEventListener("resize", checkMinHeight);
|
|
18332
18694
|
checkMinHeight.cancel();
|
|
18333
18695
|
};
|
|
18334
|
-
}, [minHeights,
|
|
18696
|
+
}, [minHeights, checkMinHeight]);
|
|
18335
18697
|
return (React.createElement("div", __assign({ style: { minHeight: minHeight ? minHeight : minimumHeight }, className: classNames("arc-InformationCard", {
|
|
18336
18698
|
"arc-InformationCard--isALink": cardUrl,
|
|
18337
18699
|
"arc-InformationCard--outlined": cardUrl && showHoverState,
|
|
@@ -18348,7 +18710,7 @@ var InformationCard = function (_a) {
|
|
|
18348
18710
|
label && (React.createElement(React.Fragment, null,
|
|
18349
18711
|
React.createElement("div", { className: "arc-InformationCard-label" },
|
|
18350
18712
|
React.createElement(Heading, { level: labelLevel, fontStyle: "overline" }, label)))),
|
|
18351
|
-
React.createElement(CardHeading, { heading: heading, headingLevel: headingLevel, href: cardUrl, onClick: onClick, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false) }),
|
|
18713
|
+
React.createElement(CardHeading, { heading: heading, headingLevel: headingLevel, href: cardUrl, onClick: onClick, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false), headingWordWrap: headingWordWrap }),
|
|
18352
18714
|
text && React.createElement(Text, null, text)),
|
|
18353
18715
|
(button || badges || footerLogo) && (React.createElement("div", { className: "arc-InformationCard-footer" },
|
|
18354
18716
|
badges && (React.createElement(React.Fragment, null,
|
|
@@ -18389,10 +18751,10 @@ var VideoPlayer$1 = React.lazy(function () {
|
|
|
18389
18751
|
* Use `MediaCard` to contain content and an image about a single subject.
|
|
18390
18752
|
*/
|
|
18391
18753
|
var MediaCard = function (_a) {
|
|
18392
|
-
var media = _a.media, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, _b = _a.labelLevel, labelLevel = _b === void 0 ? "3" : _b, text = _a.text, metaText = _a.metaText, minHeight = _a.minHeight, _c = _a.buttonIcon, buttonIcon = _c === void 0 ? "arrow" : _c, _d = _a.isContained, isContained = _d === void 0 ? true : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, props = __rest(_a, ["media", "url", "onClick", "heading", "label", "labelLevel", "text", "metaText", "minHeight", "buttonIcon", "isContained", "headingLevel"]);
|
|
18754
|
+
var media = _a.media, url = _a.url, onClick = _a.onClick, heading = _a.heading, label = _a.label, _b = _a.labelLevel, labelLevel = _b === void 0 ? "3" : _b, text = _a.text, metaText = _a.metaText, minHeight = _a.minHeight, _c = _a.buttonIcon, buttonIcon = _c === void 0 ? "arrow" : _c, _d = _a.isContained, isContained = _d === void 0 ? true : _d, _e = _a.headingLevel, headingLevel = _e === void 0 ? "2" : _e, _f = _a.headingWordWrap, headingWordWrap = _f === void 0 ? false : _f, props = __rest(_a, ["media", "url", "onClick", "heading", "label", "labelLevel", "text", "metaText", "minHeight", "buttonIcon", "isContained", "headingLevel", "headingWordWrap"]);
|
|
18393
18755
|
var surface = React.useContext(Context$3).surface;
|
|
18394
|
-
var
|
|
18395
|
-
var
|
|
18756
|
+
var _g = React.useState(false), isClient = _g[0], setIsClient = _g[1];
|
|
18757
|
+
var _h = React.useState(false), showHoverState = _h[0], setShowHoverState = _h[1];
|
|
18396
18758
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
18397
18759
|
React.useEffect(function () {
|
|
18398
18760
|
setIsClient(true);
|
|
@@ -18411,7 +18773,7 @@ var MediaCard = function (_a) {
|
|
|
18411
18773
|
label && (React.createElement("div", { className: "arc-MediaCard-label" },
|
|
18412
18774
|
React.createElement(Heading, { level: labelLevel, fontStyle: "overline" }, label),
|
|
18413
18775
|
React.createElement(VerticalSpace, { size: "16" }))),
|
|
18414
|
-
React.createElement(CardHeading, { heading: heading, headingLevel: headingLevel, href: media.type !== "video" ? url : undefined, onClick: media.type !== "video" ? onClick : undefined, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false) }),
|
|
18776
|
+
React.createElement(CardHeading, { heading: heading, headingLevel: headingLevel, href: media.type !== "video" ? url : undefined, onClick: media.type !== "video" ? onClick : undefined, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false), headingWordWrap: headingWordWrap }),
|
|
18415
18777
|
React.createElement("div", { className: "arc-MediaCard-textContainer" }, text && (React.createElement(React.Fragment, null,
|
|
18416
18778
|
React.createElement(VerticalSpace, { size: "16" }),
|
|
18417
18779
|
React.createElement(Text, null, text),
|
|
@@ -19859,7 +20221,8 @@ var MenuItem = function (_a) {
|
|
|
19859
20221
|
/**
|
|
19860
20222
|
* Visual separator used to divide groups of menu items.
|
|
19861
20223
|
*/
|
|
19862
|
-
var MenuSeparator = function (
|
|
20224
|
+
var MenuSeparator = function (_a) {
|
|
20225
|
+
var props = __rest(_a, []);
|
|
19863
20226
|
return (React.createElement(Separator2, __assign({ className: "arc-MenuSeparator" }, filterAttrs(props)),
|
|
19864
20227
|
React.createElement(Rule, null)));
|
|
19865
20228
|
};
|
|
@@ -19867,8 +20230,8 @@ var MenuSeparator = function (props) {
|
|
|
19867
20230
|
/**
|
|
19868
20231
|
* The component that pops out when the dropdown menu is open.
|
|
19869
20232
|
*/
|
|
19870
|
-
var MenuContent =
|
|
19871
|
-
var children = _a.children, width = _a.width, minWidth = _a.minWidth, maxWidth = _a.maxWidth, _b = _a.align, align = _b === void 0 ? "start" : _b, alignOffset = _a.alignOffset, side = _a.side, initalTitle = _a.initalTitle, isFluidToViewport = _a.isFluidToViewport, props = __rest(_a, ["children", "width", "minWidth", "maxWidth", "align", "alignOffset", "side", "initalTitle", "isFluidToViewport"]);
|
|
20233
|
+
var MenuContent = function (_a) {
|
|
20234
|
+
var ref = _a.ref, children = _a.children, width = _a.width, minWidth = _a.minWidth, maxWidth = _a.maxWidth, _b = _a.align, align = _b === void 0 ? "start" : _b, alignOffset = _a.alignOffset, side = _a.side, initalTitle = _a.initalTitle, isFluidToViewport = _a.isFluidToViewport, props = __rest(_a, ["ref", "children", "width", "minWidth", "maxWidth", "align", "alignOffset", "side", "initalTitle", "isFluidToViewport"]);
|
|
19872
20235
|
var _c = useMenuContext(), isMobileMenu = _c.isMobileMenu, stack = _c.stack, goBack = _c.goBack, defaultWidth = _c.defaultWidth, reset = _c.reset;
|
|
19873
20236
|
if (!isMobileMenu) {
|
|
19874
20237
|
return (React.createElement(Content2, __assign({ ref: ref, style: { width: width !== null && width !== void 0 ? width : defaultWidth, minWidth: minWidth, maxWidth: maxWidth }, className: "arc-MenuContent", sideOffset: 12, loop: true, collisionPadding: 0, forceMount: true, align: align, alignOffset: alignOffset, side: side }, filterAttrs(props)),
|
|
@@ -19889,7 +20252,7 @@ var MenuContent = React.forwardRef(function (_a, ref) {
|
|
|
19889
20252
|
React.createElement(MenuItem, { onClick: goBack, leadingIcon: BtIconChevronLeftMid }, prevTitle),
|
|
19890
20253
|
React.createElement(MenuSeparator, null))),
|
|
19891
20254
|
React.createElement("div", { key: stack.length, className: "arc-MenuContent-content arc-MenuContent-fade" }, active)));
|
|
19892
|
-
}
|
|
20255
|
+
};
|
|
19893
20256
|
|
|
19894
20257
|
/**
|
|
19895
20258
|
* Displays footer content at the bottom of the menu.
|
|
@@ -20014,21 +20377,21 @@ var MenuItemMultiLevel = function (_a) {
|
|
|
20014
20377
|
if (!trigger || !pairedContent) {
|
|
20015
20378
|
console.warn("MenuItemMultiLevel requires both a Trigger and Portal");
|
|
20016
20379
|
}
|
|
20017
|
-
// Inject content into the trigger,
|
|
20380
|
+
// Inject content into the trigger, skip rendering the portal in mobile
|
|
20018
20381
|
return React.cloneElement(trigger, { pairedContent: pairedContent });
|
|
20019
20382
|
};
|
|
20020
20383
|
|
|
20021
20384
|
/**
|
|
20022
20385
|
* The multi-level menu content that pops out when a menu item with children is hovered or clicked.
|
|
20023
20386
|
*/
|
|
20024
|
-
var MenuItemMultiLevelContent =
|
|
20025
|
-
var children = _a.children, width = _a.width, minWidth = _a.minWidth, maxWidth = _a.maxWidth, alignOffset = _a.alignOffset, props = __rest(_a, ["children", "width", "minWidth", "maxWidth", "alignOffset"]);
|
|
20387
|
+
var MenuItemMultiLevelContent = function (_a) {
|
|
20388
|
+
var ref = _a.ref, children = _a.children, width = _a.width, minWidth = _a.minWidth, maxWidth = _a.maxWidth, alignOffset = _a.alignOffset, props = __rest(_a, ["ref", "children", "width", "minWidth", "maxWidth", "alignOffset"]);
|
|
20026
20389
|
var _b = useMenuContext(), isMobileMenu = _b.isMobileMenu, defaultWidth = _b.defaultWidth;
|
|
20027
20390
|
if (isMobileMenu) {
|
|
20028
20391
|
return React.createElement(React.Fragment, null, children);
|
|
20029
20392
|
}
|
|
20030
20393
|
return (React.createElement(SubContent2, __assign({ ref: ref, style: { width: width !== null && width !== void 0 ? width : defaultWidth, minWidth: minWidth, maxWidth: maxWidth }, className: "arc-MenuContent", sideOffset: 24, collisionPadding: 12, avoidCollisions: true, alignOffset: alignOffset }, filterAttrs(props)), children));
|
|
20031
|
-
}
|
|
20394
|
+
};
|
|
20032
20395
|
MenuItemMultiLevelContent.displayName = "MenuItemMultiLevelContent";
|
|
20033
20396
|
|
|
20034
20397
|
/**
|
|
@@ -20085,7 +20448,7 @@ var MenuTrigger = function (_a) {
|
|
|
20085
20448
|
/** Use `Modal` to display information that needs immediate action from a user. */
|
|
20086
20449
|
var Modal = function (_a) {
|
|
20087
20450
|
var _b;
|
|
20088
|
-
var title = _a.title, description = _a.description, ariaDescribedBy = _a.ariaDescribedBy, isOpen = _a.isOpen, actions = _a.actions, onRequestClose = _a.onRequestClose, children = _a.children, _c = _a.role, role = _c === void 0 ? "dialog" : _c, _d = _a.shouldReturnFocus, shouldReturnFocus = _d === void 0 ? true : _d, _e = _a.isContentScrollable, isContentScrollable = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "l" : _f, _g = _a.fullBleed, fullBleed = _g === void 0 ? false : _g, customWidths = _a.customWidths, props = __rest(_a, ["title", "description", "ariaDescribedBy", "isOpen", "actions", "onRequestClose", "children", "role", "shouldReturnFocus", "isContentScrollable", "size", "fullBleed", "customWidths"]);
|
|
20451
|
+
var title = _a.title, description = _a.description, ariaDescribedBy = _a.ariaDescribedBy, isOpen = _a.isOpen, actions = _a.actions, onRequestClose = _a.onRequestClose, children = _a.children, _c = _a.role, role = _c === void 0 ? "dialog" : _c, _d = _a.shouldReturnFocus, shouldReturnFocus = _d === void 0 ? true : _d, _e = _a.isContentScrollable, isContentScrollable = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "l" : _f, _g = _a.fullBleed, fullBleed = _g === void 0 ? false : _g, customWidths = _a.customWidths, titleWordWrap = _a.titleWordWrap, props = __rest(_a, ["title", "description", "ariaDescribedBy", "isOpen", "actions", "onRequestClose", "children", "role", "shouldReturnFocus", "isContentScrollable", "size", "fullBleed", "customWidths", "titleWordWrap"]);
|
|
20089
20452
|
var _h = useThemeElement(), themeElement = _h[0], setThemeElement = _h[1];
|
|
20090
20453
|
var triggerRef = React.useRef(null);
|
|
20091
20454
|
var setTriggerElement = function () {
|
|
@@ -20126,7 +20489,7 @@ var Modal = function (_a) {
|
|
|
20126
20489
|
React.createElement(VerticalSpace, { size: "24" }),
|
|
20127
20490
|
React.createElement(Surface, null,
|
|
20128
20491
|
React.createElement(Title, { asChild: true },
|
|
20129
|
-
React.createElement(Heading, { level: "1", size: "m" }, title))),
|
|
20492
|
+
React.createElement(Heading, { level: "1", size: "m", isWordWrap: titleWordWrap }, title))),
|
|
20130
20493
|
React.createElement(VerticalSpace, { size: "12" })))),
|
|
20131
20494
|
React.createElement("div", { className: "arc-Modal-content" },
|
|
20132
20495
|
title && description && (React.createElement("div", { className: "arc-Modal-section" },
|
|
@@ -20227,8 +20590,8 @@ var PaginationSimple = function (_a) {
|
|
|
20227
20590
|
* Use `Popover` to display content in a portal, triggered by a button.
|
|
20228
20591
|
*/
|
|
20229
20592
|
var Popover = function (_a) {
|
|
20230
|
-
var align = _a.align, ariaLabel = _a.ariaLabel, alignOffset = _a.alignOffset, _b = _a.arrow, arrow = _b === void 0 ? true : _b, _c = _a.background, background = _c === void 0 ? "light" : _c, children = _a.children, content = _a.content, _d = _a.asChild, asChild = _d === void 0 ? false : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 452 : _e, minHeight = _a.minHeight, onCloseAutoFocus = _a.onCloseAutoFocus, onEscapeKeyDown = _a.onEscapeKeyDown, onFocusOutside = _a.onFocusOutside, onInteractOutside = _a.onInteractOutside, onOpenAutoFocus = _a.onOpenAutoFocus, onPointerDownOutside = _a.onPointerDownOutside, onOpenChange = _a.onOpenChange, open = _a.open, _f = _a.constrainToViewport, constrainToViewport = _f === void 0 ? true : _f, side = _a.side, _g = _a.sideOffset, sideOffset = _g === void 0 ? 0 : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 100 : _h, _j = _a.hideWhenDetached, hideWhenDetached = _j === void 0 ? false : _j, _k = _a.useBespokeTrigger, useBespokeTrigger = _k === void 0 ? false : _k, props = __rest(_a, ["align", "ariaLabel", "alignOffset", "arrow", "background", "children", "content", "asChild", "maxWidth", "minHeight", "onCloseAutoFocus", "onEscapeKeyDown", "onFocusOutside", "onInteractOutside", "onOpenAutoFocus", "onPointerDownOutside", "onOpenChange", "open", "constrainToViewport", "side", "sideOffset", "zIndex", "hideWhenDetached", "useBespokeTrigger"]);
|
|
20231
|
-
var
|
|
20593
|
+
var align = _a.align, ariaLabel = _a.ariaLabel, alignOffset = _a.alignOffset, _b = _a.arrow, arrow = _b === void 0 ? true : _b, _c = _a.background, background = _c === void 0 ? "light" : _c, children = _a.children, content = _a.content, _d = _a.asChild, asChild = _d === void 0 ? false : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 452 : _e, minHeight = _a.minHeight, onCloseAutoFocus = _a.onCloseAutoFocus, onEscapeKeyDown = _a.onEscapeKeyDown, onFocusOutside = _a.onFocusOutside, onInteractOutside = _a.onInteractOutside, onOpenAutoFocus = _a.onOpenAutoFocus, onPointerDownOutside = _a.onPointerDownOutside, onOpenChange = _a.onOpenChange, open = _a.open, _f = _a.constrainToViewport, constrainToViewport = _f === void 0 ? true : _f, side = _a.side, _g = _a.sideOffset, sideOffset = _g === void 0 ? 0 : _g, _h = _a.zIndex, zIndex = _h === void 0 ? 100 : _h, _j = _a.hideWhenDetached, hideWhenDetached = _j === void 0 ? false : _j, _k = _a.useBespokeTrigger, useBespokeTrigger = _k === void 0 ? false : _k, _l = _a.isFluidToViewport, isFluidToViewport = _l === void 0 ? false : _l, _m = _a.contentMargin, contentMargin = _m === void 0 ? false : _m, _o = _a.isFullBleed, isFullBleed = _o === void 0 ? false : _o, props = __rest(_a, ["align", "ariaLabel", "alignOffset", "arrow", "background", "children", "content", "asChild", "maxWidth", "minHeight", "onCloseAutoFocus", "onEscapeKeyDown", "onFocusOutside", "onInteractOutside", "onOpenAutoFocus", "onPointerDownOutside", "onOpenChange", "open", "constrainToViewport", "side", "sideOffset", "zIndex", "hideWhenDetached", "useBespokeTrigger", "isFluidToViewport", "contentMargin", "isFullBleed"]);
|
|
20594
|
+
var _p = useThemeElement(), themeElement = _p[0], setThemeElement = _p[1];
|
|
20232
20595
|
var alignOffsetDefault = align === "center" ? 0 : -16;
|
|
20233
20596
|
return (React.createElement("div", __assign({ className: "arc-Popover" }, filterAttrs(props)),
|
|
20234
20597
|
React.createElement(Root2$3, { open: open, onOpenChange: onOpenChange },
|
|
@@ -20242,6 +20605,9 @@ var Popover = function (_a) {
|
|
|
20242
20605
|
"arc-Popover-content--dark": background === "dark",
|
|
20243
20606
|
"arc-Popover-content--brand": background === "brand",
|
|
20244
20607
|
"arc-Popover-content--constrainToViewport": constrainToViewport,
|
|
20608
|
+
"arc-Popover-content--isFluidToViewport": isFluidToViewport,
|
|
20609
|
+
"arc-Popover-content--contentMargin": contentMargin,
|
|
20610
|
+
"arc-Popover-content--isFullBleed": isFullBleed,
|
|
20245
20611
|
}), style: { maxWidth: maxWidth, minHeight: minHeight }, "aria-labelledby": "popover-content" },
|
|
20246
20612
|
content && React.createElement("div", { id: "popover-content" }, content),
|
|
20247
20613
|
arrow && (React.createElement(PopoverArrow, { className: "arc-Popover-arrow" })))))))))));
|
|
@@ -20301,7 +20667,7 @@ var getProgressBarProps = function (isIndeterminate, progressValue, ariaLabel) {
|
|
|
20301
20667
|
* Use `ProgressBar` to show the progress of a specific task within a page.
|
|
20302
20668
|
*/
|
|
20303
20669
|
var ProgressBar = function (_a) {
|
|
20304
|
-
var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue, props = __rest(_a, ["state", "value", "isIndeterminate", "headline", "ariaLabel", "action", "title", "description", "displayValue"]);
|
|
20670
|
+
var _b = _a.state, state = _b === void 0 ? "loading" : _b, _c = _a.value, value = _c === void 0 ? 0 : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, headline = _a.headline, ariaLabel = _a.ariaLabel, action = _a.action, title = _a.title, description = _a.description, displayValue = _a.displayValue, _e = _a.headlineWordWrap, headlineWordWrap = _e === void 0 ? false : _e, props = __rest(_a, ["state", "value", "isIndeterminate", "headline", "ariaLabel", "action", "title", "description", "displayValue", "headlineWordWrap"]);
|
|
20305
20671
|
var progressValue = Math.min(100, Math.max(0, value));
|
|
20306
20672
|
var autoFocusRef = function (canFocus) { return function (el) {
|
|
20307
20673
|
canFocus && el && el.focus();
|
|
@@ -20309,7 +20675,7 @@ var ProgressBar = function (_a) {
|
|
|
20309
20675
|
return (React.createElement("div", __assign({ "data-testid": "progress", className: classNames("arc-ProgressBar", "arc-ProgressBar--".concat(state)) }, filterAttrs(props)),
|
|
20310
20676
|
React.createElement("div", { className: "arc-ProgressBar-titleDisplayValueContainer" },
|
|
20311
20677
|
React.createElement("div", { className: "arc-ProgressBar-titleContainer" },
|
|
20312
|
-
headline && React.createElement(Heading, { size: "s" }, headline),
|
|
20678
|
+
headline && (React.createElement(Heading, { size: "s", isWordWrap: headlineWordWrap }, headline)),
|
|
20313
20679
|
headline && title && React.createElement(VerticalSpace, { size: "4" }),
|
|
20314
20680
|
title && React.createElement(Text, null, title)),
|
|
20315
20681
|
displayValue && (React.createElement("div", { "data-testid": "display-value", className: "arc-ProgressBar-displayValueContainer" },
|
|
@@ -20460,11 +20826,6 @@ function requireMiniSvgDataUri () {
|
|
|
20460
20826
|
var miniSvgDataUriExports = requireMiniSvgDataUri();
|
|
20461
20827
|
var svgToMiniDataURI = /*@__PURE__*/getDefaultExportFromCjs(miniSvgDataUriExports);
|
|
20462
20828
|
|
|
20463
|
-
// src/capitalise-first-letter/capitalise-first-letter.ts
|
|
20464
|
-
var capitaliseFirstLetter = (word) => {
|
|
20465
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
20466
|
-
};
|
|
20467
|
-
|
|
20468
20829
|
var Error$1 = "\n <svg fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <g clipPath=\"url(#a)\">\n <path\n d=\"m13.06 12 2.845-2.845a.75.75 0 0 0-1.06-1.06L12 10.94 9.155 8.095a.75.75 0 0 0-1.06 1.06L10.939 12l-2.844 2.845a.75.75 0 1 0 1.06 1.06L12 13.061l2.845 2.844a.75.75 0 0 0 1.06-1.06L13.06 12Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"a\">\n <rect width=\"24\" height=\"24\" rx=\"12\" />\n </clipPath>\n </defs>\n </svg>\n ";
|
|
20469
20830
|
|
|
20470
20831
|
var Warning = "\n <svg fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n d=\"M12 15.747a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm.004-1.487a.375.375 0 0 0 .375-.375l.001-6.757a.375.375 0 1 0-.75 0l-.001 6.757a.375.375 0 0 0 .375.375Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth=\".3\"\n />\n </svg>\n";
|
|
@@ -20475,7 +20836,8 @@ var Current = "\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w
|
|
|
20475
20836
|
|
|
20476
20837
|
var ProgressStepperItem = function (_a) {
|
|
20477
20838
|
var _b;
|
|
20478
|
-
var title = _a.title, titleHref = _a.titleHref, subTitle = _a.subTitle, _c = _a.direction, direction = _c === void 0 ? "horizontal" : _c, _d = _a.status, status = _d === void 0 ? "todo" : _d, _e = _a.size, size = _e === void 0 ? "large" : _e, isFluid = _a.isFluid, invertLabelPosition = _a.invertLabelPosition, ariaLabel = _a.ariaLabel, onClick = _a.onClick, previousStep = _a.previousStep, stepContent = _a.stepContent, isStepContentHidden = _a.isStepContentHidden, props = __rest(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "isFluid", "invertLabelPosition", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden"]);
|
|
20839
|
+
var title = _a.title, titleHref = _a.titleHref, subTitle = _a.subTitle, _c = _a.direction, direction = _c === void 0 ? "horizontal" : _c, _d = _a.status, status = _d === void 0 ? "todo" : _d, _e = _a.size, size = _e === void 0 ? "large" : _e, isFluid = _a.isFluid, invertLabelPosition = _a.invertLabelPosition, ariaLabel = _a.ariaLabel, onClick = _a.onClick, previousStep = _a.previousStep, stepContent = _a.stepContent, isStepContentHidden = _a.isStepContentHidden, isViewing = _a.isViewing, props = __rest(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "isFluid", "invertLabelPosition", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden", "isViewing"]);
|
|
20840
|
+
var id = React.useId();
|
|
20479
20841
|
var statusIcons = {
|
|
20480
20842
|
todo: undefined,
|
|
20481
20843
|
completed: Complete,
|
|
@@ -20488,181 +20850,137 @@ var ProgressStepperItem = function (_a) {
|
|
|
20488
20850
|
onClick && onClick();
|
|
20489
20851
|
};
|
|
20490
20852
|
var statusIcon = statusIcons[status];
|
|
20491
|
-
|
|
20853
|
+
var accessibleStatusLabel = "".concat(status === "todo" ? "to do" : status).concat(isViewing ? " - currently viewing" : "");
|
|
20854
|
+
return (React.createElement("li", __assign({ "data-progress-stepper-item-id": id, className: classNames("arc-ProgressStepperItem", "arc-ProgressStepperItem--".concat(status), "arc-ProgressStepperItem--".concat(size), (_b = {
|
|
20492
20855
|
"arc-ProgressStepperItem--vertical": direction === "vertical",
|
|
20493
20856
|
"arc-ProgressStepperItem--isFluid": isFluid && direction !== "vertical",
|
|
20494
20857
|
"arc-ProgressStepperItem--previousStepCompleted": previousStep === "completed"
|
|
20495
20858
|
},
|
|
20496
|
-
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = status !== "todo",
|
|
20859
|
+
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = onClick || titleHref || status !== "todo",
|
|
20497
20860
|
_b["arc-ProgressStepperItem--invertLabelPosition"] = direction !== "vertical" && invertLabelPosition,
|
|
20498
20861
|
_b)) }, filterAttrs(props)),
|
|
20499
20862
|
React.createElement("div", { className: "arc-ProgressStepperItem-iconSection" },
|
|
20500
20863
|
React.createElement("div", { className: "arc-ProgressStepperItem-iconWrapper", "data-testid": "arc-ProgressStepperItem-iconWrapper" },
|
|
20501
20864
|
React.createElement("span", { className: classNames("arc-ProgressStepperItem-statusIcon", {
|
|
20502
20865
|
"arc-ProgressStepperItem-statusIcon--small": size === "small",
|
|
20503
|
-
}) },
|
|
20866
|
+
}) },
|
|
20867
|
+
status === "todo" && !isViewing ? null : isViewing ? (React.createElement("div", { className: "arc-ProgressStepperItem-statusIconInner" })) : (status !== "current" && (React.createElement(Icon$1, { icon: statusIcon && svgToMiniDataURI(statusIcon) }))),
|
|
20868
|
+
status === "current" && isViewing === undefined ? (React.createElement(Icon$1, { icon: statusIcon && svgToMiniDataURI(statusIcon) })) : null))),
|
|
20504
20869
|
React.createElement("div", { className: "arc-ProgressStepperItem-textSection" },
|
|
20505
|
-
titleHref || onClick
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
":",
|
|
20513
|
-
capitaliseFirstLetter(status))) : (React.createElement(VisuallyHidden$2, null, ":To do")))),
|
|
20514
|
-
React.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
20870
|
+
React.createElement(ConditionalWrapper, { condition: Boolean(titleHref || onClick), wrapper: function (children) { return (React.createElement("a", { role: !titleHref && onClick ? "button" : undefined, href: titleHref, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler, "aria-label": ariaLabel ||
|
|
20871
|
+
(status !== "current"
|
|
20872
|
+
? "".concat(title, ", ").concat(accessibleStatusLabel)
|
|
20873
|
+
: undefined), "aria-current": status === "current" && "step" }, children)); }, fallback: function (children) { return (React.createElement("div", { className: "arc-ProgressStepperItem-title" },
|
|
20874
|
+
children,
|
|
20875
|
+
React.createElement(VisuallyHidden$2, null, " - ".concat(accessibleStatusLabel)))); } }, title),
|
|
20876
|
+
subTitle && (React.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle)),
|
|
20515
20877
|
stepContent && !isStepContentHidden && direction === "vertical" && (React.createElement(React.Fragment, null,
|
|
20516
20878
|
React.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
20517
20879
|
};
|
|
20518
20880
|
|
|
20519
20881
|
/** Use `ProgressStepper` to provide an overview of a series of steps in a digital journey. */
|
|
20520
20882
|
var ProgressStepper = function (_a) {
|
|
20521
|
-
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition,
|
|
20883
|
+
var ref = _a.ref, children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition, currentStep = _a.currentStep, props = __rest(_a, ["ref", "children", "size", "isFluid", "direction", "isExpandable", "invertLabelPosition", "currentStep"]);
|
|
20522
20884
|
var items = React.Children.toArray(children);
|
|
20523
20885
|
var getStepStatus = function (item) {
|
|
20524
20886
|
var _a;
|
|
20525
20887
|
return (_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.status;
|
|
20526
20888
|
};
|
|
20527
|
-
return (React.createElement("
|
|
20889
|
+
return (React.createElement("ol", __assign({ ref: ref, className: classNames("arc-ProgressStepper", {
|
|
20528
20890
|
"arc-ProgressStepper--vertical": direction === "vertical",
|
|
20529
20891
|
}) }, filterAttrs(props)), items.map(function (item, index) { return (React.createElement(React.Fragment, { key: "StepperItem-".concat(index) },
|
|
20530
|
-
React.createElement(ProgressStepperItem, __assign({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, invertLabelPosition: invertLabelPosition, direction: direction, isExpandable: isExpandable, size: size, previousStep: getStepStatus(items[index - 1]) }, filterAttrs(item.props))))); })));
|
|
20892
|
+
React.createElement(ProgressStepperItem, __assign({ title: item.props.title, titleHref: item.props.titleHref, subTitle: item.props.subTitle, status: item.props.status, stepContent: item.props.stepContent, ariaLabel: item.props.ariaLabel, isStepContentHidden: item.props.isStepContentHidden, onClick: item.props.onClick, isFluid: isFluid, invertLabelPosition: invertLabelPosition, direction: direction, isExpandable: isExpandable, size: size, isViewing: currentStep !== undefined ? currentStep === index : undefined, previousStep: getStepStatus(items[index - 1]) }, filterAttrs(item.props))))); })));
|
|
20531
20893
|
};
|
|
20532
20894
|
|
|
20533
20895
|
/** Use `ProgressStepperOverflow` to wrap `ProgressStepperItem`s and allow overflow behaviour. */
|
|
20534
|
-
var ProgressStepperOverflow =
|
|
20535
|
-
var
|
|
20536
|
-
|
|
20537
|
-
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
|
|
20541
|
-
|
|
20542
|
-
|
|
20543
|
-
|
|
20544
|
-
isLastChildVisible: isLastChildVisible,
|
|
20545
|
-
}); });
|
|
20546
|
-
// Add Horizontal Scroll Event Listener
|
|
20896
|
+
var ProgressStepperOverflow = function (_a) {
|
|
20897
|
+
var ref = _a.ref, children = _a.children, size = _a.size, invertLabelPosition = _a.invertLabelPosition, _b = _a.offsetLeft, offsetLeft = _b === void 0 ? 24 : _b, props = __rest(_a, ["ref", "children", "size", "invertLabelPosition", "offsetLeft"]);
|
|
20898
|
+
return (React.createElement("div", __assign({ className: "arc-ProgressStepperOverflow", style: { paddingLeft: offsetLeft } }, filterAttrs(props)),
|
|
20899
|
+
React.createElement(ProgressStepper, { ref: ref, size: size, invertLabelPosition: invertLabelPosition, isFluid: false }, children)));
|
|
20900
|
+
};
|
|
20901
|
+
|
|
20902
|
+
var useProgressStepperOverflow = function (_a) {
|
|
20903
|
+
var _b = _a === void 0 ? {} : _a, onLoadStep = _b.onLoadStep, _c = _b.increment, increment = _c === void 0 ? 1 : _c, _d = _b.offsetLeft, offsetLeft = _d === void 0 ? 24 : _d;
|
|
20904
|
+
var stepperRef = React.useRef(null);
|
|
20905
|
+
var _e = React.useState({}), itemVisibility = _e[0], setItemVisibility = _e[1];
|
|
20547
20906
|
React.useEffect(function () {
|
|
20548
20907
|
var _a, _b;
|
|
20549
|
-
var
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20554
|
-
|
|
20555
|
-
|
|
20556
|
-
|
|
20557
|
-
}
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
(
|
|
20563
|
-
return function () {
|
|
20564
|
-
var _a;
|
|
20565
|
-
(_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", checkClosest);
|
|
20566
|
-
checkLastChild.cancel();
|
|
20567
|
-
};
|
|
20908
|
+
var el = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20909
|
+
var stepperItems = Array.from(((_b = stepperRef.current) === null || _b === void 0 ? void 0 : _b.children) || []);
|
|
20910
|
+
var observer = new IntersectionObserver(function (entries) {
|
|
20911
|
+
var newEntries = entries.reduce(function (acc, entry) {
|
|
20912
|
+
var _a;
|
|
20913
|
+
var el = entry.target;
|
|
20914
|
+
return __assign(__assign({}, acc), (_a = {}, _a["".concat(el.dataset.progressStepperItemId)] = entry.intersectionRatio, _a));
|
|
20915
|
+
}, {});
|
|
20916
|
+
setItemVisibility(function (current) { return (__assign(__assign({}, current), newEntries)); });
|
|
20917
|
+
}, {
|
|
20918
|
+
root: el,
|
|
20919
|
+
threshold: [0, 0.25, 0.5, 0.75, 1],
|
|
20920
|
+
});
|
|
20921
|
+
stepperItems.forEach(function (item) { return observer.observe(item); });
|
|
20922
|
+
return function () { return observer.disconnect(); };
|
|
20568
20923
|
}, []);
|
|
20569
|
-
// Scroll to activeIndex
|
|
20570
|
-
React.useEffect(function () {
|
|
20571
|
-
scrollTo();
|
|
20572
|
-
}, [activeIndex]);
|
|
20573
|
-
// Exposing changes in activeIndex outside of component
|
|
20574
20924
|
React.useEffect(function () {
|
|
20575
|
-
onIndexChange === null || onIndexChange === void 0 ? void 0 : onIndexChange(closestScrolledIndex);
|
|
20576
|
-
isLastChildVisible();
|
|
20577
|
-
}, [closestScrolledIndex, onIndexChange, lastStepVisible]);
|
|
20578
|
-
// helper functions - start
|
|
20579
|
-
var getProgressStepper = function () { var _a; return (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.firstChild; };
|
|
20580
|
-
var getStepChildren = function () {
|
|
20581
|
-
var _a;
|
|
20582
|
-
return Array.from(((_a = getProgressStepper()) === null || _a === void 0 ? void 0 : _a.children) || []);
|
|
20583
|
-
};
|
|
20584
|
-
var getLeftRects = function (children) {
|
|
20585
|
-
var container = getProgressStepper();
|
|
20586
|
-
if (!container)
|
|
20587
|
-
return [];
|
|
20588
|
-
var parentRect = container.getBoundingClientRect();
|
|
20589
|
-
return children.map(function (child) {
|
|
20590
|
-
var childRect = child.getBoundingClientRect();
|
|
20591
|
-
return {
|
|
20592
|
-
left: childRect.left - parentRect.left,
|
|
20593
|
-
};
|
|
20594
|
-
});
|
|
20595
|
-
};
|
|
20596
|
-
var indexOfClosest = function (values) {
|
|
20597
|
-
return values.indexOf(Math.min.apply(Math, values));
|
|
20598
|
-
};
|
|
20599
|
-
// helper functions - end
|
|
20600
|
-
var isLastChildVisible = function () {
|
|
20601
|
-
var _a;
|
|
20602
|
-
var steps = getStepChildren();
|
|
20603
|
-
var lastStep = steps[steps.length - 1];
|
|
20604
|
-
var rect = lastStep.getBoundingClientRect();
|
|
20605
|
-
var containerRect = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
20606
|
-
return rect.right <= containerRect.right;
|
|
20607
|
-
};
|
|
20608
|
-
// Used for onScroll function of scrolling without buttons
|
|
20609
|
-
var findClosestIndex = function () {
|
|
20610
|
-
var _a, _b;
|
|
20611
|
-
var children = getStepChildren();
|
|
20612
|
-
var scrolledAmount = (_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft) !== null && _b !== void 0 ? _b : 0;
|
|
20613
|
-
// compare the scrolled amount to the intial left edge distance for each step
|
|
20614
|
-
var getScrollDistances = function (children, scrolledAmount) {
|
|
20615
|
-
return getLeftRects(children).map(function (rect) {
|
|
20616
|
-
return Math.abs(scrolledAmount - rect.left);
|
|
20617
|
-
});
|
|
20618
|
-
};
|
|
20619
|
-
var closestIndex = indexOfClosest(getScrollDistances(children, scrolledAmount));
|
|
20620
|
-
return closestIndex;
|
|
20621
|
-
};
|
|
20622
|
-
// Scroll active step to the far left of the page
|
|
20623
|
-
var scrollTo = function () {
|
|
20624
20925
|
var _a, _b;
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
(_b =
|
|
20628
|
-
|
|
20926
|
+
if (onLoadStep) {
|
|
20927
|
+
var container = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20928
|
+
var stepperItems = Array.from(((_b = stepperRef.current) === null || _b === void 0 ? void 0 : _b.children) || []);
|
|
20929
|
+
var itemToScrollTo = stepperItems[Math.max(0, onLoadStep)];
|
|
20930
|
+
container === null || container === void 0 ? void 0 : container.scrollTo({
|
|
20931
|
+
left: itemToScrollTo.offsetLeft - offsetLeft,
|
|
20629
20932
|
behavior: "smooth",
|
|
20630
20933
|
});
|
|
20631
20934
|
}
|
|
20935
|
+
}, [onLoadStep, offsetLeft]);
|
|
20936
|
+
var _f = React.useMemo(function () {
|
|
20937
|
+
var visibilityRatios = Object.values(itemVisibility);
|
|
20938
|
+
var isFirstStepVisible = visibilityRatios[0] === 1;
|
|
20939
|
+
var isLastStepVisible = visibilityRatios[visibilityRatios.length - 1] === 1;
|
|
20940
|
+
return { isFirstStepVisible: isFirstStepVisible, isLastStepVisible: isLastStepVisible };
|
|
20941
|
+
}, [itemVisibility]), isFirstStepVisible = _f.isFirstStepVisible, isLastStepVisible = _f.isLastStepVisible;
|
|
20942
|
+
var currentIndex = Math.max(Object.values(itemVisibility).findIndex(function (value) { return value >= 0.5; }), 0);
|
|
20943
|
+
var scrollToStep = function (index) {
|
|
20944
|
+
var _a, _b;
|
|
20945
|
+
var container = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20946
|
+
var stepperItems = Array.from(((_b = stepperRef.current) === null || _b === void 0 ? void 0 : _b.children) || []);
|
|
20947
|
+
var itemToScrollTo = stepperItems[Math.max(0, index)];
|
|
20948
|
+
container === null || container === void 0 ? void 0 : container.scrollTo({
|
|
20949
|
+
left: itemToScrollTo.offsetLeft - offsetLeft,
|
|
20950
|
+
behavior: "smooth",
|
|
20951
|
+
});
|
|
20632
20952
|
};
|
|
20633
|
-
var
|
|
20634
|
-
// Account for any manual scrolling set closest index to active index
|
|
20635
|
-
setActiveIndex(closestScrolledIndex);
|
|
20636
|
-
var newIndex = closestScrolledIndex + increment;
|
|
20637
|
-
setActiveIndex(newIndex);
|
|
20638
|
-
// If clicking backwards to include half visible step
|
|
20639
|
-
if (closestScrolledIndex + increment === activeIndex) {
|
|
20640
|
-
scrollTo();
|
|
20641
|
-
}
|
|
20642
|
-
if (closestScrolledIndex + increment < 0) {
|
|
20643
|
-
setActiveIndex(0);
|
|
20644
|
-
scrollTo();
|
|
20645
|
-
}
|
|
20646
|
-
};
|
|
20647
|
-
// Used to scroll by Parent width
|
|
20648
|
-
var handleViewScroll = function (direction) {
|
|
20953
|
+
var onViewScroll = function (direction) {
|
|
20649
20954
|
var _a;
|
|
20650
|
-
var
|
|
20651
|
-
|
|
20652
|
-
if (!stepper)
|
|
20955
|
+
var container = (_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
20956
|
+
if (!container)
|
|
20653
20957
|
return;
|
|
20654
|
-
|
|
20655
|
-
left: direction ? clientWidth : -clientWidth,
|
|
20958
|
+
container.scrollBy({
|
|
20959
|
+
left: direction ? container.clientWidth : -container.clientWidth,
|
|
20656
20960
|
behavior: "smooth",
|
|
20657
20961
|
});
|
|
20658
20962
|
};
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20963
|
+
var onPreviousStep = function () {
|
|
20964
|
+
var newStep = Math.max(currentIndex - increment, 0);
|
|
20965
|
+
scrollToStep(newStep);
|
|
20662
20966
|
};
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
|
|
20967
|
+
var onNextStep = function () {
|
|
20968
|
+
var _a;
|
|
20969
|
+
var stepperItems = Array.from(((_a = stepperRef.current) === null || _a === void 0 ? void 0 : _a.children) || []);
|
|
20970
|
+
var newStep = Math.min(currentIndex + increment, stepperItems.length);
|
|
20971
|
+
scrollToStep(newStep);
|
|
20972
|
+
};
|
|
20973
|
+
return {
|
|
20974
|
+
stepperRef: stepperRef,
|
|
20975
|
+
onNextStep: onNextStep,
|
|
20976
|
+
onPreviousStep: onPreviousStep,
|
|
20977
|
+
onViewScroll: onViewScroll,
|
|
20978
|
+
currentIndex: currentIndex,
|
|
20979
|
+
scrollToStep: scrollToStep,
|
|
20980
|
+
isFirstStepVisible: isFirstStepVisible,
|
|
20981
|
+
isLastStepVisible: isLastStepVisible,
|
|
20982
|
+
};
|
|
20983
|
+
};
|
|
20666
20984
|
|
|
20667
20985
|
var RadioContext$1 = React.createContext({});
|
|
20668
20986
|
var Provider$3 = RadioContext$1.Provider;
|
|
@@ -20691,8 +21009,13 @@ var RadioCardGroup = function (_a) {
|
|
|
20691
21009
|
}) }, children)))));
|
|
20692
21010
|
};
|
|
20693
21011
|
|
|
20694
|
-
|
|
20695
|
-
|
|
21012
|
+
// src/capitalise-first-letter/capitalise-first-letter.ts
|
|
21013
|
+
var capitaliseFirstLetter = (word) => {
|
|
21014
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
21015
|
+
};
|
|
21016
|
+
|
|
21017
|
+
var RadioCard = function (_a) {
|
|
21018
|
+
var ref = _a.ref, 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;
|
|
20696
21019
|
var surface = React.useContext(Context$3).surface;
|
|
20697
21020
|
var idLabel = "".concat(id, "-label");
|
|
20698
21021
|
return (React.createElement("div", { className: classNames("arc-RadioCard", {
|
|
@@ -20712,19 +21035,19 @@ var RadioCard = React.forwardRef(function (_a, ref) {
|
|
|
20712
21035
|
!hideButton && (React.createElement("div", { className: classNames("arc-RadioCard-radioIcon", {
|
|
20713
21036
|
"arc-RadioCard-radioIcon--isSelected": checked,
|
|
20714
21037
|
}) }))))));
|
|
20715
|
-
}
|
|
21038
|
+
};
|
|
20716
21039
|
|
|
20717
21040
|
/**
|
|
20718
21041
|
* Radio Card component.
|
|
20719
21042
|
*/
|
|
20720
|
-
var RadioCardGroupInput =
|
|
20721
|
-
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 = __rest(_a, ["icon", "support", "id", "isDisabled", "label", "value", "children", "controlLocation", "hideButton"]);
|
|
21043
|
+
var RadioCardGroupInput = function (_a) {
|
|
21044
|
+
var ref = _a.ref, 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 = __rest(_a, ["ref", "icon", "support", "id", "isDisabled", "label", "value", "children", "controlLocation", "hideButton"]);
|
|
20722
21045
|
var _b = useRadioContext$1(), name = _b.name, changeEvent = _b.changeEvent, checkedValue = _b.checkedValue, groupDisabled = _b.groupDisabled;
|
|
20723
21046
|
var isChecked = checkedValue === value ? true : false;
|
|
20724
21047
|
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
20725
21048
|
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
20726
21049
|
return (React.createElement(RadioCard, __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));
|
|
20727
|
-
}
|
|
21050
|
+
};
|
|
20728
21051
|
|
|
20729
21052
|
var RadioContext = React.createContext({});
|
|
20730
21053
|
var Provider$2 = RadioContext.Provider;
|
|
@@ -20751,8 +21074,8 @@ var RadioGroup = function (_a) {
|
|
|
20751
21074
|
React.createElement("span", { className: "arc-RadioGroup-radioButtonContainer" }, children)))));
|
|
20752
21075
|
};
|
|
20753
21076
|
|
|
20754
|
-
var RadioGroupButton =
|
|
20755
|
-
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, isError = _a.isError;
|
|
21077
|
+
var RadioGroupButton = function (_a) {
|
|
21078
|
+
var ref = _a.ref, 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, isError = _a.isError;
|
|
20756
21079
|
var surface = React.useContext(Context$3).surface;
|
|
20757
21080
|
var idLabel = "".concat(id, "-label");
|
|
20758
21081
|
return (React.createElement("div", { className: classNames({
|
|
@@ -20774,25 +21097,25 @@ var RadioGroupButton = React.forwardRef(function (_a, ref) {
|
|
|
20774
21097
|
}) },
|
|
20775
21098
|
hideLabel ? React.createElement(VisuallyHidden$2, null, label) : label,
|
|
20776
21099
|
helper && (React.createElement("span", { className: "arc-RadioGroupButton-helper" }, helper))))));
|
|
20777
|
-
}
|
|
21100
|
+
};
|
|
20778
21101
|
|
|
20779
21102
|
/**
|
|
20780
21103
|
* Radio Button component.
|
|
20781
21104
|
*/
|
|
20782
|
-
var RadioGroupInput =
|
|
20783
|
-
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, isError = _a.isError, props = __rest(_a, ["helper", "id", "isDisabled", "label", "radioButtonAlignment", "value", "isError"]);
|
|
21105
|
+
var RadioGroupInput = function (_a) {
|
|
21106
|
+
var ref = _a.ref, helper = _a.helper, id = _a.id, isDisabled = _a.isDisabled, label = _a.label, _b = _a.radioButtonAlignment, radioButtonAlignment = _b === void 0 ? "center" : _b, value = _a.value, isError = _a.isError, props = __rest(_a, ["ref", "helper", "id", "isDisabled", "label", "radioButtonAlignment", "value", "isError"]);
|
|
20784
21107
|
var _c = useRadioContext(), blurEvent = _c.blurEvent, changeEvent = _c.changeEvent, groupDisabled = _c.groupDisabled, checkedValue = _c.checkedValue, name = _c.name, size = _c.size;
|
|
20785
21108
|
var isChecked = checkedValue === value ? true : false;
|
|
20786
21109
|
var checked = typeof changeEvent !== "function" ? undefined : isChecked;
|
|
20787
21110
|
var defaultChecked = typeof changeEvent !== "function" ? isChecked : undefined;
|
|
20788
21111
|
return (React.createElement(RadioGroupButton, __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, isError: isError }, props)));
|
|
20789
|
-
}
|
|
21112
|
+
};
|
|
20790
21113
|
|
|
20791
21114
|
/**
|
|
20792
21115
|
* Use `ScrollToTop` to allow the user to scroll to the top of the page by clicking a button.
|
|
20793
21116
|
*/
|
|
20794
21117
|
var ScrollToTop = function (_a) {
|
|
20795
|
-
var _b = _a.appear, appear = _b === void 0 ? "always" : _b, _c = _a.isFixed, isFixed = _c === void 0 ? true : _c, _d = _a.fill, fill = _d === void 0 ? "solid" : _d, _e = _a.zIndex, zIndex = _e === void 0 ? 100 : _e, _f = _a.focusColor, focusColor = _f === void 0 ? "
|
|
21118
|
+
var _b = _a.appear, appear = _b === void 0 ? "always" : _b, _c = _a.isFixed, isFixed = _c === void 0 ? true : _c, _d = _a.fill, fill = _d === void 0 ? "solid" : _d, _e = _a.zIndex, zIndex = _e === void 0 ? 100 : _e, _f = _a.focusColor, focusColor = _f === void 0 ? "primary" : _f, props = __rest(_a, ["appear", "isFixed", "fill", "zIndex", "focusColor"]);
|
|
20796
21119
|
var _g = React.useState(false), hasScrolled = _g[0], setHasScrolled = _g[1];
|
|
20797
21120
|
React.useEffect(function () {
|
|
20798
21121
|
var handleScroll = debounce(function () {
|
|
@@ -21049,7 +21372,7 @@ var SiteHeaderV2 = function (_a) {
|
|
|
21049
21372
|
var _j = React.useState(false), hasClientSideJavaScript = _j[0], setHasClientSideJavaScript = _j[1];
|
|
21050
21373
|
var _k = React.useState(false), menuOpen = _k[0], setMenuOpen = _k[1];
|
|
21051
21374
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcSizeBreakpointsL, ")"));
|
|
21052
|
-
var menubarRef = React.useRef();
|
|
21375
|
+
var menubarRef = React.useRef(null);
|
|
21053
21376
|
React.useEffect(function () {
|
|
21054
21377
|
if (!isMinWidthArcBreakpointL && menuOpen) {
|
|
21055
21378
|
document.body.classList.add("arc-body--overflowHidden");
|
|
@@ -21150,11 +21473,12 @@ var SiteHeaderV2Item = function (_a) {
|
|
|
21150
21473
|
var SiteHeaderV2ItemGroup = function (_a) {
|
|
21151
21474
|
var children = _a.children, href = _a.href, title = _a.title, subtitle = _a.subtitle, onClick = _a.onClick, viewAllTitle = _a.viewAllTitle, props = __rest(_a, ["children", "href", "title", "subtitle", "onClick", "viewAllTitle"]);
|
|
21152
21475
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcSizeBreakpointsL, ")"));
|
|
21153
|
-
var ElementType = title ? "details" : "div";
|
|
21476
|
+
var ElementType = title && !isMinWidthArcBreakpointL ? "details" : "div";
|
|
21477
|
+
var ElementTypeSummary = isMinWidthArcBreakpointL ? "div" : "summary";
|
|
21154
21478
|
return (React.createElement("li", { className: "arc-SiteHeaderV2ItemGroup" },
|
|
21155
21479
|
React.createElement(ElementType, __assign({ className: "arc-SiteHeaderV2ItemGroup-details", open: Boolean(title && isMinWidthArcBreakpointL) }, filterAttrs(props)),
|
|
21156
21480
|
title ? (React.createElement(React.Fragment, null,
|
|
21157
|
-
React.createElement(
|
|
21481
|
+
React.createElement(ElementTypeSummary, { tabIndex: isMinWidthArcBreakpointL ? -1 : 0, className: "arc-SiteHeaderV2ItemGroup-summary" }, href ? (React.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-heading" },
|
|
21158
21482
|
React.createElement(ConditionalWrapper, { condition: isMinWidthArcBreakpointL, wrapper: function (children) { return (React.createElement("a", { onClick: handleLinkClick({
|
|
21159
21483
|
handler: onClick,
|
|
21160
21484
|
}), className: "arc-SiteHeaderV2ItemGroup-title", href: href }, children)); }, fallback: function (children) { return (React.createElement("div", { className: "arc-SiteHeaderV2ItemGroup-title" }, children)); } }, title),
|
|
@@ -21190,6 +21514,9 @@ var SiteHeaderV2Panel = function (_a) {
|
|
|
21190
21514
|
// by listening to clicks on the entire document and acting accordingly.
|
|
21191
21515
|
var handleClick = function (e) {
|
|
21192
21516
|
var _a, _b, _c, _d;
|
|
21517
|
+
// null check for navItemRef
|
|
21518
|
+
if (!(navItemRef === null || navItemRef === void 0 ? void 0 : navItemRef.current))
|
|
21519
|
+
return;
|
|
21193
21520
|
(_b = (_a = menubarRef === null || menubarRef === void 0 ? void 0 : menubarRef.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add("noFocus");
|
|
21194
21521
|
// Don't close the Panel…
|
|
21195
21522
|
if (
|
|
@@ -21332,7 +21659,7 @@ var SiteHeaderV2ViewAll = function (_a) {
|
|
|
21332
21659
|
var SiteHeaderV2NavItem = function (_a) {
|
|
21333
21660
|
var _b, _c, _d, _e, _f;
|
|
21334
21661
|
var children = _a.children, href = _a.href, isCurrent = _a.isCurrent, onClick = _a.onClick, title = _a.title, isPrimary = _a.isPrimary, opensFirstWithPanel = _a.opensFirstWithPanel, subTitle = _a.subTitle, props = __rest(_a, ["children", "href", "isCurrent", "onClick", "title", "isPrimary", "opensFirstWithPanel", "subTitle"]);
|
|
21335
|
-
var navItem = React.useRef();
|
|
21662
|
+
var navItem = React.useRef(null);
|
|
21336
21663
|
var _g = React.useState(false), panelOpen = _g[0], setPanelOpen = _g[1];
|
|
21337
21664
|
var _h = React.useState(true), openSecondaryWithSubNav = _h[0], setOpenSecondaryWithSubNav = _h[1];
|
|
21338
21665
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcSizeBreakpointsL, ")"));
|
|
@@ -21443,7 +21770,7 @@ var Provider = Context.Provider;
|
|
|
21443
21770
|
var SiteHeaderV2NavItemWithSubNav = function (_a) {
|
|
21444
21771
|
var _b, _c, _d, _e, _f;
|
|
21445
21772
|
var href = _a.href, slot1 = _a.slot1, slot2 = _a.slot2, slot3 = _a.slot3, slot4 = _a.slot4, slot5 = _a.slot5, slot6 = _a.slot6, _g = _a.subTitle, subTitle = _g === void 0 ? null : _g, title = _a.title, onViewAllClick = _a.onViewAllClick, isPrimary = _a.isPrimary, opensFirstWithPanel = _a.opensFirstWithPanel, viewAllTitle = _a.viewAllTitle, props = __rest(_a, ["href", "slot1", "slot2", "slot3", "slot4", "slot5", "slot6", "subTitle", "title", "onViewAllClick", "isPrimary", "opensFirstWithPanel", "viewAllTitle"]);
|
|
21446
|
-
var navItem = React.useRef();
|
|
21773
|
+
var navItem = React.useRef(null);
|
|
21447
21774
|
var _h = React.useState(true), defaultItem = _h[0], setDefaultItem = _h[1];
|
|
21448
21775
|
var _j = React.useState(false), panelOpen = _j[0], setPanelOpen = _j[1];
|
|
21449
21776
|
var _k = React.useState(false), horizontalPanelOpen = _k[0], setHorizontalPanelOpen = _k[1];
|
|
@@ -21551,7 +21878,7 @@ var SiteHeaderV2SubNavItem = function (_a) {
|
|
|
21551
21878
|
var _b, _c;
|
|
21552
21879
|
var children = _a.children, _d = _a.isDefaultItem, isDefaultItem = _d === void 0 ? false : _d, href = _a.href, onClick = _a.onClick, offsetXL = _a.offsetXL, subTitle = _a.subTitle, title = _a.title, viewAllTitle = _a.viewAllTitle, icon = _a.icon, props = __rest(_a, ["children", "isDefaultItem", "href", "onClick", "offsetXL", "subTitle", "title", "viewAllTitle", "icon"]);
|
|
21553
21880
|
var navItem = React.useContext(Context).navItem;
|
|
21554
|
-
var subNavItem = React.useRef();
|
|
21881
|
+
var subNavItem = React.useRef(null);
|
|
21555
21882
|
var _e = React.useState(false), panelOpen = _e[0], setPanelOpen = _e[1];
|
|
21556
21883
|
var isMinWidthArcBreakpointL = useMediaQuery("(min-width: ".concat(ArcSizeBreakpointsL, ")"));
|
|
21557
21884
|
React.useEffect(function () {
|
|
@@ -21609,8 +21936,8 @@ var Skeleton = function (_a) {
|
|
|
21609
21936
|
};
|
|
21610
21937
|
|
|
21611
21938
|
/** Use `SkipLink` to help keyboard-only users skip to the main content on a page. */
|
|
21612
|
-
var SkipLink = function (_a
|
|
21613
|
-
var children = _a.children;
|
|
21939
|
+
var SkipLink = function (_a) {
|
|
21940
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
21614
21941
|
return (React.createElement("div", __assign({ className: "arc-SkipLink" }, filterAttrs(props)), children));
|
|
21615
21942
|
};
|
|
21616
21943
|
|
|
@@ -21969,8 +22296,8 @@ var Tag = function (_a) {
|
|
|
21969
22296
|
};
|
|
21970
22297
|
|
|
21971
22298
|
/** Use `TextArea` to allow custom user text entry via keyboard, for long-form and multi-line descriptions */
|
|
21972
|
-
var TextArea =
|
|
21973
|
-
var _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, _c = _a.resize, resize = _c === void 0 ? "manual" : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.showCharacterCount, showCharacterCount = _g === void 0 ? true : _g, label = _a.label, _h = _a.labelSize, labelSize = _h === void 0 ? "l" : _h, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, width = _a.width, autoComplete = _a.autoComplete, _j = _a.minHeight, minHeight = _j === void 0 ? "116px" : _j, maxHeight = _a.maxHeight, isErrorAlert = _a.isErrorAlert, props = __rest(_a, ["defaultValue", "errorMessage", "helper", "hideLabel", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onFocus", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText", "width", "autoComplete", "minHeight", "maxHeight", "isErrorAlert"]);
|
|
22299
|
+
var TextArea = function (_a) {
|
|
22300
|
+
var ref = _a.ref, _b = _a.defaultValue, defaultValue = _b === void 0 ? "" : _b, errorMessage = _a.errorMessage, helper = _a.helper, hideLabel = _a.hideLabel, id = _a.id, _c = _a.resize, resize = _c === void 0 ? "manual" : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isReadOnly, isReadOnly = _e === void 0 ? false : _e, _f = _a.isRequired, isRequired = _f === void 0 ? false : _f, _g = _a.showCharacterCount, showCharacterCount = _g === void 0 ? true : _g, label = _a.label, _h = _a.labelSize, labelSize = _h === void 0 ? "l" : _h, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onFocus = _a.onFocus, onChange = _a.onChange, onClickDisclosure = _a.onClickDisclosure, value = _a.value, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, width = _a.width, autoComplete = _a.autoComplete, _j = _a.minHeight, minHeight = _j === void 0 ? "116px" : _j, maxHeight = _a.maxHeight, isErrorAlert = _a.isErrorAlert, props = __rest(_a, ["ref", "defaultValue", "errorMessage", "helper", "hideLabel", "id", "resize", "isDisabled", "isReadOnly", "isRequired", "showCharacterCount", "label", "labelSize", "maxLength", "name", "onBlur", "onFocus", "onChange", "onClickDisclosure", "value", "disclosureTitle", "disclosureText", "width", "autoComplete", "minHeight", "maxHeight", "isErrorAlert"]);
|
|
21974
22301
|
var surface = React.useContext(Context$3).surface;
|
|
21975
22302
|
var ourRef = React.useRef(null);
|
|
21976
22303
|
var _k = React.useState((value && value.length) || (defaultValue && defaultValue.length) || 0), characterCount = _k[0], setCharacterCount = _k[1];
|
|
@@ -22019,13 +22346,13 @@ var TextArea = React.forwardRef(function (_a, ref) {
|
|
|
22019
22346
|
minHeight: minHeight,
|
|
22020
22347
|
marginTop: hideLabel ? 0 : undefined,
|
|
22021
22348
|
}, "aria-describedby": ariaDescribedby, autoComplete: autoComplete })));
|
|
22022
|
-
}
|
|
22349
|
+
};
|
|
22023
22350
|
|
|
22024
22351
|
// package.json
|
|
22025
22352
|
var package_default = {
|
|
22026
22353
|
name: "@arc-ui/helpers",
|
|
22027
22354
|
private: true,
|
|
22028
|
-
version: "
|
|
22355
|
+
version: "13.0.0",
|
|
22029
22356
|
type: "module",
|
|
22030
22357
|
homepage: "https://ui.digital-ent-int.bt.com",
|
|
22031
22358
|
author: "BT Enterprise Digital UI Team <ui-digital-ent-int@bt.com>",
|
|
@@ -23095,9 +23422,9 @@ var Truncate = function (_a) {
|
|
|
23095
23422
|
|
|
23096
23423
|
/** Use `TypographyCard` for content that benefits from larger and energetic typography. */
|
|
23097
23424
|
var TypographyCard = function (_a) {
|
|
23098
|
-
var url = _a.url, onClick = _a.onClick, heading = _a.heading, metaText = _a.metaText, label = _a.label, minHeight = _a.minHeight, _b = _a.headingSize, headingSize = _b === void 0 ? "m" : _b, _c = _a.linkData, linkData = _c === void 0 ? {} : _c, _d = _a.pathway, pathway = _d === void 0 ? "light" : _d, _e = _a.buttonIcon, buttonIcon = _e === void 0 ? "arrow" : _e, _f = _a.headingLevel, headingLevel = _f === void 0 ? "2" : _f, _g = _a.labelLevel, labelLevel = _g === void 0 ? "3" : _g, props = __rest(_a, ["url", "onClick", "heading", "metaText", "label", "minHeight", "headingSize", "linkData", "pathway", "buttonIcon", "headingLevel", "labelLevel"]);
|
|
23425
|
+
var url = _a.url, onClick = _a.onClick, heading = _a.heading, metaText = _a.metaText, label = _a.label, minHeight = _a.minHeight, _b = _a.headingSize, headingSize = _b === void 0 ? "m" : _b, _c = _a.linkData, linkData = _c === void 0 ? {} : _c, _d = _a.pathway, pathway = _d === void 0 ? "light" : _d, _e = _a.buttonIcon, buttonIcon = _e === void 0 ? "arrow" : _e, _f = _a.headingLevel, headingLevel = _f === void 0 ? "2" : _f, _g = _a.labelLevel, labelLevel = _g === void 0 ? "3" : _g, _h = _a.headingWordWrap, headingWordWrap = _h === void 0 ? false : _h, props = __rest(_a, ["url", "onClick", "heading", "metaText", "label", "minHeight", "headingSize", "linkData", "pathway", "buttonIcon", "headingLevel", "labelLevel", "headingWordWrap"]);
|
|
23099
23426
|
var surface = React.useContext(Context$3).surface;
|
|
23100
|
-
var
|
|
23427
|
+
var _j = React.useState(false), showHoverState = _j[0], setShowHoverState = _j[1];
|
|
23101
23428
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
23102
23429
|
var isDarkPathway = pathway === "dark";
|
|
23103
23430
|
return (React.createElement("div", __assign({ style: { minHeight: minHeight }, className: classNames("arc-TypographyCard", {
|
|
@@ -23110,7 +23437,7 @@ var TypographyCard = function (_a) {
|
|
|
23110
23437
|
label && (React.createElement("div", { className: "arc-TypographyCard-label" },
|
|
23111
23438
|
React.createElement(Heading, { level: labelLevel, fontStyle: "overline" }, label),
|
|
23112
23439
|
React.createElement(VerticalSpace, { size: "16" }))),
|
|
23113
|
-
React.createElement(CardHeading, { size: headingSize, linkData: linkData, heading: heading, headingLevel: headingLevel, href: url, onClick: onClick, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false) })),
|
|
23440
|
+
React.createElement(CardHeading, { size: headingSize, linkData: linkData, heading: heading, headingLevel: headingLevel, href: url, onClick: onClick, onMouseEnter: handleShowHoverState(true), onMouseLeave: handleShowHoverState(false), onFocus: handleShowHoverState(true), onBlur: handleShowHoverState(false), headingWordWrap: headingWordWrap })),
|
|
23114
23441
|
React.createElement(CardFooter, { showButton: true, isDarkPathway: isDarkPathway, buttonIcon: buttonIcon, metaText: metaText, isHovered: showHoverState })));
|
|
23115
23442
|
};
|
|
23116
23443
|
|
|
@@ -26264,10 +26591,10 @@ var ReactPlayerVimeo = /*@__PURE__*/getDefaultExportFromCjs(vimeoExports);
|
|
|
26264
26591
|
* Use `VideoPlayer` to embed videos from YouTube or Vimeo.
|
|
26265
26592
|
*/
|
|
26266
26593
|
var VideoPlayer = function (_a) {
|
|
26267
|
-
var title = _a.title, description = _a.description, transcriptLink = _a.transcriptLink, transcriptContent = _a.transcriptContent, light = _a.light, url = _a.url, onReady = _a.onReady, onPlay = _a.onPlay, onStart = _a.onStart, onPause = _a.onPause, onError = _a.onError, onEnded = _a.onEnded, _b = _a.isBorderRadius, isBorderRadius = _b === void 0 ? false : _b, _c = _a.isSupportingTextHidden, isSupportingTextHidden = _c === void 0 ? false : _c, props = __rest(_a, ["title", "description", "transcriptLink", "transcriptContent", "light", "url", "onReady", "onPlay", "onStart", "onPause", "onError", "onEnded", "isBorderRadius", "isSupportingTextHidden"]);
|
|
26594
|
+
var title = _a.title, description = _a.description, transcriptLink = _a.transcriptLink, transcriptContent = _a.transcriptContent, light = _a.light, url = _a.url, onReady = _a.onReady, onPlay = _a.onPlay, onStart = _a.onStart, onPause = _a.onPause, onError = _a.onError, onEnded = _a.onEnded, _b = _a.isBorderRadius, isBorderRadius = _b === void 0 ? false : _b, _c = _a.isSupportingTextHidden, isSupportingTextHidden = _c === void 0 ? false : _c, _d = _a.titleWordWrap, titleWordWrap = _d === void 0 ? false : _d, props = __rest(_a, ["title", "description", "transcriptLink", "transcriptContent", "light", "url", "onReady", "onPlay", "onStart", "onPause", "onError", "onEnded", "isBorderRadius", "isSupportingTextHidden", "titleWordWrap"]);
|
|
26268
26595
|
var TextWrapper = isSupportingTextHidden ? VisuallyHidden$2 : "div";
|
|
26269
26596
|
var isVimeo = new URL(url).hostname.includes("vimeo");
|
|
26270
|
-
var
|
|
26597
|
+
var _e = React.useState(false), isClient = _e[0], setIsClient = _e[1];
|
|
26271
26598
|
// https://nextjs.org/docs/messages/react-hydration-error#solution-1-using-useeffect-to-run-on-the-client-only
|
|
26272
26599
|
React.useEffect(function () {
|
|
26273
26600
|
setIsClient(true);
|
|
@@ -26298,7 +26625,7 @@ var VideoPlayer = function (_a) {
|
|
|
26298
26625
|
: isClient && React.createElement(ReactPlayerYoutube, __assign({}, playerProps))),
|
|
26299
26626
|
React.createElement(TextWrapper, null,
|
|
26300
26627
|
React.createElement(VerticalSpace, { size: "24" }),
|
|
26301
|
-
React.createElement(Heading, { level: "3", size: "s" }, title),
|
|
26628
|
+
React.createElement(Heading, { level: "3", size: "s", isWordWrap: titleWordWrap }, title),
|
|
26302
26629
|
React.createElement(VerticalSpace, { size: "8" }),
|
|
26303
26630
|
React.createElement(Text, null, description)),
|
|
26304
26631
|
transcriptLink && (React.createElement(React.Fragment, null,
|
|
@@ -26379,14 +26706,14 @@ var NavigationHeaderInlineAction = function (_a) {
|
|
|
26379
26706
|
React.createElement(Text, { size: "l" }, text))));
|
|
26380
26707
|
};
|
|
26381
26708
|
|
|
26382
|
-
var NavigationHeaderButton =
|
|
26383
|
-
var isActive = _a.isActive, children = _a.children, onClick = _a.onClick, _b = _a.isPadded, isPadded = _b === void 0 ? true : _b, props = __rest(_a, ["isActive", "children", "onClick", "isPadded"]);
|
|
26709
|
+
var NavigationHeaderButton = function (_a) {
|
|
26710
|
+
var ref = _a.ref, isActive = _a.isActive, children = _a.children, onClick = _a.onClick, _b = _a.isPadded, isPadded = _b === void 0 ? true : _b, props = __rest(_a, ["ref", "isActive", "children", "onClick", "isPadded"]);
|
|
26384
26711
|
var surface = React.useContext(Context$3).surface;
|
|
26385
26712
|
return (React.createElement("button", __assign({}, props, { ref: ref, onClick: onClick, className: classNames("arc-NavigationHeaderButton", suffixModifier("arc-NavigationHeaderButton--on", surface), {
|
|
26386
26713
|
"arc-NavigationHeaderButton--active": isActive,
|
|
26387
26714
|
"arc-NavigationHeaderButton--padded": isPadded,
|
|
26388
26715
|
}) }), children));
|
|
26389
|
-
}
|
|
26716
|
+
};
|
|
26390
26717
|
|
|
26391
26718
|
var NavigationHeaderDisclosure = function (_a) {
|
|
26392
26719
|
var heading = _a.heading, children = _a.children;
|
|
@@ -26401,7 +26728,7 @@ var NavigationHeaderDisclosure = function (_a) {
|
|
|
26401
26728
|
if (containerRef.current && containerRef.current.firstChild && isOpen) {
|
|
26402
26729
|
containerRef.current.firstChild.focus();
|
|
26403
26730
|
}
|
|
26404
|
-
}, [isOpen
|
|
26731
|
+
}, [isOpen]);
|
|
26405
26732
|
return (React.createElement("details", { className: classNames("arc-NavigationHeaderDisclosure", suffixModifier("arc-NavigationHeaderDisclosure--on", surface)), open: isOpen },
|
|
26406
26733
|
React.createElement("summary", { "aria-expanded": isOpen, onClick: handleOnClick, className: "arc-NavigationHeaderDisclosure-summary" },
|
|
26407
26734
|
React.createElement("span", { className: "arc-NavigationHeaderDisclosure-heading" }, heading),
|
|
@@ -26432,12 +26759,12 @@ var NavigationHeaderMenuLink = function (_a) {
|
|
|
26432
26759
|
React.createElement(ThemeIcon, { size: 28, icon: "navigationHeaderMenuLinkLarge" })))))));
|
|
26433
26760
|
};
|
|
26434
26761
|
|
|
26435
|
-
var NavigationHeaderCloseButton =
|
|
26436
|
-
var onClick = _a.onClick, props = __rest(_a, ["onClick"]);
|
|
26762
|
+
var NavigationHeaderCloseButton = function (_a) {
|
|
26763
|
+
var ref = _a.ref, onClick = _a.onClick, props = __rest(_a, ["ref", "onClick"]);
|
|
26437
26764
|
var surface = React.useContext(Context$3).surface;
|
|
26438
26765
|
return (React.createElement("button", __assign({}, props, { ref: ref, "aria-label": "close", onClick: onClick, className: classNames("arc-NavigationHeaderCloseButton", suffixModifier("arc-NavigationHeaderCloseButton--on", surface)) }),
|
|
26439
26766
|
React.createElement(ThemeIcon, { size: 32, icon: "navigationHeaderClose" })));
|
|
26440
|
-
}
|
|
26767
|
+
};
|
|
26441
26768
|
|
|
26442
26769
|
var NavigationHeaderBurgerMenu = function (_a) {
|
|
26443
26770
|
var navItems = _a.navItems, actions = _a.actions, header = _a.header, footer = _a.footer, logo = _a.logo, background = _a.background, onOpenChange = _a.onOpenChange, _b = _a.pathway, pathway = _b === void 0 ? "invert" : _b;
|
|
@@ -26457,24 +26784,25 @@ var NavigationHeaderBurgerMenu = function (_a) {
|
|
|
26457
26784
|
};
|
|
26458
26785
|
React.useEffect(function () {
|
|
26459
26786
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
|
|
26460
|
-
}, [isOpen]);
|
|
26787
|
+
}, [isOpen, onOpenChange]);
|
|
26461
26788
|
// Close the menu if the nav or trigger is hidden
|
|
26462
26789
|
React.useEffect(function () {
|
|
26790
|
+
var trigger = triggerRef.current;
|
|
26463
26791
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
26464
26792
|
var entry = entries[0];
|
|
26465
26793
|
if (!checkElementVisibility(entry.target) && isOpen) {
|
|
26466
26794
|
setIsOpen(false);
|
|
26467
26795
|
}
|
|
26468
26796
|
});
|
|
26469
|
-
if (
|
|
26470
|
-
resizeObserver.observe(
|
|
26797
|
+
if (trigger) {
|
|
26798
|
+
resizeObserver.observe(trigger);
|
|
26471
26799
|
}
|
|
26472
26800
|
return function () {
|
|
26473
|
-
if (
|
|
26474
|
-
resizeObserver.unobserve(
|
|
26801
|
+
if (trigger) {
|
|
26802
|
+
resizeObserver.unobserve(trigger);
|
|
26475
26803
|
}
|
|
26476
26804
|
};
|
|
26477
|
-
}, [isOpen, setIsOpen
|
|
26805
|
+
}, [isOpen, setIsOpen]);
|
|
26478
26806
|
var colorScheme = React.useMemo(function () {
|
|
26479
26807
|
var colorConfig = {
|
|
26480
26808
|
light: {
|
|
@@ -26571,6 +26899,7 @@ var NavigationHeaderDropdown = function (_a) {
|
|
|
26571
26899
|
var navigationHeaderContext = React.useContext(NavigationHeaderContext);
|
|
26572
26900
|
// Close the dropdown if the nav or trigger is hidden
|
|
26573
26901
|
React.useEffect(function () {
|
|
26902
|
+
var trigger = triggerRef.current;
|
|
26574
26903
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
26575
26904
|
var entry = entries[0];
|
|
26576
26905
|
if (!checkElementVisibility(entry.target) && isOpen) {
|
|
@@ -26578,20 +26907,15 @@ var NavigationHeaderDropdown = function (_a) {
|
|
|
26578
26907
|
setIsTooltipOpen(false);
|
|
26579
26908
|
}
|
|
26580
26909
|
});
|
|
26581
|
-
if (
|
|
26582
|
-
resizeObserver.observe(
|
|
26910
|
+
if (trigger) {
|
|
26911
|
+
resizeObserver.observe(trigger);
|
|
26583
26912
|
}
|
|
26584
26913
|
return function () {
|
|
26585
|
-
if (
|
|
26586
|
-
resizeObserver.unobserve(
|
|
26914
|
+
if (trigger) {
|
|
26915
|
+
resizeObserver.unobserve(trigger);
|
|
26587
26916
|
}
|
|
26588
26917
|
};
|
|
26589
|
-
}, [
|
|
26590
|
-
isOpen,
|
|
26591
|
-
setIsOpen,
|
|
26592
|
-
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive,
|
|
26593
|
-
triggerRef.current,
|
|
26594
|
-
]);
|
|
26918
|
+
}, [isOpen, setIsOpen, navigationHeaderContext]);
|
|
26595
26919
|
// if focus isnt going anywhere else and closed via keyboard, return focus to the trigger
|
|
26596
26920
|
var onCloseAutoFocus = function () {
|
|
26597
26921
|
var _a, _b;
|
|
@@ -26719,14 +27043,10 @@ var NavigationHeaderSubnav = function (_a) {
|
|
|
26719
27043
|
return function () {
|
|
26720
27044
|
document.removeEventListener("click", handleClickOutside);
|
|
26721
27045
|
};
|
|
26722
|
-
}, [
|
|
26723
|
-
setIsOpen,
|
|
26724
|
-
dialogRef.current,
|
|
26725
|
-
containerRef.current,
|
|
26726
|
-
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive,
|
|
26727
|
-
]);
|
|
27046
|
+
}, [setIsOpen, navigationHeaderContext]);
|
|
26728
27047
|
// Close the subnav if the trigger is hidden and the submenu is open
|
|
26729
27048
|
React.useEffect(function () {
|
|
27049
|
+
var trigger = triggerRef.current;
|
|
26730
27050
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
26731
27051
|
var entry = entries[0];
|
|
26732
27052
|
if (!checkElementVisibility(entry.target) && isOpen) {
|
|
@@ -26734,20 +27054,15 @@ var NavigationHeaderSubnav = function (_a) {
|
|
|
26734
27054
|
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive(false);
|
|
26735
27055
|
}
|
|
26736
27056
|
});
|
|
26737
|
-
if (
|
|
26738
|
-
resizeObserver.observe(
|
|
27057
|
+
if (trigger) {
|
|
27058
|
+
resizeObserver.observe(trigger);
|
|
26739
27059
|
}
|
|
26740
27060
|
return function () {
|
|
26741
|
-
if (
|
|
26742
|
-
resizeObserver.unobserve(
|
|
27061
|
+
if (trigger) {
|
|
27062
|
+
resizeObserver.unobserve(trigger);
|
|
26743
27063
|
}
|
|
26744
27064
|
};
|
|
26745
|
-
}, [
|
|
26746
|
-
isOpen,
|
|
26747
|
-
setIsOpen,
|
|
26748
|
-
navigationHeaderContext === null || navigationHeaderContext === void 0 ? void 0 : navigationHeaderContext.setIsSubMenuItemActive,
|
|
26749
|
-
triggerRef.current,
|
|
26750
|
-
]);
|
|
27065
|
+
}, [isOpen, setIsOpen, navigationHeaderContext]);
|
|
26751
27066
|
return (React.createElement("div", { ref: containerRef },
|
|
26752
27067
|
React.createElement(NavigationHeaderButton, { "data-sub-nav-item": true, ref: triggerRef, isActive: isOpen, "aria-label": ariaLabel, onClick: onTriggerClick }, trigger),
|
|
26753
27068
|
React.createElement(Root$1, { open: isOpen, modal: false },
|
|
@@ -28018,4 +28333,5 @@ exports.parseDateString = parseDateString;
|
|
|
28018
28333
|
exports.parseRangeString = parseRangeString;
|
|
28019
28334
|
exports.themes = themes;
|
|
28020
28335
|
exports.useMediaQuery = useMediaQuery;
|
|
28336
|
+
exports.useProgressStepperOverflow = useProgressStepperOverflow;
|
|
28021
28337
|
//# sourceMappingURL=index.cjs.map
|