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