@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
@@ -69,7 +69,7 @@ describe('Carousel', () => {
69
69
  expect(screen.getByText('Get Quick Pay')).toBeInTheDocument();
70
70
  });
71
71
 
72
- it('allows user to scroll carousel to the right when at start', () => {
72
+ it('allows user to scroll carousel to the right when at start', async () => {
73
73
  mockPositions(948, 903);
74
74
 
75
75
  renderCarousel();
@@ -80,12 +80,12 @@ describe('Carousel', () => {
80
80
  expect(scrollLeftButton).toBeDisabled();
81
81
  expect(scrollRightButton).toBeEnabled();
82
82
 
83
- userEvent.click(scrollRightButton);
83
+ await userEvent.click(scrollRightButton);
84
84
 
85
85
  expect(scrollBy).toHaveBeenCalledWith({ left: 300, behavior: 'smooth' });
86
86
  });
87
87
 
88
- it('allows user to scroll carousel to the left or right when in middle', () => {
88
+ it('allows user to scroll carousel to the left or right when in middle', async () => {
89
89
  mockPositions(948, 903);
90
90
 
91
91
  renderCarousel();
@@ -99,16 +99,16 @@ describe('Carousel', () => {
99
99
  expect(scrollLeftButton).toBeEnabled();
100
100
  expect(scrollRightButton).toBeEnabled();
101
101
 
102
- userEvent.click(scrollLeftButton);
102
+ await userEvent.click(scrollLeftButton);
103
103
 
104
104
  expect(scrollBy).toHaveBeenCalledWith({ left: -300, behavior: 'smooth' });
105
105
 
106
- userEvent.click(scrollRightButton);
106
+ await userEvent.click(scrollRightButton);
107
107
 
108
108
  expect(scrollBy).toHaveBeenCalledWith({ left: 300, behavior: 'smooth' });
109
109
  });
110
110
 
111
- it('allows user to scroll carousel to the left when at end', () => {
111
+ it('allows user to scroll carousel to the left when at end', async () => {
112
112
  mockPositions(948, 903);
113
113
 
114
114
  renderCarousel();
@@ -122,7 +122,7 @@ describe('Carousel', () => {
122
122
  expect(scrollLeftButton).toBeEnabled();
123
123
  expect(scrollRightButton).toBeDisabled();
124
124
 
125
- userEvent.click(scrollLeftButton);
125
+ await userEvent.click(scrollLeftButton);
126
126
 
127
127
  expect(scrollBy).toHaveBeenCalledWith({ left: -300, behavior: 'smooth' });
128
128
  });
@@ -142,23 +142,23 @@ describe('Carousel', () => {
142
142
  expect(focusSpy).toHaveBeenCalledTimes(0);
143
143
  expect(firstCard).toHaveClass('carousel__card--focused');
144
144
 
145
- userEvent.click(yourWebsiteIndicator);
145
+ await userEvent.click(yourWebsiteIndicator);
146
146
 
147
147
  expect(focusSpy).toHaveBeenCalledTimes(1);
148
148
  expect(secondCard).toHaveClass('carousel__card--focused');
149
149
 
150
- userEvent.click(shopOrStallIndicator);
150
+ await userEvent.click(shopOrStallIndicator);
151
151
 
152
152
  expect(focusSpy).toHaveBeenCalledTimes(2);
153
153
  expect(thirdCard).toHaveClass('carousel__card--focused');
154
154
 
155
- userEvent.click(yourInvoiceIndicator);
155
+ await userEvent.click(yourInvoiceIndicator);
156
156
 
157
157
  expect(focusSpy).toHaveBeenCalledTimes(3);
158
158
  expect(firstCard).toHaveClass('carousel__card--focused');
159
159
  });
160
160
 
161
- it('is focused on the first element and lets user navigate through them', () => {
161
+ it('is focused on the first element and lets user navigate through them', async () => {
162
162
  renderCarousel();
163
163
 
164
164
  const firstCard = getFirstCard();
@@ -170,27 +170,27 @@ describe('Carousel', () => {
170
170
  firstCard.focus();
171
171
  expect(firstCard).toHaveFocus();
172
172
 
173
- userEvent.keyboard('{arrowright}');
173
+ await userEvent.keyboard('{arrowright}');
174
174
 
175
175
  expect(secondCard).toHaveFocus();
176
176
 
177
- userEvent.keyboard('{arrowright}');
177
+ await userEvent.keyboard('{arrowright}');
178
178
 
179
179
  expect(thirdCard).toHaveFocus();
180
180
 
181
- userEvent.keyboard('{arrowleft}');
181
+ await userEvent.keyboard('{arrowleft}');
182
182
 
183
183
  expect(secondCard).toHaveFocus();
184
184
 
185
- userEvent.keyboard('{arrowleft}');
185
+ await userEvent.keyboard('{arrowleft}');
186
186
 
187
187
  expect(firstCard).toHaveFocus();
188
188
  });
189
189
 
190
- it('calls onClick when a card is clicked', () => {
190
+ it('calls onClick when a card is clicked', async () => {
191
191
  renderCarousel();
192
192
 
193
- userEvent.click(getFirstCard());
193
+ await userEvent.click(getFirstCard());
194
194
 
195
195
  expect(onClick).toHaveBeenCalledTimes(1);
196
196
  expect(yourInvoiceOnClick).toHaveBeenCalledTimes(1);
@@ -1,11 +1,9 @@
1
- import '@testing-library/jest-dom';
2
-
3
1
  import { render, fireEvent, screen } from '@testing-library/react';
4
2
 
5
- import Checkbox from '.';
3
+ import Checkbox, { CheckboxProps } from '.';
6
4
 
7
5
  describe('Checkbox', () => {
8
- let props;
6
+ let props: CheckboxProps;
9
7
 
10
8
  beforeEach(() => {
11
9
  props = {
@@ -68,7 +66,7 @@ describe('Checkbox', () => {
68
66
 
69
67
  it('has disabled class when the disabled prop is true', () => {
70
68
  const { container } = render(<Checkbox {...props} disabled />);
71
- expect(getCheckboxContainer(container).firstChild).toHaveClass('disabled');
69
+ expect(getCheckboxContainer(container)?.firstChild).toHaveClass('disabled');
72
70
  });
73
71
 
74
72
  it('passes required to checkbox button', () => {
@@ -117,7 +115,7 @@ describe('Checkbox', () => {
117
115
  expect(getCheckboxContainer(container)).toHaveClass('checkbox-lg');
118
116
  });
119
117
 
120
- const getCheckboxContainer = (container) => container.querySelector('.np-checkbox');
121
- const getLabel = () => screen.getByText('hello').parentElement;
118
+ const getCheckboxContainer = (container: HTMLElement) => container.querySelector('.np-checkbox');
119
+ const getLabel = () => screen.getByText('hello').parentElement!;
122
120
  const getCheckbox = () => screen.getByRole('checkbox');
123
121
  });
@@ -1,12 +1,24 @@
1
- import { useTheme } from '@wise/components-theming';
2
1
  import classNames from 'classnames';
3
- import PropTypes from 'prop-types';
4
2
 
5
3
  import Body from '../body/Body';
6
4
  import CheckboxButton from '../checkboxButton';
7
5
  import { Typography } from '../common';
8
6
 
9
- const Checkbox = ({
7
+ export interface CheckboxProps {
8
+ id?: string;
9
+ checked?: boolean;
10
+ required?: boolean;
11
+ disabled?: boolean;
12
+ readOnly?: boolean;
13
+ label: React.ReactNode;
14
+ secondary?: string;
15
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
16
+ onChange: (checked: boolean) => void;
17
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
18
+ className?: string;
19
+ }
20
+
21
+ export default function Checkbox({
10
22
  id,
11
23
  checked,
12
24
  required,
@@ -18,15 +30,13 @@ const Checkbox = ({
18
30
  onChange,
19
31
  onFocus,
20
32
  onBlur,
21
- }) => {
22
- const { isModern } = useTheme();
23
-
33
+ }: CheckboxProps) {
24
34
  const classList = classNames(
25
35
  'np-checkbox',
26
36
  {
27
37
  checkbox: true,
28
38
  'checkbox-lg': secondary,
29
- disabled: isModern && disabled,
39
+ disabled,
30
40
  },
31
41
  className,
32
42
  );
@@ -51,41 +61,9 @@ const Checkbox = ({
51
61
  type={secondary ? Typography.BODY_LARGE_BOLD : Typography.BODY_LARGE}
52
62
  >
53
63
  <span className={required ? 'has-required' : undefined}>{label}</span>
54
- {secondary && (
55
- <Body as="span" className={classNames({ secondary: !isModern })}>
56
- {secondary}
57
- </Body>
58
- )}
64
+ {secondary && <Body as="span">{secondary}</Body>}
59
65
  </Body>
60
66
  </label>
61
67
  </div>
62
68
  );
63
- };
64
-
65
- Checkbox.propTypes = {
66
- id: PropTypes.string,
67
- checked: PropTypes.bool,
68
- required: PropTypes.bool,
69
- disabled: PropTypes.bool,
70
- readOnly: PropTypes.bool,
71
- label: PropTypes.node.isRequired,
72
- secondary: PropTypes.string,
73
- onFocus: PropTypes.func,
74
- onChange: PropTypes.func.isRequired,
75
- onBlur: PropTypes.func,
76
- className: PropTypes.string,
77
- };
78
-
79
- Checkbox.defaultProps = {
80
- id: null,
81
- checked: false,
82
- required: false,
83
- disabled: false,
84
- readOnly: false,
85
- secondary: null,
86
- onFocus: null,
87
- onBlur: null,
88
- className: undefined,
89
- };
90
-
91
- export default Checkbox;
69
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './Checkbox';
2
+ export type { CheckboxProps } from './Checkbox';
@@ -1,5 +1,3 @@
1
- /* eslint-disable jest/expect-expect */
2
- import '@testing-library/jest-dom';
3
1
  import { render, fireEvent, screen } from '../test-utils';
4
2
 
5
3
  import CheckboxButton from '.';
@@ -1,5 +1,3 @@
1
- /* eslint-disable jest/expect-expect */
2
- import '@testing-library/jest-dom';
3
1
  import { render, fireEvent, screen } from '../test-utils';
4
2
 
5
3
  import CheckboxOption from '.';
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import { Size, Position } from '../common';
3
2
  import { render } from '../test-utils';
4
3
 
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import { render, screen, fireEvent } from '../test-utils';
3
2
 
4
3
  import Chips from '.';
@@ -1,4 +1,4 @@
1
- import { Story, Meta } from '@storybook/react';
1
+ import { StoryFn, Meta } from '@storybook/react';
2
2
  import { useState } from 'react';
3
3
 
4
4
  import Chips, { ChipsProps, ChipValue } from './Chips';
@@ -10,7 +10,9 @@ const meta: Meta<typeof Chips> = {
10
10
  };
11
11
  export default meta;
12
12
 
13
- const FilterTemplate: Story<ChipsProps> = (args: ChipsProps) => {
13
+ type Story = StoryFn<ChipsProps>;
14
+
15
+ const FilterTemplate: Story = (args: ChipsProps) => {
14
16
  const [selected, setSelected] = useState<readonly ChipValue[]>(
15
17
  args.selected == null || Array.isArray(args.selected) ? args.selected : [args.selected],
16
18
  );
@@ -31,7 +33,7 @@ const FilterTemplate: Story<ChipsProps> = (args: ChipsProps) => {
31
33
  );
32
34
  };
33
35
 
34
- const ChoiceTemplate: Story<ChipsProps> = (args: ChipsProps) => {
36
+ const ChoiceTemplate: Story = (args: ChipsProps) => {
35
37
  const [selected, setSelected] = useState<ChipValue>(args.selected as ChipValue);
36
38
  return (
37
39
  <Chips
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import { Plus } from '@transferwise/icons';
3
2
 
4
3
  import { ControlType, Priority } from '../common';
@@ -54,17 +53,17 @@ describe('CircularButton', () => {
54
53
  });
55
54
 
56
55
  describe('onClick', () => {
57
- it('calls onClick when clicked', () => {
56
+ it('calls onClick when clicked', async () => {
58
57
  const onClick = jest.fn();
59
58
  render(<CircularButton {...props} onClick={onClick} />);
60
- userEvent.click(screen.getByRole('button'));
59
+ await userEvent.click(screen.getByRole('button'));
61
60
  expect(onClick).toHaveBeenCalledTimes(1);
62
61
  });
63
62
 
64
- it('does not call onClick when clicked if disabled', () => {
63
+ it('does not call onClick when clicked if disabled', async () => {
65
64
  const onClick = jest.fn();
66
65
  render(<CircularButton {...props} disabled onClick={onClick} />);
67
- userEvent.click(screen.getByRole('button'));
66
+ await userEvent.click(screen.getByRole('button'));
68
67
  expect(onClick).toHaveBeenCalledTimes(0);
69
68
  });
70
69
  });
@@ -21,7 +21,7 @@ describe('Radio button', () => {
21
21
  expect(container).toMatchSnapshot();
22
22
  });
23
23
 
24
- it('responds to user input', () => {
24
+ it('responds to user input', async () => {
25
25
  const onChange = jest.fn();
26
26
  render(
27
27
  <label htmlFor="an-id">
@@ -29,7 +29,7 @@ describe('Radio button', () => {
29
29
  </label>,
30
30
  );
31
31
 
32
- userEvent.click(screen.getByLabelText('A radio'));
32
+ await userEvent.click(screen.getByLabelText('A radio'));
33
33
 
34
34
  expect(onChange).toHaveBeenCalledWith('a-value');
35
35
  });
@@ -23,5 +23,6 @@ export const Default: Story = {
23
23
  {lorem10}
24
24
  </>
25
25
  ),
26
+ onDismiss: () => {},
26
27
  },
27
28
  };
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import { render } from '../../test-utils';
3
2
 
4
3
  import { CloseButton } from '.';
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import { render } from '@testing-library/react';
3
2
 
4
3
  import { Layout } from '../propsValues/layouts';
@@ -1,13 +1,10 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { userEvent, within } from '@storybook/test';
3
- import * as React from 'react';
4
3
 
5
4
  import { DateInput, DateMode, Info, InlineAlert, Title, Typography } from '..';
6
5
  import { lorem10, storyConfig } from '../test-utils';
7
6
 
8
- import { DateInputProps } from './DateInput';
9
-
10
- export default {
7
+ const meta = {
11
8
  component: DateInput,
12
9
  title: 'Forms/DateInput',
13
10
  args: {
@@ -20,16 +17,24 @@ export default {
20
17
  tags: ['autodocs'],
21
18
  } satisfies Meta<typeof DateInput>;
22
19
 
23
- type Story = StoryObj<DateInputProps>;
20
+ export default meta;
24
21
 
25
- export const Basic: StoryObj = {};
22
+ type Story = StoryObj<typeof meta>;
26
23
 
27
- Basic.play = async ({ canvasElement }) => {
28
- const canvas = within(canvasElement);
29
- await userEvent.click(canvas.getByRole('button'));
30
- };
24
+ export const Basic = {
25
+ args: {
26
+ onChange: () => {},
27
+ },
28
+ play: async ({ canvasElement }) => {
29
+ const canvas = within(canvasElement);
30
+ await userEvent.click(canvas.getByRole('button'));
31
+ },
32
+ } satisfies Story;
31
33
 
32
- export const WithLabel: Story = {
34
+ export const WithLabel = {
35
+ args: {
36
+ onChange: () => {},
37
+ },
33
38
  render: (args) => {
34
39
  const id1 = 'date-input-group-label-1';
35
40
  const label = 'Date of Birth';
@@ -71,11 +76,11 @@ export const WithLabel: Story = {
71
76
  </>
72
77
  );
73
78
  },
74
- };
79
+ } satisfies Story;
75
80
 
76
- export const BasicMobile: Story = storyConfig(Basic, { variants: ['mobile'] });
81
+ export const BasicMobile = storyConfig(Basic, { variants: ['mobile'] });
77
82
 
78
- export const InputError: Story = {
83
+ export const InputError = {
79
84
  ...Basic,
80
85
  render: (args) => (
81
86
  <div className="form-group has-error">
@@ -83,6 +88,6 @@ export const InputError: Story = {
83
88
  <InlineAlert type="error">{lorem10}</InlineAlert>
84
89
  </div>
85
90
  ),
86
- };
91
+ } satisfies Story;
87
92
 
88
- export const InputErrorMobile: Story = storyConfig(InputError, { variants: ['mobile'] });
93
+ export const InputErrorMobile = storyConfig(InputError, { variants: ['mobile'] });
@@ -4,6 +4,8 @@ import DateLookup, { DateLookupProps } from './DateLookup';
4
4
 
5
5
  import { act } from 'react';
6
6
 
7
+ const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTimeAsync });
8
+
7
9
  mockMatchMedia();
8
10
  mockResizeObserver();
9
11
 
@@ -36,12 +38,12 @@ describe('DateLookup', () => {
36
38
  async (text) => {
37
39
  render(<DateLookup value={initialValue} onChange={() => {}} />);
38
40
 
39
- userEvent.tab();
40
- userEvent.keyboard(text);
41
+ await user.tab();
42
+ await user.keyboard(text);
41
43
 
42
44
  expect(screen.getByRole('button', { name: /next/iu })).toBeInTheDocument();
43
45
 
44
- userEvent.keyboard('{Escape}');
46
+ await user.keyboard('{Escape}');
45
47
  await act(async () => {
46
48
  await jest.runOnlyPendingTimersAsync();
47
49
  });
@@ -53,7 +55,7 @@ describe('DateLookup', () => {
53
55
  const setupAndOpenWithMouse = async (props: Partial<DateLookupProps> = {}) => {
54
56
  const view = render(<DateLookup value={initialValue} onChange={() => {}} {...props} />);
55
57
 
56
- userEvent.click(screen.getByRole('button'));
58
+ await user.click(screen.getByRole('button'));
57
59
  await act(async () => {
58
60
  await jest.runOnlyPendingTimersAsync();
59
61
  });
@@ -68,7 +70,7 @@ describe('DateLookup', () => {
68
70
 
69
71
  const dimmerElement = screen.getByRole('dialog').parentElement?.parentElement;
70
72
  if (dimmerElement != null) {
71
- userEvent.click(dimmerElement);
73
+ await user.click(dimmerElement);
72
74
  }
73
75
  await act(async () => {
74
76
  await jest.runOnlyPendingTimersAsync();
@@ -89,13 +91,13 @@ describe('DateLookup', () => {
89
91
 
90
92
  expect(handleChange).not.toHaveBeenCalled();
91
93
 
92
- userEvent.keyboard(text);
94
+ await user.keyboard(text);
93
95
 
94
96
  const value = new Date(initialValue);
95
97
  value.setDate(initialValue.getDate() + step);
96
98
  expect(handleChange).toHaveBeenCalledWith(value);
97
99
 
98
- userEvent.keyboard('{Escape}');
100
+ await user.keyboard('{Escape}');
99
101
  await act(async () => {
100
102
  await jest.runOnlyPendingTimersAsync();
101
103
  });
@@ -114,20 +116,20 @@ describe('DateLookup', () => {
114
116
  const handleChange = jest.fn();
115
117
  await setupAndOpenWithMouse({ onChange: handleChange });
116
118
 
117
- userEvent.click(screen.getByRole('button', { name: /year view/iu }));
119
+ await user.click(screen.getByRole('button', { name: /year view/iu }));
118
120
  await act(async () => {
119
121
  await jest.runOnlyPendingTimersAsync();
120
122
  });
121
123
 
122
124
  expect(handleChange).not.toHaveBeenCalled();
123
125
 
124
- userEvent.keyboard(text);
126
+ await user.keyboard(text);
125
127
 
126
128
  const value = new Date(initialValue);
127
129
  value.setFullYear(initialValue.getFullYear() + step);
128
130
  expect(handleChange).toHaveBeenCalledWith(value);
129
131
 
130
- userEvent.keyboard('{Escape}');
132
+ await user.keyboard('{Escape}');
131
133
  await act(async () => {
132
134
  await jest.runOnlyPendingTimersAsync();
133
135
  });
@@ -146,24 +148,24 @@ describe('DateLookup', () => {
146
148
  const handleChange = jest.fn();
147
149
  await setupAndOpenWithMouse({ onChange: handleChange });
148
150
 
149
- userEvent.click(screen.getByRole('button', { name: /year view/iu }));
151
+ await user.click(screen.getByRole('button', { name: /year view/iu }));
150
152
  await act(async () => {
151
153
  await jest.runOnlyPendingTimersAsync();
152
154
  });
153
- userEvent.keyboard(' ');
155
+ await user.keyboard(' ');
154
156
  await act(async () => {
155
157
  await jest.runOnlyPendingTimersAsync();
156
158
  });
157
159
 
158
160
  expect(handleChange).not.toHaveBeenCalled();
159
161
 
160
- userEvent.keyboard(text);
162
+ await user.keyboard(text);
161
163
 
162
164
  const value = new Date(initialValue);
163
165
  value.setMonth(initialValue.getMonth() + step);
164
166
  expect(handleChange).toHaveBeenCalledWith(value);
165
167
 
166
- userEvent.keyboard('{Escape}');
168
+ await user.keyboard('{Escape}');
167
169
  await act(async () => {
168
170
  await jest.runOnlyPendingTimersAsync();
169
171
  });
@@ -178,7 +180,7 @@ describe('DateLookup', () => {
178
180
  const handleChange = jest.fn();
179
181
  await setupAndOpenWithMouse({ min, onChange: handleChange });
180
182
 
181
- userEvent.keyboard('{ArrowLeft}{ArrowLeft}');
183
+ await user.keyboard('{ArrowLeft}{ArrowLeft}');
182
184
 
183
185
  expect(handleChange).toHaveBeenCalledWith(min);
184
186
  });
@@ -189,7 +191,7 @@ describe('DateLookup', () => {
189
191
  const handleChange = jest.fn();
190
192
  await setupAndOpenWithMouse({ max, onChange: handleChange });
191
193
 
192
- userEvent.keyboard('{ArrowRight}{ArrowRight}');
194
+ await user.keyboard('{ArrowRight}{ArrowRight}');
193
195
 
194
196
  expect(handleChange).toHaveBeenCalledWith(max);
195
197
  });