@pagopa/io-app-design-system 3.1.0 → 4.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 (228) hide show
  1. package/lib/commonjs/components/alert/Alert.js +1 -2
  2. package/lib/commonjs/components/alert/Alert.js.map +1 -1
  3. package/lib/commonjs/components/alert/AlertEdgeToEdge.js +2 -2
  4. package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
  5. package/lib/commonjs/components/banner/Banner.js +1 -1
  6. package/lib/commonjs/components/banner/Banner.js.map +1 -1
  7. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  8. package/lib/commonjs/components/buttons/ButtonLink.js +1 -1
  9. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  10. package/lib/commonjs/components/buttons/ButtonOutline.js +1 -1
  11. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  12. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  13. package/lib/commonjs/components/featureInfo/FeatureInfo.js +3 -2
  14. package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
  15. package/lib/commonjs/components/layout/HeaderFirstLevel.js +1 -0
  16. package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
  17. package/lib/commonjs/components/listitems/ListItemCheckbox.js +1 -1
  18. package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
  19. package/lib/commonjs/components/listitems/ListItemInfo.js +1 -1
  20. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  21. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
  22. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  23. package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
  24. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  25. package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
  26. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  27. package/lib/commonjs/components/listitems/ListItemRadio.js +1 -1
  28. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
  29. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +2 -2
  30. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  31. package/lib/commonjs/components/listitems/ListItemSwitch.js +1 -1
  32. package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
  33. package/lib/commonjs/components/listitems/ListItemTransaction.js +2 -2
  34. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  35. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  36. package/lib/commonjs/components/modules/ModuleAttachment.js +1 -1
  37. package/lib/commonjs/components/modules/ModuleAttachment.js.map +1 -1
  38. package/lib/commonjs/components/modules/ModuleCheckout.js +1 -1
  39. package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -1
  40. package/lib/commonjs/components/modules/ModuleCredential.js +1 -1
  41. package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
  42. package/lib/commonjs/components/modules/ModuleNavigation.js +3 -2
  43. package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
  44. package/lib/commonjs/components/modules/ModulePaymentNotice.js +2 -2
  45. package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
  46. package/lib/commonjs/components/modules/ModuleSummary.js +1 -1
  47. package/lib/commonjs/components/modules/ModuleSummary.js.map +1 -1
  48. package/lib/commonjs/components/otpInput/BoxedInput.js +4 -6
  49. package/lib/commonjs/components/otpInput/BoxedInput.js.map +1 -1
  50. package/lib/commonjs/components/otpInput/OTPInput.js +5 -4
  51. package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
  52. package/lib/commonjs/components/tabs/TabItem.js +1 -1
  53. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  54. package/lib/commonjs/components/textInput/TextInputBase.js +2 -2
  55. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
  56. package/lib/commonjs/components/typography/{LabelSmall.js → BodySmall.js} +8 -10
  57. package/lib/commonjs/components/typography/BodySmall.js.map +1 -0
  58. package/lib/commonjs/components/typography/ButtonText.js +1 -3
  59. package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
  60. package/lib/commonjs/components/typography/H3.js +3 -6
  61. package/lib/commonjs/components/typography/H3.js.map +1 -1
  62. package/lib/commonjs/components/typography/H6.js +4 -5
  63. package/lib/commonjs/components/typography/H6.js.map +1 -1
  64. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  65. package/lib/commonjs/components/typography/__test__/typography.test.js +6 -18
  66. package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
  67. package/lib/commonjs/components/typography/index.js +28 -72
  68. package/lib/commonjs/components/typography/index.js.map +1 -1
  69. package/lib/module/components/alert/Alert.js +2 -3
  70. package/lib/module/components/alert/Alert.js.map +1 -1
  71. package/lib/module/components/alert/AlertEdgeToEdge.js +2 -2
  72. package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
  73. package/lib/module/components/banner/Banner.js +2 -2
  74. package/lib/module/components/banner/Banner.js.map +1 -1
  75. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  76. package/lib/module/components/buttons/ButtonLink.js +1 -1
  77. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  78. package/lib/module/components/buttons/ButtonOutline.js +1 -1
  79. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  80. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  81. package/lib/module/components/featureInfo/FeatureInfo.js +4 -3
  82. package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
  83. package/lib/module/components/layout/HeaderFirstLevel.js +1 -0
  84. package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
  85. package/lib/module/components/listitems/ListItemCheckbox.js +2 -2
  86. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
  87. package/lib/module/components/listitems/ListItemInfo.js +2 -2
  88. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  89. package/lib/module/components/listitems/ListItemInfoCopy.js +2 -2
  90. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  91. package/lib/module/components/listitems/ListItemNav.js +2 -2
  92. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  93. package/lib/module/components/listitems/ListItemNavAlert.js +2 -2
  94. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  95. package/lib/module/components/listitems/ListItemRadio.js +2 -2
  96. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  97. package/lib/module/components/listitems/ListItemRadioWithAmount.js +3 -3
  98. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  99. package/lib/module/components/listitems/ListItemSwitch.js +2 -2
  100. package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
  101. package/lib/module/components/listitems/ListItemTransaction.js +3 -3
  102. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  103. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  104. package/lib/module/components/modules/ModuleAttachment.js +2 -2
  105. package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
  106. package/lib/module/components/modules/ModuleCheckout.js +2 -2
  107. package/lib/module/components/modules/ModuleCheckout.js.map +1 -1
  108. package/lib/module/components/modules/ModuleCredential.js +2 -2
  109. package/lib/module/components/modules/ModuleCredential.js.map +1 -1
  110. package/lib/module/components/modules/ModuleNavigation.js +4 -3
  111. package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
  112. package/lib/module/components/modules/ModulePaymentNotice.js +3 -3
  113. package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
  114. package/lib/module/components/modules/ModuleSummary.js +2 -2
  115. package/lib/module/components/modules/ModuleSummary.js.map +1 -1
  116. package/lib/module/components/otpInput/BoxedInput.js +5 -7
  117. package/lib/module/components/otpInput/BoxedInput.js.map +1 -1
  118. package/lib/module/components/otpInput/OTPInput.js +5 -4
  119. package/lib/module/components/otpInput/OTPInput.js.map +1 -1
  120. package/lib/module/components/tabs/TabItem.js +2 -2
  121. package/lib/module/components/tabs/TabItem.js.map +1 -1
  122. package/lib/module/components/textInput/TextInputBase.js +3 -3
  123. package/lib/module/components/textInput/TextInputBase.js.map +1 -1
  124. package/lib/module/components/typography/{LabelSmall.js → BodySmall.js} +6 -8
  125. package/lib/module/components/typography/BodySmall.js.map +1 -0
  126. package/lib/module/components/typography/ButtonText.js +1 -3
  127. package/lib/module/components/typography/ButtonText.js.map +1 -1
  128. package/lib/module/components/typography/H3.js +3 -6
  129. package/lib/module/components/typography/H3.js.map +1 -1
  130. package/lib/module/components/typography/H6.js +4 -5
  131. package/lib/module/components/typography/H6.js.map +1 -1
  132. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  133. package/lib/module/components/typography/__test__/typography.test.js +6 -18
  134. package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
  135. package/lib/module/components/typography/index.js +6 -10
  136. package/lib/module/components/typography/index.js.map +1 -1
  137. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  138. package/lib/typescript/components/banner/Banner.d.ts +1 -1
  139. package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
  140. package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
  141. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
  142. package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
  143. package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
  144. package/lib/typescript/components/otpInput/BoxedInput.d.ts.map +1 -1
  145. package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
  146. package/lib/typescript/components/typography/Body.d.ts +1 -1
  147. package/lib/typescript/components/typography/Body.d.ts.map +1 -1
  148. package/lib/typescript/components/typography/BodySmall.d.ts +13 -0
  149. package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -0
  150. package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
  151. package/lib/typescript/components/typography/H3.d.ts +2 -0
  152. package/lib/typescript/components/typography/H3.d.ts.map +1 -1
  153. package/lib/typescript/components/typography/H6.d.ts.map +1 -1
  154. package/lib/typescript/components/typography/LabelMini.d.ts +1 -1
  155. package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
  156. package/lib/typescript/components/typography/index.d.ts +6 -10
  157. package/lib/typescript/components/typography/index.d.ts.map +1 -1
  158. package/package.json +1 -1
  159. package/src/components/alert/Alert.tsx +3 -4
  160. package/src/components/alert/AlertEdgeToEdge.tsx +3 -3
  161. package/src/components/banner/Banner.tsx +7 -5
  162. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  163. package/src/components/buttons/ButtonLink.tsx +1 -1
  164. package/src/components/buttons/ButtonOutline.tsx +1 -1
  165. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  166. package/src/components/featureInfo/FeatureInfo.tsx +6 -6
  167. package/src/components/layout/HeaderFirstLevel.tsx +1 -0
  168. package/src/components/listitems/ListItemCheckbox.tsx +3 -3
  169. package/src/components/listitems/ListItemInfo.tsx +3 -3
  170. package/src/components/listitems/ListItemInfoCopy.tsx +3 -3
  171. package/src/components/listitems/ListItemNav.tsx +3 -3
  172. package/src/components/listitems/ListItemNavAlert.tsx +3 -3
  173. package/src/components/listitems/ListItemRadio.tsx +3 -3
  174. package/src/components/listitems/ListItemRadioWithAmount.tsx +5 -5
  175. package/src/components/listitems/ListItemSwitch.tsx +4 -4
  176. package/src/components/listitems/ListItemTransaction.tsx +5 -5
  177. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  178. package/src/components/modules/ModuleAttachment.tsx +3 -3
  179. package/src/components/modules/ModuleCheckout.tsx +3 -3
  180. package/src/components/modules/ModuleCredential.tsx +3 -3
  181. package/src/components/modules/ModuleNavigation.tsx +6 -4
  182. package/src/components/modules/ModulePaymentNotice.tsx +5 -5
  183. package/src/components/modules/ModuleSummary.tsx +3 -3
  184. package/src/components/otpInput/BoxedInput.tsx +6 -5
  185. package/src/components/otpInput/OTPInput.tsx +23 -8
  186. package/src/components/tabs/TabItem.tsx +3 -3
  187. package/src/components/textInput/TextInputBase.tsx +5 -5
  188. package/src/components/typography/Body.tsx +1 -1
  189. package/src/components/typography/{LabelSmall.tsx → BodySmall.tsx} +7 -14
  190. package/src/components/typography/ButtonText.tsx +2 -4
  191. package/src/components/typography/H3.tsx +11 -8
  192. package/src/components/typography/H6.tsx +5 -6
  193. package/src/components/typography/LabelMini.tsx +1 -1
  194. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  195. package/src/components/typography/__test__/typography.test.tsx +8 -24
  196. package/src/components/typography/index.tsx +6 -10
  197. package/lib/commonjs/components/typography/BaseTypography.js +0 -52
  198. package/lib/commonjs/components/typography/BaseTypography.js.map +0 -1
  199. package/lib/commonjs/components/typography/Chip.js +0 -41
  200. package/lib/commonjs/components/typography/Chip.js.map +0 -1
  201. package/lib/commonjs/components/typography/Factory.js +0 -62
  202. package/lib/commonjs/components/typography/Factory.js.map +0 -1
  203. package/lib/commonjs/components/typography/Label.js +0 -51
  204. package/lib/commonjs/components/typography/Label.js.map +0 -1
  205. package/lib/commonjs/components/typography/LabelSmall.js.map +0 -1
  206. package/lib/module/components/typography/BaseTypography.js +0 -44
  207. package/lib/module/components/typography/BaseTypography.js.map +0 -1
  208. package/lib/module/components/typography/Chip.js +0 -32
  209. package/lib/module/components/typography/Chip.js.map +0 -1
  210. package/lib/module/components/typography/Factory.js +0 -55
  211. package/lib/module/components/typography/Factory.js.map +0 -1
  212. package/lib/module/components/typography/Label.js +0 -42
  213. package/lib/module/components/typography/Label.js.map +0 -1
  214. package/lib/module/components/typography/LabelSmall.js.map +0 -1
  215. package/lib/typescript/components/typography/BaseTypography.d.ts +0 -29
  216. package/lib/typescript/components/typography/BaseTypography.d.ts.map +0 -1
  217. package/lib/typescript/components/typography/Chip.d.ts +0 -13
  218. package/lib/typescript/components/typography/Chip.d.ts.map +0 -1
  219. package/lib/typescript/components/typography/Factory.d.ts +0 -43
  220. package/lib/typescript/components/typography/Factory.d.ts.map +0 -1
  221. package/lib/typescript/components/typography/Label.d.ts +0 -13
  222. package/lib/typescript/components/typography/Label.d.ts.map +0 -1
  223. package/lib/typescript/components/typography/LabelSmall.d.ts +0 -13
  224. package/lib/typescript/components/typography/LabelSmall.d.ts.map +0 -1
  225. package/src/components/typography/BaseTypography.tsx +0 -71
  226. package/src/components/typography/Chip.tsx +0 -33
  227. package/src/components/typography/Factory.tsx +0 -98
  228. package/src/components/typography/Label.tsx +0 -62
@@ -6,7 +6,7 @@ import { WithTestID } from "../../utils/types";
6
6
  import { Badge } from "../badge";
7
7
  import { Icon } from "../icons";
8
8
  import { HStack, VStack } from "../stack";
9
- import { H6, Label, LabelSmall } from "../typography";
9
+ import { Body, H6, BodySmall } from "../typography";
10
10
  import { ModuleStatic } from "./ModuleStatic";
11
11
  import { PressableModuleBase } from "./PressableModuleBase";
12
12
 
@@ -93,22 +93,22 @@ const ModulePaymentNoticeContent = ({
93
93
  <HStack space={IOListItemVisualParams.iconMargin as IOSpacer}>
94
94
  <View style={{ flexGrow: 1, flexShrink: 1 }}>
95
95
  {title && (
96
- <LabelSmall
96
+ <BodySmall
97
97
  numberOfLines={1}
98
98
  weight="Regular"
99
99
  color={theme["textBody-tertiary"]}
100
100
  >
101
101
  {title}
102
- </LabelSmall>
102
+ </BodySmall>
103
103
  )}
104
104
  {subtitle && (
105
- <Label
105
+ <Body
106
106
  color={theme["interactiveElem-default"]}
107
107
  numberOfLines={2}
108
108
  weight="Semibold"
109
109
  >
110
110
  {subtitle}
111
- </Label>
111
+ </Body>
112
112
  )}
113
113
  </View>
114
114
  <View style={styles.endBlock}>
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { View } from "react-native";
3
3
  import { useIOTheme } from "../../core";
4
4
  import { IOIcons, Icon } from "../icons";
5
- import { H6, LabelSmall } from "../typography";
5
+ import { H6, BodySmall } from "../typography";
6
6
  import {
7
7
  PressableModuleBase,
8
8
  PressableModuleBaseProps
@@ -28,9 +28,9 @@ export const ModuleSummary = ({
28
28
  <View style={{ flexGrow: 1, flexShrink: 1 }}>
29
29
  <H6 color={theme["textBody-default"]}>{label}</H6>
30
30
  {description && (
31
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
31
+ <BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
32
32
  {description}
33
- </LabelSmall>
33
+ </BodySmall>
34
34
  )}
35
35
  </View>
36
36
  <View style={{ marginLeft: 8 }}>
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { useMemo } from "react";
3
3
  import { StyleSheet, View } from "react-native";
4
4
  import { IOColors } from "../../core";
5
- import { BaseTypography, H6 } from "../typography";
5
+ import { H6, IOText } from "../typography";
6
6
 
7
7
  type Props = {
8
8
  status: "default" | "focus" | "error";
@@ -36,15 +36,16 @@ const styles = StyleSheet.create({
36
36
 
37
37
  // FIXME Replace this component with H3 once the legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
38
38
  const SecretValue = () => (
39
- <BaseTypography
39
+ <IOText
40
40
  font="DMMono"
41
41
  weight="Semibold"
42
- color="bluegreyDark"
43
- fontStyle={{ fontSize: 22, lineHeight: 33 }}
42
+ color="grey-850"
43
+ size={22}
44
+ lineHeight={33}
44
45
  accessible={false}
45
46
  >
46
47
  {"•"}
47
- </BaseTypography>
48
+ </IOText>
48
49
  );
49
50
 
50
51
  export const BoxedInput = ({ status, value, secret }: Props) => {
@@ -1,11 +1,18 @@
1
1
  import * as React from "react";
2
- import { AccessibilityInfo, NativeSyntheticEvent, Pressable, TextInput, TextInputKeyPressEventData, View } from "react-native";
2
+ import {
3
+ AccessibilityInfo,
4
+ NativeSyntheticEvent,
5
+ Pressable,
6
+ TextInput,
7
+ TextInputKeyPressEventData,
8
+ View
9
+ } from "react-native";
3
10
  import Animated from "react-native-reanimated";
4
11
  import { IOStyles } from "../../core/IOStyles";
5
- import { LabelSmall } from "../typography";
6
12
  import { triggerHaptic } from "../../functions";
7
- import { VSpacer } from "../spacer";
8
13
  import { useErrorShakeAnimation } from "../../utils/hooks/useErrorShakeAnimation";
14
+ import { VSpacer } from "../spacer";
15
+ import { BodySmall } from "../typography";
9
16
  import { BoxedInput } from "./BoxedInput";
10
17
 
11
18
  type Props = {
@@ -95,11 +102,15 @@ export const OTPInput = React.forwardRef<View, Props>(
95
102
  handleValidate(value);
96
103
  };
97
104
 
98
- const handleKeyPress = ({ nativeEvent }: NativeSyntheticEvent<TextInputKeyPressEventData>) => {
105
+ const handleKeyPress = ({
106
+ nativeEvent
107
+ }: NativeSyntheticEvent<TextInputKeyPressEventData>) => {
99
108
  switch (nativeEvent.key) {
100
- case 'Backspace':
109
+ case "Backspace":
101
110
  if (deleteButtonAccessibilityLabel && value.length > 0) {
102
- AccessibilityInfo.announceForAccessibility(deleteButtonAccessibilityLabel);
111
+ AccessibilityInfo.announceForAccessibility(
112
+ deleteButtonAccessibilityLabel
113
+ );
103
114
  }
104
115
  break;
105
116
  default:
@@ -156,9 +167,13 @@ export const OTPInput = React.forwardRef<View, Props>(
156
167
  </Pressable>
157
168
  <VSpacer size={4} />
158
169
  {hasError && errorMessage && (
159
- <LabelSmall color="error-850" style={{ textAlign: "center" }}>
170
+ <BodySmall
171
+ weight="Semibold"
172
+ color="error-850"
173
+ style={{ textAlign: "center" }}
174
+ >
160
175
  {errorMessage}
161
- </LabelSmall>
176
+ </BodySmall>
162
177
  )}
163
178
  </Animated.View>
164
179
  );
@@ -20,7 +20,7 @@ import { useSpringPressProgressValue } from "../../utils/hooks/useSpringPressPro
20
20
  import { WithTestID } from "../../utils/types";
21
21
  import { IOIcons, Icon } from "../icons";
22
22
  import { HSpacer } from "../spacer";
23
- import { LabelSmall } from "../typography";
23
+ import { BodySmall } from "../typography";
24
24
 
25
25
  type ColorMode = "light" | "dark";
26
26
 
@@ -257,9 +257,9 @@ const TabItem = ({
257
257
  <HSpacer size={4} />
258
258
  </>
259
259
  )}
260
- <LabelSmall weight="Semibold" color={foregroundColor}>
260
+ <BodySmall weight="Semibold" color={foregroundColor}>
261
261
  {label}
262
- </LabelSmall>
262
+ </BodySmall>
263
263
  </Animated.View>
264
264
  </Pressable>
265
265
  );
@@ -31,7 +31,7 @@ import { RNTextInputProps, getInputPropsByType } from "../../utils/textInput";
31
31
  import { InputType, WithTestID } from "../../utils/types";
32
32
  import { IOIconSizeScale, IOIcons, Icon } from "../icons";
33
33
  import { HSpacer } from "../spacer";
34
- import { LabelSmall } from "../typography";
34
+ import { BodySmall } from "../typography";
35
35
 
36
36
  type InputStatus = "initial" | "focused" | "disabled" | "error";
37
37
 
@@ -186,15 +186,15 @@ const HelperRow = ({
186
186
  }
187
187
  >
188
188
  {bottomMessage && (
189
- <LabelSmall weight="Regular" color={bottomMessageColor}>
189
+ <BodySmall weight="Regular" color={bottomMessageColor}>
190
190
  {bottomMessage}
191
- </LabelSmall>
191
+ </BodySmall>
192
192
  )}
193
193
  {counterLimit && (
194
- <LabelSmall
194
+ <BodySmall
195
195
  weight="Regular"
196
196
  color="grey-700"
197
- >{`${valueCount} / ${counterLimit}`}</LabelSmall>
197
+ >{`${valueCount} / ${counterLimit}`}</BodySmall>
198
198
  )}
199
199
  </View>
200
200
  );
@@ -10,7 +10,7 @@ import {
10
10
  } from "./IOText";
11
11
 
12
12
  type BodyStyleProps = TypographicStyleProps & {
13
- weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
13
+ weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
14
14
  } & TypographicStyleAsLinkProps;
15
15
 
16
16
  export const bodyFontSize = 16;
@@ -9,20 +9,17 @@ import {
9
9
  TypographicStyleProps
10
10
  } from "./IOText";
11
11
 
12
- type LabelSmallProps = TypographicStyleProps & {
13
- weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
12
+ type BodySmallProps = TypographicStyleProps & {
13
+ weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
14
14
  } & TypographicStyleAsLinkProps;
15
15
 
16
16
  const fontName: IOFontFamily = "Titillio";
17
- const fontWeight: IOFontWeight = "Semibold";
18
-
19
17
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
20
- const legacyFontWeight: IOFontWeight = "Semibold";
21
18
 
22
19
  /**
23
- * `LabelSmall` typographic style
20
+ * `BodySmall` typographic style
24
21
  */
25
- export const LabelSmall = forwardRef<View, LabelSmallProps>(
22
+ export const BodySmall = forwardRef<View, BodySmallProps>(
26
23
  (
27
24
  { weight: customWeight, color: customColor, asLink, ...props },
28
25
  ref?: ForwardedRef<View>
@@ -34,15 +31,11 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
34
31
  ? theme["interactiveElem-default"]
35
32
  : theme["textBody-tertiary"];
36
33
 
37
- const LabelSmallProps: IOTextProps = {
34
+ const BodySmallProps: IOTextProps = {
38
35
  ...props,
39
36
  dynamicTypeRamp: "footnote" /* iOS only */,
40
37
  font: isExperimental ? fontName : legacyFontName,
41
- weight: customWeight
42
- ? customWeight
43
- : isExperimental
44
- ? fontWeight
45
- : legacyFontWeight,
38
+ weight: customWeight ?? "Regular",
46
39
  size: 14,
47
40
  lineHeight: 21,
48
41
  color: customColor ?? defaultColor,
@@ -55,7 +48,7 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
55
48
  };
56
49
 
57
50
  return (
58
- <IOText ref={ref} {...LabelSmallProps}>
51
+ <IOText ref={ref} {...BodySmallProps}>
59
52
  {props.children}
60
53
  </IOText>
61
54
  );
@@ -2,7 +2,7 @@ import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
3
  import { useIOExperimentalDesign } from "../../core";
4
4
  import { IOColors } from "../../core/IOColors";
5
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
5
+ import { IOFontFamily, IOFontSize } from "../../utils/fonts";
6
6
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
7
7
 
8
8
  export const buttonTextFontSize: IOFontSize = 16;
@@ -10,11 +10,9 @@ export const buttonTextFontSize: IOFontSize = 16;
10
10
  `AnimatedText` for color transition through Reanimated */
11
11
  const defaultColor: IOColors = "white";
12
12
  const fontName: IOFontFamily = "Titillio";
13
- const fontWeight: IOFontWeight = "Semibold";
14
13
 
15
14
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
16
15
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
17
- const legacyFontWeight: IOFontWeight = "Bold";
18
16
 
19
17
  /**
20
18
  * `ButtonText` typographic style
@@ -26,7 +24,7 @@ export const ButtonText = forwardRef<View, TypographicStyleProps>(
26
24
  const ButtonTextProps: IOTextProps = {
27
25
  ...props,
28
26
  font: isExperimental ? fontName : legacyFontName,
29
- weight: isExperimental ? fontWeight : legacyFontWeight,
27
+ weight: "Semibold",
30
28
  size: buttonTextFontSize,
31
29
  lineHeight: 20,
32
30
  color: customColor ?? defaultColor
@@ -1,26 +1,29 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
3
+ import { useIOExperimentalDesign, useIOTheme } from "../../core";
4
4
  import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const defaultColor: keyof IOTheme = "textHeading-default";
7
+ type H3StyleProps = TypographicStyleProps & {
8
+ weight?: Extract<IOFontWeight, "Semibold" | "Bold">;
9
+ };
8
10
 
9
11
  /* Common typographic styles */
10
12
  export const h3FontSize: IOFontSize = 22;
11
13
  export const h3LineHeight = 33;
12
14
  const fontName: IOFontFamily = "Titillio";
13
- const fontWeight: IOFontWeight = "Semibold";
14
15
 
15
16
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
16
17
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
17
- const legacyFontWeight: IOFontWeight = "Semibold";
18
18
 
19
19
  /**
20
20
  * `H3` typographic style
21
21
  */
22
- export const H3 = forwardRef<View, TypographicStyleProps>(
23
- ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
22
+ export const H3 = forwardRef<View, H3StyleProps>(
23
+ (
24
+ { weight: customWeight, color: customColor, ...props },
25
+ ref?: ForwardedRef<View>
26
+ ) => {
24
27
  const theme = useIOTheme();
25
28
  const { isExperimental } = useIOExperimentalDesign();
26
29
 
@@ -28,10 +31,10 @@ export const H3 = forwardRef<View, TypographicStyleProps>(
28
31
  ...props,
29
32
  dynamicTypeRamp: "title2", // iOS only
30
33
  font: isExperimental ? fontName : legacyFontName,
31
- weight: isExperimental ? fontWeight : legacyFontWeight,
34
+ weight: customWeight ?? "Semibold",
32
35
  size: h3FontSize,
33
36
  lineHeight: h3LineHeight,
34
- color: customColor ?? theme[defaultColor]
37
+ color: customColor ?? theme["textHeading-default"]
35
38
  };
36
39
 
37
40
  return (
@@ -1,19 +1,18 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
3
  import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
4
+ import { IOFontFamily, IOFontSize } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
7
  const defaultColor: keyof IOTheme = "textHeading-default";
8
8
 
9
- export const h6FontSize: IOFontSize = 18;
9
+ export const h6FontSize: IOFontSize = 16;
10
10
  export const h6LineHeight = 24;
11
11
  const fontName: IOFontFamily = "Titillio";
12
- const fontWeight: IOFontWeight = "Semibold";
13
12
 
14
13
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
14
+ const legacyFontSize: IOFontSize = 18;
15
15
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
16
- const legacyFontWeight: IOFontWeight = "Semibold";
17
16
 
18
17
  /**
19
18
  * `H6` typographic style
@@ -27,9 +26,9 @@ export const H6 = forwardRef<View, TypographicStyleProps>(
27
26
  ...props,
28
27
  dynamicTypeRamp: "headline", // iOS only
29
28
  font: isExperimental ? fontName : legacyFontName,
30
- size: h6FontSize,
29
+ size: isExperimental ? h6FontSize : legacyFontSize,
31
30
  lineHeight: h6LineHeight,
32
- weight: isExperimental ? fontWeight : legacyFontWeight,
31
+ weight: "Semibold",
33
32
  color: customColor ?? theme[defaultColor]
34
33
  };
35
34
 
@@ -10,7 +10,7 @@ import {
10
10
  } from "./IOText";
11
11
 
12
12
  type LabelMiniProps = TypographicStyleProps & {
13
- weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
13
+ weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
14
14
  } & TypographicStyleAsLinkProps;
15
15
 
16
16
  const fontName: IOFontFamily = "Titillio";