@common-origin/design-system 2.15.0 → 2.17.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/README.md +1 -1
- package/dist/client.esm.js +949 -649
- package/dist/client.esm.js.map +1 -1
- package/dist/client.js +951 -647
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Button/Button.d.ts +13 -1
- package/dist/components/atoms/CategoryBadge/CategoryBadge.d.ts +12 -52
- package/dist/components/atoms/CategoryBadge/index.d.ts +1 -1
- package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +69 -0
- package/dist/components/atoms/CategoryLabel/index.d.ts +2 -0
- package/dist/components/atoms/Chip/BooleanChip.d.ts +6 -1
- package/dist/components/atoms/Chip/Chip.d.ts +17 -12
- package/dist/components/atoms/Chip/FilterChip.d.ts +10 -24
- package/dist/components/atoms/Chip/InputChip.d.ts +27 -0
- package/dist/components/atoms/Chip/index.d.ts +1 -0
- package/dist/components/atoms/Chip/shared/types.d.ts +15 -1
- package/dist/components/atoms/Chip/shared/utils.d.ts +1 -85
- package/dist/components/atoms/DateFormatter/DateFormatter.d.ts +11 -1
- package/dist/components/atoms/Icon/Icon.d.ts +11 -0
- package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +9 -55
- package/dist/components/atoms/StatusBadge/index.d.ts +1 -1
- package/dist/components/atoms/StatusLabel/StatusLabel.d.ts +17 -0
- package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +49 -0
- package/dist/components/atoms/StatusLabel/index.d.ts +2 -0
- package/dist/components/atoms/Tag/Tag.d.ts +5 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/molecules/Alert/Alert.d.ts +15 -2
- package/dist/components/molecules/DateGroup/DateGroup.d.ts +4 -1
- package/dist/components/molecules/InlineAlert/InlineAlert.d.ts +54 -0
- package/dist/components/molecules/InlineAlert/index.d.ts +2 -0
- package/dist/components/molecules/List/List.d.ts +3 -2
- package/dist/components/molecules/List/ListContext.d.ts +6 -0
- package/dist/components/molecules/List/ListItem.d.ts +5 -4
- package/dist/components/molecules/Modal/Modal.d.ts +6 -2
- package/dist/components/molecules/TabBar/TabBar.d.ts +8 -5
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/data.esm.js +89 -11
- package/dist/data.esm.js.map +1 -1
- package/dist/data.js +89 -11
- package/dist/data.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/tokens.json +89 -11
- package/dist/tokens/index.esm.js +89 -11
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +89 -11
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/types/tokens.d.ts +81 -3
- package/dist/tokens.css +769 -0
- package/dist/tokens.css.d.ts +4 -0
- package/dist/types/tokens.d.ts +81 -3
- package/package.json +18 -6
package/dist/client.js
CHANGED
|
@@ -111,44 +111,44 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
// Destructure tokens
|
|
114
|
-
var semantic$
|
|
114
|
+
var semantic$j = data.tokensJson.semantic;
|
|
115
115
|
var initials = data.tokensJson.component.avatar.initials;
|
|
116
|
-
var color$
|
|
117
|
-
size$
|
|
118
|
-
border$
|
|
119
|
-
var radius$5 = border$
|
|
116
|
+
var color$b = semantic$j.color,
|
|
117
|
+
size$2 = semantic$j.size,
|
|
118
|
+
border$b = semantic$j.border;
|
|
119
|
+
var radius$5 = border$b.radius;
|
|
120
120
|
var AvatarContainer = styled__default.default.div.withConfig({
|
|
121
121
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
122
122
|
return !prop.startsWith('$');
|
|
123
123
|
},
|
|
124
124
|
displayName: "Avatar__AvatarContainer",
|
|
125
125
|
componentId: "sc-ezn4ax-0"
|
|
126
|
-
})(templateObject_1$
|
|
126
|
+
})(templateObject_1$M || (templateObject_1$M = __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) {
|
|
127
127
|
var $size = _a.$size;
|
|
128
|
-
return size$
|
|
128
|
+
return size$2.avatar[$size];
|
|
129
129
|
}, function (_a) {
|
|
130
130
|
var $size = _a.$size;
|
|
131
|
-
return size$
|
|
132
|
-
}, radius$5.circle, color$
|
|
131
|
+
return size$2.avatar[$size];
|
|
132
|
+
}, radius$5.circle, color$b.background.surface);
|
|
133
133
|
var AvatarImage = styled__default.default.img.withConfig({
|
|
134
134
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
135
135
|
return !prop.startsWith('$');
|
|
136
136
|
},
|
|
137
137
|
displayName: "Avatar__AvatarImage",
|
|
138
138
|
componentId: "sc-ezn4ax-1"
|
|
139
|
-
})(templateObject_2$
|
|
139
|
+
})(templateObject_2$y || (templateObject_2$y = __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$5.circle);
|
|
140
140
|
var AvatarInitials = styled__default.default.span.withConfig({
|
|
141
141
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
142
142
|
return !prop.startsWith('$');
|
|
143
143
|
},
|
|
144
144
|
displayName: "Avatar__AvatarInitials",
|
|
145
145
|
componentId: "sc-ezn4ax-2"
|
|
146
|
-
})(templateObject_3$
|
|
146
|
+
})(templateObject_3$v || (templateObject_3$v = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: ", ";\n text-transform: uppercase;\n user-select: none;\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: ", ";\n text-transform: uppercase;\n user-select: none;\n"
|
|
147
147
|
// Helper function to get initials from name
|
|
148
148
|
])), initials.fontFamily, initials.fontWeight, function (_a) {
|
|
149
149
|
var $size = _a.$size;
|
|
150
150
|
return initials.fontSize[$size];
|
|
151
|
-
}, color$
|
|
151
|
+
}, color$b.text["default"], initials.lineHeight);
|
|
152
152
|
// Helper function to get initials from name
|
|
153
153
|
var getInitials = function getInitials(name) {
|
|
154
154
|
return name.split(' ').map(function (word) {
|
|
@@ -202,7 +202,7 @@ var Avatar = function Avatar(_a) {
|
|
|
202
202
|
})
|
|
203
203
|
}));
|
|
204
204
|
};
|
|
205
|
-
var templateObject_1$
|
|
205
|
+
var templateObject_1$M, templateObject_2$y, templateObject_3$v;
|
|
206
206
|
|
|
207
207
|
// Breakpoints from the semantic tokens (decision 0014)
|
|
208
208
|
var breakpoints$1 = {
|
|
@@ -227,7 +227,7 @@ var media$1 = {
|
|
|
227
227
|
var reducedMotion = '@media (prefers-reduced-motion: reduce)';
|
|
228
228
|
// No `from` keyframe: the fade starts from the element's current opacity, including a
|
|
229
229
|
// still-running entrance, so closing mid-entrance doesn't jump back to fully visible.
|
|
230
|
-
var fadeOut$1 = styled.keyframes(templateObject_1$
|
|
230
|
+
var fadeOut$1 = styled.keyframes(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n to { opacity: 0; }\n"], ["\n to { opacity: 0; }\n"
|
|
231
231
|
// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of
|
|
232
232
|
// the element's `animation` declarations while it exits: the entrance stays in the list,
|
|
233
233
|
// so it isn't restarted, and the fade runs on top of it. A fade is already the
|
|
@@ -239,51 +239,51 @@ var fadeOut$1 = styled.keyframes(templateObject_1$K || (templateObject_1$K = __m
|
|
|
239
239
|
// so it isn't restarted, and the fade runs on top of it. A fade is already the
|
|
240
240
|
// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop
|
|
241
241
|
// still catches clicks (so they can't reach the page behind it) and the panel is inert.
|
|
242
|
-
var exitAnimation = styled.css(templateObject_2$
|
|
242
|
+
var exitAnimation = styled.css(templateObject_2$x || (templateObject_2$x = __makeTemplateObject([", ", " ", " ", " forwards"], [", ", " ", " ", " forwards"
|
|
243
243
|
// Content for screen readers only. The 1px size and -1px margin are part of the standard
|
|
244
244
|
// visually-hidden technique, not design values, so they aren't tokens.
|
|
245
245
|
])), fadeOut$1, data.tokensJson.semantic.motion.duration.fast, data.tokensJson.semantic.motion.easing.easeOut);
|
|
246
246
|
// Content for screen readers only. The 1px size and -1px margin are part of the standard
|
|
247
247
|
// visually-hidden technique, not design values, so they aren't tokens.
|
|
248
|
-
var visuallyHidden = styled.css(templateObject_3$
|
|
249
|
-
var templateObject_1$
|
|
248
|
+
var visuallyHidden = styled.css(templateObject_3$u || (templateObject_3$u = __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"])));
|
|
249
|
+
var templateObject_1$L, templateObject_2$x, templateObject_3$u;
|
|
250
250
|
|
|
251
251
|
var _a$b = data.tokensJson.semantic,
|
|
252
|
-
typography$
|
|
253
|
-
color$
|
|
252
|
+
typography$2 = _a$b.typography,
|
|
253
|
+
color$a = _a$b.color,
|
|
254
254
|
letterSpacing = _a$b.letterSpacing;
|
|
255
255
|
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
256
256
|
var styles = {
|
|
257
|
-
display: "font: ".concat(typography$
|
|
258
|
-
h1: "font: ".concat(typography$
|
|
259
|
-
h2: "font: ".concat(typography$
|
|
260
|
-
h3: "font: ".concat(typography$
|
|
261
|
-
h4: "font: ".concat(typography$
|
|
262
|
-
h5: "font: ".concat(typography$
|
|
263
|
-
h6: "font: ".concat(typography$
|
|
264
|
-
subtitle: "font: ".concat(typography$
|
|
265
|
-
body: "font: ".concat(typography$
|
|
266
|
-
small: "font: ".concat(typography$
|
|
267
|
-
overline: "font: ".concat(typography$
|
|
268
|
-
caption: "font: ".concat(typography$
|
|
269
|
-
button1: "font: ".concat(typography$
|
|
270
|
-
button2: "font: ".concat(typography$
|
|
271
|
-
button3: "font: ".concat(typography$
|
|
272
|
-
label: "font: ".concat(typography$
|
|
257
|
+
display: "font: ".concat(typography$2.display, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
258
|
+
h1: "font: ".concat(typography$2.h1, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
259
|
+
h2: "font: ".concat(typography$2.h2, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
260
|
+
h3: "font: ".concat(typography$2.h3, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
261
|
+
h4: "font: ".concat(typography$2.h4, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
262
|
+
h5: "font: ".concat(typography$2.h5, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
263
|
+
h6: "font: ".concat(typography$2.h6, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
264
|
+
subtitle: "font: ".concat(typography$2.subtitle, ";"),
|
|
265
|
+
body: "font: ".concat(typography$2.body, ";"),
|
|
266
|
+
small: "font: ".concat(typography$2.small, ";"),
|
|
267
|
+
overline: "font: ".concat(typography$2.overline, ";"),
|
|
268
|
+
caption: "font: ".concat(typography$2.caption, "; text-transform: uppercase;"),
|
|
269
|
+
button1: "font: ".concat(typography$2.button1, ";"),
|
|
270
|
+
button2: "font: ".concat(typography$2.button2, ";"),
|
|
271
|
+
button3: "font: ".concat(typography$2.button3, ";"),
|
|
272
|
+
label: "font: ".concat(typography$2.label, ";")
|
|
273
273
|
};
|
|
274
274
|
return styles[variant] || styles.body;
|
|
275
275
|
};
|
|
276
276
|
var getTextColor = function getTextColor(colorVariant) {
|
|
277
277
|
var colorMap = {
|
|
278
|
-
"default": color$
|
|
279
|
-
emphasis: color$
|
|
280
|
-
subdued: color$
|
|
281
|
-
inverse: color$
|
|
282
|
-
disabled: color$
|
|
283
|
-
interactive: color$
|
|
284
|
-
error: color$
|
|
285
|
-
success: color$
|
|
286
|
-
warning: color$
|
|
278
|
+
"default": color$a.text["default"],
|
|
279
|
+
emphasis: color$a.text.emphasis,
|
|
280
|
+
subdued: color$a.text.subdued,
|
|
281
|
+
inverse: color$a.text.inverse,
|
|
282
|
+
disabled: color$a.text.disabled,
|
|
283
|
+
interactive: color$a.text.interactive,
|
|
284
|
+
error: color$a.text.error,
|
|
285
|
+
success: color$a.text.success,
|
|
286
|
+
warning: color$a.text.warning
|
|
287
287
|
};
|
|
288
288
|
return colorMap[colorVariant] || colorMap["default"];
|
|
289
289
|
};
|
|
@@ -314,7 +314,7 @@ var StyledTypography = styled__default.default.span.withConfig({
|
|
|
314
314
|
},
|
|
315
315
|
displayName: "Typography__StyledTypography",
|
|
316
316
|
componentId: "sc-17mqo4k-0"
|
|
317
|
-
})(templateObject_1$
|
|
317
|
+
})(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n"], ["\n ", "\n color: ", ";\n margin: 0;\n"
|
|
318
318
|
/**
|
|
319
319
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
320
320
|
*
|
|
@@ -376,53 +376,53 @@ var Typography = function Typography(_a) {
|
|
|
376
376
|
children: children
|
|
377
377
|
});
|
|
378
378
|
};
|
|
379
|
-
var templateObject_1$
|
|
379
|
+
var templateObject_1$K;
|
|
380
380
|
|
|
381
|
-
var semantic$
|
|
382
|
-
var color$
|
|
383
|
-
border$
|
|
384
|
-
var radius$4 = border$
|
|
381
|
+
var semantic$i = data.tokensJson.semantic;
|
|
382
|
+
var color$9 = semantic$i.color,
|
|
383
|
+
border$a = semantic$i.border;
|
|
384
|
+
var radius$4 = border$a.radius;
|
|
385
385
|
var _a$a = data.tokensJson.component.badge,
|
|
386
386
|
dot = _a$a.dot,
|
|
387
387
|
count = _a$a.count,
|
|
388
388
|
ring = _a$a.ring;
|
|
389
|
-
var scaleIn$2 = styled.keyframes(templateObject_1$
|
|
389
|
+
var scaleIn$2 = styled.keyframes(templateObject_1$J || (templateObject_1$J = __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"])));
|
|
390
390
|
var BadgeWrapper = styled__default.default.span.withConfig({
|
|
391
391
|
displayName: "Badge__BadgeWrapper",
|
|
392
392
|
componentId: "sc-tjz4pp-0"
|
|
393
|
-
})(templateObject_2$
|
|
393
|
+
})(templateObject_2$w || (templateObject_2$w = __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"])));
|
|
394
394
|
var BadgeIndicator = styled__default.default.span.withConfig({
|
|
395
395
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
396
396
|
return !prop.startsWith('$');
|
|
397
397
|
},
|
|
398
398
|
displayName: "Badge__BadgeIndicator",
|
|
399
399
|
componentId: "sc-tjz4pp-1"
|
|
400
|
-
})(templateObject_3$
|
|
400
|
+
})(templateObject_3$t || (templateObject_3$t = __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: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\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: ", ";\n white-space: nowrap;\n box-shadow: 0 0 0 ", " ", ";\n animation: ", " ", " ", ";\n\n ", " {\n animation: none;\n }\n \n ", "\n"])), function (props) {
|
|
401
401
|
return props.$isVisible ? 'flex' : 'none';
|
|
402
402
|
}, function (props) {
|
|
403
403
|
return props.$isDot ? dot.size : count.minWidth;
|
|
404
404
|
}, function (props) {
|
|
405
405
|
return props.$isDot ? dot.size : count.height;
|
|
406
406
|
}, function (props) {
|
|
407
|
-
return props.$isDot ? '0' : "0 ".concat(
|
|
408
|
-
}, radius$4.circle, count.lineHeight, ring.width, color$
|
|
407
|
+
return props.$isDot ? '0' : "0 ".concat(semantic$i.spacing.component.xs);
|
|
408
|
+
}, radius$4.circle, count.lineHeight, ring.width, color$9.background["default"], scaleIn$2, semantic$i.motion.duration.normal, semantic$i.motion.easing.easeOut, reducedMotion, function (props) {
|
|
409
409
|
switch (props.$variant) {
|
|
410
410
|
case 'primary':
|
|
411
|
-
return "\n background-color: ".concat(color$
|
|
411
|
+
return "\n background-color: ".concat(color$9.background.interactive, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
412
412
|
case 'error':
|
|
413
|
-
return "\n background-color: ".concat(color$
|
|
413
|
+
return "\n background-color: ".concat(color$9.background.error, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
414
414
|
case 'warning':
|
|
415
|
-
return "\n background-color: ".concat(color$
|
|
415
|
+
return "\n background-color: ".concat(color$9.background.warning, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
416
416
|
case 'success':
|
|
417
|
-
return "\n background-color: ".concat(color$
|
|
417
|
+
return "\n background-color: ".concat(color$9.background.success, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
418
418
|
default:
|
|
419
|
-
return "\n background-color: ".concat(color$
|
|
419
|
+
return "\n background-color: ".concat(color$9.background.emphasis, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
422
|
var ScreenReaderOnly$1 = styled__default.default.span.withConfig({
|
|
423
423
|
displayName: "Badge__ScreenReaderOnly",
|
|
424
424
|
componentId: "sc-tjz4pp-2"
|
|
425
|
-
})(templateObject_4$
|
|
425
|
+
})(templateObject_4$n || (templateObject_4$n = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
426
426
|
var Badge = function Badge(_a) {
|
|
427
427
|
var children = _a.children,
|
|
428
428
|
_b = _a.count,
|
|
@@ -460,7 +460,7 @@ var Badge = function Badge(_a) {
|
|
|
460
460
|
})]
|
|
461
461
|
});
|
|
462
462
|
};
|
|
463
|
-
var templateObject_1$
|
|
463
|
+
var templateObject_1$J, templateObject_2$w, templateObject_3$t, templateObject_4$n;
|
|
464
464
|
|
|
465
465
|
var StyledBox = styled__default.default.div.withConfig({
|
|
466
466
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -471,13 +471,13 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
471
471
|
})(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"
|
|
472
472
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
473
473
|
])), function (props) {
|
|
474
|
-
return props.$display && styled.css(templateObject_1$
|
|
474
|
+
return props.$display && styled.css(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
475
475
|
}, function (props) {
|
|
476
|
-
return props.$flexDirection && styled.css(templateObject_2$
|
|
476
|
+
return props.$flexDirection && styled.css(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
477
477
|
}, function (props) {
|
|
478
|
-
return props.$justifyContent && styled.css(templateObject_3$
|
|
478
|
+
return props.$justifyContent && styled.css(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
479
479
|
}, function (props) {
|
|
480
|
-
return props.$alignItems && styled.css(templateObject_4$
|
|
480
|
+
return props.$alignItems && styled.css(templateObject_4$m || (templateObject_4$m = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
481
481
|
}, function (props) {
|
|
482
482
|
return props.$flexWrap && styled.css(templateObject_5$h || (templateObject_5$h = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
483
483
|
}, function (props) {
|
|
@@ -495,7 +495,7 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
495
495
|
}, function (props) {
|
|
496
496
|
return props.$mx && styled.css(templateObject_12$4 || (templateObject_12$4 = __makeTemplateObject(["\n margin-left: ", ";\n margin-right: ", ";\n "], ["\n margin-left: ", ";\n margin-right: ", ";\n "])), data.tokensJson.semantic.spacing.layout[props.$mx], data.tokensJson.semantic.spacing.layout[props.$mx]);
|
|
497
497
|
}, function (props) {
|
|
498
|
-
return props.$my && styled.css(templateObject_13$
|
|
498
|
+
return props.$my && styled.css(templateObject_13$4 || (templateObject_13$4 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n "])), data.tokensJson.semantic.spacing.layout[props.$my], data.tokensJson.semantic.spacing.layout[props.$my]);
|
|
499
499
|
}, function (props) {
|
|
500
500
|
return props.$p && styled.css(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject(["padding: ", ";"], ["padding: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$p]);
|
|
501
501
|
}, function (props) {
|
|
@@ -695,7 +695,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
695
695
|
}));
|
|
696
696
|
};
|
|
697
697
|
var Box = BoxTransform;
|
|
698
|
-
var templateObject_1$
|
|
698
|
+
var templateObject_1$I, templateObject_2$v, templateObject_3$s, templateObject_4$m, templateObject_5$h, templateObject_6$d, templateObject_7$b, templateObject_8$8, templateObject_9$6, templateObject_10$4, templateObject_11$4, templateObject_12$4, templateObject_13$4, templateObject_14$2, templateObject_15$2, templateObject_16$2, templateObject_17$2, templateObject_18$2, 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;
|
|
699
699
|
|
|
700
700
|
var IconStyled = styled__default.default.span.withConfig({
|
|
701
701
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -703,7 +703,7 @@ var IconStyled = styled__default.default.span.withConfig({
|
|
|
703
703
|
},
|
|
704
704
|
displayName: "Icon__IconStyled",
|
|
705
705
|
componentId: "sc-1105czq-0"
|
|
706
|
-
})(templateObject_1$
|
|
706
|
+
})(templateObject_1$H || (templateObject_1$H = __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) {
|
|
707
707
|
var $size = _a.$size;
|
|
708
708
|
return data.tokensJson.semantic.size.icon[$size];
|
|
709
709
|
}, function (_a) {
|
|
@@ -742,7 +742,11 @@ var Icon = function Icon(_a) {
|
|
|
742
742
|
size = _b === void 0 ? 'lg' : _b,
|
|
743
743
|
_c = _a.iconColor,
|
|
744
744
|
iconColor = _c === void 0 ? 'default' : _c,
|
|
745
|
+
ariaLabel = _a["aria-label"],
|
|
746
|
+
title = _a.title,
|
|
745
747
|
dataTestId = _a["data-testid"];
|
|
748
|
+
// Decorative unless it's given a name. A blank name is no name, so the icon stays hidden
|
|
749
|
+
var label = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) || (title === null || title === void 0 ? void 0 : title.trim()) || undefined;
|
|
746
750
|
// Get the icon data from the JSON file
|
|
747
751
|
var iconData = data.iconsJson[name];
|
|
748
752
|
if (!iconData) {
|
|
@@ -757,24 +761,33 @@ var Icon = function Icon(_a) {
|
|
|
757
761
|
"$size": size,
|
|
758
762
|
"$iconColor": iconColor,
|
|
759
763
|
"data-testid": dataTestId,
|
|
760
|
-
children: jsxRuntime.
|
|
764
|
+
children: jsxRuntime.jsxs("svg", __assign({
|
|
761
765
|
viewBox: "0 0 24 24",
|
|
762
766
|
fill: "currentColor",
|
|
763
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
768
|
+
}, label ? {
|
|
769
|
+
role: 'img',
|
|
770
|
+
'aria-label': label
|
|
771
|
+
} : {
|
|
772
|
+
'aria-hidden': true,
|
|
773
|
+
focusable: false
|
|
774
|
+
}, {
|
|
775
|
+
children: [(title === null || title === void 0 ? void 0 : title.trim()) && jsxRuntime.jsx("title", {
|
|
776
|
+
children: title
|
|
777
|
+
}), jsxRuntime.jsx("path", {
|
|
767
778
|
d: iconData.path
|
|
768
|
-
})
|
|
769
|
-
})
|
|
779
|
+
})]
|
|
780
|
+
}))
|
|
770
781
|
});
|
|
771
782
|
};
|
|
772
|
-
var templateObject_1$
|
|
783
|
+
var templateObject_1$H;
|
|
773
784
|
|
|
774
785
|
var button$1 = data.tokensJson.component.button,
|
|
775
|
-
semantic$
|
|
786
|
+
semantic$h = data.tokensJson.semantic;
|
|
787
|
+
// Padding comes from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
788
|
+
var spacing$a = semantic$h.spacing.component;
|
|
776
789
|
// Base styles shared between button and link
|
|
777
|
-
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(data.tokensJson.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$
|
|
790
|
+
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(data.tokensJson.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$h.motion.hover, ";\n white-space: nowrap;\n user-select: none;\n \n &:focus {\n outline: ").concat(button$1.focus.outline, ";\n outline-offset: ").concat(semantic$h.border.focusOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n");
|
|
778
791
|
// Dynamic variant styles using component tokens
|
|
779
792
|
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
780
793
|
var $variant = _a.$variant;
|
|
@@ -803,6 +816,15 @@ var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
|
803
816
|
disabledBg: button$1.variants.naked.disabled.backgroundColor,
|
|
804
817
|
disabledText: button$1.variants.naked.disabled.textColor
|
|
805
818
|
},
|
|
819
|
+
accent: {
|
|
820
|
+
bg: button$1.variants.accent.backgroundColor,
|
|
821
|
+
text: button$1.variants.accent.textColor,
|
|
822
|
+
hoverBg: button$1.variants.accent.hover.backgroundColor,
|
|
823
|
+
activeBg: button$1.variants.accent.active.backgroundColor,
|
|
824
|
+
disabledBg: button$1.variants.accent.disabled.backgroundColor,
|
|
825
|
+
disabledText: button$1.variants.accent.disabled.textColor
|
|
826
|
+
},
|
|
827
|
+
// Deprecated alias for accent; removed in 3.0
|
|
806
828
|
emphasis: {
|
|
807
829
|
bg: button$1.variants.emphasis.backgroundColor,
|
|
808
830
|
text: button$1.variants.emphasis.textColor,
|
|
@@ -828,13 +850,13 @@ var getSizeStyles$1 = function getSizeStyles(_a) {
|
|
|
828
850
|
var $size = _a.$size;
|
|
829
851
|
switch ($size) {
|
|
830
852
|
case 'small':
|
|
831
|
-
return "\n font: ".concat(button$1.sizes.small.font, ";\n padding: ").concat(
|
|
853
|
+
return "\n font: ".concat(button$1.sizes.small.font, ";\n padding: ").concat(spacing$a.sm, " ").concat(spacing$a.md, ";\n ");
|
|
832
854
|
case 'medium':
|
|
833
|
-
return "\n font: ".concat(button$1.sizes.medium.font, ";\n padding: ").concat(
|
|
855
|
+
return "\n font: ".concat(button$1.sizes.medium.font, ";\n padding: ").concat(spacing$a.sm, " ").concat(spacing$a.lg, ";\n ");
|
|
834
856
|
case 'large':
|
|
835
|
-
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(
|
|
857
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(spacing$a.md, " ").concat(spacing$a.lg, ";\n ");
|
|
836
858
|
default:
|
|
837
|
-
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(
|
|
859
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(spacing$a.md, " ").concat(spacing$a.lg, ";\n ");
|
|
838
860
|
}
|
|
839
861
|
};
|
|
840
862
|
var StyledButton = styled__default.default.button.withConfig({
|
|
@@ -843,14 +865,14 @@ var StyledButton = styled__default.default.button.withConfig({
|
|
|
843
865
|
},
|
|
844
866
|
displayName: "Button__StyledButton",
|
|
845
867
|
componentId: "sc-1eiuum9-0"
|
|
846
|
-
})(templateObject_1$
|
|
868
|
+
})(templateObject_1$G || (templateObject_1$G = __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);
|
|
847
869
|
var StyledLink = styled__default.default.a.withConfig({
|
|
848
870
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
849
871
|
return !prop.startsWith('$');
|
|
850
872
|
},
|
|
851
873
|
displayName: "Button__StyledLink",
|
|
852
874
|
componentId: "sc-1eiuum9-1"
|
|
853
|
-
})(templateObject_2$
|
|
875
|
+
})(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
854
876
|
// Helper function to get icon size based on button size
|
|
855
877
|
])), baseButtonStyles, button$1.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
856
878
|
// Helper function to get icon size based on button size
|
|
@@ -953,49 +975,46 @@ var Button = function Button(_a) {
|
|
|
953
975
|
children: renderButtonContent(children, iconName, size)
|
|
954
976
|
}));
|
|
955
977
|
};
|
|
956
|
-
var templateObject_1$
|
|
978
|
+
var templateObject_1$G, templateObject_2$u;
|
|
957
979
|
|
|
958
|
-
var semantic$
|
|
959
|
-
var color$
|
|
960
|
-
border$
|
|
961
|
-
spacing$
|
|
980
|
+
var semantic$g = data.tokensJson.semantic;
|
|
981
|
+
var color$8 = semantic$g.color,
|
|
982
|
+
border$9 = semantic$g.border,
|
|
983
|
+
spacing$9 = semantic$g.spacing;
|
|
962
984
|
var label$2 = data.tokensJson.component.badge.label;
|
|
963
|
-
var category = color$
|
|
964
|
-
var radius$3 = border$
|
|
965
|
-
var layout$4 = spacing$
|
|
966
|
-
var
|
|
985
|
+
var category = color$8.category;
|
|
986
|
+
var radius$3 = border$9.radius;
|
|
987
|
+
var layout$4 = spacing$9.layout;
|
|
988
|
+
var labelHeight$1 = semantic$g.size.label;
|
|
989
|
+
// Text on white or the -subtle fill (outlined and minimal), at least 4.5:1 (#115)
|
|
990
|
+
var categoryText = {
|
|
991
|
+
blue: category['blue-text'],
|
|
992
|
+
purple: category['purple-text'],
|
|
993
|
+
pink: category['pink-text'],
|
|
994
|
+
yellow: category['yellow-text'],
|
|
995
|
+
green: category['green-text'],
|
|
996
|
+
red: category['red-text'],
|
|
997
|
+
orange: category['orange-text'],
|
|
998
|
+
gray: category['gray-text']
|
|
999
|
+
};
|
|
1000
|
+
var StyledCategoryLabel = styled__default.default.span.withConfig({
|
|
967
1001
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
968
1002
|
return !prop.startsWith('$');
|
|
969
1003
|
},
|
|
970
|
-
displayName: "
|
|
971
|
-
componentId: "sc-
|
|
972
|
-
})(templateObject_1$
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
* A static label for categorizing content with support for 8 color options,
|
|
977
|
-
* 3 visual variants, and optional icons. Perfect for categorizing
|
|
978
|
-
* financial transactions or content types.
|
|
979
|
-
*
|
|
980
|
-
* @example
|
|
981
|
-
* ```tsx
|
|
982
|
-
* <CategoryBadge color="orange" icon="restaurant">
|
|
983
|
-
* Food & Dining
|
|
984
|
-
* </CategoryBadge>
|
|
985
|
-
*
|
|
986
|
-
* <CategoryBadge color="blue" variant="outlined" size="small">
|
|
987
|
-
* Travel
|
|
988
|
-
* </CategoryBadge>
|
|
989
|
-
* ```
|
|
990
|
-
*/])), radius$3.circle, semantic$d.border.width.thin, function (_a) {
|
|
1004
|
+
displayName: "CategoryLabel__StyledCategoryLabel",
|
|
1005
|
+
componentId: "sc-1jx7bjo-0"
|
|
1006
|
+
})(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\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 /* After the font shorthand, which would otherwise reset it */\n font-weight: ", ";\n gap: ", ";\n \n /* Variant + Color styles */\n background-color: ", ";\n \n /* Outlined and minimal text uses the AA text token, not the base colour (issue 115) */\n color: ", ";\n \n border-color: ", ";\n"], ["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\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 /* After the font shorthand, which would otherwise reset it */\n font-weight: ", ";\n gap: ", ";\n \n /* Variant + Color styles */\n background-color: ", ";\n \n /* Outlined and minimal text uses the AA text token, not the base colour (issue 115) */\n color: ", ";\n \n border-color: ", ";\n"
|
|
1007
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
1008
|
+
// display: contents keeps the root's flex layout and gap.
|
|
1009
|
+
])), radius$3.circle, semantic$g.border.width.thin, function (_a) {
|
|
991
1010
|
var $size = _a.$size;
|
|
992
|
-
return $size
|
|
1011
|
+
return labelHeight$1[$size];
|
|
993
1012
|
}, function (_a) {
|
|
994
1013
|
var $size = _a.$size;
|
|
995
|
-
return $size === '
|
|
1014
|
+
return $size === 'medium' ? "".concat(layout$4.xs, " ").concat(layout$4.sm) : "".concat(layout$4.sm, " ").concat(layout$4.md);
|
|
996
1015
|
}, function (_a) {
|
|
997
1016
|
var $size = _a.$size;
|
|
998
|
-
return $size === '
|
|
1017
|
+
return $size === 'medium' ? label$2.typography.small : label$2.typography.medium;
|
|
999
1018
|
}, label$2.fontWeight, layout$4.xs, function (_a) {
|
|
1000
1019
|
var $color = _a.$color,
|
|
1001
1020
|
$variant = _a.$variant;
|
|
@@ -1011,9 +1030,9 @@ var StyledCategoryBadge = styled__default.default.span.withConfig({
|
|
|
1011
1030
|
var $color = _a.$color,
|
|
1012
1031
|
$variant = _a.$variant;
|
|
1013
1032
|
if ($variant === 'filled') {
|
|
1014
|
-
return color$
|
|
1033
|
+
return color$8.text.inverse;
|
|
1015
1034
|
}
|
|
1016
|
-
return
|
|
1035
|
+
return categoryText[$color];
|
|
1017
1036
|
}, function (_a) {
|
|
1018
1037
|
var $color = _a.$color,
|
|
1019
1038
|
$variant = _a.$variant;
|
|
@@ -1022,79 +1041,138 @@ var StyledCategoryBadge = styled__default.default.span.withConfig({
|
|
|
1022
1041
|
}
|
|
1023
1042
|
return 'transparent';
|
|
1024
1043
|
});
|
|
1044
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
1045
|
+
// display: contents keeps the root's flex layout and gap.
|
|
1046
|
+
var VisibleContent$1 = styled__default.default.span.withConfig({
|
|
1047
|
+
displayName: "CategoryLabel__VisibleContent",
|
|
1048
|
+
componentId: "sc-1jx7bjo-1"
|
|
1049
|
+
})(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
|
|
1050
|
+
var HiddenLabel = styled__default.default.span.withConfig({
|
|
1051
|
+
displayName: "CategoryLabel__HiddenLabel",
|
|
1052
|
+
componentId: "sc-1jx7bjo-2"
|
|
1053
|
+
})(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
1025
1054
|
/**
|
|
1026
|
-
*
|
|
1055
|
+
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1027
1056
|
*
|
|
1028
|
-
* A static label
|
|
1029
|
-
*
|
|
1030
|
-
* financial transactions or content types.
|
|
1057
|
+
* A static, chip-like label with 8 category colours, 3 visual variants and an optional icon.
|
|
1058
|
+
* Category colours carry no status meaning; for status use StatusLabel.
|
|
1031
1059
|
*
|
|
1032
1060
|
* @example
|
|
1033
1061
|
* ```tsx
|
|
1034
|
-
* <
|
|
1035
|
-
*
|
|
1036
|
-
* </
|
|
1062
|
+
* <CategoryLabel color="orange" icon="creditCard">
|
|
1063
|
+
* Shopping
|
|
1064
|
+
* </CategoryLabel>
|
|
1037
1065
|
*
|
|
1038
|
-
* <
|
|
1066
|
+
* <CategoryLabel color="blue" variant="outlined" size="medium">
|
|
1039
1067
|
* Travel
|
|
1040
|
-
* </
|
|
1068
|
+
* </CategoryLabel>
|
|
1069
|
+
* ```
|
|
1070
|
+
*/])), visuallyHidden);
|
|
1071
|
+
/**
|
|
1072
|
+
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1073
|
+
*
|
|
1074
|
+
* A static, chip-like label with 8 category colours, 3 visual variants and an optional icon.
|
|
1075
|
+
* Category colours carry no status meaning; for status use StatusLabel.
|
|
1076
|
+
*
|
|
1077
|
+
* @example
|
|
1078
|
+
* ```tsx
|
|
1079
|
+
* <CategoryLabel color="orange" icon="creditCard">
|
|
1080
|
+
* Shopping
|
|
1081
|
+
* </CategoryLabel>
|
|
1082
|
+
*
|
|
1083
|
+
* <CategoryLabel color="blue" variant="outlined" size="medium">
|
|
1084
|
+
* Travel
|
|
1085
|
+
* </CategoryLabel>
|
|
1041
1086
|
* ```
|
|
1042
1087
|
*/
|
|
1043
|
-
var
|
|
1088
|
+
var CategoryLabel = function CategoryLabel(_a) {
|
|
1044
1089
|
var children = _a.children,
|
|
1045
1090
|
_b = _a.color,
|
|
1046
1091
|
color = _b === void 0 ? 'blue' : _b,
|
|
1047
1092
|
_c = _a.variant,
|
|
1048
1093
|
variant = _c === void 0 ? 'filled' : _c,
|
|
1049
1094
|
_d = _a.size,
|
|
1050
|
-
size = _d === void 0 ? '
|
|
1095
|
+
size = _d === void 0 ? 'large' : _d,
|
|
1051
1096
|
icon = _a.icon,
|
|
1052
1097
|
dataTestId = _a["data-testid"],
|
|
1053
1098
|
ariaLabel = _a["aria-label"];
|
|
1054
|
-
var iconSize = size === '
|
|
1055
|
-
|
|
1099
|
+
var iconSize = size === 'medium' ? 'xs' : 'sm';
|
|
1100
|
+
// A blank aria-label is no label at all, so it falls back like a missing one
|
|
1101
|
+
var accessibleLabel = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
1102
|
+
return jsxRuntime.jsxs(StyledCategoryLabel, {
|
|
1056
1103
|
"$color": color,
|
|
1057
1104
|
"$variant": variant,
|
|
1058
1105
|
"$size": size,
|
|
1059
|
-
"aria-label": ariaLabel,
|
|
1060
1106
|
"data-testid": dataTestId,
|
|
1061
|
-
children: [
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1107
|
+
children: [jsxRuntime.jsxs(VisibleContent$1, {
|
|
1108
|
+
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
1109
|
+
children: [icon && jsxRuntime.jsx(Icon, {
|
|
1110
|
+
name: icon,
|
|
1111
|
+
size: iconSize,
|
|
1112
|
+
iconColor: variant === 'filled' ? 'inverse' : 'inherit'
|
|
1113
|
+
}), children]
|
|
1114
|
+
}), accessibleLabel && jsxRuntime.jsx(HiddenLabel, {
|
|
1115
|
+
children: accessibleLabel
|
|
1116
|
+
})]
|
|
1067
1117
|
});
|
|
1068
1118
|
};
|
|
1119
|
+
CategoryLabel.displayName = 'CategoryLabel';
|
|
1120
|
+
var templateObject_1$F, templateObject_2$t, templateObject_3$r;
|
|
1121
|
+
|
|
1122
|
+
// CategoryBadge sizes on the decision 0018 scale
|
|
1123
|
+
var toLabelSize = {
|
|
1124
|
+
small: 'medium',
|
|
1125
|
+
medium: 'large'
|
|
1126
|
+
};
|
|
1127
|
+
/**
|
|
1128
|
+
* CategoryBadge displays a category label.
|
|
1129
|
+
*
|
|
1130
|
+
* @deprecated Renamed to `CategoryLabel` (same `color` and `variant`). Map `size="small"` to
|
|
1131
|
+
* `"medium"`, and `size="medium"` (or no size) to `"large"`, CategoryLabel's default.
|
|
1132
|
+
* CategoryBadge is removed in 3.0 (decision 0018).
|
|
1133
|
+
*/
|
|
1134
|
+
var CategoryBadge = function CategoryBadge(_a) {
|
|
1135
|
+
var _b = _a.size,
|
|
1136
|
+
size = _b === void 0 ? 'medium' : _b,
|
|
1137
|
+
props = __rest(_a, ["size"]);
|
|
1138
|
+
return jsxRuntime.jsx(CategoryLabel, __assign({}, props, {
|
|
1139
|
+
size: toLabelSize[size]
|
|
1140
|
+
}));
|
|
1141
|
+
};
|
|
1069
1142
|
CategoryBadge.displayName = 'CategoryBadge';
|
|
1070
|
-
var templateObject_1$E;
|
|
1071
1143
|
|
|
1072
|
-
var chip = data.tokensJson.component.chip;
|
|
1073
|
-
// Selected-chip hover and active colours have no token yet: they wait on #21 (selected states).
|
|
1074
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
1075
|
-
var SELECTED_HOVER = '#CAE8FF';
|
|
1076
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
1077
|
-
var SELECTED_ACTIVE = '#B5DEFF';
|
|
1144
|
+
var chip$1 = data.tokensJson.component.chip;
|
|
1078
1145
|
// Helper function to get variant styles matching Button's approach
|
|
1079
1146
|
var getVariantStyles = function getVariantStyles(_a) {
|
|
1080
1147
|
var $variant = _a.$variant,
|
|
1081
1148
|
$selected = _a.$selected,
|
|
1082
1149
|
$clickable = _a.$clickable,
|
|
1083
1150
|
$disabled = _a.$disabled;
|
|
1084
|
-
//
|
|
1151
|
+
// Selected filter and input chips use the light-blue selected treatment (decision 0016).
|
|
1152
|
+
// The text darkens with the fill so every state stays at least 4.5:1.
|
|
1085
1153
|
if ($selected) {
|
|
1086
|
-
|
|
1154
|
+
// A selected disabled chip looks like any disabled chip; the checkmark keeps the
|
|
1155
|
+
// selected state visible (#110)
|
|
1156
|
+
if ($disabled) {
|
|
1157
|
+
var disabled = chip$1.variants.subtle.disabled;
|
|
1158
|
+
return "\n background-color: ".concat(disabled.backgroundColor, ";\n color: ").concat(disabled.textColor, ";\n ");
|
|
1159
|
+
}
|
|
1160
|
+
var _b = data.tokensJson.semantic.color,
|
|
1161
|
+
background = _b.background,
|
|
1162
|
+
text = _b.text;
|
|
1163
|
+
var interactiveStates = $clickable;
|
|
1164
|
+
return "\n background-color: ".concat(background['interactive-subtle'], ";\n color: ").concat(text.interactive, ";\n \n &:hover {\n background-color: ").concat(interactiveStates ? background['interactive-subtle-hover'] : background['interactive-subtle'], ";\n color: ").concat(interactiveStates ? text['interactive-hover'] : text.interactive, ";\n }\n \n &:active {\n background-color: ").concat(interactiveStates ? background['interactive-subtle-active'] : background['interactive-subtle'], ";\n color: ").concat(interactiveStates ? text['interactive-active'] : text.interactive, ";\n }\n ");
|
|
1087
1165
|
}
|
|
1088
1166
|
switch ($variant) {
|
|
1089
1167
|
case 'emphasis':
|
|
1090
|
-
return "\n background-color: ".concat(chip.variants.emphasis.backgroundColor, ";\n color: ").concat(chip.variants.emphasis.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.variants.emphasis.disabled.backgroundColor : $clickable ? chip.variants.emphasis.hover.backgroundColor : chip.variants.emphasis.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.variants.emphasis.disabled.backgroundColor : $clickable ? chip.variants.emphasis.active.backgroundColor : chip.variants.emphasis.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.variants.emphasis.disabled.backgroundColor, ";\n color: ").concat(chip.variants.emphasis.disabled.textColor, ";\n ") : '', "\n ");
|
|
1168
|
+
return "\n background-color: ".concat(chip$1.variants.emphasis.backgroundColor, ";\n color: ").concat(chip$1.variants.emphasis.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip$1.variants.emphasis.disabled.backgroundColor : $clickable ? chip$1.variants.emphasis.hover.backgroundColor : chip$1.variants.emphasis.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip$1.variants.emphasis.disabled.backgroundColor : $clickable ? chip$1.variants.emphasis.active.backgroundColor : chip$1.variants.emphasis.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip$1.variants.emphasis.disabled.backgroundColor, ";\n color: ").concat(chip$1.variants.emphasis.disabled.textColor, ";\n ") : '', "\n ");
|
|
1091
1169
|
case 'subtle':
|
|
1092
|
-
return "\n background-color: ".concat(chip.variants.subtle.backgroundColor, ";\n color: ").concat(chip.variants.subtle.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.variants.subtle.disabled.backgroundColor : $clickable ? chip.variants.subtle.hover.backgroundColor : chip.variants.subtle.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.variants.subtle.disabled.backgroundColor : $clickable ? chip.variants.subtle.active.backgroundColor : chip.variants.subtle.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.variants.subtle.disabled.backgroundColor, ";\n color: ").concat(chip.variants.subtle.disabled.textColor, ";\n ") : '', "\n ");
|
|
1170
|
+
return "\n background-color: ".concat(chip$1.variants.subtle.backgroundColor, ";\n color: ").concat(chip$1.variants.subtle.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip$1.variants.subtle.disabled.backgroundColor : $clickable ? chip$1.variants.subtle.hover.backgroundColor : chip$1.variants.subtle.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip$1.variants.subtle.disabled.backgroundColor : $clickable ? chip$1.variants.subtle.active.backgroundColor : chip$1.variants.subtle.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip$1.variants.subtle.disabled.backgroundColor, ";\n color: ").concat(chip$1.variants.subtle.disabled.textColor, ";\n ") : '', "\n ");
|
|
1093
1171
|
case 'interactive':
|
|
1094
|
-
return "\n background-color: ".concat(chip.variants.interactive.backgroundColor, ";\n color: ").concat(chip.variants.interactive.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.variants.interactive.disabled.backgroundColor : $clickable ? chip.variants.interactive.hover.backgroundColor : chip.variants.interactive.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.variants.interactive.disabled.backgroundColor : $clickable ? chip.variants.interactive.active.backgroundColor : chip.variants.interactive.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.variants.interactive.disabled.backgroundColor, ";\n color: ").concat(chip.variants.interactive.disabled.textColor, ";\n ") : '', "\n ");
|
|
1172
|
+
return "\n background-color: ".concat(chip$1.variants.interactive.backgroundColor, ";\n color: ").concat(chip$1.variants.interactive.textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip$1.variants.interactive.disabled.backgroundColor : $clickable ? chip$1.variants.interactive.hover.backgroundColor : chip$1.variants.interactive.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip$1.variants.interactive.disabled.backgroundColor : $clickable ? chip$1.variants.interactive.active.backgroundColor : chip$1.variants.interactive.backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip$1.variants.interactive.disabled.backgroundColor, ";\n color: ").concat(chip$1.variants.interactive.disabled.textColor, ";\n ") : '', "\n ");
|
|
1095
1173
|
case 'default':
|
|
1096
1174
|
default:
|
|
1097
|
-
return "\n background-color: ".concat(chip["default"].backgroundColor, ";\n color: ").concat(chip["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip.disabled.backgroundColor : $clickable ? chip.hover.backgroundColor : chip["default"].backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip.disabled.backgroundColor : $clickable ? chip.active.backgroundColor : chip["default"].backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip.disabled.backgroundColor, ";\n color: ").concat(chip.disabled.textColor, ";\n ") : '', "\n ");
|
|
1175
|
+
return "\n background-color: ".concat(chip$1["default"].backgroundColor, ";\n color: ").concat(chip$1["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? chip$1.disabled.backgroundColor : $clickable ? chip$1.hover.backgroundColor : chip$1["default"].backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat($disabled ? chip$1.disabled.backgroundColor : $clickable ? chip$1.active.backgroundColor : chip$1["default"].backgroundColor, ";\n }\n \n ").concat($disabled ? "\n background-color: ".concat(chip$1.disabled.backgroundColor, ";\n color: ").concat(chip$1.disabled.textColor, ";\n ") : '', "\n ");
|
|
1098
1176
|
}
|
|
1099
1177
|
};
|
|
1100
1178
|
// Helper function to get size styles matching Button's approach
|
|
@@ -1102,13 +1180,15 @@ var getSizeStyles = function getSizeStyles(_a) {
|
|
|
1102
1180
|
var $size = _a.$size;
|
|
1103
1181
|
switch ($size) {
|
|
1104
1182
|
case 'small':
|
|
1105
|
-
return "\n font: ".concat(chip.sizes.small.font, ";\n padding: ").concat(chip.sizes.small.padding, ";\n ");
|
|
1183
|
+
return "\n font: ".concat(chip$1.sizes.small.font, ";\n // Off-grid 2px: keeps the deprecated token until #129 (decision 0022)\n padding: ").concat(chip$1.sizes.small.padding, ";\n ");
|
|
1106
1184
|
case 'medium':
|
|
1107
1185
|
default:
|
|
1108
|
-
return "\n font: ".concat(chip.sizes.medium.font, ";\n padding: ").concat(chip.sizes.medium.padding, ";\n ");
|
|
1186
|
+
return "\n font: ".concat(chip$1.sizes.medium.font, ";\n padding: ").concat(chip$1.sizes.medium.padding, ";\n ");
|
|
1109
1187
|
}
|
|
1110
1188
|
};
|
|
1111
1189
|
|
|
1190
|
+
var chip = data.tokensJson.component.chip,
|
|
1191
|
+
semantic$f = data.tokensJson.semantic;
|
|
1112
1192
|
// Base styled component using direct prop interpolation like Button
|
|
1113
1193
|
var StyledChip = styled__default.default.span.withConfig({
|
|
1114
1194
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1116,16 +1196,16 @@ var StyledChip = styled__default.default.span.withConfig({
|
|
|
1116
1196
|
},
|
|
1117
1197
|
displayName: "ChipBase__StyledChip",
|
|
1118
1198
|
componentId: "sc-moa6zc-0"
|
|
1119
|
-
})(templateObject_1$
|
|
1199
|
+
})(templateObject_1$E || (templateObject_1$E = __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"
|
|
1120
1200
|
// Icon container for selected indicator or leading icons
|
|
1121
|
-
])), chip["default"].borderRadius,
|
|
1201
|
+
])), chip["default"].borderRadius, semantic$f.motion.hover, function (props) {
|
|
1122
1202
|
return props.$disabled ? 'not-allowed' : props.$clickable ? 'pointer' : 'default';
|
|
1123
|
-
}, getVariantStyles, getSizeStyles, chip.focus.outline,
|
|
1203
|
+
}, getVariantStyles, getSizeStyles, chip.focus.outline, semantic$f.border.focusOffset);
|
|
1124
1204
|
// Icon container for selected indicator or leading icons
|
|
1125
1205
|
var IconContainer = styled__default.default.span.withConfig({
|
|
1126
1206
|
displayName: "ChipBase__IconContainer",
|
|
1127
1207
|
componentId: "sc-moa6zc-1"
|
|
1128
|
-
})(templateObject_2$
|
|
1208
|
+
})(templateObject_2$s || (templateObject_2$s = __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"
|
|
1129
1209
|
// Close button for dismissible chips
|
|
1130
1210
|
])), data.tokensJson.semantic.spacing.layout.xs);
|
|
1131
1211
|
// Close button for dismissible chips
|
|
@@ -1135,24 +1215,21 @@ var CloseButton = styled__default.default.button.withConfig({
|
|
|
1135
1215
|
},
|
|
1136
1216
|
displayName: "ChipBase__CloseButton",
|
|
1137
1217
|
componentId: "sc-moa6zc-2"
|
|
1138
|
-
})(templateObject_3$
|
|
1218
|
+
})(templateObject_3$q || (templateObject_3$q = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\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 width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"])), data.tokensJson.semantic.spacing.layout.sm, chip.closeButton.size, chip.closeButton.size, data.tokensJson.semantic.spacing.layout.none, data.tokensJson.semantic.border.radius.xs, function (props) {
|
|
1139
1219
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1140
|
-
},
|
|
1141
|
-
var templateObject_1$
|
|
1220
|
+
}, semantic$f.motion.hover, data.tokensJson.semantic.color.background['hover-overlay'], data.tokensJson.semantic.color.background['active-overlay'], data.tokensJson.semantic.color.text.disabled, chip.focus.outline, semantic$f.border.focusOffset, chip["default"].borderRadius);
|
|
1221
|
+
var templateObject_1$E, templateObject_2$s, templateObject_3$q;
|
|
1142
1222
|
|
|
1143
1223
|
/**
|
|
1144
|
-
* Chip -
|
|
1224
|
+
* Chip - a static, non-interactive label for tags, categories and metadata.
|
|
1145
1225
|
*
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
* -
|
|
1149
|
-
* - BooleanChip:
|
|
1226
|
+
* Chips are classified by job (decision 0016):
|
|
1227
|
+
* - Chip: a static label (`default` variant only)
|
|
1228
|
+
* - InputChip: a removable value, such as an applied filter (formerly `FilterChip`)
|
|
1229
|
+
* - BooleanChip: toggles a filter on and off (becomes `FilterChip` in 3.0)
|
|
1150
1230
|
*
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1153
|
-
* - emphasis: High-contrast dark background
|
|
1154
|
-
* - subtle: Light background for secondary info
|
|
1155
|
-
* - interactive: Blue background with hover states
|
|
1231
|
+
* The `emphasis`, `subtle`, `interactive`, `light` and `dark` variants and `onClick` are
|
|
1232
|
+
* deprecated and will be removed in 3.0.
|
|
1156
1233
|
*/
|
|
1157
1234
|
var Chip = function Chip(_a) {
|
|
1158
1235
|
var children = _a.children,
|
|
@@ -1214,22 +1291,22 @@ var LegacyChip = function LegacyChip(_a) {
|
|
|
1214
1291
|
};
|
|
1215
1292
|
|
|
1216
1293
|
/**
|
|
1217
|
-
*
|
|
1294
|
+
* InputChip - A removable value, such as an applied filter, with an optional selected state
|
|
1218
1295
|
*
|
|
1219
|
-
* Use this component to show
|
|
1220
|
-
* When selected, displays a checkmark
|
|
1296
|
+
* Use this component to show values the user has entered or applied, such as filters.
|
|
1297
|
+
* When selected, displays a checkmark on the light-blue selected treatment (decision 0016).
|
|
1298
|
+
* A selected disabled chip uses the disabled colours and keeps its checkmark.
|
|
1221
1299
|
* Optionally dismissible when onDismiss is provided.
|
|
1222
1300
|
*
|
|
1223
1301
|
* Features:
|
|
1224
1302
|
* - Shows checkmark icon when selected
|
|
1225
|
-
* - Light blue
|
|
1303
|
+
* - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
|
|
1226
1304
|
* - Optional close (×) button when onDismiss is provided
|
|
1227
1305
|
* - Keyboard dismissal with Delete or Backspace keys (when dismissible)
|
|
1228
1306
|
* - Non-clickable body (only close button is interactive when present)
|
|
1229
|
-
* - Uses subtle/interactive background styling based on selected state
|
|
1230
1307
|
* - Announces as "status" to screen readers
|
|
1231
1308
|
*/
|
|
1232
|
-
var
|
|
1309
|
+
var InputChip = function InputChip(_a) {
|
|
1233
1310
|
var children = _a.children,
|
|
1234
1311
|
_b = _a.selected,
|
|
1235
1312
|
selected = _b === void 0 ? false : _b,
|
|
@@ -1282,7 +1359,8 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1282
1359
|
"aria-hidden": "true",
|
|
1283
1360
|
children: jsxRuntime.jsx(Icon, {
|
|
1284
1361
|
name: "check",
|
|
1285
|
-
size: "sm"
|
|
1362
|
+
size: "sm",
|
|
1363
|
+
iconColor: "inherit"
|
|
1286
1364
|
})
|
|
1287
1365
|
}), children, isDismissible && jsxRuntime.jsx(CloseButton, {
|
|
1288
1366
|
type: "button",
|
|
@@ -1295,12 +1373,22 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1295
1373
|
"data-testid": dataTestId ? "".concat(dataTestId, "-close") : undefined,
|
|
1296
1374
|
children: jsxRuntime.jsx(Icon, {
|
|
1297
1375
|
name: "close",
|
|
1298
|
-
size: "sm"
|
|
1376
|
+
size: "sm",
|
|
1377
|
+
iconColor: "inherit"
|
|
1299
1378
|
})
|
|
1300
1379
|
})]
|
|
1301
1380
|
}));
|
|
1302
1381
|
};
|
|
1303
1382
|
|
|
1383
|
+
/**
|
|
1384
|
+
* FilterChip - a removable chip with an optional selected state.
|
|
1385
|
+
*
|
|
1386
|
+
* @deprecated Renamed to `InputChip`; in 3.0 `FilterChip` becomes the toggle chip (today's
|
|
1387
|
+
* `BooleanChip`). Replace `FilterChip` with `InputChip` first, then `BooleanChip` with
|
|
1388
|
+
* `FilterChip` when you upgrade to 3.0 (decision 0016).
|
|
1389
|
+
*/
|
|
1390
|
+
var FilterChip = InputChip;
|
|
1391
|
+
|
|
1304
1392
|
/**
|
|
1305
1393
|
* BooleanChip - Toggleable chip for quick filter controls
|
|
1306
1394
|
*
|
|
@@ -1313,7 +1401,11 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1313
1401
|
* - Entire chip is clickable to toggle
|
|
1314
1402
|
* - Keyboard activation with Space or Enter
|
|
1315
1403
|
* - Uses checkbox role with aria-checked
|
|
1316
|
-
* -
|
|
1404
|
+
* - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
|
|
1405
|
+
*
|
|
1406
|
+
* @deprecated Becomes `FilterChip` in 3.0, with the same props. Keep using `BooleanChip`
|
|
1407
|
+
* until you upgrade; in 3.0, replace `FilterChip` with `InputChip` first, then
|
|
1408
|
+
* `BooleanChip` with `FilterChip` (decision 0016).
|
|
1317
1409
|
*/
|
|
1318
1410
|
var BooleanChip = function BooleanChip(_a) {
|
|
1319
1411
|
var children = _a.children,
|
|
@@ -1359,17 +1451,18 @@ var BooleanChip = function BooleanChip(_a) {
|
|
|
1359
1451
|
"aria-hidden": "true",
|
|
1360
1452
|
children: jsxRuntime.jsx(Icon, {
|
|
1361
1453
|
name: "check",
|
|
1362
|
-
size: "sm"
|
|
1454
|
+
size: "sm",
|
|
1455
|
+
iconColor: "inherit"
|
|
1363
1456
|
})
|
|
1364
1457
|
}), children]
|
|
1365
1458
|
}));
|
|
1366
1459
|
};
|
|
1367
1460
|
|
|
1368
|
-
var spacing$
|
|
1461
|
+
var spacing$8 = data.tokensJson.semantic.spacing;
|
|
1369
1462
|
var StyledContainer$2 = styled__default.default.div.withConfig({
|
|
1370
1463
|
displayName: "Container__StyledContainer",
|
|
1371
1464
|
componentId: "sc-17dbj6n-0"
|
|
1372
|
-
})(templateObject_1$
|
|
1465
|
+
})(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n"], ["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n \n ", " {\n max-width: ", ";\n }\n"])), spacing$8.layout['2xl'], spacing$8.layout['2xl'], media$1.sm, breakpoints$1.sm, media$1.md, breakpoints$1.md, media$1.lg, breakpoints$1.lg, media$1.xl, breakpoints$1.xl, media$1['2xl'], breakpoints$1['2xl']);
|
|
1373
1466
|
var Container$1 = function Container(_a) {
|
|
1374
1467
|
var children = _a.children,
|
|
1375
1468
|
props = __rest(_a, ["children"]);
|
|
@@ -1377,24 +1470,24 @@ var Container$1 = function Container(_a) {
|
|
|
1377
1470
|
children: children
|
|
1378
1471
|
}));
|
|
1379
1472
|
};
|
|
1380
|
-
var templateObject_1$
|
|
1473
|
+
var templateObject_1$D;
|
|
1381
1474
|
|
|
1382
1475
|
var PictureWrapper = styled__default.default.div.withConfig({
|
|
1383
1476
|
displayName: "Picture__PictureWrapper",
|
|
1384
1477
|
componentId: "sc-11d9tei-0"
|
|
1385
|
-
})(templateObject_1$
|
|
1478
|
+
})(templateObject_1$C || (templateObject_1$C = __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);
|
|
1386
1479
|
var ImageLink = styled__default.default.a.withConfig({
|
|
1387
1480
|
displayName: "Picture__ImageLink",
|
|
1388
1481
|
componentId: "sc-11d9tei-1"
|
|
1389
|
-
})(templateObject_2$
|
|
1482
|
+
})(templateObject_2$r || (templateObject_2$r = __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"])), data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut);
|
|
1390
1483
|
var ImageButton = styled__default.default.button.withConfig({
|
|
1391
1484
|
displayName: "Picture__ImageButton",
|
|
1392
1485
|
componentId: "sc-11d9tei-2"
|
|
1393
|
-
})(templateObject_3$
|
|
1486
|
+
})(templateObject_3$p || (templateObject_3$p = __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"])), data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut);
|
|
1394
1487
|
var StyledImage = styled__default.default.img.withConfig({
|
|
1395
1488
|
displayName: "Picture__StyledImage",
|
|
1396
1489
|
componentId: "sc-11d9tei-3"
|
|
1397
|
-
})(templateObject_4$
|
|
1490
|
+
})(templateObject_4$l || (templateObject_4$l = __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"])), data.tokensJson.semantic.border.radius.sm);
|
|
1398
1491
|
var Picture = function Picture(_a) {
|
|
1399
1492
|
var title = _a.title,
|
|
1400
1493
|
src = _a.src,
|
|
@@ -1424,18 +1517,18 @@ var Picture = function Picture(_a) {
|
|
|
1424
1517
|
}) : image
|
|
1425
1518
|
});
|
|
1426
1519
|
};
|
|
1427
|
-
var templateObject_1$
|
|
1520
|
+
var templateObject_1$C, templateObject_2$r, templateObject_3$p, templateObject_4$l;
|
|
1428
1521
|
|
|
1429
1522
|
var _a$9 = data.tokensJson.semantic,
|
|
1430
|
-
typography = _a$9.typography,
|
|
1431
|
-
color$
|
|
1523
|
+
typography$1 = _a$9.typography,
|
|
1524
|
+
color$7 = _a$9.color;
|
|
1432
1525
|
var TimeStyled = styled__default.default.time.withConfig({
|
|
1433
1526
|
displayName: "DateFormatter__TimeStyled",
|
|
1434
1527
|
componentId: "sc-5464cc-0"
|
|
1435
|
-
})(templateObject_1$
|
|
1528
|
+
})(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
1436
1529
|
/**
|
|
1437
1530
|
* Formats a date with smart relative/absolute logic
|
|
1438
|
-
*/])), typography.label, color$
|
|
1531
|
+
*/])), typography$1.label, color$7.text.subdued);
|
|
1439
1532
|
/**
|
|
1440
1533
|
* Formats a date with smart relative/absolute logic
|
|
1441
1534
|
*/
|
|
@@ -1461,12 +1554,9 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1461
1554
|
var date = dateFns.parseISO(dateString);
|
|
1462
1555
|
var displayText;
|
|
1463
1556
|
switch (mode) {
|
|
1464
|
-
case 'relative':
|
|
1465
|
-
// Always use relative labels (Today/Yesterday) or fall back to day name
|
|
1466
|
-
displayText = formatDateSmart(date, formatString);
|
|
1467
|
-
break;
|
|
1557
|
+
case 'relative': // Deprecated alias for 'smart', removed in 3.0 (#82)
|
|
1468
1558
|
case 'smart':
|
|
1469
|
-
//
|
|
1559
|
+
// Today, Yesterday or the day name for recent dates; formatted for older ones
|
|
1470
1560
|
displayText = formatDateSmart(date, formatString);
|
|
1471
1561
|
break;
|
|
1472
1562
|
case 'absolute':
|
|
@@ -1481,43 +1571,67 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1481
1571
|
children: displayText
|
|
1482
1572
|
});
|
|
1483
1573
|
};
|
|
1484
|
-
var templateObject_1$
|
|
1574
|
+
var templateObject_1$B;
|
|
1485
1575
|
|
|
1486
|
-
var
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1576
|
+
var _a$8 = data.tokensJson.semantic,
|
|
1577
|
+
motion$5 = _a$8.motion,
|
|
1578
|
+
border$8 = _a$8.border,
|
|
1579
|
+
spacing$7 = _a$8.spacing,
|
|
1580
|
+
_b$1 = data.tokensJson.component,
|
|
1581
|
+
iconButton = _b$1.iconButton,
|
|
1582
|
+
button = _b$1.button;
|
|
1583
|
+
// Padding comes from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
1584
|
+
var padding = {
|
|
1585
|
+
small: spacing$7.component.xs,
|
|
1586
|
+
medium: spacing$7.component.sm,
|
|
1587
|
+
large: spacing$7.component.md
|
|
1588
|
+
};
|
|
1589
|
+
// Colours and motion come from Button's tokens, so IconButton's variants look and behave exactly like
|
|
1590
|
+
// Button's in every state (#130). Only the size and the icon differ
|
|
1591
|
+
var variants = {
|
|
1592
|
+
primary: {
|
|
1593
|
+
bg: button.primary.backgroundColor,
|
|
1594
|
+
text: button.primary.textColor,
|
|
1595
|
+
hoverBg: button.hover.backgroundColor,
|
|
1596
|
+
activeBg: button.active.backgroundColor,
|
|
1597
|
+
disabledBg: button.disabled.backgroundColor,
|
|
1598
|
+
disabledText: button.disabled.textColor
|
|
1599
|
+
},
|
|
1600
|
+
secondary: {
|
|
1601
|
+
bg: button.variants.secondary.backgroundColor,
|
|
1602
|
+
text: button.variants.secondary.textColor,
|
|
1603
|
+
hoverBg: button.variants.secondary.hover.backgroundColor,
|
|
1604
|
+
activeBg: button.variants.secondary.active.backgroundColor,
|
|
1605
|
+
disabledBg: button.variants.secondary.disabled.backgroundColor,
|
|
1606
|
+
disabledText: button.variants.secondary.disabled.textColor
|
|
1607
|
+
},
|
|
1608
|
+
naked: {
|
|
1609
|
+
bg: button.variants.naked.backgroundColor,
|
|
1610
|
+
text: button.variants.naked.textColor,
|
|
1611
|
+
hoverBg: button.variants.naked.hover.backgroundColor,
|
|
1612
|
+
activeBg: button.variants.naked.active.backgroundColor,
|
|
1613
|
+
disabledBg: button.variants.naked.disabled.backgroundColor,
|
|
1614
|
+
disabledText: button.variants.naked.disabled.textColor
|
|
1615
|
+
}
|
|
1616
|
+
};
|
|
1617
|
+
// JavaScript callers can pass any string, so an unknown variant falls back to primary, as before
|
|
1618
|
+
var colours = function colours(variant) {
|
|
1619
|
+
var _a;
|
|
1620
|
+
return (_a = variants[variant]) !== null && _a !== void 0 ? _a : variants.primary;
|
|
1621
|
+
};
|
|
1490
1622
|
var IconButtonStyled = styled__default.default.button.withConfig({
|
|
1491
1623
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1492
1624
|
return !prop.startsWith('$');
|
|
1493
1625
|
},
|
|
1494
1626
|
displayName: "IconButton__IconButtonStyled",
|
|
1495
1627
|
componentId: "sc-k8b14t-0"
|
|
1496
|
-
})(templateObject_1$
|
|
1628
|
+
})(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\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 background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\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"])), function (_a) {
|
|
1497
1629
|
var $variant = _a.$variant;
|
|
1498
|
-
|
|
1499
|
-
case 'primary':
|
|
1500
|
-
return iconButton.primary.backgroundColor;
|
|
1501
|
-
case 'secondary':
|
|
1502
|
-
return iconButton.variants.secondary.backgroundColor;
|
|
1503
|
-
case 'naked':
|
|
1504
|
-
return iconButton.variants.naked.backgroundColor;
|
|
1505
|
-
default:
|
|
1506
|
-
return iconButton.primary.backgroundColor;
|
|
1507
|
-
}
|
|
1630
|
+
return colours($variant).bg;
|
|
1508
1631
|
}, function (_a) {
|
|
1509
1632
|
var $variant = _a.$variant;
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
return button.primary.textColor;
|
|
1513
|
-
case 'secondary':
|
|
1514
|
-
return button.variants.secondary.textColor;
|
|
1515
|
-
case 'naked':
|
|
1516
|
-
return button.variants.naked.textColor;
|
|
1517
|
-
default:
|
|
1518
|
-
return button.primary.textColor;
|
|
1519
|
-
}
|
|
1520
|
-
}, iconButton.primary.borderRadius, motion$5.transition.normal, iconButton.primary.display, iconButton.primary.justifyContent, iconButton.primary.alignItems, function (_a) {
|
|
1633
|
+
return colours($variant).text;
|
|
1634
|
+
}, iconButton.primary.borderRadius, motion$5.hover, function (_a) {
|
|
1521
1635
|
var $size = _a.$size;
|
|
1522
1636
|
return iconButton.sizes[$size].minWidth;
|
|
1523
1637
|
}, function (_a) {
|
|
@@ -1525,32 +1639,20 @@ var IconButtonStyled = styled__default.default.button.withConfig({
|
|
|
1525
1639
|
return iconButton.sizes[$size].minHeight;
|
|
1526
1640
|
}, function (_a) {
|
|
1527
1641
|
var $size = _a.$size;
|
|
1528
|
-
return
|
|
1642
|
+
return padding[$size];
|
|
1529
1643
|
}, function (_a) {
|
|
1530
1644
|
var $variant = _a.$variant;
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
return iconButton.hover.backgroundColor;
|
|
1534
|
-
case 'secondary':
|
|
1535
|
-
return iconButton.variants.secondary.hover.backgroundColor;
|
|
1536
|
-
case 'naked':
|
|
1537
|
-
return iconButton.variants.naked.hover.backgroundColor;
|
|
1538
|
-
default:
|
|
1539
|
-
return iconButton.hover.backgroundColor;
|
|
1540
|
-
}
|
|
1541
|
-
}, iconButton.active.backgroundColor, iconButton.focus.outline, iconButton.focus.outlineOffset, iconButton.disabled.backgroundColor, function (_a) {
|
|
1645
|
+
return colours($variant).hoverBg;
|
|
1646
|
+
}, function (_a) {
|
|
1542
1647
|
var $variant = _a.$variant;
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
return button.disabled.textColor;
|
|
1552
|
-
}
|
|
1553
|
-
}, data.tokensJson.semantic.border.width.thin);
|
|
1648
|
+
return colours($variant).activeBg;
|
|
1649
|
+
}, iconButton.focus.outline, border$8.focusOffset, function (_a) {
|
|
1650
|
+
var $variant = _a.$variant;
|
|
1651
|
+
return colours($variant).disabledBg;
|
|
1652
|
+
}, function (_a) {
|
|
1653
|
+
var $variant = _a.$variant;
|
|
1654
|
+
return colours($variant).disabledText;
|
|
1655
|
+
});
|
|
1554
1656
|
var IconButton = function IconButton(_a) {
|
|
1555
1657
|
var variant = _a.variant,
|
|
1556
1658
|
_b = _a.size,
|
|
@@ -1601,7 +1703,7 @@ var IconButton = function IconButton(_a) {
|
|
|
1601
1703
|
})
|
|
1602
1704
|
}));
|
|
1603
1705
|
};
|
|
1604
|
-
var templateObject_1$
|
|
1706
|
+
var templateObject_1$A;
|
|
1605
1707
|
|
|
1606
1708
|
var StyledWrapper = styled__default.default.span.withConfig({
|
|
1607
1709
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1609,7 +1711,7 @@ var StyledWrapper = styled__default.default.span.withConfig({
|
|
|
1609
1711
|
},
|
|
1610
1712
|
displayName: "MoneyDisplay__StyledWrapper",
|
|
1611
1713
|
componentId: "sc-1mddej3-0"
|
|
1612
|
-
})(templateObject_1$
|
|
1714
|
+
})(templateObject_1$z || (templateObject_1$z = __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"
|
|
1613
1715
|
// Map size to Typography variant
|
|
1614
1716
|
])), function (_a) {
|
|
1615
1717
|
var $align = _a.$align;
|
|
@@ -1696,14 +1798,18 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
1696
1798
|
"$weight": weight,
|
|
1697
1799
|
"aria-label": ariaLabel,
|
|
1698
1800
|
"data-testid": dataTestId,
|
|
1699
|
-
children: [showPositiveIcon && !showNegativeIcon &&
|
|
1801
|
+
children: [showPositiveIcon && !showNegativeIcon &&
|
|
1802
|
+
// The amount is shown without a sign, so the icon is the sign and needs a name (#85)
|
|
1803
|
+
jsxRuntime.jsx(Icon, {
|
|
1700
1804
|
name: "addRing",
|
|
1701
1805
|
size: iconSize,
|
|
1702
|
-
iconColor: iconColor
|
|
1806
|
+
iconColor: iconColor,
|
|
1807
|
+
"aria-label": "Plus"
|
|
1703
1808
|
}), showNegativeIcon && jsxRuntime.jsx(Icon, {
|
|
1704
1809
|
name: "remove",
|
|
1705
1810
|
size: iconSize,
|
|
1706
|
-
iconColor: iconColor
|
|
1811
|
+
iconColor: iconColor,
|
|
1812
|
+
"aria-label": "Minus"
|
|
1707
1813
|
}), jsxRuntime.jsx(Typography, {
|
|
1708
1814
|
variant: typographyVariant,
|
|
1709
1815
|
color: amountColor,
|
|
@@ -1712,14 +1818,14 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
1712
1818
|
})]
|
|
1713
1819
|
});
|
|
1714
1820
|
};
|
|
1715
|
-
var templateObject_1$
|
|
1821
|
+
var templateObject_1$z;
|
|
1716
1822
|
|
|
1717
1823
|
// Destructure tokens
|
|
1718
|
-
var semantic$
|
|
1719
|
-
var _a$7 = __assign(__assign({}, semantic$
|
|
1824
|
+
var semantic$e = data.tokensJson.semantic;
|
|
1825
|
+
var _a$7 = __assign(__assign({}, semantic$e), {
|
|
1720
1826
|
component: data.tokensJson.component
|
|
1721
1827
|
}),
|
|
1722
|
-
color$
|
|
1828
|
+
color$6 = _a$7.color,
|
|
1723
1829
|
border$7 = _a$7.border,
|
|
1724
1830
|
motion$4 = _a$7.motion,
|
|
1725
1831
|
component$2 = _a$7.component;
|
|
@@ -1730,10 +1836,10 @@ var ProgressBarContainer = styled__default.default.div.withConfig({
|
|
|
1730
1836
|
},
|
|
1731
1837
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
1732
1838
|
componentId: "sc-1nco33q-0"
|
|
1733
|
-
})(templateObject_3$
|
|
1734
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_1$
|
|
1839
|
+
})(templateObject_3$o || (templateObject_3$o = __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$6.background.disabled, radius$2.xs, function (props) {
|
|
1840
|
+
return props.$variant === 'horizontal' && styled.css(templateObject_1$y || (templateObject_1$y = __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);
|
|
1735
1841
|
}, function (props) {
|
|
1736
|
-
return props.$variant === 'vertical' && styled.css(templateObject_2$
|
|
1842
|
+
return props.$variant === 'vertical' && styled.css(templateObject_2$q || (templateObject_2$q = __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);
|
|
1737
1843
|
});
|
|
1738
1844
|
var ProgressBarFill = styled__default.default.div.withConfig({
|
|
1739
1845
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1745,17 +1851,17 @@ var ProgressBarFill = styled__default.default.div.withConfig({
|
|
|
1745
1851
|
var backgroundColor;
|
|
1746
1852
|
switch (props.$color) {
|
|
1747
1853
|
case 'success':
|
|
1748
|
-
backgroundColor = color$
|
|
1854
|
+
backgroundColor = color$6.background.success;
|
|
1749
1855
|
break;
|
|
1750
1856
|
case 'error':
|
|
1751
|
-
backgroundColor = color$
|
|
1857
|
+
backgroundColor = color$6.background.error;
|
|
1752
1858
|
break;
|
|
1753
1859
|
case 'default':
|
|
1754
1860
|
default:
|
|
1755
|
-
backgroundColor = color$
|
|
1861
|
+
backgroundColor = color$6.background.interactive;
|
|
1756
1862
|
break;
|
|
1757
1863
|
}
|
|
1758
|
-
return styled.css(templateObject_4$
|
|
1864
|
+
return styled.css(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
1759
1865
|
}, function (props) {
|
|
1760
1866
|
return props.$variant === 'horizontal' && styled.css(templateObject_5$g || (templateObject_5$g = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1761
1867
|
}, function (props) {
|
|
@@ -1793,10 +1899,11 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1793
1899
|
})
|
|
1794
1900
|
});
|
|
1795
1901
|
};
|
|
1796
|
-
var templateObject_1$
|
|
1902
|
+
var templateObject_1$y, templateObject_2$q, templateObject_3$o, templateObject_4$k, templateObject_5$g, templateObject_6$c, templateObject_7$a;
|
|
1797
1903
|
|
|
1798
1904
|
// Destructure tokens for cleaner access
|
|
1799
1905
|
var separatorTokens = data.tokensJson.component.separator;
|
|
1906
|
+
// Margins come from the semantic separator spacing: no component spacing tokens (decision 0022)
|
|
1800
1907
|
var separatorSpacing = data.tokensJson.semantic.spacing.separator;
|
|
1801
1908
|
var StyledDivider = styled__default.default.div.withConfig({
|
|
1802
1909
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1804,7 +1911,7 @@ var StyledDivider = styled__default.default.div.withConfig({
|
|
|
1804
1911
|
},
|
|
1805
1912
|
displayName: "Divider__StyledDivider",
|
|
1806
1913
|
componentId: "sc-1l0c8ja-0"
|
|
1807
|
-
})(templateObject_1$
|
|
1914
|
+
})(templateObject_1$x || (templateObject_1$x = __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"
|
|
1808
1915
|
/**
|
|
1809
1916
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
1810
1917
|
*
|
|
@@ -1853,7 +1960,7 @@ var StyledDivider = styled__default.default.div.withConfig({
|
|
|
1853
1960
|
$orientation = _d === void 0 ? 'horizontal' : _d;
|
|
1854
1961
|
if ($variant === 'minimal' && $orientation === 'horizontal') {
|
|
1855
1962
|
// Minimal variant always uses its predefined spacing for horizontal
|
|
1856
|
-
return "margin: ".concat(
|
|
1963
|
+
return "margin: ".concat(separatorSpacing.md, " 0;");
|
|
1857
1964
|
}
|
|
1858
1965
|
if ($orientation === 'vertical') {
|
|
1859
1966
|
// Vertical orientation uses horizontal margins (left/right)
|
|
@@ -1872,14 +1979,14 @@ var StyledDivider = styled__default.default.div.withConfig({
|
|
|
1872
1979
|
// Horizontal orientation uses vertical margins (top/bottom)
|
|
1873
1980
|
switch ($size) {
|
|
1874
1981
|
case 'small':
|
|
1875
|
-
return "margin: ".concat(
|
|
1982
|
+
return "margin: ".concat(separatorSpacing.sm, " 0;");
|
|
1876
1983
|
case 'medium':
|
|
1877
|
-
return "margin: ".concat(
|
|
1984
|
+
return "margin: ".concat(separatorSpacing.md, " 0;");
|
|
1878
1985
|
case 'xlarge':
|
|
1879
|
-
return "margin: ".concat(
|
|
1986
|
+
return "margin: ".concat(separatorSpacing.xl, " 0;");
|
|
1880
1987
|
case 'large':
|
|
1881
1988
|
default:
|
|
1882
|
-
return "margin: ".concat(
|
|
1989
|
+
return "margin: ".concat(separatorSpacing.lg, " 0;");
|
|
1883
1990
|
}
|
|
1884
1991
|
});
|
|
1885
1992
|
/**
|
|
@@ -1917,7 +2024,7 @@ var Divider = function Divider(_a) {
|
|
|
1917
2024
|
"aria-orientation": orientation
|
|
1918
2025
|
});
|
|
1919
2026
|
};
|
|
1920
|
-
var templateObject_1$
|
|
2027
|
+
var templateObject_1$x;
|
|
1921
2028
|
|
|
1922
2029
|
var StyledStack = styled__default.default.div.withConfig({
|
|
1923
2030
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1925,7 +2032,7 @@ var StyledStack = styled__default.default.div.withConfig({
|
|
|
1925
2032
|
},
|
|
1926
2033
|
displayName: "Stack__StyledStack",
|
|
1927
2034
|
componentId: "sc-1ehkxgy-0"
|
|
1928
|
-
})(templateObject_1$
|
|
2035
|
+
})(templateObject_1$w || (templateObject_1$w = __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"
|
|
1929
2036
|
// Helper function to convert gap prop to CSS value
|
|
1930
2037
|
])));
|
|
1931
2038
|
// Helper function to convert gap prop to CSS value
|
|
@@ -1964,18 +2071,19 @@ var Stack = function Stack(_a) {
|
|
|
1964
2071
|
children: children
|
|
1965
2072
|
});
|
|
1966
2073
|
};
|
|
1967
|
-
var templateObject_1$
|
|
2074
|
+
var templateObject_1$w;
|
|
1968
2075
|
|
|
1969
2076
|
// Destructure tokens for cleaner access
|
|
1970
2077
|
var statusColors = data.tokensJson.semantic.color.status;
|
|
1971
|
-
var spacing$
|
|
2078
|
+
var spacing$6 = data.tokensJson.semantic.spacing.layout;
|
|
1972
2079
|
var radius$1 = data.tokensJson.semantic.border.radius;
|
|
1973
2080
|
var _a$6 = data.tokensJson.semantic.motion,
|
|
1974
2081
|
transition = _a$6.transition,
|
|
1975
2082
|
duration$3 = _a$6.duration,
|
|
1976
2083
|
easing$3 = _a$6.easing;
|
|
2084
|
+
var labelHeight = data.tokensJson.semantic.size.label;
|
|
1977
2085
|
var label$1 = data.tokensJson.component.badge.label;
|
|
1978
|
-
var scaleIn$1 = styled.keyframes(templateObject_1$
|
|
2086
|
+
var scaleIn$1 = styled.keyframes(templateObject_1$v || (templateObject_1$v = __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"])));
|
|
1979
2087
|
var getStatusConfig = function getStatusConfig(status) {
|
|
1980
2088
|
var configs = {
|
|
1981
2089
|
pending: {
|
|
@@ -2020,31 +2128,31 @@ var getStatusConfig = function getStatusConfig(status) {
|
|
|
2020
2128
|
return configs[status];
|
|
2021
2129
|
};
|
|
2022
2130
|
// Size configuration
|
|
2023
|
-
var sizeConfig = {
|
|
2131
|
+
var sizeConfig$1 = {
|
|
2024
2132
|
small: {
|
|
2025
|
-
height:
|
|
2026
|
-
padding: "".concat(spacing$
|
|
2133
|
+
height: labelHeight.small,
|
|
2134
|
+
padding: "".concat(spacing$6.xs, " ").concat(spacing$6.sm),
|
|
2027
2135
|
font: label$1.typography.small,
|
|
2028
|
-
gap: spacing$
|
|
2136
|
+
gap: spacing$6.xs,
|
|
2029
2137
|
iconSize: 'xs'
|
|
2030
2138
|
},
|
|
2031
2139
|
medium: {
|
|
2032
|
-
height:
|
|
2033
|
-
padding: "".concat(spacing$
|
|
2140
|
+
height: labelHeight.medium,
|
|
2141
|
+
padding: "".concat(spacing$6.xs, " ").concat(spacing$6.sm),
|
|
2034
2142
|
font: label$1.typography.medium,
|
|
2035
|
-
gap: spacing$
|
|
2143
|
+
gap: spacing$6.xs,
|
|
2036
2144
|
iconSize: 'sm'
|
|
2037
2145
|
}
|
|
2038
2146
|
};
|
|
2039
|
-
var
|
|
2147
|
+
var StyledStatusLabel = styled__default.default.span.withConfig({
|
|
2040
2148
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2041
2149
|
return !prop.startsWith('$');
|
|
2042
2150
|
},
|
|
2043
|
-
displayName: "
|
|
2044
|
-
componentId: "sc-
|
|
2045
|
-
})(templateObject_2$
|
|
2151
|
+
displayName: "StatusLabelBase__StyledStatusLabel",
|
|
2152
|
+
componentId: "sc-1ye9xz5-0"
|
|
2153
|
+
})(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n box-sizing: border-box; /* the height includes padding, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n white-space: nowrap;\n user-select: none;\n animation: ", " ", " ", ";\n transition: ", ";\n\n /* transition.fast covers all properties, so a size change would animate the label's dimensions */\n ", " {\n animation: none;\n transition: none;\n }\n \n /* Size styles */\n ", "\n \n /* Status color styles */\n ", "\n"], ["\n box-sizing: border-box; /* the height includes padding, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n white-space: nowrap;\n user-select: none;\n animation: ", " ", " ", ";\n transition: ", ";\n\n /* transition.fast covers all properties, so a size change would animate the label's dimensions */\n ", " {\n animation: none;\n transition: none;\n }\n \n /* Size styles */\n ", "\n \n /* Status color styles */\n ", "\n"])), radius$1.circle, scaleIn$1, duration$3.normal, easing$3.easeOut, transition.fast, reducedMotion, function (_a) {
|
|
2046
2154
|
var $size = _a.$size;
|
|
2047
|
-
var size = sizeConfig[$size];
|
|
2155
|
+
var size = sizeConfig$1[$size];
|
|
2048
2156
|
return "\n height: ".concat(size.height, ";\n padding: ").concat(size.padding, ";\n font: ").concat(size.font, ";\n font-weight: ").concat(label$1.fontWeight, ";\n gap: ").concat(size.gap, ";\n ");
|
|
2049
2157
|
}, function (_a) {
|
|
2050
2158
|
var $status = _a.$status;
|
|
@@ -2052,56 +2160,29 @@ var StyledStatusBadge = styled__default.default.span.withConfig({
|
|
|
2052
2160
|
return "\n background-color: ".concat(config.bgColor, ";\n color: ").concat(config.color, ";\n ");
|
|
2053
2161
|
});
|
|
2054
2162
|
var ScreenReaderOnly = styled__default.default.span.withConfig({
|
|
2055
|
-
displayName: "
|
|
2056
|
-
componentId: "sc-
|
|
2057
|
-
})(templateObject_3$
|
|
2163
|
+
displayName: "StatusLabelBase__ScreenReaderOnly",
|
|
2164
|
+
componentId: "sc-1ye9xz5-1"
|
|
2165
|
+
})(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
2166
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
2167
|
+
// display: contents keeps the root's flex layout and gap.
|
|
2168
|
+
])), visuallyHidden);
|
|
2169
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
2170
|
+
// display: contents keeps the root's flex layout and gap.
|
|
2171
|
+
var VisibleContent = styled__default.default.span.withConfig({
|
|
2172
|
+
displayName: "StatusLabelBase__VisibleContent",
|
|
2173
|
+
componentId: "sc-1ye9xz5-2"
|
|
2174
|
+
})(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"
|
|
2058
2175
|
/**
|
|
2059
|
-
*
|
|
2060
|
-
*
|
|
2061
|
-
*
|
|
2062
|
-
|
|
2063
|
-
*
|
|
2064
|
-
* @example
|
|
2065
|
-
* ```tsx
|
|
2066
|
-
* <StatusBadge status="completed" />
|
|
2067
|
-
*
|
|
2068
|
-
* <StatusBadge
|
|
2069
|
-
* status="pending"
|
|
2070
|
-
* label="Awaiting approval"
|
|
2071
|
-
* size="small"
|
|
2072
|
-
* />
|
|
2073
|
-
*
|
|
2074
|
-
* <StatusBadge
|
|
2075
|
-
* status="failed"
|
|
2076
|
-
* showIcon={false}
|
|
2077
|
-
* liveRegion={true}
|
|
2078
|
-
* />
|
|
2079
|
-
* ```
|
|
2080
|
-
*/])), visuallyHidden);
|
|
2176
|
+
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2177
|
+
* from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
|
|
2178
|
+
* (decision 0018).
|
|
2179
|
+
*/])));
|
|
2081
2180
|
/**
|
|
2082
|
-
*
|
|
2083
|
-
*
|
|
2084
|
-
*
|
|
2085
|
-
* Maps to 6 common status types with semantic color tokens.
|
|
2086
|
-
*
|
|
2087
|
-
* @example
|
|
2088
|
-
* ```tsx
|
|
2089
|
-
* <StatusBadge status="completed" />
|
|
2090
|
-
*
|
|
2091
|
-
* <StatusBadge
|
|
2092
|
-
* status="pending"
|
|
2093
|
-
* label="Awaiting approval"
|
|
2094
|
-
* size="small"
|
|
2095
|
-
* />
|
|
2096
|
-
*
|
|
2097
|
-
* <StatusBadge
|
|
2098
|
-
* status="failed"
|
|
2099
|
-
* showIcon={false}
|
|
2100
|
-
* liveRegion={true}
|
|
2101
|
-
* />
|
|
2102
|
-
* ```
|
|
2181
|
+
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2182
|
+
* from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
|
|
2183
|
+
* (decision 0018).
|
|
2103
2184
|
*/
|
|
2104
|
-
var
|
|
2185
|
+
var StatusLabelBase = function StatusLabelBase(_a) {
|
|
2105
2186
|
var status = _a.status,
|
|
2106
2187
|
label = _a.label,
|
|
2107
2188
|
_b = _a.size,
|
|
@@ -2113,36 +2194,73 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
2113
2194
|
dataTestId = _a["data-testid"],
|
|
2114
2195
|
ariaLabel = _a["aria-label"];
|
|
2115
2196
|
var statusConfig = getStatusConfig(status);
|
|
2116
|
-
var sizeStyles = sizeConfig[size];
|
|
2197
|
+
var sizeStyles = sizeConfig$1[size];
|
|
2117
2198
|
var displayLabel = label || statusConfig.label;
|
|
2118
|
-
|
|
2199
|
+
// A blank aria-label is no label at all, so it falls back like a missing one
|
|
2200
|
+
var accessibleLabel = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
2201
|
+
return jsxRuntime.jsxs(StyledStatusLabel, {
|
|
2119
2202
|
"$status": status,
|
|
2120
2203
|
"$size": size,
|
|
2121
2204
|
role: "status",
|
|
2122
|
-
"aria-label":
|
|
2123
|
-
"aria-live": liveRegion ? 'polite' :
|
|
2205
|
+
"aria-label": accessibleLabel || "Status: ".concat(displayLabel),
|
|
2206
|
+
"aria-live": liveRegion ? 'polite' : 'off',
|
|
2124
2207
|
"aria-atomic": liveRegion ? 'true' : undefined,
|
|
2125
2208
|
"data-testid": dataTestId,
|
|
2126
|
-
children: [
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2209
|
+
children: [jsxRuntime.jsxs(VisibleContent, {
|
|
2210
|
+
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
2211
|
+
children: [showIcon && jsxRuntime.jsx(Icon, {
|
|
2212
|
+
name: statusConfig.icon,
|
|
2213
|
+
size: sizeStyles.iconSize,
|
|
2214
|
+
iconColor: "inherit"
|
|
2215
|
+
}), displayLabel, jsxRuntime.jsxs(ScreenReaderOnly, {
|
|
2216
|
+
children: [status, " status"]
|
|
2217
|
+
})]
|
|
2218
|
+
}), accessibleLabel && jsxRuntime.jsx(ScreenReaderOnly, {
|
|
2219
|
+
children: accessibleLabel
|
|
2133
2220
|
})]
|
|
2134
2221
|
});
|
|
2135
2222
|
};
|
|
2223
|
+
var templateObject_1$v, templateObject_2$p, templateObject_3$n, templateObject_4$j;
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* StatusBadge displays a transaction or task status.
|
|
2227
|
+
*
|
|
2228
|
+
* @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
|
|
2229
|
+
* shows the icon. StatusBadge is removed in 3.0 (decision 0018).
|
|
2230
|
+
*/
|
|
2231
|
+
var StatusBadge = function StatusBadge(props) {
|
|
2232
|
+
return jsxRuntime.jsx(StatusLabelBase, __assign({}, props));
|
|
2233
|
+
};
|
|
2136
2234
|
StatusBadge.displayName = 'StatusBadge';
|
|
2137
|
-
var templateObject_1$u, templateObject_2$o, templateObject_3$m;
|
|
2138
2235
|
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2236
|
+
/**
|
|
2237
|
+
* StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
|
|
2238
|
+
*
|
|
2239
|
+
* Uses only the status colour tokens and always shows an icon with its text, so status is never
|
|
2240
|
+
* conveyed by colour alone. Not interactive. Announces changes politely to screen readers.
|
|
2241
|
+
*
|
|
2242
|
+
* @example
|
|
2243
|
+
* ```tsx
|
|
2244
|
+
* <StatusLabel status="completed" />
|
|
2245
|
+
*
|
|
2246
|
+
* <StatusLabel status="pending" label="Awaiting approval" size="small" />
|
|
2247
|
+
* ```
|
|
2248
|
+
*/
|
|
2249
|
+
// showIcon comes last so no caller (for example plain JavaScript) can hide the icon
|
|
2250
|
+
var StatusLabel = function StatusLabel(props) {
|
|
2251
|
+
return jsxRuntime.jsx(StatusLabelBase, __assign({}, props, {
|
|
2252
|
+
showIcon: true
|
|
2253
|
+
}));
|
|
2254
|
+
};
|
|
2255
|
+
StatusLabel.displayName = 'StatusLabel';
|
|
2256
|
+
|
|
2257
|
+
var semantic$d = data.tokensJson.semantic;
|
|
2258
|
+
var color$5 = semantic$d.color,
|
|
2259
|
+
spacing$5 = semantic$d.spacing,
|
|
2260
|
+
border$6 = semantic$d.border,
|
|
2261
|
+
size$1 = semantic$d.size;
|
|
2144
2262
|
var label = data.tokensJson.component.badge.label;
|
|
2145
|
-
var layout$3 = spacing$
|
|
2263
|
+
var layout$3 = spacing$5.layout;
|
|
2146
2264
|
var radius = border$6.radius;
|
|
2147
2265
|
var StyledTag = styled__default.default.span.withConfig({
|
|
2148
2266
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2150,43 +2268,49 @@ var StyledTag = styled__default.default.span.withConfig({
|
|
|
2150
2268
|
},
|
|
2151
2269
|
displayName: "Tag__StyledTag",
|
|
2152
2270
|
componentId: "sc-lzfmti-0"
|
|
2153
|
-
})(templateObject_1$
|
|
2271
|
+
})(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n\n /* Size (decision 0018): small has no vertical padding so the text line fits inside 20px */\n height: ", ";\n padding: ", ";\n font: ", ";\n font-weight: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"], ["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n\n /* Size (decision 0018): small has no vertical padding so the text line fits inside 20px */\n height: ", ";\n padding: ", ";\n font: ", ";\n font-weight: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"
|
|
2154
2272
|
/**
|
|
2155
2273
|
* Tag component for categorizing and labeling content
|
|
2156
2274
|
*
|
|
2157
2275
|
* A static, non-interactive label used to categorize elements or objects in the UI.
|
|
2158
2276
|
* Tags help users quickly identify and understand content classification.
|
|
2159
|
-
*/])), radius.sm,
|
|
2277
|
+
*/])), radius.sm, function (_a) {
|
|
2278
|
+
var $size = _a.$size;
|
|
2279
|
+
return size$1.label[$size];
|
|
2280
|
+
}, function (_a) {
|
|
2281
|
+
var $size = _a.$size;
|
|
2282
|
+
return $size === 'small' ? "0 ".concat(layout$3.sm) : "".concat(layout$3.xs, " ").concat(layout$3.sm);
|
|
2283
|
+
}, label.typography.small, label.fontWeight, function (_a) {
|
|
2160
2284
|
var $variant = _a.$variant;
|
|
2161
2285
|
switch ($variant) {
|
|
2162
2286
|
case 'interactive':
|
|
2163
|
-
return color$
|
|
2287
|
+
return color$5.background['interactive-subtle'];
|
|
2164
2288
|
case 'success':
|
|
2165
|
-
return color$
|
|
2289
|
+
return color$5.background['success-subtle'];
|
|
2166
2290
|
case 'warning':
|
|
2167
|
-
return color$
|
|
2291
|
+
return color$5.background['warning-subtle'];
|
|
2168
2292
|
case 'error':
|
|
2169
|
-
return color$
|
|
2293
|
+
return color$5.background['error-subtle'];
|
|
2170
2294
|
case 'emphasis':
|
|
2171
|
-
return color$
|
|
2295
|
+
return color$5.background.emphasis;
|
|
2172
2296
|
default:
|
|
2173
|
-
return color$
|
|
2297
|
+
return color$5.background.surface;
|
|
2174
2298
|
}
|
|
2175
2299
|
}, function (_a) {
|
|
2176
2300
|
var $variant = _a.$variant;
|
|
2177
2301
|
switch ($variant) {
|
|
2178
2302
|
case 'interactive':
|
|
2179
|
-
return color$
|
|
2303
|
+
return color$5.text.interactive;
|
|
2180
2304
|
case 'success':
|
|
2181
|
-
return color$
|
|
2305
|
+
return color$5.text.success;
|
|
2182
2306
|
case 'warning':
|
|
2183
|
-
return color$
|
|
2307
|
+
return color$5.text.warning;
|
|
2184
2308
|
case 'error':
|
|
2185
|
-
return color$
|
|
2309
|
+
return color$5.text.error;
|
|
2186
2310
|
case 'emphasis':
|
|
2187
|
-
return color$
|
|
2311
|
+
return color$5.text.inverse;
|
|
2188
2312
|
default:
|
|
2189
|
-
return color$
|
|
2313
|
+
return color$5.text["default"];
|
|
2190
2314
|
}
|
|
2191
2315
|
}, function (_a) {
|
|
2192
2316
|
var $variant = _a.$variant,
|
|
@@ -2194,17 +2318,17 @@ var StyledTag = styled__default.default.span.withConfig({
|
|
|
2194
2318
|
if (!$border) return 'none';
|
|
2195
2319
|
switch ($variant) {
|
|
2196
2320
|
case 'interactive':
|
|
2197
|
-
return "".concat(semantic$
|
|
2321
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.interactive);
|
|
2198
2322
|
case 'success':
|
|
2199
|
-
return "".concat(semantic$
|
|
2323
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.success);
|
|
2200
2324
|
case 'warning':
|
|
2201
|
-
return "".concat(semantic$
|
|
2325
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.warning);
|
|
2202
2326
|
case 'error':
|
|
2203
|
-
return "".concat(semantic$
|
|
2327
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.error);
|
|
2204
2328
|
case 'emphasis':
|
|
2205
|
-
return "".concat(semantic$
|
|
2329
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.background.emphasis);
|
|
2206
2330
|
default:
|
|
2207
|
-
return "".concat(semantic$
|
|
2331
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border["default"]);
|
|
2208
2332
|
}
|
|
2209
2333
|
});
|
|
2210
2334
|
/**
|
|
@@ -2219,11 +2343,14 @@ var Tag = function Tag(_a) {
|
|
|
2219
2343
|
variant = _b === void 0 ? 'default' : _b,
|
|
2220
2344
|
_c = _a.border,
|
|
2221
2345
|
border = _c === void 0 ? true : _c,
|
|
2346
|
+
_d = _a.size,
|
|
2347
|
+
tagSize = _d === void 0 ? 'medium' : _d,
|
|
2222
2348
|
dataTestId = _a["data-testid"],
|
|
2223
|
-
props = __rest(_a, ["children", "variant", "border", 'data-testid']);
|
|
2349
|
+
props = __rest(_a, ["children", "variant", "border", "size", 'data-testid']);
|
|
2224
2350
|
return jsxRuntime.jsx(StyledTag, __assign({
|
|
2225
2351
|
"$variant": variant,
|
|
2226
2352
|
"$border": border,
|
|
2353
|
+
"$size": tagSize,
|
|
2227
2354
|
"data-testid": dataTestId,
|
|
2228
2355
|
"data-variant": variant,
|
|
2229
2356
|
"data-border": border,
|
|
@@ -2233,24 +2360,24 @@ var Tag = function Tag(_a) {
|
|
|
2233
2360
|
children: children
|
|
2234
2361
|
}));
|
|
2235
2362
|
};
|
|
2236
|
-
var templateObject_1$
|
|
2363
|
+
var templateObject_1$u;
|
|
2237
2364
|
|
|
2238
2365
|
// Destructure tokens for cleaner access
|
|
2239
|
-
var semantic$
|
|
2240
|
-
var spacing$
|
|
2241
|
-
var layout$2 = spacing$
|
|
2366
|
+
var semantic$c = data.tokensJson.semantic;
|
|
2367
|
+
var spacing$4 = semantic$c.spacing;
|
|
2368
|
+
var layout$2 = spacing$4.layout;
|
|
2242
2369
|
var StyledBalanceSection = styled__default.default.div.withConfig({
|
|
2243
2370
|
displayName: "AccountCard__StyledBalanceSection",
|
|
2244
2371
|
componentId: "sc-1erp7zn-0"
|
|
2245
|
-
})(templateObject_1$
|
|
2372
|
+
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), layout$2.lg);
|
|
2246
2373
|
var StyledTrendSection = styled__default.default.div.withConfig({
|
|
2247
2374
|
displayName: "AccountCard__StyledTrendSection",
|
|
2248
2375
|
componentId: "sc-1erp7zn-1"
|
|
2249
|
-
})(templateObject_2$
|
|
2376
|
+
})(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n"])), layout$2.xs);
|
|
2250
2377
|
styled__default.default.div.withConfig({
|
|
2251
2378
|
displayName: "AccountCard__StyledActions",
|
|
2252
2379
|
componentId: "sc-1erp7zn-2"
|
|
2253
|
-
})(templateObject_3$
|
|
2380
|
+
})(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n display: flex;\n gap: ", ";\n margin-top: auto;\n"], ["\n display: flex;\n gap: ", ";\n margin-top: auto;\n"])), layout$2.sm);
|
|
2254
2381
|
var StyledStackWrapper = styled__default.default.div.withConfig({
|
|
2255
2382
|
displayName: "AccountCard__StyledStackWrapper",
|
|
2256
2383
|
componentId: "sc-1erp7zn-3"
|
|
@@ -2314,7 +2441,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2314
2441
|
bg: "subtle",
|
|
2315
2442
|
border: "default",
|
|
2316
2443
|
borderRadius: "xl",
|
|
2317
|
-
transition: "box-shadow ".concat(semantic$
|
|
2444
|
+
transition: "box-shadow ".concat(semantic$c.motion.duration.normal, " ").concat(semantic$c.motion.easing.easeOut),
|
|
2318
2445
|
cursor: isClickable ? 'pointer' : 'default',
|
|
2319
2446
|
hoverShadow: isClickable ? 'floating' : undefined,
|
|
2320
2447
|
onClick: handleClick,
|
|
@@ -2368,8 +2495,8 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2368
2495
|
}), trend && trendValue && jsxRuntime.jsx(StyledTrendSection, {
|
|
2369
2496
|
"aria-label": "Trend ".concat(trend),
|
|
2370
2497
|
role: "img",
|
|
2371
|
-
children: jsxRuntime.jsx(
|
|
2372
|
-
size: "
|
|
2498
|
+
children: jsxRuntime.jsx(CategoryLabel, {
|
|
2499
|
+
size: "medium",
|
|
2373
2500
|
icon: trendIcon,
|
|
2374
2501
|
color: trendColor,
|
|
2375
2502
|
variant: "minimal",
|
|
@@ -2409,10 +2536,16 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2409
2536
|
})
|
|
2410
2537
|
});
|
|
2411
2538
|
};
|
|
2412
|
-
var templateObject_1$
|
|
2539
|
+
var templateObject_1$t, templateObject_2$o, templateObject_3$m, templateObject_4$i, templateObject_5$f;
|
|
2413
2540
|
|
|
2414
|
-
|
|
2415
|
-
|
|
2541
|
+
/**
|
|
2542
|
+
* The spacing a List gives its items (#77). A ListItem without its own `spacing` uses it; outside
|
|
2543
|
+
* a List it's `comfortable`. Internal: not exported from the package.
|
|
2544
|
+
*/
|
|
2545
|
+
var ListSpacingContext = /*#__PURE__*/React.createContext('comfortable');
|
|
2546
|
+
|
|
2547
|
+
var semantic$b = data.tokensJson.semantic;
|
|
2548
|
+
var _a$5 = semantic$b.motion,
|
|
2416
2549
|
duration$2 = _a$5.duration,
|
|
2417
2550
|
easing$2 = _a$5.easing;
|
|
2418
2551
|
var StyledListItem = styled__default.default.li.withConfig({
|
|
@@ -2421,16 +2554,16 @@ var StyledListItem = styled__default.default.li.withConfig({
|
|
|
2421
2554
|
},
|
|
2422
2555
|
displayName: "ListItem__StyledListItem",
|
|
2423
2556
|
componentId: "sc-1wzzt21-0"
|
|
2424
|
-
})(templateObject_1$
|
|
2557
|
+
})(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-height: ", ";\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: ", ";\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"])), semantic$b.size.touchTarget, function (_a) {
|
|
2425
2558
|
var $interactive = _a.$interactive;
|
|
2426
2559
|
return $interactive && 'user-select: none;';
|
|
2427
2560
|
}, function (_a) {
|
|
2428
2561
|
var $disabled = _a.$disabled;
|
|
2429
|
-
return $disabled && "\n opacity: ".concat(semantic$
|
|
2562
|
+
return $disabled && "\n opacity: ".concat(semantic$b.opacity.disabled, ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
2430
2563
|
}, function (_a) {
|
|
2431
2564
|
var $destructive = _a.$destructive,
|
|
2432
2565
|
$disabled = _a.$disabled;
|
|
2433
|
-
return $destructive && !$disabled && "\n color: ".concat(semantic$
|
|
2566
|
+
return $destructive && !$disabled && "\n color: ".concat(semantic$b.color.text.error, ";\n ");
|
|
2434
2567
|
});
|
|
2435
2568
|
var StyledItemContent = styled__default.default.div.withConfig({
|
|
2436
2569
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2438,12 +2571,12 @@ var StyledItemContent = styled__default.default.div.withConfig({
|
|
|
2438
2571
|
},
|
|
2439
2572
|
displayName: "ListItem__StyledItemContent",
|
|
2440
2573
|
componentId: "sc-1wzzt21-1"
|
|
2441
|
-
})(templateObject_2$
|
|
2574
|
+
})(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n background-color: ", ";\n transition: background-color ", " ", ";\n cursor: ", ";\n \n /* Interactive hover states */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n"], ["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n background-color: ", ";\n transition: background-color ", " ", ";\n cursor: ", ";\n \n /* Interactive hover states */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n"])), semantic$b.spacing.layout.md, function (_a) {
|
|
2442
2575
|
var $spacing = _a.$spacing;
|
|
2443
|
-
return $spacing === 'compact' ? "".concat(semantic$
|
|
2444
|
-
}, semantic$
|
|
2576
|
+
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);
|
|
2577
|
+
}, semantic$b.border.radius.sm, function (_a) {
|
|
2445
2578
|
var $selected = _a.$selected;
|
|
2446
|
-
return $selected ? semantic$
|
|
2579
|
+
return $selected ? semantic$b.color.background['interactive-subtle'] : 'transparent';
|
|
2447
2580
|
}, duration$2.fast, easing$2.easeOut, function (_a) {
|
|
2448
2581
|
var $interactive = _a.$interactive,
|
|
2449
2582
|
$disabled = _a.$disabled;
|
|
@@ -2455,26 +2588,26 @@ var StyledItemContent = styled__default.default.div.withConfig({
|
|
|
2455
2588
|
$disabled = _a.$disabled,
|
|
2456
2589
|
$selected = _a.$selected;
|
|
2457
2590
|
return !$disabled && $interactive && "\n &:hover {\n background-color: ".concat($selected ? data.tokensJson.component.button.variants.secondary.backgroundColor : data.tokensJson.component.button.variants.secondary.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat(data.tokensJson.component.button.variants.naked.backgroundColor, ";\n }\n ");
|
|
2458
|
-
}, semantic$
|
|
2591
|
+
}, semantic$b.border.width.thick, semantic$b.color.border.interactive, semantic$b.border.focusOffset);
|
|
2459
2592
|
var StyledIconContainer$1 = styled__default.default.div.withConfig({
|
|
2460
2593
|
displayName: "ListItem__StyledIconContainer",
|
|
2461
2594
|
componentId: "sc-1wzzt21-2"
|
|
2462
|
-
})(templateObject_3$
|
|
2595
|
+
})(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width: ", ";\n height: ", ";\n"], ["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width: ", ";\n height: ", ";\n"])), semantic$b.size.icon.lg, semantic$b.size.icon.lg);
|
|
2463
2596
|
var StyledTextContent = styled__default.default.div.withConfig({
|
|
2464
2597
|
displayName: "ListItem__StyledTextContent",
|
|
2465
2598
|
componentId: "sc-1wzzt21-3"
|
|
2466
|
-
})(templateObject_4$h || (templateObject_4$h = __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$
|
|
2599
|
+
})(templateObject_4$h || (templateObject_4$h = __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);
|
|
2467
2600
|
var StyledRightContent = styled__default.default.div.withConfig({
|
|
2468
2601
|
displayName: "ListItem__StyledRightContent",
|
|
2469
2602
|
componentId: "sc-1wzzt21-4"
|
|
2470
|
-
})(templateObject_5$e || (templateObject_5$e = __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$
|
|
2603
|
+
})(templateObject_5$e || (templateObject_5$e = __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);
|
|
2471
2604
|
var StyledChevronIcon = styled__default.default.div.withConfig({
|
|
2472
2605
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2473
2606
|
return !prop.startsWith('$');
|
|
2474
2607
|
},
|
|
2475
2608
|
displayName: "ListItem__StyledChevronIcon",
|
|
2476
2609
|
componentId: "sc-1wzzt21-5"
|
|
2477
|
-
})(templateObject_6$b || (templateObject_6$b = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n color: ", ";\n transition: transform ", " ", ";\n transform: rotate(", ");\n pointer-events: none;\n\n ", " {\n transition: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n color: ", ";\n transition: transform ", " ", ";\n transform: rotate(", ");\n pointer-events: none;\n\n ", " {\n transition: none;\n }\n"])), semantic$
|
|
2610
|
+
})(templateObject_6$b || (templateObject_6$b = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n color: ", ";\n transition: transform ", " ", ";\n transform: rotate(", ");\n pointer-events: none;\n\n ", " {\n transition: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n color: ", ";\n transition: transform ", " ", ";\n transform: rotate(", ");\n pointer-events: none;\n\n ", " {\n transition: none;\n }\n"])), semantic$b.size.icon.lg, semantic$b.size.icon.lg, semantic$b.color.icon.subdued, duration$2.fast, easing$2.easeOut, function (_a) {
|
|
2478
2611
|
var $expanded = _a.$expanded;
|
|
2479
2612
|
return $expanded ? '180deg' : '0deg';
|
|
2480
2613
|
}, reducedMotion);
|
|
@@ -2496,7 +2629,7 @@ var StyledExpandedContent = styled__default.default.div.withConfig({
|
|
|
2496
2629
|
}, reducedMotion, duration$2.normal, easing$2.easeOut, duration$2.normal, easing$2.easeOut, function (_a) {
|
|
2497
2630
|
var $expanded = _a.$expanded,
|
|
2498
2631
|
$spacing = _a.$spacing;
|
|
2499
|
-
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$
|
|
2632
|
+
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, " ").concat(data.tokensJson.component.listItem.expandedIndent.compact) : "".concat(semantic$b.spacing.layout.sm, " ").concat(semantic$b.spacing.layout.lg, " ").concat(semantic$b.spacing.layout.md, " ").concat(data.tokensJson.component.listItem.expandedIndent.comfortable), ";\n background-color: ").concat(semantic$b.color.background['subtle'], ";\n border-radius: ").concat(semantic$b.border.radius.sm, ";\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 ");
|
|
2500
2633
|
});
|
|
2501
2634
|
var ListItem = function ListItem(_a) {
|
|
2502
2635
|
var primary = _a.primary,
|
|
@@ -2517,8 +2650,7 @@ var ListItem = function ListItem(_a) {
|
|
|
2517
2650
|
selected = _f === void 0 ? false : _f,
|
|
2518
2651
|
_g = _a.destructive,
|
|
2519
2652
|
destructive = _g === void 0 ? false : _g,
|
|
2520
|
-
|
|
2521
|
-
spacing = _h === void 0 ? 'comfortable' : _h,
|
|
2653
|
+
spacingProp = _a.spacing,
|
|
2522
2654
|
children = _a.children,
|
|
2523
2655
|
className = _a.className,
|
|
2524
2656
|
dataTestId = _a["data-testid"],
|
|
@@ -2528,6 +2660,8 @@ var ListItem = function ListItem(_a) {
|
|
|
2528
2660
|
customTabIndex = _a.tabIndex,
|
|
2529
2661
|
customOnKeyDown = _a.onKeyDown,
|
|
2530
2662
|
props = __rest(_a, ["primary", "secondary", "badge", "icon", "expandable", "expanded", "onToggle", "interactive", "onClick", "disabled", "selected", "destructive", "spacing", "children", "className", 'data-testid', "role", 'aria-selected', "id", "tabIndex", "onKeyDown"]);
|
|
2663
|
+
var listSpacing = React.useContext(ListSpacingContext);
|
|
2664
|
+
var spacing = spacingProp !== null && spacingProp !== void 0 ? spacingProp : listSpacing;
|
|
2531
2665
|
var isInteractive = interactive || expandable || customRole === 'option';
|
|
2532
2666
|
var contentRole = customRole === 'option' ? undefined : isInteractive ? 'button' : undefined;
|
|
2533
2667
|
var ariaExpanded = expandable ? expanded : undefined;
|
|
@@ -2552,64 +2686,72 @@ var ListItem = function ListItem(_a) {
|
|
|
2552
2686
|
handleClick();
|
|
2553
2687
|
}
|
|
2554
2688
|
};
|
|
2555
|
-
return
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2689
|
+
return (
|
|
2690
|
+
// The List's spacing is for its own items: reset it for this item's content, so components
|
|
2691
|
+
// built on ListItem (ActionSheet, even through its portal) and expanded content keep their own
|
|
2692
|
+
// density. A nested List provides its own spacing (#77)
|
|
2693
|
+
jsxRuntime.jsx(ListSpacingContext.Provider, {
|
|
2694
|
+
value: "comfortable",
|
|
2695
|
+
children: jsxRuntime.jsxs(StyledListItem, __assign({
|
|
2696
|
+
"$interactive": isInteractive,
|
|
2697
|
+
"$disabled": disabled,
|
|
2698
|
+
"$selected": selected,
|
|
2699
|
+
"$destructive": destructive,
|
|
2700
|
+
"$spacing": spacing,
|
|
2701
|
+
className: className,
|
|
2702
|
+
"data-testid": dataTestId,
|
|
2703
|
+
role: customRole || 'listitem',
|
|
2704
|
+
id: id,
|
|
2705
|
+
"aria-selected": ariaSelected
|
|
2706
|
+
}, props, {
|
|
2707
|
+
children: [jsxRuntime.jsxs(StyledItemContent, {
|
|
2708
|
+
"$interactive": isInteractive,
|
|
2709
|
+
"$disabled": disabled,
|
|
2710
|
+
"$selected": selected,
|
|
2711
|
+
"$destructive": destructive,
|
|
2712
|
+
"$spacing": spacing,
|
|
2713
|
+
role: contentRole,
|
|
2714
|
+
"aria-expanded": ariaExpanded,
|
|
2715
|
+
"aria-disabled": ariaDisabled,
|
|
2716
|
+
"aria-current": ariaCurrent,
|
|
2717
|
+
tabIndex: customTabIndex !== undefined ? customTabIndex : isInteractive && !disabled ? 0 : undefined,
|
|
2718
|
+
onClick: handleClick,
|
|
2719
|
+
onKeyDown: handleKeyDown,
|
|
2720
|
+
children: [icon && jsxRuntime.jsx(StyledIconContainer$1, {
|
|
2721
|
+
"aria-hidden": "true",
|
|
2722
|
+
children: icon
|
|
2723
|
+
}), jsxRuntime.jsxs(StyledTextContent, {
|
|
2724
|
+
children: [jsxRuntime.jsx(Typography, {
|
|
2725
|
+
variant: "body",
|
|
2726
|
+
color: destructive ? 'error' : 'default',
|
|
2727
|
+
children: primary
|
|
2728
|
+
}), secondary && jsxRuntime.jsx(Typography, {
|
|
2729
|
+
variant: "small",
|
|
2730
|
+
color: "subdued",
|
|
2731
|
+
children: secondary
|
|
2732
|
+
})]
|
|
2733
|
+
}), jsxRuntime.jsxs(StyledRightContent, {
|
|
2734
|
+
children: [badge, expandable && jsxRuntime.jsx(StyledChevronIcon, {
|
|
2735
|
+
"$expanded": expanded,
|
|
2736
|
+
"aria-hidden": "true",
|
|
2737
|
+
children: jsxRuntime.jsx(Icon, {
|
|
2738
|
+
name: "caretDown",
|
|
2739
|
+
size: "sm"
|
|
2740
|
+
})
|
|
2741
|
+
})]
|
|
2742
|
+
})]
|
|
2743
|
+
}), expandable && children && jsxRuntime.jsx(StyledExpandedContent, {
|
|
2744
|
+
"$spacing": spacing,
|
|
2595
2745
|
"$expanded": expanded,
|
|
2596
|
-
"aria-hidden":
|
|
2597
|
-
children:
|
|
2598
|
-
name: "caretDown",
|
|
2599
|
-
size: "sm"
|
|
2600
|
-
})
|
|
2746
|
+
"aria-hidden": !expanded,
|
|
2747
|
+
children: children
|
|
2601
2748
|
})]
|
|
2602
|
-
})
|
|
2603
|
-
})
|
|
2604
|
-
|
|
2605
|
-
"$expanded": expanded,
|
|
2606
|
-
"aria-hidden": !expanded,
|
|
2607
|
-
children: children
|
|
2608
|
-
})]
|
|
2609
|
-
}));
|
|
2749
|
+
}))
|
|
2750
|
+
})
|
|
2751
|
+
);
|
|
2610
2752
|
};
|
|
2611
2753
|
ListItem.displayName = 'ListItem';
|
|
2612
|
-
var templateObject_1$
|
|
2754
|
+
var templateObject_1$s, templateObject_2$n, templateObject_3$l, templateObject_4$h, templateObject_5$e, templateObject_6$b, templateObject_7$9;
|
|
2613
2755
|
|
|
2614
2756
|
// How long an exiting element stays mounted: the duration of `exitAnimation` in styleUtils.
|
|
2615
2757
|
var EXIT_DURATION_MS = parseInt(data.tokensJson.semantic.motion.duration.fast, 10);
|
|
@@ -2655,24 +2797,24 @@ function useInert(ref, isInert) {
|
|
|
2655
2797
|
}
|
|
2656
2798
|
|
|
2657
2799
|
var _a$4 = data.tokensJson.semantic,
|
|
2658
|
-
color$
|
|
2800
|
+
color$4 = _a$4.color,
|
|
2659
2801
|
border$5 = _a$4.border,
|
|
2660
2802
|
layout$1 = _a$4.spacing.layout,
|
|
2661
2803
|
motion$3 = _a$4.motion,
|
|
2662
2804
|
elevation$2 = _a$4.elevation;
|
|
2663
|
-
var slideUp = styled.keyframes(templateObject_1$
|
|
2664
|
-
var fadeIn$2 = styled.keyframes(templateObject_2$
|
|
2805
|
+
var slideUp = styled.keyframes(templateObject_1$r || (templateObject_1$r = __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"])));
|
|
2806
|
+
var fadeIn$2 = styled.keyframes(templateObject_2$m || (templateObject_2$m = __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"])));
|
|
2665
2807
|
var StyledOverlay$2 = styled__default.default.div.withConfig({
|
|
2666
2808
|
displayName: "ActionSheet__StyledOverlay",
|
|
2667
2809
|
componentId: "sc-regbol-0"
|
|
2668
|
-
})(templateObject_3$
|
|
2810
|
+
})(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n animation: ", " ", " ", "", ";\n"], ["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n animation: ", " ", " ", "", ";\n"])), color$4.background.overlay, data.tokensJson.semantic.zIndex.modal, fadeIn$2, motion$3.duration.normal, motion$3.easing.easeOut, function (_a) {
|
|
2669
2811
|
var $isExiting = _a.$isExiting;
|
|
2670
2812
|
return $isExiting && exitAnimation;
|
|
2671
2813
|
});
|
|
2672
2814
|
var StyledActionSheet = styled__default.default.div.withConfig({
|
|
2673
2815
|
displayName: "ActionSheet__StyledActionSheet",
|
|
2674
2816
|
componentId: "sc-regbol-1"
|
|
2675
|
-
})(templateObject_4$g || (templateObject_4$g = __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: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\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: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"])), color$
|
|
2817
|
+
})(templateObject_4$g || (templateObject_4$g = __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: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\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: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"])), color$4.background.subtle, border$5.radius.lg, border$5.radius.lg, elevation$2.overlay, data.tokensJson.semantic.zIndex.modal, slideUp, motion$3.duration.slow, motion$3.easing.easeOut, function (_a) {
|
|
2676
2818
|
var $isExiting = _a.$isExiting;
|
|
2677
2819
|
return $isExiting && exitAnimation;
|
|
2678
2820
|
}, reducedMotion, fadeIn$2, motion$3.duration.slow, motion$3.easing.easeOut, function (_a) {
|
|
@@ -2690,7 +2832,7 @@ var StyledHeaderContent = styled__default.default.div.withConfig({
|
|
|
2690
2832
|
var StyledCloseButton = styled__default.default.button.withConfig({
|
|
2691
2833
|
displayName: "ActionSheet__StyledCloseButton",
|
|
2692
2834
|
componentId: "sc-regbol-4"
|
|
2693
|
-
})(templateObject_7$8 || (templateObject_7$8 = __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$1.sm, color$
|
|
2835
|
+
})(templateObject_7$8 || (templateObject_7$8 = __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$1.sm, color$4.icon.subdued, border$5.radius.sm, motion$3.hover, layout$1.sm, color$4.icon["default"], color$4.background.surface, border$5.focus, layout$1.xs);
|
|
2694
2836
|
var StyledActionsList = styled__default.default.ul.withConfig({
|
|
2695
2837
|
displayName: "ActionSheet__StyledActionsList",
|
|
2696
2838
|
componentId: "sc-regbol-5"
|
|
@@ -2917,7 +3059,7 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2917
3059
|
})]
|
|
2918
3060
|
}), document.body);
|
|
2919
3061
|
};
|
|
2920
|
-
var templateObject_1$
|
|
3062
|
+
var templateObject_1$r, templateObject_2$m, templateObject_3$k, templateObject_4$g, templateObject_5$d, templateObject_6$a, templateObject_7$8, templateObject_8$7;
|
|
2921
3063
|
|
|
2922
3064
|
function detectSpeechRecognitionConstructor(targetWindow) {
|
|
2923
3065
|
if (!targetWindow) return null;
|
|
@@ -3017,36 +3159,36 @@ function agentInputStateTransition(currentState, event) {
|
|
|
3017
3159
|
}
|
|
3018
3160
|
}
|
|
3019
3161
|
|
|
3020
|
-
var semantic$
|
|
3162
|
+
var semantic$a = data.tokensJson.semantic,
|
|
3021
3163
|
component$1 = data.tokensJson.component;
|
|
3022
3164
|
var DEFAULT_IDLE_HELPER = 'Ask about transactions, spending, or transfers';
|
|
3023
3165
|
var DEFAULT_LISTENING_MESSAGE = 'Listening… speak now';
|
|
3024
3166
|
var DEFAULT_PROCESSING_MESSAGE = 'Finishing voice input…';
|
|
3025
|
-
var rotateRing = styled.keyframes(templateObject_1$
|
|
3167
|
+
var rotateRing = styled.keyframes(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"], ["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
3026
3168
|
var Container = styled__default.default.div.withConfig({
|
|
3027
3169
|
displayName: "AgentInput__Container",
|
|
3028
3170
|
componentId: "sc-fhl996-0"
|
|
3029
|
-
})(templateObject_2$
|
|
3171
|
+
})(templateObject_2$l || (templateObject_2$l = __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"])), semantic$a.spacing.layout.sm);
|
|
3030
3172
|
var ControlsRow = styled__default.default.div.withConfig({
|
|
3031
3173
|
displayName: "AgentInput__ControlsRow",
|
|
3032
3174
|
componentId: "sc-fhl996-1"
|
|
3033
|
-
})(templateObject_3$
|
|
3175
|
+
})(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
3034
3176
|
var InputShell = styled__default.default.div.withConfig({
|
|
3035
3177
|
displayName: "AgentInput__InputShell",
|
|
3036
3178
|
componentId: "sc-fhl996-2"
|
|
3037
|
-
})(templateObject_4$f || (templateObject_4$f = __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 ", " ", ", outline ", " ", ";\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 ", " ", ", outline ", " ", ";\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"])), semantic$
|
|
3179
|
+
})(templateObject_4$f || (templateObject_4$f = __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 ", " ", ", outline ", " ", ";\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 ", " ", ", outline ", " ", ";\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"])), semantic$a.spacing.layout.sm, semantic$a.spacing.layout.xs, semantic$a.spacing.layout.sm, semantic$a.spacing.layout.xs, semantic$a.spacing.component.lg, component$1.input["default"].backgroundColor, component$1.input["default"].borderWidth, component$1.input["default"].borderColor, semantic$a.border.radius['3xl'], semantic$a.elevation.raised, semantic$a.motion.duration.normal, semantic$a.motion.easing.easeInOut, semantic$a.motion.duration.normal, semantic$a.motion.easing.easeInOut, component$1.input.focus.borderColor, component$1.input.focus.outline, semantic$a.border.focusOffset, component$1.input.disabled.backgroundColor, component$1.input.disabled.borderColor);
|
|
3038
3180
|
var Input = styled__default.default.input.withConfig({
|
|
3039
3181
|
displayName: "AgentInput__Input",
|
|
3040
3182
|
componentId: "sc-fhl996-3"
|
|
3041
|
-
})(templateObject_5$c || (templateObject_5$c = __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"])), semantic$
|
|
3183
|
+
})(templateObject_5$c || (templateObject_5$c = __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 /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\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 /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$a.spacing.layout['7xl'], semantic$a.typography.body, semantic$a.color.text["default"], component$1.input.placeholder.textColor, semantic$a.color.text.disabled);
|
|
3042
3184
|
var InputActions = styled__default.default.div.withConfig({
|
|
3043
3185
|
displayName: "AgentInput__InputActions",
|
|
3044
3186
|
componentId: "sc-fhl996-4"
|
|
3045
|
-
})(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"])), semantic$
|
|
3187
|
+
})(templateObject_6$9 || (templateObject_6$9 = __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.sm);
|
|
3046
3188
|
var CircularActionIconButton = styled__default.default(IconButton).withConfig({
|
|
3047
3189
|
displayName: "AgentInput__CircularActionIconButton",
|
|
3048
3190
|
componentId: "sc-fhl996-5"
|
|
3049
|
-
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$
|
|
3191
|
+
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$a.border.radius.circle);
|
|
3050
3192
|
var InputWrapper = styled__default.default.div.withConfig({
|
|
3051
3193
|
displayName: "AgentInput__InputWrapper",
|
|
3052
3194
|
componentId: "sc-fhl996-6"
|
|
@@ -3060,7 +3202,7 @@ var MicButtonWrapper = styled__default.default.div.withConfig({
|
|
|
3060
3202
|
})(templateObject_9$5 || (templateObject_9$5 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"], ["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"
|
|
3061
3203
|
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3062
3204
|
// eslint-disable-next-line no-restricted-syntax
|
|
3063
|
-
])), semantic$
|
|
3205
|
+
])), semantic$a.border.radius.circle);
|
|
3064
3206
|
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3065
3207
|
// eslint-disable-next-line no-restricted-syntax
|
|
3066
3208
|
var ringMask = styled.css(templateObject_10$3 || (templateObject_10$3 = __makeTemplateObject(["radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)))"], ["radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)))"])));
|
|
@@ -3070,21 +3212,21 @@ var MicListeningRing = styled__default.default.span.withConfig({
|
|
|
3070
3212
|
},
|
|
3071
3213
|
displayName: "AgentInput__MicListeningRing",
|
|
3072
3214
|
componentId: "sc-fhl996-8"
|
|
3073
|
-
})(templateObject_12$3 || (templateObject_12$3 = __makeTemplateObject(["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"], ["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"])), semantic$
|
|
3215
|
+
})(templateObject_12$3 || (templateObject_12$3 = __makeTemplateObject(["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"], ["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"])), semantic$a.border.width.thick, semantic$a.spacing.layout.xs, semantic$a.border.focusOffset, semantic$a.border.radius.circle, semantic$a.color.background['interactive-subtle'], semantic$a.color.background.interactive, semantic$a.color.background['interactive-hover'], semantic$a.color.background.interactive, semantic$a.color.background['interactive-subtle'], ringMask, ringMask, function (_a) {
|
|
3074
3216
|
var $reducedMotion = _a.$reducedMotion;
|
|
3075
3217
|
return !$reducedMotion && styled.css(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["\n animation: ", " 1300ms linear infinite;\n "], ["\n animation: ", " 1300ms linear infinite;\n "])), rotateRing);
|
|
3076
3218
|
});
|
|
3077
3219
|
var StatusRow = styled__default.default.div.withConfig({
|
|
3078
3220
|
displayName: "AgentInput__StatusRow",
|
|
3079
3221
|
componentId: "sc-fhl996-9"
|
|
3080
|
-
})(templateObject_13$
|
|
3222
|
+
})(templateObject_13$3 || (templateObject_13$3 = __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"])), semantic$a.spacing.layout.md, semantic$a.spacing.layout['2xl']);
|
|
3081
3223
|
var StatusText = styled__default.default.div.withConfig({
|
|
3082
3224
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3083
3225
|
return !prop.startsWith('$');
|
|
3084
3226
|
},
|
|
3085
3227
|
displayName: "AgentInput__StatusText",
|
|
3086
3228
|
componentId: "sc-fhl996-10"
|
|
3087
|
-
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$
|
|
3229
|
+
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$a.spacing.layout.xl);
|
|
3088
3230
|
var StatusAnnouncement = styled__default.default.div.withConfig({
|
|
3089
3231
|
displayName: "AgentInput__StatusAnnouncement",
|
|
3090
3232
|
componentId: "sc-fhl996-11"
|
|
@@ -3092,17 +3234,17 @@ var StatusAnnouncement = styled__default.default.div.withConfig({
|
|
|
3092
3234
|
var MeterContainer = styled__default.default.div.withConfig({
|
|
3093
3235
|
displayName: "AgentInput__MeterContainer",
|
|
3094
3236
|
componentId: "sc-fhl996-12"
|
|
3095
|
-
})(templateObject_16$1 || (templateObject_16$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"])), semantic$
|
|
3237
|
+
})(templateObject_16$1 || (templateObject_16$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"])), semantic$a.spacing.layout.xs, semantic$a.spacing.layout.lg);
|
|
3096
3238
|
var MeterBar = styled__default.default.div.withConfig({
|
|
3097
3239
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3098
3240
|
return !prop.startsWith('$');
|
|
3099
3241
|
},
|
|
3100
3242
|
displayName: "AgentInput__MeterBar",
|
|
3101
3243
|
componentId: "sc-fhl996-13"
|
|
3102
|
-
})(templateObject_17$1 || (templateObject_17$1 = __makeTemplateObject(["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"], ["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"])), semantic$
|
|
3244
|
+
})(templateObject_17$1 || (templateObject_17$1 = __makeTemplateObject(["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"], ["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"])), semantic$a.spacing.layout.xs, semantic$a.border.radius.xs, semantic$a.color.background.interactive, function (_a) {
|
|
3103
3245
|
var $height = _a.$height;
|
|
3104
3246
|
return "".concat($height * 100, "%");
|
|
3105
|
-
}, semantic$
|
|
3247
|
+
}, semantic$a.motion.duration.fast, semantic$a.motion.easing.easeOut);
|
|
3106
3248
|
var VisuallyHiddenLabel = styled__default.default.label.withConfig({
|
|
3107
3249
|
displayName: "AgentInput__VisuallyHiddenLabel",
|
|
3108
3250
|
componentId: "sc-fhl996-14"
|
|
@@ -3735,11 +3877,11 @@ var AgentInput = function AgentInput(_a) {
|
|
|
3735
3877
|
})]
|
|
3736
3878
|
});
|
|
3737
3879
|
};
|
|
3738
|
-
var templateObject_1$
|
|
3880
|
+
var templateObject_1$q, templateObject_2$l, templateObject_3$j, templateObject_4$f, templateObject_5$c, templateObject_6$9, templateObject_7$7, templateObject_8$6, templateObject_9$5, templateObject_10$3, templateObject_11$3, templateObject_12$3, templateObject_13$3, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1;
|
|
3739
3881
|
|
|
3740
|
-
var semantic$
|
|
3882
|
+
var semantic$9 = data.tokensJson.semantic;
|
|
3741
3883
|
var alert = data.tokensJson.component.alert;
|
|
3742
|
-
var _a$3 = semantic$
|
|
3884
|
+
var _a$3 = semantic$9.motion,
|
|
3743
3885
|
duration$1 = _a$3.duration,
|
|
3744
3886
|
easing$1 = _a$3.easing;
|
|
3745
3887
|
// Dismissing fades the alert out, then collapses the space it took (Ollie's call, #35).
|
|
@@ -3748,8 +3890,8 @@ var FADE_MS = parseInt(duration$1.fast, 10);
|
|
|
3748
3890
|
var EXIT_MS = FADE_MS * 2;
|
|
3749
3891
|
// The --alert-exit-* properties are the alert's height and vertical padding, measured
|
|
3750
3892
|
// when it's dismissed, so nothing moves until the fade has finished
|
|
3751
|
-
var fadeThenCollapse = styled.keyframes(templateObject_1$
|
|
3752
|
-
var fadeOut = styled.keyframes(templateObject_2$
|
|
3893
|
+
var fadeThenCollapse = styled.keyframes(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n 0%, 50% {\n max-height: var(--alert-exit-height);\n padding-top: var(--alert-exit-padding-top);\n padding-bottom: var(--alert-exit-padding-bottom);\n border-width: ", ";\n }\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n border-width: 0;\n }\n"], ["\n 0%, 50% {\n max-height: var(--alert-exit-height);\n padding-top: var(--alert-exit-padding-top);\n padding-bottom: var(--alert-exit-padding-bottom);\n border-width: ", ";\n }\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n border-width: 0;\n }\n"])), semantic$9.border.width.thin);
|
|
3894
|
+
var fadeOut = styled.keyframes(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n from { opacity: 1; }\n to { opacity: 0; }\n"], ["\n from { opacity: 1; }\n to { opacity: 0; }\n"
|
|
3753
3895
|
// The exit ends on the alert's own animationend: 300ms, or 150ms under reduced motion
|
|
3754
3896
|
// (chosen when dismissed). A timer of the same length removes it if no animation event
|
|
3755
3897
|
// arrives, for example where animations are disabled or the tab is hidden.
|
|
@@ -3761,7 +3903,7 @@ var fadeOut = styled.keyframes(templateObject_2$j || (templateObject_2$j = __mak
|
|
|
3761
3903
|
// The generated names of the two exits (full, and reduced motion)
|
|
3762
3904
|
var EXIT_ANIMATION_NAMES = [fadeThenCollapse.getName(), fadeOut.getName()];
|
|
3763
3905
|
// Default icons by variant
|
|
3764
|
-
var variantIcons = {
|
|
3906
|
+
var variantIcons$1 = {
|
|
3765
3907
|
error: 'crossCircle',
|
|
3766
3908
|
warning: 'bell',
|
|
3767
3909
|
info: 'info',
|
|
@@ -3787,35 +3929,32 @@ var StyledAlert = styled__default.default.div.withConfig({
|
|
|
3787
3929
|
},
|
|
3788
3930
|
displayName: "Alert__StyledAlert",
|
|
3789
3931
|
componentId: "sc-18tq5d-0"
|
|
3790
|
-
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: flex;\n align-items:
|
|
3932
|
+
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"], ["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"])), function (_a) {
|
|
3791
3933
|
var $inline = _a.$inline;
|
|
3792
|
-
return $inline ?
|
|
3934
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3793
3935
|
}, function (_a) {
|
|
3794
3936
|
var $inline = _a.$inline;
|
|
3795
|
-
return $inline ? semantic$
|
|
3937
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3938
|
+
}, semantic$9.border.radius.sm, semantic$9.border.width.thin, function (_a) {
|
|
3939
|
+
var _b = _a.$variant,
|
|
3940
|
+
$variant = _b === void 0 ? 'info' : _b;
|
|
3941
|
+
return alert.severity[$variant].background;
|
|
3796
3942
|
}, function (_a) {
|
|
3943
|
+
var _b = _a.$variant,
|
|
3944
|
+
$variant = _b === void 0 ? 'info' : _b;
|
|
3945
|
+
return alert.severity[$variant].text;
|
|
3946
|
+
}, function (_a) {
|
|
3947
|
+
var _b = _a.$variant,
|
|
3948
|
+
$variant = _b === void 0 ? 'info' : _b,
|
|
3949
|
+
$appearance = _a.$appearance;
|
|
3950
|
+
return alert.appearance[$appearance].borderColor[$variant];
|
|
3951
|
+
}, semantic$9.breakpoint.md, function (_a) {
|
|
3797
3952
|
var $inline = _a.$inline;
|
|
3798
|
-
return $inline ? semantic$
|
|
3799
|
-
}, semantic$7.border.radius.sm, semantic$7.border.width.thin, function (_a) {
|
|
3800
|
-
var $variant = _a.$variant;
|
|
3801
|
-
switch ($variant) {
|
|
3802
|
-
case 'error':
|
|
3803
|
-
return "\n background-color: ".concat(semantic$7.color.background['error-subtle'], ";\n border-color: ").concat(semantic$7.color.border.error, ";\n color: ").concat(semantic$7.color.text.error, ";\n ");
|
|
3804
|
-
case 'warning':
|
|
3805
|
-
return "\n background-color: ".concat(semantic$7.color.background['warning-subtle'], ";\n border-color: ").concat(semantic$7.color.border.warning, ";\n color: ").concat(semantic$7.color.text.warning, ";\n ");
|
|
3806
|
-
case 'success':
|
|
3807
|
-
return "\n background-color: ".concat(semantic$7.color.background['success-subtle'], ";\n border-color: ").concat(semantic$7.color.border.success, ";\n color: ").concat(semantic$7.color.text.success, ";\n ");
|
|
3808
|
-
case 'info':
|
|
3809
|
-
default:
|
|
3810
|
-
return "\n background-color: ".concat(semantic$7.color.background['interactive-subtle'], ";\n border-color: ").concat(semantic$7.color.border.interactive, ";\n color: ").concat(semantic$7.color.text.interactive, ";\n ");
|
|
3811
|
-
}
|
|
3812
|
-
}, semantic$7.breakpoint.md, function (_a) {
|
|
3813
|
-
var $inline = _a.$inline;
|
|
3814
|
-
return $inline ? semantic$7.spacing.layout.sm : semantic$7.spacing.layout.lg;
|
|
3953
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.lg;
|
|
3815
3954
|
}, function (_a) {
|
|
3816
3955
|
var $isExiting = _a.$isExiting,
|
|
3817
3956
|
$reducedExit = _a.$reducedExit;
|
|
3818
|
-
return $isExiting && styled.css(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "], ["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "])), $reducedExit ? styled.css(templateObject_3$
|
|
3957
|
+
return $isExiting && styled.css(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "], ["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "])), $reducedExit ? styled.css(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), fadeOut, duration$1.fast, easing$1.easeOut) : styled.css(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["", " ", "ms ", " forwards"], ["", " ", "ms ", " forwards"])), fadeThenCollapse, EXIT_MS, easing$1.easeOut));
|
|
3819
3958
|
});
|
|
3820
3959
|
var StyledIconContainer = styled__default.default.div.withConfig({
|
|
3821
3960
|
displayName: "Alert__StyledIconContainer",
|
|
@@ -3824,47 +3963,81 @@ var StyledIconContainer = styled__default.default.div.withConfig({
|
|
|
3824
3963
|
var StyledContent$1 = styled__default.default.div.withConfig({
|
|
3825
3964
|
displayName: "Alert__StyledContent",
|
|
3826
3965
|
componentId: "sc-18tq5d-2"
|
|
3827
|
-
})(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"])), semantic$
|
|
3966
|
+
})(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"])), semantic$9.spacing.layout.xs);
|
|
3828
3967
|
var StyledTitle = styled__default.default.span.withConfig({
|
|
3829
3968
|
displayName: "Alert__StyledTitle",
|
|
3830
3969
|
componentId: "sc-18tq5d-3"
|
|
3831
3970
|
})(templateObject_9$4 || (templateObject_9$4 = __makeTemplateObject(["\n font: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin: 0;\n"], ["\n font: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin: 0;\n"])), alert.title.typography, alert.title.fontWeight, alert.title.lineHeight);
|
|
3832
|
-
var StyledMessage = styled__default.default.span.withConfig({
|
|
3971
|
+
var StyledMessage$1 = styled__default.default.span.withConfig({
|
|
3833
3972
|
displayName: "Alert__StyledMessage",
|
|
3834
3973
|
componentId: "sc-18tq5d-4"
|
|
3835
|
-
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"
|
|
3974
|
+
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"
|
|
3975
|
+
// The action follows the content, left-aligned with it, so it's read after the message
|
|
3976
|
+
// (#122). With the content's xs gap, the space above it is md: a separate step.
|
|
3977
|
+
])), alert.message.typography, alert.message.lineHeight);
|
|
3978
|
+
// The action follows the content, left-aligned with it, so it's read after the message
|
|
3979
|
+
// (#122). With the content's xs gap, the space above it is md: a separate step.
|
|
3836
3980
|
var StyledActions = styled__default.default.div.withConfig({
|
|
3837
3981
|
displayName: "Alert__StyledActions",
|
|
3838
3982
|
componentId: "sc-18tq5d-5"
|
|
3839
|
-
})(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n
|
|
3983
|
+
})(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: ", ";\n margin-top: calc(", " - ", ");\n"], ["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: ", ";\n margin-top: calc(", " - ", ");\n"
|
|
3984
|
+
// The dismiss button's centre lines up with the first line of content: the title, or the
|
|
3985
|
+
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
3986
|
+
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
3987
|
+
// padding and line height. Being in the row, it also keeps text and actions from running under it.
|
|
3988
|
+
])), semantic$9.spacing.layout.sm, semantic$9.spacing.layout.md, semantic$9.spacing.layout.xs);
|
|
3989
|
+
// The dismiss button's centre lines up with the first line of content: the title, or the
|
|
3990
|
+
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
3991
|
+
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
3992
|
+
// padding and line height. Being in the row, it also keeps text and actions from running under it.
|
|
3993
|
+
var StyledDismissSlot = styled__default.default.div.withConfig({
|
|
3994
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3995
|
+
return !prop.startsWith('$');
|
|
3996
|
+
},
|
|
3997
|
+
displayName: "Alert__StyledDismissSlot",
|
|
3998
|
+
componentId: "sc-18tq5d-6"
|
|
3999
|
+
})(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n height: ", ";\n"], ["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n height: ", ";\n"
|
|
4000
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left. The inline
|
|
4001
|
+
// alert's padding is too small for that, so its button stays inside the padding.
|
|
4002
|
+
])), function (_a) {
|
|
4003
|
+
var $lineHeight = _a.$lineHeight;
|
|
4004
|
+
return $lineHeight;
|
|
4005
|
+
});
|
|
4006
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left. The inline
|
|
4007
|
+
// alert's padding is too small for that, so its button stays inside the padding.
|
|
3840
4008
|
var StyledDismissButton = styled__default.default(IconButton).withConfig({
|
|
3841
4009
|
displayName: "Alert__StyledDismissButton",
|
|
3842
|
-
componentId: "sc-18tq5d-
|
|
3843
|
-
})(
|
|
4010
|
+
componentId: "sc-18tq5d-7"
|
|
4011
|
+
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
|
4012
|
+
var $inline = _a.$inline;
|
|
4013
|
+
return $inline ? 0 : "calc((".concat(data.tokensJson.component.iconButton.sizes.small.minWidth, " - ").concat(semantic$9.size.icon.sm, ") / -2)");
|
|
4014
|
+
});
|
|
3844
4015
|
var Alert = function Alert(_a) {
|
|
3845
4016
|
var _b = _a.variant,
|
|
3846
4017
|
variant = _b === void 0 ? 'info' : _b,
|
|
4018
|
+
_c = _a.appearance,
|
|
4019
|
+
appearance = _c === void 0 ? 'outlined' : _c,
|
|
3847
4020
|
children = _a.children,
|
|
3848
4021
|
title = _a.title,
|
|
3849
|
-
|
|
3850
|
-
dismissible =
|
|
4022
|
+
_d = _a.dismissible,
|
|
4023
|
+
dismissible = _d === void 0 ? false : _d,
|
|
3851
4024
|
onDismiss = _a.onDismiss,
|
|
3852
4025
|
action = _a.action,
|
|
3853
|
-
|
|
3854
|
-
inline =
|
|
3855
|
-
|
|
3856
|
-
ariaLive =
|
|
4026
|
+
_e = _a.inline,
|
|
4027
|
+
inline = _e === void 0 ? false : _e,
|
|
4028
|
+
_f = _a.ariaLive,
|
|
4029
|
+
ariaLive = _f === void 0 ? 'polite' : _f,
|
|
3857
4030
|
dataTestId = _a["data-testid"],
|
|
3858
|
-
props = __rest(_a, ["variant", "children", "title", "dismissible", "onDismiss", "action", "inline", "ariaLive", 'data-testid']);
|
|
3859
|
-
var
|
|
3860
|
-
phase =
|
|
3861
|
-
setPhase =
|
|
3862
|
-
var
|
|
3863
|
-
reducedExit =
|
|
3864
|
-
setReducedExit =
|
|
3865
|
-
var
|
|
3866
|
-
exitStyle =
|
|
3867
|
-
setExitStyle =
|
|
4031
|
+
props = __rest(_a, ["variant", "appearance", "children", "title", "dismissible", "onDismiss", "action", "inline", "ariaLive", 'data-testid']);
|
|
4032
|
+
var _g = React__default.default.useState('visible'),
|
|
4033
|
+
phase = _g[0],
|
|
4034
|
+
setPhase = _g[1];
|
|
4035
|
+
var _h = React__default.default.useState(false),
|
|
4036
|
+
reducedExit = _h[0],
|
|
4037
|
+
setReducedExit = _h[1];
|
|
4038
|
+
var _j = React__default.default.useState(),
|
|
4039
|
+
exitStyle = _j[0],
|
|
4040
|
+
setExitStyle = _j[1];
|
|
3868
4041
|
var alertRef = React__default.default.useRef(null);
|
|
3869
4042
|
// While it exits, its controls leave the tab order and can't be activated
|
|
3870
4043
|
useInert(alertRef, phase === 'exiting');
|
|
@@ -3921,7 +4094,7 @@ var Alert = function Alert(_a) {
|
|
|
3921
4094
|
}
|
|
3922
4095
|
};
|
|
3923
4096
|
// Get the icon for the current variant
|
|
3924
|
-
var iconName = variantIcons[variant];
|
|
4097
|
+
var iconName = variantIcons$1[variant];
|
|
3925
4098
|
var alertIconColor = variantIconColors[variant];
|
|
3926
4099
|
var alertTitleColor = variantTitleColors[variant];
|
|
3927
4100
|
// Determine ARIA role based on variant and aria-live
|
|
@@ -3930,6 +4103,7 @@ var Alert = function Alert(_a) {
|
|
|
3930
4103
|
role: role,
|
|
3931
4104
|
"aria-live": ariaLive,
|
|
3932
4105
|
"$variant": variant,
|
|
4106
|
+
"$appearance": appearance,
|
|
3933
4107
|
"$inline": inline,
|
|
3934
4108
|
"$isExiting": isExiting,
|
|
3935
4109
|
"$reducedExit": reducedExit,
|
|
@@ -3952,23 +4126,158 @@ var Alert = function Alert(_a) {
|
|
|
3952
4126
|
"aria-level": 6,
|
|
3953
4127
|
color: alertTitleColor,
|
|
3954
4128
|
children: title
|
|
3955
|
-
}), jsxRuntime.jsx(StyledMessage, {
|
|
4129
|
+
}), jsxRuntime.jsx(StyledMessage$1, {
|
|
3956
4130
|
children: children
|
|
4131
|
+
}), action && jsxRuntime.jsx(StyledActions, {
|
|
4132
|
+
children: action
|
|
3957
4133
|
})]
|
|
3958
|
-
}),
|
|
3959
|
-
|
|
4134
|
+
}), dismissible && jsxRuntime.jsx(StyledDismissSlot, {
|
|
4135
|
+
"$lineHeight": title ? alert.title.lineHeight : alert.message.lineHeight,
|
|
4136
|
+
children: jsxRuntime.jsx(StyledDismissButton, {
|
|
3960
4137
|
iconName: "close",
|
|
3961
4138
|
size: "small",
|
|
3962
4139
|
variant: "naked",
|
|
4140
|
+
"$inline": inline,
|
|
3963
4141
|
onClick: handleDismiss,
|
|
3964
4142
|
"aria-label": "Dismiss alert",
|
|
3965
4143
|
"data-testid": dataTestId ? "".concat(dataTestId, "-dismiss") : undefined
|
|
3966
|
-
})
|
|
4144
|
+
})
|
|
3967
4145
|
})]
|
|
3968
4146
|
}));
|
|
3969
4147
|
};
|
|
3970
4148
|
Alert.displayName = 'Alert';
|
|
3971
|
-
var templateObject_1$
|
|
4149
|
+
var templateObject_1$p, templateObject_2$k, templateObject_3$i, templateObject_4$e, templateObject_5$b, templateObject_6$8, templateObject_7$6, templateObject_8$5, templateObject_9$4, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2;
|
|
4150
|
+
|
|
4151
|
+
var semantic$8 = data.tokensJson.semantic;
|
|
4152
|
+
var color$3 = semantic$8.color,
|
|
4153
|
+
typography = semantic$8.typography,
|
|
4154
|
+
spacing$3 = semantic$8.spacing,
|
|
4155
|
+
size = semantic$8.size;
|
|
4156
|
+
var variantIcons = {
|
|
4157
|
+
error: 'crossCircle',
|
|
4158
|
+
warning: 'bell',
|
|
4159
|
+
info: 'info',
|
|
4160
|
+
success: 'checkRing'
|
|
4161
|
+
};
|
|
4162
|
+
var variantTextColors = {
|
|
4163
|
+
error: color$3.text.error,
|
|
4164
|
+
warning: color$3.text.warning,
|
|
4165
|
+
info: color$3.text.interactive,
|
|
4166
|
+
success: color$3.text.success
|
|
4167
|
+
};
|
|
4168
|
+
var sizeConfig = {
|
|
4169
|
+
small: {
|
|
4170
|
+
font: typography.caption,
|
|
4171
|
+
gap: spacing$3.layout.xs,
|
|
4172
|
+
icon: 'xs'
|
|
4173
|
+
},
|
|
4174
|
+
medium: {
|
|
4175
|
+
font: typography.small,
|
|
4176
|
+
gap: spacing$3.layout.sm,
|
|
4177
|
+
icon: 'sm'
|
|
4178
|
+
}
|
|
4179
|
+
};
|
|
4180
|
+
var StyledInlineAlert = styled__default.default.div.withConfig({
|
|
4181
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4182
|
+
return !prop.startsWith('$');
|
|
4183
|
+
},
|
|
4184
|
+
displayName: "InlineAlert__StyledInlineAlert",
|
|
4185
|
+
componentId: "sc-eervmb-0"
|
|
4186
|
+
})(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: flex-start;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: flex-start;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n"
|
|
4187
|
+
// One line of the message's font tall, so the icon centres on the first line at any size:
|
|
4188
|
+
// the zero-width space gives the box the font's line height without a fixed value
|
|
4189
|
+
])), function (_a) {
|
|
4190
|
+
var $size = _a.$size,
|
|
4191
|
+
$empty = _a.$empty;
|
|
4192
|
+
return $empty ? '0' : size.label[$size];
|
|
4193
|
+
}, function (_a) {
|
|
4194
|
+
var $size = _a.$size;
|
|
4195
|
+
return sizeConfig[$size].gap;
|
|
4196
|
+
}, function (_a) {
|
|
4197
|
+
var $size = _a.$size;
|
|
4198
|
+
return sizeConfig[$size].font;
|
|
4199
|
+
}, function (_a) {
|
|
4200
|
+
var $variant = _a.$variant;
|
|
4201
|
+
return variantTextColors[$variant];
|
|
4202
|
+
});
|
|
4203
|
+
// One line of the message's font tall, so the icon centres on the first line at any size:
|
|
4204
|
+
// the zero-width space gives the box the font's line height without a fixed value
|
|
4205
|
+
var StyledIconLine = styled__default.default.span.withConfig({
|
|
4206
|
+
displayName: "InlineAlert__StyledIconLine",
|
|
4207
|
+
componentId: "sc-eervmb-1"
|
|
4208
|
+
})(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::after {\n content: '\\200B';\n }\n"], ["\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::after {\n content: '\\\\200B';\n }\n"])));
|
|
4209
|
+
var StyledMessage = styled__default.default.span.withConfig({
|
|
4210
|
+
displayName: "InlineAlert__StyledMessage",
|
|
4211
|
+
componentId: "sc-eervmb-2"
|
|
4212
|
+
})(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n min-width: 0;\n"], ["\n min-width: 0;\n"
|
|
4213
|
+
/**
|
|
4214
|
+
* InlineAlert is a short, local message that sits next to what it's about: between paragraphs,
|
|
4215
|
+
* below a field or in a table cell (decision 0019). A severity icon and text in the severity
|
|
4216
|
+
* colour, with no background or border. For a title, an action or a dismiss button, use Alert.
|
|
4217
|
+
*
|
|
4218
|
+
* @example
|
|
4219
|
+
* ```tsx
|
|
4220
|
+
* <InlineAlert variant="success">Saved</InlineAlert>
|
|
4221
|
+
*
|
|
4222
|
+
* // Field feedback: the control references the message with aria-describedby
|
|
4223
|
+
* <input id="email" aria-describedby="email-error" aria-invalid="true" />
|
|
4224
|
+
* <InlineAlert id="email-error" variant="error" size="small">Enter a valid email address</InlineAlert>
|
|
4225
|
+
* ```
|
|
4226
|
+
*/])));
|
|
4227
|
+
/**
|
|
4228
|
+
* InlineAlert is a short, local message that sits next to what it's about: between paragraphs,
|
|
4229
|
+
* below a field or in a table cell (decision 0019). A severity icon and text in the severity
|
|
4230
|
+
* colour, with no background or border. For a title, an action or a dismiss button, use Alert.
|
|
4231
|
+
*
|
|
4232
|
+
* @example
|
|
4233
|
+
* ```tsx
|
|
4234
|
+
* <InlineAlert variant="success">Saved</InlineAlert>
|
|
4235
|
+
*
|
|
4236
|
+
* // Field feedback: the control references the message with aria-describedby
|
|
4237
|
+
* <input id="email" aria-describedby="email-error" aria-invalid="true" />
|
|
4238
|
+
* <InlineAlert id="email-error" variant="error" size="small">Enter a valid email address</InlineAlert>
|
|
4239
|
+
* ```
|
|
4240
|
+
*/
|
|
4241
|
+
var InlineAlert = function InlineAlert(_a) {
|
|
4242
|
+
var _b = _a.variant,
|
|
4243
|
+
variant = _b === void 0 ? 'info' : _b,
|
|
4244
|
+
_c = _a.size,
|
|
4245
|
+
alertSize = _c === void 0 ? 'medium' : _c,
|
|
4246
|
+
children = _a.children,
|
|
4247
|
+
_d = _a.ariaLive,
|
|
4248
|
+
ariaLive = _d === void 0 ? 'polite' : _d,
|
|
4249
|
+
id = _a.id,
|
|
4250
|
+
dataTestId = _a["data-testid"];
|
|
4251
|
+
// A live region is announced reliably only when it exists before its content changes, so with
|
|
4252
|
+
// no message it stays mounted as an empty region, with no icon and no minimum height
|
|
4253
|
+
var hasMessage = children !== undefined && children !== null && children !== false && children !== '';
|
|
4254
|
+
return jsxRuntime.jsx(StyledInlineAlert
|
|
4255
|
+
// Same roles as Alert; ariaLive sets how urgently changes are announced
|
|
4256
|
+
, {
|
|
4257
|
+
// Same roles as Alert; ariaLive sets how urgently changes are announced
|
|
4258
|
+
role: variant === 'error' ? 'alert' : 'status',
|
|
4259
|
+
"aria-live": ariaLive,
|
|
4260
|
+
id: id,
|
|
4261
|
+
"data-testid": dataTestId,
|
|
4262
|
+
"$variant": variant,
|
|
4263
|
+
"$size": alertSize,
|
|
4264
|
+
"$empty": !hasMessage,
|
|
4265
|
+
children: hasMessage && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4266
|
+
children: [jsxRuntime.jsx(StyledIconLine, {
|
|
4267
|
+
"aria-hidden": "true",
|
|
4268
|
+
children: jsxRuntime.jsx(Icon, {
|
|
4269
|
+
name: variantIcons[variant],
|
|
4270
|
+
size: sizeConfig[alertSize].icon,
|
|
4271
|
+
iconColor: "inherit"
|
|
4272
|
+
})
|
|
4273
|
+
}), jsxRuntime.jsx(StyledMessage, {
|
|
4274
|
+
children: children
|
|
4275
|
+
})]
|
|
4276
|
+
})
|
|
4277
|
+
});
|
|
4278
|
+
};
|
|
4279
|
+
InlineAlert.displayName = 'InlineAlert';
|
|
4280
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$h;
|
|
3972
4281
|
|
|
3973
4282
|
var BreadcrumbNavStyled = styled__default.default.nav.withConfig({
|
|
3974
4283
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
@@ -4186,13 +4495,13 @@ var StyledCheckbox = styled__default.default.span.withConfig({
|
|
|
4186
4495
|
return props.$checked || props.$indeterminate ? data.tokensJson.semantic.color.background.inverse : data.tokensJson.component.input["default"].backgroundColor;
|
|
4187
4496
|
}, function (props) {
|
|
4188
4497
|
if (props.$state === 'error') return data.tokensJson.component.input.error.borderColor;
|
|
4189
|
-
if (props.$checked || props.$indeterminate) return data.tokensJson.semantic.border.strong;
|
|
4498
|
+
if (props.$checked || props.$indeterminate) return data.tokensJson.semantic.color.border.strong;
|
|
4190
4499
|
return data.tokensJson.component.input["default"].borderColor;
|
|
4191
4500
|
}, function (props) {
|
|
4192
4501
|
return props.$state === 'disabled' ? 'not-allowed' : 'pointer';
|
|
4193
4502
|
}, data.tokensJson.semantic.motion.duration.fast, data.tokensJson.semantic.motion.easing.easeOut, HiddenCheckboxInput, function (props) {
|
|
4194
|
-
return props.$state === 'error' ? data.tokensJson.component.input.error.hover.borderColor : props.$checked || props.$indeterminate ? data.tokensJson.semantic.border.strong : data.tokensJson.component.input.hover.borderColor;
|
|
4195
|
-
}, HiddenCheckboxInput, data.tokensJson.component.input.focus.outline, data.tokensJson.
|
|
4503
|
+
return props.$state === 'error' ? data.tokensJson.component.input.error.hover.borderColor : props.$checked || props.$indeterminate ? data.tokensJson.semantic.color.border.strong : data.tokensJson.component.input.hover.borderColor;
|
|
4504
|
+
}, HiddenCheckboxInput, data.tokensJson.component.input.focus.outline, data.tokensJson.semantic.border.focusOffset, function (props) {
|
|
4196
4505
|
return props.$state === 'error' ? data.tokensJson.component.input.error.focus.borderColor : data.tokensJson.component.input.focus.borderColor;
|
|
4197
4506
|
}, function (props) {
|
|
4198
4507
|
return props.$state === 'disabled' && "\n background-color: ".concat(data.tokensJson.component.input.disabled.backgroundColor, ";\n border-color: ").concat(data.tokensJson.component.input.disabled.borderColor, ";\n ");
|
|
@@ -4698,7 +5007,7 @@ var DateGroup = function DateGroup(_a) {
|
|
|
4698
5007
|
};
|
|
4699
5008
|
var templateObject_1$g, templateObject_2$e, templateObject_3$d, templateObject_4$b;
|
|
4700
5009
|
|
|
4701
|
-
var semantic$
|
|
5010
|
+
var semantic$7 = data.tokensJson.semantic;
|
|
4702
5011
|
var StyledContainer$1 = styled__default.default.div.withConfig({
|
|
4703
5012
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4704
5013
|
return !prop.startsWith('$');
|
|
@@ -4707,7 +5016,7 @@ var StyledContainer$1 = styled__default.default.div.withConfig({
|
|
|
4707
5016
|
componentId: "sc-1u5hxh-0"
|
|
4708
5017
|
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: ", ";\n margin: 0 auto;\n padding: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: ", ";\n margin: 0 auto;\n padding: ", ";\n"])), data.tokensJson.component.emptyState.maxWidth, function (_a) {
|
|
4709
5018
|
var $size = _a.$size;
|
|
4710
|
-
return $size === 'small' ? semantic$
|
|
5019
|
+
return $size === 'small' ? semantic$7.spacing.layout['4xl'] : $size === 'large' ? semantic$7.spacing.layout['8xl'] : semantic$7.spacing.layout['6xl'];
|
|
4711
5020
|
});
|
|
4712
5021
|
var StyledIllustration = styled__default.default.div.withConfig({
|
|
4713
5022
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -4721,16 +5030,16 @@ var StyledIllustration = styled__default.default.div.withConfig({
|
|
|
4721
5030
|
}, function (_a) {
|
|
4722
5031
|
var $size = _a.$size;
|
|
4723
5032
|
return $size === 'small' ? data.tokensJson.component.emptyState.illustration.small : $size === 'large' ? data.tokensJson.component.emptyState.illustration.large : data.tokensJson.component.emptyState.illustration.medium;
|
|
4724
|
-
}, semantic$
|
|
5033
|
+
}, semantic$7.spacing.layout['2xl'], function (_a) {
|
|
4725
5034
|
var $variant = _a.$variant;
|
|
4726
|
-
return $variant === 'error' ? semantic$
|
|
5035
|
+
return $variant === 'error' ? semantic$7.color.icon.error : $variant === 'success' ? semantic$7.color.icon.success : semantic$7.color.icon.subdued;
|
|
4727
5036
|
});
|
|
4728
5037
|
var StyledTextContainer = styled__default.default.div.withConfig({
|
|
4729
5038
|
displayName: "EmptyState__StyledTextContainer",
|
|
4730
5039
|
componentId: "sc-1u5hxh-2"
|
|
4731
5040
|
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n max-width: ", ";\n margin-bottom: ", ";\n"], ["\n max-width: ", ";\n margin-bottom: ", ";\n"
|
|
4732
5041
|
// Map illustration type to icon name
|
|
4733
|
-
])), data.tokensJson.component.emptyState.text.maxWidth, semantic$
|
|
5042
|
+
])), data.tokensJson.component.emptyState.text.maxWidth, semantic$7.spacing.layout['2xl']);
|
|
4734
5043
|
// Map illustration type to icon name
|
|
4735
5044
|
var illustrationToIcon = {
|
|
4736
5045
|
search: 'search',
|
|
@@ -4785,7 +5094,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4785
5094
|
children: title
|
|
4786
5095
|
}), jsxRuntime.jsx("div", {
|
|
4787
5096
|
style: {
|
|
4788
|
-
marginTop: semantic$
|
|
5097
|
+
marginTop: semantic$7.spacing.layout.md
|
|
4789
5098
|
},
|
|
4790
5099
|
children: jsxRuntime.jsx(Typography, {
|
|
4791
5100
|
variant: "body",
|
|
@@ -4910,6 +5219,9 @@ var _a = data.tokensJson.semantic,
|
|
|
4910
5219
|
_b = data.tokensJson.component,
|
|
4911
5220
|
input$1 = _b.input,
|
|
4912
5221
|
field$3 = _b.field;
|
|
5222
|
+
// Spacing comes from the semantic scales: no component spacing tokens (decision 0022).
|
|
5223
|
+
// The 11px vertical padding is off-grid and keeps its deprecated token until #129.
|
|
5224
|
+
var controlPaddingX = data.tokensJson.semantic.spacing.component.lg;
|
|
4913
5225
|
var duration = motion$1.duration,
|
|
4914
5226
|
easing = motion$1.easing;
|
|
4915
5227
|
var DropdownContainer = styled__default.default.div.withConfig({
|
|
@@ -4922,7 +5234,7 @@ var DropdownTrigger = styled__default.default.button.withConfig({
|
|
|
4922
5234
|
},
|
|
4923
5235
|
displayName: "Dropdown__DropdownTrigger",
|
|
4924
5236
|
componentId: "sc-kz07c4-1"
|
|
4925
|
-
})(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor:
|
|
5237
|
+
})(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor: not-allowed;\n }\n \n ", "\n"], ["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor: not-allowed;\n }\n \n ", "\n"])), input$1["default"].paddingY, controlPaddingX, input$1["default"].backgroundColor, input$1["default"].borderWidth, function (_a) {
|
|
4926
5238
|
var $hasError = _a.$hasError;
|
|
4927
5239
|
return $hasError ? input$1.error.borderColor : input$1["default"].borderColor;
|
|
4928
5240
|
}, input$1["default"].borderRadius, input$1["default"].font, input$1["default"].textColor, duration.normal, easing.easeInOut, duration.normal, easing.easeInOut, function (_a) {
|
|
@@ -4931,7 +5243,7 @@ var DropdownTrigger = styled__default.default.button.withConfig({
|
|
|
4931
5243
|
}, function (_a) {
|
|
4932
5244
|
var $hasError = _a.$hasError;
|
|
4933
5245
|
return $hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor;
|
|
4934
|
-
}, input$1.focus.outline,
|
|
5246
|
+
}, input$1.focus.outline, border$1.focusOffset, input$1.disabled.backgroundColor, input$1.disabled.textColor, input$1.disabled.borderColor, function (_a) {
|
|
4935
5247
|
var $isOpen = _a.$isOpen,
|
|
4936
5248
|
$hasError = _a.$hasError;
|
|
4937
5249
|
return $isOpen && "\n border-color: ".concat($hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor, ";\n ");
|
|
@@ -4952,7 +5264,7 @@ var DropdownMenu = styled__default.default.div.withConfig({
|
|
|
4952
5264
|
},
|
|
4953
5265
|
displayName: "Dropdown__DropdownMenu",
|
|
4954
5266
|
componentId: "sc-kz07c4-3"
|
|
4955
|
-
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n
|
|
5267
|
+
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: all ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"], ["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: all ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"])), zIndex.dropdown, input$1["default"].backgroundColor, border$1.subtle, input$1["default"].borderRadius, elevation$1.floating, spacing.xs, function (_a) {
|
|
4956
5268
|
var $isOpen = _a.$isOpen;
|
|
4957
5269
|
return $isOpen ? 1 : 0;
|
|
4958
5270
|
}, function (_a) {
|
|
@@ -4968,7 +5280,7 @@ var DropdownOption = styled__default.default.button.withConfig({
|
|
|
4968
5280
|
},
|
|
4969
5281
|
displayName: "Dropdown__DropdownOption",
|
|
4970
5282
|
componentId: "sc-kz07c4-4"
|
|
4971
|
-
})(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"], ["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"])), input$1["default"].paddingY,
|
|
5283
|
+
})(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"], ["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"])), input$1["default"].paddingY, controlPaddingX, function (_a) {
|
|
4972
5284
|
var $isSelected = _a.$isSelected,
|
|
4973
5285
|
$isFocused = _a.$isFocused;
|
|
4974
5286
|
if ($isFocused) return color$1.background.surface;
|
|
@@ -4981,7 +5293,7 @@ var StyledHelperText$3 = styled__default.default.div.withConfig({
|
|
|
4981
5293
|
})(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"], ["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"])), field$3.helperText.typography, function (_a) {
|
|
4982
5294
|
var $hasError = _a.$hasError;
|
|
4983
5295
|
return $hasError ? field$3.helperText.colorError : field$3.helperText.color;
|
|
4984
|
-
},
|
|
5296
|
+
}, spacing.sm);
|
|
4985
5297
|
var Dropdown = function Dropdown(_a) {
|
|
4986
5298
|
var options = _a.options,
|
|
4987
5299
|
value = _a.value,
|
|
@@ -5104,7 +5416,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
5104
5416
|
htmlFor: dropdownId,
|
|
5105
5417
|
style: {
|
|
5106
5418
|
display: 'block',
|
|
5107
|
-
marginBottom:
|
|
5419
|
+
marginBottom: spacing.sm
|
|
5108
5420
|
},
|
|
5109
5421
|
children: jsxRuntime.jsx(Typography, {
|
|
5110
5422
|
variant: "label",
|
|
@@ -5159,7 +5471,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
5159
5471
|
};
|
|
5160
5472
|
var templateObject_1$d, templateObject_2$b, templateObject_3$a, templateObject_4$9, templateObject_5$8, templateObject_6$7;
|
|
5161
5473
|
|
|
5162
|
-
var semantic$
|
|
5474
|
+
var semantic$6 = data.tokensJson.semantic;
|
|
5163
5475
|
var StyledList = styled__default.default.ul.withConfig({
|
|
5164
5476
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
5165
5477
|
return !prop.startsWith('$');
|
|
@@ -5168,7 +5480,7 @@ var StyledList = styled__default.default.ul.withConfig({
|
|
|
5168
5480
|
componentId: "sc-1irksg5-0"
|
|
5169
5481
|
})(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n \n /* Divider styles */\n ", "\n"], ["\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n \n /* Divider styles */\n ", "\n"])), function (_a) {
|
|
5170
5482
|
var $dividers = _a.$dividers;
|
|
5171
|
-
return $dividers && "\n > li:not(:last-child) {\n border-bottom: ".concat(semantic$
|
|
5483
|
+
return $dividers && "\n > li:not(:last-child) {\n border-bottom: ".concat(semantic$6.border.width.thin, " solid ").concat(semantic$6.color.border["default"], ";\n }\n ");
|
|
5172
5484
|
});
|
|
5173
5485
|
var List = function List(_a) {
|
|
5174
5486
|
var children = _a.children,
|
|
@@ -5179,25 +5491,27 @@ var List = function List(_a) {
|
|
|
5179
5491
|
className = _a.className,
|
|
5180
5492
|
dataTestId = _a["data-testid"],
|
|
5181
5493
|
props = __rest(_a, ["children", "dividers", "spacing", "className", 'data-testid']);
|
|
5182
|
-
return jsxRuntime.jsx(
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5494
|
+
return jsxRuntime.jsx(ListSpacingContext.Provider, {
|
|
5495
|
+
value: spacing,
|
|
5496
|
+
children: jsxRuntime.jsx(StyledList, __assign({
|
|
5497
|
+
"$dividers": dividers,
|
|
5498
|
+
className: className,
|
|
5499
|
+
"data-testid": dataTestId,
|
|
5500
|
+
role: "list"
|
|
5501
|
+
}, props, {
|
|
5502
|
+
children: children
|
|
5503
|
+
}))
|
|
5504
|
+
});
|
|
5191
5505
|
};
|
|
5192
5506
|
List.displayName = 'List';
|
|
5193
5507
|
var templateObject_1$c;
|
|
5194
5508
|
|
|
5195
|
-
var semantic$
|
|
5196
|
-
var layout = semantic$
|
|
5197
|
-
color = semantic$
|
|
5198
|
-
border = semantic$
|
|
5199
|
-
elevation = semantic$
|
|
5200
|
-
motion = semantic$
|
|
5509
|
+
var semantic$5 = data.tokensJson.semantic;
|
|
5510
|
+
var layout = semantic$5.spacing.layout,
|
|
5511
|
+
color = semantic$5.color,
|
|
5512
|
+
border = semantic$5.border,
|
|
5513
|
+
elevation = semantic$5.elevation,
|
|
5514
|
+
motion = semantic$5.motion;
|
|
5201
5515
|
// ---------------------------------------------------------------------------
|
|
5202
5516
|
// Size map
|
|
5203
5517
|
// ---------------------------------------------------------------------------
|
|
@@ -5221,7 +5535,7 @@ var scaleIn = styled.keyframes(templateObject_2$a || (templateObject_2$a = __mak
|
|
|
5221
5535
|
var StyledOverlay$1 = styled__default.default.div.withConfig({
|
|
5222
5536
|
displayName: "Modal__StyledOverlay",
|
|
5223
5537
|
componentId: "sc-1d3g5gh-0"
|
|
5224
|
-
})(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"], ["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"])), color.background.overlay, semantic$
|
|
5538
|
+
})(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"], ["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"])), color.background.overlay, semantic$5.zIndex.modal, styled.css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5225
5539
|
var $isExiting = _a.$isExiting;
|
|
5226
5540
|
return $isExiting && exitAnimation;
|
|
5227
5541
|
}));
|
|
@@ -5231,7 +5545,7 @@ var StyledDialog = styled__default.default.div.withConfig({
|
|
|
5231
5545
|
},
|
|
5232
5546
|
displayName: "Modal__StyledDialog",
|
|
5233
5547
|
componentId: "sc-1d3g5gh-1"
|
|
5234
|
-
})(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"], ["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"])), semantic$
|
|
5548
|
+
})(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"], ["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"])), semantic$5.zIndex.modal, function (_a) {
|
|
5235
5549
|
var $width = _a.$width;
|
|
5236
5550
|
return $width;
|
|
5237
5551
|
}, layout.lg, layout.lg, color.background.subtle, border.radius.xl, elevation.overlay, styled.css(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), scaleIn, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
@@ -5240,7 +5554,7 @@ var StyledDialog = styled__default.default.div.withConfig({
|
|
|
5240
5554
|
}), reducedMotion, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5241
5555
|
var $isExiting = _a.$isExiting;
|
|
5242
5556
|
return $isExiting && exitAnimation;
|
|
5243
|
-
}, semantic$
|
|
5557
|
+
}, semantic$5.breakpoint.md, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5244
5558
|
var $isExiting = _a.$isExiting;
|
|
5245
5559
|
return $isExiting && exitAnimation;
|
|
5246
5560
|
});
|
|
@@ -5251,7 +5565,7 @@ var StyledHeader = styled__default.default.div.withConfig({
|
|
|
5251
5565
|
var StyledBody = styled__default.default.div.withConfig({
|
|
5252
5566
|
displayName: "Modal__StyledBody",
|
|
5253
5567
|
componentId: "sc-1d3g5gh-3"
|
|
5254
|
-
})(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n flex: 1 1 auto;\n overflow-y: auto;\n padding: ", " ", ";\n\n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n &::-webkit-scrollbar-track {\n background: ", ";\n }\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"], ["\n flex: 1 1 auto;\n overflow-y: auto;\n padding: ", " ", ";\n\n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n &::-webkit-scrollbar-track {\n background: ", ";\n }\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"])), layout.md, layout.lg, semantic$
|
|
5568
|
+
})(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n flex: 1 1 auto;\n overflow-y: auto;\n padding: ", " ", ";\n\n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n &::-webkit-scrollbar-track {\n background: ", ";\n }\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"], ["\n flex: 1 1 auto;\n overflow-y: auto;\n padding: ", " ", ";\n\n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n &::-webkit-scrollbar-track {\n background: ", ";\n }\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"])), layout.md, layout.lg, semantic$5.spacing.layout.sm, color.background.surface, color.border["default"], border.radius.circle, color.border.strong);
|
|
5255
5569
|
var StyledFooter = styled__default.default.div.withConfig({
|
|
5256
5570
|
displayName: "Modal__StyledFooter",
|
|
5257
5571
|
componentId: "sc-1d3g5gh-4"
|
|
@@ -5435,20 +5749,21 @@ var Modal = function Modal(_a) {
|
|
|
5435
5749
|
Modal.displayName = 'Modal';
|
|
5436
5750
|
var templateObject_1$b, templateObject_2$a, templateObject_3$9, templateObject_4$8, templateObject_5$7, templateObject_6$6, templateObject_7$5, templateObject_8$4, templateObject_9$3;
|
|
5437
5751
|
|
|
5438
|
-
var input = data.tokensJson.component.input
|
|
5752
|
+
var input = data.tokensJson.component.input,
|
|
5753
|
+
semantic$4 = data.tokensJson.semantic;
|
|
5439
5754
|
var StyledInputBase = styled__default.default.input.withConfig({
|
|
5440
5755
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
5441
5756
|
return !prop.startsWith('$');
|
|
5442
5757
|
},
|
|
5443
5758
|
displayName: "InputBase__StyledInputBase",
|
|
5444
5759
|
componentId: "sc-1bpf4e8-0"
|
|
5445
|
-
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n /* Typography */\n font: ", ";\n color: ", ";\n \n /* Layout */\n width: 100%;\n padding: ", " ", ";\n \n /* Visual styling */\n background-color: ", ";\n \n border: ", " solid ", ";\n \n border-radius: ", ";\n \n /* Remove default appearance */\n appearance: none;\n outline: none;\n \n /* Transitions */\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n /* Placeholder */\n &::placeholder {\n color: ", ";\n opacity: 1;\n }\n \n /* Focus state */\n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n /* Hover state (only when not disabled) */\n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n /* Disabled state */\n &:disabled {\n cursor:
|
|
5760
|
+
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n /* Typography */\n font: ", ";\n color: ", ";\n \n /* Layout */\n width: 100%;\n padding: ", " ", ";\n \n /* Visual styling */\n background-color: ", ";\n \n border: ", " solid ", ";\n \n border-radius: ", ";\n \n /* Remove default appearance */\n appearance: none;\n outline: none;\n \n /* Transitions */\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n /* Placeholder */\n &::placeholder {\n color: ", ";\n opacity: 1;\n }\n \n /* Focus state */\n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n /* Hover state (only when not disabled) */\n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n /* Disabled state */\n &:disabled {\n cursor: not-allowed;\n }\n \n /* Remove number input spinners */\n &[type='number']::-webkit-inner-spin-button,\n &[type='number']::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n \n &[type='number'] {\n -moz-appearance: textfield;\n }\n"], ["\n /* Typography */\n font: ", ";\n color: ", ";\n \n /* Layout */\n width: 100%;\n padding: ", " ", ";\n \n /* Visual styling */\n background-color: ", ";\n \n border: ", " solid ", ";\n \n border-radius: ", ";\n \n /* Remove default appearance */\n appearance: none;\n outline: none;\n \n /* Transitions */\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n /* Placeholder */\n &::placeholder {\n color: ", ";\n opacity: 1;\n }\n \n /* Focus state */\n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n /* Hover state (only when not disabled) */\n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n /* Disabled state */\n &:disabled {\n cursor: not-allowed;\n }\n \n /* Remove number input spinners */\n &[type='number']::-webkit-inner-spin-button,\n &[type='number']::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n \n &[type='number'] {\n -moz-appearance: textfield;\n }\n"
|
|
5446
5761
|
/**
|
|
5447
5762
|
* Base styled textarea with shared styling
|
|
5448
5763
|
*/])), input["default"].font, function (_a) {
|
|
5449
5764
|
var $disabled = _a.$disabled;
|
|
5450
5765
|
return $disabled ? input.disabled.textColor : input["default"].textColor;
|
|
5451
|
-
}, input["default"].paddingY,
|
|
5766
|
+
}, input["default"].paddingY, semantic$4.spacing.component.lg, function (_a) {
|
|
5452
5767
|
var $disabled = _a.$disabled;
|
|
5453
5768
|
return $disabled ? input.disabled.backgroundColor : input["default"].backgroundColor;
|
|
5454
5769
|
}, input["default"].borderWidth, function (_a) {
|
|
@@ -5460,10 +5775,10 @@ var StyledInputBase = styled__default.default.input.withConfig({
|
|
|
5460
5775
|
}, input["default"].borderRadius, data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut, data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut, input.placeholder.textColor, function (_a) {
|
|
5461
5776
|
var $hasError = _a.$hasError;
|
|
5462
5777
|
return $hasError ? input.error.focus.borderColor : input.focus.borderColor;
|
|
5463
|
-
}, input.focus.outline,
|
|
5778
|
+
}, input.focus.outline, semantic$4.border.focusOffset, function (_a) {
|
|
5464
5779
|
var $hasError = _a.$hasError;
|
|
5465
5780
|
return $hasError ? input.error.hover.borderColor : input.hover.borderColor;
|
|
5466
|
-
}
|
|
5781
|
+
});
|
|
5467
5782
|
/**
|
|
5468
5783
|
* Base styled textarea with shared styling
|
|
5469
5784
|
*/
|
|
@@ -5477,14 +5792,16 @@ var StyledTextAreaBase = styled__default.default.textarea.withConfig({
|
|
|
5477
5792
|
var templateObject_1$a, templateObject_2$9;
|
|
5478
5793
|
|
|
5479
5794
|
var field$2 = data.tokensJson.component.field;
|
|
5795
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
5796
|
+
var gap$2 = data.tokensJson.semantic.spacing.layout;
|
|
5480
5797
|
var StyledFieldContainer$2 = styled__default.default.div.withConfig({
|
|
5481
5798
|
displayName: "NumberInput__StyledFieldContainer",
|
|
5482
5799
|
componentId: "sc-qotc3w-0"
|
|
5483
|
-
})(templateObject_1$9 || (templateObject_1$9 = __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"])),
|
|
5800
|
+
})(templateObject_1$9 || (templateObject_1$9 = __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"])), gap$2.sm);
|
|
5484
5801
|
var StyledLabel$3 = styled__default.default.label.withConfig({
|
|
5485
5802
|
displayName: "NumberInput__StyledLabel",
|
|
5486
5803
|
componentId: "sc-qotc3w-1"
|
|
5487
|
-
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])),
|
|
5804
|
+
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])), gap$2.xs, field$2.label.typography, field$2.label.color, field$2.label.colorDisabled);
|
|
5488
5805
|
var StyledRequiredIndicator$2 = styled__default.default.span.withConfig({
|
|
5489
5806
|
displayName: "NumberInput__StyledRequiredIndicator",
|
|
5490
5807
|
componentId: "sc-qotc3w-2"
|
|
@@ -5796,14 +6113,16 @@ var PageTitle = function PageTitle(_a) {
|
|
|
5796
6113
|
var templateObject_1$8;
|
|
5797
6114
|
|
|
5798
6115
|
var field$1 = data.tokensJson.component.field;
|
|
6116
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
6117
|
+
var gap$1 = data.tokensJson.semantic.spacing.layout;
|
|
5799
6118
|
var StyledFieldContainer$1 = styled__default.default.div.withConfig({
|
|
5800
6119
|
displayName: "PasswordField__StyledFieldContainer",
|
|
5801
6120
|
componentId: "sc-1p15zk0-0"
|
|
5802
|
-
})(templateObject_1$7 || (templateObject_1$7 = __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"])),
|
|
6121
|
+
})(templateObject_1$7 || (templateObject_1$7 = __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"])), gap$1.sm);
|
|
5803
6122
|
var StyledLabel$2 = styled__default.default.label.withConfig({
|
|
5804
6123
|
displayName: "PasswordField__StyledLabel",
|
|
5805
6124
|
componentId: "sc-1p15zk0-1"
|
|
5806
|
-
})(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])),
|
|
6125
|
+
})(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])), gap$1.xs, field$1.label.typography, field$1.label.color, field$1.label.colorDisabled);
|
|
5807
6126
|
var StyledRequiredIndicator$1 = styled__default.default.span.withConfig({
|
|
5808
6127
|
displayName: "PasswordField__StyledRequiredIndicator",
|
|
5809
6128
|
componentId: "sc-1p15zk0-2"
|
|
@@ -5937,14 +6256,14 @@ var StyledInputWrapper = styled__default.default.div.withConfig({
|
|
|
5937
6256
|
displayName: "SearchField__StyledInputWrapper",
|
|
5938
6257
|
componentId: "sc-qhz9i8-1"
|
|
5939
6258
|
})(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n transition: border-color ", " ", ", outline ", " ", ";\n \n ", "\n \n ", "\n \n &:hover:not([data-disabled='true']) {\n border-color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n transition: border-color ", " ", ", outline ", " ", ";\n \n ", "\n \n ", "\n \n &:hover:not([data-disabled='true']) {\n border-color: ", ";\n }\n"])), semantic$3.spacing.layout.sm, semantic$3.spacing.layout.sm, semantic$3.spacing.layout.md, component.input["default"].backgroundColor, component.input["default"].borderWidth, component.input["default"].borderColor, component.input["default"].borderRadius, semantic$3.motion.duration.normal, semantic$3.motion.easing.easeInOut, semantic$3.motion.duration.normal, semantic$3.motion.easing.easeInOut, function (props) {
|
|
5940
|
-
return props.$isFocused && "\n border-color: ".concat(component.input.focus.borderColor, ";\n outline: ").concat(component.input.focus.outline, ";\n outline-offset: ").concat(
|
|
6259
|
+
return props.$isFocused && "\n border-color: ".concat(component.input.focus.borderColor, ";\n outline: ").concat(component.input.focus.outline, ";\n outline-offset: ").concat(semantic$3.border.focusOffset, ";\n ");
|
|
5941
6260
|
}, function (props) {
|
|
5942
6261
|
return props.$disabled && "\n background-color: ".concat(component.input.disabled.backgroundColor, ";\n border-color: ").concat(component.input.disabled.borderColor, ";\n cursor: not-allowed;\n ");
|
|
5943
6262
|
}, component.input.hover.borderColor);
|
|
5944
6263
|
var StyledInput = styled__default.default.input.withConfig({
|
|
5945
6264
|
displayName: "SearchField__StyledInput",
|
|
5946
6265
|
componentId: "sc-qhz9i8-2"
|
|
5947
|
-
})(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n flex: 1;\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 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"])), semantic$3.typography.body, semantic$3.color.text["default"],
|
|
6266
|
+
})(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n flex: 1;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\n }\n \n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n flex: 1;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\n }\n \n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$3.typography.body, semantic$3.color.text["default"], component.input.placeholder.textColor, semantic$3.color.text.disabled);
|
|
5948
6267
|
var StyledSuggestionsList = styled__default.default.ul.withConfig({
|
|
5949
6268
|
displayName: "SearchField__StyledSuggestionsList",
|
|
5950
6269
|
componentId: "sc-qhz9i8-3"
|
|
@@ -6171,8 +6490,7 @@ var SearchField = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
6171
6490
|
children: [jsxRuntime.jsx(Icon, {
|
|
6172
6491
|
name: "search",
|
|
6173
6492
|
size: "sm",
|
|
6174
|
-
iconColor: "subdued"
|
|
6175
|
-
"aria-hidden": "true"
|
|
6493
|
+
iconColor: "subdued"
|
|
6176
6494
|
}), jsxRuntime.jsx(StyledInput, __assign({
|
|
6177
6495
|
ref: inputRef,
|
|
6178
6496
|
type: "text",
|
|
@@ -6238,8 +6556,7 @@ var SearchField = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
6238
6556
|
secondary: description,
|
|
6239
6557
|
icon: item.type === 'recent' ? jsxRuntime.jsx(Icon, {
|
|
6240
6558
|
name: "refresh",
|
|
6241
|
-
size: "xs"
|
|
6242
|
-
"aria-hidden": "true"
|
|
6559
|
+
size: "xs"
|
|
6243
6560
|
}) : undefined,
|
|
6244
6561
|
interactive: true,
|
|
6245
6562
|
selected: index === highlightedIndex,
|
|
@@ -6507,7 +6824,7 @@ var StyledTrack = styled__default.default.div.withConfig({
|
|
|
6507
6824
|
componentId: "sc-6mh2d4-3"
|
|
6508
6825
|
})(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: ", ";\n background-color: ", ";\n border-radius: ", ";\n cursor: ", ";\n"], ["\n position: relative;\n width: 100%;\n height: ", ";\n background-color: ", ";\n border-radius: ", ";\n cursor: ", ";\n"])), semantic$1.spacing.layout.xs, function (_a) {
|
|
6509
6826
|
var $disabled = _a.$disabled;
|
|
6510
|
-
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.
|
|
6827
|
+
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.background.progressTrack;
|
|
6511
6828
|
}, semantic$1.border.radius.circle, function (_a) {
|
|
6512
6829
|
var $disabled = _a.$disabled;
|
|
6513
6830
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
@@ -6517,7 +6834,7 @@ var StyledTrackFill = styled__default.default.div.withConfig({
|
|
|
6517
6834
|
componentId: "sc-6mh2d4-4"
|
|
6518
6835
|
})(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n position: absolute;\n height: 100%;\n background-color: ", ";\n border-radius: ", ";\n pointer-events: none;\n"], ["\n position: absolute;\n height: 100%;\n background-color: ", ";\n border-radius: ", ";\n pointer-events: none;\n"])), function (_a) {
|
|
6519
6836
|
var $disabled = _a.$disabled;
|
|
6520
|
-
return $disabled ? semantic$1.color.
|
|
6837
|
+
return $disabled ? semantic$1.color.icon.disabled : semantic$1.color.background.emphasis;
|
|
6521
6838
|
}, semantic$1.border.radius.circle);
|
|
6522
6839
|
var StyledThumb = styled__default.default.div.withConfig({
|
|
6523
6840
|
displayName: "Slider__StyledThumb",
|
|
@@ -6527,7 +6844,7 @@ var StyledThumb = styled__default.default.div.withConfig({
|
|
|
6527
6844
|
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.background.subtle;
|
|
6528
6845
|
}, semantic$1.border.width.thick, function (_a) {
|
|
6529
6846
|
var $disabled = _a.$disabled;
|
|
6530
|
-
return $disabled ? semantic$1.color.
|
|
6847
|
+
return $disabled ? semantic$1.color.icon.disabled : semantic$1.color.background.emphasis;
|
|
6531
6848
|
}, semantic$1.border.radius.circle, function (_a) {
|
|
6532
6849
|
var $disabled = _a.$disabled;
|
|
6533
6850
|
return $disabled ? 'not-allowed' : 'grab';
|
|
@@ -6893,47 +7210,42 @@ var templateObject_1$4, templateObject_2$4, templateObject_3$4, templateObject_4
|
|
|
6893
7210
|
|
|
6894
7211
|
var semantic = data.tokensJson.semantic;
|
|
6895
7212
|
var StyledTabList = styled__default.default.div.withConfig({
|
|
6896
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6897
|
-
return !prop.startsWith('$');
|
|
6898
|
-
},
|
|
6899
7213
|
displayName: "TabBar__StyledTabList",
|
|
6900
7214
|
componentId: "sc-1g9ib0y-0"
|
|
6901
|
-
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n
|
|
6902
|
-
return props.$variant === 'pills' ? semantic.spacing.layout.sm : '0';
|
|
6903
|
-
}, function (props) {
|
|
6904
|
-
return props.$variant === 'underline' ? "".concat(semantic.border.width.thin, " solid ").concat(semantic.color.border.subtle) : 'none';
|
|
6905
|
-
}, data.tokensJson.component.tabBar.scrollbar.height, semantic.color.background.subtle, semantic.color.border["default"], semantic.border.radius.sm);
|
|
7215
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n border-bottom: ", " solid ", ";\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n \n &::-webkit-scrollbar {\n height: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n border-bottom: ", " solid ", ";\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n \n &::-webkit-scrollbar {\n height: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n"])), semantic.border.width.thin, semantic.color.border.subtle, data.tokensJson.component.tabBar.scrollbar.height, semantic.color.background.subtle, semantic.color.border["default"], semantic.border.radius.sm);
|
|
6906
7216
|
var StyledTab = styled__default.default.button.withConfig({
|
|
6907
7217
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6908
7218
|
return !prop.startsWith('$');
|
|
6909
7219
|
},
|
|
6910
7220
|
displayName: "TabBar__StyledTab",
|
|
6911
7221
|
componentId: "sc-1g9ib0y-1"
|
|
6912
|
-
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /*
|
|
7222
|
+
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Selected tab: the light-blue selected treatment plus a blue underline (decisions 0016, 0020).\n The text darkens with the fill on hover and press so every state stays at least 4.5:1. */\n border-radius: ", " ", " 0 0;\n background-color: ", ";\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n height: ", ";\n background-color: ", ";\n transition: ", ";\n }\n\n &:hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n /* Disabled state */\n opacity: ", ";\n \n /* Focus state */\n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n z-index: 1;\n }\n\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Selected tab: the light-blue selected treatment plus a blue underline (decisions 0016, 0020).\n The text darkens with the fill on hover and press so every state stays at least 4.5:1. */\n border-radius: ", " ", " 0 0;\n background-color: ", ";\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n height: ", ";\n background-color: ", ";\n transition: ", ";\n }\n\n &:hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n /* Disabled state */\n opacity: ", ";\n \n /* Focus state */\n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n z-index: 1;\n }\n\n"])), semantic.spacing.layout.sm, semantic.spacing.layout.md, semantic.spacing.layout.lg, semantic.typography.button2, function (props) {
|
|
6913
7223
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
7224
|
+
}, semantic.motion.hover, semantic.border.radius.sm, semantic.border.radius.sm, function (props) {
|
|
7225
|
+
return props.$isActive ? semantic.color.background['interactive-subtle'] : 'transparent';
|
|
7226
|
+
}, function (props) {
|
|
7227
|
+
return props.$isActive ? semantic.color.text.interactive : semantic.color.text.subdued;
|
|
7228
|
+
}, semantic.border.width.thick, function (props) {
|
|
7229
|
+
return props.$isActive ? semantic.color.background.interactive : 'transparent';
|
|
6914
7230
|
}, semantic.motion.hover, function (props) {
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
return "\n border-radius: ".concat(semantic.border.radius.sm, " ").concat(semantic.border.radius.sm, " 0 0;\n background-color: ").concat(props.$isActive ? semantic.color.background.subtle : semantic.color.background["default"], ";\n color: ").concat(props.$isActive ? semantic.color.text["default"] : semantic.color.text.subdued, ";\n border: ").concat(semantic.border.width.thin, " solid ").concat(semantic.color.border["default"], ";\n border-bottom: ").concat(props.$isActive ? 'none' : "".concat(semantic.border.width.thin, " solid ").concat(semantic.color.border["default"]), ";\n margin-bottom: ").concat(props.$isActive ? '-1px' : '0', ";\n \n &:hover:not(:disabled) {\n background-color: ").concat(semantic.color.background.surface, ";\n color: ").concat(semantic.color.text["default"], ";\n }\n ");
|
|
7231
|
+
return props.$isActive ? semantic.color.background['interactive-subtle-hover'] : 'transparent';
|
|
7232
|
+
}, function (props) {
|
|
7233
|
+
return props.$isActive ? semantic.color.text['interactive-hover'] : semantic.color.text["default"];
|
|
7234
|
+
}, function (props) {
|
|
7235
|
+
return props.$isActive ? semantic.color.background['interactive-subtle-active'] : 'transparent';
|
|
7236
|
+
}, function (props) {
|
|
7237
|
+
return props.$isActive ? semantic.color.text['interactive-active'] : semantic.color.text["default"];
|
|
6923
7238
|
}, function (props) {
|
|
6924
7239
|
return props.$disabled ? '0.5' : '1';
|
|
6925
7240
|
}, semantic.border.width.thick, semantic.color.border.strong, semantic.spacing.layout.xs);
|
|
6926
7241
|
var StyledBadge = styled__default.default.span.withConfig({
|
|
6927
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6928
|
-
return !prop.startsWith('$');
|
|
6929
|
-
},
|
|
6930
7242
|
displayName: "TabBar__StyledBadge",
|
|
6931
7243
|
componentId: "sc-1g9ib0y-2"
|
|
6932
7244
|
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: 0 ", ";\n font: ", ";\n font-weight: ", ";\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: ", ";\n height: ", ";\n padding: 0 ", ";\n font: ", ";\n font-weight: ", ";\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n"
|
|
6933
7245
|
/**
|
|
6934
7246
|
* TabBar component for tabbed navigation
|
|
6935
7247
|
*
|
|
6936
|
-
* Provides accessible tab navigation with
|
|
7248
|
+
* Provides accessible tab navigation with an underline style, keyboard support,
|
|
6937
7249
|
* and optional badge counts. Follows ARIA tablist pattern.
|
|
6938
7250
|
*
|
|
6939
7251
|
* @example
|
|
@@ -6948,16 +7260,13 @@ var StyledBadge = styled__default.default.span.withConfig({
|
|
|
6948
7260
|
* ]}
|
|
6949
7261
|
* activeTab={activeTab}
|
|
6950
7262
|
* onTabChange={setActiveTab}
|
|
6951
|
-
* variant="pills"
|
|
6952
7263
|
* />
|
|
6953
7264
|
* ```
|
|
6954
|
-
*/])), data.tokensJson.component.tabBar.badge.size, data.tokensJson.component.tabBar.badge.size, semantic.spacing.layout.xs, data.tokensJson.component.tabBar.badge.typography, data.tokensJson.component.tabBar.badge.fontWeight, semantic.border.radius.circle,
|
|
6955
|
-
return props.$variant === 'pills' && props.$isActive ? semantic.color.background['inverse-overlay'] : semantic.color.background.interactive;
|
|
6956
|
-
}, semantic.color.text.inverse);
|
|
7265
|
+
*/])), data.tokensJson.component.tabBar.badge.size, data.tokensJson.component.tabBar.badge.size, semantic.spacing.layout.xs, data.tokensJson.component.tabBar.badge.typography, data.tokensJson.component.tabBar.badge.fontWeight, semantic.border.radius.circle, semantic.color.background.interactive, semantic.color.text.inverse);
|
|
6957
7266
|
/**
|
|
6958
7267
|
* TabBar component for tabbed navigation
|
|
6959
7268
|
*
|
|
6960
|
-
* Provides accessible tab navigation with
|
|
7269
|
+
* Provides accessible tab navigation with an underline style, keyboard support,
|
|
6961
7270
|
* and optional badge counts. Follows ARIA tablist pattern.
|
|
6962
7271
|
*
|
|
6963
7272
|
* @example
|
|
@@ -6972,27 +7281,26 @@ var StyledBadge = styled__default.default.span.withConfig({
|
|
|
6972
7281
|
* ]}
|
|
6973
7282
|
* activeTab={activeTab}
|
|
6974
7283
|
* onTabChange={setActiveTab}
|
|
6975
|
-
* variant="pills"
|
|
6976
7284
|
* />
|
|
6977
7285
|
* ```
|
|
6978
7286
|
*/
|
|
6979
7287
|
var TabBar = function TabBar(_a) {
|
|
6980
7288
|
var tabs = _a.tabs,
|
|
6981
7289
|
activeTab = _a.activeTab,
|
|
6982
|
-
onTabChange = _a.onTabChange
|
|
6983
|
-
|
|
6984
|
-
variant
|
|
6985
|
-
|
|
6986
|
-
ariaLabel =
|
|
7290
|
+
onTabChange = _a.onTabChange;
|
|
7291
|
+
// Deprecated: every variant renders as underline (decision 0020)
|
|
7292
|
+
_a.variant;
|
|
7293
|
+
var _b = _a["aria-label"],
|
|
7294
|
+
ariaLabel = _b === void 0 ? 'Tab navigation' : _b,
|
|
6987
7295
|
dataTestId = _a["data-testid"];
|
|
6988
7296
|
var tabRefs = React.useRef([]);
|
|
6989
|
-
var
|
|
7297
|
+
var _c = React.useState(function () {
|
|
6990
7298
|
return tabs.findIndex(function (tab) {
|
|
6991
7299
|
return tab.id === activeTab;
|
|
6992
7300
|
});
|
|
6993
7301
|
}),
|
|
6994
|
-
focusedIndex =
|
|
6995
|
-
setFocusedIndex =
|
|
7302
|
+
focusedIndex = _c[0],
|
|
7303
|
+
setFocusedIndex = _c[1];
|
|
6996
7304
|
// Update focused index when active tab changes externally
|
|
6997
7305
|
React.useEffect(function () {
|
|
6998
7306
|
var newIndex = tabs.findIndex(function (tab) {
|
|
@@ -7067,7 +7375,6 @@ var TabBar = function TabBar(_a) {
|
|
|
7067
7375
|
}
|
|
7068
7376
|
};
|
|
7069
7377
|
return jsxRuntime.jsx(StyledTabList, {
|
|
7070
|
-
"$variant": variant,
|
|
7071
7378
|
role: "tablist",
|
|
7072
7379
|
"aria-label": ariaLabel,
|
|
7073
7380
|
"data-testid": dataTestId,
|
|
@@ -7076,7 +7383,6 @@ var TabBar = function TabBar(_a) {
|
|
|
7076
7383
|
ref: function ref(el) {
|
|
7077
7384
|
tabRefs.current[index] = el;
|
|
7078
7385
|
},
|
|
7079
|
-
"$variant": variant,
|
|
7080
7386
|
"$isActive": tab.id === activeTab,
|
|
7081
7387
|
"$disabled": tab.disabled || false,
|
|
7082
7388
|
role: "tab",
|
|
@@ -7092,8 +7398,6 @@ var TabBar = function TabBar(_a) {
|
|
|
7092
7398
|
},
|
|
7093
7399
|
"data-testid": "".concat(dataTestId, "-tab-").concat(tab.id),
|
|
7094
7400
|
children: [tab.label, typeof tab.badge === 'number' && tab.badge > 0 && jsxRuntime.jsx(StyledBadge, {
|
|
7095
|
-
"$variant": variant,
|
|
7096
|
-
"$isActive": tab.id === activeTab,
|
|
7097
7401
|
"aria-label": "".concat(tab.badge, " items"),
|
|
7098
7402
|
children: tab.badge > 99 ? '99+' : tab.badge
|
|
7099
7403
|
})]
|
|
@@ -7105,14 +7409,16 @@ TabBar.displayName = 'TabBar';
|
|
|
7105
7409
|
var templateObject_1$3, templateObject_2$3, templateObject_3$3;
|
|
7106
7410
|
|
|
7107
7411
|
var field = data.tokensJson.component.field;
|
|
7412
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
7413
|
+
var gap = data.tokensJson.semantic.spacing.layout;
|
|
7108
7414
|
var StyledFieldContainer = styled__default.default.div.withConfig({
|
|
7109
7415
|
displayName: "TextField__StyledFieldContainer",
|
|
7110
7416
|
componentId: "sc-1ys3b0-0"
|
|
7111
|
-
})(templateObject_1$2 || (templateObject_1$2 = __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"])),
|
|
7417
|
+
})(templateObject_1$2 || (templateObject_1$2 = __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"])), gap.sm);
|
|
7112
7418
|
var StyledLabel = styled__default.default.label.withConfig({
|
|
7113
7419
|
displayName: "TextField__StyledLabel",
|
|
7114
7420
|
componentId: "sc-1ys3b0-1"
|
|
7115
|
-
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])),
|
|
7421
|
+
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])), gap.xs, field.label.typography, field.label.color, field.label.colorDisabled);
|
|
7116
7422
|
var StyledRequiredIndicator = styled__default.default.span.withConfig({
|
|
7117
7423
|
displayName: "TextField__StyledRequiredIndicator",
|
|
7118
7424
|
componentId: "sc-1ys3b0-2"
|
|
@@ -7245,9 +7551,9 @@ var StyledTruncatedText = styled__default.default.span.withConfig({
|
|
|
7245
7551
|
displayName: "TransactionListItem__StyledTruncatedText",
|
|
7246
7552
|
componentId: "sc-7yunm0-8"
|
|
7247
7553
|
})(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"], ["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"
|
|
7248
|
-
// Map categories to
|
|
7554
|
+
// Map categories to CategoryLabel configurations
|
|
7249
7555
|
])));
|
|
7250
|
-
// Map categories to
|
|
7556
|
+
// Map categories to CategoryLabel configurations
|
|
7251
7557
|
var categoryConfig = {
|
|
7252
7558
|
shopping: {
|
|
7253
7559
|
color: 'purple',
|
|
@@ -7361,10 +7667,10 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
7361
7667
|
variant: "body",
|
|
7362
7668
|
children: merchant
|
|
7363
7669
|
})
|
|
7364
|
-
}), categoryData && jsxRuntime.jsx(
|
|
7670
|
+
}), categoryData && jsxRuntime.jsx(CategoryLabel, {
|
|
7365
7671
|
color: categoryData.color,
|
|
7366
7672
|
icon: categoryData.icon,
|
|
7367
|
-
size: "
|
|
7673
|
+
size: "medium",
|
|
7368
7674
|
variant: "minimal",
|
|
7369
7675
|
"aria-label": "Category: ".concat(categoryData.label),
|
|
7370
7676
|
children: categoryData.label
|
|
@@ -7397,20 +7703,14 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
7397
7703
|
})
|
|
7398
7704
|
})]
|
|
7399
7705
|
}), (hasReceipt || hasNote) && jsxRuntime.jsxs(StyledIconIndicator, {
|
|
7400
|
-
children: [hasReceipt && jsxRuntime.jsx(
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
"aria-label": "Has note",
|
|
7409
|
-
role: "img",
|
|
7410
|
-
children: jsxRuntime.jsx(Icon, {
|
|
7411
|
-
name: "paper",
|
|
7412
|
-
size: "xs"
|
|
7413
|
-
})
|
|
7706
|
+
children: [hasReceipt && jsxRuntime.jsx(Icon, {
|
|
7707
|
+
name: "fileDocSearch",
|
|
7708
|
+
size: "xs",
|
|
7709
|
+
"aria-label": "Has receipt"
|
|
7710
|
+
}), hasNote && jsxRuntime.jsx(Icon, {
|
|
7711
|
+
name: "paper",
|
|
7712
|
+
size: "xs",
|
|
7713
|
+
"aria-label": "Has note"
|
|
7414
7714
|
})]
|
|
7415
7715
|
})]
|
|
7416
7716
|
})]
|
|
@@ -7644,6 +7944,7 @@ exports.Button = Button;
|
|
|
7644
7944
|
exports.CardLarge = CardLarge;
|
|
7645
7945
|
exports.CardSmall = CardSmall;
|
|
7646
7946
|
exports.CategoryBadge = CategoryBadge;
|
|
7947
|
+
exports.CategoryLabel = CategoryLabel;
|
|
7647
7948
|
exports.Checkbox = Checkbox;
|
|
7648
7949
|
exports.Chip = Chip;
|
|
7649
7950
|
exports.ChipGroup = ChipGroup;
|
|
@@ -7660,6 +7961,8 @@ exports.Grid = Grid;
|
|
|
7660
7961
|
exports.GridCol = GridCol;
|
|
7661
7962
|
exports.Icon = Icon;
|
|
7662
7963
|
exports.IconButton = IconButton;
|
|
7964
|
+
exports.InlineAlert = InlineAlert;
|
|
7965
|
+
exports.InputChip = InputChip;
|
|
7663
7966
|
exports.LegacyChip = LegacyChip;
|
|
7664
7967
|
exports.List = List;
|
|
7665
7968
|
exports.ListItem = ListItem;
|
|
@@ -7676,6 +7979,7 @@ exports.Sheet = Sheet;
|
|
|
7676
7979
|
exports.Slider = Slider;
|
|
7677
7980
|
exports.Stack = Stack;
|
|
7678
7981
|
exports.StatusBadge = StatusBadge;
|
|
7982
|
+
exports.StatusLabel = StatusLabel;
|
|
7679
7983
|
exports.StyledInputBase = StyledInputBase;
|
|
7680
7984
|
exports.StyledTextAreaBase = StyledTextAreaBase;
|
|
7681
7985
|
exports.TabBar = TabBar;
|