@pagopa/io-app-design-system 4.2.0 → 4.3.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 (269) hide show
  1. package/lib/commonjs/components/alert/Alert.js +10 -31
  2. package/lib/commonjs/components/alert/Alert.js.map +1 -1
  3. package/lib/commonjs/components/alert/AlertEdgeToEdge.js +9 -29
  4. package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
  5. package/lib/commonjs/components/banner/Banner.js +10 -34
  6. package/lib/commonjs/components/banner/Banner.js.map +1 -1
  7. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +1 -1
  8. package/lib/commonjs/components/buttons/ButtonLink.js +20 -53
  9. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  10. package/lib/commonjs/components/buttons/ButtonOutline.js +24 -44
  11. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  12. package/lib/commonjs/components/buttons/ButtonSolid.js +14 -39
  13. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  14. package/lib/commonjs/components/buttons/IconButton.js +13 -32
  15. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  16. package/lib/commonjs/components/buttons/IconButtonContained.js +19 -42
  17. package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
  18. package/lib/commonjs/components/buttons/IconButtonSolid.js +15 -31
  19. package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
  20. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +34 -10
  21. package/lib/commonjs/components/layout/index.js +0 -11
  22. package/lib/commonjs/components/layout/index.js.map +1 -1
  23. package/lib/commonjs/components/listitems/ListItemAction.js +16 -41
  24. package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
  25. package/lib/commonjs/components/listitems/ListItemCheckbox.js +13 -41
  26. package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
  27. package/lib/commonjs/components/listitems/ListItemHeader.js +2 -2
  28. package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
  29. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +15 -43
  30. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  31. package/lib/commonjs/components/listitems/ListItemNav.js +17 -48
  32. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  33. package/lib/commonjs/components/listitems/ListItemNavAlert.js +19 -50
  34. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  35. package/lib/commonjs/components/listitems/ListItemRadio.js +20 -50
  36. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
  37. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +13 -25
  38. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  39. package/lib/commonjs/components/listitems/ListItemTransaction.js +4 -5
  40. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  41. package/lib/commonjs/components/listitems/{PressableListItemsBase.js → PressableListItemBase.js} +7 -7
  42. package/lib/commonjs/components/listitems/PressableListItemBase.js.map +1 -0
  43. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +45 -81
  44. package/lib/commonjs/components/listitems/__test__/listitem.test.js +3 -3
  45. package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
  46. package/lib/commonjs/components/listitems/index.js +11 -11
  47. package/lib/commonjs/components/listitems/index.js.map +1 -1
  48. package/lib/commonjs/components/modules/ModuleCredential.js +35 -28
  49. package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
  50. package/lib/commonjs/components/modules/PressableModuleBase.js +17 -11
  51. package/lib/commonjs/components/modules/PressableModuleBase.js.map +1 -1
  52. package/lib/commonjs/components/modules/index.js +8 -8
  53. package/lib/commonjs/components/modules/index.js.map +1 -1
  54. package/lib/commonjs/components/numberpad/NumberButton.js +12 -28
  55. package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
  56. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -0
  57. package/lib/commonjs/components/stack/Stack.js +4 -3
  58. package/lib/commonjs/components/stack/Stack.js.map +1 -1
  59. package/lib/commonjs/components/tabs/TabItem.js +15 -21
  60. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  61. package/lib/commonjs/components/typography/H6.js +1 -1
  62. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +1 -1
  63. package/lib/commonjs/core/IOAnimations.js +6 -12
  64. package/lib/commonjs/core/IOAnimations.js.map +1 -1
  65. package/lib/commonjs/hooks/index.js +28 -0
  66. package/lib/commonjs/hooks/index.js.map +1 -0
  67. package/lib/commonjs/hooks/useListItemAnimation.js +40 -0
  68. package/lib/commonjs/hooks/useListItemAnimation.js.map +1 -0
  69. package/lib/commonjs/hooks/useScaleAnimation.js +36 -0
  70. package/lib/commonjs/hooks/useScaleAnimation.js.map +1 -0
  71. package/lib/commonjs/index.js +11 -0
  72. package/lib/commonjs/index.js.map +1 -1
  73. package/lib/commonjs/utils/fonts.js +1 -1
  74. package/lib/commonjs/utils/hooks/index.js +28 -0
  75. package/lib/commonjs/utils/hooks/index.js.map +1 -0
  76. package/lib/commonjs/utils/hooks/useSpringPressProgressValue.js +5 -7
  77. package/lib/commonjs/utils/hooks/useSpringPressProgressValue.js.map +1 -1
  78. package/lib/module/components/alert/Alert.js +10 -32
  79. package/lib/module/components/alert/Alert.js.map +1 -1
  80. package/lib/module/components/alert/AlertEdgeToEdge.js +10 -31
  81. package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
  82. package/lib/module/components/banner/Banner.js +10 -33
  83. package/lib/module/components/banner/Banner.js.map +1 -1
  84. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +1 -1
  85. package/lib/module/components/buttons/ButtonLink.js +23 -56
  86. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  87. package/lib/module/components/buttons/ButtonOutline.js +27 -47
  88. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  89. package/lib/module/components/buttons/ButtonSolid.js +17 -42
  90. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  91. package/lib/module/components/buttons/IconButton.js +16 -35
  92. package/lib/module/components/buttons/IconButton.js.map +1 -1
  93. package/lib/module/components/buttons/IconButtonContained.js +21 -45
  94. package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
  95. package/lib/module/components/buttons/IconButtonSolid.js +17 -34
  96. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
  97. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +34 -10
  98. package/lib/module/components/layout/index.js +0 -1
  99. package/lib/module/components/layout/index.js.map +1 -1
  100. package/lib/module/components/listitems/ListItemAction.js +17 -43
  101. package/lib/module/components/listitems/ListItemAction.js.map +1 -1
  102. package/lib/module/components/listitems/ListItemCheckbox.js +15 -43
  103. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
  104. package/lib/module/components/listitems/ListItemHeader.js +2 -2
  105. package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
  106. package/lib/module/components/listitems/ListItemInfoCopy.js +16 -45
  107. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  108. package/lib/module/components/listitems/ListItemNav.js +17 -47
  109. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  110. package/lib/module/components/listitems/ListItemNavAlert.js +19 -49
  111. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  112. package/lib/module/components/listitems/ListItemRadio.js +22 -52
  113. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  114. package/lib/module/components/listitems/ListItemRadioWithAmount.js +14 -26
  115. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  116. package/lib/module/components/listitems/ListItemTransaction.js +3 -4
  117. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  118. package/lib/module/components/listitems/{PressableListItemsBase.js → PressableListItemBase.js} +7 -7
  119. package/lib/module/components/listitems/PressableListItemBase.js.map +1 -0
  120. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +45 -81
  121. package/lib/module/components/listitems/__test__/listitem.test.js +1 -1
  122. package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
  123. package/lib/module/components/listitems/index.js +1 -1
  124. package/lib/module/components/listitems/index.js.map +1 -1
  125. package/lib/module/components/modules/ModuleCredential.js +36 -29
  126. package/lib/module/components/modules/ModuleCredential.js.map +1 -1
  127. package/lib/module/components/modules/PressableModuleBase.js +17 -10
  128. package/lib/module/components/modules/PressableModuleBase.js.map +1 -1
  129. package/lib/module/components/modules/index.js +1 -1
  130. package/lib/module/components/modules/index.js.map +1 -1
  131. package/lib/module/components/numberpad/NumberButton.js +14 -30
  132. package/lib/module/components/numberpad/NumberButton.js.map +1 -1
  133. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -0
  134. package/lib/module/components/stack/Stack.js +4 -3
  135. package/lib/module/components/stack/Stack.js.map +1 -1
  136. package/lib/module/components/tabs/TabItem.js +18 -24
  137. package/lib/module/components/tabs/TabItem.js.map +1 -1
  138. package/lib/module/components/typography/H6.js +1 -1
  139. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +1 -1
  140. package/lib/module/core/IOAnimations.js +4 -10
  141. package/lib/module/core/IOAnimations.js.map +1 -1
  142. package/lib/module/hooks/index.js +3 -0
  143. package/lib/module/hooks/index.js.map +1 -0
  144. package/lib/module/hooks/useListItemAnimation.js +33 -0
  145. package/lib/module/hooks/useListItemAnimation.js.map +1 -0
  146. package/lib/module/hooks/useScaleAnimation.js +29 -0
  147. package/lib/module/hooks/useScaleAnimation.js.map +1 -0
  148. package/lib/module/index.js +1 -0
  149. package/lib/module/index.js.map +1 -1
  150. package/lib/module/utils/fonts.js +1 -1
  151. package/lib/module/utils/hooks/index.js +3 -0
  152. package/lib/module/utils/hooks/index.js.map +1 -0
  153. package/lib/module/utils/hooks/useSpringPressProgressValue.js +5 -5
  154. package/lib/module/utils/hooks/useSpringPressProgressValue.js.map +1 -1
  155. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  156. package/lib/typescript/components/alert/AlertEdgeToEdge.d.ts.map +1 -1
  157. package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
  158. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  159. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  160. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  161. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  162. package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
  163. package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
  164. package/lib/typescript/components/layout/index.d.ts +0 -1
  165. package/lib/typescript/components/layout/index.d.ts.map +1 -1
  166. package/lib/typescript/components/listitems/ListItemAction.d.ts.map +1 -1
  167. package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -1
  168. package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
  169. package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
  170. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
  171. package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
  172. package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
  173. package/lib/typescript/components/listitems/ListItemTransaction.d.ts +1 -1
  174. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  175. package/lib/typescript/components/listitems/{PressableListItemsBase.d.ts → PressableListItemBase.d.ts} +3 -2
  176. package/lib/typescript/components/listitems/PressableListItemBase.d.ts.map +1 -0
  177. package/lib/typescript/components/listitems/index.d.ts +1 -1
  178. package/lib/typescript/components/listitems/index.d.ts.map +1 -1
  179. package/lib/typescript/components/modules/ModuleCredential.d.ts +2 -2
  180. package/lib/typescript/components/modules/ModuleCredential.d.ts.map +1 -1
  181. package/lib/typescript/components/modules/PressableModuleBase.d.ts.map +1 -1
  182. package/lib/typescript/components/modules/index.d.ts +1 -1
  183. package/lib/typescript/components/modules/index.d.ts.map +1 -1
  184. package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
  185. package/lib/typescript/components/stack/Stack.d.ts +4 -3
  186. package/lib/typescript/components/stack/Stack.d.ts.map +1 -1
  187. package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
  188. package/lib/typescript/core/IOAnimations.d.ts +6 -10
  189. package/lib/typescript/core/IOAnimations.d.ts.map +1 -1
  190. package/lib/typescript/hooks/index.d.ts +3 -0
  191. package/lib/typescript/hooks/index.d.ts.map +1 -0
  192. package/lib/typescript/hooks/useListItemAnimation.d.ts +10 -0
  193. package/lib/typescript/hooks/useListItemAnimation.d.ts.map +1 -0
  194. package/lib/typescript/hooks/useScaleAnimation.d.ts +10 -0
  195. package/lib/typescript/hooks/useScaleAnimation.d.ts.map +1 -0
  196. package/lib/typescript/index.d.ts +1 -0
  197. package/lib/typescript/index.d.ts.map +1 -1
  198. package/lib/typescript/utils/fonts.d.ts +1 -1
  199. package/lib/typescript/utils/hooks/index.d.ts +3 -0
  200. package/lib/typescript/utils/hooks/index.d.ts.map +1 -0
  201. package/lib/typescript/utils/hooks/useSpringPressProgressValue.d.ts +7 -8
  202. package/lib/typescript/utils/hooks/useSpringPressProgressValue.d.ts.map +1 -1
  203. package/package.json +1 -1
  204. package/src/components/alert/Alert.tsx +7 -46
  205. package/src/components/alert/AlertEdgeToEdge.tsx +6 -46
  206. package/src/components/banner/Banner.tsx +6 -52
  207. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +1 -1
  208. package/src/components/buttons/ButtonLink.tsx +32 -89
  209. package/src/components/buttons/ButtonOutline.tsx +26 -60
  210. package/src/components/buttons/ButtonSolid.tsx +11 -58
  211. package/src/components/buttons/IconButton.tsx +10 -47
  212. package/src/components/buttons/IconButtonContained.tsx +21 -57
  213. package/src/components/buttons/IconButtonSolid.tsx +15 -46
  214. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +34 -10
  215. package/src/components/layout/index.tsx +0 -1
  216. package/src/components/listitems/ListItemAction.tsx +11 -67
  217. package/src/components/listitems/ListItemCheckbox.tsx +10 -68
  218. package/src/components/listitems/ListItemHeader.tsx +2 -2
  219. package/src/components/listitems/ListItemInfoCopy.tsx +11 -71
  220. package/src/components/listitems/ListItemNav.tsx +13 -74
  221. package/src/components/listitems/ListItemNavAlert.tsx +18 -92
  222. package/src/components/listitems/ListItemRadio.tsx +14 -75
  223. package/src/components/listitems/ListItemRadioWithAmount.tsx +16 -31
  224. package/src/components/listitems/ListItemTransaction.tsx +3 -7
  225. package/src/components/listitems/{PressableListItemsBase.tsx → PressableListItemBase.tsx} +7 -6
  226. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +45 -81
  227. package/src/components/listitems/__test__/listitem.test.tsx +1 -1
  228. package/src/components/listitems/index.tsx +1 -1
  229. package/src/components/modules/ModuleCredential.tsx +49 -39
  230. package/src/components/modules/PressableModuleBase.tsx +15 -8
  231. package/src/components/modules/index.tsx +1 -1
  232. package/src/components/numberpad/NumberButton.tsx +12 -43
  233. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -0
  234. package/src/components/stack/Stack.tsx +11 -3
  235. package/src/components/tabs/TabItem.tsx +15 -29
  236. package/src/components/typography/H6.tsx +1 -1
  237. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +1 -1
  238. package/src/core/IOAnimations.ts +8 -10
  239. package/src/hooks/index.tsx +2 -0
  240. package/src/hooks/useListItemAnimation.tsx +59 -0
  241. package/src/hooks/useScaleAnimation.tsx +41 -0
  242. package/src/index.tsx +1 -0
  243. package/src/utils/fonts.ts +1 -1
  244. package/src/utils/hooks/index.tsx +2 -0
  245. package/src/utils/hooks/useSpringPressProgressValue.ts +14 -8
  246. package/lib/commonjs/components/layout/FooterWithButtons.js +0 -84
  247. package/lib/commonjs/components/layout/FooterWithButtons.js.map +0 -1
  248. package/lib/commonjs/components/listitems/PressableListItemsBase.js.map +0 -1
  249. package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js +0 -56
  250. package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js.map +0 -1
  251. package/lib/commonjs/components/modules/hooks/useModuleSpringAnimation.js +0 -41
  252. package/lib/commonjs/components/modules/hooks/useModuleSpringAnimation.js.map +0 -1
  253. package/lib/module/components/layout/FooterWithButtons.js +0 -75
  254. package/lib/module/components/layout/FooterWithButtons.js.map +0 -1
  255. package/lib/module/components/listitems/PressableListItemsBase.js.map +0 -1
  256. package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js +0 -47
  257. package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js.map +0 -1
  258. package/lib/module/components/modules/hooks/useModuleSpringAnimation.js +0 -34
  259. package/lib/module/components/modules/hooks/useModuleSpringAnimation.js.map +0 -1
  260. package/lib/typescript/components/layout/FooterWithButtons.d.ts +0 -16
  261. package/lib/typescript/components/layout/FooterWithButtons.d.ts.map +0 -1
  262. package/lib/typescript/components/listitems/PressableListItemsBase.d.ts.map +0 -1
  263. package/lib/typescript/components/listitems/hooks/useListItemSpringAnimation.d.ts +0 -13
  264. package/lib/typescript/components/listitems/hooks/useListItemSpringAnimation.d.ts.map +0 -1
  265. package/lib/typescript/components/modules/hooks/useModuleSpringAnimation.d.ts +0 -10
  266. package/lib/typescript/components/modules/hooks/useModuleSpringAnimation.d.ts.map +0 -1
  267. package/src/components/layout/FooterWithButtons.tsx +0 -90
  268. package/src/components/listitems/hooks/useListItemSpringAnimation.ts +0 -72
  269. package/src/components/modules/hooks/useModuleSpringAnimation.ts +0 -49
@@ -73,6 +73,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemAction Snapsh
73
73
  style={
74
74
  {
75
75
  "flexGrow": 1,
76
+ "flexShrink": 1,
76
77
  }
77
78
  }
78
79
  >
@@ -311,6 +312,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemInfoCopy Snap
311
312
  onResponderTerminate={[Function]}
312
313
  onResponderTerminationRequest={[Function]}
313
314
  onStartShouldSetResponder={[Function]}
315
+ onTouchEnd={[Function]}
314
316
  >
315
317
  <View
316
318
  accessibilityElementsHidden={true}
@@ -501,6 +503,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemNav Snapshot
501
503
  onResponderTerminate={[Function]}
502
504
  onResponderTerminationRequest={[Function]}
503
505
  onStartShouldSetResponder={[Function]}
506
+ onTouchEnd={[Function]}
504
507
  >
505
508
  <View
506
509
  style={
@@ -660,6 +663,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemNavAlert Snap
660
663
  onResponderTerminate={[Function]}
661
664
  onResponderTerminationRequest={[Function]}
662
665
  onStartShouldSetResponder={[Function]}
666
+ onTouchEnd={[Function]}
663
667
  >
664
668
  <View
665
669
  accessibilityElementsHidden={true}
@@ -942,7 +946,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
942
946
  >
943
947
  <Text
944
948
  allowFontScaling={true}
945
- dynamicTypeRamp="footnote"
949
+ dynamicTypeRamp="headline"
946
950
  maxFontSizeMultiplier={1.25}
947
951
  numberOfLines={1}
948
952
  style={
@@ -951,28 +955,23 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
951
955
  {
952
956
  "color": "#0E0F13",
953
957
  "fontFamily": "Titillio",
954
- "fontSize": 14,
958
+ "fontSize": 16,
955
959
  "fontStyle": "normal",
956
960
  "fontWeight": "600",
957
- "lineHeight": 21,
961
+ "lineHeight": 24,
958
962
  },
959
963
  ]
960
964
  }
961
965
  >
962
966
  label
963
967
  </Text>
964
- <View
965
- style={
966
- {
967
- "height": 4,
968
- }
969
- }
970
- />
971
968
  <View
972
969
  style={
973
970
  {
974
971
  "alignItems": "center",
972
+ "display": "flex",
975
973
  "flexDirection": "row",
974
+ "gap": 4,
976
975
  }
977
976
  }
978
977
  >
@@ -1033,13 +1032,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
1033
1032
  />
1034
1033
  </RNSVGGroup>
1035
1034
  </RNSVGSvgView>
1036
- <View
1037
- style={
1038
- {
1039
- "width": 4,
1040
- }
1041
- }
1042
- />
1043
1035
  <Text
1044
1036
  allowFontScaling={true}
1045
1037
  dynamicTypeRamp="footnote"
@@ -1068,7 +1060,9 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
1068
1060
  pointerEvents="none"
1069
1061
  style={
1070
1062
  {
1063
+ "display": "flex",
1071
1064
  "flexDirection": "row",
1065
+ "gap": 8,
1072
1066
  }
1073
1067
  }
1074
1068
  >
@@ -1092,13 +1086,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
1092
1086
  >
1093
1087
  € 1.000,00
1094
1088
  </Text>
1095
- <View
1096
- style={
1097
- {
1098
- "width": 8,
1099
- }
1100
- }
1101
- />
1102
1089
  <View
1103
1090
  accessibilityState={
1104
1091
  {
@@ -1326,7 +1313,7 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
1326
1313
  >
1327
1314
  <Text
1328
1315
  allowFontScaling={true}
1329
- dynamicTypeRamp="footnote"
1316
+ dynamicTypeRamp="headline"
1330
1317
  maxFontSizeMultiplier={1.25}
1331
1318
  numberOfLines={1}
1332
1319
  style={
@@ -1335,10 +1322,10 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
1335
1322
  {
1336
1323
  "color": "#0E0F13",
1337
1324
  "fontFamily": "Titillio",
1338
- "fontSize": 14,
1325
+ "fontSize": 16,
1339
1326
  "fontStyle": "normal",
1340
1327
  "fontWeight": "600",
1341
- "lineHeight": 21,
1328
+ "lineHeight": 24,
1342
1329
  },
1343
1330
  ]
1344
1331
  }
@@ -1352,7 +1339,9 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
1352
1339
  pointerEvents="none"
1353
1340
  style={
1354
1341
  {
1342
+ "display": "flex",
1355
1343
  "flexDirection": "row",
1344
+ "gap": 8,
1356
1345
  }
1357
1346
  }
1358
1347
  >
@@ -1376,13 +1365,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemRadioWithAmou
1376
1365
  >
1377
1366
  € 1.000,00
1378
1367
  </Text>
1379
- <View
1380
- style={
1381
- {
1382
- "width": 8,
1383
- }
1384
- }
1385
- />
1386
1368
  <View
1387
1369
  accessibilityState={
1388
1370
  {
@@ -1760,6 +1742,7 @@ exports[`Test List Item Components ListItemAction Snapshot 1`] = `
1760
1742
  style={
1761
1743
  {
1762
1744
  "flexGrow": 1,
1745
+ "flexShrink": 1,
1763
1746
  }
1764
1747
  }
1765
1748
  >
@@ -1949,7 +1932,7 @@ exports[`Test List Item Components ListItemInfo Snapshot 1`] = `
1949
1932
  {
1950
1933
  "color": "#0E0F13",
1951
1934
  "fontFamily": "Titillium Sans Pro",
1952
- "fontSize": 18,
1935
+ "fontSize": 17,
1953
1936
  "fontStyle": "normal",
1954
1937
  "fontWeight": "600",
1955
1938
  "lineHeight": 24,
@@ -1998,6 +1981,7 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
1998
1981
  onResponderTerminate={[Function]}
1999
1982
  onResponderTerminationRequest={[Function]}
2000
1983
  onStartShouldSetResponder={[Function]}
1984
+ onTouchEnd={[Function]}
2001
1985
  >
2002
1986
  <View
2003
1987
  accessibilityElementsHidden={true}
@@ -2069,9 +2053,9 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
2069
2053
  [
2070
2054
  {},
2071
2055
  {
2072
- "color": "#0073E6",
2056
+ "color": "#0B3EE3",
2073
2057
  "fontFamily": "Titillium Sans Pro",
2074
- "fontSize": 18,
2058
+ "fontSize": 17,
2075
2059
  "fontStyle": "normal",
2076
2060
  "fontWeight": "600",
2077
2061
  "lineHeight": 24,
@@ -2109,7 +2093,7 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
2109
2093
  "borderWidth": 0,
2110
2094
  },
2111
2095
  {
2112
- "color": "#0073E6",
2096
+ "color": "#0B3EE3",
2113
2097
  },
2114
2098
  {
2115
2099
  "flex": 0,
@@ -2118,7 +2102,7 @@ exports[`Test List Item Components ListItemInfoCopy Snapshot 1`] = `
2118
2102
  },
2119
2103
  ]
2120
2104
  }
2121
- tintColor="#0073E6"
2105
+ tintColor="#0B3EE3"
2122
2106
  vbHeight={24}
2123
2107
  vbWidth={24}
2124
2108
  width={24}
@@ -2188,6 +2172,7 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
2188
2172
  onResponderTerminate={[Function]}
2189
2173
  onResponderTerminationRequest={[Function]}
2190
2174
  onStartShouldSetResponder={[Function]}
2175
+ onTouchEnd={[Function]}
2191
2176
  >
2192
2177
  <View
2193
2178
  style={
@@ -2238,7 +2223,7 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
2238
2223
  {
2239
2224
  "color": "#0E0F13",
2240
2225
  "fontFamily": "Titillium Sans Pro",
2241
- "fontSize": 18,
2226
+ "fontSize": 17,
2242
2227
  "fontStyle": "normal",
2243
2228
  "fontWeight": "600",
2244
2229
  "lineHeight": 24,
@@ -2269,7 +2254,7 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
2269
2254
  "borderWidth": 0,
2270
2255
  },
2271
2256
  {
2272
- "color": "#0073E6",
2257
+ "color": "#0B3EE3",
2273
2258
  },
2274
2259
  {
2275
2260
  "flex": 0,
@@ -2278,7 +2263,7 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `
2278
2263
  },
2279
2264
  ]
2280
2265
  }
2281
- tintColor="#0073E6"
2266
+ tintColor="#0B3EE3"
2282
2267
  vbHeight={24}
2283
2268
  vbWidth={24}
2284
2269
  width={24}
@@ -2347,6 +2332,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
2347
2332
  onResponderTerminate={[Function]}
2348
2333
  onResponderTerminationRequest={[Function]}
2349
2334
  onStartShouldSetResponder={[Function]}
2335
+ onTouchEnd={[Function]}
2350
2336
  >
2351
2337
  <View
2352
2338
  accessibilityElementsHidden={true}
@@ -2467,7 +2453,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
2467
2453
  {
2468
2454
  "color": "#0E0F13",
2469
2455
  "fontFamily": "Titillium Sans Pro",
2470
- "fontSize": 18,
2456
+ "fontSize": 17,
2471
2457
  "fontStyle": "normal",
2472
2458
  "fontWeight": "600",
2473
2459
  "lineHeight": 24,
@@ -2505,7 +2491,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
2505
2491
  "borderWidth": 0,
2506
2492
  },
2507
2493
  {
2508
- "color": "#0073E6",
2494
+ "color": "#0B3EE3",
2509
2495
  },
2510
2496
  {
2511
2497
  "flex": 0,
@@ -2514,7 +2500,7 @@ exports[`Test List Item Components ListItemNavAlert Snapshot 1`] = `
2514
2500
  },
2515
2501
  ]
2516
2502
  }
2517
- tintColor="#0073E6"
2503
+ tintColor="#0B3EE3"
2518
2504
  vbHeight={24}
2519
2505
  vbWidth={24}
2520
2506
  width={24}
@@ -2629,7 +2615,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
2629
2615
  >
2630
2616
  <Text
2631
2617
  allowFontScaling={false}
2632
- dynamicTypeRamp="footnote"
2618
+ dynamicTypeRamp="headline"
2633
2619
  maxFontSizeMultiplier={1.25}
2634
2620
  numberOfLines={1}
2635
2621
  style={
@@ -2638,28 +2624,23 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
2638
2624
  {
2639
2625
  "color": "#0E0F13",
2640
2626
  "fontFamily": "Titillium Sans Pro",
2641
- "fontSize": 14,
2627
+ "fontSize": 17,
2642
2628
  "fontStyle": "normal",
2643
2629
  "fontWeight": "600",
2644
- "lineHeight": 21,
2630
+ "lineHeight": 24,
2645
2631
  },
2646
2632
  ]
2647
2633
  }
2648
2634
  >
2649
2635
  label
2650
2636
  </Text>
2651
- <View
2652
- style={
2653
- {
2654
- "height": 4,
2655
- }
2656
- }
2657
- />
2658
2637
  <View
2659
2638
  style={
2660
2639
  {
2661
2640
  "alignItems": "center",
2641
+ "display": "flex",
2662
2642
  "flexDirection": "row",
2643
+ "gap": 4,
2663
2644
  }
2664
2645
  }
2665
2646
  >
@@ -2720,13 +2701,6 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
2720
2701
  />
2721
2702
  </RNSVGGroup>
2722
2703
  </RNSVGSvgView>
2723
- <View
2724
- style={
2725
- {
2726
- "width": 4,
2727
- }
2728
- }
2729
- />
2730
2704
  <Text
2731
2705
  allowFontScaling={false}
2732
2706
  dynamicTypeRamp="footnote"
@@ -2755,7 +2729,9 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
2755
2729
  pointerEvents="none"
2756
2730
  style={
2757
2731
  {
2732
+ "display": "flex",
2758
2733
  "flexDirection": "row",
2734
+ "gap": 8,
2759
2735
  }
2760
2736
  }
2761
2737
  >
@@ -2769,7 +2745,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
2769
2745
  {
2770
2746
  "color": "#0B3EE3",
2771
2747
  "fontFamily": "Titillium Sans Pro",
2772
- "fontSize": 18,
2748
+ "fontSize": 17,
2773
2749
  "fontStyle": "normal",
2774
2750
  "fontWeight": "600",
2775
2751
  "lineHeight": 24,
@@ -2779,13 +2755,6 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
2779
2755
  >
2780
2756
  € 1.000,00
2781
2757
  </Text>
2782
- <View
2783
- style={
2784
- {
2785
- "width": 8,
2786
- }
2787
- }
2788
- />
2789
2758
  <View
2790
2759
  accessibilityState={
2791
2760
  {
@@ -3013,7 +2982,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
3013
2982
  >
3014
2983
  <Text
3015
2984
  allowFontScaling={false}
3016
- dynamicTypeRamp="footnote"
2985
+ dynamicTypeRamp="headline"
3017
2986
  maxFontSizeMultiplier={1.25}
3018
2987
  numberOfLines={1}
3019
2988
  style={
@@ -3022,10 +2991,10 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
3022
2991
  {
3023
2992
  "color": "#0E0F13",
3024
2993
  "fontFamily": "Titillium Sans Pro",
3025
- "fontSize": 14,
2994
+ "fontSize": 17,
3026
2995
  "fontStyle": "normal",
3027
2996
  "fontWeight": "600",
3028
- "lineHeight": 21,
2997
+ "lineHeight": 24,
3029
2998
  },
3030
2999
  ]
3031
3000
  }
@@ -3039,7 +3008,9 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
3039
3008
  pointerEvents="none"
3040
3009
  style={
3041
3010
  {
3011
+ "display": "flex",
3042
3012
  "flexDirection": "row",
3013
+ "gap": 8,
3043
3014
  }
3044
3015
  }
3045
3016
  >
@@ -3053,7 +3024,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
3053
3024
  {
3054
3025
  "color": "#0B3EE3",
3055
3026
  "fontFamily": "Titillium Sans Pro",
3056
- "fontSize": 18,
3027
+ "fontSize": 17,
3057
3028
  "fontStyle": "normal",
3058
3029
  "fontWeight": "600",
3059
3030
  "lineHeight": 24,
@@ -3063,13 +3034,6 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
3063
3034
  >
3064
3035
  € 1.000,00
3065
3036
  </Text>
3066
- <View
3067
- style={
3068
- {
3069
- "width": 8,
3070
- }
3071
- }
3072
- />
3073
3037
  <View
3074
3038
  accessibilityState={
3075
3039
  {
@@ -10,7 +10,7 @@ import ListItemNav from "../ListItemNav";
10
10
  import ListItemNavAlert from "../ListItemNavAlert";
11
11
  import { ListItemRadioWithAmount } from "../ListItemRadioWithAmount";
12
12
  import { ListItemTransaction } from "../ListItemTransaction";
13
- import { PressableListItemBase } from "../PressableListItemsBase";
13
+ import { PressableListItemBase } from "../PressableListItemBase";
14
14
 
15
15
  const onButtonPress = () => {
16
16
  Alert.alert("Alert", "Action triggered");
@@ -5,9 +5,9 @@ export * from "./ListItemInfoCopy";
5
5
  export * from "./ListItemNav";
6
6
  export * from "./ListItemNavAlert";
7
7
  export * from "./ListItemTransaction";
8
- export * from "./PressableListItemsBase";
9
8
  export * from "./ListItemSwitch";
10
9
  export * from "./ListItemCheckbox";
11
10
  export * from "./ListItemRadio";
12
11
  export * from "./ListItemRadioWithAmount";
13
12
  export * from "./ListItemAmount";
13
+ export * from "./PressableListItemBase";
@@ -3,15 +3,13 @@ import {
3
3
  Image,
4
4
  ImageSourcePropType,
5
5
  ImageURISource,
6
- StyleSheet,
7
- View
6
+ StyleSheet
8
7
  } from "react-native";
9
8
  import Placeholder from "rn-placeholder";
10
9
  import {
11
10
  IOListItemVisualParams,
12
11
  IOSelectionListItemVisualParams,
13
12
  IOSpacer,
14
- IOStyles,
15
13
  IOVisualCostants,
16
14
  useIOTheme
17
15
  } from "../../core";
@@ -43,26 +41,28 @@ type BaseModuleProps = {
43
41
  };
44
42
 
45
43
  type ModuleCredentialProps =
46
- | LoadingModuleProps
47
- | (BaseModuleProps & ImageProps & PressableModuleBaseProps);
44
+ | BaseModuleProps & ImageProps & PressableModuleBaseProps;
48
45
 
49
- const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
50
- const theme = useIOTheme();
51
-
52
- if (props.isLoading) {
53
- return <ModuleCredentialSkeleton />;
54
- }
46
+ const ModuleCredential = (
47
+ props: WithTestID<LoadingModuleProps | ModuleCredentialProps>
48
+ ) =>
49
+ props.isLoading ? (
50
+ <ModuleCredentialSkeleton />
51
+ ) : (
52
+ <ModuleCredentialContent {...props} />
53
+ );
55
54
 
56
- const {
57
- testID,
58
- icon,
59
- image,
60
- label,
61
- onPress,
62
- badge,
63
- isFetching,
64
- ...pressableProps
65
- } = props;
55
+ const ModuleCredentialContent = ({
56
+ testID,
57
+ icon,
58
+ image,
59
+ label,
60
+ onPress,
61
+ badge,
62
+ isFetching,
63
+ ...pressableProps
64
+ }: WithTestID<ModuleCredentialProps>) => {
65
+ const theme = useIOTheme();
66
66
 
67
67
  const iconComponent = icon && (
68
68
  <Icon
@@ -80,6 +80,33 @@ const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
80
80
  />
81
81
  );
82
82
 
83
+ const endComponent = React.useMemo(() => {
84
+ if (isFetching) {
85
+ return (
86
+ <LoadingSpinner
87
+ testID={testID ? `${testID}_activityIndicator` : undefined}
88
+ color={theme["interactiveElem-default"]}
89
+ />
90
+ );
91
+ }
92
+ if (badge) {
93
+ return (
94
+ <Badge {...badge} testID={testID ? `${testID}_badge` : undefined} />
95
+ );
96
+ }
97
+ if (onPress) {
98
+ return (
99
+ <Icon
100
+ testID={testID ? `${testID}_icon` : undefined}
101
+ name="chevronRightListItem"
102
+ color={theme["interactiveElem-default"]}
103
+ size={IOListItemVisualParams.chevronSize}
104
+ />
105
+ );
106
+ }
107
+ return null;
108
+ }, [testID, theme, isFetching, badge, onPress]);
109
+
83
110
  const ModuleContent = () => (
84
111
  <HStack space={8} style={{ alignItems: "center" }}>
85
112
  <HStack
@@ -99,24 +126,7 @@ const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
99
126
  {label}
100
127
  </BodySmall>
101
128
  </HStack>
102
- <View style={IOStyles.row}>
103
- {badge ? (
104
- <Badge {...badge} testID={testID ? `${testID}_badge` : undefined} />
105
- ) : null}
106
- {isFetching ? (
107
- <LoadingSpinner
108
- testID={testID ? `${testID}_activityIndicator` : undefined}
109
- color={theme["interactiveElem-default"]}
110
- />
111
- ) : onPress ? (
112
- <Icon
113
- testID={testID ? `${testID}_icon` : undefined}
114
- name="chevronRightListItem"
115
- color={theme["interactiveElem-default"]}
116
- size={IOListItemVisualParams.chevronSize}
117
- />
118
- ) : null}
119
- </View>
129
+ {endComponent}
120
130
  </HStack>
121
131
  );
122
132
 
@@ -1,7 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { PropsWithChildren } from "react";
3
3
  import { Pressable } from "react-native";
4
- import Animated from "react-native-reanimated";
4
+ import Animated, { useReducedMotion } from "react-native-reanimated";
5
+ import { useScaleAnimation } from "../../hooks";
5
6
  import {
6
7
  IOColors,
7
8
  IOModuleIDPSavedVSpacing,
@@ -9,7 +10,6 @@ import {
9
10
  useIOTheme
10
11
  } from "../../core";
11
12
  import { WithTestID } from "../../utils/types";
12
- import { useModuleSpringAnimation } from "./hooks/useModuleSpringAnimation";
13
13
 
14
14
  export type PressableModuleBaseProps = WithTestID<
15
15
  {
@@ -29,17 +29,24 @@ export const PressableModuleBase = ({
29
29
  children
30
30
  }: PropsWithChildren<PressableModuleBaseProps>) => {
31
31
  const theme = useIOTheme();
32
- const { handlePressIn, handlePressOut, animatedStyle } =
33
- useModuleSpringAnimation();
32
+ const reducedMotion = useReducedMotion();
33
+ const { onPressIn, onPressOut, scaleAnimatedStyle } = useScaleAnimation(
34
+ reducedMotion ? "slight" : "medium"
35
+ );
36
+ /* We use a slight scaleEffect if `reducedMotion` is enabled.
37
+ We don't disable it completely because that's the only
38
+ difference between the two states "default" and "pressed".
39
+ If we remove it, they they won't be able to understand
40
+ if there's an ongoing interaction. */
34
41
 
35
42
  return (
36
43
  <Pressable
37
44
  onPress={onPress}
38
45
  testID={testID}
39
46
  accessible={true}
40
- onPressIn={handlePressIn}
41
- onPressOut={handlePressOut}
42
- onTouchEnd={handlePressOut}
47
+ onPressIn={onPressIn}
48
+ onPressOut={onPressOut}
49
+ onTouchEnd={onPressOut}
43
50
  accessibilityLabel={accessibilityLabel}
44
51
  accessibilityHint={accessibilityHint}
45
52
  accessibilityRole="button"
@@ -49,7 +56,7 @@ export const PressableModuleBase = ({
49
56
  IOModuleStyles.button,
50
57
  { borderColor: IOColors[theme["cardBorder-default"]] },
51
58
  withLooseSpacing && { paddingVertical: IOModuleIDPSavedVSpacing },
52
- animatedStyle
59
+ scaleAnimatedStyle
53
60
  ]}
54
61
  >
55
62
  {children}
@@ -4,5 +4,5 @@ export * from "./ModuleCredential";
4
4
  export * from "./ModuleIDP";
5
5
  export * from "./ModuleNavigation";
6
6
  export * from "./ModulePaymentNotice";
7
- export * from "./PressableModuleBase";
8
7
  export * from "./ModuleSummary";
8
+ export * from "./PressableModuleBase";