@common-origin/design-system 1.10.0 → 1.11.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/components/molecules/Checkbox/Checkbox.d.ts +64 -0
- package/dist/components/molecules/Checkbox/SelectableInputBase.d.ts +33 -0
- package/dist/components/molecules/Checkbox/index.d.ts +3 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/index.esm.js +261 -56
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +260 -54
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -786,7 +786,7 @@ var AvatarContainer = styled.div.withConfig({
|
|
|
786
786
|
},
|
|
787
787
|
displayName: "Avatar__AvatarContainer",
|
|
788
788
|
componentId: "sc-ezn4ax-0"
|
|
789
|
-
})(templateObject_1$
|
|
789
|
+
})(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"])), function (_a) {
|
|
790
790
|
var $size = _a.$size;
|
|
791
791
|
return tokensData.semantic.size.avatar[$size];
|
|
792
792
|
}, function (_a) {
|
|
@@ -799,14 +799,14 @@ var AvatarImage = styled.img.withConfig({
|
|
|
799
799
|
},
|
|
800
800
|
displayName: "Avatar__AvatarImage",
|
|
801
801
|
componentId: "sc-ezn4ax-1"
|
|
802
|
-
})(templateObject_2$
|
|
802
|
+
})(templateObject_2$f || (templateObject_2$f = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"])), tokensData.base.border.radius.circle);
|
|
803
803
|
var AvatarInitials = styled.span.withConfig({
|
|
804
804
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
805
805
|
return !prop.startsWith('$');
|
|
806
806
|
},
|
|
807
807
|
displayName: "Avatar__AvatarInitials",
|
|
808
808
|
componentId: "sc-ezn4ax-2"
|
|
809
|
-
})(templateObject_3$
|
|
809
|
+
})(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: 1;\n text-transform: uppercase;\n user-select: none;\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: 1;\n text-transform: uppercase;\n user-select: none;\n"
|
|
810
810
|
// Helper function to get initials from name
|
|
811
811
|
])), tokensData.base.fontFamily.body, tokensData.base.fontWeight[3], function (_a) {
|
|
812
812
|
var $size = _a.$size;
|
|
@@ -869,7 +869,7 @@ var Avatar = function Avatar(_a) {
|
|
|
869
869
|
"aria-hidden": "true"
|
|
870
870
|
}, initials));
|
|
871
871
|
};
|
|
872
|
-
var templateObject_1$
|
|
872
|
+
var templateObject_1$r, templateObject_2$f, templateObject_3$b;
|
|
873
873
|
|
|
874
874
|
React.createElement;
|
|
875
875
|
var _a$5 = tokensData.semantic,
|
|
@@ -937,7 +937,7 @@ var StyledTypography = styled.span.withConfig({
|
|
|
937
937
|
},
|
|
938
938
|
displayName: "Typography__StyledTypography",
|
|
939
939
|
componentId: "sc-17mqo4k-0"
|
|
940
|
-
})(templateObject_1$
|
|
940
|
+
})(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"], ["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"
|
|
941
941
|
/**
|
|
942
942
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
943
943
|
*
|
|
@@ -1004,23 +1004,23 @@ var Typography = function Typography(_a) {
|
|
|
1004
1004
|
"data-testid": dataTestId
|
|
1005
1005
|
}, children);
|
|
1006
1006
|
};
|
|
1007
|
-
var templateObject_1$
|
|
1007
|
+
var templateObject_1$q;
|
|
1008
1008
|
|
|
1009
1009
|
React.createElement;
|
|
1010
1010
|
var color$3 = tokensData.semantic.color;
|
|
1011
1011
|
tokensData.base.shadow;
|
|
1012
|
-
var scaleIn = styled.keyframes(templateObject_1$
|
|
1012
|
+
var scaleIn = styled.keyframes(templateObject_1$p || (templateObject_1$p = __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"])));
|
|
1013
1013
|
var BadgeWrapper = styled.span.withConfig({
|
|
1014
1014
|
displayName: "Badge__BadgeWrapper",
|
|
1015
1015
|
componentId: "sc-tjz4pp-0"
|
|
1016
|
-
})(templateObject_2$
|
|
1016
|
+
})(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"])));
|
|
1017
1017
|
var BadgeIndicator = styled.span.withConfig({
|
|
1018
1018
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1019
1019
|
return !prop.startsWith('$');
|
|
1020
1020
|
},
|
|
1021
1021
|
displayName: "Badge__BadgeIndicator",
|
|
1022
1022
|
componentId: "sc-tjz4pp-1"
|
|
1023
|
-
})(templateObject_3$
|
|
1023
|
+
})(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: 1;\n white-space: nowrap;\n box-shadow: 0 0 0 2px ", ";\n animation: ", " 0.2s ease-out;\n \n ", "\n"], ["\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: ", ";\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n line-height: 1;\n white-space: nowrap;\n box-shadow: 0 0 0 2px ", ";\n animation: ", " 0.2s ease-out;\n \n ", "\n"])), function (props) {
|
|
1024
1024
|
return props.$isVisible ? 'flex' : 'none';
|
|
1025
1025
|
}, function (props) {
|
|
1026
1026
|
return props.$isDot ? '8px' : '16px';
|
|
@@ -1045,7 +1045,7 @@ var BadgeIndicator = styled.span.withConfig({
|
|
|
1045
1045
|
var ScreenReaderOnly = styled.span.withConfig({
|
|
1046
1046
|
displayName: "Badge__ScreenReaderOnly",
|
|
1047
1047
|
componentId: "sc-tjz4pp-2"
|
|
1048
|
-
})(templateObject_4$
|
|
1048
|
+
})(templateObject_4$8 || (templateObject_4$8 = __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-width: 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-width: 0;\n"])));
|
|
1049
1049
|
var Badge = function Badge(_a) {
|
|
1050
1050
|
var children = _a.children,
|
|
1051
1051
|
_b = _a.count,
|
|
@@ -1076,7 +1076,7 @@ var Badge = function Badge(_a) {
|
|
|
1076
1076
|
color: "inverse"
|
|
1077
1077
|
}, displayCount), /*#__PURE__*/React.createElement(ScreenReaderOnly, null, label)));
|
|
1078
1078
|
};
|
|
1079
|
-
var templateObject_1$
|
|
1079
|
+
var templateObject_1$p, templateObject_2$e, templateObject_3$a, templateObject_4$8;
|
|
1080
1080
|
|
|
1081
1081
|
React.createElement;
|
|
1082
1082
|
var StyledBox = styled.div.withConfig({
|
|
@@ -1088,13 +1088,13 @@ var StyledBox = styled.div.withConfig({
|
|
|
1088
1088
|
})(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"], ["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"
|
|
1089
1089
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
1090
1090
|
])), function (props) {
|
|
1091
|
-
return props.$display && styled.css(templateObject_1$
|
|
1091
|
+
return props.$display && styled.css(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
1092
1092
|
}, function (props) {
|
|
1093
|
-
return props.$flexDirection && styled.css(templateObject_2$
|
|
1093
|
+
return props.$flexDirection && styled.css(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
1094
1094
|
}, function (props) {
|
|
1095
|
-
return props.$justifyContent && styled.css(templateObject_3$
|
|
1095
|
+
return props.$justifyContent && styled.css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
1096
1096
|
}, function (props) {
|
|
1097
|
-
return props.$alignItems && styled.css(templateObject_4$
|
|
1097
|
+
return props.$alignItems && styled.css(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
1098
1098
|
}, function (props) {
|
|
1099
1099
|
return props.$flexWrap && styled.css(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
1100
1100
|
}, function (props) {
|
|
@@ -1278,7 +1278,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
1278
1278
|
}, rest), children);
|
|
1279
1279
|
};
|
|
1280
1280
|
var Box = BoxTransform;
|
|
1281
|
-
var templateObject_1$
|
|
1281
|
+
var templateObject_1$o, templateObject_2$d, templateObject_3$9, templateObject_4$7, templateObject_5$4, templateObject_6$2, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1, 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;
|
|
1282
1282
|
|
|
1283
1283
|
var add = {
|
|
1284
1284
|
path: "M13 11H19V13H13V19H11V13H5V11H11V5H13V11Z",
|
|
@@ -1409,7 +1409,7 @@ var IconStyled = styled.span.withConfig({
|
|
|
1409
1409
|
},
|
|
1410
1410
|
displayName: "Icon__IconStyled",
|
|
1411
1411
|
componentId: "sc-1105czq-0"
|
|
1412
|
-
})(templateObject_1$
|
|
1412
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"])), function (_a) {
|
|
1413
1413
|
var $size = _a.$size;
|
|
1414
1414
|
return tokensData.semantic.size.icon[$size];
|
|
1415
1415
|
}, function (_a) {
|
|
@@ -1473,7 +1473,7 @@ var Icon = function Icon(_a) {
|
|
|
1473
1473
|
d: iconData.path
|
|
1474
1474
|
})));
|
|
1475
1475
|
};
|
|
1476
|
-
var templateObject_1$
|
|
1476
|
+
var templateObject_1$n;
|
|
1477
1477
|
|
|
1478
1478
|
React.createElement;
|
|
1479
1479
|
var button = tokensData.component.button,
|
|
@@ -1505,14 +1505,14 @@ var StyledButton = styled.button.withConfig({
|
|
|
1505
1505
|
},
|
|
1506
1506
|
displayName: "Button__StyledButton",
|
|
1507
1507
|
componentId: "sc-1eiuum9-0"
|
|
1508
|
-
})(templateObject_1$
|
|
1508
|
+
})(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles);
|
|
1509
1509
|
var StyledLink = styled.a.withConfig({
|
|
1510
1510
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1511
1511
|
return !prop.startsWith('$');
|
|
1512
1512
|
},
|
|
1513
1513
|
displayName: "Button__StyledLink",
|
|
1514
1514
|
componentId: "sc-1eiuum9-1"
|
|
1515
|
-
})(templateObject_2$
|
|
1515
|
+
})(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
1516
1516
|
// Helper function to get icon size based on button size
|
|
1517
1517
|
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles);
|
|
1518
1518
|
// Helper function to get icon size based on button size
|
|
@@ -1605,7 +1605,7 @@ var Button = function Button(_a) {
|
|
|
1605
1605
|
"data-testid": dataTestId
|
|
1606
1606
|
}, buttonProps), renderButtonContent(children, iconName, size));
|
|
1607
1607
|
};
|
|
1608
|
-
var templateObject_1$
|
|
1608
|
+
var templateObject_1$m, templateObject_2$c;
|
|
1609
1609
|
|
|
1610
1610
|
var chip = tokensData.component.chip;
|
|
1611
1611
|
// Helper function to get variant styles as objects for CSS custom properties
|
|
@@ -1666,14 +1666,14 @@ var BaseChipStyled = styled.span.withConfig({
|
|
|
1666
1666
|
},
|
|
1667
1667
|
displayName: "ChipBase__BaseChipStyled",
|
|
1668
1668
|
componentId: "sc-moa6zc-0"
|
|
1669
|
-
})(templateObject_1$
|
|
1669
|
+
})(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: 12px;\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: width ", ";\n \n /* Use CSS custom properties set by wrapper */\n background-color: var(--chip-bg-color);\n color: var(--chip-text-color);\n font: var(--chip-font);\n padding: var(--chip-padding);\n opacity: var(--chip-opacity, 1);\n cursor: var(--chip-cursor, default);\n \n &:hover {\n opacity: var(--chip-hover-opacity, var(--chip-opacity, 1));\n }\n \n &:active {\n opacity: var(--chip-active-opacity, var(--chip-opacity, 1));\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: 12px;\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: width ", ";\n \n /* Use CSS custom properties set by wrapper */\n background-color: var(--chip-bg-color);\n color: var(--chip-text-color);\n font: var(--chip-font);\n padding: var(--chip-padding);\n opacity: var(--chip-opacity, 1);\n cursor: var(--chip-cursor, default);\n \n &:hover {\n opacity: var(--chip-hover-opacity, var(--chip-opacity, 1));\n }\n \n &:active {\n opacity: var(--chip-active-opacity, var(--chip-opacity, 1));\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"
|
|
1670
1670
|
// Icon container for selected indicator or leading icons
|
|
1671
1671
|
])), tokensData.semantic.motion.interactive, chip.variants.interactive.backgroundColor);
|
|
1672
1672
|
// Icon container for selected indicator or leading icons
|
|
1673
1673
|
var IconContainer = styled.span.withConfig({
|
|
1674
1674
|
displayName: "ChipBase__IconContainer",
|
|
1675
1675
|
componentId: "sc-moa6zc-1"
|
|
1676
|
-
})(templateObject_2$
|
|
1676
|
+
})(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n margin-right: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n margin-right: ", ";\n"
|
|
1677
1677
|
// Close button for dismissible chips
|
|
1678
1678
|
])), tokensData.semantic.spacing.layout.sm);
|
|
1679
1679
|
// Close button for dismissible chips
|
|
@@ -1683,7 +1683,7 @@ var CloseButton = styled.button.withConfig({
|
|
|
1683
1683
|
},
|
|
1684
1684
|
displayName: "ChipBase__CloseButton",
|
|
1685
1685
|
componentId: "sc-moa6zc-2"
|
|
1686
|
-
})(templateObject_3$
|
|
1686
|
+
})(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n padding: 0;\n cursor: ", ";\n opacity: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n opacity: 0.7;\n }\n \n &:active:not(:disabled) {\n opacity: 0.9;\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n border-radius: 2px;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n padding: 0;\n cursor: ", ";\n opacity: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n opacity: 0.7;\n }\n \n &:active:not(:disabled) {\n opacity: 0.9;\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n border-radius: 2px;\n }\n"
|
|
1687
1687
|
// Wrapper component that applies styles via CSS custom properties
|
|
1688
1688
|
])), tokensData.semantic.spacing.layout.sm, function (props) {
|
|
1689
1689
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
@@ -1718,7 +1718,7 @@ var StyledChipWrapper = function StyledChipWrapper(_a) {
|
|
|
1718
1718
|
style: __assign(__assign({}, cssProps), style)
|
|
1719
1719
|
}, htmlProps), children);
|
|
1720
1720
|
};
|
|
1721
|
-
var templateObject_1$
|
|
1721
|
+
var templateObject_1$l, templateObject_2$b, templateObject_3$8;
|
|
1722
1722
|
|
|
1723
1723
|
React.createElement;
|
|
1724
1724
|
/**
|
|
@@ -1962,32 +1962,32 @@ var spacing$3 = tokensData.semantic.spacing;
|
|
|
1962
1962
|
var StyledContainer = styled.div.withConfig({
|
|
1963
1963
|
displayName: "Container__StyledContainer",
|
|
1964
1964
|
componentId: "sc-17dbj6n-0"
|
|
1965
|
-
})(templateObject_1$
|
|
1965
|
+
})(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: 640px;\n }\n \n ", " {\n max-width: 768px;\n }\n \n ", " {\n max-width: 1024px;\n }\n \n ", " {\n max-width: 1280px;\n }\n \n ", " {\n max-width: 1536px;\n }\n"], ["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: 640px;\n }\n \n ", " {\n max-width: 768px;\n }\n \n ", " {\n max-width: 1024px;\n }\n \n ", " {\n max-width: 1280px;\n }\n \n ", " {\n max-width: 1536px;\n }\n"])), spacing$3.layout['2xl'], spacing$3.layout['2xl'], media$1.sm, media$1.md, media$1.lg, media$1.xl, media$1['2xl']);
|
|
1966
1966
|
var Container = function Container(_a) {
|
|
1967
1967
|
var children = _a.children,
|
|
1968
1968
|
props = __rest(_a, ["children"]);
|
|
1969
1969
|
return /*#__PURE__*/React.createElement(StyledContainer, props, children);
|
|
1970
1970
|
};
|
|
1971
|
-
var templateObject_1$
|
|
1971
|
+
var templateObject_1$k;
|
|
1972
1972
|
|
|
1973
1973
|
React.createElement;
|
|
1974
1974
|
var base$1 = tokensData.base;
|
|
1975
1975
|
var PictureWrapper = styled.div.withConfig({
|
|
1976
1976
|
displayName: "Picture__PictureWrapper",
|
|
1977
1977
|
componentId: "sc-11d9tei-0"
|
|
1978
|
-
})(templateObject_1$
|
|
1978
|
+
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"], ["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"])), media$1.sm);
|
|
1979
1979
|
var ImageLink = styled.a.withConfig({
|
|
1980
1980
|
displayName: "Picture__ImageLink",
|
|
1981
1981
|
componentId: "sc-11d9tei-1"
|
|
1982
|
-
})(templateObject_2$
|
|
1982
|
+
})(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n display: block;\n cursor: pointer;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"], ["\n display: block;\n cursor: pointer;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"])), base$1.duration.normal, base$1.easing.easeInOut);
|
|
1983
1983
|
var ImageButton = styled.button.withConfig({
|
|
1984
1984
|
displayName: "Picture__ImageButton",
|
|
1985
1985
|
componentId: "sc-11d9tei-2"
|
|
1986
|
-
})(templateObject_3$
|
|
1986
|
+
})(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n display: block;\n width: 100%;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"], ["\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n display: block;\n width: 100%;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"])), base$1.duration.normal, base$1.easing.easeInOut);
|
|
1987
1987
|
var StyledImage = styled.img.withConfig({
|
|
1988
1988
|
displayName: "Picture__StyledImage",
|
|
1989
1989
|
componentId: "sc-11d9tei-3"
|
|
1990
|
-
})(templateObject_4$
|
|
1990
|
+
})(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n width: 100%;\n height: auto;\n border-radius: ", ";\n display: block;\n"], ["\n width: 100%;\n height: auto;\n border-radius: ", ";\n display: block;\n"])), base$1.border.radius[2]);
|
|
1991
1991
|
var Picture = function Picture(_a) {
|
|
1992
1992
|
var title = _a.title,
|
|
1993
1993
|
src = _a.src,
|
|
@@ -2014,7 +2014,7 @@ var Picture = function Picture(_a) {
|
|
|
2014
2014
|
"aria-label": "Read more about ".concat(title)
|
|
2015
2015
|
}, image) : image);
|
|
2016
2016
|
};
|
|
2017
|
-
var templateObject_1$
|
|
2017
|
+
var templateObject_1$j, templateObject_2$a, templateObject_3$7, templateObject_4$6;
|
|
2018
2018
|
|
|
2019
2019
|
React.createElement;
|
|
2020
2020
|
var _a$4 = tokensData.semantic,
|
|
@@ -2023,7 +2023,7 @@ var _a$4 = tokensData.semantic,
|
|
|
2023
2023
|
var TimeStyled = styled.time.withConfig({
|
|
2024
2024
|
displayName: "DateFormatter__TimeStyled",
|
|
2025
2025
|
componentId: "sc-5464cc-0"
|
|
2026
|
-
})(templateObject_1$
|
|
2026
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography$1.label, color$2.text.subdued);
|
|
2027
2027
|
var DateFormatter = function DateFormatter(_a) {
|
|
2028
2028
|
var dateString = _a.dateString,
|
|
2029
2029
|
_b = _a.formatString,
|
|
@@ -2035,7 +2035,7 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
2035
2035
|
"data-testid": dataTestId
|
|
2036
2036
|
}, dateFns.format(date, formatString));
|
|
2037
2037
|
};
|
|
2038
|
-
var templateObject_1$
|
|
2038
|
+
var templateObject_1$i;
|
|
2039
2039
|
|
|
2040
2040
|
React.createElement;
|
|
2041
2041
|
var motion = tokensData.semantic.motion,
|
|
@@ -2046,7 +2046,7 @@ var IconButtonStyled = styled.button.withConfig({
|
|
|
2046
2046
|
},
|
|
2047
2047
|
displayName: "IconButton__IconButtonStyled",
|
|
2048
2048
|
componentId: "sc-k8b14t-0"
|
|
2049
|
-
})(templateObject_1$
|
|
2049
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n background-color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"], ["\n background-color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"])), function (_a) {
|
|
2050
2050
|
var $variant = _a.$variant;
|
|
2051
2051
|
switch ($variant) {
|
|
2052
2052
|
case 'primary':
|
|
@@ -2157,7 +2157,7 @@ var IconButton = function IconButton(_a) {
|
|
|
2157
2157
|
"aria-hidden": "true" // Hide icon from screen readers since button has aria-label
|
|
2158
2158
|
}));
|
|
2159
2159
|
};
|
|
2160
|
-
var templateObject_1$
|
|
2160
|
+
var templateObject_1$h;
|
|
2161
2161
|
|
|
2162
2162
|
React.createElement;
|
|
2163
2163
|
var ProgressBarContainer = styled.div.withConfig({
|
|
@@ -2166,10 +2166,10 @@ var ProgressBarContainer = styled.div.withConfig({
|
|
|
2166
2166
|
},
|
|
2167
2167
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
2168
2168
|
componentId: "sc-1nco33q-0"
|
|
2169
|
-
})(templateObject_3$
|
|
2170
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_1$
|
|
2169
|
+
})(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", ";\n overflow: hidden;\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-radius: ", ";\n overflow: hidden;\n\n ", "\n\n ", "\n"])), tokensData.semantic.color.background.disabled, tokensData.base.border.radius[1], function (props) {
|
|
2170
|
+
return props.$variant === 'horizontal' && styled.css(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n width: 100%;\n height: ", ";\n "], ["\n width: 100%;\n height: ", ";\n "])), props.$height ? tokensData.component.progressBar.sizes[props.$height].height : tokensData.component.progressBar.sizes.md.height);
|
|
2171
2171
|
}, function (props) {
|
|
2172
|
-
return props.$variant === 'vertical' && styled.css(templateObject_2$
|
|
2172
|
+
return props.$variant === 'vertical' && styled.css(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n "], ["\n width: ", ";\n height: 100%;\n "])), props.$width ? tokensData.component.progressBar.sizes[props.$width].height : tokensData.component.progressBar.sizes.md.height);
|
|
2173
2173
|
});
|
|
2174
2174
|
var ProgressBarFill = styled.div.withConfig({
|
|
2175
2175
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2191,7 +2191,7 @@ var ProgressBarFill = styled.div.withConfig({
|
|
|
2191
2191
|
backgroundColor = tokensData.semantic.color.background.interactive;
|
|
2192
2192
|
break;
|
|
2193
2193
|
}
|
|
2194
|
-
return styled.css(templateObject_4$
|
|
2194
|
+
return styled.css(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
2195
2195
|
}, function (props) {
|
|
2196
2196
|
return props.$variant === 'horizontal' && styled.css(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
2197
2197
|
}, function (props) {
|
|
@@ -2221,7 +2221,7 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
2221
2221
|
$color: color
|
|
2222
2222
|
}));
|
|
2223
2223
|
};
|
|
2224
|
-
var templateObject_1$
|
|
2224
|
+
var templateObject_1$g, templateObject_2$9, templateObject_3$6, templateObject_4$5, templateObject_5$3, templateObject_6$1, templateObject_7$1;
|
|
2225
2225
|
|
|
2226
2226
|
React.createElement;
|
|
2227
2227
|
var StyledDivider = styled.div.withConfig({
|
|
@@ -2230,7 +2230,7 @@ var StyledDivider = styled.div.withConfig({
|
|
|
2230
2230
|
},
|
|
2231
2231
|
displayName: "Divider__StyledDivider",
|
|
2232
2232
|
componentId: "sc-1l0c8ja-0"
|
|
2233
|
-
})(templateObject_1$
|
|
2233
|
+
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"], ["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"
|
|
2234
2234
|
/**
|
|
2235
2235
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
2236
2236
|
*
|
|
@@ -2343,7 +2343,7 @@ var Divider = function Divider(_a) {
|
|
|
2343
2343
|
"aria-orientation": orientation
|
|
2344
2344
|
});
|
|
2345
2345
|
};
|
|
2346
|
-
var templateObject_1$
|
|
2346
|
+
var templateObject_1$f;
|
|
2347
2347
|
|
|
2348
2348
|
React.createElement;
|
|
2349
2349
|
var StyledStack = styled.div.withConfig({
|
|
@@ -2352,7 +2352,7 @@ var StyledStack = styled.div.withConfig({
|
|
|
2352
2352
|
},
|
|
2353
2353
|
displayName: "Stack__StyledStack",
|
|
2354
2354
|
componentId: "sc-1ehkxgy-0"
|
|
2355
|
-
})(templateObject_1$
|
|
2355
|
+
})(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"], ["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"
|
|
2356
2356
|
// Helper function to convert gap prop to CSS value
|
|
2357
2357
|
])));
|
|
2358
2358
|
// Helper function to convert gap prop to CSS value
|
|
@@ -2390,7 +2390,7 @@ var Stack = function Stack(_a) {
|
|
|
2390
2390
|
"data-testid": dataTestId
|
|
2391
2391
|
}, children);
|
|
2392
2392
|
};
|
|
2393
|
-
var templateObject_1$
|
|
2393
|
+
var templateObject_1$e;
|
|
2394
2394
|
|
|
2395
2395
|
React.createElement;
|
|
2396
2396
|
var semantic$1 = tokensData.semantic;
|
|
@@ -2400,7 +2400,7 @@ var StyledTag = styled.span.withConfig({
|
|
|
2400
2400
|
},
|
|
2401
2401
|
displayName: "Tag__StyledTag",
|
|
2402
2402
|
componentId: "sc-lzfmti-0"
|
|
2403
|
-
})(templateObject_1$
|
|
2403
|
+
})(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"
|
|
2404
2404
|
/**
|
|
2405
2405
|
* Tag component for categorizing and labeling content
|
|
2406
2406
|
*
|
|
@@ -2481,18 +2481,18 @@ var Tag = function Tag(_a) {
|
|
|
2481
2481
|
"aria-label": typeof children === 'string' ? "Tag: ".concat(children) : undefined
|
|
2482
2482
|
}, props), children);
|
|
2483
2483
|
};
|
|
2484
|
-
var templateObject_1$
|
|
2484
|
+
var templateObject_1$d;
|
|
2485
2485
|
|
|
2486
2486
|
React.createElement;
|
|
2487
2487
|
var _a$3, _b$1, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2488
2488
|
var BreadcrumbNavStyled = styled.nav.withConfig({
|
|
2489
2489
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
2490
2490
|
componentId: "sc-7ouzg5-0"
|
|
2491
|
-
})(templateObject_1$
|
|
2491
|
+
})(templateObject_1$c || (templateObject_1$c = __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"])), ((_b$1 = (_a$3 = tokensData.semantic) === null || _a$3 === void 0 ? void 0 : _a$3.border) === null || _b$1 === void 0 ? void 0 : _b$1["default"]) || '0.0625rem solid #e9ecef');
|
|
2492
2492
|
var BreadcrumbStyled = styled.li.withConfig({
|
|
2493
2493
|
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
2494
2494
|
componentId: "sc-7ouzg5-1"
|
|
2495
|
-
})(templateObject_2$
|
|
2495
|
+
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n text-transform: uppercase;\n display: inline-block;\n margin-right: ", ";\n padding: ", ";\n position: relative;\n\n &:not(:last-of-type)::before {\n content: '';\n background-image: url('/assets/icons/caret.svg');\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n opacity: 0.5;\n display: inline-block;\n width: ", ";\n height: ", ";\n right: -", ";\n position: absolute;\n }\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n }\n\n > a {\n text-decoration: underline;\n color: ", ";\n }\n"], ["\n text-transform: uppercase;\n display: inline-block;\n margin-right: ", ";\n padding: ", ";\n position: relative;\n\n &:not(:last-of-type)::before {\n content: '';\n background-image: url('/assets/icons/caret.svg');\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n background-color: transparent;\n opacity: 0.5;\n display: inline-block;\n width: ", ";\n height: ", ";\n right: -", ";\n position: absolute;\n }\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n }\n\n > a {\n text-decoration: underline;\n color: ", ";\n }\n"])), ((_d = (_c = tokensData.base) === null || _c === void 0 ? void 0 : _c.spacing) === null || _d === void 0 ? void 0 : _d['2']) || '0.5rem', ((_f = (_e = tokensData.base) === null || _e === void 0 ? void 0 : _e.spacing) === null || _f === void 0 ? void 0 : _f['2']) || '0.5rem', ((_h = (_g = tokensData.base) === null || _g === void 0 ? void 0 : _g.spacing) === null || _h === void 0 ? void 0 : _h['4']) || '1rem', ((_k = (_j = tokensData.base) === null || _j === void 0 ? void 0 : _j.spacing) === null || _k === void 0 ? void 0 : _k['4']) || '1rem', ((_m = (_l = tokensData.base) === null || _l === void 0 ? void 0 : _l.spacing) === null || _m === void 0 ? void 0 : _m['3']) || '0.75rem', tokensData.semantic.color.text.subdued, tokensData.semantic.color.text["default"]);
|
|
2496
2496
|
var isInternalUrl = function isInternalUrl(url) {
|
|
2497
2497
|
return url.startsWith('/') && !url.startsWith('http');
|
|
2498
2498
|
};
|
|
@@ -2518,13 +2518,13 @@ var Breadcrumbs = function Breadcrumbs(_a) {
|
|
|
2518
2518
|
}, breadcrumb.label)));
|
|
2519
2519
|
}))));
|
|
2520
2520
|
};
|
|
2521
|
-
var templateObject_1$
|
|
2521
|
+
var templateObject_1$c, templateObject_2$8;
|
|
2522
2522
|
|
|
2523
2523
|
React.createElement;
|
|
2524
2524
|
var CardSmallStyled = styled.div.withConfig({
|
|
2525
2525
|
displayName: "CardSmall__CardSmallStyled",
|
|
2526
2526
|
componentId: "sc-jpcqvd-0"
|
|
2527
|
-
})(templateObject_1$
|
|
2527
|
+
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n"], ["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n"])), tokensData.base.border.radius[2], tokensData.semantic.color.border.strong);
|
|
2528
2528
|
var CardSmall = function CardSmall(_a) {
|
|
2529
2529
|
var title = _a.title,
|
|
2530
2530
|
picture = _a.picture,
|
|
@@ -2561,14 +2561,14 @@ var CardSmall = function CardSmall(_a) {
|
|
|
2561
2561
|
color: "subdued"
|
|
2562
2562
|
}, meta))))));
|
|
2563
2563
|
};
|
|
2564
|
-
var templateObject_1$
|
|
2564
|
+
var templateObject_1$b;
|
|
2565
2565
|
|
|
2566
2566
|
React.createElement;
|
|
2567
2567
|
var border$3 = tokensData.base.border;
|
|
2568
2568
|
var CardLargeStyled = styled.div.withConfig({
|
|
2569
2569
|
displayName: "CardLarge__CardLargeStyled",
|
|
2570
2570
|
componentId: "sc-1rfgdzl-0"
|
|
2571
|
-
})(templateObject_1$
|
|
2571
|
+
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n max-width: 768px;\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n }\n"], ["\n max-width: 768px;\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n }\n"])), border$3.radius[6]);
|
|
2572
2572
|
var CardLarge = function CardLarge(_a) {
|
|
2573
2573
|
var title = _a.title,
|
|
2574
2574
|
excerpt = _a.excerpt,
|
|
@@ -2613,7 +2613,212 @@ var CardLarge = function CardLarge(_a) {
|
|
|
2613
2613
|
});
|
|
2614
2614
|
})))));
|
|
2615
2615
|
};
|
|
2616
|
-
var templateObject_1$
|
|
2616
|
+
var templateObject_1$a;
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* Hidden native checkbox input for accessibility
|
|
2620
|
+
* Maintains keyboard navigation and screen reader support
|
|
2621
|
+
*/
|
|
2622
|
+
var HiddenCheckboxInput = styled.input.withConfig({
|
|
2623
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2624
|
+
return !prop.startsWith('$');
|
|
2625
|
+
},
|
|
2626
|
+
displayName: "SelectableInputBase__HiddenCheckboxInput",
|
|
2627
|
+
componentId: "sc-1ddpctx-0"
|
|
2628
|
+
})(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"], ["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"
|
|
2629
|
+
/**
|
|
2630
|
+
* Custom checkbox visual component
|
|
2631
|
+
* 24px × 24px for 8px grid alignment
|
|
2632
|
+
* Uses component.input.* tokens for consistency with TextField
|
|
2633
|
+
*/])));
|
|
2634
|
+
/**
|
|
2635
|
+
* Custom checkbox visual component
|
|
2636
|
+
* 24px × 24px for 8px grid alignment
|
|
2637
|
+
* Uses component.input.* tokens for consistency with TextField
|
|
2638
|
+
*/
|
|
2639
|
+
var StyledCheckbox = styled.span.withConfig({
|
|
2640
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2641
|
+
return !prop.startsWith('$');
|
|
2642
|
+
},
|
|
2643
|
+
displayName: "SelectableInputBase__StyledCheckbox",
|
|
2644
|
+
componentId: "sc-1ddpctx-1"
|
|
2645
|
+
})(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n min-width: 24px;\n min-height: 24px;\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: all 150ms ease-out;\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 7px;\n top: 3px;\n width: 6px;\n height: 11px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 10px;\n width: 14px;\n height: 2px;\n background-color: ", ";\n }\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n min-width: 24px;\n min-height: 24px;\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: all 150ms ease-out;\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 7px;\n top: 3px;\n width: 6px;\n height: 11px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 10px;\n width: 14px;\n height: 2px;\n background-color: ", ";\n }\n"
|
|
2646
|
+
/**
|
|
2647
|
+
* Container for checkbox with proper spacing and alignment
|
|
2648
|
+
* 48px min-height for touch target (8px grid aligned)
|
|
2649
|
+
*/])), tokensData.component.input["default"].borderRadius, tokensData.component.input["default"].borderWidth, function (props) {
|
|
2650
|
+
return props.$checked || props.$indeterminate ? tokensData.semantic.color.background.interactive : tokensData.component.input["default"].backgroundColor;
|
|
2651
|
+
}, function (props) {
|
|
2652
|
+
if (props.$state === 'error') return tokensData.component.input.error.borderColor;
|
|
2653
|
+
if (props.$checked || props.$indeterminate) return tokensData.semantic.color.background.interactive;
|
|
2654
|
+
return tokensData.component.input["default"].borderColor;
|
|
2655
|
+
}, function (props) {
|
|
2656
|
+
return props.$state === 'disabled' ? 'not-allowed' : 'pointer';
|
|
2657
|
+
}, HiddenCheckboxInput, function (props) {
|
|
2658
|
+
return props.$state === 'error' ? tokensData.component.input.error.hover.borderColor : props.$checked || props.$indeterminate ? tokensData.semantic.color.background.interactive : tokensData.component.input.hover.borderColor;
|
|
2659
|
+
}, HiddenCheckboxInput, tokensData.component.input.focus.outline, tokensData.component.input.focus.outlineOffset, function (props) {
|
|
2660
|
+
return props.$state === 'error' ? tokensData.component.input.error.focus.borderColor : tokensData.component.input.focus.borderColor;
|
|
2661
|
+
}, function (props) {
|
|
2662
|
+
return props.$state === 'disabled' && "\n background-color: ".concat(tokensData.component.input.disabled.backgroundColor, ";\n border-color: ").concat(tokensData.component.input.disabled.borderColor, ";\n opacity: 0.6;\n ");
|
|
2663
|
+
}, function (props) {
|
|
2664
|
+
return props.$checked ? 'block' : 'none';
|
|
2665
|
+
}, tokensData.semantic.color.text.inverse, function (props) {
|
|
2666
|
+
return props.$indeterminate ? 'block' : 'none';
|
|
2667
|
+
}, tokensData.semantic.color.text.inverse);
|
|
2668
|
+
/**
|
|
2669
|
+
* Container for checkbox with proper spacing and alignment
|
|
2670
|
+
* 48px min-height for touch target (8px grid aligned)
|
|
2671
|
+
*/
|
|
2672
|
+
var StyledCheckboxContainer = styled.label.withConfig({
|
|
2673
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2674
|
+
return !prop.startsWith('$');
|
|
2675
|
+
},
|
|
2676
|
+
displayName: "SelectableInputBase__StyledCheckboxContainer",
|
|
2677
|
+
componentId: "sc-1ddpctx-2"
|
|
2678
|
+
})(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: 48px;\n flex-direction: ", ";\n user-select: none;\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: 48px;\n flex-direction: ", ";\n user-select: none;\n"
|
|
2679
|
+
/**
|
|
2680
|
+
* Label text with proper typography
|
|
2681
|
+
*/])), tokensData.base.spacing[3], function (props) {
|
|
2682
|
+
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
2683
|
+
}, function (props) {
|
|
2684
|
+
return props.$labelPosition === 'left' ? 'row-reverse' : 'row';
|
|
2685
|
+
});
|
|
2686
|
+
/**
|
|
2687
|
+
* Label text with proper typography
|
|
2688
|
+
*/
|
|
2689
|
+
var StyledCheckboxLabel = styled.span.withConfig({
|
|
2690
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2691
|
+
return !prop.startsWith('$');
|
|
2692
|
+
},
|
|
2693
|
+
displayName: "SelectableInputBase__StyledCheckboxLabel",
|
|
2694
|
+
componentId: "sc-1ddpctx-3"
|
|
2695
|
+
})(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), tokensData.component.input["default"].font, function (props) {
|
|
2696
|
+
return props.$disabled ? tokensData.component.input.disabled.textColor : tokensData.component.input["default"].textColor;
|
|
2697
|
+
});
|
|
2698
|
+
var templateObject_1$9, templateObject_2$7, templateObject_3$5, templateObject_4$4;
|
|
2699
|
+
|
|
2700
|
+
React.createElement;
|
|
2701
|
+
var StyledFieldContainer$1 = styled.div.withConfig({
|
|
2702
|
+
displayName: "Checkbox__StyledFieldContainer",
|
|
2703
|
+
componentId: "sc-vquz3v-0"
|
|
2704
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"], ["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"])), tokensData.base.spacing[1]);
|
|
2705
|
+
var StyledHelperText$1 = styled.span.withConfig({
|
|
2706
|
+
displayName: "Checkbox__StyledHelperText",
|
|
2707
|
+
componentId: "sc-vquz3v-1"
|
|
2708
|
+
})(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"], ["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"
|
|
2709
|
+
/**
|
|
2710
|
+
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
2711
|
+
*
|
|
2712
|
+
* Features:
|
|
2713
|
+
* - Custom styled checkbox with clear visual states
|
|
2714
|
+
* - Integrated label with configurable positioning
|
|
2715
|
+
* - Helper text and error messaging
|
|
2716
|
+
* - Indeterminate state support
|
|
2717
|
+
* - Full keyboard navigation (Space to toggle)
|
|
2718
|
+
* - ARIA attributes for screen readers
|
|
2719
|
+
* - 8px grid aligned (48px touch target)
|
|
2720
|
+
*
|
|
2721
|
+
* @example
|
|
2722
|
+
* ```tsx
|
|
2723
|
+
* <Checkbox
|
|
2724
|
+
* label="Accept terms and conditions"
|
|
2725
|
+
* checked={accepted}
|
|
2726
|
+
* onChange={(e) => setAccepted(e.target.checked)}
|
|
2727
|
+
* required
|
|
2728
|
+
* />
|
|
2729
|
+
* ```
|
|
2730
|
+
*/])), tokensData.semantic.typography.small, function (props) {
|
|
2731
|
+
return props.$error ? tokensData.semantic.color.text.error : tokensData.semantic.color.text.subdued;
|
|
2732
|
+
}, tokensData.base.spacing[9]);
|
|
2733
|
+
/**
|
|
2734
|
+
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
2735
|
+
*
|
|
2736
|
+
* Features:
|
|
2737
|
+
* - Custom styled checkbox with clear visual states
|
|
2738
|
+
* - Integrated label with configurable positioning
|
|
2739
|
+
* - Helper text and error messaging
|
|
2740
|
+
* - Indeterminate state support
|
|
2741
|
+
* - Full keyboard navigation (Space to toggle)
|
|
2742
|
+
* - ARIA attributes for screen readers
|
|
2743
|
+
* - 8px grid aligned (48px touch target)
|
|
2744
|
+
*
|
|
2745
|
+
* @example
|
|
2746
|
+
* ```tsx
|
|
2747
|
+
* <Checkbox
|
|
2748
|
+
* label="Accept terms and conditions"
|
|
2749
|
+
* checked={accepted}
|
|
2750
|
+
* onChange={(e) => setAccepted(e.target.checked)}
|
|
2751
|
+
* required
|
|
2752
|
+
* />
|
|
2753
|
+
* ```
|
|
2754
|
+
*/
|
|
2755
|
+
var Checkbox = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
2756
|
+
var label = _a.label,
|
|
2757
|
+
_b = _a.checked,
|
|
2758
|
+
checked = _b === void 0 ? false : _b,
|
|
2759
|
+
_c = _a.indeterminate,
|
|
2760
|
+
indeterminate = _c === void 0 ? false : _c,
|
|
2761
|
+
_d = _a.labelPosition,
|
|
2762
|
+
labelPosition = _d === void 0 ? 'right' : _d,
|
|
2763
|
+
helperText = _a.helperText,
|
|
2764
|
+
error = _a.error,
|
|
2765
|
+
_e = _a.disabled,
|
|
2766
|
+
disabled = _e === void 0 ? false : _e,
|
|
2767
|
+
onChange = _a.onChange,
|
|
2768
|
+
providedId = _a.id,
|
|
2769
|
+
ariaDescribedby = _a["aria-describedby"],
|
|
2770
|
+
rest = __rest(_a, ["label", "checked", "indeterminate", "labelPosition", "helperText", "error", "disabled", "onChange", "id", 'aria-describedby']);
|
|
2771
|
+
var generatedId = React.useId();
|
|
2772
|
+
var id = providedId || generatedId;
|
|
2773
|
+
var helperTextId = "".concat(id, "-helper-text");
|
|
2774
|
+
var errorId = "".concat(id, "-error");
|
|
2775
|
+
// Determine the state for styling
|
|
2776
|
+
var state = disabled ? 'disabled' : error ? 'error' : 'default';
|
|
2777
|
+
// Set up ARIA describedby
|
|
2778
|
+
var describedBy = [ariaDescribedby, helperText ? helperTextId : undefined, error ? errorId : undefined].filter(Boolean).join(' ');
|
|
2779
|
+
// Update indeterminate property on the input element
|
|
2780
|
+
var inputRef = React.useRef(null);
|
|
2781
|
+
React.useImperativeHandle(ref, function () {
|
|
2782
|
+
return inputRef.current;
|
|
2783
|
+
});
|
|
2784
|
+
React.useEffect(function () {
|
|
2785
|
+
if (inputRef.current) {
|
|
2786
|
+
inputRef.current.indeterminate = indeterminate;
|
|
2787
|
+
}
|
|
2788
|
+
}, [indeterminate]);
|
|
2789
|
+
return /*#__PURE__*/React.createElement(StyledFieldContainer$1, null, /*#__PURE__*/React.createElement(StyledCheckboxContainer, {
|
|
2790
|
+
$disabled: disabled,
|
|
2791
|
+
$labelPosition: labelPosition
|
|
2792
|
+
}, /*#__PURE__*/React.createElement(HiddenCheckboxInput, _extends({
|
|
2793
|
+
ref: inputRef,
|
|
2794
|
+
type: "checkbox",
|
|
2795
|
+
id: id,
|
|
2796
|
+
checked: checked,
|
|
2797
|
+
disabled: disabled,
|
|
2798
|
+
onChange: onChange,
|
|
2799
|
+
"aria-describedby": describedBy || undefined,
|
|
2800
|
+
"aria-invalid": error ? true : undefined,
|
|
2801
|
+
$state: state,
|
|
2802
|
+
$checked: checked,
|
|
2803
|
+
$indeterminate: indeterminate
|
|
2804
|
+
}, rest)), /*#__PURE__*/React.createElement(StyledCheckbox, {
|
|
2805
|
+
$state: state,
|
|
2806
|
+
$checked: checked,
|
|
2807
|
+
$indeterminate: indeterminate,
|
|
2808
|
+
"aria-hidden": "true"
|
|
2809
|
+
}), /*#__PURE__*/React.createElement(StyledCheckboxLabel, {
|
|
2810
|
+
$disabled: disabled
|
|
2811
|
+
}, label)), helperText && !error && /*#__PURE__*/React.createElement(StyledHelperText$1, {
|
|
2812
|
+
id: helperTextId
|
|
2813
|
+
}, helperText), error && /*#__PURE__*/React.createElement(StyledHelperText$1, {
|
|
2814
|
+
id: errorId,
|
|
2815
|
+
$error: true,
|
|
2816
|
+
role: "alert",
|
|
2817
|
+
"aria-live": "polite"
|
|
2818
|
+
}, error));
|
|
2819
|
+
});
|
|
2820
|
+
Checkbox.displayName = 'Checkbox';
|
|
2821
|
+
var templateObject_1$8, templateObject_2$6;
|
|
2617
2822
|
|
|
2618
2823
|
React.createElement;
|
|
2619
2824
|
var ChipGroupWrapper = styled.div.withConfig({
|
|
@@ -3398,6 +3603,7 @@ exports.Breadcrumbs = Breadcrumbs;
|
|
|
3398
3603
|
exports.Button = Button;
|
|
3399
3604
|
exports.CardLarge = CardLarge;
|
|
3400
3605
|
exports.CardSmall = CardSmall;
|
|
3606
|
+
exports.Checkbox = Checkbox;
|
|
3401
3607
|
exports.Chip = Chip;
|
|
3402
3608
|
exports.ChipGroup = ChipGroup;
|
|
3403
3609
|
exports.CodeBlock = CodeBlock;
|