@arc-ui/components 12.0.0 → 12.1.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/Box/styles.css +1 -1
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.mjs +1 -1
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/styles.css +1 -1
- 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/styles.css +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/styles.css +1 -1
- package/lib/CheckboxIcon/styles.css +1 -1
- package/lib/Columns/styles.css +1 -1
- 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/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +4 -4
- package/lib/DatePicker/DatePicker.mjs +4 -4
- 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/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/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/styles.css +1 -1
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/styles.css +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/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +3 -3
- package/lib/InformationCard/InformationCard.mjs +3 -3
- package/lib/InformationCard/styles.css +1 -1
- package/lib/Link/styles.css +1 -1
- package/lib/Markup/styles.css +1 -1
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/styles.css +1 -1
- package/lib/NavigationHeader/NavigationHeader.cjs +23 -35
- package/lib/NavigationHeader/NavigationHeader.mjs +23 -35
- package/lib/NavigationHeader/styles.css +1 -1
- package/lib/Pagination/styles.css +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 +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 +6 -2
- package/lib/RadioCardGroup/RadioCardGroup.mjs +5 -1
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/styles.css +1 -1
- package/lib/Select/styles.css +1 -1
- package/lib/SemanticHeading/styles.css +1 -1
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +5 -4
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +5 -4
- 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 +1 -1
- package/lib/TabbedBanner/TabbedBanner.mjs +1 -1
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- 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/styles.css +1 -1
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/styles.css +1 -1
- package/lib/VerticalSpace/styles.css +1 -1
- 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/{Calendar-BvPNEvfm.cjs → Calendar-D_jZ0cgf.cjs} +2 -2
- package/lib/_shared/cjs/{ContentSwitcherList-BgAW2IhJ.cjs → ContentSwitcherList-DgychllS.cjs} +8 -8
- package/lib/_shared/cjs/{ProgressStepper-DTZQabiV.cjs → ProgressStepper-mTgKZYEl.cjs} +21 -20
- package/lib/_shared/cjs/{arc-breakpoints-Cl4-g1TC.cjs → arc-breakpoints-DFPoWNR4.cjs} +1 -1
- package/lib/_shared/cjs/{index.es-Dbvw_3_e.cjs → index.es-B2ZfX2D7.cjs} +1 -1
- package/lib/_shared/cjs/{use-media-query-DqZqShGX.cjs → use-media-query-BJV2IbHi.cjs} +4 -4
- package/lib/_shared/esm/{Calendar-DzsQqJlh.mjs → Calendar-wG6UVDgO.mjs} +2 -2
- package/lib/_shared/esm/{ContentSwitcherList-i4m4nAzP.mjs → ContentSwitcherList-CWZcMblg.mjs} +8 -8
- package/lib/_shared/esm/{ProgressStepper-CujHLQsm.mjs → ProgressStepper-DxZrJR0q.mjs} +22 -21
- package/lib/_shared/esm/{arc-breakpoints-Br78xe-f.mjs → arc-breakpoints-TEKN0W5t.mjs} +1 -1
- package/lib/_shared/esm/{index.es-f0R-yhhl.mjs → index.es-Co1d96HB.mjs} +2 -2
- package/lib/_shared/esm/{use-media-query-BmsMeo2M.mjs → use-media-query-l6Sou0dd.mjs} +4 -4
- package/lib/index.cjs +487 -200
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +207 -163
- package/lib/index.d.mts +207 -163
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +488 -202
- 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 +8 -6
- package/lib/_shared/cjs/capitalise-first-letter-CdhexpSx.cjs +0 -8
- package/lib/_shared/esm/capitalise-first-letter-Cubg2CS1.mjs +0 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign } from './tslib.es6-w7hdJ3oZ.mjs';
|
|
2
|
-
import React__default from 'react';
|
|
2
|
+
import React__default, { useId, forwardRef } from 'react';
|
|
3
3
|
import { g as getDefaultExportFromCjs, c as classNames } from './index-5C0-U8cc.mjs';
|
|
4
4
|
import { f as filterAttrs } from './filter-attrs-v_SweZXP.mjs';
|
|
5
|
-
import { c as capitaliseFirstLetter } from './capitalise-first-letter-Cubg2CS1.mjs';
|
|
6
5
|
import { V as VisuallyHidden } from './VisuallyHidden-aSQ4RA1o.mjs';
|
|
6
|
+
import { C as ConditionalWrapper } from './ConditionalWrapper-CbEvXHTj.mjs';
|
|
7
7
|
import { I as Icon } from './Icon-CCUbr_AO.mjs';
|
|
8
8
|
|
|
9
9
|
var shorterCssColorNames;
|
|
@@ -148,7 +148,8 @@ var Current = "\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w
|
|
|
148
148
|
|
|
149
149
|
var ProgressStepperItem = function (_a) {
|
|
150
150
|
var _b;
|
|
151
|
-
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"]);
|
|
151
|
+
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"]);
|
|
152
|
+
var id = useId();
|
|
152
153
|
var statusIcons = {
|
|
153
154
|
todo: undefined,
|
|
154
155
|
completed: Complete,
|
|
@@ -161,46 +162,46 @@ var ProgressStepperItem = function (_a) {
|
|
|
161
162
|
onClick && onClick();
|
|
162
163
|
};
|
|
163
164
|
var statusIcon = statusIcons[status];
|
|
164
|
-
|
|
165
|
+
var accessibleStatusLabel = "".concat(status === "todo" ? "to do" : status).concat(isViewing ? " - currently viewing" : "");
|
|
166
|
+
return (React__default.createElement("li", __assign({ "data-progress-stepper-item-id": id, className: classNames("arc-ProgressStepperItem", "arc-ProgressStepperItem--".concat(status), "arc-ProgressStepperItem--".concat(size), (_b = {
|
|
165
167
|
"arc-ProgressStepperItem--vertical": direction === "vertical",
|
|
166
168
|
"arc-ProgressStepperItem--isFluid": isFluid && direction !== "vertical",
|
|
167
169
|
"arc-ProgressStepperItem--previousStepCompleted": previousStep === "completed"
|
|
168
170
|
},
|
|
169
|
-
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = status !== "todo",
|
|
171
|
+
_b["arc-ProgressStepperItem--hasInteractiveStatus"] = onClick || titleHref || status !== "todo",
|
|
170
172
|
_b["arc-ProgressStepperItem--invertLabelPosition"] = direction !== "vertical" && invertLabelPosition,
|
|
171
173
|
_b)) }, filterAttrs(props)),
|
|
172
174
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-iconSection" },
|
|
173
175
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-iconWrapper", "data-testid": "arc-ProgressStepperItem-iconWrapper" },
|
|
174
176
|
React__default.createElement("span", { className: classNames("arc-ProgressStepperItem-statusIcon", {
|
|
175
177
|
"arc-ProgressStepperItem-statusIcon--small": size === "small",
|
|
176
|
-
}) },
|
|
178
|
+
}) },
|
|
179
|
+
status === "todo" && !isViewing ? null : isViewing ? (React__default.createElement("div", { className: "arc-ProgressStepperItem-statusIconInner" })) : (status !== "current" && (React__default.createElement(Icon, { icon: statusIcon && svgToMiniDataURI(statusIcon) }))),
|
|
180
|
+
status === "current" && isViewing === undefined ? (React__default.createElement(Icon, { icon: statusIcon && svgToMiniDataURI(statusIcon) })) : null))),
|
|
177
181
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-textSection" },
|
|
178
|
-
titleHref || onClick
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
":",
|
|
186
|
-
capitaliseFirstLetter(status))) : (React__default.createElement(VisuallyHidden, null, ":To do")))),
|
|
187
|
-
React__default.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle),
|
|
182
|
+
React__default.createElement(ConditionalWrapper, { condition: Boolean(titleHref || onClick), wrapper: function (children) { return (React__default.createElement("a", { role: !titleHref && onClick ? "button" : undefined, href: titleHref, className: classNames("arc-ProgressStepperItem-title", "arc-ProgressStepperItem-title--link"), onClick: onClickHandler, "aria-label": ariaLabel ||
|
|
183
|
+
(status !== "current"
|
|
184
|
+
? "".concat(title, ", ").concat(accessibleStatusLabel)
|
|
185
|
+
: undefined), "aria-current": status === "current" && "step" }, children)); }, fallback: function (children) { return (React__default.createElement("div", { className: "arc-ProgressStepperItem-title" },
|
|
186
|
+
children,
|
|
187
|
+
React__default.createElement(VisuallyHidden, null, " - ".concat(accessibleStatusLabel)))); } }, title),
|
|
188
|
+
subTitle && (React__default.createElement("div", { className: "arc-ProgressStepperItem-subTitle" }, subTitle)),
|
|
188
189
|
stepContent && !isStepContentHidden && direction === "vertical" && (React__default.createElement(React__default.Fragment, null,
|
|
189
190
|
React__default.createElement("div", { className: "arc-ProgressStepperItem-nodeItem" }, stepContent))))));
|
|
190
191
|
};
|
|
191
192
|
|
|
192
193
|
/** Use `ProgressStepper` to provide an overview of a series of steps in a digital journey. */
|
|
193
|
-
var ProgressStepper = function (_a) {
|
|
194
|
-
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition,
|
|
194
|
+
var ProgressStepper = forwardRef(function (_a, ref) {
|
|
195
|
+
var children = _a.children, size = _a.size, isFluid = _a.isFluid, direction = _a.direction, isExpandable = _a.isExpandable, invertLabelPosition = _a.invertLabelPosition, currentStep = _a.currentStep, props = __rest(_a, ["children", "size", "isFluid", "direction", "isExpandable", "invertLabelPosition", "currentStep"]);
|
|
195
196
|
var items = React__default.Children.toArray(children);
|
|
196
197
|
var getStepStatus = function (item) {
|
|
197
198
|
var _a;
|
|
198
199
|
return (_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.status;
|
|
199
200
|
};
|
|
200
|
-
return (React__default.createElement("
|
|
201
|
+
return (React__default.createElement("ol", __assign({ ref: ref, className: classNames("arc-ProgressStepper", {
|
|
201
202
|
"arc-ProgressStepper--vertical": direction === "vertical",
|
|
202
203
|
}) }, filterAttrs(props)), items.map(function (item, index) { return (React__default.createElement(React__default.Fragment, { key: "StepperItem-".concat(index) },
|
|
203
|
-
React__default.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))))); })));
|
|
204
|
-
};
|
|
204
|
+
React__default.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))))); })));
|
|
205
|
+
});
|
|
205
206
|
|
|
206
207
|
export { ProgressStepper as P, ProgressStepperItem as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as ArcSizeBreakpointsS, a as ArcSizeBreakpointsM, b as ArcSizeBreakpointsL, c as ArcSizeBreakpointsXl, d as ArcSizeBreakpointsXxl, e as ArcSizeBreakpointsXs } from './index.es-Co1d96HB.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Provides an object of breakpoints for responsive designs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 05 Dec 2025 13:50:26 GMT
|
|
4
4
|
*/
|
|
5
5
|
var ArcSizeBreakpointsXs = "320px";
|
|
6
6
|
var ArcSizeBreakpointsS = "636px";
|
|
@@ -9,4 +9,4 @@ var ArcSizeBreakpointsL = "1024px";
|
|
|
9
9
|
var ArcSizeBreakpointsXl = "1280px";
|
|
10
10
|
var ArcSizeBreakpointsXxl = "1440px";
|
|
11
11
|
|
|
12
|
-
export {
|
|
12
|
+
export { ArcSizeBreakpointsS as A, ArcSizeBreakpointsM as a, ArcSizeBreakpointsL as b, ArcSizeBreakpointsXl as c, ArcSizeBreakpointsXxl as d, ArcSizeBreakpointsXs as e };
|
|
@@ -26,11 +26,11 @@ var useMediaQuery = function (mediaQuery) {
|
|
|
26
26
|
return window.matchMedia(query).matches;
|
|
27
27
|
};
|
|
28
28
|
var _a = useState(false), matches = _a[0], setMatches = _a[1];
|
|
29
|
-
// Handles the change event of the media query.
|
|
30
|
-
var handleChange = function () {
|
|
31
|
-
setMatches(getMatches(mediaQuery));
|
|
32
|
-
};
|
|
33
29
|
useEffect(function () {
|
|
30
|
+
// Handles the change event of the media query.
|
|
31
|
+
var handleChange = function () {
|
|
32
|
+
setMatches(getMatches(mediaQuery));
|
|
33
|
+
};
|
|
34
34
|
var matchMedia = window.matchMedia(mediaQuery);
|
|
35
35
|
// Triggered at the first client-side load and if query changes
|
|
36
36
|
handleChange();
|