@pagopa/io-app-design-system 4.5.0 → 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 (200) hide show
  1. package/lib/commonjs/components/Advice/Advice.js +1 -1
  2. package/lib/commonjs/components/accordion/AccordionItem.js +1 -1
  3. package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
  4. package/lib/commonjs/components/accordion/RawAccordion.js +1 -1
  5. package/lib/commonjs/components/accordion/RawAccordion.js.map +1 -1
  6. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +0 -4
  7. package/lib/commonjs/components/buttons/ButtonLink.js +26 -26
  8. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  9. package/lib/commonjs/components/buttons/ButtonOutline.js +45 -101
  10. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  11. package/lib/commonjs/components/buttons/ButtonSolid.js +71 -64
  12. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  13. package/lib/commonjs/components/buttons/IconButton.js +31 -30
  14. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  15. package/lib/commonjs/components/buttons/IconButtonContained.js +11 -11
  16. package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
  17. package/lib/commonjs/components/buttons/IconButtonSolid.js +30 -30
  18. package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
  19. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
  20. package/lib/commonjs/components/icons/Icon.js +2 -2
  21. package/lib/commonjs/components/icons/Icon.js.map +1 -1
  22. package/lib/commonjs/components/icons/README.md +1 -1
  23. package/lib/commonjs/components/icons/svg/IconProductIOAppBlueBg.js +8 -20
  24. package/lib/commonjs/components/icons/svg/IconProductIOAppBlueBg.js.map +1 -1
  25. package/lib/commonjs/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
  26. package/lib/commonjs/components/layout/HeaderFirstLevel.js +2 -2
  27. package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
  28. package/lib/commonjs/components/listitems/ListItemInfo.js +1 -1
  29. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  30. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
  31. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  32. package/lib/commonjs/components/listitems/ListItemNav.js +4 -3
  33. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  34. package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
  35. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  36. package/lib/commonjs/components/listitems/ListItemTransaction.js +1 -1
  37. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  38. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +2 -2
  39. package/lib/commonjs/components/numberpad/NumberButton.js +1 -1
  40. package/lib/commonjs/components/pictograms/Pictogram.js +1 -22
  41. package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
  42. package/lib/commonjs/components/spacer/Spacer.js +1 -1
  43. package/lib/commonjs/components/spacer/Spacer.js.map +1 -1
  44. package/lib/commonjs/components/stepper/Stepper.js +1 -1
  45. package/lib/commonjs/components/switch/NativeSwitch.js +2 -2
  46. package/lib/commonjs/components/switch/NativeSwitch.js.map +1 -1
  47. package/lib/commonjs/components/tabs/TabItem.js +3 -3
  48. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  49. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +4 -4
  50. package/lib/commonjs/components/typography/__test__/typography.test.js +13 -13
  51. package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
  52. package/lib/commonjs/core/IOColors.js +31 -99
  53. package/lib/commonjs/core/IOColors.js.map +1 -1
  54. package/lib/commonjs/core/IOStyles.js +2 -2
  55. package/lib/module/components/Advice/Advice.js +1 -1
  56. package/lib/module/components/accordion/AccordionItem.js +1 -1
  57. package/lib/module/components/accordion/AccordionItem.js.map +1 -1
  58. package/lib/module/components/accordion/RawAccordion.js +1 -1
  59. package/lib/module/components/accordion/RawAccordion.js.map +1 -1
  60. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +0 -4
  61. package/lib/module/components/buttons/ButtonLink.js +27 -27
  62. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  63. package/lib/module/components/buttons/ButtonOutline.js +46 -102
  64. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  65. package/lib/module/components/buttons/ButtonSolid.js +74 -67
  66. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  67. package/lib/module/components/buttons/IconButton.js +32 -31
  68. package/lib/module/components/buttons/IconButton.js.map +1 -1
  69. package/lib/module/components/buttons/IconButtonContained.js +11 -11
  70. package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
  71. package/lib/module/components/buttons/IconButtonSolid.js +31 -31
  72. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
  73. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
  74. package/lib/module/components/icons/Icon.js +2 -2
  75. package/lib/module/components/icons/Icon.js.map +1 -1
  76. package/lib/module/components/icons/README.md +1 -1
  77. package/lib/module/components/icons/svg/IconProductIOAppBlueBg.js +9 -21
  78. package/lib/module/components/icons/svg/IconProductIOAppBlueBg.js.map +1 -1
  79. package/lib/module/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
  80. package/lib/module/components/layout/HeaderFirstLevel.js +2 -2
  81. package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
  82. package/lib/module/components/listitems/ListItemInfo.js +1 -1
  83. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  84. package/lib/module/components/listitems/ListItemInfoCopy.js +1 -1
  85. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  86. package/lib/module/components/listitems/ListItemNav.js +4 -3
  87. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  88. package/lib/module/components/listitems/ListItemNavAlert.js +1 -1
  89. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  90. package/lib/module/components/listitems/ListItemTransaction.js +1 -1
  91. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  92. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +2 -2
  93. package/lib/module/components/numberpad/NumberButton.js +1 -1
  94. package/lib/module/components/pictograms/Pictogram.js +0 -20
  95. package/lib/module/components/pictograms/Pictogram.js.map +1 -1
  96. package/lib/module/components/spacer/Spacer.js +1 -1
  97. package/lib/module/components/spacer/Spacer.js.map +1 -1
  98. package/lib/module/components/stepper/Stepper.js +1 -1
  99. package/lib/module/components/switch/NativeSwitch.js +2 -2
  100. package/lib/module/components/switch/NativeSwitch.js.map +1 -1
  101. package/lib/module/components/tabs/TabItem.js +3 -3
  102. package/lib/module/components/tabs/TabItem.js.map +1 -1
  103. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +4 -4
  104. package/lib/module/components/typography/__test__/typography.test.js +13 -13
  105. package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
  106. package/lib/module/core/IOColors.js +31 -99
  107. package/lib/module/core/IOColors.js.map +1 -1
  108. package/lib/module/core/IOStyles.js +2 -2
  109. package/lib/typescript/components/buttons/ButtonLink.d.ts +1 -1
  110. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  111. package/lib/typescript/components/buttons/ButtonOutline.d.ts +2 -2
  112. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  113. package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
  114. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  115. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  116. package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
  117. package/lib/typescript/components/icons/svg/IconProductIOAppBlueBg.d.ts.map +1 -1
  118. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts +2 -2
  119. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
  120. package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
  121. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
  122. package/lib/typescript/components/pictograms/Pictogram.d.ts +2 -11
  123. package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
  124. package/lib/typescript/components/pictograms/types.d.ts +0 -1
  125. package/lib/typescript/components/pictograms/types.d.ts.map +1 -1
  126. package/lib/typescript/components/typography/BodyMonospace.d.ts +1 -1
  127. package/lib/typescript/components/typography/ButtonText.d.ts +1 -1
  128. package/lib/typescript/components/typography/Caption.d.ts +1 -1
  129. package/lib/typescript/components/typography/H1.d.ts +1 -1
  130. package/lib/typescript/components/typography/H2.d.ts +1 -1
  131. package/lib/typescript/components/typography/H3.d.ts +1 -1
  132. package/lib/typescript/components/typography/H4.d.ts +1 -1
  133. package/lib/typescript/components/typography/H5.d.ts +1 -1
  134. package/lib/typescript/components/typography/H6.d.ts +1 -1
  135. package/lib/typescript/components/typography/Hero.d.ts +1 -1
  136. package/lib/typescript/components/typography/markdown/MdH1.d.ts +1 -1
  137. package/lib/typescript/components/typography/markdown/MdH2.d.ts +1 -1
  138. package/lib/typescript/components/typography/markdown/MdH3.d.ts +1 -1
  139. package/lib/typescript/core/IOColors.d.ts +5 -35
  140. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  141. package/lib/typescript/core/IOStyles.d.ts +2 -2
  142. package/lib/typescript/utils/fonts.d.ts +1 -1
  143. package/package.json +1 -1
  144. package/src/components/Advice/Advice.tsx +1 -1
  145. package/src/components/accordion/AccordionItem.tsx +1 -1
  146. package/src/components/accordion/RawAccordion.tsx +1 -1
  147. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +0 -4
  148. package/src/components/buttons/ButtonLink.tsx +38 -31
  149. package/src/components/buttons/ButtonOutline.tsx +55 -112
  150. package/src/components/buttons/ButtonSolid.tsx +95 -79
  151. package/src/components/buttons/IconButton.tsx +39 -32
  152. package/src/components/buttons/IconButtonContained.tsx +11 -11
  153. package/src/components/buttons/IconButtonSolid.tsx +38 -34
  154. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +5 -7
  155. package/src/components/icons/Icon.tsx +2 -2
  156. package/src/components/icons/README.md +1 -1
  157. package/src/components/icons/svg/IconProductIOAppBlueBg.tsx +12 -13
  158. package/src/components/icons/svg/originals/IconProductIOAppBlueBg.svg +12 -9
  159. package/src/components/layout/HeaderFirstLevel.tsx +4 -4
  160. package/src/components/listitems/ListItemInfo.tsx +1 -1
  161. package/src/components/listitems/ListItemInfoCopy.tsx +1 -1
  162. package/src/components/listitems/ListItemNav.tsx +5 -4
  163. package/src/components/listitems/ListItemNavAlert.tsx +3 -1
  164. package/src/components/listitems/ListItemTransaction.tsx +1 -1
  165. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +2 -2
  166. package/src/components/numberpad/NumberButton.tsx +1 -1
  167. package/src/components/pictograms/Pictogram.tsx +0 -22
  168. package/src/components/pictograms/types.ts +0 -1
  169. package/src/components/spacer/Spacer.tsx +1 -1
  170. package/src/components/stepper/Stepper.tsx +1 -1
  171. package/src/components/switch/NativeSwitch.tsx +2 -2
  172. package/src/components/tabs/TabItem.tsx +3 -3
  173. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +4 -4
  174. package/src/components/typography/__test__/typography.test.tsx +18 -16
  175. package/src/core/IOColors.ts +39 -98
  176. package/src/core/IOStyles.ts +2 -2
  177. package/lib/commonjs/components/layout/BlockButtons.js +0 -85
  178. package/lib/commonjs/components/layout/BlockButtons.js.map +0 -1
  179. package/lib/commonjs/components/pictograms/svg/PictogramCompleted.js +0 -33
  180. package/lib/commonjs/components/pictograms/svg/PictogramCompleted.js.map +0 -1
  181. package/lib/commonjs/components/pictograms/svg/PictogramProcessing.js +0 -33
  182. package/lib/commonjs/components/pictograms/svg/PictogramProcessing.js.map +0 -1
  183. package/lib/commonjs/components/pictograms/svg/originals/PictogramCompleted.svg +0 -14
  184. package/lib/module/components/layout/BlockButtons.js +0 -76
  185. package/lib/module/components/layout/BlockButtons.js.map +0 -1
  186. package/lib/module/components/pictograms/svg/PictogramCompleted.js +0 -25
  187. package/lib/module/components/pictograms/svg/PictogramCompleted.js.map +0 -1
  188. package/lib/module/components/pictograms/svg/PictogramProcessing.js +0 -25
  189. package/lib/module/components/pictograms/svg/PictogramProcessing.js.map +0 -1
  190. package/lib/module/components/pictograms/svg/originals/PictogramCompleted.svg +0 -14
  191. package/lib/typescript/components/layout/BlockButtons.d.ts +0 -54
  192. package/lib/typescript/components/layout/BlockButtons.d.ts.map +0 -1
  193. package/lib/typescript/components/pictograms/svg/PictogramCompleted.d.ts +0 -5
  194. package/lib/typescript/components/pictograms/svg/PictogramCompleted.d.ts.map +0 -1
  195. package/lib/typescript/components/pictograms/svg/PictogramProcessing.d.ts +0 -5
  196. package/lib/typescript/components/pictograms/svg/PictogramProcessing.d.ts.map +0 -1
  197. package/src/components/layout/BlockButtons.tsx +0 -143
  198. package/src/components/pictograms/svg/PictogramCompleted.tsx +0 -22
  199. package/src/components/pictograms/svg/PictogramProcessing.tsx +0 -22
  200. package/src/components/pictograms/svg/originals/PictogramCompleted.svg +0 -14
@@ -64,13 +64,13 @@ const mapColorStates: Record<
64
64
  neutral: {
65
65
  background: {
66
66
  default: IOColors.white,
67
- pressed: IOColors.greyUltraLight,
67
+ pressed: IOColors["grey-50"],
68
68
  disabled: "transparent"
69
69
  },
70
70
  icon: {
71
- default: IOColors.bluegrey,
71
+ default: IOColors["grey-700"],
72
72
  pressed: IOColors.black,
73
- disabled: IOColors.grey
73
+ disabled: IOColors["grey-450"]
74
74
  }
75
75
  },
76
76
  // Contrast button
@@ -95,27 +95,27 @@ const mapLegacyColorStates: Record<
95
95
  // Primary button
96
96
  primary: {
97
97
  background: {
98
- default: hexToRgba(IOColors.blue, 0),
99
- pressed: hexToRgba(IOColors.blue, 0.15),
98
+ default: hexToRgba(IOColors["blue-500"], 0),
99
+ pressed: hexToRgba(IOColors["blue-500"], 0.15),
100
100
  disabled: "transparent"
101
101
  },
102
102
  icon: {
103
- default: IOColors.blue,
104
- pressed: IOColors.blue,
105
- disabled: hexToRgba(IOColors.blue, 0.25)
103
+ default: IOColors["blue-500"],
104
+ pressed: IOColors["blue-500"],
105
+ disabled: hexToRgba(IOColors["blue-500"], 0.25)
106
106
  }
107
107
  },
108
108
  // Neutral button
109
109
  neutral: {
110
110
  background: {
111
111
  default: IOColors.white,
112
- pressed: IOColors.greyUltraLight,
112
+ pressed: IOColors["grey-50"],
113
113
  disabled: "transparent"
114
114
  },
115
115
  icon: {
116
- default: IOColors.bluegrey,
116
+ default: IOColors["grey-700"],
117
117
  pressed: IOColors.black,
118
- disabled: IOColors.grey
118
+ disabled: IOColors["grey-450"]
119
119
  }
120
120
  },
121
121
  // Contrast button
@@ -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"]>,
@@ -73,7 +45,7 @@ const mapLegacyColorStates: Record<
73
45
  // Primary button
74
46
  primary: {
75
47
  background: {
76
- default: IOColors.blue,
48
+ default: IOColors["blue-500"],
77
49
  pressed: IOColors["blue-600"],
78
50
  disabled: IOColors["grey-100"]
79
51
  },
@@ -89,8 +61,8 @@ const mapLegacyColorStates: Record<
89
61
  disabled: hexToRgba(IOColors.white, 0.25)
90
62
  },
91
63
  icon: {
92
- default: IOColors.blue,
93
- disabled: IOColors.blue
64
+ default: IOColors["blue-500"],
65
+ disabled: IOColors["blue-500"]
94
66
  }
95
67
  }
96
68
  };
@@ -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
  {
@@ -427,7 +427,7 @@ change its color values. It accepts `IOColors` values only.
427
427
  */
428
428
  export const Icon = ({
429
429
  name,
430
- color = "bluegrey",
430
+ color = "grey-700",
431
431
  size = 24,
432
432
  accessible = false,
433
433
  accessibilityLabel = "",
@@ -471,7 +471,7 @@ type IOAnimatedIconsProps = {
471
471
 
472
472
  export const AnimatedIcon = ({
473
473
  name,
474
- color = IOColors.bluegrey,
474
+ color = IOColors["grey-700"],
475
475
  size = 24,
476
476
  accessible = false,
477
477
  allowFontScaling = false,
@@ -105,7 +105,7 @@ export const IONavIcons = {
105
105
  You can add the recently added icon with the following declaration:
106
106
  ```jsx
107
107
  // Default size: 24×24px
108
- // Default color: Bluegrey
108
+ // Default color: Grey-700
109
109
  <Icon name="spid">
110
110
  ```
111
111
 
@@ -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
@@ -71,7 +71,9 @@ export const ListItemNavAlert = ({
71
71
  </>
72
72
  );
73
73
 
74
- const iconColor = isExperimental ? theme["interactiveElem-default"] : "blue";
74
+ const iconColor = isExperimental
75
+ ? theme["interactiveElem-default"]
76
+ : "blue-500";
75
77
 
76
78
  return (
77
79
  <Pressable
@@ -123,7 +123,7 @@ export const ListItemTransaction = ({
123
123
 
124
124
  const interactiveColor: IOColors = isExperimental
125
125
  ? theme["interactiveElem-default"]
126
- : "blue";
126
+ : "blue-500";
127
127
 
128
128
  const amountColorDefault: IOColors = theme["textBody-default"];
129
129
  const amountColorRefund: IOColors = theme.successText;
@@ -2800,7 +2800,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 1`] = `
2800
2800
  "width": 24,
2801
2801
  },
2802
2802
  {
2803
- "borderColor": "#475A6D",
2803
+ "borderColor": "#555C70",
2804
2804
  },
2805
2805
  ]
2806
2806
  }
@@ -3085,7 +3085,7 @@ exports[`Test List Item Components ListItemRadioWithAmount Snapshot 2`] = `
3085
3085
  "width": 24,
3086
3086
  },
3087
3087
  {
3088
- "borderColor": "#475A6D",
3088
+ "borderColor": "#555C70",
3089
3089
  },
3090
3090
  ]
3091
3091
  }
@@ -56,7 +56,7 @@ const legacyColorMap: Record<NumberButtonVariantType, ColorMapVariant> = {
56
56
  light: {
57
57
  background: IOColors["grey-100"],
58
58
  pressed: IOColors["grey-200"],
59
- foreground: "blue"
59
+ foreground: "blue-500"
60
60
  },
61
61
  dark: {
62
62
  background: hexToRgba(IOColors.black, 0.1),
@@ -12,7 +12,6 @@ import PictogramCameraDenied from "./svg/PictogramCameraDenied";
12
12
  import PictogramCameraRequest from "./svg/PictogramCameraRequest";
13
13
  import PictogramCharity from "./svg/PictogramCharity";
14
14
  import PictogramCie from "./svg/PictogramCie";
15
- import PictogramCompleted from "./svg/PictogramCompleted";
16
15
  import PictogramComunicationProblem from "./svg/PictogramComunicationProblem";
17
16
  import PictogramEmpty from "./svg/PictogramEmpty";
18
17
  import PictogramEmptyArchive from "./svg/PictogramEmptyArchive";
@@ -36,7 +35,6 @@ import PictogramObjManual from "./svg/PictogramObjManual";
36
35
  import PictogramObjTrash from "./svg/PictogramObjTrash";
37
36
  import PictogramPasscode from "./svg/PictogramPasscode";
38
37
  import PictogramPayments from "./svg/PictogramPayments";
39
- import PictogramProcessing from "./svg/PictogramProcessing";
40
38
  import PictogramSecurity from "./svg/PictogramSecurity";
41
39
  import PictogramStopSecurity from "./svg/PictogramStopSecurity";
42
40
  import PictogramSuccess from "./svg/PictogramSuccess";
@@ -117,10 +115,6 @@ import PictogramWalletDoc from "./svg/PictogramWalletDoc";
117
115
  import { SVGPictogramProps } from "./types";
118
116
 
119
117
  export const IOPictograms = {
120
- // Start legacy pictograms //
121
- processing: PictogramProcessing,
122
- completed: PictogramCompleted,
123
- // End legacy pictograms
124
118
  empty: PictogramEmpty,
125
119
  feature: PictogramFeature,
126
120
  charity: PictogramCharity,
@@ -197,7 +191,6 @@ export type IOPictogramSizeScale = 48 | 64 | 72 | 80 | 120 | 180;
197
191
 
198
192
  type IOPictogramsProps = {
199
193
  name: IOPictograms;
200
- color?: IOColors;
201
194
  /* Not too happy about the API choice,
202
195
  but at least we have the same <StatusBar …>
203
196
  component props. */
@@ -215,7 +208,6 @@ type PictogramPalette = {
215
208
 
216
209
  export const Pictogram = ({
217
210
  name,
218
- color = "aqua",
219
211
  pictogramStyle = "default",
220
212
  size = 120,
221
213
  allowFontScaling = false,
@@ -256,7 +248,6 @@ export const Pictogram = ({
256
248
  <PictogramElement
257
249
  {...props}
258
250
  size={pictogramSize}
259
- color={IOColors[color]}
260
251
  colorValues={colorValues}
261
252
  />
262
253
  );
@@ -365,7 +356,6 @@ export const IOPictogramsBleed: {
365
356
 
366
357
  export const PictogramBleed = ({
367
358
  name,
368
- color = "aqua",
369
359
  size = 80,
370
360
  pictogramStyle = "default",
371
361
  allowFontScaling = false,
@@ -406,7 +396,6 @@ export const PictogramBleed = ({
406
396
  <PictogramElement
407
397
  {...props}
408
398
  size={pictogramSize}
409
- color={IOColors[color]}
410
399
  colorValues={colorValues}
411
400
  />
412
401
  );
@@ -428,14 +417,3 @@ export const IOPictogramsObject = {
428
417
  } as const;
429
418
 
430
419
  export type IOPictogramsObject = keyof typeof IOPictogramsObject;
431
-
432
- /* Legacy pictograms */
433
-
434
- const { processing, completed } = IOPictograms;
435
-
436
- export const IOPictogramsLegacy = {
437
- processing,
438
- completed
439
- } as const;
440
-
441
- export type IOPictogramsLegacy = keyof typeof IOPictogramsLegacy;
@@ -2,6 +2,5 @@ import { ColorValue } from "react-native";
2
2
 
3
3
  export type SVGPictogramProps = {
4
4
  size: number | "100%";
5
- color: ColorValue;
6
5
  colorValues: Record<string, ColorValue>;
7
6
  };
@@ -18,7 +18,7 @@ const DEFAULT_SIZE: IOSpacer = 16;
18
18
 
19
19
  /* Debug Mode */
20
20
  const debugMode = false;
21
- const debugBg = hexToRgba(IOColors.red, 0.2);
21
+ const debugBg = hexToRgba(IOColors["error-600"], 0.2);
22
22
 
23
23
  /**
24
24
  Native `Spacer` component
@@ -21,7 +21,7 @@ const colorMap: Record<string, IOColors> = {
21
21
  };
22
22
 
23
23
  const legacyColorMap: Record<string, IOColors> = {
24
- active: "blue"
24
+ active: "blue-500"
25
25
  };
26
26
 
27
27
  export const Stepper = ({ steps, currentStep }: StepperProps) => {
@@ -18,7 +18,7 @@ type OwnProps = Pick<
18
18
 
19
19
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
20
20
  const bgLegacyTrackColorAndroid =
21
- Platform.OS === "android" ? IOColors["grey-300"] : IOColors.greyUltraLight;
21
+ Platform.OS === "android" ? IOColors["grey-300"] : IOColors["grey-50"];
22
22
 
23
23
  export const NativeSwitch = ({
24
24
  onValueChange,
@@ -34,7 +34,7 @@ export const NativeSwitch = ({
34
34
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
35
35
  const legacyTrackColor = {
36
36
  false: bgLegacyTrackColorAndroid,
37
- true: IOColors.blue
37
+ true: IOColors["blue-500"]
38
38
  };
39
39
 
40
40
  const trackColorComponent = isExperimental ? trackColor : legacyTrackColor;
@@ -100,17 +100,17 @@ const mapLegacyColorStates: Record<
100
100
  light: {
101
101
  border: {
102
102
  default: IOColors["grey-300"],
103
- selected: IOColors.blue,
103
+ selected: IOColors["blue-500"],
104
104
  disabled: hexToRgba(IOColors.white)
105
105
  },
106
106
  background: {
107
107
  default: IOColors.white,
108
- selected: hexToRgba(IOColors.blue, 0.1),
108
+ selected: hexToRgba(IOColors["blue-500"], 0.1),
109
109
  pressed: IOColors.white
110
110
  },
111
111
  foreground: {
112
112
  default: "black",
113
- selected: "blue",
113
+ selected: "blue-500",
114
114
  disabled: "grey-700"
115
115
  }
116
116
  },
@@ -103,7 +103,7 @@ exports[`Test Typography Components BodySmall Snapshot 3`] = `
103
103
  [
104
104
  {},
105
105
  {
106
- "color": "#475A6D",
106
+ "color": "#555C70",
107
107
  "fontFamily": "Titillium Sans Pro",
108
108
  "fontSize": 14,
109
109
  "fontStyle": "normal",
@@ -126,7 +126,7 @@ exports[`Test Typography Components BodySmall Snapshot 4`] = `
126
126
  [
127
127
  {},
128
128
  {
129
- "color": "#C02927",
129
+ "color": "#D13333",
130
130
  "fontFamily": "Titillium Sans Pro",
131
131
  "fontSize": 14,
132
132
  "fontStyle": "normal",
@@ -286,7 +286,7 @@ exports[`Test Typography Components H3 Snapshot 2`] = `
286
286
  [
287
287
  {},
288
288
  {
289
- "color": "#CCD4DC",
289
+ "color": "#D2D6E3",
290
290
  "fontFamily": "Titillium Sans Pro",
291
291
  "fontSize": 22,
292
292
  "fontStyle": "normal",
@@ -476,7 +476,7 @@ exports[`Test Typography Components H5 Snapshot 2`] = `
476
476
  "textTransform": "uppercase",
477
477
  },
478
478
  {
479
- "color": "#475A6D",
479
+ "color": "#555C70",
480
480
  "fontFamily": "Titillium Sans Pro",
481
481
  "fontSize": 14,
482
482
  "fontStyle": "normal",