@common-origin/design-system 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +1017 -713
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.mts +2 -2
- package/dist/components/atoms/Badge/Badge.d.ts +2 -2
- package/dist/components/atoms/Badge/Badge.mjs +15 -9
- package/dist/components/atoms/Box/Box.d.mts +3 -2
- package/dist/components/atoms/Box/Box.d.ts +3 -2
- package/dist/components/atoms/Button/Button.mjs +1 -1
- package/dist/components/atoms/Chip/shared/ChipBase.mjs +1 -1
- package/dist/components/atoms/IconButton/IconButton.mjs +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.d.mts +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/atoms/Tag/Tag.d.mts +1 -1
- package/dist/components/atoms/Tag/Tag.d.ts +1 -1
- package/dist/components/atoms/Tooltip/Tooltip.d.mts +7 -1
- package/dist/components/atoms/Tooltip/Tooltip.d.ts +7 -1
- package/dist/components/atoms/Tooltip/Tooltip.mjs +18 -8
- package/dist/components/molecules/ActionSheet/ActionSheet.mjs +2 -2
- package/dist/components/molecules/Alert/Alert.mjs +1 -1
- package/dist/components/molecules/Checkbox/SelectableInputBase.mjs +1 -1
- package/dist/components/molecules/Dropdown/Dropdown.mjs +1 -1
- package/dist/components/molecules/List/ListItem.mjs +3 -3
- package/dist/components/molecules/Menu/Menu.d.mts +8 -1
- package/dist/components/molecules/Menu/Menu.d.ts +8 -1
- package/dist/components/molecules/Menu/Menu.mjs +12 -9
- package/dist/components/molecules/Modal/Modal.mjs +1 -1
- package/dist/components/molecules/NumberInput/NumberInput.mjs +2 -1
- package/dist/components/molecules/PasswordField/PasswordField.mjs +3 -2
- package/dist/components/molecules/SearchField/SearchField.mjs +3 -3
- package/dist/components/molecules/Sheet/Sheet.mjs +3 -3
- package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.mts +3 -2
- package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.ts +3 -2
- package/dist/components/molecules/SidebarNavItem/SidebarNavItem.mjs +128 -41
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.mts +30 -0
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.ts +30 -0
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs +69 -0
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs.map +1 -0
- package/dist/components/molecules/SidebarNavSection/SidebarNavSection.mjs +57 -43
- package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
- package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs +3 -1
- package/dist/components/organisms/SidebarNav/SidebarNav.mjs +173 -62
- package/dist/data.js +96 -59
- package/dist/data.js.map +1 -1
- package/dist/lib/styleUtils.d.mts +4 -0
- package/dist/lib/styleUtils.d.ts +4 -0
- package/dist/lib/styleUtils.mjs +5 -1
- package/dist/lib/styleUtils.mjs.map +1 -1
- package/dist/lib/tokenAliases.mjs +1 -0
- package/dist/lib/tokenAliases.mjs.map +1 -1
- package/dist/lib/useFloatingLayer.d.mts +8 -1
- package/dist/lib/useFloatingLayer.d.ts +8 -1
- package/dist/lib/useFloatingLayer.mjs +11 -2
- package/dist/lib/useFloatingLayer.mjs.map +1 -1
- package/dist/styles/tokens.d.mts +93 -24
- package/dist/styles/tokens.d.ts +93 -24
- package/dist/styles/tokens.json +96 -59
- package/dist/styles/tokens.json.mjs +96 -59
- package/dist/styles/tokens.json.mjs.map +1 -1
- package/dist/tokens/index.js +96 -59
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/index.mjs +96 -59
- package/dist/tokens/index.mjs.map +1 -1
- package/dist/tokens/styles/tokens.d.mts +93 -24
- package/dist/tokens/styles/tokens.d.ts +93 -24
- package/dist/tokens.css +1105 -74
- package/package.json +3 -1
package/dist/client.js
CHANGED
|
@@ -156,31 +156,31 @@ function withCssVariables(tree, path) {
|
|
|
156
156
|
var tokens = withCssVariables(data.tokensJson);
|
|
157
157
|
|
|
158
158
|
// Destructure tokens
|
|
159
|
-
var semantic$
|
|
159
|
+
var semantic$u = tokens.semantic;
|
|
160
160
|
var initials = tokens.component.avatar.initials;
|
|
161
|
-
var color$i = semantic$
|
|
162
|
-
size$
|
|
163
|
-
var radius$
|
|
161
|
+
var color$i = semantic$u.color,
|
|
162
|
+
size$a = semantic$u.size;
|
|
163
|
+
var radius$8 = semantic$u.radius;
|
|
164
164
|
var AvatarContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
165
165
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
166
166
|
return !prop.startsWith('$');
|
|
167
167
|
},
|
|
168
168
|
displayName: "Avatar__AvatarContainer",
|
|
169
169
|
componentId: "sc-ezn4ax-0"
|
|
170
|
-
})(templateObject_1$
|
|
170
|
+
})(templateObject_1$V || (templateObject_1$V = __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) {
|
|
171
171
|
var $size = _a.$size;
|
|
172
|
-
return size$
|
|
172
|
+
return size$a.avatar[$size];
|
|
173
173
|
}, function (_a) {
|
|
174
174
|
var $size = _a.$size;
|
|
175
|
-
return size$
|
|
176
|
-
}, radius$
|
|
175
|
+
return size$a.avatar[$size];
|
|
176
|
+
}, radius$8.full, color$i.fill.muted);
|
|
177
177
|
var AvatarImage = /*#__PURE__*/styled__default.default.img.withConfig({
|
|
178
178
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
179
179
|
return !prop.startsWith('$');
|
|
180
180
|
},
|
|
181
181
|
displayName: "Avatar__AvatarImage",
|
|
182
182
|
componentId: "sc-ezn4ax-1"
|
|
183
|
-
})(templateObject_2$
|
|
183
|
+
})(templateObject_2$G || (templateObject_2$G = __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$8.full);
|
|
184
184
|
var AvatarInitials = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
185
185
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
186
186
|
return !prop.startsWith('$');
|
|
@@ -246,7 +246,7 @@ var Avatar = function Avatar(_a) {
|
|
|
246
246
|
})
|
|
247
247
|
}));
|
|
248
248
|
};
|
|
249
|
-
var templateObject_1$
|
|
249
|
+
var templateObject_1$V, templateObject_2$G, templateObject_3$C;
|
|
250
250
|
|
|
251
251
|
// Breakpoints from the semantic tokens (decision 0014)
|
|
252
252
|
var breakpoints$1 = {
|
|
@@ -281,7 +281,7 @@ var forcedColorsEdge = "".concat(forcedColors, " {\n border: ").concat(tokens.s
|
|
|
281
281
|
var reducedMotion = '@media (prefers-reduced-motion: reduce)';
|
|
282
282
|
// No `from` keyframe: the fade starts from the element's current opacity, including a
|
|
283
283
|
// still-running entrance, so closing mid-entrance doesn't jump back to fully visible.
|
|
284
|
-
var fadeOut$1 = styled.keyframes(templateObject_1$
|
|
284
|
+
var fadeOut$1 = styled.keyframes(templateObject_1$U || (templateObject_1$U = __makeTemplateObject(["\n to { opacity: 0; }\n"], ["\n to { opacity: 0; }\n"
|
|
285
285
|
// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of
|
|
286
286
|
// the element's `animation` declarations while it exits: the entrance stays in the list,
|
|
287
287
|
// so it isn't restarted, and the fade runs on top of it. A fade is already the
|
|
@@ -295,7 +295,7 @@ var fadeOut$1 = styled.keyframes(templateObject_1$T || (templateObject_1$T = __m
|
|
|
295
295
|
// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop
|
|
296
296
|
// still catches clicks (so they can't reach the page behind it) and the panel is inert.
|
|
297
297
|
// Exits accelerate: things leaving speed up as they go (decision 0037).
|
|
298
|
-
var exitAnimation = styled.css(templateObject_2$
|
|
298
|
+
var exitAnimation = styled.css(templateObject_2$F || (templateObject_2$F = __makeTemplateObject([", ", " ", " ", " forwards"], [", ", " ", " ", " forwards"
|
|
299
299
|
// Content for screen readers only. The 1px size and -1px margin are part of the standard
|
|
300
300
|
// visually-hidden technique, not design values, so they aren't tokens.
|
|
301
301
|
])), fadeOut$1, tokens.semantic.motion.duration.fast, tokens.semantic.motion.easing.accelerate);
|
|
@@ -314,6 +314,10 @@ var visuallyHidden = styled.css(templateObject_3$B || (templateObject_3$B = __ma
|
|
|
314
314
|
var _a$b = tokens.semantic.color,
|
|
315
315
|
rowFill = _a$b.fill,
|
|
316
316
|
rowText = _a$b.text;
|
|
317
|
+
/** Corner radius of a button inside a field (a stepper, a clear or show-password button): one step tighter than the field, so its corner nests (decision 0055). */
|
|
318
|
+
var fieldButtonRadius = tokens.semantic.radius.sm;
|
|
319
|
+
/** Corner radius every row and tab shares: the control radius (decision 0055). */
|
|
320
|
+
var rowRadius = tokens.semantic.radius.md;
|
|
317
321
|
var rowStates = {
|
|
318
322
|
unselected: {
|
|
319
323
|
rest: {
|
|
@@ -399,178 +403,57 @@ var rowForcedColors = function rowForcedColors(_a) {
|
|
|
399
403
|
// the descendants' own rules.
|
|
400
404
|
return "".concat(forcedColors, " {\n ").concat(selected ? "background-color: Highlight;\n ".concat(text('HighlightText'), "\n && * {\n color: inherit;\n background-color: transparent;\n }") : '', "\n ").concat(!disabled && focused ? hover : '', "\n ").concat(disabled ? '' : "&:hover {\n ".concat(hover, "\n }"), "\n }");
|
|
401
405
|
};
|
|
402
|
-
var templateObject_1$
|
|
403
|
-
|
|
404
|
-
var _a$a = tokens.semantic,
|
|
405
|
-
typography$7 = _a$a.typography,
|
|
406
|
-
color$h = _a$a.color,
|
|
407
|
-
letterSpacing = _a$a.letterSpacing;
|
|
408
|
-
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
409
|
-
var styles = {
|
|
410
|
-
display: "font: ".concat(typography$7.display, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
411
|
-
h1: "font: ".concat(typography$7.h1, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
412
|
-
h2: "font: ".concat(typography$7.h2, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
413
|
-
h3: "font: ".concat(typography$7.h3, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
414
|
-
h4: "font: ".concat(typography$7.h4, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
415
|
-
h5: "font: ".concat(typography$7.h5, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
416
|
-
h6: "font: ".concat(typography$7.h6, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
417
|
-
subtitle: "font: ".concat(typography$7.subtitle, ";"),
|
|
418
|
-
body: "font: ".concat(typography$7.body, ";"),
|
|
419
|
-
small: "font: ".concat(typography$7.small, ";"),
|
|
420
|
-
overline: "font: ".concat(typography$7.overline, ";"),
|
|
421
|
-
caption: "font: ".concat(typography$7.caption, "; text-transform: uppercase;"),
|
|
422
|
-
button1: "font: ".concat(tokens.component.button.sizes.large.font, ";"),
|
|
423
|
-
button2: "font: ".concat(tokens.component.button.sizes.medium.font, ";"),
|
|
424
|
-
button3: "font: ".concat(tokens.component.button.sizes.small.font, "; font-weight: ").concat(tokens.component.button.sizes.small.fontWeight, ";"),
|
|
425
|
-
label: "font: ".concat(typography$7.label, ";")
|
|
426
|
-
};
|
|
427
|
-
return styles[variant] || styles.body;
|
|
428
|
-
};
|
|
429
|
-
var getTextColor = function getTextColor(colorVariant) {
|
|
430
|
-
var colorMap = {
|
|
431
|
-
"default": color$h.text["default"],
|
|
432
|
-
emphasis: color$h.text["default"],
|
|
433
|
-
subdued: color$h.text.muted,
|
|
434
|
-
inverse: color$h.text.inverse,
|
|
435
|
-
disabled: color$h.text.disabled,
|
|
436
|
-
interactive: color$h.text.accent,
|
|
437
|
-
error: color$h.text.danger,
|
|
438
|
-
success: color$h.text.success,
|
|
439
|
-
warning: color$h.text.warning
|
|
440
|
-
};
|
|
441
|
-
return colorMap[colorVariant] || colorMap["default"];
|
|
442
|
-
};
|
|
443
|
-
var getDefaultElement = function getDefaultElement(variant) {
|
|
444
|
-
var elementMap = {
|
|
445
|
-
display: 'h1',
|
|
446
|
-
h1: 'h1',
|
|
447
|
-
h2: 'h2',
|
|
448
|
-
h3: 'h3',
|
|
449
|
-
h4: 'h4',
|
|
450
|
-
h5: 'h5',
|
|
451
|
-
h6: 'h6',
|
|
452
|
-
subtitle: 'p',
|
|
453
|
-
body: 'p',
|
|
454
|
-
small: 'span',
|
|
455
|
-
overline: 'span',
|
|
456
|
-
caption: 'span',
|
|
457
|
-
button1: 'span',
|
|
458
|
-
button2: 'span',
|
|
459
|
-
button3: 'span',
|
|
460
|
-
label: 'span'
|
|
461
|
-
};
|
|
462
|
-
return elementMap[variant] || 'span';
|
|
463
|
-
};
|
|
464
|
-
var StyledTypography = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
465
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
466
|
-
return !prop.startsWith('$');
|
|
467
|
-
},
|
|
468
|
-
displayName: "Typography__StyledTypography",
|
|
469
|
-
componentId: "sc-17mqo4k-0"
|
|
470
|
-
})(templateObject_1$S || (templateObject_1$S = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n"], ["\n ", "\n color: ", ";\n margin: 0;\n"
|
|
471
|
-
/**
|
|
472
|
-
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
473
|
-
*
|
|
474
|
-
* Features:
|
|
475
|
-
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
476
|
-
* - Color variants for different contexts
|
|
477
|
-
* - Automatic semantic HTML element selection
|
|
478
|
-
* - Manual element override support
|
|
479
|
-
* - Direct semantic token usage (no component tokens needed)
|
|
480
|
-
* - Full accessibility support
|
|
481
|
-
*
|
|
482
|
-
* @example
|
|
483
|
-
* ```tsx
|
|
484
|
-
* <Typography variant="h1">Main Heading</Typography>
|
|
485
|
-
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
486
|
-
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
487
|
-
* ```
|
|
488
|
-
*/])), function (_a) {
|
|
489
|
-
var $variant = _a.$variant;
|
|
490
|
-
return getTypographyStyles($variant);
|
|
491
|
-
}, function (_a) {
|
|
492
|
-
var $color = _a.$color;
|
|
493
|
-
return getTextColor($color);
|
|
494
|
-
});
|
|
495
|
-
/**
|
|
496
|
-
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
497
|
-
*
|
|
498
|
-
* Features:
|
|
499
|
-
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
500
|
-
* - Color variants for different contexts
|
|
501
|
-
* - Automatic semantic HTML element selection
|
|
502
|
-
* - Manual element override support
|
|
503
|
-
* - Direct semantic token usage (no component tokens needed)
|
|
504
|
-
* - Full accessibility support
|
|
505
|
-
*
|
|
506
|
-
* @example
|
|
507
|
-
* ```tsx
|
|
508
|
-
* <Typography variant="h1">Main Heading</Typography>
|
|
509
|
-
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
510
|
-
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
511
|
-
* ```
|
|
512
|
-
*/
|
|
513
|
-
var Typography = function Typography(_a) {
|
|
514
|
-
var _b = _a.variant,
|
|
515
|
-
variant = _b === void 0 ? 'body' : _b,
|
|
516
|
-
children = _a.children,
|
|
517
|
-
_c = _a.color,
|
|
518
|
-
color = _c === void 0 ? 'default' : _c,
|
|
519
|
-
as = _a.as,
|
|
520
|
-
dataTestId = _a["data-testid"];
|
|
521
|
-
// $variant and $color are only used for styled-components prop filtering
|
|
522
|
-
var defaultElement = getDefaultElement(variant);
|
|
523
|
-
var elementType = as || defaultElement;
|
|
524
|
-
return jsxRuntime.jsx(StyledTypography, {
|
|
525
|
-
as: elementType,
|
|
526
|
-
"$variant": variant,
|
|
527
|
-
"$color": color,
|
|
528
|
-
"data-testid": dataTestId,
|
|
529
|
-
children: children
|
|
530
|
-
});
|
|
531
|
-
};
|
|
532
|
-
var templateObject_1$S;
|
|
406
|
+
var templateObject_1$U, templateObject_2$F, templateObject_3$B;
|
|
533
407
|
|
|
534
|
-
var semantic$
|
|
535
|
-
var color$
|
|
536
|
-
var radius$
|
|
537
|
-
var _a$
|
|
538
|
-
dot = _a$
|
|
539
|
-
count = _a$
|
|
540
|
-
ring = _a$
|
|
541
|
-
var scaleIn$2 = styled.keyframes(templateObject_1$
|
|
408
|
+
var semantic$t = tokens.semantic;
|
|
409
|
+
var color$h = semantic$t.color;
|
|
410
|
+
var radius$7 = semantic$t.radius;
|
|
411
|
+
var _a$a = tokens.component.badge,
|
|
412
|
+
dot = _a$a.dot,
|
|
413
|
+
count = _a$a.count,
|
|
414
|
+
ring = _a$a.ring;
|
|
415
|
+
var scaleIn$2 = styled.keyframes(templateObject_1$T || (templateObject_1$T = __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"])));
|
|
542
416
|
var BadgeWrapper = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
543
417
|
displayName: "Badge__BadgeWrapper",
|
|
544
418
|
componentId: "sc-tjz4pp-0"
|
|
545
|
-
})(templateObject_2$
|
|
419
|
+
})(templateObject_2$E || (templateObject_2$E = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n flex-shrink: 0;\n"])));
|
|
546
420
|
var BadgeIndicator = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
547
421
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
548
422
|
return !prop.startsWith('$');
|
|
549
423
|
},
|
|
550
424
|
displayName: "Badge__BadgeIndicator",
|
|
551
425
|
componentId: "sc-tjz4pp-1"
|
|
552
|
-
})(templateObject_3$A || (templateObject_3$A = __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 /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\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 /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"
|
|
426
|
+
})(templateObject_3$A || (templateObject_3$A = __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 /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\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 /* Forced colours drop fills (decision 0038): a dot is only a fill, so it keeps one in the\n text colour; a count gets an edge around its number */\n ", "\n \n ", "\n"
|
|
427
|
+
// The count takes the indicator's colour, so each variant's content colour reaches it: inverse on
|
|
428
|
+
// the strong fill, on-fill on the accent fill (decision 0056)
|
|
429
|
+
])), function (props) {
|
|
553
430
|
return props.$isVisible ? 'flex' : 'none';
|
|
554
431
|
}, function (props) {
|
|
555
432
|
return props.$isDot ? dot.size : count.minWidth;
|
|
556
433
|
}, function (props) {
|
|
557
434
|
return props.$isDot ? dot.size : count.height;
|
|
558
435
|
}, function (props) {
|
|
559
|
-
return props.$isDot ? '0' : "0 ".concat(semantic$
|
|
560
|
-
}, radius$
|
|
561
|
-
return props.$isDot ? "".concat(forcedColors, " { forced-color-adjust: none; background-color: CanvasText; }") : "".concat(forcedColors, " { border: ").concat(semantic$
|
|
436
|
+
return props.$isDot ? '0' : "0 ".concat(semantic$t.space.inset.xs);
|
|
437
|
+
}, radius$7.full, count.lineHeight, ring.width, semantic$t.surface.base, scaleIn$2, semantic$t.motion.duration.moderate, semantic$t.motion.easing.decelerate, reducedMotion, function (props) {
|
|
438
|
+
return props.$isDot ? "".concat(forcedColors, " { forced-color-adjust: none; background-color: CanvasText; }") : "".concat(forcedColors, " { border: ").concat(semantic$t.border.width.thin, " solid currentColor; }");
|
|
562
439
|
}, function (props) {
|
|
563
440
|
switch (props.$variant) {
|
|
564
441
|
case 'accent':
|
|
565
|
-
return "\n background-color: ".concat(color$
|
|
442
|
+
return "\n background-color: ".concat(color$h.fill.accent, ";\n color: ").concat(color$h.text['on-fill'], ";\n ");
|
|
566
443
|
default:
|
|
567
|
-
return "\n background-color: ".concat(color$
|
|
444
|
+
return "\n background-color: ".concat(color$h.fill.emphasis, ";\n color: ").concat(color$h.text.inverse, ";\n ");
|
|
568
445
|
}
|
|
569
446
|
});
|
|
447
|
+
// The count takes the indicator's colour, so each variant's content colour reaches it: inverse on
|
|
448
|
+
// the strong fill, on-fill on the accent fill (decision 0056)
|
|
449
|
+
var Count = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
450
|
+
displayName: "Badge__Count",
|
|
451
|
+
componentId: "sc-tjz4pp-2"
|
|
452
|
+
})(templateObject_4$t || (templateObject_4$t = __makeTemplateObject(["\n font: ", ";\n text-transform: uppercase;\n"], ["\n font: ", ";\n text-transform: uppercase;\n"])), semantic$t.typography.caption);
|
|
570
453
|
var ScreenReaderOnly$1 = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
571
454
|
displayName: "Badge__ScreenReaderOnly",
|
|
572
|
-
componentId: "sc-tjz4pp-
|
|
573
|
-
})(
|
|
455
|
+
componentId: "sc-tjz4pp-3"
|
|
456
|
+
})(templateObject_5$o || (templateObject_5$o = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
574
457
|
var Badge = function Badge(_a) {
|
|
575
458
|
var children = _a.children,
|
|
576
459
|
_b = _a.count,
|
|
@@ -598,9 +481,7 @@ var Badge = function Badge(_a) {
|
|
|
598
481
|
"$isVisible": isVisible,
|
|
599
482
|
role: "status",
|
|
600
483
|
"aria-live": "polite",
|
|
601
|
-
children: [!dot && jsxRuntime.jsx(
|
|
602
|
-
variant: "caption",
|
|
603
|
-
color: "inverse",
|
|
484
|
+
children: [!dot && jsxRuntime.jsx(Count, {
|
|
604
485
|
children: displayCount
|
|
605
486
|
}), jsxRuntime.jsx(ScreenReaderOnly$1, {
|
|
606
487
|
children: label
|
|
@@ -608,88 +489,89 @@ var Badge = function Badge(_a) {
|
|
|
608
489
|
})]
|
|
609
490
|
});
|
|
610
491
|
};
|
|
611
|
-
var templateObject_1$
|
|
492
|
+
var templateObject_1$T, templateObject_2$E, templateObject_3$A, templateObject_4$t, templateObject_5$o;
|
|
612
493
|
|
|
613
494
|
// Box's spacing and radius props keep their own names, which 3.0 decoupled from the removed
|
|
614
495
|
// spacing.layout and border.radius tokens (P7, #99), and read the semantic grammar's tokens
|
|
615
496
|
// (decision 0031). Each map covers every key the prop type allows, so TypeScript fails here if a
|
|
616
497
|
// key is added without a mapping.
|
|
617
|
-
var semantic$
|
|
618
|
-
var color$
|
|
619
|
-
space$
|
|
620
|
-
radius$
|
|
621
|
-
surface = semantic$
|
|
498
|
+
var semantic$s = tokens.semantic;
|
|
499
|
+
var color$g = semantic$s.color,
|
|
500
|
+
space$k = semantic$s.space,
|
|
501
|
+
radius$6 = semantic$s.radius,
|
|
502
|
+
surface = semantic$s.surface;
|
|
622
503
|
/** Box's spacing props: each name maps to the space step that replaced its spacing.layout token. */
|
|
623
504
|
var spaceByLayoutKey = {
|
|
624
|
-
none: space$
|
|
625
|
-
xs: space$
|
|
626
|
-
sm: space$
|
|
627
|
-
md: space$
|
|
628
|
-
lg: space$
|
|
629
|
-
xl: space$
|
|
630
|
-
'2xl': space$
|
|
631
|
-
'3xl': space$
|
|
632
|
-
'4xl': space$
|
|
633
|
-
'5xl': space$
|
|
634
|
-
'6xl': space$
|
|
635
|
-
'7xl': space$
|
|
636
|
-
'8xl': space$
|
|
637
|
-
'9xl': space$
|
|
638
|
-
'10xl': space$
|
|
639
|
-
'11xl': space$
|
|
505
|
+
none: space$k[0],
|
|
506
|
+
xs: space$k[100],
|
|
507
|
+
sm: space$k[200],
|
|
508
|
+
md: space$k[300],
|
|
509
|
+
lg: space$k[400],
|
|
510
|
+
xl: space$k[500],
|
|
511
|
+
'2xl': space$k[600],
|
|
512
|
+
'3xl': space$k[700],
|
|
513
|
+
'4xl': space$k[800],
|
|
514
|
+
'5xl': space$k[900],
|
|
515
|
+
'6xl': space$k[1000],
|
|
516
|
+
'7xl': space$k[1200],
|
|
517
|
+
'8xl': space$k[1400],
|
|
518
|
+
'9xl': space$k[1600],
|
|
519
|
+
'10xl': space$k[2000],
|
|
520
|
+
'11xl': space$k[2400],
|
|
640
521
|
// A keyword, not a step (0031)
|
|
641
|
-
auto: semantic$
|
|
522
|
+
auto: semantic$s.spacing.layout.auto
|
|
642
523
|
};
|
|
643
524
|
/** Box's `borderRadius` prop, read from `radius`. */
|
|
644
525
|
var radiusByKey = {
|
|
645
|
-
none: radius$
|
|
646
|
-
xs: radius$
|
|
647
|
-
sm: radius$
|
|
648
|
-
md: radius$
|
|
649
|
-
lg: radius$
|
|
650
|
-
xl: radius$
|
|
651
|
-
'2xl': radius$
|
|
652
|
-
'3xl': radius$
|
|
653
|
-
circle: radius$
|
|
526
|
+
none: radius$6.none,
|
|
527
|
+
xs: radius$6.xs,
|
|
528
|
+
sm: radius$6.sm,
|
|
529
|
+
md: radius$6.md,
|
|
530
|
+
lg: radius$6.lg,
|
|
531
|
+
xl: radius$6.xl,
|
|
532
|
+
'2xl': radius$6['2xl'],
|
|
533
|
+
'3xl': radius$6['3xl'],
|
|
534
|
+
circle: radius$6.full
|
|
654
535
|
};
|
|
655
536
|
/** Box's `bg` prop: the grammar's token paths, read from the token at that path. */
|
|
656
537
|
var backgroundByPath = {
|
|
657
538
|
'surface.base': surface.base,
|
|
658
539
|
'surface.raised': surface.raised,
|
|
540
|
+
'surface.overlay': surface.overlay,
|
|
659
541
|
'surface.scrim': surface.scrim,
|
|
660
|
-
'color.fill.emphasis': color$
|
|
661
|
-
'color.fill.muted': color$
|
|
662
|
-
'color.fill.inverse': color$
|
|
663
|
-
'color.fill.accent': color$
|
|
664
|
-
'color.fill.accent-hover': color$
|
|
665
|
-
'color.fill.accent-pressed': color$
|
|
666
|
-
'color.fill.accent-muted': color$
|
|
667
|
-
'color.fill.accent-muted-hover': color$
|
|
668
|
-
'color.fill.accent-muted-pressed': color$
|
|
669
|
-
'color.fill.danger': color$
|
|
670
|
-
'color.fill.danger-hover': color$
|
|
671
|
-
'color.fill.danger-pressed': color$
|
|
672
|
-
'color.fill.danger-muted': color$
|
|
673
|
-
'color.fill.success': color$
|
|
674
|
-
'color.fill.success-muted': color$
|
|
675
|
-
'color.fill.warning': color$
|
|
676
|
-
'color.fill.warning-muted': color$
|
|
677
|
-
'color.fill.serious': color$
|
|
678
|
-
'color.fill.serious-muted': color$
|
|
679
|
-
'color.fill.ai-muted': color$
|
|
680
|
-
'color.fill.disabled': color$
|
|
681
|
-
'color.fill.default': color$
|
|
682
|
-
'color.fill.default-hover': color$
|
|
683
|
-
'color.fill.default-pressed': color$
|
|
684
|
-
'color.fill.none': color$
|
|
685
|
-
'color.fill.none-hover': color$
|
|
686
|
-
'color.fill.none-pressed': color$
|
|
687
|
-
'color.fill.inverse-none-hover': color$
|
|
542
|
+
'color.fill.emphasis': color$g.fill.emphasis,
|
|
543
|
+
'color.fill.muted': color$g.fill.muted,
|
|
544
|
+
'color.fill.inverse': color$g.fill.inverse,
|
|
545
|
+
'color.fill.accent': color$g.fill.accent,
|
|
546
|
+
'color.fill.accent-hover': color$g.fill['accent-hover'],
|
|
547
|
+
'color.fill.accent-pressed': color$g.fill['accent-pressed'],
|
|
548
|
+
'color.fill.accent-muted': color$g.fill['accent-muted'],
|
|
549
|
+
'color.fill.accent-muted-hover': color$g.fill['accent-muted-hover'],
|
|
550
|
+
'color.fill.accent-muted-pressed': color$g.fill['accent-muted-pressed'],
|
|
551
|
+
'color.fill.danger': color$g.fill.danger,
|
|
552
|
+
'color.fill.danger-hover': color$g.fill['danger-hover'],
|
|
553
|
+
'color.fill.danger-pressed': color$g.fill['danger-pressed'],
|
|
554
|
+
'color.fill.danger-muted': color$g.fill['danger-muted'],
|
|
555
|
+
'color.fill.success': color$g.fill.success,
|
|
556
|
+
'color.fill.success-muted': color$g.fill['success-muted'],
|
|
557
|
+
'color.fill.warning': color$g.fill.warning,
|
|
558
|
+
'color.fill.warning-muted': color$g.fill['warning-muted'],
|
|
559
|
+
'color.fill.serious': color$g.fill.serious,
|
|
560
|
+
'color.fill.serious-muted': color$g.fill['serious-muted'],
|
|
561
|
+
'color.fill.ai-muted': color$g.fill['ai-muted'],
|
|
562
|
+
'color.fill.disabled': color$g.fill.disabled,
|
|
563
|
+
'color.fill.default': color$g.fill["default"],
|
|
564
|
+
'color.fill.default-hover': color$g.fill['default-hover'],
|
|
565
|
+
'color.fill.default-pressed': color$g.fill['default-pressed'],
|
|
566
|
+
'color.fill.none': color$g.fill.none,
|
|
567
|
+
'color.fill.none-hover': color$g.fill['none-hover'],
|
|
568
|
+
'color.fill.none-pressed': color$g.fill['none-pressed'],
|
|
569
|
+
'color.fill.inverse-none-hover': color$g.fill['inverse-none-hover']
|
|
688
570
|
};
|
|
689
571
|
/** Box's `color` prop: the text colours. */
|
|
690
|
-
var textColorByKey = color$
|
|
572
|
+
var textColorByKey = color$g.text;
|
|
691
573
|
/** Box's border props: the border colours. */
|
|
692
|
-
var borderColorByKey = color$
|
|
574
|
+
var borderColorByKey = color$g.border;
|
|
693
575
|
|
|
694
576
|
var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
695
577
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -700,9 +582,9 @@ var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
700
582
|
})(templateObject_51 || (templateObject_51 = __makeTemplateObject(["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Elevation (shadow)\n ", "\n \n // Cursor\n ", "\n \n // Transition\n ", "\n \n // Hover states\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"], ["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Elevation (shadow)\n ", "\n \n // Cursor\n ", "\n \n // Transition\n ", "\n \n // Hover states\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"
|
|
701
583
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
702
584
|
])), function (props) {
|
|
703
|
-
return props.$display && styled.css(templateObject_1$
|
|
585
|
+
return props.$display && styled.css(templateObject_1$S || (templateObject_1$S = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
704
586
|
}, function (props) {
|
|
705
|
-
return props.$flexDirection && styled.css(templateObject_2$
|
|
587
|
+
return props.$flexDirection && styled.css(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
706
588
|
}, function (props) {
|
|
707
589
|
return props.$justifyContent && styled.css(templateObject_3$z || (templateObject_3$z = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
708
590
|
}, function (props) {
|
|
@@ -712,13 +594,13 @@ var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
712
594
|
}, function (props) {
|
|
713
595
|
return props.$gap && styled.css(templateObject_6$h || (templateObject_6$h = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), spaceByLayoutKey[props.$gap]);
|
|
714
596
|
}, function (props) {
|
|
715
|
-
return props.$m && styled.css(templateObject_7$
|
|
597
|
+
return props.$m && styled.css(templateObject_7$f || (templateObject_7$f = __makeTemplateObject(["margin: ", ";"], ["margin: ", ";"])), spaceByLayoutKey[props.$m]);
|
|
716
598
|
}, function (props) {
|
|
717
599
|
return props.$mt && styled.css(templateObject_8$b || (templateObject_8$b = __makeTemplateObject(["margin-top: ", ";"], ["margin-top: ", ";"])), spaceByLayoutKey[props.$mt]);
|
|
718
600
|
}, function (props) {
|
|
719
601
|
return props.$mr && styled.css(templateObject_9$9 || (templateObject_9$9 = __makeTemplateObject(["margin-right: ", ";"], ["margin-right: ", ";"])), spaceByLayoutKey[props.$mr]);
|
|
720
602
|
}, function (props) {
|
|
721
|
-
return props.$mb && styled.css(templateObject_10$
|
|
603
|
+
return props.$mb && styled.css(templateObject_10$7 || (templateObject_10$7 = __makeTemplateObject(["margin-bottom: ", ";"], ["margin-bottom: ", ";"])), spaceByLayoutKey[props.$mb]);
|
|
722
604
|
}, function (props) {
|
|
723
605
|
return props.$ml && styled.css(templateObject_11$5 || (templateObject_11$5 = __makeTemplateObject(["margin-left: ", ";"], ["margin-left: ", ";"])), spaceByLayoutKey[props.$ml]);
|
|
724
606
|
}, function (props) {
|
|
@@ -924,7 +806,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
924
806
|
}));
|
|
925
807
|
};
|
|
926
808
|
var Box = BoxTransform;
|
|
927
|
-
var templateObject_1$
|
|
809
|
+
var templateObject_1$S, templateObject_2$D, templateObject_3$z, templateObject_4$s, templateObject_5$n, templateObject_6$h, templateObject_7$f, templateObject_8$b, templateObject_9$9, templateObject_10$7, templateObject_11$5, templateObject_12$5, templateObject_13$5, templateObject_14$3, templateObject_15$3, templateObject_16$2, templateObject_17$2, templateObject_18$2, templateObject_19$2, templateObject_20$2, templateObject_21$2, templateObject_22$2, templateObject_23$2, templateObject_24$2, templateObject_25$2, templateObject_26$2, templateObject_27$2, templateObject_28$2, templateObject_29$2, templateObject_30$2, templateObject_31$2, templateObject_32$2, templateObject_33$2, 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, templateObject_50, templateObject_51;
|
|
928
810
|
|
|
929
811
|
var IconStyled = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
930
812
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -932,7 +814,7 @@ var IconStyled = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
932
814
|
},
|
|
933
815
|
displayName: "Icon__IconStyled",
|
|
934
816
|
componentId: "sc-1105czq-0"
|
|
935
|
-
})(templateObject_1$
|
|
817
|
+
})(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"])), function (_a) {
|
|
936
818
|
var $size = _a.$size;
|
|
937
819
|
return tokens.semantic.size.icon[$size];
|
|
938
820
|
}, function (_a) {
|
|
@@ -1009,17 +891,17 @@ var Icon = function Icon(_a) {
|
|
|
1009
891
|
}))
|
|
1010
892
|
});
|
|
1011
893
|
};
|
|
1012
|
-
var templateObject_1$
|
|
894
|
+
var templateObject_1$R;
|
|
1013
895
|
|
|
1014
896
|
var button$1 = tokens.component.button,
|
|
1015
|
-
semantic$
|
|
897
|
+
semantic$r = tokens.semantic;
|
|
1016
898
|
// Height comes from size.control as a minimum and the content is centred, so there is no
|
|
1017
899
|
// vertical padding (decision 0034). Horizontal padding comes from the semantic spacing scale:
|
|
1018
900
|
// no component spacing tokens (decision 0022)
|
|
1019
|
-
var inset = semantic$
|
|
1020
|
-
var control$1 = semantic$
|
|
901
|
+
var inset = semantic$r.space.inset;
|
|
902
|
+
var control$1 = semantic$r.size.control;
|
|
1021
903
|
// Base styles shared between button and link
|
|
1022
|
-
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokens.semantic.space[100], ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$
|
|
904
|
+
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokens.semantic.space[100], ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic$r.motion.transition.feedback, ";\n white-space: nowrap;\n user-select: none;\n \n /* The system ring for keyboard focus only: a click doesn't leave it behind (P2, P5) */\n &:focus-visible {\n outline: ").concat(button$1.focus.outline, ";\n outline-offset: ").concat(semantic$r.border.focusOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n ").concat(forcedColorsEdge, "\n");
|
|
1023
905
|
// Dynamic variant styles using component tokens
|
|
1024
906
|
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
1025
907
|
var _b;
|
|
@@ -1089,14 +971,14 @@ var StyledButton = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
1089
971
|
},
|
|
1090
972
|
displayName: "Button__StyledButton",
|
|
1091
973
|
componentId: "sc-1eiuum9-0"
|
|
1092
|
-
})(templateObject_1$
|
|
974
|
+
})(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button$1.primary.borderRadius, getVariantStyles$1, getSizeStyles);
|
|
1093
975
|
var StyledLink = /*#__PURE__*/styled__default.default.a.withConfig({
|
|
1094
976
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1095
977
|
return !prop.startsWith('$');
|
|
1096
978
|
},
|
|
1097
979
|
displayName: "Button__StyledLink",
|
|
1098
980
|
componentId: "sc-1eiuum9-1"
|
|
1099
|
-
})(templateObject_2$
|
|
981
|
+
})(templateObject_2$C || (templateObject_2$C = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
1100
982
|
// Helper function to get icon size based on button size
|
|
1101
983
|
])), baseButtonStyles, button$1.primary.borderRadius, getVariantStyles$1, getSizeStyles);
|
|
1102
984
|
// Helper function to get icon size based on button size
|
|
@@ -1199,15 +1081,15 @@ var Button = function Button(_a) {
|
|
|
1199
1081
|
children: renderButtonContent(children, iconName, size)
|
|
1200
1082
|
}));
|
|
1201
1083
|
};
|
|
1202
|
-
var templateObject_1$
|
|
1084
|
+
var templateObject_1$Q, templateObject_2$C;
|
|
1203
1085
|
|
|
1204
|
-
var semantic$
|
|
1205
|
-
var color$
|
|
1086
|
+
var semantic$q = tokens.semantic;
|
|
1087
|
+
var color$f = semantic$q.color;
|
|
1206
1088
|
var label$2 = tokens.component.badge.label;
|
|
1207
|
-
var category = color$
|
|
1208
|
-
var radius$
|
|
1209
|
-
var space$
|
|
1210
|
-
var labelHeight$1 = semantic$
|
|
1089
|
+
var category = color$f.category;
|
|
1090
|
+
var radius$5 = semantic$q.radius;
|
|
1091
|
+
var space$j = semantic$q.space;
|
|
1092
|
+
var labelHeight$1 = semantic$q.size.label;
|
|
1211
1093
|
var displayColors = ['olive', 'periwinkle', 'rose', 'magenta', 'gray'];
|
|
1212
1094
|
// Text on white or the -muted fill (outlined and minimal), at least 4.5:1 (#115)
|
|
1213
1095
|
var categoryText = {
|
|
@@ -1223,19 +1105,19 @@ var StyledCategoryLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1223
1105
|
},
|
|
1224
1106
|
displayName: "CategoryLabel__StyledCategoryLabel",
|
|
1225
1107
|
componentId: "sc-1jx7bjo-0"
|
|
1226
|
-
})(templateObject_1$
|
|
1108
|
+
})(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n white-space: nowrap;\n user-select: none;\n border-style: solid;\n border-width: ", ";\n \n /* Size styles */\n height: ", ";\n padding: ", ";\n font: ", ";\n /* After the font shorthand, which would otherwise reset it */\n font-weight: ", ";\n gap: ", ";\n \n /* Variant + Color styles */\n background-color: ", ";\n \n /* Outlined and minimal text uses the AA text token, not the base colour (issue 115) */\n color: ", ";\n \n border-color: ", ";\n"], ["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n white-space: nowrap;\n user-select: none;\n border-style: solid;\n border-width: ", ";\n \n /* Size styles */\n height: ", ";\n padding: ", ";\n font: ", ";\n /* After the font shorthand, which would otherwise reset it */\n font-weight: ", ";\n gap: ", ";\n \n /* Variant + Color styles */\n background-color: ", ";\n \n /* Outlined and minimal text uses the AA text token, not the base colour (issue 115) */\n color: ", ";\n \n border-color: ", ";\n"
|
|
1227
1109
|
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
1228
1110
|
// display: contents keeps the root's flex layout and gap.
|
|
1229
|
-
])), radius$
|
|
1111
|
+
])), radius$5.full, semantic$q.border.width.thin, function (_a) {
|
|
1230
1112
|
var $size = _a.$size;
|
|
1231
1113
|
return labelHeight$1[$size];
|
|
1232
1114
|
}, function (_a) {
|
|
1233
1115
|
var $size = _a.$size;
|
|
1234
|
-
return $size === 'medium' ? "".concat(space$
|
|
1116
|
+
return $size === 'medium' ? "".concat(space$j[100], " ").concat(space$j[200]) : "".concat(space$j[200], " ").concat(space$j[300]);
|
|
1235
1117
|
}, function (_a) {
|
|
1236
1118
|
var $size = _a.$size;
|
|
1237
1119
|
return $size === 'medium' ? label$2.typography.small : label$2.typography.medium;
|
|
1238
|
-
}, label$2.fontWeight, space$
|
|
1120
|
+
}, label$2.fontWeight, space$j[100], function (_a) {
|
|
1239
1121
|
var $color = _a.$color,
|
|
1240
1122
|
$variant = _a.$variant;
|
|
1241
1123
|
if ($variant === 'filled') {
|
|
@@ -1250,7 +1132,7 @@ var StyledCategoryLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1250
1132
|
var $color = _a.$color,
|
|
1251
1133
|
$variant = _a.$variant;
|
|
1252
1134
|
if ($variant === 'filled') {
|
|
1253
|
-
return color$
|
|
1135
|
+
return color$f.text.inverse;
|
|
1254
1136
|
}
|
|
1255
1137
|
return categoryText[$color];
|
|
1256
1138
|
}, function (_a) {
|
|
@@ -1266,8 +1148,8 @@ var StyledCategoryLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1266
1148
|
var VisibleContent$1 = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
1267
1149
|
displayName: "CategoryLabel__VisibleContent",
|
|
1268
1150
|
componentId: "sc-1jx7bjo-1"
|
|
1269
|
-
})(templateObject_2$
|
|
1270
|
-
var HiddenLabel
|
|
1151
|
+
})(templateObject_2$B || (templateObject_2$B = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
|
|
1152
|
+
var HiddenLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
1271
1153
|
displayName: "CategoryLabel__HiddenLabel",
|
|
1272
1154
|
componentId: "sc-1jx7bjo-2"
|
|
1273
1155
|
})(templateObject_3$y || (templateObject_3$y = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
|
|
@@ -1335,16 +1217,16 @@ var CategoryLabel = function CategoryLabel(_a) {
|
|
|
1335
1217
|
size: iconSize,
|
|
1336
1218
|
iconColor: variant === 'filled' ? 'inverse' : 'inherit'
|
|
1337
1219
|
}), children]
|
|
1338
|
-
}), accessibleLabel && jsxRuntime.jsx(HiddenLabel
|
|
1220
|
+
}), accessibleLabel && jsxRuntime.jsx(HiddenLabel, {
|
|
1339
1221
|
children: accessibleLabel
|
|
1340
1222
|
})]
|
|
1341
1223
|
});
|
|
1342
1224
|
};
|
|
1343
1225
|
CategoryLabel.displayName = 'CategoryLabel';
|
|
1344
|
-
var templateObject_1$
|
|
1226
|
+
var templateObject_1$P, templateObject_2$B, templateObject_3$y;
|
|
1345
1227
|
|
|
1346
1228
|
var chip$2 = tokens.component.chip,
|
|
1347
|
-
semantic$
|
|
1229
|
+
semantic$p = tokens.semantic;
|
|
1348
1230
|
// The chip's fill and text for its surface and state, matching Button's approach
|
|
1349
1231
|
var getVariantStyles = function getVariantStyles(_a) {
|
|
1350
1232
|
var $surface = _a.$surface,
|
|
@@ -1377,10 +1259,10 @@ var getVariantStyles = function getVariantStyles(_a) {
|
|
|
1377
1259
|
// Chips have one size: 24px from the label scale as a minimum, with the content centred
|
|
1378
1260
|
// and no vertical padding (decisions 0034 and 0035). Horizontal padding comes from the
|
|
1379
1261
|
// semantic spacing scale (decision 0022).
|
|
1380
|
-
var sizeStyles = "\n font: ".concat(chip$2.sizes.medium.font, ";\n min-height: ").concat(semantic$
|
|
1262
|
+
var sizeStyles = "\n font: ".concat(chip$2.sizes.medium.font, ";\n min-height: ").concat(semantic$p.size.label.medium, ";\n padding: 0 ").concat(semantic$p.space.inset.sm, ";\n");
|
|
1381
1263
|
|
|
1382
1264
|
var chip$1 = tokens.component.chip,
|
|
1383
|
-
semantic$
|
|
1265
|
+
semantic$o = tokens.semantic;
|
|
1384
1266
|
// Base styled component using direct prop interpolation like Button
|
|
1385
1267
|
var StyledChip = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
1386
1268
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1388,18 +1270,18 @@ var StyledChip = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1388
1270
|
},
|
|
1389
1271
|
displayName: "ChipBase__StyledChip",
|
|
1390
1272
|
componentId: "sc-moa6zc-0"
|
|
1391
|
-
})(templateObject_1$
|
|
1273
|
+
})(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n cursor: ", ";\n \n /* Forced colours: an edge, and GrayText when disabled, since a span gets no system disabled\n colour (decision 0038). Before the variant styles, so a selected chip's Highlight border wins. */\n ", "\n ", "\n\n ", "\n ", "\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n cursor: ", ";\n \n /* Forced colours: an edge, and GrayText when disabled, since a span gets no system disabled\n colour (decision 0038). Before the variant styles, so a selected chip's Highlight border wins. */\n ", "\n ", "\n\n ", "\n ", "\n \n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n"
|
|
1392
1274
|
// Icon container for selected indicator or leading icons
|
|
1393
|
-
])), chip$1["default"].borderRadius, semantic$
|
|
1275
|
+
])), chip$1["default"].borderRadius, semantic$o.motion.transition.feedback, function (props) {
|
|
1394
1276
|
return props.$disabled ? 'not-allowed' : props.$clickable ? 'pointer' : 'default';
|
|
1395
1277
|
}, forcedColorsEdge, function (props) {
|
|
1396
1278
|
return props.$disabled ? "".concat(forcedColors, " { color: GrayText; }") : '';
|
|
1397
|
-
}, getVariantStyles, sizeStyles, chip$1.focus.outline, semantic$
|
|
1279
|
+
}, getVariantStyles, sizeStyles, chip$1.focus.outline, semantic$o.border.focusOffset);
|
|
1398
1280
|
// Icon container for selected indicator or leading icons
|
|
1399
1281
|
var IconContainer = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
1400
1282
|
displayName: "ChipBase__IconContainer",
|
|
1401
1283
|
componentId: "sc-moa6zc-1"
|
|
1402
|
-
})(templateObject_2$
|
|
1284
|
+
})(templateObject_2$A || (templateObject_2$A = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n margin-right: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n margin-right: ", ";\n"
|
|
1403
1285
|
// Close button for dismissible chips
|
|
1404
1286
|
])), tokens.semantic.space[100]);
|
|
1405
1287
|
// Close button for dismissible chips
|
|
@@ -1409,10 +1291,10 @@ var CloseButton = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
1409
1291
|
},
|
|
1410
1292
|
displayName: "ChipBase__CloseButton",
|
|
1411
1293
|
componentId: "sc-moa6zc-2"
|
|
1412
|
-
})(templateObject_3$x || (templateObject_3$x = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\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 position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\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"])), tokens.semantic.space[200], chip$1.closeButton.size, chip$1.closeButton.size, tokens.semantic.space[0], semantic$
|
|
1294
|
+
})(templateObject_3$x || (templateObject_3$x = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: ", ";\n background: transparent;\n border: none;\n position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\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 position: relative;\n width: ", ";\n height: ", ";\n padding: ", ";\n\n /* The pointer target is at least 24 \xD7 24px (WCAG 2.5.8, decision 0039): an invisible hit area\n as tall as the chip, centred on the 20px button. It stays inside the chip and its padding, so\n it can't overlap another target. */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: ", ";\n height: ", ";\n transform: translate(-50%, -50%);\n }\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"])), tokens.semantic.space[200], chip$1.closeButton.size, chip$1.closeButton.size, tokens.semantic.space[0], semantic$o.size.label.medium, semantic$o.size.label.medium, tokens.semantic.radius.full, function (props) {
|
|
1413
1295
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1414
|
-
}, semantic$
|
|
1415
|
-
var templateObject_1$
|
|
1296
|
+
}, semantic$o.motion.transition.feedback, tokens.semantic.color.fill['none-hover'], tokens.semantic.color.fill['none-pressed'], tokens.semantic.color.text.disabled, chip$1.focus.outline, semantic$o.border.focusOffset, chip$1["default"].borderRadius);
|
|
1297
|
+
var templateObject_1$O, templateObject_2$A, templateObject_3$x;
|
|
1416
1298
|
|
|
1417
1299
|
/**
|
|
1418
1300
|
* Chip - a static, non-interactive label for tags, categories and metadata.
|
|
@@ -1611,14 +1493,14 @@ var FilterChip = function FilterChip(_a) {
|
|
|
1611
1493
|
};
|
|
1612
1494
|
|
|
1613
1495
|
var chip = tokens.component.chip,
|
|
1614
|
-
semantic$
|
|
1615
|
-
var color$
|
|
1496
|
+
semantic$n = tokens.semantic;
|
|
1497
|
+
var color$e = semantic$n.color;
|
|
1616
1498
|
// Outlined, with the naked fill ladder on hover and press (decisions 0030, 0046): the edge keeps it
|
|
1617
1499
|
// visible on white, the page and AgentInput's docked band
|
|
1618
1500
|
var StyledSuggestionChip = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
1619
1501
|
displayName: "SuggestionChip__StyledSuggestionChip",
|
|
1620
1502
|
componentId: "sc-1k0njm-0"
|
|
1621
|
-
})(templateObject_1$
|
|
1503
|
+
})(templateObject_1$N || (templateObject_1$N = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n margin: 0;\n box-sizing: border-box;\n border: ", " solid ", ";\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n text-align: start;\n /* A long suggestion wraps inside the chip rather than being cut off (issue 279) */\n white-space: normal;\n overflow-wrap: anywhere;\n transition: ", ";\n ", "\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n border-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n /* Forced colours: a native button gets ButtonBorder and GrayText; keep the edge (decision 0038) */\n ", " {\n border-color: ButtonBorder;\n\n &:disabled {\n border-color: GrayText;\n }\n }\n"], ["\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n margin: 0;\n box-sizing: border-box;\n border: ", " solid ", ";\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n text-align: start;\n /* A long suggestion wraps inside the chip rather than being cut off (issue 279) */\n white-space: normal;\n overflow-wrap: anywhere;\n transition: ", ";\n ", "\n\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n border-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n /* Forced colours: a native button gets ButtonBorder and GrayText; keep the edge (decision 0038) */\n ", " {\n border-color: ButtonBorder;\n\n &:disabled {\n border-color: GrayText;\n }\n }\n"
|
|
1622
1504
|
/**
|
|
1623
1505
|
* SuggestionChip - Offers text to put in the agent input
|
|
1624
1506
|
*
|
|
@@ -1630,7 +1512,7 @@ var StyledSuggestionChip = /*#__PURE__*/styled__default.default.button.withConfi
|
|
|
1630
1512
|
* - A native button: Enter and Space pick it, and its text is its accessible name
|
|
1631
1513
|
* - Outlined, with the naked hover and pressed fills; no selected state
|
|
1632
1514
|
* - One chip height (24px minimum, decision 0035); long text wraps instead of being cut off
|
|
1633
|
-
*/])), semantic$
|
|
1515
|
+
*/])), semantic$n.border.width.thin, color$e.border.input, chip["default"].borderRadius, color$e.fill.none, color$e.text["default"], semantic$n.motion.transition.feedback, sizeStyles, color$e.fill['none-hover'], color$e.fill['none-pressed'], chip.focus.outline, semantic$n.border.focusOffset, color$e.border["default"], color$e.text.disabled, forcedColors);
|
|
1634
1516
|
/**
|
|
1635
1517
|
* SuggestionChip - Offers text to put in the agent input
|
|
1636
1518
|
*
|
|
@@ -1658,13 +1540,13 @@ var SuggestionChip = function SuggestionChip(_a) {
|
|
|
1658
1540
|
});
|
|
1659
1541
|
};
|
|
1660
1542
|
SuggestionChip.displayName = 'SuggestionChip';
|
|
1661
|
-
var templateObject_1$
|
|
1543
|
+
var templateObject_1$N;
|
|
1662
1544
|
|
|
1663
|
-
var space$
|
|
1545
|
+
var space$i = tokens.semantic.space;
|
|
1664
1546
|
var StyledContainer$2 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
1665
1547
|
displayName: "Container__StyledContainer",
|
|
1666
1548
|
componentId: "sc-17dbj6n-0"
|
|
1667
|
-
})(templateObject_1$
|
|
1549
|
+
})(templateObject_1$M || (templateObject_1$M = __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"])), space$i[600], space$i[600], 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']);
|
|
1668
1550
|
var Container$1 = function Container(_a) {
|
|
1669
1551
|
var children = _a.children,
|
|
1670
1552
|
props = __rest(_a, ["children"]);
|
|
@@ -1672,12 +1554,12 @@ var Container$1 = function Container(_a) {
|
|
|
1672
1554
|
children: children
|
|
1673
1555
|
}));
|
|
1674
1556
|
};
|
|
1675
|
-
var templateObject_1$
|
|
1557
|
+
var templateObject_1$M;
|
|
1676
1558
|
|
|
1677
1559
|
var PictureWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
1678
1560
|
displayName: "Picture__PictureWrapper",
|
|
1679
1561
|
componentId: "sc-11d9tei-0"
|
|
1680
|
-
})(templateObject_1$
|
|
1562
|
+
})(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"], ["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"
|
|
1681
1563
|
// A clickable image answers input on the image itself (decision 0029, #185): it fades on hover and
|
|
1682
1564
|
// one step further while pressed, and draws the system focus ring around the image, following its
|
|
1683
1565
|
// rounded corners. Fading isn't movement, so it stays under reduced motion.
|
|
@@ -1685,7 +1567,7 @@ var PictureWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
1685
1567
|
// A clickable image answers input on the image itself (decision 0029, #185): it fades on hover and
|
|
1686
1568
|
// one step further while pressed, and draws the system focus ring around the image, following its
|
|
1687
1569
|
// rounded corners. Fading isn't movement, so it stays under reduced motion.
|
|
1688
|
-
var clickableImage = styled.css(templateObject_2$
|
|
1570
|
+
var clickableImage = styled.css(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n display: block;\n cursor: pointer;\n\n img {\n transition: ", ";\n }\n\n &:hover img {\n opacity: ", ";\n }\n\n &:active img {\n opacity: ", ";\n }\n\n &:focus-visible {\n outline: none;\n }\n\n &:focus-visible img {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n display: block;\n cursor: pointer;\n\n img {\n transition: ", ";\n }\n\n &:hover img {\n opacity: ", ";\n }\n\n &:active img {\n opacity: ", ";\n }\n\n &:focus-visible {\n outline: none;\n }\n\n &:focus-visible img {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), tokens.semantic.motion.transition.press, tokens.semantic.opacity.hover, tokens.semantic.opacity.pressed, tokens.semantic.border.focus, tokens.semantic.border.focusOffset);
|
|
1689
1571
|
var ImageLink = /*#__PURE__*/styled__default.default.a.withConfig({
|
|
1690
1572
|
displayName: "Picture__ImageLink",
|
|
1691
1573
|
componentId: "sc-11d9tei-1"
|
|
@@ -1727,18 +1609,18 @@ var Picture = function Picture(_a) {
|
|
|
1727
1609
|
}) : image
|
|
1728
1610
|
});
|
|
1729
1611
|
};
|
|
1730
|
-
var templateObject_1$
|
|
1612
|
+
var templateObject_1$L, templateObject_2$z, templateObject_3$w, templateObject_4$r, templateObject_5$m;
|
|
1731
1613
|
|
|
1732
|
-
var _a$
|
|
1733
|
-
typography$
|
|
1734
|
-
color$
|
|
1614
|
+
var _a$9 = tokens.semantic,
|
|
1615
|
+
typography$7 = _a$9.typography,
|
|
1616
|
+
color$d = _a$9.color;
|
|
1735
1617
|
var TimeStyled = /*#__PURE__*/styled__default.default.time.withConfig({
|
|
1736
1618
|
displayName: "DateFormatter__TimeStyled",
|
|
1737
1619
|
componentId: "sc-5464cc-0"
|
|
1738
|
-
})(templateObject_1$
|
|
1620
|
+
})(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
1739
1621
|
/**
|
|
1740
1622
|
* Formats a date with smart relative/absolute logic
|
|
1741
|
-
*/])), typography$
|
|
1623
|
+
*/])), typography$7.label, color$d.text.muted);
|
|
1742
1624
|
/**
|
|
1743
1625
|
* Formats a date with smart relative/absolute logic
|
|
1744
1626
|
*/
|
|
@@ -1780,27 +1662,27 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1780
1662
|
children: displayText
|
|
1781
1663
|
});
|
|
1782
1664
|
};
|
|
1783
|
-
var templateObject_1$
|
|
1665
|
+
var templateObject_1$K;
|
|
1784
1666
|
|
|
1785
|
-
var _a$
|
|
1786
|
-
motion$
|
|
1787
|
-
border$
|
|
1788
|
-
space$
|
|
1789
|
-
size$
|
|
1667
|
+
var _a$8 = tokens.semantic,
|
|
1668
|
+
motion$c = _a$8.motion,
|
|
1669
|
+
border$7 = _a$8.border,
|
|
1670
|
+
space$h = _a$8.space,
|
|
1671
|
+
size$9 = _a$8.size,
|
|
1790
1672
|
_b$2 = tokens.component,
|
|
1791
1673
|
iconButton = _b$2.iconButton,
|
|
1792
1674
|
button = _b$2.button;
|
|
1793
1675
|
// Height and width come from size.control as a minimum (decision 0034)
|
|
1794
1676
|
var control = {
|
|
1795
|
-
small: size$
|
|
1796
|
-
medium: size$
|
|
1797
|
-
large: size$
|
|
1677
|
+
small: size$9.control.sm,
|
|
1678
|
+
medium: size$9.control.md,
|
|
1679
|
+
large: size$9.control.lg
|
|
1798
1680
|
};
|
|
1799
1681
|
// Padding comes from the semantic spacing scale: no component spacing tokens (decision 0022)
|
|
1800
1682
|
var padding = {
|
|
1801
|
-
small: space$
|
|
1802
|
-
medium: space$
|
|
1803
|
-
large: space$
|
|
1683
|
+
small: space$h.inset.xs,
|
|
1684
|
+
medium: space$h.inset.sm,
|
|
1685
|
+
large: space$h.inset.md
|
|
1804
1686
|
};
|
|
1805
1687
|
// Colours and motion come from Button's tokens, so IconButton's variants look and behave exactly like
|
|
1806
1688
|
// Button's in every state (#130). Only the size and the icon differ
|
|
@@ -1841,13 +1723,13 @@ var IconButtonStyled = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
1841
1723
|
},
|
|
1842
1724
|
displayName: "IconButton__IconButtonStyled",
|
|
1843
1725
|
componentId: "sc-k8b14t-0"
|
|
1844
|
-
})(templateObject_1$
|
|
1726
|
+
})(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n height: max-content;\n cursor: pointer;\n position: relative;\n\n 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 /* The system ring for keyboard focus only: a click doesn't leave it behind (P2, P5) */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n ", "\n"], ["\n background-color: ", ";\n color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n height: max-content;\n cursor: pointer;\n position: relative;\n\n 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 /* The system ring for keyboard focus only: a click doesn't leave it behind (P2, P5) */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n ", "\n"])), function (_a) {
|
|
1845
1727
|
var $variant = _a.$variant;
|
|
1846
1728
|
return colours($variant).bg;
|
|
1847
1729
|
}, function (_a) {
|
|
1848
1730
|
var $variant = _a.$variant;
|
|
1849
1731
|
return colours($variant).text;
|
|
1850
|
-
}, iconButton.primary.borderRadius, motion$
|
|
1732
|
+
}, iconButton.primary.borderRadius, motion$c.transition.feedback, function (_a) {
|
|
1851
1733
|
var $size = _a.$size;
|
|
1852
1734
|
return control[$size];
|
|
1853
1735
|
}, function (_a) {
|
|
@@ -1862,7 +1744,7 @@ var IconButtonStyled = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
1862
1744
|
}, function (_a) {
|
|
1863
1745
|
var $variant = _a.$variant;
|
|
1864
1746
|
return colours($variant).activeBg;
|
|
1865
|
-
}, iconButton.focus.outline, border$
|
|
1747
|
+
}, iconButton.focus.outline, border$7.focusOffset, function (_a) {
|
|
1866
1748
|
var $variant = _a.$variant;
|
|
1867
1749
|
return colours($variant).disabledBg;
|
|
1868
1750
|
}, function (_a) {
|
|
@@ -1919,7 +1801,137 @@ var IconButton = function IconButton(_a) {
|
|
|
1919
1801
|
})
|
|
1920
1802
|
}));
|
|
1921
1803
|
};
|
|
1922
|
-
var templateObject_1$
|
|
1804
|
+
var templateObject_1$J;
|
|
1805
|
+
|
|
1806
|
+
var _a$7 = tokens.semantic,
|
|
1807
|
+
typography$6 = _a$7.typography,
|
|
1808
|
+
color$c = _a$7.color,
|
|
1809
|
+
letterSpacing = _a$7.letterSpacing;
|
|
1810
|
+
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
1811
|
+
var styles = {
|
|
1812
|
+
display: "font: ".concat(typography$6.display, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
1813
|
+
h1: "font: ".concat(typography$6.h1, "; letter-spacing: ").concat(letterSpacing.tighter, ";"),
|
|
1814
|
+
h2: "font: ".concat(typography$6.h2, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
1815
|
+
h3: "font: ".concat(typography$6.h3, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
1816
|
+
h4: "font: ".concat(typography$6.h4, "; letter-spacing: ").concat(letterSpacing.tight, ";"),
|
|
1817
|
+
h5: "font: ".concat(typography$6.h5, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
1818
|
+
h6: "font: ".concat(typography$6.h6, "; letter-spacing: ").concat(letterSpacing.normal, ";"),
|
|
1819
|
+
subtitle: "font: ".concat(typography$6.subtitle, ";"),
|
|
1820
|
+
body: "font: ".concat(typography$6.body, ";"),
|
|
1821
|
+
small: "font: ".concat(typography$6.small, ";"),
|
|
1822
|
+
overline: "font: ".concat(typography$6.overline, ";"),
|
|
1823
|
+
caption: "font: ".concat(typography$6.caption, "; text-transform: uppercase;"),
|
|
1824
|
+
button1: "font: ".concat(tokens.component.button.sizes.large.font, ";"),
|
|
1825
|
+
button2: "font: ".concat(tokens.component.button.sizes.medium.font, ";"),
|
|
1826
|
+
button3: "font: ".concat(tokens.component.button.sizes.small.font, "; font-weight: ").concat(tokens.component.button.sizes.small.fontWeight, ";"),
|
|
1827
|
+
label: "font: ".concat(typography$6.label, ";")
|
|
1828
|
+
};
|
|
1829
|
+
return styles[variant] || styles.body;
|
|
1830
|
+
};
|
|
1831
|
+
var getTextColor = function getTextColor(colorVariant) {
|
|
1832
|
+
var colorMap = {
|
|
1833
|
+
"default": color$c.text["default"],
|
|
1834
|
+
emphasis: color$c.text["default"],
|
|
1835
|
+
subdued: color$c.text.muted,
|
|
1836
|
+
inverse: color$c.text.inverse,
|
|
1837
|
+
disabled: color$c.text.disabled,
|
|
1838
|
+
interactive: color$c.text.accent,
|
|
1839
|
+
error: color$c.text.danger,
|
|
1840
|
+
success: color$c.text.success,
|
|
1841
|
+
warning: color$c.text.warning
|
|
1842
|
+
};
|
|
1843
|
+
return colorMap[colorVariant] || colorMap["default"];
|
|
1844
|
+
};
|
|
1845
|
+
var getDefaultElement = function getDefaultElement(variant) {
|
|
1846
|
+
var elementMap = {
|
|
1847
|
+
display: 'h1',
|
|
1848
|
+
h1: 'h1',
|
|
1849
|
+
h2: 'h2',
|
|
1850
|
+
h3: 'h3',
|
|
1851
|
+
h4: 'h4',
|
|
1852
|
+
h5: 'h5',
|
|
1853
|
+
h6: 'h6',
|
|
1854
|
+
subtitle: 'p',
|
|
1855
|
+
body: 'p',
|
|
1856
|
+
small: 'span',
|
|
1857
|
+
overline: 'span',
|
|
1858
|
+
caption: 'span',
|
|
1859
|
+
button1: 'span',
|
|
1860
|
+
button2: 'span',
|
|
1861
|
+
button3: 'span',
|
|
1862
|
+
label: 'span'
|
|
1863
|
+
};
|
|
1864
|
+
return elementMap[variant] || 'span';
|
|
1865
|
+
};
|
|
1866
|
+
var StyledTypography = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
1867
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1868
|
+
return !prop.startsWith('$');
|
|
1869
|
+
},
|
|
1870
|
+
displayName: "Typography__StyledTypography",
|
|
1871
|
+
componentId: "sc-17mqo4k-0"
|
|
1872
|
+
})(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n"], ["\n ", "\n color: ", ";\n margin: 0;\n"
|
|
1873
|
+
/**
|
|
1874
|
+
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
1875
|
+
*
|
|
1876
|
+
* Features:
|
|
1877
|
+
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
1878
|
+
* - Color variants for different contexts
|
|
1879
|
+
* - Automatic semantic HTML element selection
|
|
1880
|
+
* - Manual element override support
|
|
1881
|
+
* - Direct semantic token usage (no component tokens needed)
|
|
1882
|
+
* - Full accessibility support
|
|
1883
|
+
*
|
|
1884
|
+
* @example
|
|
1885
|
+
* ```tsx
|
|
1886
|
+
* <Typography variant="h1">Main Heading</Typography>
|
|
1887
|
+
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
1888
|
+
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
1889
|
+
* ```
|
|
1890
|
+
*/])), function (_a) {
|
|
1891
|
+
var $variant = _a.$variant;
|
|
1892
|
+
return getTypographyStyles($variant);
|
|
1893
|
+
}, function (_a) {
|
|
1894
|
+
var $color = _a.$color;
|
|
1895
|
+
return getTextColor($color);
|
|
1896
|
+
});
|
|
1897
|
+
/**
|
|
1898
|
+
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
1899
|
+
*
|
|
1900
|
+
* Features:
|
|
1901
|
+
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
1902
|
+
* - Color variants for different contexts
|
|
1903
|
+
* - Automatic semantic HTML element selection
|
|
1904
|
+
* - Manual element override support
|
|
1905
|
+
* - Direct semantic token usage (no component tokens needed)
|
|
1906
|
+
* - Full accessibility support
|
|
1907
|
+
*
|
|
1908
|
+
* @example
|
|
1909
|
+
* ```tsx
|
|
1910
|
+
* <Typography variant="h1">Main Heading</Typography>
|
|
1911
|
+
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
1912
|
+
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
1913
|
+
* ```
|
|
1914
|
+
*/
|
|
1915
|
+
var Typography = function Typography(_a) {
|
|
1916
|
+
var _b = _a.variant,
|
|
1917
|
+
variant = _b === void 0 ? 'body' : _b,
|
|
1918
|
+
children = _a.children,
|
|
1919
|
+
_c = _a.color,
|
|
1920
|
+
color = _c === void 0 ? 'default' : _c,
|
|
1921
|
+
as = _a.as,
|
|
1922
|
+
dataTestId = _a["data-testid"];
|
|
1923
|
+
// $variant and $color are only used for styled-components prop filtering
|
|
1924
|
+
var defaultElement = getDefaultElement(variant);
|
|
1925
|
+
var elementType = as || defaultElement;
|
|
1926
|
+
return jsxRuntime.jsx(StyledTypography, {
|
|
1927
|
+
as: elementType,
|
|
1928
|
+
"$variant": variant,
|
|
1929
|
+
"$color": color,
|
|
1930
|
+
"data-testid": dataTestId,
|
|
1931
|
+
children: children
|
|
1932
|
+
});
|
|
1933
|
+
};
|
|
1934
|
+
var templateObject_1$I;
|
|
1923
1935
|
|
|
1924
1936
|
var StyledWrapper = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
1925
1937
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -1927,7 +1939,7 @@ var StyledWrapper = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1927
1939
|
},
|
|
1928
1940
|
displayName: "MoneyDisplay__StyledWrapper",
|
|
1929
1941
|
componentId: "sc-1mddej3-0"
|
|
1930
|
-
})(templateObject_1$
|
|
1942
|
+
})(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n text-align: ", ";\n font-weight: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n text-align: ", ";\n font-weight: ", ";\n"
|
|
1931
1943
|
// Map size to Typography variant
|
|
1932
1944
|
])), function (_a) {
|
|
1933
1945
|
var $align = _a.$align;
|
|
@@ -1989,27 +2001,27 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
1989
2001
|
})
|
|
1990
2002
|
});
|
|
1991
2003
|
};
|
|
1992
|
-
var templateObject_1$
|
|
2004
|
+
var templateObject_1$H;
|
|
1993
2005
|
|
|
1994
2006
|
// Destructure tokens
|
|
1995
|
-
var semantic$
|
|
1996
|
-
var _a$6 = __assign(__assign({}, semantic$
|
|
2007
|
+
var semantic$m = tokens.semantic;
|
|
2008
|
+
var _a$6 = __assign(__assign({}, semantic$m), {
|
|
1997
2009
|
component: tokens.component
|
|
1998
2010
|
}),
|
|
1999
2011
|
color$b = _a$6.color,
|
|
2000
|
-
motion$
|
|
2001
|
-
radius$
|
|
2002
|
-
component$
|
|
2012
|
+
motion$b = _a$6.motion,
|
|
2013
|
+
radius$4 = _a$6.radius,
|
|
2014
|
+
component$4 = _a$6.component;
|
|
2003
2015
|
var ProgressBarContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
2004
2016
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2005
2017
|
return !prop.startsWith('$');
|
|
2006
2018
|
},
|
|
2007
2019
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
2008
2020
|
componentId: "sc-1nco33q-0"
|
|
2009
|
-
})(templateObject_3$v || (templateObject_3$v = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", ";\n overflow: hidden;\n\n /* Forced colours drop the track's fill, so the track gets an edge (decision 0038) */\n ", "\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-radius: ", ";\n overflow: hidden;\n\n /* Forced colours drop the track's fill, so the track gets an edge (decision 0038) */\n ", "\n\n ", "\n\n ", "\n"])), tokens.component.track.background, radius$
|
|
2010
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_1$
|
|
2021
|
+
})(templateObject_3$v || (templateObject_3$v = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", ";\n overflow: hidden;\n\n /* Forced colours drop the track's fill, so the track gets an edge (decision 0038) */\n ", "\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-radius: ", ";\n overflow: hidden;\n\n /* Forced colours drop the track's fill, so the track gets an edge (decision 0038) */\n ", "\n\n ", "\n\n ", "\n"])), tokens.component.track.background, radius$4.xs, forcedColorsEdge, function (props) {
|
|
2022
|
+
return props.$variant === 'horizontal' && styled.css(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["\n width: 100%;\n height: ", ";\n "], ["\n width: 100%;\n height: ", ";\n "])), props.$height ? component$4.progressBar.sizes[props.$height].height : component$4.progressBar.sizes.md.height);
|
|
2011
2023
|
}, function (props) {
|
|
2012
|
-
return props.$variant === 'vertical' && styled.css(templateObject_2$
|
|
2024
|
+
return props.$variant === 'vertical' && styled.css(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n "], ["\n width: ", ";\n height: 100%;\n "])), props.$width ? component$4.progressBar.sizes[props.$width].height : component$4.progressBar.sizes.md.height);
|
|
2013
2025
|
});
|
|
2014
2026
|
var ProgressBarFill = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
2015
2027
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2017,7 +2029,7 @@ var ProgressBarFill = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2017
2029
|
},
|
|
2018
2030
|
displayName: "ProgressBar__ProgressBarFill",
|
|
2019
2031
|
componentId: "sc-1nco33q-1"
|
|
2020
|
-
})(templateObject_7$
|
|
2032
|
+
})(templateObject_7$e || (templateObject_7$e = __makeTemplateObject(["\n height: 100%;\n transition: width ", " ", ",\n height ", " ", ",\n background-color ", " ", ";\n\n ", " {\n transition: none;\n }\n\n /* The fill is the value, so it keeps a fill in forced colours, in the system selection colour (decision 0038) */\n ", " {\n forced-color-adjust: none;\n background-color: Highlight;\n }\n\n ", "\n\n ", "\n\n ", "\n"], ["\n height: 100%;\n transition: width ", " ", ",\n height ", " ", ",\n background-color ", " ", ";\n\n ", " {\n transition: none;\n }\n\n /* The fill is the value, so it keeps a fill in forced colours, in the system selection colour (decision 0038) */\n ", " {\n forced-color-adjust: none;\n background-color: Highlight;\n }\n\n ", "\n\n ", "\n\n ", "\n"])), motion$b.duration.moderate, motion$b.easing.standard, motion$b.duration.moderate, motion$b.easing.standard, motion$b.duration.moderate, motion$b.easing.standard, reducedMotion, forcedColors, function (props) {
|
|
2021
2033
|
var backgroundColor;
|
|
2022
2034
|
switch (props.$color) {
|
|
2023
2035
|
case 'success':
|
|
@@ -2070,19 +2082,19 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
2070
2082
|
})
|
|
2071
2083
|
});
|
|
2072
2084
|
};
|
|
2073
|
-
var templateObject_1$
|
|
2085
|
+
var templateObject_1$G, templateObject_2$y, templateObject_3$v, templateObject_4$q, templateObject_5$l, templateObject_6$g, templateObject_7$e;
|
|
2074
2086
|
|
|
2075
2087
|
// Destructure tokens for cleaner access
|
|
2076
2088
|
var separatorTokens = tokens.component.separator;
|
|
2077
2089
|
// Margins come from the semantic separator spacing: no component spacing tokens (decision 0022)
|
|
2078
|
-
var space$
|
|
2090
|
+
var space$g = tokens.semantic.space;
|
|
2079
2091
|
var StyledDivider = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
2080
2092
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2081
2093
|
return !prop.startsWith('$');
|
|
2082
2094
|
},
|
|
2083
2095
|
displayName: "Divider__StyledDivider",
|
|
2084
2096
|
componentId: "sc-1l0c8ja-0"
|
|
2085
|
-
})(templateObject_1$
|
|
2097
|
+
})(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"], ["\n border: none;\n \n /* Apply orientation */\n ", "\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles (spacing) */\n ", "\n"
|
|
2086
2098
|
/**
|
|
2087
2099
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
2088
2100
|
*
|
|
@@ -2131,33 +2143,33 @@ var StyledDivider = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2131
2143
|
$orientation = _d === void 0 ? 'horizontal' : _d;
|
|
2132
2144
|
if ($variant === 'minimal' && $orientation === 'horizontal') {
|
|
2133
2145
|
// Minimal variant always uses its predefined spacing for horizontal
|
|
2134
|
-
return "margin: ".concat(space$
|
|
2146
|
+
return "margin: ".concat(space$g[600], " 0;");
|
|
2135
2147
|
}
|
|
2136
2148
|
if ($orientation === 'vertical') {
|
|
2137
2149
|
// Vertical orientation uses horizontal margins (left/right)
|
|
2138
2150
|
switch ($size) {
|
|
2139
2151
|
case 'small':
|
|
2140
|
-
return "margin: 0 ".concat(space$
|
|
2152
|
+
return "margin: 0 ".concat(space$g[400], ";");
|
|
2141
2153
|
case 'medium':
|
|
2142
|
-
return "margin: 0 ".concat(space$
|
|
2154
|
+
return "margin: 0 ".concat(space$g[600], ";");
|
|
2143
2155
|
case 'xlarge':
|
|
2144
|
-
return "margin: 0 ".concat(space$
|
|
2156
|
+
return "margin: 0 ".concat(space$g[1200], ";");
|
|
2145
2157
|
case 'large':
|
|
2146
2158
|
default:
|
|
2147
|
-
return "margin: 0 ".concat(space$
|
|
2159
|
+
return "margin: 0 ".concat(space$g[800], ";");
|
|
2148
2160
|
}
|
|
2149
2161
|
}
|
|
2150
2162
|
// Horizontal orientation uses vertical margins (top/bottom)
|
|
2151
2163
|
switch ($size) {
|
|
2152
2164
|
case 'small':
|
|
2153
|
-
return "margin: ".concat(space$
|
|
2165
|
+
return "margin: ".concat(space$g[400], " 0;");
|
|
2154
2166
|
case 'medium':
|
|
2155
|
-
return "margin: ".concat(space$
|
|
2167
|
+
return "margin: ".concat(space$g[600], " 0;");
|
|
2156
2168
|
case 'xlarge':
|
|
2157
|
-
return "margin: ".concat(space$
|
|
2169
|
+
return "margin: ".concat(space$g[1200], " 0;");
|
|
2158
2170
|
case 'large':
|
|
2159
2171
|
default:
|
|
2160
|
-
return "margin: ".concat(space$
|
|
2172
|
+
return "margin: ".concat(space$g[800], " 0;");
|
|
2161
2173
|
}
|
|
2162
2174
|
});
|
|
2163
2175
|
/**
|
|
@@ -2195,7 +2207,7 @@ var Divider = function Divider(_a) {
|
|
|
2195
2207
|
"aria-orientation": orientation
|
|
2196
2208
|
});
|
|
2197
2209
|
};
|
|
2198
|
-
var templateObject_1$
|
|
2210
|
+
var templateObject_1$F;
|
|
2199
2211
|
|
|
2200
2212
|
var StyledStack = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
2201
2213
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2203,7 +2215,7 @@ var StyledStack = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2203
2215
|
},
|
|
2204
2216
|
displayName: "Stack__StyledStack",
|
|
2205
2217
|
componentId: "sc-1ehkxgy-0"
|
|
2206
|
-
})(templateObject_1$
|
|
2218
|
+
})(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"], ["\n display: flex;\n flex-direction: var(--stack-direction);\n align-items: var(--stack-align-items);\n justify-content: var(--stack-justify-content);\n gap: var(--stack-gap);\n flex-wrap: var(--stack-wrap);\n"
|
|
2207
2219
|
// Each gap name maps to the space step that replaced its old spacing.layout token (decision 0031),
|
|
2208
2220
|
// so every gap keeps its value
|
|
2209
2221
|
])));
|
|
@@ -2257,7 +2269,7 @@ var Stack = function Stack(_a) {
|
|
|
2257
2269
|
children: children
|
|
2258
2270
|
});
|
|
2259
2271
|
};
|
|
2260
|
-
var templateObject_1$
|
|
2272
|
+
var templateObject_1$E;
|
|
2261
2273
|
|
|
2262
2274
|
// Shape indicators for the six coloured statuses (decision 0045): filled silhouettes on the
|
|
2263
2275
|
// 24px grid, each the same outline as its status icon. Internal: they aren't public icons, so a
|
|
@@ -2278,7 +2290,7 @@ var statusShapes = {
|
|
|
2278
2290
|
var Mark = /*#__PURE__*/styled__default.default.svg.withConfig({
|
|
2279
2291
|
displayName: "StatusShape__Mark",
|
|
2280
2292
|
componentId: "sc-1yzi9jt-0"
|
|
2281
|
-
})(templateObject_1$
|
|
2293
|
+
})(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n flex: none;\n width: ", ";\n height: ", ";\n fill: currentColor;\n"], ["\n flex: none;\n width: ", ";\n height: ", ";\n fill: currentColor;\n"])), tokens.semantic.size.icon.xs, tokens.semantic.size.icon.xs);
|
|
2282
2294
|
var StatusShape = function StatusShape(_a) {
|
|
2283
2295
|
var shape = _a.shape;
|
|
2284
2296
|
return jsxRuntime.jsx(Mark, {
|
|
@@ -2291,20 +2303,20 @@ var StatusShape = function StatusShape(_a) {
|
|
|
2291
2303
|
})
|
|
2292
2304
|
});
|
|
2293
2305
|
};
|
|
2294
|
-
var templateObject_1$
|
|
2306
|
+
var templateObject_1$D;
|
|
2295
2307
|
|
|
2296
2308
|
// Destructure tokens for cleaner access
|
|
2297
2309
|
var statusColors = tokens.component.status;
|
|
2298
2310
|
var _a$5 = tokens.semantic,
|
|
2299
|
-
space$
|
|
2300
|
-
radius$
|
|
2311
|
+
space$f = _a$5.space,
|
|
2312
|
+
radius$3 = _a$5.radius;
|
|
2301
2313
|
var _b$1 = tokens.semantic.motion,
|
|
2302
2314
|
transition = _b$1.transition,
|
|
2303
2315
|
duration$3 = _b$1.duration,
|
|
2304
2316
|
easing$3 = _b$1.easing;
|
|
2305
2317
|
var labelHeight = tokens.semantic.size.label;
|
|
2306
2318
|
var label$1 = tokens.component.badge.label;
|
|
2307
|
-
var scaleIn$1 = styled.keyframes(templateObject_1$
|
|
2319
|
+
var scaleIn$1 = styled.keyframes(templateObject_1$C || (templateObject_1$C = __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"])));
|
|
2308
2320
|
var getStatusConfig = function getStatusConfig(status) {
|
|
2309
2321
|
// Each status's icon and, for the coloured statuses, its shape indicator (decision 0045). The
|
|
2310
2322
|
// neutral statuses have no shape: at the small size they're plain text.
|
|
@@ -2355,16 +2367,16 @@ var getStatusConfig = function getStatusConfig(status) {
|
|
|
2355
2367
|
var sizeConfig$2 = {
|
|
2356
2368
|
small: {
|
|
2357
2369
|
height: labelHeight.small,
|
|
2358
|
-
padding: "".concat(space$
|
|
2370
|
+
padding: "".concat(space$f[100], " ").concat(space$f[200]),
|
|
2359
2371
|
font: label$1.typography.small,
|
|
2360
|
-
gap: space$
|
|
2372
|
+
gap: space$f[100],
|
|
2361
2373
|
iconSize: 'xs'
|
|
2362
2374
|
},
|
|
2363
2375
|
medium: {
|
|
2364
2376
|
height: labelHeight.medium,
|
|
2365
|
-
padding: "".concat(space$
|
|
2377
|
+
padding: "".concat(space$f[100], " ").concat(space$f[200]),
|
|
2366
2378
|
font: label$1.typography.medium,
|
|
2367
|
-
gap: space$
|
|
2379
|
+
gap: space$f[100],
|
|
2368
2380
|
iconSize: 'sm'
|
|
2369
2381
|
}
|
|
2370
2382
|
};
|
|
@@ -2374,7 +2386,7 @@ var StyledStatusLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
2374
2386
|
},
|
|
2375
2387
|
displayName: "StatusLabelBase__StyledStatusLabel",
|
|
2376
2388
|
componentId: "sc-1ye9xz5-0"
|
|
2377
|
-
})(templateObject_2$
|
|
2389
|
+
})(templateObject_2$x || (templateObject_2$x = __makeTemplateObject(["\n box-sizing: border-box; /* the height includes padding, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n white-space: nowrap;\n user-select: none;\n animation: ", " ", " ", ";\n transition: ", ";\n\n /* Under reduced motion the label appears without scaling in, and colours change at once */\n ", " {\n animation: none;\n transition: none;\n }\n\n /* Forced colours drop the fill, so the label keeps its shape with an edge (decision 0038) */\n ", "\n \n /* Size styles */\n ", "\n \n /* Status color styles */\n ", "\n"], ["\n box-sizing: border-box; /* the height includes padding, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n white-space: nowrap;\n user-select: none;\n animation: ", " ", " ", ";\n transition: ", ";\n\n /* Under reduced motion the label appears without scaling in, and colours change at once */\n ", " {\n animation: none;\n transition: none;\n }\n\n /* Forced colours drop the fill, so the label keeps its shape with an edge (decision 0038) */\n ", "\n \n /* Size styles */\n ", "\n \n /* Status color styles */\n ", "\n"])), radius$3.full, scaleIn$1, duration$3.moderate, easing$3.decelerate, transition.feedback, reducedMotion, forcedColorsEdge, function (_a) {
|
|
2378
2390
|
var $size = _a.$size;
|
|
2379
2391
|
var size = sizeConfig$2[$size];
|
|
2380
2392
|
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 ");
|
|
@@ -2444,7 +2456,7 @@ var StatusLabelBase = function StatusLabelBase(_a) {
|
|
|
2444
2456
|
})]
|
|
2445
2457
|
});
|
|
2446
2458
|
};
|
|
2447
|
-
var templateObject_1$
|
|
2459
|
+
var templateObject_1$C, templateObject_2$x, templateObject_3$u, templateObject_4$p;
|
|
2448
2460
|
|
|
2449
2461
|
/**
|
|
2450
2462
|
* StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
|
|
@@ -2467,30 +2479,30 @@ var StatusLabel = function StatusLabel(props) {
|
|
|
2467
2479
|
};
|
|
2468
2480
|
StatusLabel.displayName = 'StatusLabel';
|
|
2469
2481
|
|
|
2470
|
-
var semantic$
|
|
2471
|
-
var color$a = semantic$
|
|
2472
|
-
size$
|
|
2482
|
+
var semantic$l = tokens.semantic;
|
|
2483
|
+
var color$a = semantic$l.color,
|
|
2484
|
+
size$8 = semantic$l.size;
|
|
2473
2485
|
var label = tokens.component.badge.label;
|
|
2474
|
-
var space$
|
|
2475
|
-
var radius$
|
|
2486
|
+
var space$e = semantic$l.space;
|
|
2487
|
+
var radius$2 = semantic$l.radius;
|
|
2476
2488
|
var StyledTag = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
2477
2489
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
2478
2490
|
return !prop.startsWith('$');
|
|
2479
2491
|
},
|
|
2480
2492
|
displayName: "Tag__StyledTag",
|
|
2481
2493
|
componentId: "sc-lzfmti-0"
|
|
2482
|
-
})(templateObject_1$
|
|
2494
|
+
})(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n\n /* Size (decision 0018): small has no vertical padding so the text line fits inside 20px */\n height: ", ";\n padding: ", ";\n font: ", ";\n font-weight: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"], ["\n box-sizing: border-box; /* the height includes padding and border, without relying on a global reset */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: ", ";\n user-select: none;\n white-space: nowrap;\n\n /* Size (decision 0018): small has no vertical padding so the text line fits inside 20px */\n height: ", ";\n padding: ", ";\n font: ", ";\n font-weight: ", ";\n \n /* Variant styles */\n background-color: ", ";\n \n color: ", ";\n \n border: ", ";\n"
|
|
2483
2495
|
/**
|
|
2484
2496
|
* Tag component for categorizing and labeling content
|
|
2485
2497
|
*
|
|
2486
2498
|
* A static, non-interactive label used to categorize elements or objects in the UI.
|
|
2487
2499
|
* Tags help users quickly identify and understand content classification.
|
|
2488
|
-
*/])), radius$
|
|
2500
|
+
*/])), radius$2.sm, function (_a) {
|
|
2489
2501
|
var $size = _a.$size;
|
|
2490
|
-
return size$
|
|
2502
|
+
return size$8.label[$size];
|
|
2491
2503
|
}, function (_a) {
|
|
2492
2504
|
var $size = _a.$size;
|
|
2493
|
-
return $size === 'small' ? "0 ".concat(space$
|
|
2505
|
+
return $size === 'small' ? "0 ".concat(space$e[200]) : "".concat(space$e[100], " ").concat(space$e[200]);
|
|
2494
2506
|
}, label.typography.small, label.fontWeight, function (_a) {
|
|
2495
2507
|
var $variant = _a.$variant;
|
|
2496
2508
|
switch ($variant) {
|
|
@@ -2513,9 +2525,9 @@ var StyledTag = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
2513
2525
|
if (!$border) return 'none';
|
|
2514
2526
|
switch ($variant) {
|
|
2515
2527
|
case 'emphasis':
|
|
2516
|
-
return "".concat(semantic$
|
|
2528
|
+
return "".concat(semantic$l.border.width.thin, " solid ").concat(color$a.fill.emphasis);
|
|
2517
2529
|
default:
|
|
2518
|
-
return "".concat(semantic$
|
|
2530
|
+
return "".concat(semantic$l.border.width.thin, " solid ").concat(color$a.border["default"]);
|
|
2519
2531
|
}
|
|
2520
2532
|
});
|
|
2521
2533
|
/**
|
|
@@ -2547,7 +2559,7 @@ var Tag = function Tag(_a) {
|
|
|
2547
2559
|
children: children
|
|
2548
2560
|
}));
|
|
2549
2561
|
};
|
|
2550
|
-
var templateObject_1$
|
|
2562
|
+
var templateObject_1$B;
|
|
2551
2563
|
|
|
2552
2564
|
// How long an exiting element stays mounted: the duration of `exitAnimation` in styleUtils. A timer
|
|
2553
2565
|
// needs the resolved value, not the CSS variable (decision 0041).
|
|
@@ -2683,6 +2695,8 @@ var useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React.useLayou
|
|
|
2683
2695
|
var supportsPopover = function supportsPopover() {
|
|
2684
2696
|
return typeof HTMLElement !== 'undefined' && 'showPopover' in HTMLElement.prototype;
|
|
2685
2697
|
};
|
|
2698
|
+
/** The trigger's width in px, set on the floating element when `matchAnchorWidth` is on */
|
|
2699
|
+
var ANCHOR_WIDTH_VAR = '--co-floating-anchor-width';
|
|
2686
2700
|
var remToPx = function remToPx(value) {
|
|
2687
2701
|
return parseFloat(value) * (parseFloat(getComputedStyle(document.documentElement).fontSize) || 16);
|
|
2688
2702
|
};
|
|
@@ -2697,6 +2711,8 @@ function useFloatingLayer(_a) {
|
|
|
2697
2711
|
anchorRef = _a.anchorRef,
|
|
2698
2712
|
side = _a.side,
|
|
2699
2713
|
align = _a.align,
|
|
2714
|
+
_b = _a.matchAnchorWidth,
|
|
2715
|
+
matchAnchorWidth = _b === void 0 ? false : _b,
|
|
2700
2716
|
onDetach = _a.onDetach;
|
|
2701
2717
|
useIsomorphicLayoutEffect$1(function () {
|
|
2702
2718
|
var floating = floatingRef.current;
|
|
@@ -2709,6 +2725,8 @@ function useFloatingLayer(_a) {
|
|
|
2709
2725
|
var trigger = laidOutElement(anchorRef.current);
|
|
2710
2726
|
if (!trigger) return;
|
|
2711
2727
|
var anchor = trigger.getBoundingClientRect();
|
|
2728
|
+
// Before measuring, since it can widen the floating element
|
|
2729
|
+
if (matchAnchorWidth) floating.style.setProperty(ANCHOR_WIDTH_VAR, "".concat(anchor.width, "px"));else floating.style.removeProperty(ANCHOR_WIDTH_VAR);
|
|
2712
2730
|
var _a = floating.getBoundingClientRect(),
|
|
2713
2731
|
width = _a.width,
|
|
2714
2732
|
height = _a.height;
|
|
@@ -2735,10 +2753,13 @@ function useFloatingLayer(_a) {
|
|
|
2735
2753
|
if (typeof ResizeObserver === 'undefined') return;
|
|
2736
2754
|
var observer = new ResizeObserver(place);
|
|
2737
2755
|
observer.observe(floating);
|
|
2756
|
+
// Its width follows the trigger's, so a trigger that resizes while it's open places it again
|
|
2757
|
+
var trigger = matchAnchorWidth ? laidOutElement(anchorRef.current) : null;
|
|
2758
|
+
if (trigger) observer.observe(trigger);
|
|
2738
2759
|
return function () {
|
|
2739
2760
|
return observer.disconnect();
|
|
2740
2761
|
};
|
|
2741
|
-
}, [isPresent, side, align, floatingRef, anchorRef]);
|
|
2762
|
+
}, [isPresent, side, align, matchAnchorWidth, floatingRef, anchorRef]);
|
|
2742
2763
|
React.useEffect(function () {
|
|
2743
2764
|
if (!isPresent) return;
|
|
2744
2765
|
var onScroll = function onScroll(event) {
|
|
@@ -2769,19 +2790,19 @@ function isKeyboardFocus(target) {
|
|
|
2769
2790
|
}
|
|
2770
2791
|
}
|
|
2771
2792
|
|
|
2772
|
-
var semantic$
|
|
2773
|
-
var motion$
|
|
2793
|
+
var semantic$k = tokens.semantic;
|
|
2794
|
+
var motion$a = data.tokensJson.semantic.motion;
|
|
2774
2795
|
// How long the pointer rests before the tooltip opens (#326)
|
|
2775
|
-
var HINT_DELAY_MS = parseInt(motion$
|
|
2796
|
+
var HINT_DELAY_MS = parseInt(motion$a.delay.hint, 10);
|
|
2776
2797
|
// Moving to another trigger within this window opens its tooltip at once, so a rail feels immediate
|
|
2777
|
-
var SKIP_DELAY_MS = parseInt(motion$
|
|
2798
|
+
var SKIP_DELAY_MS = parseInt(motion$a.duration.slow, 10);
|
|
2778
2799
|
// The grace period for the pointer to cross from the trigger onto the tooltip (WCAG 1.4.13)
|
|
2779
|
-
var CLOSE_GRACE_MS = parseInt(motion$
|
|
2800
|
+
var CLOSE_GRACE_MS = parseInt(motion$a.duration.fast, 10);
|
|
2780
2801
|
// Shared by every Tooltip: only one is open at a time, and the next one opens at once while one
|
|
2781
2802
|
// is open or within the skip-delay window after it closed
|
|
2782
2803
|
var lastClosedAt = 0;
|
|
2783
2804
|
var active = null;
|
|
2784
|
-
var fadeIn$3 = styled.keyframes(templateObject_1$
|
|
2805
|
+
var fadeIn$3 = styled.keyframes(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n from { opacity: 0; }\n"], ["\n from { opacity: 0; }\n"
|
|
2785
2806
|
// A fade, so it needs no reduced-motion fallback (0015). Entrances decelerate (0037).
|
|
2786
2807
|
])));
|
|
2787
2808
|
// A fade, so it needs no reduced-motion fallback (0015). Entrances decelerate (0037).
|
|
@@ -2791,9 +2812,9 @@ var Bubble = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2791
2812
|
},
|
|
2792
2813
|
displayName: "Tooltip__Bubble",
|
|
2793
2814
|
componentId: "sc-ajez94-0"
|
|
2794
|
-
})(templateObject_3$t || (templateObject_3$t = __makeTemplateObject(["\n /* Reset the popover defaults: it's placed with top and left */\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n overflow: visible;\n box-sizing: border-box;\n max-width: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n overflow-wrap: break-word;\n pointer-events: auto;\n animation: ", " ", " ", "\n ", ";\n\n ", "\n"], ["\n /* Reset the popover defaults: it's placed with top and left */\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n overflow: visible;\n box-sizing: border-box;\n max-width: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n overflow-wrap: break-word;\n pointer-events: auto;\n animation: ", " ", " ", "\n ", ";\n\n ", "\n"])), semantic$
|
|
2815
|
+
})(templateObject_3$t || (templateObject_3$t = __makeTemplateObject(["\n /* Reset the popover defaults: it's placed with top and left */\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n overflow: visible;\n box-sizing: border-box;\n max-width: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n overflow-wrap: break-word;\n pointer-events: auto;\n animation: ", " ", " ", "\n ", ";\n\n ", "\n"], ["\n /* Reset the popover defaults: it's placed with top and left */\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n overflow: visible;\n box-sizing: border-box;\n max-width: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n font: ", ";\n overflow-wrap: break-word;\n pointer-events: auto;\n animation: ", " ", " ", "\n ", ";\n\n ", "\n"])), semantic$k.size[7500], semantic$k.space.inset.xs, semantic$k.space.inset.sm, semantic$k.radius.sm, semantic$k.color.fill.inverse, semantic$k.color.text.inverse, semantic$k.typography.small, fadeIn$3, semantic$k.motion.duration.fast, semantic$k.motion.easing.decelerate, function (_a) {
|
|
2795
2816
|
var $exiting = _a.$exiting;
|
|
2796
|
-
return $exiting ? exitAnimation : styled.css(templateObject_2$
|
|
2817
|
+
return $exiting ? exitAnimation : styled.css(templateObject_2$w || (templateObject_2$w = __makeTemplateObject([""], [""])));
|
|
2797
2818
|
}, forcedColorsEdge);
|
|
2798
2819
|
var Description$1 = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
2799
2820
|
displayName: "Tooltip__Description",
|
|
@@ -2828,6 +2849,8 @@ var Tooltip = function Tooltip(_a) {
|
|
|
2828
2849
|
side = _c === void 0 ? 'top' : _c,
|
|
2829
2850
|
_d = _a.align,
|
|
2830
2851
|
align = _d === void 0 ? 'center' : _d,
|
|
2852
|
+
_e = _a.disabled,
|
|
2853
|
+
disabled = _e === void 0 ? false : _e,
|
|
2831
2854
|
children = _a.children,
|
|
2832
2855
|
dataTestId = _a["data-testid"];
|
|
2833
2856
|
var descriptionId = React.useId();
|
|
@@ -2840,12 +2863,20 @@ var Tooltip = function Tooltip(_a) {
|
|
|
2840
2863
|
})[0];
|
|
2841
2864
|
// Set by a press, so the focus that follows a click or tap doesn't reopen the tooltip
|
|
2842
2865
|
var pressed = React.useRef(false);
|
|
2843
|
-
var
|
|
2844
|
-
isOpen =
|
|
2845
|
-
setIsOpen =
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2866
|
+
var _f = React.useState(false),
|
|
2867
|
+
isOpen = _f[0],
|
|
2868
|
+
setIsOpen = _f[1];
|
|
2869
|
+
// Turned off while showing (its label became visible): close it on the same render
|
|
2870
|
+
var _g = React.useState(disabled),
|
|
2871
|
+
wasDisabled = _g[0],
|
|
2872
|
+
setWasDisabled = _g[1];
|
|
2873
|
+
if (wasDisabled !== disabled) {
|
|
2874
|
+
setWasDisabled(disabled);
|
|
2875
|
+
if (disabled) setIsOpen(false);
|
|
2876
|
+
}
|
|
2877
|
+
var _h = usePresence(isOpen),
|
|
2878
|
+
isPresent = _h.isPresent,
|
|
2879
|
+
isExiting = _h.isExiting;
|
|
2849
2880
|
var clearTimers = function clearTimers() {
|
|
2850
2881
|
clearTimeout(openTimer.current);
|
|
2851
2882
|
clearTimeout(closeTimer.current);
|
|
@@ -2869,7 +2900,7 @@ var Tooltip = function Tooltip(_a) {
|
|
|
2869
2900
|
}, [owner, close]);
|
|
2870
2901
|
var scheduleOpen = function scheduleOpen() {
|
|
2871
2902
|
clearTimeout(closeTimer.current);
|
|
2872
|
-
if (isOpen) return;
|
|
2903
|
+
if (isOpen || disabled) return;
|
|
2873
2904
|
// Moving straight from one trigger to the next (another tooltip still open) or just after one
|
|
2874
2905
|
// closed skips the delay, so a rail feels immediate
|
|
2875
2906
|
if (active || Date.now() - lastClosedAt < SKIP_DELAY_MS) return open();
|
|
@@ -2926,7 +2957,7 @@ var Tooltip = function Tooltip(_a) {
|
|
|
2926
2957
|
pressed.current = false;
|
|
2927
2958
|
return;
|
|
2928
2959
|
}
|
|
2929
|
-
if (isKeyboardFocus(event.target)) open();
|
|
2960
|
+
if (!disabled && isKeyboardFocus(event.target)) open();
|
|
2930
2961
|
},
|
|
2931
2962
|
onBlur: function onBlur() {
|
|
2932
2963
|
// A press on an already focused trigger has no focus to skip; don't carry it over
|
|
@@ -2956,12 +2987,12 @@ var Tooltip = function Tooltip(_a) {
|
|
|
2956
2987
|
});
|
|
2957
2988
|
};
|
|
2958
2989
|
Tooltip.displayName = 'Tooltip';
|
|
2959
|
-
var templateObject_1$
|
|
2990
|
+
var templateObject_1$A, templateObject_2$w, templateObject_3$t, templateObject_4$o, templateObject_5$k;
|
|
2960
2991
|
|
|
2961
|
-
var semantic$
|
|
2962
|
-
var color$9 = semantic$
|
|
2963
|
-
typography$5 = semantic$
|
|
2964
|
-
size$
|
|
2992
|
+
var semantic$j = tokens.semantic;
|
|
2993
|
+
var color$9 = semantic$j.color,
|
|
2994
|
+
typography$5 = semantic$j.typography,
|
|
2995
|
+
size$7 = semantic$j.size;
|
|
2965
2996
|
var labels = {
|
|
2966
2997
|
suggested: 'Suggested',
|
|
2967
2998
|
removal: 'Will be removed'
|
|
@@ -2969,12 +3000,12 @@ var labels = {
|
|
|
2969
3000
|
var sizeConfig$1 = {
|
|
2970
3001
|
small: {
|
|
2971
3002
|
font: typography$5.caption,
|
|
2972
|
-
gap: semantic$
|
|
3003
|
+
gap: semantic$j.space[100],
|
|
2973
3004
|
icon: 'xs'
|
|
2974
3005
|
},
|
|
2975
3006
|
medium: {
|
|
2976
3007
|
font: typography$5.small,
|
|
2977
|
-
gap: semantic$
|
|
3008
|
+
gap: semantic$j.space[200],
|
|
2978
3009
|
icon: 'sm'
|
|
2979
3010
|
}
|
|
2980
3011
|
};
|
|
@@ -2984,9 +3015,9 @@ var StyledAILabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
2984
3015
|
},
|
|
2985
3016
|
displayName: "AILabel__StyledAILabel",
|
|
2986
3017
|
componentId: "sc-qknkn-0"
|
|
2987
|
-
})(templateObject_1$
|
|
3018
|
+
})(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n white-space: nowrap;\n"], ["\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n white-space: nowrap;\n"])), function (_a) {
|
|
2988
3019
|
var $size = _a.$size;
|
|
2989
|
-
return size$
|
|
3020
|
+
return size$7.label[$size];
|
|
2990
3021
|
}, function (_a) {
|
|
2991
3022
|
var $size = _a.$size;
|
|
2992
3023
|
return sizeConfig$1[$size].gap;
|
|
@@ -2997,7 +3028,7 @@ var StyledAILabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
2997
3028
|
var StyledIcon = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
2998
3029
|
displayName: "AILabel__StyledIcon",
|
|
2999
3030
|
componentId: "sc-qknkn-1"
|
|
3000
|
-
})(templateObject_2$
|
|
3031
|
+
})(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n display: inline-flex;\n color: ", ";\n"], ["\n display: inline-flex;\n color: ", ";\n"
|
|
3001
3032
|
/**
|
|
3002
3033
|
* AILabel marks content an agent has proposed but the user hasn't accepted (decision 0046): the AI
|
|
3003
3034
|
* icon and a fixed label in the AI colour, never colour alone (decision 0043). It isn't a status
|
|
@@ -3040,26 +3071,26 @@ var AILabel = function AILabel(_a) {
|
|
|
3040
3071
|
});
|
|
3041
3072
|
};
|
|
3042
3073
|
AILabel.displayName = 'AILabel';
|
|
3043
|
-
var templateObject_1$
|
|
3074
|
+
var templateObject_1$z, templateObject_2$v;
|
|
3044
3075
|
|
|
3045
3076
|
// Destructure tokens for cleaner access
|
|
3046
|
-
var semantic$
|
|
3047
|
-
var space$
|
|
3077
|
+
var semantic$i = tokens.semantic;
|
|
3078
|
+
var space$d = semantic$i.space;
|
|
3048
3079
|
var StyledBalanceSection = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3049
3080
|
displayName: "AccountCard__StyledBalanceSection",
|
|
3050
3081
|
componentId: "sc-1erp7zn-0"
|
|
3051
|
-
})(templateObject_1$
|
|
3082
|
+
})(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), space$d[400]);
|
|
3052
3083
|
var StyledTrendSection = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3053
3084
|
displayName: "AccountCard__StyledTrendSection",
|
|
3054
3085
|
componentId: "sc-1erp7zn-1"
|
|
3055
|
-
})(templateObject_2$
|
|
3086
|
+
})(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n color: ", ";\n font: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n color: ", ";\n font: ", ";\n"])), space$d[100], function (_a) {
|
|
3056
3087
|
var $color = _a.$color;
|
|
3057
3088
|
return $color;
|
|
3058
|
-
}, semantic$
|
|
3089
|
+
}, semantic$i.typography.small);
|
|
3059
3090
|
/*#__PURE__*/styled__default.default.div.withConfig({
|
|
3060
3091
|
displayName: "AccountCard__StyledActions",
|
|
3061
3092
|
componentId: "sc-1erp7zn-2"
|
|
3062
|
-
})(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n display: flex;\n gap: ", ";\n margin-top: auto;\n"], ["\n display: flex;\n gap: ", ";\n margin-top: auto;\n"])), space$
|
|
3093
|
+
})(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n display: flex;\n gap: ", ";\n margin-top: auto;\n"], ["\n display: flex;\n gap: ", ";\n margin-top: auto;\n"])), space$d[200]);
|
|
3063
3094
|
var StyledStackWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3064
3095
|
displayName: "AccountCard__StyledStackWrapper",
|
|
3065
3096
|
componentId: "sc-1erp7zn-3"
|
|
@@ -3069,7 +3100,7 @@ var StyledHeaderWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3069
3100
|
componentId: "sc-1erp7zn-4"
|
|
3070
3101
|
})(templateObject_5$j || (templateObject_5$j = __makeTemplateObject(["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: calc(-1 * ", ");\n }\n"], ["\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: ", ";\n\n & > span {\n margin-top: calc(-1 * ", ");\n }\n"
|
|
3071
3102
|
// Map trend direction to icon and color
|
|
3072
|
-
])), tokens.component.accountCard.header.minHeight, space$
|
|
3103
|
+
])), tokens.component.accountCard.header.minHeight, space$d[0], space$d[100]);
|
|
3073
3104
|
// Map trend direction to icon and color
|
|
3074
3105
|
var trendToIcon = {
|
|
3075
3106
|
up: 'arrowUp',
|
|
@@ -3079,9 +3110,9 @@ var trendToIcon = {
|
|
|
3079
3110
|
// A trend is a differential indicator (decision 0045): the arrow and the signed value carry the
|
|
3080
3111
|
// direction, and the role colour repeats it. Category colours carry no meaning, so they aren't used.
|
|
3081
3112
|
var trendToColor = {
|
|
3082
|
-
up: semantic$
|
|
3083
|
-
down: semantic$
|
|
3084
|
-
neutral: semantic$
|
|
3113
|
+
up: semantic$i.color.text.success,
|
|
3114
|
+
down: semantic$i.color.text.danger,
|
|
3115
|
+
neutral: semantic$i.color.text.muted
|
|
3085
3116
|
};
|
|
3086
3117
|
/**
|
|
3087
3118
|
* AccountCard component
|
|
@@ -3125,7 +3156,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
3125
3156
|
bg: "surface.raised",
|
|
3126
3157
|
border: "default",
|
|
3127
3158
|
borderRadius: "xl",
|
|
3128
|
-
transition: "box-shadow ".concat(semantic$
|
|
3159
|
+
transition: "box-shadow ".concat(semantic$i.motion.duration.moderate, " ").concat(semantic$i.motion.easing.decelerate),
|
|
3129
3160
|
cursor: isClickable ? 'pointer' : 'default',
|
|
3130
3161
|
hoverShadow: isClickable ? 'floating' : undefined,
|
|
3131
3162
|
onClick: handleClick,
|
|
@@ -3223,7 +3254,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
3223
3254
|
})
|
|
3224
3255
|
});
|
|
3225
3256
|
};
|
|
3226
|
-
var templateObject_1$
|
|
3257
|
+
var templateObject_1$y, templateObject_2$u, templateObject_3$s, templateObject_4$n, templateObject_5$j;
|
|
3227
3258
|
|
|
3228
3259
|
/**
|
|
3229
3260
|
* The spacing a List gives its items (#77). A ListItem without its own `spacing` uses it; outside
|
|
@@ -3231,8 +3262,8 @@ var templateObject_1$x, templateObject_2$t, templateObject_3$s, templateObject_4
|
|
|
3231
3262
|
*/
|
|
3232
3263
|
var ListSpacingContext = /*#__PURE__*/React.createContext('comfortable');
|
|
3233
3264
|
|
|
3234
|
-
var semantic$
|
|
3235
|
-
var _a$4 = semantic$
|
|
3265
|
+
var semantic$h = tokens.semantic;
|
|
3266
|
+
var _a$4 = semantic$h.motion,
|
|
3236
3267
|
duration$2 = _a$4.duration,
|
|
3237
3268
|
easing$2 = _a$4.easing;
|
|
3238
3269
|
var StyledListItem = /*#__PURE__*/styled__default.default.li.withConfig({
|
|
@@ -3241,16 +3272,16 @@ var StyledListItem = /*#__PURE__*/styled__default.default.li.withConfig({
|
|
|
3241
3272
|
},
|
|
3242
3273
|
displayName: "ListItem__StyledListItem",
|
|
3243
3274
|
componentId: "sc-1wzzt21-0"
|
|
3244
|
-
})(templateObject_1$
|
|
3275
|
+
})(templateObject_1$x || (templateObject_1$x = __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$h.size.row.md, function (_a) {
|
|
3245
3276
|
var $interactive = _a.$interactive;
|
|
3246
3277
|
return $interactive && 'user-select: none;';
|
|
3247
3278
|
}, function (_a) {
|
|
3248
3279
|
var $disabled = _a.$disabled;
|
|
3249
|
-
return $disabled && "\n opacity: ".concat(semantic$
|
|
3280
|
+
return $disabled && "\n opacity: ".concat(semantic$h.opacity.disabled, ";\n cursor: not-allowed;\n pointer-events: none;\n ");
|
|
3250
3281
|
}, function (_a) {
|
|
3251
3282
|
var $destructive = _a.$destructive,
|
|
3252
3283
|
$disabled = _a.$disabled;
|
|
3253
|
-
return $destructive && !$disabled && "\n color: ".concat(semantic$
|
|
3284
|
+
return $destructive && !$disabled && "\n color: ".concat(semantic$h.color.text.danger, ";\n ");
|
|
3254
3285
|
});
|
|
3255
3286
|
var StyledItemContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3256
3287
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -3258,10 +3289,10 @@ var StyledItemContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3258
3289
|
},
|
|
3259
3290
|
displayName: "ListItem__StyledItemContent",
|
|
3260
3291
|
componentId: "sc-1wzzt21-1"
|
|
3261
|
-
})(templateObject_2$
|
|
3292
|
+
})(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n /* Insets, so the row's padding follows density with its height (decision 0051) */\n padding: ", ";\n border-radius: ", ";\n transition: background-color ", " ", ", color ", " ", ";\n cursor: ", ";\n \n /* The shared row states (decision 0030). Only interactive, enabled rows respond to hover and\n press; the primary text is Typography, so the row colours it through a selector */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n display: flex;\n align-items: flex-start;\n gap: ", ";\n /* Insets, so the row's padding follows density with its height (decision 0051) */\n padding: ", ";\n border-radius: ", ";\n transition: background-color ", " ", ", color ", " ", ";\n cursor: ", ";\n \n /* The shared row states (decision 0030). Only interactive, enabled rows respond to hover and\n press; the primary text is Typography, so the row colours it through a selector */\n ", "\n \n /* Focus visible */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), semantic$h.space[300], function (_a) {
|
|
3262
3293
|
var $spacing = _a.$spacing;
|
|
3263
|
-
return $spacing === 'compact' ? "".concat(semantic$
|
|
3264
|
-
},
|
|
3294
|
+
return $spacing === 'compact' ? "".concat(semantic$h.space.inset.sm, " ").concat(semantic$h.space.inset.md) : "".concat(semantic$h.space.inset.md, " ").concat(semantic$h.space.inset.lg);
|
|
3295
|
+
}, rowRadius, duration$2.fast, easing$2.decelerate, duration$2.fast, easing$2.decelerate, function (_a) {
|
|
3265
3296
|
var $interactive = _a.$interactive,
|
|
3266
3297
|
$disabled = _a.$disabled;
|
|
3267
3298
|
if ($disabled) return 'not-allowed';
|
|
@@ -3276,26 +3307,26 @@ var StyledItemContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3276
3307
|
disabled: $disabled || !$interactive,
|
|
3277
3308
|
textSelector: "".concat(StyledTextContent, " > :first-child")
|
|
3278
3309
|
});
|
|
3279
|
-
}, semantic$
|
|
3310
|
+
}, semantic$h.border.focus, semantic$h.border.focusOffset);
|
|
3280
3311
|
var StyledIconContainer$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3281
3312
|
displayName: "ListItem__StyledIconContainer",
|
|
3282
3313
|
componentId: "sc-1wzzt21-2"
|
|
3283
|
-
})(templateObject_3$r || (templateObject_3$r = __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$
|
|
3314
|
+
})(templateObject_3$r || (templateObject_3$r = __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$h.size.icon.lg, semantic$h.size.icon.lg);
|
|
3284
3315
|
var StyledTextContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3285
3316
|
displayName: "ListItem__StyledTextContent",
|
|
3286
3317
|
componentId: "sc-1wzzt21-3"
|
|
3287
|
-
})(templateObject_4$m || (templateObject_4$m = __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$
|
|
3318
|
+
})(templateObject_4$m || (templateObject_4$m = __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$h.space[100]);
|
|
3288
3319
|
var StyledRightContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3289
3320
|
displayName: "ListItem__StyledRightContent",
|
|
3290
3321
|
componentId: "sc-1wzzt21-4"
|
|
3291
|
-
})(templateObject_5$i || (templateObject_5$i = __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$
|
|
3322
|
+
})(templateObject_5$i || (templateObject_5$i = __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$h.space[200]);
|
|
3292
3323
|
var StyledChevronIcon = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3293
3324
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3294
3325
|
return !prop.startsWith('$');
|
|
3295
3326
|
},
|
|
3296
3327
|
displayName: "ListItem__StyledChevronIcon",
|
|
3297
3328
|
componentId: "sc-1wzzt21-5"
|
|
3298
|
-
})(templateObject_6$f || (templateObject_6$f = __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$
|
|
3329
|
+
})(templateObject_6$f || (templateObject_6$f = __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$h.size.icon.lg, semantic$h.size.icon.lg, semantic$h.color.icon.muted, duration$2.fast, easing$2.decelerate, function (_a) {
|
|
3299
3330
|
var $expanded = _a.$expanded;
|
|
3300
3331
|
return $expanded ? '180deg' : '0deg';
|
|
3301
3332
|
}, reducedMotion);
|
|
@@ -3305,7 +3336,7 @@ var StyledExpandedContent = /*#__PURE__*/styled__default.default.div.withConfig(
|
|
|
3305
3336
|
},
|
|
3306
3337
|
displayName: "ListItem__StyledExpandedContent",
|
|
3307
3338
|
componentId: "sc-1wzzt21-6"
|
|
3308
|
-
})(templateObject_7$
|
|
3339
|
+
})(templateObject_7$d || (templateObject_7$d = __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 margin ", " ", ",\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 margin ", " ", ",\n opacity ", " ", ",\n visibility ", " ", ";\n max-height: ", ";\n opacity: ", ";\n visibility: ", ";\n\n ", " {\n transition: opacity ", " ", ",\n visibility ", " ", ";\n }\n \n ", "\n"])), duration$2.moderate, easing$2.decelerate, duration$2.moderate, easing$2.decelerate, duration$2.moderate, easing$2.decelerate, duration$2.moderate, easing$2.decelerate, duration$2.moderate, easing$2.decelerate, function (_a) {
|
|
3309
3340
|
var $expanded = _a.$expanded;
|
|
3310
3341
|
return $expanded ? '1000px' : '0';
|
|
3311
3342
|
}, function (_a) {
|
|
@@ -3317,7 +3348,7 @@ var StyledExpandedContent = /*#__PURE__*/styled__default.default.div.withConfig(
|
|
|
3317
3348
|
}, reducedMotion, duration$2.moderate, easing$2.decelerate, duration$2.moderate, easing$2.decelerate, function (_a) {
|
|
3318
3349
|
var $expanded = _a.$expanded,
|
|
3319
3350
|
$spacing = _a.$spacing;
|
|
3320
|
-
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$
|
|
3351
|
+
return $expanded && "\n padding: ".concat($spacing === 'compact' ? "".concat(semantic$h.space[200], " ").concat(semantic$h.space[300], " ").concat(semantic$h.space[200], " ").concat(tokens.component.listItem.expandedIndent.compact) : "".concat(semantic$h.space[200], " ").concat(semantic$h.space[400], " ").concat(semantic$h.space[300], " ").concat(tokens.component.listItem.expandedIndent.comfortable), ";\n background-color: ").concat(semantic$h.surface.raised, ";\n border-radius: ").concat(rowRadius, ";\n /* The row's own insets, so the panel lines up with the row in every density (0051) */\n margin: 0 ").concat($spacing === 'compact' ? semantic$h.space.inset.md : semantic$h.space.inset.lg, " ").concat($spacing === 'compact' ? semantic$h.space.inset.sm : semantic$h.space.inset.md, ";\n ");
|
|
3321
3352
|
});
|
|
3322
3353
|
var ListItem = function ListItem(_a) {
|
|
3323
3354
|
var primary = _a.primary,
|
|
@@ -3439,37 +3470,37 @@ var ListItem = function ListItem(_a) {
|
|
|
3439
3470
|
);
|
|
3440
3471
|
};
|
|
3441
3472
|
ListItem.displayName = 'ListItem';
|
|
3442
|
-
var templateObject_1$
|
|
3473
|
+
var templateObject_1$x, templateObject_2$t, templateObject_3$r, templateObject_4$m, templateObject_5$i, templateObject_6$f, templateObject_7$d;
|
|
3443
3474
|
|
|
3444
3475
|
var _a$3 = tokens.semantic,
|
|
3445
3476
|
color$8 = _a$3.color,
|
|
3446
|
-
border$
|
|
3447
|
-
space$
|
|
3448
|
-
motion$
|
|
3477
|
+
border$6 = _a$3.border,
|
|
3478
|
+
space$c = _a$3.space,
|
|
3479
|
+
motion$9 = _a$3.motion,
|
|
3449
3480
|
elevation$3 = _a$3.elevation;
|
|
3450
|
-
var slideUp = styled.keyframes(templateObject_1$
|
|
3451
|
-
var fadeIn$2 = styled.keyframes(templateObject_2$
|
|
3481
|
+
var slideUp = styled.keyframes(templateObject_1$w || (templateObject_1$w = __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"])));
|
|
3482
|
+
var fadeIn$2 = styled.keyframes(templateObject_2$s || (templateObject_2$s = __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"])));
|
|
3452
3483
|
var StyledOverlay$2 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3453
3484
|
displayName: "ActionSheet__StyledOverlay",
|
|
3454
3485
|
componentId: "sc-regbol-0"
|
|
3455
|
-
})(templateObject_3$q || (templateObject_3$q = __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"])), tokens.semantic.surface.scrim, tokens.semantic.layer.modal, fadeIn$2, motion$
|
|
3486
|
+
})(templateObject_3$q || (templateObject_3$q = __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"])), tokens.semantic.surface.scrim, tokens.semantic.layer.modal, fadeIn$2, motion$9.duration.moderate, motion$9.easing.decelerate, function (_a) {
|
|
3456
3487
|
var $isExiting = _a.$isExiting;
|
|
3457
3488
|
return $isExiting && exitAnimation;
|
|
3458
3489
|
});
|
|
3459
3490
|
var StyledActionSheet = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3460
3491
|
displayName: "ActionSheet__StyledActionSheet",
|
|
3461
3492
|
componentId: "sc-regbol-1"
|
|
3462
|
-
})(templateObject_4$l || (templateObject_4$l = __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"])), tokens.semantic.surface.
|
|
3493
|
+
})(templateObject_4$l || (templateObject_4$l = __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"])), tokens.semantic.surface.overlay, tokens.component.overlay.borderRadius, tokens.component.overlay.borderRadius, elevation$3.overlay, tokens.semantic.layer.modal, slideUp, motion$9.duration.slow, motion$9.easing.decelerate, function (_a) {
|
|
3463
3494
|
var $isExiting = _a.$isExiting;
|
|
3464
3495
|
return $isExiting && exitAnimation;
|
|
3465
|
-
}, reducedMotion, fadeIn$2, motion$
|
|
3496
|
+
}, reducedMotion, fadeIn$2, motion$9.duration.slow, motion$9.easing.decelerate, function (_a) {
|
|
3466
3497
|
var $isExiting = _a.$isExiting;
|
|
3467
3498
|
return $isExiting && exitAnimation;
|
|
3468
3499
|
});
|
|
3469
3500
|
var StyledHeader$2 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3470
3501
|
displayName: "ActionSheet__StyledHeader",
|
|
3471
3502
|
componentId: "sc-regbol-2"
|
|
3472
|
-
})(templateObject_5$h || (templateObject_5$h = __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"])), space$
|
|
3503
|
+
})(templateObject_5$h || (templateObject_5$h = __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"])), space$c[400], space$c[400], space$c[300], border$6["default"]);
|
|
3473
3504
|
var StyledHeaderContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3474
3505
|
displayName: "ActionSheet__StyledHeaderContent",
|
|
3475
3506
|
componentId: "sc-regbol-3"
|
|
@@ -3477,7 +3508,7 @@ var StyledHeaderContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3477
3508
|
var StyledCloseButton = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
3478
3509
|
displayName: "ActionSheet__StyledCloseButton",
|
|
3479
3510
|
componentId: "sc-regbol-4"
|
|
3480
|
-
})(templateObject_7$
|
|
3511
|
+
})(templateObject_7$c || (templateObject_7$c = __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"])), space$c[200], color$8.icon.muted, tokens.semantic.radius.md, motion$9.transition.feedback, space$c[200], color$8.icon["default"], color$8.fill.muted, border$6.focus, border$6.focusOffset);
|
|
3481
3512
|
var StyledActionsList = /*#__PURE__*/styled__default.default.ul.withConfig({
|
|
3482
3513
|
displayName: "ActionSheet__StyledActionsList",
|
|
3483
3514
|
componentId: "sc-regbol-5"
|
|
@@ -3514,7 +3545,7 @@ var StyledActionsList = /*#__PURE__*/styled__default.default.ul.withConfig({
|
|
|
3514
3545
|
* ]}
|
|
3515
3546
|
* />
|
|
3516
3547
|
* ```
|
|
3517
|
-
*/])), space$
|
|
3548
|
+
*/])), space$c[200], space$c[300]);
|
|
3518
3549
|
/**
|
|
3519
3550
|
* ActionSheet component for bottom sheet modals
|
|
3520
3551
|
*
|
|
@@ -3705,7 +3736,7 @@ var ActionSheet = function ActionSheet(_a) {
|
|
|
3705
3736
|
})]
|
|
3706
3737
|
}), document.body);
|
|
3707
3738
|
};
|
|
3708
|
-
var templateObject_1$
|
|
3739
|
+
var templateObject_1$w, templateObject_2$s, templateObject_3$q, templateObject_4$l, templateObject_5$h, templateObject_6$e, templateObject_7$c, templateObject_8$a;
|
|
3709
3740
|
|
|
3710
3741
|
function detectSpeechRecognitionConstructor(targetWindow) {
|
|
3711
3742
|
if (!targetWindow) return null;
|
|
@@ -3809,24 +3840,24 @@ function agentInputStateTransition(currentState, event) {
|
|
|
3809
3840
|
}
|
|
3810
3841
|
}
|
|
3811
3842
|
|
|
3812
|
-
var semantic$
|
|
3813
|
-
component$
|
|
3843
|
+
var semantic$g = tokens.semantic,
|
|
3844
|
+
component$3 = tokens.component;
|
|
3814
3845
|
var DEFAULT_LISTENING_MESSAGE = 'Listening… speak now';
|
|
3815
3846
|
var DEFAULT_PROCESSING_MESSAGE = 'Finishing voice input…';
|
|
3816
3847
|
// The counter appears from this share of maxLength
|
|
3817
3848
|
var COUNTER_THRESHOLD = 0.8;
|
|
3818
3849
|
// Layout effects warn during server rendering in React 18
|
|
3819
3850
|
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
3820
|
-
var rotateRing = styled.keyframes(templateObject_1$
|
|
3851
|
+
var rotateRing = styled.keyframes(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"], ["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
3821
3852
|
var Container = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3822
3853
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3823
3854
|
return !prop.startsWith('$');
|
|
3824
3855
|
},
|
|
3825
3856
|
displayName: "AgentInput__Container",
|
|
3826
3857
|
componentId: "sc-fhl996-0"
|
|
3827
|
-
})(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n\n ", "\n"])), semantic$
|
|
3858
|
+
})(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", ";\n width: 100%;\n\n ", "\n"])), semantic$g.space[200], function (_a) {
|
|
3828
3859
|
var $docked = _a.$docked;
|
|
3829
|
-
return $docked && styled.css(templateObject_2$
|
|
3860
|
+
return $docked && styled.css(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n position: sticky;\n bottom: 0;\n z-index: ", ";\n /* The band hides content scrolling past the field and status line (decisions 0006, 0031) */\n background-color: ", ";\n padding-top: ", ";\n /* Clears the home indicator; zero unless the page sets viewport-fit=cover */\n padding-bottom: env(safe-area-inset-bottom, 0px);\n "], ["\n position: sticky;\n bottom: 0;\n z-index: ", ";\n /* The band hides content scrolling past the field and status line (decisions 0006, 0031) */\n background-color: ", ";\n padding-top: ", ";\n /* Clears the home indicator; zero unless the page sets viewport-fit=cover */\n padding-bottom: env(safe-area-inset-bottom, 0px);\n "])), semantic$g.layer.sticky, semantic$g.surface.base, semantic$g.space[300]);
|
|
3830
3861
|
});
|
|
3831
3862
|
var ControlsRow = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3832
3863
|
displayName: "AgentInput__ControlsRow",
|
|
@@ -3838,21 +3869,21 @@ var InputShell = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3838
3869
|
})(templateObject_5$g || (templateObject_5$g = __makeTemplateObject(["\n display: flex;\n /* Actions sit beside the last line as the field grows */\n align-items: flex-end;\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 /* Actions sit beside the last line as the field grows */\n align-items: flex-end;\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"
|
|
3839
3870
|
// One row is a control-height field; it grows with its content to six rows, then scrolls.
|
|
3840
3871
|
// The height is set from scrollHeight in resizeField; 1lh is the body line height.
|
|
3841
|
-
])), semantic$
|
|
3872
|
+
])), semantic$g.space[200], semantic$g.space[100], semantic$g.space[200], semantic$g.space[100], semantic$g.space.inset.lg, component$3.input["default"].backgroundColor, component$3.input["default"].borderWidth, component$3.input["default"].borderColor, semantic$g.radius['3xl'], semantic$g.elevation.raised, semantic$g.motion.duration.moderate, semantic$g.motion.easing.standard, semantic$g.motion.duration.moderate, semantic$g.motion.easing.standard, component$3.input.focus.borderColor, component$3.input.focus.outline, semantic$g.border.focusOffset, component$3.input.disabled.backgroundColor, component$3.input.disabled.borderColor);
|
|
3842
3873
|
// One row is a control-height field; it grows with its content to six rows, then scrolls.
|
|
3843
3874
|
// The height is set from scrollHeight in resizeField; 1lh is the body line height.
|
|
3844
3875
|
var Input = /*#__PURE__*/styled__default.default.textarea.withConfig({
|
|
3845
3876
|
displayName: "AgentInput__Input",
|
|
3846
3877
|
componentId: "sc-fhl996-3"
|
|
3847
|
-
})(templateObject_6$d || (templateObject_6$d = __makeTemplateObject(["\n display: block;\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n height: ", ";\n min-height: ", ";\n max-height: calc(5lh + ", ");\n margin: 0;\n padding: calc((", " - 1lh) / 2) 0;\n resize: none;\n overflow-y: hidden;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n display: block;\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n height: ", ";\n min-height: ", ";\n max-height: calc(5lh + ", ");\n margin: 0;\n padding: calc((", " - 1lh) / 2) 0;\n resize: none;\n overflow-y: hidden;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$
|
|
3878
|
+
})(templateObject_6$d || (templateObject_6$d = __makeTemplateObject(["\n display: block;\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n height: ", ";\n min-height: ", ";\n max-height: calc(5lh + ", ");\n margin: 0;\n padding: calc((", " - 1lh) / 2) 0;\n resize: none;\n overflow-y: hidden;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"], ["\n display: block;\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n height: ", ";\n min-height: ", ";\n max-height: calc(5lh + ", ");\n margin: 0;\n padding: calc((", " - 1lh) / 2) 0;\n resize: none;\n overflow-y: hidden;\n border: none;\n background: transparent;\n font: ", ";\n color: ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n /* Firefox fades placeholders to 0.54 by default, which would undo the 4.5:1 contrast */\n opacity: 1;\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n"])), semantic$g.size.control.lg, semantic$g.size.control.lg, semantic$g.size.control.lg, semantic$g.size.control.lg, semantic$g.typography.body, semantic$g.color.text["default"], component$3.input.placeholder.textColor, semantic$g.color.text.disabled);
|
|
3848
3879
|
var InputActions = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3849
3880
|
displayName: "AgentInput__InputActions",
|
|
3850
3881
|
componentId: "sc-fhl996-4"
|
|
3851
|
-
})(templateObject_7$
|
|
3882
|
+
})(templateObject_7$b || (templateObject_7$b = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n /* Centres the buttons on a one-row field, and keeps them level with the last line as it grows */\n padding-bottom: calc((", " - ", ") / 2);\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n /* Centres the buttons on a one-row field, and keeps them level with the last line as it grows */\n padding-bottom: calc((", " - ", ") / 2);\n"])), semantic$g.space[200], semantic$g.size.control.lg, semantic$g.size.control.md);
|
|
3852
3883
|
var CircularActionIconButton = /*#__PURE__*/styled__default.default(IconButton).withConfig({
|
|
3853
3884
|
displayName: "AgentInput__CircularActionIconButton",
|
|
3854
3885
|
componentId: "sc-fhl996-5"
|
|
3855
|
-
})(templateObject_8$9 || (templateObject_8$9 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$
|
|
3886
|
+
})(templateObject_8$9 || (templateObject_8$9 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), semantic$g.radius.full);
|
|
3856
3887
|
var InputWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3857
3888
|
displayName: "AgentInput__InputWrapper",
|
|
3858
3889
|
componentId: "sc-fhl996-6"
|
|
@@ -3863,10 +3894,10 @@ var MicButtonWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3863
3894
|
},
|
|
3864
3895
|
displayName: "AgentInput__MicButtonWrapper",
|
|
3865
3896
|
componentId: "sc-fhl996-7"
|
|
3866
|
-
})(templateObject_10$
|
|
3897
|
+
})(templateObject_10$6 || (templateObject_10$6 = __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"
|
|
3867
3898
|
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3868
3899
|
// eslint-disable-next-line no-restricted-syntax
|
|
3869
|
-
])), semantic$
|
|
3900
|
+
])), semantic$g.radius.full);
|
|
3870
3901
|
// Masks read only alpha, so the opaque stop is a mask value, not a colour (decision 0010).
|
|
3871
3902
|
// eslint-disable-next-line no-restricted-syntax
|
|
3872
3903
|
var ringMask = styled.css(templateObject_11$4 || (templateObject_11$4 = __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)))"])));
|
|
@@ -3878,13 +3909,13 @@ var MicListeningRing = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
3878
3909
|
componentId: "sc-fhl996-8"
|
|
3879
3910
|
})(templateObject_13$4 || (templateObject_13$4 = __makeTemplateObject(["\n --ring-thickness: ", ";\n position: absolute;\n inset: calc(-1 * ", " - ", ");\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(-1 * ", " - ", ");\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"
|
|
3880
3911
|
// Maximum suggestions shown (decision 0046, #280)
|
|
3881
|
-
])), semantic$
|
|
3912
|
+
])), semantic$g.border.width.thick, semantic$g.space[100], semantic$g.border.focusOffset, semantic$g.radius.full, semantic$g.color.fill['accent-muted'], semantic$g.color.fill.accent, semantic$g.color.fill['accent-hover'], semantic$g.color.fill.accent, semantic$g.color.fill['accent-muted'], ringMask, ringMask, function (_a) {
|
|
3882
3913
|
var $reducedMotion = _a.$reducedMotion;
|
|
3883
3914
|
return !$reducedMotion && styled.css(templateObject_12$4 || (templateObject_12$4 = __makeTemplateObject(["\n animation: ", " 1300ms linear infinite;\n "], ["\n animation: ", " 1300ms linear infinite;\n "])), rotateRing);
|
|
3884
3915
|
});
|
|
3885
3916
|
// Maximum suggestions shown (decision 0046, #280)
|
|
3886
3917
|
var MAX_SUGGESTIONS = 3;
|
|
3887
|
-
var regionEnter = styled.keyframes(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translateY(", ");\n }\n"], ["\n from {\n opacity: 0;\n transform: translateY(", ");\n }\n"])), semantic$
|
|
3918
|
+
var regionEnter = styled.keyframes(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translateY(", ");\n }\n"], ["\n from {\n opacity: 0;\n transform: translateY(", ");\n }\n"])), semantic$g.motion.distance.sm);
|
|
3888
3919
|
var regionFadeIn = styled.keyframes(templateObject_15$2 || (templateObject_15$2 = __makeTemplateObject(["\n from {\n opacity: 0;\n }\n"], ["\n from {\n opacity: 0;\n }\n"
|
|
3889
3920
|
// Leaving content fades, then its space closes, as with Alert's dismiss (decision 0015). A grid
|
|
3890
3921
|
// row from 1fr to 0fr collapses to the content's own height without measuring it.
|
|
@@ -3904,10 +3935,10 @@ var RegionItem = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3904
3935
|
componentId: "sc-fhl996-9"
|
|
3905
3936
|
})(templateObject_21$1 || (templateObject_21$1 = __makeTemplateObject(["\n display: grid;\n grid-template-rows: 1fr;\n animation: ", " ", " ", ";\n\n ", " {\n animation-name: ", ";\n }\n\n ", "\n"], ["\n display: grid;\n grid-template-rows: 1fr;\n animation: ", " ", " ", ";\n\n ", " {\n animation-name: ", ";\n }\n\n ", "\n"
|
|
3906
3937
|
// Clips while the row collapses. Its bottom padding is the space to the next part, so it closes too.
|
|
3907
|
-
])), regionEnter, semantic$
|
|
3938
|
+
])), regionEnter, semantic$g.motion.duration.moderate, semantic$g.motion.easing.decelerate, reducedMotion, regionFadeIn, function (_a) {
|
|
3908
3939
|
var $exiting = _a.$exiting,
|
|
3909
3940
|
$reducedExit = _a.$reducedExit;
|
|
3910
|
-
return $exiting && styled.css(templateObject_20$1 || (templateObject_20$1 = __makeTemplateObject(["\n pointer-events: none;\n animation: ", ";\n "], ["\n pointer-events: none;\n animation: ", ";\n "])), $reducedExit ? styled.css(templateObject_18$1 || (templateObject_18$1 = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), regionFadeOut, semantic$
|
|
3941
|
+
return $exiting && styled.css(templateObject_20$1 || (templateObject_20$1 = __makeTemplateObject(["\n pointer-events: none;\n animation: ", ";\n "], ["\n pointer-events: none;\n animation: ", ";\n "])), $reducedExit ? styled.css(templateObject_18$1 || (templateObject_18$1 = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), regionFadeOut, semantic$g.motion.duration.fast, semantic$g.motion.easing.accelerate) : styled.css(templateObject_19$1 || (templateObject_19$1 = __makeTemplateObject(["", " calc(2 * ", ") ", " forwards"], ["", " calc(2 * ", ") ", " forwards"])), regionFadeThenCollapse, semantic$g.motion.duration.fast, semantic$g.motion.easing.accelerate));
|
|
3911
3942
|
});
|
|
3912
3943
|
// Clips while the row collapses. Its bottom padding is the space to the next part, so it closes too.
|
|
3913
3944
|
var RegionItemContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
@@ -3915,31 +3946,31 @@ var RegionItemContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3915
3946
|
componentId: "sc-fhl996-10"
|
|
3916
3947
|
})(templateObject_22$1 || (templateObject_22$1 = __makeTemplateObject(["\n min-height: 0;\n overflow: hidden;\n padding-bottom: ", ";\n padding-left: ", ";\n"], ["\n min-height: 0;\n overflow: hidden;\n padding-bottom: ", ";\n padding-left: ", ";\n"
|
|
3917
3948
|
// The summary first, then the actions, left-aligned after it; they wrap below on narrow screens (0021)
|
|
3918
|
-
])), semantic$
|
|
3949
|
+
])), semantic$g.space[200], semantic$g.space[500]);
|
|
3919
3950
|
// The summary first, then the actions, left-aligned after it; they wrap below on narrow screens (0021)
|
|
3920
3951
|
var ReviewBar = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3921
3952
|
displayName: "AgentInput__ReviewBar",
|
|
3922
3953
|
componentId: "sc-fhl996-11"
|
|
3923
|
-
})(templateObject_23$1 || (templateObject_23$1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n column-gap: ", ";\n row-gap: ", ";\n"], ["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n column-gap: ", ";\n row-gap: ", ";\n"])), semantic$
|
|
3954
|
+
})(templateObject_23$1 || (templateObject_23$1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n column-gap: ", ";\n row-gap: ", ";\n"], ["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n column-gap: ", ";\n row-gap: ", ";\n"])), semantic$g.space[300], semantic$g.space[200]);
|
|
3924
3955
|
var ReviewActions = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3925
3956
|
displayName: "AgentInput__ReviewActions",
|
|
3926
3957
|
componentId: "sc-fhl996-12"
|
|
3927
|
-
})(templateObject_24$1 || (templateObject_24$1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n"])), semantic$
|
|
3958
|
+
})(templateObject_24$1 || (templateObject_24$1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n"])), semantic$g.space[200]);
|
|
3928
3959
|
var SuggestionList = /*#__PURE__*/styled__default.default.ul.withConfig({
|
|
3929
3960
|
displayName: "AgentInput__SuggestionList",
|
|
3930
3961
|
componentId: "sc-fhl996-13"
|
|
3931
|
-
})(templateObject_25$1 || (templateObject_25$1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n\n & > li {\n max-width: 100%;\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n\n & > li {\n max-width: 100%;\n }\n"])), semantic$
|
|
3962
|
+
})(templateObject_25$1 || (templateObject_25$1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n\n & > li {\n max-width: 100%;\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n gap: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n\n & > li {\n max-width: 100%;\n }\n"])), semantic$g.space[200]);
|
|
3932
3963
|
var StatusRow = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3933
3964
|
displayName: "AgentInput__StatusRow",
|
|
3934
3965
|
componentId: "sc-fhl996-14"
|
|
3935
|
-
})(templateObject_26$1 || (templateObject_26$1 = __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$
|
|
3966
|
+
})(templateObject_26$1 || (templateObject_26$1 = __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$g.space[300], semantic$g.space[600]);
|
|
3936
3967
|
var StatusText = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3937
3968
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3938
3969
|
return !prop.startsWith('$');
|
|
3939
3970
|
},
|
|
3940
3971
|
displayName: "AgentInput__StatusText",
|
|
3941
3972
|
componentId: "sc-fhl996-15"
|
|
3942
|
-
})(templateObject_27$1 || (templateObject_27$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$
|
|
3973
|
+
})(templateObject_27$1 || (templateObject_27$1 = __makeTemplateObject(["\n padding-left: ", ";\n"], ["\n padding-left: ", ";\n"])), semantic$g.space[500]);
|
|
3943
3974
|
var StatusAnnouncement = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3944
3975
|
displayName: "AgentInput__StatusAnnouncement",
|
|
3945
3976
|
componentId: "sc-fhl996-16"
|
|
@@ -3947,7 +3978,7 @@ var StatusAnnouncement = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
3947
3978
|
var StatusEnd = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3948
3979
|
displayName: "AgentInput__StatusEnd",
|
|
3949
3980
|
componentId: "sc-fhl996-17"
|
|
3950
|
-
})(templateObject_29$1 || (templateObject_29$1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"])), semantic$
|
|
3981
|
+
})(templateObject_29$1 || (templateObject_29$1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n"])), semantic$g.space[300]);
|
|
3951
3982
|
var VisuallyHidden = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
3952
3983
|
displayName: "AgentInput__VisuallyHidden",
|
|
3953
3984
|
componentId: "sc-fhl996-18"
|
|
@@ -3955,17 +3986,17 @@ var VisuallyHidden = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
3955
3986
|
var MeterContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3956
3987
|
displayName: "AgentInput__MeterContainer",
|
|
3957
3988
|
componentId: "sc-fhl996-19"
|
|
3958
|
-
})(templateObject_31$1 || (templateObject_31$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$
|
|
3989
|
+
})(templateObject_31$1 || (templateObject_31$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$g.space[100], semantic$g.space[400]);
|
|
3959
3990
|
var MeterBar = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
3960
3991
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
3961
3992
|
return !prop.startsWith('$');
|
|
3962
3993
|
},
|
|
3963
3994
|
displayName: "AgentInput__MeterBar",
|
|
3964
3995
|
componentId: "sc-fhl996-20"
|
|
3965
|
-
})(templateObject_32$1 || (templateObject_32$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$
|
|
3996
|
+
})(templateObject_32$1 || (templateObject_32$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$g.space[100], semantic$g.radius.xs, semantic$g.color.fill.accent, function (_a) {
|
|
3966
3997
|
var $height = _a.$height;
|
|
3967
3998
|
return "".concat($height * 100, "%");
|
|
3968
|
-
}, semantic$
|
|
3999
|
+
}, semantic$g.motion.duration.fast, semantic$g.motion.easing.decelerate);
|
|
3969
4000
|
var VisuallyHiddenLabel = /*#__PURE__*/styled__default.default.label.withConfig({
|
|
3970
4001
|
displayName: "AgentInput__VisuallyHiddenLabel",
|
|
3971
4002
|
componentId: "sc-fhl996-21"
|
|
@@ -4886,11 +4917,11 @@ function AgentInputWithRef(_a, ref) {
|
|
|
4886
4917
|
}
|
|
4887
4918
|
var AgentInput = /*#__PURE__*/React.forwardRef(AgentInputWithRef);
|
|
4888
4919
|
AgentInput.displayName = 'AgentInput';
|
|
4889
|
-
var templateObject_1$
|
|
4920
|
+
var templateObject_1$v, templateObject_2$r, templateObject_3$p, templateObject_4$k, templateObject_5$g, templateObject_6$d, templateObject_7$b, templateObject_8$9, templateObject_9$8, templateObject_10$6, templateObject_11$4, templateObject_12$4, templateObject_13$4, templateObject_14$2, templateObject_15$2, templateObject_16$1, templateObject_17$1, templateObject_18$1, templateObject_19$1, templateObject_20$1, templateObject_21$1, templateObject_22$1, templateObject_23$1, templateObject_24$1, templateObject_25$1, templateObject_26$1, templateObject_27$1, templateObject_28$1, templateObject_29$1, templateObject_30$1, templateObject_31$1, templateObject_32$1, templateObject_33$1;
|
|
4890
4921
|
|
|
4891
|
-
var semantic$
|
|
4922
|
+
var semantic$f = tokens.semantic;
|
|
4892
4923
|
var alert = tokens.component.alert;
|
|
4893
|
-
var _a$2 = semantic$
|
|
4924
|
+
var _a$2 = semantic$f.motion,
|
|
4894
4925
|
duration$1 = _a$2.duration,
|
|
4895
4926
|
easing$1 = _a$2.easing;
|
|
4896
4927
|
// Dismissing fades the alert out, then collapses the space it took (Ollie's call, #35).
|
|
@@ -4900,8 +4931,8 @@ var FADE_MS = parseInt(data.tokensJson.semantic.motion.duration.fast, 10);
|
|
|
4900
4931
|
var EXIT_MS = FADE_MS * 2;
|
|
4901
4932
|
// The --alert-exit-* properties are the alert's height and vertical padding, measured
|
|
4902
4933
|
// when it's dismissed, so nothing moves until the fade has finished
|
|
4903
|
-
var fadeThenCollapse = styled.keyframes(templateObject_1$
|
|
4904
|
-
var fadeOut = styled.keyframes(templateObject_2$
|
|
4934
|
+
var fadeThenCollapse = styled.keyframes(templateObject_1$u || (templateObject_1$u = __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$f.border.width.thin);
|
|
4935
|
+
var fadeOut = styled.keyframes(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n from { opacity: 1; }\n to { opacity: 0; }\n"], ["\n from { opacity: 1; }\n to { opacity: 0; }\n"
|
|
4905
4936
|
// The exit ends on the alert's own animationend: 300ms, or 150ms under reduced motion
|
|
4906
4937
|
// (chosen when dismissed). A timer of the same length removes it if no animation event
|
|
4907
4938
|
// arrives, for example where animations are disabled or the tab is hidden.
|
|
@@ -4940,7 +4971,7 @@ var StyledAlert = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
4940
4971
|
},
|
|
4941
4972
|
displayName: "Alert__StyledAlert",
|
|
4942
4973
|
componentId: "sc-18tq5d-0"
|
|
4943
|
-
})(templateObject_6$c || (templateObject_6$c = __makeTemplateObject(["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"], ["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"])), semantic$
|
|
4974
|
+
})(templateObject_6$c || (templateObject_6$c = __makeTemplateObject(["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"], ["\n display: flex;\n /* Items start at the top, so the icon and dismiss button line up with the first line */\n align-items: flex-start;\n gap: ", ";\n padding: ", ";\n border-radius: ", ";\n border: ", " solid;\n position: relative;\n width: 100%;\n \n /* Severity \xD7 appearance colours from Alert's component tokens (decision 0019). Borderless\n keeps a transparent border, so both appearances take the same space. */\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n \n /* Responsive adjustments */\n @media (min-width: ", ") {\n padding: ", ";\n }\n\n /* The exit is chosen once, when dismissed (not by a media query), so a reduced-motion\n preference that changes mid-exit can't swap animations and flash the faded alert back.\n Reduced motion: fade only; the space closes instantly afterwards. */\n ", "\n"])), semantic$f.space[300], semantic$f.space[300], semantic$f.radius.lg, semantic$f.border.width.thin, function (_a) {
|
|
4944
4975
|
var _b = _a.$variant,
|
|
4945
4976
|
$variant = _b === void 0 ? 'info' : _b;
|
|
4946
4977
|
return alert.severity[$variant].background;
|
|
@@ -4953,7 +4984,7 @@ var StyledAlert = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
4953
4984
|
$variant = _b === void 0 ? 'info' : _b,
|
|
4954
4985
|
$appearance = _a.$appearance;
|
|
4955
4986
|
return alert.appearance[$appearance].borderColor[$variant];
|
|
4956
|
-
}, semantic$
|
|
4987
|
+
}, semantic$f.breakpoint.md, semantic$f.space[400], function (_a) {
|
|
4957
4988
|
var $isExiting = _a.$isExiting,
|
|
4958
4989
|
$reducedExit = _a.$reducedExit;
|
|
4959
4990
|
return $isExiting && styled.css(templateObject_5$f || (templateObject_5$f = __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$o || (templateObject_3$o = __makeTemplateObject(["", " ", " ", " forwards"], ["", " ", " ", " forwards"])), fadeOut, duration$1.fast, easing$1.accelerate) : styled.css(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["", " ", "ms ", " forwards"], ["", " ", "ms ", " forwards"])), fadeThenCollapse, EXIT_MS, easing$1.accelerate));
|
|
@@ -4961,11 +4992,11 @@ var StyledAlert = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
4961
4992
|
var StyledIconContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
4962
4993
|
displayName: "Alert__StyledIconContainer",
|
|
4963
4994
|
componentId: "sc-18tq5d-1"
|
|
4964
|
-
})(templateObject_7$
|
|
4995
|
+
})(templateObject_7$a || (templateObject_7$a = __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"])));
|
|
4965
4996
|
var StyledContent$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
4966
4997
|
displayName: "Alert__StyledContent",
|
|
4967
4998
|
componentId: "sc-18tq5d-2"
|
|
4968
|
-
})(templateObject_8$8 || (templateObject_8$8 = __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$
|
|
4999
|
+
})(templateObject_8$8 || (templateObject_8$8 = __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$f.space[100]);
|
|
4969
5000
|
var StyledTitle = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
4970
5001
|
displayName: "Alert__StyledTitle",
|
|
4971
5002
|
componentId: "sc-18tq5d-3"
|
|
@@ -4973,7 +5004,7 @@ var StyledTitle = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
4973
5004
|
var StyledMessage$1 = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
4974
5005
|
displayName: "Alert__StyledMessage",
|
|
4975
5006
|
componentId: "sc-18tq5d-4"
|
|
4976
|
-
})(templateObject_10$
|
|
5007
|
+
})(templateObject_10$5 || (templateObject_10$5 = __makeTemplateObject(["\n font: ", ";\n line-height: ", ";\n"], ["\n font: ", ";\n line-height: ", ";\n"
|
|
4977
5008
|
// The action follows the content, left-aligned with it, so it's read after the message
|
|
4978
5009
|
// (#122). With the content's xs gap, the space above it is md: a separate step.
|
|
4979
5010
|
])), alert.message.typography, alert.message.lineHeight);
|
|
@@ -4987,7 +5018,7 @@ var StyledActions = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
4987
5018
|
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
4988
5019
|
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
4989
5020
|
// padding and line height. Being in the row, it also keeps text and actions from running under it.
|
|
4990
|
-
])), semantic$
|
|
5021
|
+
])), semantic$f.space[200], semantic$f.space[300], semantic$f.space[100]);
|
|
4991
5022
|
// The dismiss button's centre lines up with the first line of content: the title, or the
|
|
4992
5023
|
// message when there's no title (decision 0019). The slot is as tall as that line and the
|
|
4993
5024
|
// button is centred in it, overflowing evenly into the padding, so it stays aligned at every
|
|
@@ -5008,7 +5039,7 @@ var StyledDismissSlot = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
5008
5039
|
var StyledDismissButton = /*#__PURE__*/styled__default.default(IconButton).withConfig({
|
|
5009
5040
|
displayName: "Alert__StyledDismissButton",
|
|
5010
5041
|
componentId: "sc-18tq5d-7"
|
|
5011
|
-
})(templateObject_13$3 || (templateObject_13$3 = __makeTemplateObject(["\n margin-right: calc((", " - ", ") / -2);\n"], ["\n margin-right: calc((", " - ", ") / -2);\n"])), semantic$
|
|
5042
|
+
})(templateObject_13$3 || (templateObject_13$3 = __makeTemplateObject(["\n margin-right: calc((", " - ", ") / -2);\n"], ["\n margin-right: calc((", " - ", ") / -2);\n"])), semantic$f.size.control.sm, semantic$f.size.icon.sm);
|
|
5012
5043
|
var Alert = function Alert(_a) {
|
|
5013
5044
|
var _b = _a.variant,
|
|
5014
5045
|
variant = _b === void 0 ? 'info' : _b,
|
|
@@ -5144,12 +5175,12 @@ var Alert = function Alert(_a) {
|
|
|
5144
5175
|
}));
|
|
5145
5176
|
};
|
|
5146
5177
|
Alert.displayName = 'Alert';
|
|
5147
|
-
var templateObject_1$
|
|
5178
|
+
var templateObject_1$u, templateObject_2$q, templateObject_3$o, templateObject_4$j, templateObject_5$f, templateObject_6$c, templateObject_7$a, templateObject_8$8, templateObject_9$7, templateObject_10$5, templateObject_11$3, templateObject_12$3, templateObject_13$3;
|
|
5148
5179
|
|
|
5149
|
-
var semantic$
|
|
5150
|
-
var color$7 = semantic$
|
|
5151
|
-
typography$4 = semantic$
|
|
5152
|
-
size$
|
|
5180
|
+
var semantic$e = tokens.semantic;
|
|
5181
|
+
var color$7 = semantic$e.color,
|
|
5182
|
+
typography$4 = semantic$e.typography,
|
|
5183
|
+
size$6 = semantic$e.size;
|
|
5153
5184
|
// Each severity's status icon and, at the small size, its shape (decision 0045)
|
|
5154
5185
|
var variantIcons = {
|
|
5155
5186
|
error: 'statusError',
|
|
@@ -5172,12 +5203,12 @@ var variantShapes = {
|
|
|
5172
5203
|
var sizeConfig = {
|
|
5173
5204
|
small: {
|
|
5174
5205
|
font: typography$4.caption,
|
|
5175
|
-
gap: semantic$
|
|
5206
|
+
gap: semantic$e.space[100],
|
|
5176
5207
|
icon: 'xs'
|
|
5177
5208
|
},
|
|
5178
5209
|
medium: {
|
|
5179
5210
|
font: typography$4.small,
|
|
5180
|
-
gap: semantic$
|
|
5211
|
+
gap: semantic$e.space[200],
|
|
5181
5212
|
icon: 'sm'
|
|
5182
5213
|
}
|
|
5183
5214
|
};
|
|
@@ -5187,13 +5218,13 @@ var StyledInlineAlert = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
5187
5218
|
},
|
|
5188
5219
|
displayName: "InlineAlert__StyledInlineAlert",
|
|
5189
5220
|
componentId: "sc-eervmb-0"
|
|
5190
|
-
})(templateObject_1$
|
|
5221
|
+
})(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: flex-start;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: flex-start;\n min-height: ", ";\n gap: ", ";\n font: ", ";\n color: ", ";\n"
|
|
5191
5222
|
// One line of the message's font tall, so the icon centres on the first line at any size:
|
|
5192
5223
|
// the zero-width space gives the box the font's line height without a fixed value
|
|
5193
5224
|
])), function (_a) {
|
|
5194
5225
|
var $size = _a.$size,
|
|
5195
5226
|
$empty = _a.$empty;
|
|
5196
|
-
return $empty ? '0' : size$
|
|
5227
|
+
return $empty ? '0' : size$6.label[$size];
|
|
5197
5228
|
}, function (_a) {
|
|
5198
5229
|
var $size = _a.$size;
|
|
5199
5230
|
return sizeConfig[$size].gap;
|
|
@@ -5209,7 +5240,7 @@ var StyledInlineAlert = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
5209
5240
|
var StyledIconLine = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
5210
5241
|
displayName: "InlineAlert__StyledIconLine",
|
|
5211
5242
|
componentId: "sc-eervmb-1"
|
|
5212
|
-
})(templateObject_2$
|
|
5243
|
+
})(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::after {\n content: '\\200B';\n }\n"], ["\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::after {\n content: '\\\\200B';\n }\n"])));
|
|
5213
5244
|
var StyledMessage = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
5214
5245
|
displayName: "InlineAlert__StyledMessage",
|
|
5215
5246
|
componentId: "sc-eervmb-2"
|
|
@@ -5283,16 +5314,16 @@ var InlineAlert = function InlineAlert(_a) {
|
|
|
5283
5314
|
});
|
|
5284
5315
|
};
|
|
5285
5316
|
InlineAlert.displayName = 'InlineAlert';
|
|
5286
|
-
var templateObject_1$
|
|
5317
|
+
var templateObject_1$t, templateObject_2$p, templateObject_3$n;
|
|
5287
5318
|
|
|
5288
5319
|
var BreadcrumbNavStyled = /*#__PURE__*/styled__default.default.nav.withConfig({
|
|
5289
5320
|
displayName: "Breadcrumbs__BreadcrumbNavStyled",
|
|
5290
5321
|
componentId: "sc-7ouzg5-0"
|
|
5291
|
-
})(templateObject_1$
|
|
5322
|
+
})(templateObject_1$s || (templateObject_1$s = __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"])), tokens.semantic.border["default"]);
|
|
5292
5323
|
var BreadcrumbStyled = /*#__PURE__*/styled__default.default.li.withConfig({
|
|
5293
5324
|
displayName: "Breadcrumbs__BreadcrumbStyled",
|
|
5294
5325
|
componentId: "sc-7ouzg5-1"
|
|
5295
|
-
})(templateObject_2$
|
|
5326
|
+
})(templateObject_2$o || (templateObject_2$o = __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"])), tokens.semantic.space[200], tokens.semantic.space[200], tokens.semantic.color.text.muted, tokens.component.breadcrumbs.item.maxWidth, tokens.semantic.color.text["default"]);
|
|
5296
5327
|
var BreadcrumbSeparator = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
5297
5328
|
displayName: "Breadcrumbs__BreadcrumbSeparator",
|
|
5298
5329
|
componentId: "sc-7ouzg5-2"
|
|
@@ -5344,14 +5375,14 @@ var Breadcrumbs = function Breadcrumbs(_a) {
|
|
|
5344
5375
|
})
|
|
5345
5376
|
});
|
|
5346
5377
|
};
|
|
5347
|
-
var templateObject_1$
|
|
5378
|
+
var templateObject_1$s, templateObject_2$o, templateObject_3$m;
|
|
5348
5379
|
|
|
5349
5380
|
// The whole card is one link (#185): hovering anywhere fades its image, pressing fades it one step
|
|
5350
5381
|
// further, and keyboard focus draws the system focus ring around the card (decision 0029)
|
|
5351
5382
|
var CardSmallStyled = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5352
5383
|
displayName: "CardSmall__CardSmallStyled",
|
|
5353
5384
|
componentId: "sc-jpcqvd-0"
|
|
5354
|
-
})(templateObject_1$
|
|
5385
|
+
})(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n a {\n display: block;\n text-decoration: none;\n border-radius: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ", ";\n width: 100%;\n height: auto;\n display: block;\n }\n\n a:hover img {\n opacity: ", ";\n }\n\n a:active img {\n opacity: ", ";\n }\n\n a:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"], ["\n a {\n display: block;\n text-decoration: none;\n border-radius: ", ";\n }\n\n img {\n border-radius: ", ";\n transition: ", ";\n width: 100%;\n height: auto;\n display: block;\n }\n\n a:hover img {\n opacity: ", ";\n }\n\n a:active img {\n opacity: ", ";\n }\n\n a:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), tokens.semantic.radius.sm, tokens.semantic.radius.sm, tokens.semantic.motion.transition.press, tokens.semantic.opacity.hover, tokens.semantic.opacity.pressed, tokens.semantic.border.focus, tokens.semantic.border.focusOffset);
|
|
5355
5386
|
var CardSmall = function CardSmall(_a) {
|
|
5356
5387
|
var title = _a.title,
|
|
5357
5388
|
picture = _a.picture,
|
|
@@ -5405,12 +5436,12 @@ var CardSmall = function CardSmall(_a) {
|
|
|
5405
5436
|
})
|
|
5406
5437
|
});
|
|
5407
5438
|
};
|
|
5408
|
-
var templateObject_1$
|
|
5439
|
+
var templateObject_1$r;
|
|
5409
5440
|
|
|
5410
5441
|
var CardLargeStyled = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5411
5442
|
displayName: "CardLarge__CardLargeStyled",
|
|
5412
5443
|
componentId: "sc-1rfgdzl-0"
|
|
5413
|
-
})(templateObject_1$
|
|
5444
|
+
})(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n max-width: ", ";\n\n a {\n text-decoration: none;\n }\n\n /* The image answers hover and press through Picture, and only when it's clickable (issue 185) */\n img {\n border-radius: ", ";\n width: 100%;\n }\n"], ["\n max-width: ", ";\n\n a {\n text-decoration: none;\n }\n\n /* The image answers hover and press through Picture, and only when it's clickable (issue 185) */\n img {\n border-radius: ", ";\n width: 100%;\n }\n"])), tokens.component.cardLarge.maxWidth, tokens.semantic.radius['2xl']);
|
|
5414
5445
|
var CardLarge = function CardLarge(_a) {
|
|
5415
5446
|
var title = _a.title,
|
|
5416
5447
|
excerpt = _a.excerpt,
|
|
@@ -5465,7 +5496,7 @@ var CardLarge = function CardLarge(_a) {
|
|
|
5465
5496
|
})
|
|
5466
5497
|
});
|
|
5467
5498
|
};
|
|
5468
|
-
var templateObject_1$
|
|
5499
|
+
var templateObject_1$q;
|
|
5469
5500
|
|
|
5470
5501
|
/**
|
|
5471
5502
|
* Hidden native checkbox input for accessibility
|
|
@@ -5477,7 +5508,7 @@ var HiddenCheckboxInput = /*#__PURE__*/styled__default.default.input.withConfig(
|
|
|
5477
5508
|
},
|
|
5478
5509
|
displayName: "SelectableInputBase__HiddenCheckboxInput",
|
|
5479
5510
|
componentId: "sc-1ddpctx-0"
|
|
5480
|
-
})(templateObject_1$
|
|
5511
|
+
})(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"], ["\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n"
|
|
5481
5512
|
/**
|
|
5482
5513
|
* Custom checkbox visual component
|
|
5483
5514
|
* 24px × 24px for 8px grid alignment
|
|
@@ -5494,11 +5525,11 @@ var StyledCheckbox = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
5494
5525
|
},
|
|
5495
5526
|
displayName: "SelectableInputBase__StyledCheckbox",
|
|
5496
5527
|
componentId: "sc-1ddpctx-1"
|
|
5497
|
-
})(templateObject_2$
|
|
5528
|
+
})(templateObject_2$n || (templateObject_2$n = __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: background-color ", " ", ",\n border-color ", " ", ",\n ", ";\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 /* Forced colours drop fills (decision 0038): a checked or indeterminate box takes the system\n selection colour, or GrayText when disabled, and its mark the matching text colour. The\n indeterminate dash is a fill, so it needs the same treatment. */\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: background-color ", " ", ",\n border-color ", " ", ",\n ", ";\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 /* Forced colours drop fills (decision 0038): a checked or indeterminate box takes the system\n selection colour, or GrayText when disabled, and its mark the matching text colour. The\n indeterminate dash is a fill, so it needs the same treatment. */\n ", "\n"
|
|
5498
5529
|
/**
|
|
5499
5530
|
* Container for checkbox with proper spacing and alignment
|
|
5500
5531
|
* 48px min-height for touch target (8px grid aligned)
|
|
5501
|
-
*/])), tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.
|
|
5532
|
+
*/])), tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.size, tokens.component.checkbox.box.borderRadius, tokens.component.input["default"].borderWidth, function (props) {
|
|
5502
5533
|
return props.$checked || props.$indeterminate ? tokens.semantic.color.fill.inverse : tokens.component.input["default"].backgroundColor;
|
|
5503
5534
|
}, function (props) {
|
|
5504
5535
|
if (props.$state === 'error') return tokens.component.input.error.borderColor;
|
|
@@ -5555,16 +5586,16 @@ var StyledCheckboxLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
5555
5586
|
})(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), tokens.component.input["default"].font, function (props) {
|
|
5556
5587
|
return props.$disabled ? tokens.component.input.disabled.textColor : tokens.component.input["default"].textColor;
|
|
5557
5588
|
});
|
|
5558
|
-
var templateObject_1$
|
|
5589
|
+
var templateObject_1$p, templateObject_2$n, templateObject_3$l, templateObject_4$i;
|
|
5559
5590
|
|
|
5560
5591
|
var StyledFieldContainer$3 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5561
5592
|
displayName: "Checkbox__StyledFieldContainer",
|
|
5562
5593
|
componentId: "sc-vquz3v-0"
|
|
5563
|
-
})(templateObject_1$
|
|
5594
|
+
})(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"], ["\n display: inline-flex;\n flex-direction: column;\n gap: ", ";\n"])), tokens.semantic.space[100]);
|
|
5564
5595
|
var StyledHelperText$4 = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
5565
5596
|
displayName: "Checkbox__StyledHelperText",
|
|
5566
5597
|
componentId: "sc-vquz3v-1"
|
|
5567
|
-
})(templateObject_2$
|
|
5598
|
+
})(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"], ["\n font: ", ";\n color: ", ";\n margin-left: ", "; /* Align with label text after checkbox */\n display: block;\n"
|
|
5568
5599
|
/**
|
|
5569
5600
|
* Checkbox component for binary selection with WCAG 2.2 AA compliance
|
|
5570
5601
|
*
|
|
@@ -5683,12 +5714,12 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
5683
5714
|
});
|
|
5684
5715
|
});
|
|
5685
5716
|
Checkbox.displayName = 'Checkbox';
|
|
5686
|
-
var templateObject_1$
|
|
5717
|
+
var templateObject_1$o, templateObject_2$m;
|
|
5687
5718
|
|
|
5688
5719
|
var ChipGroupWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5689
5720
|
displayName: "ChipGroup__ChipGroupWrapper",
|
|
5690
5721
|
componentId: "sc-ae049w-0"
|
|
5691
|
-
})(templateObject_1$
|
|
5722
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"], ["\n > div {\n display: flex;\n flex-wrap: wrap;\n }\n"])));
|
|
5692
5723
|
var ChipGroup = function ChipGroup(_a) {
|
|
5693
5724
|
var labels = _a.labels,
|
|
5694
5725
|
dataTestId = _a["data-testid"];
|
|
@@ -5705,20 +5736,20 @@ var ChipGroup = function ChipGroup(_a) {
|
|
|
5705
5736
|
})
|
|
5706
5737
|
});
|
|
5707
5738
|
};
|
|
5708
|
-
var templateObject_1$
|
|
5739
|
+
var templateObject_1$n;
|
|
5709
5740
|
|
|
5710
5741
|
var _a$1 = tokens.semantic,
|
|
5711
5742
|
color$6 = _a$1.color,
|
|
5712
|
-
border$
|
|
5713
|
-
motion$
|
|
5743
|
+
border$5 = _a$1.border,
|
|
5744
|
+
motion$8 = _a$1.motion;
|
|
5714
5745
|
var StyledCodeBlock = /*#__PURE__*/styled__default.default.pre.withConfig({
|
|
5715
5746
|
displayName: "CodeBlock__StyledCodeBlock",
|
|
5716
5747
|
componentId: "sc-1p1t0kp-0"
|
|
5717
|
-
})(templateObject_1$
|
|
5748
|
+
})(templateObject_1$m || (templateObject_1$m = __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 /* The block is focusable so keyboard users can scroll it; it shows the system focus ring\n (decision 0029) */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\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\n /* The block is focusable so keyboard users can scroll it; it shows the system focus ring\n (decision 0029) */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n }\n"])), tokens.semantic.surface.raised, border$5["default"], tokens.semantic.radius.sm, tokens.semantic.space[300], tokens.component.codeBlock.fontFamily, tokens.component.codeBlock.fontSize, tokens.component.codeBlock.lineHeight, color$6.text["default"], function (_a) {
|
|
5718
5749
|
var $isExpanded = _a.$isExpanded,
|
|
5719
5750
|
$needsExpansion = _a.$needsExpansion;
|
|
5720
5751
|
return $needsExpansion && !$isExpanded ? 'hidden' : 'auto';
|
|
5721
|
-
}, tokens.semantic.space[200], motion$
|
|
5752
|
+
}, tokens.semantic.space[200], motion$8.duration.slow, motion$8.easing.standard, reducedMotion, function (_a) {
|
|
5722
5753
|
var $maxHeight = _a.$maxHeight,
|
|
5723
5754
|
$isExpanded = _a.$isExpanded,
|
|
5724
5755
|
$needsExpansion = _a.$needsExpansion;
|
|
@@ -5726,11 +5757,11 @@ var StyledCodeBlock = /*#__PURE__*/styled__default.default.pre.withConfig({
|
|
|
5726
5757
|
// Use a large value when expanded to allow smooth transition
|
|
5727
5758
|
// 10000px is effectively "no limit" for most code blocks
|
|
5728
5759
|
return $isExpanded ? 'max-height: 10000px;' : "max-height: ".concat($maxHeight, "px;");
|
|
5729
|
-
}, border$
|
|
5760
|
+
}, border$5.focus, border$5.focusOffset);
|
|
5730
5761
|
var CodeBlockWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5731
5762
|
displayName: "CodeBlock__CodeBlockWrapper",
|
|
5732
5763
|
componentId: "sc-1p1t0kp-1"
|
|
5733
|
-
})(templateObject_2$
|
|
5764
|
+
})(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n position: relative;\n display: inline-block;\n width: 100%;\n"], ["\n position: relative;\n display: inline-block;\n width: 100%;\n"])));
|
|
5734
5765
|
var CopyButtonWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5735
5766
|
displayName: "CodeBlock__CopyButtonWrapper",
|
|
5736
5767
|
componentId: "sc-1p1t0kp-2"
|
|
@@ -5738,7 +5769,7 @@ var CopyButtonWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
5738
5769
|
var ExpandButtonWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5739
5770
|
displayName: "CodeBlock__ExpandButtonWrapper",
|
|
5740
5771
|
componentId: "sc-1p1t0kp-3"
|
|
5741
|
-
})(templateObject_4$h || (templateObject_4$h = __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"])), tokens.semantic.space[200], tokens.semantic.border.width.thin, tokens.semantic.border.width.thin, tokens.semantic.border.width.thin, tokens.semantic.border.width.thin, tokens.semantic.space[200], tokens.semantic.radius.sm, motion$
|
|
5772
|
+
})(templateObject_4$h || (templateObject_4$h = __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"])), tokens.semantic.space[200], tokens.semantic.border.width.thin, tokens.semantic.border.width.thin, tokens.semantic.border.width.thin, tokens.semantic.border.width.thin, tokens.semantic.space[200], tokens.semantic.radius.sm, motion$8.duration.slow, motion$8.easing.standard, motion$8.duration.slow, motion$8.easing.standard, function (_a) {
|
|
5742
5773
|
var $hasGradient = _a.$hasGradient;
|
|
5743
5774
|
return $hasGradient ? "\n margin-top: calc(-1 * ".concat(tokens.semantic.space[800], ");\n padding-top: ").concat(tokens.semantic.space[800], ";\n background: linear-gradient(\n to bottom,\n transparent 0%,\n ").concat(tokens.semantic.surface.raised, " 60%\n );\n ") : "\n background: transparent;\n ";
|
|
5744
5775
|
});
|
|
@@ -5924,19 +5955,19 @@ var CodeBlock = function CodeBlock(_a) {
|
|
|
5924
5955
|
})]
|
|
5925
5956
|
});
|
|
5926
5957
|
};
|
|
5927
|
-
var templateObject_1$
|
|
5958
|
+
var templateObject_1$m, templateObject_2$l, templateObject_3$k, templateObject_4$h, templateObject_5$e;
|
|
5928
5959
|
|
|
5929
5960
|
var StyledHeader$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5930
5961
|
displayName: "DateGroup__StyledHeader",
|
|
5931
5962
|
componentId: "sc-9nfm1f-0"
|
|
5932
|
-
})(templateObject_1$
|
|
5963
|
+
})(templateObject_1$l || (templateObject_1$l = __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"])), tokens.semantic.space[300], tokens.semantic.space[200], tokens.semantic.surface.base, tokens.semantic.border.width.thin, tokens.semantic.color.border["default"], function (_a) {
|
|
5933
5964
|
var $sticky = _a.$sticky;
|
|
5934
5965
|
return $sticky && "\n position: sticky;\n top: 0;\n z-index: ".concat(tokens.semantic.layer.sticky, ";\n box-shadow: ").concat(tokens.semantic.elevation.sticky, ";\n ");
|
|
5935
5966
|
});
|
|
5936
5967
|
var StyledLeftSection = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5937
5968
|
displayName: "DateGroup__StyledLeftSection",
|
|
5938
5969
|
componentId: "sc-9nfm1f-1"
|
|
5939
|
-
})(templateObject_2$
|
|
5970
|
+
})(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n"])), tokens.semantic.space[200]);
|
|
5940
5971
|
var StyledRightSection = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
5941
5972
|
displayName: "DateGroup__StyledRightSection",
|
|
5942
5973
|
componentId: "sc-9nfm1f-2"
|
|
@@ -6016,18 +6047,18 @@ var DateGroup = function DateGroup(_a) {
|
|
|
6016
6047
|
})]
|
|
6017
6048
|
});
|
|
6018
6049
|
};
|
|
6019
|
-
var templateObject_1$
|
|
6050
|
+
var templateObject_1$l, templateObject_2$k, templateObject_3$j, templateObject_4$g;
|
|
6020
6051
|
|
|
6021
|
-
var semantic$
|
|
6052
|
+
var semantic$d = tokens.semantic;
|
|
6022
6053
|
var StyledContainer$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6023
6054
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6024
6055
|
return !prop.startsWith('$');
|
|
6025
6056
|
},
|
|
6026
6057
|
displayName: "EmptyState__StyledContainer",
|
|
6027
6058
|
componentId: "sc-1u5hxh-0"
|
|
6028
|
-
})(templateObject_1$
|
|
6059
|
+
})(templateObject_1$k || (templateObject_1$k = __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"])), tokens.component.emptyState.maxWidth, function (_a) {
|
|
6029
6060
|
var $size = _a.$size;
|
|
6030
|
-
return $size === 'small' ? semantic$
|
|
6061
|
+
return $size === 'small' ? semantic$d.space[800] : $size === 'large' ? semantic$d.space[1400] : semantic$d.space[1000];
|
|
6031
6062
|
});
|
|
6032
6063
|
var StyledIllustration = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6033
6064
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -6035,22 +6066,22 @@ var StyledIllustration = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6035
6066
|
},
|
|
6036
6067
|
displayName: "EmptyState__StyledIllustration",
|
|
6037
6068
|
componentId: "sc-1u5hxh-1"
|
|
6038
|
-
})(templateObject_2$
|
|
6069
|
+
})(templateObject_2$j || (templateObject_2$j = __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) {
|
|
6039
6070
|
var $size = _a.$size;
|
|
6040
6071
|
return $size === 'small' ? tokens.component.emptyState.illustration.small : $size === 'large' ? tokens.component.emptyState.illustration.large : tokens.component.emptyState.illustration.medium;
|
|
6041
6072
|
}, function (_a) {
|
|
6042
6073
|
var $size = _a.$size;
|
|
6043
6074
|
return $size === 'small' ? tokens.component.emptyState.illustration.small : $size === 'large' ? tokens.component.emptyState.illustration.large : tokens.component.emptyState.illustration.medium;
|
|
6044
|
-
}, semantic$
|
|
6075
|
+
}, semantic$d.space[600], function (_a) {
|
|
6045
6076
|
var $variant = _a.$variant;
|
|
6046
|
-
return $variant === 'error' ? semantic$
|
|
6077
|
+
return $variant === 'error' ? semantic$d.color.icon.danger : $variant === 'success' ? semantic$d.color.icon.success : semantic$d.color.icon.muted;
|
|
6047
6078
|
});
|
|
6048
6079
|
var StyledTextContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6049
6080
|
displayName: "EmptyState__StyledTextContainer",
|
|
6050
6081
|
componentId: "sc-1u5hxh-2"
|
|
6051
6082
|
})(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n max-width: ", ";\n margin-bottom: ", ";\n"], ["\n max-width: ", ";\n margin-bottom: ", ";\n"
|
|
6052
6083
|
// Map illustration type to icon name
|
|
6053
|
-
])), tokens.component.emptyState.text.maxWidth, semantic$
|
|
6084
|
+
])), tokens.component.emptyState.text.maxWidth, semantic$d.space[600]);
|
|
6054
6085
|
// Map illustration type to icon name
|
|
6055
6086
|
var illustrationToIcon = {
|
|
6056
6087
|
search: 'search',
|
|
@@ -6105,7 +6136,7 @@ var EmptyState = function EmptyState(_a) {
|
|
|
6105
6136
|
children: title
|
|
6106
6137
|
}), jsxRuntime.jsx("div", {
|
|
6107
6138
|
style: {
|
|
6108
|
-
marginTop: semantic$
|
|
6139
|
+
marginTop: semantic$d.space[300]
|
|
6109
6140
|
},
|
|
6110
6141
|
children: jsxRuntime.jsx(Typography, {
|
|
6111
6142
|
variant: "body",
|
|
@@ -6135,25 +6166,25 @@ var EmptyState = function EmptyState(_a) {
|
|
|
6135
6166
|
})]
|
|
6136
6167
|
});
|
|
6137
6168
|
};
|
|
6138
|
-
var templateObject_1$
|
|
6169
|
+
var templateObject_1$k, templateObject_2$j, templateObject_3$i;
|
|
6139
6170
|
|
|
6140
|
-
var space$
|
|
6171
|
+
var space$b = tokens.semantic.space;
|
|
6141
6172
|
var FeatureBlockStyled = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6142
6173
|
displayName: "FeatureBlock__FeatureBlockStyled",
|
|
6143
6174
|
componentId: "sc-1mi4lso-0"
|
|
6144
|
-
})(templateObject_1$
|
|
6175
|
+
})(templateObject_1$j || (templateObject_1$j = __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 /* The image isn't clickable, so it doesn't answer hover (issue 185, P5) */\n img {\n border-radius: ", ";\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 /* The image isn't clickable, so it doesn't answer hover (issue 185, P5) */\n img {\n border-radius: ", ";\n }\n\n a {\n text-decoration: none;\n }\n"])), tokens.semantic.breakpoint.md, tokens.semantic.breakpoint.lg, space$b[1200], tokens.semantic.radius['2xl']);
|
|
6145
6176
|
var ImageWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6146
6177
|
displayName: "FeatureBlock__ImageWrapper",
|
|
6147
6178
|
componentId: "sc-1mi4lso-1"
|
|
6148
|
-
})(templateObject_2$
|
|
6179
|
+
})(templateObject_2$i || (templateObject_2$i = __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"])), tokens.semantic.breakpoint.lg);
|
|
6149
6180
|
var ContentSection = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6150
6181
|
displayName: "FeatureBlock__ContentSection",
|
|
6151
6182
|
componentId: "sc-1mi4lso-2"
|
|
6152
|
-
})(templateObject_3$h || (templateObject_3$h = __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"])), space$
|
|
6183
|
+
})(templateObject_3$h || (templateObject_3$h = __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"])), space$b[600], tokens.semantic.breakpoint.lg, space$b[800], tokens.semantic.breakpoint.xl, space$b[2400]);
|
|
6153
6184
|
var ButtonWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6154
6185
|
displayName: "FeatureBlock__ButtonWrapper",
|
|
6155
6186
|
componentId: "sc-1mi4lso-3"
|
|
6156
|
-
})(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n button {\n margin-top: ", ";\n }\n"], ["\n button {\n margin-top: ", ";\n }\n"])), space$
|
|
6187
|
+
})(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n button {\n margin-top: ", ";\n }\n"], ["\n button {\n margin-top: ", ";\n }\n"])), space$b[400]);
|
|
6157
6188
|
var ContentWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6158
6189
|
displayName: "FeatureBlock__ContentWrapper",
|
|
6159
6190
|
componentId: "sc-1mi4lso-4"
|
|
@@ -6216,13 +6247,13 @@ var FeatureBlock = function FeatureBlock(_a) {
|
|
|
6216
6247
|
}), jsxRuntime.jsx(Divider, {})]
|
|
6217
6248
|
});
|
|
6218
6249
|
};
|
|
6219
|
-
var templateObject_1$
|
|
6250
|
+
var templateObject_1$j, templateObject_2$i, templateObject_3$h, templateObject_4$f, templateObject_5$d;
|
|
6220
6251
|
|
|
6221
6252
|
var _a = tokens.semantic,
|
|
6222
|
-
border$
|
|
6253
|
+
border$4 = _a.border,
|
|
6223
6254
|
elevation$2 = _a.elevation,
|
|
6224
|
-
motion$
|
|
6225
|
-
space$
|
|
6255
|
+
motion$7 = _a.motion,
|
|
6256
|
+
space$a = _a.space,
|
|
6226
6257
|
_b = tokens.component,
|
|
6227
6258
|
input$1 = _b.input,
|
|
6228
6259
|
field$3 = _b.field;
|
|
@@ -6231,21 +6262,21 @@ var _a = tokens.semantic,
|
|
|
6231
6262
|
// their content (decision 0034). The small vertical padding only matters when a long
|
|
6232
6263
|
// label wraps; a single line is shorter than the minimum.
|
|
6233
6264
|
var controlPaddingX = tokens.semantic.space.inset.lg;
|
|
6234
|
-
var controlPaddingY = space$
|
|
6265
|
+
var controlPaddingY = space$a[200];
|
|
6235
6266
|
var controlHeight = tokens.semantic.size.control.lg;
|
|
6236
|
-
var duration = motion$
|
|
6237
|
-
easing = motion$
|
|
6267
|
+
var duration = motion$7.duration,
|
|
6268
|
+
easing = motion$7.easing;
|
|
6238
6269
|
var DropdownContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6239
6270
|
displayName: "Dropdown__DropdownContainer",
|
|
6240
6271
|
componentId: "sc-kz07c4-0"
|
|
6241
|
-
})(templateObject_1$
|
|
6272
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n position: relative;\n width: 100%;\n"], ["\n position: relative;\n width: 100%;\n"])));
|
|
6242
6273
|
var DropdownTrigger = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
6243
6274
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6244
6275
|
return !prop.startsWith('$');
|
|
6245
6276
|
},
|
|
6246
6277
|
displayName: "Dropdown__DropdownTrigger",
|
|
6247
6278
|
componentId: "sc-kz07c4-1"
|
|
6248
|
-
})(templateObject_2$
|
|
6279
|
+
})(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box; /* the min-height includes the border, without relying on a global reset */\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor: not-allowed;\n }\n \n ", "\n"], ["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box; /* the min-height includes the border, without relying on a global reset */\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n font: ", ";\n color: ", ";\n cursor: pointer;\n transition: border-color ", " ", ",\n outline ", " ", ";\n \n &:hover:not(:disabled) {\n border-color: ", ";\n }\n \n &:focus {\n border-color: ", ";\n outline: ", ";\n outline-offset: ", ";\n }\n \n &:disabled {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n cursor: not-allowed;\n }\n \n ", "\n"])), controlHeight, controlPaddingY, controlPaddingX, input$1["default"].backgroundColor, input$1["default"].borderWidth, function (_a) {
|
|
6249
6280
|
var $hasError = _a.$hasError;
|
|
6250
6281
|
return $hasError ? input$1.error.borderColor : input$1["default"].borderColor;
|
|
6251
6282
|
}, input$1["default"].borderRadius, input$1["default"].font, input$1["default"].textColor, duration.moderate, easing.standard, duration.moderate, easing.standard, function (_a) {
|
|
@@ -6254,7 +6285,7 @@ var DropdownTrigger = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
6254
6285
|
}, function (_a) {
|
|
6255
6286
|
var $hasError = _a.$hasError;
|
|
6256
6287
|
return $hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor;
|
|
6257
|
-
}, input$1.focus.outline, border$
|
|
6288
|
+
}, input$1.focus.outline, border$4.focusOffset, input$1.disabled.backgroundColor, input$1.disabled.textColor, input$1.disabled.borderColor, function (_a) {
|
|
6258
6289
|
var $isOpen = _a.$isOpen,
|
|
6259
6290
|
$hasError = _a.$hasError;
|
|
6260
6291
|
return $isOpen && "\n border-color: ".concat($hasError ? input$1.error.focus.borderColor : input$1.focus.borderColor, ";\n ");
|
|
@@ -6265,7 +6296,7 @@ var DropdownIcon = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6265
6296
|
},
|
|
6266
6297
|
displayName: "Dropdown__DropdownIcon",
|
|
6267
6298
|
componentId: "sc-kz07c4-2"
|
|
6268
|
-
})(templateObject_3$g || (templateObject_3$g = __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"])), space$
|
|
6299
|
+
})(templateObject_3$g || (templateObject_3$g = __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"])), space$a[200], duration.fast, easing.decelerate, function (_a) {
|
|
6269
6300
|
var $isOpen = _a.$isOpen;
|
|
6270
6301
|
return $isOpen && "\n transform: rotate(180deg);\n ";
|
|
6271
6302
|
}, reducedMotion);
|
|
@@ -6275,7 +6306,7 @@ var DropdownMenu = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6275
6306
|
},
|
|
6276
6307
|
displayName: "Dropdown__DropdownMenu",
|
|
6277
6308
|
componentId: "sc-kz07c4-3"
|
|
6278
|
-
})(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"], ["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"])), tokens.semantic.layer.dropdown,
|
|
6309
|
+
})(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n /* A floating layer: one step above raised content in the dark theme (issue 356) */\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n /* The panel radius Menu and SearchField share, not the control token (decision 0055) */\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\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 /* A floating layer: one step above raised content in the dark theme (issue 356) */\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n /* The panel radius Menu and SearchField share, not the control token (decision 0055) */\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: opacity ", " ", ",\n visibility ", " ", ",\n transform ", " ", ";\n max-height: ", ";\n overflow-y: auto;\n\n ", " {\n transform: none;\n }\n"])), tokens.semantic.layer.dropdown, tokens.semantic.surface.overlay, border$4["default"], tokens.semantic.radius.md, elevation$2.floating, space$a[100], function (_a) {
|
|
6279
6310
|
var $isOpen = _a.$isOpen;
|
|
6280
6311
|
return $isOpen ? 1 : 0;
|
|
6281
6312
|
}, function (_a) {
|
|
@@ -6291,21 +6322,21 @@ var DropdownOption = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
6291
6322
|
},
|
|
6292
6323
|
displayName: "Dropdown__DropdownOption",
|
|
6293
6324
|
componentId: "sc-kz07c4-4"
|
|
6294
|
-
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n box-sizing: border-box; /* the min-height includes the border, without relying on a global reset */\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ", color ", " ", ";\n\n /* The shared row states (decisions 0029, 0030): focus shows the hover state in grey; only the\n selected option is light blue, with its text darkening with the fill */\n ", "\n \n &:focus {\n outline: none;\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"], ["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n box-sizing: border-box; /* the min-height includes the border, without relying on a global reset */\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ", color ", " ", ";\n\n /* The shared row states (decisions 0029, 0030): focus shows the hover state in grey; only the\n selected option is light blue, with its text darkening with the fill */\n ", "\n \n &:focus {\n outline: none;\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"])), space$
|
|
6325
|
+
})(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n box-sizing: border-box; /* the min-height includes the border, without relying on a global reset */\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ", color ", " ", ";\n\n /* The shared row states (decisions 0029, 0030): focus shows the hover state in grey; only the\n selected option is light blue, with its text darkening with the fill */\n ", "\n \n &:focus {\n outline: none;\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"], ["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", ";\n box-sizing: border-box; /* the min-height includes the border, without relying on a global reset */\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ", color ", " ", ";\n\n /* The shared row states (decisions 0029, 0030): focus shows the hover state in grey; only the\n selected option is light blue, with its text darkening with the fill */\n ", "\n \n &:focus {\n outline: none;\n }\n \n &:not(:last-child) {\n border-bottom: ", ";\n }\n"])), space$a[200], controlHeight, controlPaddingY, controlPaddingX, input$1["default"].font, input$1["default"].textColor, duration.fast, easing.decelerate, duration.fast, easing.decelerate, function (_a) {
|
|
6295
6326
|
var $isSelected = _a.$isSelected,
|
|
6296
6327
|
$isFocused = _a.$isFocused;
|
|
6297
6328
|
return interactiveRow({
|
|
6298
6329
|
selected: $isSelected,
|
|
6299
6330
|
focused: $isFocused
|
|
6300
6331
|
});
|
|
6301
|
-
}, border$
|
|
6332
|
+
}, border$4["default"]);
|
|
6302
6333
|
var StyledHelperText$3 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6303
6334
|
displayName: "Dropdown__StyledHelperText",
|
|
6304
6335
|
componentId: "sc-kz07c4-5"
|
|
6305
6336
|
})(templateObject_6$b || (templateObject_6$b = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"], ["\n font: ", ";\n color: ", ";\n margin-top: ", ";\n"])), field$3.helperText.typography, function (_a) {
|
|
6306
6337
|
var $hasError = _a.$hasError;
|
|
6307
6338
|
return $hasError ? field$3.helperText.colorError : field$3.helperText.color;
|
|
6308
|
-
}, space$
|
|
6339
|
+
}, space$a[200]);
|
|
6309
6340
|
var Dropdown = function Dropdown(_a) {
|
|
6310
6341
|
var options = _a.options,
|
|
6311
6342
|
value = _a.value,
|
|
@@ -6428,7 +6459,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
6428
6459
|
htmlFor: dropdownId,
|
|
6429
6460
|
style: {
|
|
6430
6461
|
display: 'block',
|
|
6431
|
-
marginBottom: space$
|
|
6462
|
+
marginBottom: space$a[200]
|
|
6432
6463
|
},
|
|
6433
6464
|
children: jsxRuntime.jsx(Typography, {
|
|
6434
6465
|
variant: "label",
|
|
@@ -6485,18 +6516,18 @@ var Dropdown = function Dropdown(_a) {
|
|
|
6485
6516
|
})]
|
|
6486
6517
|
});
|
|
6487
6518
|
};
|
|
6488
|
-
var templateObject_1$
|
|
6519
|
+
var templateObject_1$i, templateObject_2$h, templateObject_3$g, templateObject_4$e, templateObject_5$c, templateObject_6$b;
|
|
6489
6520
|
|
|
6490
|
-
var semantic$
|
|
6521
|
+
var semantic$c = tokens.semantic;
|
|
6491
6522
|
var StyledList = /*#__PURE__*/styled__default.default.ul.withConfig({
|
|
6492
6523
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
6493
6524
|
return !prop.startsWith('$');
|
|
6494
6525
|
},
|
|
6495
6526
|
displayName: "List__StyledList",
|
|
6496
6527
|
componentId: "sc-1irksg5-0"
|
|
6497
|
-
})(templateObject_1$
|
|
6528
|
+
})(templateObject_1$h || (templateObject_1$h = __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) {
|
|
6498
6529
|
var $dividers = _a.$dividers;
|
|
6499
|
-
return $dividers && "\n > li:not(:last-child) {\n border-bottom: ".concat(semantic$
|
|
6530
|
+
return $dividers && "\n > li:not(:last-child) {\n border-bottom: ".concat(semantic$c.border.width.thin, " solid ").concat(semantic$c.color.border["default"], ";\n }\n ");
|
|
6500
6531
|
});
|
|
6501
6532
|
var List$2 = function List(_a) {
|
|
6502
6533
|
var children = _a.children,
|
|
@@ -6520,17 +6551,17 @@ var List$2 = function List(_a) {
|
|
|
6520
6551
|
});
|
|
6521
6552
|
};
|
|
6522
6553
|
List$2.displayName = 'List';
|
|
6523
|
-
var templateObject_1$
|
|
6554
|
+
var templateObject_1$h;
|
|
6524
6555
|
|
|
6525
|
-
var semantic$
|
|
6526
|
-
var space$
|
|
6527
|
-
color$5 = semantic$
|
|
6528
|
-
motion$
|
|
6529
|
-
radius$
|
|
6530
|
-
size$
|
|
6531
|
-
elevation$1 = semantic$
|
|
6532
|
-
border$
|
|
6533
|
-
typography$3 = semantic$
|
|
6556
|
+
var semantic$b = tokens.semantic;
|
|
6557
|
+
var space$9 = semantic$b.space,
|
|
6558
|
+
color$5 = semantic$b.color,
|
|
6559
|
+
motion$6 = semantic$b.motion,
|
|
6560
|
+
radius$1 = semantic$b.radius,
|
|
6561
|
+
size$5 = semantic$b.size,
|
|
6562
|
+
elevation$1 = semantic$b.elevation,
|
|
6563
|
+
border$3 = semantic$b.border,
|
|
6564
|
+
typography$3 = semantic$b.typography;
|
|
6534
6565
|
// Typeahead keeps typed characters together for this long. An input timing, not a motion value.
|
|
6535
6566
|
var TYPEAHEAD_RESET_MS = 500;
|
|
6536
6567
|
var ITEM_SELECTOR = '[role="menuitem"], [role="menuitemradio"], [role="menuitemcheckbox"]';
|
|
@@ -6540,8 +6571,8 @@ var useMenu = function useMenu(component) {
|
|
|
6540
6571
|
if (!context) throw new Error("".concat(component, " must be used inside a Menu"));
|
|
6541
6572
|
return context;
|
|
6542
6573
|
};
|
|
6543
|
-
var enter = styled.keyframes(templateObject_1$
|
|
6544
|
-
var fade = styled.keyframes(templateObject_2$
|
|
6574
|
+
var enter = styled.keyframes(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translateY(calc(-1 * ", "));\n }\n"], ["\n from {\n opacity: 0;\n transform: translateY(calc(-1 * ", "));\n }\n"])), motion$6.distance.sm);
|
|
6575
|
+
var fade$1 = styled.keyframes(templateObject_2$g || (templateObject_2$g = __makeTemplateObject(["\n from { opacity: 0; }\n"], ["\n from { opacity: 0; }\n"
|
|
6545
6576
|
// Dropdown's panel (P5): the raised surface with a decorative outline and floating elevation,
|
|
6546
6577
|
// dropping in over duration.fast (0037); under reduced motion it only fades (0015)
|
|
6547
6578
|
])));
|
|
@@ -6553,12 +6584,12 @@ var Panel = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6553
6584
|
},
|
|
6554
6585
|
displayName: "Menu__Panel",
|
|
6555
6586
|
componentId: "sc-13mple2-0"
|
|
6556
|
-
})(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n min-width: ", ";\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"], ["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n min-width: ", ";\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"
|
|
6587
|
+
})(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n /* At least the trigger's width when matchTriggerWidth sets the variable, within the usual range */\n min-width: min(max(", ", var(", ", 0px)), ", ");\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"], ["\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n /* At least the trigger's width when matchTriggerWidth sets the variable, within the usual range */\n min-width: min(max(", ", var(", ", 0px)), ", ");\n max-width: ", ";\n max-height: ", ";\n overflow-y: auto;\n padding: ", " 0;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n animation: ", " ", " ", "\n ", ";\n\n ", " {\n animation: ", " ", " ", "\n ", ";\n }\n\n ", "\n\n &:focus {\n outline: none;\n }\n"
|
|
6557
6588
|
// The trigger's wrapper takes no box of its own
|
|
6558
|
-
])), size$
|
|
6589
|
+
])), size$5[4500], ANCHOR_WIDTH_VAR, size$5[7500], size$5[7500], size$5.menu.maxHeight, space$9[100], semantic$b.surface.overlay, color$5.text["default"], border$3["default"], radius$1.md, elevation$1.floating, enter, motion$6.duration.fast, motion$6.easing.decelerate, function (_a) {
|
|
6559
6590
|
var $exiting = _a.$exiting;
|
|
6560
6591
|
return $exiting ? exitAnimation : styled.css(templateObject_3$f || (templateObject_3$f = __makeTemplateObject([""], [""])));
|
|
6561
|
-
}, reducedMotion, fade, motion$
|
|
6592
|
+
}, reducedMotion, fade$1, motion$6.duration.fast, motion$6.easing.decelerate, function (_a) {
|
|
6562
6593
|
var $exiting = _a.$exiting;
|
|
6563
6594
|
return $exiting ? exitAnimation : styled.css(templateObject_4$d || (templateObject_4$d = __makeTemplateObject([""], [""])));
|
|
6564
6595
|
}, forcedColorsEdge);
|
|
@@ -6587,6 +6618,8 @@ var Menu = function Menu(_a) {
|
|
|
6587
6618
|
side = _c === void 0 ? 'bottom' : _c,
|
|
6588
6619
|
_d = _a.align,
|
|
6589
6620
|
align = _d === void 0 ? 'start' : _d,
|
|
6621
|
+
_e = _a.matchTriggerWidth,
|
|
6622
|
+
matchTriggerWidth = _e === void 0 ? false : _e,
|
|
6590
6623
|
dataTestId = _a["data-testid"];
|
|
6591
6624
|
var menuId = React.useId();
|
|
6592
6625
|
var triggerId = React.useId();
|
|
@@ -6599,14 +6632,14 @@ var Menu = function Menu(_a) {
|
|
|
6599
6632
|
text: '',
|
|
6600
6633
|
timer: undefined
|
|
6601
6634
|
});
|
|
6602
|
-
var
|
|
6603
|
-
uncontrolledOpen =
|
|
6604
|
-
setUncontrolledOpen =
|
|
6635
|
+
var _f = React.useState(defaultOpen),
|
|
6636
|
+
uncontrolledOpen = _f[0],
|
|
6637
|
+
setUncontrolledOpen = _f[1];
|
|
6605
6638
|
var isControlled = openProp !== undefined;
|
|
6606
6639
|
var isOpen = isControlled ? openProp : uncontrolledOpen;
|
|
6607
|
-
var
|
|
6608
|
-
isPresent =
|
|
6609
|
-
isExiting =
|
|
6640
|
+
var _g = usePresence(isOpen),
|
|
6641
|
+
isPresent = _g.isPresent,
|
|
6642
|
+
isExiting = _g.isExiting;
|
|
6610
6643
|
var triggerElement = function triggerElement() {
|
|
6611
6644
|
return laidOutElement(anchorRef.current);
|
|
6612
6645
|
};
|
|
@@ -6657,6 +6690,7 @@ var Menu = function Menu(_a) {
|
|
|
6657
6690
|
anchorRef: anchorRef,
|
|
6658
6691
|
side: side,
|
|
6659
6692
|
align: align,
|
|
6693
|
+
matchAnchorWidth: matchTriggerWidth,
|
|
6660
6694
|
onDetach: detach
|
|
6661
6695
|
});
|
|
6662
6696
|
// Opening from the trigger focuses the first or last item. An open that didn't come from the
|
|
@@ -6783,13 +6817,13 @@ var Row$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6783
6817
|
},
|
|
6784
6818
|
displayName: "Menu__Row",
|
|
6785
6819
|
componentId: "sc-13mple2-2"
|
|
6786
|
-
})(templateObject_8$7 || (templateObject_8$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n min-height: ", ";\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n cursor: ", ";\n user-select: none;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030): focus shows the hover state (0029); only checked items are\n light blue, with the checkmark so the state isn't colour alone */\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n min-height: ", ";\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n cursor: ", ";\n user-select: none;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030): focus shows the hover state (0029); only checked items are\n light blue, with the checkmark so the state isn't colour alone */\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"])), space$
|
|
6820
|
+
})(templateObject_8$7 || (templateObject_8$7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n min-height: ", ";\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n cursor: ", ";\n user-select: none;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030): focus shows the hover state (0029); only checked items are\n light blue, with the checkmark so the state isn't colour alone */\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n min-height: ", ";\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n cursor: ", ";\n user-select: none;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030): focus shows the hover state (0029); only checked items are\n light blue, with the checkmark so the state isn't colour alone */\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"])), space$9[200], size$5.row.sm, space$9.inset.xs, space$9.inset.md, typography$3.small, function (_a) {
|
|
6787
6821
|
var $destructive = _a.$destructive;
|
|
6788
6822
|
return $destructive ? color$5.text.danger : color$5.text["default"];
|
|
6789
6823
|
}, function (_a) {
|
|
6790
6824
|
var $disabled = _a.$disabled;
|
|
6791
6825
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
6792
|
-
}, motion$
|
|
6826
|
+
}, motion$6.duration.fast, motion$6.easing.decelerate, motion$6.duration.fast, motion$6.easing.decelerate, function (_a) {
|
|
6793
6827
|
var $checked = _a.$checked,
|
|
6794
6828
|
$focused = _a.$focused,
|
|
6795
6829
|
$disabled = _a.$disabled;
|
|
@@ -6800,8 +6834,8 @@ var Row$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6800
6834
|
});
|
|
6801
6835
|
}, function (_a) {
|
|
6802
6836
|
var $disabled = _a.$disabled;
|
|
6803
|
-
return $disabled && styled.css(templateObject_7$
|
|
6804
|
-
}, border$
|
|
6837
|
+
return $disabled && styled.css(templateObject_7$9 || (templateObject_7$9 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), color$5.text.disabled);
|
|
6838
|
+
}, border$3.focus, border$3.focusOffset);
|
|
6805
6839
|
var Leading = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
6806
6840
|
displayName: "Menu__Leading",
|
|
6807
6841
|
componentId: "sc-13mple2-3"
|
|
@@ -6809,7 +6843,7 @@ var Leading = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
6809
6843
|
var Text = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
6810
6844
|
displayName: "Menu__Text",
|
|
6811
6845
|
componentId: "sc-13mple2-4"
|
|
6812
|
-
})(templateObject_10$
|
|
6846
|
+
})(templateObject_10$4 || (templateObject_10$4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n"], ["\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n"])));
|
|
6813
6847
|
var Description = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
6814
6848
|
displayName: "Menu__Description",
|
|
6815
6849
|
componentId: "sc-13mple2-5"
|
|
@@ -6943,7 +6977,7 @@ var GroupLabel = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6943
6977
|
displayName: "Menu__GroupLabel",
|
|
6944
6978
|
componentId: "sc-13mple2-8"
|
|
6945
6979
|
})(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n"], ["\n padding: ", " ", ";\n font: ", ";\n color: ", ";\n"
|
|
6946
|
-
/** Groups related items. Radio and checkbox items always sit in a group. */])), space$
|
|
6980
|
+
/** Groups related items. Radio and checkbox items always sit in a group. */])), space$9.inset.xs, space$9.inset.md, typography$3.caption, color$5.text.muted);
|
|
6947
6981
|
/** Groups related items. Radio and checkbox items always sit in a group. */
|
|
6948
6982
|
var MenuGroup = function MenuGroup(_a) {
|
|
6949
6983
|
var label = _a.label,
|
|
@@ -6965,7 +6999,7 @@ var Separator = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6965
6999
|
displayName: "Menu__Separator",
|
|
6966
7000
|
componentId: "sc-13mple2-9"
|
|
6967
7001
|
})(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject(["\n margin: ", " 0;\n border-top: ", ";\n"], ["\n margin: ", " 0;\n border-top: ", ";\n"
|
|
6968
|
-
/** Separates groups */])), space$
|
|
7002
|
+
/** Separates groups */])), space$9[100], border$3["default"]);
|
|
6969
7003
|
/** Separates groups */
|
|
6970
7004
|
var MenuDivider = function MenuDivider() {
|
|
6971
7005
|
return jsxRuntime.jsx(Separator, {
|
|
@@ -6978,7 +7012,7 @@ MenuItemRadio.displayName = 'MenuItemRadio';
|
|
|
6978
7012
|
MenuItemCheckbox.displayName = 'MenuItemCheckbox';
|
|
6979
7013
|
MenuGroup.displayName = 'MenuGroup';
|
|
6980
7014
|
MenuDivider.displayName = 'MenuDivider';
|
|
6981
|
-
var templateObject_1$
|
|
7015
|
+
var templateObject_1$g, templateObject_2$g, templateObject_3$f, templateObject_4$d, templateObject_5$b, templateObject_6$a, templateObject_7$9, templateObject_8$7, templateObject_9$6, templateObject_10$4, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15$1;
|
|
6982
7016
|
|
|
6983
7017
|
var SidebarNavContext = /*#__PURE__*/React.createContext({
|
|
6984
7018
|
collapsed: false,
|
|
@@ -6988,13 +7022,72 @@ var useSidebarNav = function useSidebarNav() {
|
|
|
6988
7022
|
return React.useContext(SidebarNavContext);
|
|
6989
7023
|
};
|
|
6990
7024
|
|
|
7025
|
+
// How SidebarNav's pieces move between expanded and the rail (issue 348), shared by the nav, its rows
|
|
7026
|
+
// and its sections so they move as one: nothing unmounts or re-lays out mid-move.
|
|
7027
|
+
var semantic$a = tokens.semantic,
|
|
7028
|
+
component$2 = tokens.component;
|
|
7029
|
+
var motion$5 = semantic$a.motion,
|
|
7030
|
+
space$8 = semantic$a.space,
|
|
7031
|
+
size$4 = semantic$a.size;
|
|
7032
|
+
/**
|
|
7033
|
+
* SidebarNav sets this on itself: its expanded width. Content inside keeps that width while the nav
|
|
7034
|
+
* narrows, so the nav's edge clips it instead of it reflowing or ellipsising mid-move.
|
|
7035
|
+
*/
|
|
7036
|
+
var EXPANDED_WIDTH_VAR = '--co-sidebar-nav-expanded';
|
|
7037
|
+
/**
|
|
7038
|
+
* SidebarNav sets this to its body's scrollbar width (0 for overlay scrollbars), measured while
|
|
7039
|
+
* expanded, since a classic scrollbar narrows every row
|
|
7040
|
+
*/
|
|
7041
|
+
var SCROLLBAR_VAR = '--co-sidebar-nav-scrollbar';
|
|
7042
|
+
/** The nav's own side padding: the rail's inner width is the rail less twice this */
|
|
7043
|
+
var NAV_PADDING = space$8[200];
|
|
7044
|
+
/** A row's left inset: centres an icon in the rail, and stays the same expanded, so icons never move */
|
|
7045
|
+
var ROW_INSET = "calc((".concat(component$2.sidebarNav.width.rail, " - 2 * ").concat(NAV_PADDING, " - ").concat(size$4.icon.md, ") / 2)");
|
|
7046
|
+
/**
|
|
7047
|
+
* Fades content that the rail doesn't show (labels, meta text, the badge count, the header and
|
|
7048
|
+
* footer). Leaving is quick and accelerates; arriving decelerates over the width's duration (0037).
|
|
7049
|
+
* Hidden content also leaves the keyboard and screen readers once the fade ends.
|
|
7050
|
+
*/
|
|
7051
|
+
var fade = function fade(hidden) {
|
|
7052
|
+
return styled.css(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n opacity: ", ";\n /* Shown content inherits, so anything hidden around it (a folded section) still wins */\n visibility: ", ";\n transition: ", ";\n"], ["\n opacity: ", ";\n /* Shown content inherits, so anything hidden around it (a folded section) still wins */\n visibility: ", ";\n transition: ", ";\n"
|
|
7053
|
+
/**
|
|
7054
|
+
* Folds something away (its height animates to nothing, with a fade), for what the rail leaves out:
|
|
7055
|
+
* a section's header, a section with nothing to show, an item without an icon. Under reduced motion
|
|
7056
|
+
* the height changes at once and only the fade remains (0015).
|
|
7057
|
+
*/])), hidden ? 0 : 1, hidden ? 'hidden' : 'inherit', hidden ? "opacity ".concat(motion$5.duration.fast, " ").concat(motion$5.easing.accelerate, ", visibility ").concat(motion$5.duration.fast, " ").concat(motion$5.easing.accelerate) : "opacity ".concat(motion$5.duration.moderate, " ").concat(motion$5.easing.decelerate, ", visibility ").concat(motion$5.duration.moderate, " ").concat(motion$5.easing.decelerate));
|
|
7058
|
+
};
|
|
7059
|
+
/**
|
|
7060
|
+
* Folds something away (its height animates to nothing, with a fade), for what the rail leaves out:
|
|
7061
|
+
* a section's header, a section with nothing to show, an item without an icon. Under reduced motion
|
|
7062
|
+
* the height changes at once and only the fade remains (0015).
|
|
7063
|
+
*/
|
|
7064
|
+
var Fold = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7065
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7066
|
+
return !prop.startsWith('$');
|
|
7067
|
+
},
|
|
7068
|
+
displayName: "sidebarNavMotion__Fold",
|
|
7069
|
+
componentId: "sc-1h4byrj-0"
|
|
7070
|
+
})(templateObject_2$f || (templateObject_2$f = __makeTemplateObject(["\n display: grid;\n grid-template-rows: ", ";\n ", "\n transition: grid-template-rows ", " ", ",\n ", ";\n\n /* Clipped only while folded: once open, focus rings outside a control aren't cut off */\n & > * {\n min-height: 0;\n overflow: ", ";\n }\n\n ", " {\n transition: opacity ", " ", ",\n visibility ", " ", ";\n }\n"], ["\n display: grid;\n grid-template-rows: ", ";\n ", "\n transition: grid-template-rows ", " ", ",\n ", ";\n\n /* Clipped only while folded: once open, focus rings outside a control aren't cut off */\n & > * {\n min-height: 0;\n overflow: ", ";\n }\n\n ", " {\n transition: opacity ", " ", ",\n visibility ", " ", ";\n }\n"])), function (_a) {
|
|
7071
|
+
var $open = _a.$open;
|
|
7072
|
+
return $open ? '1fr' : '0fr';
|
|
7073
|
+
}, function (_a) {
|
|
7074
|
+
var $open = _a.$open;
|
|
7075
|
+
return fade(!$open);
|
|
7076
|
+
}, motion$5.duration.moderate, motion$5.easing.decelerate, function (_a) {
|
|
7077
|
+
var $open = _a.$open;
|
|
7078
|
+
return $open ? "opacity ".concat(motion$5.duration.moderate, " ").concat(motion$5.easing.decelerate, ", visibility ").concat(motion$5.duration.moderate, " ").concat(motion$5.easing.decelerate) : "opacity ".concat(motion$5.duration.fast, " ").concat(motion$5.easing.accelerate, ", visibility ").concat(motion$5.duration.moderate, " ").concat(motion$5.easing.accelerate);
|
|
7079
|
+
}, function (_a) {
|
|
7080
|
+
var $open = _a.$open;
|
|
7081
|
+
return $open ? 'visible' : 'hidden';
|
|
7082
|
+
}, reducedMotion, motion$5.duration.fast, motion$5.easing.decelerate, motion$5.duration.fast, motion$5.easing.decelerate);
|
|
7083
|
+
var templateObject_1$f, templateObject_2$f;
|
|
7084
|
+
|
|
6991
7085
|
var semantic$9 = tokens.semantic;
|
|
6992
7086
|
var space$7 = semantic$9.space,
|
|
6993
7087
|
color$4 = semantic$9.color,
|
|
6994
7088
|
motion$4 = semantic$9.motion,
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
border$3 = semantic$9.border,
|
|
7089
|
+
size$3 = semantic$9.size,
|
|
7090
|
+
border$2 = semantic$9.border,
|
|
6998
7091
|
typography$2 = semantic$9.typography;
|
|
6999
7092
|
// Anything without a scheme (https:, mailto:) or a protocol-relative start is the app's own URL,
|
|
7000
7093
|
// relative ones included, so it goes through the router's link
|
|
@@ -7007,7 +7100,10 @@ var Row = /*#__PURE__*/styled__default.default.a.withConfig({
|
|
|
7007
7100
|
},
|
|
7008
7101
|
displayName: "SidebarNavItem__Row",
|
|
7009
7102
|
componentId: "sc-1nfqk5n-0"
|
|
7010
|
-
})(
|
|
7103
|
+
})(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n /* The row's height is its token, with the content centred (as controls, 0034): vertical\n padding would hold a compact row above its 24px (0051) */\n min-height: ", ";\n /* The left inset is the same expanded and in the rail, so the icon never moves (issue 348); the row\n clips what the rail doesn't show as the nav narrows */\n padding: 0 ", " 0 ", ";\n overflow: hidden;\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n text-decoration: none;\n cursor: pointer;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030); the current page takes the light-blue selected ladder */\n ", "\n\n /* Inside SidebarNav one highlight glides to the hovered row, so an unselected row stays clear\n underneath it; pressed and selected rows keep their own fills (0053) */\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n /* The row's height is its token, with the content centred (as controls, 0034): vertical\n padding would hold a compact row above its 24px (0051) */\n min-height: ", ";\n /* The left inset is the same expanded and in the rail, so the icon never moves (issue 348); the row\n clips what the rail doesn't show as the nav narrows */\n padding: 0 ", " 0 ", ";\n overflow: hidden;\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n text-decoration: none;\n cursor: pointer;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030); the current page takes the light-blue selected ladder */\n ", "\n\n /* Inside SidebarNav one highlight glides to the hovered row, so an unselected row stays clear\n underneath it; pressed and selected rows keep their own fills (0053) */\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"
|
|
7104
|
+
// The row's content keeps the nav's expanded width (when it's in a SidebarNav), so the nav's edge
|
|
7105
|
+
// clips it as the nav narrows, instead of the label reflowing or ellipsising mid-move
|
|
7106
|
+
])), space$7[200], size$3.row.sm, space$7.inset.sm, ROW_INSET, rowRadius, typography$2.small, color$4.text["default"], motion$4.duration.fast, motion$4.easing.decelerate, motion$4.duration.fast, motion$4.easing.decelerate, function (_a) {
|
|
7011
7107
|
var $current = _a.$current;
|
|
7012
7108
|
return interactiveRow({
|
|
7013
7109
|
selected: $current
|
|
@@ -7016,25 +7112,88 @@ var Row = /*#__PURE__*/styled__default.default.a.withConfig({
|
|
|
7016
7112
|
var $glide = _a.$glide,
|
|
7017
7113
|
$current = _a.$current;
|
|
7018
7114
|
return $glide && !$current && styled.css(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n &:hover:not(:active) {\n background-color: transparent;\n }\n "], ["\n &:hover:not(:active) {\n background-color: transparent;\n }\n "])));
|
|
7019
|
-
},
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7115
|
+
}, border$2.focus, border$2.focusOffset);
|
|
7116
|
+
// The row's content keeps the nav's expanded width (when it's in a SidebarNav), so the nav's edge
|
|
7117
|
+
// clips it as the nav narrows, instead of the label reflowing or ellipsising mid-move
|
|
7118
|
+
var Inner = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
7119
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7120
|
+
return !prop.startsWith('$');
|
|
7121
|
+
},
|
|
7122
|
+
displayName: "SidebarNavItem__Inner",
|
|
7123
|
+
componentId: "sc-1nfqk5n-1"
|
|
7124
|
+
})(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n display: flex;\n flex: 1 0 auto;\n align-items: center;\n gap: ", ";\n min-width: 0;\n /* The row's content width when expanded: the nav's width less any scrollbar, its padding, the row's\n insets and, beside an icon, the icon and its gap */\n width: calc(\n var(", ", 0px) - var(", ", 0px) - 2 * ", " - ", " - ", "\n ", "\n );\n"], ["\n display: flex;\n flex: 1 0 auto;\n align-items: center;\n gap: ", ";\n min-width: 0;\n /* The row's content width when expanded: the nav's width less any scrollbar, its padding, the row's\n insets and, beside an icon, the icon and its gap */\n width: calc(\n var(", ", 0px) - var(", ", 0px) - 2 * ", " - ", " - ", "\n ", "\n );\n"])), space$7[200], EXPANDED_WIDTH_VAR, SCROLLBAR_VAR, NAV_PADDING, ROW_INSET, space$7.inset.sm, function (_a) {
|
|
7125
|
+
var $withIcon = _a.$withIcon;
|
|
7126
|
+
return $withIcon ? "- ".concat(size$3.icon.md, " - ").concat(space$7[200]) : '';
|
|
7127
|
+
});
|
|
7023
7128
|
var Label = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
7129
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7130
|
+
return !prop.startsWith('$');
|
|
7131
|
+
},
|
|
7024
7132
|
displayName: "SidebarNavItem__Label",
|
|
7025
|
-
componentId: "sc-1nfqk5n-
|
|
7026
|
-
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"], ["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"])))
|
|
7133
|
+
componentId: "sc-1nfqk5n-2"
|
|
7134
|
+
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n ", "\n"], ["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n ", "\n"])), function (_a) {
|
|
7135
|
+
var $hidden = _a.$hidden;
|
|
7136
|
+
return fade($hidden);
|
|
7137
|
+
});
|
|
7027
7138
|
var Meta = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
7139
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7140
|
+
return !prop.startsWith('$');
|
|
7141
|
+
},
|
|
7028
7142
|
displayName: "SidebarNavItem__Meta",
|
|
7029
|
-
componentId: "sc-1nfqk5n-
|
|
7030
|
-
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n flex-shrink: 0;\n font: ", ";\n color: ", ";\n"], ["\n flex-shrink: 0;\n font: ", ";\n color: ", ";\n"
|
|
7143
|
+
componentId: "sc-1nfqk5n-3"
|
|
7144
|
+
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n flex-shrink: 0;\n font: ", ";\n color: ", ";\n ", "\n"], ["\n flex-shrink: 0;\n font: ", ";\n color: ", ";\n ", "\n"
|
|
7031
7145
|
// A badge needs something to sit on: the icon, or this mark at the end of an item without one
|
|
7032
|
-
|
|
7146
|
+
// Badge normally sits centred on its anchor's top-right corner (0045). At the end of the row the
|
|
7147
|
+
// count is laid out in place instead, so a count of any width ("3", "12", "99+") stays inside the
|
|
7148
|
+
// row in every density and never reaches the rows around it
|
|
7149
|
+
])), typography$2.caption, color$4.text.muted, function (_a) {
|
|
7150
|
+
var $hidden = _a.$hidden;
|
|
7151
|
+
return fade($hidden);
|
|
7152
|
+
});
|
|
7033
7153
|
// A badge needs something to sit on: the icon, or this mark at the end of an item without one
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7154
|
+
// Badge normally sits centred on its anchor's top-right corner (0045). At the end of the row the
|
|
7155
|
+
// count is laid out in place instead, so a count of any width ("3", "12", "99+") stays inside the
|
|
7156
|
+
// row in every density and never reaches the rows around it
|
|
7157
|
+
var EndSlot = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
7158
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7159
|
+
return !prop.startsWith('$');
|
|
7160
|
+
},
|
|
7161
|
+
displayName: "SidebarNavItem__EndSlot",
|
|
7162
|
+
componentId: "sc-1nfqk5n-4"
|
|
7163
|
+
})(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: inline-flex;\n flex-shrink: 0;\n ", "\n\n & [role='status'] {\n position: static;\n transform: none;\n }\n"], ["\n display: inline-flex;\n flex-shrink: 0;\n ", "\n\n & [role='status'] {\n position: static;\n transform: none;\n }\n"])), function (_a) {
|
|
7164
|
+
var $hidden = _a.$hidden;
|
|
7165
|
+
return fade($hidden);
|
|
7166
|
+
});
|
|
7167
|
+
var EndAnchor = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
7168
|
+
displayName: "SidebarNavItem__EndAnchor",
|
|
7169
|
+
componentId: "sc-1nfqk5n-5"
|
|
7170
|
+
})(templateObject_7$8 || (templateObject_7$8 = __makeTemplateObject(["\n display: inline-flex;\n width: 0;\n height: 0;\n"], ["\n display: inline-flex;\n width: 0;\n height: 0;\n"
|
|
7171
|
+
// In the rail there's no room for a count, so a dot sits inside the icon's top-right corner
|
|
7172
|
+
])));
|
|
7173
|
+
// In the rail there's no room for a count, so a dot sits inside the icon's top-right corner
|
|
7174
|
+
var IconBox = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
7175
|
+
displayName: "SidebarNavItem__IconBox",
|
|
7176
|
+
componentId: "sc-1nfqk5n-6"
|
|
7177
|
+
})(templateObject_8$6 || (templateObject_8$6 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n flex-shrink: 0;\n"])));
|
|
7178
|
+
var Corner = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
7179
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7180
|
+
return !prop.startsWith('$');
|
|
7181
|
+
},
|
|
7182
|
+
displayName: "SidebarNavItem__Corner",
|
|
7183
|
+
componentId: "sc-1nfqk5n-7"
|
|
7184
|
+
})(templateObject_9$5 || (templateObject_9$5 = __makeTemplateObject(["\n position: absolute;\n top: 25%;\n right: 25%;\n display: inline-flex;\n ", "\n"], ["\n position: absolute;\n top: 25%;\n right: 25%;\n display: inline-flex;\n ", "\n"
|
|
7185
|
+
// An item folds away in the rail when it has no icon to show there
|
|
7186
|
+
])), function (_a) {
|
|
7187
|
+
var $hidden = _a.$hidden;
|
|
7188
|
+
return fade($hidden);
|
|
7189
|
+
});
|
|
7190
|
+
// An item folds away in the rail when it has no icon to show there
|
|
7191
|
+
var Item = /*#__PURE__*/styled__default.default(Fold).attrs({
|
|
7192
|
+
as: 'li'
|
|
7193
|
+
}).withConfig({
|
|
7194
|
+
displayName: "SidebarNavItem__Item",
|
|
7195
|
+
componentId: "sc-1nfqk5n-8"
|
|
7196
|
+
})(templateObject_10$3 || (templateObject_10$3 = __makeTemplateObject([""], [""
|
|
7038
7197
|
/**
|
|
7039
7198
|
* One row of a SidebarNav (#327): a link to a page, or a button for an action such as "New chat".
|
|
7040
7199
|
* Renders an `li`, so it sits in SidebarNav's or a SidebarNavSection's list.
|
|
@@ -7058,39 +7217,52 @@ var SidebarNavItem = function SidebarNavItem(_a) {
|
|
|
7058
7217
|
collapsed = _c.collapsed,
|
|
7059
7218
|
linkComponent = _c.linkComponent,
|
|
7060
7219
|
glide = _c.glide;
|
|
7061
|
-
// The rail shows icons only: an item without one has nothing to show there
|
|
7062
|
-
if (collapsed && !icon) return null;
|
|
7063
7220
|
var hasBadge = badge === 'dot' || typeof badge === 'number' && badge > 0;
|
|
7064
7221
|
var badgeText = badgeLabel !== null && badgeLabel !== void 0 ? badgeLabel : badge === 'dot' ? 'new' : "".concat(badge, " new");
|
|
7065
7222
|
// The badge's own text would make a noisy name, so a badged item is named outright; so is an
|
|
7066
7223
|
// item in the rail, where the label isn't shown
|
|
7067
7224
|
var name = hasBadge ? "".concat(label, ", ").concat(badgeText) : collapsed ? label : undefined;
|
|
7068
|
-
var
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
dot: badge === 'dot',
|
|
7072
|
-
count: typeof badge === 'number' ? badge : 0,
|
|
7073
|
-
"aria-label": badgeText,
|
|
7074
|
-
children: anchor
|
|
7075
|
-
}) : anchor;
|
|
7076
|
-
};
|
|
7225
|
+
var count = typeof badge === 'number' ? badge : 0;
|
|
7226
|
+
// Everything stays mounted and fades, so collapsing and expanding never jump (issue 348). Hidden
|
|
7227
|
+
// content leaves screen readers once its fade ends; the rail names the row with aria-label.
|
|
7077
7228
|
var content = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7078
|
-
children: [icon &&
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7229
|
+
children: [icon && jsxRuntime.jsxs(IconBox, {
|
|
7230
|
+
children: [jsxRuntime.jsx(Icon, {
|
|
7231
|
+
name: icon,
|
|
7232
|
+
size: "md",
|
|
7233
|
+
iconColor: "inherit"
|
|
7234
|
+
}), hasBadge && jsxRuntime.jsx(Corner, {
|
|
7235
|
+
"$hidden": !collapsed,
|
|
7236
|
+
children: jsxRuntime.jsx(Badge, {
|
|
7237
|
+
variant: "accent",
|
|
7238
|
+
dot: true,
|
|
7239
|
+
"aria-label": badgeText,
|
|
7240
|
+
children: jsxRuntime.jsx("span", {})
|
|
7241
|
+
})
|
|
7242
|
+
})]
|
|
7243
|
+
}), jsxRuntime.jsxs(Inner, {
|
|
7244
|
+
"$withIcon": Boolean(icon),
|
|
7083
7245
|
children: [jsxRuntime.jsx(Label, {
|
|
7246
|
+
"$hidden": collapsed,
|
|
7084
7247
|
children: label
|
|
7085
7248
|
}), meta && jsxRuntime.jsx(Meta, {
|
|
7249
|
+
"$hidden": collapsed,
|
|
7086
7250
|
children: meta
|
|
7087
|
-
}),
|
|
7251
|
+
}), hasBadge && jsxRuntime.jsx(EndSlot, {
|
|
7252
|
+
"$hidden": collapsed,
|
|
7253
|
+
children: jsxRuntime.jsx(Badge, {
|
|
7254
|
+
variant: "accent",
|
|
7255
|
+
dot: badge === 'dot',
|
|
7256
|
+
count: count,
|
|
7257
|
+
"aria-label": badgeText,
|
|
7258
|
+
children: jsxRuntime.jsx(EndAnchor, {})
|
|
7259
|
+
})
|
|
7260
|
+
})]
|
|
7088
7261
|
})]
|
|
7089
7262
|
});
|
|
7090
7263
|
var shared = {
|
|
7091
7264
|
$current: current,
|
|
7092
7265
|
$glide: glide,
|
|
7093
|
-
$collapsed: collapsed,
|
|
7094
7266
|
// The icon is decorative (0028)
|
|
7095
7267
|
'aria-label': name,
|
|
7096
7268
|
'data-testid': dataTestId,
|
|
@@ -7111,16 +7283,24 @@ var SidebarNavItem = function SidebarNavItem(_a) {
|
|
|
7111
7283
|
type: "button",
|
|
7112
7284
|
children: content
|
|
7113
7285
|
}));
|
|
7114
|
-
return
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7286
|
+
return (
|
|
7287
|
+
// The Tooltip is always there, turned off while the label is visible, so collapsing never
|
|
7288
|
+
// remounts the row (which would lose focus and skip its transitions)
|
|
7289
|
+
jsxRuntime.jsx(Item, {
|
|
7290
|
+
"$open": !collapsed || Boolean(icon),
|
|
7291
|
+
children: jsxRuntime.jsx("div", {
|
|
7292
|
+
children: jsxRuntime.jsx(Tooltip, {
|
|
7293
|
+
text: label,
|
|
7294
|
+
side: "right",
|
|
7295
|
+
disabled: !collapsed,
|
|
7296
|
+
children: row
|
|
7297
|
+
})
|
|
7298
|
+
})
|
|
7299
|
+
})
|
|
7300
|
+
);
|
|
7121
7301
|
};
|
|
7122
7302
|
SidebarNavItem.displayName = 'SidebarNavItem';
|
|
7123
|
-
var templateObject_1$e, templateObject_2$e, templateObject_3$e, templateObject_4$c, templateObject_5$a, templateObject_6$9;
|
|
7303
|
+
var templateObject_1$e, templateObject_2$e, templateObject_3$e, templateObject_4$c, templateObject_5$a, templateObject_6$9, templateObject_7$8, templateObject_8$6, templateObject_9$5, templateObject_10$3;
|
|
7124
7304
|
|
|
7125
7305
|
// How long the items take to show or hide: the clip lifts after this even if no transition ran
|
|
7126
7306
|
// (reduced motion, or a background tab)
|
|
@@ -7129,46 +7309,44 @@ var semantic$8 = tokens.semantic;
|
|
|
7129
7309
|
var space$6 = semantic$8.space,
|
|
7130
7310
|
color$3 = semantic$8.color,
|
|
7131
7311
|
motion$3 = semantic$8.motion,
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
border$2 = semantic$8.border,
|
|
7312
|
+
size$2 = semantic$8.size,
|
|
7313
|
+
border$1 = semantic$8.border,
|
|
7135
7314
|
typography$1 = semantic$8.typography;
|
|
7136
|
-
|
|
7315
|
+
// The space above a section is the same expanded and in the rail, so the switch never shifts rows;
|
|
7316
|
+
// only the rule's colour changes: clear when the label separates the section, visible in the rail,
|
|
7317
|
+
// where there's no label (issue 348)
|
|
7318
|
+
var Section = /*#__PURE__*/styled__default.default(Fold).withConfig({
|
|
7137
7319
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7138
7320
|
return !prop.startsWith('$');
|
|
7139
7321
|
},
|
|
7140
7322
|
displayName: "SidebarNavSection__Section",
|
|
7141
7323
|
componentId: "sc-16cbmnb-0"
|
|
7142
|
-
})(
|
|
7324
|
+
})(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n margin-top: ", ";\n padding-top: ", ";\n border-top: ", " solid ", ";\n\n /* Nothing above to separate it from */\n &:first-child {\n margin-top: 0;\n padding-top: 0;\n border-top: none;\n }\n"], ["\n margin-top: ", ";\n padding-top: ", ";\n border-top: ", " solid ", ";\n\n /* Nothing above to separate it from */\n &:first-child {\n margin-top: 0;\n padding-top: 0;\n border-top: none;\n }\n"])), space$6[200], space$6[100], border$1.width.thin, function (_a) {
|
|
7143
7325
|
var $collapsed = _a.$collapsed;
|
|
7144
|
-
return $collapsed
|
|
7326
|
+
return $collapsed ? color$3.border["default"] : 'transparent';
|
|
7145
7327
|
});
|
|
7146
7328
|
var Header$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7147
7329
|
displayName: "SidebarNavSection__Header",
|
|
7148
7330
|
componentId: "sc-16cbmnb-1"
|
|
7149
|
-
})(
|
|
7331
|
+
})(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n min-height: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n min-height: ", ";\n"
|
|
7150
7332
|
// The label's look: quiet, small and muted, so the items lead
|
|
7151
|
-
])), space$6[100], size$
|
|
7333
|
+
])), space$6[100], size$2.row.sm);
|
|
7152
7334
|
// The label's look: quiet, small and muted, so the items lead
|
|
7153
|
-
var labelText = styled.css(
|
|
7335
|
+
var labelText = styled.css(templateObject_3$d || (templateObject_3$d = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography$1.caption, color$3.text.muted);
|
|
7154
7336
|
var StaticLabel = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7155
7337
|
displayName: "SidebarNavSection__StaticLabel",
|
|
7156
7338
|
componentId: "sc-16cbmnb-2"
|
|
7157
|
-
})(
|
|
7158
|
-
var HiddenLabel = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7159
|
-
displayName: "SidebarNavSection__HiddenLabel",
|
|
7160
|
-
componentId: "sc-16cbmnb-3"
|
|
7161
|
-
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
|
|
7339
|
+
})(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n ", "\n flex: 1;\n min-width: 0;\n padding: 0 ", ";\n"], ["\n ", "\n flex: 1;\n min-width: 0;\n padding: 0 ", ";\n"])), labelText, space$6.inset.sm);
|
|
7162
7340
|
var Disclosure = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
7163
7341
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7164
7342
|
return !prop.startsWith('$');
|
|
7165
7343
|
},
|
|
7166
7344
|
displayName: "SidebarNavSection__Disclosure",
|
|
7167
|
-
componentId: "sc-16cbmnb-
|
|
7168
|
-
})(
|
|
7345
|
+
componentId: "sc-16cbmnb-3"
|
|
7346
|
+
})(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n ", "\n display: flex;\n align-items: center;\n gap: ", ";\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n min-height: ", ";\n padding: 0 ", ";\n border: none;\n border-radius: ", ";\n background: none;\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n\n /* The caret points down when shown and right when hidden */\n & > span:first-child {\n transition: transform ", " ", ";\n transform: rotate(", ");\n }\n\n ", " {\n & > span:first-child {\n transition: none;\n }\n }\n"], ["\n ", "\n display: flex;\n align-items: center;\n gap: ", ";\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n min-height: ", ";\n padding: 0 ", ";\n border: none;\n border-radius: ", ";\n background: none;\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n\n /* The caret points down when shown and right when hidden */\n & > span:first-child {\n transition: transform ", " ", ";\n transform: rotate(", ");\n }\n\n ", " {\n & > span:first-child {\n transition: none;\n }\n }\n"
|
|
7169
7347
|
// The items' height animates from nothing to their own height with grid rows, so no
|
|
7170
7348
|
// "no limit" max-height is needed. Once hidden, the items leave the keyboard and screen readers.
|
|
7171
|
-
])), labelText, space$6[100], size$
|
|
7349
|
+
])), labelText, space$6[100], size$2.row.sm, space$6.inset.sm, rowRadius, motion$3.duration.fast, motion$3.easing.decelerate, interactiveRow(), border$1.focus, border$1.focusOffset, motion$3.duration.fast, motion$3.easing.standard, function (_a) {
|
|
7172
7350
|
var $expanded = _a.$expanded;
|
|
7173
7351
|
return $expanded ? '0deg' : '-90deg';
|
|
7174
7352
|
}, reducedMotion);
|
|
@@ -7179,24 +7357,27 @@ var Collapse = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
7179
7357
|
return !prop.startsWith('$');
|
|
7180
7358
|
},
|
|
7181
7359
|
displayName: "SidebarNavSection__Collapse",
|
|
7182
|
-
componentId: "sc-16cbmnb-
|
|
7183
|
-
})(
|
|
7360
|
+
componentId: "sc-16cbmnb-4"
|
|
7361
|
+
})(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: grid;\n grid-template-rows: ", ";\n opacity: ", ";\n /* Shown items inherit, so a section folded away in the rail hides them too */\n visibility: ", ";\n /* The items fold and fade together (issue 348) */\n transition: grid-template-rows ", " ", ",\n opacity ", " ", ",\n visibility ", " ", ";\n\n ", " {\n transition: opacity ", " ", ",\n visibility ", " ", ";\n }\n"], ["\n display: grid;\n grid-template-rows: ", ";\n opacity: ", ";\n /* Shown items inherit, so a section folded away in the rail hides them too */\n visibility: ", ";\n /* The items fold and fade together (issue 348) */\n transition: grid-template-rows ", " ", ",\n opacity ", " ", ",\n visibility ", " ", ";\n\n ", " {\n transition: opacity ", " ", ",\n visibility ", " ", ";\n }\n"
|
|
7184
7362
|
// Clipped only while hidden or moving: once shown, an item's Badge can overhang its row
|
|
7185
7363
|
])), function (_a) {
|
|
7186
7364
|
var $expanded = _a.$expanded;
|
|
7187
7365
|
return $expanded ? '1fr' : '0fr';
|
|
7188
7366
|
}, function (_a) {
|
|
7189
7367
|
var $expanded = _a.$expanded;
|
|
7190
|
-
return $expanded ?
|
|
7191
|
-
},
|
|
7368
|
+
return $expanded ? 1 : 0;
|
|
7369
|
+
}, function (_a) {
|
|
7370
|
+
var $expanded = _a.$expanded;
|
|
7371
|
+
return $expanded ? 'inherit' : 'hidden';
|
|
7372
|
+
}, motion$3.duration.moderate, motion$3.easing.decelerate, motion$3.duration.moderate, motion$3.easing.decelerate, motion$3.duration.moderate, motion$3.easing.decelerate, reducedMotion, motion$3.duration.fast, motion$3.easing.decelerate, motion$3.duration.fast, motion$3.easing.decelerate);
|
|
7192
7373
|
// Clipped only while hidden or moving: once shown, an item's Badge can overhang its row
|
|
7193
7374
|
var List$1 = /*#__PURE__*/styled__default.default.ul.withConfig({
|
|
7194
7375
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
7195
7376
|
return !prop.startsWith('$');
|
|
7196
7377
|
},
|
|
7197
7378
|
displayName: "SidebarNavSection__List",
|
|
7198
|
-
componentId: "sc-16cbmnb-
|
|
7199
|
-
})(
|
|
7379
|
+
componentId: "sc-16cbmnb-5"
|
|
7380
|
+
})(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject(["\n min-height: 0;\n overflow: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n"], ["\n min-height: 0;\n overflow: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n"
|
|
7200
7381
|
/**
|
|
7201
7382
|
* A labelled group of SidebarNavItems (#328), optionally collapsible, with one optional action.
|
|
7202
7383
|
* In the rail its label and action are hidden and a rule separates it from the section above.
|
|
@@ -7249,12 +7430,14 @@ var SidebarNavSection = function SidebarNavSection(_a) {
|
|
|
7249
7430
|
if (!isControlled) setUncontrolledExpanded(next);
|
|
7250
7431
|
onExpandedChange === null || onExpandedChange === void 0 ? void 0 : onExpandedChange(next);
|
|
7251
7432
|
};
|
|
7252
|
-
|
|
7253
|
-
//
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
})
|
|
7433
|
+
// The rail shows items by their icons only; a section with none has nothing to show there, so it
|
|
7434
|
+
// isn't drawn at all, not even its separating rule. Items wrapped in other components count as
|
|
7435
|
+
// showing, since their icons can't be seen from here.
|
|
7436
|
+
var showsInRail = React__default.default.Children.toArray(children).some(function (child) {
|
|
7437
|
+
return ! /*#__PURE__*/React__default.default.isValidElement(child) || child.type !== SidebarNavItem || Boolean(child.props.icon);
|
|
7438
|
+
});
|
|
7439
|
+
// The header stays mounted, folding away in the rail; the list keeps its name from it there
|
|
7440
|
+
var header = jsxRuntime.jsxs(Header$1, {
|
|
7258
7441
|
children: [collapsible ? jsxRuntime.jsxs(Disclosure, {
|
|
7259
7442
|
type: "button",
|
|
7260
7443
|
id: labelId,
|
|
@@ -7274,27 +7457,36 @@ var SidebarNavSection = function SidebarNavSection(_a) {
|
|
|
7274
7457
|
});
|
|
7275
7458
|
return (
|
|
7276
7459
|
// In a SidebarNav the body is one list, so the section is one of its items
|
|
7277
|
-
|
|
7460
|
+
// In the rail, a section with nothing to show folds away, rule and all
|
|
7461
|
+
jsxRuntime.jsx(Section, {
|
|
7278
7462
|
as: inNav ? 'li' : 'div',
|
|
7463
|
+
"$open": !collapsed || showsInRail,
|
|
7279
7464
|
"$collapsed": collapsed,
|
|
7280
7465
|
"data-testid": dataTestId,
|
|
7281
|
-
children:
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
"
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7466
|
+
children: jsxRuntime.jsxs("div", {
|
|
7467
|
+
children: [jsxRuntime.jsx(Fold, {
|
|
7468
|
+
"$open": !collapsed,
|
|
7469
|
+
children: jsxRuntime.jsx("div", {
|
|
7470
|
+
children: header
|
|
7471
|
+
})
|
|
7472
|
+
}), jsxRuntime.jsx(Collapse, {
|
|
7473
|
+
"$expanded": expanded,
|
|
7474
|
+
onTransitionEnd: function onTransitionEnd(event) {
|
|
7475
|
+
if (event.target === event.currentTarget && event.propertyName === 'grid-template-rows') setAnimating(false);
|
|
7476
|
+
},
|
|
7477
|
+
children: jsxRuntime.jsx(List$1, {
|
|
7478
|
+
id: listId,
|
|
7479
|
+
"aria-labelledby": labelId,
|
|
7480
|
+
"$clip": !expanded || animating,
|
|
7481
|
+
children: children
|
|
7482
|
+
})
|
|
7483
|
+
})]
|
|
7484
|
+
})
|
|
7293
7485
|
})
|
|
7294
7486
|
);
|
|
7295
7487
|
};
|
|
7296
7488
|
SidebarNavSection.displayName = 'SidebarNavSection';
|
|
7297
|
-
var templateObject_1$d, templateObject_2$d, templateObject_3$d, templateObject_4$b, templateObject_5$9, templateObject_6$8, templateObject_7$7
|
|
7489
|
+
var templateObject_1$d, templateObject_2$d, templateObject_3$d, templateObject_4$b, templateObject_5$9, templateObject_6$8, templateObject_7$7;
|
|
7298
7490
|
|
|
7299
7491
|
var semantic$7 = tokens.semantic;
|
|
7300
7492
|
var space$5 = semantic$7.space,
|
|
@@ -7337,7 +7529,7 @@ var StyledDialog = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
7337
7529
|
})(templateObject_6$7 || (templateObject_6$7 = __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$7.layer.modal, function (_a) {
|
|
7338
7530
|
var $width = _a.$width;
|
|
7339
7531
|
return $width;
|
|
7340
|
-
}, space$5[400], space$5[400], semantic$7.surface.
|
|
7532
|
+
}, space$5[400], space$5[400], semantic$7.surface.overlay, tokens.component.overlay.borderRadius, elevation.overlay, styled.css(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["animation: ", " ", " ", "", ";"], ["animation: ", " ", " ", "", ";"])), scaleIn, motion$2.duration.moderate, motion$2.easing.decelerate, function (_a) {
|
|
7341
7533
|
var $isExiting = _a.$isExiting;
|
|
7342
7534
|
return $isExiting && exitAnimation;
|
|
7343
7535
|
}), reducedMotion, fadeIn$1, motion$2.duration.moderate, motion$2.easing.decelerate, function (_a) {
|
|
@@ -7612,7 +7804,7 @@ var StyledNumberInput = /*#__PURE__*/styled__default.default(StyledInputBase).wi
|
|
|
7612
7804
|
var StyledStepperContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7613
7805
|
displayName: "NumberInput__StyledStepperContainer",
|
|
7614
7806
|
componentId: "sc-qotc3w-5"
|
|
7615
|
-
})(templateObject_6$6 || (templateObject_6$6 = __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"])), tokens.semantic.space[200], tokens.semantic.space[200]);
|
|
7807
|
+
})(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"], ["\n position: absolute;\n right: ", ";\n display: flex;\n flex-direction: row;\n gap: ", ";\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"])), tokens.semantic.space[200], tokens.semantic.space[200], fieldButtonRadius);
|
|
7616
7808
|
var StyledHelperText$2 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7617
7809
|
displayName: "NumberInput__StyledHelperText",
|
|
7618
7810
|
componentId: "sc-qotc3w-6"
|
|
@@ -7871,7 +8063,7 @@ var StyledInputWrapper$1 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
7871
8063
|
var StyledToggleButton = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7872
8064
|
displayName: "PasswordField__StyledToggleButton",
|
|
7873
8065
|
componentId: "sc-1p15zk0-5"
|
|
7874
|
-
})(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n"], ["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n"
|
|
8066
|
+
})(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"], ["\n position: absolute;\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n"
|
|
7875
8067
|
/**
|
|
7876
8068
|
* PasswordField component for secure password input with visibility toggle
|
|
7877
8069
|
*
|
|
@@ -7883,7 +8075,7 @@ var StyledToggleButton = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
7883
8075
|
* required
|
|
7884
8076
|
* />
|
|
7885
8077
|
* ```
|
|
7886
|
-
*/])), tokens.semantic.space[200]);
|
|
8078
|
+
*/])), tokens.semantic.space[200], fieldButtonRadius);
|
|
7887
8079
|
/**
|
|
7888
8080
|
* PasswordField component for secure password input with visibility toggle
|
|
7889
8081
|
*
|
|
@@ -7985,7 +8177,7 @@ var StyledSearchContainer = /*#__PURE__*/styled__default.default.div.withConfig(
|
|
|
7985
8177
|
var StyledInputWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
7986
8178
|
displayName: "SearchField__StyledInputWrapper",
|
|
7987
8179
|
componentId: "sc-qhz9i8-1"
|
|
7988
|
-
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n /* The field's height comes from size.control.lg as a minimum, matching the other fields\n (decision 0034); the padding only matters if the content grows past it */\n box-sizing: border-box;\n min-height: ", ";\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 /* The field's height comes from size.control.lg as a minimum, matching the other fields\n (decision 0034); the padding only matters if the content grows past it */\n box-sizing: border-box;\n min-height: ", ";\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$5.space[200], semantic$5.size.control.lg, semantic$5.space[200], semantic$5.space[300], component$1.input["default"].backgroundColor, component$1.input["default"].borderWidth, component$1.input["default"].borderColor, component$1.input["default"].borderRadius, semantic$5.motion.duration.moderate, semantic$5.motion.easing.standard, semantic$5.motion.duration.moderate, semantic$5.motion.easing.standard, function (props) {
|
|
8180
|
+
})(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n /* The field's height comes from size.control.lg as a minimum, matching the other fields\n (decision 0034); the padding only matters if the content grows past it */\n box-sizing: border-box;\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n\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 /* The field's height comes from size.control.lg as a minimum, matching the other fields\n (decision 0034); the padding only matters if the content grows past it */\n box-sizing: border-box;\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border: ", " solid ", ";\n border-radius: ", ";\n\n /* Buttons inside the field nest within its corner: a step tighter than the control radius (decision 0055) */\n & > button {\n border-radius: ", ";\n }\n\n transition: border-color ", " ", ", outline ", " ", ";\n \n ", "\n \n ", "\n \n &:hover:not([data-disabled='true']) {\n border-color: ", ";\n }\n"])), semantic$5.space[200], semantic$5.size.control.lg, semantic$5.space[200], semantic$5.space[300], component$1.input["default"].backgroundColor, component$1.input["default"].borderWidth, component$1.input["default"].borderColor, component$1.input["default"].borderRadius, fieldButtonRadius, semantic$5.motion.duration.moderate, semantic$5.motion.easing.standard, semantic$5.motion.duration.moderate, semantic$5.motion.easing.standard, function (props) {
|
|
7989
8181
|
return props.$isFocused && "\n border-color: ".concat(component$1.input.focus.borderColor, ";\n outline: ").concat(component$1.input.focus.outline, ";\n outline-offset: ").concat(semantic$5.border.focusOffset, ";\n ");
|
|
7990
8182
|
}, function (props) {
|
|
7991
8183
|
return props.$disabled && "\n background-color: ".concat(component$1.input.disabled.backgroundColor, ";\n border-color: ").concat(component$1.input.disabled.borderColor, ";\n cursor: not-allowed;\n ");
|
|
@@ -7997,7 +8189,7 @@ var StyledInput = /*#__PURE__*/styled__default.default.input.withConfig({
|
|
|
7997
8189
|
var StyledSuggestionsList = /*#__PURE__*/styled__default.default.ul.withConfig({
|
|
7998
8190
|
displayName: "SearchField__StyledSuggestionsList",
|
|
7999
8191
|
componentId: "sc-qhz9i8-3"
|
|
8000
|
-
})(templateObject_4$7 || (templateObject_4$7 = __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 /* The highlighted suggestion has keyboard focus, which is grey, not the light-blue selected\n treatment (decision 0029). Its row is the option's first child. While pressed, the row's own\n pressed state shows (decision 0030) */\n & > [data-highlighted] > :first-child:not(:active) {\n background-color: ", ";\n }\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\n /* The highlighted suggestion has keyboard focus, which is grey, not the light-blue selected\n treatment (decision 0029). Its row is the option's first child. While pressed, the row's own\n pressed state shows (decision 0030) */\n & > [data-highlighted] > :first-child:not(:active) {\n background-color: ", ";\n }\n"])), semantic$5.space[100], tokens.semantic.size.menu.maxHeight, semantic$5.surface.
|
|
8192
|
+
})(templateObject_4$7 || (templateObject_4$7 = __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 /* The highlighted suggestion has keyboard focus, which is grey, not the light-blue selected\n treatment (decision 0029). Its row is the option's first child. While pressed, the row's own\n pressed state shows (decision 0030) */\n & > [data-highlighted] > :first-child:not(:active) {\n background-color: ", ";\n }\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\n /* The highlighted suggestion has keyboard focus, which is grey, not the light-blue selected\n treatment (decision 0029). Its row is the option's first child. While pressed, the row's own\n pressed state shows (decision 0030) */\n & > [data-highlighted] > :first-child:not(:active) {\n background-color: ", ";\n }\n"])), semantic$5.space[100], tokens.semantic.size.menu.maxHeight, semantic$5.surface.overlay, semantic$5.border.width.thin, semantic$5.color.border["default"], semantic$5.radius.md, semantic$5.elevation.floating, semantic$5.space[100], semantic$5.layer.dropdown, rowStates.unselected.hover.background);
|
|
8001
8193
|
var StyledSectionHeader = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
8002
8194
|
displayName: "SearchField__StyledSectionHeader",
|
|
8003
8195
|
componentId: "sc-qhz9i8-4"
|
|
@@ -8330,14 +8522,14 @@ var StyledSheet = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
8330
8522
|
},
|
|
8331
8523
|
displayName: "Sheet__StyledSheet",
|
|
8332
8524
|
componentId: "sc-8abisx-1"
|
|
8333
|
-
})(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: ", "
|
|
8525
|
+
})(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n position: fixed;\n /* A floating layer: one step above raised content in the dark theme (issue 356) */\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: ", "; /* matches the panel */\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 /* A floating layer: one step above raised content in the dark theme (issue 356) */\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: ", "; /* matches the panel */\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n \n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n"])), semantic$4.surface.overlay, semantic$4.elevation.overlay, semantic$4.layer.overlay, function (_a) {
|
|
8334
8526
|
var $position = _a.$position,
|
|
8335
8527
|
$variant = _a.$variant,
|
|
8336
8528
|
$width = _a.$width,
|
|
8337
8529
|
$height = _a.$height;
|
|
8338
8530
|
var isDrawer = $variant === 'drawer';
|
|
8339
8531
|
var margin = isDrawer ? semantic$4.space[400] : '0';
|
|
8340
|
-
var borderRadius = isDrawer ?
|
|
8532
|
+
var borderRadius = isDrawer ? tokens.component.overlay.borderRadius : '0';
|
|
8341
8533
|
switch ($position) {
|
|
8342
8534
|
case 'right':
|
|
8343
8535
|
return styled.css(templateObject_8$4 || (templateObject_8$4 = __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$4.space[400], " * 2") : '0px', borderRadius, borderRadius, slideInRight, semantic$4.motion.duration.moderate, semantic$4.motion.easing.standard, function (_a) {
|
|
@@ -8350,7 +8542,7 @@ var StyledSheet = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
8350
8542
|
return $isExiting && exitAnimation;
|
|
8351
8543
|
});
|
|
8352
8544
|
case 'top':
|
|
8353
|
-
return styled.css(templateObject_10$
|
|
8545
|
+
return styled.css(templateObject_10$2 || (templateObject_10$2 = __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$4.space[400], " * 2") : '0px', borderRadius, borderRadius, slideInTop, semantic$4.motion.duration.moderate, semantic$4.motion.easing.standard, function (_a) {
|
|
8354
8546
|
var $isExiting = _a.$isExiting;
|
|
8355
8547
|
return $isExiting && exitAnimation;
|
|
8356
8548
|
});
|
|
@@ -8363,7 +8555,7 @@ var StyledSheet = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
8363
8555
|
}, reducedMotion, fadeIn, semantic$4.motion.duration.moderate, semantic$4.motion.easing.standard, function (_a) {
|
|
8364
8556
|
var $isExiting = _a.$isExiting;
|
|
8365
8557
|
return $isExiting && exitAnimation;
|
|
8366
|
-
}, semantic$4.space[200], semantic$4.surface.
|
|
8558
|
+
}, semantic$4.space[200], semantic$4.surface.overlay, semantic$4.color.border["default"], semantic$4.radius.full, semantic$4.color.fill.inverse);
|
|
8367
8559
|
var StyledSheetContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
8368
8560
|
displayName: "Sheet__StyledSheetContent",
|
|
8369
8561
|
componentId: "sc-8abisx-2"
|
|
@@ -8533,7 +8725,7 @@ var Sheet = function Sheet(_a) {
|
|
|
8533
8725
|
});
|
|
8534
8726
|
};
|
|
8535
8727
|
Sheet.displayName = 'Sheet';
|
|
8536
|
-
var templateObject_1$7, templateObject_2$7, templateObject_3$7, templateObject_4$6, templateObject_5$4, templateObject_6$4, templateObject_7$4, templateObject_8$4, templateObject_9$3, templateObject_10$
|
|
8728
|
+
var templateObject_1$7, templateObject_2$7, templateObject_3$7, templateObject_4$6, templateObject_5$4, templateObject_6$4, templateObject_7$4, templateObject_8$4, templateObject_9$3, templateObject_10$2, templateObject_11$1, templateObject_12$1, templateObject_13$1;
|
|
8537
8729
|
|
|
8538
8730
|
var semantic$3 = tokens.semantic;
|
|
8539
8731
|
var StyledSliderContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
@@ -8999,7 +9191,7 @@ var StyledTab = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
8999
9191
|
componentId: "sc-1g9ib0y-1"
|
|
9000
9192
|
})(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Selected tab: the light-blue selected treatment plus a blue underline (decisions 0016, 0020).\n The text darkens with the fill on hover and press so every state stays at least 4.5:1. */\n border-radius: ", " ", " 0 0;\n background-color: ", ";\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n height: ", ";\n background-color: ", ";\n transition: ", ";\n }\n\n /* Forced colours drop the fill, so the selected tab's underline carries its state in the\n system selection colour (decision 0038) */\n ", " {\n &::after {\n forced-color-adjust: none;\n background-color: ", ";\n }\n }\n\n &:hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n /* Disabled state */\n opacity: ", ";\n \n /* Focus state */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n z-index: 1;\n }\n\n"], ["\n display: inline-flex;\n align-items: center;\n gap: ", ";\n padding: ", " ", ";\n font: ", ";\n white-space: nowrap;\n cursor: ", ";\n border: none;\n background: transparent;\n transition: ", ";\n position: relative;\n \n /* Selected tab: the light-blue selected treatment plus a blue underline (decisions 0016, 0020).\n The text darkens with the fill on hover and press so every state stays at least 4.5:1. */\n border-radius: ", " ", " 0 0;\n background-color: ", ";\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n height: ", ";\n background-color: ", ";\n transition: ", ";\n }\n\n /* Forced colours drop the fill, so the selected tab's underline carries its state in the\n system selection colour (decision 0038) */\n ", " {\n &::after {\n forced-color-adjust: none;\n background-color: ", ";\n }\n }\n\n &:hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n &:active:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n\n /* Disabled state */\n opacity: ", ";\n \n /* Focus state */\n &:focus-visible {\n outline: ", ";\n outline-offset: ", ";\n z-index: 1;\n }\n\n"])), semantic$2.space[200], semantic$2.space[300], semantic$2.space[400], tokens.component.button.sizes.medium.font, function (props) {
|
|
9001
9193
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
9002
|
-
}, semantic$2.motion.transition.feedback,
|
|
9194
|
+
}, semantic$2.motion.transition.feedback, rowRadius, rowRadius, function (props) {
|
|
9003
9195
|
return props.$isActive ? semantic$2.color.fill['accent-muted'] : 'transparent';
|
|
9004
9196
|
}, function (props) {
|
|
9005
9197
|
return props.$isActive ? semantic$2.color.text.accent : semantic$2.color.text.muted;
|
|
@@ -9042,7 +9234,7 @@ var StyledBadge = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
9042
9234
|
* onTabChange={setActiveTab}
|
|
9043
9235
|
* />
|
|
9044
9236
|
* ```
|
|
9045
|
-
*/])), tokens.component.tabBar.badge.size, tokens.component.tabBar.badge.size, semantic$2.space[100], tokens.component.tabBar.badge.typography, tokens.component.tabBar.badge.fontWeight, semantic$2.radius.full, semantic$2.color.fill.accent, semantic$2.color.text
|
|
9237
|
+
*/])), tokens.component.tabBar.badge.size, tokens.component.tabBar.badge.size, semantic$2.space[100], tokens.component.tabBar.badge.typography, tokens.component.tabBar.badge.fontWeight, semantic$2.radius.full, semantic$2.color.fill.accent, semantic$2.color.text['on-fill']);
|
|
9046
9238
|
/**
|
|
9047
9239
|
* TabBar component for tabbed navigation
|
|
9048
9240
|
*
|
|
@@ -9485,9 +9677,9 @@ var semantic$1 = tokens.semantic;
|
|
|
9485
9677
|
var space$1 = semantic$1.space,
|
|
9486
9678
|
color$1 = semantic$1.color,
|
|
9487
9679
|
motion$1 = semantic$1.motion,
|
|
9488
|
-
radius
|
|
9489
|
-
size = semantic$1.size,
|
|
9490
|
-
border
|
|
9680
|
+
radius = semantic$1.radius,
|
|
9681
|
+
size$1 = semantic$1.size,
|
|
9682
|
+
border = semantic$1.border,
|
|
9491
9683
|
typography = semantic$1.typography;
|
|
9492
9684
|
var Trigger = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
9493
9685
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -9495,10 +9687,10 @@ var Trigger = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
9495
9687
|
},
|
|
9496
9688
|
displayName: "WorkspaceSwitcher__Trigger",
|
|
9497
9689
|
componentId: "sc-s35ke-0"
|
|
9498
|
-
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"])), space$1[200], size.row.sm, space$1.inset.xs, space$1.inset.sm, radius
|
|
9690
|
+
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n min-height: ", ";\n padding: ", " ", ";\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"])), space$1[200], size$1.row.sm, space$1.inset.xs, space$1.inset.sm, radius.md, typography.label, color$1.text["default"], motion$1.duration.fast, motion$1.easing.decelerate, interactiveRow(), function (_a) {
|
|
9499
9691
|
var $collapsed = _a.$collapsed;
|
|
9500
9692
|
return $collapsed && styled.css(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n justify-content: center;\n padding: ", ";\n "], ["\n justify-content: center;\n padding: ", ";\n "])), space$1.inset.xs);
|
|
9501
|
-
}, border
|
|
9693
|
+
}, border.focus, border.focusOffset);
|
|
9502
9694
|
var Name = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
9503
9695
|
displayName: "WorkspaceSwitcher__Name",
|
|
9504
9696
|
componentId: "sc-s35ke-1"
|
|
@@ -9567,6 +9759,8 @@ var WorkspaceSwitcher = function WorkspaceSwitcher(_a) {
|
|
|
9567
9759
|
}) : trigger,
|
|
9568
9760
|
side: collapsed ? 'right' : 'bottom',
|
|
9569
9761
|
align: "start",
|
|
9762
|
+
// Lines up with the full-width trigger beneath it (issue 350)
|
|
9763
|
+
matchTriggerWidth: true,
|
|
9570
9764
|
children: [jsxRuntime.jsx(MenuGroup, {
|
|
9571
9765
|
label: label,
|
|
9572
9766
|
children: workspaces.map(function (workspace) {
|
|
@@ -9600,9 +9794,8 @@ var semantic = tokens.semantic,
|
|
|
9600
9794
|
component = tokens.component;
|
|
9601
9795
|
var space = semantic.space,
|
|
9602
9796
|
motion = semantic.motion,
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
color = semantic.color;
|
|
9797
|
+
color = semantic.color,
|
|
9798
|
+
size = semantic.size;
|
|
9606
9799
|
var widths = component.sidebarNav.width;
|
|
9607
9800
|
var Nav = /*#__PURE__*/styled__default.default.nav.withConfig({
|
|
9608
9801
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -9610,39 +9803,67 @@ var Nav = /*#__PURE__*/styled__default.default.nav.withConfig({
|
|
|
9610
9803
|
},
|
|
9611
9804
|
displayName: "SidebarNav__Nav",
|
|
9612
9805
|
componentId: "sc-1as46tp-0"
|
|
9613
|
-
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n box-sizing: border-box;\n /* Its width is set; in a flex app shell it mustn't shrink to make room */\n flex-shrink: 0;\n width: ", ";\n height: 100%;\n padding: ", ";\n overflow: hidden;\n /* Quiet chrome (P1): the page's own background, with
|
|
9806
|
+
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n box-sizing: border-box;\n /* Its width is set; in a flex app shell it mustn't shrink to make room */\n flex-shrink: 0;\n width: ", ";\n height: 100%;\n padding: ", ";\n overflow: hidden;\n /* Quiet chrome (P1): the page's own background, with no edge of its own (issue 348). The width\n moves with everything inside it, decelerating (0037) */\n transition: width ", " ", ";\n\n ", " {\n transition: none;\n }\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", ";\n box-sizing: border-box;\n /* Its width is set; in a flex app shell it mustn't shrink to make room */\n flex-shrink: 0;\n width: ", ";\n height: 100%;\n padding: ", ";\n overflow: hidden;\n /* Quiet chrome (P1): the page's own background, with no edge of its own (issue 348). The width\n moves with everything inside it, decelerating (0037) */\n transition: width ", " ", ";\n\n ", " {\n transition: none;\n }\n"
|
|
9807
|
+
// The header holds two toggles in fixed places that cross-fade (issue 348): collapse beside the
|
|
9808
|
+
// header content, and expand in the content's place, where the rail shows it. Nothing moves.
|
|
9809
|
+
])), space[200], function (_a) {
|
|
9614
9810
|
var $width = _a.$width;
|
|
9615
9811
|
return $width;
|
|
9616
|
-
}, space[200],
|
|
9812
|
+
}, space[200], motion.duration.moderate, motion.easing.decelerate, reducedMotion);
|
|
9813
|
+
// The header holds two toggles in fixed places that cross-fade (issue 348): collapse beside the
|
|
9814
|
+
// header content, and expand in the content's place, where the rail shows it. Nothing moves.
|
|
9617
9815
|
var Header = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
9618
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
|
9619
|
-
return !prop.startsWith('$');
|
|
9620
|
-
},
|
|
9621
9816
|
displayName: "SidebarNav__Header",
|
|
9622
9817
|
componentId: "sc-1as46tp-1"
|
|
9623
|
-
})(
|
|
9624
|
-
var $collapsed = _a.$collapsed;
|
|
9625
|
-
return $collapsed && styled.css(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n flex-direction: column;\n "], ["\n flex-direction: column;\n "])));
|
|
9626
|
-
});
|
|
9818
|
+
})(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n gap: ", ";\n min-height: ", ";\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n gap: ", ";\n min-height: ", ";\n"])), space[100], size.control.sm);
|
|
9627
9819
|
var HeaderContent = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
9820
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
9821
|
+
return !prop.startsWith('$');
|
|
9822
|
+
},
|
|
9628
9823
|
displayName: "SidebarNav__HeaderContent",
|
|
9629
9824
|
componentId: "sc-1as46tp-2"
|
|
9630
|
-
})(
|
|
9825
|
+
})(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n ", "\n\n /* Keeps its expanded width, so the nav's edge clips it rather than it reflowing mid-move */\n & > div {\n width: calc(var(", ") - 2 * ", " - ", " - ", ");\n }\n"], ["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n ", "\n\n /* Keeps its expanded width, so the nav's edge clips it rather than it reflowing mid-move */\n & > div {\n width: calc(var(", ") - 2 * ", " - ", " - ", ");\n }\n"])), function (_a) {
|
|
9826
|
+
var $hidden = _a.$hidden;
|
|
9827
|
+
return fade($hidden);
|
|
9828
|
+
}, EXPANDED_WIDTH_VAR, NAV_PADDING, size.control.sm, space[100]);
|
|
9829
|
+
var CollapseSlot = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
9830
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
9831
|
+
return !prop.startsWith('$');
|
|
9832
|
+
},
|
|
9833
|
+
displayName: "SidebarNav__CollapseSlot",
|
|
9834
|
+
componentId: "sc-1as46tp-3"
|
|
9835
|
+
})(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n display: inline-flex;\n flex-shrink: 0;\n margin-left: auto;\n ", "\n"], ["\n display: inline-flex;\n flex-shrink: 0;\n margin-left: auto;\n ", "\n"
|
|
9836
|
+
// Centred in the rail, where the header content starts
|
|
9837
|
+
])), function (_a) {
|
|
9838
|
+
var $hidden = _a.$hidden;
|
|
9839
|
+
return fade($hidden);
|
|
9840
|
+
});
|
|
9841
|
+
// Centred in the rail, where the header content starts
|
|
9842
|
+
var ExpandSlot = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
9843
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
9844
|
+
return !prop.startsWith('$');
|
|
9845
|
+
},
|
|
9846
|
+
displayName: "SidebarNav__ExpandSlot",
|
|
9847
|
+
componentId: "sc-1as46tp-4"
|
|
9848
|
+
})(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc((", " - 2 * ", " - ", ") / 2);\n display: flex;\n align-items: center;\n ", "\n"], ["\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc((", " - 2 * ", " - ", ") / 2);\n display: flex;\n align-items: center;\n ", "\n"])), component.sidebarNav.width.rail, NAV_PADDING, size.control.sm, function (_a) {
|
|
9849
|
+
var $hidden = _a.$hidden;
|
|
9850
|
+
return fade($hidden);
|
|
9851
|
+
});
|
|
9631
9852
|
var Body = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
9632
9853
|
displayName: "SidebarNav__Body",
|
|
9633
|
-
componentId: "sc-1as46tp-
|
|
9634
|
-
})(
|
|
9854
|
+
componentId: "sc-1as46tp-5"
|
|
9855
|
+
})(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n flex: 1;\n min-height: 0;\n overflow-x: hidden;\n overflow-y: auto;\n"], ["\n flex: 1;\n min-height: 0;\n overflow-x: hidden;\n overflow-y: auto;\n"
|
|
9635
9856
|
// The rows and the highlight share this box, so the highlight scrolls with the rows
|
|
9636
9857
|
])));
|
|
9637
9858
|
// The rows and the highlight share this box, so the highlight scrolls with the rows
|
|
9638
9859
|
var Content = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
9639
9860
|
displayName: "SidebarNav__Content",
|
|
9640
|
-
componentId: "sc-1as46tp-
|
|
9641
|
-
})(
|
|
9861
|
+
componentId: "sc-1as46tp-6"
|
|
9862
|
+
})(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n position: relative;\n isolation: isolate;\n display: flex;\n flex-direction: column;\n\n & [data-sidebar-row] {\n position: relative;\n z-index: 1;\n }\n"], ["\n position: relative;\n isolation: isolate;\n display: flex;\n flex-direction: column;\n\n & [data-sidebar-row] {\n position: relative;\n z-index: 1;\n }\n"])));
|
|
9642
9863
|
var List = /*#__PURE__*/styled__default.default.ul.withConfig({
|
|
9643
9864
|
displayName: "SidebarNav__List",
|
|
9644
|
-
componentId: "sc-1as46tp-
|
|
9645
|
-
})(
|
|
9865
|
+
componentId: "sc-1as46tp-7"
|
|
9866
|
+
})(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n"], ["\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n"])));
|
|
9646
9867
|
// One highlight glides to the hovered or keyboard-focused row (0053): the row hover colour,
|
|
9647
9868
|
// moving over duration.fast. It jumps under reduced motion and hides in forced colours, where
|
|
9648
9869
|
// rows outline themselves instead.
|
|
@@ -9651,61 +9872,109 @@ var Highlight = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
9651
9872
|
return !prop.startsWith('$');
|
|
9652
9873
|
},
|
|
9653
9874
|
displayName: "SidebarNav__Highlight",
|
|
9654
|
-
componentId: "sc-1as46tp-
|
|
9655
|
-
})(
|
|
9875
|
+
componentId: "sc-1as46tp-8"
|
|
9876
|
+
})(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n z-index: 0;\n border-radius: ", ";\n background-color: ", ";\n pointer-events: none;\n opacity: ", ";\n transition: ", ";\n\n ", " {\n transition: opacity ", " ", ";\n }\n\n ", " {\n display: none;\n }\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n z-index: 0;\n border-radius: ", ";\n background-color: ", ";\n pointer-events: none;\n opacity: ", ";\n transition: ", ";\n\n ", " {\n transition: opacity ", " ", ";\n }\n\n ", " {\n display: none;\n }\n"
|
|
9877
|
+
// The footer fades out in the rail, keeping its expanded width so it doesn't reflow mid-move
|
|
9878
|
+
])), rowRadius, color.fill.muted, function (_a) {
|
|
9656
9879
|
var $visible = _a.$visible;
|
|
9657
9880
|
return $visible ? 1 : 0;
|
|
9658
9881
|
}, function (_a) {
|
|
9659
9882
|
var $instant = _a.$instant;
|
|
9660
9883
|
return $instant ? "opacity ".concat(motion.duration.fast, " ").concat(motion.easing.decelerate) : "transform ".concat(motion.duration.fast, " ").concat(motion.easing.decelerate, ",\n height ").concat(motion.duration.fast, " ").concat(motion.easing.decelerate, ",\n width ").concat(motion.duration.fast, " ").concat(motion.easing.decelerate, ",\n opacity ").concat(motion.duration.fast, " ").concat(motion.easing.decelerate);
|
|
9661
9884
|
}, reducedMotion, motion.duration.fast, motion.easing.decelerate, forcedColors);
|
|
9885
|
+
// The footer fades out in the rail, keeping its expanded width so it doesn't reflow mid-move
|
|
9662
9886
|
var Footer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
9887
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
9888
|
+
return !prop.startsWith('$');
|
|
9889
|
+
},
|
|
9663
9890
|
displayName: "SidebarNav__Footer",
|
|
9664
|
-
componentId: "sc-1as46tp-
|
|
9665
|
-
})(
|
|
9891
|
+
componentId: "sc-1as46tp-9"
|
|
9892
|
+
})(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n flex-shrink: 0;\n overflow: hidden;\n ", "\n\n & > div {\n width: calc(var(", ") - 2 * ", ");\n }\n"], ["\n flex-shrink: 0;\n overflow: hidden;\n ", "\n\n & > div {\n width: calc(var(", ") - 2 * ", ");\n }\n"
|
|
9666
9893
|
/**
|
|
9667
9894
|
* A product's sidebar navigation (#331): a header, a scrolling body of items and sections, and a
|
|
9668
9895
|
* footer, that collapses to an icon rail. Row heights follow density (0051); the width is a prop.
|
|
9669
9896
|
* On small screens, place it in a Sheet with `collapsible={false}`.
|
|
9670
|
-
*/])))
|
|
9897
|
+
*/])), function (_a) {
|
|
9898
|
+
var $hidden = _a.$hidden;
|
|
9899
|
+
return fade($hidden);
|
|
9900
|
+
}, EXPANDED_WIDTH_VAR, NAV_PADDING);
|
|
9671
9901
|
/**
|
|
9672
9902
|
* A product's sidebar navigation (#331): a header, a scrolling body of items and sections, and a
|
|
9673
9903
|
* footer, that collapses to an icon rail. Row heights follow density (0051); the width is a prop.
|
|
9674
9904
|
* On small screens, place it in a Sheet with `collapsible={false}`.
|
|
9675
9905
|
*/
|
|
9676
9906
|
var SidebarNav = function SidebarNav(_a) {
|
|
9907
|
+
var _b;
|
|
9677
9908
|
var label = _a.label,
|
|
9678
9909
|
children = _a.children,
|
|
9679
9910
|
header = _a.header,
|
|
9680
9911
|
footer = _a.footer,
|
|
9681
|
-
|
|
9682
|
-
width =
|
|
9912
|
+
_c = _a.width,
|
|
9913
|
+
width = _c === void 0 ? 'default' : _c,
|
|
9683
9914
|
collapsedProp = _a.collapsed,
|
|
9684
|
-
|
|
9685
|
-
defaultCollapsed =
|
|
9915
|
+
_d = _a.defaultCollapsed,
|
|
9916
|
+
defaultCollapsed = _d === void 0 ? false : _d,
|
|
9686
9917
|
onCollapsedChange = _a.onCollapsedChange,
|
|
9687
|
-
|
|
9688
|
-
collapsible =
|
|
9918
|
+
_e = _a.collapsible,
|
|
9919
|
+
collapsible = _e === void 0 ? true : _e,
|
|
9689
9920
|
linkComponent = _a.linkComponent,
|
|
9690
9921
|
dataTestId = _a["data-testid"];
|
|
9691
|
-
var
|
|
9692
|
-
uncontrolledCollapsed =
|
|
9693
|
-
setUncontrolledCollapsed =
|
|
9922
|
+
var _f = React.useState(defaultCollapsed),
|
|
9923
|
+
uncontrolledCollapsed = _f[0],
|
|
9924
|
+
setUncontrolledCollapsed = _f[1];
|
|
9694
9925
|
var isControlled = collapsedProp !== undefined;
|
|
9695
9926
|
var collapsed = collapsible && (isControlled ? collapsedProp : uncontrolledCollapsed);
|
|
9696
9927
|
var contentRef = React.useRef(null);
|
|
9697
|
-
var
|
|
9928
|
+
var navRef = React.useRef(null);
|
|
9929
|
+
var bodyRef = React.useRef(null);
|
|
9930
|
+
// A classic scrollbar narrows every row, so rows need its width. Measured while expanded (the rail
|
|
9931
|
+
// only clips what rows hold) and written straight to a CSS variable, so it re-renders nothing.
|
|
9932
|
+
React.useEffect(function () {
|
|
9933
|
+
var nav = navRef.current;
|
|
9934
|
+
var body = bodyRef.current;
|
|
9935
|
+
if (!nav || !body || collapsed) return;
|
|
9936
|
+
var measure = function measure() {
|
|
9937
|
+
return nav.style.setProperty(SCROLLBAR_VAR, "".concat(body.offsetWidth - body.clientWidth, "px"));
|
|
9938
|
+
};
|
|
9939
|
+
measure();
|
|
9940
|
+
if (typeof ResizeObserver === 'undefined') return;
|
|
9941
|
+
var observer = new ResizeObserver(measure);
|
|
9942
|
+
observer.observe(body);
|
|
9943
|
+
if (contentRef.current) observer.observe(contentRef.current);
|
|
9944
|
+
return function () {
|
|
9945
|
+
return observer.disconnect();
|
|
9946
|
+
};
|
|
9947
|
+
}, [collapsed]);
|
|
9948
|
+
var _g = React.useState({
|
|
9698
9949
|
box: null,
|
|
9699
9950
|
visible: false,
|
|
9700
9951
|
instant: true
|
|
9701
9952
|
}),
|
|
9702
|
-
highlight =
|
|
9703
|
-
setHighlight =
|
|
9953
|
+
highlight = _g[0],
|
|
9954
|
+
setHighlight = _g[1];
|
|
9955
|
+
// Focus follows the toggle: the one pressed fades away, so focus moves to the one now shown
|
|
9956
|
+
var collapseSlot = React.useRef(null);
|
|
9957
|
+
var expandSlot = React.useRef(null);
|
|
9958
|
+
// Which state a toggle asked for, and when: focus moves only if that state arrives promptly, so a
|
|
9959
|
+
// controlled parent that declined the change can't have focus jump on some later change
|
|
9960
|
+
var focusToggle = React.useRef(null);
|
|
9704
9961
|
var toggle = function toggle() {
|
|
9705
9962
|
var next = !collapsed;
|
|
9963
|
+
focusToggle.current = {
|
|
9964
|
+
to: next,
|
|
9965
|
+
at: Date.now()
|
|
9966
|
+
};
|
|
9706
9967
|
if (!isControlled) setUncontrolledCollapsed(next);
|
|
9707
9968
|
onCollapsedChange === null || onCollapsedChange === void 0 ? void 0 : onCollapsedChange(next);
|
|
9708
9969
|
};
|
|
9970
|
+
React.useEffect(function () {
|
|
9971
|
+
var _a;
|
|
9972
|
+
var request = focusToggle.current;
|
|
9973
|
+
focusToggle.current = null;
|
|
9974
|
+
if (!request || request.to !== collapsed || Date.now() - request.at > 1000) return;
|
|
9975
|
+
var slot = collapsed ? expandSlot.current : collapseSlot.current;
|
|
9976
|
+
(_a = slot === null || slot === void 0 ? void 0 : slot.querySelector('button')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9977
|
+
}, [collapsed]);
|
|
9709
9978
|
var hide = function hide() {
|
|
9710
9979
|
return setHighlight(function (state) {
|
|
9711
9980
|
return __assign(__assign({}, state), {
|
|
@@ -9715,9 +9984,9 @@ var SidebarNav = function SidebarNav(_a) {
|
|
|
9715
9984
|
};
|
|
9716
9985
|
// Collapsing or expanding moves every row, so the highlight's box is stale: hide it until the
|
|
9717
9986
|
// pointer or focus finds a row again (adjusted during render, React's pattern for a prop change)
|
|
9718
|
-
var
|
|
9719
|
-
layout =
|
|
9720
|
-
setLayout =
|
|
9987
|
+
var _h = React.useState(collapsed),
|
|
9988
|
+
layout = _h[0],
|
|
9989
|
+
setLayout = _h[1];
|
|
9721
9990
|
if (layout !== collapsed) {
|
|
9722
9991
|
setLayout(collapsed);
|
|
9723
9992
|
setHighlight(function (state) {
|
|
@@ -9754,32 +10023,64 @@ var SidebarNav = function SidebarNav(_a) {
|
|
|
9754
10023
|
glide: true,
|
|
9755
10024
|
inNav: true
|
|
9756
10025
|
};
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
children: jsxRuntime.jsx(IconButton, {
|
|
9762
|
-
variant: "naked",
|
|
9763
|
-
size: "small",
|
|
9764
|
-
iconName: "sidebar",
|
|
9765
|
-
"aria-label": toggleLabel,
|
|
9766
|
-
"aria-expanded": !collapsed,
|
|
9767
|
-
onClick: toggle
|
|
9768
|
-
})
|
|
10026
|
+
// The header content keeps its expanded layout: it fades out in the rail rather than turning into
|
|
10027
|
+
// a rail version of itself mid-move
|
|
10028
|
+
var headerContext = __assign(__assign({}, context), {
|
|
10029
|
+
collapsed: false
|
|
9769
10030
|
});
|
|
9770
10031
|
return jsxRuntime.jsx(SidebarNavContext.Provider, {
|
|
9771
10032
|
value: context,
|
|
9772
10033
|
children: jsxRuntime.jsxs(Nav, {
|
|
10034
|
+
ref: navRef,
|
|
9773
10035
|
"aria-label": label,
|
|
9774
10036
|
"$width": collapsed ? widths.rail : widths[width],
|
|
9775
10037
|
"data-collapsed": collapsed || undefined,
|
|
9776
10038
|
"data-testid": dataTestId,
|
|
9777
|
-
|
|
9778
|
-
|
|
10039
|
+
style: (_b = {}, _b[EXPANDED_WIDTH_VAR] = widths[width], _b),
|
|
10040
|
+
children: [(header || collapsible) && jsxRuntime.jsxs(Header, {
|
|
9779
10041
|
children: [header && jsxRuntime.jsx(HeaderContent, {
|
|
9780
|
-
|
|
9781
|
-
|
|
10042
|
+
"$hidden": collapsed,
|
|
10043
|
+
children: jsxRuntime.jsx("div", {
|
|
10044
|
+
children: jsxRuntime.jsx(SidebarNavContext.Provider, {
|
|
10045
|
+
value: headerContext,
|
|
10046
|
+
children: header
|
|
10047
|
+
})
|
|
10048
|
+
})
|
|
10049
|
+
}), collapsible && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
10050
|
+
children: [jsxRuntime.jsx(CollapseSlot, {
|
|
10051
|
+
ref: collapseSlot,
|
|
10052
|
+
"$hidden": collapsed,
|
|
10053
|
+
children: jsxRuntime.jsx(Tooltip, {
|
|
10054
|
+
text: "Collapse sidebar",
|
|
10055
|
+
side: "bottom",
|
|
10056
|
+
children: jsxRuntime.jsx(IconButton, {
|
|
10057
|
+
variant: "naked",
|
|
10058
|
+
size: "small",
|
|
10059
|
+
iconName: "sidebar",
|
|
10060
|
+
"aria-label": "Collapse sidebar",
|
|
10061
|
+
"aria-expanded": true,
|
|
10062
|
+
onClick: toggle
|
|
10063
|
+
})
|
|
10064
|
+
})
|
|
10065
|
+
}), jsxRuntime.jsx(ExpandSlot, {
|
|
10066
|
+
ref: expandSlot,
|
|
10067
|
+
"$hidden": !collapsed,
|
|
10068
|
+
children: jsxRuntime.jsx(Tooltip, {
|
|
10069
|
+
text: "Expand sidebar",
|
|
10070
|
+
side: "right",
|
|
10071
|
+
children: jsxRuntime.jsx(IconButton, {
|
|
10072
|
+
variant: "naked",
|
|
10073
|
+
size: "small",
|
|
10074
|
+
iconName: "sidebar",
|
|
10075
|
+
"aria-label": "Expand sidebar",
|
|
10076
|
+
"aria-expanded": false,
|
|
10077
|
+
onClick: toggle
|
|
10078
|
+
})
|
|
10079
|
+
})
|
|
10080
|
+
})]
|
|
10081
|
+
})]
|
|
9782
10082
|
}), jsxRuntime.jsx(Body, {
|
|
10083
|
+
ref: bodyRef,
|
|
9783
10084
|
children: jsxRuntime.jsxs(Content, {
|
|
9784
10085
|
ref: contentRef,
|
|
9785
10086
|
onPointerOver: function onPointerOver(event) {
|
|
@@ -9807,14 +10108,17 @@ var SidebarNav = function SidebarNav(_a) {
|
|
|
9807
10108
|
children: children
|
|
9808
10109
|
})]
|
|
9809
10110
|
})
|
|
9810
|
-
}), footer &&
|
|
9811
|
-
|
|
10111
|
+
}), footer && jsxRuntime.jsx(Footer, {
|
|
10112
|
+
"$hidden": collapsed,
|
|
10113
|
+
children: jsxRuntime.jsx("div", {
|
|
10114
|
+
children: footer
|
|
10115
|
+
})
|
|
9812
10116
|
})]
|
|
9813
10117
|
})
|
|
9814
10118
|
});
|
|
9815
10119
|
};
|
|
9816
10120
|
SidebarNav.displayName = 'SidebarNav';
|
|
9817
|
-
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;
|
|
10121
|
+
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, templateObject_10$1;
|
|
9818
10122
|
|
|
9819
10123
|
// Exception to decision 0014: the gap props are typed as base dimension keys (public API),
|
|
9820
10124
|
// so they are looked up in the base tier until they accept semantic keys.
|