@common-origin/design-system 1.4.2 → 1.6.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/atoms/Chip/BooleanChip.d.ts +23 -0
- package/dist/components/atoms/Chip/Chip.d.ts +22 -9
- package/dist/components/atoms/Chip/FilterChip.d.ts +27 -0
- package/dist/components/atoms/Chip/index.d.ts +2 -0
- package/dist/components/atoms/Chip/shared/ChipBase.d.ts +8 -0
- package/dist/components/atoms/Chip/shared/types.d.ts +18 -0
- package/dist/components/atoms/Chip/shared/utils.d.ts +47 -0
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +17 -0
- package/dist/components/atoms/ProgressBar/index.d.ts +2 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/index.esm.js +334 -67
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +336 -66
- package/dist/index.js.map +1 -1
- package/dist/lib/styleUtils.d.ts +1 -1
- package/dist/tokens/index.esm.js +20 -1
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +20 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/tokens.d.ts +19 -0
- package/dist/types/icons.d.ts +1 -1
- package/package.json +3 -2
- package/dist/components/atoms/CoverImage/CoverImage.d.ts +0 -11
- package/dist/components/atoms/CoverImage/index.d.ts +0 -1
- package/dist/components/dateFormatter.d.ts +0 -7
package/dist/index.esm.js
CHANGED
|
@@ -576,6 +576,24 @@ var component = {
|
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
},
|
|
579
|
+
progressBar: {
|
|
580
|
+
backgroundColor: "#dee2e6",
|
|
581
|
+
borderRadius: "0.25rem",
|
|
582
|
+
sizes: {
|
|
583
|
+
sm: {
|
|
584
|
+
height: "0.25rem"
|
|
585
|
+
},
|
|
586
|
+
md: {
|
|
587
|
+
height: "0.5rem"
|
|
588
|
+
},
|
|
589
|
+
lg: {
|
|
590
|
+
height: "1rem"
|
|
591
|
+
},
|
|
592
|
+
xl: {
|
|
593
|
+
height: "1.25rem"
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
},
|
|
579
597
|
$ref: "./component/index.json"
|
|
580
598
|
};
|
|
581
599
|
var semantic$1 = {
|
|
@@ -657,7 +675,8 @@ var semantic$1 = {
|
|
|
657
675
|
"success-subtle": "#CEF8E0",
|
|
658
676
|
warning: "#B14C00",
|
|
659
677
|
"warning-subtle": "#FFECCC",
|
|
660
|
-
disabled: "#dee2e6"
|
|
678
|
+
disabled: "#dee2e6",
|
|
679
|
+
progressTrack: "#dee2e6"
|
|
661
680
|
},
|
|
662
681
|
border: {
|
|
663
682
|
"default": "#e9ecef",
|
|
@@ -726,7 +745,7 @@ var AvatarContainer = styled.div.withConfig({
|
|
|
726
745
|
},
|
|
727
746
|
displayName: "Avatar__AvatarContainer",
|
|
728
747
|
componentId: "sc-ezn4ax-0"
|
|
729
|
-
})(templateObject_1$
|
|
748
|
+
})(templateObject_1$l || (templateObject_1$l = __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) {
|
|
730
749
|
var $size = _a.$size;
|
|
731
750
|
return tokens.semantic.size.avatar[$size];
|
|
732
751
|
}, function (_a) {
|
|
@@ -739,14 +758,14 @@ var AvatarImage = styled.img.withConfig({
|
|
|
739
758
|
},
|
|
740
759
|
displayName: "Avatar__AvatarImage",
|
|
741
760
|
componentId: "sc-ezn4ax-1"
|
|
742
|
-
})(templateObject_2$
|
|
761
|
+
})(templateObject_2$a || (templateObject_2$a = __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"])), tokens.base.border.radius.circle);
|
|
743
762
|
var AvatarInitials = styled.span.withConfig({
|
|
744
763
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
745
764
|
return !prop.startsWith('$');
|
|
746
765
|
},
|
|
747
766
|
displayName: "Avatar__AvatarInitials",
|
|
748
767
|
componentId: "sc-ezn4ax-2"
|
|
749
|
-
})(templateObject_3$
|
|
768
|
+
})(templateObject_3$8 || (templateObject_3$8 = __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"
|
|
750
769
|
// Helper function to get initials from name
|
|
751
770
|
])), tokens.base.fontFamily.body, tokens.base.fontWeight[3], function (_a) {
|
|
752
771
|
var $size = _a.$size;
|
|
@@ -809,7 +828,7 @@ var Avatar = function Avatar(_a) {
|
|
|
809
828
|
"aria-hidden": "true"
|
|
810
829
|
}, initials));
|
|
811
830
|
};
|
|
812
|
-
var templateObject_1$
|
|
831
|
+
var templateObject_1$l, templateObject_2$a, templateObject_3$8;
|
|
813
832
|
|
|
814
833
|
React.createElement;
|
|
815
834
|
var StyledBox = styled.div.withConfig({
|
|
@@ -821,19 +840,19 @@ var StyledBox = styled.div.withConfig({
|
|
|
821
840
|
})(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"
|
|
822
841
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
823
842
|
])), function (props) {
|
|
824
|
-
return props.$display && css(templateObject_1$
|
|
843
|
+
return props.$display && css(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
825
844
|
}, function (props) {
|
|
826
|
-
return props.$flexDirection && css(templateObject_2$
|
|
845
|
+
return props.$flexDirection && css(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
827
846
|
}, function (props) {
|
|
828
|
-
return props.$justifyContent && css(templateObject_3$
|
|
847
|
+
return props.$justifyContent && css(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
829
848
|
}, function (props) {
|
|
830
|
-
return props.$alignItems && css(templateObject_4$
|
|
849
|
+
return props.$alignItems && css(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
831
850
|
}, function (props) {
|
|
832
|
-
return props.$flexWrap && css(templateObject_5$
|
|
851
|
+
return props.$flexWrap && css(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
833
852
|
}, function (props) {
|
|
834
|
-
return props.$gap && css(templateObject_6$
|
|
853
|
+
return props.$gap && css(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), tokens.semantic.spacing.layout[props.$gap]);
|
|
835
854
|
}, function (props) {
|
|
836
|
-
return props.$m && css(templateObject_7$
|
|
855
|
+
return props.$m && css(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["margin: ", ";"], ["margin: ", ";"])), tokens.semantic.spacing.layout[props.$m]);
|
|
837
856
|
}, function (props) {
|
|
838
857
|
return props.$mt && css(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["margin-top: ", ";"], ["margin-top: ", ";"])), tokens.semantic.spacing.layout[props.$mt]);
|
|
839
858
|
}, function (props) {
|
|
@@ -1011,7 +1030,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
1011
1030
|
}, rest), children);
|
|
1012
1031
|
};
|
|
1013
1032
|
var Box = BoxTransform;
|
|
1014
|
-
var templateObject_1$
|
|
1033
|
+
var templateObject_1$k, 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;
|
|
1015
1034
|
|
|
1016
1035
|
var add = {
|
|
1017
1036
|
path: "M13 11H19V13H13V19H11V13H5V11H11V5H13V11Z",
|
|
@@ -1041,6 +1060,10 @@ var caret = {
|
|
|
1041
1060
|
path: "m14.77 11.808-4.458-3.715A.8.8 0 0 0 9 8.708v6.584a.8.8 0 0 0 1.312.614l4.458-3.714a.25.25 0 0 0 0-.384Z",
|
|
1042
1061
|
name: "caret"
|
|
1043
1062
|
};
|
|
1063
|
+
var check = {
|
|
1064
|
+
path: "M9.16699 18.375L4.40039 14.7998L5.59961 13.2002L8.83301 15.625L17.2256 5.36719L18.7744 6.63281L9.16699 18.375Z",
|
|
1065
|
+
name: "check"
|
|
1066
|
+
};
|
|
1044
1067
|
var close = {
|
|
1045
1068
|
path: "M19.4141 6L13.4141 12L19.4141 18L18 19.4141L12 13.4141L6 19.4141L4.58594 18L10.5859 12L4.58594 6L6 4.58594L12 10.5859L18 4.58594L19.4141 6Z",
|
|
1046
1069
|
name: "close"
|
|
@@ -1093,6 +1116,7 @@ var iconsData = {
|
|
|
1093
1116
|
arrowRight: arrowRight,
|
|
1094
1117
|
back: back,
|
|
1095
1118
|
caret: caret,
|
|
1119
|
+
check: check,
|
|
1096
1120
|
close: close,
|
|
1097
1121
|
directionRight: directionRight,
|
|
1098
1122
|
menu: menu,
|
|
@@ -1113,7 +1137,7 @@ var IconStyled = styled.span.withConfig({
|
|
|
1113
1137
|
},
|
|
1114
1138
|
displayName: "Icon__IconStyled",
|
|
1115
1139
|
componentId: "sc-1105czq-0"
|
|
1116
|
-
})(templateObject_1$
|
|
1140
|
+
})(templateObject_1$j || (templateObject_1$j = __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) {
|
|
1117
1141
|
var $size = _a.$size;
|
|
1118
1142
|
return tokens.semantic.size.icon[$size];
|
|
1119
1143
|
}, function (_a) {
|
|
@@ -1177,7 +1201,7 @@ var Icon = function Icon(_a) {
|
|
|
1177
1201
|
d: iconData.path
|
|
1178
1202
|
})));
|
|
1179
1203
|
};
|
|
1180
|
-
var templateObject_1$
|
|
1204
|
+
var templateObject_1$j;
|
|
1181
1205
|
|
|
1182
1206
|
React.createElement;
|
|
1183
1207
|
var button = tokens.component.button,
|
|
@@ -1209,14 +1233,14 @@ var StyledButton = styled.button.withConfig({
|
|
|
1209
1233
|
},
|
|
1210
1234
|
displayName: "Button__StyledButton",
|
|
1211
1235
|
componentId: "sc-1eiuum9-0"
|
|
1212
|
-
})(templateObject_1$
|
|
1236
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles);
|
|
1213
1237
|
var StyledLink = styled.a.withConfig({
|
|
1214
1238
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1215
1239
|
return !prop.startsWith('$');
|
|
1216
1240
|
},
|
|
1217
1241
|
displayName: "Button__StyledLink",
|
|
1218
1242
|
componentId: "sc-1eiuum9-1"
|
|
1219
|
-
})(templateObject_2$
|
|
1243
|
+
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
1220
1244
|
// Helper function to get icon size based on button size
|
|
1221
1245
|
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles);
|
|
1222
1246
|
// Helper function to get icon size based on button size
|
|
@@ -1309,12 +1333,18 @@ var Button = function Button(_a) {
|
|
|
1309
1333
|
"data-testid": dataTestId
|
|
1310
1334
|
}, buttonProps), renderButtonContent(children, iconName, size));
|
|
1311
1335
|
};
|
|
1312
|
-
var templateObject_1$
|
|
1336
|
+
var templateObject_1$i, templateObject_2$8;
|
|
1313
1337
|
|
|
1314
|
-
React.createElement;
|
|
1315
1338
|
var chip = tokens.component.chip;
|
|
1316
|
-
// Helper
|
|
1317
|
-
var getVariantStylesAsObject = function getVariantStylesAsObject(variant) {
|
|
1339
|
+
// Helper function to get variant styles as objects for CSS custom properties
|
|
1340
|
+
var getVariantStylesAsObject = function getVariantStylesAsObject(variant, selected) {
|
|
1341
|
+
// Boolean chips with selected state get special background
|
|
1342
|
+
if (selected) {
|
|
1343
|
+
return {
|
|
1344
|
+
backgroundColor: tokens.semantic.color.background['interactive-subtle'],
|
|
1345
|
+
color: chip["default"].textColor
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1318
1348
|
switch (variant) {
|
|
1319
1349
|
case 'emphasis':
|
|
1320
1350
|
return {
|
|
@@ -1339,6 +1369,7 @@ var getVariantStylesAsObject = function getVariantStylesAsObject(variant) {
|
|
|
1339
1369
|
};
|
|
1340
1370
|
}
|
|
1341
1371
|
};
|
|
1372
|
+
// Helper function to get size styles as objects for CSS custom properties
|
|
1342
1373
|
var getSizeStylesAsObject = function getSizeStylesAsObject(size) {
|
|
1343
1374
|
switch (size) {
|
|
1344
1375
|
case 'small':
|
|
@@ -1346,11 +1377,6 @@ var getSizeStylesAsObject = function getSizeStylesAsObject(size) {
|
|
|
1346
1377
|
font: chip.sizes.small.font,
|
|
1347
1378
|
padding: chip.sizes.small.padding
|
|
1348
1379
|
};
|
|
1349
|
-
case 'large':
|
|
1350
|
-
return {
|
|
1351
|
-
font: chip.sizes.large.font,
|
|
1352
|
-
padding: chip.sizes.large.padding
|
|
1353
|
-
};
|
|
1354
1380
|
case 'medium':
|
|
1355
1381
|
default:
|
|
1356
1382
|
return {
|
|
@@ -1359,27 +1385,51 @@ var getSizeStylesAsObject = function getSizeStylesAsObject(size) {
|
|
|
1359
1385
|
};
|
|
1360
1386
|
}
|
|
1361
1387
|
};
|
|
1388
|
+
|
|
1389
|
+
React.createElement;
|
|
1362
1390
|
// Base styled component using CSS variables to avoid prop leaking
|
|
1363
|
-
var
|
|
1391
|
+
var BaseChipStyled = styled.span.withConfig({
|
|
1364
1392
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1365
1393
|
return !prop.startsWith('$');
|
|
1366
1394
|
},
|
|
1367
|
-
displayName: "
|
|
1368
|
-
componentId: "sc-
|
|
1369
|
-
})(templateObject_1$
|
|
1370
|
-
//
|
|
1395
|
+
displayName: "ChipBase__BaseChipStyled",
|
|
1396
|
+
componentId: "sc-moa6zc-0"
|
|
1397
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\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: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\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"
|
|
1398
|
+
// Icon container for selected indicator or leading icons
|
|
1371
1399
|
])), chip["default"].borderRadius, tokens.semantic.motion.interactive, chip.variants.interactive.backgroundColor);
|
|
1400
|
+
// Icon container for selected indicator or leading icons
|
|
1401
|
+
var IconContainer = styled.span.withConfig({
|
|
1402
|
+
displayName: "ChipBase__IconContainer",
|
|
1403
|
+
componentId: "sc-moa6zc-1"
|
|
1404
|
+
})(templateObject_2$7 || (templateObject_2$7 = __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"
|
|
1405
|
+
// Close button for dismissible chips
|
|
1406
|
+
])), tokens.semantic.spacing.layout.sm);
|
|
1407
|
+
// Close button for dismissible chips
|
|
1408
|
+
var CloseButton = styled.button.withConfig({
|
|
1409
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1410
|
+
return !prop.startsWith('$');
|
|
1411
|
+
},
|
|
1412
|
+
displayName: "ChipBase__CloseButton",
|
|
1413
|
+
componentId: "sc-moa6zc-2"
|
|
1414
|
+
})(templateObject_3$6 || (templateObject_3$6 = __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"
|
|
1372
1415
|
// Wrapper component that applies styles via CSS custom properties
|
|
1373
|
-
|
|
1416
|
+
])), tokens.semantic.spacing.layout.sm, function (props) {
|
|
1417
|
+
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1418
|
+
}, function (props) {
|
|
1419
|
+
return props.$disabled ? '0.6' : '1';
|
|
1420
|
+
}, tokens.semantic.motion.transition.fast, chip.variants.interactive.backgroundColor);
|
|
1421
|
+
// Wrapper component that applies styles via CSS custom properties
|
|
1422
|
+
var StyledChipWrapper = function StyledChipWrapper(_a) {
|
|
1374
1423
|
var $variant = _a.$variant,
|
|
1375
1424
|
$size = _a.$size,
|
|
1376
1425
|
$disabled = _a.$disabled,
|
|
1377
1426
|
$clickable = _a.$clickable,
|
|
1427
|
+
$selected = _a.$selected,
|
|
1378
1428
|
children = _a.children,
|
|
1379
1429
|
style = _a.style,
|
|
1380
|
-
htmlProps = __rest(_a, ["$variant", "$size", "$disabled", "$clickable", "children", "style"]);
|
|
1430
|
+
htmlProps = __rest(_a, ["$variant", "$size", "$disabled", "$clickable", "$selected", "children", "style"]);
|
|
1381
1431
|
// Get styles for variant and size
|
|
1382
|
-
var variantStyles = getVariantStylesAsObject($variant);
|
|
1432
|
+
var variantStyles = getVariantStylesAsObject($variant, $selected);
|
|
1383
1433
|
var sizeStyles = getSizeStylesAsObject($size);
|
|
1384
1434
|
// Create CSS custom properties object
|
|
1385
1435
|
var cssProps = {
|
|
@@ -1392,38 +1442,47 @@ var StyledChip = function StyledChip(_a) {
|
|
|
1392
1442
|
'--chip-hover-opacity': $disabled ? '0.6' : $clickable ? '0.8' : '1',
|
|
1393
1443
|
'--chip-active-opacity': $disabled ? '0.6' : $clickable ? '0.9' : '1'
|
|
1394
1444
|
};
|
|
1395
|
-
return /*#__PURE__*/React.createElement(
|
|
1445
|
+
return /*#__PURE__*/React.createElement(BaseChipStyled, _extends({
|
|
1396
1446
|
style: __assign(__assign({}, cssProps), style)
|
|
1397
1447
|
}, htmlProps), children);
|
|
1398
1448
|
};
|
|
1449
|
+
var templateObject_1$h, templateObject_2$7, templateObject_3$6;
|
|
1450
|
+
|
|
1451
|
+
React.createElement;
|
|
1452
|
+
/**
|
|
1453
|
+
* Chip - Compact element for displaying tags, categories, and labels
|
|
1454
|
+
*
|
|
1455
|
+
* Use this component for static display chips or simple interactive chips.
|
|
1456
|
+
* For specialized filtering patterns, use:
|
|
1457
|
+
* - FilterChip: Dismissible chips for showing applied filters
|
|
1458
|
+
* - BooleanChip: Toggleable chips for quick filter controls
|
|
1459
|
+
*
|
|
1460
|
+
* Variants:
|
|
1461
|
+
* - default: Standard gray background
|
|
1462
|
+
* - emphasis: High-contrast dark background
|
|
1463
|
+
* - subtle: Light background for secondary info
|
|
1464
|
+
* - interactive: Blue background with hover states
|
|
1465
|
+
*/
|
|
1399
1466
|
var Chip = function Chip(_a) {
|
|
1400
1467
|
var children = _a.children,
|
|
1401
1468
|
_b = _a.variant,
|
|
1402
1469
|
variant = _b === void 0 ? 'default' : _b,
|
|
1403
|
-
|
|
1404
|
-
size =
|
|
1470
|
+
_c = _a.size,
|
|
1471
|
+
size = _c === void 0 ? 'medium' : _c,
|
|
1405
1472
|
onClick = _a.onClick,
|
|
1406
|
-
|
|
1407
|
-
disabled =
|
|
1473
|
+
_d = _a.disabled,
|
|
1474
|
+
disabled = _d === void 0 ? false : _d,
|
|
1408
1475
|
dataTestId = _a["data-testid"],
|
|
1409
1476
|
ariaLabel = _a["aria-label"],
|
|
1410
1477
|
ariaDescribedBy = _a["aria-describedby"],
|
|
1411
1478
|
role = _a.role,
|
|
1412
1479
|
title = _a.title,
|
|
1413
|
-
// Legacy prop support
|
|
1414
1480
|
props = __rest(_a, ["children", "variant", "size", "onClick", "disabled", 'data-testid', 'aria-label', 'aria-describedby', "role", "title"]);
|
|
1415
1481
|
var isClickable = Boolean(onClick && !disabled);
|
|
1416
|
-
// Map legacy variants to new variants
|
|
1482
|
+
// Map legacy variants to new variants
|
|
1417
1483
|
var normalizedVariant = variant === 'light' ? 'default' : variant === 'dark' ? 'emphasis' : variant;
|
|
1418
|
-
// Support legacy title prop
|
|
1484
|
+
// Support legacy title prop
|
|
1419
1485
|
var content = children !== undefined ? children : title;
|
|
1420
|
-
// Remove styled-only props from the rest
|
|
1421
|
-
var _g = props;
|
|
1422
|
-
_g.variant;
|
|
1423
|
-
_g.size;
|
|
1424
|
-
_g.disabled;
|
|
1425
|
-
_g.clickable;
|
|
1426
|
-
var htmlProps = __rest(_g, ["variant", "size", "disabled", "clickable"]);
|
|
1427
1486
|
var handleClick = function handleClick() {
|
|
1428
1487
|
if (onClick && !disabled) {
|
|
1429
1488
|
onClick();
|
|
@@ -1435,33 +1494,177 @@ var Chip = function Chip(_a) {
|
|
|
1435
1494
|
handleClick();
|
|
1436
1495
|
}
|
|
1437
1496
|
};
|
|
1438
|
-
return /*#__PURE__*/React.createElement(
|
|
1497
|
+
return /*#__PURE__*/React.createElement(StyledChipWrapper, _extends({
|
|
1439
1498
|
$variant: normalizedVariant,
|
|
1440
1499
|
$size: size,
|
|
1441
1500
|
$disabled: disabled || undefined,
|
|
1442
1501
|
$clickable: isClickable || undefined,
|
|
1443
1502
|
onClick: isClickable ? handleClick : undefined,
|
|
1444
|
-
onKeyDown:
|
|
1503
|
+
onKeyDown: handleKeyDown,
|
|
1445
1504
|
tabIndex: isClickable ? 0 : undefined,
|
|
1446
1505
|
role: role || (isClickable ? 'button' : undefined),
|
|
1447
1506
|
"aria-label": ariaLabel,
|
|
1448
1507
|
"aria-describedby": ariaDescribedBy,
|
|
1449
1508
|
"aria-disabled": disabled ? 'true' : undefined,
|
|
1450
1509
|
"data-testid": dataTestId
|
|
1451
|
-
},
|
|
1510
|
+
}, props), content);
|
|
1452
1511
|
};
|
|
1453
|
-
// Legacy component for backward compatibility
|
|
1454
1512
|
var LegacyChip = function LegacyChip(_a) {
|
|
1455
1513
|
var title = _a.title,
|
|
1456
1514
|
_b = _a.variant,
|
|
1457
1515
|
variant = _b === void 0 ? 'light' : _b;
|
|
1458
|
-
// Map legacy variants to new variants
|
|
1459
1516
|
var newVariant = variant === 'dark' ? 'emphasis' : 'default';
|
|
1460
1517
|
return /*#__PURE__*/React.createElement(Chip, {
|
|
1461
1518
|
variant: newVariant
|
|
1462
1519
|
}, title);
|
|
1463
1520
|
};
|
|
1464
|
-
|
|
1521
|
+
|
|
1522
|
+
React.createElement;
|
|
1523
|
+
/**
|
|
1524
|
+
* FilterChip - Chip for displaying filters with selected state and optional dismissal
|
|
1525
|
+
*
|
|
1526
|
+
* Use this component to show filters that can be selected/deselected.
|
|
1527
|
+
* When selected, displays a checkmark and light blue background.
|
|
1528
|
+
* Optionally dismissible when onDismiss is provided.
|
|
1529
|
+
*
|
|
1530
|
+
* Features:
|
|
1531
|
+
* - Shows checkmark icon when selected
|
|
1532
|
+
* - Light blue background when selected
|
|
1533
|
+
* - Optional close (×) button when onDismiss is provided
|
|
1534
|
+
* - Keyboard dismissal with Delete or Backspace keys (when dismissible)
|
|
1535
|
+
* - Non-clickable body (only close button is interactive when present)
|
|
1536
|
+
* - Uses subtle/interactive background styling based on selected state
|
|
1537
|
+
* - Announces as "status" to screen readers
|
|
1538
|
+
*/
|
|
1539
|
+
var FilterChip = function FilterChip(_a) {
|
|
1540
|
+
var children = _a.children,
|
|
1541
|
+
_b = _a.selected,
|
|
1542
|
+
selected = _b === void 0 ? false : _b,
|
|
1543
|
+
onDismiss = _a.onDismiss,
|
|
1544
|
+
_c = _a.size,
|
|
1545
|
+
size = _c === void 0 ? 'medium' : _c,
|
|
1546
|
+
_d = _a.disabled,
|
|
1547
|
+
disabled = _d === void 0 ? false : _d,
|
|
1548
|
+
dataTestId = _a["data-testid"],
|
|
1549
|
+
ariaLabel = _a["aria-label"],
|
|
1550
|
+
ariaDescribedBy = _a["aria-describedby"],
|
|
1551
|
+
role = _a.role,
|
|
1552
|
+
props = __rest(_a, ["children", "selected", "onDismiss", "size", "disabled", 'data-testid', 'aria-label', 'aria-describedby', "role"]);
|
|
1553
|
+
var isDismissible = Boolean(onDismiss);
|
|
1554
|
+
var handleDismiss = function handleDismiss(event) {
|
|
1555
|
+
event.stopPropagation(); // Prevent event bubbling
|
|
1556
|
+
if (!disabled && onDismiss) {
|
|
1557
|
+
onDismiss();
|
|
1558
|
+
}
|
|
1559
|
+
};
|
|
1560
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
1561
|
+
// Handle dismiss with Delete or Backspace (only when dismissible)
|
|
1562
|
+
if (!disabled && isDismissible && onDismiss && (event.key === 'Delete' || event.key === 'Backspace')) {
|
|
1563
|
+
event.preventDefault();
|
|
1564
|
+
onDismiss();
|
|
1565
|
+
}
|
|
1566
|
+
};
|
|
1567
|
+
var handleCloseKeyDown = function handleCloseKeyDown(event) {
|
|
1568
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1569
|
+
event.preventDefault();
|
|
1570
|
+
if (!disabled && onDismiss) onDismiss();
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
// Generate accessible label for close button
|
|
1574
|
+
var closeButtonLabel = typeof children === 'string' ? "Remove ".concat(children) : 'Remove filter';
|
|
1575
|
+
return /*#__PURE__*/React.createElement(StyledChipWrapper, _extends({
|
|
1576
|
+
$variant: "subtle",
|
|
1577
|
+
$size: size,
|
|
1578
|
+
$disabled: disabled || undefined,
|
|
1579
|
+
$clickable: false,
|
|
1580
|
+
$selected: selected,
|
|
1581
|
+
onKeyDown: handleKeyDown,
|
|
1582
|
+
role: role || 'status',
|
|
1583
|
+
"aria-label": ariaLabel,
|
|
1584
|
+
"aria-describedby": ariaDescribedBy,
|
|
1585
|
+
"aria-disabled": disabled ? 'true' : undefined,
|
|
1586
|
+
"data-testid": dataTestId
|
|
1587
|
+
}, props), selected && /*#__PURE__*/React.createElement(IconContainer, {
|
|
1588
|
+
"aria-hidden": "true"
|
|
1589
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
1590
|
+
name: "check",
|
|
1591
|
+
size: "sm"
|
|
1592
|
+
})), children, isDismissible && /*#__PURE__*/React.createElement(CloseButton, {
|
|
1593
|
+
type: "button",
|
|
1594
|
+
onClick: handleDismiss,
|
|
1595
|
+
onKeyDown: handleCloseKeyDown,
|
|
1596
|
+
disabled: disabled,
|
|
1597
|
+
$disabled: disabled,
|
|
1598
|
+
"aria-label": closeButtonLabel,
|
|
1599
|
+
tabIndex: 0,
|
|
1600
|
+
"data-testid": dataTestId ? "".concat(dataTestId, "-close") : undefined
|
|
1601
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
1602
|
+
name: "close",
|
|
1603
|
+
size: "sm"
|
|
1604
|
+
})));
|
|
1605
|
+
};
|
|
1606
|
+
|
|
1607
|
+
React.createElement;
|
|
1608
|
+
/**
|
|
1609
|
+
* BooleanChip - Toggleable chip for quick filter controls
|
|
1610
|
+
*
|
|
1611
|
+
* Use this component for multi-select filter controls where users can
|
|
1612
|
+
* see which options are active. Common in table filtering patterns where
|
|
1613
|
+
* users toggle filters on/off.
|
|
1614
|
+
*
|
|
1615
|
+
* Features:
|
|
1616
|
+
* - Shows checkmark icon when selected
|
|
1617
|
+
* - Entire chip is clickable to toggle
|
|
1618
|
+
* - Keyboard activation with Space or Enter
|
|
1619
|
+
* - Uses checkbox role with aria-checked
|
|
1620
|
+
* - Visual background change when selected
|
|
1621
|
+
*/
|
|
1622
|
+
var BooleanChip = function BooleanChip(_a) {
|
|
1623
|
+
var children = _a.children,
|
|
1624
|
+
selected = _a.selected,
|
|
1625
|
+
onClick = _a.onClick,
|
|
1626
|
+
_b = _a.size,
|
|
1627
|
+
size = _b === void 0 ? 'medium' : _b,
|
|
1628
|
+
_c = _a.disabled,
|
|
1629
|
+
disabled = _c === void 0 ? false : _c,
|
|
1630
|
+
dataTestId = _a["data-testid"],
|
|
1631
|
+
ariaLabel = _a["aria-label"],
|
|
1632
|
+
ariaDescribedBy = _a["aria-describedby"],
|
|
1633
|
+
props = __rest(_a, ["children", "selected", "onClick", "size", "disabled", 'data-testid', 'aria-label', 'aria-describedby']);
|
|
1634
|
+
var handleClick = function handleClick() {
|
|
1635
|
+
if (!disabled) {
|
|
1636
|
+
onClick();
|
|
1637
|
+
}
|
|
1638
|
+
};
|
|
1639
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
1640
|
+
// Handle activation with Space or Enter
|
|
1641
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1642
|
+
event.preventDefault();
|
|
1643
|
+
handleClick();
|
|
1644
|
+
}
|
|
1645
|
+
};
|
|
1646
|
+
return /*#__PURE__*/React.createElement(StyledChipWrapper, _extends({
|
|
1647
|
+
$variant: "subtle",
|
|
1648
|
+
$size: size,
|
|
1649
|
+
$disabled: disabled || undefined,
|
|
1650
|
+
$clickable: !disabled,
|
|
1651
|
+
$selected: selected,
|
|
1652
|
+
onClick: handleClick,
|
|
1653
|
+
onKeyDown: handleKeyDown,
|
|
1654
|
+
tabIndex: disabled ? undefined : 0,
|
|
1655
|
+
role: "checkbox",
|
|
1656
|
+
"aria-checked": selected ? 'true' : 'false',
|
|
1657
|
+
"aria-label": ariaLabel,
|
|
1658
|
+
"aria-describedby": ariaDescribedBy,
|
|
1659
|
+
"aria-disabled": disabled ? 'true' : undefined,
|
|
1660
|
+
"data-testid": dataTestId
|
|
1661
|
+
}, props), selected && /*#__PURE__*/React.createElement(IconContainer, {
|
|
1662
|
+
"aria-hidden": "true"
|
|
1663
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
1664
|
+
name: "check",
|
|
1665
|
+
size: "sm"
|
|
1666
|
+
})), children);
|
|
1667
|
+
};
|
|
1465
1668
|
|
|
1466
1669
|
// Breakpoints using base tokens
|
|
1467
1670
|
var breakpoints$1 = {
|
|
@@ -1487,32 +1690,32 @@ var spacing$3 = tokens.semantic.spacing;
|
|
|
1487
1690
|
var StyledContainer = styled.div.withConfig({
|
|
1488
1691
|
displayName: "Container__StyledContainer",
|
|
1489
1692
|
componentId: "sc-17dbj6n-0"
|
|
1490
|
-
})(templateObject_1$
|
|
1693
|
+
})(templateObject_1$g || (templateObject_1$g = __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']);
|
|
1491
1694
|
var Container = function Container(_a) {
|
|
1492
1695
|
var children = _a.children,
|
|
1493
1696
|
props = __rest(_a, ["children"]);
|
|
1494
1697
|
return /*#__PURE__*/React.createElement(StyledContainer, props, children);
|
|
1495
1698
|
};
|
|
1496
|
-
var templateObject_1$
|
|
1699
|
+
var templateObject_1$g;
|
|
1497
1700
|
|
|
1498
1701
|
React.createElement;
|
|
1499
1702
|
var base = tokens.base;
|
|
1500
1703
|
var PictureWrapper = styled.div.withConfig({
|
|
1501
1704
|
displayName: "Picture__PictureWrapper",
|
|
1502
1705
|
componentId: "sc-11d9tei-0"
|
|
1503
|
-
})(templateObject_1$
|
|
1706
|
+
})(templateObject_1$f || (templateObject_1$f = __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);
|
|
1504
1707
|
var ImageLink = styled.a.withConfig({
|
|
1505
1708
|
displayName: "Picture__ImageLink",
|
|
1506
1709
|
componentId: "sc-11d9tei-1"
|
|
1507
|
-
})(templateObject_2$
|
|
1710
|
+
})(templateObject_2$6 || (templateObject_2$6 = __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.duration.normal, base.easing.easeInOut);
|
|
1508
1711
|
var ImageButton = styled.button.withConfig({
|
|
1509
1712
|
displayName: "Picture__ImageButton",
|
|
1510
1713
|
componentId: "sc-11d9tei-2"
|
|
1511
|
-
})(templateObject_3$
|
|
1714
|
+
})(templateObject_3$5 || (templateObject_3$5 = __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.duration.normal, base.easing.easeInOut);
|
|
1512
1715
|
var StyledImage = styled.img.withConfig({
|
|
1513
1716
|
displayName: "Picture__StyledImage",
|
|
1514
1717
|
componentId: "sc-11d9tei-3"
|
|
1515
|
-
})(templateObject_4$
|
|
1718
|
+
})(templateObject_4$4 || (templateObject_4$4 = __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.border.radius[2]);
|
|
1516
1719
|
var Picture = function Picture(_a) {
|
|
1517
1720
|
var title = _a.title,
|
|
1518
1721
|
src = _a.src,
|
|
@@ -1539,7 +1742,7 @@ var Picture = function Picture(_a) {
|
|
|
1539
1742
|
"aria-label": "Read more about ".concat(title)
|
|
1540
1743
|
}, image) : image);
|
|
1541
1744
|
};
|
|
1542
|
-
var templateObject_1$
|
|
1745
|
+
var templateObject_1$f, templateObject_2$6, templateObject_3$5, templateObject_4$4;
|
|
1543
1746
|
|
|
1544
1747
|
React.createElement;
|
|
1545
1748
|
var _a$5 = tokens.semantic,
|
|
@@ -1548,7 +1751,7 @@ var _a$5 = tokens.semantic,
|
|
|
1548
1751
|
var TimeStyled = styled.time.withConfig({
|
|
1549
1752
|
displayName: "DateFormatter__TimeStyled",
|
|
1550
1753
|
componentId: "sc-5464cc-0"
|
|
1551
|
-
})(templateObject_1$
|
|
1754
|
+
})(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography$2.label, color$3.text.subdued);
|
|
1552
1755
|
var DateFormatter = function DateFormatter(_a) {
|
|
1553
1756
|
var dateString = _a.dateString,
|
|
1554
1757
|
_b = _a.formatString,
|
|
@@ -1560,7 +1763,7 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1560
1763
|
"data-testid": dataTestId
|
|
1561
1764
|
}, format(date, formatString));
|
|
1562
1765
|
};
|
|
1563
|
-
var templateObject_1$
|
|
1766
|
+
var templateObject_1$e;
|
|
1564
1767
|
|
|
1565
1768
|
React.createElement;
|
|
1566
1769
|
var motion = tokens.semantic.motion,
|
|
@@ -1571,7 +1774,7 @@ var IconButtonStyled = styled.button.withConfig({
|
|
|
1571
1774
|
},
|
|
1572
1775
|
displayName: "IconButton__IconButtonStyled",
|
|
1573
1776
|
componentId: "sc-k8b14t-0"
|
|
1574
|
-
})(templateObject_1$
|
|
1777
|
+
})(templateObject_1$d || (templateObject_1$d = __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) {
|
|
1575
1778
|
var $variant = _a.$variant;
|
|
1576
1779
|
switch ($variant) {
|
|
1577
1780
|
case 'primary':
|
|
@@ -1682,7 +1885,71 @@ var IconButton = function IconButton(_a) {
|
|
|
1682
1885
|
"aria-hidden": "true" // Hide icon from screen readers since button has aria-label
|
|
1683
1886
|
}));
|
|
1684
1887
|
};
|
|
1685
|
-
var templateObject_1$
|
|
1888
|
+
var templateObject_1$d;
|
|
1889
|
+
|
|
1890
|
+
React.createElement;
|
|
1891
|
+
var ProgressBarContainer = styled.div.withConfig({
|
|
1892
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1893
|
+
return !prop.startsWith('$');
|
|
1894
|
+
},
|
|
1895
|
+
displayName: "ProgressBar__ProgressBarContainer",
|
|
1896
|
+
componentId: "sc-1nco33q-0"
|
|
1897
|
+
})(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) {
|
|
1898
|
+
return props.$variant === 'horizontal' && css(templateObject_1$c || (templateObject_1$c = __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);
|
|
1899
|
+
}, function (props) {
|
|
1900
|
+
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);
|
|
1901
|
+
});
|
|
1902
|
+
var ProgressBarFill = styled.div.withConfig({
|
|
1903
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1904
|
+
return !prop.startsWith('$');
|
|
1905
|
+
},
|
|
1906
|
+
displayName: "ProgressBar__ProgressBarFill",
|
|
1907
|
+
componentId: "sc-1nco33q-1"
|
|
1908
|
+
})(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n height: 100%;\n transition: ", ";\n\n ", "\n\n ", "\n\n ", "\n"], ["\n height: 100%;\n transition: ", ";\n\n ", "\n\n ", "\n\n ", "\n"])), tokens.semantic.motion.transition.normal, function (props) {
|
|
1909
|
+
var backgroundColor;
|
|
1910
|
+
switch (props.$color) {
|
|
1911
|
+
case 'success':
|
|
1912
|
+
backgroundColor = tokens.semantic.color.background.success;
|
|
1913
|
+
break;
|
|
1914
|
+
case 'error':
|
|
1915
|
+
backgroundColor = tokens.semantic.color.background.error;
|
|
1916
|
+
break;
|
|
1917
|
+
case 'default':
|
|
1918
|
+
default:
|
|
1919
|
+
backgroundColor = tokens.semantic.color.background.interactive;
|
|
1920
|
+
break;
|
|
1921
|
+
}
|
|
1922
|
+
return css(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
1923
|
+
}, function (props) {
|
|
1924
|
+
return props.$variant === 'horizontal' && css(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1925
|
+
}, function (props) {
|
|
1926
|
+
return props.$variant === 'vertical' && css(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n width: 100%;\n height: ", "%;\n "], ["\n width: 100%;\n height: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1927
|
+
});
|
|
1928
|
+
var ProgressBar = function ProgressBar(_a) {
|
|
1929
|
+
var value = _a.value,
|
|
1930
|
+
_b = _a.variant,
|
|
1931
|
+
variant = _b === void 0 ? 'horizontal' : _b,
|
|
1932
|
+
_c = _a.color,
|
|
1933
|
+
color = _c === void 0 ? 'default' : _c,
|
|
1934
|
+
height = _a.height,
|
|
1935
|
+
width = _a.width,
|
|
1936
|
+
dataTestId = _a["data-testid"];
|
|
1937
|
+
return /*#__PURE__*/React.createElement(ProgressBarContainer, {
|
|
1938
|
+
$variant: variant,
|
|
1939
|
+
$height: height,
|
|
1940
|
+
$width: width,
|
|
1941
|
+
"data-testid": dataTestId,
|
|
1942
|
+
role: "progressbar",
|
|
1943
|
+
"aria-valuenow": Math.min(100, Math.max(0, value)),
|
|
1944
|
+
"aria-valuemin": 0,
|
|
1945
|
+
"aria-valuemax": 100
|
|
1946
|
+
}, /*#__PURE__*/React.createElement(ProgressBarFill, {
|
|
1947
|
+
$value: value,
|
|
1948
|
+
$variant: variant,
|
|
1949
|
+
$color: color
|
|
1950
|
+
}));
|
|
1951
|
+
};
|
|
1952
|
+
var templateObject_1$c, templateObject_2$5, templateObject_3$4, templateObject_4$3, templateObject_5$3, templateObject_6$1, templateObject_7$1;
|
|
1686
1953
|
|
|
1687
1954
|
React.createElement;
|
|
1688
1955
|
var StyledSeparator = styled.div.withConfig({
|
|
@@ -2726,5 +2993,5 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
2726
2993
|
};
|
|
2727
2994
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35;
|
|
2728
2995
|
|
|
2729
|
-
export { ArtCard, Avatar, Box, Breadcrumbs, Button, Chip, ChipGroup, CodeBlock, Container, DateFormatter, DesignCard, Dropdown, Grid, GridCol, Icon, IconButton, LegacyChip, PageTitle, Picture, ReleaseCard, ResponsiveGrid, SectionSeparator, Stack, Typography, iconsData, tokens };
|
|
2996
|
+
export { ArtCard, Avatar, BooleanChip, Box, Breadcrumbs, Button, Chip, ChipGroup, CodeBlock, Container, DateFormatter, DesignCard, Dropdown, FilterChip, Grid, GridCol, Icon, IconButton, LegacyChip, PageTitle, Picture, ProgressBar, ReleaseCard, ResponsiveGrid, SectionSeparator, Stack, Typography, iconsData, tokens };
|
|
2730
2997
|
//# sourceMappingURL=index.esm.js.map
|