@transferwise/components 0.0.0-experimental-29d0f94 → 0.0.0-experimental-4b1de0a

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 (319) hide show
  1. package/build/button/Button.js +1 -0
  2. package/build/button/Button.js.map +1 -1
  3. package/build/button/Button.mjs +1 -0
  4. package/build/button/Button.mjs.map +1 -1
  5. package/build/common/RadioButton/RadioButton.js +5 -2
  6. package/build/common/RadioButton/RadioButton.js.map +1 -1
  7. package/build/common/RadioButton/RadioButton.mjs +5 -2
  8. package/build/common/RadioButton/RadioButton.mjs.map +1 -1
  9. package/build/common/initials.js +1 -4
  10. package/build/common/initials.js.map +1 -1
  11. package/build/common/initials.mjs +1 -4
  12. package/build/common/initials.mjs.map +1 -1
  13. package/build/i18n/de.json +0 -2
  14. package/build/i18n/de.json.js +0 -2
  15. package/build/i18n/de.json.js.map +1 -1
  16. package/build/i18n/de.json.mjs +0 -2
  17. package/build/i18n/de.json.mjs.map +1 -1
  18. package/build/i18n/fr.json +0 -2
  19. package/build/i18n/fr.json.js +0 -2
  20. package/build/i18n/fr.json.js.map +1 -1
  21. package/build/i18n/fr.json.mjs +0 -2
  22. package/build/i18n/fr.json.mjs.map +1 -1
  23. package/build/i18n/hu.json +0 -2
  24. package/build/i18n/hu.json.js +0 -2
  25. package/build/i18n/hu.json.js.map +1 -1
  26. package/build/i18n/hu.json.mjs +0 -2
  27. package/build/i18n/hu.json.mjs.map +1 -1
  28. package/build/i18n/it.json +0 -2
  29. package/build/i18n/it.json.js +0 -2
  30. package/build/i18n/it.json.js.map +1 -1
  31. package/build/i18n/it.json.mjs +0 -2
  32. package/build/i18n/it.json.mjs.map +1 -1
  33. package/build/i18n/ja.json +0 -2
  34. package/build/i18n/ja.json.js +0 -2
  35. package/build/i18n/ja.json.js.map +1 -1
  36. package/build/i18n/ja.json.mjs +0 -2
  37. package/build/i18n/ja.json.mjs.map +1 -1
  38. package/build/i18n/pl.json +0 -2
  39. package/build/i18n/pl.json.js +0 -2
  40. package/build/i18n/pl.json.js.map +1 -1
  41. package/build/i18n/pl.json.mjs +0 -2
  42. package/build/i18n/pl.json.mjs.map +1 -1
  43. package/build/i18n/ro.json +0 -2
  44. package/build/i18n/ro.json.js +0 -2
  45. package/build/i18n/ro.json.js.map +1 -1
  46. package/build/i18n/ro.json.mjs +0 -2
  47. package/build/i18n/ro.json.mjs.map +1 -1
  48. package/build/i18n/ru.json +0 -2
  49. package/build/i18n/ru.json.js +0 -2
  50. package/build/i18n/ru.json.js.map +1 -1
  51. package/build/i18n/ru.json.mjs +0 -2
  52. package/build/i18n/ru.json.mjs.map +1 -1
  53. package/build/i18n/tr.json +0 -2
  54. package/build/i18n/tr.json.js +0 -2
  55. package/build/i18n/tr.json.js.map +1 -1
  56. package/build/i18n/tr.json.mjs +0 -2
  57. package/build/i18n/tr.json.mjs.map +1 -1
  58. package/build/i18n/zh-CN.json +0 -2
  59. package/build/i18n/zh-CN.json.js +0 -2
  60. package/build/i18n/zh-CN.json.js.map +1 -1
  61. package/build/i18n/zh-CN.json.mjs +0 -2
  62. package/build/i18n/zh-CN.json.mjs.map +1 -1
  63. package/build/i18n/zh-HK.json +0 -2
  64. package/build/i18n/zh-HK.json.js +0 -2
  65. package/build/i18n/zh-HK.json.js.map +1 -1
  66. package/build/i18n/zh-HK.json.mjs +0 -2
  67. package/build/i18n/zh-HK.json.mjs.map +1 -1
  68. package/build/iconButton/IconButton.js.map +1 -1
  69. package/build/iconButton/IconButton.mjs.map +1 -1
  70. package/build/image/Image.js.map +1 -1
  71. package/build/image/Image.mjs.map +1 -1
  72. package/build/index.js +2 -0
  73. package/build/index.js.map +1 -1
  74. package/build/index.mjs +1 -0
  75. package/build/index.mjs.map +1 -1
  76. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +56 -0
  77. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -0
  78. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +54 -0
  79. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -0
  80. package/build/listItem/AvatarLayout/ListItemAvatarLayout.js +23 -0
  81. package/build/listItem/AvatarLayout/ListItemAvatarLayout.js.map +1 -0
  82. package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs +21 -0
  83. package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs.map +1 -0
  84. package/build/listItem/AvatarView/ListItemAvatarView.js +23 -0
  85. package/build/listItem/AvatarView/ListItemAvatarView.js.map +1 -0
  86. package/build/listItem/AvatarView/ListItemAvatarView.mjs +21 -0
  87. package/build/listItem/AvatarView/ListItemAvatarView.mjs.map +1 -0
  88. package/build/listItem/Button/ListItemButton.js +43 -0
  89. package/build/listItem/Button/ListItemButton.js.map +1 -0
  90. package/build/listItem/Button/ListItemButton.mjs +41 -0
  91. package/build/listItem/Button/ListItemButton.mjs.map +1 -0
  92. package/build/listItem/Checkbox/ListItemCheckbox.js +30 -0
  93. package/build/listItem/Checkbox/ListItemCheckbox.js.map +1 -0
  94. package/build/listItem/Checkbox/ListItemCheckbox.mjs +28 -0
  95. package/build/listItem/Checkbox/ListItemCheckbox.mjs.map +1 -0
  96. package/build/listItem/IconButton/ListItemIconButton.js +42 -0
  97. package/build/listItem/IconButton/ListItemIconButton.js.map +1 -0
  98. package/build/listItem/IconButton/ListItemIconButton.mjs +40 -0
  99. package/build/listItem/IconButton/ListItemIconButton.mjs.map +1 -0
  100. package/build/listItem/Image/ListItemImage.js +31 -0
  101. package/build/listItem/Image/ListItemImage.js.map +1 -0
  102. package/build/listItem/Image/ListItemImage.mjs +29 -0
  103. package/build/listItem/Image/ListItemImage.mjs.map +1 -0
  104. package/build/listItem/ListItem.js +312 -0
  105. package/build/listItem/ListItem.js.map +1 -0
  106. package/build/listItem/ListItem.mjs +307 -0
  107. package/build/listItem/ListItem.mjs.map +1 -0
  108. package/build/listItem/ListItemContext.js +8 -0
  109. package/build/listItem/ListItemContext.js.map +1 -0
  110. package/build/listItem/ListItemContext.mjs +6 -0
  111. package/build/listItem/ListItemContext.mjs.map +1 -0
  112. package/build/listItem/Navigation/ListItemNavigation.js +45 -0
  113. package/build/listItem/Navigation/ListItemNavigation.js.map +1 -0
  114. package/build/listItem/Navigation/ListItemNavigation.mjs +43 -0
  115. package/build/listItem/Navigation/ListItemNavigation.mjs.map +1 -0
  116. package/build/listItem/Prompt/ListItemPrompt.js +59 -0
  117. package/build/listItem/Prompt/ListItemPrompt.js.map +1 -0
  118. package/build/listItem/Prompt/ListItemPrompt.mjs +54 -0
  119. package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -0
  120. package/build/listItem/Radio/ListItemRadio.js +30 -0
  121. package/build/listItem/Radio/ListItemRadio.js.map +1 -0
  122. package/build/listItem/Radio/ListItemRadio.mjs +28 -0
  123. package/build/listItem/Radio/ListItemRadio.mjs.map +1 -0
  124. package/build/listItem/Switch/ListItemSwitch.js +30 -0
  125. package/build/listItem/Switch/ListItemSwitch.js.map +1 -0
  126. package/build/listItem/Switch/ListItemSwitch.mjs +28 -0
  127. package/build/listItem/Switch/ListItemSwitch.mjs.map +1 -0
  128. package/build/listItem/useListItemControl.js +22 -0
  129. package/build/listItem/useListItemControl.js.map +1 -0
  130. package/build/listItem/useListItemControl.mjs +20 -0
  131. package/build/listItem/useListItemControl.mjs.map +1 -0
  132. package/build/listItem/useListItemMedia.js +21 -0
  133. package/build/listItem/useListItemMedia.js.map +1 -0
  134. package/build/listItem/useListItemMedia.mjs +19 -0
  135. package/build/listItem/useListItemMedia.mjs.map +1 -0
  136. package/build/main.css +773 -1
  137. package/build/styles/avatarView/AvatarView.css +3 -1
  138. package/build/styles/listItem/ListItem.css +770 -0
  139. package/build/styles/listItem/ListItem.grid.css +370 -0
  140. package/build/styles/main.css +773 -1
  141. package/build/switch/Switch.js +2 -0
  142. package/build/switch/Switch.js.map +1 -1
  143. package/build/switch/Switch.mjs +2 -0
  144. package/build/switch/Switch.mjs.map +1 -1
  145. package/build/test-utils/assets/placeholder-landscape.svg +1 -0
  146. package/build/test-utils/assets/placeholder-portrait.svg +1 -0
  147. package/build/types/button/Button.d.ts.map +1 -1
  148. package/build/types/button/Button.types.d.ts +1 -1
  149. package/build/types/button/Button.types.d.ts.map +1 -1
  150. package/build/types/button/index.d.ts +1 -1
  151. package/build/types/button/index.d.ts.map +1 -1
  152. package/build/types/common/RadioButton/RadioButton.d.ts +3 -1
  153. package/build/types/common/RadioButton/RadioButton.d.ts.map +1 -1
  154. package/build/types/common/initials.d.ts.map +1 -1
  155. package/build/types/iconButton/IconButton.d.ts +2 -2
  156. package/build/types/iconButton/IconButton.d.ts.map +1 -1
  157. package/build/types/image/Image.d.ts +3 -0
  158. package/build/types/image/Image.d.ts.map +1 -1
  159. package/build/types/image/index.d.ts +1 -0
  160. package/build/types/image/index.d.ts.map +1 -1
  161. package/build/types/index.d.ts +2 -0
  162. package/build/types/index.d.ts.map +1 -1
  163. package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts +15 -0
  164. package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts.map +1 -0
  165. package/build/types/listItem/AdditionalInfo/index.d.ts +3 -0
  166. package/build/types/listItem/AdditionalInfo/index.d.ts.map +1 -0
  167. package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts +18 -0
  168. package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts.map +1 -0
  169. package/build/types/listItem/AvatarLayout/index.d.ts +3 -0
  170. package/build/types/listItem/AvatarLayout/index.d.ts.map +1 -0
  171. package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts +16 -0
  172. package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts.map +1 -0
  173. package/build/types/listItem/AvatarView/index.d.ts +3 -0
  174. package/build/types/listItem/AvatarView/index.d.ts.map +1 -0
  175. package/build/types/listItem/Button/ListItemButton.d.ts +20 -0
  176. package/build/types/listItem/Button/ListItemButton.d.ts.map +1 -0
  177. package/build/types/listItem/Button/index.d.ts +3 -0
  178. package/build/types/listItem/Button/index.d.ts.map +1 -0
  179. package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts +14 -0
  180. package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts.map +1 -0
  181. package/build/types/listItem/Checkbox/index.d.ts +3 -0
  182. package/build/types/listItem/Checkbox/index.d.ts.map +1 -0
  183. package/build/types/listItem/IconButton/ListItemIconButton.d.ts +18 -0
  184. package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +1 -0
  185. package/build/types/listItem/IconButton/index.d.ts +3 -0
  186. package/build/types/listItem/IconButton/index.d.ts.map +1 -0
  187. package/build/types/listItem/Image/ListItemImage.d.ts +25 -0
  188. package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -0
  189. package/build/types/listItem/Image/index.d.ts +3 -0
  190. package/build/types/listItem/Image/index.d.ts.map +1 -0
  191. package/build/types/listItem/ListItem.d.ts +113 -0
  192. package/build/types/listItem/ListItem.d.ts.map +1 -0
  193. package/build/types/listItem/ListItemContext.d.ts +22 -0
  194. package/build/types/listItem/ListItemContext.d.ts.map +1 -0
  195. package/build/types/listItem/Navigation/ListItemNavigation.d.ts +15 -0
  196. package/build/types/listItem/Navigation/ListItemNavigation.d.ts.map +1 -0
  197. package/build/types/listItem/Navigation/index.d.ts +3 -0
  198. package/build/types/listItem/Navigation/index.d.ts.map +1 -0
  199. package/build/types/listItem/Prompt/ListItemPrompt.d.ts +16 -0
  200. package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -0
  201. package/build/types/listItem/Prompt/index.d.ts +3 -0
  202. package/build/types/listItem/Prompt/index.d.ts.map +1 -0
  203. package/build/types/listItem/Radio/ListItemRadio.d.ts +14 -0
  204. package/build/types/listItem/Radio/ListItemRadio.d.ts.map +1 -0
  205. package/build/types/listItem/Radio/index.d.ts +3 -0
  206. package/build/types/listItem/Radio/index.d.ts.map +1 -0
  207. package/build/types/listItem/Switch/ListItemSwitch.d.ts +14 -0
  208. package/build/types/listItem/Switch/ListItemSwitch.d.ts.map +1 -0
  209. package/build/types/listItem/Switch/index.d.ts +3 -0
  210. package/build/types/listItem/Switch/index.d.ts.map +1 -0
  211. package/build/types/listItem/_stories/helpers.d.ts +27 -0
  212. package/build/types/listItem/_stories/helpers.d.ts.map +1 -0
  213. package/build/types/listItem/_stories/subcomponents.d.ts +18 -0
  214. package/build/types/listItem/_stories/subcomponents.d.ts.map +1 -0
  215. package/build/types/listItem/index.d.ts +14 -0
  216. package/build/types/listItem/index.d.ts.map +1 -0
  217. package/build/types/listItem/test-utils.d.ts +7 -0
  218. package/build/types/listItem/test-utils.d.ts.map +1 -0
  219. package/build/types/listItem/useListItemControl.d.ts +5 -0
  220. package/build/types/listItem/useListItemControl.d.ts.map +1 -0
  221. package/build/types/listItem/useListItemMedia.d.ts +6 -0
  222. package/build/types/listItem/useListItemMedia.d.ts.map +1 -0
  223. package/build/types/switch/Switch.d.ts +3 -1
  224. package/build/types/switch/Switch.d.ts.map +1 -1
  225. package/package.json +4 -4
  226. package/src/avatarView/AvatarView.css +3 -1
  227. package/src/avatarView/AvatarView.less +2 -1
  228. package/src/button/Button.spec.tsx +18 -0
  229. package/src/button/Button.tsx +5 -1
  230. package/src/button/Button.types.ts +1 -1
  231. package/src/button/index.ts +1 -1
  232. package/src/checkboxButton/CheckboxButton.story.tsx +4 -4
  233. package/src/common/RadioButton/RadioButton.tsx +6 -1
  234. package/src/common/initials.spec.tsx +0 -13
  235. package/src/common/initials.ts +0 -5
  236. package/src/i18n/de.json +0 -2
  237. package/src/i18n/fr.json +0 -2
  238. package/src/i18n/hu.json +0 -2
  239. package/src/i18n/it.json +0 -2
  240. package/src/i18n/ja.json +0 -2
  241. package/src/i18n/pl.json +0 -2
  242. package/src/i18n/ro.json +0 -2
  243. package/src/i18n/ru.json +0 -2
  244. package/src/i18n/tr.json +0 -2
  245. package/src/i18n/zh-CN.json +0 -2
  246. package/src/i18n/zh-HK.json +0 -2
  247. package/src/iconButton/IconButton.story.tsx +1 -1
  248. package/src/iconButton/IconButton.tsx +1 -1
  249. package/src/image/Image.tsx +3 -0
  250. package/src/image/index.ts +1 -0
  251. package/src/index.ts +2 -0
  252. package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.spec.tsx +56 -0
  253. package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +195 -0
  254. package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.tsx +36 -0
  255. package/src/listItem/AdditionalInfo/index.ts +2 -0
  256. package/src/listItem/AvatarLayout/ListItemAvatarLayout.spec.tsx +59 -0
  257. package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +121 -0
  258. package/src/listItem/AvatarLayout/ListItemAvatarLayout.tsx +27 -0
  259. package/src/listItem/AvatarLayout/index.ts +2 -0
  260. package/src/listItem/AvatarView/ListItemAvatarView.spec.tsx +75 -0
  261. package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +336 -0
  262. package/src/listItem/AvatarView/ListItemAvatarView.tsx +27 -0
  263. package/src/listItem/AvatarView/index.ts +2 -0
  264. package/src/listItem/Button/ListItemButton.spec.tsx +68 -0
  265. package/src/listItem/Button/ListItemButton.story.tsx +466 -0
  266. package/src/listItem/Button/ListItemButton.tsx +56 -0
  267. package/src/listItem/Button/index.ts +2 -0
  268. package/src/listItem/Checkbox/ListItemCheckbox.spec.tsx +82 -0
  269. package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +125 -0
  270. package/src/listItem/Checkbox/ListItemCheckbox.tsx +33 -0
  271. package/src/listItem/Checkbox/index.ts +2 -0
  272. package/src/listItem/IconButton/ListItemIconButton.spec.tsx +119 -0
  273. package/src/listItem/IconButton/ListItemIconButton.story.tsx +249 -0
  274. package/src/listItem/IconButton/ListItemIconButton.tsx +56 -0
  275. package/src/listItem/IconButton/index.ts +2 -0
  276. package/src/listItem/Image/ListItemImage.spec.tsx +30 -0
  277. package/src/listItem/Image/ListItemImage.story.tsx +77 -0
  278. package/src/listItem/Image/ListItemImage.tsx +48 -0
  279. package/src/listItem/Image/index.ts +2 -0
  280. package/src/listItem/ListItem.css +770 -0
  281. package/src/listItem/ListItem.grid.css +370 -0
  282. package/src/listItem/ListItem.grid.less +622 -0
  283. package/src/listItem/ListItem.less +421 -0
  284. package/src/listItem/ListItem.spec.tsx +1496 -0
  285. package/src/listItem/ListItem.tsx +447 -0
  286. package/src/listItem/ListItemContext.tsx +27 -0
  287. package/src/listItem/Navigation/ListItemNavigation.spec.tsx +59 -0
  288. package/src/listItem/Navigation/ListItemNavigation.story.tsx +109 -0
  289. package/src/listItem/Navigation/ListItemNavigation.tsx +40 -0
  290. package/src/listItem/Navigation/index.ts +2 -0
  291. package/src/listItem/Prompt/ListItemPrompt.spec.tsx +36 -0
  292. package/src/listItem/Prompt/ListItemPrompt.story.tsx +201 -0
  293. package/src/listItem/Prompt/ListItemPrompt.tsx +32 -0
  294. package/src/listItem/Prompt/index.ts +2 -0
  295. package/src/listItem/Radio/ListItemRadio.spec.tsx +66 -0
  296. package/src/listItem/Radio/ListItemRadio.story.tsx +108 -0
  297. package/src/listItem/Radio/ListItemRadio.tsx +33 -0
  298. package/src/listItem/Radio/index.ts +2 -0
  299. package/src/listItem/Switch/ListItemSwitch.spec.tsx +47 -0
  300. package/src/listItem/Switch/ListItemSwitch.story.tsx +77 -0
  301. package/src/listItem/Switch/ListItemSwitch.tsx +33 -0
  302. package/src/listItem/Switch/index.ts +2 -0
  303. package/src/listItem/_stories/ListItem.focus.test.story.tsx +250 -0
  304. package/src/listItem/_stories/ListItem.layout.test.story.tsx +353 -0
  305. package/src/listItem/_stories/ListItem.scenarios.story.tsx +209 -0
  306. package/src/listItem/_stories/ListItem.story.tsx +772 -0
  307. package/src/listItem/_stories/ListItem.variants.test.story.tsx +271 -0
  308. package/src/listItem/_stories/helpers.tsx +53 -0
  309. package/src/listItem/_stories/subcomponents.tsx +139 -0
  310. package/src/listItem/index.ts +14 -0
  311. package/src/listItem/test-utils.tsx +33 -0
  312. package/src/listItem/useListItemControl.tsx +18 -0
  313. package/src/listItem/useListItemMedia.tsx +13 -0
  314. package/src/main.css +773 -1
  315. package/src/main.less +1 -0
  316. package/src/switch/Switch.tsx +5 -1
  317. package/src/test-utils/assets/placeholder-landscape.svg +1 -0
  318. package/src/test-utils/assets/placeholder-portrait.svg +1 -0
  319. package/src/test-utils/Parameters.d.ts +0 -77
@@ -0,0 +1,772 @@
1
+ import { useState } from 'react';
2
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
3
+ import { MultiCurrency, Plus } from '@transferwise/icons';
4
+ import { lorem5, lorem10 } from '../../test-utils';
5
+ import Emphasis from '../../emphasis';
6
+ import { ListItem, Props as ItemProps } from '../ListItem';
7
+ import {
8
+ SB_LIST_ITEM_CONTROLS as CONTROLS,
9
+ SB_LIST_ITEM_ADDITIONAL_INFO as ADDITIONAL_INFO,
10
+ SB_LIST_ITEM_PROMPTS as PROMPTS,
11
+ SB_LIST_ITEM_MEDIA as MEDIA,
12
+ } from './subcomponents';
13
+ import { disableControls, storySourceWithoutNoise, withoutKey } from './helpers';
14
+ import Link from '../../link';
15
+
16
+ const hideControls = disableControls([
17
+ 'additionalInfo',
18
+ 'control',
19
+ 'prompt',
20
+ 'media',
21
+ 'className',
22
+ 'id',
23
+ 'role',
24
+ 'aria-labelledby',
25
+ 'as',
26
+ ]);
27
+
28
+ /**
29
+ * List Items let users review or select options from a dynamic list.<br />
30
+ * For more details please refer to the [release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3647251055/List+Item+release+notes) and the [design spec](https://wise.design/components/list-item). <br />
31
+ *
32
+ * > This component replaces now deprecated `LegacyListItem`, `Summary` and all `*Option` components
33
+ */
34
+ export default {
35
+ component: ListItem,
36
+ subcomponents: {
37
+ 'ListItem.AdditionalInfo': ListItem.AdditionalInfo,
38
+ 'ListItem.Prompt': ListItem.Prompt,
39
+ 'ListItem.Button': ListItem.Button,
40
+ 'ListItem.IconButton': ListItem.IconButton,
41
+ 'ListItem.Navigation': ListItem.Navigation,
42
+ 'ListItem.Checkbox': ListItem.Checkbox,
43
+ 'ListItem.Radio': ListItem.Radio,
44
+ 'ListItem.Switch': ListItem.Switch,
45
+ 'ListItem.AvatarView': ListItem.AvatarView,
46
+ 'ListItem.AvatarLayout': ListItem.AvatarLayout,
47
+ 'ListItem.Image': ListItem.Image,
48
+ },
49
+ title: 'Content/ListItem',
50
+ parameters: {
51
+ docs: {
52
+ toc: true,
53
+ },
54
+ },
55
+ args: {
56
+ title: 'List item title',
57
+ subtitle: 'Subtitle goes here',
58
+ valueTitle: '100 GBP',
59
+ valueSubtitle: '100 USD',
60
+ disabled: false,
61
+ spotlight: undefined,
62
+ inverted: false,
63
+ valueColumnWidth: undefined,
64
+ },
65
+ argTypes: {
66
+ spotlight: {
67
+ control: 'radio',
68
+ options: ['unset (undefined)', 'active', 'inactive'],
69
+ mapping: {
70
+ 'unset (undefined)': undefined,
71
+ active: 'active',
72
+ inactive: 'inactive',
73
+ },
74
+ },
75
+ },
76
+ } satisfies Meta<ItemProps>;
77
+
78
+ type Story = StoryObj<ItemProps>;
79
+
80
+ /**
81
+ * Convenience controls for previewing rich markup,
82
+ * not otherwise possible via Storybook
83
+ */
84
+ type PreviewStoryArgs = ItemProps & {
85
+ previewInteractivity: 'non-interactive' | 'fully-interactive' | 'partially-interactive';
86
+ previewControlFull: ItemProps['control'];
87
+ previewControlPartial: ItemProps['control'];
88
+ previewAdditionalInfoFull: ItemProps['additionalInfo'];
89
+ previewAdditionalInfoPartial: ItemProps['additionalInfo'];
90
+ previewPrompt: ItemProps['prompt'];
91
+ previewMedia: ItemProps['media'];
92
+ };
93
+
94
+ const previewArgGroup = {
95
+ category: 'Preview options',
96
+ type: {
97
+ summary: undefined,
98
+ },
99
+ };
100
+
101
+ const previewArgTypes = {
102
+ previewInteractivity: {
103
+ name: 'Preview different interactivity',
104
+ control: 'radio',
105
+ options: ['non-interactive', 'fully-interactive', 'partially-interactive'],
106
+ table: previewArgGroup,
107
+ },
108
+
109
+ previewControlFull: {
110
+ name: 'Preview with `control`',
111
+ if: {
112
+ arg: 'previewInteractivity',
113
+ eq: 'fully-interactive',
114
+ },
115
+ control: 'select',
116
+ options: [
117
+ 'unset (undefined)',
118
+ 'Button',
119
+ 'Button as anchor',
120
+ 'IconButton',
121
+ 'IconButton as anchor',
122
+ 'Navigation',
123
+ 'Navigation as button',
124
+ 'Checkbox',
125
+ 'Radio',
126
+ 'Switch',
127
+ ],
128
+ mapping: {
129
+ 'unset (undefined)': undefined,
130
+ Button: CONTROLS.button,
131
+ 'Button as anchor': CONTROLS.buttonAsLink,
132
+ IconButton: CONTROLS.iconButton,
133
+ 'IconButton as anchor': CONTROLS.iconButtonAsLink,
134
+ Navigation: CONTROLS.navigation,
135
+ 'Navigation as button': CONTROLS.navigationAsButton,
136
+ Checkbox: CONTROLS.checkbox,
137
+ Radio: CONTROLS.radio,
138
+ Switch: CONTROLS.switch,
139
+ },
140
+ table: previewArgGroup,
141
+ },
142
+
143
+ previewControlPartial: {
144
+ name: 'Preview with `control`',
145
+ if: {
146
+ arg: 'previewInteractivity',
147
+ eq: 'partially-interactive',
148
+ },
149
+ control: 'select',
150
+ options: [
151
+ 'unset (undefined)',
152
+ 'Button',
153
+ 'Button as anchor',
154
+ 'IconButton',
155
+ 'IconButton as anchor',
156
+ ],
157
+ mapping: {
158
+ 'unset (undefined)': undefined,
159
+ Button: CONTROLS.partialButton,
160
+ 'Button as anchor': CONTROLS.partialButtonAsLink,
161
+ IconButton: CONTROLS.partialIconButton,
162
+ 'IconButton as anchor': CONTROLS.partialIconButtonAsLink,
163
+ },
164
+ table: previewArgGroup,
165
+ },
166
+
167
+ previewAdditionalInfoFull: {
168
+ name: 'Preview with `additionalInfo`',
169
+ if: {
170
+ arg: 'previewInteractivity',
171
+ eq: 'fully-interactive',
172
+ },
173
+ control: 'radio',
174
+ options: ['unset (undefined)', 'non-interactive'],
175
+ mapping: {
176
+ 'unset (undefined)': undefined,
177
+ 'non-interactive': ADDITIONAL_INFO.nonInteractive,
178
+ },
179
+ table: previewArgGroup,
180
+ },
181
+ previewAdditionalInfoPartial: {
182
+ name: 'Preview with `additionalInfo`',
183
+ if: {
184
+ arg: 'previewInteractivity',
185
+ eq: 'partially-interactive',
186
+ },
187
+ control: 'radio',
188
+ options: ['unset (undefined)', 'interactive', 'non-interactive'],
189
+ mapping: {
190
+ 'unset (undefined)': undefined,
191
+ interactive: ADDITIONAL_INFO.interactive,
192
+ 'non-interactive': ADDITIONAL_INFO.nonInteractive,
193
+ },
194
+ table: previewArgGroup,
195
+ },
196
+
197
+ previewPrompt: {
198
+ name: 'Preview with `prompt`',
199
+ control: 'radio',
200
+ options: ['unset (undefined)', 'interactive', 'non-interactive'],
201
+ mapping: {
202
+ 'unset (undefined)': undefined,
203
+ interactive: PROMPTS.interactive,
204
+ 'non-interactive': PROMPTS.nonInteractive,
205
+ },
206
+ table: previewArgGroup,
207
+ },
208
+
209
+ previewMedia: {
210
+ name: 'Preview with `media`',
211
+ control: 'select',
212
+ options: [
213
+ 'unset (undefined)',
214
+ 'image',
215
+ 'avatar: single',
216
+ 'avatar: double',
217
+ 'avatar: double-diagonal',
218
+ ],
219
+ mapping: {
220
+ 'unset (undefined)': undefined,
221
+ image: MEDIA.image,
222
+ 'avatar: single': MEDIA.avatarSingle,
223
+ 'avatar: double': MEDIA.avatarDouble,
224
+ 'avatar: double-diagonal': MEDIA.avatarDiagonal,
225
+ },
226
+ table: previewArgGroup,
227
+ },
228
+ } as const;
229
+
230
+ const getPropsForPreview = (args: PreviewStoryArgs): [ItemProps, Partial<ItemProps>] => {
231
+ const {
232
+ previewInteractivity,
233
+ previewControlFull,
234
+ previewControlPartial,
235
+ previewAdditionalInfoFull,
236
+ previewAdditionalInfoPartial,
237
+ previewPrompt,
238
+ previewMedia,
239
+ ...props
240
+ } = args;
241
+
242
+ return [
243
+ props,
244
+ {
245
+ control: previewControlFull || previewControlPartial,
246
+ additionalInfo: previewAdditionalInfoFull || previewAdditionalInfoPartial,
247
+ prompt: previewPrompt,
248
+ media: previewMedia,
249
+ },
250
+ ];
251
+ };
252
+
253
+ export const Playground: StoryObj<PreviewStoryArgs> = {
254
+ tags: ['!autodocs'],
255
+ render: (args: PreviewStoryArgs) => {
256
+ const [props, previewProps] = getPropsForPreview(args);
257
+
258
+ return (
259
+ <ol className="list-unstyled">
260
+ <ListItem {...props} {...previewProps} />
261
+ </ol>
262
+ );
263
+ },
264
+ argTypes: previewArgTypes,
265
+ args: {
266
+ previewInteractivity: 'fully-interactive',
267
+ previewPrompt: 'interactive',
268
+ previewMedia: 'avatar: single',
269
+ previewControlFull: 'Button',
270
+ previewControlPartial: 'Button',
271
+ previewAdditionalInfoFull: 'non-interactive',
272
+ previewAdditionalInfoPartial: 'non-interactive',
273
+ },
274
+ decorators: [withoutKey],
275
+ };
276
+
277
+ /**
278
+ * ListItem uses container queries under the hood, which means its layout self-adjusts based on
279
+ * the available space. At the 100% zoom level, these breakpoints correspond to
280
+ * containers under `290px`, those between `291px and 380px`, and finally everything including
281
+ * and above `381px`. <br />
282
+ * This also supports high levels of zoom for assistive tech users.
283
+ */
284
+ export const Responsiveness: StoryObj<PreviewStoryArgs> = {
285
+ parameters: {
286
+ docs: {
287
+ canvas: {
288
+ sourceState: 'hidden',
289
+ },
290
+ },
291
+ },
292
+ argTypes: {
293
+ ...hideControls(),
294
+ ...previewArgTypes,
295
+ },
296
+ args: {
297
+ subtitle: lorem10,
298
+ previewInteractivity: 'fully-interactive',
299
+ previewPrompt: 'interactive',
300
+ previewMedia: 'image',
301
+ previewControlFull: 'Button',
302
+ previewControlPartial: 'Button',
303
+ previewAdditionalInfoFull: 'non-interactive',
304
+ previewAdditionalInfoPartial: 'non-interactive',
305
+ },
306
+ decorators: [withoutKey],
307
+ render: (args) => {
308
+ const [props, previewProps] = getPropsForPreview(args);
309
+
310
+ return (
311
+ <ol
312
+ className="list-unstyled"
313
+ style={{ display: 'grid', gridTemplateColumns: '290px 350px 381px', gap: 16 }}
314
+ >
315
+ <ListItem {...props} {...previewProps} />
316
+ <ListItem {...props} {...previewProps} />
317
+ <ListItem {...props} {...previewProps} />
318
+ </ol>
319
+ );
320
+ },
321
+ };
322
+
323
+ /**
324
+ * Due to platform limitations, the component is unable to automagically adjust its content to
325
+ * all possible configurations. <br />
326
+ * By default, it'll follow a CSS grid `1fr max-content` ratio of left side content (`title` and
327
+ * `subtitle`) to the right side content (`valueTitle` and `valueSubtitle`).
328
+ *
329
+ * To adjust the width of the right side content, you can use `valueColumnWidth` prop which accepts
330
+ * a number between `0–100` which resolves to a `fr` value of a `grid-template-columns` declaration.
331
+ * E.g. `valueColumnWidth={25}` will result in a `75fr 25fr`.
332
+ *
333
+ * **NB:** This behaviour is slightly different on mobile platforms as they have more control over
334
+ * layout calculations.
335
+ */
336
+ export const ContentRatio: StoryObj<PreviewStoryArgs> = {
337
+ parameters: {
338
+ docs: {
339
+ canvas: {
340
+ sourceState: 'hidden',
341
+ },
342
+ },
343
+ },
344
+ args: {
345
+ valueColumnWidth: 70,
346
+ subtitle: lorem5,
347
+ valueTitle: `${lorem5} ${lorem5}`,
348
+ valueSubtitle: lorem5,
349
+ previewInteractivity: 'fully-interactive',
350
+ previewPrompt: 'interactive',
351
+ previewMedia: 'image',
352
+ previewControlFull: 'Button',
353
+ previewControlPartial: 'Button',
354
+ previewAdditionalInfoFull: 'non-interactive',
355
+ previewAdditionalInfoPartial: 'non-interactive',
356
+ as: 'div',
357
+ },
358
+ argTypes: {
359
+ ...hideControls(['disabled', 'spotlight']),
360
+ ...previewArgTypes,
361
+ },
362
+ render: (args) => {
363
+ const [props, previewProps] = getPropsForPreview(args);
364
+
365
+ return <ListItem {...props} {...previewProps} />;
366
+ },
367
+ };
368
+
369
+ /**
370
+ * List item supports default and inverted title and description to allow for further flexibility
371
+ * in the component. No other content elements are affected by this prop.
372
+ *
373
+ * Refer to the [design documentation](https://wise.design/components/list-item#content-hierarchy) for more details.
374
+ */
375
+ export const ContentHierarchy: StoryObj<PreviewStoryArgs> = {
376
+ args: {
377
+ inverted: true,
378
+ previewInteractivity: 'fully-interactive',
379
+ previewPrompt: 'interactive',
380
+ previewMedia: 'image',
381
+ previewControlFull: 'Button',
382
+ previewControlPartial: 'Button',
383
+ previewAdditionalInfoFull: 'non-interactive',
384
+ previewAdditionalInfoPartial: 'non-interactive',
385
+ as: 'div',
386
+ },
387
+ argTypes: {
388
+ ...hideControls(['valueColumnWidth', 'disabled']),
389
+ ...previewArgTypes,
390
+ },
391
+ render: (args) => {
392
+ const [props, previewProps] = getPropsForPreview(args);
393
+
394
+ return <ListItem {...props} {...previewProps} />;
395
+ },
396
+ };
397
+
398
+ /**
399
+ * Interactive list items can alternatively be displayed with a spotlight.
400
+ *
401
+ * Refer to the [design documentation](https://wise.design/components/list-item#spotlight) for more details.
402
+ */
403
+ export const Spotlight: StoryObj<PreviewStoryArgs> = {
404
+ argTypes: {
405
+ ...hideControls(['spotlight', 'valueColumnWidth']),
406
+ ...previewArgTypes,
407
+ },
408
+ args: {
409
+ subtitle: lorem10,
410
+ previewInteractivity: 'fully-interactive',
411
+ previewPrompt: 'interactive',
412
+ previewMedia: 'image',
413
+ previewControlFull: 'Button',
414
+ previewControlPartial: 'Button',
415
+ previewAdditionalInfoFull: 'non-interactive',
416
+ previewAdditionalInfoPartial: 'non-interactive',
417
+ },
418
+ decorators: [withoutKey],
419
+ render: (args) => {
420
+ const [props, previewProps] = getPropsForPreview(args);
421
+
422
+ return (
423
+ <ol className="list-unstyled">
424
+ <ListItem {...props} {...previewProps} spotlight="inactive" />
425
+ <ListItem {...props} {...previewProps} spotlight="active" />
426
+ </ol>
427
+ );
428
+ },
429
+ };
430
+
431
+ /**
432
+ * By default, all list items are fully interactive, meaning that their whole surface triggers the
433
+ * main action. The only 2 exceptions are those using `ListItem.Button` and `ListItem.IconButton`
434
+ * as their controls, which can be made partially interactive by toggling `partiallyInteractive`
435
+ * prop directly on them.
436
+ *
437
+ * Fully interactive list items **cannot contain any other interactive elements**, such as links or
438
+ * buttons, inside them, with the only exception being the `ListItem.Prompt` subcomponent, as it's
439
+ * rendered on a separate Accessibility Tree branch. <br/>
440
+ * Partially interactive items can also have interactive `ListItem.AdditionalInfo` which allows
441
+ * for a single, appended link or inline button.
442
+ *
443
+ * All of these limitations were put in place to ensure that the list item is compliant with
444
+ * accessibility guidance and offers consistent experience across all engineering platforms.
445
+ *
446
+ * Please refer to the [design documentation](https://wise.design/components/list-item#interaction) for more details.
447
+ */
448
+ export const Interactivity: StoryObj<PreviewStoryArgs> = storySourceWithoutNoise({
449
+ argTypes: {
450
+ ...hideControls([
451
+ 'title',
452
+ 'subtitle',
453
+ 'valueTitle',
454
+ 'valueSubtitle',
455
+ 'valueColumnWidth',
456
+ 'inverted',
457
+ ]),
458
+ },
459
+ args: {
460
+ subtitle: lorem10,
461
+ },
462
+ decorators: [withoutKey],
463
+ render: function Render(args) {
464
+ const [clicked, setClicked] = useState(0);
465
+
466
+ const renderPrompt = () => (
467
+ <ListItem.Prompt sentiment="positive">
468
+ Finally, there is a prompt{' '}
469
+ <Link href="https://wise.com" target="_blank" rel="noreferrer">
470
+ referencing some details
471
+ </Link>{' '}
472
+ for your convenience.
473
+ </ListItem.Prompt>
474
+ );
475
+
476
+ const renderInteractiveInfo = () => (
477
+ <ListItem.AdditionalInfo
478
+ action={{
479
+ label: 'Details about the subject.',
480
+ href: 'https://wise.com',
481
+ target: '_blank',
482
+ }}
483
+ >
484
+ Which is augmented with additional info.
485
+ </ListItem.AdditionalInfo>
486
+ );
487
+
488
+ const renderStaticInfo = () => (
489
+ <ListItem.AdditionalInfo>Which is augmented with additional info.</ListItem.AdditionalInfo>
490
+ );
491
+
492
+ return (
493
+ <>
494
+ <label>Count: {clicked}</label>
495
+ <ol className="list-unstyled">
496
+ <ListItem
497
+ {...args}
498
+ title="Fully interactive"
499
+ control={
500
+ <ListItem.Button
501
+ priority="secondary-neutral"
502
+ onClick={() => setClicked((current) => current + 1)}
503
+ >
504
+ as Button
505
+ </ListItem.Button>
506
+ }
507
+ additionalInfo={renderStaticInfo()}
508
+ prompt={renderPrompt()}
509
+ />
510
+ <ListItem
511
+ {...args}
512
+ title="Partially interactive"
513
+ control={
514
+ <ListItem.Button
515
+ priority="secondary-neutral"
516
+ partiallyInteractive
517
+ onClick={() => setClicked((current) => current + 1)}
518
+ >
519
+ as Button
520
+ </ListItem.Button>
521
+ }
522
+ additionalInfo={renderInteractiveInfo()}
523
+ prompt={renderPrompt()}
524
+ />
525
+ <ListItem
526
+ {...args}
527
+ title="Fully interactive"
528
+ control={
529
+ <ListItem.IconButton
530
+ aria-label="Add something to me"
531
+ onClick={() => setClicked((current) => current + 1)}
532
+ >
533
+ <Plus />
534
+ </ListItem.IconButton>
535
+ }
536
+ additionalInfo={renderStaticInfo()}
537
+ prompt={renderPrompt()}
538
+ />
539
+ <ListItem
540
+ {...args}
541
+ title="Partially interactive"
542
+ control={
543
+ <ListItem.IconButton
544
+ partiallyInteractive
545
+ onClick={() => setClicked((current) => current + 1)}
546
+ >
547
+ <Plus />
548
+ </ListItem.IconButton>
549
+ }
550
+ additionalInfo={renderInteractiveInfo()}
551
+ prompt={renderPrompt()}
552
+ />
553
+ </ol>
554
+ </>
555
+ );
556
+ },
557
+ });
558
+
559
+ /**
560
+ * While most disabled states will show as grayed out, the navigation control switches from chevron
561
+ * to a new icon for improved user experience and accessibility. <br />
562
+ * For the same reason, only the control part of the List Item is dimmed, while all the content
563
+ * retains high contrast and interactivity.
564
+ *
565
+ * Please refer to the [design documentation](https://wise.design/components/list-item#accessibility:~:text=-,Disabled%20states,-) for more details
566
+ */
567
+ export const Disabled: Story = {
568
+ parameters: {
569
+ docs: {
570
+ canvas: {
571
+ sourceState: 'hidden',
572
+ },
573
+ },
574
+ controls: { disable: true },
575
+ knobs: { disable: true },
576
+ },
577
+ render: (args) => (
578
+ <ol className="list-unstyled">
579
+ <ListItem
580
+ disabled
581
+ media={
582
+ <ListItem.AvatarView>
583
+ <MultiCurrency />
584
+ </ListItem.AvatarView>
585
+ }
586
+ title="Navigation"
587
+ subtitle={lorem5}
588
+ control={<ListItem.Navigation onClick={() => {}} />}
589
+ />
590
+ <ListItem
591
+ disabled
592
+ media={
593
+ <ListItem.AvatarView>
594
+ <MultiCurrency />
595
+ </ListItem.AvatarView>
596
+ }
597
+ title="Button secondary neutral"
598
+ subtitle={lorem5}
599
+ control={<ListItem.Button priority="secondary-neutral">Secondary Neutral</ListItem.Button>}
600
+ />
601
+ <ListItem
602
+ disabled
603
+ media={
604
+ <ListItem.AvatarView>
605
+ <MultiCurrency />
606
+ </ListItem.AvatarView>
607
+ }
608
+ title="Button primary"
609
+ subtitle={lorem5}
610
+ control={<ListItem.Button priority="primary">Primary</ListItem.Button>}
611
+ />
612
+ <ListItem
613
+ disabled
614
+ media={
615
+ <ListItem.AvatarView>
616
+ <MultiCurrency />
617
+ </ListItem.AvatarView>
618
+ }
619
+ title="Button tertiary"
620
+ subtitle={lorem5}
621
+ control={<ListItem.Button priority="tertiary">Tertiary</ListItem.Button>}
622
+ />
623
+ <ListItem
624
+ disabled
625
+ media={
626
+ <ListItem.AvatarView>
627
+ <MultiCurrency />
628
+ </ListItem.AvatarView>
629
+ }
630
+ title="Icon Button"
631
+ subtitle={lorem5}
632
+ control={
633
+ <ListItem.IconButton>
634
+ <Plus />
635
+ </ListItem.IconButton>
636
+ }
637
+ />
638
+ <ListItem
639
+ disabled
640
+ media={
641
+ <ListItem.AvatarView>
642
+ <MultiCurrency />
643
+ </ListItem.AvatarView>
644
+ }
645
+ title="Checkbox"
646
+ subtitle={lorem5}
647
+ control={<ListItem.Checkbox />}
648
+ />
649
+ <ListItem
650
+ disabled
651
+ media={
652
+ <ListItem.AvatarView>
653
+ <MultiCurrency />
654
+ </ListItem.AvatarView>
655
+ }
656
+ title="Checkbox checked"
657
+ subtitle={lorem5}
658
+ control={<ListItem.Checkbox checked />}
659
+ />
660
+ <ListItem
661
+ disabled
662
+ media={
663
+ <ListItem.AvatarView>
664
+ <MultiCurrency />
665
+ </ListItem.AvatarView>
666
+ }
667
+ title="Checkbox indeterminate"
668
+ subtitle={lorem5}
669
+ control={<ListItem.Checkbox indeterminate />}
670
+ />
671
+ <ListItem
672
+ disabled
673
+ media={
674
+ <ListItem.AvatarView>
675
+ <MultiCurrency />
676
+ </ListItem.AvatarView>
677
+ }
678
+ title="Switch on"
679
+ subtitle={lorem5}
680
+ control={<ListItem.Switch checked onClick={() => {}} />}
681
+ />
682
+ <ListItem
683
+ disabled
684
+ media={
685
+ <ListItem.AvatarView>
686
+ <MultiCurrency />
687
+ </ListItem.AvatarView>
688
+ }
689
+ title="Switch off"
690
+ subtitle={lorem5}
691
+ control={<ListItem.Switch onClick={() => {}} />}
692
+ />
693
+ <ListItem
694
+ disabled
695
+ media={
696
+ <ListItem.AvatarView>
697
+ <MultiCurrency />
698
+ </ListItem.AvatarView>
699
+ }
700
+ title="Switch off"
701
+ subtitle={lorem5}
702
+ control={<ListItem.Radio name="radio" checked />}
703
+ />
704
+ <ListItem
705
+ disabled
706
+ media={
707
+ <ListItem.AvatarView>
708
+ <MultiCurrency />
709
+ </ListItem.AvatarView>
710
+ }
711
+ title="Switch off"
712
+ subtitle={lorem5}
713
+ control={<ListItem.Radio name="radios" />}
714
+ />
715
+ <ListItem
716
+ disabled
717
+ media={
718
+ <ListItem.AvatarView>
719
+ <MultiCurrency />
720
+ </ListItem.AvatarView>
721
+ }
722
+ title="Switch off"
723
+ subtitle={lorem5}
724
+ additionalInfo={ADDITIONAL_INFO.interactive}
725
+ prompt={PROMPTS.interactive}
726
+ control={
727
+ <ListItem.Button partiallyInteractive onClick={() => {}}>
728
+ Click me
729
+ </ListItem.Button>
730
+ }
731
+ />
732
+ </ol>
733
+ ),
734
+ };
735
+
736
+ /**
737
+ * For backwards compatibility, all of the ListItem's content elements accept `ReactNode`.
738
+ * That said, most of them should be fed with plain text only. The exception is `valueTitle`
739
+ * and `valueSubtitle` which can be augmented with sentiment colours, strikethrough or bold
740
+ * styles. <br />
741
+ *
742
+ * Please refer to the [design documentation](https://wise.design/components/list-item#content) for more details.
743
+ */
744
+ export const StylingLabels: Story = {
745
+ argTypes: {
746
+ ...hideControls(['spotlight', 'valueColumnWidth']),
747
+ },
748
+ args: {
749
+ title: lorem5,
750
+ subtitle: lorem10,
751
+ media: MEDIA.image,
752
+ control: CONTROLS.iconButton,
753
+ prompt: PROMPTS.interactive,
754
+ },
755
+ decorators: [withoutKey],
756
+ render: function Render(args) {
757
+ return (
758
+ <ol className="list-unstyled">
759
+ <ListItem
760
+ {...args}
761
+ valueTitle={<Emphasis text="<negative>100 GBP</negative>" />}
762
+ valueSubtitle={<s>125 GBP</s>}
763
+ />
764
+ <ListItem
765
+ {...args}
766
+ valueTitle={<Emphasis text="<positive>100 GBP</positive>" />}
767
+ valueSubtitle={<strong>125 GBP</strong>}
768
+ />
769
+ </ol>
770
+ );
771
+ },
772
+ };