@common-origin/design-system 2.20.0 → 2.22.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 (103) hide show
  1. package/dist/client.js +1015 -499
  2. package/dist/client.js.map +1 -1
  3. package/dist/components/atoms/AILabel/AILabel.d.mts +30 -0
  4. package/dist/components/atoms/AILabel/AILabel.d.ts +30 -0
  5. package/dist/components/atoms/AILabel/AILabel.mjs +94 -0
  6. package/dist/components/atoms/AILabel/AILabel.mjs.map +1 -0
  7. package/dist/components/atoms/AILabel/index.d.mts +1 -0
  8. package/dist/components/atoms/AILabel/index.d.ts +1 -0
  9. package/dist/components/atoms/Badge/Badge.d.mts +16 -4
  10. package/dist/components/atoms/Badge/Badge.d.ts +16 -4
  11. package/dist/components/atoms/Badge/Badge.mjs +4 -5
  12. package/dist/components/atoms/Badge/index.d.mts +1 -1
  13. package/dist/components/atoms/Badge/index.d.ts +1 -1
  14. package/dist/components/atoms/Button/Button.mjs +1 -1
  15. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.mts +23 -8
  16. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +23 -8
  17. package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs +31 -18
  18. package/dist/components/atoms/CategoryLabel/index.d.mts +1 -1
  19. package/dist/components/atoms/CategoryLabel/index.d.ts +1 -1
  20. package/dist/components/atoms/Chip/SuggestionChip.d.mts +24 -0
  21. package/dist/components/atoms/Chip/SuggestionChip.d.ts +24 -0
  22. package/dist/components/atoms/Chip/SuggestionChip.mjs +61 -0
  23. package/dist/components/atoms/Chip/SuggestionChip.mjs.map +1 -0
  24. package/dist/components/atoms/Chip/index.d.mts +1 -0
  25. package/dist/components/atoms/Chip/index.d.ts +1 -0
  26. package/dist/components/atoms/Chip/shared/utils.mjs +1 -1
  27. package/dist/components/atoms/Chip/shared/utils.mjs.map +1 -1
  28. package/dist/components/atoms/Icon/Icon.mjs +1 -1
  29. package/dist/components/atoms/MoneyDisplay/MoneyDisplay.mjs +14 -60
  30. package/dist/components/atoms/StatusBadge/StatusBadge.d.mts +3 -2
  31. package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +3 -2
  32. package/dist/components/atoms/StatusBadge/StatusBadge.mjs +1 -1
  33. package/dist/components/atoms/StatusBadge/StatusBadge.mjs.map +1 -1
  34. package/dist/components/atoms/StatusLabel/StatusLabel.d.mts +5 -2
  35. package/dist/components/atoms/StatusLabel/StatusLabel.d.ts +5 -2
  36. package/dist/components/atoms/StatusLabel/StatusLabel.mjs +5 -2
  37. package/dist/components/atoms/StatusLabel/StatusLabel.mjs.map +1 -1
  38. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.mts +2 -2
  39. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +2 -2
  40. package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs +19 -13
  41. package/dist/components/atoms/StatusLabel/StatusShape.d.mts +4 -0
  42. package/dist/components/atoms/StatusLabel/StatusShape.d.ts +4 -0
  43. package/dist/components/atoms/StatusLabel/StatusShape.mjs +31 -0
  44. package/dist/components/atoms/StatusLabel/StatusShape.mjs.map +1 -0
  45. package/dist/components/atoms/Typography/Typography.mjs +2 -2
  46. package/dist/components/atoms/index.d.mts +1 -0
  47. package/dist/components/atoms/index.d.ts +1 -0
  48. package/dist/components/molecules/AccountCard/AccountCard.mjs +21 -13
  49. package/dist/components/molecules/AgentInput/AgentInput.d.mts +63 -1
  50. package/dist/components/molecules/AgentInput/AgentInput.d.ts +63 -1
  51. package/dist/components/molecules/AgentInput/AgentInput.mjs +476 -112
  52. package/dist/components/molecules/AgentInput/agentInputSpeech.d.mts +2 -0
  53. package/dist/components/molecules/AgentInput/agentInputSpeech.d.ts +2 -0
  54. package/dist/components/molecules/AgentInput/agentInputSpeech.mjs +5 -1
  55. package/dist/components/molecules/AgentInput/agentInputSpeech.mjs.map +1 -1
  56. package/dist/components/molecules/AgentInput/index.d.mts +1 -1
  57. package/dist/components/molecules/AgentInput/index.d.ts +1 -1
  58. package/dist/components/molecules/Alert/Alert.d.mts +4 -4
  59. package/dist/components/molecules/Alert/Alert.d.ts +4 -4
  60. package/dist/components/molecules/Alert/Alert.mjs +5 -4
  61. package/dist/components/molecules/CardLarge/CardLarge.mjs +1 -0
  62. package/dist/components/molecules/ChipGroup/ChipGroup.mjs +2 -0
  63. package/dist/components/molecules/CodeBlock/CodeBlock.mjs +1 -1
  64. package/dist/components/molecules/Dropdown/Dropdown.mjs +2 -2
  65. package/dist/components/molecules/FeatureBlock/FeatureBlock.mjs +1 -0
  66. package/dist/components/molecules/InlineAlert/InlineAlert.mjs +15 -5
  67. package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
  68. package/dist/components/molecules/TransactionListItem/TransactionListItem.d.mts +1 -1
  69. package/dist/components/molecules/TransactionListItem/TransactionListItem.d.ts +1 -1
  70. package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs +15 -31
  71. package/dist/data.js +817 -294
  72. package/dist/data.js.map +1 -1
  73. package/dist/index.js +2 -0
  74. package/dist/index.js.map +1 -1
  75. package/dist/index.mjs +2 -0
  76. package/dist/index.mjs.map +1 -1
  77. package/dist/lib/statusShapes.d.mts +2 -0
  78. package/dist/lib/statusShapes.d.ts +2 -0
  79. package/dist/lib/statusShapes.mjs +16 -0
  80. package/dist/lib/statusShapes.mjs.map +1 -0
  81. package/dist/lib/styleUtils.mjs +2 -2
  82. package/dist/lib/styleUtils.mjs.map +1 -1
  83. package/dist/lib/tokenAliases.mjs +16 -10
  84. package/dist/lib/tokenAliases.mjs.map +1 -1
  85. package/dist/styles/icons.json +171 -1
  86. package/dist/styles/icons.json.mjs +185 -3
  87. package/dist/styles/icons.json.mjs.map +1 -1
  88. package/dist/styles/tokens.d.mts +957 -123
  89. package/dist/styles/tokens.d.ts +957 -123
  90. package/dist/styles/tokens.json +633 -292
  91. package/dist/styles/tokens.json.mjs +633 -292
  92. package/dist/styles/tokens.json.mjs.map +1 -1
  93. package/dist/tokens/index.js +633 -292
  94. package/dist/tokens/index.js.map +1 -1
  95. package/dist/tokens/index.mjs +633 -292
  96. package/dist/tokens/index.mjs.map +1 -1
  97. package/dist/tokens/styles/tokens.d.mts +957 -123
  98. package/dist/tokens/styles/tokens.d.ts +957 -123
  99. package/dist/tokens.css +499 -212
  100. package/dist/types/icons.d.mts +1 -1
  101. package/dist/types/icons.d.ts +1 -1
  102. package/dist/types/icons.mjs.map +1 -1
  103. package/package.json +1 -1
@@ -39,5 +39,7 @@ export interface SpeechRecognitionLike {
39
39
  export type SpeechRecognitionConstructorLike = new () => SpeechRecognitionLike;
40
40
  export declare function detectSpeechRecognitionConstructor(targetWindow?: Window): SpeechRecognitionConstructorLike | null;
41
41
  export declare function normalizeTranscript(input: string): string;
42
+ /** Typed text: like a transcript, but line breaks are kept (spaces around them are dropped). */
43
+ export declare function normalizeMessage(input: string): string;
42
44
  export declare function mapSpeechErrorCode(error?: string): AgentInputVoiceErrorCode;
43
45
  export declare function defaultVoiceErrorMessage(code: AgentInputVoiceErrorCode): string;
@@ -39,5 +39,7 @@ export interface SpeechRecognitionLike {
39
39
  export type SpeechRecognitionConstructorLike = new () => SpeechRecognitionLike;
40
40
  export declare function detectSpeechRecognitionConstructor(targetWindow?: Window): SpeechRecognitionConstructorLike | null;
41
41
  export declare function normalizeTranscript(input: string): string;
42
+ /** Typed text: like a transcript, but line breaks are kept (spaces around them are dropped). */
43
+ export declare function normalizeMessage(input: string): string;
42
44
  export declare function mapSpeechErrorCode(error?: string): AgentInputVoiceErrorCode;
43
45
  export declare function defaultVoiceErrorMessage(code: AgentInputVoiceErrorCode): string;
@@ -13,6 +13,10 @@ function detectSpeechRecognitionConstructor(targetWindow) {
13
13
  function normalizeTranscript(input) {
14
14
  return input.replace(/\s+/g, ' ').trim();
15
15
  }
16
+ /** Typed text: like a transcript, but line breaks are kept (spaces around them are dropped). */
17
+ function normalizeMessage(input) {
18
+ return input.replace(/[^\S\n]+/g, ' ').replace(/ ?\n ?/g, '\n').trim();
19
+ }
16
20
  function mapSpeechErrorCode(error) {
17
21
  switch (error) {
18
22
  case 'not-allowed':
@@ -45,5 +49,5 @@ function defaultVoiceErrorMessage(code) {
45
49
  }
46
50
  }
47
51
 
48
- export { defaultVoiceErrorMessage, detectSpeechRecognitionConstructor, mapSpeechErrorCode, normalizeTranscript };
52
+ export { defaultVoiceErrorMessage, detectSpeechRecognitionConstructor, mapSpeechErrorCode, normalizeMessage, normalizeTranscript };
49
53
  //# sourceMappingURL=agentInputSpeech.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentInputSpeech.mjs","sources":["../../../../src/components/molecules/AgentInput/agentInputSpeech.ts"],"sourcesContent":["export type AgentInputSubmitSource = 'text' | 'voice-final'\n\nexport type AgentInputVoiceErrorCode =\n | 'not-supported'\n | 'not-allowed'\n | 'no-speech'\n | 'audio-capture'\n | 'aborted'\n | 'unknown'\n\nexport interface AgentInputVoiceError {\n code: AgentInputVoiceErrorCode\n message: string\n}\n\nexport interface SpeechRecognitionAlternativeLike {\n transcript: string\n confidence: number\n}\n\nexport interface SpeechRecognitionResultLike {\n isFinal: boolean\n length: number\n [index: number]: SpeechRecognitionAlternativeLike\n}\n\nexport interface SpeechRecognitionResultListLike {\n length: number\n [index: number]: SpeechRecognitionResultLike\n}\n\nexport interface SpeechRecognitionEventLike {\n resultIndex: number\n results: SpeechRecognitionResultListLike\n}\n\nexport interface SpeechRecognitionErrorEventLike {\n error?: string\n message?: string\n}\n\nexport interface SpeechRecognitionLike {\n lang: string\n interimResults: boolean\n continuous: boolean\n onresult: ((event: SpeechRecognitionEventLike) => void) | null\n onerror: ((event: SpeechRecognitionErrorEventLike) => void) | null\n onend: (() => void) | null\n start: () => void\n stop: () => void\n abort: () => void\n}\n\nexport type SpeechRecognitionConstructorLike = new () => SpeechRecognitionLike\n\ntype BrowserWindowWithSpeech = Window & {\n SpeechRecognition?: SpeechRecognitionConstructorLike\n webkitSpeechRecognition?: SpeechRecognitionConstructorLike\n}\n\nexport function detectSpeechRecognitionConstructor(\n targetWindow?: Window\n): SpeechRecognitionConstructorLike | null {\n if (!targetWindow) return null\n\n const candidateWindow = targetWindow as BrowserWindowWithSpeech\n if (candidateWindow.SpeechRecognition) {\n return candidateWindow.SpeechRecognition\n }\n\n if (candidateWindow.webkitSpeechRecognition) {\n return candidateWindow.webkitSpeechRecognition\n }\n\n return null\n}\n\nexport function normalizeTranscript(input: string): string {\n return input.replace(/\\s+/g, ' ').trim()\n}\n\nexport function mapSpeechErrorCode(error?: string): AgentInputVoiceErrorCode {\n switch (error) {\n case 'not-allowed':\n case 'service-not-allowed':\n return 'not-allowed'\n case 'no-speech':\n return 'no-speech'\n case 'audio-capture':\n return 'audio-capture'\n case 'aborted':\n return 'aborted'\n default:\n return 'unknown'\n }\n}\n\nexport function defaultVoiceErrorMessage(code: AgentInputVoiceErrorCode): string {\n switch (code) {\n case 'not-supported':\n return 'Voice input is not supported in this browser. Use Chrome or Edge.'\n case 'not-allowed':\n return 'Microphone permission denied. Allow access and try again.'\n case 'no-speech':\n return 'No speech detected. Try again.'\n case 'audio-capture':\n return 'No microphone device detected. Check your microphone and try again.'\n case 'aborted':\n return 'Voice input was stopped.'\n default:\n return 'Voice input failed. Try again.'\n }\n}\n"],"names":["detectSpeechRecognitionConstructor","targetWindow","candidateWindow","SpeechRecognition","webkitSpeechRecognition","normalizeTranscript","input","replace","trim","mapSpeechErrorCode","error","defaultVoiceErrorMessage","code"],"mappings":";AA4DM,SAAUA,kCAAkCA,CAChDC,YAAqB,EAAA;AAErB,EAAA,IAAI,CAACA,YAAY,EAAE,OAAO,IAAI,CAAA;EAE9B,IAAMC,eAAe,GAAGD,YAAuC,CAAA;EAC/D,IAAIC,eAAe,CAACC,iBAAiB,EAAE;IACrC,OAAOD,eAAe,CAACC,iBAAiB,CAAA;AAC1C,GAAA;EAEA,IAAID,eAAe,CAACE,uBAAuB,EAAE;IAC3C,OAAOF,eAAe,CAACE,uBAAuB,CAAA;AAChD,GAAA;AAEA,EAAA,OAAO,IAAI,CAAA;AACb,CAAA;AAEM,SAAUC,mBAAmBA,CAACC,KAAa,EAAA;EAC/C,OAAOA,KAAK,CAACC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAACC,IAAI,EAAE,CAAA;AAC1C,CAAA;AAEM,SAAUC,kBAAkBA,CAACC,KAAc,EAAA;AAC/C,EAAA,QAAQA,KAAK;AACX,IAAA,KAAK,aAAa,CAAA;AAClB,IAAA,KAAK,qBAAqB;AACxB,MAAA,OAAO,aAAa,CAAA;AACtB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,WAAW,CAAA;AACpB,IAAA,KAAK,eAAe;AAClB,MAAA,OAAO,eAAe,CAAA;AACxB,IAAA,KAAK,SAAS;AACZ,MAAA,OAAO,SAAS,CAAA;AAClB,IAAA;AACE,MAAA,OAAO,SAAS,CAAA;AACpB,GAAA;AACF,CAAA;AAEM,SAAUC,wBAAwBA,CAACC,IAA8B,EAAA;AACrE,EAAA,QAAQA,IAAI;AACV,IAAA,KAAK,eAAe;AAClB,MAAA,OAAO,mEAAmE,CAAA;AAC5E,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,2DAA2D,CAAA;AACpE,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,gCAAgC,CAAA;AACzC,IAAA,KAAK,eAAe;AAClB,MAAA,OAAO,qEAAqE,CAAA;AAC9E,IAAA,KAAK,SAAS;AACZ,MAAA,OAAO,0BAA0B,CAAA;AACnC,IAAA;AACE,MAAA,OAAO,gCAAgC,CAAA;AAC3C,GAAA;AACF;;;;"}
1
+ {"version":3,"file":"agentInputSpeech.mjs","sources":["../../../../src/components/molecules/AgentInput/agentInputSpeech.ts"],"sourcesContent":["export type AgentInputSubmitSource = 'text' | 'voice-final'\n\nexport type AgentInputVoiceErrorCode =\n | 'not-supported'\n | 'not-allowed'\n | 'no-speech'\n | 'audio-capture'\n | 'aborted'\n | 'unknown'\n\nexport interface AgentInputVoiceError {\n code: AgentInputVoiceErrorCode\n message: string\n}\n\nexport interface SpeechRecognitionAlternativeLike {\n transcript: string\n confidence: number\n}\n\nexport interface SpeechRecognitionResultLike {\n isFinal: boolean\n length: number\n [index: number]: SpeechRecognitionAlternativeLike\n}\n\nexport interface SpeechRecognitionResultListLike {\n length: number\n [index: number]: SpeechRecognitionResultLike\n}\n\nexport interface SpeechRecognitionEventLike {\n resultIndex: number\n results: SpeechRecognitionResultListLike\n}\n\nexport interface SpeechRecognitionErrorEventLike {\n error?: string\n message?: string\n}\n\nexport interface SpeechRecognitionLike {\n lang: string\n interimResults: boolean\n continuous: boolean\n onresult: ((event: SpeechRecognitionEventLike) => void) | null\n onerror: ((event: SpeechRecognitionErrorEventLike) => void) | null\n onend: (() => void) | null\n start: () => void\n stop: () => void\n abort: () => void\n}\n\nexport type SpeechRecognitionConstructorLike = new () => SpeechRecognitionLike\n\ntype BrowserWindowWithSpeech = Window & {\n SpeechRecognition?: SpeechRecognitionConstructorLike\n webkitSpeechRecognition?: SpeechRecognitionConstructorLike\n}\n\nexport function detectSpeechRecognitionConstructor(\n targetWindow?: Window\n): SpeechRecognitionConstructorLike | null {\n if (!targetWindow) return null\n\n const candidateWindow = targetWindow as BrowserWindowWithSpeech\n if (candidateWindow.SpeechRecognition) {\n return candidateWindow.SpeechRecognition\n }\n\n if (candidateWindow.webkitSpeechRecognition) {\n return candidateWindow.webkitSpeechRecognition\n }\n\n return null\n}\n\nexport function normalizeTranscript(input: string): string {\n return input.replace(/\\s+/g, ' ').trim()\n}\n\n/** Typed text: like a transcript, but line breaks are kept (spaces around them are dropped). */\nexport function normalizeMessage(input: string): string {\n return input\n .replace(/[^\\S\\n]+/g, ' ')\n .replace(/ ?\\n ?/g, '\\n')\n .trim()\n}\n\nexport function mapSpeechErrorCode(error?: string): AgentInputVoiceErrorCode {\n switch (error) {\n case 'not-allowed':\n case 'service-not-allowed':\n return 'not-allowed'\n case 'no-speech':\n return 'no-speech'\n case 'audio-capture':\n return 'audio-capture'\n case 'aborted':\n return 'aborted'\n default:\n return 'unknown'\n }\n}\n\nexport function defaultVoiceErrorMessage(code: AgentInputVoiceErrorCode): string {\n switch (code) {\n case 'not-supported':\n return 'Voice input is not supported in this browser. Use Chrome or Edge.'\n case 'not-allowed':\n return 'Microphone permission denied. Allow access and try again.'\n case 'no-speech':\n return 'No speech detected. Try again.'\n case 'audio-capture':\n return 'No microphone device detected. Check your microphone and try again.'\n case 'aborted':\n return 'Voice input was stopped.'\n default:\n return 'Voice input failed. Try again.'\n }\n}\n"],"names":["detectSpeechRecognitionConstructor","targetWindow","candidateWindow","SpeechRecognition","webkitSpeechRecognition","normalizeTranscript","input","replace","trim","normalizeMessage","mapSpeechErrorCode","error","defaultVoiceErrorMessage","code"],"mappings":";AA4DM,SAAUA,kCAAkCA,CAChDC,YAAqB,EAAA;AAErB,EAAA,IAAI,CAACA,YAAY,EAAE,OAAO,IAAI,CAAA;EAE9B,IAAMC,eAAe,GAAGD,YAAuC,CAAA;EAC/D,IAAIC,eAAe,CAACC,iBAAiB,EAAE;IACrC,OAAOD,eAAe,CAACC,iBAAiB,CAAA;AAC1C,GAAA;EAEA,IAAID,eAAe,CAACE,uBAAuB,EAAE;IAC3C,OAAOF,eAAe,CAACE,uBAAuB,CAAA;AAChD,GAAA;AAEA,EAAA,OAAO,IAAI,CAAA;AACb,CAAA;AAEM,SAAUC,mBAAmBA,CAACC,KAAa,EAAA;EAC/C,OAAOA,KAAK,CAACC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAACC,IAAI,EAAE,CAAA;AAC1C,CAAA;AAEA;AACM,SAAUC,gBAAgBA,CAACH,KAAa,EAAA;AAC5C,EAAA,OAAOA,KAAK,CACTC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CACzBA,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CACxBC,IAAI,EAAE,CAAA;AACX,CAAA;AAEM,SAAUE,kBAAkBA,CAACC,KAAc,EAAA;AAC/C,EAAA,QAAQA,KAAK;AACX,IAAA,KAAK,aAAa,CAAA;AAClB,IAAA,KAAK,qBAAqB;AACxB,MAAA,OAAO,aAAa,CAAA;AACtB,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,WAAW,CAAA;AACpB,IAAA,KAAK,eAAe;AAClB,MAAA,OAAO,eAAe,CAAA;AACxB,IAAA,KAAK,SAAS;AACZ,MAAA,OAAO,SAAS,CAAA;AAClB,IAAA;AACE,MAAA,OAAO,SAAS,CAAA;AACpB,GAAA;AACF,CAAA;AAEM,SAAUC,wBAAwBA,CAACC,IAA8B,EAAA;AACrE,EAAA,QAAQA,IAAI;AACV,IAAA,KAAK,eAAe;AAClB,MAAA,OAAO,mEAAmE,CAAA;AAC5E,IAAA,KAAK,aAAa;AAChB,MAAA,OAAO,2DAA2D,CAAA;AACpE,IAAA,KAAK,WAAW;AACd,MAAA,OAAO,gCAAgC,CAAA;AACzC,IAAA,KAAK,eAAe;AAClB,MAAA,OAAO,qEAAqE,CAAA;AAC9E,IAAA,KAAK,SAAS;AACZ,MAAA,OAAO,0BAA0B,CAAA;AACnC,IAAA;AACE,MAAA,OAAO,gCAAgC,CAAA;AAC3C,GAAA;AACF;;;;"}
@@ -1,3 +1,3 @@
1
1
  export { AgentInput } from './AgentInput.mjs';
2
- export type { AgentInputProps } from './AgentInput.mjs';
2
+ export type { AgentInputProps, AgentInputHandle, AgentInputFocusOptions } from './AgentInput.mjs';
3
3
  export type { AgentInputSubmitSource, AgentInputVoiceErrorCode } from './agentInputSpeech.mjs';
@@ -1,3 +1,3 @@
1
1
  export { AgentInput } from './AgentInput';
2
- export type { AgentInputProps } from './AgentInput';
2
+ export type { AgentInputProps, AgentInputHandle, AgentInputFocusOptions } from './AgentInput';
3
3
  export type { AgentInputSubmitSource, AgentInputVoiceErrorCode } from './agentInputSpeech';
@@ -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 = {
@@ -6,6 +6,7 @@ const styled = styled$module.default || styled$module;
6
6
  import { Chip } from '../../atoms/Chip/Chip.mjs';
7
7
  import '../../atoms/Icon/Icon.mjs';
8
8
  import '../../atoms/Chip/shared/ChipBase.mjs';
9
+ import '../../atoms/Chip/SuggestionChip.mjs';
9
10
  import { Picture } from '../../atoms/Picture/Picture.mjs';
10
11
  import { Stack } from '../../atoms/Stack/Stack.mjs';
11
12
  import { Typography } from '../../atoms/Typography/Typography.mjs';
@@ -12,6 +12,7 @@ import '../../atoms/CategoryLabel/CategoryLabel.mjs';
12
12
  import { Chip } from '../../atoms/Chip/Chip.mjs';
13
13
  import '../../atoms/Icon/Icon.mjs';
14
14
  import '../../atoms/Chip/shared/ChipBase.mjs';
15
+ import '../../atoms/Chip/SuggestionChip.mjs';
15
16
  import '../../atoms/Container/Container.mjs';
16
17
  import '../../atoms/Picture/Picture.mjs';
17
18
  import '../../atoms/DateFormatter/DateFormatter.mjs';
@@ -24,6 +25,7 @@ import '../../atoms/StatusBadge/StatusBadge.mjs';
24
25
  import '../../atoms/StatusLabel/StatusLabel.mjs';
25
26
  import '../../atoms/Tag/Tag.mjs';
26
27
  import '../../atoms/Typography/Typography.mjs';
28
+ import '../../atoms/AILabel/AILabel.mjs';
27
29
 
28
30
  var ChipGroupWrapper = /*#__PURE__*/styled.div.withConfig({
29
31
  displayName: "ChipGroup__ChipGroupWrapper",
@@ -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"
@@ -6,6 +6,7 @@ const styled = styled$module.default || styled$module;
6
6
  import { Chip } from '../../atoms/Chip/Chip.mjs';
7
7
  import '../../atoms/Icon/Icon.mjs';
8
8
  import '../../atoms/Chip/shared/ChipBase.mjs';
9
+ import '../../atoms/Chip/SuggestionChip.mjs';
9
10
  import { Button } from '../../atoms/Button/Button.mjs';
10
11
  import { Picture } from '../../atoms/Picture/Picture.mjs';
11
12
  import { Divider } from '../../atoms/Divider/Divider.mjs';
@@ -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"
@@ -11,7 +11,7 @@ var semantic = tokens.semantic;
11
11
  var StyledTabList = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "TabBar__StyledTabList",
13
13
  componentId: "sc-1g9ib0y-0"
14
- })(templateObject_1 || (templateObject_1 = __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.emphasis, tokens.component.tabBar.scrollbar.height, semantic.surface.raised, semantic.color.border["default"], semantic.radius.sm);
14
+ })(templateObject_1 || (templateObject_1 = __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);
15
15
  var StyledTab = /*#__PURE__*/styled.button.withConfig({
16
16
  shouldForwardProp: function shouldForwardProp(prop) {
17
17
  return !prop.startsWith('$');
@@ -31,11 +31,11 @@ var StyledTab = /*#__PURE__*/styled.button.withConfig({
31
31
  }, function (props) {
32
32
  return props.$isActive ? semantic.color.fill['accent-muted-hover'] : 'transparent';
33
33
  }, function (props) {
34
- return props.$isActive ? semantic.color.text['accent-hover'] : semantic.color.text["default"];
34
+ return props.$isActive ? semantic.color.text.accent : semantic.color.text["default"];
35
35
  }, function (props) {
36
36
  return props.$isActive ? semantic.color.fill['accent-muted-pressed'] : 'transparent';
37
37
  }, function (props) {
38
- return props.$isActive ? semantic.color.text['accent-pressed'] : semantic.color.text["default"];
38
+ return props.$isActive ? semantic.color.text.accent : semantic.color.text["default"];
39
39
  }, function (props) {
40
40
  return props.$disabled ? '0.5' : '1';
41
41
  }, semantic.border.focus, semantic.border.focusOffset);
@@ -34,6 +34,6 @@ export interface TransactionListItemProps {
34
34
  * status, and optional metadata (category, receipt, notes). Minimum height 72px
35
35
  * with interactive states for clickable items.
36
36
  *
37
- * Composes: Avatar, Badge, MoneyDisplay, Icon, DateFormatter, Typography, Stack
37
+ * Composes: Avatar, CategoryLabel, StatusLabel, MoneyDisplay, Icon, DateFormatter, Typography, Stack
38
38
  */
39
39
  export declare const TransactionListItem: React.FC<TransactionListItemProps>;
@@ -34,6 +34,6 @@ export interface TransactionListItemProps {
34
34
  * status, and optional metadata (category, receipt, notes). Minimum height 72px
35
35
  * with interactive states for clickable items.
36
36
  *
37
- * Composes: Avatar, Badge, MoneyDisplay, Icon, DateFormatter, Typography, Stack
37
+ * Composes: Avatar, CategoryLabel, StatusLabel, MoneyDisplay, Icon, DateFormatter, Typography, Stack
38
38
  */
39
39
  export declare const TransactionListItem: React.FC<TransactionListItemProps>;
@@ -4,7 +4,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import styled$module from 'styled-components';
5
5
  const styled = styled$module.default || styled$module;
6
6
  import { Avatar } from '../../atoms/Avatar/Avatar.mjs';
7
- import { Badge } from '../../atoms/Badge/Badge.mjs';
7
+ import { StatusLabel } from '../../atoms/StatusLabel/StatusLabel.mjs';
8
8
  import { CategoryLabel } from '../../atoms/CategoryLabel/CategoryLabel.mjs';
9
9
  import { MoneyDisplay } from '../../atoms/MoneyDisplay/MoneyDisplay.mjs';
10
10
  import { Icon } from '../../atoms/Icon/Icon.mjs';
@@ -56,28 +56,30 @@ var StyledTruncatedText = /*#__PURE__*/styled.span.withConfig({
56
56
  ])));
57
57
  // Map categories to CategoryLabel configurations
58
58
  var categoryConfig = {
59
+ // Display colours carry no meaning (decision 0043); five coloured categories share four colours,
60
+ // so the icon and label tell dining and bills apart
59
61
  shopping: {
60
- color: 'purple',
62
+ color: 'magenta',
61
63
  icon: 'paper',
62
64
  label: 'Shopping'
63
65
  },
64
66
  dining: {
65
- color: 'orange',
67
+ color: 'rose',
66
68
  icon: 'paper',
67
69
  label: 'Dining'
68
70
  },
69
71
  transport: {
70
- color: 'blue',
72
+ color: 'periwinkle',
71
73
  icon: 'paper',
72
74
  label: 'Transport'
73
75
  },
74
76
  entertainment: {
75
- color: 'pink',
77
+ color: 'olive',
76
78
  icon: 'star',
77
79
  label: 'Entertainment'
78
80
  },
79
81
  bills: {
80
- color: 'red',
82
+ color: 'rose',
81
83
  icon: 'paper',
82
84
  label: 'Bills'
83
85
  },
@@ -87,12 +89,6 @@ var categoryConfig = {
87
89
  label: 'Other'
88
90
  }
89
91
  };
90
- // Map status to badge variant
91
- var statusToBadgeVariant = {
92
- completed: 'success',
93
- pending: 'warning',
94
- failed: 'error'
95
- };
96
92
  /**
97
93
  * TransactionListItem component
98
94
  *
@@ -100,7 +96,7 @@ var statusToBadgeVariant = {
100
96
  * status, and optional metadata (category, receipt, notes). Minimum height 72px
101
97
  * with interactive states for clickable items.
102
98
  *
103
- * Composes: Avatar, Badge, MoneyDisplay, Icon, DateFormatter, Typography, Stack
99
+ * Composes: Avatar, CategoryLabel, StatusLabel, MoneyDisplay, Icon, DateFormatter, Typography, Stack
104
100
  */
105
101
  var TransactionListItem = function TransactionListItem(_a) {
106
102
  var merchant = _a.merchant,
@@ -124,8 +120,6 @@ var TransactionListItem = function TransactionListItem(_a) {
124
120
  var amountVariant = amount > 0 ? 'positive' : amount < 0 ? 'negative' : 'default';
125
121
  // Get category configuration
126
122
  var categoryData = category ? categoryConfig[category] : undefined;
127
- // Get badge variant from status
128
- var badgeVariant = statusToBadgeVariant[status];
129
123
  var handleClick = function handleClick() {
130
124
  if (isClickable && onClick) {
131
125
  onClick();
@@ -143,19 +137,10 @@ var TransactionListItem = function TransactionListItem(_a) {
143
137
  onKeyDown: handleKeyDown,
144
138
  tabIndex: isClickable ? 0 : undefined,
145
139
  role: isClickable ? 'button' : undefined,
146
- "aria-label": isClickable ? "".concat(merchant, " transaction, ").concat(amount < 0 ? 'expense' : 'income', " of ").concat(Math.abs(amount)) : undefined,
140
+ "aria-label": isClickable ? "".concat(merchant, " transaction, ").concat(amount < 0 ? 'expense' : 'income', " of ").concat(Math.abs(amount)).concat(status === 'completed' ? '' : ", ".concat(status)) : undefined,
147
141
  "data-testid": dataTestId,
148
142
  children: [jsx(StyledAvatarSection, {
149
- children: status === 'pending' ? jsx(Badge, {
150
- variant: badgeVariant,
151
- dot: true,
152
- "aria-label": "Pending transaction",
153
- children: jsx(Avatar, {
154
- name: merchant,
155
- picture: merchantLogo,
156
- size: "md"
157
- })
158
- }) : jsx(Avatar, {
143
+ children: jsx(Avatar, {
159
144
  name: merchant,
160
145
  picture: merchantLogo,
161
146
  size: "md"
@@ -175,11 +160,10 @@ var TransactionListItem = function TransactionListItem(_a) {
175
160
  variant: "minimal",
176
161
  "aria-label": "Category: ".concat(categoryData.label),
177
162
  children: categoryData.label
178
- }), status === 'failed' && jsx(Badge, {
179
- variant: "error",
180
- dot: true,
181
- "aria-label": "Failed transaction",
182
- children: jsx("span", {})
163
+ }), status !== 'completed' && jsx(StatusLabel, {
164
+ status: status,
165
+ size: "small",
166
+ liveRegion: false
183
167
  })]
184
168
  }), jsx(MoneyDisplay, {
185
169
  amount: amount,