@pagopa/io-app-design-system 5.3.9 → 5.4.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 (253) hide show
  1. package/README.md +3 -2
  2. package/lib/commonjs/components/accordion/AccordionItem.js +4 -2
  3. package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
  4. package/lib/commonjs/components/alert/Alert.js +5 -11
  5. package/lib/commonjs/components/alert/Alert.js.map +1 -1
  6. package/lib/commonjs/components/alert/AlertEdgeToEdge.js +3 -2
  7. package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
  8. package/lib/commonjs/components/alert/AlertEdgeToEdgeWrapper.js +3 -2
  9. package/lib/commonjs/components/alert/AlertEdgeToEdgeWrapper.js.map +1 -1
  10. package/lib/commonjs/components/buttons/ButtonLink.js +5 -2
  11. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  12. package/lib/commonjs/components/buttons/ButtonOutline.js +20 -15
  13. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  14. package/lib/commonjs/components/buttons/ButtonSolid.js +4 -1
  15. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  16. package/lib/commonjs/components/buttons/IOButton/IOButton.js +230 -0
  17. package/lib/commonjs/components/buttons/IOButton/IOButton.js.map +1 -0
  18. package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js +43 -0
  19. package/lib/commonjs/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
  20. package/lib/commonjs/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
  21. package/lib/commonjs/components/buttons/IOButton/index.js +17 -0
  22. package/lib/commonjs/components/buttons/IOButton/index.js.map +1 -0
  23. package/lib/commonjs/components/buttons/IOButton/styles.js +166 -0
  24. package/lib/commonjs/components/buttons/IOButton/styles.js.map +1 -0
  25. package/lib/commonjs/components/buttons/IconButton.js +2 -3
  26. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  27. package/lib/commonjs/components/buttons/IconButtonContained.js +1 -2
  28. package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
  29. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -402
  30. package/lib/commonjs/components/buttons/__test__/button.test.js +0 -24
  31. package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
  32. package/lib/commonjs/components/buttons/index.js +11 -0
  33. package/lib/commonjs/components/buttons/index.js.map +1 -1
  34. package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +13 -30
  35. package/lib/commonjs/components/icons/Icon.js +11 -9
  36. package/lib/commonjs/components/icons/Icon.js.map +1 -1
  37. package/lib/commonjs/components/layout/FooterActions.js +10 -9
  38. package/lib/commonjs/components/layout/FooterActions.js.map +1 -1
  39. package/lib/commonjs/components/layout/FooterActionsInline.js +8 -8
  40. package/lib/commonjs/components/layout/FooterActionsInline.js.map +1 -1
  41. package/lib/commonjs/components/layout/GradientBottomActions.js +8 -8
  42. package/lib/commonjs/components/layout/GradientBottomActions.js.map +1 -1
  43. package/lib/commonjs/components/layout/GradientScrollView.js.map +1 -1
  44. package/lib/commonjs/components/layout/ModalBSHeader.js +3 -1
  45. package/lib/commonjs/components/layout/ModalBSHeader.js.map +1 -1
  46. package/lib/commonjs/components/listitems/ListItemAmount.js +3 -1
  47. package/lib/commonjs/components/listitems/ListItemAmount.js.map +1 -1
  48. package/lib/commonjs/components/listitems/ListItemCheckbox.js +3 -2
  49. package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
  50. package/lib/commonjs/components/listitems/ListItemHeader.js +4 -2
  51. package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
  52. package/lib/commonjs/components/listitems/ListItemInfo.js +3 -1
  53. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  54. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +3 -1
  55. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  56. package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
  57. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  58. package/lib/commonjs/components/listitems/ListItemNavAlert.js +3 -1
  59. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  60. package/lib/commonjs/components/listitems/ListItemRadio.js +10 -2
  61. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
  62. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
  63. package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js +6 -6
  64. package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js.map +1 -1
  65. package/lib/commonjs/components/numberpad/NumberButton.js +15 -2
  66. package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
  67. package/lib/commonjs/components/numberpad/NumberPad.js +9 -6
  68. package/lib/commonjs/components/numberpad/NumberPad.js.map +1 -1
  69. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +42 -96
  70. package/lib/commonjs/components/otpInput/OTPInput.js +3 -3
  71. package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
  72. package/lib/commonjs/components/radio/RadioButtonLabel.js +3 -3
  73. package/lib/commonjs/components/radio/RadioButtonLabel.js.map +1 -1
  74. package/lib/commonjs/components/stepper/Stepper.js +5 -2
  75. package/lib/commonjs/components/stepper/Stepper.js.map +1 -1
  76. package/lib/commonjs/components/typography/IOText.js +4 -1
  77. package/lib/commonjs/components/typography/IOText.js.map +1 -1
  78. package/lib/commonjs/core/IOStyles.js +3 -53
  79. package/lib/commonjs/core/IOStyles.js.map +1 -1
  80. package/lib/module/components/accordion/AccordionItem.js +5 -3
  81. package/lib/module/components/accordion/AccordionItem.js.map +1 -1
  82. package/lib/module/components/alert/Alert.js +6 -12
  83. package/lib/module/components/alert/Alert.js.map +1 -1
  84. package/lib/module/components/alert/AlertEdgeToEdge.js +3 -2
  85. package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
  86. package/lib/module/components/alert/AlertEdgeToEdgeWrapper.js +3 -2
  87. package/lib/module/components/alert/AlertEdgeToEdgeWrapper.js.map +1 -1
  88. package/lib/module/components/buttons/ButtonLink.js +6 -3
  89. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  90. package/lib/module/components/buttons/ButtonOutline.js +21 -16
  91. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  92. package/lib/module/components/buttons/ButtonSolid.js +4 -1
  93. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  94. package/lib/module/components/buttons/IOButton/IOButton.js +223 -0
  95. package/lib/module/components/buttons/IOButton/IOButton.js.map +1 -0
  96. package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js +40 -0
  97. package/lib/module/components/buttons/IOButton/__test__/IOButton.test.js.map +1 -0
  98. package/lib/module/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
  99. package/lib/module/components/buttons/IOButton/index.js +4 -0
  100. package/lib/module/components/buttons/IOButton/index.js.map +1 -0
  101. package/lib/module/components/buttons/IOButton/styles.js +160 -0
  102. package/lib/module/components/buttons/IOButton/styles.js.map +1 -0
  103. package/lib/module/components/buttons/IconButton.js +4 -5
  104. package/lib/module/components/buttons/IconButton.js.map +1 -1
  105. package/lib/module/components/buttons/IconButtonContained.js +2 -3
  106. package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
  107. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -402
  108. package/lib/module/components/buttons/__test__/button.test.js +0 -24
  109. package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
  110. package/lib/module/components/buttons/index.js +1 -0
  111. package/lib/module/components/buttons/index.js.map +1 -1
  112. package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +13 -30
  113. package/lib/module/components/icons/Icon.js +10 -7
  114. package/lib/module/components/icons/Icon.js.map +1 -1
  115. package/lib/module/components/layout/FooterActions.js +11 -10
  116. package/lib/module/components/layout/FooterActions.js.map +1 -1
  117. package/lib/module/components/layout/FooterActionsInline.js +9 -9
  118. package/lib/module/components/layout/FooterActionsInline.js.map +1 -1
  119. package/lib/module/components/layout/GradientBottomActions.js +9 -9
  120. package/lib/module/components/layout/GradientBottomActions.js.map +1 -1
  121. package/lib/module/components/layout/GradientScrollView.js.map +1 -1
  122. package/lib/module/components/layout/ModalBSHeader.js +4 -2
  123. package/lib/module/components/layout/ModalBSHeader.js.map +1 -1
  124. package/lib/module/components/listitems/ListItemAmount.js +4 -2
  125. package/lib/module/components/listitems/ListItemAmount.js.map +1 -1
  126. package/lib/module/components/listitems/ListItemCheckbox.js +4 -3
  127. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
  128. package/lib/module/components/listitems/ListItemHeader.js +5 -3
  129. package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
  130. package/lib/module/components/listitems/ListItemInfo.js +4 -2
  131. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  132. package/lib/module/components/listitems/ListItemInfoCopy.js +4 -2
  133. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  134. package/lib/module/components/listitems/ListItemNav.js +2 -2
  135. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  136. package/lib/module/components/listitems/ListItemNavAlert.js +4 -2
  137. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  138. package/lib/module/components/listitems/ListItemRadio.js +11 -3
  139. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  140. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
  141. package/lib/module/components/loadingSpinner/LoadingSpinner.js +6 -6
  142. package/lib/module/components/loadingSpinner/LoadingSpinner.js.map +1 -1
  143. package/lib/module/components/numberpad/NumberButton.js +16 -3
  144. package/lib/module/components/numberpad/NumberButton.js.map +1 -1
  145. package/lib/module/components/numberpad/NumberPad.js +10 -7
  146. package/lib/module/components/numberpad/NumberPad.js.map +1 -1
  147. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +42 -96
  148. package/lib/module/components/otpInput/OTPInput.js +3 -3
  149. package/lib/module/components/otpInput/OTPInput.js.map +1 -1
  150. package/lib/module/components/radio/RadioButtonLabel.js +3 -3
  151. package/lib/module/components/radio/RadioButtonLabel.js.map +1 -1
  152. package/lib/module/components/stepper/Stepper.js +6 -3
  153. package/lib/module/components/stepper/Stepper.js.map +1 -1
  154. package/lib/module/components/typography/IOText.js +2 -0
  155. package/lib/module/components/typography/IOText.js.map +1 -1
  156. package/lib/module/core/IOStyles.js +3 -53
  157. package/lib/module/core/IOStyles.js.map +1 -1
  158. package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -1
  159. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  160. package/lib/typescript/components/alert/AlertEdgeToEdge.d.ts.map +1 -1
  161. package/lib/typescript/components/alert/AlertEdgeToEdgeWrapper.d.ts.map +1 -1
  162. package/lib/typescript/components/buttons/ButtonLink.d.ts +3 -0
  163. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  164. package/lib/typescript/components/buttons/ButtonOutline.d.ts +3 -0
  165. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  166. package/lib/typescript/components/buttons/ButtonSolid.d.ts +3 -0
  167. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  168. package/lib/typescript/components/buttons/IOButton/IOButton.d.ts +57 -0
  169. package/lib/typescript/components/buttons/IOButton/IOButton.d.ts.map +1 -0
  170. package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts +2 -0
  171. package/lib/typescript/components/buttons/IOButton/__test__/IOButton.test.d.ts.map +1 -0
  172. package/lib/typescript/components/buttons/IOButton/index.d.ts +2 -0
  173. package/lib/typescript/components/buttons/IOButton/index.d.ts.map +1 -0
  174. package/lib/typescript/components/buttons/IOButton/styles.d.ts +35 -0
  175. package/lib/typescript/components/buttons/IOButton/styles.d.ts.map +1 -0
  176. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  177. package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
  178. package/lib/typescript/components/buttons/index.d.ts +1 -0
  179. package/lib/typescript/components/buttons/index.d.ts.map +1 -1
  180. package/lib/typescript/components/icons/Icon.d.ts +1 -4
  181. package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
  182. package/lib/typescript/components/icons/types.d.ts +3 -2
  183. package/lib/typescript/components/icons/types.d.ts.map +1 -1
  184. package/lib/typescript/components/layout/FooterActions.d.ts +10 -8
  185. package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
  186. package/lib/typescript/components/layout/FooterActionsInline.d.ts +5 -4
  187. package/lib/typescript/components/layout/FooterActionsInline.d.ts.map +1 -1
  188. package/lib/typescript/components/layout/GradientBottomActions.d.ts +12 -6
  189. package/lib/typescript/components/layout/GradientBottomActions.d.ts.map +1 -1
  190. package/lib/typescript/components/layout/GradientScrollView.d.ts.map +1 -1
  191. package/lib/typescript/components/listitems/ListItemAmount.d.ts.map +1 -1
  192. package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -1
  193. package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -1
  194. package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
  195. package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
  196. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
  197. package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
  198. package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts +2 -2
  199. package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts.map +1 -1
  200. package/lib/typescript/components/numberpad/NumberButton.d.ts +11 -0
  201. package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
  202. package/lib/typescript/components/numberpad/NumberPad.d.ts.map +1 -1
  203. package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
  204. package/lib/typescript/components/radio/RadioButtonLabel.d.ts.map +1 -1
  205. package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -1
  206. package/lib/typescript/components/typography/IOText.d.ts +1 -0
  207. package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
  208. package/lib/typescript/core/IOStyles.d.ts +0 -47
  209. package/lib/typescript/core/IOStyles.d.ts.map +1 -1
  210. package/package.json +1 -1
  211. package/src/components/accordion/AccordionItem.tsx +7 -14
  212. package/src/components/alert/Alert.tsx +7 -21
  213. package/src/components/alert/AlertEdgeToEdge.tsx +1 -2
  214. package/src/components/alert/AlertEdgeToEdgeWrapper.tsx +1 -2
  215. package/src/components/buttons/ButtonLink.tsx +6 -6
  216. package/src/components/buttons/ButtonOutline.tsx +21 -21
  217. package/src/components/buttons/ButtonSolid.tsx +4 -1
  218. package/src/components/buttons/IOButton/IOButton.tsx +363 -0
  219. package/src/components/buttons/IOButton/__test__/IOButton.test.tsx +46 -0
  220. package/src/components/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +391 -0
  221. package/src/components/buttons/IOButton/index.tsx +1 -0
  222. package/src/components/buttons/IOButton/styles.tsx +228 -0
  223. package/src/components/buttons/IconButton.tsx +4 -9
  224. package/src/components/buttons/IconButtonContained.tsx +3 -6
  225. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -402
  226. package/src/components/buttons/__test__/button.test.tsx +1 -33
  227. package/src/components/buttons/index.tsx +1 -0
  228. package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +13 -30
  229. package/src/components/icons/Icon.tsx +12 -3
  230. package/src/components/icons/types.ts +3 -2
  231. package/src/components/layout/FooterActions.tsx +26 -14
  232. package/src/components/layout/FooterActionsInline.tsx +19 -12
  233. package/src/components/layout/GradientBottomActions.tsx +17 -18
  234. package/src/components/layout/GradientScrollView.tsx +2 -1
  235. package/src/components/layout/ModalBSHeader.tsx +2 -2
  236. package/src/components/listitems/ListItemAmount.tsx +1 -2
  237. package/src/components/listitems/ListItemCheckbox.tsx +8 -11
  238. package/src/components/listitems/ListItemHeader.tsx +2 -3
  239. package/src/components/listitems/ListItemInfo.tsx +1 -2
  240. package/src/components/listitems/ListItemInfoCopy.tsx +1 -2
  241. package/src/components/listitems/ListItemNav.tsx +1 -1
  242. package/src/components/listitems/ListItemNavAlert.tsx +1 -2
  243. package/src/components/listitems/ListItemRadio.tsx +7 -7
  244. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -40
  245. package/src/components/loadingSpinner/LoadingSpinner.tsx +8 -8
  246. package/src/components/numberpad/NumberButton.tsx +18 -11
  247. package/src/components/numberpad/NumberPad.tsx +8 -10
  248. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +42 -96
  249. package/src/components/otpInput/OTPInput.tsx +1 -2
  250. package/src/components/radio/RadioButtonLabel.tsx +7 -10
  251. package/src/components/stepper/Stepper.tsx +7 -12
  252. package/src/components/typography/IOText.tsx +3 -0
  253. package/src/core/IOStyles.ts +3 -55
@@ -1,8 +1,9 @@
1
- import { StyleProp } from "react-native";
1
+ import { ColorValue, StyleProp } from "react-native";
2
2
 
3
3
  export type SVGIconProps = {
4
4
  size: number | "100%";
5
- style: StyleProp<any>;
5
+ style?: StyleProp<any>;
6
+ color: ColorValue;
6
7
  accessible: boolean;
7
8
  accessibilityElementsHidden: boolean;
8
9
  accessibilityLabel: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ComponentProps, Fragment, PropsWithChildren, useState } from "react";
2
+ import { Fragment, PropsWithChildren, useState } from "react";
3
3
  import {
4
4
  ColorValue,
5
5
  LayoutChangeEvent,
@@ -20,29 +20,39 @@ import {
20
20
  useIOTheme
21
21
  } from "../../core";
22
22
  import { WithTestID } from "../../utils/types";
23
- import { ButtonLink, ButtonOutline, ButtonSolid } from "../buttons";
23
+ import {
24
+ IOButton,
25
+ IOButtonBlockSpecificProps,
26
+ IOButtonLinkSpecificProps
27
+ } from "../buttons";
24
28
  import { VSpacer } from "../spacer";
25
29
  import { useBottomMargins } from "./hooks/useBottomMargins";
26
30
 
31
+ type IOButtonBlockProps = Omit<
32
+ IOButtonBlockSpecificProps,
33
+ "variant" | "fullWidth"
34
+ >;
35
+ type IOButtonLinkProps = Omit<IOButtonLinkSpecificProps, "variant">;
36
+
27
37
  type FooterSingleButton = {
28
38
  type: "SingleButton";
29
- primary: Omit<ComponentProps<typeof ButtonSolid>, "fullWidth">;
39
+ primary: IOButtonBlockProps;
30
40
  secondary?: never;
31
41
  tertiary?: never;
32
42
  };
33
43
 
34
44
  type FooterTwoButtons = {
35
45
  type: "TwoButtons";
36
- primary: Omit<ComponentProps<typeof ButtonSolid>, "fullWidth">;
37
- secondary: Omit<ComponentProps<typeof ButtonLink>, "color">;
46
+ primary: IOButtonBlockProps;
47
+ secondary: IOButtonLinkProps;
38
48
  tertiary?: never;
39
49
  };
40
50
 
41
51
  type FooterThreeButtons = {
42
52
  type: "ThreeButtons";
43
- primary: Omit<ComponentProps<typeof ButtonSolid>, "fullWidth">;
44
- secondary: Omit<ComponentProps<typeof ButtonOutline>, "fullWidth" | "color">;
45
- tertiary: Omit<ComponentProps<typeof ButtonLink>, "color">;
53
+ primary: IOButtonBlockProps;
54
+ secondary: IOButtonBlockProps;
55
+ tertiary: IOButtonLinkProps;
46
56
  };
47
57
 
48
58
  export type FooterActionsMeasurements = {
@@ -86,9 +96,9 @@ type FooterActionsProps = WithTestID<
86
96
  }>
87
97
  >;
88
98
 
89
- /* Margin between ButtonSolid and ButtonOutline */
99
+ /* Margin between `solid` and `variant` variant */
90
100
  const spaceBetweenActions: IOSpacer = 16;
91
- /* Margin between ButtonSolid and ButtonLink */
101
+ /* Margin between `solid` and `link` variant */
92
102
  const spaceBetweenActionAndLink: IOSpacer = 16;
93
103
 
94
104
  const styles = StyleSheet.create({
@@ -227,11 +237,13 @@ const renderActions = (
227
237
  } = actions;
228
238
  return (
229
239
  <Fragment>
230
- {primaryAction && <ButtonSolid fullWidth {...primaryAction} />}
240
+ {primaryAction && (
241
+ <IOButton variant="solid" fullWidth {...primaryAction} />
242
+ )}
231
243
  {type === "TwoButtons" && secondaryAction && (
232
244
  <View style={{ alignSelf: "center", marginBottom: extraBottomMargin }}>
233
245
  <VSpacer size={spaceBetweenActionAndLink} />
234
- <ButtonLink color="primary" {...secondaryAction} />
246
+ <IOButton variant="link" {...secondaryAction} />
235
247
  </View>
236
248
  )}
237
249
  {type === "ThreeButtons" && (
@@ -239,7 +251,7 @@ const renderActions = (
239
251
  {secondaryAction && (
240
252
  <>
241
253
  <VSpacer size={spaceBetweenActions} />
242
- <ButtonOutline fullWidth color="primary" {...secondaryAction} />
254
+ <IOButton variant="outline" fullWidth {...secondaryAction} />
243
255
  </>
244
256
  )}
245
257
  {tertiaryAction && (
@@ -247,7 +259,7 @@ const renderActions = (
247
259
  style={{ alignSelf: "center", marginBottom: extraBottomMargin }}
248
260
  >
249
261
  <VSpacer size={spaceBetweenActionAndLink} />
250
- <ButtonLink color="primary" {...tertiaryAction} />
262
+ <IOButton variant="link" {...tertiaryAction} />
251
263
  </View>
252
264
  )}
253
265
  </>
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ComponentProps, PropsWithChildren } from "react";
2
+ import { PropsWithChildren } from "react";
3
3
  import { ColorValue, LayoutChangeEvent, StyleSheet, View } from "react-native";
4
4
  import {
5
5
  IOColors,
@@ -11,10 +11,14 @@ import {
11
11
  useIOThemeContext
12
12
  } from "../../core";
13
13
  import { WithTestID } from "../../utils/types";
14
- import { ButtonOutline, ButtonSolid } from "../buttons";
15
- import { HSpacer } from "../spacer";
14
+ import { IOButton, IOButtonBlockSpecificProps } from "../buttons";
16
15
  import { useBottomMargins } from "./hooks/useBottomMargins";
17
16
 
17
+ type IOButtonBlockProps = Omit<
18
+ IOButtonBlockSpecificProps,
19
+ "variant" | "fullWidth"
20
+ >;
21
+
18
22
  export type FooterActionsInlineMeasurements = {
19
23
  /* Height of the safe bottom area. It includes:
20
24
  - Margin between screen content
@@ -29,8 +33,8 @@ export type FooterActionsInlineMeasurements = {
29
33
 
30
34
  type FooterActionsInline = WithTestID<
31
35
  PropsWithChildren<{
32
- startAction: Omit<ComponentProps<typeof ButtonOutline>, "fullWidth">;
33
- endAction: Omit<ComponentProps<typeof ButtonSolid>, "fullWidth">;
36
+ startAction: IOButtonBlockProps;
37
+ endAction: IOButtonBlockProps;
34
38
  onMeasure?: (measurements: FooterActionsInlineMeasurements) => void;
35
39
  /* Don't include safe area insets */
36
40
  excludeSafeAreaMargins?: boolean;
@@ -39,9 +43,6 @@ type FooterActionsInline = WithTestID<
39
43
  }>
40
44
  >;
41
45
 
42
- /* Margin between ButtonSolid and ButtonOutline */
43
- const spaceBetweenActions: IOSpacer = 16;
44
-
45
46
  const styles = StyleSheet.create({
46
47
  buttonContainer: {
47
48
  paddingHorizontal: IOVisualCostants.appMarginDefault,
@@ -76,6 +77,8 @@ export const FooterActionsInline = ({
76
77
 
77
78
  const { bottomMargin } = useBottomMargins(false, excludeSafeAreaMargins);
78
79
 
80
+ /* Margin between `solid` and `outline` variant */
81
+ const spaceBetweenActions: IOSpacer = 16;
79
82
  /* Top padding applied above the actions */
80
83
  const topSpacingValue: IOSpacingScale = 16;
81
84
  const topSpacing = fixed ? topSpacingValue : 0;
@@ -122,13 +125,17 @@ export const FooterActionsInline = ({
122
125
  onLayout={getActionBlockMeasurements}
123
126
  pointerEvents="box-none"
124
127
  >
125
- <View style={{ flexDirection: "row" }}>
128
+ <View
129
+ style={{
130
+ flexDirection: "row",
131
+ gap: spaceBetweenActions
132
+ }}
133
+ >
126
134
  <View style={styles.buttonWrapper}>
127
- <ButtonOutline fullWidth {...startAction} />
135
+ <IOButton variant="outline" fullWidth {...startAction} />
128
136
  </View>
129
- <HSpacer size={spaceBetweenActions} />
130
137
  <View style={styles.buttonWrapper}>
131
- <ButtonSolid fullWidth {...endAction} />
138
+ <IOButton variant="solid" fullWidth {...endAction} />
132
139
  </View>
133
140
  </View>
134
141
  </View>
@@ -2,23 +2,24 @@ import * as React from "react";
2
2
  import { Easing, StyleProp, StyleSheet, View, ViewStyle } from "react-native";
3
3
  import { easeGradient } from "react-native-easing-gradient";
4
4
  import LinearGradient from "react-native-linear-gradient";
5
- import Animated from "react-native-reanimated";
5
+ import Animated, { AnimatedStyle } from "react-native-reanimated";
6
6
  import { IOColors, IOSpacer, IOVisualCostants, hexToRgba } from "../../core";
7
7
  import { WithTestID } from "../../utils/types";
8
- import {
9
- ButtonLink,
10
- ButtonLinkProps,
11
- ButtonSolid,
12
- ButtonSolidProps
13
- } from "../buttons";
8
+ import { IOButton, IOButtonProps } from "../buttons";
14
9
  import { VSpacer } from "../spacer";
15
10
 
11
+ type PrimaryActionProps = Extract<
12
+ IOButtonProps,
13
+ { variant?: "solid" | "outline" }
14
+ >;
15
+ type SecondaryActionProps = Extract<IOButtonProps, { variant?: "link" }>;
16
+
16
17
  export type GradientBottomActions = WithTestID<{
17
- transitionAnimStyle: Animated.AnimateStyle<StyleProp<ViewStyle>>;
18
+ transitionAnimStyle: AnimatedStyle<StyleProp<ViewStyle>>;
18
19
  dimensions: GradientBottomActionsDimensions;
19
- // Accepted components: ButtonSolid for the primaryAction, ButtonLink for the secondaryAction
20
- primaryActionProps?: Omit<ButtonSolidProps, "fullWidth">;
21
- secondaryActionProps?: ButtonLinkProps;
20
+ // Button actions
21
+ primaryActionProps?: PrimaryActionProps;
22
+ secondaryActionProps?: SecondaryActionProps;
22
23
  // Debug mode
23
24
  debugMode?: boolean;
24
25
  }>;
@@ -68,8 +69,8 @@ const styles = StyleSheet.create({
68
69
  * @see IOScrollView
69
70
  */
70
71
  export const GradientBottomActions = ({
71
- primaryActionProps: primaryAction,
72
- secondaryActionProps: secondaryAction,
72
+ primaryActionProps,
73
+ secondaryActionProps,
73
74
  dimensions,
74
75
  transitionAnimStyle,
75
76
  debugMode,
@@ -122,11 +123,9 @@ export const GradientBottomActions = ({
122
123
  ]}
123
124
  />
124
125
  <View style={styles.buttonContainer} pointerEvents="box-none">
125
- {primaryAction && (
126
- <ButtonSolid fullWidth {...primaryAction}></ButtonSolid>
127
- )}
126
+ {primaryActionProps && <IOButton {...primaryActionProps} fullWidth />}
128
127
 
129
- {secondaryAction && (
128
+ {secondaryActionProps && (
130
129
  <View
131
130
  style={{
132
131
  alignSelf: "center",
@@ -134,7 +133,7 @@ export const GradientBottomActions = ({
134
133
  }}
135
134
  >
136
135
  <VSpacer size={dimensions.spaceBetweenActions} />
137
- {<ButtonLink {...secondaryAction}></ButtonLink>}
136
+ <IOButton {...secondaryActionProps} />
138
137
  </View>
139
138
  )}
140
139
  </View>
@@ -21,7 +21,8 @@ export type GradientScrollView = WithTestID<{
21
21
  children: React.ReactNode;
22
22
  excludeSafeAreaMargins?: boolean;
23
23
  debugMode?: boolean;
24
- // Accepted components: ButtonSolid, ButtonLink
24
+ // Accepted components: `solid` variant for the primaryAction,
25
+ // `link` variant for the secondaryAction.
25
26
  // Don't use any components other than this, please.
26
27
  primaryActionProps: GradientBottomActions["primaryActionProps"];
27
28
  secondaryActionProps?: GradientBottomActions["secondaryActionProps"];
@@ -6,7 +6,7 @@ import {
6
6
  View,
7
7
  findNodeHandle
8
8
  } from "react-native";
9
- import { IOColors, IOStyles, IOVisualCostants } from "../../core";
9
+ import { IOColors, IOVisualCostants } from "../../core";
10
10
  import { IconButton } from "../buttons";
11
11
  import { H4 } from "../typography";
12
12
 
@@ -56,7 +56,7 @@ export const ModalBSHeader = ({
56
56
  title
57
57
  ) : (
58
58
  <View
59
- style={IOStyles.flex}
59
+ style={{ flex: 1 }}
60
60
  accessible={true}
61
61
  accessibilityRole={"header"}
62
62
  accessibilityLabel={typeof title === "string" ? title : undefined}
@@ -4,7 +4,6 @@ import {
4
4
  IOListItemStyles,
5
5
  IOListItemVisualParams,
6
6
  IOSpacingScale,
7
- IOStyles,
8
7
  useIOTheme
9
8
  } from "../../core";
10
9
  import { useIOFontDynamicScale } from "../../utils/accessibility";
@@ -81,7 +80,7 @@ export const ListItemAmount = ({
81
80
  size={IOListItemVisualParams.iconSize}
82
81
  />
83
82
  )}
84
- <View style={IOStyles.flex}>{itemInfoTextComponent}</View>
83
+ <View style={{ flex: 1 }}>{itemInfoTextComponent}</View>
85
84
  <H3
86
85
  {...valueElementProps}
87
86
  color={theme["textBody-default"]}
@@ -7,7 +7,6 @@ import {
7
7
  IOSelectionListItemStyles,
8
8
  IOSelectionListItemVisualParams,
9
9
  IOSelectionTickVisualParams,
10
- IOStyles,
11
10
  useIOTheme
12
11
  } from "../../core";
13
12
  import { useListItemAnimation } from "../../hooks";
@@ -104,16 +103,14 @@ export const ListItemCheckbox = ({
104
103
  <Animated.View style={scaleAnimatedStyle}>
105
104
  <View style={IOSelectionListItemStyles.listItemInner}>
106
105
  <View
107
- style={[
108
- IOStyles.row,
109
- {
110
- flexShrink: 1,
111
- columnGap:
112
- IOSelectionListItemVisualParams.iconMargin *
113
- dynamicFontScale *
114
- spacingScaleMultiplier
115
- }
116
- ]}
106
+ style={{
107
+ flexDirection: "row",
108
+ flexShrink: 1,
109
+ columnGap:
110
+ IOSelectionListItemVisualParams.iconMargin *
111
+ dynamicFontScale *
112
+ spacingScaleMultiplier
113
+ }}
117
114
  >
118
115
  {icon && !hugeFontEnabled && (
119
116
  <Icon
@@ -5,7 +5,6 @@ import {
5
5
  IOListItemVisualParams,
6
6
  IOSelectionListItemVisualParams,
7
7
  IOSpacingScale,
8
- IOStyles,
9
8
  IOVisualCostants,
10
9
  useIOTheme
11
10
  } from "../../core";
@@ -14,8 +13,8 @@ import { WithTestID } from "../../utils/types";
14
13
  import { Badge } from "../badge";
15
14
  import { ButtonLink, IconButton } from "../buttons";
16
15
  import { IOIcons, Icon } from "../icons";
17
- import { BodySmall, H6 } from "../typography";
18
16
  import { VSpacer } from "../spacer";
17
+ import { BodySmall, H6 } from "../typography";
19
18
 
20
19
  type ButtonLinkActionProps = {
21
20
  type: "buttonLink";
@@ -121,7 +120,7 @@ export const ListItemHeader = ({
121
120
  />
122
121
  </View>
123
122
  )}
124
- <View style={IOStyles.flex}>{itemInfoTextComponent}</View>
123
+ <View style={{ flex: 1 }}>{itemInfoTextComponent}</View>
125
124
  {endElement && (
126
125
  <View style={{ marginLeft: IOListItemVisualParams.actionMargin }}>
127
126
  {listItemAction()}
@@ -4,7 +4,6 @@ import Animated from "react-native-reanimated";
4
4
  import {
5
5
  IOListItemStyles,
6
6
  IOListItemVisualParams,
7
- IOStyles,
8
7
  useIOTheme
9
8
  } from "../../core";
10
9
  import { useListItemAnimation } from "../../hooks";
@@ -175,7 +174,7 @@ export const ListItemInfo = ({
175
174
  size={PAYMENT_LOGO_SIZE}
176
175
  />
177
176
  )}
178
- <View style={IOStyles.flex}>{itemInfoTextComponent}</View>
177
+ <View style={{ flex: 1 }}>{itemInfoTextComponent}</View>
179
178
  {endElement && <View>{listItemInfoAction()}</View>}
180
179
  </>
181
180
  );
@@ -4,7 +4,6 @@ import Animated from "react-native-reanimated";
4
4
  import {
5
5
  IOListItemStyles,
6
6
  IOListItemVisualParams,
7
- IOStyles,
8
7
  useIOTheme
9
8
  } from "../../core";
10
9
  import { useListItemAnimation } from "../../hooks";
@@ -110,7 +109,7 @@ export const ListItemInfoCopy = ({
110
109
  size={IOListItemVisualParams.iconSize}
111
110
  />
112
111
  )}
113
- <View style={IOStyles.flex}>{listItemInfoCopyContent}</View>
112
+ <View style={{ flex: 1 }}>{listItemInfoCopyContent}</View>
114
113
  <Icon
115
114
  allowFontScaling
116
115
  name="copy"
@@ -229,7 +229,7 @@ export const ListItemNav = ({
229
229
  <View style={{ flexGrow: 1, flexShrink: 1 }}>
230
230
  {listItemNavContent}
231
231
  </View>
232
- {loading && <LoadingSpinner color={interactiveColor} />}
232
+ {loading && <LoadingSpinner color={IOColors[interactiveColor]} />}
233
233
  {!loading && !hideChevron && (
234
234
  <Icon
235
235
  allowFontScaling
@@ -4,7 +4,6 @@ import Animated from "react-native-reanimated";
4
4
  import {
5
5
  IOListItemStyles,
6
6
  IOListItemVisualParams,
7
- IOStyles,
8
7
  useIOTheme
9
8
  } from "../../core";
10
9
  import { useListItemAnimation } from "../../hooks";
@@ -108,7 +107,7 @@ export const ListItemNavAlert = ({
108
107
  size={IOListItemVisualParams.iconSize}
109
108
  />
110
109
  )}
111
- <View style={IOStyles.flex}>{listItemNavAlertContent}</View>
110
+ <View style={{ flex: 1 }}>{listItemNavAlertContent}</View>
112
111
  <Icon
113
112
  allowFontScaling
114
113
  name="chevronRightListItem"
@@ -7,7 +7,6 @@ import {
7
7
  IOSelectionListItemStyles,
8
8
  IOSelectionListItemVisualParams,
9
9
  IOSelectionTickVisualParams,
10
- IOStyles,
11
10
  useIOTheme
12
11
  } from "../../core";
13
12
  import { useListItemAnimation } from "../../hooks";
@@ -133,13 +132,14 @@ export const ListItemRadio = ({
133
132
  >
134
133
  <View style={IOSelectionListItemStyles.listItemInner}>
135
134
  <View
136
- style={[
137
- IOStyles.flex,
138
- IOStyles.rowSpaceBetween,
139
- IOStyles.alignCenter
140
- ]}
135
+ style={{
136
+ flex: 1,
137
+ flexDirection: "row",
138
+ justifyContent: "space-between",
139
+ alignItems: "center"
140
+ }}
141
141
  >
142
- <View style={[IOStyles.row, IOStyles.alignCenter]}>
142
+ <View style={{ flexDirection: "row", alignItems: "center" }}>
143
143
  {loadingProps?.skeletonIcon && <SkeletonIcon />}
144
144
  <IOSkeleton shape="rectangle" width={180} height={16} radius={8} />
145
145
  </View>