@common-origin/design-system 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/IconButton/IconButton.d.ts +1 -2
- package/dist/components/molecules/AgentInput/AgentInput.d.ts +30 -0
- package/dist/components/molecules/AgentInput/agentInputSpeech.d.ts +43 -0
- package/dist/components/molecules/AgentInput/agentInputStateMachine.d.ts +29 -0
- package/dist/components/molecules/AgentInput/index.d.ts +3 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/index.esm.js +1035 -218
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1035 -217
- package/dist/index.js.map +1 -1
- package/dist/styles/icons.json +8 -0
- package/dist/types/icons.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -84,6 +84,16 @@ function __generator(thisArg, body) {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
function __spreadArray(to, from, pack) {
|
|
88
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
89
|
+
if (ar || !(i in from)) {
|
|
90
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
91
|
+
ar[i] = from[i];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
95
|
+
}
|
|
96
|
+
|
|
87
97
|
function __makeTemplateObject(cooked, raw) {
|
|
88
98
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
89
99
|
return cooked;
|
|
@@ -93,7 +103,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
93
103
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
94
104
|
};
|
|
95
105
|
|
|
96
|
-
var base$
|
|
106
|
+
var base$c = {
|
|
97
107
|
border: {
|
|
98
108
|
radius: {
|
|
99
109
|
"1": "0.125rem",
|
|
@@ -409,7 +419,7 @@ var base$b = {
|
|
|
409
419
|
},
|
|
410
420
|
$ref: "./base/index.json"
|
|
411
421
|
};
|
|
412
|
-
var component$
|
|
422
|
+
var component$3 = {
|
|
413
423
|
button: {
|
|
414
424
|
primary: {
|
|
415
425
|
backgroundColor: "#212529",
|
|
@@ -745,7 +755,7 @@ var component$2 = {
|
|
|
745
755
|
},
|
|
746
756
|
$ref: "./component/index.json"
|
|
747
757
|
};
|
|
748
|
-
var semantic$
|
|
758
|
+
var semantic$j = {
|
|
749
759
|
elevation: {
|
|
750
760
|
none: "none",
|
|
751
761
|
inset: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)",
|
|
@@ -949,16 +959,16 @@ var semantic$i = {
|
|
|
949
959
|
$ref: "./semantic/index.json"
|
|
950
960
|
};
|
|
951
961
|
var tokensData = {
|
|
952
|
-
base: base$
|
|
953
|
-
component: component$
|
|
954
|
-
semantic: semantic$
|
|
962
|
+
base: base$c,
|
|
963
|
+
component: component$3,
|
|
964
|
+
semantic: semantic$j
|
|
955
965
|
};
|
|
956
966
|
|
|
957
967
|
// Destructure tokens
|
|
958
|
-
var semantic$
|
|
959
|
-
var color$a = semantic$
|
|
960
|
-
size$1 = semantic$
|
|
961
|
-
border$a = semantic$
|
|
968
|
+
var semantic$i = tokensData.semantic;
|
|
969
|
+
var color$a = semantic$i.color,
|
|
970
|
+
size$1 = semantic$i.size,
|
|
971
|
+
border$a = semantic$i.border;
|
|
962
972
|
var radius$6 = border$a.radius;
|
|
963
973
|
var AvatarContainer = styled.div.withConfig({
|
|
964
974
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -966,7 +976,7 @@ var AvatarContainer = styled.div.withConfig({
|
|
|
966
976
|
},
|
|
967
977
|
displayName: "Avatar__AvatarContainer",
|
|
968
978
|
componentId: "sc-ezn4ax-0"
|
|
969
|
-
})(templateObject_1$
|
|
979
|
+
})(templateObject_1$J || (templateObject_1$J = __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) {
|
|
970
980
|
var $size = _a.$size;
|
|
971
981
|
return size$1.avatar[$size];
|
|
972
982
|
}, function (_a) {
|
|
@@ -979,14 +989,14 @@ var AvatarImage = styled.img.withConfig({
|
|
|
979
989
|
},
|
|
980
990
|
displayName: "Avatar__AvatarImage",
|
|
981
991
|
componentId: "sc-ezn4ax-1"
|
|
982
|
-
})(templateObject_2$
|
|
992
|
+
})(templateObject_2$u || (templateObject_2$u = __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);
|
|
983
993
|
var AvatarInitials = styled.span.withConfig({
|
|
984
994
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
985
995
|
return !prop.startsWith('$');
|
|
986
996
|
},
|
|
987
997
|
displayName: "Avatar__AvatarInitials",
|
|
988
998
|
componentId: "sc-ezn4ax-2"
|
|
989
|
-
})(templateObject_3$
|
|
999
|
+
})(templateObject_3$r || (templateObject_3$r = __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"
|
|
990
1000
|
// Helper function to get initials from name
|
|
991
1001
|
])), tokensData.base.fontFamily.body, tokensData.base.fontWeight[3], function (_a) {
|
|
992
1002
|
var $size = _a.$size;
|
|
@@ -1052,11 +1062,11 @@ var Avatar = function Avatar(_a) {
|
|
|
1052
1062
|
})
|
|
1053
1063
|
}));
|
|
1054
1064
|
};
|
|
1055
|
-
var templateObject_1$
|
|
1065
|
+
var templateObject_1$J, templateObject_2$u, templateObject_3$r;
|
|
1056
1066
|
|
|
1057
|
-
var _a$
|
|
1058
|
-
typography$5 = _a$
|
|
1059
|
-
color$9 = _a$
|
|
1067
|
+
var _a$8 = tokensData.semantic,
|
|
1068
|
+
typography$5 = _a$8.typography,
|
|
1069
|
+
color$9 = _a$8.color;
|
|
1060
1070
|
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
1061
1071
|
var styles = {
|
|
1062
1072
|
display: "font: ".concat(typography$5.display, "; letter-spacing: ").concat(tokensData.base.letterSpacing[0], ";"),
|
|
@@ -1119,7 +1129,7 @@ var StyledTypography = styled.span.withConfig({
|
|
|
1119
1129
|
},
|
|
1120
1130
|
displayName: "Typography__StyledTypography",
|
|
1121
1131
|
componentId: "sc-17mqo4k-0"
|
|
1122
|
-
})(templateObject_1$
|
|
1132
|
+
})(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"], ["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"
|
|
1123
1133
|
/**
|
|
1124
1134
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
1125
1135
|
*
|
|
@@ -1187,24 +1197,24 @@ var Typography = function Typography(_a) {
|
|
|
1187
1197
|
children: children
|
|
1188
1198
|
});
|
|
1189
1199
|
};
|
|
1190
|
-
var templateObject_1$
|
|
1200
|
+
var templateObject_1$I;
|
|
1191
1201
|
|
|
1192
|
-
var semantic$
|
|
1193
|
-
var color$8 = semantic$
|
|
1194
|
-
border$9 = semantic$
|
|
1202
|
+
var semantic$h = tokensData.semantic;
|
|
1203
|
+
var color$8 = semantic$h.color,
|
|
1204
|
+
border$9 = semantic$h.border;
|
|
1195
1205
|
var radius$5 = border$9.radius;
|
|
1196
|
-
var scaleIn$1 = styled.keyframes(templateObject_1$
|
|
1206
|
+
var scaleIn$1 = styled.keyframes(templateObject_1$H || (templateObject_1$H = __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"])));
|
|
1197
1207
|
var BadgeWrapper = styled.span.withConfig({
|
|
1198
1208
|
displayName: "Badge__BadgeWrapper",
|
|
1199
1209
|
componentId: "sc-tjz4pp-0"
|
|
1200
|
-
})(templateObject_2$
|
|
1210
|
+
})(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"])));
|
|
1201
1211
|
var BadgeIndicator = styled.span.withConfig({
|
|
1202
1212
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1203
1213
|
return !prop.startsWith('$');
|
|
1204
1214
|
},
|
|
1205
1215
|
displayName: "Badge__BadgeIndicator",
|
|
1206
1216
|
componentId: "sc-tjz4pp-1"
|
|
1207
|
-
})(templateObject_3$
|
|
1217
|
+
})(templateObject_3$q || (templateObject_3$q = __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) {
|
|
1208
1218
|
return props.$isVisible ? 'flex' : 'none';
|
|
1209
1219
|
}, function (props) {
|
|
1210
1220
|
return props.$isDot ? '8px' : '16px';
|
|
@@ -1229,7 +1239,7 @@ var BadgeIndicator = styled.span.withConfig({
|
|
|
1229
1239
|
var ScreenReaderOnly$1 = styled.span.withConfig({
|
|
1230
1240
|
displayName: "Badge__ScreenReaderOnly",
|
|
1231
1241
|
componentId: "sc-tjz4pp-2"
|
|
1232
|
-
})(templateObject_4$
|
|
1242
|
+
})(templateObject_4$l || (templateObject_4$l = __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"])));
|
|
1233
1243
|
var Badge = function Badge(_a) {
|
|
1234
1244
|
var children = _a.children,
|
|
1235
1245
|
_b = _a.count,
|
|
@@ -1265,7 +1275,7 @@ var Badge = function Badge(_a) {
|
|
|
1265
1275
|
})]
|
|
1266
1276
|
});
|
|
1267
1277
|
};
|
|
1268
|
-
var templateObject_1$
|
|
1278
|
+
var templateObject_1$H, templateObject_2$t, templateObject_3$q, templateObject_4$l;
|
|
1269
1279
|
|
|
1270
1280
|
var StyledBox = styled.div.withConfig({
|
|
1271
1281
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1276,37 +1286,37 @@ var StyledBox = styled.div.withConfig({
|
|
|
1276
1286
|
})(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"
|
|
1277
1287
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
1278
1288
|
])), function (props) {
|
|
1279
|
-
return props.$display && styled.css(templateObject_1$
|
|
1289
|
+
return props.$display && styled.css(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
1280
1290
|
}, function (props) {
|
|
1281
|
-
return props.$flexDirection && styled.css(templateObject_2$
|
|
1291
|
+
return props.$flexDirection && styled.css(templateObject_2$s || (templateObject_2$s = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
1282
1292
|
}, function (props) {
|
|
1283
|
-
return props.$justifyContent && styled.css(templateObject_3$
|
|
1293
|
+
return props.$justifyContent && styled.css(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
1284
1294
|
}, function (props) {
|
|
1285
|
-
return props.$alignItems && styled.css(templateObject_4$
|
|
1295
|
+
return props.$alignItems && styled.css(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
1286
1296
|
}, function (props) {
|
|
1287
|
-
return props.$flexWrap && styled.css(templateObject_5$
|
|
1297
|
+
return props.$flexWrap && styled.css(templateObject_5$f || (templateObject_5$f = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
1288
1298
|
}, function (props) {
|
|
1289
|
-
return props.$gap && styled.css(templateObject_6$
|
|
1299
|
+
return props.$gap && styled.css(templateObject_6$d || (templateObject_6$d = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), tokensData.semantic.spacing.layout[props.$gap]);
|
|
1290
1300
|
}, function (props) {
|
|
1291
|
-
return props.$m && styled.css(templateObject_7$
|
|
1301
|
+
return props.$m && styled.css(templateObject_7$a || (templateObject_7$a = __makeTemplateObject(["margin: ", ";"], ["margin: ", ";"])), tokensData.semantic.spacing.layout[props.$m]);
|
|
1292
1302
|
}, function (props) {
|
|
1293
|
-
return props.$mt && styled.css(templateObject_8$
|
|
1303
|
+
return props.$mt && styled.css(templateObject_8$6 || (templateObject_8$6 = __makeTemplateObject(["margin-top: ", ";"], ["margin-top: ", ";"])), tokensData.semantic.spacing.layout[props.$mt]);
|
|
1294
1304
|
}, function (props) {
|
|
1295
|
-
return props.$mr && styled.css(templateObject_9$
|
|
1305
|
+
return props.$mr && styled.css(templateObject_9$4 || (templateObject_9$4 = __makeTemplateObject(["margin-right: ", ";"], ["margin-right: ", ";"])), tokensData.semantic.spacing.layout[props.$mr]);
|
|
1296
1306
|
}, function (props) {
|
|
1297
|
-
return props.$mb && styled.css(templateObject_10$
|
|
1307
|
+
return props.$mb && styled.css(templateObject_10$3 || (templateObject_10$3 = __makeTemplateObject(["margin-bottom: ", ";"], ["margin-bottom: ", ";"])), tokensData.semantic.spacing.layout[props.$mb]);
|
|
1298
1308
|
}, function (props) {
|
|
1299
|
-
return props.$ml && styled.css(templateObject_11$
|
|
1309
|
+
return props.$ml && styled.css(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["margin-left: ", ";"], ["margin-left: ", ";"])), tokensData.semantic.spacing.layout[props.$ml]);
|
|
1300
1310
|
}, function (props) {
|
|
1301
|
-
return props.$mx && styled.css(templateObject_12$
|
|
1311
|
+
return props.$mx && styled.css(templateObject_12$3 || (templateObject_12$3 = __makeTemplateObject(["\n margin-left: ", ";\n margin-right: ", ";\n "], ["\n margin-left: ", ";\n margin-right: ", ";\n "])), tokensData.semantic.spacing.layout[props.$mx], tokensData.semantic.spacing.layout[props.$mx]);
|
|
1302
1312
|
}, function (props) {
|
|
1303
|
-
return props.$my && styled.css(templateObject_13$
|
|
1313
|
+
return props.$my && styled.css(templateObject_13$3 || (templateObject_13$3 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n "])), tokensData.semantic.spacing.layout[props.$my], tokensData.semantic.spacing.layout[props.$my]);
|
|
1304
1314
|
}, function (props) {
|
|
1305
|
-
return props.$p && styled.css(templateObject_14$
|
|
1315
|
+
return props.$p && styled.css(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject(["padding: ", ";"], ["padding: ", ";"])), tokensData.semantic.spacing.layout[props.$p]);
|
|
1306
1316
|
}, function (props) {
|
|
1307
|
-
return props.$pt && styled.css(templateObject_15$
|
|
1317
|
+
return props.$pt && styled.css(templateObject_15$2 || (templateObject_15$2 = __makeTemplateObject(["padding-top: ", ";"], ["padding-top: ", ";"])), tokensData.semantic.spacing.layout[props.$pt]);
|
|
1308
1318
|
}, function (props) {
|
|
1309
|
-
return props.$pr && styled.css(templateObject_16$
|
|
1319
|
+
return props.$pr && styled.css(templateObject_16$2 || (templateObject_16$2 = __makeTemplateObject(["padding-right: ", ";"], ["padding-right: ", ";"])), tokensData.semantic.spacing.layout[props.$pr]);
|
|
1310
1320
|
}, function (props) {
|
|
1311
1321
|
return props.$pb && styled.css(templateObject_17$1 || (templateObject_17$1 = __makeTemplateObject(["padding-bottom: ", ";"], ["padding-bottom: ", ";"])), tokensData.semantic.spacing.layout[props.$pb]);
|
|
1312
1322
|
}, function (props) {
|
|
@@ -1500,7 +1510,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
1500
1510
|
}));
|
|
1501
1511
|
};
|
|
1502
1512
|
var Box = BoxTransform;
|
|
1503
|
-
var templateObject_1$
|
|
1513
|
+
var templateObject_1$G, templateObject_2$s, templateObject_3$p, templateObject_4$k, templateObject_5$f, templateObject_6$d, templateObject_7$a, templateObject_8$6, templateObject_9$4, templateObject_10$3, templateObject_11$3, templateObject_12$3, templateObject_13$3, templateObject_14$2, templateObject_15$2, templateObject_16$2, 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;
|
|
1504
1514
|
|
|
1505
1515
|
var add = {
|
|
1506
1516
|
path: "M13 11H19V13H13V19H11V13H5V11H11V5H13V11Z",
|
|
@@ -1570,6 +1580,10 @@ var directionRight = {
|
|
|
1570
1580
|
path: "M20 12L20.7071 11.2929L21.4142 12L20.7071 12.7071L20 12ZM5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11V13ZM14 6L14.7071 5.29289L20.7071 11.2929L20 12L19.2929 12.7071L13.2929 6.70711L14 6ZM20 12L20.7071 12.7071L14.7071 18.7071L14 18L13.2929 17.2929L19.2929 11.2929L20 12ZM20 12V13H5V12V11H20V12Z",
|
|
1571
1581
|
name: "directionRight"
|
|
1572
1582
|
};
|
|
1583
|
+
var directionUp = {
|
|
1584
|
+
path: "M6.70703 10.707L11 6.41406L11 19C11 19.5523 11.4477 20 12 20C12.5523 20 13 19.5523 13 19L13 6.41406L17.293 10.707L18.707 9.29297L12 2.58594L5.29297 9.29297L6.70703 10.707Z",
|
|
1585
|
+
name: "directionUp"
|
|
1586
|
+
};
|
|
1573
1587
|
var edit = {
|
|
1574
1588
|
path: "M17.5859 9C17.5859 8.6893 17.3985 8.42381 17.0234 8.0293L16.5859 7.58594L16.414 7.41406C15.7475 6.7475 15.4141 6.41406 15 6.41406C14.5858 6.41406 14.2525 6.7475 13.5859 7.41406L6.39156 14.6084L6.16402 14.8418C6.10705 14.9052 6.06663 14.9595 6.03316 15.0186C5.9662 15.1368 5.93192 15.2702 5.86519 15.5371L5.20211 18.1914L5.14449 18.4297C5.09834 18.6377 5.09184 18.7579 5.16695 18.833C5.24206 18.9081 5.36228 18.9016 5.57027 18.8555L5.80855 18.7979L8.46285 18.1348C8.72977 18.068 8.86314 18.0338 8.9814 17.9668C9.04047 17.9333 9.09478 17.8929 9.15816 17.8359L9.39156 17.6084L16.5859 10.4141C17.2106 9.78933 17.5428 9.45735 17.582 9.07715L17.5859 9ZM19.5859 9C19.5859 9.82006 19.2281 10.4288 18.9257 10.8252C18.6586 11.1753 18.2933 11.5348 18 11.8281L10.8056 19.0225C10.686 19.1421 10.3758 19.4764 9.96675 19.708C9.55767 19.9396 9.11125 20.0332 8.94722 20.0742L6.38277 20.7158L6.38082 20.7168L6.2939 20.7383C6.17868 20.7671 5.87067 20.8489 5.58492 20.877C5.2743 20.9073 4.44039 20.9346 3.75289 20.2471C3.06538 19.5596 3.09262 18.7257 3.123 18.415C3.15102 18.1293 3.23287 17.8213 3.26168 17.7061L3.92574 15.0527L4.03707 14.6348C4.09472 14.4516 4.17615 14.2378 4.29195 14.0332L4.38375 13.8848C4.6044 13.5498 4.87279 13.299 4.9775 13.1943L12.1718 6C12.4652 5.70667 12.8246 5.34136 13.1748 5.07422C13.5711 4.77185 14.1799 4.41406 15 4.41406L15.1513 4.41797C15.8954 4.45836 16.4536 4.79076 16.8252 5.07422C17.1753 5.34136 17.5348 5.70667 17.8281 6L18 6.17188L18.4726 6.65137C18.6341 6.82169 18.7921 6.99964 18.9257 7.1748C19.2281 7.57116 19.5859 8.17994 19.5859 9Z M12.5 7.5L15.5 5.5L18.5 8.5L16.5 11.5L12.5 7.5Z",
|
|
1575
1589
|
name: "edit"
|
|
@@ -1618,6 +1632,10 @@ var message = {
|
|
|
1618
1632
|
path: "M16 5.00001C16.9145 5.00001 17.7014 4.99777 18.3281 5.08204C18.9835 5.17019 19.6115 5.36934 20.1211 5.87891C20.6307 6.38849 20.8298 7.01648 20.918 7.67188C21.0022 8.29863 21 9.08547 21 10V14C21 14.9145 21.0022 15.7014 20.918 16.3281C20.8298 16.9835 20.6307 17.6115 20.1211 18.1211C19.6115 18.6307 18.9835 18.8298 18.3281 18.918C17.7014 19.0022 16.9145 19 16 19H8.00001C7.08547 19 6.29863 19.0022 5.67188 18.918C5.01648 18.8298 4.38849 18.6307 3.87891 18.1211C3.36934 17.6115 3.17019 16.9835 3.08204 16.3281C2.99777 15.7014 3.00001 14.9145 3.00001 14V10C3.00001 9.08547 2.99777 8.29863 3.08204 7.67188C3.17019 7.01648 3.36933 6.38849 3.87891 5.87891C4.38849 5.36933 5.01648 5.17019 5.67188 5.08204C6.29863 4.99777 7.08547 5.00001 8.00001 5.00001H16ZM13.3418 13.4473C12.4972 13.8696 11.5028 13.8696 10.6582 13.4473L5.00001 10.6182V14C5.00001 14.9711 5.00228 15.599 5.06446 16.0615C5.12277 16.4951 5.21687 16.6309 5.29297 16.707C5.36908 16.7831 5.50495 16.8772 5.93848 16.9356C6.40099 16.9977 7.02893 17 8.00001 17H16C16.9711 17 17.599 16.9977 18.0615 16.9356C18.4951 16.8772 18.6309 16.7831 18.707 16.707C18.7831 16.6309 18.8772 16.4951 18.9356 16.0615C18.9977 15.599 19 14.9711 19 14V10.6182L13.3418 13.4473ZM8.00001 7.00001C7.02893 7.00001 6.40099 7.00228 5.93848 7.06446C5.50494 7.12278 5.36908 7.21687 5.29297 7.29297C5.21686 7.36908 5.12278 7.50494 5.06446 7.93848C5.04619 8.07437 5.03381 8.2246 5.02442 8.39356L11.5527 11.6582C11.8343 11.799 12.1657 11.799 12.4473 11.6582L18.9746 8.39356C18.9652 8.22462 18.9538 8.07436 18.9356 7.93848C18.8772 7.50495 18.7831 7.36908 18.707 7.29297C18.6309 7.21687 18.4951 7.12277 18.0615 7.06446C17.599 7.00228 16.9711 7.00001 16 7.00001H8.00001Z",
|
|
1619
1633
|
name: "message"
|
|
1620
1634
|
};
|
|
1635
|
+
var mic = {
|
|
1636
|
+
path: "M12 2C14.2091 2 16 3.79086 16 6V11C16 13.2091 14.2091 15 12 15C9.79086 15 8 13.2091 8 11V6C8 3.79086 9.79086 2 12 2ZM12 4C10.8954 4 10 4.89543 10 6V11C10 12.1046 10.8954 13 12 13C13.1046 13 14 12.1046 14 11V6C14 4.89543 13.1046 4 12 4Z M19 10C19.5523 10 20 10.4477 20 11C20 13.1217 19.1575 15.1569 17.6572 16.6572C16.3938 17.9207 14.7505 18.7145 12.9961 18.9346C12.9975 18.9562 13 18.978 13 19V21C13 21.5523 12.5523 22 12 22C11.4477 22 11 21.5523 11 21V19C11 18.978 11.0015 18.9562 11.0029 18.9346C9.24888 18.7143 7.60602 17.9205 6.34277 16.6572C4.84248 15.1569 4 13.1217 4 11C4 10.4477 4.44772 10 5 10C5.55228 10 6 10.4477 6 11C6 12.5913 6.63259 14.117 7.75781 15.2422C8.88303 16.3674 10.4087 17 12 17C13.5913 17 15.117 16.3674 16.2422 15.2422C17.3674 14.117 18 12.5913 18 11C18 10.4477 18.4477 10 19 10Z",
|
|
1637
|
+
name: "mic"
|
|
1638
|
+
};
|
|
1621
1639
|
var copy = {
|
|
1622
1640
|
path: "M16 9.00001C16.9145 9.00001 17.7014 8.99777 18.3281 9.08204C18.9835 9.17019 19.6115 9.36934 20.1211 9.87891C20.6307 10.3885 20.8298 11.0165 20.918 11.6719C21.0022 12.2986 21 13.0855 21 14V16C21 16.9145 21.0022 17.7014 20.918 18.3281C20.8298 18.9835 20.6307 19.6115 20.1211 20.1211C19.6115 20.6307 18.9835 20.8298 18.3281 20.918C17.7014 21.0022 16.9145 21 16 21H14C13.0855 21 12.2986 21.0022 11.6719 20.918C11.0165 20.8298 10.3885 20.6307 9.87891 20.1211C9.36934 19.6115 9.17019 18.9835 9.08204 18.3281C8.99777 17.7014 9.00001 16.9145 9.00001 16V14C9.00001 13.0855 8.99777 12.2986 9.08204 11.6719C9.17019 11.0165 9.36933 10.3885 9.87891 9.87891C10.3885 9.36933 11.0165 9.17019 11.6719 9.08204C12.2986 8.99777 13.0855 9.00001 14 9.00001H16ZM14 11C13.0289 11 12.401 11.0023 11.9385 11.0645C11.5049 11.1228 11.3691 11.2169 11.293 11.293C11.2169 11.3691 11.1228 11.5049 11.0645 11.9385C11.0023 12.401 11 13.0289 11 14V16C11 16.9711 11.0023 17.599 11.0645 18.0615C11.1228 18.4951 11.2169 18.6309 11.293 18.707C11.3691 18.7831 11.5049 18.8772 11.9385 18.9356C12.401 18.9977 13.0289 19 14 19H16C16.9711 19 17.599 18.9977 18.0615 18.9356C18.4951 18.8772 18.6309 18.7831 18.707 18.707C18.7831 18.6309 18.8772 18.4951 18.9356 18.0615C18.9977 17.599 19 16.9711 19 16V14C19 13.0289 18.9977 12.401 18.9356 11.9385C18.8772 11.5049 18.7831 11.3691 18.707 11.293C18.6309 11.2169 18.4951 11.1228 18.0615 11.0645C17.599 11.0023 16.9711 11 16 11H14Z M11 3.00001C11.4521 3.00001 11.8413 2.99962 12.1621 3.02149C12.4919 3.04399 12.8225 3.09352 13.1484 3.22852C13.8832 3.53299 14.467 4.1168 14.7715 4.85157C14.9065 5.17749 14.956 5.50807 14.9785 5.8379C15.0004 6.15869 15 6.54787 15 7.00001H13C13 6.52039 12.9996 6.21062 12.9834 5.97364C12.9678 5.74574 12.9411 5.6588 12.9238 5.61719C12.8223 5.37227 12.6277 5.17767 12.3828 5.07618C12.3412 5.05894 12.2543 5.03216 12.0264 5.01661C11.7894 5.00044 11.4796 5.00001 11 5.00001H8.00001C7.02893 5.00001 6.40099 5.00228 5.93848 5.06446C5.50494 5.12278 5.36908 5.21687 5.29297 5.29297C5.21686 5.36908 5.12278 5.50494 5.06446 5.93848C5.00228 6.40099 5.00001 7.02893 5.00001 8.00001V11C5.00001 11.4796 5.00044 11.7894 5.01661 12.0264C5.03216 12.2543 5.05894 12.3412 5.07618 12.3828C5.17767 12.6277 5.37227 12.8223 5.61719 12.9238C5.6588 12.9411 5.74574 12.9678 5.97364 12.9834C6.21062 12.9996 6.52039 13 7.00001 13V15C6.54787 15 6.15869 15.0004 5.8379 14.9785C5.50807 14.956 5.17749 14.9065 4.85157 14.7715C4.1168 14.467 3.53299 13.8832 3.22852 13.1484C3.09352 12.8225 3.04399 12.4919 3.02149 12.1621C2.99962 11.8413 3.00001 11.4521 3.00001 11V8.00001C3.00001 7.08547 2.99777 6.29863 3.08204 5.67188C3.17019 5.01648 3.36933 4.38849 3.87891 3.87891C4.38849 3.36933 5.01648 3.17019 5.67188 3.08204C6.29863 2.99777 7.08547 3.00001 8.00001 3.00001H11Z",
|
|
1623
1641
|
name: "copy"
|
|
@@ -1688,6 +1706,7 @@ var iconsData = {
|
|
|
1688
1706
|
close: close,
|
|
1689
1707
|
crossCircle: crossCircle,
|
|
1690
1708
|
directionRight: directionRight,
|
|
1709
|
+
directionUp: directionUp,
|
|
1691
1710
|
edit: edit,
|
|
1692
1711
|
"export": {
|
|
1693
1712
|
path: "M7.70703 10.707L11 7.41406L11 14C11 14.5523 11.4477 15 12 15C12.5523 15 13 14.5523 13 14V7.41406L16.293 10.707L17.707 9.29297L12 3.58594L6.29297 9.29297L7.70703 10.707Z M4 17V16H6V17C6 17.5523 6.44772 18 7 18H17C17.5523 18 18 17.5523 18 17V16H20V17C20 18.6051 18.7394 19.9158 17.1543 19.9961L17 20H7C5.34315 20 4 18.6569 4 17Z",
|
|
@@ -1704,6 +1723,7 @@ var iconsData = {
|
|
|
1704
1723
|
playBack: playBack,
|
|
1705
1724
|
lineOut: lineOut,
|
|
1706
1725
|
message: message,
|
|
1726
|
+
mic: mic,
|
|
1707
1727
|
copy: copy,
|
|
1708
1728
|
link: link,
|
|
1709
1729
|
order: order,
|
|
@@ -1725,7 +1745,7 @@ var IconStyled = styled.span.withConfig({
|
|
|
1725
1745
|
},
|
|
1726
1746
|
displayName: "Icon__IconStyled",
|
|
1727
1747
|
componentId: "sc-1105czq-0"
|
|
1728
|
-
})(templateObject_1$
|
|
1748
|
+
})(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"])), function (_a) {
|
|
1729
1749
|
var $size = _a.$size;
|
|
1730
1750
|
return tokensData.semantic.size.icon[$size];
|
|
1731
1751
|
}, function (_a) {
|
|
@@ -1791,55 +1811,55 @@ var Icon = function Icon(_a) {
|
|
|
1791
1811
|
})
|
|
1792
1812
|
});
|
|
1793
1813
|
};
|
|
1794
|
-
var templateObject_1$
|
|
1814
|
+
var templateObject_1$F;
|
|
1795
1815
|
|
|
1796
|
-
var button = tokensData.component.button,
|
|
1797
|
-
semantic$
|
|
1816
|
+
var button$1 = tokensData.component.button,
|
|
1817
|
+
semantic$g = tokensData.semantic;
|
|
1798
1818
|
// Base styles shared between button and link
|
|
1799
|
-
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$
|
|
1819
|
+
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$g.motion.hover, ";\n white-space: nowrap;\n user-select: none;\n \n &:focus {\n outline: ").concat(button$1.focus.outline, ";\n outline-offset: ").concat(button$1.focus.outlineOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n");
|
|
1800
1820
|
// Dynamic variant styles using component tokens
|
|
1801
1821
|
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
1802
1822
|
var $variant = _a.$variant;
|
|
1803
1823
|
var variantConfig = {
|
|
1804
1824
|
primary: {
|
|
1805
|
-
bg: button.primary.backgroundColor,
|
|
1806
|
-
text: button.primary.textColor,
|
|
1807
|
-
hoverBg: button.hover.backgroundColor,
|
|
1808
|
-
activeBg: button.active.backgroundColor,
|
|
1809
|
-
disabledBg: button.disabled.backgroundColor,
|
|
1810
|
-
disabledText: button.disabled.textColor
|
|
1825
|
+
bg: button$1.primary.backgroundColor,
|
|
1826
|
+
text: button$1.primary.textColor,
|
|
1827
|
+
hoverBg: button$1.hover.backgroundColor,
|
|
1828
|
+
activeBg: button$1.active.backgroundColor,
|
|
1829
|
+
disabledBg: button$1.disabled.backgroundColor,
|
|
1830
|
+
disabledText: button$1.disabled.textColor
|
|
1811
1831
|
},
|
|
1812
1832
|
secondary: {
|
|
1813
|
-
bg: button.variants.secondary.backgroundColor,
|
|
1814
|
-
text: button.variants.secondary.textColor,
|
|
1815
|
-
hoverBg: button.variants.secondary.hover.backgroundColor,
|
|
1816
|
-
activeBg: button.variants.secondary.active.backgroundColor,
|
|
1817
|
-
disabledBg: button.variants.secondary.disabled.backgroundColor,
|
|
1818
|
-
disabledText: button.variants.secondary.disabled.textColor
|
|
1833
|
+
bg: button$1.variants.secondary.backgroundColor,
|
|
1834
|
+
text: button$1.variants.secondary.textColor,
|
|
1835
|
+
hoverBg: button$1.variants.secondary.hover.backgroundColor,
|
|
1836
|
+
activeBg: button$1.variants.secondary.active.backgroundColor,
|
|
1837
|
+
disabledBg: button$1.variants.secondary.disabled.backgroundColor,
|
|
1838
|
+
disabledText: button$1.variants.secondary.disabled.textColor
|
|
1819
1839
|
},
|
|
1820
1840
|
naked: {
|
|
1821
|
-
bg: button.variants.naked.backgroundColor,
|
|
1822
|
-
text: button.variants.naked.textColor,
|
|
1823
|
-
hoverBg: button.variants.naked.hover.backgroundColor,
|
|
1824
|
-
activeBg: button.variants.naked.active.backgroundColor,
|
|
1825
|
-
disabledBg: button.variants.naked.disabled.backgroundColor,
|
|
1826
|
-
disabledText: button.variants.naked.disabled.textColor
|
|
1841
|
+
bg: button$1.variants.naked.backgroundColor,
|
|
1842
|
+
text: button$1.variants.naked.textColor,
|
|
1843
|
+
hoverBg: button$1.variants.naked.hover.backgroundColor,
|
|
1844
|
+
activeBg: button$1.variants.naked.active.backgroundColor,
|
|
1845
|
+
disabledBg: button$1.variants.naked.disabled.backgroundColor,
|
|
1846
|
+
disabledText: button$1.variants.naked.disabled.textColor
|
|
1827
1847
|
},
|
|
1828
1848
|
emphasis: {
|
|
1829
|
-
bg: button.variants.emphasis.backgroundColor,
|
|
1830
|
-
text: button.variants.emphasis.textColor,
|
|
1831
|
-
hoverBg: button.variants.emphasis.hover.backgroundColor,
|
|
1832
|
-
activeBg: button.variants.emphasis.active.backgroundColor,
|
|
1833
|
-
disabledBg: button.variants.emphasis.disabled.backgroundColor,
|
|
1834
|
-
disabledText: button.variants.emphasis.disabled.textColor
|
|
1849
|
+
bg: button$1.variants.emphasis.backgroundColor,
|
|
1850
|
+
text: button$1.variants.emphasis.textColor,
|
|
1851
|
+
hoverBg: button$1.variants.emphasis.hover.backgroundColor,
|
|
1852
|
+
activeBg: button$1.variants.emphasis.active.backgroundColor,
|
|
1853
|
+
disabledBg: button$1.variants.emphasis.disabled.backgroundColor,
|
|
1854
|
+
disabledText: button$1.variants.emphasis.disabled.textColor
|
|
1835
1855
|
},
|
|
1836
1856
|
danger: {
|
|
1837
|
-
bg: button.variants.danger.backgroundColor,
|
|
1838
|
-
text: button.variants.danger.textColor,
|
|
1839
|
-
hoverBg: button.variants.danger.hover.backgroundColor,
|
|
1840
|
-
activeBg: button.variants.danger.active.backgroundColor,
|
|
1841
|
-
disabledBg: button.variants.danger.disabled.backgroundColor,
|
|
1842
|
-
disabledText: button.variants.danger.disabled.textColor
|
|
1857
|
+
bg: button$1.variants.danger.backgroundColor,
|
|
1858
|
+
text: button$1.variants.danger.textColor,
|
|
1859
|
+
hoverBg: button$1.variants.danger.hover.backgroundColor,
|
|
1860
|
+
activeBg: button$1.variants.danger.active.backgroundColor,
|
|
1861
|
+
disabledBg: button$1.variants.danger.disabled.backgroundColor,
|
|
1862
|
+
disabledText: button$1.variants.danger.disabled.textColor
|
|
1843
1863
|
}
|
|
1844
1864
|
};
|
|
1845
1865
|
var config = variantConfig[$variant];
|
|
@@ -1850,13 +1870,13 @@ var getSizeStyles$1 = function getSizeStyles(_a) {
|
|
|
1850
1870
|
var $size = _a.$size;
|
|
1851
1871
|
switch ($size) {
|
|
1852
1872
|
case 'small':
|
|
1853
|
-
return "\n font: ".concat(button.sizes.small.font, ";\n padding: ").concat(button.sizes.small.padding, ";\n ");
|
|
1873
|
+
return "\n font: ".concat(button$1.sizes.small.font, ";\n padding: ").concat(button$1.sizes.small.padding, ";\n ");
|
|
1854
1874
|
case 'medium':
|
|
1855
|
-
return "\n font: ".concat(button.sizes.medium.font, ";\n padding: ").concat(button.sizes.medium.padding, ";\n ");
|
|
1875
|
+
return "\n font: ".concat(button$1.sizes.medium.font, ";\n padding: ").concat(button$1.sizes.medium.padding, ";\n ");
|
|
1856
1876
|
case 'large':
|
|
1857
|
-
return "\n font: ".concat(button.sizes.large.font, ";\n padding: ").concat(button.sizes.large.padding, ";\n ");
|
|
1877
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(button$1.sizes.large.padding, ";\n ");
|
|
1858
1878
|
default:
|
|
1859
|
-
return "\n font: ".concat(button.sizes.large.font, ";\n padding: ").concat(button.sizes.large.padding, ";\n ");
|
|
1879
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(button$1.sizes.large.padding, ";\n ");
|
|
1860
1880
|
}
|
|
1861
1881
|
};
|
|
1862
1882
|
var StyledButton = styled.button.withConfig({
|
|
@@ -1865,16 +1885,16 @@ var StyledButton = styled.button.withConfig({
|
|
|
1865
1885
|
},
|
|
1866
1886
|
displayName: "Button__StyledButton",
|
|
1867
1887
|
componentId: "sc-1eiuum9-0"
|
|
1868
|
-
})(templateObject_1$
|
|
1888
|
+
})(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button$1.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
1869
1889
|
var StyledLink = styled.a.withConfig({
|
|
1870
1890
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1871
1891
|
return !prop.startsWith('$');
|
|
1872
1892
|
},
|
|
1873
1893
|
displayName: "Button__StyledLink",
|
|
1874
1894
|
componentId: "sc-1eiuum9-1"
|
|
1875
|
-
})(templateObject_2$
|
|
1895
|
+
})(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
1876
1896
|
// Helper function to get icon size based on button size
|
|
1877
|
-
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
1897
|
+
])), baseButtonStyles, button$1.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
1878
1898
|
// Helper function to get icon size based on button size
|
|
1879
1899
|
var getIconSize = function getIconSize(buttonSize) {
|
|
1880
1900
|
switch (buttonSize) {
|
|
@@ -1973,14 +1993,14 @@ var Button = function Button(_a) {
|
|
|
1973
1993
|
children: renderButtonContent(children, iconName, size)
|
|
1974
1994
|
}));
|
|
1975
1995
|
};
|
|
1976
|
-
var templateObject_1$
|
|
1996
|
+
var templateObject_1$E, templateObject_2$r;
|
|
1977
1997
|
|
|
1978
|
-
var semantic$
|
|
1979
|
-
base$
|
|
1980
|
-
var color$7 = semantic$
|
|
1981
|
-
typography$4 = semantic$
|
|
1982
|
-
border$8 = semantic$
|
|
1983
|
-
spacing$7 = semantic$
|
|
1998
|
+
var semantic$f = tokensData.semantic,
|
|
1999
|
+
base$b = tokensData.base;
|
|
2000
|
+
var color$7 = semantic$f.color,
|
|
2001
|
+
typography$4 = semantic$f.typography,
|
|
2002
|
+
border$8 = semantic$f.border,
|
|
2003
|
+
spacing$7 = semantic$f.spacing;
|
|
1984
2004
|
var category = color$7.category;
|
|
1985
2005
|
var radius$4 = border$8.radius;
|
|
1986
2006
|
var layout$3 = spacing$7.layout;
|
|
@@ -1990,7 +2010,7 @@ var StyledCategoryBadge = styled.span.withConfig({
|
|
|
1990
2010
|
},
|
|
1991
2011
|
displayName: "CategoryBadge__StyledCategoryBadge",
|
|
1992
2012
|
componentId: "sc-17aslpn-0"
|
|
1993
|
-
})(templateObject_1$
|
|
2013
|
+
})(templateObject_1$D || (templateObject_1$D = __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"
|
|
1994
2014
|
/**
|
|
1995
2015
|
* CategoryBadge component for displaying transaction categories
|
|
1996
2016
|
*
|
|
@@ -2008,7 +2028,7 @@ var StyledCategoryBadge = styled.span.withConfig({
|
|
|
2008
2028
|
* Travel
|
|
2009
2029
|
* </CategoryBadge>
|
|
2010
2030
|
* ```
|
|
2011
|
-
*/])), radius$4.circle, base$
|
|
2031
|
+
*/])), radius$4.circle, base$b.fontWeight[3], base$b.border.width[1], function (_a) {
|
|
2012
2032
|
var $size = _a.$size;
|
|
2013
2033
|
return $size === 'small' ? '24px' : '32px';
|
|
2014
2034
|
}, function (_a) {
|
|
@@ -2088,7 +2108,7 @@ var CategoryBadge = function CategoryBadge(_a) {
|
|
|
2088
2108
|
});
|
|
2089
2109
|
};
|
|
2090
2110
|
CategoryBadge.displayName = 'CategoryBadge';
|
|
2091
|
-
var templateObject_1$
|
|
2111
|
+
var templateObject_1$D;
|
|
2092
2112
|
|
|
2093
2113
|
var chip = tokensData.component.chip;
|
|
2094
2114
|
// Helper function to get variant styles matching Button's approach
|
|
@@ -2132,7 +2152,7 @@ var StyledChip = styled.span.withConfig({
|
|
|
2132
2152
|
},
|
|
2133
2153
|
displayName: "ChipBase__StyledChip",
|
|
2134
2154
|
componentId: "sc-moa6zc-0"
|
|
2135
|
-
})(templateObject_1$
|
|
2155
|
+
})(templateObject_1$C || (templateObject_1$C = __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"
|
|
2136
2156
|
// Icon container for selected indicator or leading icons
|
|
2137
2157
|
])), chip["default"].borderRadius, tokensData.semantic.motion.hover, function (props) {
|
|
2138
2158
|
return props.$disabled ? 'not-allowed' : props.$clickable ? 'pointer' : 'default';
|
|
@@ -2141,7 +2161,7 @@ var StyledChip = styled.span.withConfig({
|
|
|
2141
2161
|
var IconContainer = styled.span.withConfig({
|
|
2142
2162
|
displayName: "ChipBase__IconContainer",
|
|
2143
2163
|
componentId: "sc-moa6zc-1"
|
|
2144
|
-
})(templateObject_2$
|
|
2164
|
+
})(templateObject_2$q || (templateObject_2$q = __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"
|
|
2145
2165
|
// Close button for dismissible chips
|
|
2146
2166
|
])), tokensData.semantic.spacing.layout.xs);
|
|
2147
2167
|
// Close button for dismissible chips
|
|
@@ -2151,10 +2171,10 @@ var CloseButton = styled.button.withConfig({
|
|
|
2151
2171
|
},
|
|
2152
2172
|
displayName: "ChipBase__CloseButton",
|
|
2153
2173
|
componentId: "sc-moa6zc-2"
|
|
2154
|
-
})(templateObject_3$
|
|
2174
|
+
})(templateObject_3$o || (templateObject_3$o = __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) {
|
|
2155
2175
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
2156
2176
|
}, tokensData.semantic.motion.hover, tokensData.semantic.color.text.disabled, chip.focus.outline, chip.focus.outlineOffset, chip["default"].borderRadius);
|
|
2157
|
-
var templateObject_1$
|
|
2177
|
+
var templateObject_1$C, templateObject_2$q, templateObject_3$o;
|
|
2158
2178
|
|
|
2159
2179
|
/**
|
|
2160
2180
|
* Chip - Compact element for displaying tags, categories, and labels
|
|
@@ -2404,33 +2424,33 @@ var spacing$6 = tokensData.semantic.spacing;
|
|
|
2404
2424
|
var StyledContainer$2 = styled.div.withConfig({
|
|
2405
2425
|
displayName: "Container__StyledContainer",
|
|
2406
2426
|
componentId: "sc-17dbj6n-0"
|
|
2407
|
-
})(templateObject_1$
|
|
2408
|
-
var Container = function Container(_a) {
|
|
2427
|
+
})(templateObject_1$B || (templateObject_1$B = __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']);
|
|
2428
|
+
var Container$1 = function Container(_a) {
|
|
2409
2429
|
var children = _a.children,
|
|
2410
2430
|
props = __rest(_a, ["children"]);
|
|
2411
2431
|
return jsxRuntime.jsx(StyledContainer$2, __assign({}, props, {
|
|
2412
2432
|
children: children
|
|
2413
2433
|
}));
|
|
2414
2434
|
};
|
|
2415
|
-
var templateObject_1$
|
|
2435
|
+
var templateObject_1$B;
|
|
2416
2436
|
|
|
2417
|
-
var base$
|
|
2437
|
+
var base$a = tokensData.base;
|
|
2418
2438
|
var PictureWrapper = styled.div.withConfig({
|
|
2419
2439
|
displayName: "Picture__PictureWrapper",
|
|
2420
2440
|
componentId: "sc-11d9tei-0"
|
|
2421
|
-
})(templateObject_1$
|
|
2441
|
+
})(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"], ["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"])), media$1.sm);
|
|
2422
2442
|
var ImageLink = styled.a.withConfig({
|
|
2423
2443
|
displayName: "Picture__ImageLink",
|
|
2424
2444
|
componentId: "sc-11d9tei-1"
|
|
2425
|
-
})(templateObject_2$
|
|
2445
|
+
})(templateObject_2$p || (templateObject_2$p = __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$a.duration.normal, base$a.easing.easeInOut);
|
|
2426
2446
|
var ImageButton = styled.button.withConfig({
|
|
2427
2447
|
displayName: "Picture__ImageButton",
|
|
2428
2448
|
componentId: "sc-11d9tei-2"
|
|
2429
|
-
})(templateObject_3$
|
|
2449
|
+
})(templateObject_3$n || (templateObject_3$n = __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$a.duration.normal, base$a.easing.easeInOut);
|
|
2430
2450
|
var StyledImage = styled.img.withConfig({
|
|
2431
2451
|
displayName: "Picture__StyledImage",
|
|
2432
2452
|
componentId: "sc-11d9tei-3"
|
|
2433
|
-
})(templateObject_4$
|
|
2453
|
+
})(templateObject_4$j || (templateObject_4$j = __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$a.border.radius[2]);
|
|
2434
2454
|
var Picture = function Picture(_a) {
|
|
2435
2455
|
var title = _a.title,
|
|
2436
2456
|
src = _a.src,
|
|
@@ -2460,15 +2480,15 @@ var Picture = function Picture(_a) {
|
|
|
2460
2480
|
}) : image
|
|
2461
2481
|
});
|
|
2462
2482
|
};
|
|
2463
|
-
var templateObject_1$
|
|
2483
|
+
var templateObject_1$A, templateObject_2$p, templateObject_3$n, templateObject_4$j;
|
|
2464
2484
|
|
|
2465
|
-
var _a$
|
|
2466
|
-
typography$3 = _a$
|
|
2467
|
-
color$6 = _a$
|
|
2485
|
+
var _a$7 = tokensData.semantic,
|
|
2486
|
+
typography$3 = _a$7.typography,
|
|
2487
|
+
color$6 = _a$7.color;
|
|
2468
2488
|
var TimeStyled = styled.time.withConfig({
|
|
2469
2489
|
displayName: "DateFormatter__TimeStyled",
|
|
2470
2490
|
componentId: "sc-5464cc-0"
|
|
2471
|
-
})(templateObject_1$
|
|
2491
|
+
})(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
2472
2492
|
/**
|
|
2473
2493
|
* Formats a date with smart relative/absolute logic
|
|
2474
2494
|
*/])), typography$3.label, color$6.text.subdued);
|
|
@@ -2517,17 +2537,19 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
2517
2537
|
children: displayText
|
|
2518
2538
|
});
|
|
2519
2539
|
};
|
|
2520
|
-
var templateObject_1$
|
|
2540
|
+
var templateObject_1$z;
|
|
2521
2541
|
|
|
2522
2542
|
var motion$2 = tokensData.semantic.motion,
|
|
2523
|
-
|
|
2543
|
+
_a$6 = tokensData.component,
|
|
2544
|
+
iconButton = _a$6.iconButton,
|
|
2545
|
+
button = _a$6.button;
|
|
2524
2546
|
var IconButtonStyled = styled.button.withConfig({
|
|
2525
2547
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2526
2548
|
return !prop.startsWith('$');
|
|
2527
2549
|
},
|
|
2528
2550
|
displayName: "IconButton__IconButtonStyled",
|
|
2529
2551
|
componentId: "sc-k8b14t-0"
|
|
2530
|
-
})(templateObject_1$
|
|
2552
|
+
})(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"], ["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"])), function (_a) {
|
|
2531
2553
|
var $variant = _a.$variant;
|
|
2532
2554
|
switch ($variant) {
|
|
2533
2555
|
case 'primary':
|
|
@@ -2539,6 +2561,18 @@ var IconButtonStyled = styled.button.withConfig({
|
|
|
2539
2561
|
default:
|
|
2540
2562
|
return iconButton.primary.backgroundColor;
|
|
2541
2563
|
}
|
|
2564
|
+
}, function (_a) {
|
|
2565
|
+
var $variant = _a.$variant;
|
|
2566
|
+
switch ($variant) {
|
|
2567
|
+
case 'primary':
|
|
2568
|
+
return button.primary.textColor;
|
|
2569
|
+
case 'secondary':
|
|
2570
|
+
return button.variants.secondary.textColor;
|
|
2571
|
+
case 'naked':
|
|
2572
|
+
return button.variants.naked.textColor;
|
|
2573
|
+
default:
|
|
2574
|
+
return button.primary.textColor;
|
|
2575
|
+
}
|
|
2542
2576
|
}, iconButton.primary.borderRadius, motion$2.transition.normal, iconButton.primary.display, iconButton.primary.justifyContent, iconButton.primary.alignItems, function (_a) {
|
|
2543
2577
|
var $size = _a.$size;
|
|
2544
2578
|
return iconButton.sizes[$size].minWidth;
|
|
@@ -2560,7 +2594,19 @@ var IconButtonStyled = styled.button.withConfig({
|
|
|
2560
2594
|
default:
|
|
2561
2595
|
return iconButton.hover.backgroundColor;
|
|
2562
2596
|
}
|
|
2563
|
-
}, iconButton.active.backgroundColor, iconButton.focus.outline, iconButton.focus.outlineOffset, iconButton.disabled.backgroundColor)
|
|
2597
|
+
}, iconButton.active.backgroundColor, iconButton.focus.outline, iconButton.focus.outlineOffset, iconButton.disabled.backgroundColor, function (_a) {
|
|
2598
|
+
var $variant = _a.$variant;
|
|
2599
|
+
switch ($variant) {
|
|
2600
|
+
case 'primary':
|
|
2601
|
+
return button.disabled.textColor;
|
|
2602
|
+
case 'secondary':
|
|
2603
|
+
return button.variants.secondary.disabled.textColor;
|
|
2604
|
+
case 'naked':
|
|
2605
|
+
return button.variants.naked.disabled.textColor;
|
|
2606
|
+
default:
|
|
2607
|
+
return button.disabled.textColor;
|
|
2608
|
+
}
|
|
2609
|
+
});
|
|
2564
2610
|
var IconButton = function IconButton(_a) {
|
|
2565
2611
|
var variant = _a.variant,
|
|
2566
2612
|
_b = _a.size,
|
|
@@ -2579,13 +2625,8 @@ var IconButton = function IconButton(_a) {
|
|
|
2579
2625
|
type = _d === void 0 ? 'button' : _d,
|
|
2580
2626
|
htmlProps = __rest(_a, ["variant", "size", "url", "iconName", "onClick", 'aria-label', 'aria-describedby', 'aria-expanded', 'aria-pressed', 'data-testid', "disabled", "type"]);
|
|
2581
2627
|
var handleClick = function handleClick(event) {
|
|
2582
|
-
// Prevent default if disabled
|
|
2583
|
-
if (disabled) {
|
|
2584
|
-
event.preventDefault();
|
|
2585
|
-
return;
|
|
2586
|
-
}
|
|
2587
2628
|
if (onClick) {
|
|
2588
|
-
onClick();
|
|
2629
|
+
onClick(event);
|
|
2589
2630
|
} else if (url && url.trim() !== '') {
|
|
2590
2631
|
// Use proper navigation instead of direct href assignment
|
|
2591
2632
|
if (url.startsWith('http') || url.startsWith('//')) {
|
|
@@ -2595,52 +2636,28 @@ var IconButton = function IconButton(_a) {
|
|
|
2595
2636
|
}
|
|
2596
2637
|
}
|
|
2597
2638
|
};
|
|
2598
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
2599
|
-
// Handle keyboard activation (Enter and Space)
|
|
2600
|
-
if (disabled) return;
|
|
2601
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
2602
|
-
event.preventDefault();
|
|
2603
|
-
handleClick(event);
|
|
2604
|
-
}
|
|
2605
|
-
};
|
|
2606
2639
|
var iconSize = size === 'large' ? 'lg' : size === 'small' ? 'sm' : 'md';
|
|
2607
|
-
var getIconColor = function getIconColor(variant) {
|
|
2608
|
-
switch (variant) {
|
|
2609
|
-
case 'primary':
|
|
2610
|
-
return 'inverse';
|
|
2611
|
-
case 'secondary':
|
|
2612
|
-
return 'default';
|
|
2613
|
-
case 'naked':
|
|
2614
|
-
return 'default';
|
|
2615
|
-
default:
|
|
2616
|
-
return 'default';
|
|
2617
|
-
}
|
|
2618
|
-
};
|
|
2619
2640
|
return jsxRuntime.jsx(IconButtonStyled, __assign({
|
|
2620
2641
|
"$variant": variant,
|
|
2621
2642
|
"$size": size,
|
|
2622
2643
|
onClick: handleClick,
|
|
2623
|
-
onKeyDown: handleKeyDown,
|
|
2624
2644
|
disabled: disabled,
|
|
2625
2645
|
type: type,
|
|
2626
|
-
role: "button",
|
|
2627
2646
|
"aria-label": ariaLabel,
|
|
2628
2647
|
"aria-describedby": ariaDescribedBy,
|
|
2629
2648
|
"aria-expanded": ariaExpanded,
|
|
2630
2649
|
"aria-pressed": ariaPressed,
|
|
2631
|
-
"aria-disabled": disabled,
|
|
2632
|
-
tabIndex: disabled ? -1 : 0,
|
|
2633
2650
|
"data-testid": dataTestId
|
|
2634
2651
|
}, htmlProps, {
|
|
2635
2652
|
children: jsxRuntime.jsx(Icon, {
|
|
2636
2653
|
name: iconName,
|
|
2637
2654
|
size: iconSize,
|
|
2638
|
-
iconColor:
|
|
2655
|
+
iconColor: "inherit",
|
|
2639
2656
|
"aria-hidden": "true" // Hide icon from screen readers since button has aria-label
|
|
2640
2657
|
})
|
|
2641
2658
|
}));
|
|
2642
2659
|
};
|
|
2643
|
-
var templateObject_1$
|
|
2660
|
+
var templateObject_1$y;
|
|
2644
2661
|
|
|
2645
2662
|
var StyledWrapper = styled.span.withConfig({
|
|
2646
2663
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2648,7 +2665,7 @@ var StyledWrapper = styled.span.withConfig({
|
|
|
2648
2665
|
},
|
|
2649
2666
|
displayName: "MoneyDisplay__StyledWrapper",
|
|
2650
2667
|
componentId: "sc-1mddej3-0"
|
|
2651
|
-
})(templateObject_1$
|
|
2668
|
+
})(templateObject_1$x || (templateObject_1$x = __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"
|
|
2652
2669
|
// Map size to Typography variant
|
|
2653
2670
|
])), function (_a) {
|
|
2654
2671
|
var $align = _a.$align;
|
|
@@ -2751,17 +2768,17 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
2751
2768
|
})]
|
|
2752
2769
|
});
|
|
2753
2770
|
};
|
|
2754
|
-
var templateObject_1$
|
|
2771
|
+
var templateObject_1$x;
|
|
2755
2772
|
|
|
2756
2773
|
// Destructure tokens
|
|
2757
|
-
var semantic$
|
|
2758
|
-
var _a$5 = __assign(__assign({}, semantic$
|
|
2774
|
+
var semantic$e = tokensData.semantic;
|
|
2775
|
+
var _a$5 = __assign(__assign({}, semantic$e), {
|
|
2759
2776
|
component: tokensData.component
|
|
2760
2777
|
}),
|
|
2761
2778
|
color$5 = _a$5.color,
|
|
2762
2779
|
border$7 = _a$5.border,
|
|
2763
2780
|
motion$1 = _a$5.motion,
|
|
2764
|
-
component$
|
|
2781
|
+
component$2 = _a$5.component;
|
|
2765
2782
|
var radius$3 = border$7.radius;
|
|
2766
2783
|
var ProgressBarContainer = styled.div.withConfig({
|
|
2767
2784
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2769,10 +2786,10 @@ var ProgressBarContainer = styled.div.withConfig({
|
|
|
2769
2786
|
},
|
|
2770
2787
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
2771
2788
|
componentId: "sc-1nco33q-0"
|
|
2772
|
-
})(templateObject_3$
|
|
2773
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_1$
|
|
2789
|
+
})(templateObject_3$m || (templateObject_3$m = __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) {
|
|
2790
|
+
return props.$variant === 'horizontal' && styled.css(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n width: 100%;\n height: ", ";\n "], ["\n width: 100%;\n height: ", ";\n "])), props.$height ? component$2.progressBar.sizes[props.$height].height : component$2.progressBar.sizes.md.height);
|
|
2774
2791
|
}, function (props) {
|
|
2775
|
-
return props.$variant === 'vertical' && styled.css(templateObject_2$
|
|
2792
|
+
return props.$variant === 'vertical' && styled.css(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n "], ["\n width: ", ";\n height: 100%;\n "])), props.$width ? component$2.progressBar.sizes[props.$width].height : component$2.progressBar.sizes.md.height);
|
|
2776
2793
|
});
|
|
2777
2794
|
var ProgressBarFill = styled.div.withConfig({
|
|
2778
2795
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2780,7 +2797,7 @@ var ProgressBarFill = styled.div.withConfig({
|
|
|
2780
2797
|
},
|
|
2781
2798
|
displayName: "ProgressBar__ProgressBarFill",
|
|
2782
2799
|
componentId: "sc-1nco33q-1"
|
|
2783
|
-
})(templateObject_7$
|
|
2800
|
+
})(templateObject_7$9 || (templateObject_7$9 = __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) {
|
|
2784
2801
|
var backgroundColor;
|
|
2785
2802
|
switch (props.$color) {
|
|
2786
2803
|
case 'success':
|
|
@@ -2794,11 +2811,11 @@ var ProgressBarFill = styled.div.withConfig({
|
|
|
2794
2811
|
backgroundColor = color$5.background.interactive;
|
|
2795
2812
|
break;
|
|
2796
2813
|
}
|
|
2797
|
-
return styled.css(templateObject_4$
|
|
2814
|
+
return styled.css(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
2798
2815
|
}, function (props) {
|
|
2799
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_5$
|
|
2816
|
+
return props.$variant === 'horizontal' && styled.css(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
2800
2817
|
}, function (props) {
|
|
2801
|
-
return props.$variant === 'vertical' && styled.css(templateObject_6$
|
|
2818
|
+
return props.$variant === 'vertical' && styled.css(templateObject_6$c || (templateObject_6$c = __makeTemplateObject(["\n width: 100%;\n height: ", "%;\n "], ["\n width: 100%;\n height: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
2802
2819
|
});
|
|
2803
2820
|
var ProgressBar = function ProgressBar(_a) {
|
|
2804
2821
|
var value = _a.value,
|
|
@@ -2825,7 +2842,7 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
2825
2842
|
})
|
|
2826
2843
|
});
|
|
2827
2844
|
};
|
|
2828
|
-
var templateObject_1$
|
|
2845
|
+
var templateObject_1$w, templateObject_2$o, templateObject_3$m, templateObject_4$i, templateObject_5$e, templateObject_6$c, templateObject_7$9;
|
|
2829
2846
|
|
|
2830
2847
|
// Destructure tokens for cleaner access
|
|
2831
2848
|
var separatorTokens = tokensData.component.separator;
|
|
@@ -2836,7 +2853,7 @@ var StyledDivider = styled.div.withConfig({
|
|
|
2836
2853
|
},
|
|
2837
2854
|
displayName: "Divider__StyledDivider",
|
|
2838
2855
|
componentId: "sc-1l0c8ja-0"
|
|
2839
|
-
})(templateObject_1$
|
|
2856
|
+
})(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"], ["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"
|
|
2840
2857
|
/**
|
|
2841
2858
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
2842
2859
|
*
|
|
@@ -2949,7 +2966,7 @@ var Divider = function Divider(_a) {
|
|
|
2949
2966
|
"aria-orientation": orientation
|
|
2950
2967
|
});
|
|
2951
2968
|
};
|
|
2952
|
-
var templateObject_1$
|
|
2969
|
+
var templateObject_1$v;
|
|
2953
2970
|
|
|
2954
2971
|
var StyledStack = styled.div.withConfig({
|
|
2955
2972
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2957,7 +2974,7 @@ var StyledStack = styled.div.withConfig({
|
|
|
2957
2974
|
},
|
|
2958
2975
|
displayName: "Stack__StyledStack",
|
|
2959
2976
|
componentId: "sc-1ehkxgy-0"
|
|
2960
|
-
})(templateObject_1$
|
|
2977
|
+
})(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"], ["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"
|
|
2961
2978
|
// Helper function to convert gap prop to CSS value
|
|
2962
2979
|
])));
|
|
2963
2980
|
// Helper function to convert gap prop to CSS value
|
|
@@ -2996,7 +3013,7 @@ var Stack = function Stack(_a) {
|
|
|
2996
3013
|
children: children
|
|
2997
3014
|
});
|
|
2998
3015
|
};
|
|
2999
|
-
var templateObject_1$
|
|
3016
|
+
var templateObject_1$u;
|
|
3000
3017
|
|
|
3001
3018
|
// Destructure tokens for cleaner access
|
|
3002
3019
|
var statusColors = tokensData.semantic.color.status;
|
|
@@ -3004,7 +3021,7 @@ var spacing$5 = tokensData.semantic.spacing.layout;
|
|
|
3004
3021
|
var radius$2 = tokensData.semantic.border.radius;
|
|
3005
3022
|
var transition = tokensData.semantic.motion.transition;
|
|
3006
3023
|
var typography$2 = tokensData.semantic.typography;
|
|
3007
|
-
var scaleIn = styled.keyframes(templateObject_1$
|
|
3024
|
+
var scaleIn = styled.keyframes(templateObject_1$t || (templateObject_1$t = __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"])));
|
|
3008
3025
|
var getStatusConfig = function getStatusConfig(status) {
|
|
3009
3026
|
var configs = {
|
|
3010
3027
|
pending: {
|
|
@@ -3071,7 +3088,7 @@ var StyledStatusBadge = styled.span.withConfig({
|
|
|
3071
3088
|
},
|
|
3072
3089
|
displayName: "StatusBadge__StyledStatusBadge",
|
|
3073
3090
|
componentId: "sc-1paksgb-0"
|
|
3074
|
-
})(templateObject_2$
|
|
3091
|
+
})(templateObject_2$n || (templateObject_2$n = __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) {
|
|
3075
3092
|
var $size = _a.$size;
|
|
3076
3093
|
var size = sizeConfig[$size];
|
|
3077
3094
|
return "\n height: ".concat(size.height, ";\n padding: ").concat(size.padding, ";\n font: ").concat(size.font, ";\n gap: ").concat(size.gap, ";\n ");
|
|
@@ -3083,7 +3100,7 @@ var StyledStatusBadge = styled.span.withConfig({
|
|
|
3083
3100
|
var ScreenReaderOnly = styled.span.withConfig({
|
|
3084
3101
|
displayName: "StatusBadge__ScreenReaderOnly",
|
|
3085
3102
|
componentId: "sc-1paksgb-1"
|
|
3086
|
-
})(templateObject_3$
|
|
3103
|
+
})(templateObject_3$l || (templateObject_3$l = __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"
|
|
3087
3104
|
/**
|
|
3088
3105
|
* StatusBadge component for displaying transaction or task status
|
|
3089
3106
|
*
|
|
@@ -3163,14 +3180,14 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
3163
3180
|
});
|
|
3164
3181
|
};
|
|
3165
3182
|
StatusBadge.displayName = 'StatusBadge';
|
|
3166
|
-
var templateObject_1$
|
|
3183
|
+
var templateObject_1$t, templateObject_2$n, templateObject_3$l;
|
|
3167
3184
|
|
|
3168
|
-
var semantic$
|
|
3169
|
-
var color$4 = semantic$
|
|
3170
|
-
spacing$4 = semantic$
|
|
3171
|
-
border$6 = semantic$
|
|
3172
|
-
typography$1 = semantic$
|
|
3173
|
-
size = semantic$
|
|
3185
|
+
var semantic$d = tokensData.semantic;
|
|
3186
|
+
var color$4 = semantic$d.color,
|
|
3187
|
+
spacing$4 = semantic$d.spacing,
|
|
3188
|
+
border$6 = semantic$d.border,
|
|
3189
|
+
typography$1 = semantic$d.typography,
|
|
3190
|
+
size = semantic$d.size;
|
|
3174
3191
|
var layout$2 = spacing$4.layout;
|
|
3175
3192
|
var radius$1 = border$6.radius;
|
|
3176
3193
|
var StyledTag = styled.span.withConfig({
|
|
@@ -3179,7 +3196,7 @@ var StyledTag = styled.span.withConfig({
|
|
|
3179
3196
|
},
|
|
3180
3197
|
displayName: "Tag__StyledTag",
|
|
3181
3198
|
componentId: "sc-lzfmti-0"
|
|
3182
|
-
})(templateObject_1$
|
|
3199
|
+
})(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"
|
|
3183
3200
|
/**
|
|
3184
3201
|
* Tag component for categorizing and labeling content
|
|
3185
3202
|
*
|
|
@@ -3262,13 +3279,13 @@ var Tag = function Tag(_a) {
|
|
|
3262
3279
|
children: children
|
|
3263
3280
|
}));
|
|
3264
3281
|
};
|
|
3265
|
-
var templateObject_1$
|
|
3282
|
+
var templateObject_1$s;
|
|
3266
3283
|
|
|
3267
3284
|
// Destructure tokens for cleaner access
|
|
3268
|
-
var semantic$
|
|
3269
|
-
var color$3 = semantic$
|
|
3270
|
-
spacing$3 = semantic$
|
|
3271
|
-
border$5 = semantic$
|
|
3285
|
+
var semantic$c = tokensData.semantic;
|
|
3286
|
+
var color$3 = semantic$c.color,
|
|
3287
|
+
spacing$3 = semantic$c.spacing,
|
|
3288
|
+
border$5 = semantic$c.border;
|
|
3272
3289
|
var layout$1 = spacing$3.layout;
|
|
3273
3290
|
var background = color$3.background,
|
|
3274
3291
|
icon = color$3.icon;
|
|
@@ -3276,27 +3293,27 @@ var radius = border$5.radius;
|
|
|
3276
3293
|
var StyledHeader$2 = styled.div.withConfig({
|
|
3277
3294
|
displayName: "AccountCard__StyledHeader",
|
|
3278
3295
|
componentId: "sc-1erp7zn-0"
|
|
3279
|
-
})(templateObject_1$
|
|
3296
|
+
})(templateObject_1$r || (templateObject_1$r = __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);
|
|
3280
3297
|
var StyledIconWrapper = styled.div.withConfig({
|
|
3281
3298
|
displayName: "AccountCard__StyledIconWrapper",
|
|
3282
3299
|
componentId: "sc-1erp7zn-1"
|
|
3283
|
-
})(templateObject_2$
|
|
3300
|
+
})(templateObject_2$m || (templateObject_2$m = __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);
|
|
3284
3301
|
var StyledBalanceSection = styled.div.withConfig({
|
|
3285
3302
|
displayName: "AccountCard__StyledBalanceSection",
|
|
3286
3303
|
componentId: "sc-1erp7zn-2"
|
|
3287
|
-
})(templateObject_3$
|
|
3304
|
+
})(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), layout$1.lg);
|
|
3288
3305
|
var StyledTrendSection = styled.div.withConfig({
|
|
3289
3306
|
displayName: "AccountCard__StyledTrendSection",
|
|
3290
3307
|
componentId: "sc-1erp7zn-3"
|
|
3291
|
-
})(templateObject_4$
|
|
3308
|
+
})(templateObject_4$h || (templateObject_4$h = __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);
|
|
3292
3309
|
var StyledActions$1 = styled.div.withConfig({
|
|
3293
3310
|
displayName: "AccountCard__StyledActions",
|
|
3294
3311
|
componentId: "sc-1erp7zn-4"
|
|
3295
|
-
})(templateObject_5$
|
|
3312
|
+
})(templateObject_5$d || (templateObject_5$d = __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);
|
|
3296
3313
|
var StyledStackWrapper = styled.div.withConfig({
|
|
3297
3314
|
displayName: "AccountCard__StyledStackWrapper",
|
|
3298
3315
|
componentId: "sc-1erp7zn-5"
|
|
3299
|
-
})(templateObject_6$
|
|
3316
|
+
})(templateObject_6$b || (templateObject_6$b = __makeTemplateObject(["\n height: 100%;\n min-height: 168px;\n"], ["\n height: 100%;\n min-height: 168px;\n"
|
|
3300
3317
|
// Map account types to icon names (using placeholders)
|
|
3301
3318
|
])));
|
|
3302
3319
|
// Map account types to icon names (using placeholders)
|
|
@@ -3456,26 +3473,26 @@ var AccountCard = function AccountCard(_a) {
|
|
|
3456
3473
|
})
|
|
3457
3474
|
});
|
|
3458
3475
|
};
|
|
3459
|
-
var templateObject_1$
|
|
3476
|
+
var templateObject_1$r, templateObject_2$m, templateObject_3$k, templateObject_4$h, templateObject_5$d, templateObject_6$b;
|
|
3460
3477
|
|
|
3461
|
-
var semantic$
|
|
3462
|
-
base$
|
|
3478
|
+
var semantic$b = tokensData.semantic,
|
|
3479
|
+
base$9 = tokensData.base;
|
|
3463
3480
|
var StyledListItem = styled.li.withConfig({
|
|
3464
3481
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3465
3482
|
return !prop.startsWith('$');
|
|
3466
3483
|
},
|
|
3467
3484
|
displayName: "ListItem__StyledListItem",
|
|
3468
3485
|
componentId: "sc-1wzzt21-0"
|
|
3469
|
-
})(templateObject_1$
|
|
3486
|
+
})(templateObject_1$q || (templateObject_1$q = __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) {
|
|
3470
3487
|
var $interactive = _a.$interactive;
|
|
3471
3488
|
return $interactive && 'user-select: none;';
|
|
3472
3489
|
}, function (_a) {
|
|
3473
3490
|
var $disabled = _a.$disabled;
|
|
3474
|
-
return $disabled && "\n opacity: ".concat(base$
|
|
3491
|
+
return $disabled && "\n opacity: ".concat(base$9.opacity[50], ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
3475
3492
|
}, function (_a) {
|
|
3476
3493
|
var $destructive = _a.$destructive,
|
|
3477
3494
|
$disabled = _a.$disabled;
|
|
3478
|
-
return $destructive && !$disabled && "\n color: ".concat(semantic$
|
|
3495
|
+
return $destructive && !$disabled && "\n color: ".concat(semantic$b.color.text.error, ";\n ");
|
|
3479
3496
|
});
|
|
3480
3497
|
var StyledItemContent = styled.div.withConfig({
|
|
3481
3498
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -3483,12 +3500,12 @@ var StyledItemContent = styled.div.withConfig({
|
|
|
3483
3500
|
},
|
|
3484
3501
|
displayName: "ListItem__StyledItemContent",
|
|
3485
3502
|
componentId: "sc-1wzzt21-1"
|
|
3486
|
-
})(templateObject_2$
|
|
3503
|
+
})(templateObject_2$l || (templateObject_2$l = __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$b.spacing.layout.md, function (_a) {
|
|
3487
3504
|
var $spacing = _a.$spacing;
|
|
3488
|
-
return $spacing === 'compact' ? "".concat(semantic$
|
|
3489
|
-
}, base$
|
|
3505
|
+
return $spacing === 'compact' ? "".concat(semantic$b.spacing.layout.sm, " ").concat(semantic$b.spacing.layout.md) : "".concat(semantic$b.spacing.layout.md, " ").concat(semantic$b.spacing.layout.lg);
|
|
3506
|
+
}, base$9.border.radius[2], function (_a) {
|
|
3490
3507
|
var $selected = _a.$selected;
|
|
3491
|
-
return $selected ? semantic$
|
|
3508
|
+
return $selected ? semantic$b.color.background['interactive-subtle'] : 'transparent';
|
|
3492
3509
|
}, function (_a) {
|
|
3493
3510
|
var $interactive = _a.$interactive,
|
|
3494
3511
|
$disabled = _a.$disabled;
|
|
@@ -3500,26 +3517,26 @@ var StyledItemContent = styled.div.withConfig({
|
|
|
3500
3517
|
$disabled = _a.$disabled,
|
|
3501
3518
|
$selected = _a.$selected;
|
|
3502
3519
|
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 ");
|
|
3503
|
-
}, semantic$
|
|
3520
|
+
}, semantic$b.color.border.interactive);
|
|
3504
3521
|
var StyledIconContainer$1 = styled.div.withConfig({
|
|
3505
3522
|
displayName: "ListItem__StyledIconContainer",
|
|
3506
3523
|
componentId: "sc-1wzzt21-2"
|
|
3507
|
-
})(templateObject_3$
|
|
3524
|
+
})(templateObject_3$j || (templateObject_3$j = __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"])));
|
|
3508
3525
|
var StyledTextContent = styled.div.withConfig({
|
|
3509
3526
|
displayName: "ListItem__StyledTextContent",
|
|
3510
3527
|
componentId: "sc-1wzzt21-3"
|
|
3511
|
-
})(templateObject_4$
|
|
3528
|
+
})(templateObject_4$g || (templateObject_4$g = __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$b.spacing.layout.xs);
|
|
3512
3529
|
var StyledRightContent = styled.div.withConfig({
|
|
3513
3530
|
displayName: "ListItem__StyledRightContent",
|
|
3514
3531
|
componentId: "sc-1wzzt21-4"
|
|
3515
|
-
})(templateObject_5$
|
|
3532
|
+
})(templateObject_5$c || (templateObject_5$c = __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$b.spacing.layout.sm);
|
|
3516
3533
|
var StyledChevronIcon = styled.div.withConfig({
|
|
3517
3534
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3518
3535
|
return !prop.startsWith('$');
|
|
3519
3536
|
},
|
|
3520
3537
|
displayName: "ListItem__StyledChevronIcon",
|
|
3521
3538
|
componentId: "sc-1wzzt21-5"
|
|
3522
|
-
})(templateObject_6$
|
|
3539
|
+
})(templateObject_6$a || (templateObject_6$a = __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$b.color.icon.subdued, function (_a) {
|
|
3523
3540
|
var $expanded = _a.$expanded;
|
|
3524
3541
|
return $expanded ? '180deg' : '0deg';
|
|
3525
3542
|
});
|
|
@@ -3529,7 +3546,7 @@ var StyledExpandedContent = styled.div.withConfig({
|
|
|
3529
3546
|
},
|
|
3530
3547
|
displayName: "ListItem__StyledExpandedContent",
|
|
3531
3548
|
componentId: "sc-1wzzt21-6"
|
|
3532
|
-
})(templateObject_7$
|
|
3549
|
+
})(templateObject_7$8 || (templateObject_7$8 = __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) {
|
|
3533
3550
|
var $expanded = _a.$expanded;
|
|
3534
3551
|
return $expanded ? '1000px' : '0';
|
|
3535
3552
|
}, function (_a) {
|
|
@@ -3538,7 +3555,7 @@ var StyledExpandedContent = styled.div.withConfig({
|
|
|
3538
3555
|
}, function (_a) {
|
|
3539
3556
|
var $expanded = _a.$expanded,
|
|
3540
3557
|
$spacing = _a.$spacing;
|
|
3541
|
-
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$
|
|
3558
|
+
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$b.spacing.layout.sm, " ").concat(semantic$b.spacing.layout.md, " ").concat(semantic$b.spacing.layout.sm, " 48px") : "".concat(semantic$b.spacing.layout.sm, " ").concat(semantic$b.spacing.layout.lg, " ").concat(semantic$b.spacing.layout.md, " 60px"), ";\n background-color: ").concat(semantic$b.color.background['subtle'], ";\n border-radius: ").concat(base$9.border.radius[2], ";\n margin: 0 ").concat($spacing === 'compact' ? semantic$b.spacing.layout.md : semantic$b.spacing.layout.lg, " ").concat($spacing === 'compact' ? semantic$b.spacing.layout.sm : semantic$b.spacing.layout.md, ";\n ");
|
|
3542
3559
|
});
|
|
3543
3560
|
var ListItem = function ListItem(_a) {
|
|
3544
3561
|
var primary = _a.primary,
|
|
@@ -3651,7 +3668,7 @@ var ListItem = function ListItem(_a) {
|
|
|
3651
3668
|
}));
|
|
3652
3669
|
};
|
|
3653
3670
|
ListItem.displayName = 'ListItem';
|
|
3654
|
-
var templateObject_1$
|
|
3671
|
+
var templateObject_1$q, templateObject_2$l, templateObject_3$j, templateObject_4$g, templateObject_5$c, templateObject_6$a, templateObject_7$8;
|
|
3655
3672
|
|
|
3656
3673
|
var _a$4 = tokensData.semantic,
|
|
3657
3674
|
color$2 = _a$4.color,
|
|
@@ -3659,32 +3676,32 @@ var _a$4 = tokensData.semantic,
|
|
|
3659
3676
|
layout = _a$4.spacing.layout,
|
|
3660
3677
|
motion = _a$4.motion,
|
|
3661
3678
|
elevation = _a$4.elevation;
|
|
3662
|
-
var slideUp = styled.keyframes(templateObject_1$
|
|
3663
|
-
var fadeIn$1 = styled.keyframes(templateObject_2$
|
|
3679
|
+
var slideUp = styled.keyframes(templateObject_1$p || (templateObject_1$p = __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"])));
|
|
3680
|
+
var fadeIn$1 = styled.keyframes(templateObject_2$k || (templateObject_2$k = __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"])));
|
|
3664
3681
|
var StyledOverlay$1 = styled.div.withConfig({
|
|
3665
3682
|
displayName: "ActionSheet__StyledOverlay",
|
|
3666
3683
|
componentId: "sc-regbol-0"
|
|
3667
|
-
})(templateObject_3$
|
|
3684
|
+
})(templateObject_3$i || (templateObject_3$i = __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);
|
|
3668
3685
|
var StyledActionSheet = styled.div.withConfig({
|
|
3669
3686
|
displayName: "ActionSheet__StyledActionSheet",
|
|
3670
3687
|
componentId: "sc-regbol-1"
|
|
3671
|
-
})(templateObject_4$
|
|
3688
|
+
})(templateObject_4$f || (templateObject_4$f = __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);
|
|
3672
3689
|
var StyledHeader$1 = styled.div.withConfig({
|
|
3673
3690
|
displayName: "ActionSheet__StyledHeader",
|
|
3674
3691
|
componentId: "sc-regbol-2"
|
|
3675
|
-
})(templateObject_5$
|
|
3692
|
+
})(templateObject_5$b || (templateObject_5$b = __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"]);
|
|
3676
3693
|
var StyledHeaderContent = styled.div.withConfig({
|
|
3677
3694
|
displayName: "ActionSheet__StyledHeaderContent",
|
|
3678
3695
|
componentId: "sc-regbol-3"
|
|
3679
|
-
})(templateObject_6$
|
|
3696
|
+
})(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n flex: 1;\n"], ["\n flex: 1;\n"])));
|
|
3680
3697
|
var StyledCloseButton = styled.button.withConfig({
|
|
3681
3698
|
displayName: "ActionSheet__StyledCloseButton",
|
|
3682
3699
|
componentId: "sc-regbol-4"
|
|
3683
|
-
})(templateObject_7$
|
|
3700
|
+
})(templateObject_7$7 || (templateObject_7$7 = __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);
|
|
3684
3701
|
var StyledActionsList = styled.ul.withConfig({
|
|
3685
3702
|
displayName: "ActionSheet__StyledActionsList",
|
|
3686
3703
|
componentId: "sc-regbol-5"
|
|
3687
|
-
})(templateObject_8$
|
|
3704
|
+
})(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject(["\n padding: ", " ", ";\n margin: 0;\n list-style: none;\n"], ["\n padding: ", " ", ";\n margin: 0;\n list-style: none;\n"
|
|
3688
3705
|
/**
|
|
3689
3706
|
* ActionSheet component for bottom sheet modals
|
|
3690
3707
|
*
|
|
@@ -3896,7 +3913,807 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
3896
3913
|
})]
|
|
3897
3914
|
}), document.body);
|
|
3898
3915
|
};
|
|
3899
|
-
var templateObject_1$
|
|
3916
|
+
var templateObject_1$p, templateObject_2$k, templateObject_3$i, templateObject_4$f, templateObject_5$b, templateObject_6$9, templateObject_7$7, templateObject_8$5;
|
|
3917
|
+
|
|
3918
|
+
function detectSpeechRecognitionConstructor(targetWindow) {
|
|
3919
|
+
if (!targetWindow) return null;
|
|
3920
|
+
var candidateWindow = targetWindow;
|
|
3921
|
+
if (candidateWindow.SpeechRecognition) {
|
|
3922
|
+
return candidateWindow.SpeechRecognition;
|
|
3923
|
+
}
|
|
3924
|
+
if (candidateWindow.webkitSpeechRecognition) {
|
|
3925
|
+
return candidateWindow.webkitSpeechRecognition;
|
|
3926
|
+
}
|
|
3927
|
+
return null;
|
|
3928
|
+
}
|
|
3929
|
+
function normalizeTranscript(input) {
|
|
3930
|
+
return input.replace(/\s+/g, ' ').trim();
|
|
3931
|
+
}
|
|
3932
|
+
function mapSpeechErrorCode(error) {
|
|
3933
|
+
switch (error) {
|
|
3934
|
+
case 'not-allowed':
|
|
3935
|
+
case 'service-not-allowed':
|
|
3936
|
+
return 'not-allowed';
|
|
3937
|
+
case 'no-speech':
|
|
3938
|
+
return 'no-speech';
|
|
3939
|
+
case 'audio-capture':
|
|
3940
|
+
return 'audio-capture';
|
|
3941
|
+
case 'aborted':
|
|
3942
|
+
return 'aborted';
|
|
3943
|
+
default:
|
|
3944
|
+
return 'unknown';
|
|
3945
|
+
}
|
|
3946
|
+
}
|
|
3947
|
+
function defaultVoiceErrorMessage(code) {
|
|
3948
|
+
switch (code) {
|
|
3949
|
+
case 'not-supported':
|
|
3950
|
+
return 'Voice input is not supported in this browser. Use Chrome or Edge.';
|
|
3951
|
+
case 'not-allowed':
|
|
3952
|
+
return 'Microphone permission denied. Allow access and try again.';
|
|
3953
|
+
case 'no-speech':
|
|
3954
|
+
return 'No speech detected. Try again.';
|
|
3955
|
+
case 'audio-capture':
|
|
3956
|
+
return 'No microphone device detected. Check your microphone and try again.';
|
|
3957
|
+
case 'aborted':
|
|
3958
|
+
return 'Voice input was stopped.';
|
|
3959
|
+
default:
|
|
3960
|
+
return 'Voice input failed. Try again.';
|
|
3961
|
+
}
|
|
3962
|
+
}
|
|
3963
|
+
|
|
3964
|
+
var textDrivenState = function textDrivenState(hasText) {
|
|
3965
|
+
return hasText ? 'typing' : 'idle';
|
|
3966
|
+
};
|
|
3967
|
+
function agentInputStateTransition(currentState, event) {
|
|
3968
|
+
if (currentState === 'disabled') {
|
|
3969
|
+
return 'disabled';
|
|
3970
|
+
}
|
|
3971
|
+
switch (event.type) {
|
|
3972
|
+
case 'INPUT_CHANGE':
|
|
3973
|
+
if (currentState === 'listening' || currentState === 'processingFinalTranscript' || currentState === 'submitting') {
|
|
3974
|
+
return currentState;
|
|
3975
|
+
}
|
|
3976
|
+
return textDrivenState(event.hasText);
|
|
3977
|
+
case 'MIC_START':
|
|
3978
|
+
if (currentState === 'idle' || currentState === 'typing') {
|
|
3979
|
+
return 'listening';
|
|
3980
|
+
}
|
|
3981
|
+
return currentState;
|
|
3982
|
+
case 'VOICE_INTERIM':
|
|
3983
|
+
if (currentState === 'listening') {
|
|
3984
|
+
return 'listening';
|
|
3985
|
+
}
|
|
3986
|
+
return currentState;
|
|
3987
|
+
case 'VOICE_FINAL':
|
|
3988
|
+
if (currentState === 'listening') {
|
|
3989
|
+
return 'processingFinalTranscript';
|
|
3990
|
+
}
|
|
3991
|
+
return currentState;
|
|
3992
|
+
case 'MIC_STOP':
|
|
3993
|
+
if (currentState === 'listening') {
|
|
3994
|
+
return textDrivenState(event.hasText);
|
|
3995
|
+
}
|
|
3996
|
+
return currentState;
|
|
3997
|
+
case 'SUBMIT':
|
|
3998
|
+
return 'submitting';
|
|
3999
|
+
case 'SUBMIT_SUCCESS':
|
|
4000
|
+
return 'idle';
|
|
4001
|
+
case 'SUBMIT_ERROR':
|
|
4002
|
+
return 'error';
|
|
4003
|
+
case 'VOICE_ERROR':
|
|
4004
|
+
case 'TIMEOUT_NO_SPEECH':
|
|
4005
|
+
return 'error';
|
|
4006
|
+
case 'RESET_ERROR':
|
|
4007
|
+
if (currentState === 'error') {
|
|
4008
|
+
return textDrivenState(event.hasText);
|
|
4009
|
+
}
|
|
4010
|
+
return currentState;
|
|
4011
|
+
default:
|
|
4012
|
+
return currentState;
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
|
|
4016
|
+
var semantic$a = tokensData.semantic,
|
|
4017
|
+
base$8 = tokensData.base,
|
|
4018
|
+
component$1 = tokensData.component;
|
|
4019
|
+
var DEFAULT_IDLE_HELPER = 'Ask about transactions, spending, or transfers';
|
|
4020
|
+
var DEFAULT_LISTENING_MESSAGE = 'Listening… speak now';
|
|
4021
|
+
var DEFAULT_PROCESSING_MESSAGE = 'Finishing voice input…';
|
|
4022
|
+
var pulseRing = styled.keyframes(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n 0% {\n transform: scale(1);\n opacity: 0.4;\n }\n 70% {\n transform: scale(1.08);\n opacity: 0;\n }\n 100% {\n transform: scale(1.08);\n opacity: 0;\n }\n"], ["\n 0% {\n transform: scale(1);\n opacity: 0.4;\n }\n 70% {\n transform: scale(1.08);\n opacity: 0;\n }\n 100% {\n transform: scale(1.08);\n opacity: 0;\n }\n"])));
|
|
4023
|
+
var Container = styled.div.withConfig({
|
|
4024
|
+
displayName: "AgentInput__Container",
|
|
4025
|
+
componentId: "sc-fhl996-0"
|
|
4026
|
+
})(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"])), base$8.spacing[2]);
|
|
4027
|
+
var ControlsRow = styled.div.withConfig({
|
|
4028
|
+
displayName: "AgentInput__ControlsRow",
|
|
4029
|
+
componentId: "sc-fhl996-1"
|
|
4030
|
+
})(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
4031
|
+
var InputShell = styled.div.withConfig({
|
|
4032
|
+
displayName: "AgentInput__InputShell",
|
|
4033
|
+
componentId: "sc-fhl996-2"
|
|
4034
|
+
})(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n width: 100%;\n padding: ", " ", " ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n transition: border-color 200ms ease-in-out, outline 200ms ease-in-out;\n\n &:focus-within {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n\n &[data-disabled='true'] {\n background-color: ", ";\n border-color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n width: 100%;\n padding: ", " ", " ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n transition: border-color 200ms ease-in-out, outline 200ms ease-in-out;\n\n &:focus-within {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n\n &[data-disabled='true'] {\n background-color: ", ";\n border-color: ", ";\n }\n"])), base$8.spacing[2], semantic$a.spacing.layout.xs, semantic$a.spacing.layout.sm, semantic$a.spacing.layout.xs, component$1.input["default"].paddingX, component$1.input["default"].backgroundColor, component$1.input["default"].borderWidth, component$1.input["default"].borderColor, semantic$a.border.radius['3xl'], semantic$a.elevation.raised, component$1.input.focus.borderColor, component$1.input.focus.outline, component$1.input.focus.outlineOffset, component$1.input.disabled.backgroundColor, component$1.input.disabled.borderColor);
|
|
4035
|
+
var Input = styled.input.withConfig({
|
|
4036
|
+
displayName: "AgentInput__Input",
|
|
4037
|
+
componentId: "sc-fhl996-3"
|
|
4038
|
+
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), base$8.spacing[12], semantic$a.typography.body, semantic$a.color.text["default"], semantic$a.color.text.subdued, semantic$a.color.text.disabled);
|
|
4039
|
+
var InputActions = styled.div.withConfig({
|
|
4040
|
+
displayName: "AgentInput__InputActions",
|
|
4041
|
+
componentId: "sc-fhl996-4"
|
|
4042
|
+
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"])), semantic$a.spacing.layout.xs);
|
|
4043
|
+
var CircularActionIconButton = styled(IconButton).withConfig({
|
|
4044
|
+
displayName: "AgentInput__CircularActionIconButton",
|
|
4045
|
+
componentId: "sc-fhl996-5"
|
|
4046
|
+
})(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$a.border.radius.circle);
|
|
4047
|
+
var InputWrapper = styled.div.withConfig({
|
|
4048
|
+
displayName: "AgentInput__InputWrapper",
|
|
4049
|
+
componentId: "sc-fhl996-6"
|
|
4050
|
+
})(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n"], ["\n flex: 1;\n min-width: 0;\n"])));
|
|
4051
|
+
var MicButtonWrapper = styled.div.withConfig({
|
|
4052
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4053
|
+
return !prop.startsWith('$');
|
|
4054
|
+
},
|
|
4055
|
+
displayName: "AgentInput__MicButtonWrapper",
|
|
4056
|
+
componentId: "sc-fhl996-7"
|
|
4057
|
+
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n &::before {\n animation: none;\n }\n }\n"], ["\n position: relative;\n display: inline-flex;\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n &::before {\n animation: none;\n }\n }\n"])), function (_a) {
|
|
4058
|
+
var $isListening = _a.$isListening,
|
|
4059
|
+
$reducedMotion = _a.$reducedMotion;
|
|
4060
|
+
return $isListening && !$reducedMotion && styled.css(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["\n &::before {\n content: '';\n position: absolute;\n inset: -", ";\n border: ", " solid ", ";\n border-radius: ", ";\n animation: ", " 1400ms ease-out infinite;\n pointer-events: none;\n }\n "], ["\n &::before {\n content: '';\n position: absolute;\n inset: -", ";\n border: ", " solid ", ";\n border-radius: ", ";\n animation: ", " 1400ms ease-out infinite;\n pointer-events: none;\n }\n "])), base$8.spacing[1], base$8.border.width[1], semantic$a.color.border.interactive, base$8.border.radius[4], pulseRing);
|
|
4061
|
+
});
|
|
4062
|
+
var StatusRow = styled.div.withConfig({
|
|
4063
|
+
displayName: "AgentInput__StatusRow",
|
|
4064
|
+
componentId: "sc-fhl996-8"
|
|
4065
|
+
})(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n min-height: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n min-height: ", ";\n"])), base$8.spacing[3], base$8.spacing[6]);
|
|
4066
|
+
var StatusText = styled.div.withConfig({
|
|
4067
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4068
|
+
return !prop.startsWith('$');
|
|
4069
|
+
},
|
|
4070
|
+
displayName: "AgentInput__StatusText",
|
|
4071
|
+
componentId: "sc-fhl996-9"
|
|
4072
|
+
})(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\npadding-left: ", ";\n color: ", ";\n"], ["\npadding-left: ", ";\n color: ", ";\n"])), semantic$a.spacing.layout.xl, function (_a) {
|
|
4073
|
+
var $isError = _a.$isError;
|
|
4074
|
+
return $isError ? semantic$a.color.text.error : semantic$a.color.text.subdued;
|
|
4075
|
+
});
|
|
4076
|
+
var StatusAnnouncement = styled.div.withConfig({
|
|
4077
|
+
displayName: "AgentInput__StatusAnnouncement",
|
|
4078
|
+
componentId: "sc-fhl996-10"
|
|
4079
|
+
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject([""], [""])));
|
|
4080
|
+
var MeterContainer = styled.div.withConfig({
|
|
4081
|
+
displayName: "AgentInput__MeterContainer",
|
|
4082
|
+
componentId: "sc-fhl996-11"
|
|
4083
|
+
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: flex-end;\n gap: ", ";\n height: ", ";\n"], ["\n display: inline-flex;\n align-items: flex-end;\n gap: ", ";\n height: ", ";\n"])), base$8.spacing[1], base$8.spacing[4]);
|
|
4084
|
+
var MeterBar = styled.div.withConfig({
|
|
4085
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4086
|
+
return !prop.startsWith('$');
|
|
4087
|
+
},
|
|
4088
|
+
displayName: "AgentInput__MeterBar",
|
|
4089
|
+
componentId: "sc-fhl996-12"
|
|
4090
|
+
})(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject(["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height 120ms linear;\n"], ["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height 120ms linear;\n"])), base$8.spacing[1], base$8.border.radius[1], semantic$a.color.background.interactive, function (_a) {
|
|
4091
|
+
var $height = _a.$height;
|
|
4092
|
+
return "".concat($height * 100, "%");
|
|
4093
|
+
});
|
|
4094
|
+
var VisuallyHiddenLabel = styled.label.withConfig({
|
|
4095
|
+
displayName: "AgentInput__VisuallyHiddenLabel",
|
|
4096
|
+
componentId: "sc-fhl996-13"
|
|
4097
|
+
})(templateObject_16$1 || (templateObject_16$1 = __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: 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: 0;\n"])));
|
|
4098
|
+
function getInitialState(hasText) {
|
|
4099
|
+
return hasText ? 'typing' : 'idle';
|
|
4100
|
+
}
|
|
4101
|
+
function createMeterBars(level) {
|
|
4102
|
+
var clampedLevel = Math.max(0, Math.min(level, 1));
|
|
4103
|
+
return [0.25 + clampedLevel * 0.75, 0.2 + clampedLevel * 0.6, 0.3 + clampedLevel * 0.7, 0.2 + clampedLevel * 0.5];
|
|
4104
|
+
}
|
|
4105
|
+
var AgentInput = function AgentInput(_a) {
|
|
4106
|
+
var value = _a.value,
|
|
4107
|
+
_b = _a.defaultValue,
|
|
4108
|
+
defaultValue = _b === void 0 ? '' : _b,
|
|
4109
|
+
onChange = _a.onChange,
|
|
4110
|
+
onSubmit = _a.onSubmit,
|
|
4111
|
+
_c = _a.placeholder,
|
|
4112
|
+
placeholder = _c === void 0 ? 'Ask a question' : _c,
|
|
4113
|
+
_d = _a.disabled,
|
|
4114
|
+
disabled = _d === void 0 ? false : _d,
|
|
4115
|
+
isSubmitting = _a.isSubmitting,
|
|
4116
|
+
_e = _a.enableVoice,
|
|
4117
|
+
enableVoice = _e === void 0 ? true : _e,
|
|
4118
|
+
_f = _a.autoSubmitOnVoiceFinal,
|
|
4119
|
+
autoSubmitOnVoiceFinal = _f === void 0 ? true : _f,
|
|
4120
|
+
_g = _a.voiceLanguage,
|
|
4121
|
+
voiceLanguage = _g === void 0 ? 'en-AU' : _g,
|
|
4122
|
+
_h = _a.noSpeechTimeoutMs,
|
|
4123
|
+
noSpeechTimeoutMs = _h === void 0 ? 8000 : _h,
|
|
4124
|
+
onVoiceStart = _a.onVoiceStart,
|
|
4125
|
+
onVoiceStop = _a.onVoiceStop,
|
|
4126
|
+
onVoiceInterim = _a.onVoiceInterim,
|
|
4127
|
+
onVoiceFinal = _a.onVoiceFinal,
|
|
4128
|
+
onVoiceError = _a.onVoiceError,
|
|
4129
|
+
statusMessage = _a.statusMessage,
|
|
4130
|
+
errorMessage = _a.errorMessage,
|
|
4131
|
+
_j = _a.label,
|
|
4132
|
+
label = _j === void 0 ? 'Agent input' : _j,
|
|
4133
|
+
dataTestId = _a["data-testid"];
|
|
4134
|
+
var isControlled = value !== undefined;
|
|
4135
|
+
var _k = React.useState(defaultValue),
|
|
4136
|
+
internalValue = _k[0],
|
|
4137
|
+
setInternalValue = _k[1];
|
|
4138
|
+
var _l = React.useState(getInitialState(normalizeTranscript(value !== null && value !== void 0 ? value : defaultValue).length > 0)),
|
|
4139
|
+
machineState = _l[0],
|
|
4140
|
+
setMachineState = _l[1];
|
|
4141
|
+
var _m = React.useState(''),
|
|
4142
|
+
interimTranscript = _m[0],
|
|
4143
|
+
setInterimTranscript = _m[1];
|
|
4144
|
+
var _o = React.useState(false),
|
|
4145
|
+
internalSubmitting = _o[0],
|
|
4146
|
+
setInternalSubmitting = _o[1];
|
|
4147
|
+
var _p = React.useState(undefined),
|
|
4148
|
+
internalErrorMessage = _p[0],
|
|
4149
|
+
setInternalErrorMessage = _p[1];
|
|
4150
|
+
var _q = React.useState(false),
|
|
4151
|
+
voiceSupported = _q[0],
|
|
4152
|
+
setVoiceSupported = _q[1];
|
|
4153
|
+
var _r = React.useState(false),
|
|
4154
|
+
prefersReducedMotion = _r[0],
|
|
4155
|
+
setPrefersReducedMotion = _r[1];
|
|
4156
|
+
var _s = React.useState(0),
|
|
4157
|
+
meterLevel = _s[0],
|
|
4158
|
+
setMeterLevel = _s[1];
|
|
4159
|
+
var recognitionRef = React.useRef(null);
|
|
4160
|
+
var noSpeechTimeoutRef = React.useRef(null);
|
|
4161
|
+
var isStoppingRef = React.useRef(false);
|
|
4162
|
+
var hasSubmittedVoiceFinalRef = React.useRef(false);
|
|
4163
|
+
var audioStreamRef = React.useRef(null);
|
|
4164
|
+
var audioContextRef = React.useRef(null);
|
|
4165
|
+
var meterRafRef = React.useRef(null);
|
|
4166
|
+
var inputId = React.useId();
|
|
4167
|
+
var statusId = "".concat(inputId, "-status");
|
|
4168
|
+
var currentValue = isControlled ? value !== null && value !== void 0 ? value : '' : internalValue;
|
|
4169
|
+
var hasText = normalizeTranscript(currentValue).length > 0;
|
|
4170
|
+
var effectiveSubmitting = isSubmitting !== null && isSubmitting !== void 0 ? isSubmitting : internalSubmitting;
|
|
4171
|
+
var effectiveState = disabled ? 'disabled' : machineState;
|
|
4172
|
+
var isListening = effectiveState === 'listening';
|
|
4173
|
+
var hasVoice = enableVoice && voiceSupported;
|
|
4174
|
+
var updateMachineState = React.useCallback(function (event) {
|
|
4175
|
+
setMachineState(function (previousState) {
|
|
4176
|
+
return agentInputStateTransition(previousState, event);
|
|
4177
|
+
});
|
|
4178
|
+
}, []);
|
|
4179
|
+
var updateValue = React.useCallback(function (nextValue) {
|
|
4180
|
+
if (!isControlled) {
|
|
4181
|
+
setInternalValue(nextValue);
|
|
4182
|
+
}
|
|
4183
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
4184
|
+
}, [isControlled, onChange]);
|
|
4185
|
+
var clearNoSpeechTimeout = React.useCallback(function () {
|
|
4186
|
+
if (noSpeechTimeoutRef.current) {
|
|
4187
|
+
window.clearTimeout(noSpeechTimeoutRef.current);
|
|
4188
|
+
noSpeechTimeoutRef.current = null;
|
|
4189
|
+
}
|
|
4190
|
+
}, []);
|
|
4191
|
+
var stopMeter = React.useCallback(function () {
|
|
4192
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4193
|
+
return __generator(this, function (_a) {
|
|
4194
|
+
switch (_a.label) {
|
|
4195
|
+
case 0:
|
|
4196
|
+
if (meterRafRef.current) {
|
|
4197
|
+
window.cancelAnimationFrame(meterRafRef.current);
|
|
4198
|
+
meterRafRef.current = null;
|
|
4199
|
+
}
|
|
4200
|
+
if (audioStreamRef.current) {
|
|
4201
|
+
audioStreamRef.current.getTracks().forEach(function (track) {
|
|
4202
|
+
return track.stop();
|
|
4203
|
+
});
|
|
4204
|
+
audioStreamRef.current = null;
|
|
4205
|
+
}
|
|
4206
|
+
if (!audioContextRef.current) return [3 /*break*/, 2];
|
|
4207
|
+
return [4 /*yield*/, audioContextRef.current.close()];
|
|
4208
|
+
case 1:
|
|
4209
|
+
_a.sent();
|
|
4210
|
+
audioContextRef.current = null;
|
|
4211
|
+
_a.label = 2;
|
|
4212
|
+
case 2:
|
|
4213
|
+
setMeterLevel(0);
|
|
4214
|
+
return [2 /*return*/];
|
|
4215
|
+
}
|
|
4216
|
+
});
|
|
4217
|
+
});
|
|
4218
|
+
}, []);
|
|
4219
|
+
var startMeter = React.useCallback(function () {
|
|
4220
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4221
|
+
var stream, audioContext, analyser_1, source, data_1, _loop_;
|
|
4222
|
+
var _b;
|
|
4223
|
+
return __generator(this, function (_c) {
|
|
4224
|
+
switch (_c.label) {
|
|
4225
|
+
case 0:
|
|
4226
|
+
if (prefersReducedMotion || !((_b = navigator === null || navigator === void 0 ? void 0 : navigator.mediaDevices) === null || _b === void 0 ? void 0 : _b.getUserMedia)) {
|
|
4227
|
+
return [2 /*return*/];
|
|
4228
|
+
}
|
|
4229
|
+
_c.label = 1;
|
|
4230
|
+
case 1:
|
|
4231
|
+
_c.trys.push([1, 3,, 4]);
|
|
4232
|
+
return [4 /*yield*/, navigator.mediaDevices.getUserMedia({
|
|
4233
|
+
audio: true
|
|
4234
|
+
})];
|
|
4235
|
+
case 2:
|
|
4236
|
+
stream = _c.sent();
|
|
4237
|
+
audioContext = new AudioContext();
|
|
4238
|
+
analyser_1 = audioContext.createAnalyser();
|
|
4239
|
+
analyser_1.fftSize = 256;
|
|
4240
|
+
source = audioContext.createMediaStreamSource(stream);
|
|
4241
|
+
source.connect(analyser_1);
|
|
4242
|
+
data_1 = new Uint8Array(analyser_1.frequencyBinCount);
|
|
4243
|
+
audioStreamRef.current = stream;
|
|
4244
|
+
audioContextRef.current = audioContext;
|
|
4245
|
+
_loop_ = function loop_1() {
|
|
4246
|
+
analyser_1.getByteTimeDomainData(data_1);
|
|
4247
|
+
var sum = 0;
|
|
4248
|
+
for (var index = 0; index < data_1.length; index += 1) {
|
|
4249
|
+
var centered = data_1[index] / 128 - 1;
|
|
4250
|
+
sum += centered * centered;
|
|
4251
|
+
}
|
|
4252
|
+
var rms = Math.sqrt(sum / data_1.length);
|
|
4253
|
+
var nextLevel = Math.max(0.05, Math.min(rms * 3, 1));
|
|
4254
|
+
setMeterLevel(nextLevel);
|
|
4255
|
+
meterRafRef.current = window.requestAnimationFrame(_loop_);
|
|
4256
|
+
};
|
|
4257
|
+
meterRafRef.current = window.requestAnimationFrame(_loop_);
|
|
4258
|
+
return [3 /*break*/, 4];
|
|
4259
|
+
case 3:
|
|
4260
|
+
_c.sent();
|
|
4261
|
+
setMeterLevel(0);
|
|
4262
|
+
return [3 /*break*/, 4];
|
|
4263
|
+
case 4:
|
|
4264
|
+
return [2 /*return*/];
|
|
4265
|
+
}
|
|
4266
|
+
});
|
|
4267
|
+
});
|
|
4268
|
+
}, [prefersReducedMotion]);
|
|
4269
|
+
var emitVoiceError = React.useCallback(function (code, fallback) {
|
|
4270
|
+
var message = fallback !== null && fallback !== void 0 ? fallback : defaultVoiceErrorMessage(code);
|
|
4271
|
+
setInternalErrorMessage(message);
|
|
4272
|
+
updateMachineState({
|
|
4273
|
+
type: 'VOICE_ERROR'
|
|
4274
|
+
});
|
|
4275
|
+
onVoiceError === null || onVoiceError === void 0 ? void 0 : onVoiceError({
|
|
4276
|
+
code: code,
|
|
4277
|
+
message: message
|
|
4278
|
+
});
|
|
4279
|
+
}, [onVoiceError, updateMachineState]);
|
|
4280
|
+
var submitPayload = React.useCallback(function (rawText, source) {
|
|
4281
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4282
|
+
var text;
|
|
4283
|
+
return __generator(this, function (_b) {
|
|
4284
|
+
switch (_b.label) {
|
|
4285
|
+
case 0:
|
|
4286
|
+
text = normalizeTranscript(rawText);
|
|
4287
|
+
if (!text || disabled || effectiveSubmitting) {
|
|
4288
|
+
return [2 /*return*/];
|
|
4289
|
+
}
|
|
4290
|
+
updateMachineState({
|
|
4291
|
+
type: 'SUBMIT'
|
|
4292
|
+
});
|
|
4293
|
+
setInternalErrorMessage(undefined);
|
|
4294
|
+
if (isSubmitting === undefined) {
|
|
4295
|
+
setInternalSubmitting(true);
|
|
4296
|
+
}
|
|
4297
|
+
_b.label = 1;
|
|
4298
|
+
case 1:
|
|
4299
|
+
_b.trys.push([1, 3, 4, 5]);
|
|
4300
|
+
return [4 /*yield*/, onSubmit({
|
|
4301
|
+
text: text,
|
|
4302
|
+
source: source,
|
|
4303
|
+
timestamp: new Date().toISOString()
|
|
4304
|
+
})];
|
|
4305
|
+
case 2:
|
|
4306
|
+
_b.sent();
|
|
4307
|
+
updateMachineState({
|
|
4308
|
+
type: 'SUBMIT_SUCCESS'
|
|
4309
|
+
});
|
|
4310
|
+
setInterimTranscript('');
|
|
4311
|
+
updateValue('');
|
|
4312
|
+
return [3 /*break*/, 5];
|
|
4313
|
+
case 3:
|
|
4314
|
+
_b.sent();
|
|
4315
|
+
updateMachineState({
|
|
4316
|
+
type: 'SUBMIT_ERROR'
|
|
4317
|
+
});
|
|
4318
|
+
if (source === 'voice-final') {
|
|
4319
|
+
updateValue(text);
|
|
4320
|
+
}
|
|
4321
|
+
setInternalErrorMessage('Submission failed. Please try again.');
|
|
4322
|
+
return [3 /*break*/, 5];
|
|
4323
|
+
case 4:
|
|
4324
|
+
if (isSubmitting === undefined) {
|
|
4325
|
+
setInternalSubmitting(false);
|
|
4326
|
+
}
|
|
4327
|
+
return [7 /*endfinally*/];
|
|
4328
|
+
case 5:
|
|
4329
|
+
return [2 /*return*/];
|
|
4330
|
+
}
|
|
4331
|
+
});
|
|
4332
|
+
});
|
|
4333
|
+
}, [disabled, effectiveSubmitting, isSubmitting, onSubmit, updateMachineState, updateValue]);
|
|
4334
|
+
var stopListening = React.useCallback(function (emitStopEvent_1) {
|
|
4335
|
+
var args_1 = [];
|
|
4336
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4337
|
+
args_1[_i - 1] = arguments[_i];
|
|
4338
|
+
}
|
|
4339
|
+
return __awaiter(void 0, __spreadArray([emitStopEvent_1], args_1, true), void 0, function (emitStopEvent, preserveState) {
|
|
4340
|
+
if (preserveState === void 0) {
|
|
4341
|
+
preserveState = false;
|
|
4342
|
+
}
|
|
4343
|
+
return __generator(this, function (_a) {
|
|
4344
|
+
switch (_a.label) {
|
|
4345
|
+
case 0:
|
|
4346
|
+
isStoppingRef.current = true;
|
|
4347
|
+
clearNoSpeechTimeout();
|
|
4348
|
+
setInterimTranscript('');
|
|
4349
|
+
if (recognitionRef.current) {
|
|
4350
|
+
try {
|
|
4351
|
+
recognitionRef.current.stop();
|
|
4352
|
+
} catch (_b) {
|
|
4353
|
+
// no-op
|
|
4354
|
+
}
|
|
4355
|
+
}
|
|
4356
|
+
return [4 /*yield*/, stopMeter()];
|
|
4357
|
+
case 1:
|
|
4358
|
+
_a.sent();
|
|
4359
|
+
if (emitStopEvent) {
|
|
4360
|
+
onVoiceStop === null || onVoiceStop === void 0 ? void 0 : onVoiceStop();
|
|
4361
|
+
}
|
|
4362
|
+
if (!preserveState) {
|
|
4363
|
+
updateMachineState({
|
|
4364
|
+
type: 'MIC_STOP',
|
|
4365
|
+
hasText: hasText
|
|
4366
|
+
});
|
|
4367
|
+
}
|
|
4368
|
+
isStoppingRef.current = false;
|
|
4369
|
+
return [2 /*return*/];
|
|
4370
|
+
}
|
|
4371
|
+
});
|
|
4372
|
+
});
|
|
4373
|
+
}, [clearNoSpeechTimeout, hasText, onVoiceStop, stopMeter, updateMachineState]);
|
|
4374
|
+
var onNoSpeechTimeout = React.useCallback(function () {
|
|
4375
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4376
|
+
var message;
|
|
4377
|
+
return __generator(this, function (_a) {
|
|
4378
|
+
switch (_a.label) {
|
|
4379
|
+
case 0:
|
|
4380
|
+
clearNoSpeechTimeout();
|
|
4381
|
+
updateMachineState({
|
|
4382
|
+
type: 'TIMEOUT_NO_SPEECH'
|
|
4383
|
+
});
|
|
4384
|
+
message = defaultVoiceErrorMessage('no-speech');
|
|
4385
|
+
setInternalErrorMessage(message);
|
|
4386
|
+
onVoiceError === null || onVoiceError === void 0 ? void 0 : onVoiceError({
|
|
4387
|
+
code: 'no-speech',
|
|
4388
|
+
message: message
|
|
4389
|
+
});
|
|
4390
|
+
return [4 /*yield*/, stopListening(true, true)];
|
|
4391
|
+
case 1:
|
|
4392
|
+
_a.sent();
|
|
4393
|
+
return [2 /*return*/];
|
|
4394
|
+
}
|
|
4395
|
+
});
|
|
4396
|
+
});
|
|
4397
|
+
}, [clearNoSpeechTimeout, onVoiceError, stopListening, updateMachineState]);
|
|
4398
|
+
var beginListening = React.useCallback(function () {
|
|
4399
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4400
|
+
return __generator(this, function (_b) {
|
|
4401
|
+
switch (_b.label) {
|
|
4402
|
+
case 0:
|
|
4403
|
+
if (!recognitionRef.current || disabled || effectiveSubmitting) {
|
|
4404
|
+
return [2 /*return*/];
|
|
4405
|
+
}
|
|
4406
|
+
setInternalErrorMessage(undefined);
|
|
4407
|
+
hasSubmittedVoiceFinalRef.current = false;
|
|
4408
|
+
_b.label = 1;
|
|
4409
|
+
case 1:
|
|
4410
|
+
_b.trys.push([1, 3,, 4]);
|
|
4411
|
+
recognitionRef.current.start();
|
|
4412
|
+
updateMachineState({
|
|
4413
|
+
type: 'MIC_START'
|
|
4414
|
+
});
|
|
4415
|
+
onVoiceStart === null || onVoiceStart === void 0 ? void 0 : onVoiceStart();
|
|
4416
|
+
clearNoSpeechTimeout();
|
|
4417
|
+
noSpeechTimeoutRef.current = window.setTimeout(onNoSpeechTimeout, noSpeechTimeoutMs);
|
|
4418
|
+
return [4 /*yield*/, startMeter()];
|
|
4419
|
+
case 2:
|
|
4420
|
+
_b.sent();
|
|
4421
|
+
return [3 /*break*/, 4];
|
|
4422
|
+
case 3:
|
|
4423
|
+
_b.sent();
|
|
4424
|
+
emitVoiceError('unknown');
|
|
4425
|
+
return [3 /*break*/, 4];
|
|
4426
|
+
case 4:
|
|
4427
|
+
return [2 /*return*/];
|
|
4428
|
+
}
|
|
4429
|
+
});
|
|
4430
|
+
});
|
|
4431
|
+
}, [clearNoSpeechTimeout, disabled, effectiveSubmitting, emitVoiceError, noSpeechTimeoutMs, onNoSpeechTimeout, onVoiceStart, startMeter, updateMachineState]);
|
|
4432
|
+
React.useEffect(function () {
|
|
4433
|
+
var constructor = detectSpeechRecognitionConstructor(window);
|
|
4434
|
+
setVoiceSupported(Boolean(constructor));
|
|
4435
|
+
if (!enableVoice || !constructor) {
|
|
4436
|
+
return;
|
|
4437
|
+
}
|
|
4438
|
+
var recognition = new constructor();
|
|
4439
|
+
recognition.lang = voiceLanguage;
|
|
4440
|
+
recognition.interimResults = true;
|
|
4441
|
+
recognition.continuous = false;
|
|
4442
|
+
recognition.onresult = function (event) {
|
|
4443
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4444
|
+
var interim, finalText, index, result, normalizedInterim, normalizedFinal;
|
|
4445
|
+
return __generator(this, function (_a) {
|
|
4446
|
+
switch (_a.label) {
|
|
4447
|
+
case 0:
|
|
4448
|
+
clearNoSpeechTimeout();
|
|
4449
|
+
noSpeechTimeoutRef.current = window.setTimeout(onNoSpeechTimeout, noSpeechTimeoutMs);
|
|
4450
|
+
interim = '';
|
|
4451
|
+
finalText = '';
|
|
4452
|
+
for (index = event.resultIndex; index < event.results.length; index += 1) {
|
|
4453
|
+
result = event.results[index];
|
|
4454
|
+
if (!result || !result[0]) continue;
|
|
4455
|
+
if (result.isFinal) {
|
|
4456
|
+
finalText += " ".concat(result[0].transcript);
|
|
4457
|
+
} else {
|
|
4458
|
+
interim += " ".concat(result[0].transcript);
|
|
4459
|
+
}
|
|
4460
|
+
}
|
|
4461
|
+
normalizedInterim = normalizeTranscript(interim);
|
|
4462
|
+
setInterimTranscript(normalizedInterim);
|
|
4463
|
+
updateMachineState({
|
|
4464
|
+
type: 'VOICE_INTERIM'
|
|
4465
|
+
});
|
|
4466
|
+
if (normalizedInterim) {
|
|
4467
|
+
onVoiceInterim === null || onVoiceInterim === void 0 ? void 0 : onVoiceInterim(normalizedInterim);
|
|
4468
|
+
}
|
|
4469
|
+
normalizedFinal = normalizeTranscript(finalText);
|
|
4470
|
+
if (!normalizedFinal || hasSubmittedVoiceFinalRef.current) {
|
|
4471
|
+
return [2 /*return*/];
|
|
4472
|
+
}
|
|
4473
|
+
hasSubmittedVoiceFinalRef.current = true;
|
|
4474
|
+
updateMachineState({
|
|
4475
|
+
type: 'VOICE_FINAL'
|
|
4476
|
+
});
|
|
4477
|
+
setInterimTranscript('');
|
|
4478
|
+
onVoiceFinal === null || onVoiceFinal === void 0 ? void 0 : onVoiceFinal(normalizedFinal);
|
|
4479
|
+
return [4 /*yield*/, stopMeter()];
|
|
4480
|
+
case 1:
|
|
4481
|
+
_a.sent();
|
|
4482
|
+
if (!autoSubmitOnVoiceFinal) return [3 /*break*/, 3];
|
|
4483
|
+
return [4 /*yield*/, submitPayload(normalizedFinal, 'voice-final')];
|
|
4484
|
+
case 2:
|
|
4485
|
+
_a.sent();
|
|
4486
|
+
return [3 /*break*/, 4];
|
|
4487
|
+
case 3:
|
|
4488
|
+
updateValue(normalizedFinal);
|
|
4489
|
+
_a.label = 4;
|
|
4490
|
+
case 4:
|
|
4491
|
+
return [2 /*return*/];
|
|
4492
|
+
}
|
|
4493
|
+
});
|
|
4494
|
+
});
|
|
4495
|
+
};
|
|
4496
|
+
recognition.onerror = function (event) {
|
|
4497
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4498
|
+
var mappedCode;
|
|
4499
|
+
return __generator(this, function (_a) {
|
|
4500
|
+
switch (_a.label) {
|
|
4501
|
+
case 0:
|
|
4502
|
+
mappedCode = mapSpeechErrorCode(event.error);
|
|
4503
|
+
emitVoiceError(mappedCode);
|
|
4504
|
+
return [4 /*yield*/, stopListening(true, true)];
|
|
4505
|
+
case 1:
|
|
4506
|
+
_a.sent();
|
|
4507
|
+
return [2 /*return*/];
|
|
4508
|
+
}
|
|
4509
|
+
});
|
|
4510
|
+
});
|
|
4511
|
+
};
|
|
4512
|
+
recognition.onend = function () {
|
|
4513
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4514
|
+
return __generator(this, function (_a) {
|
|
4515
|
+
switch (_a.label) {
|
|
4516
|
+
case 0:
|
|
4517
|
+
if (isStoppingRef.current) return [2 /*return*/];
|
|
4518
|
+
clearNoSpeechTimeout();
|
|
4519
|
+
return [4 /*yield*/, stopMeter()];
|
|
4520
|
+
case 1:
|
|
4521
|
+
_a.sent();
|
|
4522
|
+
if (!hasSubmittedVoiceFinalRef.current) {
|
|
4523
|
+
updateMachineState({
|
|
4524
|
+
type: 'MIC_STOP',
|
|
4525
|
+
hasText: hasText
|
|
4526
|
+
});
|
|
4527
|
+
}
|
|
4528
|
+
return [2 /*return*/];
|
|
4529
|
+
}
|
|
4530
|
+
});
|
|
4531
|
+
});
|
|
4532
|
+
};
|
|
4533
|
+
recognitionRef.current = recognition;
|
|
4534
|
+
return function () {
|
|
4535
|
+
var _a;
|
|
4536
|
+
clearNoSpeechTimeout();
|
|
4537
|
+
(_a = recognitionRef.current) === null || _a === void 0 ? void 0 : _a.abort();
|
|
4538
|
+
recognitionRef.current = null;
|
|
4539
|
+
stopMeter();
|
|
4540
|
+
};
|
|
4541
|
+
}, [autoSubmitOnVoiceFinal, clearNoSpeechTimeout, emitVoiceError, enableVoice, hasText, noSpeechTimeoutMs, onNoSpeechTimeout, onVoiceFinal, onVoiceInterim, stopListening, stopMeter, submitPayload, updateMachineState, updateValue, voiceLanguage]);
|
|
4542
|
+
React.useEffect(function () {
|
|
4543
|
+
var mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
4544
|
+
var sync = function sync() {
|
|
4545
|
+
return setPrefersReducedMotion(mediaQuery.matches);
|
|
4546
|
+
};
|
|
4547
|
+
sync();
|
|
4548
|
+
mediaQuery.addEventListener('change', sync);
|
|
4549
|
+
return function () {
|
|
4550
|
+
return mediaQuery.removeEventListener('change', sync);
|
|
4551
|
+
};
|
|
4552
|
+
}, []);
|
|
4553
|
+
React.useEffect(function () {
|
|
4554
|
+
if (effectiveState === 'error' && !internalErrorMessage && !errorMessage) {
|
|
4555
|
+
updateMachineState({
|
|
4556
|
+
type: 'RESET_ERROR',
|
|
4557
|
+
hasText: hasText
|
|
4558
|
+
});
|
|
4559
|
+
}
|
|
4560
|
+
}, [effectiveState, errorMessage, hasText, internalErrorMessage, updateMachineState]);
|
|
4561
|
+
React.useEffect(function () {
|
|
4562
|
+
if (!disabled && (machineState === 'idle' || machineState === 'typing')) {
|
|
4563
|
+
updateMachineState({
|
|
4564
|
+
type: 'INPUT_CHANGE',
|
|
4565
|
+
hasText: hasText
|
|
4566
|
+
});
|
|
4567
|
+
}
|
|
4568
|
+
}, [disabled, hasText, machineState, updateMachineState]);
|
|
4569
|
+
var displayedValue = React.useMemo(function () {
|
|
4570
|
+
if (!interimTranscript) {
|
|
4571
|
+
return currentValue;
|
|
4572
|
+
}
|
|
4573
|
+
return normalizeTranscript([currentValue, interimTranscript].filter(Boolean).join(' '));
|
|
4574
|
+
}, [currentValue, interimTranscript]);
|
|
4575
|
+
var onTextChange = function onTextChange(event) {
|
|
4576
|
+
updateValue(event.target.value);
|
|
4577
|
+
if (effectiveState === 'error') {
|
|
4578
|
+
setInternalErrorMessage(undefined);
|
|
4579
|
+
updateMachineState({
|
|
4580
|
+
type: 'RESET_ERROR',
|
|
4581
|
+
hasText: normalizeTranscript(event.target.value).length > 0
|
|
4582
|
+
});
|
|
4583
|
+
}
|
|
4584
|
+
};
|
|
4585
|
+
var onInputKeyDown = function onInputKeyDown(event) {
|
|
4586
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4587
|
+
return __generator(this, function (_a) {
|
|
4588
|
+
switch (_a.label) {
|
|
4589
|
+
case 0:
|
|
4590
|
+
if (!(event.key === 'Escape' && isListening)) return [3 /*break*/, 2];
|
|
4591
|
+
event.preventDefault();
|
|
4592
|
+
return [4 /*yield*/, stopListening(true)];
|
|
4593
|
+
case 1:
|
|
4594
|
+
_a.sent();
|
|
4595
|
+
return [2 /*return*/];
|
|
4596
|
+
case 2:
|
|
4597
|
+
if (!(event.key === 'Enter')) return [3 /*break*/, 4];
|
|
4598
|
+
event.preventDefault();
|
|
4599
|
+
return [4 /*yield*/, submitPayload(currentValue, 'text')];
|
|
4600
|
+
case 3:
|
|
4601
|
+
_a.sent();
|
|
4602
|
+
_a.label = 4;
|
|
4603
|
+
case 4:
|
|
4604
|
+
return [2 /*return*/];
|
|
4605
|
+
}
|
|
4606
|
+
});
|
|
4607
|
+
});
|
|
4608
|
+
};
|
|
4609
|
+
var onMicToggle = function onMicToggle() {
|
|
4610
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4611
|
+
return __generator(this, function (_a) {
|
|
4612
|
+
switch (_a.label) {
|
|
4613
|
+
case 0:
|
|
4614
|
+
if (!hasVoice) return [2 /*return*/];
|
|
4615
|
+
if (!isListening) return [3 /*break*/, 2];
|
|
4616
|
+
return [4 /*yield*/, stopListening(true)];
|
|
4617
|
+
case 1:
|
|
4618
|
+
_a.sent();
|
|
4619
|
+
return [2 /*return*/];
|
|
4620
|
+
case 2:
|
|
4621
|
+
return [4 /*yield*/, beginListening()];
|
|
4622
|
+
case 3:
|
|
4623
|
+
_a.sent();
|
|
4624
|
+
return [2 /*return*/];
|
|
4625
|
+
}
|
|
4626
|
+
});
|
|
4627
|
+
});
|
|
4628
|
+
};
|
|
4629
|
+
var statusByState = {
|
|
4630
|
+
idle: statusMessage || DEFAULT_IDLE_HELPER,
|
|
4631
|
+
typing: statusMessage || DEFAULT_IDLE_HELPER,
|
|
4632
|
+
listening: statusMessage || DEFAULT_LISTENING_MESSAGE,
|
|
4633
|
+
processingFinalTranscript: statusMessage || DEFAULT_PROCESSING_MESSAGE,
|
|
4634
|
+
submitting: statusMessage || 'Submitting…',
|
|
4635
|
+
error: errorMessage || internalErrorMessage || 'Voice input failed. Try again.',
|
|
4636
|
+
disabled: statusMessage || DEFAULT_IDLE_HELPER
|
|
4637
|
+
};
|
|
4638
|
+
var unsupportedMessage = defaultVoiceErrorMessage('not-supported');
|
|
4639
|
+
var shouldShowUnsupported = enableVoice && !hasVoice;
|
|
4640
|
+
var resolvedStatus = shouldShowUnsupported ? unsupportedMessage : statusByState[effectiveState];
|
|
4641
|
+
var isStatusError = effectiveState === 'error' || shouldShowUnsupported;
|
|
4642
|
+
var meterBars = createMeterBars(meterLevel);
|
|
4643
|
+
var sendDisabled = disabled || effectiveSubmitting || normalizeTranscript(currentValue).length === 0;
|
|
4644
|
+
return jsxRuntime.jsxs(Container, {
|
|
4645
|
+
"data-testid": dataTestId,
|
|
4646
|
+
children: [jsxRuntime.jsx(VisuallyHiddenLabel, {
|
|
4647
|
+
htmlFor: inputId,
|
|
4648
|
+
children: label
|
|
4649
|
+
}), jsxRuntime.jsx(ControlsRow, {
|
|
4650
|
+
children: jsxRuntime.jsx(InputWrapper, {
|
|
4651
|
+
children: jsxRuntime.jsxs(InputShell, {
|
|
4652
|
+
"data-disabled": disabled || effectiveSubmitting,
|
|
4653
|
+
children: [jsxRuntime.jsx(Input, {
|
|
4654
|
+
id: inputId,
|
|
4655
|
+
type: "text",
|
|
4656
|
+
"aria-label": label,
|
|
4657
|
+
value: displayedValue,
|
|
4658
|
+
onChange: onTextChange,
|
|
4659
|
+
onKeyDown: onInputKeyDown,
|
|
4660
|
+
placeholder: placeholder,
|
|
4661
|
+
disabled: disabled || effectiveSubmitting,
|
|
4662
|
+
readOnly: isListening,
|
|
4663
|
+
"aria-describedby": statusId
|
|
4664
|
+
}), jsxRuntime.jsxs(InputActions, {
|
|
4665
|
+
children: [hasVoice && jsxRuntime.jsx(MicButtonWrapper, {
|
|
4666
|
+
"$isListening": isListening,
|
|
4667
|
+
"$reducedMotion": prefersReducedMotion,
|
|
4668
|
+
children: jsxRuntime.jsx(CircularActionIconButton, {
|
|
4669
|
+
variant: "naked",
|
|
4670
|
+
size: "medium",
|
|
4671
|
+
iconName: 'mic',
|
|
4672
|
+
onClick: onMicToggle,
|
|
4673
|
+
"aria-pressed": isListening,
|
|
4674
|
+
"aria-label": isListening ? 'Stop voice input' : 'Start voice input',
|
|
4675
|
+
disabled: disabled || effectiveSubmitting,
|
|
4676
|
+
type: "button"
|
|
4677
|
+
})
|
|
4678
|
+
}), jsxRuntime.jsx(CircularActionIconButton, {
|
|
4679
|
+
variant: "secondary",
|
|
4680
|
+
size: "medium",
|
|
4681
|
+
iconName: "directionUp",
|
|
4682
|
+
onClick: function onClick() {
|
|
4683
|
+
return submitPayload(currentValue, 'text');
|
|
4684
|
+
},
|
|
4685
|
+
disabled: sendDisabled,
|
|
4686
|
+
"aria-label": "Send message",
|
|
4687
|
+
type: "button"
|
|
4688
|
+
})]
|
|
4689
|
+
})]
|
|
4690
|
+
})
|
|
4691
|
+
})
|
|
4692
|
+
}), jsxRuntime.jsxs(StatusRow, {
|
|
4693
|
+
children: [jsxRuntime.jsx(StatusText, {
|
|
4694
|
+
"$isError": isStatusError,
|
|
4695
|
+
children: jsxRuntime.jsx(StatusAnnouncement, {
|
|
4696
|
+
id: statusId,
|
|
4697
|
+
role: "status",
|
|
4698
|
+
"aria-live": "polite",
|
|
4699
|
+
"aria-atomic": "true",
|
|
4700
|
+
children: jsxRuntime.jsx(Typography, {
|
|
4701
|
+
variant: "small",
|
|
4702
|
+
children: resolvedStatus
|
|
4703
|
+
})
|
|
4704
|
+
})
|
|
4705
|
+
}), isListening && !prefersReducedMotion && jsxRuntime.jsx(MeterContainer, {
|
|
4706
|
+
"aria-hidden": "true",
|
|
4707
|
+
children: meterBars.map(function (barHeight, index) {
|
|
4708
|
+
return jsxRuntime.jsx(MeterBar, {
|
|
4709
|
+
"$height": barHeight
|
|
4710
|
+
}, "meter-".concat(index));
|
|
4711
|
+
})
|
|
4712
|
+
})]
|
|
4713
|
+
})]
|
|
4714
|
+
});
|
|
4715
|
+
};
|
|
4716
|
+
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, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15$1, templateObject_16$1;
|
|
3900
4717
|
|
|
3901
4718
|
var semantic$9 = tokensData.semantic,
|
|
3902
4719
|
base$7 = tokensData.base;
|
|
@@ -4065,7 +4882,7 @@ var isInternalUrl = function isInternalUrl(url) {
|
|
|
4065
4882
|
var Breadcrumbs = function Breadcrumbs(_a) {
|
|
4066
4883
|
var breadcrumbs = _a.breadcrumbs,
|
|
4067
4884
|
LinkComponent = _a.linkComponent;
|
|
4068
|
-
return jsxRuntime.jsx(Container, {
|
|
4885
|
+
return jsxRuntime.jsx(Container$1, {
|
|
4069
4886
|
children: jsxRuntime.jsx(BreadcrumbNavStyled, {
|
|
4070
4887
|
"aria-label": "breadcrumb",
|
|
4071
4888
|
children: jsxRuntime.jsx("ol", {
|
|
@@ -7380,6 +8197,7 @@ var tokens = tokensData;
|
|
|
7380
8197
|
|
|
7381
8198
|
exports.AccountCard = AccountCard;
|
|
7382
8199
|
exports.ActionSheet = ActionSheet;
|
|
8200
|
+
exports.AgentInput = AgentInput;
|
|
7383
8201
|
exports.Alert = Alert;
|
|
7384
8202
|
exports.Avatar = Avatar;
|
|
7385
8203
|
exports.Badge = Badge;
|
|
@@ -7394,7 +8212,7 @@ exports.Checkbox = Checkbox;
|
|
|
7394
8212
|
exports.Chip = Chip;
|
|
7395
8213
|
exports.ChipGroup = ChipGroup;
|
|
7396
8214
|
exports.CodeBlock = CodeBlock;
|
|
7397
|
-
exports.Container = Container;
|
|
8215
|
+
exports.Container = Container$1;
|
|
7398
8216
|
exports.DateFormatter = DateFormatter;
|
|
7399
8217
|
exports.DateGroup = DateGroup;
|
|
7400
8218
|
exports.Divider = Divider;
|