@common-origin/design-system 2.14.0 → 2.16.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 +50 -184
- package/dist/client.esm.js +975 -610
- package/dist/client.esm.js.map +1 -1
- package/dist/client.js +978 -609
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.ts +2 -0
- 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 -82
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +4 -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/layout/GridSystem/GridSystem.d.ts +6 -0
- package/dist/components/molecules/Alert/Alert.d.ts +15 -2
- package/dist/components/molecules/CardLarge/CardLarge.d.ts +3 -1
- package/dist/components/molecules/CardSmall/CardSmall.d.ts +2 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +2 -0
- package/dist/components/molecules/FeatureBlock/FeatureBlock.d.ts +2 -0
- package/dist/components/molecules/InlineAlert/InlineAlert.d.ts +54 -0
- package/dist/components/molecules/InlineAlert/index.d.ts +2 -0
- package/dist/components/molecules/Modal/Modal.d.ts +6 -2
- package/dist/components/molecules/PageTitle/PageTitle.d.ts +13 -0
- package/dist/components/molecules/TabBar/TabBar.d.ts +8 -5
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/data.esm.js +94 -12
- package/dist/data.esm.js.map +1 -1
- package/dist/data.js +94 -12
- 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 +94 -12
- package/dist/tokens/index.esm.js +94 -12
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +94 -12
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/types/tokens.d.ts +85 -3
- package/dist/tokens.css +769 -0
- package/dist/tokens.css.d.ts +4 -0
- package/dist/types/tokens.d.ts +85 -3
- package/package.json +20 -10
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
|
-
var _a$
|
|
252
|
-
typography$
|
|
253
|
-
color$
|
|
254
|
-
letterSpacing = _a$
|
|
251
|
+
var _a$b = data.tokensJson.semantic,
|
|
252
|
+
typography$2 = _a$b.typography,
|
|
253
|
+
color$a = _a$b.color,
|
|
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$
|
|
385
|
-
var _a$
|
|
386
|
-
dot = _a$
|
|
387
|
-
count = _a$
|
|
388
|
-
ring = _a$
|
|
389
|
-
var scaleIn$2 = styled.keyframes(templateObject_1$
|
|
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
|
+
var _a$a = data.tokensJson.component.badge,
|
|
386
|
+
dot = _a$a.dot,
|
|
387
|
+
count = _a$a.count,
|
|
388
|
+
ring = _a$a.ring;
|
|
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,
|
|
@@ -434,7 +434,8 @@ var Badge = function Badge(_a) {
|
|
|
434
434
|
_e = _a.dot,
|
|
435
435
|
dot = _e === void 0 ? false : _e,
|
|
436
436
|
ariaLabel = _a["aria-label"],
|
|
437
|
-
className = _a.className
|
|
437
|
+
className = _a.className,
|
|
438
|
+
dataTestId = _a["data-testid"];
|
|
438
439
|
var isVisible = dot || count > 0;
|
|
439
440
|
var displayCount = count > max ? "".concat(max, "+") : count.toString();
|
|
440
441
|
// Generate default aria-label if not provided
|
|
@@ -442,6 +443,7 @@ var Badge = function Badge(_a) {
|
|
|
442
443
|
var label = ariaLabel || defaultAriaLabel;
|
|
443
444
|
return jsxRuntime.jsxs(BadgeWrapper, {
|
|
444
445
|
className: className,
|
|
446
|
+
"data-testid": dataTestId,
|
|
445
447
|
children: [children, jsxRuntime.jsxs(BadgeIndicator, {
|
|
446
448
|
"$variant": variant,
|
|
447
449
|
"$isDot": dot,
|
|
@@ -458,7 +460,7 @@ var Badge = function Badge(_a) {
|
|
|
458
460
|
})]
|
|
459
461
|
});
|
|
460
462
|
};
|
|
461
|
-
var templateObject_1$
|
|
463
|
+
var templateObject_1$J, templateObject_2$w, templateObject_3$t, templateObject_4$n;
|
|
462
464
|
|
|
463
465
|
var StyledBox = styled__default.default.div.withConfig({
|
|
464
466
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -469,15 +471,15 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
469
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"
|
|
470
472
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
471
473
|
])), function (props) {
|
|
472
|
-
return props.$display && styled.css(templateObject_1$
|
|
474
|
+
return props.$display && styled.css(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
473
475
|
}, function (props) {
|
|
474
|
-
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);
|
|
475
477
|
}, function (props) {
|
|
476
|
-
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);
|
|
477
479
|
}, function (props) {
|
|
478
|
-
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);
|
|
479
481
|
}, function (props) {
|
|
480
|
-
return props.$flexWrap && styled.css(templateObject_5$
|
|
482
|
+
return props.$flexWrap && styled.css(templateObject_5$h || (templateObject_5$h = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
481
483
|
}, function (props) {
|
|
482
484
|
return props.$gap && styled.css(templateObject_6$d || (templateObject_6$d = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$gap]);
|
|
483
485
|
}, function (props) {
|
|
@@ -493,7 +495,7 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
493
495
|
}, function (props) {
|
|
494
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]);
|
|
495
497
|
}, function (props) {
|
|
496
|
-
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]);
|
|
497
499
|
}, function (props) {
|
|
498
500
|
return props.$p && styled.css(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject(["padding: ", ";"], ["padding: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$p]);
|
|
499
501
|
}, function (props) {
|
|
@@ -503,7 +505,7 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
503
505
|
}, function (props) {
|
|
504
506
|
return props.$pb && styled.css(templateObject_17$2 || (templateObject_17$2 = __makeTemplateObject(["padding-bottom: ", ";"], ["padding-bottom: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$pb]);
|
|
505
507
|
}, function (props) {
|
|
506
|
-
return props.$pl && styled.css(templateObject_18$
|
|
508
|
+
return props.$pl && styled.css(templateObject_18$2 || (templateObject_18$2 = __makeTemplateObject(["padding-left: ", ";"], ["padding-left: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$pl]);
|
|
507
509
|
}, function (props) {
|
|
508
510
|
return props.$px && styled.css(templateObject_19$1 || (templateObject_19$1 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n padding-left: ", ";\n padding-right: ", ";\n "])), data.tokensJson.semantic.spacing.layout[props.$px], data.tokensJson.semantic.spacing.layout[props.$px]);
|
|
509
511
|
}, function (props) {
|
|
@@ -693,7 +695,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
693
695
|
}));
|
|
694
696
|
};
|
|
695
697
|
var Box = BoxTransform;
|
|
696
|
-
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;
|
|
697
699
|
|
|
698
700
|
var IconStyled = styled__default.default.span.withConfig({
|
|
699
701
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -701,7 +703,7 @@ var IconStyled = styled__default.default.span.withConfig({
|
|
|
701
703
|
},
|
|
702
704
|
displayName: "Icon__IconStyled",
|
|
703
705
|
componentId: "sc-1105czq-0"
|
|
704
|
-
})(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) {
|
|
705
707
|
var $size = _a.$size;
|
|
706
708
|
return data.tokensJson.semantic.size.icon[$size];
|
|
707
709
|
}, function (_a) {
|
|
@@ -767,12 +769,14 @@ var Icon = function Icon(_a) {
|
|
|
767
769
|
})
|
|
768
770
|
});
|
|
769
771
|
};
|
|
770
|
-
var templateObject_1$
|
|
772
|
+
var templateObject_1$H;
|
|
771
773
|
|
|
772
774
|
var button$1 = data.tokensJson.component.button,
|
|
773
|
-
semantic$
|
|
775
|
+
semantic$h = data.tokensJson.semantic;
|
|
776
|
+
// Padding comes from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
777
|
+
var spacing$a = semantic$h.spacing.component;
|
|
774
778
|
// Base styles shared between button and link
|
|
775
|
-
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$
|
|
779
|
+
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");
|
|
776
780
|
// Dynamic variant styles using component tokens
|
|
777
781
|
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
778
782
|
var $variant = _a.$variant;
|
|
@@ -801,6 +805,15 @@ var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
|
801
805
|
disabledBg: button$1.variants.naked.disabled.backgroundColor,
|
|
802
806
|
disabledText: button$1.variants.naked.disabled.textColor
|
|
803
807
|
},
|
|
808
|
+
accent: {
|
|
809
|
+
bg: button$1.variants.accent.backgroundColor,
|
|
810
|
+
text: button$1.variants.accent.textColor,
|
|
811
|
+
hoverBg: button$1.variants.accent.hover.backgroundColor,
|
|
812
|
+
activeBg: button$1.variants.accent.active.backgroundColor,
|
|
813
|
+
disabledBg: button$1.variants.accent.disabled.backgroundColor,
|
|
814
|
+
disabledText: button$1.variants.accent.disabled.textColor
|
|
815
|
+
},
|
|
816
|
+
// Deprecated alias for accent; removed in 3.0
|
|
804
817
|
emphasis: {
|
|
805
818
|
bg: button$1.variants.emphasis.backgroundColor,
|
|
806
819
|
text: button$1.variants.emphasis.textColor,
|
|
@@ -826,13 +839,13 @@ var getSizeStyles$1 = function getSizeStyles(_a) {
|
|
|
826
839
|
var $size = _a.$size;
|
|
827
840
|
switch ($size) {
|
|
828
841
|
case 'small':
|
|
829
|
-
return "\n font: ".concat(button$1.sizes.small.font, ";\n padding: ").concat(
|
|
842
|
+
return "\n font: ".concat(button$1.sizes.small.font, ";\n padding: ").concat(spacing$a.sm, " ").concat(spacing$a.md, ";\n ");
|
|
830
843
|
case 'medium':
|
|
831
|
-
return "\n font: ".concat(button$1.sizes.medium.font, ";\n padding: ").concat(
|
|
844
|
+
return "\n font: ".concat(button$1.sizes.medium.font, ";\n padding: ").concat(spacing$a.sm, " ").concat(spacing$a.lg, ";\n ");
|
|
832
845
|
case 'large':
|
|
833
|
-
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(
|
|
846
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(spacing$a.md, " ").concat(spacing$a.lg, ";\n ");
|
|
834
847
|
default:
|
|
835
|
-
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(
|
|
848
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(spacing$a.md, " ").concat(spacing$a.lg, ";\n ");
|
|
836
849
|
}
|
|
837
850
|
};
|
|
838
851
|
var StyledButton = styled__default.default.button.withConfig({
|
|
@@ -841,14 +854,14 @@ var StyledButton = styled__default.default.button.withConfig({
|
|
|
841
854
|
},
|
|
842
855
|
displayName: "Button__StyledButton",
|
|
843
856
|
componentId: "sc-1eiuum9-0"
|
|
844
|
-
})(templateObject_1$
|
|
857
|
+
})(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);
|
|
845
858
|
var StyledLink = styled__default.default.a.withConfig({
|
|
846
859
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
847
860
|
return !prop.startsWith('$');
|
|
848
861
|
},
|
|
849
862
|
displayName: "Button__StyledLink",
|
|
850
863
|
componentId: "sc-1eiuum9-1"
|
|
851
|
-
})(templateObject_2$
|
|
864
|
+
})(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
852
865
|
// Helper function to get icon size based on button size
|
|
853
866
|
])), baseButtonStyles, button$1.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
854
867
|
// Helper function to get icon size based on button size
|
|
@@ -892,8 +905,11 @@ var Button = function Button(_a) {
|
|
|
892
905
|
rest = __rest(_a, ["variant", "size", "url", "purpose", "children", "target", "iconName", "linkComponent", 'data-testid']);
|
|
893
906
|
// For links with custom link component (e.g., Next.js Link, React Router Link)
|
|
894
907
|
if (purpose === 'link' && url && LinkComponent) {
|
|
895
|
-
|
|
908
|
+
// The link component renders the <a>, so anchor attributes (id, aria-*, rel, handlers) go to it
|
|
909
|
+
var linkProps = rest;
|
|
910
|
+
return jsxRuntime.jsx(LinkComponent, __assign({}, linkProps, {
|
|
896
911
|
href: url,
|
|
912
|
+
target: target,
|
|
897
913
|
children: jsxRuntime.jsx(StyledLink, {
|
|
898
914
|
as: "span",
|
|
899
915
|
"$variant": variant,
|
|
@@ -901,18 +917,17 @@ var Button = function Button(_a) {
|
|
|
901
917
|
"data-testid": dataTestId,
|
|
902
918
|
children: renderButtonContent(children, iconName, size)
|
|
903
919
|
})
|
|
904
|
-
});
|
|
920
|
+
}));
|
|
905
921
|
}
|
|
906
922
|
// For standard links (external or without custom component)
|
|
907
923
|
if (purpose === 'link' && url) {
|
|
908
924
|
var linkProps = rest;
|
|
909
|
-
return jsxRuntime.jsx(StyledLink, __assign({
|
|
925
|
+
return jsxRuntime.jsx(StyledLink, __assign({}, linkProps, {
|
|
910
926
|
href: url,
|
|
911
927
|
target: target,
|
|
912
928
|
"$variant": variant,
|
|
913
929
|
"$size": size,
|
|
914
|
-
"data-testid": dataTestId
|
|
915
|
-
}, linkProps, {
|
|
930
|
+
"data-testid": dataTestId,
|
|
916
931
|
children: renderButtonContent(children, iconName, size)
|
|
917
932
|
}));
|
|
918
933
|
}
|
|
@@ -949,49 +964,46 @@ var Button = function Button(_a) {
|
|
|
949
964
|
children: renderButtonContent(children, iconName, size)
|
|
950
965
|
}));
|
|
951
966
|
};
|
|
952
|
-
var templateObject_1$
|
|
967
|
+
var templateObject_1$G, templateObject_2$u;
|
|
953
968
|
|
|
954
|
-
var semantic$
|
|
955
|
-
var color$
|
|
956
|
-
border$
|
|
957
|
-
spacing$
|
|
969
|
+
var semantic$g = data.tokensJson.semantic;
|
|
970
|
+
var color$8 = semantic$g.color,
|
|
971
|
+
border$9 = semantic$g.border,
|
|
972
|
+
spacing$9 = semantic$g.spacing;
|
|
958
973
|
var label$2 = data.tokensJson.component.badge.label;
|
|
959
|
-
var category = color$
|
|
960
|
-
var radius$3 = border$
|
|
961
|
-
var layout$4 = spacing$
|
|
962
|
-
var
|
|
974
|
+
var category = color$8.category;
|
|
975
|
+
var radius$3 = border$9.radius;
|
|
976
|
+
var layout$4 = spacing$9.layout;
|
|
977
|
+
var labelHeight$1 = semantic$g.size.label;
|
|
978
|
+
// Text on white or the -subtle fill (outlined and minimal), at least 4.5:1 (#115)
|
|
979
|
+
var categoryText = {
|
|
980
|
+
blue: category['blue-text'],
|
|
981
|
+
purple: category['purple-text'],
|
|
982
|
+
pink: category['pink-text'],
|
|
983
|
+
yellow: category['yellow-text'],
|
|
984
|
+
green: category['green-text'],
|
|
985
|
+
red: category['red-text'],
|
|
986
|
+
orange: category['orange-text'],
|
|
987
|
+
gray: category['gray-text']
|
|
988
|
+
};
|
|
989
|
+
var StyledCategoryLabel = styled__default.default.span.withConfig({
|
|
963
990
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
964
991
|
return !prop.startsWith('$');
|
|
965
992
|
},
|
|
966
|
-
displayName: "
|
|
967
|
-
componentId: "sc-
|
|
968
|
-
})(templateObject_1$
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
* A static label for categorizing content with support for 8 color options,
|
|
973
|
-
* 3 visual variants, and optional icons. Perfect for categorizing
|
|
974
|
-
* financial transactions or content types.
|
|
975
|
-
*
|
|
976
|
-
* @example
|
|
977
|
-
* ```tsx
|
|
978
|
-
* <CategoryBadge color="orange" icon="restaurant">
|
|
979
|
-
* Food & Dining
|
|
980
|
-
* </CategoryBadge>
|
|
981
|
-
*
|
|
982
|
-
* <CategoryBadge color="blue" variant="outlined" size="small">
|
|
983
|
-
* Travel
|
|
984
|
-
* </CategoryBadge>
|
|
985
|
-
* ```
|
|
986
|
-
*/])), radius$3.circle, semantic$d.border.width.thin, function (_a) {
|
|
993
|
+
displayName: "CategoryLabel__StyledCategoryLabel",
|
|
994
|
+
componentId: "sc-1jx7bjo-0"
|
|
995
|
+
})(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"
|
|
996
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
997
|
+
// display: contents keeps the root's flex layout and gap.
|
|
998
|
+
])), radius$3.circle, semantic$g.border.width.thin, function (_a) {
|
|
987
999
|
var $size = _a.$size;
|
|
988
|
-
return $size
|
|
1000
|
+
return labelHeight$1[$size];
|
|
989
1001
|
}, function (_a) {
|
|
990
1002
|
var $size = _a.$size;
|
|
991
|
-
return $size === '
|
|
1003
|
+
return $size === 'medium' ? "".concat(layout$4.xs, " ").concat(layout$4.sm) : "".concat(layout$4.sm, " ").concat(layout$4.md);
|
|
992
1004
|
}, function (_a) {
|
|
993
1005
|
var $size = _a.$size;
|
|
994
|
-
return $size === '
|
|
1006
|
+
return $size === 'medium' ? label$2.typography.small : label$2.typography.medium;
|
|
995
1007
|
}, label$2.fontWeight, layout$4.xs, function (_a) {
|
|
996
1008
|
var $color = _a.$color,
|
|
997
1009
|
$variant = _a.$variant;
|
|
@@ -1007,9 +1019,9 @@ var StyledCategoryBadge = styled__default.default.span.withConfig({
|
|
|
1007
1019
|
var $color = _a.$color,
|
|
1008
1020
|
$variant = _a.$variant;
|
|
1009
1021
|
if ($variant === 'filled') {
|
|
1010
|
-
return color$
|
|
1022
|
+
return color$8.text.inverse;
|
|
1011
1023
|
}
|
|
1012
|
-
return
|
|
1024
|
+
return categoryText[$color];
|
|
1013
1025
|
}, function (_a) {
|
|
1014
1026
|
var $color = _a.$color,
|
|
1015
1027
|
$variant = _a.$variant;
|
|
@@ -1018,74 +1030,139 @@ var StyledCategoryBadge = styled__default.default.span.withConfig({
|
|
|
1018
1030
|
}
|
|
1019
1031
|
return 'transparent';
|
|
1020
1032
|
});
|
|
1033
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
1034
|
+
// display: contents keeps the root's flex layout and gap.
|
|
1035
|
+
var VisibleContent$1 = styled__default.default.span.withConfig({
|
|
1036
|
+
displayName: "CategoryLabel__VisibleContent",
|
|
1037
|
+
componentId: "sc-1jx7bjo-1"
|
|
1038
|
+
})(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
|
|
1039
|
+
var HiddenLabel = styled__default.default.span.withConfig({
|
|
1040
|
+
displayName: "CategoryLabel__HiddenLabel",
|
|
1041
|
+
componentId: "sc-1jx7bjo-2"
|
|
1042
|
+
})(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
1043
|
+
/**
|
|
1044
|
+
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1045
|
+
*
|
|
1046
|
+
* A static, chip-like label with 8 category colours, 3 visual variants and an optional icon.
|
|
1047
|
+
* Category colours carry no status meaning; for status use StatusLabel.
|
|
1048
|
+
*
|
|
1049
|
+
* @example
|
|
1050
|
+
* ```tsx
|
|
1051
|
+
* <CategoryLabel color="orange" icon="creditCard">
|
|
1052
|
+
* Shopping
|
|
1053
|
+
* </CategoryLabel>
|
|
1054
|
+
*
|
|
1055
|
+
* <CategoryLabel color="blue" variant="outlined" size="medium">
|
|
1056
|
+
* Travel
|
|
1057
|
+
* </CategoryLabel>
|
|
1058
|
+
* ```
|
|
1059
|
+
*/])), visuallyHidden);
|
|
1021
1060
|
/**
|
|
1022
|
-
*
|
|
1061
|
+
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1023
1062
|
*
|
|
1024
|
-
* A static label
|
|
1025
|
-
*
|
|
1026
|
-
* financial transactions or content types.
|
|
1063
|
+
* A static, chip-like label with 8 category colours, 3 visual variants and an optional icon.
|
|
1064
|
+
* Category colours carry no status meaning; for status use StatusLabel.
|
|
1027
1065
|
*
|
|
1028
1066
|
* @example
|
|
1029
1067
|
* ```tsx
|
|
1030
|
-
* <
|
|
1031
|
-
*
|
|
1032
|
-
* </
|
|
1068
|
+
* <CategoryLabel color="orange" icon="creditCard">
|
|
1069
|
+
* Shopping
|
|
1070
|
+
* </CategoryLabel>
|
|
1033
1071
|
*
|
|
1034
|
-
* <
|
|
1072
|
+
* <CategoryLabel color="blue" variant="outlined" size="medium">
|
|
1035
1073
|
* Travel
|
|
1036
|
-
* </
|
|
1074
|
+
* </CategoryLabel>
|
|
1037
1075
|
* ```
|
|
1038
1076
|
*/
|
|
1039
|
-
var
|
|
1077
|
+
var CategoryLabel = function CategoryLabel(_a) {
|
|
1040
1078
|
var children = _a.children,
|
|
1041
1079
|
_b = _a.color,
|
|
1042
1080
|
color = _b === void 0 ? 'blue' : _b,
|
|
1043
1081
|
_c = _a.variant,
|
|
1044
1082
|
variant = _c === void 0 ? 'filled' : _c,
|
|
1045
1083
|
_d = _a.size,
|
|
1046
|
-
size = _d === void 0 ? '
|
|
1084
|
+
size = _d === void 0 ? 'large' : _d,
|
|
1047
1085
|
icon = _a.icon,
|
|
1048
1086
|
dataTestId = _a["data-testid"],
|
|
1049
1087
|
ariaLabel = _a["aria-label"];
|
|
1050
|
-
var iconSize = size === '
|
|
1051
|
-
|
|
1088
|
+
var iconSize = size === 'medium' ? 'xs' : 'sm';
|
|
1089
|
+
// A blank aria-label is no label at all, so it falls back like a missing one
|
|
1090
|
+
var accessibleLabel = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
1091
|
+
return jsxRuntime.jsxs(StyledCategoryLabel, {
|
|
1052
1092
|
"$color": color,
|
|
1053
1093
|
"$variant": variant,
|
|
1054
1094
|
"$size": size,
|
|
1055
|
-
"aria-label": ariaLabel,
|
|
1056
1095
|
"data-testid": dataTestId,
|
|
1057
|
-
children: [
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1096
|
+
children: [jsxRuntime.jsxs(VisibleContent$1, {
|
|
1097
|
+
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
1098
|
+
children: [icon && jsxRuntime.jsx(Icon, {
|
|
1099
|
+
name: icon,
|
|
1100
|
+
size: iconSize,
|
|
1101
|
+
iconColor: variant === 'filled' ? 'inverse' : 'inherit',
|
|
1102
|
+
"aria-hidden": "true"
|
|
1103
|
+
}), children]
|
|
1104
|
+
}), accessibleLabel && jsxRuntime.jsx(HiddenLabel, {
|
|
1105
|
+
children: accessibleLabel
|
|
1106
|
+
})]
|
|
1063
1107
|
});
|
|
1064
1108
|
};
|
|
1109
|
+
CategoryLabel.displayName = 'CategoryLabel';
|
|
1110
|
+
var templateObject_1$F, templateObject_2$t, templateObject_3$r;
|
|
1111
|
+
|
|
1112
|
+
// CategoryBadge sizes on the decision 0018 scale
|
|
1113
|
+
var toLabelSize = {
|
|
1114
|
+
small: 'medium',
|
|
1115
|
+
medium: 'large'
|
|
1116
|
+
};
|
|
1117
|
+
/**
|
|
1118
|
+
* CategoryBadge displays a category label.
|
|
1119
|
+
*
|
|
1120
|
+
* @deprecated Renamed to `CategoryLabel` (same `color` and `variant`). Map `size="small"` to
|
|
1121
|
+
* `"medium"`, and `size="medium"` (or no size) to `"large"`, CategoryLabel's default.
|
|
1122
|
+
* CategoryBadge is removed in 3.0 (decision 0018).
|
|
1123
|
+
*/
|
|
1124
|
+
var CategoryBadge = function CategoryBadge(_a) {
|
|
1125
|
+
var _b = _a.size,
|
|
1126
|
+
size = _b === void 0 ? 'medium' : _b,
|
|
1127
|
+
props = __rest(_a, ["size"]);
|
|
1128
|
+
return jsxRuntime.jsx(CategoryLabel, __assign({}, props, {
|
|
1129
|
+
size: toLabelSize[size]
|
|
1130
|
+
}));
|
|
1131
|
+
};
|
|
1065
1132
|
CategoryBadge.displayName = 'CategoryBadge';
|
|
1066
|
-
var templateObject_1$E;
|
|
1067
1133
|
|
|
1068
|
-
var chip = data.tokensJson.component.chip;
|
|
1134
|
+
var chip$1 = data.tokensJson.component.chip;
|
|
1069
1135
|
// Helper function to get variant styles matching Button's approach
|
|
1070
1136
|
var getVariantStyles = function getVariantStyles(_a) {
|
|
1071
1137
|
var $variant = _a.$variant,
|
|
1072
1138
|
$selected = _a.$selected,
|
|
1073
1139
|
$clickable = _a.$clickable,
|
|
1074
1140
|
$disabled = _a.$disabled;
|
|
1075
|
-
//
|
|
1141
|
+
// Selected filter and input chips use the light-blue selected treatment (decision 0016).
|
|
1142
|
+
// The text darkens with the fill so every state stays at least 4.5:1.
|
|
1076
1143
|
if ($selected) {
|
|
1077
|
-
|
|
1144
|
+
// A selected disabled chip looks like any disabled chip; the checkmark keeps the
|
|
1145
|
+
// selected state visible (#110)
|
|
1146
|
+
if ($disabled) {
|
|
1147
|
+
var disabled = chip$1.variants.subtle.disabled;
|
|
1148
|
+
return "\n background-color: ".concat(disabled.backgroundColor, ";\n color: ").concat(disabled.textColor, ";\n ");
|
|
1149
|
+
}
|
|
1150
|
+
var _b = data.tokensJson.semantic.color,
|
|
1151
|
+
background = _b.background,
|
|
1152
|
+
text = _b.text;
|
|
1153
|
+
var interactiveStates = $clickable;
|
|
1154
|
+
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 ");
|
|
1078
1155
|
}
|
|
1079
1156
|
switch ($variant) {
|
|
1080
1157
|
case 'emphasis':
|
|
1081
|
-
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 ");
|
|
1158
|
+
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 ");
|
|
1082
1159
|
case 'subtle':
|
|
1083
|
-
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 ");
|
|
1160
|
+
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 ");
|
|
1084
1161
|
case 'interactive':
|
|
1085
|
-
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 ");
|
|
1162
|
+
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 ");
|
|
1086
1163
|
case 'default':
|
|
1087
1164
|
default:
|
|
1088
|
-
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 ");
|
|
1165
|
+
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 ");
|
|
1089
1166
|
}
|
|
1090
1167
|
};
|
|
1091
1168
|
// Helper function to get size styles matching Button's approach
|
|
@@ -1093,13 +1170,15 @@ var getSizeStyles = function getSizeStyles(_a) {
|
|
|
1093
1170
|
var $size = _a.$size;
|
|
1094
1171
|
switch ($size) {
|
|
1095
1172
|
case 'small':
|
|
1096
|
-
return "\n font: ".concat(chip.sizes.small.font, ";\n padding: ").concat(chip.sizes.small.padding, ";\n ");
|
|
1173
|
+
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 ");
|
|
1097
1174
|
case 'medium':
|
|
1098
1175
|
default:
|
|
1099
|
-
return "\n font: ".concat(chip.sizes.medium.font, ";\n padding: ").concat(chip.sizes.medium.padding, ";\n ");
|
|
1176
|
+
return "\n font: ".concat(chip$1.sizes.medium.font, ";\n padding: ").concat(chip$1.sizes.medium.padding, ";\n ");
|
|
1100
1177
|
}
|
|
1101
1178
|
};
|
|
1102
1179
|
|
|
1180
|
+
var chip = data.tokensJson.component.chip,
|
|
1181
|
+
semantic$f = data.tokensJson.semantic;
|
|
1103
1182
|
// Base styled component using direct prop interpolation like Button
|
|
1104
1183
|
var StyledChip = styled__default.default.span.withConfig({
|
|
1105
1184
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1107,16 +1186,16 @@ var StyledChip = styled__default.default.span.withConfig({
|
|
|
1107
1186
|
},
|
|
1108
1187
|
displayName: "ChipBase__StyledChip",
|
|
1109
1188
|
componentId: "sc-moa6zc-0"
|
|
1110
|
-
})(templateObject_1$
|
|
1189
|
+
})(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"
|
|
1111
1190
|
// Icon container for selected indicator or leading icons
|
|
1112
|
-
])), chip["default"].borderRadius,
|
|
1191
|
+
])), chip["default"].borderRadius, semantic$f.motion.hover, function (props) {
|
|
1113
1192
|
return props.$disabled ? 'not-allowed' : props.$clickable ? 'pointer' : 'default';
|
|
1114
|
-
}, getVariantStyles, getSizeStyles, chip.focus.outline,
|
|
1193
|
+
}, getVariantStyles, getSizeStyles, chip.focus.outline, semantic$f.border.focusOffset);
|
|
1115
1194
|
// Icon container for selected indicator or leading icons
|
|
1116
1195
|
var IconContainer = styled__default.default.span.withConfig({
|
|
1117
1196
|
displayName: "ChipBase__IconContainer",
|
|
1118
1197
|
componentId: "sc-moa6zc-1"
|
|
1119
|
-
})(templateObject_2$
|
|
1198
|
+
})(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"
|
|
1120
1199
|
// Close button for dismissible chips
|
|
1121
1200
|
])), data.tokensJson.semantic.spacing.layout.xs);
|
|
1122
1201
|
// Close button for dismissible chips
|
|
@@ -1126,24 +1205,21 @@ var CloseButton = styled__default.default.button.withConfig({
|
|
|
1126
1205
|
},
|
|
1127
1206
|
displayName: "ChipBase__CloseButton",
|
|
1128
1207
|
componentId: "sc-moa6zc-2"
|
|
1129
|
-
})(templateObject_3$
|
|
1208
|
+
})(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) {
|
|
1130
1209
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1131
|
-
},
|
|
1132
|
-
var templateObject_1$
|
|
1210
|
+
}, 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);
|
|
1211
|
+
var templateObject_1$E, templateObject_2$s, templateObject_3$q;
|
|
1133
1212
|
|
|
1134
1213
|
/**
|
|
1135
|
-
* Chip -
|
|
1214
|
+
* Chip - a static, non-interactive label for tags, categories and metadata.
|
|
1136
1215
|
*
|
|
1137
|
-
*
|
|
1138
|
-
*
|
|
1139
|
-
* -
|
|
1140
|
-
* - BooleanChip:
|
|
1216
|
+
* Chips are classified by job (decision 0016):
|
|
1217
|
+
* - Chip: a static label (`default` variant only)
|
|
1218
|
+
* - InputChip: a removable value, such as an applied filter (formerly `FilterChip`)
|
|
1219
|
+
* - BooleanChip: toggles a filter on and off (becomes `FilterChip` in 3.0)
|
|
1141
1220
|
*
|
|
1142
|
-
*
|
|
1143
|
-
*
|
|
1144
|
-
* - emphasis: High-contrast dark background
|
|
1145
|
-
* - subtle: Light background for secondary info
|
|
1146
|
-
* - interactive: Blue background with hover states
|
|
1221
|
+
* The `emphasis`, `subtle`, `interactive`, `light` and `dark` variants and `onClick` are
|
|
1222
|
+
* deprecated and will be removed in 3.0.
|
|
1147
1223
|
*/
|
|
1148
1224
|
var Chip = function Chip(_a) {
|
|
1149
1225
|
var children = _a.children,
|
|
@@ -1205,22 +1281,22 @@ var LegacyChip = function LegacyChip(_a) {
|
|
|
1205
1281
|
};
|
|
1206
1282
|
|
|
1207
1283
|
/**
|
|
1208
|
-
*
|
|
1284
|
+
* InputChip - A removable value, such as an applied filter, with an optional selected state
|
|
1209
1285
|
*
|
|
1210
|
-
* Use this component to show
|
|
1211
|
-
* When selected, displays a checkmark
|
|
1286
|
+
* Use this component to show values the user has entered or applied, such as filters.
|
|
1287
|
+
* When selected, displays a checkmark on the light-blue selected treatment (decision 0016).
|
|
1288
|
+
* A selected disabled chip uses the disabled colours and keeps its checkmark.
|
|
1212
1289
|
* Optionally dismissible when onDismiss is provided.
|
|
1213
1290
|
*
|
|
1214
1291
|
* Features:
|
|
1215
1292
|
* - Shows checkmark icon when selected
|
|
1216
|
-
* - Light blue
|
|
1293
|
+
* - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
|
|
1217
1294
|
* - Optional close (×) button when onDismiss is provided
|
|
1218
1295
|
* - Keyboard dismissal with Delete or Backspace keys (when dismissible)
|
|
1219
1296
|
* - Non-clickable body (only close button is interactive when present)
|
|
1220
|
-
* - Uses subtle/interactive background styling based on selected state
|
|
1221
1297
|
* - Announces as "status" to screen readers
|
|
1222
1298
|
*/
|
|
1223
|
-
var
|
|
1299
|
+
var InputChip = function InputChip(_a) {
|
|
1224
1300
|
var children = _a.children,
|
|
1225
1301
|
_b = _a.selected,
|
|
1226
1302
|
selected = _b === void 0 ? false : _b,
|
|
@@ -1273,7 +1349,8 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1273
1349
|
"aria-hidden": "true",
|
|
1274
1350
|
children: jsxRuntime.jsx(Icon, {
|
|
1275
1351
|
name: "check",
|
|
1276
|
-
size: "sm"
|
|
1352
|
+
size: "sm",
|
|
1353
|
+
iconColor: "inherit"
|
|
1277
1354
|
})
|
|
1278
1355
|
}), children, isDismissible && jsxRuntime.jsx(CloseButton, {
|
|
1279
1356
|
type: "button",
|
|
@@ -1286,12 +1363,22 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1286
1363
|
"data-testid": dataTestId ? "".concat(dataTestId, "-close") : undefined,
|
|
1287
1364
|
children: jsxRuntime.jsx(Icon, {
|
|
1288
1365
|
name: "close",
|
|
1289
|
-
size: "sm"
|
|
1366
|
+
size: "sm",
|
|
1367
|
+
iconColor: "inherit"
|
|
1290
1368
|
})
|
|
1291
1369
|
})]
|
|
1292
1370
|
}));
|
|
1293
1371
|
};
|
|
1294
1372
|
|
|
1373
|
+
/**
|
|
1374
|
+
* FilterChip - a removable chip with an optional selected state.
|
|
1375
|
+
*
|
|
1376
|
+
* @deprecated Renamed to `InputChip`; in 3.0 `FilterChip` becomes the toggle chip (today's
|
|
1377
|
+
* `BooleanChip`). Replace `FilterChip` with `InputChip` first, then `BooleanChip` with
|
|
1378
|
+
* `FilterChip` when you upgrade to 3.0 (decision 0016).
|
|
1379
|
+
*/
|
|
1380
|
+
var FilterChip = InputChip;
|
|
1381
|
+
|
|
1295
1382
|
/**
|
|
1296
1383
|
* BooleanChip - Toggleable chip for quick filter controls
|
|
1297
1384
|
*
|
|
@@ -1304,7 +1391,11 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1304
1391
|
* - Entire chip is clickable to toggle
|
|
1305
1392
|
* - Keyboard activation with Space or Enter
|
|
1306
1393
|
* - Uses checkbox role with aria-checked
|
|
1307
|
-
* -
|
|
1394
|
+
* - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
|
|
1395
|
+
*
|
|
1396
|
+
* @deprecated Becomes `FilterChip` in 3.0, with the same props. Keep using `BooleanChip`
|
|
1397
|
+
* until you upgrade; in 3.0, replace `FilterChip` with `InputChip` first, then
|
|
1398
|
+
* `BooleanChip` with `FilterChip` (decision 0016).
|
|
1308
1399
|
*/
|
|
1309
1400
|
var BooleanChip = function BooleanChip(_a) {
|
|
1310
1401
|
var children = _a.children,
|
|
@@ -1350,17 +1441,18 @@ var BooleanChip = function BooleanChip(_a) {
|
|
|
1350
1441
|
"aria-hidden": "true",
|
|
1351
1442
|
children: jsxRuntime.jsx(Icon, {
|
|
1352
1443
|
name: "check",
|
|
1353
|
-
size: "sm"
|
|
1444
|
+
size: "sm",
|
|
1445
|
+
iconColor: "inherit"
|
|
1354
1446
|
})
|
|
1355
1447
|
}), children]
|
|
1356
1448
|
}));
|
|
1357
1449
|
};
|
|
1358
1450
|
|
|
1359
|
-
var spacing$
|
|
1451
|
+
var spacing$8 = data.tokensJson.semantic.spacing;
|
|
1360
1452
|
var StyledContainer$2 = styled__default.default.div.withConfig({
|
|
1361
1453
|
displayName: "Container__StyledContainer",
|
|
1362
1454
|
componentId: "sc-17dbj6n-0"
|
|
1363
|
-
})(templateObject_1$
|
|
1455
|
+
})(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']);
|
|
1364
1456
|
var Container$1 = function Container(_a) {
|
|
1365
1457
|
var children = _a.children,
|
|
1366
1458
|
props = __rest(_a, ["children"]);
|
|
@@ -1368,24 +1460,24 @@ var Container$1 = function Container(_a) {
|
|
|
1368
1460
|
children: children
|
|
1369
1461
|
}));
|
|
1370
1462
|
};
|
|
1371
|
-
var templateObject_1$
|
|
1463
|
+
var templateObject_1$D;
|
|
1372
1464
|
|
|
1373
1465
|
var PictureWrapper = styled__default.default.div.withConfig({
|
|
1374
1466
|
displayName: "Picture__PictureWrapper",
|
|
1375
1467
|
componentId: "sc-11d9tei-0"
|
|
1376
|
-
})(templateObject_1$
|
|
1468
|
+
})(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);
|
|
1377
1469
|
var ImageLink = styled__default.default.a.withConfig({
|
|
1378
1470
|
displayName: "Picture__ImageLink",
|
|
1379
1471
|
componentId: "sc-11d9tei-1"
|
|
1380
|
-
})(templateObject_2$
|
|
1472
|
+
})(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);
|
|
1381
1473
|
var ImageButton = styled__default.default.button.withConfig({
|
|
1382
1474
|
displayName: "Picture__ImageButton",
|
|
1383
1475
|
componentId: "sc-11d9tei-2"
|
|
1384
|
-
})(templateObject_3$
|
|
1476
|
+
})(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);
|
|
1385
1477
|
var StyledImage = styled__default.default.img.withConfig({
|
|
1386
1478
|
displayName: "Picture__StyledImage",
|
|
1387
1479
|
componentId: "sc-11d9tei-3"
|
|
1388
|
-
})(templateObject_4$
|
|
1480
|
+
})(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);
|
|
1389
1481
|
var Picture = function Picture(_a) {
|
|
1390
1482
|
var title = _a.title,
|
|
1391
1483
|
src = _a.src,
|
|
@@ -1415,18 +1507,18 @@ var Picture = function Picture(_a) {
|
|
|
1415
1507
|
}) : image
|
|
1416
1508
|
});
|
|
1417
1509
|
};
|
|
1418
|
-
var templateObject_1$
|
|
1510
|
+
var templateObject_1$C, templateObject_2$r, templateObject_3$p, templateObject_4$l;
|
|
1419
1511
|
|
|
1420
|
-
var _a$
|
|
1421
|
-
typography = _a$
|
|
1422
|
-
color$
|
|
1512
|
+
var _a$9 = data.tokensJson.semantic,
|
|
1513
|
+
typography$1 = _a$9.typography,
|
|
1514
|
+
color$7 = _a$9.color;
|
|
1423
1515
|
var TimeStyled = styled__default.default.time.withConfig({
|
|
1424
1516
|
displayName: "DateFormatter__TimeStyled",
|
|
1425
1517
|
componentId: "sc-5464cc-0"
|
|
1426
|
-
})(templateObject_1$
|
|
1518
|
+
})(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
1427
1519
|
/**
|
|
1428
1520
|
* Formats a date with smart relative/absolute logic
|
|
1429
|
-
*/])), typography.label, color$
|
|
1521
|
+
*/])), typography$1.label, color$7.text.subdued);
|
|
1430
1522
|
/**
|
|
1431
1523
|
* Formats a date with smart relative/absolute logic
|
|
1432
1524
|
*/
|
|
@@ -1472,43 +1564,67 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1472
1564
|
children: displayText
|
|
1473
1565
|
});
|
|
1474
1566
|
};
|
|
1475
|
-
var templateObject_1$
|
|
1567
|
+
var templateObject_1$B;
|
|
1476
1568
|
|
|
1477
|
-
var
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1569
|
+
var _a$8 = data.tokensJson.semantic,
|
|
1570
|
+
motion$5 = _a$8.motion,
|
|
1571
|
+
border$8 = _a$8.border,
|
|
1572
|
+
spacing$7 = _a$8.spacing,
|
|
1573
|
+
_b$1 = data.tokensJson.component,
|
|
1574
|
+
iconButton = _b$1.iconButton,
|
|
1575
|
+
button = _b$1.button;
|
|
1576
|
+
// Padding comes from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
1577
|
+
var padding = {
|
|
1578
|
+
small: spacing$7.component.xs,
|
|
1579
|
+
medium: spacing$7.component.sm,
|
|
1580
|
+
large: spacing$7.component.md
|
|
1581
|
+
};
|
|
1582
|
+
// Colours and motion come from Button's tokens, so IconButton's variants look and behave exactly like
|
|
1583
|
+
// Button's in every state (#130). Only the size and the icon differ
|
|
1584
|
+
var variants = {
|
|
1585
|
+
primary: {
|
|
1586
|
+
bg: button.primary.backgroundColor,
|
|
1587
|
+
text: button.primary.textColor,
|
|
1588
|
+
hoverBg: button.hover.backgroundColor,
|
|
1589
|
+
activeBg: button.active.backgroundColor,
|
|
1590
|
+
disabledBg: button.disabled.backgroundColor,
|
|
1591
|
+
disabledText: button.disabled.textColor
|
|
1592
|
+
},
|
|
1593
|
+
secondary: {
|
|
1594
|
+
bg: button.variants.secondary.backgroundColor,
|
|
1595
|
+
text: button.variants.secondary.textColor,
|
|
1596
|
+
hoverBg: button.variants.secondary.hover.backgroundColor,
|
|
1597
|
+
activeBg: button.variants.secondary.active.backgroundColor,
|
|
1598
|
+
disabledBg: button.variants.secondary.disabled.backgroundColor,
|
|
1599
|
+
disabledText: button.variants.secondary.disabled.textColor
|
|
1600
|
+
},
|
|
1601
|
+
naked: {
|
|
1602
|
+
bg: button.variants.naked.backgroundColor,
|
|
1603
|
+
text: button.variants.naked.textColor,
|
|
1604
|
+
hoverBg: button.variants.naked.hover.backgroundColor,
|
|
1605
|
+
activeBg: button.variants.naked.active.backgroundColor,
|
|
1606
|
+
disabledBg: button.variants.naked.disabled.backgroundColor,
|
|
1607
|
+
disabledText: button.variants.naked.disabled.textColor
|
|
1608
|
+
}
|
|
1609
|
+
};
|
|
1610
|
+
// JavaScript callers can pass any string, so an unknown variant falls back to primary, as before
|
|
1611
|
+
var colours = function colours(variant) {
|
|
1612
|
+
var _a;
|
|
1613
|
+
return (_a = variants[variant]) !== null && _a !== void 0 ? _a : variants.primary;
|
|
1614
|
+
};
|
|
1481
1615
|
var IconButtonStyled = styled__default.default.button.withConfig({
|
|
1482
1616
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1483
1617
|
return !prop.startsWith('$');
|
|
1484
1618
|
},
|
|
1485
1619
|
displayName: "IconButton__IconButtonStyled",
|
|
1486
1620
|
componentId: "sc-k8b14t-0"
|
|
1487
|
-
})(templateObject_1$
|
|
1621
|
+
})(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) {
|
|
1488
1622
|
var $variant = _a.$variant;
|
|
1489
|
-
|
|
1490
|
-
case 'primary':
|
|
1491
|
-
return iconButton.primary.backgroundColor;
|
|
1492
|
-
case 'secondary':
|
|
1493
|
-
return iconButton.variants.secondary.backgroundColor;
|
|
1494
|
-
case 'naked':
|
|
1495
|
-
return iconButton.variants.naked.backgroundColor;
|
|
1496
|
-
default:
|
|
1497
|
-
return iconButton.primary.backgroundColor;
|
|
1498
|
-
}
|
|
1623
|
+
return colours($variant).bg;
|
|
1499
1624
|
}, function (_a) {
|
|
1500
1625
|
var $variant = _a.$variant;
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
return button.primary.textColor;
|
|
1504
|
-
case 'secondary':
|
|
1505
|
-
return button.variants.secondary.textColor;
|
|
1506
|
-
case 'naked':
|
|
1507
|
-
return button.variants.naked.textColor;
|
|
1508
|
-
default:
|
|
1509
|
-
return button.primary.textColor;
|
|
1510
|
-
}
|
|
1511
|
-
}, iconButton.primary.borderRadius, motion$5.transition.normal, iconButton.primary.display, iconButton.primary.justifyContent, iconButton.primary.alignItems, function (_a) {
|
|
1626
|
+
return colours($variant).text;
|
|
1627
|
+
}, iconButton.primary.borderRadius, motion$5.hover, function (_a) {
|
|
1512
1628
|
var $size = _a.$size;
|
|
1513
1629
|
return iconButton.sizes[$size].minWidth;
|
|
1514
1630
|
}, function (_a) {
|
|
@@ -1516,32 +1632,20 @@ var IconButtonStyled = styled__default.default.button.withConfig({
|
|
|
1516
1632
|
return iconButton.sizes[$size].minHeight;
|
|
1517
1633
|
}, function (_a) {
|
|
1518
1634
|
var $size = _a.$size;
|
|
1519
|
-
return
|
|
1635
|
+
return padding[$size];
|
|
1520
1636
|
}, function (_a) {
|
|
1521
1637
|
var $variant = _a.$variant;
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
return iconButton.hover.backgroundColor;
|
|
1525
|
-
case 'secondary':
|
|
1526
|
-
return iconButton.variants.secondary.hover.backgroundColor;
|
|
1527
|
-
case 'naked':
|
|
1528
|
-
return iconButton.variants.naked.hover.backgroundColor;
|
|
1529
|
-
default:
|
|
1530
|
-
return iconButton.hover.backgroundColor;
|
|
1531
|
-
}
|
|
1532
|
-
}, iconButton.active.backgroundColor, iconButton.focus.outline, iconButton.focus.outlineOffset, iconButton.disabled.backgroundColor, function (_a) {
|
|
1638
|
+
return colours($variant).hoverBg;
|
|
1639
|
+
}, function (_a) {
|
|
1533
1640
|
var $variant = _a.$variant;
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
return button.disabled.textColor;
|
|
1543
|
-
}
|
|
1544
|
-
}, data.tokensJson.semantic.border.width.thin);
|
|
1641
|
+
return colours($variant).activeBg;
|
|
1642
|
+
}, iconButton.focus.outline, border$8.focusOffset, function (_a) {
|
|
1643
|
+
var $variant = _a.$variant;
|
|
1644
|
+
return colours($variant).disabledBg;
|
|
1645
|
+
}, function (_a) {
|
|
1646
|
+
var $variant = _a.$variant;
|
|
1647
|
+
return colours($variant).disabledText;
|
|
1648
|
+
});
|
|
1545
1649
|
var IconButton = function IconButton(_a) {
|
|
1546
1650
|
var variant = _a.variant,
|
|
1547
1651
|
_b = _a.size,
|
|
@@ -1592,7 +1696,7 @@ var IconButton = function IconButton(_a) {
|
|
|
1592
1696
|
})
|
|
1593
1697
|
}));
|
|
1594
1698
|
};
|
|
1595
|
-
var templateObject_1$
|
|
1699
|
+
var templateObject_1$A;
|
|
1596
1700
|
|
|
1597
1701
|
var StyledWrapper = styled__default.default.span.withConfig({
|
|
1598
1702
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1600,7 +1704,7 @@ var StyledWrapper = styled__default.default.span.withConfig({
|
|
|
1600
1704
|
},
|
|
1601
1705
|
displayName: "MoneyDisplay__StyledWrapper",
|
|
1602
1706
|
componentId: "sc-1mddej3-0"
|
|
1603
|
-
})(templateObject_1$
|
|
1707
|
+
})(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"
|
|
1604
1708
|
// Map size to Typography variant
|
|
1605
1709
|
])), function (_a) {
|
|
1606
1710
|
var $align = _a.$align;
|
|
@@ -1703,17 +1807,17 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
1703
1807
|
})]
|
|
1704
1808
|
});
|
|
1705
1809
|
};
|
|
1706
|
-
var templateObject_1$
|
|
1810
|
+
var templateObject_1$z;
|
|
1707
1811
|
|
|
1708
1812
|
// Destructure tokens
|
|
1709
|
-
var semantic$
|
|
1710
|
-
var _a$
|
|
1813
|
+
var semantic$e = data.tokensJson.semantic;
|
|
1814
|
+
var _a$7 = __assign(__assign({}, semantic$e), {
|
|
1711
1815
|
component: data.tokensJson.component
|
|
1712
1816
|
}),
|
|
1713
|
-
color$
|
|
1714
|
-
border$7 = _a$
|
|
1715
|
-
motion$4 = _a$
|
|
1716
|
-
component$2 = _a$
|
|
1817
|
+
color$6 = _a$7.color,
|
|
1818
|
+
border$7 = _a$7.border,
|
|
1819
|
+
motion$4 = _a$7.motion,
|
|
1820
|
+
component$2 = _a$7.component;
|
|
1717
1821
|
var radius$2 = border$7.radius;
|
|
1718
1822
|
var ProgressBarContainer = styled__default.default.div.withConfig({
|
|
1719
1823
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1721,10 +1825,10 @@ var ProgressBarContainer = styled__default.default.div.withConfig({
|
|
|
1721
1825
|
},
|
|
1722
1826
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
1723
1827
|
componentId: "sc-1nco33q-0"
|
|
1724
|
-
})(templateObject_3$
|
|
1725
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_1$
|
|
1828
|
+
})(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) {
|
|
1829
|
+
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);
|
|
1726
1830
|
}, function (props) {
|
|
1727
|
-
return props.$variant === 'vertical' && styled.css(templateObject_2$
|
|
1831
|
+
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);
|
|
1728
1832
|
});
|
|
1729
1833
|
var ProgressBarFill = styled__default.default.div.withConfig({
|
|
1730
1834
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1736,19 +1840,19 @@ var ProgressBarFill = styled__default.default.div.withConfig({
|
|
|
1736
1840
|
var backgroundColor;
|
|
1737
1841
|
switch (props.$color) {
|
|
1738
1842
|
case 'success':
|
|
1739
|
-
backgroundColor = color$
|
|
1843
|
+
backgroundColor = color$6.background.success;
|
|
1740
1844
|
break;
|
|
1741
1845
|
case 'error':
|
|
1742
|
-
backgroundColor = color$
|
|
1846
|
+
backgroundColor = color$6.background.error;
|
|
1743
1847
|
break;
|
|
1744
1848
|
case 'default':
|
|
1745
1849
|
default:
|
|
1746
|
-
backgroundColor = color$
|
|
1850
|
+
backgroundColor = color$6.background.interactive;
|
|
1747
1851
|
break;
|
|
1748
1852
|
}
|
|
1749
|
-
return styled.css(templateObject_4$
|
|
1853
|
+
return styled.css(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
1750
1854
|
}, function (props) {
|
|
1751
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_5$
|
|
1855
|
+
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)));
|
|
1752
1856
|
}, function (props) {
|
|
1753
1857
|
return props.$variant === 'vertical' && styled.css(templateObject_6$c || (templateObject_6$c = __makeTemplateObject(["\n width: 100%;\n height: ", "%;\n "], ["\n width: 100%;\n height: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1754
1858
|
});
|
|
@@ -1760,13 +1864,20 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1760
1864
|
color = _c === void 0 ? 'default' : _c,
|
|
1761
1865
|
height = _a.height,
|
|
1762
1866
|
width = _a.width,
|
|
1867
|
+
ariaLabel = _a["aria-label"],
|
|
1868
|
+
ariaLabelledBy = _a["aria-labelledby"],
|
|
1763
1869
|
dataTestId = _a["data-testid"];
|
|
1870
|
+
// Blank values are no name at all, so they fall back like missing ones
|
|
1871
|
+
var label = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
1872
|
+
var labelledBy = (ariaLabelledBy === null || ariaLabelledBy === void 0 ? void 0 : ariaLabelledBy.trim()) ? ariaLabelledBy : undefined;
|
|
1764
1873
|
return jsxRuntime.jsx(ProgressBarContainer, {
|
|
1765
1874
|
"$variant": variant,
|
|
1766
1875
|
"$height": height,
|
|
1767
1876
|
"$width": width,
|
|
1768
1877
|
"data-testid": dataTestId,
|
|
1769
1878
|
role: "progressbar",
|
|
1879
|
+
"aria-label": label !== null && label !== void 0 ? label : labelledBy ? undefined : 'Progress',
|
|
1880
|
+
"aria-labelledby": labelledBy,
|
|
1770
1881
|
"aria-valuenow": Math.min(100, Math.max(0, value)),
|
|
1771
1882
|
"aria-valuemin": 0,
|
|
1772
1883
|
"aria-valuemax": 100,
|
|
@@ -1777,10 +1888,11 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1777
1888
|
})
|
|
1778
1889
|
});
|
|
1779
1890
|
};
|
|
1780
|
-
var templateObject_1$
|
|
1891
|
+
var templateObject_1$y, templateObject_2$q, templateObject_3$o, templateObject_4$k, templateObject_5$g, templateObject_6$c, templateObject_7$a;
|
|
1781
1892
|
|
|
1782
1893
|
// Destructure tokens for cleaner access
|
|
1783
1894
|
var separatorTokens = data.tokensJson.component.separator;
|
|
1895
|
+
// Margins come from the semantic separator spacing: no component spacing tokens (decision 0022)
|
|
1784
1896
|
var separatorSpacing = data.tokensJson.semantic.spacing.separator;
|
|
1785
1897
|
var StyledDivider = styled__default.default.div.withConfig({
|
|
1786
1898
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1788,7 +1900,7 @@ var StyledDivider = styled__default.default.div.withConfig({
|
|
|
1788
1900
|
},
|
|
1789
1901
|
displayName: "Divider__StyledDivider",
|
|
1790
1902
|
componentId: "sc-1l0c8ja-0"
|
|
1791
|
-
})(templateObject_1$
|
|
1903
|
+
})(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"
|
|
1792
1904
|
/**
|
|
1793
1905
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
1794
1906
|
*
|
|
@@ -1837,7 +1949,7 @@ var StyledDivider = styled__default.default.div.withConfig({
|
|
|
1837
1949
|
$orientation = _d === void 0 ? 'horizontal' : _d;
|
|
1838
1950
|
if ($variant === 'minimal' && $orientation === 'horizontal') {
|
|
1839
1951
|
// Minimal variant always uses its predefined spacing for horizontal
|
|
1840
|
-
return "margin: ".concat(
|
|
1952
|
+
return "margin: ".concat(separatorSpacing.md, " 0;");
|
|
1841
1953
|
}
|
|
1842
1954
|
if ($orientation === 'vertical') {
|
|
1843
1955
|
// Vertical orientation uses horizontal margins (left/right)
|
|
@@ -1856,14 +1968,14 @@ var StyledDivider = styled__default.default.div.withConfig({
|
|
|
1856
1968
|
// Horizontal orientation uses vertical margins (top/bottom)
|
|
1857
1969
|
switch ($size) {
|
|
1858
1970
|
case 'small':
|
|
1859
|
-
return "margin: ".concat(
|
|
1971
|
+
return "margin: ".concat(separatorSpacing.sm, " 0;");
|
|
1860
1972
|
case 'medium':
|
|
1861
|
-
return "margin: ".concat(
|
|
1973
|
+
return "margin: ".concat(separatorSpacing.md, " 0;");
|
|
1862
1974
|
case 'xlarge':
|
|
1863
|
-
return "margin: ".concat(
|
|
1975
|
+
return "margin: ".concat(separatorSpacing.xl, " 0;");
|
|
1864
1976
|
case 'large':
|
|
1865
1977
|
default:
|
|
1866
|
-
return "margin: ".concat(
|
|
1978
|
+
return "margin: ".concat(separatorSpacing.lg, " 0;");
|
|
1867
1979
|
}
|
|
1868
1980
|
});
|
|
1869
1981
|
/**
|
|
@@ -1901,7 +2013,7 @@ var Divider = function Divider(_a) {
|
|
|
1901
2013
|
"aria-orientation": orientation
|
|
1902
2014
|
});
|
|
1903
2015
|
};
|
|
1904
|
-
var templateObject_1$
|
|
2016
|
+
var templateObject_1$x;
|
|
1905
2017
|
|
|
1906
2018
|
var StyledStack = styled__default.default.div.withConfig({
|
|
1907
2019
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1909,7 +2021,7 @@ var StyledStack = styled__default.default.div.withConfig({
|
|
|
1909
2021
|
},
|
|
1910
2022
|
displayName: "Stack__StyledStack",
|
|
1911
2023
|
componentId: "sc-1ehkxgy-0"
|
|
1912
|
-
})(templateObject_1$
|
|
2024
|
+
})(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"
|
|
1913
2025
|
// Helper function to convert gap prop to CSS value
|
|
1914
2026
|
])));
|
|
1915
2027
|
// Helper function to convert gap prop to CSS value
|
|
@@ -1948,18 +2060,19 @@ var Stack = function Stack(_a) {
|
|
|
1948
2060
|
children: children
|
|
1949
2061
|
});
|
|
1950
2062
|
};
|
|
1951
|
-
var templateObject_1$
|
|
2063
|
+
var templateObject_1$w;
|
|
1952
2064
|
|
|
1953
2065
|
// Destructure tokens for cleaner access
|
|
1954
2066
|
var statusColors = data.tokensJson.semantic.color.status;
|
|
1955
|
-
var spacing$
|
|
2067
|
+
var spacing$6 = data.tokensJson.semantic.spacing.layout;
|
|
1956
2068
|
var radius$1 = data.tokensJson.semantic.border.radius;
|
|
1957
|
-
var _a$
|
|
1958
|
-
transition = _a$
|
|
1959
|
-
duration$3 = _a$
|
|
1960
|
-
easing$3 = _a$
|
|
2069
|
+
var _a$6 = data.tokensJson.semantic.motion,
|
|
2070
|
+
transition = _a$6.transition,
|
|
2071
|
+
duration$3 = _a$6.duration,
|
|
2072
|
+
easing$3 = _a$6.easing;
|
|
2073
|
+
var labelHeight = data.tokensJson.semantic.size.label;
|
|
1961
2074
|
var label$1 = data.tokensJson.component.badge.label;
|
|
1962
|
-
var scaleIn$1 = styled.keyframes(templateObject_1$
|
|
2075
|
+
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"])));
|
|
1963
2076
|
var getStatusConfig = function getStatusConfig(status) {
|
|
1964
2077
|
var configs = {
|
|
1965
2078
|
pending: {
|
|
@@ -2004,31 +2117,31 @@ var getStatusConfig = function getStatusConfig(status) {
|
|
|
2004
2117
|
return configs[status];
|
|
2005
2118
|
};
|
|
2006
2119
|
// Size configuration
|
|
2007
|
-
var sizeConfig = {
|
|
2120
|
+
var sizeConfig$1 = {
|
|
2008
2121
|
small: {
|
|
2009
|
-
height:
|
|
2010
|
-
padding: "".concat(spacing$
|
|
2122
|
+
height: labelHeight.small,
|
|
2123
|
+
padding: "".concat(spacing$6.xs, " ").concat(spacing$6.sm),
|
|
2011
2124
|
font: label$1.typography.small,
|
|
2012
|
-
gap: spacing$
|
|
2125
|
+
gap: spacing$6.xs,
|
|
2013
2126
|
iconSize: 'xs'
|
|
2014
2127
|
},
|
|
2015
2128
|
medium: {
|
|
2016
|
-
height:
|
|
2017
|
-
padding: "".concat(spacing$
|
|
2129
|
+
height: labelHeight.medium,
|
|
2130
|
+
padding: "".concat(spacing$6.xs, " ").concat(spacing$6.sm),
|
|
2018
2131
|
font: label$1.typography.medium,
|
|
2019
|
-
gap: spacing$
|
|
2132
|
+
gap: spacing$6.xs,
|
|
2020
2133
|
iconSize: 'sm'
|
|
2021
2134
|
}
|
|
2022
2135
|
};
|
|
2023
|
-
var
|
|
2136
|
+
var StyledStatusLabel = styled__default.default.span.withConfig({
|
|
2024
2137
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2025
2138
|
return !prop.startsWith('$');
|
|
2026
2139
|
},
|
|
2027
|
-
displayName: "
|
|
2028
|
-
componentId: "sc-
|
|
2029
|
-
})(templateObject_2$
|
|
2140
|
+
displayName: "StatusLabelBase__StyledStatusLabel",
|
|
2141
|
+
componentId: "sc-1ye9xz5-0"
|
|
2142
|
+
})(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) {
|
|
2030
2143
|
var $size = _a.$size;
|
|
2031
|
-
var size = sizeConfig[$size];
|
|
2144
|
+
var size = sizeConfig$1[$size];
|
|
2032
2145
|
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 ");
|
|
2033
2146
|
}, function (_a) {
|
|
2034
2147
|
var $status = _a.$status;
|
|
@@ -2036,56 +2149,29 @@ var StyledStatusBadge = styled__default.default.span.withConfig({
|
|
|
2036
2149
|
return "\n background-color: ".concat(config.bgColor, ";\n color: ").concat(config.color, ";\n ");
|
|
2037
2150
|
});
|
|
2038
2151
|
var ScreenReaderOnly = styled__default.default.span.withConfig({
|
|
2039
|
-
displayName: "
|
|
2040
|
-
componentId: "sc-
|
|
2041
|
-
})(templateObject_3$
|
|
2152
|
+
displayName: "StatusLabelBase__ScreenReaderOnly",
|
|
2153
|
+
componentId: "sc-1ye9xz5-1"
|
|
2154
|
+
})(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
2155
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
2156
|
+
// display: contents keeps the root's flex layout and gap.
|
|
2157
|
+
])), visuallyHidden);
|
|
2158
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
2159
|
+
// display: contents keeps the root's flex layout and gap.
|
|
2160
|
+
var VisibleContent = styled__default.default.span.withConfig({
|
|
2161
|
+
displayName: "StatusLabelBase__VisibleContent",
|
|
2162
|
+
componentId: "sc-1ye9xz5-2"
|
|
2163
|
+
})(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"
|
|
2042
2164
|
/**
|
|
2043
|
-
*
|
|
2044
|
-
*
|
|
2045
|
-
*
|
|
2046
|
-
|
|
2047
|
-
*
|
|
2048
|
-
* @example
|
|
2049
|
-
* ```tsx
|
|
2050
|
-
* <StatusBadge status="completed" />
|
|
2051
|
-
*
|
|
2052
|
-
* <StatusBadge
|
|
2053
|
-
* status="pending"
|
|
2054
|
-
* label="Awaiting approval"
|
|
2055
|
-
* size="small"
|
|
2056
|
-
* />
|
|
2057
|
-
*
|
|
2058
|
-
* <StatusBadge
|
|
2059
|
-
* status="failed"
|
|
2060
|
-
* showIcon={false}
|
|
2061
|
-
* liveRegion={true}
|
|
2062
|
-
* />
|
|
2063
|
-
* ```
|
|
2064
|
-
*/])), visuallyHidden);
|
|
2165
|
+
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2166
|
+
* from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
|
|
2167
|
+
* (decision 0018).
|
|
2168
|
+
*/])));
|
|
2065
2169
|
/**
|
|
2066
|
-
*
|
|
2067
|
-
*
|
|
2068
|
-
*
|
|
2069
|
-
* Maps to 6 common status types with semantic color tokens.
|
|
2070
|
-
*
|
|
2071
|
-
* @example
|
|
2072
|
-
* ```tsx
|
|
2073
|
-
* <StatusBadge status="completed" />
|
|
2074
|
-
*
|
|
2075
|
-
* <StatusBadge
|
|
2076
|
-
* status="pending"
|
|
2077
|
-
* label="Awaiting approval"
|
|
2078
|
-
* size="small"
|
|
2079
|
-
* />
|
|
2080
|
-
*
|
|
2081
|
-
* <StatusBadge
|
|
2082
|
-
* status="failed"
|
|
2083
|
-
* showIcon={false}
|
|
2084
|
-
* liveRegion={true}
|
|
2085
|
-
* />
|
|
2086
|
-
* ```
|
|
2170
|
+
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2171
|
+
* from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
|
|
2172
|
+
* (decision 0018).
|
|
2087
2173
|
*/
|
|
2088
|
-
var
|
|
2174
|
+
var StatusLabelBase = function StatusLabelBase(_a) {
|
|
2089
2175
|
var status = _a.status,
|
|
2090
2176
|
label = _a.label,
|
|
2091
2177
|
_b = _a.size,
|
|
@@ -2097,36 +2183,74 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
2097
2183
|
dataTestId = _a["data-testid"],
|
|
2098
2184
|
ariaLabel = _a["aria-label"];
|
|
2099
2185
|
var statusConfig = getStatusConfig(status);
|
|
2100
|
-
var sizeStyles = sizeConfig[size];
|
|
2186
|
+
var sizeStyles = sizeConfig$1[size];
|
|
2101
2187
|
var displayLabel = label || statusConfig.label;
|
|
2102
|
-
|
|
2188
|
+
// A blank aria-label is no label at all, so it falls back like a missing one
|
|
2189
|
+
var accessibleLabel = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
2190
|
+
return jsxRuntime.jsxs(StyledStatusLabel, {
|
|
2103
2191
|
"$status": status,
|
|
2104
2192
|
"$size": size,
|
|
2105
2193
|
role: "status",
|
|
2106
|
-
"aria-label":
|
|
2107
|
-
"aria-live": liveRegion ? 'polite' :
|
|
2194
|
+
"aria-label": accessibleLabel || "Status: ".concat(displayLabel),
|
|
2195
|
+
"aria-live": liveRegion ? 'polite' : 'off',
|
|
2108
2196
|
"aria-atomic": liveRegion ? 'true' : undefined,
|
|
2109
2197
|
"data-testid": dataTestId,
|
|
2110
|
-
children: [
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2198
|
+
children: [jsxRuntime.jsxs(VisibleContent, {
|
|
2199
|
+
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
2200
|
+
children: [showIcon && jsxRuntime.jsx(Icon, {
|
|
2201
|
+
name: statusConfig.icon,
|
|
2202
|
+
size: sizeStyles.iconSize,
|
|
2203
|
+
iconColor: "inherit",
|
|
2204
|
+
"aria-hidden": "true"
|
|
2205
|
+
}), displayLabel, jsxRuntime.jsxs(ScreenReaderOnly, {
|
|
2206
|
+
children: [status, " status"]
|
|
2207
|
+
})]
|
|
2208
|
+
}), accessibleLabel && jsxRuntime.jsx(ScreenReaderOnly, {
|
|
2209
|
+
children: accessibleLabel
|
|
2117
2210
|
})]
|
|
2118
2211
|
});
|
|
2119
2212
|
};
|
|
2213
|
+
var templateObject_1$v, templateObject_2$p, templateObject_3$n, templateObject_4$j;
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* StatusBadge displays a transaction or task status.
|
|
2217
|
+
*
|
|
2218
|
+
* @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
|
|
2219
|
+
* shows the icon. StatusBadge is removed in 3.0 (decision 0018).
|
|
2220
|
+
*/
|
|
2221
|
+
var StatusBadge = function StatusBadge(props) {
|
|
2222
|
+
return jsxRuntime.jsx(StatusLabelBase, __assign({}, props));
|
|
2223
|
+
};
|
|
2120
2224
|
StatusBadge.displayName = 'StatusBadge';
|
|
2121
|
-
var templateObject_1$u, templateObject_2$o, templateObject_3$m;
|
|
2122
2225
|
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2226
|
+
/**
|
|
2227
|
+
* StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
|
|
2228
|
+
*
|
|
2229
|
+
* Uses only the status colour tokens and always shows an icon with its text, so status is never
|
|
2230
|
+
* conveyed by colour alone. Not interactive. Announces changes politely to screen readers.
|
|
2231
|
+
*
|
|
2232
|
+
* @example
|
|
2233
|
+
* ```tsx
|
|
2234
|
+
* <StatusLabel status="completed" />
|
|
2235
|
+
*
|
|
2236
|
+
* <StatusLabel status="pending" label="Awaiting approval" size="small" />
|
|
2237
|
+
* ```
|
|
2238
|
+
*/
|
|
2239
|
+
// showIcon comes last so no caller (for example plain JavaScript) can hide the icon
|
|
2240
|
+
var StatusLabel = function StatusLabel(props) {
|
|
2241
|
+
return jsxRuntime.jsx(StatusLabelBase, __assign({}, props, {
|
|
2242
|
+
showIcon: true
|
|
2243
|
+
}));
|
|
2244
|
+
};
|
|
2245
|
+
StatusLabel.displayName = 'StatusLabel';
|
|
2246
|
+
|
|
2247
|
+
var semantic$d = data.tokensJson.semantic;
|
|
2248
|
+
var color$5 = semantic$d.color,
|
|
2249
|
+
spacing$5 = semantic$d.spacing,
|
|
2250
|
+
border$6 = semantic$d.border,
|
|
2251
|
+
size$1 = semantic$d.size;
|
|
2128
2252
|
var label = data.tokensJson.component.badge.label;
|
|
2129
|
-
var layout$3 = spacing$
|
|
2253
|
+
var layout$3 = spacing$5.layout;
|
|
2130
2254
|
var radius = border$6.radius;
|
|
2131
2255
|
var StyledTag = styled__default.default.span.withConfig({
|
|
2132
2256
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2134,43 +2258,49 @@ var StyledTag = styled__default.default.span.withConfig({
|
|
|
2134
2258
|
},
|
|
2135
2259
|
displayName: "Tag__StyledTag",
|
|
2136
2260
|
componentId: "sc-lzfmti-0"
|
|
2137
|
-
})(templateObject_1$
|
|
2261
|
+
})(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"
|
|
2138
2262
|
/**
|
|
2139
2263
|
* Tag component for categorizing and labeling content
|
|
2140
2264
|
*
|
|
2141
2265
|
* A static, non-interactive label used to categorize elements or objects in the UI.
|
|
2142
2266
|
* Tags help users quickly identify and understand content classification.
|
|
2143
|
-
*/])), radius.sm,
|
|
2267
|
+
*/])), radius.sm, function (_a) {
|
|
2268
|
+
var $size = _a.$size;
|
|
2269
|
+
return size$1.label[$size];
|
|
2270
|
+
}, function (_a) {
|
|
2271
|
+
var $size = _a.$size;
|
|
2272
|
+
return $size === 'small' ? "0 ".concat(layout$3.sm) : "".concat(layout$3.xs, " ").concat(layout$3.sm);
|
|
2273
|
+
}, label.typography.small, label.fontWeight, function (_a) {
|
|
2144
2274
|
var $variant = _a.$variant;
|
|
2145
2275
|
switch ($variant) {
|
|
2146
2276
|
case 'interactive':
|
|
2147
|
-
return color$
|
|
2277
|
+
return color$5.background['interactive-subtle'];
|
|
2148
2278
|
case 'success':
|
|
2149
|
-
return color$
|
|
2279
|
+
return color$5.background['success-subtle'];
|
|
2150
2280
|
case 'warning':
|
|
2151
|
-
return color$
|
|
2281
|
+
return color$5.background['warning-subtle'];
|
|
2152
2282
|
case 'error':
|
|
2153
|
-
return color$
|
|
2283
|
+
return color$5.background['error-subtle'];
|
|
2154
2284
|
case 'emphasis':
|
|
2155
|
-
return color$
|
|
2285
|
+
return color$5.background.emphasis;
|
|
2156
2286
|
default:
|
|
2157
|
-
return color$
|
|
2287
|
+
return color$5.background.surface;
|
|
2158
2288
|
}
|
|
2159
2289
|
}, function (_a) {
|
|
2160
2290
|
var $variant = _a.$variant;
|
|
2161
2291
|
switch ($variant) {
|
|
2162
2292
|
case 'interactive':
|
|
2163
|
-
return color$
|
|
2293
|
+
return color$5.text.interactive;
|
|
2164
2294
|
case 'success':
|
|
2165
|
-
return color$
|
|
2295
|
+
return color$5.text.success;
|
|
2166
2296
|
case 'warning':
|
|
2167
|
-
return color$
|
|
2297
|
+
return color$5.text.warning;
|
|
2168
2298
|
case 'error':
|
|
2169
|
-
return color$
|
|
2299
|
+
return color$5.text.error;
|
|
2170
2300
|
case 'emphasis':
|
|
2171
|
-
return color$
|
|
2301
|
+
return color$5.text.inverse;
|
|
2172
2302
|
default:
|
|
2173
|
-
return color$
|
|
2303
|
+
return color$5.text["default"];
|
|
2174
2304
|
}
|
|
2175
2305
|
}, function (_a) {
|
|
2176
2306
|
var $variant = _a.$variant,
|
|
@@ -2178,17 +2308,17 @@ var StyledTag = styled__default.default.span.withConfig({
|
|
|
2178
2308
|
if (!$border) return 'none';
|
|
2179
2309
|
switch ($variant) {
|
|
2180
2310
|
case 'interactive':
|
|
2181
|
-
return "".concat(semantic$
|
|
2311
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.interactive);
|
|
2182
2312
|
case 'success':
|
|
2183
|
-
return "".concat(semantic$
|
|
2313
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.success);
|
|
2184
2314
|
case 'warning':
|
|
2185
|
-
return "".concat(semantic$
|
|
2315
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.warning);
|
|
2186
2316
|
case 'error':
|
|
2187
|
-
return "".concat(semantic$
|
|
2317
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.error);
|
|
2188
2318
|
case 'emphasis':
|
|
2189
|
-
return "".concat(semantic$
|
|
2319
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.background.emphasis);
|
|
2190
2320
|
default:
|
|
2191
|
-
return "".concat(semantic$
|
|
2321
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border["default"]);
|
|
2192
2322
|
}
|
|
2193
2323
|
});
|
|
2194
2324
|
/**
|
|
@@ -2203,11 +2333,14 @@ var Tag = function Tag(_a) {
|
|
|
2203
2333
|
variant = _b === void 0 ? 'default' : _b,
|
|
2204
2334
|
_c = _a.border,
|
|
2205
2335
|
border = _c === void 0 ? true : _c,
|
|
2336
|
+
_d = _a.size,
|
|
2337
|
+
tagSize = _d === void 0 ? 'medium' : _d,
|
|
2206
2338
|
dataTestId = _a["data-testid"],
|
|
2207
|
-
props = __rest(_a, ["children", "variant", "border", 'data-testid']);
|
|
2339
|
+
props = __rest(_a, ["children", "variant", "border", "size", 'data-testid']);
|
|
2208
2340
|
return jsxRuntime.jsx(StyledTag, __assign({
|
|
2209
2341
|
"$variant": variant,
|
|
2210
2342
|
"$border": border,
|
|
2343
|
+
"$size": tagSize,
|
|
2211
2344
|
"data-testid": dataTestId,
|
|
2212
2345
|
"data-variant": variant,
|
|
2213
2346
|
"data-border": border,
|
|
@@ -2217,24 +2350,24 @@ var Tag = function Tag(_a) {
|
|
|
2217
2350
|
children: children
|
|
2218
2351
|
}));
|
|
2219
2352
|
};
|
|
2220
|
-
var templateObject_1$
|
|
2353
|
+
var templateObject_1$u;
|
|
2221
2354
|
|
|
2222
2355
|
// Destructure tokens for cleaner access
|
|
2223
|
-
var semantic$
|
|
2224
|
-
var spacing$
|
|
2225
|
-
var layout$2 = spacing$
|
|
2356
|
+
var semantic$c = data.tokensJson.semantic;
|
|
2357
|
+
var spacing$4 = semantic$c.spacing;
|
|
2358
|
+
var layout$2 = spacing$4.layout;
|
|
2226
2359
|
var StyledBalanceSection = styled__default.default.div.withConfig({
|
|
2227
2360
|
displayName: "AccountCard__StyledBalanceSection",
|
|
2228
2361
|
componentId: "sc-1erp7zn-0"
|
|
2229
|
-
})(templateObject_1$
|
|
2362
|
+
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), layout$2.lg);
|
|
2230
2363
|
var StyledTrendSection = styled__default.default.div.withConfig({
|
|
2231
2364
|
displayName: "AccountCard__StyledTrendSection",
|
|
2232
2365
|
componentId: "sc-1erp7zn-1"
|
|
2233
|
-
})(templateObject_2$
|
|
2366
|
+
})(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);
|
|
2234
2367
|
styled__default.default.div.withConfig({
|
|
2235
2368
|
displayName: "AccountCard__StyledActions",
|
|
2236
2369
|
componentId: "sc-1erp7zn-2"
|
|
2237
|
-
})(templateObject_3$
|
|
2370
|
+
})(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);
|
|
2238
2371
|
var StyledStackWrapper = styled__default.default.div.withConfig({
|
|
2239
2372
|
displayName: "AccountCard__StyledStackWrapper",
|
|
2240
2373
|
componentId: "sc-1erp7zn-3"
|
|
@@ -2242,7 +2375,7 @@ var StyledStackWrapper = styled__default.default.div.withConfig({
|
|
|
2242
2375
|
var StyledHeaderWrapper = styled__default.default.div.withConfig({
|
|
2243
2376
|
displayName: "AccountCard__StyledHeaderWrapper",
|
|
2244
2377
|
componentId: "sc-1erp7zn-4"
|
|
2245
|
-
})(templateObject_5$
|
|
2378
|
+
})(templateObject_5$f || (templateObject_5$f = __makeTemplateObject(["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: -", ";\n }\n"], ["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: -", ";\n }\n"
|
|
2246
2379
|
// Map trend direction to icon and color
|
|
2247
2380
|
])), data.tokensJson.component.accountCard.header.minHeight, layout$2.none, layout$2.xs);
|
|
2248
2381
|
// Map trend direction to icon and color
|
|
@@ -2298,7 +2431,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2298
2431
|
bg: "subtle",
|
|
2299
2432
|
border: "default",
|
|
2300
2433
|
borderRadius: "xl",
|
|
2301
|
-
transition: "box-shadow ".concat(semantic$
|
|
2434
|
+
transition: "box-shadow ".concat(semantic$c.motion.duration.normal, " ").concat(semantic$c.motion.easing.easeOut),
|
|
2302
2435
|
cursor: isClickable ? 'pointer' : 'default',
|
|
2303
2436
|
hoverShadow: isClickable ? 'floating' : undefined,
|
|
2304
2437
|
onClick: handleClick,
|
|
@@ -2352,8 +2485,8 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2352
2485
|
}), trend && trendValue && jsxRuntime.jsx(StyledTrendSection, {
|
|
2353
2486
|
"aria-label": "Trend ".concat(trend),
|
|
2354
2487
|
role: "img",
|
|
2355
|
-
children: jsxRuntime.jsx(
|
|
2356
|
-
size: "
|
|
2488
|
+
children: jsxRuntime.jsx(CategoryLabel, {
|
|
2489
|
+
size: "medium",
|
|
2357
2490
|
icon: trendIcon,
|
|
2358
2491
|
color: trendColor,
|
|
2359
2492
|
variant: "minimal",
|
|
@@ -2393,28 +2526,28 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2393
2526
|
})
|
|
2394
2527
|
});
|
|
2395
2528
|
};
|
|
2396
|
-
var templateObject_1$
|
|
2529
|
+
var templateObject_1$t, templateObject_2$o, templateObject_3$m, templateObject_4$i, templateObject_5$f;
|
|
2397
2530
|
|
|
2398
|
-
var semantic$
|
|
2399
|
-
var _a$
|
|
2400
|
-
duration$2 = _a$
|
|
2401
|
-
easing$2 = _a$
|
|
2531
|
+
var semantic$b = data.tokensJson.semantic;
|
|
2532
|
+
var _a$5 = semantic$b.motion,
|
|
2533
|
+
duration$2 = _a$5.duration,
|
|
2534
|
+
easing$2 = _a$5.easing;
|
|
2402
2535
|
var StyledListItem = styled__default.default.li.withConfig({
|
|
2403
2536
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2404
2537
|
return !prop.startsWith('$');
|
|
2405
2538
|
},
|
|
2406
2539
|
displayName: "ListItem__StyledListItem",
|
|
2407
2540
|
componentId: "sc-1wzzt21-0"
|
|
2408
|
-
})(templateObject_1$
|
|
2541
|
+
})(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) {
|
|
2409
2542
|
var $interactive = _a.$interactive;
|
|
2410
2543
|
return $interactive && 'user-select: none;';
|
|
2411
2544
|
}, function (_a) {
|
|
2412
2545
|
var $disabled = _a.$disabled;
|
|
2413
|
-
return $disabled && "\n opacity: ".concat(semantic$
|
|
2546
|
+
return $disabled && "\n opacity: ".concat(semantic$b.opacity.disabled, ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
2414
2547
|
}, function (_a) {
|
|
2415
2548
|
var $destructive = _a.$destructive,
|
|
2416
2549
|
$disabled = _a.$disabled;
|
|
2417
|
-
return $destructive && !$disabled && "\n color: ".concat(semantic$
|
|
2550
|
+
return $destructive && !$disabled && "\n color: ".concat(semantic$b.color.text.error, ";\n ");
|
|
2418
2551
|
});
|
|
2419
2552
|
var StyledItemContent = styled__default.default.div.withConfig({
|
|
2420
2553
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2422,12 +2555,12 @@ var StyledItemContent = styled__default.default.div.withConfig({
|
|
|
2422
2555
|
},
|
|
2423
2556
|
displayName: "ListItem__StyledItemContent",
|
|
2424
2557
|
componentId: "sc-1wzzt21-1"
|
|
2425
|
-
})(templateObject_2$
|
|
2558
|
+
})(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) {
|
|
2426
2559
|
var $spacing = _a.$spacing;
|
|
2427
|
-
return $spacing === 'compact' ? "".concat(semantic$
|
|
2428
|
-
}, semantic$
|
|
2560
|
+
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);
|
|
2561
|
+
}, semantic$b.border.radius.sm, function (_a) {
|
|
2429
2562
|
var $selected = _a.$selected;
|
|
2430
|
-
return $selected ? semantic$
|
|
2563
|
+
return $selected ? semantic$b.color.background['interactive-subtle'] : 'transparent';
|
|
2431
2564
|
}, duration$2.fast, easing$2.easeOut, function (_a) {
|
|
2432
2565
|
var $interactive = _a.$interactive,
|
|
2433
2566
|
$disabled = _a.$disabled;
|
|
@@ -2439,26 +2572,26 @@ var StyledItemContent = styled__default.default.div.withConfig({
|
|
|
2439
2572
|
$disabled = _a.$disabled,
|
|
2440
2573
|
$selected = _a.$selected;
|
|
2441
2574
|
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 ");
|
|
2442
|
-
}, semantic$
|
|
2575
|
+
}, semantic$b.border.width.thick, semantic$b.color.border.interactive, semantic$b.border.focusOffset);
|
|
2443
2576
|
var StyledIconContainer$1 = styled__default.default.div.withConfig({
|
|
2444
2577
|
displayName: "ListItem__StyledIconContainer",
|
|
2445
2578
|
componentId: "sc-1wzzt21-2"
|
|
2446
|
-
})(templateObject_3$
|
|
2579
|
+
})(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);
|
|
2447
2580
|
var StyledTextContent = styled__default.default.div.withConfig({
|
|
2448
2581
|
displayName: "ListItem__StyledTextContent",
|
|
2449
2582
|
componentId: "sc-1wzzt21-3"
|
|
2450
|
-
})(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$
|
|
2583
|
+
})(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);
|
|
2451
2584
|
var StyledRightContent = styled__default.default.div.withConfig({
|
|
2452
2585
|
displayName: "ListItem__StyledRightContent",
|
|
2453
2586
|
componentId: "sc-1wzzt21-4"
|
|
2454
|
-
})(templateObject_5$
|
|
2587
|
+
})(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);
|
|
2455
2588
|
var StyledChevronIcon = styled__default.default.div.withConfig({
|
|
2456
2589
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2457
2590
|
return !prop.startsWith('$');
|
|
2458
2591
|
},
|
|
2459
2592
|
displayName: "ListItem__StyledChevronIcon",
|
|
2460
2593
|
componentId: "sc-1wzzt21-5"
|
|
2461
|
-
})(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$
|
|
2594
|
+
})(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) {
|
|
2462
2595
|
var $expanded = _a.$expanded;
|
|
2463
2596
|
return $expanded ? '180deg' : '0deg';
|
|
2464
2597
|
}, reducedMotion);
|
|
@@ -2480,7 +2613,7 @@ var StyledExpandedContent = styled__default.default.div.withConfig({
|
|
|
2480
2613
|
}, reducedMotion, duration$2.normal, easing$2.easeOut, duration$2.normal, easing$2.easeOut, function (_a) {
|
|
2481
2614
|
var $expanded = _a.$expanded,
|
|
2482
2615
|
$spacing = _a.$spacing;
|
|
2483
|
-
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$
|
|
2616
|
+
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 ");
|
|
2484
2617
|
});
|
|
2485
2618
|
var ListItem = function ListItem(_a) {
|
|
2486
2619
|
var primary = _a.primary,
|
|
@@ -2593,7 +2726,7 @@ var ListItem = function ListItem(_a) {
|
|
|
2593
2726
|
}));
|
|
2594
2727
|
};
|
|
2595
2728
|
ListItem.displayName = 'ListItem';
|
|
2596
|
-
var templateObject_1$
|
|
2729
|
+
var templateObject_1$s, templateObject_2$n, templateObject_3$l, templateObject_4$h, templateObject_5$e, templateObject_6$b, templateObject_7$9;
|
|
2597
2730
|
|
|
2598
2731
|
// How long an exiting element stays mounted: the duration of `exitAnimation` in styleUtils.
|
|
2599
2732
|
var EXIT_DURATION_MS = parseInt(data.tokensJson.semantic.motion.duration.fast, 10);
|
|
@@ -2638,25 +2771,25 @@ function useInert(ref, isInert) {
|
|
|
2638
2771
|
}, [ref, isInert]);
|
|
2639
2772
|
}
|
|
2640
2773
|
|
|
2641
|
-
var _a$
|
|
2642
|
-
color$
|
|
2643
|
-
border$5 = _a$
|
|
2644
|
-
layout$1 = _a$
|
|
2645
|
-
motion$3 = _a$
|
|
2646
|
-
elevation$2 = _a$
|
|
2647
|
-
var slideUp = styled.keyframes(templateObject_1$
|
|
2648
|
-
var fadeIn$2 = styled.keyframes(templateObject_2$
|
|
2774
|
+
var _a$4 = data.tokensJson.semantic,
|
|
2775
|
+
color$4 = _a$4.color,
|
|
2776
|
+
border$5 = _a$4.border,
|
|
2777
|
+
layout$1 = _a$4.spacing.layout,
|
|
2778
|
+
motion$3 = _a$4.motion,
|
|
2779
|
+
elevation$2 = _a$4.elevation;
|
|
2780
|
+
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"])));
|
|
2781
|
+
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"])));
|
|
2649
2782
|
var StyledOverlay$2 = styled__default.default.div.withConfig({
|
|
2650
2783
|
displayName: "ActionSheet__StyledOverlay",
|
|
2651
2784
|
componentId: "sc-regbol-0"
|
|
2652
|
-
})(templateObject_3$
|
|
2785
|
+
})(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) {
|
|
2653
2786
|
var $isExiting = _a.$isExiting;
|
|
2654
2787
|
return $isExiting && exitAnimation;
|
|
2655
2788
|
});
|
|
2656
2789
|
var StyledActionSheet = styled__default.default.div.withConfig({
|
|
2657
2790
|
displayName: "ActionSheet__StyledActionSheet",
|
|
2658
2791
|
componentId: "sc-regbol-1"
|
|
2659
|
-
})(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$
|
|
2792
|
+
})(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) {
|
|
2660
2793
|
var $isExiting = _a.$isExiting;
|
|
2661
2794
|
return $isExiting && exitAnimation;
|
|
2662
2795
|
}, reducedMotion, fadeIn$2, motion$3.duration.slow, motion$3.easing.easeOut, function (_a) {
|
|
@@ -2666,7 +2799,7 @@ var StyledActionSheet = styled__default.default.div.withConfig({
|
|
|
2666
2799
|
var StyledHeader$2 = styled__default.default.div.withConfig({
|
|
2667
2800
|
displayName: "ActionSheet__StyledHeader",
|
|
2668
2801
|
componentId: "sc-regbol-2"
|
|
2669
|
-
})(templateObject_5$
|
|
2802
|
+
})(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"])), layout$1.lg, layout$1.lg, layout$1.md, border$5["default"]);
|
|
2670
2803
|
var StyledHeaderContent = styled__default.default.div.withConfig({
|
|
2671
2804
|
displayName: "ActionSheet__StyledHeaderContent",
|
|
2672
2805
|
componentId: "sc-regbol-3"
|
|
@@ -2674,7 +2807,7 @@ var StyledHeaderContent = styled__default.default.div.withConfig({
|
|
|
2674
2807
|
var StyledCloseButton = styled__default.default.button.withConfig({
|
|
2675
2808
|
displayName: "ActionSheet__StyledCloseButton",
|
|
2676
2809
|
componentId: "sc-regbol-4"
|
|
2677
|
-
})(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$
|
|
2810
|
+
})(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);
|
|
2678
2811
|
var StyledActionsList = styled__default.default.ul.withConfig({
|
|
2679
2812
|
displayName: "ActionSheet__StyledActionsList",
|
|
2680
2813
|
componentId: "sc-regbol-5"
|
|
@@ -2901,7 +3034,7 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2901
3034
|
})]
|
|
2902
3035
|
}), document.body);
|
|
2903
3036
|
};
|
|
2904
|
-
var templateObject_1$
|
|
3037
|
+
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;
|
|
2905
3038
|
|
|
2906
3039
|
function detectSpeechRecognitionConstructor(targetWindow) {
|
|
2907
3040
|
if (!targetWindow) return null;
|
|
@@ -3001,36 +3134,36 @@ function agentInputStateTransition(currentState, event) {
|
|
|
3001
3134
|
}
|
|
3002
3135
|
}
|
|
3003
3136
|
|
|
3004
|
-
var semantic$
|
|
3137
|
+
var semantic$a = data.tokensJson.semantic,
|
|
3005
3138
|
component$1 = data.tokensJson.component;
|
|
3006
3139
|
var DEFAULT_IDLE_HELPER = 'Ask about transactions, spending, or transfers';
|
|
3007
3140
|
var DEFAULT_LISTENING_MESSAGE = 'Listening… speak now';
|
|
3008
3141
|
var DEFAULT_PROCESSING_MESSAGE = 'Finishing voice input…';
|
|
3009
|
-
var rotateRing = styled.keyframes(templateObject_1$
|
|
3142
|
+
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"])));
|
|
3010
3143
|
var Container = styled__default.default.div.withConfig({
|
|
3011
3144
|
displayName: "AgentInput__Container",
|
|
3012
3145
|
componentId: "sc-fhl996-0"
|
|
3013
|
-
})(templateObject_2$
|
|
3146
|
+
})(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);
|
|
3014
3147
|
var ControlsRow = styled__default.default.div.withConfig({
|
|
3015
3148
|
displayName: "AgentInput__ControlsRow",
|
|
3016
3149
|
componentId: "sc-fhl996-1"
|
|
3017
|
-
})(templateObject_3$
|
|
3150
|
+
})(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
3018
3151
|
var InputShell = styled__default.default.div.withConfig({
|
|
3019
3152
|
displayName: "AgentInput__InputShell",
|
|
3020
3153
|
componentId: "sc-fhl996-2"
|
|
3021
|
-
})(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$
|
|
3154
|
+
})(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);
|
|
3022
3155
|
var Input = styled__default.default.input.withConfig({
|
|
3023
3156
|
displayName: "AgentInput__Input",
|
|
3024
3157
|
componentId: "sc-fhl996-3"
|
|
3025
|
-
})(templateObject_5$
|
|
3158
|
+
})(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);
|
|
3026
3159
|
var InputActions = styled__default.default.div.withConfig({
|
|
3027
3160
|
displayName: "AgentInput__InputActions",
|
|
3028
3161
|
componentId: "sc-fhl996-4"
|
|
3029
|
-
})(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$
|
|
3162
|
+
})(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);
|
|
3030
3163
|
var CircularActionIconButton = styled__default.default(IconButton).withConfig({
|
|
3031
3164
|
displayName: "AgentInput__CircularActionIconButton",
|
|
3032
3165
|
componentId: "sc-fhl996-5"
|
|
3033
|
-
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$
|
|
3166
|
+
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$a.border.radius.circle);
|
|
3034
3167
|
var InputWrapper = styled__default.default.div.withConfig({
|
|
3035
3168
|
displayName: "AgentInput__InputWrapper",
|
|
3036
3169
|
componentId: "sc-fhl996-6"
|
|
@@ -3041,50 +3174,56 @@ var MicButtonWrapper = styled__default.default.div.withConfig({
|
|
|
3041
3174
|
},
|
|
3042
3175
|
displayName: "AgentInput__MicButtonWrapper",
|
|
3043
3176
|
componentId: "sc-fhl996-7"
|
|
3044
|
-
})(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"
|
|
3177
|
+
})(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"
|
|
3178
|
+
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3179
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
3180
|
+
])), semantic$a.border.radius.circle);
|
|
3181
|
+
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3182
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
3183
|
+
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)))"])));
|
|
3045
3184
|
var MicListeningRing = styled__default.default.span.withConfig({
|
|
3046
3185
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3047
3186
|
return !prop.startsWith('$');
|
|
3048
3187
|
},
|
|
3049
3188
|
displayName: "AgentInput__MicListeningRing",
|
|
3050
3189
|
componentId: "sc-fhl996-8"
|
|
3051
|
-
})(
|
|
3190
|
+
})(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) {
|
|
3052
3191
|
var $reducedMotion = _a.$reducedMotion;
|
|
3053
|
-
return !$reducedMotion && styled.css(
|
|
3192
|
+
return !$reducedMotion && styled.css(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["\n animation: ", " 1300ms linear infinite;\n "], ["\n animation: ", " 1300ms linear infinite;\n "])), rotateRing);
|
|
3054
3193
|
});
|
|
3055
3194
|
var StatusRow = styled__default.default.div.withConfig({
|
|
3056
3195
|
displayName: "AgentInput__StatusRow",
|
|
3057
3196
|
componentId: "sc-fhl996-9"
|
|
3058
|
-
})(
|
|
3197
|
+
})(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']);
|
|
3059
3198
|
var StatusText = styled__default.default.div.withConfig({
|
|
3060
3199
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3061
3200
|
return !prop.startsWith('$');
|
|
3062
3201
|
},
|
|
3063
3202
|
displayName: "AgentInput__StatusText",
|
|
3064
3203
|
componentId: "sc-fhl996-10"
|
|
3065
|
-
})(
|
|
3204
|
+
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$a.spacing.layout.xl);
|
|
3066
3205
|
var StatusAnnouncement = styled__default.default.div.withConfig({
|
|
3067
3206
|
displayName: "AgentInput__StatusAnnouncement",
|
|
3068
3207
|
componentId: "sc-fhl996-11"
|
|
3069
|
-
})(
|
|
3208
|
+
})(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject([""], [""])));
|
|
3070
3209
|
var MeterContainer = styled__default.default.div.withConfig({
|
|
3071
3210
|
displayName: "AgentInput__MeterContainer",
|
|
3072
3211
|
componentId: "sc-fhl996-12"
|
|
3073
|
-
})(
|
|
3212
|
+
})(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);
|
|
3074
3213
|
var MeterBar = styled__default.default.div.withConfig({
|
|
3075
3214
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3076
3215
|
return !prop.startsWith('$');
|
|
3077
3216
|
},
|
|
3078
3217
|
displayName: "AgentInput__MeterBar",
|
|
3079
3218
|
componentId: "sc-fhl996-13"
|
|
3080
|
-
})(
|
|
3219
|
+
})(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) {
|
|
3081
3220
|
var $height = _a.$height;
|
|
3082
3221
|
return "".concat($height * 100, "%");
|
|
3083
|
-
}, semantic$
|
|
3222
|
+
}, semantic$a.motion.duration.fast, semantic$a.motion.easing.easeOut);
|
|
3084
3223
|
var VisuallyHiddenLabel = styled__default.default.label.withConfig({
|
|
3085
3224
|
displayName: "AgentInput__VisuallyHiddenLabel",
|
|
3086
3225
|
componentId: "sc-fhl996-14"
|
|
3087
|
-
})(
|
|
3226
|
+
})(templateObject_18$1 || (templateObject_18$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
3088
3227
|
function getInitialState(hasText) {
|
|
3089
3228
|
return hasText ? 'typing' : 'idle';
|
|
3090
3229
|
}
|
|
@@ -3713,21 +3852,21 @@ var AgentInput = function AgentInput(_a) {
|
|
|
3713
3852
|
})]
|
|
3714
3853
|
});
|
|
3715
3854
|
};
|
|
3716
|
-
var templateObject_1$
|
|
3855
|
+
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;
|
|
3717
3856
|
|
|
3718
|
-
var semantic$
|
|
3857
|
+
var semantic$9 = data.tokensJson.semantic;
|
|
3719
3858
|
var alert = data.tokensJson.component.alert;
|
|
3720
|
-
var _a$
|
|
3721
|
-
duration$1 = _a$
|
|
3722
|
-
easing$1 = _a$
|
|
3859
|
+
var _a$3 = semantic$9.motion,
|
|
3860
|
+
duration$1 = _a$3.duration,
|
|
3861
|
+
easing$1 = _a$3.easing;
|
|
3723
3862
|
// Dismissing fades the alert out, then collapses the space it took (Ollie's call, #35).
|
|
3724
3863
|
// Each half takes duration.fast, so the whole exit stays within the 300ms maximum (P6).
|
|
3725
3864
|
var FADE_MS = parseInt(duration$1.fast, 10);
|
|
3726
3865
|
var EXIT_MS = FADE_MS * 2;
|
|
3727
3866
|
// The --alert-exit-* properties are the alert's height and vertical padding, measured
|
|
3728
3867
|
// when it's dismissed, so nothing moves until the fade has finished
|
|
3729
|
-
var fadeThenCollapse = styled.keyframes(templateObject_1$
|
|
3730
|
-
var fadeOut = styled.keyframes(templateObject_2$
|
|
3868
|
+
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);
|
|
3869
|
+
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"
|
|
3731
3870
|
// The exit ends on the alert's own animationend: 300ms, or 150ms under reduced motion
|
|
3732
3871
|
// (chosen when dismissed). A timer of the same length removes it if no animation event
|
|
3733
3872
|
// arrives, for example where animations are disabled or the tab is hidden.
|
|
@@ -3739,7 +3878,7 @@ var fadeOut = styled.keyframes(templateObject_2$j || (templateObject_2$j = __mak
|
|
|
3739
3878
|
// The generated names of the two exits (full, and reduced motion)
|
|
3740
3879
|
var EXIT_ANIMATION_NAMES = [fadeThenCollapse.getName(), fadeOut.getName()];
|
|
3741
3880
|
// Default icons by variant
|
|
3742
|
-
var variantIcons = {
|
|
3881
|
+
var variantIcons$1 = {
|
|
3743
3882
|
error: 'crossCircle',
|
|
3744
3883
|
warning: 'bell',
|
|
3745
3884
|
info: 'info',
|
|
@@ -3765,35 +3904,32 @@ var StyledAlert = styled__default.default.div.withConfig({
|
|
|
3765
3904
|
},
|
|
3766
3905
|
displayName: "Alert__StyledAlert",
|
|
3767
3906
|
componentId: "sc-18tq5d-0"
|
|
3768
|
-
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: flex;\n align-items:
|
|
3907
|
+
})(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) {
|
|
3769
3908
|
var $inline = _a.$inline;
|
|
3770
|
-
return $inline ?
|
|
3909
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3771
3910
|
}, function (_a) {
|
|
3772
3911
|
var $inline = _a.$inline;
|
|
3773
|
-
return $inline ? semantic$
|
|
3912
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3913
|
+
}, semantic$9.border.radius.sm, semantic$9.border.width.thin, function (_a) {
|
|
3914
|
+
var _b = _a.$variant,
|
|
3915
|
+
$variant = _b === void 0 ? 'info' : _b;
|
|
3916
|
+
return alert.severity[$variant].background;
|
|
3774
3917
|
}, function (_a) {
|
|
3918
|
+
var _b = _a.$variant,
|
|
3919
|
+
$variant = _b === void 0 ? 'info' : _b;
|
|
3920
|
+
return alert.severity[$variant].text;
|
|
3921
|
+
}, function (_a) {
|
|
3922
|
+
var _b = _a.$variant,
|
|
3923
|
+
$variant = _b === void 0 ? 'info' : _b,
|
|
3924
|
+
$appearance = _a.$appearance;
|
|
3925
|
+
return alert.appearance[$appearance].borderColor[$variant];
|
|
3926
|
+
}, semantic$9.breakpoint.md, function (_a) {
|
|
3775
3927
|
var $inline = _a.$inline;
|
|
3776
|
-
return $inline ? semantic$
|
|
3777
|
-
}, semantic$7.border.radius.sm, semantic$7.border.width.thin, function (_a) {
|
|
3778
|
-
var $variant = _a.$variant;
|
|
3779
|
-
switch ($variant) {
|
|
3780
|
-
case 'error':
|
|
3781
|
-
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 ");
|
|
3782
|
-
case 'warning':
|
|
3783
|
-
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 ");
|
|
3784
|
-
case 'success':
|
|
3785
|
-
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 ");
|
|
3786
|
-
case 'info':
|
|
3787
|
-
default:
|
|
3788
|
-
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 ");
|
|
3789
|
-
}
|
|
3790
|
-
}, semantic$7.breakpoint.md, function (_a) {
|
|
3791
|
-
var $inline = _a.$inline;
|
|
3792
|
-
return $inline ? semantic$7.spacing.layout.sm : semantic$7.spacing.layout.lg;
|
|
3928
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.lg;
|
|
3793
3929
|
}, function (_a) {
|
|
3794
3930
|
var $isExiting = _a.$isExiting,
|
|
3795
3931
|
$reducedExit = _a.$reducedExit;
|
|
3796
|
-
return $isExiting && styled.css(templateObject_5$
|
|
3932
|
+
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));
|
|
3797
3933
|
});
|
|
3798
3934
|
var StyledIconContainer = styled__default.default.div.withConfig({
|
|
3799
3935
|
displayName: "Alert__StyledIconContainer",
|
|
@@ -3802,47 +3938,81 @@ var StyledIconContainer = styled__default.default.div.withConfig({
|
|
|
3802
3938
|
var StyledContent$1 = styled__default.default.div.withConfig({
|
|
3803
3939
|
displayName: "Alert__StyledContent",
|
|
3804
3940
|
componentId: "sc-18tq5d-2"
|
|
3805
|
-
})(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$
|
|
3941
|
+
})(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);
|
|
3806
3942
|
var StyledTitle = styled__default.default.span.withConfig({
|
|
3807
3943
|
displayName: "Alert__StyledTitle",
|
|
3808
3944
|
componentId: "sc-18tq5d-3"
|
|
3809
3945
|
})(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);
|
|
3810
|
-
var StyledMessage = styled__default.default.span.withConfig({
|
|
3946
|
+
var StyledMessage$1 = styled__default.default.span.withConfig({
|
|
3811
3947
|
displayName: "Alert__StyledMessage",
|
|
3812
3948
|
componentId: "sc-18tq5d-4"
|
|
3813
|
-
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"
|
|
3949
|
+
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"
|
|
3950
|
+
// The action follows the content, left-aligned with it, so it's read after the message
|
|
3951
|
+
// (#122). With the content's xs gap, the space above it is md: a separate step.
|
|
3952
|
+
])), alert.message.typography, alert.message.lineHeight);
|
|
3953
|
+
// The action follows the content, left-aligned with it, so it's read after the message
|
|
3954
|
+
// (#122). With the content's xs gap, the space above it is md: a separate step.
|
|
3814
3955
|
var StyledActions = styled__default.default.div.withConfig({
|
|
3815
3956
|
displayName: "Alert__StyledActions",
|
|
3816
3957
|
componentId: "sc-18tq5d-5"
|
|
3817
|
-
})(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n
|
|
3958
|
+
})(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"
|
|
3959
|
+
// The dismiss button's centre lines up with the first line of content: the title, or the
|
|
3960
|
+
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
3961
|
+
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
3962
|
+
// padding and line height. Being in the row, it also keeps text and actions from running under it.
|
|
3963
|
+
])), semantic$9.spacing.layout.sm, semantic$9.spacing.layout.md, semantic$9.spacing.layout.xs);
|
|
3964
|
+
// The dismiss button's centre lines up with the first line of content: the title, or the
|
|
3965
|
+
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
3966
|
+
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
3967
|
+
// padding and line height. Being in the row, it also keeps text and actions from running under it.
|
|
3968
|
+
var StyledDismissSlot = styled__default.default.div.withConfig({
|
|
3969
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3970
|
+
return !prop.startsWith('$');
|
|
3971
|
+
},
|
|
3972
|
+
displayName: "Alert__StyledDismissSlot",
|
|
3973
|
+
componentId: "sc-18tq5d-6"
|
|
3974
|
+
})(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"
|
|
3975
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left. The inline
|
|
3976
|
+
// alert's padding is too small for that, so its button stays inside the padding.
|
|
3977
|
+
])), function (_a) {
|
|
3978
|
+
var $lineHeight = _a.$lineHeight;
|
|
3979
|
+
return $lineHeight;
|
|
3980
|
+
});
|
|
3981
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left. The inline
|
|
3982
|
+
// alert's padding is too small for that, so its button stays inside the padding.
|
|
3818
3983
|
var StyledDismissButton = styled__default.default(IconButton).withConfig({
|
|
3819
3984
|
displayName: "Alert__StyledDismissButton",
|
|
3820
|
-
componentId: "sc-18tq5d-
|
|
3821
|
-
})(
|
|
3985
|
+
componentId: "sc-18tq5d-7"
|
|
3986
|
+
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
|
3987
|
+
var $inline = _a.$inline;
|
|
3988
|
+
return $inline ? 0 : "calc((".concat(data.tokensJson.component.iconButton.sizes.small.minWidth, " - ").concat(semantic$9.size.icon.sm, ") / -2)");
|
|
3989
|
+
});
|
|
3822
3990
|
var Alert = function Alert(_a) {
|
|
3823
3991
|
var _b = _a.variant,
|
|
3824
3992
|
variant = _b === void 0 ? 'info' : _b,
|
|
3993
|
+
_c = _a.appearance,
|
|
3994
|
+
appearance = _c === void 0 ? 'outlined' : _c,
|
|
3825
3995
|
children = _a.children,
|
|
3826
3996
|
title = _a.title,
|
|
3827
|
-
|
|
3828
|
-
dismissible =
|
|
3997
|
+
_d = _a.dismissible,
|
|
3998
|
+
dismissible = _d === void 0 ? false : _d,
|
|
3829
3999
|
onDismiss = _a.onDismiss,
|
|
3830
4000
|
action = _a.action,
|
|
3831
|
-
|
|
3832
|
-
inline =
|
|
3833
|
-
|
|
3834
|
-
ariaLive =
|
|
4001
|
+
_e = _a.inline,
|
|
4002
|
+
inline = _e === void 0 ? false : _e,
|
|
4003
|
+
_f = _a.ariaLive,
|
|
4004
|
+
ariaLive = _f === void 0 ? 'polite' : _f,
|
|
3835
4005
|
dataTestId = _a["data-testid"],
|
|
3836
|
-
props = __rest(_a, ["variant", "children", "title", "dismissible", "onDismiss", "action", "inline", "ariaLive", 'data-testid']);
|
|
3837
|
-
var
|
|
3838
|
-
phase =
|
|
3839
|
-
setPhase =
|
|
3840
|
-
var
|
|
3841
|
-
reducedExit =
|
|
3842
|
-
setReducedExit =
|
|
3843
|
-
var
|
|
3844
|
-
exitStyle =
|
|
3845
|
-
setExitStyle =
|
|
4006
|
+
props = __rest(_a, ["variant", "appearance", "children", "title", "dismissible", "onDismiss", "action", "inline", "ariaLive", 'data-testid']);
|
|
4007
|
+
var _g = React__default.default.useState('visible'),
|
|
4008
|
+
phase = _g[0],
|
|
4009
|
+
setPhase = _g[1];
|
|
4010
|
+
var _h = React__default.default.useState(false),
|
|
4011
|
+
reducedExit = _h[0],
|
|
4012
|
+
setReducedExit = _h[1];
|
|
4013
|
+
var _j = React__default.default.useState(),
|
|
4014
|
+
exitStyle = _j[0],
|
|
4015
|
+
setExitStyle = _j[1];
|
|
3846
4016
|
var alertRef = React__default.default.useRef(null);
|
|
3847
4017
|
// While it exits, its controls leave the tab order and can't be activated
|
|
3848
4018
|
useInert(alertRef, phase === 'exiting');
|
|
@@ -3899,7 +4069,7 @@ var Alert = function Alert(_a) {
|
|
|
3899
4069
|
}
|
|
3900
4070
|
};
|
|
3901
4071
|
// Get the icon for the current variant
|
|
3902
|
-
var iconName = variantIcons[variant];
|
|
4072
|
+
var iconName = variantIcons$1[variant];
|
|
3903
4073
|
var alertIconColor = variantIconColors[variant];
|
|
3904
4074
|
var alertTitleColor = variantTitleColors[variant];
|
|
3905
4075
|
// Determine ARIA role based on variant and aria-live
|
|
@@ -3908,6 +4078,7 @@ var Alert = function Alert(_a) {
|
|
|
3908
4078
|
role: role,
|
|
3909
4079
|
"aria-live": ariaLive,
|
|
3910
4080
|
"$variant": variant,
|
|
4081
|
+
"$appearance": appearance,
|
|
3911
4082
|
"$inline": inline,
|
|
3912
4083
|
"$isExiting": isExiting,
|
|
3913
4084
|
"$reducedExit": reducedExit,
|
|
@@ -3930,29 +4101,163 @@ var Alert = function Alert(_a) {
|
|
|
3930
4101
|
"aria-level": 6,
|
|
3931
4102
|
color: alertTitleColor,
|
|
3932
4103
|
children: title
|
|
3933
|
-
}), jsxRuntime.jsx(StyledMessage, {
|
|
4104
|
+
}), jsxRuntime.jsx(StyledMessage$1, {
|
|
3934
4105
|
children: children
|
|
4106
|
+
}), action && jsxRuntime.jsx(StyledActions, {
|
|
4107
|
+
children: action
|
|
3935
4108
|
})]
|
|
3936
|
-
}),
|
|
3937
|
-
|
|
4109
|
+
}), dismissible && jsxRuntime.jsx(StyledDismissSlot, {
|
|
4110
|
+
"$lineHeight": title ? alert.title.lineHeight : alert.message.lineHeight,
|
|
4111
|
+
children: jsxRuntime.jsx(StyledDismissButton, {
|
|
3938
4112
|
iconName: "close",
|
|
3939
4113
|
size: "small",
|
|
3940
4114
|
variant: "naked",
|
|
4115
|
+
"$inline": inline,
|
|
3941
4116
|
onClick: handleDismiss,
|
|
3942
4117
|
"aria-label": "Dismiss alert",
|
|
3943
4118
|
"data-testid": dataTestId ? "".concat(dataTestId, "-dismiss") : undefined
|
|
3944
|
-
})
|
|
4119
|
+
})
|
|
3945
4120
|
})]
|
|
3946
4121
|
}));
|
|
3947
4122
|
};
|
|
3948
4123
|
Alert.displayName = 'Alert';
|
|
3949
|
-
var templateObject_1$
|
|
4124
|
+
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;
|
|
4125
|
+
|
|
4126
|
+
var semantic$8 = data.tokensJson.semantic;
|
|
4127
|
+
var color$3 = semantic$8.color,
|
|
4128
|
+
typography = semantic$8.typography,
|
|
4129
|
+
spacing$3 = semantic$8.spacing,
|
|
4130
|
+
size = semantic$8.size;
|
|
4131
|
+
var variantIcons = {
|
|
4132
|
+
error: 'crossCircle',
|
|
4133
|
+
warning: 'bell',
|
|
4134
|
+
info: 'info',
|
|
4135
|
+
success: 'checkRing'
|
|
4136
|
+
};
|
|
4137
|
+
var variantTextColors = {
|
|
4138
|
+
error: color$3.text.error,
|
|
4139
|
+
warning: color$3.text.warning,
|
|
4140
|
+
info: color$3.text.interactive,
|
|
4141
|
+
success: color$3.text.success
|
|
4142
|
+
};
|
|
4143
|
+
var sizeConfig = {
|
|
4144
|
+
small: {
|
|
4145
|
+
font: typography.caption,
|
|
4146
|
+
gap: spacing$3.layout.xs,
|
|
4147
|
+
icon: 'xs'
|
|
4148
|
+
},
|
|
4149
|
+
medium: {
|
|
4150
|
+
font: typography.small,
|
|
4151
|
+
gap: spacing$3.layout.sm,
|
|
4152
|
+
icon: 'sm'
|
|
4153
|
+
}
|
|
4154
|
+
};
|
|
4155
|
+
var StyledInlineAlert = styled__default.default.div.withConfig({
|
|
4156
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4157
|
+
return !prop.startsWith('$');
|
|
4158
|
+
},
|
|
4159
|
+
displayName: "InlineAlert__StyledInlineAlert",
|
|
4160
|
+
componentId: "sc-eervmb-0"
|
|
4161
|
+
})(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"
|
|
4162
|
+
// One line of the message's font tall, so the icon centres on the first line at any size:
|
|
4163
|
+
// the zero-width space gives the box the font's line height without a fixed value
|
|
4164
|
+
])), function (_a) {
|
|
4165
|
+
var $size = _a.$size,
|
|
4166
|
+
$empty = _a.$empty;
|
|
4167
|
+
return $empty ? '0' : size.label[$size];
|
|
4168
|
+
}, function (_a) {
|
|
4169
|
+
var $size = _a.$size;
|
|
4170
|
+
return sizeConfig[$size].gap;
|
|
4171
|
+
}, function (_a) {
|
|
4172
|
+
var $size = _a.$size;
|
|
4173
|
+
return sizeConfig[$size].font;
|
|
4174
|
+
}, function (_a) {
|
|
4175
|
+
var $variant = _a.$variant;
|
|
4176
|
+
return variantTextColors[$variant];
|
|
4177
|
+
});
|
|
4178
|
+
// One line of the message's font tall, so the icon centres on the first line at any size:
|
|
4179
|
+
// the zero-width space gives the box the font's line height without a fixed value
|
|
4180
|
+
var StyledIconLine = styled__default.default.span.withConfig({
|
|
4181
|
+
displayName: "InlineAlert__StyledIconLine",
|
|
4182
|
+
componentId: "sc-eervmb-1"
|
|
4183
|
+
})(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"])));
|
|
4184
|
+
var StyledMessage = styled__default.default.span.withConfig({
|
|
4185
|
+
displayName: "InlineAlert__StyledMessage",
|
|
4186
|
+
componentId: "sc-eervmb-2"
|
|
4187
|
+
})(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n min-width: 0;\n"], ["\n min-width: 0;\n"
|
|
4188
|
+
/**
|
|
4189
|
+
* InlineAlert is a short, local message that sits next to what it's about: between paragraphs,
|
|
4190
|
+
* below a field or in a table cell (decision 0019). A severity icon and text in the severity
|
|
4191
|
+
* colour, with no background or border. For a title, an action or a dismiss button, use Alert.
|
|
4192
|
+
*
|
|
4193
|
+
* @example
|
|
4194
|
+
* ```tsx
|
|
4195
|
+
* <InlineAlert variant="success">Saved</InlineAlert>
|
|
4196
|
+
*
|
|
4197
|
+
* // Field feedback: the control references the message with aria-describedby
|
|
4198
|
+
* <input id="email" aria-describedby="email-error" aria-invalid="true" />
|
|
4199
|
+
* <InlineAlert id="email-error" variant="error" size="small">Enter a valid email address</InlineAlert>
|
|
4200
|
+
* ```
|
|
4201
|
+
*/])));
|
|
4202
|
+
/**
|
|
4203
|
+
* InlineAlert is a short, local message that sits next to what it's about: between paragraphs,
|
|
4204
|
+
* below a field or in a table cell (decision 0019). A severity icon and text in the severity
|
|
4205
|
+
* colour, with no background or border. For a title, an action or a dismiss button, use Alert.
|
|
4206
|
+
*
|
|
4207
|
+
* @example
|
|
4208
|
+
* ```tsx
|
|
4209
|
+
* <InlineAlert variant="success">Saved</InlineAlert>
|
|
4210
|
+
*
|
|
4211
|
+
* // Field feedback: the control references the message with aria-describedby
|
|
4212
|
+
* <input id="email" aria-describedby="email-error" aria-invalid="true" />
|
|
4213
|
+
* <InlineAlert id="email-error" variant="error" size="small">Enter a valid email address</InlineAlert>
|
|
4214
|
+
* ```
|
|
4215
|
+
*/
|
|
4216
|
+
var InlineAlert = function InlineAlert(_a) {
|
|
4217
|
+
var _b = _a.variant,
|
|
4218
|
+
variant = _b === void 0 ? 'info' : _b,
|
|
4219
|
+
_c = _a.size,
|
|
4220
|
+
alertSize = _c === void 0 ? 'medium' : _c,
|
|
4221
|
+
children = _a.children,
|
|
4222
|
+
_d = _a.ariaLive,
|
|
4223
|
+
ariaLive = _d === void 0 ? 'polite' : _d,
|
|
4224
|
+
id = _a.id,
|
|
4225
|
+
dataTestId = _a["data-testid"];
|
|
4226
|
+
// A live region is announced reliably only when it exists before its content changes, so with
|
|
4227
|
+
// no message it stays mounted as an empty region, with no icon and no minimum height
|
|
4228
|
+
var hasMessage = children !== undefined && children !== null && children !== false && children !== '';
|
|
4229
|
+
return jsxRuntime.jsx(StyledInlineAlert
|
|
4230
|
+
// Same roles as Alert; ariaLive sets how urgently changes are announced
|
|
4231
|
+
, {
|
|
4232
|
+
// Same roles as Alert; ariaLive sets how urgently changes are announced
|
|
4233
|
+
role: variant === 'error' ? 'alert' : 'status',
|
|
4234
|
+
"aria-live": ariaLive,
|
|
4235
|
+
id: id,
|
|
4236
|
+
"data-testid": dataTestId,
|
|
4237
|
+
"$variant": variant,
|
|
4238
|
+
"$size": alertSize,
|
|
4239
|
+
"$empty": !hasMessage,
|
|
4240
|
+
children: hasMessage && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4241
|
+
children: [jsxRuntime.jsx(StyledIconLine, {
|
|
4242
|
+
"aria-hidden": "true",
|
|
4243
|
+
children: jsxRuntime.jsx(Icon, {
|
|
4244
|
+
name: variantIcons[variant],
|
|
4245
|
+
size: sizeConfig[alertSize].icon,
|
|
4246
|
+
iconColor: "inherit"
|
|
4247
|
+
})
|
|
4248
|
+
}), jsxRuntime.jsx(StyledMessage, {
|
|
4249
|
+
children: children
|
|
4250
|
+
})]
|
|
4251
|
+
})
|
|
4252
|
+
});
|
|
4253
|
+
};
|
|
4254
|
+
InlineAlert.displayName = 'InlineAlert';
|
|
4255
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$h;
|
|
3950
4256
|
|
|
3951
|
-
var _a$3, _b$1;
|
|
3952
4257
|
var BreadcrumbNavStyled = styled__default.default.nav.withConfig({
|
|
3953
4258
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
3954
4259
|
componentId: "sc-7ouzg5-0"
|
|
3955
|
-
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])),
|
|
4260
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])), data.tokensJson.semantic.border["default"]);
|
|
3956
4261
|
var BreadcrumbStyled = styled__default.default.li.withConfig({
|
|
3957
4262
|
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
3958
4263
|
componentId: "sc-7ouzg5-1"
|
|
@@ -4020,7 +4325,8 @@ var CardSmall = function CardSmall(_a) {
|
|
|
4020
4325
|
subtitle = _a.subtitle,
|
|
4021
4326
|
meta = _a.meta,
|
|
4022
4327
|
href = _a.href,
|
|
4023
|
-
LinkComponent = _a.linkComponent
|
|
4328
|
+
LinkComponent = _a.linkComponent,
|
|
4329
|
+
dataTestId = _a["data-testid"];
|
|
4024
4330
|
if (!picture || !meta) {
|
|
4025
4331
|
return null;
|
|
4026
4332
|
}
|
|
@@ -4054,6 +4360,7 @@ var CardSmall = function CardSmall(_a) {
|
|
|
4054
4360
|
})]
|
|
4055
4361
|
});
|
|
4056
4362
|
return jsxRuntime.jsx(CardSmallStyled, {
|
|
4363
|
+
"data-testid": dataTestId,
|
|
4057
4364
|
children: LinkComponent && href ? jsxRuntime.jsx(LinkComponent, {
|
|
4058
4365
|
href: href,
|
|
4059
4366
|
"aria-label": title,
|
|
@@ -4080,8 +4387,10 @@ var CardLarge = function CardLarge(_a) {
|
|
|
4080
4387
|
labels = _b === void 0 ? [] : _b,
|
|
4081
4388
|
picture = _a.picture,
|
|
4082
4389
|
onImageClick = _a.onImageClick,
|
|
4083
|
-
imageHref = _a.imageHref
|
|
4390
|
+
imageHref = _a.imageHref,
|
|
4391
|
+
dataTestId = _a["data-testid"];
|
|
4084
4392
|
return jsxRuntime.jsx(CardLargeStyled, {
|
|
4393
|
+
"data-testid": dataTestId,
|
|
4085
4394
|
children: jsxRuntime.jsxs(Stack, {
|
|
4086
4395
|
direction: "column",
|
|
4087
4396
|
gap: "md",
|
|
@@ -4167,7 +4476,7 @@ var StyledCheckbox = styled__default.default.span.withConfig({
|
|
|
4167
4476
|
return props.$state === 'disabled' ? 'not-allowed' : 'pointer';
|
|
4168
4477
|
}, data.tokensJson.semantic.motion.duration.fast, data.tokensJson.semantic.motion.easing.easeOut, HiddenCheckboxInput, function (props) {
|
|
4169
4478
|
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;
|
|
4170
|
-
}, HiddenCheckboxInput, data.tokensJson.component.input.focus.outline, data.tokensJson.
|
|
4479
|
+
}, HiddenCheckboxInput, data.tokensJson.component.input.focus.outline, data.tokensJson.semantic.border.focusOffset, function (props) {
|
|
4171
4480
|
return props.$state === 'error' ? data.tokensJson.component.input.error.focus.borderColor : data.tokensJson.component.input.focus.borderColor;
|
|
4172
4481
|
}, function (props) {
|
|
4173
4482
|
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 ");
|
|
@@ -4455,6 +4764,37 @@ var CopyButton = function CopyButton(_a) {
|
|
|
4455
4764
|
})
|
|
4456
4765
|
});
|
|
4457
4766
|
};
|
|
4767
|
+
var LiveRegion = styled__default.default.span.withConfig({
|
|
4768
|
+
displayName: "CodeBlock__LiveRegion",
|
|
4769
|
+
componentId: "sc-1p1t0kp-4"
|
|
4770
|
+
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
4771
|
+
/**
|
|
4772
|
+
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
4773
|
+
* and expandable content for long code blocks.
|
|
4774
|
+
*
|
|
4775
|
+
* @param children - The code content to display
|
|
4776
|
+
* @param showCopyButton - Whether to show the copy button (default: true)
|
|
4777
|
+
* @param onCopy - Optional callback when code is copied
|
|
4778
|
+
* @param maxHeight - Maximum height in pixels before enabling expand/collapse
|
|
4779
|
+
* @param defaultExpanded - Initial expanded state when maxHeight is set
|
|
4780
|
+
* @param data-testid - Test identifier for the code block
|
|
4781
|
+
*
|
|
4782
|
+
* @example
|
|
4783
|
+
* ```tsx
|
|
4784
|
+
* // Basic usage
|
|
4785
|
+
* <CodeBlock>const x = 1;</CodeBlock>
|
|
4786
|
+
*
|
|
4787
|
+
* // With max height and expand/collapse
|
|
4788
|
+
* <CodeBlock maxHeight={200}>
|
|
4789
|
+
* {longCodeString}
|
|
4790
|
+
* </CodeBlock>
|
|
4791
|
+
*
|
|
4792
|
+
* // Start expanded
|
|
4793
|
+
* <CodeBlock maxHeight={200} defaultExpanded>
|
|
4794
|
+
* {longCodeString}
|
|
4795
|
+
* </CodeBlock>
|
|
4796
|
+
* ```
|
|
4797
|
+
*/])), visuallyHidden);
|
|
4458
4798
|
/**
|
|
4459
4799
|
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
4460
4800
|
* and expandable content for long code blocks.
|
|
@@ -4497,6 +4837,9 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4497
4837
|
var _e = React.useState(false),
|
|
4498
4838
|
needsExpansion = _e[0],
|
|
4499
4839
|
setNeedsExpansion = _e[1];
|
|
4840
|
+
var _f = React.useState(''),
|
|
4841
|
+
announcement = _f[0],
|
|
4842
|
+
setAnnouncement = _f[1];
|
|
4500
4843
|
var contentRef = React.useRef(null);
|
|
4501
4844
|
// Check if content exceeds maxHeight
|
|
4502
4845
|
React.useEffect(function () {
|
|
@@ -4510,17 +4853,7 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4510
4853
|
return !prev;
|
|
4511
4854
|
});
|
|
4512
4855
|
// Announce state change to screen readers
|
|
4513
|
-
|
|
4514
|
-
var announcer = document.createElement('div');
|
|
4515
|
-
announcer.setAttribute('aria-live', 'polite');
|
|
4516
|
-
announcer.setAttribute('aria-atomic', 'true');
|
|
4517
|
-
announcer.setAttribute('class', 'sr-only');
|
|
4518
|
-
announcer.style.cssText = 'position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;';
|
|
4519
|
-
announcer.textContent = announcement;
|
|
4520
|
-
document.body.appendChild(announcer);
|
|
4521
|
-
setTimeout(function () {
|
|
4522
|
-
document.body.removeChild(announcer);
|
|
4523
|
-
}, 1000);
|
|
4856
|
+
setAnnouncement(isExpanded ? 'Code block collapsed' : 'Code block expanded');
|
|
4524
4857
|
};
|
|
4525
4858
|
var showExpandButton = maxHeight && needsExpansion;
|
|
4526
4859
|
return jsxRuntime.jsxs(CodeBlockWrapper, {
|
|
@@ -4545,13 +4878,17 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4545
4878
|
"data-testid": "expand-button",
|
|
4546
4879
|
children: isExpanded ? 'Show less' : 'Show more'
|
|
4547
4880
|
})
|
|
4881
|
+
}), showExpandButton && jsxRuntime.jsx(LiveRegion, {
|
|
4882
|
+
"aria-live": "polite",
|
|
4883
|
+
"aria-atomic": "true",
|
|
4884
|
+
children: announcement
|
|
4548
4885
|
}), showCopyButton && jsxRuntime.jsx(CopyButton, {
|
|
4549
4886
|
text: children,
|
|
4550
4887
|
onCopy: onCopy
|
|
4551
4888
|
})]
|
|
4552
4889
|
});
|
|
4553
4890
|
};
|
|
4554
|
-
var templateObject_1$h, templateObject_2$f, templateObject_3$e, templateObject_4$c;
|
|
4891
|
+
var templateObject_1$h, templateObject_2$f, templateObject_3$e, templateObject_4$c, templateObject_5$a;
|
|
4555
4892
|
|
|
4556
4893
|
var StyledHeader$1 = styled__default.default.div.withConfig({
|
|
4557
4894
|
displayName: "DateGroup__StyledHeader",
|
|
@@ -4645,7 +4982,7 @@ var DateGroup = function DateGroup(_a) {
|
|
|
4645
4982
|
};
|
|
4646
4983
|
var templateObject_1$g, templateObject_2$e, templateObject_3$d, templateObject_4$b;
|
|
4647
4984
|
|
|
4648
|
-
var semantic$
|
|
4985
|
+
var semantic$7 = data.tokensJson.semantic;
|
|
4649
4986
|
var StyledContainer$1 = styled__default.default.div.withConfig({
|
|
4650
4987
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4651
4988
|
return !prop.startsWith('$');
|
|
@@ -4654,7 +4991,7 @@ var StyledContainer$1 = styled__default.default.div.withConfig({
|
|
|
4654
4991
|
componentId: "sc-1u5hxh-0"
|
|
4655
4992
|
})(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) {
|
|
4656
4993
|
var $size = _a.$size;
|
|
4657
|
-
return $size === 'small' ? semantic$
|
|
4994
|
+
return $size === 'small' ? semantic$7.spacing.layout['4xl'] : $size === 'large' ? semantic$7.spacing.layout['8xl'] : semantic$7.spacing.layout['6xl'];
|
|
4658
4995
|
});
|
|
4659
4996
|
var StyledIllustration = styled__default.default.div.withConfig({
|
|
4660
4997
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -4668,16 +5005,16 @@ var StyledIllustration = styled__default.default.div.withConfig({
|
|
|
4668
5005
|
}, function (_a) {
|
|
4669
5006
|
var $size = _a.$size;
|
|
4670
5007
|
return $size === 'small' ? data.tokensJson.component.emptyState.illustration.small : $size === 'large' ? data.tokensJson.component.emptyState.illustration.large : data.tokensJson.component.emptyState.illustration.medium;
|
|
4671
|
-
}, semantic$
|
|
5008
|
+
}, semantic$7.spacing.layout['2xl'], function (_a) {
|
|
4672
5009
|
var $variant = _a.$variant;
|
|
4673
|
-
return $variant === 'error' ? semantic$
|
|
5010
|
+
return $variant === 'error' ? semantic$7.color.icon.error : $variant === 'success' ? semantic$7.color.icon.success : semantic$7.color.icon.subdued;
|
|
4674
5011
|
});
|
|
4675
5012
|
var StyledTextContainer = styled__default.default.div.withConfig({
|
|
4676
5013
|
displayName: "EmptyState__StyledTextContainer",
|
|
4677
5014
|
componentId: "sc-1u5hxh-2"
|
|
4678
5015
|
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n max-width: ", ";\n margin-bottom: ", ";\n"], ["\n max-width: ", ";\n margin-bottom: ", ";\n"
|
|
4679
5016
|
// Map illustration type to icon name
|
|
4680
|
-
])), data.tokensJson.component.emptyState.text.maxWidth, semantic$
|
|
5017
|
+
])), data.tokensJson.component.emptyState.text.maxWidth, semantic$7.spacing.layout['2xl']);
|
|
4681
5018
|
// Map illustration type to icon name
|
|
4682
5019
|
var illustrationToIcon = {
|
|
4683
5020
|
search: 'search',
|
|
@@ -4732,7 +5069,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4732
5069
|
children: title
|
|
4733
5070
|
}), jsxRuntime.jsx("div", {
|
|
4734
5071
|
style: {
|
|
4735
|
-
marginTop: semantic$
|
|
5072
|
+
marginTop: semantic$7.spacing.layout.md
|
|
4736
5073
|
},
|
|
4737
5074
|
children: jsxRuntime.jsx(Typography, {
|
|
4738
5075
|
variant: "body",
|
|
@@ -4797,9 +5134,11 @@ var FeatureBlock = function FeatureBlock(_a) {
|
|
|
4797
5134
|
onReadMore = _a.onReadMore,
|
|
4798
5135
|
readMoreHref = _a.readMoreHref,
|
|
4799
5136
|
_c = _a.readMoreText,
|
|
4800
|
-
readMoreText = _c === void 0 ? "Read more" : _c
|
|
5137
|
+
readMoreText = _c === void 0 ? "Read more" : _c,
|
|
5138
|
+
dataTestId = _a["data-testid"];
|
|
4801
5139
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4802
5140
|
children: [jsxRuntime.jsxs(FeatureBlockStyled, {
|
|
5141
|
+
"data-testid": dataTestId,
|
|
4803
5142
|
children: [jsxRuntime.jsx(ImageWrapper, {
|
|
4804
5143
|
children: jsxRuntime.jsx(Picture, {
|
|
4805
5144
|
title: title,
|
|
@@ -4855,6 +5194,9 @@ var _a = data.tokensJson.semantic,
|
|
|
4855
5194
|
_b = data.tokensJson.component,
|
|
4856
5195
|
input$1 = _b.input,
|
|
4857
5196
|
field$3 = _b.field;
|
|
5197
|
+
// Spacing comes from the semantic scales: no component spacing tokens (decision 0022).
|
|
5198
|
+
// The 11px vertical padding is off-grid and keeps its deprecated token until #129.
|
|
5199
|
+
var controlPaddingX = data.tokensJson.semantic.spacing.component.lg;
|
|
4858
5200
|
var duration = motion$1.duration,
|
|
4859
5201
|
easing = motion$1.easing;
|
|
4860
5202
|
var DropdownContainer = styled__default.default.div.withConfig({
|
|
@@ -4867,7 +5209,7 @@ var DropdownTrigger = styled__default.default.button.withConfig({
|
|
|
4867
5209
|
},
|
|
4868
5210
|
displayName: "Dropdown__DropdownTrigger",
|
|
4869
5211
|
componentId: "sc-kz07c4-1"
|
|
4870
|
-
})(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:
|
|
5212
|
+
})(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) {
|
|
4871
5213
|
var $hasError = _a.$hasError;
|
|
4872
5214
|
return $hasError ? input$1.error.borderColor : input$1["default"].borderColor;
|
|
4873
5215
|
}, input$1["default"].borderRadius, input$1["default"].font, input$1["default"].textColor, duration.normal, easing.easeInOut, duration.normal, easing.easeInOut, function (_a) {
|
|
@@ -4876,7 +5218,7 @@ var DropdownTrigger = styled__default.default.button.withConfig({
|
|
|
4876
5218
|
}, function (_a) {
|
|
4877
5219
|
var $hasError = _a.$hasError;
|
|
4878
5220
|
return $hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor;
|
|
4879
|
-
}, input$1.focus.outline,
|
|
5221
|
+
}, input$1.focus.outline, border$1.focusOffset, input$1.disabled.backgroundColor, input$1.disabled.textColor, input$1.disabled.borderColor, function (_a) {
|
|
4880
5222
|
var $isOpen = _a.$isOpen,
|
|
4881
5223
|
$hasError = _a.$hasError;
|
|
4882
5224
|
return $isOpen && "\n border-color: ".concat($hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor, ";\n ");
|
|
@@ -4897,7 +5239,7 @@ var DropdownMenu = styled__default.default.div.withConfig({
|
|
|
4897
5239
|
},
|
|
4898
5240
|
displayName: "Dropdown__DropdownMenu",
|
|
4899
5241
|
componentId: "sc-kz07c4-3"
|
|
4900
|
-
})(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
|
|
5242
|
+
})(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) {
|
|
4901
5243
|
var $isOpen = _a.$isOpen;
|
|
4902
5244
|
return $isOpen ? 1 : 0;
|
|
4903
5245
|
}, function (_a) {
|
|
@@ -4913,7 +5255,7 @@ var DropdownOption = styled__default.default.button.withConfig({
|
|
|
4913
5255
|
},
|
|
4914
5256
|
displayName: "Dropdown__DropdownOption",
|
|
4915
5257
|
componentId: "sc-kz07c4-4"
|
|
4916
|
-
})(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,
|
|
5258
|
+
})(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) {
|
|
4917
5259
|
var $isSelected = _a.$isSelected,
|
|
4918
5260
|
$isFocused = _a.$isFocused;
|
|
4919
5261
|
if ($isFocused) return color$1.background.surface;
|
|
@@ -4926,7 +5268,7 @@ var StyledHelperText$3 = styled__default.default.div.withConfig({
|
|
|
4926
5268
|
})(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) {
|
|
4927
5269
|
var $hasError = _a.$hasError;
|
|
4928
5270
|
return $hasError ? field$3.helperText.colorError : field$3.helperText.color;
|
|
4929
|
-
},
|
|
5271
|
+
}, spacing.sm);
|
|
4930
5272
|
var Dropdown = function Dropdown(_a) {
|
|
4931
5273
|
var options = _a.options,
|
|
4932
5274
|
value = _a.value,
|
|
@@ -4938,7 +5280,8 @@ var Dropdown = function Dropdown(_a) {
|
|
|
4938
5280
|
className = _a.className,
|
|
4939
5281
|
label = _a.label,
|
|
4940
5282
|
helperText = _a.helperText,
|
|
4941
|
-
error = _a.error
|
|
5283
|
+
error = _a.error,
|
|
5284
|
+
dataTestId = _a["data-testid"];
|
|
4942
5285
|
var _d = React.useState(false),
|
|
4943
5286
|
isOpen = _d[0],
|
|
4944
5287
|
setIsOpen = _d[1];
|
|
@@ -5043,11 +5386,12 @@ var Dropdown = function Dropdown(_a) {
|
|
|
5043
5386
|
return jsxRuntime.jsxs(DropdownContainer, {
|
|
5044
5387
|
ref: dropdownRef,
|
|
5045
5388
|
className: className,
|
|
5389
|
+
"data-testid": dataTestId,
|
|
5046
5390
|
children: [label && jsxRuntime.jsx("label", {
|
|
5047
5391
|
htmlFor: dropdownId,
|
|
5048
5392
|
style: {
|
|
5049
5393
|
display: 'block',
|
|
5050
|
-
marginBottom:
|
|
5394
|
+
marginBottom: spacing.sm
|
|
5051
5395
|
},
|
|
5052
5396
|
children: jsxRuntime.jsx(Typography, {
|
|
5053
5397
|
variant: "label",
|
|
@@ -5102,7 +5446,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
5102
5446
|
};
|
|
5103
5447
|
var templateObject_1$d, templateObject_2$b, templateObject_3$a, templateObject_4$9, templateObject_5$8, templateObject_6$7;
|
|
5104
5448
|
|
|
5105
|
-
var semantic$
|
|
5449
|
+
var semantic$6 = data.tokensJson.semantic;
|
|
5106
5450
|
var StyledList = styled__default.default.ul.withConfig({
|
|
5107
5451
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
5108
5452
|
return !prop.startsWith('$');
|
|
@@ -5111,7 +5455,7 @@ var StyledList = styled__default.default.ul.withConfig({
|
|
|
5111
5455
|
componentId: "sc-1irksg5-0"
|
|
5112
5456
|
})(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) {
|
|
5113
5457
|
var $dividers = _a.$dividers;
|
|
5114
|
-
return $dividers && "\n > li:not(:last-child) {\n border-bottom: ".concat(semantic$
|
|
5458
|
+
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 ");
|
|
5115
5459
|
});
|
|
5116
5460
|
var List = function List(_a) {
|
|
5117
5461
|
var children = _a.children,
|
|
@@ -5135,12 +5479,12 @@ var List = function List(_a) {
|
|
|
5135
5479
|
List.displayName = 'List';
|
|
5136
5480
|
var templateObject_1$c;
|
|
5137
5481
|
|
|
5138
|
-
var semantic$
|
|
5139
|
-
var layout = semantic$
|
|
5140
|
-
color = semantic$
|
|
5141
|
-
border = semantic$
|
|
5142
|
-
elevation = semantic$
|
|
5143
|
-
motion = semantic$
|
|
5482
|
+
var semantic$5 = data.tokensJson.semantic;
|
|
5483
|
+
var layout = semantic$5.spacing.layout,
|
|
5484
|
+
color = semantic$5.color,
|
|
5485
|
+
border = semantic$5.border,
|
|
5486
|
+
elevation = semantic$5.elevation,
|
|
5487
|
+
motion = semantic$5.motion;
|
|
5144
5488
|
// ---------------------------------------------------------------------------
|
|
5145
5489
|
// Size map
|
|
5146
5490
|
// ---------------------------------------------------------------------------
|
|
@@ -5164,7 +5508,7 @@ var scaleIn = styled.keyframes(templateObject_2$a || (templateObject_2$a = __mak
|
|
|
5164
5508
|
var StyledOverlay$1 = styled__default.default.div.withConfig({
|
|
5165
5509
|
displayName: "Modal__StyledOverlay",
|
|
5166
5510
|
componentId: "sc-1d3g5gh-0"
|
|
5167
|
-
})(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$
|
|
5511
|
+
})(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) {
|
|
5168
5512
|
var $isExiting = _a.$isExiting;
|
|
5169
5513
|
return $isExiting && exitAnimation;
|
|
5170
5514
|
}));
|
|
@@ -5174,7 +5518,7 @@ var StyledDialog = styled__default.default.div.withConfig({
|
|
|
5174
5518
|
},
|
|
5175
5519
|
displayName: "Modal__StyledDialog",
|
|
5176
5520
|
componentId: "sc-1d3g5gh-1"
|
|
5177
|
-
})(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$
|
|
5521
|
+
})(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) {
|
|
5178
5522
|
var $width = _a.$width;
|
|
5179
5523
|
return $width;
|
|
5180
5524
|
}, 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) {
|
|
@@ -5183,7 +5527,7 @@ var StyledDialog = styled__default.default.div.withConfig({
|
|
|
5183
5527
|
}), reducedMotion, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5184
5528
|
var $isExiting = _a.$isExiting;
|
|
5185
5529
|
return $isExiting && exitAnimation;
|
|
5186
|
-
}, semantic$
|
|
5530
|
+
}, semantic$5.breakpoint.md, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5187
5531
|
var $isExiting = _a.$isExiting;
|
|
5188
5532
|
return $isExiting && exitAnimation;
|
|
5189
5533
|
});
|
|
@@ -5194,7 +5538,7 @@ var StyledHeader = styled__default.default.div.withConfig({
|
|
|
5194
5538
|
var StyledBody = styled__default.default.div.withConfig({
|
|
5195
5539
|
displayName: "Modal__StyledBody",
|
|
5196
5540
|
componentId: "sc-1d3g5gh-3"
|
|
5197
|
-
})(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$
|
|
5541
|
+
})(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);
|
|
5198
5542
|
var StyledFooter = styled__default.default.div.withConfig({
|
|
5199
5543
|
displayName: "Modal__StyledFooter",
|
|
5200
5544
|
componentId: "sc-1d3g5gh-4"
|
|
@@ -5378,20 +5722,21 @@ var Modal = function Modal(_a) {
|
|
|
5378
5722
|
Modal.displayName = 'Modal';
|
|
5379
5723
|
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;
|
|
5380
5724
|
|
|
5381
|
-
var input = data.tokensJson.component.input
|
|
5725
|
+
var input = data.tokensJson.component.input,
|
|
5726
|
+
semantic$4 = data.tokensJson.semantic;
|
|
5382
5727
|
var StyledInputBase = styled__default.default.input.withConfig({
|
|
5383
5728
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
5384
5729
|
return !prop.startsWith('$');
|
|
5385
5730
|
},
|
|
5386
5731
|
displayName: "InputBase__StyledInputBase",
|
|
5387
5732
|
componentId: "sc-1bpf4e8-0"
|
|
5388
|
-
})(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:
|
|
5733
|
+
})(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"
|
|
5389
5734
|
/**
|
|
5390
5735
|
* Base styled textarea with shared styling
|
|
5391
5736
|
*/])), input["default"].font, function (_a) {
|
|
5392
5737
|
var $disabled = _a.$disabled;
|
|
5393
5738
|
return $disabled ? input.disabled.textColor : input["default"].textColor;
|
|
5394
|
-
}, input["default"].paddingY,
|
|
5739
|
+
}, input["default"].paddingY, semantic$4.spacing.component.lg, function (_a) {
|
|
5395
5740
|
var $disabled = _a.$disabled;
|
|
5396
5741
|
return $disabled ? input.disabled.backgroundColor : input["default"].backgroundColor;
|
|
5397
5742
|
}, input["default"].borderWidth, function (_a) {
|
|
@@ -5403,10 +5748,10 @@ var StyledInputBase = styled__default.default.input.withConfig({
|
|
|
5403
5748
|
}, 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) {
|
|
5404
5749
|
var $hasError = _a.$hasError;
|
|
5405
5750
|
return $hasError ? input.error.focus.borderColor : input.focus.borderColor;
|
|
5406
|
-
}, input.focus.outline,
|
|
5751
|
+
}, input.focus.outline, semantic$4.border.focusOffset, function (_a) {
|
|
5407
5752
|
var $hasError = _a.$hasError;
|
|
5408
5753
|
return $hasError ? input.error.hover.borderColor : input.hover.borderColor;
|
|
5409
|
-
}
|
|
5754
|
+
});
|
|
5410
5755
|
/**
|
|
5411
5756
|
* Base styled textarea with shared styling
|
|
5412
5757
|
*/
|
|
@@ -5420,14 +5765,16 @@ var StyledTextAreaBase = styled__default.default.textarea.withConfig({
|
|
|
5420
5765
|
var templateObject_1$a, templateObject_2$9;
|
|
5421
5766
|
|
|
5422
5767
|
var field$2 = data.tokensJson.component.field;
|
|
5768
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
5769
|
+
var gap$2 = data.tokensJson.semantic.spacing.layout;
|
|
5423
5770
|
var StyledFieldContainer$2 = styled__default.default.div.withConfig({
|
|
5424
5771
|
displayName: "NumberInput__StyledFieldContainer",
|
|
5425
5772
|
componentId: "sc-qotc3w-0"
|
|
5426
|
-
})(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"])),
|
|
5773
|
+
})(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);
|
|
5427
5774
|
var StyledLabel$3 = styled__default.default.label.withConfig({
|
|
5428
5775
|
displayName: "NumberInput__StyledLabel",
|
|
5429
5776
|
componentId: "sc-qotc3w-1"
|
|
5430
|
-
})(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"])),
|
|
5777
|
+
})(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);
|
|
5431
5778
|
var StyledRequiredIndicator$2 = styled__default.default.span.withConfig({
|
|
5432
5779
|
displayName: "NumberInput__StyledRequiredIndicator",
|
|
5433
5780
|
componentId: "sc-qotc3w-2"
|
|
@@ -5679,10 +6026,36 @@ var PageTitleStyled = styled__default.default.div.withConfig({
|
|
|
5679
6026
|
},
|
|
5680
6027
|
displayName: "PageTitle__PageTitleStyled",
|
|
5681
6028
|
componentId: "sc-16h256f-0"
|
|
5682
|
-
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin-bottom: ", ";\n margin-top: ", ";\n"
|
|
6029
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin-bottom: ", ";\n margin-top: ", ";\n"
|
|
6030
|
+
/**
|
|
6031
|
+
* @deprecated PageTitle is a leftover from the personal site (its back button always links to `/music`)
|
|
6032
|
+
* and will be removed in the next major version. Compose a page title from `Typography` in a `Stack`:
|
|
6033
|
+
*
|
|
6034
|
+
* ```tsx
|
|
6035
|
+
* <Stack direction="column" gap="md">
|
|
6036
|
+
* <Typography variant="h1">{title}</Typography>
|
|
6037
|
+
* <Typography variant="caption" color="subdued">{subtitle}</Typography>
|
|
6038
|
+
* </Stack>
|
|
6039
|
+
* ```
|
|
6040
|
+
*
|
|
6041
|
+
* For a back link, add an `IconButton` with your own `url` and `aria-label`.
|
|
6042
|
+
*/])), data.tokensJson.semantic.spacing.layout['2xl'], function (_a) {
|
|
5683
6043
|
var $hasBackButton = _a.$hasBackButton;
|
|
5684
6044
|
return $hasBackButton ? data.tokensJson.semantic.spacing.layout.none : data.tokensJson.semantic.spacing.layout['7xl'];
|
|
5685
6045
|
});
|
|
6046
|
+
/**
|
|
6047
|
+
* @deprecated PageTitle is a leftover from the personal site (its back button always links to `/music`)
|
|
6048
|
+
* and will be removed in the next major version. Compose a page title from `Typography` in a `Stack`:
|
|
6049
|
+
*
|
|
6050
|
+
* ```tsx
|
|
6051
|
+
* <Stack direction="column" gap="md">
|
|
6052
|
+
* <Typography variant="h1">{title}</Typography>
|
|
6053
|
+
* <Typography variant="caption" color="subdued">{subtitle}</Typography>
|
|
6054
|
+
* </Stack>
|
|
6055
|
+
* ```
|
|
6056
|
+
*
|
|
6057
|
+
* For a back link, add an `IconButton` with your own `url` and `aria-label`.
|
|
6058
|
+
*/
|
|
5686
6059
|
var PageTitle = function PageTitle(_a) {
|
|
5687
6060
|
var title = _a.title,
|
|
5688
6061
|
_b = _a.hasBackButton,
|
|
@@ -5713,14 +6086,16 @@ var PageTitle = function PageTitle(_a) {
|
|
|
5713
6086
|
var templateObject_1$8;
|
|
5714
6087
|
|
|
5715
6088
|
var field$1 = data.tokensJson.component.field;
|
|
6089
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
6090
|
+
var gap$1 = data.tokensJson.semantic.spacing.layout;
|
|
5716
6091
|
var StyledFieldContainer$1 = styled__default.default.div.withConfig({
|
|
5717
6092
|
displayName: "PasswordField__StyledFieldContainer",
|
|
5718
6093
|
componentId: "sc-1p15zk0-0"
|
|
5719
|
-
})(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"])),
|
|
6094
|
+
})(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);
|
|
5720
6095
|
var StyledLabel$2 = styled__default.default.label.withConfig({
|
|
5721
6096
|
displayName: "PasswordField__StyledLabel",
|
|
5722
6097
|
componentId: "sc-1p15zk0-1"
|
|
5723
|
-
})(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"])),
|
|
6098
|
+
})(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);
|
|
5724
6099
|
var StyledRequiredIndicator$1 = styled__default.default.span.withConfig({
|
|
5725
6100
|
displayName: "PasswordField__StyledRequiredIndicator",
|
|
5726
6101
|
componentId: "sc-1p15zk0-2"
|
|
@@ -5854,14 +6229,14 @@ var StyledInputWrapper = styled__default.default.div.withConfig({
|
|
|
5854
6229
|
displayName: "SearchField__StyledInputWrapper",
|
|
5855
6230
|
componentId: "sc-qhz9i8-1"
|
|
5856
6231
|
})(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) {
|
|
5857
|
-
return props.$isFocused && "\n border-color: ".concat(component.input.focus.borderColor, ";\n outline: ").concat(component.input.focus.outline, ";\n outline-offset: ").concat(
|
|
6232
|
+
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 ");
|
|
5858
6233
|
}, function (props) {
|
|
5859
6234
|
return props.$disabled && "\n background-color: ".concat(component.input.disabled.backgroundColor, ";\n border-color: ").concat(component.input.disabled.borderColor, ";\n cursor: not-allowed;\n ");
|
|
5860
6235
|
}, component.input.hover.borderColor);
|
|
5861
6236
|
var StyledInput = styled__default.default.input.withConfig({
|
|
5862
6237
|
displayName: "SearchField__StyledInput",
|
|
5863
6238
|
componentId: "sc-qhz9i8-2"
|
|
5864
|
-
})(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"],
|
|
6239
|
+
})(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);
|
|
5865
6240
|
var StyledSuggestionsList = styled__default.default.ul.withConfig({
|
|
5866
6241
|
displayName: "SearchField__StyledSuggestionsList",
|
|
5867
6242
|
componentId: "sc-qhz9i8-3"
|
|
@@ -6424,7 +6799,7 @@ var StyledTrack = styled__default.default.div.withConfig({
|
|
|
6424
6799
|
componentId: "sc-6mh2d4-3"
|
|
6425
6800
|
})(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) {
|
|
6426
6801
|
var $disabled = _a.$disabled;
|
|
6427
|
-
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.
|
|
6802
|
+
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.background.progressTrack;
|
|
6428
6803
|
}, semantic$1.border.radius.circle, function (_a) {
|
|
6429
6804
|
var $disabled = _a.$disabled;
|
|
6430
6805
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
@@ -6434,7 +6809,7 @@ var StyledTrackFill = styled__default.default.div.withConfig({
|
|
|
6434
6809
|
componentId: "sc-6mh2d4-4"
|
|
6435
6810
|
})(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) {
|
|
6436
6811
|
var $disabled = _a.$disabled;
|
|
6437
|
-
return $disabled ? semantic$1.color.
|
|
6812
|
+
return $disabled ? semantic$1.color.icon.disabled : semantic$1.color.background.emphasis;
|
|
6438
6813
|
}, semantic$1.border.radius.circle);
|
|
6439
6814
|
var StyledThumb = styled__default.default.div.withConfig({
|
|
6440
6815
|
displayName: "Slider__StyledThumb",
|
|
@@ -6444,7 +6819,7 @@ var StyledThumb = styled__default.default.div.withConfig({
|
|
|
6444
6819
|
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.background.subtle;
|
|
6445
6820
|
}, semantic$1.border.width.thick, function (_a) {
|
|
6446
6821
|
var $disabled = _a.$disabled;
|
|
6447
|
-
return $disabled ? semantic$1.color.
|
|
6822
|
+
return $disabled ? semantic$1.color.icon.disabled : semantic$1.color.background.emphasis;
|
|
6448
6823
|
}, semantic$1.border.radius.circle, function (_a) {
|
|
6449
6824
|
var $disabled = _a.$disabled;
|
|
6450
6825
|
return $disabled ? 'not-allowed' : 'grab';
|
|
@@ -6810,47 +7185,42 @@ var templateObject_1$4, templateObject_2$4, templateObject_3$4, templateObject_4
|
|
|
6810
7185
|
|
|
6811
7186
|
var semantic = data.tokensJson.semantic;
|
|
6812
7187
|
var StyledTabList = styled__default.default.div.withConfig({
|
|
6813
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6814
|
-
return !prop.startsWith('$');
|
|
6815
|
-
},
|
|
6816
7188
|
displayName: "TabBar__StyledTabList",
|
|
6817
7189
|
componentId: "sc-1g9ib0y-0"
|
|
6818
|
-
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n
|
|
6819
|
-
return props.$variant === 'pills' ? semantic.spacing.layout.sm : '0';
|
|
6820
|
-
}, function (props) {
|
|
6821
|
-
return props.$variant === 'underline' ? "".concat(semantic.border.width.thin, " solid ").concat(semantic.color.border.subtle) : 'none';
|
|
6822
|
-
}, data.tokensJson.component.tabBar.scrollbar.height, semantic.color.background.subtle, semantic.color.border["default"], semantic.border.radius.sm);
|
|
7190
|
+
})(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);
|
|
6823
7191
|
var StyledTab = styled__default.default.button.withConfig({
|
|
6824
7192
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6825
7193
|
return !prop.startsWith('$');
|
|
6826
7194
|
},
|
|
6827
7195
|
displayName: "TabBar__StyledTab",
|
|
6828
7196
|
componentId: "sc-1g9ib0y-1"
|
|
6829
|
-
})(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 /*
|
|
7197
|
+
})(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 /* Pressed nudge */\n &:active:not(:disabled) {\n transform: translateY(1px);\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 /* Pressed nudge */\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n"])), semantic.spacing.layout.sm, semantic.spacing.layout.md, semantic.spacing.layout.lg, semantic.typography.button2, function (props) {
|
|
6830
7198
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
7199
|
+
}, semantic.motion.hover, semantic.border.radius.sm, semantic.border.radius.sm, function (props) {
|
|
7200
|
+
return props.$isActive ? semantic.color.background['interactive-subtle'] : 'transparent';
|
|
7201
|
+
}, function (props) {
|
|
7202
|
+
return props.$isActive ? semantic.color.text.interactive : semantic.color.text.subdued;
|
|
7203
|
+
}, semantic.border.width.thick, function (props) {
|
|
7204
|
+
return props.$isActive ? semantic.color.background.interactive : 'transparent';
|
|
6831
7205
|
}, semantic.motion.hover, function (props) {
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
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 ");
|
|
7206
|
+
return props.$isActive ? semantic.color.background['interactive-subtle-hover'] : 'transparent';
|
|
7207
|
+
}, function (props) {
|
|
7208
|
+
return props.$isActive ? semantic.color.text['interactive-hover'] : semantic.color.text["default"];
|
|
7209
|
+
}, function (props) {
|
|
7210
|
+
return props.$isActive ? semantic.color.background['interactive-subtle-active'] : 'transparent';
|
|
7211
|
+
}, function (props) {
|
|
7212
|
+
return props.$isActive ? semantic.color.text['interactive-active'] : semantic.color.text["default"];
|
|
6840
7213
|
}, function (props) {
|
|
6841
7214
|
return props.$disabled ? '0.5' : '1';
|
|
6842
7215
|
}, semantic.border.width.thick, semantic.color.border.strong, semantic.spacing.layout.xs);
|
|
6843
7216
|
var StyledBadge = styled__default.default.span.withConfig({
|
|
6844
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6845
|
-
return !prop.startsWith('$');
|
|
6846
|
-
},
|
|
6847
7217
|
displayName: "TabBar__StyledBadge",
|
|
6848
7218
|
componentId: "sc-1g9ib0y-2"
|
|
6849
7219
|
})(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"
|
|
6850
7220
|
/**
|
|
6851
7221
|
* TabBar component for tabbed navigation
|
|
6852
7222
|
*
|
|
6853
|
-
* Provides accessible tab navigation with
|
|
7223
|
+
* Provides accessible tab navigation with an underline style, keyboard support,
|
|
6854
7224
|
* and optional badge counts. Follows ARIA tablist pattern.
|
|
6855
7225
|
*
|
|
6856
7226
|
* @example
|
|
@@ -6865,21 +7235,13 @@ var StyledBadge = styled__default.default.span.withConfig({
|
|
|
6865
7235
|
* ]}
|
|
6866
7236
|
* activeTab={activeTab}
|
|
6867
7237
|
* onTabChange={setActiveTab}
|
|
6868
|
-
* variant="pills"
|
|
6869
7238
|
* />
|
|
6870
7239
|
* ```
|
|
6871
|
-
*/])), 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,
|
|
6872
|
-
if (props.$variant === 'pills') {
|
|
6873
|
-
return props.$isActive ? 'rgba(255, 255, 255, 0.2)' : semantic.color.background.interactive;
|
|
6874
|
-
}
|
|
6875
|
-
return semantic.color.background.interactive;
|
|
6876
|
-
}, function (props) {
|
|
6877
|
-
return props.$variant === 'pills' && props.$isActive ? semantic.color.text.inverse : semantic.color.text.inverse;
|
|
6878
|
-
});
|
|
7240
|
+
*/])), 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);
|
|
6879
7241
|
/**
|
|
6880
7242
|
* TabBar component for tabbed navigation
|
|
6881
7243
|
*
|
|
6882
|
-
* Provides accessible tab navigation with
|
|
7244
|
+
* Provides accessible tab navigation with an underline style, keyboard support,
|
|
6883
7245
|
* and optional badge counts. Follows ARIA tablist pattern.
|
|
6884
7246
|
*
|
|
6885
7247
|
* @example
|
|
@@ -6894,27 +7256,26 @@ var StyledBadge = styled__default.default.span.withConfig({
|
|
|
6894
7256
|
* ]}
|
|
6895
7257
|
* activeTab={activeTab}
|
|
6896
7258
|
* onTabChange={setActiveTab}
|
|
6897
|
-
* variant="pills"
|
|
6898
7259
|
* />
|
|
6899
7260
|
* ```
|
|
6900
7261
|
*/
|
|
6901
7262
|
var TabBar = function TabBar(_a) {
|
|
6902
7263
|
var tabs = _a.tabs,
|
|
6903
7264
|
activeTab = _a.activeTab,
|
|
6904
|
-
onTabChange = _a.onTabChange
|
|
6905
|
-
|
|
6906
|
-
variant
|
|
6907
|
-
|
|
6908
|
-
ariaLabel =
|
|
7265
|
+
onTabChange = _a.onTabChange;
|
|
7266
|
+
// Deprecated: every variant renders as underline (decision 0020)
|
|
7267
|
+
_a.variant;
|
|
7268
|
+
var _b = _a["aria-label"],
|
|
7269
|
+
ariaLabel = _b === void 0 ? 'Tab navigation' : _b,
|
|
6909
7270
|
dataTestId = _a["data-testid"];
|
|
6910
7271
|
var tabRefs = React.useRef([]);
|
|
6911
|
-
var
|
|
7272
|
+
var _c = React.useState(function () {
|
|
6912
7273
|
return tabs.findIndex(function (tab) {
|
|
6913
7274
|
return tab.id === activeTab;
|
|
6914
7275
|
});
|
|
6915
7276
|
}),
|
|
6916
|
-
focusedIndex =
|
|
6917
|
-
setFocusedIndex =
|
|
7277
|
+
focusedIndex = _c[0],
|
|
7278
|
+
setFocusedIndex = _c[1];
|
|
6918
7279
|
// Update focused index when active tab changes externally
|
|
6919
7280
|
React.useEffect(function () {
|
|
6920
7281
|
var newIndex = tabs.findIndex(function (tab) {
|
|
@@ -6989,7 +7350,6 @@ var TabBar = function TabBar(_a) {
|
|
|
6989
7350
|
}
|
|
6990
7351
|
};
|
|
6991
7352
|
return jsxRuntime.jsx(StyledTabList, {
|
|
6992
|
-
"$variant": variant,
|
|
6993
7353
|
role: "tablist",
|
|
6994
7354
|
"aria-label": ariaLabel,
|
|
6995
7355
|
"data-testid": dataTestId,
|
|
@@ -6998,7 +7358,6 @@ var TabBar = function TabBar(_a) {
|
|
|
6998
7358
|
ref: function ref(el) {
|
|
6999
7359
|
tabRefs.current[index] = el;
|
|
7000
7360
|
},
|
|
7001
|
-
"$variant": variant,
|
|
7002
7361
|
"$isActive": tab.id === activeTab,
|
|
7003
7362
|
"$disabled": tab.disabled || false,
|
|
7004
7363
|
role: "tab",
|
|
@@ -7014,8 +7373,6 @@ var TabBar = function TabBar(_a) {
|
|
|
7014
7373
|
},
|
|
7015
7374
|
"data-testid": "".concat(dataTestId, "-tab-").concat(tab.id),
|
|
7016
7375
|
children: [tab.label, typeof tab.badge === 'number' && tab.badge > 0 && jsxRuntime.jsx(StyledBadge, {
|
|
7017
|
-
"$variant": variant,
|
|
7018
|
-
"$isActive": tab.id === activeTab,
|
|
7019
7376
|
"aria-label": "".concat(tab.badge, " items"),
|
|
7020
7377
|
children: tab.badge > 99 ? '99+' : tab.badge
|
|
7021
7378
|
})]
|
|
@@ -7027,14 +7384,16 @@ TabBar.displayName = 'TabBar';
|
|
|
7027
7384
|
var templateObject_1$3, templateObject_2$3, templateObject_3$3;
|
|
7028
7385
|
|
|
7029
7386
|
var field = data.tokensJson.component.field;
|
|
7387
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
7388
|
+
var gap = data.tokensJson.semantic.spacing.layout;
|
|
7030
7389
|
var StyledFieldContainer = styled__default.default.div.withConfig({
|
|
7031
7390
|
displayName: "TextField__StyledFieldContainer",
|
|
7032
7391
|
componentId: "sc-1ys3b0-0"
|
|
7033
|
-
})(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"])),
|
|
7392
|
+
})(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);
|
|
7034
7393
|
var StyledLabel = styled__default.default.label.withConfig({
|
|
7035
7394
|
displayName: "TextField__StyledLabel",
|
|
7036
7395
|
componentId: "sc-1ys3b0-1"
|
|
7037
|
-
})(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"])),
|
|
7396
|
+
})(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);
|
|
7038
7397
|
var StyledRequiredIndicator = styled__default.default.span.withConfig({
|
|
7039
7398
|
displayName: "TextField__StyledRequiredIndicator",
|
|
7040
7399
|
componentId: "sc-1ys3b0-2"
|
|
@@ -7167,9 +7526,9 @@ var StyledTruncatedText = styled__default.default.span.withConfig({
|
|
|
7167
7526
|
displayName: "TransactionListItem__StyledTruncatedText",
|
|
7168
7527
|
componentId: "sc-7yunm0-8"
|
|
7169
7528
|
})(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"
|
|
7170
|
-
// Map categories to
|
|
7529
|
+
// Map categories to CategoryLabel configurations
|
|
7171
7530
|
])));
|
|
7172
|
-
// Map categories to
|
|
7531
|
+
// Map categories to CategoryLabel configurations
|
|
7173
7532
|
var categoryConfig = {
|
|
7174
7533
|
shopping: {
|
|
7175
7534
|
color: 'purple',
|
|
@@ -7283,10 +7642,10 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
7283
7642
|
variant: "body",
|
|
7284
7643
|
children: merchant
|
|
7285
7644
|
})
|
|
7286
|
-
}), categoryData && jsxRuntime.jsx(
|
|
7645
|
+
}), categoryData && jsxRuntime.jsx(CategoryLabel, {
|
|
7287
7646
|
color: categoryData.color,
|
|
7288
7647
|
icon: categoryData.icon,
|
|
7289
|
-
size: "
|
|
7648
|
+
size: "medium",
|
|
7290
7649
|
variant: "minimal",
|
|
7291
7650
|
"aria-label": "Category: ".concat(categoryData.label),
|
|
7292
7651
|
children: categoryData.label
|
|
@@ -7385,6 +7744,7 @@ var Grid = function Grid(_a) {
|
|
|
7385
7744
|
gapX = _a.gapX,
|
|
7386
7745
|
gapY = _a.gapY,
|
|
7387
7746
|
className = _a.className,
|
|
7747
|
+
dataTestId = _a["data-testid"],
|
|
7388
7748
|
children = _a.children;
|
|
7389
7749
|
return jsxRuntime.jsx(GridContainer, {
|
|
7390
7750
|
"$cols": cols,
|
|
@@ -7392,6 +7752,7 @@ var Grid = function Grid(_a) {
|
|
|
7392
7752
|
"$gapX": gapX ? gapSpacing[gapX] : undefined,
|
|
7393
7753
|
"$gapY": gapY ? gapSpacing[gapY] : undefined,
|
|
7394
7754
|
className: className,
|
|
7755
|
+
"data-testid": dataTestId,
|
|
7395
7756
|
children: children
|
|
7396
7757
|
});
|
|
7397
7758
|
};
|
|
@@ -7404,7 +7765,7 @@ var GridColContainer = styled__default.default.div.withConfig({
|
|
|
7404
7765
|
})(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"], ["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"])), function (props) {
|
|
7405
7766
|
return props.$span && styled.css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["grid-column: span ", " / span ", ";"], ["grid-column: span ", " / span ", ";"])), props.$span, props.$span);
|
|
7406
7767
|
}, function (props) {
|
|
7407
|
-
return props.$order && styled.css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
7768
|
+
return props.$order !== undefined && styled.css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
7408
7769
|
}, function (props) {
|
|
7409
7770
|
return props.$spanSm && styled.css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.sm, props.$spanSm, props.$spanSm);
|
|
7410
7771
|
}, function (props) {
|
|
@@ -7414,13 +7775,13 @@ var GridColContainer = styled__default.default.div.withConfig({
|
|
|
7414
7775
|
}, function (props) {
|
|
7415
7776
|
return props.$spanXl && styled.css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.xl, props.$spanXl, props.$spanXl);
|
|
7416
7777
|
}, function (props) {
|
|
7417
|
-
return props.$orderSm && styled.css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.sm, props.$orderSm);
|
|
7778
|
+
return props.$orderSm !== undefined && styled.css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.sm, props.$orderSm);
|
|
7418
7779
|
}, function (props) {
|
|
7419
|
-
return props.$orderMd && styled.css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.md, props.$orderMd);
|
|
7780
|
+
return props.$orderMd !== undefined && styled.css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.md, props.$orderMd);
|
|
7420
7781
|
}, function (props) {
|
|
7421
|
-
return props.$orderLg && styled.css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.lg, props.$orderLg);
|
|
7782
|
+
return props.$orderLg !== undefined && styled.css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.lg, props.$orderLg);
|
|
7422
7783
|
}, function (props) {
|
|
7423
|
-
return props.$orderXl && styled.css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.xl, props.$orderXl);
|
|
7784
|
+
return props.$orderXl !== undefined && styled.css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.xl, props.$orderXl);
|
|
7424
7785
|
});
|
|
7425
7786
|
var GridCol = function GridCol(_a) {
|
|
7426
7787
|
var span = _a.span,
|
|
@@ -7434,6 +7795,7 @@ var GridCol = function GridCol(_a) {
|
|
|
7434
7795
|
orderLg = _a.orderLg,
|
|
7435
7796
|
orderXl = _a.orderXl,
|
|
7436
7797
|
className = _a.className,
|
|
7798
|
+
dataTestId = _a["data-testid"],
|
|
7437
7799
|
children = _a.children;
|
|
7438
7800
|
return jsxRuntime.jsx(GridColContainer, {
|
|
7439
7801
|
"$span": span,
|
|
@@ -7447,6 +7809,7 @@ var GridCol = function GridCol(_a) {
|
|
|
7447
7809
|
"$orderLg": orderLg,
|
|
7448
7810
|
"$orderXl": orderXl,
|
|
7449
7811
|
className: className,
|
|
7812
|
+
"data-testid": dataTestId,
|
|
7450
7813
|
children: children
|
|
7451
7814
|
});
|
|
7452
7815
|
};
|
|
@@ -7519,6 +7882,7 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
7519
7882
|
gapYLg = _a.gapYLg,
|
|
7520
7883
|
gapYXl = _a.gapYXl,
|
|
7521
7884
|
className = _a.className,
|
|
7885
|
+
dataTestId = _a["data-testid"],
|
|
7522
7886
|
children = _a.children;
|
|
7523
7887
|
return jsxRuntime.jsx(ResponsiveGridContainer, {
|
|
7524
7888
|
"$cols": cols,
|
|
@@ -7542,6 +7906,7 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
7542
7906
|
"$gapYLg": gapYLg ? gapSpacing[gapYLg] : undefined,
|
|
7543
7907
|
"$gapYXl": gapYXl ? gapSpacing[gapYXl] : undefined,
|
|
7544
7908
|
className: className,
|
|
7909
|
+
"data-testid": dataTestId,
|
|
7545
7910
|
children: children
|
|
7546
7911
|
});
|
|
7547
7912
|
};
|
|
@@ -7560,6 +7925,7 @@ exports.Button = Button;
|
|
|
7560
7925
|
exports.CardLarge = CardLarge;
|
|
7561
7926
|
exports.CardSmall = CardSmall;
|
|
7562
7927
|
exports.CategoryBadge = CategoryBadge;
|
|
7928
|
+
exports.CategoryLabel = CategoryLabel;
|
|
7563
7929
|
exports.Checkbox = Checkbox;
|
|
7564
7930
|
exports.Chip = Chip;
|
|
7565
7931
|
exports.ChipGroup = ChipGroup;
|
|
@@ -7576,6 +7942,8 @@ exports.Grid = Grid;
|
|
|
7576
7942
|
exports.GridCol = GridCol;
|
|
7577
7943
|
exports.Icon = Icon;
|
|
7578
7944
|
exports.IconButton = IconButton;
|
|
7945
|
+
exports.InlineAlert = InlineAlert;
|
|
7946
|
+
exports.InputChip = InputChip;
|
|
7579
7947
|
exports.LegacyChip = LegacyChip;
|
|
7580
7948
|
exports.List = List;
|
|
7581
7949
|
exports.ListItem = ListItem;
|
|
@@ -7592,6 +7960,7 @@ exports.Sheet = Sheet;
|
|
|
7592
7960
|
exports.Slider = Slider;
|
|
7593
7961
|
exports.Stack = Stack;
|
|
7594
7962
|
exports.StatusBadge = StatusBadge;
|
|
7963
|
+
exports.StatusLabel = StatusLabel;
|
|
7595
7964
|
exports.StyledInputBase = StyledInputBase;
|
|
7596
7965
|
exports.StyledTextAreaBase = StyledTextAreaBase;
|
|
7597
7966
|
exports.TabBar = TabBar;
|