@arc-ui/components 12.0.0-beta.19 → 12.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Alert/Alert.cjs +1 -1
- package/lib/Alert/Alert.mjs +1 -1
- package/lib/Alert/styles.css +1 -1
- package/lib/Align/styles.css +1 -1
- package/lib/AppButton/styles.css +1 -1
- package/lib/Avatar/Avatar.cjs +2 -1
- package/lib/Avatar/Avatar.mjs +2 -1
- package/lib/Avatar/styles.css +1 -1
- package/lib/AvatarGroup/AvatarGroup.cjs +2 -1
- package/lib/AvatarGroup/AvatarGroup.mjs +2 -1
- package/lib/AvatarGroup/styles.css +1 -1
- package/lib/Badge/styles.css +1 -1
- package/lib/Banner/Banner.cjs +2 -3
- package/lib/Banner/Banner.mjs +2 -3
- package/lib/Box/styles.css +1 -1
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs +2 -1
- package/lib/Breadcrumbs/Breadcrumbs.mjs +2 -1
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/Button.cjs +2 -2
- package/lib/Button/Button.mjs +2 -2
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/ButtonGroup.cjs +3 -3
- package/lib/ButtonGroup/ButtonGroup.mjs +3 -3
- package/lib/ButtonGroup/styles.css +1 -1
- package/lib/ButtonV2/ButtonV2.cjs +2 -2
- package/lib/ButtonV2/ButtonV2.mjs +2 -2
- package/lib/ButtonV2/styles.css +1 -1
- package/lib/Calendar/Calendar.cjs +3 -3
- package/lib/Calendar/Calendar.mjs +3 -3
- package/lib/Calendar/styles.css +1 -1
- package/lib/CardFooter/CardFooter.cjs +2 -2
- package/lib/CardFooter/CardFooter.mjs +2 -2
- package/lib/CardFooter/styles.css +1 -1
- package/lib/CardHeading/styles.css +1 -1
- package/lib/Carousel/Carousel.cjs +1 -1
- package/lib/Carousel/Carousel.mjs +1 -1
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/styles.css +1 -1
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/ComboBox.cjs +2 -2
- package/lib/ComboBox/ComboBox.mjs +2 -2
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.cjs +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.mjs +1 -1
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +1 -1
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +1 -1
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +196 -17
- package/lib/DatePicker/DatePicker.mjs +200 -17
- 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 +46 -323
- package/lib/Drawer/Drawer.mjs +44 -306
- 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 +1 -1
- package/lib/GhostedHeroBanner/GhostedHeroBanner.mjs +1 -1
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientPageBackground/GradientPageBackground.cjs +257 -0
- package/lib/GradientPageBackground/GradientPageBackground.mjs +237 -0
- package/lib/GradientPageBackground/styles.css +1 -0
- 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 +2 -3
- package/lib/HeroBanner/HeroBanner.mjs +2 -3
- package/lib/HeroBanner/styles.css +1 -1
- package/lib/HeroButton/HeroButton.cjs +2 -2
- package/lib/HeroButton/HeroButton.mjs +2 -2
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/styles.css +1 -1
- package/lib/HorizontalCard/HorizontalCard.cjs +3 -2
- package/lib/HorizontalCard/HorizontalCard.mjs +3 -2
- package/lib/HorizontalCard/styles.css +1 -1
- package/lib/Icon/Icon.cjs +1 -1
- package/lib/Icon/Icon.mjs +1 -1
- package/lib/Icon/styles.css +1 -1
- package/lib/Image/styles.css +1 -1
- package/lib/ImpactCard/ImpactCard.cjs +7 -4
- package/lib/ImpactCard/ImpactCard.mjs +7 -4
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +7 -5
- package/lib/InformationCard/InformationCard.mjs +7 -5
- package/lib/InformationCard/styles.css +1 -1
- package/lib/Link/Link.cjs +1 -1
- package/lib/Link/Link.mjs +1 -1
- package/lib/Link/styles.css +1 -1
- package/lib/Markup/styles.css +1 -1
- package/lib/MediaCard/MediaCard.cjs +3 -5
- package/lib/MediaCard/MediaCard.mjs +3 -5
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/Menu.cjs +33 -32
- package/lib/Menu/Menu.mjs +17 -16
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/Modal.cjs +2 -2
- package/lib/Modal/Modal.mjs +2 -2
- package/lib/Modal/styles.css +1 -1
- package/lib/Pagination/styles.css +1 -1
- package/lib/PaginationSimple/PaginationSimple.cjs +1 -1
- package/lib/PaginationSimple/PaginationSimple.mjs +1 -1
- package/lib/PaginationSimple/styles.css +1 -1
- package/lib/Popover/styles.css +1 -1
- package/lib/Poster/styles.css +1 -1
- package/lib/ProgressBar/styles.css +1 -1
- package/lib/ProgressStepper/ProgressStepper.cjs +10 -72
- package/lib/ProgressStepper/ProgressStepper.mjs +8 -74
- package/lib/ProgressStepper/styles.css +1 -1
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.cjs +20 -0
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.mjs +14 -0
- package/lib/ProgressStepperOverflow/styles.css +1 -0
- package/lib/RadioCardGroup/RadioCardGroup.cjs +2 -2
- package/lib/RadioCardGroup/RadioCardGroup.mjs +3 -3
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/ScrollToTop.cjs +5 -2
- package/lib/ScrollToTop/ScrollToTop.mjs +5 -2
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/styles.css +1 -1
- package/lib/Select/styles.css +1 -1
- package/lib/SiteFooter/SiteFooter.cjs +10 -7
- package/lib/SiteFooter/SiteFooter.mjs +10 -7
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.cjs +19 -22
- package/lib/SiteFooterV2/SiteFooterV2.mjs +19 -22
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +4 -4
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +5 -5
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/styles.css +1 -1
- package/lib/Spinner/styles.css +1 -1
- package/lib/Surface/styles.css +1 -1
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +9 -6
- package/lib/TabbedBanner/TabbedBanner.mjs +9 -6
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/Tabs.cjs +1 -1
- package/lib/Tabs/Tabs.mjs +1 -1
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/Tag.cjs +1 -1
- package/lib/Tag/Tag.mjs +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/TemplateBanner.cjs +2 -3
- package/lib/TemplateBanner/TemplateBanner.mjs +2 -3
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/TextArea.cjs +16 -14
- package/lib/TextArea/TextArea.mjs +16 -14
- package/lib/TextArea/styles.css +1 -1
- 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 +5 -8
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +5 -8
- package/lib/ThumbnailSignpost/styles.css +1 -1
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/Tooltip.cjs +1 -1
- package/lib/Tooltip/Tooltip.mjs +1 -1
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/TypographyCard.cjs +7 -4
- package/lib/TypographyCard/TypographyCard.mjs +7 -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 +1 -1
- package/lib/VideoPlayer/VideoPlayer.mjs +1 -1
- package/lib/VideoPlayer/styles.css +1 -1
- package/lib/Visible/Visible.cjs +6 -14
- package/lib/Visible/Visible.mjs +4 -16
- package/lib/Visible/styles.css +1 -1
- package/lib/VisuallyHidden/styles.css +1 -1
- package/lib/_shared/cjs/{Avatar-CxbjOB_b.cjs → Avatar-CrUioj_6.cjs} +4 -1
- package/lib/_shared/cjs/{Button-CKTa6bQL.cjs → Button-uD9mR8w-.cjs} +1 -1
- package/lib/_shared/cjs/{ButtonV2-CRNNZ_nd.cjs → ButtonV2-Bta5SVVY.cjs} +2 -2
- package/lib/_shared/cjs/{Calendar-BwjsVOaO.cjs → Calendar-D4ZSaHHU.cjs} +2 -2
- package/lib/_shared/cjs/{CardFooter-DwE-u0Om.cjs → CardFooter-ChphRFHe.cjs} +1 -1
- package/lib/_shared/cjs/{ComboBox-CY_JTHWB.cjs → ComboBox-BGUhlqx1.cjs} +1 -1
- package/lib/_shared/cjs/{ContentSwitcherDropdown-CAWaAMZN.cjs → ContentSwitcherDropdown-U5ZTbJTe.cjs} +1 -1
- package/lib/_shared/cjs/{ContentSwitcherList-I7jCZn8C.cjs → ContentSwitcherList-nlxMHXs-.cjs} +3 -2
- package/lib/_shared/cjs/{DatePicker-PiPFgOL6.cjs → DatePicker-DS6fAvxD.cjs} +45 -27
- package/lib/_shared/cjs/{HeroButton-CiIygZ16.cjs → HeroButton-CrzkTUwP.cjs} +1 -1
- package/lib/_shared/cjs/{Icon-KMACQ1i3.cjs → Icon-CzhyKqMd.cjs} +1 -1
- package/lib/_shared/cjs/{MediaCard-4SvlAL3w.cjs → MediaCard-BEZFbiYO.cjs} +5 -9
- package/lib/_shared/cjs/{MenuSubContent-B7-PVHJ6.cjs → MenuItemMultiLevelContent-vLr6hSBm.cjs} +7 -7
- package/lib/_shared/cjs/ProgressStepper-BL9Y5c4X.cjs +77 -0
- package/lib/_shared/cjs/ProgressStepperOverflow-v-TyS5Sp.cjs +142 -0
- package/lib/_shared/cjs/{RadioCardGroupInput-BmntgyWB.cjs → RadioCardGroupInput-CeUM3yPS.cjs} +1 -1
- package/lib/_shared/cjs/{SiteHeaderV2NavItemWithSubNav-CX1WAHv8.cjs → SiteHeaderV2NavItemWithSubNav-fQPk0gZU.cjs} +3 -3
- package/lib/_shared/cjs/{TemplateBanner-Dn_6CJqe.cjs → TemplateBanner-CGtTUy81.cjs} +13 -6
- package/lib/_shared/cjs/Visible-Dx__9oZG.cjs +18 -0
- package/lib/_shared/cjs/{index.es-i8i9xWYf.cjs → index.es-DBEGtWPg.cjs} +1 -1
- package/lib/_shared/esm/{Avatar-B8aoUhmE.mjs → Avatar-Fb1E5MA9.mjs} +4 -1
- package/lib/_shared/esm/{Button-9L4AksQP.mjs → Button-BxuM3_gz.mjs} +1 -1
- package/lib/_shared/esm/{ButtonV2-2U4PvnpS.mjs → ButtonV2-DwYBAojW.mjs} +2 -2
- package/lib/_shared/esm/{Calendar-Di_PdK9o.mjs → Calendar-CjqPM7ta.mjs} +2 -2
- package/lib/_shared/esm/{CardFooter-CgDDDI7Z.mjs → CardFooter-fsAY4cc6.mjs} +1 -1
- package/lib/_shared/esm/{ComboBox-Cga1icqB.mjs → ComboBox-CRlJjeev.mjs} +1 -1
- package/lib/_shared/esm/{ContentSwitcherDropdown-dktkyAjY.mjs → ContentSwitcherDropdown-BCkuAfwC.mjs} +1 -1
- package/lib/_shared/esm/{ContentSwitcherList-OnZoE86O.mjs → ContentSwitcherList-DKPD9GfN.mjs} +3 -2
- package/lib/_shared/esm/{DatePicker-DyPo-u9K.mjs → DatePicker-3sYJ3wGn.mjs} +43 -28
- package/lib/_shared/esm/{HeroButton-HYskwyvn.mjs → HeroButton-jdjjV_Gf.mjs} +1 -1
- package/lib/_shared/esm/{Icon-MZfaoOo9.mjs → Icon-CcPOJcQm.mjs} +1 -1
- package/lib/_shared/esm/{MediaCard-tYOu7gv8.mjs → MediaCard-DqMaNWsE.mjs} +5 -9
- package/lib/_shared/esm/{MenuSubContent-DCfTtJpf.mjs → MenuItemMultiLevelContent-JTOHqpzg.mjs} +7 -7
- package/lib/_shared/esm/ProgressStepper-CLBtBNy2.mjs +74 -0
- package/lib/_shared/esm/ProgressStepperOverflow-B9ba8ljs.mjs +140 -0
- package/lib/_shared/esm/{RadioCardGroupInput-Cy1r7M8l.mjs → RadioCardGroupInput-D7W28geB.mjs} +1 -1
- package/lib/_shared/esm/{SiteHeaderV2NavItemWithSubNav-B9hz5IKd.mjs → SiteHeaderV2NavItemWithSubNav-BMoBdUxK.mjs} +3 -3
- package/lib/_shared/esm/{TemplateBanner-CS95cxio.mjs → TemplateBanner-Up6cR-3_.mjs} +14 -7
- package/lib/_shared/esm/Visible-C-jVXUWp.mjs +16 -0
- package/lib/_shared/esm/{index.es-DZ9WSYOo.mjs → index.es-DCvYtQfu.mjs} +2 -2
- package/lib/index.cjs +1117 -806
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +177 -50
- package/lib/index.d.mts +177 -50
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1107 -801
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +8 -22
- package/package.json +8 -8
- package/lib/GradientBackground/GradientBackground.cjs +0 -19
- package/lib/GradientBackground/GradientBackground.mjs +0 -17
- package/lib/GradientBackground/styles.css +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var index = require('./index-CTlXMLug.cjs');
|
|
6
|
+
var index$1 = require('./index-CqYNiqix.cjs');
|
|
7
|
+
var capitaliseFirstLetter = require('./capitalise-first-letter-CdhexpSx.cjs');
|
|
8
|
+
var VisuallyHidden = require('./VisuallyHidden-B4XCvPYP.cjs');
|
|
9
|
+
var Icon = require('./Icon-CzhyKqMd.cjs');
|
|
10
|
+
|
|
11
|
+
var Error = "\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 ";
|
|
12
|
+
|
|
13
|
+
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";
|
|
14
|
+
|
|
15
|
+
var Complete = "\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=\"m10.125 16.435-3.53-3.53a.75.75 0 0 1 0-1.06.768.768 0 0 1 1.06 0l2.47 2.47 6.22-6.22a.75.75 0 1 1 1.06 1.06l-7.28 7.28Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath>\n <rect width=\"24\" height=\"24\" rx=\"12\" />\n </clipPath>\n </defs>\n </svg>\n ";
|
|
16
|
+
|
|
17
|
+
var Current = "\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"7\" fill=\"currentColor\" />\n <defs>\n <linearGradient\n id=\"paint0_linear_1_1050\"\n x1=\"36.6036\"\n y1=\"-4.31391e-07\"\n x2=\"-12.6036\"\n y2=\"24\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#F200F5\" />\n <stop offset=\"1\" stopColor=\"#1EC8E6\" />\n </linearGradient>\n </defs>\n </svg>\n ";
|
|
18
|
+
|
|
19
|
+
var ProgressStepperItem = function (_a) {
|
|
20
|
+
var _b;
|
|
21
|
+
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 = filterAttrs.__rest(_a, ["title", "titleHref", "subTitle", "direction", "status", "size", "isFluid", "invertLabelPosition", "ariaLabel", "onClick", "previousStep", "stepContent", "isStepContentHidden"]);
|
|
22
|
+
var statusIcons = {
|
|
23
|
+
todo: undefined,
|
|
24
|
+
completed: Complete,
|
|
25
|
+
current: Current,
|
|
26
|
+
warning: Warning,
|
|
27
|
+
error: Error,
|
|
28
|
+
};
|
|
29
|
+
var onClickHandler = function (event) {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
onClick && onClick();
|
|
32
|
+
};
|
|
33
|
+
var statusIcon = statusIcons[status];
|
|
34
|
+
return (React.createElement("div", filterAttrs.__assign({ className: index.classNames("arc-ProgressStepperItem", "arc-ProgressStepperItem--".concat(status), "arc-ProgressStepperItem--".concat(size), (_b = {
|
|
35
|
+
"arc-ProgressStepperItem--vertical": direction === "vertical",
|
|
36
|
+
"arc-ProgressStepperItem--isFluid": isFluid && direction !== "vertical",
|
|
37
|
+
"arc-ProgressStepperItem--previousStepCompleted": previousStep === "completed"
|
|
38
|
+
},
|
|
39
|
+
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = status !== "todo",
|
|
40
|
+
_b["arc-ProgressStepperItem--invertLabelPosition"] = direction !== "vertical" && invertLabelPosition,
|
|
41
|
+
_b)) }, filterAttrs.filterAttrs(props)),
|
|
42
|
+
React.createElement("div", { className: "arc-ProgressStepperItem-iconSection" },
|
|
43
|
+
React.createElement("div", { className: "arc-ProgressStepperItem-iconWrapper", "data-testid": "arc-ProgressStepperItem-iconWrapper" },
|
|
44
|
+
React.createElement("span", { className: index.classNames("arc-ProgressStepperItem-statusIcon", {
|
|
45
|
+
"arc-ProgressStepperItem-statusIcon--small": size === "small",
|
|
46
|
+
}) }, status === "todo" ? null : status === "current" ? (React.createElement("div", { className: "arc-ProgressStepperItem-statusIconInner" })) : (React.createElement(Icon.Icon, { icon: statusIcon && index$1.svgToMiniDataURI(statusIcon) }))))),
|
|
47
|
+
React.createElement("div", { className: "arc-ProgressStepperItem-textSection" },
|
|
48
|
+
titleHref || onClick ? (React.createElement("a", { role: !titleHref && onClick ? "button" : undefined, href: titleHref, "aria-label": ariaLabel, className: index.classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler },
|
|
49
|
+
title,
|
|
50
|
+
status !== "todo" ? (React.createElement(VisuallyHidden.VisuallyHidden, null,
|
|
51
|
+
":",
|
|
52
|
+
capitaliseFirstLetter.capitaliseFirstLetter(status))) : (React.createElement(VisuallyHidden.VisuallyHidden, null, ":To do")))) : (React.createElement("div", { className: "arc-ProgressStepperItem-title" },
|
|
53
|
+
title,
|
|
54
|
+
status !== "todo" ? (React.createElement(VisuallyHidden.VisuallyHidden, null,
|
|
55
|
+
":",
|
|
56
|
+
capitaliseFirstLetter.capitaliseFirstLetter(status))) : (React.createElement(VisuallyHidden.VisuallyHidden, null, ":To do")))),
|
|
57
|
+
React.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
58
|
+
stepContent && !isStepContentHidden && direction === "vertical" && (React.createElement(React.Fragment, null,
|
|
59
|
+
React.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** Use `ProgressStepper` to provide an overview of a series of steps in a digital journey. */
|
|
63
|
+
var ProgressStepper = function (_a) {
|
|
64
|
+
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition, ref = _a.ref, props = filterAttrs.__rest(_a, ["children", "size", "isFluid", "direction", "isExpandable", "invertLabelPosition", "ref"]);
|
|
65
|
+
var items = React.Children.toArray(children);
|
|
66
|
+
var getStepStatus = function (item) {
|
|
67
|
+
var _a;
|
|
68
|
+
return (_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.status;
|
|
69
|
+
};
|
|
70
|
+
return (React.createElement("div", filterAttrs.__assign({ ref: ref, className: index.classNames("arc-ProgressStepper", {
|
|
71
|
+
"arc-ProgressStepper--vertical": direction === "vertical",
|
|
72
|
+
}) }, filterAttrs.filterAttrs(props)), items.map(function (item, index) { return (React.createElement(React.Fragment, { key: "StepperItem-".concat(index) },
|
|
73
|
+
React.createElement(ProgressStepperItem, filterAttrs.__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.filterAttrs(item.props))))); })));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.ProgressStepper = ProgressStepper;
|
|
77
|
+
exports.ProgressStepperItem = ProgressStepperItem;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var debounce = require('./debounce-BeIT3oyF.cjs');
|
|
6
|
+
var ProgressStepper = require('./ProgressStepper-BL9Y5c4X.cjs');
|
|
7
|
+
|
|
8
|
+
/** Use `ProgressStepperOverflow` to wrap `ProgressStepperItem`s and allow overflow behaviour. */
|
|
9
|
+
var ProgressStepperOverflow = React.forwardRef(function (_a, stepperRef) {
|
|
10
|
+
var children = _a.children, onIndexChange = _a.onIndexChange, onLoadStep = _a.onLoadStep, size = _a.size, invertLabelPosition = _a.invertLabelPosition, _b = _a.offsetLeft, offsetLeft = _b === void 0 ? 24 : _b, props = filterAttrs.__rest(_a, ["children", "onIndexChange", "onLoadStep", "size", "invertLabelPosition", "offsetLeft"]);
|
|
11
|
+
var _c = React.useState(onLoadStep ? onLoadStep : 0), activeIndex = _c[0], setActiveIndex = _c[1];
|
|
12
|
+
var _d = React.useState(0), closestScrolledIndex = _d[0], setClosestScrolledIndex = _d[1];
|
|
13
|
+
var _e = React.useState(true), lastStepVisible = _e[0], setLastStepVisible = _e[1];
|
|
14
|
+
var containerRef = React.useRef(null);
|
|
15
|
+
React.useImperativeHandle(stepperRef, function () { return ({
|
|
16
|
+
handleStepScroll: handleStepScroll,
|
|
17
|
+
scrollToStep: scrollToStep,
|
|
18
|
+
handleViewScroll: handleViewScroll,
|
|
19
|
+
isLastChildVisible: isLastChildVisible,
|
|
20
|
+
}); });
|
|
21
|
+
// Add Horizontal Scroll Event Listener
|
|
22
|
+
React.useEffect(function () {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
var checkClosest = debounce.debounce(function () {
|
|
25
|
+
var closestIndex = findClosestIndex();
|
|
26
|
+
setClosestScrolledIndex(closestIndex);
|
|
27
|
+
}, 100);
|
|
28
|
+
var checkLastChild = debounce.debounce(function () {
|
|
29
|
+
var lastVisible = isLastChildVisible();
|
|
30
|
+
if (lastVisible) {
|
|
31
|
+
setLastStepVisible(true);
|
|
32
|
+
}
|
|
33
|
+
else
|
|
34
|
+
setLastStepVisible(false);
|
|
35
|
+
}, 100);
|
|
36
|
+
(_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", checkLastChild);
|
|
37
|
+
(_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener("scroll", checkClosest);
|
|
38
|
+
return function () {
|
|
39
|
+
var _a;
|
|
40
|
+
(_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", checkClosest);
|
|
41
|
+
checkLastChild.cancel();
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
// Scroll to activeIndex
|
|
45
|
+
React.useEffect(function () {
|
|
46
|
+
scrollTo();
|
|
47
|
+
}, [activeIndex]);
|
|
48
|
+
// Exposing changes in activeIndex outside of component
|
|
49
|
+
React.useEffect(function () {
|
|
50
|
+
onIndexChange === null || onIndexChange === void 0 ? void 0 : onIndexChange(closestScrolledIndex);
|
|
51
|
+
isLastChildVisible();
|
|
52
|
+
}, [closestScrolledIndex, onIndexChange, lastStepVisible]);
|
|
53
|
+
// helper functions - start
|
|
54
|
+
var getProgressStepper = function () { var _a; return (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.firstChild; };
|
|
55
|
+
var getStepChildren = function () {
|
|
56
|
+
var _a;
|
|
57
|
+
return Array.from(((_a = getProgressStepper()) === null || _a === void 0 ? void 0 : _a.children) || []);
|
|
58
|
+
};
|
|
59
|
+
var getLeftRects = function (children) {
|
|
60
|
+
var container = getProgressStepper();
|
|
61
|
+
if (!container)
|
|
62
|
+
return [];
|
|
63
|
+
var parentRect = container.getBoundingClientRect();
|
|
64
|
+
return children.map(function (child) {
|
|
65
|
+
var childRect = child.getBoundingClientRect();
|
|
66
|
+
return {
|
|
67
|
+
left: childRect.left - parentRect.left,
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
var indexOfClosest = function (values) {
|
|
72
|
+
return values.indexOf(Math.min.apply(Math, values));
|
|
73
|
+
};
|
|
74
|
+
// helper functions - end
|
|
75
|
+
var isLastChildVisible = function () {
|
|
76
|
+
var _a;
|
|
77
|
+
var steps = getStepChildren();
|
|
78
|
+
var lastStep = steps[steps.length - 1];
|
|
79
|
+
var rect = lastStep.getBoundingClientRect();
|
|
80
|
+
var containerRect = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
81
|
+
return rect.right <= containerRect.right;
|
|
82
|
+
};
|
|
83
|
+
// Used for onScroll function of scrolling without buttons
|
|
84
|
+
var findClosestIndex = function () {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
var children = getStepChildren();
|
|
87
|
+
var scrolledAmount = (_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft) !== null && _b !== void 0 ? _b : 0;
|
|
88
|
+
// compare the scrolled amount to the intial left edge distance for each step
|
|
89
|
+
var getScrollDistances = function (children, scrolledAmount) {
|
|
90
|
+
return getLeftRects(children).map(function (rect) {
|
|
91
|
+
return Math.abs(scrolledAmount - rect.left);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
var closestIndex = indexOfClosest(getScrollDistances(children, scrolledAmount));
|
|
95
|
+
return closestIndex;
|
|
96
|
+
};
|
|
97
|
+
// Scroll active step to the far left of the page
|
|
98
|
+
var scrollTo = function () {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
var activeStep = (_a = getProgressStepper()) === null || _a === void 0 ? void 0 : _a.children[activeIndex];
|
|
101
|
+
if (activeStep) {
|
|
102
|
+
(_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo({
|
|
103
|
+
left: activeStep.offsetLeft - offsetLeft,
|
|
104
|
+
behavior: "smooth",
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var handleStepScroll = function (increment) {
|
|
109
|
+
// Account for any manual scrolling set closest index to active index
|
|
110
|
+
setActiveIndex(closestScrolledIndex);
|
|
111
|
+
var newIndex = closestScrolledIndex + increment;
|
|
112
|
+
setActiveIndex(newIndex);
|
|
113
|
+
// If clicking backwards to include half visible step
|
|
114
|
+
if (closestScrolledIndex + increment === activeIndex) {
|
|
115
|
+
scrollTo();
|
|
116
|
+
}
|
|
117
|
+
if (closestScrolledIndex + increment < 0) {
|
|
118
|
+
setActiveIndex(0);
|
|
119
|
+
scrollTo();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
// Used to scroll by Parent width
|
|
123
|
+
var handleViewScroll = function (direction) {
|
|
124
|
+
var _a;
|
|
125
|
+
var clientWidth = ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) || 0;
|
|
126
|
+
var stepper = containerRef.current;
|
|
127
|
+
if (!stepper)
|
|
128
|
+
return;
|
|
129
|
+
stepper.scrollBy({
|
|
130
|
+
left: direction ? clientWidth : -clientWidth,
|
|
131
|
+
behavior: "smooth",
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
// Used to set a specific step to jump to on a button click
|
|
135
|
+
var scrollToStep = function (step) {
|
|
136
|
+
setActiveIndex(step);
|
|
137
|
+
};
|
|
138
|
+
return (React.createElement("div", filterAttrs.__assign({ ref: containerRef, className: "arc-ProgressStepperOverflow", style: { paddingLeft: offsetLeft } }, filterAttrs.filterAttrs(props)),
|
|
139
|
+
React.createElement(ProgressStepper.ProgressStepper, { size: size, invertLabelPosition: invertLabelPosition, isFluid: false }, children)));
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
exports.ProgressStepperOverflow = ProgressStepperOverflow;
|
package/lib/_shared/cjs/{RadioCardGroupInput-BmntgyWB.cjs → RadioCardGroupInput-CeUM3yPS.cjs}
RENAMED
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var index = require('./index-CTlXMLug.cjs');
|
|
6
6
|
var capitaliseFirstLetter = require('./capitalise-first-letter-CdhexpSx.cjs');
|
|
7
7
|
var Surface = require('./Surface-BFx1yNsq.cjs');
|
|
8
|
-
var Icon = require('./Icon-
|
|
8
|
+
var Icon = require('./Icon-CzhyKqMd.cjs');
|
|
9
9
|
|
|
10
10
|
var RadioContext = React.createContext({});
|
|
11
11
|
var Provider = RadioContext.Provider;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index = require('./index-CTlXMLug.cjs');
|
|
6
|
-
var index_es = require('./index.es-
|
|
6
|
+
var index_es = require('./index.es-DBEGtWPg.cjs');
|
|
7
7
|
var BtIconChevronRight2Px = require('./BtIconChevronRight2Px-CIRaur2B.cjs');
|
|
8
8
|
var useMediaQuery = require('./use-media-query-BsUfHjPZ.cjs');
|
|
9
|
-
var Icon = require('./Icon-
|
|
9
|
+
var Icon = require('./Icon-CzhyKqMd.cjs');
|
|
10
10
|
var Surface = require('./Surface-BFx1yNsq.cjs');
|
|
11
|
-
var ButtonV2 = require('./ButtonV2-
|
|
11
|
+
var ButtonV2 = require('./ButtonV2-Bta5SVVY.cjs');
|
|
12
12
|
var handleLinkClick = require('./handle-link-click-C7BvOIYa.cjs');
|
|
13
13
|
var BrandLogo = require('./BrandLogo-D5wlIFmm.cjs');
|
|
14
14
|
|
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index = require('./index-CTlXMLug.cjs');
|
|
6
|
-
var index_es = require('./index.es-i8i9xWYf.cjs');
|
|
7
|
-
var useMediaQuery = require('./use-media-query-BsUfHjPZ.cjs');
|
|
8
6
|
var VerticalSpace = require('./VerticalSpace-BJvST6WP.cjs');
|
|
9
7
|
var Box = require('./Box-COPXU1Jf.cjs');
|
|
10
8
|
var Heading = require('./Heading-BEMSkLYR.cjs');
|
|
11
9
|
var GridRow = require('./GridRow-BW2ZGtND.cjs');
|
|
10
|
+
require('./index-DR8Rkav9.cjs');
|
|
12
11
|
var BannerImage = require('./BannerImage-kdAKagG-.cjs');
|
|
12
|
+
var Visible = require('./Visible-Dx__9oZG.cjs');
|
|
13
|
+
|
|
14
|
+
var BannerRow = function (_a) {
|
|
15
|
+
var isReversed = _a.isReversed, children = _a.children;
|
|
16
|
+
return (React.createElement(React.Fragment, null,
|
|
17
|
+
React.createElement(Visible.Visible, { xs: true, s: true },
|
|
18
|
+
React.createElement(GridRow.GridRow, { "data-testid": "arc-TemplateBanner-gridRow-mobile" }, children)),
|
|
19
|
+
React.createElement(Visible.Visible, { m: true, l: true, xl: true },
|
|
20
|
+
React.createElement(GridRow.GridRow, { "data-testid": "arc-TemplateBanner-gridRow-desktop", direction: isReversed ? "row-reverse" : "row" }, children))));
|
|
21
|
+
};
|
|
13
22
|
|
|
14
23
|
var TemplateBanner = function (_a) {
|
|
15
24
|
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, _c = _a.alignment, alignment = _c === void 0 ? "center" : _c, additionalTopMargin = _a.additionalTopMargin, _d = _a.minHeight, minHeight = _d === void 0 ? 454 : _d, _e = _a.headingSize, headingSize = _e === void 0 ? "xl" : _e, _f = _a.isReversed, isReversed = _f === void 0 ? false : _f, _g = _a.isElevated, isElevated = _g === void 0 ? false : _g, _h = _a.headingLevel, headingLevel = _h === void 0 ? "2" : _h, _j = _a.type, type = _j === void 0 ? "light" : _j, props = filterAttrs.__rest(_a, ["heading", "label", "text", "img", "contentRatio", "children", "alignment", "additionalTopMargin", "minHeight", "headingSize", "isReversed", "isElevated", "headingLevel", "type"]);
|
|
16
|
-
var isMinWidthArcBreakpointM = useMediaQuery.useMediaQuery("(min-width: ".concat(index_es.ArcSizeBreakpointsM, ")"));
|
|
17
25
|
var backgrounds = {
|
|
18
26
|
dark: "dark-brand-02",
|
|
19
27
|
light: "light-white",
|
|
@@ -26,7 +34,6 @@ var TemplateBanner = function (_a) {
|
|
|
26
34
|
};
|
|
27
35
|
var isContained = type === "contained";
|
|
28
36
|
var borderWidth = isContained && !isElevated ? "thin" : undefined;
|
|
29
|
-
var direction = isReversed && isMinWidthArcBreakpointM ? "row-reverse" : "row";
|
|
30
37
|
var columnWithImgWidths = {
|
|
31
38
|
"1/0": 12,
|
|
32
39
|
"2/3": 8,
|
|
@@ -37,7 +44,7 @@ var TemplateBanner = function (_a) {
|
|
|
37
44
|
}) }, filterAttrs.filterAttrs(props)),
|
|
38
45
|
React.createElement(Box.Box, { isBorderRadius: true, "data-testid": "arc-TemplateBanner-box", borderWidth: borderWidth, surface: backgrounds[type], isSurfaceTransparent: !isContained },
|
|
39
46
|
React.createElement(GridRow.Grid, { isGutterless: true, isFluid: true },
|
|
40
|
-
React.createElement(
|
|
47
|
+
React.createElement(BannerRow, { "data-testid": "arc-TemplateBanner-gridRow", isReversed: isReversed },
|
|
41
48
|
React.createElement(GridRow.GridCol, { "data-testid": "arc-TemplateBanner-contentCol", align: {
|
|
42
49
|
m: alignment === "start" ? "start" : "center",
|
|
43
50
|
xs: !img || contentRatio === "1/0" ? "center" : "start",
|
|
@@ -46,7 +53,7 @@ var TemplateBanner = function (_a) {
|
|
|
46
53
|
"arc-TemplateBanner-content--additionalTopMargin": additionalTopMargin && alignment === "start",
|
|
47
54
|
}) },
|
|
48
55
|
label && (React.createElement(React.Fragment, null,
|
|
49
|
-
React.createElement(Heading.Heading, {
|
|
56
|
+
React.createElement(Heading.Heading, { level: "3", fontStyle: "overline" }, label),
|
|
50
57
|
React.createElement(VerticalSpace.VerticalSpace, { size: "8" }))),
|
|
51
58
|
React.createElement(Heading.Heading, { level: headingLevel, size: headingSize }, heading),
|
|
52
59
|
text && (React.createElement(React.Fragment, null,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var filterAttrs = require('./filter-attrs-eK6E_34o.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var index = require('./index-CTlXMLug.cjs');
|
|
6
|
+
|
|
7
|
+
var Visible = function (_a) {
|
|
8
|
+
var children = _a.children, xs = _a.xs, s = _a.s, m = _a.m, l = _a.l, xl = _a.xl, props = filterAttrs.__rest(_a, ["children", "xs", "s", "m", "l", "xl"]);
|
|
9
|
+
return (React.createElement("div", filterAttrs.__assign({ className: index.classNames("arc-Visible", {
|
|
10
|
+
"arc-Visible--xs": xs,
|
|
11
|
+
"arc-Visible--s": s,
|
|
12
|
+
"arc-Visible--m": m,
|
|
13
|
+
"arc-Visible--l": l,
|
|
14
|
+
"arc-Visible--xl": xl,
|
|
15
|
+
}) }, filterAttrs.filterAttrs(props)), children));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.Visible = Visible;
|
|
@@ -2,6 +2,7 @@ import { a as __assign, _ as __rest, f as filterAttrs } from './filter-attrs-B6C
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
4
|
import { C as ConditionalWrapper } from './ConditionalWrapper-WoJxFYwS.mjs';
|
|
5
|
+
import { V as VisuallyHidden } from './VisuallyHidden-DqAgoqJo.mjs';
|
|
5
6
|
import { T as ThemeIcon } from './ThemeIcon-CN_Ed5b1.mjs';
|
|
6
7
|
import { I as Image } from './Image-Dl8oH1Rn.mjs';
|
|
7
8
|
import { H as Heading } from './Heading-CxHWefi7.mjs';
|
|
@@ -35,7 +36,9 @@ var Avatar = function (_a) {
|
|
|
35
36
|
var wrapperAttrs = __assign({ className: classNames("arc-Avatar", "arc-Avatar--".concat(size), {
|
|
36
37
|
"arc-Avatar--img": Boolean(img),
|
|
37
38
|
}) }, filterAttrs(props));
|
|
38
|
-
return (React__default.createElement(ConditionalWrapper, { condition: Boolean(href), wrapper: function (children) { return (React__default.createElement("a", __assign({ href: href, "aria-label": ariaLabel, onClick: onClick, title: title }, wrapperAttrs), children)); }, fallback: function (children) { return React__default.createElement(
|
|
39
|
+
return (React__default.createElement(ConditionalWrapper, { condition: Boolean(href), wrapper: function (children) { return (React__default.createElement("a", __assign({ href: href, "aria-label": ariaLabel, onClick: onClick, title: title }, wrapperAttrs), children)); }, fallback: function (children) { return (React__default.createElement(React__default.Fragment, null,
|
|
40
|
+
React__default.createElement("div", __assign({}, wrapperAttrs), children),
|
|
41
|
+
ariaLabel && React__default.createElement(VisuallyHidden, null, ariaLabel))); } },
|
|
39
42
|
React__default.createElement(AvatarContent, { size: size, img: img, initials: initials })));
|
|
40
43
|
};
|
|
41
44
|
|
|
@@ -2,7 +2,7 @@ import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6C
|
|
|
2
2
|
import React__default, { forwardRef, useContext } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
4
|
import { s as suffixModifier } from './suffix-modifier-B_pO0UkF.mjs';
|
|
5
|
-
import { I as Icon } from './Icon-
|
|
5
|
+
import { I as Icon } from './Icon-CcPOJcQm.mjs';
|
|
6
6
|
import { C as Context } from './Surface-Colbp3Zx.mjs';
|
|
7
7
|
import { T as ThemeIcon } from './ThemeIcon-CN_Ed5b1.mjs';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6CM-NUr.mjs';
|
|
2
2
|
import React__default, { forwardRef, useContext } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
-
import { I as Icon } from './Icon-
|
|
4
|
+
import { I as Icon } from './Icon-CcPOJcQm.mjs';
|
|
5
5
|
import { C as Context } from './Surface-Colbp3Zx.mjs';
|
|
6
6
|
import { S as Spinner } from './Spinner-Cd7LiPTy.mjs';
|
|
7
7
|
|
|
@@ -28,7 +28,7 @@ var ButtonV2 = forwardRef(function (_a, ref) {
|
|
|
28
28
|
case "compact":
|
|
29
29
|
case "secondary":
|
|
30
30
|
case "tertiary":
|
|
31
|
-
return
|
|
31
|
+
return "brand-alt";
|
|
32
32
|
default:
|
|
33
33
|
return "auto";
|
|
34
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as __spreadArray, a as __assign, _ as __rest, f as filterAttrs } from './filter-attrs-B6CM-NUr.mjs';
|
|
2
2
|
import React__default, { createContext, forwardRef, useContext, useCallback, useRef, useState, useReducer, useEffect } from 'react';
|
|
3
3
|
import { r as requiredArgs, t as toDate, b as toInteger, _ as _typeof, g as getDefaultOptions, f as format } from './index-Cr6KeQLU.mjs';
|
|
4
|
-
import { A as ArcSizeBreakpointsM } from './index.es-
|
|
4
|
+
import { A as ArcSizeBreakpointsM } from './index.es-DCvYtQfu.mjs';
|
|
5
5
|
import { u as useMediaQuery } from './use-media-query-DmKuIDEM.mjs';
|
|
6
6
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
7
7
|
import { T as Text } from './Text-CBlnm5CT.mjs';
|
|
@@ -10,7 +10,7 @@ import './index-Spae4j7j.mjs';
|
|
|
10
10
|
import { S as Surface } from './Surface-Colbp3Zx.mjs';
|
|
11
11
|
import { H as Heading } from './Heading-CxHWefi7.mjs';
|
|
12
12
|
import { B as BtIconChevronRightMid } from './BtIconChevronRightMid-DE4lmVaG.mjs';
|
|
13
|
-
import { I as Icon } from './Icon-
|
|
13
|
+
import { I as Icon } from './Icon-CcPOJcQm.mjs';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @name addMonths
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
3
|
-
import { I as Icon } from './Icon-
|
|
3
|
+
import { I as Icon } from './Icon-CcPOJcQm.mjs';
|
|
4
4
|
import { i as isDate, f as format } from './index-Cr6KeQLU.mjs';
|
|
5
5
|
|
|
6
6
|
var ArrowRight = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath d='M18.146 11.646a.5.5 0 0 0 0 .707l3.147 3.147H9.5a.5.5 0 0 0 0 1h11.793l-3.146 3.146a.5.5 0 1 0 .707.707L23.207 16l-4.354-4.354a.5.5 0 0 0-.707 0'/%3e%3c/svg%3e";
|
|
@@ -5,7 +5,7 @@ import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
|
5
5
|
import { u as useAriaDescribedby, F as FormControl } from './FormControl-CWyrVi1u.mjs';
|
|
6
6
|
import { e as useThemeElement } from './index-Bz2JQq34.mjs';
|
|
7
7
|
import { B as Box } from './Box-BYm_GTct.mjs';
|
|
8
|
-
import { I as Icon } from './Icon-
|
|
8
|
+
import { I as Icon } from './Icon-CcPOJcQm.mjs';
|
|
9
9
|
import { T as ThemeIcon } from './ThemeIcon-CN_Ed5b1.mjs';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -59,7 +59,7 @@ var ContentSwitcherDropdown = function (_a) {
|
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
var isActive = child.props.value === selectValue;
|
|
62
|
-
return (React__default.createElement("div", __assign({ role: "tabpanel", className: "arc-ContentSwitcherDropdown-content", id: "arc-content-switcher-dropdown-content-".concat(child.props.value), "aria-labelledby": "arc-content-switcher-dropdown-trigger-".concat(child.props.value), "data-state": isActive ? "active" : "inactive", tabIndex:
|
|
62
|
+
return (React__default.createElement("div", __assign({ role: "tabpanel", className: "arc-ContentSwitcherDropdown-content", id: "arc-content-switcher-dropdown-content-".concat(child.props.value), "aria-labelledby": "arc-content-switcher-dropdown-trigger-".concat(child.props.value), "data-state": isActive ? "active" : "inactive", tabIndex: -1, hidden: !isActive }, filterAttrs(child.props)), child));
|
|
63
63
|
})));
|
|
64
64
|
};
|
|
65
65
|
var ContentSwitcherDropdownContent = function (_a) {
|
package/lib/_shared/esm/{ContentSwitcherList-OnZoE86O.mjs → ContentSwitcherList-DKPD9GfN.mjs}
RENAMED
|
@@ -13,7 +13,7 @@ var ContentSwitcher = function (_a) {
|
|
|
13
13
|
|
|
14
14
|
var ContentSwitcherContent = function (_a) {
|
|
15
15
|
var children = _a.children, value = _a.value;
|
|
16
|
-
return (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: "arc-ContentSwitcherContent", value: value },
|
|
16
|
+
return (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: "arc-ContentSwitcherContent", value: value, tabIndex: -1 },
|
|
17
17
|
React__default.createElement("div", { className: "arc-ContentSwitcherContent-wrapper" }, children)));
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -64,11 +64,12 @@ var ContentSwitcherList = function (_a) {
|
|
|
64
64
|
list.removeEventListener("scroll", checkOverflow);
|
|
65
65
|
}
|
|
66
66
|
window.removeEventListener("resize", updateLayout);
|
|
67
|
+
handleResize.cancel();
|
|
67
68
|
};
|
|
68
69
|
}, [children, checkOverflow, handleResize]);
|
|
69
70
|
return (React__default.createElement("span", { className: classNames("arc-ContentSwitcherList-wrapper", {
|
|
70
71
|
"arc-ContentSwitcherList-wrapper--isInset": isInset,
|
|
71
|
-
}) },
|
|
72
|
+
}), tabIndex: -1 },
|
|
72
73
|
React__default.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5, __assign({ className: classNames("arc-ContentSwitcherList", {
|
|
73
74
|
"arc-ContentSwitcherList--contained": type === "contained",
|
|
74
75
|
"arc-ContentSwitcherList--isJustified": isJustified,
|
|
@@ -2,7 +2,7 @@ import { b as __spreadArray, _ as __rest, a as __assign, f as filterAttrs } from
|
|
|
2
2
|
import React__default, { forwardRef, useState, useRef, useEffect } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
4
|
import { R as Root2, A as Anchor2, P as Portal, C as Content2 } from './index-CxrL7jIX.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { i as isBefore, a as isAfter, c as compareAsc, C as Calendar } from './Calendar-CjqPM7ta.mjs';
|
|
6
6
|
import { r as requiredArgs, t as toDate, a as isValid, f as format } from './index-Cr6KeQLU.mjs';
|
|
7
7
|
import { e as useThemeElement } from './index-Bz2JQq34.mjs';
|
|
8
8
|
import { a as TextInputWithPlaceHolder } from './TextInput-Dk7qNGoh.mjs';
|
|
@@ -138,6 +138,38 @@ var convertRangeStringToDates = function (value) {
|
|
|
138
138
|
: []), true);
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
+
function validateRangeOnBlur(_a) {
|
|
142
|
+
var value = _a.value, minDate = _a.minDate, maxDate = _a.maxDate, disabledDates = _a.disabledDates, previousValidValue = _a.previousValidValue, dispatchChangeEvent = _a.dispatchChangeEvent, blurEvent = _a.blurEvent;
|
|
143
|
+
if (!isRangeValid(value))
|
|
144
|
+
return;
|
|
145
|
+
var _b = convertRangeStringToDates(value), start = _b[0], end = _b[1];
|
|
146
|
+
var isStartBeforeMin = minDate && isBefore(start, minDate);
|
|
147
|
+
var isEndAfterMax = maxDate && isAfter(end, maxDate);
|
|
148
|
+
var isStartDisabled = isDisabledDate(disabledDates, start);
|
|
149
|
+
var isEndDisabled = isDisabledDate(disabledDates, end);
|
|
150
|
+
if (isStartBeforeMin && isEndAfterMax) {
|
|
151
|
+
return dispatchChangeEvent(blurEvent, "".concat(formatDate(minDate), " - ").concat(formatDate(maxDate)));
|
|
152
|
+
}
|
|
153
|
+
if (isStartBeforeMin) {
|
|
154
|
+
return dispatchChangeEvent(blurEvent, "".concat(formatDate(minDate), " - ").concat(formatDate(end)));
|
|
155
|
+
}
|
|
156
|
+
if (isEndAfterMax) {
|
|
157
|
+
return dispatchChangeEvent(blurEvent, "".concat(formatDate(start), " - ").concat(formatDate(maxDate)));
|
|
158
|
+
}
|
|
159
|
+
if (isStartDisabled || isEndDisabled) {
|
|
160
|
+
var _c = previousValidValue
|
|
161
|
+
? convertRangeStringToDates(previousValidValue)
|
|
162
|
+
: [], prevStart = _c[0], prevEnd = _c[1];
|
|
163
|
+
return dispatchChangeEvent(blurEvent, prevStart && prevEnd
|
|
164
|
+
? "".concat(formatDate(prevStart), " - ").concat(formatDate(prevEnd))
|
|
165
|
+
: "");
|
|
166
|
+
}
|
|
167
|
+
if (isAfter(start, end)) {
|
|
168
|
+
var _d = [start, end].sort(compareAsc), orderedStart = _d[0], orderedEnd = _d[1];
|
|
169
|
+
return dispatchChangeEvent(blurEvent, "".concat(formatDate(orderedStart), " - ").concat(formatDate(orderedEnd)));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
141
173
|
/**
|
|
142
174
|
* Use `DatePicker` to clearly present available dates and allow users to choose a way to enter information.
|
|
143
175
|
*/
|
|
@@ -216,32 +248,15 @@ var DatePicker = forwardRef(function (_a, ref) {
|
|
|
216
248
|
}
|
|
217
249
|
};
|
|
218
250
|
var handleRangeSelectionBlur = function (e) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (isStartDateBeforeMinDate) {
|
|
229
|
-
return dispatchChangeEvent(e, "".concat(formatDate(minDate), " - ").concat(formatDate(end)));
|
|
230
|
-
}
|
|
231
|
-
if (isEndDateAfterMaxDate) {
|
|
232
|
-
return dispatchChangeEvent(e, "".concat(formatDate(start), " - ").concat(formatDate(maxDate)));
|
|
233
|
-
}
|
|
234
|
-
if (isStartDateDisabled || isEndDateDisabled) {
|
|
235
|
-
var _b = previousValidValue.current
|
|
236
|
-
? convertRangeStringToDates(previousValidValue.current)
|
|
237
|
-
: [], start_1 = _b[0], end_1 = _b[1];
|
|
238
|
-
return dispatchChangeEvent(e, start_1 && end_1 ? "".concat(formatDate(start_1), " - ").concat(formatDate(end_1)) : "");
|
|
239
|
-
}
|
|
240
|
-
if (isAfter(start, end)) {
|
|
241
|
-
var _c = [start, end].sort(compareAsc), orderedStart = _c[0], orderedEnd = _c[1];
|
|
242
|
-
return dispatchChangeEvent(e, "".concat(formatDate(orderedStart), " - ").concat(formatDate(orderedEnd)));
|
|
243
|
-
}
|
|
244
|
-
}
|
|
251
|
+
validateRangeOnBlur({
|
|
252
|
+
value: value,
|
|
253
|
+
minDate: minDate,
|
|
254
|
+
maxDate: maxDate,
|
|
255
|
+
disabledDates: disabledDates,
|
|
256
|
+
previousValidValue: previousValidValue.current,
|
|
257
|
+
dispatchChangeEvent: dispatchChangeEvent,
|
|
258
|
+
blurEvent: e,
|
|
259
|
+
});
|
|
245
260
|
};
|
|
246
261
|
var handleBlur = function (e) {
|
|
247
262
|
onBlur && onBlur(e);
|
|
@@ -306,4 +321,4 @@ var DatePicker = forwardRef(function (_a, ref) {
|
|
|
306
321
|
React__default.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 }))))));
|
|
307
322
|
});
|
|
308
323
|
|
|
309
|
-
export { DATE_FORMAT as D,
|
|
324
|
+
export { DATE_FORMAT as D, isRangeValid as a, parseDateString as b, convertRangeStringToDates as c, DatePicker as d, formatDate as f, isDateValid as i, parseRangeString as p, validateRangeOnBlur as v };
|
|
@@ -2,7 +2,7 @@ import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6C
|
|
|
2
2
|
import React__default, { forwardRef, useContext } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
4
|
import { c as camelcase } from './index-Spae4j7j.mjs';
|
|
5
|
-
import { I as Icon } from './Icon-
|
|
5
|
+
import { I as Icon } from './Icon-CcPOJcQm.mjs';
|
|
6
6
|
import { C as Context } from './Surface-Colbp3Zx.mjs';
|
|
7
7
|
import { S as Spinner } from './Spinner-Cd7LiPTy.mjs';
|
|
8
8
|
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-B6CM-NUr.mjs';
|
|
2
2
|
import React__default, { useContext, useState, useEffect, Suspense } from 'react';
|
|
3
3
|
import { c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
|
-
import { a as ArcSizeBreakpointsS } from './index.es-DZ9WSYOo.mjs';
|
|
5
|
-
import { u as useMediaQuery } from './use-media-query-DmKuIDEM.mjs';
|
|
6
4
|
import { I as Image } from './Image-Dl8oH1Rn.mjs';
|
|
7
5
|
import { H as Heading } from './Heading-CxHWefi7.mjs';
|
|
8
6
|
import { C as Context, S as Surface } from './Surface-Colbp3Zx.mjs';
|
|
9
7
|
import { T as Text } from './Text-CBlnm5CT.mjs';
|
|
10
8
|
import { V as VerticalSpace } from './VerticalSpace-Duhm0zXP.mjs';
|
|
11
9
|
import { C as CardHeading } from './CardHeading-_setRRjq.mjs';
|
|
12
|
-
import { C as CardFooter } from './CardFooter-
|
|
10
|
+
import { C as CardFooter } from './CardFooter-fsAY4cc6.mjs';
|
|
13
11
|
import { C as ConditionalWrapper } from './ConditionalWrapper-WoJxFYwS.mjs';
|
|
14
12
|
|
|
15
13
|
var VideoPlayer = React__default.lazy(function () {
|
|
@@ -28,8 +26,6 @@ var MediaCard = function (_a) {
|
|
|
28
26
|
var surface = useContext(Context).surface;
|
|
29
27
|
var _e = useState(false), isClient = _e[0], setIsClient = _e[1];
|
|
30
28
|
var _f = useState(false), showHoverState = _f[0], setShowHoverState = _f[1];
|
|
31
|
-
var isMinWidthArcBreakpointS = useMediaQuery("(min-width: ".concat(ArcSizeBreakpointsS, ")"));
|
|
32
|
-
var headingSpacing = isMinWidthArcBreakpointS ? "16" : "8";
|
|
33
29
|
var handleShowHoverState = function (show) { return function () { return setShowHoverState(show); }; };
|
|
34
30
|
useEffect(function () {
|
|
35
31
|
setIsClient(true);
|
|
@@ -45,12 +41,12 @@ var MediaCard = function (_a) {
|
|
|
45
41
|
media.type === "video" && isClient && (React__default.createElement(Suspense, { fallback: null },
|
|
46
42
|
React__default.createElement(VideoPlayer, __assign({ isSupportingTextHidden: true }, media)))),
|
|
47
43
|
React__default.createElement("div", { className: "arc-MediaCard-content" },
|
|
48
|
-
label && (React__default.createElement(
|
|
49
|
-
React__default.createElement(Heading, {
|
|
50
|
-
React__default.createElement(VerticalSpace, { size:
|
|
44
|
+
label && (React__default.createElement("div", { className: "arc-MediaCard-label" },
|
|
45
|
+
React__default.createElement(Heading, { level: "3", fontStyle: "overline" }, label),
|
|
46
|
+
React__default.createElement(VerticalSpace, { size: "16" }))),
|
|
51
47
|
React__default.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) }),
|
|
52
48
|
React__default.createElement("div", { className: "arc-MediaCard-textContainer" }, text && (React__default.createElement(React__default.Fragment, null,
|
|
53
|
-
React__default.createElement(VerticalSpace, { size:
|
|
49
|
+
React__default.createElement(VerticalSpace, { size: "16" }),
|
|
54
50
|
React__default.createElement(Text, null, text),
|
|
55
51
|
(url || metaText) && React__default.createElement(VerticalSpace, { size: "24" })))),
|
|
56
52
|
React__default.createElement(CardFooter, { buttonIcon: buttonIcon, metaText: metaText, showButton: Boolean(url) && media.type !== "video", isHovered: showHoverState })))));
|