@pagopa/io-app-design-system 4.0.0 → 4.0.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 (59) hide show
  1. package/lib/commonjs/components/badge/Badge.js +95 -14
  2. package/lib/commonjs/components/badge/Badge.js.map +1 -1
  3. package/lib/commonjs/components/modules/ModuleCredential.js +35 -28
  4. package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
  5. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +1 -1
  6. package/lib/commonjs/components/stack/Stack.js +2 -2
  7. package/lib/commonjs/components/stack/Stack.js.map +1 -1
  8. package/lib/commonjs/components/tag/Tag.js +40 -26
  9. package/lib/commonjs/components/tag/Tag.js.map +1 -1
  10. package/lib/commonjs/components/typography/IOText.js.map +1 -1
  11. package/lib/commonjs/core/IOColors.js +9 -1
  12. package/lib/commonjs/core/IOColors.js.map +1 -1
  13. package/lib/commonjs/utils/fonts.js.map +1 -1
  14. package/lib/module/components/badge/Badge.js +96 -15
  15. package/lib/module/components/badge/Badge.js.map +1 -1
  16. package/lib/module/components/modules/ModuleCredential.js +36 -29
  17. package/lib/module/components/modules/ModuleCredential.js.map +1 -1
  18. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +1 -1
  19. package/lib/module/components/stack/Stack.js +2 -2
  20. package/lib/module/components/stack/Stack.js.map +1 -1
  21. package/lib/module/components/tag/Tag.js +41 -27
  22. package/lib/module/components/tag/Tag.js.map +1 -1
  23. package/lib/module/components/typography/IOText.js.map +1 -1
  24. package/lib/module/core/IOColors.js +9 -1
  25. package/lib/module/core/IOColors.js.map +1 -1
  26. package/lib/module/utils/fonts.js.map +1 -1
  27. package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
  28. package/lib/typescript/components/modules/ModuleCredential.d.ts +2 -2
  29. package/lib/typescript/components/modules/ModuleCredential.d.ts.map +1 -1
  30. package/lib/typescript/components/tag/Tag.d.ts +13 -8
  31. package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
  32. package/lib/typescript/components/typography/BodyMonospace.d.ts +1 -1
  33. package/lib/typescript/components/typography/ButtonText.d.ts +1 -1
  34. package/lib/typescript/components/typography/Caption.d.ts +1 -1
  35. package/lib/typescript/components/typography/H1.d.ts +1 -1
  36. package/lib/typescript/components/typography/H2.d.ts +1 -1
  37. package/lib/typescript/components/typography/H3.d.ts +1 -1
  38. package/lib/typescript/components/typography/H4.d.ts +1 -1
  39. package/lib/typescript/components/typography/H5.d.ts +1 -1
  40. package/lib/typescript/components/typography/H6.d.ts +1 -1
  41. package/lib/typescript/components/typography/Hero.d.ts +1 -1
  42. package/lib/typescript/components/typography/IOText.d.ts +2 -2
  43. package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
  44. package/lib/typescript/components/typography/markdown/MdH1.d.ts +1 -1
  45. package/lib/typescript/components/typography/markdown/MdH2.d.ts +1 -1
  46. package/lib/typescript/components/typography/markdown/MdH3.d.ts +1 -1
  47. package/lib/typescript/core/IOColors.d.ts +2 -1
  48. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  49. package/lib/typescript/utils/fonts.d.ts +3 -3
  50. package/lib/typescript/utils/fonts.d.ts.map +1 -1
  51. package/package.json +1 -1
  52. package/src/components/badge/Badge.tsx +109 -19
  53. package/src/components/modules/ModuleCredential.tsx +49 -39
  54. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +1 -1
  55. package/src/components/stack/Stack.tsx +2 -2
  56. package/src/components/tag/Tag.tsx +66 -33
  57. package/src/components/typography/IOText.tsx +1 -2
  58. package/src/core/IOColors.ts +11 -0
  59. package/src/utils/fonts.ts +2 -2
@@ -1,12 +1,14 @@
1
1
  import React from "react";
2
- import { Platform, StyleSheet, View } from "react-native";
2
+ import { ColorValue, Platform, StyleSheet, View } from "react-native";
3
3
  import {
4
+ hexToRgba,
4
5
  IOBadgeHSpacing,
5
6
  IOBadgeRadius,
6
7
  IOBadgeVSpacing,
7
8
  IOColors,
8
9
  useIOExperimentalDesign,
9
- useIOTheme
10
+ useIOTheme,
11
+ useIOThemeContext
10
12
  } from "../../core";
11
13
  import { WithTestID } from "../../utils/types";
12
14
  import { IOText } from "../typography";
@@ -28,7 +30,7 @@ export type Badge = WithTestID<{
28
30
  }>;
29
31
 
30
32
  type SolidVariantProps = {
31
- background: IOColors;
33
+ background: ColorValue;
32
34
  foreground: IOColors;
33
35
  };
34
36
 
@@ -60,54 +62,103 @@ const styles = StyleSheet.create({
60
62
  export const Badge = ({ text, outline = false, variant, testID }: Badge) => {
61
63
  const { isExperimental } = useIOExperimentalDesign();
62
64
  const theme = useIOTheme();
65
+ const { themeType } = useIOThemeContext();
63
66
 
64
- const mapVariants: Record<
67
+ const bgOpacityDarkMode = 0.2;
68
+
69
+ const mapVariantsLightMode: Record<
65
70
  NonNullable<Badge["variant"]>,
66
71
  SolidVariantProps
67
72
  > = {
68
73
  default: {
69
74
  foreground: "grey-700",
70
- background: "grey-50"
75
+ background: IOColors["grey-50"]
71
76
  },
72
77
  info: {
73
78
  foreground: "info-850",
74
- background: "info-100"
79
+ background: IOColors["info-100"]
75
80
  },
76
81
  warning: {
77
82
  foreground: "warning-850",
78
- background: "warning-100"
83
+ background: IOColors["warning-100"]
79
84
  },
80
85
  success: {
81
86
  foreground: "success-850",
82
- background: "success-100"
87
+ background: IOColors["success-100"]
83
88
  },
84
89
  error: {
85
90
  foreground: "error-850",
86
- background: "error-100"
91
+ background: IOColors["error-100"]
87
92
  },
88
93
  purple: {
89
94
  foreground: "hanPurple-500",
90
- background: "hanPurple-100"
95
+ background: IOColors["hanPurple-100"]
91
96
  },
92
97
  lightBlue: {
93
98
  foreground: "blueIO-850",
94
- background: "blueIO-50"
99
+ background: IOColors["blueIO-50"]
95
100
  },
96
101
  blue: {
97
102
  foreground: "white",
98
- background: theme["interactiveElem-default"]
103
+ background: IOColors[theme["interactiveElem-default"]]
99
104
  },
100
105
  turquoise: {
101
106
  foreground: "turquoise-850",
102
- background: "turquoise-50"
107
+ background: IOColors["turquoise-50"]
108
+ },
109
+ contrast: {
110
+ foreground: "grey-700",
111
+ background: IOColors.white
112
+ }
113
+ };
114
+
115
+ const mapVariantsDarkMode: Record<
116
+ NonNullable<Badge["variant"]>,
117
+ SolidVariantProps
118
+ > = {
119
+ default: {
120
+ foreground: "grey-50",
121
+ background: hexToRgba(IOColors["grey-50"], bgOpacityDarkMode)
122
+ },
123
+ info: {
124
+ foreground: "info-400",
125
+ background: hexToRgba(IOColors["info-400"], bgOpacityDarkMode)
126
+ },
127
+ warning: {
128
+ foreground: "warning-400",
129
+ background: hexToRgba(IOColors["warning-400"], bgOpacityDarkMode)
130
+ },
131
+ success: {
132
+ foreground: "success-400",
133
+ background: hexToRgba(IOColors["success-400"], bgOpacityDarkMode)
134
+ },
135
+ error: {
136
+ foreground: "error-400",
137
+ background: hexToRgba(IOColors["error-400"], bgOpacityDarkMode)
138
+ },
139
+ purple: {
140
+ foreground: "hanPurple-250",
141
+ background: hexToRgba(IOColors["hanPurple-250"], bgOpacityDarkMode)
142
+ },
143
+ lightBlue: {
144
+ foreground: "blueIO-200",
145
+ background: hexToRgba(IOColors["blueIO-600"], bgOpacityDarkMode)
146
+ },
147
+ blue: {
148
+ foreground: "white",
149
+ background: IOColors[theme["interactiveElem-default"]]
150
+ },
151
+ turquoise: {
152
+ foreground: "turquoise-300",
153
+ background: hexToRgba(IOColors["turquoise-300"], bgOpacityDarkMode)
103
154
  },
104
155
  contrast: {
105
156
  foreground: "grey-700",
106
- background: "white"
157
+ background: IOColors.white
107
158
  }
108
159
  };
109
160
 
110
- const mapOutlineVariants: Record<
161
+ const mapOutlineVariantsLightMode: Record<
111
162
  NonNullable<Badge["variant"]>,
112
163
  OutlinedVariantProps
113
164
  > = {
@@ -143,9 +194,48 @@ export const Badge = ({ text, outline = false, variant, testID }: Badge) => {
143
194
  }
144
195
  };
145
196
 
146
- const { background, foreground } = (
147
- outline ? mapOutlineVariants : mapVariants
148
- )[variant];
197
+ const mapOutlineVariantsDarkMode: Record<
198
+ NonNullable<Badge["variant"]>,
199
+ OutlinedVariantProps
200
+ > = {
201
+ default: {
202
+ foreground: "grey-100"
203
+ },
204
+ info: {
205
+ foreground: "info-400"
206
+ },
207
+ warning: {
208
+ foreground: "warning-400"
209
+ },
210
+ success: {
211
+ foreground: "success-400"
212
+ },
213
+ error: {
214
+ foreground: "error-400"
215
+ },
216
+ purple: {
217
+ foreground: "hanPurple-250"
218
+ },
219
+ lightBlue: {
220
+ foreground: "blueIO-150"
221
+ },
222
+ blue: {
223
+ foreground: theme["interactiveElem-default"]
224
+ },
225
+ turquoise: {
226
+ foreground: "turquoise-300"
227
+ },
228
+ contrast: {
229
+ foreground: "grey-100"
230
+ }
231
+ };
232
+
233
+ // prettier-ignore
234
+ const variantMap = themeType === "light"
235
+ ? (outline ? mapOutlineVariantsLightMode : mapVariantsLightMode)
236
+ : (outline ? mapOutlineVariantsDarkMode : mapVariantsDarkMode);
237
+
238
+ const { background, foreground } = variantMap[variant];
149
239
 
150
240
  return (
151
241
  <View
@@ -159,7 +249,7 @@ export const Badge = ({ text, outline = false, variant, testID }: Badge) => {
159
249
  borderColor: IOColors[foreground]
160
250
  }
161
251
  : {
162
- backgroundColor: background ? IOColors[background] : undefined
252
+ backgroundColor: background ?? undefined
163
253
  }
164
254
  ]}
165
255
  >
@@ -3,15 +3,13 @@ import {
3
3
  Image,
4
4
  ImageSourcePropType,
5
5
  ImageURISource,
6
- StyleSheet,
7
- View
6
+ StyleSheet
8
7
  } from "react-native";
9
8
  import Placeholder from "rn-placeholder";
10
9
  import {
11
10
  IOListItemVisualParams,
12
11
  IOSelectionListItemVisualParams,
13
12
  IOSpacer,
14
- IOStyles,
15
13
  IOVisualCostants,
16
14
  useIOTheme
17
15
  } from "../../core";
@@ -43,26 +41,28 @@ type BaseModuleProps = {
43
41
  };
44
42
 
45
43
  type ModuleCredentialProps =
46
- | LoadingModuleProps
47
- | (BaseModuleProps & ImageProps & PressableModuleBaseProps);
44
+ | BaseModuleProps & ImageProps & PressableModuleBaseProps;
48
45
 
49
- const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
50
- const theme = useIOTheme();
51
-
52
- if (props.isLoading) {
53
- return <ModuleCredentialSkeleton />;
54
- }
46
+ const ModuleCredential = (
47
+ props: WithTestID<LoadingModuleProps | ModuleCredentialProps>
48
+ ) =>
49
+ props.isLoading ? (
50
+ <ModuleCredentialSkeleton />
51
+ ) : (
52
+ <ModuleCredentialContent {...props} />
53
+ );
55
54
 
56
- const {
57
- testID,
58
- icon,
59
- image,
60
- label,
61
- onPress,
62
- badge,
63
- isFetching,
64
- ...pressableProps
65
- } = props;
55
+ const ModuleCredentialContent = ({
56
+ testID,
57
+ icon,
58
+ image,
59
+ label,
60
+ onPress,
61
+ badge,
62
+ isFetching,
63
+ ...pressableProps
64
+ }: WithTestID<ModuleCredentialProps>) => {
65
+ const theme = useIOTheme();
66
66
 
67
67
  const iconComponent = icon && (
68
68
  <Icon
@@ -80,6 +80,33 @@ const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
80
80
  />
81
81
  );
82
82
 
83
+ const endComponent = React.useMemo(() => {
84
+ if (isFetching) {
85
+ return (
86
+ <LoadingSpinner
87
+ testID={testID ? `${testID}_activityIndicator` : undefined}
88
+ color={theme["interactiveElem-default"]}
89
+ />
90
+ );
91
+ }
92
+ if (badge) {
93
+ return (
94
+ <Badge {...badge} testID={testID ? `${testID}_badge` : undefined} />
95
+ );
96
+ }
97
+ if (onPress) {
98
+ return (
99
+ <Icon
100
+ testID={testID ? `${testID}_icon` : undefined}
101
+ name="chevronRightListItem"
102
+ color={theme["interactiveElem-default"]}
103
+ size={IOListItemVisualParams.chevronSize}
104
+ />
105
+ );
106
+ }
107
+ return null;
108
+ }, [testID, theme, isFetching, badge, onPress]);
109
+
83
110
  const ModuleContent = () => (
84
111
  <HStack space={8} style={{ alignItems: "center" }}>
85
112
  <HStack
@@ -99,24 +126,7 @@ const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
99
126
  {label}
100
127
  </BodySmall>
101
128
  </HStack>
102
- <View style={IOStyles.row}>
103
- {badge ? (
104
- <Badge {...badge} testID={testID ? `${testID}_badge` : undefined} />
105
- ) : null}
106
- {isFetching ? (
107
- <LoadingSpinner
108
- testID={testID ? `${testID}_activityIndicator` : undefined}
109
- color={theme["interactiveElem-default"]}
110
- />
111
- ) : onPress ? (
112
- <Icon
113
- testID={testID ? `${testID}_icon` : undefined}
114
- name="chevronRightListItem"
115
- color={theme["interactiveElem-default"]}
116
- size={IOListItemVisualParams.chevronSize}
117
- />
118
- ) : null}
119
- </View>
129
+ {endComponent}
120
130
  </HStack>
121
131
  );
122
132
 
@@ -13,7 +13,7 @@ exports[`NumberPad Should match the snapshot 1`] = `
13
13
  {
14
14
  "display": "flex",
15
15
  "flexDirection": "column",
16
- "rowGap": 16,
16
+ "gap": 16,
17
17
  }
18
18
  }
19
19
  >
@@ -22,7 +22,7 @@ export const HStack = ({ space, children, style }: Stack) => (
22
22
  style={{
23
23
  display: "flex",
24
24
  flexDirection: "row",
25
- columnGap: space,
25
+ gap: space,
26
26
  ...style
27
27
  }}
28
28
  >
@@ -40,7 +40,7 @@ export const VStack = ({ space, children, style }: Stack) => (
40
40
  style={{
41
41
  display: "flex",
42
42
  flexDirection: "column",
43
- rowGap: space,
43
+ gap: space,
44
44
  ...style
45
45
  }}
46
46
  >
@@ -3,6 +3,8 @@ import { Platform, StyleSheet, View } from "react-native";
3
3
  import {
4
4
  IOColors,
5
5
  IOTagRadius,
6
+ IOTheme,
7
+ IOThemeLight,
6
8
  useIOExperimentalDesign,
7
9
  useIOTheme
8
10
  } from "../../core";
@@ -15,9 +17,21 @@ import { WithTestID } from "../../utils/types";
15
17
  import { IOIconSizeScale, IOIcons, Icon } from "../icons";
16
18
  import { IOText } from "../typography";
17
19
 
20
+ const IconColorsMap: Record<string, keyof IOTheme> = {
21
+ primary: "interactiveElem-default",
22
+ warning: "warningIcon",
23
+ error: "errorIcon",
24
+ success: "successIcon",
25
+ info: "infoIcon",
26
+ grey: "icon-default",
27
+ lightGrey: "icon-decorative"
28
+ };
29
+
30
+ type IconColorVariant = keyof typeof IconColorsMap;
31
+
18
32
  type VariantProps = {
19
- iconColor: IOColors;
20
- iconName: IOIcons;
33
+ color: IconColorVariant;
34
+ name: IOIcons;
21
35
  };
22
36
 
23
37
  type TextProps =
@@ -30,8 +44,7 @@ type TextProps =
30
44
  iconAccessibilityLabel: string;
31
45
  };
32
46
 
33
- export type Tag = TextProps &
34
- WithTestID<
47
+ export type Tag = TextProps & { forceLightMode?: boolean } & WithTestID<
35
48
  | {
36
49
  variant:
37
50
  | "qrCode"
@@ -42,11 +55,12 @@ export type Tag = TextProps &
42
55
  | "success"
43
56
  | "attachment"
44
57
  | "noIcon";
45
- customIconProps?: never;
58
+ iconName?: never;
59
+ icon?: never;
46
60
  }
47
61
  | {
48
- variant: "customIcon";
49
- customIconProps: VariantProps;
62
+ variant: "custom";
63
+ icon: VariantProps;
50
64
  }
51
65
  >;
52
66
 
@@ -64,9 +78,7 @@ const styles = StyleSheet.create({
64
78
  textAlignVertical: "center"
65
79
  }
66
80
  }),
67
- backgroundColor: IOColors.white,
68
81
  borderWidth: 1,
69
- borderColor: IOColors["grey-100"],
70
82
  borderRadius: IOTagRadius,
71
83
  borderCurve: "continuous",
72
84
  paddingHorizontal: IOTagHSpacing,
@@ -82,45 +94,46 @@ const styles = StyleSheet.create({
82
94
 
83
95
  const getVariantProps = (
84
96
  variant: NonNullable<Tag["variant"]>,
85
- customIconProps?: VariantProps
97
+ customIcon?: VariantProps
86
98
  ): VariantProps | undefined => {
99
+ if (variant === "custom" && customIcon) {
100
+ return customIcon;
101
+ }
87
102
  switch (variant) {
88
- case "customIcon":
89
- return customIconProps;
90
103
  case "qrCode":
91
104
  return {
92
- iconColor: "blueIO-500",
93
- iconName: "qrCode"
105
+ color: "primary",
106
+ name: "qrCode"
94
107
  };
95
108
  case "attachment":
96
109
  return {
97
- iconColor: "grey-700",
98
- iconName: "attachment"
110
+ color: "grey",
111
+ name: "attachment"
99
112
  };
100
113
  case "legalMessage":
101
114
  return {
102
- iconColor: "blueIO-500",
103
- iconName: "legalValue"
115
+ color: "primary",
116
+ name: "legalValue"
104
117
  };
105
118
  case "info":
106
119
  return {
107
- iconColor: "info-700",
108
- iconName: "info"
120
+ color: "info",
121
+ name: "infoFilled"
109
122
  };
110
123
  case "warning":
111
124
  return {
112
- iconColor: "warning-700",
113
- iconName: "warningFilled"
125
+ color: "warning",
126
+ name: "warningFilled"
114
127
  };
115
128
  case "error":
116
129
  return {
117
- iconColor: "error-600",
118
- iconName: "errorFilled"
130
+ color: "error",
131
+ name: "errorFilled"
119
132
  };
120
133
  case "success":
121
134
  return {
122
- iconColor: "success-700",
123
- iconName: "success"
135
+ color: "success",
136
+ name: "success"
124
137
  };
125
138
  case "noIcon":
126
139
  return undefined;
@@ -136,21 +149,37 @@ export const Tag = ({
136
149
  text,
137
150
  variant,
138
151
  testID,
139
- customIconProps,
140
- iconAccessibilityLabel
152
+ icon,
153
+ iconAccessibilityLabel,
154
+ forceLightMode = false
141
155
  }: Tag) => {
142
156
  const theme = useIOTheme();
143
157
  const { isExperimental } = useIOExperimentalDesign();
144
158
 
145
- const variantProps = getVariantProps(variant, customIconProps);
159
+ const variantProps = getVariantProps(variant, icon);
160
+
161
+ const borderColor = forceLightMode
162
+ ? IOColors[IOThemeLight["cardBorder-default"]]
163
+ : IOColors[theme["cardBorder-default"]];
164
+
165
+ const backgroundColor = forceLightMode
166
+ ? IOColors[IOThemeLight["appBackground-primary"]]
167
+ : IOColors[theme["appBackground-primary"]];
146
168
 
147
169
  return (
148
- <View testID={testID} style={styles.tag}>
170
+ <View
171
+ testID={testID}
172
+ style={[styles.tag, { borderColor, backgroundColor }]}
173
+ >
149
174
  {variantProps && (
150
175
  <View style={styles.iconWrapper}>
151
176
  <Icon
152
- name={variantProps.iconName}
153
- color={variantProps.iconColor}
177
+ name={variantProps.name}
178
+ color={
179
+ forceLightMode
180
+ ? IOThemeLight[IconColorsMap[variantProps.color]]
181
+ : theme[IconColorsMap[variantProps.color]]
182
+ }
154
183
  size={IOTagIconSize}
155
184
  accessible={!!iconAccessibilityLabel}
156
185
  accessibilityLabel={iconAccessibilityLabel}
@@ -164,7 +193,11 @@ export const Tag = ({
164
193
  weight={"Semibold"}
165
194
  size={12}
166
195
  lineHeight={16}
167
- color={theme["textBody-tertiary"]}
196
+ color={
197
+ forceLightMode
198
+ ? IOThemeLight["textBody-tertiary"]
199
+ : theme["textBody-tertiary"]
200
+ }
168
201
  numberOfLines={1}
169
202
  ellipsizeMode="tail"
170
203
  style={{
@@ -10,7 +10,6 @@ import { IOColors, useIOExperimentalDesign, useIOTheme } from "../../core";
10
10
  import { useBoldTextEnabled } from "../../utils/accessibility";
11
11
  import {
12
12
  IOFontFamily,
13
- IOFontSize,
14
13
  IOFontWeight,
15
14
  makeFontStyleObject
16
15
  } from "../../utils/fonts";
@@ -37,7 +36,7 @@ export type TypographicStyleProps = Omit<
37
36
  * cannot be included in the default StyleProp<TextStyle>
38
37
  */
39
38
  type IOTextBaseProps = {
40
- size?: IOFontSize;
39
+ size?: number;
41
40
  weight?: IOFontWeight;
42
41
  color?: IOColors;
43
42
  font?: IOFontFamily;
@@ -53,6 +53,7 @@ export const IOColors = asIOColors({
53
53
  "turquoise-850": "#003B3D",
54
54
  "turquoise-500": "#00C5CA",
55
55
  "turquoise-450": "#19CBCF" /* Dark mode */,
56
+ "turquoise-300": "#61DCDF",
56
57
  "turquoise-150": "#AAEEEF",
57
58
  "turquoise-100": "#C2F3F4",
58
59
  "turquoise-50": "#DBF9FA",
@@ -283,7 +284,10 @@ const themeKeys = [
283
284
  // Status
284
285
  "errorIcon",
285
286
  "errorText",
287
+ "successIcon",
286
288
  "successText",
289
+ "warningIcon",
290
+ "infoIcon",
287
291
  // Pictograms
288
292
  "pictogram-hands",
289
293
  "pictogram-tint-main",
@@ -322,7 +326,10 @@ export const IOThemeLight: IOTheme = {
322
326
  // Status
323
327
  errorIcon: "error-600",
324
328
  errorText: "error-600",
329
+ successIcon: "success-700",
325
330
  successText: "success-700",
331
+ warningIcon: "warning-700",
332
+ infoIcon: "info-700",
326
333
  // Pictograms
327
334
  "pictogram-hands": "blueIO-500",
328
335
  "pictogram-tint-main": "turquoise-150",
@@ -356,6 +363,7 @@ export const IOThemeDark: IOTheme = {
356
363
  // Design System related
357
364
  "cardBorder-default": "grey-850",
358
365
  "icon-default": "grey-450",
366
+ "icon-decorative": "grey-650",
359
367
  // Layout
360
368
  "divider-header": "grey-850",
361
369
  "divider-default": "grey-850",
@@ -364,6 +372,9 @@ export const IOThemeDark: IOTheme = {
364
372
  errorIcon: "error-400",
365
373
  errorText: "error-400",
366
374
  successText: "success-400",
375
+ successIcon: "success-500",
376
+ warningIcon: "warning-500",
377
+ infoIcon: "info-500",
367
378
  // Pictograms
368
379
  "pictogram-hands": "white",
369
380
  "pictogram-tint-main": "turquoise-150",
@@ -73,7 +73,7 @@ export const fontWeights: Record<IOFontWeight, IOFontWeightNumeric> = {
73
73
  };
74
74
 
75
75
  type FontStyleObject = {
76
- fontSize: IOFontSize;
76
+ fontSize: IOFontSize | number;
77
77
  /* We also accept `string` because Android needs a composed
78
78
  fontFamily name, like `TitilliumSansPro-Regular` */
79
79
  fontFamily: string | IOFontFamily;
@@ -132,7 +132,7 @@ const defaultFontSize: IOFontSize = 16;
132
132
  */
133
133
 
134
134
  export const makeFontStyleObject = (
135
- size: IOFontSize = defaultFontSize,
135
+ size: number = defaultFontSize,
136
136
  font: IOFontFamily = defaultFont,
137
137
  lineHeight: TextStyle["lineHeight"],
138
138
  weight: IOFontWeight = defaultWeight,