@pagopa/io-app-design-system 1.0.0-9 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +39 -4
  2. package/lib/commonjs/components/Advice/Advice.js +5 -7
  3. package/lib/commonjs/components/Advice/Advice.js.map +1 -1
  4. package/lib/commonjs/components/Advice/__test__/advice.test.js +2 -2
  5. package/lib/commonjs/components/Advice/__test__/advice.test.js.map +1 -1
  6. package/lib/commonjs/components/accordion/RawAccordion.js.map +1 -1
  7. package/lib/commonjs/components/badge/__test__/badge.test.js.map +1 -1
  8. package/lib/commonjs/components/buttons/ButtonLink.js +4 -5
  9. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  10. package/lib/commonjs/components/buttons/IconButton.js +0 -2
  11. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  12. package/lib/commonjs/components/buttons/IconButtonContained.js +131 -0
  13. package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -0
  14. package/lib/commonjs/components/buttons/IconButtonSolid.js +109 -0
  15. package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -0
  16. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +370 -0
  17. package/lib/commonjs/components/buttons/__test__/button.test.js +27 -0
  18. package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
  19. package/lib/commonjs/components/buttons/index.js +30 -8
  20. package/lib/commonjs/components/buttons/index.js.map +1 -1
  21. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +1 -1
  22. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
  23. package/lib/commonjs/components/icons/Icon.js +35 -9
  24. package/lib/commonjs/components/icons/Icon.js.map +1 -1
  25. package/lib/commonjs/components/icons/index.js +0 -18
  26. package/lib/commonjs/components/icons/index.js.map +1 -1
  27. package/lib/commonjs/components/icons/svg/{LegIconSearch.js → IconCheckTick.js} +4 -9
  28. package/lib/commonjs/components/icons/svg/{IconCompleted.js.map → IconCheckTick.js.map} +1 -1
  29. package/lib/commonjs/components/icons/svg/{IconCompleted.js → IconCheckTickBig.js} +3 -3
  30. package/lib/commonjs/components/icons/svg/IconCheckTickBig.js.map +1 -0
  31. package/lib/commonjs/components/icons/svg/IconMerchant.js +31 -0
  32. package/lib/commonjs/components/icons/svg/IconMerchant.js.map +1 -0
  33. package/lib/commonjs/components/icons/svg/IconSystemAppsAndroid.js +49 -0
  34. package/lib/commonjs/components/icons/svg/IconSystemAppsAndroid.js.map +1 -0
  35. package/lib/commonjs/components/icons/svg/IconSystemNotificationsInstructions.js +42 -0
  36. package/lib/commonjs/components/icons/svg/IconSystemNotificationsInstructions.js.map +1 -0
  37. package/lib/commonjs/components/icons/svg/IconSystemSettingsAndroid.js +34 -0
  38. package/lib/commonjs/components/icons/svg/IconSystemSettingsAndroid.js.map +1 -0
  39. package/lib/commonjs/components/icons/svg/IconSystemSettingsiOS.js +68 -0
  40. package/lib/commonjs/components/icons/svg/IconSystemSettingsiOS.js.map +1 -0
  41. package/lib/commonjs/components/icons/svg/{LegIconChevronLeft.js → IconSystemToggleInstructions.js} +5 -5
  42. package/lib/commonjs/components/icons/svg/IconSystemToggleInstructions.js.map +1 -0
  43. package/lib/commonjs/components/index.js +72 -72
  44. package/lib/commonjs/components/index.js.map +1 -1
  45. package/lib/commonjs/components/layout/GradientBottomActions.js +90 -0
  46. package/lib/commonjs/components/layout/GradientBottomActions.js.map +1 -0
  47. package/lib/commonjs/components/layout/GradientScrollView.js +111 -0
  48. package/lib/commonjs/components/layout/GradientScrollView.js.map +1 -0
  49. package/lib/commonjs/components/layout/HeaderFirstLevel.js +62 -0
  50. package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -0
  51. package/lib/commonjs/components/layout/index.js +17 -0
  52. package/lib/commonjs/components/layout/index.js.map +1 -0
  53. package/lib/commonjs/components/listitems/ListItemCheckbox.js +135 -0
  54. package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -0
  55. package/lib/commonjs/components/listitems/ListItemInfo.js +3 -6
  56. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  57. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -4
  58. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  59. package/lib/commonjs/components/listitems/ListItemRadio.js +136 -0
  60. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -0
  61. package/lib/commonjs/components/listitems/ListItemSwitch.js +82 -0
  62. package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -0
  63. package/lib/commonjs/components/listitems/ListItemTransaction.js +2 -3
  64. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  65. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -14
  66. package/lib/commonjs/components/listitems/index.js +33 -0
  67. package/lib/commonjs/components/listitems/index.js.map +1 -1
  68. package/lib/commonjs/components/logos/svg/LogoPaymentExtMaestro.js +3 -19
  69. package/lib/commonjs/components/logos/svg/LogoPaymentExtMaestro.js.map +1 -1
  70. package/lib/commonjs/components/logos/svg/LogoPaymentExtMastercard.js +5 -21
  71. package/lib/commonjs/components/logos/svg/LogoPaymentExtMastercard.js.map +1 -1
  72. package/lib/commonjs/components/logos/svg/LogoPaymentExtPayPal.js +9 -28
  73. package/lib/commonjs/components/logos/svg/LogoPaymentExtPayPal.js.map +1 -1
  74. package/lib/commonjs/components/logos/svg/LogoPaymentMaestro.js +8 -18
  75. package/lib/commonjs/components/logos/svg/LogoPaymentMaestro.js.map +1 -1
  76. package/lib/commonjs/components/logos/svg/LogoPaymentMastercard.js +7 -17
  77. package/lib/commonjs/components/logos/svg/LogoPaymentMastercard.js.map +1 -1
  78. package/lib/commonjs/components/logos/svg/LogoPaymentPayPal.js +5 -5
  79. package/lib/commonjs/components/logos/svg/LogoPaymentPayPal.js.map +1 -1
  80. package/lib/commonjs/components/radio/AnimatedRadio.js +1 -1
  81. package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
  82. package/lib/commonjs/components/radio/RadioGroup.js +36 -0
  83. package/lib/commonjs/components/radio/RadioGroup.js.map +1 -0
  84. package/lib/commonjs/components/radio/index.js +11 -0
  85. package/lib/commonjs/components/radio/index.js.map +1 -1
  86. package/lib/commonjs/components/typography/H3.js +20 -49
  87. package/lib/commonjs/components/typography/H3.js.map +1 -1
  88. package/lib/commonjs/components/typography/Link.js +17 -23
  89. package/lib/commonjs/components/typography/Link.js.map +1 -1
  90. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -45
  91. package/lib/commonjs/core/IOColors.js +1 -1
  92. package/lib/commonjs/core/IOColors.js.map +1 -1
  93. package/lib/commonjs/core/IOSpacing.js +1 -1
  94. package/lib/commonjs/core/IOSpacing.js.map +1 -1
  95. package/lib/commonjs/core/IOStyles.js +7 -1
  96. package/lib/commonjs/core/IOStyles.js.map +1 -1
  97. package/lib/commonjs/index.js +30 -8
  98. package/lib/commonjs/index.js.map +1 -1
  99. package/lib/commonjs/json-import.d.js +2 -0
  100. package/lib/commonjs/json-import.d.js.map +1 -0
  101. package/lib/module/components/Advice/Advice.js +4 -6
  102. package/lib/module/components/Advice/Advice.js.map +1 -1
  103. package/lib/module/components/Advice/__test__/advice.test.js +1 -1
  104. package/lib/module/components/Advice/__test__/advice.test.js.map +1 -1
  105. package/lib/module/components/accordion/RawAccordion.js +1 -1
  106. package/lib/module/components/accordion/RawAccordion.js.map +1 -1
  107. package/lib/module/components/badge/__test__/badge.test.js.map +1 -1
  108. package/lib/module/components/buttons/ButtonLink.js +4 -5
  109. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  110. package/lib/module/components/buttons/IconButton.js +0 -2
  111. package/lib/module/components/buttons/IconButton.js.map +1 -1
  112. package/lib/module/components/buttons/IconButtonContained.js +122 -0
  113. package/lib/module/components/buttons/IconButtonContained.js.map +1 -0
  114. package/lib/module/components/buttons/IconButtonSolid.js +100 -0
  115. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -0
  116. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +370 -0
  117. package/lib/module/components/buttons/__test__/button.test.js +27 -0
  118. package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
  119. package/lib/module/components/buttons/index.js +4 -2
  120. package/lib/module/components/buttons/index.js.map +1 -1
  121. package/lib/module/components/checkbox/AnimatedCheckbox.js +3 -3
  122. package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
  123. package/lib/module/components/icons/Icon.js +33 -8
  124. package/lib/module/components/icons/Icon.js.map +1 -1
  125. package/lib/module/components/icons/index.js +0 -1
  126. package/lib/module/components/icons/index.js.map +1 -1
  127. package/lib/module/components/icons/svg/{LegIconSearch.js → IconCheckTick.js} +4 -9
  128. package/lib/module/components/icons/svg/{IconCompleted.js.map → IconCheckTick.js.map} +1 -1
  129. package/lib/module/components/icons/svg/{IconCompleted.js → IconCheckTickBig.js} +3 -3
  130. package/lib/module/components/icons/svg/IconCheckTickBig.js.map +1 -0
  131. package/lib/module/components/icons/svg/IconMerchant.js +23 -0
  132. package/lib/module/components/icons/svg/IconMerchant.js.map +1 -0
  133. package/lib/module/components/icons/svg/IconSystemAppsAndroid.js +41 -0
  134. package/lib/module/components/icons/svg/IconSystemAppsAndroid.js.map +1 -0
  135. package/lib/module/components/icons/svg/IconSystemNotificationsInstructions.js +34 -0
  136. package/lib/module/components/icons/svg/IconSystemNotificationsInstructions.js.map +1 -0
  137. package/lib/module/components/icons/svg/IconSystemSettingsAndroid.js +26 -0
  138. package/lib/module/components/icons/svg/IconSystemSettingsAndroid.js.map +1 -0
  139. package/lib/module/components/icons/svg/IconSystemSettingsiOS.js +60 -0
  140. package/lib/module/components/icons/svg/IconSystemSettingsiOS.js.map +1 -0
  141. package/lib/module/components/icons/svg/{LegIconChevronLeft.js → IconSystemToggleInstructions.js} +5 -5
  142. package/lib/module/components/icons/svg/IconSystemToggleInstructions.js.map +1 -0
  143. package/lib/module/components/index.js +13 -13
  144. package/lib/module/components/index.js.map +1 -1
  145. package/lib/module/components/layout/GradientBottomActions.js +79 -0
  146. package/lib/module/components/layout/GradientBottomActions.js.map +1 -0
  147. package/lib/module/components/layout/GradientScrollView.js +100 -0
  148. package/lib/module/components/layout/GradientScrollView.js.map +1 -0
  149. package/lib/module/components/layout/HeaderFirstLevel.js +52 -0
  150. package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -0
  151. package/lib/module/components/layout/index.js +2 -0
  152. package/lib/module/components/layout/index.js.map +1 -0
  153. package/lib/module/components/listitems/ListItemCheckbox.js +126 -0
  154. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -0
  155. package/lib/module/components/listitems/ListItemInfo.js +3 -6
  156. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  157. package/lib/module/components/listitems/ListItemInfoCopy.js +1 -4
  158. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  159. package/lib/module/components/listitems/ListItemRadio.js +127 -0
  160. package/lib/module/components/listitems/ListItemRadio.js.map +1 -0
  161. package/lib/module/components/listitems/ListItemSwitch.js +74 -0
  162. package/lib/module/components/listitems/ListItemSwitch.js.map +1 -0
  163. package/lib/module/components/listitems/ListItemTransaction.js +2 -3
  164. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  165. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -14
  166. package/lib/module/components/listitems/index.js +3 -0
  167. package/lib/module/components/listitems/index.js.map +1 -1
  168. package/lib/module/components/logos/svg/LogoPaymentExtMaestro.js +3 -19
  169. package/lib/module/components/logos/svg/LogoPaymentExtMaestro.js.map +1 -1
  170. package/lib/module/components/logos/svg/LogoPaymentExtMastercard.js +5 -21
  171. package/lib/module/components/logos/svg/LogoPaymentExtMastercard.js.map +1 -1
  172. package/lib/module/components/logos/svg/LogoPaymentExtPayPal.js +10 -29
  173. package/lib/module/components/logos/svg/LogoPaymentExtPayPal.js.map +1 -1
  174. package/lib/module/components/logos/svg/LogoPaymentMaestro.js +9 -19
  175. package/lib/module/components/logos/svg/LogoPaymentMaestro.js.map +1 -1
  176. package/lib/module/components/logos/svg/LogoPaymentMastercard.js +8 -18
  177. package/lib/module/components/logos/svg/LogoPaymentMastercard.js.map +1 -1
  178. package/lib/module/components/logos/svg/LogoPaymentPayPal.js +5 -5
  179. package/lib/module/components/logos/svg/LogoPaymentPayPal.js.map +1 -1
  180. package/lib/module/components/radio/AnimatedRadio.js +3 -3
  181. package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
  182. package/lib/module/components/radio/RadioGroup.js +28 -0
  183. package/lib/module/components/radio/RadioGroup.js.map +1 -0
  184. package/lib/module/components/radio/index.js +1 -0
  185. package/lib/module/components/radio/index.js.map +1 -1
  186. package/lib/module/components/typography/H3.js +19 -47
  187. package/lib/module/components/typography/H3.js.map +1 -1
  188. package/lib/module/components/typography/Link.js +17 -23
  189. package/lib/module/components/typography/Link.js.map +1 -1
  190. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -45
  191. package/lib/module/core/IOColors.js +1 -1
  192. package/lib/module/core/IOColors.js.map +1 -1
  193. package/lib/module/core/IOSpacing.js +1 -1
  194. package/lib/module/core/IOSpacing.js.map +1 -1
  195. package/lib/module/core/IOStyles.js +5 -0
  196. package/lib/module/core/IOStyles.js.map +1 -1
  197. package/lib/module/index.js +3 -1
  198. package/lib/module/index.js.map +1 -1
  199. package/lib/module/json-import.d.js +2 -0
  200. package/lib/module/json-import.d.js.map +1 -0
  201. package/lib/typescript/components/Advice/Advice.d.ts +7 -3
  202. package/lib/typescript/components/Advice/Advice.d.ts.map +1 -1
  203. package/lib/typescript/components/accordion/RawAccordion.d.ts +2 -2
  204. package/lib/typescript/components/accordion/RawAccordion.d.ts.map +1 -1
  205. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  206. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  207. package/lib/typescript/components/buttons/IconButtonContained.d.ts +15 -0
  208. package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -0
  209. package/lib/typescript/components/buttons/IconButtonSolid.d.ts +15 -0
  210. package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -0
  211. package/lib/typescript/components/buttons/index.d.ts +4 -2
  212. package/lib/typescript/components/buttons/index.d.ts.map +1 -1
  213. package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
  214. package/lib/typescript/components/icons/Icon.d.ts +16 -3
  215. package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
  216. package/lib/typescript/components/icons/index.d.ts +0 -1
  217. package/lib/typescript/components/icons/index.d.ts.map +1 -1
  218. package/lib/typescript/components/icons/svg/IconCheckTick.d.ts +5 -0
  219. package/lib/typescript/components/icons/svg/IconCheckTick.d.ts.map +1 -0
  220. package/lib/typescript/components/icons/svg/IconCheckTickBig.d.ts +5 -0
  221. package/lib/typescript/components/icons/svg/IconCheckTickBig.d.ts.map +1 -0
  222. package/lib/typescript/components/icons/svg/IconMerchant.d.ts +5 -0
  223. package/lib/typescript/components/icons/svg/IconMerchant.d.ts.map +1 -0
  224. package/lib/typescript/components/icons/svg/IconSystemAppsAndroid.d.ts +5 -0
  225. package/lib/typescript/components/icons/svg/IconSystemAppsAndroid.d.ts.map +1 -0
  226. package/lib/typescript/components/icons/svg/IconSystemNotificationsInstructions.d.ts +5 -0
  227. package/lib/typescript/components/icons/svg/IconSystemNotificationsInstructions.d.ts.map +1 -0
  228. package/lib/typescript/components/icons/svg/IconSystemSettingsAndroid.d.ts +5 -0
  229. package/lib/typescript/components/icons/svg/IconSystemSettingsAndroid.d.ts.map +1 -0
  230. package/lib/typescript/components/icons/svg/IconSystemSettingsiOS.d.ts +5 -0
  231. package/lib/typescript/components/icons/svg/IconSystemSettingsiOS.d.ts.map +1 -0
  232. package/lib/typescript/components/icons/svg/IconSystemToggleInstructions.d.ts +5 -0
  233. package/lib/typescript/components/icons/svg/IconSystemToggleInstructions.d.ts.map +1 -0
  234. package/lib/typescript/components/index.d.ts +13 -13
  235. package/lib/typescript/components/index.d.ts.map +1 -1
  236. package/lib/typescript/components/layout/GradientBottomActions.d.ts +22 -0
  237. package/lib/typescript/components/layout/GradientBottomActions.d.ts.map +1 -0
  238. package/lib/typescript/components/layout/GradientScrollView.d.ts +14 -0
  239. package/lib/typescript/components/layout/GradientScrollView.d.ts.map +1 -0
  240. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts +11 -0
  241. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -0
  242. package/lib/typescript/components/layout/index.d.ts +2 -0
  243. package/lib/typescript/components/layout/index.d.ts.map +1 -0
  244. package/lib/typescript/components/listitems/ListItemCheckbox.d.ts +21 -0
  245. package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -0
  246. package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
  247. package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
  248. package/lib/typescript/components/listitems/ListItemRadio.d.ts +22 -0
  249. package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -0
  250. package/lib/typescript/components/listitems/ListItemSwitch.d.ts +18 -0
  251. package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -0
  252. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  253. package/lib/typescript/components/listitems/index.d.ts +3 -0
  254. package/lib/typescript/components/listitems/index.d.ts.map +1 -1
  255. package/lib/typescript/components/logos/svg/LogoPaymentExtMaestro.d.ts.map +1 -1
  256. package/lib/typescript/components/logos/svg/LogoPaymentExtMastercard.d.ts +2 -2
  257. package/lib/typescript/components/logos/svg/LogoPaymentExtMastercard.d.ts.map +1 -1
  258. package/lib/typescript/components/logos/svg/LogoPaymentExtPayPal.d.ts.map +1 -1
  259. package/lib/typescript/components/logos/svg/LogoPaymentMaestro.d.ts.map +1 -1
  260. package/lib/typescript/components/logos/svg/LogoPaymentMastercard.d.ts.map +1 -1
  261. package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
  262. package/lib/typescript/components/radio/RadioGroup.d.ts +22 -0
  263. package/lib/typescript/components/radio/RadioGroup.d.ts.map +1 -0
  264. package/lib/typescript/components/radio/index.d.ts +1 -0
  265. package/lib/typescript/components/radio/index.d.ts.map +1 -1
  266. package/lib/typescript/components/typography/H3.d.ts +11 -30
  267. package/lib/typescript/components/typography/H3.d.ts.map +1 -1
  268. package/lib/typescript/components/typography/Link.d.ts +4 -4
  269. package/lib/typescript/components/typography/Link.d.ts.map +1 -1
  270. package/lib/typescript/core/IOColors.d.ts +2 -1
  271. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  272. package/lib/typescript/core/IOSpacing.d.ts +1 -1
  273. package/lib/typescript/core/IOSpacing.d.ts.map +1 -1
  274. package/lib/typescript/core/IOStyles.d.ts +6 -2
  275. package/lib/typescript/core/IOStyles.d.ts.map +1 -1
  276. package/lib/typescript/index.d.ts +3 -1
  277. package/lib/typescript/index.d.ts.map +1 -1
  278. package/package.json +12 -8
  279. package/src/components/Advice/Advice.tsx +19 -23
  280. package/src/components/Advice/__test__/advice.test.tsx +4 -2
  281. package/src/components/accordion/RawAccordion.tsx +6 -6
  282. package/src/components/badge/__test__/badge.test.tsx +4 -2
  283. package/src/components/buttons/ButtonLink.tsx +177 -177
  284. package/src/components/buttons/IconButton.tsx +9 -6
  285. package/src/components/buttons/IconButtonContained.tsx +201 -0
  286. package/src/components/buttons/IconButtonSolid.tsx +168 -0
  287. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +370 -0
  288. package/src/components/buttons/__test__/button.test.tsx +59 -4
  289. package/src/components/buttons/index.tsx +5 -3
  290. package/src/components/checkbox/AnimatedCheckbox.tsx +6 -8
  291. package/src/components/icons/Icon.tsx +37 -8
  292. package/src/components/icons/index.tsx +1 -2
  293. package/src/components/icons/svg/IconCheckTick.tsx +16 -0
  294. package/src/components/icons/svg/{IconCompleted.tsx → IconCheckTickBig.tsx} +2 -2
  295. package/src/components/icons/svg/IconMerchant.tsx +16 -0
  296. package/src/components/icons/svg/IconSystemAppsAndroid.tsx +17 -0
  297. package/src/components/icons/svg/IconSystemNotificationsInstructions.tsx +28 -0
  298. package/src/components/icons/svg/IconSystemSettingsAndroid.tsx +15 -0
  299. package/src/components/icons/svg/IconSystemSettingsiOS.tsx +58 -0
  300. package/src/components/icons/svg/IconSystemToggleInstructions.tsx +18 -0
  301. package/src/components/index.tsx +13 -13
  302. package/src/components/layout/GradientBottomActions.tsx +119 -0
  303. package/src/components/layout/GradientScrollView.tsx +167 -0
  304. package/src/components/layout/HeaderFirstLevel.tsx +76 -0
  305. package/src/components/layout/index.tsx +1 -0
  306. package/src/components/listitems/ListItemCheckbox.tsx +182 -0
  307. package/src/components/listitems/ListItemInfo.tsx +53 -58
  308. package/src/components/listitems/ListItemInfoCopy.tsx +122 -127
  309. package/src/components/listitems/ListItemRadio.tsx +185 -0
  310. package/src/components/listitems/ListItemSwitch.tsx +109 -0
  311. package/src/components/listitems/ListItemTransaction.tsx +154 -151
  312. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -14
  313. package/src/components/listitems/index.tsx +3 -0
  314. package/src/components/logos/svg/LogoPaymentExtMaestro.tsx +3 -20
  315. package/src/components/logos/svg/LogoPaymentExtMastercard.tsx +5 -22
  316. package/src/components/logos/svg/LogoPaymentExtPayPal.tsx +9 -31
  317. package/src/components/logos/svg/LogoPaymentMaestro.tsx +8 -6
  318. package/src/components/logos/svg/LogoPaymentMastercard.tsx +8 -6
  319. package/src/components/logos/svg/LogoPaymentPayPal.tsx +5 -5
  320. package/src/components/radio/AnimatedRadio.tsx +6 -8
  321. package/src/components/radio/RadioGroup.tsx +43 -0
  322. package/src/components/radio/index.tsx +1 -0
  323. package/src/components/typography/H3.tsx +25 -91
  324. package/src/components/typography/Link.tsx +23 -30
  325. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -45
  326. package/src/core/IOColors.ts +2 -2
  327. package/src/core/IOSpacing.ts +2 -2
  328. package/src/core/IOStyles.ts +9 -0
  329. package/src/index.tsx +4 -1
  330. package/src/json-import.d.ts +13 -0
  331. package/lib/commonjs/components/icons/svg/LegIconChevronLeft.js.map +0 -1
  332. package/lib/commonjs/components/icons/svg/LegIconSearch.js.map +0 -1
  333. package/lib/module/components/icons/svg/LegIconChevronLeft.js.map +0 -1
  334. package/lib/module/components/icons/svg/LegIconSearch.js.map +0 -1
  335. package/lib/typescript/components/icons/svg/IconCompleted.d.ts +0 -5
  336. package/lib/typescript/components/icons/svg/IconCompleted.d.ts.map +0 -1
  337. package/lib/typescript/components/icons/svg/LegIconChevronLeft.d.ts +0 -5
  338. package/lib/typescript/components/icons/svg/LegIconChevronLeft.d.ts.map +0 -1
  339. package/lib/typescript/components/icons/svg/LegIconSearch.d.ts +0 -5
  340. package/lib/typescript/components/icons/svg/LegIconSearch.d.ts.map +0 -1
  341. package/src/components/icons/svg/LegIconChevronLeft.tsx +0 -14
  342. package/src/components/icons/svg/LegIconSearch.tsx +0 -22
@@ -0,0 +1,182 @@
1
+ import * as React from "react";
2
+ import { useCallback, useState } from "react";
3
+ import { Pressable, View } from "react-native";
4
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
5
+ import Animated, {
6
+ Extrapolate,
7
+ interpolate,
8
+ interpolateColor,
9
+ useAnimatedStyle,
10
+ useDerivedValue,
11
+ useSharedValue,
12
+ withSpring
13
+ } from "react-native-reanimated";
14
+ import {
15
+ IOColors,
16
+ IOScaleValues,
17
+ IOSelectionListItemStyles,
18
+ IOSelectionListItemVisualParams,
19
+ IOSpringValues,
20
+ IOStyles,
21
+ hexToRgba,
22
+ useIOTheme
23
+ } from "../../core";
24
+ import { IOIcons, Icon } from "../icons";
25
+ import { HSpacer, VSpacer } from "../spacer";
26
+ import { H6, LabelSmall } from "../typography";
27
+ import { AnimatedCheckbox } from "../checkbox/AnimatedCheckbox";
28
+
29
+ type Props = {
30
+ value: string;
31
+ description?: string;
32
+ icon?: IOIcons;
33
+ selected?: boolean;
34
+ onValueChange?: (newValue: boolean) => void;
35
+ };
36
+
37
+ const DISABLED_OPACITY = 0.5;
38
+
39
+ // disabled: the component is no longer touchable
40
+ // onPress:
41
+ type OwnProps = Props &
42
+ Pick<
43
+ React.ComponentProps<typeof Pressable>,
44
+ "onPress" | "accessibilityLabel" | "disabled"
45
+ >;
46
+
47
+ /**
48
+ * with the automatic state management that uses a {@link AnimatedCheckBox}
49
+ * The toggleValue change when a `onPress` event is received and dispatch the `onValueChange`.
50
+ *
51
+ * @param props
52
+ * @constructor
53
+ */
54
+ export const ListItemCheckbox = ({
55
+ value,
56
+ description,
57
+ icon,
58
+ selected,
59
+ disabled,
60
+ onValueChange
61
+ }: OwnProps) => {
62
+ const [toggleValue, setToggleValue] = useState(selected ?? false);
63
+ // Animations
64
+ const isPressed: Animated.SharedValue<number> = useSharedValue(0);
65
+
66
+ // Scaling transformation applied when the button is pressed
67
+ const animationScaleValue = IOScaleValues?.basicButton?.pressedState;
68
+
69
+ const progressPressed = useDerivedValue(() =>
70
+ withSpring(isPressed.value, IOSpringValues.button)
71
+ );
72
+
73
+ // Theme
74
+ const theme = useIOTheme();
75
+
76
+ const mapBackgroundStates: Record<string, string> = {
77
+ default: hexToRgba(IOColors[theme["listItem-pressed"]], 0),
78
+ pressed: IOColors[theme["listItem-pressed"]]
79
+ };
80
+
81
+ // Interpolate animation values from `isPressed` values
82
+ const animatedScaleStyle = useAnimatedStyle(() => {
83
+ const scale = interpolate(
84
+ progressPressed.value,
85
+ [0, 1],
86
+ [1, animationScaleValue],
87
+ Extrapolate.CLAMP
88
+ );
89
+
90
+ return {
91
+ transform: [{ scale }]
92
+ };
93
+ });
94
+
95
+ const handlePressIn = useCallback(() => {
96
+ // eslint-disable-next-line functional/immutable-data
97
+ isPressed.value = 1;
98
+ }, [isPressed]);
99
+ const handlePressOut = useCallback(() => {
100
+ // eslint-disable-next-line functional/immutable-data
101
+ isPressed.value = 0;
102
+ }, [isPressed]);
103
+
104
+ const animatedBackgroundStyle = useAnimatedStyle(() => {
105
+ const backgroundColor = interpolateColor(
106
+ progressPressed.value,
107
+ [0, 1],
108
+ [mapBackgroundStates.default, mapBackgroundStates.pressed]
109
+ );
110
+
111
+ return {
112
+ backgroundColor
113
+ };
114
+ });
115
+
116
+ const toggleCheckbox = () => {
117
+ ReactNativeHapticFeedback.trigger("impactLight");
118
+ setToggleValue(!toggleValue);
119
+ if (onValueChange !== undefined) {
120
+ onValueChange(!toggleValue);
121
+ }
122
+ };
123
+
124
+ return (
125
+ <Pressable
126
+ onPress={toggleCheckbox}
127
+ onPressIn={handlePressIn}
128
+ onPressOut={handlePressOut}
129
+ onTouchEnd={handlePressOut}
130
+ testID="ListItemCheckbox"
131
+ disabled={disabled}
132
+ >
133
+ <Animated.View
134
+ style={[
135
+ IOSelectionListItemStyles.listItem,
136
+ animatedBackgroundStyle,
137
+ { opacity: disabled ? DISABLED_OPACITY : 1 }
138
+ ]}
139
+ // This is required to avoid opacity
140
+ // inheritance on Android
141
+ needsOffscreenAlphaCompositing={true}
142
+ >
143
+ <Animated.View style={animatedScaleStyle}>
144
+ <View style={IOSelectionListItemStyles.listItemInner}>
145
+ <View style={[IOStyles.row, { flexShrink: 1 }]}>
146
+ {icon && (
147
+ <View
148
+ style={{
149
+ marginRight: IOSelectionListItemVisualParams.iconMargin
150
+ }}
151
+ >
152
+ <Icon
153
+ name={icon}
154
+ color="grey-300"
155
+ size={IOSelectionListItemVisualParams.iconSize}
156
+ />
157
+ </View>
158
+ )}
159
+ <H6 color={"black"} style={{ flexShrink: 1 }}>
160
+ {value}
161
+ </H6>
162
+ </View>
163
+ <HSpacer size={8} />
164
+ <View pointerEvents="none">
165
+ <AnimatedCheckbox checked={selected ?? toggleValue} />
166
+ </View>
167
+ </View>
168
+ {description && (
169
+ <View>
170
+ <VSpacer
171
+ size={IOSelectionListItemVisualParams.descriptionMargin}
172
+ />
173
+ <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
174
+ {description}
175
+ </LabelSmall>
176
+ </View>
177
+ )}
178
+ </Animated.View>
179
+ </Animated.View>
180
+ </Pressable>
181
+ );
182
+ };
@@ -1,75 +1,70 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
3
  import {
4
- IOListItemStyles,
5
- IOListItemVisualParams,
6
- IOStyles,
7
- useIOTheme
4
+ IOListItemStyles,
5
+ IOListItemVisualParams,
6
+ IOStyles,
7
+ useIOTheme
8
8
  } from "../../core";
9
9
  import { WithTestID } from "../../utils/types";
10
10
  import { Icon, IOIcons } from "../icons";
11
- import { VSpacer } from "../spacer/Spacer";
12
11
  import { H6, LabelSmall } from "../typography";
13
12
 
14
13
  export type ListItemInfo = WithTestID<{
15
- label: string;
16
- value: string | React.ReactNode;
17
- numberOfLines?: number;
18
- icon?: IOIcons;
19
- // Accepted components: ButtonLink, IconButton
20
- // Don't use any components other than these
21
- action?: React.ReactNode;
22
- // Accessibility
23
- accessibilityLabel: string;
14
+ label: string;
15
+ value: string | React.ReactNode;
16
+ numberOfLines?: number;
17
+ icon?: IOIcons;
18
+ // Accepted components: ButtonLink, IconButton
19
+ // Don't use any components other than these
20
+ action?: React.ReactNode;
21
+ // Accessibility
22
+ accessibilityLabel: string;
24
23
  }>;
25
24
 
26
25
  export const ListItemInfo = ({
27
- label,
28
- value,
29
- numberOfLines = 2,
30
- icon,
31
- action,
32
- accessibilityLabel,
33
- testID
26
+ label,
27
+ value,
28
+ numberOfLines = 2,
29
+ icon,
30
+ action,
31
+ accessibilityLabel,
32
+ testID
34
33
  }: ListItemInfo) => {
35
- const theme = useIOTheme();
36
- return (
37
- <View
38
- style={IOListItemStyles.listItem}
39
- testID={testID}
40
- accessible={true}
41
- accessibilityLabel={accessibilityLabel}
42
- >
43
- <View style={IOListItemStyles.listItemInner}>
44
- {icon && (
45
- <View style={{ marginRight: IOListItemVisualParams.iconMargin }}>
46
- <Icon
47
- name={icon}
48
- color="grey-450"
49
- size={IOListItemVisualParams.iconSize}
50
- />
51
- </View>
52
- )}
53
- <View style={IOStyles.flex}>
54
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
55
- {label}
56
- </LabelSmall>
57
- <VSpacer size={4} />
58
- <H6
59
- color={theme["textBody-default"]}
60
- numberOfLines={numberOfLines}
61
- >
62
- {value}
63
- </H6>
64
- </View>
65
- {action && (
66
- <View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
67
- {action}
68
- </View>
69
- )}
70
- </View>
34
+ const theme = useIOTheme();
35
+ return (
36
+ <View
37
+ style={IOListItemStyles.listItem}
38
+ testID={testID}
39
+ accessible={true}
40
+ accessibilityLabel={accessibilityLabel}
41
+ >
42
+ <View style={IOListItemStyles.listItemInner}>
43
+ {icon && (
44
+ <View style={{ marginRight: IOListItemVisualParams.actionMargin }}>
45
+ <Icon
46
+ name={icon}
47
+ color="grey-450"
48
+ size={IOListItemVisualParams.iconSize}
49
+ />
50
+ </View>
51
+ )}
52
+ <View style={IOStyles.flex}>
53
+ <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
54
+ {label}
55
+ </LabelSmall>
56
+ <H6 color={theme["textBody-default"]} numberOfLines={numberOfLines}>
57
+ {value}
58
+ </H6>
71
59
  </View>
72
- );
60
+ {action && (
61
+ <View style={{ marginLeft: IOListItemVisualParams.actionMargin }}>
62
+ {action}
63
+ </View>
64
+ )}
65
+ </View>
66
+ </View>
67
+ );
73
68
  };
74
69
 
75
70
  export default ListItemInfo;
@@ -1,155 +1,150 @@
1
1
  import React, { useCallback } from "react";
2
- import {
3
- GestureResponderEvent,
4
- Pressable,
5
- View
6
- } from "react-native";
2
+ import { GestureResponderEvent, Pressable, View } from "react-native";
7
3
  import Animated, {
8
- Extrapolate,
9
- interpolate,
10
- interpolateColor,
11
- useAnimatedStyle,
12
- useDerivedValue,
13
- useSharedValue,
14
- withSpring
4
+ Extrapolate,
5
+ interpolate,
6
+ interpolateColor,
7
+ useAnimatedStyle,
8
+ useDerivedValue,
9
+ useSharedValue,
10
+ withSpring
15
11
  } from "react-native-reanimated";
16
12
  import {
17
- IOColors,
18
- IOListItemStyles,
19
- IOListItemVisualParams,
20
- IOScaleValues,
21
- IOSpringValues,
22
- IOStyles,
23
- hexToRgba, useIOTheme
13
+ IOColors,
14
+ IOListItemStyles,
15
+ IOListItemVisualParams,
16
+ IOScaleValues,
17
+ IOSpringValues,
18
+ IOStyles,
19
+ hexToRgba,
20
+ useIOTheme
24
21
  } from "../../core";
25
22
  import { WithTestID } from "../../utils/types";
26
23
  import { IOIcons, Icon } from "../icons";
27
- import { VSpacer } from "../spacer/Spacer";
28
24
  import { H6, LabelSmall } from "../typography";
29
25
 
30
26
  export type ListItemInfoCopy = WithTestID<{
31
- label: string;
32
- value: string | React.ReactNode;
33
- numberOfLines?: number;
34
- onPress: (event: GestureResponderEvent) => void;
35
- icon?: IOIcons;
36
- // Accessibility
37
- accessibilityLabel: string;
27
+ label: string;
28
+ value: string | React.ReactNode;
29
+ numberOfLines?: number;
30
+ onPress: (event: GestureResponderEvent) => void;
31
+ icon?: IOIcons;
32
+ // Accessibility
33
+ accessibilityLabel: string;
38
34
  }>;
39
35
 
40
36
  export const ListItemInfoCopy = ({
41
- label,
42
- value,
43
- numberOfLines = 2,
44
- onPress,
45
- icon,
46
- accessibilityLabel,
47
- testID
37
+ label,
38
+ value,
39
+ numberOfLines = 2,
40
+ onPress,
41
+ icon,
42
+ accessibilityLabel,
43
+ testID
48
44
  }: ListItemInfoCopy) => {
49
- const isPressed = useSharedValue(0);
45
+ const isPressed = useSharedValue(0);
50
46
 
51
- const theme = useIOTheme();
47
+ const theme = useIOTheme();
52
48
 
53
- const mapBackgroundStates: Record<string, string> = {
54
- default: hexToRgba(IOColors[theme["listItem-pressed"]], 0),
55
- pressed: IOColors[theme["listItem-pressed"]]
56
- };
49
+ const mapBackgroundStates: Record<string, string> = {
50
+ default: hexToRgba(IOColors[theme["listItem-pressed"]], 0),
51
+ pressed: IOColors[theme["listItem-pressed"]]
52
+ };
57
53
 
58
- // Scaling transformation applied when the button is pressed
59
- const animationScaleValue = IOScaleValues?.basicButton?.pressedState;
54
+ // Scaling transformation applied when the button is pressed
55
+ const animationScaleValue = IOScaleValues?.basicButton?.pressedState;
60
56
 
61
- const progressPressed = useDerivedValue(() =>
62
- withSpring(isPressed.value, IOSpringValues.button)
63
- );
57
+ const progressPressed = useDerivedValue(() =>
58
+ withSpring(isPressed.value, IOSpringValues.button)
59
+ );
64
60
 
65
- // Interpolate animation values from `isPressed` values
66
- const animatedScaleStyle = useAnimatedStyle(() => {
67
- const scale = interpolate(
68
- progressPressed.value,
69
- [0, 1],
70
- [1, animationScaleValue],
71
- Extrapolate.CLAMP
72
- );
61
+ // Interpolate animation values from `isPressed` values
62
+ const animatedScaleStyle = useAnimatedStyle(() => {
63
+ const scale = interpolate(
64
+ progressPressed.value,
65
+ [0, 1],
66
+ [1, animationScaleValue],
67
+ Extrapolate.CLAMP
68
+ );
73
69
 
74
- return {
75
- transform: [{ scale }]
76
- };
77
- });
70
+ return {
71
+ transform: [{ scale }]
72
+ };
73
+ });
78
74
 
79
- const animatedBackgroundStyle = useAnimatedStyle(() => {
80
- const backgroundColor = interpolateColor(
81
- progressPressed.value,
82
- [0, 1],
83
- [mapBackgroundStates.default, mapBackgroundStates.pressed]
84
- );
75
+ const animatedBackgroundStyle = useAnimatedStyle(() => {
76
+ const backgroundColor = interpolateColor(
77
+ progressPressed.value,
78
+ [0, 1],
79
+ [mapBackgroundStates.default, mapBackgroundStates.pressed]
80
+ );
85
81
 
86
- return {
87
- backgroundColor
88
- };
89
- });
82
+ return {
83
+ backgroundColor
84
+ };
85
+ });
90
86
 
91
- const handlePressIn = useCallback(() => {
92
- // eslint-disable-next-line functional/immutable-data
93
- isPressed.value = 1;
94
- }, [isPressed]);
95
- const handlePressOut = useCallback(() => {
96
- // eslint-disable-next-line functional/immutable-data
97
- isPressed.value = 0;
98
- }, [isPressed]);
87
+ const handlePressIn = useCallback(() => {
88
+ // eslint-disable-next-line functional/immutable-data
89
+ isPressed.value = 1;
90
+ }, [isPressed]);
91
+ const handlePressOut = useCallback(() => {
92
+ // eslint-disable-next-line functional/immutable-data
93
+ isPressed.value = 0;
94
+ }, [isPressed]);
99
95
 
100
- return (
101
- <Pressable
102
- onPress={onPress}
103
- onPressIn={handlePressIn}
104
- onPressOut={handlePressOut}
105
- accessible={true}
106
- accessibilityLabel={accessibilityLabel}
107
- accessibilityRole="button"
108
- testID={testID}
96
+ return (
97
+ <Pressable
98
+ onPress={onPress}
99
+ onPressIn={handlePressIn}
100
+ onPressOut={handlePressOut}
101
+ accessible={true}
102
+ accessibilityLabel={accessibilityLabel}
103
+ accessibilityRole="button"
104
+ testID={testID}
105
+ >
106
+ <Animated.View
107
+ style={[IOListItemStyles.listItem, animatedBackgroundStyle]}
108
+ >
109
+ <Animated.View
110
+ style={[IOListItemStyles.listItemInner, animatedScaleStyle]}
109
111
  >
110
- <Animated.View
111
- style={[IOListItemStyles.listItem, animatedBackgroundStyle]}
112
- >
113
- <Animated.View
114
- style={[IOListItemStyles.listItemInner, animatedScaleStyle]}
115
- >
116
- {icon && (
117
- <View style={{ marginRight: IOListItemVisualParams.iconMargin }}>
118
- <Icon
119
- name={icon}
120
- color="grey-450"
121
- size={IOListItemVisualParams.iconSize}
122
- />
123
- </View>
124
- )}
125
- <View style={IOStyles.flex}>
126
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
127
- {label}
128
- </LabelSmall>
129
- <VSpacer size={4} />
130
- {/* Let developer using a custom component (e.g: skeleton) */}
131
- {typeof value === "string" ? (
132
- <H6
133
- color={theme["interactiveElem-default"]}
134
- numberOfLines={numberOfLines}
135
- >
136
- {value}
137
- </H6>
138
- ) : (
139
- { value }
140
- )}
141
- </View>
142
- <View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
143
- <Icon
144
- name="copy"
145
- color={theme["interactiveElem-default"]}
146
- size={IOListItemVisualParams.chevronSize}
147
- />
148
- </View>
149
- </Animated.View>
150
- </Animated.View>
151
- </Pressable>
152
- );
112
+ {icon && (
113
+ <View style={{ marginRight: IOListItemVisualParams.iconMargin }}>
114
+ <Icon
115
+ name={icon}
116
+ color="grey-450"
117
+ size={IOListItemVisualParams.iconSize}
118
+ />
119
+ </View>
120
+ )}
121
+ <View style={IOStyles.flex}>
122
+ <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
123
+ {label}
124
+ </LabelSmall>
125
+ {/* Let developer using a custom component (e.g: skeleton) */}
126
+ {typeof value === "string" ? (
127
+ <H6
128
+ color={theme["interactiveElem-default"]}
129
+ numberOfLines={numberOfLines}
130
+ >
131
+ {value}
132
+ </H6>
133
+ ) : (
134
+ { value }
135
+ )}
136
+ </View>
137
+ <View style={{ marginLeft: IOListItemVisualParams.iconMargin }}>
138
+ <Icon
139
+ name="copy"
140
+ color={theme["interactiveElem-default"]}
141
+ size={IOListItemVisualParams.chevronSize}
142
+ />
143
+ </View>
144
+ </Animated.View>
145
+ </Animated.View>
146
+ </Pressable>
147
+ );
153
148
  };
154
149
 
155
150
  export default ListItemInfoCopy;