@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
@@ -1,5 +1,4 @@
1
1
  import classNames from 'classnames';
2
- import PropTypes from 'prop-types';
3
2
  import { useId } from 'react';
4
3
 
5
4
  import { Position, Typography } from '../common';
@@ -10,7 +9,31 @@ import SlidingPanel from '../slidingPanel';
10
9
  import Title from '../title';
11
10
  import { logActionRequiredIf } from '../utilities';
12
11
 
13
- const Drawer = ({ children, className, footerContent, headerTitle, onClose, open, position }) => {
12
+ export interface DrawerProps {
13
+ /** The content to appear in the drawer body. */
14
+ children?: React.ReactNode;
15
+ className?: string;
16
+ /** The content to appear in the drawer footer. */
17
+ footerContent?: React.ReactNode;
18
+ /** The content to appear in the drawer header. */
19
+ headerTitle?: React.ReactNode;
20
+ /** The status of Drawer either open or not. */
21
+ open?: boolean;
22
+ /** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
23
+ position?: `${Position.LEFT | Position.RIGHT | Position.BOTTOM}`;
24
+ /** The action to perform on close click. */
25
+ onClose?: (event: KeyboardEvent | React.MouseEvent) => void;
26
+ }
27
+
28
+ export default function Drawer({
29
+ children,
30
+ className,
31
+ footerContent,
32
+ headerTitle,
33
+ onClose,
34
+ open = false,
35
+ position = 'right',
36
+ }: DrawerProps) {
14
37
  logActionRequiredIf(
15
38
  'Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.',
16
39
  !onClose,
@@ -46,32 +69,4 @@ const Drawer = ({ children, className, footerContent, headerTitle, onClose, open
46
69
  </SlidingPanel>
47
70
  </Dimmer>
48
71
  );
49
- };
50
-
51
- Drawer.propTypes = {
52
- /** The content to appear in the drawer body. */
53
- children: PropTypes.node,
54
- className: PropTypes.string,
55
- /** The content to appear in the drawer footer. */
56
- footerContent: PropTypes.node,
57
- /** The content to appear in the drawer header. */
58
- headerTitle: PropTypes.node,
59
- /** The status of Drawer either open or not. */
60
- open: PropTypes.bool,
61
- /** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
62
- position: PropTypes.oneOf(['left', 'right', 'bottom']),
63
- /** The action to perform on close click. */
64
- onClose: PropTypes.func,
65
- };
66
-
67
- Drawer.defaultProps = {
68
- children: null,
69
- className: undefined,
70
- footerContent: null,
71
- headerTitle: null,
72
- onClose: null,
73
- open: false,
74
- position: Position.RIGHT,
75
- };
76
-
77
- export default Drawer;
72
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './Drawer';
2
+ export type { DrawerProps } from './Drawer';
@@ -1,5 +1,3 @@
1
- import { ReactElement } from 'react';
2
-
3
1
  import EmphasisHtmlTransformer from './EmphasisHtmlTransformer';
4
2
 
5
3
  const SUPPORTED_TAGS = ['important', 'positive', 'negative', 'warning'];
@@ -9,7 +7,7 @@ export type EmphasisProps = {
9
7
  text?: string;
10
8
  };
11
9
 
12
- const Emphasis = ({ text = undefined }: EmphasisProps): ReactElement | null => {
10
+ const Emphasis = ({ text = undefined }: EmphasisProps) => {
13
11
  if (!text) {
14
12
  return null;
15
13
  }
package/src/index.ts CHANGED
@@ -6,7 +6,9 @@ export type { ActionOptionProps } from './actionOption';
6
6
  export type { AlertAction, AlertProps, AlertType } from './alert';
7
7
  export type { AvatarProps } from './avatar';
8
8
  export type { BadgeProps } from './badge';
9
+ export type { CardProps } from './card';
9
10
  export type { CarouselProps } from './carousel';
11
+ export type { CheckboxProps } from './checkbox';
10
12
  export type { CircularButtonProps } from './circularButton';
11
13
  export type {
12
14
  BodyTypes,
@@ -20,7 +22,9 @@ export type { BottomSheetProps } from './common/bottomSheet';
20
22
  export type { DateInputProps } from './dateInput';
21
23
  export type { DateLookupProps } from './dateLookup';
22
24
  export type { DecisionProps } from './decision/Decision';
25
+ export type { DefinitionListProps } from './definitionList';
23
26
  export type { DimmerProps } from './dimmer';
27
+ export type { DrawerProps } from './drawer';
24
28
  export type { EmphasisProps } from './emphasis';
25
29
  export type { FieldProps } from './field/Field';
26
30
  export type { InfoProps } from './info';
@@ -19,7 +19,7 @@ export interface InputProps
19
19
 
20
20
  export const Input = forwardRef(function Input(
21
21
  { size = 'auto', shape = 'rectangle', className, ...restProps }: InputProps,
22
- reference: React.ForwardedRef<HTMLInputElement>,
22
+ reference: React.ForwardedRef<HTMLInputElement | null>,
23
23
  ) {
24
24
  const inputAttributes = useInputAttributes();
25
25
  const inputPaddings = useInputPaddings();
@@ -19,7 +19,7 @@ export interface SearchInputProps
19
19
 
20
20
  export const SearchInput = forwardRef(function SearchInput(
21
21
  { shape = 'pill', size = Size.MEDIUM, disabled, className, ...restProps }: SearchInputProps,
22
- ref: React.ForwardedRef<HTMLInputElement>,
22
+ ref: React.ForwardedRef<HTMLInputElement | null>,
23
23
  ) {
24
24
  return (
25
25
  <InputGroup
@@ -48,7 +48,7 @@ function inferSearchableStrings(value: unknown) {
48
48
  }
49
49
 
50
50
  const SelectInputTriggerButtonPropsContext = createContext<{
51
- ref?: React.ForwardedRef<HTMLButtonElement>;
51
+ ref?: React.ForwardedRef<HTMLButtonElement | null>;
52
52
  id?: string;
53
53
  onClick?: (event: React.MouseEvent) => void;
54
54
  onKeyDown?: (event: React.KeyboardEvent) => void;
@@ -437,7 +437,7 @@ const SelectInputOptionsContainer = forwardRef(function SelectInputOptionsContai
437
437
  onKeyDown,
438
438
  ...restProps
439
439
  }: SelectInputOptionsContainerProps,
440
- ref: React.ForwardedRef<HTMLDivElement>,
440
+ ref: React.ForwardedRef<HTMLDivElement | null>,
441
441
  ) {
442
442
  const handleAriaActiveDescendantChange = useEffectEvent(onAriaActiveDescendantChange);
443
443
  useEffect(() => {
@@ -476,8 +476,8 @@ interface SelectInputOptionsProps<T = string>
476
476
  SelectInputProps<T>,
477
477
  'items' | 'renderValue' | 'renderFooter' | 'filterable' | 'filterPlaceholder'
478
478
  > {
479
- searchInputRef: React.RefObject<HTMLInputElement>;
480
- listboxRef: React.RefObject<HTMLDivElement>;
479
+ searchInputRef: React.MutableRefObject<HTMLInputElement | null>;
480
+ listboxRef: React.MutableRefObject<HTMLDivElement | null>;
481
481
  filterQuery: string;
482
482
  onFilterChange: (query: string) => void;
483
483
  }
@@ -15,7 +15,7 @@ export interface TextAreaProps
15
15
 
16
16
  export const TextArea = forwardRef(function TextArea(
17
17
  { className, ...restProps }: TextAreaProps,
18
- reference: React.ForwardedRef<HTMLTextAreaElement>,
18
+ reference: React.ForwardedRef<HTMLTextAreaElement | null>,
19
19
  ) {
20
20
  const inputAttributes = useInputAttributes();
21
21
 
@@ -25,7 +25,7 @@ export interface BottomSheetProps {
25
25
  };
26
26
  }) => React.ReactNode;
27
27
  title?: string;
28
- initialFocusRef?: React.RefObject<HTMLElement>;
28
+ initialFocusRef?: React.MutableRefObject<HTMLElement | null>;
29
29
  padding?: 'none' | 'md';
30
30
  children?: React.ReactNode;
31
31
  onClose?: () => void;
@@ -10,7 +10,7 @@ export interface ButtonInputProps extends React.ComponentPropsWithRef<'button'>
10
10
 
11
11
  export const ButtonInput = forwardRef(function ButtonInput(
12
12
  { size = 'md', className, style, ...restProps }: ButtonInputProps,
13
- ref: React.ForwardedRef<HTMLButtonElement>,
13
+ ref: React.ForwardedRef<HTMLButtonElement | null>,
14
14
  ) {
15
15
  const inputPaddings = useInputPaddings();
16
16
 
@@ -1,14 +1,11 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import Logo, { LogoType } from '.';
3
+ import Logo from '.';
4
4
 
5
5
  export default {
6
6
  component: Logo,
7
7
  title: 'Content/Logo',
8
- render: (args) => {
9
- const type = args.type as LogoType;
10
- const inverse = args.inverse as boolean;
11
-
8
+ render: ({ inverse, type }) => {
12
9
  return (
13
10
  <div className={`${inverse ? 'bg--dark' : ''} p-a-3`}>
14
11
  <Logo type={type} inverse={inverse} />
@@ -22,7 +19,7 @@ type Story = StoryObj<typeof Logo>;
22
19
 
23
20
  export const Basic: Story = {
24
21
  args: {
25
- type: LogoType.WISE,
22
+ type: 'WISE',
26
23
  inverse: false,
27
24
  },
28
25
  };
@@ -1,7 +1,5 @@
1
1
  import classNames from 'classnames';
2
- import PropTypes from 'prop-types';
3
2
 
4
- import { LogoType } from './logoTypes';
5
3
  import { ReactComponent as LogoFlagInverse } from './svg/flag-inverse.svg';
6
4
  import { ReactComponent as LogoFlagPlatformInverse } from './svg/flag-platform-white.svg';
7
5
  import { ReactComponent as LogoFlagPlatform } from './svg/flag-platform.svg';
@@ -24,44 +22,36 @@ const svgPaths = {
24
22
  WISE_FLAG_PLATFORM_INVERSE: LogoFlagPlatformInverse,
25
23
  };
26
24
 
27
- const Logo = ({ className, inverse, type }) => {
25
+ export enum LogoType {
26
+ WISE = 'WISE',
27
+ WISE_BUSINESS = 'WISE_BUSINESS',
28
+ WISE_PLATFORM = 'WISE_PLATFORM',
29
+ }
30
+
31
+ export interface LogoProps {
32
+ /** Extra classes applied to Logo */
33
+ className?: string;
34
+ /** If true, will use dark colours for dark on light theme */
35
+ inverse?: boolean;
36
+ /** What type of logo to display */
37
+ type?: `${LogoType}`;
38
+ }
39
+
40
+ const labelByType = {
41
+ WISE: 'Wise',
42
+ WISE_BUSINESS: 'Wise Business',
43
+ WISE_PLATFORM: 'Wise Platform',
44
+ } satisfies Record<`${LogoType}`, string>;
45
+
46
+ export default function Logo({ className, inverse, type = 'WISE' }: LogoProps) {
28
47
  const LogoSm =
29
- svgPaths[
30
- `WISE_FLAG${type === LogoType.WISE_PLATFORM ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`
31
- ];
48
+ svgPaths[`WISE_FLAG${type === 'WISE_PLATFORM' ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];
32
49
  const LogoMd = svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];
33
50
 
34
51
  return (
35
- <span
36
- aria-label={
37
- type === LogoType.WISE
38
- ? 'Wise'
39
- : 'Wise Business' | (type === LogoType.WISE_PLATFORM)
40
- ? 'Wise Platform'
41
- : 'Wise Business'
42
- }
43
- role="img"
44
- className={classNames(className, 'np-logo')}
45
- >
52
+ <span aria-label={labelByType[type]} role="img" className={classNames(className, 'np-logo')}>
46
53
  <LogoSm className="np-logo-svg np-logo-svg--size-sm" />
47
54
  <LogoMd className="np-logo-svg np-logo-svg--size-md" />
48
55
  </span>
49
56
  );
50
- };
51
-
52
- Logo.propTypes = {
53
- /** Extra classes applied to Logo */
54
- className: PropTypes.string,
55
- /** If true, will use dark colours for dark on light theme */
56
- inverse: PropTypes.bool,
57
- /** What type of logo to display */
58
- type: PropTypes.oneOf(['WISE', 'WISE_BUSINESS', 'WISE_PLATFORM']),
59
- };
60
-
61
- Logo.defaultProps = {
62
- className: undefined,
63
- inverse: false,
64
- type: LogoType.WISE,
65
- };
66
-
67
- export default Logo;
57
+ }
@@ -0,0 +1 @@
1
+ export { default, LogoType } from './Logo';
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;
@@ -1,5 +1,4 @@
1
1
  import classnames from 'classnames';
2
- import { ReactElement, useEffect, useState } from 'react';
3
2
 
4
3
  export type ProgressProps = {
5
4
  className?: string;
@@ -7,21 +6,10 @@ export type ProgressProps = {
7
6
  progress: { value: number; max: number };
8
7
  };
9
8
 
10
- const Progress = ({ className, id, progress }: ProgressProps): ReactElement | null => {
11
- const [value, setValue] = useState(0);
12
-
13
- useEffect(() => {
14
- setValue(progress.value);
15
- });
16
-
9
+ const Progress = ({ className, id, progress }: ProgressProps) => {
17
10
  return (
18
- <progress
19
- id={id}
20
- className={classnames('np-progress d-block', className)}
21
- {...progress}
22
- value={value}
23
- >
24
- {value}%
11
+ <progress id={id} className={classnames('np-progress d-block', className)} {...progress}>
12
+ {Math.floor((progress.value / progress.max) * 100)}%
25
13
  </progress>
26
14
  );
27
15
  };
@@ -1,6 +1,5 @@
1
1
  import { useTheme } from '@wise/components-theming';
2
2
  import classNames from 'classnames';
3
- import { ReactElement } from 'react';
4
3
 
5
4
  import Body from '../body';
6
5
  import { Typography } from '../common';
@@ -23,7 +22,7 @@ const ProgressBar = ({
23
22
  title,
24
23
  progress,
25
24
  textEnd,
26
- }: ProgressBarProps): ReactElement | null => {
25
+ }: ProgressBarProps) => {
27
26
  const { isModern } = useTheme();
28
27
  return (
29
28
  <div className={classNames('np-progress-bar', className)}>
@@ -154,7 +154,7 @@ export type PromoCardProps = PromoCardLinkProps | PromoCardCheckedProps;
154
154
 
155
155
  export type PolymorphicPromoCard = (
156
156
  props: PromoCardLinkProps | PromoCardCheckedProps,
157
- ) => JSX.Element;
157
+ ) => React.JSX.Element;
158
158
 
159
159
  /**
160
160
  * PromoCard component.
@@ -185,7 +185,7 @@ export type PolymorphicPromoCard = (
185
185
  * @param {string} title - Title text of the PromoCard.
186
186
  * @param {('checkbox'|'radio')} type - Type of the PromoCard (checkbox, radio).
187
187
  * @param {string} value - Value for checkboxes and radios.
188
- * @returns {JSX.Element} The rendered PromoCard component.
188
+ * @returns {React.JSX.Element} The rendered PromoCard component.
189
189
  * @example
190
190
  * <PromoCard
191
191
  * title="Example PromoCard"