@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.js
CHANGED
|
@@ -698,8 +698,8 @@ var Button = React.forwardRef(function (_a, ref) {
|
|
|
698
698
|
var ButtonIcon = function (_a) {
|
|
699
699
|
var icon = _a.icon, isChevron = _a.isChevron, isBeforeText = _a.isBeforeText;
|
|
700
700
|
return (React__default["default"].createElement("span", { className: classNames({
|
|
701
|
-
"arc-
|
|
702
|
-
"arc-
|
|
701
|
+
"arc-Button-icon": true,
|
|
702
|
+
"arc-Button-icon--chevron": isChevron
|
|
703
703
|
}) }, isChevron ? (React__default["default"].createElement(Icon, { icon: "btChevron".concat(isBeforeText ? "Left" : "Right", "2px") })) : (React__default["default"].createElement(Icon, { icon: icon }))));
|
|
704
704
|
};
|
|
705
705
|
|
|
@@ -743,7 +743,7 @@ var Heading = function (_a) {
|
|
|
743
743
|
};
|
|
744
744
|
var HeadingProposition = function (_a) {
|
|
745
745
|
var children = _a.children;
|
|
746
|
-
return React__default["default"].createElement("span", { className: "arc-
|
|
746
|
+
return React__default["default"].createElement("span", { className: "arc-Heading-proposition" }, children);
|
|
747
747
|
};
|
|
748
748
|
HeadingProposition.displayName = "Heading.Proposition";
|
|
749
749
|
Heading.Proposition = HeadingProposition;
|
|
@@ -788,12 +788,12 @@ var useInteractionMode = function () {
|
|
|
788
788
|
};
|
|
789
789
|
if (typeof window !== "undefined") {
|
|
790
790
|
document.addEventListener("keydown", onKeyDown, true);
|
|
791
|
-
document.addEventListener("
|
|
791
|
+
document.addEventListener("click", onPointerDown, true);
|
|
792
792
|
}
|
|
793
793
|
return function () {
|
|
794
794
|
if (typeof window !== "undefined") {
|
|
795
795
|
document.removeEventListener("keydown", onKeyDown);
|
|
796
|
-
document.removeEventListener("
|
|
796
|
+
document.removeEventListener("click", onPointerDown);
|
|
797
797
|
}
|
|
798
798
|
};
|
|
799
799
|
}, []);
|
|
@@ -901,13 +901,13 @@ var Card = function (_a) {
|
|
|
901
901
|
var CardBlock = function (_a) {
|
|
902
902
|
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;
|
|
903
903
|
return (React__default["default"].createElement("div", { className: classNames({
|
|
904
|
-
"arc-
|
|
905
|
-
"arc-
|
|
906
|
-
"arc-
|
|
907
|
-
"arc-
|
|
908
|
-
"arc-
|
|
904
|
+
"arc-Card-block": true,
|
|
905
|
+
"arc-Card-block--alignCenter": align === "center",
|
|
906
|
+
"arc-Card-block--alignRight": align === "right",
|
|
907
|
+
"arc-Card-block--fullWidth": isFullWidth,
|
|
908
|
+
"arc-Card-block--grow": grow
|
|
909
909
|
}) },
|
|
910
|
-
React__default["default"].createElement("div", { className: "arc-
|
|
910
|
+
React__default["default"].createElement("div", { className: "arc-Card-blockInner" }, children)));
|
|
911
911
|
};
|
|
912
912
|
CardBlock.displayName = "Card.Block";
|
|
913
913
|
Card.Block = CardBlock;
|
|
@@ -915,11 +915,11 @@ Card.Block = CardBlock;
|
|
|
915
915
|
* Internal `Card.Image` component to show an image within a Card.
|
|
916
916
|
*/
|
|
917
917
|
var CardImage = function (_a) {
|
|
918
|
-
var _b = _a.alt, alt = _b === void 0 ? "" : _b, _c = _a.height, height = _c === void 0 ? 176 : _c, src = _a.src, srcSet = _a.srcSet;
|
|
918
|
+
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;
|
|
919
919
|
return (React__default["default"].createElement("div", { className: classNames({
|
|
920
|
-
"arc-
|
|
920
|
+
"arc-Card-image": true
|
|
921
921
|
}) },
|
|
922
|
-
React__default["default"].createElement(Image, { alt: alt, fit: "cover", src: src, srcSet: srcSet, height: height })));
|
|
922
|
+
React__default["default"].createElement(Image, { alt: alt, fit: "cover", sizes: sizes, src: src, srcSet: srcSet, height: height })));
|
|
923
923
|
};
|
|
924
924
|
CardImage.displayName = "Card.Image";
|
|
925
925
|
Card.Image = CardImage;
|
|
@@ -930,13 +930,13 @@ var CardLink = function (_a) {
|
|
|
930
930
|
var actionId = _a.actionId, isButton = _a.isButton, children = _a.children, fill = _a.fill, href = _a.href, stretch = _a.stretch, target = _a.target;
|
|
931
931
|
var surface = React.useContext(Context$3).surface;
|
|
932
932
|
return (React__default["default"].createElement("a", { "aria-describedby": actionId, className: classNames({
|
|
933
|
-
"arc-
|
|
934
|
-
"arc-
|
|
935
|
-
"arc-
|
|
936
|
-
"arc-
|
|
933
|
+
"arc-Card-link": true,
|
|
934
|
+
"arc-Card-link--button": isButton,
|
|
935
|
+
"arc-Card-link--onDarkSurface": surface === "dark" && fill !== "neutral",
|
|
936
|
+
"arc-Card-link--stretch": stretch
|
|
937
937
|
}), href: href, rel: target === "_blank" ? "noopener noreferrer" : undefined, tabIndex: isButton ? -1 : undefined, target: target },
|
|
938
|
-
React__default["default"].createElement("span", { className: "arc-
|
|
939
|
-
isButton && (React__default["default"].createElement("span", { className: "arc-
|
|
938
|
+
React__default["default"].createElement("span", { className: "arc-Card-linkText" }, children),
|
|
939
|
+
isButton && (React__default["default"].createElement("span", { className: "arc-Card-linkIcon" },
|
|
940
940
|
React__default["default"].createElement(Icon, { icon: "btChevronRight2px", size: 8 })))));
|
|
941
941
|
};
|
|
942
942
|
|
|
@@ -1076,24 +1076,24 @@ var Col = function (_a) {
|
|
|
1076
1076
|
var _b;
|
|
1077
1077
|
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"]);
|
|
1078
1078
|
return (React__default["default"].createElement("div", __assign({ className: classNames((_b = {},
|
|
1079
|
-
_b["arc-
|
|
1080
|
-
_b[suffixModifier("arc-
|
|
1081
|
-
_b["arc-
|
|
1082
|
-
_b["arc-
|
|
1083
|
-
_b["arc-
|
|
1084
|
-
_b["arc-
|
|
1085
|
-
_b["arc-
|
|
1086
|
-
_b["arc-
|
|
1079
|
+
_b["arc-Columns-col"] = true,
|
|
1080
|
+
_b[suffixModifier("arc-Columns-col--align", align || "")] = align,
|
|
1081
|
+
_b["arc-Columns-col--".concat(span)] = typeof span !== "undefined",
|
|
1082
|
+
_b["arc-Columns-col--s".concat(spanS)] = typeof spanS !== "undefined",
|
|
1083
|
+
_b["arc-Columns-col--m".concat(spanM)] = typeof spanM !== "undefined",
|
|
1084
|
+
_b["arc-Columns-col--l".concat(spanL)] = typeof spanL !== "undefined",
|
|
1085
|
+
_b["arc-Columns-col--xL".concat(spanXL)] = typeof spanXL !== "undefined",
|
|
1086
|
+
_b["arc-Columns-col--offset"] = typeof offset !== "undefined" ||
|
|
1087
1087
|
typeof offsetS !== "undefined" ||
|
|
1088
1088
|
typeof offsetM !== "undefined" ||
|
|
1089
1089
|
typeof offsetL !== "undefined" ||
|
|
1090
1090
|
typeof offsetXL !== "undefined",
|
|
1091
|
-
_b["arc-
|
|
1092
|
-
_b["arc-
|
|
1093
|
-
_b["arc-
|
|
1094
|
-
_b["arc-
|
|
1095
|
-
_b["arc-
|
|
1096
|
-
_b["arc-
|
|
1091
|
+
_b["arc-Columns-col--offset".concat(offset)] = typeof offset !== "undefined",
|
|
1092
|
+
_b["arc-Columns-col--offsetS".concat(offsetS)] = typeof offsetS !== "undefined",
|
|
1093
|
+
_b["arc-Columns-col--offsetM".concat(offsetM)] = typeof offsetM !== "undefined",
|
|
1094
|
+
_b["arc-Columns-col--offsetL".concat(offsetL)] = typeof offsetL !== "undefined",
|
|
1095
|
+
_b["arc-Columns-col--offsetXL".concat(offsetXL)] = typeof offsetXL !== "undefined",
|
|
1096
|
+
_b["arc-Columns-col--debugVisible"] = isDebugVisible,
|
|
1097
1097
|
_b)) }, filterDataAttrs(props)), children));
|
|
1098
1098
|
};
|
|
1099
1099
|
Col.displayName = "Columns.Col";
|
|
@@ -1174,9 +1174,9 @@ var GroupItem = function (_a) {
|
|
|
1174
1174
|
var _b;
|
|
1175
1175
|
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"]);
|
|
1176
1176
|
return (React__default["default"].createElement("div", __assign({ className: classNames((_b = {},
|
|
1177
|
-
_b["arc-
|
|
1178
|
-
_b["arc-
|
|
1179
|
-
_b["arc-
|
|
1177
|
+
_b["arc-Group-item"] = true,
|
|
1178
|
+
_b["arc-Group-item--grow"] = grow,
|
|
1179
|
+
_b["arc-Group-item--debugVisible"] = isDebugVisible,
|
|
1180
1180
|
_b)) }, filterDataAttrs(props)), children));
|
|
1181
1181
|
};
|
|
1182
1182
|
GroupItem.displayName = "Group.Item";
|
|
@@ -1435,12 +1435,16 @@ var ItemGroup = function (_a) {
|
|
|
1435
1435
|
// useEffect does not run in ReactDomServer renders
|
|
1436
1436
|
setHasClientSideJavaScript(true);
|
|
1437
1437
|
}, [setHasClientSideJavaScript]);
|
|
1438
|
+
var ElementType = "div";
|
|
1439
|
+
if (title) {
|
|
1440
|
+
ElementType = "details";
|
|
1441
|
+
}
|
|
1438
1442
|
return (React__default["default"].createElement("li", { className: "arc-SiteHeaderItemGroup" },
|
|
1439
|
-
React__default["default"].createElement(
|
|
1440
|
-
React__default["default"].createElement("summary", { className: "arc-SiteHeaderItemGroup-summary", tabIndex: isMinWidthArcBreakpointL ? -1 : 0 }, href ? (React__default["default"].createElement("a", { className: "arc-SiteHeaderItemGroup-title", href: href, tabIndex: !hasClientSideJavaScript || isMinWidthArcBreakpointL ? 0 : -1 }, title)) : (React__default["default"].createElement("div", { className: "arc-SiteHeaderItemGroup-title" }, title))),
|
|
1443
|
+
React__default["default"].createElement(ElementType, __assign({ className: "arc-SiteHeaderItemGroup-details", open: Boolean(title && isMinWidthArcBreakpointL) }, filterDataAttrs(props)),
|
|
1444
|
+
title ? (React__default["default"].createElement("summary", { className: "arc-SiteHeaderItemGroup-summary", tabIndex: isMinWidthArcBreakpointL ? -1 : 0 }, href ? (React__default["default"].createElement("a", { className: "arc-SiteHeaderItemGroup-title", href: href, tabIndex: !hasClientSideJavaScript || isMinWidthArcBreakpointL ? 0 : -1 }, title)) : (React__default["default"].createElement("div", { className: "arc-SiteHeaderItemGroup-title" }, title)))) : null,
|
|
1441
1445
|
React__default["default"].createElement("ul", { className: "arc-SiteHeaderItemGroup-items" },
|
|
1442
1446
|
children,
|
|
1443
|
-
href ? (React__default["default"].createElement("li", { className: "arc-SiteHeaderItem arc-SiteHeaderItem--viewAll" },
|
|
1447
|
+
href && title ? (React__default["default"].createElement("li", { className: "arc-SiteHeaderItem arc-SiteHeaderItem--viewAll" },
|
|
1444
1448
|
React__default["default"].createElement("a", { className: "arc-SiteHeaderItem-link", href: href }, viewAllTitle || "View all ".concat(title.toLowerCase())))) : null))));
|
|
1445
1449
|
};
|
|
1446
1450
|
|