@transferwise/components 46.37.0 → 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 (300) hide show
  1. package/README.md +1 -1
  2. package/build/index.js +159 -317
  3. package/build/index.js.map +1 -1
  4. package/build/index.mjs +154 -311
  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 +3 -3
  114. package/build/types/flowNavigation/backButton/index.d.ts +1 -1
  115. package/build/types/flowNavigation/backButton/index.d.ts.map +1 -1
  116. package/build/types/header/Header.d.ts +0 -1
  117. package/build/types/header/Header.d.ts.map +1 -1
  118. package/build/types/image/Image.d.ts +0 -1
  119. package/build/types/image/Image.d.ts.map +1 -1
  120. package/build/types/index.d.ts +4 -0
  121. package/build/types/index.d.ts.map +1 -1
  122. package/build/types/info/Info.d.ts +0 -1
  123. package/build/types/info/Info.d.ts.map +1 -1
  124. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts +0 -1
  125. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
  126. package/build/types/inputs/Input.d.ts +0 -1
  127. package/build/types/inputs/Input.d.ts.map +1 -1
  128. package/build/types/inputs/InputGroup.d.ts +0 -1
  129. package/build/types/inputs/InputGroup.d.ts.map +1 -1
  130. package/build/types/inputs/SearchInput.d.ts +0 -1
  131. package/build/types/inputs/SearchInput.d.ts.map +1 -1
  132. package/build/types/inputs/SelectInput.d.ts +0 -1
  133. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  134. package/build/types/inputs/TextArea.d.ts +0 -1
  135. package/build/types/inputs/TextArea.d.ts.map +1 -1
  136. package/build/types/inputs/_BottomSheet.d.ts +0 -1
  137. package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
  138. package/build/types/inputs/_ButtonInput.d.ts +0 -1
  139. package/build/types/inputs/_ButtonInput.d.ts.map +1 -1
  140. package/build/types/inputs/_Popover.d.ts +0 -1
  141. package/build/types/inputs/_Popover.d.ts.map +1 -1
  142. package/build/types/inputs/contexts.d.ts +0 -1
  143. package/build/types/inputs/contexts.d.ts.map +1 -1
  144. package/build/types/label/Label.d.ts +0 -1
  145. package/build/types/label/Label.d.ts.map +1 -1
  146. package/build/types/loader/Loader.d.ts +0 -1
  147. package/build/types/loader/Loader.d.ts.map +1 -1
  148. package/build/types/logo/Logo.d.ts +15 -23
  149. package/build/types/logo/Logo.d.ts.map +1 -1
  150. package/build/types/logo/index.d.ts +1 -2
  151. package/build/types/logo/index.d.ts.map +1 -1
  152. package/build/types/markdown/Markdown.d.ts +0 -1
  153. package/build/types/markdown/Markdown.d.ts.map +1 -1
  154. package/build/types/money/Money.d.ts +0 -1
  155. package/build/types/money/Money.d.ts.map +1 -1
  156. package/build/types/moneyInput/MoneyInput.d.ts +0 -1
  157. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  158. package/build/types/navigationOption/NavigationOption.d.ts +0 -1
  159. package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
  160. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +0 -1
  161. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  162. package/build/types/popover/Popover.d.ts +0 -1
  163. package/build/types/popover/Popover.d.ts.map +1 -1
  164. package/build/types/progress/Progress.d.ts +0 -1
  165. package/build/types/progress/Progress.d.ts.map +1 -1
  166. package/build/types/progressBar/ProgressBar.d.ts +0 -1
  167. package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
  168. package/build/types/provider/Provider.d.ts +0 -1
  169. package/build/types/provider/Provider.d.ts.map +1 -1
  170. package/build/types/radio/Radio.d.ts +0 -1
  171. package/build/types/radio/Radio.d.ts.map +1 -1
  172. package/build/types/radioGroup/RadioGroup.d.ts +0 -1
  173. package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
  174. package/build/types/radioOption/RadioOption.d.ts +0 -1
  175. package/build/types/radioOption/RadioOption.d.ts.map +1 -1
  176. package/build/types/segmentedControl/SegmentedControl.d.ts +0 -1
  177. package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
  178. package/build/types/select/index.d.ts +1 -1
  179. package/build/types/select/index.d.ts.map +1 -1
  180. package/build/types/select/option/index.d.ts +1 -1
  181. package/build/types/select/option/index.d.ts.map +1 -1
  182. package/build/types/select/searchBox/SearchBox.d.ts +3 -3
  183. package/build/types/select/searchBox/SearchBox.d.ts.map +1 -1
  184. package/build/types/slidingPanel/SlidingPanel.d.ts +1 -1
  185. package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
  186. package/build/types/snackbar/Snackbar.d.ts +2 -1
  187. package/build/types/snackbar/Snackbar.d.ts.map +1 -1
  188. package/build/types/snackbar/SnackbarContext.d.ts +0 -1
  189. package/build/types/snackbar/SnackbarContext.d.ts.map +1 -1
  190. package/build/types/snackbar/SnackbarProvider.d.ts +0 -1
  191. package/build/types/snackbar/SnackbarProvider.d.ts.map +1 -1
  192. package/build/types/statusIcon/StatusIcon.d.ts +0 -1
  193. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  194. package/build/types/sticky/Sticky.d.ts +32 -4
  195. package/build/types/sticky/Sticky.d.ts.map +1 -1
  196. package/build/types/switchOption/SwitchOption.d.ts +0 -1
  197. package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
  198. package/build/types/tabs/TabList.d.ts +1 -1
  199. package/build/types/tabs/TabPanel.d.ts +4 -4
  200. package/build/types/tabs/Tabs.d.ts.map +1 -1
  201. package/build/types/test-utils/story-config.d.ts +8 -0
  202. package/build/types/test-utils/story-config.d.ts.map +1 -1
  203. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts +0 -1
  204. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
  205. package/build/types/tile/Tile.d.ts +16 -37
  206. package/build/types/tile/Tile.d.ts.map +1 -1
  207. package/build/types/tile/index.d.ts +1 -1
  208. package/build/types/tile/index.d.ts.map +1 -1
  209. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  210. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts +0 -1
  211. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
  212. package/build/types/typeahead/util/highlight.d.ts +0 -1
  213. package/build/types/typeahead/util/highlight.d.ts.map +1 -1
  214. package/build/types/upload/Upload.d.ts.map +1 -1
  215. package/build/types/upload/Upload.messages.d.ts +20 -20
  216. package/build/types/upload/steps/completeStep/completeStep.d.ts +10 -10
  217. package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +8 -8
  218. package/build/types/upload/steps/processingStep/processingStep.d.ts +8 -8
  219. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +9 -9
  220. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
  221. package/build/types/uploadInput/UploadInput.d.ts +0 -1
  222. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  223. package/build/types/uploadInput/types.d.ts +9 -1
  224. package/build/types/uploadInput/types.d.ts.map +1 -1
  225. package/build/types/uploadInput/uploadButton/UploadButton.d.ts +1 -6
  226. package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
  227. package/build/types/uploadInput/uploadItem/UploadItem.d.ts +0 -1
  228. package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
  229. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  230. package/build/types/withNextPortal/withNextPortal.d.ts +0 -1
  231. package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
  232. package/package.json +1 -2
  233. package/src/alert/inlineMarkdown/InlineMarkdown.tsx +13 -0
  234. package/src/alert/inlineMarkdown/index.ts +2 -0
  235. package/src/card/{Card.story.js → Card.story.tsx} +6 -15
  236. package/src/card/{Card.js → Card.tsx} +23 -34
  237. package/src/card/index.ts +2 -0
  238. package/src/checkbox/{Checkbox.spec.js → Checkbox.spec.tsx} +5 -5
  239. package/src/checkbox/{Checkbox.js → Checkbox.tsx} +19 -41
  240. package/src/checkbox/index.ts +2 -0
  241. package/src/decision/Decision.tsx +1 -1
  242. package/src/definitionList/{DefinitionList.story.js → DefinitionList.story.tsx} +22 -2
  243. package/src/definitionList/DefinitionList.tsx +95 -0
  244. package/src/definitionList/index.ts +2 -0
  245. package/src/drawer/{Drawer.rtl.spec.js → Drawer.rtl.spec.tsx} +4 -2
  246. package/src/drawer/{Drawer.story.js → Drawer.story.tsx} +20 -28
  247. package/src/drawer/{Drawer.js → Drawer.tsx} +26 -31
  248. package/src/drawer/index.ts +2 -0
  249. package/src/index.ts +4 -0
  250. package/src/logo/Logo.story.tsx +3 -6
  251. package/src/logo/{Logo.js → Logo.tsx} +25 -35
  252. package/src/logo/index.ts +1 -0
  253. package/src/main.css +127 -108
  254. package/src/section/Section.story.tsx +0 -2
  255. package/src/slidingPanel/SlidingPanel.spec.js +2 -1
  256. package/src/slidingPanel/SlidingPanel.tsx +3 -0
  257. package/src/snackbar/Snackbar.story.tsx +20 -100
  258. package/src/snackbar/Snackbar.tests.story.tsx +281 -0
  259. package/src/snackbar/Snackbar.tsx +8 -12
  260. package/src/sticky/Sticky.spec.tsx +71 -0
  261. package/src/sticky/Sticky.story.tsx +72 -15
  262. package/src/sticky/Sticky.tsx +49 -5
  263. package/src/test-utils/Parameters.d.ts +8 -0
  264. package/src/test-utils/story-config.ts +5 -0
  265. package/src/tile/{Tile.spec.js → Tile.spec.tsx} +1 -1
  266. package/src/tile/{Tile.js → Tile.tsx} +24 -35
  267. package/src/uploadInput/UploadInput.css +25 -27
  268. package/src/uploadInput/UploadInput.less +24 -23
  269. package/src/uploadInput/UploadInput.story.tsx +60 -10
  270. package/src/uploadInput/UploadInput.tsx +1 -4
  271. package/src/uploadInput/types.ts +11 -1
  272. package/src/uploadInput/uploadButton/UploadButton.css +24 -38
  273. package/src/uploadInput/uploadButton/UploadButton.less +27 -40
  274. package/src/uploadInput/uploadButton/UploadButton.spec.tsx +0 -1
  275. package/src/uploadInput/uploadButton/UploadButton.tsx +12 -37
  276. package/src/uploadInput/uploadItem/UploadItem.css +81 -46
  277. package/src/uploadInput/uploadItem/UploadItem.less +75 -40
  278. package/src/uploadInput/uploadItem/UploadItem.tsx +30 -25
  279. package/src/uploadInput/uploadItem/UploadItemBody.tsx +1 -1
  280. package/build/types/logo/logoTypes.d.ts +0 -6
  281. package/build/types/logo/logoTypes.d.ts.map +0 -1
  282. package/src/alert/inlineMarkdown/InlineMarkdown.js +0 -21
  283. package/src/alert/inlineMarkdown/index.js +0 -1
  284. package/src/card/index.js +0 -1
  285. package/src/checkbox/index.js +0 -3
  286. package/src/definitionList/DefinitionList.js +0 -100
  287. package/src/definitionList/index.js +0 -1
  288. package/src/drawer/index.js +0 -1
  289. package/src/logo/index.js +0 -2
  290. package/src/logo/logoTypes.ts +0 -6
  291. package/src/snackbar/Snackbar.spec.js +0 -112
  292. package/src/sticky/Sticky.spec.js +0 -34
  293. /package/src/card/{Card.spec.js → Card.spec.tsx} +0 -0
  294. /package/src/checkbox/__snapshots__/{Checkbox.spec.js.snap → Checkbox.spec.tsx.snap} +0 -0
  295. /package/src/drawer/__snapshots__/{Drawer.rtl.spec.js.snap → Drawer.rtl.spec.tsx.snap} +0 -0
  296. /package/src/logo/{Logo.spec.js → Logo.spec.tsx} +0 -0
  297. /package/src/logo/__snapshots__/{Logo.spec.js.snap → Logo.spec.tsx.snap} +0 -0
  298. /package/src/tile/{Tile.story.js → Tile.story.tsx} +0 -0
  299. /package/src/tile/__snapshots__/{Tile.spec.js.snap → Tile.spec.tsx.snap} +0 -0
  300. /package/src/tile/{index.js → index.ts} +0 -0
package/build/index.js CHANGED
@@ -5,7 +5,6 @@ var classNames = require('classnames');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var icons = require('@transferwise/icons');
7
7
  var reactIntl = require('react-intl');
8
- var PropTypes = require('prop-types');
9
8
  var commonmark = require('commonmark');
10
9
  var componentsTheming = require('@wise/components-theming');
11
10
  var reactTransitionGroup = require('react-transition-group');
@@ -18,10 +17,10 @@ var mergeProps = require('merge-props');
18
17
  var react = require('@floating-ui/react');
19
18
  var overlays = require('@react-aria/overlays');
20
19
  var reactPopper = require('react-popper');
20
+ var PropTypes = require('prop-types');
21
21
  var art = require('@wise/art');
22
22
  var clamp$2 = require('lodash.clamp');
23
23
  var debounce = require('lodash.debounce');
24
- var requiredIf = require('react-required-if');
25
24
  var web = require('@react-spring/web');
26
25
 
27
26
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -46,12 +45,11 @@ function _interopNamespace(e) {
46
45
 
47
46
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
48
47
  var classNames__default = /*#__PURE__*/_interopDefault(classNames);
49
- var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
50
48
  var commonmark__default = /*#__PURE__*/_interopDefault(commonmark);
51
49
  var mergeProps__default = /*#__PURE__*/_interopDefault(mergeProps);
50
+ var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
52
51
  var clamp__default = /*#__PURE__*/_interopDefault(clamp$2);
53
52
  var debounce__default = /*#__PURE__*/_interopDefault(debounce);
54
- var requiredIf__default = /*#__PURE__*/_interopDefault(requiredIf);
55
53
 
56
54
  exports.Typography = void 0;
57
55
  (function (Typography) {
@@ -860,21 +858,14 @@ function stripNodes({
860
858
  }
861
859
 
862
860
  const allowList = [exports.MarkdownNodeType.STRONG];
863
- const InlineMarkdown = props => {
861
+ function InlineMarkdown(props) {
864
862
  return /*#__PURE__*/jsxRuntime.jsx(Markdown, {
865
863
  ...props,
866
864
  as: "span",
867
865
  allowList: allowList,
868
866
  blockList: undefined
869
867
  });
870
- };
871
- InlineMarkdown.propTypes = {
872
- children: PropTypes__default.default.string.isRequired,
873
- className: PropTypes__default.default.string
874
- };
875
- InlineMarkdown.defaultProps = {
876
- className: undefined
877
- };
868
+ }
878
869
 
879
870
  var messages$c = reactIntl.defineMessages({
880
871
  opensInNewTab: {
@@ -1508,7 +1499,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
1508
1499
  });
1509
1500
  });
1510
1501
 
1511
- const Card$2 = /*#__PURE__*/React.forwardRef(({
1502
+ const Card$1 = /*#__PURE__*/React.forwardRef(({
1512
1503
  className,
1513
1504
  children = null,
1514
1505
  id,
@@ -1541,7 +1532,7 @@ const Card$2 = /*#__PURE__*/React.forwardRef(({
1541
1532
  }), children]
1542
1533
  });
1543
1534
  });
1544
- Card$2.displayName = 'Card';
1535
+ Card$1.displayName = 'Card';
1545
1536
 
1546
1537
  function Display({
1547
1538
  as: Heading = 'h1',
@@ -1920,7 +1911,7 @@ const PromoCard = /*#__PURE__*/React.forwardRef(({
1920
1911
  React.useEffect(() => {
1921
1912
  setChecked(defaultChecked ?? isChecked ?? false);
1922
1913
  }, [defaultChecked, isChecked]);
1923
- return /*#__PURE__*/jsxRuntime.jsxs(Card$2, {
1914
+ return /*#__PURE__*/jsxRuntime.jsxs(Card$1, {
1924
1915
  ...commonProps,
1925
1916
  ...checkedProps,
1926
1917
  ...props,
@@ -2217,20 +2208,19 @@ const isVisible = (container, el) => {
2217
2208
  return elemLeft >= cScrollOffset && elemRight <= cScrollOffset + cWidth;
2218
2209
  };
2219
2210
 
2220
- const Card = /*#__PURE__*/React.forwardRef((props, reference) => {
2221
- const {
2222
- 'aria-label': ariaLabel,
2223
- as: Element,
2224
- isExpanded,
2225
- title,
2226
- details,
2227
- children,
2228
- onClick,
2229
- icon,
2230
- id,
2231
- className,
2232
- ...rest
2233
- } = props;
2211
+ const Card = /*#__PURE__*/React.forwardRef(function Card({
2212
+ 'aria-label': ariaLabel,
2213
+ as: Element = 'div',
2214
+ isExpanded,
2215
+ title,
2216
+ details,
2217
+ children,
2218
+ onClick,
2219
+ icon,
2220
+ id,
2221
+ className,
2222
+ 'data-testid': dataTestId
2223
+ }, reference) {
2234
2224
  const isOpen = !!(isExpanded && children);
2235
2225
  return /*#__PURE__*/jsxRuntime.jsxs(Element, {
2236
2226
  ref: reference,
@@ -2240,7 +2230,7 @@ const Card = /*#__PURE__*/React.forwardRef((props, reference) => {
2240
2230
  'np-card--has-icon': !!icon
2241
2231
  }),
2242
2232
  id: id,
2243
- "data-testid": rest['data-testid'],
2233
+ "data-testid": dataTestId,
2244
2234
  children: [/*#__PURE__*/jsxRuntime.jsx(Option$2, {
2245
2235
  "aria-label": ariaLabel,
2246
2236
  as: children ? 'button' : 'div',
@@ -2252,7 +2242,7 @@ const Card = /*#__PURE__*/React.forwardRef((props, reference) => {
2252
2242
  button: children && /*#__PURE__*/jsxRuntime.jsx(Chevron, {
2253
2243
  orientation: isOpen ? exports.Position.TOP : exports.Position.BOTTOM
2254
2244
  }),
2255
- onClick: () => children && onClick(!isExpanded)
2245
+ onClick: children ? () => onClick?.(!isExpanded) : undefined
2256
2246
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2257
2247
  className: classNames__default.default('np-card__divider', {
2258
2248
  'np-card__divider--expanded': isOpen
@@ -2265,31 +2255,6 @@ const Card = /*#__PURE__*/React.forwardRef((props, reference) => {
2265
2255
  })]
2266
2256
  });
2267
2257
  });
2268
- const hasChildren = ({
2269
- children
2270
- }) => children;
2271
- Card.propTypes = {
2272
- 'aria-label': PropTypes__default.default.string,
2273
- as: PropTypes__default.default.string,
2274
- isExpanded: requiredIf__default.default(PropTypes__default.default.bool, hasChildren),
2275
- title: PropTypes__default.default.node.isRequired,
2276
- details: PropTypes__default.default.node.isRequired,
2277
- onClick: requiredIf__default.default(PropTypes__default.default.func, hasChildren),
2278
- icon: PropTypes__default.default.node,
2279
- children: PropTypes__default.default.node,
2280
- id: PropTypes__default.default.string,
2281
- className: PropTypes__default.default.string,
2282
- 'data-testid': PropTypes__default.default.string
2283
- };
2284
- Card.defaultProps = {
2285
- 'aria-label': undefined,
2286
- as: 'div',
2287
- children: null,
2288
- id: null,
2289
- className: null,
2290
- 'data-testid': null
2291
- };
2292
- var Card$1 = Card;
2293
2258
 
2294
2259
  const CheckboxButton = /*#__PURE__*/React.forwardRef(({
2295
2260
  checked,
@@ -2313,9 +2278,8 @@ const CheckboxButton = /*#__PURE__*/React.forwardRef(({
2313
2278
  })
2314
2279
  })]
2315
2280
  }));
2316
- var CheckboxButton$1 = CheckboxButton;
2317
2281
 
2318
- const Checkbox = ({
2282
+ function Checkbox({
2319
2283
  id,
2320
2284
  checked,
2321
2285
  required,
@@ -2327,14 +2291,11 @@ const Checkbox = ({
2327
2291
  onChange,
2328
2292
  onFocus,
2329
2293
  onBlur
2330
- }) => {
2331
- const {
2332
- isModern
2333
- } = componentsTheming.useTheme();
2294
+ }) {
2334
2295
  const classList = classNames__default.default('np-checkbox', {
2335
2296
  checkbox: true,
2336
2297
  'checkbox-lg': secondary,
2337
- disabled: isModern && disabled
2298
+ disabled
2338
2299
  }, className);
2339
2300
  const innerDisabled = disabled || readOnly;
2340
2301
  return /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -2344,7 +2305,7 @@ const Checkbox = ({
2344
2305
  className: classNames__default.default({
2345
2306
  disabled
2346
2307
  }),
2347
- children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxButton$1, {
2308
+ children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxButton, {
2348
2309
  className: "p-r-2",
2349
2310
  checked: checked,
2350
2311
  disabled: innerDisabled,
@@ -2361,39 +2322,12 @@ const Checkbox = ({
2361
2322
  children: label
2362
2323
  }), secondary && /*#__PURE__*/jsxRuntime.jsx(Body, {
2363
2324
  as: "span",
2364
- className: classNames__default.default({
2365
- secondary: !isModern
2366
- }),
2367
2325
  children: secondary
2368
2326
  })]
2369
2327
  })]
2370
2328
  })
2371
2329
  });
2372
- };
2373
- Checkbox.propTypes = {
2374
- id: PropTypes__default.default.string,
2375
- checked: PropTypes__default.default.bool,
2376
- required: PropTypes__default.default.bool,
2377
- disabled: PropTypes__default.default.bool,
2378
- readOnly: PropTypes__default.default.bool,
2379
- label: PropTypes__default.default.node.isRequired,
2380
- secondary: PropTypes__default.default.string,
2381
- onFocus: PropTypes__default.default.func,
2382
- onChange: PropTypes__default.default.func.isRequired,
2383
- onBlur: PropTypes__default.default.func,
2384
- className: PropTypes__default.default.string
2385
- };
2386
- Checkbox.defaultProps = {
2387
- id: null,
2388
- checked: false,
2389
- required: false,
2390
- disabled: false,
2391
- readOnly: false,
2392
- secondary: null,
2393
- onFocus: null,
2394
- onBlur: null,
2395
- className: undefined
2396
- };
2330
+ }
2397
2331
 
2398
2332
  const CheckboxOption = /*#__PURE__*/React.forwardRef(({
2399
2333
  checked,
@@ -2405,7 +2339,7 @@ const CheckboxOption = /*#__PURE__*/React.forwardRef(({
2405
2339
  ...rest,
2406
2340
  ref: reference,
2407
2341
  disabled: disabled,
2408
- button: /*#__PURE__*/jsxRuntime.jsx(CheckboxButton$1, {
2342
+ button: /*#__PURE__*/jsxRuntime.jsx(CheckboxButton, {
2409
2343
  checked: checked,
2410
2344
  disabled: disabled,
2411
2345
  onChange: () => onChange?.(!checked)
@@ -2783,6 +2717,7 @@ const SlidingPanel = /*#__PURE__*/React.forwardRef(({
2783
2717
  slidingPanelPositionFixed,
2784
2718
  className,
2785
2719
  children,
2720
+ testId,
2786
2721
  ...rest
2787
2722
  }, reference) => {
2788
2723
  const localReference = React.useRef(null);
@@ -2803,20 +2738,21 @@ const SlidingPanel = /*#__PURE__*/React.forwardRef(({
2803
2738
  unmountOnExit: true
2804
2739
  }, /*#__PURE__*/jsxRuntime.jsx("div", {
2805
2740
  ref: localReference,
2741
+ "data-testid": testId,
2806
2742
  className: classNames__default.default('sliding-panel', `sliding-panel--open-${position}`, showSlidingPanelBorder && `sliding-panel--border-${position}`, slidingPanelPositionFixed && 'sliding-panel--fixed', className),
2807
2743
  children: children
2808
2744
  }));
2809
2745
  });
2810
2746
 
2811
- const Drawer = ({
2747
+ function Drawer({
2812
2748
  children,
2813
2749
  className,
2814
2750
  footerContent,
2815
2751
  headerTitle,
2816
2752
  onClose,
2817
- open,
2818
- position
2819
- }) => {
2753
+ open = false,
2754
+ position = 'right'
2755
+ }) {
2820
2756
  logActionRequiredIf('Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.', !onClose);
2821
2757
  const {
2822
2758
  isMobile
@@ -2854,32 +2790,7 @@ const Drawer = ({
2854
2790
  })
2855
2791
  })
2856
2792
  });
2857
- };
2858
- Drawer.propTypes = {
2859
- /** The content to appear in the drawer body. */
2860
- children: PropTypes__default.default.node,
2861
- className: PropTypes__default.default.string,
2862
- /** The content to appear in the drawer footer. */
2863
- footerContent: PropTypes__default.default.node,
2864
- /** The content to appear in the drawer header. */
2865
- headerTitle: PropTypes__default.default.node,
2866
- /** The status of Drawer either open or not. */
2867
- open: PropTypes__default.default.bool,
2868
- /** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
2869
- position: PropTypes__default.default.oneOf(['left', 'right', 'bottom']),
2870
- /** The action to perform on close click. */
2871
- onClose: PropTypes__default.default.func
2872
- };
2873
- Drawer.defaultProps = {
2874
- children: null,
2875
- className: undefined,
2876
- footerContent: null,
2877
- headerTitle: null,
2878
- onClose: null,
2879
- open: false,
2880
- position: exports.Position.RIGHT
2881
- };
2882
- var Drawer$1 = Drawer;
2793
+ }
2883
2794
 
2884
2795
  const INITIAL_Y_POSITION = 0;
2885
2796
  const CONTENT_SCROLL_THRESHOLD = 1;
@@ -3009,7 +2920,7 @@ const BottomSheet$1 = props => {
3009
2920
  };
3010
2921
  }
3011
2922
  const is400Zoom = useMedia(`(max-width: ${exports.Breakpoint.ZOOM_400}px)`);
3012
- return is400Zoom ? /*#__PURE__*/jsxRuntime.jsx(Drawer$1, {
2923
+ return is400Zoom ? /*#__PURE__*/jsxRuntime.jsx(Drawer, {
3013
2924
  open: props.open,
3014
2925
  className: props.className,
3015
2926
  onClose: close,
@@ -4680,7 +4591,7 @@ const NavigationOption = /*#__PURE__*/React.forwardRef(({
4680
4591
  });
4681
4592
  });
4682
4593
 
4683
- const Tile = ({
4594
+ function Tile({
4684
4595
  className,
4685
4596
  description,
4686
4597
  disabled,
@@ -4688,10 +4599,10 @@ const Tile = ({
4688
4599
  target,
4689
4600
  media,
4690
4601
  onClick,
4691
- size,
4602
+ size = 'md',
4692
4603
  title
4693
- }) => {
4694
- const isSmall = size === exports.Size.SMALL;
4604
+ }) {
4605
+ const isSmall = size === 'sm';
4695
4606
  const Element = href ? 'a' : 'button';
4696
4607
  return /*#__PURE__*/jsxRuntime.jsxs(Element, {
4697
4608
  className: classNames__default.default('decision', 'flex-column', 'np-tile', 'text-no-decoration', 'text-xs-center', className, {
@@ -4700,12 +4611,12 @@ const Tile = ({
4700
4611
  }, disabled && 'disabled'),
4701
4612
  href: href,
4702
4613
  target: target,
4703
- onClick: disabled ? null : onClick,
4704
- onKeyDown: disabled ? null : ({
4614
+ onClick: disabled ? undefined : onClick,
4615
+ onKeyDown: disabled ? undefined : ({
4705
4616
  key
4706
4617
  }) => {
4707
4618
  if (key === 'Enter' || key === ' ') {
4708
- onClick();
4619
+ onClick?.();
4709
4620
  }
4710
4621
  },
4711
4622
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -4722,29 +4633,7 @@ const Tile = ({
4722
4633
  children: description
4723
4634
  }) : null]
4724
4635
  });
4725
- };
4726
- Tile.propTypes = {
4727
- /** Classes to apply to the Tile container */
4728
- className: PropTypes__default.default.string,
4729
- description: PropTypes__default.default.node,
4730
- disabled: PropTypes__default.default.bool,
4731
- href: PropTypes__default.default.string,
4732
- target: PropTypes__default.default.oneOf(['_self', '_blank', '_parent', '_top']),
4733
- /** Accepts only Avatar and images */
4734
- media: PropTypes__default.default.node.isRequired,
4735
- /** Function called onClick or onKeyDown */
4736
- onClick: PropTypes__default.default.func,
4737
- /** The size applied to Tile */
4738
- size: PropTypes__default.default.oneOf(['sm', 'md']),
4739
- title: PropTypes__default.default.node.isRequired
4740
- };
4741
- Tile.defaultProps = {
4742
- className: '',
4743
- description: null,
4744
- disabled: false,
4745
- size: exports.Size.MEDIUM,
4746
- target: undefined
4747
- };
4636
+ }
4748
4637
 
4749
4638
  exports.DecisionPresentation = void 0;
4750
4639
  (function (DecisionPresentation) {
@@ -4836,9 +4725,9 @@ const Decision = ({
4836
4725
  return null;
4837
4726
  };
4838
4727
 
4839
- const isLayoutHorizontal = layout => [exports.Layout.HORIZONTAL_LEFT_ALIGNED, exports.Layout.HORIZONTAL_RIGHT_ALIGNED, exports.Layout.HORIZONTAL_JUSTIFIED].includes(layout);
4728
+ const isLayoutHorizontal = layout => layout === exports.Layout.HORIZONTAL_LEFT_ALIGNED || layout === exports.Layout.HORIZONTAL_RIGHT_ALIGNED || layout === exports.Layout.HORIZONTAL_JUSTIFIED;
4840
4729
  const getAlignmentClasses = (layout, action) => {
4841
- let classes = ['d-flex'];
4730
+ const classes = ['d-flex'];
4842
4731
  if (action) {
4843
4732
  if (isLayoutHorizontal(layout)) {
4844
4733
  classes.push('align-items-center');
@@ -4856,60 +4745,44 @@ const getAlignmentClasses = (layout, action) => {
4856
4745
  }
4857
4746
  return classes;
4858
4747
  };
4859
- const DefinitionList = ({
4860
- definitions,
4861
- layout,
4748
+ const defaultDefinitions = [];
4749
+ function DefinitionList({
4750
+ definitions = defaultDefinitions,
4751
+ layout = 'VERTICAL_TWO_COLUMN',
4862
4752
  muted
4863
- }) => /*#__PURE__*/jsxRuntime.jsx("dl", {
4864
- className: classNames__default.default('tw-definition-list d-flex ', {
4865
- 'text-muted': muted,
4866
- 'flex-column': layout === exports.Layout.VERTICAL_ONE_COLUMN,
4867
- 'tw-definition-list--columns flex-column flex-row--sm': layout === exports.Layout.VERTICAL_TWO_COLUMN,
4868
- 'tw-definition-list--horizontal flex-column': isLayoutHorizontal(layout)
4869
- }),
4870
- children: definitions.filter(definition => definition).map(({
4871
- action,
4872
- title,
4873
- value,
4874
- key
4875
- }) => /*#__PURE__*/jsxRuntime.jsxs("div", {
4876
- className: "tw-definition-list__item",
4877
- children: [/*#__PURE__*/jsxRuntime.jsx("dt", {
4878
- children: title
4879
- }), /*#__PURE__*/jsxRuntime.jsxs("dd", {
4880
- className: classNames__default.default(...getAlignmentClasses(layout, action)),
4881
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
4882
- children: value
4883
- }), action ? /*#__PURE__*/jsxRuntime.jsx("div", {
4884
- className: classNames__default.default(isLayoutHorizontal(layout) ? 'p-l-2' : 'p-x-2', 'tw-definition-list__action'),
4885
- children: /*#__PURE__*/jsxRuntime.jsx(ActionButton, {
4886
- className: "tw-definition-list__button",
4887
- onClick: action.onClick,
4888
- children: action.label
4889
- })
4890
- }) : null]
4891
- })]
4892
- }, key))
4893
- });
4894
- DefinitionList.propTypes = {
4895
- definitions: PropTypes__default.default.arrayOf(PropTypes__default.default.shape({
4896
- action: PropTypes__default.default.shape({
4897
- label: PropTypes__default.default.string.isRequired,
4898
- onClick: PropTypes__default.default.func
4753
+ }) {
4754
+ return /*#__PURE__*/jsxRuntime.jsx("dl", {
4755
+ className: classNames__default.default('tw-definition-list d-flex ', {
4756
+ 'text-muted': muted,
4757
+ 'flex-column': layout === exports.Layout.VERTICAL_ONE_COLUMN,
4758
+ 'tw-definition-list--columns flex-column flex-row--sm': layout === exports.Layout.VERTICAL_TWO_COLUMN,
4759
+ 'tw-definition-list--horizontal flex-column': isLayoutHorizontal(layout)
4899
4760
  }),
4900
- title: PropTypes__default.default.node.isRequired,
4901
- value: PropTypes__default.default.node.isRequired,
4902
- key: PropTypes__default.default.string.isRequired
4903
- })),
4904
- layout: PropTypes__default.default.oneOf(['VERTICAL_TWO_COLUMN', 'VERTICAL_ONE_COLUMN', 'HORIZONTAL_JUSTIFIED', 'HORIZONTAL_LEFT_ALIGNED', 'HORIZONTAL_RIGHT_ALIGNED']),
4905
- muted: PropTypes__default.default.bool
4906
- };
4907
- DefinitionList.defaultProps = {
4908
- definitions: [],
4909
- layout: exports.Layout.VERTICAL_TWO_COLUMN,
4910
- muted: false
4911
- };
4912
- var DefinitionList$1 = DefinitionList;
4761
+ children: definitions.filter(definition => definition).map(({
4762
+ action,
4763
+ title,
4764
+ value,
4765
+ key
4766
+ }) => /*#__PURE__*/jsxRuntime.jsxs("div", {
4767
+ className: "tw-definition-list__item",
4768
+ children: [/*#__PURE__*/jsxRuntime.jsx("dt", {
4769
+ children: title
4770
+ }), /*#__PURE__*/jsxRuntime.jsxs("dd", {
4771
+ className: classNames__default.default(...getAlignmentClasses(layout, action)),
4772
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
4773
+ children: value
4774
+ }), action ? /*#__PURE__*/jsxRuntime.jsx("div", {
4775
+ className: classNames__default.default(isLayoutHorizontal(layout) ? 'p-l-2' : 'p-x-2', 'tw-definition-list__action'),
4776
+ children: /*#__PURE__*/jsxRuntime.jsx(ActionButton, {
4777
+ className: "tw-definition-list__button",
4778
+ onClick: action.onClick,
4779
+ children: action.label
4780
+ })
4781
+ }) : null]
4782
+ })]
4783
+ }, key))
4784
+ });
4785
+ }
4913
4786
 
4914
4787
  const DropFade = ({
4915
4788
  children,
@@ -5098,14 +4971,6 @@ const FlowHeader = /*#__PURE__*/React__namespace.forwardRef(({
5098
4971
  });
5099
4972
  });
5100
4973
 
5101
- // TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
5102
- exports.LogoType = void 0;
5103
- (function (LogoType) {
5104
- LogoType["WISE"] = "WISE";
5105
- LogoType["WISE_BUSINESS"] = "WISE_BUSINESS";
5106
- LogoType["WISE_PLATFORM"] = "WISE_PLATFORM";
5107
- })(exports.LogoType || (exports.LogoType = {}));
5108
-
5109
4974
  var LogoFlagInverse = function LogoFlagInverse(props) {
5110
4975
  return /*#__PURE__*/jsxRuntime.jsx("svg", {
5111
4976
  ...props,
@@ -5238,15 +5103,26 @@ const svgPaths = {
5238
5103
  WISE_FLAG_PLATFORM: LogoFlagPlatform,
5239
5104
  WISE_FLAG_PLATFORM_INVERSE: LogoFlagPlatformInverse
5240
5105
  };
5241
- const Logo = ({
5106
+ exports.LogoType = void 0;
5107
+ (function (LogoType) {
5108
+ LogoType["WISE"] = "WISE";
5109
+ LogoType["WISE_BUSINESS"] = "WISE_BUSINESS";
5110
+ LogoType["WISE_PLATFORM"] = "WISE_PLATFORM";
5111
+ })(exports.LogoType || (exports.LogoType = {}));
5112
+ const labelByType = {
5113
+ WISE: 'Wise',
5114
+ WISE_BUSINESS: 'Wise Business',
5115
+ WISE_PLATFORM: 'Wise Platform'
5116
+ };
5117
+ function Logo({
5242
5118
  className,
5243
5119
  inverse,
5244
- type
5245
- }) => {
5246
- const LogoSm = svgPaths[`WISE_FLAG${type === exports.LogoType.WISE_PLATFORM ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];
5120
+ type = 'WISE'
5121
+ }) {
5122
+ const LogoSm = svgPaths[`WISE_FLAG${type === 'WISE_PLATFORM' ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`];
5247
5123
  const LogoMd = svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];
5248
5124
  return /*#__PURE__*/jsxRuntime.jsxs("span", {
5249
- "aria-label": type === exports.LogoType.WISE ? 'Wise' : 'Wise Business' | type === exports.LogoType.WISE_PLATFORM ? 'Wise Platform' : 'Wise Business',
5125
+ "aria-label": labelByType[type],
5250
5126
  role: "img",
5251
5127
  className: classNames__default.default(className, 'np-logo'),
5252
5128
  children: [/*#__PURE__*/jsxRuntime.jsx(LogoSm, {
@@ -5255,21 +5131,7 @@ const Logo = ({
5255
5131
  className: "np-logo-svg np-logo-svg--size-md"
5256
5132
  })]
5257
5133
  });
5258
- };
5259
- Logo.propTypes = {
5260
- /** Extra classes applied to Logo */
5261
- className: PropTypes__default.default.string,
5262
- /** If true, will use dark colours for dark on light theme */
5263
- inverse: PropTypes__default.default.bool,
5264
- /** What type of logo to display */
5265
- type: PropTypes__default.default.oneOf(['WISE', 'WISE_BUSINESS', 'WISE_PLATFORM'])
5266
- };
5267
- Logo.defaultProps = {
5268
- className: undefined,
5269
- inverse: false,
5270
- type: exports.LogoType.WISE
5271
- };
5272
- var Logo$1 = Logo;
5134
+ }
5273
5135
 
5274
5136
  /* eslint-disable @typescript-eslint/ban-ts-comment */
5275
5137
  const Tooltip = ({
@@ -5499,7 +5361,7 @@ BackButton.defaultProps = {
5499
5361
  const FlowNavigation = ({
5500
5362
  activeStep = 0,
5501
5363
  avatar,
5502
- logo = /*#__PURE__*/jsxRuntime.jsx(Logo$1, {}),
5364
+ logo = /*#__PURE__*/jsxRuntime.jsx(Logo, {}),
5503
5365
  done = false,
5504
5366
  onClose,
5505
5367
  onGoBack,
@@ -5651,7 +5513,7 @@ const Modal = ({
5651
5513
  const noDivider = checkSpecialClasses('no-divider');
5652
5514
  const contentReference = React.useRef(null);
5653
5515
  const titleId = React.useId();
5654
- return !isMedium ? /*#__PURE__*/jsxRuntime.jsx(Drawer$1, {
5516
+ return !isMedium ? /*#__PURE__*/jsxRuntime.jsx(Drawer, {
5655
5517
  open: open,
5656
5518
  headerTitle: title,
5657
5519
  footerContent: footer,
@@ -7926,7 +7788,7 @@ const OverlayHeader = ({
7926
7788
  };
7927
7789
  OverlayHeader.defaultProps = {
7928
7790
  avatar: null,
7929
- logo: /*#__PURE__*/jsxRuntime.jsx(Logo$1, {}),
7791
+ logo: /*#__PURE__*/jsxRuntime.jsx(Logo, {}),
7930
7792
  onClose: null
7931
7793
  };
7932
7794
  OverlayHeader.propTypes = {
@@ -10479,7 +10341,7 @@ function Select({
10479
10341
  , {
10480
10342
  className: classNames__default.default(s('tw-icon'), s('tw-chevron-up-icon'), s('tw-chevron'), s('bottom'), s('np-select-chevron'))
10481
10343
  })]
10482
- }), isMobile ? isSearchEnabled ? /*#__PURE__*/jsxRuntime.jsx(Drawer$1, {
10344
+ }), isMobile ? isSearchEnabled ? /*#__PURE__*/jsxRuntime.jsx(Drawer, {
10483
10345
  open: open,
10484
10346
  headerTitle: searchPlaceholder || formatMessage(messages$2.searchPlaceholder),
10485
10347
  onClose: handleCloseOptions,
@@ -10617,15 +10479,13 @@ class Snackbar extends React.Component {
10617
10479
  const {
10618
10480
  action,
10619
10481
  text,
10620
- theme,
10621
10482
  timestamp
10622
10483
  } = this.props;
10623
10484
  if (!previousProps.text) {
10624
10485
  this.setState({
10625
10486
  visible: true,
10626
10487
  action,
10627
- text,
10628
- theme
10488
+ text
10629
10489
  }, () => {
10630
10490
  this.setLeaveTimeout();
10631
10491
  });
@@ -10639,8 +10499,7 @@ class Snackbar extends React.Component {
10639
10499
  this.setState({
10640
10500
  visible: true,
10641
10501
  action,
10642
- text,
10643
- theme
10502
+ text
10644
10503
  });
10645
10504
  this.setLeaveTimeout();
10646
10505
  }, CSS_TRANSITION_DURATION);
@@ -10649,8 +10508,7 @@ class Snackbar extends React.Component {
10649
10508
  this.setState({
10650
10509
  visible: true,
10651
10510
  action,
10652
- text,
10653
- theme
10511
+ text
10654
10512
  });
10655
10513
  this.setLeaveTimeout();
10656
10514
  }
@@ -10660,7 +10518,6 @@ class Snackbar extends React.Component {
10660
10518
  const {
10661
10519
  action,
10662
10520
  text,
10663
- theme = exports.Theme.LIGHT,
10664
10521
  visible
10665
10522
  } = this.state;
10666
10523
  const {
@@ -10681,7 +10538,7 @@ class Snackbar extends React.Component {
10681
10538
  children: /*#__PURE__*/jsxRuntime.jsxs(Body, {
10682
10539
  ref: this.bodyRef,
10683
10540
  as: "span",
10684
- className: `snackbar__text snackbar__text--${theme}`,
10541
+ className: "snackbar__text",
10685
10542
  "aria-live": "polite",
10686
10543
  children: [text, action ? /*#__PURE__*/jsxRuntime.jsx(ActionButton, {
10687
10544
  className: "snackbar__text__action",
@@ -10740,19 +10597,21 @@ function SnackbarProvider({
10740
10597
  });
10741
10598
  }
10742
10599
 
10743
- function Sticky({
10600
+ const Sticky = ({
10601
+ children,
10744
10602
  open = true,
10745
- position = 'bottom',
10746
- children
10747
- }) {
10603
+ position = exports.Position.BOTTOM,
10604
+ testId
10605
+ }) => {
10748
10606
  return /*#__PURE__*/jsxRuntime.jsx(SlidingPanel, {
10607
+ testId: testId,
10749
10608
  open: open,
10750
10609
  position: position,
10751
10610
  slidingPanelPositionFixed: true,
10752
10611
  showSlidingPanelBorder: true,
10753
10612
  children: children
10754
10613
  });
10755
- }
10614
+ };
10756
10615
 
10757
10616
  var messages$1 = reactIntl.defineMessages({
10758
10617
  statusNotDone: {
@@ -13171,13 +13030,8 @@ const UploadButton = ({
13171
13030
  maxFiles,
13172
13031
  onChange,
13173
13032
  id = DEFAULT_FILE_INPUT_ID,
13174
- uploadButtonTitle,
13175
- multipleFileInputWithFilesAdded
13033
+ uploadButtonTitle
13176
13034
  }) => {
13177
- const {
13178
- isModern
13179
- } = componentsTheming.useTheme();
13180
- useDirection();
13181
13035
  const {
13182
13036
  formatMessage
13183
13037
  } = reactIntl.useIntl();
@@ -13240,7 +13094,7 @@ const UploadButton = ({
13240
13094
  function getAcceptedTypes() {
13241
13095
  const areAllFilesAllowed = getFileTypesDescription() === '*';
13242
13096
  if (areAllFilesAllowed) {
13243
- return {}; //file input by default allows all files
13097
+ return {}; // file input by default allows all files
13244
13098
  }
13245
13099
  if (Array.isArray(fileTypes)) {
13246
13100
  return {
@@ -13252,17 +13106,13 @@ const UploadButton = ({
13252
13106
  };
13253
13107
  }
13254
13108
  function renderDescription() {
13255
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
13256
- children: /*#__PURE__*/jsxRuntime.jsxs(Body, {
13257
- className: classNames__default.default({
13258
- 'text-primary': !disabled,
13259
- small: !isModern,
13260
- 'font-weight-normal': !isModern
13261
- }),
13262
- children: [getDescription(), maxFiles && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
13263
- children: [/*#__PURE__*/jsxRuntime.jsx("br", {}), `Maximum ${maxFiles} files.`]
13264
- })]
13265
- })
13109
+ return /*#__PURE__*/jsxRuntime.jsxs(Body, {
13110
+ className: classNames__default.default({
13111
+ 'text-primary': !disabled
13112
+ }),
13113
+ children: [getDescription(), maxFiles && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
13114
+ children: [/*#__PURE__*/jsxRuntime.jsx("br", {}), `Maximum ${maxFiles} files.`]
13115
+ })]
13266
13116
  });
13267
13117
  }
13268
13118
  function renderButtonTitle() {
@@ -13296,14 +13146,11 @@ const UploadButton = ({
13296
13146
  onChange: filesSelected
13297
13147
  }), /*#__PURE__*/jsxRuntime.jsx("label", {
13298
13148
  htmlFor: id,
13299
- className: classNames__default.default('btn', 'np-upload-accent', 'np-upload-button', {
13300
- disabled,
13301
- 'np-upload-input--square-top': multipleFileInputWithFilesAdded
13302
- }),
13149
+ className: classNames__default.default('btn', 'np-upload-button'),
13303
13150
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
13304
13151
  className: "media",
13305
13152
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
13306
- className: "np-upload-icon media-left",
13153
+ className: "np-upload-icon media-middle media-left",
13307
13154
  children: /*#__PURE__*/jsxRuntime.jsx(icons.Upload, {
13308
13155
  size: 24,
13309
13156
  className: "text-link"
@@ -13319,9 +13166,7 @@ const UploadButton = ({
13319
13166
  })]
13320
13167
  })
13321
13168
  }), isDropping && /*#__PURE__*/jsxRuntime.jsxs("div", {
13322
- className: classNames__default.default('droppable-card', 'droppable-dropping-card', 'droppable-card-content', {
13323
- 'np-upload-input--square-top': multipleFileInputWithFilesAdded
13324
- }),
13169
+ className: classNames__default.default('droppable-card', 'droppable-dropping-card', 'droppable-card-content'),
13325
13170
  children: [/*#__PURE__*/jsxRuntime.jsx(icons.PlusCircle, {
13326
13171
  className: "m-x-1",
13327
13172
  size: 24
@@ -13368,7 +13213,7 @@ const UploadItemBody = ({
13368
13213
  href: url,
13369
13214
  target: "_blank",
13370
13215
  rel: "noopener noreferrer",
13371
- className: singleFileUpload ? 'np-upload-item--single-file' : '',
13216
+ className: singleFileUpload ? 'np-upload-item--single-file' : 'np-upload-item--link',
13372
13217
  onClick: onDownload,
13373
13218
  children: children
13374
13219
  });
@@ -13393,20 +13238,15 @@ const UploadItem = ({
13393
13238
  status,
13394
13239
  filename,
13395
13240
  error,
13241
+ errors,
13396
13242
  url
13397
13243
  } = file;
13398
- const {
13399
- isModern
13400
- } = componentsTheming.useTheme();
13401
13244
  const isSucceeded = [exports.Status.SUCCEEDED, undefined].includes(status) && !!url;
13402
13245
  const getIcon = () => {
13403
- if (error || status === exports.Status.FAILED) {
13404
- return isModern ? /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
13246
+ if (error || errors?.length || status === exports.Status.FAILED) {
13247
+ return /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
13405
13248
  size: exports.Size.SMALL,
13406
13249
  sentiment: exports.Sentiment.NEGATIVE
13407
- }) : /*#__PURE__*/jsxRuntime.jsx(icons.AlertCircle, {
13408
- size: 24,
13409
- className: "text-negative"
13410
13250
  });
13411
13251
  }
13412
13252
  let processIndicator;
@@ -13421,31 +13261,37 @@ const UploadItem = ({
13421
13261
  case exports.Status.SUCCEEDED:
13422
13262
  case exports.Status.DONE:
13423
13263
  default:
13424
- processIndicator = isModern ? /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
13264
+ processIndicator = /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
13425
13265
  size: exports.Size.SMALL,
13426
13266
  sentiment: exports.Sentiment.POSITIVE
13427
- }) : /*#__PURE__*/jsxRuntime.jsx(ProcessIndicator, {
13428
- size: exports.Size.EXTRA_SMALL,
13429
- status: exports.Status.SUCCEEDED
13430
13267
  });
13431
13268
  }
13432
- if (isModern) {
13433
- return processIndicator;
13269
+ return processIndicator;
13270
+ };
13271
+ const getErrorMessage = error => typeof error === 'object' ? error.message : error || formatMessage(MESSAGES.uploadingFailed);
13272
+ const getMultipleErrors = errors => {
13273
+ if (!errors?.length) {
13274
+ return null;
13434
13275
  }
13435
- return /*#__PURE__*/jsxRuntime.jsx("span", {
13436
- style: {
13437
- transform: 'scale(0.8335)'
13438
- },
13439
- children: processIndicator
13440
- }); // Scale down ProcessIndicator to be 20px*20px to match `icons`
13276
+ if (errors?.length === 1) {
13277
+ return getErrorMessage(errors[0]);
13278
+ }
13279
+ return /*#__PURE__*/jsxRuntime.jsx("ul", {
13280
+ className: "np-upload-input-errors m-b-0",
13281
+ children: errors.map((error, index) => {
13282
+ // eslint-disable-next-line react/no-array-index-key
13283
+ return /*#__PURE__*/jsxRuntime.jsx("li", {
13284
+ children: getErrorMessage(error)
13285
+ }, index);
13286
+ })
13287
+ });
13441
13288
  };
13442
- const getErrorMessage = () => typeof error === 'object' ? error.message : error || formatMessage(MESSAGES.uploadingFailed);
13443
13289
  const getDescription = () => {
13444
- if (error || status === exports.Status.FAILED) {
13290
+ if (error || errors?.length || status === exports.Status.FAILED) {
13445
13291
  return /*#__PURE__*/jsxRuntime.jsx(Body, {
13446
13292
  type: exports.Typography.BODY_DEFAULT_BOLD,
13447
13293
  className: "text-negative",
13448
- children: getErrorMessage()
13294
+ children: errors?.length ? getMultipleErrors(errors) : getErrorMessage(error)
13449
13295
  });
13450
13296
  }
13451
13297
  switch (status) {
@@ -13515,7 +13361,7 @@ const UploadItem = ({
13515
13361
  }),
13516
13362
  type: "button",
13517
13363
  onClick: () => onDelete(),
13518
- children: /*#__PURE__*/jsxRuntime.jsx(icons.CrossCircleFill, {
13364
+ children: /*#__PURE__*/jsxRuntime.jsx(icons.Bin, {
13519
13365
  size: 16
13520
13366
  })
13521
13367
  })]
@@ -13552,9 +13398,6 @@ const UploadInput = ({
13552
13398
  sizeLimitErrorMessage,
13553
13399
  uploadButtonTitle
13554
13400
  }) => {
13555
- const {
13556
- isModern
13557
- } = componentsTheming.useTheme();
13558
13401
  const [markedFileForDelete, setMarkedFileForDelete] = React.useState(null);
13559
13402
  const [mounted, setMounted] = React.useState(false);
13560
13403
  const {
@@ -13712,7 +13555,7 @@ const UploadInput = ({
13712
13555
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
13713
13556
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
13714
13557
  className: classNames__default.default('np-upload-input', className, {
13715
- disabled: isModern && disabled
13558
+ disabled
13716
13559
  }),
13717
13560
  children: [uploadedFiles.map(file => /*#__PURE__*/jsxRuntime.jsx(UploadItem, {
13718
13561
  file: file,
@@ -13729,7 +13572,6 @@ const UploadInput = ({
13729
13572
  sizeLimit: sizeLimit,
13730
13573
  description: description,
13731
13574
  maxFiles: maxFiles,
13732
- multipleFileInputWithFilesAdded: multiple && uploadedFiles.length > 0,
13733
13575
  onChange: addFiles
13734
13576
  })]
13735
13577
  }), /*#__PURE__*/jsxRuntime.jsx(Modal, {
@@ -14783,14 +14625,14 @@ exports.Alert = Alert;
14783
14625
  exports.Avatar = Avatar;
14784
14626
  exports.AvatarWrapper = AvatarWrapper;
14785
14627
  exports.Badge = Badge;
14786
- exports.BaseCard = Card$2;
14628
+ exports.BaseCard = Card$1;
14787
14629
  exports.Body = Body;
14788
14630
  exports.BottomSheet = BottomSheet$1;
14789
14631
  exports.Button = Button;
14790
- exports.Card = Card$1;
14632
+ exports.Card = Card;
14791
14633
  exports.Carousel = Carousel;
14792
14634
  exports.Checkbox = Checkbox;
14793
- exports.CheckboxButton = CheckboxButton$1;
14635
+ exports.CheckboxButton = CheckboxButton;
14794
14636
  exports.CheckboxOption = CheckboxOption;
14795
14637
  exports.Chevron = Chevron;
14796
14638
  exports.Chip = Chip;
@@ -14802,11 +14644,11 @@ exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
14802
14644
  exports.DateInput = DateInput;
14803
14645
  exports.DateLookup = DateLookup$1;
14804
14646
  exports.Decision = Decision;
14805
- exports.DefinitionList = DefinitionList$1;
14647
+ exports.DefinitionList = DefinitionList;
14806
14648
  exports.Dimmer = Dimmer$1;
14807
14649
  exports.DirectionProvider = DirectionProvider;
14808
14650
  exports.Display = Display;
14809
- exports.Drawer = Drawer$1;
14651
+ exports.Drawer = Drawer;
14810
14652
  exports.DropFade = DropFade;
14811
14653
  exports.Emphasis = Emphasis;
14812
14654
  exports.Field = Field;
@@ -14824,7 +14666,7 @@ exports.LanguageProvider = LanguageProvider;
14824
14666
  exports.Link = Link;
14825
14667
  exports.ListItem = ListItem$1;
14826
14668
  exports.Loader = Loader;
14827
- exports.Logo = Logo$1;
14669
+ exports.Logo = Logo;
14828
14670
  exports.Markdown = Markdown;
14829
14671
  exports.Modal = Modal;
14830
14672
  exports.Money = Money;