@transferwise/components 46.37.0 → 46.39.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/README.md +1 -1
  2. package/build/index.js +179 -357
  3. package/build/index.js.map +1 -1
  4. package/build/index.mjs +173 -350
  5. package/build/index.mjs.map +1 -1
  6. package/build/main.css +127 -108
  7. package/build/styles/main.css +127 -108
  8. package/build/styles/uploadInput/UploadInput.css +25 -27
  9. package/build/styles/uploadInput/uploadButton/UploadButton.css +24 -38
  10. package/build/styles/uploadInput/uploadItem/UploadItem.css +81 -46
  11. package/build/types/actionButton/ActionButton.d.ts +2 -2
  12. package/build/types/actionButton/ActionButton.d.ts.map +1 -1
  13. package/build/types/actionOption/ActionOption.d.ts +0 -1
  14. package/build/types/actionOption/ActionOption.d.ts.map +1 -1
  15. package/build/types/alert/Alert.d.ts +0 -1
  16. package/build/types/alert/Alert.d.ts.map +1 -1
  17. package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts +4 -11
  18. package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts.map +1 -1
  19. package/build/types/alert/inlineMarkdown/index.d.ts +2 -1
  20. package/build/types/alert/inlineMarkdown/index.d.ts.map +1 -1
  21. package/build/types/avatar/Avatar.d.ts +0 -1
  22. package/build/types/avatar/Avatar.d.ts.map +1 -1
  23. package/build/types/avatar/colors/colors.d.ts.map +1 -1
  24. package/build/types/avatarWrapper/AvatarWrapper.d.ts +0 -1
  25. package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
  26. package/build/types/body/Body.d.ts +2 -2
  27. package/build/types/body/Body.d.ts.map +1 -1
  28. package/build/types/button/Button.d.ts +0 -1
  29. package/build/types/button/Button.d.ts.map +1 -1
  30. package/build/types/button/Button.messages.d.ts +3 -3
  31. package/build/types/button/classMap.d.ts +6 -6
  32. package/build/types/card/Card.d.ts +16 -20
  33. package/build/types/card/Card.d.ts.map +1 -1
  34. package/build/types/card/index.d.ts +2 -1
  35. package/build/types/card/index.d.ts.map +1 -1
  36. package/build/types/checkbox/Checkbox.d.ts +15 -20
  37. package/build/types/checkbox/Checkbox.d.ts.map +1 -1
  38. package/build/types/checkbox/index.d.ts +2 -2
  39. package/build/types/checkbox/index.d.ts.map +1 -1
  40. package/build/types/checkboxOption/CheckboxOption.d.ts +2 -3
  41. package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
  42. package/build/types/chevron/Chevron.d.ts +0 -1
  43. package/build/types/chevron/Chevron.d.ts.map +1 -1
  44. package/build/types/chips/Chip.d.ts +0 -1
  45. package/build/types/chips/Chip.d.ts.map +1 -1
  46. package/build/types/chips/Chips.d.ts +0 -1
  47. package/build/types/chips/Chips.d.ts.map +1 -1
  48. package/build/types/circularButton/CircularButton.d.ts +0 -1
  49. package/build/types/circularButton/CircularButton.d.ts.map +1 -1
  50. package/build/types/common/RadioButton/RadioButton.d.ts +0 -1
  51. package/build/types/common/RadioButton/RadioButton.d.ts.map +1 -1
  52. package/build/types/common/action/Action.d.ts +0 -1
  53. package/build/types/common/action/Action.d.ts.map +1 -1
  54. package/build/types/common/closeButton/CloseButton.d.ts +4 -5
  55. package/build/types/common/closeButton/CloseButton.d.ts.map +1 -1
  56. package/build/types/common/commonProps.d.ts +0 -1
  57. package/build/types/common/commonProps.d.ts.map +1 -1
  58. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts +1 -1
  59. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts.map +1 -1
  60. package/build/types/common/focusBoundary/FocusBoundary.d.ts +0 -1
  61. package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
  62. package/build/types/common/hooks/useDirection/useDirection.d.ts.map +1 -1
  63. package/build/types/common/hooks/useResizeObserver.d.ts +0 -1
  64. package/build/types/common/hooks/useResizeObserver.d.ts.map +1 -1
  65. package/build/types/common/panel/Panel.d.ts +8 -8
  66. package/build/types/common/panel/Panel.d.ts.map +1 -1
  67. package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts +0 -1
  68. package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts.map +1 -1
  69. package/build/types/common/responsivePanel/ResponsivePanel.d.ts +8 -9
  70. package/build/types/common/responsivePanel/ResponsivePanel.d.ts.map +1 -1
  71. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +0 -1
  72. package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
  73. package/build/types/dateInput/DateInput.d.ts +0 -1
  74. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  75. package/build/types/dateLookup/DateLookup.d.ts +1 -1
  76. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  77. package/build/types/dateLookup/dateHeader/DateHeader.d.ts +0 -1
  78. package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
  79. package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts +0 -1
  80. package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts.map +1 -1
  81. package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts +0 -1
  82. package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts.map +1 -1
  83. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +0 -1
  84. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -1
  85. package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts +0 -1
  86. package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts.map +1 -1
  87. package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts +0 -1
  88. package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
  89. package/build/types/dateLookup/tableLink/TableLink.d.ts +0 -1
  90. package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
  91. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +0 -1
  92. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -1
  93. package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts +0 -1
  94. package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -1
  95. package/build/types/decision/Decision.d.ts +1 -2
  96. package/build/types/decision/Decision.d.ts.map +1 -1
  97. package/build/types/definitionList/DefinitionList.d.ts +19 -24
  98. package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
  99. package/build/types/definitionList/index.d.ts +2 -1
  100. package/build/types/definitionList/index.d.ts.map +1 -1
  101. package/build/types/dimmer/Dimmer.d.ts.map +1 -1
  102. package/build/types/drawer/Drawer.d.ts +18 -36
  103. package/build/types/drawer/Drawer.d.ts.map +1 -1
  104. package/build/types/drawer/index.d.ts +2 -1
  105. package/build/types/drawer/index.d.ts.map +1 -1
  106. package/build/types/dropFade/DropFade.d.ts.map +1 -1
  107. package/build/types/emphasis/Emphasis.d.ts +0 -1
  108. package/build/types/emphasis/Emphasis.d.ts.map +1 -1
  109. package/build/types/field/Field.d.ts +0 -1
  110. package/build/types/field/Field.d.ts.map +1 -1
  111. package/build/types/flowNavigation/FlowNavigation.d.ts +0 -1
  112. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  113. package/build/types/flowNavigation/backButton/BackButton.d.ts +5 -17
  114. package/build/types/flowNavigation/backButton/BackButton.d.ts.map +1 -1
  115. package/build/types/flowNavigation/backButton/index.d.ts +2 -2
  116. package/build/types/flowNavigation/backButton/index.d.ts.map +1 -1
  117. package/build/types/header/Header.d.ts +0 -1
  118. package/build/types/header/Header.d.ts.map +1 -1
  119. package/build/types/image/Image.d.ts +0 -1
  120. package/build/types/image/Image.d.ts.map +1 -1
  121. package/build/types/index.d.ts +5 -0
  122. package/build/types/index.d.ts.map +1 -1
  123. package/build/types/info/Info.d.ts +2 -3
  124. package/build/types/info/Info.d.ts.map +1 -1
  125. package/build/types/info/index.d.ts +1 -1
  126. package/build/types/info/index.d.ts.map +1 -1
  127. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts +0 -1
  128. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
  129. package/build/types/inputs/Input.d.ts +0 -1
  130. package/build/types/inputs/Input.d.ts.map +1 -1
  131. package/build/types/inputs/InputGroup.d.ts +0 -1
  132. package/build/types/inputs/InputGroup.d.ts.map +1 -1
  133. package/build/types/inputs/SearchInput.d.ts +0 -1
  134. package/build/types/inputs/SearchInput.d.ts.map +1 -1
  135. package/build/types/inputs/SelectInput.d.ts +0 -1
  136. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  137. package/build/types/inputs/TextArea.d.ts +0 -1
  138. package/build/types/inputs/TextArea.d.ts.map +1 -1
  139. package/build/types/inputs/_BottomSheet.d.ts +0 -1
  140. package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
  141. package/build/types/inputs/_ButtonInput.d.ts +0 -1
  142. package/build/types/inputs/_ButtonInput.d.ts.map +1 -1
  143. package/build/types/inputs/_Popover.d.ts +0 -1
  144. package/build/types/inputs/_Popover.d.ts.map +1 -1
  145. package/build/types/inputs/contexts.d.ts +0 -1
  146. package/build/types/inputs/contexts.d.ts.map +1 -1
  147. package/build/types/label/Label.d.ts +0 -1
  148. package/build/types/label/Label.d.ts.map +1 -1
  149. package/build/types/loader/Loader.d.ts +0 -1
  150. package/build/types/loader/Loader.d.ts.map +1 -1
  151. package/build/types/logo/Logo.d.ts +15 -23
  152. package/build/types/logo/Logo.d.ts.map +1 -1
  153. package/build/types/logo/index.d.ts +1 -2
  154. package/build/types/logo/index.d.ts.map +1 -1
  155. package/build/types/markdown/Markdown.d.ts +0 -1
  156. package/build/types/markdown/Markdown.d.ts.map +1 -1
  157. package/build/types/money/Money.d.ts +0 -1
  158. package/build/types/money/Money.d.ts.map +1 -1
  159. package/build/types/moneyInput/MoneyInput.d.ts +0 -1
  160. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  161. package/build/types/navigationOption/NavigationOption.d.ts +0 -1
  162. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  163. package/build/types/overlayHeader/OverlayHeader.d.ts +9 -18
  164. package/build/types/overlayHeader/OverlayHeader.d.ts.map +1 -1
  165. package/build/types/overlayHeader/index.d.ts +2 -1
  166. package/build/types/overlayHeader/index.d.ts.map +1 -1
  167. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +0 -1
  168. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  169. package/build/types/popover/Popover.d.ts +0 -1
  170. package/build/types/popover/Popover.d.ts.map +1 -1
  171. package/build/types/progress/Progress.d.ts +0 -1
  172. package/build/types/progress/Progress.d.ts.map +1 -1
  173. package/build/types/progressBar/ProgressBar.d.ts +0 -1
  174. package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
  175. package/build/types/provider/Provider.d.ts +0 -1
  176. package/build/types/provider/Provider.d.ts.map +1 -1
  177. package/build/types/radio/Radio.d.ts +0 -1
  178. package/build/types/radio/Radio.d.ts.map +1 -1
  179. package/build/types/radioGroup/RadioGroup.d.ts +0 -1
  180. package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
  181. package/build/types/radioOption/RadioOption.d.ts +0 -1
  182. package/build/types/radioOption/RadioOption.d.ts.map +1 -1
  183. package/build/types/segmentedControl/SegmentedControl.d.ts +0 -1
  184. package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
  185. package/build/types/select/index.d.ts +1 -1
  186. package/build/types/select/index.d.ts.map +1 -1
  187. package/build/types/select/option/index.d.ts +1 -1
  188. package/build/types/select/option/index.d.ts.map +1 -1
  189. package/build/types/select/searchBox/SearchBox.d.ts +3 -3
  190. package/build/types/select/searchBox/SearchBox.d.ts.map +1 -1
  191. package/build/types/slidingPanel/SlidingPanel.d.ts +1 -1
  192. package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
  193. package/build/types/snackbar/Snackbar.d.ts +2 -1
  194. package/build/types/snackbar/Snackbar.d.ts.map +1 -1
  195. package/build/types/snackbar/SnackbarContext.d.ts +0 -1
  196. package/build/types/snackbar/SnackbarContext.d.ts.map +1 -1
  197. package/build/types/snackbar/SnackbarProvider.d.ts +0 -1
  198. package/build/types/snackbar/SnackbarProvider.d.ts.map +1 -1
  199. package/build/types/statusIcon/StatusIcon.d.ts +0 -1
  200. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  201. package/build/types/sticky/Sticky.d.ts +32 -4
  202. package/build/types/sticky/Sticky.d.ts.map +1 -1
  203. package/build/types/switchOption/SwitchOption.d.ts +0 -1
  204. package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
  205. package/build/types/tabs/TabList.d.ts +1 -1
  206. package/build/types/tabs/TabPanel.d.ts +4 -4
  207. package/build/types/tabs/Tabs.d.ts.map +1 -1
  208. package/build/types/test-utils/story-config.d.ts +8 -0
  209. package/build/types/test-utils/story-config.d.ts.map +1 -1
  210. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts +0 -1
  211. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
  212. package/build/types/tile/Tile.d.ts +16 -37
  213. package/build/types/tile/Tile.d.ts.map +1 -1
  214. package/build/types/tile/index.d.ts +1 -1
  215. package/build/types/tile/index.d.ts.map +1 -1
  216. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  217. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts +0 -1
  218. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
  219. package/build/types/typeahead/util/highlight.d.ts +0 -1
  220. package/build/types/typeahead/util/highlight.d.ts.map +1 -1
  221. package/build/types/upload/Upload.d.ts.map +1 -1
  222. package/build/types/upload/Upload.messages.d.ts +20 -20
  223. package/build/types/upload/steps/completeStep/completeStep.d.ts +10 -10
  224. package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +8 -8
  225. package/build/types/upload/steps/processingStep/processingStep.d.ts +8 -8
  226. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +9 -9
  227. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
  228. package/build/types/uploadInput/UploadInput.d.ts +0 -1
  229. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  230. package/build/types/uploadInput/types.d.ts +9 -1
  231. package/build/types/uploadInput/types.d.ts.map +1 -1
  232. package/build/types/uploadInput/uploadButton/UploadButton.d.ts +1 -6
  233. package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
  234. package/build/types/uploadInput/uploadItem/UploadItem.d.ts +0 -1
  235. package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
  236. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  237. package/build/types/withNextPortal/withNextPortal.d.ts +0 -1
  238. package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
  239. package/package.json +24 -27
  240. package/src/accordion/Accordion.spec.js +5 -5
  241. package/src/accordion/AccordionItem/AccordionItem.spec.js +2 -2
  242. package/src/actionButton/ActionButton.spec.tsx +4 -5
  243. package/src/alert/Alert.spec.tsx +4 -4
  244. package/src/alert/Alert.story.tsx +6 -5
  245. package/src/alert/inlineMarkdown/InlineMarkdown.tsx +13 -0
  246. package/src/alert/inlineMarkdown/index.ts +2 -0
  247. package/src/button/Button.spec.js +4 -5
  248. package/src/card/{Card.spec.js → Card.spec.tsx} +4 -4
  249. package/src/card/{Card.story.js → Card.story.tsx} +6 -15
  250. package/src/card/{Card.js → Card.tsx} +23 -34
  251. package/src/card/index.ts +2 -0
  252. package/src/carousel/Carousel.spec.tsx +17 -17
  253. package/src/checkbox/{Checkbox.spec.js → Checkbox.spec.tsx} +5 -7
  254. package/src/checkbox/{Checkbox.js → Checkbox.tsx} +19 -41
  255. package/src/checkbox/index.ts +2 -0
  256. package/src/checkboxButton/CheckboxButton.spec.tsx +0 -2
  257. package/src/checkboxOption/CheckboxOption.spec.tsx +0 -2
  258. package/src/chevron/Chevron.spec.tsx +0 -1
  259. package/src/chips/Chips.spec.tsx +0 -1
  260. package/src/chips/Chips.story.tsx +5 -3
  261. package/src/circularButton/CircularButton.spec.tsx +4 -5
  262. package/src/common/RadioButton/RadioButton.spec.tsx +2 -2
  263. package/src/common/card/Card.story.tsx +1 -0
  264. package/src/common/closeButton/CloseButton.spec.tsx +0 -1
  265. package/src/common/flowHeader/FlowHeader.spec.tsx +0 -1
  266. package/src/dateInput/DateInput.story.tsx +21 -16
  267. package/src/dateLookup/DateLookup.rtl.spec.tsx +18 -16
  268. package/src/dateLookup/DateLookup.testingLibrary.spec.js +47 -44
  269. package/src/dateLookup/DateLookup.tests.story.tsx +4 -2
  270. package/src/decision/Decision.spec.js +0 -2
  271. package/src/decision/Decision.tsx +1 -1
  272. package/src/definitionList/{DefinitionList.story.js → DefinitionList.story.tsx} +22 -2
  273. package/src/definitionList/DefinitionList.tsx +95 -0
  274. package/src/definitionList/index.ts +2 -0
  275. package/src/dimmer/Dimmer.rtl.spec.js +10 -10
  276. package/src/drawer/{Drawer.rtl.spec.js → Drawer.rtl.spec.tsx} +6 -4
  277. package/src/drawer/{Drawer.story.js → Drawer.story.tsx} +20 -28
  278. package/src/drawer/{Drawer.js → Drawer.tsx} +26 -31
  279. package/src/drawer/index.ts +2 -0
  280. package/src/emphasis/Emphasis.spec.tsx +0 -1
  281. package/src/field/Field.spec.tsx +2 -2
  282. package/src/flowNavigation/FlowNavigation.spec.js +0 -2
  283. package/src/flowNavigation/animatedLabel/AnimatedLabel.spec.js +0 -1
  284. package/src/flowNavigation/backButton/BackButton.tsx +29 -0
  285. package/src/flowNavigation/backButton/index.ts +2 -0
  286. package/src/header/Header.spec.tsx +6 -6
  287. package/src/image/Image.spec.tsx +0 -1
  288. package/src/index.ts +5 -0
  289. package/src/info/Info.story.tsx +15 -9
  290. package/src/info/Info.tsx +2 -2
  291. package/src/info/index.ts +1 -1
  292. package/src/inlineAlert/InlineAlert.spec.tsx +0 -1
  293. package/src/inputs/SelectInput.spec.tsx +26 -47
  294. package/src/link/Link.spec.tsx +0 -1
  295. package/src/listItem/ListItem.spec.tsx +0 -1
  296. package/src/logo/Logo.story.tsx +3 -6
  297. package/src/logo/{Logo.js → Logo.tsx} +25 -35
  298. package/src/logo/index.ts +1 -0
  299. package/src/main.css +127 -108
  300. package/src/moneyInput/MoneyInput.rtl.spec.tsx +2 -2
  301. package/src/moneyInput/MoneyInput.story.tsx +1 -4
  302. package/src/overlayHeader/{OverlayHeader.spec.js → OverlayHeader.spec.tsx} +1 -1
  303. package/src/overlayHeader/{OverlayHeader.story.js → OverlayHeader.story.tsx} +10 -2
  304. package/src/overlayHeader/{OverlayHeader.js → OverlayHeader.tsx} +12 -19
  305. package/src/overlayHeader/index.ts +2 -0
  306. package/src/phoneNumberInput/PhoneNumberInput.story.tsx +1 -0
  307. package/src/popover/Popover.spec.tsx +10 -10
  308. package/src/progress/Progress.spec.tsx +0 -1
  309. package/src/progressBar/ProgressBar.spec.tsx +0 -1
  310. package/src/section/Section.story.tsx +0 -2
  311. package/src/segmentedControl/SegmentedControl.spec.tsx +10 -11
  312. package/src/select/Select.spec.js +71 -71
  313. package/src/slidingPanel/SlidingPanel.spec.js +2 -1
  314. package/src/slidingPanel/SlidingPanel.tsx +3 -0
  315. package/src/snackbar/Snackbar.story.tsx +20 -100
  316. package/src/snackbar/Snackbar.tests.story.tsx +281 -0
  317. package/src/snackbar/Snackbar.tsx +8 -12
  318. package/src/sticky/Sticky.spec.tsx +71 -0
  319. package/src/sticky/Sticky.story.tsx +72 -15
  320. package/src/sticky/Sticky.tsx +49 -5
  321. package/src/test-utils/Parameters.d.ts +8 -0
  322. package/src/test-utils/index.js +1 -1
  323. package/src/test-utils/jest.setup.js +2 -0
  324. package/src/test-utils/story-config.ts +5 -0
  325. package/src/tile/{Tile.spec.js → Tile.spec.tsx} +1 -1
  326. package/src/tile/{Tile.js → Tile.tsx} +24 -35
  327. package/src/tooltip/Tooltip.spec.tsx +15 -16
  328. package/src/uploadInput/UploadInput.css +25 -27
  329. package/src/uploadInput/UploadInput.less +24 -23
  330. package/src/uploadInput/UploadInput.spec.tsx +9 -10
  331. package/src/uploadInput/UploadInput.story.tsx +8 -130
  332. package/src/uploadInput/UploadInput.tests.story.tsx +212 -0
  333. package/src/uploadInput/UploadInput.tsx +1 -4
  334. package/src/uploadInput/types.ts +11 -1
  335. package/src/uploadInput/uploadButton/UploadButton.css +24 -38
  336. package/src/uploadInput/uploadButton/UploadButton.less +27 -40
  337. package/src/uploadInput/uploadButton/UploadButton.spec.tsx +4 -5
  338. package/src/uploadInput/uploadButton/UploadButton.tsx +12 -37
  339. package/src/uploadInput/uploadItem/UploadItem.css +81 -46
  340. package/src/uploadInput/uploadItem/UploadItem.less +75 -40
  341. package/src/uploadInput/uploadItem/UploadItem.spec.tsx +4 -4
  342. package/src/uploadInput/uploadItem/UploadItem.tsx +30 -25
  343. package/src/uploadInput/uploadItem/UploadItemBody.tsx +1 -1
  344. package/build/types/logo/logoTypes.d.ts +0 -6
  345. package/build/types/logo/logoTypes.d.ts.map +0 -1
  346. package/src/alert/inlineMarkdown/InlineMarkdown.js +0 -21
  347. package/src/alert/inlineMarkdown/index.js +0 -1
  348. package/src/card/index.js +0 -1
  349. package/src/checkbox/index.js +0 -3
  350. package/src/definitionList/DefinitionList.js +0 -100
  351. package/src/definitionList/index.js +0 -1
  352. package/src/drawer/index.js +0 -1
  353. package/src/flowNavigation/backButton/BackButton.js +0 -32
  354. package/src/flowNavigation/backButton/BackButton.spec.js +0 -16
  355. package/src/flowNavigation/backButton/__snapshots__/BackButton.spec.js.snap +0 -37
  356. package/src/flowNavigation/backButton/index.js +0 -3
  357. package/src/logo/index.js +0 -2
  358. package/src/logo/logoTypes.ts +0 -6
  359. package/src/overlayHeader/index.js +0 -1
  360. package/src/snackbar/Snackbar.spec.js +0 -112
  361. package/src/sticky/Sticky.spec.js +0 -34
  362. /package/src/checkbox/__snapshots__/{Checkbox.spec.js.snap → Checkbox.spec.tsx.snap} +0 -0
  363. /package/src/drawer/__snapshots__/{Drawer.rtl.spec.js.snap → Drawer.rtl.spec.tsx.snap} +0 -0
  364. /package/src/logo/{Logo.spec.js → Logo.spec.tsx} +0 -0
  365. /package/src/logo/__snapshots__/{Logo.spec.js.snap → Logo.spec.tsx.snap} +0 -0
  366. /package/src/overlayHeader/__snapshots__/{OverlayHeader.spec.js.snap → OverlayHeader.spec.tsx.snap} +0 -0
  367. /package/src/tile/{Tile.story.js → Tile.story.tsx} +0 -0
  368. /package/src/tile/__snapshots__/{Tile.spec.js.snap → Tile.spec.tsx.snap} +0 -0
  369. /package/src/tile/{index.js → index.ts} +0 -0
@@ -0,0 +1,281 @@
1
+ import { userEvent, within } from '@storybook/test';
2
+ import { action } from '@storybook/addon-actions';
3
+ import { Mobile as MobileIcon, Theme, Switch, Bulb, Info, Coins, Team } from '@transferwise/icons';
4
+ import { Snackbar, type SnackbarProps } from './Snackbar';
5
+ import { SnackbarConsumer } from './SnackbarContext';
6
+ import SnackbarProvider from './SnackbarProvider';
7
+ import Button from '../button';
8
+ import CheckboxOption from '../checkboxOption';
9
+ import { storyConfig } from '../test-utils';
10
+ import { wait } from '../test-utils/wait';
11
+
12
+ export default {
13
+ title: 'Dialogs/Snackbar/Tests',
14
+ component: Snackbar,
15
+ argTypes: {},
16
+ };
17
+
18
+ const launchSnackbar = async (canvasElement: HTMLElement) => {
19
+ await wait(0);
20
+ const canvas = within(canvasElement);
21
+ await userEvent.click(canvas.getByRole('button'));
22
+ };
23
+
24
+ type Args = Partial<SnackbarProps> & {
25
+ extraContext: React.ReactNode;
26
+ timeout: number;
27
+ };
28
+
29
+ const TIMEOUT = 10000000;
30
+
31
+ const Default = {
32
+ args: {
33
+ timeout: TIMEOUT,
34
+ } as Args,
35
+ play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
36
+ await launchSnackbar(canvasElement);
37
+ },
38
+ render: (args: Args) => {
39
+ return (
40
+ <SnackbarProvider timeout={args.timeout}>
41
+ <SnackbarConsumer>
42
+ {({ createSnackbar }) => (
43
+ <>
44
+ <Button
45
+ block
46
+ onClick={() => {
47
+ createSnackbar({
48
+ action: {
49
+ label: 'View',
50
+ onClick: () => action('View button clicked.'),
51
+ },
52
+ text: <span>Some text</span>,
53
+ });
54
+ }}
55
+ >
56
+ Show Snackbar
57
+ </Button>
58
+ {args.extraContext}
59
+ </>
60
+ )}
61
+ </SnackbarConsumer>
62
+ </SnackbarProvider>
63
+ );
64
+ },
65
+ };
66
+
67
+ export const Basic = {
68
+ args: {
69
+ ...Default.args,
70
+ extraContext: (
71
+ <div className="p-t-3">
72
+ <CheckboxOption
73
+ title="In light mode, snackbar has drop shadow"
74
+ content={
75
+ <a
76
+ href="https://transferwise.atlassian.net/browse/DS-4477"
77
+ target="_blank"
78
+ rel="noreferrer"
79
+ >
80
+ Bug DS-4477
81
+ </a>
82
+ }
83
+ media={<Bulb />}
84
+ />
85
+ <CheckboxOption
86
+ title="Font size is 14 px, not 16px"
87
+ content={
88
+ <a
89
+ href="https://transferwise.atlassian.net/browse/DS-3716"
90
+ target="_blank"
91
+ rel="noreferrer"
92
+ >
93
+ Bug DS-3716
94
+ </a>
95
+ }
96
+ media={<Info size="16" />}
97
+ />
98
+ </div>
99
+ ) as React.ReactNode,
100
+ },
101
+ play: Default.play,
102
+ render: Default.render,
103
+ };
104
+
105
+ export const Mobile = storyConfig(
106
+ {
107
+ args: {
108
+ ...Default.args,
109
+ extraContext: (
110
+ <div className="p-t-3">
111
+ <CheckboxOption
112
+ title="In mobile view, snackbar is full-width, not centered"
113
+ media={<MobileIcon />}
114
+ />
115
+ </div>
116
+ ) as React.ReactNode,
117
+ },
118
+ play: Default.play,
119
+ render: Default.render,
120
+ },
121
+ {
122
+ variants: ['mobile'],
123
+ },
124
+ );
125
+
126
+ const switchToDarkMode = async (context: { canvasElement: HTMLElement }) => {
127
+ await Default.play(context);
128
+
129
+ // the snackbar is outside the storybook dom so dark mode doesn't apply
130
+ const body = document.querySelector('div.np-theme-personal');
131
+ if (body) {
132
+ body.setAttribute('class', 'np-theme-personal--dark');
133
+ }
134
+ const snackbar = document.querySelector('div.snackbar');
135
+ if (snackbar) {
136
+ snackbar.setAttribute('class', 'snackbar np-theme-personal--dark');
137
+ }
138
+ };
139
+
140
+ export const DarkMode = storyConfig(
141
+ {
142
+ args: {
143
+ ...Default.args,
144
+ extraContext: (
145
+ <div className="p-t-3">
146
+ <CheckboxOption title="In dark mode, snackbar has no drop shadow" media={<Theme />} />
147
+ <CheckboxOption
148
+ title="In dark mode, snackbar is inverted and has light background"
149
+ media={<Theme />}
150
+ />
151
+ </div>
152
+ ) as React.ReactNode,
153
+ },
154
+ play: switchToDarkMode,
155
+ render: Default.render,
156
+ },
157
+ {
158
+ variants: ['dark'],
159
+ },
160
+ );
161
+
162
+ const switchToRTL = async (context: { canvasElement: HTMLElement }) => {
163
+ await Default.play(context);
164
+ // the snackbar is outside the storybook dom so the RTL variant doesn't apply
165
+ const body = document.querySelector('div.storybook-container');
166
+ if (body) {
167
+ body.setAttribute('dir', 'rtl');
168
+ }
169
+ const snackbar = document.querySelector('div.snackbar');
170
+ if (snackbar) {
171
+ snackbar.setAttribute('dir', 'rtl');
172
+ }
173
+ };
174
+
175
+ export const RTL = storyConfig(
176
+ {
177
+ args: {
178
+ ...Default.args,
179
+ extraContext: (
180
+ <div className="p-t-3">
181
+ <CheckboxOption
182
+ title="In RTL, snackbar is not left aligned"
183
+ content={
184
+ <a
185
+ href="https://transferwise.atlassian.net/browse/DS-4642"
186
+ target="_blank"
187
+ rel="noreferrer"
188
+ >
189
+ Bug DS-4642
190
+ </a>
191
+ }
192
+ media={<Switch />}
193
+ />
194
+ <CheckboxOption
195
+ title="In RTL, snackbar has proper padding on left and right of button"
196
+ content={
197
+ <a
198
+ href="https://transferwise.atlassian.net/browse/DS-4643"
199
+ target="_blank"
200
+ rel="noreferrer"
201
+ >
202
+ Bug DS-4643
203
+ </a>
204
+ }
205
+ media={<Switch />}
206
+ />
207
+ </div>
208
+ ) as React.ReactNode,
209
+ },
210
+ play: switchToRTL,
211
+ render: Default.render,
212
+ },
213
+ {
214
+ variants: ['rtl'],
215
+ },
216
+ );
217
+
218
+ export const RTLMobile = storyConfig(
219
+ {
220
+ args: {
221
+ ...RTL.args,
222
+ },
223
+ play: switchToRTL,
224
+ render: Default.render,
225
+ },
226
+ {
227
+ variants: ['rtl', 'mobile'],
228
+ },
229
+ );
230
+
231
+ export const Zoom400 = storyConfig(
232
+ {
233
+ args: {
234
+ ...Default.args,
235
+ extraContext: (
236
+ <div className="p-t-3">
237
+ <CheckboxOption
238
+ content="Snackbar isn't transparent (I'm going to make this text very long so that it will fill up the entire page and go behind the snackbar. This way, when you look at it you will easily be able to tell if the snackbar is transparent and recognize the bug because we don't want it to be transparent. Transparent is bad. When we first did rebrand we had a lot of problems with transparencies. I don't know what happened to them. I don't see them a lot anymore but I also don't remember anybody fixing them.)"
239
+ title={
240
+ <a
241
+ href="https://transferwise.atlassian.net/browse/DS-3716"
242
+ target="_blank"
243
+ rel="noreferrer"
244
+ >
245
+ Bug DS-3716
246
+ </a>
247
+ }
248
+ media={<Coins />}
249
+ />
250
+ </div>
251
+ ),
252
+ },
253
+
254
+ play: Default.play,
255
+ render: Default.render,
256
+ },
257
+ {
258
+ variants: ['400%'],
259
+ },
260
+ );
261
+
262
+ export const MultipleClicks = {
263
+ args: {
264
+ ...Default.args,
265
+ extraContext: (
266
+ <div className="p-t-3">
267
+ <CheckboxOption
268
+ title="Snackbar is only shown once even if clicked many times"
269
+ media={<Team />}
270
+ />
271
+ </div>
272
+ ),
273
+ },
274
+ play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
275
+ const canvas = within(canvasElement);
276
+ for (let i = 0; i < 8; i += 1) {
277
+ await userEvent.click(canvas.getByRole('button'));
278
+ }
279
+ },
280
+ render: Default.render,
281
+ };
@@ -3,7 +3,7 @@ import { CSSTransition } from 'react-transition-group';
3
3
 
4
4
  import ActionButton from '../actionButton';
5
5
  import Body from '../body';
6
- import { Theme, ThemeDark, ThemeLight } from '../common';
6
+ import { Theme, type ThemeDark, type ThemeLight } from '../common';
7
7
  import { DirectionContext } from '../provider/direction';
8
8
  import withNextPortal from '../withNextPortal/withNextPortal';
9
9
 
@@ -15,6 +15,7 @@ export interface SnackbarProps {
15
15
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
16
16
  };
17
17
  text: React.ReactNode;
18
+ /** @deprecated */
18
19
  theme?: ThemeLight | ThemeDark;
19
20
  timeout: number;
20
21
  timestamp: number;
@@ -66,10 +67,10 @@ export class Snackbar extends Component<SnackbarProps, SnackbarState> {
66
67
  };
67
68
 
68
69
  componentDidUpdate(previousProps: SnackbarProps) {
69
- const { action, text, theme, timestamp } = this.props;
70
+ const { action, text, timestamp } = this.props;
70
71
 
71
72
  if (!previousProps.text) {
72
- this.setState({ visible: true, action, text, theme }, () => {
73
+ this.setState({ visible: true, action, text }, () => {
73
74
  this.setLeaveTimeout();
74
75
  });
75
76
  } else if (previousProps.timestamp !== timestamp) {
@@ -78,19 +79,19 @@ export class Snackbar extends Component<SnackbarProps, SnackbarState> {
78
79
  if (this.state.visible) {
79
80
  this.setState({ visible: false }, () => {
80
81
  this.transitionTimeout = window.setTimeout(() => {
81
- this.setState({ visible: true, action, text, theme });
82
+ this.setState({ visible: true, action, text });
82
83
  this.setLeaveTimeout();
83
84
  }, CSS_TRANSITION_DURATION);
84
85
  });
85
86
  } else {
86
- this.setState({ visible: true, action, text, theme });
87
+ this.setState({ visible: true, action, text });
87
88
  this.setLeaveTimeout();
88
89
  }
89
90
  }
90
91
  }
91
92
 
92
93
  render() {
93
- const { action, text, theme = Theme.LIGHT, visible } = this.state;
94
+ const { action, text, visible } = this.state;
94
95
  const { timeout } = this.props;
95
96
 
96
97
  return (
@@ -106,12 +107,7 @@ export class Snackbar extends Component<SnackbarProps, SnackbarState> {
106
107
  }}
107
108
  unmountOnExit
108
109
  >
109
- <Body
110
- ref={this.bodyRef}
111
- as="span"
112
- className={`snackbar__text snackbar__text--${theme}`}
113
- aria-live="polite"
114
- >
110
+ <Body ref={this.bodyRef} as="span" className="snackbar__text" aria-live="polite">
115
111
  {text}
116
112
  {action ? (
117
113
  <ActionButton className="snackbar__text__action" onClick={action.onClick}>
@@ -0,0 +1,71 @@
1
+ import { render, screen, waitFor } from '@testing-library/react';
2
+ import Sticky, { StickyProps } from './Sticky';
3
+
4
+ describe('Sticky', () => {
5
+ const defaultProps = {
6
+ open: true,
7
+ children: <div>Test Content</div>,
8
+ position: 'bottom' as const,
9
+ testId: 'test-sticky-panel',
10
+ };
11
+
12
+ let rerenderSticky: (props?: StickyProps) => void;
13
+
14
+ beforeEach(() => {
15
+ const { rerender } = render(<Sticky {...defaultProps} />);
16
+
17
+ rerenderSticky = (props?: StickyProps) => {
18
+ rerender(<Sticky {...defaultProps} {...props} />);
19
+ };
20
+ });
21
+
22
+ test('renders with default props', () => {
23
+ expect(screen.getByTestId('test-sticky-panel')).toBeVisible();
24
+ expect(screen.getByTestId('test-sticky-panel')).toHaveClass('sliding-panel--open-bottom');
25
+ expect(screen.getByText('Test Content')).toBeInTheDocument();
26
+ });
27
+
28
+ test('renders with open `false`', async () => {
29
+ const props: StickyProps = {
30
+ ...defaultProps,
31
+ open: false, // Ensure the Sticky is initially open
32
+ };
33
+
34
+ expect(screen.getByTestId('test-sticky-panel')).toBeVisible();
35
+
36
+ // Change props to close the Sticky
37
+ rerenderSticky(props);
38
+
39
+ await waitFor(() => {
40
+ // Use queryByText instead of getByText for conditional presence checks
41
+ expect(screen.queryByText('Test Content')).not.toBeInTheDocument();
42
+ });
43
+ });
44
+
45
+ it('renders new content', () => {
46
+ const props: StickyProps = {
47
+ ...defaultProps,
48
+ children: <div>New Test Content</div>,
49
+ };
50
+ expect(screen.getByText('Test Content')).toBeInTheDocument();
51
+
52
+ // Change props
53
+ rerenderSticky(props);
54
+
55
+ expect(screen.getByText('New Test Content')).toBeInTheDocument();
56
+ });
57
+
58
+ it('renders with position set to `top`', () => {
59
+ const props: StickyProps = {
60
+ ...defaultProps,
61
+ position: 'top',
62
+ };
63
+ expect(screen.getByTestId('test-sticky-panel')).toBeInTheDocument();
64
+ expect(screen.getByTestId('test-sticky-panel')).toHaveClass('sliding-panel--open-bottom');
65
+
66
+ // Change props
67
+ rerenderSticky(props);
68
+
69
+ expect(screen.getByTestId('test-sticky-panel')).toHaveClass('sliding-panel--open-top');
70
+ });
71
+ });
@@ -1,22 +1,79 @@
1
- import { select, boolean } from '@storybook/addon-knobs';
2
-
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import React from 'react';
3
3
  import Sticky from './Sticky';
4
+ import { allModes } from '../../.storybook/modes';
4
5
 
5
- export default {
6
+ const meta: Meta<typeof Sticky> = {
6
7
  component: Sticky,
7
- title: 'Other/Sticky',
8
+ title: 'Dialogs/Sticky',
9
+ tags: ['autodocs'],
10
+ args: {
11
+ open: true,
12
+ position: 'bottom', // Default position
13
+ children: (
14
+ <div className="d-flex justify-content-start align-items-start flex-wrap p-x-4 p-y-4">
15
+ <p className="m-b-0">Default text for Sticky component.</p>
16
+ </div>
17
+ ),
18
+ },
19
+ parameters: {
20
+ chromatic: {
21
+ // 🔶 Test each story for Sticky
22
+ modes: {
23
+ ltr: allModes.ltr,
24
+ rtl: allModes.rtl,
25
+ light: allModes.light,
26
+ dark: allModes.dark,
27
+ brightGreen: allModes.brightGreen,
28
+ forestGreen: allModes.forestGreen,
29
+ desktop: allModes.desktop,
30
+ tablet: allModes.tablet,
31
+ largeMobile: allModes.largeMobile,
32
+ smallMobile: allModes.smallMobile,
33
+ zoom400: allModes.zoom400,
34
+ },
35
+ },
36
+ docs: {
37
+ canvas: {
38
+ layout: 'padded',
39
+ },
40
+ },
41
+ },
8
42
  };
9
43
 
10
- export const Basic = () => {
11
- const open = boolean('open', false);
12
- const position = select('position', ['top', 'bottom'], 'bottom');
13
- return (
14
- <Sticky open={open} position={position}>
15
- <div className="d-flex justify-content-start align-items-start flex-wrap p-x-4 p-y-4">
16
- Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
17
- been the industry standard dummy text ever since the 1500s, when an unknown printer took a
18
- galley of type and scrambled it to
44
+ export default meta;
45
+
46
+ // Represents a story object for the `Sticky` component.
47
+ type Story = StoryObj<typeof Sticky>;
48
+
49
+ export const Default: Story = {}; // Default story with no additional props
50
+
51
+ export const PositionTop: Story = {
52
+ args: {
53
+ position: 'top', // Set the position prop to 'top'
54
+ },
55
+ };
56
+
57
+ export const WithLongContent: Story = {
58
+ args: {
59
+ children: (
60
+ <div className="p-x-4 p-y-4">
61
+ <p>
62
+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. Optio ipsa rem fugiat
63
+ repellendus nisi dolorum, recusandae aperiam repudiandae natus quaerat, explicabo fugit!
64
+ Odit illum vero eius quasi, error soluta veritatis.
65
+ </p>
66
+ <p>
67
+ Recusandae a animi tenetur magni itaque optio in aut enim odio. Minima, veritatis error
68
+ dicta expedita aliquam officiis deleniti repellat rerum nam ad quam dolorum reiciendis
69
+ voluptas doloremque quis eveniet.
70
+ </p>
71
+ <p>
72
+ Adipisci nulla quos magnam blanditiis minima nesciunt odio mollitia, fuga ullam aliquid
73
+ qui iure delectus dolores corporis officiis autem iste quia at ea sint tempore,
74
+ repudiandae amet? Error, praesentium eaque.
75
+ </p>
19
76
  </div>
20
- </Sticky>
21
- );
77
+ ),
78
+ },
22
79
  };
@@ -1,16 +1,60 @@
1
1
  import { Position } from '../common';
2
2
  import SlidingPanel from '../slidingPanel';
3
+ import { FunctionComponent } from 'react';
3
4
 
4
5
  export interface StickyProps {
5
- open?: boolean;
6
- position?: `${Position.TOP | Position.BOTTOM}`;
6
+ /** Optional prop for children components to be rendered inside the Sticky component. */
7
7
  children?: React.ReactNode;
8
+
9
+ /** Optional props that determines if the Sticky component is open or closed. Default value is `true`. */
10
+ open?: boolean;
11
+
12
+ /** Optional props that specifies the position of the Sticky component on the screen. Can be either `top` or `bottom`. */
13
+ position?: `${Position.TOP}` | `${Position.BOTTOM}`;
14
+
15
+ /** Optional prop to specify the ID used for testing */
16
+ testId?: string;
8
17
  }
9
18
 
10
- export default function Sticky({ open = true, position = 'bottom', children }: StickyProps) {
19
+ /**
20
+ * ### Sticky Component
21
+ *
22
+ * `<Sticky />` is a component that renders a `<SlidingPanel />` with specified props.
23
+ * It uses the `<SlidingPanel />` component to create a panel that can slide in and out of view,
24
+ * based on the `open` prop. It can be positioned at the top or bottom of the container,
25
+ * as specified by the `position` prop.
26
+ *
27
+ * @component
28
+ * @param {ReactNode} children - Children content.
29
+ * @param {boolean} open - Determines if the Sticky component is open or closed.
30
+ * @param {('top'|'bottom')} position - Specifies the position.
31
+ * @param {string} testId - ID used for testing.
32
+ * @returns {JSX.Element} The `SlidingPanel` component with applied props.
33
+ * @example
34
+ * <Button onClick={() => setOpen(!open)}>Open Sticky</Button>
35
+ * <Sticky open={open} position={'bottom'}>
36
+ * <div>
37
+ * <Button onClick={() => setOpen(!open)}>Close Sticky</Button>
38
+ * </div>
39
+ * </Sticky>
40
+ */
41
+ const Sticky: FunctionComponent<StickyProps> = ({
42
+ children,
43
+ open = true,
44
+ position = Position.BOTTOM,
45
+ testId,
46
+ }: StickyProps) => {
11
47
  return (
12
- <SlidingPanel open={open} position={position} slidingPanelPositionFixed showSlidingPanelBorder>
48
+ <SlidingPanel
49
+ testId={testId}
50
+ open={open}
51
+ position={position}
52
+ slidingPanelPositionFixed
53
+ showSlidingPanelBorder
54
+ >
13
55
  {children}
14
56
  </SlidingPanel>
15
57
  );
16
- }
58
+ };
59
+
60
+ export default Sticky;
@@ -58,4 +58,12 @@ export interface ChromaticParameters {
58
58
  * @default 0.063
59
59
  */
60
60
  diffThreshold?: number;
61
+
62
+ /**
63
+ * Modes for Chromatic testing.
64
+ *
65
+ * Specify the mode in which Chromatic should run tests. For example, 'light' for light mode,
66
+ * 'dark' for dark mode, or `rtl` for right to left content.
67
+ */
68
+ modes?: object;
61
69
  }
@@ -1,5 +1,5 @@
1
1
  import { render, renderHook } from '@testing-library/react';
2
- import userEvent from '@testing-library/user-event';
2
+ import { userEvent } from '@testing-library/user-event';
3
3
 
4
4
  import { Provider } from '..';
5
5
  import { DEFAULT_LOCALE } from '../common/locale';
@@ -1,3 +1,5 @@
1
+ require('@testing-library/jest-dom');
2
+
1
3
  const { default: Adapter } = require('@cfaester/enzyme-adapter-react-18');
2
4
  const Enzyme = require('enzyme');
3
5
  const util = require('node:util');
@@ -9,6 +9,11 @@ export const viewports = {
9
9
  styles: { height: '256px', width: '320px' },
10
10
  type: 'mobile',
11
11
  },
12
+ desktop: {
13
+ name: 'Desktop',
14
+ styles: { height: '1024px', width: '1280px' },
15
+ type: 'desktop',
16
+ },
12
17
  };
13
18
 
14
19
  interface StoryConfig {
@@ -9,7 +9,7 @@ describe(Tile, () => {
9
9
  description: 'Receive money from friends and family like a local',
10
10
  href: '#href',
11
11
  media: <svg data-testid="illustration" />,
12
- onClick: () => onClick(),
12
+ onClick,
13
13
  title: 'Receive money',
14
14
  };
15
15