@transferwise/components 0.0.0-experimental-4d90243 → 0.0.0-experimental-a308934

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 (115) hide show
  1. package/build/field/Field.js +5 -4
  2. package/build/field/Field.js.map +1 -1
  3. package/build/field/Field.mjs +5 -4
  4. package/build/field/Field.mjs.map +1 -1
  5. package/build/i18n/en.json +2 -0
  6. package/build/i18n/en.json.js +2 -0
  7. package/build/i18n/en.json.js.map +1 -1
  8. package/build/i18n/en.json.mjs +2 -0
  9. package/build/i18n/en.json.mjs.map +1 -1
  10. package/build/index.js +2 -0
  11. package/build/index.js.map +1 -1
  12. package/build/index.mjs +1 -0
  13. package/build/index.mjs.map +1 -1
  14. package/build/listItem/Prompt/ListItemPrompt.js +5 -4
  15. package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
  16. package/build/listItem/Prompt/ListItemPrompt.mjs +5 -4
  17. package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
  18. package/build/main.css +85 -29
  19. package/build/moneyInput/MoneyInput.js +12 -28
  20. package/build/moneyInput/MoneyInput.js.map +1 -1
  21. package/build/moneyInput/MoneyInput.mjs +14 -30
  22. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  23. package/build/moneyInput/currencyFormatting.js +2 -8
  24. package/build/moneyInput/currencyFormatting.js.map +1 -1
  25. package/build/moneyInput/currencyFormatting.mjs +4 -5
  26. package/build/moneyInput/currencyFormatting.mjs.map +1 -1
  27. package/build/prompt/ActionPrompt/ActionPrompt.js +8 -40
  28. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  29. package/build/prompt/ActionPrompt/ActionPrompt.mjs +8 -40
  30. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  31. package/build/prompt/CriticalBanner/CriticalBanner.js +145 -0
  32. package/build/prompt/CriticalBanner/CriticalBanner.js.map +1 -0
  33. package/build/prompt/CriticalBanner/CriticalBanner.mjs +143 -0
  34. package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +1 -0
  35. package/build/prompt/CriticalBanner/helpers.js +29 -0
  36. package/build/prompt/CriticalBanner/helpers.js.map +1 -0
  37. package/build/prompt/CriticalBanner/helpers.mjs +26 -0
  38. package/build/prompt/CriticalBanner/helpers.mjs.map +1 -0
  39. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +2 -0
  40. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
  41. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +2 -0
  42. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
  43. package/build/prompt/common/Expander/Expander.js +47 -0
  44. package/build/prompt/common/Expander/Expander.js.map +1 -0
  45. package/build/prompt/common/Expander/Expander.messages.js +17 -0
  46. package/build/prompt/common/Expander/Expander.messages.js.map +1 -0
  47. package/build/prompt/common/Expander/Expander.messages.mjs +13 -0
  48. package/build/prompt/common/Expander/Expander.messages.mjs.map +1 -0
  49. package/build/prompt/common/Expander/Expander.mjs +44 -0
  50. package/build/prompt/common/Expander/Expander.mjs.map +1 -0
  51. package/build/prompt/helpers/promptMedia.js +52 -0
  52. package/build/prompt/helpers/promptMedia.js.map +1 -0
  53. package/build/prompt/helpers/promptMedia.mjs +50 -0
  54. package/build/prompt/helpers/promptMedia.mjs.map +1 -0
  55. package/build/styles/main.css +85 -29
  56. package/build/styles/prompt/CriticalBanner/CriticalBanner.css +39 -0
  57. package/build/styles/prompt/common/Expander/Expander.css +8 -0
  58. package/build/typeahead/Typeahead.js +5 -4
  59. package/build/typeahead/Typeahead.js.map +1 -1
  60. package/build/typeahead/Typeahead.mjs +5 -4
  61. package/build/typeahead/Typeahead.mjs.map +1 -1
  62. package/build/types/index.d.ts +2 -2
  63. package/build/types/index.d.ts.map +1 -1
  64. package/build/types/moneyInput/MoneyInput.d.ts +0 -6
  65. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  66. package/build/types/moneyInput/currencyFormatting.d.ts +3 -4
  67. package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
  68. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +2 -11
  69. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  70. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +43 -0
  71. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +1 -0
  72. package/build/types/prompt/CriticalBanner/helpers.d.ts +18 -0
  73. package/build/types/prompt/CriticalBanner/helpers.d.ts.map +1 -0
  74. package/build/types/prompt/CriticalBanner/index.d.ts +3 -0
  75. package/build/types/prompt/CriticalBanner/index.d.ts.map +1 -0
  76. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +8 -3
  77. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  78. package/build/types/prompt/common/Expander/Expander.d.ts +20 -0
  79. package/build/types/prompt/common/Expander/Expander.d.ts.map +1 -0
  80. package/build/types/prompt/common/Expander/Expander.messages.d.ts +14 -0
  81. package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +1 -0
  82. package/build/types/prompt/helpers/promptMedia.d.ts +22 -0
  83. package/build/types/prompt/helpers/promptMedia.d.ts.map +1 -0
  84. package/build/types/prompt/index.d.ts +2 -0
  85. package/build/types/prompt/index.d.ts.map +1 -1
  86. package/build/types/test-utils/index.d.ts +4 -0
  87. package/build/types/test-utils/index.d.ts.map +1 -1
  88. package/package.json +3 -3
  89. package/src/i18n/en.json +2 -0
  90. package/src/index.ts +2 -2
  91. package/src/main.css +85 -29
  92. package/src/main.less +3 -1
  93. package/src/moneyInput/MoneyInput.story.tsx +1 -10
  94. package/src/moneyInput/MoneyInput.test.story.tsx +1 -141
  95. package/src/moneyInput/MoneyInput.test.tsx +0 -45
  96. package/src/moneyInput/MoneyInput.tsx +3 -27
  97. package/src/moneyInput/currencyFormatting.ts +5 -11
  98. package/src/prompt/ActionPrompt/ActionPrompt.tsx +9 -62
  99. package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +131 -0
  100. package/src/prompt/CriticalBanner/CriticalBanner.css +39 -0
  101. package/src/prompt/CriticalBanner/CriticalBanner.less +45 -0
  102. package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +476 -0
  103. package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +67 -0
  104. package/src/prompt/CriticalBanner/CriticalBanner.tsx +188 -0
  105. package/src/prompt/CriticalBanner/helpers.ts +39 -0
  106. package/src/prompt/CriticalBanner/index.ts +2 -0
  107. package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +9 -2
  108. package/src/prompt/common/Expander/Expander.css +8 -0
  109. package/src/prompt/common/Expander/Expander.less +9 -0
  110. package/src/prompt/common/Expander/Expander.messages.ts +14 -0
  111. package/src/prompt/common/Expander/Expander.test.tsx +167 -0
  112. package/src/prompt/common/Expander/Expander.tsx +83 -0
  113. package/src/prompt/helpers/promptMedia.tsx +79 -0
  114. package/src/prompt/index.ts +4 -0
  115. package/src/sentimentSurface/SentimentSurface.story.tsx +43 -17
@@ -202,18 +202,26 @@ const TokenSwatch = ({ token }: { token: string }) => (
202
202
  export const EmphasisLevels: Story = {
203
203
  render: (args) => (
204
204
  <>
205
- <SentimentSurface {...args} sentiment="negative" emphasis="base">
206
- <div className="p-a-2">Negative - Base emphasis</div>
207
- </SentimentSurface>
208
- <SentimentSurface {...args} sentiment="negative" emphasis="elevated">
209
- <div className="p-a-2">Negative - Elevated emphasis</div>
210
- </SentimentSurface>
211
- <SentimentSurface {...args} sentiment="success" emphasis="base">
212
- <div className="p-a-2">Success - Base emphasis</div>
213
- </SentimentSurface>
214
- <SentimentSurface {...args} sentiment="success" emphasis="elevated">
215
- <div className="p-a-2">Success - Elevated emphasis</div>
216
- </SentimentSurface>
205
+ {sentiments.map((sentiment) => (
206
+ <div key={sentiment}>
207
+ <SentimentSurface
208
+ key={`${sentiment}-base`}
209
+ {...args}
210
+ sentiment={sentiment}
211
+ emphasis="base"
212
+ >
213
+ <div className="p-a-2 text-capitalize">{sentiment} - Base emphasis</div>
214
+ </SentimentSurface>
215
+ <SentimentSurface
216
+ key={`${sentiment}-elevated`}
217
+ {...args}
218
+ sentiment={sentiment}
219
+ emphasis="elevated"
220
+ >
221
+ <div className="p-a-2 text-capitalize">{sentiment} - Elevated emphasis</div>
222
+ </SentimentSurface>
223
+ </div>
224
+ ))}
217
225
  </>
218
226
  ),
219
227
  parameters: {
@@ -369,8 +377,8 @@ export const SentimentAwareComponents: Story = {
369
377
  {STATUS_NEGATIVE}
370
378
  </div>
371
379
 
372
- <Header level="group" title="Success sentiment surface" />
373
- <SentimentSurface sentiment="success">
380
+ <Header level="group" title="Success sentiment surface - Base emphasis" />
381
+ <SentimentSurface sentiment="success" emphasis="base">
374
382
  <div className="p-a-2 m-b-2 sentimentAwareComponent">
375
383
  {BODY}
376
384
  {AVATAR_SUCCESS}
@@ -378,8 +386,26 @@ export const SentimentAwareComponents: Story = {
378
386
  </div>
379
387
  </SentimentSurface>
380
388
 
381
- <Header level="group" title="Negative sentiment surface" />
382
- <SentimentSurface sentiment="negative">
389
+ <Header level="group" title="Success sentiment surface - Elevated emphasis" />
390
+ <SentimentSurface sentiment="success" emphasis="elevated">
391
+ <div className="p-a-2 m-b-2 sentimentAwareComponent">
392
+ {BODY}
393
+ {AVATAR_SUCCESS}
394
+ {STATUS_SUCCESS}
395
+ </div>
396
+ </SentimentSurface>
397
+
398
+ <Header level="group" title="Negative sentiment surface - Base emphasis" />
399
+ <SentimentSurface sentiment="negative" emphasis="base">
400
+ <div className="p-a-2 m-b-2 sentimentAwareComponent">
401
+ {BODY}
402
+ {AVATAR_NEGATIVE}
403
+ {STATUS_NEGATIVE}
404
+ </div>
405
+ </SentimentSurface>
406
+
407
+ <Header level="group" title="Negative sentiment surface - Elevated emphasis" />
408
+ <SentimentSurface sentiment="negative" emphasis="elevated">
383
409
  <div className="p-a-2 m-b-2 sentimentAwareComponent">
384
410
  {BODY}
385
411
  {AVATAR_NEGATIVE}
@@ -427,7 +453,7 @@ function CustomCard({ children, className }: { className?: string; children: Rea
427
453
 
428
454
  export const CustomComponents: Story = {
429
455
  tags: ['!autodocs', '!dev'],
430
- render: (args) => (
456
+ render: () => (
431
457
  <>
432
458
  <style>{`
433
459
  .custom-card {