@transferwise/components 0.0.0-experimental-4c97d70 → 0.0.0-experimental-862fadc

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 (450) 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 +50 -54
  82. package/build/common/panel/Panel.js.map +1 -1
  83. package/build/common/panel/Panel.mjs +55 -59
  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 +66 -133
  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 +2 -1
  256. package/build/select/Select.js.map +1 -1
  257. package/build/select/Select.mjs +2 -1
  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 +33 -22
  276. package/build/styles/less/neptune-tokens.less +5 -4
  277. package/build/styles/main.css +66 -133
  278. package/build/styles/modal/Modal.css +2 -2
  279. package/build/styles/props/neptune-tokens.css +3 -2
  280. package/build/styles/select/Select.css +2 -1
  281. package/build/styles/styles/less/neptune.css +33 -22
  282. package/build/summary/Summary.js +1 -0
  283. package/build/summary/Summary.js.map +1 -1
  284. package/build/summary/Summary.mjs +1 -0
  285. package/build/summary/Summary.mjs.map +1 -1
  286. package/build/table/Table.js +1 -0
  287. package/build/table/Table.js.map +1 -1
  288. package/build/table/Table.mjs +1 -0
  289. package/build/table/Table.mjs.map +1 -1
  290. package/build/table/TableRow.js +1 -0
  291. package/build/table/TableRow.js.map +1 -1
  292. package/build/table/TableRow.mjs +1 -0
  293. package/build/table/TableRow.mjs.map +1 -1
  294. package/build/table/TableStatusText.js +1 -0
  295. package/build/table/TableStatusText.js.map +1 -1
  296. package/build/table/TableStatusText.mjs +1 -0
  297. package/build/table/TableStatusText.mjs.map +1 -1
  298. package/build/tabs/Tabs.js +1 -0
  299. package/build/tabs/Tabs.js.map +1 -1
  300. package/build/tabs/Tabs.mjs +1 -0
  301. package/build/tabs/Tabs.mjs.map +1 -1
  302. package/build/tile/Tile.js +1 -0
  303. package/build/tile/Tile.js.map +1 -1
  304. package/build/tile/Tile.mjs +1 -0
  305. package/build/tile/Tile.mjs.map +1 -1
  306. package/build/title/Title.js +1 -0
  307. package/build/title/Title.js.map +1 -1
  308. package/build/title/Title.mjs +1 -0
  309. package/build/title/Title.mjs.map +1 -1
  310. package/build/tooltip/Tooltip.js +30 -50
  311. package/build/tooltip/Tooltip.js.map +1 -1
  312. package/build/tooltip/Tooltip.mjs +31 -51
  313. package/build/tooltip/Tooltip.mjs.map +1 -1
  314. package/build/typeahead/Typeahead.js +5 -5
  315. package/build/typeahead/Typeahead.mjs +5 -5
  316. package/build/types/badge/BadgeAssets.d.ts.map +1 -1
  317. package/build/types/common/locale/index.d.ts +1 -1
  318. package/build/types/common/locale/index.d.ts.map +1 -1
  319. package/build/types/common/panel/Panel.d.ts.map +1 -1
  320. package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
  321. package/build/types/index.d.ts +2 -2
  322. package/build/types/index.d.ts.map +1 -1
  323. package/build/types/moneyInput/MoneyInput.d.ts +6 -0
  324. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  325. package/build/types/moneyInput/currencyFormatting.d.ts +4 -3
  326. package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
  327. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +11 -2
  328. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  329. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +3 -8
  330. package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  331. package/build/types/prompt/index.d.ts +0 -2
  332. package/build/types/prompt/index.d.ts.map +1 -1
  333. package/build/types/test-utils/index.d.ts +0 -4
  334. package/build/types/test-utils/index.d.ts.map +1 -1
  335. package/build/types/tooltip/Tooltip.d.ts.map +1 -1
  336. package/build/upload/Upload.js +1 -0
  337. package/build/upload/Upload.js.map +1 -1
  338. package/build/upload/Upload.mjs +1 -0
  339. package/build/upload/Upload.mjs.map +1 -1
  340. package/build/upload/steps/completeStep/completeStep.js +1 -0
  341. package/build/upload/steps/completeStep/completeStep.js.map +1 -1
  342. package/build/upload/steps/completeStep/completeStep.mjs +1 -0
  343. package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
  344. package/build/upload/steps/processingStep/processingStep.js +1 -0
  345. package/build/upload/steps/processingStep/processingStep.js.map +1 -1
  346. package/build/upload/steps/processingStep/processingStep.mjs +1 -0
  347. package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
  348. package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -0
  349. package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
  350. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -0
  351. package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
  352. package/build/uploadInput/UploadInput.js +1 -0
  353. package/build/uploadInput/UploadInput.js.map +1 -1
  354. package/build/uploadInput/UploadInput.mjs +1 -0
  355. package/build/uploadInput/UploadInput.mjs.map +1 -1
  356. package/build/uploadInput/uploadButton/UploadButton.js +1 -0
  357. package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
  358. package/build/uploadInput/uploadButton/UploadButton.mjs +1 -0
  359. package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
  360. package/build/uploadInput/uploadButton/defaults.js +1 -0
  361. package/build/uploadInput/uploadButton/defaults.js.map +1 -1
  362. package/build/uploadInput/uploadButton/defaults.mjs +1 -0
  363. package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
  364. package/build/uploadInput/uploadItem/UploadItem.js +1 -0
  365. package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
  366. package/build/uploadInput/uploadItem/UploadItem.mjs +1 -0
  367. package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
  368. package/build/withDisplayFormat/WithDisplayFormat.js +1 -0
  369. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  370. package/build/withDisplayFormat/WithDisplayFormat.mjs +1 -0
  371. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  372. package/package.json +19 -21
  373. package/src/avatarView/AvatarView.story.tsx +1 -1
  374. package/src/avatarView/AvatarView.test.story.tsx +108 -1
  375. package/src/badge/BadgeAssets.tsx +2 -0
  376. package/src/common/locale/index.test.ts +13 -4
  377. package/src/common/locale/index.ts +9 -3
  378. package/src/common/panel/Panel.tsx +56 -49
  379. package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +18 -0
  380. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.test.tsx +119 -1
  381. package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +4 -3
  382. package/src/i18n/en.json +0 -2
  383. package/src/index.ts +2 -2
  384. package/src/main.css +66 -133
  385. package/src/main.less +1 -3
  386. package/src/modal/Modal.css +2 -2
  387. package/src/modal/Modal.less +1 -1
  388. package/src/moneyInput/MoneyInput.story.tsx +10 -1
  389. package/src/moneyInput/MoneyInput.test.story.tsx +141 -1
  390. package/src/moneyInput/MoneyInput.test.tsx +45 -0
  391. package/src/moneyInput/MoneyInput.tsx +27 -3
  392. package/src/moneyInput/currencyFormatting.ts +11 -5
  393. package/src/prompt/ActionPrompt/ActionPrompt.tsx +62 -9
  394. package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +2 -9
  395. package/src/prompt/index.ts +0 -4
  396. package/src/select/Select.css +2 -1
  397. package/src/select/Select.less +6 -5
  398. package/src/select/Select.test.story.tsx +59 -0
  399. package/src/select/Select.tsx +1 -1
  400. package/src/sentimentSurface/SentimentSurface.story.tsx +17 -43
  401. package/src/styles/less/neptune.css +33 -22
  402. package/src/tooltip/Tooltip.tsx +26 -45
  403. package/build/prompt/CriticalBanner/CriticalBanner.js +0 -143
  404. package/build/prompt/CriticalBanner/CriticalBanner.js.map +0 -1
  405. package/build/prompt/CriticalBanner/CriticalBanner.mjs +0 -141
  406. package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +0 -1
  407. package/build/prompt/CriticalBanner/helpers.js +0 -29
  408. package/build/prompt/CriticalBanner/helpers.js.map +0 -1
  409. package/build/prompt/CriticalBanner/helpers.mjs +0 -26
  410. package/build/prompt/CriticalBanner/helpers.mjs.map +0 -1
  411. package/build/prompt/common/Expander/Expander.js +0 -47
  412. package/build/prompt/common/Expander/Expander.js.map +0 -1
  413. package/build/prompt/common/Expander/Expander.messages.js +0 -17
  414. package/build/prompt/common/Expander/Expander.messages.js.map +0 -1
  415. package/build/prompt/common/Expander/Expander.messages.mjs +0 -13
  416. package/build/prompt/common/Expander/Expander.messages.mjs.map +0 -1
  417. package/build/prompt/common/Expander/Expander.mjs +0 -44
  418. package/build/prompt/common/Expander/Expander.mjs.map +0 -1
  419. package/build/prompt/helpers/promptMedia.js +0 -52
  420. package/build/prompt/helpers/promptMedia.js.map +0 -1
  421. package/build/prompt/helpers/promptMedia.mjs +0 -50
  422. package/build/prompt/helpers/promptMedia.mjs.map +0 -1
  423. package/build/styles/prompt/CriticalBanner/CriticalBanner.css +0 -59
  424. package/build/styles/prompt/common/Expander/Expander.css +0 -8
  425. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +0 -33
  426. package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +0 -1
  427. package/build/types/prompt/CriticalBanner/helpers.d.ts +0 -18
  428. package/build/types/prompt/CriticalBanner/helpers.d.ts.map +0 -1
  429. package/build/types/prompt/CriticalBanner/index.d.ts +0 -3
  430. package/build/types/prompt/CriticalBanner/index.d.ts.map +0 -1
  431. package/build/types/prompt/common/Expander/Expander.d.ts +0 -20
  432. package/build/types/prompt/common/Expander/Expander.d.ts.map +0 -1
  433. package/build/types/prompt/common/Expander/Expander.messages.d.ts +0 -14
  434. package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +0 -1
  435. package/build/types/prompt/helpers/promptMedia.d.ts +0 -22
  436. package/build/types/prompt/helpers/promptMedia.d.ts.map +0 -1
  437. package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +0 -113
  438. package/src/prompt/CriticalBanner/CriticalBanner.css +0 -59
  439. package/src/prompt/CriticalBanner/CriticalBanner.less +0 -64
  440. package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +0 -632
  441. package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +0 -285
  442. package/src/prompt/CriticalBanner/CriticalBanner.tsx +0 -182
  443. package/src/prompt/CriticalBanner/helpers.ts +0 -39
  444. package/src/prompt/CriticalBanner/index.ts +0 -2
  445. package/src/prompt/common/Expander/Expander.css +0 -8
  446. package/src/prompt/common/Expander/Expander.less +0 -9
  447. package/src/prompt/common/Expander/Expander.messages.ts +0 -14
  448. package/src/prompt/common/Expander/Expander.test.tsx +0 -167
  449. package/src/prompt/common/Expander/Expander.tsx +0 -83
  450. package/src/prompt/helpers/promptMedia.tsx +0 -79
@@ -120,12 +120,12 @@ describe('locale utils', () => {
120
120
  const result = getLocaleCurrencyName(intl, 'USD');
121
121
  expect(intl.formatDisplayName).toHaveBeenCalledWith('USD', {
122
122
  type: 'currency',
123
- fallback: 'code',
123
+ fallback: 'none',
124
124
  });
125
125
  expect(result).toBe('US Dollar');
126
126
  });
127
127
 
128
- it('should return the original currency code if Intl.DisplayNames is not supported', () => {
128
+ it('should return the formatted currency code if Intl.DisplayNames is not supported', () => {
129
129
  const intl = {
130
130
  formatDisplayName: jest.fn().mockReturnValue('US Dollar'),
131
131
  } as unknown as IntlShape;
@@ -134,8 +134,17 @@ describe('locale utils', () => {
134
134
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
135
135
  (Intl as any).DisplayNames = undefined;
136
136
 
137
- const result = getLocaleCurrencyName(intl, 'USD');
138
- expect(result).toBe('USD');
137
+ const result = getLocaleCurrencyName(intl, 'USC');
138
+ expect(result).toBe('USDC');
139
+ });
140
+
141
+ it('should return the formatted code when formatDisplayName does not support the currency code', () => {
142
+ const intl = {
143
+ formatDisplayName: jest.fn().mockReturnValue(undefined),
144
+ } as unknown as IntlShape;
145
+
146
+ const result = getLocaleCurrencyName(intl, 'USC');
147
+ expect(result).toBe('USDC');
139
148
  });
140
149
  });
141
150
  });
@@ -1,4 +1,5 @@
1
1
  import { IntlShape } from 'react-intl/src/types';
2
+ import { formatCurrencyCode } from '@transferwise/formatting';
2
3
  import { Direction } from '../direction';
3
4
 
4
5
  export const DEFAULT_LANG = 'en';
@@ -105,7 +106,12 @@ export function getDirectionFromLocale(locale: string) {
105
106
  * @returns The localized currency name if Intl.DisplayNames is supported supported, otherwise returns the original currency code.
106
107
  */
107
108
  export function getLocaleCurrencyName(intl: IntlShape, currencyCode: string) {
108
- return typeof Intl.DisplayNames === 'function'
109
- ? intl.formatDisplayName(currencyCode, { type: 'currency', fallback: 'code' })
110
- : currencyCode;
109
+ if (typeof Intl.DisplayNames === 'function') {
110
+ const localisedName = intl.formatDisplayName(currencyCode, {
111
+ type: 'currency',
112
+ fallback: 'none',
113
+ });
114
+ return localisedName != null ? localisedName : formatCurrencyCode(currencyCode);
115
+ }
116
+ return formatCurrencyCode(currencyCode);
111
117
  }
@@ -1,3 +1,13 @@
1
+ import {
2
+ arrow as arrowMiddleware,
3
+ autoUpdate,
4
+ flip as flipMiddleware,
5
+ offset,
6
+ type Placement,
7
+ shift,
8
+ size as sizeMiddleware,
9
+ useFloating,
10
+ } from '@floating-ui/react';
1
11
  import { clsx } from 'clsx';
2
12
  import {
3
13
  CSSProperties,
@@ -7,21 +17,19 @@ import {
7
17
  SyntheticEvent,
8
18
  forwardRef,
9
19
  useContext,
10
- useEffect,
11
- useState,
20
+ useRef,
12
21
  } from 'react';
13
- import { usePopper } from 'react-popper';
14
22
 
15
23
  import { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';
16
24
  import Dimmer from '../../dimmer';
17
25
  import { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider';
18
26
 
19
- const POPOVER_OFFSET = [0, 16];
27
+ const POPOVER_OFFSET = 16;
20
28
 
21
29
  // By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
22
30
  // the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
23
31
  // This mapping forces popover to try the four available positions before going back to the initial chosen one.
24
- const fallbackPlacements = {
32
+ const fallbackPlacements: Record<string, Placement[]> = {
25
33
  [Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],
26
34
  [Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],
27
35
  [Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],
@@ -57,56 +65,57 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(
57
65
  }: PanelProps,
58
66
  reference,
59
67
  ) {
60
- const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);
61
- const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
68
+ const arrowRef = useRef<HTMLDivElement | null>(null);
69
+
70
+ const middleware = [];
62
71
 
63
- const modifiers = [];
72
+ if (arrow) {
73
+ middleware.push(offset(POPOVER_OFFSET));
74
+ }
75
+
76
+ if (flip && fallbackPlacements[position]) {
77
+ middleware.push(
78
+ flipMiddleware({
79
+ fallbackPlacements: fallbackPlacements[position],
80
+ }),
81
+ );
82
+ }
64
83
 
65
84
  if (altAxis) {
66
- modifiers.push({
67
- // https://popper.js.org/docs/v2/modifiers/prevent-overflow
68
- name: 'preventOverflow',
69
- options: {
70
- altAxis: true,
71
- tether: false,
72
- },
73
- });
85
+ middleware.push(shift());
74
86
  }
75
87
 
76
88
  if (arrow) {
77
- modifiers.push({
78
- name: 'arrow',
79
- options: {
80
- element: arrowElement,
81
- options: {
82
- padding: 8, // 8px from the edges of the popper
83
- },
84
- },
85
- });
86
- // This lets you displace a popper element from its reference element.
87
- modifiers.push({ name: 'offset', options: { offset: POPOVER_OFFSET } });
89
+ middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));
88
90
  }
89
- if (flip && fallbackPlacements[position]) {
90
- modifiers.push({
91
- name: 'flip',
92
- options: {
93
- fallbackPlacements: fallbackPlacements[position],
94
- },
95
- });
91
+
92
+ if (considerHeight) {
93
+ middleware.push(
94
+ sizeMiddleware({
95
+ padding: POPOVER_OFFSET,
96
+ apply: ({ elements, availableHeight }) => {
97
+ elements.floating.style.setProperty(
98
+ '--np-panel-available-height',
99
+ `${availableHeight}px`,
100
+ );
101
+ },
102
+ }),
103
+ );
96
104
  }
97
105
 
98
- const { styles, attributes, forceUpdate } = usePopper(anchorRef.current, popperElement, {
106
+ const { refs, floatingStyles, placement, middlewareData } = useFloating({
99
107
  placement: position,
100
- modifiers,
108
+ middleware,
109
+ elements: {
110
+ reference: anchorRef.current,
111
+ },
112
+ whileElementsMounted: open ? autoUpdate : undefined,
101
113
  });
102
114
 
103
- // If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),
104
- // it is most simple just to always position before opening
105
- useEffect(() => {
106
- if (open && forceUpdate) {
107
- forceUpdate();
108
- }
109
- }, [open]);
115
+ const arrowStyle: CSSProperties = {
116
+ ...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),
117
+ ...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),
118
+ };
110
119
 
111
120
  const contentStyle: CSSProperties = {
112
121
  ...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),
@@ -119,18 +128,16 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(
119
128
  <div
120
129
  id={overlayId}
121
130
  {...rest}
122
- ref={setPopperElement}
131
+ ref={refs.setFloating}
123
132
  role="dialog"
124
- style={{ ...styles.popper }}
125
- {...attributes.popper}
133
+ style={floatingStyles}
134
+ data-popper-placement={placement}
126
135
  className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}
127
136
  >
128
137
  <div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>
129
138
  {children}
130
139
  {/* Arrow has to stay inside content to get the same animations as the "dialog" and to get hidden when panel is closed. */}
131
- {arrow && (
132
- <div ref={setArrowElement} className={clsx('np-panel__arrow')} style={styles.arrow} />
133
- )}
140
+ {arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}
134
141
  </div>
135
142
  </div>
136
143
  </Dimmer>
@@ -161,6 +161,24 @@ export const WithInlinePromptSentiment = {
161
161
  },
162
162
  };
163
163
 
164
+ export const WithFormattedCurrencyCode = {
165
+ args: {
166
+ currency: 'USC',
167
+ currencySelector: {
168
+ ...getCurrencySelectorProps({ logEvents: true }),
169
+ options: [
170
+ {
171
+ title: 'Popular',
172
+ currencies: [
173
+ { code: 'USC', label: 'Digital Dollar', keywords: ['USDC', 'Digital Dollar'] },
174
+ { code: 'USD', label: 'US Dollar', keywords: ['dollar', 'us'] },
175
+ ],
176
+ },
177
+ ],
178
+ },
179
+ },
180
+ };
181
+
164
182
  export const WithSecondaryCurrencySelectorAvatar = {
165
183
  args: {
166
184
  currencySelector: getCurrencySelectorProps({ logEvents: true, secondAvatar: true }),
@@ -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';