@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.
Files changed (79) hide show
  1. package/dist/client.js +261 -208
  2. package/dist/client.js.map +1 -1
  3. package/dist/components/atoms/Badge/Badge.d.mts +16 -4
  4. package/dist/components/atoms/Badge/Badge.d.ts +16 -4
  5. package/dist/components/atoms/Badge/Badge.mjs +4 -5
  6. package/dist/components/atoms/Badge/index.d.mts +1 -1
  7. package/dist/components/atoms/Badge/index.d.ts +1 -1
  8. package/dist/components/atoms/Box/Box.d.mts +25 -1
  9. package/dist/components/atoms/Box/Box.d.ts +25 -1
  10. package/dist/components/atoms/Box/Box.mjs +5 -2
  11. package/dist/components/atoms/Button/Button.mjs +1 -1
  12. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.mts +23 -8
  13. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +23 -8
  14. package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs +31 -18
  15. package/dist/components/atoms/CategoryLabel/index.d.mts +1 -1
  16. package/dist/components/atoms/CategoryLabel/index.d.ts +1 -1
  17. package/dist/components/atoms/Chip/SuggestionChip.mjs +1 -1
  18. package/dist/components/atoms/Chip/shared/utils.mjs +1 -1
  19. package/dist/components/atoms/Chip/shared/utils.mjs.map +1 -1
  20. package/dist/components/atoms/Icon/Icon.mjs +1 -1
  21. package/dist/components/atoms/MoneyDisplay/MoneyDisplay.mjs +14 -60
  22. package/dist/components/atoms/StatusBadge/StatusBadge.d.mts +3 -2
  23. package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +3 -2
  24. package/dist/components/atoms/StatusBadge/StatusBadge.mjs +1 -1
  25. package/dist/components/atoms/StatusBadge/StatusBadge.mjs.map +1 -1
  26. package/dist/components/atoms/StatusLabel/StatusLabel.d.mts +5 -2
  27. package/dist/components/atoms/StatusLabel/StatusLabel.d.ts +5 -2
  28. package/dist/components/atoms/StatusLabel/StatusLabel.mjs +5 -2
  29. package/dist/components/atoms/StatusLabel/StatusLabel.mjs.map +1 -1
  30. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.mts +2 -2
  31. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +2 -2
  32. package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs +19 -13
  33. package/dist/components/atoms/StatusLabel/StatusShape.d.mts +4 -0
  34. package/dist/components/atoms/StatusLabel/StatusShape.d.ts +4 -0
  35. package/dist/components/atoms/StatusLabel/StatusShape.mjs +31 -0
  36. package/dist/components/atoms/StatusLabel/StatusShape.mjs.map +1 -0
  37. package/dist/components/atoms/Typography/Typography.mjs +2 -2
  38. package/dist/components/molecules/AccountCard/AccountCard.mjs +22 -14
  39. package/dist/components/molecules/Alert/Alert.d.mts +4 -4
  40. package/dist/components/molecules/Alert/Alert.d.ts +4 -4
  41. package/dist/components/molecules/Alert/Alert.mjs +5 -4
  42. package/dist/components/molecules/CodeBlock/CodeBlock.mjs +1 -1
  43. package/dist/components/molecules/Dropdown/Dropdown.mjs +2 -2
  44. package/dist/components/molecules/InlineAlert/InlineAlert.mjs +15 -5
  45. package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
  46. package/dist/components/molecules/TransactionListItem/TransactionListItem.d.mts +1 -1
  47. package/dist/components/molecules/TransactionListItem/TransactionListItem.d.ts +1 -1
  48. package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs +15 -31
  49. package/dist/data.js +514 -303
  50. package/dist/data.js.map +1 -1
  51. package/dist/lib/statusShapes.d.mts +2 -0
  52. package/dist/lib/statusShapes.d.ts +2 -0
  53. package/dist/lib/statusShapes.mjs +16 -0
  54. package/dist/lib/statusShapes.mjs.map +1 -0
  55. package/dist/lib/styleUtils.mjs +2 -2
  56. package/dist/lib/styleUtils.mjs.map +1 -1
  57. package/dist/lib/tokenAliases.d.mts +9 -0
  58. package/dist/lib/tokenAliases.d.ts +9 -0
  59. package/dist/lib/tokenAliases.mjs +50 -11
  60. package/dist/lib/tokenAliases.mjs.map +1 -1
  61. package/dist/styles/icons.json +141 -0
  62. package/dist/styles/icons.json.mjs +153 -2
  63. package/dist/styles/icons.json.mjs.map +1 -1
  64. package/dist/styles/tokens.d.mts +721 -123
  65. package/dist/styles/tokens.d.ts +721 -123
  66. package/dist/styles/tokens.json +362 -302
  67. package/dist/styles/tokens.json.mjs +362 -302
  68. package/dist/styles/tokens.json.mjs.map +1 -1
  69. package/dist/tokens/index.js +362 -302
  70. package/dist/tokens/index.js.map +1 -1
  71. package/dist/tokens/index.mjs +362 -302
  72. package/dist/tokens/index.mjs.map +1 -1
  73. package/dist/tokens/styles/tokens.d.mts +721 -123
  74. package/dist/tokens/styles/tokens.d.ts +721 -123
  75. package/dist/tokens.css +363 -317
  76. package/dist/types/icons.d.mts +1 -1
  77. package/dist/types/icons.d.ts +1 -1
  78. package/dist/types/icons.mjs.map +1 -1
  79. package/package.json +1 -1
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
  import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
3
- import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import styled$module from 'styled-components';
5
5
  const styled = styled$module.default || styled$module;
6
6
  import { Typography } from '../Typography/Typography.mjs';
7
- import { Icon } from '../Icon/Icon.mjs';
8
7
  import tokens from '../../../lib/cssTokens.mjs';
9
8
 
10
9
  var StyledWrapper = /*#__PURE__*/styled.span.withConfig({
@@ -13,7 +12,7 @@ var StyledWrapper = /*#__PURE__*/styled.span.withConfig({
13
12
  },
14
13
  displayName: "MoneyDisplay__StyledWrapper",
15
14
  componentId: "sc-1mddej3-0"
16
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n text-align: ", ";\n font-weight: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n text-align: ", ";\n font-weight: ", ";\n"
15
+ })(templateObject_1 || (templateObject_1 = __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"
17
16
  // Map size to Typography variant
18
17
  ])), function (_a) {
19
18
  var $align = _a.$align;
@@ -29,35 +28,8 @@ var sizeToTypographyVariant = {
29
28
  large: 'h3',
30
29
  xlarge: 'h2'
31
30
  };
32
- // Map size to Icon size for consistent visual alignment
33
- var sizeToIconSize = {
34
- small: 'xs',
35
- medium: 'sm',
36
- large: 'md',
37
- xlarge: 'lg'
38
- };
39
- /**
40
- * Generates aria-label with spelled out amount
41
- */
42
- var generateAriaLabel = function generateAriaLabel(amount, currency, locale) {
43
- var _a, _b;
44
- var formatter = new Intl.NumberFormat(locale, {
45
- style: 'currency',
46
- currency: currency,
47
- minimumFractionDigits: 2,
48
- maximumFractionDigits: 2
49
- });
50
- // Get parts to spell out the amount
51
- var parts = formatter.formatToParts(Math.abs(amount));
52
- var integerPart = ((_a = parts.find(function (p) {
53
- return p.type === 'integer';
54
- })) === null || _a === void 0 ? void 0 : _a.value) || '0';
55
- var fractionPart = ((_b = parts.find(function (p) {
56
- return p.type === 'fraction';
57
- })) === null || _b === void 0 ? void 0 : _b.value) || '00';
58
- var sign = amount < 0 ? 'negative ' : '';
59
- return "".concat(sign).concat(integerPart, " dollars and ").concat(fractionPart, " cents");
60
- };
31
+ // The minus sign, not a hyphen, so it reads and copies as minus (decision 0045)
32
+ var MINUS = "\u2212";
61
33
  var MoneyDisplay = function MoneyDisplay(_a) {
62
34
  var amount = _a.amount,
63
35
  _b = _a.currency,
@@ -83,41 +55,23 @@ var MoneyDisplay = function MoneyDisplay(_a) {
83
55
  maximumFractionDigits: 2
84
56
  });
85
57
  var formattedAmount = formatter.format(Math.abs(amount));
86
- // Determine if we need to show a sign icon
87
- var showPositiveIcon = showSign && amount > 0 || variant === 'positive';
88
- var showNegativeIcon = amount < 0 || variant === 'negative';
89
- // Generate accessibility label
90
- var ariaLabel = generateAriaLabel(amount, currency, locale);
91
- // Get typography variant and icon size
58
+ // A signed amount carries its sign as text, so the sign survives copying and is read aloud, and the
59
+ // role colour repeats it (decision 0045). Negative amounts always show their sign.
60
+ var isNegative = amount < 0 || variant === 'negative';
61
+ var isPositive = !isNegative && (showSign && amount > 0 || variant === 'positive');
62
+ var sign = isNegative ? MINUS : isPositive ? '+' : '';
92
63
  var typographyVariant = sizeToTypographyVariant[size];
93
- var iconSize = sizeToIconSize[size];
94
- // Determine icon color based on variant
95
- var iconColor = variant === 'positive' || showPositiveIcon ? 'success' : variant === 'negative' || showNegativeIcon ? 'error' : variant === 'neutral' ? 'subdued' : 'default';
96
- // Amount always uses default color (except neutral which stays subdued)
97
- var amountColor = variant === 'neutral' ? 'subdued' : 'default';
98
- return jsxs(StyledWrapper, {
64
+ var amountColor = isNegative ? 'error' : isPositive ? 'success' : variant === 'neutral' ? 'subdued' : 'default';
65
+ return jsx(StyledWrapper, {
99
66
  "$align": align,
100
67
  "$weight": weight,
101
- "aria-label": ariaLabel,
102
68
  "data-testid": dataTestId,
103
- children: [showPositiveIcon && !showNegativeIcon &&
104
- // The amount is shown without a sign, so the icon is the sign and needs a name (#85)
105
- jsx(Icon, {
106
- name: "addRing",
107
- size: iconSize,
108
- iconColor: iconColor,
109
- "aria-label": "Plus"
110
- }), showNegativeIcon && jsx(Icon, {
111
- name: "remove",
112
- size: iconSize,
113
- iconColor: iconColor,
114
- "aria-label": "Minus"
115
- }), jsx(Typography, {
69
+ children: jsxs(Typography, {
116
70
  variant: typographyVariant,
117
71
  color: amountColor,
118
72
  as: "span",
119
- children: formattedAmount
120
- })]
73
+ children: [sign, formattedAmount]
74
+ })
121
75
  });
122
76
  };
123
77
  var templateObject_1;
@@ -10,7 +10,8 @@ export interface StatusBadgeProps extends StatusLabelProps {
10
10
  /**
11
11
  * Whether to show the icon
12
12
  * @default true
13
- * @deprecated StatusLabel always shows the icon, so status is never conveyed by colour alone.
13
+ * @deprecated StatusLabel always shows its status icon or shape with the text, so status is
14
+ * never conveyed by colour alone (decision 0045).
14
15
  */
15
16
  showIcon?: boolean;
16
17
  }
@@ -18,6 +19,6 @@ export interface StatusBadgeProps extends StatusLabelProps {
18
19
  * StatusBadge displays a transaction or task status.
19
20
  *
20
21
  * @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
21
- * shows the icon. StatusBadge is removed in 3.0 (decision 0018).
22
+ * shows its status icon or shape. StatusBadge is removed in 3.0 (decision 0018).
22
23
  */
23
24
  export declare const StatusBadge: React.FC<StatusBadgeProps>;
@@ -10,7 +10,8 @@ export interface StatusBadgeProps extends StatusLabelProps {
10
10
  /**
11
11
  * Whether to show the icon
12
12
  * @default true
13
- * @deprecated StatusLabel always shows the icon, so status is never conveyed by colour alone.
13
+ * @deprecated StatusLabel always shows its status icon or shape with the text, so status is
14
+ * never conveyed by colour alone (decision 0045).
14
15
  */
15
16
  showIcon?: boolean;
16
17
  }
@@ -18,6 +19,6 @@ export interface StatusBadgeProps extends StatusLabelProps {
18
19
  * StatusBadge displays a transaction or task status.
19
20
  *
20
21
  * @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
21
- * shows the icon. StatusBadge is removed in 3.0 (decision 0018).
22
+ * shows its status icon or shape. StatusBadge is removed in 3.0 (decision 0018).
22
23
  */
23
24
  export declare const StatusBadge: React.FC<StatusBadgeProps>;
@@ -7,7 +7,7 @@ import { StatusLabelBase } from '../StatusLabel/StatusLabelBase.mjs';
7
7
  * StatusBadge displays a transaction or task status.
8
8
  *
9
9
  * @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
10
- * shows the icon. StatusBadge is removed in 3.0 (decision 0018).
10
+ * shows its status icon or shape. StatusBadge is removed in 3.0 (decision 0018).
11
11
  */
12
12
  var StatusBadge = function StatusBadge(props) {
13
13
  return jsx(StatusLabelBase, __assign({}, props));
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.mjs","sources":["../../../../src/components/atoms/StatusBadge/StatusBadge.tsx"],"sourcesContent":["import React from 'react'\nimport { StatusLabelBase, type StatusLabelProps } from '../StatusLabel/StatusLabelBase'\n\nexport type { StatusType, StatusSize } from '../StatusLabel/StatusLabelBase'\n\n/**\n * Props for the StatusBadge component\n * @deprecated Use `StatusLabelProps`. StatusBadge is renamed StatusLabel and is removed in 3.0\n * (decision 0018).\n */\nexport interface StatusBadgeProps extends StatusLabelProps {\n /**\n * Whether to show the icon\n * @default true\n * @deprecated StatusLabel always shows the icon, so status is never conveyed by colour alone.\n */\n showIcon?: boolean\n}\n\n/**\n * StatusBadge displays a transaction or task status.\n *\n * @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always\n * shows the icon. StatusBadge is removed in 3.0 (decision 0018).\n */\nexport const StatusBadge: React.FC<StatusBadgeProps> = (props) => <StatusLabelBase {...props} />\n\nStatusBadge.displayName = 'StatusBadge'\n"],"names":["StatusBadge","props","_jsx","StatusLabelBase","__assign","displayName"],"mappings":";;;;;AAmBA;;;;;AAKG;IACUA,WAAW,GAA+B,SAA1CA,WAAWA,CAAgCC,KAAK,EAAA;EAAK,OAAAC,GAAA,CAACC,eAAe,EAAKC,QAAA,CAAA,EAAA,EAAAH,KAAK,CAAI,CAAA,CAAA;AAA9B,EAA8B;AAEhGD,WAAW,CAACK,WAAW,GAAG,aAAa;;;;"}
1
+ {"version":3,"file":"StatusBadge.mjs","sources":["../../../../src/components/atoms/StatusBadge/StatusBadge.tsx"],"sourcesContent":["import React from 'react'\nimport { StatusLabelBase, type StatusLabelProps } from '../StatusLabel/StatusLabelBase'\n\nexport type { StatusType, StatusSize } from '../StatusLabel/StatusLabelBase'\n\n/**\n * Props for the StatusBadge component\n * @deprecated Use `StatusLabelProps`. StatusBadge is renamed StatusLabel and is removed in 3.0\n * (decision 0018).\n */\nexport interface StatusBadgeProps extends StatusLabelProps {\n /**\n * Whether to show the icon\n * @default true\n * @deprecated StatusLabel always shows its status icon or shape with the text, so status is\n * never conveyed by colour alone (decision 0045).\n */\n showIcon?: boolean\n}\n\n/**\n * StatusBadge displays a transaction or task status.\n *\n * @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always\n * shows its status icon or shape. StatusBadge is removed in 3.0 (decision 0018).\n */\nexport const StatusBadge: React.FC<StatusBadgeProps> = (props) => <StatusLabelBase {...props} />\n\nStatusBadge.displayName = 'StatusBadge'\n"],"names":["StatusBadge","props","_jsx","StatusLabelBase","__assign","displayName"],"mappings":";;;;;AAoBA;;;;;AAKG;IACUA,WAAW,GAA+B,SAA1CA,WAAWA,CAAgCC,KAAK,EAAA;EAAK,OAAAC,GAAA,CAACC,eAAe,EAAKC,QAAA,CAAA,EAAA,EAAAH,KAAK,CAAI,CAAA,CAAA;AAA9B,EAA8B;AAEhGD,WAAW,CAACK,WAAW,GAAG,aAAa;;;;"}
@@ -4,8 +4,11 @@ export type { StatusLabelProps, StatusType, StatusSize } from './StatusLabelBase
4
4
  /**
5
5
  * StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
6
6
  *
7
- * Uses only the status colour tokens and always shows an icon with its text, so status is never
8
- * conveyed by colour alone. Not interactive. Announces changes politely to screen readers.
7
+ * Uses only the status colour tokens and always shows its text, so status is never conveyed by
8
+ * colour alone (decision 0045). Medium shows the status icon. Small shows the status shape for
9
+ * completed, failed and processing, and text only for the neutral pending, scheduled and
10
+ * cancelled, so keep the label visible. Not interactive. Announces changes politely to screen
11
+ * readers.
9
12
  *
10
13
  * @example
11
14
  * ```tsx
@@ -4,8 +4,11 @@ export type { StatusLabelProps, StatusType, StatusSize } from './StatusLabelBase
4
4
  /**
5
5
  * StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
6
6
  *
7
- * Uses only the status colour tokens and always shows an icon with its text, so status is never
8
- * conveyed by colour alone. Not interactive. Announces changes politely to screen readers.
7
+ * Uses only the status colour tokens and always shows its text, so status is never conveyed by
8
+ * colour alone (decision 0045). Medium shows the status icon. Small shows the status shape for
9
+ * completed, failed and processing, and text only for the neutral pending, scheduled and
10
+ * cancelled, so keep the label visible. Not interactive. Announces changes politely to screen
11
+ * readers.
9
12
  *
10
13
  * @example
11
14
  * ```tsx
@@ -6,8 +6,11 @@ import { StatusLabelBase } from './StatusLabelBase.mjs';
6
6
  /**
7
7
  * StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
8
8
  *
9
- * Uses only the status colour tokens and always shows an icon with its text, so status is never
10
- * conveyed by colour alone. Not interactive. Announces changes politely to screen readers.
9
+ * Uses only the status colour tokens and always shows its text, so status is never conveyed by
10
+ * colour alone (decision 0045). Medium shows the status icon. Small shows the status shape for
11
+ * completed, failed and processing, and text only for the neutral pending, scheduled and
12
+ * cancelled, so keep the label visible. Not interactive. Announces changes politely to screen
13
+ * readers.
11
14
  *
12
15
  * @example
13
16
  * ```tsx
@@ -1 +1 @@
1
- {"version":3,"file":"StatusLabel.mjs","sources":["../../../../src/components/atoms/StatusLabel/StatusLabel.tsx"],"sourcesContent":["import React from 'react'\nimport { StatusLabelBase, type StatusLabelProps } from './StatusLabelBase'\n\nexport type { StatusLabelProps, StatusType, StatusSize } from './StatusLabelBase'\n\n/**\n * StatusLabel conveys the status of something, such as a transaction or task (decision 0018).\n *\n * Uses only the status colour tokens and always shows an icon with its text, so status is never\n * conveyed by colour alone. Not interactive. Announces changes politely to screen readers.\n *\n * @example\n * ```tsx\n * <StatusLabel status=\"completed\" />\n *\n * <StatusLabel status=\"pending\" label=\"Awaiting approval\" size=\"small\" />\n * ```\n */\n// showIcon comes last so no caller (for example plain JavaScript) can hide the icon\nexport const StatusLabel: React.FC<StatusLabelProps> = (props) => <StatusLabelBase {...props} showIcon />\n\nStatusLabel.displayName = 'StatusLabel'\n"],"names":["StatusLabel","props","_jsx","StatusLabelBase","showIcon","displayName"],"mappings":";;;;;AAKA;;;;;;;;;;;;AAYG;AACH;IACaA,WAAW,GAA+B,SAA1CA,WAAWA,CAAgCC,KAAK,EAAK;EAAA,OAAAC,GAAC,CAAAC,eAAe,eAAKF,KAAK,EAAA;AAAEG,IAAAA,QAAQ,EAAG,IAAA;AAAA,GAAA,CAAA,CAAA,CAAA;AAAvC,EAAuC;AAEzGJ,WAAW,CAACK,WAAW,GAAG,aAAa;;;;"}
1
+ {"version":3,"file":"StatusLabel.mjs","sources":["../../../../src/components/atoms/StatusLabel/StatusLabel.tsx"],"sourcesContent":["import React from 'react'\nimport { StatusLabelBase, type StatusLabelProps } from './StatusLabelBase'\n\nexport type { StatusLabelProps, StatusType, StatusSize } from './StatusLabelBase'\n\n/**\n * StatusLabel conveys the status of something, such as a transaction or task (decision 0018).\n *\n * Uses only the status colour tokens and always shows its text, so status is never conveyed by\n * colour alone (decision 0045). Medium shows the status icon. Small shows the status shape for\n * completed, failed and processing, and text only for the neutral pending, scheduled and\n * cancelled, so keep the label visible. Not interactive. Announces changes politely to screen\n * readers.\n *\n * @example\n * ```tsx\n * <StatusLabel status=\"completed\" />\n *\n * <StatusLabel status=\"pending\" label=\"Awaiting approval\" size=\"small\" />\n * ```\n */\n// showIcon comes last so no caller (for example plain JavaScript) can hide the icon\nexport const StatusLabel: React.FC<StatusLabelProps> = (props) => <StatusLabelBase {...props} showIcon />\n\nStatusLabel.displayName = 'StatusLabel'\n"],"names":["StatusLabel","props","_jsx","StatusLabelBase","showIcon","displayName"],"mappings":";;;;;AAKA;;;;;;;;;;;;;;;AAeG;AACH;IACaA,WAAW,GAA+B,SAA1CA,WAAWA,CAAgCC,KAAK,EAAK;EAAA,OAAAC,GAAC,CAAAC,eAAe,eAAKF,KAAK,EAAA;AAAEG,IAAAA,QAAQ,EAAG,IAAA;AAAA,GAAA,CAAA,CAAA,CAAA;AAAvC,EAAuC;AAEzGJ,WAAW,CAACK,WAAW,GAAG,aAAa;;;;"}
@@ -41,8 +41,8 @@ export interface StatusLabelProps {
41
41
  }
42
42
  /**
43
43
  * Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
44
- * from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
45
- * (decision 0018).
44
+ * from the package. `showIcon` exists only for StatusBadge. StatusLabel always shows the status icon
45
+ * at the medium size, and at the small size the shape for coloured statuses (decisions 0018, 0045).
46
46
  */
47
47
  export declare const StatusLabelBase: React.FC<StatusLabelProps & {
48
48
  showIcon?: boolean;
@@ -41,8 +41,8 @@ export interface StatusLabelProps {
41
41
  }
42
42
  /**
43
43
  * Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
44
- * from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
45
- * (decision 0018).
44
+ * from the package. `showIcon` exists only for StatusBadge. StatusLabel always shows the status icon
45
+ * at the medium size, and at the small size the shape for coloured statuses (decisions 0018, 0045).
46
46
  */
47
47
  export declare const StatusLabelBase: React.FC<StatusLabelProps & {
48
48
  showIcon?: boolean;
@@ -4,6 +4,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import styled$module, { keyframes } from 'styled-components';
5
5
  const styled = styled$module.default || styled$module;
6
6
  import { Icon } from '../Icon/Icon.mjs';
7
+ import { StatusShape } from './StatusShape.mjs';
7
8
  import { reducedMotion, forcedColorsEdge, visuallyHidden } from '../../../lib/styleUtils.mjs';
8
9
  import tokens from '../../../lib/cssTokens.mjs';
9
10
 
@@ -20,43 +21,46 @@ var labelHeight = tokens.semantic.size.label;
20
21
  var label = tokens.component.badge.label;
21
22
  var scaleIn = keyframes(templateObject_1 || (templateObject_1 = __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"])));
22
23
  var getStatusConfig = function getStatusConfig(status) {
24
+ // Each status's icon and, for the coloured statuses, its shape indicator (decision 0045). The
25
+ // neutral statuses have no shape: at the small size they're plain text.
23
26
  var configs = {
24
27
  pending: {
25
28
  color: statusColors.pending.text,
26
29
  bgColor: statusColors.pending.background,
27
- icon: 'refresh',
28
- // Fallback until 'clock' icon is added
30
+ icon: 'statusPending',
29
31
  label: 'Pending'
30
32
  },
31
33
  completed: {
32
34
  color: statusColors.completed.text,
33
35
  bgColor: statusColors.completed.background,
34
- icon: 'check',
36
+ icon: 'statusSuccess',
37
+ shape: 'success',
35
38
  label: 'Completed'
36
39
  },
37
40
  failed: {
38
41
  color: statusColors.failed.text,
39
42
  bgColor: statusColors.failed.background,
40
- icon: 'close',
43
+ icon: 'statusError',
44
+ shape: 'error',
41
45
  label: 'Failed'
42
46
  },
43
47
  cancelled: {
44
48
  color: statusColors.cancelled.text,
45
49
  bgColor: statusColors.cancelled.background,
46
- icon: 'cancel',
50
+ icon: 'statusCancelled',
47
51
  label: 'Cancelled'
48
52
  },
49
53
  processing: {
50
54
  color: statusColors.processing.text,
51
55
  bgColor: statusColors.processing.background,
52
- icon: 'refresh',
56
+ icon: 'statusInProgress',
57
+ shape: 'inProgress',
53
58
  label: 'Processing'
54
59
  },
55
60
  scheduled: {
56
61
  color: statusColors.scheduled.text,
57
62
  bgColor: statusColors.scheduled.background,
58
- icon: 'bell',
59
- // Fallback until 'calendar' icon is added
63
+ icon: 'statusScheduled',
60
64
  label: 'Scheduled'
61
65
  }
62
66
  };
@@ -109,13 +113,13 @@ var VisibleContent = /*#__PURE__*/styled.span.withConfig({
109
113
  })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"
110
114
  /**
111
115
  * Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
112
- * from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
113
- * (decision 0018).
116
+ * from the package. `showIcon` exists only for StatusBadge. StatusLabel always shows the status icon
117
+ * at the medium size, and at the small size the shape for coloured statuses (decisions 0018, 0045).
114
118
  */])));
115
119
  /**
116
120
  * Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
117
- * from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
118
- * (decision 0018).
121
+ * from the package. `showIcon` exists only for StatusBadge. StatusLabel always shows the status icon
122
+ * at the medium size, and at the small size the shape for coloured statuses (decisions 0018, 0045).
119
123
  */
120
124
  var StatusLabelBase = function StatusLabelBase(_a) {
121
125
  var status = _a.status,
@@ -143,10 +147,12 @@ var StatusLabelBase = function StatusLabelBase(_a) {
143
147
  "data-testid": dataTestId,
144
148
  children: [jsxs(VisibleContent, {
145
149
  "aria-hidden": accessibleLabel ? 'true' : undefined,
146
- children: [showIcon && jsx(Icon, {
150
+ children: [showIcon && size === 'medium' && jsx(Icon, {
147
151
  name: statusConfig.icon,
148
152
  size: sizeStyles.iconSize,
149
153
  iconColor: "inherit"
154
+ }), showIcon && size === 'small' && statusConfig.shape && jsx(StatusShape, {
155
+ shape: statusConfig.shape
150
156
  }), displayLabel, jsxs(ScreenReaderOnly, {
151
157
  children: [status, " status"]
152
158
  })]
@@ -0,0 +1,4 @@
1
+ import { type StatusShape as StatusShapeName } from '../../../lib/statusShapes.mjs';
2
+ export declare const StatusShape: ({ shape }: {
3
+ shape: StatusShapeName;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type StatusShape as StatusShapeName } from '../../../lib/statusShapes';
2
+ export declare const StatusShape: ({ shape }: {
3
+ shape: StatusShapeName;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import styled$module from 'styled-components';
5
+ const styled = styled$module.default || styled$module;
6
+ import tokens from '../../../lib/cssTokens.mjs';
7
+ import { statusShapes } from '../../../lib/statusShapes.mjs';
8
+
9
+ // The shape indicator: at least 12px (decision 0045), filled with the current text colour, which is
10
+ // the label's role colour at 5.3:1 or more on its tint, so it needs no edge. Decorative: the text
11
+ // beside it names the status. Internal to the status family (#264): not exported from the package.
12
+ var Mark = /*#__PURE__*/styled.svg.withConfig({
13
+ displayName: "StatusShape__Mark",
14
+ componentId: "sc-1yzi9jt-0"
15
+ })(templateObject_1 || (templateObject_1 = __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);
16
+ var StatusShape = function StatusShape(_a) {
17
+ var shape = _a.shape;
18
+ return jsx(Mark, {
19
+ viewBox: "0 0 24 24",
20
+ "aria-hidden": "true",
21
+ focusable: "false",
22
+ "data-shape": shape,
23
+ children: jsx("path", {
24
+ d: statusShapes[shape]
25
+ })
26
+ });
27
+ };
28
+ var templateObject_1;
29
+
30
+ export { StatusShape };
31
+ //# sourceMappingURL=StatusShape.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusShape.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -25,7 +25,7 @@ var getTypographyStyles = function getTypographyStyles(variant) {
25
25
  caption: "font: ".concat(typography.caption, "; text-transform: uppercase;"),
26
26
  button1: "font: ".concat(tokens.component.button.sizes.large.font, ";"),
27
27
  button2: "font: ".concat(tokens.component.button.sizes.medium.font, ";"),
28
- button3: "font: ".concat(tokens.component.button.sizes.small.font, ";"),
28
+ button3: "font: ".concat(tokens.component.button.sizes.small.font, "; font-weight: ").concat(tokens.component.button.sizes.small.fontWeight, ";"),
29
29
  label: "font: ".concat(typography.label, ";")
30
30
  };
31
31
  return styles[variant] || styles.body;
@@ -33,7 +33,7 @@ var getTypographyStyles = function getTypographyStyles(variant) {
33
33
  var getTextColor = function getTextColor(colorVariant) {
34
34
  var colorMap = {
35
35
  "default": color.text["default"],
36
- emphasis: color.text.emphasis,
36
+ emphasis: color.text["default"],
37
37
  subdued: color.text.muted,
38
38
  inverse: color.text.inverse,
39
39
  disabled: color.text.disabled,
@@ -5,10 +5,10 @@ import styled$module from 'styled-components';
5
5
  const styled = styled$module.default || styled$module;
6
6
  import { Stack } from '../../atoms/Stack/Stack.mjs';
7
7
  import { Box } from '../../atoms/Box/Box.mjs';
8
+ import { Icon } from '../../atoms/Icon/Icon.mjs';
8
9
  import { Typography } from '../../atoms/Typography/Typography.mjs';
9
10
  import { MoneyDisplay } from '../../atoms/MoneyDisplay/MoneyDisplay.mjs';
10
11
  import { Button } from '../../atoms/Button/Button.mjs';
11
- import { CategoryLabel } from '../../atoms/CategoryLabel/CategoryLabel.mjs';
12
12
  import { Avatar } from '../../atoms/Avatar/Avatar.mjs';
13
13
  import tokens from '../../../lib/cssTokens.mjs';
14
14
 
@@ -22,7 +22,10 @@ var StyledBalanceSection = /*#__PURE__*/styled.div.withConfig({
22
22
  var StyledTrendSection = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "AccountCard__StyledTrendSection",
24
24
  componentId: "sc-1erp7zn-1"
25
- })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n"])), space[100]);
25
+ })(templateObject_2 || (templateObject_2 = __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[100], function (_a) {
26
+ var $color = _a.$color;
27
+ return $color;
28
+ }, semantic.typography.small);
26
29
  /*#__PURE__*/styled.div.withConfig({
27
30
  displayName: "AccountCard__StyledActions",
28
31
  componentId: "sc-1erp7zn-2"
@@ -43,10 +46,12 @@ var trendToIcon = {
43
46
  down: 'arrowDown',
44
47
  neutral: 'arrowRight'
45
48
  };
49
+ // A trend is a differential indicator (decision 0045): the arrow and the signed value carry the
50
+ // direction, and the role colour repeats it. Category colours carry no meaning, so they aren't used.
46
51
  var trendToColor = {
47
- up: 'green',
48
- down: 'red',
49
- neutral: 'blue'
52
+ up: semantic.color.text.success,
53
+ down: semantic.color.text.danger,
54
+ neutral: semantic.color.text.muted
50
55
  };
51
56
  /**
52
57
  * AccountCard component
@@ -87,7 +92,7 @@ var AccountCard = function AccountCard(_a) {
87
92
  return jsx(Box, {
88
93
  minWidth: tokens.component.accountCard.minWidth,
89
94
  p: "lg",
90
- bg: "subtle",
95
+ bg: "surface.raised",
91
96
  border: "default",
92
97
  borderRadius: "xl",
93
98
  transition: "box-shadow ".concat(semantic.motion.duration.moderate, " ").concat(semantic.motion.easing.decelerate),
@@ -141,16 +146,19 @@ var AccountCard = function AccountCard(_a) {
141
146
  }), jsx(Typography, {
142
147
  color: "subdued",
143
148
  children: "Available"
144
- }), trend && trendValue && jsx(StyledTrendSection, {
149
+ }), trend && trendValue &&
150
+ // A group rather than an image, so screen readers read the value as well as the direction
151
+ jsxs(StyledTrendSection, {
152
+ role: "group",
145
153
  "aria-label": "Trend ".concat(trend),
146
- role: "img",
147
- children: jsx(CategoryLabel, {
148
- size: "medium",
149
- icon: trendIcon,
150
- color: trendColor,
151
- variant: "minimal",
154
+ "$color": trendColor,
155
+ children: [jsx(Icon, {
156
+ name: trendIcon,
157
+ size: "sm",
158
+ iconColor: "inherit"
159
+ }), jsx("span", {
152
160
  children: trendValue
153
- })
161
+ })]
154
162
  })]
155
163
  })
156
164
  })]
@@ -2,10 +2,10 @@ import React from 'react';
2
2
  export interface AlertProps {
3
3
  /**
4
4
  * Visual style variant affecting background, border, and icon colors
5
- * - error: Critical issues, validation errors (crossCircle icon)
6
- * - warning: Cautions, potential issues (bell icon)
7
- * - info: Tips, helper text, neutral information (info icon)
8
- * - success: Confirmations, successful operations (checkRing icon)
5
+ * - error: Critical issues, validation errors (cross in a hexagon)
6
+ * - warning: Cautions, potential issues (`!` in a triangle)
7
+ * - info: Tips, helper text, neutral information (`i` in a square)
8
+ * - success: Confirmations, successful operations (tick in a circle)
9
9
  * @default 'info'
10
10
  */
11
11
  variant?: 'error' | 'warning' | 'info' | 'success';
@@ -2,10 +2,10 @@ import React from 'react';
2
2
  export interface AlertProps {
3
3
  /**
4
4
  * Visual style variant affecting background, border, and icon colors
5
- * - error: Critical issues, validation errors (crossCircle icon)
6
- * - warning: Cautions, potential issues (bell icon)
7
- * - info: Tips, helper text, neutral information (info icon)
8
- * - success: Confirmations, successful operations (checkRing icon)
5
+ * - error: Critical issues, validation errors (cross in a hexagon)
6
+ * - warning: Cautions, potential issues (`!` in a triangle)
7
+ * - info: Tips, helper text, neutral information (`i` in a square)
8
+ * - success: Confirmations, successful operations (tick in a circle)
9
9
  * @default 'info'
10
10
  */
11
11
  variant?: 'error' | 'warning' | 'info' | 'success';
@@ -35,11 +35,12 @@ var fadeOut = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateOb
35
35
  // The generated names of the two exits (full, and reduced motion)
36
36
  var EXIT_ANIMATION_NAMES = [fadeThenCollapse.getName(), fadeOut.getName()];
37
37
  // Default icons by variant
38
+ // Each severity's status icon (decision 0045): decorative, because the title and message say it
38
39
  var variantIcons = {
39
- error: 'crossCircle',
40
- warning: 'bell',
41
- info: 'info',
42
- success: 'checkRing'
40
+ error: 'statusError',
41
+ warning: 'statusWarning',
42
+ info: 'statusInfo',
43
+ success: 'statusSuccess'
43
44
  };
44
45
  // Icon colors by variant (using semantic icon color tokens)
45
46
  var variantIconColors = {
@@ -15,7 +15,7 @@ var _a = tokens.semantic,
15
15
  var StyledCodeBlock = /*#__PURE__*/styled.pre.withConfig({
16
16
  displayName: "CodeBlock__StyledCodeBlock",
17
17
  componentId: "sc-1p1t0kp-0"
18
- })(templateObject_1 || (templateObject_1 = __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.emphasis, tokens.semantic.radius.sm, tokens.semantic.space[300], tokens.component.codeBlock.fontFamily, tokens.component.codeBlock.fontSize, tokens.component.codeBlock.lineHeight, color.text["default"], function (_a) {
18
+ })(templateObject_1 || (templateObject_1 = __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["default"], tokens.semantic.radius.sm, tokens.semantic.space[300], tokens.component.codeBlock.fontFamily, tokens.component.codeBlock.fontSize, tokens.component.codeBlock.lineHeight, color.text["default"], function (_a) {
19
19
  var $isExpanded = _a.$isExpanded,
20
20
  $needsExpansion = _a.$needsExpansion;
21
21
  return $needsExpansion && !$isExpanded ? 'hidden' : 'auto';
@@ -66,7 +66,7 @@ var DropdownMenu = /*#__PURE__*/styled.div.withConfig({
66
66
  },
67
67
  displayName: "Dropdown__DropdownMenu",
68
68
  componentId: "sc-kz07c4-3"
69
- })(templateObject_4 || (templateObject_4 = __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["default"].backgroundColor, border.emphasis, input["default"].borderRadius, elevation.floating, space[100], function (_a) {
69
+ })(templateObject_4 || (templateObject_4 = __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["default"].backgroundColor, border["default"], input["default"].borderRadius, elevation.floating, space[100], function (_a) {
70
70
  var $isOpen = _a.$isOpen;
71
71
  return $isOpen ? 1 : 0;
72
72
  }, function (_a) {
@@ -89,7 +89,7 @@ var DropdownOption = /*#__PURE__*/styled.button.withConfig({
89
89
  selected: $isSelected,
90
90
  focused: $isFocused
91
91
  });
92
- }, border.emphasis);
92
+ }, border["default"]);
93
93
  var StyledHelperText = /*#__PURE__*/styled.div.withConfig({
94
94
  displayName: "Dropdown__StyledHelperText",
95
95
  componentId: "sc-kz07c4-5"
@@ -5,16 +5,18 @@ import styled$module from 'styled-components';
5
5
  const styled = styled$module.default || styled$module;
6
6
  import tokens from '../../../lib/cssTokens.mjs';
7
7
  import { Icon } from '../../atoms/Icon/Icon.mjs';
8
+ import { StatusShape } from '../../atoms/StatusLabel/StatusShape.mjs';
8
9
 
9
10
  var semantic = tokens.semantic;
10
11
  var color = semantic.color,
11
12
  typography = semantic.typography,
12
13
  size = semantic.size;
14
+ // Each severity's status icon and, at the small size, its shape (decision 0045)
13
15
  var variantIcons = {
14
- error: 'crossCircle',
15
- warning: 'bell',
16
- info: 'info',
17
- success: 'checkRing'
16
+ error: 'statusError',
17
+ warning: 'statusWarning',
18
+ info: 'statusInfo',
19
+ success: 'statusSuccess'
18
20
  };
19
21
  var variantTextColors = {
20
22
  error: color.text.danger,
@@ -22,6 +24,12 @@ var variantTextColors = {
22
24
  info: color.text.accent,
23
25
  success: color.text.success
24
26
  };
27
+ var variantShapes = {
28
+ error: 'error',
29
+ warning: 'warning',
30
+ info: 'info',
31
+ success: 'success'
32
+ };
25
33
  var sizeConfig = {
26
34
  small: {
27
35
  font: typography.caption,
@@ -122,7 +130,9 @@ var InlineAlert = function InlineAlert(_a) {
122
130
  children: hasMessage && jsxs(Fragment, {
123
131
  children: [jsx(StyledIconLine, {
124
132
  "aria-hidden": "true",
125
- children: jsx(Icon, {
133
+ children: alertSize === 'small' ? jsx(StatusShape, {
134
+ shape: variantShapes[variant]
135
+ }) : jsx(Icon, {
126
136
  name: variantIcons[variant],
127
137
  size: sizeConfig[alertSize].icon,
128
138
  iconColor: "inherit"