@pagopa/io-app-design-system 2.0.2 → 2.1.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  2. package/lib/commonjs/components/badge/Badge.js +2 -2
  3. package/lib/commonjs/components/badge/Badge.js.map +1 -1
  4. package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
  5. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
  6. package/lib/commonjs/components/buttons/ButtonLink.js +2 -2
  7. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  8. package/lib/commonjs/components/buttons/ButtonOutline.js +2 -2
  9. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  10. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
  11. package/lib/commonjs/components/layout/HeaderSecondLevel.js +2 -2
  12. package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
  13. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +3 -3
  14. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  15. package/lib/commonjs/components/listitems/ListItemTransaction.js +7 -4
  16. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  17. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +37 -37
  18. package/lib/commonjs/components/modules/ModuleAttachment.js +2 -1
  19. package/lib/commonjs/components/modules/ModuleAttachment.js.map +1 -1
  20. package/lib/commonjs/components/modules/ModuleCredential.js +2 -1
  21. package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
  22. package/lib/commonjs/components/modules/ModuleIDP.js +2 -2
  23. package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
  24. package/lib/commonjs/components/modules/ModuleNavigation.js +2 -1
  25. package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
  26. package/lib/commonjs/components/modules/ModulePaymentNotice.js +3 -2
  27. package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
  28. package/lib/commonjs/components/searchInput/SearchInput.js +1 -1
  29. package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
  30. package/lib/commonjs/components/tag/Tag.js +2 -2
  31. package/lib/commonjs/components/tag/Tag.js.map +1 -1
  32. package/lib/commonjs/components/textInput/TextInputBase.js +1 -1
  33. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
  34. package/lib/commonjs/components/typography/Body.js +10 -3
  35. package/lib/commonjs/components/typography/Body.js.map +1 -1
  36. package/lib/commonjs/components/typography/ButtonText.js +2 -2
  37. package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
  38. package/lib/commonjs/components/typography/Caption.js +1 -1
  39. package/lib/commonjs/components/typography/Caption.js.map +1 -1
  40. package/lib/commonjs/components/typography/Chip.js +1 -1
  41. package/lib/commonjs/components/typography/Chip.js.map +1 -1
  42. package/lib/commonjs/components/typography/H1.js +4 -6
  43. package/lib/commonjs/components/typography/H1.js.map +1 -1
  44. package/lib/commonjs/components/typography/H2.js +2 -2
  45. package/lib/commonjs/components/typography/H2.js.map +1 -1
  46. package/lib/commonjs/components/typography/H3.js +2 -2
  47. package/lib/commonjs/components/typography/H3.js.map +1 -1
  48. package/lib/commonjs/components/typography/H4.js +2 -2
  49. package/lib/commonjs/components/typography/H4.js.map +1 -1
  50. package/lib/commonjs/components/typography/H5.js +9 -2
  51. package/lib/commonjs/components/typography/H5.js.map +1 -1
  52. package/lib/commonjs/components/typography/H6.js +4 -6
  53. package/lib/commonjs/components/typography/H6.js.map +1 -1
  54. package/lib/commonjs/components/typography/Hero.js +2 -2
  55. package/lib/commonjs/components/typography/Hero.js.map +1 -1
  56. package/lib/commonjs/components/typography/Label.js +10 -2
  57. package/lib/commonjs/components/typography/Label.js.map +1 -1
  58. package/lib/commonjs/components/typography/LabelMini.js +10 -2
  59. package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
  60. package/lib/commonjs/components/typography/LabelSmall.js +10 -2
  61. package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
  62. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +6 -6
  63. package/lib/commonjs/components/typography/index.js +0 -11
  64. package/lib/commonjs/components/typography/index.js.map +1 -1
  65. package/lib/commonjs/components/typography/markdown/MdH1.js +2 -2
  66. package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
  67. package/lib/commonjs/components/typography/markdown/MdH2.js +3 -5
  68. package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
  69. package/lib/commonjs/components/typography/markdown/MdH3.js +2 -2
  70. package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
  71. package/lib/commonjs/core/IOColors.js +3 -1
  72. package/lib/commonjs/core/IOColors.js.map +1 -1
  73. package/lib/commonjs/utils/fonts.js +10 -8
  74. package/lib/commonjs/utils/fonts.js.map +1 -1
  75. package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  76. package/lib/module/components/badge/Badge.js +2 -2
  77. package/lib/module/components/badge/Badge.js.map +1 -1
  78. package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
  79. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
  80. package/lib/module/components/buttons/ButtonLink.js +2 -2
  81. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  82. package/lib/module/components/buttons/ButtonOutline.js +2 -2
  83. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  84. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
  85. package/lib/module/components/layout/HeaderSecondLevel.js +2 -2
  86. package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
  87. package/lib/module/components/listitems/ListItemRadioWithAmount.js +3 -3
  88. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  89. package/lib/module/components/listitems/ListItemTransaction.js +8 -5
  90. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  91. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +37 -37
  92. package/lib/module/components/modules/ModuleAttachment.js +3 -2
  93. package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
  94. package/lib/module/components/modules/ModuleCredential.js +3 -2
  95. package/lib/module/components/modules/ModuleCredential.js.map +1 -1
  96. package/lib/module/components/modules/ModuleIDP.js +2 -2
  97. package/lib/module/components/modules/ModuleIDP.js.map +1 -1
  98. package/lib/module/components/modules/ModuleNavigation.js +3 -2
  99. package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
  100. package/lib/module/components/modules/ModulePaymentNotice.js +4 -3
  101. package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
  102. package/lib/module/components/searchInput/SearchInput.js +1 -1
  103. package/lib/module/components/searchInput/SearchInput.js.map +1 -1
  104. package/lib/module/components/tag/Tag.js +2 -2
  105. package/lib/module/components/tag/Tag.js.map +1 -1
  106. package/lib/module/components/textInput/TextInputBase.js +1 -1
  107. package/lib/module/components/textInput/TextInputBase.js.map +1 -1
  108. package/lib/module/components/typography/Body.js +10 -3
  109. package/lib/module/components/typography/Body.js.map +1 -1
  110. package/lib/module/components/typography/ButtonText.js +2 -2
  111. package/lib/module/components/typography/ButtonText.js.map +1 -1
  112. package/lib/module/components/typography/Caption.js +1 -1
  113. package/lib/module/components/typography/Caption.js.map +1 -1
  114. package/lib/module/components/typography/Chip.js +1 -1
  115. package/lib/module/components/typography/Chip.js.map +1 -1
  116. package/lib/module/components/typography/H1.js +4 -6
  117. package/lib/module/components/typography/H1.js.map +1 -1
  118. package/lib/module/components/typography/H2.js +2 -2
  119. package/lib/module/components/typography/H2.js.map +1 -1
  120. package/lib/module/components/typography/H3.js +2 -2
  121. package/lib/module/components/typography/H3.js.map +1 -1
  122. package/lib/module/components/typography/H4.js +2 -2
  123. package/lib/module/components/typography/H4.js.map +1 -1
  124. package/lib/module/components/typography/H5.js +10 -3
  125. package/lib/module/components/typography/H5.js.map +1 -1
  126. package/lib/module/components/typography/H6.js +4 -6
  127. package/lib/module/components/typography/H6.js.map +1 -1
  128. package/lib/module/components/typography/Hero.js +2 -2
  129. package/lib/module/components/typography/Hero.js.map +1 -1
  130. package/lib/module/components/typography/Label.js +11 -3
  131. package/lib/module/components/typography/Label.js.map +1 -1
  132. package/lib/module/components/typography/LabelMini.js +11 -3
  133. package/lib/module/components/typography/LabelMini.js.map +1 -1
  134. package/lib/module/components/typography/LabelSmall.js +11 -3
  135. package/lib/module/components/typography/LabelSmall.js.map +1 -1
  136. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +6 -6
  137. package/lib/module/components/typography/index.js +0 -1
  138. package/lib/module/components/typography/index.js.map +1 -1
  139. package/lib/module/components/typography/markdown/MdH1.js +2 -2
  140. package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
  141. package/lib/module/components/typography/markdown/MdH2.js +3 -5
  142. package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
  143. package/lib/module/components/typography/markdown/MdH3.js +2 -2
  144. package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
  145. package/lib/module/core/IOColors.js +3 -1
  146. package/lib/module/core/IOColors.js.map +1 -1
  147. package/lib/module/utils/fonts.js +10 -8
  148. package/lib/module/utils/fonts.js.map +1 -1
  149. package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
  150. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  151. package/lib/typescript/components/modules/ModuleAttachment.d.ts.map +1 -1
  152. package/lib/typescript/components/modules/ModuleCredential.d.ts.map +1 -1
  153. package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
  154. package/lib/typescript/components/modules/ModulePaymentNotice.d.ts.map +1 -1
  155. package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
  156. package/lib/typescript/components/typography/Body.d.ts.map +1 -1
  157. package/lib/typescript/components/typography/H1.d.ts.map +1 -1
  158. package/lib/typescript/components/typography/H5.d.ts.map +1 -1
  159. package/lib/typescript/components/typography/H6.d.ts.map +1 -1
  160. package/lib/typescript/components/typography/Label.d.ts.map +1 -1
  161. package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
  162. package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
  163. package/lib/typescript/components/typography/index.d.ts +0 -1
  164. package/lib/typescript/components/typography/index.d.ts.map +1 -1
  165. package/lib/typescript/components/typography/markdown/MdH2.d.ts.map +1 -1
  166. package/lib/typescript/core/IOColors.d.ts +1 -1
  167. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  168. package/lib/typescript/utils/fonts.d.ts +8 -8
  169. package/lib/typescript/utils/fonts.d.ts.map +1 -1
  170. package/package.json +1 -1
  171. package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  172. package/src/components/badge/Badge.tsx +2 -2
  173. package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
  174. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
  175. package/src/components/buttons/ButtonLink.tsx +2 -2
  176. package/src/components/buttons/ButtonOutline.tsx +2 -2
  177. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
  178. package/src/components/layout/HeaderSecondLevel.tsx +2 -2
  179. package/src/components/listitems/ListItemRadioWithAmount.tsx +7 -4
  180. package/src/components/listitems/ListItemTransaction.tsx +9 -5
  181. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +37 -37
  182. package/src/components/modules/ModuleAttachment.tsx +4 -3
  183. package/src/components/modules/ModuleCredential.tsx +4 -3
  184. package/src/components/modules/ModuleIDP.tsx +2 -2
  185. package/src/components/modules/ModuleNavigation.tsx +4 -3
  186. package/src/components/modules/ModulePaymentNotice.tsx +4 -3
  187. package/src/components/searchInput/SearchInput.tsx +1 -1
  188. package/src/components/tag/Tag.tsx +2 -2
  189. package/src/components/textInput/TextInputBase.tsx +1 -6
  190. package/src/components/typography/Body.tsx +15 -4
  191. package/src/components/typography/ButtonText.tsx +2 -2
  192. package/src/components/typography/Caption.tsx +1 -1
  193. package/src/components/typography/Chip.tsx +1 -1
  194. package/src/components/typography/H1.tsx +4 -6
  195. package/src/components/typography/H2.tsx +2 -2
  196. package/src/components/typography/H3.tsx +2 -2
  197. package/src/components/typography/H4.tsx +2 -2
  198. package/src/components/typography/H5.tsx +11 -4
  199. package/src/components/typography/H6.tsx +4 -6
  200. package/src/components/typography/Hero.tsx +2 -2
  201. package/src/components/typography/Label.tsx +15 -4
  202. package/src/components/typography/LabelMini.tsx +15 -4
  203. package/src/components/typography/LabelSmall.tsx +15 -4
  204. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +6 -6
  205. package/src/components/typography/index.tsx +0 -1
  206. package/src/components/typography/markdown/MdH1.tsx +2 -2
  207. package/src/components/typography/markdown/MdH2.tsx +3 -5
  208. package/src/components/typography/markdown/MdH3.tsx +2 -2
  209. package/src/core/IOColors.ts +3 -0
  210. package/src/utils/fonts.ts +20 -10
  211. package/lib/commonjs/components/typography/LabelSmallAlt.js +0 -48
  212. package/lib/commonjs/components/typography/LabelSmallAlt.js.map +0 -1
  213. package/lib/module/components/typography/LabelSmallAlt.js +0 -39
  214. package/lib/module/components/typography/LabelSmallAlt.js.map +0 -1
  215. package/lib/typescript/components/typography/LabelSmallAlt.d.ts +0 -13
  216. package/lib/typescript/components/typography/LabelSmallAlt.d.ts.map +0 -1
  217. package/src/components/typography/LabelSmallAlt.tsx +0 -41
@@ -18,7 +18,7 @@ import { WithTestID } from "../../utils/types";
18
18
  import { Badge } from "../badge";
19
19
  import { IOIcons, Icon } from "../icons";
20
20
  import { HStack, VStack } from "../stack";
21
- import { Chip, LabelSmallAlt } from "../typography";
21
+ import { Chip, LabelSmall } from "../typography";
22
22
  import { ModuleStatic } from "./ModuleStatic";
23
23
  import {
24
24
  PressableModuleBase,
@@ -79,14 +79,15 @@ export const ModuleNavigation = (props: WithTestID<ModuleNavigationProps>) => {
79
79
  {iconComponent ?? imageComponent}
80
80
 
81
81
  <View style={{ flexShrink: 1 }}>
82
- <LabelSmallAlt
82
+ <LabelSmall
83
83
  color={theme["interactiveElem-default"]}
84
+ weight="Semibold"
84
85
  numberOfLines={2}
85
86
  lineBreakMode="middle"
86
87
  style={{ flexShrink: 1 }}
87
88
  >
88
89
  {title}
89
- </LabelSmallAlt>
90
+ </LabelSmall>
90
91
  {subtitle && (
91
92
  <Chip color={theme["textBody-tertiary"]}>{subtitle}</Chip>
92
93
  )}
@@ -7,7 +7,7 @@ import { WithTestID } from "../../utils/types";
7
7
  import { Badge } from "../badge";
8
8
  import { Icon } from "../icons";
9
9
  import { HStack, VStack } from "../stack";
10
- import { H6, LabelSmall, LabelSmallAlt } from "../typography";
10
+ import { H6, LabelSmall } from "../typography";
11
11
  import { ModuleStatic } from "./ModuleStatic";
12
12
  import { PressableModuleBase } from "./PressableModuleBase";
13
13
 
@@ -98,12 +98,13 @@ const ModulePaymentNoticeContent = ({
98
98
  </LabelSmall>
99
99
  )}
100
100
  {subtitle && (
101
- <LabelSmallAlt
101
+ <LabelSmall
102
102
  color={theme["interactiveElem-default"]}
103
103
  numberOfLines={2}
104
+ weight="Semibold"
104
105
  >
105
106
  {subtitle}
106
- </LabelSmallAlt>
107
+ </LabelSmall>
107
108
  )}
108
109
  </View>
109
110
  <View style={styles.endBlock}>
@@ -326,7 +326,7 @@ const styles = StyleSheet.create({
326
326
  placeholder: {
327
327
  ...makeFontStyleObject(
328
328
  inputFontSizePlaceholder,
329
- "ReadexPro",
329
+ "Titillio",
330
330
  undefined,
331
331
  "Regular"
332
332
  )
@@ -169,8 +169,8 @@ export const Tag = ({
169
169
  {variantProps && text && <View style={styles.spacer} />}
170
170
  {text && (
171
171
  <IOText
172
- font={isExperimental ? "ReadexPro" : "TitilliumSansPro"}
173
- weight={isExperimental ? "Regular" : "Semibold"}
172
+ font={isExperimental ? "Titillio" : "TitilliumSansPro"}
173
+ weight={"Semibold"}
174
174
  size={12}
175
175
  lineHeight={16}
176
176
  color={theme["textBody-tertiary"]}
@@ -107,12 +107,7 @@ const styles = StyleSheet.create({
107
107
  ...(Platform.OS === "android" && { marginLeft: -4 })
108
108
  },
109
109
  textInputStyleFont: {
110
- ...makeFontStyleObject(
111
- inputLabelFontSize,
112
- "ReadexPro",
113
- undefined,
114
- "Regular"
115
- )
110
+ ...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Regular")
116
111
  },
117
112
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
118
113
  textInputStyleLegacyFont: {
@@ -1,7 +1,7 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOTheme } from "../../core";
4
- import { IOFontWeight } from "../../utils/fonts";
3
+ import { useIOExperimentalDesign, useIOTheme } from "../../core";
4
+ import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
5
5
  import {
6
6
  IOText,
7
7
  IOTextProps,
@@ -16,6 +16,12 @@ type BodyStyleProps = TypographicStyleProps & {
16
16
  export const bodyFontSize = 16;
17
17
  export const bodyLineHeight = 24;
18
18
 
19
+ const fontName: IOFontFamily = "Titillio";
20
+ const fontWeight: IOFontWeight = "Regular";
21
+
22
+ const legacyFontName: IOFontFamily = "TitilliumSansPro";
23
+ const legacyFontWeight: IOFontWeight = "Regular";
24
+
19
25
  /**
20
26
  * `Body` typographic style
21
27
  */
@@ -25,6 +31,7 @@ export const Body = forwardRef<View, BodyStyleProps>(
25
31
  ref?: ForwardedRef<View>
26
32
  ) => {
27
33
  const theme = useIOTheme();
34
+ const { isExperimental } = useIOExperimentalDesign();
28
35
 
29
36
  const defaultColor = asLink
30
37
  ? theme["interactiveElem-default"]
@@ -33,8 +40,12 @@ export const Body = forwardRef<View, BodyStyleProps>(
33
40
  const BodyProps: IOTextProps = {
34
41
  ...props,
35
42
  dynamicTypeRamp: "body", // iOS only
36
- font: "TitilliumSansPro",
37
- weight: customWeight ?? "Regular",
43
+ font: isExperimental ? fontName : legacyFontName,
44
+ weight: customWeight
45
+ ? customWeight
46
+ : isExperimental
47
+ ? fontWeight
48
+ : legacyFontWeight,
38
49
  size: bodyFontSize,
39
50
  lineHeight: bodyLineHeight,
40
51
  color: customColor ?? defaultColor,
@@ -9,8 +9,8 @@ export const buttonTextFontSize: IOFontSize = 16;
9
9
  /* Needed to render `ButtonOutline` and`ButtonLink` because they use
10
10
  `AnimatedText` for color transition through Reanimated */
11
11
  const defaultColor: IOColors = "white";
12
- const fontName: IOFontFamily = "ReadexPro";
13
- const fontWeight: IOFontWeight = "Regular";
12
+ const fontName: IOFontFamily = "Titillio";
13
+ const fontWeight: IOFontWeight = "Semibold";
14
14
 
15
15
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
16
16
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
@@ -7,7 +7,7 @@ import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
7
7
  const defaultColor: keyof IOTheme = "textBody-default";
8
8
 
9
9
  export const captionFontSize: IOFontSize = 12;
10
- const fontName: IOFontFamily = "ReadexPro";
10
+ const fontName: IOFontFamily = "Titillio";
11
11
  const fontWeight: IOFontWeight = "Regular";
12
12
 
13
13
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
@@ -4,7 +4,7 @@ import { useIOExperimentalDesign, useIOTheme } from "../../core";
4
4
  import { IOFontFamily } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const fontName: IOFontFamily = "ReadexPro";
7
+ const fontName: IOFontFamily = "Titillio";
8
8
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
9
9
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
10
10
  /**
@@ -8,12 +8,10 @@ const defaultColor: keyof IOTheme = "textHeading-default";
8
8
 
9
9
  export const h1FontSize: IOFontSize = 28;
10
10
  export const h1LineHeight = 42;
11
- const fontName: IOFontFamily = "ReadexPro";
12
- const fontWeight: IOFontWeight = "Regular";
11
+ const fontName: IOFontFamily = "Titillio";
12
+ const fontWeight: IOFontWeight = "Semibold";
13
13
 
14
14
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
- const legacyH1FontSize: IOFontSize = 31;
16
- const legacyH1LineHeight = 43;
17
15
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
18
16
  const legacyFontWeight: IOFontWeight = "Semibold";
19
17
 
@@ -30,8 +28,8 @@ export const H1 = forwardRef<View, TypographicStyleProps>(
30
28
  dynamicTypeRamp: "largeTitle", // iOS only
31
29
  font: isExperimental ? fontName : legacyFontName,
32
30
  weight: isExperimental ? fontWeight : legacyFontWeight,
33
- size: isExperimental ? h1FontSize : legacyH1FontSize,
34
- lineHeight: isExperimental ? h1LineHeight : legacyH1LineHeight,
31
+ size: h1FontSize,
32
+ lineHeight: h1LineHeight,
35
33
  color: customColor ?? theme[defaultColor]
36
34
  };
37
35
 
@@ -8,8 +8,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
8
8
 
9
9
  export const h2FontSize: IOFontSize = 26;
10
10
  export const h2LineHeight = 39;
11
- const fontName: IOFontFamily = "ReadexPro";
12
- const fontWeight: IOFontWeight = "Regular";
11
+ const fontName: IOFontFamily = "Titillio";
12
+ const fontWeight: IOFontWeight = "Semibold";
13
13
 
14
14
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
15
  const legacyH2FontSize: IOFontSize = 28;
@@ -9,8 +9,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
9
9
  /* Common typographic styles */
10
10
  export const h3FontSize: IOFontSize = 22;
11
11
  export const h3LineHeight = 33;
12
- const fontName: IOFontFamily = "ReadexPro";
13
- const fontWeight: IOFontWeight = "Regular";
12
+ const fontName: IOFontFamily = "Titillio";
13
+ const fontWeight: IOFontWeight = "Semibold";
14
14
 
15
15
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
16
16
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
@@ -8,8 +8,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
8
8
 
9
9
  export const h4FontSize: IOFontSize = 20;
10
10
  export const h4LineHeight = 24;
11
- const fontName: IOFontFamily = "ReadexPro";
12
- const fontWeight: IOFontWeight = "Regular";
11
+ const fontName: IOFontFamily = "Titillio";
12
+ const fontWeight: IOFontWeight = "Semibold";
13
13
 
14
14
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
15
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
@@ -1,11 +1,17 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOTheme } from "../../core";
4
- import { IOFontSize } from "../../utils/fonts";
3
+ import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
+ import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
7
  const defaultColor: keyof IOTheme = "textHeading-default";
8
8
 
9
+ const fontName: IOFontFamily = "Titillio";
10
+ const fontWeight: IOFontWeight = "Semibold";
11
+
12
+ const legacyFontName: IOFontFamily = "TitilliumSansPro";
13
+ const legacyFontWeight: IOFontWeight = "Semibold";
14
+
9
15
  export const h5FontSize: IOFontSize = 14;
10
16
  export const h5LineHeight = 16;
11
17
 
@@ -15,12 +21,13 @@ export const h5LineHeight = 16;
15
21
  export const H5 = forwardRef<View, TypographicStyleProps>(
16
22
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
17
23
  const theme = useIOTheme();
24
+ const { isExperimental } = useIOExperimentalDesign();
18
25
 
19
26
  const H5Props: IOTextProps = {
20
27
  ...props,
21
28
  dynamicTypeRamp: "subheadline", // iOS only
22
- font: "TitilliumSansPro",
23
- weight: "Semibold",
29
+ font: isExperimental ? fontName : legacyFontName,
30
+ weight: isExperimental ? fontWeight : legacyFontWeight,
24
31
  size: h5FontSize,
25
32
  lineHeight: h5LineHeight,
26
33
  color: customColor ?? theme[defaultColor],
@@ -8,12 +8,10 @@ const defaultColor: keyof IOTheme = "textHeading-default";
8
8
 
9
9
  export const h6FontSize: IOFontSize = 16;
10
10
  export const h6LineHeight = 24;
11
- const fontName: IOFontFamily = "ReadexPro";
12
- const fontWeight: IOFontWeight = "Regular";
11
+ const fontName: IOFontFamily = "Titillio";
12
+ const fontWeight: IOFontWeight = "Semibold";
13
13
 
14
14
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
- const legacyFontSize: IOFontSize = 18;
16
- const legacyLineHeight = 25;
17
15
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
18
16
  const legacyFontWeight: IOFontWeight = "Semibold";
19
17
 
@@ -29,8 +27,8 @@ export const H6 = forwardRef<View, TypographicStyleProps>(
29
27
  ...props,
30
28
  dynamicTypeRamp: "headline", // iOS only
31
29
  font: isExperimental ? fontName : legacyFontName,
32
- size: isExperimental ? h6FontSize : legacyFontSize,
33
- lineHeight: isExperimental ? h6LineHeight : legacyLineHeight,
30
+ size: h6FontSize,
31
+ lineHeight: h6LineHeight,
34
32
  weight: isExperimental ? fontWeight : legacyFontWeight,
35
33
  color: customColor ?? theme[defaultColor]
36
34
  };
@@ -8,8 +8,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
8
8
 
9
9
  export const heroFontSize: IOFontSize = 32;
10
10
  export const heroLineHeight = 48;
11
- const fontName: IOFontFamily = "ReadexPro";
12
- const fontWeight: IOFontWeight = "Regular";
11
+ const fontName: IOFontFamily = "Titillio";
12
+ const fontWeight: IOFontWeight = "Semibold";
13
13
 
14
14
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
15
  const legacyHeroFontSize: IOFontSize = 35;
@@ -1,7 +1,7 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOTheme } from "../../core";
4
- import { IOFontWeight } from "../../utils/fonts";
3
+ import { useIOExperimentalDesign, useIOTheme } from "../../core";
4
+ import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
5
5
  import {
6
6
  IOText,
7
7
  IOTextProps,
@@ -13,6 +13,12 @@ type LabelProps = TypographicStyleProps & {
13
13
  weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
14
14
  } & TypographicStyleAsLinkProps;
15
15
 
16
+ const fontName: IOFontFamily = "Titillio";
17
+ const fontWeight: IOFontWeight = "Semibold";
18
+
19
+ const legacyFontName: IOFontFamily = "TitilliumSansPro";
20
+ const legacyFontWeight: IOFontWeight = "Semibold";
21
+
16
22
  /**
17
23
  * `LabelSmall` typographic style
18
24
  */
@@ -22,6 +28,7 @@ export const Label = forwardRef<View, LabelProps>(
22
28
  ref?: ForwardedRef<View>
23
29
  ) => {
24
30
  const theme = useIOTheme();
31
+ const { isExperimental } = useIOExperimentalDesign();
25
32
 
26
33
  const defaultColor = asLink
27
34
  ? theme["interactiveElem-default"]
@@ -29,8 +36,12 @@ export const Label = forwardRef<View, LabelProps>(
29
36
 
30
37
  const LabelProps: IOTextProps = {
31
38
  ...props,
32
- font: "TitilliumSansPro",
33
- weight: customWeight ?? "Semibold",
39
+ font: isExperimental ? fontName : legacyFontName,
40
+ weight: customWeight
41
+ ? customWeight
42
+ : isExperimental
43
+ ? fontWeight
44
+ : legacyFontWeight,
34
45
  size: 16,
35
46
  lineHeight: 24,
36
47
  color: customColor ?? defaultColor,
@@ -1,7 +1,7 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOTheme } from "../../core";
4
- import { IOFontWeight } from "../../utils/fonts";
3
+ import { useIOExperimentalDesign, useIOTheme } from "../../core";
4
+ import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
5
5
  import {
6
6
  IOText,
7
7
  IOTextProps,
@@ -13,6 +13,12 @@ type LabelMiniProps = TypographicStyleProps & {
13
13
  weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
14
14
  } & TypographicStyleAsLinkProps;
15
15
 
16
+ const fontName: IOFontFamily = "Titillio";
17
+ const fontWeight: IOFontWeight = "Semibold";
18
+
19
+ const legacyFontName: IOFontFamily = "TitilliumSansPro";
20
+ const legacyFontWeight: IOFontWeight = "Semibold";
21
+
16
22
  /**
17
23
  * `LabelMini` typographic style
18
24
  */
@@ -22,6 +28,7 @@ export const LabelMini = forwardRef<View, LabelMiniProps>(
22
28
  ref?: ForwardedRef<View>
23
29
  ) => {
24
30
  const theme = useIOTheme();
31
+ const { isExperimental } = useIOExperimentalDesign();
25
32
 
26
33
  const defaultColor = asLink
27
34
  ? theme["interactiveElem-default"]
@@ -30,8 +37,12 @@ export const LabelMini = forwardRef<View, LabelMiniProps>(
30
37
  const LabelMiniProps: IOTextProps = {
31
38
  ...props,
32
39
  dynamicTypeRamp: "footnote" /* iOS only */,
33
- font: "TitilliumSansPro",
34
- weight: customWeight ?? "Semibold",
40
+ font: isExperimental ? fontName : legacyFontName,
41
+ weight: customWeight
42
+ ? customWeight
43
+ : isExperimental
44
+ ? fontWeight
45
+ : legacyFontWeight,
35
46
  size: 12,
36
47
  lineHeight: 18,
37
48
  color: customColor ?? defaultColor,
@@ -1,7 +1,7 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOTheme } from "../../core";
4
- import { IOFontWeight } from "../../utils/fonts";
3
+ import { useIOExperimentalDesign, useIOTheme } from "../../core";
4
+ import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
5
5
  import {
6
6
  IOText,
7
7
  IOTextProps,
@@ -13,6 +13,12 @@ type LabelSmallProps = TypographicStyleProps & {
13
13
  weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
14
14
  } & TypographicStyleAsLinkProps;
15
15
 
16
+ const fontName: IOFontFamily = "Titillio";
17
+ const fontWeight: IOFontWeight = "Semibold";
18
+
19
+ const legacyFontName: IOFontFamily = "TitilliumSansPro";
20
+ const legacyFontWeight: IOFontWeight = "Semibold";
21
+
16
22
  /**
17
23
  * `LabelSmall` typographic style
18
24
  */
@@ -22,6 +28,7 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
22
28
  ref?: ForwardedRef<View>
23
29
  ) => {
24
30
  const theme = useIOTheme();
31
+ const { isExperimental } = useIOExperimentalDesign();
25
32
 
26
33
  const defaultColor = asLink
27
34
  ? theme["interactiveElem-default"]
@@ -30,8 +37,12 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
30
37
  const LabelSmallProps: IOTextProps = {
31
38
  ...props,
32
39
  dynamicTypeRamp: "footnote" /* iOS only */,
33
- font: "TitilliumSansPro",
34
- weight: customWeight ?? "Semibold",
40
+ font: isExperimental ? fontName : legacyFontName,
41
+ weight: customWeight
42
+ ? customWeight
43
+ : isExperimental
44
+ ? fontWeight
45
+ : legacyFontWeight,
35
46
  size: 14,
36
47
  lineHeight: 21,
37
48
  color: customColor ?? defaultColor,
@@ -81,10 +81,10 @@ exports[`Test Typography Components H1 Snapshot 1`] = `
81
81
  {
82
82
  "color": "#0E0F13",
83
83
  "fontFamily": "Titillium Sans Pro",
84
- "fontSize": 31,
84
+ "fontSize": 28,
85
85
  "fontStyle": "normal",
86
86
  "fontWeight": "600",
87
- "lineHeight": 43,
87
+ "lineHeight": 42,
88
88
  },
89
89
  ]
90
90
  }
@@ -104,10 +104,10 @@ exports[`Test Typography Components H1 Snapshot 2`] = `
104
104
  {
105
105
  "color": "#FFFFFF",
106
106
  "fontFamily": "Titillium Sans Pro",
107
- "fontSize": 31,
107
+ "fontSize": 28,
108
108
  "fontStyle": "normal",
109
109
  "fontWeight": "600",
110
- "lineHeight": 43,
110
+ "lineHeight": 42,
111
111
  },
112
112
  ]
113
113
  }
@@ -438,10 +438,10 @@ exports[`Test Typography Components H6 Snapshot 1`] = `
438
438
  {
439
439
  "color": "#0E0F13",
440
440
  "fontFamily": "Titillium Sans Pro",
441
- "fontSize": 18,
441
+ "fontSize": 16,
442
442
  "fontStyle": "normal",
443
443
  "fontWeight": "600",
444
- "lineHeight": 25,
444
+ "lineHeight": 24,
445
445
  },
446
446
  ]
447
447
  }
@@ -14,7 +14,6 @@ export * from "./H6";
14
14
  export * from "./Hero";
15
15
  export * from "./Label";
16
16
  export * from "./LabelSmall";
17
- export * from "./LabelSmallAlt";
18
17
  export * from "./LabelMini";
19
18
  export * from "./BodyMonospace";
20
19
  export * from "./common";
@@ -14,8 +14,8 @@ export const MdH1 = forwardRef<View, TypographicStyleProps>(
14
14
 
15
15
  const MdH1Props: IOTextProps = {
16
16
  ...props,
17
- font: isExperimental ? "ReadexPro" : "TitilliumSansPro",
18
- weight: isExperimental ? "Regular" : "Semibold",
17
+ font: isExperimental ? "Titillio" : "TitilliumSansPro",
18
+ weight: "Semibold",
19
19
  size: 20,
20
20
  lineHeight: 24,
21
21
  color: customColor ?? theme["textHeading-tertiary"]
@@ -13,11 +13,9 @@ export const MdH2 = forwardRef<View, TypographicStyleProps>(
13
13
 
14
14
  const MdH2Props: IOTextProps = {
15
15
  ...props,
16
- font: isExperimental ? "ReadexPro" : "TitilliumSansPro",
17
- weight: isExperimental ? "Regular" : "Semibold",
18
- /* We set 18 instead of 16 to diffrentiate from the H3 typographic style.
19
- It should be 16 with `SemiBold` font weight. */
20
- size: 18,
16
+ font: isExperimental ? "Titillio" : "TitilliumSansPro",
17
+ weight: "Semibold",
18
+ size: 16,
21
19
  lineHeight: 24,
22
20
  color: customColor ?? theme["textHeading-tertiary"]
23
21
  };
@@ -13,8 +13,8 @@ export const MdH3 = forwardRef<View, TypographicStyleProps>(
13
13
 
14
14
  const MdH3Props: IOTextProps = {
15
15
  ...props,
16
- font: isExperimental ? "ReadexPro" : "TitilliumSansPro",
17
- weight: isExperimental ? "Regular" : "Semibold",
16
+ font: isExperimental ? "Titillio" : "TitilliumSansPro",
17
+ weight: "Regular",
18
18
  size: 16,
19
19
  lineHeight: 24,
20
20
  color: customColor ?? theme["textHeading-tertiary"]
@@ -283,6 +283,7 @@ const themeKeys = [
283
283
  // Status
284
284
  "errorIcon",
285
285
  "errorText",
286
+ "successText",
286
287
  // Pictograms
287
288
  "pictogram-hands",
288
289
  "pictogram-tint-main",
@@ -321,6 +322,7 @@ export const IOThemeLight: IOTheme = {
321
322
  // Status
322
323
  errorIcon: "error-600",
323
324
  errorText: "error-600",
325
+ successText: "success-700",
324
326
  // Pictograms
325
327
  "pictogram-hands": "blueIO-500",
326
328
  "pictogram-tint-main": "turquoise-150",
@@ -361,6 +363,7 @@ export const IOThemeDark: IOTheme = {
361
363
  // Status
362
364
  errorIcon: "error-400",
363
365
  errorText: "error-400",
366
+ successText: "success-400",
364
367
  // Pictograms
365
368
  "pictogram-hands": "white",
366
369
  "pictogram-tint-main": "turquoise-150",
@@ -16,11 +16,11 @@ const fonts = {
16
16
  ios: "Titillium Sans Pro",
17
17
  default: "TitilliumSansPro"
18
18
  }),
19
- ReadexPro: Platform.select({
20
- android: "ReadexPro",
21
- web: "ReadexPro",
22
- ios: "Readex Pro",
23
- default: "ReadexPro"
19
+ Titillio: Platform.select({
20
+ android: "Titillio",
21
+ web: "Titillio",
22
+ ios: "Titillio",
23
+ default: "Titillio"
24
24
  }),
25
25
  DMMono: Platform.select({
26
26
  android: "DMMono",
@@ -28,7 +28,7 @@ const fonts = {
28
28
  ios: "DM Mono",
29
29
  default: "DMMono"
30
30
  })
31
- };
31
+ } as const;
32
32
 
33
33
  export type IOFontFamily = keyof typeof fonts;
34
34
 
@@ -44,10 +44,18 @@ export type IOFontSize = (typeof allFontSizes)[number];
44
44
  * Font Weights
45
45
  */
46
46
 
47
- const weights = ["Light", "Regular", "Medium", "Semibold", "Bold"] as const;
47
+ const weights = [
48
+ "Thin",
49
+ "Light",
50
+ "Regular",
51
+ "Medium",
52
+ "Semibold",
53
+ "Bold",
54
+ "Black"
55
+ ] as const;
48
56
  export type IOFontWeight = (typeof weights)[number];
49
57
 
50
- const weightValues = ["300", "400", "500", "600", "700"] as const;
58
+ const weightValues = ["200", "300", "400", "500", "600", "700", "900"] as const;
51
59
  export type IOFontWeightNumeric = (typeof weightValues)[number];
52
60
 
53
61
  /**
@@ -55,11 +63,13 @@ export type IOFontWeightNumeric = (typeof weightValues)[number];
55
63
  * used on iOS
56
64
  */
57
65
  export const fontWeights: Record<IOFontWeight, IOFontWeightNumeric> = {
66
+ Thin: "200",
58
67
  Light: "300",
59
68
  Regular: "400",
60
69
  Medium: "500",
61
70
  Semibold: "600",
62
- Bold: "700"
71
+ Bold: "700",
72
+ Black: "900"
63
73
  };
64
74
 
65
75
  type FontStyleObject = {
@@ -96,7 +106,7 @@ export const makeFontFamilyName = (
96
106
  font: IOFontFamily,
97
107
  weight: IOFontWeight = defaultWeight,
98
108
  fontStyle: TextStyle["fontStyle"] = "normal"
99
- ): FontStyleObject["fontFamily"] =>
109
+ ): string =>
100
110
  Platform.select({
101
111
  web: fonts[font],
102
112
  android: `${fonts[font]}-${weight || "Regular"}${