@pagopa/io-app-design-system 4.4.4 → 5.0.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 (310) hide show
  1. package/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  2. package/lib/commonjs/components/accordion/index.js +0 -11
  3. package/lib/commonjs/components/accordion/index.js.map +1 -1
  4. package/lib/commonjs/components/badge/Badge.js +4 -4
  5. package/lib/commonjs/components/badge/Badge.js.map +1 -1
  6. package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
  7. package/lib/commonjs/components/banner/Banner.js +4 -4
  8. package/lib/commonjs/components/banner/Banner.js.map +1 -1
  9. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
  10. package/lib/commonjs/components/buttons/ButtonLink.js +25 -32
  11. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  12. package/lib/commonjs/components/buttons/ButtonOutline.js +18 -86
  13. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  14. package/lib/commonjs/components/buttons/ButtonSolid.js +9 -53
  15. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  16. package/lib/commonjs/components/buttons/IconButton.js +6 -36
  17. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  18. package/lib/commonjs/components/buttons/IconButtonContained.js +5 -50
  19. package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
  20. package/lib/commonjs/components/buttons/IconButtonSolid.js +5 -36
  21. package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
  22. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
  23. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +5 -15
  24. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
  25. package/lib/commonjs/components/checkbox/AnimatedMessageCheckbox.js +2 -9
  26. package/lib/commonjs/components/checkbox/AnimatedMessageCheckbox.js.map +1 -1
  27. package/lib/commonjs/components/layout/FooterActions.js +1 -5
  28. package/lib/commonjs/components/layout/FooterActions.js.map +1 -1
  29. package/lib/commonjs/components/layout/HeaderSecondLevel.js +3 -3
  30. package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
  31. package/lib/commonjs/components/layout/ModalBSHeader.js +3 -15
  32. package/lib/commonjs/components/layout/ModalBSHeader.js.map +1 -1
  33. package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -4
  34. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  35. package/lib/commonjs/components/listitems/ListItemTransaction.js +1 -4
  36. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  37. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +27 -27
  38. package/lib/commonjs/components/modules/ModuleIDP.js +4 -5
  39. package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
  40. package/lib/commonjs/components/numberpad/NumberButton.js +3 -18
  41. package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
  42. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
  43. package/lib/commonjs/components/radio/AnimatedRadio.js +4 -14
  44. package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
  45. package/lib/commonjs/components/searchInput/SearchInput.js +6 -10
  46. package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
  47. package/lib/commonjs/components/stepper/Stepper.js +1 -10
  48. package/lib/commonjs/components/stepper/Stepper.js.map +1 -1
  49. package/lib/commonjs/components/switch/NativeSwitch.js +2 -15
  50. package/lib/commonjs/components/switch/NativeSwitch.js.map +1 -1
  51. package/lib/commonjs/components/tabs/TabItem.js +6 -46
  52. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  53. package/lib/commonjs/components/tag/Tag.js +4 -4
  54. package/lib/commonjs/components/tag/Tag.js.map +1 -1
  55. package/lib/commonjs/components/textInput/TextInputBase.js +10 -20
  56. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
  57. package/lib/commonjs/components/typography/Body.js +4 -6
  58. package/lib/commonjs/components/typography/Body.js.map +1 -1
  59. package/lib/commonjs/components/typography/BodySmall.js +3 -3
  60. package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
  61. package/lib/commonjs/components/typography/ButtonText.js +6 -5
  62. package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
  63. package/lib/commonjs/components/typography/Caption.js +6 -12
  64. package/lib/commonjs/components/typography/Caption.js.map +1 -1
  65. package/lib/commonjs/components/typography/H1.js +6 -13
  66. package/lib/commonjs/components/typography/H1.js.map +1 -1
  67. package/lib/commonjs/components/typography/H2.js +8 -17
  68. package/lib/commonjs/components/typography/H2.js.map +1 -1
  69. package/lib/commonjs/components/typography/H3.js +4 -8
  70. package/lib/commonjs/components/typography/H3.js.map +1 -1
  71. package/lib/commonjs/components/typography/H4.js +7 -14
  72. package/lib/commonjs/components/typography/H4.js.map +1 -1
  73. package/lib/commonjs/components/typography/H5.js +5 -10
  74. package/lib/commonjs/components/typography/H5.js.map +1 -1
  75. package/lib/commonjs/components/typography/H6.js +7 -10
  76. package/lib/commonjs/components/typography/H6.js.map +1 -1
  77. package/lib/commonjs/components/typography/Hero.js +8 -17
  78. package/lib/commonjs/components/typography/Hero.js.map +1 -1
  79. package/lib/commonjs/components/typography/LabelMini.js +4 -6
  80. package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
  81. package/lib/commonjs/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
  82. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
  83. package/lib/commonjs/components/typography/markdown/MdH1.js +3 -3
  84. package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
  85. package/lib/commonjs/components/typography/markdown/MdH2.js +3 -3
  86. package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
  87. package/lib/commonjs/components/typography/markdown/MdH3.js +3 -3
  88. package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
  89. package/lib/commonjs/core/IOColors.js +1 -8
  90. package/lib/commonjs/core/IOColors.js.map +1 -1
  91. package/lib/commonjs/core/IODSExperimentalContextProvider.js +4 -3
  92. package/lib/commonjs/core/IODSExperimentalContextProvider.js.map +1 -1
  93. package/lib/commonjs/core/IONewTypefaceContextProvider.js +33 -0
  94. package/lib/commonjs/core/IONewTypefaceContextProvider.js.map +1 -0
  95. package/lib/commonjs/core/IOStyles.js +1 -49
  96. package/lib/commonjs/core/IOStyles.js.map +1 -1
  97. package/lib/commonjs/core/IOThemeContextProvider.js +4 -15
  98. package/lib/commonjs/core/IOThemeContextProvider.js.map +1 -1
  99. package/lib/commonjs/core/index.js +11 -0
  100. package/lib/commonjs/core/index.js.map +1 -1
  101. package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  102. package/lib/module/components/accordion/index.js +0 -1
  103. package/lib/module/components/accordion/index.js.map +1 -1
  104. package/lib/module/components/badge/Badge.js +5 -5
  105. package/lib/module/components/badge/Badge.js.map +1 -1
  106. package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
  107. package/lib/module/components/banner/Banner.js +5 -5
  108. package/lib/module/components/banner/Banner.js.map +1 -1
  109. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
  110. package/lib/module/components/buttons/ButtonLink.js +28 -35
  111. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  112. package/lib/module/components/buttons/ButtonOutline.js +19 -87
  113. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  114. package/lib/module/components/buttons/ButtonSolid.js +10 -54
  115. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  116. package/lib/module/components/buttons/IconButton.js +6 -37
  117. package/lib/module/components/buttons/IconButton.js.map +1 -1
  118. package/lib/module/components/buttons/IconButtonContained.js +6 -51
  119. package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
  120. package/lib/module/components/buttons/IconButtonSolid.js +6 -37
  121. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
  122. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
  123. package/lib/module/components/checkbox/AnimatedCheckbox.js +6 -16
  124. package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
  125. package/lib/module/components/checkbox/AnimatedMessageCheckbox.js +3 -10
  126. package/lib/module/components/checkbox/AnimatedMessageCheckbox.js.map +1 -1
  127. package/lib/module/components/layout/FooterActions.js +2 -6
  128. package/lib/module/components/layout/FooterActions.js.map +1 -1
  129. package/lib/module/components/layout/HeaderSecondLevel.js +4 -4
  130. package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
  131. package/lib/module/components/layout/ModalBSHeader.js +5 -17
  132. package/lib/module/components/layout/ModalBSHeader.js.map +1 -1
  133. package/lib/module/components/listitems/ListItemNavAlert.js +2 -5
  134. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  135. package/lib/module/components/listitems/ListItemTransaction.js +2 -5
  136. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  137. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +27 -27
  138. package/lib/module/components/modules/ModuleIDP.js +4 -5
  139. package/lib/module/components/modules/ModuleIDP.js.map +1 -1
  140. package/lib/module/components/numberpad/NumberButton.js +5 -20
  141. package/lib/module/components/numberpad/NumberButton.js.map +1 -1
  142. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
  143. package/lib/module/components/radio/AnimatedRadio.js +5 -15
  144. package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
  145. package/lib/module/components/searchInput/SearchInput.js +7 -11
  146. package/lib/module/components/searchInput/SearchInput.js.map +1 -1
  147. package/lib/module/components/stepper/Stepper.js +2 -11
  148. package/lib/module/components/stepper/Stepper.js.map +1 -1
  149. package/lib/module/components/switch/NativeSwitch.js +3 -16
  150. package/lib/module/components/switch/NativeSwitch.js.map +1 -1
  151. package/lib/module/components/tabs/TabItem.js +7 -47
  152. package/lib/module/components/tabs/TabItem.js.map +1 -1
  153. package/lib/module/components/tag/Tag.js +5 -5
  154. package/lib/module/components/tag/Tag.js.map +1 -1
  155. package/lib/module/components/textInput/TextInputBase.js +11 -21
  156. package/lib/module/components/textInput/TextInputBase.js.map +1 -1
  157. package/lib/module/components/typography/Body.js +5 -7
  158. package/lib/module/components/typography/Body.js.map +1 -1
  159. package/lib/module/components/typography/BodySmall.js +4 -4
  160. package/lib/module/components/typography/BodySmall.js.map +1 -1
  161. package/lib/module/components/typography/ButtonText.js +7 -6
  162. package/lib/module/components/typography/ButtonText.js.map +1 -1
  163. package/lib/module/components/typography/Caption.js +6 -12
  164. package/lib/module/components/typography/Caption.js.map +1 -1
  165. package/lib/module/components/typography/H1.js +6 -13
  166. package/lib/module/components/typography/H1.js.map +1 -1
  167. package/lib/module/components/typography/H2.js +8 -17
  168. package/lib/module/components/typography/H2.js.map +1 -1
  169. package/lib/module/components/typography/H3.js +4 -8
  170. package/lib/module/components/typography/H3.js.map +1 -1
  171. package/lib/module/components/typography/H4.js +7 -14
  172. package/lib/module/components/typography/H4.js.map +1 -1
  173. package/lib/module/components/typography/H5.js +6 -11
  174. package/lib/module/components/typography/H5.js.map +1 -1
  175. package/lib/module/components/typography/H6.js +7 -10
  176. package/lib/module/components/typography/H6.js.map +1 -1
  177. package/lib/module/components/typography/Hero.js +8 -17
  178. package/lib/module/components/typography/Hero.js.map +1 -1
  179. package/lib/module/components/typography/LabelMini.js +5 -7
  180. package/lib/module/components/typography/LabelMini.js.map +1 -1
  181. package/lib/module/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
  182. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
  183. package/lib/module/components/typography/markdown/MdH1.js +4 -4
  184. package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
  185. package/lib/module/components/typography/markdown/MdH2.js +4 -4
  186. package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
  187. package/lib/module/components/typography/markdown/MdH3.js +4 -4
  188. package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
  189. package/lib/module/core/IOColors.js +0 -6
  190. package/lib/module/core/IOColors.js.map +1 -1
  191. package/lib/module/core/IODSExperimentalContextProvider.js +2 -2
  192. package/lib/module/core/IODSExperimentalContextProvider.js.map +1 -1
  193. package/lib/module/core/IONewTypefaceContextProvider.js +22 -0
  194. package/lib/module/core/IONewTypefaceContextProvider.js.map +1 -0
  195. package/lib/module/core/IOStyles.js +0 -46
  196. package/lib/module/core/IOStyles.js.map +1 -1
  197. package/lib/module/core/IOThemeContextProvider.js +3 -12
  198. package/lib/module/core/IOThemeContextProvider.js.map +1 -1
  199. package/lib/module/core/index.js +1 -0
  200. package/lib/module/core/index.js.map +1 -1
  201. package/lib/typescript/components/accordion/index.d.ts +0 -1
  202. package/lib/typescript/components/accordion/index.d.ts.map +1 -1
  203. package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
  204. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  205. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  206. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  207. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  208. package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
  209. package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
  210. package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
  211. package/lib/typescript/components/checkbox/AnimatedMessageCheckbox.d.ts.map +1 -1
  212. package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
  213. package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
  214. package/lib/typescript/components/layout/ModalBSHeader.d.ts.map +1 -1
  215. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
  216. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  217. package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -1
  218. package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
  219. package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
  220. package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
  221. package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -1
  222. package/lib/typescript/components/switch/NativeSwitch.d.ts.map +1 -1
  223. package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
  224. package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
  225. package/lib/typescript/components/typography/Body.d.ts.map +1 -1
  226. package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
  227. package/lib/typescript/components/typography/Caption.d.ts.map +1 -1
  228. package/lib/typescript/components/typography/H1.d.ts.map +1 -1
  229. package/lib/typescript/components/typography/H2.d.ts +0 -3
  230. package/lib/typescript/components/typography/H2.d.ts.map +1 -1
  231. package/lib/typescript/components/typography/H3.d.ts.map +1 -1
  232. package/lib/typescript/components/typography/H4.d.ts.map +1 -1
  233. package/lib/typescript/components/typography/H5.d.ts.map +1 -1
  234. package/lib/typescript/components/typography/H6.d.ts.map +1 -1
  235. package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
  236. package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
  237. package/lib/typescript/core/IOColors.d.ts +0 -1
  238. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  239. package/lib/typescript/core/IODSExperimentalContextProvider.d.ts.map +1 -1
  240. package/lib/typescript/core/IONewTypefaceContextProvider.d.ts +16 -0
  241. package/lib/typescript/core/IONewTypefaceContextProvider.d.ts.map +1 -0
  242. package/lib/typescript/core/IOStyles.d.ts +2 -32
  243. package/lib/typescript/core/IOStyles.d.ts.map +1 -1
  244. package/lib/typescript/core/IOThemeContextProvider.d.ts +0 -4
  245. package/lib/typescript/core/IOThemeContextProvider.d.ts.map +1 -1
  246. package/lib/typescript/core/index.d.ts +1 -0
  247. package/lib/typescript/core/index.d.ts.map +1 -1
  248. package/lib/typescript/utils/fonts.d.ts +1 -1
  249. package/package.json +1 -1
  250. package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  251. package/src/components/accordion/index.tsx +0 -1
  252. package/src/components/badge/Badge.tsx +3 -3
  253. package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
  254. package/src/components/banner/Banner.tsx +3 -4
  255. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
  256. package/src/components/buttons/ButtonLink.tsx +38 -41
  257. package/src/components/buttons/ButtonOutline.tsx +31 -103
  258. package/src/components/buttons/ButtonSolid.tsx +11 -69
  259. package/src/components/buttons/IconButton.tsx +5 -49
  260. package/src/components/buttons/IconButtonContained.tsx +11 -58
  261. package/src/components/buttons/IconButtonSolid.tsx +9 -47
  262. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
  263. package/src/components/checkbox/AnimatedCheckbox.tsx +6 -34
  264. package/src/components/checkbox/AnimatedMessageCheckbox.tsx +3 -14
  265. package/src/components/layout/FooterActions.tsx +1 -4
  266. package/src/components/layout/HeaderSecondLevel.tsx +4 -3
  267. package/src/components/layout/ModalBSHeader.tsx +11 -29
  268. package/src/components/listitems/ListItemNavAlert.tsx +1 -4
  269. package/src/components/listitems/ListItemTransaction.tsx +1 -5
  270. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +27 -27
  271. package/src/components/modules/ModuleIDP.tsx +3 -8
  272. package/src/components/numberpad/NumberButton.tsx +4 -27
  273. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
  274. package/src/components/radio/AnimatedRadio.tsx +5 -33
  275. package/src/components/searchInput/SearchInput.tsx +11 -20
  276. package/src/components/stepper/Stepper.tsx +2 -20
  277. package/src/components/switch/NativeSwitch.tsx +3 -21
  278. package/src/components/tabs/TabItem.tsx +14 -61
  279. package/src/components/tag/Tag.tsx +3 -3
  280. package/src/components/textInput/TextInputBase.tsx +19 -34
  281. package/src/components/typography/Body.tsx +4 -11
  282. package/src/components/typography/BodySmall.tsx +3 -3
  283. package/src/components/typography/ButtonText.tsx +6 -6
  284. package/src/components/typography/Caption.tsx +6 -13
  285. package/src/components/typography/H1.tsx +6 -14
  286. package/src/components/typography/H2.tsx +8 -18
  287. package/src/components/typography/H3.tsx +4 -8
  288. package/src/components/typography/H4.tsx +7 -15
  289. package/src/components/typography/H5.tsx +6 -14
  290. package/src/components/typography/H6.tsx +7 -11
  291. package/src/components/typography/Hero.tsx +8 -18
  292. package/src/components/typography/LabelMini.tsx +4 -11
  293. package/src/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
  294. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
  295. package/src/components/typography/markdown/MdH1.tsx +3 -3
  296. package/src/components/typography/markdown/MdH2.tsx +3 -3
  297. package/src/components/typography/markdown/MdH3.tsx +3 -3
  298. package/src/core/IOColors.ts +0 -7
  299. package/src/core/IODSExperimentalContextProvider.tsx +2 -2
  300. package/src/core/IONewTypefaceContextProvider.tsx +37 -0
  301. package/src/core/IOStyles.ts +0 -52
  302. package/src/core/IOThemeContextProvider.tsx +3 -16
  303. package/src/core/index.ts +1 -0
  304. package/lib/commonjs/components/accordion/RawAccordion.js +0 -93
  305. package/lib/commonjs/components/accordion/RawAccordion.js.map +0 -1
  306. package/lib/module/components/accordion/RawAccordion.js +0 -86
  307. package/lib/module/components/accordion/RawAccordion.js.map +0 -1
  308. package/lib/typescript/components/accordion/RawAccordion.d.ts +0 -17
  309. package/lib/typescript/components/accordion/RawAccordion.d.ts.map +0 -1
  310. package/src/components/accordion/RawAccordion.tsx +0 -116
@@ -9,12 +9,7 @@ import Animated, {
9
9
  useSharedValue,
10
10
  withSpring
11
11
  } from "react-native-reanimated";
12
- import {
13
- IOColors,
14
- IOSpringValues,
15
- hexToRgba,
16
- useIOExperimentalDesign
17
- } from "../../core";
12
+ import { IOColors, IOSpringValues, hexToRgba } from "../../core";
18
13
  import { useScaleAnimation } from "../../hooks";
19
14
  import { WithTestID } from "../../utils/types";
20
15
  import { IOIcons, Icon } from "../icons";
@@ -93,46 +88,6 @@ const mapColorStates: Record<NonNullable<TabItem["color"]>, ColorStates> = {
93
88
  }
94
89
  };
95
90
 
96
- const mapLegacyColorStates: Record<
97
- NonNullable<TabItem["color"]>,
98
- ColorStates
99
- > = {
100
- light: {
101
- border: {
102
- default: IOColors["grey-300"],
103
- selected: IOColors.blue,
104
- disabled: hexToRgba(IOColors.white)
105
- },
106
- background: {
107
- default: IOColors.white,
108
- selected: hexToRgba(IOColors.blue, 0.1),
109
- pressed: IOColors.white
110
- },
111
- foreground: {
112
- default: "black",
113
- selected: "blue",
114
- disabled: "grey-700"
115
- }
116
- },
117
- dark: {
118
- border: {
119
- default: hexToRgba(IOColors.white, 0),
120
- selected: IOColors.white,
121
- disabled: hexToRgba(IOColors.white, 0.5)
122
- },
123
- background: {
124
- default: "#ffffff00",
125
- selected: IOColors.white,
126
- pressed: IOColors.white
127
- },
128
- foreground: {
129
- default: "white",
130
- selected: "black",
131
- disabled: "white"
132
- }
133
- }
134
- };
135
-
136
91
  const TabItem = ({
137
92
  label,
138
93
  color = "light",
@@ -150,29 +105,24 @@ const TabItem = ({
150
105
  useScaleAnimation();
151
106
  const reducedMotion = useReducedMotion();
152
107
 
153
- const { isExperimental } = useIOExperimentalDesign();
154
- const colors = useMemo(
155
- () =>
156
- isExperimental ? mapColorStates[color] : mapLegacyColorStates[color],
157
- [isExperimental, color]
158
- );
159
-
160
108
  const foregroundColor = useMemo(
161
109
  () =>
162
- colors.foreground[
110
+ mapColorStates[color].foreground[
163
111
  selected ? "selected" : disabled ? "disabled" : "default"
164
112
  ],
165
- [colors.foreground, selected, disabled]
113
+ [color, selected, disabled]
166
114
  );
167
115
 
168
116
  const borderColor = useMemo(
169
117
  () =>
170
- colors.border[selected ? "selected" : disabled ? "disabled" : "default"],
171
- [colors.border, selected, disabled]
118
+ mapColorStates[color].border[
119
+ selected ? "selected" : disabled ? "disabled" : "default"
120
+ ],
121
+ [color, selected, disabled]
172
122
  );
173
123
 
174
124
  const opaquePressedBackgroundColor = hexToRgba(
175
- colors.background.pressed,
125
+ mapColorStates[color].background.pressed,
176
126
  0.1
177
127
  );
178
128
 
@@ -192,19 +142,22 @@ const TabItem = ({
192
142
  const pressedBackgroundColor = interpolateColor(
193
143
  progress.value,
194
144
  [0, 1],
195
- [colors.background.default, opaquePressedBackgroundColor]
145
+ [mapColorStates[color].background.default, opaquePressedBackgroundColor]
196
146
  );
197
147
 
198
148
  const selectedBackgroundColor = interpolateColor(
199
149
  progressSelected.value,
200
150
  [0, 1],
201
- [opaquePressedBackgroundColor, colors.background.selected]
151
+ [opaquePressedBackgroundColor, mapColorStates[color].background.selected]
202
152
  );
203
153
 
204
154
  const selectedBorderColor = interpolateColor(
205
155
  progressSelected.value,
206
156
  [0, 1],
207
- [colors.border.default, colors.border.selected]
157
+ [
158
+ mapColorStates[color].border.default,
159
+ mapColorStates[color].border.selected
160
+ ]
208
161
  );
209
162
 
210
163
  return {
@@ -5,7 +5,7 @@ import {
5
5
  IOTagRadius,
6
6
  IOTheme,
7
7
  IOThemeLight,
8
- useIOExperimentalDesign,
8
+ useIONewTypeface,
9
9
  useIOTheme
10
10
  } from "../../core";
11
11
  import {
@@ -159,8 +159,8 @@ export const Tag = ({
159
159
  forceLightMode = false
160
160
  }: Tag) => {
161
161
  const theme = useIOTheme();
162
+ const { newTypefaceEnabled } = useIONewTypeface();
162
163
  const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
163
- const { isExperimental } = useIOExperimentalDesign();
164
164
 
165
165
  const variantProps = getVariantProps(variant, icon);
166
166
 
@@ -207,7 +207,7 @@ export const Tag = ({
207
207
  {text && (
208
208
  <IOText
209
209
  allowFontScaling={allowFontScaling}
210
- font={isExperimental ? "Titillio" : "TitilliumSansPro"}
210
+ font={newTypefaceEnabled ? "Titillio" : "TitilliumSansPro"}
211
211
  weight={"Semibold"}
212
212
  size={12}
213
213
  lineHeight={16}
@@ -23,7 +23,7 @@ import {
23
23
  IOColors,
24
24
  IOSpacingScale,
25
25
  hexToRgba,
26
- useIOExperimentalDesign,
26
+ useIONewTypeface,
27
27
  useIOTheme
28
28
  } from "../../core";
29
29
  import { useIOFontDynamicScale } from "../../utils/accessibility";
@@ -106,37 +106,12 @@ const styles = StyleSheet.create({
106
106
  to align to the label */
107
107
  ...(Platform.OS === "android" && { marginLeft: -4 })
108
108
  },
109
- textInputStyleFont: {
110
- ...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Medium")
111
- },
112
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
113
- textInputStyleLegacyFont: {
114
- ...makeFontStyleObject(
115
- inputLabelFontSize,
116
- "TitilliumSansPro",
117
- undefined,
118
- "Semibold"
119
- )
120
- },
121
109
  textInputLabelWrapper: {
122
110
  position: "absolute",
123
111
  zIndex: 10,
124
112
  bottom: 0,
125
113
  top: 0,
126
114
  justifyContent: "center"
127
- },
128
- textInputLabel: {
129
- color: inputLabelColor,
130
- ...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Regular")
131
- },
132
- textInputLabelLegacyFont: {
133
- color: inputLabelColor,
134
- ...makeFontStyleObject(
135
- inputLabelFontSize,
136
- "TitilliumSansPro",
137
- undefined,
138
- "Regular"
139
- )
140
115
  }
141
116
  });
142
117
 
@@ -234,6 +209,7 @@ export const TextInputBase = ({
234
209
  const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
235
210
 
236
211
  const theme = useIOTheme();
212
+ const { newTypefaceEnabled } = useIONewTypeface();
237
213
 
238
214
  /* Get the label width to enable the correct translation */
239
215
  const [labelWidth, setLabelWidth] = React.useState<number>(0);
@@ -359,8 +335,6 @@ export const TextInputBase = ({
359
335
  [value, derivedInputProps]
360
336
  );
361
337
 
362
- const { isExperimental } = useIOExperimentalDesign();
363
-
364
338
  return (
365
339
  <>
366
340
  <Pressable
@@ -426,10 +400,15 @@ export const TextInputBase = ({
426
400
  blurOnSubmit={true}
427
401
  onChangeText={onChangeTextHandler}
428
402
  style={[
403
+ {
404
+ ...makeFontStyleObject(
405
+ inputLabelFontSize,
406
+ newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
407
+ undefined,
408
+ "Regular"
409
+ )
410
+ },
429
411
  styles.textInputStyle,
430
- isExperimental
431
- ? styles.textInputStyleFont
432
- : styles.textInputStyleLegacyFont,
433
412
  !disabled
434
413
  ? { color: inputTextColor }
435
414
  : { color: inputDisabledTextColor }
@@ -464,9 +443,15 @@ export const TextInputBase = ({
464
443
  numberOfLines={1}
465
444
  accessible={false}
466
445
  style={[
467
- isExperimental
468
- ? styles.textInputLabel
469
- : styles.textInputLabelLegacyFont,
446
+ {
447
+ ...makeFontStyleObject(
448
+ inputLabelFontSize,
449
+ newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
450
+ undefined,
451
+ "Regular"
452
+ ),
453
+ color: inputLabelColor
454
+ },
470
455
  animatedLabelStyle
471
456
  ]}
472
457
  >
@@ -1,6 +1,6 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOExperimentalDesign, useIOTheme } from "../../core";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
4
  import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
5
5
  import {
6
6
  IOText,
@@ -17,10 +17,7 @@ export const bodyFontSize = 16;
17
17
  export const bodyLineHeight = 24;
18
18
 
19
19
  const fontName: IOFontFamily = "Titillio";
20
- const fontWeight: IOFontWeight = "Regular";
21
-
22
20
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
23
- const legacyFontWeight: IOFontWeight = "Regular";
24
21
 
25
22
  /**
26
23
  * `Body` typographic style
@@ -31,7 +28,7 @@ export const Body = forwardRef<View, BodyStyleProps>(
31
28
  ref?: ForwardedRef<View>
32
29
  ) => {
33
30
  const theme = useIOTheme();
34
- const { isExperimental } = useIOExperimentalDesign();
31
+ const { newTypefaceEnabled } = useIONewTypeface();
35
32
 
36
33
  const defaultColor = asLink
37
34
  ? theme["interactiveElem-default"]
@@ -40,12 +37,8 @@ export const Body = forwardRef<View, BodyStyleProps>(
40
37
  const BodyProps: IOTextProps = {
41
38
  ...props,
42
39
  dynamicTypeRamp: "body", // iOS only
43
- font: isExperimental ? fontName : legacyFontName,
44
- weight: customWeight
45
- ? customWeight
46
- : isExperimental
47
- ? fontWeight
48
- : legacyFontWeight,
40
+ font: newTypefaceEnabled ? fontName : legacyFontName,
41
+ weight: customWeight ? customWeight : "Regular",
49
42
  size: bodyFontSize,
50
43
  lineHeight: bodyLineHeight,
51
44
  color: customColor ?? defaultColor,
@@ -1,6 +1,6 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOExperimentalDesign, useIOTheme } from "../../core";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
4
  import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
5
5
  import {
6
6
  IOText,
@@ -25,7 +25,7 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
25
25
  ref?: ForwardedRef<View>
26
26
  ) => {
27
27
  const theme = useIOTheme();
28
- const { isExperimental } = useIOExperimentalDesign();
28
+ const { newTypefaceEnabled } = useIONewTypeface();
29
29
 
30
30
  const defaultColor = asLink
31
31
  ? theme["interactiveElem-default"]
@@ -34,7 +34,7 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
34
34
  const BodySmallProps: IOTextProps = {
35
35
  ...props,
36
36
  dynamicTypeRamp: "footnote" /* iOS only */,
37
- font: isExperimental ? fontName : legacyFontName,
37
+ font: newTypefaceEnabled ? fontName : legacyFontName,
38
38
  weight: customWeight ?? "Regular",
39
39
  size: 14,
40
40
  lineHeight: 21,
@@ -1,18 +1,16 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOExperimentalDesign } from "../../core";
4
- import { IOColors } from "../../core/IOColors";
3
+ import { IOColors, useIONewTypeface } from "../../core";
5
4
  import { IOFontFamily, IOFontSize } from "../../utils/fonts";
6
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
7
6
 
8
7
  export const buttonTextFontSize: IOFontSize = 16;
9
8
  export const buttonTextLineHeight = 20;
9
+
10
10
  /* Needed to render `ButtonOutline` and`ButtonLink` because they use
11
11
  `AnimatedText` for color transition through Reanimated */
12
12
  const defaultColor: IOColors = "white";
13
13
  const fontName: IOFontFamily = "Titillio";
14
-
15
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
16
14
  const legacyFontName: IOFontFamily = "TitilliumSansPro";
17
15
 
18
16
  /**
@@ -20,14 +18,16 @@ const legacyFontName: IOFontFamily = "TitilliumSansPro";
20
18
  */
21
19
  export const ButtonText = forwardRef<View, TypographicStyleProps>(
22
20
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
23
- const { isExperimental } = useIOExperimentalDesign();
21
+ const { newTypefaceEnabled } = useIONewTypeface();
24
22
 
25
23
  const ButtonTextProps: IOTextProps = {
26
24
  ...props,
27
- font: isExperimental ? fontName : legacyFontName,
25
+ font: newTypefaceEnabled ? fontName : legacyFontName,
28
26
  weight: "Semibold",
29
27
  size: buttonTextFontSize,
30
28
  lineHeight: buttonTextLineHeight,
29
+ /* Needed to render `ButtonOutline` and`ButtonLink` because they use
30
+ `AnimatedText` for color transition through Reanimated */
31
31
  color: customColor ?? defaultColor
32
32
  };
33
33
 
@@ -1,17 +1,10 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
+ import { IOFontSize } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const defaultColor: keyof IOTheme = "textBody-default";
8
-
9
7
  export const captionFontSize: IOFontSize = 12;
10
- const fontName: IOFontFamily = "Titillio";
11
- const fontWeight: IOFontWeight = "Regular";
12
-
13
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
14
- const legacyFontName: IOFontFamily = "TitilliumSansPro";
15
8
 
16
9
  /**
17
10
  * `Caption` typographic style
@@ -19,15 +12,15 @@ const legacyFontName: IOFontFamily = "TitilliumSansPro";
19
12
  export const Caption = forwardRef<View, TypographicStyleProps>(
20
13
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
21
14
  const theme = useIOTheme();
22
- const { isExperimental } = useIOExperimentalDesign();
15
+ const { newTypefaceEnabled } = useIONewTypeface();
23
16
 
24
17
  const CaptionProps: IOTextProps = {
25
18
  ...props,
26
19
  dynamicTypeRamp: "caption1", // iOS only
27
- font: isExperimental ? fontName : legacyFontName,
20
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
21
+ weight: "Regular",
28
22
  size: captionFontSize,
29
- weight: fontWeight,
30
- color: customColor ?? theme[defaultColor],
23
+ color: customColor ?? theme["textBody-default"],
31
24
  textStyle: {
32
25
  textTransform: "uppercase",
33
26
  letterSpacing: 0.5
@@ -1,19 +1,11 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
+ import { IOFontSize } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const defaultColor: keyof IOTheme = "textHeading-default";
8
-
9
7
  export const h1FontSize: IOFontSize = 28;
10
8
  export const h1LineHeight = 42;
11
- const fontName: IOFontFamily = "Titillio";
12
- const fontWeight: IOFontWeight = "Semibold";
13
-
14
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
- const legacyFontName: IOFontFamily = "TitilliumSansPro";
16
- const legacyFontWeight: IOFontWeight = "Semibold";
17
9
 
18
10
  /**
19
11
  * `H1` typographic style
@@ -21,16 +13,16 @@ const legacyFontWeight: IOFontWeight = "Semibold";
21
13
  export const H1 = forwardRef<View, TypographicStyleProps>(
22
14
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
23
15
  const theme = useIOTheme();
24
- const { isExperimental } = useIOExperimentalDesign();
16
+ const { newTypefaceEnabled } = useIONewTypeface();
25
17
 
26
18
  const H1Props: IOTextProps = {
27
19
  ...props,
28
20
  dynamicTypeRamp: "largeTitle", // iOS only
29
- font: isExperimental ? fontName : legacyFontName,
30
- weight: isExperimental ? fontWeight : legacyFontWeight,
21
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
22
+ weight: "Semibold",
31
23
  size: h1FontSize,
32
24
  lineHeight: h1LineHeight,
33
- color: customColor ?? theme[defaultColor]
25
+ color: customColor ?? theme["textHeading-default"]
34
26
  };
35
27
 
36
28
  return (
@@ -1,21 +1,11 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
+ import { IOFontSize } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const defaultColor: keyof IOTheme = "textHeading-default";
8
-
9
7
  export const h2FontSize: IOFontSize = 26;
10
8
  export const h2LineHeight = 34;
11
- const fontName: IOFontFamily = "Titillio";
12
- const fontWeight: IOFontWeight = "Semibold";
13
-
14
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
- const legacyH2FontSize: IOFontSize = 28;
16
- const legacyH2LineHeight = 34;
17
- const legacyFontName: IOFontFamily = "TitilliumSansPro";
18
- const legacyFontWeight: IOFontWeight = "Semibold";
19
9
 
20
10
  /**
21
11
  * `H2` typographic style
@@ -23,16 +13,16 @@ const legacyFontWeight: IOFontWeight = "Semibold";
23
13
  export const H2 = forwardRef<View, TypographicStyleProps>(
24
14
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
25
15
  const theme = useIOTheme();
26
- const { isExperimental } = useIOExperimentalDesign();
16
+ const { newTypefaceEnabled } = useIONewTypeface();
27
17
 
28
18
  const H2Props: IOTextProps = {
29
19
  ...props,
30
20
  dynamicTypeRamp: "title1", // iOS only
31
- font: isExperimental ? fontName : legacyFontName,
32
- size: isExperimental ? h2FontSize : legacyH2FontSize,
33
- weight: isExperimental ? fontWeight : legacyFontWeight,
34
- color: customColor ?? theme[defaultColor],
35
- lineHeight: isExperimental ? h2LineHeight : legacyH2LineHeight
21
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
22
+ weight: "Semibold",
23
+ size: h2FontSize,
24
+ lineHeight: h2LineHeight,
25
+ color: customColor ?? theme["textHeading-default"]
36
26
  };
37
27
 
38
28
  return (
@@ -1,7 +1,7 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
+ import { IOFontSize, IOFontWeight } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
7
  type H3StyleProps = TypographicStyleProps & {
@@ -11,10 +11,6 @@ type H3StyleProps = TypographicStyleProps & {
11
11
  /* Common typographic styles */
12
12
  export const h3FontSize: IOFontSize = 22;
13
13
  export const h3LineHeight = 33;
14
- const fontName: IOFontFamily = "Titillio";
15
-
16
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
17
- const legacyFontName: IOFontFamily = "TitilliumSansPro";
18
14
 
19
15
  /**
20
16
  * `H3` typographic style
@@ -25,12 +21,12 @@ export const H3 = forwardRef<View, H3StyleProps>(
25
21
  ref?: ForwardedRef<View>
26
22
  ) => {
27
23
  const theme = useIOTheme();
28
- const { isExperimental } = useIOExperimentalDesign();
24
+ const { newTypefaceEnabled } = useIONewTypeface();
29
25
 
30
26
  const H3Props: IOTextProps = {
31
27
  ...props,
32
28
  dynamicTypeRamp: "title2", // iOS only
33
- font: isExperimental ? fontName : legacyFontName,
29
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
34
30
  weight: customWeight ?? "Semibold",
35
31
  size: h3FontSize,
36
32
  lineHeight: h3LineHeight,
@@ -1,19 +1,11 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
+ import { IOFontSize } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const defaultColor: keyof IOTheme = "textHeading-default";
8
-
9
7
  export const h4FontSize: IOFontSize = 20;
10
8
  export const h4LineHeight = 24;
11
- const fontName: IOFontFamily = "Titillio";
12
- const fontWeight: IOFontWeight = "Semibold";
13
-
14
- // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
15
- const legacyFontName: IOFontFamily = "TitilliumSansPro";
16
- const legacyFontWeight: IOFontWeight = "Semibold";
17
9
 
18
10
  /**
19
11
  * `H4` typographic style
@@ -21,16 +13,16 @@ const legacyFontWeight: IOFontWeight = "Semibold";
21
13
  export const H4 = forwardRef<View, TypographicStyleProps>(
22
14
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
23
15
  const theme = useIOTheme();
24
- const { isExperimental } = useIOExperimentalDesign();
16
+ const { newTypefaceEnabled } = useIONewTypeface();
25
17
 
26
18
  const H4Props: IOTextProps = {
27
19
  ...props,
28
20
  dynamicTypeRamp: "title3", // iOS only
29
- font: isExperimental ? fontName : legacyFontName,
21
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
22
+ weight: "Semibold",
30
23
  size: h4FontSize,
31
- weight: isExperimental ? fontWeight : legacyFontWeight,
32
- color: customColor ?? theme[defaultColor],
33
- lineHeight: h4LineHeight
24
+ lineHeight: h4LineHeight,
25
+ color: customColor ?? theme["textHeading-default"]
34
26
  };
35
27
 
36
28
  return (
@@ -1,17 +1,9 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
+ import { IOFontSize } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const defaultColor: keyof IOTheme = "textHeading-default";
8
-
9
- const fontName: IOFontFamily = "Titillio";
10
- const fontWeight: IOFontWeight = "Semibold";
11
-
12
- const legacyFontName: IOFontFamily = "TitilliumSansPro";
13
- const legacyFontWeight: IOFontWeight = "Semibold";
14
-
15
7
  export const h5FontSize: IOFontSize = 14;
16
8
  export const h5LineHeight = 16;
17
9
 
@@ -21,16 +13,16 @@ export const h5LineHeight = 16;
21
13
  export const H5 = forwardRef<View, TypographicStyleProps>(
22
14
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
23
15
  const theme = useIOTheme();
24
- const { isExperimental } = useIOExperimentalDesign();
16
+ const { newTypefaceEnabled } = useIONewTypeface();
25
17
 
26
18
  const H5Props: IOTextProps = {
27
19
  ...props,
28
20
  dynamicTypeRamp: "subheadline", // iOS only
29
- font: isExperimental ? fontName : legacyFontName,
30
- weight: isExperimental ? fontWeight : legacyFontWeight,
21
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
22
+ weight: "Semibold",
31
23
  size: h5FontSize,
32
24
  lineHeight: h5LineHeight,
33
- color: customColor ?? theme[defaultColor],
25
+ color: customColor ?? theme["textHeading-default"],
34
26
  textStyle: {
35
27
  textTransform: "uppercase",
36
28
  letterSpacing: 0.5
@@ -1,18 +1,14 @@
1
1
  import React, { ForwardedRef, forwardRef } from "react";
2
2
  import { View } from "react-native";
3
- import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
4
- import { IOFontFamily, IOFontSize } from "../../utils/fonts";
3
+ import { useIONewTypeface, useIOTheme } from "../../core";
4
+ import { IOFontSize } from "../../utils/fonts";
5
5
  import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
6
6
 
7
- const defaultColor: keyof IOTheme = "textHeading-default";
8
-
9
7
  export const h6FontSize: IOFontSize = 16;
10
8
  export const h6LineHeight = 24;
11
- const fontName: IOFontFamily = "Titillio";
12
9
 
13
10
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
14
11
  const legacyFontSize: IOFontSize = 17;
15
- const legacyFontName: IOFontFamily = "TitilliumSansPro";
16
12
 
17
13
  /**
18
14
  * `H6` typographic style
@@ -20,16 +16,16 @@ const legacyFontName: IOFontFamily = "TitilliumSansPro";
20
16
  export const H6 = forwardRef<View, TypographicStyleProps>(
21
17
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
22
18
  const theme = useIOTheme();
23
- const { isExperimental } = useIOExperimentalDesign();
19
+ const { newTypefaceEnabled } = useIONewTypeface();
24
20
 
25
21
  const H6Props: IOTextProps = {
26
22
  ...props,
27
23
  dynamicTypeRamp: "headline", // iOS only
28
- font: isExperimental ? fontName : legacyFontName,
29
- size: isExperimental ? h6FontSize : legacyFontSize,
30
- lineHeight: h6LineHeight,
24
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
31
25
  weight: "Semibold",
32
- color: customColor ?? theme[defaultColor]
26
+ size: newTypefaceEnabled ? h6FontSize : legacyFontSize,
27
+ lineHeight: h6LineHeight,
28
+ color: customColor ?? theme["textHeading-default"]
33
29
  };
34
30
 
35
31
  return (