@common-origin/design-system 2.14.0 → 2.15.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/README.md +50 -184
- package/dist/client.esm.js +182 -98
- package/dist/client.esm.js.map +1 -1
- package/dist/client.js +182 -98
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.ts +2 -0
- package/dist/components/atoms/Chip/shared/utils.d.ts +3 -0
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +4 -0
- package/dist/components/layout/GridSystem/GridSystem.d.ts +6 -0
- package/dist/components/molecules/CardLarge/CardLarge.d.ts +3 -1
- package/dist/components/molecules/CardSmall/CardSmall.d.ts +2 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +2 -0
- package/dist/components/molecules/FeatureBlock/FeatureBlock.d.ts +2 -0
- package/dist/components/molecules/PageTitle/PageTitle.d.ts +13 -0
- package/dist/data.esm.js +5 -1
- package/dist/data.esm.js.map +1 -1
- package/dist/data.js +5 -1
- package/dist/data.js.map +1 -1
- package/dist/styles/tokens.json +5 -1
- package/dist/tokens/index.esm.js +5 -1
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +5 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/types/tokens.d.ts +4 -0
- package/dist/types/tokens.d.ts +4 -0
- package/package.json +4 -6
package/dist/client.esm.js
CHANGED
|
@@ -241,10 +241,10 @@ var exitAnimation = css(templateObject_2$v || (templateObject_2$v = __makeTempla
|
|
|
241
241
|
var visuallyHidden = css(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n"], ["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n"])));
|
|
242
242
|
var templateObject_1$K, templateObject_2$v, templateObject_3$s;
|
|
243
243
|
|
|
244
|
-
var _a$
|
|
245
|
-
typography$1 = _a$
|
|
246
|
-
color$9 = _a$
|
|
247
|
-
letterSpacing = _a$
|
|
244
|
+
var _a$b = tokensJson.semantic,
|
|
245
|
+
typography$1 = _a$b.typography,
|
|
246
|
+
color$9 = _a$b.color,
|
|
247
|
+
letterSpacing = _a$b.letterSpacing;
|
|
248
248
|
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
249
249
|
var styles = {
|
|
250
250
|
display: "font: ".concat(typography$1.display, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
@@ -375,10 +375,10 @@ var semantic$f = tokensJson.semantic;
|
|
|
375
375
|
var color$8 = semantic$f.color,
|
|
376
376
|
border$9 = semantic$f.border;
|
|
377
377
|
var radius$4 = border$9.radius;
|
|
378
|
-
var _a$
|
|
379
|
-
dot = _a$
|
|
380
|
-
count = _a$
|
|
381
|
-
ring = _a$
|
|
378
|
+
var _a$a = tokensJson.component.badge,
|
|
379
|
+
dot = _a$a.dot,
|
|
380
|
+
count = _a$a.count,
|
|
381
|
+
ring = _a$a.ring;
|
|
382
382
|
var scaleIn$2 = keyframes(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n"], ["\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n"])));
|
|
383
383
|
var BadgeWrapper = styled.span.withConfig({
|
|
384
384
|
displayName: "Badge__BadgeWrapper",
|
|
@@ -427,7 +427,8 @@ var Badge = function Badge(_a) {
|
|
|
427
427
|
_e = _a.dot,
|
|
428
428
|
dot = _e === void 0 ? false : _e,
|
|
429
429
|
ariaLabel = _a["aria-label"],
|
|
430
|
-
className = _a.className
|
|
430
|
+
className = _a.className,
|
|
431
|
+
dataTestId = _a["data-testid"];
|
|
431
432
|
var isVisible = dot || count > 0;
|
|
432
433
|
var displayCount = count > max ? "".concat(max, "+") : count.toString();
|
|
433
434
|
// Generate default aria-label if not provided
|
|
@@ -435,6 +436,7 @@ var Badge = function Badge(_a) {
|
|
|
435
436
|
var label = ariaLabel || defaultAriaLabel;
|
|
436
437
|
return jsxs(BadgeWrapper, {
|
|
437
438
|
className: className,
|
|
439
|
+
"data-testid": dataTestId,
|
|
438
440
|
children: [children, jsxs(BadgeIndicator, {
|
|
439
441
|
"$variant": variant,
|
|
440
442
|
"$isDot": dot,
|
|
@@ -470,7 +472,7 @@ var StyledBox = styled.div.withConfig({
|
|
|
470
472
|
}, function (props) {
|
|
471
473
|
return props.$alignItems && css(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
472
474
|
}, function (props) {
|
|
473
|
-
return props.$flexWrap && css(templateObject_5$
|
|
475
|
+
return props.$flexWrap && css(templateObject_5$h || (templateObject_5$h = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
474
476
|
}, function (props) {
|
|
475
477
|
return props.$gap && css(templateObject_6$d || (templateObject_6$d = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), tokensJson.semantic.spacing.layout[props.$gap]);
|
|
476
478
|
}, function (props) {
|
|
@@ -496,7 +498,7 @@ var StyledBox = styled.div.withConfig({
|
|
|
496
498
|
}, function (props) {
|
|
497
499
|
return props.$pb && css(templateObject_17$2 || (templateObject_17$2 = __makeTemplateObject(["padding-bottom: ", ";"], ["padding-bottom: ", ";"])), tokensJson.semantic.spacing.layout[props.$pb]);
|
|
498
500
|
}, function (props) {
|
|
499
|
-
return props.$pl && css(templateObject_18$
|
|
501
|
+
return props.$pl && css(templateObject_18$2 || (templateObject_18$2 = __makeTemplateObject(["padding-left: ", ";"], ["padding-left: ", ";"])), tokensJson.semantic.spacing.layout[props.$pl]);
|
|
500
502
|
}, function (props) {
|
|
501
503
|
return props.$px && css(templateObject_19$1 || (templateObject_19$1 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n padding-left: ", ";\n padding-right: ", ";\n "])), tokensJson.semantic.spacing.layout[props.$px], tokensJson.semantic.spacing.layout[props.$px]);
|
|
502
504
|
}, function (props) {
|
|
@@ -686,7 +688,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
686
688
|
}));
|
|
687
689
|
};
|
|
688
690
|
var Box = BoxTransform;
|
|
689
|
-
var templateObject_1$H, templateObject_2$t, templateObject_3$q, templateObject_4$l, templateObject_5$
|
|
691
|
+
var templateObject_1$H, templateObject_2$t, templateObject_3$q, templateObject_4$l, templateObject_5$h, templateObject_6$d, templateObject_7$b, templateObject_8$8, templateObject_9$6, templateObject_10$4, templateObject_11$4, templateObject_12$4, templateObject_13$3, templateObject_14$2, templateObject_15$2, templateObject_16$2, templateObject_17$2, templateObject_18$2, templateObject_19$1, templateObject_20$1, templateObject_21$1, templateObject_22$1, templateObject_23$1, templateObject_24$1, templateObject_25$1, templateObject_26$1, templateObject_27$1, templateObject_28$1, templateObject_29$1, templateObject_30$1, templateObject_31$1, templateObject_32$1, templateObject_33$1, templateObject_34$1, templateObject_35$1, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42, templateObject_43, templateObject_44, templateObject_45, templateObject_46, templateObject_47, templateObject_48, templateObject_49;
|
|
690
692
|
|
|
691
693
|
var IconStyled = styled.span.withConfig({
|
|
692
694
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -885,8 +887,11 @@ var Button = function Button(_a) {
|
|
|
885
887
|
rest = __rest(_a, ["variant", "size", "url", "purpose", "children", "target", "iconName", "linkComponent", 'data-testid']);
|
|
886
888
|
// For links with custom link component (e.g., Next.js Link, React Router Link)
|
|
887
889
|
if (purpose === 'link' && url && LinkComponent) {
|
|
888
|
-
|
|
890
|
+
// The link component renders the <a>, so anchor attributes (id, aria-*, rel, handlers) go to it
|
|
891
|
+
var linkProps = rest;
|
|
892
|
+
return jsx(LinkComponent, __assign({}, linkProps, {
|
|
889
893
|
href: url,
|
|
894
|
+
target: target,
|
|
890
895
|
children: jsx(StyledLink, {
|
|
891
896
|
as: "span",
|
|
892
897
|
"$variant": variant,
|
|
@@ -894,18 +899,17 @@ var Button = function Button(_a) {
|
|
|
894
899
|
"data-testid": dataTestId,
|
|
895
900
|
children: renderButtonContent(children, iconName, size)
|
|
896
901
|
})
|
|
897
|
-
});
|
|
902
|
+
}));
|
|
898
903
|
}
|
|
899
904
|
// For standard links (external or without custom component)
|
|
900
905
|
if (purpose === 'link' && url) {
|
|
901
906
|
var linkProps = rest;
|
|
902
|
-
return jsx(StyledLink, __assign({
|
|
907
|
+
return jsx(StyledLink, __assign({}, linkProps, {
|
|
903
908
|
href: url,
|
|
904
909
|
target: target,
|
|
905
910
|
"$variant": variant,
|
|
906
911
|
"$size": size,
|
|
907
|
-
"data-testid": dataTestId
|
|
908
|
-
}, linkProps, {
|
|
912
|
+
"data-testid": dataTestId,
|
|
909
913
|
children: renderButtonContent(children, iconName, size)
|
|
910
914
|
}));
|
|
911
915
|
}
|
|
@@ -1059,6 +1063,11 @@ CategoryBadge.displayName = 'CategoryBadge';
|
|
|
1059
1063
|
var templateObject_1$E;
|
|
1060
1064
|
|
|
1061
1065
|
var chip = tokensJson.component.chip;
|
|
1066
|
+
// Selected-chip hover and active colours have no token yet: they wait on #21 (selected states).
|
|
1067
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
1068
|
+
var SELECTED_HOVER = '#CAE8FF';
|
|
1069
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
1070
|
+
var SELECTED_ACTIVE = '#B5DEFF';
|
|
1062
1071
|
// Helper function to get variant styles matching Button's approach
|
|
1063
1072
|
var getVariantStyles = function getVariantStyles(_a) {
|
|
1064
1073
|
var $variant = _a.$variant,
|
|
@@ -1067,7 +1076,7 @@ var getVariantStyles = function getVariantStyles(_a) {
|
|
|
1067
1076
|
$disabled = _a.$disabled;
|
|
1068
1077
|
// Boolean chips with selected state get special background
|
|
1069
1078
|
if ($selected) {
|
|
1070
|
-
return "\n background-color: ".concat(tokensJson.semantic.color.background['interactive-subtle'], ";\n color: ").concat(chip["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? tokensJson.semantic.color.background['interactive-subtle'] : $clickable ?
|
|
1079
|
+
return "\n background-color: ".concat(tokensJson.semantic.color.background['interactive-subtle'], ";\n color: ").concat(chip["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? tokensJson.semantic.color.background['interactive-subtle'] : $clickable ? SELECTED_HOVER : tokensJson.semantic.color.background['interactive-subtle'], ";\n }\n \n &:active {\n background-color: ").concat($disabled ? tokensJson.semantic.color.background['interactive-subtle'] : $clickable ? SELECTED_ACTIVE : tokensJson.semantic.color.background['interactive-subtle'], ";\n }\n ");
|
|
1071
1080
|
}
|
|
1072
1081
|
switch ($variant) {
|
|
1073
1082
|
case 'emphasis':
|
|
@@ -1119,7 +1128,7 @@ var CloseButton = styled.button.withConfig({
|
|
|
1119
1128
|
},
|
|
1120
1129
|
displayName: "ChipBase__CloseButton",
|
|
1121
1130
|
componentId: "sc-moa6zc-2"
|
|
1122
|
-
})(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n padding:
|
|
1131
|
+
})(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"])), tokensJson.semantic.spacing.layout.sm, chip.closeButton.size, chip.closeButton.size, tokensJson.semantic.spacing.layout.none, tokensJson.semantic.border.radius.xs, function (props) {
|
|
1123
1132
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1124
1133
|
}, tokensJson.semantic.motion.hover, tokensJson.semantic.color.background['hover-overlay'], tokensJson.semantic.color.background['active-overlay'], tokensJson.semantic.color.text.disabled, chip.focus.outline, chip.focus.outlineOffset, chip["default"].borderRadius);
|
|
1125
1134
|
var templateObject_1$D, templateObject_2$r, templateObject_3$p;
|
|
@@ -1410,9 +1419,9 @@ var Picture = function Picture(_a) {
|
|
|
1410
1419
|
};
|
|
1411
1420
|
var templateObject_1$B, templateObject_2$q, templateObject_3$o, templateObject_4$k;
|
|
1412
1421
|
|
|
1413
|
-
var _a$
|
|
1414
|
-
typography = _a$
|
|
1415
|
-
color$6 = _a$
|
|
1422
|
+
var _a$9 = tokensJson.semantic,
|
|
1423
|
+
typography = _a$9.typography,
|
|
1424
|
+
color$6 = _a$9.color;
|
|
1416
1425
|
var TimeStyled = styled.time.withConfig({
|
|
1417
1426
|
displayName: "DateFormatter__TimeStyled",
|
|
1418
1427
|
componentId: "sc-5464cc-0"
|
|
@@ -1468,9 +1477,9 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1468
1477
|
var templateObject_1$A;
|
|
1469
1478
|
|
|
1470
1479
|
var motion$5 = tokensJson.semantic.motion,
|
|
1471
|
-
_a$
|
|
1472
|
-
iconButton = _a$
|
|
1473
|
-
button = _a$
|
|
1480
|
+
_a$8 = tokensJson.component,
|
|
1481
|
+
iconButton = _a$8.iconButton,
|
|
1482
|
+
button = _a$8.button;
|
|
1474
1483
|
var IconButtonStyled = styled.button.withConfig({
|
|
1475
1484
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1476
1485
|
return !prop.startsWith('$');
|
|
@@ -1700,13 +1709,13 @@ var templateObject_1$y;
|
|
|
1700
1709
|
|
|
1701
1710
|
// Destructure tokens
|
|
1702
1711
|
var semantic$c = tokensJson.semantic;
|
|
1703
|
-
var _a$
|
|
1712
|
+
var _a$7 = __assign(__assign({}, semantic$c), {
|
|
1704
1713
|
component: tokensJson.component
|
|
1705
1714
|
}),
|
|
1706
|
-
color$5 = _a$
|
|
1707
|
-
border$7 = _a$
|
|
1708
|
-
motion$4 = _a$
|
|
1709
|
-
component$2 = _a$
|
|
1715
|
+
color$5 = _a$7.color,
|
|
1716
|
+
border$7 = _a$7.border,
|
|
1717
|
+
motion$4 = _a$7.motion,
|
|
1718
|
+
component$2 = _a$7.component;
|
|
1710
1719
|
var radius$2 = border$7.radius;
|
|
1711
1720
|
var ProgressBarContainer = styled.div.withConfig({
|
|
1712
1721
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1741,7 +1750,7 @@ var ProgressBarFill = styled.div.withConfig({
|
|
|
1741
1750
|
}
|
|
1742
1751
|
return css(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
1743
1752
|
}, function (props) {
|
|
1744
|
-
return props.$variant === 'horizontal' && css(templateObject_5$
|
|
1753
|
+
return props.$variant === 'horizontal' && css(templateObject_5$g || (templateObject_5$g = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1745
1754
|
}, function (props) {
|
|
1746
1755
|
return props.$variant === 'vertical' && css(templateObject_6$c || (templateObject_6$c = __makeTemplateObject(["\n width: 100%;\n height: ", "%;\n "], ["\n width: 100%;\n height: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1747
1756
|
});
|
|
@@ -1753,13 +1762,20 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1753
1762
|
color = _c === void 0 ? 'default' : _c,
|
|
1754
1763
|
height = _a.height,
|
|
1755
1764
|
width = _a.width,
|
|
1765
|
+
ariaLabel = _a["aria-label"],
|
|
1766
|
+
ariaLabelledBy = _a["aria-labelledby"],
|
|
1756
1767
|
dataTestId = _a["data-testid"];
|
|
1768
|
+
// Blank values are no name at all, so they fall back like missing ones
|
|
1769
|
+
var label = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
1770
|
+
var labelledBy = (ariaLabelledBy === null || ariaLabelledBy === void 0 ? void 0 : ariaLabelledBy.trim()) ? ariaLabelledBy : undefined;
|
|
1757
1771
|
return jsx(ProgressBarContainer, {
|
|
1758
1772
|
"$variant": variant,
|
|
1759
1773
|
"$height": height,
|
|
1760
1774
|
"$width": width,
|
|
1761
1775
|
"data-testid": dataTestId,
|
|
1762
1776
|
role: "progressbar",
|
|
1777
|
+
"aria-label": label !== null && label !== void 0 ? label : labelledBy ? undefined : 'Progress',
|
|
1778
|
+
"aria-labelledby": labelledBy,
|
|
1763
1779
|
"aria-valuenow": Math.min(100, Math.max(0, value)),
|
|
1764
1780
|
"aria-valuemin": 0,
|
|
1765
1781
|
"aria-valuemax": 100,
|
|
@@ -1770,7 +1786,7 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1770
1786
|
})
|
|
1771
1787
|
});
|
|
1772
1788
|
};
|
|
1773
|
-
var templateObject_1$x, templateObject_2$p, templateObject_3$n, templateObject_4$j, templateObject_5$
|
|
1789
|
+
var templateObject_1$x, templateObject_2$p, templateObject_3$n, templateObject_4$j, templateObject_5$g, templateObject_6$c, templateObject_7$a;
|
|
1774
1790
|
|
|
1775
1791
|
// Destructure tokens for cleaner access
|
|
1776
1792
|
var separatorTokens = tokensJson.component.separator;
|
|
@@ -1947,10 +1963,10 @@ var templateObject_1$v;
|
|
|
1947
1963
|
var statusColors = tokensJson.semantic.color.status;
|
|
1948
1964
|
var spacing$5 = tokensJson.semantic.spacing.layout;
|
|
1949
1965
|
var radius$1 = tokensJson.semantic.border.radius;
|
|
1950
|
-
var _a$
|
|
1951
|
-
transition = _a$
|
|
1952
|
-
duration$3 = _a$
|
|
1953
|
-
easing$3 = _a$
|
|
1966
|
+
var _a$6 = tokensJson.semantic.motion,
|
|
1967
|
+
transition = _a$6.transition,
|
|
1968
|
+
duration$3 = _a$6.duration,
|
|
1969
|
+
easing$3 = _a$6.easing;
|
|
1954
1970
|
var label$1 = tokensJson.component.badge.label;
|
|
1955
1971
|
var scaleIn$1 = keyframes(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n"], ["\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n"])));
|
|
1956
1972
|
var getStatusConfig = function getStatusConfig(status) {
|
|
@@ -2235,7 +2251,7 @@ var StyledStackWrapper = styled.div.withConfig({
|
|
|
2235
2251
|
var StyledHeaderWrapper = styled.div.withConfig({
|
|
2236
2252
|
displayName: "AccountCard__StyledHeaderWrapper",
|
|
2237
2253
|
componentId: "sc-1erp7zn-4"
|
|
2238
|
-
})(templateObject_5$
|
|
2254
|
+
})(templateObject_5$f || (templateObject_5$f = __makeTemplateObject(["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: -", ";\n }\n"], ["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: -", ";\n }\n"
|
|
2239
2255
|
// Map trend direction to icon and color
|
|
2240
2256
|
])), tokensJson.component.accountCard.header.minHeight, layout$2.none, layout$2.xs);
|
|
2241
2257
|
// Map trend direction to icon and color
|
|
@@ -2386,12 +2402,12 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2386
2402
|
})
|
|
2387
2403
|
});
|
|
2388
2404
|
};
|
|
2389
|
-
var templateObject_1$s, templateObject_2$n, templateObject_3$l, templateObject_4$i, templateObject_5$
|
|
2405
|
+
var templateObject_1$s, templateObject_2$n, templateObject_3$l, templateObject_4$i, templateObject_5$f;
|
|
2390
2406
|
|
|
2391
2407
|
var semantic$9 = tokensJson.semantic;
|
|
2392
|
-
var _a$
|
|
2393
|
-
duration$2 = _a$
|
|
2394
|
-
easing$2 = _a$
|
|
2408
|
+
var _a$5 = semantic$9.motion,
|
|
2409
|
+
duration$2 = _a$5.duration,
|
|
2410
|
+
easing$2 = _a$5.easing;
|
|
2395
2411
|
var StyledListItem = styled.li.withConfig({
|
|
2396
2412
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2397
2413
|
return !prop.startsWith('$');
|
|
@@ -2444,7 +2460,7 @@ var StyledTextContent = styled.div.withConfig({
|
|
|
2444
2460
|
var StyledRightContent = styled.div.withConfig({
|
|
2445
2461
|
displayName: "ListItem__StyledRightContent",
|
|
2446
2462
|
componentId: "sc-1wzzt21-4"
|
|
2447
|
-
})(templateObject_5$
|
|
2463
|
+
})(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"])), semantic$9.spacing.layout.sm);
|
|
2448
2464
|
var StyledChevronIcon = styled.div.withConfig({
|
|
2449
2465
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2450
2466
|
return !prop.startsWith('$');
|
|
@@ -2586,7 +2602,7 @@ var ListItem = function ListItem(_a) {
|
|
|
2586
2602
|
}));
|
|
2587
2603
|
};
|
|
2588
2604
|
ListItem.displayName = 'ListItem';
|
|
2589
|
-
var templateObject_1$r, templateObject_2$m, templateObject_3$k, templateObject_4$h, templateObject_5$
|
|
2605
|
+
var templateObject_1$r, templateObject_2$m, templateObject_3$k, templateObject_4$h, templateObject_5$e, templateObject_6$b, templateObject_7$9;
|
|
2590
2606
|
|
|
2591
2607
|
// How long an exiting element stays mounted: the duration of `exitAnimation` in styleUtils.
|
|
2592
2608
|
var EXIT_DURATION_MS = parseInt(tokensJson.semantic.motion.duration.fast, 10);
|
|
@@ -2631,12 +2647,12 @@ function useInert(ref, isInert) {
|
|
|
2631
2647
|
}, [ref, isInert]);
|
|
2632
2648
|
}
|
|
2633
2649
|
|
|
2634
|
-
var _a$
|
|
2635
|
-
color$3 = _a$
|
|
2636
|
-
border$5 = _a$
|
|
2637
|
-
layout$1 = _a$
|
|
2638
|
-
motion$3 = _a$
|
|
2639
|
-
elevation$2 = _a$
|
|
2650
|
+
var _a$4 = tokensJson.semantic,
|
|
2651
|
+
color$3 = _a$4.color,
|
|
2652
|
+
border$5 = _a$4.border,
|
|
2653
|
+
layout$1 = _a$4.spacing.layout,
|
|
2654
|
+
motion$3 = _a$4.motion,
|
|
2655
|
+
elevation$2 = _a$4.elevation;
|
|
2640
2656
|
var slideUp = keyframes(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0);\n }\n"], ["\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0);\n }\n"])));
|
|
2641
2657
|
var fadeIn$2 = keyframes(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"], ["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
|
|
2642
2658
|
var StyledOverlay$2 = styled.div.withConfig({
|
|
@@ -2659,7 +2675,7 @@ var StyledActionSheet = styled.div.withConfig({
|
|
|
2659
2675
|
var StyledHeader$2 = styled.div.withConfig({
|
|
2660
2676
|
displayName: "ActionSheet__StyledHeader",
|
|
2661
2677
|
componentId: "sc-regbol-2"
|
|
2662
|
-
})(templateObject_5$
|
|
2678
|
+
})(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"])), layout$1.lg, layout$1.lg, layout$1.md, border$5["default"]);
|
|
2663
2679
|
var StyledHeaderContent = styled.div.withConfig({
|
|
2664
2680
|
displayName: "ActionSheet__StyledHeaderContent",
|
|
2665
2681
|
componentId: "sc-regbol-3"
|
|
@@ -2894,7 +2910,7 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2894
2910
|
})]
|
|
2895
2911
|
}), document.body);
|
|
2896
2912
|
};
|
|
2897
|
-
var templateObject_1$q, templateObject_2$l, templateObject_3$j, templateObject_4$g, templateObject_5$
|
|
2913
|
+
var templateObject_1$q, templateObject_2$l, templateObject_3$j, templateObject_4$g, templateObject_5$d, templateObject_6$a, templateObject_7$8, templateObject_8$7;
|
|
2898
2914
|
|
|
2899
2915
|
function detectSpeechRecognitionConstructor(targetWindow) {
|
|
2900
2916
|
if (!targetWindow) return null;
|
|
@@ -3015,7 +3031,7 @@ var InputShell = styled.div.withConfig({
|
|
|
3015
3031
|
var Input = styled.input.withConfig({
|
|
3016
3032
|
displayName: "AgentInput__Input",
|
|
3017
3033
|
componentId: "sc-fhl996-3"
|
|
3018
|
-
})(templateObject_5$
|
|
3034
|
+
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$8.spacing.layout['7xl'], semantic$8.typography.body, semantic$8.color.text["default"], semantic$8.color.text.subdued, semantic$8.color.text.disabled);
|
|
3019
3035
|
var InputActions = styled.div.withConfig({
|
|
3020
3036
|
displayName: "AgentInput__InputActions",
|
|
3021
3037
|
componentId: "sc-fhl996-4"
|
|
@@ -3034,50 +3050,56 @@ var MicButtonWrapper = styled.div.withConfig({
|
|
|
3034
3050
|
},
|
|
3035
3051
|
displayName: "AgentInput__MicButtonWrapper",
|
|
3036
3052
|
componentId: "sc-fhl996-7"
|
|
3037
|
-
})(templateObject_9$5 || (templateObject_9$5 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"], ["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"
|
|
3053
|
+
})(templateObject_9$5 || (templateObject_9$5 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"], ["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"
|
|
3054
|
+
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3055
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
3056
|
+
])), semantic$8.border.radius.circle);
|
|
3057
|
+
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3058
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
3059
|
+
var ringMask = css(templateObject_10$3 || (templateObject_10$3 = __makeTemplateObject(["radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)))"], ["radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)))"])));
|
|
3038
3060
|
var MicListeningRing = styled.span.withConfig({
|
|
3039
3061
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3040
3062
|
return !prop.startsWith('$');
|
|
3041
3063
|
},
|
|
3042
3064
|
displayName: "AgentInput__MicListeningRing",
|
|
3043
3065
|
componentId: "sc-fhl996-8"
|
|
3044
|
-
})(
|
|
3066
|
+
})(templateObject_12$3 || (templateObject_12$3 = __makeTemplateObject(["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"], ["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"])), semantic$8.border.width.thick, semantic$8.spacing.layout.xs, component$1.iconButton.focus.outlineOffset, semantic$8.border.radius.circle, semantic$8.color.background['interactive-subtle'], semantic$8.color.background.interactive, semantic$8.color.background['interactive-hover'], semantic$8.color.background.interactive, semantic$8.color.background['interactive-subtle'], ringMask, ringMask, function (_a) {
|
|
3045
3067
|
var $reducedMotion = _a.$reducedMotion;
|
|
3046
|
-
return !$reducedMotion && css(
|
|
3068
|
+
return !$reducedMotion && css(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["\n animation: ", " 1300ms linear infinite;\n "], ["\n animation: ", " 1300ms linear infinite;\n "])), rotateRing);
|
|
3047
3069
|
});
|
|
3048
3070
|
var StatusRow = styled.div.withConfig({
|
|
3049
3071
|
displayName: "AgentInput__StatusRow",
|
|
3050
3072
|
componentId: "sc-fhl996-9"
|
|
3051
|
-
})(
|
|
3073
|
+
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n min-height: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n min-height: ", ";\n"])), semantic$8.spacing.layout.md, semantic$8.spacing.layout['2xl']);
|
|
3052
3074
|
var StatusText = styled.div.withConfig({
|
|
3053
3075
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3054
3076
|
return !prop.startsWith('$');
|
|
3055
3077
|
},
|
|
3056
3078
|
displayName: "AgentInput__StatusText",
|
|
3057
3079
|
componentId: "sc-fhl996-10"
|
|
3058
|
-
})(
|
|
3080
|
+
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$8.spacing.layout.xl);
|
|
3059
3081
|
var StatusAnnouncement = styled.div.withConfig({
|
|
3060
3082
|
displayName: "AgentInput__StatusAnnouncement",
|
|
3061
3083
|
componentId: "sc-fhl996-11"
|
|
3062
|
-
})(
|
|
3084
|
+
})(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject([""], [""])));
|
|
3063
3085
|
var MeterContainer = styled.div.withConfig({
|
|
3064
3086
|
displayName: "AgentInput__MeterContainer",
|
|
3065
3087
|
componentId: "sc-fhl996-12"
|
|
3066
|
-
})(
|
|
3088
|
+
})(templateObject_16$1 || (templateObject_16$1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: flex-end;\n gap: ", ";\n height: ", ";\n"], ["\n display: inline-flex;\n align-items: flex-end;\n gap: ", ";\n height: ", ";\n"])), semantic$8.spacing.layout.xs, semantic$8.spacing.layout.lg);
|
|
3067
3089
|
var MeterBar = styled.div.withConfig({
|
|
3068
3090
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3069
3091
|
return !prop.startsWith('$');
|
|
3070
3092
|
},
|
|
3071
3093
|
displayName: "AgentInput__MeterBar",
|
|
3072
3094
|
componentId: "sc-fhl996-13"
|
|
3073
|
-
})(
|
|
3095
|
+
})(templateObject_17$1 || (templateObject_17$1 = __makeTemplateObject(["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"], ["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"])), semantic$8.spacing.layout.xs, semantic$8.border.radius.xs, semantic$8.color.background.interactive, function (_a) {
|
|
3074
3096
|
var $height = _a.$height;
|
|
3075
3097
|
return "".concat($height * 100, "%");
|
|
3076
3098
|
}, semantic$8.motion.duration.fast, semantic$8.motion.easing.easeOut);
|
|
3077
3099
|
var VisuallyHiddenLabel = styled.label.withConfig({
|
|
3078
3100
|
displayName: "AgentInput__VisuallyHiddenLabel",
|
|
3079
3101
|
componentId: "sc-fhl996-14"
|
|
3080
|
-
})(
|
|
3102
|
+
})(templateObject_18$1 || (templateObject_18$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
3081
3103
|
function getInitialState(hasText) {
|
|
3082
3104
|
return hasText ? 'typing' : 'idle';
|
|
3083
3105
|
}
|
|
@@ -3706,13 +3728,13 @@ var AgentInput = function AgentInput(_a) {
|
|
|
3706
3728
|
})]
|
|
3707
3729
|
});
|
|
3708
3730
|
};
|
|
3709
|
-
var templateObject_1$p, templateObject_2$k, templateObject_3$i, templateObject_4$f, templateObject_5$
|
|
3731
|
+
var templateObject_1$p, templateObject_2$k, templateObject_3$i, templateObject_4$f, templateObject_5$c, templateObject_6$9, templateObject_7$7, templateObject_8$6, templateObject_9$5, templateObject_10$3, templateObject_11$3, templateObject_12$3, templateObject_13$2, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1;
|
|
3710
3732
|
|
|
3711
3733
|
var semantic$7 = tokensJson.semantic;
|
|
3712
3734
|
var alert = tokensJson.component.alert;
|
|
3713
|
-
var _a$
|
|
3714
|
-
duration$1 = _a$
|
|
3715
|
-
easing$1 = _a$
|
|
3735
|
+
var _a$3 = semantic$7.motion,
|
|
3736
|
+
duration$1 = _a$3.duration,
|
|
3737
|
+
easing$1 = _a$3.easing;
|
|
3716
3738
|
// Dismissing fades the alert out, then collapses the space it took (Ollie's call, #35).
|
|
3717
3739
|
// Each half takes duration.fast, so the whole exit stays within the 300ms maximum (P6).
|
|
3718
3740
|
var FADE_MS = parseInt(duration$1.fast, 10);
|
|
@@ -3786,7 +3808,7 @@ var StyledAlert = styled.div.withConfig({
|
|
|
3786
3808
|
}, function (_a) {
|
|
3787
3809
|
var $isExiting = _a.$isExiting,
|
|
3788
3810
|
$reducedExit = _a.$reducedExit;
|
|
3789
|
-
return $isExiting && css(templateObject_5$
|
|
3811
|
+
return $isExiting && css(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "], ["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "])), $reducedExit ? css(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), fadeOut, duration$1.fast, easing$1.easeOut) : css(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["", " ", "ms ", " forwards"], ["", " ", "ms ", " forwards"])), fadeThenCollapse, EXIT_MS, easing$1.easeOut));
|
|
3790
3812
|
});
|
|
3791
3813
|
var StyledIconContainer = styled.div.withConfig({
|
|
3792
3814
|
displayName: "Alert__StyledIconContainer",
|
|
@@ -3939,13 +3961,12 @@ var Alert = function Alert(_a) {
|
|
|
3939
3961
|
}));
|
|
3940
3962
|
};
|
|
3941
3963
|
Alert.displayName = 'Alert';
|
|
3942
|
-
var templateObject_1$o, templateObject_2$j, templateObject_3$h, templateObject_4$e, templateObject_5$
|
|
3964
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$h, templateObject_4$e, templateObject_5$b, templateObject_6$8, templateObject_7$6, templateObject_8$5, templateObject_9$4, templateObject_10$2, templateObject_11$2, templateObject_12$2;
|
|
3943
3965
|
|
|
3944
|
-
var _a$3, _b$1;
|
|
3945
3966
|
var BreadcrumbNavStyled = styled.nav.withConfig({
|
|
3946
3967
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
3947
3968
|
componentId: "sc-7ouzg5-0"
|
|
3948
|
-
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])),
|
|
3969
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])), tokensJson.semantic.border["default"]);
|
|
3949
3970
|
var BreadcrumbStyled = styled.li.withConfig({
|
|
3950
3971
|
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
3951
3972
|
componentId: "sc-7ouzg5-1"
|
|
@@ -4013,7 +4034,8 @@ var CardSmall = function CardSmall(_a) {
|
|
|
4013
4034
|
subtitle = _a.subtitle,
|
|
4014
4035
|
meta = _a.meta,
|
|
4015
4036
|
href = _a.href,
|
|
4016
|
-
LinkComponent = _a.linkComponent
|
|
4037
|
+
LinkComponent = _a.linkComponent,
|
|
4038
|
+
dataTestId = _a["data-testid"];
|
|
4017
4039
|
if (!picture || !meta) {
|
|
4018
4040
|
return null;
|
|
4019
4041
|
}
|
|
@@ -4047,6 +4069,7 @@ var CardSmall = function CardSmall(_a) {
|
|
|
4047
4069
|
})]
|
|
4048
4070
|
});
|
|
4049
4071
|
return jsx(CardSmallStyled, {
|
|
4072
|
+
"data-testid": dataTestId,
|
|
4050
4073
|
children: LinkComponent && href ? jsx(LinkComponent, {
|
|
4051
4074
|
href: href,
|
|
4052
4075
|
"aria-label": title,
|
|
@@ -4073,8 +4096,10 @@ var CardLarge = function CardLarge(_a) {
|
|
|
4073
4096
|
labels = _b === void 0 ? [] : _b,
|
|
4074
4097
|
picture = _a.picture,
|
|
4075
4098
|
onImageClick = _a.onImageClick,
|
|
4076
|
-
imageHref = _a.imageHref
|
|
4099
|
+
imageHref = _a.imageHref,
|
|
4100
|
+
dataTestId = _a["data-testid"];
|
|
4077
4101
|
return jsx(CardLargeStyled, {
|
|
4102
|
+
"data-testid": dataTestId,
|
|
4078
4103
|
children: jsxs(Stack, {
|
|
4079
4104
|
direction: "column",
|
|
4080
4105
|
gap: "md",
|
|
@@ -4448,6 +4473,37 @@ var CopyButton = function CopyButton(_a) {
|
|
|
4448
4473
|
})
|
|
4449
4474
|
});
|
|
4450
4475
|
};
|
|
4476
|
+
var LiveRegion = styled.span.withConfig({
|
|
4477
|
+
displayName: "CodeBlock__LiveRegion",
|
|
4478
|
+
componentId: "sc-1p1t0kp-4"
|
|
4479
|
+
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
4480
|
+
/**
|
|
4481
|
+
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
4482
|
+
* and expandable content for long code blocks.
|
|
4483
|
+
*
|
|
4484
|
+
* @param children - The code content to display
|
|
4485
|
+
* @param showCopyButton - Whether to show the copy button (default: true)
|
|
4486
|
+
* @param onCopy - Optional callback when code is copied
|
|
4487
|
+
* @param maxHeight - Maximum height in pixels before enabling expand/collapse
|
|
4488
|
+
* @param defaultExpanded - Initial expanded state when maxHeight is set
|
|
4489
|
+
* @param data-testid - Test identifier for the code block
|
|
4490
|
+
*
|
|
4491
|
+
* @example
|
|
4492
|
+
* ```tsx
|
|
4493
|
+
* // Basic usage
|
|
4494
|
+
* <CodeBlock>const x = 1;</CodeBlock>
|
|
4495
|
+
*
|
|
4496
|
+
* // With max height and expand/collapse
|
|
4497
|
+
* <CodeBlock maxHeight={200}>
|
|
4498
|
+
* {longCodeString}
|
|
4499
|
+
* </CodeBlock>
|
|
4500
|
+
*
|
|
4501
|
+
* // Start expanded
|
|
4502
|
+
* <CodeBlock maxHeight={200} defaultExpanded>
|
|
4503
|
+
* {longCodeString}
|
|
4504
|
+
* </CodeBlock>
|
|
4505
|
+
* ```
|
|
4506
|
+
*/])), visuallyHidden);
|
|
4451
4507
|
/**
|
|
4452
4508
|
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
4453
4509
|
* and expandable content for long code blocks.
|
|
@@ -4490,6 +4546,9 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4490
4546
|
var _e = useState(false),
|
|
4491
4547
|
needsExpansion = _e[0],
|
|
4492
4548
|
setNeedsExpansion = _e[1];
|
|
4549
|
+
var _f = useState(''),
|
|
4550
|
+
announcement = _f[0],
|
|
4551
|
+
setAnnouncement = _f[1];
|
|
4493
4552
|
var contentRef = useRef(null);
|
|
4494
4553
|
// Check if content exceeds maxHeight
|
|
4495
4554
|
useEffect(function () {
|
|
@@ -4503,17 +4562,7 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4503
4562
|
return !prev;
|
|
4504
4563
|
});
|
|
4505
4564
|
// Announce state change to screen readers
|
|
4506
|
-
|
|
4507
|
-
var announcer = document.createElement('div');
|
|
4508
|
-
announcer.setAttribute('aria-live', 'polite');
|
|
4509
|
-
announcer.setAttribute('aria-atomic', 'true');
|
|
4510
|
-
announcer.setAttribute('class', 'sr-only');
|
|
4511
|
-
announcer.style.cssText = 'position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;';
|
|
4512
|
-
announcer.textContent = announcement;
|
|
4513
|
-
document.body.appendChild(announcer);
|
|
4514
|
-
setTimeout(function () {
|
|
4515
|
-
document.body.removeChild(announcer);
|
|
4516
|
-
}, 1000);
|
|
4565
|
+
setAnnouncement(isExpanded ? 'Code block collapsed' : 'Code block expanded');
|
|
4517
4566
|
};
|
|
4518
4567
|
var showExpandButton = maxHeight && needsExpansion;
|
|
4519
4568
|
return jsxs(CodeBlockWrapper, {
|
|
@@ -4538,13 +4587,17 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4538
4587
|
"data-testid": "expand-button",
|
|
4539
4588
|
children: isExpanded ? 'Show less' : 'Show more'
|
|
4540
4589
|
})
|
|
4590
|
+
}), showExpandButton && jsx(LiveRegion, {
|
|
4591
|
+
"aria-live": "polite",
|
|
4592
|
+
"aria-atomic": "true",
|
|
4593
|
+
children: announcement
|
|
4541
4594
|
}), showCopyButton && jsx(CopyButton, {
|
|
4542
4595
|
text: children,
|
|
4543
4596
|
onCopy: onCopy
|
|
4544
4597
|
})]
|
|
4545
4598
|
});
|
|
4546
4599
|
};
|
|
4547
|
-
var templateObject_1$h, templateObject_2$f, templateObject_3$e, templateObject_4$c;
|
|
4600
|
+
var templateObject_1$h, templateObject_2$f, templateObject_3$e, templateObject_4$c, templateObject_5$a;
|
|
4548
4601
|
|
|
4549
4602
|
var StyledHeader$1 = styled.div.withConfig({
|
|
4550
4603
|
displayName: "DateGroup__StyledHeader",
|
|
@@ -4790,9 +4843,11 @@ var FeatureBlock = function FeatureBlock(_a) {
|
|
|
4790
4843
|
onReadMore = _a.onReadMore,
|
|
4791
4844
|
readMoreHref = _a.readMoreHref,
|
|
4792
4845
|
_c = _a.readMoreText,
|
|
4793
|
-
readMoreText = _c === void 0 ? "Read more" : _c
|
|
4846
|
+
readMoreText = _c === void 0 ? "Read more" : _c,
|
|
4847
|
+
dataTestId = _a["data-testid"];
|
|
4794
4848
|
return jsxs(Fragment, {
|
|
4795
4849
|
children: [jsxs(FeatureBlockStyled, {
|
|
4850
|
+
"data-testid": dataTestId,
|
|
4796
4851
|
children: [jsx(ImageWrapper, {
|
|
4797
4852
|
children: jsx(Picture, {
|
|
4798
4853
|
title: title,
|
|
@@ -4931,7 +4986,8 @@ var Dropdown = function Dropdown(_a) {
|
|
|
4931
4986
|
className = _a.className,
|
|
4932
4987
|
label = _a.label,
|
|
4933
4988
|
helperText = _a.helperText,
|
|
4934
|
-
error = _a.error
|
|
4989
|
+
error = _a.error,
|
|
4990
|
+
dataTestId = _a["data-testid"];
|
|
4935
4991
|
var _d = useState(false),
|
|
4936
4992
|
isOpen = _d[0],
|
|
4937
4993
|
setIsOpen = _d[1];
|
|
@@ -5036,6 +5092,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
5036
5092
|
return jsxs(DropdownContainer, {
|
|
5037
5093
|
ref: dropdownRef,
|
|
5038
5094
|
className: className,
|
|
5095
|
+
"data-testid": dataTestId,
|
|
5039
5096
|
children: [label && jsx("label", {
|
|
5040
5097
|
htmlFor: dropdownId,
|
|
5041
5098
|
style: {
|
|
@@ -5672,10 +5729,36 @@ var PageTitleStyled = styled.div.withConfig({
|
|
|
5672
5729
|
},
|
|
5673
5730
|
displayName: "PageTitle__PageTitleStyled",
|
|
5674
5731
|
componentId: "sc-16h256f-0"
|
|
5675
|
-
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin-bottom: ", ";\n margin-top: ", ";\n"
|
|
5732
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin-bottom: ", ";\n margin-top: ", ";\n"
|
|
5733
|
+
/**
|
|
5734
|
+
* @deprecated PageTitle is a leftover from the personal site (its back button always links to `/music`)
|
|
5735
|
+
* and will be removed in the next major version. Compose a page title from `Typography` in a `Stack`:
|
|
5736
|
+
*
|
|
5737
|
+
* ```tsx
|
|
5738
|
+
* <Stack direction="column" gap="md">
|
|
5739
|
+
* <Typography variant="h1">{title}</Typography>
|
|
5740
|
+
* <Typography variant="caption" color="subdued">{subtitle}</Typography>
|
|
5741
|
+
* </Stack>
|
|
5742
|
+
* ```
|
|
5743
|
+
*
|
|
5744
|
+
* For a back link, add an `IconButton` with your own `url` and `aria-label`.
|
|
5745
|
+
*/])), tokensJson.semantic.spacing.layout['2xl'], function (_a) {
|
|
5676
5746
|
var $hasBackButton = _a.$hasBackButton;
|
|
5677
5747
|
return $hasBackButton ? tokensJson.semantic.spacing.layout.none : tokensJson.semantic.spacing.layout['7xl'];
|
|
5678
5748
|
});
|
|
5749
|
+
/**
|
|
5750
|
+
* @deprecated PageTitle is a leftover from the personal site (its back button always links to `/music`)
|
|
5751
|
+
* and will be removed in the next major version. Compose a page title from `Typography` in a `Stack`:
|
|
5752
|
+
*
|
|
5753
|
+
* ```tsx
|
|
5754
|
+
* <Stack direction="column" gap="md">
|
|
5755
|
+
* <Typography variant="h1">{title}</Typography>
|
|
5756
|
+
* <Typography variant="caption" color="subdued">{subtitle}</Typography>
|
|
5757
|
+
* </Stack>
|
|
5758
|
+
* ```
|
|
5759
|
+
*
|
|
5760
|
+
* For a back link, add an `IconButton` with your own `url` and `aria-label`.
|
|
5761
|
+
*/
|
|
5679
5762
|
var PageTitle = function PageTitle(_a) {
|
|
5680
5763
|
var title = _a.title,
|
|
5681
5764
|
_b = _a.hasBackButton,
|
|
@@ -6862,13 +6945,8 @@ var StyledBadge = styled.span.withConfig({
|
|
|
6862
6945
|
* />
|
|
6863
6946
|
* ```
|
|
6864
6947
|
*/])), tokensJson.component.tabBar.badge.size, tokensJson.component.tabBar.badge.size, semantic.spacing.layout.xs, tokensJson.component.tabBar.badge.typography, tokensJson.component.tabBar.badge.fontWeight, semantic.border.radius.circle, function (props) {
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
}
|
|
6868
|
-
return semantic.color.background.interactive;
|
|
6869
|
-
}, function (props) {
|
|
6870
|
-
return props.$variant === 'pills' && props.$isActive ? semantic.color.text.inverse : semantic.color.text.inverse;
|
|
6871
|
-
});
|
|
6948
|
+
return props.$variant === 'pills' && props.$isActive ? semantic.color.background['inverse-overlay'] : semantic.color.background.interactive;
|
|
6949
|
+
}, semantic.color.text.inverse);
|
|
6872
6950
|
/**
|
|
6873
6951
|
* TabBar component for tabbed navigation
|
|
6874
6952
|
*
|
|
@@ -7378,6 +7456,7 @@ var Grid = function Grid(_a) {
|
|
|
7378
7456
|
gapX = _a.gapX,
|
|
7379
7457
|
gapY = _a.gapY,
|
|
7380
7458
|
className = _a.className,
|
|
7459
|
+
dataTestId = _a["data-testid"],
|
|
7381
7460
|
children = _a.children;
|
|
7382
7461
|
return jsx(GridContainer, {
|
|
7383
7462
|
"$cols": cols,
|
|
@@ -7385,6 +7464,7 @@ var Grid = function Grid(_a) {
|
|
|
7385
7464
|
"$gapX": gapX ? gapSpacing[gapX] : undefined,
|
|
7386
7465
|
"$gapY": gapY ? gapSpacing[gapY] : undefined,
|
|
7387
7466
|
className: className,
|
|
7467
|
+
"data-testid": dataTestId,
|
|
7388
7468
|
children: children
|
|
7389
7469
|
});
|
|
7390
7470
|
};
|
|
@@ -7397,7 +7477,7 @@ var GridColContainer = styled.div.withConfig({
|
|
|
7397
7477
|
})(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"], ["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"])), function (props) {
|
|
7398
7478
|
return props.$span && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["grid-column: span ", " / span ", ";"], ["grid-column: span ", " / span ", ";"])), props.$span, props.$span);
|
|
7399
7479
|
}, function (props) {
|
|
7400
|
-
return props.$order && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
7480
|
+
return props.$order !== undefined && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
7401
7481
|
}, function (props) {
|
|
7402
7482
|
return props.$spanSm && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.sm, props.$spanSm, props.$spanSm);
|
|
7403
7483
|
}, function (props) {
|
|
@@ -7407,13 +7487,13 @@ var GridColContainer = styled.div.withConfig({
|
|
|
7407
7487
|
}, function (props) {
|
|
7408
7488
|
return props.$spanXl && css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.xl, props.$spanXl, props.$spanXl);
|
|
7409
7489
|
}, function (props) {
|
|
7410
|
-
return props.$orderSm && css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.sm, props.$orderSm);
|
|
7490
|
+
return props.$orderSm !== undefined && css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.sm, props.$orderSm);
|
|
7411
7491
|
}, function (props) {
|
|
7412
|
-
return props.$orderMd && css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.md, props.$orderMd);
|
|
7492
|
+
return props.$orderMd !== undefined && css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.md, props.$orderMd);
|
|
7413
7493
|
}, function (props) {
|
|
7414
|
-
return props.$orderLg && css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.lg, props.$orderLg);
|
|
7494
|
+
return props.$orderLg !== undefined && css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.lg, props.$orderLg);
|
|
7415
7495
|
}, function (props) {
|
|
7416
|
-
return props.$orderXl && css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.xl, props.$orderXl);
|
|
7496
|
+
return props.$orderXl !== undefined && css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.xl, props.$orderXl);
|
|
7417
7497
|
});
|
|
7418
7498
|
var GridCol = function GridCol(_a) {
|
|
7419
7499
|
var span = _a.span,
|
|
@@ -7427,6 +7507,7 @@ var GridCol = function GridCol(_a) {
|
|
|
7427
7507
|
orderLg = _a.orderLg,
|
|
7428
7508
|
orderXl = _a.orderXl,
|
|
7429
7509
|
className = _a.className,
|
|
7510
|
+
dataTestId = _a["data-testid"],
|
|
7430
7511
|
children = _a.children;
|
|
7431
7512
|
return jsx(GridColContainer, {
|
|
7432
7513
|
"$span": span,
|
|
@@ -7440,6 +7521,7 @@ var GridCol = function GridCol(_a) {
|
|
|
7440
7521
|
"$orderLg": orderLg,
|
|
7441
7522
|
"$orderXl": orderXl,
|
|
7442
7523
|
className: className,
|
|
7524
|
+
"data-testid": dataTestId,
|
|
7443
7525
|
children: children
|
|
7444
7526
|
});
|
|
7445
7527
|
};
|
|
@@ -7512,6 +7594,7 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
7512
7594
|
gapYLg = _a.gapYLg,
|
|
7513
7595
|
gapYXl = _a.gapYXl,
|
|
7514
7596
|
className = _a.className,
|
|
7597
|
+
dataTestId = _a["data-testid"],
|
|
7515
7598
|
children = _a.children;
|
|
7516
7599
|
return jsx(ResponsiveGridContainer, {
|
|
7517
7600
|
"$cols": cols,
|
|
@@ -7535,6 +7618,7 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
7535
7618
|
"$gapYLg": gapYLg ? gapSpacing[gapYLg] : undefined,
|
|
7536
7619
|
"$gapYXl": gapYXl ? gapSpacing[gapYXl] : undefined,
|
|
7537
7620
|
className: className,
|
|
7621
|
+
"data-testid": dataTestId,
|
|
7538
7622
|
children: children
|
|
7539
7623
|
});
|
|
7540
7624
|
};
|