@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
@@ -226,12 +226,12 @@
226
226
  .np-theme-platform.wds-sentiment-surface-success-elevated,
227
227
  .np-theme-personal--bright-green.wds-sentiment-surface-success-elevated,
228
228
  .np-theme-business--bright-green.wds-sentiment-surface-success-elevated {
229
- --color-sentiment-content-primary: #E2F6D5;
230
- --color-sentiment-content-primary-hover: #D3F2C0;
231
- --color-sentiment-content-primary-active: #C5EDAB;
232
- --color-sentiment-interactive-primary: #E2F6D5;
233
- --color-sentiment-interactive-primary-hover: #D3F2C0;
234
- --color-sentiment-interactive-primary-active: #C5EDAB;
229
+ --color-sentiment-content-primary: #CEF1B8;
230
+ --color-sentiment-content-primary-hover: #E0FFCC;
231
+ --color-sentiment-content-primary-active: #E1F4D4;
232
+ --color-sentiment-interactive-primary: #CEF1B8;
233
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
234
+ --color-sentiment-interactive-primary-active: #E1F4D4;
235
235
  --color-sentiment-interactive-secondary: #054D28;
236
236
  --color-sentiment-interactive-secondary-hover: #043A1E;
237
237
  --color-sentiment-interactive-secondary-active: #022614;
@@ -250,24 +250,24 @@
250
250
  .np-theme-personal--forest-green.wds-sentiment-surface-success-base,
251
251
  .np-theme-business--forest-green.wds-sentiment-surface-success-base,
252
252
  .np-theme-platform--forest-green.wds-sentiment-surface-success-base {
253
- --color-sentiment-content-primary: #BAE5A0;
254
- --color-sentiment-content-primary-hover: #C8EAB3;
255
- --color-sentiment-content-primary-active: #D6F0C7;
256
- --color-sentiment-interactive-primary: #BAE5A0;
257
- --color-sentiment-interactive-primary-hover: #C8EAB3;
258
- --color-sentiment-interactive-primary-active: #D6F0C7;
259
- --color-sentiment-interactive-secondary: #252C20;
260
- --color-sentiment-interactive-secondary-hover: #323B2B;
261
- --color-sentiment-interactive-secondary-active: #3E4A36;
262
- --color-sentiment-interactive-secondary-neutral: #37422F;
263
- --color-sentiment-interactive-secondary-neutral-hover: #46533B;
264
- --color-sentiment-interactive-secondary-neutral-active: #546548;
265
- --color-sentiment-interactive-control: #252C20;
266
- --color-sentiment-interactive-control-hover: #323B2B;
267
- --color-sentiment-interactive-control-active: #3E4A36;
268
- --color-sentiment-background-surface: #252C20;
269
- --color-sentiment-background-surface-hover: #323B2B;
270
- --color-sentiment-background-surface-active: #3E4A36;
253
+ --color-sentiment-content-primary: #CEF1B8;
254
+ --color-sentiment-content-primary-hover: #E0FFCC;
255
+ --color-sentiment-content-primary-active: #E1F4D4;
256
+ --color-sentiment-interactive-primary: #CEF1B8;
257
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
258
+ --color-sentiment-interactive-primary-active: #E1F4D4;
259
+ --color-sentiment-interactive-secondary: #054D28;
260
+ --color-sentiment-interactive-secondary-hover: #043A1E;
261
+ --color-sentiment-interactive-secondary-active: #022614;
262
+ --color-sentiment-interactive-secondary-neutral: #256A43;
263
+ --color-sentiment-interactive-secondary-neutral-hover: #2A794C;
264
+ --color-sentiment-interactive-secondary-neutral-active: #329057;
265
+ --color-sentiment-interactive-control: #054D28;
266
+ --color-sentiment-interactive-control-hover: #043A1E;
267
+ --color-sentiment-interactive-control-active: #022614;
268
+ --color-sentiment-background-surface: #054D28;
269
+ --color-sentiment-background-surface-hover: #043A1E;
270
+ --color-sentiment-background-surface-active: #022614;
271
271
  }
272
272
  .np-theme-personal--dark.wds-sentiment-surface-success-elevated,
273
273
  .np-theme-business--dark.wds-sentiment-surface-success-elevated,
@@ -448,18 +448,18 @@
448
448
  --color-sentiment-interactive-primary: #E0F7F7;
449
449
  --color-sentiment-interactive-primary-hover: #CAF1F1;
450
450
  --color-sentiment-interactive-primary-active: #B6ECEC;
451
- --color-sentiment-interactive-secondary: #0B312F;
452
- --color-sentiment-interactive-secondary-hover: #124F4C;
453
- --color-sentiment-interactive-secondary-active: #176460;
454
- --color-sentiment-interactive-secondary-neutral: #174E4D;
455
- --color-sentiment-interactive-secondary-neutral-hover: #1D6261;
456
- --color-sentiment-interactive-secondary-neutral-active: #237675;
457
- --color-sentiment-interactive-control: #0B312F;
458
- --color-sentiment-interactive-control-hover: #124F4C;
459
- --color-sentiment-interactive-control-active: #176460;
460
- --color-sentiment-background-surface: #0B312F;
461
- --color-sentiment-background-surface-hover: #124F4C;
462
- --color-sentiment-background-surface-active: #176460;
451
+ --color-sentiment-interactive-secondary: #054D4D;
452
+ --color-sentiment-interactive-secondary-hover: #043A3A;
453
+ --color-sentiment-interactive-secondary-active: #022626;
454
+ --color-sentiment-interactive-secondary-neutral: #1F6161;
455
+ --color-sentiment-interactive-secondary-neutral-hover: #247070;
456
+ --color-sentiment-interactive-secondary-neutral-active: #298080;
457
+ --color-sentiment-interactive-control: #054D4D;
458
+ --color-sentiment-interactive-control-hover: #043A3A;
459
+ --color-sentiment-interactive-control-active: #022626;
460
+ --color-sentiment-background-surface: #054D4D;
461
+ --color-sentiment-background-surface-hover: #043A3A;
462
+ --color-sentiment-background-surface-active: #022626;
463
463
  }
464
464
  .np-theme-personal--dark.wds-sentiment-surface-proposition-elevated,
465
465
  .np-theme-business--dark.wds-sentiment-surface-proposition-elevated,
@@ -485,37 +485,55 @@
485
485
  --color-sentiment-background-surface-hover: #CAF1F1;
486
486
  --color-sentiment-background-surface-active: #B6ECEC;
487
487
  }
488
- .np-theme-personal .critical-comms .alert-warning {
489
- color: var(--color-contrast-overlay);
490
- background-color: var(--color-sentiment-negative);
488
+ .critical-comms {
489
+ border-radius: 16px;
490
+ border-radius: var(--radius-medium);
491
+ overflow: hidden;
491
492
  }
492
- .np-theme-personal .critical-comms .alert-warning .np-text-title-body {
493
- color: var(--color-contrast-overlay);
493
+ .critical-comms .alert {
494
+ background-color: var(--color-sentiment-background-surface);
495
+ color: var(--color-sentiment-content-primary);
496
+ margin-bottom: 0;
497
+ }
498
+ .critical-comms .alert .np-text-title-body {
499
+ color: var(--color-sentiment-content-primary);
494
500
  }
495
- .np-theme-personal .critical-comms .status-circle.warning {
501
+ .critical-comms .status-circle.negative {
496
502
  background-color: #ffffff;
497
503
  background-color: var(--color-background-screen);
498
504
  }
499
- .np-theme-personal .critical-comms .status-circle.warning .status-icon {
500
- color: var(--color-contrast-theme);
505
+ .critical-comms .status-circle.negative .status-icon {
506
+ color: #37517e;
507
+ color: var(--color-content-primary);
501
508
  }
502
- .np-theme-personal .critical-comms .alert__message .alert__action {
509
+ .critical-comms .alert__message .alert__action {
503
510
  margin-top: 16px;
504
511
  margin-top: var(--size-16);
505
512
  }
506
- .np-theme-personal .critical-comms .wds-Button {
507
- --Button-background: var(--color-contrast-overlay);
508
- --Button-background-hover: var(--color-sentiment-negative-secondary-hover);
509
- --Button-background-active: var(--color-sentiment-negative-secondary-active);
513
+ .critical-comms .wds-Button {
514
+ --Button-color: var(--color-content-primary);
515
+ --Button-color-hover: var(--color-content-primary);
516
+ --Button-color-active: var(--color-content-primary);
517
+ --Button-background: var(--color-background-screen);
518
+ --Button-background-hover: var(--color-sentiment-interactive-primary-hover);
519
+ --Button-background-active: var(--color-sentiment-interactive-primary-active);
520
+ }
521
+ .critical-comms .alert-warning .wds-Button {
522
+ --Button-background-hover: var(--color-sentiment-interactive-secondary-neutral-hover);
523
+ --Button-background-active: var(--color-sentiment-interactive-secondary-neutral-active);
510
524
  }
511
525
  @media (min-width: 768px) {
512
- .np-theme-personal .critical-comms .alert-warning .alert__message {
526
+ .critical-comms .alert-warning .alert__message,
527
+ .critical-comms .alert-negative .alert__message,
528
+ .critical-comms .alert-neutral .alert__message {
513
529
  flex-direction: row;
514
530
  justify-content: space-between;
515
531
  align-items: center;
516
532
  width: 100%;
517
533
  }
518
- .np-theme-personal .critical-comms .alert-warning .alert__message .alert__action {
534
+ .critical-comms .alert-warning .alert__message .alert__action,
535
+ .critical-comms .alert-negative .alert__message .alert__action,
536
+ .critical-comms .alert-neutral .alert__message .alert__action {
519
537
  margin-top: 0;
520
538
  margin-left: 16px;
521
539
  margin-left: var(--padding-small);
@@ -1969,6 +1987,55 @@
1969
1987
  border-radius: var(--radius-full);
1970
1988
  box-shadow: inset 0 0 0 var(--circle-border-width) var(--circle-border-color);
1971
1989
  }
1990
+ /* @define Card */
1991
+ .np-Card {
1992
+ --Card-background-color: var(--color-background-neutral);
1993
+ --Card-border-radius: var(--size-32);
1994
+ --Card-flex-gap: var(--size-16);
1995
+ --Card-padding: var(--size-24);
1996
+ --Card-closeButton-position: var(--size-16);
1997
+ --Card-max-width: initial;
1998
+ display: flex;
1999
+ flex-direction: column;
2000
+ align-items: stretch;
2001
+ background-color: rgba(134,167,189,0.10196);
2002
+ background-color: var(--Card-background-color);
2003
+ border-radius: 32px;
2004
+ border-radius: var(--Card-border-radius);
2005
+ gap: 16px;
2006
+ gap: var(--Card-flex-gap);
2007
+ padding: 24px;
2008
+ padding: var(--Card-padding);
2009
+ position: relative;
2010
+ box-sizing: border-box;
2011
+ overflow: hidden;
2012
+ }
2013
+ @media (min-width: 576px) {
2014
+ .np-Card {
2015
+ max-width: var(--Card-max-width);
2016
+ }
2017
+ }
2018
+ .np-Card.is-disabled .np-Card-closeButton {
2019
+ cursor: not-allowed;
2020
+ }
2021
+ .np-theme-personal--dark .np-Card {
2022
+ --Card-background-color: var(--color-background-elevated);
2023
+ }
2024
+ .np-Card-closeButton {
2025
+ position: absolute;
2026
+ z-index: 100;
2027
+ top: var(--Card-closeButton-position);
2028
+ right: var(--Card-closeButton-position);
2029
+ }
2030
+ [dir="rtl"] .np-Card-closeButton {
2031
+ left: var(--Card-closeButton-position);
2032
+ right: auto;
2033
+ }
2034
+ .np-Card--small {
2035
+ --Card-border-radius: var(--size-16);
2036
+ --Card-closeButton-position: var(--size-8);
2037
+ --Card-padding: var(--size-16);
2038
+ }
1972
2039
  .np-bottom-sheet {
1973
2040
  border-radius: 10px 10px 0 0;
1974
2041
  }
@@ -2022,55 +2089,6 @@
2022
2089
  padding: 0 16px 16px;
2023
2090
  padding: 0 var(--size-16) var(--size-16);
2024
2091
  }
2025
- /* @define Card */
2026
- .np-Card {
2027
- --Card-background-color: var(--color-background-neutral);
2028
- --Card-border-radius: var(--size-32);
2029
- --Card-flex-gap: var(--size-16);
2030
- --Card-padding: var(--size-24);
2031
- --Card-closeButton-position: var(--size-16);
2032
- --Card-max-width: initial;
2033
- display: flex;
2034
- flex-direction: column;
2035
- align-items: stretch;
2036
- background-color: rgba(134,167,189,0.10196);
2037
- background-color: var(--Card-background-color);
2038
- border-radius: 32px;
2039
- border-radius: var(--Card-border-radius);
2040
- gap: 16px;
2041
- gap: var(--Card-flex-gap);
2042
- padding: 24px;
2043
- padding: var(--Card-padding);
2044
- position: relative;
2045
- box-sizing: border-box;
2046
- overflow: hidden;
2047
- }
2048
- @media (min-width: 576px) {
2049
- .np-Card {
2050
- max-width: var(--Card-max-width);
2051
- }
2052
- }
2053
- .np-Card.is-disabled .np-Card-closeButton {
2054
- cursor: not-allowed;
2055
- }
2056
- .np-theme-personal--dark .np-Card {
2057
- --Card-background-color: var(--color-background-elevated);
2058
- }
2059
- .np-Card-closeButton {
2060
- position: absolute;
2061
- z-index: 100;
2062
- top: var(--Card-closeButton-position);
2063
- right: var(--Card-closeButton-position);
2064
- }
2065
- [dir="rtl"] .np-Card-closeButton {
2066
- left: var(--Card-closeButton-position);
2067
- right: auto;
2068
- }
2069
- .np-Card--small {
2070
- --Card-border-radius: var(--size-16);
2071
- --Card-closeButton-position: var(--size-8);
2072
- --Card-padding: var(--size-16);
2073
- }
2074
2092
  .np-close-button {
2075
2093
  transition: color 0.15s ease-in-out;
2076
2094
  color: #00a2dd;
@@ -3692,7 +3710,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3692
3710
  .wds-list-item.disabled--has-prompt-reason .wds-list-item-prompt {
3693
3711
  opacity: 0.93;
3694
3712
  }
3695
- .wds-list-item-spotlight {
3713
+ .wds-list-item-spotlight .wds-list-item-gridWrapper {
3696
3714
  padding-left: 12px;
3697
3715
  padding-left: var(--size-12);
3698
3716
  padding-right: 12px;
@@ -226,12 +226,12 @@
226
226
  .np-theme-platform.wds-sentiment-surface-success-elevated,
227
227
  .np-theme-personal--bright-green.wds-sentiment-surface-success-elevated,
228
228
  .np-theme-business--bright-green.wds-sentiment-surface-success-elevated {
229
- --color-sentiment-content-primary: #E2F6D5;
230
- --color-sentiment-content-primary-hover: #D3F2C0;
231
- --color-sentiment-content-primary-active: #C5EDAB;
232
- --color-sentiment-interactive-primary: #E2F6D5;
233
- --color-sentiment-interactive-primary-hover: #D3F2C0;
234
- --color-sentiment-interactive-primary-active: #C5EDAB;
229
+ --color-sentiment-content-primary: #CEF1B8;
230
+ --color-sentiment-content-primary-hover: #E0FFCC;
231
+ --color-sentiment-content-primary-active: #E1F4D4;
232
+ --color-sentiment-interactive-primary: #CEF1B8;
233
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
234
+ --color-sentiment-interactive-primary-active: #E1F4D4;
235
235
  --color-sentiment-interactive-secondary: #054D28;
236
236
  --color-sentiment-interactive-secondary-hover: #043A1E;
237
237
  --color-sentiment-interactive-secondary-active: #022614;
@@ -250,24 +250,24 @@
250
250
  .np-theme-personal--forest-green.wds-sentiment-surface-success-base,
251
251
  .np-theme-business--forest-green.wds-sentiment-surface-success-base,
252
252
  .np-theme-platform--forest-green.wds-sentiment-surface-success-base {
253
- --color-sentiment-content-primary: #BAE5A0;
254
- --color-sentiment-content-primary-hover: #C8EAB3;
255
- --color-sentiment-content-primary-active: #D6F0C7;
256
- --color-sentiment-interactive-primary: #BAE5A0;
257
- --color-sentiment-interactive-primary-hover: #C8EAB3;
258
- --color-sentiment-interactive-primary-active: #D6F0C7;
259
- --color-sentiment-interactive-secondary: #252C20;
260
- --color-sentiment-interactive-secondary-hover: #323B2B;
261
- --color-sentiment-interactive-secondary-active: #3E4A36;
262
- --color-sentiment-interactive-secondary-neutral: #37422F;
263
- --color-sentiment-interactive-secondary-neutral-hover: #46533B;
264
- --color-sentiment-interactive-secondary-neutral-active: #546548;
265
- --color-sentiment-interactive-control: #252C20;
266
- --color-sentiment-interactive-control-hover: #323B2B;
267
- --color-sentiment-interactive-control-active: #3E4A36;
268
- --color-sentiment-background-surface: #252C20;
269
- --color-sentiment-background-surface-hover: #323B2B;
270
- --color-sentiment-background-surface-active: #3E4A36;
253
+ --color-sentiment-content-primary: #CEF1B8;
254
+ --color-sentiment-content-primary-hover: #E0FFCC;
255
+ --color-sentiment-content-primary-active: #E1F4D4;
256
+ --color-sentiment-interactive-primary: #CEF1B8;
257
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
258
+ --color-sentiment-interactive-primary-active: #E1F4D4;
259
+ --color-sentiment-interactive-secondary: #054D28;
260
+ --color-sentiment-interactive-secondary-hover: #043A1E;
261
+ --color-sentiment-interactive-secondary-active: #022614;
262
+ --color-sentiment-interactive-secondary-neutral: #256A43;
263
+ --color-sentiment-interactive-secondary-neutral-hover: #2A794C;
264
+ --color-sentiment-interactive-secondary-neutral-active: #329057;
265
+ --color-sentiment-interactive-control: #054D28;
266
+ --color-sentiment-interactive-control-hover: #043A1E;
267
+ --color-sentiment-interactive-control-active: #022614;
268
+ --color-sentiment-background-surface: #054D28;
269
+ --color-sentiment-background-surface-hover: #043A1E;
270
+ --color-sentiment-background-surface-active: #022614;
271
271
  }
272
272
  .np-theme-personal--dark.wds-sentiment-surface-success-elevated,
273
273
  .np-theme-business--dark.wds-sentiment-surface-success-elevated,
@@ -448,18 +448,18 @@
448
448
  --color-sentiment-interactive-primary: #E0F7F7;
449
449
  --color-sentiment-interactive-primary-hover: #CAF1F1;
450
450
  --color-sentiment-interactive-primary-active: #B6ECEC;
451
- --color-sentiment-interactive-secondary: #0B312F;
452
- --color-sentiment-interactive-secondary-hover: #124F4C;
453
- --color-sentiment-interactive-secondary-active: #176460;
454
- --color-sentiment-interactive-secondary-neutral: #174E4D;
455
- --color-sentiment-interactive-secondary-neutral-hover: #1D6261;
456
- --color-sentiment-interactive-secondary-neutral-active: #237675;
457
- --color-sentiment-interactive-control: #0B312F;
458
- --color-sentiment-interactive-control-hover: #124F4C;
459
- --color-sentiment-interactive-control-active: #176460;
460
- --color-sentiment-background-surface: #0B312F;
461
- --color-sentiment-background-surface-hover: #124F4C;
462
- --color-sentiment-background-surface-active: #176460;
451
+ --color-sentiment-interactive-secondary: #054D4D;
452
+ --color-sentiment-interactive-secondary-hover: #043A3A;
453
+ --color-sentiment-interactive-secondary-active: #022626;
454
+ --color-sentiment-interactive-secondary-neutral: #1F6161;
455
+ --color-sentiment-interactive-secondary-neutral-hover: #247070;
456
+ --color-sentiment-interactive-secondary-neutral-active: #298080;
457
+ --color-sentiment-interactive-control: #054D4D;
458
+ --color-sentiment-interactive-control-hover: #043A3A;
459
+ --color-sentiment-interactive-control-active: #022626;
460
+ --color-sentiment-background-surface: #054D4D;
461
+ --color-sentiment-background-surface-hover: #043A3A;
462
+ --color-sentiment-background-surface-active: #022626;
463
463
  }
464
464
  .np-theme-personal--dark.wds-sentiment-surface-proposition-elevated,
465
465
  .np-theme-business--dark.wds-sentiment-surface-proposition-elevated,
@@ -49,7 +49,7 @@ const statusMapping = {
49
49
  [status.Status.PENDING]: sentiment.Sentiment.PENDING
50
50
  };
51
51
  /**
52
- * @deprecated Please use `<ListItem />` instead.
52
+ * @deprecated Use `<ListItem />` instead.
53
53
  * @deprecatedSince 46.104.0
54
54
  * @see [Source](../listItem/ListItem.tsx)
55
55
  * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
@@ -1 +1 @@
1
- {"version":3,"file":"Summary.js","sources":["../../src/summary/Summary.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport {\n CheckCircleFill as CheckCircleIcon,\n ClockFill as PendingCircleIcon,\n} from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ElementType, cloneElement, ReactNode } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport Body from '../body';\nimport {\n Status,\n StatusDone,\n StatusNotDone,\n StatusPending,\n Size,\n Typography,\n Sentiment,\n} from '../common';\nimport Info, { InfoProps } from '../info';\nimport StatusIcon from '../statusIcon';\n\nimport messages from './Summary.messages';\nimport Link from '../link';\nimport type { AlertAction } from '../alert';\n\nconst BadgeIcons = {\n [Status.DONE]: CheckCircleIcon,\n [Status.PENDING]: PendingCircleIcon,\n};\n\nconst statusLabels = {\n [Status.NOT_DONE]: 'statusNotDone',\n [Status.DONE]: 'statusDone',\n [Status.PENDING]: 'statusPending',\n};\n\nconst statusMapping = {\n [Status.DONE]: Sentiment.POSITIVE,\n [Status.PENDING]: Sentiment.PENDING,\n};\n\nexport interface Props {\n /**\n * Action displayed at the bottom of the Summary\n */\n action?: AlertAction;\n /**\n * Decides which html element should wrap the Summary\n */\n as?: ElementType;\n /**\n * Extra classes applied to Summary\n */\n className?: string;\n /**\n * @deprecated please use description instead\n */\n content?: ReactNode;\n /**\n * Summary description\n */\n description?: ReactNode;\n /**\n * @deprecated please use info instead\n */\n help?: {\n content: ReactNode;\n title?: ReactNode;\n };\n /**\n * Infos displayed on help Icon click inside Popover or Modal\n */\n info?: Pick<InfoProps, 'aria-label' | 'content' | 'onClick' | 'presentation' | 'title'>;\n /**\n * @deprecated please use icon instead\n */\n illustration?: ReactNode;\n /**\n * Main Summary Icon\n */\n icon?: ReactNode;\n /**\n * Decides the badge applied to Icon\n */\n status?: StatusNotDone | StatusDone | StatusPending;\n /**\n * Summary title\n */\n title: ReactNode;\n}\n\n/**\n * @deprecated Please use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst Summary = ({\n action,\n as: Element = 'div',\n className,\n content = null,\n description = content,\n help,\n icon,\n illustration = null,\n info = help,\n status,\n title,\n}: Props) => {\n const intl = useIntl();\n\n let media = illustration;\n if (icon) {\n // @ts-expect-error if icon is present it has props and size prop\n const iconSize = icon?.props?.size as number;\n\n media =\n iconSize !== 24\n ? // @ts-expect-error we need icon to adjust it's size\n cloneElement(icon, { size: 24 })\n : icon;\n }\n // @ts-expect-error Badge can be null, this is handled in code\n const Badge = status && BadgeIcons[status];\n\n return (\n <Element\n className={clsx('np-summary d-flex align-items-start', className)}\n // @ts-expect-error we check whether `status` is not null before index `statusLabels` and `messages`\n aria-label={status && intl.formatMessage(messages[statusLabels[status]])}\n >\n {icon && (\n <div className=\"np-summary__icon\">\n {media}\n {Badge && (\n <div>\n {/* @ts-expect-error it's okey to pass `undefined` into `sentiment` prop */}\n <StatusIcon size={Size.SMALL} sentiment={statusMapping[status]} />\n </div>\n )}\n </div>\n )}\n <div className={`np-summary__body ${icon ? 'm-l-2' : ''}`}>\n <div className=\"np-summary__title d-flex\">\n <Body\n as=\"span\"\n role=\"heading\"\n aria-level={6}\n type={Typography.BODY_LARGE_BOLD}\n className=\"text-primary text-overflow-wrap m-b-1\"\n >\n {title}\n </Body>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-1 hidden-xs\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </div>\n\n {description && (\n <Body\n as=\"span\"\n type={Typography.BODY_DEFAULT}\n className={`d-block text-overflow-wrap ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}\n >\n {description}\n </Body>\n )}\n {action && (\n <Link\n href={action.href}\n target={action.target}\n className=\"np-summary__action\"\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\n )}\n </div>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </Element>\n );\n};\n\nexport default Summary;\n"],"names":["BadgeIcons","Status","DONE","CheckCircleIcon","PENDING","PendingCircleIcon","statusLabels","NOT_DONE","statusMapping","Sentiment","POSITIVE","Summary","action","as","Element","className","content","description","help","icon","illustration","info","status","title","intl","useIntl","media","iconSize","props","size","cloneElement","Badge","_jsxs","clsx","formatMessage","messages","children","_jsx","StatusIcon","Size","SMALL","sentiment","Body","role","type","Typography","BODY_LARGE_BOLD","Info","presentation","LARGE","onClick","BODY_DEFAULT","Link","href","target","text"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA0BA,MAAMA,UAAU,GAAG;AACjB,EAAA,CAACC,aAAM,CAACC,IAAI,GAAGC,qBAAe;EAC9B,CAACF,aAAM,CAACG,OAAO,GAAGC;CACnB;AAED,MAAMC,YAAY,GAAG;AACnB,EAAA,CAACL,aAAM,CAACM,QAAQ,GAAG,eAAe;AAClC,EAAA,CAACN,aAAM,CAACC,IAAI,GAAG,YAAY;EAC3B,CAACD,aAAM,CAACG,OAAO,GAAG;CACnB;AAED,MAAMI,aAAa,GAAG;AACpB,EAAA,CAACP,aAAM,CAACC,IAAI,GAAGO,mBAAS,CAACC,QAAQ;AACjC,EAAA,CAACT,aAAM,CAACG,OAAO,GAAGK,mBAAS,CAACL;CAC7B;AAoDD;;;;;;;AAOG;AACH,MAAMO,OAAO,GAAGA,CAAC;EACfC,MAAM;EACNC,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,SAAS;AACTC,EAAAA,OAAO,GAAG,IAAI;AACdC,EAAAA,WAAW,GAAGD,OAAO;EACrBE,IAAI;EACJC,IAAI;AACJC,EAAAA,YAAY,GAAG,IAAI;AACnBC,EAAAA,IAAI,GAAGH,IAAI;EACXI,MAAM;AACNC,EAAAA;AAAK,CACC,KAAI;AACV,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EAEtB,IAAIC,KAAK,GAAGN,YAAY;AACxB,EAAA,IAAID,IAAI,EAAE;AACR;AACA,IAAA,MAAMQ,QAAQ,GAAGR,IAAI,EAAES,KAAK,EAAEC,IAAc;IAE5CH,KAAK,GACHC,QAAQ,KAAK,EAAE;AAAA;AACX;IACAG,kBAAY,CAACX,IAAI,EAAE;AAAEU,MAAAA,IAAI,EAAE;KAAI,CAAC,GAChCV,IAAI;AACZ,EAAA;AACA;AACA,EAAA,MAAMY,KAAK,GAAGT,MA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* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport {\n CheckCircleFill as CheckCircleIcon,\n ClockFill as PendingCircleIcon,\n} from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ElementType, cloneElement, ReactNode } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport Body from '../body';\nimport {\n Status,\n StatusDone,\n StatusNotDone,\n StatusPending,\n Size,\n Typography,\n Sentiment,\n} from '../common';\nimport Info, { InfoProps } from '../info';\nimport StatusIcon from '../statusIcon';\n\nimport messages from './Summary.messages';\nimport Link from '../link';\nimport type { AlertAction } from '../alert';\n\nconst BadgeIcons = {\n [Status.DONE]: CheckCircleIcon,\n [Status.PENDING]: PendingCircleIcon,\n};\n\nconst statusLabels = {\n [Status.NOT_DONE]: 'statusNotDone',\n [Status.DONE]: 'statusDone',\n [Status.PENDING]: 'statusPending',\n};\n\nconst statusMapping = {\n [Status.DONE]: Sentiment.POSITIVE,\n [Status.PENDING]: Sentiment.PENDING,\n};\n\nexport interface Props {\n /**\n * Action displayed at the bottom of the Summary\n */\n action?: AlertAction;\n /**\n * Decides which html element should wrap the Summary\n * @default 'div'\n */\n as?: ElementType;\n /**\n * Extra classes applied to Summary\n */\n className?: string;\n /**\n * @deprecated Use `description` instead.\n * @default null\n */\n content?: ReactNode;\n /**\n * Summary description\n */\n description?: ReactNode;\n /**\n * @deprecated Use `info` instead.\n */\n help?: {\n content: ReactNode;\n title?: ReactNode;\n };\n /**\n * Infos displayed on help Icon click inside Popover or Modal\n */\n info?: Pick<InfoProps, 'aria-label' | 'content' | 'onClick' | 'presentation' | 'title'>;\n /**\n * @deprecated Use `icon` instead.\n * @default null\n */\n illustration?: ReactNode;\n /**\n * Main Summary Icon\n */\n icon?: ReactNode;\n /**\n * Decides the badge applied to Icon\n */\n status?: StatusNotDone | StatusDone | StatusPending;\n /**\n * Summary title\n */\n title: ReactNode;\n}\n\n/**\n * @deprecated Use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst Summary = ({\n action,\n as: Element = 'div',\n className,\n content = null,\n description = content,\n help,\n icon,\n illustration = null,\n info = help,\n status,\n title,\n}: Props) => {\n const intl = useIntl();\n\n let media = illustration;\n if (icon) {\n // @ts-expect-error if icon is present it has props and size prop\n const iconSize = icon?.props?.size as number;\n\n media =\n iconSize !== 24\n ? // @ts-expect-error we need icon to adjust it's size\n cloneElement(icon, { size: 24 })\n : icon;\n }\n // @ts-expect-error Badge can be null, this is handled in code\n const Badge = status && BadgeIcons[status];\n\n return (\n <Element\n className={clsx('np-summary d-flex align-items-start', className)}\n // @ts-expect-error we check whether `status` is not null before index `statusLabels` and `messages`\n aria-label={status && intl.formatMessage(messages[statusLabels[status]])}\n >\n {icon && (\n <div className=\"np-summary__icon\">\n {media}\n {Badge && (\n <div>\n {/* @ts-expect-error it's okey to pass `undefined` into `sentiment` prop */}\n <StatusIcon size={Size.SMALL} sentiment={statusMapping[status]} />\n </div>\n )}\n </div>\n )}\n <div className={`np-summary__body ${icon ? 'm-l-2' : ''}`}>\n <div className=\"np-summary__title d-flex\">\n <Body\n as=\"span\"\n role=\"heading\"\n aria-level={6}\n type={Typography.BODY_LARGE_BOLD}\n className=\"text-primary text-overflow-wrap m-b-1\"\n >\n {title}\n </Body>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-1 hidden-xs\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </div>\n\n {description && (\n <Body\n as=\"span\"\n type={Typography.BODY_DEFAULT}\n className={`d-block text-overflow-wrap ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}\n >\n {description}\n </Body>\n )}\n {action && (\n <Link\n href={action.href}\n target={action.target}\n className=\"np-summary__action\"\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\n )}\n </div>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </Element>\n );\n};\n\nexport default Summary;\n"],"names":["BadgeIcons","Status","DONE","CheckCircleIcon","PENDING","PendingCircleIcon","statusLabels","NOT_DONE","statusMapping","Sentiment","POSITIVE","Summary","action","as","Element","className","content","description","help","icon","illustration","info","status","title","intl","useIntl","media","iconSize","props","size","cloneElement","Badge","_jsxs","clsx","formatMessage","messages","children","_jsx","StatusIcon","Size","SMALL","sentiment","Body","role","type","Typography","BODY_LARGE_BOLD","Info","presentation","LARGE","onClick","BODY_DEFAULT","Link","href","target","text"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA0BA,MAAMA,UAAU,GAAG;AACjB,EAAA,CAACC,aAAM,CAACC,IAAI,GAAGC,qBAAe;EAC9B,CAACF,aAAM,CAACG,OAAO,GAAGC;CACnB;AAED,MAAMC,YAAY,GAAG;AACnB,EAAA,CAACL,aAAM,CAACM,QAAQ,GAAG,eAAe;AAClC,EAAA,CAACN,aAAM,CAACC,IAAI,GAAG,YAAY;EAC3B,CAACD,aAAM,CAACG,OAAO,GAAG;CACnB;AAED,MAAMI,aAAa,GAAG;AACpB,EAAA,CAACP,aAAM,CAACC,IAAI,GAAGO,mBAAS,CAACC,QAAQ;AACjC,EAAA,CAACT,aAAM,CAACG,OAAO,GAAGK,mBAAS,CAACL;CAC7B;AAuDD;;;;;;;AAOG;AACH,MAAMO,OAAO,GAAGA,CAAC;EACfC,MAAM;EACNC,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,SAAS;AACTC,EAAAA,OAAO,GAAG,IAAI;AACdC,EAAAA,WAA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AAQ;QAAAd,QAAA,EAEvBxB,MAAM,CAAC2C;AAAI,OACR,CACP;AAAA,KACE,CACL,EAAClC,IAAI,iBACHgB,cAAA,CAACU,YAAI,EAAA;MACH,YAAA,EAAY1B,IAAI,CAAC,YAAY,CAAE;AAC/BN,MAAAA,SAAS,EAAC,+CAA+C;MACzDC,OAAO,EAAEK,IAAI,CAACL,OAAQ;MACtBgC,YAAY,EAAE3B,IAAI,CAAC2B,YAAa;MAChCnB,IAAI,EAAEU,SAAI,CAACU,KAAM;MACjB1B,KAAK,EAAEF,IAAI,CAACE,KAAM;MAClB2B,OAAO,EAAE7B,IAAI,CAAC6B;AAAQ,KAAA,CAEzB;AAAA,GACM,CAAC;AAEd;;;;"}
@@ -45,7 +45,7 @@ const statusMapping = {
45
45
  [Status.PENDING]: Sentiment.PENDING
46
46
  };
47
47
  /**
48
- * @deprecated Please use `<ListItem />` instead.
48
+ * @deprecated Use `<ListItem />` instead.
49
49
  * @deprecatedSince 46.104.0
50
50
  * @see [Source](../listItem/ListItem.tsx)
51
51
  * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
@@ -1 +1 @@
1
- {"version":3,"file":"Summary.mjs","sources":["../../src/summary/Summary.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport {\n CheckCircleFill as CheckCircleIcon,\n ClockFill as PendingCircleIcon,\n} from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ElementType, cloneElement, ReactNode } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport Body from '../body';\nimport {\n Status,\n StatusDone,\n StatusNotDone,\n StatusPending,\n Size,\n Typography,\n Sentiment,\n} from '../common';\nimport Info, { InfoProps } from '../info';\nimport StatusIcon from '../statusIcon';\n\nimport messages from './Summary.messages';\nimport Link from '../link';\nimport type { AlertAction } from '../alert';\n\nconst BadgeIcons = {\n [Status.DONE]: CheckCircleIcon,\n [Status.PENDING]: PendingCircleIcon,\n};\n\nconst statusLabels = {\n [Status.NOT_DONE]: 'statusNotDone',\n [Status.DONE]: 'statusDone',\n [Status.PENDING]: 'statusPending',\n};\n\nconst statusMapping = {\n [Status.DONE]: Sentiment.POSITIVE,\n [Status.PENDING]: Sentiment.PENDING,\n};\n\nexport interface Props {\n /**\n * Action displayed at the bottom of the Summary\n */\n action?: AlertAction;\n /**\n * Decides which html element should wrap the Summary\n */\n as?: ElementType;\n /**\n * Extra classes applied to Summary\n */\n className?: string;\n /**\n * @deprecated please use description instead\n */\n content?: ReactNode;\n /**\n * Summary description\n */\n description?: ReactNode;\n /**\n * @deprecated please use info instead\n */\n help?: {\n content: ReactNode;\n title?: ReactNode;\n };\n /**\n * Infos displayed on help Icon click inside Popover or Modal\n */\n info?: Pick<InfoProps, 'aria-label' | 'content' | 'onClick' | 'presentation' | 'title'>;\n /**\n * @deprecated please use icon instead\n */\n illustration?: ReactNode;\n /**\n * Main Summary Icon\n */\n icon?: ReactNode;\n /**\n * Decides the badge applied to Icon\n */\n status?: StatusNotDone | StatusDone | StatusPending;\n /**\n * Summary title\n */\n title: ReactNode;\n}\n\n/**\n * @deprecated Please use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst Summary = ({\n action,\n as: Element = 'div',\n className,\n content = null,\n description = content,\n help,\n icon,\n illustration = null,\n info = help,\n status,\n title,\n}: Props) => {\n const intl = useIntl();\n\n let media = illustration;\n if (icon) {\n // @ts-expect-error if icon is present it has props and size prop\n const iconSize = icon?.props?.size as number;\n\n media =\n iconSize !== 24\n ? // @ts-expect-error we need icon to adjust it's size\n cloneElement(icon, { size: 24 })\n : icon;\n }\n // @ts-expect-error Badge can be null, this is handled in code\n const Badge = status && BadgeIcons[status];\n\n return (\n <Element\n className={clsx('np-summary d-flex align-items-start', className)}\n // @ts-expect-error we check whether `status` is not null before index `statusLabels` and `messages`\n aria-label={status && intl.formatMessage(messages[statusLabels[status]])}\n >\n {icon && (\n <div className=\"np-summary__icon\">\n {media}\n {Badge && (\n <div>\n {/* @ts-expect-error it's okey to pass `undefined` into `sentiment` prop */}\n <StatusIcon size={Size.SMALL} sentiment={statusMapping[status]} />\n </div>\n )}\n </div>\n )}\n <div className={`np-summary__body ${icon ? 'm-l-2' : ''}`}>\n <div className=\"np-summary__title d-flex\">\n <Body\n as=\"span\"\n role=\"heading\"\n aria-level={6}\n type={Typography.BODY_LARGE_BOLD}\n className=\"text-primary text-overflow-wrap m-b-1\"\n >\n {title}\n </Body>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-1 hidden-xs\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </div>\n\n {description && (\n <Body\n as=\"span\"\n type={Typography.BODY_DEFAULT}\n className={`d-block text-overflow-wrap ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}\n >\n {description}\n </Body>\n )}\n {action && (\n <Link\n href={action.href}\n target={action.target}\n className=\"np-summary__action\"\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\n )}\n </div>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </Element>\n );\n};\n\nexport default Summary;\n"],"names":["BadgeIcons","Status","DONE","CheckCircleIcon","PENDING","PendingCircleIcon","statusLabels","NOT_DONE","statusMapping","Sentiment","POSITIVE","Summary","action","as","Element","className","content","description","help","icon","illustration","info","status","title","intl","useIntl","media","iconSize","props","size","cloneElement","Badge","_jsxs","clsx","formatMessage","messages","children","_jsx","StatusIcon","Size","SMALL","sentiment","Body","role","type","Typography","BODY_LARGE_BOLD","Info","presentation","LARGE","onClick","BODY_DEFAULT","Link","href","target","text"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA0BA,MAAMA,UAAU,GAAG;AACjB,EAAA,CAACC,MAAM,CAACC,IAAI,GAAGC,eAAe;EAC9B,CAACF,MAAM,CAACG,OAAO,GAAGC;CACnB;AAED,MAAMC,YAAY,GAAG;AACnB,EAAA,CAACL,MAAM,CAACM,QAAQ,GAAG,eAAe;AAClC,EAAA,CAACN,MAAM,CAACC,IAAI,GAAG,YAAY;EAC3B,CAACD,MAAM,CAACG,OAAO,GAAG;CACnB;AAED,MAAMI,aAAa,GAAG;AACpB,EAAA,CAACP,MAAM,CAACC,IAAI,GAAGO,SAAS,CAACC,QAAQ;AACjC,EAAA,CAACT,MAAM,CAACG,OAAO,GAAGK,SAAS,CAACL;CAC7B;AAoDD;;;;;;;AAOG;AACH,MAAMO,OAAO,GAAGA,CAAC;EACfC,MAAM;EACNC,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,SAAS;AACTC,EAAAA,OAAO,GAAG,IAAI;AACdC,EAAAA,WAAW,GAAGD,OAAO;EACrBE,IAAI;EACJC,IAAI;AACJC,EAAAA,YAAY,GAAG,IAAI;AACnBC,EAAAA,IAAI,GAAGH,IAAI;EACXI,MAAM;AACNC,EAAAA;AAAK,CACC,KAAI;AACV,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EAEtB,IAAIC,KAAK,GAAGN,YAAY;AACxB,EAAA,IAAID,IAAI,EAAE;AACR;AACA,IAAA,MAAMQ,QAAQ,GAAGR,IAAI,EAAES,KAAK,EAAEC,IAAc;IAE5CH,KAAK,GACHC,QAAQ,KAAK,EAAE;AAAA;AACX;IACAG,YAAY,CAACX,IAAI,EAAE;AAAEU,MAAAA,IAAI,EAAE;KAAI,CAAC,GAChCV,IAAI;AACZ,EAAA;AACA;AACA,EAAA,MAAMY,KAAK,GAAGT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/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport {\n CheckCircleFill as CheckCircleIcon,\n ClockFill as PendingCircleIcon,\n} from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ElementType, cloneElement, ReactNode } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport Body from '../body';\nimport {\n Status,\n StatusDone,\n StatusNotDone,\n StatusPending,\n Size,\n Typography,\n Sentiment,\n} from '../common';\nimport Info, { InfoProps } from '../info';\nimport StatusIcon from '../statusIcon';\n\nimport messages from './Summary.messages';\nimport Link from '../link';\nimport type { AlertAction } from '../alert';\n\nconst BadgeIcons = {\n [Status.DONE]: CheckCircleIcon,\n [Status.PENDING]: PendingCircleIcon,\n};\n\nconst statusLabels = {\n [Status.NOT_DONE]: 'statusNotDone',\n [Status.DONE]: 'statusDone',\n [Status.PENDING]: 'statusPending',\n};\n\nconst statusMapping = {\n [Status.DONE]: Sentiment.POSITIVE,\n [Status.PENDING]: Sentiment.PENDING,\n};\n\nexport interface Props {\n /**\n * Action displayed at the bottom of the Summary\n */\n action?: AlertAction;\n /**\n * Decides which html element should wrap the Summary\n * @default 'div'\n */\n as?: ElementType;\n /**\n * Extra classes applied to Summary\n */\n className?: string;\n /**\n * @deprecated Use `description` instead.\n * @default null\n */\n content?: ReactNode;\n /**\n * Summary description\n */\n description?: ReactNode;\n /**\n * @deprecated Use `info` instead.\n */\n help?: {\n content: ReactNode;\n title?: ReactNode;\n };\n /**\n * Infos displayed on help Icon click inside Popover or Modal\n */\n info?: Pick<InfoProps, 'aria-label' | 'content' | 'onClick' | 'presentation' | 'title'>;\n /**\n * @deprecated Use `icon` instead.\n * @default null\n */\n illustration?: ReactNode;\n /**\n * Main Summary Icon\n */\n icon?: ReactNode;\n /**\n * Decides the badge applied to Icon\n */\n status?: StatusNotDone | StatusDone | StatusPending;\n /**\n * Summary title\n */\n title: ReactNode;\n}\n\n/**\n * @deprecated Use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst Summary = ({\n action,\n as: Element = 'div',\n className,\n content = null,\n description = content,\n help,\n icon,\n illustration = null,\n info = help,\n status,\n title,\n}: Props) => {\n const intl = useIntl();\n\n let media = illustration;\n if (icon) {\n // @ts-expect-error if icon is present it has props and size prop\n const iconSize = icon?.props?.size as number;\n\n media =\n iconSize !== 24\n ? // @ts-expect-error we need icon to adjust it's size\n cloneElement(icon, { size: 24 })\n : icon;\n }\n // @ts-expect-error Badge can be null, this is handled in code\n const Badge = status && BadgeIcons[status];\n\n return (\n <Element\n className={clsx('np-summary d-flex align-items-start', className)}\n // @ts-expect-error we check whether `status` is not null before index `statusLabels` and `messages`\n aria-label={status && intl.formatMessage(messages[statusLabels[status]])}\n >\n {icon && (\n <div className=\"np-summary__icon\">\n {media}\n {Badge && (\n <div>\n {/* @ts-expect-error it's okey to pass `undefined` into `sentiment` prop */}\n <StatusIcon size={Size.SMALL} sentiment={statusMapping[status]} />\n </div>\n )}\n </div>\n )}\n <div className={`np-summary__body ${icon ? 'm-l-2' : ''}`}>\n <div className=\"np-summary__title d-flex\">\n <Body\n as=\"span\"\n role=\"heading\"\n aria-level={6}\n type={Typography.BODY_LARGE_BOLD}\n className=\"text-primary text-overflow-wrap m-b-1\"\n >\n {title}\n </Body>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-1 hidden-xs\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </div>\n\n {description && (\n <Body\n as=\"span\"\n type={Typography.BODY_DEFAULT}\n className={`d-block text-overflow-wrap ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}\n >\n {description}\n </Body>\n )}\n {action && (\n <Link\n href={action.href}\n target={action.target}\n className=\"np-summary__action\"\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\n )}\n </div>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </Element>\n );\n};\n\nexport default Summary;\n"],"names":["BadgeIcons","Status","DONE","CheckCircleIcon","PENDING","PendingCircleIcon","statusLabels","NOT_DONE","statusMapping","Sentiment","POSITIVE","Summary","action","as","Element","className","content","description","help","icon","illustration","info","status","title","intl","useIntl","media","iconSize","props","size","cloneElement","Badge","_jsxs","clsx","formatMessage","messages","children","_jsx","StatusIcon","Size","SMALL","sentiment","Body","role","type","Typography","BODY_LARGE_BOLD","Info","presentation","LARGE","onClick","BODY_DEFAULT","Link","href","target","text"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA0BA,MAAMA,UAAU,GAAG;AACjB,EAAA,CAACC,MAAM,CAACC,IAAI,GAAGC,eAAe;EAC9B,CAACF,MAAM,CAACG,OAAO,GAAGC;CACnB;AAED,MAAMC,YAAY,GAAG;AACnB,EAAA,CAACL,MAAM,CAACM,QAAQ,GAAG,eAAe;AAClC,EAAA,CAACN,MAAM,CAACC,IAAI,GAAG,YAAY;EAC3B,CAACD,MAAM,CAACG,OAAO,GAAG;CACnB;AAED,MAAMI,aAAa,GAAG;AACpB,EAAA,CAACP,MAAM,CAACC,IAAI,GAAGO,SAAS,CAACC,QAAQ;AACjC,EAAA,CAACT,MAAM,CAACG,OAAO,GAAGK,SAAS,CAACL;CAC7B;AAuDD;;;;;;;AAOG;AACH,MAAMO,OAAO,GAAGA,CAAC;EACfC,MAAM;EACNC,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,SAAS;AACTC,EAAAA,OAAO,GAAG,IAAI;AACdC,EAAAA,WAAW,GAAG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AAA,EAEvBxB,MAAM,CAAC2C;AAAI,OACR,CACP;AAAA,KACE,CACL,EAAClC,IAAI,iBACHgB,GAAA,CAACU,IAAI,EAAA;MACH,YAAA,EAAY1B,IAAI,CAAC,YAAY,CAAE;AAC/BN,MAAAA,SAAS,EAAC,+CAA+C;MACzDC,OAAO,EAAEK,IAAI,CAACL,OAAQ;MACtBgC,YAAY,EAAE3B,IAAI,CAAC2B,YAAa;MAChCnB,IAAI,EAAEU,IAAI,CAACU,KAAM;MACjB1B,KAAK,EAAEF,IAAI,CAACE,KAAM;MAClB2B,OAAO,EAAE7B,IAAI,CAAC6B;AAAQ,KAAA,CAEzB;AAAA,GACM,CAAC;AAEd;;;;"}
@@ -14,7 +14,7 @@ const stopPropagation = event => {
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)
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchOption.js","sources":["../../src/switchOption/SwitchOption.tsx"],"sourcesContent":["import { MouseEvent } from 'react';\n\nimport Option from '../common/Option';\nimport Switch from '../switch';\n\nexport type SwitchOptionProps = {\n checked?: boolean;\n complex?: boolean;\n content?: React.ReactNode;\n disabled?: boolean;\n showMediaCircle?: boolean;\n showMediaAtAllSizes?: boolean;\n isContainerAligned?: boolean;\n id?: string;\n media?: React.ReactNode;\n onChange: (newValue: boolean) => void;\n title: React.ReactNode;\n 'aria-label': string;\n};\n\nconst stopPropagation = (event?: MouseEvent<HTMLSpanElement>) => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n event.nativeEvent?.stopImmediatePropagation?.();\n }\n};\n\n/**\n * @deprecated Please use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst SwitchOption = ({\n checked,\n complex,\n content,\n disabled,\n id,\n media,\n onChange,\n title,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n 'aria-label': ariaLabel,\n}: SwitchOptionProps) => {\n const sharedProps = {\n media,\n title,\n content,\n complex,\n disabled,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n };\n const toggle = (event?: MouseEvent<HTMLSpanElement>) => {\n stopPropagation(event);\n if (disabled) {\n return;\n }\n\n onChange(!checked);\n };\n\n return (\n <Option\n {...sharedProps}\n className=\"np-switch-option\"\n button={\n <Switch\n id={id}\n checked={checked}\n disabled={disabled}\n aria-label={ariaLabel}\n onClick={toggle}\n />\n }\n onClick={toggle}\n />\n );\n};\n\nexport default SwitchOption;\n"],"names":["stopPropagation","event","preventDefault","nativeEvent","stopImmediatePropagation","SwitchOption","checked","complex","content","disabled","id","media","onChange","title","showMediaCircle","showMediaAtAllSizes","isContainerAligned","ariaLabel","sharedProps","toggle","_jsx","Option","className","button","Switch","onClick"],"mappings":";;;;;;;;AAoBA,MAAMA,eAAe,GAAIC,KAAmC,IAAI;AAC9D,EAAA,IAAIA,KAAK,EAAE;IACTA,KAAK,CAACD,eAAe,EAAE;IACvBC,KAAK,CAACC,cAAc,EAAE;AACtBD,IAAAA,KAAK,CAACE,WAAW,EAAEC,wBAAwB,IAAI;AACjD,EAAA;AACF,CAAC;AAED;;;;;;;AAOG;AACH,MAAMC,YAAY,GAAGA,CAAC;EACpBC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,eAAe;EACfC,mBAAmB;EACnBC,kBAAkB;AAClB,EAAA,YAAY,EAAEC;AAAS,CACL,KAAI;AACtB,EAAA,MAAMC,WAAW,GAAG;IAClBP,KAAK;IACLE,KAAK;IACLL,OAAO;IACPD,OAAO;IACPE,QAAQ;IACRK,eAAe;IACfC,mBAAmB;AACnBC,IAAAA;GACD;EACD,MAAMG,MAAM,GAAIlB,KAAmC,IAAI;IACrDD,eAAe,CAACC,KAAK,CAAC;AACtB,IAAA,IAAIQ,QAAQ,EAAE;AACZ,MAAA;AACF,IAAA;IAEAG,QAAQ,CAAC,CAACN,OAAO,CAAC;EACpB,CAAC;EAED,oBACEc,cAAA,CAACC,cAAM,EAAA;AAAA,IAAA,GACDH,WAAW;AACfI,IAAAA,SAAS,EAAC,kBAAkB;IAC5BC,MAAM,eACJH,cAAA,CAACI,cAAM,EAAA;AACLd,MAAAA,EAAE,EAAEA,EAAG;AACPJ,MAAAA,OAAO,EAAEA,OAAQ;AACjBG,MAAAA,QAAQ,EAAEA,QAAS;AACnB,MAAA,YAAA,EAAYQ,SAAU;AACtBQ,MAAAA,OAAO,EAAEN;AAAO,KAAA,CAEnB;AACDM,IAAAA,OAAO,EAAEN;AAAO,GAAA,CAChB;AAEN;;;;"}
1
+ {"version":3,"file":"SwitchOption.js","sources":["../../src/switchOption/SwitchOption.tsx"],"sourcesContent":["import { MouseEvent } from 'react';\n\nimport Option from '../common/Option';\nimport Switch from '../switch';\n\nexport type SwitchOptionProps = {\n checked?: boolean;\n complex?: boolean;\n content?: React.ReactNode;\n disabled?: boolean;\n showMediaCircle?: boolean;\n showMediaAtAllSizes?: boolean;\n isContainerAligned?: boolean;\n id?: string;\n media?: React.ReactNode;\n onChange: (newValue: boolean) => void;\n title: React.ReactNode;\n 'aria-label': string;\n};\n\nconst stopPropagation = (event?: MouseEvent<HTMLSpanElement>) => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n event.nativeEvent?.stopImmediatePropagation?.();\n }\n};\n\n/**\n * @deprecated Use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst SwitchOption = ({\n checked,\n complex,\n content,\n disabled,\n id,\n media,\n onChange,\n title,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n 'aria-label': ariaLabel,\n}: SwitchOptionProps) => {\n const sharedProps = {\n media,\n title,\n content,\n complex,\n disabled,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n };\n const toggle = (event?: MouseEvent<HTMLSpanElement>) => {\n stopPropagation(event);\n if (disabled) {\n return;\n }\n\n onChange(!checked);\n };\n\n return (\n <Option\n {...sharedProps}\n className=\"np-switch-option\"\n button={\n <Switch\n id={id}\n checked={checked}\n disabled={disabled}\n aria-label={ariaLabel}\n onClick={toggle}\n />\n }\n onClick={toggle}\n />\n );\n};\n\nexport default SwitchOption;\n"],"names":["stopPropagation","event","preventDefault","nativeEvent","stopImmediatePropagation","SwitchOption","checked","complex","content","disabled","id","media","onChange","title","showMediaCircle","showMediaAtAllSizes","isContainerAligned","ariaLabel","sharedProps","toggle","_jsx","Option","className","button","Switch","onClick"],"mappings":";;;;;;;;AAoBA,MAAMA,eAAe,GAAIC,KAAmC,IAAI;AAC9D,EAAA,IAAIA,KAAK,EAAE;IACTA,KAAK,CAACD,eAAe,EAAE;IACvBC,KAAK,CAACC,cAAc,EAAE;AACtBD,IAAAA,KAAK,CAACE,WAAW,EAAEC,wBAAwB,IAAI;AACjD,EAAA;AACF,CAAC;AAED;;;;;;;AAOG;AACH,MAAMC,YAAY,GAAGA,CAAC;EACpBC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,eAAe;EACfC,mBAAmB;EACnBC,kBAAkB;AAClB,EAAA,YAAY,EAAEC;AAAS,CACL,KAAI;AACtB,EAAA,MAAMC,WAAW,GAAG;IAClBP,KAAK;IACLE,KAAK;IACLL,OAAO;IACPD,OAAO;IACPE,QAAQ;IACRK,eAAe;IACfC,mBAAmB;AACnBC,IAAAA;GACD;EACD,MAAMG,MAAM,GAAIlB,KAAmC,IAAI;IACrDD,eAAe,CAACC,KAAK,CAAC;AACtB,IAAA,IAAIQ,QAAQ,EAAE;AACZ,MAAA;AACF,IAAA;IAEAG,QAAQ,CAAC,CAACN,OAAO,CAAC;EACpB,CAAC;EAED,oBACEc,cAAA,CAACC,cAAM,EAAA;AAAA,IAAA,GACDH,WAAW;AACfI,IAAAA,SAAS,EAAC,kBAAkB;IAC5BC,MAAM,eACJH,cAAA,CAACI,cAAM,EAAA;AACLd,MAAAA,EAAE,EAAEA,EAAG;AACPJ,MAAAA,OAAO,EAAEA,OAAQ;AACjBG,MAAAA,QAAQ,EAAEA,QAAS;AACnB,MAAA,YAAA,EAAYQ,SAAU;AACtBQ,MAAAA,OAAO,EAAEN;AAAO,KAAA,CAEnB;AACDM,IAAAA,OAAO,EAAEN;AAAO,GAAA,CAChB;AAEN;;;;"}
@@ -10,7 +10,7 @@ const stopPropagation = event => {
10
10
  }
11
11
  };
12
12
  /**
13
- * @deprecated Please use `<ListItem />` instead.
13
+ * @deprecated Use `<ListItem />` instead.
14
14
  * @deprecatedSince 46.104.0
15
15
  * @see [Source](../listItem/ListItem.tsx)
16
16
  * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchOption.mjs","sources":["../../src/switchOption/SwitchOption.tsx"],"sourcesContent":["import { MouseEvent } from 'react';\n\nimport Option from '../common/Option';\nimport Switch from '../switch';\n\nexport type SwitchOptionProps = {\n checked?: boolean;\n complex?: boolean;\n content?: React.ReactNode;\n disabled?: boolean;\n showMediaCircle?: boolean;\n showMediaAtAllSizes?: boolean;\n isContainerAligned?: boolean;\n id?: string;\n media?: React.ReactNode;\n onChange: (newValue: boolean) => void;\n title: React.ReactNode;\n 'aria-label': string;\n};\n\nconst stopPropagation = (event?: MouseEvent<HTMLSpanElement>) => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n event.nativeEvent?.stopImmediatePropagation?.();\n }\n};\n\n/**\n * @deprecated Please use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst SwitchOption = ({\n checked,\n complex,\n content,\n disabled,\n id,\n media,\n onChange,\n title,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n 'aria-label': ariaLabel,\n}: SwitchOptionProps) => {\n const sharedProps = {\n media,\n title,\n content,\n complex,\n disabled,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n };\n const toggle = (event?: MouseEvent<HTMLSpanElement>) => {\n stopPropagation(event);\n if (disabled) {\n return;\n }\n\n onChange(!checked);\n };\n\n return (\n <Option\n {...sharedProps}\n className=\"np-switch-option\"\n button={\n <Switch\n id={id}\n checked={checked}\n disabled={disabled}\n aria-label={ariaLabel}\n onClick={toggle}\n />\n }\n onClick={toggle}\n />\n );\n};\n\nexport default SwitchOption;\n"],"names":["stopPropagation","event","preventDefault","nativeEvent","stopImmediatePropagation","SwitchOption","checked","complex","content","disabled","id","media","onChange","title","showMediaCircle","showMediaAtAllSizes","isContainerAligned","ariaLabel","sharedProps","toggle","_jsx","Option","className","button","Switch","onClick"],"mappings":";;;;AAoBA,MAAMA,eAAe,GAAIC,KAAmC,IAAI;AAC9D,EAAA,IAAIA,KAAK,EAAE;IACTA,KAAK,CAACD,eAAe,EAAE;IACvBC,KAAK,CAACC,cAAc,EAAE;AACtBD,IAAAA,KAAK,CAACE,WAAW,EAAEC,wBAAwB,IAAI;AACjD,EAAA;AACF,CAAC;AAED;;;;;;;AAOG;AACH,MAAMC,YAAY,GAAGA,CAAC;EACpBC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,eAAe;EACfC,mBAAmB;EACnBC,kBAAkB;AAClB,EAAA,YAAY,EAAEC;AAAS,CACL,KAAI;AACtB,EAAA,MAAMC,WAAW,GAAG;IAClBP,KAAK;IACLE,KAAK;IACLL,OAAO;IACPD,OAAO;IACPE,QAAQ;IACRK,eAAe;IACfC,mBAAmB;AACnBC,IAAAA;GACD;EACD,MAAMG,MAAM,GAAIlB,KAAmC,IAAI;IACrDD,eAAe,CAACC,KAAK,CAAC;AACtB,IAAA,IAAIQ,QAAQ,EAAE;AACZ,MAAA;AACF,IAAA;IAEAG,QAAQ,CAAC,CAACN,OAAO,CAAC;EACpB,CAAC;EAED,oBACEc,GAAA,CAACC,MAAM,EAAA;AAAA,IAAA,GACDH,WAAW;AACfI,IAAAA,SAAS,EAAC,kBAAkB;IAC5BC,MAAM,eACJH,GAAA,CAACI,MAAM,EAAA;AACLd,MAAAA,EAAE,EAAEA,EAAG;AACPJ,MAAAA,OAAO,EAAEA,OAAQ;AACjBG,MAAAA,QAAQ,EAAEA,QAAS;AACnB,MAAA,YAAA,EAAYQ,SAAU;AACtBQ,MAAAA,OAAO,EAAEN;AAAO,KAAA,CAEnB;AACDM,IAAAA,OAAO,EAAEN;AAAO,GAAA,CAChB;AAEN;;;;"}
1
+ {"version":3,"file":"SwitchOption.mjs","sources":["../../src/switchOption/SwitchOption.tsx"],"sourcesContent":["import { MouseEvent } from 'react';\n\nimport Option from '../common/Option';\nimport Switch from '../switch';\n\nexport type SwitchOptionProps = {\n checked?: boolean;\n complex?: boolean;\n content?: React.ReactNode;\n disabled?: boolean;\n showMediaCircle?: boolean;\n showMediaAtAllSizes?: boolean;\n isContainerAligned?: boolean;\n id?: string;\n media?: React.ReactNode;\n onChange: (newValue: boolean) => void;\n title: React.ReactNode;\n 'aria-label': string;\n};\n\nconst stopPropagation = (event?: MouseEvent<HTMLSpanElement>) => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n event.nativeEvent?.stopImmediatePropagation?.();\n }\n};\n\n/**\n * @deprecated Use `<ListItem />` instead.\n * @deprecatedSince 46.104.0\n * @see [Source](../listItem/ListItem.tsx)\n * @see [Storybook](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n * @see [Design docs](https://wise.design/components/list-item)\n * @see [Release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes)\n */\nconst SwitchOption = ({\n checked,\n complex,\n content,\n disabled,\n id,\n media,\n onChange,\n title,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n 'aria-label': ariaLabel,\n}: SwitchOptionProps) => {\n const sharedProps = {\n media,\n title,\n content,\n complex,\n disabled,\n showMediaCircle,\n showMediaAtAllSizes,\n isContainerAligned,\n };\n const toggle = (event?: MouseEvent<HTMLSpanElement>) => {\n stopPropagation(event);\n if (disabled) {\n return;\n }\n\n onChange(!checked);\n };\n\n return (\n <Option\n {...sharedProps}\n className=\"np-switch-option\"\n button={\n <Switch\n id={id}\n checked={checked}\n disabled={disabled}\n aria-label={ariaLabel}\n onClick={toggle}\n />\n }\n onClick={toggle}\n />\n );\n};\n\nexport default SwitchOption;\n"],"names":["stopPropagation","event","preventDefault","nativeEvent","stopImmediatePropagation","SwitchOption","checked","complex","content","disabled","id","media","onChange","title","showMediaCircle","showMediaAtAllSizes","isContainerAligned","ariaLabel","sharedProps","toggle","_jsx","Option","className","button","Switch","onClick"],"mappings":";;;;AAoBA,MAAMA,eAAe,GAAIC,KAAmC,IAAI;AAC9D,EAAA,IAAIA,KAAK,EAAE;IACTA,KAAK,CAACD,eAAe,EAAE;IACvBC,KAAK,CAACC,cAAc,EAAE;AACtBD,IAAAA,KAAK,CAACE,WAAW,EAAEC,wBAAwB,IAAI;AACjD,EAAA;AACF,CAAC;AAED;;;;;;;AAOG;AACH,MAAMC,YAAY,GAAGA,CAAC;EACpBC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,eAAe;EACfC,mBAAmB;EACnBC,kBAAkB;AAClB,EAAA,YAAY,EAAEC;AAAS,CACL,KAAI;AACtB,EAAA,MAAMC,WAAW,GAAG;IAClBP,KAAK;IACLE,KAAK;IACLL,OAAO;IACPD,OAAO;IACPE,QAAQ;IACRK,eAAe;IACfC,mBAAmB;AACnBC,IAAAA;GACD;EACD,MAAMG,MAAM,GAAIlB,KAAmC,IAAI;IACrDD,eAAe,CAACC,KAAK,CAAC;AACtB,IAAA,IAAIQ,QAAQ,EAAE;AACZ,MAAA;AACF,IAAA;IAEAG,QAAQ,CAAC,CAACN,OAAO,CAAC;EACpB,CAAC;EAED,oBACEc,GAAA,CAACC,MAAM,EAAA;AAAA,IAAA,GACDH,WAAW;AACfI,IAAAA,SAAS,EAAC,kBAAkB;IAC5BC,MAAM,eACJH,GAAA,CAACI,MAAM,EAAA;AACLd,MAAAA,EAAE,EAAEA,EAAG;AACPJ,MAAAA,OAAO,EAAEA,OAAQ;AACjBG,MAAAA,QAAQ,EAAEA,QAAS;AACnB,MAAA,YAAA,EAAYQ,SAAU;AACtBQ,MAAAA,OAAO,EAAEN;AAAO,KAAA,CAEnB;AACDM,IAAAA,OAAO,EAAEN;AAAO,GAAA,CAChB;AAEN;;;;"}