@common-origin/design-system 2.13.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -184
- package/dist/client.esm.js +767 -466
- package/dist/client.esm.js.map +1 -1
- package/dist/client.js +766 -465
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.ts +2 -0
- package/dist/components/atoms/Chip/shared/utils.d.ts +3 -0
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +4 -0
- package/dist/components/layout/GridSystem/GridSystem.d.ts +6 -0
- package/dist/components/molecules/Alert/Alert.d.ts +2 -1
- package/dist/components/molecules/CardLarge/CardLarge.d.ts +3 -1
- package/dist/components/molecules/CardSmall/CardSmall.d.ts +2 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +2 -0
- package/dist/components/molecules/FeatureBlock/FeatureBlock.d.ts +2 -0
- package/dist/components/molecules/PageTitle/PageTitle.d.ts +13 -0
- package/dist/components/molecules/Sheet/Sheet.d.ts +2 -2
- package/dist/data.esm.js +236 -4
- package/dist/data.esm.js.map +1 -1
- package/dist/data.js +236 -4
- package/dist/data.js.map +1 -1
- package/dist/lib/styleUtils.d.ts +3 -0
- package/dist/lib/usePresence.d.ts +16 -0
- package/dist/styles/tokens.json +236 -4
- package/dist/tokens/index.esm.js +236 -4
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +236 -4
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/types/tokens.d.ts +232 -0
- package/dist/types/tokens.d.ts +232 -0
- package/package.json +5 -7
package/dist/client.js
CHANGED
|
@@ -111,10 +111,11 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
// Destructure tokens
|
|
114
|
-
var semantic$
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
var semantic$g = data.tokensJson.semantic;
|
|
115
|
+
var initials = data.tokensJson.component.avatar.initials;
|
|
116
|
+
var color$a = semantic$g.color,
|
|
117
|
+
size$1 = semantic$g.size,
|
|
118
|
+
border$a = semantic$g.border;
|
|
118
119
|
var radius$5 = border$a.radius;
|
|
119
120
|
var AvatarContainer = styled__default.default.div.withConfig({
|
|
120
121
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -122,7 +123,7 @@ var AvatarContainer = styled__default.default.div.withConfig({
|
|
|
122
123
|
},
|
|
123
124
|
displayName: "Avatar__AvatarContainer",
|
|
124
125
|
componentId: "sc-ezn4ax-0"
|
|
125
|
-
})(templateObject_1$
|
|
126
|
+
})(templateObject_1$L || (templateObject_1$L = __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) {
|
|
126
127
|
var $size = _a.$size;
|
|
127
128
|
return size$1.avatar[$size];
|
|
128
129
|
}, function (_a) {
|
|
@@ -135,26 +136,19 @@ var AvatarImage = styled__default.default.img.withConfig({
|
|
|
135
136
|
},
|
|
136
137
|
displayName: "Avatar__AvatarImage",
|
|
137
138
|
componentId: "sc-ezn4ax-1"
|
|
138
|
-
})(templateObject_2$
|
|
139
|
+
})(templateObject_2$w || (templateObject_2$w = __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);
|
|
139
140
|
var AvatarInitials = styled__default.default.span.withConfig({
|
|
140
141
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
141
142
|
return !prop.startsWith('$');
|
|
142
143
|
},
|
|
143
144
|
displayName: "Avatar__AvatarInitials",
|
|
144
145
|
componentId: "sc-ezn4ax-2"
|
|
145
|
-
})(templateObject_3$
|
|
146
|
+
})(templateObject_3$t || (templateObject_3$t = __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"
|
|
146
147
|
// Helper function to get initials from name
|
|
147
|
-
])),
|
|
148
|
+
])), initials.fontFamily, initials.fontWeight, function (_a) {
|
|
148
149
|
var $size = _a.$size;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
sm: data.tokensJson.base.fontSize[2],
|
|
152
|
-
md: data.tokensJson.base.fontSize[3],
|
|
153
|
-
lg: data.tokensJson.base.fontSize[4],
|
|
154
|
-
xl: data.tokensJson.base.fontSize[5]
|
|
155
|
-
};
|
|
156
|
-
return sizeMap[$size];
|
|
157
|
-
}, color$a.text["default"]);
|
|
150
|
+
return initials.fontSize[$size];
|
|
151
|
+
}, color$a.text["default"], initials.lineHeight);
|
|
158
152
|
// Helper function to get initials from name
|
|
159
153
|
var getInitials = function getInitials(name) {
|
|
160
154
|
return name.split(' ').map(function (word) {
|
|
@@ -208,29 +202,74 @@ var Avatar = function Avatar(_a) {
|
|
|
208
202
|
})
|
|
209
203
|
}));
|
|
210
204
|
};
|
|
205
|
+
var templateObject_1$L, templateObject_2$w, templateObject_3$t;
|
|
206
|
+
|
|
207
|
+
// Breakpoints from the semantic tokens (decision 0014)
|
|
208
|
+
var breakpoints$1 = {
|
|
209
|
+
xs: data.tokensJson.semantic.breakpoint.xs,
|
|
210
|
+
sm: data.tokensJson.semantic.breakpoint.sm,
|
|
211
|
+
md: data.tokensJson.semantic.breakpoint.md,
|
|
212
|
+
lg: data.tokensJson.semantic.breakpoint.lg,
|
|
213
|
+
xl: data.tokensJson.semantic.breakpoint.xl,
|
|
214
|
+
'2xl': data.tokensJson.semantic.breakpoint['2xl']
|
|
215
|
+
};
|
|
216
|
+
// Media query helpers
|
|
217
|
+
var media$1 = {
|
|
218
|
+
xs: "@media (min-width: ".concat(breakpoints$1.xs, ")"),
|
|
219
|
+
sm: "@media (min-width: ".concat(breakpoints$1.sm, ")"),
|
|
220
|
+
md: "@media (min-width: ".concat(breakpoints$1.md, ")"),
|
|
221
|
+
lg: "@media (min-width: ".concat(breakpoints$1.lg, ")"),
|
|
222
|
+
xl: "@media (min-width: ".concat(breakpoints$1.xl, ")"),
|
|
223
|
+
'2xl': "@media (min-width: ".concat(breakpoints$1['2xl'], ")")
|
|
224
|
+
};
|
|
225
|
+
// Wrap fallbacks for people who ask for less motion (decision 0005): movement becomes
|
|
226
|
+
// an instant change or a simple fade. Colour and opacity transitions need no fallback.
|
|
227
|
+
var reducedMotion = '@media (prefers-reduced-motion: reduce)';
|
|
228
|
+
// No `from` keyframe: the fade starts from the element's current opacity, including a
|
|
229
|
+
// still-running entrance, so closing mid-entrance doesn't jump back to fully visible.
|
|
230
|
+
var fadeOut$1 = styled.keyframes(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n to { opacity: 0; }\n"], ["\n to { opacity: 0; }\n"
|
|
231
|
+
// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of
|
|
232
|
+
// the element's `animation` declarations while it exits: the entrance stays in the list,
|
|
233
|
+
// so it isn't restarted, and the fade runs on top of it. A fade is already the
|
|
234
|
+
// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop
|
|
235
|
+
// still catches clicks (so they can't reach the page behind it) and the panel is inert.
|
|
236
|
+
])));
|
|
237
|
+
// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of
|
|
238
|
+
// the element's `animation` declarations while it exits: the entrance stays in the list,
|
|
239
|
+
// so it isn't restarted, and the fade runs on top of it. A fade is already the
|
|
240
|
+
// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop
|
|
241
|
+
// still catches clicks (so they can't reach the page behind it) and the panel is inert.
|
|
242
|
+
var exitAnimation = styled.css(templateObject_2$v || (templateObject_2$v = __makeTemplateObject([", ", " ", " ", " forwards"], [", ", " ", " ", " forwards"
|
|
243
|
+
// Content for screen readers only. The 1px size and -1px margin are part of the standard
|
|
244
|
+
// visually-hidden technique, not design values, so they aren't tokens.
|
|
245
|
+
])), fadeOut$1, data.tokensJson.semantic.motion.duration.fast, data.tokensJson.semantic.motion.easing.easeOut);
|
|
246
|
+
// Content for screen readers only. The 1px size and -1px margin are part of the standard
|
|
247
|
+
// visually-hidden technique, not design values, so they aren't tokens.
|
|
248
|
+
var visuallyHidden = styled.css(templateObject_3$s || (templateObject_3$s = __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"])));
|
|
211
249
|
var templateObject_1$K, templateObject_2$v, templateObject_3$s;
|
|
212
250
|
|
|
213
|
-
var _a$
|
|
214
|
-
typography$
|
|
215
|
-
color$9 = _a$
|
|
251
|
+
var _a$b = data.tokensJson.semantic,
|
|
252
|
+
typography$1 = _a$b.typography,
|
|
253
|
+
color$9 = _a$b.color,
|
|
254
|
+
letterSpacing = _a$b.letterSpacing;
|
|
216
255
|
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
217
256
|
var styles = {
|
|
218
|
-
display: "font: ".concat(typography$
|
|
219
|
-
h1: "font: ".concat(typography$
|
|
220
|
-
h2: "font: ".concat(typography$
|
|
221
|
-
h3: "font: ".concat(typography$
|
|
222
|
-
h4: "font: ".concat(typography$
|
|
223
|
-
h5: "font: ".concat(typography$
|
|
224
|
-
h6: "font: ".concat(typography$
|
|
225
|
-
subtitle: "font: ".concat(typography$
|
|
226
|
-
body: "font: ".concat(typography$
|
|
227
|
-
small: "font: ".concat(typography$
|
|
228
|
-
overline: "font: ".concat(typography$
|
|
229
|
-
caption: "font: ".concat(typography$
|
|
230
|
-
button1: "font: ".concat(typography$
|
|
231
|
-
button2: "font: ".concat(typography$
|
|
232
|
-
button3: "font: ".concat(typography$
|
|
233
|
-
label: "font: ".concat(typography$
|
|
257
|
+
display: "font: ".concat(typography$1.display, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
258
|
+
h1: "font: ".concat(typography$1.h1, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
259
|
+
h2: "font: ".concat(typography$1.h2, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
260
|
+
h3: "font: ".concat(typography$1.h3, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
261
|
+
h4: "font: ".concat(typography$1.h4, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
262
|
+
h5: "font: ".concat(typography$1.h5, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
263
|
+
h6: "font: ".concat(typography$1.h6, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
264
|
+
subtitle: "font: ".concat(typography$1.subtitle, ";"),
|
|
265
|
+
body: "font: ".concat(typography$1.body, ";"),
|
|
266
|
+
small: "font: ".concat(typography$1.small, ";"),
|
|
267
|
+
overline: "font: ".concat(typography$1.overline, ";"),
|
|
268
|
+
caption: "font: ".concat(typography$1.caption, "; text-transform: uppercase;"),
|
|
269
|
+
button1: "font: ".concat(typography$1.button1, ";"),
|
|
270
|
+
button2: "font: ".concat(typography$1.button2, ";"),
|
|
271
|
+
button3: "font: ".concat(typography$1.button3, ";"),
|
|
272
|
+
label: "font: ".concat(typography$1.label, ";")
|
|
234
273
|
};
|
|
235
274
|
return styles[variant] || styles.body;
|
|
236
275
|
};
|
|
@@ -275,7 +314,7 @@ var StyledTypography = styled__default.default.span.withConfig({
|
|
|
275
314
|
},
|
|
276
315
|
displayName: "Typography__StyledTypography",
|
|
277
316
|
componentId: "sc-17mqo4k-0"
|
|
278
|
-
})(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n
|
|
317
|
+
})(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n"], ["\n ", "\n color: ", ";\n margin: 0;\n"
|
|
279
318
|
/**
|
|
280
319
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
281
320
|
*
|
|
@@ -299,12 +338,6 @@ var StyledTypography = styled__default.default.span.withConfig({
|
|
|
299
338
|
}, function (_a) {
|
|
300
339
|
var $color = _a.$color;
|
|
301
340
|
return getTextColor($color);
|
|
302
|
-
}, function (_a) {
|
|
303
|
-
var $variant = _a.$variant;
|
|
304
|
-
if (['body', 'subtitle', 'small'].includes($variant)) {
|
|
305
|
-
return 'line-height: 1.5;';
|
|
306
|
-
}
|
|
307
|
-
return '';
|
|
308
341
|
});
|
|
309
342
|
/**
|
|
310
343
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
@@ -345,10 +378,14 @@ var Typography = function Typography(_a) {
|
|
|
345
378
|
};
|
|
346
379
|
var templateObject_1$J;
|
|
347
380
|
|
|
348
|
-
var semantic$
|
|
349
|
-
var color$8 = semantic$
|
|
350
|
-
border$9 = semantic$
|
|
381
|
+
var semantic$f = data.tokensJson.semantic;
|
|
382
|
+
var color$8 = semantic$f.color,
|
|
383
|
+
border$9 = semantic$f.border;
|
|
351
384
|
var radius$4 = border$9.radius;
|
|
385
|
+
var _a$a = data.tokensJson.component.badge,
|
|
386
|
+
dot = _a$a.dot,
|
|
387
|
+
count = _a$a.count,
|
|
388
|
+
ring = _a$a.ring;
|
|
352
389
|
var scaleIn$2 = styled.keyframes(templateObject_1$I || (templateObject_1$I = __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"])));
|
|
353
390
|
var BadgeWrapper = styled__default.default.span.withConfig({
|
|
354
391
|
displayName: "Badge__BadgeWrapper",
|
|
@@ -360,15 +397,15 @@ var BadgeIndicator = styled__default.default.span.withConfig({
|
|
|
360
397
|
},
|
|
361
398
|
displayName: "Badge__BadgeIndicator",
|
|
362
399
|
componentId: "sc-tjz4pp-1"
|
|
363
|
-
})(templateObject_3$r || (templateObject_3$r = __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:
|
|
400
|
+
})(templateObject_3$r || (templateObject_3$r = __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) {
|
|
364
401
|
return props.$isVisible ? 'flex' : 'none';
|
|
365
402
|
}, function (props) {
|
|
366
|
-
return props.$isDot ?
|
|
403
|
+
return props.$isDot ? dot.size : count.minWidth;
|
|
367
404
|
}, function (props) {
|
|
368
|
-
return props.$isDot ?
|
|
405
|
+
return props.$isDot ? dot.size : count.height;
|
|
369
406
|
}, function (props) {
|
|
370
|
-
return props.$isDot ? '0' :
|
|
371
|
-
}, radius$4.circle, color$8.background["default"], scaleIn$2, function (props) {
|
|
407
|
+
return props.$isDot ? '0' : "0 ".concat(count.paddingX);
|
|
408
|
+
}, radius$4.circle, count.lineHeight, ring.width, color$8.background["default"], scaleIn$2, semantic$f.motion.duration.normal, semantic$f.motion.easing.easeOut, reducedMotion, function (props) {
|
|
372
409
|
switch (props.$variant) {
|
|
373
410
|
case 'primary':
|
|
374
411
|
return "\n background-color: ".concat(color$8.background.interactive, ";\n color: ").concat(color$8.text.inverse, ";\n ");
|
|
@@ -385,7 +422,7 @@ var BadgeIndicator = styled__default.default.span.withConfig({
|
|
|
385
422
|
var ScreenReaderOnly$1 = styled__default.default.span.withConfig({
|
|
386
423
|
displayName: "Badge__ScreenReaderOnly",
|
|
387
424
|
componentId: "sc-tjz4pp-2"
|
|
388
|
-
})(templateObject_4$m || (templateObject_4$m = __makeTemplateObject(["\n
|
|
425
|
+
})(templateObject_4$m || (templateObject_4$m = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
389
426
|
var Badge = function Badge(_a) {
|
|
390
427
|
var children = _a.children,
|
|
391
428
|
_b = _a.count,
|
|
@@ -397,7 +434,8 @@ var Badge = function Badge(_a) {
|
|
|
397
434
|
_e = _a.dot,
|
|
398
435
|
dot = _e === void 0 ? false : _e,
|
|
399
436
|
ariaLabel = _a["aria-label"],
|
|
400
|
-
className = _a.className
|
|
437
|
+
className = _a.className,
|
|
438
|
+
dataTestId = _a["data-testid"];
|
|
401
439
|
var isVisible = dot || count > 0;
|
|
402
440
|
var displayCount = count > max ? "".concat(max, "+") : count.toString();
|
|
403
441
|
// Generate default aria-label if not provided
|
|
@@ -405,6 +443,7 @@ var Badge = function Badge(_a) {
|
|
|
405
443
|
var label = ariaLabel || defaultAriaLabel;
|
|
406
444
|
return jsxRuntime.jsxs(BadgeWrapper, {
|
|
407
445
|
className: className,
|
|
446
|
+
"data-testid": dataTestId,
|
|
408
447
|
children: [children, jsxRuntime.jsxs(BadgeIndicator, {
|
|
409
448
|
"$variant": variant,
|
|
410
449
|
"$isDot": dot,
|
|
@@ -440,21 +479,21 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
440
479
|
}, function (props) {
|
|
441
480
|
return props.$alignItems && styled.css(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
442
481
|
}, function (props) {
|
|
443
|
-
return props.$flexWrap && styled.css(templateObject_5$
|
|
482
|
+
return props.$flexWrap && styled.css(templateObject_5$h || (templateObject_5$h = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
444
483
|
}, function (props) {
|
|
445
484
|
return props.$gap && styled.css(templateObject_6$d || (templateObject_6$d = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$gap]);
|
|
446
485
|
}, function (props) {
|
|
447
486
|
return props.$m && styled.css(templateObject_7$b || (templateObject_7$b = __makeTemplateObject(["margin: ", ";"], ["margin: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$m]);
|
|
448
487
|
}, function (props) {
|
|
449
|
-
return props.$mt && styled.css(templateObject_8$
|
|
488
|
+
return props.$mt && styled.css(templateObject_8$8 || (templateObject_8$8 = __makeTemplateObject(["margin-top: ", ";"], ["margin-top: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$mt]);
|
|
450
489
|
}, function (props) {
|
|
451
|
-
return props.$mr && styled.css(templateObject_9$
|
|
490
|
+
return props.$mr && styled.css(templateObject_9$6 || (templateObject_9$6 = __makeTemplateObject(["margin-right: ", ";"], ["margin-right: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$mr]);
|
|
452
491
|
}, function (props) {
|
|
453
|
-
return props.$mb && styled.css(templateObject_10$
|
|
492
|
+
return props.$mb && styled.css(templateObject_10$4 || (templateObject_10$4 = __makeTemplateObject(["margin-bottom: ", ";"], ["margin-bottom: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$mb]);
|
|
454
493
|
}, function (props) {
|
|
455
|
-
return props.$ml && styled.css(templateObject_11$
|
|
494
|
+
return props.$ml && styled.css(templateObject_11$4 || (templateObject_11$4 = __makeTemplateObject(["margin-left: ", ";"], ["margin-left: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$ml]);
|
|
456
495
|
}, function (props) {
|
|
457
|
-
return props.$mx && styled.css(templateObject_12$
|
|
496
|
+
return props.$mx && styled.css(templateObject_12$4 || (templateObject_12$4 = __makeTemplateObject(["\n margin-left: ", ";\n margin-right: ", ";\n "], ["\n margin-left: ", ";\n margin-right: ", ";\n "])), data.tokensJson.semantic.spacing.layout[props.$mx], data.tokensJson.semantic.spacing.layout[props.$mx]);
|
|
458
497
|
}, function (props) {
|
|
459
498
|
return props.$my && styled.css(templateObject_13$3 || (templateObject_13$3 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n "])), data.tokensJson.semantic.spacing.layout[props.$my], data.tokensJson.semantic.spacing.layout[props.$my]);
|
|
460
499
|
}, function (props) {
|
|
@@ -466,7 +505,7 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
466
505
|
}, function (props) {
|
|
467
506
|
return props.$pb && styled.css(templateObject_17$2 || (templateObject_17$2 = __makeTemplateObject(["padding-bottom: ", ";"], ["padding-bottom: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$pb]);
|
|
468
507
|
}, function (props) {
|
|
469
|
-
return props.$pl && styled.css(templateObject_18$
|
|
508
|
+
return props.$pl && styled.css(templateObject_18$2 || (templateObject_18$2 = __makeTemplateObject(["padding-left: ", ";"], ["padding-left: ", ";"])), data.tokensJson.semantic.spacing.layout[props.$pl]);
|
|
470
509
|
}, function (props) {
|
|
471
510
|
return props.$px && styled.css(templateObject_19$1 || (templateObject_19$1 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n padding-left: ", ";\n padding-right: ", ";\n "])), data.tokensJson.semantic.spacing.layout[props.$px], data.tokensJson.semantic.spacing.layout[props.$px]);
|
|
472
511
|
}, function (props) {
|
|
@@ -496,15 +535,15 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
496
535
|
}, function (props) {
|
|
497
536
|
return props.$borderRadius && styled.css(templateObject_32$1 || (templateObject_32$1 = __makeTemplateObject(["border-radius: ", ";"], ["border-radius: ", ";"])), data.tokensJson.semantic.border.radius[props.$borderRadius]);
|
|
498
537
|
}, function (props) {
|
|
499
|
-
return props.$border && styled.css(templateObject_33$1 || (templateObject_33$1 = __makeTemplateObject(["border:
|
|
538
|
+
return props.$border && styled.css(templateObject_33$1 || (templateObject_33$1 = __makeTemplateObject(["border: ", " solid ", ";"], ["border: ", " solid ", ";"])), data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.color.border[props.$border]);
|
|
500
539
|
}, function (props) {
|
|
501
|
-
return props.$borderTop && styled.css(templateObject_34$1 || (templateObject_34$1 = __makeTemplateObject(["border-top:
|
|
540
|
+
return props.$borderTop && styled.css(templateObject_34$1 || (templateObject_34$1 = __makeTemplateObject(["border-top: ", " solid ", ";"], ["border-top: ", " solid ", ";"])), data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.color.border[props.$borderTop]);
|
|
502
541
|
}, function (props) {
|
|
503
|
-
return props.$borderRight && styled.css(templateObject_35$1 || (templateObject_35$1 = __makeTemplateObject(["border-right:
|
|
542
|
+
return props.$borderRight && styled.css(templateObject_35$1 || (templateObject_35$1 = __makeTemplateObject(["border-right: ", " solid ", ";"], ["border-right: ", " solid ", ";"])), data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.color.border[props.$borderRight]);
|
|
504
543
|
}, function (props) {
|
|
505
|
-
return props.$borderBottom && styled.css(templateObject_36 || (templateObject_36 = __makeTemplateObject(["border-bottom:
|
|
544
|
+
return props.$borderBottom && styled.css(templateObject_36 || (templateObject_36 = __makeTemplateObject(["border-bottom: ", " solid ", ";"], ["border-bottom: ", " solid ", ";"])), data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.color.border[props.$borderBottom]);
|
|
506
545
|
}, function (props) {
|
|
507
|
-
return props.$borderLeft && styled.css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["border-left:
|
|
546
|
+
return props.$borderLeft && styled.css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["border-left: ", " solid ", ";"], ["border-left: ", " solid ", ";"])), data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.color.border[props.$borderLeft]);
|
|
508
547
|
}, function (props) {
|
|
509
548
|
return props.$bg && styled.css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), data.tokensJson.semantic.color.background[props.$bg]);
|
|
510
549
|
}, function (props) {
|
|
@@ -516,7 +555,7 @@ var StyledBox = styled__default.default.div.withConfig({
|
|
|
516
555
|
}, function (props) {
|
|
517
556
|
return props.$transition && styled.css(templateObject_42 || (templateObject_42 = __makeTemplateObject(["transition: ", ";"], ["transition: ", ";"])), props.$transition);
|
|
518
557
|
}, function (props) {
|
|
519
|
-
return (props.$hoverShadow || props.$hoverTransform) && styled.css(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n &:hover {\n ", "\n ", "\n }\n \n &:active {\n transform: translateY(0);\n }\n \n &:focus-visible {\n outline:
|
|
558
|
+
return (props.$hoverShadow || props.$hoverTransform) && styled.css(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n &:hover {\n ", "\n ", "\n }\n \n &:active {\n transform: translateY(0);\n }\n \n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n "], ["\n &:hover {\n ", "\n ", "\n }\n \n &:active {\n transform: translateY(0);\n }\n \n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n "])), props.$hoverShadow && styled.css(templateObject_43 || (templateObject_43 = __makeTemplateObject(["box-shadow: ", ";"], ["box-shadow: ", ";"])), data.tokensJson.semantic.elevation[props.$hoverShadow]), props.$hoverTransform && styled.css(templateObject_44 || (templateObject_44 = __makeTemplateObject(["transform: ", ";"], ["transform: ", ";"])), props.$hoverTransform), data.tokensJson.semantic.border.width.thick, data.tokensJson.semantic.color.border.interactive, data.tokensJson.semantic.border.focusOffset);
|
|
520
559
|
}, function (props) {
|
|
521
560
|
return props.$overflow && styled.css(templateObject_46 || (templateObject_46 = __makeTemplateObject(["overflow: ", ";"], ["overflow: ", ";"])), props.$overflow);
|
|
522
561
|
}, function (props) {
|
|
@@ -656,7 +695,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
656
695
|
}));
|
|
657
696
|
};
|
|
658
697
|
var Box = BoxTransform;
|
|
659
|
-
var templateObject_1$H, templateObject_2$t, templateObject_3$q, templateObject_4$l, templateObject_5$
|
|
698
|
+
var templateObject_1$H, templateObject_2$t, templateObject_3$q, templateObject_4$l, 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$3, 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;
|
|
660
699
|
|
|
661
700
|
var IconStyled = styled__default.default.span.withConfig({
|
|
662
701
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -733,9 +772,9 @@ var Icon = function Icon(_a) {
|
|
|
733
772
|
var templateObject_1$G;
|
|
734
773
|
|
|
735
774
|
var button$1 = data.tokensJson.component.button,
|
|
736
|
-
semantic$
|
|
775
|
+
semantic$e = data.tokensJson.semantic;
|
|
737
776
|
// Base styles shared between button and link
|
|
738
|
-
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(data.tokensJson.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$
|
|
777
|
+
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(data.tokensJson.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$e.motion.hover, ";\n white-space: nowrap;\n user-select: none;\n \n &:focus {\n outline: ").concat(button$1.focus.outline, ";\n outline-offset: ").concat(button$1.focus.outlineOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n");
|
|
739
778
|
// Dynamic variant styles using component tokens
|
|
740
779
|
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
741
780
|
var $variant = _a.$variant;
|
|
@@ -855,8 +894,11 @@ var Button = function Button(_a) {
|
|
|
855
894
|
rest = __rest(_a, ["variant", "size", "url", "purpose", "children", "target", "iconName", "linkComponent", 'data-testid']);
|
|
856
895
|
// For links with custom link component (e.g., Next.js Link, React Router Link)
|
|
857
896
|
if (purpose === 'link' && url && LinkComponent) {
|
|
858
|
-
|
|
897
|
+
// The link component renders the <a>, so anchor attributes (id, aria-*, rel, handlers) go to it
|
|
898
|
+
var linkProps = rest;
|
|
899
|
+
return jsxRuntime.jsx(LinkComponent, __assign({}, linkProps, {
|
|
859
900
|
href: url,
|
|
901
|
+
target: target,
|
|
860
902
|
children: jsxRuntime.jsx(StyledLink, {
|
|
861
903
|
as: "span",
|
|
862
904
|
"$variant": variant,
|
|
@@ -864,18 +906,17 @@ var Button = function Button(_a) {
|
|
|
864
906
|
"data-testid": dataTestId,
|
|
865
907
|
children: renderButtonContent(children, iconName, size)
|
|
866
908
|
})
|
|
867
|
-
});
|
|
909
|
+
}));
|
|
868
910
|
}
|
|
869
911
|
// For standard links (external or without custom component)
|
|
870
912
|
if (purpose === 'link' && url) {
|
|
871
913
|
var linkProps = rest;
|
|
872
|
-
return jsxRuntime.jsx(StyledLink, __assign({
|
|
914
|
+
return jsxRuntime.jsx(StyledLink, __assign({}, linkProps, {
|
|
873
915
|
href: url,
|
|
874
916
|
target: target,
|
|
875
917
|
"$variant": variant,
|
|
876
918
|
"$size": size,
|
|
877
|
-
"data-testid": dataTestId
|
|
878
|
-
}, linkProps, {
|
|
919
|
+
"data-testid": dataTestId,
|
|
879
920
|
children: renderButtonContent(children, iconName, size)
|
|
880
921
|
}));
|
|
881
922
|
}
|
|
@@ -914,12 +955,11 @@ var Button = function Button(_a) {
|
|
|
914
955
|
};
|
|
915
956
|
var templateObject_1$F, templateObject_2$s;
|
|
916
957
|
|
|
917
|
-
var semantic$
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
spacing$7 = semantic$g.spacing;
|
|
958
|
+
var semantic$d = data.tokensJson.semantic;
|
|
959
|
+
var color$7 = semantic$d.color,
|
|
960
|
+
border$8 = semantic$d.border,
|
|
961
|
+
spacing$7 = semantic$d.spacing;
|
|
962
|
+
var label$2 = data.tokensJson.component.badge.label;
|
|
923
963
|
var category = color$7.category;
|
|
924
964
|
var radius$3 = border$8.radius;
|
|
925
965
|
var layout$4 = spacing$7.layout;
|
|
@@ -929,7 +969,7 @@ var StyledCategoryBadge = styled__default.default.span.withConfig({
|
|
|
929
969
|
},
|
|
930
970
|
displayName: "CategoryBadge__StyledCategoryBadge",
|
|
931
971
|
componentId: "sc-17aslpn-0"
|
|
932
|
-
})(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n
|
|
972
|
+
})(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\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 color: ", ";\n \n border-color: ", ";\n"], ["\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 color: ", ";\n \n border-color: ", ";\n"
|
|
933
973
|
/**
|
|
934
974
|
* CategoryBadge component for displaying transaction categories
|
|
935
975
|
*
|
|
@@ -947,7 +987,7 @@ var StyledCategoryBadge = styled__default.default.span.withConfig({
|
|
|
947
987
|
* Travel
|
|
948
988
|
* </CategoryBadge>
|
|
949
989
|
* ```
|
|
950
|
-
*/])), radius$3.circle,
|
|
990
|
+
*/])), radius$3.circle, semantic$d.border.width.thin, function (_a) {
|
|
951
991
|
var $size = _a.$size;
|
|
952
992
|
return $size === 'small' ? '24px' : '32px';
|
|
953
993
|
}, function (_a) {
|
|
@@ -955,8 +995,8 @@ var StyledCategoryBadge = styled__default.default.span.withConfig({
|
|
|
955
995
|
return $size === 'small' ? "".concat(layout$4.xs, " ").concat(layout$4.sm) : "".concat(layout$4.sm, " ").concat(layout$4.md);
|
|
956
996
|
}, function (_a) {
|
|
957
997
|
var $size = _a.$size;
|
|
958
|
-
return $size === 'small' ?
|
|
959
|
-
}, layout$4.xs, function (_a) {
|
|
998
|
+
return $size === 'small' ? label$2.typography.small : label$2.typography.medium;
|
|
999
|
+
}, label$2.fontWeight, layout$4.xs, function (_a) {
|
|
960
1000
|
var $color = _a.$color,
|
|
961
1001
|
$variant = _a.$variant;
|
|
962
1002
|
if ($variant === 'filled') {
|
|
@@ -1030,6 +1070,11 @@ CategoryBadge.displayName = 'CategoryBadge';
|
|
|
1030
1070
|
var templateObject_1$E;
|
|
1031
1071
|
|
|
1032
1072
|
var chip = data.tokensJson.component.chip;
|
|
1073
|
+
// Selected-chip hover and active colours have no token yet: they wait on #21 (selected states).
|
|
1074
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
1075
|
+
var SELECTED_HOVER = '#CAE8FF';
|
|
1076
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
1077
|
+
var SELECTED_ACTIVE = '#B5DEFF';
|
|
1033
1078
|
// Helper function to get variant styles matching Button's approach
|
|
1034
1079
|
var getVariantStyles = function getVariantStyles(_a) {
|
|
1035
1080
|
var $variant = _a.$variant,
|
|
@@ -1038,7 +1083,7 @@ var getVariantStyles = function getVariantStyles(_a) {
|
|
|
1038
1083
|
$disabled = _a.$disabled;
|
|
1039
1084
|
// Boolean chips with selected state get special background
|
|
1040
1085
|
if ($selected) {
|
|
1041
|
-
return "\n background-color: ".concat(data.tokensJson.semantic.color.background['interactive-subtle'], ";\n color: ").concat(chip["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? data.tokensJson.semantic.color.background['interactive-subtle'] : $clickable ?
|
|
1086
|
+
return "\n background-color: ".concat(data.tokensJson.semantic.color.background['interactive-subtle'], ";\n color: ").concat(chip["default"].textColor, ";\n \n &:hover {\n background-color: ").concat($disabled ? data.tokensJson.semantic.color.background['interactive-subtle'] : $clickable ? SELECTED_HOVER : data.tokensJson.semantic.color.background['interactive-subtle'], ";\n }\n \n &:active {\n background-color: ").concat($disabled ? data.tokensJson.semantic.color.background['interactive-subtle'] : $clickable ? SELECTED_ACTIVE : data.tokensJson.semantic.color.background['interactive-subtle'], ";\n }\n ");
|
|
1042
1087
|
}
|
|
1043
1088
|
switch ($variant) {
|
|
1044
1089
|
case 'emphasis':
|
|
@@ -1090,9 +1135,9 @@ var CloseButton = styled__default.default.button.withConfig({
|
|
|
1090
1135
|
},
|
|
1091
1136
|
displayName: "ChipBase__CloseButton",
|
|
1092
1137
|
componentId: "sc-moa6zc-2"
|
|
1093
|
-
})(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n padding:
|
|
1138
|
+
})(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n width: ", ";\n height: ", ";\n padding: ", ";\n border-radius: ", ";\n cursor: ", ";\n color: inherit;\n transition: ", ";\n \n &:hover:not(:disabled) {\n background-color: ", ";\n }\n \n &:active:not(:disabled) {\n background-color: ", ";\n }\n \n &:disabled {\n color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n border-radius: ", ";\n }\n"])), data.tokensJson.semantic.spacing.layout.sm, chip.closeButton.size, chip.closeButton.size, data.tokensJson.semantic.spacing.layout.none, data.tokensJson.semantic.border.radius.xs, function (props) {
|
|
1094
1139
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1095
|
-
}, data.tokensJson.semantic.motion.hover, data.tokensJson.semantic.color.text.disabled, chip.focus.outline, chip.focus.outlineOffset, chip["default"].borderRadius);
|
|
1140
|
+
}, data.tokensJson.semantic.motion.hover, data.tokensJson.semantic.color.background['hover-overlay'], data.tokensJson.semantic.color.background['active-overlay'], data.tokensJson.semantic.color.text.disabled, chip.focus.outline, chip.focus.outlineOffset, chip["default"].borderRadius);
|
|
1096
1141
|
var templateObject_1$D, templateObject_2$r, templateObject_3$p;
|
|
1097
1142
|
|
|
1098
1143
|
/**
|
|
@@ -1320,30 +1365,11 @@ var BooleanChip = function BooleanChip(_a) {
|
|
|
1320
1365
|
}));
|
|
1321
1366
|
};
|
|
1322
1367
|
|
|
1323
|
-
// Breakpoints using base tokens
|
|
1324
|
-
var breakpoints$1 = {
|
|
1325
|
-
xs: data.tokensJson.base.breakpoint.xs,
|
|
1326
|
-
sm: data.tokensJson.base.breakpoint.sm,
|
|
1327
|
-
md: data.tokensJson.base.breakpoint.md,
|
|
1328
|
-
lg: data.tokensJson.base.breakpoint.lg,
|
|
1329
|
-
xl: data.tokensJson.base.breakpoint.xl,
|
|
1330
|
-
'2xl': data.tokensJson.base.breakpoint['2xl']
|
|
1331
|
-
};
|
|
1332
|
-
// Media query helpers
|
|
1333
|
-
var media$1 = {
|
|
1334
|
-
xs: "@media (min-width: ".concat(breakpoints$1.xs, ")"),
|
|
1335
|
-
sm: "@media (min-width: ".concat(breakpoints$1.sm, ")"),
|
|
1336
|
-
md: "@media (min-width: ".concat(breakpoints$1.md, ")"),
|
|
1337
|
-
lg: "@media (min-width: ".concat(breakpoints$1.lg, ")"),
|
|
1338
|
-
xl: "@media (min-width: ".concat(breakpoints$1.xl, ")"),
|
|
1339
|
-
'2xl': "@media (min-width: ".concat(breakpoints$1['2xl'], ")")
|
|
1340
|
-
};
|
|
1341
|
-
|
|
1342
1368
|
var spacing$6 = data.tokensJson.semantic.spacing;
|
|
1343
1369
|
var StyledContainer$2 = styled__default.default.div.withConfig({
|
|
1344
1370
|
displayName: "Container__StyledContainer",
|
|
1345
1371
|
componentId: "sc-17dbj6n-0"
|
|
1346
|
-
})(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width:
|
|
1372
|
+
})(templateObject_1$C || (templateObject_1$C = __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$6.layout['2xl'], spacing$6.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']);
|
|
1347
1373
|
var Container$1 = function Container(_a) {
|
|
1348
1374
|
var children = _a.children,
|
|
1349
1375
|
props = __rest(_a, ["children"]);
|
|
@@ -1353,7 +1379,6 @@ var Container$1 = function Container(_a) {
|
|
|
1353
1379
|
};
|
|
1354
1380
|
var templateObject_1$C;
|
|
1355
1381
|
|
|
1356
|
-
var base$b = data.tokensJson.base;
|
|
1357
1382
|
var PictureWrapper = styled__default.default.div.withConfig({
|
|
1358
1383
|
displayName: "Picture__PictureWrapper",
|
|
1359
1384
|
componentId: "sc-11d9tei-0"
|
|
@@ -1361,15 +1386,15 @@ var PictureWrapper = styled__default.default.div.withConfig({
|
|
|
1361
1386
|
var ImageLink = styled__default.default.a.withConfig({
|
|
1362
1387
|
displayName: "Picture__ImageLink",
|
|
1363
1388
|
componentId: "sc-11d9tei-1"
|
|
1364
|
-
})(templateObject_2$q || (templateObject_2$q = __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"])),
|
|
1389
|
+
})(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n display: block;\n cursor: pointer;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"], ["\n display: block;\n cursor: pointer;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"])), data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut);
|
|
1365
1390
|
var ImageButton = styled__default.default.button.withConfig({
|
|
1366
1391
|
displayName: "Picture__ImageButton",
|
|
1367
1392
|
componentId: "sc-11d9tei-2"
|
|
1368
|
-
})(templateObject_3$o || (templateObject_3$o = __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"])),
|
|
1393
|
+
})(templateObject_3$o || (templateObject_3$o = __makeTemplateObject(["\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n display: block;\n width: 100%;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"], ["\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n display: block;\n width: 100%;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"])), data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut);
|
|
1369
1394
|
var StyledImage = styled__default.default.img.withConfig({
|
|
1370
1395
|
displayName: "Picture__StyledImage",
|
|
1371
1396
|
componentId: "sc-11d9tei-3"
|
|
1372
|
-
})(templateObject_4$k || (templateObject_4$k = __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"])),
|
|
1397
|
+
})(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n width: 100%;\n height: auto;\n border-radius: ", ";\n display: block;\n"], ["\n width: 100%;\n height: auto;\n border-radius: ", ";\n display: block;\n"])), data.tokensJson.semantic.border.radius.sm);
|
|
1373
1398
|
var Picture = function Picture(_a) {
|
|
1374
1399
|
var title = _a.title,
|
|
1375
1400
|
src = _a.src,
|
|
@@ -1401,16 +1426,16 @@ var Picture = function Picture(_a) {
|
|
|
1401
1426
|
};
|
|
1402
1427
|
var templateObject_1$B, templateObject_2$q, templateObject_3$o, templateObject_4$k;
|
|
1403
1428
|
|
|
1404
|
-
var _a$
|
|
1405
|
-
typography
|
|
1406
|
-
color$6 = _a$
|
|
1429
|
+
var _a$9 = data.tokensJson.semantic,
|
|
1430
|
+
typography = _a$9.typography,
|
|
1431
|
+
color$6 = _a$9.color;
|
|
1407
1432
|
var TimeStyled = styled__default.default.time.withConfig({
|
|
1408
1433
|
displayName: "DateFormatter__TimeStyled",
|
|
1409
1434
|
componentId: "sc-5464cc-0"
|
|
1410
1435
|
})(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
1411
1436
|
/**
|
|
1412
1437
|
* Formats a date with smart relative/absolute logic
|
|
1413
|
-
*/])), typography
|
|
1438
|
+
*/])), typography.label, color$6.text.subdued);
|
|
1414
1439
|
/**
|
|
1415
1440
|
* Formats a date with smart relative/absolute logic
|
|
1416
1441
|
*/
|
|
@@ -1458,17 +1483,17 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1458
1483
|
};
|
|
1459
1484
|
var templateObject_1$A;
|
|
1460
1485
|
|
|
1461
|
-
var motion$
|
|
1462
|
-
_a$
|
|
1463
|
-
iconButton = _a$
|
|
1464
|
-
button = _a$
|
|
1486
|
+
var motion$5 = data.tokensJson.semantic.motion,
|
|
1487
|
+
_a$8 = data.tokensJson.component,
|
|
1488
|
+
iconButton = _a$8.iconButton,
|
|
1489
|
+
button = _a$8.button;
|
|
1465
1490
|
var IconButtonStyled = styled__default.default.button.withConfig({
|
|
1466
1491
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1467
1492
|
return !prop.startsWith('$');
|
|
1468
1493
|
},
|
|
1469
1494
|
displayName: "IconButton__IconButtonStyled",
|
|
1470
1495
|
componentId: "sc-k8b14t-0"
|
|
1471
|
-
})(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border:
|
|
1496
|
+
})(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: ", " solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"], ["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: ", " solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"])), function (_a) {
|
|
1472
1497
|
var $variant = _a.$variant;
|
|
1473
1498
|
switch ($variant) {
|
|
1474
1499
|
case 'primary':
|
|
@@ -1492,7 +1517,7 @@ var IconButtonStyled = styled__default.default.button.withConfig({
|
|
|
1492
1517
|
default:
|
|
1493
1518
|
return button.primary.textColor;
|
|
1494
1519
|
}
|
|
1495
|
-
}, iconButton.primary.borderRadius, motion$
|
|
1520
|
+
}, iconButton.primary.borderRadius, motion$5.transition.normal, iconButton.primary.display, iconButton.primary.justifyContent, iconButton.primary.alignItems, function (_a) {
|
|
1496
1521
|
var $size = _a.$size;
|
|
1497
1522
|
return iconButton.sizes[$size].minWidth;
|
|
1498
1523
|
}, function (_a) {
|
|
@@ -1525,7 +1550,7 @@ var IconButtonStyled = styled__default.default.button.withConfig({
|
|
|
1525
1550
|
default:
|
|
1526
1551
|
return button.disabled.textColor;
|
|
1527
1552
|
}
|
|
1528
|
-
});
|
|
1553
|
+
}, data.tokensJson.semantic.border.width.thin);
|
|
1529
1554
|
var IconButton = function IconButton(_a) {
|
|
1530
1555
|
var variant = _a.variant,
|
|
1531
1556
|
_b = _a.size,
|
|
@@ -1591,7 +1616,7 @@ var StyledWrapper = styled__default.default.span.withConfig({
|
|
|
1591
1616
|
return $align;
|
|
1592
1617
|
}, function (_a) {
|
|
1593
1618
|
var $weight = _a.$weight;
|
|
1594
|
-
return $weight
|
|
1619
|
+
return data.tokensJson.semantic.fontWeight[$weight];
|
|
1595
1620
|
});
|
|
1596
1621
|
// Map size to Typography variant
|
|
1597
1622
|
var sizeToTypographyVariant = {
|
|
@@ -1690,14 +1715,14 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
1690
1715
|
var templateObject_1$y;
|
|
1691
1716
|
|
|
1692
1717
|
// Destructure tokens
|
|
1693
|
-
var semantic$
|
|
1694
|
-
var _a$
|
|
1718
|
+
var semantic$c = data.tokensJson.semantic;
|
|
1719
|
+
var _a$7 = __assign(__assign({}, semantic$c), {
|
|
1695
1720
|
component: data.tokensJson.component
|
|
1696
1721
|
}),
|
|
1697
|
-
color$5 = _a$
|
|
1698
|
-
border$7 = _a$
|
|
1699
|
-
motion$
|
|
1700
|
-
component$2 = _a$
|
|
1722
|
+
color$5 = _a$7.color,
|
|
1723
|
+
border$7 = _a$7.border,
|
|
1724
|
+
motion$4 = _a$7.motion,
|
|
1725
|
+
component$2 = _a$7.component;
|
|
1701
1726
|
var radius$2 = border$7.radius;
|
|
1702
1727
|
var ProgressBarContainer = styled__default.default.div.withConfig({
|
|
1703
1728
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1716,7 +1741,7 @@ var ProgressBarFill = styled__default.default.div.withConfig({
|
|
|
1716
1741
|
},
|
|
1717
1742
|
displayName: "ProgressBar__ProgressBarFill",
|
|
1718
1743
|
componentId: "sc-1nco33q-1"
|
|
1719
|
-
})(templateObject_7$a || (templateObject_7$a = __makeTemplateObject(["\n height: 100%;\n transition: ", ";\n\n ", "\n\n ", "\n\n ", "\n"], ["\n height: 100%;\n transition: ", ";\n\n ", "\n\n ", "\n\n ", "\n"])), motion$
|
|
1744
|
+
})(templateObject_7$a || (templateObject_7$a = __makeTemplateObject(["\n height: 100%;\n transition: ", ";\n\n ", " {\n transition: none;\n }\n\n ", "\n\n ", "\n\n ", "\n"], ["\n height: 100%;\n transition: ", ";\n\n ", " {\n transition: none;\n }\n\n ", "\n\n ", "\n\n ", "\n"])), motion$4.transition.normal, reducedMotion, function (props) {
|
|
1720
1745
|
var backgroundColor;
|
|
1721
1746
|
switch (props.$color) {
|
|
1722
1747
|
case 'success':
|
|
@@ -1732,7 +1757,7 @@ var ProgressBarFill = styled__default.default.div.withConfig({
|
|
|
1732
1757
|
}
|
|
1733
1758
|
return styled.css(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor);
|
|
1734
1759
|
}, function (props) {
|
|
1735
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_5$
|
|
1760
|
+
return props.$variant === 'horizontal' && styled.css(templateObject_5$g || (templateObject_5$g = __makeTemplateObject(["\n width: ", "%;\n "], ["\n width: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1736
1761
|
}, function (props) {
|
|
1737
1762
|
return props.$variant === 'vertical' && styled.css(templateObject_6$c || (templateObject_6$c = __makeTemplateObject(["\n width: 100%;\n height: ", "%;\n "], ["\n width: 100%;\n height: ", "%;\n "])), Math.min(100, Math.max(0, props.$value)));
|
|
1738
1763
|
});
|
|
@@ -1744,13 +1769,20 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1744
1769
|
color = _c === void 0 ? 'default' : _c,
|
|
1745
1770
|
height = _a.height,
|
|
1746
1771
|
width = _a.width,
|
|
1772
|
+
ariaLabel = _a["aria-label"],
|
|
1773
|
+
ariaLabelledBy = _a["aria-labelledby"],
|
|
1747
1774
|
dataTestId = _a["data-testid"];
|
|
1775
|
+
// Blank values are no name at all, so they fall back like missing ones
|
|
1776
|
+
var label = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
1777
|
+
var labelledBy = (ariaLabelledBy === null || ariaLabelledBy === void 0 ? void 0 : ariaLabelledBy.trim()) ? ariaLabelledBy : undefined;
|
|
1748
1778
|
return jsxRuntime.jsx(ProgressBarContainer, {
|
|
1749
1779
|
"$variant": variant,
|
|
1750
1780
|
"$height": height,
|
|
1751
1781
|
"$width": width,
|
|
1752
1782
|
"data-testid": dataTestId,
|
|
1753
1783
|
role: "progressbar",
|
|
1784
|
+
"aria-label": label !== null && label !== void 0 ? label : labelledBy ? undefined : 'Progress',
|
|
1785
|
+
"aria-labelledby": labelledBy,
|
|
1754
1786
|
"aria-valuenow": Math.min(100, Math.max(0, value)),
|
|
1755
1787
|
"aria-valuemin": 0,
|
|
1756
1788
|
"aria-valuemax": 100,
|
|
@@ -1761,7 +1793,7 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
1761
1793
|
})
|
|
1762
1794
|
});
|
|
1763
1795
|
};
|
|
1764
|
-
var templateObject_1$x, templateObject_2$p, templateObject_3$n, templateObject_4$j, templateObject_5$
|
|
1796
|
+
var templateObject_1$x, templateObject_2$p, templateObject_3$n, templateObject_4$j, templateObject_5$g, templateObject_6$c, templateObject_7$a;
|
|
1765
1797
|
|
|
1766
1798
|
// Destructure tokens for cleaner access
|
|
1767
1799
|
var separatorTokens = data.tokensJson.component.separator;
|
|
@@ -1794,9 +1826,9 @@ var StyledDivider = styled__default.default.div.withConfig({
|
|
|
1794
1826
|
var _b = _a.$orientation,
|
|
1795
1827
|
$orientation = _b === void 0 ? 'horizontal' : _b;
|
|
1796
1828
|
if ($orientation === 'vertical') {
|
|
1797
|
-
return "\n display: inline-block;\n height: auto;\n align-self: stretch;\n border-left:
|
|
1829
|
+
return "\n display: inline-block;\n height: auto;\n align-self: stretch;\n border-left: ".concat(data.tokensJson.semantic.border.width.thin, " solid;\n border-top: none;\n ");
|
|
1798
1830
|
}
|
|
1799
|
-
return "border-top:
|
|
1831
|
+
return "border-top: ".concat(data.tokensJson.semantic.border.width.thin, " solid;");
|
|
1800
1832
|
}, function (_a) {
|
|
1801
1833
|
var _b = _a.$variant,
|
|
1802
1834
|
$variant = _b === void 0 ? 'default' : _b,
|
|
@@ -1938,8 +1970,11 @@ var templateObject_1$v;
|
|
|
1938
1970
|
var statusColors = data.tokensJson.semantic.color.status;
|
|
1939
1971
|
var spacing$5 = data.tokensJson.semantic.spacing.layout;
|
|
1940
1972
|
var radius$1 = data.tokensJson.semantic.border.radius;
|
|
1941
|
-
var
|
|
1942
|
-
|
|
1973
|
+
var _a$6 = data.tokensJson.semantic.motion,
|
|
1974
|
+
transition = _a$6.transition,
|
|
1975
|
+
duration$3 = _a$6.duration,
|
|
1976
|
+
easing$3 = _a$6.easing;
|
|
1977
|
+
var label$1 = data.tokensJson.component.badge.label;
|
|
1943
1978
|
var scaleIn$1 = styled.keyframes(templateObject_1$u || (templateObject_1$u = __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"])));
|
|
1944
1979
|
var getStatusConfig = function getStatusConfig(status) {
|
|
1945
1980
|
var configs = {
|
|
@@ -1989,14 +2024,14 @@ var sizeConfig = {
|
|
|
1989
2024
|
small: {
|
|
1990
2025
|
height: '20px',
|
|
1991
2026
|
padding: "".concat(spacing$5.xs, " ").concat(spacing$5.sm),
|
|
1992
|
-
font:
|
|
2027
|
+
font: label$1.typography.small,
|
|
1993
2028
|
gap: spacing$5.xs,
|
|
1994
2029
|
iconSize: 'xs'
|
|
1995
2030
|
},
|
|
1996
2031
|
medium: {
|
|
1997
2032
|
height: '24px',
|
|
1998
2033
|
padding: "".concat(spacing$5.xs, " ").concat(spacing$5.sm),
|
|
1999
|
-
font:
|
|
2034
|
+
font: label$1.typography.medium,
|
|
2000
2035
|
gap: spacing$5.xs,
|
|
2001
2036
|
iconSize: 'sm'
|
|
2002
2037
|
}
|
|
@@ -2007,10 +2042,10 @@ var StyledStatusBadge = styled__default.default.span.withConfig({
|
|
|
2007
2042
|
},
|
|
2008
2043
|
displayName: "StatusBadge__StyledStatusBadge",
|
|
2009
2044
|
componentId: "sc-1paksgb-0"
|
|
2010
|
-
})(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n
|
|
2045
|
+
})(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\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 badge's dimensions */\n ", " {\n animation: none;\n transition: none;\n }\n \n /* Size styles */\n ", "\n \n /* Status color styles */\n ", "\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n 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 badge'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) {
|
|
2011
2046
|
var $size = _a.$size;
|
|
2012
2047
|
var size = sizeConfig[$size];
|
|
2013
|
-
return "\n height: ".concat(size.height, ";\n padding: ").concat(size.padding, ";\n font: ").concat(size.font, ";\n gap: ").concat(size.gap, ";\n ");
|
|
2048
|
+
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 ");
|
|
2014
2049
|
}, function (_a) {
|
|
2015
2050
|
var $status = _a.$status;
|
|
2016
2051
|
var config = getStatusConfig($status);
|
|
@@ -2019,7 +2054,7 @@ var StyledStatusBadge = styled__default.default.span.withConfig({
|
|
|
2019
2054
|
var ScreenReaderOnly = styled__default.default.span.withConfig({
|
|
2020
2055
|
displayName: "StatusBadge__ScreenReaderOnly",
|
|
2021
2056
|
componentId: "sc-1paksgb-1"
|
|
2022
|
-
})(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n
|
|
2057
|
+
})(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
2023
2058
|
/**
|
|
2024
2059
|
* StatusBadge component for displaying transaction or task status
|
|
2025
2060
|
*
|
|
@@ -2042,7 +2077,7 @@ var ScreenReaderOnly = styled__default.default.span.withConfig({
|
|
|
2042
2077
|
* liveRegion={true}
|
|
2043
2078
|
* />
|
|
2044
2079
|
* ```
|
|
2045
|
-
*/])));
|
|
2080
|
+
*/])), visuallyHidden);
|
|
2046
2081
|
/**
|
|
2047
2082
|
* StatusBadge component for displaying transaction or task status
|
|
2048
2083
|
*
|
|
@@ -2101,12 +2136,12 @@ var StatusBadge = function StatusBadge(_a) {
|
|
|
2101
2136
|
StatusBadge.displayName = 'StatusBadge';
|
|
2102
2137
|
var templateObject_1$u, templateObject_2$o, templateObject_3$m;
|
|
2103
2138
|
|
|
2104
|
-
var semantic$
|
|
2105
|
-
var color$4 = semantic$
|
|
2106
|
-
spacing$4 = semantic$
|
|
2107
|
-
border$6 = semantic$
|
|
2108
|
-
|
|
2109
|
-
|
|
2139
|
+
var semantic$b = data.tokensJson.semantic;
|
|
2140
|
+
var color$4 = semantic$b.color,
|
|
2141
|
+
spacing$4 = semantic$b.spacing,
|
|
2142
|
+
border$6 = semantic$b.border,
|
|
2143
|
+
size = semantic$b.size;
|
|
2144
|
+
var label = data.tokensJson.component.badge.label;
|
|
2110
2145
|
var layout$3 = spacing$4.layout;
|
|
2111
2146
|
var radius = border$6.radius;
|
|
2112
2147
|
var StyledTag = styled__default.default.span.withConfig({
|
|
@@ -2115,13 +2150,13 @@ var StyledTag = styled__default.default.span.withConfig({
|
|
|
2115
2150
|
},
|
|
2116
2151
|
displayName: "Tag__StyledTag",
|
|
2117
2152
|
componentId: "sc-lzfmti-0"
|
|
2118
|
-
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"
|
|
2153
|
+
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n font-weight: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n max-height: ", ";\n \n /* Size - fixed to small */\n padding: ", " ", ";\n font: ", ";\n font-weight: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"
|
|
2119
2154
|
/**
|
|
2120
2155
|
* Tag component for categorizing and labeling content
|
|
2121
2156
|
*
|
|
2122
2157
|
* A static, non-interactive label used to categorize elements or objects in the UI.
|
|
2123
2158
|
* Tags help users quickly identify and understand content classification.
|
|
2124
|
-
*/])), radius.sm, size.icon.lg || '2rem', layout$3.xs, layout$3.sm, typography
|
|
2159
|
+
*/])), radius.sm, size.icon.lg || '2rem', layout$3.xs, layout$3.sm, label.typography.small, label.fontWeight, function (_a) {
|
|
2125
2160
|
var $variant = _a.$variant;
|
|
2126
2161
|
switch ($variant) {
|
|
2127
2162
|
case 'interactive':
|
|
@@ -2159,17 +2194,17 @@ var StyledTag = styled__default.default.span.withConfig({
|
|
|
2159
2194
|
if (!$border) return 'none';
|
|
2160
2195
|
switch ($variant) {
|
|
2161
2196
|
case 'interactive':
|
|
2162
|
-
return "
|
|
2197
|
+
return "".concat(semantic$b.border.width.thin, " solid ").concat(color$4.border.interactive);
|
|
2163
2198
|
case 'success':
|
|
2164
|
-
return "
|
|
2199
|
+
return "".concat(semantic$b.border.width.thin, " solid ").concat(color$4.border.success);
|
|
2165
2200
|
case 'warning':
|
|
2166
|
-
return "
|
|
2201
|
+
return "".concat(semantic$b.border.width.thin, " solid ").concat(color$4.border.warning);
|
|
2167
2202
|
case 'error':
|
|
2168
|
-
return "
|
|
2203
|
+
return "".concat(semantic$b.border.width.thin, " solid ").concat(color$4.border.error);
|
|
2169
2204
|
case 'emphasis':
|
|
2170
|
-
return "
|
|
2205
|
+
return "".concat(semantic$b.border.width.thin, " solid ").concat(color$4.background.emphasis);
|
|
2171
2206
|
default:
|
|
2172
|
-
return "
|
|
2207
|
+
return "".concat(semantic$b.border.width.thin, " solid ").concat(color$4.border["default"]);
|
|
2173
2208
|
}
|
|
2174
2209
|
});
|
|
2175
2210
|
/**
|
|
@@ -2201,8 +2236,8 @@ var Tag = function Tag(_a) {
|
|
|
2201
2236
|
var templateObject_1$t;
|
|
2202
2237
|
|
|
2203
2238
|
// Destructure tokens for cleaner access
|
|
2204
|
-
var semantic$
|
|
2205
|
-
var spacing$3 = semantic$
|
|
2239
|
+
var semantic$a = data.tokensJson.semantic;
|
|
2240
|
+
var spacing$3 = semantic$a.spacing;
|
|
2206
2241
|
var layout$2 = spacing$3.layout;
|
|
2207
2242
|
var StyledBalanceSection = styled__default.default.div.withConfig({
|
|
2208
2243
|
displayName: "AccountCard__StyledBalanceSection",
|
|
@@ -2223,9 +2258,9 @@ var StyledStackWrapper = styled__default.default.div.withConfig({
|
|
|
2223
2258
|
var StyledHeaderWrapper = styled__default.default.div.withConfig({
|
|
2224
2259
|
displayName: "AccountCard__StyledHeaderWrapper",
|
|
2225
2260
|
componentId: "sc-1erp7zn-4"
|
|
2226
|
-
})(templateObject_5$
|
|
2261
|
+
})(templateObject_5$f || (templateObject_5$f = __makeTemplateObject(["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: -", ";\n }\n"], ["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: -", ";\n }\n"
|
|
2227
2262
|
// Map trend direction to icon and color
|
|
2228
|
-
])), layout$2.none, layout$2.xs);
|
|
2263
|
+
])), data.tokensJson.component.accountCard.header.minHeight, layout$2.none, layout$2.xs);
|
|
2229
2264
|
// Map trend direction to icon and color
|
|
2230
2265
|
var trendToIcon = {
|
|
2231
2266
|
up: 'arrowUp',
|
|
@@ -2274,15 +2309,14 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2274
2309
|
}
|
|
2275
2310
|
};
|
|
2276
2311
|
return jsxRuntime.jsx(Box, {
|
|
2277
|
-
minWidth:
|
|
2312
|
+
minWidth: data.tokensJson.component.accountCard.minWidth,
|
|
2278
2313
|
p: "lg",
|
|
2279
2314
|
bg: "subtle",
|
|
2280
2315
|
border: "default",
|
|
2281
2316
|
borderRadius: "xl",
|
|
2282
|
-
transition: "
|
|
2317
|
+
transition: "box-shadow ".concat(semantic$a.motion.duration.normal, " ").concat(semantic$a.motion.easing.easeOut),
|
|
2283
2318
|
cursor: isClickable ? 'pointer' : 'default',
|
|
2284
2319
|
hoverShadow: isClickable ? 'floating' : undefined,
|
|
2285
|
-
hoverTransform: isClickable ? 'translateY(-2px)' : undefined,
|
|
2286
2320
|
onClick: handleClick,
|
|
2287
2321
|
onKeyDown: handleKeyDown,
|
|
2288
2322
|
tabIndex: isClickable ? 0 : undefined,
|
|
@@ -2375,26 +2409,28 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2375
2409
|
})
|
|
2376
2410
|
});
|
|
2377
2411
|
};
|
|
2378
|
-
var templateObject_1$s, templateObject_2$n, templateObject_3$l, templateObject_4$i, templateObject_5$
|
|
2412
|
+
var templateObject_1$s, templateObject_2$n, templateObject_3$l, templateObject_4$i, templateObject_5$f;
|
|
2379
2413
|
|
|
2380
|
-
var semantic$
|
|
2381
|
-
|
|
2414
|
+
var semantic$9 = data.tokensJson.semantic;
|
|
2415
|
+
var _a$5 = semantic$9.motion,
|
|
2416
|
+
duration$2 = _a$5.duration,
|
|
2417
|
+
easing$2 = _a$5.easing;
|
|
2382
2418
|
var StyledListItem = styled__default.default.li.withConfig({
|
|
2383
2419
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2384
2420
|
return !prop.startsWith('$');
|
|
2385
2421
|
},
|
|
2386
2422
|
displayName: "ListItem__StyledListItem",
|
|
2387
2423
|
componentId: "sc-1wzzt21-0"
|
|
2388
|
-
})(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-height:
|
|
2424
|
+
})(templateObject_1$r || (templateObject_1$r = __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$9.size.touchTarget, function (_a) {
|
|
2389
2425
|
var $interactive = _a.$interactive;
|
|
2390
2426
|
return $interactive && 'user-select: none;';
|
|
2391
2427
|
}, function (_a) {
|
|
2392
2428
|
var $disabled = _a.$disabled;
|
|
2393
|
-
return $disabled && "\n opacity: ".concat(
|
|
2429
|
+
return $disabled && "\n opacity: ".concat(semantic$9.opacity.disabled, ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
2394
2430
|
}, function (_a) {
|
|
2395
2431
|
var $destructive = _a.$destructive,
|
|
2396
2432
|
$disabled = _a.$disabled;
|
|
2397
|
-
return $destructive && !$disabled && "\n color: ".concat(semantic$
|
|
2433
|
+
return $destructive && !$disabled && "\n color: ".concat(semantic$9.color.text.error, ";\n ");
|
|
2398
2434
|
});
|
|
2399
2435
|
var StyledItemContent = styled__default.default.div.withConfig({
|
|
2400
2436
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2402,13 +2438,13 @@ var StyledItemContent = styled__default.default.div.withConfig({
|
|
|
2402
2438
|
},
|
|
2403
2439
|
displayName: "ListItem__StyledItemContent",
|
|
2404
2440
|
componentId: "sc-1wzzt21-1"
|
|
2405
|
-
})(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n background-color: ", ";\n transition: background-color
|
|
2441
|
+
})(templateObject_2$m || (templateObject_2$m = __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$9.spacing.layout.md, function (_a) {
|
|
2406
2442
|
var $spacing = _a.$spacing;
|
|
2407
|
-
return $spacing === 'compact' ? "".concat(semantic$
|
|
2408
|
-
},
|
|
2443
|
+
return $spacing === 'compact' ? "".concat(semantic$9.spacing.layout.sm, " ").concat(semantic$9.spacing.layout.md) : "".concat(semantic$9.spacing.layout.md, " ").concat(semantic$9.spacing.layout.lg);
|
|
2444
|
+
}, semantic$9.border.radius.sm, function (_a) {
|
|
2409
2445
|
var $selected = _a.$selected;
|
|
2410
|
-
return $selected ? semantic$
|
|
2411
|
-
}, function (_a) {
|
|
2446
|
+
return $selected ? semantic$9.color.background['interactive-subtle'] : 'transparent';
|
|
2447
|
+
}, duration$2.fast, easing$2.easeOut, function (_a) {
|
|
2412
2448
|
var $interactive = _a.$interactive,
|
|
2413
2449
|
$disabled = _a.$disabled;
|
|
2414
2450
|
if ($disabled) return 'not-allowed';
|
|
@@ -2419,45 +2455,48 @@ var StyledItemContent = styled__default.default.div.withConfig({
|
|
|
2419
2455
|
$disabled = _a.$disabled,
|
|
2420
2456
|
$selected = _a.$selected;
|
|
2421
2457
|
return !$disabled && $interactive && "\n &:hover {\n background-color: ".concat($selected ? data.tokensJson.component.button.variants.secondary.backgroundColor : data.tokensJson.component.button.variants.secondary.backgroundColor, ";\n }\n \n &:active {\n background-color: ").concat(data.tokensJson.component.button.variants.naked.backgroundColor, ";\n }\n ");
|
|
2422
|
-
}, semantic$
|
|
2458
|
+
}, semantic$9.border.width.thick, semantic$9.color.border.interactive, semantic$9.border.focusOffset);
|
|
2423
2459
|
var StyledIconContainer$1 = styled__default.default.div.withConfig({
|
|
2424
2460
|
displayName: "ListItem__StyledIconContainer",
|
|
2425
2461
|
componentId: "sc-1wzzt21-2"
|
|
2426
|
-
})(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n width:
|
|
2462
|
+
})(templateObject_3$k || (templateObject_3$k = __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$9.size.icon.lg, semantic$9.size.icon.lg);
|
|
2427
2463
|
var StyledTextContent = styled__default.default.div.withConfig({
|
|
2428
2464
|
displayName: "ListItem__StyledTextContent",
|
|
2429
2465
|
componentId: "sc-1wzzt21-3"
|
|
2430
|
-
})(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$
|
|
2466
|
+
})(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text truncation */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text truncation */\n"])), semantic$9.spacing.layout.xs);
|
|
2431
2467
|
var StyledRightContent = styled__default.default.div.withConfig({
|
|
2432
2468
|
displayName: "ListItem__StyledRightContent",
|
|
2433
2469
|
componentId: "sc-1wzzt21-4"
|
|
2434
|
-
})(templateObject_5$
|
|
2470
|
+
})(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"])), semantic$9.spacing.layout.sm);
|
|
2435
2471
|
var StyledChevronIcon = styled__default.default.div.withConfig({
|
|
2436
2472
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2437
2473
|
return !prop.startsWith('$');
|
|
2438
2474
|
},
|
|
2439
2475
|
displayName: "ListItem__StyledChevronIcon",
|
|
2440
2476
|
componentId: "sc-1wzzt21-5"
|
|
2441
|
-
})(templateObject_6$b || (templateObject_6$b = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width:
|
|
2477
|
+
})(templateObject_6$b || (templateObject_6$b = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n color: ", ";\n transition: transform ", " ", ";\n transform: rotate(", ");\n pointer-events: none;\n\n ", " {\n transition: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n color: ", ";\n transition: transform ", " ", ";\n transform: rotate(", ");\n pointer-events: none;\n\n ", " {\n transition: none;\n }\n"])), semantic$9.size.icon.lg, semantic$9.size.icon.lg, semantic$9.color.icon.subdued, duration$2.fast, easing$2.easeOut, function (_a) {
|
|
2442
2478
|
var $expanded = _a.$expanded;
|
|
2443
2479
|
return $expanded ? '180deg' : '0deg';
|
|
2444
|
-
});
|
|
2480
|
+
}, reducedMotion);
|
|
2445
2481
|
var StyledExpandedContent = styled__default.default.div.withConfig({
|
|
2446
2482
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2447
2483
|
return !prop.startsWith('$');
|
|
2448
2484
|
},
|
|
2449
2485
|
displayName: "ListItem__StyledExpandedContent",
|
|
2450
2486
|
componentId: "sc-1wzzt21-6"
|
|
2451
|
-
})(templateObject_7$9 || (templateObject_7$9 = __makeTemplateObject(["\n overflow: hidden;\n transition: max-height
|
|
2487
|
+
})(templateObject_7$9 || (templateObject_7$9 = __makeTemplateObject(["\n overflow: hidden;\n /* Padding collapses with the height, and visibility hides the content from\n keyboard and screen readers once the collapse finishes. */\n transition: max-height ", " ", ",\n padding ", " ", ",\n opacity ", " ", ",\n visibility ", " ", ";\n max-height: ", ";\n opacity: ", ";\n visibility: ", ";\n\n ", " {\n transition: opacity ", " ", ",\n visibility ", " ", ";\n }\n \n ", "\n"], ["\n overflow: hidden;\n /* Padding collapses with the height, and visibility hides the content from\n keyboard and screen readers once the collapse finishes. */\n transition: max-height ", " ", ",\n padding ", " ", ",\n opacity ", " ", ",\n visibility ", " ", ";\n max-height: ", ";\n opacity: ", ";\n visibility: ", ";\n\n ", " {\n transition: opacity ", " ", ",\n visibility ", " ", ";\n }\n \n ", "\n"])), duration$2.normal, easing$2.easeOut, duration$2.normal, easing$2.easeOut, duration$2.normal, easing$2.easeOut, duration$2.normal, easing$2.easeOut, function (_a) {
|
|
2452
2488
|
var $expanded = _a.$expanded;
|
|
2453
2489
|
return $expanded ? '1000px' : '0';
|
|
2454
2490
|
}, function (_a) {
|
|
2455
2491
|
var $expanded = _a.$expanded;
|
|
2456
2492
|
return $expanded ? '1' : '0';
|
|
2457
2493
|
}, function (_a) {
|
|
2494
|
+
var $expanded = _a.$expanded;
|
|
2495
|
+
return $expanded ? 'visible' : 'hidden';
|
|
2496
|
+
}, reducedMotion, duration$2.normal, easing$2.easeOut, duration$2.normal, easing$2.easeOut, function (_a) {
|
|
2458
2497
|
var $expanded = _a.$expanded,
|
|
2459
2498
|
$spacing = _a.$spacing;
|
|
2460
|
-
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$
|
|
2499
|
+
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$9.spacing.layout.sm, " ").concat(semantic$9.spacing.layout.md, " ").concat(semantic$9.spacing.layout.sm, " ").concat(data.tokensJson.component.listItem.expandedIndent.compact) : "".concat(semantic$9.spacing.layout.sm, " ").concat(semantic$9.spacing.layout.lg, " ").concat(semantic$9.spacing.layout.md, " ").concat(data.tokensJson.component.listItem.expandedIndent.comfortable), ";\n background-color: ").concat(semantic$9.color.background['subtle'], ";\n border-radius: ").concat(semantic$9.border.radius.sm, ";\n margin: 0 ").concat($spacing === 'compact' ? semantic$9.spacing.layout.md : semantic$9.spacing.layout.lg, " ").concat($spacing === 'compact' ? semantic$9.spacing.layout.sm : semantic$9.spacing.layout.md, ";\n ");
|
|
2461
2500
|
});
|
|
2462
2501
|
var ListItem = function ListItem(_a) {
|
|
2463
2502
|
var primary = _a.primary,
|
|
@@ -2570,28 +2609,80 @@ var ListItem = function ListItem(_a) {
|
|
|
2570
2609
|
}));
|
|
2571
2610
|
};
|
|
2572
2611
|
ListItem.displayName = 'ListItem';
|
|
2573
|
-
var templateObject_1$r, templateObject_2$m, templateObject_3$k, templateObject_4$h, templateObject_5$
|
|
2612
|
+
var templateObject_1$r, templateObject_2$m, templateObject_3$k, templateObject_4$h, templateObject_5$e, templateObject_6$b, templateObject_7$9;
|
|
2613
|
+
|
|
2614
|
+
// How long an exiting element stays mounted: the duration of `exitAnimation` in styleUtils.
|
|
2615
|
+
var EXIT_DURATION_MS = parseInt(data.tokensJson.semantic.motion.duration.fast, 10);
|
|
2616
|
+
/**
|
|
2617
|
+
* Keeps an element mounted for `exitMs` after `isOpen` turns false, so its exit
|
|
2618
|
+
* animation can run before it unmounts (decision 0005).
|
|
2619
|
+
*/
|
|
2620
|
+
function usePresence(isOpen, exitMs) {
|
|
2621
|
+
if (exitMs === void 0) {
|
|
2622
|
+
exitMs = EXIT_DURATION_MS;
|
|
2623
|
+
}
|
|
2624
|
+
var _a = React.useState(isOpen),
|
|
2625
|
+
isMounted = _a[0],
|
|
2626
|
+
setIsMounted = _a[1];
|
|
2627
|
+
React.useEffect(function () {
|
|
2628
|
+
if (isOpen) {
|
|
2629
|
+
setIsMounted(true);
|
|
2630
|
+
return;
|
|
2631
|
+
}
|
|
2632
|
+
var timer = setTimeout(function () {
|
|
2633
|
+
return setIsMounted(false);
|
|
2634
|
+
}, exitMs);
|
|
2635
|
+
return function () {
|
|
2636
|
+
return clearTimeout(timer);
|
|
2637
|
+
};
|
|
2638
|
+
}, [isOpen, exitMs]);
|
|
2639
|
+
return {
|
|
2640
|
+
isPresent: isOpen || isMounted,
|
|
2641
|
+
isExiting: !isOpen && isMounted
|
|
2642
|
+
};
|
|
2643
|
+
}
|
|
2644
|
+
/**
|
|
2645
|
+
* Makes an element inert while `isInert` is true, so an exiting overlay's controls leave
|
|
2646
|
+
* the tab order and can't be activated. Set through the DOM because React 18 has no
|
|
2647
|
+
* `inert` prop.
|
|
2648
|
+
*/
|
|
2649
|
+
function useInert(ref, isInert) {
|
|
2650
|
+
React.useEffect(function () {
|
|
2651
|
+
var node = ref.current;
|
|
2652
|
+
if (!node) return;
|
|
2653
|
+
if (isInert) node.setAttribute('inert', '');else node.removeAttribute('inert');
|
|
2654
|
+
}, [ref, isInert]);
|
|
2655
|
+
}
|
|
2574
2656
|
|
|
2575
2657
|
var _a$4 = data.tokensJson.semantic,
|
|
2576
2658
|
color$3 = _a$4.color,
|
|
2577
2659
|
border$5 = _a$4.border,
|
|
2578
2660
|
layout$1 = _a$4.spacing.layout,
|
|
2579
|
-
motion = _a$4.motion,
|
|
2580
|
-
elevation$
|
|
2661
|
+
motion$3 = _a$4.motion,
|
|
2662
|
+
elevation$2 = _a$4.elevation;
|
|
2581
2663
|
var slideUp = styled.keyframes(templateObject_1$q || (templateObject_1$q = __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"])));
|
|
2582
2664
|
var fadeIn$2 = styled.keyframes(templateObject_2$l || (templateObject_2$l = __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"])));
|
|
2583
2665
|
var StyledOverlay$2 = styled__default.default.div.withConfig({
|
|
2584
2666
|
displayName: "ActionSheet__StyledOverlay",
|
|
2585
2667
|
componentId: "sc-regbol-0"
|
|
2586
|
-
})(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n position: fixed;\n inset: 0;\n background-color:
|
|
2668
|
+
})(templateObject_3$j || (templateObject_3$j = __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$3.background.overlay, data.tokensJson.semantic.zIndex.modal, fadeIn$2, motion$3.duration.normal, motion$3.easing.easeOut, function (_a) {
|
|
2669
|
+
var $isExiting = _a.$isExiting;
|
|
2670
|
+
return $isExiting && exitAnimation;
|
|
2671
|
+
});
|
|
2587
2672
|
var StyledActionSheet = styled__default.default.div.withConfig({
|
|
2588
2673
|
displayName: "ActionSheet__StyledActionSheet",
|
|
2589
2674
|
componentId: "sc-regbol-1"
|
|
2590
|
-
})(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:
|
|
2675
|
+
})(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"], ["\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n box-shadow: ", ";\n max-height: 90vh;\n overflow-y: auto;\n z-index: ", ";\n animation: ", " ", " ", "", ";\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n"])), color$3.background.subtle, border$5.radius.lg, border$5.radius.lg, elevation$2.overlay, data.tokensJson.semantic.zIndex.modal, slideUp, motion$3.duration.slow, motion$3.easing.easeOut, function (_a) {
|
|
2676
|
+
var $isExiting = _a.$isExiting;
|
|
2677
|
+
return $isExiting && exitAnimation;
|
|
2678
|
+
}, reducedMotion, fadeIn$2, motion$3.duration.slow, motion$3.easing.easeOut, function (_a) {
|
|
2679
|
+
var $isExiting = _a.$isExiting;
|
|
2680
|
+
return $isExiting && exitAnimation;
|
|
2681
|
+
});
|
|
2591
2682
|
var StyledHeader$2 = styled__default.default.div.withConfig({
|
|
2592
2683
|
displayName: "ActionSheet__StyledHeader",
|
|
2593
2684
|
componentId: "sc-regbol-2"
|
|
2594
|
-
})(templateObject_5$
|
|
2685
|
+
})(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"], ["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: ", " ", " ", ";\n border-bottom: ", ";\n"])), layout$1.lg, layout$1.lg, layout$1.md, border$5["default"]);
|
|
2595
2686
|
var StyledHeaderContent = styled__default.default.div.withConfig({
|
|
2596
2687
|
displayName: "ActionSheet__StyledHeaderContent",
|
|
2597
2688
|
componentId: "sc-regbol-3"
|
|
@@ -2599,11 +2690,11 @@ var StyledHeaderContent = styled__default.default.div.withConfig({
|
|
|
2599
2690
|
var StyledCloseButton = styled__default.default.button.withConfig({
|
|
2600
2691
|
displayName: "ActionSheet__StyledCloseButton",
|
|
2601
2692
|
componentId: "sc-regbol-4"
|
|
2602
|
-
})(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$3.icon.subdued, border$5.radius.sm, motion.hover, layout$1.sm, color$3.icon["default"], color$3.background.surface, border$5.focus, layout$1.xs);
|
|
2693
|
+
})(templateObject_7$8 || (templateObject_7$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ", ";\n border: none;\n background: transparent;\n color: ", ";\n cursor: pointer;\n border-radius: ", ";\n transition: ", ";\n margin-left: ", ";\n \n &:hover {\n color: ", ";\n background-color: ", ";\n }\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), layout$1.sm, color$3.icon.subdued, border$5.radius.sm, motion$3.hover, layout$1.sm, color$3.icon["default"], color$3.background.surface, border$5.focus, layout$1.xs);
|
|
2603
2694
|
var StyledActionsList = styled__default.default.ul.withConfig({
|
|
2604
2695
|
displayName: "ActionSheet__StyledActionsList",
|
|
2605
2696
|
componentId: "sc-regbol-5"
|
|
2606
|
-
})(templateObject_8$
|
|
2697
|
+
})(templateObject_8$7 || (templateObject_8$7 = __makeTemplateObject(["\n padding: ", " ", ";\n margin: 0;\n list-style: none;\n"], ["\n padding: ", " ", ";\n margin: 0;\n list-style: none;\n"
|
|
2607
2698
|
/**
|
|
2608
2699
|
* ActionSheet component for bottom sheet modals
|
|
2609
2700
|
*
|
|
@@ -2685,6 +2776,10 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2685
2776
|
dataTestId = _a["data-testid"];
|
|
2686
2777
|
var sheetRef = React.useRef(null);
|
|
2687
2778
|
var previousActiveElement = React.useRef(null);
|
|
2779
|
+
var _e = usePresence(isOpen),
|
|
2780
|
+
isPresent = _e.isPresent,
|
|
2781
|
+
isExiting = _e.isExiting;
|
|
2782
|
+
useInert(sheetRef, isExiting);
|
|
2688
2783
|
// Store the element that had focus when sheet opened
|
|
2689
2784
|
React.useEffect(function () {
|
|
2690
2785
|
if (isOpen) {
|
|
@@ -2715,7 +2810,7 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2715
2810
|
};
|
|
2716
2811
|
document.addEventListener('keydown', handleKeyDown);
|
|
2717
2812
|
// Focus first focusable element (button or element with role="button")
|
|
2718
|
-
requestAnimationFrame(function () {
|
|
2813
|
+
var frame = requestAnimationFrame(function () {
|
|
2719
2814
|
var _a;
|
|
2720
2815
|
var firstFocusable = (_a = sheetRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('button:not(:disabled), [role="button"][tabindex]:not([aria-disabled="true"])');
|
|
2721
2816
|
firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
|
|
@@ -2724,6 +2819,8 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2724
2819
|
var originalOverflow = document.body.style.overflow;
|
|
2725
2820
|
document.body.style.overflow = 'hidden';
|
|
2726
2821
|
return function () {
|
|
2822
|
+
// A quick close cancels the pending focus, so it can't pull focus back into the exiting sheet
|
|
2823
|
+
cancelAnimationFrame(frame);
|
|
2727
2824
|
document.removeEventListener('keydown', handleKeyDown);
|
|
2728
2825
|
document.body.style.overflow = originalOverflow;
|
|
2729
2826
|
// Return focus to previous element
|
|
@@ -2733,7 +2830,8 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2733
2830
|
};
|
|
2734
2831
|
}, [isOpen, onClose, closeOnEscape]);
|
|
2735
2832
|
var handleOverlayClick = function handleOverlayClick(e) {
|
|
2736
|
-
|
|
2833
|
+
// While exiting, the backdrop still catches clicks but doesn't close again
|
|
2834
|
+
if (!isExiting && closeOnOverlayClick && e.target === e.currentTarget) {
|
|
2737
2835
|
onClose();
|
|
2738
2836
|
}
|
|
2739
2837
|
};
|
|
@@ -2743,7 +2841,8 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2743
2841
|
onClose();
|
|
2744
2842
|
}
|
|
2745
2843
|
};
|
|
2746
|
-
|
|
2844
|
+
// Stays mounted while the exit fade runs, hidden from assistive technology
|
|
2845
|
+
if (!isPresent) return null;
|
|
2747
2846
|
// Find if there are any destructive actions to add divider
|
|
2748
2847
|
var destructiveIndex = actions.findIndex(function (a) {
|
|
2749
2848
|
return a.destructive;
|
|
@@ -2751,11 +2850,14 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2751
2850
|
var hasDestructive = destructiveIndex >= 0;
|
|
2752
2851
|
return /*#__PURE__*/reactDom.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2753
2852
|
children: [jsxRuntime.jsx(StyledOverlay$2, {
|
|
2754
|
-
onClick: handleOverlayClick
|
|
2853
|
+
onClick: handleOverlayClick,
|
|
2854
|
+
"$isExiting": isExiting
|
|
2755
2855
|
}), jsxRuntime.jsxs(StyledActionSheet, {
|
|
2756
2856
|
ref: sheetRef,
|
|
2757
2857
|
role: "dialog",
|
|
2758
2858
|
"aria-modal": "true",
|
|
2859
|
+
"aria-hidden": isExiting || undefined,
|
|
2860
|
+
"$isExiting": isExiting,
|
|
2759
2861
|
"aria-labelledby": title ? 'action-sheet-title' : undefined,
|
|
2760
2862
|
"aria-describedby": description ? 'action-sheet-description' : undefined,
|
|
2761
2863
|
"data-testid": dataTestId,
|
|
@@ -2815,7 +2917,7 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
2815
2917
|
})]
|
|
2816
2918
|
}), document.body);
|
|
2817
2919
|
};
|
|
2818
|
-
var templateObject_1$q, templateObject_2$l, templateObject_3$j, templateObject_4$g, templateObject_5$
|
|
2920
|
+
var templateObject_1$q, templateObject_2$l, templateObject_3$j, templateObject_4$g, templateObject_5$d, templateObject_6$a, templateObject_7$8, templateObject_8$7;
|
|
2819
2921
|
|
|
2820
2922
|
function detectSpeechRecognitionConstructor(targetWindow) {
|
|
2821
2923
|
if (!targetWindow) return null;
|
|
@@ -2915,8 +3017,7 @@ function agentInputStateTransition(currentState, event) {
|
|
|
2915
3017
|
}
|
|
2916
3018
|
}
|
|
2917
3019
|
|
|
2918
|
-
var semantic$
|
|
2919
|
-
base$9 = data.tokensJson.base,
|
|
3020
|
+
var semantic$8 = data.tokensJson.semantic,
|
|
2920
3021
|
component$1 = data.tokensJson.component;
|
|
2921
3022
|
var DEFAULT_IDLE_HELPER = 'Ask about transactions, spending, or transfers';
|
|
2922
3023
|
var DEFAULT_LISTENING_MESSAGE = 'Listening… speak now';
|
|
@@ -2925,7 +3026,7 @@ var rotateRing = styled.keyframes(templateObject_1$p || (templateObject_1$p = __
|
|
|
2925
3026
|
var Container = styled__default.default.div.withConfig({
|
|
2926
3027
|
displayName: "AgentInput__Container",
|
|
2927
3028
|
componentId: "sc-fhl996-0"
|
|
2928
|
-
})(templateObject_2$k || (templateObject_2$k = __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"])),
|
|
3029
|
+
})(templateObject_2$k || (templateObject_2$k = __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$8.spacing.layout.sm);
|
|
2929
3030
|
var ControlsRow = styled__default.default.div.withConfig({
|
|
2930
3031
|
displayName: "AgentInput__ControlsRow",
|
|
2931
3032
|
componentId: "sc-fhl996-1"
|
|
@@ -2933,73 +3034,79 @@ var ControlsRow = styled__default.default.div.withConfig({
|
|
|
2933
3034
|
var InputShell = styled__default.default.div.withConfig({
|
|
2934
3035
|
displayName: "AgentInput__InputShell",
|
|
2935
3036
|
componentId: "sc-fhl996-2"
|
|
2936
|
-
})(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
|
|
3037
|
+
})(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n width: 100%;\n padding: ", " ", " ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n transition: border-color ", " ", ", outline ", " ", ";\n\n &:focus-within {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n\n &[data-disabled='true'] {\n background-color: ", ";\n border-color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n width: 100%;\n padding: ", " ", " ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n transition: border-color ", " ", ", outline ", " ", ";\n\n &:focus-within {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n\n &[data-disabled='true'] {\n background-color: ", ";\n border-color: ", ";\n }\n"])), semantic$8.spacing.layout.sm, semantic$8.spacing.layout.xs, semantic$8.spacing.layout.sm, semantic$8.spacing.layout.xs, component$1.input["default"].paddingX, component$1.input["default"].backgroundColor, component$1.input["default"].borderWidth, component$1.input["default"].borderColor, semantic$8.border.radius['3xl'], semantic$8.elevation.raised, semantic$8.motion.duration.normal, semantic$8.motion.easing.easeInOut, semantic$8.motion.duration.normal, semantic$8.motion.easing.easeInOut, component$1.input.focus.borderColor, component$1.input.focus.outline, component$1.input.focus.outlineOffset, component$1.input.disabled.backgroundColor, component$1.input.disabled.borderColor);
|
|
2937
3038
|
var Input = styled__default.default.input.withConfig({
|
|
2938
3039
|
displayName: "AgentInput__Input",
|
|
2939
3040
|
componentId: "sc-fhl996-3"
|
|
2940
|
-
})(templateObject_5$
|
|
3041
|
+
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n flex: 1;\n min-width: 0;\n min-height: ", ";\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$8.spacing.layout['7xl'], semantic$8.typography.body, semantic$8.color.text["default"], semantic$8.color.text.subdued, semantic$8.color.text.disabled);
|
|
2941
3042
|
var InputActions = styled__default.default.div.withConfig({
|
|
2942
3043
|
displayName: "AgentInput__InputActions",
|
|
2943
3044
|
componentId: "sc-fhl996-4"
|
|
2944
|
-
})(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$
|
|
3045
|
+
})(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"])), semantic$8.spacing.layout.sm);
|
|
2945
3046
|
var CircularActionIconButton = styled__default.default(IconButton).withConfig({
|
|
2946
3047
|
displayName: "AgentInput__CircularActionIconButton",
|
|
2947
3048
|
componentId: "sc-fhl996-5"
|
|
2948
|
-
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$
|
|
3049
|
+
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$8.border.radius.circle);
|
|
2949
3050
|
var InputWrapper = styled__default.default.div.withConfig({
|
|
2950
3051
|
displayName: "AgentInput__InputWrapper",
|
|
2951
3052
|
componentId: "sc-fhl996-6"
|
|
2952
|
-
})(templateObject_8$
|
|
3053
|
+
})(templateObject_8$6 || (templateObject_8$6 = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n"], ["\n flex: 1;\n min-width: 0;\n"])));
|
|
2953
3054
|
var MicButtonWrapper = styled__default.default.div.withConfig({
|
|
2954
3055
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2955
3056
|
return !prop.startsWith('$');
|
|
2956
3057
|
},
|
|
2957
3058
|
displayName: "AgentInput__MicButtonWrapper",
|
|
2958
3059
|
componentId: "sc-fhl996-7"
|
|
2959
|
-
})(templateObject_9$
|
|
3060
|
+
})(templateObject_9$5 || (templateObject_9$5 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"], ["\n position: relative;\n display: inline-flex;\n border-radius: ", ";\n\n & > button {\n position: relative;\n z-index: 1;\n }\n"
|
|
3061
|
+
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3062
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
3063
|
+
])), semantic$8.border.radius.circle);
|
|
3064
|
+
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3065
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
3066
|
+
var ringMask = styled.css(templateObject_10$3 || (templateObject_10$3 = __makeTemplateObject(["radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)))"], ["radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)))"])));
|
|
2960
3067
|
var MicListeningRing = styled__default.default.span.withConfig({
|
|
2961
3068
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2962
3069
|
return !prop.startsWith('$');
|
|
2963
3070
|
},
|
|
2964
3071
|
displayName: "AgentInput__MicListeningRing",
|
|
2965
3072
|
componentId: "sc-fhl996-8"
|
|
2966
|
-
})(
|
|
3073
|
+
})(templateObject_12$3 || (templateObject_12$3 = __makeTemplateObject(["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"], ["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-", " - ", ");\n border-radius: ", ";\n pointer-events: none;\n z-index: 0;\n background: conic-gradient(\n from 0deg,\n ", " 0deg,\n ", " 110deg,\n ", " 210deg,\n ", " 300deg,\n ", " 360deg\n );\n mask: ", ";\n -webkit-mask: ", ";\n\n ", "\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n"])), semantic$8.border.width.thick, semantic$8.spacing.layout.xs, component$1.iconButton.focus.outlineOffset, semantic$8.border.radius.circle, semantic$8.color.background['interactive-subtle'], semantic$8.color.background.interactive, semantic$8.color.background['interactive-hover'], semantic$8.color.background.interactive, semantic$8.color.background['interactive-subtle'], ringMask, ringMask, function (_a) {
|
|
2967
3074
|
var $reducedMotion = _a.$reducedMotion;
|
|
2968
|
-
return !$reducedMotion && styled.css(
|
|
3075
|
+
return !$reducedMotion && styled.css(templateObject_11$3 || (templateObject_11$3 = __makeTemplateObject(["\n animation: ", " 1300ms linear infinite;\n "], ["\n animation: ", " 1300ms linear infinite;\n "])), rotateRing);
|
|
2969
3076
|
});
|
|
2970
3077
|
var StatusRow = styled__default.default.div.withConfig({
|
|
2971
3078
|
displayName: "AgentInput__StatusRow",
|
|
2972
3079
|
componentId: "sc-fhl996-9"
|
|
2973
|
-
})(
|
|
3080
|
+
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n min-height: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n min-height: ", ";\n"])), semantic$8.spacing.layout.md, semantic$8.spacing.layout['2xl']);
|
|
2974
3081
|
var StatusText = styled__default.default.div.withConfig({
|
|
2975
3082
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2976
3083
|
return !prop.startsWith('$');
|
|
2977
3084
|
},
|
|
2978
3085
|
displayName: "AgentInput__StatusText",
|
|
2979
3086
|
componentId: "sc-fhl996-10"
|
|
2980
|
-
})(
|
|
3087
|
+
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$8.spacing.layout.xl);
|
|
2981
3088
|
var StatusAnnouncement = styled__default.default.div.withConfig({
|
|
2982
3089
|
displayName: "AgentInput__StatusAnnouncement",
|
|
2983
3090
|
componentId: "sc-fhl996-11"
|
|
2984
|
-
})(
|
|
3091
|
+
})(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject([""], [""])));
|
|
2985
3092
|
var MeterContainer = styled__default.default.div.withConfig({
|
|
2986
3093
|
displayName: "AgentInput__MeterContainer",
|
|
2987
3094
|
componentId: "sc-fhl996-12"
|
|
2988
|
-
})(
|
|
3095
|
+
})(templateObject_16$1 || (templateObject_16$1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: flex-end;\n gap: ", ";\n height: ", ";\n"], ["\n display: inline-flex;\n align-items: flex-end;\n gap: ", ";\n height: ", ";\n"])), semantic$8.spacing.layout.xs, semantic$8.spacing.layout.lg);
|
|
2989
3096
|
var MeterBar = styled__default.default.div.withConfig({
|
|
2990
3097
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2991
3098
|
return !prop.startsWith('$');
|
|
2992
3099
|
},
|
|
2993
3100
|
displayName: "AgentInput__MeterBar",
|
|
2994
3101
|
componentId: "sc-fhl996-13"
|
|
2995
|
-
})(
|
|
3102
|
+
})(templateObject_17$1 || (templateObject_17$1 = __makeTemplateObject(["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"], ["\n width: ", ";\n border-radius: ", ";\n background-color: ", ";\n height: ", ";\n transition: height ", " ", ";\n"])), semantic$8.spacing.layout.xs, semantic$8.border.radius.xs, semantic$8.color.background.interactive, function (_a) {
|
|
2996
3103
|
var $height = _a.$height;
|
|
2997
3104
|
return "".concat($height * 100, "%");
|
|
2998
|
-
});
|
|
3105
|
+
}, semantic$8.motion.duration.fast, semantic$8.motion.easing.easeOut);
|
|
2999
3106
|
var VisuallyHiddenLabel = styled__default.default.label.withConfig({
|
|
3000
3107
|
displayName: "AgentInput__VisuallyHiddenLabel",
|
|
3001
3108
|
componentId: "sc-fhl996-14"
|
|
3002
|
-
})(
|
|
3109
|
+
})(templateObject_18$1 || (templateObject_18$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
3003
3110
|
function getInitialState(hasText) {
|
|
3004
3111
|
return hasText ? 'typing' : 'idle';
|
|
3005
3112
|
}
|
|
@@ -3628,10 +3735,31 @@ var AgentInput = function AgentInput(_a) {
|
|
|
3628
3735
|
})]
|
|
3629
3736
|
});
|
|
3630
3737
|
};
|
|
3631
|
-
var templateObject_1$p, templateObject_2$k, templateObject_3$i, templateObject_4$f, templateObject_5$
|
|
3738
|
+
var templateObject_1$p, templateObject_2$k, templateObject_3$i, 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$2, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1;
|
|
3632
3739
|
|
|
3633
|
-
var semantic$
|
|
3634
|
-
|
|
3740
|
+
var semantic$7 = data.tokensJson.semantic;
|
|
3741
|
+
var alert = data.tokensJson.component.alert;
|
|
3742
|
+
var _a$3 = semantic$7.motion,
|
|
3743
|
+
duration$1 = _a$3.duration,
|
|
3744
|
+
easing$1 = _a$3.easing;
|
|
3745
|
+
// Dismissing fades the alert out, then collapses the space it took (Ollie's call, #35).
|
|
3746
|
+
// Each half takes duration.fast, so the whole exit stays within the 300ms maximum (P6).
|
|
3747
|
+
var FADE_MS = parseInt(duration$1.fast, 10);
|
|
3748
|
+
var EXIT_MS = FADE_MS * 2;
|
|
3749
|
+
// The --alert-exit-* properties are the alert's height and vertical padding, measured
|
|
3750
|
+
// when it's dismissed, so nothing moves until the fade has finished
|
|
3751
|
+
var fadeThenCollapse = styled.keyframes(templateObject_1$o || (templateObject_1$o = __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$7.border.width.thin);
|
|
3752
|
+
var fadeOut = styled.keyframes(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n from { opacity: 1; }\n to { opacity: 0; }\n"], ["\n from { opacity: 1; }\n to { opacity: 0; }\n"
|
|
3753
|
+
// The exit ends on the alert's own animationend: 300ms, or 150ms under reduced motion
|
|
3754
|
+
// (chosen when dismissed). A timer of the same length removes it if no animation event
|
|
3755
|
+
// arrives, for example where animations are disabled or the tab is hidden.
|
|
3756
|
+
// The generated names of the two exits (full, and reduced motion)
|
|
3757
|
+
])));
|
|
3758
|
+
// The exit ends on the alert's own animationend: 300ms, or 150ms under reduced motion
|
|
3759
|
+
// (chosen when dismissed). A timer of the same length removes it if no animation event
|
|
3760
|
+
// arrives, for example where animations are disabled or the tab is hidden.
|
|
3761
|
+
// The generated names of the two exits (full, and reduced motion)
|
|
3762
|
+
var EXIT_ANIMATION_NAMES = [fadeThenCollapse.getName(), fadeOut.getName()];
|
|
3635
3763
|
// Default icons by variant
|
|
3636
3764
|
var variantIcons = {
|
|
3637
3765
|
error: 'crossCircle',
|
|
@@ -3659,56 +3787,60 @@ var StyledAlert = styled__default.default.div.withConfig({
|
|
|
3659
3787
|
},
|
|
3660
3788
|
displayName: "Alert__StyledAlert",
|
|
3661
3789
|
componentId: "sc-18tq5d-0"
|
|
3662
|
-
})(
|
|
3790
|
+
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: flex;\n align-items: ", ";\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Variant-specific colors */\n ", "\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* 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 align-items: ", ";\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Variant-specific colors */\n ", "\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* 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) {
|
|
3663
3791
|
var $inline = _a.$inline;
|
|
3664
3792
|
return $inline ? 'center' : 'flex-start';
|
|
3665
3793
|
}, function (_a) {
|
|
3666
3794
|
var $inline = _a.$inline;
|
|
3667
|
-
return $inline ? semantic$
|
|
3795
|
+
return $inline ? semantic$7.spacing.layout.sm : semantic$7.spacing.layout.md;
|
|
3668
3796
|
}, function (_a) {
|
|
3669
3797
|
var $inline = _a.$inline;
|
|
3670
|
-
return $inline ? semantic$
|
|
3671
|
-
},
|
|
3798
|
+
return $inline ? semantic$7.spacing.layout.sm : semantic$7.spacing.layout.md;
|
|
3799
|
+
}, semantic$7.border.radius.sm, semantic$7.border.width.thin, function (_a) {
|
|
3672
3800
|
var $variant = _a.$variant;
|
|
3673
3801
|
switch ($variant) {
|
|
3674
3802
|
case 'error':
|
|
3675
|
-
return "\n background-color: ".concat(semantic$
|
|
3803
|
+
return "\n background-color: ".concat(semantic$7.color.background['error-subtle'], ";\n border-color: ").concat(semantic$7.color.border.error, ";\n color: ").concat(semantic$7.color.text.error, ";\n ");
|
|
3676
3804
|
case 'warning':
|
|
3677
|
-
return "\n background-color: ".concat(semantic$
|
|
3805
|
+
return "\n background-color: ".concat(semantic$7.color.background['warning-subtle'], ";\n border-color: ").concat(semantic$7.color.border.warning, ";\n color: ").concat(semantic$7.color.text.warning, ";\n ");
|
|
3678
3806
|
case 'success':
|
|
3679
|
-
return "\n background-color: ".concat(semantic$
|
|
3807
|
+
return "\n background-color: ".concat(semantic$7.color.background['success-subtle'], ";\n border-color: ").concat(semantic$7.color.border.success, ";\n color: ").concat(semantic$7.color.text.success, ";\n ");
|
|
3680
3808
|
case 'info':
|
|
3681
3809
|
default:
|
|
3682
|
-
return "\n background-color: ".concat(semantic$
|
|
3810
|
+
return "\n background-color: ".concat(semantic$7.color.background['interactive-subtle'], ";\n border-color: ").concat(semantic$7.color.border.interactive, ";\n color: ").concat(semantic$7.color.text.interactive, ";\n ");
|
|
3683
3811
|
}
|
|
3684
|
-
},
|
|
3812
|
+
}, semantic$7.breakpoint.md, function (_a) {
|
|
3685
3813
|
var $inline = _a.$inline;
|
|
3686
|
-
return $inline ? semantic$
|
|
3814
|
+
return $inline ? semantic$7.spacing.layout.sm : semantic$7.spacing.layout.lg;
|
|
3815
|
+
}, function (_a) {
|
|
3816
|
+
var $isExiting = _a.$isExiting,
|
|
3817
|
+
$reducedExit = _a.$reducedExit;
|
|
3818
|
+
return $isExiting && styled.css(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "], ["\n overflow: hidden;\n pointer-events: none;\n animation: ", ";\n "])), $reducedExit ? styled.css(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), fadeOut, duration$1.fast, easing$1.easeOut) : styled.css(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["", " ", "ms ", " forwards"], ["", " ", "ms ", " forwards"])), fadeThenCollapse, EXIT_MS, easing$1.easeOut));
|
|
3687
3819
|
});
|
|
3688
3820
|
var StyledIconContainer = styled__default.default.div.withConfig({
|
|
3689
3821
|
displayName: "Alert__StyledIconContainer",
|
|
3690
3822
|
componentId: "sc-18tq5d-1"
|
|
3691
|
-
})(
|
|
3823
|
+
})(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n"], ["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n"])));
|
|
3692
3824
|
var StyledContent$1 = styled__default.default.div.withConfig({
|
|
3693
3825
|
displayName: "Alert__StyledContent",
|
|
3694
3826
|
componentId: "sc-18tq5d-2"
|
|
3695
|
-
})(
|
|
3827
|
+
})(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"], ["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: ", ";\n min-width: 0; /* Allow text wrapping */\n"])), semantic$7.spacing.layout.xs);
|
|
3696
3828
|
var StyledTitle = styled__default.default.span.withConfig({
|
|
3697
3829
|
displayName: "Alert__StyledTitle",
|
|
3698
3830
|
componentId: "sc-18tq5d-3"
|
|
3699
|
-
})(
|
|
3831
|
+
})(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);
|
|
3700
3832
|
var StyledMessage = styled__default.default.span.withConfig({
|
|
3701
3833
|
displayName: "Alert__StyledMessage",
|
|
3702
3834
|
componentId: "sc-18tq5d-4"
|
|
3703
|
-
})(
|
|
3835
|
+
})(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"])), alert.message.typography, alert.message.lineHeight);
|
|
3704
3836
|
var StyledActions = styled__default.default.div.withConfig({
|
|
3705
3837
|
displayName: "Alert__StyledActions",
|
|
3706
3838
|
componentId: "sc-18tq5d-5"
|
|
3707
|
-
})(
|
|
3839
|
+
})(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n flex-shrink: 0;\n margin-left: auto;\n"])), semantic$7.spacing.layout.sm);
|
|
3708
3840
|
var StyledDismissButton = styled__default.default(IconButton).withConfig({
|
|
3709
3841
|
displayName: "Alert__StyledDismissButton",
|
|
3710
3842
|
componentId: "sc-18tq5d-6"
|
|
3711
|
-
})(
|
|
3843
|
+
})(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n margin-left: ", ";\n\tposition: absolute;\n\tright: ", ";\n\ttop: ", ";\n"], ["\n margin-left: ", ";\n\tposition: absolute;\n\tright: ", ";\n\ttop: ", ";\n"])), semantic$7.spacing.layout.xs, semantic$7.spacing.layout.sm, semantic$7.spacing.layout.sm);
|
|
3712
3844
|
var Alert = function Alert(_a) {
|
|
3713
3845
|
var _b = _a.variant,
|
|
3714
3846
|
variant = _b === void 0 ? 'info' : _b,
|
|
@@ -3724,16 +3856,70 @@ var Alert = function Alert(_a) {
|
|
|
3724
3856
|
ariaLive = _e === void 0 ? 'polite' : _e,
|
|
3725
3857
|
dataTestId = _a["data-testid"],
|
|
3726
3858
|
props = __rest(_a, ["variant", "children", "title", "dismissible", "onDismiss", "action", "inline", "ariaLive", 'data-testid']);
|
|
3727
|
-
var _f = React__default.default.useState(
|
|
3728
|
-
|
|
3729
|
-
|
|
3859
|
+
var _f = React__default.default.useState('visible'),
|
|
3860
|
+
phase = _f[0],
|
|
3861
|
+
setPhase = _f[1];
|
|
3862
|
+
var _g = React__default.default.useState(false),
|
|
3863
|
+
reducedExit = _g[0],
|
|
3864
|
+
setReducedExit = _g[1];
|
|
3865
|
+
var _h = React__default.default.useState(),
|
|
3866
|
+
exitStyle = _h[0],
|
|
3867
|
+
setExitStyle = _h[1];
|
|
3868
|
+
var alertRef = React__default.default.useRef(null);
|
|
3869
|
+
// While it exits, its controls leave the tab order and can't be activated
|
|
3870
|
+
useInert(alertRef, phase === 'exiting');
|
|
3871
|
+
var onDismissRef = React__default.default.useRef(onDismiss);
|
|
3872
|
+
React__default.default.useEffect(function () {
|
|
3873
|
+
onDismissRef.current = onDismiss;
|
|
3874
|
+
}, [onDismiss]);
|
|
3730
3875
|
var handleDismiss = function handleDismiss() {
|
|
3731
|
-
|
|
3732
|
-
|
|
3876
|
+
var node = alertRef.current;
|
|
3877
|
+
if (node) {
|
|
3878
|
+
var style = window.getComputedStyle(node);
|
|
3879
|
+
var paddingTop = style.paddingTop,
|
|
3880
|
+
paddingBottom = style.paddingBottom;
|
|
3881
|
+
// max-height applies to the content box unless the alert is border-box (it depends on
|
|
3882
|
+
// the consumer's reset), so measure whichever box it uses; nothing moves at the click
|
|
3883
|
+
var height = Math.max(0, style.boxSizing === 'border-box' ? node.offsetHeight : node.offsetHeight - parseFloat(paddingTop) - parseFloat(paddingBottom) - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth));
|
|
3884
|
+
setExitStyle({
|
|
3885
|
+
'--alert-exit-height': "".concat(height, "px"),
|
|
3886
|
+
'--alert-exit-padding-top': paddingTop,
|
|
3887
|
+
'--alert-exit-padding-bottom': paddingBottom
|
|
3888
|
+
});
|
|
3889
|
+
}
|
|
3890
|
+
setReducedExit(typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
3891
|
+
setPhase('exiting');
|
|
3733
3892
|
};
|
|
3734
|
-
|
|
3893
|
+
React__default.default.useEffect(function () {
|
|
3894
|
+
if (phase !== 'exiting') return;
|
|
3895
|
+
var timer = setTimeout(function () {
|
|
3896
|
+
return setPhase('dismissed');
|
|
3897
|
+
}, reducedExit ? FADE_MS : EXIT_MS);
|
|
3898
|
+
return function () {
|
|
3899
|
+
return clearTimeout(timer);
|
|
3900
|
+
};
|
|
3901
|
+
}, [phase, reducedExit]);
|
|
3902
|
+
// onDismiss fires once the alert has been removed from the DOM, so a consumer that
|
|
3903
|
+
// unmounts it in onDismiss still gets the animation, and can't observe it
|
|
3904
|
+
React__default.default.useEffect(function () {
|
|
3905
|
+
var _a;
|
|
3906
|
+
if (phase === 'dismissed') (_a = onDismissRef.current) === null || _a === void 0 ? void 0 : _a.call(onDismissRef);
|
|
3907
|
+
}, [phase]);
|
|
3908
|
+
if (phase === 'dismissed') {
|
|
3735
3909
|
return null;
|
|
3736
3910
|
}
|
|
3911
|
+
var isExiting = phase === 'exiting';
|
|
3912
|
+
// Consumers can pass extra HTML attributes, including style, aria-hidden and onAnimationEnd
|
|
3913
|
+
var forwarded = props;
|
|
3914
|
+
var handleAnimationEnd = function handleAnimationEnd(event) {
|
|
3915
|
+
var _a;
|
|
3916
|
+
(_a = forwarded.onAnimationEnd) === null || _a === void 0 ? void 0 : _a.call(forwarded, event);
|
|
3917
|
+
// Only the exit itself ends the dismissal: not animations bubbling up from children,
|
|
3918
|
+
// on pseudo-elements, or other animations a consumer puts on the alert
|
|
3919
|
+
if (isExiting && event.target === event.currentTarget && !event.pseudoElement && EXIT_ANIMATION_NAMES.includes(event.animationName)) {
|
|
3920
|
+
setPhase('dismissed');
|
|
3921
|
+
}
|
|
3922
|
+
};
|
|
3737
3923
|
// Get the icon for the current variant
|
|
3738
3924
|
var iconName = variantIcons[variant];
|
|
3739
3925
|
var alertIconColor = variantIconColors[variant];
|
|
@@ -3745,8 +3931,14 @@ var Alert = function Alert(_a) {
|
|
|
3745
3931
|
"aria-live": ariaLive,
|
|
3746
3932
|
"$variant": variant,
|
|
3747
3933
|
"$inline": inline,
|
|
3934
|
+
"$isExiting": isExiting,
|
|
3935
|
+
"$reducedExit": reducedExit,
|
|
3748
3936
|
"data-testid": dataTestId
|
|
3749
3937
|
}, props, {
|
|
3938
|
+
ref: alertRef,
|
|
3939
|
+
"aria-hidden": isExiting ? true : forwarded['aria-hidden'],
|
|
3940
|
+
style: isExiting ? __assign(__assign({}, forwarded.style), exitStyle) : forwarded.style,
|
|
3941
|
+
onAnimationEnd: handleAnimationEnd,
|
|
3750
3942
|
children: [jsxRuntime.jsx(StyledIconContainer, {
|
|
3751
3943
|
"aria-hidden": "true",
|
|
3752
3944
|
children: jsxRuntime.jsx(Icon, {
|
|
@@ -3776,17 +3968,16 @@ var Alert = function Alert(_a) {
|
|
|
3776
3968
|
}));
|
|
3777
3969
|
};
|
|
3778
3970
|
Alert.displayName = 'Alert';
|
|
3779
|
-
var templateObject_1$o, templateObject_2$j, templateObject_3$h, templateObject_4$e, templateObject_5$
|
|
3971
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$h, 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;
|
|
3780
3972
|
|
|
3781
|
-
var _a$3, _b$1, _c, _d, _e, _f;
|
|
3782
3973
|
var BreadcrumbNavStyled = styled__default.default.nav.withConfig({
|
|
3783
3974
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
3784
3975
|
componentId: "sc-7ouzg5-0"
|
|
3785
|
-
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])),
|
|
3976
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"], ["\n border-bottom: ", ";\n\n ol {\n display: flex;\n align-items: center;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n"])), data.tokensJson.semantic.border["default"]);
|
|
3786
3977
|
var BreadcrumbStyled = styled__default.default.li.withConfig({
|
|
3787
3978
|
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
3788
3979
|
componentId: "sc-7ouzg5-1"
|
|
3789
|
-
})(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n text-transform: uppercase;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", ";\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width:
|
|
3980
|
+
})(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n text-transform: uppercase;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", ";\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: ", ";\n }\n\n > a {\n display: inline-flex;\n align-items: center;\n text-decoration: underline;\n color: ", ";\n }\n"], ["\n text-transform: uppercase;\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", ";\n\n &:last-of-type a {\n text-decoration: none;\n color: ", ";\n }\n\n &:last-of-type p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: ", ";\n }\n\n > a {\n display: inline-flex;\n align-items: center;\n text-decoration: underline;\n color: ", ";\n }\n"])), data.tokensJson.semantic.spacing.layout.sm, data.tokensJson.semantic.spacing.layout.sm, data.tokensJson.semantic.color.text.subdued, data.tokensJson.component.breadcrumbs.item.maxWidth, data.tokensJson.semantic.color.text["default"]);
|
|
3790
3981
|
var BreadcrumbSeparator = styled__default.default.span.withConfig({
|
|
3791
3982
|
displayName: "Breadcrumbs__BreadcrumbSeparator",
|
|
3792
3983
|
componentId: "sc-7ouzg5-2"
|
|
@@ -3843,14 +4034,15 @@ var templateObject_1$n, templateObject_2$i, templateObject_3$g;
|
|
|
3843
4034
|
var CardSmallStyled = styled__default.default.div.withConfig({
|
|
3844
4035
|
displayName: "CardSmall__CardSmallStyled",
|
|
3845
4036
|
componentId: "sc-jpcqvd-0"
|
|
3846
|
-
})(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition:
|
|
4037
|
+
})(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: opacity ", " ", ";\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 ", " ", ";\n }\n"], ["\n a {\n text-decoration: none;\n }\n\n img {\n border-radius: ", ";\n transition: opacity ", " ", ";\n width: 100%;\n height: auto;\n display: block;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n &:focus-within {\n outline: none;\n box-shadow: 0 0 0 ", " ", ";\n }\n"])), data.tokensJson.semantic.border.radius.sm, data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeOut, data.tokensJson.semantic.border.width.thick, data.tokensJson.semantic.color.border.strong);
|
|
3847
4038
|
var CardSmall = function CardSmall(_a) {
|
|
3848
4039
|
var title = _a.title,
|
|
3849
4040
|
picture = _a.picture,
|
|
3850
4041
|
subtitle = _a.subtitle,
|
|
3851
4042
|
meta = _a.meta,
|
|
3852
4043
|
href = _a.href,
|
|
3853
|
-
LinkComponent = _a.linkComponent
|
|
4044
|
+
LinkComponent = _a.linkComponent,
|
|
4045
|
+
dataTestId = _a["data-testid"];
|
|
3854
4046
|
if (!picture || !meta) {
|
|
3855
4047
|
return null;
|
|
3856
4048
|
}
|
|
@@ -3884,6 +4076,7 @@ var CardSmall = function CardSmall(_a) {
|
|
|
3884
4076
|
})]
|
|
3885
4077
|
});
|
|
3886
4078
|
return jsxRuntime.jsx(CardSmallStyled, {
|
|
4079
|
+
"data-testid": dataTestId,
|
|
3887
4080
|
children: LinkComponent && href ? jsxRuntime.jsx(LinkComponent, {
|
|
3888
4081
|
href: href,
|
|
3889
4082
|
"aria-label": title,
|
|
@@ -3897,11 +4090,11 @@ var CardSmall = function CardSmall(_a) {
|
|
|
3897
4090
|
};
|
|
3898
4091
|
var templateObject_1$m;
|
|
3899
4092
|
|
|
3900
|
-
var border$4 = data.tokensJson.
|
|
4093
|
+
var border$4 = data.tokensJson.semantic.border;
|
|
3901
4094
|
var CardLargeStyled = styled__default.default.div.withConfig({
|
|
3902
4095
|
displayName: "CardLarge__CardLargeStyled",
|
|
3903
4096
|
componentId: "sc-1rfgdzl-0"
|
|
3904
|
-
})(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n max-width:
|
|
4097
|
+
})(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n max-width: ", ";\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: opacity ", " ", ";\n width: 100%;\n }\n"], ["\n max-width: ", ";\n\n a {\n text-decoration: none;\n }\n\n &:hover {\n img {\n opacity: 0.8;\n }\n }\n\n img {\n border-radius: ", ";\n transition: opacity ", " ", ";\n width: 100%;\n }\n"])), data.tokensJson.component.cardLarge.maxWidth, border$4.radius['2xl'], data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeOut);
|
|
3905
4098
|
var CardLarge = function CardLarge(_a) {
|
|
3906
4099
|
var title = _a.title,
|
|
3907
4100
|
excerpt = _a.excerpt,
|
|
@@ -3910,8 +4103,10 @@ var CardLarge = function CardLarge(_a) {
|
|
|
3910
4103
|
labels = _b === void 0 ? [] : _b,
|
|
3911
4104
|
picture = _a.picture,
|
|
3912
4105
|
onImageClick = _a.onImageClick,
|
|
3913
|
-
imageHref = _a.imageHref
|
|
4106
|
+
imageHref = _a.imageHref,
|
|
4107
|
+
dataTestId = _a["data-testid"];
|
|
3914
4108
|
return jsxRuntime.jsx(CardLargeStyled, {
|
|
4109
|
+
"data-testid": dataTestId,
|
|
3915
4110
|
children: jsxRuntime.jsxs(Stack, {
|
|
3916
4111
|
direction: "column",
|
|
3917
4112
|
gap: "md",
|
|
@@ -3983,11 +4178,11 @@ var StyledCheckbox = styled__default.default.span.withConfig({
|
|
|
3983
4178
|
},
|
|
3984
4179
|
displayName: "SelectableInputBase__StyledCheckbox",
|
|
3985
4180
|
componentId: "sc-1ddpctx-1"
|
|
3986
|
-
})(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width:
|
|
4181
|
+
})(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n min-width: ", ";\n min-height: ", ";\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: all ", " ", ";\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 6px;\n top: 3px;\n width: 4px;\n height: 8px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 8px;\n width: 10px;\n height: 2px;\n background-color: ", ";\n }\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n min-width: ", ";\n min-height: ", ";\n border-radius: ", ";\n border: ", " solid;\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n transition: all ", " ", ";\n flex-shrink: 0;\n\n /* Hover state */\n ", ":not(:disabled):hover + & {\n border-color: ", ";\n }\n\n /* Focus state */\n ", ":focus-visible + & {\n outline: ", ";\n outline-offset: ", ";\n border-color: ", ";\n }\n\n /* Disabled state */\n ", "\n\n /* Checkmark icon */\n &::after {\n content: '';\n position: absolute;\n display: ", ";\n left: 6px;\n top: 3px;\n width: 4px;\n height: 8px;\n border: solid ", ";\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n\n /* Indeterminate icon (horizontal line) */\n &::before {\n content: '';\n position: absolute;\n display: ", ";\n left: 4px;\n top: 8px;\n width: 10px;\n height: 2px;\n background-color: ", ";\n }\n"
|
|
3987
4182
|
/**
|
|
3988
4183
|
* Container for checkbox with proper spacing and alignment
|
|
3989
4184
|
* 48px min-height for touch target (8px grid aligned)
|
|
3990
|
-
*/])), data.tokensJson.component.input["default"].borderRadius, data.tokensJson.component.input["default"].borderWidth, function (props) {
|
|
4185
|
+
*/])), data.tokensJson.component.checkbox.box.size, data.tokensJson.component.checkbox.box.size, data.tokensJson.component.checkbox.box.size, data.tokensJson.component.checkbox.box.size, data.tokensJson.component.input["default"].borderRadius, data.tokensJson.component.input["default"].borderWidth, function (props) {
|
|
3991
4186
|
return props.$checked || props.$indeterminate ? data.tokensJson.semantic.color.background.inverse : data.tokensJson.component.input["default"].backgroundColor;
|
|
3992
4187
|
}, function (props) {
|
|
3993
4188
|
if (props.$state === 'error') return data.tokensJson.component.input.error.borderColor;
|
|
@@ -3995,7 +4190,7 @@ var StyledCheckbox = styled__default.default.span.withConfig({
|
|
|
3995
4190
|
return data.tokensJson.component.input["default"].borderColor;
|
|
3996
4191
|
}, function (props) {
|
|
3997
4192
|
return props.$state === 'disabled' ? 'not-allowed' : 'pointer';
|
|
3998
|
-
}, HiddenCheckboxInput, function (props) {
|
|
4193
|
+
}, data.tokensJson.semantic.motion.duration.fast, data.tokensJson.semantic.motion.easing.easeOut, HiddenCheckboxInput, function (props) {
|
|
3999
4194
|
return props.$state === 'error' ? data.tokensJson.component.input.error.hover.borderColor : props.$checked || props.$indeterminate ? data.tokensJson.semantic.border.strong : data.tokensJson.component.input.hover.borderColor;
|
|
4000
4195
|
}, HiddenCheckboxInput, data.tokensJson.component.input.focus.outline, data.tokensJson.component.input.focus.outlineOffset, function (props) {
|
|
4001
4196
|
return props.$state === 'error' ? data.tokensJson.component.input.error.focus.borderColor : data.tokensJson.component.input.focus.borderColor;
|
|
@@ -4016,12 +4211,12 @@ var StyledCheckboxContainer = styled__default.default.label.withConfig({
|
|
|
4016
4211
|
},
|
|
4017
4212
|
displayName: "SelectableInputBase__StyledCheckboxContainer",
|
|
4018
4213
|
componentId: "sc-1ddpctx-2"
|
|
4019
|
-
})(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height:
|
|
4214
|
+
})(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: ", ";\n flex-direction: ", ";\n user-select: none;\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n cursor: ", ";\n min-height: ", ";\n flex-direction: ", ";\n user-select: none;\n"
|
|
4020
4215
|
/**
|
|
4021
4216
|
* Label text with proper typography
|
|
4022
|
-
*/])), data.tokensJson.
|
|
4217
|
+
*/])), data.tokensJson.semantic.spacing.layout.md, function (props) {
|
|
4023
4218
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
4024
|
-
}, function (props) {
|
|
4219
|
+
}, data.tokensJson.component.checkbox.row.minHeight, function (props) {
|
|
4025
4220
|
return props.$labelPosition === 'left' ? 'row-reverse' : 'row';
|
|
4026
4221
|
});
|
|
4027
4222
|
/**
|
|
@@ -4041,7 +4236,7 @@ var templateObject_1$k, templateObject_2$h, templateObject_3$f, templateObject_4
|
|
|
4041
4236
|
var StyledFieldContainer$3 = styled__default.default.div.withConfig({
|
|
4042
4237
|
displayName: "Checkbox__StyledFieldContainer",
|
|
4043
4238
|
componentId: "sc-vquz3v-0"
|
|
4044
|
-
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"], ["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"])), data.tokensJson.
|
|
4239
|
+
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"], ["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"])), data.tokensJson.semantic.spacing.layout.xs);
|
|
4045
4240
|
var StyledHelperText$4 = styled__default.default.span.withConfig({
|
|
4046
4241
|
displayName: "Checkbox__StyledHelperText",
|
|
4047
4242
|
componentId: "sc-vquz3v-1"
|
|
@@ -4067,9 +4262,9 @@ var StyledHelperText$4 = styled__default.default.span.withConfig({
|
|
|
4067
4262
|
* required
|
|
4068
4263
|
* />
|
|
4069
4264
|
* ```
|
|
4070
|
-
*/])), data.tokensJson.
|
|
4071
|
-
return props.$error ? data.tokensJson.
|
|
4072
|
-
}, data.tokensJson.
|
|
4265
|
+
*/])), data.tokensJson.component.field.helperText.typography, function (props) {
|
|
4266
|
+
return props.$error ? data.tokensJson.component.field.helperText.colorError : data.tokensJson.component.field.helperText.color;
|
|
4267
|
+
}, data.tokensJson.semantic.spacing.layout['5xl']);
|
|
4073
4268
|
/**
|
|
4074
4269
|
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
4075
4270
|
*
|
|
@@ -4194,16 +4389,16 @@ var templateObject_1$i;
|
|
|
4194
4389
|
var _a$2 = data.tokensJson.semantic,
|
|
4195
4390
|
color$2 = _a$2.color,
|
|
4196
4391
|
border$3 = _a$2.border,
|
|
4197
|
-
spacing$2 = _a$2.spacing
|
|
4198
|
-
_a$2.motion;
|
|
4392
|
+
spacing$2 = _a$2.spacing,
|
|
4393
|
+
motion$2 = _a$2.motion;
|
|
4199
4394
|
var StyledCodeBlock = styled__default.default.pre.withConfig({
|
|
4200
4395
|
displayName: "CodeBlock__StyledCodeBlock",
|
|
4201
4396
|
componentId: "sc-1p1t0kp-0"
|
|
4202
|
-
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n overflow-y: ", ";\n margin: ", " 0;\n position: relative;\n transition: max-height
|
|
4397
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n overflow-y: ", ";\n margin: ", " 0;\n position: relative;\n transition: max-height ", " ", ";\n\n ", " {\n transition: none;\n }\n \n ", "\n"], ["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n overflow-y: ", ";\n margin: ", " 0;\n position: relative;\n transition: max-height ", " ", ";\n\n ", " {\n transition: none;\n }\n \n ", "\n"])), color$2.background.subtle, border$3.subtle, data.tokensJson.semantic.border.radius.sm, spacing$2.layout.md, data.tokensJson.component.codeBlock.fontFamily, data.tokensJson.component.codeBlock.fontSize, data.tokensJson.component.codeBlock.lineHeight, color$2.text["default"], function (_a) {
|
|
4203
4398
|
var $isExpanded = _a.$isExpanded,
|
|
4204
4399
|
$needsExpansion = _a.$needsExpansion;
|
|
4205
4400
|
return $needsExpansion && !$isExpanded ? 'hidden' : 'auto';
|
|
4206
|
-
}, spacing$2.layout.sm, function (_a) {
|
|
4401
|
+
}, spacing$2.layout.sm, motion$2.duration.slow, motion$2.easing.easeInOut, reducedMotion, function (_a) {
|
|
4207
4402
|
var $maxHeight = _a.$maxHeight,
|
|
4208
4403
|
$isExpanded = _a.$isExpanded,
|
|
4209
4404
|
$needsExpansion = _a.$needsExpansion;
|
|
@@ -4223,7 +4418,7 @@ var CopyButtonWrapper = styled__default.default.div.withConfig({
|
|
|
4223
4418
|
var ExpandButtonWrapper = styled__default.default.div.withConfig({
|
|
4224
4419
|
displayName: "CodeBlock__ExpandButtonWrapper",
|
|
4225
4420
|
componentId: "sc-1p1t0kp-3"
|
|
4226
|
-
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n padding: ", " 0;\n position: absolute;\n bottom:
|
|
4421
|
+
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n padding: ", " 0;\n position: absolute;\n bottom: ", ";\n left: ", ";\n right: ", ";\n width: calc(100% - 2 * ", ");\n margin-bottom: ", ";\n border-radius: ", ";\n transition: opacity ", " ", ", background ", " ", ";\n \n ", "\n"], ["\n display: flex;\n justify-content: center;\n padding: ", " 0;\n position: absolute;\n bottom: ", ";\n left: ", ";\n right: ", ";\n width: calc(100% - 2 * ", ");\n margin-bottom: ", ";\n border-radius: ", ";\n transition: opacity ", " ", ", background ", " ", ";\n \n ", "\n"])), spacing$2.layout.sm, data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.border.width.thin, spacing$2.layout.sm, data.tokensJson.semantic.border.radius.sm, motion$2.duration.slow, motion$2.easing.easeInOut, motion$2.duration.slow, motion$2.easing.easeInOut, function (_a) {
|
|
4227
4422
|
var $hasGradient = _a.$hasGradient;
|
|
4228
4423
|
return $hasGradient ? "\n margin-top: -".concat(spacing$2.layout['4xl'], ";\n padding-top: ").concat(spacing$2.layout['4xl'], ";\n background: linear-gradient(\n to bottom,\n transparent 0%,\n ").concat(color$2.background.subtle, " 60%\n );\n ") : "\n background: transparent;\n ";
|
|
4229
4424
|
});
|
|
@@ -4285,6 +4480,37 @@ var CopyButton = function CopyButton(_a) {
|
|
|
4285
4480
|
})
|
|
4286
4481
|
});
|
|
4287
4482
|
};
|
|
4483
|
+
var LiveRegion = styled__default.default.span.withConfig({
|
|
4484
|
+
displayName: "CodeBlock__LiveRegion",
|
|
4485
|
+
componentId: "sc-1p1t0kp-4"
|
|
4486
|
+
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
4487
|
+
/**
|
|
4488
|
+
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
4489
|
+
* and expandable content for long code blocks.
|
|
4490
|
+
*
|
|
4491
|
+
* @param children - The code content to display
|
|
4492
|
+
* @param showCopyButton - Whether to show the copy button (default: true)
|
|
4493
|
+
* @param onCopy - Optional callback when code is copied
|
|
4494
|
+
* @param maxHeight - Maximum height in pixels before enabling expand/collapse
|
|
4495
|
+
* @param defaultExpanded - Initial expanded state when maxHeight is set
|
|
4496
|
+
* @param data-testid - Test identifier for the code block
|
|
4497
|
+
*
|
|
4498
|
+
* @example
|
|
4499
|
+
* ```tsx
|
|
4500
|
+
* // Basic usage
|
|
4501
|
+
* <CodeBlock>const x = 1;</CodeBlock>
|
|
4502
|
+
*
|
|
4503
|
+
* // With max height and expand/collapse
|
|
4504
|
+
* <CodeBlock maxHeight={200}>
|
|
4505
|
+
* {longCodeString}
|
|
4506
|
+
* </CodeBlock>
|
|
4507
|
+
*
|
|
4508
|
+
* // Start expanded
|
|
4509
|
+
* <CodeBlock maxHeight={200} defaultExpanded>
|
|
4510
|
+
* {longCodeString}
|
|
4511
|
+
* </CodeBlock>
|
|
4512
|
+
* ```
|
|
4513
|
+
*/])), visuallyHidden);
|
|
4288
4514
|
/**
|
|
4289
4515
|
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
4290
4516
|
* and expandable content for long code blocks.
|
|
@@ -4327,6 +4553,9 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4327
4553
|
var _e = React.useState(false),
|
|
4328
4554
|
needsExpansion = _e[0],
|
|
4329
4555
|
setNeedsExpansion = _e[1];
|
|
4556
|
+
var _f = React.useState(''),
|
|
4557
|
+
announcement = _f[0],
|
|
4558
|
+
setAnnouncement = _f[1];
|
|
4330
4559
|
var contentRef = React.useRef(null);
|
|
4331
4560
|
// Check if content exceeds maxHeight
|
|
4332
4561
|
React.useEffect(function () {
|
|
@@ -4340,17 +4569,7 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4340
4569
|
return !prev;
|
|
4341
4570
|
});
|
|
4342
4571
|
// Announce state change to screen readers
|
|
4343
|
-
|
|
4344
|
-
var announcer = document.createElement('div');
|
|
4345
|
-
announcer.setAttribute('aria-live', 'polite');
|
|
4346
|
-
announcer.setAttribute('aria-atomic', 'true');
|
|
4347
|
-
announcer.setAttribute('class', 'sr-only');
|
|
4348
|
-
announcer.style.cssText = 'position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;';
|
|
4349
|
-
announcer.textContent = announcement;
|
|
4350
|
-
document.body.appendChild(announcer);
|
|
4351
|
-
setTimeout(function () {
|
|
4352
|
-
document.body.removeChild(announcer);
|
|
4353
|
-
}, 1000);
|
|
4572
|
+
setAnnouncement(isExpanded ? 'Code block collapsed' : 'Code block expanded');
|
|
4354
4573
|
};
|
|
4355
4574
|
var showExpandButton = maxHeight && needsExpansion;
|
|
4356
4575
|
return jsxRuntime.jsxs(CodeBlockWrapper, {
|
|
@@ -4375,20 +4594,24 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
4375
4594
|
"data-testid": "expand-button",
|
|
4376
4595
|
children: isExpanded ? 'Show less' : 'Show more'
|
|
4377
4596
|
})
|
|
4597
|
+
}), showExpandButton && jsxRuntime.jsx(LiveRegion, {
|
|
4598
|
+
"aria-live": "polite",
|
|
4599
|
+
"aria-atomic": "true",
|
|
4600
|
+
children: announcement
|
|
4378
4601
|
}), showCopyButton && jsxRuntime.jsx(CopyButton, {
|
|
4379
4602
|
text: children,
|
|
4380
4603
|
onCopy: onCopy
|
|
4381
4604
|
})]
|
|
4382
4605
|
});
|
|
4383
4606
|
};
|
|
4384
|
-
var templateObject_1$h, templateObject_2$f, templateObject_3$e, templateObject_4$c;
|
|
4607
|
+
var templateObject_1$h, templateObject_2$f, templateObject_3$e, templateObject_4$c, templateObject_5$a;
|
|
4385
4608
|
|
|
4386
4609
|
var StyledHeader$1 = styled__default.default.div.withConfig({
|
|
4387
4610
|
displayName: "DateGroup__StyledHeader",
|
|
4388
4611
|
componentId: "sc-9nfm1f-0"
|
|
4389
|
-
})(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border-bottom:
|
|
4612
|
+
})(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: ", " solid ", ";\n \n ", "\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: ", " solid ", ";\n \n ", "\n"])), data.tokensJson.semantic.spacing.layout.md, data.tokensJson.semantic.spacing.layout.sm, data.tokensJson.semantic.color.background["default"], data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.color.border["default"], function (_a) {
|
|
4390
4613
|
var $sticky = _a.$sticky;
|
|
4391
|
-
return $sticky && "\n position: sticky;\n top: 0;\n z-index:
|
|
4614
|
+
return $sticky && "\n position: sticky;\n top: 0;\n z-index: ".concat(data.tokensJson.semantic.zIndex.sticky, ";\n box-shadow: ").concat(data.tokensJson.semantic.elevation.sticky, ";\n ");
|
|
4392
4615
|
});
|
|
4393
4616
|
var StyledLeftSection = styled__default.default.div.withConfig({
|
|
4394
4617
|
displayName: "DateGroup__StyledLeftSection",
|
|
@@ -4475,16 +4698,16 @@ var DateGroup = function DateGroup(_a) {
|
|
|
4475
4698
|
};
|
|
4476
4699
|
var templateObject_1$g, templateObject_2$e, templateObject_3$d, templateObject_4$b;
|
|
4477
4700
|
|
|
4478
|
-
var semantic$
|
|
4701
|
+
var semantic$6 = data.tokensJson.semantic;
|
|
4479
4702
|
var StyledContainer$1 = styled__default.default.div.withConfig({
|
|
4480
4703
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4481
4704
|
return !prop.startsWith('$');
|
|
4482
4705
|
},
|
|
4483
4706
|
displayName: "EmptyState__StyledContainer",
|
|
4484
4707
|
componentId: "sc-1u5hxh-0"
|
|
4485
|
-
})(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:
|
|
4708
|
+
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: ", ";\n margin: 0 auto;\n padding: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: ", ";\n margin: 0 auto;\n padding: ", ";\n"])), data.tokensJson.component.emptyState.maxWidth, function (_a) {
|
|
4486
4709
|
var $size = _a.$size;
|
|
4487
|
-
return $size === 'small' ? semantic$
|
|
4710
|
+
return $size === 'small' ? semantic$6.spacing.layout['4xl'] : $size === 'large' ? semantic$6.spacing.layout['8xl'] : semantic$6.spacing.layout['6xl'];
|
|
4488
4711
|
});
|
|
4489
4712
|
var StyledIllustration = styled__default.default.div.withConfig({
|
|
4490
4713
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -4494,20 +4717,20 @@ var StyledIllustration = styled__default.default.div.withConfig({
|
|
|
4494
4717
|
componentId: "sc-1u5hxh-1"
|
|
4495
4718
|
})(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: ", ";\n color: ", ";\n"], ["\n width: ", ";\n height: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: ", ";\n color: ", ";\n"])), function (_a) {
|
|
4496
4719
|
var $size = _a.$size;
|
|
4497
|
-
return $size === 'small' ?
|
|
4720
|
+
return $size === 'small' ? data.tokensJson.component.emptyState.illustration.small : $size === 'large' ? data.tokensJson.component.emptyState.illustration.large : data.tokensJson.component.emptyState.illustration.medium;
|
|
4498
4721
|
}, function (_a) {
|
|
4499
4722
|
var $size = _a.$size;
|
|
4500
|
-
return $size === 'small' ?
|
|
4501
|
-
}, semantic$
|
|
4723
|
+
return $size === 'small' ? data.tokensJson.component.emptyState.illustration.small : $size === 'large' ? data.tokensJson.component.emptyState.illustration.large : data.tokensJson.component.emptyState.illustration.medium;
|
|
4724
|
+
}, semantic$6.spacing.layout['2xl'], function (_a) {
|
|
4502
4725
|
var $variant = _a.$variant;
|
|
4503
|
-
return $variant === 'error' ? semantic$
|
|
4726
|
+
return $variant === 'error' ? semantic$6.color.icon.error : $variant === 'success' ? semantic$6.color.icon.success : semantic$6.color.icon.subdued;
|
|
4504
4727
|
});
|
|
4505
4728
|
var StyledTextContainer = styled__default.default.div.withConfig({
|
|
4506
4729
|
displayName: "EmptyState__StyledTextContainer",
|
|
4507
4730
|
componentId: "sc-1u5hxh-2"
|
|
4508
|
-
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n max-width:
|
|
4731
|
+
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n max-width: ", ";\n margin-bottom: ", ";\n"], ["\n max-width: ", ";\n margin-bottom: ", ";\n"
|
|
4509
4732
|
// Map illustration type to icon name
|
|
4510
|
-
])), semantic$
|
|
4733
|
+
])), data.tokensJson.component.emptyState.text.maxWidth, semantic$6.spacing.layout['2xl']);
|
|
4511
4734
|
// Map illustration type to icon name
|
|
4512
4735
|
var illustrationToIcon = {
|
|
4513
4736
|
search: 'search',
|
|
@@ -4562,7 +4785,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4562
4785
|
children: title
|
|
4563
4786
|
}), jsxRuntime.jsx("div", {
|
|
4564
4787
|
style: {
|
|
4565
|
-
marginTop: semantic$
|
|
4788
|
+
marginTop: semantic$6.spacing.layout.md
|
|
4566
4789
|
},
|
|
4567
4790
|
children: jsxRuntime.jsx(Typography, {
|
|
4568
4791
|
variant: "body",
|
|
@@ -4572,7 +4795,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4572
4795
|
})]
|
|
4573
4796
|
}), (action || secondaryAction) && jsxRuntime.jsx(Box, {
|
|
4574
4797
|
width: "100%",
|
|
4575
|
-
maxWidth:
|
|
4798
|
+
maxWidth: data.tokensJson.component.emptyState.actions.maxWidth,
|
|
4576
4799
|
children: jsxRuntime.jsxs(Stack, {
|
|
4577
4800
|
direction: "column",
|
|
4578
4801
|
gap: "sm",
|
|
@@ -4594,25 +4817,25 @@ var EmptyState = function EmptyState(_a) {
|
|
|
4594
4817
|
};
|
|
4595
4818
|
var templateObject_1$f, templateObject_2$d, templateObject_3$c;
|
|
4596
4819
|
|
|
4597
|
-
var _a$1 = data.tokensJson.
|
|
4598
|
-
spacing$1 = _a$1.spacing,
|
|
4820
|
+
var _a$1 = data.tokensJson.semantic,
|
|
4821
|
+
spacing$1 = _a$1.spacing.layout,
|
|
4599
4822
|
border$2 = _a$1.border;
|
|
4600
4823
|
var FeatureBlockStyled = styled__default.default.div.withConfig({
|
|
4601
4824
|
displayName: "FeatureBlock__FeatureBlockStyled",
|
|
4602
4825
|
componentId: "sc-1mi4lso-0"
|
|
4603
|
-
})(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n @media (min-width: ", ") {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n }\n\n @media (min-width: ", ") {\n gap: ", ";\n }\n\n img {\n border-radius: ", ";\n transition:
|
|
4826
|
+
})(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n @media (min-width: ", ") {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n }\n\n @media (min-width: ", ") {\n gap: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: opacity ", " ", ";\n\n &:hover {\n opacity: 0.8;\n }\n }\n\n a {\n text-decoration: none;\n }\n"], ["\n @media (min-width: ", ") {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n }\n\n @media (min-width: ", ") {\n gap: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: opacity ", " ", ";\n\n &:hover {\n opacity: 0.8;\n }\n }\n\n a {\n text-decoration: none;\n }\n"])), data.tokensJson.semantic.breakpoint.md, data.tokensJson.semantic.breakpoint.lg, spacing$1['7xl'], border$2.radius['2xl'], data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeOut);
|
|
4604
4827
|
var ImageWrapper = styled__default.default.div.withConfig({
|
|
4605
4828
|
displayName: "FeatureBlock__ImageWrapper",
|
|
4606
4829
|
componentId: "sc-1mi4lso-1"
|
|
4607
|
-
})(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"], ["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"])), data.tokensJson.
|
|
4830
|
+
})(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"], ["\n grid-column: span 12;\n\n @media (min-width: ", ") {\n grid-column: span 6;\n }\n"])), data.tokensJson.semantic.breakpoint.lg);
|
|
4608
4831
|
var ContentSection = styled__default.default.div.withConfig({
|
|
4609
4832
|
displayName: "FeatureBlock__ContentSection",
|
|
4610
4833
|
componentId: "sc-1mi4lso-2"
|
|
4611
|
-
})(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"], ["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"])), spacing$1[
|
|
4834
|
+
})(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"], ["\n grid-column: span 12;\n margin-top: ", ";\n\n @media (min-width: ", ") {\n grid-column: span 6;\n margin-top: 0;\n padding-right: ", ";\n }\n\n @media (min-width: ", ") {\n padding-right: ", ";\n }\n"])), spacing$1['2xl'], data.tokensJson.semantic.breakpoint.lg, spacing$1['4xl'], data.tokensJson.semantic.breakpoint.xl, spacing$1['11xl']);
|
|
4612
4835
|
var ButtonWrapper = styled__default.default.div.withConfig({
|
|
4613
4836
|
displayName: "FeatureBlock__ButtonWrapper",
|
|
4614
4837
|
componentId: "sc-1mi4lso-3"
|
|
4615
|
-
})(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n button {\n margin-top: ", ";\n }\n"], ["\n button {\n margin-top: ", ";\n }\n"])), spacing$1
|
|
4838
|
+
})(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n button {\n margin-top: ", ";\n }\n"], ["\n button {\n margin-top: ", ";\n }\n"])), spacing$1.lg);
|
|
4616
4839
|
var ContentWrapper = styled__default.default.div.withConfig({
|
|
4617
4840
|
displayName: "FeatureBlock__ContentWrapper",
|
|
4618
4841
|
componentId: "sc-1mi4lso-4"
|
|
@@ -4627,9 +4850,11 @@ var FeatureBlock = function FeatureBlock(_a) {
|
|
|
4627
4850
|
onReadMore = _a.onReadMore,
|
|
4628
4851
|
readMoreHref = _a.readMoreHref,
|
|
4629
4852
|
_c = _a.readMoreText,
|
|
4630
|
-
readMoreText = _c === void 0 ? "Read more" : _c
|
|
4853
|
+
readMoreText = _c === void 0 ? "Read more" : _c,
|
|
4854
|
+
dataTestId = _a["data-testid"];
|
|
4631
4855
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4632
4856
|
children: [jsxRuntime.jsxs(FeatureBlockStyled, {
|
|
4857
|
+
"data-testid": dataTestId,
|
|
4633
4858
|
children: [jsxRuntime.jsx(ImageWrapper, {
|
|
4634
4859
|
children: jsxRuntime.jsx(Picture, {
|
|
4635
4860
|
title: title,
|
|
@@ -4675,15 +4900,18 @@ var FeatureBlock = function FeatureBlock(_a) {
|
|
|
4675
4900
|
};
|
|
4676
4901
|
var templateObject_1$e, templateObject_2$c, templateObject_3$b, templateObject_4$a, templateObject_5$9;
|
|
4677
4902
|
|
|
4678
|
-
var _a = data.tokensJson.
|
|
4679
|
-
|
|
4680
|
-
|
|
4903
|
+
var _a = data.tokensJson.semantic,
|
|
4904
|
+
color$1 = _a.color,
|
|
4905
|
+
border$1 = _a.border,
|
|
4681
4906
|
zIndex = _a.zIndex,
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
input$1 =
|
|
4907
|
+
elevation$1 = _a.elevation,
|
|
4908
|
+
motion$1 = _a.motion,
|
|
4909
|
+
spacing = _a.spacing.layout,
|
|
4910
|
+
_b = data.tokensJson.component,
|
|
4911
|
+
input$1 = _b.input,
|
|
4912
|
+
field$3 = _b.field;
|
|
4913
|
+
var duration = motion$1.duration,
|
|
4914
|
+
easing = motion$1.easing;
|
|
4687
4915
|
var DropdownContainer = styled__default.default.div.withConfig({
|
|
4688
4916
|
displayName: "Dropdown__DropdownContainer",
|
|
4689
4917
|
componentId: "sc-kz07c4-0"
|
|
@@ -4694,10 +4922,10 @@ var DropdownTrigger = styled__default.default.button.withConfig({
|
|
|
4694
4922
|
},
|
|
4695
4923
|
displayName: "Dropdown__DropdownTrigger",
|
|
4696
4924
|
componentId: "sc-kz07c4-1"
|
|
4697
|
-
})(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
|
|
4925
|
+
})(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor: ", ";\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: ", ";\n }\n \n ", "\n"])), input$1["default"].paddingY, input$1["default"].paddingX, input$1["default"].backgroundColor, input$1["default"].borderWidth, function (_a) {
|
|
4698
4926
|
var $hasError = _a.$hasError;
|
|
4699
4927
|
return $hasError ? input$1.error.borderColor : input$1["default"].borderColor;
|
|
4700
|
-
}, input$1["default"].borderRadius, input$1["default"].font, input$1["default"].textColor, function (_a) {
|
|
4928
|
+
}, input$1["default"].borderRadius, input$1["default"].font, input$1["default"].textColor, duration.normal, easing.easeInOut, duration.normal, easing.easeInOut, function (_a) {
|
|
4701
4929
|
var $hasError = _a.$hasError;
|
|
4702
4930
|
return $hasError ? input$1.error.hover.borderColor : input$1.hover.borderColor;
|
|
4703
4931
|
}, function (_a) {
|
|
@@ -4714,17 +4942,17 @@ var DropdownIcon = styled__default.default.div.withConfig({
|
|
|
4714
4942
|
},
|
|
4715
4943
|
displayName: "Dropdown__DropdownIcon",
|
|
4716
4944
|
componentId: "sc-kz07c4-2"
|
|
4717
|
-
})(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: ", ";\n transition: transform
|
|
4945
|
+
})(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: ", ";\n transition: transform ", " ", ";\n \n ", "\n\n ", " {\n transition: none;\n }\n"], ["\n display: flex;\n align-items: center;\n margin-left: ", ";\n transition: transform ", " ", ";\n \n ", "\n\n ", " {\n transition: none;\n }\n"])), spacing.sm, duration.fast, easing.easeOut, function (_a) {
|
|
4718
4946
|
var $isOpen = _a.$isOpen;
|
|
4719
4947
|
return $isOpen && "\n transform: rotate(180deg);\n ";
|
|
4720
|
-
});
|
|
4948
|
+
}, reducedMotion);
|
|
4721
4949
|
var DropdownMenu = styled__default.default.div.withConfig({
|
|
4722
4950
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4723
4951
|
return !prop.startsWith('$');
|
|
4724
4952
|
},
|
|
4725
4953
|
displayName: "Dropdown__DropdownMenu",
|
|
4726
4954
|
componentId: "sc-kz07c4-3"
|
|
4727
|
-
})(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 border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: all
|
|
4955
|
+
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n border: ", " solid ", ";\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 border: ", " solid ", ";\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, input$1["default"].borderWidth, input$1["default"].borderColor, input$1["default"].borderRadius, elevation$1.floating, spacing.xs, function (_a) {
|
|
4728
4956
|
var $isOpen = _a.$isOpen;
|
|
4729
4957
|
return $isOpen ? 1 : 0;
|
|
4730
4958
|
}, function (_a) {
|
|
@@ -4732,28 +4960,28 @@ var DropdownMenu = styled__default.default.div.withConfig({
|
|
|
4732
4960
|
return $isOpen ? 'visible' : 'hidden';
|
|
4733
4961
|
}, function (_a) {
|
|
4734
4962
|
var $isOpen = _a.$isOpen;
|
|
4735
|
-
return $isOpen ? 'translateY(0)' :
|
|
4736
|
-
});
|
|
4963
|
+
return $isOpen ? 'translateY(0)' : "translateY(-".concat(spacing.sm, ")");
|
|
4964
|
+
}, duration.fast, easing.easeOut, data.tokensJson.semantic.size.menu.maxHeight, reducedMotion);
|
|
4737
4965
|
var DropdownOption = styled__default.default.button.withConfig({
|
|
4738
4966
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4739
4967
|
return !prop.startsWith('$');
|
|
4740
4968
|
},
|
|
4741
4969
|
displayName: "Dropdown__DropdownOption",
|
|
4742
4970
|
componentId: "sc-kz07c4-4"
|
|
4743
|
-
})(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
|
|
4971
|
+
})(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"], ["\n width: 100%;\n display: block;\n padding: ", " ", ";\n background-color: ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n \n &:hover {\n background-color: ", ";\n }\n \n &:focus {\n outline: none;\n background-color: ", ";\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"])), input$1["default"].paddingY, input$1["default"].paddingX, function (_a) {
|
|
4744
4972
|
var $isSelected = _a.$isSelected,
|
|
4745
4973
|
$isFocused = _a.$isFocused;
|
|
4746
4974
|
if ($isFocused) return color$1.background.surface;
|
|
4747
4975
|
if ($isSelected) return color$1.background.surface;
|
|
4748
4976
|
return 'transparent';
|
|
4749
|
-
}, input$1["default"].font, input$1["default"].textColor, color$1.background.surface, color$1.background.surface, border$1.subtle);
|
|
4977
|
+
}, input$1["default"].font, input$1["default"].textColor, duration.fast, easing.easeOut, color$1.background.surface, color$1.background.surface, border$1.subtle);
|
|
4750
4978
|
var StyledHelperText$3 = styled__default.default.div.withConfig({
|
|
4751
4979
|
displayName: "Dropdown__StyledHelperText",
|
|
4752
4980
|
componentId: "sc-kz07c4-5"
|
|
4753
|
-
})(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"], ["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"])), typography
|
|
4981
|
+
})(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) {
|
|
4754
4982
|
var $hasError = _a.$hasError;
|
|
4755
|
-
return $hasError ?
|
|
4756
|
-
},
|
|
4983
|
+
return $hasError ? field$3.helperText.colorError : field$3.helperText.color;
|
|
4984
|
+
}, field$3.gap);
|
|
4757
4985
|
var Dropdown = function Dropdown(_a) {
|
|
4758
4986
|
var options = _a.options,
|
|
4759
4987
|
value = _a.value,
|
|
@@ -4765,7 +4993,8 @@ var Dropdown = function Dropdown(_a) {
|
|
|
4765
4993
|
className = _a.className,
|
|
4766
4994
|
label = _a.label,
|
|
4767
4995
|
helperText = _a.helperText,
|
|
4768
|
-
error = _a.error
|
|
4996
|
+
error = _a.error,
|
|
4997
|
+
dataTestId = _a["data-testid"];
|
|
4769
4998
|
var _d = React.useState(false),
|
|
4770
4999
|
isOpen = _d[0],
|
|
4771
5000
|
setIsOpen = _d[1];
|
|
@@ -4870,11 +5099,12 @@ var Dropdown = function Dropdown(_a) {
|
|
|
4870
5099
|
return jsxRuntime.jsxs(DropdownContainer, {
|
|
4871
5100
|
ref: dropdownRef,
|
|
4872
5101
|
className: className,
|
|
5102
|
+
"data-testid": dataTestId,
|
|
4873
5103
|
children: [label && jsxRuntime.jsx("label", {
|
|
4874
5104
|
htmlFor: dropdownId,
|
|
4875
5105
|
style: {
|
|
4876
5106
|
display: 'block',
|
|
4877
|
-
marginBottom:
|
|
5107
|
+
marginBottom: field$3.gap
|
|
4878
5108
|
},
|
|
4879
5109
|
children: jsxRuntime.jsx(Typography, {
|
|
4880
5110
|
variant: "label",
|
|
@@ -4929,7 +5159,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
4929
5159
|
};
|
|
4930
5160
|
var templateObject_1$d, templateObject_2$b, templateObject_3$a, templateObject_4$9, templateObject_5$8, templateObject_6$7;
|
|
4931
5161
|
|
|
4932
|
-
var semantic$
|
|
5162
|
+
var semantic$5 = data.tokensJson.semantic;
|
|
4933
5163
|
var StyledList = styled__default.default.ul.withConfig({
|
|
4934
5164
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4935
5165
|
return !prop.startsWith('$');
|
|
@@ -4938,7 +5168,7 @@ var StyledList = styled__default.default.ul.withConfig({
|
|
|
4938
5168
|
componentId: "sc-1irksg5-0"
|
|
4939
5169
|
})(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) {
|
|
4940
5170
|
var $dividers = _a.$dividers;
|
|
4941
|
-
return $dividers && "\n > li:not(:last-child) {\n border-bottom:
|
|
5171
|
+
return $dividers && "\n > li:not(:last-child) {\n border-bottom: ".concat(semantic$5.border.width.thin, " solid ").concat(semantic$5.color.border["default"], ";\n }\n ");
|
|
4942
5172
|
});
|
|
4943
5173
|
var List = function List(_a) {
|
|
4944
5174
|
var children = _a.children,
|
|
@@ -4962,20 +5192,19 @@ var List = function List(_a) {
|
|
|
4962
5192
|
List.displayName = 'List';
|
|
4963
5193
|
var templateObject_1$c;
|
|
4964
5194
|
|
|
4965
|
-
var semantic$
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
semantic$7.motion;
|
|
5195
|
+
var semantic$4 = data.tokensJson.semantic;
|
|
5196
|
+
var layout = semantic$4.spacing.layout,
|
|
5197
|
+
color = semantic$4.color,
|
|
5198
|
+
border = semantic$4.border,
|
|
5199
|
+
elevation = semantic$4.elevation,
|
|
5200
|
+
motion = semantic$4.motion;
|
|
4972
5201
|
// ---------------------------------------------------------------------------
|
|
4973
5202
|
// Size map
|
|
4974
5203
|
// ---------------------------------------------------------------------------
|
|
4975
5204
|
var sizeToWidth = {
|
|
4976
|
-
small:
|
|
4977
|
-
medium:
|
|
4978
|
-
large:
|
|
5205
|
+
small: data.tokensJson.semantic.size.overlay.sm,
|
|
5206
|
+
medium: data.tokensJson.semantic.size.overlay.md,
|
|
5207
|
+
large: data.tokensJson.semantic.size.overlay.lg
|
|
4979
5208
|
};
|
|
4980
5209
|
// ---------------------------------------------------------------------------
|
|
4981
5210
|
// Animations
|
|
@@ -4992,17 +5221,29 @@ var scaleIn = styled.keyframes(templateObject_2$a || (templateObject_2$a = __mak
|
|
|
4992
5221
|
var StyledOverlay$1 = styled__default.default.div.withConfig({
|
|
4993
5222
|
displayName: "Modal__StyledOverlay",
|
|
4994
5223
|
componentId: "sc-1d3g5gh-0"
|
|
4995
|
-
})(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n position: fixed;\n inset: 0;\n background-color:
|
|
5224
|
+
})(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"], ["\n position: fixed;\n inset: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"])), color.background.overlay, semantic$4.zIndex.modal, styled.css(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5225
|
+
var $isExiting = _a.$isExiting;
|
|
5226
|
+
return $isExiting && exitAnimation;
|
|
5227
|
+
}));
|
|
4996
5228
|
var StyledDialog = styled__default.default.div.withConfig({
|
|
4997
5229
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
4998
5230
|
return !prop.startsWith('$');
|
|
4999
5231
|
},
|
|
5000
5232
|
displayName: "Modal__StyledDialog",
|
|
5001
5233
|
componentId: "sc-1d3g5gh-1"
|
|
5002
|
-
})(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:
|
|
5234
|
+
})(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"], ["\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n z-index: ", ";\n\n width: ", ";\n max-width: calc(100vw - ", " * 2);\n max-height: calc(100vh - ", " * 2);\n\n display: flex;\n flex-direction: column;\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n overflow: hidden;\n\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n\n /* Auto-fullscreen below md breakpoint (768px) */\n @media (max-width: ", ") {\n width: 100vw;\n height: 100vh;\n max-width: 100vw;\n max-height: 100vh;\n border-radius: 0;\n top: 0;\n left: 0;\n transform: none;\n animation: ", " ", " ", "", ";\n }\n\n &:focus {\n outline: none;\n }\n\n"])), semantic$4.zIndex.modal, function (_a) {
|
|
5003
5235
|
var $width = _a.$width;
|
|
5004
5236
|
return $width;
|
|
5005
|
-
}, layout.lg, layout.lg, color.background.subtle, border.radius.xl, elevation.overlay, styled.css(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["animation: ", "
|
|
5237
|
+
}, layout.lg, layout.lg, color.background.subtle, border.radius.xl, elevation.overlay, styled.css(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), scaleIn, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5238
|
+
var $isExiting = _a.$isExiting;
|
|
5239
|
+
return $isExiting && exitAnimation;
|
|
5240
|
+
}), reducedMotion, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5241
|
+
var $isExiting = _a.$isExiting;
|
|
5242
|
+
return $isExiting && exitAnimation;
|
|
5243
|
+
}, semantic$4.breakpoint.md, fadeIn$1, motion.duration.normal, motion.easing.easeOut, function (_a) {
|
|
5244
|
+
var $isExiting = _a.$isExiting;
|
|
5245
|
+
return $isExiting && exitAnimation;
|
|
5246
|
+
});
|
|
5006
5247
|
var StyledHeader = styled__default.default.div.withConfig({
|
|
5007
5248
|
displayName: "Modal__StyledHeader",
|
|
5008
5249
|
componentId: "sc-1d3g5gh-2"
|
|
@@ -5010,7 +5251,7 @@ var StyledHeader = styled__default.default.div.withConfig({
|
|
|
5010
5251
|
var StyledBody = styled__default.default.div.withConfig({
|
|
5011
5252
|
displayName: "Modal__StyledBody",
|
|
5012
5253
|
componentId: "sc-1d3g5gh-3"
|
|
5013
|
-
})(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,
|
|
5254
|
+
})(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n flex: 1 1 auto;\n overflow-y: auto;\n padding: ", " ", ";\n\n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n &::-webkit-scrollbar-track {\n background: ", ";\n }\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"], ["\n flex: 1 1 auto;\n overflow-y: auto;\n padding: ", " ", ";\n\n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n &::-webkit-scrollbar-track {\n background: ", ";\n }\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"])), layout.md, layout.lg, semantic$4.spacing.layout.sm, color.background.surface, color.border["default"], border.radius.circle, color.border.strong);
|
|
5014
5255
|
var StyledFooter = styled__default.default.div.withConfig({
|
|
5015
5256
|
displayName: "Modal__StyledFooter",
|
|
5016
5257
|
componentId: "sc-1d3g5gh-4"
|
|
@@ -5064,6 +5305,10 @@ var Modal = function Modal(_a) {
|
|
|
5064
5305
|
ariaDescribedBy = _a["aria-describedby"];
|
|
5065
5306
|
var dialogRef = React.useRef(null);
|
|
5066
5307
|
var previousFocusRef = React.useRef(null);
|
|
5308
|
+
var _e = usePresence(isOpen),
|
|
5309
|
+
isPresent = _e.isPresent,
|
|
5310
|
+
isExiting = _e.isExiting;
|
|
5311
|
+
useInert(dialogRef, isExiting);
|
|
5067
5312
|
// -----------------------------------------------------------------------
|
|
5068
5313
|
// Focus & scroll-lock management
|
|
5069
5314
|
// -----------------------------------------------------------------------
|
|
@@ -5115,19 +5360,22 @@ var Modal = function Modal(_a) {
|
|
|
5115
5360
|
// Overlay click
|
|
5116
5361
|
// -----------------------------------------------------------------------
|
|
5117
5362
|
var handleOverlayClick = function handleOverlayClick(event) {
|
|
5118
|
-
|
|
5363
|
+
// While exiting, the backdrop still catches clicks but doesn't close again
|
|
5364
|
+
if (!isExiting && closeOnOverlayClick && event.target === event.currentTarget) {
|
|
5119
5365
|
onClose();
|
|
5120
5366
|
}
|
|
5121
5367
|
};
|
|
5122
5368
|
// -----------------------------------------------------------------------
|
|
5123
5369
|
// Render
|
|
5124
5370
|
// -----------------------------------------------------------------------
|
|
5125
|
-
|
|
5371
|
+
// Stays mounted while the exit fade runs, hidden from assistive technology
|
|
5372
|
+
if (!isPresent) return null;
|
|
5126
5373
|
var titleId = dataTestId ? "".concat(dataTestId, "-title") : 'modal-title';
|
|
5127
5374
|
var width = sizeToWidth[size];
|
|
5128
5375
|
var modal = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5129
5376
|
children: [jsxRuntime.jsx(StyledOverlay$1, {
|
|
5130
5377
|
onClick: handleOverlayClick,
|
|
5378
|
+
"$isExiting": isExiting,
|
|
5131
5379
|
"data-testid": dataTestId ? "".concat(dataTestId, "-overlay") : 'modal-overlay'
|
|
5132
5380
|
}), jsxRuntime.jsxs(StyledDialog, {
|
|
5133
5381
|
ref: dialogRef,
|
|
@@ -5136,8 +5384,10 @@ var Modal = function Modal(_a) {
|
|
|
5136
5384
|
"aria-label": ariaLabel || title,
|
|
5137
5385
|
"aria-labelledby": titleId,
|
|
5138
5386
|
"aria-describedby": ariaDescribedBy,
|
|
5387
|
+
"aria-hidden": isExiting || undefined,
|
|
5139
5388
|
tabIndex: -1,
|
|
5140
5389
|
"$width": width,
|
|
5390
|
+
"$isExiting": isExiting,
|
|
5141
5391
|
onKeyDown: handleKeyDown,
|
|
5142
5392
|
"data-testid": dataTestId,
|
|
5143
5393
|
children: [jsxRuntime.jsxs(StyledHeader, {
|
|
@@ -5192,7 +5442,7 @@ var StyledInputBase = styled__default.default.input.withConfig({
|
|
|
5192
5442
|
},
|
|
5193
5443
|
displayName: "InputBase__StyledInputBase",
|
|
5194
5444
|
componentId: "sc-1bpf4e8-0"
|
|
5195
|
-
})(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
|
|
5445
|
+
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n /* Typography */\n font: ", ";\n color: ", ";\n \n /* Layout */\n width: 100%;\n padding: ", " ", ";\n \n /* Visual styling */\n background-color: ", ";\n \n border: ", " solid ", ";\n \n border-radius: ", ";\n \n /* Remove default appearance */\n appearance: none;\n outline: none;\n \n /* Transitions */\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n /* Placeholder */\n &::placeholder {\n color: ", ";\n opacity: 1;\n }\n \n /* Focus state */\n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n /* Hover state (only when not disabled) */\n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n /* Disabled state */\n &:disabled {\n cursor: ", ";\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: ", ";\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"
|
|
5196
5446
|
/**
|
|
5197
5447
|
* Base styled textarea with shared styling
|
|
5198
5448
|
*/])), input["default"].font, function (_a) {
|
|
@@ -5207,7 +5457,7 @@ var StyledInputBase = styled__default.default.input.withConfig({
|
|
|
5207
5457
|
if ($disabled) return input.disabled.borderColor;
|
|
5208
5458
|
if ($hasError) return input.error.borderColor;
|
|
5209
5459
|
return input["default"].borderColor;
|
|
5210
|
-
}, input["default"].borderRadius, input.placeholder.textColor, function (_a) {
|
|
5460
|
+
}, input["default"].borderRadius, data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut, data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeInOut, input.placeholder.textColor, function (_a) {
|
|
5211
5461
|
var $hasError = _a.$hasError;
|
|
5212
5462
|
return $hasError ? input.error.focus.borderColor : input.focus.borderColor;
|
|
5213
5463
|
}, input.focus.outline, input.focus.outlineOffset, function (_a) {
|
|
@@ -5223,23 +5473,22 @@ var StyledTextAreaBase = styled__default.default.textarea.withConfig({
|
|
|
5223
5473
|
},
|
|
5224
5474
|
displayName: "InputBase__StyledTextAreaBase",
|
|
5225
5475
|
componentId: "sc-1bpf4e8-1"
|
|
5226
|
-
})(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n /* Inherit all input base styles */\n ", "\n \n /* TextArea specific */\n min-height:
|
|
5476
|
+
})(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n /* Inherit all input base styles */\n ", "\n \n /* TextArea specific */\n min-height: ", ";\n resize: vertical;\n font-family: inherit;\n line-height: ", ";\n"], ["\n /* Inherit all input base styles */\n ", "\n \n /* TextArea specific */\n min-height: ", ";\n resize: vertical;\n font-family: inherit;\n line-height: ", ";\n"])), StyledInputBase, data.tokensJson.component.input.textarea.minHeight, data.tokensJson.semantic.lineHeight.normal);
|
|
5227
5477
|
var templateObject_1$a, templateObject_2$9;
|
|
5228
5478
|
|
|
5229
|
-
var
|
|
5230
|
-
base$6 = data.tokensJson.base;
|
|
5479
|
+
var field$2 = data.tokensJson.component.field;
|
|
5231
5480
|
var StyledFieldContainer$2 = styled__default.default.div.withConfig({
|
|
5232
5481
|
displayName: "NumberInput__StyledFieldContainer",
|
|
5233
5482
|
componentId: "sc-qotc3w-0"
|
|
5234
|
-
})(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"])),
|
|
5483
|
+
})(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"])), field$2.gap);
|
|
5235
5484
|
var StyledLabel$3 = styled__default.default.label.withConfig({
|
|
5236
5485
|
displayName: "NumberInput__StyledLabel",
|
|
5237
5486
|
componentId: "sc-qotc3w-1"
|
|
5238
|
-
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n
|
|
5487
|
+
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])), field$2.label.gap, field$2.label.typography, field$2.label.color, field$2.label.colorDisabled);
|
|
5239
5488
|
var StyledRequiredIndicator$2 = styled__default.default.span.withConfig({
|
|
5240
5489
|
displayName: "NumberInput__StyledRequiredIndicator",
|
|
5241
5490
|
componentId: "sc-qotc3w-2"
|
|
5242
|
-
})(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n"])),
|
|
5491
|
+
})(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n"])), field$2.requiredIndicator.color, field$2.requiredIndicator.fontWeight);
|
|
5243
5492
|
var StyledInputWrapper$2 = styled__default.default.div.withConfig({
|
|
5244
5493
|
displayName: "NumberInput__StyledInputWrapper",
|
|
5245
5494
|
componentId: "sc-qotc3w-3"
|
|
@@ -5247,11 +5496,11 @@ var StyledInputWrapper$2 = styled__default.default.div.withConfig({
|
|
|
5247
5496
|
var StyledNumberInput = styled__default.default(StyledInputBase).withConfig({
|
|
5248
5497
|
displayName: "NumberInput__StyledNumberInput",
|
|
5249
5498
|
componentId: "sc-qotc3w-4"
|
|
5250
|
-
})(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n /* Add padding on the right to make room for stepper buttons */\n padding-right: ", ";\n"], ["\n /* Add padding on the right to make room for stepper buttons */\n padding-right: ", ";\n"])),
|
|
5499
|
+
})(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n /* Add padding on the right to make room for stepper buttons */\n padding-right: ", ";\n"], ["\n /* Add padding on the right to make room for stepper buttons */\n padding-right: ", ";\n"])), data.tokensJson.semantic.spacing.layout['6xl']);
|
|
5251
5500
|
var StyledStepperContainer = styled__default.default.div.withConfig({
|
|
5252
5501
|
displayName: "NumberInput__StyledStepperContainer",
|
|
5253
5502
|
componentId: "sc-qotc3w-5"
|
|
5254
|
-
})(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n"], ["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n"])),
|
|
5503
|
+
})(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n"], ["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n"])), data.tokensJson.semantic.spacing.layout.sm, data.tokensJson.semantic.spacing.layout.sm);
|
|
5255
5504
|
var StyledHelperText$2 = styled__default.default.div.withConfig({
|
|
5256
5505
|
displayName: "NumberInput__StyledHelperText",
|
|
5257
5506
|
componentId: "sc-qotc3w-6"
|
|
@@ -5278,9 +5527,9 @@ var StyledHelperText$2 = styled__default.default.div.withConfig({
|
|
|
5278
5527
|
* onChange={(newValue) => setValue(newValue)}
|
|
5279
5528
|
* />
|
|
5280
5529
|
* ```
|
|
5281
|
-
*/])),
|
|
5530
|
+
*/])), field$2.helperText.typography, function (_a) {
|
|
5282
5531
|
var $isError = _a.$isError;
|
|
5283
|
-
return $isError ?
|
|
5532
|
+
return $isError ? field$2.helperText.colorError : field$2.helperText.color;
|
|
5284
5533
|
});
|
|
5285
5534
|
/**
|
|
5286
5535
|
* NumberInput component for numeric input with stepper buttons and WCAG 2.2 AA compliance
|
|
@@ -5487,10 +5736,36 @@ var PageTitleStyled = styled__default.default.div.withConfig({
|
|
|
5487
5736
|
},
|
|
5488
5737
|
displayName: "PageTitle__PageTitleStyled",
|
|
5489
5738
|
componentId: "sc-16h256f-0"
|
|
5490
|
-
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin-bottom: ", ";\n margin-top: ", ";\n"
|
|
5739
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin-bottom: ", ";\n margin-top: ", ";\n"
|
|
5740
|
+
/**
|
|
5741
|
+
* @deprecated PageTitle is a leftover from the personal site (its back button always links to `/music`)
|
|
5742
|
+
* and will be removed in the next major version. Compose a page title from `Typography` in a `Stack`:
|
|
5743
|
+
*
|
|
5744
|
+
* ```tsx
|
|
5745
|
+
* <Stack direction="column" gap="md">
|
|
5746
|
+
* <Typography variant="h1">{title}</Typography>
|
|
5747
|
+
* <Typography variant="caption" color="subdued">{subtitle}</Typography>
|
|
5748
|
+
* </Stack>
|
|
5749
|
+
* ```
|
|
5750
|
+
*
|
|
5751
|
+
* For a back link, add an `IconButton` with your own `url` and `aria-label`.
|
|
5752
|
+
*/])), data.tokensJson.semantic.spacing.layout['2xl'], function (_a) {
|
|
5491
5753
|
var $hasBackButton = _a.$hasBackButton;
|
|
5492
|
-
return $hasBackButton ? data.tokensJson.
|
|
5754
|
+
return $hasBackButton ? data.tokensJson.semantic.spacing.layout.none : data.tokensJson.semantic.spacing.layout['7xl'];
|
|
5493
5755
|
});
|
|
5756
|
+
/**
|
|
5757
|
+
* @deprecated PageTitle is a leftover from the personal site (its back button always links to `/music`)
|
|
5758
|
+
* and will be removed in the next major version. Compose a page title from `Typography` in a `Stack`:
|
|
5759
|
+
*
|
|
5760
|
+
* ```tsx
|
|
5761
|
+
* <Stack direction="column" gap="md">
|
|
5762
|
+
* <Typography variant="h1">{title}</Typography>
|
|
5763
|
+
* <Typography variant="caption" color="subdued">{subtitle}</Typography>
|
|
5764
|
+
* </Stack>
|
|
5765
|
+
* ```
|
|
5766
|
+
*
|
|
5767
|
+
* For a back link, add an `IconButton` with your own `url` and `aria-label`.
|
|
5768
|
+
*/
|
|
5494
5769
|
var PageTitle = function PageTitle(_a) {
|
|
5495
5770
|
var title = _a.title,
|
|
5496
5771
|
_b = _a.hasBackButton,
|
|
@@ -5520,26 +5795,25 @@ var PageTitle = function PageTitle(_a) {
|
|
|
5520
5795
|
};
|
|
5521
5796
|
var templateObject_1$8;
|
|
5522
5797
|
|
|
5523
|
-
var
|
|
5524
|
-
base$5 = data.tokensJson.base;
|
|
5798
|
+
var field$1 = data.tokensJson.component.field;
|
|
5525
5799
|
var StyledFieldContainer$1 = styled__default.default.div.withConfig({
|
|
5526
5800
|
displayName: "PasswordField__StyledFieldContainer",
|
|
5527
5801
|
componentId: "sc-1p15zk0-0"
|
|
5528
|
-
})(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"])),
|
|
5802
|
+
})(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"])), field$1.gap);
|
|
5529
5803
|
var StyledLabel$2 = styled__default.default.label.withConfig({
|
|
5530
5804
|
displayName: "PasswordField__StyledLabel",
|
|
5531
5805
|
componentId: "sc-1p15zk0-1"
|
|
5532
|
-
})(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n
|
|
5806
|
+
})(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])), field$1.label.gap, field$1.label.typography, field$1.label.color, field$1.label.colorDisabled);
|
|
5533
5807
|
var StyledRequiredIndicator$1 = styled__default.default.span.withConfig({
|
|
5534
5808
|
displayName: "PasswordField__StyledRequiredIndicator",
|
|
5535
5809
|
componentId: "sc-1p15zk0-2"
|
|
5536
|
-
})(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n"])),
|
|
5810
|
+
})(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n"])), field$1.requiredIndicator.color, field$1.requiredIndicator.fontWeight);
|
|
5537
5811
|
var StyledHelperText$1 = styled__default.default.div.withConfig({
|
|
5538
5812
|
displayName: "PasswordField__StyledHelperText",
|
|
5539
5813
|
componentId: "sc-1p15zk0-3"
|
|
5540
|
-
})(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])),
|
|
5814
|
+
})(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), field$1.helperText.typography, function (_a) {
|
|
5541
5815
|
var $hasError = _a.$hasError;
|
|
5542
|
-
return $hasError ?
|
|
5816
|
+
return $hasError ? field$1.helperText.colorError : field$1.helperText.color;
|
|
5543
5817
|
});
|
|
5544
5818
|
var StyledInputWrapper$1 = styled__default.default.div.withConfig({
|
|
5545
5819
|
displayName: "PasswordField__StyledInputWrapper",
|
|
@@ -5560,7 +5834,7 @@ var StyledToggleButton = styled__default.default.div.withConfig({
|
|
|
5560
5834
|
* required
|
|
5561
5835
|
* />
|
|
5562
5836
|
* ```
|
|
5563
|
-
*/])),
|
|
5837
|
+
*/])), data.tokensJson.semantic.spacing.layout.sm);
|
|
5564
5838
|
/**
|
|
5565
5839
|
* PasswordField component for secure password input with visibility toggle
|
|
5566
5840
|
*
|
|
@@ -5653,8 +5927,7 @@ var PasswordField = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
5653
5927
|
PasswordField.displayName = 'PasswordField';
|
|
5654
5928
|
var templateObject_1$7, templateObject_2$7, templateObject_3$7, templateObject_4$6, templateObject_5$5, templateObject_6$4;
|
|
5655
5929
|
|
|
5656
|
-
var semantic$
|
|
5657
|
-
base$4 = data.tokensJson.base,
|
|
5930
|
+
var semantic$3 = data.tokensJson.semantic,
|
|
5658
5931
|
component = data.tokensJson.component;
|
|
5659
5932
|
var StyledSearchContainer = styled__default.default.div.withConfig({
|
|
5660
5933
|
displayName: "SearchField__StyledSearchContainer",
|
|
@@ -5663,7 +5936,7 @@ var StyledSearchContainer = styled__default.default.div.withConfig({
|
|
|
5663
5936
|
var StyledInputWrapper = styled__default.default.div.withConfig({
|
|
5664
5937
|
displayName: "SearchField__StyledInputWrapper",
|
|
5665
5938
|
componentId: "sc-qhz9i8-1"
|
|
5666
|
-
})(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
|
|
5939
|
+
})(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) {
|
|
5667
5940
|
return props.$isFocused && "\n border-color: ".concat(component.input.focus.borderColor, ";\n outline: ").concat(component.input.focus.outline, ";\n outline-offset: ").concat(component.input.focus.outlineOffset, ";\n ");
|
|
5668
5941
|
}, function (props) {
|
|
5669
5942
|
return props.$disabled && "\n background-color: ".concat(component.input.disabled.backgroundColor, ";\n border-color: ").concat(component.input.disabled.borderColor, ";\n cursor: not-allowed;\n ");
|
|
@@ -5671,15 +5944,15 @@ var StyledInputWrapper = styled__default.default.div.withConfig({
|
|
|
5671
5944
|
var StyledInput = styled__default.default.input.withConfig({
|
|
5672
5945
|
displayName: "SearchField__StyledInput",
|
|
5673
5946
|
componentId: "sc-qhz9i8-2"
|
|
5674
|
-
})(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$
|
|
5947
|
+
})(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n flex: 1;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n }\n \n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n flex: 1;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n }\n \n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$3.typography.body, semantic$3.color.text["default"], semantic$3.color.text.subdued, semantic$3.color.text.disabled);
|
|
5675
5948
|
var StyledSuggestionsList = styled__default.default.ul.withConfig({
|
|
5676
5949
|
displayName: "SearchField__StyledSuggestionsList",
|
|
5677
5950
|
componentId: "sc-qhz9i8-3"
|
|
5678
|
-
})(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n position: absolute;\n top: calc(100% + ", ");\n left: 0;\n right: 0;\n max-height:
|
|
5951
|
+
})(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n position: absolute;\n top: calc(100% + ", ");\n left: 0;\n right: 0;\n max-height: ", ";\n overflow-y: auto;\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n list-style: none;\n padding: ", " 0;\n margin: 0;\n z-index: ", ";\n"], ["\n position: absolute;\n top: calc(100% + ", ");\n left: 0;\n right: 0;\n max-height: ", ";\n overflow-y: auto;\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n list-style: none;\n padding: ", " 0;\n margin: 0;\n z-index: ", ";\n"])), semantic$3.spacing.layout.xs, data.tokensJson.semantic.size.menu.maxHeight, semantic$3.color.background.subtle, semantic$3.border.width.thin, semantic$3.color.border["default"], semantic$3.border.radius.md, semantic$3.elevation.floating, semantic$3.spacing.layout.xs, semantic$3.zIndex.dropdown);
|
|
5679
5952
|
var StyledSectionHeader = styled__default.default.div.withConfig({
|
|
5680
5953
|
displayName: "SearchField__StyledSectionHeader",
|
|
5681
5954
|
componentId: "sc-qhz9i8-4"
|
|
5682
|
-
})(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n text-transform: uppercase;\n letter-spacing: ", ";\n"], ["\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n text-transform: uppercase;\n letter-spacing: ", ";\n"])),
|
|
5955
|
+
})(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n text-transform: uppercase;\n letter-spacing: ", ";\n"], ["\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n text-transform: uppercase;\n letter-spacing: ", ";\n"])), semantic$3.spacing.layout.sm, semantic$3.spacing.layout.md, data.tokensJson.component.searchField.sectionHeader.typography, semantic$3.color.text.subdued, data.tokensJson.component.searchField.sectionHeader.letterSpacing);
|
|
5683
5956
|
var debounce = function debounce(func, wait) {
|
|
5684
5957
|
var timeout = null;
|
|
5685
5958
|
return function () {
|
|
@@ -5982,8 +6255,7 @@ var SearchField = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
5982
6255
|
SearchField.displayName = 'SearchField';
|
|
5983
6256
|
var templateObject_1$6, templateObject_2$6, templateObject_3$6, templateObject_4$5, templateObject_5$4;
|
|
5984
6257
|
|
|
5985
|
-
var semantic$
|
|
5986
|
-
base$3 = data.tokensJson.base;
|
|
6258
|
+
var semantic$2 = data.tokensJson.semantic;
|
|
5987
6259
|
// Fade in animation for overlay
|
|
5988
6260
|
var fadeIn = styled.keyframes(templateObject_1$5 || (templateObject_1$5 = __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"
|
|
5989
6261
|
// Slide animations for each position
|
|
@@ -5999,35 +6271,50 @@ var StyledOverlay = styled__default.default.div.withConfig({
|
|
|
5999
6271
|
},
|
|
6000
6272
|
displayName: "Sheet__StyledOverlay",
|
|
6001
6273
|
componentId: "sc-8abisx-0"
|
|
6002
|
-
})(templateObject_7$3 || (templateObject_7$3 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color:
|
|
6003
|
-
var $
|
|
6004
|
-
return $
|
|
6005
|
-
});
|
|
6274
|
+
})(templateObject_7$3 || (templateObject_7$3 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"], ["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ", ";\n z-index: ", ";\n ", "\n"])), semantic$2.color.background.overlay, semantic$2.zIndex.overlay, styled.css(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), fadeIn, semantic$2.motion.duration.normal, semantic$2.motion.easing.easeInOut, function (_a) {
|
|
6275
|
+
var $isExiting = _a.$isExiting;
|
|
6276
|
+
return $isExiting && exitAnimation;
|
|
6277
|
+
}));
|
|
6006
6278
|
var StyledSheet = styled__default.default.div.withConfig({
|
|
6007
6279
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6008
6280
|
return !prop.startsWith('$');
|
|
6009
6281
|
},
|
|
6010
6282
|
displayName: "Sheet__StyledSheet",
|
|
6011
6283
|
componentId: "sc-8abisx-1"
|
|
6012
|
-
})(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n position: fixed;\n background-color: ", ";\n box-shadow: ", ";\n z-index:
|
|
6284
|
+
})(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n position: fixed;\n background-color: ", ";\n box-shadow: ", ";\n z-index: ", ";\n overflow-y: auto;\n \n /* Position-specific styles */\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n \n /* Focus trap styling */\n &:focus {\n outline: none;\n }\n\n \n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n \n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"], ["\n position: fixed;\n background-color: ", ";\n box-shadow: ", ";\n z-index: ", ";\n overflow-y: auto;\n \n /* Position-specific styles */\n ", "\n\n ", " {\n animation: ", " ", " ", "", ";\n }\n \n /* Focus trap styling */\n &:focus {\n outline: none;\n }\n\n \n /* Scrollbar styling */\n &::-webkit-scrollbar {\n width: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n \n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"])), semantic$2.color.background["default"], semantic$2.elevation.overlay, semantic$2.zIndex.overlay, function (_a) {
|
|
6013
6285
|
var $position = _a.$position,
|
|
6014
6286
|
$variant = _a.$variant,
|
|
6015
6287
|
$width = _a.$width,
|
|
6016
6288
|
$height = _a.$height;
|
|
6017
6289
|
var isDrawer = $variant === 'drawer';
|
|
6018
|
-
var margin = isDrawer ?
|
|
6019
|
-
var borderRadius = isDrawer ?
|
|
6290
|
+
var margin = isDrawer ? semantic$2.spacing.layout.lg : '0';
|
|
6291
|
+
var borderRadius = isDrawer ? semantic$2.border.radius.md : '0';
|
|
6020
6292
|
switch ($position) {
|
|
6021
6293
|
case 'right':
|
|
6022
|
-
return styled.css(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n top: ", ";\n right: ", ";\n bottom: ", ";\n width: ", ";\n max-width: calc(100vw - ", ");\n border-radius: ", " 0 0 ", ";\n animation: ", "
|
|
6294
|
+
return styled.css(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n top: ", ";\n right: ", ";\n bottom: ", ";\n width: ", ";\n max-width: calc(100vw - ", ");\n border-radius: ", " 0 0 ", ";\n animation: ", " ", " ", "", ";\n "], ["\n top: ", ";\n right: ", ";\n bottom: ", ";\n width: ", ";\n max-width: calc(100vw - ", ");\n border-radius: ", " 0 0 ", ";\n animation: ", " ", " ", "", ";\n "])), margin, margin, margin, $width, isDrawer ? "".concat(semantic$2.spacing.layout.lg, " * 2") : '0px', borderRadius, borderRadius, slideInRight, semantic$2.motion.duration.normal, semantic$2.motion.easing.easeInOut, function (_a) {
|
|
6295
|
+
var $isExiting = _a.$isExiting;
|
|
6296
|
+
return $isExiting && exitAnimation;
|
|
6297
|
+
});
|
|
6023
6298
|
case 'left':
|
|
6024
|
-
return styled.css(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n top: ", ";\n left: ", ";\n bottom: ", ";\n width: ", ";\n max-width: calc(100vw - ", ");\n border-radius: 0 ", " ", " 0;\n animation: ", "
|
|
6299
|
+
return styled.css(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n top: ", ";\n left: ", ";\n bottom: ", ";\n width: ", ";\n max-width: calc(100vw - ", ");\n border-radius: 0 ", " ", " 0;\n animation: ", " ", " ", "", ";\n "], ["\n top: ", ";\n left: ", ";\n bottom: ", ";\n width: ", ";\n max-width: calc(100vw - ", ");\n border-radius: 0 ", " ", " 0;\n animation: ", " ", " ", "", ";\n "])), margin, margin, margin, $width, isDrawer ? "".concat(semantic$2.spacing.layout.lg, " * 2") : '0px', borderRadius, borderRadius, slideInLeft, semantic$2.motion.duration.normal, semantic$2.motion.easing.easeInOut, function (_a) {
|
|
6300
|
+
var $isExiting = _a.$isExiting;
|
|
6301
|
+
return $isExiting && exitAnimation;
|
|
6302
|
+
});
|
|
6025
6303
|
case 'top':
|
|
6026
|
-
return styled.css(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n top: ", ";\n left: ", ";\n right: ", ";\n height: ", ";\n max-height: calc(100vh - ", ");\n border-radius: 0 0 ", " ", ";\n animation: ", "
|
|
6304
|
+
return styled.css(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n top: ", ";\n left: ", ";\n right: ", ";\n height: ", ";\n max-height: calc(100vh - ", ");\n border-radius: 0 0 ", " ", ";\n animation: ", " ", " ", "", ";\n "], ["\n top: ", ";\n left: ", ";\n right: ", ";\n height: ", ";\n max-height: calc(100vh - ", ");\n border-radius: 0 0 ", " ", ";\n animation: ", " ", " ", "", ";\n "])), margin, margin, margin, $height, isDrawer ? "".concat(semantic$2.spacing.layout.lg, " * 2") : '0px', borderRadius, borderRadius, slideInTop, semantic$2.motion.duration.normal, semantic$2.motion.easing.easeInOut, function (_a) {
|
|
6305
|
+
var $isExiting = _a.$isExiting;
|
|
6306
|
+
return $isExiting && exitAnimation;
|
|
6307
|
+
});
|
|
6027
6308
|
case 'bottom':
|
|
6028
|
-
return styled.css(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n bottom: ", ";\n left: ", ";\n right: ", ";\n height: ", ";\n max-height: calc(100vh - ", ");\n border-radius: ", " ", " 0 0;\n animation: ", "
|
|
6309
|
+
return styled.css(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n bottom: ", ";\n left: ", ";\n right: ", ";\n height: ", ";\n max-height: calc(100vh - ", ");\n border-radius: ", " ", " 0 0;\n animation: ", " ", " ", "", ";\n "], ["\n bottom: ", ";\n left: ", ";\n right: ", ";\n height: ", ";\n max-height: calc(100vh - ", ");\n border-radius: ", " ", " 0 0;\n animation: ", " ", " ", "", ";\n "])), margin, margin, margin, $height, isDrawer ? "".concat(semantic$2.spacing.layout.lg, " * 2") : '0px', borderRadius, borderRadius, slideInBottom, semantic$2.motion.duration.normal, semantic$2.motion.easing.easeInOut, function (_a) {
|
|
6310
|
+
var $isExiting = _a.$isExiting;
|
|
6311
|
+
return $isExiting && exitAnimation;
|
|
6312
|
+
});
|
|
6029
6313
|
}
|
|
6030
|
-
},
|
|
6314
|
+
}, reducedMotion, fadeIn, semantic$2.motion.duration.normal, semantic$2.motion.easing.easeInOut, function (_a) {
|
|
6315
|
+
var $isExiting = _a.$isExiting;
|
|
6316
|
+
return $isExiting && exitAnimation;
|
|
6317
|
+
}, semantic$2.spacing.layout.sm, semantic$2.color.background.subtle, semantic$2.color.border["default"], semantic$2.border.radius.circle, semantic$2.color.border.strong);
|
|
6031
6318
|
var StyledSheetContent = styled__default.default.div.withConfig({
|
|
6032
6319
|
displayName: "Sheet__StyledSheetContent",
|
|
6033
6320
|
componentId: "sc-8abisx-2"
|
|
@@ -6057,7 +6344,7 @@ var StyledSheetContent = styled__default.default.div.withConfig({
|
|
|
6057
6344
|
* <h2>Mobile Menu</h2>
|
|
6058
6345
|
* </Sheet>
|
|
6059
6346
|
* ```
|
|
6060
|
-
*/])),
|
|
6347
|
+
*/])), semantic$2.spacing.layout['2xl']);
|
|
6061
6348
|
/**
|
|
6062
6349
|
* Sheet component for side panels and drawers
|
|
6063
6350
|
*
|
|
@@ -6092,9 +6379,9 @@ var Sheet = function Sheet(_a) {
|
|
|
6092
6379
|
_c = _a.variant,
|
|
6093
6380
|
variant = _c === void 0 ? 'sheet' : _c,
|
|
6094
6381
|
_d = _a.width,
|
|
6095
|
-
width = _d === void 0 ?
|
|
6382
|
+
width = _d === void 0 ? data.tokensJson.semantic.size.overlay.sm : _d,
|
|
6096
6383
|
_e = _a.height,
|
|
6097
|
-
height = _e === void 0 ?
|
|
6384
|
+
height = _e === void 0 ? data.tokensJson.semantic.size.overlay.sm : _e,
|
|
6098
6385
|
children = _a.children,
|
|
6099
6386
|
_f = _a.closeOnOverlayClick,
|
|
6100
6387
|
closeOnOverlayClick = _f === void 0 ? true : _f,
|
|
@@ -6106,18 +6393,27 @@ var Sheet = function Sheet(_a) {
|
|
|
6106
6393
|
ariaDescribedBy = _a["aria-describedby"];
|
|
6107
6394
|
var sheetRef = React.useRef(null);
|
|
6108
6395
|
var previousFocusRef = React.useRef(null);
|
|
6396
|
+
var _h = usePresence(isOpen),
|
|
6397
|
+
isPresent = _h.isPresent,
|
|
6398
|
+
isExiting = _h.isExiting;
|
|
6399
|
+
useInert(sheetRef, isExiting);
|
|
6109
6400
|
// Focus management
|
|
6110
6401
|
React.useEffect(function () {
|
|
6111
6402
|
if (isOpen) {
|
|
6112
6403
|
// Store previous focus
|
|
6113
6404
|
previousFocusRef.current = document.activeElement;
|
|
6114
6405
|
// Focus sheet
|
|
6115
|
-
setTimeout(function () {
|
|
6406
|
+
var timer_1 = setTimeout(function () {
|
|
6116
6407
|
var _a;
|
|
6117
6408
|
(_a = sheetRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
6118
6409
|
}, 100); // Small delay to allow animation to start
|
|
6119
6410
|
// Prevent body scroll
|
|
6120
6411
|
document.body.style.overflow = 'hidden';
|
|
6412
|
+
// A quick close cancels the pending focus, so it can't pull focus back into the exiting sheet
|
|
6413
|
+
return function () {
|
|
6414
|
+
clearTimeout(timer_1);
|
|
6415
|
+
document.body.style.overflow = '';
|
|
6416
|
+
};
|
|
6121
6417
|
} else {
|
|
6122
6418
|
// Restore previous focus
|
|
6123
6419
|
if (previousFocusRef.current) {
|
|
@@ -6154,14 +6450,16 @@ var Sheet = function Sheet(_a) {
|
|
|
6154
6450
|
};
|
|
6155
6451
|
// Overlay click handling
|
|
6156
6452
|
var handleOverlayClick = function handleOverlayClick(event) {
|
|
6157
|
-
|
|
6453
|
+
// While exiting, the backdrop still catches clicks but doesn't close again
|
|
6454
|
+
if (!isExiting && closeOnOverlayClick && event.target === event.currentTarget) {
|
|
6158
6455
|
onClose();
|
|
6159
6456
|
}
|
|
6160
6457
|
};
|
|
6161
|
-
|
|
6458
|
+
// Stays mounted while the exit fade runs, hidden from assistive technology
|
|
6459
|
+
if (!isPresent) return null;
|
|
6162
6460
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
6163
6461
|
children: [jsxRuntime.jsx(StyledOverlay, {
|
|
6164
|
-
"$
|
|
6462
|
+
"$isExiting": isExiting,
|
|
6165
6463
|
onClick: handleOverlayClick,
|
|
6166
6464
|
"data-testid": dataTestId ? "".concat(dataTestId, "-overlay") : 'sheet-overlay'
|
|
6167
6465
|
}), jsxRuntime.jsx(StyledSheet, {
|
|
@@ -6170,12 +6468,13 @@ var Sheet = function Sheet(_a) {
|
|
|
6170
6468
|
"aria-modal": "true",
|
|
6171
6469
|
"aria-label": ariaLabel || title || 'Sheet dialog',
|
|
6172
6470
|
"aria-describedby": ariaDescribedBy,
|
|
6471
|
+
"aria-hidden": isExiting || undefined,
|
|
6173
6472
|
tabIndex: -1,
|
|
6174
6473
|
"$position": position,
|
|
6175
6474
|
"$variant": variant,
|
|
6176
6475
|
"$width": width,
|
|
6177
6476
|
"$height": height,
|
|
6178
|
-
"$
|
|
6477
|
+
"$isExiting": isExiting,
|
|
6179
6478
|
onKeyDown: handleKeyDown,
|
|
6180
6479
|
"data-testid": dataTestId,
|
|
6181
6480
|
children: jsxRuntime.jsx(StyledSheetContent, {
|
|
@@ -6187,8 +6486,7 @@ var Sheet = function Sheet(_a) {
|
|
|
6187
6486
|
Sheet.displayName = 'Sheet';
|
|
6188
6487
|
var templateObject_1$5, templateObject_2$5, templateObject_3$5, templateObject_4$4, templateObject_5$3, templateObject_6$3, templateObject_7$3, templateObject_8$3, templateObject_9$2, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1;
|
|
6189
6488
|
|
|
6190
|
-
var semantic$
|
|
6191
|
-
base$2 = data.tokensJson.base;
|
|
6489
|
+
var semantic$1 = data.tokensJson.semantic;
|
|
6192
6490
|
var StyledSliderContainer = styled__default.default.div.withConfig({
|
|
6193
6491
|
displayName: "Slider__StyledSliderContainer",
|
|
6194
6492
|
componentId: "sc-6mh2d4-0"
|
|
@@ -6196,21 +6494,21 @@ var StyledSliderContainer = styled__default.default.div.withConfig({
|
|
|
6196
6494
|
var StyledLabel$1 = styled__default.default.label.withConfig({
|
|
6197
6495
|
displayName: "Slider__StyledLabel",
|
|
6198
6496
|
componentId: "sc-6mh2d4-1"
|
|
6199
|
-
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-bottom: ", ";\n"], ["\n font: ", ";\n color: ", ";\n margin-bottom: ", ";\n"])), semantic$
|
|
6497
|
+
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-bottom: ", ";\n"], ["\n font: ", ";\n color: ", ";\n margin-bottom: ", ";\n"])), semantic$1.typography.label, function (_a) {
|
|
6200
6498
|
var $disabled = _a.$disabled;
|
|
6201
|
-
return $disabled ? semantic$
|
|
6202
|
-
}, semantic$
|
|
6499
|
+
return $disabled ? semantic$1.color.text.disabled : semantic$1.color.text["default"];
|
|
6500
|
+
}, semantic$1.spacing.layout.lg);
|
|
6203
6501
|
var StyledSliderTrackContainer = styled__default.default.div.withConfig({
|
|
6204
6502
|
displayName: "Slider__StyledSliderTrackContainer",
|
|
6205
6503
|
componentId: "sc-6mh2d4-2"
|
|
6206
|
-
})(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: ", ";\n display: flex;\n align-items: center;\n"], ["\n position: relative;\n width: 100%;\n height: ", ";\n display: flex;\n align-items: center;\n"])),
|
|
6504
|
+
})(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: ", ";\n display: flex;\n align-items: center;\n"], ["\n position: relative;\n width: 100%;\n height: ", ";\n display: flex;\n align-items: center;\n"])), semantic$1.spacing.layout['6xl']);
|
|
6207
6505
|
var StyledTrack = styled__default.default.div.withConfig({
|
|
6208
6506
|
displayName: "Slider__StyledTrack",
|
|
6209
6507
|
componentId: "sc-6mh2d4-3"
|
|
6210
|
-
})(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"])),
|
|
6508
|
+
})(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) {
|
|
6211
6509
|
var $disabled = _a.$disabled;
|
|
6212
|
-
return $disabled ? semantic$
|
|
6213
|
-
},
|
|
6510
|
+
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.border["default"];
|
|
6511
|
+
}, semantic$1.border.radius.circle, function (_a) {
|
|
6214
6512
|
var $disabled = _a.$disabled;
|
|
6215
6513
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
6216
6514
|
});
|
|
@@ -6219,31 +6517,31 @@ var StyledTrackFill = styled__default.default.div.withConfig({
|
|
|
6219
6517
|
componentId: "sc-6mh2d4-4"
|
|
6220
6518
|
})(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) {
|
|
6221
6519
|
var $disabled = _a.$disabled;
|
|
6222
|
-
return $disabled ? semantic$
|
|
6223
|
-
},
|
|
6520
|
+
return $disabled ? semantic$1.color.border["default"] : semantic$1.color.background.emphasis;
|
|
6521
|
+
}, semantic$1.border.radius.circle);
|
|
6224
6522
|
var StyledThumb = styled__default.default.div.withConfig({
|
|
6225
6523
|
displayName: "Slider__StyledThumb",
|
|
6226
6524
|
componentId: "sc-6mh2d4-5"
|
|
6227
|
-
})(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: -", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n cursor: ", ";\n transform: translateX(-50%);\n transition: ", ";\n box-shadow: ", ";\n \n &:hover:not([aria-disabled=\"true\"]) {\n transform: translateX(-50%) scale(1.1);\n box-shadow: ", ";\n }\n \n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n \n &:active:not([aria-disabled=\"true\"]) {\n cursor: grabbing;\n transform: translateX(-50%) scale(0.95);\n }\n \n ", "\n"], ["\n position: absolute;\n width: ", ";\n height: ", ";\n top: -", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n cursor: ", ";\n transform: translateX(-50%);\n transition: ", ";\n box-shadow: ", ";\n \n &:hover:not([aria-disabled=\"true\"]) {\n transform: translateX(-50%) scale(1.1);\n box-shadow: ", ";\n }\n \n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n \n &:active:not([aria-disabled=\"true\"]) {\n cursor: grabbing;\n transform: translateX(-50%) scale(0.95);\n }\n \n ", "\n"])),
|
|
6525
|
+
})(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: -", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n cursor: ", ";\n transform: translateX(-50%);\n transition: ", ";\n box-shadow: ", ";\n\n ", " {\n transition: none;\n }\n \n &:hover:not([aria-disabled=\"true\"]) {\n transform: translateX(-50%) scale(1.1);\n box-shadow: ", ";\n }\n \n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n \n &:active:not([aria-disabled=\"true\"]) {\n cursor: grabbing;\n transform: translateX(-50%) scale(0.95);\n }\n \n ", "\n"], ["\n position: absolute;\n width: ", ";\n height: ", ";\n top: -", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n cursor: ", ";\n transform: translateX(-50%);\n transition: ", ";\n box-shadow: ", ";\n\n ", " {\n transition: none;\n }\n \n &:hover:not([aria-disabled=\"true\"]) {\n transform: translateX(-50%) scale(1.1);\n box-shadow: ", ";\n }\n \n &:focus-visible {\n outline: ", " solid ", ";\n outline-offset: ", ";\n }\n \n &:active:not([aria-disabled=\"true\"]) {\n cursor: grabbing;\n transform: translateX(-50%) scale(0.95);\n }\n \n ", "\n"])), semantic$1.spacing.layout.xl, semantic$1.spacing.layout.xl, semantic$1.spacing.layout.sm, function (_a) {
|
|
6228
6526
|
var $disabled = _a.$disabled;
|
|
6229
|
-
return $disabled ? semantic$
|
|
6230
|
-
},
|
|
6527
|
+
return $disabled ? semantic$1.color.background.disabled : semantic$1.color.background.subtle;
|
|
6528
|
+
}, semantic$1.border.width.thick, function (_a) {
|
|
6231
6529
|
var $disabled = _a.$disabled;
|
|
6232
|
-
return $disabled ? semantic$
|
|
6233
|
-
},
|
|
6530
|
+
return $disabled ? semantic$1.color.border["default"] : semantic$1.color.background.emphasis;
|
|
6531
|
+
}, semantic$1.border.radius.circle, function (_a) {
|
|
6234
6532
|
var $disabled = _a.$disabled;
|
|
6235
6533
|
return $disabled ? 'not-allowed' : 'grab';
|
|
6236
|
-
}, semantic$
|
|
6534
|
+
}, semantic$1.motion.transition.fast, data.tokensJson.component.slider.thumb.shadow["default"], reducedMotion, data.tokensJson.component.slider.thumb.shadow.hover, semantic$1.border.width.thick, semantic$1.color.border.interactive, semantic$1.spacing.layout.xs, function (_a) {
|
|
6237
6535
|
var $active = _a.$active;
|
|
6238
|
-
return $active && "\n transform: translateX(-50%) scale(1.1);\n box-shadow: ".concat(
|
|
6536
|
+
return $active && "\n transform: translateX(-50%) scale(1.1);\n box-shadow: ".concat(data.tokensJson.component.slider.thumb.shadow.active, ";\n ");
|
|
6239
6537
|
});
|
|
6240
6538
|
var StyledValueLabel = styled__default.default.div.withConfig({
|
|
6241
6539
|
displayName: "Slider__StyledValueLabel",
|
|
6242
6540
|
componentId: "sc-6mh2d4-6"
|
|
6243
|
-
})(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n position: absolute;\n top: -", ";\n left: ", ";\n transform: translateX(-50%);\n padding: ", " ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n border-radius: ", ";\n white-space: nowrap;\n pointer-events: none;\n opacity: ", ";\n \n &::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n width: 0;\n height: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-top: ", " solid ", ";\n }\n"], ["\n position: absolute;\n top: -", ";\n left: ", ";\n transform: translateX(-50%);\n padding: ", " ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n border-radius: ", ";\n white-space: nowrap;\n pointer-events: none;\n opacity: ", ";\n \n &::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n width: 0;\n height: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-top: ", " solid ", ";\n }\n"])),
|
|
6541
|
+
})(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n position: absolute;\n top: -", ";\n left: ", ";\n transform: translateX(-50%);\n padding: ", " ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n border-radius: ", ";\n white-space: nowrap;\n pointer-events: none;\n opacity: ", ";\n \n &::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n width: 0;\n height: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-top: ", " solid ", ";\n }\n"], ["\n position: absolute;\n top: -", ";\n left: ", ";\n transform: translateX(-50%);\n padding: ", " ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n border-radius: ", ";\n white-space: nowrap;\n pointer-events: none;\n opacity: ", ";\n \n &::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n width: 0;\n height: 0;\n border-left: ", " solid transparent;\n border-right: ", " solid transparent;\n border-top: ", " solid ", ";\n }\n"])), semantic$1.spacing.layout['4xl'], semantic$1.spacing.layout.sm, semantic$1.spacing.layout.xs, semantic$1.spacing.layout.sm, semantic$1.color.background.emphasis, semantic$1.color.text.inverse, semantic$1.typography.caption, semantic$1.border.radius.sm, function (_a) {
|
|
6244
6542
|
var $disabled = _a.$disabled;
|
|
6245
|
-
return $disabled ?
|
|
6246
|
-
},
|
|
6543
|
+
return $disabled ? semantic$1.opacity.disabled : semantic$1.opacity.full;
|
|
6544
|
+
}, semantic$1.spacing.layout.xs, semantic$1.spacing.layout.xs, semantic$1.spacing.layout.xs, semantic$1.color.background.emphasis);
|
|
6247
6545
|
var StyledMinMaxLabels = styled__default.default.div.withConfig({
|
|
6248
6546
|
displayName: "Slider__StyledMinMaxLabels",
|
|
6249
6547
|
componentId: "sc-6mh2d4-7"
|
|
@@ -6271,7 +6569,7 @@ var StyledMinMaxLabels = styled__default.default.div.withConfig({
|
|
|
6271
6569
|
* onRangeChange={(values) => console.log(values)}
|
|
6272
6570
|
* />
|
|
6273
6571
|
* ```
|
|
6274
|
-
*/])), semantic$
|
|
6572
|
+
*/])), semantic$1.typography.body, semantic$1.color.text.subdued, semantic$1.spacing.layout.xs);
|
|
6275
6573
|
/**
|
|
6276
6574
|
* Slider component for single value or range selection
|
|
6277
6575
|
*
|
|
@@ -6593,46 +6891,45 @@ var Slider = function Slider(_a) {
|
|
|
6593
6891
|
Slider.displayName = 'Slider';
|
|
6594
6892
|
var templateObject_1$4, templateObject_2$4, templateObject_3$4, templateObject_4$3, templateObject_5$2, templateObject_6$2, templateObject_7$2, templateObject_8$2;
|
|
6595
6893
|
|
|
6596
|
-
var semantic
|
|
6597
|
-
base$1 = data.tokensJson.base;
|
|
6894
|
+
var semantic = data.tokensJson.semantic;
|
|
6598
6895
|
var StyledTabList = styled__default.default.div.withConfig({
|
|
6599
6896
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6600
6897
|
return !prop.startsWith('$');
|
|
6601
6898
|
},
|
|
6602
6899
|
displayName: "TabBar__StyledTabList",
|
|
6603
6900
|
componentId: "sc-1g9ib0y-0"
|
|
6604
|
-
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n border-bottom: ", ";\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n \n &::-webkit-scrollbar {\n height:
|
|
6605
|
-
return props.$variant === 'pills' ?
|
|
6901
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n border-bottom: ", ";\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 gap: ", ";\n border-bottom: ", ";\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"])), function (props) {
|
|
6902
|
+
return props.$variant === 'pills' ? semantic.spacing.layout.sm : '0';
|
|
6606
6903
|
}, function (props) {
|
|
6607
|
-
return props.$variant === 'underline' ? "".concat(
|
|
6608
|
-
}, semantic
|
|
6904
|
+
return props.$variant === 'underline' ? "".concat(semantic.border.width.thin, " solid ").concat(semantic.color.border.subtle) : 'none';
|
|
6905
|
+
}, data.tokensJson.component.tabBar.scrollbar.height, semantic.color.background.subtle, semantic.color.border["default"], semantic.border.radius.sm);
|
|
6609
6906
|
var StyledTab = styled__default.default.button.withConfig({
|
|
6610
6907
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6611
6908
|
return !prop.startsWith('$');
|
|
6612
6909
|
},
|
|
6613
6910
|
displayName: "TabBar__StyledTab",
|
|
6614
6911
|
componentId: "sc-1g9ib0y-1"
|
|
6615
|
-
})(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 /* Variant-specific styles */\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 /* Active/pressed state */\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Variant-specific styles */\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 /* Active/pressed state */\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n"])),
|
|
6912
|
+
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Variant-specific styles */\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 /* Active/pressed state */\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Variant-specific styles */\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 /* Active/pressed state */\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n"])), semantic.spacing.layout.sm, semantic.spacing.layout.md, semantic.spacing.layout.lg, semantic.typography.button2, function (props) {
|
|
6616
6913
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
6617
|
-
}, semantic
|
|
6914
|
+
}, semantic.motion.hover, function (props) {
|
|
6618
6915
|
if (props.$variant === 'pills') {
|
|
6619
|
-
return "\n border-radius: ".concat(
|
|
6916
|
+
return "\n border-radius: ".concat(semantic.border.radius.circle, ";\n background-color: ").concat(props.$isActive ? semantic.color.background.interactive : semantic.color.background.subtle, ";\n color: ").concat(props.$isActive ? semantic.color.text.inverse : semantic.color.text["default"], ";\n \n &:hover:not(:disabled) {\n background-color: ").concat(props.$isActive ? semantic.color.background['interactive-hover'] : semantic.color.background.surface, ";\n }\n ");
|
|
6620
6917
|
}
|
|
6621
6918
|
if (props.$variant === 'underline') {
|
|
6622
|
-
return "\n color: ".concat(props.$isActive ? semantic
|
|
6919
|
+
return "\n color: ".concat(props.$isActive ? semantic.color.text.interactive : semantic.color.text.subdued, ";\n \n &::after {\n content: '';\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n height: ").concat(semantic.border.width.thick, ";\n background-color: ").concat(props.$isActive ? semantic.color.background.interactive : 'transparent', ";\n transition: ").concat(semantic.motion.hover, ";\n }\n \n &:hover:not(:disabled) {\n color: ").concat(semantic.color.text.interactive, ";\n }\n ");
|
|
6623
6920
|
}
|
|
6624
6921
|
// default variant
|
|
6625
|
-
return "\n border-radius: ".concat(
|
|
6922
|
+
return "\n border-radius: ".concat(semantic.border.radius.sm, " ").concat(semantic.border.radius.sm, " 0 0;\n background-color: ").concat(props.$isActive ? semantic.color.background.subtle : semantic.color.background["default"], ";\n color: ").concat(props.$isActive ? semantic.color.text["default"] : semantic.color.text.subdued, ";\n border: ").concat(semantic.border.width.thin, " solid ").concat(semantic.color.border["default"], ";\n border-bottom: ").concat(props.$isActive ? 'none' : "".concat(semantic.border.width.thin, " solid ").concat(semantic.color.border["default"]), ";\n margin-bottom: ").concat(props.$isActive ? '-1px' : '0', ";\n \n &:hover:not(:disabled) {\n background-color: ").concat(semantic.color.background.surface, ";\n color: ").concat(semantic.color.text["default"], ";\n }\n ");
|
|
6626
6923
|
}, function (props) {
|
|
6627
6924
|
return props.$disabled ? '0.5' : '1';
|
|
6628
|
-
},
|
|
6925
|
+
}, semantic.border.width.thick, semantic.color.border.strong, semantic.spacing.layout.xs);
|
|
6629
6926
|
var StyledBadge = styled__default.default.span.withConfig({
|
|
6630
6927
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6631
6928
|
return !prop.startsWith('$');
|
|
6632
6929
|
},
|
|
6633
6930
|
displayName: "TabBar__StyledBadge",
|
|
6634
6931
|
componentId: "sc-1g9ib0y-2"
|
|
6635
|
-
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width:
|
|
6932
|
+
})(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"
|
|
6636
6933
|
/**
|
|
6637
6934
|
* TabBar component for tabbed navigation
|
|
6638
6935
|
*
|
|
@@ -6654,14 +6951,9 @@ var StyledBadge = styled__default.default.span.withConfig({
|
|
|
6654
6951
|
* variant="pills"
|
|
6655
6952
|
* />
|
|
6656
6953
|
* ```
|
|
6657
|
-
*/])),
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
}
|
|
6661
|
-
return semantic$1.color.background.interactive;
|
|
6662
|
-
}, function (props) {
|
|
6663
|
-
return props.$variant === 'pills' && props.$isActive ? semantic$1.color.text.inverse : semantic$1.color.text.inverse;
|
|
6664
|
-
});
|
|
6954
|
+
*/])), data.tokensJson.component.tabBar.badge.size, data.tokensJson.component.tabBar.badge.size, semantic.spacing.layout.xs, data.tokensJson.component.tabBar.badge.typography, data.tokensJson.component.tabBar.badge.fontWeight, semantic.border.radius.circle, function (props) {
|
|
6955
|
+
return props.$variant === 'pills' && props.$isActive ? semantic.color.background['inverse-overlay'] : semantic.color.background.interactive;
|
|
6956
|
+
}, semantic.color.text.inverse);
|
|
6665
6957
|
/**
|
|
6666
6958
|
* TabBar component for tabbed navigation
|
|
6667
6959
|
*
|
|
@@ -6812,20 +7104,19 @@ var TabBar = function TabBar(_a) {
|
|
|
6812
7104
|
TabBar.displayName = 'TabBar';
|
|
6813
7105
|
var templateObject_1$3, templateObject_2$3, templateObject_3$3;
|
|
6814
7106
|
|
|
6815
|
-
var
|
|
6816
|
-
base = data.tokensJson.base;
|
|
7107
|
+
var field = data.tokensJson.component.field;
|
|
6817
7108
|
var StyledFieldContainer = styled__default.default.div.withConfig({
|
|
6818
7109
|
displayName: "TextField__StyledFieldContainer",
|
|
6819
7110
|
componentId: "sc-1ys3b0-0"
|
|
6820
|
-
})(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"])),
|
|
7111
|
+
})(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n"])), field.gap);
|
|
6821
7112
|
var StyledLabel = styled__default.default.label.withConfig({
|
|
6822
7113
|
displayName: "TextField__StyledLabel",
|
|
6823
7114
|
componentId: "sc-1ys3b0-1"
|
|
6824
|
-
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n
|
|
7115
|
+
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n font: ", ";\n color: ", ";\n\n &[data-disabled='true'] {\n color: ", ";\n }\n"])), field.label.gap, field.label.typography, field.label.color, field.label.colorDisabled);
|
|
6825
7116
|
var StyledRequiredIndicator = styled__default.default.span.withConfig({
|
|
6826
7117
|
displayName: "TextField__StyledRequiredIndicator",
|
|
6827
7118
|
componentId: "sc-1ys3b0-2"
|
|
6828
|
-
})(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n"])),
|
|
7119
|
+
})(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n color: ", ";\n font-weight: ", ";\n"], ["\n color: ", ";\n font-weight: ", ";\n"])), field.requiredIndicator.color, field.requiredIndicator.fontWeight);
|
|
6829
7120
|
var StyledHelperText = styled__default.default.div.withConfig({
|
|
6830
7121
|
displayName: "TextField__StyledHelperText",
|
|
6831
7122
|
componentId: "sc-1ys3b0-3"
|
|
@@ -6842,9 +7133,9 @@ var StyledHelperText = styled__default.default.div.withConfig({
|
|
|
6842
7133
|
* required
|
|
6843
7134
|
* />
|
|
6844
7135
|
* ```
|
|
6845
|
-
*/])),
|
|
7136
|
+
*/])), field.helperText.typography, function (_a) {
|
|
6846
7137
|
var $hasError = _a.$hasError;
|
|
6847
|
-
return $hasError ?
|
|
7138
|
+
return $hasError ? field.helperText.colorError : field.helperText.color;
|
|
6848
7139
|
});
|
|
6849
7140
|
/**
|
|
6850
7141
|
* TextField component for text input with label, helper text, and error states
|
|
@@ -6918,9 +7209,9 @@ var templateObject_1$2, templateObject_2$2, templateObject_3$2, templateObject_4
|
|
|
6918
7209
|
var StyledContainer = styled__default.default.div.withConfig({
|
|
6919
7210
|
displayName: "TransactionListItem__StyledContainer",
|
|
6920
7211
|
componentId: "sc-7yunm0-0"
|
|
6921
|
-
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n min-height:
|
|
7212
|
+
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: ", " solid ", ";\n gap: ", ";\n transition: background-color ", " ", ";\n \n ", "\n"], ["\n display: flex;\n align-items: center;\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: ", " solid ", ";\n gap: ", ";\n transition: background-color ", " ", ";\n \n ", "\n"])), data.tokensJson.component.transactionListItem.minHeight, data.tokensJson.semantic.spacing.layout.md, data.tokensJson.semantic.spacing.layout.md, data.tokensJson.semantic.color.background["default"], data.tokensJson.semantic.border.width.thin, data.tokensJson.semantic.color.border["default"], data.tokensJson.semantic.spacing.layout.md, data.tokensJson.semantic.motion.duration.normal, data.tokensJson.semantic.motion.easing.easeOut, function (_a) {
|
|
6922
7213
|
var $clickable = _a.$clickable;
|
|
6923
|
-
return $clickable && "\n cursor: pointer;\n \n &:hover {\n background-color: ".concat(data.tokensJson.semantic.color.background.subtle, ";\n }\n \n &:active {\n background-color: ").concat(data.tokensJson.semantic.color.background['interactive-active'], ";\n }\n \n &:focus-visible {\n outline:
|
|
7214
|
+
return $clickable && "\n cursor: pointer;\n \n &:hover {\n background-color: ".concat(data.tokensJson.semantic.color.background.subtle, ";\n }\n \n &:active {\n background-color: ").concat(data.tokensJson.semantic.color.background['interactive-active'], ";\n }\n \n &:focus-visible {\n outline: ").concat(data.tokensJson.semantic.border.width.thick, " solid ").concat(data.tokensJson.semantic.color.border.interactive, ";\n outline-offset: calc(-1 * ").concat(data.tokensJson.semantic.border.focusOffset, ");\n }\n ");
|
|
6924
7215
|
});
|
|
6925
7216
|
var StyledAvatarSection = styled__default.default.div.withConfig({
|
|
6926
7217
|
displayName: "TransactionListItem__StyledAvatarSection",
|
|
@@ -7128,14 +7419,18 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
7128
7419
|
};
|
|
7129
7420
|
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9$1;
|
|
7130
7421
|
|
|
7422
|
+
// Exception to decision 0014: the gap props are typed as base spacing keys (public API),
|
|
7423
|
+
// so they are looked up in base.spacing until they accept semantic keys.
|
|
7424
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
7425
|
+
var gapSpacing = data.tokensJson.base.spacing;
|
|
7131
7426
|
// Breakpoints using base tokens
|
|
7132
7427
|
var breakpoints = {
|
|
7133
|
-
xs: data.tokensJson.
|
|
7134
|
-
sm: data.tokensJson.
|
|
7135
|
-
md: data.tokensJson.
|
|
7136
|
-
lg: data.tokensJson.
|
|
7137
|
-
xl: data.tokensJson.
|
|
7138
|
-
'2xl': data.tokensJson.
|
|
7428
|
+
xs: data.tokensJson.semantic.breakpoint.xs,
|
|
7429
|
+
sm: data.tokensJson.semantic.breakpoint.sm,
|
|
7430
|
+
md: data.tokensJson.semantic.breakpoint.md,
|
|
7431
|
+
lg: data.tokensJson.semantic.breakpoint.lg,
|
|
7432
|
+
xl: data.tokensJson.semantic.breakpoint.xl,
|
|
7433
|
+
'2xl': data.tokensJson.semantic.breakpoint['2xl']
|
|
7139
7434
|
};
|
|
7140
7435
|
// Media query helpers
|
|
7141
7436
|
var media = {
|
|
@@ -7168,13 +7463,15 @@ var Grid = function Grid(_a) {
|
|
|
7168
7463
|
gapX = _a.gapX,
|
|
7169
7464
|
gapY = _a.gapY,
|
|
7170
7465
|
className = _a.className,
|
|
7466
|
+
dataTestId = _a["data-testid"],
|
|
7171
7467
|
children = _a.children;
|
|
7172
7468
|
return jsxRuntime.jsx(GridContainer, {
|
|
7173
7469
|
"$cols": cols,
|
|
7174
|
-
"$gap": gap ?
|
|
7175
|
-
"$gapX": gapX ?
|
|
7176
|
-
"$gapY": gapY ?
|
|
7470
|
+
"$gap": gap ? gapSpacing[gap] : undefined,
|
|
7471
|
+
"$gapX": gapX ? gapSpacing[gapX] : undefined,
|
|
7472
|
+
"$gapY": gapY ? gapSpacing[gapY] : undefined,
|
|
7177
7473
|
className: className,
|
|
7474
|
+
"data-testid": dataTestId,
|
|
7178
7475
|
children: children
|
|
7179
7476
|
});
|
|
7180
7477
|
};
|
|
@@ -7187,7 +7484,7 @@ var GridColContainer = styled__default.default.div.withConfig({
|
|
|
7187
7484
|
})(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"], ["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"])), function (props) {
|
|
7188
7485
|
return props.$span && styled.css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["grid-column: span ", " / span ", ";"], ["grid-column: span ", " / span ", ";"])), props.$span, props.$span);
|
|
7189
7486
|
}, function (props) {
|
|
7190
|
-
return props.$order && styled.css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
7487
|
+
return props.$order !== undefined && styled.css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
7191
7488
|
}, function (props) {
|
|
7192
7489
|
return props.$spanSm && styled.css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.sm, props.$spanSm, props.$spanSm);
|
|
7193
7490
|
}, function (props) {
|
|
@@ -7197,13 +7494,13 @@ var GridColContainer = styled__default.default.div.withConfig({
|
|
|
7197
7494
|
}, function (props) {
|
|
7198
7495
|
return props.$spanXl && styled.css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.xl, props.$spanXl, props.$spanXl);
|
|
7199
7496
|
}, function (props) {
|
|
7200
|
-
return props.$orderSm && styled.css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.sm, props.$orderSm);
|
|
7497
|
+
return props.$orderSm !== undefined && styled.css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.sm, props.$orderSm);
|
|
7201
7498
|
}, function (props) {
|
|
7202
|
-
return props.$orderMd && styled.css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.md, props.$orderMd);
|
|
7499
|
+
return props.$orderMd !== undefined && styled.css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.md, props.$orderMd);
|
|
7203
7500
|
}, function (props) {
|
|
7204
|
-
return props.$orderLg && styled.css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.lg, props.$orderLg);
|
|
7501
|
+
return props.$orderLg !== undefined && styled.css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.lg, props.$orderLg);
|
|
7205
7502
|
}, function (props) {
|
|
7206
|
-
return props.$orderXl && styled.css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.xl, props.$orderXl);
|
|
7503
|
+
return props.$orderXl !== undefined && styled.css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.xl, props.$orderXl);
|
|
7207
7504
|
});
|
|
7208
7505
|
var GridCol = function GridCol(_a) {
|
|
7209
7506
|
var span = _a.span,
|
|
@@ -7217,6 +7514,7 @@ var GridCol = function GridCol(_a) {
|
|
|
7217
7514
|
orderLg = _a.orderLg,
|
|
7218
7515
|
orderXl = _a.orderXl,
|
|
7219
7516
|
className = _a.className,
|
|
7517
|
+
dataTestId = _a["data-testid"],
|
|
7220
7518
|
children = _a.children;
|
|
7221
7519
|
return jsxRuntime.jsx(GridColContainer, {
|
|
7222
7520
|
"$span": span,
|
|
@@ -7230,6 +7528,7 @@ var GridCol = function GridCol(_a) {
|
|
|
7230
7528
|
"$orderLg": orderLg,
|
|
7231
7529
|
"$orderXl": orderXl,
|
|
7232
7530
|
className: className,
|
|
7531
|
+
"data-testid": dataTestId,
|
|
7233
7532
|
children: children
|
|
7234
7533
|
});
|
|
7235
7534
|
};
|
|
@@ -7302,6 +7601,7 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
7302
7601
|
gapYLg = _a.gapYLg,
|
|
7303
7602
|
gapYXl = _a.gapYXl,
|
|
7304
7603
|
className = _a.className,
|
|
7604
|
+
dataTestId = _a["data-testid"],
|
|
7305
7605
|
children = _a.children;
|
|
7306
7606
|
return jsxRuntime.jsx(ResponsiveGridContainer, {
|
|
7307
7607
|
"$cols": cols,
|
|
@@ -7309,22 +7609,23 @@ var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
|
7309
7609
|
"$colsMd": colsMd,
|
|
7310
7610
|
"$colsLg": colsLg,
|
|
7311
7611
|
"$colsXl": colsXl,
|
|
7312
|
-
"$gap": gap ?
|
|
7313
|
-
"$gapSm": gapSm ?
|
|
7314
|
-
"$gapMd": gapMd ?
|
|
7315
|
-
"$gapLg": gapLg ?
|
|
7316
|
-
"$gapXl": gapXl ?
|
|
7317
|
-
"$gapX": gapX ?
|
|
7318
|
-
"$gapXSm": gapXSm ?
|
|
7319
|
-
"$gapXMd": gapXMd ?
|
|
7320
|
-
"$gapXLg": gapXLg ?
|
|
7321
|
-
"$gapXXl": gapXXl ?
|
|
7322
|
-
"$gapY": gapY ?
|
|
7323
|
-
"$gapYSm": gapYSm ?
|
|
7324
|
-
"$gapYMd": gapYMd ?
|
|
7325
|
-
"$gapYLg": gapYLg ?
|
|
7326
|
-
"$gapYXl": gapYXl ?
|
|
7612
|
+
"$gap": gap ? gapSpacing[gap] : undefined,
|
|
7613
|
+
"$gapSm": gapSm ? gapSpacing[gapSm] : undefined,
|
|
7614
|
+
"$gapMd": gapMd ? gapSpacing[gapMd] : undefined,
|
|
7615
|
+
"$gapLg": gapLg ? gapSpacing[gapLg] : undefined,
|
|
7616
|
+
"$gapXl": gapXl ? gapSpacing[gapXl] : undefined,
|
|
7617
|
+
"$gapX": gapX ? gapSpacing[gapX] : undefined,
|
|
7618
|
+
"$gapXSm": gapXSm ? gapSpacing[gapXSm] : undefined,
|
|
7619
|
+
"$gapXMd": gapXMd ? gapSpacing[gapXMd] : undefined,
|
|
7620
|
+
"$gapXLg": gapXLg ? gapSpacing[gapXLg] : undefined,
|
|
7621
|
+
"$gapXXl": gapXXl ? gapSpacing[gapXXl] : undefined,
|
|
7622
|
+
"$gapY": gapY ? gapSpacing[gapY] : undefined,
|
|
7623
|
+
"$gapYSm": gapYSm ? gapSpacing[gapYSm] : undefined,
|
|
7624
|
+
"$gapYMd": gapYMd ? gapSpacing[gapYMd] : undefined,
|
|
7625
|
+
"$gapYLg": gapYLg ? gapSpacing[gapYLg] : undefined,
|
|
7626
|
+
"$gapYXl": gapYXl ? gapSpacing[gapYXl] : undefined,
|
|
7327
7627
|
className: className,
|
|
7628
|
+
"data-testid": dataTestId,
|
|
7328
7629
|
children: children
|
|
7329
7630
|
});
|
|
7330
7631
|
};
|