@common-origin/design-system 2.15.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client.esm.js +949 -649
- package/dist/client.esm.js.map +1 -1
- package/dist/client.js +951 -647
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Button/Button.d.ts +13 -1
- package/dist/components/atoms/CategoryBadge/CategoryBadge.d.ts +12 -52
- package/dist/components/atoms/CategoryBadge/index.d.ts +1 -1
- package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +69 -0
- package/dist/components/atoms/CategoryLabel/index.d.ts +2 -0
- package/dist/components/atoms/Chip/BooleanChip.d.ts +6 -1
- package/dist/components/atoms/Chip/Chip.d.ts +17 -12
- package/dist/components/atoms/Chip/FilterChip.d.ts +10 -24
- package/dist/components/atoms/Chip/InputChip.d.ts +27 -0
- package/dist/components/atoms/Chip/index.d.ts +1 -0
- package/dist/components/atoms/Chip/shared/types.d.ts +15 -1
- package/dist/components/atoms/Chip/shared/utils.d.ts +1 -85
- package/dist/components/atoms/DateFormatter/DateFormatter.d.ts +11 -1
- package/dist/components/atoms/Icon/Icon.d.ts +11 -0
- package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +9 -55
- package/dist/components/atoms/StatusBadge/index.d.ts +1 -1
- package/dist/components/atoms/StatusLabel/StatusLabel.d.ts +17 -0
- package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +49 -0
- package/dist/components/atoms/StatusLabel/index.d.ts +2 -0
- package/dist/components/atoms/Tag/Tag.d.ts +5 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/molecules/Alert/Alert.d.ts +15 -2
- package/dist/components/molecules/DateGroup/DateGroup.d.ts +4 -1
- package/dist/components/molecules/InlineAlert/InlineAlert.d.ts +54 -0
- package/dist/components/molecules/InlineAlert/index.d.ts +2 -0
- package/dist/components/molecules/List/List.d.ts +3 -2
- package/dist/components/molecules/List/ListContext.d.ts +6 -0
- package/dist/components/molecules/List/ListItem.d.ts +5 -4
- package/dist/components/molecules/Modal/Modal.d.ts +6 -2
- package/dist/components/molecules/TabBar/TabBar.d.ts +8 -5
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/data.esm.js +89 -11
- package/dist/data.esm.js.map +1 -1
- package/dist/data.js +89 -11
- package/dist/data.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/tokens.json +89 -11
- package/dist/tokens/index.esm.js +89 -11
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +89 -11
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/types/tokens.d.ts +81 -3
- package/dist/tokens.css +769 -0
- package/dist/tokens.css.d.ts +4 -0
- package/dist/types/tokens.d.ts +81 -3
- package/package.json +18 -6
package/dist/client.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import React, { useState, useEffect, useRef, useId, useCallback, useMemo, forwardRef } from 'react';
|
|
3
|
+
import React, { useState, createContext, useContext, useEffect, useRef, useId, useCallback, useMemo, forwardRef } from 'react';
|
|
4
4
|
import styled, { keyframes, css } from 'styled-components';
|
|
5
5
|
import { t as tokensJson, i as iconsJson } from './data.esm.js';
|
|
6
6
|
import { parseISO, format, isToday, isYesterday, isThisWeek } from 'date-fns';
|
|
@@ -104,44 +104,44 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
// Destructure tokens
|
|
107
|
-
var semantic$
|
|
107
|
+
var semantic$j = tokensJson.semantic;
|
|
108
108
|
var initials = tokensJson.component.avatar.initials;
|
|
109
|
-
var color$
|
|
110
|
-
size$
|
|
111
|
-
border$
|
|
112
|
-
var radius$5 = border$
|
|
109
|
+
var color$b = semantic$j.color,
|
|
110
|
+
size$2 = semantic$j.size,
|
|
111
|
+
border$b = semantic$j.border;
|
|
112
|
+
var radius$5 = border$b.radius;
|
|
113
113
|
var AvatarContainer = styled.div.withConfig({
|
|
114
114
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
115
115
|
return !prop.startsWith('$');
|
|
116
116
|
},
|
|
117
117
|
displayName: "Avatar__AvatarContainer",
|
|
118
118
|
componentId: "sc-ezn4ax-0"
|
|
119
|
-
})(templateObject_1$
|
|
119
|
+
})(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) {
|
|
120
120
|
var $size = _a.$size;
|
|
121
|
-
return size$
|
|
121
|
+
return size$2.avatar[$size];
|
|
122
122
|
}, function (_a) {
|
|
123
123
|
var $size = _a.$size;
|
|
124
|
-
return size$
|
|
125
|
-
}, radius$5.circle, color$
|
|
124
|
+
return size$2.avatar[$size];
|
|
125
|
+
}, radius$5.circle, color$b.background.surface);
|
|
126
126
|
var AvatarImage = styled.img.withConfig({
|
|
127
127
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
128
128
|
return !prop.startsWith('$');
|
|
129
129
|
},
|
|
130
130
|
displayName: "Avatar__AvatarImage",
|
|
131
131
|
componentId: "sc-ezn4ax-1"
|
|
132
|
-
})(templateObject_2$
|
|
132
|
+
})(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);
|
|
133
133
|
var AvatarInitials = styled.span.withConfig({
|
|
134
134
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
135
135
|
return !prop.startsWith('$');
|
|
136
136
|
},
|
|
137
137
|
displayName: "Avatar__AvatarInitials",
|
|
138
138
|
componentId: "sc-ezn4ax-2"
|
|
139
|
-
})(templateObject_3$
|
|
139
|
+
})(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"
|
|
140
140
|
// Helper function to get initials from name
|
|
141
141
|
])), initials.fontFamily, initials.fontWeight, function (_a) {
|
|
142
142
|
var $size = _a.$size;
|
|
143
143
|
return initials.fontSize[$size];
|
|
144
|
-
}, color$
|
|
144
|
+
}, color$b.text["default"], initials.lineHeight);
|
|
145
145
|
// Helper function to get initials from name
|
|
146
146
|
var getInitials = function getInitials(name) {
|
|
147
147
|
return name.split(' ').map(function (word) {
|
|
@@ -195,7 +195,7 @@ var Avatar = function Avatar(_a) {
|
|
|
195
195
|
})
|
|
196
196
|
}));
|
|
197
197
|
};
|
|
198
|
-
var templateObject_1$
|
|
198
|
+
var templateObject_1$M, templateObject_2$y, templateObject_3$v;
|
|
199
199
|
|
|
200
200
|
// Breakpoints from the semantic tokens (decision 0014)
|
|
201
201
|
var breakpoints$1 = {
|
|
@@ -220,7 +220,7 @@ var media$1 = {
|
|
|
220
220
|
var reducedMotion = '@media (prefers-reduced-motion: reduce)';
|
|
221
221
|
// No `from` keyframe: the fade starts from the element's current opacity, including a
|
|
222
222
|
// still-running entrance, so closing mid-entrance doesn't jump back to fully visible.
|
|
223
|
-
var fadeOut$1 = keyframes(templateObject_1$
|
|
223
|
+
var fadeOut$1 = keyframes(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n to { opacity: 0; }\n"], ["\n to { opacity: 0; }\n"
|
|
224
224
|
// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of
|
|
225
225
|
// the element's `animation` declarations while it exits: the entrance stays in the list,
|
|
226
226
|
// so it isn't restarted, and the fade runs on top of it. A fade is already the
|
|
@@ -232,51 +232,51 @@ var fadeOut$1 = keyframes(templateObject_1$K || (templateObject_1$K = __makeTemp
|
|
|
232
232
|
// so it isn't restarted, and the fade runs on top of it. A fade is already the
|
|
233
233
|
// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop
|
|
234
234
|
// still catches clicks (so they can't reach the page behind it) and the panel is inert.
|
|
235
|
-
var exitAnimation = css(templateObject_2$
|
|
235
|
+
var exitAnimation = css(templateObject_2$x || (templateObject_2$x = __makeTemplateObject([", ", " ", " ", " forwards"], [", ", " ", " ", " forwards"
|
|
236
236
|
// Content for screen readers only. The 1px size and -1px margin are part of the standard
|
|
237
237
|
// visually-hidden technique, not design values, so they aren't tokens.
|
|
238
238
|
])), fadeOut$1, tokensJson.semantic.motion.duration.fast, tokensJson.semantic.motion.easing.easeOut);
|
|
239
239
|
// Content for screen readers only. The 1px size and -1px margin are part of the standard
|
|
240
240
|
// visually-hidden technique, not design values, so they aren't tokens.
|
|
241
|
-
var visuallyHidden = css(templateObject_3$
|
|
242
|
-
var templateObject_1$
|
|
241
|
+
var visuallyHidden = 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"])));
|
|
242
|
+
var templateObject_1$L, templateObject_2$x, templateObject_3$u;
|
|
243
243
|
|
|
244
244
|
var _a$b = tokensJson.semantic,
|
|
245
|
-
typography$
|
|
246
|
-
color$
|
|
245
|
+
typography$2 = _a$b.typography,
|
|
246
|
+
color$a = _a$b.color,
|
|
247
247
|
letterSpacing = _a$b.letterSpacing;
|
|
248
248
|
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
249
249
|
var styles = {
|
|
250
|
-
display: "font: ".concat(typography$
|
|
251
|
-
h1: "font: ".concat(typography$
|
|
252
|
-
h2: "font: ".concat(typography$
|
|
253
|
-
h3: "font: ".concat(typography$
|
|
254
|
-
h4: "font: ".concat(typography$
|
|
255
|
-
h5: "font: ".concat(typography$
|
|
256
|
-
h6: "font: ".concat(typography$
|
|
257
|
-
subtitle: "font: ".concat(typography$
|
|
258
|
-
body: "font: ".concat(typography$
|
|
259
|
-
small: "font: ".concat(typography$
|
|
260
|
-
overline: "font: ".concat(typography$
|
|
261
|
-
caption: "font: ".concat(typography$
|
|
262
|
-
button1: "font: ".concat(typography$
|
|
263
|
-
button2: "font: ".concat(typography$
|
|
264
|
-
button3: "font: ".concat(typography$
|
|
265
|
-
label: "font: ".concat(typography$
|
|
250
|
+
display: "font: ".concat(typography$2.display, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
251
|
+
h1: "font: ".concat(typography$2.h1, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
252
|
+
h2: "font: ".concat(typography$2.h2, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
253
|
+
h3: "font: ".concat(typography$2.h3, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
254
|
+
h4: "font: ".concat(typography$2.h4, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
255
|
+
h5: "font: ".concat(typography$2.h5, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
256
|
+
h6: "font: ".concat(typography$2.h6, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
257
|
+
subtitle: "font: ".concat(typography$2.subtitle, ";"),
|
|
258
|
+
body: "font: ".concat(typography$2.body, ";"),
|
|
259
|
+
small: "font: ".concat(typography$2.small, ";"),
|
|
260
|
+
overline: "font: ".concat(typography$2.overline, ";"),
|
|
261
|
+
caption: "font: ".concat(typography$2.caption, "; text-transform: uppercase;"),
|
|
262
|
+
button1: "font: ".concat(typography$2.button1, ";"),
|
|
263
|
+
button2: "font: ".concat(typography$2.button2, ";"),
|
|
264
|
+
button3: "font: ".concat(typography$2.button3, ";"),
|
|
265
|
+
label: "font: ".concat(typography$2.label, ";")
|
|
266
266
|
};
|
|
267
267
|
return styles[variant] || styles.body;
|
|
268
268
|
};
|
|
269
269
|
var getTextColor = function getTextColor(colorVariant) {
|
|
270
270
|
var colorMap = {
|
|
271
|
-
"default": color$
|
|
272
|
-
emphasis: color$
|
|
273
|
-
subdued: color$
|
|
274
|
-
inverse: color$
|
|
275
|
-
disabled: color$
|
|
276
|
-
interactive: color$
|
|
277
|
-
error: color$
|
|
278
|
-
success: color$
|
|
279
|
-
warning: color$
|
|
271
|
+
"default": color$a.text["default"],
|
|
272
|
+
emphasis: color$a.text.emphasis,
|
|
273
|
+
subdued: color$a.text.subdued,
|
|
274
|
+
inverse: color$a.text.inverse,
|
|
275
|
+
disabled: color$a.text.disabled,
|
|
276
|
+
interactive: color$a.text.interactive,
|
|
277
|
+
error: color$a.text.error,
|
|
278
|
+
success: color$a.text.success,
|
|
279
|
+
warning: color$a.text.warning
|
|
280
280
|
};
|
|
281
281
|
return colorMap[colorVariant] || colorMap["default"];
|
|
282
282
|
};
|
|
@@ -307,7 +307,7 @@ var StyledTypography = styled.span.withConfig({
|
|
|
307
307
|
},
|
|
308
308
|
displayName: "Typography__StyledTypography",
|
|
309
309
|
componentId: "sc-17mqo4k-0"
|
|
310
|
-
})(templateObject_1$
|
|
310
|
+
})(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n"], ["\n ", "\n color: ", ";\n margin: 0;\n"
|
|
311
311
|
/**
|
|
312
312
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
313
313
|
*
|
|
@@ -369,53 +369,53 @@ var Typography = function Typography(_a) {
|
|
|
369
369
|
children: children
|
|
370
370
|
});
|
|
371
371
|
};
|
|
372
|
-
var templateObject_1$
|
|
372
|
+
var templateObject_1$K;
|
|
373
373
|
|
|
374
|
-
var semantic$
|
|
375
|
-
var color$
|
|
376
|
-
border$
|
|
377
|
-
var radius$4 = border$
|
|
374
|
+
var semantic$i = tokensJson.semantic;
|
|
375
|
+
var color$9 = semantic$i.color,
|
|
376
|
+
border$a = semantic$i.border;
|
|
377
|
+
var radius$4 = border$a.radius;
|
|
378
378
|
var _a$a = tokensJson.component.badge,
|
|
379
379
|
dot = _a$a.dot,
|
|
380
380
|
count = _a$a.count,
|
|
381
381
|
ring = _a$a.ring;
|
|
382
|
-
var scaleIn$2 = keyframes(templateObject_1$
|
|
382
|
+
var scaleIn$2 = 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"])));
|
|
383
383
|
var BadgeWrapper = styled.span.withConfig({
|
|
384
384
|
displayName: "Badge__BadgeWrapper",
|
|
385
385
|
componentId: "sc-tjz4pp-0"
|
|
386
|
-
})(templateObject_2$
|
|
386
|
+
})(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"])));
|
|
387
387
|
var BadgeIndicator = styled.span.withConfig({
|
|
388
388
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
389
389
|
return !prop.startsWith('$');
|
|
390
390
|
},
|
|
391
391
|
displayName: "Badge__BadgeIndicator",
|
|
392
392
|
componentId: "sc-tjz4pp-1"
|
|
393
|
-
})(templateObject_3$
|
|
393
|
+
})(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) {
|
|
394
394
|
return props.$isVisible ? 'flex' : 'none';
|
|
395
395
|
}, function (props) {
|
|
396
396
|
return props.$isDot ? dot.size : count.minWidth;
|
|
397
397
|
}, function (props) {
|
|
398
398
|
return props.$isDot ? dot.size : count.height;
|
|
399
399
|
}, function (props) {
|
|
400
|
-
return props.$isDot ? '0' : "0 ".concat(
|
|
401
|
-
}, radius$4.circle, count.lineHeight, ring.width, color$
|
|
400
|
+
return props.$isDot ? '0' : "0 ".concat(semantic$i.spacing.component.xs);
|
|
401
|
+
}, 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) {
|
|
402
402
|
switch (props.$variant) {
|
|
403
403
|
case 'primary':
|
|
404
|
-
return "\n background-color: ".concat(color$
|
|
404
|
+
return "\n background-color: ".concat(color$9.background.interactive, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
405
405
|
case 'error':
|
|
406
|
-
return "\n background-color: ".concat(color$
|
|
406
|
+
return "\n background-color: ".concat(color$9.background.error, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
407
407
|
case 'warning':
|
|
408
|
-
return "\n background-color: ".concat(color$
|
|
408
|
+
return "\n background-color: ".concat(color$9.background.warning, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
409
409
|
case 'success':
|
|
410
|
-
return "\n background-color: ".concat(color$
|
|
410
|
+
return "\n background-color: ".concat(color$9.background.success, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
411
411
|
default:
|
|
412
|
-
return "\n background-color: ".concat(color$
|
|
412
|
+
return "\n background-color: ".concat(color$9.background.emphasis, ";\n color: ").concat(color$9.text.inverse, ";\n ");
|
|
413
413
|
}
|
|
414
414
|
});
|
|
415
415
|
var ScreenReaderOnly$1 = styled.span.withConfig({
|
|
416
416
|
displayName: "Badge__ScreenReaderOnly",
|
|
417
417
|
componentId: "sc-tjz4pp-2"
|
|
418
|
-
})(templateObject_4$
|
|
418
|
+
})(templateObject_4$n || (templateObject_4$n = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
419
419
|
var Badge = function Badge(_a) {
|
|
420
420
|
var children = _a.children,
|
|
421
421
|
_b = _a.count,
|
|
@@ -453,7 +453,7 @@ var Badge = function Badge(_a) {
|
|
|
453
453
|
})]
|
|
454
454
|
});
|
|
455
455
|
};
|
|
456
|
-
var templateObject_1$
|
|
456
|
+
var templateObject_1$J, templateObject_2$w, templateObject_3$t, templateObject_4$n;
|
|
457
457
|
|
|
458
458
|
var StyledBox = styled.div.withConfig({
|
|
459
459
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -464,13 +464,13 @@ var StyledBox = styled.div.withConfig({
|
|
|
464
464
|
})(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"
|
|
465
465
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
466
466
|
])), function (props) {
|
|
467
|
-
return props.$display && css(templateObject_1$
|
|
467
|
+
return props.$display && css(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
468
468
|
}, function (props) {
|
|
469
|
-
return props.$flexDirection && css(templateObject_2$
|
|
469
|
+
return props.$flexDirection && css(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
470
470
|
}, function (props) {
|
|
471
|
-
return props.$justifyContent && css(templateObject_3$
|
|
471
|
+
return props.$justifyContent && css(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
472
472
|
}, function (props) {
|
|
473
|
-
return props.$alignItems && css(templateObject_4$
|
|
473
|
+
return props.$alignItems && css(templateObject_4$m || (templateObject_4$m = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
474
474
|
}, function (props) {
|
|
475
475
|
return props.$flexWrap && css(templateObject_5$h || (templateObject_5$h = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
476
476
|
}, function (props) {
|
|
@@ -488,7 +488,7 @@ var StyledBox = styled.div.withConfig({
|
|
|
488
488
|
}, function (props) {
|
|
489
489
|
return props.$mx && css(templateObject_12$4 || (templateObject_12$4 = __makeTemplateObject(["\n margin-left: ", ";\n margin-right: ", ";\n "], ["\n margin-left: ", ";\n margin-right: ", ";\n "])), tokensJson.semantic.spacing.layout[props.$mx], tokensJson.semantic.spacing.layout[props.$mx]);
|
|
490
490
|
}, function (props) {
|
|
491
|
-
return props.$my && css(templateObject_13$
|
|
491
|
+
return props.$my && css(templateObject_13$4 || (templateObject_13$4 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n "])), tokensJson.semantic.spacing.layout[props.$my], tokensJson.semantic.spacing.layout[props.$my]);
|
|
492
492
|
}, function (props) {
|
|
493
493
|
return props.$p && css(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject(["padding: ", ";"], ["padding: ", ";"])), tokensJson.semantic.spacing.layout[props.$p]);
|
|
494
494
|
}, function (props) {
|
|
@@ -688,7 +688,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
688
688
|
}));
|
|
689
689
|
};
|
|
690
690
|
var Box = BoxTransform;
|
|
691
|
-
var templateObject_1$
|
|
691
|
+
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;
|
|
692
692
|
|
|
693
693
|
var IconStyled = styled.span.withConfig({
|
|
694
694
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -696,7 +696,7 @@ var IconStyled = styled.span.withConfig({
|
|
|
696
696
|
},
|
|
697
697
|
displayName: "Icon__IconStyled",
|
|
698
698
|
componentId: "sc-1105czq-0"
|
|
699
|
-
})(templateObject_1$
|
|
699
|
+
})(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) {
|
|
700
700
|
var $size = _a.$size;
|
|
701
701
|
return tokensJson.semantic.size.icon[$size];
|
|
702
702
|
}, function (_a) {
|
|
@@ -735,7 +735,11 @@ var Icon = function Icon(_a) {
|
|
|
735
735
|
size = _b === void 0 ? 'lg' : _b,
|
|
736
736
|
_c = _a.iconColor,
|
|
737
737
|
iconColor = _c === void 0 ? 'default' : _c,
|
|
738
|
+
ariaLabel = _a["aria-label"],
|
|
739
|
+
title = _a.title,
|
|
738
740
|
dataTestId = _a["data-testid"];
|
|
741
|
+
// Decorative unless it's given a name. A blank name is no name, so the icon stays hidden
|
|
742
|
+
var label = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) || (title === null || title === void 0 ? void 0 : title.trim()) || undefined;
|
|
739
743
|
// Get the icon data from the JSON file
|
|
740
744
|
var iconData = iconsJson[name];
|
|
741
745
|
if (!iconData) {
|
|
@@ -750,24 +754,33 @@ var Icon = function Icon(_a) {
|
|
|
750
754
|
"$size": size,
|
|
751
755
|
"$iconColor": iconColor,
|
|
752
756
|
"data-testid": dataTestId,
|
|
753
|
-
children:
|
|
757
|
+
children: jsxs("svg", __assign({
|
|
754
758
|
viewBox: "0 0 24 24",
|
|
755
759
|
fill: "currentColor",
|
|
756
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
761
|
+
}, label ? {
|
|
762
|
+
role: 'img',
|
|
763
|
+
'aria-label': label
|
|
764
|
+
} : {
|
|
765
|
+
'aria-hidden': true,
|
|
766
|
+
focusable: false
|
|
767
|
+
}, {
|
|
768
|
+
children: [(title === null || title === void 0 ? void 0 : title.trim()) && jsx("title", {
|
|
769
|
+
children: title
|
|
770
|
+
}), jsx("path", {
|
|
760
771
|
d: iconData.path
|
|
761
|
-
})
|
|
762
|
-
})
|
|
772
|
+
})]
|
|
773
|
+
}))
|
|
763
774
|
});
|
|
764
775
|
};
|
|
765
|
-
var templateObject_1$
|
|
776
|
+
var templateObject_1$H;
|
|
766
777
|
|
|
767
778
|
var button$1 = tokensJson.component.button,
|
|
768
|
-
semantic$
|
|
779
|
+
semantic$h = tokensJson.semantic;
|
|
780
|
+
// Padding comes from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
781
|
+
var spacing$a = semantic$h.spacing.component;
|
|
769
782
|
// Base styles shared between button and link
|
|
770
|
-
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokensJson.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$
|
|
783
|
+
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(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");
|
|
771
784
|
// Dynamic variant styles using component tokens
|
|
772
785
|
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
773
786
|
var $variant = _a.$variant;
|
|
@@ -796,6 +809,15 @@ var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
|
796
809
|
disabledBg: button$1.variants.naked.disabled.backgroundColor,
|
|
797
810
|
disabledText: button$1.variants.naked.disabled.textColor
|
|
798
811
|
},
|
|
812
|
+
accent: {
|
|
813
|
+
bg: button$1.variants.accent.backgroundColor,
|
|
814
|
+
text: button$1.variants.accent.textColor,
|
|
815
|
+
hoverBg: button$1.variants.accent.hover.backgroundColor,
|
|
816
|
+
activeBg: button$1.variants.accent.active.backgroundColor,
|
|
817
|
+
disabledBg: button$1.variants.accent.disabled.backgroundColor,
|
|
818
|
+
disabledText: button$1.variants.accent.disabled.textColor
|
|
819
|
+
},
|
|
820
|
+
// Deprecated alias for accent; removed in 3.0
|
|
799
821
|
emphasis: {
|
|
800
822
|
bg: button$1.variants.emphasis.backgroundColor,
|
|
801
823
|
text: button$1.variants.emphasis.textColor,
|
|
@@ -821,13 +843,13 @@ var getSizeStyles$1 = function getSizeStyles(_a) {
|
|
|
821
843
|
var $size = _a.$size;
|
|
822
844
|
switch ($size) {
|
|
823
845
|
case 'small':
|
|
824
|
-
return "\n font: ".concat(button$1.sizes.small.font, ";\n padding: ").concat(
|
|
846
|
+
return "\n font: ".concat(button$1.sizes.small.font, ";\n padding: ").concat(spacing$a.sm, " ").concat(spacing$a.md, ";\n ");
|
|
825
847
|
case 'medium':
|
|
826
|
-
return "\n font: ".concat(button$1.sizes.medium.font, ";\n padding: ").concat(
|
|
848
|
+
return "\n font: ".concat(button$1.sizes.medium.font, ";\n padding: ").concat(spacing$a.sm, " ").concat(spacing$a.lg, ";\n ");
|
|
827
849
|
case 'large':
|
|
828
|
-
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(
|
|
850
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(spacing$a.md, " ").concat(spacing$a.lg, ";\n ");
|
|
829
851
|
default:
|
|
830
|
-
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(
|
|
852
|
+
return "\n font: ".concat(button$1.sizes.large.font, ";\n padding: ").concat(spacing$a.md, " ").concat(spacing$a.lg, ";\n ");
|
|
831
853
|
}
|
|
832
854
|
};
|
|
833
855
|
var StyledButton = styled.button.withConfig({
|
|
@@ -836,14 +858,14 @@ var StyledButton = styled.button.withConfig({
|
|
|
836
858
|
},
|
|
837
859
|
displayName: "Button__StyledButton",
|
|
838
860
|
componentId: "sc-1eiuum9-0"
|
|
839
|
-
})(templateObject_1$
|
|
861
|
+
})(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);
|
|
840
862
|
var StyledLink = styled.a.withConfig({
|
|
841
863
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
842
864
|
return !prop.startsWith('$');
|
|
843
865
|
},
|
|
844
866
|
displayName: "Button__StyledLink",
|
|
845
867
|
componentId: "sc-1eiuum9-1"
|
|
846
|
-
})(templateObject_2$
|
|
868
|
+
})(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
847
869
|
// Helper function to get icon size based on button size
|
|
848
870
|
])), baseButtonStyles, button$1.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
849
871
|
// Helper function to get icon size based on button size
|
|
@@ -946,49 +968,46 @@ var Button = function Button(_a) {
|
|
|
946
968
|
children: renderButtonContent(children, iconName, size)
|
|
947
969
|
}));
|
|
948
970
|
};
|
|
949
|
-
var templateObject_1$
|
|
971
|
+
var templateObject_1$G, templateObject_2$u;
|
|
950
972
|
|
|
951
|
-
var semantic$
|
|
952
|
-
var color$
|
|
953
|
-
border$
|
|
954
|
-
spacing$
|
|
973
|
+
var semantic$g = tokensJson.semantic;
|
|
974
|
+
var color$8 = semantic$g.color,
|
|
975
|
+
border$9 = semantic$g.border,
|
|
976
|
+
spacing$9 = semantic$g.spacing;
|
|
955
977
|
var label$2 = tokensJson.component.badge.label;
|
|
956
|
-
var category = color$
|
|
957
|
-
var radius$3 = border$
|
|
958
|
-
var layout$4 = spacing$
|
|
959
|
-
var
|
|
978
|
+
var category = color$8.category;
|
|
979
|
+
var radius$3 = border$9.radius;
|
|
980
|
+
var layout$4 = spacing$9.layout;
|
|
981
|
+
var labelHeight$1 = semantic$g.size.label;
|
|
982
|
+
// Text on white or the -subtle fill (outlined and minimal), at least 4.5:1 (#115)
|
|
983
|
+
var categoryText = {
|
|
984
|
+
blue: category['blue-text'],
|
|
985
|
+
purple: category['purple-text'],
|
|
986
|
+
pink: category['pink-text'],
|
|
987
|
+
yellow: category['yellow-text'],
|
|
988
|
+
green: category['green-text'],
|
|
989
|
+
red: category['red-text'],
|
|
990
|
+
orange: category['orange-text'],
|
|
991
|
+
gray: category['gray-text']
|
|
992
|
+
};
|
|
993
|
+
var StyledCategoryLabel = styled.span.withConfig({
|
|
960
994
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
961
995
|
return !prop.startsWith('$');
|
|
962
996
|
},
|
|
963
|
-
displayName: "
|
|
964
|
-
componentId: "sc-
|
|
965
|
-
})(templateObject_1$
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
* A static label for categorizing content with support for 8 color options,
|
|
970
|
-
* 3 visual variants, and optional icons. Perfect for categorizing
|
|
971
|
-
* financial transactions or content types.
|
|
972
|
-
*
|
|
973
|
-
* @example
|
|
974
|
-
* ```tsx
|
|
975
|
-
* <CategoryBadge color="orange" icon="restaurant">
|
|
976
|
-
* Food & Dining
|
|
977
|
-
* </CategoryBadge>
|
|
978
|
-
*
|
|
979
|
-
* <CategoryBadge color="blue" variant="outlined" size="small">
|
|
980
|
-
* Travel
|
|
981
|
-
* </CategoryBadge>
|
|
982
|
-
* ```
|
|
983
|
-
*/])), radius$3.circle, semantic$d.border.width.thin, function (_a) {
|
|
997
|
+
displayName: "CategoryLabel__StyledCategoryLabel",
|
|
998
|
+
componentId: "sc-1jx7bjo-0"
|
|
999
|
+
})(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"
|
|
1000
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
1001
|
+
// display: contents keeps the root's flex layout and gap.
|
|
1002
|
+
])), radius$3.circle, semantic$g.border.width.thin, function (_a) {
|
|
984
1003
|
var $size = _a.$size;
|
|
985
|
-
return $size
|
|
1004
|
+
return labelHeight$1[$size];
|
|
986
1005
|
}, function (_a) {
|
|
987
1006
|
var $size = _a.$size;
|
|
988
|
-
return $size === '
|
|
1007
|
+
return $size === 'medium' ? "".concat(layout$4.xs, " ").concat(layout$4.sm) : "".concat(layout$4.sm, " ").concat(layout$4.md);
|
|
989
1008
|
}, function (_a) {
|
|
990
1009
|
var $size = _a.$size;
|
|
991
|
-
return $size === '
|
|
1010
|
+
return $size === 'medium' ? label$2.typography.small : label$2.typography.medium;
|
|
992
1011
|
}, label$2.fontWeight, layout$4.xs, function (_a) {
|
|
993
1012
|
var $color = _a.$color,
|
|
994
1013
|
$variant = _a.$variant;
|
|
@@ -1004,9 +1023,9 @@ var StyledCategoryBadge = styled.span.withConfig({
|
|
|
1004
1023
|
var $color = _a.$color,
|
|
1005
1024
|
$variant = _a.$variant;
|
|
1006
1025
|
if ($variant === 'filled') {
|
|
1007
|
-
return color$
|
|
1026
|
+
return color$8.text.inverse;
|
|
1008
1027
|
}
|
|
1009
|
-
return
|
|
1028
|
+
return categoryText[$color];
|
|
1010
1029
|
}, function (_a) {
|
|
1011
1030
|
var $color = _a.$color,
|
|
1012
1031
|
$variant = _a.$variant;
|
|
@@ -1015,79 +1034,138 @@ var StyledCategoryBadge = styled.span.withConfig({
|
|
|
1015
1034
|
}
|
|
1016
1035
|
return 'transparent';
|
|
1017
1036
|
});
|
|
1037
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
1038
|
+
// display: contents keeps the root's flex layout and gap.
|
|
1039
|
+
var VisibleContent$1 = styled.span.withConfig({
|
|
1040
|
+
displayName: "CategoryLabel__VisibleContent",
|
|
1041
|
+
componentId: "sc-1jx7bjo-1"
|
|
1042
|
+
})(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
|
|
1043
|
+
var HiddenLabel = styled.span.withConfig({
|
|
1044
|
+
displayName: "CategoryLabel__HiddenLabel",
|
|
1045
|
+
componentId: "sc-1jx7bjo-2"
|
|
1046
|
+
})(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
1018
1047
|
/**
|
|
1019
|
-
*
|
|
1048
|
+
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1020
1049
|
*
|
|
1021
|
-
* A static label
|
|
1022
|
-
*
|
|
1023
|
-
* financial transactions or content types.
|
|
1050
|
+
* A static, chip-like label with 8 category colours, 3 visual variants and an optional icon.
|
|
1051
|
+
* Category colours carry no status meaning; for status use StatusLabel.
|
|
1024
1052
|
*
|
|
1025
1053
|
* @example
|
|
1026
1054
|
* ```tsx
|
|
1027
|
-
* <
|
|
1028
|
-
*
|
|
1029
|
-
* </
|
|
1055
|
+
* <CategoryLabel color="orange" icon="creditCard">
|
|
1056
|
+
* Shopping
|
|
1057
|
+
* </CategoryLabel>
|
|
1030
1058
|
*
|
|
1031
|
-
* <
|
|
1059
|
+
* <CategoryLabel color="blue" variant="outlined" size="medium">
|
|
1032
1060
|
* Travel
|
|
1033
|
-
* </
|
|
1061
|
+
* </CategoryLabel>
|
|
1062
|
+
* ```
|
|
1063
|
+
*/])), visuallyHidden);
|
|
1064
|
+
/**
|
|
1065
|
+
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1066
|
+
*
|
|
1067
|
+
* A static, chip-like label with 8 category colours, 3 visual variants and an optional icon.
|
|
1068
|
+
* Category colours carry no status meaning; for status use StatusLabel.
|
|
1069
|
+
*
|
|
1070
|
+
* @example
|
|
1071
|
+
* ```tsx
|
|
1072
|
+
* <CategoryLabel color="orange" icon="creditCard">
|
|
1073
|
+
* Shopping
|
|
1074
|
+
* </CategoryLabel>
|
|
1075
|
+
*
|
|
1076
|
+
* <CategoryLabel color="blue" variant="outlined" size="medium">
|
|
1077
|
+
* Travel
|
|
1078
|
+
* </CategoryLabel>
|
|
1034
1079
|
* ```
|
|
1035
1080
|
*/
|
|
1036
|
-
var
|
|
1081
|
+
var CategoryLabel = function CategoryLabel(_a) {
|
|
1037
1082
|
var children = _a.children,
|
|
1038
1083
|
_b = _a.color,
|
|
1039
1084
|
color = _b === void 0 ? 'blue' : _b,
|
|
1040
1085
|
_c = _a.variant,
|
|
1041
1086
|
variant = _c === void 0 ? 'filled' : _c,
|
|
1042
1087
|
_d = _a.size,
|
|
1043
|
-
size = _d === void 0 ? '
|
|
1088
|
+
size = _d === void 0 ? 'large' : _d,
|
|
1044
1089
|
icon = _a.icon,
|
|
1045
1090
|
dataTestId = _a["data-testid"],
|
|
1046
1091
|
ariaLabel = _a["aria-label"];
|
|
1047
|
-
var iconSize = size === '
|
|
1048
|
-
|
|
1092
|
+
var iconSize = size === 'medium' ? 'xs' : 'sm';
|
|
1093
|
+
// A blank aria-label is no label at all, so it falls back like a missing one
|
|
1094
|
+
var accessibleLabel = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
1095
|
+
return jsxs(StyledCategoryLabel, {
|
|
1049
1096
|
"$color": color,
|
|
1050
1097
|
"$variant": variant,
|
|
1051
1098
|
"$size": size,
|
|
1052
|
-
"aria-label": ariaLabel,
|
|
1053
1099
|
"data-testid": dataTestId,
|
|
1054
|
-
children: [
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1100
|
+
children: [jsxs(VisibleContent$1, {
|
|
1101
|
+
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
1102
|
+
children: [icon && jsx(Icon, {
|
|
1103
|
+
name: icon,
|
|
1104
|
+
size: iconSize,
|
|
1105
|
+
iconColor: variant === 'filled' ? 'inverse' : 'inherit'
|
|
1106
|
+
}), children]
|
|
1107
|
+
}), accessibleLabel && jsx(HiddenLabel, {
|
|
1108
|
+
children: accessibleLabel
|
|
1109
|
+
})]
|
|
1060
1110
|
});
|
|
1061
1111
|
};
|
|
1112
|
+
CategoryLabel.displayName = 'CategoryLabel';
|
|
1113
|
+
var templateObject_1$F, templateObject_2$t, templateObject_3$r;
|
|
1114
|
+
|
|
1115
|
+
// CategoryBadge sizes on the decision 0018 scale
|
|
1116
|
+
var toLabelSize = {
|
|
1117
|
+
small: 'medium',
|
|
1118
|
+
medium: 'large'
|
|
1119
|
+
};
|
|
1120
|
+
/**
|
|
1121
|
+
* CategoryBadge displays a category label.
|
|
1122
|
+
*
|
|
1123
|
+
* @deprecated Renamed to `CategoryLabel` (same `color` and `variant`). Map `size="small"` to
|
|
1124
|
+
* `"medium"`, and `size="medium"` (or no size) to `"large"`, CategoryLabel's default.
|
|
1125
|
+
* CategoryBadge is removed in 3.0 (decision 0018).
|
|
1126
|
+
*/
|
|
1127
|
+
var CategoryBadge = function CategoryBadge(_a) {
|
|
1128
|
+
var _b = _a.size,
|
|
1129
|
+
size = _b === void 0 ? 'medium' : _b,
|
|
1130
|
+
props = __rest(_a, ["size"]);
|
|
1131
|
+
return jsx(CategoryLabel, __assign({}, props, {
|
|
1132
|
+
size: toLabelSize[size]
|
|
1133
|
+
}));
|
|
1134
|
+
};
|
|
1062
1135
|
CategoryBadge.displayName = 'CategoryBadge';
|
|
1063
|
-
var templateObject_1$E;
|
|
1064
1136
|
|
|
1065
|
-
var chip = tokensJson.component.chip;
|
|
1066
|
-
// Selected-chip hover and active colours have no token yet: they wait on #21 (selected states).
|
|
1067
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
1068
|
-
var SELECTED_HOVER = '#CAE8FF';
|
|
1069
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
1070
|
-
var SELECTED_ACTIVE = '#B5DEFF';
|
|
1137
|
+
var chip$1 = tokensJson.component.chip;
|
|
1071
1138
|
// Helper function to get variant styles matching Button's approach
|
|
1072
1139
|
var getVariantStyles = function getVariantStyles(_a) {
|
|
1073
1140
|
var $variant = _a.$variant,
|
|
1074
1141
|
$selected = _a.$selected,
|
|
1075
1142
|
$clickable = _a.$clickable,
|
|
1076
1143
|
$disabled = _a.$disabled;
|
|
1077
|
-
//
|
|
1144
|
+
// Selected filter and input chips use the light-blue selected treatment (decision 0016).
|
|
1145
|
+
// The text darkens with the fill so every state stays at least 4.5:1.
|
|
1078
1146
|
if ($selected) {
|
|
1079
|
-
|
|
1147
|
+
// A selected disabled chip looks like any disabled chip; the checkmark keeps the
|
|
1148
|
+
// selected state visible (#110)
|
|
1149
|
+
if ($disabled) {
|
|
1150
|
+
var disabled = chip$1.variants.subtle.disabled;
|
|
1151
|
+
return "\n background-color: ".concat(disabled.backgroundColor, ";\n color: ").concat(disabled.textColor, ";\n ");
|
|
1152
|
+
}
|
|
1153
|
+
var _b = tokensJson.semantic.color,
|
|
1154
|
+
background = _b.background,
|
|
1155
|
+
text = _b.text;
|
|
1156
|
+
var interactiveStates = $clickable;
|
|
1157
|
+
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 ");
|
|
1080
1158
|
}
|
|
1081
1159
|
switch ($variant) {
|
|
1082
1160
|
case 'emphasis':
|
|
1083
|
-
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 ");
|
|
1161
|
+
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 ");
|
|
1084
1162
|
case 'subtle':
|
|
1085
|
-
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 ");
|
|
1163
|
+
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 ");
|
|
1086
1164
|
case 'interactive':
|
|
1087
|
-
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 ");
|
|
1165
|
+
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 ");
|
|
1088
1166
|
case 'default':
|
|
1089
1167
|
default:
|
|
1090
|
-
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 ");
|
|
1168
|
+
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 ");
|
|
1091
1169
|
}
|
|
1092
1170
|
};
|
|
1093
1171
|
// Helper function to get size styles matching Button's approach
|
|
@@ -1095,13 +1173,15 @@ var getSizeStyles = function getSizeStyles(_a) {
|
|
|
1095
1173
|
var $size = _a.$size;
|
|
1096
1174
|
switch ($size) {
|
|
1097
1175
|
case 'small':
|
|
1098
|
-
return "\n font: ".concat(chip.sizes.small.font, ";\n padding: ").concat(chip.sizes.small.padding, ";\n ");
|
|
1176
|
+
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 ");
|
|
1099
1177
|
case 'medium':
|
|
1100
1178
|
default:
|
|
1101
|
-
return "\n font: ".concat(chip.sizes.medium.font, ";\n padding: ").concat(chip.sizes.medium.padding, ";\n ");
|
|
1179
|
+
return "\n font: ".concat(chip$1.sizes.medium.font, ";\n padding: ").concat(chip$1.sizes.medium.padding, ";\n ");
|
|
1102
1180
|
}
|
|
1103
1181
|
};
|
|
1104
1182
|
|
|
1183
|
+
var chip = tokensJson.component.chip,
|
|
1184
|
+
semantic$f = tokensJson.semantic;
|
|
1105
1185
|
// Base styled component using direct prop interpolation like Button
|
|
1106
1186
|
var StyledChip = styled.span.withConfig({
|
|
1107
1187
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1109,16 +1189,16 @@ var StyledChip = styled.span.withConfig({
|
|
|
1109
1189
|
},
|
|
1110
1190
|
displayName: "ChipBase__StyledChip",
|
|
1111
1191
|
componentId: "sc-moa6zc-0"
|
|
1112
|
-
})(templateObject_1$
|
|
1192
|
+
})(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"
|
|
1113
1193
|
// Icon container for selected indicator or leading icons
|
|
1114
|
-
])), chip["default"].borderRadius,
|
|
1194
|
+
])), chip["default"].borderRadius, semantic$f.motion.hover, function (props) {
|
|
1115
1195
|
return props.$disabled ? 'not-allowed' : props.$clickable ? 'pointer' : 'default';
|
|
1116
|
-
}, getVariantStyles, getSizeStyles, chip.focus.outline,
|
|
1196
|
+
}, getVariantStyles, getSizeStyles, chip.focus.outline, semantic$f.border.focusOffset);
|
|
1117
1197
|
// Icon container for selected indicator or leading icons
|
|
1118
1198
|
var IconContainer = styled.span.withConfig({
|
|
1119
1199
|
displayName: "ChipBase__IconContainer",
|
|
1120
1200
|
componentId: "sc-moa6zc-1"
|
|
1121
|
-
})(templateObject_2$
|
|
1201
|
+
})(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"
|
|
1122
1202
|
// Close button for dismissible chips
|
|
1123
1203
|
])), tokensJson.semantic.spacing.layout.xs);
|
|
1124
1204
|
// Close button for dismissible chips
|
|
@@ -1128,24 +1208,21 @@ var CloseButton = styled.button.withConfig({
|
|
|
1128
1208
|
},
|
|
1129
1209
|
displayName: "ChipBase__CloseButton",
|
|
1130
1210
|
componentId: "sc-moa6zc-2"
|
|
1131
|
-
})(templateObject_3$
|
|
1211
|
+
})(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"])), tokensJson.semantic.spacing.layout.sm, chip.closeButton.size, chip.closeButton.size, tokensJson.semantic.spacing.layout.none, tokensJson.semantic.border.radius.xs, function (props) {
|
|
1132
1212
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1133
|
-
},
|
|
1134
|
-
var templateObject_1$
|
|
1213
|
+
}, semantic$f.motion.hover, tokensJson.semantic.color.background['hover-overlay'], tokensJson.semantic.color.background['active-overlay'], tokensJson.semantic.color.text.disabled, chip.focus.outline, semantic$f.border.focusOffset, chip["default"].borderRadius);
|
|
1214
|
+
var templateObject_1$E, templateObject_2$s, templateObject_3$q;
|
|
1135
1215
|
|
|
1136
1216
|
/**
|
|
1137
|
-
* Chip -
|
|
1217
|
+
* Chip - a static, non-interactive label for tags, categories and metadata.
|
|
1138
1218
|
*
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1141
|
-
* -
|
|
1142
|
-
* - BooleanChip:
|
|
1219
|
+
* Chips are classified by job (decision 0016):
|
|
1220
|
+
* - Chip: a static label (`default` variant only)
|
|
1221
|
+
* - InputChip: a removable value, such as an applied filter (formerly `FilterChip`)
|
|
1222
|
+
* - BooleanChip: toggles a filter on and off (becomes `FilterChip` in 3.0)
|
|
1143
1223
|
*
|
|
1144
|
-
*
|
|
1145
|
-
*
|
|
1146
|
-
* - emphasis: High-contrast dark background
|
|
1147
|
-
* - subtle: Light background for secondary info
|
|
1148
|
-
* - interactive: Blue background with hover states
|
|
1224
|
+
* The `emphasis`, `subtle`, `interactive`, `light` and `dark` variants and `onClick` are
|
|
1225
|
+
* deprecated and will be removed in 3.0.
|
|
1149
1226
|
*/
|
|
1150
1227
|
var Chip = function Chip(_a) {
|
|
1151
1228
|
var children = _a.children,
|
|
@@ -1207,22 +1284,22 @@ var LegacyChip = function LegacyChip(_a) {
|
|
|
1207
1284
|
};
|
|
1208
1285
|
|
|
1209
1286
|
/**
|
|
1210
|
-
*
|
|
1287
|
+
* InputChip - A removable value, such as an applied filter, with an optional selected state
|
|
1211
1288
|
*
|
|
1212
|
-
* Use this component to show
|
|
1213
|
-
* When selected, displays a checkmark
|
|
1289
|
+
* Use this component to show values the user has entered or applied, such as filters.
|
|
1290
|
+
* When selected, displays a checkmark on the light-blue selected treatment (decision 0016).
|
|
1291
|
+
* A selected disabled chip uses the disabled colours and keeps its checkmark.
|
|
1214
1292
|
* Optionally dismissible when onDismiss is provided.
|
|
1215
1293
|
*
|
|
1216
1294
|
* Features:
|
|
1217
1295
|
* - Shows checkmark icon when selected
|
|
1218
|
-
* - Light blue
|
|
1296
|
+
* - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
|
|
1219
1297
|
* - Optional close (×) button when onDismiss is provided
|
|
1220
1298
|
* - Keyboard dismissal with Delete or Backspace keys (when dismissible)
|
|
1221
1299
|
* - Non-clickable body (only close button is interactive when present)
|
|
1222
|
-
* - Uses subtle/interactive background styling based on selected state
|
|
1223
1300
|
* - Announces as "status" to screen readers
|
|
1224
1301
|
*/
|
|
1225
|
-
var
|
|
1302
|
+
var InputChip = function InputChip(_a) {
|
|
1226
1303
|
var children = _a.children,
|
|
1227
1304
|
_b = _a.selected,
|
|
1228
1305
|
selected = _b === void 0 ? false : _b,
|
|
@@ -1275,7 +1352,8 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1275
1352
|
"aria-hidden": "true",
|
|
1276
1353
|
children: jsx(Icon, {
|
|
1277
1354
|
name: "check",
|
|
1278
|
-
size: "sm"
|
|
1355
|
+
size: "sm",
|
|
1356
|
+
iconColor: "inherit"
|
|
1279
1357
|
})
|
|
1280
1358
|
}), children, isDismissible && jsx(CloseButton, {
|
|
1281
1359
|
type: "button",
|
|
@@ -1288,12 +1366,22 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1288
1366
|
"data-testid": dataTestId ? "".concat(dataTestId, "-close") : undefined,
|
|
1289
1367
|
children: jsx(Icon, {
|
|
1290
1368
|
name: "close",
|
|
1291
|
-
size: "sm"
|
|
1369
|
+
size: "sm",
|
|
1370
|
+
iconColor: "inherit"
|
|
1292
1371
|
})
|
|
1293
1372
|
})]
|
|
1294
1373
|
}));
|
|
1295
1374
|
};
|
|
1296
1375
|
|
|
1376
|
+
/**
|
|
1377
|
+
* FilterChip - a removable chip with an optional selected state.
|
|
1378
|
+
*
|
|
1379
|
+
* @deprecated Renamed to `InputChip`; in 3.0 `FilterChip` becomes the toggle chip (today's
|
|
1380
|
+
* `BooleanChip`). Replace `FilterChip` with `InputChip` first, then `BooleanChip` with
|
|
1381
|
+
* `FilterChip` when you upgrade to 3.0 (decision 0016).
|
|
1382
|
+
*/
|
|
1383
|
+
var FilterChip = InputChip;
|
|
1384
|
+
|
|
1297
1385
|
/**
|
|
1298
1386
|
* BooleanChip - Toggleable chip for quick filter controls
|
|
1299
1387
|
*
|
|
@@ -1306,7 +1394,11 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1306
1394
|
* - Entire chip is clickable to toggle
|
|
1307
1395
|
* - Keyboard activation with Space or Enter
|
|
1308
1396
|
* - Uses checkbox role with aria-checked
|
|
1309
|
-
* -
|
|
1397
|
+
* - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
|
|
1398
|
+
*
|
|
1399
|
+
* @deprecated Becomes `FilterChip` in 3.0, with the same props. Keep using `BooleanChip`
|
|
1400
|
+
* until you upgrade; in 3.0, replace `FilterChip` with `InputChip` first, then
|
|
1401
|
+
* `BooleanChip` with `FilterChip` (decision 0016).
|
|
1310
1402
|
*/
|
|
1311
1403
|
var BooleanChip = function BooleanChip(_a) {
|
|
1312
1404
|
var children = _a.children,
|
|
@@ -1352,17 +1444,18 @@ var BooleanChip = function BooleanChip(_a) {
|
|
|
1352
1444
|
"aria-hidden": "true",
|
|
1353
1445
|
children: jsx(Icon, {
|
|
1354
1446
|
name: "check",
|
|
1355
|
-
size: "sm"
|
|
1447
|
+
size: "sm",
|
|
1448
|
+
iconColor: "inherit"
|
|
1356
1449
|
})
|
|
1357
1450
|
}), children]
|
|
1358
1451
|
}));
|
|
1359
1452
|
};
|
|
1360
1453
|
|
|
1361
|
-
var spacing$
|
|
1454
|
+
var spacing$8 = tokensJson.semantic.spacing;
|
|
1362
1455
|
var StyledContainer$2 = styled.div.withConfig({
|
|
1363
1456
|
displayName: "Container__StyledContainer",
|
|
1364
1457
|
componentId: "sc-17dbj6n-0"
|
|
1365
|
-
})(templateObject_1$
|
|
1458
|
+
})(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']);
|
|
1366
1459
|
var Container$1 = function Container(_a) {
|
|
1367
1460
|
var children = _a.children,
|
|
1368
1461
|
props = __rest(_a, ["children"]);
|
|
@@ -1370,24 +1463,24 @@ var Container$1 = function Container(_a) {
|
|
|
1370
1463
|
children: children
|
|
1371
1464
|
}));
|
|
1372
1465
|
};
|
|
1373
|
-
var templateObject_1$
|
|
1466
|
+
var templateObject_1$D;
|
|
1374
1467
|
|
|
1375
1468
|
var PictureWrapper = styled.div.withConfig({
|
|
1376
1469
|
displayName: "Picture__PictureWrapper",
|
|
1377
1470
|
componentId: "sc-11d9tei-0"
|
|
1378
|
-
})(templateObject_1$
|
|
1471
|
+
})(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);
|
|
1379
1472
|
var ImageLink = styled.a.withConfig({
|
|
1380
1473
|
displayName: "Picture__ImageLink",
|
|
1381
1474
|
componentId: "sc-11d9tei-1"
|
|
1382
|
-
})(templateObject_2$
|
|
1475
|
+
})(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"])), tokensJson.semantic.motion.duration.normal, tokensJson.semantic.motion.easing.easeInOut);
|
|
1383
1476
|
var ImageButton = styled.button.withConfig({
|
|
1384
1477
|
displayName: "Picture__ImageButton",
|
|
1385
1478
|
componentId: "sc-11d9tei-2"
|
|
1386
|
-
})(templateObject_3$
|
|
1479
|
+
})(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"])), tokensJson.semantic.motion.duration.normal, tokensJson.semantic.motion.easing.easeInOut);
|
|
1387
1480
|
var StyledImage = styled.img.withConfig({
|
|
1388
1481
|
displayName: "Picture__StyledImage",
|
|
1389
1482
|
componentId: "sc-11d9tei-3"
|
|
1390
|
-
})(templateObject_4$
|
|
1483
|
+
})(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"])), tokensJson.semantic.border.radius.sm);
|
|
1391
1484
|
var Picture = function Picture(_a) {
|
|
1392
1485
|
var title = _a.title,
|
|
1393
1486
|
src = _a.src,
|
|
@@ -1417,18 +1510,18 @@ var Picture = function Picture(_a) {
|
|
|
1417
1510
|
}) : image
|
|
1418
1511
|
});
|
|
1419
1512
|
};
|
|
1420
|
-
var templateObject_1$
|
|
1513
|
+
var templateObject_1$C, templateObject_2$r, templateObject_3$p, templateObject_4$l;
|
|
1421
1514
|
|
|
1422
1515
|
var _a$9 = tokensJson.semantic,
|
|
1423
|
-
typography = _a$9.typography,
|
|
1424
|
-
color$
|
|
1516
|
+
typography$1 = _a$9.typography,
|
|
1517
|
+
color$7 = _a$9.color;
|
|
1425
1518
|
var TimeStyled = styled.time.withConfig({
|
|
1426
1519
|
displayName: "DateFormatter__TimeStyled",
|
|
1427
1520
|
componentId: "sc-5464cc-0"
|
|
1428
|
-
})(templateObject_1$
|
|
1521
|
+
})(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
1429
1522
|
/**
|
|
1430
1523
|
* Formats a date with smart relative/absolute logic
|
|
1431
|
-
*/])), typography.label, color$
|
|
1524
|
+
*/])), typography$1.label, color$7.text.subdued);
|
|
1432
1525
|
/**
|
|
1433
1526
|
* Formats a date with smart relative/absolute logic
|
|
1434
1527
|
*/
|
|
@@ -1454,12 +1547,9 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1454
1547
|
var date = parseISO(dateString);
|
|
1455
1548
|
var displayText;
|
|
1456
1549
|
switch (mode) {
|
|
1457
|
-
case 'relative':
|
|
1458
|
-
// Always use relative labels (Today/Yesterday) or fall back to day name
|
|
1459
|
-
displayText = formatDateSmart(date, formatString);
|
|
1460
|
-
break;
|
|
1550
|
+
case 'relative': // Deprecated alias for 'smart', removed in 3.0 (#82)
|
|
1461
1551
|
case 'smart':
|
|
1462
|
-
//
|
|
1552
|
+
// Today, Yesterday or the day name for recent dates; formatted for older ones
|
|
1463
1553
|
displayText = formatDateSmart(date, formatString);
|
|
1464
1554
|
break;
|
|
1465
1555
|
case 'absolute':
|
|
@@ -1474,43 +1564,67 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1474
1564
|
children: displayText
|
|
1475
1565
|
});
|
|
1476
1566
|
};
|
|
1477
|
-
var templateObject_1$
|
|
1567
|
+
var templateObject_1$B;
|
|
1478
1568
|
|
|
1479
|
-
var
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1569
|
+
var _a$8 = tokensJson.semantic,
|
|
1570
|
+
motion$5 = _a$8.motion,
|
|
1571
|
+
border$8 = _a$8.border,
|
|
1572
|
+
spacing$7 = _a$8.spacing,
|
|
1573
|
+
_b$1 = 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
|
+
};
|
|
1483
1615
|
var IconButtonStyled = styled.button.withConfig({
|
|
1484
1616
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1485
1617
|
return !prop.startsWith('$');
|
|
1486
1618
|
},
|
|
1487
1619
|
displayName: "IconButton__IconButtonStyled",
|
|
1488
1620
|
componentId: "sc-k8b14t-0"
|
|
1489
|
-
})(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) {
|
|
1490
1622
|
var $variant = _a.$variant;
|
|
1491
|
-
|
|
1492
|
-
case 'primary':
|
|
1493
|
-
return iconButton.primary.backgroundColor;
|
|
1494
|
-
case 'secondary':
|
|
1495
|
-
return iconButton.variants.secondary.backgroundColor;
|
|
1496
|
-
case 'naked':
|
|
1497
|
-
return iconButton.variants.naked.backgroundColor;
|
|
1498
|
-
default:
|
|
1499
|
-
return iconButton.primary.backgroundColor;
|
|
1500
|
-
}
|
|
1623
|
+
return colours($variant).bg;
|
|
1501
1624
|
}, function (_a) {
|
|
1502
1625
|
var $variant = _a.$variant;
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
return button.primary.textColor;
|
|
1506
|
-
case 'secondary':
|
|
1507
|
-
return button.variants.secondary.textColor;
|
|
1508
|
-
case 'naked':
|
|
1509
|
-
return button.variants.naked.textColor;
|
|
1510
|
-
default:
|
|
1511
|
-
return button.primary.textColor;
|
|
1512
|
-
}
|
|
1513
|
-
}, 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) {
|
|
1514
1628
|
var $size = _a.$size;
|
|
1515
1629
|
return iconButton.sizes[$size].minWidth;
|
|
1516
1630
|
}, function (_a) {
|
|
@@ -1518,32 +1632,20 @@ var IconButtonStyled = styled.button.withConfig({
|
|
|
1518
1632
|
return iconButton.sizes[$size].minHeight;
|
|
1519
1633
|
}, function (_a) {
|
|
1520
1634
|
var $size = _a.$size;
|
|
1521
|
-
return
|
|
1635
|
+
return padding[$size];
|
|
1522
1636
|
}, function (_a) {
|
|
1523
1637
|
var $variant = _a.$variant;
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
return iconButton.hover.backgroundColor;
|
|
1527
|
-
case 'secondary':
|
|
1528
|
-
return iconButton.variants.secondary.hover.backgroundColor;
|
|
1529
|
-
case 'naked':
|
|
1530
|
-
return iconButton.variants.naked.hover.backgroundColor;
|
|
1531
|
-
default:
|
|
1532
|
-
return iconButton.hover.backgroundColor;
|
|
1533
|
-
}
|
|
1534
|
-
}, iconButton.active.backgroundColor, iconButton.focus.outline, iconButton.focus.outlineOffset, iconButton.disabled.backgroundColor, function (_a) {
|
|
1638
|
+
return colours($variant).hoverBg;
|
|
1639
|
+
}, function (_a) {
|
|
1535
1640
|
var $variant = _a.$variant;
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
return button.disabled.textColor;
|
|
1545
|
-
}
|
|
1546
|
-
}, 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
|
+
});
|
|
1547
1649
|
var IconButton = function IconButton(_a) {
|
|
1548
1650
|
var variant = _a.variant,
|
|
1549
1651
|
_b = _a.size,
|
|
@@ -1594,7 +1696,7 @@ var IconButton = function IconButton(_a) {
|
|
|
1594
1696
|
})
|
|
1595
1697
|
}));
|
|
1596
1698
|
};
|
|
1597
|
-
var templateObject_1$
|
|
1699
|
+
var templateObject_1$A;
|
|
1598
1700
|
|
|
1599
1701
|
var StyledWrapper = styled.span.withConfig({
|
|
1600
1702
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1602,7 +1704,7 @@ var StyledWrapper = styled.span.withConfig({
|
|
|
1602
1704
|
},
|
|
1603
1705
|
displayName: "MoneyDisplay__StyledWrapper",
|
|
1604
1706
|
componentId: "sc-1mddej3-0"
|
|
1605
|
-
})(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"
|
|
1606
1708
|
// Map size to Typography variant
|
|
1607
1709
|
])), function (_a) {
|
|
1608
1710
|
var $align = _a.$align;
|
|
@@ -1689,14 +1791,18 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
1689
1791
|
"$weight": weight,
|
|
1690
1792
|
"aria-label": ariaLabel,
|
|
1691
1793
|
"data-testid": dataTestId,
|
|
1692
|
-
children: [showPositiveIcon && !showNegativeIcon &&
|
|
1794
|
+
children: [showPositiveIcon && !showNegativeIcon &&
|
|
1795
|
+
// The amount is shown without a sign, so the icon is the sign and needs a name (#85)
|
|
1796
|
+
jsx(Icon, {
|
|
1693
1797
|
name: "addRing",
|
|
1694
1798
|
size: iconSize,
|
|
1695
|
-
iconColor: iconColor
|
|
1799
|
+
iconColor: iconColor,
|
|
1800
|
+
"aria-label": "Plus"
|
|
1696
1801
|
}), showNegativeIcon && jsx(Icon, {
|
|
1697
1802
|
name: "remove",
|
|
1698
1803
|
size: iconSize,
|
|
1699
|
-
iconColor: iconColor
|
|
1804
|
+
iconColor: iconColor,
|
|
1805
|
+
"aria-label": "Minus"
|
|
1700
1806
|
}), jsx(Typography, {
|
|
1701
1807
|
variant: typographyVariant,
|
|
1702
1808
|
color: amountColor,
|
|
@@ -1705,14 +1811,14 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
1705
1811
|
})]
|
|
1706
1812
|
});
|
|
1707
1813
|
};
|
|
1708
|
-
var templateObject_1$
|
|
1814
|
+
var templateObject_1$z;
|
|
1709
1815
|
|
|
1710
1816
|
// Destructure tokens
|
|
1711
|
-
var semantic$
|
|
1712
|
-
var _a$7 = __assign(__assign({}, semantic$
|
|
1817
|
+
var semantic$e = tokensJson.semantic;
|
|
1818
|
+
var _a$7 = __assign(__assign({}, semantic$e), {
|
|
1713
1819
|
component: tokensJson.component
|
|
1714
1820
|
}),
|
|
1715
|
-
color$
|
|
1821
|
+
color$6 = _a$7.color,
|
|
1716
1822
|
border$7 = _a$7.border,
|
|
1717
1823
|
motion$4 = _a$7.motion,
|
|
1718
1824
|
component$2 = _a$7.component;
|
|
@@ -1723,10 +1829,10 @@ var ProgressBarContainer = styled.div.withConfig({
|
|
|
1723
1829
|
},
|
|
1724
1830
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
1725
1831
|
componentId: "sc-1nco33q-0"
|
|
1726
|
-
})(templateObject_3$
|
|
1727
|
-
return props.$variant === 'horizontal' && css(templateObject_1$
|
|
1832
|
+
})(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) {
|
|
1833
|
+
return props.$variant === 'horizontal' && 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);
|
|
1728
1834
|
}, function (props) {
|
|
1729
|
-
return props.$variant === 'vertical' && css(templateObject_2$
|
|
1835
|
+
return props.$variant === 'vertical' && 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);
|
|
1730
1836
|
});
|
|
1731
1837
|
var ProgressBarFill = styled.div.withConfig({
|
|
1732
1838
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1738,17 +1844,17 @@ var ProgressBarFill = styled.div.withConfig({
|
|
|
1738
1844
|
var backgroundColor;
|
|
1739
1845
|
switch (props.$color) {
|
|
1740
1846
|
case 'success':
|
|
1741
|
-
backgroundColor = color$
|
|
1847
|
+
backgroundColor = color$6.background.success;
|
|
1742
1848
|
break;
|
|
1743
1849
|
case 'error':
|
|
1744
|
-
backgroundColor = color$
|
|
1850
|
+
backgroundColor = color$6.background.error;
|
|
1745
1851
|
break;
|
|
1746
1852
|
case 'default':
|
|
1747
1853
|
default:
|
|
1748
|
-
backgroundColor = color$
|
|
1854
|
+
backgroundColor = color$6.background.interactive;
|
|
1749
1855
|
break;
|
|
1750
1856
|
}
|
|
1751
|
-
return css(templateObject_4$
|
|
1857
|
+
return css(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
1752
1858
|
}, function (props) {
|
|
1753
1859
|
return props.$variant === 'horizontal' && css(templateObject_5$g || (templateObject_5$g = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1754
1860
|
}, function (props) {
|
|
@@ -1786,10 +1892,11 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1786
1892
|
})
|
|
1787
1893
|
});
|
|
1788
1894
|
};
|
|
1789
|
-
var templateObject_1$
|
|
1895
|
+
var templateObject_1$y, templateObject_2$q, templateObject_3$o, templateObject_4$k, templateObject_5$g, templateObject_6$c, templateObject_7$a;
|
|
1790
1896
|
|
|
1791
1897
|
// Destructure tokens for cleaner access
|
|
1792
1898
|
var separatorTokens = tokensJson.component.separator;
|
|
1899
|
+
// Margins come from the semantic separator spacing: no component spacing tokens (decision 0022)
|
|
1793
1900
|
var separatorSpacing = tokensJson.semantic.spacing.separator;
|
|
1794
1901
|
var StyledDivider = styled.div.withConfig({
|
|
1795
1902
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1797,7 +1904,7 @@ var StyledDivider = styled.div.withConfig({
|
|
|
1797
1904
|
},
|
|
1798
1905
|
displayName: "Divider__StyledDivider",
|
|
1799
1906
|
componentId: "sc-1l0c8ja-0"
|
|
1800
|
-
})(templateObject_1$
|
|
1907
|
+
})(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"
|
|
1801
1908
|
/**
|
|
1802
1909
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
1803
1910
|
*
|
|
@@ -1846,7 +1953,7 @@ var StyledDivider = styled.div.withConfig({
|
|
|
1846
1953
|
$orientation = _d === void 0 ? 'horizontal' : _d;
|
|
1847
1954
|
if ($variant === 'minimal' && $orientation === 'horizontal') {
|
|
1848
1955
|
// Minimal variant always uses its predefined spacing for horizontal
|
|
1849
|
-
return "margin: ".concat(
|
|
1956
|
+
return "margin: ".concat(separatorSpacing.md, " 0;");
|
|
1850
1957
|
}
|
|
1851
1958
|
if ($orientation === 'vertical') {
|
|
1852
1959
|
// Vertical orientation uses horizontal margins (left/right)
|
|
@@ -1865,14 +1972,14 @@ var StyledDivider = styled.div.withConfig({
|
|
|
1865
1972
|
// Horizontal orientation uses vertical margins (top/bottom)
|
|
1866
1973
|
switch ($size) {
|
|
1867
1974
|
case 'small':
|
|
1868
|
-
return "margin: ".concat(
|
|
1975
|
+
return "margin: ".concat(separatorSpacing.sm, " 0;");
|
|
1869
1976
|
case 'medium':
|
|
1870
|
-
return "margin: ".concat(
|
|
1977
|
+
return "margin: ".concat(separatorSpacing.md, " 0;");
|
|
1871
1978
|
case 'xlarge':
|
|
1872
|
-
return "margin: ".concat(
|
|
1979
|
+
return "margin: ".concat(separatorSpacing.xl, " 0;");
|
|
1873
1980
|
case 'large':
|
|
1874
1981
|
default:
|
|
1875
|
-
return "margin: ".concat(
|
|
1982
|
+
return "margin: ".concat(separatorSpacing.lg, " 0;");
|
|
1876
1983
|
}
|
|
1877
1984
|
});
|
|
1878
1985
|
/**
|
|
@@ -1910,7 +2017,7 @@ var Divider = function Divider(_a) {
|
|
|
1910
2017
|
"aria-orientation": orientation
|
|
1911
2018
|
});
|
|
1912
2019
|
};
|
|
1913
|
-
var templateObject_1$
|
|
2020
|
+
var templateObject_1$x;
|
|
1914
2021
|
|
|
1915
2022
|
var StyledStack = styled.div.withConfig({
|
|
1916
2023
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1918,7 +2025,7 @@ var StyledStack = styled.div.withConfig({
|
|
|
1918
2025
|
},
|
|
1919
2026
|
displayName: "Stack__StyledStack",
|
|
1920
2027
|
componentId: "sc-1ehkxgy-0"
|
|
1921
|
-
})(templateObject_1$
|
|
2028
|
+
})(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"
|
|
1922
2029
|
// Helper function to convert gap prop to CSS value
|
|
1923
2030
|
])));
|
|
1924
2031
|
// Helper function to convert gap prop to CSS value
|
|
@@ -1957,18 +2064,19 @@ var Stack = function Stack(_a) {
|
|
|
1957
2064
|
children: children
|
|
1958
2065
|
});
|
|
1959
2066
|
};
|
|
1960
|
-
var templateObject_1$
|
|
2067
|
+
var templateObject_1$w;
|
|
1961
2068
|
|
|
1962
2069
|
// Destructure tokens for cleaner access
|
|
1963
2070
|
var statusColors = tokensJson.semantic.color.status;
|
|
1964
|
-
var spacing$
|
|
2071
|
+
var spacing$6 = tokensJson.semantic.spacing.layout;
|
|
1965
2072
|
var radius$1 = tokensJson.semantic.border.radius;
|
|
1966
2073
|
var _a$6 = tokensJson.semantic.motion,
|
|
1967
2074
|
transition = _a$6.transition,
|
|
1968
2075
|
duration$3 = _a$6.duration,
|
|
1969
2076
|
easing$3 = _a$6.easing;
|
|
2077
|
+
var labelHeight = tokensJson.semantic.size.label;
|
|
1970
2078
|
var label$1 = tokensJson.component.badge.label;
|
|
1971
|
-
var scaleIn$1 = keyframes(templateObject_1$
|
|
2079
|
+
var scaleIn$1 = 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"])));
|
|
1972
2080
|
var getStatusConfig = function getStatusConfig(status) {
|
|
1973
2081
|
var configs = {
|
|
1974
2082
|
pending: {
|
|
@@ -2013,31 +2121,31 @@ var getStatusConfig = function getStatusConfig(status) {
|
|
|
2013
2121
|
return configs[status];
|
|
2014
2122
|
};
|
|
2015
2123
|
// Size configuration
|
|
2016
|
-
var sizeConfig = {
|
|
2124
|
+
var sizeConfig$1 = {
|
|
2017
2125
|
small: {
|
|
2018
|
-
height:
|
|
2019
|
-
padding: "".concat(spacing$
|
|
2126
|
+
height: labelHeight.small,
|
|
2127
|
+
padding: "".concat(spacing$6.xs, " ").concat(spacing$6.sm),
|
|
2020
2128
|
font: label$1.typography.small,
|
|
2021
|
-
gap: spacing$
|
|
2129
|
+
gap: spacing$6.xs,
|
|
2022
2130
|
iconSize: 'xs'
|
|
2023
2131
|
},
|
|
2024
2132
|
medium: {
|
|
2025
|
-
height:
|
|
2026
|
-
padding: "".concat(spacing$
|
|
2133
|
+
height: labelHeight.medium,
|
|
2134
|
+
padding: "".concat(spacing$6.xs, " ").concat(spacing$6.sm),
|
|
2027
2135
|
font: label$1.typography.medium,
|
|
2028
|
-
gap: spacing$
|
|
2136
|
+
gap: spacing$6.xs,
|
|
2029
2137
|
iconSize: 'sm'
|
|
2030
2138
|
}
|
|
2031
2139
|
};
|
|
2032
|
-
var
|
|
2140
|
+
var StyledStatusLabel = styled.span.withConfig({
|
|
2033
2141
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2034
2142
|
return !prop.startsWith('$');
|
|
2035
2143
|
},
|
|
2036
|
-
displayName: "
|
|
2037
|
-
componentId: "sc-
|
|
2038
|
-
})(templateObject_2$
|
|
2144
|
+
displayName: "StatusLabelBase__StyledStatusLabel",
|
|
2145
|
+
componentId: "sc-1ye9xz5-0"
|
|
2146
|
+
})(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) {
|
|
2039
2147
|
var $size = _a.$size;
|
|
2040
|
-
var size = sizeConfig[$size];
|
|
2148
|
+
var size = sizeConfig$1[$size];
|
|
2041
2149
|
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 ");
|
|
2042
2150
|
}, function (_a) {
|
|
2043
2151
|
var $status = _a.$status;
|
|
@@ -2045,56 +2153,29 @@ var StyledStatusBadge = styled.span.withConfig({
|
|
|
2045
2153
|
return "\n background-color: ".concat(config.bgColor, ";\n color: ").concat(config.color, ";\n ");
|
|
2046
2154
|
});
|
|
2047
2155
|
var ScreenReaderOnly = styled.span.withConfig({
|
|
2048
|
-
displayName: "
|
|
2049
|
-
componentId: "sc-
|
|
2050
|
-
})(templateObject_3$
|
|
2156
|
+
displayName: "StatusLabelBase__ScreenReaderOnly",
|
|
2157
|
+
componentId: "sc-1ye9xz5-1"
|
|
2158
|
+
})(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
2159
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
2160
|
+
// display: contents keeps the root's flex layout and gap.
|
|
2161
|
+
])), visuallyHidden);
|
|
2162
|
+
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
2163
|
+
// display: contents keeps the root's flex layout and gap.
|
|
2164
|
+
var VisibleContent = styled.span.withConfig({
|
|
2165
|
+
displayName: "StatusLabelBase__VisibleContent",
|
|
2166
|
+
componentId: "sc-1ye9xz5-2"
|
|
2167
|
+
})(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"
|
|
2051
2168
|
/**
|
|
2052
|
-
*
|
|
2053
|
-
*
|
|
2054
|
-
*
|
|
2055
|
-
|
|
2056
|
-
*
|
|
2057
|
-
* @example
|
|
2058
|
-
* ```tsx
|
|
2059
|
-
* <StatusBadge status="completed" />
|
|
2060
|
-
*
|
|
2061
|
-
* <StatusBadge
|
|
2062
|
-
* status="pending"
|
|
2063
|
-
* label="Awaiting approval"
|
|
2064
|
-
* size="small"
|
|
2065
|
-
* />
|
|
2066
|
-
*
|
|
2067
|
-
* <StatusBadge
|
|
2068
|
-
* status="failed"
|
|
2069
|
-
* showIcon={false}
|
|
2070
|
-
* liveRegion={true}
|
|
2071
|
-
* />
|
|
2072
|
-
* ```
|
|
2073
|
-
*/])), visuallyHidden);
|
|
2169
|
+
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2170
|
+
* from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
|
|
2171
|
+
* (decision 0018).
|
|
2172
|
+
*/])));
|
|
2074
2173
|
/**
|
|
2075
|
-
*
|
|
2076
|
-
*
|
|
2077
|
-
*
|
|
2078
|
-
* Maps to 6 common status types with semantic color tokens.
|
|
2079
|
-
*
|
|
2080
|
-
* @example
|
|
2081
|
-
* ```tsx
|
|
2082
|
-
* <StatusBadge status="completed" />
|
|
2083
|
-
*
|
|
2084
|
-
* <StatusBadge
|
|
2085
|
-
* status="pending"
|
|
2086
|
-
* label="Awaiting approval"
|
|
2087
|
-
* size="small"
|
|
2088
|
-
* />
|
|
2089
|
-
*
|
|
2090
|
-
* <StatusBadge
|
|
2091
|
-
* status="failed"
|
|
2092
|
-
* showIcon={false}
|
|
2093
|
-
* liveRegion={true}
|
|
2094
|
-
* />
|
|
2095
|
-
* ```
|
|
2174
|
+
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2175
|
+
* from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
|
|
2176
|
+
* (decision 0018).
|
|
2096
2177
|
*/
|
|
2097
|
-
var
|
|
2178
|
+
var StatusLabelBase = function StatusLabelBase(_a) {
|
|
2098
2179
|
var status = _a.status,
|
|
2099
2180
|
label = _a.label,
|
|
2100
2181
|
_b = _a.size,
|
|
@@ -2106,36 +2187,73 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
2106
2187
|
dataTestId = _a["data-testid"],
|
|
2107
2188
|
ariaLabel = _a["aria-label"];
|
|
2108
2189
|
var statusConfig = getStatusConfig(status);
|
|
2109
|
-
var sizeStyles = sizeConfig[size];
|
|
2190
|
+
var sizeStyles = sizeConfig$1[size];
|
|
2110
2191
|
var displayLabel = label || statusConfig.label;
|
|
2111
|
-
|
|
2192
|
+
// A blank aria-label is no label at all, so it falls back like a missing one
|
|
2193
|
+
var accessibleLabel = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
2194
|
+
return jsxs(StyledStatusLabel, {
|
|
2112
2195
|
"$status": status,
|
|
2113
2196
|
"$size": size,
|
|
2114
2197
|
role: "status",
|
|
2115
|
-
"aria-label":
|
|
2116
|
-
"aria-live": liveRegion ? 'polite' :
|
|
2198
|
+
"aria-label": accessibleLabel || "Status: ".concat(displayLabel),
|
|
2199
|
+
"aria-live": liveRegion ? 'polite' : 'off',
|
|
2117
2200
|
"aria-atomic": liveRegion ? 'true' : undefined,
|
|
2118
2201
|
"data-testid": dataTestId,
|
|
2119
|
-
children: [
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2202
|
+
children: [jsxs(VisibleContent, {
|
|
2203
|
+
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
2204
|
+
children: [showIcon && jsx(Icon, {
|
|
2205
|
+
name: statusConfig.icon,
|
|
2206
|
+
size: sizeStyles.iconSize,
|
|
2207
|
+
iconColor: "inherit"
|
|
2208
|
+
}), displayLabel, jsxs(ScreenReaderOnly, {
|
|
2209
|
+
children: [status, " status"]
|
|
2210
|
+
})]
|
|
2211
|
+
}), accessibleLabel && jsx(ScreenReaderOnly, {
|
|
2212
|
+
children: accessibleLabel
|
|
2126
2213
|
})]
|
|
2127
2214
|
});
|
|
2128
2215
|
};
|
|
2216
|
+
var templateObject_1$v, templateObject_2$p, templateObject_3$n, templateObject_4$j;
|
|
2217
|
+
|
|
2218
|
+
/**
|
|
2219
|
+
* StatusBadge displays a transaction or task status.
|
|
2220
|
+
*
|
|
2221
|
+
* @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
|
|
2222
|
+
* shows the icon. StatusBadge is removed in 3.0 (decision 0018).
|
|
2223
|
+
*/
|
|
2224
|
+
var StatusBadge = function StatusBadge(props) {
|
|
2225
|
+
return jsx(StatusLabelBase, __assign({}, props));
|
|
2226
|
+
};
|
|
2129
2227
|
StatusBadge.displayName = 'StatusBadge';
|
|
2130
|
-
var templateObject_1$u, templateObject_2$o, templateObject_3$m;
|
|
2131
2228
|
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2229
|
+
/**
|
|
2230
|
+
* StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
|
|
2231
|
+
*
|
|
2232
|
+
* Uses only the status colour tokens and always shows an icon with its text, so status is never
|
|
2233
|
+
* conveyed by colour alone. Not interactive. Announces changes politely to screen readers.
|
|
2234
|
+
*
|
|
2235
|
+
* @example
|
|
2236
|
+
* ```tsx
|
|
2237
|
+
* <StatusLabel status="completed" />
|
|
2238
|
+
*
|
|
2239
|
+
* <StatusLabel status="pending" label="Awaiting approval" size="small" />
|
|
2240
|
+
* ```
|
|
2241
|
+
*/
|
|
2242
|
+
// showIcon comes last so no caller (for example plain JavaScript) can hide the icon
|
|
2243
|
+
var StatusLabel = function StatusLabel(props) {
|
|
2244
|
+
return jsx(StatusLabelBase, __assign({}, props, {
|
|
2245
|
+
showIcon: true
|
|
2246
|
+
}));
|
|
2247
|
+
};
|
|
2248
|
+
StatusLabel.displayName = 'StatusLabel';
|
|
2249
|
+
|
|
2250
|
+
var semantic$d = tokensJson.semantic;
|
|
2251
|
+
var color$5 = semantic$d.color,
|
|
2252
|
+
spacing$5 = semantic$d.spacing,
|
|
2253
|
+
border$6 = semantic$d.border,
|
|
2254
|
+
size$1 = semantic$d.size;
|
|
2137
2255
|
var label = tokensJson.component.badge.label;
|
|
2138
|
-
var layout$3 = spacing$
|
|
2256
|
+
var layout$3 = spacing$5.layout;
|
|
2139
2257
|
var radius = border$6.radius;
|
|
2140
2258
|
var StyledTag = styled.span.withConfig({
|
|
2141
2259
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2143,43 +2261,49 @@ var StyledTag = styled.span.withConfig({
|
|
|
2143
2261
|
},
|
|
2144
2262
|
displayName: "Tag__StyledTag",
|
|
2145
2263
|
componentId: "sc-lzfmti-0"
|
|
2146
|
-
})(templateObject_1$
|
|
2264
|
+
})(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"
|
|
2147
2265
|
/**
|
|
2148
2266
|
* Tag component for categorizing and labeling content
|
|
2149
2267
|
*
|
|
2150
2268
|
* A static, non-interactive label used to categorize elements or objects in the UI.
|
|
2151
2269
|
* Tags help users quickly identify and understand content classification.
|
|
2152
|
-
*/])), radius.sm,
|
|
2270
|
+
*/])), radius.sm, function (_a) {
|
|
2271
|
+
var $size = _a.$size;
|
|
2272
|
+
return size$1.label[$size];
|
|
2273
|
+
}, function (_a) {
|
|
2274
|
+
var $size = _a.$size;
|
|
2275
|
+
return $size === 'small' ? "0 ".concat(layout$3.sm) : "".concat(layout$3.xs, " ").concat(layout$3.sm);
|
|
2276
|
+
}, label.typography.small, label.fontWeight, function (_a) {
|
|
2153
2277
|
var $variant = _a.$variant;
|
|
2154
2278
|
switch ($variant) {
|
|
2155
2279
|
case 'interactive':
|
|
2156
|
-
return color$
|
|
2280
|
+
return color$5.background['interactive-subtle'];
|
|
2157
2281
|
case 'success':
|
|
2158
|
-
return color$
|
|
2282
|
+
return color$5.background['success-subtle'];
|
|
2159
2283
|
case 'warning':
|
|
2160
|
-
return color$
|
|
2284
|
+
return color$5.background['warning-subtle'];
|
|
2161
2285
|
case 'error':
|
|
2162
|
-
return color$
|
|
2286
|
+
return color$5.background['error-subtle'];
|
|
2163
2287
|
case 'emphasis':
|
|
2164
|
-
return color$
|
|
2288
|
+
return color$5.background.emphasis;
|
|
2165
2289
|
default:
|
|
2166
|
-
return color$
|
|
2290
|
+
return color$5.background.surface;
|
|
2167
2291
|
}
|
|
2168
2292
|
}, function (_a) {
|
|
2169
2293
|
var $variant = _a.$variant;
|
|
2170
2294
|
switch ($variant) {
|
|
2171
2295
|
case 'interactive':
|
|
2172
|
-
return color$
|
|
2296
|
+
return color$5.text.interactive;
|
|
2173
2297
|
case 'success':
|
|
2174
|
-
return color$
|
|
2298
|
+
return color$5.text.success;
|
|
2175
2299
|
case 'warning':
|
|
2176
|
-
return color$
|
|
2300
|
+
return color$5.text.warning;
|
|
2177
2301
|
case 'error':
|
|
2178
|
-
return color$
|
|
2302
|
+
return color$5.text.error;
|
|
2179
2303
|
case 'emphasis':
|
|
2180
|
-
return color$
|
|
2304
|
+
return color$5.text.inverse;
|
|
2181
2305
|
default:
|
|
2182
|
-
return color$
|
|
2306
|
+
return color$5.text["default"];
|
|
2183
2307
|
}
|
|
2184
2308
|
}, function (_a) {
|
|
2185
2309
|
var $variant = _a.$variant,
|
|
@@ -2187,17 +2311,17 @@ var StyledTag = styled.span.withConfig({
|
|
|
2187
2311
|
if (!$border) return 'none';
|
|
2188
2312
|
switch ($variant) {
|
|
2189
2313
|
case 'interactive':
|
|
2190
|
-
return "".concat(semantic$
|
|
2314
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.interactive);
|
|
2191
2315
|
case 'success':
|
|
2192
|
-
return "".concat(semantic$
|
|
2316
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.success);
|
|
2193
2317
|
case 'warning':
|
|
2194
|
-
return "".concat(semantic$
|
|
2318
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.warning);
|
|
2195
2319
|
case 'error':
|
|
2196
|
-
return "".concat(semantic$
|
|
2320
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border.error);
|
|
2197
2321
|
case 'emphasis':
|
|
2198
|
-
return "".concat(semantic$
|
|
2322
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.background.emphasis);
|
|
2199
2323
|
default:
|
|
2200
|
-
return "".concat(semantic$
|
|
2324
|
+
return "".concat(semantic$d.border.width.thin, " solid ").concat(color$5.border["default"]);
|
|
2201
2325
|
}
|
|
2202
2326
|
});
|
|
2203
2327
|
/**
|
|
@@ -2212,11 +2336,14 @@ var Tag = function Tag(_a) {
|
|
|
2212
2336
|
variant = _b === void 0 ? 'default' : _b,
|
|
2213
2337
|
_c = _a.border,
|
|
2214
2338
|
border = _c === void 0 ? true : _c,
|
|
2339
|
+
_d = _a.size,
|
|
2340
|
+
tagSize = _d === void 0 ? 'medium' : _d,
|
|
2215
2341
|
dataTestId = _a["data-testid"],
|
|
2216
|
-
props = __rest(_a, ["children", "variant", "border", 'data-testid']);
|
|
2342
|
+
props = __rest(_a, ["children", "variant", "border", "size", 'data-testid']);
|
|
2217
2343
|
return jsx(StyledTag, __assign({
|
|
2218
2344
|
"$variant": variant,
|
|
2219
2345
|
"$border": border,
|
|
2346
|
+
"$size": tagSize,
|
|
2220
2347
|
"data-testid": dataTestId,
|
|
2221
2348
|
"data-variant": variant,
|
|
2222
2349
|
"data-border": border,
|
|
@@ -2226,24 +2353,24 @@ var Tag = function Tag(_a) {
|
|
|
2226
2353
|
children: children
|
|
2227
2354
|
}));
|
|
2228
2355
|
};
|
|
2229
|
-
var templateObject_1$
|
|
2356
|
+
var templateObject_1$u;
|
|
2230
2357
|
|
|
2231
2358
|
// Destructure tokens for cleaner access
|
|
2232
|
-
var semantic$
|
|
2233
|
-
var spacing$
|
|
2234
|
-
var layout$2 = spacing$
|
|
2359
|
+
var semantic$c = tokensJson.semantic;
|
|
2360
|
+
var spacing$4 = semantic$c.spacing;
|
|
2361
|
+
var layout$2 = spacing$4.layout;
|
|
2235
2362
|
var StyledBalanceSection = styled.div.withConfig({
|
|
2236
2363
|
displayName: "AccountCard__StyledBalanceSection",
|
|
2237
2364
|
componentId: "sc-1erp7zn-0"
|
|
2238
|
-
})(templateObject_1$
|
|
2365
|
+
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), layout$2.lg);
|
|
2239
2366
|
var StyledTrendSection = styled.div.withConfig({
|
|
2240
2367
|
displayName: "AccountCard__StyledTrendSection",
|
|
2241
2368
|
componentId: "sc-1erp7zn-1"
|
|
2242
|
-
})(templateObject_2$
|
|
2369
|
+
})(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);
|
|
2243
2370
|
styled.div.withConfig({
|
|
2244
2371
|
displayName: "AccountCard__StyledActions",
|
|
2245
2372
|
componentId: "sc-1erp7zn-2"
|
|
2246
|
-
})(templateObject_3$
|
|
2373
|
+
})(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);
|
|
2247
2374
|
var StyledStackWrapper = styled.div.withConfig({
|
|
2248
2375
|
displayName: "AccountCard__StyledStackWrapper",
|
|
2249
2376
|
componentId: "sc-1erp7zn-3"
|
|
@@ -2307,7 +2434,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2307
2434
|
bg: "subtle",
|
|
2308
2435
|
border: "default",
|
|
2309
2436
|
borderRadius: "xl",
|
|
2310
|
-
transition: "box-shadow ".concat(semantic$
|
|
2437
|
+
transition: "box-shadow ".concat(semantic$c.motion.duration.normal, " ").concat(semantic$c.motion.easing.easeOut),
|
|
2311
2438
|
cursor: isClickable ? 'pointer' : 'default',
|
|
2312
2439
|
hoverShadow: isClickable ? 'floating' : undefined,
|
|
2313
2440
|
onClick: handleClick,
|
|
@@ -2361,8 +2488,8 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2361
2488
|
}), trend && trendValue && jsx(StyledTrendSection, {
|
|
2362
2489
|
"aria-label": "Trend ".concat(trend),
|
|
2363
2490
|
role: "img",
|
|
2364
|
-
children: jsx(
|
|
2365
|
-
size: "
|
|
2491
|
+
children: jsx(CategoryLabel, {
|
|
2492
|
+
size: "medium",
|
|
2366
2493
|
icon: trendIcon,
|
|
2367
2494
|
color: trendColor,
|
|
2368
2495
|
variant: "minimal",
|
|
@@ -2402,10 +2529,16 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2402
2529
|
})
|
|
2403
2530
|
});
|
|
2404
2531
|
};
|
|
2405
|
-
var templateObject_1$
|
|
2532
|
+
var templateObject_1$t, templateObject_2$o, templateObject_3$m, templateObject_4$i, templateObject_5$f;
|
|
2406
2533
|
|
|
2407
|
-
|
|
2408
|
-
|
|
2534
|
+
/**
|
|
2535
|
+
* The spacing a List gives its items (#77). A ListItem without its own `spacing` uses it; outside
|
|
2536
|
+
* a List it's `comfortable`. Internal: not exported from the package.
|
|
2537
|
+
*/
|
|
2538
|
+
var ListSpacingContext = /*#__PURE__*/createContext('comfortable');
|
|
2539
|
+
|
|
2540
|
+
var semantic$b = tokensJson.semantic;
|
|
2541
|
+
var _a$5 = semantic$b.motion,
|
|
2409
2542
|
duration$2 = _a$5.duration,
|
|
2410
2543
|
easing$2 = _a$5.easing;
|
|
2411
2544
|
var StyledListItem = styled.li.withConfig({
|
|
@@ -2414,16 +2547,16 @@ var StyledListItem = styled.li.withConfig({
|
|
|
2414
2547
|
},
|
|
2415
2548
|
displayName: "ListItem__StyledListItem",
|
|
2416
2549
|
componentId: "sc-1wzzt21-0"
|
|
2417
|
-
})(templateObject_1$
|
|
2550
|
+
})(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) {
|
|
2418
2551
|
var $interactive = _a.$interactive;
|
|
2419
2552
|
return $interactive && 'user-select: none;';
|
|
2420
2553
|
}, function (_a) {
|
|
2421
2554
|
var $disabled = _a.$disabled;
|
|
2422
|
-
return $disabled && "\n opacity: ".concat(semantic$
|
|
2555
|
+
return $disabled && "\n opacity: ".concat(semantic$b.opacity.disabled, ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
2423
2556
|
}, function (_a) {
|
|
2424
2557
|
var $destructive = _a.$destructive,
|
|
2425
2558
|
$disabled = _a.$disabled;
|
|
2426
|
-
return $destructive && !$disabled && "\n color: ".concat(semantic$
|
|
2559
|
+
return $destructive && !$disabled && "\n color: ".concat(semantic$b.color.text.error, ";\n ");
|
|
2427
2560
|
});
|
|
2428
2561
|
var StyledItemContent = styled.div.withConfig({
|
|
2429
2562
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2431,12 +2564,12 @@ var StyledItemContent = styled.div.withConfig({
|
|
|
2431
2564
|
},
|
|
2432
2565
|
displayName: "ListItem__StyledItemContent",
|
|
2433
2566
|
componentId: "sc-1wzzt21-1"
|
|
2434
|
-
})(templateObject_2$
|
|
2567
|
+
})(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) {
|
|
2435
2568
|
var $spacing = _a.$spacing;
|
|
2436
|
-
return $spacing === 'compact' ? "".concat(semantic$
|
|
2437
|
-
}, semantic$
|
|
2569
|
+
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);
|
|
2570
|
+
}, semantic$b.border.radius.sm, function (_a) {
|
|
2438
2571
|
var $selected = _a.$selected;
|
|
2439
|
-
return $selected ? semantic$
|
|
2572
|
+
return $selected ? semantic$b.color.background['interactive-subtle'] : 'transparent';
|
|
2440
2573
|
}, duration$2.fast, easing$2.easeOut, function (_a) {
|
|
2441
2574
|
var $interactive = _a.$interactive,
|
|
2442
2575
|
$disabled = _a.$disabled;
|
|
@@ -2448,26 +2581,26 @@ var StyledItemContent = styled.div.withConfig({
|
|
|
2448
2581
|
$disabled = _a.$disabled,
|
|
2449
2582
|
$selected = _a.$selected;
|
|
2450
2583
|
return !$disabled && $interactive && "\n &:hover {\n background-color: ".concat($selected ? tokensJson.component.button.variants.secondary.backgroundColor : tokensJson.component.button.variants.secondary.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat(tokensJson.component.button.variants.naked.backgroundColor, ";\n }\n ");
|
|
2451
|
-
}, semantic$
|
|
2584
|
+
}, semantic$b.border.width.thick, semantic$b.color.border.interactive, semantic$b.border.focusOffset);
|
|
2452
2585
|
var StyledIconContainer$1 = styled.div.withConfig({
|
|
2453
2586
|
displayName: "ListItem__StyledIconContainer",
|
|
2454
2587
|
componentId: "sc-1wzzt21-2"
|
|
2455
|
-
})(templateObject_3$
|
|
2588
|
+
})(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);
|
|
2456
2589
|
var StyledTextContent = styled.div.withConfig({
|
|
2457
2590
|
displayName: "ListItem__StyledTextContent",
|
|
2458
2591
|
componentId: "sc-1wzzt21-3"
|
|
2459
|
-
})(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$
|
|
2592
|
+
})(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);
|
|
2460
2593
|
var StyledRightContent = styled.div.withConfig({
|
|
2461
2594
|
displayName: "ListItem__StyledRightContent",
|
|
2462
2595
|
componentId: "sc-1wzzt21-4"
|
|
2463
|
-
})(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$
|
|
2596
|
+
})(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);
|
|
2464
2597
|
var StyledChevronIcon = styled.div.withConfig({
|
|
2465
2598
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2466
2599
|
return !prop.startsWith('$');
|
|
2467
2600
|
},
|
|
2468
2601
|
displayName: "ListItem__StyledChevronIcon",
|
|
2469
2602
|
componentId: "sc-1wzzt21-5"
|
|
2470
|
-
})(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$
|
|
2603
|
+
})(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) {
|
|
2471
2604
|
var $expanded = _a.$expanded;
|
|
2472
2605
|
return $expanded ? '180deg' : '0deg';
|
|
2473
2606
|
}, reducedMotion);
|
|
@@ -2489,7 +2622,7 @@ var StyledExpandedContent = styled.div.withConfig({
|
|
|
2489
2622
|
}, reducedMotion, duration$2.normal, easing$2.easeOut, duration$2.normal, easing$2.easeOut, function (_a) {
|
|
2490
2623
|
var $expanded = _a.$expanded,
|
|
2491
2624
|
$spacing = _a.$spacing;
|
|
2492
|
-
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$
|
|
2625
|
+
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(tokensJson.component.listItem.expandedIndent.compact) : "".concat(semantic$b.spacing.layout.sm, " ").concat(semantic$b.spacing.layout.lg, " ").concat(semantic$b.spacing.layout.md, " ").concat(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 ");
|
|
2493
2626
|
});
|
|
2494
2627
|
var ListItem = function ListItem(_a) {
|
|
2495
2628
|
var primary = _a.primary,
|
|
@@ -2510,8 +2643,7 @@ var ListItem = function ListItem(_a) {
|
|
|
2510
2643
|
selected = _f === void 0 ? false : _f,
|
|
2511
2644
|
_g = _a.destructive,
|
|
2512
2645
|
destructive = _g === void 0 ? false : _g,
|
|
2513
|
-
|
|
2514
|
-
spacing = _h === void 0 ? 'comfortable' : _h,
|
|
2646
|
+
spacingProp = _a.spacing,
|
|
2515
2647
|
children = _a.children,
|
|
2516
2648
|
className = _a.className,
|
|
2517
2649
|
dataTestId = _a["data-testid"],
|
|
@@ -2521,6 +2653,8 @@ var ListItem = function ListItem(_a) {
|
|
|
2521
2653
|
customTabIndex = _a.tabIndex,
|
|
2522
2654
|
customOnKeyDown = _a.onKeyDown,
|
|
2523
2655
|
props = __rest(_a, ["primary", "secondary", "badge", "icon", "expandable", "expanded", "onToggle", "interactive", "onClick", "disabled", "selected", "destructive", "spacing", "children", "className", 'data-testid', "role", 'aria-selected', "id", "tabIndex", "onKeyDown"]);
|
|
2656
|
+
var listSpacing = useContext(ListSpacingContext);
|
|
2657
|
+
var spacing = spacingProp !== null && spacingProp !== void 0 ? spacingProp : listSpacing;
|
|
2524
2658
|
var isInteractive = interactive || expandable || customRole === 'option';
|
|
2525
2659
|
var contentRole = customRole === 'option' ? undefined : isInteractive ? 'button' : undefined;
|
|
2526
2660
|
var ariaExpanded = expandable ? expanded : undefined;
|
|
@@ -2545,64 +2679,72 @@ var ListItem = function ListItem(_a) {
|
|
|
2545
2679
|
handleClick();
|
|
2546
2680
|
}
|
|
2547
2681
|
};
|
|
2548
|
-
return
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2682
|
+
return (
|
|
2683
|
+
// The List's spacing is for its own items: reset it for this item's content, so components
|
|
2684
|
+
// built on ListItem (ActionSheet, even through its portal) and expanded content keep their own
|
|
2685
|
+
// density. A nested List provides its own spacing (#77)
|
|
2686
|
+
jsx(ListSpacingContext.Provider, {
|
|
2687
|
+
value: "comfortable",
|
|
2688
|
+
children: jsxs(StyledListItem, __assign({
|
|
2689
|
+
"$interactive": isInteractive,
|
|
2690
|
+
"$disabled": disabled,
|
|
2691
|
+
"$selected": selected,
|
|
2692
|
+
"$destructive": destructive,
|
|
2693
|
+
"$spacing": spacing,
|
|
2694
|
+
className: className,
|
|
2695
|
+
"data-testid": dataTestId,
|
|
2696
|
+
role: customRole || 'listitem',
|
|
2697
|
+
id: id,
|
|
2698
|
+
"aria-selected": ariaSelected
|
|
2699
|
+
}, props, {
|
|
2700
|
+
children: [jsxs(StyledItemContent, {
|
|
2701
|
+
"$interactive": isInteractive,
|
|
2702
|
+
"$disabled": disabled,
|
|
2703
|
+
"$selected": selected,
|
|
2704
|
+
"$destructive": destructive,
|
|
2705
|
+
"$spacing": spacing,
|
|
2706
|
+
role: contentRole,
|
|
2707
|
+
"aria-expanded": ariaExpanded,
|
|
2708
|
+
"aria-disabled": ariaDisabled,
|
|
2709
|
+
"aria-current": ariaCurrent,
|
|
2710
|
+
tabIndex: customTabIndex !== undefined ? customTabIndex : isInteractive && !disabled ? 0 : undefined,
|
|
2711
|
+
onClick: handleClick,
|
|
2712
|
+
onKeyDown: handleKeyDown,
|
|
2713
|
+
children: [icon && jsx(StyledIconContainer$1, {
|
|
2714
|
+
"aria-hidden": "true",
|
|
2715
|
+
children: icon
|
|
2716
|
+
}), jsxs(StyledTextContent, {
|
|
2717
|
+
children: [jsx(Typography, {
|
|
2718
|
+
variant: "body",
|
|
2719
|
+
color: destructive ? 'error' : 'default',
|
|
2720
|
+
children: primary
|
|
2721
|
+
}), secondary && jsx(Typography, {
|
|
2722
|
+
variant: "small",
|
|
2723
|
+
color: "subdued",
|
|
2724
|
+
children: secondary
|
|
2725
|
+
})]
|
|
2726
|
+
}), jsxs(StyledRightContent, {
|
|
2727
|
+
children: [badge, expandable && jsx(StyledChevronIcon, {
|
|
2728
|
+
"$expanded": expanded,
|
|
2729
|
+
"aria-hidden": "true",
|
|
2730
|
+
children: jsx(Icon, {
|
|
2731
|
+
name: "caretDown",
|
|
2732
|
+
size: "sm"
|
|
2733
|
+
})
|
|
2734
|
+
})]
|
|
2735
|
+
})]
|
|
2736
|
+
}), expandable && children && jsx(StyledExpandedContent, {
|
|
2737
|
+
"$spacing": spacing,
|
|
2588
2738
|
"$expanded": expanded,
|
|
2589
|
-
"aria-hidden":
|
|
2590
|
-
children:
|
|
2591
|
-
name: "caretDown",
|
|
2592
|
-
size: "sm"
|
|
2593
|
-
})
|
|
2739
|
+
"aria-hidden": !expanded,
|
|
2740
|
+
children: children
|
|
2594
2741
|
})]
|
|
2595
|
-
})
|
|
2596
|
-
})
|
|
2597
|
-
|
|
2598
|
-
"$expanded": expanded,
|
|
2599
|
-
"aria-hidden": !expanded,
|
|
2600
|
-
children: children
|
|
2601
|
-
})]
|
|
2602
|
-
}));
|
|
2742
|
+
}))
|
|
2743
|
+
})
|
|
2744
|
+
);
|
|
2603
2745
|
};
|
|
2604
2746
|
ListItem.displayName = 'ListItem';
|
|
2605
|
-
var templateObject_1$
|
|
2747
|
+
var templateObject_1$s, templateObject_2$n, templateObject_3$l, templateObject_4$h, templateObject_5$e, templateObject_6$b, templateObject_7$9;
|
|
2606
2748
|
|
|
2607
2749
|
// How long an exiting element stays mounted: the duration of `exitAnimation` in styleUtils.
|
|
2608
2750
|
var EXIT_DURATION_MS = parseInt(tokensJson.semantic.motion.duration.fast, 10);
|
|
@@ -2648,24 +2790,24 @@ function useInert(ref, isInert) {
|
|
|
2648
2790
|
}
|
|
2649
2791
|
|
|
2650
2792
|
var _a$4 = tokensJson.semantic,
|
|
2651
|
-
color$
|
|
2793
|
+
color$4 = _a$4.color,
|
|
2652
2794
|
border$5 = _a$4.border,
|
|
2653
2795
|
layout$1 = _a$4.spacing.layout,
|
|
2654
2796
|
motion$3 = _a$4.motion,
|
|
2655
2797
|
elevation$2 = _a$4.elevation;
|
|
2656
|
-
var slideUp = keyframes(templateObject_1$
|
|
2657
|
-
var fadeIn$2 = keyframes(templateObject_2$
|
|
2798
|
+
var slideUp = 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"])));
|
|
2799
|
+
var fadeIn$2 = 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"])));
|
|
2658
2800
|
var StyledOverlay$2 = styled.div.withConfig({
|
|
2659
2801
|
displayName: "ActionSheet__StyledOverlay",
|
|
2660
2802
|
componentId: "sc-regbol-0"
|
|
2661
|
-
})(templateObject_3$
|
|
2803
|
+
})(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, tokensJson.semantic.zIndex.modal, fadeIn$2, motion$3.duration.normal, motion$3.easing.easeOut, function (_a) {
|
|
2662
2804
|
var $isExiting = _a.$isExiting;
|
|
2663
2805
|
return $isExiting && exitAnimation;
|
|
2664
2806
|
});
|
|
2665
2807
|
var StyledActionSheet = styled.div.withConfig({
|
|
2666
2808
|
displayName: "ActionSheet__StyledActionSheet",
|
|
2667
2809
|
componentId: "sc-regbol-1"
|
|
2668
|
-
})(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$
|
|
2810
|
+
})(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, tokensJson.semantic.zIndex.modal, slideUp, motion$3.duration.slow, motion$3.easing.easeOut, function (_a) {
|
|
2669
2811
|
var $isExiting = _a.$isExiting;
|
|
2670
2812
|
return $isExiting && exitAnimation;
|
|
2671
2813
|
}, reducedMotion, fadeIn$2, motion$3.duration.slow, motion$3.easing.easeOut, function (_a) {
|
|
@@ -2683,7 +2825,7 @@ var StyledHeaderContent = styled.div.withConfig({
|
|
|
2683
2825
|
var StyledCloseButton = styled.button.withConfig({
|
|
2684
2826
|
displayName: "ActionSheet__StyledCloseButton",
|
|
2685
2827
|
componentId: "sc-regbol-4"
|
|
2686
|
-
})(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$
|
|
2828
|
+
})(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);
|
|
2687
2829
|
var StyledActionsList = styled.ul.withConfig({
|
|
2688
2830
|
displayName: "ActionSheet__StyledActionsList",
|
|
2689
2831
|
componentId: "sc-regbol-5"
|
|
@@ -2910,7 +3052,7 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2910
3052
|
})]
|
|
2911
3053
|
}), document.body);
|
|
2912
3054
|
};
|
|
2913
|
-
var templateObject_1$
|
|
3055
|
+
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;
|
|
2914
3056
|
|
|
2915
3057
|
function detectSpeechRecognitionConstructor(targetWindow) {
|
|
2916
3058
|
if (!targetWindow) return null;
|
|
@@ -3010,36 +3152,36 @@ function agentInputStateTransition(currentState, event) {
|
|
|
3010
3152
|
}
|
|
3011
3153
|
}
|
|
3012
3154
|
|
|
3013
|
-
var semantic$
|
|
3155
|
+
var semantic$a = tokensJson.semantic,
|
|
3014
3156
|
component$1 = tokensJson.component;
|
|
3015
3157
|
var DEFAULT_IDLE_HELPER = 'Ask about transactions, spending, or transfers';
|
|
3016
3158
|
var DEFAULT_LISTENING_MESSAGE = 'Listening… speak now';
|
|
3017
3159
|
var DEFAULT_PROCESSING_MESSAGE = 'Finishing voice input…';
|
|
3018
|
-
var rotateRing = keyframes(templateObject_1$
|
|
3160
|
+
var rotateRing = 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"])));
|
|
3019
3161
|
var Container = styled.div.withConfig({
|
|
3020
3162
|
displayName: "AgentInput__Container",
|
|
3021
3163
|
componentId: "sc-fhl996-0"
|
|
3022
|
-
})(templateObject_2$
|
|
3164
|
+
})(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);
|
|
3023
3165
|
var ControlsRow = styled.div.withConfig({
|
|
3024
3166
|
displayName: "AgentInput__ControlsRow",
|
|
3025
3167
|
componentId: "sc-fhl996-1"
|
|
3026
|
-
})(templateObject_3$
|
|
3168
|
+
})(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
3027
3169
|
var InputShell = styled.div.withConfig({
|
|
3028
3170
|
displayName: "AgentInput__InputShell",
|
|
3029
3171
|
componentId: "sc-fhl996-2"
|
|
3030
|
-
})(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$
|
|
3172
|
+
})(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);
|
|
3031
3173
|
var Input = styled.input.withConfig({
|
|
3032
3174
|
displayName: "AgentInput__Input",
|
|
3033
3175
|
componentId: "sc-fhl996-3"
|
|
3034
|
-
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$
|
|
3176
|
+
})(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);
|
|
3035
3177
|
var InputActions = styled.div.withConfig({
|
|
3036
3178
|
displayName: "AgentInput__InputActions",
|
|
3037
3179
|
componentId: "sc-fhl996-4"
|
|
3038
|
-
})(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$
|
|
3180
|
+
})(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);
|
|
3039
3181
|
var CircularActionIconButton = styled(IconButton).withConfig({
|
|
3040
3182
|
displayName: "AgentInput__CircularActionIconButton",
|
|
3041
3183
|
componentId: "sc-fhl996-5"
|
|
3042
|
-
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$
|
|
3184
|
+
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$a.border.radius.circle);
|
|
3043
3185
|
var InputWrapper = styled.div.withConfig({
|
|
3044
3186
|
displayName: "AgentInput__InputWrapper",
|
|
3045
3187
|
componentId: "sc-fhl996-6"
|
|
@@ -3053,7 +3195,7 @@ var MicButtonWrapper = styled.div.withConfig({
|
|
|
3053
3195
|
})(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"
|
|
3054
3196
|
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3055
3197
|
// eslint-disable-next-line no-restricted-syntax
|
|
3056
|
-
])), semantic$
|
|
3198
|
+
])), semantic$a.border.radius.circle);
|
|
3057
3199
|
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3058
3200
|
// eslint-disable-next-line no-restricted-syntax
|
|
3059
3201
|
var ringMask = 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)))"])));
|
|
@@ -3063,21 +3205,21 @@ var MicListeningRing = styled.span.withConfig({
|
|
|
3063
3205
|
},
|
|
3064
3206
|
displayName: "AgentInput__MicListeningRing",
|
|
3065
3207
|
componentId: "sc-fhl996-8"
|
|
3066
|
-
})(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$
|
|
3208
|
+
})(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) {
|
|
3067
3209
|
var $reducedMotion = _a.$reducedMotion;
|
|
3068
3210
|
return !$reducedMotion && css(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["\n animation: ", " 1300ms linear infinite;\n "], ["\n animation: ", " 1300ms linear infinite;\n "])), rotateRing);
|
|
3069
3211
|
});
|
|
3070
3212
|
var StatusRow = styled.div.withConfig({
|
|
3071
3213
|
displayName: "AgentInput__StatusRow",
|
|
3072
3214
|
componentId: "sc-fhl996-9"
|
|
3073
|
-
})(templateObject_13$
|
|
3215
|
+
})(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']);
|
|
3074
3216
|
var StatusText = styled.div.withConfig({
|
|
3075
3217
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3076
3218
|
return !prop.startsWith('$');
|
|
3077
3219
|
},
|
|
3078
3220
|
displayName: "AgentInput__StatusText",
|
|
3079
3221
|
componentId: "sc-fhl996-10"
|
|
3080
|
-
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$
|
|
3222
|
+
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$a.spacing.layout.xl);
|
|
3081
3223
|
var StatusAnnouncement = styled.div.withConfig({
|
|
3082
3224
|
displayName: "AgentInput__StatusAnnouncement",
|
|
3083
3225
|
componentId: "sc-fhl996-11"
|
|
@@ -3085,17 +3227,17 @@ var StatusAnnouncement = styled.div.withConfig({
|
|
|
3085
3227
|
var MeterContainer = styled.div.withConfig({
|
|
3086
3228
|
displayName: "AgentInput__MeterContainer",
|
|
3087
3229
|
componentId: "sc-fhl996-12"
|
|
3088
|
-
})(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$
|
|
3230
|
+
})(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);
|
|
3089
3231
|
var MeterBar = styled.div.withConfig({
|
|
3090
3232
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3091
3233
|
return !prop.startsWith('$');
|
|
3092
3234
|
},
|
|
3093
3235
|
displayName: "AgentInput__MeterBar",
|
|
3094
3236
|
componentId: "sc-fhl996-13"
|
|
3095
|
-
})(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$
|
|
3237
|
+
})(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) {
|
|
3096
3238
|
var $height = _a.$height;
|
|
3097
3239
|
return "".concat($height * 100, "%");
|
|
3098
|
-
}, semantic$
|
|
3240
|
+
}, semantic$a.motion.duration.fast, semantic$a.motion.easing.easeOut);
|
|
3099
3241
|
var VisuallyHiddenLabel = styled.label.withConfig({
|
|
3100
3242
|
displayName: "AgentInput__VisuallyHiddenLabel",
|
|
3101
3243
|
componentId: "sc-fhl996-14"
|
|
@@ -3728,11 +3870,11 @@ var AgentInput = function AgentInput(_a) {
|
|
|
3728
3870
|
})]
|
|
3729
3871
|
});
|
|
3730
3872
|
};
|
|
3731
|
-
var templateObject_1$
|
|
3873
|
+
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;
|
|
3732
3874
|
|
|
3733
|
-
var semantic$
|
|
3875
|
+
var semantic$9 = tokensJson.semantic;
|
|
3734
3876
|
var alert = tokensJson.component.alert;
|
|
3735
|
-
var _a$3 = semantic$
|
|
3877
|
+
var _a$3 = semantic$9.motion,
|
|
3736
3878
|
duration$1 = _a$3.duration,
|
|
3737
3879
|
easing$1 = _a$3.easing;
|
|
3738
3880
|
// Dismissing fades the alert out, then collapses the space it took (Ollie's call, #35).
|
|
@@ -3741,8 +3883,8 @@ var FADE_MS = parseInt(duration$1.fast, 10);
|
|
|
3741
3883
|
var EXIT_MS = FADE_MS * 2;
|
|
3742
3884
|
// The --alert-exit-* properties are the alert's height and vertical padding, measured
|
|
3743
3885
|
// when it's dismissed, so nothing moves until the fade has finished
|
|
3744
|
-
var fadeThenCollapse = keyframes(templateObject_1$
|
|
3745
|
-
var fadeOut = keyframes(templateObject_2$
|
|
3886
|
+
var fadeThenCollapse = 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);
|
|
3887
|
+
var fadeOut = 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"
|
|
3746
3888
|
// The exit ends on the alert's own animationend: 300ms, or 150ms under reduced motion
|
|
3747
3889
|
// (chosen when dismissed). A timer of the same length removes it if no animation event
|
|
3748
3890
|
// arrives, for example where animations are disabled or the tab is hidden.
|
|
@@ -3754,7 +3896,7 @@ var fadeOut = keyframes(templateObject_2$j || (templateObject_2$j = __makeTempla
|
|
|
3754
3896
|
// The generated names of the two exits (full, and reduced motion)
|
|
3755
3897
|
var EXIT_ANIMATION_NAMES = [fadeThenCollapse.getName(), fadeOut.getName()];
|
|
3756
3898
|
// Default icons by variant
|
|
3757
|
-
var variantIcons = {
|
|
3899
|
+
var variantIcons$1 = {
|
|
3758
3900
|
error: 'crossCircle',
|
|
3759
3901
|
warning: 'bell',
|
|
3760
3902
|
info: 'info',
|
|
@@ -3780,35 +3922,32 @@ var StyledAlert = styled.div.withConfig({
|
|
|
3780
3922
|
},
|
|
3781
3923
|
displayName: "Alert__StyledAlert",
|
|
3782
3924
|
componentId: "sc-18tq5d-0"
|
|
3783
|
-
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: flex;\n align-items:
|
|
3925
|
+
})(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) {
|
|
3784
3926
|
var $inline = _a.$inline;
|
|
3785
|
-
return $inline ?
|
|
3927
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3786
3928
|
}, function (_a) {
|
|
3787
3929
|
var $inline = _a.$inline;
|
|
3788
|
-
return $inline ? semantic$
|
|
3930
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md;
|
|
3931
|
+
}, semantic$9.border.radius.sm, semantic$9.border.width.thin, function (_a) {
|
|
3932
|
+
var _b = _a.$variant,
|
|
3933
|
+
$variant = _b === void 0 ? 'info' : _b;
|
|
3934
|
+
return alert.severity[$variant].background;
|
|
3789
3935
|
}, function (_a) {
|
|
3936
|
+
var _b = _a.$variant,
|
|
3937
|
+
$variant = _b === void 0 ? 'info' : _b;
|
|
3938
|
+
return alert.severity[$variant].text;
|
|
3939
|
+
}, function (_a) {
|
|
3940
|
+
var _b = _a.$variant,
|
|
3941
|
+
$variant = _b === void 0 ? 'info' : _b,
|
|
3942
|
+
$appearance = _a.$appearance;
|
|
3943
|
+
return alert.appearance[$appearance].borderColor[$variant];
|
|
3944
|
+
}, semantic$9.breakpoint.md, function (_a) {
|
|
3790
3945
|
var $inline = _a.$inline;
|
|
3791
|
-
return $inline ? semantic$
|
|
3792
|
-
}, semantic$7.border.radius.sm, semantic$7.border.width.thin, function (_a) {
|
|
3793
|
-
var $variant = _a.$variant;
|
|
3794
|
-
switch ($variant) {
|
|
3795
|
-
case 'error':
|
|
3796
|
-
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 ");
|
|
3797
|
-
case 'warning':
|
|
3798
|
-
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 ");
|
|
3799
|
-
case 'success':
|
|
3800
|
-
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 ");
|
|
3801
|
-
case 'info':
|
|
3802
|
-
default:
|
|
3803
|
-
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 ");
|
|
3804
|
-
}
|
|
3805
|
-
}, semantic$7.breakpoint.md, function (_a) {
|
|
3806
|
-
var $inline = _a.$inline;
|
|
3807
|
-
return $inline ? semantic$7.spacing.layout.sm : semantic$7.spacing.layout.lg;
|
|
3946
|
+
return $inline ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.lg;
|
|
3808
3947
|
}, function (_a) {
|
|
3809
3948
|
var $isExiting = _a.$isExiting,
|
|
3810
3949
|
$reducedExit = _a.$reducedExit;
|
|
3811
|
-
return $isExiting && 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 ? css(templateObject_3$
|
|
3950
|
+
return $isExiting && 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 ? css(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), fadeOut, duration$1.fast, easing$1.easeOut) : css(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["", " ", "ms ", " forwards"], ["", " ", "ms ", " forwards"])), fadeThenCollapse, EXIT_MS, easing$1.easeOut));
|
|
3812
3951
|
});
|
|
3813
3952
|
var StyledIconContainer = styled.div.withConfig({
|
|
3814
3953
|
displayName: "Alert__StyledIconContainer",
|
|
@@ -3817,47 +3956,81 @@ var StyledIconContainer = styled.div.withConfig({
|
|
|
3817
3956
|
var StyledContent$1 = styled.div.withConfig({
|
|
3818
3957
|
displayName: "Alert__StyledContent",
|
|
3819
3958
|
componentId: "sc-18tq5d-2"
|
|
3820
|
-
})(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$
|
|
3959
|
+
})(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);
|
|
3821
3960
|
var StyledTitle = styled.span.withConfig({
|
|
3822
3961
|
displayName: "Alert__StyledTitle",
|
|
3823
3962
|
componentId: "sc-18tq5d-3"
|
|
3824
3963
|
})(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);
|
|
3825
|
-
var StyledMessage = styled.span.withConfig({
|
|
3964
|
+
var StyledMessage$1 = styled.span.withConfig({
|
|
3826
3965
|
displayName: "Alert__StyledMessage",
|
|
3827
3966
|
componentId: "sc-18tq5d-4"
|
|
3828
|
-
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"
|
|
3967
|
+
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"
|
|
3968
|
+
// The action follows the content, left-aligned with it, so it's read after the message
|
|
3969
|
+
// (#122). With the content's xs gap, the space above it is md: a separate step.
|
|
3970
|
+
])), alert.message.typography, alert.message.lineHeight);
|
|
3971
|
+
// The action follows the content, left-aligned with it, so it's read after the message
|
|
3972
|
+
// (#122). With the content's xs gap, the space above it is md: a separate step.
|
|
3829
3973
|
var StyledActions = styled.div.withConfig({
|
|
3830
3974
|
displayName: "Alert__StyledActions",
|
|
3831
3975
|
componentId: "sc-18tq5d-5"
|
|
3832
|
-
})(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n
|
|
3976
|
+
})(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"
|
|
3977
|
+
// The dismiss button's centre lines up with the first line of content: the title, or the
|
|
3978
|
+
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
3979
|
+
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
3980
|
+
// padding and line height. Being in the row, it also keeps text and actions from running under it.
|
|
3981
|
+
])), semantic$9.spacing.layout.sm, semantic$9.spacing.layout.md, semantic$9.spacing.layout.xs);
|
|
3982
|
+
// The dismiss button's centre lines up with the first line of content: the title, or the
|
|
3983
|
+
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
3984
|
+
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
3985
|
+
// padding and line height. Being in the row, it also keeps text and actions from running under it.
|
|
3986
|
+
var StyledDismissSlot = styled.div.withConfig({
|
|
3987
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3988
|
+
return !prop.startsWith('$');
|
|
3989
|
+
},
|
|
3990
|
+
displayName: "Alert__StyledDismissSlot",
|
|
3991
|
+
componentId: "sc-18tq5d-6"
|
|
3992
|
+
})(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"
|
|
3993
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left. The inline
|
|
3994
|
+
// alert's padding is too small for that, so its button stays inside the padding.
|
|
3995
|
+
])), function (_a) {
|
|
3996
|
+
var $lineHeight = _a.$lineHeight;
|
|
3997
|
+
return $lineHeight;
|
|
3998
|
+
});
|
|
3999
|
+
// The glyph sits on the padding edge, mirroring the severity icon on the left. The inline
|
|
4000
|
+
// alert's padding is too small for that, so its button stays inside the padding.
|
|
3833
4001
|
var StyledDismissButton = styled(IconButton).withConfig({
|
|
3834
4002
|
displayName: "Alert__StyledDismissButton",
|
|
3835
|
-
componentId: "sc-18tq5d-
|
|
3836
|
-
})(
|
|
4003
|
+
componentId: "sc-18tq5d-7"
|
|
4004
|
+
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
|
4005
|
+
var $inline = _a.$inline;
|
|
4006
|
+
return $inline ? 0 : "calc((".concat(tokensJson.component.iconButton.sizes.small.minWidth, " - ").concat(semantic$9.size.icon.sm, ") / -2)");
|
|
4007
|
+
});
|
|
3837
4008
|
var Alert = function Alert(_a) {
|
|
3838
4009
|
var _b = _a.variant,
|
|
3839
4010
|
variant = _b === void 0 ? 'info' : _b,
|
|
4011
|
+
_c = _a.appearance,
|
|
4012
|
+
appearance = _c === void 0 ? 'outlined' : _c,
|
|
3840
4013
|
children = _a.children,
|
|
3841
4014
|
title = _a.title,
|
|
3842
|
-
|
|
3843
|
-
dismissible =
|
|
4015
|
+
_d = _a.dismissible,
|
|
4016
|
+
dismissible = _d === void 0 ? false : _d,
|
|
3844
4017
|
onDismiss = _a.onDismiss,
|
|
3845
4018
|
action = _a.action,
|
|
3846
|
-
|
|
3847
|
-
inline =
|
|
3848
|
-
|
|
3849
|
-
ariaLive =
|
|
4019
|
+
_e = _a.inline,
|
|
4020
|
+
inline = _e === void 0 ? false : _e,
|
|
4021
|
+
_f = _a.ariaLive,
|
|
4022
|
+
ariaLive = _f === void 0 ? 'polite' : _f,
|
|
3850
4023
|
dataTestId = _a["data-testid"],
|
|
3851
|
-
props = __rest(_a, ["variant", "children", "title", "dismissible", "onDismiss", "action", "inline", "ariaLive", 'data-testid']);
|
|
3852
|
-
var
|
|
3853
|
-
phase =
|
|
3854
|
-
setPhase =
|
|
3855
|
-
var
|
|
3856
|
-
reducedExit =
|
|
3857
|
-
setReducedExit =
|
|
3858
|
-
var
|
|
3859
|
-
exitStyle =
|
|
3860
|
-
setExitStyle =
|
|
4024
|
+
props = __rest(_a, ["variant", "appearance", "children", "title", "dismissible", "onDismiss", "action", "inline", "ariaLive", 'data-testid']);
|
|
4025
|
+
var _g = React.useState('visible'),
|
|
4026
|
+
phase = _g[0],
|
|
4027
|
+
setPhase = _g[1];
|
|
4028
|
+
var _h = React.useState(false),
|
|
4029
|
+
reducedExit = _h[0],
|
|
4030
|
+
setReducedExit = _h[1];
|
|
4031
|
+
var _j = React.useState(),
|
|
4032
|
+
exitStyle = _j[0],
|
|
4033
|
+
setExitStyle = _j[1];
|
|
3861
4034
|
var alertRef = React.useRef(null);
|
|
3862
4035
|
// While it exits, its controls leave the tab order and can't be activated
|
|
3863
4036
|
useInert(alertRef, phase === 'exiting');
|
|
@@ -3914,7 +4087,7 @@ var Alert = function Alert(_a) {
|
|
|
3914
4087
|
}
|
|
3915
4088
|
};
|
|
3916
4089
|
// Get the icon for the current variant
|
|
3917
|
-
var iconName = variantIcons[variant];
|
|
4090
|
+
var iconName = variantIcons$1[variant];
|
|
3918
4091
|
var alertIconColor = variantIconColors[variant];
|
|
3919
4092
|
var alertTitleColor = variantTitleColors[variant];
|
|
3920
4093
|
// Determine ARIA role based on variant and aria-live
|
|
@@ -3923,6 +4096,7 @@ var Alert = function Alert(_a) {
|
|
|
3923
4096
|
role: role,
|
|
3924
4097
|
"aria-live": ariaLive,
|
|
3925
4098
|
"$variant": variant,
|
|
4099
|
+
"$appearance": appearance,
|
|
3926
4100
|
"$inline": inline,
|
|
3927
4101
|
"$isExiting": isExiting,
|
|
3928
4102
|
"$reducedExit": reducedExit,
|
|
@@ -3945,23 +4119,158 @@ var Alert = function Alert(_a) {
|
|
|
3945
4119
|
"aria-level": 6,
|
|
3946
4120
|
color: alertTitleColor,
|
|
3947
4121
|
children: title
|
|
3948
|
-
}), jsx(StyledMessage, {
|
|
4122
|
+
}), jsx(StyledMessage$1, {
|
|
3949
4123
|
children: children
|
|
4124
|
+
}), action && jsx(StyledActions, {
|
|
4125
|
+
children: action
|
|
3950
4126
|
})]
|
|
3951
|
-
}),
|
|
3952
|
-
|
|
4127
|
+
}), dismissible && jsx(StyledDismissSlot, {
|
|
4128
|
+
"$lineHeight": title ? alert.title.lineHeight : alert.message.lineHeight,
|
|
4129
|
+
children: jsx(StyledDismissButton, {
|
|
3953
4130
|
iconName: "close",
|
|
3954
4131
|
size: "small",
|
|
3955
4132
|
variant: "naked",
|
|
4133
|
+
"$inline": inline,
|
|
3956
4134
|
onClick: handleDismiss,
|
|
3957
4135
|
"aria-label": "Dismiss alert",
|
|
3958
4136
|
"data-testid": dataTestId ? "".concat(dataTestId, "-dismiss") : undefined
|
|
3959
|
-
})
|
|
4137
|
+
})
|
|
3960
4138
|
})]
|
|
3961
4139
|
}));
|
|
3962
4140
|
};
|
|
3963
4141
|
Alert.displayName = 'Alert';
|
|
3964
|
-
var templateObject_1$
|
|
4142
|
+
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;
|
|
4143
|
+
|
|
4144
|
+
var semantic$8 = tokensJson.semantic;
|
|
4145
|
+
var color$3 = semantic$8.color,
|
|
4146
|
+
typography = semantic$8.typography,
|
|
4147
|
+
spacing$3 = semantic$8.spacing,
|
|
4148
|
+
size = semantic$8.size;
|
|
4149
|
+
var variantIcons = {
|
|
4150
|
+
error: 'crossCircle',
|
|
4151
|
+
warning: 'bell',
|
|
4152
|
+
info: 'info',
|
|
4153
|
+
success: 'checkRing'
|
|
4154
|
+
};
|
|
4155
|
+
var variantTextColors = {
|
|
4156
|
+
error: color$3.text.error,
|
|
4157
|
+
warning: color$3.text.warning,
|
|
4158
|
+
info: color$3.text.interactive,
|
|
4159
|
+
success: color$3.text.success
|
|
4160
|
+
};
|
|
4161
|
+
var sizeConfig = {
|
|
4162
|
+
small: {
|
|
4163
|
+
font: typography.caption,
|
|
4164
|
+
gap: spacing$3.layout.xs,
|
|
4165
|
+
icon: 'xs'
|
|
4166
|
+
},
|
|
4167
|
+
medium: {
|
|
4168
|
+
font: typography.small,
|
|
4169
|
+
gap: spacing$3.layout.sm,
|
|
4170
|
+
icon: 'sm'
|
|
4171
|
+
}
|
|
4172
|
+
};
|
|
4173
|
+
var StyledInlineAlert = styled.div.withConfig({
|
|
4174
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4175
|
+
return !prop.startsWith('$');
|
|
4176
|
+
},
|
|
4177
|
+
displayName: "InlineAlert__StyledInlineAlert",
|
|
4178
|
+
componentId: "sc-eervmb-0"
|
|
4179
|
+
})(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"
|
|
4180
|
+
// One line of the message's font tall, so the icon centres on the first line at any size:
|
|
4181
|
+
// the zero-width space gives the box the font's line height without a fixed value
|
|
4182
|
+
])), function (_a) {
|
|
4183
|
+
var $size = _a.$size,
|
|
4184
|
+
$empty = _a.$empty;
|
|
4185
|
+
return $empty ? '0' : size.label[$size];
|
|
4186
|
+
}, function (_a) {
|
|
4187
|
+
var $size = _a.$size;
|
|
4188
|
+
return sizeConfig[$size].gap;
|
|
4189
|
+
}, function (_a) {
|
|
4190
|
+
var $size = _a.$size;
|
|
4191
|
+
return sizeConfig[$size].font;
|
|
4192
|
+
}, function (_a) {
|
|
4193
|
+
var $variant = _a.$variant;
|
|
4194
|
+
return variantTextColors[$variant];
|
|
4195
|
+
});
|
|
4196
|
+
// One line of the message's font tall, so the icon centres on the first line at any size:
|
|
4197
|
+
// the zero-width space gives the box the font's line height without a fixed value
|
|
4198
|
+
var StyledIconLine = styled.span.withConfig({
|
|
4199
|
+
displayName: "InlineAlert__StyledIconLine",
|
|
4200
|
+
componentId: "sc-eervmb-1"
|
|
4201
|
+
})(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"])));
|
|
4202
|
+
var StyledMessage = styled.span.withConfig({
|
|
4203
|
+
displayName: "InlineAlert__StyledMessage",
|
|
4204
|
+
componentId: "sc-eervmb-2"
|
|
4205
|
+
})(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n min-width: 0;\n"], ["\n min-width: 0;\n"
|
|
4206
|
+
/**
|
|
4207
|
+
* InlineAlert is a short, local message that sits next to what it's about: between paragraphs,
|
|
4208
|
+
* below a field or in a table cell (decision 0019). A severity icon and text in the severity
|
|
4209
|
+
* colour, with no background or border. For a title, an action or a dismiss button, use Alert.
|
|
4210
|
+
*
|
|
4211
|
+
* @example
|
|
4212
|
+
* ```tsx
|
|
4213
|
+
* <InlineAlert variant="success">Saved</InlineAlert>
|
|
4214
|
+
*
|
|
4215
|
+
* // Field feedback: the control references the message with aria-describedby
|
|
4216
|
+
* <input id="email" aria-describedby="email-error" aria-invalid="true" />
|
|
4217
|
+
* <InlineAlert id="email-error" variant="error" size="small">Enter a valid email address</InlineAlert>
|
|
4218
|
+
* ```
|
|
4219
|
+
*/])));
|
|
4220
|
+
/**
|
|
4221
|
+
* InlineAlert is a short, local message that sits next to what it's about: between paragraphs,
|
|
4222
|
+
* below a field or in a table cell (decision 0019). A severity icon and text in the severity
|
|
4223
|
+
* colour, with no background or border. For a title, an action or a dismiss button, use Alert.
|
|
4224
|
+
*
|
|
4225
|
+
* @example
|
|
4226
|
+
* ```tsx
|
|
4227
|
+
* <InlineAlert variant="success">Saved</InlineAlert>
|
|
4228
|
+
*
|
|
4229
|
+
* // Field feedback: the control references the message with aria-describedby
|
|
4230
|
+
* <input id="email" aria-describedby="email-error" aria-invalid="true" />
|
|
4231
|
+
* <InlineAlert id="email-error" variant="error" size="small">Enter a valid email address</InlineAlert>
|
|
4232
|
+
* ```
|
|
4233
|
+
*/
|
|
4234
|
+
var InlineAlert = function InlineAlert(_a) {
|
|
4235
|
+
var _b = _a.variant,
|
|
4236
|
+
variant = _b === void 0 ? 'info' : _b,
|
|
4237
|
+
_c = _a.size,
|
|
4238
|
+
alertSize = _c === void 0 ? 'medium' : _c,
|
|
4239
|
+
children = _a.children,
|
|
4240
|
+
_d = _a.ariaLive,
|
|
4241
|
+
ariaLive = _d === void 0 ? 'polite' : _d,
|
|
4242
|
+
id = _a.id,
|
|
4243
|
+
dataTestId = _a["data-testid"];
|
|
4244
|
+
// A live region is announced reliably only when it exists before its content changes, so with
|
|
4245
|
+
// no message it stays mounted as an empty region, with no icon and no minimum height
|
|
4246
|
+
var hasMessage = children !== undefined && children !== null && children !== false && children !== '';
|
|
4247
|
+
return jsx(StyledInlineAlert
|
|
4248
|
+
// Same roles as Alert; ariaLive sets how urgently changes are announced
|
|
4249
|
+
, {
|
|
4250
|
+
// Same roles as Alert; ariaLive sets how urgently changes are announced
|
|
4251
|
+
role: variant === 'error' ? 'alert' : 'status',
|
|
4252
|
+
"aria-live": ariaLive,
|
|
4253
|
+
id: id,
|
|
4254
|
+
"data-testid": dataTestId,
|
|
4255
|
+
"$variant": variant,
|
|
4256
|
+
"$size": alertSize,
|
|
4257
|
+
"$empty": !hasMessage,
|
|
4258
|
+
children: hasMessage && jsxs(Fragment, {
|
|
4259
|
+
children: [jsx(StyledIconLine, {
|
|
4260
|
+
"aria-hidden": "true",
|
|
4261
|
+
children: jsx(Icon, {
|
|
4262
|
+
name: variantIcons[variant],
|
|
4263
|
+
size: sizeConfig[alertSize].icon,
|
|
4264
|
+
iconColor: "inherit"
|
|
4265
|
+
})
|
|
4266
|
+
}), jsx(StyledMessage, {
|
|
4267
|
+
children: children
|
|
4268
|
+
})]
|
|
4269
|
+
})
|
|
4270
|
+
});
|
|
4271
|
+
};
|
|
4272
|
+
InlineAlert.displayName = 'InlineAlert';
|
|
4273
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$h;
|
|
3965
4274
|
|
|
3966
4275
|
var BreadcrumbNavStyled = styled.nav.withConfig({
|
|
3967
4276
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
@@ -4179,13 +4488,13 @@ var StyledCheckbox = styled.span.withConfig({
|
|
|
4179
4488
|
return props.$checked || props.$indeterminate ? tokensJson.semantic.color.background.inverse : tokensJson.component.input["default"].backgroundColor;
|
|
4180
4489
|
}, function (props) {
|
|
4181
4490
|
if (props.$state === 'error') return tokensJson.component.input.error.borderColor;
|
|
4182
|
-
if (props.$checked || props.$indeterminate) return tokensJson.semantic.border.strong;
|
|
4491
|
+
if (props.$checked || props.$indeterminate) return tokensJson.semantic.color.border.strong;
|
|
4183
4492
|
return tokensJson.component.input["default"].borderColor;
|
|
4184
4493
|
}, function (props) {
|
|
4185
4494
|
return props.$state === 'disabled' ? 'not-allowed' : 'pointer';
|
|
4186
4495
|
}, tokensJson.semantic.motion.duration.fast, tokensJson.semantic.motion.easing.easeOut, HiddenCheckboxInput, function (props) {
|
|
4187
|
-
return props.$state === 'error' ? tokensJson.component.input.error.hover.borderColor : props.$checked || props.$indeterminate ? tokensJson.semantic.border.strong : tokensJson.component.input.hover.borderColor;
|
|
4188
|
-
}, HiddenCheckboxInput, tokensJson.component.input.focus.outline, tokensJson.
|
|
4496
|
+
return props.$state === 'error' ? tokensJson.component.input.error.hover.borderColor : props.$checked || props.$indeterminate ? tokensJson.semantic.color.border.strong : tokensJson.component.input.hover.borderColor;
|
|
4497
|
+
}, HiddenCheckboxInput, tokensJson.component.input.focus.outline, tokensJson.semantic.border.focusOffset, function (props) {
|
|
4189
4498
|
return props.$state === 'error' ? tokensJson.component.input.error.focus.borderColor : tokensJson.component.input.focus.borderColor;
|
|
4190
4499
|
}, function (props) {
|
|
4191
4500
|
return props.$state === 'disabled' && "\n background-color: ".concat(tokensJson.component.input.disabled.backgroundColor, ";\n border-color: ").concat(tokensJson.component.input.disabled.borderColor, ";\n ");
|
|
@@ -4691,7 +5000,7 @@ var DateGroup = function DateGroup(_a) {
|
|
|
4691
5000
|
};
|
|
4692
5001
|
var templateObject_1$g, templateObject_2$e, templateObject_3$d, templateObject_4$b;
|
|
4693
5002
|
|
|
4694
|
-
var semantic$
|
|
5003
|
+
var semantic$7 = tokensJson.semantic;
|
|
4695
5004
|
var StyledContainer$1 = styled.div.withConfig({
|
|
4696
5005
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4697
5006
|
return !prop.startsWith('$');
|
|
@@ -4700,7 +5009,7 @@ var StyledContainer$1 = styled.div.withConfig({
|
|
|
4700
5009
|
componentId: "sc-1u5hxh-0"
|
|
4701
5010
|
})(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"])), tokensJson.component.emptyState.maxWidth, function (_a) {
|
|
4702
5011
|
var $size = _a.$size;
|
|
4703
|
-
return $size === 'small' ? semantic$
|
|
5012
|
+
return $size === 'small' ? semantic$7.spacing.layout['4xl'] : $size === 'large' ? semantic$7.spacing.layout['8xl'] : semantic$7.spacing.layout['6xl'];
|
|
4704
5013
|
});
|
|
4705
5014
|
var StyledIllustration = styled.div.withConfig({
|
|
4706
5015
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -4714,16 +5023,16 @@ var StyledIllustration = styled.div.withConfig({
|
|
|
4714
5023
|
}, function (_a) {
|
|
4715
5024
|
var $size = _a.$size;
|
|
4716
5025
|
return $size === 'small' ? tokensJson.component.emptyState.illustration.small : $size === 'large' ? tokensJson.component.emptyState.illustration.large : tokensJson.component.emptyState.illustration.medium;
|
|
4717
|
-
}, semantic$
|
|
5026
|
+
}, semantic$7.spacing.layout['2xl'], function (_a) {
|
|
4718
5027
|
var $variant = _a.$variant;
|
|
4719
|
-
return $variant === 'error' ? semantic$
|
|
5028
|
+
return $variant === 'error' ? semantic$7.color.icon.error : $variant === 'success' ? semantic$7.color.icon.success : semantic$7.color.icon.subdued;
|
|
4720
5029
|
});
|
|
4721
5030
|
var StyledTextContainer = styled.div.withConfig({
|
|
4722
5031
|
displayName: "EmptyState__StyledTextContainer",
|
|
4723
5032
|
componentId: "sc-1u5hxh-2"
|
|
4724
5033
|
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n max-width: ", ";\n margin-bottom: ", ";\n"], ["\n max-width: ", ";\n margin-bottom: ", ";\n"
|
|
4725
5034
|
// Map illustration type to icon name
|
|
4726
|
-
])), tokensJson.component.emptyState.text.maxWidth, semantic$
|
|
5035
|
+
])), tokensJson.component.emptyState.text.maxWidth, semantic$7.spacing.layout['2xl']);
|
|
4727
5036
|
// Map illustration type to icon name
|
|
4728
5037
|
var illustrationToIcon = {
|
|
4729
5038
|
search: 'search',
|
|
@@ -4778,7 +5087,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4778
5087
|
children: title
|
|
4779
5088
|
}), jsx("div", {
|
|
4780
5089
|
style: {
|
|
4781
|
-
marginTop: semantic$
|
|
5090
|
+
marginTop: semantic$7.spacing.layout.md
|
|
4782
5091
|
},
|
|
4783
5092
|
children: jsx(Typography, {
|
|
4784
5093
|
variant: "body",
|
|
@@ -4903,6 +5212,9 @@ var _a = tokensJson.semantic,
|
|
|
4903
5212
|
_b = tokensJson.component,
|
|
4904
5213
|
input$1 = _b.input,
|
|
4905
5214
|
field$3 = _b.field;
|
|
5215
|
+
// Spacing comes from the semantic scales: no component spacing tokens (decision 0022).
|
|
5216
|
+
// The 11px vertical padding is off-grid and keeps its deprecated token until #129.
|
|
5217
|
+
var controlPaddingX = tokensJson.semantic.spacing.component.lg;
|
|
4906
5218
|
var duration = motion$1.duration,
|
|
4907
5219
|
easing = motion$1.easing;
|
|
4908
5220
|
var DropdownContainer = styled.div.withConfig({
|
|
@@ -4915,7 +5227,7 @@ var DropdownTrigger = styled.button.withConfig({
|
|
|
4915
5227
|
},
|
|
4916
5228
|
displayName: "Dropdown__DropdownTrigger",
|
|
4917
5229
|
componentId: "sc-kz07c4-1"
|
|
4918
|
-
})(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:
|
|
5230
|
+
})(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) {
|
|
4919
5231
|
var $hasError = _a.$hasError;
|
|
4920
5232
|
return $hasError ? input$1.error.borderColor : input$1["default"].borderColor;
|
|
4921
5233
|
}, input$1["default"].borderRadius, input$1["default"].font, input$1["default"].textColor, duration.normal, easing.easeInOut, duration.normal, easing.easeInOut, function (_a) {
|
|
@@ -4924,7 +5236,7 @@ var DropdownTrigger = styled.button.withConfig({
|
|
|
4924
5236
|
}, function (_a) {
|
|
4925
5237
|
var $hasError = _a.$hasError;
|
|
4926
5238
|
return $hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor;
|
|
4927
|
-
}, input$1.focus.outline,
|
|
5239
|
+
}, input$1.focus.outline, border$1.focusOffset, input$1.disabled.backgroundColor, input$1.disabled.textColor, input$1.disabled.borderColor, function (_a) {
|
|
4928
5240
|
var $isOpen = _a.$isOpen,
|
|
4929
5241
|
$hasError = _a.$hasError;
|
|
4930
5242
|
return $isOpen && "\n border-color: ".concat($hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor, ";\n ");
|
|
@@ -4945,7 +5257,7 @@ var DropdownMenu = styled.div.withConfig({
|
|
|
4945
5257
|
},
|
|
4946
5258
|
displayName: "Dropdown__DropdownMenu",
|
|
4947
5259
|
componentId: "sc-kz07c4-3"
|
|
4948
|
-
})(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
|
|
5260
|
+
})(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) {
|
|
4949
5261
|
var $isOpen = _a.$isOpen;
|
|
4950
5262
|
return $isOpen ? 1 : 0;
|
|
4951
5263
|
}, function (_a) {
|
|
@@ -4961,7 +5273,7 @@ var DropdownOption = styled.button.withConfig({
|
|
|
4961
5273
|
},
|
|
4962
5274
|
displayName: "Dropdown__DropdownOption",
|
|
4963
5275
|
componentId: "sc-kz07c4-4"
|
|
4964
|
-
})(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,
|
|
5276
|
+
})(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) {
|
|
4965
5277
|
var $isSelected = _a.$isSelected,
|
|
4966
5278
|
$isFocused = _a.$isFocused;
|
|
4967
5279
|
if ($isFocused) return color$1.background.surface;
|
|
@@ -4974,7 +5286,7 @@ var StyledHelperText$3 = styled.div.withConfig({
|
|
|
4974
5286
|
})(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) {
|
|
4975
5287
|
var $hasError = _a.$hasError;
|
|
4976
5288
|
return $hasError ? field$3.helperText.colorError : field$3.helperText.color;
|
|
4977
|
-
},
|
|
5289
|
+
}, spacing.sm);
|
|
4978
5290
|
var Dropdown = function Dropdown(_a) {
|
|
4979
5291
|
var options = _a.options,
|
|
4980
5292
|
value = _a.value,
|
|
@@ -5097,7 +5409,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
5097
5409
|
htmlFor: dropdownId,
|
|
5098
5410
|
style: {
|
|
5099
5411
|
display: 'block',
|
|
5100
|
-
marginBottom:
|
|
5412
|
+
marginBottom: spacing.sm
|
|
5101
5413
|
},
|
|
5102
5414
|
children: jsx(Typography, {
|
|
5103
5415
|
variant: "label",
|
|
@@ -5152,7 +5464,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
5152
5464
|
};
|
|
5153
5465
|
var templateObject_1$d, templateObject_2$b, templateObject_3$a, templateObject_4$9, templateObject_5$8, templateObject_6$7;
|
|
5154
5466
|
|
|
5155
|
-
var semantic$
|
|
5467
|
+
var semantic$6 = tokensJson.semantic;
|
|
5156
5468
|
var StyledList = styled.ul.withConfig({
|
|
5157
5469
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
5158
5470
|
return !prop.startsWith('$');
|
|
@@ -5161,7 +5473,7 @@ var StyledList = styled.ul.withConfig({
|
|
|
5161
5473
|
componentId: "sc-1irksg5-0"
|
|
5162
5474
|
})(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) {
|
|
5163
5475
|
var $dividers = _a.$dividers;
|
|
5164
|
-
return $dividers && "\n > li:not(:last-child) {\n border-bottom: ".concat(semantic$
|
|
5476
|
+
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 ");
|
|
5165
5477
|
});
|
|
5166
5478
|
var List = function List(_a) {
|
|
5167
5479
|
var children = _a.children,
|
|
@@ -5172,25 +5484,27 @@ var List = function List(_a) {
|
|
|
5172
5484
|
className = _a.className,
|
|
5173
5485
|
dataTestId = _a["data-testid"],
|
|
5174
5486
|
props = __rest(_a, ["children", "dividers", "spacing", "className", 'data-testid']);
|
|
5175
|
-
return jsx(
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5487
|
+
return jsx(ListSpacingContext.Provider, {
|
|
5488
|
+
value: spacing,
|
|
5489
|
+
children: jsx(StyledList, __assign({
|
|
5490
|
+
"$dividers": dividers,
|
|
5491
|
+
className: className,
|
|
5492
|
+
"data-testid": dataTestId,
|
|
5493
|
+
role: "list"
|
|
5494
|
+
}, props, {
|
|
5495
|
+
children: children
|
|
5496
|
+
}))
|
|
5497
|
+
});
|
|
5184
5498
|
};
|
|
5185
5499
|
List.displayName = 'List';
|
|
5186
5500
|
var templateObject_1$c;
|
|
5187
5501
|
|
|
5188
|
-
var semantic$
|
|
5189
|
-
var layout = semantic$
|
|
5190
|
-
color = semantic$
|
|
5191
|
-
border = semantic$
|
|
5192
|
-
elevation = semantic$
|
|
5193
|
-
motion = semantic$
|
|
5502
|
+
var semantic$5 = tokensJson.semantic;
|
|
5503
|
+
var layout = semantic$5.spacing.layout,
|
|
5504
|
+
color = semantic$5.color,
|
|
5505
|
+
border = semantic$5.border,
|
|
5506
|
+
elevation = semantic$5.elevation,
|
|
5507
|
+
motion = semantic$5.motion;
|
|
5194
5508
|
// ---------------------------------------------------------------------------
|
|
5195
5509
|
// Size map
|
|
5196
5510
|
// ---------------------------------------------------------------------------
|
|
@@ -5214,7 +5528,7 @@ var scaleIn = keyframes(templateObject_2$a || (templateObject_2$a = __makeTempla
|
|
|
5214
5528
|
var StyledOverlay$1 = styled.div.withConfig({
|
|
5215
5529
|
displayName: "Modal__StyledOverlay",
|
|
5216
5530
|
componentId: "sc-1d3g5gh-0"
|
|
5217
|
-
})(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$
|
|
5531
|
+
})(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, css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5218
5532
|
var $isExiting = _a.$isExiting;
|
|
5219
5533
|
return $isExiting && exitAnimation;
|
|
5220
5534
|
}));
|
|
@@ -5224,7 +5538,7 @@ var StyledDialog = styled.div.withConfig({
|
|
|
5224
5538
|
},
|
|
5225
5539
|
displayName: "Modal__StyledDialog",
|
|
5226
5540
|
componentId: "sc-1d3g5gh-1"
|
|
5227
|
-
})(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$
|
|
5541
|
+
})(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) {
|
|
5228
5542
|
var $width = _a.$width;
|
|
5229
5543
|
return $width;
|
|
5230
5544
|
}, layout.lg, layout.lg, color.background.subtle, border.radius.xl, elevation.overlay, css(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), scaleIn, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
@@ -5233,7 +5547,7 @@ var StyledDialog = styled.div.withConfig({
|
|
|
5233
5547
|
}), reducedMotion, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5234
5548
|
var $isExiting = _a.$isExiting;
|
|
5235
5549
|
return $isExiting && exitAnimation;
|
|
5236
|
-
}, semantic$
|
|
5550
|
+
}, semantic$5.breakpoint.md, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5237
5551
|
var $isExiting = _a.$isExiting;
|
|
5238
5552
|
return $isExiting && exitAnimation;
|
|
5239
5553
|
});
|
|
@@ -5244,7 +5558,7 @@ var StyledHeader = styled.div.withConfig({
|
|
|
5244
5558
|
var StyledBody = styled.div.withConfig({
|
|
5245
5559
|
displayName: "Modal__StyledBody",
|
|
5246
5560
|
componentId: "sc-1d3g5gh-3"
|
|
5247
|
-
})(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$
|
|
5561
|
+
})(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);
|
|
5248
5562
|
var StyledFooter = styled.div.withConfig({
|
|
5249
5563
|
displayName: "Modal__StyledFooter",
|
|
5250
5564
|
componentId: "sc-1d3g5gh-4"
|
|
@@ -5428,20 +5742,21 @@ var Modal = function Modal(_a) {
|
|
|
5428
5742
|
Modal.displayName = 'Modal';
|
|
5429
5743
|
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;
|
|
5430
5744
|
|
|
5431
|
-
var input = tokensJson.component.input
|
|
5745
|
+
var input = tokensJson.component.input,
|
|
5746
|
+
semantic$4 = tokensJson.semantic;
|
|
5432
5747
|
var StyledInputBase = styled.input.withConfig({
|
|
5433
5748
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
5434
5749
|
return !prop.startsWith('$');
|
|
5435
5750
|
},
|
|
5436
5751
|
displayName: "InputBase__StyledInputBase",
|
|
5437
5752
|
componentId: "sc-1bpf4e8-0"
|
|
5438
|
-
})(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:
|
|
5753
|
+
})(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"
|
|
5439
5754
|
/**
|
|
5440
5755
|
* Base styled textarea with shared styling
|
|
5441
5756
|
*/])), input["default"].font, function (_a) {
|
|
5442
5757
|
var $disabled = _a.$disabled;
|
|
5443
5758
|
return $disabled ? input.disabled.textColor : input["default"].textColor;
|
|
5444
|
-
}, input["default"].paddingY,
|
|
5759
|
+
}, input["default"].paddingY, semantic$4.spacing.component.lg, function (_a) {
|
|
5445
5760
|
var $disabled = _a.$disabled;
|
|
5446
5761
|
return $disabled ? input.disabled.backgroundColor : input["default"].backgroundColor;
|
|
5447
5762
|
}, input["default"].borderWidth, function (_a) {
|
|
@@ -5453,10 +5768,10 @@ var StyledInputBase = styled.input.withConfig({
|
|
|
5453
5768
|
}, input["default"].borderRadius, tokensJson.semantic.motion.duration.normal, tokensJson.semantic.motion.easing.easeInOut, tokensJson.semantic.motion.duration.normal, tokensJson.semantic.motion.easing.easeInOut, input.placeholder.textColor, function (_a) {
|
|
5454
5769
|
var $hasError = _a.$hasError;
|
|
5455
5770
|
return $hasError ? input.error.focus.borderColor : input.focus.borderColor;
|
|
5456
|
-
}, input.focus.outline,
|
|
5771
|
+
}, input.focus.outline, semantic$4.border.focusOffset, function (_a) {
|
|
5457
5772
|
var $hasError = _a.$hasError;
|
|
5458
5773
|
return $hasError ? input.error.hover.borderColor : input.hover.borderColor;
|
|
5459
|
-
}
|
|
5774
|
+
});
|
|
5460
5775
|
/**
|
|
5461
5776
|
* Base styled textarea with shared styling
|
|
5462
5777
|
*/
|
|
@@ -5470,14 +5785,16 @@ var StyledTextAreaBase = styled.textarea.withConfig({
|
|
|
5470
5785
|
var templateObject_1$a, templateObject_2$9;
|
|
5471
5786
|
|
|
5472
5787
|
var field$2 = tokensJson.component.field;
|
|
5788
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
5789
|
+
var gap$2 = tokensJson.semantic.spacing.layout;
|
|
5473
5790
|
var StyledFieldContainer$2 = styled.div.withConfig({
|
|
5474
5791
|
displayName: "NumberInput__StyledFieldContainer",
|
|
5475
5792
|
componentId: "sc-qotc3w-0"
|
|
5476
|
-
})(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"])),
|
|
5793
|
+
})(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);
|
|
5477
5794
|
var StyledLabel$3 = styled.label.withConfig({
|
|
5478
5795
|
displayName: "NumberInput__StyledLabel",
|
|
5479
5796
|
componentId: "sc-qotc3w-1"
|
|
5480
|
-
})(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"])),
|
|
5797
|
+
})(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);
|
|
5481
5798
|
var StyledRequiredIndicator$2 = styled.span.withConfig({
|
|
5482
5799
|
displayName: "NumberInput__StyledRequiredIndicator",
|
|
5483
5800
|
componentId: "sc-qotc3w-2"
|
|
@@ -5789,14 +6106,16 @@ var PageTitle = function PageTitle(_a) {
|
|
|
5789
6106
|
var templateObject_1$8;
|
|
5790
6107
|
|
|
5791
6108
|
var field$1 = tokensJson.component.field;
|
|
6109
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
6110
|
+
var gap$1 = tokensJson.semantic.spacing.layout;
|
|
5792
6111
|
var StyledFieldContainer$1 = styled.div.withConfig({
|
|
5793
6112
|
displayName: "PasswordField__StyledFieldContainer",
|
|
5794
6113
|
componentId: "sc-1p15zk0-0"
|
|
5795
|
-
})(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"])),
|
|
6114
|
+
})(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);
|
|
5796
6115
|
var StyledLabel$2 = styled.label.withConfig({
|
|
5797
6116
|
displayName: "PasswordField__StyledLabel",
|
|
5798
6117
|
componentId: "sc-1p15zk0-1"
|
|
5799
|
-
})(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"])),
|
|
6118
|
+
})(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);
|
|
5800
6119
|
var StyledRequiredIndicator$1 = styled.span.withConfig({
|
|
5801
6120
|
displayName: "PasswordField__StyledRequiredIndicator",
|
|
5802
6121
|
componentId: "sc-1p15zk0-2"
|
|
@@ -5930,14 +6249,14 @@ var StyledInputWrapper = styled.div.withConfig({
|
|
|
5930
6249
|
displayName: "SearchField__StyledInputWrapper",
|
|
5931
6250
|
componentId: "sc-qhz9i8-1"
|
|
5932
6251
|
})(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) {
|
|
5933
|
-
return props.$isFocused && "\n border-color: ".concat(component.input.focus.borderColor, ";\n outline: ").concat(component.input.focus.outline, ";\n outline-offset: ").concat(
|
|
6252
|
+
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 ");
|
|
5934
6253
|
}, function (props) {
|
|
5935
6254
|
return props.$disabled && "\n background-color: ".concat(component.input.disabled.backgroundColor, ";\n border-color: ").concat(component.input.disabled.borderColor, ";\n cursor: not-allowed;\n ");
|
|
5936
6255
|
}, component.input.hover.borderColor);
|
|
5937
6256
|
var StyledInput = styled.input.withConfig({
|
|
5938
6257
|
displayName: "SearchField__StyledInput",
|
|
5939
6258
|
componentId: "sc-qhz9i8-2"
|
|
5940
|
-
})(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"],
|
|
6259
|
+
})(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);
|
|
5941
6260
|
var StyledSuggestionsList = styled.ul.withConfig({
|
|
5942
6261
|
displayName: "SearchField__StyledSuggestionsList",
|
|
5943
6262
|
componentId: "sc-qhz9i8-3"
|
|
@@ -6164,8 +6483,7 @@ var SearchField = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
6164
6483
|
children: [jsx(Icon, {
|
|
6165
6484
|
name: "search",
|
|
6166
6485
|
size: "sm",
|
|
6167
|
-
iconColor: "subdued"
|
|
6168
|
-
"aria-hidden": "true"
|
|
6486
|
+
iconColor: "subdued"
|
|
6169
6487
|
}), jsx(StyledInput, __assign({
|
|
6170
6488
|
ref: inputRef,
|
|
6171
6489
|
type: "text",
|
|
@@ -6231,8 +6549,7 @@ var SearchField = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
6231
6549
|
secondary: description,
|
|
6232
6550
|
icon: item.type === 'recent' ? jsx(Icon, {
|
|
6233
6551
|
name: "refresh",
|
|
6234
|
-
size: "xs"
|
|
6235
|
-
"aria-hidden": "true"
|
|
6552
|
+
size: "xs"
|
|
6236
6553
|
}) : undefined,
|
|
6237
6554
|
interactive: true,
|
|
6238
6555
|
selected: index === highlightedIndex,
|
|
@@ -6500,7 +6817,7 @@ var StyledTrack = styled.div.withConfig({
|
|
|
6500
6817
|
componentId: "sc-6mh2d4-3"
|
|
6501
6818
|
})(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) {
|
|
6502
6819
|
var $disabled = _a.$disabled;
|
|
6503
|
-
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.
|
|
6820
|
+
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.background.progressTrack;
|
|
6504
6821
|
}, semantic$1.border.radius.circle, function (_a) {
|
|
6505
6822
|
var $disabled = _a.$disabled;
|
|
6506
6823
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
@@ -6510,7 +6827,7 @@ var StyledTrackFill = styled.div.withConfig({
|
|
|
6510
6827
|
componentId: "sc-6mh2d4-4"
|
|
6511
6828
|
})(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) {
|
|
6512
6829
|
var $disabled = _a.$disabled;
|
|
6513
|
-
return $disabled ? semantic$1.color.
|
|
6830
|
+
return $disabled ? semantic$1.color.icon.disabled : semantic$1.color.background.emphasis;
|
|
6514
6831
|
}, semantic$1.border.radius.circle);
|
|
6515
6832
|
var StyledThumb = styled.div.withConfig({
|
|
6516
6833
|
displayName: "Slider__StyledThumb",
|
|
@@ -6520,7 +6837,7 @@ var StyledThumb = styled.div.withConfig({
|
|
|
6520
6837
|
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.background.subtle;
|
|
6521
6838
|
}, semantic$1.border.width.thick, function (_a) {
|
|
6522
6839
|
var $disabled = _a.$disabled;
|
|
6523
|
-
return $disabled ? semantic$1.color.
|
|
6840
|
+
return $disabled ? semantic$1.color.icon.disabled : semantic$1.color.background.emphasis;
|
|
6524
6841
|
}, semantic$1.border.radius.circle, function (_a) {
|
|
6525
6842
|
var $disabled = _a.$disabled;
|
|
6526
6843
|
return $disabled ? 'not-allowed' : 'grab';
|
|
@@ -6886,47 +7203,42 @@ var templateObject_1$4, templateObject_2$4, templateObject_3$4, templateObject_4
|
|
|
6886
7203
|
|
|
6887
7204
|
var semantic = tokensJson.semantic;
|
|
6888
7205
|
var StyledTabList = styled.div.withConfig({
|
|
6889
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6890
|
-
return !prop.startsWith('$');
|
|
6891
|
-
},
|
|
6892
7206
|
displayName: "TabBar__StyledTabList",
|
|
6893
7207
|
componentId: "sc-1g9ib0y-0"
|
|
6894
|
-
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n
|
|
6895
|
-
return props.$variant === 'pills' ? semantic.spacing.layout.sm : '0';
|
|
6896
|
-
}, function (props) {
|
|
6897
|
-
return props.$variant === 'underline' ? "".concat(semantic.border.width.thin, " solid ").concat(semantic.color.border.subtle) : 'none';
|
|
6898
|
-
}, tokensJson.component.tabBar.scrollbar.height, semantic.color.background.subtle, semantic.color.border["default"], semantic.border.radius.sm);
|
|
7208
|
+
})(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, tokensJson.component.tabBar.scrollbar.height, semantic.color.background.subtle, semantic.color.border["default"], semantic.border.radius.sm);
|
|
6899
7209
|
var StyledTab = styled.button.withConfig({
|
|
6900
7210
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6901
7211
|
return !prop.startsWith('$');
|
|
6902
7212
|
},
|
|
6903
7213
|
displayName: "TabBar__StyledTab",
|
|
6904
7214
|
componentId: "sc-1g9ib0y-1"
|
|
6905
|
-
})(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 /*
|
|
7215
|
+
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Selected tab: the light-blue selected treatment plus a blue underline (decisions 0016, 0020).\n The text darkens with the fill on hover and press so every state stays at least 4.5:1. */\n border-radius: ", " ", " 0 0;\n background-color: ", ";\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n height: ", ";\n background-color: ", ";\n transition: ", ";\n }\n\n &:hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n /* Disabled state */\n opacity: ", ";\n \n /* Focus state */\n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n z-index: 1;\n }\n\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Selected tab: the light-blue selected treatment plus a blue underline (decisions 0016, 0020).\n The text darkens with the fill on hover and press so every state stays at least 4.5:1. */\n border-radius: ", " ", " 0 0;\n background-color: ", ";\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n height: ", ";\n background-color: ", ";\n transition: ", ";\n }\n\n &:hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n /* Disabled state */\n opacity: ", ";\n \n /* Focus state */\n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n z-index: 1;\n }\n\n"])), semantic.spacing.layout.sm, semantic.spacing.layout.md, semantic.spacing.layout.lg, semantic.typography.button2, function (props) {
|
|
6906
7216
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
7217
|
+
}, semantic.motion.hover, semantic.border.radius.sm, semantic.border.radius.sm, function (props) {
|
|
7218
|
+
return props.$isActive ? semantic.color.background['interactive-subtle'] : 'transparent';
|
|
7219
|
+
}, function (props) {
|
|
7220
|
+
return props.$isActive ? semantic.color.text.interactive : semantic.color.text.subdued;
|
|
7221
|
+
}, semantic.border.width.thick, function (props) {
|
|
7222
|
+
return props.$isActive ? semantic.color.background.interactive : 'transparent';
|
|
6907
7223
|
}, semantic.motion.hover, function (props) {
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
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 ");
|
|
7224
|
+
return props.$isActive ? semantic.color.background['interactive-subtle-hover'] : 'transparent';
|
|
7225
|
+
}, function (props) {
|
|
7226
|
+
return props.$isActive ? semantic.color.text['interactive-hover'] : semantic.color.text["default"];
|
|
7227
|
+
}, function (props) {
|
|
7228
|
+
return props.$isActive ? semantic.color.background['interactive-subtle-active'] : 'transparent';
|
|
7229
|
+
}, function (props) {
|
|
7230
|
+
return props.$isActive ? semantic.color.text['interactive-active'] : semantic.color.text["default"];
|
|
6916
7231
|
}, function (props) {
|
|
6917
7232
|
return props.$disabled ? '0.5' : '1';
|
|
6918
7233
|
}, semantic.border.width.thick, semantic.color.border.strong, semantic.spacing.layout.xs);
|
|
6919
7234
|
var StyledBadge = styled.span.withConfig({
|
|
6920
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6921
|
-
return !prop.startsWith('$');
|
|
6922
|
-
},
|
|
6923
7235
|
displayName: "TabBar__StyledBadge",
|
|
6924
7236
|
componentId: "sc-1g9ib0y-2"
|
|
6925
7237
|
})(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"
|
|
6926
7238
|
/**
|
|
6927
7239
|
* TabBar component for tabbed navigation
|
|
6928
7240
|
*
|
|
6929
|
-
* Provides accessible tab navigation with
|
|
7241
|
+
* Provides accessible tab navigation with an underline style, keyboard support,
|
|
6930
7242
|
* and optional badge counts. Follows ARIA tablist pattern.
|
|
6931
7243
|
*
|
|
6932
7244
|
* @example
|
|
@@ -6941,16 +7253,13 @@ var StyledBadge = styled.span.withConfig({
|
|
|
6941
7253
|
* ]}
|
|
6942
7254
|
* activeTab={activeTab}
|
|
6943
7255
|
* onTabChange={setActiveTab}
|
|
6944
|
-
* variant="pills"
|
|
6945
7256
|
* />
|
|
6946
7257
|
* ```
|
|
6947
|
-
*/])), tokensJson.component.tabBar.badge.size, tokensJson.component.tabBar.badge.size, semantic.spacing.layout.xs, tokensJson.component.tabBar.badge.typography, tokensJson.component.tabBar.badge.fontWeight, semantic.border.radius.circle,
|
|
6948
|
-
return props.$variant === 'pills' && props.$isActive ? semantic.color.background['inverse-overlay'] : semantic.color.background.interactive;
|
|
6949
|
-
}, semantic.color.text.inverse);
|
|
7258
|
+
*/])), tokensJson.component.tabBar.badge.size, tokensJson.component.tabBar.badge.size, semantic.spacing.layout.xs, tokensJson.component.tabBar.badge.typography, tokensJson.component.tabBar.badge.fontWeight, semantic.border.radius.circle, semantic.color.background.interactive, semantic.color.text.inverse);
|
|
6950
7259
|
/**
|
|
6951
7260
|
* TabBar component for tabbed navigation
|
|
6952
7261
|
*
|
|
6953
|
-
* Provides accessible tab navigation with
|
|
7262
|
+
* Provides accessible tab navigation with an underline style, keyboard support,
|
|
6954
7263
|
* and optional badge counts. Follows ARIA tablist pattern.
|
|
6955
7264
|
*
|
|
6956
7265
|
* @example
|
|
@@ -6965,27 +7274,26 @@ var StyledBadge = styled.span.withConfig({
|
|
|
6965
7274
|
* ]}
|
|
6966
7275
|
* activeTab={activeTab}
|
|
6967
7276
|
* onTabChange={setActiveTab}
|
|
6968
|
-
* variant="pills"
|
|
6969
7277
|
* />
|
|
6970
7278
|
* ```
|
|
6971
7279
|
*/
|
|
6972
7280
|
var TabBar = function TabBar(_a) {
|
|
6973
7281
|
var tabs = _a.tabs,
|
|
6974
7282
|
activeTab = _a.activeTab,
|
|
6975
|
-
onTabChange = _a.onTabChange
|
|
6976
|
-
|
|
6977
|
-
variant
|
|
6978
|
-
|
|
6979
|
-
ariaLabel =
|
|
7283
|
+
onTabChange = _a.onTabChange;
|
|
7284
|
+
// Deprecated: every variant renders as underline (decision 0020)
|
|
7285
|
+
_a.variant;
|
|
7286
|
+
var _b = _a["aria-label"],
|
|
7287
|
+
ariaLabel = _b === void 0 ? 'Tab navigation' : _b,
|
|
6980
7288
|
dataTestId = _a["data-testid"];
|
|
6981
7289
|
var tabRefs = useRef([]);
|
|
6982
|
-
var
|
|
7290
|
+
var _c = useState(function () {
|
|
6983
7291
|
return tabs.findIndex(function (tab) {
|
|
6984
7292
|
return tab.id === activeTab;
|
|
6985
7293
|
});
|
|
6986
7294
|
}),
|
|
6987
|
-
focusedIndex =
|
|
6988
|
-
setFocusedIndex =
|
|
7295
|
+
focusedIndex = _c[0],
|
|
7296
|
+
setFocusedIndex = _c[1];
|
|
6989
7297
|
// Update focused index when active tab changes externally
|
|
6990
7298
|
useEffect(function () {
|
|
6991
7299
|
var newIndex = tabs.findIndex(function (tab) {
|
|
@@ -7060,7 +7368,6 @@ var TabBar = function TabBar(_a) {
|
|
|
7060
7368
|
}
|
|
7061
7369
|
};
|
|
7062
7370
|
return jsx(StyledTabList, {
|
|
7063
|
-
"$variant": variant,
|
|
7064
7371
|
role: "tablist",
|
|
7065
7372
|
"aria-label": ariaLabel,
|
|
7066
7373
|
"data-testid": dataTestId,
|
|
@@ -7069,7 +7376,6 @@ var TabBar = function TabBar(_a) {
|
|
|
7069
7376
|
ref: function ref(el) {
|
|
7070
7377
|
tabRefs.current[index] = el;
|
|
7071
7378
|
},
|
|
7072
|
-
"$variant": variant,
|
|
7073
7379
|
"$isActive": tab.id === activeTab,
|
|
7074
7380
|
"$disabled": tab.disabled || false,
|
|
7075
7381
|
role: "tab",
|
|
@@ -7085,8 +7391,6 @@ var TabBar = function TabBar(_a) {
|
|
|
7085
7391
|
},
|
|
7086
7392
|
"data-testid": "".concat(dataTestId, "-tab-").concat(tab.id),
|
|
7087
7393
|
children: [tab.label, typeof tab.badge === 'number' && tab.badge > 0 && jsx(StyledBadge, {
|
|
7088
|
-
"$variant": variant,
|
|
7089
|
-
"$isActive": tab.id === activeTab,
|
|
7090
7394
|
"aria-label": "".concat(tab.badge, " items"),
|
|
7091
7395
|
children: tab.badge > 99 ? '99+' : tab.badge
|
|
7092
7396
|
})]
|
|
@@ -7098,14 +7402,16 @@ TabBar.displayName = 'TabBar';
|
|
|
7098
7402
|
var templateObject_1$3, templateObject_2$3, templateObject_3$3;
|
|
7099
7403
|
|
|
7100
7404
|
var field = tokensJson.component.field;
|
|
7405
|
+
// Gaps come from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
7406
|
+
var gap = tokensJson.semantic.spacing.layout;
|
|
7101
7407
|
var StyledFieldContainer = styled.div.withConfig({
|
|
7102
7408
|
displayName: "TextField__StyledFieldContainer",
|
|
7103
7409
|
componentId: "sc-1ys3b0-0"
|
|
7104
|
-
})(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"])),
|
|
7410
|
+
})(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);
|
|
7105
7411
|
var StyledLabel = styled.label.withConfig({
|
|
7106
7412
|
displayName: "TextField__StyledLabel",
|
|
7107
7413
|
componentId: "sc-1ys3b0-1"
|
|
7108
|
-
})(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"])),
|
|
7414
|
+
})(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);
|
|
7109
7415
|
var StyledRequiredIndicator = styled.span.withConfig({
|
|
7110
7416
|
displayName: "TextField__StyledRequiredIndicator",
|
|
7111
7417
|
componentId: "sc-1ys3b0-2"
|
|
@@ -7238,9 +7544,9 @@ var StyledTruncatedText = styled.span.withConfig({
|
|
|
7238
7544
|
displayName: "TransactionListItem__StyledTruncatedText",
|
|
7239
7545
|
componentId: "sc-7yunm0-8"
|
|
7240
7546
|
})(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"
|
|
7241
|
-
// Map categories to
|
|
7547
|
+
// Map categories to CategoryLabel configurations
|
|
7242
7548
|
])));
|
|
7243
|
-
// Map categories to
|
|
7549
|
+
// Map categories to CategoryLabel configurations
|
|
7244
7550
|
var categoryConfig = {
|
|
7245
7551
|
shopping: {
|
|
7246
7552
|
color: 'purple',
|
|
@@ -7354,10 +7660,10 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
7354
7660
|
variant: "body",
|
|
7355
7661
|
children: merchant
|
|
7356
7662
|
})
|
|
7357
|
-
}), categoryData && jsx(
|
|
7663
|
+
}), categoryData && jsx(CategoryLabel, {
|
|
7358
7664
|
color: categoryData.color,
|
|
7359
7665
|
icon: categoryData.icon,
|
|
7360
|
-
size: "
|
|
7666
|
+
size: "medium",
|
|
7361
7667
|
variant: "minimal",
|
|
7362
7668
|
"aria-label": "Category: ".concat(categoryData.label),
|
|
7363
7669
|
children: categoryData.label
|
|
@@ -7390,20 +7696,14 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
7390
7696
|
})
|
|
7391
7697
|
})]
|
|
7392
7698
|
}), (hasReceipt || hasNote) && jsxs(StyledIconIndicator, {
|
|
7393
|
-
children: [hasReceipt && jsx(
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
"aria-label": "Has note",
|
|
7402
|
-
role: "img",
|
|
7403
|
-
children: jsx(Icon, {
|
|
7404
|
-
name: "paper",
|
|
7405
|
-
size: "xs"
|
|
7406
|
-
})
|
|
7699
|
+
children: [hasReceipt && jsx(Icon, {
|
|
7700
|
+
name: "fileDocSearch",
|
|
7701
|
+
size: "xs",
|
|
7702
|
+
"aria-label": "Has receipt"
|
|
7703
|
+
}), hasNote && jsx(Icon, {
|
|
7704
|
+
name: "paper",
|
|
7705
|
+
size: "xs",
|
|
7706
|
+
"aria-label": "Has note"
|
|
7407
7707
|
})]
|
|
7408
7708
|
})]
|
|
7409
7709
|
})]
|
|
@@ -7624,5 +7924,5 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
7624
7924
|
};
|
|
7625
7925
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35;
|
|
7626
7926
|
|
|
7627
|
-
export { Avatar as A, Badge as B, CategoryBadge as C, DateFormatter as D, EmptyState as E, FilterChip as F, GridCol as G,
|
|
7927
|
+
export { StyledInputBase as $, Avatar as A, Badge as B, CategoryBadge as C, DateFormatter as D, EmptyState as E, FilterChip as F, GridCol as G, FeatureBlock as H, InputChip as I, Dropdown as J, List as K, LegacyChip as L, MoneyDisplay as M, ListItem as N, Modal as O, Picture as P, NumberInput as Q, ResponsiveGrid as R, Stack as S, Tag as T, PageTitle as U, PasswordField as V, SearchField as W, Sheet as X, Slider as Y, TabBar as Z, TextField as _, Grid as a, StyledTextAreaBase as a0, TransactionListItem as a1, Box as b, Button as c, CategoryLabel as d, Chip as e, BooleanChip as f, Container$1 as g, Icon as h, IconButton as i, ProgressBar as j, Divider as k, StatusBadge as l, StatusLabel as m, Typography as n, AccountCard as o, ActionSheet as p, AgentInput as q, Alert as r, InlineAlert as s, Breadcrumbs as t, CardSmall as u, CardLarge as v, Checkbox as w, ChipGroup as x, CodeBlock as y, DateGroup as z };
|
|
7628
7928
|
//# sourceMappingURL=client.esm.js.map
|