@pagopa/io-app-design-system 1.16.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (467) hide show
  1. package/README.md +131 -54
  2. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
  3. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
  4. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +6 -2
  5. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
  6. package/lib/commonjs/components/codeInput/CodeInput.js +103 -0
  7. package/lib/commonjs/components/codeInput/CodeInput.js.map +1 -0
  8. package/lib/commonjs/components/codeInput/index.js +17 -0
  9. package/lib/commonjs/components/codeInput/index.js.map +1 -0
  10. package/lib/commonjs/components/icons/Icon.js +2 -0
  11. package/lib/commonjs/components/icons/Icon.js.map +1 -1
  12. package/lib/commonjs/components/icons/README.md +79 -19
  13. package/lib/commonjs/components/icons/svg/IconSparkles.js +30 -0
  14. package/lib/commonjs/components/icons/svg/IconSparkles.js.map +1 -0
  15. package/lib/commonjs/components/icons/svg/originals/IconSparkles.svg +3 -0
  16. package/lib/commonjs/components/index.js +48 -26
  17. package/lib/commonjs/components/index.js.map +1 -1
  18. package/lib/commonjs/components/layout/HeaderSecondLevel.js +5 -4
  19. package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
  20. package/lib/commonjs/components/listitems/ListItemAction.js +4 -3
  21. package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
  22. package/lib/commonjs/components/listitems/ListItemHeader.js +87 -0
  23. package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -0
  24. package/lib/commonjs/components/listitems/ListItemInfo.js +18 -14
  25. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  26. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +5 -30
  27. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  28. package/lib/commonjs/components/listitems/ListItemNav.js +15 -23
  29. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  30. package/lib/commonjs/components/listitems/ListItemNavAlert.js +4 -22
  31. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  32. package/lib/commonjs/components/listitems/ListItemRadio.js +69 -10
  33. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
  34. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +64 -0
  35. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -0
  36. package/lib/commonjs/components/listitems/ListItemTransaction.js +8 -5
  37. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  38. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
  39. package/lib/commonjs/components/listitems/__test__/listitem.test.js +17 -0
  40. package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
  41. package/lib/commonjs/components/listitems/index.js +22 -0
  42. package/lib/commonjs/components/listitems/index.js.map +1 -1
  43. package/lib/commonjs/components/modules/ModuleCheckout.js +103 -0
  44. package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -0
  45. package/lib/commonjs/components/modules/index.js +11 -0
  46. package/lib/commonjs/components/modules/index.js.map +1 -1
  47. package/lib/commonjs/components/numberpad/NumberPad.js +7 -10
  48. package/lib/commonjs/components/numberpad/NumberPad.js.map +1 -1
  49. package/lib/commonjs/components/pictograms/Pictogram.js +19 -1
  50. package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
  51. package/lib/commonjs/components/pictograms/README.md +103 -14
  52. package/lib/commonjs/components/pictograms/svg/PictogramBiometric.js +82 -0
  53. package/lib/commonjs/components/pictograms/svg/PictogramBiometric.js.map +1 -0
  54. package/lib/commonjs/components/pictograms/svg/PictogramBleedEnded.js +43 -0
  55. package/lib/commonjs/components/pictograms/svg/PictogramBleedEnded.js.map +1 -0
  56. package/lib/commonjs/components/pictograms/svg/PictogramBleedLostConnection.js +64 -0
  57. package/lib/commonjs/components/pictograms/svg/PictogramBleedLostConnection.js.map +1 -0
  58. package/lib/commonjs/components/pictograms/svg/PictogramBleedPending.js +15 -9
  59. package/lib/commonjs/components/pictograms/svg/PictogramBleedPending.js.map +1 -1
  60. package/lib/commonjs/components/pictograms/svg/PictogramBleedQrCode.js +79 -0
  61. package/lib/commonjs/components/pictograms/svg/PictogramBleedQrCode.js.map +1 -0
  62. package/lib/commonjs/components/pictograms/svg/PictogramEmailDotCheck.js +60 -0
  63. package/lib/commonjs/components/pictograms/svg/PictogramEmailDotCheck.js.map +1 -0
  64. package/lib/commonjs/components/pictograms/svg/PictogramEmailDotNotif.js +58 -0
  65. package/lib/commonjs/components/pictograms/svg/PictogramEmailDotNotif.js.map +1 -0
  66. package/lib/commonjs/components/pictograms/svg/PictogramEnded.js +43 -0
  67. package/lib/commonjs/components/pictograms/svg/PictogramEnded.js.map +1 -0
  68. package/lib/commonjs/components/pictograms/svg/PictogramLostConnection.js +58 -0
  69. package/lib/commonjs/components/pictograms/svg/PictogramLostConnection.js.map +1 -0
  70. package/lib/commonjs/components/pictograms/svg/PictogramPending.js +15 -9
  71. package/lib/commonjs/components/pictograms/svg/PictogramPending.js.map +1 -1
  72. package/lib/commonjs/components/pictograms/svg/PictogramQrCode.js +91 -0
  73. package/lib/commonjs/components/pictograms/svg/PictogramQrCode.js.map +1 -0
  74. package/lib/commonjs/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
  75. package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
  76. package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
  77. package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
  78. package/lib/commonjs/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
  79. package/lib/commonjs/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
  80. package/lib/commonjs/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
  81. package/lib/commonjs/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
  82. package/lib/commonjs/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
  83. package/lib/commonjs/components/pictograms/svg/originals/PictogramPending.svg +1 -1
  84. package/lib/commonjs/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
  85. package/lib/commonjs/components/radio/RadioGroup.js +2 -1
  86. package/lib/commonjs/components/radio/RadioGroup.js.map +1 -1
  87. package/lib/commonjs/components/stepper/Stepper.js +52 -0
  88. package/lib/commonjs/components/stepper/Stepper.js.map +1 -0
  89. package/lib/commonjs/components/stepper/index.js +17 -0
  90. package/lib/commonjs/components/stepper/index.js.map +1 -0
  91. package/lib/commonjs/components/typography/H1.js +5 -3
  92. package/lib/commonjs/components/typography/H1.js.map +1 -1
  93. package/lib/commonjs/components/typography/H2.js +5 -3
  94. package/lib/commonjs/components/typography/H2.js.map +1 -1
  95. package/lib/commonjs/components/typography/H3.js +5 -3
  96. package/lib/commonjs/components/typography/H3.js.map +1 -1
  97. package/lib/commonjs/components/typography/H4.js +2 -1
  98. package/lib/commonjs/components/typography/H4.js.map +1 -1
  99. package/lib/commonjs/components/typography/H6.js +4 -2
  100. package/lib/commonjs/components/typography/H6.js.map +1 -1
  101. package/lib/commonjs/components/typography/Hero.js +7 -3
  102. package/lib/commonjs/components/typography/Hero.js.map +1 -1
  103. package/lib/commonjs/components/typography/LabelSmall.js +6 -1
  104. package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
  105. package/lib/commonjs/components/typography/LabelSmallAlt.js +39 -0
  106. package/lib/commonjs/components/typography/LabelSmallAlt.js.map +1 -0
  107. package/lib/commonjs/components/typography/README.md +23 -0
  108. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
  109. package/lib/commonjs/components/typography/index.js +11 -0
  110. package/lib/commonjs/components/typography/index.js.map +1 -1
  111. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
  112. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
  113. package/lib/module/components/checkbox/AnimatedCheckbox.js +6 -2
  114. package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
  115. package/lib/module/components/codeInput/CodeInput.js +94 -0
  116. package/lib/module/components/codeInput/CodeInput.js.map +1 -0
  117. package/lib/module/components/codeInput/index.js +2 -0
  118. package/lib/module/components/codeInput/index.js.map +1 -0
  119. package/lib/module/components/icons/Icon.js +2 -0
  120. package/lib/module/components/icons/Icon.js.map +1 -1
  121. package/lib/module/components/icons/README.md +79 -19
  122. package/lib/module/components/icons/svg/IconSparkles.js +21 -0
  123. package/lib/module/components/icons/svg/IconSparkles.js.map +1 -0
  124. package/lib/module/components/icons/svg/originals/IconSparkles.svg +3 -0
  125. package/lib/module/components/index.js +5 -3
  126. package/lib/module/components/index.js.map +1 -1
  127. package/lib/module/components/layout/HeaderSecondLevel.js +5 -4
  128. package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
  129. package/lib/module/components/listitems/ListItemAction.js +4 -3
  130. package/lib/module/components/listitems/ListItemAction.js.map +1 -1
  131. package/lib/module/components/listitems/ListItemHeader.js +77 -0
  132. package/lib/module/components/listitems/ListItemHeader.js.map +1 -0
  133. package/lib/module/components/listitems/ListItemInfo.js +18 -14
  134. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  135. package/lib/module/components/listitems/ListItemInfoCopy.js +7 -32
  136. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  137. package/lib/module/components/listitems/ListItemNav.js +17 -26
  138. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  139. package/lib/module/components/listitems/ListItemNavAlert.js +6 -24
  140. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  141. package/lib/module/components/listitems/ListItemRadio.js +69 -10
  142. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  143. package/lib/module/components/listitems/ListItemRadioWithAmount.js +54 -0
  144. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -0
  145. package/lib/module/components/listitems/ListItemTransaction.js +10 -7
  146. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  147. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
  148. package/lib/module/components/listitems/__test__/listitem.test.js +17 -0
  149. package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
  150. package/lib/module/components/listitems/index.js +2 -0
  151. package/lib/module/components/listitems/index.js.map +1 -1
  152. package/lib/module/components/modules/ModuleCheckout.js +95 -0
  153. package/lib/module/components/modules/ModuleCheckout.js.map +1 -0
  154. package/lib/module/components/modules/index.js +1 -0
  155. package/lib/module/components/modules/index.js.map +1 -1
  156. package/lib/module/components/numberpad/NumberPad.js +6 -7
  157. package/lib/module/components/numberpad/NumberPad.js.map +1 -1
  158. package/lib/module/components/pictograms/Pictogram.js +19 -1
  159. package/lib/module/components/pictograms/Pictogram.js.map +1 -1
  160. package/lib/module/components/pictograms/README.md +103 -14
  161. package/lib/module/components/pictograms/svg/PictogramBiometric.js +74 -0
  162. package/lib/module/components/pictograms/svg/PictogramBiometric.js.map +1 -0
  163. package/lib/module/components/pictograms/svg/PictogramBleedEnded.js +35 -0
  164. package/lib/module/components/pictograms/svg/PictogramBleedEnded.js.map +1 -0
  165. package/lib/module/components/pictograms/svg/PictogramBleedLostConnection.js +56 -0
  166. package/lib/module/components/pictograms/svg/PictogramBleedLostConnection.js.map +1 -0
  167. package/lib/module/components/pictograms/svg/PictogramBleedPending.js +15 -9
  168. package/lib/module/components/pictograms/svg/PictogramBleedPending.js.map +1 -1
  169. package/lib/module/components/pictograms/svg/PictogramBleedQrCode.js +71 -0
  170. package/lib/module/components/pictograms/svg/PictogramBleedQrCode.js.map +1 -0
  171. package/lib/module/components/pictograms/svg/PictogramEmailDotCheck.js +52 -0
  172. package/lib/module/components/pictograms/svg/PictogramEmailDotCheck.js.map +1 -0
  173. package/lib/module/components/pictograms/svg/PictogramEmailDotNotif.js +50 -0
  174. package/lib/module/components/pictograms/svg/PictogramEmailDotNotif.js.map +1 -0
  175. package/lib/module/components/pictograms/svg/PictogramEnded.js +35 -0
  176. package/lib/module/components/pictograms/svg/PictogramEnded.js.map +1 -0
  177. package/lib/module/components/pictograms/svg/PictogramLostConnection.js +50 -0
  178. package/lib/module/components/pictograms/svg/PictogramLostConnection.js.map +1 -0
  179. package/lib/module/components/pictograms/svg/PictogramPending.js +15 -9
  180. package/lib/module/components/pictograms/svg/PictogramPending.js.map +1 -1
  181. package/lib/module/components/pictograms/svg/PictogramQrCode.js +83 -0
  182. package/lib/module/components/pictograms/svg/PictogramQrCode.js.map +1 -0
  183. package/lib/module/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
  184. package/lib/module/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
  185. package/lib/module/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
  186. package/lib/module/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
  187. package/lib/module/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
  188. package/lib/module/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
  189. package/lib/module/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
  190. package/lib/module/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
  191. package/lib/module/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
  192. package/lib/module/components/pictograms/svg/originals/PictogramPending.svg +1 -1
  193. package/lib/module/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
  194. package/lib/module/components/radio/RadioGroup.js +2 -1
  195. package/lib/module/components/radio/RadioGroup.js.map +1 -1
  196. package/lib/module/components/stepper/Stepper.js +43 -0
  197. package/lib/module/components/stepper/Stepper.js.map +1 -0
  198. package/lib/module/components/stepper/index.js +2 -0
  199. package/lib/module/components/stepper/index.js.map +1 -0
  200. package/lib/module/components/typography/H1.js +5 -3
  201. package/lib/module/components/typography/H1.js.map +1 -1
  202. package/lib/module/components/typography/H2.js +5 -3
  203. package/lib/module/components/typography/H2.js.map +1 -1
  204. package/lib/module/components/typography/H3.js +5 -3
  205. package/lib/module/components/typography/H3.js.map +1 -1
  206. package/lib/module/components/typography/H4.js +2 -1
  207. package/lib/module/components/typography/H4.js.map +1 -1
  208. package/lib/module/components/typography/H6.js +4 -2
  209. package/lib/module/components/typography/H6.js.map +1 -1
  210. package/lib/module/components/typography/Hero.js +7 -3
  211. package/lib/module/components/typography/Hero.js.map +1 -1
  212. package/lib/module/components/typography/LabelSmall.js +6 -1
  213. package/lib/module/components/typography/LabelSmall.js.map +1 -1
  214. package/lib/module/components/typography/LabelSmallAlt.js +32 -0
  215. package/lib/module/components/typography/LabelSmallAlt.js.map +1 -0
  216. package/lib/module/components/typography/README.md +23 -0
  217. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
  218. package/lib/module/components/typography/index.js +1 -0
  219. package/lib/module/components/typography/index.js.map +1 -1
  220. package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
  221. package/lib/typescript/components/codeInput/CodeInput.d.ts +11 -0
  222. package/lib/typescript/components/codeInput/CodeInput.d.ts.map +1 -0
  223. package/lib/typescript/components/codeInput/index.d.ts +2 -0
  224. package/lib/typescript/components/codeInput/index.d.ts.map +1 -0
  225. package/lib/typescript/components/icons/Icon.d.ts +1 -0
  226. package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
  227. package/lib/typescript/components/icons/svg/IconSparkles.d.ts +5 -0
  228. package/lib/typescript/components/icons/svg/IconSparkles.d.ts.map +1 -0
  229. package/lib/typescript/components/index.d.ts +5 -3
  230. package/lib/typescript/components/index.d.ts.map +1 -1
  231. package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
  232. package/lib/typescript/components/listitems/ListItemAction.d.ts.map +1 -1
  233. package/lib/typescript/components/listitems/ListItemHeader.d.ts +34 -0
  234. package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -0
  235. package/lib/typescript/components/listitems/ListItemInfo.d.ts +8 -3
  236. package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
  237. package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
  238. package/lib/typescript/components/listitems/ListItemNav.d.ts +4 -1
  239. package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
  240. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts +2 -2
  241. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
  242. package/lib/typescript/components/listitems/ListItemRadio.d.ts +21 -3
  243. package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
  244. package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts +13 -0
  245. package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -0
  246. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  247. package/lib/typescript/components/listitems/index.d.ts +2 -0
  248. package/lib/typescript/components/listitems/index.d.ts.map +1 -1
  249. package/lib/typescript/components/modules/ModuleCheckout.d.ts +15 -0
  250. package/lib/typescript/components/modules/ModuleCheckout.d.ts.map +1 -0
  251. package/lib/typescript/components/modules/index.d.ts +1 -0
  252. package/lib/typescript/components/modules/index.d.ts.map +1 -1
  253. package/lib/typescript/components/numberpad/NumberPad.d.ts +2 -1
  254. package/lib/typescript/components/numberpad/NumberPad.d.ts.map +1 -1
  255. package/lib/typescript/components/pictograms/Pictogram.d.ts +7 -1
  256. package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
  257. package/lib/typescript/components/pictograms/svg/PictogramBiometric.d.ts +5 -0
  258. package/lib/typescript/components/pictograms/svg/PictogramBiometric.d.ts.map +1 -0
  259. package/lib/typescript/components/pictograms/svg/PictogramBleedEnded.d.ts +5 -0
  260. package/lib/typescript/components/pictograms/svg/PictogramBleedEnded.d.ts.map +1 -0
  261. package/lib/typescript/components/pictograms/svg/PictogramBleedLostConnection.d.ts +5 -0
  262. package/lib/typescript/components/pictograms/svg/PictogramBleedLostConnection.d.ts.map +1 -0
  263. package/lib/typescript/components/pictograms/svg/PictogramBleedPending.d.ts.map +1 -1
  264. package/lib/typescript/components/pictograms/svg/PictogramBleedQrCode.d.ts +5 -0
  265. package/lib/typescript/components/pictograms/svg/PictogramBleedQrCode.d.ts.map +1 -0
  266. package/lib/typescript/components/pictograms/svg/PictogramEmailDotCheck.d.ts +5 -0
  267. package/lib/typescript/components/pictograms/svg/PictogramEmailDotCheck.d.ts.map +1 -0
  268. package/lib/typescript/components/pictograms/svg/PictogramEmailDotNotif.d.ts +5 -0
  269. package/lib/typescript/components/pictograms/svg/PictogramEmailDotNotif.d.ts.map +1 -0
  270. package/lib/typescript/components/pictograms/svg/PictogramEnded.d.ts +5 -0
  271. package/lib/typescript/components/pictograms/svg/PictogramEnded.d.ts.map +1 -0
  272. package/lib/typescript/components/pictograms/svg/PictogramLostConnection.d.ts +5 -0
  273. package/lib/typescript/components/pictograms/svg/PictogramLostConnection.d.ts.map +1 -0
  274. package/lib/typescript/components/pictograms/svg/PictogramPending.d.ts.map +1 -1
  275. package/lib/typescript/components/pictograms/svg/PictogramQrCode.d.ts +5 -0
  276. package/lib/typescript/components/pictograms/svg/PictogramQrCode.d.ts.map +1 -0
  277. package/lib/typescript/components/radio/RadioGroup.d.ts +4 -3
  278. package/lib/typescript/components/radio/RadioGroup.d.ts.map +1 -1
  279. package/lib/typescript/components/stepper/Stepper.d.ts +8 -0
  280. package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -0
  281. package/lib/typescript/components/stepper/index.d.ts +2 -0
  282. package/lib/typescript/components/stepper/index.d.ts.map +1 -0
  283. package/lib/typescript/components/typography/H1.d.ts +1 -1
  284. package/lib/typescript/components/typography/H1.d.ts.map +1 -1
  285. package/lib/typescript/components/typography/H2.d.ts +1 -1
  286. package/lib/typescript/components/typography/H2.d.ts.map +1 -1
  287. package/lib/typescript/components/typography/H3.d.ts +1 -1
  288. package/lib/typescript/components/typography/H3.d.ts.map +1 -1
  289. package/lib/typescript/components/typography/H4.d.ts.map +1 -1
  290. package/lib/typescript/components/typography/H6.d.ts.map +1 -1
  291. package/lib/typescript/components/typography/Hero.d.ts +1 -1
  292. package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
  293. package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
  294. package/lib/typescript/components/typography/LabelSmallAlt.d.ts +14 -0
  295. package/lib/typescript/components/typography/LabelSmallAlt.d.ts.map +1 -0
  296. package/lib/typescript/components/typography/index.d.ts +1 -0
  297. package/lib/typescript/components/typography/index.d.ts.map +1 -1
  298. package/package.json +9 -2
  299. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +4 -4
  300. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +4 -4
  301. package/src/components/checkbox/AnimatedCheckbox.tsx +6 -4
  302. package/src/components/codeInput/CodeInput.tsx +121 -0
  303. package/src/components/codeInput/index.tsx +1 -0
  304. package/src/components/icons/Icon.tsx +2 -0
  305. package/src/components/icons/README.md +79 -19
  306. package/src/components/icons/svg/IconSparkles.tsx +14 -0
  307. package/src/components/icons/svg/originals/IconSparkles.svg +3 -0
  308. package/src/components/index.tsx +5 -3
  309. package/src/components/layout/HeaderSecondLevel.tsx +6 -9
  310. package/src/components/listitems/ListItemAction.tsx +4 -3
  311. package/src/components/listitems/ListItemHeader.tsx +146 -0
  312. package/src/components/listitems/ListItemInfo.tsx +33 -16
  313. package/src/components/listitems/ListItemInfoCopy.tsx +14 -57
  314. package/src/components/listitems/ListItemNav.tsx +32 -44
  315. package/src/components/listitems/ListItemNavAlert.tsx +21 -42
  316. package/src/components/listitems/ListItemRadio.tsx +99 -12
  317. package/src/components/listitems/ListItemRadioWithAmount.tsx +69 -0
  318. package/src/components/listitems/ListItemTransaction.tsx +12 -7
  319. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +684 -34
  320. package/src/components/listitems/__test__/listitem.test.tsx +21 -0
  321. package/src/components/listitems/index.tsx +2 -0
  322. package/src/components/modules/ModuleCheckout.tsx +98 -0
  323. package/src/components/modules/index.tsx +1 -0
  324. package/src/components/numberpad/NumberPad.tsx +7 -8
  325. package/src/components/pictograms/Pictogram.tsx +23 -2
  326. package/src/components/pictograms/README.md +103 -14
  327. package/src/components/pictograms/svg/PictogramBiometric.tsx +78 -0
  328. package/src/components/pictograms/svg/PictogramBleedEnded.tsx +38 -0
  329. package/src/components/pictograms/svg/PictogramBleedLostConnection.tsx +66 -0
  330. package/src/components/pictograms/svg/PictogramBleedPending.tsx +17 -9
  331. package/src/components/pictograms/svg/PictogramBleedQrCode.tsx +86 -0
  332. package/src/components/pictograms/svg/PictogramEmailDotCheck.tsx +53 -0
  333. package/src/components/pictograms/svg/PictogramEmailDotNotif.tsx +51 -0
  334. package/src/components/pictograms/svg/PictogramEnded.tsx +34 -0
  335. package/src/components/pictograms/svg/PictogramLostConnection.tsx +58 -0
  336. package/src/components/pictograms/svg/PictogramPending.tsx +17 -9
  337. package/src/components/pictograms/svg/PictogramQrCode.tsx +102 -0
  338. package/src/components/pictograms/svg/originals/PictogramBiometric.svg +1 -0
  339. package/src/components/pictograms/svg/originals/PictogramBleedEnded.svg +1 -0
  340. package/src/components/pictograms/svg/originals/PictogramBleedLostConnection.svg +1 -0
  341. package/src/components/pictograms/svg/originals/PictogramBleedPending.svg +1 -1
  342. package/src/components/pictograms/svg/originals/PictogramBleedQrCode.svg +1 -0
  343. package/src/components/pictograms/svg/originals/PictogramEmailDotCheck.svg +41 -0
  344. package/src/components/pictograms/svg/originals/PictogramEmailDotNotif.svg +35 -0
  345. package/src/components/pictograms/svg/originals/PictogramEnded.svg +1 -0
  346. package/src/components/pictograms/svg/originals/PictogramLostConnection.svg +1 -0
  347. package/src/components/pictograms/svg/originals/PictogramPending.svg +1 -1
  348. package/src/components/pictograms/svg/originals/PictogramQrCode.svg +1 -0
  349. package/src/components/radio/RadioGroup.tsx +5 -4
  350. package/src/components/stepper/Stepper.tsx +62 -0
  351. package/src/components/stepper/index.tsx +1 -0
  352. package/src/components/typography/H1.tsx +8 -3
  353. package/src/components/typography/H2.tsx +8 -3
  354. package/src/components/typography/H3.tsx +8 -3
  355. package/src/components/typography/H4.tsx +5 -1
  356. package/src/components/typography/H6.tsx +6 -1
  357. package/src/components/typography/Hero.tsx +10 -3
  358. package/src/components/typography/LabelSmall.tsx +8 -1
  359. package/src/components/typography/LabelSmallAlt.tsx +51 -0
  360. package/src/components/typography/README.md +23 -0
  361. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +84 -74
  362. package/src/components/typography/index.tsx +1 -0
  363. package/lib/commonjs/components/icons/generateNewIcons.js +0 -165
  364. package/lib/commonjs/components/icons/generateNewIcons.js.map +0 -1
  365. package/lib/commonjs/components/icons/generateNewTimestamp.js +0 -8
  366. package/lib/commonjs/components/icons/generateNewTimestamp.js.map +0 -1
  367. package/lib/commonjs/components/icons/timestamp.txt +0 -1
  368. package/lib/commonjs/components/pictograms/generateNewPictograms.js +0 -163
  369. package/lib/commonjs/components/pictograms/generateNewPictograms.js.map +0 -1
  370. package/lib/commonjs/components/pictograms/timestamp.txt +0 -1
  371. package/lib/commonjs/stories/ButtonDS.stories.js +0 -34
  372. package/lib/commonjs/stories/ButtonDS.stories.js.map +0 -1
  373. package/lib/commonjs/stories/H1.stories.js +0 -33
  374. package/lib/commonjs/stories/H1.stories.js.map +0 -1
  375. package/lib/commonjs/stories/H2.stories.js +0 -33
  376. package/lib/commonjs/stories/H2.stories.js.map +0 -1
  377. package/lib/commonjs/stories/H3.stories.js +0 -33
  378. package/lib/commonjs/stories/H3.stories.js.map +0 -1
  379. package/lib/commonjs/stories/H4.stories.js +0 -33
  380. package/lib/commonjs/stories/H4.stories.js.map +0 -1
  381. package/lib/commonjs/stories/H5.stories.js +0 -33
  382. package/lib/commonjs/stories/H5.stories.js.map +0 -1
  383. package/lib/commonjs/stories/H6.stories.js +0 -33
  384. package/lib/commonjs/stories/H6.stories.js.map +0 -1
  385. package/lib/commonjs/stories/Label.stories.js +0 -33
  386. package/lib/commonjs/stories/Label.stories.js.map +0 -1
  387. package/lib/commonjs/stories/LabelSmall.stories.js +0 -33
  388. package/lib/commonjs/stories/LabelSmall.stories.js.map +0 -1
  389. package/lib/commonjs/stories/Link.stories.js +0 -33
  390. package/lib/commonjs/stories/Link.stories.js.map +0 -1
  391. package/lib/commonjs/stories/ModuleIDP.stories.js +0 -45
  392. package/lib/commonjs/stories/ModuleIDP.stories.js.map +0 -1
  393. package/lib/commonjs/stories/Monospace.stories.js +0 -33
  394. package/lib/commonjs/stories/Monospace.stories.js.map +0 -1
  395. package/lib/module/components/icons/generateNewIcons.js +0 -163
  396. package/lib/module/components/icons/generateNewIcons.js.map +0 -1
  397. package/lib/module/components/icons/generateNewTimestamp.js +0 -6
  398. package/lib/module/components/icons/generateNewTimestamp.js.map +0 -1
  399. package/lib/module/components/icons/timestamp.txt +0 -1
  400. package/lib/module/components/pictograms/generateNewPictograms.js +0 -161
  401. package/lib/module/components/pictograms/generateNewPictograms.js.map +0 -1
  402. package/lib/module/components/pictograms/timestamp.txt +0 -1
  403. package/lib/module/stories/ButtonDS.stories.js +0 -27
  404. package/lib/module/stories/ButtonDS.stories.js.map +0 -1
  405. package/lib/module/stories/H1.stories.js +0 -26
  406. package/lib/module/stories/H1.stories.js.map +0 -1
  407. package/lib/module/stories/H2.stories.js +0 -26
  408. package/lib/module/stories/H2.stories.js.map +0 -1
  409. package/lib/module/stories/H3.stories.js +0 -26
  410. package/lib/module/stories/H3.stories.js.map +0 -1
  411. package/lib/module/stories/H4.stories.js +0 -26
  412. package/lib/module/stories/H4.stories.js.map +0 -1
  413. package/lib/module/stories/H5.stories.js +0 -26
  414. package/lib/module/stories/H5.stories.js.map +0 -1
  415. package/lib/module/stories/H6.stories.js +0 -26
  416. package/lib/module/stories/H6.stories.js.map +0 -1
  417. package/lib/module/stories/Label.stories.js +0 -26
  418. package/lib/module/stories/Label.stories.js.map +0 -1
  419. package/lib/module/stories/LabelSmall.stories.js +0 -26
  420. package/lib/module/stories/LabelSmall.stories.js.map +0 -1
  421. package/lib/module/stories/Link.stories.js +0 -26
  422. package/lib/module/stories/Link.stories.js.map +0 -1
  423. package/lib/module/stories/ModuleIDP.stories.js +0 -37
  424. package/lib/module/stories/ModuleIDP.stories.js.map +0 -1
  425. package/lib/module/stories/Monospace.stories.js +0 -26
  426. package/lib/module/stories/Monospace.stories.js.map +0 -1
  427. package/lib/typescript/stories/ButtonDS.stories.d.ts +0 -14
  428. package/lib/typescript/stories/ButtonDS.stories.d.ts.map +0 -1
  429. package/lib/typescript/stories/H1.stories.d.ts +0 -19
  430. package/lib/typescript/stories/H1.stories.d.ts.map +0 -1
  431. package/lib/typescript/stories/H2.stories.d.ts +0 -19
  432. package/lib/typescript/stories/H2.stories.d.ts.map +0 -1
  433. package/lib/typescript/stories/H3.stories.d.ts +0 -19
  434. package/lib/typescript/stories/H3.stories.d.ts.map +0 -1
  435. package/lib/typescript/stories/H4.stories.d.ts +0 -19
  436. package/lib/typescript/stories/H4.stories.d.ts.map +0 -1
  437. package/lib/typescript/stories/H5.stories.d.ts +0 -19
  438. package/lib/typescript/stories/H5.stories.d.ts.map +0 -1
  439. package/lib/typescript/stories/H6.stories.d.ts +0 -19
  440. package/lib/typescript/stories/H6.stories.d.ts.map +0 -1
  441. package/lib/typescript/stories/Label.stories.d.ts +0 -21
  442. package/lib/typescript/stories/Label.stories.d.ts.map +0 -1
  443. package/lib/typescript/stories/LabelSmall.stories.d.ts +0 -21
  444. package/lib/typescript/stories/LabelSmall.stories.d.ts.map +0 -1
  445. package/lib/typescript/stories/Link.stories.d.ts +0 -21
  446. package/lib/typescript/stories/Link.stories.d.ts.map +0 -1
  447. package/lib/typescript/stories/ModuleIDP.stories.d.ts +0 -24
  448. package/lib/typescript/stories/ModuleIDP.stories.d.ts.map +0 -1
  449. package/lib/typescript/stories/Monospace.stories.d.ts +0 -19
  450. package/lib/typescript/stories/Monospace.stories.d.ts.map +0 -1
  451. package/src/components/icons/generateNewIcons.js +0 -186
  452. package/src/components/icons/generateNewTimestamp.js +0 -7
  453. package/src/components/icons/timestamp.txt +0 -1
  454. package/src/components/pictograms/generateNewPictograms.js +0 -181
  455. package/src/components/pictograms/timestamp.txt +0 -1
  456. package/src/stories/ButtonDS.stories.ts +0 -31
  457. package/src/stories/H1.stories.ts +0 -28
  458. package/src/stories/H2.stories.ts +0 -28
  459. package/src/stories/H3.stories.ts +0 -28
  460. package/src/stories/H4.stories.ts +0 -28
  461. package/src/stories/H5.stories.ts +0 -28
  462. package/src/stories/H6.stories.ts +0 -28
  463. package/src/stories/Label.stories.ts +0 -28
  464. package/src/stories/LabelSmall.stories.ts +0 -28
  465. package/src/stories/Link.stories.ts +0 -28
  466. package/src/stories/ModuleIDP.stories.tsx +0 -44
  467. package/src/stories/Monospace.stories.ts +0 -28
@@ -10,6 +10,7 @@ import { WithTestID } from "../../utils/types";
10
10
  import { IOIcons, Icon } from "../icons";
11
11
  import { H6, LabelSmall } from "../typography";
12
12
  import { ButtonLink, IconButton } from "../buttons";
13
+ import { Badge } from "../badge";
13
14
 
14
15
  type ButtonLinkActionProps = {
15
16
  type: "buttonLink";
@@ -21,14 +22,22 @@ type IconButtonActionProps = {
21
22
  componentProps: ComponentProps<typeof IconButton>;
22
23
  };
23
24
 
24
- type ActionProps = ButtonLinkActionProps | IconButtonActionProps;
25
+ type BadgeProps = {
26
+ type: "badge";
27
+ componentProps: ComponentProps<typeof Badge>;
28
+ };
29
+
30
+ type EndElementProps =
31
+ | ButtonLinkActionProps
32
+ | IconButtonActionProps
33
+ | BadgeProps;
25
34
 
26
35
  export type ListItemInfo = WithTestID<{
27
36
  label: string;
28
37
  value: string | React.ReactNode;
29
38
  numberOfLines?: number;
30
39
  icon?: IOIcons;
31
- action?: ActionProps;
40
+ endElement?: EndElementProps;
32
41
  // Accessibility
33
42
  accessibilityLabel?: string;
34
43
  }>;
@@ -38,7 +47,7 @@ export const ListItemInfo = ({
38
47
  value,
39
48
  numberOfLines = 2,
40
49
  icon,
41
- action,
50
+ endElement,
42
51
  accessibilityLabel,
43
52
  testID
44
53
  }: ListItemInfo) => {
@@ -59,11 +68,15 @@ export const ListItemInfo = ({
59
68
  const itemInfoTextComponent = useMemo(
60
69
  () => (
61
70
  <View
62
- accessible={action === undefined ? true : false}
71
+ accessible={endElement === undefined ? true : false}
63
72
  importantForAccessibility={
64
- action === undefined ? "yes" : "no-hide-descendants"
73
+ endElement === undefined || endElement.type === "badge"
74
+ ? "yes"
75
+ : "no-hide-descendants"
76
+ }
77
+ accessibilityElementsHidden={
78
+ endElement !== undefined && endElement.type !== "badge"
65
79
  }
66
- accessibilityElementsHidden={action !== undefined}
67
80
  >
68
81
  <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
69
82
  {label}
@@ -77,42 +90,46 @@ export const ListItemInfo = ({
77
90
  )}
78
91
  </View>
79
92
  ),
80
- [label, value, numberOfLines, theme, action]
93
+ [label, value, numberOfLines, theme, endElement]
81
94
  );
82
95
 
83
96
  const listItemInfoAction = useCallback(() => {
84
- if (action) {
85
- const { type, componentProps } = action;
97
+ if (endElement) {
98
+ const { type, componentProps } = endElement;
86
99
 
87
- const accessibilityLabel = `${listItemAccessibilityLabel}; ${componentProps.accessibilityLabel}`;
88
100
  switch (type) {
89
101
  case "buttonLink":
102
+ const buttonLinkAccessibilityLabel = `${listItemAccessibilityLabel}; ${componentProps.accessibilityLabel}`;
103
+
90
104
  return (
91
105
  <ButtonLink
92
106
  {...componentProps}
93
- accessibilityLabel={accessibilityLabel}
107
+ accessibilityLabel={buttonLinkAccessibilityLabel}
94
108
  />
95
109
  );
96
110
  case "iconButton":
111
+ const iconButtonAccessibilityLabel = `${listItemAccessibilityLabel}; ${componentProps.accessibilityLabel}`;
97
112
  return (
98
113
  <IconButton
99
114
  {...componentProps}
100
- accessibilityLabel={accessibilityLabel}
115
+ accessibilityLabel={iconButtonAccessibilityLabel}
101
116
  />
102
117
  );
118
+ case "badge":
119
+ return <Badge {...componentProps} />;
103
120
  default:
104
121
  return <></>;
105
122
  }
106
123
  }
107
124
  return <></>;
108
- }, [action, listItemAccessibilityLabel]);
125
+ }, [endElement, listItemAccessibilityLabel]);
109
126
 
110
127
  return (
111
128
  <View
112
129
  style={IOListItemStyles.listItem}
113
130
  testID={testID}
114
- accessible={action === undefined ? true : false}
115
- accessibilityLabel={accessibilityLabel}
131
+ accessible={endElement === undefined ? true : false}
132
+ accessibilityLabel={listItemAccessibilityLabel}
116
133
  >
117
134
  <View style={IOListItemStyles.listItemInner}>
118
135
  {icon && (
@@ -125,7 +142,7 @@ export const ListItemInfo = ({
125
142
  </View>
126
143
  )}
127
144
  <View style={IOStyles.flex}>{itemInfoTextComponent}</View>
128
- {action && (
145
+ {endElement && (
129
146
  <View style={{ marginLeft: IOListItemVisualParams.actionMargin }}>
130
147
  {listItemInfoAction()}
131
148
  </View>
@@ -1,11 +1,5 @@
1
1
  import React, { useCallback } from "react";
2
- import {
3
- GestureResponderEvent,
4
- Pressable,
5
- StyleSheet,
6
- Text,
7
- View
8
- } from "react-native";
2
+ import { GestureResponderEvent, Pressable, View } from "react-native";
9
3
  import Animated, {
10
4
  Extrapolate,
11
5
  interpolate,
@@ -26,11 +20,9 @@ import {
26
20
  useIOExperimentalDesign,
27
21
  useIOTheme
28
22
  } from "../../core";
29
- import { makeFontStyleObject } from "../../utils/fonts";
30
23
  import { WithTestID } from "../../utils/types";
31
24
  import { IOIcons, Icon } from "../icons";
32
- import { VSpacer } from "../spacer";
33
- import { Body, H6, LabelSmall } from "../typography";
25
+ import { H6, LabelSmall } from "../typography";
34
26
 
35
27
  export type ListItemInfoCopy = WithTestID<{
36
28
  label: string;
@@ -42,15 +34,6 @@ export type ListItemInfoCopy = WithTestID<{
42
34
  accessibilityLabel: string;
43
35
  }>;
44
36
 
45
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
46
- const legacyStyles = StyleSheet.create({
47
- textValue: {
48
- fontSize: 18,
49
- lineHeight: 24,
50
- ...makeFontStyleObject("SemiBold", undefined, "TitilliumWeb")
51
- }
52
- });
53
-
54
37
  export const ListItemInfoCopy = ({
55
38
  label,
56
39
  value,
@@ -64,50 +47,26 @@ export const ListItemInfoCopy = ({
64
47
  const { isExperimental } = useIOExperimentalDesign();
65
48
  const theme = useIOTheme();
66
49
 
67
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
68
- const legacyInfoCopyText = (
50
+ const foregroundColor = isExperimental
51
+ ? theme["interactiveElem-default"]
52
+ : "blue";
53
+
54
+ const listItemInfoCopyContent = (
69
55
  <>
70
- <Body weight="Regular">{label}</Body>
71
- <VSpacer size={4} />
56
+ <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
57
+ {label}
58
+ </LabelSmall>
72
59
  {/* Let developer using a custom component (e.g: skeleton) */}
73
60
  {typeof value === "string" ? (
74
- <Text
75
- style={[legacyStyles.textValue, { color: IOColors.blue }]}
76
- numberOfLines={numberOfLines}
77
- >
61
+ <H6 color={foregroundColor} numberOfLines={numberOfLines}>
78
62
  {value}
79
- </Text>
63
+ </H6>
80
64
  ) : (
81
65
  { value }
82
66
  )}
83
67
  </>
84
68
  );
85
69
 
86
- const infoCopyText = (
87
- <>
88
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
89
- {label}
90
- </LabelSmall>
91
- {/* Let developer using a custom component (e.g: skeleton) */}
92
- {typeof value === "string" ? (
93
- <H6
94
- color={theme["interactiveElem-default"]}
95
- numberOfLines={numberOfLines}
96
- >
97
- {value}
98
- </H6>
99
- ) : (
100
- { value }
101
- )}
102
- </>
103
- );
104
-
105
- const infoCopyTextComponent = isExperimental
106
- ? infoCopyText
107
- : legacyInfoCopyText;
108
-
109
- const iconColor = isExperimental ? theme["interactiveElem-default"] : "blue";
110
-
111
70
  const mapBackgroundStates: Record<string, string> = {
112
71
  default: hexToRgba(IOColors[theme["listItem-pressed"]], 0),
113
72
  pressed: IOColors[theme["listItem-pressed"]]
@@ -180,13 +139,11 @@ export const ListItemInfoCopy = ({
180
139
  />
181
140
  </View>
182
141
  )}
183
- <View style={IOStyles.flex}>
184
- {infoCopyTextComponent}
185
- </View>
142
+ <View style={IOStyles.flex}>{listItemInfoCopyContent}</View>
186
143
  <View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
187
144
  <Icon
188
145
  name="copy"
189
- color={iconColor}
146
+ color={foregroundColor}
190
147
  size={IOListItemVisualParams.chevronSize}
191
148
  />
192
149
  </View>
@@ -1,11 +1,5 @@
1
1
  import React, { useCallback } from "react";
2
- import {
3
- GestureResponderEvent,
4
- Pressable,
5
- StyleSheet,
6
- Text,
7
- View
8
- } from "react-native";
2
+ import { GestureResponderEvent, Pressable, View } from "react-native";
9
3
  import Animated, {
10
4
  Extrapolate,
11
5
  interpolate,
@@ -26,21 +20,12 @@ import {
26
20
  useIOExperimentalDesign,
27
21
  useIOTheme
28
22
  } from "../../core";
29
- import { makeFontStyleObject } from "../../utils/fonts";
30
23
  import { WithTestID } from "../../utils/types";
24
+ import { Badge } from "../badge";
31
25
  import { IOIcons, Icon } from "../icons";
32
26
  import { IOLogoPaymentType, LogoPayment } from "../logos";
33
- import { Body, H6, LabelSmall } from "../typography";
34
-
35
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
36
- const legacyStyles = StyleSheet.create({
37
- textValue: {
38
- fontSize: 18,
39
- lineHeight: 24,
40
- color: IOColors.bluegreyDark,
41
- ...makeFontStyleObject("SemiBold", undefined, "TitilliumWeb")
42
- }
43
- });
27
+ import { VSpacer } from "../spacer";
28
+ import { H6, LabelSmall } from "../typography";
44
29
 
45
30
  type ListItemNavPartialProps = WithTestID<{
46
31
  value: string | React.ReactNode;
@@ -48,6 +33,8 @@ type ListItemNavPartialProps = WithTestID<{
48
33
  onPress: (event: GestureResponderEvent) => void;
49
34
  // Accessibility
50
35
  accessibilityLabel: string;
36
+ hideChevron?: boolean;
37
+ badgeProps?: React.ComponentProps<typeof Badge>;
51
38
  }>;
52
39
 
53
40
  export type ListItemNavGraphicProps =
@@ -65,25 +52,36 @@ export const ListItemNav = ({
65
52
  iconColor = "grey-450",
66
53
  paymentLogo,
67
54
  accessibilityLabel,
68
- testID
55
+ testID,
56
+ hideChevron = false,
57
+ badgeProps
69
58
  }: ListItemNav) => {
70
59
  const isPressed = useSharedValue(0);
71
60
  const { isExperimental } = useIOExperimentalDesign();
72
61
  const theme = useIOTheme();
73
62
 
74
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
75
- const legacyNavText = (
63
+ const listItemNavContent = (
76
64
  <>
65
+ {badgeProps && (
66
+ <>
67
+ <View style={{ alignSelf: "flex-start" }}>
68
+ <Badge {...badgeProps} />
69
+ </View>
70
+ <VSpacer size={4} />
71
+ </>
72
+ )}
77
73
  {/* Let developer using a custom component (e.g: skeleton) */}
78
74
  {typeof value === "string" ? (
79
- <Text style={legacyStyles.textValue}>{value}</Text>
75
+ <H6 color={theme["textBody-default"]}>{value}</H6>
80
76
  ) : (
81
77
  value
82
78
  )}
83
79
  {description && (
84
80
  <>
85
81
  {typeof description === "string" ? (
86
- <Body weight="Regular">{description}</Body>
82
+ <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
83
+ {description}
84
+ </LabelSmall>
87
85
  ) : (
88
86
  description
89
87
  )}
@@ -92,18 +90,6 @@ export const ListItemNav = ({
92
90
  </>
93
91
  );
94
92
 
95
- const navText = (
96
- <>
97
- <H6 color={theme["textBody-default"]}>{value}</H6>
98
- {description && (
99
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
100
- {description}
101
- </LabelSmall>
102
- )}
103
- </>
104
- );
105
-
106
- const navTextComponent = isExperimental ? navText : legacyNavText;
107
93
  const mapBackgroundStates: Record<string, string> = {
108
94
  default: hexToRgba(IOColors[theme["listItem-pressed"]], 0),
109
95
  pressed: IOColors[theme["listItem-pressed"]]
@@ -188,14 +174,16 @@ export const ListItemNav = ({
188
174
  />
189
175
  </View>
190
176
  )}
191
- <View style={IOStyles.flex}>{navTextComponent}</View>
192
- <View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
193
- <Icon
194
- name="chevronRightListItem"
195
- color={navIconColor}
196
- size={IOListItemVisualParams.chevronSize}
197
- />
198
- </View>
177
+ <View style={IOStyles.flex}>{listItemNavContent}</View>
178
+ {!hideChevron && (
179
+ <View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
180
+ <Icon
181
+ name="chevronRightListItem"
182
+ color={navIconColor}
183
+ size={IOListItemVisualParams.chevronSize}
184
+ />
185
+ </View>
186
+ )}
199
187
  </Animated.View>
200
188
  </Animated.View>
201
189
  </Pressable>
@@ -1,11 +1,5 @@
1
1
  import React, { useCallback } from "react";
2
- import {
3
- GestureResponderEvent,
4
- Pressable,
5
- StyleSheet,
6
- Text,
7
- View
8
- } from "react-native";
2
+ import { GestureResponderEvent, Pressable, View } from "react-native";
9
3
  import Animated, {
10
4
  Extrapolate,
11
5
  interpolate,
@@ -26,29 +20,19 @@ import {
26
20
  useIOExperimentalDesign,
27
21
  useIOTheme
28
22
  } from "../../core";
29
- import { makeFontStyleObject } from "../../utils/fonts";
30
23
  import { WithTestID } from "../../utils/types";
31
24
  import { Icon } from "../icons";
32
- import { Body, H6, LabelSmall } from "../typography";
25
+ import { H6, LabelSmall } from "../typography";
33
26
 
34
27
  export type ListItemNavAlert = WithTestID<{
35
- value: string;
36
- description?: string;
28
+ value: string | React.ReactNode;
29
+ description?: string | React.ReactNode;
37
30
  withoutIcon?: boolean;
38
31
  onPress: (event: GestureResponderEvent) => void;
39
32
  // Accessibility
40
33
  accessibilityLabel: string;
41
34
  }>;
42
35
 
43
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
44
- const legacyStyles = StyleSheet.create({
45
- textValue: {
46
- fontSize: 18,
47
- lineHeight: 24,
48
- ...makeFontStyleObject("SemiBold", undefined, "TitilliumWeb")
49
- }
50
- });
51
-
52
36
  export const ListItemNavAlert = ({
53
37
  value,
54
38
  description,
@@ -63,33 +47,30 @@ export const ListItemNavAlert = ({
63
47
  const theme = useIOTheme();
64
48
 
65
49
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
66
- const legacyNavAlertText = (
50
+ const listItemNavAlertContent = (
67
51
  <>
68
- <Text style={[legacyStyles.textValue, { color: IOColors.bluegreyDark }]}>
69
- {value}
70
- </Text>
71
- {description && (
72
- <Body weight="SemiBold" color={theme.errorText}>
73
- {description}
74
- </Body>
52
+ {/* Let developer using a custom component (e.g: skeleton) */}
53
+ {typeof value === "string" ? (
54
+ <H6 color={theme["textBody-default"]}>{value}</H6>
55
+ ) : (
56
+ value
75
57
  )}
76
- </>
77
- );
78
-
79
- const navAlertText = (
80
- <>
81
- <H6 color={theme["textBody-default"]}>{value}</H6>
82
58
  {description && (
83
- <LabelSmall weight="SemiBold" color={theme.errorText}>
84
- {description}
85
- </LabelSmall>
59
+ <>
60
+ {typeof description === "string" ? (
61
+ <LabelSmall weight="SemiBold" color={theme.errorText}>
62
+ {description}
63
+ </LabelSmall>
64
+ ) : (
65
+ description
66
+ )}
67
+ </>
86
68
  )}
87
69
  </>
88
70
  );
89
71
 
90
- const navAlertTextComponent = isExperimental ? navAlertText : legacyNavAlertText;
91
72
  const iconColor = isExperimental ? theme["interactiveElem-default"] : "blue";
92
-
73
+
93
74
  const mapBackgroundStates: Record<string, string> = {
94
75
  default: hexToRgba(IOColors[theme["listItem-pressed"]], 0),
95
76
  pressed: IOColors[theme["listItem-pressed"]]
@@ -162,9 +143,7 @@ export const ListItemNavAlert = ({
162
143
  />
163
144
  </View>
164
145
  )}
165
- <View style={IOStyles.flex}>
166
- {navAlertTextComponent}
167
- </View>
146
+ <View style={IOStyles.flex}>{listItemNavAlertContent}</View>
168
147
  <View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
169
148
  <Icon
170
149
  name="chevronRightListItem"
@@ -11,6 +11,7 @@ import Animated, {
11
11
  useSharedValue,
12
12
  withSpring
13
13
  } from "react-native-reanimated";
14
+ import Placeholder from "rn-placeholder";
14
15
  import {
15
16
  IOColors,
16
17
  IOScaleValues,
@@ -26,13 +27,31 @@ import { IOIcons, Icon } from "../icons";
26
27
  import { HSpacer, VSpacer } from "../spacer";
27
28
  import { H6, LabelSmall } from "../typography";
28
29
  import { AnimatedRadio } from "../radio/AnimatedRadio";
30
+ import { IOLogoPaymentType, LogoPayment } from "../logos";
31
+
32
+ type ListItemRadioGraphicProps =
33
+ | { icon?: never; paymentLogo: IOLogoPaymentType }
34
+ | { icon: IOIcons; paymentLogo?: never };
35
+
36
+ type ListItemRadioLoadingProps =
37
+ | {
38
+ state: true;
39
+ skeletonDescription?: boolean;
40
+ skeletonIcon?: boolean;
41
+ }
42
+ | {
43
+ state?: false;
44
+ skeletonDescription?: never;
45
+ skeletonIcon?: never;
46
+ };
29
47
 
30
48
  type Props = WithTestID<{
31
49
  value: string;
32
50
  description?: string;
33
- icon?: IOIcons;
34
51
  selected: boolean;
35
52
  onValueChange?: (newValue: boolean) => void;
53
+ startImage?: ListItemRadioGraphicProps;
54
+ loadingProps?: ListItemRadioLoadingProps;
36
55
  }>;
37
56
 
38
57
  const DISABLED_OPACITY = 0.5;
@@ -46,7 +65,7 @@ type OwnProps = Props &
46
65
  >;
47
66
 
48
67
  /**
49
- * with the automatic state management that uses a {@link AnimatedCheckBox}
68
+ * `ListItemRadio` component with the automatic state management that uses a {@link AnimatedCheckBox}
50
69
  * The toggleValue change when a `onPress` event is received and dispatch the `onValueChange`.
51
70
  *
52
71
  * @param props
@@ -55,16 +74,16 @@ type OwnProps = Props &
55
74
  export const ListItemRadio = ({
56
75
  value,
57
76
  description,
58
- icon,
77
+ startImage,
59
78
  selected,
60
79
  disabled,
61
80
  onValueChange,
81
+ loadingProps,
62
82
  testID
63
83
  }: OwnProps) => {
64
84
  const [toggleValue, setToggleValue] = useState(selected ?? false);
65
85
  // Animations
66
86
  const isPressed: Animated.SharedValue<number> = useSharedValue(0);
67
-
68
87
  // Scaling transformation applied when the button is pressed
69
88
  const animationScaleValue = IOScaleValues?.basicButton?.pressedState;
70
89
 
@@ -123,7 +142,66 @@ export const ListItemRadio = ({
123
142
  }
124
143
  };
125
144
 
126
- return (
145
+ const disabledStyle = { opacity: disabled ? DISABLED_OPACITY : 1 };
146
+
147
+ const SkeletonDescriptionLines = () => (
148
+ <>
149
+ <VSpacer size={8} />
150
+ <Placeholder.Box animate="fade" radius={8} width={"100%"} height={8} />
151
+ <VSpacer size={8} />
152
+ <Placeholder.Box animate="fade" radius={8} width={"100%"} height={8} />
153
+ <VSpacer size={8} />
154
+ <Placeholder.Box animate="fade" radius={8} width={"100%"} height={8} />
155
+ </>
156
+ );
157
+
158
+ const SkeletonIcon = () => (
159
+ <View
160
+ style={{
161
+ marginRight: IOSelectionListItemVisualParams.iconMargin
162
+ }}
163
+ >
164
+ <Placeholder.Box
165
+ animate="fade"
166
+ radius={4}
167
+ width={IOSelectionListItemVisualParams.iconSize}
168
+ height={IOSelectionListItemVisualParams.iconSize}
169
+ />
170
+ </View>
171
+ );
172
+
173
+ const SkeletonComponent = () => (
174
+ <View style={IOSelectionListItemStyles.listItem}>
175
+ <View style={IOSelectionListItemStyles.listItemInner}>
176
+ <View
177
+ style={[
178
+ IOStyles.flex,
179
+ IOStyles.rowSpaceBetween,
180
+ IOStyles.alignCenter
181
+ ]}
182
+ >
183
+ <View style={[IOStyles.row, IOStyles.alignCenter]}>
184
+ {loadingProps?.skeletonIcon && <SkeletonIcon />}
185
+ <Placeholder.Box
186
+ animate="fade"
187
+ radius={8}
188
+ width={179}
189
+ height={16}
190
+ />
191
+ </View>
192
+ <HSpacer size={8} />
193
+ <View pointerEvents="none" style={disabledStyle}>
194
+ <AnimatedRadio checked={toggleValue} />
195
+ </View>
196
+ </View>
197
+ </View>
198
+ {loadingProps?.skeletonDescription && <SkeletonDescriptionLines />}
199
+ </View>
200
+ );
201
+
202
+ return loadingProps?.state ? (
203
+ <SkeletonComponent />
204
+ ) : (
127
205
  <Pressable
128
206
  onPress={toggleRadioItem}
129
207
  onPressIn={handlePressIn}
@@ -136,7 +214,7 @@ export const ListItemRadio = ({
136
214
  style={[
137
215
  IOSelectionListItemStyles.listItem,
138
216
  animatedBackgroundStyle,
139
- { opacity: disabled ? DISABLED_OPACITY : 1 }
217
+ disabledStyle
140
218
  ]}
141
219
  // This is required to avoid opacity
142
220
  // inheritance on Android
@@ -145,17 +223,26 @@ export const ListItemRadio = ({
145
223
  <Animated.View style={animatedScaleStyle}>
146
224
  <View style={IOSelectionListItemStyles.listItemInner}>
147
225
  <View style={[IOStyles.row, { flexShrink: 1 }]}>
148
- {icon && (
226
+ {startImage && (
149
227
  <View
150
228
  style={{
151
229
  marginRight: IOSelectionListItemVisualParams.iconMargin
152
230
  }}
153
231
  >
154
- <Icon
155
- name={icon}
156
- color="grey-300"
157
- size={IOSelectionListItemVisualParams.iconSize}
158
- />
232
+ {/* icon or paymentLogo props are mutually exclusive */}
233
+ {startImage.icon && (
234
+ <Icon
235
+ name={startImage.icon}
236
+ color="grey-300"
237
+ size={IOSelectionListItemVisualParams.iconSize}
238
+ />
239
+ )}
240
+ {startImage.paymentLogo && (
241
+ <LogoPayment
242
+ name={startImage.paymentLogo}
243
+ size={IOSelectionListItemVisualParams.iconSize}
244
+ />
245
+ )}
159
246
  </View>
160
247
  )}
161
248