@pagopa/io-app-design-system 3.1.0 → 4.0.1

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 (278) 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/badge/Badge.js +95 -14
  6. package/lib/commonjs/components/badge/Badge.js.map +1 -1
  7. package/lib/commonjs/components/banner/Banner.js +1 -1
  8. package/lib/commonjs/components/banner/Banner.js.map +1 -1
  9. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  10. package/lib/commonjs/components/buttons/ButtonLink.js +1 -1
  11. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  12. package/lib/commonjs/components/buttons/ButtonOutline.js +1 -1
  13. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  14. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  15. package/lib/commonjs/components/featureInfo/FeatureInfo.js +3 -2
  16. package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
  17. package/lib/commonjs/components/layout/HeaderFirstLevel.js +1 -0
  18. package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
  19. package/lib/commonjs/components/listitems/ListItemCheckbox.js +1 -1
  20. package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
  21. package/lib/commonjs/components/listitems/ListItemInfo.js +1 -1
  22. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  23. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
  24. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  25. package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
  26. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  27. package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
  28. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  29. package/lib/commonjs/components/listitems/ListItemRadio.js +1 -1
  30. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
  31. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +2 -2
  32. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  33. package/lib/commonjs/components/listitems/ListItemSwitch.js +1 -1
  34. package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
  35. package/lib/commonjs/components/listitems/ListItemTransaction.js +2 -2
  36. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  37. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  38. package/lib/commonjs/components/modules/ModuleAttachment.js +1 -1
  39. package/lib/commonjs/components/modules/ModuleAttachment.js.map +1 -1
  40. package/lib/commonjs/components/modules/ModuleCheckout.js +1 -1
  41. package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -1
  42. package/lib/commonjs/components/modules/ModuleCredential.js +1 -1
  43. package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
  44. package/lib/commonjs/components/modules/ModuleNavigation.js +3 -2
  45. package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
  46. package/lib/commonjs/components/modules/ModulePaymentNotice.js +2 -2
  47. package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
  48. package/lib/commonjs/components/modules/ModuleSummary.js +1 -1
  49. package/lib/commonjs/components/modules/ModuleSummary.js.map +1 -1
  50. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +1 -1
  51. package/lib/commonjs/components/otpInput/BoxedInput.js +4 -6
  52. package/lib/commonjs/components/otpInput/BoxedInput.js.map +1 -1
  53. package/lib/commonjs/components/otpInput/OTPInput.js +5 -4
  54. package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
  55. package/lib/commonjs/components/stack/Stack.js +2 -2
  56. package/lib/commonjs/components/stack/Stack.js.map +1 -1
  57. package/lib/commonjs/components/tabs/TabItem.js +1 -1
  58. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  59. package/lib/commonjs/components/tag/Tag.js +40 -26
  60. package/lib/commonjs/components/tag/Tag.js.map +1 -1
  61. package/lib/commonjs/components/textInput/TextInputBase.js +2 -2
  62. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
  63. package/lib/commonjs/components/typography/{LabelSmall.js → BodySmall.js} +8 -10
  64. package/lib/commonjs/components/typography/BodySmall.js.map +1 -0
  65. package/lib/commonjs/components/typography/ButtonText.js +1 -3
  66. package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
  67. package/lib/commonjs/components/typography/H3.js +3 -6
  68. package/lib/commonjs/components/typography/H3.js.map +1 -1
  69. package/lib/commonjs/components/typography/H6.js +4 -5
  70. package/lib/commonjs/components/typography/H6.js.map +1 -1
  71. package/lib/commonjs/components/typography/IOText.js.map +1 -1
  72. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  73. package/lib/commonjs/components/typography/__test__/typography.test.js +6 -18
  74. package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
  75. package/lib/commonjs/components/typography/index.js +28 -72
  76. package/lib/commonjs/components/typography/index.js.map +1 -1
  77. package/lib/commonjs/core/IOColors.js +9 -1
  78. package/lib/commonjs/core/IOColors.js.map +1 -1
  79. package/lib/commonjs/utils/fonts.js.map +1 -1
  80. package/lib/module/components/alert/Alert.js +2 -3
  81. package/lib/module/components/alert/Alert.js.map +1 -1
  82. package/lib/module/components/alert/AlertEdgeToEdge.js +2 -2
  83. package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
  84. package/lib/module/components/badge/Badge.js +96 -15
  85. package/lib/module/components/badge/Badge.js.map +1 -1
  86. package/lib/module/components/banner/Banner.js +2 -2
  87. package/lib/module/components/banner/Banner.js.map +1 -1
  88. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  89. package/lib/module/components/buttons/ButtonLink.js +1 -1
  90. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  91. package/lib/module/components/buttons/ButtonOutline.js +1 -1
  92. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  93. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  94. package/lib/module/components/featureInfo/FeatureInfo.js +4 -3
  95. package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
  96. package/lib/module/components/layout/HeaderFirstLevel.js +1 -0
  97. package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
  98. package/lib/module/components/listitems/ListItemCheckbox.js +2 -2
  99. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
  100. package/lib/module/components/listitems/ListItemInfo.js +2 -2
  101. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  102. package/lib/module/components/listitems/ListItemInfoCopy.js +2 -2
  103. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  104. package/lib/module/components/listitems/ListItemNav.js +2 -2
  105. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  106. package/lib/module/components/listitems/ListItemNavAlert.js +2 -2
  107. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  108. package/lib/module/components/listitems/ListItemRadio.js +2 -2
  109. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  110. package/lib/module/components/listitems/ListItemRadioWithAmount.js +3 -3
  111. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  112. package/lib/module/components/listitems/ListItemSwitch.js +2 -2
  113. package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
  114. package/lib/module/components/listitems/ListItemTransaction.js +3 -3
  115. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  116. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  117. package/lib/module/components/modules/ModuleAttachment.js +2 -2
  118. package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
  119. package/lib/module/components/modules/ModuleCheckout.js +2 -2
  120. package/lib/module/components/modules/ModuleCheckout.js.map +1 -1
  121. package/lib/module/components/modules/ModuleCredential.js +2 -2
  122. package/lib/module/components/modules/ModuleCredential.js.map +1 -1
  123. package/lib/module/components/modules/ModuleNavigation.js +4 -3
  124. package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
  125. package/lib/module/components/modules/ModulePaymentNotice.js +3 -3
  126. package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
  127. package/lib/module/components/modules/ModuleSummary.js +2 -2
  128. package/lib/module/components/modules/ModuleSummary.js.map +1 -1
  129. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +1 -1
  130. package/lib/module/components/otpInput/BoxedInput.js +5 -7
  131. package/lib/module/components/otpInput/BoxedInput.js.map +1 -1
  132. package/lib/module/components/otpInput/OTPInput.js +5 -4
  133. package/lib/module/components/otpInput/OTPInput.js.map +1 -1
  134. package/lib/module/components/stack/Stack.js +2 -2
  135. package/lib/module/components/stack/Stack.js.map +1 -1
  136. package/lib/module/components/tabs/TabItem.js +2 -2
  137. package/lib/module/components/tabs/TabItem.js.map +1 -1
  138. package/lib/module/components/tag/Tag.js +41 -27
  139. package/lib/module/components/tag/Tag.js.map +1 -1
  140. package/lib/module/components/textInput/TextInputBase.js +3 -3
  141. package/lib/module/components/textInput/TextInputBase.js.map +1 -1
  142. package/lib/module/components/typography/{LabelSmall.js → BodySmall.js} +6 -8
  143. package/lib/module/components/typography/BodySmall.js.map +1 -0
  144. package/lib/module/components/typography/ButtonText.js +1 -3
  145. package/lib/module/components/typography/ButtonText.js.map +1 -1
  146. package/lib/module/components/typography/H3.js +3 -6
  147. package/lib/module/components/typography/H3.js.map +1 -1
  148. package/lib/module/components/typography/H6.js +4 -5
  149. package/lib/module/components/typography/H6.js.map +1 -1
  150. package/lib/module/components/typography/IOText.js.map +1 -1
  151. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  152. package/lib/module/components/typography/__test__/typography.test.js +6 -18
  153. package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
  154. package/lib/module/components/typography/index.js +6 -10
  155. package/lib/module/components/typography/index.js.map +1 -1
  156. package/lib/module/core/IOColors.js +9 -1
  157. package/lib/module/core/IOColors.js.map +1 -1
  158. package/lib/module/utils/fonts.js.map +1 -1
  159. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  160. package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
  161. package/lib/typescript/components/banner/Banner.d.ts +1 -1
  162. package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
  163. package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
  164. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
  165. package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
  166. package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
  167. package/lib/typescript/components/otpInput/BoxedInput.d.ts.map +1 -1
  168. package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
  169. package/lib/typescript/components/tag/Tag.d.ts +13 -8
  170. package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
  171. package/lib/typescript/components/typography/Body.d.ts +1 -1
  172. package/lib/typescript/components/typography/Body.d.ts.map +1 -1
  173. package/lib/typescript/components/typography/BodyMonospace.d.ts +1 -1
  174. package/lib/typescript/components/typography/BodySmall.d.ts +13 -0
  175. package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -0
  176. package/lib/typescript/components/typography/ButtonText.d.ts +1 -1
  177. package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
  178. package/lib/typescript/components/typography/Caption.d.ts +1 -1
  179. package/lib/typescript/components/typography/H1.d.ts +1 -1
  180. package/lib/typescript/components/typography/H2.d.ts +1 -1
  181. package/lib/typescript/components/typography/H3.d.ts +3 -1
  182. package/lib/typescript/components/typography/H3.d.ts.map +1 -1
  183. package/lib/typescript/components/typography/H4.d.ts +1 -1
  184. package/lib/typescript/components/typography/H5.d.ts +1 -1
  185. package/lib/typescript/components/typography/H6.d.ts +1 -1
  186. package/lib/typescript/components/typography/H6.d.ts.map +1 -1
  187. package/lib/typescript/components/typography/Hero.d.ts +1 -1
  188. package/lib/typescript/components/typography/IOText.d.ts +2 -2
  189. package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
  190. package/lib/typescript/components/typography/LabelMini.d.ts +1 -1
  191. package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
  192. package/lib/typescript/components/typography/index.d.ts +6 -10
  193. package/lib/typescript/components/typography/index.d.ts.map +1 -1
  194. package/lib/typescript/components/typography/markdown/MdH1.d.ts +1 -1
  195. package/lib/typescript/components/typography/markdown/MdH2.d.ts +1 -1
  196. package/lib/typescript/components/typography/markdown/MdH3.d.ts +1 -1
  197. package/lib/typescript/core/IOColors.d.ts +2 -1
  198. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  199. package/lib/typescript/utils/fonts.d.ts +3 -3
  200. package/lib/typescript/utils/fonts.d.ts.map +1 -1
  201. package/package.json +1 -1
  202. package/src/components/alert/Alert.tsx +3 -4
  203. package/src/components/alert/AlertEdgeToEdge.tsx +3 -3
  204. package/src/components/badge/Badge.tsx +109 -19
  205. package/src/components/banner/Banner.tsx +7 -5
  206. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  207. package/src/components/buttons/ButtonLink.tsx +1 -1
  208. package/src/components/buttons/ButtonOutline.tsx +1 -1
  209. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  210. package/src/components/featureInfo/FeatureInfo.tsx +6 -6
  211. package/src/components/layout/HeaderFirstLevel.tsx +1 -0
  212. package/src/components/listitems/ListItemCheckbox.tsx +3 -3
  213. package/src/components/listitems/ListItemInfo.tsx +3 -3
  214. package/src/components/listitems/ListItemInfoCopy.tsx +3 -3
  215. package/src/components/listitems/ListItemNav.tsx +3 -3
  216. package/src/components/listitems/ListItemNavAlert.tsx +3 -3
  217. package/src/components/listitems/ListItemRadio.tsx +3 -3
  218. package/src/components/listitems/ListItemRadioWithAmount.tsx +5 -5
  219. package/src/components/listitems/ListItemSwitch.tsx +4 -4
  220. package/src/components/listitems/ListItemTransaction.tsx +5 -5
  221. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  222. package/src/components/modules/ModuleAttachment.tsx +3 -3
  223. package/src/components/modules/ModuleCheckout.tsx +3 -3
  224. package/src/components/modules/ModuleCredential.tsx +3 -3
  225. package/src/components/modules/ModuleNavigation.tsx +6 -4
  226. package/src/components/modules/ModulePaymentNotice.tsx +5 -5
  227. package/src/components/modules/ModuleSummary.tsx +3 -3
  228. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +1 -1
  229. package/src/components/otpInput/BoxedInput.tsx +6 -5
  230. package/src/components/otpInput/OTPInput.tsx +23 -8
  231. package/src/components/stack/Stack.tsx +2 -2
  232. package/src/components/tabs/TabItem.tsx +3 -3
  233. package/src/components/tag/Tag.tsx +66 -33
  234. package/src/components/textInput/TextInputBase.tsx +5 -5
  235. package/src/components/typography/Body.tsx +1 -1
  236. package/src/components/typography/{LabelSmall.tsx → BodySmall.tsx} +7 -14
  237. package/src/components/typography/ButtonText.tsx +2 -4
  238. package/src/components/typography/H3.tsx +11 -8
  239. package/src/components/typography/H6.tsx +5 -6
  240. package/src/components/typography/IOText.tsx +1 -2
  241. package/src/components/typography/LabelMini.tsx +1 -1
  242. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  243. package/src/components/typography/__test__/typography.test.tsx +8 -24
  244. package/src/components/typography/index.tsx +6 -10
  245. package/src/core/IOColors.ts +11 -0
  246. package/src/utils/fonts.ts +2 -2
  247. package/lib/commonjs/components/typography/BaseTypography.js +0 -52
  248. package/lib/commonjs/components/typography/BaseTypography.js.map +0 -1
  249. package/lib/commonjs/components/typography/Chip.js +0 -41
  250. package/lib/commonjs/components/typography/Chip.js.map +0 -1
  251. package/lib/commonjs/components/typography/Factory.js +0 -62
  252. package/lib/commonjs/components/typography/Factory.js.map +0 -1
  253. package/lib/commonjs/components/typography/Label.js +0 -51
  254. package/lib/commonjs/components/typography/Label.js.map +0 -1
  255. package/lib/commonjs/components/typography/LabelSmall.js.map +0 -1
  256. package/lib/module/components/typography/BaseTypography.js +0 -44
  257. package/lib/module/components/typography/BaseTypography.js.map +0 -1
  258. package/lib/module/components/typography/Chip.js +0 -32
  259. package/lib/module/components/typography/Chip.js.map +0 -1
  260. package/lib/module/components/typography/Factory.js +0 -55
  261. package/lib/module/components/typography/Factory.js.map +0 -1
  262. package/lib/module/components/typography/Label.js +0 -42
  263. package/lib/module/components/typography/Label.js.map +0 -1
  264. package/lib/module/components/typography/LabelSmall.js.map +0 -1
  265. package/lib/typescript/components/typography/BaseTypography.d.ts +0 -29
  266. package/lib/typescript/components/typography/BaseTypography.d.ts.map +0 -1
  267. package/lib/typescript/components/typography/Chip.d.ts +0 -13
  268. package/lib/typescript/components/typography/Chip.d.ts.map +0 -1
  269. package/lib/typescript/components/typography/Factory.d.ts +0 -43
  270. package/lib/typescript/components/typography/Factory.d.ts.map +0 -1
  271. package/lib/typescript/components/typography/Label.d.ts +0 -13
  272. package/lib/typescript/components/typography/Label.d.ts.map +0 -1
  273. package/lib/typescript/components/typography/LabelSmall.d.ts +0 -13
  274. package/lib/typescript/components/typography/LabelSmall.d.ts.map +0 -1
  275. package/src/components/typography/BaseTypography.tsx +0 -71
  276. package/src/components/typography/Chip.tsx +0 -33
  277. package/src/components/typography/Factory.tsx +0 -98
  278. package/src/components/typography/Label.tsx +0 -62
@@ -7,7 +7,7 @@ import { Badge } from "../badge";
7
7
  import { Icon } from "../icons";
8
8
  import { LoadingSpinner } from "../loadingSpinner";
9
9
  import { HStack, VStack } from "../stack";
10
- import { Label } from "../typography";
10
+ import { Body } from "../typography";
11
11
  import { ModuleStatic } from "./ModuleStatic";
12
12
  import { PressableModuleBase } from "./PressableModuleBase";
13
13
 
@@ -66,13 +66,13 @@ const ModuleAttachmentContent = ({
66
66
  space={4}
67
67
  style={{ alignItems: "flex-start", flexShrink: 1, flexGrow: 1 }}
68
68
  >
69
- <Label
69
+ <Body
70
70
  weight="Semibold"
71
71
  numberOfLines={2}
72
72
  color={theme["interactiveElem-default"]}
73
73
  >
74
74
  {title}
75
- </Label>
75
+ </Body>
76
76
  <Badge text={format.toUpperCase()} variant="default" />
77
77
  </VStack>
78
78
  <IconOrActivityIndicatorComponent />
@@ -15,7 +15,7 @@ import {
15
15
  import { ButtonLink } from "../buttons";
16
16
  import { IOLogoPaymentType, LogoPayment } from "../logos";
17
17
  import { HStack, VStack } from "../stack";
18
- import { H6, LabelSmall } from "../typography";
18
+ import { H6, BodySmall } from "../typography";
19
19
  import { ModuleStatic } from "./ModuleStatic";
20
20
  import { PressableModuleBase } from "./PressableModuleBase";
21
21
 
@@ -70,9 +70,9 @@ export const ModuleCheckout = (props: ModuleCheckoutProps) => {
70
70
  <View style={{ flexGrow: 1, flexShrink: 1 }}>
71
71
  <H6 color={theme["textBody-default"]}>{title}</H6>
72
72
  {subtitle && (
73
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
73
+ <BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
74
74
  {subtitle}
75
- </LabelSmall>
75
+ </BodySmall>
76
76
  )}
77
77
  </View>
78
78
  </HStack>
@@ -20,7 +20,7 @@ import { Badge } from "../badge";
20
20
  import { IOIcons, Icon } from "../icons";
21
21
  import { LoadingSpinner } from "../loadingSpinner";
22
22
  import { HStack } from "../stack/Stack";
23
- import { LabelSmall } from "../typography";
23
+ import { BodySmall } from "../typography";
24
24
  import { ModuleStatic } from "./ModuleStatic";
25
25
  import {
26
26
  PressableModuleBase,
@@ -89,7 +89,7 @@ const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
89
89
  {/* Graphical assets */}
90
90
  {iconComponent ?? imageComponent}
91
91
 
92
- <LabelSmall
92
+ <BodySmall
93
93
  color={theme["interactiveElem-default"]}
94
94
  weight="Semibold"
95
95
  numberOfLines={2}
@@ -97,7 +97,7 @@ const ModuleCredential = (props: WithTestID<ModuleCredentialProps>) => {
97
97
  style={{ flexShrink: 1 }}
98
98
  >
99
99
  {label}
100
- </LabelSmall>
100
+ </BodySmall>
101
101
  </HStack>
102
102
  <View style={IOStyles.row}>
103
103
  {badge ? (
@@ -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, LabelSmall } from "../typography";
21
+ import { LabelMini, BodySmall } from "../typography";
22
22
  import { ModuleStatic } from "./ModuleStatic";
23
23
  import {
24
24
  PressableModuleBase,
@@ -79,7 +79,7 @@ export const ModuleNavigation = (props: WithTestID<ModuleNavigationProps>) => {
79
79
  {iconComponent ?? imageComponent}
80
80
 
81
81
  <View style={{ flexShrink: 1 }}>
82
- <LabelSmall
82
+ <BodySmall
83
83
  color={theme["interactiveElem-default"]}
84
84
  weight="Semibold"
85
85
  numberOfLines={2}
@@ -87,9 +87,11 @@ export const ModuleNavigation = (props: WithTestID<ModuleNavigationProps>) => {
87
87
  style={{ flexShrink: 1 }}
88
88
  >
89
89
  {title}
90
- </LabelSmall>
90
+ </BodySmall>
91
91
  {subtitle && (
92
- <Chip color={theme["textBody-tertiary"]}>{subtitle}</Chip>
92
+ <LabelMini weight="Regular" color={theme["textBody-tertiary"]}>
93
+ {subtitle}
94
+ </LabelMini>
93
95
  )}
94
96
  </View>
95
97
  </HStack>
@@ -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 }}>
@@ -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
  >
@@ -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
  );
@@ -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
  >
@@ -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
  );
@@ -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={{
@@ -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 (