@common-origin/design-system 2.4.0 → 2.6.1
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/Box/Box.d.ts +3 -3
- package/dist/components/atoms/Button/Button.d.ts +1 -1
- package/dist/components/atoms/CategoryBadge/CategoryBadge.d.ts +4 -17
- package/dist/components/atoms/Chip/shared/ChipBase.d.ts +3 -5
- package/dist/components/atoms/Chip/shared/utils.d.ts +53 -8
- package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +1 -0
- package/dist/components/molecules/ActionSheet/ActionSheet.d.ts +2 -1
- package/dist/components/molecules/CodeBlock/CodeBlock.d.ts +29 -0
- package/dist/components/molecules/List/ListItem.d.ts +7 -1
- package/dist/index.d.ts +91 -0
- package/dist/index.esm.js +973 -789
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +973 -789
- package/dist/index.js.map +1 -1
- package/dist/styles/icons.json +3 -3
- package/dist/styles/tokens.json +96 -5
- package/dist/tokens/index.esm.js +96 -5
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +96 -5
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/tokens.d.ts +91 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -91,7 +91,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
91
91
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
var base$
|
|
94
|
+
var base$b = {
|
|
95
95
|
border: {
|
|
96
96
|
radius: {
|
|
97
97
|
"1": "0.125rem",
|
|
@@ -407,7 +407,7 @@ var base$d = {
|
|
|
407
407
|
},
|
|
408
408
|
$ref: "./base/index.json"
|
|
409
409
|
};
|
|
410
|
-
var component$
|
|
410
|
+
var component$2 = {
|
|
411
411
|
button: {
|
|
412
412
|
primary: {
|
|
413
413
|
backgroundColor: "#212529",
|
|
@@ -458,6 +458,34 @@ var component$1 = {
|
|
|
458
458
|
backgroundColor: "transparent",
|
|
459
459
|
textColor: "#adb5bd"
|
|
460
460
|
}
|
|
461
|
+
},
|
|
462
|
+
emphasis: {
|
|
463
|
+
backgroundColor: "#0265DC",
|
|
464
|
+
textColor: "#ffffff",
|
|
465
|
+
hover: {
|
|
466
|
+
backgroundColor: "#0054B6"
|
|
467
|
+
},
|
|
468
|
+
active: {
|
|
469
|
+
backgroundColor: "#004491"
|
|
470
|
+
},
|
|
471
|
+
disabled: {
|
|
472
|
+
backgroundColor: "#dee2e6",
|
|
473
|
+
textColor: "#adb5bd"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
danger: {
|
|
477
|
+
backgroundColor: "#D31510",
|
|
478
|
+
textColor: "#ffffff",
|
|
479
|
+
hover: {
|
|
480
|
+
backgroundColor: "#B40000"
|
|
481
|
+
},
|
|
482
|
+
active: {
|
|
483
|
+
backgroundColor: "#930000"
|
|
484
|
+
},
|
|
485
|
+
disabled: {
|
|
486
|
+
backgroundColor: "#dee2e6",
|
|
487
|
+
textColor: "#adb5bd"
|
|
488
|
+
}
|
|
461
489
|
}
|
|
462
490
|
},
|
|
463
491
|
sizes: {
|
|
@@ -479,22 +507,66 @@ var component$1 = {
|
|
|
479
507
|
"default": {
|
|
480
508
|
backgroundColor: "#e9ecef",
|
|
481
509
|
textColor: "#212529",
|
|
482
|
-
borderRadius: "0.
|
|
510
|
+
borderRadius: "0.75rem",
|
|
483
511
|
padding: "2px 0.5rem",
|
|
484
512
|
font: "500 0.875rem/1.25rem 'Inter', sans-serif"
|
|
485
513
|
},
|
|
514
|
+
hover: {
|
|
515
|
+
backgroundColor: "#dee2e6"
|
|
516
|
+
},
|
|
517
|
+
active: {
|
|
518
|
+
backgroundColor: "#ced4da"
|
|
519
|
+
},
|
|
520
|
+
focus: {
|
|
521
|
+
outline: "0.125rem solid #343a40",
|
|
522
|
+
outlineOffset: "2px"
|
|
523
|
+
},
|
|
524
|
+
disabled: {
|
|
525
|
+
backgroundColor: "#e9ecef",
|
|
526
|
+
textColor: "#adb5bd"
|
|
527
|
+
},
|
|
486
528
|
variants: {
|
|
487
529
|
emphasis: {
|
|
488
530
|
backgroundColor: "#212529",
|
|
489
|
-
textColor: "#ffffff"
|
|
531
|
+
textColor: "#ffffff",
|
|
532
|
+
hover: {
|
|
533
|
+
backgroundColor: "#343a40"
|
|
534
|
+
},
|
|
535
|
+
active: {
|
|
536
|
+
backgroundColor: "#16191C"
|
|
537
|
+
},
|
|
538
|
+
disabled: {
|
|
539
|
+
backgroundColor: "#dee2e6",
|
|
540
|
+
textColor: "#adb5bd"
|
|
541
|
+
}
|
|
490
542
|
},
|
|
491
543
|
subtle: {
|
|
492
544
|
backgroundColor: "#ffffff",
|
|
493
|
-
textColor: "#212529"
|
|
545
|
+
textColor: "#212529",
|
|
546
|
+
hover: {
|
|
547
|
+
backgroundColor: "#f8f9fa"
|
|
548
|
+
},
|
|
549
|
+
active: {
|
|
550
|
+
backgroundColor: "#e9ecef"
|
|
551
|
+
},
|
|
552
|
+
disabled: {
|
|
553
|
+
backgroundColor: "#ffffff",
|
|
554
|
+
textColor: "#adb5bd"
|
|
555
|
+
}
|
|
494
556
|
},
|
|
495
557
|
interactive: {
|
|
496
558
|
backgroundColor: "#0265DC",
|
|
497
|
-
textColor: "#ffffff"
|
|
559
|
+
textColor: "#ffffff",
|
|
560
|
+
hover: {
|
|
561
|
+
backgroundColor: "#0054B6"
|
|
562
|
+
},
|
|
563
|
+
active: {
|
|
564
|
+
backgroundColor: "#004491"
|
|
565
|
+
},
|
|
566
|
+
disabled: {
|
|
567
|
+
backgroundColor: "#dee2e6",
|
|
568
|
+
textColor: "#adb5bd"
|
|
569
|
+
}
|
|
498
570
|
}
|
|
499
571
|
},
|
|
500
572
|
sizes: {
|
|
@@ -671,13 +743,32 @@ var component$1 = {
|
|
|
671
743
|
},
|
|
672
744
|
$ref: "./component/index.json"
|
|
673
745
|
};
|
|
674
|
-
var semantic$
|
|
746
|
+
var semantic$i = {
|
|
747
|
+
elevation: {
|
|
748
|
+
none: "none",
|
|
749
|
+
inset: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)",
|
|
750
|
+
raised: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
751
|
+
floating: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
752
|
+
overlay: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
753
|
+
sticky: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"
|
|
754
|
+
},
|
|
675
755
|
border: {
|
|
676
756
|
"default": "0.0625rem solid #e9ecef",
|
|
677
757
|
subtle: "0.0625rem solid #dee2e6",
|
|
678
758
|
strong: "0.0625rem solid #343a40",
|
|
679
759
|
focus: "0.125rem solid #343a40",
|
|
680
|
-
tooltip: "0.125rem dotted #dee2e6"
|
|
760
|
+
tooltip: "0.125rem dotted #dee2e6",
|
|
761
|
+
radius: {
|
|
762
|
+
none: "0",
|
|
763
|
+
xs: "0.125rem",
|
|
764
|
+
sm: "0.25rem",
|
|
765
|
+
md: "0.5rem",
|
|
766
|
+
lg: "0.75rem",
|
|
767
|
+
xl: "1rem",
|
|
768
|
+
"2xl": "1.5rem",
|
|
769
|
+
"3xl": "2rem",
|
|
770
|
+
circle: "10rem"
|
|
771
|
+
}
|
|
681
772
|
},
|
|
682
773
|
size: {
|
|
683
774
|
icon: {
|
|
@@ -856,11 +947,17 @@ var semantic$g = {
|
|
|
856
947
|
$ref: "./semantic/index.json"
|
|
857
948
|
};
|
|
858
949
|
var tokensData = {
|
|
859
|
-
base: base$
|
|
860
|
-
component: component$
|
|
861
|
-
semantic: semantic$
|
|
950
|
+
base: base$b,
|
|
951
|
+
component: component$2,
|
|
952
|
+
semantic: semantic$i
|
|
862
953
|
};
|
|
863
954
|
|
|
955
|
+
// Destructure tokens
|
|
956
|
+
var semantic$h = tokensData.semantic;
|
|
957
|
+
var color$a = semantic$h.color,
|
|
958
|
+
size$1 = semantic$h.size,
|
|
959
|
+
border$a = semantic$h.border;
|
|
960
|
+
var radius$6 = border$a.radius;
|
|
864
961
|
var AvatarContainer = styled.div.withConfig({
|
|
865
962
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
866
963
|
return !prop.startsWith('$');
|
|
@@ -869,25 +966,25 @@ var AvatarContainer = styled.div.withConfig({
|
|
|
869
966
|
componentId: "sc-ezn4ax-0"
|
|
870
967
|
})(templateObject_1$I || (templateObject_1$I = __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) {
|
|
871
968
|
var $size = _a.$size;
|
|
872
|
-
return
|
|
969
|
+
return size$1.avatar[$size];
|
|
873
970
|
}, function (_a) {
|
|
874
971
|
var $size = _a.$size;
|
|
875
|
-
return
|
|
876
|
-
},
|
|
972
|
+
return size$1.avatar[$size];
|
|
973
|
+
}, radius$6.circle, color$a.background.surface);
|
|
877
974
|
var AvatarImage = styled.img.withConfig({
|
|
878
975
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
879
976
|
return !prop.startsWith('$');
|
|
880
977
|
},
|
|
881
978
|
displayName: "Avatar__AvatarImage",
|
|
882
979
|
componentId: "sc-ezn4ax-1"
|
|
883
|
-
})(templateObject_2$t || (templateObject_2$t = __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"])),
|
|
980
|
+
})(templateObject_2$t || (templateObject_2$t = __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"])), radius$6.circle);
|
|
884
981
|
var AvatarInitials = styled.span.withConfig({
|
|
885
982
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
886
983
|
return !prop.startsWith('$');
|
|
887
984
|
},
|
|
888
985
|
displayName: "Avatar__AvatarInitials",
|
|
889
986
|
componentId: "sc-ezn4ax-2"
|
|
890
|
-
})(templateObject_3$
|
|
987
|
+
})(templateObject_3$q || (templateObject_3$q = __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"
|
|
891
988
|
// Helper function to get initials from name
|
|
892
989
|
])), tokensData.base.fontFamily.body, tokensData.base.fontWeight[3], function (_a) {
|
|
893
990
|
var $size = _a.$size;
|
|
@@ -899,7 +996,7 @@ var AvatarInitials = styled.span.withConfig({
|
|
|
899
996
|
xl: tokensData.base.fontSize[5]
|
|
900
997
|
};
|
|
901
998
|
return sizeMap[$size];
|
|
902
|
-
},
|
|
999
|
+
}, color$a.text["default"]);
|
|
903
1000
|
// Helper function to get initials from name
|
|
904
1001
|
var getInitials = function getInitials(name) {
|
|
905
1002
|
return name.split(' ').map(function (word) {
|
|
@@ -953,43 +1050,43 @@ var Avatar = function Avatar(_a) {
|
|
|
953
1050
|
})
|
|
954
1051
|
}));
|
|
955
1052
|
};
|
|
956
|
-
var templateObject_1$I, templateObject_2$t, templateObject_3$
|
|
1053
|
+
var templateObject_1$I, templateObject_2$t, templateObject_3$q;
|
|
957
1054
|
|
|
958
|
-
var _a$
|
|
959
|
-
typography$
|
|
960
|
-
color$
|
|
1055
|
+
var _a$7 = tokensData.semantic,
|
|
1056
|
+
typography$5 = _a$7.typography,
|
|
1057
|
+
color$9 = _a$7.color;
|
|
961
1058
|
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
962
1059
|
var styles = {
|
|
963
|
-
display: "font: ".concat(typography$
|
|
964
|
-
h1: "font: ".concat(typography$
|
|
965
|
-
h2: "font: ".concat(typography$
|
|
966
|
-
h3: "font: ".concat(typography$
|
|
967
|
-
h4: "font: ".concat(typography$
|
|
968
|
-
h5: "font: ".concat(typography$
|
|
969
|
-
h6: "font: ".concat(typography$
|
|
970
|
-
subtitle: "font: ".concat(typography$
|
|
971
|
-
body: "font: ".concat(typography$
|
|
972
|
-
small: "font: ".concat(typography$
|
|
973
|
-
overline: "font: ".concat(typography$
|
|
974
|
-
caption: "font: ".concat(typography$
|
|
975
|
-
button1: "font: ".concat(typography$
|
|
976
|
-
button2: "font: ".concat(typography$
|
|
977
|
-
button3: "font: ".concat(typography$
|
|
978
|
-
label: "font: ".concat(typography$
|
|
1060
|
+
display: "font: ".concat(typography$5.display, "; letter-spacing: ").concat(tokensData.base.letterSpacing[0], ";"),
|
|
1061
|
+
h1: "font: ".concat(typography$5.h1, "; letter-spacing: ").concat(tokensData.base.letterSpacing[0], ";"),
|
|
1062
|
+
h2: "font: ".concat(typography$5.h2, "; letter-spacing: ").concat(tokensData.base.letterSpacing[1], ";"),
|
|
1063
|
+
h3: "font: ".concat(typography$5.h3, "; letter-spacing: ").concat(tokensData.base.letterSpacing[1], ";"),
|
|
1064
|
+
h4: "font: ".concat(typography$5.h4, "; letter-spacing: ").concat(tokensData.base.letterSpacing[1], ";"),
|
|
1065
|
+
h5: "font: ".concat(typography$5.h5, "; letter-spacing: ").concat(tokensData.base.letterSpacing[2], ";"),
|
|
1066
|
+
h6: "font: ".concat(typography$5.h6, "; letter-spacing: ").concat(tokensData.base.letterSpacing[2], ";"),
|
|
1067
|
+
subtitle: "font: ".concat(typography$5.subtitle, ";"),
|
|
1068
|
+
body: "font: ".concat(typography$5.body, ";"),
|
|
1069
|
+
small: "font: ".concat(typography$5.small, ";"),
|
|
1070
|
+
overline: "font: ".concat(typography$5.overline, ";"),
|
|
1071
|
+
caption: "font: ".concat(typography$5.caption, "; text-transform: uppercase;"),
|
|
1072
|
+
button1: "font: ".concat(typography$5.button1, ";"),
|
|
1073
|
+
button2: "font: ".concat(typography$5.button2, ";"),
|
|
1074
|
+
button3: "font: ".concat(typography$5.button3, ";"),
|
|
1075
|
+
label: "font: ".concat(typography$5.label, ";")
|
|
979
1076
|
};
|
|
980
1077
|
return styles[variant] || styles.body;
|
|
981
1078
|
};
|
|
982
1079
|
var getTextColor = function getTextColor(colorVariant) {
|
|
983
1080
|
var colorMap = {
|
|
984
|
-
"default": color$
|
|
985
|
-
emphasis: color$
|
|
986
|
-
subdued: color$
|
|
987
|
-
inverse: color$
|
|
988
|
-
disabled: color$
|
|
989
|
-
interactive: color$
|
|
990
|
-
error: color$
|
|
991
|
-
success: color$
|
|
992
|
-
warning: color$
|
|
1081
|
+
"default": color$9.text["default"],
|
|
1082
|
+
emphasis: color$9.text.emphasis,
|
|
1083
|
+
subdued: color$9.text.subdued,
|
|
1084
|
+
inverse: color$9.text.inverse,
|
|
1085
|
+
disabled: color$9.text.disabled,
|
|
1086
|
+
interactive: color$9.text.interactive,
|
|
1087
|
+
error: color$9.text.error,
|
|
1088
|
+
success: color$9.text.success,
|
|
1089
|
+
warning: color$9.text.warning
|
|
993
1090
|
};
|
|
994
1091
|
return colorMap[colorVariant] || colorMap["default"];
|
|
995
1092
|
};
|
|
@@ -1090,8 +1187,10 @@ var Typography = function Typography(_a) {
|
|
|
1090
1187
|
};
|
|
1091
1188
|
var templateObject_1$H;
|
|
1092
1189
|
|
|
1093
|
-
var
|
|
1094
|
-
|
|
1190
|
+
var semantic$g = tokensData.semantic;
|
|
1191
|
+
var color$8 = semantic$g.color,
|
|
1192
|
+
border$9 = semantic$g.border;
|
|
1193
|
+
var radius$5 = border$9.radius;
|
|
1095
1194
|
var scaleIn$1 = keyframes(templateObject_1$G || (templateObject_1$G = __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"])));
|
|
1096
1195
|
var BadgeWrapper = styled.span.withConfig({
|
|
1097
1196
|
displayName: "Badge__BadgeWrapper",
|
|
@@ -1103,7 +1202,7 @@ var BadgeIndicator = styled.span.withConfig({
|
|
|
1103
1202
|
},
|
|
1104
1203
|
displayName: "Badge__BadgeIndicator",
|
|
1105
1204
|
componentId: "sc-tjz4pp-1"
|
|
1106
|
-
})(templateObject_3$
|
|
1205
|
+
})(templateObject_3$p || (templateObject_3$p = __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) {
|
|
1107
1206
|
return props.$isVisible ? 'flex' : 'none';
|
|
1108
1207
|
}, function (props) {
|
|
1109
1208
|
return props.$isDot ? '8px' : '16px';
|
|
@@ -1111,24 +1210,24 @@ var BadgeIndicator = styled.span.withConfig({
|
|
|
1111
1210
|
return props.$isDot ? '8px' : '16px';
|
|
1112
1211
|
}, function (props) {
|
|
1113
1212
|
return props.$isDot ? '0' : '0 4px';
|
|
1114
|
-
},
|
|
1213
|
+
}, radius$5.circle, color$8.background["default"], scaleIn$1, function (props) {
|
|
1115
1214
|
switch (props.$variant) {
|
|
1116
1215
|
case 'primary':
|
|
1117
|
-
return "\n background-color: ".concat(color$
|
|
1216
|
+
return "\n background-color: ".concat(color$8.background.interactive, ";\n color: ").concat(color$8.text.inverse, ";\n ");
|
|
1118
1217
|
case 'error':
|
|
1119
|
-
return "\n background-color: ".concat(color$
|
|
1218
|
+
return "\n background-color: ".concat(color$8.background.error, ";\n color: ").concat(color$8.text.inverse, ";\n ");
|
|
1120
1219
|
case 'warning':
|
|
1121
|
-
return "\n background-color: ".concat(color$
|
|
1220
|
+
return "\n background-color: ".concat(color$8.background.warning, ";\n color: ").concat(color$8.text.inverse, ";\n ");
|
|
1122
1221
|
case 'success':
|
|
1123
|
-
return "\n background-color: ".concat(color$
|
|
1222
|
+
return "\n background-color: ".concat(color$8.background.success, ";\n color: ").concat(color$8.text.inverse, ";\n ");
|
|
1124
1223
|
default:
|
|
1125
|
-
return "\n background-color: ".concat(color$
|
|
1224
|
+
return "\n background-color: ".concat(color$8.background.emphasis, ";\n color: ").concat(color$8.text.inverse, ";\n ");
|
|
1126
1225
|
}
|
|
1127
1226
|
});
|
|
1128
1227
|
var ScreenReaderOnly$1 = styled.span.withConfig({
|
|
1129
1228
|
displayName: "Badge__ScreenReaderOnly",
|
|
1130
1229
|
componentId: "sc-tjz4pp-2"
|
|
1131
|
-
})(templateObject_4$
|
|
1230
|
+
})(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n"], ["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n"])));
|
|
1132
1231
|
var Badge = function Badge(_a) {
|
|
1133
1232
|
var children = _a.children,
|
|
1134
1233
|
_b = _a.count,
|
|
@@ -1164,7 +1263,7 @@ var Badge = function Badge(_a) {
|
|
|
1164
1263
|
})]
|
|
1165
1264
|
});
|
|
1166
1265
|
};
|
|
1167
|
-
var templateObject_1$G, templateObject_2$s, templateObject_3$
|
|
1266
|
+
var templateObject_1$G, templateObject_2$s, templateObject_3$p, templateObject_4$k;
|
|
1168
1267
|
|
|
1169
1268
|
var StyledBox = styled.div.withConfig({
|
|
1170
1269
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1172,16 +1271,16 @@ var StyledBox = styled.div.withConfig({
|
|
|
1172
1271
|
},
|
|
1173
1272
|
displayName: "Box__StyledBox",
|
|
1174
1273
|
componentId: "sc-aj0jhd-0"
|
|
1175
|
-
})(templateObject_49 || (templateObject_49 = __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 //
|
|
1274
|
+
})(templateObject_49 || (templateObject_49 = __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 // Elevation (shadow)\n ", "\n \n // Cursor\n ", "\n \n // Transition\n ", "\n \n // Hover states\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 // Elevation (shadow)\n ", "\n \n // Cursor\n ", "\n \n // Transition\n ", "\n \n // Hover states\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"
|
|
1176
1275
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
1177
1276
|
])), function (props) {
|
|
1178
1277
|
return props.$display && css(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
1179
1278
|
}, function (props) {
|
|
1180
1279
|
return props.$flexDirection && css(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
1181
1280
|
}, function (props) {
|
|
1182
|
-
return props.$justifyContent && css(templateObject_3$
|
|
1281
|
+
return props.$justifyContent && css(templateObject_3$o || (templateObject_3$o = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
1183
1282
|
}, function (props) {
|
|
1184
|
-
return props.$alignItems && css(templateObject_4$
|
|
1283
|
+
return props.$alignItems && css(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
1185
1284
|
}, function (props) {
|
|
1186
1285
|
return props.$flexWrap && css(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
1187
1286
|
}, function (props) {
|
|
@@ -1191,9 +1290,9 @@ var StyledBox = styled.div.withConfig({
|
|
|
1191
1290
|
}, function (props) {
|
|
1192
1291
|
return props.$mt && css(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject(["margin-top: ", ";"], ["margin-top: ", ";"])), tokensData.semantic.spacing.layout[props.$mt]);
|
|
1193
1292
|
}, function (props) {
|
|
1194
|
-
return props.$mr && css(templateObject_9$
|
|
1293
|
+
return props.$mr && css(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["margin-right: ", ";"], ["margin-right: ", ";"])), tokensData.semantic.spacing.layout[props.$mr]);
|
|
1195
1294
|
}, function (props) {
|
|
1196
|
-
return props.$mb && css(templateObject_10$
|
|
1295
|
+
return props.$mb && css(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["margin-bottom: ", ";"], ["margin-bottom: ", ";"])), tokensData.semantic.spacing.layout[props.$mb]);
|
|
1197
1296
|
}, function (props) {
|
|
1198
1297
|
return props.$ml && css(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["margin-left: ", ";"], ["margin-left: ", ";"])), tokensData.semantic.spacing.layout[props.$ml]);
|
|
1199
1298
|
}, function (props) {
|
|
@@ -1237,7 +1336,7 @@ var StyledBox = styled.div.withConfig({
|
|
|
1237
1336
|
}, function (props) {
|
|
1238
1337
|
return props.$left && css(templateObject_31$1 || (templateObject_31$1 = __makeTemplateObject(["left: ", ";"], ["left: ", ";"])), props.$left);
|
|
1239
1338
|
}, function (props) {
|
|
1240
|
-
return props.$borderRadius && css(templateObject_32$1 || (templateObject_32$1 = __makeTemplateObject(["border-radius: ", ";"], ["border-radius: ", ";"])), tokensData.
|
|
1339
|
+
return props.$borderRadius && css(templateObject_32$1 || (templateObject_32$1 = __makeTemplateObject(["border-radius: ", ";"], ["border-radius: ", ";"])), tokensData.semantic.border.radius[props.$borderRadius]);
|
|
1241
1340
|
}, function (props) {
|
|
1242
1341
|
return props.$border && css(templateObject_33$1 || (templateObject_33$1 = __makeTemplateObject(["border: 1px solid ", ";"], ["border: 1px solid ", ";"])), tokensData.semantic.color.border[props.$border]);
|
|
1243
1342
|
}, function (props) {
|
|
@@ -1253,13 +1352,13 @@ var StyledBox = styled.div.withConfig({
|
|
|
1253
1352
|
}, function (props) {
|
|
1254
1353
|
return props.$color && css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), tokensData.semantic.color.text[props.$color]);
|
|
1255
1354
|
}, function (props) {
|
|
1256
|
-
return props.$shadow && css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["box-shadow: ", ";"], ["box-shadow: ", ";"])), tokensData.
|
|
1355
|
+
return props.$shadow && css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["box-shadow: ", ";"], ["box-shadow: ", ";"])), tokensData.semantic.elevation[props.$shadow]);
|
|
1257
1356
|
}, function (props) {
|
|
1258
1357
|
return props.$cursor && css(templateObject_41 || (templateObject_41 = __makeTemplateObject(["cursor: ", ";"], ["cursor: ", ";"])), props.$cursor);
|
|
1259
1358
|
}, function (props) {
|
|
1260
1359
|
return props.$transition && css(templateObject_42 || (templateObject_42 = __makeTemplateObject(["transition: ", ";"], ["transition: ", ";"])), props.$transition);
|
|
1261
1360
|
}, function (props) {
|
|
1262
|
-
return (props.$hoverShadow || props.$hoverTransform) && css(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n &:hover {\n ", "\n ", "\n }\n \n &:active {\n transform: translateY(0);\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n "], ["\n &:hover {\n ", "\n ", "\n }\n \n &:active {\n transform: translateY(0);\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n "])), props.$hoverShadow && css(templateObject_43 || (templateObject_43 = __makeTemplateObject(["box-shadow: ", ";"], ["box-shadow: ", ";"])), tokensData.
|
|
1361
|
+
return (props.$hoverShadow || props.$hoverTransform) && css(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n &:hover {\n ", "\n ", "\n }\n \n &:active {\n transform: translateY(0);\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n "], ["\n &:hover {\n ", "\n ", "\n }\n \n &:active {\n transform: translateY(0);\n }\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n "])), props.$hoverShadow && css(templateObject_43 || (templateObject_43 = __makeTemplateObject(["box-shadow: ", ";"], ["box-shadow: ", ";"])), tokensData.semantic.elevation[props.$hoverShadow]), props.$hoverTransform && css(templateObject_44 || (templateObject_44 = __makeTemplateObject(["transform: ", ";"], ["transform: ", ";"])), props.$hoverTransform), tokensData.semantic.color.border.interactive);
|
|
1263
1362
|
}, function (props) {
|
|
1264
1363
|
return props.$overflow && css(templateObject_46 || (templateObject_46 = __makeTemplateObject(["overflow: ", ";"], ["overflow: ", ";"])), props.$overflow);
|
|
1265
1364
|
}, function (props) {
|
|
@@ -1399,14 +1498,14 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
1399
1498
|
}));
|
|
1400
1499
|
};
|
|
1401
1500
|
var Box = BoxTransform;
|
|
1402
|
-
var templateObject_1$F, templateObject_2$r, templateObject_3$
|
|
1501
|
+
var templateObject_1$F, templateObject_2$r, templateObject_3$o, templateObject_4$j, templateObject_5$e, templateObject_6$c, templateObject_7$9, templateObject_8$5, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, 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, templateObject_44, templateObject_45, templateObject_46, templateObject_47, templateObject_48, templateObject_49;
|
|
1403
1502
|
|
|
1404
1503
|
var add = {
|
|
1405
1504
|
path: "M13 11H19V13H13V19H11V13H5V11H11V5H13V11Z",
|
|
1406
1505
|
name: "add"
|
|
1407
1506
|
};
|
|
1408
1507
|
var addRing = {
|
|
1409
|
-
path: "
|
|
1508
|
+
path: "M13 11H16V13H13V16H11V13H8V11H11V8H13V11Z M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z",
|
|
1410
1509
|
name: "addRing"
|
|
1411
1510
|
};
|
|
1412
1511
|
var arrowDown = {
|
|
@@ -1426,7 +1525,7 @@ var arrowRight = {
|
|
|
1426
1525
|
name: "arrowRight"
|
|
1427
1526
|
};
|
|
1428
1527
|
var bell = {
|
|
1429
|
-
path: "M12
|
|
1528
|
+
path: "M12.0001 2C15.3561 2 18.1753 4.52384 18.546 7.85938L18.7979 10.125C18.8012 10.1546 18.8024 10.1676 18.8038 10.1797C18.9166 11.1628 19.2372 12.1106 19.7432 12.9609C19.7494 12.9714 19.7553 12.9824 19.7706 13.0078L20.3487 13.9707C20.5997 14.3891 20.829 14.7681 20.9795 15.0879C21.1276 15.4024 21.2852 15.8285 21.209 16.3115C21.1337 16.789 20.8882 17.2229 20.5176 17.5332C20.1426 17.8471 19.6956 17.931 19.3497 17.9658C18.998 18.0012 18.5554 18 18.0674 18H5.93268C5.44476 18 5.00211 18.0012 4.65045 17.9658C4.30456 17.931 3.85755 17.8471 3.48248 17.5332C3.1119 17.2229 2.86641 16.789 2.79107 16.3115C2.7149 15.8285 2.87247 15.4024 3.02057 15.0879C3.17116 14.7681 3.40038 14.3891 3.65143 13.9707L4.22955 13.0078C4.24481 12.9824 4.25068 12.9714 4.25689 12.9609C4.76296 12.1106 5.08348 11.1628 5.19635 10.1797C5.19773 10.1676 5.19892 10.1546 5.20221 10.125L5.45416 7.85938C5.82477 4.52384 8.644 2 12.0001 2ZM12.0001 4C9.6631 4 7.69954 5.75741 7.44146 8.08008L7.18951 10.3457C7.18638 10.3739 7.18457 10.3907 7.18268 10.4072C7.03761 11.6714 6.62638 12.8909 5.97564 13.9844C5.96724 13.9985 5.95885 14.013 5.94439 14.0371L5.36627 15C5.09277 15.4558 4.92766 15.7334 4.83014 15.9404C4.82533 15.9506 4.82155 15.9606 4.81744 15.9697C4.82787 15.971 4.83877 15.9744 4.85064 15.9756C5.07838 15.9985 5.40111 16 5.93268 16H18.0674C18.599 16 18.9217 15.9985 19.1495 15.9756C19.161 15.9744 19.1716 15.9709 19.1817 15.9697C19.1776 15.9607 19.1747 15.9505 19.17 15.9404C19.0725 15.7334 18.9074 15.4558 18.6338 15L18.0557 14.0371C18.0413 14.013 18.0329 13.9985 18.0245 13.9844C17.3737 12.8909 16.9625 11.6714 16.8174 10.4072C16.8155 10.3907 16.8137 10.3739 16.8106 10.3457L16.5587 8.08008C16.3006 5.75741 14.337 4 12.0001 4Z M12.0001 22C10.9897 22 10.0894 21.4972 9.419 20.7256C8.75348 19.9595 8.31404 18.9367 8.11822 17.8408C8.0211 17.2971 8.38314 16.7778 8.92682 16.6807C9.47038 16.5837 9.98987 16.9457 10.087 17.4893C10.233 18.3066 10.5467 18.9742 10.9288 19.4141C11.3063 19.8486 11.6896 20 12.0001 20C12.3106 20 12.6938 19.8486 13.0713 19.4141C13.4535 18.9742 13.7671 18.3066 13.9131 17.4893C14.0102 16.9457 14.5297 16.5837 15.0733 16.6807C15.617 16.7778 15.979 17.2971 15.8819 17.8408C15.6861 18.9367 15.2466 19.9595 14.5811 20.7256C13.9108 21.4972 13.0104 22 12.0001 22Z",
|
|
1430
1529
|
name: "bell"
|
|
1431
1530
|
};
|
|
1432
1531
|
var back = {
|
|
@@ -1462,7 +1561,7 @@ var close = {
|
|
|
1462
1561
|
name: "close"
|
|
1463
1562
|
};
|
|
1464
1563
|
var crossCircle = {
|
|
1465
|
-
path: "
|
|
1564
|
+
path: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM15.707 9.70703L13.4141 12L15.707 14.293L14.293 15.707L12 13.4141L9.70703 15.707L8.29297 14.293L10.5859 12L8.29297 9.70703L9.70703 8.29297L12 10.5859L14.293 8.29297L15.707 9.70703Z",
|
|
1466
1565
|
name: "crossCircle"
|
|
1467
1566
|
};
|
|
1468
1567
|
var directionRight = {
|
|
@@ -1697,12 +1796,55 @@ var button = tokensData.component.button,
|
|
|
1697
1796
|
// Base styles shared between button and link
|
|
1698
1797
|
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokensData.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$f.motion.hover, ";\n white-space: nowrap;\n user-select: none;\n \n &:focus {\n outline: ").concat(button.focus.outline, ";\n outline-offset: ").concat(button.focus.outlineOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n");
|
|
1699
1798
|
// Dynamic variant styles using component tokens
|
|
1700
|
-
var getVariantStyles = function getVariantStyles(_a) {
|
|
1799
|
+
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
1701
1800
|
var $variant = _a.$variant;
|
|
1702
|
-
|
|
1801
|
+
var variantConfig = {
|
|
1802
|
+
primary: {
|
|
1803
|
+
bg: button.primary.backgroundColor,
|
|
1804
|
+
text: button.primary.textColor,
|
|
1805
|
+
hoverBg: button.hover.backgroundColor,
|
|
1806
|
+
activeBg: button.active.backgroundColor,
|
|
1807
|
+
disabledBg: button.disabled.backgroundColor,
|
|
1808
|
+
disabledText: button.disabled.textColor
|
|
1809
|
+
},
|
|
1810
|
+
secondary: {
|
|
1811
|
+
bg: button.variants.secondary.backgroundColor,
|
|
1812
|
+
text: button.variants.secondary.textColor,
|
|
1813
|
+
hoverBg: button.variants.secondary.hover.backgroundColor,
|
|
1814
|
+
activeBg: button.variants.secondary.active.backgroundColor,
|
|
1815
|
+
disabledBg: button.variants.secondary.disabled.backgroundColor,
|
|
1816
|
+
disabledText: button.variants.secondary.disabled.textColor
|
|
1817
|
+
},
|
|
1818
|
+
naked: {
|
|
1819
|
+
bg: button.variants.naked.backgroundColor,
|
|
1820
|
+
text: button.variants.naked.textColor,
|
|
1821
|
+
hoverBg: button.variants.naked.hover.backgroundColor,
|
|
1822
|
+
activeBg: button.variants.naked.active.backgroundColor,
|
|
1823
|
+
disabledBg: button.variants.naked.disabled.backgroundColor,
|
|
1824
|
+
disabledText: button.variants.naked.disabled.textColor
|
|
1825
|
+
},
|
|
1826
|
+
emphasis: {
|
|
1827
|
+
bg: button.variants.emphasis.backgroundColor,
|
|
1828
|
+
text: button.variants.emphasis.textColor,
|
|
1829
|
+
hoverBg: button.variants.emphasis.hover.backgroundColor,
|
|
1830
|
+
activeBg: button.variants.emphasis.active.backgroundColor,
|
|
1831
|
+
disabledBg: button.variants.emphasis.disabled.backgroundColor,
|
|
1832
|
+
disabledText: button.variants.emphasis.disabled.textColor
|
|
1833
|
+
},
|
|
1834
|
+
danger: {
|
|
1835
|
+
bg: button.variants.danger.backgroundColor,
|
|
1836
|
+
text: button.variants.danger.textColor,
|
|
1837
|
+
hoverBg: button.variants.danger.hover.backgroundColor,
|
|
1838
|
+
activeBg: button.variants.danger.active.backgroundColor,
|
|
1839
|
+
disabledBg: button.variants.danger.disabled.backgroundColor,
|
|
1840
|
+
disabledText: button.variants.danger.disabled.textColor
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
1843
|
+
var config = variantConfig[$variant];
|
|
1844
|
+
return "\n background-color: ".concat(config.bg, ";\n color: ").concat(config.text, ";\n \n &:hover:not(:disabled) {\n background-color: ").concat(config.hoverBg, ";\n }\n\n &:active:not(:disabled) {\n background-color: ").concat(config.activeBg, ";\n }\n\n &:disabled {\n background-color: ").concat(config.disabledBg, ";\n color: ").concat(config.disabledText, ";\n }\n ");
|
|
1703
1845
|
};
|
|
1704
1846
|
// Dynamic size styles using component tokens
|
|
1705
|
-
var getSizeStyles$
|
|
1847
|
+
var getSizeStyles$1 = function getSizeStyles(_a) {
|
|
1706
1848
|
var $size = _a.$size;
|
|
1707
1849
|
switch ($size) {
|
|
1708
1850
|
case 'small':
|
|
@@ -1721,7 +1863,7 @@ var StyledButton = styled.button.withConfig({
|
|
|
1721
1863
|
},
|
|
1722
1864
|
displayName: "Button__StyledButton",
|
|
1723
1865
|
componentId: "sc-1eiuum9-0"
|
|
1724
|
-
})(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles$
|
|
1866
|
+
})(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
1725
1867
|
var StyledLink = styled.a.withConfig({
|
|
1726
1868
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1727
1869
|
return !prop.startsWith('$');
|
|
@@ -1730,7 +1872,7 @@ var StyledLink = styled.a.withConfig({
|
|
|
1730
1872
|
componentId: "sc-1eiuum9-1"
|
|
1731
1873
|
})(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
1732
1874
|
// Helper function to get icon size based on button size
|
|
1733
|
-
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles, getSizeStyles$
|
|
1875
|
+
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
1734
1876
|
// Helper function to get icon size based on button size
|
|
1735
1877
|
var getIconSize = function getIconSize(buttonSize) {
|
|
1736
1878
|
switch (buttonSize) {
|
|
@@ -1832,61 +1974,27 @@ var Button = function Button(_a) {
|
|
|
1832
1974
|
var templateObject_1$D, templateObject_2$q;
|
|
1833
1975
|
|
|
1834
1976
|
var semantic$e = tokensData.semantic,
|
|
1835
|
-
base$
|
|
1836
|
-
var
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
};
|
|
1844
|
-
}
|
|
1845
|
-
if (variant === 'outlined') {
|
|
1846
|
-
return {
|
|
1847
|
-
backgroundColor: 'transparent',
|
|
1848
|
-
color: semantic$e.color.category[colorKey],
|
|
1849
|
-
borderColor: semantic$e.color.category[colorKey]
|
|
1850
|
-
};
|
|
1851
|
-
}
|
|
1852
|
-
// minimal
|
|
1853
|
-
return {
|
|
1854
|
-
backgroundColor: semantic$e.color.category["".concat(colorKey, "-subtle")],
|
|
1855
|
-
color: semantic$e.color.category[colorKey],
|
|
1856
|
-
borderColor: 'transparent'
|
|
1857
|
-
};
|
|
1858
|
-
};
|
|
1859
|
-
var getSizeStyles$1 = function getSizeStyles(size) {
|
|
1860
|
-
if (size === 'small') {
|
|
1861
|
-
return {
|
|
1862
|
-
height: '24px',
|
|
1863
|
-
padding: "".concat(base$c.spacing[1], " ").concat(base$c.spacing[2]),
|
|
1864
|
-
font: semantic$e.typography.caption,
|
|
1865
|
-
gap: base$c.spacing[1],
|
|
1866
|
-
iconSize: 'xs'
|
|
1867
|
-
};
|
|
1868
|
-
}
|
|
1869
|
-
// medium
|
|
1870
|
-
return {
|
|
1871
|
-
height: '32px',
|
|
1872
|
-
padding: "".concat(base$c.spacing[2], " ").concat(base$c.spacing[3]),
|
|
1873
|
-
font: semantic$e.typography.small,
|
|
1874
|
-
gap: base$c.spacing[1],
|
|
1875
|
-
iconSize: 'sm'
|
|
1876
|
-
};
|
|
1877
|
-
};
|
|
1977
|
+
base$a = tokensData.base;
|
|
1978
|
+
var color$7 = semantic$e.color,
|
|
1979
|
+
typography$4 = semantic$e.typography,
|
|
1980
|
+
border$8 = semantic$e.border,
|
|
1981
|
+
spacing$7 = semantic$e.spacing;
|
|
1982
|
+
var category = color$7.category;
|
|
1983
|
+
var radius$4 = border$8.radius;
|
|
1984
|
+
var layout$3 = spacing$7.layout;
|
|
1878
1985
|
var StyledCategoryBadge = styled.span.withConfig({
|
|
1879
1986
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1880
1987
|
return !prop.startsWith('$');
|
|
1881
1988
|
},
|
|
1882
1989
|
displayName: "CategoryBadge__StyledCategoryBadge",
|
|
1883
1990
|
componentId: "sc-17aslpn-0"
|
|
1884
|
-
})(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n font-weight: ", ";\n white-space: nowrap;\n user-select: none;\n
|
|
1991
|
+
})(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n font-weight: ", ";\n white-space: nowrap;\n user-select: none;\n border-style: solid;\n border-width: ", ";\n \n /* Size styles */\n height: ", ";\n padding: ", ";\n font: ", ";\n gap: ", ";\n \n /* Variant + Color styles */\n background-color: ", ";\n \n color: ", ";\n \n border-color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n font-weight: ", ";\n white-space: nowrap;\n user-select: none;\n border-style: solid;\n border-width: ", ";\n \n /* Size styles */\n height: ", ";\n padding: ", ";\n font: ", ";\n gap: ", ";\n \n /* Variant + Color styles */\n background-color: ", ";\n \n color: ", ";\n \n border-color: ", ";\n"
|
|
1885
1992
|
/**
|
|
1886
1993
|
* CategoryBadge component for displaying transaction categories
|
|
1887
1994
|
*
|
|
1888
|
-
*
|
|
1889
|
-
*
|
|
1995
|
+
* A static label for categorizing content with support for 8 color options,
|
|
1996
|
+
* 3 visual variants, and optional icons. Perfect for categorizing
|
|
1997
|
+
* financial transactions or content types.
|
|
1890
1998
|
*
|
|
1891
1999
|
* @example
|
|
1892
2000
|
* ```tsx
|
|
@@ -1894,23 +2002,51 @@ var StyledCategoryBadge = styled.span.withConfig({
|
|
|
1894
2002
|
* Food & Dining
|
|
1895
2003
|
* </CategoryBadge>
|
|
1896
2004
|
*
|
|
1897
|
-
* <CategoryBadge
|
|
1898
|
-
* color="blue"
|
|
1899
|
-
* variant="outlined"
|
|
1900
|
-
* size="small"
|
|
1901
|
-
* onClick={() => filterByCategory('travel')}
|
|
1902
|
-
* >
|
|
2005
|
+
* <CategoryBadge color="blue" variant="outlined" size="small">
|
|
1903
2006
|
* Travel
|
|
1904
2007
|
* </CategoryBadge>
|
|
1905
2008
|
* ```
|
|
1906
|
-
*/])),
|
|
1907
|
-
|
|
1908
|
-
|
|
2009
|
+
*/])), radius$4.circle, base$a.fontWeight[3], base$a.border.width[1], function (_a) {
|
|
2010
|
+
var $size = _a.$size;
|
|
2011
|
+
return $size === 'small' ? '24px' : '32px';
|
|
2012
|
+
}, function (_a) {
|
|
2013
|
+
var $size = _a.$size;
|
|
2014
|
+
return $size === 'small' ? "".concat(layout$3.xs, " ").concat(layout$3.sm) : "".concat(layout$3.sm, " ").concat(layout$3.md);
|
|
2015
|
+
}, function (_a) {
|
|
2016
|
+
var $size = _a.$size;
|
|
2017
|
+
return $size === 'small' ? typography$4.caption : typography$4.small;
|
|
2018
|
+
}, layout$3.xs, function (_a) {
|
|
2019
|
+
var $color = _a.$color,
|
|
2020
|
+
$variant = _a.$variant;
|
|
2021
|
+
if ($variant === 'filled') {
|
|
2022
|
+
return category["".concat($color, "-emphasis")];
|
|
2023
|
+
}
|
|
2024
|
+
if ($variant === 'outlined') {
|
|
2025
|
+
return 'transparent';
|
|
2026
|
+
}
|
|
2027
|
+
// minimal
|
|
2028
|
+
return category["".concat($color, "-subtle")];
|
|
2029
|
+
}, function (_a) {
|
|
2030
|
+
var $color = _a.$color,
|
|
2031
|
+
$variant = _a.$variant;
|
|
2032
|
+
if ($variant === 'filled') {
|
|
2033
|
+
return color$7.text.inverse;
|
|
2034
|
+
}
|
|
2035
|
+
return category[$color];
|
|
2036
|
+
}, function (_a) {
|
|
2037
|
+
var $color = _a.$color,
|
|
2038
|
+
$variant = _a.$variant;
|
|
2039
|
+
if ($variant === 'outlined') {
|
|
2040
|
+
return category[$color];
|
|
2041
|
+
}
|
|
2042
|
+
return 'transparent';
|
|
2043
|
+
});
|
|
1909
2044
|
/**
|
|
1910
2045
|
* CategoryBadge component for displaying transaction categories
|
|
1911
2046
|
*
|
|
1912
|
-
*
|
|
1913
|
-
*
|
|
2047
|
+
* A static label for categorizing content with support for 8 color options,
|
|
2048
|
+
* 3 visual variants, and optional icons. Perfect for categorizing
|
|
2049
|
+
* financial transactions or content types.
|
|
1914
2050
|
*
|
|
1915
2051
|
* @example
|
|
1916
2052
|
* ```tsx
|
|
@@ -1918,12 +2054,7 @@ var StyledCategoryBadge = styled.span.withConfig({
|
|
|
1918
2054
|
* Food & Dining
|
|
1919
2055
|
* </CategoryBadge>
|
|
1920
2056
|
*
|
|
1921
|
-
* <CategoryBadge
|
|
1922
|
-
* color="blue"
|
|
1923
|
-
* variant="outlined"
|
|
1924
|
-
* size="small"
|
|
1925
|
-
* onClick={() => filterByCategory('travel')}
|
|
1926
|
-
* >
|
|
2057
|
+
* <CategoryBadge color="blue" variant="outlined" size="small">
|
|
1927
2058
|
* Travel
|
|
1928
2059
|
* </CategoryBadge>
|
|
1929
2060
|
* ```
|
|
@@ -1937,54 +2068,18 @@ var CategoryBadge = function CategoryBadge(_a) {
|
|
|
1937
2068
|
_d = _a.size,
|
|
1938
2069
|
size = _d === void 0 ? 'medium' : _d,
|
|
1939
2070
|
icon = _a.icon,
|
|
1940
|
-
onClick = _a.onClick,
|
|
1941
|
-
_e = _a.disabled,
|
|
1942
|
-
disabled = _e === void 0 ? false : _e,
|
|
1943
2071
|
dataTestId = _a["data-testid"],
|
|
1944
2072
|
ariaLabel = _a["aria-label"];
|
|
1945
|
-
var
|
|
1946
|
-
var isClickable = hasClickHandler && !disabled;
|
|
1947
|
-
var colorStyles = getColorStyles(color, variant);
|
|
1948
|
-
var sizeStyles = getSizeStyles$1(size);
|
|
1949
|
-
var cssProps = {
|
|
1950
|
-
'--category-badge-bg': colorStyles.backgroundColor,
|
|
1951
|
-
'--category-badge-color': colorStyles.color,
|
|
1952
|
-
'--category-badge-border': colorStyles.borderColor,
|
|
1953
|
-
'--category-badge-height': sizeStyles.height,
|
|
1954
|
-
'--category-badge-padding': sizeStyles.padding,
|
|
1955
|
-
'--category-badge-font': sizeStyles.font,
|
|
1956
|
-
'--category-badge-gap': sizeStyles.gap,
|
|
1957
|
-
'--category-badge-opacity': disabled ? '0.6' : '1',
|
|
1958
|
-
'--category-badge-cursor': disabled ? 'not-allowed' : isClickable ? 'pointer' : 'default'
|
|
1959
|
-
};
|
|
1960
|
-
var handleClick = function handleClick() {
|
|
1961
|
-
if (isClickable) {
|
|
1962
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
1963
|
-
}
|
|
1964
|
-
};
|
|
1965
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
1966
|
-
if (isClickable && (event.key === 'Enter' || event.key === ' ')) {
|
|
1967
|
-
event.preventDefault();
|
|
1968
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
1969
|
-
}
|
|
1970
|
-
};
|
|
2073
|
+
var iconSize = size === 'small' ? 'xs' : 'sm';
|
|
1971
2074
|
return jsxs(StyledCategoryBadge, {
|
|
1972
2075
|
"$color": color,
|
|
1973
2076
|
"$variant": variant,
|
|
1974
2077
|
"$size": size,
|
|
1975
|
-
"$clickable": isClickable,
|
|
1976
|
-
"$disabled": disabled,
|
|
1977
|
-
onClick: handleClick,
|
|
1978
|
-
onKeyDown: handleKeyDown,
|
|
1979
|
-
tabIndex: hasClickHandler ? 0 : undefined,
|
|
1980
|
-
role: hasClickHandler ? 'button' : undefined,
|
|
1981
2078
|
"aria-label": ariaLabel,
|
|
1982
|
-
"aria-disabled": disabled,
|
|
1983
2079
|
"data-testid": dataTestId,
|
|
1984
|
-
style: cssProps,
|
|
1985
2080
|
children: [icon && jsx(Icon, {
|
|
1986
2081
|
name: icon,
|
|
1987
|
-
size:
|
|
2082
|
+
size: iconSize,
|
|
1988
2083
|
iconColor: variant === 'filled' ? 'inverse' : 'inherit',
|
|
1989
2084
|
"aria-hidden": "true"
|
|
1990
2085
|
}), children]
|
|
@@ -1994,73 +2089,59 @@ CategoryBadge.displayName = 'CategoryBadge';
|
|
|
1994
2089
|
var templateObject_1$C;
|
|
1995
2090
|
|
|
1996
2091
|
var chip = tokensData.component.chip;
|
|
1997
|
-
// Helper function to get variant styles
|
|
1998
|
-
var
|
|
2092
|
+
// Helper function to get variant styles matching Button's approach
|
|
2093
|
+
var getVariantStyles = function getVariantStyles(_a) {
|
|
2094
|
+
var $variant = _a.$variant,
|
|
2095
|
+
$selected = _a.$selected,
|
|
2096
|
+
$clickable = _a.$clickable,
|
|
2097
|
+
$disabled = _a.$disabled;
|
|
1999
2098
|
// Boolean chips with selected state get special background
|
|
2000
|
-
if (selected) {
|
|
2001
|
-
return {
|
|
2002
|
-
backgroundColor: tokensData.semantic.color.background['interactive-subtle'],
|
|
2003
|
-
color: chip["default"].textColor
|
|
2004
|
-
};
|
|
2099
|
+
if ($selected) {
|
|
2100
|
+
return "\n background-color: ".concat(tokensData.semantic.color.background['interactive-subtle'], ";\n color: ").concat(chip["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? tokensData.semantic.color.background['interactive-subtle'] : $clickable ? '#CAE8FF' : tokensData.semantic.color.background['interactive-subtle'], ";\n }\n \n &:active {\n background-color: ").concat($disabled ? tokensData.semantic.color.background['interactive-subtle'] : $clickable ? '#B5DEFF' : tokensData.semantic.color.background['interactive-subtle'], ";\n }\n ");
|
|
2005
2101
|
}
|
|
2006
|
-
switch (variant) {
|
|
2102
|
+
switch ($variant) {
|
|
2007
2103
|
case 'emphasis':
|
|
2008
|
-
return {
|
|
2009
|
-
backgroundColor: chip.variants.emphasis.backgroundColor,
|
|
2010
|
-
color: chip.variants.emphasis.textColor
|
|
2011
|
-
};
|
|
2104
|
+
return "\n background-color: ".concat(chip.variants.emphasis.backgroundColor, ";\n color: ").concat(chip.variants.emphasis.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.variants.emphasis.disabled.backgroundColor : $clickable ? chip.variants.emphasis.hover.backgroundColor : chip.variants.emphasis.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.variants.emphasis.disabled.backgroundColor : $clickable ? chip.variants.emphasis.active.backgroundColor : chip.variants.emphasis.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.variants.emphasis.disabled.backgroundColor, ";\n color: ").concat(chip.variants.emphasis.disabled.textColor, ";\n ") : '', "\n ");
|
|
2012
2105
|
case 'subtle':
|
|
2013
|
-
return {
|
|
2014
|
-
backgroundColor: chip.variants.subtle.backgroundColor,
|
|
2015
|
-
color: chip.variants.subtle.textColor
|
|
2016
|
-
};
|
|
2106
|
+
return "\n background-color: ".concat(chip.variants.subtle.backgroundColor, ";\n color: ").concat(chip.variants.subtle.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.variants.subtle.disabled.backgroundColor : $clickable ? chip.variants.subtle.hover.backgroundColor : chip.variants.subtle.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.variants.subtle.disabled.backgroundColor : $clickable ? chip.variants.subtle.active.backgroundColor : chip.variants.subtle.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.variants.subtle.disabled.backgroundColor, ";\n color: ").concat(chip.variants.subtle.disabled.textColor, ";\n ") : '', "\n ");
|
|
2017
2107
|
case 'interactive':
|
|
2018
|
-
return {
|
|
2019
|
-
backgroundColor: chip.variants.interactive.backgroundColor,
|
|
2020
|
-
color: chip.variants.interactive.textColor
|
|
2021
|
-
};
|
|
2108
|
+
return "\n background-color: ".concat(chip.variants.interactive.backgroundColor, ";\n color: ").concat(chip.variants.interactive.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.variants.interactive.disabled.backgroundColor : $clickable ? chip.variants.interactive.hover.backgroundColor : chip.variants.interactive.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.variants.interactive.disabled.backgroundColor : $clickable ? chip.variants.interactive.active.backgroundColor : chip.variants.interactive.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.variants.interactive.disabled.backgroundColor, ";\n color: ").concat(chip.variants.interactive.disabled.textColor, ";\n ") : '', "\n ");
|
|
2022
2109
|
case 'default':
|
|
2023
2110
|
default:
|
|
2024
|
-
return {
|
|
2025
|
-
backgroundColor: chip["default"].backgroundColor,
|
|
2026
|
-
color: chip["default"].textColor
|
|
2027
|
-
};
|
|
2111
|
+
return "\n background-color: ".concat(chip["default"].backgroundColor, ";\n color: ").concat(chip["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.disabled.backgroundColor : $clickable ? chip.hover.backgroundColor : chip["default"].backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.disabled.backgroundColor : $clickable ? chip.active.backgroundColor : chip["default"].backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.disabled.backgroundColor, ";\n color: ").concat(chip.disabled.textColor, ";\n ") : '', "\n ");
|
|
2028
2112
|
}
|
|
2029
2113
|
};
|
|
2030
|
-
// Helper function to get size styles
|
|
2031
|
-
var
|
|
2032
|
-
|
|
2114
|
+
// Helper function to get size styles matching Button's approach
|
|
2115
|
+
var getSizeStyles = function getSizeStyles(_a) {
|
|
2116
|
+
var $size = _a.$size;
|
|
2117
|
+
switch ($size) {
|
|
2033
2118
|
case 'small':
|
|
2034
|
-
return
|
|
2035
|
-
font: chip.sizes.small.font,
|
|
2036
|
-
padding: chip.sizes.small.padding
|
|
2037
|
-
};
|
|
2119
|
+
return "\n font: ".concat(chip.sizes.small.font, ";\n padding: ").concat(chip.sizes.small.padding, ";\n ");
|
|
2038
2120
|
case 'medium':
|
|
2039
2121
|
default:
|
|
2040
|
-
return
|
|
2041
|
-
font: chip.sizes.medium.font,
|
|
2042
|
-
padding: chip.sizes.medium.padding
|
|
2043
|
-
};
|
|
2122
|
+
return "\n font: ".concat(chip.sizes.medium.font, ";\n padding: ").concat(chip.sizes.medium.padding, ";\n ");
|
|
2044
2123
|
}
|
|
2045
2124
|
};
|
|
2046
2125
|
|
|
2047
|
-
// Base styled component using
|
|
2048
|
-
var
|
|
2126
|
+
// Base styled component using direct prop interpolation like Button
|
|
2127
|
+
var StyledChip = styled.span.withConfig({
|
|
2049
2128
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2050
2129
|
return !prop.startsWith('$');
|
|
2051
2130
|
},
|
|
2052
|
-
displayName: "
|
|
2131
|
+
displayName: "ChipBase__StyledChip",
|
|
2053
2132
|
componentId: "sc-moa6zc-0"
|
|
2054
|
-
})(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius:
|
|
2133
|
+
})(templateObject_1$B || (templateObject_1$B = __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 cursor: ", ";\n \n ", "\n ", "\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\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 cursor: ", ";\n \n ", "\n ", "\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"
|
|
2055
2134
|
// Icon container for selected indicator or leading icons
|
|
2056
|
-
])), tokensData.semantic.motion.
|
|
2135
|
+
])), chip["default"].borderRadius, tokensData.semantic.motion.hover, function (props) {
|
|
2136
|
+
return props.$disabled ? 'not-allowed' : props.$clickable ? 'pointer' : 'default';
|
|
2137
|
+
}, getVariantStyles, getSizeStyles, chip.focus.outline, chip.focus.outlineOffset);
|
|
2057
2138
|
// Icon container for selected indicator or leading icons
|
|
2058
2139
|
var IconContainer = styled.span.withConfig({
|
|
2059
2140
|
displayName: "ChipBase__IconContainer",
|
|
2060
2141
|
componentId: "sc-moa6zc-1"
|
|
2061
2142
|
})(templateObject_2$p || (templateObject_2$p = __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"
|
|
2062
2143
|
// Close button for dismissible chips
|
|
2063
|
-
])), tokensData.semantic.spacing.layout.
|
|
2144
|
+
])), tokensData.semantic.spacing.layout.xs);
|
|
2064
2145
|
// Close button for dismissible chips
|
|
2065
2146
|
var CloseButton = styled.button.withConfig({
|
|
2066
2147
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2068,44 +2149,10 @@ var CloseButton = styled.button.withConfig({
|
|
|
2068
2149
|
},
|
|
2069
2150
|
displayName: "ChipBase__CloseButton",
|
|
2070
2151
|
componentId: "sc-moa6zc-2"
|
|
2071
|
-
})(templateObject_3$
|
|
2072
|
-
// Wrapper component that applies styles via CSS custom properties
|
|
2073
|
-
])), tokensData.semantic.spacing.layout.sm, function (props) {
|
|
2152
|
+
})(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n padding: 2px;\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: rgba(0, 0, 0, 0.1);\n }\n \n &:active:not(:disabled) {\n background-color: rgba(0, 0, 0, 0.15);\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n padding: 2px;\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: rgba(0, 0, 0, 0.1);\n }\n \n &:active:not(:disabled) {\n background-color: rgba(0, 0, 0, 0.15);\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"])), tokensData.semantic.spacing.layout.sm, tokensData.semantic.border.radius.xs, function (props) {
|
|
2074
2153
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
2075
|
-
},
|
|
2076
|
-
|
|
2077
|
-
}, tokensData.semantic.motion.transition.fast, chip.variants.interactive.backgroundColor);
|
|
2078
|
-
// Wrapper component that applies styles via CSS custom properties
|
|
2079
|
-
var StyledChipWrapper = function StyledChipWrapper(_a) {
|
|
2080
|
-
var $variant = _a.$variant,
|
|
2081
|
-
$size = _a.$size,
|
|
2082
|
-
$disabled = _a.$disabled,
|
|
2083
|
-
$clickable = _a.$clickable,
|
|
2084
|
-
$selected = _a.$selected,
|
|
2085
|
-
children = _a.children,
|
|
2086
|
-
style = _a.style,
|
|
2087
|
-
htmlProps = __rest(_a, ["$variant", "$size", "$disabled", "$clickable", "$selected", "children", "style"]);
|
|
2088
|
-
// Get styles for variant and size
|
|
2089
|
-
var variantStyles = getVariantStylesAsObject($variant, $selected);
|
|
2090
|
-
var sizeStyles = getSizeStylesAsObject($size);
|
|
2091
|
-
// Create CSS custom properties object
|
|
2092
|
-
var cssProps = {
|
|
2093
|
-
'--chip-bg-color': variantStyles.backgroundColor,
|
|
2094
|
-
'--chip-text-color': variantStyles.color,
|
|
2095
|
-
'--chip-font': sizeStyles.font,
|
|
2096
|
-
'--chip-padding': sizeStyles.padding,
|
|
2097
|
-
'--chip-opacity': $disabled ? '0.6' : '1',
|
|
2098
|
-
'--chip-cursor': $disabled ? 'not-allowed' : $clickable ? 'pointer' : 'default',
|
|
2099
|
-
'--chip-hover-opacity': $disabled ? '0.6' : $clickable ? '0.8' : '1',
|
|
2100
|
-
'--chip-active-opacity': $disabled ? '0.6' : $clickable ? '0.9' : '1'
|
|
2101
|
-
};
|
|
2102
|
-
return jsx(BaseChipStyled, __assign({
|
|
2103
|
-
style: __assign(__assign({}, cssProps), style)
|
|
2104
|
-
}, htmlProps, {
|
|
2105
|
-
children: children
|
|
2106
|
-
}));
|
|
2107
|
-
};
|
|
2108
|
-
var templateObject_1$B, templateObject_2$p, templateObject_3$m;
|
|
2154
|
+
}, tokensData.semantic.motion.hover, tokensData.semantic.color.text.disabled, chip.focus.outline, chip.focus.outlineOffset, chip["default"].borderRadius);
|
|
2155
|
+
var templateObject_1$B, templateObject_2$p, templateObject_3$n;
|
|
2109
2156
|
|
|
2110
2157
|
/**
|
|
2111
2158
|
* Chip - Compact element for displaying tags, categories, and labels
|
|
@@ -2152,7 +2199,7 @@ var Chip = function Chip(_a) {
|
|
|
2152
2199
|
handleClick();
|
|
2153
2200
|
}
|
|
2154
2201
|
};
|
|
2155
|
-
return jsx(
|
|
2202
|
+
return jsx(StyledChip, __assign({
|
|
2156
2203
|
"$variant": normalizedVariant,
|
|
2157
2204
|
"$size": size,
|
|
2158
2205
|
"$disabled": disabled || undefined,
|
|
@@ -2232,7 +2279,7 @@ var FilterChip = function FilterChip(_a) {
|
|
|
2232
2279
|
};
|
|
2233
2280
|
// Generate accessible label for close button
|
|
2234
2281
|
var closeButtonLabel = typeof children === 'string' ? "Remove ".concat(children) : 'Remove filter';
|
|
2235
|
-
return jsxs(
|
|
2282
|
+
return jsxs(StyledChip, __assign({
|
|
2236
2283
|
"$variant": "subtle",
|
|
2237
2284
|
"$size": size,
|
|
2238
2285
|
"$disabled": disabled || undefined,
|
|
@@ -2306,7 +2353,7 @@ var BooleanChip = function BooleanChip(_a) {
|
|
|
2306
2353
|
handleClick();
|
|
2307
2354
|
}
|
|
2308
2355
|
};
|
|
2309
|
-
return jsxs(
|
|
2356
|
+
return jsxs(StyledChip, __assign({
|
|
2310
2357
|
"$variant": "subtle",
|
|
2311
2358
|
"$size": size,
|
|
2312
2359
|
"$disabled": disabled || undefined,
|
|
@@ -2351,11 +2398,11 @@ var media$1 = {
|
|
|
2351
2398
|
'2xl': "@media (min-width: ".concat(breakpoints$1['2xl'], ")")
|
|
2352
2399
|
};
|
|
2353
2400
|
|
|
2354
|
-
var spacing$
|
|
2401
|
+
var spacing$6 = tokensData.semantic.spacing;
|
|
2355
2402
|
var StyledContainer$2 = styled.div.withConfig({
|
|
2356
2403
|
displayName: "Container__StyledContainer",
|
|
2357
2404
|
componentId: "sc-17dbj6n-0"
|
|
2358
|
-
})(templateObject_1$A || (templateObject_1$A = __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$
|
|
2405
|
+
})(templateObject_1$A || (templateObject_1$A = __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$6.layout['2xl'], spacing$6.layout['2xl'], media$1.sm, media$1.md, media$1.lg, media$1.xl, media$1['2xl']);
|
|
2359
2406
|
var Container = function Container(_a) {
|
|
2360
2407
|
var children = _a.children,
|
|
2361
2408
|
props = __rest(_a, ["children"]);
|
|
@@ -2365,7 +2412,7 @@ var Container = function Container(_a) {
|
|
|
2365
2412
|
};
|
|
2366
2413
|
var templateObject_1$A;
|
|
2367
2414
|
|
|
2368
|
-
var base$
|
|
2415
|
+
var base$9 = tokensData.base;
|
|
2369
2416
|
var PictureWrapper = styled.div.withConfig({
|
|
2370
2417
|
displayName: "Picture__PictureWrapper",
|
|
2371
2418
|
componentId: "sc-11d9tei-0"
|
|
@@ -2373,15 +2420,15 @@ var PictureWrapper = styled.div.withConfig({
|
|
|
2373
2420
|
var ImageLink = styled.a.withConfig({
|
|
2374
2421
|
displayName: "Picture__ImageLink",
|
|
2375
2422
|
componentId: "sc-11d9tei-1"
|
|
2376
|
-
})(templateObject_2$o || (templateObject_2$o = __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$
|
|
2423
|
+
})(templateObject_2$o || (templateObject_2$o = __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$9.duration.normal, base$9.easing.easeInOut);
|
|
2377
2424
|
var ImageButton = styled.button.withConfig({
|
|
2378
2425
|
displayName: "Picture__ImageButton",
|
|
2379
2426
|
componentId: "sc-11d9tei-2"
|
|
2380
|
-
})(templateObject_3$
|
|
2427
|
+
})(templateObject_3$m || (templateObject_3$m = __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$9.duration.normal, base$9.easing.easeInOut);
|
|
2381
2428
|
var StyledImage = styled.img.withConfig({
|
|
2382
2429
|
displayName: "Picture__StyledImage",
|
|
2383
2430
|
componentId: "sc-11d9tei-3"
|
|
2384
|
-
})(templateObject_4$
|
|
2431
|
+
})(templateObject_4$i || (templateObject_4$i = __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$9.border.radius[2]);
|
|
2385
2432
|
var Picture = function Picture(_a) {
|
|
2386
2433
|
var title = _a.title,
|
|
2387
2434
|
src = _a.src,
|
|
@@ -2411,18 +2458,18 @@ var Picture = function Picture(_a) {
|
|
|
2411
2458
|
}) : image
|
|
2412
2459
|
});
|
|
2413
2460
|
};
|
|
2414
|
-
var templateObject_1$z, templateObject_2$o, templateObject_3$
|
|
2461
|
+
var templateObject_1$z, templateObject_2$o, templateObject_3$m, templateObject_4$i;
|
|
2415
2462
|
|
|
2416
|
-
var _a$
|
|
2417
|
-
typography$
|
|
2418
|
-
color$
|
|
2463
|
+
var _a$6 = tokensData.semantic,
|
|
2464
|
+
typography$3 = _a$6.typography,
|
|
2465
|
+
color$6 = _a$6.color;
|
|
2419
2466
|
var TimeStyled = styled.time.withConfig({
|
|
2420
2467
|
displayName: "DateFormatter__TimeStyled",
|
|
2421
2468
|
componentId: "sc-5464cc-0"
|
|
2422
2469
|
})(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
2423
2470
|
/**
|
|
2424
2471
|
* Formats a date with smart relative/absolute logic
|
|
2425
|
-
*/])), typography$
|
|
2472
|
+
*/])), typography$3.label, color$6.text.subdued);
|
|
2426
2473
|
/**
|
|
2427
2474
|
* Formats a date with smart relative/absolute logic
|
|
2428
2475
|
*/
|
|
@@ -2470,7 +2517,7 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
2470
2517
|
};
|
|
2471
2518
|
var templateObject_1$y;
|
|
2472
2519
|
|
|
2473
|
-
var motion = tokensData.semantic.motion,
|
|
2520
|
+
var motion$2 = tokensData.semantic.motion,
|
|
2474
2521
|
iconButton = tokensData.component.iconButton;
|
|
2475
2522
|
var IconButtonStyled = styled.button.withConfig({
|
|
2476
2523
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2490,7 +2537,7 @@ var IconButtonStyled = styled.button.withConfig({
|
|
|
2490
2537
|
default:
|
|
2491
2538
|
return iconButton.primary.backgroundColor;
|
|
2492
2539
|
}
|
|
2493
|
-
}, iconButton.primary.borderRadius, motion.transition.normal, iconButton.primary.display, iconButton.primary.justifyContent, iconButton.primary.alignItems, function (_a) {
|
|
2540
|
+
}, iconButton.primary.borderRadius, motion$2.transition.normal, iconButton.primary.display, iconButton.primary.justifyContent, iconButton.primary.alignItems, function (_a) {
|
|
2494
2541
|
var $size = _a.$size;
|
|
2495
2542
|
return iconButton.sizes[$size].minWidth;
|
|
2496
2543
|
}, function (_a) {
|
|
@@ -2599,7 +2646,7 @@ var StyledWrapper = styled.span.withConfig({
|
|
|
2599
2646
|
},
|
|
2600
2647
|
displayName: "MoneyDisplay__StyledWrapper",
|
|
2601
2648
|
componentId: "sc-1mddej3-0"
|
|
2602
|
-
})(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n display: inline-
|
|
2649
|
+
})(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n text-align: ", ";\n font-weight: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n text-align: ", ";\n font-weight: ", ";\n"
|
|
2603
2650
|
// Map size to Typography variant
|
|
2604
2651
|
])), function (_a) {
|
|
2605
2652
|
var $align = _a.$align;
|
|
@@ -2615,14 +2662,12 @@ var sizeToTypographyVariant = {
|
|
|
2615
2662
|
large: 'h3',
|
|
2616
2663
|
xlarge: 'h2'
|
|
2617
2664
|
};
|
|
2618
|
-
// Map
|
|
2619
|
-
var
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
// Red color for debits/expenses
|
|
2625
|
-
neutral: 'subdued' // Gray color for informational
|
|
2665
|
+
// Map size to Icon size for consistent visual alignment
|
|
2666
|
+
var sizeToIconSize = {
|
|
2667
|
+
small: 'xs',
|
|
2668
|
+
medium: 'sm',
|
|
2669
|
+
large: 'md',
|
|
2670
|
+
xlarge: 'lg'
|
|
2626
2671
|
};
|
|
2627
2672
|
/**
|
|
2628
2673
|
* Generates aria-label with spelled out amount
|
|
@@ -2671,45 +2716,61 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
2671
2716
|
maximumFractionDigits: 2
|
|
2672
2717
|
});
|
|
2673
2718
|
var formattedAmount = formatter.format(Math.abs(amount));
|
|
2674
|
-
//
|
|
2675
|
-
var
|
|
2676
|
-
|
|
2677
|
-
var signSymbol = amount > 0 ? '+' : '−'; // Using minus sign character, not hyphen
|
|
2678
|
-
displayText = signSymbol + formattedAmount;
|
|
2679
|
-
} else if (amount < 0 && !showSign) {
|
|
2680
|
-
// Still show negative sign even without showSign
|
|
2681
|
-
displayText = '−' + formattedAmount;
|
|
2682
|
-
}
|
|
2719
|
+
// Determine if we need to show a sign icon
|
|
2720
|
+
var showPositiveIcon = showSign && amount > 0 || variant === 'positive';
|
|
2721
|
+
var showNegativeIcon = amount < 0 || variant === 'negative';
|
|
2683
2722
|
// Generate accessibility label
|
|
2684
2723
|
var ariaLabel = generateAriaLabel(amount, currency, locale);
|
|
2685
|
-
// Get typography variant and
|
|
2724
|
+
// Get typography variant and icon size
|
|
2686
2725
|
var typographyVariant = sizeToTypographyVariant[size];
|
|
2687
|
-
var
|
|
2688
|
-
|
|
2726
|
+
var iconSize = sizeToIconSize[size];
|
|
2727
|
+
// Determine icon color based on variant
|
|
2728
|
+
var iconColor = variant === 'positive' || showPositiveIcon ? 'success' : variant === 'negative' || showNegativeIcon ? 'error' : variant === 'neutral' ? 'subdued' : 'default';
|
|
2729
|
+
// Amount always uses default color (except neutral which stays subdued)
|
|
2730
|
+
var amountColor = variant === 'neutral' ? 'subdued' : 'default';
|
|
2731
|
+
return jsxs(StyledWrapper, {
|
|
2689
2732
|
"$align": align,
|
|
2690
2733
|
"$weight": weight,
|
|
2691
2734
|
"aria-label": ariaLabel,
|
|
2692
2735
|
"data-testid": dataTestId,
|
|
2693
|
-
children: jsx(
|
|
2736
|
+
children: [showPositiveIcon && !showNegativeIcon && jsx(Icon, {
|
|
2737
|
+
name: "addRing",
|
|
2738
|
+
size: iconSize,
|
|
2739
|
+
iconColor: iconColor
|
|
2740
|
+
}), showNegativeIcon && jsx(Icon, {
|
|
2741
|
+
name: "remove",
|
|
2742
|
+
size: iconSize,
|
|
2743
|
+
iconColor: iconColor
|
|
2744
|
+
}), jsx(Typography, {
|
|
2694
2745
|
variant: typographyVariant,
|
|
2695
|
-
color:
|
|
2746
|
+
color: amountColor,
|
|
2696
2747
|
as: "span",
|
|
2697
|
-
children:
|
|
2698
|
-
})
|
|
2748
|
+
children: formattedAmount
|
|
2749
|
+
})]
|
|
2699
2750
|
});
|
|
2700
2751
|
};
|
|
2701
2752
|
var templateObject_1$w;
|
|
2702
2753
|
|
|
2754
|
+
// Destructure tokens
|
|
2755
|
+
var semantic$d = tokensData.semantic;
|
|
2756
|
+
var _a$5 = __assign(__assign({}, semantic$d), {
|
|
2757
|
+
component: tokensData.component
|
|
2758
|
+
}),
|
|
2759
|
+
color$5 = _a$5.color,
|
|
2760
|
+
border$7 = _a$5.border,
|
|
2761
|
+
motion$1 = _a$5.motion,
|
|
2762
|
+
component$1 = _a$5.component;
|
|
2763
|
+
var radius$3 = border$7.radius;
|
|
2703
2764
|
var ProgressBarContainer = styled.div.withConfig({
|
|
2704
2765
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2705
2766
|
return !prop.startsWith('$');
|
|
2706
2767
|
},
|
|
2707
2768
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
2708
2769
|
componentId: "sc-1nco33q-0"
|
|
2709
|
-
})(templateObject_3$
|
|
2710
|
-
return props.$variant === 'horizontal' && css(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n width: 100%;\n height: ", ";\n "], ["\n width: 100%;\n height: ", ";\n "])), props.$height ?
|
|
2770
|
+
})(templateObject_3$l || (templateObject_3$l = __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"])), color$5.background.disabled, radius$3.xs, function (props) {
|
|
2771
|
+
return props.$variant === 'horizontal' && css(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n width: 100%;\n height: ", ";\n "], ["\n width: 100%;\n height: ", ";\n "])), props.$height ? component$1.progressBar.sizes[props.$height].height : component$1.progressBar.sizes.md.height);
|
|
2711
2772
|
}, function (props) {
|
|
2712
|
-
return props.$variant === 'vertical' && css(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n "], ["\n width: ", ";\n height: 100%;\n "])), props.$width ?
|
|
2773
|
+
return props.$variant === 'vertical' && css(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n "], ["\n width: ", ";\n height: 100%;\n "])), props.$width ? component$1.progressBar.sizes[props.$width].height : component$1.progressBar.sizes.md.height);
|
|
2713
2774
|
});
|
|
2714
2775
|
var ProgressBarFill = styled.div.withConfig({
|
|
2715
2776
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2717,21 +2778,21 @@ var ProgressBarFill = styled.div.withConfig({
|
|
|
2717
2778
|
},
|
|
2718
2779
|
displayName: "ProgressBar__ProgressBarFill",
|
|
2719
2780
|
componentId: "sc-1nco33q-1"
|
|
2720
|
-
})(templateObject_7$8 || (templateObject_7$8 = __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"])),
|
|
2781
|
+
})(templateObject_7$8 || (templateObject_7$8 = __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"])), motion$1.transition.normal, function (props) {
|
|
2721
2782
|
var backgroundColor;
|
|
2722
2783
|
switch (props.$color) {
|
|
2723
2784
|
case 'success':
|
|
2724
|
-
backgroundColor =
|
|
2785
|
+
backgroundColor = color$5.background.success;
|
|
2725
2786
|
break;
|
|
2726
2787
|
case 'error':
|
|
2727
|
-
backgroundColor =
|
|
2788
|
+
backgroundColor = color$5.background.error;
|
|
2728
2789
|
break;
|
|
2729
2790
|
case 'default':
|
|
2730
2791
|
default:
|
|
2731
|
-
backgroundColor =
|
|
2792
|
+
backgroundColor = color$5.background.interactive;
|
|
2732
2793
|
break;
|
|
2733
2794
|
}
|
|
2734
|
-
return css(templateObject_4$
|
|
2795
|
+
return css(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
2735
2796
|
}, function (props) {
|
|
2736
2797
|
return props.$variant === 'horizontal' && css(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
2737
2798
|
}, function (props) {
|
|
@@ -2762,9 +2823,12 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
2762
2823
|
})
|
|
2763
2824
|
});
|
|
2764
2825
|
};
|
|
2765
|
-
var templateObject_1$v, templateObject_2$n, templateObject_3$
|
|
2826
|
+
var templateObject_1$v, templateObject_2$n, templateObject_3$l, templateObject_4$h, templateObject_5$d, templateObject_6$b, templateObject_7$8;
|
|
2766
2827
|
|
|
2767
|
-
|
|
2828
|
+
// Destructure tokens for cleaner access
|
|
2829
|
+
var separatorTokens = tokensData.component.separator;
|
|
2830
|
+
var separatorSpacing = tokensData.semantic.spacing.separator;
|
|
2831
|
+
var StyledDivider = styled.div.withConfig({
|
|
2768
2832
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2769
2833
|
return !prop.startsWith('$');
|
|
2770
2834
|
},
|
|
@@ -2803,12 +2867,12 @@ var StyledDivider$1 = styled.div.withConfig({
|
|
|
2803
2867
|
var borderProperty = $orientation === 'vertical' ? 'border-left' : 'border-top';
|
|
2804
2868
|
switch ($variant) {
|
|
2805
2869
|
case 'strong':
|
|
2806
|
-
return "".concat(borderProperty, ": ").concat(
|
|
2870
|
+
return "".concat(borderProperty, ": ").concat(separatorTokens.variants.strong.border, ";");
|
|
2807
2871
|
case 'minimal':
|
|
2808
|
-
return "".concat(borderProperty, ": ").concat(
|
|
2872
|
+
return "".concat(borderProperty, ": ").concat(separatorTokens.variants.minimal.border, ";");
|
|
2809
2873
|
case 'default':
|
|
2810
2874
|
default:
|
|
2811
|
-
return "".concat(borderProperty, ": ").concat(
|
|
2875
|
+
return "".concat(borderProperty, ": ").concat(separatorTokens.variants["default"].border, ";");
|
|
2812
2876
|
}
|
|
2813
2877
|
}, function (_a) {
|
|
2814
2878
|
var _b = _a.$size,
|
|
@@ -2819,33 +2883,33 @@ var StyledDivider$1 = styled.div.withConfig({
|
|
|
2819
2883
|
$orientation = _d === void 0 ? 'horizontal' : _d;
|
|
2820
2884
|
if ($variant === 'minimal' && $orientation === 'horizontal') {
|
|
2821
2885
|
// Minimal variant always uses its predefined spacing for horizontal
|
|
2822
|
-
return "margin: ".concat(
|
|
2886
|
+
return "margin: ".concat(separatorTokens.variants.minimal.margin, ";");
|
|
2823
2887
|
}
|
|
2824
2888
|
if ($orientation === 'vertical') {
|
|
2825
2889
|
// Vertical orientation uses horizontal margins (left/right)
|
|
2826
2890
|
switch ($size) {
|
|
2827
2891
|
case 'small':
|
|
2828
|
-
return "margin: 0 ".concat(
|
|
2892
|
+
return "margin: 0 ".concat(separatorSpacing.sm, ";");
|
|
2829
2893
|
case 'medium':
|
|
2830
|
-
return "margin: 0 ".concat(
|
|
2894
|
+
return "margin: 0 ".concat(separatorSpacing.md, ";");
|
|
2831
2895
|
case 'xlarge':
|
|
2832
|
-
return "margin: 0 ".concat(
|
|
2896
|
+
return "margin: 0 ".concat(separatorSpacing.xl, ";");
|
|
2833
2897
|
case 'large':
|
|
2834
2898
|
default:
|
|
2835
|
-
return "margin: 0 ".concat(
|
|
2899
|
+
return "margin: 0 ".concat(separatorSpacing.lg, ";");
|
|
2836
2900
|
}
|
|
2837
2901
|
}
|
|
2838
2902
|
// Horizontal orientation uses vertical margins (top/bottom)
|
|
2839
2903
|
switch ($size) {
|
|
2840
2904
|
case 'small':
|
|
2841
|
-
return "margin: ".concat(
|
|
2905
|
+
return "margin: ".concat(separatorTokens.sizes.small.margin, ";");
|
|
2842
2906
|
case 'medium':
|
|
2843
|
-
return "margin: ".concat(
|
|
2907
|
+
return "margin: ".concat(separatorTokens.sizes.medium.margin, ";");
|
|
2844
2908
|
case 'xlarge':
|
|
2845
|
-
return "margin: ".concat(
|
|
2909
|
+
return "margin: ".concat(separatorTokens.sizes.xlarge.margin, ";");
|
|
2846
2910
|
case 'large':
|
|
2847
2911
|
default:
|
|
2848
|
-
return "margin: ".concat(
|
|
2912
|
+
return "margin: ".concat(separatorTokens.sizes.large.margin, ";");
|
|
2849
2913
|
}
|
|
2850
2914
|
});
|
|
2851
2915
|
/**
|
|
@@ -2874,7 +2938,7 @@ var Divider = function Divider(_a) {
|
|
|
2874
2938
|
_d = _a.orientation,
|
|
2875
2939
|
orientation = _d === void 0 ? 'horizontal' : _d,
|
|
2876
2940
|
dataTestId = _a["data-testid"];
|
|
2877
|
-
return jsx(StyledDivider
|
|
2941
|
+
return jsx(StyledDivider, {
|
|
2878
2942
|
"$variant": variant,
|
|
2879
2943
|
"$size": size,
|
|
2880
2944
|
"$orientation": orientation,
|
|
@@ -2932,45 +2996,49 @@ var Stack = function Stack(_a) {
|
|
|
2932
2996
|
};
|
|
2933
2997
|
var templateObject_1$t;
|
|
2934
2998
|
|
|
2935
|
-
|
|
2936
|
-
|
|
2999
|
+
// Destructure tokens for cleaner access
|
|
3000
|
+
var statusColors = tokensData.semantic.color.status;
|
|
3001
|
+
var spacing$5 = tokensData.semantic.spacing.layout;
|
|
3002
|
+
var radius$2 = tokensData.semantic.border.radius;
|
|
3003
|
+
var transition = tokensData.semantic.motion.transition;
|
|
3004
|
+
var typography$2 = tokensData.semantic.typography;
|
|
2937
3005
|
var scaleIn = keyframes(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n"], ["\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n"])));
|
|
2938
3006
|
var getStatusConfig = function getStatusConfig(status) {
|
|
2939
3007
|
var configs = {
|
|
2940
3008
|
pending: {
|
|
2941
|
-
color:
|
|
2942
|
-
bgColor:
|
|
3009
|
+
color: statusColors.pending,
|
|
3010
|
+
bgColor: statusColors['pending-bg'],
|
|
2943
3011
|
icon: 'refresh',
|
|
2944
3012
|
// Fallback until 'clock' icon is added
|
|
2945
3013
|
label: 'Pending'
|
|
2946
3014
|
},
|
|
2947
3015
|
completed: {
|
|
2948
|
-
color:
|
|
2949
|
-
bgColor:
|
|
3016
|
+
color: statusColors.completed,
|
|
3017
|
+
bgColor: statusColors['completed-bg'],
|
|
2950
3018
|
icon: 'check',
|
|
2951
3019
|
label: 'Completed'
|
|
2952
3020
|
},
|
|
2953
3021
|
failed: {
|
|
2954
|
-
color:
|
|
2955
|
-
bgColor:
|
|
3022
|
+
color: statusColors.failed,
|
|
3023
|
+
bgColor: statusColors['failed-bg'],
|
|
2956
3024
|
icon: 'close',
|
|
2957
3025
|
label: 'Failed'
|
|
2958
3026
|
},
|
|
2959
3027
|
cancelled: {
|
|
2960
|
-
color:
|
|
2961
|
-
bgColor:
|
|
3028
|
+
color: statusColors.cancelled,
|
|
3029
|
+
bgColor: statusColors['cancelled-bg'],
|
|
2962
3030
|
icon: 'cancel',
|
|
2963
3031
|
label: 'Cancelled'
|
|
2964
3032
|
},
|
|
2965
3033
|
processing: {
|
|
2966
|
-
color:
|
|
2967
|
-
bgColor:
|
|
3034
|
+
color: statusColors.processing,
|
|
3035
|
+
bgColor: statusColors['processing-bg'],
|
|
2968
3036
|
icon: 'refresh',
|
|
2969
3037
|
label: 'Processing'
|
|
2970
3038
|
},
|
|
2971
3039
|
scheduled: {
|
|
2972
|
-
color:
|
|
2973
|
-
bgColor:
|
|
3040
|
+
color: statusColors.scheduled,
|
|
3041
|
+
bgColor: statusColors['scheduled-bg'],
|
|
2974
3042
|
icon: 'bell',
|
|
2975
3043
|
// Fallback until 'calendar' icon is added
|
|
2976
3044
|
label: 'Scheduled'
|
|
@@ -2978,24 +3046,22 @@ var getStatusConfig = function getStatusConfig(status) {
|
|
|
2978
3046
|
};
|
|
2979
3047
|
return configs[status];
|
|
2980
3048
|
};
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
// medium
|
|
2992
|
-
return {
|
|
3049
|
+
// Size configuration
|
|
3050
|
+
var sizeConfig = {
|
|
3051
|
+
small: {
|
|
3052
|
+
height: '20px',
|
|
3053
|
+
padding: "".concat(spacing$5.xs, " ").concat(spacing$5.sm),
|
|
3054
|
+
font: typography$2.caption,
|
|
3055
|
+
gap: spacing$5.xs,
|
|
3056
|
+
iconSize: 'xs'
|
|
3057
|
+
},
|
|
3058
|
+
medium: {
|
|
2993
3059
|
height: '24px',
|
|
2994
|
-
padding: "".concat(
|
|
2995
|
-
font:
|
|
2996
|
-
gap:
|
|
3060
|
+
padding: "".concat(spacing$5.xs, " ").concat(spacing$5.sm),
|
|
3061
|
+
font: typography$2.small,
|
|
3062
|
+
gap: spacing$5.xs,
|
|
2997
3063
|
iconSize: 'sm'
|
|
2998
|
-
}
|
|
3064
|
+
}
|
|
2999
3065
|
};
|
|
3000
3066
|
var StyledStatusBadge = styled.span.withConfig({
|
|
3001
3067
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -3003,11 +3069,19 @@ var StyledStatusBadge = styled.span.withConfig({
|
|
|
3003
3069
|
},
|
|
3004
3070
|
displayName: "StatusBadge__StyledStatusBadge",
|
|
3005
3071
|
componentId: "sc-1paksgb-0"
|
|
3006
|
-
})(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n font-weight:
|
|
3072
|
+
})(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n font-weight: 500;\n white-space: nowrap;\n user-select: none;\n animation: ", " 0.2s ease-out;\n transition: ", ";\n \n /* Size styles */\n ", "\n \n /* Status color styles */\n ", "\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n font-weight: 500;\n white-space: nowrap;\n user-select: none;\n animation: ", " 0.2s ease-out;\n transition: ", ";\n \n /* Size styles */\n ", "\n \n /* Status color styles */\n ", "\n"])), radius$2.circle, scaleIn, transition.fast, function (_a) {
|
|
3073
|
+
var $size = _a.$size;
|
|
3074
|
+
var size = sizeConfig[$size];
|
|
3075
|
+
return "\n height: ".concat(size.height, ";\n padding: ").concat(size.padding, ";\n font: ").concat(size.font, ";\n gap: ").concat(size.gap, ";\n ");
|
|
3076
|
+
}, function (_a) {
|
|
3077
|
+
var $status = _a.$status;
|
|
3078
|
+
var config = getStatusConfig($status);
|
|
3079
|
+
return "\n background-color: ".concat(config.bgColor, ";\n color: ").concat(config.color, ";\n ");
|
|
3080
|
+
});
|
|
3007
3081
|
var ScreenReaderOnly = styled.span.withConfig({
|
|
3008
3082
|
displayName: "StatusBadge__ScreenReaderOnly",
|
|
3009
3083
|
componentId: "sc-1paksgb-1"
|
|
3010
|
-
})(templateObject_3$
|
|
3084
|
+
})(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n"], ["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n"
|
|
3011
3085
|
/**
|
|
3012
3086
|
* StatusBadge component for displaying transaction or task status
|
|
3013
3087
|
*
|
|
@@ -3066,16 +3140,8 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
3066
3140
|
dataTestId = _a["data-testid"],
|
|
3067
3141
|
ariaLabel = _a["aria-label"];
|
|
3068
3142
|
var statusConfig = getStatusConfig(status);
|
|
3069
|
-
var sizeStyles =
|
|
3143
|
+
var sizeStyles = sizeConfig[size];
|
|
3070
3144
|
var displayLabel = label || statusConfig.label;
|
|
3071
|
-
var cssProps = {
|
|
3072
|
-
'--status-badge-bg': statusConfig.bgColor,
|
|
3073
|
-
'--status-badge-color': statusConfig.color,
|
|
3074
|
-
'--status-badge-height': sizeStyles.height,
|
|
3075
|
-
'--status-badge-padding': sizeStyles.padding,
|
|
3076
|
-
'--status-badge-font': sizeStyles.font,
|
|
3077
|
-
'--status-badge-gap': sizeStyles.gap
|
|
3078
|
-
};
|
|
3079
3145
|
return jsxs(StyledStatusBadge, {
|
|
3080
3146
|
"$status": status,
|
|
3081
3147
|
"$size": size,
|
|
@@ -3084,7 +3150,6 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
3084
3150
|
"aria-live": liveRegion ? 'polite' : undefined,
|
|
3085
3151
|
"aria-atomic": liveRegion ? 'true' : undefined,
|
|
3086
3152
|
"data-testid": dataTestId,
|
|
3087
|
-
style: cssProps,
|
|
3088
3153
|
children: [showIcon && jsx(Icon, {
|
|
3089
3154
|
name: statusConfig.icon,
|
|
3090
3155
|
size: sizeStyles.iconSize,
|
|
@@ -3096,9 +3161,16 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
3096
3161
|
});
|
|
3097
3162
|
};
|
|
3098
3163
|
StatusBadge.displayName = 'StatusBadge';
|
|
3099
|
-
var templateObject_1$s, templateObject_2$m, templateObject_3$
|
|
3164
|
+
var templateObject_1$s, templateObject_2$m, templateObject_3$k;
|
|
3100
3165
|
|
|
3101
3166
|
var semantic$c = tokensData.semantic;
|
|
3167
|
+
var color$4 = semantic$c.color,
|
|
3168
|
+
spacing$4 = semantic$c.spacing,
|
|
3169
|
+
border$6 = semantic$c.border,
|
|
3170
|
+
typography$1 = semantic$c.typography,
|
|
3171
|
+
size = semantic$c.size;
|
|
3172
|
+
var layout$2 = spacing$4.layout;
|
|
3173
|
+
var radius$1 = border$6.radius;
|
|
3102
3174
|
var StyledTag = styled.span.withConfig({
|
|
3103
3175
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3104
3176
|
return !prop.startsWith('$');
|
|
@@ -3111,37 +3183,37 @@ var StyledTag = styled.span.withConfig({
|
|
|
3111
3183
|
*
|
|
3112
3184
|
* A static, non-interactive label used to categorize elements or objects in the UI.
|
|
3113
3185
|
* Tags help users quickly identify and understand content classification.
|
|
3114
|
-
*/])),
|
|
3186
|
+
*/])), radius$1.sm, size.icon.lg || '2rem', layout$2.xs, layout$2.sm, typography$1.button3, function (_a) {
|
|
3115
3187
|
var $variant = _a.$variant;
|
|
3116
3188
|
switch ($variant) {
|
|
3117
3189
|
case 'interactive':
|
|
3118
|
-
return
|
|
3190
|
+
return color$4.background['interactive-subtle'];
|
|
3119
3191
|
case 'success':
|
|
3120
|
-
return
|
|
3192
|
+
return color$4.background['success-subtle'];
|
|
3121
3193
|
case 'warning':
|
|
3122
|
-
return
|
|
3194
|
+
return color$4.background['warning-subtle'];
|
|
3123
3195
|
case 'error':
|
|
3124
|
-
return
|
|
3196
|
+
return color$4.background['error-subtle'];
|
|
3125
3197
|
case 'emphasis':
|
|
3126
|
-
return
|
|
3198
|
+
return color$4.background.emphasis;
|
|
3127
3199
|
default:
|
|
3128
|
-
return
|
|
3200
|
+
return color$4.background.surface;
|
|
3129
3201
|
}
|
|
3130
3202
|
}, function (_a) {
|
|
3131
3203
|
var $variant = _a.$variant;
|
|
3132
3204
|
switch ($variant) {
|
|
3133
3205
|
case 'interactive':
|
|
3134
|
-
return
|
|
3206
|
+
return color$4.text.interactive;
|
|
3135
3207
|
case 'success':
|
|
3136
|
-
return
|
|
3208
|
+
return color$4.text.success;
|
|
3137
3209
|
case 'warning':
|
|
3138
|
-
return
|
|
3210
|
+
return color$4.text.warning;
|
|
3139
3211
|
case 'error':
|
|
3140
|
-
return
|
|
3212
|
+
return color$4.text.error;
|
|
3141
3213
|
case 'emphasis':
|
|
3142
|
-
return
|
|
3214
|
+
return color$4.text.inverse;
|
|
3143
3215
|
default:
|
|
3144
|
-
return
|
|
3216
|
+
return color$4.text["default"];
|
|
3145
3217
|
}
|
|
3146
3218
|
}, function (_a) {
|
|
3147
3219
|
var $variant = _a.$variant,
|
|
@@ -3149,17 +3221,17 @@ var StyledTag = styled.span.withConfig({
|
|
|
3149
3221
|
if (!$border) return 'none';
|
|
3150
3222
|
switch ($variant) {
|
|
3151
3223
|
case 'interactive':
|
|
3152
|
-
return "1px solid ".concat(
|
|
3224
|
+
return "1px solid ".concat(color$4.border.interactive);
|
|
3153
3225
|
case 'success':
|
|
3154
|
-
return "1px solid ".concat(
|
|
3226
|
+
return "1px solid ".concat(color$4.border.success);
|
|
3155
3227
|
case 'warning':
|
|
3156
|
-
return "1px solid ".concat(
|
|
3228
|
+
return "1px solid ".concat(color$4.border.warning);
|
|
3157
3229
|
case 'error':
|
|
3158
|
-
return "1px solid ".concat(
|
|
3230
|
+
return "1px solid ".concat(color$4.border.error);
|
|
3159
3231
|
case 'emphasis':
|
|
3160
|
-
return "1px solid ".concat(
|
|
3232
|
+
return "1px solid ".concat(color$4.background.emphasis);
|
|
3161
3233
|
default:
|
|
3162
|
-
return "1px solid ".concat(
|
|
3234
|
+
return "1px solid ".concat(color$4.border["default"]);
|
|
3163
3235
|
}
|
|
3164
3236
|
});
|
|
3165
3237
|
/**
|
|
@@ -3190,26 +3262,35 @@ var Tag = function Tag(_a) {
|
|
|
3190
3262
|
};
|
|
3191
3263
|
var templateObject_1$r;
|
|
3192
3264
|
|
|
3265
|
+
// Destructure tokens for cleaner access
|
|
3266
|
+
var semantic$b = tokensData.semantic;
|
|
3267
|
+
var color$3 = semantic$b.color,
|
|
3268
|
+
spacing$3 = semantic$b.spacing,
|
|
3269
|
+
border$5 = semantic$b.border;
|
|
3270
|
+
var layout$1 = spacing$3.layout;
|
|
3271
|
+
var background = color$3.background,
|
|
3272
|
+
icon = color$3.icon;
|
|
3273
|
+
var radius = border$5.radius;
|
|
3193
3274
|
var StyledHeader$2 = styled.div.withConfig({
|
|
3194
3275
|
displayName: "AccountCard__StyledHeader",
|
|
3195
3276
|
componentId: "sc-1erp7zn-0"
|
|
3196
|
-
})(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n margin-bottom: ", ";\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n margin-bottom: ", ";\n"])),
|
|
3277
|
+
})(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n margin-bottom: ", ";\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n margin-bottom: ", ";\n"])), layout$1.md);
|
|
3197
3278
|
var StyledIconWrapper = styled.div.withConfig({
|
|
3198
3279
|
displayName: "AccountCard__StyledIconWrapper",
|
|
3199
3280
|
componentId: "sc-1erp7zn-1"
|
|
3200
|
-
})(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border-radius: ", ";\n color: ", ";\n"], ["\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border-radius: ", ";\n color: ", ";\n"])),
|
|
3281
|
+
})(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border-radius: ", ";\n color: ", ";\n"], ["\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border-radius: ", ";\n color: ", ";\n"])), background.inverse, radius.md, icon.interactive);
|
|
3201
3282
|
var StyledBalanceSection = styled.div.withConfig({
|
|
3202
3283
|
displayName: "AccountCard__StyledBalanceSection",
|
|
3203
3284
|
componentId: "sc-1erp7zn-2"
|
|
3204
|
-
})(templateObject_3$
|
|
3285
|
+
})(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), layout$1.lg);
|
|
3205
3286
|
var StyledTrendSection = styled.div.withConfig({
|
|
3206
3287
|
displayName: "AccountCard__StyledTrendSection",
|
|
3207
3288
|
componentId: "sc-1erp7zn-3"
|
|
3208
|
-
})(templateObject_4$
|
|
3289
|
+
})(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n margin-top: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n margin-top: ", ";\n"])), layout$1.xs, layout$1.sm);
|
|
3209
3290
|
var StyledActions$1 = styled.div.withConfig({
|
|
3210
3291
|
displayName: "AccountCard__StyledActions",
|
|
3211
3292
|
componentId: "sc-1erp7zn-4"
|
|
3212
|
-
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n display: flex;\n gap: ", ";\n margin-top: auto;\n \n & > * {\n flex: 1;\n }\n"], ["\n display: flex;\n gap: ", ";\n margin-top: auto;\n \n & > * {\n flex: 1;\n }\n"])),
|
|
3293
|
+
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n display: flex;\n gap: ", ";\n margin-top: auto;\n \n & > * {\n flex: 1;\n }\n"], ["\n display: flex;\n gap: ", ";\n margin-top: auto;\n \n & > * {\n flex: 1;\n }\n"])), layout$1.sm);
|
|
3213
3294
|
var StyledStackWrapper = styled.div.withConfig({
|
|
3214
3295
|
displayName: "AccountCard__StyledStackWrapper",
|
|
3215
3296
|
componentId: "sc-1erp7zn-5"
|
|
@@ -3279,11 +3360,10 @@ var AccountCard = function AccountCard(_a) {
|
|
|
3279
3360
|
p: "lg",
|
|
3280
3361
|
bg: "surface",
|
|
3281
3362
|
border: "default",
|
|
3282
|
-
borderRadius: "
|
|
3283
|
-
shadow: "3",
|
|
3363
|
+
borderRadius: "xl",
|
|
3284
3364
|
transition: "all 0.2s ease",
|
|
3285
3365
|
cursor: isClickable ? 'pointer' : 'default',
|
|
3286
|
-
hoverShadow: isClickable ? '
|
|
3366
|
+
hoverShadow: isClickable ? 'floating' : undefined,
|
|
3287
3367
|
hoverTransform: isClickable ? 'translateY(-2px)' : undefined,
|
|
3288
3368
|
onClick: handleClick,
|
|
3289
3369
|
onKeyDown: handleKeyDown,
|
|
@@ -3310,7 +3390,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
3310
3390
|
})
|
|
3311
3391
|
}), jsxs(Stack, {
|
|
3312
3392
|
direction: "column",
|
|
3313
|
-
gap: "
|
|
3393
|
+
gap: "none",
|
|
3314
3394
|
children: [jsx(Typography, {
|
|
3315
3395
|
variant: "h4",
|
|
3316
3396
|
children: accountName
|
|
@@ -3374,109 +3454,296 @@ var AccountCard = function AccountCard(_a) {
|
|
|
3374
3454
|
})
|
|
3375
3455
|
});
|
|
3376
3456
|
};
|
|
3377
|
-
var templateObject_1$q, templateObject_2$l, templateObject_3$
|
|
3457
|
+
var templateObject_1$q, templateObject_2$l, templateObject_3$j, templateObject_4$g, templateObject_5$c, templateObject_6$a;
|
|
3378
3458
|
|
|
3379
|
-
var semantic$
|
|
3380
|
-
base$
|
|
3381
|
-
var
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
}
|
|
3391
|
-
var
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3459
|
+
var semantic$a = tokensData.semantic,
|
|
3460
|
+
base$8 = tokensData.base;
|
|
3461
|
+
var StyledListItem = styled.li.withConfig({
|
|
3462
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3463
|
+
return !prop.startsWith('$');
|
|
3464
|
+
},
|
|
3465
|
+
displayName: "ListItem__StyledListItem",
|
|
3466
|
+
componentId: "sc-1wzzt21-0"
|
|
3467
|
+
})(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-height: 44px; /* Touch target minimum */\n position: relative;\n \n /* Disable user selection for interactive items */\n ", "\n \n /* Disabled state */\n ", "\n \n /* Destructive state - apply error color to text */\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n min-height: 44px; /* Touch target minimum */\n position: relative;\n \n /* Disable user selection for interactive items */\n ", "\n \n /* Disabled state */\n ", "\n \n /* Destructive state - apply error color to text */\n ", "\n"])), function (_a) {
|
|
3468
|
+
var $interactive = _a.$interactive;
|
|
3469
|
+
return $interactive && 'user-select: none;';
|
|
3470
|
+
}, function (_a) {
|
|
3471
|
+
var $disabled = _a.$disabled;
|
|
3472
|
+
return $disabled && "\n opacity: ".concat(base$8.opacity[50], ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
3473
|
+
}, function (_a) {
|
|
3474
|
+
var $destructive = _a.$destructive,
|
|
3475
|
+
$disabled = _a.$disabled;
|
|
3476
|
+
return $destructive && !$disabled && "\n color: ".concat(semantic$a.color.text.error, ";\n ");
|
|
3477
|
+
});
|
|
3478
|
+
var StyledItemContent = styled.div.withConfig({
|
|
3479
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3480
|
+
return !prop.startsWith('$');
|
|
3481
|
+
},
|
|
3482
|
+
displayName: "ListItem__StyledItemContent",
|
|
3483
|
+
componentId: "sc-1wzzt21-1"
|
|
3484
|
+
})(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n background-color: ", ";\n transition: background-color 150ms ease;\n cursor: ", ";\n \n /* Interactive hover states */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"], ["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n background-color: ", ";\n transition: background-color 150ms ease;\n cursor: ", ";\n \n /* Interactive hover states */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"])), semantic$a.spacing.layout.md, function (_a) {
|
|
3485
|
+
var $spacing = _a.$spacing;
|
|
3486
|
+
return $spacing === 'compact' ? "".concat(semantic$a.spacing.layout.sm, " ").concat(semantic$a.spacing.layout.md) : "".concat(semantic$a.spacing.layout.md, " ").concat(semantic$a.spacing.layout.lg);
|
|
3487
|
+
}, base$8.border.radius[2], function (_a) {
|
|
3488
|
+
var $selected = _a.$selected;
|
|
3489
|
+
return $selected ? semantic$a.color.background['interactive-subtle'] : 'transparent';
|
|
3490
|
+
}, function (_a) {
|
|
3491
|
+
var $interactive = _a.$interactive,
|
|
3492
|
+
$disabled = _a.$disabled;
|
|
3493
|
+
if ($disabled) return 'not-allowed';
|
|
3494
|
+
if ($interactive) return 'pointer';
|
|
3495
|
+
return 'default';
|
|
3496
|
+
}, function (_a) {
|
|
3497
|
+
var $interactive = _a.$interactive,
|
|
3498
|
+
$disabled = _a.$disabled,
|
|
3499
|
+
$selected = _a.$selected;
|
|
3500
|
+
return !$disabled && $interactive && "\n &:hover {\n background-color: ".concat($selected ? tokensData.component.button.variants.secondary.backgroundColor : tokensData.component.button.variants.secondary.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat(tokensData.component.button.variants.naked.backgroundColor, ";\n }\n ");
|
|
3501
|
+
}, semantic$a.color.border.interactive);
|
|
3502
|
+
var StyledIconContainer$1 = styled.div.withConfig({
|
|
3503
|
+
displayName: "ListItem__StyledIconContainer",
|
|
3504
|
+
componentId: "sc-1wzzt21-2"
|
|
3505
|
+
})(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n"], ["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n"])));
|
|
3506
|
+
var StyledTextContent = styled.div.withConfig({
|
|
3507
|
+
displayName: "ListItem__StyledTextContent",
|
|
3508
|
+
componentId: "sc-1wzzt21-3"
|
|
3509
|
+
})(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text truncation */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text truncation */\n"])), semantic$a.spacing.layout.xs);
|
|
3510
|
+
var StyledRightContent = styled.div.withConfig({
|
|
3511
|
+
displayName: "ListItem__StyledRightContent",
|
|
3512
|
+
componentId: "sc-1wzzt21-4"
|
|
3513
|
+
})(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"])), semantic$a.spacing.layout.sm);
|
|
3514
|
+
var StyledChevronIcon = styled.div.withConfig({
|
|
3515
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3516
|
+
return !prop.startsWith('$');
|
|
3517
|
+
},
|
|
3518
|
+
displayName: "ListItem__StyledChevronIcon",
|
|
3519
|
+
componentId: "sc-1wzzt21-5"
|
|
3520
|
+
})(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n color: ", ";\n transition: transform 200ms ease;\n transform: rotate(", ");\n pointer-events: none;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n color: ", ";\n transition: transform 200ms ease;\n transform: rotate(", ");\n pointer-events: none;\n"])), semantic$a.color.icon.subdued, function (_a) {
|
|
3521
|
+
var $expanded = _a.$expanded;
|
|
3522
|
+
return $expanded ? '180deg' : '0deg';
|
|
3523
|
+
});
|
|
3524
|
+
var StyledExpandedContent = styled.div.withConfig({
|
|
3525
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3526
|
+
return !prop.startsWith('$');
|
|
3527
|
+
},
|
|
3528
|
+
displayName: "ListItem__StyledExpandedContent",
|
|
3529
|
+
componentId: "sc-1wzzt21-6"
|
|
3530
|
+
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n overflow: hidden;\n transition: max-height 200ms ease-out, opacity 200ms ease-out;\n max-height: ", ";\n opacity: ", ";\n \n ", "\n"], ["\n overflow: hidden;\n transition: max-height 200ms ease-out, opacity 200ms ease-out;\n max-height: ", ";\n opacity: ", ";\n \n ", "\n"])), function (_a) {
|
|
3531
|
+
var $expanded = _a.$expanded;
|
|
3532
|
+
return $expanded ? '1000px' : '0';
|
|
3533
|
+
}, function (_a) {
|
|
3534
|
+
var $expanded = _a.$expanded;
|
|
3535
|
+
return $expanded ? '1' : '0';
|
|
3536
|
+
}, function (_a) {
|
|
3537
|
+
var $expanded = _a.$expanded,
|
|
3538
|
+
$spacing = _a.$spacing;
|
|
3539
|
+
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$a.spacing.layout.sm, " ").concat(semantic$a.spacing.layout.md, " ").concat(semantic$a.spacing.layout.sm, " 48px") : "".concat(semantic$a.spacing.layout.sm, " ").concat(semantic$a.spacing.layout.lg, " ").concat(semantic$a.spacing.layout.md, " 60px"), ";\n background-color: ").concat(semantic$a.color.background['subtle'], ";\n border-radius: ").concat(base$8.border.radius[2], ";\n margin: 0 ").concat($spacing === 'compact' ? semantic$a.spacing.layout.md : semantic$a.spacing.layout.lg, " ").concat($spacing === 'compact' ? semantic$a.spacing.layout.sm : semantic$a.spacing.layout.md, ";\n ");
|
|
3540
|
+
});
|
|
3541
|
+
var ListItem = function ListItem(_a) {
|
|
3542
|
+
var primary = _a.primary,
|
|
3543
|
+
secondary = _a.secondary,
|
|
3544
|
+
badge = _a.badge,
|
|
3545
|
+
icon = _a.icon,
|
|
3546
|
+
_b = _a.expandable,
|
|
3547
|
+
expandable = _b === void 0 ? false : _b,
|
|
3548
|
+
_c = _a.expanded,
|
|
3549
|
+
expanded = _c === void 0 ? false : _c,
|
|
3550
|
+
onToggle = _a.onToggle,
|
|
3551
|
+
_d = _a.interactive,
|
|
3552
|
+
interactive = _d === void 0 ? false : _d,
|
|
3553
|
+
onClick = _a.onClick,
|
|
3554
|
+
_e = _a.disabled,
|
|
3555
|
+
disabled = _e === void 0 ? false : _e,
|
|
3556
|
+
_f = _a.selected,
|
|
3557
|
+
selected = _f === void 0 ? false : _f,
|
|
3558
|
+
_g = _a.destructive,
|
|
3559
|
+
destructive = _g === void 0 ? false : _g,
|
|
3560
|
+
_h = _a.spacing,
|
|
3561
|
+
spacing = _h === void 0 ? 'comfortable' : _h,
|
|
3562
|
+
children = _a.children,
|
|
3563
|
+
className = _a.className,
|
|
3564
|
+
dataTestId = _a["data-testid"],
|
|
3565
|
+
customRole = _a.role,
|
|
3566
|
+
ariaSelected = _a["aria-selected"],
|
|
3567
|
+
id = _a.id,
|
|
3568
|
+
customTabIndex = _a.tabIndex,
|
|
3569
|
+
customOnKeyDown = _a.onKeyDown,
|
|
3570
|
+
props = __rest(_a, ["primary", "secondary", "badge", "icon", "expandable", "expanded", "onToggle", "interactive", "onClick", "disabled", "selected", "destructive", "spacing", "children", "className", 'data-testid', "role", 'aria-selected', "id", "tabIndex", "onKeyDown"]);
|
|
3571
|
+
var isInteractive = interactive || expandable || customRole === 'option';
|
|
3572
|
+
var contentRole = customRole === 'option' ? undefined : isInteractive ? 'button' : undefined;
|
|
3573
|
+
var ariaExpanded = expandable ? expanded : undefined;
|
|
3574
|
+
var ariaDisabled = disabled ? true : undefined;
|
|
3575
|
+
var ariaCurrent = selected ? 'true' : undefined;
|
|
3576
|
+
var handleClick = function handleClick() {
|
|
3577
|
+
if (disabled) return;
|
|
3578
|
+
if (expandable && onToggle) {
|
|
3579
|
+
onToggle();
|
|
3580
|
+
} else if (onClick) {
|
|
3581
|
+
onClick();
|
|
3582
|
+
}
|
|
3583
|
+
};
|
|
3584
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
3585
|
+
if (customOnKeyDown) {
|
|
3586
|
+
customOnKeyDown(event);
|
|
3587
|
+
return;
|
|
3588
|
+
}
|
|
3589
|
+
if (disabled) return;
|
|
3590
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
3591
|
+
event.preventDefault();
|
|
3592
|
+
handleClick();
|
|
3593
|
+
}
|
|
3594
|
+
};
|
|
3595
|
+
return jsxs(StyledListItem, __assign({
|
|
3596
|
+
"$interactive": isInteractive,
|
|
3597
|
+
"$disabled": disabled,
|
|
3598
|
+
"$selected": selected,
|
|
3599
|
+
"$destructive": destructive,
|
|
3600
|
+
"$spacing": spacing,
|
|
3601
|
+
className: className,
|
|
3602
|
+
"data-testid": dataTestId,
|
|
3603
|
+
role: customRole || 'listitem',
|
|
3604
|
+
id: id,
|
|
3605
|
+
"aria-selected": ariaSelected
|
|
3606
|
+
}, props, {
|
|
3607
|
+
children: [jsxs(StyledItemContent, {
|
|
3608
|
+
"$interactive": isInteractive,
|
|
3609
|
+
"$disabled": disabled,
|
|
3610
|
+
"$selected": selected,
|
|
3611
|
+
"$destructive": destructive,
|
|
3612
|
+
"$spacing": spacing,
|
|
3613
|
+
role: contentRole,
|
|
3614
|
+
"aria-expanded": ariaExpanded,
|
|
3615
|
+
"aria-disabled": ariaDisabled,
|
|
3616
|
+
"aria-current": ariaCurrent,
|
|
3617
|
+
tabIndex: customTabIndex !== undefined ? customTabIndex : isInteractive && !disabled ? 0 : undefined,
|
|
3618
|
+
onClick: handleClick,
|
|
3619
|
+
onKeyDown: handleKeyDown,
|
|
3620
|
+
children: [icon && jsx(StyledIconContainer$1, {
|
|
3621
|
+
"aria-hidden": "true",
|
|
3622
|
+
children: icon
|
|
3623
|
+
}), jsxs(StyledTextContent, {
|
|
3624
|
+
children: [jsx(Typography, {
|
|
3625
|
+
variant: "body",
|
|
3626
|
+
color: destructive ? 'error' : 'default',
|
|
3627
|
+
children: primary
|
|
3628
|
+
}), secondary && jsx(Typography, {
|
|
3629
|
+
variant: "small",
|
|
3630
|
+
color: "subdued",
|
|
3631
|
+
children: secondary
|
|
3632
|
+
})]
|
|
3633
|
+
}), jsxs(StyledRightContent, {
|
|
3634
|
+
children: [badge, expandable && jsx(StyledChevronIcon, {
|
|
3635
|
+
"$expanded": expanded,
|
|
3636
|
+
"aria-hidden": "true",
|
|
3637
|
+
children: jsx(Icon, {
|
|
3638
|
+
name: "caretDown",
|
|
3639
|
+
size: "sm"
|
|
3640
|
+
})
|
|
3641
|
+
})]
|
|
3642
|
+
})]
|
|
3643
|
+
}), expandable && children && jsx(StyledExpandedContent, {
|
|
3644
|
+
"$spacing": spacing,
|
|
3645
|
+
"$expanded": expanded,
|
|
3646
|
+
"aria-hidden": !expanded,
|
|
3647
|
+
children: children
|
|
3648
|
+
})]
|
|
3649
|
+
}));
|
|
3650
|
+
};
|
|
3651
|
+
ListItem.displayName = 'ListItem';
|
|
3652
|
+
var templateObject_1$p, templateObject_2$k, templateObject_3$i, templateObject_4$f, templateObject_5$b, templateObject_6$9, templateObject_7$7;
|
|
3653
|
+
|
|
3654
|
+
var _a$4 = tokensData.semantic,
|
|
3655
|
+
color$2 = _a$4.color,
|
|
3656
|
+
border$4 = _a$4.border,
|
|
3657
|
+
layout = _a$4.spacing.layout,
|
|
3658
|
+
motion = _a$4.motion,
|
|
3659
|
+
elevation = _a$4.elevation;
|
|
3660
|
+
var slideUp = keyframes(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0);\n }\n"], ["\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0);\n }\n"])));
|
|
3661
|
+
var fadeIn$1 = keyframes(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"], ["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
|
|
3662
|
+
var StyledOverlay$1 = styled.div.withConfig({
|
|
3663
|
+
displayName: "ActionSheet__StyledOverlay",
|
|
3664
|
+
componentId: "sc-regbol-0"
|
|
3665
|
+
})(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n position: fixed;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n animation: ", " 0.2s ease-out;\n"], ["\n position: fixed;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n animation: ", " 0.2s ease-out;\n"])), fadeIn$1);
|
|
3666
|
+
var StyledActionSheet = styled.div.withConfig({
|
|
3667
|
+
displayName: "ActionSheet__StyledActionSheet",
|
|
3668
|
+
componentId: "sc-regbol-1"
|
|
3669
|
+
})(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: 10000;\n animation: ", " 0.3s ease-out;\n"], ["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: 10000;\n animation: ", " 0.3s ease-out;\n"])), color$2.background.subtle, border$4.radius.lg, border$4.radius.lg, elevation.overlay, slideUp);
|
|
3670
|
+
var StyledHeader$1 = styled.div.withConfig({
|
|
3671
|
+
displayName: "ActionSheet__StyledHeader",
|
|
3672
|
+
componentId: "sc-regbol-2"
|
|
3673
|
+
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"])), layout.lg, layout.lg, layout.md, border$4["default"]);
|
|
3674
|
+
var StyledHeaderContent = styled.div.withConfig({
|
|
3675
|
+
displayName: "ActionSheet__StyledHeaderContent",
|
|
3676
|
+
componentId: "sc-regbol-3"
|
|
3677
|
+
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n flex: 1;\n"], ["\n flex: 1;\n"])));
|
|
3678
|
+
var StyledCloseButton = styled.button.withConfig({
|
|
3679
|
+
displayName: "ActionSheet__StyledCloseButton",
|
|
3680
|
+
componentId: "sc-regbol-4"
|
|
3681
|
+
})(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), layout.sm, color$2.icon.subdued, border$4.radius.sm, motion.hover, layout.sm, color$2.icon["default"], color$2.background.surface, border$4.focus, layout.xs);
|
|
3682
|
+
var StyledActionsList = styled.ul.withConfig({
|
|
3683
|
+
displayName: "ActionSheet__StyledActionsList",
|
|
3684
|
+
componentId: "sc-regbol-5"
|
|
3685
|
+
})(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n padding: ", " ", ";\n margin: 0;\n list-style: none;\n"], ["\n padding: ", " ", ";\n margin: 0;\n list-style: none;\n"
|
|
3686
|
+
/**
|
|
3687
|
+
* ActionSheet component for bottom sheet modals
|
|
3688
|
+
*
|
|
3689
|
+
* Displays a modal action sheet that slides up from the bottom,
|
|
3690
|
+
* providing a list of actions for the user to choose from.
|
|
3691
|
+
* Includes focus trapping, keyboard navigation, and accessibility features.
|
|
3692
|
+
*
|
|
3693
|
+
* @example
|
|
3694
|
+
* ```tsx
|
|
3695
|
+
* const [isOpen, setIsOpen] = useState(false)
|
|
3696
|
+
*
|
|
3697
|
+
* <ActionSheet
|
|
3698
|
+
* isOpen={isOpen}
|
|
3699
|
+
* onClose={() => setIsOpen(false)}
|
|
3700
|
+
* title="Choose an action"
|
|
3701
|
+
* actions={[
|
|
3702
|
+
* {
|
|
3703
|
+
* id: 'edit',
|
|
3704
|
+
* label: 'Edit',
|
|
3705
|
+
* icon: 'edit',
|
|
3706
|
+
* onSelect: () => console.log('Edit')
|
|
3707
|
+
* },
|
|
3708
|
+
* {
|
|
3709
|
+
* id: 'delete',
|
|
3710
|
+
* label: 'Delete',
|
|
3711
|
+
* icon: 'trash',
|
|
3712
|
+
* destructive: true,
|
|
3713
|
+
* onSelect: () => console.log('Delete')
|
|
3714
|
+
* }
|
|
3715
|
+
* ]}
|
|
3716
|
+
* />
|
|
3717
|
+
* ```
|
|
3718
|
+
*/])), layout.sm, layout.md);
|
|
3719
|
+
/**
|
|
3720
|
+
* ActionSheet component for bottom sheet modals
|
|
3721
|
+
*
|
|
3722
|
+
* Displays a modal action sheet that slides up from the bottom,
|
|
3723
|
+
* providing a list of actions for the user to choose from.
|
|
3724
|
+
* Includes focus trapping, keyboard navigation, and accessibility features.
|
|
3725
|
+
*
|
|
3726
|
+
* @example
|
|
3727
|
+
* ```tsx
|
|
3728
|
+
* const [isOpen, setIsOpen] = useState(false)
|
|
3729
|
+
*
|
|
3730
|
+
* <ActionSheet
|
|
3731
|
+
* isOpen={isOpen}
|
|
3732
|
+
* onClose={() => setIsOpen(false)}
|
|
3733
|
+
* title="Choose an action"
|
|
3734
|
+
* actions={[
|
|
3735
|
+
* {
|
|
3736
|
+
* id: 'edit',
|
|
3737
|
+
* label: 'Edit',
|
|
3738
|
+
* icon: 'edit',
|
|
3739
|
+
* onSelect: () => console.log('Edit')
|
|
3740
|
+
* },
|
|
3741
|
+
* {
|
|
3742
|
+
* id: 'delete',
|
|
3743
|
+
* label: 'Delete',
|
|
3744
|
+
* icon: 'trash',
|
|
3745
|
+
* destructive: true,
|
|
3746
|
+
* onSelect: () => console.log('Delete')
|
|
3480
3747
|
* }
|
|
3481
3748
|
* ]}
|
|
3482
3749
|
* />
|
|
@@ -3526,11 +3793,11 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
3526
3793
|
}
|
|
3527
3794
|
};
|
|
3528
3795
|
document.addEventListener('keydown', handleKeyDown);
|
|
3529
|
-
// Focus first focusable element
|
|
3796
|
+
// Focus first focusable element (button or element with role="button")
|
|
3530
3797
|
requestAnimationFrame(function () {
|
|
3531
3798
|
var _a;
|
|
3532
|
-
var
|
|
3533
|
-
|
|
3799
|
+
var firstFocusable = (_a = sheetRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('button:not(:disabled), [role="button"][tabindex]:not([aria-disabled="true"])');
|
|
3800
|
+
firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
|
|
3534
3801
|
});
|
|
3535
3802
|
// Prevent body scroll
|
|
3536
3803
|
var originalOverflow = document.body.style.overflow;
|
|
@@ -3603,24 +3870,23 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
3603
3870
|
})]
|
|
3604
3871
|
}), jsx(StyledActionsList, {
|
|
3605
3872
|
children: actions.map(function (action, index) {
|
|
3606
|
-
return jsxs(
|
|
3607
|
-
children: [hasDestructive && index === destructiveIndex && index > 0 && jsx(
|
|
3608
|
-
|
|
3873
|
+
return jsxs(React.Fragment, {
|
|
3874
|
+
children: [hasDestructive && index === destructiveIndex && index > 0 && jsx(Divider, {
|
|
3875
|
+
size: "small"
|
|
3876
|
+
}), jsx(ListItem, {
|
|
3877
|
+
primary: action.label,
|
|
3878
|
+
icon: action.icon && jsx(Icon, {
|
|
3879
|
+
name: action.icon,
|
|
3880
|
+
size: "md",
|
|
3881
|
+
iconColor: action.disabled ? 'disabled' : action.destructive ? 'error' : 'default'
|
|
3882
|
+
}),
|
|
3883
|
+
interactive: true,
|
|
3609
3884
|
onClick: function onClick() {
|
|
3610
3885
|
return handleActionClick(action);
|
|
3611
3886
|
},
|
|
3612
3887
|
disabled: action.disabled,
|
|
3613
|
-
|
|
3614
|
-
"
|
|
3615
|
-
"aria-label": action.label,
|
|
3616
|
-
children: [action.icon && jsx(Icon, {
|
|
3617
|
-
name: action.icon,
|
|
3618
|
-
size: "md",
|
|
3619
|
-
iconColor: action.disabled ? 'disabled' : action.destructive ? 'error' : 'default'
|
|
3620
|
-
}), jsx(Typography, {
|
|
3621
|
-
variant: "body",
|
|
3622
|
-
children: action.label
|
|
3623
|
-
})]
|
|
3888
|
+
destructive: action.destructive,
|
|
3889
|
+
spacing: "compact"
|
|
3624
3890
|
})]
|
|
3625
3891
|
}, action.id);
|
|
3626
3892
|
})
|
|
@@ -3628,10 +3894,10 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
3628
3894
|
})]
|
|
3629
3895
|
}), document.body);
|
|
3630
3896
|
};
|
|
3631
|
-
var templateObject_1$
|
|
3897
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$h, templateObject_4$e, templateObject_5$a, templateObject_6$8, templateObject_7$6, templateObject_8$4;
|
|
3632
3898
|
|
|
3633
|
-
var semantic$
|
|
3634
|
-
base$
|
|
3899
|
+
var semantic$9 = tokensData.semantic,
|
|
3900
|
+
base$7 = tokensData.base;
|
|
3635
3901
|
// Default icons by variant
|
|
3636
3902
|
var variantIcons = {
|
|
3637
3903
|
error: 'crossCircle',
|
|
@@ -3659,56 +3925,56 @@ var StyledAlert = styled.div.withConfig({
|
|
|
3659
3925
|
},
|
|
3660
3926
|
displayName: "Alert__StyledAlert",
|
|
3661
3927
|
componentId: "sc-18tq5d-0"
|
|
3662
|
-
})(templateObject_1$
|
|
3928
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n display: flex;\n align-items: ", ";\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: 1px solid;\n position: relative;\n width: 100%;\n \n /* Variant-specific colors */\n ", "\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n"], ["\n display: flex;\n align-items: ", ";\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: 1px solid;\n position: relative;\n width: 100%;\n \n /* Variant-specific colors */\n ", "\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n"])), function (_a) {
|
|
3663
3929
|
var $inline = _a.$inline;
|
|
3664
3930
|
return $inline ? 'center' : 'flex-start';
|
|
3665
3931
|
}, function (_a) {
|
|
3666
3932
|
var $inline = _a.$inline;
|
|
3667
|
-
return $inline ? semantic$
|
|
3933
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3668
3934
|
}, function (_a) {
|
|
3669
3935
|
var $inline = _a.$inline;
|
|
3670
|
-
return $inline ? semantic$
|
|
3671
|
-
}, base$
|
|
3936
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3937
|
+
}, base$7.border.radius[2], function (_a) {
|
|
3672
3938
|
var $variant = _a.$variant;
|
|
3673
3939
|
switch ($variant) {
|
|
3674
3940
|
case 'error':
|
|
3675
|
-
return "\n background-color: ".concat(semantic$
|
|
3941
|
+
return "\n background-color: ".concat(semantic$9.color.background['error-subtle'], ";\n border-color: ").concat(semantic$9.color.border.error, ";\n color: ").concat(semantic$9.color.text.error, ";\n ");
|
|
3676
3942
|
case 'warning':
|
|
3677
|
-
return "\n background-color: ".concat(semantic$
|
|
3943
|
+
return "\n background-color: ".concat(semantic$9.color.background['warning-subtle'], ";\n border-color: ").concat(semantic$9.color.border.warning, ";\n color: ").concat(semantic$9.color.text.warning, ";\n ");
|
|
3678
3944
|
case 'success':
|
|
3679
|
-
return "\n background-color: ".concat(semantic$
|
|
3945
|
+
return "\n background-color: ".concat(semantic$9.color.background['success-subtle'], ";\n border-color: ").concat(semantic$9.color.border.success, ";\n color: ").concat(semantic$9.color.text.success, ";\n ");
|
|
3680
3946
|
case 'info':
|
|
3681
3947
|
default:
|
|
3682
|
-
return "\n background-color: ".concat(semantic$
|
|
3948
|
+
return "\n background-color: ".concat(semantic$9.color.background['interactive-subtle'], ";\n border-color: ").concat(semantic$9.color.border.interactive, ";\n color: ").concat(semantic$9.color.text.interactive, ";\n ");
|
|
3683
3949
|
}
|
|
3684
|
-
}, base$
|
|
3950
|
+
}, base$7.breakpoint.md, function (_a) {
|
|
3685
3951
|
var $inline = _a.$inline;
|
|
3686
|
-
return $inline ? semantic$
|
|
3952
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.lg;
|
|
3687
3953
|
});
|
|
3688
|
-
var StyledIconContainer
|
|
3954
|
+
var StyledIconContainer = styled.div.withConfig({
|
|
3689
3955
|
displayName: "Alert__StyledIconContainer",
|
|
3690
3956
|
componentId: "sc-18tq5d-1"
|
|
3691
|
-
})(templateObject_2$
|
|
3957
|
+
})(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n"], ["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n"])));
|
|
3692
3958
|
var StyledContent$1 = styled.div.withConfig({
|
|
3693
3959
|
displayName: "Alert__StyledContent",
|
|
3694
3960
|
componentId: "sc-18tq5d-2"
|
|
3695
|
-
})(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"])), semantic$
|
|
3961
|
+
})(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"])), semantic$9.spacing.layout.xs);
|
|
3696
3962
|
var StyledTitle = styled.span.withConfig({
|
|
3697
3963
|
displayName: "Alert__StyledTitle",
|
|
3698
3964
|
componentId: "sc-18tq5d-3"
|
|
3699
|
-
})(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\n font: ", ";\n font-weight: 600 !important;\n margin: 0;\n\tline-height: 1.125;\n"], ["\n font: ", ";\n font-weight: 600 !important;\n margin: 0;\n\tline-height: 1.125;\n"])), semantic$
|
|
3965
|
+
})(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\n font: ", ";\n font-weight: 600 !important;\n margin: 0;\n\tline-height: 1.125;\n"], ["\n font: ", ";\n font-weight: 600 !important;\n margin: 0;\n\tline-height: 1.125;\n"])), semantic$9.typography.h6);
|
|
3700
3966
|
var StyledMessage = styled.span.withConfig({
|
|
3701
3967
|
displayName: "Alert__StyledMessage",
|
|
3702
3968
|
componentId: "sc-18tq5d-4"
|
|
3703
|
-
})(templateObject_5$
|
|
3969
|
+
})(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n font: ", ";\n\tline-height: 1.25;\n"], ["\n font: ", ";\n\tline-height: 1.25;\n"])), semantic$9.typography.body);
|
|
3704
3970
|
var StyledActions = styled.div.withConfig({
|
|
3705
3971
|
displayName: "Alert__StyledActions",
|
|
3706
3972
|
componentId: "sc-18tq5d-5"
|
|
3707
|
-
})(templateObject_6$
|
|
3973
|
+
})(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"])), semantic$9.spacing.layout.sm);
|
|
3708
3974
|
var StyledDismissButton = styled(IconButton).withConfig({
|
|
3709
3975
|
displayName: "Alert__StyledDismissButton",
|
|
3710
3976
|
componentId: "sc-18tq5d-6"
|
|
3711
|
-
})(templateObject_7$
|
|
3977
|
+
})(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject(["\n margin-left: ", ";\n\tposition: absolute;\n\tright: 8px;\n\ttop: 10px;\n"], ["\n margin-left: ", ";\n\tposition: absolute;\n\tright: 8px;\n\ttop: 10px;\n"])), semantic$9.spacing.layout.xs);
|
|
3712
3978
|
var Alert = function Alert(_a) {
|
|
3713
3979
|
var _b = _a.variant,
|
|
3714
3980
|
variant = _b === void 0 ? 'info' : _b,
|
|
@@ -3747,7 +4013,7 @@ var Alert = function Alert(_a) {
|
|
|
3747
4013
|
"$inline": inline,
|
|
3748
4014
|
"data-testid": dataTestId
|
|
3749
4015
|
}, props, {
|
|
3750
|
-
children: [jsx(StyledIconContainer
|
|
4016
|
+
children: [jsx(StyledIconContainer, {
|
|
3751
4017
|
"aria-hidden": "true",
|
|
3752
4018
|
children: jsx(Icon, {
|
|
3753
4019
|
name: iconName,
|
|
@@ -3776,17 +4042,21 @@ var Alert = function Alert(_a) {
|
|
|
3776
4042
|
}));
|
|
3777
4043
|
};
|
|
3778
4044
|
Alert.displayName = 'Alert';
|
|
3779
|
-
var templateObject_1$
|
|
4045
|
+
var templateObject_1$n, templateObject_2$i, templateObject_3$g, templateObject_4$d, templateObject_5$9, templateObject_6$7, templateObject_7$5;
|
|
3780
4046
|
|
|
3781
|
-
var _a$3, _b$1, _c, _d, _e, _f
|
|
4047
|
+
var _a$3, _b$1, _c, _d, _e, _f;
|
|
3782
4048
|
var BreadcrumbNavStyled = styled.nav.withConfig({
|
|
3783
4049
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
3784
4050
|
componentId: "sc-7ouzg5-0"
|
|
3785
|
-
})(templateObject_1$
|
|
4051
|
+
})(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])), ((_b$1 = (_a$3 = tokensData.semantic) === null || _a$3 === void 0 ? void 0 : _a$3.border) === null || _b$1 === void 0 ? void 0 : _b$1["default"]) || '0.0625rem solid #e9ecef');
|
|
3786
4052
|
var BreadcrumbStyled = styled.li.withConfig({
|
|
3787
4053
|
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
3788
4054
|
componentId: "sc-7ouzg5-1"
|
|
3789
|
-
})(templateObject_2$
|
|
4055
|
+
})(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n text-transform: uppercase;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", ";\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n }\n\n > a {\n display: inline-flex;\n align-items: center;\n text-decoration: underline;\n color: ", ";\n }\n"], ["\n text-transform: uppercase;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", ";\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 180px;\n }\n\n > a {\n display: inline-flex;\n align-items: center;\n text-decoration: underline;\n color: ", ";\n }\n"])), ((_d = (_c = tokensData.base) === null || _c === void 0 ? void 0 : _c.spacing) === null || _d === void 0 ? void 0 : _d['2']) || '0.5rem', ((_f = (_e = tokensData.base) === null || _e === void 0 ? void 0 : _e.spacing) === null || _f === void 0 ? void 0 : _f['2']) || '0.5rem', tokensData.semantic.color.text.subdued, tokensData.semantic.color.text["default"]);
|
|
4056
|
+
var BreadcrumbSeparator = styled.span.withConfig({
|
|
4057
|
+
displayName: "Breadcrumbs__BreadcrumbSeparator",
|
|
4058
|
+
componentId: "sc-7ouzg5-2"
|
|
4059
|
+
})(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n opacity: 0.5;\n"], ["\n display: inline-flex;\n align-items: center;\n opacity: 0.5;\n"])));
|
|
3790
4060
|
var isInternalUrl = function isInternalUrl(url) {
|
|
3791
4061
|
return url.startsWith('/') && !url.startsWith('http');
|
|
3792
4062
|
};
|
|
@@ -3798,39 +4068,48 @@ var Breadcrumbs = function Breadcrumbs(_a) {
|
|
|
3798
4068
|
"aria-label": "breadcrumb",
|
|
3799
4069
|
children: jsx("ol", {
|
|
3800
4070
|
children: breadcrumbs.map(function (breadcrumb, index) {
|
|
3801
|
-
return
|
|
3802
|
-
children:
|
|
3803
|
-
|
|
3804
|
-
children: breadcrumb.label
|
|
3805
|
-
}) : LinkComponent && isInternalUrl(breadcrumb.url) ? jsx(LinkComponent, {
|
|
3806
|
-
href: breadcrumb.url,
|
|
3807
|
-
children: jsx(Typography, {
|
|
3808
|
-
variant: "caption",
|
|
3809
|
-
children: breadcrumb.label
|
|
3810
|
-
})
|
|
3811
|
-
}) : jsx("a", __assign({
|
|
3812
|
-
href: breadcrumb.url
|
|
3813
|
-
}, !isInternalUrl(breadcrumb.url) && {
|
|
3814
|
-
target: "_blank",
|
|
3815
|
-
rel: "noopener noreferrer"
|
|
3816
|
-
}, {
|
|
3817
|
-
children: jsx(Typography, {
|
|
4071
|
+
return jsxs(React.Fragment, {
|
|
4072
|
+
children: [jsx(BreadcrumbStyled, {
|
|
4073
|
+
children: index === breadcrumbs.length - 1 ? jsx(Typography, {
|
|
3818
4074
|
variant: "caption",
|
|
3819
4075
|
children: breadcrumb.label
|
|
4076
|
+
}) : LinkComponent && isInternalUrl(breadcrumb.url) ? jsx(LinkComponent, {
|
|
4077
|
+
href: breadcrumb.url,
|
|
4078
|
+
children: jsx(Typography, {
|
|
4079
|
+
variant: "caption",
|
|
4080
|
+
children: breadcrumb.label
|
|
4081
|
+
})
|
|
4082
|
+
}) : jsx("a", __assign({
|
|
4083
|
+
href: breadcrumb.url
|
|
4084
|
+
}, !isInternalUrl(breadcrumb.url) && {
|
|
4085
|
+
target: "_blank",
|
|
4086
|
+
rel: "noopener noreferrer"
|
|
4087
|
+
}, {
|
|
4088
|
+
children: jsx(Typography, {
|
|
4089
|
+
variant: "caption",
|
|
4090
|
+
children: breadcrumb.label
|
|
4091
|
+
})
|
|
4092
|
+
}))
|
|
4093
|
+
}), index < breadcrumbs.length - 1 && jsx(BreadcrumbSeparator, {
|
|
4094
|
+
"aria-hidden": "true",
|
|
4095
|
+
children: jsx(Icon, {
|
|
4096
|
+
name: "arrowRight",
|
|
4097
|
+
size: "xs",
|
|
4098
|
+
iconColor: "subdued"
|
|
3820
4099
|
})
|
|
3821
|
-
})
|
|
4100
|
+
})]
|
|
3822
4101
|
}, index);
|
|
3823
4102
|
})
|
|
3824
4103
|
})
|
|
3825
4104
|
})
|
|
3826
4105
|
});
|
|
3827
4106
|
};
|
|
3828
|
-
var templateObject_1$
|
|
4107
|
+
var templateObject_1$m, templateObject_2$h, templateObject_3$f;
|
|
3829
4108
|
|
|
3830
4109
|
var CardSmallStyled = styled.div.withConfig({
|
|
3831
4110
|
displayName: "CardSmall__CardSmallStyled",
|
|
3832
4111
|
componentId: "sc-jpcqvd-0"
|
|
3833
|
-
})(templateObject_1$
|
|
4112
|
+
})(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n"], ["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n"])), tokensData.base.border.radius[2], tokensData.semantic.color.border.strong);
|
|
3834
4113
|
var CardSmall = function CardSmall(_a) {
|
|
3835
4114
|
var title = _a.title,
|
|
3836
4115
|
picture = _a.picture,
|
|
@@ -3882,13 +4161,13 @@ var CardSmall = function CardSmall(_a) {
|
|
|
3882
4161
|
})
|
|
3883
4162
|
});
|
|
3884
4163
|
};
|
|
3885
|
-
var templateObject_1$
|
|
4164
|
+
var templateObject_1$l;
|
|
3886
4165
|
|
|
3887
4166
|
var border$3 = tokensData.base.border;
|
|
3888
4167
|
var CardLargeStyled = styled.div.withConfig({
|
|
3889
4168
|
displayName: "CardLarge__CardLargeStyled",
|
|
3890
4169
|
componentId: "sc-1rfgdzl-0"
|
|
3891
|
-
})(templateObject_1$
|
|
4170
|
+
})(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n max-width: 768px;\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n }\n"], ["\n max-width: 768px;\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n width: 100%;\n }\n"])), border$3.radius[6]);
|
|
3892
4171
|
var CardLarge = function CardLarge(_a) {
|
|
3893
4172
|
var title = _a.title,
|
|
3894
4173
|
excerpt = _a.excerpt,
|
|
@@ -3941,7 +4220,7 @@ var CardLarge = function CardLarge(_a) {
|
|
|
3941
4220
|
})
|
|
3942
4221
|
});
|
|
3943
4222
|
};
|
|
3944
|
-
var templateObject_1$
|
|
4223
|
+
var templateObject_1$k;
|
|
3945
4224
|
|
|
3946
4225
|
/**
|
|
3947
4226
|
* Hidden native checkbox input for accessibility
|
|
@@ -3953,7 +4232,7 @@ var HiddenCheckboxInput = styled.input.withConfig({
|
|
|
3953
4232
|
},
|
|
3954
4233
|
displayName: "SelectableInputBase__HiddenCheckboxInput",
|
|
3955
4234
|
componentId: "sc-1ddpctx-0"
|
|
3956
|
-
})(templateObject_1$
|
|
4235
|
+
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"], ["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"
|
|
3957
4236
|
/**
|
|
3958
4237
|
* Custom checkbox visual component
|
|
3959
4238
|
* 24px × 24px for 8px grid alignment
|
|
@@ -3970,7 +4249,7 @@ var StyledCheckbox = styled.span.withConfig({
|
|
|
3970
4249
|
},
|
|
3971
4250
|
displayName: "SelectableInputBase__StyledCheckbox",
|
|
3972
4251
|
componentId: "sc-1ddpctx-1"
|
|
3973
|
-
})(templateObject_2$
|
|
4252
|
+
})(templateObject_2$g || (templateObject_2$g = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n min-width: 20px;\n min-height: 20px;\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: all 150ms ease-out;\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 6px;\n top: 3px;\n width: 4px;\n height: 8px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 8px;\n width: 10px;\n height: 2px;\n background-color: ", ";\n }\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n min-width: 20px;\n min-height: 20px;\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: all 150ms ease-out;\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 6px;\n top: 3px;\n width: 4px;\n height: 8px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 8px;\n width: 10px;\n height: 2px;\n background-color: ", ";\n }\n"
|
|
3974
4253
|
/**
|
|
3975
4254
|
* Container for checkbox with proper spacing and alignment
|
|
3976
4255
|
* 48px min-height for touch target (8px grid aligned)
|
|
@@ -4003,7 +4282,7 @@ var StyledCheckboxContainer = styled.label.withConfig({
|
|
|
4003
4282
|
},
|
|
4004
4283
|
displayName: "SelectableInputBase__StyledCheckboxContainer",
|
|
4005
4284
|
componentId: "sc-1ddpctx-2"
|
|
4006
|
-
})(templateObject_3$
|
|
4285
|
+
})(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: 32px;\n flex-direction: ", ";\n user-select: none;\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: 32px;\n flex-direction: ", ";\n user-select: none;\n"
|
|
4007
4286
|
/**
|
|
4008
4287
|
* Label text with proper typography
|
|
4009
4288
|
*/])), tokensData.base.spacing[3], function (props) {
|
|
@@ -4023,16 +4302,16 @@ var StyledCheckboxLabel = styled.span.withConfig({
|
|
|
4023
4302
|
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), tokensData.component.input["default"].font, function (props) {
|
|
4024
4303
|
return props.$disabled ? tokensData.component.input.disabled.textColor : tokensData.component.input["default"].textColor;
|
|
4025
4304
|
});
|
|
4026
|
-
var templateObject_1$
|
|
4305
|
+
var templateObject_1$j, templateObject_2$g, templateObject_3$e, templateObject_4$c;
|
|
4027
4306
|
|
|
4028
4307
|
var StyledFieldContainer$3 = styled.div.withConfig({
|
|
4029
4308
|
displayName: "Checkbox__StyledFieldContainer",
|
|
4030
4309
|
componentId: "sc-vquz3v-0"
|
|
4031
|
-
})(templateObject_1$
|
|
4310
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"], ["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"])), tokensData.base.spacing[1]);
|
|
4032
4311
|
var StyledHelperText$4 = styled.span.withConfig({
|
|
4033
4312
|
displayName: "Checkbox__StyledHelperText",
|
|
4034
4313
|
componentId: "sc-vquz3v-1"
|
|
4035
|
-
})(templateObject_2$
|
|
4314
|
+
})(templateObject_2$f || (templateObject_2$f = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"], ["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"
|
|
4036
4315
|
/**
|
|
4037
4316
|
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
4038
4317
|
*
|
|
@@ -4151,12 +4430,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
4151
4430
|
});
|
|
4152
4431
|
});
|
|
4153
4432
|
Checkbox.displayName = 'Checkbox';
|
|
4154
|
-
var templateObject_1$
|
|
4433
|
+
var templateObject_1$i, templateObject_2$f;
|
|
4155
4434
|
|
|
4156
4435
|
var ChipGroupWrapper = styled.div.withConfig({
|
|
4157
4436
|
displayName: "ChipGroup__ChipGroupWrapper",
|
|
4158
4437
|
componentId: "sc-ae049w-0"
|
|
4159
|
-
})(templateObject_1$
|
|
4438
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"], ["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"])));
|
|
4160
4439
|
var ChipGroup = function ChipGroup(_a) {
|
|
4161
4440
|
var labels = _a.labels,
|
|
4162
4441
|
_b = _a.variant,
|
|
@@ -4176,24 +4455,44 @@ var ChipGroup = function ChipGroup(_a) {
|
|
|
4176
4455
|
})
|
|
4177
4456
|
});
|
|
4178
4457
|
};
|
|
4179
|
-
var templateObject_1$
|
|
4458
|
+
var templateObject_1$h;
|
|
4180
4459
|
|
|
4181
4460
|
var _a$2 = tokensData.semantic,
|
|
4182
4461
|
color$1 = _a$2.color,
|
|
4183
4462
|
border$2 = _a$2.border,
|
|
4184
4463
|
spacing$2 = _a$2.spacing;
|
|
4464
|
+
_a$2.motion;
|
|
4185
4465
|
var StyledCodeBlock = styled.pre.withConfig({
|
|
4186
4466
|
displayName: "CodeBlock__StyledCodeBlock",
|
|
4187
4467
|
componentId: "sc-1p1t0kp-0"
|
|
4188
|
-
})(templateObject_1$
|
|
4468
|
+
})(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n overflow-y: ", ";\n margin: ", " 0;\n position: relative;\n transition: max-height 300ms ease-in-out;\n \n ", "\n"], ["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n overflow-y: ", ";\n margin: ", " 0;\n position: relative;\n transition: max-height 300ms ease-in-out;\n \n ", "\n"])), color$1.background.subtle, border$2.subtle, tokensData.base.border.radius[2], spacing$2.layout.md, tokensData.base.fontFamily.monospace, tokensData.base.fontSize[1], tokensData.base.lineHeight[3], color$1.text["default"], function (_a) {
|
|
4469
|
+
var $isExpanded = _a.$isExpanded,
|
|
4470
|
+
$needsExpansion = _a.$needsExpansion;
|
|
4471
|
+
return $needsExpansion && !$isExpanded ? 'hidden' : 'auto';
|
|
4472
|
+
}, spacing$2.layout.sm, function (_a) {
|
|
4473
|
+
var $maxHeight = _a.$maxHeight,
|
|
4474
|
+
$isExpanded = _a.$isExpanded,
|
|
4475
|
+
$needsExpansion = _a.$needsExpansion;
|
|
4476
|
+
if (!$maxHeight || !$needsExpansion) return '';
|
|
4477
|
+
// Use a large value when expanded to allow smooth transition
|
|
4478
|
+
// 10000px is effectively "no limit" for most code blocks
|
|
4479
|
+
return $isExpanded ? 'max-height: 10000px;' : "max-height: ".concat($maxHeight, "px;");
|
|
4480
|
+
});
|
|
4189
4481
|
var CodeBlockWrapper = styled.div.withConfig({
|
|
4190
4482
|
displayName: "CodeBlock__CodeBlockWrapper",
|
|
4191
4483
|
componentId: "sc-1p1t0kp-1"
|
|
4192
|
-
})(templateObject_2$
|
|
4484
|
+
})(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n position: relative;\n display: inline-block;\n width: 100%;\n"], ["\n position: relative;\n display: inline-block;\n width: 100%;\n"])));
|
|
4193
4485
|
var CopyButtonWrapper = styled.div.withConfig({
|
|
4194
4486
|
displayName: "CodeBlock__CopyButtonWrapper",
|
|
4195
4487
|
componentId: "sc-1p1t0kp-2"
|
|
4196
|
-
})(templateObject_3$
|
|
4488
|
+
})(templateObject_3$d || (templateObject_3$d = __makeTemplateObject(["\n position: absolute;\n bottom: ", ";\n right: ", ";\n"], ["\n position: absolute;\n bottom: ", ";\n right: ", ";\n"])), spacing$2.layout.lg, spacing$2.layout.sm);
|
|
4489
|
+
var ExpandButtonWrapper = styled.div.withConfig({
|
|
4490
|
+
displayName: "CodeBlock__ExpandButtonWrapper",
|
|
4491
|
+
componentId: "sc-1p1t0kp-3"
|
|
4492
|
+
})(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n padding: ", " 0;\n position: absolute;\n bottom: 1px;\n left: 1px;\n right: 1px;\n width: calc(100% - 2px);\n margin-bottom: ", ";\n border-radius: ", ";\n transition: opacity 300ms ease-in-out, background 300ms ease-in-out;\n \n ", "\n"], ["\n display: flex;\n justify-content: center;\n padding: ", " 0;\n position: absolute;\n bottom: 1px;\n left: 1px;\n right: 1px;\n width: calc(100% - 2px);\n margin-bottom: ", ";\n border-radius: ", ";\n transition: opacity 300ms ease-in-out, background 300ms ease-in-out;\n \n ", "\n"])), spacing$2.layout.sm, spacing$2.layout.sm, tokensData.base.border.radius[2], function (_a) {
|
|
4493
|
+
var $hasGradient = _a.$hasGradient;
|
|
4494
|
+
return $hasGradient ? "\n margin-top: -".concat(spacing$2.layout['4xl'], ";\n padding-top: ").concat(spacing$2.layout['4xl'], ";\n background: linear-gradient(\n to bottom,\n transparent 0%,\n ").concat(color$1.background.subtle, " 60%\n );\n ") : "\n background: transparent;\n ";
|
|
4495
|
+
});
|
|
4197
4496
|
var CopyButton = function CopyButton(_a) {
|
|
4198
4497
|
var text = _a.text,
|
|
4199
4498
|
onCopy = _a.onCopy;
|
|
@@ -4254,49 +4553,121 @@ var CopyButton = function CopyButton(_a) {
|
|
|
4254
4553
|
};
|
|
4255
4554
|
/**
|
|
4256
4555
|
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
4556
|
+
* and expandable content for long code blocks.
|
|
4257
4557
|
*
|
|
4258
4558
|
* @param children - The code content to display
|
|
4259
4559
|
* @param showCopyButton - Whether to show the copy button (default: true)
|
|
4260
4560
|
* @param onCopy - Optional callback when code is copied
|
|
4561
|
+
* @param maxHeight - Maximum height in pixels before enabling expand/collapse
|
|
4562
|
+
* @param defaultExpanded - Initial expanded state when maxHeight is set
|
|
4261
4563
|
* @param data-testid - Test identifier for the code block
|
|
4564
|
+
*
|
|
4565
|
+
* @example
|
|
4566
|
+
* ```tsx
|
|
4567
|
+
* // Basic usage
|
|
4568
|
+
* <CodeBlock>const x = 1;</CodeBlock>
|
|
4569
|
+
*
|
|
4570
|
+
* // With max height and expand/collapse
|
|
4571
|
+
* <CodeBlock maxHeight={200}>
|
|
4572
|
+
* {longCodeString}
|
|
4573
|
+
* </CodeBlock>
|
|
4574
|
+
*
|
|
4575
|
+
* // Start expanded
|
|
4576
|
+
* <CodeBlock maxHeight={200} defaultExpanded>
|
|
4577
|
+
* {longCodeString}
|
|
4578
|
+
* </CodeBlock>
|
|
4579
|
+
* ```
|
|
4262
4580
|
*/
|
|
4263
4581
|
var CodeBlock = function CodeBlock(_a) {
|
|
4264
4582
|
var children = _a.children,
|
|
4265
4583
|
_b = _a.showCopyButton,
|
|
4266
4584
|
showCopyButton = _b === void 0 ? true : _b,
|
|
4267
4585
|
onCopy = _a.onCopy,
|
|
4586
|
+
maxHeight = _a.maxHeight,
|
|
4587
|
+
_c = _a.defaultExpanded,
|
|
4588
|
+
defaultExpanded = _c === void 0 ? false : _c,
|
|
4268
4589
|
testId = _a["data-testid"];
|
|
4590
|
+
var _d = useState(defaultExpanded),
|
|
4591
|
+
isExpanded = _d[0],
|
|
4592
|
+
setIsExpanded = _d[1];
|
|
4593
|
+
var _e = useState(false),
|
|
4594
|
+
needsExpansion = _e[0],
|
|
4595
|
+
setNeedsExpansion = _e[1];
|
|
4596
|
+
var contentRef = useRef(null);
|
|
4597
|
+
// Check if content exceeds maxHeight
|
|
4598
|
+
useEffect(function () {
|
|
4599
|
+
if (maxHeight && contentRef.current) {
|
|
4600
|
+
var scrollHeight = contentRef.current.scrollHeight;
|
|
4601
|
+
setNeedsExpansion(scrollHeight > maxHeight);
|
|
4602
|
+
}
|
|
4603
|
+
}, [children, maxHeight]);
|
|
4604
|
+
var handleToggleExpand = function handleToggleExpand() {
|
|
4605
|
+
setIsExpanded(function (prev) {
|
|
4606
|
+
return !prev;
|
|
4607
|
+
});
|
|
4608
|
+
// Announce state change to screen readers
|
|
4609
|
+
var announcement = isExpanded ? 'Code block collapsed' : 'Code block expanded';
|
|
4610
|
+
var announcer = document.createElement('div');
|
|
4611
|
+
announcer.setAttribute('aria-live', 'polite');
|
|
4612
|
+
announcer.setAttribute('aria-atomic', 'true');
|
|
4613
|
+
announcer.setAttribute('class', 'sr-only');
|
|
4614
|
+
announcer.style.cssText = 'position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;';
|
|
4615
|
+
announcer.textContent = announcement;
|
|
4616
|
+
document.body.appendChild(announcer);
|
|
4617
|
+
setTimeout(function () {
|
|
4618
|
+
document.body.removeChild(announcer);
|
|
4619
|
+
}, 1000);
|
|
4620
|
+
};
|
|
4621
|
+
var showExpandButton = maxHeight && needsExpansion;
|
|
4269
4622
|
return jsxs(CodeBlockWrapper, {
|
|
4270
4623
|
children: [jsx(StyledCodeBlock, {
|
|
4624
|
+
ref: contentRef,
|
|
4271
4625
|
"data-testid": testId,
|
|
4626
|
+
"$maxHeight": maxHeight,
|
|
4627
|
+
"$isExpanded": isExpanded,
|
|
4628
|
+
"$needsExpansion": needsExpansion,
|
|
4629
|
+
"aria-expanded": showExpandButton ? isExpanded : undefined,
|
|
4630
|
+
tabIndex: 0,
|
|
4272
4631
|
children: children
|
|
4632
|
+
}), showExpandButton && jsx(ExpandButtonWrapper, {
|
|
4633
|
+
"$hasGradient": !isExpanded,
|
|
4634
|
+
children: jsx(Button, {
|
|
4635
|
+
variant: "secondary",
|
|
4636
|
+
size: "small",
|
|
4637
|
+
iconName: isExpanded ? 'caretUp' : 'caretDown',
|
|
4638
|
+
onClick: handleToggleExpand,
|
|
4639
|
+
"aria-expanded": isExpanded,
|
|
4640
|
+
"aria-controls": testId,
|
|
4641
|
+
"data-testid": "expand-button",
|
|
4642
|
+
children: isExpanded ? 'Show less' : 'Show more'
|
|
4643
|
+
})
|
|
4273
4644
|
}), showCopyButton && jsx(CopyButton, {
|
|
4274
4645
|
text: children,
|
|
4275
4646
|
onCopy: onCopy
|
|
4276
4647
|
})]
|
|
4277
4648
|
});
|
|
4278
4649
|
};
|
|
4279
|
-
var templateObject_1$
|
|
4650
|
+
var templateObject_1$g, templateObject_2$e, templateObject_3$d, templateObject_4$b;
|
|
4280
4651
|
|
|
4281
4652
|
var StyledHeader = styled.div.withConfig({
|
|
4282
4653
|
displayName: "DateGroup__StyledHeader",
|
|
4283
4654
|
componentId: "sc-9nfm1f-0"
|
|
4284
|
-
})(templateObject_1$
|
|
4655
|
+
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: 1px solid ", ";\n \n ", "\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: 1px solid ", ";\n \n ", "\n"])), tokensData.semantic.spacing.layout.md, tokensData.semantic.spacing.layout.sm, tokensData.semantic.color.background["default"], tokensData.semantic.color.border["default"], function (_a) {
|
|
4285
4656
|
var $sticky = _a.$sticky;
|
|
4286
4657
|
return $sticky && "\n position: sticky;\n top: 0;\n z-index: 10;\n box-shadow: ".concat(tokensData.base.shadow[2], ";\n ");
|
|
4287
4658
|
});
|
|
4288
4659
|
var StyledLeftSection = styled.div.withConfig({
|
|
4289
4660
|
displayName: "DateGroup__StyledLeftSection",
|
|
4290
4661
|
componentId: "sc-9nfm1f-1"
|
|
4291
|
-
})(templateObject_2$
|
|
4662
|
+
})(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n"])), tokensData.semantic.spacing.layout.sm);
|
|
4292
4663
|
var StyledRightSection = styled.div.withConfig({
|
|
4293
4664
|
displayName: "DateGroup__StyledRightSection",
|
|
4294
4665
|
componentId: "sc-9nfm1f-2"
|
|
4295
|
-
})(templateObject_3$
|
|
4666
|
+
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n"])), tokensData.semantic.spacing.layout.md);
|
|
4296
4667
|
var StyledContent = styled.div.withConfig({
|
|
4297
4668
|
displayName: "DateGroup__StyledContent",
|
|
4298
4669
|
componentId: "sc-9nfm1f-3"
|
|
4299
|
-
})(templateObject_4$
|
|
4670
|
+
})(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n /* Content area for children */\n"], ["\n /* Content area for children */\n"
|
|
4300
4671
|
/**
|
|
4301
4672
|
* DateGroup component
|
|
4302
4673
|
*
|
|
@@ -4368,18 +4739,18 @@ var DateGroup = function DateGroup(_a) {
|
|
|
4368
4739
|
})]
|
|
4369
4740
|
});
|
|
4370
4741
|
};
|
|
4371
|
-
var templateObject_1$
|
|
4742
|
+
var templateObject_1$f, templateObject_2$d, templateObject_3$c, templateObject_4$a;
|
|
4372
4743
|
|
|
4373
|
-
var semantic$
|
|
4744
|
+
var semantic$8 = tokensData.semantic;
|
|
4374
4745
|
var StyledContainer$1 = styled.div.withConfig({
|
|
4375
4746
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4376
4747
|
return !prop.startsWith('$');
|
|
4377
4748
|
},
|
|
4378
4749
|
displayName: "EmptyState__StyledContainer",
|
|
4379
4750
|
componentId: "sc-1u5hxh-0"
|
|
4380
|
-
})(templateObject_1$
|
|
4751
|
+
})(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 400px;\n margin: 0 auto;\n padding: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 400px;\n margin: 0 auto;\n padding: ", ";\n"])), function (_a) {
|
|
4381
4752
|
var $size = _a.$size;
|
|
4382
|
-
return $size === 'small' ? semantic$
|
|
4753
|
+
return $size === 'small' ? semantic$8.spacing.layout['4xl'] : $size === 'large' ? semantic$8.spacing.layout['8xl'] : semantic$8.spacing.layout['6xl'];
|
|
4383
4754
|
});
|
|
4384
4755
|
var StyledIllustration = styled.div.withConfig({
|
|
4385
4756
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -4387,22 +4758,22 @@ var StyledIllustration = styled.div.withConfig({
|
|
|
4387
4758
|
},
|
|
4388
4759
|
displayName: "EmptyState__StyledIllustration",
|
|
4389
4760
|
componentId: "sc-1u5hxh-1"
|
|
4390
|
-
})(templateObject_2$
|
|
4761
|
+
})(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: ", ";\n color: ", ";\n"], ["\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: ", ";\n color: ", ";\n"])), function (_a) {
|
|
4391
4762
|
var $size = _a.$size;
|
|
4392
4763
|
return $size === 'small' ? '80px' : $size === 'large' ? '200px' : '120px';
|
|
4393
4764
|
}, function (_a) {
|
|
4394
4765
|
var $size = _a.$size;
|
|
4395
4766
|
return $size === 'small' ? '80px' : $size === 'large' ? '200px' : '120px';
|
|
4396
|
-
}, semantic$
|
|
4767
|
+
}, semantic$8.spacing.layout['2xl'], function (_a) {
|
|
4397
4768
|
var $variant = _a.$variant;
|
|
4398
|
-
return $variant === 'error' ? semantic$
|
|
4769
|
+
return $variant === 'error' ? semantic$8.color.icon.error : $variant === 'success' ? semantic$8.color.icon.success : semantic$8.color.icon.subdued;
|
|
4399
4770
|
});
|
|
4400
4771
|
var StyledTextContainer = styled.div.withConfig({
|
|
4401
4772
|
displayName: "EmptyState__StyledTextContainer",
|
|
4402
4773
|
componentId: "sc-1u5hxh-2"
|
|
4403
|
-
})(templateObject_3$
|
|
4774
|
+
})(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n max-width: 360px;\n margin-bottom: ", ";\n"], ["\n max-width: 360px;\n margin-bottom: ", ";\n"
|
|
4404
4775
|
// Map illustration type to icon name
|
|
4405
|
-
])), semantic$
|
|
4776
|
+
])), semantic$8.spacing.layout['2xl']);
|
|
4406
4777
|
// Map illustration type to icon name
|
|
4407
4778
|
var illustrationToIcon = {
|
|
4408
4779
|
search: 'search',
|
|
@@ -4457,7 +4828,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4457
4828
|
children: title
|
|
4458
4829
|
}), jsx("div", {
|
|
4459
4830
|
style: {
|
|
4460
|
-
marginTop: semantic$
|
|
4831
|
+
marginTop: semantic$8.spacing.layout.md
|
|
4461
4832
|
},
|
|
4462
4833
|
children: jsx(Typography, {
|
|
4463
4834
|
variant: "body",
|
|
@@ -4487,7 +4858,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4487
4858
|
})]
|
|
4488
4859
|
});
|
|
4489
4860
|
};
|
|
4490
|
-
var templateObject_1$
|
|
4861
|
+
var templateObject_1$e, templateObject_2$c, templateObject_3$b;
|
|
4491
4862
|
|
|
4492
4863
|
var _a$1 = tokensData.base,
|
|
4493
4864
|
spacing$1 = _a$1.spacing,
|
|
@@ -4495,23 +4866,23 @@ var _a$1 = tokensData.base,
|
|
|
4495
4866
|
var FeatureBlockStyled = styled.div.withConfig({
|
|
4496
4867
|
displayName: "FeatureBlock__FeatureBlockStyled",
|
|
4497
4868
|
componentId: "sc-1mi4lso-0"
|
|
4498
|
-
})(templateObject_1$
|
|
4869
|
+
})(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n @media (min-width: ", ") {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n }\n\n @media (min-width: ", ") {\n gap: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n\n &:hover {\n opacity: 0.8;\n }\n }\n\n a {\n text-decoration: none;\n }\n"], ["\n @media (min-width: ", ") {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n }\n\n @media (min-width: ", ") {\n gap: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ease opacity 0.2s;\n\n &:hover {\n opacity: 0.8;\n }\n }\n\n a {\n text-decoration: none;\n }\n"])), tokensData.base.breakpoint.md, tokensData.base.breakpoint.lg, spacing$1[12], border$1.radius[6]);
|
|
4499
4870
|
var ImageWrapper = styled.div.withConfig({
|
|
4500
4871
|
displayName: "FeatureBlock__ImageWrapper",
|
|
4501
4872
|
componentId: "sc-1mi4lso-1"
|
|
4502
|
-
})(templateObject_2$
|
|
4873
|
+
})(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"], ["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"])), tokensData.base.breakpoint.lg);
|
|
4503
4874
|
var ContentSection = styled.div.withConfig({
|
|
4504
4875
|
displayName: "FeatureBlock__ContentSection",
|
|
4505
4876
|
componentId: "sc-1mi4lso-2"
|
|
4506
|
-
})(templateObject_3$
|
|
4877
|
+
})(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"], ["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"])), spacing$1[6], tokensData.base.breakpoint.lg, spacing$1[8], tokensData.base.breakpoint.xl, spacing$1[24]);
|
|
4507
4878
|
var ButtonWrapper = styled.div.withConfig({
|
|
4508
4879
|
displayName: "FeatureBlock__ButtonWrapper",
|
|
4509
4880
|
componentId: "sc-1mi4lso-3"
|
|
4510
|
-
})(templateObject_4$
|
|
4881
|
+
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n button {\n margin-top: ", ";\n }\n"], ["\n button {\n margin-top: ", ";\n }\n"])), spacing$1[4]);
|
|
4511
4882
|
var ContentWrapper = styled.div.withConfig({
|
|
4512
4883
|
displayName: "FeatureBlock__ContentWrapper",
|
|
4513
4884
|
componentId: "sc-1mi4lso-4"
|
|
4514
|
-
})(templateObject_5$
|
|
4885
|
+
})(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n"])));
|
|
4515
4886
|
var FeatureBlock = function FeatureBlock(_a) {
|
|
4516
4887
|
var title = _a.title,
|
|
4517
4888
|
excerpt = _a.excerpt,
|
|
@@ -4568,7 +4939,7 @@ var FeatureBlock = function FeatureBlock(_a) {
|
|
|
4568
4939
|
}), jsx(Divider, {})]
|
|
4569
4940
|
});
|
|
4570
4941
|
};
|
|
4571
|
-
var templateObject_1$
|
|
4942
|
+
var templateObject_1$d, templateObject_2$b, templateObject_3$a, templateObject_4$9, templateObject_5$8;
|
|
4572
4943
|
|
|
4573
4944
|
var _a = tokensData.base,
|
|
4574
4945
|
spacing = _a.spacing,
|
|
@@ -4582,14 +4953,14 @@ var _a = tokensData.base,
|
|
|
4582
4953
|
var DropdownContainer = styled.div.withConfig({
|
|
4583
4954
|
displayName: "Dropdown__DropdownContainer",
|
|
4584
4955
|
componentId: "sc-kz07c4-0"
|
|
4585
|
-
})(templateObject_1$
|
|
4956
|
+
})(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n position: relative;\n width: 100%;\n"], ["\n position: relative;\n width: 100%;\n"])));
|
|
4586
4957
|
var DropdownTrigger = styled.button.withConfig({
|
|
4587
4958
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4588
4959
|
return !prop.startsWith('$');
|
|
4589
4960
|
},
|
|
4590
4961
|
displayName: "Dropdown__DropdownTrigger",
|
|
4591
4962
|
componentId: "sc-kz07c4-1"
|
|
4592
|
-
})(templateObject_2$
|
|
4963
|
+
})(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color 200ms ease-in-out, \n outline 200ms ease-in-out;\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor: ", ";\n }\n \n ", "\n"], ["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color 200ms ease-in-out, \n outline 200ms ease-in-out;\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor: ", ";\n }\n \n ", "\n"])), input$1["default"].paddingY, input$1["default"].paddingX, input$1["default"].backgroundColor, input$1["default"].borderWidth, function (_a) {
|
|
4593
4964
|
var $hasError = _a.$hasError;
|
|
4594
4965
|
return $hasError ? input$1.error.borderColor : input$1["default"].borderColor;
|
|
4595
4966
|
}, input$1["default"].borderRadius, input$1["default"].font, input$1["default"].textColor, function (_a) {
|
|
@@ -4609,7 +4980,7 @@ var DropdownIcon = styled.div.withConfig({
|
|
|
4609
4980
|
},
|
|
4610
4981
|
displayName: "Dropdown__DropdownIcon",
|
|
4611
4982
|
componentId: "sc-kz07c4-2"
|
|
4612
|
-
})(templateObject_3$
|
|
4983
|
+
})(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: ", ";\n transition: transform 0.15s ease;\n \n ", "\n"], ["\n display: flex;\n align-items: center;\n margin-left: ", ";\n transition: transform 0.15s ease;\n \n ", "\n"])), spacing[2], function (_a) {
|
|
4613
4984
|
var $isOpen = _a.$isOpen;
|
|
4614
4985
|
return $isOpen && "\n transform: rotate(180deg);\n ";
|
|
4615
4986
|
});
|
|
@@ -4619,7 +4990,7 @@ var DropdownMenu = styled.div.withConfig({
|
|
|
4619
4990
|
},
|
|
4620
4991
|
displayName: "Dropdown__DropdownMenu",
|
|
4621
4992
|
componentId: "sc-kz07c4-3"
|
|
4622
|
-
})(templateObject_4$
|
|
4993
|
+
})(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: all 0.15s ease;\n max-height: 300px;\n overflow-y: auto;\n"], ["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: all 0.15s ease;\n max-height: 300px;\n overflow-y: auto;\n"])), zIndex[3], input$1["default"].backgroundColor, input$1["default"].borderWidth, input$1["default"].borderColor, input$1["default"].borderRadius, shadow[3], spacing[1], function (_a) {
|
|
4623
4994
|
var $isOpen = _a.$isOpen;
|
|
4624
4995
|
return $isOpen ? 1 : 0;
|
|
4625
4996
|
}, function (_a) {
|
|
@@ -4635,7 +5006,7 @@ var DropdownOption = styled.button.withConfig({
|
|
|
4635
5006
|
},
|
|
4636
5007
|
displayName: "Dropdown__DropdownOption",
|
|
4637
5008
|
componentId: "sc-kz07c4-4"
|
|
4638
|
-
})(templateObject_5$
|
|
5009
|
+
})(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color 0.15s ease;\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"], ["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color 0.15s ease;\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"])), input$1["default"].paddingY, input$1["default"].paddingX, function (_a) {
|
|
4639
5010
|
var $isSelected = _a.$isSelected,
|
|
4640
5011
|
$isFocused = _a.$isFocused;
|
|
4641
5012
|
if ($isFocused) return color.background.surface;
|
|
@@ -4645,7 +5016,7 @@ var DropdownOption = styled.button.withConfig({
|
|
|
4645
5016
|
var StyledHelperText$3 = styled.div.withConfig({
|
|
4646
5017
|
displayName: "Dropdown__StyledHelperText",
|
|
4647
5018
|
componentId: "sc-kz07c4-5"
|
|
4648
|
-
})(templateObject_6$
|
|
5019
|
+
})(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"], ["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"])), typography.caption, function (_a) {
|
|
4649
5020
|
var $hasError = _a.$hasError;
|
|
4650
5021
|
return $hasError ? color.text.error : color.text.subdued;
|
|
4651
5022
|
}, spacing[2]);
|
|
@@ -4668,8 +5039,8 @@ var Dropdown = function Dropdown(_a) {
|
|
|
4668
5039
|
focusedIndex = _e[0],
|
|
4669
5040
|
setFocusedIndex = _e[1];
|
|
4670
5041
|
var dropdownRef = useRef(null);
|
|
4671
|
-
// Generate unique ID for accessibility
|
|
4672
|
-
var dropdownId =
|
|
5042
|
+
// Generate unique ID for accessibility (SSR-safe)
|
|
5043
|
+
var dropdownId = useId();
|
|
4673
5044
|
var selectedOption = options.find(function (option) {
|
|
4674
5045
|
return option.id === value;
|
|
4675
5046
|
});
|
|
@@ -4822,18 +5193,18 @@ var Dropdown = function Dropdown(_a) {
|
|
|
4822
5193
|
})]
|
|
4823
5194
|
});
|
|
4824
5195
|
};
|
|
4825
|
-
var templateObject_1$
|
|
5196
|
+
var templateObject_1$c, templateObject_2$a, templateObject_3$9, templateObject_4$8, templateObject_5$7, templateObject_6$6;
|
|
4826
5197
|
|
|
4827
|
-
var semantic$
|
|
5198
|
+
var semantic$7 = tokensData.semantic;
|
|
4828
5199
|
var StyledList = styled.ul.withConfig({
|
|
4829
5200
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4830
5201
|
return !prop.startsWith('$');
|
|
4831
5202
|
},
|
|
4832
5203
|
displayName: "List__StyledList",
|
|
4833
5204
|
componentId: "sc-1irksg5-0"
|
|
4834
|
-
})(templateObject_1$
|
|
5205
|
+
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n \n /* Divider styles */\n ", "\n"], ["\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n \n /* Divider styles */\n ", "\n"])), function (_a) {
|
|
4835
5206
|
var $dividers = _a.$dividers;
|
|
4836
|
-
return $dividers && "\n > li:not(:last-child) {\n border-bottom: 1px solid ".concat(semantic$
|
|
5207
|
+
return $dividers && "\n > li:not(:last-child) {\n border-bottom: 1px solid ".concat(semantic$7.color.border["default"], ";\n }\n ");
|
|
4837
5208
|
});
|
|
4838
5209
|
var List = function List(_a) {
|
|
4839
5210
|
var children = _a.children,
|
|
@@ -4855,194 +5226,7 @@ var List = function List(_a) {
|
|
|
4855
5226
|
}));
|
|
4856
5227
|
};
|
|
4857
5228
|
List.displayName = 'List';
|
|
4858
|
-
var templateObject_1$
|
|
4859
|
-
|
|
4860
|
-
var semantic$7 = tokensData.semantic,
|
|
4861
|
-
base$7 = tokensData.base;
|
|
4862
|
-
var StyledListItem = styled.li.withConfig({
|
|
4863
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4864
|
-
return !prop.startsWith('$');
|
|
4865
|
-
},
|
|
4866
|
-
displayName: "ListItem__StyledListItem",
|
|
4867
|
-
componentId: "sc-1wzzt21-0"
|
|
4868
|
-
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-height: 44px; /* Touch target minimum */\n position: relative;\n \n /* Disable user selection for interactive items */\n ", "\n \n /* Disabled state */\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n min-height: 44px; /* Touch target minimum */\n position: relative;\n \n /* Disable user selection for interactive items */\n ", "\n \n /* Disabled state */\n ", "\n"])), function (_a) {
|
|
4869
|
-
var $interactive = _a.$interactive;
|
|
4870
|
-
return $interactive && 'user-select: none;';
|
|
4871
|
-
}, function (_a) {
|
|
4872
|
-
var $disabled = _a.$disabled;
|
|
4873
|
-
return $disabled && "\n opacity: ".concat(base$7.opacity[50], ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
4874
|
-
});
|
|
4875
|
-
var StyledItemContent = styled.div.withConfig({
|
|
4876
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4877
|
-
return !prop.startsWith('$');
|
|
4878
|
-
},
|
|
4879
|
-
displayName: "ListItem__StyledItemContent",
|
|
4880
|
-
componentId: "sc-1wzzt21-1"
|
|
4881
|
-
})(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n background-color: ", ";\n transition: background-color 150ms ease;\n cursor: ", ";\n \n /* Interactive hover states */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"], ["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n background-color: ", ";\n transition: background-color 150ms ease;\n cursor: ", ";\n \n /* Interactive hover states */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"])), semantic$7.spacing.layout.md, function (_a) {
|
|
4882
|
-
var $spacing = _a.$spacing;
|
|
4883
|
-
return $spacing === 'compact' ? "".concat(semantic$7.spacing.layout.sm, " ").concat(semantic$7.spacing.layout.md) : "".concat(semantic$7.spacing.layout.md, " ").concat(semantic$7.spacing.layout.lg);
|
|
4884
|
-
}, base$7.border.radius[2], function (_a) {
|
|
4885
|
-
var $selected = _a.$selected;
|
|
4886
|
-
return $selected ? semantic$7.color.background['interactive-subtle'] : 'transparent';
|
|
4887
|
-
}, function (_a) {
|
|
4888
|
-
var $interactive = _a.$interactive,
|
|
4889
|
-
$disabled = _a.$disabled;
|
|
4890
|
-
if ($disabled) return 'not-allowed';
|
|
4891
|
-
if ($interactive) return 'pointer';
|
|
4892
|
-
return 'default';
|
|
4893
|
-
}, function (_a) {
|
|
4894
|
-
var $interactive = _a.$interactive,
|
|
4895
|
-
$disabled = _a.$disabled,
|
|
4896
|
-
$selected = _a.$selected;
|
|
4897
|
-
return !$disabled && $interactive && "\n &:hover {\n background-color: ".concat($selected ? tokensData.component.button.variants.secondary.backgroundColor : tokensData.component.button.variants.secondary.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat(tokensData.component.button.variants.naked.backgroundColor, ";\n }\n ");
|
|
4898
|
-
}, semantic$7.color.border.interactive);
|
|
4899
|
-
var StyledIconContainer = styled.div.withConfig({
|
|
4900
|
-
displayName: "ListItem__StyledIconContainer",
|
|
4901
|
-
componentId: "sc-1wzzt21-2"
|
|
4902
|
-
})(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n"], ["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n"])));
|
|
4903
|
-
var StyledTextContent = styled.div.withConfig({
|
|
4904
|
-
displayName: "ListItem__StyledTextContent",
|
|
4905
|
-
componentId: "sc-1wzzt21-3"
|
|
4906
|
-
})(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text truncation */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text truncation */\n"])), semantic$7.spacing.layout.xs);
|
|
4907
|
-
var StyledRightContent = styled.div.withConfig({
|
|
4908
|
-
displayName: "ListItem__StyledRightContent",
|
|
4909
|
-
componentId: "sc-1wzzt21-4"
|
|
4910
|
-
})(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"])), semantic$7.spacing.layout.sm);
|
|
4911
|
-
var StyledChevronIcon = styled.div.withConfig({
|
|
4912
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4913
|
-
return !prop.startsWith('$');
|
|
4914
|
-
},
|
|
4915
|
-
displayName: "ListItem__StyledChevronIcon",
|
|
4916
|
-
componentId: "sc-1wzzt21-5"
|
|
4917
|
-
})(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n color: ", ";\n transition: transform 200ms ease;\n transform: rotate(", ");\n pointer-events: none;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n color: ", ";\n transition: transform 200ms ease;\n transform: rotate(", ");\n pointer-events: none;\n"])), semantic$7.color.icon.subdued, function (_a) {
|
|
4918
|
-
var $expanded = _a.$expanded;
|
|
4919
|
-
return $expanded ? '180deg' : '0deg';
|
|
4920
|
-
});
|
|
4921
|
-
var StyledExpandedContent = styled.div.withConfig({
|
|
4922
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4923
|
-
return !prop.startsWith('$');
|
|
4924
|
-
},
|
|
4925
|
-
displayName: "ListItem__StyledExpandedContent",
|
|
4926
|
-
componentId: "sc-1wzzt21-6"
|
|
4927
|
-
})(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject(["\n overflow: hidden;\n transition: max-height 200ms ease-out, opacity 200ms ease-out;\n max-height: ", ";\n opacity: ", ";\n \n ", "\n"], ["\n overflow: hidden;\n transition: max-height 200ms ease-out, opacity 200ms ease-out;\n max-height: ", ";\n opacity: ", ";\n \n ", "\n"])), function (_a) {
|
|
4928
|
-
var $expanded = _a.$expanded;
|
|
4929
|
-
return $expanded ? '1000px' : '0';
|
|
4930
|
-
}, function (_a) {
|
|
4931
|
-
var $expanded = _a.$expanded;
|
|
4932
|
-
return $expanded ? '1' : '0';
|
|
4933
|
-
}, function (_a) {
|
|
4934
|
-
var $expanded = _a.$expanded,
|
|
4935
|
-
$spacing = _a.$spacing;
|
|
4936
|
-
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$7.spacing.layout.sm, " ").concat(semantic$7.spacing.layout.md, " ").concat(semantic$7.spacing.layout.sm, " 48px") : "".concat(semantic$7.spacing.layout.sm, " ").concat(semantic$7.spacing.layout.lg, " ").concat(semantic$7.spacing.layout.md, " 60px"), ";\n background-color: ").concat(semantic$7.color.background['subtle'], ";\n border-radius: ").concat(base$7.border.radius[2], ";\n margin: 0 ").concat($spacing === 'compact' ? semantic$7.spacing.layout.md : semantic$7.spacing.layout.lg, " ").concat($spacing === 'compact' ? semantic$7.spacing.layout.sm : semantic$7.spacing.layout.md, ";\n ");
|
|
4937
|
-
});
|
|
4938
|
-
var ListItem = function ListItem(_a) {
|
|
4939
|
-
var primary = _a.primary,
|
|
4940
|
-
secondary = _a.secondary,
|
|
4941
|
-
badge = _a.badge,
|
|
4942
|
-
icon = _a.icon,
|
|
4943
|
-
_b = _a.expandable,
|
|
4944
|
-
expandable = _b === void 0 ? false : _b,
|
|
4945
|
-
_c = _a.expanded,
|
|
4946
|
-
expanded = _c === void 0 ? false : _c,
|
|
4947
|
-
onToggle = _a.onToggle,
|
|
4948
|
-
_d = _a.interactive,
|
|
4949
|
-
interactive = _d === void 0 ? false : _d,
|
|
4950
|
-
onClick = _a.onClick,
|
|
4951
|
-
_e = _a.disabled,
|
|
4952
|
-
disabled = _e === void 0 ? false : _e,
|
|
4953
|
-
_f = _a.selected,
|
|
4954
|
-
selected = _f === void 0 ? false : _f,
|
|
4955
|
-
_g = _a.spacing,
|
|
4956
|
-
spacing = _g === void 0 ? 'comfortable' : _g,
|
|
4957
|
-
children = _a.children,
|
|
4958
|
-
className = _a.className,
|
|
4959
|
-
dataTestId = _a["data-testid"],
|
|
4960
|
-
customRole = _a.role,
|
|
4961
|
-
ariaSelected = _a["aria-selected"],
|
|
4962
|
-
id = _a.id,
|
|
4963
|
-
customTabIndex = _a.tabIndex,
|
|
4964
|
-
customOnKeyDown = _a.onKeyDown,
|
|
4965
|
-
props = __rest(_a, ["primary", "secondary", "badge", "icon", "expandable", "expanded", "onToggle", "interactive", "onClick", "disabled", "selected", "spacing", "children", "className", 'data-testid', "role", 'aria-selected', "id", "tabIndex", "onKeyDown"]);
|
|
4966
|
-
var isInteractive = interactive || expandable || customRole === 'option';
|
|
4967
|
-
var contentRole = customRole === 'option' ? undefined : isInteractive ? 'button' : undefined;
|
|
4968
|
-
var ariaExpanded = expandable ? expanded : undefined;
|
|
4969
|
-
var ariaDisabled = disabled ? true : undefined;
|
|
4970
|
-
var ariaCurrent = selected ? 'true' : undefined;
|
|
4971
|
-
var handleClick = function handleClick() {
|
|
4972
|
-
if (disabled) return;
|
|
4973
|
-
if (expandable && onToggle) {
|
|
4974
|
-
onToggle();
|
|
4975
|
-
} else if (onClick) {
|
|
4976
|
-
onClick();
|
|
4977
|
-
}
|
|
4978
|
-
};
|
|
4979
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
4980
|
-
if (customOnKeyDown) {
|
|
4981
|
-
customOnKeyDown(event);
|
|
4982
|
-
return;
|
|
4983
|
-
}
|
|
4984
|
-
if (disabled) return;
|
|
4985
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
4986
|
-
event.preventDefault();
|
|
4987
|
-
handleClick();
|
|
4988
|
-
}
|
|
4989
|
-
};
|
|
4990
|
-
return jsxs(StyledListItem, __assign({
|
|
4991
|
-
"$interactive": isInteractive,
|
|
4992
|
-
"$disabled": disabled,
|
|
4993
|
-
"$selected": selected,
|
|
4994
|
-
"$spacing": spacing,
|
|
4995
|
-
className: className,
|
|
4996
|
-
"data-testid": dataTestId,
|
|
4997
|
-
role: customRole || 'listitem',
|
|
4998
|
-
id: id,
|
|
4999
|
-
"aria-selected": ariaSelected
|
|
5000
|
-
}, props, {
|
|
5001
|
-
children: [jsxs(StyledItemContent, {
|
|
5002
|
-
"$interactive": isInteractive,
|
|
5003
|
-
"$disabled": disabled,
|
|
5004
|
-
"$selected": selected,
|
|
5005
|
-
"$spacing": spacing,
|
|
5006
|
-
role: contentRole,
|
|
5007
|
-
"aria-expanded": ariaExpanded,
|
|
5008
|
-
"aria-disabled": ariaDisabled,
|
|
5009
|
-
"aria-current": ariaCurrent,
|
|
5010
|
-
tabIndex: customTabIndex !== undefined ? customTabIndex : isInteractive && !disabled ? 0 : undefined,
|
|
5011
|
-
onClick: handleClick,
|
|
5012
|
-
onKeyDown: handleKeyDown,
|
|
5013
|
-
children: [icon && jsx(StyledIconContainer, {
|
|
5014
|
-
"aria-hidden": "true",
|
|
5015
|
-
children: icon
|
|
5016
|
-
}), jsxs(StyledTextContent, {
|
|
5017
|
-
children: [jsx(Typography, {
|
|
5018
|
-
variant: "body",
|
|
5019
|
-
color: "default",
|
|
5020
|
-
children: primary
|
|
5021
|
-
}), secondary && jsx(Typography, {
|
|
5022
|
-
variant: "small",
|
|
5023
|
-
color: "subdued",
|
|
5024
|
-
children: secondary
|
|
5025
|
-
})]
|
|
5026
|
-
}), jsxs(StyledRightContent, {
|
|
5027
|
-
children: [badge, expandable && jsx(StyledChevronIcon, {
|
|
5028
|
-
"$expanded": expanded,
|
|
5029
|
-
"aria-hidden": "true",
|
|
5030
|
-
children: jsx(Icon, {
|
|
5031
|
-
name: "caretDown",
|
|
5032
|
-
size: "sm"
|
|
5033
|
-
})
|
|
5034
|
-
})]
|
|
5035
|
-
})]
|
|
5036
|
-
}), expandable && children && jsx(StyledExpandedContent, {
|
|
5037
|
-
"$spacing": spacing,
|
|
5038
|
-
"$expanded": expanded,
|
|
5039
|
-
"aria-hidden": !expanded,
|
|
5040
|
-
children: children
|
|
5041
|
-
})]
|
|
5042
|
-
}));
|
|
5043
|
-
};
|
|
5044
|
-
ListItem.displayName = 'ListItem';
|
|
5045
|
-
var templateObject_1$b, templateObject_2$a, templateObject_3$9, templateObject_4$8, templateObject_5$7, templateObject_6$6, templateObject_7$5;
|
|
5229
|
+
var templateObject_1$b;
|
|
5046
5230
|
|
|
5047
5231
|
var input = tokensData.component.input;
|
|
5048
5232
|
var StyledInputBase = styled.input.withConfig({
|