@transferwise/components 46.133.1 → 46.135.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 (369) hide show
  1. package/build/accordion/AccordionItem/AccordionItem.js +1 -0
  2. package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
  3. package/build/accordion/AccordionItem/AccordionItem.mjs +1 -0
  4. package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  5. package/build/actionButton/ActionButton.js +1 -0
  6. package/build/actionButton/ActionButton.js.map +1 -1
  7. package/build/actionButton/ActionButton.mjs +1 -0
  8. package/build/actionButton/ActionButton.mjs.map +1 -1
  9. package/build/actionOption/ActionOption.js +1 -0
  10. package/build/actionOption/ActionOption.js.map +1 -1
  11. package/build/actionOption/ActionOption.mjs +1 -0
  12. package/build/actionOption/ActionOption.mjs.map +1 -1
  13. package/build/alert/Alert.js +1 -0
  14. package/build/alert/Alert.js.map +1 -1
  15. package/build/alert/Alert.mjs +1 -0
  16. package/build/alert/Alert.mjs.map +1 -1
  17. package/build/alert/inlineMarkdown/InlineMarkdown.js +1 -0
  18. package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
  19. package/build/alert/inlineMarkdown/InlineMarkdown.mjs +1 -0
  20. package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
  21. package/build/avatar/Avatar.js +1 -0
  22. package/build/avatar/Avatar.js.map +1 -1
  23. package/build/avatar/Avatar.mjs +1 -0
  24. package/build/avatar/Avatar.mjs.map +1 -1
  25. package/build/avatarView/AvatarView.js +1 -0
  26. package/build/avatarView/AvatarView.js.map +1 -1
  27. package/build/avatarView/AvatarView.mjs +1 -0
  28. package/build/avatarView/AvatarView.mjs.map +1 -1
  29. package/build/avatarWrapper/AvatarWrapper.js +1 -0
  30. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  31. package/build/avatarWrapper/AvatarWrapper.mjs +1 -0
  32. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  33. package/build/badge/Badge.js +1 -0
  34. package/build/badge/Badge.js.map +1 -1
  35. package/build/badge/Badge.mjs +1 -0
  36. package/build/badge/Badge.mjs.map +1 -1
  37. package/build/button/Button.js +1 -0
  38. package/build/button/Button.js.map +1 -1
  39. package/build/button/Button.mjs +1 -0
  40. package/build/button/Button.mjs.map +1 -1
  41. package/build/button/LegacyButton.js +1 -0
  42. package/build/button/LegacyButton.js.map +1 -1
  43. package/build/button/LegacyButton.mjs +1 -0
  44. package/build/button/LegacyButton.mjs.map +1 -1
  45. package/build/button/classMap.js +1 -0
  46. package/build/button/classMap.js.map +1 -1
  47. package/build/button/classMap.mjs +1 -0
  48. package/build/button/classMap.mjs.map +1 -1
  49. package/build/button/legacyUtils/legacyUtils.js +1 -0
  50. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  51. package/build/button/legacyUtils/legacyUtils.mjs +1 -0
  52. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  53. package/build/card/Card.js +1 -0
  54. package/build/card/Card.js.map +1 -1
  55. package/build/card/Card.mjs +1 -0
  56. package/build/card/Card.mjs.map +1 -1
  57. package/build/checkbox/Checkbox.js +1 -0
  58. package/build/checkbox/Checkbox.js.map +1 -1
  59. package/build/checkbox/Checkbox.mjs +1 -0
  60. package/build/checkbox/Checkbox.mjs.map +1 -1
  61. package/build/chevron/Chevron.js +1 -0
  62. package/build/chevron/Chevron.js.map +1 -1
  63. package/build/chevron/Chevron.mjs +1 -0
  64. package/build/chevron/Chevron.mjs.map +1 -1
  65. package/build/chips/Chip.js +1 -0
  66. package/build/chips/Chip.js.map +1 -1
  67. package/build/chips/Chip.mjs +1 -0
  68. package/build/chips/Chip.mjs.map +1 -1
  69. package/build/circularButton/CircularButton.js +1 -0
  70. package/build/circularButton/CircularButton.js.map +1 -1
  71. package/build/circularButton/CircularButton.mjs +1 -0
  72. package/build/circularButton/CircularButton.mjs.map +1 -1
  73. package/build/common/locale/index.js +9 -4
  74. package/build/common/locale/index.js.map +1 -1
  75. package/build/common/locale/index.mjs +9 -4
  76. package/build/common/locale/index.mjs.map +1 -1
  77. package/build/common/panel/Panel.js +1 -0
  78. package/build/common/panel/Panel.js.map +1 -1
  79. package/build/common/panel/Panel.mjs +1 -0
  80. package/build/common/panel/Panel.mjs.map +1 -1
  81. package/build/common/responsivePanel/ResponsivePanel.js +1 -0
  82. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  83. package/build/common/responsivePanel/ResponsivePanel.mjs +1 -0
  84. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  85. package/build/criticalBanner/CriticalCommsBanner.js +1 -0
  86. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  87. package/build/criticalBanner/CriticalCommsBanner.mjs +1 -0
  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 +1 -0
  94. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  95. package/build/dateLookup/dateHeader/DateHeader.mjs +1 -0
  96. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  97. package/build/decision/Decision.js +1 -0
  98. package/build/decision/Decision.js.map +1 -1
  99. package/build/decision/Decision.mjs +1 -0
  100. package/build/decision/Decision.mjs.map +1 -1
  101. package/build/definitionList/DefinitionList.js +1 -0
  102. package/build/definitionList/DefinitionList.js.map +1 -1
  103. package/build/definitionList/DefinitionList.mjs +1 -0
  104. package/build/definitionList/DefinitionList.mjs.map +1 -1
  105. package/build/dimmer/Dimmer.js +1 -0
  106. package/build/dimmer/Dimmer.js.map +1 -1
  107. package/build/dimmer/Dimmer.mjs +1 -0
  108. package/build/dimmer/Dimmer.mjs.map +1 -1
  109. package/build/display/Display.js +1 -0
  110. package/build/display/Display.js.map +1 -1
  111. package/build/display/Display.mjs +1 -0
  112. package/build/display/Display.mjs.map +1 -1
  113. package/build/drawer/Drawer.js +1 -0
  114. package/build/drawer/Drawer.js.map +1 -1
  115. package/build/drawer/Drawer.mjs +1 -0
  116. package/build/drawer/Drawer.mjs.map +1 -1
  117. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +4 -3
  118. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
  119. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +4 -3
  120. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
  121. package/build/field/Field.js +1 -0
  122. package/build/field/Field.js.map +1 -1
  123. package/build/field/Field.mjs +1 -0
  124. package/build/field/Field.mjs.map +1 -1
  125. package/build/flowNavigation/FlowNavigation.js +1 -0
  126. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  127. package/build/flowNavigation/FlowNavigation.mjs +1 -0
  128. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  129. package/build/header/Header.js +1 -0
  130. package/build/header/Header.js.map +1 -1
  131. package/build/header/Header.mjs +1 -0
  132. package/build/header/Header.mjs.map +1 -1
  133. package/build/info/Info.js +1 -0
  134. package/build/info/Info.js.map +1 -1
  135. package/build/info/Info.mjs +1 -0
  136. package/build/info/Info.mjs.map +1 -1
  137. package/build/inlineAlert/InlineAlert.js +1 -0
  138. package/build/inlineAlert/InlineAlert.js.map +1 -1
  139. package/build/inlineAlert/InlineAlert.mjs +1 -0
  140. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  141. package/build/inputs/SearchInput.js +1 -0
  142. package/build/inputs/SearchInput.js.map +1 -1
  143. package/build/inputs/SearchInput.mjs +1 -0
  144. package/build/inputs/SearchInput.mjs.map +1 -1
  145. package/build/instructionsList/InstructionsList.js +1 -0
  146. package/build/instructionsList/InstructionsList.js.map +1 -1
  147. package/build/instructionsList/InstructionsList.mjs +1 -0
  148. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  149. package/build/link/Link.js +1 -0
  150. package/build/link/Link.js.map +1 -1
  151. package/build/link/Link.mjs +1 -0
  152. package/build/link/Link.mjs.map +1 -1
  153. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +1 -0
  154. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -1
  155. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +1 -0
  156. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -1
  157. package/build/listItem/ListItem.js +1 -0
  158. package/build/listItem/ListItem.js.map +1 -1
  159. package/build/listItem/ListItem.mjs +1 -0
  160. package/build/listItem/ListItem.mjs.map +1 -1
  161. package/build/listItem/Prompt/ListItemPrompt.js +1 -0
  162. package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
  163. package/build/listItem/Prompt/ListItemPrompt.mjs +1 -0
  164. package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
  165. package/build/loader/Loader.js +1 -0
  166. package/build/loader/Loader.js.map +1 -1
  167. package/build/loader/Loader.mjs +1 -0
  168. package/build/loader/Loader.mjs.map +1 -1
  169. package/build/main.css +65 -27
  170. package/build/markdown/Markdown.js +1 -0
  171. package/build/markdown/Markdown.js.map +1 -1
  172. package/build/markdown/Markdown.mjs +1 -0
  173. package/build/markdown/Markdown.mjs.map +1 -1
  174. package/build/modal/Modal.js +1 -0
  175. package/build/modal/Modal.js.map +1 -1
  176. package/build/modal/Modal.mjs +1 -0
  177. package/build/modal/Modal.mjs.map +1 -1
  178. package/build/moneyInput/MoneyInput.js +28 -12
  179. package/build/moneyInput/MoneyInput.js.map +1 -1
  180. package/build/moneyInput/MoneyInput.mjs +30 -14
  181. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  182. package/build/moneyInput/currencyFormatting.js +8 -2
  183. package/build/moneyInput/currencyFormatting.js.map +1 -1
  184. package/build/moneyInput/currencyFormatting.mjs +5 -4
  185. package/build/moneyInput/currencyFormatting.mjs.map +1 -1
  186. package/build/navigationOption/NavigationOption.js +1 -0
  187. package/build/navigationOption/NavigationOption.js.map +1 -1
  188. package/build/navigationOption/NavigationOption.mjs +1 -0
  189. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  190. package/build/nudge/Nudge.js +1 -0
  191. package/build/nudge/Nudge.js.map +1 -1
  192. package/build/nudge/Nudge.mjs +1 -0
  193. package/build/nudge/Nudge.mjs.map +1 -1
  194. package/build/overlayHeader/OverlayHeader.js +1 -0
  195. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  196. package/build/overlayHeader/OverlayHeader.mjs +1 -0
  197. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  198. package/build/phoneNumberInput/PhoneNumberInput.js +1 -0
  199. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  200. package/build/phoneNumberInput/PhoneNumberInput.mjs +1 -0
  201. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  202. package/build/popover/Popover.js +1 -0
  203. package/build/popover/Popover.js.map +1 -1
  204. package/build/popover/Popover.mjs +1 -0
  205. package/build/popover/Popover.mjs.map +1 -1
  206. package/build/processIndicator/ProcessIndicator.js +1 -0
  207. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  208. package/build/processIndicator/ProcessIndicator.mjs +1 -0
  209. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  210. package/build/progressBar/ProgressBar.js +1 -0
  211. package/build/progressBar/ProgressBar.js.map +1 -1
  212. package/build/progressBar/ProgressBar.mjs +1 -0
  213. package/build/progressBar/ProgressBar.mjs.map +1 -1
  214. package/build/promoCard/PromoCard.js +1 -0
  215. package/build/promoCard/PromoCard.js.map +1 -1
  216. package/build/promoCard/PromoCard.mjs +1 -0
  217. package/build/promoCard/PromoCard.mjs.map +1 -1
  218. package/build/promoCard/PromoCardIndicator.js +1 -0
  219. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  220. package/build/promoCard/PromoCardIndicator.mjs +1 -0
  221. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  222. package/build/prompt/ActionPrompt/ActionPrompt.js +1 -0
  223. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  224. package/build/prompt/ActionPrompt/ActionPrompt.mjs +1 -0
  225. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  226. package/build/prompt/InfoPrompt/InfoPrompt.js +1 -0
  227. package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
  228. package/build/prompt/InfoPrompt/InfoPrompt.mjs +1 -0
  229. package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
  230. package/build/prompt/InlinePrompt/InlinePrompt.js +1 -0
  231. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
  232. package/build/prompt/InlinePrompt/InlinePrompt.mjs +1 -0
  233. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
  234. package/build/radio/Radio.js +1 -0
  235. package/build/radio/Radio.js.map +1 -1
  236. package/build/radio/Radio.mjs +1 -0
  237. package/build/radio/Radio.mjs.map +1 -1
  238. package/build/segmentedControl/SegmentedControl.js +1 -0
  239. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  240. package/build/segmentedControl/SegmentedControl.mjs +1 -0
  241. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  242. package/build/select/Select.js +1 -0
  243. package/build/select/Select.js.map +1 -1
  244. package/build/select/Select.mjs +1 -0
  245. package/build/select/Select.mjs.map +1 -1
  246. package/build/select/option/Option.js +1 -0
  247. package/build/select/option/Option.js.map +1 -1
  248. package/build/select/option/Option.mjs +1 -0
  249. package/build/select/option/Option.mjs.map +1 -1
  250. package/build/statusIcon/StatusIcon.js +2 -12
  251. package/build/statusIcon/StatusIcon.js.map +1 -1
  252. package/build/statusIcon/StatusIcon.mjs +2 -12
  253. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  254. package/build/stepper/Stepper.js +1 -0
  255. package/build/stepper/Stepper.js.map +1 -1
  256. package/build/stepper/Stepper.mjs +1 -0
  257. package/build/stepper/Stepper.mjs.map +1 -1
  258. package/build/sticky/Sticky.js +1 -0
  259. package/build/sticky/Sticky.js.map +1 -1
  260. package/build/sticky/Sticky.mjs +1 -0
  261. package/build/sticky/Sticky.mjs.map +1 -1
  262. package/build/styles/css/neptune.css +22 -22
  263. package/build/styles/less/neptune-tokens.less +4 -4
  264. package/build/styles/main.css +65 -27
  265. package/build/styles/props/neptune-tokens.css +2 -2
  266. package/build/styles/sentimentSurface/SentimentSurface.css +1 -1
  267. package/build/styles/statusIcon/StatusIcon.css +35 -4
  268. package/build/styles/styles/less/neptune.css +22 -22
  269. package/build/summary/Summary.js +1 -0
  270. package/build/summary/Summary.js.map +1 -1
  271. package/build/summary/Summary.mjs +1 -0
  272. package/build/summary/Summary.mjs.map +1 -1
  273. package/build/table/Table.js +1 -0
  274. package/build/table/Table.js.map +1 -1
  275. package/build/table/Table.mjs +1 -0
  276. package/build/table/Table.mjs.map +1 -1
  277. package/build/table/TableRow.js +1 -0
  278. package/build/table/TableRow.js.map +1 -1
  279. package/build/table/TableRow.mjs +1 -0
  280. package/build/table/TableRow.mjs.map +1 -1
  281. package/build/table/TableStatusText.js +1 -0
  282. package/build/table/TableStatusText.js.map +1 -1
  283. package/build/table/TableStatusText.mjs +1 -0
  284. package/build/table/TableStatusText.mjs.map +1 -1
  285. package/build/tabs/Tabs.js +1 -0
  286. package/build/tabs/Tabs.js.map +1 -1
  287. package/build/tabs/Tabs.mjs +1 -0
  288. package/build/tabs/Tabs.mjs.map +1 -1
  289. package/build/tile/Tile.js +1 -0
  290. package/build/tile/Tile.js.map +1 -1
  291. package/build/tile/Tile.mjs +1 -0
  292. package/build/tile/Tile.mjs.map +1 -1
  293. package/build/title/Title.js +1 -0
  294. package/build/title/Title.js.map +1 -1
  295. package/build/title/Title.mjs +1 -0
  296. package/build/title/Title.mjs.map +1 -1
  297. package/build/tooltip/Tooltip.js +1 -0
  298. package/build/tooltip/Tooltip.js.map +1 -1
  299. package/build/tooltip/Tooltip.mjs +1 -0
  300. package/build/tooltip/Tooltip.mjs.map +1 -1
  301. package/build/typeahead/Typeahead.js +1 -0
  302. package/build/typeahead/Typeahead.js.map +1 -1
  303. package/build/typeahead/Typeahead.mjs +1 -0
  304. package/build/typeahead/Typeahead.mjs.map +1 -1
  305. package/build/types/common/locale/index.d.ts +1 -1
  306. package/build/types/common/locale/index.d.ts.map +1 -1
  307. package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
  308. package/build/types/moneyInput/MoneyInput.d.ts +6 -0
  309. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  310. package/build/types/moneyInput/currencyFormatting.d.ts +4 -3
  311. package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
  312. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  313. package/build/upload/Upload.js +1 -0
  314. package/build/upload/Upload.js.map +1 -1
  315. package/build/upload/Upload.mjs +1 -0
  316. package/build/upload/Upload.mjs.map +1 -1
  317. package/build/upload/steps/completeStep/completeStep.js +1 -0
  318. package/build/upload/steps/completeStep/completeStep.js.map +1 -1
  319. package/build/upload/steps/completeStep/completeStep.mjs +1 -0
  320. package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
  321. package/build/upload/steps/processingStep/processingStep.js +1 -0
  322. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  323. package/build/upload/steps/processingStep/processingStep.mjs +1 -0
  324. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  325. package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -0
  326. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  327. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -0
  328. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  329. package/build/uploadInput/UploadInput.js +1 -0
  330. package/build/uploadInput/UploadInput.js.map +1 -1
  331. package/build/uploadInput/UploadInput.mjs +1 -0
  332. package/build/uploadInput/UploadInput.mjs.map +1 -1
  333. package/build/uploadInput/uploadButton/UploadButton.js +1 -0
  334. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  335. package/build/uploadInput/uploadButton/UploadButton.mjs +1 -0
  336. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  337. package/build/uploadInput/uploadButton/defaults.js +1 -0
  338. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  339. package/build/uploadInput/uploadButton/defaults.mjs +1 -0
  340. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  341. package/build/uploadInput/uploadItem/UploadItem.js +1 -0
  342. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  343. package/build/uploadInput/uploadItem/UploadItem.mjs +1 -0
  344. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  345. package/build/withDisplayFormat/WithDisplayFormat.js +1 -0
  346. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  347. package/build/withDisplayFormat/WithDisplayFormat.mjs +1 -0
  348. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  349. package/package.json +14 -14
  350. package/src/common/locale/index.test.ts +13 -4
  351. package/src/common/locale/index.ts +9 -3
  352. package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +18 -0
  353. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.test.tsx +119 -1
  354. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +4 -3
  355. package/src/main.css +65 -27
  356. package/src/moneyInput/MoneyInput.story.tsx +10 -1
  357. package/src/moneyInput/MoneyInput.test.story.tsx +141 -1
  358. package/src/moneyInput/MoneyInput.test.tsx +45 -0
  359. package/src/moneyInput/MoneyInput.tsx +27 -3
  360. package/src/moneyInput/currencyFormatting.ts +11 -5
  361. package/src/sentimentSurface/SentimentSurface.css +1 -1
  362. package/src/sentimentSurface/SentimentSurface.less +1 -1
  363. package/src/statusIcon/StatusIcon.css +35 -4
  364. package/src/statusIcon/StatusIcon.less +35 -4
  365. package/src/statusIcon/StatusIcon.story.tsx +119 -79
  366. package/src/statusIcon/StatusIcon.test.story.tsx +125 -0
  367. package/src/statusIcon/StatusIcon.test.tsx +16 -23
  368. package/src/statusIcon/StatusIcon.tsx +2 -16
  369. package/src/styles/less/neptune.css +22 -22
@@ -1,102 +1,142 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
 
3
- import { Sentiment, Size, Status } from '../common';
3
+ import { Sentiment } from '../common';
4
+ import SentimentSurface from '../sentimentSurface';
4
5
 
5
6
  import StatusIcon, { StatusIconSentiment } from './StatusIcon';
6
- import { withVariantConfig } from '../../.storybook/helpers';
7
+
8
+ const sentiments = [
9
+ Sentiment.POSITIVE,
10
+ Sentiment.NEGATIVE,
11
+ Sentiment.WARNING,
12
+ Sentiment.NEUTRAL,
13
+ Sentiment.PENDING,
14
+ ] as const;
15
+
16
+ const sizes = [16, 24, 32, 40, 48, 56, 72] as const;
17
+
18
+ const label: Record<string, string> = {
19
+ positive: 'Positive',
20
+ negative: 'Negative',
21
+ warning: 'Warning',
22
+ neutral: 'Neutral',
23
+ pending: 'Pending',
24
+ };
7
25
 
8
26
  export default {
9
27
  component: StatusIcon,
10
28
  title: 'Other/StatusIcon',
11
-
12
- argTypes: {
13
- iconLabel: {
14
- control: 'text',
15
- },
16
- },
17
29
  } satisfies Meta<typeof StatusIcon>;
18
30
 
19
31
  type Story = StoryObj<typeof StatusIcon>;
20
32
 
21
- export const Basic: Story = {};
33
+ export const Playground: Story = {
34
+ args: {
35
+ size: 40,
36
+ },
37
+ };
22
38
 
23
39
  /**
24
- * Ignored by the screen readers. Use with care.
40
+ * All available sentiments at the selected size.
25
41
  */
26
- export const Presentational: Story = {
27
- args: {
28
- iconLabel: null,
42
+ export const Sentiments: Story = {
43
+ argTypes: {
44
+ sentiment: { table: { disable: true } },
29
45
  },
46
+ render: ({ size }) => (
47
+ <div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
48
+ {sentiments.map((sentiment) => (
49
+ <div
50
+ key={sentiment}
51
+ style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '4px' }}
52
+ >
53
+ <StatusIcon sentiment={sentiment as StatusIconSentiment} size={size} />
54
+ <span style={{ fontSize: '11px' }}>{label[sentiment]}</span>
55
+ </div>
56
+ ))}
57
+ </div>
58
+ ),
30
59
  };
31
60
 
32
- export const Variants: Story = {
33
- ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green'], {
34
- parameters: {
35
- padding: '0',
36
- },
37
- }),
38
- render: () => (
39
- <span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
40
- {[
41
- Sentiment.POSITIVE,
42
- Sentiment.NEGATIVE,
43
- Sentiment.WARNING,
44
- Sentiment.NEUTRAL,
45
- Sentiment.PENDING,
46
- Status.PENDING,
47
- ].map((sentiment) => {
48
- return (
49
- <span
50
- key={sentiment}
51
- style={{
52
- display: 'flex',
53
- justifyContent: 'space-between',
54
- flexDirection: 'column',
55
- minHeight: '150px',
56
- alignItems: 'center',
57
- }}
58
- >
59
- {([16, 24, 32, 40, 48, 56, 72] as const).map((size) => {
60
- return (
61
- <StatusIcon key={size} size={size} sentiment={sentiment as StatusIconSentiment} />
62
- );
63
- })}
64
- </span>
65
- );
66
- })}
67
- </span>
61
+ /**
62
+ * All available sizes at the selected sentiment.
63
+ */
64
+ export const Sizes: Story = {
65
+ argTypes: {
66
+ size: { table: { disable: true } },
67
+ },
68
+ render: ({ sentiment }) => (
69
+ <div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
70
+ {sizes.map((size) => (
71
+ <div
72
+ key={size}
73
+ style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '4px' }}
74
+ >
75
+ <StatusIcon sentiment={sentiment} size={size} />
76
+ <span style={{ fontSize: '11px' }}>{size}</span>
77
+ </div>
78
+ ))}
79
+ </div>
68
80
  ),
69
81
  };
70
82
 
71
- export const LegacySizes: Story = {
72
- render: () => (
73
- <span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
74
- {[
75
- Sentiment.POSITIVE,
76
- Sentiment.NEGATIVE,
77
- Sentiment.NEUTRAL,
78
- Sentiment.WARNING,
79
- Status.PENDING,
80
- ].map((sentiment) => {
81
- return (
82
- <span
83
- key={sentiment}
84
- style={{
85
- display: 'flex',
86
- justifyContent: 'space-between',
87
- flexDirection: 'column',
88
- minHeight: '150px',
89
- alignItems: 'center',
90
- }}
83
+ /**
84
+ * `StatusIcon` is sentiment-aware and will automatically adjust its colours when placed inside
85
+ * a [SentimentSurface](?path=/docs/foundations-sentimentsurface--docs) component no extra
86
+ * props needed. Each row below is a `SentimentSurface` at either `base` or `elevated` emphasis (and a last row with no sentiment for reference).
87
+ */
88
+ export const SentimentAwareness: Story = {
89
+ argTypes: {
90
+ sentiment: { table: { disable: true } },
91
+ },
92
+ render: ({ size }) => {
93
+ const surfaceSentiments = ['success', 'warning', 'negative', 'neutral'] as const;
94
+
95
+ return (
96
+ <div style={{ display: 'flex', flexDirection: 'column' }}>
97
+ {surfaceSentiments.flatMap((sentiment) => [
98
+ <SentimentSurface
99
+ key={`${sentiment}-base`}
100
+ sentiment={sentiment}
101
+ emphasis="base"
102
+ style={{ display: 'flex', alignItems: 'center', padding: '8px', gap: '8px' }}
91
103
  >
92
- {([Size.SMALL, Size.MEDIUM, Size.LARGE] as const).map((size) => {
93
- return (
94
- <StatusIcon key={size} size={size} sentiment={sentiment as StatusIconSentiment} />
95
- );
96
- })}
97
- </span>
98
- );
99
- })}
100
- </span>
101
- ),
104
+ <div
105
+ style={{ width: '120px', fontSize: '11px', fontWeight: 'bold', paddingLeft: '8px' }}
106
+ >
107
+ {sentiment} (base)
108
+ </div>
109
+ <StatusIcon sentiment={sentiment as StatusIconSentiment} size={size} />
110
+ </SentimentSurface>,
111
+ <SentimentSurface
112
+ key={`${sentiment}-elevated`}
113
+ sentiment={sentiment}
114
+ emphasis="elevated"
115
+ style={{ display: 'flex', alignItems: 'center', padding: '8px', gap: '8px' }}
116
+ >
117
+ <div
118
+ style={{ width: '120px', fontSize: '11px', fontWeight: 'bold', paddingLeft: '8px' }}
119
+ >
120
+ {sentiment} (elevated)
121
+ </div>
122
+ <StatusIcon sentiment={sentiment as StatusIconSentiment} size={size} />
123
+ </SentimentSurface>,
124
+ ])}
125
+
126
+ {/* Row without a SentimentSurface wrapper */}
127
+ <div style={{ display: 'flex', alignItems: 'center', padding: '8px', gap: '8px' }}>
128
+ <div style={{ width: '120px', fontSize: '11px', fontWeight: 'bold', paddingLeft: '8px' }}>
129
+ none
130
+ </div>
131
+ <StatusIcon sentiment="pending" size={size} />
132
+ </div>
133
+ </div>
134
+ );
135
+ },
136
+ parameters: {
137
+ docs: {
138
+ source: { type: 'dynamic' },
139
+ canvas: { sourceState: 'hidden' },
140
+ },
141
+ },
102
142
  };
@@ -0,0 +1,125 @@
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
+
3
+ import { Sentiment, Size } from '../common';
4
+ import SentimentSurface from '../sentimentSurface';
5
+ import { withVariantConfig } from '../../.storybook/helpers';
6
+ import { allModes } from '../../.storybook/modes';
7
+
8
+ import StatusIcon, { StatusIconSentiment } from './StatusIcon';
9
+
10
+ export default {
11
+ title: 'Other/StatusIcon/Tests',
12
+ component: StatusIcon,
13
+ tags: ['!autodocs', '!manifest'],
14
+ } satisfies Meta<typeof StatusIcon>;
15
+
16
+ type Story = StoryObj<typeof StatusIcon>;
17
+
18
+ const sizes = [16, 24, 32, 40, 48, 56, 72] as const;
19
+
20
+ const surfaceSentiments = ['success', 'warning', 'negative', 'neutral'] as const;
21
+
22
+ // Cycle through different sentiments per size so each row shows varied icons
23
+ const iconSentiments: StatusIconSentiment[] = [
24
+ Sentiment.POSITIVE,
25
+ Sentiment.NEGATIVE,
26
+ Sentiment.WARNING,
27
+ Sentiment.NEUTRAL,
28
+ Sentiment.PENDING,
29
+ Sentiment.POSITIVE,
30
+ Sentiment.NEGATIVE,
31
+ ];
32
+
33
+ const rowStyle = {
34
+ display: 'flex',
35
+ alignItems: 'center',
36
+ padding: '8px',
37
+ gap: '8px',
38
+ } as const;
39
+
40
+ const labelStyle = {
41
+ width: '120px',
42
+ fontSize: '11px',
43
+ fontWeight: 'bold',
44
+ paddingLeft: '8px',
45
+ flexShrink: 0,
46
+ } as const;
47
+
48
+ /**
49
+ * All sentiments, emphasis levels, and sizes across all themes for visual regression testing.
50
+ */
51
+ export const Variants: Story = {
52
+ render: () => (
53
+ <div style={{ display: 'flex', flexDirection: 'column' }}>
54
+ {surfaceSentiments.flatMap((sentiment) => [
55
+ <SentimentSurface
56
+ key={`${sentiment}-base`}
57
+ sentiment={sentiment}
58
+ emphasis="base"
59
+ style={rowStyle}
60
+ >
61
+ <div style={labelStyle}>{sentiment} (base)</div>
62
+ {sizes.map((size, i) => (
63
+ <StatusIcon key={size} sentiment={iconSentiments[i]} size={size} />
64
+ ))}
65
+ </SentimentSurface>,
66
+ <SentimentSurface
67
+ key={`${sentiment}-elevated`}
68
+ sentiment={sentiment}
69
+ emphasis="elevated"
70
+ style={rowStyle}
71
+ >
72
+ <div style={labelStyle}>{sentiment} (elevated)</div>
73
+ {sizes.map((size, i) => (
74
+ <StatusIcon key={size} sentiment={iconSentiments[i]} size={size} />
75
+ ))}
76
+ </SentimentSurface>,
77
+ ])}
78
+
79
+ {/* Row without a SentimentSurface wrapper — standalone fallback colours */}
80
+ <div style={rowStyle}>
81
+ <div style={labelStyle}>none</div>
82
+ {sizes.map((size, i) => (
83
+ <StatusIcon key={size} sentiment={iconSentiments[i]} size={size} />
84
+ ))}
85
+ </div>
86
+ </div>
87
+ ),
88
+ parameters: {
89
+ padding: '16px',
90
+ variants: ['default', 'dark', 'bright-green', 'forest-green'],
91
+ },
92
+ };
93
+
94
+ export const RTL: Story = {
95
+ render: Variants.render,
96
+ ...withVariantConfig(['rtl']),
97
+ };
98
+
99
+ /**
100
+ * @deprecated Legacy `Size.SMALL | Size.MEDIUM | Size.LARGE` values still work but
101
+ * consumers should migrate to numeric sizes.
102
+ */
103
+ export const LegacySizes: Story = {
104
+ render: () => {
105
+ const legacySizes = [
106
+ { value: Size.SMALL, label: 'Size.SMALL' },
107
+ { value: Size.MEDIUM, label: 'Size.MEDIUM' },
108
+ { value: Size.LARGE, label: 'Size.LARGE' },
109
+ ] as const;
110
+
111
+ return (
112
+ <div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
113
+ {legacySizes.map(({ value, label }) => (
114
+ <div
115
+ key={label}
116
+ style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '4px' }}
117
+ >
118
+ <StatusIcon size={value} />
119
+ <span style={{ fontSize: '11px' }}>{label}</span>
120
+ </div>
121
+ ))}
122
+ </div>
123
+ );
124
+ },
125
+ };
@@ -39,35 +39,28 @@ describe('StatusIcon', () => {
39
39
  renderStatusIcon({ sentiment: sentiment as StatusIconSentiment });
40
40
 
41
41
  expect(screen.getByTestId('status-icon')).toHaveClass(expectedClass);
42
- cleanup();
43
42
  },
44
43
  );
45
44
 
46
- it("'warning' and 'pending' sentiments generate 'dark' colored icons", () => {
47
- renderStatusIcon({ sentiment: Sentiment.WARNING });
48
- expect(screen.getByTestId('alert-icon')).toHaveClass('dark');
49
- cleanup();
50
45
 
51
- renderStatusIcon({ sentiment: Sentiment.PENDING });
52
- expect(screen.getByTestId('clock-borderless-icon')).toHaveClass('dark');
53
- cleanup();
54
-
55
- renderStatusIcon({ sentiment: Status.PENDING });
56
- expect(screen.getByTestId('clock-borderless-icon')).toHaveClass('dark');
57
- });
58
-
59
- it("'positive', 'negative', and 'neutral' sentiments generate 'light' colored icons", () => {
60
- renderStatusIcon({ sentiment: Sentiment.POSITIVE });
61
- expect(screen.getByTestId('check-icon')).toHaveClass('light');
62
- cleanup();
46
+ it.each([
47
+ [Sentiment.WARNING, 'alert-icon'],
48
+ [Sentiment.PENDING, 'clock-borderless-icon'],
49
+ [Status.PENDING, 'clock-borderless-icon'],
50
+ [Sentiment.POSITIVE, 'check-icon'],
51
+ [Sentiment.NEGATIVE, 'cross-icon'],
52
+ [Sentiment.NEUTRAL, 'info-icon'],
53
+ ])(
54
+ "renders the correct icon for '%s' sentiment",
55
+ (sentiment: Sentiment | Status, expectedIconTestId: string) => {
56
+ renderStatusIcon({ sentiment: sentiment as StatusIconSentiment });
63
57
 
64
- renderStatusIcon({ sentiment: Sentiment.NEGATIVE });
65
- expect(screen.getByTestId('cross-icon')).toHaveClass('light');
66
- cleanup();
58
+ const icon = screen.getByTestId(expectedIconTestId);
59
+ expect(icon).toBeInTheDocument();
60
+ expect(icon).toHaveClass('status-icon');
61
+ },
62
+ );
67
63
 
68
- renderStatusIcon();
69
- expect(screen.getByTestId('info-icon')).toHaveClass('light');
70
- });
71
64
 
72
65
  describe('accessible name', () => {
73
66
  it.each([
@@ -1,9 +1,7 @@
1
1
  import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';
2
2
  import { clsx } from 'clsx';
3
3
  import { useIntl } from 'react-intl';
4
- import { PropsWithChildren } from 'react';
5
4
 
6
- import SentimentSurface from '../sentimentSurface';
7
5
  import { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';
8
6
  import Circle, { CircleProps } from '../common/circle';
9
7
  import { useMedia } from '../common/hooks/useMedia';
@@ -88,30 +86,18 @@ const StatusIcon = ({
88
86
  };
89
87
  const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];
90
88
 
91
- const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
92
89
  const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
93
90
  const size = mapLegacySize[sizeProp] ?? sizeProp;
94
- // eslint-disable-next-line react/no-unstable-nested-components
95
- const SentimentSurfaceSetting = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (
96
- <SentimentSurface
97
- as="span"
98
- // @ts-expect-error sentiment and SentimentSurface types mismatch
99
- sentiment={
100
- sentiment === 'positive' ? 'success' : sentiment === 'pending' ? 'warning' : sentiment
101
- }
102
- {...props}
103
- />
104
- );
91
+
105
92
  return (
106
93
  <Circle
107
- as={SentimentSurfaceSetting}
108
94
  size={isTinyViewport && size < 40 ? 32 : size}
109
95
  data-testid="status-icon"
110
96
  className={clsx('status-circle', sentiment)}
111
97
  id={id}
112
98
  >
113
99
  <Icon
114
- className={clsx('status-icon', iconColor)}
100
+ className="status-icon"
115
101
  title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}
116
102
  />
117
103
  </Circle>
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Do not edit directly
3
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
2
+ * Do not edit directly, this file was auto-generated.
3
+ * Generated on Tue, 31 Mar 2026 13:02:10 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -142,8 +142,8 @@
142
142
  }
143
143
 
144
144
  /**
145
- * Do not edit directly
146
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
145
+ * Do not edit directly, this file was auto-generated.
146
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
147
147
  */
148
148
 
149
149
  .np-theme-personal {
@@ -391,8 +391,8 @@
391
391
  }
392
392
 
393
393
  /**
394
- * Do not edit directly
395
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
394
+ * Do not edit directly, this file was auto-generated.
395
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
396
396
  */
397
397
 
398
398
  .np-theme-personal--forest-green {
@@ -640,8 +640,8 @@
640
640
  }
641
641
 
642
642
  /**
643
- * Do not edit directly
644
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
643
+ * Do not edit directly, this file was auto-generated.
644
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
645
645
  */
646
646
 
647
647
  .np-theme-personal--bright-green {
@@ -889,8 +889,8 @@
889
889
  }
890
890
 
891
891
  /**
892
- * Do not edit directly
893
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
892
+ * Do not edit directly, this file was auto-generated.
893
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
894
894
  */
895
895
 
896
896
  .np-theme-personal--dark {
@@ -1138,8 +1138,8 @@
1138
1138
  }
1139
1139
 
1140
1140
  /**
1141
- * Do not edit directly
1142
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
1141
+ * Do not edit directly, this file was auto-generated.
1142
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
1143
1143
  */
1144
1144
 
1145
1145
  .np-theme-platform {
@@ -1321,8 +1321,8 @@
1321
1321
  }
1322
1322
 
1323
1323
  /**
1324
- * Do not edit directly
1325
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
1324
+ * Do not edit directly, this file was auto-generated.
1325
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
1326
1326
  */
1327
1327
 
1328
1328
  .np-theme-platform--forest-green {
@@ -1504,8 +1504,8 @@
1504
1504
  }
1505
1505
 
1506
1506
  /**
1507
- * Do not edit directly
1508
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
1507
+ * Do not edit directly, this file was auto-generated.
1508
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
1509
1509
  */
1510
1510
 
1511
1511
  .np-theme-business {
@@ -1688,8 +1688,8 @@
1688
1688
  }
1689
1689
 
1690
1690
  /**
1691
- * Do not edit directly
1692
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
1691
+ * Do not edit directly, this file was auto-generated.
1692
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
1693
1693
  */
1694
1694
 
1695
1695
  .np-theme-business--dark {
@@ -1872,8 +1872,8 @@
1872
1872
  }
1873
1873
 
1874
1874
  /**
1875
- * Do not edit directly
1876
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
1875
+ * Do not edit directly, this file was auto-generated.
1876
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
1877
1877
  */
1878
1878
 
1879
1879
  .np-theme-business--forest-green {
@@ -2056,8 +2056,8 @@
2056
2056
  }
2057
2057
 
2058
2058
  /**
2059
- * Do not edit directly
2060
- * Generated on Wed, 07 Jan 2026 11:56:15 GMT
2059
+ * Do not edit directly, this file was auto-generated.
2060
+ * Generated on Tue, 31 Mar 2026 13:02:11 GMT
2061
2061
  */
2062
2062
 
2063
2063
  .np-theme-business--bright-green {