@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
package/src/main.css CHANGED
@@ -5390,98 +5390,78 @@ html:not([dir="rtl"]) .np-navigation-option {
5390
5390
  .tw-droppable-sm {
5391
5391
  min-height: 245px;
5392
5392
  }
5393
- .np-upload-button {
5394
- width: 100%;
5395
- border: 0 !important;
5396
- padding: 12px 16px;
5397
- padding: var(--size-12) var(--size-16);
5398
- }
5399
- .np-upload-button.np-upload-accent {
5400
- color: #00a2dd;
5401
- color: var(--color-interactive-accent);
5402
- }
5403
- label.np-upload-button:not(.disabled):hover,
5404
- label.np-upload-button:not(.disabled):focus-visible,
5405
- label.np-upload-button:not(.disabled):active {
5406
- background-color: rgba(134,167,189,0.10196);
5407
- background-color: var(--color-background-neutral);
5408
- }
5409
- .np-theme-personal label.np-upload-button:not(.disabled):hover,
5410
- .np-theme-personal label.np-upload-button:not(.disabled):focus-visible,
5411
- .np-theme-personal label.np-upload-button:not(.disabled):active {
5412
- background-color: var(--color-background-screen-hover);
5413
- }
5414
- .np-theme-personal .disabled label.np-upload-button:not(.disabled):hover,
5415
- .np-theme-personal .disabled label.np-upload-button:not(.disabled):focus-visible,
5416
- .np-theme-personal .disabled label.np-upload-button:not(.disabled):active {
5417
- background-color: transparent;
5418
- }
5419
- .np-upload-button .np-upload-icon {
5420
- display: flex;
5421
- align-items: center;
5422
- }
5423
- .np-upload-button-container.droppable {
5424
- border: 0;
5393
+ .np-upload-button-container {
5394
+ border-style: solid;
5425
5395
  }
5426
5396
  .np-upload-button-container .droppable-card-content {
5427
5397
  display: flex;
5428
5398
  }
5429
- .np-theme-personal .np-upload-button-container .droppable-card-content {
5430
- border-radius: calc(10px - 1px);
5431
- border-radius: calc(var(--radius-small) - 1px);
5399
+ .np-upload-button-container.droppable-dropping {
5400
+ border-color: #c9cbce !important;
5401
+ border-color: var(--color-interactive-secondary) !important;
5432
5402
  }
5433
5403
  .np-upload-button-container input[type="file"] {
5434
5404
  opacity: 0;
5435
5405
  z-index: -1;
5436
5406
  position: absolute;
5437
5407
  }
5438
- .np-upload-button-container input[type="file"]:focus-visible + label {
5439
- background-color: rgba(134,167,189,0.10196);
5440
- background-color: var(--color-background-neutral);
5408
+ .np-upload-button-container .np-upload-button {
5409
+ border: none;
5441
5410
  }
5442
- .np-upload-input {
5443
- border: 1px solid #c9cbce;
5444
- border: 1px solid var(--color-interactive-secondary);
5445
- border-radius: 10px;
5446
- border-radius: var(--radius-small);
5411
+ .np-upload-button {
5412
+ width: 100%;
5413
+ padding: 16px;
5414
+ padding: var(--padding-small);
5415
+ border-radius: 0;
5447
5416
  }
5448
- .np-upload-input:has(:focus-visible) {
5449
- outline: var(--ring-outline-color) solid var(--ring-outline-width);
5450
- outline-offset: var(--ring-outline-offset);
5417
+ label.np-upload-button:not(.disabled):hover,
5418
+ label.np-upload-button:not(.disabled):active {
5419
+ background-color: var(--color-background-screen-hover);
5420
+ }
5421
+ .disabled label.np-upload-button:not(.disabled):hover,
5422
+ .disabled label.np-upload-button:not(.disabled):active {
5423
+ background-color: transparent;
5424
+ }
5425
+ .np-upload-button .media {
5426
+ align-items: flex-start;
5451
5427
  }
5452
5428
  .np-upload-input.form-control {
5453
5429
  height: auto;
5454
5430
  padding: 0;
5455
5431
  padding: initial;
5456
5432
  }
5457
- .np-theme-personal .np-upload-input {
5458
- border-radius: 10px;
5459
- border-radius: var(--radius-small);
5433
+ .np-upload-input > div:first-child,
5434
+ .np-upload-input > div:first-child .np-upload-item--single-file,
5435
+ .np-upload-input > div:first-child .np-upload-item--link {
5436
+ border-top-left-radius: 10px;
5437
+ border-top-left-radius: var(--radius-small);
5438
+ border-top-right-radius: 10px;
5439
+ border-top-right-radius: var(--radius-small);
5440
+ }
5441
+ .np-upload-input > div:last-child {
5442
+ border-bottom-left-radius: 10px;
5443
+ border-bottom-left-radius: var(--radius-small);
5444
+ border-bottom-right-radius: 10px;
5445
+ border-bottom-right-radius: var(--radius-small);
5460
5446
  }
5461
5447
  .np-theme-personal .np-upload-input.disabled .btn {
5462
5448
  cursor: inherit;
5463
5449
  }
5464
- .np-theme-personal .np-upload-input .np-upload-button {
5465
- border-radius: calc(10px - 1px);
5466
- border-radius: calc(var(--radius-small) - 1px);
5467
- padding: 16px;
5468
- padding: var(--padding-small);
5469
- }
5470
- .np-theme-personal .np-upload-input .np-upload-input--square-top {
5471
- border-top-right-radius: 0px;
5472
- border-top-left-radius: 0px;
5473
- }
5474
- .np-theme-personal .np-upload-input .np-upload-item__remove-button {
5475
- border-radius: 0;
5476
- border-radius: initial;
5477
- }
5478
5450
  .np-theme-personal .np-upload-input .np-upload-icon {
5479
5451
  color: var(--color-interactive-primary);
5480
5452
  }
5481
5453
  .np-theme-personal .np-upload-input .media-body {
5454
+ padding-right: 32px;
5455
+ padding-right: var(--size-32);
5482
5456
  color: var(--color-content-link);
5483
5457
  white-space: break-spaces;
5484
5458
  }
5459
+ @media (max-width: 320px) {
5460
+ .np-theme-personal .np-upload-input .media-body {
5461
+ padding-right: 64px;
5462
+ padding-right: var(--size-64);
5463
+ }
5464
+ }
5485
5465
  .np-theme-personal .np-upload-input .media-body .np-text-body-large-bold {
5486
5466
  -webkit-text-decoration: underline;
5487
5467
  text-decoration: underline;
@@ -5496,6 +5476,10 @@ label.np-upload-button:not(.disabled):active {
5496
5476
  .np-theme-personal .np-upload-input .media-body .text-negative {
5497
5477
  color: var(--color-sentiment-negative) !important;
5498
5478
  }
5479
+ .np-theme-personal .np-upload-input-errors {
5480
+ padding-left: 0;
5481
+ list-style-position: inside;
5482
+ }
5499
5483
  .np-theme-personal .np-upload-input .status-circle {
5500
5484
  width: 24px;
5501
5485
  width: var(--size-x-small);
@@ -5510,79 +5494,114 @@ label.np-upload-button:not(.disabled):active {
5510
5494
  height: var(--size-large);
5511
5495
  }
5512
5496
  }
5513
- .np-upload-item:not(:last-child)::after {
5497
+ .np-upload-item {
5498
+ border: 1px solid #c9cbce;
5499
+ border: 1px solid var(--color-interactive-secondary);
5500
+ }
5501
+ .np-upload-item:first-child ~ div:before {
5514
5502
  display: block;
5515
5503
  position: relative;
5516
- border-bottom: 1px solid rgba(0,0,0,0.10196);
5517
- border-bottom: 1px solid var(--color-border-neutral);
5504
+ height: 1px;
5505
+ background-color: rgba(0,0,0,0.10196);
5506
+ background-color: var(--color-border-neutral);
5518
5507
  content: " ";
5519
5508
  margin: 0 16px;
5520
5509
  margin: 0 var(--size-16);
5521
5510
  }
5522
- .np-theme-personal .np-upload-item:first-child a:hover,
5523
- .np-theme-personal .np-upload-item:first-child a:focus-visible,
5524
- .np-theme-personal .np-upload-item:first-child a:active {
5525
- border-top-left-radius: calc(10px - 1px);
5526
- border-top-left-radius: calc(var(--radius-small) - 1px);
5511
+ .np-upload-item:first-child ~ div {
5512
+ border-top: 0;
5513
+ }
5514
+ .np-upload-item:not(:last-child) {
5515
+ border-bottom: 0;
5516
+ }
5517
+ .np-upload-item.np-upload-item__link:hover:before,
5518
+ .np-upload-button-container:hover:before {
5519
+ margin: 0 !important;
5520
+ }
5521
+ .np-upload-item.np-upload-item__link:hover + div:before,
5522
+ .np-upload-button-container:hover + div:before {
5523
+ margin: 0 !important;
5524
+ }
5525
+ .np-upload-button-container:has(:focus-visible) {
5526
+ outline: var(--ring-outline-color) solid var(--ring-outline-width);
5527
+ outline-offset: var(--ring-outline-offset);
5528
+ border-color: transparent;
5529
+ outline-offset: -3px;
5527
5530
  }
5528
- .np-theme-personal .np-upload-item:first-child a:hover ~ .np-upload-item__remove-button,
5529
- .np-theme-personal .np-upload-item:first-child a:focus-visible ~ .np-upload-item__remove-button,
5530
- .np-theme-personal .np-upload-item:first-child a:active ~ .np-upload-item__remove-button {
5531
- border-top-right-radius: calc(10px - 1px);
5532
- border-top-right-radius: calc(var(--radius-small) - 1px);
5531
+ .np-upload-item--single-file:focus-visible,
5532
+ .np-upload-item--link:focus-visible,
5533
+ .np-upload-button-container:has(:focus-visible) {
5534
+ outline-width: 3px;
5533
5535
  }
5534
5536
  .np-upload-item__link a {
5535
5537
  flex: 1;
5536
5538
  -webkit-text-decoration: none;
5537
5539
  text-decoration: none;
5538
- outline: none;
5539
- border-top-right-radius: 0;
5540
- border-bottom-right-radius: 0;
5541
- }
5542
- .np-theme-personal .np-upload-item__link a {
5543
- border-radius: 0;
5544
- border-radius: initial;
5540
+ border-radius: inherit;
5545
5541
  }
5546
- .np-upload-item__link a.np-upload-item--single-file {
5547
- border-bottom-left-radius: calc(10px - 1px);
5548
- border-bottom-left-radius: calc(var(--radius-small) - 1px);
5542
+ .np-upload-item__link a:focus-visible {
5543
+ outline-offset: -2px;
5549
5544
  }
5550
5545
  .np-upload-item__link a:hover,
5551
- .np-upload-item__link a:focus-visible,
5552
5546
  .np-upload-item__link a:active {
5553
5547
  -webkit-text-decoration: none;
5554
5548
  text-decoration: none;
5555
5549
  background-color: rgba(134,167,189,0.10196);
5556
5550
  background-color: var(--color-background-neutral);
5557
5551
  }
5558
- .np-upload-item__link a:hover ~ .np-upload-item__remove-button,
5559
- .np-upload-item__link a:focus-visible ~ .np-upload-item__remove-button,
5560
- .np-upload-item__link a:active ~ .np-upload-item__remove-button {
5561
- background-color: rgba(134,167,189,0.10196);
5562
- background-color: var(--color-background-neutral);
5563
- }
5564
- .np-upload-item__link .np-upload-item__remove-button.np-upload-item--single-file {
5565
- border-bottom-right-radius: calc(10px - 1px);
5566
- border-bottom-right-radius: calc(var(--radius-small) - 1px);
5567
- }
5568
5552
  .np-upload-item__body {
5569
5553
  display: flex;
5570
5554
  align-items: center;
5571
5555
  justify-content: space-between;
5556
+ position: relative;
5557
+ border-radius: inherit;
5572
5558
  }
5573
5559
  .np-upload-item__remove-button {
5574
- flex-shrink: 0;
5575
- align-self: stretch;
5576
- padding: 12px 16px;
5577
- padding: var(--size-12) var(--size-16);
5578
- color: #c9cbce;
5579
- color: var(--color-interactive-secondary);
5580
- background: transparent;
5560
+ display: flex;
5561
+ align-items: center;
5562
+ justify-content: center;
5563
+ align-self: flex-start;
5564
+ position: absolute;
5565
+ height: 24px;
5566
+ height: var(--size-24);
5567
+ min-height: 0;
5568
+ width: 24px;
5569
+ width: var(--size-24);
5570
+ padding: 0;
5571
+ border-radius: 50% !important;
5572
+ outline-offset: 0 !important;
5573
+ background-color: rgba(134,167,189,0.10196);
5574
+ background-color: var(--color-background-neutral);
5575
+ color: var(--color-interactive-primary);
5576
+ right: 16px;
5577
+ right: var(--size-16);
5578
+ top: 16px;
5579
+ top: var(--size-16);
5580
+ transition: color, background-color 0.15s ease-in-out;
5581
+ }
5582
+ @media (max-width: 320px) {
5583
+ .np-upload-item__remove-button {
5584
+ top: 16px;
5585
+ top: var(--size-16);
5586
+ right: 16px;
5587
+ right: var(--size-16);
5588
+ height: 48px;
5589
+ height: var(--size-48);
5590
+ width: 48px;
5591
+ width: var(--size-48);
5592
+ }
5593
+ }
5594
+ .np-upload-item__remove-button:hover {
5595
+ background-color: var(--color-sentiment-negative);
5596
+ color: var(--color-contrast-overlay) !important;
5581
5597
  }
5582
- .np-upload-item__remove-button:hover,
5583
- .np-upload-item__remove-button:focus {
5584
- color: #d03238 !important;
5585
- color: var(--color-interactive-negative-hover) !important;
5598
+ .np-upload-item__remove-button:before {
5599
+ display: block;
5600
+ width: 44px;
5601
+ height: 44px;
5602
+ content: '';
5603
+ border-radius: 50%;
5604
+ position: absolute;
5586
5605
  }
5587
5606
  .np-progress {
5588
5607
  border-radius: 10px;
@@ -62,11 +62,11 @@ describe('MoneyInput', () => {
62
62
  ['1±!@#$^*,_+?><2', '1,2'],
63
63
  ['12,3', '12,3'],
64
64
  ['12.3', '12.3'],
65
- ])("ignores the letters when typed '%s' and shows '%s'", (testValue, expectedValue) => {
65
+ ])("ignores the letters when typed '%s' and shows '%s'", async (testValue, expectedValue) => {
66
66
  render(<MoneyInput {...props} amount={null} />);
67
67
 
68
68
  const input = screen.getByRole('textbox');
69
- userEvent.type(input, testValue);
69
+ await userEvent.type(input, testValue);
70
70
  expect(input).toHaveValue(expectedValue);
71
71
  });
72
72
 
@@ -1,9 +1,7 @@
1
- import { FORCE_RE_RENDER } from '@storybook/core-events';
2
- import { addons, useGlobals } from '@storybook/manager-api';
3
1
  import { Meta, StoryObj } from '@storybook/react';
4
2
  import { expect, within, userEvent } from '@storybook/test';
5
3
  import { Lock } from '@transferwise/icons';
6
- import React, { useEffect, useState } from 'react';
4
+ import { useState } from 'react';
7
5
 
8
6
  import MoneyInput, { CurrencyOptionItem } from '.';
9
7
  import Provider from '../provider/Provider';
@@ -107,7 +105,6 @@ export const SingleCurrency: Story = {
107
105
  args: {
108
106
  currencies: [],
109
107
  selectedCurrency: exampleCurrency.eur,
110
- onCurrencyChange: undefined,
111
108
  },
112
109
  };
113
110
 
@@ -24,7 +24,7 @@ describe('OverlayHeader', () => {
24
24
  });
25
25
 
26
26
  it("doesn't render separator if avatar or onClose are not provided", () => {
27
- const { container, rerender } = render(<OverlayHeader {...props} onClose={null} />);
27
+ const { container, rerender } = render(<OverlayHeader {...props} onClose={undefined} />);
28
28
  expect(container.querySelector('.separator')).not.toBeInTheDocument();
29
29
  rerender(<OverlayHeader {...props} avatar={null} />);
30
30
  expect(container.querySelector('.separator')).not.toBeInTheDocument();
@@ -21,7 +21,11 @@ const avatarProfiles = {
21
21
  };
22
22
 
23
23
  export const Basic = () => {
24
- const showAvatar = select('avatar', Object.keys(avatarProfiles), 'Profile');
24
+ const showAvatar = select(
25
+ 'avatar',
26
+ Object.keys(avatarProfiles) as (keyof typeof avatarProfiles)[],
27
+ 'Profile',
28
+ );
25
29
  return (
26
30
  <OverlayHeader
27
31
  logo={<Logo />}
@@ -40,7 +44,11 @@ export const WithAvatarWrapper = () => {
40
44
  'avatarURL',
41
45
  'https://wise.com/web-art/assets/illustrations/heart-small@2x.webp',
42
46
  );
43
- const profileType = select('profileType', Object.keys(ProfileType));
47
+ const profileType = select(
48
+ 'profileType',
49
+ Object.keys(ProfileType) as `${ProfileType}`[],
50
+ undefined,
51
+ );
44
52
  return (
45
53
  <OverlayHeader
46
54
  logo={<Logo />}
@@ -1,12 +1,21 @@
1
1
  import classNames from 'classnames';
2
- import PropTypes from 'prop-types';
3
2
 
4
3
  import { Size } from '../common';
5
4
  import { CloseButton } from '../common/closeButton';
6
5
  import FlowHeader from '../common/flowHeader';
7
6
  import Logo from '../logo';
8
7
 
9
- const OverlayHeader = ({ avatar, onClose, logo }) => {
8
+ export interface OverlayHeaderProps {
9
+ /** An Avatar */
10
+ avatar?: React.ReactNode;
11
+ logo?: React.ReactNode;
12
+ /** Function called when the close is clicked */
13
+ onClose?: React.MouseEventHandler<HTMLButtonElement>;
14
+ }
15
+
16
+ const defaultLogo = <Logo />;
17
+
18
+ export default function OverlayHeader({ avatar, onClose, logo = defaultLogo }: OverlayHeaderProps) {
10
19
  const closeButton = onClose && <CloseButton size={Size.LARGE} onClick={onClose} />;
11
20
  return (
12
21
  <div className="np-overlay-header d-flex justify-content-center">
@@ -23,20 +32,4 @@ const OverlayHeader = ({ avatar, onClose, logo }) => {
23
32
  />
24
33
  </div>
25
34
  );
26
- };
27
-
28
- OverlayHeader.defaultProps = {
29
- avatar: null,
30
- logo: <Logo />,
31
- onClose: null,
32
- };
33
-
34
- OverlayHeader.propTypes = {
35
- /** An Avatar */
36
- avatar: PropTypes.element,
37
- logo: PropTypes.node,
38
- /** Function called when the close is clicked */
39
- onClose: PropTypes.func,
40
- };
41
-
42
- export default OverlayHeader;
35
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './OverlayHeader';
2
+ export type { OverlayHeaderProps } from './OverlayHeader';
@@ -19,5 +19,6 @@ export const Basic = {
19
19
  selectProps: {
20
20
  className: 'custom-class',
21
21
  },
22
+ onChange: () => {},
22
23
  },
23
24
  } satisfies Story;
@@ -29,7 +29,7 @@ describe('Popover', () => {
29
29
  </Popover>,
30
30
  );
31
31
 
32
- userEvent.click(screen.getByText('Open'));
32
+ await userEvent.click(screen.getByText('Open'));
33
33
 
34
34
  await waitForPanel();
35
35
  expect(getPanel()).toMatchSnapshot();
@@ -42,7 +42,7 @@ describe('Popover', () => {
42
42
  </Popover>,
43
43
  ));
44
44
 
45
- userEvent.click(screen.getByText('Open'));
45
+ await userEvent.click(screen.getByText('Open'));
46
46
  await waitForPanel();
47
47
 
48
48
  expect(getTitle()).toBeInTheDocument();
@@ -53,7 +53,7 @@ describe('Popover', () => {
53
53
  </Popover>,
54
54
  );
55
55
 
56
- userEvent.click(screen.getByText('Open'));
56
+ await userEvent.click(screen.getByText('Open'));
57
57
 
58
58
  expect(getTitle()).not.toBeInTheDocument();
59
59
  });
@@ -67,7 +67,7 @@ describe('Popover', () => {
67
67
 
68
68
  expect(getPanel()).not.toBeInTheDocument();
69
69
 
70
- userEvent.click(screen.getByText('Open'));
70
+ await userEvent.click(screen.getByText('Open'));
71
71
  await waitForPanel();
72
72
 
73
73
  expect(getPanel()).toBeInTheDocument();
@@ -79,19 +79,19 @@ describe('Popover', () => {
79
79
  global.innerWidth = Breakpoint.SMALL - 1;
80
80
  });
81
81
 
82
- it('renders when is open', () => {
82
+ it('renders when is open', async () => {
83
83
  ({ container } = render(
84
84
  <Popover {...props}>
85
85
  <button type="button">Open</button>
86
86
  </Popover>,
87
87
  ));
88
88
 
89
- userEvent.click(screen.getByText('Open'));
89
+ await userEvent.click(screen.getByText('Open'));
90
90
 
91
91
  expect(container).toMatchSnapshot();
92
92
  });
93
93
 
94
- it('renders BottomSheet onClick', () => {
94
+ it('renders BottomSheet onClick', async () => {
95
95
  render(
96
96
  <Popover {...props}>
97
97
  <button type="button">Open</button>
@@ -100,7 +100,7 @@ describe('Popover', () => {
100
100
 
101
101
  expect(getBottomSheet()).not.toBeInTheDocument();
102
102
 
103
- userEvent.click(screen.getByText('Open'));
103
+ await userEvent.click(screen.getByText('Open'));
104
104
 
105
105
  expect(getBottomSheet()).toBeInTheDocument();
106
106
  });
@@ -115,11 +115,11 @@ describe('Popover', () => {
115
115
  );
116
116
 
117
117
  expect(handleOnClose).not.toHaveBeenCalled();
118
- userEvent.click(screen.getByText('Open'));
118
+ await userEvent.click(screen.getByText('Open'));
119
119
  await waitForPanel();
120
120
  const dimmer = getDimmer();
121
121
  if (dimmer != null) {
122
- userEvent.click(dimmer);
122
+ await userEvent.click(dimmer);
123
123
  }
124
124
  expect(handleOnClose).toHaveBeenCalledTimes(1);
125
125
  });
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import { render } from '../test-utils';
3
2
 
4
3
  import Progress from '.';
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import { render, screen } from '../test-utils';
3
2
 
4
3
  import ProgressBar from './ProgressBar';
@@ -83,7 +83,6 @@ export const WithCards = () => {
83
83
  return (
84
84
  <Section>
85
85
  <Header title="Section with cards" />
86
- {/* @ts-expect-error TODO: remove once Card is migrated to TypeScript */}
87
86
  <Card
88
87
  title="What's in the box?!"
89
88
  details="Click me to reveal."
@@ -93,7 +92,6 @@ export const WithCards = () => {
93
92
  >
94
93
  <div>Hello there!</div>
95
94
  </Card>
96
- {/* @ts-expect-error TODO: remove once Card is migrated to TypeScript */}
97
95
  <Card
98
96
  title="What's in the box?!"
99
97
  details="Click me to reveal."
@@ -1,4 +1,3 @@
1
- import '@testing-library/jest-dom';
2
1
  import React from 'react';
3
2
 
4
3
  import { render, screen, userEvent, waitFor } from '../test-utils';
@@ -60,30 +59,30 @@ describe('SegmentedControl', () => {
60
59
  expect(accountingTab).toHaveAttribute('aria-selected', 'true');
61
60
  });
62
61
 
63
- it('lets the user pick through the segments when it is set to input', () => {
62
+ it('lets the user pick through the segments when it is set to input', async () => {
64
63
  renderSegmentedControl();
65
64
 
66
65
  const payroll = screen.getByRole('radio', { name: 'Payroll' });
67
- userEvent.click(payroll);
66
+ await userEvent.click(payroll);
68
67
 
69
68
  expect(onChange).toHaveBeenCalledWith('payroll');
70
69
 
71
70
  const reporting = screen.getByRole('radio', { name: 'Reporting' });
72
- userEvent.click(reporting);
71
+ await userEvent.click(reporting);
73
72
 
74
73
  expect(onChange).toHaveBeenCalledWith('reporting');
75
74
  });
76
75
 
77
- it('lets the user pick through the segments when it is set to view', () => {
76
+ it('lets the user pick through the segments when it is set to view', async () => {
78
77
  renderSegmentedControl({ mode: 'view', segments: defaultSegmentsWithControls });
79
78
 
80
79
  const payroll = screen.getByRole('tab', { name: 'Payroll' });
81
- userEvent.click(payroll);
80
+ await userEvent.click(payroll);
82
81
 
83
82
  expect(onChange).toHaveBeenCalledWith('payroll');
84
83
 
85
84
  const reporting = screen.getByRole('tab', { name: 'Reporting' });
86
- userEvent.click(reporting);
85
+ await userEvent.click(reporting);
87
86
 
88
87
  expect(onChange).toHaveBeenCalledWith('reporting');
89
88
  });
@@ -134,11 +133,11 @@ describe('SegmentedControl', () => {
134
133
  });
135
134
  });
136
135
 
137
- it('updates the selected segment when the selectedValue prop changes', () => {
136
+ it('updates the selected segment when the selectedValue prop changes', async () => {
138
137
  const { rerender } = render(<SegmentedControl {...defaultProps} />);
139
138
 
140
139
  const payroll = screen.getByRole('radio', { name: 'Payroll' });
141
- userEvent.click(payroll);
140
+ await userEvent.click(payroll);
142
141
 
143
142
  expect(onChange).toHaveBeenCalledWith('payroll');
144
143
 
@@ -148,7 +147,7 @@ describe('SegmentedControl', () => {
148
147
  expect(reporting).toBeChecked();
149
148
  });
150
149
 
151
- it('updates the options when the segments prop changes', () => {
150
+ it('updates the options when the segments prop changes', async () => {
152
151
  const { rerender } = render(<SegmentedControl {...defaultProps} />);
153
152
 
154
153
  const newSegments = [
@@ -167,7 +166,7 @@ describe('SegmentedControl', () => {
167
166
  rerender(<SegmentedControl {...defaultProps} segments={newSegments} />);
168
167
 
169
168
  const anotherOne = screen.getByRole('radio', { name: 'Another One' });
170
- userEvent.click(anotherOne);
169
+ await userEvent.click(anotherOne);
171
170
 
172
171
  expect(onChange).toHaveBeenCalledWith('anotherOne');
173
172
  });