@transferwise/components 0.0.0-experimental-24a0a12 → 0.0.0-experimental-d678cd6

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 (441) 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/badge/BadgeAssets.js +2 -1
  38. package/build/badge/BadgeAssets.js.map +1 -1
  39. package/build/badge/BadgeAssets.mjs +2 -1
  40. package/build/badge/BadgeAssets.mjs.map +1 -1
  41. package/build/button/Button.js +1 -0
  42. package/build/button/Button.js.map +1 -1
  43. package/build/button/Button.mjs +1 -0
  44. package/build/button/Button.mjs.map +1 -1
  45. package/build/button/LegacyButton.js +1 -0
  46. package/build/button/LegacyButton.js.map +1 -1
  47. package/build/button/LegacyButton.mjs +1 -0
  48. package/build/button/LegacyButton.mjs.map +1 -1
  49. package/build/button/classMap.js +1 -0
  50. package/build/button/classMap.js.map +1 -1
  51. package/build/button/classMap.mjs +1 -0
  52. package/build/button/classMap.mjs.map +1 -1
  53. package/build/button/legacyUtils/legacyUtils.js +1 -0
  54. package/build/button/legacyUtils/legacyUtils.js.map +1 -1
  55. package/build/button/legacyUtils/legacyUtils.mjs +1 -0
  56. package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
  57. package/build/card/Card.js +1 -0
  58. package/build/card/Card.js.map +1 -1
  59. package/build/card/Card.mjs +1 -0
  60. package/build/card/Card.mjs.map +1 -1
  61. package/build/checkbox/Checkbox.js +1 -0
  62. package/build/checkbox/Checkbox.js.map +1 -1
  63. package/build/checkbox/Checkbox.mjs +1 -0
  64. package/build/checkbox/Checkbox.mjs.map +1 -1
  65. package/build/chevron/Chevron.js +1 -0
  66. package/build/chevron/Chevron.js.map +1 -1
  67. package/build/chevron/Chevron.mjs +1 -0
  68. package/build/chevron/Chevron.mjs.map +1 -1
  69. package/build/chips/Chip.js +1 -0
  70. package/build/chips/Chip.js.map +1 -1
  71. package/build/chips/Chip.mjs +1 -0
  72. package/build/chips/Chip.mjs.map +1 -1
  73. package/build/circularButton/CircularButton.js +1 -0
  74. package/build/circularButton/CircularButton.js.map +1 -1
  75. package/build/circularButton/CircularButton.mjs +1 -0
  76. package/build/circularButton/CircularButton.mjs.map +1 -1
  77. package/build/common/locale/index.js +9 -4
  78. package/build/common/locale/index.js.map +1 -1
  79. package/build/common/locale/index.mjs +9 -4
  80. package/build/common/locale/index.mjs.map +1 -1
  81. package/build/common/panel/Panel.js +41 -56
  82. package/build/common/panel/Panel.js.map +1 -1
  83. package/build/common/panel/Panel.mjs +46 -61
  84. package/build/common/panel/Panel.mjs.map +1 -1
  85. package/build/common/responsivePanel/ResponsivePanel.js +1 -0
  86. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  87. package/build/common/responsivePanel/ResponsivePanel.mjs +1 -0
  88. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  89. package/build/criticalBanner/CriticalCommsBanner.js +1 -0
  90. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  91. package/build/criticalBanner/CriticalCommsBanner.mjs +1 -0
  92. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  93. package/build/dateInput/DateInput.js +1 -1
  94. package/build/dateInput/DateInput.mjs +1 -1
  95. package/build/dateLookup/DateLookup.js +1 -1
  96. package/build/dateLookup/DateLookup.mjs +1 -1
  97. package/build/dateLookup/dateHeader/DateHeader.js +1 -0
  98. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
  99. package/build/dateLookup/dateHeader/DateHeader.mjs +1 -0
  100. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
  101. package/build/decision/Decision.js +1 -0
  102. package/build/decision/Decision.js.map +1 -1
  103. package/build/decision/Decision.mjs +1 -0
  104. package/build/decision/Decision.mjs.map +1 -1
  105. package/build/definitionList/DefinitionList.js +1 -0
  106. package/build/definitionList/DefinitionList.js.map +1 -1
  107. package/build/definitionList/DefinitionList.mjs +1 -0
  108. package/build/definitionList/DefinitionList.mjs.map +1 -1
  109. package/build/dimmer/Dimmer.js +1 -0
  110. package/build/dimmer/Dimmer.js.map +1 -1
  111. package/build/dimmer/Dimmer.mjs +1 -0
  112. package/build/dimmer/Dimmer.mjs.map +1 -1
  113. package/build/display/Display.js +1 -0
  114. package/build/display/Display.js.map +1 -1
  115. package/build/display/Display.mjs +1 -0
  116. package/build/display/Display.mjs.map +1 -1
  117. package/build/drawer/Drawer.js +1 -0
  118. package/build/drawer/Drawer.js.map +1 -1
  119. package/build/drawer/Drawer.mjs +1 -0
  120. package/build/drawer/Drawer.mjs.map +1 -1
  121. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +4 -3
  122. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
  123. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +4 -3
  124. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
  125. package/build/field/Field.js +5 -5
  126. package/build/field/Field.mjs +5 -5
  127. package/build/flowNavigation/FlowNavigation.js +1 -0
  128. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  129. package/build/flowNavigation/FlowNavigation.mjs +1 -0
  130. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  131. package/build/header/Header.js +1 -0
  132. package/build/header/Header.js.map +1 -1
  133. package/build/header/Header.mjs +1 -0
  134. package/build/header/Header.mjs.map +1 -1
  135. package/build/i18n/en.json +0 -2
  136. package/build/i18n/en.json.js +0 -2
  137. package/build/i18n/en.json.js.map +1 -1
  138. package/build/i18n/en.json.mjs +0 -2
  139. package/build/i18n/en.json.mjs.map +1 -1
  140. package/build/index.js +0 -2
  141. package/build/index.js.map +1 -1
  142. package/build/index.mjs +0 -1
  143. package/build/index.mjs.map +1 -1
  144. package/build/info/Info.js +1 -0
  145. package/build/info/Info.js.map +1 -1
  146. package/build/info/Info.mjs +1 -0
  147. package/build/info/Info.mjs.map +1 -1
  148. package/build/inlineAlert/InlineAlert.js +1 -0
  149. package/build/inlineAlert/InlineAlert.js.map +1 -1
  150. package/build/inlineAlert/InlineAlert.mjs +1 -0
  151. package/build/inlineAlert/InlineAlert.mjs.map +1 -1
  152. package/build/inputs/SearchInput.js +1 -0
  153. package/build/inputs/SearchInput.js.map +1 -1
  154. package/build/inputs/SearchInput.mjs +1 -0
  155. package/build/inputs/SearchInput.mjs.map +1 -1
  156. package/build/instructionsList/InstructionsList.js +1 -0
  157. package/build/instructionsList/InstructionsList.js.map +1 -1
  158. package/build/instructionsList/InstructionsList.mjs +1 -0
  159. package/build/instructionsList/InstructionsList.mjs.map +1 -1
  160. package/build/link/Link.js +1 -0
  161. package/build/link/Link.js.map +1 -1
  162. package/build/link/Link.mjs +1 -0
  163. package/build/link/Link.mjs.map +1 -1
  164. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +1 -0
  165. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -1
  166. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +1 -0
  167. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -1
  168. package/build/listItem/ListItem.js +1 -0
  169. package/build/listItem/ListItem.js.map +1 -1
  170. package/build/listItem/ListItem.mjs +1 -0
  171. package/build/listItem/ListItem.mjs.map +1 -1
  172. package/build/listItem/Prompt/ListItemPrompt.js +5 -5
  173. package/build/listItem/Prompt/ListItemPrompt.mjs +5 -5
  174. package/build/loader/Loader.js +1 -0
  175. package/build/loader/Loader.js.map +1 -1
  176. package/build/loader/Loader.mjs +1 -0
  177. package/build/loader/Loader.mjs.map +1 -1
  178. package/build/main.css +51 -130
  179. package/build/markdown/Markdown.js +1 -0
  180. package/build/markdown/Markdown.js.map +1 -1
  181. package/build/markdown/Markdown.mjs +1 -0
  182. package/build/markdown/Markdown.mjs.map +1 -1
  183. package/build/modal/Modal.js +1 -0
  184. package/build/modal/Modal.js.map +1 -1
  185. package/build/modal/Modal.mjs +1 -0
  186. package/build/modal/Modal.mjs.map +1 -1
  187. package/build/moneyInput/MoneyInput.js +28 -12
  188. package/build/moneyInput/MoneyInput.js.map +1 -1
  189. package/build/moneyInput/MoneyInput.mjs +30 -14
  190. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  191. package/build/moneyInput/currencyFormatting.js +8 -2
  192. package/build/moneyInput/currencyFormatting.js.map +1 -1
  193. package/build/moneyInput/currencyFormatting.mjs +5 -4
  194. package/build/moneyInput/currencyFormatting.mjs.map +1 -1
  195. package/build/navigationOption/NavigationOption.js +1 -0
  196. package/build/navigationOption/NavigationOption.js.map +1 -1
  197. package/build/navigationOption/NavigationOption.mjs +1 -0
  198. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  199. package/build/nudge/Nudge.js +1 -0
  200. package/build/nudge/Nudge.js.map +1 -1
  201. package/build/nudge/Nudge.mjs +1 -0
  202. package/build/nudge/Nudge.mjs.map +1 -1
  203. package/build/overlayHeader/OverlayHeader.js +1 -0
  204. package/build/overlayHeader/OverlayHeader.js.map +1 -1
  205. package/build/overlayHeader/OverlayHeader.mjs +1 -0
  206. package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
  207. package/build/phoneNumberInput/PhoneNumberInput.js +1 -0
  208. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  209. package/build/phoneNumberInput/PhoneNumberInput.mjs +1 -0
  210. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  211. package/build/popover/Popover.js +1 -0
  212. package/build/popover/Popover.js.map +1 -1
  213. package/build/popover/Popover.mjs +1 -0
  214. package/build/popover/Popover.mjs.map +1 -1
  215. package/build/processIndicator/ProcessIndicator.js +1 -0
  216. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  217. package/build/processIndicator/ProcessIndicator.mjs +1 -0
  218. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  219. package/build/progressBar/ProgressBar.js +1 -0
  220. package/build/progressBar/ProgressBar.js.map +1 -1
  221. package/build/progressBar/ProgressBar.mjs +1 -0
  222. package/build/progressBar/ProgressBar.mjs.map +1 -1
  223. package/build/promoCard/PromoCard.js +1 -0
  224. package/build/promoCard/PromoCard.js.map +1 -1
  225. package/build/promoCard/PromoCard.mjs +1 -0
  226. package/build/promoCard/PromoCard.mjs.map +1 -1
  227. package/build/promoCard/PromoCardIndicator.js +1 -0
  228. package/build/promoCard/PromoCardIndicator.js.map +1 -1
  229. package/build/promoCard/PromoCardIndicator.mjs +1 -0
  230. package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
  231. package/build/prompt/ActionPrompt/ActionPrompt.js +41 -8
  232. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  233. package/build/prompt/ActionPrompt/ActionPrompt.mjs +41 -8
  234. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  235. package/build/prompt/InfoPrompt/InfoPrompt.js +1 -0
  236. package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
  237. package/build/prompt/InfoPrompt/InfoPrompt.mjs +1 -0
  238. package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
  239. package/build/prompt/InlinePrompt/InlinePrompt.js +1 -0
  240. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
  241. package/build/prompt/InlinePrompt/InlinePrompt.mjs +1 -0
  242. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
  243. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +0 -2
  244. package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
  245. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +0 -2
  246. package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
  247. package/build/radio/Radio.js +1 -0
  248. package/build/radio/Radio.js.map +1 -1
  249. package/build/radio/Radio.mjs +1 -0
  250. package/build/radio/Radio.mjs.map +1 -1
  251. package/build/segmentedControl/SegmentedControl.js +1 -0
  252. package/build/segmentedControl/SegmentedControl.js.map +1 -1
  253. package/build/segmentedControl/SegmentedControl.mjs +1 -0
  254. package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
  255. package/build/select/Select.js +1 -0
  256. package/build/select/Select.js.map +1 -1
  257. package/build/select/Select.mjs +1 -0
  258. package/build/select/Select.mjs.map +1 -1
  259. package/build/select/option/Option.js +1 -0
  260. package/build/select/option/Option.js.map +1 -1
  261. package/build/select/option/Option.mjs +1 -0
  262. package/build/select/option/Option.mjs.map +1 -1
  263. package/build/statusIcon/StatusIcon.js +1 -0
  264. package/build/statusIcon/StatusIcon.js.map +1 -1
  265. package/build/statusIcon/StatusIcon.mjs +1 -0
  266. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  267. package/build/stepper/Stepper.js +1 -0
  268. package/build/stepper/Stepper.js.map +1 -1
  269. package/build/stepper/Stepper.mjs +1 -0
  270. package/build/stepper/Stepper.mjs.map +1 -1
  271. package/build/sticky/Sticky.js +1 -0
  272. package/build/sticky/Sticky.js.map +1 -1
  273. package/build/sticky/Sticky.mjs +1 -0
  274. package/build/sticky/Sticky.mjs.map +1 -1
  275. package/build/styles/css/neptune.css +22 -22
  276. package/build/styles/less/neptune-tokens.less +4 -4
  277. package/build/styles/main.css +51 -130
  278. package/build/styles/props/neptune-tokens.css +2 -2
  279. package/build/styles/styles/less/neptune.css +22 -22
  280. package/build/summary/Summary.js +1 -0
  281. package/build/summary/Summary.js.map +1 -1
  282. package/build/summary/Summary.mjs +1 -0
  283. package/build/summary/Summary.mjs.map +1 -1
  284. package/build/table/Table.js +1 -0
  285. package/build/table/Table.js.map +1 -1
  286. package/build/table/Table.mjs +1 -0
  287. package/build/table/Table.mjs.map +1 -1
  288. package/build/table/TableRow.js +1 -0
  289. package/build/table/TableRow.js.map +1 -1
  290. package/build/table/TableRow.mjs +1 -0
  291. package/build/table/TableRow.mjs.map +1 -1
  292. package/build/table/TableStatusText.js +1 -0
  293. package/build/table/TableStatusText.js.map +1 -1
  294. package/build/table/TableStatusText.mjs +1 -0
  295. package/build/table/TableStatusText.mjs.map +1 -1
  296. package/build/tabs/Tabs.js +1 -0
  297. package/build/tabs/Tabs.js.map +1 -1
  298. package/build/tabs/Tabs.mjs +1 -0
  299. package/build/tabs/Tabs.mjs.map +1 -1
  300. package/build/tile/Tile.js +1 -0
  301. package/build/tile/Tile.js.map +1 -1
  302. package/build/tile/Tile.mjs +1 -0
  303. package/build/tile/Tile.mjs.map +1 -1
  304. package/build/title/Title.js +1 -0
  305. package/build/title/Title.js.map +1 -1
  306. package/build/title/Title.mjs +1 -0
  307. package/build/title/Title.mjs.map +1 -1
  308. package/build/tooltip/Tooltip.js +30 -50
  309. package/build/tooltip/Tooltip.js.map +1 -1
  310. package/build/tooltip/Tooltip.mjs +31 -51
  311. package/build/tooltip/Tooltip.mjs.map +1 -1
  312. package/build/typeahead/Typeahead.js +5 -5
  313. package/build/typeahead/Typeahead.mjs +5 -5
  314. package/build/types/badge/BadgeAssets.d.ts.map +1 -1
  315. package/build/types/common/locale/index.d.ts +1 -1
  316. package/build/types/common/locale/index.d.ts.map +1 -1
  317. package/build/types/common/panel/Panel.d.ts.map +1 -1
  318. package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
  319. package/build/types/index.d.ts +2 -2
  320. package/build/types/index.d.ts.map +1 -1
  321. package/build/types/moneyInput/MoneyInput.d.ts +6 -0
  322. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  323. package/build/types/moneyInput/currencyFormatting.d.ts +4 -3
  324. package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
  325. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +11 -2
  326. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  327. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +3 -8
  328. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  329. package/build/types/prompt/index.d.ts +0 -2
  330. package/build/types/prompt/index.d.ts.map +1 -1
  331. package/build/types/test-utils/index.d.ts +0 -4
  332. package/build/types/test-utils/index.d.ts.map +1 -1
  333. package/build/types/tooltip/Tooltip.d.ts.map +1 -1
  334. package/build/upload/Upload.js +1 -0
  335. package/build/upload/Upload.js.map +1 -1
  336. package/build/upload/Upload.mjs +1 -0
  337. package/build/upload/Upload.mjs.map +1 -1
  338. package/build/upload/steps/completeStep/completeStep.js +1 -0
  339. package/build/upload/steps/completeStep/completeStep.js.map +1 -1
  340. package/build/upload/steps/completeStep/completeStep.mjs +1 -0
  341. package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
  342. package/build/upload/steps/processingStep/processingStep.js +1 -0
  343. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  344. package/build/upload/steps/processingStep/processingStep.mjs +1 -0
  345. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  346. package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -0
  347. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  348. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -0
  349. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  350. package/build/uploadInput/UploadInput.js +1 -0
  351. package/build/uploadInput/UploadInput.js.map +1 -1
  352. package/build/uploadInput/UploadInput.mjs +1 -0
  353. package/build/uploadInput/UploadInput.mjs.map +1 -1
  354. package/build/uploadInput/uploadButton/UploadButton.js +1 -0
  355. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  356. package/build/uploadInput/uploadButton/UploadButton.mjs +1 -0
  357. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  358. package/build/uploadInput/uploadButton/defaults.js +1 -0
  359. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  360. package/build/uploadInput/uploadButton/defaults.mjs +1 -0
  361. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  362. package/build/uploadInput/uploadItem/UploadItem.js +1 -0
  363. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  364. package/build/uploadInput/uploadItem/UploadItem.mjs +1 -0
  365. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  366. package/build/withDisplayFormat/WithDisplayFormat.js +1 -0
  367. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  368. package/build/withDisplayFormat/WithDisplayFormat.mjs +1 -0
  369. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  370. package/package.json +14 -16
  371. package/src/avatarView/AvatarView.story.tsx +1 -1
  372. package/src/badge/BadgeAssets.tsx +2 -0
  373. package/src/common/locale/index.test.ts +13 -4
  374. package/src/common/locale/index.ts +9 -3
  375. package/src/common/panel/Panel.tsx +42 -50
  376. package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +18 -0
  377. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.test.tsx +119 -1
  378. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +4 -3
  379. package/src/i18n/en.json +0 -2
  380. package/src/index.ts +2 -2
  381. package/src/main.css +51 -130
  382. package/src/main.less +1 -3
  383. package/src/moneyInput/MoneyInput.story.tsx +10 -1
  384. package/src/moneyInput/MoneyInput.test.story.tsx +141 -1
  385. package/src/moneyInput/MoneyInput.test.tsx +45 -0
  386. package/src/moneyInput/MoneyInput.tsx +27 -3
  387. package/src/moneyInput/currencyFormatting.ts +11 -5
  388. package/src/prompt/ActionPrompt/ActionPrompt.tsx +62 -9
  389. package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +2 -9
  390. package/src/prompt/index.ts +0 -4
  391. package/src/sentimentSurface/SentimentSurface.story.tsx +17 -43
  392. package/src/styles/less/neptune.css +22 -22
  393. package/src/tooltip/Tooltip.tsx +26 -45
  394. package/build/prompt/CriticalBanner/CriticalBanner.js +0 -148
  395. package/build/prompt/CriticalBanner/CriticalBanner.js.map +0 -1
  396. package/build/prompt/CriticalBanner/CriticalBanner.mjs +0 -146
  397. package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +0 -1
  398. package/build/prompt/CriticalBanner/helpers.js +0 -29
  399. package/build/prompt/CriticalBanner/helpers.js.map +0 -1
  400. package/build/prompt/CriticalBanner/helpers.mjs +0 -26
  401. package/build/prompt/CriticalBanner/helpers.mjs.map +0 -1
  402. package/build/prompt/common/Expander/Expander.js +0 -47
  403. package/build/prompt/common/Expander/Expander.js.map +0 -1
  404. package/build/prompt/common/Expander/Expander.messages.js +0 -17
  405. package/build/prompt/common/Expander/Expander.messages.js.map +0 -1
  406. package/build/prompt/common/Expander/Expander.messages.mjs +0 -13
  407. package/build/prompt/common/Expander/Expander.messages.mjs.map +0 -1
  408. package/build/prompt/common/Expander/Expander.mjs +0 -44
  409. package/build/prompt/common/Expander/Expander.mjs.map +0 -1
  410. package/build/prompt/helpers/promptMedia.js +0 -52
  411. package/build/prompt/helpers/promptMedia.js.map +0 -1
  412. package/build/prompt/helpers/promptMedia.mjs +0 -50
  413. package/build/prompt/helpers/promptMedia.mjs.map +0 -1
  414. package/build/styles/prompt/CriticalBanner/CriticalBanner.css +0 -59
  415. package/build/styles/prompt/common/Expander/Expander.css +0 -8
  416. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +0 -40
  417. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +0 -1
  418. package/build/types/prompt/CriticalBanner/helpers.d.ts +0 -18
  419. package/build/types/prompt/CriticalBanner/helpers.d.ts.map +0 -1
  420. package/build/types/prompt/CriticalBanner/index.d.ts +0 -3
  421. package/build/types/prompt/CriticalBanner/index.d.ts.map +0 -1
  422. package/build/types/prompt/common/Expander/Expander.d.ts +0 -20
  423. package/build/types/prompt/common/Expander/Expander.d.ts.map +0 -1
  424. package/build/types/prompt/common/Expander/Expander.messages.d.ts +0 -14
  425. package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +0 -1
  426. package/build/types/prompt/helpers/promptMedia.d.ts +0 -22
  427. package/build/types/prompt/helpers/promptMedia.d.ts.map +0 -1
  428. package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +0 -131
  429. package/src/prompt/CriticalBanner/CriticalBanner.css +0 -59
  430. package/src/prompt/CriticalBanner/CriticalBanner.less +0 -64
  431. package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +0 -645
  432. package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +0 -285
  433. package/src/prompt/CriticalBanner/CriticalBanner.tsx +0 -194
  434. package/src/prompt/CriticalBanner/helpers.ts +0 -39
  435. package/src/prompt/CriticalBanner/index.ts +0 -2
  436. package/src/prompt/common/Expander/Expander.css +0 -8
  437. package/src/prompt/common/Expander/Expander.less +0 -9
  438. package/src/prompt/common/Expander/Expander.messages.ts +0 -14
  439. package/src/prompt/common/Expander/Expander.test.tsx +0 -167
  440. package/src/prompt/common/Expander/Expander.tsx +0 -83
  441. package/src/prompt/helpers/promptMedia.tsx +0 -79
@@ -1,4 +1,11 @@
1
- import { mockMatchMedia, mockResizeObserver, render, screen, userEvent } from '../../test-utils';
1
+ import {
2
+ mockMatchMedia,
3
+ mockResizeObserver,
4
+ render,
5
+ screen,
6
+ userEvent,
7
+ waitFor,
8
+ } from '../../test-utils';
2
9
 
3
10
  import { CurrencySelector } from './CurrencySelector';
4
11
 
@@ -92,6 +99,112 @@ describe('CurrencySelector', () => {
92
99
  expect(screen.getByRole('combobox')).toBeDisabled();
93
100
  });
94
101
 
102
+ it('displays formatted currency code when the currency is selected', () => {
103
+ render(<CurrencySelector options={mockCurrencies} id="id" currency="USC" labelId="labelId" />);
104
+
105
+ expect(screen.getByRole('combobox', { name: 'Select currency' })).toHaveTextContent('USDC');
106
+ });
107
+
108
+ it('displays formatted currency code in the selected option content', async () => {
109
+ render(
110
+ <CurrencySelector
111
+ options={[
112
+ {
113
+ title: 'All',
114
+ currencies: [
115
+ { code: 'USC', label: 'USDC', keywords: ['USDC'] },
116
+ { code: 'EUR', label: 'Euro', keywords: ['EUR'] },
117
+ ],
118
+ },
119
+ ]}
120
+ id="id"
121
+ currency="USC"
122
+ labelId="labelId"
123
+ onChange={jest.fn()}
124
+ />,
125
+ );
126
+
127
+ await userEvent.click(screen.getByRole('combobox'));
128
+
129
+ expect(screen.getByRole('option', { name: /^usdc/iu })).toHaveTextContent('USDC');
130
+ });
131
+
132
+ it('fires onChange with the raw currency code when selecting a formatted currency', async () => {
133
+ const onChange = jest.fn();
134
+ render(
135
+ <CurrencySelector
136
+ options={[
137
+ {
138
+ title: 'All',
139
+ currencies: [
140
+ { code: 'USC', label: 'USDC', keywords: ['USC'] },
141
+ { code: 'EUR', label: 'Euro', keywords: ['EUR'] },
142
+ ],
143
+ },
144
+ ]}
145
+ id="id"
146
+ currency="EUR"
147
+ labelId="labelId"
148
+ onChange={onChange}
149
+ />,
150
+ );
151
+
152
+ await userEvent.click(screen.getByRole('combobox'));
153
+ await userEvent.click(screen.getByRole('option', { name: /^usdc/iu }));
154
+
155
+ expect(onChange).toHaveBeenCalledWith('USC');
156
+ });
157
+
158
+ it('returns USC option when searching by the formatted code USDC', async () => {
159
+ render(
160
+ <CurrencySelector
161
+ options={mockCurrencies}
162
+ id="id"
163
+ currency="USD"
164
+ labelId="labelId"
165
+ onChange={jest.fn()}
166
+ />,
167
+ );
168
+
169
+ await userEvent.click(screen.getByRole('combobox', { name: 'Select currency' }));
170
+
171
+ await userEvent.type(
172
+ screen.getByRole('combobox', {
173
+ name: /type a currency \/ country/iu,
174
+ }),
175
+ 'USDC',
176
+ );
177
+
178
+ await waitFor(() => {
179
+ expect(screen.getByRole('option', { name: /usdc/iu })).toBeInTheDocument();
180
+ });
181
+ });
182
+
183
+ it('does not return USDC option when searching by the raw code USC', async () => {
184
+ render(
185
+ <CurrencySelector
186
+ options={mockCurrencies}
187
+ id="id"
188
+ currency="USD"
189
+ labelId="labelId"
190
+ onChange={jest.fn()}
191
+ />,
192
+ );
193
+
194
+ await userEvent.click(screen.getByRole('combobox', { name: 'Select currency' }));
195
+
196
+ await userEvent.type(
197
+ screen.getByRole('combobox', {
198
+ name: /type a currency \/ country/iu,
199
+ }),
200
+ 'USC',
201
+ );
202
+
203
+ await waitFor(() => {
204
+ expect(screen.queryByRole('option')).not.toBeInTheDocument();
205
+ });
206
+ });
207
+
95
208
  it('deduplicates currencies while searching', async () => {
96
209
  render(
97
210
  <CurrencySelector
@@ -155,6 +268,11 @@ const mockCurrencies = [
155
268
  label: 'Australian Dollar',
156
269
  keywords: ['AUD', 'australia'],
157
270
  },
271
+ {
272
+ code: 'USC',
273
+ label: 'Digital Dollar',
274
+ keywords: ['USDC', 'Digital Dollar'],
275
+ },
158
276
  ],
159
277
  },
160
278
  ];
@@ -19,6 +19,7 @@ import { useIntl } from 'react-intl';
19
19
 
20
20
  import messages from '../ExpressiveMoneyInput.messages';
21
21
  import { getLocaleCurrencyName } from '../../common';
22
+ import { formatCurrencyCode } from '@transferwise/formatting';
22
23
 
23
24
  export interface CurrencyOption {
24
25
  label?: string;
@@ -99,7 +100,7 @@ export const CurrencySelector = ({
99
100
  renderValue={({ code, label }) => {
100
101
  return (
101
102
  <SelectInputOptionContent
102
- title={code}
103
+ title={formatCurrencyCode(code)}
103
104
  note={label}
104
105
  icon={<Flag code={code} intrinsicSize={24} />}
105
106
  />
@@ -128,7 +129,7 @@ export const CurrencySelector = ({
128
129
  onClick={(event) => handleTriggerClick(event)}
129
130
  >
130
131
  <>
131
- <span aria-hidden>{currency}</span>
132
+ <span aria-hidden>{formatCurrencyCode(currency)}</span>
132
133
  <span className="sr-only">{getLocaleCurrencyName(intl, currency)}</span>
133
134
  </>
134
135
  </SelectInputTriggerButton>
@@ -203,7 +204,7 @@ const filterAndSortCurrenciesForQuery = (
203
204
  currencies
204
205
  .filter((currency) => {
205
206
  return (
206
- currency.code.toLowerCase().includes(query) ||
207
+ formatCurrencyCode(currency.code).toLowerCase().includes(query) ||
207
208
  (currency.label ?? '').toLowerCase().includes(query) ||
208
209
  currency.keywords?.some((keyword) => keyword.toLowerCase().includes(query))
209
210
  );
package/src/i18n/en.json CHANGED
@@ -16,8 +16,6 @@
16
16
  "neptune.DateLookup.selected": "selected",
17
17
  "neptune.DateLookup.twentyYears": "20 years",
18
18
  "neptune.DateLookup.year": "year",
19
- "neptune.Expander.collapseAriaLabel": "Collapse",
20
- "neptune.Expander.expandAriaLabel": "Expand",
21
19
  "neptune.ExpressiveMoneyInput.currency.search.placeholder": "Type a currency / country",
22
20
  "neptune.ExpressiveMoneyInput.currency.select.currency": "Select currency",
23
21
  "neptune.FlowNavigation.back": "back to previous step",
package/src/index.ts CHANGED
@@ -35,7 +35,7 @@ export type { HeaderProps } from './header';
35
35
  export type { EmphasisProps } from './emphasis';
36
36
  export type { FieldProps } from './field/Field';
37
37
  export type { InfoProps } from './info';
38
- export type { InlinePromptProps, ActionPromptProps, CriticalBannerProps } from './prompt';
38
+ export type { InlinePromptProps, ActionPromptProps } from './prompt';
39
39
  export type { InfoPromptProps, InfoPromptAction, InfoPromptMedia } from './prompt';
40
40
  export type { InputWithDisplayFormatProps } from './inputWithDisplayFormat';
41
41
  export type { InputProps } from './inputs/Input';
@@ -173,7 +173,7 @@ export { default as Header } from './header';
173
173
  export { default as Image } from './image';
174
174
  export { default as Info } from './info';
175
175
  export { default as InlineAlert } from './inlineAlert';
176
- export { InfoPrompt, InlinePrompt, ActionPrompt, CriticalBanner } from './prompt';
176
+ export { InfoPrompt, InlinePrompt, ActionPrompt } from './prompt';
177
177
  export { default as InputWithDisplayFormat } from './inputWithDisplayFormat';
178
178
  export { Input } from './inputs/Input';
179
179
  export { InputGroup } from './inputs/InputGroup';
package/src/main.css CHANGED
@@ -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 {
@@ -32176,114 +32176,6 @@ html:not([dir="rtl"]) .np-navigation-option {
32176
32176
  padding: 0;
32177
32177
  }
32178
32178
 
32179
- .wds-action-prompt {
32180
- --Prompt-padding: var(--size-16);
32181
- --Prompt-actions-gap: var(--size-8);
32182
- --Prompt-gap: var(--size-10) var(--size-16);
32183
- --Prompt-border-radius: var(--radius-large);
32184
- }
32185
-
32186
- .wds-action-prompt--media-image {
32187
- width: 48px;
32188
- width: var(--size-48);
32189
- height: 48px;
32190
- height: var(--size-48);
32191
- -o-object-fit: contain;
32192
- object-fit: contain;
32193
- }
32194
-
32195
- @media (max-width: 767px) {
32196
- .wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
32197
- flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
32198
- min-width: -moz-fit-content;
32199
- min-width: fit-content;
32200
- }
32201
- }
32202
-
32203
- .wds-action-prompt__content {
32204
- max-width: calc(48px * 10);
32205
- max-width: calc(var(--size-48) * 10);
32206
- }
32207
-
32208
- .wds-critical-banner {
32209
- --Prompt-padding: var(--size-16);
32210
- --Prompt-actions-gap: var(--size-8);
32211
- --Prompt-gap: var(--size-10) var(--size-16);
32212
- --Prompt-border-radius: 0;
32213
- /* Override PrimitivePrompt's --screen-sm-max actions behaviour:
32214
- actions only go full-width below 480px (--screen-xs) */
32215
- }
32216
-
32217
- .wds-critical-banner__mobile--collapsed {
32218
- max-height: 30vh;
32219
- }
32220
-
32221
- .wds-critical-banner--media-image {
32222
- width: 48px;
32223
- width: var(--size-48);
32224
- height: 48px;
32225
- height: var(--size-48);
32226
- -o-object-fit: contain;
32227
- object-fit: contain;
32228
- }
32229
-
32230
- .wds-critical-banner__title--collapsed {
32231
- display: -webkit-box;
32232
- -webkit-line-clamp: 2;
32233
- line-clamp: 2;
32234
- -webkit-box-orient: vertical;
32235
- overflow: hidden;
32236
- }
32237
-
32238
- .wds-critical-banner__description--collapsed {
32239
- display: -webkit-box;
32240
- -webkit-line-clamp: 2;
32241
- line-clamp: 2;
32242
- -webkit-box-orient: vertical;
32243
- overflow: hidden;
32244
- }
32245
-
32246
- .wds-critical-banner .wds-prompt__content-wrapper {
32247
- grid-template-columns: auto 1fr auto;
32248
- align-items: flex-start;
32249
- }
32250
-
32251
- .wds-critical-banner__text-wrapper {
32252
- min-width: 0;
32253
- max-width: 480px;
32254
- height: 100%;
32255
- }
32256
-
32257
- .wds-critical-banner .wds-prompt__actions-wrapper {
32258
- grid-column-start: 2;
32259
- grid-column-end: 3;
32260
- }
32261
-
32262
- @media not (min-width: 480px) {
32263
- .wds-critical-banner .wds-prompt__actions-wrapper {
32264
- grid-column: span 3;
32265
- width: 100%;
32266
- }
32267
- }
32268
-
32269
- @media not (min-width: 480px) {
32270
- .wds-critical-banner--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
32271
- flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
32272
- min-width: -moz-fit-content;
32273
- min-width: fit-content;
32274
- }
32275
- }
32276
-
32277
- .wds-expander-toggle {
32278
- align-self: flex-start;
32279
- flex-shrink: 0;
32280
- transition: transform 0.2s ease-in-out;
32281
- }
32282
-
32283
- .wds-expander-toggle--collapsed {
32284
- transform: rotate(180deg);
32285
- }
32286
-
32287
32179
  .wds-radio-group .np-radio:last-child label {
32288
32180
  margin-bottom: 0;
32289
32181
  }
@@ -34708,3 +34600,32 @@ html:not([dir="rtl"]) .np-navigation-option {
34708
34600
  .np-list-item__action {
34709
34601
  flex-shrink: 0;
34710
34602
  }
34603
+
34604
+ .wds-action-prompt {
34605
+ --Prompt-padding: var(--size-16);
34606
+ --Prompt-actions-gap: var(--size-8);
34607
+ --Prompt-gap: var(--size-10) var(--size-16);
34608
+ --Prompt-border-radius: var(--radius-large);
34609
+ }
34610
+
34611
+ .wds-action-prompt--media-image {
34612
+ width: 48px;
34613
+ width: var(--size-48);
34614
+ height: 48px;
34615
+ height: var(--size-48);
34616
+ -o-object-fit: contain;
34617
+ object-fit: contain;
34618
+ }
34619
+
34620
+ @media (max-width: 767px) {
34621
+ .wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
34622
+ flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
34623
+ min-width: -moz-fit-content;
34624
+ min-width: fit-content;
34625
+ }
34626
+ }
34627
+
34628
+ .wds-action-prompt__content {
34629
+ max-width: calc(48px * 10);
34630
+ max-width: calc(var(--size-48) * 10);
34631
+ }
package/src/main.less CHANGED
@@ -66,9 +66,6 @@
66
66
  @import "./prompt/PrimitivePrompt/PrimitivePrompt.less";
67
67
  @import "./prompt/InlinePrompt/InlinePrompt.less";
68
68
  @import "./prompt/InfoPrompt/InfoPrompt.less";
69
- @import "./prompt/ActionPrompt/ActionPrompt.less";
70
- @import "./prompt/CriticalBanner/CriticalBanner.less";
71
- @import "./prompt/common/Expander/Expander.less";
72
69
  @import "./radioGroup/RadioGroup.less";
73
70
  @import "./section/Section.less";
74
71
  @import "./slidingPanel/SlidingPanel.less";
@@ -93,6 +90,7 @@
93
90
  @import "./progress/Progress.less";
94
91
  @import "./progressBar/ProgressBar.less";
95
92
  @import "./legacylistItem/LegacyListItem.less";
93
+ @import "./prompt/ActionPrompt/ActionPrompt.less";
96
94
 
97
95
  // List all less files in src in alphabetical order: find -s src -type f -name '*.less' ! -name 'main.less'
98
96
  // Make sure you are not referencing main.less itself in this file!
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { within, userEvent } from 'storybook/test';
2
+ import { within, userEvent, expect } from 'storybook/test';
3
3
  import { Lock } from '@transferwise/icons';
4
4
  import { useState } from 'react';
5
5
 
@@ -155,6 +155,15 @@ export const BalanceCurrencies: Story = {
155
155
  },
156
156
  };
157
157
 
158
+ export const WithDecimals: Story = {
159
+ args: {
160
+ currencies: [],
161
+ selectedCurrency: exampleCurrency.eur,
162
+ decimals: 4,
163
+ amount: 1234.1412,
164
+ },
165
+ };
166
+
158
167
  export const OpenedInput: Story = {
159
168
  ...MultipleCurrencies,
160
169
  play: async ({ canvasElement }) => {
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { within, fireEvent } from 'storybook/test';
2
+ import { within, userEvent, fireEvent, expect } from 'storybook/test';
3
3
  import { allModes } from '../../.storybook/modes';
4
4
  import { lorem500 } from '../test-utils';
5
5
  import { Field } from '../field/Field';
@@ -102,3 +102,143 @@ export const SmoothScrollReset: Story = {
102
102
  },
103
103
  },
104
104
  };
105
+
106
+ export const WithDecimals: Story = {
107
+ args: {
108
+ currencies: [],
109
+ decimals: 4,
110
+ amount: 1234.5678,
111
+ },
112
+ play: async ({ canvas }) => {
113
+ const input = canvas.getByRole('textbox');
114
+ await expect(input).toHaveValue('1,234.5678');
115
+ await userEvent.clear(input);
116
+ await userEvent.type(input, '99.123456789');
117
+ await userEvent.tab();
118
+ await expect(input).toHaveValue('99.1235');
119
+ },
120
+ };
121
+
122
+ const eur = {
123
+ value: 'EUR',
124
+ label: 'EUR',
125
+ note: 'Euro',
126
+ currency: 'eur',
127
+ } as const;
128
+
129
+ const bhd = {
130
+ value: 'BHD',
131
+ label: 'BHD',
132
+ note: 'Bahraini dinar',
133
+ currency: 'bhd',
134
+ } as const;
135
+
136
+ const jpy = {
137
+ value: 'JPY',
138
+ label: 'JPY',
139
+ note: 'Japanese yen',
140
+ currency: 'jpy',
141
+ } as const;
142
+
143
+ const sharedProps = {
144
+ currencies: [],
145
+ onAmountChange: () => {},
146
+ onCurrencyChange: () => {},
147
+ } as const;
148
+
149
+ function Row({
150
+ label,
151
+ amount,
152
+ currency,
153
+ decimals,
154
+ }: {
155
+ label: string;
156
+ amount: number;
157
+ currency: { value: string; label: string; note: string; currency: string };
158
+ decimals: number;
159
+ }) {
160
+ return (
161
+ <div
162
+ style={{
163
+ display: 'grid',
164
+ gridTemplateColumns: '240px 1fr 1fr',
165
+ gap: 12,
166
+ alignItems: 'center',
167
+ }}
168
+ >
169
+ <Body as="span" style={{ fontSize: 13, color: '#6b7280' }}>
170
+ {label}
171
+ </Body>
172
+ <Field label={`No decimals prop (${currency.value})`}>
173
+ <MoneyInput {...sharedProps} selectedCurrency={currency} amount={amount} />
174
+ </Field>
175
+ <Field label={`decimals={${decimals}} (${currency.value})`}>
176
+ <MoneyInput
177
+ {...sharedProps}
178
+ selectedCurrency={currency}
179
+ amount={amount}
180
+ decimals={decimals}
181
+ />
182
+ </Field>
183
+ </div>
184
+ );
185
+ }
186
+
187
+ /**
188
+ * Side-by-side comparison of formatAmount (no decimals prop) vs formatNumber (with decimals prop)
189
+ * when decimals matches the currency default. Differences indicate a formatting parity issue.
190
+ *
191
+ * Problem 1: Trailing zero stripping — formatAmount strips ".00" for whole numbers,
192
+ * formatNumber always pads to the requested precision.
193
+ *
194
+ * Problem 2: BHD decimal count — formatAmount renders 2 fractional digits for BHD,
195
+ * but the currencyDecimals map says BHD has 3. formatNumber with decimals=3 shows 3.
196
+ */
197
+ export const DecimalsFormatParity: Story = {
198
+ render: () => (
199
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
200
+ <Body as="p" style={{ fontWeight: 600, marginTop: 8 }}>
201
+ EUR — whole numbers (trailing zero stripping)
202
+ </Body>
203
+ <Row label="amount=0" amount={0} currency={eur} decimals={2} />
204
+ <Row label="amount=1" amount={1} currency={eur} decimals={2} />
205
+ <Row label="amount=42" amount={42} currency={eur} decimals={2} />
206
+ <Row label="amount=100" amount={100} currency={eur} decimals={2} />
207
+ <Row label="amount=1000" amount={1000} currency={eur} decimals={2} />
208
+ <Row label="amount=9999999" amount={9999999} currency={eur} decimals={2} />
209
+
210
+ <Body as="p" style={{ fontWeight: 600, marginTop: 8 }}>
211
+ EUR — fractional amounts (should match)
212
+ </Body>
213
+ <Row label="amount=0.01" amount={0.01} currency={eur} decimals={2} />
214
+ <Row label="amount=0.1" amount={0.1} currency={eur} decimals={2} />
215
+ <Row label="amount=99.9" amount={99.9} currency={eur} decimals={2} />
216
+ <Row label="amount=1234567.89" amount={1234567.89} currency={eur} decimals={2} />
217
+
218
+ <Body as="p" style={{ fontWeight: 600, marginTop: 8 }}>
219
+ BHD — all amounts (formatAmount uses 2 digits, formatNumber uses 3)
220
+ </Body>
221
+ <Row label="amount=0" amount={0} currency={bhd} decimals={3} />
222
+ <Row label="amount=0.001" amount={0.001} currency={bhd} decimals={3} />
223
+ <Row label="amount=0.01" amount={0.01} currency={bhd} decimals={3} />
224
+ <Row label="amount=0.1" amount={0.1} currency={bhd} decimals={3} />
225
+ <Row label="amount=42" amount={42} currency={bhd} decimals={3} />
226
+ <Row label="amount=99.9" amount={99.9} currency={bhd} decimals={3} />
227
+ <Row label="amount=999.99" amount={999.99} currency={bhd} decimals={3} />
228
+ <Row label="amount=1234567.89" amount={1234567.89} currency={bhd} decimals={3} />
229
+
230
+ <Body as="p" style={{ fontWeight: 600, marginTop: 8 }}>
231
+ JPY — zero-decimal currency (should always match)
232
+ </Body>
233
+ <Row label="amount=0" amount={0} currency={jpy} decimals={0} />
234
+ <Row label="amount=1" amount={1} currency={jpy} decimals={0} />
235
+ <Row label="amount=1000" amount={1000} currency={jpy} decimals={0} />
236
+ <Row label="amount=1234567" amount={1234567} currency={jpy} decimals={0} />
237
+ </div>
238
+ ),
239
+ parameters: {
240
+ chromatic: {
241
+ disableSnapshot: true,
242
+ },
243
+ },
244
+ };