@common-origin/design-system 2.21.0 → 2.23.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 +261 -208
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.mts +16 -4
- package/dist/components/atoms/Badge/Badge.d.ts +16 -4
- package/dist/components/atoms/Badge/Badge.mjs +4 -5
- package/dist/components/atoms/Badge/index.d.mts +1 -1
- package/dist/components/atoms/Badge/index.d.ts +1 -1
- package/dist/components/atoms/Box/Box.d.mts +25 -1
- package/dist/components/atoms/Box/Box.d.ts +25 -1
- package/dist/components/atoms/Box/Box.mjs +5 -2
- package/dist/components/atoms/Button/Button.mjs +1 -1
- package/dist/components/atoms/CategoryLabel/CategoryLabel.d.mts +23 -8
- package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +23 -8
- package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs +31 -18
- package/dist/components/atoms/CategoryLabel/index.d.mts +1 -1
- package/dist/components/atoms/CategoryLabel/index.d.ts +1 -1
- package/dist/components/atoms/Chip/SuggestionChip.mjs +1 -1
- package/dist/components/atoms/Chip/shared/utils.mjs +1 -1
- package/dist/components/atoms/Chip/shared/utils.mjs.map +1 -1
- package/dist/components/atoms/Icon/Icon.mjs +1 -1
- package/dist/components/atoms/MoneyDisplay/MoneyDisplay.mjs +14 -60
- package/dist/components/atoms/StatusBadge/StatusBadge.d.mts +3 -2
- package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +3 -2
- package/dist/components/atoms/StatusBadge/StatusBadge.mjs +1 -1
- package/dist/components/atoms/StatusBadge/StatusBadge.mjs.map +1 -1
- package/dist/components/atoms/StatusLabel/StatusLabel.d.mts +5 -2
- package/dist/components/atoms/StatusLabel/StatusLabel.d.ts +5 -2
- package/dist/components/atoms/StatusLabel/StatusLabel.mjs +5 -2
- package/dist/components/atoms/StatusLabel/StatusLabel.mjs.map +1 -1
- package/dist/components/atoms/StatusLabel/StatusLabelBase.d.mts +2 -2
- package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +2 -2
- package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs +19 -13
- package/dist/components/atoms/StatusLabel/StatusShape.d.mts +4 -0
- package/dist/components/atoms/StatusLabel/StatusShape.d.ts +4 -0
- package/dist/components/atoms/StatusLabel/StatusShape.mjs +31 -0
- package/dist/components/atoms/StatusLabel/StatusShape.mjs.map +1 -0
- package/dist/components/atoms/Typography/Typography.mjs +2 -2
- package/dist/components/molecules/AccountCard/AccountCard.mjs +22 -14
- package/dist/components/molecules/Alert/Alert.d.mts +4 -4
- package/dist/components/molecules/Alert/Alert.d.ts +4 -4
- package/dist/components/molecules/Alert/Alert.mjs +5 -4
- package/dist/components/molecules/CodeBlock/CodeBlock.mjs +1 -1
- package/dist/components/molecules/Dropdown/Dropdown.mjs +2 -2
- package/dist/components/molecules/InlineAlert/InlineAlert.mjs +15 -5
- package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
- package/dist/components/molecules/TransactionListItem/TransactionListItem.d.mts +1 -1
- package/dist/components/molecules/TransactionListItem/TransactionListItem.d.ts +1 -1
- package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs +15 -31
- package/dist/data.js +514 -303
- package/dist/data.js.map +1 -1
- package/dist/lib/statusShapes.d.mts +2 -0
- package/dist/lib/statusShapes.d.ts +2 -0
- package/dist/lib/statusShapes.mjs +16 -0
- package/dist/lib/statusShapes.mjs.map +1 -0
- package/dist/lib/styleUtils.mjs +2 -2
- package/dist/lib/styleUtils.mjs.map +1 -1
- package/dist/lib/tokenAliases.d.mts +9 -0
- package/dist/lib/tokenAliases.d.ts +9 -0
- package/dist/lib/tokenAliases.mjs +50 -11
- package/dist/lib/tokenAliases.mjs.map +1 -1
- package/dist/styles/icons.json +141 -0
- package/dist/styles/icons.json.mjs +153 -2
- package/dist/styles/icons.json.mjs.map +1 -1
- package/dist/styles/tokens.d.mts +721 -123
- package/dist/styles/tokens.d.ts +721 -123
- package/dist/styles/tokens.json +362 -302
- package/dist/styles/tokens.json.mjs +362 -302
- package/dist/styles/tokens.json.mjs.map +1 -1
- package/dist/tokens/index.js +362 -302
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/index.mjs +362 -302
- package/dist/tokens/index.mjs.map +1 -1
- package/dist/tokens/styles/tokens.d.mts +721 -123
- package/dist/tokens/styles/tokens.d.ts +721 -123
- package/dist/tokens.css +363 -317
- package/dist/types/icons.d.mts +1 -1
- package/dist/types/icons.d.ts +1 -1
- package/dist/types/icons.mjs.map +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -167,7 +167,7 @@ var AvatarContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
167
167
|
},
|
|
168
168
|
displayName: "Avatar__AvatarContainer",
|
|
169
169
|
componentId: "sc-ezn4ax-0"
|
|
170
|
-
})(templateObject_1$
|
|
170
|
+
})(templateObject_1$P || (templateObject_1$P = __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
172
|
return size$4.avatar[$size];
|
|
173
173
|
}, function (_a) {
|
|
@@ -246,7 +246,7 @@ var Avatar = function Avatar(_a) {
|
|
|
246
246
|
})
|
|
247
247
|
}));
|
|
248
248
|
};
|
|
249
|
-
var templateObject_1$
|
|
249
|
+
var templateObject_1$P, templateObject_2$z, templateObject_3$w;
|
|
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$O || (templateObject_1$O = __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
|
|
@@ -333,11 +333,11 @@ var rowStates = {
|
|
|
333
333
|
},
|
|
334
334
|
hover: {
|
|
335
335
|
background: rowFill['accent-muted-hover'],
|
|
336
|
-
text: rowText
|
|
336
|
+
text: rowText.accent
|
|
337
337
|
},
|
|
338
338
|
pressed: {
|
|
339
339
|
background: rowFill['accent-muted-pressed'],
|
|
340
|
-
text: rowText
|
|
340
|
+
text: rowText.accent
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
};
|
|
@@ -399,7 +399,7 @@ var rowForcedColors = function rowForcedColors(_a) {
|
|
|
399
399
|
// the descendants' own rules.
|
|
400
400
|
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
401
|
};
|
|
402
|
-
var templateObject_1$
|
|
402
|
+
var templateObject_1$O, templateObject_2$y, templateObject_3$v;
|
|
403
403
|
|
|
404
404
|
var _a$a = tokens.semantic,
|
|
405
405
|
typography$3 = _a$a.typography,
|
|
@@ -421,7 +421,7 @@ var getTypographyStyles = function getTypographyStyles(variant) {
|
|
|
421
421
|
caption: "font: ".concat(typography$3.caption, "; text-transform: uppercase;"),
|
|
422
422
|
button1: "font: ".concat(tokens.component.button.sizes.large.font, ";"),
|
|
423
423
|
button2: "font: ".concat(tokens.component.button.sizes.medium.font, ";"),
|
|
424
|
-
button3: "font: ".concat(tokens.component.button.sizes.small.font, ";"),
|
|
424
|
+
button3: "font: ".concat(tokens.component.button.sizes.small.font, "; font-weight: ").concat(tokens.component.button.sizes.small.fontWeight, ";"),
|
|
425
425
|
label: "font: ".concat(typography$3.label, ";")
|
|
426
426
|
};
|
|
427
427
|
return styles[variant] || styles.body;
|
|
@@ -429,7 +429,7 @@ var getTypographyStyles = function getTypographyStyles(variant) {
|
|
|
429
429
|
var getTextColor = function getTextColor(colorVariant) {
|
|
430
430
|
var colorMap = {
|
|
431
431
|
"default": color$c.text["default"],
|
|
432
|
-
emphasis: color$c.text
|
|
432
|
+
emphasis: color$c.text["default"],
|
|
433
433
|
subdued: color$c.text.muted,
|
|
434
434
|
inverse: color$c.text.inverse,
|
|
435
435
|
disabled: color$c.text.disabled,
|
|
@@ -467,7 +467,7 @@ var StyledTypography = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
467
467
|
},
|
|
468
468
|
displayName: "Typography__StyledTypography",
|
|
469
469
|
componentId: "sc-17mqo4k-0"
|
|
470
|
-
})(templateObject_1$
|
|
470
|
+
})(templateObject_1$N || (templateObject_1$N = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n"], ["\n ", "\n color: ", ";\n margin: 0;\n"
|
|
471
471
|
/**
|
|
472
472
|
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
473
473
|
*
|
|
@@ -529,7 +529,7 @@ var Typography = function Typography(_a) {
|
|
|
529
529
|
children: children
|
|
530
530
|
});
|
|
531
531
|
};
|
|
532
|
-
var templateObject_1$
|
|
532
|
+
var templateObject_1$N;
|
|
533
533
|
|
|
534
534
|
var semantic$m = tokens.semantic;
|
|
535
535
|
var color$b = semantic$m.color;
|
|
@@ -538,7 +538,7 @@ var _a$9 = tokens.component.badge,
|
|
|
538
538
|
dot = _a$9.dot,
|
|
539
539
|
count = _a$9.count,
|
|
540
540
|
ring = _a$9.ring;
|
|
541
|
-
var scaleIn$2 = styled.keyframes(templateObject_1$
|
|
541
|
+
var scaleIn$2 = styled.keyframes(templateObject_1$M || (templateObject_1$M = __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
542
|
var BadgeWrapper = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
543
543
|
displayName: "Badge__BadgeWrapper",
|
|
544
544
|
componentId: "sc-tjz4pp-0"
|
|
@@ -561,16 +561,15 @@ var BadgeIndicator = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
561
561
|
return props.$isDot ? "".concat(forcedColors, " { forced-color-adjust: none; background-color: CanvasText; }") : "".concat(forcedColors, " { border: ").concat(semantic$m.border.width.thin, " solid currentColor; }");
|
|
562
562
|
}, function (props) {
|
|
563
563
|
switch (props.$variant) {
|
|
564
|
+
// 'primary', 'error', 'warning' and 'success' are deprecated aliases for 'accent', removed in
|
|
565
|
+
// 3.0: 'primary' (#169), and the status colours, because a badge's colour alone can't carry a
|
|
566
|
+
// status (decision 0045, #263)
|
|
564
567
|
case 'accent':
|
|
565
568
|
case 'primary':
|
|
566
|
-
// Deprecated alias for 'accent', removed in 3.0 (#169)
|
|
567
|
-
return "\n background-color: ".concat(color$b.fill.accent, ";\n color: ").concat(color$b.text.inverse, ";\n ");
|
|
568
569
|
case 'error':
|
|
569
|
-
return "\n background-color: ".concat(color$b.fill.danger, ";\n color: ").concat(color$b.text.inverse, ";\n ");
|
|
570
570
|
case 'warning':
|
|
571
|
-
return "\n background-color: ".concat(color$b.fill.warning, ";\n color: ").concat(color$b.text.inverse, ";\n ");
|
|
572
571
|
case 'success':
|
|
573
|
-
return "\n background-color: ".concat(color$b.fill.
|
|
572
|
+
return "\n background-color: ".concat(color$b.fill.accent, ";\n color: ").concat(color$b.text.inverse, ";\n ");
|
|
574
573
|
default:
|
|
575
574
|
return "\n background-color: ".concat(color$b.fill.emphasis, ";\n color: ").concat(color$b.text.inverse, ";\n ");
|
|
576
575
|
}
|
|
@@ -616,7 +615,7 @@ var Badge = function Badge(_a) {
|
|
|
616
615
|
})]
|
|
617
616
|
});
|
|
618
617
|
};
|
|
619
|
-
var templateObject_1$
|
|
618
|
+
var templateObject_1$M, templateObject_2$x, templateObject_3$u, templateObject_4$n;
|
|
620
619
|
|
|
621
620
|
// Props whose values are token keys keep their published vocabulary in 2.x (P7), but read the
|
|
622
621
|
// semantic grammar's names (decision 0031, #189). Each map covers every key the prop type allows,
|
|
@@ -625,7 +624,8 @@ var semantic$l = tokens.semantic;
|
|
|
625
624
|
var color$a = semantic$l.color,
|
|
626
625
|
space$e = semantic$l.space,
|
|
627
626
|
radius$4 = semantic$l.radius,
|
|
628
|
-
surface = semantic$l.surface
|
|
627
|
+
surface = semantic$l.surface,
|
|
628
|
+
opacity = semantic$l.opacity;
|
|
629
629
|
/** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
|
|
630
630
|
var spaceByLayoutKey = {
|
|
631
631
|
none: space$e[0],
|
|
@@ -659,6 +659,40 @@ var radiusByKey = {
|
|
|
659
659
|
'3xl': radius$4['3xl'],
|
|
660
660
|
circle: radius$4.full
|
|
661
661
|
};
|
|
662
|
+
/** Box's `bg` prop: the grammar's token paths, read from the token at that path. */
|
|
663
|
+
var backgroundByPath = {
|
|
664
|
+
'surface.base': surface.base,
|
|
665
|
+
'surface.raised': surface.raised,
|
|
666
|
+
'surface.scrim': surface.scrim,
|
|
667
|
+
'color.fill.emphasis': color$a.fill.emphasis,
|
|
668
|
+
'color.fill.muted': color$a.fill.muted,
|
|
669
|
+
'color.fill.inverse': color$a.fill.inverse,
|
|
670
|
+
'color.fill.accent': color$a.fill.accent,
|
|
671
|
+
'color.fill.accent-hover': color$a.fill['accent-hover'],
|
|
672
|
+
'color.fill.accent-pressed': color$a.fill['accent-pressed'],
|
|
673
|
+
'color.fill.accent-muted': color$a.fill['accent-muted'],
|
|
674
|
+
'color.fill.accent-muted-hover': color$a.fill['accent-muted-hover'],
|
|
675
|
+
'color.fill.accent-muted-pressed': color$a.fill['accent-muted-pressed'],
|
|
676
|
+
'color.fill.danger': color$a.fill.danger,
|
|
677
|
+
'color.fill.danger-hover': color$a.fill['danger-hover'],
|
|
678
|
+
'color.fill.danger-pressed': color$a.fill['danger-pressed'],
|
|
679
|
+
'color.fill.danger-muted': color$a.fill['danger-muted'],
|
|
680
|
+
'color.fill.success': color$a.fill.success,
|
|
681
|
+
'color.fill.success-muted': color$a.fill['success-muted'],
|
|
682
|
+
'color.fill.warning': color$a.fill.warning,
|
|
683
|
+
'color.fill.warning-muted': color$a.fill['warning-muted'],
|
|
684
|
+
'color.fill.serious': color$a.fill.serious,
|
|
685
|
+
'color.fill.serious-muted': color$a.fill['serious-muted'],
|
|
686
|
+
'color.fill.ai-muted': color$a.fill['ai-muted'],
|
|
687
|
+
'color.fill.disabled': color$a.fill.disabled,
|
|
688
|
+
'color.fill.default': color$a.fill["default"],
|
|
689
|
+
'color.fill.default-hover': color$a.fill['default-hover'],
|
|
690
|
+
'color.fill.default-pressed': color$a.fill['default-pressed'],
|
|
691
|
+
'color.fill.none': color$a.fill.none,
|
|
692
|
+
'color.fill.none-hover': color$a.fill['none-hover'],
|
|
693
|
+
'color.fill.none-pressed': color$a.fill['none-pressed'],
|
|
694
|
+
'color.fill.inverse-none-hover': color$a.fill['inverse-none-hover']
|
|
695
|
+
};
|
|
662
696
|
/** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
|
|
663
697
|
var backgroundByKey = {
|
|
664
698
|
"default": surface.base,
|
|
@@ -666,8 +700,9 @@ var backgroundByKey = {
|
|
|
666
700
|
subtle: surface.raised,
|
|
667
701
|
overlay: surface.scrim,
|
|
668
702
|
emphasis: color$a.fill.emphasis,
|
|
669
|
-
|
|
670
|
-
'emphasis-
|
|
703
|
+
// A strong fill's states mix its content colour in at the state-layer opacity (decision 0048)
|
|
704
|
+
'emphasis-hover': "color-mix(in srgb, ".concat(color$a.fill.emphasis, ", ").concat(color$a.text.inverse, " calc(").concat(opacity.state.hover, " * 100%))"),
|
|
705
|
+
'emphasis-active': "color-mix(in srgb, ".concat(color$a.fill.emphasis, ", ").concat(color$a.text.inverse, " calc(").concat(opacity.state.pressed, " * 100%))"),
|
|
671
706
|
surface: color$a.fill.muted,
|
|
672
707
|
inverse: color$a.fill.inverse,
|
|
673
708
|
interactive: color$a.fill.accent,
|
|
@@ -698,21 +733,22 @@ var backgroundByKey = {
|
|
|
698
733
|
/** Box's `color` prop: text colours, old and new keys. */
|
|
699
734
|
var textColorByKey = {
|
|
700
735
|
"default": color$a.text["default"],
|
|
701
|
-
emphasis: color$a.text
|
|
736
|
+
emphasis: color$a.text["default"],
|
|
702
737
|
inverse: color$a.text.inverse,
|
|
703
738
|
disabled: color$a.text.disabled,
|
|
704
739
|
success: color$a.text.success,
|
|
705
740
|
warning: color$a.text.warning,
|
|
706
741
|
muted: color$a.text.muted,
|
|
707
742
|
accent: color$a.text.accent,
|
|
708
|
-
'accent-hover': color$a.text
|
|
709
|
-
'accent-pressed': color$a.text
|
|
743
|
+
'accent-hover': color$a.text.accent,
|
|
744
|
+
'accent-pressed': color$a.text.accent,
|
|
710
745
|
danger: color$a.text.danger,
|
|
746
|
+
serious: color$a.text.serious,
|
|
711
747
|
ai: color$a.text.ai,
|
|
712
748
|
subdued: color$a.text.muted,
|
|
713
749
|
interactive: color$a.text.accent,
|
|
714
|
-
'interactive-hover': color$a.text
|
|
715
|
-
'interactive-active': color$a.text
|
|
750
|
+
'interactive-hover': color$a.text.accent,
|
|
751
|
+
'interactive-active': color$a.text.accent,
|
|
716
752
|
error: color$a.text.danger
|
|
717
753
|
};
|
|
718
754
|
/** Box's border props: border colours, old and new keys. */
|
|
@@ -721,13 +757,15 @@ var borderColorByKey = {
|
|
|
721
757
|
success: color$a.border.success,
|
|
722
758
|
warning: color$a.border.warning,
|
|
723
759
|
none: color$a.border.none,
|
|
724
|
-
emphasis: color$a.border
|
|
760
|
+
emphasis: color$a.border["default"],
|
|
725
761
|
input: color$a.border.input,
|
|
726
762
|
'input-hover': color$a.border['input-hover'],
|
|
727
763
|
focus: color$a.border.focus,
|
|
728
764
|
accent: color$a.border.accent,
|
|
729
765
|
danger: color$a.border.danger,
|
|
730
|
-
|
|
766
|
+
serious: color$a.border.serious,
|
|
767
|
+
ai: color$a.border.ai,
|
|
768
|
+
subtle: color$a.border["default"],
|
|
731
769
|
control: color$a.border.input,
|
|
732
770
|
// `strong` split by use (0031); as a generic firm outline it is the hovered-input border
|
|
733
771
|
strong: color$a.border['input-hover'],
|
|
@@ -735,6 +773,9 @@ var borderColorByKey = {
|
|
|
735
773
|
error: color$a.border.danger
|
|
736
774
|
};
|
|
737
775
|
|
|
776
|
+
var backgroundColor = function backgroundColor(bg) {
|
|
777
|
+
return bg in backgroundByPath ? backgroundByPath[bg] : backgroundByKey[bg];
|
|
778
|
+
};
|
|
738
779
|
var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
739
780
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
740
781
|
return !prop.startsWith('$');
|
|
@@ -744,7 +785,7 @@ var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
744
785
|
})(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"
|
|
745
786
|
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
746
787
|
])), function (props) {
|
|
747
|
-
return props.$display && styled.css(templateObject_1$
|
|
788
|
+
return props.$display && styled.css(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
748
789
|
}, function (props) {
|
|
749
790
|
return props.$flexDirection && styled.css(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
750
791
|
}, function (props) {
|
|
@@ -818,7 +859,7 @@ var StyledBox = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
818
859
|
}, function (props) {
|
|
819
860
|
return props.$borderLeft && styled.css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["border-left: ", " solid ", ";"], ["border-left: ", " solid ", ";"])), tokens.semantic.border.width.thin, borderColorByKey[props.$borderLeft]);
|
|
820
861
|
}, function (props) {
|
|
821
|
-
return props.$bg && styled.css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])),
|
|
862
|
+
return props.$bg && styled.css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), backgroundColor(props.$bg));
|
|
822
863
|
}, function (props) {
|
|
823
864
|
return props.$color && styled.css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), textColorByKey[props.$color]);
|
|
824
865
|
}, function (props) {
|
|
@@ -968,7 +1009,7 @@ var BoxTransform = function BoxTransform(props) {
|
|
|
968
1009
|
}));
|
|
969
1010
|
};
|
|
970
1011
|
var Box = BoxTransform;
|
|
971
|
-
var templateObject_1$
|
|
1012
|
+
var templateObject_1$L, templateObject_2$w, templateObject_3$t, templateObject_4$m, templateObject_5$i, templateObject_6$d, templateObject_7$b, templateObject_8$8, templateObject_9$6, templateObject_10$4, templateObject_11$4, templateObject_12$4, templateObject_13$4, templateObject_14$2, templateObject_15$2, templateObject_16$2, templateObject_17$2, templateObject_18$2, templateObject_19$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;
|
|
972
1013
|
|
|
973
1014
|
var IconStyled = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
974
1015
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -976,7 +1017,7 @@ var IconStyled = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
976
1017
|
},
|
|
977
1018
|
displayName: "Icon__IconStyled",
|
|
978
1019
|
componentId: "sc-1105czq-0"
|
|
979
|
-
})(templateObject_1$
|
|
1020
|
+
})(templateObject_1$K || (templateObject_1$K = __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) {
|
|
980
1021
|
var $size = _a.$size;
|
|
981
1022
|
return tokens.semantic.size.icon[$size];
|
|
982
1023
|
}, function (_a) {
|
|
@@ -988,7 +1029,7 @@ var IconStyled = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
988
1029
|
case 'default':
|
|
989
1030
|
return tokens.semantic.color.icon["default"];
|
|
990
1031
|
case 'emphasis':
|
|
991
|
-
return tokens.semantic.color.icon
|
|
1032
|
+
return tokens.semantic.color.icon["default"];
|
|
992
1033
|
case 'subdued':
|
|
993
1034
|
return tokens.semantic.color.icon.muted;
|
|
994
1035
|
case 'disabled':
|
|
@@ -1053,7 +1094,7 @@ var Icon = function Icon(_a) {
|
|
|
1053
1094
|
}))
|
|
1054
1095
|
});
|
|
1055
1096
|
};
|
|
1056
|
-
var templateObject_1$
|
|
1097
|
+
var templateObject_1$K;
|
|
1057
1098
|
|
|
1058
1099
|
var button$1 = tokens.component.button,
|
|
1059
1100
|
semantic$k = tokens.semantic;
|
|
@@ -1126,7 +1167,7 @@ var getSizeStyles = function getSizeStyles(_a) {
|
|
|
1126
1167
|
var $size = _a.$size;
|
|
1127
1168
|
switch ($size) {
|
|
1128
1169
|
case 'small':
|
|
1129
|
-
return "\n font: ".concat(button$1.sizes.small.font, ";\n min-height: ").concat(control$1.sm, ";\n padding: 0 ").concat(inset.md, ";\n ");
|
|
1170
|
+
return "\n font: ".concat(button$1.sizes.small.font, ";\n font-weight: ").concat(button$1.sizes.small.fontWeight, ";\n min-height: ").concat(control$1.sm, ";\n padding: 0 ").concat(inset.md, ";\n ");
|
|
1130
1171
|
case 'medium':
|
|
1131
1172
|
return "\n font: ".concat(button$1.sizes.medium.font, ";\n min-height: ").concat(control$1.md, ";\n padding: 0 ").concat(inset.lg, ";\n ");
|
|
1132
1173
|
case 'large':
|
|
@@ -1140,7 +1181,7 @@ var StyledButton = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
1140
1181
|
},
|
|
1141
1182
|
displayName: "Button__StyledButton",
|
|
1142
1183
|
componentId: "sc-1eiuum9-0"
|
|
1143
|
-
})(templateObject_1$
|
|
1184
|
+
})(templateObject_1$J || (templateObject_1$J = __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);
|
|
1144
1185
|
var StyledLink = /*#__PURE__*/styled__default.default.a.withConfig({
|
|
1145
1186
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1146
1187
|
return !prop.startsWith('$');
|
|
@@ -1250,7 +1291,7 @@ var Button = function Button(_a) {
|
|
|
1250
1291
|
children: renderButtonContent(children, iconName, size)
|
|
1251
1292
|
}));
|
|
1252
1293
|
};
|
|
1253
|
-
var templateObject_1$
|
|
1294
|
+
var templateObject_1$J, templateObject_2$v;
|
|
1254
1295
|
|
|
1255
1296
|
var semantic$j = tokens.semantic;
|
|
1256
1297
|
var color$9 = semantic$j.color;
|
|
@@ -1259,15 +1300,26 @@ var category = color$9.category;
|
|
|
1259
1300
|
var radius$3 = semantic$j.radius;
|
|
1260
1301
|
var space$d = semantic$j.space;
|
|
1261
1302
|
var labelHeight$1 = semantic$j.size.label;
|
|
1262
|
-
|
|
1303
|
+
var displayColor = {
|
|
1304
|
+
olive: 'olive',
|
|
1305
|
+
periwinkle: 'periwinkle',
|
|
1306
|
+
rose: 'rose',
|
|
1307
|
+
magenta: 'magenta',
|
|
1308
|
+
gray: 'gray',
|
|
1309
|
+
blue: 'periwinkle',
|
|
1310
|
+
purple: 'magenta',
|
|
1311
|
+
pink: 'rose',
|
|
1312
|
+
yellow: 'olive',
|
|
1313
|
+
green: 'olive',
|
|
1314
|
+
red: 'rose',
|
|
1315
|
+
orange: 'rose'
|
|
1316
|
+
};
|
|
1317
|
+
// Text on white or the -muted fill (outlined and minimal), at least 4.5:1 (#115)
|
|
1263
1318
|
var categoryText = {
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
green: category['green-text'],
|
|
1269
|
-
red: category['red-text'],
|
|
1270
|
-
orange: category['orange-text'],
|
|
1319
|
+
olive: category['olive-text'],
|
|
1320
|
+
periwinkle: category['periwinkle-text'],
|
|
1321
|
+
rose: category['rose-text'],
|
|
1322
|
+
magenta: category['magenta-text'],
|
|
1271
1323
|
gray: category['gray-text']
|
|
1272
1324
|
};
|
|
1273
1325
|
var StyledCategoryLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
@@ -1276,7 +1328,7 @@ var StyledCategoryLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1276
1328
|
},
|
|
1277
1329
|
displayName: "CategoryLabel__StyledCategoryLabel",
|
|
1278
1330
|
componentId: "sc-1jx7bjo-0"
|
|
1279
|
-
})(templateObject_1$
|
|
1331
|
+
})(templateObject_1$I || (templateObject_1$I = __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"
|
|
1280
1332
|
// The visible content, hidden from assistive technology when an aria-label replaces it.
|
|
1281
1333
|
// display: contents keeps the root's flex layout and gap.
|
|
1282
1334
|
])), radius$3.full, semantic$j.border.width.thin, function (_a) {
|
|
@@ -1327,16 +1379,17 @@ var HiddenLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1327
1379
|
/**
|
|
1328
1380
|
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1329
1381
|
*
|
|
1330
|
-
* A static, chip-like label with
|
|
1331
|
-
* Category colours carry no
|
|
1382
|
+
* A static, chip-like label with 4 display colours plus grey, 3 visual variants and an optional
|
|
1383
|
+
* icon. Category colours carry no meaning (decision 0043); for status use StatusLabel. Beyond five
|
|
1384
|
+
* categories, the icon and text tell them apart.
|
|
1332
1385
|
*
|
|
1333
1386
|
* @example
|
|
1334
1387
|
* ```tsx
|
|
1335
|
-
* <CategoryLabel color="
|
|
1388
|
+
* <CategoryLabel color="rose" icon="creditCard">
|
|
1336
1389
|
* Shopping
|
|
1337
1390
|
* </CategoryLabel>
|
|
1338
1391
|
*
|
|
1339
|
-
* <CategoryLabel color="
|
|
1392
|
+
* <CategoryLabel color="periwinkle" variant="outlined" size="medium">
|
|
1340
1393
|
* Travel
|
|
1341
1394
|
* </CategoryLabel>
|
|
1342
1395
|
* ```
|
|
@@ -1344,16 +1397,17 @@ var HiddenLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1344
1397
|
/**
|
|
1345
1398
|
* CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
|
|
1346
1399
|
*
|
|
1347
|
-
* A static, chip-like label with
|
|
1348
|
-
* Category colours carry no
|
|
1400
|
+
* A static, chip-like label with 4 display colours plus grey, 3 visual variants and an optional
|
|
1401
|
+
* icon. Category colours carry no meaning (decision 0043); for status use StatusLabel. Beyond five
|
|
1402
|
+
* categories, the icon and text tell them apart.
|
|
1349
1403
|
*
|
|
1350
1404
|
* @example
|
|
1351
1405
|
* ```tsx
|
|
1352
|
-
* <CategoryLabel color="
|
|
1406
|
+
* <CategoryLabel color="rose" icon="creditCard">
|
|
1353
1407
|
* Shopping
|
|
1354
1408
|
* </CategoryLabel>
|
|
1355
1409
|
*
|
|
1356
|
-
* <CategoryLabel color="
|
|
1410
|
+
* <CategoryLabel color="periwinkle" variant="outlined" size="medium">
|
|
1357
1411
|
* Travel
|
|
1358
1412
|
* </CategoryLabel>
|
|
1359
1413
|
* ```
|
|
@@ -1361,7 +1415,7 @@ var HiddenLabel = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1361
1415
|
var CategoryLabel = function CategoryLabel(_a) {
|
|
1362
1416
|
var children = _a.children,
|
|
1363
1417
|
_b = _a.color,
|
|
1364
|
-
color = _b === void 0 ? '
|
|
1418
|
+
color = _b === void 0 ? 'periwinkle' : _b,
|
|
1365
1419
|
_c = _a.variant,
|
|
1366
1420
|
variant = _c === void 0 ? 'filled' : _c,
|
|
1367
1421
|
_d = _a.size,
|
|
@@ -1373,7 +1427,7 @@ var CategoryLabel = function CategoryLabel(_a) {
|
|
|
1373
1427
|
// A blank aria-label is no label at all, so it falls back like a missing one
|
|
1374
1428
|
var accessibleLabel = (ariaLabel === null || ariaLabel === void 0 ? void 0 : ariaLabel.trim()) ? ariaLabel : undefined;
|
|
1375
1429
|
return jsxRuntime.jsxs(StyledCategoryLabel, {
|
|
1376
|
-
"$color": color,
|
|
1430
|
+
"$color": displayColor[color],
|
|
1377
1431
|
"$variant": variant,
|
|
1378
1432
|
"$size": size,
|
|
1379
1433
|
"data-testid": dataTestId,
|
|
@@ -1390,7 +1444,7 @@ var CategoryLabel = function CategoryLabel(_a) {
|
|
|
1390
1444
|
});
|
|
1391
1445
|
};
|
|
1392
1446
|
CategoryLabel.displayName = 'CategoryLabel';
|
|
1393
|
-
var templateObject_1$
|
|
1447
|
+
var templateObject_1$I, templateObject_2$u, templateObject_3$s;
|
|
1394
1448
|
|
|
1395
1449
|
// CategoryBadge sizes on the decision 0018 scale
|
|
1396
1450
|
var toLabelSize = {
|
|
@@ -1435,7 +1489,7 @@ var getVariantStyles = function getVariantStyles(_a) {
|
|
|
1435
1489
|
fill = _b.fill,
|
|
1436
1490
|
text = _b.text;
|
|
1437
1491
|
var interactiveStates = $clickable;
|
|
1438
|
-
return "\n background-color: ".concat(fill['accent-muted'], ";\n color: ").concat(text.accent, ";\n \n &:hover {\n background-color: ").concat(interactiveStates ? fill['accent-muted-hover'] : fill['accent-muted'], ";\n color: ").concat(interactiveStates ? text
|
|
1492
|
+
return "\n background-color: ".concat(fill['accent-muted'], ";\n color: ").concat(text.accent, ";\n \n &:hover {\n background-color: ").concat(interactiveStates ? fill['accent-muted-hover'] : fill['accent-muted'], ";\n color: ").concat(interactiveStates ? text.accent : text.accent, ";\n }\n \n &:active {\n background-color: ").concat(interactiveStates ? fill['accent-muted-pressed'] : fill['accent-muted'], ";\n color: ").concat(interactiveStates ? text.accent : text.accent, ";\n }\n\n /* Forced colours drop the fill, so a selected chip takes the system selection colours\n (decision 0038); its checkmark follows the text colour */\n ").concat(forcedColors, " {\n forced-color-adjust: none;\n background-color: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n ");
|
|
1439
1493
|
}
|
|
1440
1494
|
switch ($variant) {
|
|
1441
1495
|
case 'emphasis':
|
|
@@ -1463,7 +1517,7 @@ var StyledChip = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
1463
1517
|
},
|
|
1464
1518
|
displayName: "ChipBase__StyledChip",
|
|
1465
1519
|
componentId: "sc-moa6zc-0"
|
|
1466
|
-
})(templateObject_1$
|
|
1520
|
+
})(templateObject_1$H || (templateObject_1$H = __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"
|
|
1467
1521
|
// Icon container for selected indicator or leading icons
|
|
1468
1522
|
])), chip$1["default"].borderRadius, semantic$h.motion.transition.feedback, function (props) {
|
|
1469
1523
|
return props.$disabled ? 'not-allowed' : props.$clickable ? 'pointer' : 'default';
|
|
@@ -1487,7 +1541,7 @@ var CloseButton = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
1487
1541
|
})(templateObject_3$r || (templateObject_3$r = __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$h.size.label.medium, semantic$h.size.label.medium, tokens.semantic.radius.xs, function (props) {
|
|
1488
1542
|
return props.$disabled ? 'not-allowed' : 'pointer';
|
|
1489
1543
|
}, semantic$h.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$h.border.focusOffset, chip$1["default"].borderRadius);
|
|
1490
|
-
var templateObject_1$
|
|
1544
|
+
var templateObject_1$H, templateObject_2$t, templateObject_3$r;
|
|
1491
1545
|
|
|
1492
1546
|
/**
|
|
1493
1547
|
* Chip - a static, non-interactive label for tags, categories and metadata.
|
|
@@ -1732,7 +1786,7 @@ var color$8 = semantic$g.color;
|
|
|
1732
1786
|
var StyledSuggestionChip = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
1733
1787
|
displayName: "SuggestionChip__StyledSuggestionChip",
|
|
1734
1788
|
componentId: "sc-1k0njm-0"
|
|
1735
|
-
})(templateObject_1$
|
|
1789
|
+
})(templateObject_1$G || (templateObject_1$G = __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"
|
|
1736
1790
|
/**
|
|
1737
1791
|
* SuggestionChip - Offers text to put in the agent input
|
|
1738
1792
|
*
|
|
@@ -1744,7 +1798,7 @@ var StyledSuggestionChip = /*#__PURE__*/styled__default.default.button.withConfi
|
|
|
1744
1798
|
* - A native button: Enter and Space pick it, and its text is its accessible name
|
|
1745
1799
|
* - Outlined, with the naked hover and pressed fills; no selected state
|
|
1746
1800
|
* - One chip height (24px minimum, decision 0035); long text wraps instead of being cut off
|
|
1747
|
-
*/])), semantic$g.border.width.thin, color$8.border.input, chip["default"].borderRadius, color$8.fill.none, color$8.text["default"], semantic$g.motion.transition.feedback, sizeStyles, color$8.fill['none-hover'], color$8.fill['none-pressed'], chip.focus.outline, semantic$g.border.focusOffset, color$8.border
|
|
1801
|
+
*/])), semantic$g.border.width.thin, color$8.border.input, chip["default"].borderRadius, color$8.fill.none, color$8.text["default"], semantic$g.motion.transition.feedback, sizeStyles, color$8.fill['none-hover'], color$8.fill['none-pressed'], chip.focus.outline, semantic$g.border.focusOffset, color$8.border["default"], color$8.text.disabled, forcedColors);
|
|
1748
1802
|
/**
|
|
1749
1803
|
* SuggestionChip - Offers text to put in the agent input
|
|
1750
1804
|
*
|
|
@@ -1772,13 +1826,13 @@ var SuggestionChip = function SuggestionChip(_a) {
|
|
|
1772
1826
|
});
|
|
1773
1827
|
};
|
|
1774
1828
|
SuggestionChip.displayName = 'SuggestionChip';
|
|
1775
|
-
var templateObject_1$
|
|
1829
|
+
var templateObject_1$G;
|
|
1776
1830
|
|
|
1777
1831
|
var space$c = tokens.semantic.space;
|
|
1778
1832
|
var StyledContainer$2 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
1779
1833
|
displayName: "Container__StyledContainer",
|
|
1780
1834
|
componentId: "sc-17dbj6n-0"
|
|
1781
|
-
})(templateObject_1$
|
|
1835
|
+
})(templateObject_1$F || (templateObject_1$F = __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$c[600], space$c[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']);
|
|
1782
1836
|
var Container$1 = function Container(_a) {
|
|
1783
1837
|
var children = _a.children,
|
|
1784
1838
|
props = __rest(_a, ["children"]);
|
|
@@ -1786,12 +1840,12 @@ var Container$1 = function Container(_a) {
|
|
|
1786
1840
|
children: children
|
|
1787
1841
|
}));
|
|
1788
1842
|
};
|
|
1789
|
-
var templateObject_1$
|
|
1843
|
+
var templateObject_1$F;
|
|
1790
1844
|
|
|
1791
1845
|
var PictureWrapper = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
1792
1846
|
displayName: "Picture__PictureWrapper",
|
|
1793
1847
|
componentId: "sc-11d9tei-0"
|
|
1794
|
-
})(templateObject_1$
|
|
1848
|
+
})(templateObject_1$E || (templateObject_1$E = __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"
|
|
1795
1849
|
// A clickable image answers input on the image itself (decision 0029, #185): it fades on hover and
|
|
1796
1850
|
// one step further while pressed, and draws the system focus ring around the image, following its
|
|
1797
1851
|
// rounded corners. Fading isn't movement, so it stays under reduced motion.
|
|
@@ -1841,7 +1895,7 @@ var Picture = function Picture(_a) {
|
|
|
1841
1895
|
}) : image
|
|
1842
1896
|
});
|
|
1843
1897
|
};
|
|
1844
|
-
var templateObject_1$
|
|
1898
|
+
var templateObject_1$E, templateObject_2$s, templateObject_3$q, templateObject_4$l, templateObject_5$h;
|
|
1845
1899
|
|
|
1846
1900
|
var _a$8 = tokens.semantic,
|
|
1847
1901
|
typography$2 = _a$8.typography,
|
|
@@ -1849,7 +1903,7 @@ var _a$8 = tokens.semantic,
|
|
|
1849
1903
|
var TimeStyled = /*#__PURE__*/styled__default.default.time.withConfig({
|
|
1850
1904
|
displayName: "DateFormatter__TimeStyled",
|
|
1851
1905
|
componentId: "sc-5464cc-0"
|
|
1852
|
-
})(templateObject_1$
|
|
1906
|
+
})(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"
|
|
1853
1907
|
/**
|
|
1854
1908
|
* Formats a date with smart relative/absolute logic
|
|
1855
1909
|
*/])), typography$2.label, color$7.text.muted);
|
|
@@ -1895,7 +1949,7 @@ var DateFormatter = function DateFormatter(_a) {
|
|
|
1895
1949
|
children: displayText
|
|
1896
1950
|
});
|
|
1897
1951
|
};
|
|
1898
|
-
var templateObject_1$
|
|
1952
|
+
var templateObject_1$D;
|
|
1899
1953
|
|
|
1900
1954
|
var _a$7 = tokens.semantic,
|
|
1901
1955
|
motion$5 = _a$7.motion,
|
|
@@ -1956,7 +2010,7 @@ var IconButtonStyled = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
1956
2010
|
},
|
|
1957
2011
|
displayName: "IconButton__IconButtonStyled",
|
|
1958
2012
|
componentId: "sc-k8b14t-0"
|
|
1959
|
-
})(templateObject_1$
|
|
2013
|
+
})(templateObject_1$C || (templateObject_1$C = __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 &:focus {\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 &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: not-allowed;\n }\n\n ", "\n"])), function (_a) {
|
|
1960
2014
|
var $variant = _a.$variant;
|
|
1961
2015
|
return colours($variant).bg;
|
|
1962
2016
|
}, function (_a) {
|
|
@@ -2034,7 +2088,7 @@ var IconButton = function IconButton(_a) {
|
|
|
2034
2088
|
})
|
|
2035
2089
|
}));
|
|
2036
2090
|
};
|
|
2037
|
-
var templateObject_1$
|
|
2091
|
+
var templateObject_1$C;
|
|
2038
2092
|
|
|
2039
2093
|
var StyledWrapper = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
2040
2094
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2042,7 +2096,7 @@ var StyledWrapper = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
2042
2096
|
},
|
|
2043
2097
|
displayName: "MoneyDisplay__StyledWrapper",
|
|
2044
2098
|
componentId: "sc-1mddej3-0"
|
|
2045
|
-
})(templateObject_1$
|
|
2099
|
+
})(templateObject_1$B || (templateObject_1$B = __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"
|
|
2046
2100
|
// Map size to Typography variant
|
|
2047
2101
|
])), function (_a) {
|
|
2048
2102
|
var $align = _a.$align;
|
|
@@ -2058,35 +2112,8 @@ var sizeToTypographyVariant = {
|
|
|
2058
2112
|
large: 'h3',
|
|
2059
2113
|
xlarge: 'h2'
|
|
2060
2114
|
};
|
|
2061
|
-
//
|
|
2062
|
-
var
|
|
2063
|
-
small: 'xs',
|
|
2064
|
-
medium: 'sm',
|
|
2065
|
-
large: 'md',
|
|
2066
|
-
xlarge: 'lg'
|
|
2067
|
-
};
|
|
2068
|
-
/**
|
|
2069
|
-
* Generates aria-label with spelled out amount
|
|
2070
|
-
*/
|
|
2071
|
-
var generateAriaLabel = function generateAriaLabel(amount, currency, locale) {
|
|
2072
|
-
var _a, _b;
|
|
2073
|
-
var formatter = new Intl.NumberFormat(locale, {
|
|
2074
|
-
style: 'currency',
|
|
2075
|
-
currency: currency,
|
|
2076
|
-
minimumFractionDigits: 2,
|
|
2077
|
-
maximumFractionDigits: 2
|
|
2078
|
-
});
|
|
2079
|
-
// Get parts to spell out the amount
|
|
2080
|
-
var parts = formatter.formatToParts(Math.abs(amount));
|
|
2081
|
-
var integerPart = ((_a = parts.find(function (p) {
|
|
2082
|
-
return p.type === 'integer';
|
|
2083
|
-
})) === null || _a === void 0 ? void 0 : _a.value) || '0';
|
|
2084
|
-
var fractionPart = ((_b = parts.find(function (p) {
|
|
2085
|
-
return p.type === 'fraction';
|
|
2086
|
-
})) === null || _b === void 0 ? void 0 : _b.value) || '00';
|
|
2087
|
-
var sign = amount < 0 ? 'negative ' : '';
|
|
2088
|
-
return "".concat(sign).concat(integerPart, " dollars and ").concat(fractionPart, " cents");
|
|
2089
|
-
};
|
|
2115
|
+
// The minus sign, not a hyphen, so it reads and copies as minus (decision 0045)
|
|
2116
|
+
var MINUS = "\u2212";
|
|
2090
2117
|
var MoneyDisplay = function MoneyDisplay(_a) {
|
|
2091
2118
|
var amount = _a.amount,
|
|
2092
2119
|
_b = _a.currency,
|
|
@@ -2112,44 +2139,26 @@ var MoneyDisplay = function MoneyDisplay(_a) {
|
|
|
2112
2139
|
maximumFractionDigits: 2
|
|
2113
2140
|
});
|
|
2114
2141
|
var formattedAmount = formatter.format(Math.abs(amount));
|
|
2115
|
-
//
|
|
2116
|
-
|
|
2117
|
-
var
|
|
2118
|
-
|
|
2119
|
-
var
|
|
2120
|
-
// Get typography variant and icon size
|
|
2142
|
+
// A signed amount carries its sign as text, so the sign survives copying and is read aloud, and the
|
|
2143
|
+
// role colour repeats it (decision 0045). Negative amounts always show their sign.
|
|
2144
|
+
var isNegative = amount < 0 || variant === 'negative';
|
|
2145
|
+
var isPositive = !isNegative && (showSign && amount > 0 || variant === 'positive');
|
|
2146
|
+
var sign = isNegative ? MINUS : isPositive ? '+' : '';
|
|
2121
2147
|
var typographyVariant = sizeToTypographyVariant[size];
|
|
2122
|
-
var
|
|
2123
|
-
|
|
2124
|
-
var iconColor = variant === 'positive' || showPositiveIcon ? 'success' : variant === 'negative' || showNegativeIcon ? 'error' : variant === 'neutral' ? 'subdued' : 'default';
|
|
2125
|
-
// Amount always uses default color (except neutral which stays subdued)
|
|
2126
|
-
var amountColor = variant === 'neutral' ? 'subdued' : 'default';
|
|
2127
|
-
return jsxRuntime.jsxs(StyledWrapper, {
|
|
2148
|
+
var amountColor = isNegative ? 'error' : isPositive ? 'success' : variant === 'neutral' ? 'subdued' : 'default';
|
|
2149
|
+
return jsxRuntime.jsx(StyledWrapper, {
|
|
2128
2150
|
"$align": align,
|
|
2129
2151
|
"$weight": weight,
|
|
2130
|
-
"aria-label": ariaLabel,
|
|
2131
2152
|
"data-testid": dataTestId,
|
|
2132
|
-
children:
|
|
2133
|
-
// The amount is shown without a sign, so the icon is the sign and needs a name (#85)
|
|
2134
|
-
jsxRuntime.jsx(Icon, {
|
|
2135
|
-
name: "addRing",
|
|
2136
|
-
size: iconSize,
|
|
2137
|
-
iconColor: iconColor,
|
|
2138
|
-
"aria-label": "Plus"
|
|
2139
|
-
}), showNegativeIcon && jsxRuntime.jsx(Icon, {
|
|
2140
|
-
name: "remove",
|
|
2141
|
-
size: iconSize,
|
|
2142
|
-
iconColor: iconColor,
|
|
2143
|
-
"aria-label": "Minus"
|
|
2144
|
-
}), jsxRuntime.jsx(Typography, {
|
|
2153
|
+
children: jsxRuntime.jsxs(Typography, {
|
|
2145
2154
|
variant: typographyVariant,
|
|
2146
2155
|
color: amountColor,
|
|
2147
2156
|
as: "span",
|
|
2148
|
-
children: formattedAmount
|
|
2149
|
-
})
|
|
2157
|
+
children: [sign, formattedAmount]
|
|
2158
|
+
})
|
|
2150
2159
|
});
|
|
2151
2160
|
};
|
|
2152
|
-
var templateObject_1$
|
|
2161
|
+
var templateObject_1$B;
|
|
2153
2162
|
|
|
2154
2163
|
// Destructure tokens
|
|
2155
2164
|
var semantic$f = tokens.semantic;
|
|
@@ -2167,7 +2176,7 @@ var ProgressBarContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2167
2176
|
displayName: "ProgressBar__ProgressBarContainer",
|
|
2168
2177
|
componentId: "sc-1nco33q-0"
|
|
2169
2178
|
})(templateObject_3$p || (templateObject_3$p = __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$2.xs, forcedColorsEdge, function (props) {
|
|
2170
|
-
return props.$variant === 'horizontal' && styled.css(templateObject_1$
|
|
2179
|
+
return props.$variant === 'horizontal' && styled.css(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n width: 100%;\n height: ", ";\n "], ["\n width: 100%;\n height: ", ";\n "])), props.$height ? component$2.progressBar.sizes[props.$height].height : component$2.progressBar.sizes.md.height);
|
|
2171
2180
|
}, function (props) {
|
|
2172
2181
|
return props.$variant === 'vertical' && styled.css(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n "], ["\n width: ", ";\n height: 100%;\n "])), props.$width ? component$2.progressBar.sizes[props.$width].height : component$2.progressBar.sizes.md.height);
|
|
2173
2182
|
});
|
|
@@ -2230,7 +2239,7 @@ var ProgressBar = function ProgressBar(_a) {
|
|
|
2230
2239
|
})
|
|
2231
2240
|
});
|
|
2232
2241
|
};
|
|
2233
|
-
var templateObject_1$
|
|
2242
|
+
var templateObject_1$A, templateObject_2$r, templateObject_3$p, templateObject_4$k, templateObject_5$g, templateObject_6$c, templateObject_7$a;
|
|
2234
2243
|
|
|
2235
2244
|
// Destructure tokens for cleaner access
|
|
2236
2245
|
var separatorTokens = tokens.component.separator;
|
|
@@ -2242,7 +2251,7 @@ var StyledDivider = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2242
2251
|
},
|
|
2243
2252
|
displayName: "Divider__StyledDivider",
|
|
2244
2253
|
componentId: "sc-1l0c8ja-0"
|
|
2245
|
-
})(templateObject_1$
|
|
2254
|
+
})(templateObject_1$z || (templateObject_1$z = __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"
|
|
2246
2255
|
/**
|
|
2247
2256
|
* Divider is an atomic component that provides visual separation between content sections.
|
|
2248
2257
|
*
|
|
@@ -2355,7 +2364,7 @@ var Divider = function Divider(_a) {
|
|
|
2355
2364
|
"aria-orientation": orientation
|
|
2356
2365
|
});
|
|
2357
2366
|
};
|
|
2358
|
-
var templateObject_1$
|
|
2367
|
+
var templateObject_1$z;
|
|
2359
2368
|
|
|
2360
2369
|
var StyledStack = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
2361
2370
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -2363,7 +2372,7 @@ var StyledStack = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2363
2372
|
},
|
|
2364
2373
|
displayName: "Stack__StyledStack",
|
|
2365
2374
|
componentId: "sc-1ehkxgy-0"
|
|
2366
|
-
})(templateObject_1$
|
|
2375
|
+
})(templateObject_1$y || (templateObject_1$y = __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"
|
|
2367
2376
|
// Each gap name maps to the space step that replaced its old spacing.layout token (decision 0031),
|
|
2368
2377
|
// so every gap keeps its value
|
|
2369
2378
|
])));
|
|
@@ -2417,6 +2426,40 @@ var Stack = function Stack(_a) {
|
|
|
2417
2426
|
children: children
|
|
2418
2427
|
});
|
|
2419
2428
|
};
|
|
2429
|
+
var templateObject_1$y;
|
|
2430
|
+
|
|
2431
|
+
// Shape indicators for the six coloured statuses (decision 0045): filled silhouettes on the
|
|
2432
|
+
// 24px grid, each the same outline as its status icon. Internal: they aren't public icons, so a
|
|
2433
|
+
// bare shape can't be shown without its label. The shape indicator (#264) and the small
|
|
2434
|
+
// StatusLabel and InlineAlert sizes render them at 12px or more, with a darker edge.
|
|
2435
|
+
var statusShapes = {
|
|
2436
|
+
error: 'M22.5 12L17.25 21.0933L6.75 21.0933L1.5 12L6.75 2.9067L17.25 2.9067Z',
|
|
2437
|
+
serious: 'M12 2L22 12L12 22L2 12Z',
|
|
2438
|
+
warning: 'M12 2.5L22 20.5L2 20.5Z',
|
|
2439
|
+
success: 'M12 2A10 10 0 1 1 12 22A10 10 0 1 1 12 2Z',
|
|
2440
|
+
info: 'M7 2H17A5 5 0 0 1 22 7V17A5 5 0 0 1 17 22H7A5 5 0 0 1 2 17V7A5 5 0 0 1 7 2Z',
|
|
2441
|
+
inProgress: 'M12 2A10 10 0 1 1 12 22A10 10 0 1 1 12 2ZM12 4A8 8 0 1 0 12 20A8 8 0 1 0 12 4ZM12 6A6 6 0 0 1 12 18Z'
|
|
2442
|
+
};
|
|
2443
|
+
|
|
2444
|
+
// The shape indicator: at least 12px (decision 0045), filled with the current text colour, which is
|
|
2445
|
+
// the label's role colour at 5.3:1 or more on its tint, so it needs no edge. Decorative: the text
|
|
2446
|
+
// beside it names the status. Internal to the status family (#264): not exported from the package.
|
|
2447
|
+
var Mark = /*#__PURE__*/styled__default.default.svg.withConfig({
|
|
2448
|
+
displayName: "StatusShape__Mark",
|
|
2449
|
+
componentId: "sc-1yzi9jt-0"
|
|
2450
|
+
})(templateObject_1$x || (templateObject_1$x = __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);
|
|
2451
|
+
var StatusShape = function StatusShape(_a) {
|
|
2452
|
+
var shape = _a.shape;
|
|
2453
|
+
return jsxRuntime.jsx(Mark, {
|
|
2454
|
+
viewBox: "0 0 24 24",
|
|
2455
|
+
"aria-hidden": "true",
|
|
2456
|
+
focusable: "false",
|
|
2457
|
+
"data-shape": shape,
|
|
2458
|
+
children: jsxRuntime.jsx("path", {
|
|
2459
|
+
d: statusShapes[shape]
|
|
2460
|
+
})
|
|
2461
|
+
});
|
|
2462
|
+
};
|
|
2420
2463
|
var templateObject_1$x;
|
|
2421
2464
|
|
|
2422
2465
|
// Destructure tokens for cleaner access
|
|
@@ -2432,43 +2475,46 @@ var labelHeight = tokens.semantic.size.label;
|
|
|
2432
2475
|
var label$1 = tokens.component.badge.label;
|
|
2433
2476
|
var scaleIn$1 = styled.keyframes(templateObject_1$w || (templateObject_1$w = __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"])));
|
|
2434
2477
|
var getStatusConfig = function getStatusConfig(status) {
|
|
2478
|
+
// Each status's icon and, for the coloured statuses, its shape indicator (decision 0045). The
|
|
2479
|
+
// neutral statuses have no shape: at the small size they're plain text.
|
|
2435
2480
|
var configs = {
|
|
2436
2481
|
pending: {
|
|
2437
2482
|
color: statusColors.pending.text,
|
|
2438
2483
|
bgColor: statusColors.pending.background,
|
|
2439
|
-
icon: '
|
|
2440
|
-
// Fallback until 'clock' icon is added
|
|
2484
|
+
icon: 'statusPending',
|
|
2441
2485
|
label: 'Pending'
|
|
2442
2486
|
},
|
|
2443
2487
|
completed: {
|
|
2444
2488
|
color: statusColors.completed.text,
|
|
2445
2489
|
bgColor: statusColors.completed.background,
|
|
2446
|
-
icon: '
|
|
2490
|
+
icon: 'statusSuccess',
|
|
2491
|
+
shape: 'success',
|
|
2447
2492
|
label: 'Completed'
|
|
2448
2493
|
},
|
|
2449
2494
|
failed: {
|
|
2450
2495
|
color: statusColors.failed.text,
|
|
2451
2496
|
bgColor: statusColors.failed.background,
|
|
2452
|
-
icon: '
|
|
2497
|
+
icon: 'statusError',
|
|
2498
|
+
shape: 'error',
|
|
2453
2499
|
label: 'Failed'
|
|
2454
2500
|
},
|
|
2455
2501
|
cancelled: {
|
|
2456
2502
|
color: statusColors.cancelled.text,
|
|
2457
2503
|
bgColor: statusColors.cancelled.background,
|
|
2458
|
-
icon: '
|
|
2504
|
+
icon: 'statusCancelled',
|
|
2459
2505
|
label: 'Cancelled'
|
|
2460
2506
|
},
|
|
2461
2507
|
processing: {
|
|
2462
2508
|
color: statusColors.processing.text,
|
|
2463
2509
|
bgColor: statusColors.processing.background,
|
|
2464
|
-
icon: '
|
|
2510
|
+
icon: 'statusInProgress',
|
|
2511
|
+
shape: 'inProgress',
|
|
2465
2512
|
label: 'Processing'
|
|
2466
2513
|
},
|
|
2467
2514
|
scheduled: {
|
|
2468
2515
|
color: statusColors.scheduled.text,
|
|
2469
2516
|
bgColor: statusColors.scheduled.background,
|
|
2470
|
-
icon: '
|
|
2471
|
-
// Fallback until 'calendar' icon is added
|
|
2517
|
+
icon: 'statusScheduled',
|
|
2472
2518
|
label: 'Scheduled'
|
|
2473
2519
|
}
|
|
2474
2520
|
};
|
|
@@ -2521,13 +2567,13 @@ var VisibleContent = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
2521
2567
|
})(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"
|
|
2522
2568
|
/**
|
|
2523
2569
|
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2524
|
-
* from the package. `showIcon` exists only for StatusBadge
|
|
2525
|
-
* (
|
|
2570
|
+
* from the package. `showIcon` exists only for StatusBadge. StatusLabel always shows the status icon
|
|
2571
|
+
* at the medium size, and at the small size the shape for coloured statuses (decisions 0018, 0045).
|
|
2526
2572
|
*/])));
|
|
2527
2573
|
/**
|
|
2528
2574
|
* Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
|
|
2529
|
-
* from the package. `showIcon` exists only for StatusBadge
|
|
2530
|
-
* (
|
|
2575
|
+
* from the package. `showIcon` exists only for StatusBadge. StatusLabel always shows the status icon
|
|
2576
|
+
* at the medium size, and at the small size the shape for coloured statuses (decisions 0018, 0045).
|
|
2531
2577
|
*/
|
|
2532
2578
|
var StatusLabelBase = function StatusLabelBase(_a) {
|
|
2533
2579
|
var status = _a.status,
|
|
@@ -2555,10 +2601,12 @@ var StatusLabelBase = function StatusLabelBase(_a) {
|
|
|
2555
2601
|
"data-testid": dataTestId,
|
|
2556
2602
|
children: [jsxRuntime.jsxs(VisibleContent, {
|
|
2557
2603
|
"aria-hidden": accessibleLabel ? 'true' : undefined,
|
|
2558
|
-
children: [showIcon && jsxRuntime.jsx(Icon, {
|
|
2604
|
+
children: [showIcon && size === 'medium' && jsxRuntime.jsx(Icon, {
|
|
2559
2605
|
name: statusConfig.icon,
|
|
2560
2606
|
size: sizeStyles.iconSize,
|
|
2561
2607
|
iconColor: "inherit"
|
|
2608
|
+
}), showIcon && size === 'small' && statusConfig.shape && jsxRuntime.jsx(StatusShape, {
|
|
2609
|
+
shape: statusConfig.shape
|
|
2562
2610
|
}), displayLabel, jsxRuntime.jsxs(ScreenReaderOnly, {
|
|
2563
2611
|
children: [status, " status"]
|
|
2564
2612
|
})]
|
|
@@ -2573,7 +2621,7 @@ var templateObject_1$w, templateObject_2$q, templateObject_3$o, templateObject_4
|
|
|
2573
2621
|
* StatusBadge displays a transaction or task status.
|
|
2574
2622
|
*
|
|
2575
2623
|
* @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
|
|
2576
|
-
* shows
|
|
2624
|
+
* shows its status icon or shape. StatusBadge is removed in 3.0 (decision 0018).
|
|
2577
2625
|
*/
|
|
2578
2626
|
var StatusBadge = function StatusBadge(props) {
|
|
2579
2627
|
return jsxRuntime.jsx(StatusLabelBase, __assign({}, props));
|
|
@@ -2583,8 +2631,11 @@ StatusBadge.displayName = 'StatusBadge';
|
|
|
2583
2631
|
/**
|
|
2584
2632
|
* StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
|
|
2585
2633
|
*
|
|
2586
|
-
* Uses only the status colour tokens and always shows
|
|
2587
|
-
*
|
|
2634
|
+
* Uses only the status colour tokens and always shows its text, so status is never conveyed by
|
|
2635
|
+
* colour alone (decision 0045). Medium shows the status icon. Small shows the status shape for
|
|
2636
|
+
* completed, failed and processing, and text only for the neutral pending, scheduled and
|
|
2637
|
+
* cancelled, so keep the label visible. Not interactive. Announces changes politely to screen
|
|
2638
|
+
* readers.
|
|
2588
2639
|
*
|
|
2589
2640
|
* @example
|
|
2590
2641
|
* ```tsx
|
|
@@ -2801,7 +2852,10 @@ var StyledBalanceSection = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2801
2852
|
var StyledTrendSection = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
2802
2853
|
displayName: "AccountCard__StyledTrendSection",
|
|
2803
2854
|
componentId: "sc-1erp7zn-1"
|
|
2804
|
-
})(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n"])), space$7[100])
|
|
2855
|
+
})(templateObject_2$o || (templateObject_2$o = __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$7[100], function (_a) {
|
|
2856
|
+
var $color = _a.$color;
|
|
2857
|
+
return $color;
|
|
2858
|
+
}, semantic$c.typography.small);
|
|
2805
2859
|
/*#__PURE__*/styled__default.default.div.withConfig({
|
|
2806
2860
|
displayName: "AccountCard__StyledActions",
|
|
2807
2861
|
componentId: "sc-1erp7zn-2"
|
|
@@ -2822,10 +2876,12 @@ var trendToIcon = {
|
|
|
2822
2876
|
down: 'arrowDown',
|
|
2823
2877
|
neutral: 'arrowRight'
|
|
2824
2878
|
};
|
|
2879
|
+
// A trend is a differential indicator (decision 0045): the arrow and the signed value carry the
|
|
2880
|
+
// direction, and the role colour repeats it. Category colours carry no meaning, so they aren't used.
|
|
2825
2881
|
var trendToColor = {
|
|
2826
|
-
up:
|
|
2827
|
-
down:
|
|
2828
|
-
neutral:
|
|
2882
|
+
up: semantic$c.color.text.success,
|
|
2883
|
+
down: semantic$c.color.text.danger,
|
|
2884
|
+
neutral: semantic$c.color.text.muted
|
|
2829
2885
|
};
|
|
2830
2886
|
/**
|
|
2831
2887
|
* AccountCard component
|
|
@@ -2866,7 +2922,7 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2866
2922
|
return jsxRuntime.jsx(Box, {
|
|
2867
2923
|
minWidth: tokens.component.accountCard.minWidth,
|
|
2868
2924
|
p: "lg",
|
|
2869
|
-
bg: "
|
|
2925
|
+
bg: "surface.raised",
|
|
2870
2926
|
border: "default",
|
|
2871
2927
|
borderRadius: "xl",
|
|
2872
2928
|
transition: "box-shadow ".concat(semantic$c.motion.duration.moderate, " ").concat(semantic$c.motion.easing.decelerate),
|
|
@@ -2920,16 +2976,19 @@ var AccountCard = function AccountCard(_a) {
|
|
|
2920
2976
|
}), jsxRuntime.jsx(Typography, {
|
|
2921
2977
|
color: "subdued",
|
|
2922
2978
|
children: "Available"
|
|
2923
|
-
}), trend && trendValue &&
|
|
2979
|
+
}), trend && trendValue &&
|
|
2980
|
+
// A group rather than an image, so screen readers read the value as well as the direction
|
|
2981
|
+
jsxRuntime.jsxs(StyledTrendSection, {
|
|
2982
|
+
role: "group",
|
|
2924
2983
|
"aria-label": "Trend ".concat(trend),
|
|
2925
|
-
|
|
2926
|
-
children: jsxRuntime.jsx(
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2984
|
+
"$color": trendColor,
|
|
2985
|
+
children: [jsxRuntime.jsx(Icon, {
|
|
2986
|
+
name: trendIcon,
|
|
2987
|
+
size: "sm",
|
|
2988
|
+
iconColor: "inherit"
|
|
2989
|
+
}), jsxRuntime.jsx("span", {
|
|
2931
2990
|
children: trendValue
|
|
2932
|
-
})
|
|
2991
|
+
})]
|
|
2933
2992
|
})]
|
|
2934
2993
|
})
|
|
2935
2994
|
})]
|
|
@@ -4697,11 +4756,12 @@ var fadeOut = styled.keyframes(templateObject_2$k || (templateObject_2$k = __mak
|
|
|
4697
4756
|
// The generated names of the two exits (full, and reduced motion)
|
|
4698
4757
|
var EXIT_ANIMATION_NAMES = [fadeThenCollapse.getName(), fadeOut.getName()];
|
|
4699
4758
|
// Default icons by variant
|
|
4759
|
+
// Each severity's status icon (decision 0045): decorative, because the title and message say it
|
|
4700
4760
|
var variantIcons$1 = {
|
|
4701
|
-
error: '
|
|
4702
|
-
warning: '
|
|
4703
|
-
info: '
|
|
4704
|
-
success: '
|
|
4761
|
+
error: 'statusError',
|
|
4762
|
+
warning: 'statusWarning',
|
|
4763
|
+
info: 'statusInfo',
|
|
4764
|
+
success: 'statusSuccess'
|
|
4705
4765
|
};
|
|
4706
4766
|
// Icon colors by variant (using semantic icon color tokens)
|
|
4707
4767
|
var variantIconColors = {
|
|
@@ -4946,11 +5006,12 @@ var semantic$8 = tokens.semantic;
|
|
|
4946
5006
|
var color$2 = semantic$8.color,
|
|
4947
5007
|
typography = semantic$8.typography,
|
|
4948
5008
|
size = semantic$8.size;
|
|
5009
|
+
// Each severity's status icon and, at the small size, its shape (decision 0045)
|
|
4949
5010
|
var variantIcons = {
|
|
4950
|
-
error: '
|
|
4951
|
-
warning: '
|
|
4952
|
-
info: '
|
|
4953
|
-
success: '
|
|
5011
|
+
error: 'statusError',
|
|
5012
|
+
warning: 'statusWarning',
|
|
5013
|
+
info: 'statusInfo',
|
|
5014
|
+
success: 'statusSuccess'
|
|
4954
5015
|
};
|
|
4955
5016
|
var variantTextColors = {
|
|
4956
5017
|
error: color$2.text.danger,
|
|
@@ -4958,6 +5019,12 @@ var variantTextColors = {
|
|
|
4958
5019
|
info: color$2.text.accent,
|
|
4959
5020
|
success: color$2.text.success
|
|
4960
5021
|
};
|
|
5022
|
+
var variantShapes = {
|
|
5023
|
+
error: 'error',
|
|
5024
|
+
warning: 'warning',
|
|
5025
|
+
info: 'info',
|
|
5026
|
+
success: 'success'
|
|
5027
|
+
};
|
|
4961
5028
|
var sizeConfig = {
|
|
4962
5029
|
small: {
|
|
4963
5030
|
font: typography.caption,
|
|
@@ -5058,7 +5125,9 @@ var InlineAlert = function InlineAlert(_a) {
|
|
|
5058
5125
|
children: hasMessage && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5059
5126
|
children: [jsxRuntime.jsx(StyledIconLine, {
|
|
5060
5127
|
"aria-hidden": "true",
|
|
5061
|
-
children: jsxRuntime.jsx(
|
|
5128
|
+
children: alertSize === 'small' ? jsxRuntime.jsx(StatusShape, {
|
|
5129
|
+
shape: variantShapes[variant]
|
|
5130
|
+
}) : jsxRuntime.jsx(Icon, {
|
|
5062
5131
|
name: variantIcons[variant],
|
|
5063
5132
|
size: sizeConfig[alertSize].icon,
|
|
5064
5133
|
iconColor: "inherit"
|
|
@@ -5504,7 +5573,7 @@ var _a$1 = tokens.semantic,
|
|
|
5504
5573
|
var StyledCodeBlock = /*#__PURE__*/styled__default.default.pre.withConfig({
|
|
5505
5574
|
displayName: "CodeBlock__StyledCodeBlock",
|
|
5506
5575
|
componentId: "sc-1p1t0kp-0"
|
|
5507
|
-
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n overflow-y: ", ";\n margin: ", " 0;\n position: relative;\n transition: max-height ", " ", ";\n\n ", " {\n transition: none;\n }\n \n ", "\n\n /* 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$1
|
|
5576
|
+
})(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n padding: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n overflow-x: auto;\n overflow-y: ", ";\n margin: ", " 0;\n position: relative;\n transition: max-height ", " ", ";\n\n ", " {\n transition: none;\n }\n \n ", "\n\n /* 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$1["default"], tokens.semantic.radius.sm, tokens.semantic.space[300], tokens.component.codeBlock.fontFamily, tokens.component.codeBlock.fontSize, tokens.component.codeBlock.lineHeight, color$1.text["default"], function (_a) {
|
|
5508
5577
|
var $isExpanded = _a.$isExpanded,
|
|
5509
5578
|
$needsExpansion = _a.$needsExpansion;
|
|
5510
5579
|
return $needsExpansion && !$isExpanded ? 'hidden' : 'auto';
|
|
@@ -6065,7 +6134,7 @@ var DropdownMenu = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
6065
6134
|
},
|
|
6066
6135
|
displayName: "Dropdown__DropdownMenu",
|
|
6067
6136
|
componentId: "sc-kz07c4-3"
|
|
6068
|
-
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: 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, input$1["default"].backgroundColor, border
|
|
6137
|
+
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: ", ";\n background-color: ", ";\n /* A decorative outline: elevation separates the menu, and only the trigger is a control edge (decision 0025) */\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n margin-top: ", ";\n overflow: hidden;\n opacity: ", ";\n visibility: ", ";\n transform: ", ";\n transition: 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, input$1["default"].backgroundColor, border["default"], input$1["default"].borderRadius, elevation$1.floating, space$4[100], function (_a) {
|
|
6069
6138
|
var $isOpen = _a.$isOpen;
|
|
6070
6139
|
return $isOpen ? 1 : 0;
|
|
6071
6140
|
}, function (_a) {
|
|
@@ -6088,7 +6157,7 @@ var DropdownOption = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
6088
6157
|
selected: $isSelected,
|
|
6089
6158
|
focused: $isFocused
|
|
6090
6159
|
});
|
|
6091
|
-
}, border
|
|
6160
|
+
}, border["default"]);
|
|
6092
6161
|
var StyledHelperText$3 = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
6093
6162
|
displayName: "Dropdown__StyledHelperText",
|
|
6094
6163
|
componentId: "sc-kz07c4-5"
|
|
@@ -8069,7 +8138,7 @@ var semantic = tokens.semantic;
|
|
|
8069
8138
|
var StyledTabList = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
8070
8139
|
displayName: "TabBar__StyledTabList",
|
|
8071
8140
|
componentId: "sc-1g9ib0y-0"
|
|
8072
|
-
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n border-bottom: ", " solid ", ";\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n \n &::-webkit-scrollbar {\n height: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n border-bottom: ", " solid ", ";\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n \n &::-webkit-scrollbar {\n height: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n"])), semantic.border.width.thin, semantic.color.border
|
|
8141
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n border-bottom: ", " solid ", ";\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n \n &::-webkit-scrollbar {\n height: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n border-bottom: ", " solid ", ";\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n \n &::-webkit-scrollbar {\n height: ", ";\n }\n \n &::-webkit-scrollbar-track {\n background: ", ";\n }\n \n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: ", ";\n }\n"])), semantic.border.width.thin, semantic.color.border["default"], tokens.component.tabBar.scrollbar.height, semantic.surface.raised, semantic.color.border["default"], semantic.radius.sm);
|
|
8073
8142
|
var StyledTab = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
8074
8143
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
8075
8144
|
return !prop.startsWith('$');
|
|
@@ -8089,11 +8158,11 @@ var StyledTab = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
|
8089
8158
|
}, function (props) {
|
|
8090
8159
|
return props.$isActive ? semantic.color.fill['accent-muted-hover'] : 'transparent';
|
|
8091
8160
|
}, function (props) {
|
|
8092
|
-
return props.$isActive ? semantic.color.text
|
|
8161
|
+
return props.$isActive ? semantic.color.text.accent : semantic.color.text["default"];
|
|
8093
8162
|
}, function (props) {
|
|
8094
8163
|
return props.$isActive ? semantic.color.fill['accent-muted-pressed'] : 'transparent';
|
|
8095
8164
|
}, function (props) {
|
|
8096
|
-
return props.$isActive ? semantic.color.text
|
|
8165
|
+
return props.$isActive ? semantic.color.text.accent : semantic.color.text["default"];
|
|
8097
8166
|
}, function (props) {
|
|
8098
8167
|
return props.$disabled ? '0.5' : '1';
|
|
8099
8168
|
}, semantic.border.focus, semantic.border.focusOffset);
|
|
@@ -8414,28 +8483,30 @@ var StyledTruncatedText = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
8414
8483
|
])));
|
|
8415
8484
|
// Map categories to CategoryLabel configurations
|
|
8416
8485
|
var categoryConfig = {
|
|
8486
|
+
// Display colours carry no meaning (decision 0043); five coloured categories share four colours,
|
|
8487
|
+
// so the icon and label tell dining and bills apart
|
|
8417
8488
|
shopping: {
|
|
8418
|
-
color: '
|
|
8489
|
+
color: 'magenta',
|
|
8419
8490
|
icon: 'paper',
|
|
8420
8491
|
label: 'Shopping'
|
|
8421
8492
|
},
|
|
8422
8493
|
dining: {
|
|
8423
|
-
color: '
|
|
8494
|
+
color: 'rose',
|
|
8424
8495
|
icon: 'paper',
|
|
8425
8496
|
label: 'Dining'
|
|
8426
8497
|
},
|
|
8427
8498
|
transport: {
|
|
8428
|
-
color: '
|
|
8499
|
+
color: 'periwinkle',
|
|
8429
8500
|
icon: 'paper',
|
|
8430
8501
|
label: 'Transport'
|
|
8431
8502
|
},
|
|
8432
8503
|
entertainment: {
|
|
8433
|
-
color: '
|
|
8504
|
+
color: 'olive',
|
|
8434
8505
|
icon: 'star',
|
|
8435
8506
|
label: 'Entertainment'
|
|
8436
8507
|
},
|
|
8437
8508
|
bills: {
|
|
8438
|
-
color: '
|
|
8509
|
+
color: 'rose',
|
|
8439
8510
|
icon: 'paper',
|
|
8440
8511
|
label: 'Bills'
|
|
8441
8512
|
},
|
|
@@ -8445,12 +8516,6 @@ var categoryConfig = {
|
|
|
8445
8516
|
label: 'Other'
|
|
8446
8517
|
}
|
|
8447
8518
|
};
|
|
8448
|
-
// Map status to badge variant
|
|
8449
|
-
var statusToBadgeVariant = {
|
|
8450
|
-
completed: 'success',
|
|
8451
|
-
pending: 'warning',
|
|
8452
|
-
failed: 'error'
|
|
8453
|
-
};
|
|
8454
8519
|
/**
|
|
8455
8520
|
* TransactionListItem component
|
|
8456
8521
|
*
|
|
@@ -8458,7 +8523,7 @@ var statusToBadgeVariant = {
|
|
|
8458
8523
|
* status, and optional metadata (category, receipt, notes). Minimum height 72px
|
|
8459
8524
|
* with interactive states for clickable items.
|
|
8460
8525
|
*
|
|
8461
|
-
* Composes: Avatar,
|
|
8526
|
+
* Composes: Avatar, CategoryLabel, StatusLabel, MoneyDisplay, Icon, DateFormatter, Typography, Stack
|
|
8462
8527
|
*/
|
|
8463
8528
|
var TransactionListItem = function TransactionListItem(_a) {
|
|
8464
8529
|
var merchant = _a.merchant,
|
|
@@ -8482,8 +8547,6 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
8482
8547
|
var amountVariant = amount > 0 ? 'positive' : amount < 0 ? 'negative' : 'default';
|
|
8483
8548
|
// Get category configuration
|
|
8484
8549
|
var categoryData = category ? categoryConfig[category] : undefined;
|
|
8485
|
-
// Get badge variant from status
|
|
8486
|
-
var badgeVariant = statusToBadgeVariant[status];
|
|
8487
8550
|
var handleClick = function handleClick() {
|
|
8488
8551
|
if (isClickable && onClick) {
|
|
8489
8552
|
onClick();
|
|
@@ -8501,19 +8564,10 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
8501
8564
|
onKeyDown: handleKeyDown,
|
|
8502
8565
|
tabIndex: isClickable ? 0 : undefined,
|
|
8503
8566
|
role: isClickable ? 'button' : undefined,
|
|
8504
|
-
"aria-label": isClickable ? "".concat(merchant, " transaction, ").concat(amount < 0 ? 'expense' : 'income', " of ").concat(Math.abs(amount)) : undefined,
|
|
8567
|
+
"aria-label": isClickable ? "".concat(merchant, " transaction, ").concat(amount < 0 ? 'expense' : 'income', " of ").concat(Math.abs(amount)).concat(status === 'completed' ? '' : ", ".concat(status)) : undefined,
|
|
8505
8568
|
"data-testid": dataTestId,
|
|
8506
8569
|
children: [jsxRuntime.jsx(StyledAvatarSection, {
|
|
8507
|
-
children:
|
|
8508
|
-
variant: badgeVariant,
|
|
8509
|
-
dot: true,
|
|
8510
|
-
"aria-label": "Pending transaction",
|
|
8511
|
-
children: jsxRuntime.jsx(Avatar, {
|
|
8512
|
-
name: merchant,
|
|
8513
|
-
picture: merchantLogo,
|
|
8514
|
-
size: "md"
|
|
8515
|
-
})
|
|
8516
|
-
}) : jsxRuntime.jsx(Avatar, {
|
|
8570
|
+
children: jsxRuntime.jsx(Avatar, {
|
|
8517
8571
|
name: merchant,
|
|
8518
8572
|
picture: merchantLogo,
|
|
8519
8573
|
size: "md"
|
|
@@ -8533,11 +8587,10 @@ var TransactionListItem = function TransactionListItem(_a) {
|
|
|
8533
8587
|
variant: "minimal",
|
|
8534
8588
|
"aria-label": "Category: ".concat(categoryData.label),
|
|
8535
8589
|
children: categoryData.label
|
|
8536
|
-
}), status
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
children: jsxRuntime.jsx("span", {})
|
|
8590
|
+
}), status !== 'completed' && jsxRuntime.jsx(StatusLabel, {
|
|
8591
|
+
status: status,
|
|
8592
|
+
size: "small",
|
|
8593
|
+
liveRegion: false
|
|
8541
8594
|
})]
|
|
8542
8595
|
}), jsxRuntime.jsx(MoneyDisplay, {
|
|
8543
8596
|
amount: amount,
|