@pagopa/io-app-design-system 4.5.1 → 4.5.2

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 (90) hide show
  1. package/lib/commonjs/components/accordion/AccordionItem.js +1 -1
  2. package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
  3. package/lib/commonjs/components/buttons/ButtonLink.js +25 -25
  4. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  5. package/lib/commonjs/components/buttons/ButtonOutline.js +41 -97
  6. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  7. package/lib/commonjs/components/buttons/ButtonSolid.js +70 -63
  8. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  9. package/lib/commonjs/components/buttons/IconButton.js +28 -27
  10. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  11. package/lib/commonjs/components/buttons/IconButtonSolid.js +27 -27
  12. package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
  13. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
  14. package/lib/commonjs/components/icons/svg/IconProductIOAppBlueBg.js +8 -20
  15. package/lib/commonjs/components/icons/svg/IconProductIOAppBlueBg.js.map +1 -1
  16. package/lib/commonjs/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
  17. package/lib/commonjs/components/layout/HeaderFirstLevel.js +2 -2
  18. package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
  19. package/lib/commonjs/components/listitems/ListItemInfo.js +1 -1
  20. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  21. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
  22. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  23. package/lib/commonjs/components/listitems/ListItemNav.js +4 -3
  24. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  25. package/lib/commonjs/core/IOColors.js +16 -2
  26. package/lib/commonjs/core/IOColors.js.map +1 -1
  27. package/lib/module/components/accordion/AccordionItem.js +1 -1
  28. package/lib/module/components/accordion/AccordionItem.js.map +1 -1
  29. package/lib/module/components/buttons/ButtonLink.js +26 -26
  30. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  31. package/lib/module/components/buttons/ButtonOutline.js +42 -98
  32. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  33. package/lib/module/components/buttons/ButtonSolid.js +73 -66
  34. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  35. package/lib/module/components/buttons/IconButton.js +29 -28
  36. package/lib/module/components/buttons/IconButton.js.map +1 -1
  37. package/lib/module/components/buttons/IconButtonSolid.js +28 -28
  38. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
  39. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
  40. package/lib/module/components/icons/svg/IconProductIOAppBlueBg.js +9 -21
  41. package/lib/module/components/icons/svg/IconProductIOAppBlueBg.js.map +1 -1
  42. package/lib/module/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
  43. package/lib/module/components/layout/HeaderFirstLevel.js +2 -2
  44. package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
  45. package/lib/module/components/listitems/ListItemInfo.js +1 -1
  46. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  47. package/lib/module/components/listitems/ListItemInfoCopy.js +1 -1
  48. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  49. package/lib/module/components/listitems/ListItemNav.js +4 -3
  50. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  51. package/lib/module/core/IOColors.js +16 -2
  52. package/lib/module/core/IOColors.js.map +1 -1
  53. package/lib/typescript/components/buttons/ButtonLink.d.ts +1 -1
  54. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  55. package/lib/typescript/components/buttons/ButtonOutline.d.ts +2 -2
  56. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  57. package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
  58. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  59. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  60. package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
  61. package/lib/typescript/components/icons/svg/IconProductIOAppBlueBg.d.ts.map +1 -1
  62. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts +2 -2
  63. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
  64. package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
  65. package/lib/typescript/core/IOColors.d.ts +1 -1
  66. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  67. package/lib/typescript/core/IOStyles.d.ts +2 -2
  68. package/lib/typescript/utils/fonts.d.ts +1 -1
  69. package/package.json +1 -1
  70. package/src/components/accordion/AccordionItem.tsx +1 -1
  71. package/src/components/buttons/ButtonLink.tsx +37 -30
  72. package/src/components/buttons/ButtonOutline.tsx +51 -108
  73. package/src/components/buttons/ButtonSolid.tsx +94 -78
  74. package/src/components/buttons/IconButton.tsx +36 -29
  75. package/src/components/buttons/IconButtonSolid.tsx +35 -31
  76. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
  77. package/src/components/icons/svg/IconProductIOAppBlueBg.tsx +12 -13
  78. package/src/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
  79. package/src/components/layout/HeaderFirstLevel.tsx +4 -4
  80. package/src/components/listitems/ListItemInfo.tsx +1 -1
  81. package/src/components/listitems/ListItemInfoCopy.tsx +1 -1
  82. package/src/components/listitems/ListItemNav.tsx +5 -4
  83. package/src/core/IOColors.ts +24 -3
  84. package/lib/commonjs/components/layout/BlockButtons.js +0 -85
  85. package/lib/commonjs/components/layout/BlockButtons.js.map +0 -1
  86. package/lib/module/components/layout/BlockButtons.js +0 -76
  87. package/lib/module/components/layout/BlockButtons.js.map +0 -1
  88. package/lib/typescript/components/layout/BlockButtons.d.ts +0 -54
  89. package/lib/typescript/components/layout/BlockButtons.d.ts.map +0 -1
  90. package/src/components/layout/BlockButtons.tsx +0 -143
@@ -1,8 +1,15 @@
1
- import React, { ComponentProps, useCallback, useEffect, useRef } from "react";
1
+ import React, {
2
+ ComponentProps,
3
+ forwardRef,
4
+ useCallback,
5
+ useEffect,
6
+ useMemo,
7
+ useRef
8
+ } from "react";
2
9
  import {
10
+ ColorValue,
3
11
  GestureResponderEvent,
4
12
  Pressable,
5
- StyleSheet,
6
13
  View
7
14
  } from "react-native";
8
15
  import ReactNativeHapticFeedback from "react-native-haptic-feedback";
@@ -18,7 +25,8 @@ import {
18
25
  enterTransitionInnerContent,
19
26
  enterTransitionInnerContentSmall,
20
27
  exitTransitionInnerContent,
21
- useIOExperimentalDesign
28
+ useIOExperimentalDesign,
29
+ useIOTheme
22
30
  } from "../../core";
23
31
  import { useScaleAnimation } from "../../hooks";
24
32
  import { WithTestID } from "../../utils/types";
@@ -29,37 +37,23 @@ import { ButtonText } from "../typography/ButtonText";
29
37
  export type ButtonSolidColor = "primary" | "danger" | "contrast";
30
38
 
31
39
  type ColorStates = {
32
- default: string;
33
- pressed: string;
34
- label: {
40
+ background: {
41
+ default: string;
42
+ pressed: string;
43
+ disabled: string;
44
+ };
45
+ foreground: {
35
46
  default: IOColors;
36
47
  disabled: IOColors;
37
48
  };
38
49
  };
39
50
 
40
- // Disabled state
41
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
42
- const colorPrimaryLegacyButtonDisabled: IOColors = "grey-200";
43
- const legacyStyles = StyleSheet.create({
44
- backgroundDisabled: {
45
- backgroundColor: IOColors[colorPrimaryLegacyButtonDisabled]
46
- }
47
- });
48
-
49
- const colorPrimaryButtonDisabled: IOColors = "grey-200";
50
51
  const ICON_MARGIN = 8;
51
52
  const DISABLED_OPACITY = 0.5;
52
53
 
53
54
  // Icon size
54
55
  const iconSize: IOIconSizeScale = 20;
55
56
 
56
- const styles = StyleSheet.create({
57
- backgroundDisabled: {
58
- backgroundColor: IOColors[colorPrimaryButtonDisabled],
59
- opacity: DISABLED_OPACITY
60
- }
61
- });
62
-
63
57
  export type ButtonSolidProps = WithTestID<
64
58
  {
65
59
  /**
@@ -87,39 +81,6 @@ export type ButtonSolidProps = WithTestID<
87
81
  >
88
82
  >;
89
83
 
90
- const mapColorStates: Record<
91
- NonNullable<ButtonSolidProps["color"]>,
92
- ColorStates
93
- > = {
94
- // Primary button
95
- primary: {
96
- default: IOColors["blueIO-500"],
97
- pressed: IOColors["blueIO-600"],
98
- label: {
99
- default: "white",
100
- disabled: "grey-700"
101
- }
102
- },
103
- // Danger button
104
- danger: {
105
- default: IOColors["error-600"],
106
- pressed: IOColors["error-500"],
107
- label: {
108
- default: "white",
109
- disabled: "grey-700"
110
- }
111
- },
112
- // Contrast button
113
- contrast: {
114
- default: IOColors.white,
115
- pressed: IOColors["blueIO-50"],
116
- label: {
117
- default: "blueIO-500",
118
- disabled: "grey-700"
119
- }
120
- }
121
- };
122
-
123
84
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
124
85
  const mapLegacyColorStates: Record<
125
86
  NonNullable<ButtonSolidProps["color"]>,
@@ -127,34 +88,43 @@ const mapLegacyColorStates: Record<
127
88
  > = {
128
89
  // Primary button
129
90
  primary: {
130
- default: IOColors["blue-500"],
131
- pressed: IOColors["blue-600"],
132
- label: {
91
+ background: {
92
+ default: IOColors["blue-500"],
93
+ pressed: IOColors["blue-600"],
94
+ disabled: IOColors["grey-200"]
95
+ },
96
+ foreground: {
133
97
  default: "white",
134
98
  disabled: "white"
135
99
  }
136
100
  },
137
101
  // Danger button
138
102
  danger: {
139
- default: IOColors["error-600"],
140
- pressed: IOColors["error-500"],
141
- label: {
103
+ background: {
104
+ default: IOColors["error-600"],
105
+ pressed: IOColors["error-500"],
106
+ disabled: IOColors["grey-200"]
107
+ },
108
+ foreground: {
142
109
  default: "white",
143
110
  disabled: "white"
144
111
  }
145
112
  },
146
113
  // Contrast button
147
114
  contrast: {
148
- default: IOColors.white,
149
- pressed: IOColors["blue-50"],
150
- label: {
115
+ background: {
116
+ default: IOColors.white,
117
+ pressed: IOColors["blue-50"],
118
+ disabled: IOColors["grey-200"]
119
+ },
120
+ foreground: {
151
121
  default: "blue-500",
152
122
  disabled: "white"
153
123
  }
154
124
  }
155
125
  };
156
126
 
157
- export const ButtonSolid = React.forwardRef<View, ButtonSolidProps>(
127
+ export const ButtonSolid = forwardRef<View, ButtonSolidProps>(
158
128
  (
159
129
  {
160
130
  color = "primary",
@@ -171,17 +141,62 @@ export const ButtonSolid = React.forwardRef<View, ButtonSolidProps>(
171
141
  },
172
142
  ref
173
143
  ) => {
144
+ const theme = useIOTheme();
174
145
  const { isExperimental } = useIOExperimentalDesign();
175
146
  const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
176
147
  useScaleAnimation();
177
148
  const reducedMotion = useReducedMotion();
178
149
 
179
- const colorMap = React.useMemo(
150
+ const mapColorStates = useMemo<
151
+ Record<NonNullable<ButtonSolidProps["color"]>, ColorStates>
152
+ >(
153
+ () => ({
154
+ // Primary button
155
+ primary: {
156
+ background: {
157
+ default: IOColors[theme["interactiveElem-default"]],
158
+ pressed: IOColors[theme["interactiveElem-pressed"]],
159
+ disabled: IOColors[theme["interactiveElem-disabled"]]
160
+ },
161
+ foreground: {
162
+ default: theme["buttonText-default"],
163
+ disabled: theme["buttonText-disabled"]
164
+ }
165
+ },
166
+ // Danger button
167
+ danger: {
168
+ background: {
169
+ default: IOColors["error-600"],
170
+ pressed: IOColors["error-500"],
171
+ disabled: IOColors[theme["interactiveElem-disabled"]]
172
+ },
173
+ foreground: {
174
+ default: theme["buttonText-default"],
175
+ disabled: theme["buttonText-disabled"]
176
+ }
177
+ },
178
+ // Contrast button
179
+ contrast: {
180
+ background: {
181
+ default: IOColors.white,
182
+ pressed: IOColors["blueIO-50"],
183
+ disabled: IOColors["blueIO-50"]
184
+ },
185
+ foreground: {
186
+ default: "blueIO-500",
187
+ disabled: "blueIO-500"
188
+ }
189
+ }
190
+ }),
191
+ [theme]
192
+ );
193
+
194
+ const colorMap = useMemo(
180
195
  () => (isExperimental ? mapColorStates : mapLegacyColorStates),
181
- [isExperimental]
196
+ [isExperimental, mapColorStates]
182
197
  );
183
198
 
184
- const buttonStyles = React.useMemo(
199
+ const buttonStyles = useMemo(
185
200
  () => (isExperimental ? IOButtonStyles : IOButtonLegacyStyles),
186
201
  [isExperimental]
187
202
  );
@@ -203,7 +218,7 @@ export const ButtonSolid = React.forwardRef<View, ButtonSolidProps>(
203
218
  const backgroundColor = interpolateColor(
204
219
  progress.value,
205
220
  [0, 1],
206
- [colorMap[color].default, colorMap[color].pressed]
221
+ [colorMap[color].background.default, colorMap[color].background.pressed]
207
222
  );
208
223
 
209
224
  return { backgroundColor };
@@ -222,10 +237,15 @@ export const ButtonSolid = React.forwardRef<View, ButtonSolidProps>(
222
237
  [loading, onPress]
223
238
  );
224
239
 
240
+ // Background
241
+ const backgroundColor: ColorValue = disabled
242
+ ? colorMap[color]?.background?.disabled
243
+ : colorMap[color]?.background?.default;
244
+
225
245
  // Label & Icons colors
226
246
  const foregroundColor: IOColors = disabled
227
- ? colorMap[color]?.label?.disabled
228
- : colorMap[color]?.label?.default;
247
+ ? colorMap[color]?.foreground?.disabled
248
+ : colorMap[color]?.foreground?.default;
229
249
 
230
250
  return (
231
251
  <Pressable
@@ -249,14 +269,10 @@ export const ButtonSolid = React.forwardRef<View, ButtonSolidProps>(
249
269
  <Animated.View
250
270
  style={[
251
271
  buttonStyles.button,
252
- { overflow: "hidden" },
272
+ { backgroundColor, overflow: "hidden" },
253
273
  isExperimental && fullWidth && { paddingHorizontal: 16 },
254
274
  buttonStyles.buttonSizeDefault,
255
- disabled
256
- ? isExperimental
257
- ? styles.backgroundDisabled
258
- : legacyStyles.backgroundDisabled
259
- : { backgroundColor: colorMap[color]?.default },
275
+ disabled ? { opacity: DISABLED_OPACITY } : {},
260
276
  /* Prevent Reanimated from overriding background colors
261
277
  if button is disabled */
262
278
  !disabled && !reducedMotion && scaleAnimatedStyle,
@@ -10,7 +10,8 @@ import {
10
10
  IOIconButtonStyles,
11
11
  IOStyles,
12
12
  hexToRgba,
13
- useIOExperimentalDesign
13
+ useIOExperimentalDesign,
14
+ useIOTheme
14
15
  } from "../../core";
15
16
  import { useScaleAnimation } from "../../hooks";
16
17
  import { WithTestID } from "../../utils/types";
@@ -70,33 +71,6 @@ const mapLegacyColorStates: Record<
70
71
  }
71
72
  };
72
73
 
73
- const mapColorStates: Record<NonNullable<IconButton["color"]>, ColorStates> = {
74
- // Primary button
75
- primary: {
76
- icon: {
77
- default: IOColors["blueIO-500"],
78
- pressed: IOColors["blueIO-600"],
79
- disabled: hexToRgba(IOColors["blueIO-500"], 0.25)
80
- }
81
- },
82
- // Neutral button
83
- neutral: {
84
- icon: {
85
- default: IOColors.black,
86
- pressed: IOColors["grey-850"],
87
- disabled: IOColors["grey-450"]
88
- }
89
- },
90
- // Contrast button
91
- contrast: {
92
- icon: {
93
- default: IOColors.white,
94
- pressed: hexToRgba(IOColors.white, 0.85),
95
- disabled: hexToRgba(IOColors.white, 0.25)
96
- }
97
- }
98
- };
99
-
100
74
  const AnimatedIconClassComponent =
101
75
  Animated.createAnimatedComponent(IconClassComponent);
102
76
 
@@ -110,15 +84,48 @@ export const IconButton = ({
110
84
  accessibilityHint,
111
85
  testID
112
86
  }: IconButton) => {
87
+ const theme = useIOTheme();
113
88
  const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
114
89
  useScaleAnimation("exaggerated");
115
90
  const reducedMotion = useReducedMotion();
116
91
 
117
92
  const { isExperimental } = useIOExperimentalDesign();
118
93
 
94
+ const mapColorStates = useMemo<
95
+ Record<NonNullable<IconButton["color"]>, ColorStates>
96
+ >(
97
+ () => ({
98
+ // Primary button
99
+ primary: {
100
+ icon: {
101
+ default: IOColors[theme["interactiveElem-default"]],
102
+ pressed: IOColors[theme["interactiveElem-pressed"]],
103
+ disabled: IOColors[theme["interactiveElem-disabled"]]
104
+ }
105
+ },
106
+ // Neutral button
107
+ neutral: {
108
+ icon: {
109
+ default: IOColors[theme["neutralButton-default"]],
110
+ pressed: IOColors[theme["neutralButton-pressed"]],
111
+ disabled: IOColors[theme["neutralButton-disabled"]]
112
+ }
113
+ },
114
+ // Contrast button
115
+ contrast: {
116
+ icon: {
117
+ default: IOColors.white,
118
+ pressed: hexToRgba(IOColors.white, 0.85),
119
+ disabled: hexToRgba(IOColors.white, 0.25)
120
+ }
121
+ }
122
+ }),
123
+ [theme]
124
+ );
125
+
119
126
  const colorMap = useMemo(
120
127
  () => (isExperimental ? mapColorStates : mapLegacyColorStates),
121
- [isExperimental]
128
+ [isExperimental, mapColorStates]
122
129
  );
123
130
 
124
131
  // Animate the <Icon> color prop
@@ -8,7 +8,8 @@ import Animated, {
8
8
  import {
9
9
  IOButtonStyles,
10
10
  IOIconButtonStyles,
11
- useIOExperimentalDesign
11
+ useIOExperimentalDesign,
12
+ useIOTheme
12
13
  } from "../../core";
13
14
  import { IOColors, hexToRgba } from "../../core/IOColors";
14
15
  import { useScaleAnimation } from "../../hooks";
@@ -36,35 +37,6 @@ type ColorStates = {
36
37
  };
37
38
  };
38
39
 
39
- const mapColorStates: Record<
40
- NonNullable<IconButtonSolid["color"]>,
41
- ColorStates
42
- > = {
43
- // Primary button
44
- primary: {
45
- background: {
46
- default: IOColors["blueIO-500"],
47
- pressed: IOColors["blueIO-600"],
48
- disabled: IOColors["grey-100"]
49
- },
50
- icon: {
51
- default: IOColors.white,
52
- disabled: IOColors["grey-450"]
53
- }
54
- },
55
- contrast: {
56
- background: {
57
- default: IOColors.white,
58
- pressed: IOColors["blueIO-50"],
59
- disabled: hexToRgba(IOColors.white, 0.25)
60
- },
61
- icon: {
62
- default: IOColors["blueIO-500"],
63
- disabled: IOColors["blueIO-500"]
64
- }
65
- }
66
- };
67
-
68
40
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
69
41
  const mapLegacyColorStates: Record<
70
42
  NonNullable<IconButtonSolid["color"]>,
@@ -104,15 +76,47 @@ export const IconButtonSolid = ({
104
76
  accessibilityHint,
105
77
  testID
106
78
  }: IconButtonSolid) => {
79
+ const theme = useIOTheme();
107
80
  const { isExperimental } = useIOExperimentalDesign();
108
81
 
109
82
  const { progress, onPressIn, onPressOut, scaleAnimatedStyle } =
110
83
  useScaleAnimation("exaggerated");
111
84
  const reducedMotion = useReducedMotion();
112
85
 
86
+ const mapColorStates = React.useMemo<
87
+ Record<NonNullable<IconButtonSolid["color"]>, ColorStates>
88
+ >(
89
+ () => ({
90
+ // Primary button
91
+ primary: {
92
+ background: {
93
+ default: IOColors[theme["interactiveElem-default"]],
94
+ pressed: IOColors[theme["interactiveElem-pressed"]],
95
+ disabled: IOColors[theme["interactiveElem-disabled"]]
96
+ },
97
+ icon: {
98
+ default: IOColors[theme["buttonText-default"]],
99
+ disabled: IOColors[theme["buttonText-disabled"]]
100
+ }
101
+ },
102
+ contrast: {
103
+ background: {
104
+ default: IOColors.white,
105
+ pressed: IOColors["blueIO-50"],
106
+ disabled: hexToRgba(IOColors.white, 0.25)
107
+ },
108
+ icon: {
109
+ default: IOColors["blueIO-500"],
110
+ disabled: IOColors["blueIO-500"]
111
+ }
112
+ }
113
+ }),
114
+ [theme]
115
+ );
116
+
113
117
  const colorMap = React.useMemo(
114
118
  () => (isExperimental ? mapColorStates : mapLegacyColorStates),
115
- [isExperimental]
119
+ [isExperimental, mapColorStates]
116
120
  );
117
121
 
118
122
  const backgroundColorAnimationStyle = useAnimatedStyle(() => ({
@@ -176,7 +176,7 @@ exports[`Test Buttons Components - Experimental Enabled ButtonOutline Snapshot 1
176
176
  },
177
177
  false,
178
178
  {
179
- "backgroundColor": "rgba(231,236,252,0)",
179
+ "backgroundColor": "rgba(9,50,182,0)",
180
180
  "borderColor": "#0B3EE3",
181
181
  },
182
182
  {
@@ -282,15 +282,14 @@ exports[`Test Buttons Components - Experimental Enabled ButtonSolid Snapshot 1`]
282
282
  "textAlignVertical": "center",
283
283
  },
284
284
  {
285
+ "backgroundColor": "#0B3EE3",
285
286
  "overflow": "hidden",
286
287
  },
287
288
  false,
288
289
  {
289
290
  "height": 48,
290
291
  },
291
- {
292
- "backgroundColor": "#0B3EE3",
293
- },
292
+ {},
294
293
  {
295
294
  "transform": [
296
295
  {
@@ -1024,15 +1023,14 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
1024
1023
  "textAlignVertical": "center",
1025
1024
  },
1026
1025
  {
1026
+ "backgroundColor": "#0073E6",
1027
1027
  "overflow": "hidden",
1028
1028
  },
1029
1029
  false,
1030
1030
  {
1031
1031
  "height": 40,
1032
1032
  },
1033
- {
1034
- "backgroundColor": "#0073E6",
1035
- },
1033
+ {},
1036
1034
  {
1037
1035
  "transform": [
1038
1036
  {
@@ -1,21 +1,20 @@
1
1
  import React from "react";
2
- import { Svg, Path, G, Mask, Rect } from "react-native-svg";
2
+ import { Path, Svg } from "react-native-svg";
3
+ import { IOColors } from "../../../core";
3
4
  import { SVGIconProps } from "../types";
4
5
 
5
6
  const IconProductIOAppBlueBg = ({ size, style, ...props }: SVGIconProps) => (
6
7
  <Svg width={size} height={size} viewBox="0 0 24 24" style={style} {...props}>
7
- <Rect width={size} height={size} fill="#0B3EE3" rx="4" />
8
- <Mask id="a" width={size} height={size} x="6" y="7">
9
- <Path
10
- fill="#fff"
11
- fillRule="evenodd"
12
- clipRule="evenodd"
13
- d="M7.25 7c.69036 0 1.25.55964 1.25 1.25S7.94036 9.5 7.25 9.5 6 8.94036 6 8.25 6.55964 7 7.25 7Zm10.5 6c0 2.2091-1.7909 4-3.8095 4-2.3996 0-4.1905-1.7909-4.1905-4 0-2.2091 1.7909-4 4.1905-4 2.0186 0 3.8095 1.7909 3.8095 4Zm-9.5-1.25c0-.5523-.44772-1-1-1s-1 .4477-1 1V16c0 .5523.44772 1 1 1s1-.4477 1-1v-4.25Zm6.4826.8302h.5326v-.524h-.5287v-.6337h-.5785v2.1082c0 .3331.0459.5606.1417.6824.092.1259.2682.1869.5287.1869.0996 0 .249-.0244.4406-.0691l-.0268-.4874-.3295.0081c-.0575 0-.0996-.0122-.1264-.0406-.0268-.0285-.0422-.061-.046-.0975-.0038-.0406-.0077-.1016-.0077-.195v-.9383Zm-1.7431-.52v2.287h.5785v-2.287h-.5785Zm-.8683-.0568c.1011 0 .1867.034.2528.1021.0661.0681.0972.1514.0972.2536 0 .1021-.0311.1816-.0972.2497-.0623.0605-.1439.0946-.2489.0946-.1011 0-.1867-.0341-.2528-.1022-.0661-.0681-.1011-.1513-.1011-.2497 0-.0984.035-.1816.0972-.2497.0661-.0682.1517-.0984.2528-.0984Z"
14
- />
15
- </Mask>
16
- <G mask="url(#a)">
17
- <Path fill="#fff" d="M-13-13h50v50h-50z" />
18
- </G>
8
+ <Path
9
+ d="M0 9.6c0-3.36 0-5.04.654-6.324A6 6 0 0 1 3.276.654C4.56 0 6.24 0 9.6 0h4.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C24 4.56 24 6.24 24 9.6v4.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C19.44 24 17.76 24 14.4 24H9.6c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C0 19.44 0 17.76 0 14.4V9.6Z"
10
+ fill={IOColors["blueIO-500"]}
11
+ />
12
+ <Path
13
+ fillRule="evenodd"
14
+ clipRule="evenodd"
15
+ d="M7.21 6.4a1.35 1.35 0 1 1 0 2.7 1.35 1.35 0 0 1 0-2.7Zm11.34 6.48c0 2.386-1.934 4.32-4.114 4.32-2.592 0-4.526-1.934-4.526-4.32s1.934-4.32 4.526-4.32c2.18 0 4.114 1.934 4.114 4.32ZM8.29 11.53a1.08 1.08 0 1 0-2.16 0v4.59a1.08 1.08 0 0 0 2.16 0v-4.59Zm7.001.897h.576v-.566h-.571v-.685h-.625v2.277c0 .36.05.606.153.737.1.136.29.202.57.202.108 0 .27-.026.477-.075l-.03-.526-.355.009c-.062 0-.108-.013-.137-.044a.177.177 0 0 1-.05-.105 2.24 2.24 0 0 1-.008-.211v-1.013Zm-1.882-.562v2.47h.624v-2.47h-.624Zm-.938-.062a.366.366 0 0 1 .378.385c0 .11-.034.196-.105.27a.37.37 0 0 1-.269.101.375.375 0 0 1-.382-.38c0-.106.038-.196.105-.27a.363.363 0 0 1 .273-.106Z"
16
+ fill={IOColors.white}
17
+ />
19
18
  </Svg>
20
19
  );
21
20
 
@@ -1,9 +1,12 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
2
- <rect width="24" height="24" fill="#0B3EE3" rx="4"/>
3
- <mask id="a" width="12" height="10" x="6" y="7" maskUnits="userSpaceOnUse" style="mask-type:luminance">
4
- <path fill="#fff" fill-rule="evenodd" d="M7.25 7c.69036 0 1.25.55964 1.25 1.25S7.94036 9.5 7.25 9.5 6 8.94036 6 8.25 6.55964 7 7.25 7Zm10.5 6c0 2.2091-1.7909 4-3.8095 4-2.3996 0-4.1905-1.7909-4.1905-4 0-2.2091 1.7909-4 4.1905-4 2.0186 0 3.8095 1.7909 3.8095 4Zm-9.5-1.25c0-.5523-.44772-1-1-1s-1 .4477-1 1V16c0 .5523.44772 1 1 1s1-.4477 1-1v-4.25Zm6.4826.8302h.5326v-.524h-.5287v-.6337h-.5785v2.1082c0 .3331.0459.5606.1417.6824.092.1259.2682.1869.5287.1869.0996 0 .249-.0244.4406-.0691l-.0268-.4874-.3295.0081c-.0575 0-.0996-.0122-.1264-.0406-.0268-.0285-.0422-.061-.046-.0975-.0038-.0406-.0077-.1016-.0077-.195v-.9383Zm-1.7431-.52v2.287h.5785v-2.287h-.5785Zm-.8683-.0568c.1011 0 .1867.034.2528.1021.0661.0681.0972.1514.0972.2536 0 .1021-.0311.1816-.0972.2497-.0623.0605-.1439.0946-.2489.0946-.1011 0-.1867-.0341-.2528-.1022-.0661-.0681-.1011-.1513-.1011-.2497 0-.0984.035-.1816.0972-.2497.0661-.0682.1517-.0984.2528-.0984Z" clip-rule="evenodd"/>
5
- </mask>
6
- <g mask="url(#a)">
7
- <path fill="#fff" d="M-13-13h50v50h-50z"/>
8
- </g>
9
- </svg>
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <path
3
+ d="M0 9.6c0-3.36 0-5.04.654-6.324A6 6 0 0 1 3.276.654C4.56 0 6.24 0 9.6 0h4.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C24 4.56 24 6.24 24 9.6v4.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C19.44 24 17.76 24 14.4 24H9.6c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C0 19.44 0 17.76 0 14.4V9.6Z"
4
+ fill="#0B3EE3"
5
+ />
6
+ <path
7
+ fill-rule="evenodd"
8
+ clip-rule="evenodd"
9
+ d="M7.21 6.4a1.35 1.35 0 1 1 0 2.7 1.35 1.35 0 0 1 0-2.7Zm11.34 6.48c0 2.386-1.934 4.32-4.114 4.32-2.592 0-4.526-1.934-4.526-4.32s1.934-4.32 4.526-4.32c2.18 0 4.114 1.934 4.114 4.32ZM8.29 11.53a1.08 1.08 0 1 0-2.16 0v4.59a1.08 1.08 0 0 0 2.16 0v-4.59Zm7.001.897h.576v-.566h-.571v-.685h-.625v2.277c0 .36.05.606.153.737.1.136.29.202.57.202.108 0 .27-.026.477-.075l-.03-.526-.355.009c-.062 0-.108-.013-.137-.044a.177.177 0 0 1-.05-.105 2.24 2.24 0 0 1-.008-.211v-1.013Zm-1.882-.562v2.47h.624v-2.47h-.624Zm-.938-.062a.366.366 0 0 1 .378.385c0 .11-.034.196-.105.27a.37.37 0 0 1-.269.101.375.375 0 0 1-.382-.38c0-.106.038-.196.105-.27a.363.363 0 0 1 .273-.106Z"
10
+ fill="#fff"
11
+ />
12
+ </svg>
@@ -28,8 +28,8 @@ import { HeaderActionProps } from "./common";
28
28
 
29
29
  export type HeaderFirstLevel = WithTestID<{
30
30
  title: string;
31
- firstAction: HeaderActionProps;
32
- secondAction: HeaderActionProps;
31
+ firstAction?: HeaderActionProps;
32
+ secondAction?: HeaderActionProps;
33
33
  thirdAction?: HeaderActionProps;
34
34
  animatedRef?: AnimatedRef<Animated.ScrollView>;
35
35
  animatedFlatListRef?: AnimatedRef<Animated.FlatList<any>>;
@@ -134,8 +134,8 @@ export const HeaderFirstLevel = ({
134
134
  </View>
135
135
  <HStack space={16} style={{ flexShrink: 0 }}>
136
136
  {thirdAction && <IconButton {...thirdAction} color={"primary"} />}
137
- <IconButton {...secondAction} color={"primary"} />
138
- <IconButton {...firstAction} color={"primary"} />
137
+ {secondAction && <IconButton {...secondAction} color={"primary"} />}
138
+ {firstAction && <IconButton {...firstAction} color={"primary"} />}
139
139
  </HStack>
140
140
  </View>
141
141
  </Animated.View>
@@ -154,7 +154,7 @@ export const ListItemInfo = ({
154
154
  <Icon
155
155
  allowFontScaling
156
156
  name={icon}
157
- color="grey-450"
157
+ color={theme["icon-decorative"]}
158
158
  size={IOListItemVisualParams.iconSize}
159
159
  />
160
160
  )}
@@ -106,7 +106,7 @@ export const ListItemInfoCopy = ({
106
106
  <Icon
107
107
  allowFontScaling
108
108
  name={icon}
109
- color="grey-450"
109
+ color={theme["icon-decorative"]}
110
110
  size={IOListItemVisualParams.iconSize}
111
111
  />
112
112
  )}
@@ -81,7 +81,7 @@ export const ListItemNav = ({
81
81
  description,
82
82
  onPress,
83
83
  icon,
84
- iconColor = "grey-450",
84
+ iconColor,
85
85
  avatarProps: avatar,
86
86
  paymentLogoUri,
87
87
  accessibilityLabel,
@@ -96,6 +96,9 @@ export const ListItemNav = ({
96
96
  useListItemAnimation();
97
97
  const theme = useIOTheme();
98
98
 
99
+ const defaultIconColor = iconColor ?? theme["icon-decorative"];
100
+ const interactiveColor = theme["interactiveElem-default"];
101
+
99
102
  const { dynamicFontScale, hugeFontEnabled } = useIOFontDynamicScale();
100
103
 
101
104
  const listItemNavContent = (
@@ -151,8 +154,6 @@ export const ListItemNav = ({
151
154
  </>
152
155
  );
153
156
 
154
- const interactiveColor = theme["interactiveElem-default"];
155
-
156
157
  const handleOnPress = (event: GestureResponderEvent) => {
157
158
  if (!loading) {
158
159
  onPress(event);
@@ -188,7 +189,7 @@ export const ListItemNav = ({
188
189
  <Icon
189
190
  allowFontScaling
190
191
  name={icon}
191
- color={iconColor}
192
+ color={defaultIconColor}
192
193
  size={IOListItemVisualParams.iconSize}
193
194
  />
194
195
  <HSpacer