@common-origin/design-system 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +182 -178
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +182 -178
- package/dist/index.js.map +1 -1
- package/dist/types/icons.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/atoms/SectionSeparator/SectionSeparator.d.ts +0 -26
- package/dist/components/atoms/SectionSeparator/index.d.ts +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -831,13 +831,144 @@ var Avatar = function Avatar(_a) {
|
|
|
831
831
|
var templateObject_1$m, templateObject_2$b, templateObject_3$9;
|
|
832
832
|
|
|
833
833
|
React.createElement;
|
|
834
|
-
var _a$
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
834
|
+
var _a$5 = tokens.semantic,
|
|
835
|
+
typography$2 = _a$5.typography,
|
|
836
|
+
color$4 = _a$5.color;
|
|
837
|
+
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
838
|
+
var styles = {
|
|
839
|
+
display: "font: ".concat(typography$2.display, "; letter-spacing: ").concat(tokens.base.letterSpacing[0], ";"),
|
|
840
|
+
h1: "font: ".concat(typography$2.h1, "; letter-spacing: ").concat(tokens.base.letterSpacing[0], ";"),
|
|
841
|
+
h2: "font: ".concat(typography$2.h2, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
842
|
+
h3: "font: ".concat(typography$2.h3, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
843
|
+
h4: "font: ".concat(typography$2.h4, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
844
|
+
h5: "font: ".concat(typography$2.h5, "; letter-spacing: ").concat(tokens.base.letterSpacing[2], ";"),
|
|
845
|
+
h6: "font: ".concat(typography$2.h6, "; letter-spacing: ").concat(tokens.base.letterSpacing[2], ";"),
|
|
846
|
+
subtitle: "font: ".concat(typography$2.subtitle, ";"),
|
|
847
|
+
body: "font: ".concat(typography$2.body, ";"),
|
|
848
|
+
small: "font: ".concat(typography$2.small, ";"),
|
|
849
|
+
overline: "font: ".concat(typography$2.overline, ";"),
|
|
850
|
+
caption: "font: ".concat(typography$2.caption, "; text-transform: uppercase;"),
|
|
851
|
+
button1: "font: ".concat(typography$2.button1, ";"),
|
|
852
|
+
button2: "font: ".concat(typography$2.button2, ";"),
|
|
853
|
+
button3: "font: ".concat(typography$2.button3, ";"),
|
|
854
|
+
label: "font: ".concat(typography$2.label, ";")
|
|
855
|
+
};
|
|
856
|
+
return styles[variant] || styles.body;
|
|
857
|
+
};
|
|
858
|
+
var getTextColor = function getTextColor(colorVariant) {
|
|
859
|
+
var colorMap = {
|
|
860
|
+
"default": color$4.text["default"],
|
|
861
|
+
emphasis: color$4.text.emphasis,
|
|
862
|
+
subdued: color$4.text.subdued,
|
|
863
|
+
inverse: color$4.text.inverse,
|
|
864
|
+
disabled: color$4.text.disabled,
|
|
865
|
+
interactive: color$4.text.interactive,
|
|
866
|
+
error: color$4.text.error,
|
|
867
|
+
success: color$4.text.success,
|
|
868
|
+
warning: color$4.text.warning
|
|
869
|
+
};
|
|
870
|
+
return colorMap[colorVariant] || colorMap["default"];
|
|
871
|
+
};
|
|
872
|
+
var getDefaultElement = function getDefaultElement(variant) {
|
|
873
|
+
var elementMap = {
|
|
874
|
+
display: 'h1',
|
|
875
|
+
h1: 'h1',
|
|
876
|
+
h2: 'h2',
|
|
877
|
+
h3: 'h3',
|
|
878
|
+
h4: 'h4',
|
|
879
|
+
h5: 'h5',
|
|
880
|
+
h6: 'h6',
|
|
881
|
+
subtitle: 'p',
|
|
882
|
+
body: 'p',
|
|
883
|
+
small: 'span',
|
|
884
|
+
overline: 'span',
|
|
885
|
+
caption: 'span',
|
|
886
|
+
button1: 'span',
|
|
887
|
+
button2: 'span',
|
|
888
|
+
button3: 'span',
|
|
889
|
+
label: 'span'
|
|
890
|
+
};
|
|
891
|
+
return elementMap[variant] || 'span';
|
|
892
|
+
};
|
|
893
|
+
var StyledTypography = styled.span.withConfig({
|
|
894
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
895
|
+
return !prop.startsWith('$');
|
|
896
|
+
},
|
|
897
|
+
displayName: "Typography__StyledTypography",
|
|
898
|
+
componentId: "sc-17mqo4k-0"
|
|
899
|
+
})(templateObject_1$l || (templateObject_1$l = __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"
|
|
900
|
+
/**
|
|
901
|
+
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
902
|
+
*
|
|
903
|
+
* Features:
|
|
904
|
+
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
905
|
+
* - Color variants for different contexts
|
|
906
|
+
* - Automatic semantic HTML element selection
|
|
907
|
+
* - Manual element override support
|
|
908
|
+
* - Direct semantic token usage (no component tokens needed)
|
|
909
|
+
* - Full accessibility support
|
|
910
|
+
*
|
|
911
|
+
* @example
|
|
912
|
+
* ```tsx
|
|
913
|
+
* <Typography variant="h1">Main Heading</Typography>
|
|
914
|
+
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
915
|
+
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
916
|
+
* ```
|
|
917
|
+
*/])), function (_a) {
|
|
918
|
+
var $variant = _a.$variant;
|
|
919
|
+
return getTypographyStyles($variant);
|
|
920
|
+
}, function (_a) {
|
|
921
|
+
var $color = _a.$color;
|
|
922
|
+
return getTextColor($color);
|
|
923
|
+
}, function (_a) {
|
|
924
|
+
var $variant = _a.$variant;
|
|
925
|
+
if (['body', 'subtitle', 'small'].includes($variant)) {
|
|
926
|
+
return 'line-height: 1.5;';
|
|
927
|
+
}
|
|
928
|
+
return '';
|
|
929
|
+
});
|
|
930
|
+
/**
|
|
931
|
+
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
932
|
+
*
|
|
933
|
+
* Features:
|
|
934
|
+
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
935
|
+
* - Color variants for different contexts
|
|
936
|
+
* - Automatic semantic HTML element selection
|
|
937
|
+
* - Manual element override support
|
|
938
|
+
* - Direct semantic token usage (no component tokens needed)
|
|
939
|
+
* - Full accessibility support
|
|
940
|
+
*
|
|
941
|
+
* @example
|
|
942
|
+
* ```tsx
|
|
943
|
+
* <Typography variant="h1">Main Heading</Typography>
|
|
944
|
+
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
945
|
+
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
946
|
+
* ```
|
|
947
|
+
*/
|
|
948
|
+
var Typography = function Typography(_a) {
|
|
949
|
+
var _b = _a.variant,
|
|
950
|
+
variant = _b === void 0 ? 'body' : _b,
|
|
951
|
+
children = _a.children,
|
|
952
|
+
_c = _a.color,
|
|
953
|
+
color = _c === void 0 ? 'default' : _c,
|
|
954
|
+
as = _a.as,
|
|
955
|
+
dataTestId = _a["data-testid"];
|
|
956
|
+
// $variant and $color are only used for styled-components prop filtering
|
|
957
|
+
var defaultElement = getDefaultElement(variant);
|
|
958
|
+
var elementType = as || defaultElement;
|
|
959
|
+
return /*#__PURE__*/React.createElement(StyledTypography, {
|
|
960
|
+
as: elementType,
|
|
961
|
+
$variant: variant,
|
|
962
|
+
$color: color,
|
|
963
|
+
"data-testid": dataTestId
|
|
964
|
+
}, children);
|
|
965
|
+
};
|
|
966
|
+
var templateObject_1$l;
|
|
967
|
+
|
|
968
|
+
React.createElement;
|
|
969
|
+
var color$3 = tokens.semantic.color;
|
|
970
|
+
tokens.base.shadow;
|
|
971
|
+
var scaleIn = keyframes(templateObject_1$k || (templateObject_1$k = __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"])));
|
|
841
972
|
var BadgeWrapper = styled.span.withConfig({
|
|
842
973
|
displayName: "Badge__BadgeWrapper",
|
|
843
974
|
componentId: "sc-tjz4pp-0"
|
|
@@ -848,26 +979,26 @@ var BadgeIndicator = styled.span.withConfig({
|
|
|
848
979
|
},
|
|
849
980
|
displayName: "Badge__BadgeIndicator",
|
|
850
981
|
componentId: "sc-tjz4pp-1"
|
|
851
|
-
})(templateObject_3$8 || (templateObject_3$8 = __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
|
|
982
|
+
})(templateObject_3$8 || (templateObject_3$8 = __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) {
|
|
852
983
|
return props.$isVisible ? 'flex' : 'none';
|
|
853
984
|
}, function (props) {
|
|
854
|
-
return props.$isDot ? '8px' : '
|
|
985
|
+
return props.$isDot ? '8px' : '16px';
|
|
855
986
|
}, function (props) {
|
|
856
|
-
return props.$isDot ? '8px' : '
|
|
987
|
+
return props.$isDot ? '8px' : '16px';
|
|
857
988
|
}, function (props) {
|
|
858
|
-
return props.$isDot ? '0' : '0
|
|
859
|
-
}, tokens.base.border.radius.circle,
|
|
989
|
+
return props.$isDot ? '0' : '0 4px';
|
|
990
|
+
}, tokens.base.border.radius.circle, color$3.background["default"], scaleIn, function (props) {
|
|
860
991
|
switch (props.$variant) {
|
|
861
992
|
case 'primary':
|
|
862
|
-
return "\n background-color: ".concat(color$
|
|
993
|
+
return "\n background-color: ".concat(color$3.background.interactive, ";\n color: ").concat(color$3.text.inverse, ";\n ");
|
|
863
994
|
case 'error':
|
|
864
|
-
return "\n background-color: ".concat(color$
|
|
995
|
+
return "\n background-color: ".concat(color$3.background.error, ";\n color: ").concat(color$3.text.inverse, ";\n ");
|
|
865
996
|
case 'warning':
|
|
866
|
-
return "\n background-color: ".concat(color$
|
|
997
|
+
return "\n background-color: ".concat(color$3.background.warning, ";\n color: ").concat(color$3.text.inverse, ";\n ");
|
|
867
998
|
case 'success':
|
|
868
|
-
return "\n background-color: ".concat(color$
|
|
999
|
+
return "\n background-color: ".concat(color$3.background.success, ";\n color: ").concat(color$3.text.inverse, ";\n ");
|
|
869
1000
|
default:
|
|
870
|
-
return "\n background-color: ".concat(color$
|
|
1001
|
+
return "\n background-color: ".concat(color$3.background.emphasis, ";\n color: ").concat(color$3.text.inverse, ";\n ");
|
|
871
1002
|
}
|
|
872
1003
|
});
|
|
873
1004
|
var ScreenReaderOnly = styled.span.withConfig({
|
|
@@ -899,9 +1030,12 @@ var Badge = function Badge(_a) {
|
|
|
899
1030
|
$isVisible: isVisible,
|
|
900
1031
|
role: "status",
|
|
901
1032
|
"aria-live": "polite"
|
|
902
|
-
}, !dot &&
|
|
1033
|
+
}, !dot && /*#__PURE__*/React.createElement(Typography, {
|
|
1034
|
+
variant: "caption",
|
|
1035
|
+
color: "inverse"
|
|
1036
|
+
}, displayCount), /*#__PURE__*/React.createElement(ScreenReaderOnly, null, label)));
|
|
903
1037
|
};
|
|
904
|
-
var templateObject_1$
|
|
1038
|
+
var templateObject_1$k, templateObject_2$a, templateObject_3$8, templateObject_4$6;
|
|
905
1039
|
|
|
906
1040
|
React.createElement;
|
|
907
1041
|
var StyledBox = styled.div.withConfig({
|
|
@@ -913,7 +1047,7 @@ var StyledBox = styled.div.withConfig({
|
|
|
913
1047
|
})(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"
|
|
914
1048
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
915
1049
|
])), function (props) {
|
|
916
|
-
return props.$display && css(templateObject_1$
|
|
1050
|
+
return props.$display && css(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
917
1051
|
}, function (props) {
|
|
918
1052
|
return props.$flexDirection && css(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
919
1053
|
}, function (props) {
|
|
@@ -1103,7 +1237,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
1103
1237
|
}, rest), children);
|
|
1104
1238
|
};
|
|
1105
1239
|
var Box = BoxTransform;
|
|
1106
|
-
var templateObject_1$
|
|
1240
|
+
var templateObject_1$j, templateObject_2$9, templateObject_3$7, templateObject_4$5, 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;
|
|
1107
1241
|
|
|
1108
1242
|
var add = {
|
|
1109
1243
|
path: "M13 11H19V13H13V19H11V13H5V11H11V5H13V11Z",
|
|
@@ -1145,6 +1279,10 @@ var directionRight = {
|
|
|
1145
1279
|
path: "M20 12L20.7071 11.2929L21.4142 12L20.7071 12.7071L20 12ZM5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11V13ZM14 6L14.7071 5.29289L20.7071 11.2929L20 12L19.2929 12.7071L13.2929 6.70711L14 6ZM20 12L20.7071 12.7071L14.7071 18.7071L14 18L13.2929 17.2929L19.2929 11.2929L20 12ZM20 12V13H5V12V11H20V12Z",
|
|
1146
1280
|
name: "directionRight"
|
|
1147
1281
|
};
|
|
1282
|
+
var filter = {
|
|
1283
|
+
path: "M20 7C20.5523 7 21 7.44771 21 8C21 8.55228 20.5523 9 20 9H11C10.4477 9 10 8.55228 10 8C10 7.44772 10.4477 7 11 7L20 7Z M14 15C14.5523 15 15 15.4477 15 16C15 16.5523 14.5523 17 14 17L4 17C3.44772 17 3 16.5523 3 16C3 15.4477 3.44772 15 4 15L14 15Z M7 10C8.10457 10 9 9.10457 9 8C9 6.89543 8.10457 6 7 6C5.89543 6 5 6.89543 5 8C5 9.10457 5.89543 10 7 10ZM7 12C4.79086 12 3 10.2091 3 8C3 5.79086 4.79086 4 7 4C9.20914 4 11 5.79086 11 8C11 10.2091 9.20914 12 7 12Z M17 18C18.1046 18 19 17.1046 19 16C19 14.8954 18.1046 14 17 14C15.8954 14 15 14.8954 15 16C15 17.1046 15.8954 18 17 18ZM17 20C14.7909 20 13 18.2091 13 16C13 13.7909 14.7909 12 17 12C19.2091 12 21 13.7909 21 16C21 18.2091 19.2091 20 17 20Z",
|
|
1284
|
+
name: "filter"
|
|
1285
|
+
};
|
|
1148
1286
|
var menu = {
|
|
1149
1287
|
path: "M4 7a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Zm0 5a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Zm0 5a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z",
|
|
1150
1288
|
name: "menu"
|
|
@@ -1200,6 +1338,7 @@ var iconsData = {
|
|
|
1200
1338
|
path: "M7.70703 10.707L11 7.41406L11 14C11 14.5523 11.4477 15 12 15C12.5523 15 13 14.5523 13 14V7.41406L16.293 10.707L17.707 9.29297L12 3.58594L6.29297 9.29297L7.70703 10.707Z M4 17V16H6V17C6 17.5523 6.44772 18 7 18H17C17.5523 18 18 17.5523 18 17V16H20V17C20 18.6051 18.7394 19.9158 17.1543 19.9961L17 20H7C5.34315 20 4 18.6569 4 17Z",
|
|
1201
1339
|
name: "export"
|
|
1202
1340
|
},
|
|
1341
|
+
filter: filter,
|
|
1203
1342
|
menu: menu,
|
|
1204
1343
|
pause: pause,
|
|
1205
1344
|
play: play,
|
|
@@ -1219,7 +1358,7 @@ var IconStyled = styled.span.withConfig({
|
|
|
1219
1358
|
},
|
|
1220
1359
|
displayName: "Icon__IconStyled",
|
|
1221
1360
|
componentId: "sc-1105czq-0"
|
|
1222
|
-
})(templateObject_1$
|
|
1361
|
+
})(templateObject_1$i || (templateObject_1$i = __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) {
|
|
1223
1362
|
var $size = _a.$size;
|
|
1224
1363
|
return tokens.semantic.size.icon[$size];
|
|
1225
1364
|
}, function (_a) {
|
|
@@ -1283,7 +1422,7 @@ var Icon = function Icon(_a) {
|
|
|
1283
1422
|
d: iconData.path
|
|
1284
1423
|
})));
|
|
1285
1424
|
};
|
|
1286
|
-
var templateObject_1$
|
|
1425
|
+
var templateObject_1$i;
|
|
1287
1426
|
|
|
1288
1427
|
React.createElement;
|
|
1289
1428
|
var button = tokens.component.button,
|
|
@@ -1315,7 +1454,7 @@ var StyledButton = styled.button.withConfig({
|
|
|
1315
1454
|
},
|
|
1316
1455
|
displayName: "Button__StyledButton",
|
|
1317
1456
|
componentId: "sc-1eiuum9-0"
|
|
1318
|
-
})(templateObject_1$
|
|
1457
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles);
|
|
1319
1458
|
var StyledLink = styled.a.withConfig({
|
|
1320
1459
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1321
1460
|
return !prop.startsWith('$');
|
|
@@ -1415,7 +1554,7 @@ var Button = function Button(_a) {
|
|
|
1415
1554
|
"data-testid": dataTestId
|
|
1416
1555
|
}, buttonProps), renderButtonContent(children, iconName, size));
|
|
1417
1556
|
};
|
|
1418
|
-
var templateObject_1$
|
|
1557
|
+
var templateObject_1$h, templateObject_2$8;
|
|
1419
1558
|
|
|
1420
1559
|
var chip = tokens.component.chip;
|
|
1421
1560
|
// Helper function to get variant styles as objects for CSS custom properties
|
|
@@ -1476,7 +1615,7 @@ var BaseChipStyled = styled.span.withConfig({
|
|
|
1476
1615
|
},
|
|
1477
1616
|
displayName: "ChipBase__BaseChipStyled",
|
|
1478
1617
|
componentId: "sc-moa6zc-0"
|
|
1479
|
-
})(templateObject_1$
|
|
1618
|
+
})(templateObject_1$g || (templateObject_1$g = __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"
|
|
1480
1619
|
// Icon container for selected indicator or leading icons
|
|
1481
1620
|
])), tokens.semantic.motion.interactive, chip.variants.interactive.backgroundColor);
|
|
1482
1621
|
// Icon container for selected indicator or leading icons
|
|
@@ -1528,7 +1667,7 @@ var StyledChipWrapper = function StyledChipWrapper(_a) {
|
|
|
1528
1667
|
style: __assign(__assign({}, cssProps), style)
|
|
1529
1668
|
}, htmlProps), children);
|
|
1530
1669
|
};
|
|
1531
|
-
var templateObject_1$
|
|
1670
|
+
var templateObject_1$g, templateObject_2$7, templateObject_3$6;
|
|
1532
1671
|
|
|
1533
1672
|
React.createElement;
|
|
1534
1673
|
/**
|
|
@@ -1772,20 +1911,20 @@ var spacing$3 = tokens.semantic.spacing;
|
|
|
1772
1911
|
var StyledContainer = styled.div.withConfig({
|
|
1773
1912
|
displayName: "Container__StyledContainer",
|
|
1774
1913
|
componentId: "sc-17dbj6n-0"
|
|
1775
|
-
})(templateObject_1$
|
|
1914
|
+
})(templateObject_1$f || (templateObject_1$f = __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']);
|
|
1776
1915
|
var Container = function Container(_a) {
|
|
1777
1916
|
var children = _a.children,
|
|
1778
1917
|
props = __rest(_a, ["children"]);
|
|
1779
1918
|
return /*#__PURE__*/React.createElement(StyledContainer, props, children);
|
|
1780
1919
|
};
|
|
1781
|
-
var templateObject_1$
|
|
1920
|
+
var templateObject_1$f;
|
|
1782
1921
|
|
|
1783
1922
|
React.createElement;
|
|
1784
1923
|
var base = tokens.base;
|
|
1785
1924
|
var PictureWrapper = styled.div.withConfig({
|
|
1786
1925
|
displayName: "Picture__PictureWrapper",
|
|
1787
1926
|
componentId: "sc-11d9tei-0"
|
|
1788
|
-
})(templateObject_1$
|
|
1927
|
+
})(templateObject_1$e || (templateObject_1$e = __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);
|
|
1789
1928
|
var ImageLink = styled.a.withConfig({
|
|
1790
1929
|
displayName: "Picture__ImageLink",
|
|
1791
1930
|
componentId: "sc-11d9tei-1"
|
|
@@ -1824,16 +1963,16 @@ var Picture = function Picture(_a) {
|
|
|
1824
1963
|
"aria-label": "Read more about ".concat(title)
|
|
1825
1964
|
}, image) : image);
|
|
1826
1965
|
};
|
|
1827
|
-
var templateObject_1$
|
|
1966
|
+
var templateObject_1$e, templateObject_2$6, templateObject_3$5, templateObject_4$4;
|
|
1828
1967
|
|
|
1829
1968
|
React.createElement;
|
|
1830
|
-
var _a$
|
|
1831
|
-
typography$
|
|
1832
|
-
color$
|
|
1969
|
+
var _a$4 = tokens.semantic,
|
|
1970
|
+
typography$1 = _a$4.typography,
|
|
1971
|
+
color$2 = _a$4.color;
|
|
1833
1972
|
var TimeStyled = styled.time.withConfig({
|
|
1834
1973
|
displayName: "DateFormatter__TimeStyled",
|
|
1835
1974
|
componentId: "sc-5464cc-0"
|
|
1836
|
-
})(templateObject_1$
|
|
1975
|
+
})(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography$1.label, color$2.text.subdued);
|
|
1837
1976
|
var DateFormatter = function DateFormatter(_a) {
|
|
1838
1977
|
var dateString = _a.dateString,
|
|
1839
1978
|
_b = _a.formatString,
|
|
@@ -1845,7 +1984,7 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1845
1984
|
"data-testid": dataTestId
|
|
1846
1985
|
}, format(date, formatString));
|
|
1847
1986
|
};
|
|
1848
|
-
var templateObject_1$
|
|
1987
|
+
var templateObject_1$d;
|
|
1849
1988
|
|
|
1850
1989
|
React.createElement;
|
|
1851
1990
|
var motion = tokens.semantic.motion,
|
|
@@ -1856,7 +1995,7 @@ var IconButtonStyled = styled.button.withConfig({
|
|
|
1856
1995
|
},
|
|
1857
1996
|
displayName: "IconButton__IconButtonStyled",
|
|
1858
1997
|
componentId: "sc-k8b14t-0"
|
|
1859
|
-
})(templateObject_1$
|
|
1998
|
+
})(templateObject_1$c || (templateObject_1$c = __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) {
|
|
1860
1999
|
var $variant = _a.$variant;
|
|
1861
2000
|
switch ($variant) {
|
|
1862
2001
|
case 'primary':
|
|
@@ -1967,7 +2106,7 @@ var IconButton = function IconButton(_a) {
|
|
|
1967
2106
|
"aria-hidden": "true" // Hide icon from screen readers since button has aria-label
|
|
1968
2107
|
}));
|
|
1969
2108
|
};
|
|
1970
|
-
var templateObject_1$
|
|
2109
|
+
var templateObject_1$c;
|
|
1971
2110
|
|
|
1972
2111
|
React.createElement;
|
|
1973
2112
|
var ProgressBarContainer = styled.div.withConfig({
|
|
@@ -1977,7 +2116,7 @@ var ProgressBarContainer = styled.div.withConfig({
|
|
|
1977
2116
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
1978
2117
|
componentId: "sc-1nco33q-0"
|
|
1979
2118
|
})(templateObject_3$4 || (templateObject_3$4 = __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"])), tokens.semantic.color.background.disabled, tokens.base.border.radius[1], function (props) {
|
|
1980
|
-
return props.$variant === 'horizontal' && css(templateObject_1$
|
|
2119
|
+
return props.$variant === 'horizontal' && css(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n width: 100%;\n height: ", ";\n "], ["\n width: 100%;\n height: ", ";\n "])), props.$height ? tokens.component.progressBar.sizes[props.$height].height : tokens.component.progressBar.sizes.md.height);
|
|
1981
2120
|
}, function (props) {
|
|
1982
2121
|
return props.$variant === 'vertical' && css(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n "], ["\n width: ", ";\n height: 100%;\n "])), props.$width ? tokens.component.progressBar.sizes[props.$width].height : tokens.component.progressBar.sizes.md.height);
|
|
1983
2122
|
});
|
|
@@ -2031,7 +2170,7 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
2031
2170
|
$color: color
|
|
2032
2171
|
}));
|
|
2033
2172
|
};
|
|
2034
|
-
var templateObject_1$
|
|
2173
|
+
var templateObject_1$b, templateObject_2$5, templateObject_3$4, templateObject_4$3, templateObject_5$3, templateObject_6$1, templateObject_7$1;
|
|
2035
2174
|
|
|
2036
2175
|
React.createElement;
|
|
2037
2176
|
var StyledDivider = styled.div.withConfig({
|
|
@@ -2040,7 +2179,7 @@ var StyledDivider = styled.div.withConfig({
|
|
|
2040
2179
|
},
|
|
2041
2180
|
displayName: "Divider__StyledDivider",
|
|
2042
2181
|
componentId: "sc-1l0c8ja-0"
|
|
2043
|
-
})(templateObject_1$
|
|
2182
|
+
})(templateObject_1$a || (templateObject_1$a = __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"
|
|
2044
2183
|
/**
|
|
2045
2184
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
2046
2185
|
*
|
|
@@ -2153,7 +2292,7 @@ var Divider = function Divider(_a) {
|
|
|
2153
2292
|
"aria-orientation": orientation
|
|
2154
2293
|
});
|
|
2155
2294
|
};
|
|
2156
|
-
var templateObject_1$
|
|
2295
|
+
var templateObject_1$a;
|
|
2157
2296
|
|
|
2158
2297
|
React.createElement;
|
|
2159
2298
|
var StyledStack = styled.div.withConfig({
|
|
@@ -2162,7 +2301,7 @@ var StyledStack = styled.div.withConfig({
|
|
|
2162
2301
|
},
|
|
2163
2302
|
displayName: "Stack__StyledStack",
|
|
2164
2303
|
componentId: "sc-1ehkxgy-0"
|
|
2165
|
-
})(templateObject_1$
|
|
2304
|
+
})(templateObject_1$9 || (templateObject_1$9 = __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"
|
|
2166
2305
|
// Helper function to convert gap prop to CSS value
|
|
2167
2306
|
])));
|
|
2168
2307
|
// Helper function to convert gap prop to CSS value
|
|
@@ -2200,141 +2339,6 @@ var Stack = function Stack(_a) {
|
|
|
2200
2339
|
"data-testid": dataTestId
|
|
2201
2340
|
}, children);
|
|
2202
2341
|
};
|
|
2203
|
-
var templateObject_1$a;
|
|
2204
|
-
|
|
2205
|
-
React.createElement;
|
|
2206
|
-
var _a$4 = tokens.semantic,
|
|
2207
|
-
typography$1 = _a$4.typography,
|
|
2208
|
-
color$2 = _a$4.color;
|
|
2209
|
-
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
2210
|
-
var styles = {
|
|
2211
|
-
display: "font: ".concat(typography$1.display, "; letter-spacing: ").concat(tokens.base.letterSpacing[0], ";"),
|
|
2212
|
-
h1: "font: ".concat(typography$1.h1, "; letter-spacing: ").concat(tokens.base.letterSpacing[0], ";"),
|
|
2213
|
-
h2: "font: ".concat(typography$1.h2, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
2214
|
-
h3: "font: ".concat(typography$1.h3, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
2215
|
-
h4: "font: ".concat(typography$1.h4, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
2216
|
-
h5: "font: ".concat(typography$1.h5, "; letter-spacing: ").concat(tokens.base.letterSpacing[2], ";"),
|
|
2217
|
-
h6: "font: ".concat(typography$1.h6, "; letter-spacing: ").concat(tokens.base.letterSpacing[2], ";"),
|
|
2218
|
-
subtitle: "font: ".concat(typography$1.subtitle, ";"),
|
|
2219
|
-
body: "font: ".concat(typography$1.body, ";"),
|
|
2220
|
-
small: "font: ".concat(typography$1.small, ";"),
|
|
2221
|
-
overline: "font: ".concat(typography$1.overline, ";"),
|
|
2222
|
-
caption: "font: ".concat(typography$1.caption, "; text-transform: uppercase;"),
|
|
2223
|
-
button1: "font: ".concat(typography$1.button1, ";"),
|
|
2224
|
-
button2: "font: ".concat(typography$1.button2, ";"),
|
|
2225
|
-
button3: "font: ".concat(typography$1.button3, ";"),
|
|
2226
|
-
label: "font: ".concat(typography$1.label, ";")
|
|
2227
|
-
};
|
|
2228
|
-
return styles[variant] || styles.body;
|
|
2229
|
-
};
|
|
2230
|
-
var getTextColor = function getTextColor(colorVariant) {
|
|
2231
|
-
var colorMap = {
|
|
2232
|
-
"default": color$2.text["default"],
|
|
2233
|
-
emphasis: color$2.text.emphasis,
|
|
2234
|
-
subdued: color$2.text.subdued,
|
|
2235
|
-
inverse: color$2.text.inverse,
|
|
2236
|
-
disabled: color$2.text.disabled,
|
|
2237
|
-
interactive: color$2.text.interactive,
|
|
2238
|
-
error: color$2.text.error,
|
|
2239
|
-
success: color$2.text.success,
|
|
2240
|
-
warning: color$2.text.warning
|
|
2241
|
-
};
|
|
2242
|
-
return colorMap[colorVariant] || colorMap["default"];
|
|
2243
|
-
};
|
|
2244
|
-
var getDefaultElement = function getDefaultElement(variant) {
|
|
2245
|
-
var elementMap = {
|
|
2246
|
-
display: 'h1',
|
|
2247
|
-
h1: 'h1',
|
|
2248
|
-
h2: 'h2',
|
|
2249
|
-
h3: 'h3',
|
|
2250
|
-
h4: 'h4',
|
|
2251
|
-
h5: 'h5',
|
|
2252
|
-
h6: 'h6',
|
|
2253
|
-
subtitle: 'p',
|
|
2254
|
-
body: 'p',
|
|
2255
|
-
small: 'span',
|
|
2256
|
-
overline: 'span',
|
|
2257
|
-
caption: 'span',
|
|
2258
|
-
button1: 'span',
|
|
2259
|
-
button2: 'span',
|
|
2260
|
-
button3: 'span',
|
|
2261
|
-
label: 'span'
|
|
2262
|
-
};
|
|
2263
|
-
return elementMap[variant] || 'span';
|
|
2264
|
-
};
|
|
2265
|
-
var StyledTypography = styled.span.withConfig({
|
|
2266
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2267
|
-
return !prop.startsWith('$');
|
|
2268
|
-
},
|
|
2269
|
-
displayName: "Typography__StyledTypography",
|
|
2270
|
-
componentId: "sc-17mqo4k-0"
|
|
2271
|
-
})(templateObject_1$9 || (templateObject_1$9 = __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"
|
|
2272
|
-
/**
|
|
2273
|
-
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
2274
|
-
*
|
|
2275
|
-
* Features:
|
|
2276
|
-
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
2277
|
-
* - Color variants for different contexts
|
|
2278
|
-
* - Automatic semantic HTML element selection
|
|
2279
|
-
* - Manual element override support
|
|
2280
|
-
* - Direct semantic token usage (no component tokens needed)
|
|
2281
|
-
* - Full accessibility support
|
|
2282
|
-
*
|
|
2283
|
-
* @example
|
|
2284
|
-
* ```tsx
|
|
2285
|
-
* <Typography variant="h1">Main Heading</Typography>
|
|
2286
|
-
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
2287
|
-
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
2288
|
-
* ```
|
|
2289
|
-
*/])), function (_a) {
|
|
2290
|
-
var $variant = _a.$variant;
|
|
2291
|
-
return getTypographyStyles($variant);
|
|
2292
|
-
}, function (_a) {
|
|
2293
|
-
var $color = _a.$color;
|
|
2294
|
-
return getTextColor($color);
|
|
2295
|
-
}, function (_a) {
|
|
2296
|
-
var $variant = _a.$variant;
|
|
2297
|
-
if (['body', 'subtitle', 'small'].includes($variant)) {
|
|
2298
|
-
return 'line-height: 1.5;';
|
|
2299
|
-
}
|
|
2300
|
-
return '';
|
|
2301
|
-
});
|
|
2302
|
-
/**
|
|
2303
|
-
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
2304
|
-
*
|
|
2305
|
-
* Features:
|
|
2306
|
-
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
2307
|
-
* - Color variants for different contexts
|
|
2308
|
-
* - Automatic semantic HTML element selection
|
|
2309
|
-
* - Manual element override support
|
|
2310
|
-
* - Direct semantic token usage (no component tokens needed)
|
|
2311
|
-
* - Full accessibility support
|
|
2312
|
-
*
|
|
2313
|
-
* @example
|
|
2314
|
-
* ```tsx
|
|
2315
|
-
* <Typography variant="h1">Main Heading</Typography>
|
|
2316
|
-
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
2317
|
-
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
2318
|
-
* ```
|
|
2319
|
-
*/
|
|
2320
|
-
var Typography = function Typography(_a) {
|
|
2321
|
-
var _b = _a.variant,
|
|
2322
|
-
variant = _b === void 0 ? 'body' : _b,
|
|
2323
|
-
children = _a.children,
|
|
2324
|
-
_c = _a.color,
|
|
2325
|
-
color = _c === void 0 ? 'default' : _c,
|
|
2326
|
-
as = _a.as,
|
|
2327
|
-
dataTestId = _a["data-testid"];
|
|
2328
|
-
// $variant and $color are only used for styled-components prop filtering
|
|
2329
|
-
var defaultElement = getDefaultElement(variant);
|
|
2330
|
-
var elementType = as || defaultElement;
|
|
2331
|
-
return /*#__PURE__*/React.createElement(StyledTypography, {
|
|
2332
|
-
as: elementType,
|
|
2333
|
-
$variant: variant,
|
|
2334
|
-
$color: color,
|
|
2335
|
-
"data-testid": dataTestId
|
|
2336
|
-
}, children);
|
|
2337
|
-
};
|
|
2338
2342
|
var templateObject_1$9;
|
|
2339
2343
|
|
|
2340
2344
|
React.createElement;
|