@transferwise/components 46.129.0 → 46.130.1

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 (313) hide show
  1. package/build/accordion/Accordion.js.map +1 -1
  2. package/build/accordion/Accordion.mjs.map +1 -1
  3. package/build/actionButton/ActionButton.js.map +1 -1
  4. package/build/actionButton/ActionButton.mjs.map +1 -1
  5. package/build/actionOption/ActionOption.js.map +1 -1
  6. package/build/actionOption/ActionOption.mjs.map +1 -1
  7. package/build/alert/Alert.js +1 -1
  8. package/build/alert/Alert.js.map +1 -1
  9. package/build/alert/Alert.mjs +1 -1
  10. package/build/alert/Alert.mjs.map +1 -1
  11. package/build/avatar/Avatar.js.map +1 -1
  12. package/build/avatar/Avatar.mjs.map +1 -1
  13. package/build/avatarLayout/AvatarLayout.js.map +1 -1
  14. package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
  15. package/build/badge/Badge.js.map +1 -1
  16. package/build/badge/Badge.mjs.map +1 -1
  17. package/build/body/Body.js.map +1 -1
  18. package/build/body/Body.mjs.map +1 -1
  19. package/build/button/LegacyButton.js.map +1 -1
  20. package/build/button/LegacyButton.mjs.map +1 -1
  21. package/build/card/Card.js.map +1 -1
  22. package/build/card/Card.mjs.map +1 -1
  23. package/build/checkboxButton/CheckboxButton.js.map +1 -1
  24. package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
  25. package/build/checkboxOption/CheckboxOption.js.map +1 -1
  26. package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
  27. package/build/circularButton/CircularButton.js.map +1 -1
  28. package/build/circularButton/CircularButton.mjs.map +1 -1
  29. package/build/common/{card/Card.js → baseCard/BaseCard.js} +4 -4
  30. package/build/common/baseCard/BaseCard.js.map +1 -0
  31. package/build/common/{card/Card.mjs → baseCard/BaseCard.mjs} +4 -4
  32. package/build/common/baseCard/BaseCard.mjs.map +1 -0
  33. package/build/common/propsValues/type.js +1 -1
  34. package/build/common/propsValues/type.js.map +1 -1
  35. package/build/common/propsValues/type.mjs +1 -1
  36. package/build/common/propsValues/type.mjs.map +1 -1
  37. package/build/common/propsValues/typography.js +1 -1
  38. package/build/common/propsValues/typography.js.map +1 -1
  39. package/build/common/propsValues/typography.mjs +1 -1
  40. package/build/common/propsValues/typography.mjs.map +1 -1
  41. package/build/criticalBanner/CriticalCommsBanner.js +68 -3
  42. package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
  43. package/build/criticalBanner/CriticalCommsBanner.mjs +69 -4
  44. package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
  45. package/build/dateInput/DateInput.js.map +1 -1
  46. package/build/dateInput/DateInput.mjs.map +1 -1
  47. package/build/dimmer/Dimmer.js.map +1 -1
  48. package/build/dimmer/Dimmer.mjs.map +1 -1
  49. package/build/drawer/Drawer.js.map +1 -1
  50. package/build/drawer/Drawer.mjs.map +1 -1
  51. package/build/field/Field.js.map +1 -1
  52. package/build/field/Field.mjs.map +1 -1
  53. package/build/flowNavigation/FlowNavigation.js.map +1 -1
  54. package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
  55. package/build/header/Header.js.map +1 -1
  56. package/build/header/Header.mjs.map +1 -1
  57. package/build/iconButton/IconButton.js.map +1 -1
  58. package/build/iconButton/IconButton.mjs.map +1 -1
  59. package/build/index.js +4 -4
  60. package/build/index.mjs +1 -1
  61. package/build/legacylistItem/LegacyListItem.js.map +1 -1
  62. package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
  63. package/build/list/List.js.map +1 -1
  64. package/build/list/List.mjs.map +1 -1
  65. package/build/listItem/Button/ListItemButton.js.map +1 -1
  66. package/build/listItem/Button/ListItemButton.mjs.map +1 -1
  67. package/build/listItem/IconButton/ListItemIconButton.js.map +1 -1
  68. package/build/listItem/IconButton/ListItemIconButton.mjs.map +1 -1
  69. package/build/listItem/Image/ListItemImage.js.map +1 -1
  70. package/build/listItem/Image/ListItemImage.mjs.map +1 -1
  71. package/build/listItem/ListItem.js.map +1 -1
  72. package/build/listItem/ListItem.mjs.map +1 -1
  73. package/build/loader/Loader.js.map +1 -1
  74. package/build/loader/Loader.mjs.map +1 -1
  75. package/build/logo/Logo.js.map +1 -1
  76. package/build/logo/Logo.mjs.map +1 -1
  77. package/build/main.css +119 -101
  78. package/build/modal/Modal.js.map +1 -1
  79. package/build/modal/Modal.mjs.map +1 -1
  80. package/build/navigationOption/NavigationOption.js.map +1 -1
  81. package/build/navigationOption/NavigationOption.mjs.map +1 -1
  82. package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
  83. package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
  84. package/build/nudge/Nudge.js.map +1 -1
  85. package/build/nudge/Nudge.mjs.map +1 -1
  86. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  87. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  88. package/build/popover/Popover.js.map +1 -1
  89. package/build/popover/Popover.mjs.map +1 -1
  90. package/build/processIndicator/ProcessIndicator.js.map +1 -1
  91. package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
  92. package/build/promoCard/PromoCard.js +2 -2
  93. package/build/promoCard/PromoCard.js.map +1 -1
  94. package/build/promoCard/PromoCard.mjs +2 -2
  95. package/build/promoCard/PromoCard.mjs.map +1 -1
  96. package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
  97. package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
  98. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
  99. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
  100. package/build/radioOption/RadioOption.js.map +1 -1
  101. package/build/radioOption/RadioOption.mjs.map +1 -1
  102. package/build/select/Select.js.map +1 -1
  103. package/build/select/Select.mjs.map +1 -1
  104. package/build/statusIcon/StatusIcon.js.map +1 -1
  105. package/build/statusIcon/StatusIcon.mjs.map +1 -1
  106. package/build/styles/criticalBanner/CriticalCommsBanner.css +33 -15
  107. package/build/styles/listItem/ListItem.css +1 -1
  108. package/build/styles/main.css +119 -101
  109. package/build/styles/sentimentSurface/SentimentSurface.css +36 -36
  110. package/build/summary/Summary.js +1 -1
  111. package/build/summary/Summary.js.map +1 -1
  112. package/build/summary/Summary.mjs +1 -1
  113. package/build/summary/Summary.mjs.map +1 -1
  114. package/build/switchOption/SwitchOption.js +1 -1
  115. package/build/switchOption/SwitchOption.js.map +1 -1
  116. package/build/switchOption/SwitchOption.mjs +1 -1
  117. package/build/switchOption/SwitchOption.mjs.map +1 -1
  118. package/build/tabs/Tabs.js.map +1 -1
  119. package/build/tabs/Tabs.mjs.map +1 -1
  120. package/build/typeahead/Typeahead.js.map +1 -1
  121. package/build/typeahead/Typeahead.mjs.map +1 -1
  122. package/build/types/accordion/Accordion.d.ts +8 -2
  123. package/build/types/accordion/Accordion.d.ts.map +1 -1
  124. package/build/types/actionButton/ActionButton.d.ts +6 -4
  125. package/build/types/actionButton/ActionButton.d.ts.map +1 -1
  126. package/build/types/actionOption/ActionOption.d.ts +1 -1
  127. package/build/types/alert/Alert.d.ts +5 -2
  128. package/build/types/alert/Alert.d.ts.map +1 -1
  129. package/build/types/avatar/Avatar.d.ts +4 -0
  130. package/build/types/avatar/Avatar.d.ts.map +1 -1
  131. package/build/types/avatarLayout/AvatarLayout.d.ts +5 -1
  132. package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
  133. package/build/types/badge/Badge.d.ts +2 -0
  134. package/build/types/badge/Badge.d.ts.map +1 -1
  135. package/build/types/body/Body.d.ts +2 -6
  136. package/build/types/body/Body.d.ts.map +1 -1
  137. package/build/types/button/Button.types.d.ts +4 -1
  138. package/build/types/button/Button.types.d.ts.map +1 -1
  139. package/build/types/button/LegacyButton.d.ts +4 -4
  140. package/build/types/card/Card.d.ts +2 -1
  141. package/build/types/card/Card.d.ts.map +1 -1
  142. package/build/types/checkboxButton/CheckboxButton.d.ts +2 -0
  143. package/build/types/checkboxButton/CheckboxButton.d.ts.map +1 -1
  144. package/build/types/checkboxOption/CheckboxOption.d.ts +1 -1
  145. package/build/types/circularButton/CircularButton.d.ts +1 -1
  146. package/build/types/circularButton/CircularButton.d.ts.map +1 -1
  147. package/build/types/common/{card/Card.d.ts → baseCard/BaseCard.d.ts} +8 -8
  148. package/build/types/common/baseCard/BaseCard.d.ts.map +1 -0
  149. package/build/types/common/baseCard/index.d.ts +3 -0
  150. package/build/types/common/baseCard/index.d.ts.map +1 -0
  151. package/build/types/common/propsValues/type.d.ts +1 -1
  152. package/build/types/common/propsValues/typography.d.ts +2 -2
  153. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +4 -1
  154. package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
  155. package/build/types/criticalBanner/index.d.ts +1 -0
  156. package/build/types/criticalBanner/index.d.ts.map +1 -1
  157. package/build/types/dateInput/DateInput.d.ts +5 -0
  158. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  159. package/build/types/dimmer/Dimmer.d.ts +6 -0
  160. package/build/types/dimmer/Dimmer.d.ts.map +1 -1
  161. package/build/types/drawer/Drawer.d.ts +8 -2
  162. package/build/types/drawer/Drawer.d.ts.map +1 -1
  163. package/build/types/field/Field.d.ts +5 -2
  164. package/build/types/field/Field.d.ts.map +1 -1
  165. package/build/types/flowNavigation/FlowNavigation.d.ts +3 -0
  166. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  167. package/build/types/header/Header.d.ts +5 -1
  168. package/build/types/header/Header.d.ts.map +1 -1
  169. package/build/types/iconButton/IconButton.d.ts +6 -0
  170. package/build/types/iconButton/IconButton.d.ts.map +1 -1
  171. package/build/types/index.d.ts +2 -1
  172. package/build/types/index.d.ts.map +1 -1
  173. package/build/types/legacylistItem/LegacyListItem.d.ts +1 -1
  174. package/build/types/list/List.d.ts +1 -0
  175. package/build/types/list/List.d.ts.map +1 -1
  176. package/build/types/listItem/Button/ListItemButton.d.ts +4 -0
  177. package/build/types/listItem/Button/ListItemButton.d.ts.map +1 -1
  178. package/build/types/listItem/IconButton/ListItemIconButton.d.ts +3 -1
  179. package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +1 -1
  180. package/build/types/listItem/Image/ListItemImage.d.ts +2 -0
  181. package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -1
  182. package/build/types/listItem/ListItem.d.ts +3 -0
  183. package/build/types/listItem/ListItem.d.ts.map +1 -1
  184. package/build/types/loader/Loader.d.ts +5 -1
  185. package/build/types/loader/Loader.d.ts.map +1 -1
  186. package/build/types/logo/Logo.d.ts +4 -1
  187. package/build/types/logo/Logo.d.ts.map +1 -1
  188. package/build/types/modal/Modal.d.ts +6 -0
  189. package/build/types/modal/Modal.d.ts.map +1 -1
  190. package/build/types/navigationOption/NavigationOption.d.ts +1 -1
  191. package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +1 -1
  192. package/build/types/nudge/Nudge.d.ts +1 -1
  193. package/build/types/nudge/Nudge.d.ts.map +1 -1
  194. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +7 -1
  195. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  196. package/build/types/popover/Popover.d.ts +1 -0
  197. package/build/types/popover/Popover.d.ts.map +1 -1
  198. package/build/types/processIndicator/ProcessIndicator.d.ts +2 -0
  199. package/build/types/processIndicator/ProcessIndicator.d.ts.map +1 -1
  200. package/build/types/promoCard/PromoCard.d.ts +3 -3
  201. package/build/types/promoCard/PromoCard.d.ts.map +1 -1
  202. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +8 -1
  203. package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
  204. package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts +1 -0
  205. package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -1
  206. package/build/types/radioOption/RadioOption.d.ts +1 -1
  207. package/build/types/select/Select.d.ts +4 -0
  208. package/build/types/select/Select.d.ts.map +1 -1
  209. package/build/types/statusIcon/StatusIcon.d.ts +3 -1
  210. package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
  211. package/build/types/summary/Summary.d.ts +7 -4
  212. package/build/types/summary/Summary.d.ts.map +1 -1
  213. package/build/types/switchOption/SwitchOption.d.ts +1 -1
  214. package/build/types/tabs/Tabs.d.ts +2 -0
  215. package/build/types/tabs/Tabs.d.ts.map +1 -1
  216. package/build/types/typeahead/Typeahead.d.ts +14 -1
  217. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  218. package/build/types/upload/Upload.d.ts +6 -0
  219. package/build/types/upload/Upload.d.ts.map +1 -1
  220. package/build/types/uploadInput/UploadInput.d.ts +10 -1
  221. package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
  222. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +3 -0
  223. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  224. package/build/upload/Upload.js.map +1 -1
  225. package/build/upload/Upload.mjs.map +1 -1
  226. package/build/uploadInput/UploadInput.js.map +1 -1
  227. package/build/uploadInput/UploadInput.mjs.map +1 -1
  228. package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
  229. package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
  230. package/package.json +2 -2
  231. package/src/accordion/Accordion.tsx +8 -2
  232. package/src/actionButton/ActionButton.tsx +4 -3
  233. package/src/actionOption/ActionOption.tsx +1 -1
  234. package/src/alert/Alert.tsx +5 -2
  235. package/src/avatar/Avatar.tsx +4 -0
  236. package/src/avatarLayout/AvatarLayout.tsx +5 -1
  237. package/src/badge/Badge.tsx +2 -0
  238. package/src/body/Body.tsx +2 -6
  239. package/src/button/Button.types.ts +4 -1
  240. package/src/button/LegacyButton.tsx +4 -4
  241. package/src/card/Card.story.tsx +3 -2
  242. package/src/card/Card.tsx +2 -1
  243. package/src/checkboxButton/CheckboxButton.tsx +1 -0
  244. package/src/checkboxOption/CheckboxOption.tsx +1 -1
  245. package/src/circularButton/CircularButton.tsx +1 -2
  246. package/src/common/{card/Card.less → baseCard/BaseCard.less} +1 -1
  247. package/src/common/{card/Card.story.tsx → baseCard/BaseCard.story.tsx} +5 -5
  248. package/src/common/{card/Card.test.tsx → baseCard/BaseCard.test.tsx} +11 -12
  249. package/src/common/{card/Card.tsx → baseCard/BaseCard.tsx} +9 -9
  250. package/src/common/baseCard/index.ts +2 -0
  251. package/src/common/propsValues/type.ts +1 -1
  252. package/src/common/propsValues/typography.ts +2 -2
  253. package/src/criticalBanner/CriticalCommsBanner.css +33 -15
  254. package/src/criticalBanner/CriticalCommsBanner.less +46 -36
  255. package/src/criticalBanner/CriticalCommsBanner.story.tsx +9 -15
  256. package/src/criticalBanner/CriticalCommsBanner.test.story.tsx +70 -0
  257. package/src/criticalBanner/CriticalCommsBanner.test.tsx +66 -0
  258. package/src/criticalBanner/CriticalCommsBanner.tsx +54 -5
  259. package/src/criticalBanner/index.ts +1 -0
  260. package/src/dateInput/DateInput.tsx +5 -0
  261. package/src/dimmer/Dimmer.tsx +6 -0
  262. package/src/drawer/Drawer.tsx +8 -2
  263. package/src/field/Field.tsx +5 -2
  264. package/src/flowNavigation/FlowNavigation.tsx +3 -0
  265. package/src/header/Header.tsx +5 -1
  266. package/src/iconButton/IconButton.tsx +3 -0
  267. package/src/index.ts +2 -1
  268. package/src/legacylistItem/LegacyListItem.tsx +1 -1
  269. package/src/list/List.tsx +1 -0
  270. package/src/listItem/Button/ListItemButton.tsx +2 -0
  271. package/src/listItem/IconButton/ListItemIconButton.tsx +3 -1
  272. package/src/listItem/Image/ListItemImage.tsx +2 -0
  273. package/src/listItem/ListItem.css +1 -1
  274. package/src/listItem/ListItem.less +4 -2
  275. package/src/listItem/ListItem.tsx +2 -0
  276. package/src/listItem/_stories/Breakpoints/ListItem.noMedia.test.story.tsx +62 -0
  277. package/src/listItem/_stories/Breakpoints/ListItem.sideMedia.test.story.tsx +62 -0
  278. package/src/listItem/_stories/Breakpoints/ListItem.stackedMedia.test.story.tsx +62 -0
  279. package/src/listItem/_stories/ListItem.story.tsx +3 -2
  280. package/src/loader/Loader.tsx +6 -2
  281. package/src/logo/Logo.tsx +4 -1
  282. package/src/main.css +119 -101
  283. package/src/main.less +2 -2
  284. package/src/modal/Modal.tsx +6 -0
  285. package/src/navigationOption/NavigationOption.tsx +1 -1
  286. package/src/navigationOptionsList/NavigationOptionsList.tsx +1 -1
  287. package/src/nudge/Nudge.tsx +1 -1
  288. package/src/phoneNumberInput/PhoneNumberInput.tsx +7 -1
  289. package/src/popover/Popover.tsx +1 -0
  290. package/src/processIndicator/ProcessIndicator.tsx +2 -0
  291. package/src/promoCard/PromoCard.tsx +6 -5
  292. package/src/prompt/ActionPrompt/ActionPrompt.tsx +8 -1
  293. package/src/prompt/InlinePrompt/InlinePrompt.tsx +1 -0
  294. package/src/radioOption/RadioOption.tsx +1 -1
  295. package/src/select/Select.tsx +4 -0
  296. package/src/sentimentSurface/SentimentSurface.css +36 -36
  297. package/src/sentimentSurface/SentimentSurface.less +12 -12
  298. package/src/statusIcon/StatusIcon.tsx +3 -1
  299. package/src/summary/Summary.tsx +7 -4
  300. package/src/switchOption/SwitchOption.tsx +1 -1
  301. package/src/tabs/Tabs.tsx +2 -0
  302. package/src/typeahead/Typeahead.tsx +14 -2
  303. package/src/upload/Upload.tsx +6 -0
  304. package/src/uploadInput/UploadInput.tsx +12 -4
  305. package/src/withDisplayFormat/WithDisplayFormat.tsx +3 -0
  306. package/build/common/card/Card.js.map +0 -1
  307. package/build/common/card/Card.mjs.map +0 -1
  308. package/build/types/common/card/Card.d.ts.map +0 -1
  309. package/build/types/common/card/index.d.ts +0 -3
  310. package/build/types/common/card/index.d.ts.map +0 -1
  311. package/src/common/card/index.ts +0 -2
  312. /package/build/styles/common/{card/Card.css → baseCard/BaseCard.css} +0 -0
  313. /package/src/common/{card/Card.css → baseCard/BaseCard.css} +0 -0
@@ -1,51 +1,61 @@
1
- .np-theme-personal {
2
- .critical-comms {
3
- .alert-warning {
4
- color: var(--color-contrast-overlay);
5
- background-color: var(--color-sentiment-negative);
6
-
7
- .np-text-title-body {
8
- color: var(--color-contrast-overlay);
9
- }
10
- }
1
+ .critical-comms {
2
+ border-radius: var(--radius-medium);
3
+ overflow: hidden;
11
4
 
12
- .status-circle.warning {
13
- background-color: var(--color-background-screen);
5
+ .alert {
6
+ background-color: var(--color-sentiment-background-surface);
7
+ color: var(--color-sentiment-content-primary);
8
+ margin-bottom: 0;
14
9
 
15
- .status-icon {
16
- color: var(--color-contrast-theme);
17
- }
10
+ .np-text-title-body {
11
+ color: var(--color-sentiment-content-primary);
18
12
  }
13
+ }
19
14
 
20
- .alert__message {
21
- .alert__action {
22
- margin-top: var(--size-16);
23
- }
15
+ .status-circle.negative {
16
+ background-color: var(--color-background-screen);
17
+
18
+ .status-icon {
19
+ color: var(--color-content-primary);
24
20
  }
21
+ }
25
22
 
26
- .wds-Button {
27
- --Button-background: var(--color-contrast-overlay);
28
- --Button-background-hover: var(--color-sentiment-negative-secondary-hover);
29
- --Button-background-active: var(--color-sentiment-negative-secondary-active);
23
+ .alert__message {
24
+ .alert__action {
25
+ margin-top: var(--size-16);
30
26
  }
31
27
  }
32
28
 
29
+ .wds-Button {
30
+ --Button-color: var(--color-content-primary);
31
+ --Button-color-hover: var(--color-content-primary);
32
+ --Button-color-active: var(--color-content-primary);
33
+
34
+ --Button-background: var(--color-background-screen);
35
+ --Button-background-hover: var(--color-sentiment-interactive-primary-hover);
36
+ --Button-background-active: var(--color-sentiment-interactive-primary-active);
37
+ }
38
+
39
+ .alert-warning .wds-Button {
40
+ --Button-background-hover: var(--color-sentiment-interactive-secondary-neutral-hover);
41
+ --Button-background-active: var(--color-sentiment-interactive-secondary-neutral-active);
42
+ }
33
43
 
34
44
  @media (--screen-md) {
35
- .critical-comms {
36
- .alert-warning {
37
- .alert__message {
38
- flex-direction: row;
39
- justify-content: space-between;
40
- align-items: center;
41
- width: 100%;
42
-
43
- .alert__action {
44
- margin-top: 0;
45
- margin-left: var(--padding-small);
46
- }
45
+ .alert-warning,
46
+ .alert-negative,
47
+ .alert-neutral {
48
+ .alert__message {
49
+ flex-direction: row;
50
+ justify-content: space-between;
51
+ align-items: center;
52
+ width: 100%;
53
+
54
+ .alert__action {
55
+ margin-top: 0;
56
+ margin-left: var(--padding-small);
47
57
  }
48
58
  }
49
59
  }
50
60
  }
51
- }
61
+ }
@@ -1,7 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
2
-
3
2
  import CriticalCommsBanner from '.';
4
- import { withVariantConfig } from '../../.storybook/helpers';
5
3
 
6
4
  export default {
7
5
  component: CriticalCommsBanner,
@@ -18,21 +16,17 @@ export const Basic = {
18
16
  },
19
17
  };
20
18
 
21
- export const Variants: Story = {
19
+ export const Sentiments: Story = {
20
+ render: (args) => (
21
+ <>
22
+ <CriticalCommsBanner {...args} sentiment="negative" title="Your account is overdrawn" />
23
+ <CriticalCommsBanner {...args} sentiment="warning" title="Your account needs attention" />
24
+ <CriticalCommsBanner {...args} sentiment="neutral" title="Your transfer is being processed" />
25
+ </>
26
+ ),
22
27
  args: {
23
- title: 'Your account is overdrawn',
24
- subtitle: 'Add money within the next 30 days',
25
- action: { label: 'Take action', href: 'https://wise.com' },
26
- },
27
- ...withVariantConfig(['default', 'dark', 'rtl']),
28
- };
29
-
30
- export const Mobile: Story = {
31
- tags: ['!autodocs'],
32
- args: {
33
- title: 'Your account is overdrawn',
34
28
  subtitle: 'Add money within the next 30 days',
35
29
  action: { label: 'Take action', href: 'https://wise.com' },
30
+ className: 'm-b-1',
36
31
  },
37
- ...withVariantConfig(['default', 'dark', 'rtl', 'mobile']),
38
32
  };
@@ -0,0 +1,70 @@
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
+
3
+ import CriticalCommsBanner from '.';
4
+ import { withVariantConfig } from '../../.storybook/helpers';
5
+
6
+ export default {
7
+ component: CriticalCommsBanner,
8
+ title: 'Prompts/CriticalCommsBanner/tests',
9
+ tags: ['!autodocs'],
10
+ } satisfies Meta<typeof CriticalCommsBanner>;
11
+
12
+ type Story = StoryObj<typeof CriticalCommsBanner>;
13
+
14
+ export const Sentiments: Story = {
15
+ render: (args) => (
16
+ <>
17
+ <CriticalCommsBanner {...args} sentiment="negative" />
18
+ <CriticalCommsBanner {...args} sentiment="warning" />
19
+ <CriticalCommsBanner {...args} sentiment="neutral" />
20
+ </>
21
+ ),
22
+ args: {
23
+ subtitle: 'Add money within the next 30 days',
24
+ action: { label: 'Take action', href: 'https://wise.com' },
25
+ className: 'm-b-1',
26
+ },
27
+ ...withVariantConfig([
28
+ 'default',
29
+ 'dark',
30
+ 'bright-green',
31
+ 'forest-green',
32
+ 'business',
33
+ 'business--forest-green',
34
+ 'business--bright-green',
35
+ ]),
36
+ };
37
+
38
+ export const RTL: Story = {
39
+ render: (args) => (
40
+ <>
41
+ <CriticalCommsBanner {...args} sentiment="negative" />
42
+ <CriticalCommsBanner {...args} sentiment="warning" />
43
+ <CriticalCommsBanner {...args} sentiment="neutral" />
44
+ </>
45
+ ),
46
+ args: {
47
+ subtitle: 'Add money within the next 30 days',
48
+ action: { label: 'Take action', href: 'https://wise.com' },
49
+ className: 'm-b-1',
50
+ },
51
+ ...withVariantConfig(['rtl']),
52
+ };
53
+
54
+ export const Mobile: Story = {
55
+ args: {
56
+ subtitle: 'Add money within the next 30 days',
57
+ action: { label: 'Take action', href: 'https://wise.com' },
58
+ className: 'm-b-1',
59
+ },
60
+ ...withVariantConfig(['mobile']),
61
+ };
62
+
63
+ export const Zoom: Story = {
64
+ args: {
65
+ subtitle: 'Add money within the next 30 days',
66
+ action: { label: 'Take action', href: 'https://wise.com' },
67
+ className: 'm-b-1',
68
+ },
69
+ ...withVariantConfig(['400%']),
70
+ };
@@ -0,0 +1,66 @@
1
+ import { render, screen, mockMatchMedia } from '../test-utils';
2
+
3
+ import CriticalCommsBanner from './CriticalCommsBanner';
4
+
5
+ mockMatchMedia();
6
+
7
+ describe('CriticalCommsBanner', () => {
8
+ const defaultProps = {
9
+ title: 'Test title',
10
+ subtitle: 'Test subtitle',
11
+ action: { label: 'Take action', href: 'https://wise.com' },
12
+ };
13
+
14
+ it('renders with default negative sentiment', () => {
15
+ render(<CriticalCommsBanner {...defaultProps} />);
16
+
17
+ expect(screen.getByText('Test title')).toBeInTheDocument();
18
+ expect(screen.getByText('Test subtitle')).toBeInTheDocument();
19
+ expect(screen.getByTestId('alert')).toHaveClass('alert-negative');
20
+ });
21
+
22
+ it('renders the action', () => {
23
+ render(<CriticalCommsBanner {...defaultProps} />);
24
+
25
+ expect(screen.getByText('Take action')).toBeInTheDocument();
26
+ });
27
+
28
+ describe('sentiment variants', () => {
29
+ it('renders negative sentiment with correct alert type and icon', () => {
30
+ render(<CriticalCommsBanner {...defaultProps} sentiment="negative" />);
31
+
32
+ expect(screen.getByTestId('alert')).toHaveClass('alert-negative');
33
+ // Custom icon replaces the default StatusIcon
34
+ expect(screen.queryByTestId('status-icon')).not.toBeInTheDocument();
35
+ });
36
+
37
+ it('renders warning sentiment with correct alert type and icon', () => {
38
+ render(<CriticalCommsBanner {...defaultProps} sentiment="warning" />);
39
+
40
+ expect(screen.getByTestId('alert')).toHaveClass('alert-warning');
41
+ expect(screen.queryByTestId('status-icon')).not.toBeInTheDocument();
42
+ });
43
+
44
+ it('renders neutral sentiment with correct alert type and icon', () => {
45
+ render(<CriticalCommsBanner {...defaultProps} sentiment="neutral" />);
46
+
47
+ expect(screen.getByTestId('alert')).toHaveClass('alert-neutral');
48
+ expect(screen.queryByTestId('status-icon')).not.toBeInTheDocument();
49
+ });
50
+ });
51
+
52
+ it('wraps content in SentimentSurface with elevated emphasis', () => {
53
+ render(<CriticalCommsBanner {...defaultProps} sentiment="warning" />);
54
+
55
+ const surface = screen.getByTestId('alert').closest('.critical-comms');
56
+ expect(surface).toHaveClass('wds-sentiment-surface');
57
+ expect(surface).toHaveClass('wds-sentiment-surface-warning-elevated');
58
+ });
59
+
60
+ it('applies className to the wrapper', () => {
61
+ render(<CriticalCommsBanner {...defaultProps} className="custom-class" />);
62
+
63
+ const surface = screen.getByTestId('alert').closest('.critical-comms');
64
+ expect(surface).toHaveClass('custom-class');
65
+ });
66
+ });
@@ -1,5 +1,16 @@
1
- import Alert from '../alert';
1
+ import { Alert as AlertIcon, ClockBorderless as ClockIcon } from '@transferwise/icons';
2
2
  import { clsx } from 'clsx';
3
+ import { PropsWithChildren } from 'react';
4
+
5
+ import Alert from '../alert';
6
+ import { Sentiment } from '../common';
7
+ import Circle, { CircleProps } from '../common/circle';
8
+ import SentimentSurface from '../sentimentSurface';
9
+
10
+ export type CriticalCommsBannerSentiment =
11
+ | `${Sentiment.WARNING}`
12
+ | `${Sentiment.NEGATIVE}`
13
+ | `${Sentiment.NEUTRAL}`;
3
14
 
4
15
  export type CriticalCommsBannerProps = {
5
16
  title: string;
@@ -9,20 +20,58 @@ export type CriticalCommsBannerProps = {
9
20
  href?: string;
10
21
  onClick?: () => void;
11
22
  };
23
+ sentiment?: CriticalCommsBannerSentiment;
12
24
  className?: string;
13
25
  };
14
26
 
15
- function CriticalCommsBanner({ title, subtitle, action, className }: CriticalCommsBannerProps) {
27
+ const makeSurface = (sentiment: CriticalCommsBannerSentiment) => {
28
+ const Surface = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (
29
+ <SentimentSurface as="span" emphasis="elevated" sentiment={sentiment} {...props} />
30
+ );
31
+ Surface.displayName = `CriticalCommsSurface(${sentiment})`;
32
+ return Surface;
33
+ };
34
+
35
+ const iconBySentiment: Record<CriticalCommsBannerSentiment, React.ReactNode> = {
36
+ [Sentiment.NEGATIVE]: (
37
+ <Circle as={makeSurface(Sentiment.NEGATIVE)} size={32} className="status-circle negative">
38
+ <AlertIcon className="status-icon light" />
39
+ </Circle>
40
+ ),
41
+ [Sentiment.WARNING]: (
42
+ <Circle as={makeSurface(Sentiment.WARNING)} size={32} className="status-circle warning">
43
+ <AlertIcon className="status-icon dark" />
44
+ </Circle>
45
+ ),
46
+ [Sentiment.NEUTRAL]: (
47
+ <Circle as={makeSurface(Sentiment.NEUTRAL)} size={32} className="status-circle neutral">
48
+ <ClockIcon className="status-icon dark" />
49
+ </Circle>
50
+ ),
51
+ };
52
+
53
+ function CriticalCommsBanner({
54
+ title,
55
+ subtitle,
56
+ action,
57
+ sentiment = Sentiment.NEGATIVE,
58
+ className,
59
+ }: CriticalCommsBannerProps) {
16
60
  return (
17
- <div className={clsx('critical-comms', className)}>
61
+ <SentimentSurface
62
+ sentiment={sentiment}
63
+ emphasis="elevated"
64
+ className={clsx('critical-comms', className)}
65
+ >
18
66
  <Alert
19
67
  title={title}
20
68
  message={subtitle}
21
69
  action={{ onClick: action?.onClick, target: action?.href, text: action?.label }}
22
70
  className={className}
23
- type="warning"
71
+ type={sentiment}
72
+ icon={iconBySentiment[sentiment]}
24
73
  />
25
- </div>
74
+ </SentimentSurface>
26
75
  );
27
76
  }
28
77
 
@@ -1 +1,2 @@
1
1
  export { default } from './CriticalCommsBanner';
2
+ export type { CriticalCommsBannerProps } from './CriticalCommsBanner';
@@ -27,7 +27,9 @@ export interface DateInputProps {
27
27
  /** @deprecated Use `Field` wrapper or the `aria-labelledby` attribute instead. */
28
28
  'aria-label'?: string;
29
29
  'aria-labelledby'?: string;
30
+ /** @default false */
30
31
  disabled?: boolean;
32
+ /** @default 'md' */
31
33
  size?: SizeSmall | SizeMedium | SizeLarge;
32
34
  value?: Date | string;
33
35
  onChange: (value: string | null) => void;
@@ -38,7 +40,9 @@ export interface DateInputProps {
38
40
  monthLabel?: string;
39
41
  yearLabel?: string;
40
42
  yearAutoComplete?: string;
43
+ /** @default 'long' */
41
44
  monthFormat?: `${MonthFormat}`;
45
+ /** @default 'day-month-year' */
42
46
  mode?: `${DateMode}`;
43
47
  placeholders?: {
44
48
  day?: string;
@@ -46,6 +50,7 @@ export interface DateInputProps {
46
50
  year?: string;
47
51
  };
48
52
  id?: string;
53
+ /** @default {} */
49
54
  selectProps?: Partial<SelectInputProps<number | null>>;
50
55
  }
51
56
 
@@ -23,12 +23,18 @@ const dimmerManager = new DimmerManager();
23
23
 
24
24
  export type DimmerProps = CommonProps & {
25
25
  children?: ReactNode;
26
+ /** @default false */
26
27
  disableClickToClose?: boolean;
27
28
  contentPosition?: PositionTop | PositionCenter | PositionBottom;
29
+ /** @default false */
28
30
  fadeContentOnEnter?: boolean;
31
+ /** @default false */
29
32
  fadeContentOnExit?: boolean;
33
+ /** @default false */
30
34
  open?: boolean;
35
+ /** @default false */
31
36
  scrollable?: boolean;
37
+ /** @default false */
32
38
  transparent?: boolean;
33
39
  onClose?: (event: KeyboardEvent | MouseEvent) => void;
34
40
  onExited?: () => void;
@@ -21,9 +21,15 @@ export type DrawerProps = {
21
21
  footerContent?: React.ReactNode;
22
22
  /** The content to appear in the drawer header. */
23
23
  headerTitle?: React.ReactNode;
24
- /** The status of Drawer either open or not. */
24
+ /**
25
+ * The status of Drawer either open or not.
26
+ * @default false
27
+ */
25
28
  open?: boolean;
26
- /** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
29
+ /**
30
+ * The placement of Drawer on the screen either left or right. On mobile it will default to bottom.
31
+ * @default 'right'
32
+ */
27
33
  position?: `${Position.LEFT | Position.RIGHT | Position.BOTTOM}`;
28
34
  /** The action to perform on close click. */
29
35
  onClose?: (event: KeyboardEvent | React.MouseEvent) => void;
@@ -16,8 +16,9 @@ export type FieldProps = {
16
16
  id?: string | null;
17
17
  /** Should be specified unless the wrapped control has its own labeling mechanism, e.g. `Checkbox`. */
18
18
  label?: React.ReactNode;
19
+ /** @default true */
19
20
  required?: boolean;
20
- /** @deprecated use `description` prop instead */
21
+ /** @deprecated Use `description` prop instead. */
21
22
  hint?: React.ReactNode;
22
23
  message?: React.ReactNode;
23
24
  /**
@@ -27,11 +28,13 @@ export type FieldProps = {
27
28
  messageIconLabel?: string;
28
29
  /**
29
30
  * If true, shows a loading spinner in place of the message icon of the InlinePrompt
31
+ * @default false
30
32
  */
31
33
  messageLoading?: boolean;
32
34
  description?: React.ReactNode;
33
- /** @deprecated use `message` and `type={Sentiment.NEGATIVE}` prop instead */
35
+ /** @deprecated Use `message` and `type={Sentiment.NEGATIVE}` prop instead. */
34
36
  error?: React.ReactNode;
37
+ /** @default Sentiment.NEUTRAL */
35
38
  sentiment?: InlinePromptProps['sentiment'];
36
39
  className?: string;
37
40
  children?: React.ReactNode;
@@ -14,9 +14,12 @@ import IconButton from '../iconButton';
14
14
  import { ArrowLeft } from '@transferwise/icons';
15
15
 
16
16
  export interface FlowNavigationProps {
17
+ /** @default 0 */
17
18
  activeStep?: number;
18
19
  avatar?: React.ReactNode;
20
+ /** @default <Logo /> */
19
21
  logo?: React.ReactNode;
22
+ /** @default false */
20
23
  done?: boolean;
21
24
  /** Called when the close button is clicked. If not provided the close button won't show */
22
25
  onClose?: () => void;
@@ -29,13 +29,17 @@ export interface HeaderProps extends CommonProps {
29
29
  * If this condition is not met, a warning will be logged to the console.
30
30
  *
31
31
  * - Other valid values include standard heading tags (`h1` to `h6`) or `header`.
32
+ * @default 'h5'
32
33
  */
33
34
  as?: Heading | 'legend' | 'header';
34
35
 
35
36
  /** Required prop to set the title of the Header. */
36
37
  title: ReactNode;
37
38
 
38
- /** Optional prop to specify the level of the Header */
39
+ /**
40
+ * Optional prop to specify the level of the Header
41
+ * @default 'group'
42
+ */
39
43
  level?: 'section' | 'group';
40
44
 
41
45
  className?: string;
@@ -4,8 +4,11 @@ import Circle from '../common/circle';
4
4
  import { clsx } from 'clsx';
5
5
 
6
6
  export type Props = {
7
+ /** @default 48 */
7
8
  size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;
9
+ /** @default 'primary' */
8
10
  priority?: 'primary' | 'secondary' | 'tertiary' | 'minimal';
11
+ /** @default 'default' */
9
12
  type?: 'default' | 'negative';
10
13
  'data-testid'?: string;
11
14
  } & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick'> &
package/src/index.ts CHANGED
@@ -154,8 +154,9 @@ export { Chip, default as Chips } from './chips';
154
154
  export { default as CircularButton } from './circularButton';
155
155
  export { default as Option } from './common/Option';
156
156
  export { default as BottomSheet } from './common/bottomSheet';
157
- export { default as BaseCard } from './common/card';
157
+ export { default as BaseCard } from './common/baseCard';
158
158
  export { default as CriticalCommsBanner } from './criticalBanner';
159
+ export type { CriticalCommsBannerProps } from './criticalBanner';
159
160
  export { default as DateInput } from './dateInput';
160
161
  export { default as DateLookup } from './dateLookup';
161
162
  export { default as Decision } from './decision';
@@ -14,7 +14,7 @@ export type LegacyListItemProps = {
14
14
  };
15
15
 
16
16
  /**
17
- * @deprecated Please use `<ListItem />` instead.
17
+ * @deprecated Use `<ListItem />` instead.
18
18
  * @deprecatedSince 46.104.0
19
19
  * @see [Source](../listItem/ListItem.tsx)
20
20
  * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
package/src/list/List.tsx CHANGED
@@ -2,6 +2,7 @@ import { clsx } from 'clsx';
2
2
  import React from 'react';
3
3
 
4
4
  export interface ListProps {
5
+ /** @default 'ul' */
5
6
  as?: 'ul' | 'ol' | 'div';
6
7
  className?: string;
7
8
  children?: React.ReactNode;
@@ -13,6 +13,8 @@ export type ListItemButtonProps = Omit<
13
13
  */
14
14
  partiallyInteractive?: boolean;
15
15
  addonStart?: ButtonAddonIcon;
16
+ /** @default 'secondary-neutral' */
17
+ priority?: NewButtonProps['priority'];
16
18
  };
17
19
 
18
20
  /**
@@ -6,10 +6,12 @@ import { ListItemContext } from '../ListItemContext';
6
6
 
7
7
  export type ListItemIconButtonProps = Pick<
8
8
  IconButtonProps,
9
- 'priority' | 'type' | 'onClick' | 'href' | 'target' | 'aria-label'
9
+ 'type' | 'onClick' | 'href' | 'target' | 'aria-label'
10
10
  > & {
11
11
  children: ReactNode;
12
12
  partiallyInteractive?: boolean;
13
+ /** @default 'minimal' */
14
+ priority?: IconButtonProps['priority'];
13
15
  };
14
16
 
15
17
  /**
@@ -6,10 +6,12 @@ import { ListItemMediaSize } from '../ListItemContext';
6
6
  export type ListItemImageProps = Omit<ImageProps, 'stretch' | 'shrink' | 'id' | 'alt' | 'role'> & {
7
7
  /**
8
8
  * The size of square container for the image, matching available avatar sizes.
9
+ * @default 48
9
10
  */
10
11
  size?: ListItemMediaSize;
11
12
  /**
12
13
  * When unset, it will force `role="presentation"` on the image. Otherwise, the image will use its implicit img role.
14
+ * @default ''
13
15
  */
14
16
  alt?: string;
15
17
  };
@@ -599,7 +599,7 @@
599
599
  .wds-list-item.disabled--has-prompt-reason .wds-list-item-prompt {
600
600
  opacity: 0.93;
601
601
  }
602
- .wds-list-item-spotlight {
602
+ .wds-list-item-spotlight .wds-list-item-gridWrapper {
603
603
  padding-left: 12px;
604
604
  padding-left: var(--size-12);
605
605
  padding-right: 12px;
@@ -266,8 +266,10 @@
266
266
  }
267
267
 
268
268
  &-spotlight {
269
- padding-left: var(--size-12);
270
- padding-right: var(--size-12);
269
+ .wds-list-item-gridWrapper {
270
+ padding-left: var(--size-12);
271
+ padding-right: var(--size-12);
272
+ }
271
273
 
272
274
  &-active {
273
275
  background-color: var(--color-background-neutral);
@@ -45,6 +45,7 @@ export type ListItemControlProps =
45
45
  | ListItemSwitchProps;
46
46
 
47
47
  export type ListItemProps = {
48
+ /** @default 'li' */
48
49
  as?: 'li' | 'div';
49
50
  /**
50
51
  * Swaps vertical hierarchy of title and subtitle and their corresponding right values.
@@ -88,6 +89,7 @@ export type ListItemProps = {
88
89
  * `<ListItem.Navigation />`, <br/>
89
90
  * `<ListItem.Radio />`, or
90
91
  * `<ListItem.Switch />`
92
+ * @default null
91
93
  */
92
94
  control?: ReactNode;
93
95
  /**