@transferwise/components 0.0.0-experimental-c7da7db → 0.0.0-experimental-b03ca75

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 (434) hide show
  1. package/build/accordion/AccordionItem/AccordionItem.js +0 -1
  2. package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
  3. package/build/accordion/AccordionItem/AccordionItem.mjs +0 -1
  4. package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  5. package/build/actionButton/ActionButton.js +0 -1
  6. package/build/actionButton/ActionButton.js.map +1 -1
  7. package/build/actionButton/ActionButton.mjs +0 -1
  8. package/build/actionButton/ActionButton.mjs.map +1 -1
  9. package/build/actionOption/ActionOption.js +0 -1
  10. package/build/actionOption/ActionOption.js.map +1 -1
  11. package/build/actionOption/ActionOption.mjs +0 -1
  12. package/build/actionOption/ActionOption.mjs.map +1 -1
  13. package/build/alert/Alert.js +0 -1
  14. package/build/alert/Alert.js.map +1 -1
  15. package/build/alert/Alert.mjs +0 -1
  16. package/build/alert/Alert.mjs.map +1 -1
  17. package/build/alert/inlineMarkdown/InlineMarkdown.js +0 -1
  18. package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
  19. package/build/alert/inlineMarkdown/InlineMarkdown.mjs +0 -1
  20. package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
  21. package/build/avatar/Avatar.js +0 -1
  22. package/build/avatar/Avatar.js.map +1 -1
  23. package/build/avatar/Avatar.mjs +0 -1
  24. package/build/avatar/Avatar.mjs.map +1 -1
  25. package/build/avatarView/AvatarView.js +0 -1
  26. package/build/avatarView/AvatarView.js.map +1 -1
  27. package/build/avatarView/AvatarView.mjs +0 -1
  28. package/build/avatarView/AvatarView.mjs.map +1 -1
  29. package/build/avatarWrapper/AvatarWrapper.js +0 -1
  30. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  31. package/build/avatarWrapper/AvatarWrapper.mjs +0 -1
  32. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  33. package/build/badge/Badge.js +0 -1
  34. package/build/badge/Badge.js.map +1 -1
  35. package/build/badge/Badge.mjs +0 -1
  36. package/build/badge/Badge.mjs.map +1 -1
  37. package/build/button/Button.js +0 -1
  38. package/build/button/Button.js.map +1 -1
  39. package/build/button/Button.mjs +0 -1
  40. package/build/button/Button.mjs.map +1 -1
  41. package/build/button/LegacyButton.js +0 -1
  42. package/build/button/LegacyButton.js.map +1 -1
  43. package/build/button/LegacyButton.mjs +0 -1
  44. package/build/button/LegacyButton.mjs.map +1 -1
  45. package/build/button/classMap.js +0 -1
  46. package/build/button/classMap.js.map +1 -1
  47. package/build/button/classMap.mjs +0 -1
  48. package/build/button/classMap.mjs.map +1 -1
  49. package/build/button/legacyUtils/legacyUtils.js +0 -1
  50. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  51. package/build/button/legacyUtils/legacyUtils.mjs +0 -1
  52. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  53. package/build/card/Card.js +0 -1
  54. package/build/card/Card.js.map +1 -1
  55. package/build/card/Card.mjs +0 -1
  56. package/build/card/Card.mjs.map +1 -1
  57. package/build/checkbox/Checkbox.js +0 -1
  58. package/build/checkbox/Checkbox.js.map +1 -1
  59. package/build/checkbox/Checkbox.mjs +0 -1
  60. package/build/checkbox/Checkbox.mjs.map +1 -1
  61. package/build/chevron/Chevron.js +0 -1
  62. package/build/chevron/Chevron.js.map +1 -1
  63. package/build/chevron/Chevron.mjs +0 -1
  64. package/build/chevron/Chevron.mjs.map +1 -1
  65. package/build/chips/Chip.js +0 -1
  66. package/build/chips/Chip.js.map +1 -1
  67. package/build/chips/Chip.mjs +0 -1
  68. package/build/chips/Chip.mjs.map +1 -1
  69. package/build/circularButton/CircularButton.js +0 -1
  70. package/build/circularButton/CircularButton.js.map +1 -1
  71. package/build/circularButton/CircularButton.mjs +0 -1
  72. package/build/circularButton/CircularButton.mjs.map +1 -1
  73. package/build/common/locale/index.js +4 -9
  74. package/build/common/locale/index.js.map +1 -1
  75. package/build/common/locale/index.mjs +4 -9
  76. package/build/common/locale/index.mjs.map +1 -1
  77. package/build/common/panel/Panel.js +56 -41
  78. package/build/common/panel/Panel.js.map +1 -1
  79. package/build/common/panel/Panel.mjs +61 -46
  80. package/build/common/panel/Panel.mjs.map +1 -1
  81. package/build/common/responsivePanel/ResponsivePanel.js +0 -1
  82. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  83. package/build/common/responsivePanel/ResponsivePanel.mjs +0 -1
  84. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  85. package/build/criticalBanner/CriticalCommsBanner.js +0 -1
  86. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  87. package/build/criticalBanner/CriticalCommsBanner.mjs +0 -1
  88. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  89. package/build/dateInput/DateInput.js +1 -1
  90. package/build/dateInput/DateInput.mjs +1 -1
  91. package/build/dateLookup/DateLookup.js +1 -1
  92. package/build/dateLookup/DateLookup.mjs +1 -1
  93. package/build/dateLookup/dateHeader/DateHeader.js +0 -1
  94. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  95. package/build/dateLookup/dateHeader/DateHeader.mjs +0 -1
  96. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  97. package/build/decision/Decision.js +0 -1
  98. package/build/decision/Decision.js.map +1 -1
  99. package/build/decision/Decision.mjs +0 -1
  100. package/build/decision/Decision.mjs.map +1 -1
  101. package/build/definitionList/DefinitionList.js +0 -1
  102. package/build/definitionList/DefinitionList.js.map +1 -1
  103. package/build/definitionList/DefinitionList.mjs +0 -1
  104. package/build/definitionList/DefinitionList.mjs.map +1 -1
  105. package/build/dimmer/Dimmer.js +0 -1
  106. package/build/dimmer/Dimmer.js.map +1 -1
  107. package/build/dimmer/Dimmer.mjs +0 -1
  108. package/build/dimmer/Dimmer.mjs.map +1 -1
  109. package/build/display/Display.js +0 -1
  110. package/build/display/Display.js.map +1 -1
  111. package/build/display/Display.mjs +0 -1
  112. package/build/display/Display.mjs.map +1 -1
  113. package/build/drawer/Drawer.js +0 -1
  114. package/build/drawer/Drawer.js.map +1 -1
  115. package/build/drawer/Drawer.mjs +0 -1
  116. package/build/drawer/Drawer.mjs.map +1 -1
  117. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +3 -4
  118. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
  119. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +3 -4
  120. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
  121. package/build/field/Field.js +5 -5
  122. package/build/field/Field.mjs +5 -5
  123. package/build/flowNavigation/FlowNavigation.js +0 -1
  124. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  125. package/build/flowNavigation/FlowNavigation.mjs +0 -1
  126. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  127. package/build/header/Header.js +0 -1
  128. package/build/header/Header.js.map +1 -1
  129. package/build/header/Header.mjs +0 -1
  130. package/build/header/Header.mjs.map +1 -1
  131. package/build/i18n/en.json +2 -0
  132. package/build/i18n/en.json.js +2 -0
  133. package/build/i18n/en.json.js.map +1 -1
  134. package/build/i18n/en.json.mjs +2 -0
  135. package/build/i18n/en.json.mjs.map +1 -1
  136. package/build/index.js +2 -0
  137. package/build/index.js.map +1 -1
  138. package/build/index.mjs +1 -0
  139. package/build/index.mjs.map +1 -1
  140. package/build/info/Info.js +0 -1
  141. package/build/info/Info.js.map +1 -1
  142. package/build/info/Info.mjs +0 -1
  143. package/build/info/Info.mjs.map +1 -1
  144. package/build/inlineAlert/InlineAlert.js +0 -1
  145. package/build/inlineAlert/InlineAlert.js.map +1 -1
  146. package/build/inlineAlert/InlineAlert.mjs +0 -1
  147. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  148. package/build/inputs/SearchInput.js +0 -1
  149. package/build/inputs/SearchInput.js.map +1 -1
  150. package/build/inputs/SearchInput.mjs +0 -1
  151. package/build/inputs/SearchInput.mjs.map +1 -1
  152. package/build/instructionsList/InstructionsList.js +0 -1
  153. package/build/instructionsList/InstructionsList.js.map +1 -1
  154. package/build/instructionsList/InstructionsList.mjs +0 -1
  155. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  156. package/build/link/Link.js +0 -1
  157. package/build/link/Link.js.map +1 -1
  158. package/build/link/Link.mjs +0 -1
  159. package/build/link/Link.mjs.map +1 -1
  160. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +0 -1
  161. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -1
  162. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +0 -1
  163. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -1
  164. package/build/listItem/ListItem.js +0 -1
  165. package/build/listItem/ListItem.js.map +1 -1
  166. package/build/listItem/ListItem.mjs +0 -1
  167. package/build/listItem/ListItem.mjs.map +1 -1
  168. package/build/listItem/Prompt/ListItemPrompt.js +5 -5
  169. package/build/listItem/Prompt/ListItemPrompt.mjs +5 -5
  170. package/build/loader/Loader.js +0 -1
  171. package/build/loader/Loader.js.map +1 -1
  172. package/build/loader/Loader.mjs +0 -1
  173. package/build/loader/Loader.mjs.map +1 -1
  174. package/build/main.css +130 -51
  175. package/build/markdown/Markdown.js +0 -1
  176. package/build/markdown/Markdown.js.map +1 -1
  177. package/build/markdown/Markdown.mjs +0 -1
  178. package/build/markdown/Markdown.mjs.map +1 -1
  179. package/build/modal/Modal.js +0 -1
  180. package/build/modal/Modal.js.map +1 -1
  181. package/build/modal/Modal.mjs +0 -1
  182. package/build/modal/Modal.mjs.map +1 -1
  183. package/build/moneyInput/MoneyInput.js +12 -28
  184. package/build/moneyInput/MoneyInput.js.map +1 -1
  185. package/build/moneyInput/MoneyInput.mjs +14 -30
  186. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  187. package/build/moneyInput/currencyFormatting.js +2 -8
  188. package/build/moneyInput/currencyFormatting.js.map +1 -1
  189. package/build/moneyInput/currencyFormatting.mjs +4 -5
  190. package/build/moneyInput/currencyFormatting.mjs.map +1 -1
  191. package/build/navigationOption/NavigationOption.js +0 -1
  192. package/build/navigationOption/NavigationOption.js.map +1 -1
  193. package/build/navigationOption/NavigationOption.mjs +0 -1
  194. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  195. package/build/nudge/Nudge.js +0 -1
  196. package/build/nudge/Nudge.js.map +1 -1
  197. package/build/nudge/Nudge.mjs +0 -1
  198. package/build/nudge/Nudge.mjs.map +1 -1
  199. package/build/overlayHeader/OverlayHeader.js +0 -1
  200. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  201. package/build/overlayHeader/OverlayHeader.mjs +0 -1
  202. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  203. package/build/phoneNumberInput/PhoneNumberInput.js +0 -1
  204. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  205. package/build/phoneNumberInput/PhoneNumberInput.mjs +0 -1
  206. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  207. package/build/popover/Popover.js +0 -1
  208. package/build/popover/Popover.js.map +1 -1
  209. package/build/popover/Popover.mjs +0 -1
  210. package/build/popover/Popover.mjs.map +1 -1
  211. package/build/processIndicator/ProcessIndicator.js +0 -1
  212. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  213. package/build/processIndicator/ProcessIndicator.mjs +0 -1
  214. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  215. package/build/progressBar/ProgressBar.js +0 -1
  216. package/build/progressBar/ProgressBar.js.map +1 -1
  217. package/build/progressBar/ProgressBar.mjs +0 -1
  218. package/build/progressBar/ProgressBar.mjs.map +1 -1
  219. package/build/promoCard/PromoCard.js +0 -1
  220. package/build/promoCard/PromoCard.js.map +1 -1
  221. package/build/promoCard/PromoCard.mjs +0 -1
  222. package/build/promoCard/PromoCard.mjs.map +1 -1
  223. package/build/promoCard/PromoCardIndicator.js +0 -1
  224. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  225. package/build/promoCard/PromoCardIndicator.mjs +0 -1
  226. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  227. package/build/prompt/ActionPrompt/ActionPrompt.js +8 -41
  228. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  229. package/build/prompt/ActionPrompt/ActionPrompt.mjs +8 -41
  230. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  231. package/build/prompt/CriticalBanner/CriticalBanner.js +148 -0
  232. package/build/prompt/CriticalBanner/CriticalBanner.js.map +1 -0
  233. package/build/prompt/CriticalBanner/CriticalBanner.mjs +146 -0
  234. package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +1 -0
  235. package/build/prompt/CriticalBanner/helpers.js +29 -0
  236. package/build/prompt/CriticalBanner/helpers.js.map +1 -0
  237. package/build/prompt/CriticalBanner/helpers.mjs +26 -0
  238. package/build/prompt/CriticalBanner/helpers.mjs.map +1 -0
  239. package/build/prompt/InfoPrompt/InfoPrompt.js +0 -1
  240. package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
  241. package/build/prompt/InfoPrompt/InfoPrompt.mjs +0 -1
  242. package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
  243. package/build/prompt/InlinePrompt/InlinePrompt.js +0 -1
  244. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
  245. package/build/prompt/InlinePrompt/InlinePrompt.mjs +0 -1
  246. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
  247. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +2 -0
  248. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
  249. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +2 -0
  250. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
  251. package/build/prompt/common/Expander/Expander.js +47 -0
  252. package/build/prompt/common/Expander/Expander.js.map +1 -0
  253. package/build/prompt/common/Expander/Expander.messages.js +17 -0
  254. package/build/prompt/common/Expander/Expander.messages.js.map +1 -0
  255. package/build/prompt/common/Expander/Expander.messages.mjs +13 -0
  256. package/build/prompt/common/Expander/Expander.messages.mjs.map +1 -0
  257. package/build/prompt/common/Expander/Expander.mjs +44 -0
  258. package/build/prompt/common/Expander/Expander.mjs.map +1 -0
  259. package/build/prompt/helpers/promptMedia.js +52 -0
  260. package/build/prompt/helpers/promptMedia.js.map +1 -0
  261. package/build/prompt/helpers/promptMedia.mjs +50 -0
  262. package/build/prompt/helpers/promptMedia.mjs.map +1 -0
  263. package/build/radio/Radio.js +0 -1
  264. package/build/radio/Radio.js.map +1 -1
  265. package/build/radio/Radio.mjs +0 -1
  266. package/build/radio/Radio.mjs.map +1 -1
  267. package/build/segmentedControl/SegmentedControl.js +0 -1
  268. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  269. package/build/segmentedControl/SegmentedControl.mjs +0 -1
  270. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  271. package/build/select/Select.js +0 -1
  272. package/build/select/Select.js.map +1 -1
  273. package/build/select/Select.mjs +0 -1
  274. package/build/select/Select.mjs.map +1 -1
  275. package/build/select/option/Option.js +0 -1
  276. package/build/select/option/Option.js.map +1 -1
  277. package/build/select/option/Option.mjs +0 -1
  278. package/build/select/option/Option.mjs.map +1 -1
  279. package/build/statusIcon/StatusIcon.js +0 -1
  280. package/build/statusIcon/StatusIcon.js.map +1 -1
  281. package/build/statusIcon/StatusIcon.mjs +0 -1
  282. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  283. package/build/stepper/Stepper.js +0 -1
  284. package/build/stepper/Stepper.js.map +1 -1
  285. package/build/stepper/Stepper.mjs +0 -1
  286. package/build/stepper/Stepper.mjs.map +1 -1
  287. package/build/sticky/Sticky.js +0 -1
  288. package/build/sticky/Sticky.js.map +1 -1
  289. package/build/sticky/Sticky.mjs +0 -1
  290. package/build/sticky/Sticky.mjs.map +1 -1
  291. package/build/styles/css/neptune.css +22 -22
  292. package/build/styles/less/neptune-tokens.less +4 -4
  293. package/build/styles/main.css +130 -51
  294. package/build/styles/prompt/CriticalBanner/CriticalBanner.css +59 -0
  295. package/build/styles/prompt/common/Expander/Expander.css +8 -0
  296. package/build/styles/props/neptune-tokens.css +2 -2
  297. package/build/styles/styles/less/neptune.css +22 -22
  298. package/build/summary/Summary.js +0 -1
  299. package/build/summary/Summary.js.map +1 -1
  300. package/build/summary/Summary.mjs +0 -1
  301. package/build/summary/Summary.mjs.map +1 -1
  302. package/build/table/Table.js +0 -1
  303. package/build/table/Table.js.map +1 -1
  304. package/build/table/Table.mjs +0 -1
  305. package/build/table/Table.mjs.map +1 -1
  306. package/build/table/TableRow.js +0 -1
  307. package/build/table/TableRow.js.map +1 -1
  308. package/build/table/TableRow.mjs +0 -1
  309. package/build/table/TableRow.mjs.map +1 -1
  310. package/build/table/TableStatusText.js +0 -1
  311. package/build/table/TableStatusText.js.map +1 -1
  312. package/build/table/TableStatusText.mjs +0 -1
  313. package/build/table/TableStatusText.mjs.map +1 -1
  314. package/build/tabs/Tabs.js +0 -1
  315. package/build/tabs/Tabs.js.map +1 -1
  316. package/build/tabs/Tabs.mjs +0 -1
  317. package/build/tabs/Tabs.mjs.map +1 -1
  318. package/build/tile/Tile.js +0 -1
  319. package/build/tile/Tile.js.map +1 -1
  320. package/build/tile/Tile.mjs +0 -1
  321. package/build/tile/Tile.mjs.map +1 -1
  322. package/build/title/Title.js +0 -1
  323. package/build/title/Title.js.map +1 -1
  324. package/build/title/Title.mjs +0 -1
  325. package/build/title/Title.mjs.map +1 -1
  326. package/build/tooltip/Tooltip.js +50 -30
  327. package/build/tooltip/Tooltip.js.map +1 -1
  328. package/build/tooltip/Tooltip.mjs +51 -31
  329. package/build/tooltip/Tooltip.mjs.map +1 -1
  330. package/build/typeahead/Typeahead.js +5 -5
  331. package/build/typeahead/Typeahead.mjs +5 -5
  332. package/build/types/common/locale/index.d.ts +1 -1
  333. package/build/types/common/locale/index.d.ts.map +1 -1
  334. package/build/types/common/panel/Panel.d.ts.map +1 -1
  335. package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
  336. package/build/types/index.d.ts +2 -2
  337. package/build/types/index.d.ts.map +1 -1
  338. package/build/types/moneyInput/MoneyInput.d.ts +0 -6
  339. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  340. package/build/types/moneyInput/currencyFormatting.d.ts +3 -4
  341. package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
  342. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +2 -11
  343. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  344. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +40 -0
  345. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +1 -0
  346. package/build/types/prompt/CriticalBanner/helpers.d.ts +18 -0
  347. package/build/types/prompt/CriticalBanner/helpers.d.ts.map +1 -0
  348. package/build/types/prompt/CriticalBanner/index.d.ts +3 -0
  349. package/build/types/prompt/CriticalBanner/index.d.ts.map +1 -0
  350. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +8 -3
  351. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  352. package/build/types/prompt/common/Expander/Expander.d.ts +20 -0
  353. package/build/types/prompt/common/Expander/Expander.d.ts.map +1 -0
  354. package/build/types/prompt/common/Expander/Expander.messages.d.ts +14 -0
  355. package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +1 -0
  356. package/build/types/prompt/helpers/promptMedia.d.ts +22 -0
  357. package/build/types/prompt/helpers/promptMedia.d.ts.map +1 -0
  358. package/build/types/prompt/index.d.ts +2 -0
  359. package/build/types/prompt/index.d.ts.map +1 -1
  360. package/build/types/test-utils/index.d.ts +4 -0
  361. package/build/types/test-utils/index.d.ts.map +1 -1
  362. package/build/types/tooltip/Tooltip.d.ts.map +1 -1
  363. package/build/upload/Upload.js +0 -1
  364. package/build/upload/Upload.js.map +1 -1
  365. package/build/upload/Upload.mjs +0 -1
  366. package/build/upload/Upload.mjs.map +1 -1
  367. package/build/upload/steps/completeStep/completeStep.js +0 -1
  368. package/build/upload/steps/completeStep/completeStep.js.map +1 -1
  369. package/build/upload/steps/completeStep/completeStep.mjs +0 -1
  370. package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
  371. package/build/upload/steps/processingStep/processingStep.js +0 -1
  372. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  373. package/build/upload/steps/processingStep/processingStep.mjs +0 -1
  374. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  375. package/build/upload/steps/uploadImageStep/uploadImageStep.js +0 -1
  376. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  377. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +0 -1
  378. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  379. package/build/uploadInput/UploadInput.js +0 -1
  380. package/build/uploadInput/UploadInput.js.map +1 -1
  381. package/build/uploadInput/UploadInput.mjs +0 -1
  382. package/build/uploadInput/UploadInput.mjs.map +1 -1
  383. package/build/uploadInput/uploadButton/UploadButton.js +0 -1
  384. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  385. package/build/uploadInput/uploadButton/UploadButton.mjs +0 -1
  386. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  387. package/build/uploadInput/uploadButton/defaults.js +0 -1
  388. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  389. package/build/uploadInput/uploadButton/defaults.mjs +0 -1
  390. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  391. package/build/uploadInput/uploadItem/UploadItem.js +0 -1
  392. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  393. package/build/uploadInput/uploadItem/UploadItem.mjs +0 -1
  394. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  395. package/build/withDisplayFormat/WithDisplayFormat.js +0 -1
  396. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  397. package/build/withDisplayFormat/WithDisplayFormat.mjs +0 -1
  398. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  399. package/package.json +16 -14
  400. package/src/common/locale/index.test.ts +4 -13
  401. package/src/common/locale/index.ts +3 -9
  402. package/src/common/panel/Panel.tsx +50 -42
  403. package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +0 -18
  404. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.test.tsx +1 -119
  405. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +3 -4
  406. package/src/i18n/en.json +2 -0
  407. package/src/index.ts +2 -2
  408. package/src/main.css +130 -51
  409. package/src/main.less +3 -1
  410. package/src/moneyInput/MoneyInput.story.tsx +1 -10
  411. package/src/moneyInput/MoneyInput.test.story.tsx +1 -141
  412. package/src/moneyInput/MoneyInput.test.tsx +0 -45
  413. package/src/moneyInput/MoneyInput.tsx +3 -27
  414. package/src/moneyInput/currencyFormatting.ts +5 -11
  415. package/src/prompt/ActionPrompt/ActionPrompt.tsx +9 -62
  416. package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +131 -0
  417. package/src/prompt/CriticalBanner/CriticalBanner.css +59 -0
  418. package/src/prompt/CriticalBanner/CriticalBanner.less +64 -0
  419. package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +645 -0
  420. package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +304 -0
  421. package/src/prompt/CriticalBanner/CriticalBanner.tsx +194 -0
  422. package/src/prompt/CriticalBanner/helpers.ts +39 -0
  423. package/src/prompt/CriticalBanner/index.ts +2 -0
  424. package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +9 -2
  425. package/src/prompt/common/Expander/Expander.css +8 -0
  426. package/src/prompt/common/Expander/Expander.less +9 -0
  427. package/src/prompt/common/Expander/Expander.messages.ts +14 -0
  428. package/src/prompt/common/Expander/Expander.test.tsx +167 -0
  429. package/src/prompt/common/Expander/Expander.tsx +83 -0
  430. package/src/prompt/helpers/promptMedia.tsx +79 -0
  431. package/src/prompt/index.ts +4 -0
  432. package/src/sentimentSurface/SentimentSurface.story.tsx +43 -17
  433. package/src/styles/less/neptune.css +22 -22
  434. package/src/tooltip/Tooltip.tsx +45 -26
@@ -0,0 +1,304 @@
1
+ import { useState } from 'react';
2
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
3
+ import { expect, fn, userEvent, within } from 'storybook/test';
4
+ import { Bank } from '@transferwise/icons';
5
+ import Button from '../../button';
6
+ import { withVariantConfig } from '../../../.storybook/helpers';
7
+ import { CriticalBanner } from './CriticalBanner';
8
+
9
+ const meta: Meta<typeof CriticalBanner> = {
10
+ component: CriticalBanner,
11
+ title: 'Prompts/CriticalBanner/Tests',
12
+ tags: ['!autodocs', '!manifest'],
13
+ };
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof CriticalBanner>;
17
+
18
+ const wait = async (ms: number) =>
19
+ new Promise<void>((resolve) => {
20
+ setTimeout(resolve, ms);
21
+ });
22
+
23
+ const longDescription =
24
+ 'We have detected unusual activity on your account that does not match your typical usage patterns. To protect your funds and personal information, we have temporarily restricted access. Please verify your identity to restore full access to your account.';
25
+
26
+ function AllVariants() {
27
+ const [states, setStates] = useState({
28
+ negativeExpanded: true,
29
+ negativeCollapsed: false,
30
+ warningExpanded: true,
31
+ warningCollapsed: false,
32
+ neutralExpanded: true,
33
+ successExpanded: true,
34
+ noTitle: false,
35
+ withMedia: true,
36
+ withBothActions: true,
37
+ });
38
+
39
+ const toggle = (key: keyof typeof states) =>
40
+ setStates((prev) => ({ ...prev, [key]: !prev[key] }));
41
+
42
+ return (
43
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem', width: '100%' }}>
44
+ <CriticalBanner
45
+ sentiment="negative"
46
+ title="Negative — expanded"
47
+ description="Your account has been temporarily blocked due to unusual activity."
48
+ action={{ label: 'Verify now', onClick: fn() }}
49
+ actionSecondary={{ label: 'Learn more', onClick: fn() }}
50
+ expanded={states.negativeExpanded}
51
+ onToggle={() => toggle('negativeExpanded')}
52
+ />
53
+ <CriticalBanner
54
+ sentiment="negative"
55
+ title="Negative — collapsed"
56
+ description="Your account has been temporarily blocked."
57
+ action={{ label: 'Verify now', onClick: fn() }}
58
+ expanded={states.negativeCollapsed}
59
+ onToggle={() => toggle('negativeCollapsed')}
60
+ />
61
+ <CriticalBanner
62
+ sentiment="warning"
63
+ title="Warning — expanded"
64
+ description="Your account is at risk of being blocked within 7 days."
65
+ action={{ label: 'Take action', onClick: fn() }}
66
+ expanded={states.warningExpanded}
67
+ onToggle={() => toggle('warningExpanded')}
68
+ />
69
+ <CriticalBanner
70
+ sentiment="warning"
71
+ title="Warning — collapsed"
72
+ description="Your account is at risk."
73
+ action={{ label: 'Take action', onClick: fn() }}
74
+ expanded={states.warningCollapsed}
75
+ onToggle={() => toggle('warningCollapsed')}
76
+ />
77
+ <CriticalBanner
78
+ sentiment="neutral"
79
+ title="Neutral — expanded"
80
+ description="Your account needs attention."
81
+ action={{ label: 'Review', onClick: fn() }}
82
+ expanded={states.neutralExpanded}
83
+ onToggle={() => toggle('neutralExpanded')}
84
+ />
85
+ <CriticalBanner
86
+ sentiment="success"
87
+ title="Success — expanded"
88
+ description="Your account has been restored."
89
+ action={{ label: 'Continue', onClick: fn() }}
90
+ expanded={states.successExpanded}
91
+ onToggle={() => toggle('successExpanded')}
92
+ />
93
+ <CriticalBanner
94
+ sentiment="negative"
95
+ description={longDescription}
96
+ action={{ label: 'Verify now', onClick: fn() }}
97
+ expanded={states.noTitle}
98
+ onToggle={() => toggle('noTitle')}
99
+ />
100
+ <CriticalBanner
101
+ sentiment="warning"
102
+ title="With custom media"
103
+ description="Re-link your bank account to continue receiving transfers."
104
+ media={{ avatar: { asset: <Bank title="Bank account" /> } }}
105
+ action={{ label: 'Connect bank', onClick: fn() }}
106
+ expanded={states.withMedia}
107
+ onToggle={() => toggle('withMedia')}
108
+ />
109
+ <CriticalBanner
110
+ sentiment="negative"
111
+ title="Both actions"
112
+ description="We've blocked your account due to unusual activity."
113
+ action={{ label: 'Verify now', onClick: fn() }}
114
+ actionSecondary={{ label: 'Contact support', onClick: fn() }}
115
+ expanded={states.withBothActions}
116
+ onToggle={() => toggle('withBothActions')}
117
+ />
118
+ </div>
119
+ );
120
+ }
121
+
122
+ /**
123
+ * All four sentiments in both expanded and collapsed states, with and without
124
+ * title, media variants, and action combinations. Used for Chromatic visual
125
+ * regression across default, dark, bright-green, and forest-green themes.
126
+ */
127
+ export const Variants: Story = {
128
+ render: () => <AllVariants />,
129
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green']),
130
+ };
131
+
132
+ /** Mobile viewport regression test with all variants. */
133
+ export const MobileVariants: Story = {
134
+ render: () => <AllVariants />,
135
+ ...withVariantConfig(['mobile']),
136
+ };
137
+
138
+ /**
139
+ * Tests keyboard navigation and interaction:
140
+ * - Tab focuses the first chevron toggle button
141
+ * - Enter toggles expanded/collapsed state
142
+ * - Tab moves focus to the action button (when expanded)
143
+ * - Tab moves to the next banner's toggle
144
+ */
145
+ export const KeyboardInteraction: Story = {
146
+ parameters: {
147
+ viewport: {
148
+ options: {
149
+ narrow: {
150
+ name: 'Narrow',
151
+ styles: { width: '350px', height: '600px' },
152
+ type: 'mobile',
153
+ },
154
+ },
155
+ },
156
+ },
157
+ globals: {
158
+ viewport: 'narrow',
159
+ },
160
+ render: function Render() {
161
+ const [expanded1, setExpanded1] = useState(true);
162
+ const [expanded2, setExpanded2] = useState(false);
163
+
164
+ return (
165
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem', width: '100%' }}>
166
+ <CriticalBanner
167
+ sentiment="negative"
168
+ title="First banner"
169
+ description="This banner starts expanded."
170
+ action={{ label: 'Verify now', onClick: fn() }}
171
+ expanded={expanded1}
172
+ onToggle={() => setExpanded1(!expanded1)}
173
+ />
174
+ <CriticalBanner
175
+ sentiment="warning"
176
+ title="Second banner"
177
+ description="This banner starts collapsed."
178
+ action={{ label: 'Take action', onClick: fn() }}
179
+ expanded={expanded2}
180
+ onToggle={() => setExpanded2(!expanded2)}
181
+ />
182
+ </div>
183
+ );
184
+ },
185
+ play: async ({ canvasElement }) => {
186
+ const canvas = within(canvasElement);
187
+
188
+ // Tab to first toggle (Collapse button since first banner is expanded)
189
+ await userEvent.tab();
190
+ await wait(400);
191
+ const collapseBtn = canvas.getByRole('button', { name: /^collapse$/i });
192
+ await expect(collapseBtn).toHaveFocus();
193
+
194
+ // Enter collapses the first banner
195
+ await userEvent.keyboard(' ');
196
+ await wait(400);
197
+
198
+ // After collapsing, the button label changes to "Expand"
199
+ const expandBtns = canvas.getAllByRole('button', { name: /^expand$/i });
200
+ await expect(expandBtns).toHaveLength(2);
201
+
202
+ // Tab to the action button — but since banner is now collapsed, actions are hidden.
203
+ // So tab goes to the next banner's toggle (Expand).
204
+ await userEvent.tab();
205
+ await wait(400);
206
+ await expect(expandBtns[1]).toHaveFocus();
207
+
208
+ // Space expands the second banner
209
+ await userEvent.keyboard(' ');
210
+ await wait(400);
211
+
212
+ // Now the second banner has a Collapse button
213
+ const secondCollapse = canvas.getByRole('button', { name: /^collapse$/i });
214
+ await expect(secondCollapse).toHaveFocus();
215
+
216
+ // Tab to the second banner's action button (now visible)
217
+ await userEvent.tab();
218
+ await wait(400);
219
+ const actionBtn = canvas.getByRole('button', { name: /^take action$/i });
220
+ await expect(actionBtn).toHaveFocus();
221
+ },
222
+ };
223
+
224
+ /**
225
+ * CriticalBanner uses `aria-live="assertive"` to immediately announce content to screen readers.
226
+ * Toggle the banner on/off and expand/collapse to hear how announcements change.
227
+ */
228
+ export const LiveRegionAnnouncements: Story = {
229
+ render: function Render() {
230
+ const [visible, setVisible] = useState(false);
231
+ const [expanded, setExpanded] = useState(false);
232
+
233
+ return (
234
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem', width: '100%' }}>
235
+ <div>
236
+ <Button v2 onClick={() => setVisible(!visible)}>
237
+ {visible ? 'Hide banner' : 'Show banner'}
238
+ </Button>
239
+ </div>
240
+ {visible && (
241
+ <CriticalBanner
242
+ sentiment="negative"
243
+ title="Your account requires verification"
244
+ description="Please verify your identity to continue using all features."
245
+ action={{ label: 'Verify now', onClick: fn() }}
246
+ actionSecondary={{ label: 'Learn more', onClick: fn() }}
247
+ expanded={expanded}
248
+ onToggle={() => setExpanded(!expanded)}
249
+ />
250
+ )}
251
+ </div>
252
+ );
253
+ },
254
+ };
255
+
256
+ /** Right-to-left layout regression test. */
257
+ export const RTL: Story = {
258
+ render: function Render() {
259
+ const [expanded, setExpanded] = useState(true);
260
+ const [collapsed, setCollapsed] = useState(false);
261
+
262
+ return (
263
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem', width: '100%' }}>
264
+ <CriticalBanner
265
+ sentiment="negative"
266
+ title="Your account requires verification"
267
+ description="Please verify your identity to continue using all features."
268
+ action={{ label: 'Verify now', onClick: fn() }}
269
+ actionSecondary={{ label: 'Learn more', onClick: fn() }}
270
+ expanded={expanded}
271
+ onToggle={() => setExpanded(!expanded)}
272
+ />
273
+ <CriticalBanner
274
+ sentiment="warning"
275
+ title="Collapsed state"
276
+ description="This banner is collapsed."
277
+ action={{ label: 'Take action', onClick: fn() }}
278
+ expanded={collapsed}
279
+ onToggle={() => setCollapsed(!collapsed)}
280
+ />
281
+ </div>
282
+ );
283
+ },
284
+ ...withVariantConfig(['rtl']),
285
+ };
286
+
287
+ /** 400% zoom regression test with all variants. */
288
+ export const Zoom400: Story = {
289
+ render: () => <AllVariants />,
290
+ parameters: {
291
+ viewport: {
292
+ options: {
293
+ zoom400: {
294
+ name: '400% Zoom',
295
+ styles: { width: '200px', height: '1000px' },
296
+ type: 'mobile',
297
+ },
298
+ },
299
+ },
300
+ },
301
+ globals: {
302
+ viewport: 'zoom400',
303
+ },
304
+ };
@@ -0,0 +1,194 @@
1
+ import { AriaAttributes, ReactNode, useId } from 'react';
2
+ import { clsx } from 'clsx';
3
+
4
+ import Body from '../../body';
5
+ import Button from '../../button';
6
+ import { Breakpoint, LiveRegion, Typography } from '../../common';
7
+ import { ButtonProps } from '../../button/Button.types';
8
+ import { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';
9
+ import { useScreenSize } from '../../common/hooks/useScreenSize';
10
+
11
+ import { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';
12
+ import { shouldShowWhenExpanded, ExpanderToggle } from '../common/Expander/Expander';
13
+ import { buildAnnouncementString } from './helpers';
14
+
15
+ export type CriticalBannerProps = {
16
+ title?: ReactNode;
17
+ description?: ReactNode;
18
+ media?: PromptMedia;
19
+ action?: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {
20
+ label: ButtonProps['children'];
21
+ };
22
+ actionSecondary?: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {
23
+ label: ButtonProps['children'];
24
+ };
25
+ sentiment?: Exclude<PrimitivePromptProps['sentiment'], 'proposition'>;
26
+ /**
27
+ * Controls whether the description and actions are visible.
28
+ * When collapsed with a title, only the title is shown.
29
+ * When collapsed without a title, the description is trimmed to 2 lines.
30
+ */
31
+ expanded?: boolean;
32
+ /** Called when the user clicks the chevron toggle. */
33
+ onToggle?: () => void;
34
+ /**
35
+ * Overrides the default labelling derived from `title` and `description`.
36
+ *
37
+ * **NB:** When provided, the default `aria-labelledby` / `aria-describedby`
38
+ * attributes are removed — include all necessary context in the label.
39
+ */
40
+ 'aria-label'?: AriaAttributes['aria-label'];
41
+ } & Pick<PrimitivePromptProps, 'id' | 'className' | 'data-testid'>;
42
+
43
+ /**
44
+ * A full-width, non-dismissible banner for critical messages such as account blocks or
45
+ * time-sensitive actions that require immediate user attention.
46
+
47
+ * @see {@link https://wise.design/components/critical-banner Design Spec}
48
+ */
49
+ export const CriticalBanner = ({
50
+ sentiment = 'negative',
51
+ title,
52
+ description,
53
+ media = {},
54
+ action,
55
+ actionSecondary,
56
+ expanded = true,
57
+ onToggle,
58
+ id,
59
+ className,
60
+ 'data-testid': testId,
61
+ 'aria-label': ariaLabel,
62
+ }: CriticalBannerProps) => {
63
+ const isMobile = !useScreenSize(Breakpoint.EXTRA_SMALL);
64
+ const resolvedExpanded = !isMobile || expanded;
65
+ const hasActions = action ?? actionSecondary;
66
+ const mediaId = useId();
67
+ const titleId = useId();
68
+ const descId = useId();
69
+
70
+ const ariaLabelledByIds = [
71
+ media['aria-hidden'] ? undefined : mediaId,
72
+ ariaLabel || !title ? undefined : titleId,
73
+ ]
74
+ .filter(Boolean)
75
+ .join(' ');
76
+
77
+ return (
78
+ <LiveRegion
79
+ aria-live="assertive"
80
+ announceOnChange={buildAnnouncementString({
81
+ title,
82
+ description,
83
+ expanded: resolvedExpanded,
84
+ actionLabel: action?.label,
85
+ actionSecondaryLabel: actionSecondary?.label,
86
+ })}
87
+ >
88
+ <PrimitivePrompt
89
+ id={id}
90
+ sentiment={sentiment}
91
+ emphasis={sentiment === 'neutral' ? 'base' : 'elevated'}
92
+ data-testid={testId}
93
+ className={clsx(
94
+ 'wds-critical-banner',
95
+ {
96
+ 'wds-critical-banner__mobile--collapsed': !resolvedExpanded,
97
+ 'wds-critical-banner--with-two-actions': !!actionSecondary,
98
+ },
99
+ className,
100
+ )}
101
+ media={renderPromptMedia({
102
+ media,
103
+ sentiment,
104
+ mediaId,
105
+ imgClassName: 'wds-critical-banner--media-image',
106
+ })}
107
+ actions={
108
+ shouldShowWhenExpanded({ expanded: resolvedExpanded, hasContent: !!hasActions }) ? (
109
+ <>
110
+ {actionSecondary && (
111
+ // @ts-expect-error onClick type mismatch
112
+ <Button
113
+ v2
114
+ size="md"
115
+ priority="secondary"
116
+ href={actionSecondary.href}
117
+ block={isMobile}
118
+ onClick={actionSecondary?.onClick}
119
+ >
120
+ {actionSecondary.label}
121
+ </Button>
122
+ )}
123
+ {action && (
124
+ // @ts-expect-error onClick type mismatch
125
+ <Button
126
+ v2
127
+ size="md"
128
+ priority="primary"
129
+ href={action.href}
130
+ block={isMobile}
131
+ onClick={action.onClick}
132
+ >
133
+ {action.label}
134
+ </Button>
135
+ )}
136
+ </>
137
+ ) : undefined
138
+ }
139
+ role="region"
140
+ {...(ariaLabel
141
+ ? { 'aria-label': ariaLabel }
142
+ : {
143
+ 'aria-labelledby': ariaLabelledByIds,
144
+ 'aria-describedby': descId,
145
+ })}
146
+ >
147
+ <div
148
+ className={clsx(
149
+ 'd-flex',
150
+ 'flex-column',
151
+ 'justify-content-center',
152
+ 'wds-critical-banner__text-wrapper',
153
+ )}
154
+ >
155
+ {title && (
156
+ <Body
157
+ id={titleId}
158
+ type={Typography.BODY_LARGE_BOLD}
159
+ className={clsx('wds-critical-banner__content', {
160
+ 'wds-critical-banner__title--collapsed': !resolvedExpanded,
161
+ })}
162
+ >
163
+ {title}
164
+ </Body>
165
+ )}
166
+ {shouldShowWhenExpanded({
167
+ expanded: resolvedExpanded,
168
+ hasContent: !!description,
169
+ alwaysShow: !title,
170
+ }) && (
171
+ <Body
172
+ id={descId}
173
+ className={clsx('wds-critical-banner__content', {
174
+ 'wds-critical-banner__description--collapsed': !resolvedExpanded && !title,
175
+ })}
176
+ >
177
+ {description}
178
+ </Body>
179
+ )}
180
+ </div>
181
+ {isMobile && (
182
+ <ExpanderToggle
183
+ expanded={expanded}
184
+ size={24}
185
+ className="wds-critical-banner__toggle"
186
+ onToggle={onToggle}
187
+ />
188
+ )}
189
+ </PrimitivePrompt>
190
+ </LiveRegion>
191
+ );
192
+ };
193
+
194
+ export default CriticalBanner;
@@ -0,0 +1,39 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ /**
4
+ * Helper to extract string from ReactNode for announcements.
5
+ * Complex ReactNodes (JSX elements) return empty string.
6
+ */
7
+ export const getStringValue = (node: ReactNode): string => {
8
+ if (typeof node === 'string' || typeof node === 'number') {
9
+ return String(node);
10
+ }
11
+ return '';
12
+ };
13
+
14
+ /**
15
+ * Builds the announcement string from visible content only.
16
+ * Content visibility depends on expanded state and presence of title.
17
+ */
18
+ export const buildAnnouncementString = ({
19
+ title,
20
+ description,
21
+ expanded,
22
+ actionLabel,
23
+ actionSecondaryLabel,
24
+ }: {
25
+ title?: ReactNode;
26
+ description?: ReactNode;
27
+ expanded: boolean;
28
+ actionLabel?: ReactNode;
29
+ actionSecondaryLabel?: ReactNode;
30
+ }): string => {
31
+ return [
32
+ title ? getStringValue(title) : undefined,
33
+ description && (expanded || !title) ? getStringValue(description) : undefined,
34
+ expanded && actionLabel ? getStringValue(actionLabel) : undefined,
35
+ expanded && actionSecondaryLabel ? getStringValue(actionSecondaryLabel) : undefined,
36
+ ]
37
+ .filter(Boolean)
38
+ .join('|');
39
+ };
@@ -0,0 +1,2 @@
1
+ export type { CriticalBannerProps } from './CriticalBanner';
2
+ export { CriticalBanner } from './CriticalBanner';
@@ -1,6 +1,6 @@
1
1
  import { Cross } from '@transferwise/icons';
2
2
  import { clsx } from 'clsx';
3
- import SentimentSurface, { Sentiment } from '../../sentimentSurface';
3
+ import SentimentSurface, { Emphasis, Sentiment } from '../../sentimentSurface';
4
4
  import IconButton from '../../iconButton';
5
5
  import { useIntl } from 'react-intl';
6
6
  import closeBtnMessages from '../../common/closeButton/CloseButton.messages';
@@ -8,10 +8,15 @@ import { HTMLAttributes, ReactNode } from 'react';
8
8
 
9
9
  export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
10
10
  /**
11
- * The sentiment determines the colour scheme
11
+ * The sentiment determines the colour scheme.
12
12
  * @default success
13
13
  */
14
14
  sentiment?: Sentiment;
15
+ /**
16
+ * The emphasis level affecting background and text contrast.
17
+ * @default 'base
18
+ */
19
+ emphasis?: Emphasis;
15
20
  /**
16
21
  * Media to be displayed on the prompt (icon/image/etc).
17
22
  */
@@ -35,6 +40,7 @@ export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
35
40
  * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */
36
41
  export const PrimitivePrompt = ({
37
42
  sentiment = 'success',
43
+ emphasis = 'base',
38
44
  media,
39
45
  actions,
40
46
  onDismiss,
@@ -47,6 +53,7 @@ export const PrimitivePrompt = ({
47
53
  return (
48
54
  <SentimentSurface
49
55
  sentiment={sentiment}
56
+ emphasis={emphasis}
50
57
  className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}
51
58
  {...restProps}
52
59
  >
@@ -0,0 +1,8 @@
1
+ .wds-expander-toggle {
2
+ align-self: flex-start;
3
+ flex-shrink: 0;
4
+ transition: transform 0.2s ease-in-out;
5
+ }
6
+ .wds-expander-toggle--collapsed {
7
+ transform: rotate(180deg);
8
+ }
@@ -0,0 +1,9 @@
1
+ .wds-expander-toggle {
2
+ align-self: flex-start;
3
+ flex-shrink: 0;
4
+ transition: transform 0.2s ease-in-out;
5
+
6
+ &--collapsed {
7
+ transform: rotate(180deg);
8
+ }
9
+ }
@@ -0,0 +1,14 @@
1
+ import { defineMessages } from 'react-intl';
2
+
3
+ export default defineMessages({
4
+ expandAriaLabel: {
5
+ id: 'neptune.Expander.expandAriaLabel',
6
+ defaultMessage: 'Expand',
7
+ description: 'Expand button for expander',
8
+ },
9
+ collapseAriaLabel: {
10
+ id: 'neptune.Expander.collapseAriaLabel',
11
+ defaultMessage: 'Collapse',
12
+ description: 'Collapse button for expander',
13
+ },
14
+ });