@arc-ui/components 6.1.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +44 -40
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +44 -40
- package/dist/index.js.map +1 -1
- package/dist/styles.bt.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.ee.css +1 -1
- package/dist/types/components/Card/Card.d.ts +4 -0
- package/dist/types/components/SiteHeader/components/ItemGroup/ItemGroup.d.ts +1 -1
- package/dist/types/styles.bt.d.ts +2 -0
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -690,8 +690,8 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
690
690
|
var ButtonIcon = function (_a) {
|
|
691
691
|
var icon = _a.icon, isChevron = _a.isChevron, isBeforeText = _a.isBeforeText;
|
|
692
692
|
return (React.createElement("span", { className: classNames({
|
|
693
|
-
"arc-
|
|
694
|
-
"arc-
|
|
693
|
+
"arc-Button-icon": true,
|
|
694
|
+
"arc-Button-icon--chevron": isChevron
|
|
695
695
|
}) }, isChevron ? (React.createElement(Icon, { icon: "btChevron".concat(isBeforeText ? "Left" : "Right", "2px") })) : (React.createElement(Icon, { icon: icon }))));
|
|
696
696
|
};
|
|
697
697
|
|
|
@@ -735,7 +735,7 @@ var Heading = function (_a) {
|
|
|
735
735
|
};
|
|
736
736
|
var HeadingProposition = function (_a) {
|
|
737
737
|
var children = _a.children;
|
|
738
|
-
return React.createElement("span", { className: "arc-
|
|
738
|
+
return React.createElement("span", { className: "arc-Heading-proposition" }, children);
|
|
739
739
|
};
|
|
740
740
|
HeadingProposition.displayName = "Heading.Proposition";
|
|
741
741
|
Heading.Proposition = HeadingProposition;
|
|
@@ -780,12 +780,12 @@ var useInteractionMode = function () {
|
|
|
780
780
|
};
|
|
781
781
|
if (typeof window !== "undefined") {
|
|
782
782
|
document.addEventListener("keydown", onKeyDown, true);
|
|
783
|
-
document.addEventListener("
|
|
783
|
+
document.addEventListener("click", onPointerDown, true);
|
|
784
784
|
}
|
|
785
785
|
return function () {
|
|
786
786
|
if (typeof window !== "undefined") {
|
|
787
787
|
document.removeEventListener("keydown", onKeyDown);
|
|
788
|
-
document.removeEventListener("
|
|
788
|
+
document.removeEventListener("click", onPointerDown);
|
|
789
789
|
}
|
|
790
790
|
};
|
|
791
791
|
}, []);
|
|
@@ -893,13 +893,13 @@ var Card = function (_a) {
|
|
|
893
893
|
var CardBlock = function (_a) {
|
|
894
894
|
var _b = _a.align, align = _b === void 0 ? "left" : _b, children = _a.children, _c = _a.isFullWidth, isFullWidth = _c === void 0 ? false : _c, _d = _a.grow, grow = _d === void 0 ? false : _d;
|
|
895
895
|
return (React.createElement("div", { className: classNames({
|
|
896
|
-
"arc-
|
|
897
|
-
"arc-
|
|
898
|
-
"arc-
|
|
899
|
-
"arc-
|
|
900
|
-
"arc-
|
|
896
|
+
"arc-Card-block": true,
|
|
897
|
+
"arc-Card-block--alignCenter": align === "center",
|
|
898
|
+
"arc-Card-block--alignRight": align === "right",
|
|
899
|
+
"arc-Card-block--fullWidth": isFullWidth,
|
|
900
|
+
"arc-Card-block--grow": grow
|
|
901
901
|
}) },
|
|
902
|
-
React.createElement("div", { className: "arc-
|
|
902
|
+
React.createElement("div", { className: "arc-Card-blockInner" }, children)));
|
|
903
903
|
};
|
|
904
904
|
CardBlock.displayName = "Card.Block";
|
|
905
905
|
Card.Block = CardBlock;
|
|
@@ -907,11 +907,11 @@ Card.Block = CardBlock;
|
|
|
907
907
|
* Internal `Card.Image` component to show an image within a Card.
|
|
908
908
|
*/
|
|
909
909
|
var CardImage = function (_a) {
|
|
910
|
-
var _b = _a.alt, alt = _b === void 0 ? "" : _b, _c = _a.height, height = _c === void 0 ? 176 : _c, src = _a.src, srcSet = _a.srcSet;
|
|
910
|
+
var _b = _a.alt, alt = _b === void 0 ? "" : _b, _c = _a.height, height = _c === void 0 ? 176 : _c, sizes = _a.sizes, src = _a.src, srcSet = _a.srcSet;
|
|
911
911
|
return (React.createElement("div", { className: classNames({
|
|
912
|
-
"arc-
|
|
912
|
+
"arc-Card-image": true
|
|
913
913
|
}) },
|
|
914
|
-
React.createElement(Image, { alt: alt, fit: "cover", src: src, srcSet: srcSet, height: height })));
|
|
914
|
+
React.createElement(Image, { alt: alt, fit: "cover", sizes: sizes, src: src, srcSet: srcSet, height: height })));
|
|
915
915
|
};
|
|
916
916
|
CardImage.displayName = "Card.Image";
|
|
917
917
|
Card.Image = CardImage;
|
|
@@ -922,13 +922,13 @@ var CardLink = function (_a) {
|
|
|
922
922
|
var actionId = _a.actionId, isButton = _a.isButton, children = _a.children, fill = _a.fill, href = _a.href, stretch = _a.stretch, target = _a.target;
|
|
923
923
|
var surface = useContext(Context$3).surface;
|
|
924
924
|
return (React.createElement("a", { "aria-describedby": actionId, className: classNames({
|
|
925
|
-
"arc-
|
|
926
|
-
"arc-
|
|
927
|
-
"arc-
|
|
928
|
-
"arc-
|
|
925
|
+
"arc-Card-link": true,
|
|
926
|
+
"arc-Card-link--button": isButton,
|
|
927
|
+
"arc-Card-link--onDarkSurface": surface === "dark" && fill !== "neutral",
|
|
928
|
+
"arc-Card-link--stretch": stretch
|
|
929
929
|
}), href: href, rel: target === "_blank" ? "noopener noreferrer" : undefined, tabIndex: isButton ? -1 : undefined, target: target },
|
|
930
|
-
React.createElement("span", { className: "arc-
|
|
931
|
-
isButton && (React.createElement("span", { className: "arc-
|
|
930
|
+
React.createElement("span", { className: "arc-Card-linkText" }, children),
|
|
931
|
+
isButton && (React.createElement("span", { className: "arc-Card-linkIcon" },
|
|
932
932
|
React.createElement(Icon, { icon: "btChevronRight2px", size: 8 })))));
|
|
933
933
|
};
|
|
934
934
|
|
|
@@ -1068,24 +1068,24 @@ var Col = function (_a) {
|
|
|
1068
1068
|
var _b;
|
|
1069
1069
|
var align = _a.align, children = _a.children, _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, offset = _a.offset, offsetS = _a.offsetS, offsetM = _a.offsetM, offsetL = _a.offsetL, offsetXL = _a.offsetXL, span = _a.span, spanS = _a.spanS, spanM = _a.spanM, spanL = _a.spanL, spanXL = _a.spanXL, props = __rest(_a, ["align", "children", "isDebugVisible", "offset", "offsetS", "offsetM", "offsetL", "offsetXL", "span", "spanS", "spanM", "spanL", "spanXL"]);
|
|
1070
1070
|
return (React.createElement("div", __assign({ className: classNames((_b = {},
|
|
1071
|
-
_b["arc-
|
|
1072
|
-
_b[suffixModifier("arc-
|
|
1073
|
-
_b["arc-
|
|
1074
|
-
_b["arc-
|
|
1075
|
-
_b["arc-
|
|
1076
|
-
_b["arc-
|
|
1077
|
-
_b["arc-
|
|
1078
|
-
_b["arc-
|
|
1071
|
+
_b["arc-Columns-col"] = true,
|
|
1072
|
+
_b[suffixModifier("arc-Columns-col--align", align || "")] = align,
|
|
1073
|
+
_b["arc-Columns-col--".concat(span)] = typeof span !== "undefined",
|
|
1074
|
+
_b["arc-Columns-col--s".concat(spanS)] = typeof spanS !== "undefined",
|
|
1075
|
+
_b["arc-Columns-col--m".concat(spanM)] = typeof spanM !== "undefined",
|
|
1076
|
+
_b["arc-Columns-col--l".concat(spanL)] = typeof spanL !== "undefined",
|
|
1077
|
+
_b["arc-Columns-col--xL".concat(spanXL)] = typeof spanXL !== "undefined",
|
|
1078
|
+
_b["arc-Columns-col--offset"] = typeof offset !== "undefined" ||
|
|
1079
1079
|
typeof offsetS !== "undefined" ||
|
|
1080
1080
|
typeof offsetM !== "undefined" ||
|
|
1081
1081
|
typeof offsetL !== "undefined" ||
|
|
1082
1082
|
typeof offsetXL !== "undefined",
|
|
1083
|
-
_b["arc-
|
|
1084
|
-
_b["arc-
|
|
1085
|
-
_b["arc-
|
|
1086
|
-
_b["arc-
|
|
1087
|
-
_b["arc-
|
|
1088
|
-
_b["arc-
|
|
1083
|
+
_b["arc-Columns-col--offset".concat(offset)] = typeof offset !== "undefined",
|
|
1084
|
+
_b["arc-Columns-col--offsetS".concat(offsetS)] = typeof offsetS !== "undefined",
|
|
1085
|
+
_b["arc-Columns-col--offsetM".concat(offsetM)] = typeof offsetM !== "undefined",
|
|
1086
|
+
_b["arc-Columns-col--offsetL".concat(offsetL)] = typeof offsetL !== "undefined",
|
|
1087
|
+
_b["arc-Columns-col--offsetXL".concat(offsetXL)] = typeof offsetXL !== "undefined",
|
|
1088
|
+
_b["arc-Columns-col--debugVisible"] = isDebugVisible,
|
|
1089
1089
|
_b)) }, filterDataAttrs(props)), children));
|
|
1090
1090
|
};
|
|
1091
1091
|
Col.displayName = "Columns.Col";
|
|
@@ -1166,9 +1166,9 @@ var GroupItem = function (_a) {
|
|
|
1166
1166
|
var _b;
|
|
1167
1167
|
var children = _a.children, _c = _a.grow, grow = _c === void 0 ? false : _c, _d = _a.isDebugVisible, isDebugVisible = _d === void 0 ? false : _d, props = __rest(_a, ["children", "grow", "isDebugVisible"]);
|
|
1168
1168
|
return (React.createElement("div", __assign({ className: classNames((_b = {},
|
|
1169
|
-
_b["arc-
|
|
1170
|
-
_b["arc-
|
|
1171
|
-
_b["arc-
|
|
1169
|
+
_b["arc-Group-item"] = true,
|
|
1170
|
+
_b["arc-Group-item--grow"] = grow,
|
|
1171
|
+
_b["arc-Group-item--debugVisible"] = isDebugVisible,
|
|
1172
1172
|
_b)) }, filterDataAttrs(props)), children));
|
|
1173
1173
|
};
|
|
1174
1174
|
GroupItem.displayName = "Group.Item";
|
|
@@ -1427,12 +1427,16 @@ var ItemGroup = function (_a) {
|
|
|
1427
1427
|
// useEffect does not run in ReactDomServer renders
|
|
1428
1428
|
setHasClientSideJavaScript(true);
|
|
1429
1429
|
}, [setHasClientSideJavaScript]);
|
|
1430
|
+
var ElementType = "div";
|
|
1431
|
+
if (title) {
|
|
1432
|
+
ElementType = "details";
|
|
1433
|
+
}
|
|
1430
1434
|
return (React.createElement("li", { className: "arc-SiteHeaderItemGroup" },
|
|
1431
|
-
React.createElement(
|
|
1432
|
-
React.createElement("summary", { className: "arc-SiteHeaderItemGroup-summary", tabIndex: isMinWidthArcBreakpointL ? -1 : 0 }, href ? (React.createElement("a", { className: "arc-SiteHeaderItemGroup-title", href: href, tabIndex: !hasClientSideJavaScript || isMinWidthArcBreakpointL ? 0 : -1 }, title)) : (React.createElement("div", { className: "arc-SiteHeaderItemGroup-title" }, title))),
|
|
1435
|
+
React.createElement(ElementType, __assign({ className: "arc-SiteHeaderItemGroup-details", open: Boolean(title && isMinWidthArcBreakpointL) }, filterDataAttrs(props)),
|
|
1436
|
+
title ? (React.createElement("summary", { className: "arc-SiteHeaderItemGroup-summary", tabIndex: isMinWidthArcBreakpointL ? -1 : 0 }, href ? (React.createElement("a", { className: "arc-SiteHeaderItemGroup-title", href: href, tabIndex: !hasClientSideJavaScript || isMinWidthArcBreakpointL ? 0 : -1 }, title)) : (React.createElement("div", { className: "arc-SiteHeaderItemGroup-title" }, title)))) : null,
|
|
1433
1437
|
React.createElement("ul", { className: "arc-SiteHeaderItemGroup-items" },
|
|
1434
1438
|
children,
|
|
1435
|
-
href ? (React.createElement("li", { className: "arc-SiteHeaderItem arc-SiteHeaderItem--viewAll" },
|
|
1439
|
+
href && title ? (React.createElement("li", { className: "arc-SiteHeaderItem arc-SiteHeaderItem--viewAll" },
|
|
1436
1440
|
React.createElement("a", { className: "arc-SiteHeaderItem-link", href: href }, viewAllTitle || "View all ".concat(title.toLowerCase())))) : null))));
|
|
1437
1441
|
};
|
|
1438
1442
|
|