@transferwise/components 0.0.0-experimental-751dc12 → 0.0.0-experimental-4341b9c

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 (318) hide show
  1. package/build/button/Button.js +0 -1
  2. package/build/button/Button.js.map +1 -1
  3. package/build/button/Button.mjs +0 -1
  4. package/build/button/Button.mjs.map +1 -1
  5. package/build/common/RadioButton/RadioButton.js +2 -5
  6. package/build/common/RadioButton/RadioButton.js.map +1 -1
  7. package/build/common/RadioButton/RadioButton.mjs +2 -5
  8. package/build/common/RadioButton/RadioButton.mjs.map +1 -1
  9. package/build/common/initials.js +4 -1
  10. package/build/common/initials.js.map +1 -1
  11. package/build/common/initials.mjs +4 -1
  12. package/build/common/initials.mjs.map +1 -1
  13. package/build/i18n/de.json +2 -0
  14. package/build/i18n/de.json.js +2 -0
  15. package/build/i18n/de.json.js.map +1 -1
  16. package/build/i18n/de.json.mjs +2 -0
  17. package/build/i18n/de.json.mjs.map +1 -1
  18. package/build/i18n/fr.json +2 -0
  19. package/build/i18n/fr.json.js +2 -0
  20. package/build/i18n/fr.json.js.map +1 -1
  21. package/build/i18n/fr.json.mjs +2 -0
  22. package/build/i18n/fr.json.mjs.map +1 -1
  23. package/build/i18n/hu.json +2 -0
  24. package/build/i18n/hu.json.js +2 -0
  25. package/build/i18n/hu.json.js.map +1 -1
  26. package/build/i18n/hu.json.mjs +2 -0
  27. package/build/i18n/hu.json.mjs.map +1 -1
  28. package/build/i18n/it.json +2 -0
  29. package/build/i18n/it.json.js +2 -0
  30. package/build/i18n/it.json.js.map +1 -1
  31. package/build/i18n/it.json.mjs +2 -0
  32. package/build/i18n/it.json.mjs.map +1 -1
  33. package/build/i18n/ja.json +2 -0
  34. package/build/i18n/ja.json.js +2 -0
  35. package/build/i18n/ja.json.js.map +1 -1
  36. package/build/i18n/ja.json.mjs +2 -0
  37. package/build/i18n/ja.json.mjs.map +1 -1
  38. package/build/i18n/pl.json +2 -0
  39. package/build/i18n/pl.json.js +2 -0
  40. package/build/i18n/pl.json.js.map +1 -1
  41. package/build/i18n/pl.json.mjs +2 -0
  42. package/build/i18n/pl.json.mjs.map +1 -1
  43. package/build/i18n/pt.json +2 -0
  44. package/build/i18n/pt.json.js +2 -0
  45. package/build/i18n/pt.json.js.map +1 -1
  46. package/build/i18n/pt.json.mjs +2 -0
  47. package/build/i18n/pt.json.mjs.map +1 -1
  48. package/build/i18n/ro.json +2 -0
  49. package/build/i18n/ro.json.js +2 -0
  50. package/build/i18n/ro.json.js.map +1 -1
  51. package/build/i18n/ro.json.mjs +2 -0
  52. package/build/i18n/ro.json.mjs.map +1 -1
  53. package/build/i18n/ru.json +2 -0
  54. package/build/i18n/ru.json.js +2 -0
  55. package/build/i18n/ru.json.js.map +1 -1
  56. package/build/i18n/ru.json.mjs +2 -0
  57. package/build/i18n/ru.json.mjs.map +1 -1
  58. package/build/i18n/tr.json +2 -0
  59. package/build/i18n/tr.json.js +2 -0
  60. package/build/i18n/tr.json.js.map +1 -1
  61. package/build/i18n/tr.json.mjs +2 -0
  62. package/build/i18n/tr.json.mjs.map +1 -1
  63. package/build/i18n/zh-CN.json +2 -0
  64. package/build/i18n/zh-CN.json.js +2 -0
  65. package/build/i18n/zh-CN.json.js.map +1 -1
  66. package/build/i18n/zh-CN.json.mjs +2 -0
  67. package/build/i18n/zh-CN.json.mjs.map +1 -1
  68. package/build/i18n/zh-HK.json +2 -0
  69. package/build/i18n/zh-HK.json.js +2 -0
  70. package/build/i18n/zh-HK.json.js.map +1 -1
  71. package/build/i18n/zh-HK.json.mjs +2 -0
  72. package/build/i18n/zh-HK.json.mjs.map +1 -1
  73. package/build/iconButton/IconButton.js.map +1 -1
  74. package/build/iconButton/IconButton.mjs.map +1 -1
  75. package/build/image/Image.js.map +1 -1
  76. package/build/image/Image.mjs.map +1 -1
  77. package/build/index.js +0 -2
  78. package/build/index.js.map +1 -1
  79. package/build/index.mjs +0 -1
  80. package/build/index.mjs.map +1 -1
  81. package/build/main.css +0 -709
  82. package/build/styles/main.css +0 -709
  83. package/build/switch/Switch.js +0 -2
  84. package/build/switch/Switch.js.map +1 -1
  85. package/build/switch/Switch.mjs +0 -2
  86. package/build/switch/Switch.mjs.map +1 -1
  87. package/build/types/button/Button.d.ts.map +1 -1
  88. package/build/types/button/Button.types.d.ts +1 -1
  89. package/build/types/button/Button.types.d.ts.map +1 -1
  90. package/build/types/button/index.d.ts +1 -1
  91. package/build/types/button/index.d.ts.map +1 -1
  92. package/build/types/common/RadioButton/RadioButton.d.ts +1 -3
  93. package/build/types/common/RadioButton/RadioButton.d.ts.map +1 -1
  94. package/build/types/common/initials.d.ts.map +1 -1
  95. package/build/types/iconButton/IconButton.d.ts +2 -2
  96. package/build/types/iconButton/IconButton.d.ts.map +1 -1
  97. package/build/types/image/Image.d.ts +0 -3
  98. package/build/types/image/Image.d.ts.map +1 -1
  99. package/build/types/image/index.d.ts +0 -1
  100. package/build/types/image/index.d.ts.map +1 -1
  101. package/build/types/index.d.ts +0 -2
  102. package/build/types/index.d.ts.map +1 -1
  103. package/build/types/switch/Switch.d.ts +0 -2
  104. package/build/types/switch/Switch.d.ts.map +1 -1
  105. package/package.json +1 -1
  106. package/src/button/Button.spec.tsx +0 -18
  107. package/src/button/Button.tsx +1 -5
  108. package/src/button/Button.types.ts +1 -1
  109. package/src/button/index.ts +1 -1
  110. package/src/checkboxButton/CheckboxButton.story.tsx +4 -4
  111. package/src/common/RadioButton/RadioButton.tsx +1 -6
  112. package/src/common/initials.spec.tsx +13 -0
  113. package/src/common/initials.ts +5 -0
  114. package/src/i18n/de.json +2 -0
  115. package/src/i18n/fr.json +2 -0
  116. package/src/i18n/hu.json +2 -0
  117. package/src/i18n/it.json +2 -0
  118. package/src/i18n/ja.json +2 -0
  119. package/src/i18n/pl.json +2 -0
  120. package/src/i18n/pt.json +2 -0
  121. package/src/i18n/ro.json +2 -0
  122. package/src/i18n/ru.json +2 -0
  123. package/src/i18n/tr.json +2 -0
  124. package/src/i18n/zh-CN.json +2 -0
  125. package/src/i18n/zh-HK.json +2 -0
  126. package/src/iconButton/IconButton.story.tsx +1 -1
  127. package/src/iconButton/IconButton.tsx +1 -1
  128. package/src/image/Image.tsx +0 -3
  129. package/src/image/index.ts +0 -1
  130. package/src/index.ts +0 -2
  131. package/src/main.css +0 -709
  132. package/src/main.less +0 -1
  133. package/src/switch/Switch.tsx +0 -4
  134. package/src/test-utils/Parameters.d.ts +77 -0
  135. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +0 -56
  136. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +0 -1
  137. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +0 -54
  138. package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +0 -1
  139. package/build/listItem/AvatarLayout/ListItemAvatarLayout.js +0 -23
  140. package/build/listItem/AvatarLayout/ListItemAvatarLayout.js.map +0 -1
  141. package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs +0 -21
  142. package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs.map +0 -1
  143. package/build/listItem/AvatarView/ListItemAvatarView.js +0 -23
  144. package/build/listItem/AvatarView/ListItemAvatarView.js.map +0 -1
  145. package/build/listItem/AvatarView/ListItemAvatarView.mjs +0 -21
  146. package/build/listItem/AvatarView/ListItemAvatarView.mjs.map +0 -1
  147. package/build/listItem/Button/ListItemButton.js +0 -43
  148. package/build/listItem/Button/ListItemButton.js.map +0 -1
  149. package/build/listItem/Button/ListItemButton.mjs +0 -41
  150. package/build/listItem/Button/ListItemButton.mjs.map +0 -1
  151. package/build/listItem/Checkbox/ListItemCheckbox.js +0 -30
  152. package/build/listItem/Checkbox/ListItemCheckbox.js.map +0 -1
  153. package/build/listItem/Checkbox/ListItemCheckbox.mjs +0 -28
  154. package/build/listItem/Checkbox/ListItemCheckbox.mjs.map +0 -1
  155. package/build/listItem/IconButton/ListItemIconButton.js +0 -42
  156. package/build/listItem/IconButton/ListItemIconButton.js.map +0 -1
  157. package/build/listItem/IconButton/ListItemIconButton.mjs +0 -40
  158. package/build/listItem/IconButton/ListItemIconButton.mjs.map +0 -1
  159. package/build/listItem/Image/ListItemImage.js +0 -31
  160. package/build/listItem/Image/ListItemImage.js.map +0 -1
  161. package/build/listItem/Image/ListItemImage.mjs +0 -29
  162. package/build/listItem/Image/ListItemImage.mjs.map +0 -1
  163. package/build/listItem/ListItem.js +0 -308
  164. package/build/listItem/ListItem.js.map +0 -1
  165. package/build/listItem/ListItem.mjs +0 -303
  166. package/build/listItem/ListItem.mjs.map +0 -1
  167. package/build/listItem/ListItemContext.js +0 -8
  168. package/build/listItem/ListItemContext.js.map +0 -1
  169. package/build/listItem/ListItemContext.mjs +0 -6
  170. package/build/listItem/ListItemContext.mjs.map +0 -1
  171. package/build/listItem/Navigation/ListItemNavigation.js +0 -45
  172. package/build/listItem/Navigation/ListItemNavigation.js.map +0 -1
  173. package/build/listItem/Navigation/ListItemNavigation.mjs +0 -43
  174. package/build/listItem/Navigation/ListItemNavigation.mjs.map +0 -1
  175. package/build/listItem/Prompt/ListItemPrompt.js +0 -59
  176. package/build/listItem/Prompt/ListItemPrompt.js.map +0 -1
  177. package/build/listItem/Prompt/ListItemPrompt.mjs +0 -54
  178. package/build/listItem/Prompt/ListItemPrompt.mjs.map +0 -1
  179. package/build/listItem/Radio/ListItemRadio.js +0 -30
  180. package/build/listItem/Radio/ListItemRadio.js.map +0 -1
  181. package/build/listItem/Radio/ListItemRadio.mjs +0 -28
  182. package/build/listItem/Radio/ListItemRadio.mjs.map +0 -1
  183. package/build/listItem/Switch/ListItemSwitch.js +0 -30
  184. package/build/listItem/Switch/ListItemSwitch.js.map +0 -1
  185. package/build/listItem/Switch/ListItemSwitch.mjs +0 -28
  186. package/build/listItem/Switch/ListItemSwitch.mjs.map +0 -1
  187. package/build/listItem/_stories/images/landscape.svg +0 -1
  188. package/build/listItem/_stories/images/portrait.svg +0 -1
  189. package/build/listItem/useListItemControl.js +0 -22
  190. package/build/listItem/useListItemControl.js.map +0 -1
  191. package/build/listItem/useListItemControl.mjs +0 -20
  192. package/build/listItem/useListItemControl.mjs.map +0 -1
  193. package/build/listItem/useListItemMedia.js +0 -21
  194. package/build/listItem/useListItemMedia.js.map +0 -1
  195. package/build/listItem/useListItemMedia.mjs +0 -19
  196. package/build/listItem/useListItemMedia.mjs.map +0 -1
  197. package/build/styles/listItem/ListItem.css +0 -709
  198. package/build/styles/listItem/ListItem.grid.css +0 -368
  199. package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts +0 -15
  200. package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts.map +0 -1
  201. package/build/types/listItem/AdditionalInfo/index.d.ts +0 -3
  202. package/build/types/listItem/AdditionalInfo/index.d.ts.map +0 -1
  203. package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts +0 -18
  204. package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts.map +0 -1
  205. package/build/types/listItem/AvatarLayout/index.d.ts +0 -3
  206. package/build/types/listItem/AvatarLayout/index.d.ts.map +0 -1
  207. package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts +0 -16
  208. package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts.map +0 -1
  209. package/build/types/listItem/AvatarView/index.d.ts +0 -3
  210. package/build/types/listItem/AvatarView/index.d.ts.map +0 -1
  211. package/build/types/listItem/Button/ListItemButton.d.ts +0 -20
  212. package/build/types/listItem/Button/ListItemButton.d.ts.map +0 -1
  213. package/build/types/listItem/Button/index.d.ts +0 -3
  214. package/build/types/listItem/Button/index.d.ts.map +0 -1
  215. package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts +0 -14
  216. package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts.map +0 -1
  217. package/build/types/listItem/Checkbox/index.d.ts +0 -3
  218. package/build/types/listItem/Checkbox/index.d.ts.map +0 -1
  219. package/build/types/listItem/IconButton/ListItemIconButton.d.ts +0 -18
  220. package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +0 -1
  221. package/build/types/listItem/IconButton/index.d.ts +0 -3
  222. package/build/types/listItem/IconButton/index.d.ts.map +0 -1
  223. package/build/types/listItem/Image/ListItemImage.d.ts +0 -25
  224. package/build/types/listItem/Image/ListItemImage.d.ts.map +0 -1
  225. package/build/types/listItem/Image/index.d.ts +0 -3
  226. package/build/types/listItem/Image/index.d.ts.map +0 -1
  227. package/build/types/listItem/ListItem.d.ts +0 -113
  228. package/build/types/listItem/ListItem.d.ts.map +0 -1
  229. package/build/types/listItem/ListItemContext.d.ts +0 -22
  230. package/build/types/listItem/ListItemContext.d.ts.map +0 -1
  231. package/build/types/listItem/Navigation/ListItemNavigation.d.ts +0 -15
  232. package/build/types/listItem/Navigation/ListItemNavigation.d.ts.map +0 -1
  233. package/build/types/listItem/Navigation/index.d.ts +0 -3
  234. package/build/types/listItem/Navigation/index.d.ts.map +0 -1
  235. package/build/types/listItem/Prompt/ListItemPrompt.d.ts +0 -16
  236. package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +0 -1
  237. package/build/types/listItem/Prompt/index.d.ts +0 -3
  238. package/build/types/listItem/Prompt/index.d.ts.map +0 -1
  239. package/build/types/listItem/Radio/ListItemRadio.d.ts +0 -14
  240. package/build/types/listItem/Radio/ListItemRadio.d.ts.map +0 -1
  241. package/build/types/listItem/Radio/index.d.ts +0 -3
  242. package/build/types/listItem/Radio/index.d.ts.map +0 -1
  243. package/build/types/listItem/Switch/ListItemSwitch.d.ts +0 -14
  244. package/build/types/listItem/Switch/ListItemSwitch.d.ts.map +0 -1
  245. package/build/types/listItem/Switch/index.d.ts +0 -3
  246. package/build/types/listItem/Switch/index.d.ts.map +0 -1
  247. package/build/types/listItem/_stories/subcomponents.d.ts +0 -18
  248. package/build/types/listItem/_stories/subcomponents.d.ts.map +0 -1
  249. package/build/types/listItem/index.d.ts +0 -14
  250. package/build/types/listItem/index.d.ts.map +0 -1
  251. package/build/types/listItem/test-utils.d.ts +0 -7
  252. package/build/types/listItem/test-utils.d.ts.map +0 -1
  253. package/build/types/listItem/useListItemControl.d.ts +0 -5
  254. package/build/types/listItem/useListItemControl.d.ts.map +0 -1
  255. package/build/types/listItem/useListItemMedia.d.ts +0 -6
  256. package/build/types/listItem/useListItemMedia.d.ts.map +0 -1
  257. package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.spec.tsx +0 -56
  258. package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +0 -145
  259. package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.tsx +0 -36
  260. package/src/listItem/AdditionalInfo/index.ts +0 -2
  261. package/src/listItem/AvatarLayout/ListItemAvatarLayout.spec.tsx +0 -59
  262. package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +0 -118
  263. package/src/listItem/AvatarLayout/ListItemAvatarLayout.tsx +0 -27
  264. package/src/listItem/AvatarLayout/index.ts +0 -2
  265. package/src/listItem/AvatarView/ListItemAvatarView.spec.tsx +0 -75
  266. package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +0 -318
  267. package/src/listItem/AvatarView/ListItemAvatarView.tsx +0 -27
  268. package/src/listItem/AvatarView/index.ts +0 -2
  269. package/src/listItem/Button/ListItemButton.spec.tsx +0 -68
  270. package/src/listItem/Button/ListItemButton.story.tsx +0 -408
  271. package/src/listItem/Button/ListItemButton.tsx +0 -56
  272. package/src/listItem/Button/index.ts +0 -2
  273. package/src/listItem/Checkbox/ListItemCheckbox.spec.tsx +0 -82
  274. package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +0 -107
  275. package/src/listItem/Checkbox/ListItemCheckbox.tsx +0 -33
  276. package/src/listItem/Checkbox/index.ts +0 -2
  277. package/src/listItem/IconButton/ListItemIconButton.spec.tsx +0 -119
  278. package/src/listItem/IconButton/ListItemIconButton.story.tsx +0 -236
  279. package/src/listItem/IconButton/ListItemIconButton.tsx +0 -56
  280. package/src/listItem/IconButton/index.ts +0 -2
  281. package/src/listItem/Image/ListItemImage.spec.tsx +0 -30
  282. package/src/listItem/Image/ListItemImage.story.tsx +0 -56
  283. package/src/listItem/Image/ListItemImage.tsx +0 -48
  284. package/src/listItem/Image/index.ts +0 -2
  285. package/src/listItem/ListItem.css +0 -709
  286. package/src/listItem/ListItem.grid.css +0 -368
  287. package/src/listItem/ListItem.grid.less +0 -620
  288. package/src/listItem/ListItem.less +0 -346
  289. package/src/listItem/ListItem.spec.tsx +0 -1496
  290. package/src/listItem/ListItem.tsx +0 -441
  291. package/src/listItem/ListItemContext.tsx +0 -27
  292. package/src/listItem/Navigation/ListItemNavigation.spec.tsx +0 -59
  293. package/src/listItem/Navigation/ListItemNavigation.story.tsx +0 -106
  294. package/src/listItem/Navigation/ListItemNavigation.tsx +0 -40
  295. package/src/listItem/Navigation/index.ts +0 -2
  296. package/src/listItem/Prompt/ListItemPrompt.spec.tsx +0 -36
  297. package/src/listItem/Prompt/ListItemPrompt.story.tsx +0 -201
  298. package/src/listItem/Prompt/ListItemPrompt.tsx +0 -32
  299. package/src/listItem/Prompt/index.ts +0 -2
  300. package/src/listItem/Radio/ListItemRadio.spec.tsx +0 -66
  301. package/src/listItem/Radio/ListItemRadio.story.tsx +0 -98
  302. package/src/listItem/Radio/ListItemRadio.tsx +0 -33
  303. package/src/listItem/Radio/index.ts +0 -2
  304. package/src/listItem/Switch/ListItemSwitch.spec.tsx +0 -47
  305. package/src/listItem/Switch/ListItemSwitch.story.tsx +0 -69
  306. package/src/listItem/Switch/ListItemSwitch.tsx +0 -33
  307. package/src/listItem/Switch/index.ts +0 -2
  308. package/src/listItem/_stories/ListItem.focus.test.story.tsx +0 -250
  309. package/src/listItem/_stories/ListItem.layout.test.story.tsx +0 -338
  310. package/src/listItem/_stories/ListItem.story.tsx +0 -670
  311. package/src/listItem/_stories/ListItem.variants.test.story.tsx +0 -271
  312. package/src/listItem/_stories/images/landscape.svg +0 -1
  313. package/src/listItem/_stories/images/portrait.svg +0 -1
  314. package/src/listItem/_stories/subcomponents.tsx +0 -139
  315. package/src/listItem/index.ts +0 -14
  316. package/src/listItem/test-utils.tsx +0 -33
  317. package/src/listItem/useListItemControl.tsx +0 -18
  318. package/src/listItem/useListItemMedia.tsx +0 -13
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListItemIconButton.mjs","sources":["../../../src/listItem/IconButton/ListItemIconButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useContext, type ReactNode } from 'react';\nimport IconButtonComp, { type IconButtonProps } from '../../iconButton';\nimport { useListItemControl } from '../useListItemControl';\nimport { ListItemContext } from '../ListItemContext';\n\nexport type ListItemIconButtonProps = Pick<\n IconButtonProps,\n 'priority' | 'type' | 'onClick' | 'href' | 'target' | 'aria-label'\n> & {\n children: ReactNode;\n partiallyInteractive?: boolean;\n};\n\n/**\n * This component allows for rendering a IconButton control. It's a thin wrapper around the\n * [IconButton component](https://storybook.wise.design/?path=/docs/actions-iconbutton--docs), but offers only\n * a subset of its features in line with the ListItem's constraints. <br />\n * <br />\n * Please refer to the [Design documentation](https://wise.design/components/list-item---icon-button) for details.\n */\nexport const IconButton = function ({ priority = 'minimal', ...props }: ListItemIconButtonProps) {\n const { partiallyInteractive, ...restProps } = props;\n\n const { ids, props: itemProps } = useContext(ListItemContext);\n const { baseItemProps } = useListItemControl('icon-button', {\n partiallyInteractive,\n ...restProps,\n });\n\n const descriptorIds = [\n itemProps.inverted ? ids.subtitle : ids.title,\n itemProps.inverted ? ids.title : ids.subtitle,\n itemProps.inverted ? ids.valueSubtitle : ids.valueTitle,\n itemProps.inverted ? ids.valueTitle : ids.valueSubtitle,\n ids.additionalInfo,\n ids.prompt,\n ].join(' ');\n\n return (\n <IconButtonComp\n {...restProps}\n aria-describedby={descriptorIds}\n className={clsx(\n 'wds-list-item-control',\n !partiallyInteractive && props.href && 'wds-list-item-control_pseudo-element',\n )}\n id={ids.control}\n size={40}\n priority={priority}\n disabled={baseItemProps.disabled}\n />\n );\n};\n\nIconButton.displayName = 'ListItem.IconButton';\n"],"names":["IconButton","priority","props","partiallyInteractive","restProps","ids","itemProps","useContext","ListItemContext","baseItemProps","useListItemControl","descriptorIds","inverted","subtitle","title","valueSubtitle","valueTitle","additionalInfo","prompt","join","_jsx","IconButtonComp","className","clsx","href","id","control","size","disabled","displayName"],"mappings":";;;;;;;AAqBO,MAAMA,UAAU,GAAG,UAAU;AAAEC,EAAAA,QAAQ,GAAG,SAAS;EAAE,GAAGC;AAAK,CAA2B,EAAA;EAC7F,MAAM;IAAEC,oBAAoB;IAAE,GAAGC;AAAS,GAAE,GAAGF,KAAK;EAEpD,MAAM;IAAEG,GAAG;AAAEH,IAAAA,KAAK,EAAEI;AAAS,GAAE,GAAGC,UAAU,CAACC,eAAe,CAAC;EAC7D,MAAM;AAAEC,IAAAA;AAAa,GAAE,GAAGC,kBAAkB,CAAC,aAAa,EAAE;IAC1DP,oBAAoB;IACpB,GAAGC;AACJ,GAAA,CAAC;AAEF,EAAA,MAAMO,aAAa,GAAG,CACpBL,SAAS,CAACM,QAAQ,GAAGP,GAAG,CAACQ,QAAQ,GAAGR,GAAG,CAACS,KAAK,EAC7CR,SAAS,CAACM,QAAQ,GAAGP,GAAG,CAACS,KAAK,GAAGT,GAAG,CAACQ,QAAQ,EAC7CP,SAAS,CAACM,QAAQ,GAAGP,GAAG,CAACU,aAAa,GAAGV,GAAG,CAACW,UAAU,EACvDV,SAAS,CAACM,QAAQ,GAAGP,GAAG,CAACW,UAAU,GAAGX,GAAG,CAACU,aAAa,EACvDV,GAAG,CAACY,cAAc,EAClBZ,GAAG,CAACa,MAAM,CACX,CAACC,IAAI,CAAC,GAAG,CAAC;EAEX,oBACEC,GAAA,CAACC,YAAc,EAAA;AAAA,IAAA,GACTjB,SAAS;AACb,IAAA,kBAAA,EAAkBO,aAAc;AAChCW,IAAAA,SAAS,EAAEC,IAAI,CACb,uBAAuB,EACvB,CAACpB,oBAAoB,IAAID,KAAK,CAACsB,IAAI,IAAI,sCAAsC,CAC7E;IACFC,EAAE,EAAEpB,GAAG,CAACqB,OAAQ;AAChBC,IAAAA,IAAI,EAAE,EAAG;AACT1B,IAAAA,QAAQ,EAAEA,QAAS;IACnB2B,QAAQ,EAAEnB,aAAa,CAACmB;AAAS,GAAA,CACjC;AAEN;AAEA5B,UAAU,CAAC6B,WAAW,GAAG,qBAAqB;;;;"}
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- var Image$1 = require('../../image/Image.js');
4
- var clsx = require('clsx');
5
- var useListItemMedia = require('../useListItemMedia.js');
6
- var jsxRuntime = require('react/jsx-runtime');
7
-
8
- const Image = ({
9
- alt = '',
10
- size = 48,
11
- className,
12
- ...props
13
- }) => {
14
- useListItemMedia.useListItemMedia(size);
15
- return /*#__PURE__*/jsxRuntime.jsx("div", {
16
- className: clsx.clsx('wds-list-item-media-image-wrapper'),
17
- style: {
18
- '--wds-list-item-media-size': `${size}px`
19
- },
20
- children: /*#__PURE__*/jsxRuntime.jsx(Image$1.default, {
21
- ...props,
22
- className: clsx.clsx(className, 'wds-list-item-media-image'),
23
- alt: alt,
24
- role: alt ? 'graphics-symbol' : 'presentation'
25
- })
26
- });
27
- };
28
- Image.displayName = 'ListItem.Image';
29
-
30
- exports.Image = Image;
31
- //# sourceMappingURL=ListItemImage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListItemImage.js","sources":["../../../src/listItem/Image/ListItemImage.tsx"],"sourcesContent":["import ImageComp, { type ImageProps } from '../../image';\nimport { clsx } from 'clsx';\nimport { useListItemMedia } from '../useListItemMedia';\n\ntype SizeProp = {};\n\nexport type ListItemImageProps = Omit<ImageProps, 'stretch' | 'shrink' | 'id' | 'alt' | 'role'> & {\n /**\n * The size of square container for the image, matching available avatar sizes.\n */\n size?: 32 | 40 | 48 | 56 | 72;\n /**\n * When unset, it will force `role=\"presentation\"` on the image. Otherwise, it will set `role=\"graphics-symbol\"`.\n */\n alt?: string;\n};\n\n/**\n * This component should be used as a last resort, for rare cases when `<ListItem.AvatarView />`\n * or `<ListItem.AvatarLayout />` are insufficient.\n * It's a wrapper around the\n * [Image component](https://storybook.wise.design/?path=/docs/content-image--docs), but offers only\n * a subset of its props, in line with the ListItem's constraints.\n *\n * > **NB**: This component is [not intended for use with illustrations](https://wise.design/foundations/illustration#scale).\n */\nexport const Image = ({ alt = '', size = 48, className, ...props }: ListItemImageProps) => {\n useListItemMedia(size);\n\n return (\n <div\n className={clsx('wds-list-item-media-image-wrapper')}\n style={\n {\n '--wds-list-item-media-size': `${size}px`,\n } as React.CSSProperties\n }\n >\n <ImageComp\n {...props}\n className={clsx(className, 'wds-list-item-media-image')}\n alt={alt}\n role={alt ? 'graphics-symbol' : 'presentation'}\n />\n </div>\n );\n};\nImage.displayName = 'ListItem.Image';\n"],"names":["Image","alt","size","className","props","useListItemMedia","_jsx","clsx","style","children","ImageComp","role","displayName"],"mappings":";;;;;;;AA0BO,MAAMA,KAAK,GAAGA,CAAC;AAAEC,EAAAA,GAAG,GAAG,EAAE;AAAEC,EAAAA,IAAI,GAAG,EAAE;EAAEC,SAAS;EAAE,GAAGC;AAAK,CAAsB,KAAI;EACxFC,iCAAgB,CAACH,IAAI,CAAC;AAEtB,EAAA,oBACEI,cAAA,CAAA,KAAA,EAAA;AACEH,IAAAA,SAAS,EAAEI,SAAI,CAAC,mCAAmC,CAAE;AACrDC,IAAAA,KAAK,EACH;MACE,4BAA4B,EAAE,GAAGN,IAAI,CAAA,EAAA;KAExC;IAAAO,QAAA,eAEDH,cAAA,CAACI,eAAS,EAAA;AAAA,MAAA,GACJN,KAAK;AACTD,MAAAA,SAAS,EAAEI,SAAI,CAACJ,SAAS,EAAE,2BAA2B,CAAE;AACxDF,MAAAA,GAAG,EAAEA,GAAI;AACTU,MAAAA,IAAI,EAAEV,GAAG,GAAG,iBAAiB,GAAG;KAAe;AAEnD,GAAK,CAAC;AAEV;AACAD,KAAK,CAACY,WAAW,GAAG,gBAAgB;;;;"}
@@ -1,29 +0,0 @@
1
- import Image$1 from '../../image/Image.mjs';
2
- import { clsx } from 'clsx';
3
- import { useListItemMedia } from '../useListItemMedia.mjs';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const Image = ({
7
- alt = '',
8
- size = 48,
9
- className,
10
- ...props
11
- }) => {
12
- useListItemMedia(size);
13
- return /*#__PURE__*/jsx("div", {
14
- className: clsx('wds-list-item-media-image-wrapper'),
15
- style: {
16
- '--wds-list-item-media-size': `${size}px`
17
- },
18
- children: /*#__PURE__*/jsx(Image$1, {
19
- ...props,
20
- className: clsx(className, 'wds-list-item-media-image'),
21
- alt: alt,
22
- role: alt ? 'graphics-symbol' : 'presentation'
23
- })
24
- });
25
- };
26
- Image.displayName = 'ListItem.Image';
27
-
28
- export { Image };
29
- //# sourceMappingURL=ListItemImage.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListItemImage.mjs","sources":["../../../src/listItem/Image/ListItemImage.tsx"],"sourcesContent":["import ImageComp, { type ImageProps } from '../../image';\nimport { clsx } from 'clsx';\nimport { useListItemMedia } from '../useListItemMedia';\n\ntype SizeProp = {};\n\nexport type ListItemImageProps = Omit<ImageProps, 'stretch' | 'shrink' | 'id' | 'alt' | 'role'> & {\n /**\n * The size of square container for the image, matching available avatar sizes.\n */\n size?: 32 | 40 | 48 | 56 | 72;\n /**\n * When unset, it will force `role=\"presentation\"` on the image. Otherwise, it will set `role=\"graphics-symbol\"`.\n */\n alt?: string;\n};\n\n/**\n * This component should be used as a last resort, for rare cases when `<ListItem.AvatarView />`\n * or `<ListItem.AvatarLayout />` are insufficient.\n * It's a wrapper around the\n * [Image component](https://storybook.wise.design/?path=/docs/content-image--docs), but offers only\n * a subset of its props, in line with the ListItem's constraints.\n *\n * > **NB**: This component is [not intended for use with illustrations](https://wise.design/foundations/illustration#scale).\n */\nexport const Image = ({ alt = '', size = 48, className, ...props }: ListItemImageProps) => {\n useListItemMedia(size);\n\n return (\n <div\n className={clsx('wds-list-item-media-image-wrapper')}\n style={\n {\n '--wds-list-item-media-size': `${size}px`,\n } as React.CSSProperties\n }\n >\n <ImageComp\n {...props}\n className={clsx(className, 'wds-list-item-media-image')}\n alt={alt}\n role={alt ? 'graphics-symbol' : 'presentation'}\n />\n </div>\n );\n};\nImage.displayName = 'ListItem.Image';\n"],"names":["Image","alt","size","className","props","useListItemMedia","_jsx","clsx","style","children","ImageComp","role","displayName"],"mappings":";;;;;AA0BO,MAAMA,KAAK,GAAGA,CAAC;AAAEC,EAAAA,GAAG,GAAG,EAAE;AAAEC,EAAAA,IAAI,GAAG,EAAE;EAAEC,SAAS;EAAE,GAAGC;AAAK,CAAsB,KAAI;EACxFC,gBAAgB,CAACH,IAAI,CAAC;AAEtB,EAAA,oBACEI,GAAA,CAAA,KAAA,EAAA;AACEH,IAAAA,SAAS,EAAEI,IAAI,CAAC,mCAAmC,CAAE;AACrDC,IAAAA,KAAK,EACH;MACE,4BAA4B,EAAE,GAAGN,IAAI,CAAA,EAAA;KAExC;IAAAO,QAAA,eAEDH,GAAA,CAACI,OAAS,EAAA;AAAA,MAAA,GACJN,KAAK;AACTD,MAAAA,SAAS,EAAEI,IAAI,CAACJ,SAAS,EAAE,2BAA2B,CAAE;AACxDF,MAAAA,GAAG,EAAEA,GAAI;AACTU,MAAAA,IAAI,EAAEV,GAAG,GAAG,iBAAiB,GAAG;KAAe;AAEnD,GAAK,CAAC;AAEV;AACAD,KAAK,CAACY,WAAW,GAAG,gBAAgB;;;;"}
@@ -1,308 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- require('../common/theme.js');
7
- require('../common/direction.js');
8
- require('../common/propsValues/control.js');
9
- require('../common/propsValues/breakpoint.js');
10
- require('../common/propsValues/size.js');
11
- var typography = require('../common/propsValues/typography.js');
12
- require('../common/propsValues/width.js');
13
- require('../common/propsValues/type.js');
14
- require('../common/propsValues/dateMode.js');
15
- require('../common/propsValues/monthFormat.js');
16
- require('../common/propsValues/position.js');
17
- require('../common/propsValues/layouts.js');
18
- require('../common/propsValues/status.js');
19
- require('../common/propsValues/sentiment.js');
20
- require('../common/propsValues/profileType.js');
21
- require('../common/propsValues/variant.js');
22
- require('../common/propsValues/scroll.js');
23
- require('../common/propsValues/markdownNodeType.js');
24
- require('../common/fileType.js');
25
- require('@transferwise/icons');
26
- var clsx = require('clsx');
27
- require('react-intl');
28
- require('../common/closeButton/CloseButton.messages.js');
29
- var jsxRuntime = require('react/jsx-runtime');
30
- var Body = require('../body/Body.js');
31
- var ListItemAdditionalInfo = require('./AdditionalInfo/ListItemAdditionalInfo.js');
32
- var ListItemIconButton = require('./IconButton/ListItemIconButton.js');
33
- var ListItemCheckbox = require('./Checkbox/ListItemCheckbox.js');
34
- var ListItemNavigation = require('./Navigation/ListItemNavigation.js');
35
- var ListItemButton = require('./Button/ListItemButton.js');
36
- var ListItemRadio = require('./Radio/ListItemRadio.js');
37
- var ListItemSwitch = require('./Switch/ListItemSwitch.js');
38
- var ListItemAvatarLayout = require('./AvatarLayout/ListItemAvatarLayout.js');
39
- var ListItemAvatarView = require('./AvatarView/ListItemAvatarView.js');
40
- var ListItemImage = require('./Image/ListItemImage.js');
41
- var ListItemPrompt = require('./Prompt/ListItemPrompt.js');
42
- require('../primitives/PrimitiveButton/PrimitiveButton.js');
43
- var PrimitiveAnchor = require('../primitives/PrimitiveAnchor/PrimitiveAnchor.js');
44
- var ListItemContext = require('./ListItemContext.js');
45
-
46
- /* eslint-disable functional/immutable-data */
47
- const ListItem = ({
48
- as: ListItemElement = 'li',
49
- title,
50
- subtitle,
51
- additionalInfo,
52
- prompt,
53
- inverted,
54
- media,
55
- spotlight,
56
- valueTitle,
57
- valueSubtitle,
58
- control = null,
59
- disabled,
60
- className,
61
- valueColumnWidth,
62
- role,
63
- id,
64
- 'aria-labelledby': ariaLabelledby
65
- }) => {
66
- const idPrefix = React.useId();
67
- const [controlProps, setControlProps] = React.useState({});
68
- const [controlType, setControlType] = React.useState('non-interactive');
69
- const [mediaSize, setMediaSize] = React.useState();
70
- const ids = {
71
- title: `${idPrefix}_title`,
72
- ...(subtitle ? {
73
- subtitle: `${idPrefix}_subtitle`
74
- } : {}),
75
- ...(valueTitle ? {
76
- valueTitle: `${idPrefix}_value-title`
77
- } : {}),
78
- ...(valueSubtitle ? {
79
- valueSubtitle: `${idPrefix}_value-subtitle`
80
- } : {}),
81
- control: `${idPrefix}_control`,
82
- ...(prompt ? {
83
- prompt: `${idPrefix}_prompt`
84
- } : {}),
85
- ...(additionalInfo ? {
86
- additionalInfo: `${idPrefix}_additional-info`
87
- } : {})
88
- };
89
- const isPartiallyInteractive = Boolean((controlType === 'button' || controlType === 'icon-button') && controlProps?.partiallyInteractive);
90
- const isFullyInteractive = controlType !== 'non-interactive' && !isPartiallyInteractive;
91
- const isButtonAsLink = (controlType === 'button' || controlType === 'icon-button') && Boolean(controlProps?.href);
92
- const titlesAndValues = [inverted ? ids.subtitle : ids.title, inverted ? ids.title : ids.subtitle, inverted ? ids.valueSubtitle : ids.valueTitle, inverted ? ids.valueTitle : ids.valueSubtitle].join(' ');
93
- const additionalInfoPrompt = [ids.additionalInfo, ids.prompt].filter(Boolean).join(' ');
94
- const describedByIds = React.useMemo(() => {
95
- return isFullyInteractive && !isButtonAsLink ? additionalInfoPrompt : `${titlesAndValues} ${additionalInfoPrompt}`;
96
- }, [isFullyInteractive]);
97
- const listItemContext = React.useMemo(() => ({
98
- setControlType,
99
- setControlProps,
100
- setMediaSize,
101
- ids,
102
- props: {
103
- disabled,
104
- inverted
105
- },
106
- mediaSize,
107
- describedByIds
108
- }), [describedByIds, mediaSize]);
109
- const gridColumnsStyle = {
110
- '--wds-list-item-body-left': valueColumnWidth ? `${100 - valueColumnWidth}fr` : '50fr',
111
- '--wds-list-item-body-right': valueColumnWidth ? `${valueColumnWidth}fr` : '50fr'
112
- };
113
- const getFeatureClassName = () => {
114
- const partials = [];
115
- const hasMedia = Boolean(media);
116
- const hasControl = Boolean(control);
117
- const hasInfo = Boolean(additionalInfo);
118
- const hasPrompt = Boolean(prompt);
119
- if (hasMedia && hasControl) {
120
- partials.push('wds-list-item-hasMedia-hasControl');
121
- }
122
- if (hasMedia && !hasControl) {
123
- partials.push('wds-list-item-hasMedia-noControl');
124
- }
125
- if (!hasMedia && hasControl) {
126
- partials.push('wds-list-item-noMedia-hasControl');
127
- }
128
- if (!hasMedia && !hasControl) {
129
- partials.push('wds-list-item-noMedia-noControl');
130
- }
131
- if (hasInfo && hasPrompt) {
132
- partials.push('wds-list-item-hasInfo-hasPrompt');
133
- }
134
- if (hasInfo && !hasPrompt) {
135
- partials.push('wds-list-item-hasInfo-noPrompt');
136
- }
137
- if (!hasInfo && hasPrompt) {
138
- partials.push('wds-list-item-noInfo-hasPrompt');
139
- }
140
- if (!hasInfo && !hasPrompt) {
141
- partials.push('wds-list-item-noInfo-noPrompt');
142
- }
143
- return partials.join(' ');
144
- };
145
- return /*#__PURE__*/jsxRuntime.jsx(ListItemContext.ListItemContext.Provider, {
146
- value: listItemContext,
147
- children: /*#__PURE__*/jsxRuntime.jsx(ListItemElement, {
148
- className: clsx.clsx('wds-list-item', `wds-list-item-${controlType}`, getFeatureClassName(), {
149
- 'wds-list-item-interactive': isFullyInteractive,
150
- 'wds-list-item-partially-interactive': isPartiallyInteractive,
151
- [`wds-list-item-spotlight wds-list-item-spotlight-${spotlight}`]: isFullyInteractive && !!spotlight,
152
- disabled
153
- }, className),
154
- id: id,
155
- role: role,
156
- "aria-disabled": disabled,
157
- "aria-labelledby": ariaLabelledby,
158
- children: /*#__PURE__*/jsxRuntime.jsxs(View, {
159
- isPartiallyInteractive,
160
- subtitle,
161
- additionalInfo,
162
- disabled,
163
- prompt,
164
- controlType,
165
- controlProps,
166
- className: getFeatureClassName(),
167
- children: [media && /*#__PURE__*/jsxRuntime.jsx("div", {
168
- className: "wds-list-item-media",
169
- children: media
170
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
171
- className: "wds-list-item-body",
172
- style: valueColumnWidth ? gridColumnsStyle : undefined,
173
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
174
- className: clsx.clsx({
175
- 'wds-list-item-body-center': title && !subtitle
176
- }),
177
- children: (() => {
178
- const titles = [/*#__PURE__*/jsxRuntime.jsx(Body.default, {
179
- id: ids.title,
180
- type: typography.Typography.BODY_LARGE_BOLD,
181
- className: "wds-list-item-title",
182
- children: title
183
- }, ids.title)];
184
- if (subtitle) {
185
- titles.push(/*#__PURE__*/jsxRuntime.jsx(Body.default, {
186
- id: ids.subtitle,
187
- className: "wds-list-item-subtitle",
188
- children: subtitle
189
- }, ids.subtitle));
190
- }
191
- return inverted ? [...titles].reverse() : titles;
192
- })()
193
- }), (valueTitle || valueSubtitle) && /*#__PURE__*/jsxRuntime.jsx("span", {
194
- className: clsx.clsx('wds-list-item-value', {
195
- 'flex-column': valueTitle !== undefined || valueSubtitle !== undefined,
196
- 'wds-list-item-body-center': valueTitle && !valueSubtitle || !valueTitle && valueSubtitle
197
- }),
198
- children: (() => {
199
- const values = [];
200
- if (valueTitle) {
201
- values.push(/*#__PURE__*/jsxRuntime.jsx(Body.default, {
202
- id: ids.valueTitle,
203
- type: typography.Typography.BODY_LARGE_BOLD,
204
- className: "wds-list-item-title-value",
205
- children: valueTitle
206
- }, ids.valueTitle));
207
- }
208
- if (valueSubtitle) {
209
- values.push(/*#__PURE__*/jsxRuntime.jsx(Body.default, {
210
- id: ids.valueSubtitle,
211
- className: "wds-list-item-subtitle-value",
212
- children: valueSubtitle
213
- }, ids.valueSubtitle));
214
- }
215
- return inverted ? [...values].reverse() : values;
216
- })()
217
- })]
218
- }), control === null ? null : /*#__PURE__*/jsxRuntime.jsx(Body.default, {
219
- className: clsx.clsx('wds-list-item-control-wrapper', {
220
- 'wds-list-item-button-control': controlType === 'button'
221
- }),
222
- style: {
223
- '--wds-list-item-control-wrapper-height': mediaSize ? `${mediaSize}px` : 'auto'
224
- },
225
- children: control
226
- })]
227
- })
228
- })
229
- });
230
- };
231
- function View({
232
- children,
233
- subtitle,
234
- additionalInfo,
235
- prompt,
236
- disabled,
237
- isPartiallyInteractive,
238
- controlType = 'non-interactive',
239
- controlProps,
240
- className = ''
241
- }) {
242
- const {
243
- ids,
244
- describedByIds
245
- } = React.useContext(ListItemContext.ListItemContext);
246
- const isLinkControl = ['navigation'].includes(controlType);
247
- const isHrefProvided = isLinkControl && !!controlProps?.href && controlProps?.href !== '#';
248
- const renderExtras = () => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
249
- children: [Boolean(subtitle) && additionalInfo, prompt]
250
- });
251
- if (isLinkControl && isHrefProvided) {
252
- return (
253
- /*#__PURE__*/
254
- // for link instances of .Navigation, .IconButton, .Button
255
- jsxRuntime.jsxs("div", {
256
- className: clsx.clsx('wds-list-item-gridWrapper', className),
257
- children: [/*#__PURE__*/jsxRuntime.jsx(PrimitiveAnchor.default, {
258
- "aria-describedby": describedByIds,
259
- href: controlProps?.href,
260
- target: controlProps?.target,
261
- className: clsx.clsx('wds-list-item-view d-flex flex-row', {
262
- 'wds-list-item-control': controlType === 'navigation'
263
- }),
264
- disabled: disabled,
265
- children: children
266
- }), renderExtras()]
267
- })
268
- );
269
- }
270
- if (isPartiallyInteractive || controlType === 'non-interactive') {
271
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
272
- className: clsx.clsx('wds-list-item-gridWrapper', className),
273
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
274
- className: clsx.clsx('wds-list-item-view d-flex flex-row'),
275
- children: children
276
- }), renderExtras()]
277
- });
278
- }
279
- // for form control instances of .Radio, .Checkbox, .Switch, .Button, .Navigation etc
280
- // Radio cannot be wrapped in a <fieldset> element to announce it as a group.
281
- const InputWrapper = controlType === 'radio' ? 'div' : 'fieldset';
282
- return /*#__PURE__*/jsxRuntime.jsxs(InputWrapper, {
283
- className: clsx.clsx('wds-list-item-gridWrapper', className),
284
- children: [/*#__PURE__*/jsxRuntime.jsx("label", {
285
- htmlFor: ids.control,
286
- className: clsx.clsx('wds-list-item-view', {
287
- clickable: !disabled,
288
- fullyInteractive: !isPartiallyInteractive
289
- }),
290
- children: children
291
- }), renderExtras()]
292
- });
293
- }
294
- ListItem.Image = ListItemImage.Image;
295
- ListItem.AvatarView = ListItemAvatarView.AvatarView;
296
- ListItem.AvatarLayout = ListItemAvatarLayout.AvatarLayout;
297
- ListItem.AdditionalInfo = ListItemAdditionalInfo.AdditionalInfo;
298
- ListItem.Checkbox = ListItemCheckbox.Checkbox;
299
- ListItem.Radio = ListItemRadio.Radio;
300
- ListItem.IconButton = ListItemIconButton.IconButton;
301
- ListItem.Navigation = ListItemNavigation.Navigation;
302
- ListItem.Button = ListItemButton.Button;
303
- ListItem.Switch = ListItemSwitch.Switch;
304
- ListItem.Prompt = ListItemPrompt.Prompt;
305
-
306
- exports.ListItem = ListItem;
307
- exports.default = ListItem;
308
- //# sourceMappingURL=ListItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListItem.js","sources":["../../src/listItem/ListItem.tsx"],"sourcesContent":["/* eslint-disable functional/immutable-data */\nimport {\n useContext,\n useId,\n useMemo,\n useState,\n useEffect,\n type PropsWithChildren,\n type ReactNode,\n} from 'react';\nimport { Typography } from '../common';\nimport Body from '../body';\nimport { AdditionalInfo } from './AdditionalInfo';\nimport { IconButton, type ListItemIconButtonProps } from './IconButton';\nimport { Checkbox, type ListItemCheckboxProps } from './Checkbox';\nimport { Navigation, type ListItemNavigationProps } from './Navigation';\nimport { clsx } from 'clsx';\nimport { Button, type ListItemButtonProps } from './Button';\nimport { Radio, type ListItemRadioProps } from './Radio';\nimport { Switch, type ListItemSwitchProps } from './Switch';\nimport { AvatarLayout } from './AvatarLayout';\nimport { AvatarView } from './AvatarView';\nimport { Image } from './Image';\nimport { Prompt } from './Prompt';\nimport { PrimitiveAnchor } from '../primitives';\nimport {\n ListItemContext,\n type ListItemContextData,\n type ListItemMediaSize,\n} from './ListItemContext';\n\nexport type ListItemTypes =\n | 'non-interactive'\n | 'navigation'\n | 'radio'\n | 'checkbox'\n | 'switch'\n | 'button'\n | 'icon-button';\n\nexport type ListItemControlProps =\n | ListItemNavigationProps\n | ListItemCheckboxProps\n | ListItemButtonProps\n | ListItemIconButtonProps\n | ListItemRadioProps\n | ListItemSwitchProps;\n\nexport type Props = {\n as?: 'li' | 'div';\n /**\n * Swaps vertical hierarchy of title and subtitle and their corresponding right values.\n */\n inverted?: boolean;\n disabled?: boolean;\n /**\n * Highlights the list item as an action to be taken or already taken. <br />\n */\n spotlight?: 'active' | 'inactive';\n title: ReactNode;\n subtitle?: ReactNode;\n /**\n * Requires `<ListItem.AdditionalInfo />` component as a sole child. <br />\n * Can be only rendered if `subtitle` is also provided.\n */\n additionalInfo?: ReactNode;\n valueTitle?: ReactNode;\n valueSubtitle?: ReactNode;\n /**\n * Requires one of the following as a sole child: <br />\n * `<ListItem.AvatarView />`,\n * `<ListItem.AvatarLayout />` or\n * `<ListItem.Image />`\n */\n media?: ReactNode;\n /**\n * Requires one of the following as a sole child: <br/>\n * `<ListItem.Button />`, <br/>\n * `<ListItem.Checkbox />`, <br/>\n * `<ListItem.IconButton />`, <br/>\n * `<ListItem.Navigation />`, <br/>\n * `<ListItem.Radio />`, or\n * `<ListItem.Switch />`\n */\n control?: ReactNode;\n /**\n * Requires `<ListItem.Prompt />` component as a sole child.\n */\n prompt?: ReactNode;\n className?: string;\n /**\n * A number between `0–100` which resolves to a `fr` value of a `grid-template-columns` declaration. E.g. `valueColumnWidth={25}` will result in a `75fr 25fr`. <br />\n * Controls the width ratio of left side content (title and subtitle) to the right side content.\n */\n valueColumnWidth?: number;\n id?: string;\n role?: string;\n 'aria-labelledby'?: string;\n};\n\n/**\n * @see [Design documentation](https://wise.design/components/list-item)\n * @see [Storybook documentation](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n */\nexport const ListItem = ({\n as: ListItemElement = 'li',\n title,\n subtitle,\n additionalInfo,\n prompt,\n inverted,\n media,\n spotlight,\n valueTitle,\n valueSubtitle,\n control = null,\n disabled,\n className,\n valueColumnWidth,\n role,\n id,\n 'aria-labelledby': ariaLabelledby,\n}: Props) => {\n const idPrefix = useId();\n const [controlProps, setControlProps] = useState<ListItemControlProps>({});\n const [controlType, setControlType] = useState<ListItemTypes>('non-interactive');\n const [mediaSize, setMediaSize] = useState<ListItemMediaSize | undefined>();\n\n const ids: ListItemContextData['ids'] = {\n title: `${idPrefix}_title`,\n ...(subtitle ? { subtitle: `${idPrefix}_subtitle` } : {}),\n ...(valueTitle ? { valueTitle: `${idPrefix}_value-title` } : {}),\n ...(valueSubtitle ? { valueSubtitle: `${idPrefix}_value-subtitle` } : {}),\n control: `${idPrefix}_control`,\n ...(prompt ? { prompt: `${idPrefix}_prompt` } : {}),\n ...(additionalInfo ? { additionalInfo: `${idPrefix}_additional-info` } : {}),\n };\n\n const isPartiallyInteractive = Boolean(\n (controlType === 'button' || controlType === 'icon-button') &&\n (controlProps as ListItemButtonProps | ListItemIconButtonProps)?.partiallyInteractive,\n );\n const isFullyInteractive = controlType !== 'non-interactive' && !isPartiallyInteractive;\n const isButtonAsLink =\n (controlType === 'button' || controlType === 'icon-button') &&\n Boolean((controlProps as ListItemButtonProps | ListItemIconButtonProps)?.href);\n\n const titlesAndValues = [\n inverted ? ids.subtitle : ids.title,\n inverted ? ids.title : ids.subtitle,\n inverted ? ids.valueSubtitle : ids.valueTitle,\n inverted ? ids.valueTitle : ids.valueSubtitle,\n ].join(' ');\n const additionalInfoPrompt = [ids.additionalInfo, ids.prompt].filter(Boolean).join(' ');\n\n const describedByIds = useMemo(() => {\n return isFullyInteractive && !isButtonAsLink\n ? additionalInfoPrompt\n : `${titlesAndValues} ${additionalInfoPrompt}`;\n }, [isFullyInteractive]);\n\n const listItemContext = useMemo(\n () => ({\n setControlType,\n setControlProps,\n setMediaSize,\n ids,\n props: { disabled, inverted },\n mediaSize,\n describedByIds,\n }),\n [describedByIds, mediaSize],\n );\n const gridColumnsStyle = {\n '--wds-list-item-body-left': valueColumnWidth ? `${100 - valueColumnWidth}fr` : '50fr',\n '--wds-list-item-body-right': valueColumnWidth ? `${valueColumnWidth}fr` : '50fr',\n } as React.CSSProperties;\n\n const getFeatureClassName = () => {\n const partials = [];\n const hasMedia = Boolean(media);\n const hasControl = Boolean(control);\n const hasInfo = Boolean(additionalInfo);\n const hasPrompt = Boolean(prompt);\n\n if (hasMedia && hasControl) {\n partials.push('wds-list-item-hasMedia-hasControl');\n }\n\n if (hasMedia && !hasControl) {\n partials.push('wds-list-item-hasMedia-noControl');\n }\n\n if (!hasMedia && hasControl) {\n partials.push('wds-list-item-noMedia-hasControl');\n }\n\n if (!hasMedia && !hasControl) {\n partials.push('wds-list-item-noMedia-noControl');\n }\n\n if (hasInfo && hasPrompt) {\n partials.push('wds-list-item-hasInfo-hasPrompt');\n }\n if (hasInfo && !hasPrompt) {\n partials.push('wds-list-item-hasInfo-noPrompt');\n }\n if (!hasInfo && hasPrompt) {\n partials.push('wds-list-item-noInfo-hasPrompt');\n }\n if (!hasInfo && !hasPrompt) {\n partials.push('wds-list-item-noInfo-noPrompt');\n }\n\n return partials.join(' ');\n };\n\n return (\n <ListItemContext.Provider value={listItemContext}>\n <ListItemElement\n className={clsx(\n 'wds-list-item',\n `wds-list-item-${controlType}`,\n getFeatureClassName(),\n {\n 'wds-list-item-interactive': isFullyInteractive,\n 'wds-list-item-partially-interactive': isPartiallyInteractive,\n [`wds-list-item-spotlight wds-list-item-spotlight-${spotlight}`]:\n isFullyInteractive && !!spotlight,\n disabled,\n },\n className,\n )}\n id={id}\n role={role}\n aria-disabled={disabled}\n aria-labelledby={ariaLabelledby}\n >\n <View\n {...{\n isPartiallyInteractive,\n subtitle,\n additionalInfo,\n disabled,\n prompt,\n controlType,\n controlProps,\n }}\n className={getFeatureClassName()}\n >\n {media && <div className=\"wds-list-item-media\">{media}</div>}\n\n {/* Title + Subtitle + Values - Group */}\n <div\n className=\"wds-list-item-body\"\n style={valueColumnWidth ? gridColumnsStyle : undefined}\n >\n {/* Title + Subtitle + Values - Group */}\n <span\n className={clsx({\n 'wds-list-item-body-center': title && !subtitle,\n })}\n >\n {(() => {\n const titles = [\n <Body\n key={ids.title}\n id={ids.title}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-list-item-title\"\n >\n {title}\n </Body>,\n ];\n if (subtitle) {\n titles.push(\n <Body key={ids.subtitle} id={ids.subtitle} className=\"wds-list-item-subtitle\">\n {subtitle}\n </Body>,\n );\n }\n return inverted ? [...titles].reverse() : titles;\n })()}\n </span>\n\n {(valueTitle || valueSubtitle) && (\n <span\n className={clsx('wds-list-item-value', {\n 'flex-column': valueTitle !== undefined || valueSubtitle !== undefined,\n 'wds-list-item-body-center':\n (valueTitle && !valueSubtitle) || (!valueTitle && valueSubtitle),\n })}\n >\n {(() => {\n const values = [];\n if (valueTitle) {\n values.push(\n <Body\n key={ids.valueTitle}\n id={ids.valueTitle}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-list-item-title-value\"\n >\n {valueTitle}\n </Body>,\n );\n }\n if (valueSubtitle) {\n values.push(\n <Body\n key={ids.valueSubtitle}\n id={ids.valueSubtitle}\n className=\"wds-list-item-subtitle-value\"\n >\n {valueSubtitle}\n </Body>,\n );\n }\n return inverted ? [...values].reverse() : values;\n })()}\n </span>\n )}\n </div>\n\n {control === null ? null : (\n <Body\n className={clsx('wds-list-item-control-wrapper', {\n 'wds-list-item-button-control': controlType === 'button',\n })}\n style={\n {\n '--wds-list-item-control-wrapper-height': mediaSize ? `${mediaSize}px` : 'auto',\n } as React.CSSProperties\n }\n >\n {control}\n </Body>\n )}\n </View>\n </ListItemElement>\n </ListItemContext.Provider>\n );\n};\n\ntype ViewProps = PropsWithChildren<{\n isPartiallyInteractive: boolean;\n controlType?: ListItemTypes;\n controlProps?: ListItemControlProps;\n}> &\n Pick<Props, 'subtitle' | 'additionalInfo' | 'disabled' | 'prompt' | 'className'>;\n\nfunction View({\n children,\n subtitle,\n additionalInfo,\n prompt,\n disabled,\n isPartiallyInteractive,\n controlType = 'non-interactive',\n controlProps,\n className = '',\n}: ViewProps) {\n const { ids, describedByIds } = useContext<ListItemContextData>(ListItemContext);\n const isLinkControl = ['navigation'].includes(controlType);\n\n const isHrefProvided =\n isLinkControl &&\n !!(controlProps as ListItemNavigationProps)?.href &&\n (controlProps as ListItemNavigationProps)?.href !== '#';\n\n const renderExtras = () => (\n <>\n {Boolean(subtitle) && additionalInfo}\n {prompt}\n </>\n );\n\n if (isLinkControl && isHrefProvided) {\n return (\n // for link instances of .Navigation, .IconButton, .Button\n <div className={clsx('wds-list-item-gridWrapper', className)}>\n <PrimitiveAnchor\n aria-describedby={describedByIds}\n href={(controlProps as ListItemNavigationProps)?.href}\n target={(controlProps as ListItemNavigationProps)?.target}\n className={clsx('wds-list-item-view d-flex flex-row', {\n 'wds-list-item-control': controlType === 'navigation',\n })}\n disabled={disabled}\n >\n {children}\n </PrimitiveAnchor>\n\n {renderExtras()}\n </div>\n );\n }\n\n if (isPartiallyInteractive || controlType === 'non-interactive') {\n return (\n <div className={clsx('wds-list-item-gridWrapper', className)}>\n <div className={clsx('wds-list-item-view d-flex flex-row')}>{children}</div>\n\n {renderExtras()}\n </div>\n );\n }\n\n // for form control instances of .Radio, .Checkbox, .Switch, .Button, .Navigation etc\n // Radio cannot be wrapped in a <fieldset> element to announce it as a group.\n const InputWrapper = controlType === 'radio' ? 'div' : 'fieldset';\n return (\n <InputWrapper className={clsx('wds-list-item-gridWrapper', className)}>\n <label\n htmlFor={ids.control}\n className={clsx('wds-list-item-view', {\n clickable: !disabled,\n fullyInteractive: !isPartiallyInteractive,\n })}\n >\n {children}\n </label>\n\n {renderExtras()}\n </InputWrapper>\n );\n}\n\nListItem.Image = Image;\nListItem.AvatarView = AvatarView;\nListItem.AvatarLayout = AvatarLayout;\nListItem.AdditionalInfo = AdditionalInfo;\nListItem.Checkbox = Checkbox;\nListItem.Radio = Radio;\nListItem.IconButton = IconButton;\nListItem.Navigation = Navigation;\nListItem.Button = Button;\nListItem.Switch = Switch;\nListItem.Prompt = Prompt;\n\nexport default ListItem;\n"],"names":["ListItem","as","ListItemElement","title","subtitle","additionalInfo","prompt","inverted","media","spotlight","valueTitle","valueSubtitle","control","disabled","className","valueColumnWidth","role","id","ariaLabelledby","idPrefix","useId","controlProps","setControlProps","useState","controlType","setControlType","mediaSize","setMediaSize","ids","isPartiallyInteractive","Boolean","partiallyInteractive","isFullyInteractive","isButtonAsLink","href","titlesAndValues","join","additionalInfoPrompt","filter","describedByIds","useMemo","listItemContext","props","gridColumnsStyle","getFeatureClassName","partials","hasMedia","hasControl","hasInfo","hasPrompt","push","_jsx","ListItemContext","Provider","value","children","clsx","_jsxs","View","style","undefined","titles","Body","type","Typography","BODY_LARGE_BOLD","reverse","values","useContext","isLinkControl","includes","isHrefProvided","renderExtras","_Fragment","PrimitiveAnchor","target","InputWrapper","htmlFor","clickable","fullyInteractive","Image","AvatarView","AvatarLayout","AdditionalInfo","Checkbox","Radio","IconButton","Navigation","Button","Switch","Prompt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAwGO,MAAMA,QAAQ,GAAGA,CAAC;EACvBC,EAAE,EAAEC,eAAe,GAAG,IAAI;EAC1BC,KAAK;EACLC,QAAQ;EACRC,cAAc;EACdC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACLC,SAAS;EACTC,UAAU;EACVC,aAAa;AACbC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,SAAS;EACTC,gBAAgB;EAChBC,IAAI;EACJC,EAAE;AACF,EAAA,iBAAiB,EAAEC;AAAc,CAC3B,KAAI;AACV,EAAA,MAAMC,QAAQ,GAAGC,WAAK,EAAE;EACxB,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,cAAQ,CAAuB,EAAE,CAAC;EAC1E,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGF,cAAQ,CAAgB,iBAAiB,CAAC;EAChF,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,G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