@transferwise/components 46.36.1 → 46.38.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 (351) hide show
  1. package/README.md +1 -1
  2. package/build/index.js +169 -348
  3. package/build/index.js.map +1 -1
  4. package/build/index.mjs +164 -342
  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/accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
  12. package/build/types/actionButton/ActionButton.d.ts +2 -2
  13. package/build/types/actionButton/ActionButton.d.ts.map +1 -1
  14. package/build/types/actionOption/ActionOption.d.ts +4 -5
  15. package/build/types/actionOption/ActionOption.d.ts.map +1 -1
  16. package/build/types/alert/Alert.d.ts +1 -2
  17. package/build/types/alert/Alert.d.ts.map +1 -1
  18. package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts +4 -11
  19. package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts.map +1 -1
  20. package/build/types/alert/inlineMarkdown/index.d.ts +2 -1
  21. package/build/types/alert/inlineMarkdown/index.d.ts.map +1 -1
  22. package/build/types/avatar/Avatar.d.ts +0 -1
  23. package/build/types/avatar/Avatar.d.ts.map +1 -1
  24. package/build/types/avatar/colors/colors.d.ts.map +1 -1
  25. package/build/types/avatarWrapper/AvatarWrapper.d.ts +0 -1
  26. package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
  27. package/build/types/body/Body.d.ts +3 -3
  28. package/build/types/body/Body.d.ts.map +1 -1
  29. package/build/types/button/Button.d.ts +0 -1
  30. package/build/types/button/Button.d.ts.map +1 -1
  31. package/build/types/button/Button.messages.d.ts +3 -3
  32. package/build/types/button/classMap.d.ts +6 -6
  33. package/build/types/card/Card.d.ts +16 -20
  34. package/build/types/card/Card.d.ts.map +1 -1
  35. package/build/types/card/index.d.ts +2 -1
  36. package/build/types/card/index.d.ts.map +1 -1
  37. package/build/types/checkbox/Checkbox.d.ts +15 -20
  38. package/build/types/checkbox/Checkbox.d.ts.map +1 -1
  39. package/build/types/checkbox/index.d.ts +2 -2
  40. package/build/types/checkbox/index.d.ts.map +1 -1
  41. package/build/types/checkboxOption/CheckboxOption.d.ts +2 -3
  42. package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
  43. package/build/types/chevron/Chevron.d.ts +0 -1
  44. package/build/types/chevron/Chevron.d.ts.map +1 -1
  45. package/build/types/chips/Chip.d.ts +1 -2
  46. package/build/types/chips/Chip.d.ts.map +1 -1
  47. package/build/types/chips/Chips.d.ts +1 -2
  48. package/build/types/chips/Chips.d.ts.map +1 -1
  49. package/build/types/circularButton/CircularButton.d.ts +0 -1
  50. package/build/types/circularButton/CircularButton.d.ts.map +1 -1
  51. package/build/types/common/RadioButton/RadioButton.d.ts +0 -1
  52. package/build/types/common/RadioButton/RadioButton.d.ts.map +1 -1
  53. package/build/types/common/action/Action.d.ts +0 -1
  54. package/build/types/common/action/Action.d.ts.map +1 -1
  55. package/build/types/common/bottomSheet/BottomSheet.d.ts +2 -2
  56. package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
  57. package/build/types/common/closeButton/CloseButton.d.ts +5 -6
  58. package/build/types/common/closeButton/CloseButton.d.ts.map +1 -1
  59. package/build/types/common/commonProps.d.ts +0 -1
  60. package/build/types/common/commonProps.d.ts.map +1 -1
  61. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts +1 -1
  62. package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts.map +1 -1
  63. package/build/types/common/flowHeader/FlowHeader.d.ts +1 -1
  64. package/build/types/common/flowHeader/FlowHeader.d.ts.map +1 -1
  65. package/build/types/common/focusBoundary/FocusBoundary.d.ts +0 -1
  66. package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
  67. package/build/types/common/hooks/useDirection/useDirection.d.ts.map +1 -1
  68. package/build/types/common/hooks/useResizeObserver.d.ts +1 -2
  69. package/build/types/common/hooks/useResizeObserver.d.ts.map +1 -1
  70. package/build/types/common/panel/Panel.d.ts +11 -11
  71. package/build/types/common/panel/Panel.d.ts.map +1 -1
  72. package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts +1 -2
  73. package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts.map +1 -1
  74. package/build/types/common/responsivePanel/ResponsivePanel.d.ts +9 -10
  75. package/build/types/common/responsivePanel/ResponsivePanel.d.ts.map +1 -1
  76. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +0 -1
  77. package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
  78. package/build/types/dateInput/DateInput.d.ts +0 -1
  79. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  80. package/build/types/dateLookup/DateLookup.d.ts +1 -1
  81. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  82. package/build/types/dateLookup/dateHeader/DateHeader.d.ts +0 -1
  83. package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
  84. package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts +0 -1
  85. package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts.map +1 -1
  86. package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts +0 -1
  87. package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts.map +1 -1
  88. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +0 -1
  89. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -1
  90. package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts +0 -1
  91. package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts.map +1 -1
  92. package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts +0 -1
  93. package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
  94. package/build/types/dateLookup/tableLink/TableLink.d.ts +0 -1
  95. package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
  96. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +0 -1
  97. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -1
  98. package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts +0 -1
  99. package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -1
  100. package/build/types/decision/Decision.d.ts +1 -2
  101. package/build/types/decision/Decision.d.ts.map +1 -1
  102. package/build/types/definitionList/DefinitionList.d.ts +19 -24
  103. package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
  104. package/build/types/definitionList/index.d.ts +2 -1
  105. package/build/types/definitionList/index.d.ts.map +1 -1
  106. package/build/types/dimmer/Dimmer.d.ts +3 -3
  107. package/build/types/dimmer/Dimmer.d.ts.map +1 -1
  108. package/build/types/drawer/Drawer.d.ts +18 -36
  109. package/build/types/drawer/Drawer.d.ts.map +1 -1
  110. package/build/types/drawer/index.d.ts +2 -1
  111. package/build/types/drawer/index.d.ts.map +1 -1
  112. package/build/types/dropFade/DropFade.d.ts.map +1 -1
  113. package/build/types/emphasis/Emphasis.d.ts +1 -2
  114. package/build/types/emphasis/Emphasis.d.ts.map +1 -1
  115. package/build/types/field/Field.d.ts +0 -1
  116. package/build/types/field/Field.d.ts.map +1 -1
  117. package/build/types/flowNavigation/FlowNavigation.d.ts +0 -1
  118. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  119. package/build/types/flowNavigation/backButton/BackButton.d.ts +3 -3
  120. package/build/types/flowNavigation/backButton/index.d.ts +1 -1
  121. package/build/types/flowNavigation/backButton/index.d.ts.map +1 -1
  122. package/build/types/header/Header.d.ts +0 -1
  123. package/build/types/header/Header.d.ts.map +1 -1
  124. package/build/types/image/Image.d.ts +0 -1
  125. package/build/types/image/Image.d.ts.map +1 -1
  126. package/build/types/index.d.ts +4 -0
  127. package/build/types/index.d.ts.map +1 -1
  128. package/build/types/info/Info.d.ts +0 -1
  129. package/build/types/info/Info.d.ts.map +1 -1
  130. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts +0 -1
  131. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
  132. package/build/types/inputs/Input.d.ts +1 -2
  133. package/build/types/inputs/Input.d.ts.map +1 -1
  134. package/build/types/inputs/InputGroup.d.ts +0 -1
  135. package/build/types/inputs/InputGroup.d.ts.map +1 -1
  136. package/build/types/inputs/SearchInput.d.ts +1 -2
  137. package/build/types/inputs/SearchInput.d.ts.map +1 -1
  138. package/build/types/inputs/SelectInput.d.ts +0 -1
  139. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  140. package/build/types/inputs/TextArea.d.ts +1 -2
  141. package/build/types/inputs/TextArea.d.ts.map +1 -1
  142. package/build/types/inputs/_BottomSheet.d.ts +1 -2
  143. package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
  144. package/build/types/inputs/_ButtonInput.d.ts +1 -2
  145. package/build/types/inputs/_ButtonInput.d.ts.map +1 -1
  146. package/build/types/inputs/_Popover.d.ts +0 -1
  147. package/build/types/inputs/_Popover.d.ts.map +1 -1
  148. package/build/types/inputs/contexts.d.ts +0 -1
  149. package/build/types/inputs/contexts.d.ts.map +1 -1
  150. package/build/types/label/Label.d.ts +0 -1
  151. package/build/types/label/Label.d.ts.map +1 -1
  152. package/build/types/loader/Loader.d.ts +0 -1
  153. package/build/types/loader/Loader.d.ts.map +1 -1
  154. package/build/types/logo/Logo.d.ts +15 -23
  155. package/build/types/logo/Logo.d.ts.map +1 -1
  156. package/build/types/logo/index.d.ts +1 -2
  157. package/build/types/logo/index.d.ts.map +1 -1
  158. package/build/types/markdown/Markdown.d.ts +0 -1
  159. package/build/types/markdown/Markdown.d.ts.map +1 -1
  160. package/build/types/money/Money.d.ts +0 -1
  161. package/build/types/money/Money.d.ts.map +1 -1
  162. package/build/types/moneyInput/MoneyInput.d.ts +0 -1
  163. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  164. package/build/types/navigationOption/NavigationOption.d.ts +0 -1
  165. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  166. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +0 -1
  167. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  168. package/build/types/popover/Popover.d.ts +0 -1
  169. package/build/types/popover/Popover.d.ts.map +1 -1
  170. package/build/types/progress/Progress.d.ts +1 -2
  171. package/build/types/progress/Progress.d.ts.map +1 -1
  172. package/build/types/progressBar/ProgressBar.d.ts +1 -2
  173. package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
  174. package/build/types/promoCard/PromoCard.d.ts +1 -1
  175. package/build/types/promoCard/PromoCard.d.ts.map +1 -1
  176. package/build/types/provider/Provider.d.ts +0 -1
  177. package/build/types/provider/Provider.d.ts.map +1 -1
  178. package/build/types/provider/direction/DirectionProvider.d.ts +2 -2
  179. package/build/types/provider/direction/DirectionProvider.d.ts.map +1 -1
  180. package/build/types/provider/language/LanguageProvider.d.ts +2 -2
  181. package/build/types/provider/language/LanguageProvider.d.ts.map +1 -1
  182. package/build/types/radio/Radio.d.ts +0 -1
  183. package/build/types/radio/Radio.d.ts.map +1 -1
  184. package/build/types/radioGroup/RadioGroup.d.ts +0 -1
  185. package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
  186. package/build/types/radioOption/RadioOption.d.ts +0 -1
  187. package/build/types/radioOption/RadioOption.d.ts.map +1 -1
  188. package/build/types/segmentedControl/SegmentedControl.d.ts +0 -1
  189. package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
  190. package/build/types/select/index.d.ts +1 -1
  191. package/build/types/select/index.d.ts.map +1 -1
  192. package/build/types/select/option/Option.d.ts +2 -1
  193. package/build/types/select/option/Option.d.ts.map +1 -1
  194. package/build/types/select/option/index.d.ts +1 -1
  195. package/build/types/select/option/index.d.ts.map +1 -1
  196. package/build/types/select/searchBox/SearchBox.d.ts +3 -3
  197. package/build/types/select/searchBox/SearchBox.d.ts.map +1 -1
  198. package/build/types/slidingPanel/SlidingPanel.d.ts +2 -2
  199. package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
  200. package/build/types/snackbar/Snackbar.d.ts +2 -1
  201. package/build/types/snackbar/Snackbar.d.ts.map +1 -1
  202. package/build/types/snackbar/SnackbarContext.d.ts +0 -1
  203. package/build/types/snackbar/SnackbarContext.d.ts.map +1 -1
  204. package/build/types/snackbar/SnackbarProvider.d.ts +0 -1
  205. package/build/types/snackbar/SnackbarProvider.d.ts.map +1 -1
  206. package/build/types/statusIcon/StatusIcon.d.ts +0 -1
  207. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  208. package/build/types/sticky/Sticky.d.ts +32 -4
  209. package/build/types/sticky/Sticky.d.ts.map +1 -1
  210. package/build/types/switchOption/SwitchOption.d.ts +3 -4
  211. package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
  212. package/build/types/tabs/TabList.d.ts +1 -1
  213. package/build/types/tabs/TabPanel.d.ts +4 -4
  214. package/build/types/tabs/Tabs.d.ts +1 -1
  215. package/build/types/tabs/Tabs.d.ts.map +1 -1
  216. package/build/types/test-utils/story-config.d.ts +8 -0
  217. package/build/types/test-utils/story-config.d.ts.map +1 -1
  218. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts +0 -1
  219. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
  220. package/build/types/tile/Tile.d.ts +16 -37
  221. package/build/types/tile/Tile.d.ts.map +1 -1
  222. package/build/types/tile/index.d.ts +1 -1
  223. package/build/types/tile/index.d.ts.map +1 -1
  224. package/build/types/tooltip/Tooltip.d.ts.map +1 -1
  225. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  226. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts +0 -1
  227. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
  228. package/build/types/typeahead/util/highlight.d.ts +0 -1
  229. package/build/types/typeahead/util/highlight.d.ts.map +1 -1
  230. package/build/types/upload/Upload.d.ts.map +1 -1
  231. package/build/types/upload/Upload.messages.d.ts +20 -20
  232. package/build/types/upload/steps/completeStep/completeStep.d.ts +10 -10
  233. package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +8 -8
  234. package/build/types/upload/steps/processingStep/processingStep.d.ts +8 -8
  235. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +9 -9
  236. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
  237. package/build/types/uploadInput/UploadInput.d.ts +1 -2
  238. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  239. package/build/types/uploadInput/types.d.ts +9 -1
  240. package/build/types/uploadInput/types.d.ts.map +1 -1
  241. package/build/types/uploadInput/uploadButton/UploadButton.d.ts +1 -6
  242. package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
  243. package/build/types/uploadInput/uploadItem/UploadItem.d.ts +0 -1
  244. package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
  245. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +4 -4
  246. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  247. package/build/types/withNextPortal/withNextPortal.d.ts +0 -1
  248. package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
  249. package/package.json +3 -4
  250. package/src/accordion/AccordionItem/AccordionItem.tsx +5 -2
  251. package/src/actionOption/ActionOption.tsx +4 -5
  252. package/src/alert/Alert.tsx +1 -1
  253. package/src/alert/inlineMarkdown/InlineMarkdown.tsx +13 -0
  254. package/src/alert/inlineMarkdown/index.ts +2 -0
  255. package/src/body/Body.tsx +4 -3
  256. package/src/card/{Card.story.js → Card.story.tsx} +6 -15
  257. package/src/card/{Card.js → Card.tsx} +23 -34
  258. package/src/card/index.ts +2 -0
  259. package/src/checkbox/{Checkbox.spec.js → Checkbox.spec.tsx} +5 -5
  260. package/src/checkbox/{Checkbox.js → Checkbox.tsx} +19 -41
  261. package/src/checkbox/index.ts +2 -0
  262. package/src/chips/Chip.tsx +5 -6
  263. package/src/chips/Chips.tsx +1 -2
  264. package/src/common/bottomSheet/BottomSheet.tsx +2 -9
  265. package/src/common/closeButton/CloseButton.tsx +1 -1
  266. package/src/common/flowHeader/FlowHeader.tsx +1 -1
  267. package/src/common/hooks/useResizeObserver.ts +1 -1
  268. package/src/common/panel/Panel.spec.tsx +1 -1
  269. package/src/common/panel/Panel.tsx +7 -7
  270. package/src/common/polymorphicWithOverrides/PolymorphicWithOverrides.tsx +1 -1
  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.tsx +2 -10
  276. package/src/drawer/{Drawer.rtl.spec.js → Drawer.rtl.spec.tsx} +4 -2
  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.tsx +1 -3
  281. package/src/index.ts +4 -0
  282. package/src/inputs/Input.tsx +1 -1
  283. package/src/inputs/SearchInput.tsx +1 -1
  284. package/src/inputs/SelectInput.tsx +4 -4
  285. package/src/inputs/TextArea.tsx +1 -1
  286. package/src/inputs/_BottomSheet.tsx +1 -1
  287. package/src/inputs/_ButtonInput.tsx +1 -1
  288. package/src/logo/Logo.story.tsx +3 -6
  289. package/src/logo/{Logo.js → Logo.tsx} +25 -35
  290. package/src/logo/index.ts +1 -0
  291. package/src/main.css +127 -108
  292. package/src/progress/Progress.tsx +3 -15
  293. package/src/progressBar/ProgressBar.tsx +1 -2
  294. package/src/promoCard/PromoCard.tsx +2 -2
  295. package/src/promoCard/PromoCardContext.spec.tsx +1 -1
  296. package/src/provider/direction/DirectionProvider.tsx +2 -5
  297. package/src/provider/language/LanguageProvider.tsx +2 -2
  298. package/src/section/Section.story.tsx +0 -2
  299. package/src/segmentedControl/SegmentedControl.tsx +2 -2
  300. package/src/select/option/Option.tsx +6 -18
  301. package/src/slidingPanel/SlidingPanel.spec.js +2 -1
  302. package/src/slidingPanel/SlidingPanel.tsx +4 -1
  303. package/src/snackbar/Snackbar.story.tsx +20 -100
  304. package/src/snackbar/Snackbar.tests.story.tsx +281 -0
  305. package/src/snackbar/Snackbar.tsx +8 -12
  306. package/src/ssr.spec.js +6 -0
  307. package/src/sticky/Sticky.spec.tsx +71 -0
  308. package/src/sticky/Sticky.story.tsx +72 -15
  309. package/src/sticky/Sticky.tsx +49 -5
  310. package/src/switchOption/SwitchOption.tsx +5 -7
  311. package/src/tabs/Tabs.js +3 -3
  312. package/src/test-utils/Parameters.d.ts +8 -0
  313. package/src/test-utils/story-config.ts +5 -0
  314. package/src/tile/{Tile.spec.js → Tile.spec.tsx} +1 -1
  315. package/src/tile/{Tile.js → Tile.tsx} +24 -35
  316. package/src/tooltip/Tooltip.tsx +2 -1
  317. package/src/uploadInput/UploadInput.css +25 -27
  318. package/src/uploadInput/UploadInput.less +24 -23
  319. package/src/uploadInput/UploadInput.story.tsx +60 -10
  320. package/src/uploadInput/UploadInput.tsx +3 -6
  321. package/src/uploadInput/types.ts +11 -1
  322. package/src/uploadInput/uploadButton/UploadButton.css +24 -38
  323. package/src/uploadInput/uploadButton/UploadButton.less +27 -40
  324. package/src/uploadInput/uploadButton/UploadButton.spec.tsx +0 -1
  325. package/src/uploadInput/uploadButton/UploadButton.tsx +12 -37
  326. package/src/uploadInput/uploadItem/UploadItem.css +81 -46
  327. package/src/uploadInput/uploadItem/UploadItem.less +75 -40
  328. package/src/uploadInput/uploadItem/UploadItem.tsx +33 -29
  329. package/src/uploadInput/uploadItem/UploadItemBody.tsx +1 -1
  330. package/src/withDisplayFormat/WithDisplayFormat.tsx +3 -3
  331. package/build/types/logo/logoTypes.d.ts +0 -6
  332. package/build/types/logo/logoTypes.d.ts.map +0 -1
  333. package/src/alert/inlineMarkdown/InlineMarkdown.js +0 -21
  334. package/src/alert/inlineMarkdown/index.js +0 -1
  335. package/src/card/index.js +0 -1
  336. package/src/checkbox/index.js +0 -3
  337. package/src/definitionList/DefinitionList.js +0 -100
  338. package/src/definitionList/index.js +0 -1
  339. package/src/drawer/index.js +0 -1
  340. package/src/logo/index.js +0 -2
  341. package/src/logo/logoTypes.ts +0 -6
  342. package/src/snackbar/Snackbar.spec.js +0 -112
  343. package/src/sticky/Sticky.spec.js +0 -34
  344. /package/src/card/{Card.spec.js → Card.spec.tsx} +0 -0
  345. /package/src/checkbox/__snapshots__/{Checkbox.spec.js.snap → Checkbox.spec.tsx.snap} +0 -0
  346. /package/src/drawer/__snapshots__/{Drawer.rtl.spec.js.snap → Drawer.rtl.spec.tsx.snap} +0 -0
  347. /package/src/logo/{Logo.spec.js → Logo.spec.tsx} +0 -0
  348. /package/src/logo/__snapshots__/{Logo.spec.js.snap → Logo.spec.tsx.snap} +0 -0
  349. /package/src/tile/{Tile.story.js → Tile.story.tsx} +0 -0
  350. /package/src/tile/__snapshots__/{Tile.spec.js.snap → Tile.spec.tsx.snap} +0 -0
  351. /package/src/tile/{index.js → index.ts} +0 -0
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { PromoCardContext, usePromoCardContext } from './PromoCardContext';
5
5
 
6
6
  // A simple component that consumes the context
7
- const TestComponent: React.FC = () => {
7
+ const TestComponent: React.FC<Record<string, never>> = () => {
8
8
  const context = usePromoCardContext();
9
9
 
10
10
  return (
@@ -1,4 +1,4 @@
1
- import { createContext, ReactElement, PropsWithChildren } from 'react';
1
+ import { createContext, PropsWithChildren } from 'react';
2
2
 
3
3
  import { LayoutDirection, Direction } from '../../common/direction';
4
4
 
@@ -6,9 +6,6 @@ export const DirectionContext = createContext<LayoutDirection>(Direction.LTR);
6
6
 
7
7
  export type DirectionProviderProps = PropsWithChildren<{ direction: LayoutDirection }>;
8
8
 
9
- export const DirectionProvider = ({
10
- direction,
11
- children,
12
- }: DirectionProviderProps): ReactElement => {
9
+ export const DirectionProvider = ({ direction, children }: DirectionProviderProps) => {
13
10
  return <DirectionContext.Provider value={direction}>{children}</DirectionContext.Provider>;
14
11
  };
@@ -1,4 +1,4 @@
1
- import { createContext, ReactElement, PropsWithChildren } from 'react';
1
+ import { createContext, PropsWithChildren } from 'react';
2
2
 
3
3
  import { DEFAULT_LOCALE } from '../../common/locale';
4
4
 
@@ -6,6 +6,6 @@ export const LanguageContext = createContext<string>(DEFAULT_LOCALE);
6
6
 
7
7
  export type LanguageProviderProps = PropsWithChildren<{ locale: string }>;
8
8
 
9
- export const LanguageProvider = ({ locale, children }: LanguageProviderProps): ReactElement => {
9
+ export const LanguageProvider = ({ locale, children }: LanguageProviderProps) => {
10
10
  return <LanguageContext.Provider value={locale}>{children}</LanguageContext.Provider>;
11
11
  };
@@ -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."
@@ -104,7 +104,7 @@ const SegmentedControl = ({
104
104
  };
105
105
  return mode === 'input' ? (
106
106
  <label
107
- ref={segment.ref as React.RefObject<HTMLLabelElement>}
107
+ ref={segment.ref as React.MutableRefObject<HTMLLabelElement | null>}
108
108
  key={segment.id}
109
109
  htmlFor={segment.id}
110
110
  className={classNames('segmented-control__segment', {
@@ -132,7 +132,7 @@ const SegmentedControl = ({
132
132
  </label>
133
133
  ) : (
134
134
  <button
135
- ref={segment.ref as React.RefObject<HTMLButtonElement>}
135
+ ref={segment.ref as React.MutableRefObject<HTMLButtonElement | null>}
136
136
  key={segment.id}
137
137
  type="button"
138
138
  role="tab"
@@ -1,5 +1,6 @@
1
+ import { IdIconProps } from '@transferwise/icons';
1
2
  import { Flag } from '@wise/art';
2
- import { useTheme } from '@wise/components-theming';
3
+ import classNames from 'classnames';
3
4
  import { cloneElement, ReactElement, ReactNode } from 'react';
4
5
 
5
6
  import Body from '../../body';
@@ -12,6 +13,7 @@ export type Props<T> = {
12
13
  note?: ReactNode;
13
14
  secondary?: ReactNode;
14
15
  icon?: ReactNode;
16
+ /** @deprecated */
15
17
  classNames?: Record<string, string>;
16
18
  selected?: boolean;
17
19
  };
@@ -22,13 +24,10 @@ function Option<T>({
22
24
  note = '',
23
25
  secondary = '',
24
26
  icon,
25
- classNames = {},
26
27
  selected = false,
27
28
  }: Props<T>) {
28
- const { isModern } = useTheme();
29
-
30
29
  const iconElement = icon
31
- ? cloneElement(icon as ReactElement, {
30
+ ? cloneElement(icon as ReactElement<IdIconProps>, {
32
31
  size: 24,
33
32
  className: 'tw-icon',
34
33
  })
@@ -38,26 +37,15 @@ function Option<T>({
38
37
  <Body as="span" type={Typography.BODY_LARGE} className={selected ? 'text-ellipsis' : undefined}>
39
38
  {label}
40
39
  {note && (
41
- <Body as="span" className={isModern ? 'm-l-1' : 'm-l-1 body-2'}>
40
+ <Body as="span" className="m-l-1">
42
41
  {note}
43
42
  </Body>
44
43
  )}
45
44
  </Body>
46
45
  );
47
46
 
48
- const secondaryElementClassNames = (): string | undefined => {
49
- let classes: string | undefined = undefined;
50
- if (selected) {
51
- classes = 'text-ellipsis';
52
- }
53
- if (isModern) {
54
- return classes;
55
- }
56
- return `${classes ? classes + ' ' : ''}body-2`;
57
- };
58
-
59
47
  const secondaryElement = secondary && (
60
- <Body className={secondaryElementClassNames()}>{secondary}</Body>
48
+ <Body className={classNames(selected && 'text-ellipsis')}>{secondary}</Body>
61
49
  );
62
50
 
63
51
  return iconElement ? (
@@ -11,6 +11,7 @@ describe('SlidingPanel', () => {
11
11
  className: undefined,
12
12
  slidingPanelPositionFixed: false,
13
13
  showSlidingPanelBorder: false,
14
+ testId: undefined,
14
15
  };
15
16
 
16
17
  it('renders with right props', () => {
@@ -24,7 +25,7 @@ describe('SlidingPanel', () => {
24
25
 
25
26
  expect(cssTransition()).toHaveLength(1);
26
27
 
27
- expect(cssTransition().props()).toStrictEqual({
28
+ expect(cssTransition().props()).toEqual({
28
29
  className: 'sliding-panel sliding-panel--open-left',
29
30
  children: null,
30
31
  });
@@ -12,6 +12,7 @@ export interface SlidingPanelProps
12
12
  open: boolean;
13
13
  showSlidingPanelBorder?: boolean;
14
14
  slidingPanelPositionFixed?: boolean;
15
+ testId?: string;
15
16
  }
16
17
 
17
18
  const SlidingPanel = forwardRef(
@@ -23,9 +24,10 @@ const SlidingPanel = forwardRef(
23
24
  slidingPanelPositionFixed,
24
25
  className,
25
26
  children,
27
+ testId,
26
28
  ...rest
27
29
  }: Omit<SlidingPanelProps, 'ref'>,
28
- reference: React.ForwardedRef<HTMLDivElement>,
30
+ reference: React.ForwardedRef<HTMLDivElement | null>,
29
31
  ) => {
30
32
  const localReference = useRef<HTMLDivElement>(null as never);
31
33
  useImperativeHandle(reference, () => localReference.current, []);
@@ -44,6 +46,7 @@ const SlidingPanel = forwardRef(
44
46
  >
45
47
  <div
46
48
  ref={localReference}
49
+ data-testid={testId}
47
50
  className={classNames(
48
51
  'sliding-panel',
49
52
  `sliding-panel--open-${position}`,
@@ -1,12 +1,10 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { number } from '@storybook/addon-knobs';
3
- import { StoryContext } from '@storybook/react';
4
- import { userEvent, waitFor, within } from '@storybook/test';
5
- import { Mobile, Theme, Switch, Bulb, Info, Coins } from '@transferwise/icons';
3
+ import type { StoryContext } from '@storybook/react';
4
+ import { userEvent, within } from '@storybook/test';
5
+ import { wait } from '../test-utils/wait';
6
6
 
7
7
  import Button from '../button';
8
- import CheckboxOption from '../checkboxOption/CheckboxOption';
9
- import { wait } from '../test-utils/wait';
10
8
 
11
9
  import { Snackbar } from './Snackbar';
12
10
  import { SnackbarConsumer } from './SnackbarContext';
@@ -17,113 +15,35 @@ export default {
17
15
  title: 'Dialogs/Snackbar',
18
16
  };
19
17
 
20
- export const basic = () => {
18
+ export const Basic = () => {
21
19
  const timeout = number('timeout (ms)', 10000000);
22
20
 
23
21
  return (
24
22
  <SnackbarProvider timeout={timeout}>
25
23
  <SnackbarConsumer>
26
24
  {({ createSnackbar }) => (
27
- <>
28
- <Button
29
- block
30
- onClick={() => {
31
- createSnackbar({
32
- action: {
33
- label: 'View',
34
- onClick: () => action('View button clicked.'),
35
- },
36
- text: <span>Some text</span>,
37
- });
38
- }}
39
- >
40
- Show regular Snackbar
41
- </Button>
42
- <div className="p-t-3">
43
- <CheckboxOption
44
- title="In mobile view, snackbar is full-width, not centered"
45
- media={<Mobile />}
46
- />
47
- <CheckboxOption
48
- title="In RTL, snackbar is not left aligned"
49
- content={
50
- <a
51
- href="https://transferwise.atlassian.net/browse/DS-4642"
52
- target="_blank"
53
- rel="noreferrer"
54
- >
55
- Bug DS-4642
56
- </a>
57
- }
58
- media={<Switch />}
59
- />
60
- <CheckboxOption
61
- title="In RTL, snackbar has proper padding on left and right of button"
62
- content={
63
- <a
64
- href="https://transferwise.atlassian.net/browse/DS-4643"
65
- target="_blank"
66
- rel="noreferrer"
67
- >
68
- Bug DS-4643
69
- </a>
70
- }
71
- media={<Switch />}
72
- />
73
- <CheckboxOption
74
- title="In light mode, snackbar has drop shadow"
75
- content={
76
- <a
77
- href="https://transferwise.atlassian.net/browse/DS-4477"
78
- target="_blank"
79
- rel="noreferrer"
80
- >
81
- Bug DS-4477
82
- </a>
83
- }
84
- media={<Bulb />}
85
- />
86
- <CheckboxOption title="In dark mode, snackbar has no drop shadow" media={<Theme />} />
87
- <CheckboxOption
88
- title="In dark mode, snackbar is inverted and has light background"
89
- media={<Theme />}
90
- />
91
- <CheckboxOption
92
- title="Font size is 14 px, not 16px"
93
- content={
94
- <a
95
- href="https://transferwise.atlassian.net/browse/DS-3716"
96
- target="_blank"
97
- rel="noreferrer"
98
- >
99
- Bug DS-3716
100
- </a>
101
- }
102
- media={<Info size="16" />}
103
- />
104
- <CheckboxOption
105
- title="Snackbar isn't transparent (get some text behind it to make sure)"
106
- content={
107
- <a
108
- href="https://transferwise.atlassian.net/browse/DS-3740"
109
- target="_blank"
110
- rel="noreferrer"
111
- >
112
- Bug DS-3740
113
- </a>
114
- }
115
- media={<Coins />}
116
- />
117
- </div>
118
- </>
25
+ <Button
26
+ block
27
+ onClick={() => {
28
+ createSnackbar({
29
+ action: {
30
+ label: 'View',
31
+ onClick: () => action('View button clicked.'),
32
+ },
33
+ text: <span>Some text</span>,
34
+ });
35
+ }}
36
+ >
37
+ Show Snackbar
38
+ </Button>
119
39
  )}
120
40
  </SnackbarConsumer>
121
41
  </SnackbarProvider>
122
42
  );
123
43
  };
124
44
 
125
- basic.play = async ({ canvasElement }: StoryContext) => {
126
- await wait(0); // TODO: Remove
45
+ Basic.play = async ({ canvasElement }: StoryContext) => {
46
+ await wait(0);
127
47
  const canvas = within(canvasElement);
128
48
  await userEvent.click(canvas.getByRole('button'));
129
49
  };
@@ -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}>
package/src/ssr.spec.js CHANGED
@@ -194,6 +194,12 @@ describe('Server side rendering', () => {
194
194
  Popover: {
195
195
  children: <div />,
196
196
  },
197
+ Progress: {
198
+ progress: { value: 50, max: 100 },
199
+ },
200
+ ProgressBar: {
201
+ progress: { value: 50, max: 100 },
202
+ },
197
203
  Field: {
198
204
  model: 'a model',
199
205
  type: 'text',