@pagopa/io-app-design-system 4.3.0 → 4.4.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 (309) hide show
  1. package/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
  2. package/lib/commonjs/components/alert/Alert.js +34 -34
  3. package/lib/commonjs/components/alert/Alert.js.map +1 -1
  4. package/lib/commonjs/components/badge/Badge.js +16 -3
  5. package/lib/commonjs/components/badge/Badge.js.map +1 -1
  6. package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +9 -5
  7. package/lib/commonjs/components/banner/Banner.js.map +1 -1
  8. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
  9. package/lib/commonjs/components/buttons/ButtonLink.js +6 -1
  10. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  11. package/lib/commonjs/components/buttons/ButtonOutline.js +11 -9
  12. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  13. package/lib/commonjs/components/buttons/ButtonSolid.js +10 -6
  14. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  15. package/lib/commonjs/components/buttons/IconButton.js +2 -0
  16. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  17. package/lib/commonjs/components/buttons/IconButtonSolid.js +1 -0
  18. package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
  19. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +27 -9
  20. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +23 -18
  21. package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
  22. package/lib/commonjs/components/checkbox/CheckboxLabel.js +13 -8
  23. package/lib/commonjs/components/checkbox/CheckboxLabel.js.map +1 -1
  24. package/lib/commonjs/components/common/AnimatedTick.js +7 -3
  25. package/lib/commonjs/components/common/AnimatedTick.js.map +1 -1
  26. package/lib/commonjs/components/common/LogoPaymentWithFallback.js +9 -3
  27. package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -1
  28. package/lib/commonjs/components/featureInfo/FeatureInfo.js +9 -6
  29. package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
  30. package/lib/commonjs/components/icons/Icon.js +14 -7
  31. package/lib/commonjs/components/icons/Icon.js.map +1 -1
  32. package/lib/commonjs/components/layout/HeaderFirstLevel.js +7 -10
  33. package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
  34. package/lib/commonjs/components/layout/HeaderSecondLevel.js +8 -9
  35. package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
  36. package/lib/commonjs/components/listitems/ListItemAction.js +11 -7
  37. package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
  38. package/lib/commonjs/components/listitems/ListItemAmount.js +13 -11
  39. package/lib/commonjs/components/listitems/ListItemAmount.js.map +1 -1
  40. package/lib/commonjs/components/listitems/ListItemCheckbox.js +12 -7
  41. package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
  42. package/lib/commonjs/components/listitems/ListItemHeader.js +9 -2
  43. package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
  44. package/lib/commonjs/components/listitems/ListItemInfo.js +14 -17
  45. package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
  46. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +15 -13
  47. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  48. package/lib/commonjs/components/listitems/ListItemNav.js +20 -17
  49. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  50. package/lib/commonjs/components/listitems/ListItemNavAlert.js +19 -14
  51. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  52. package/lib/commonjs/components/listitems/ListItemRadio.js +24 -9
  53. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
  54. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +5 -0
  55. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  56. package/lib/commonjs/components/listitems/ListItemSwitch.js +12 -14
  57. package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
  58. package/lib/commonjs/components/listitems/ListItemTransaction.js +2 -0
  59. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  60. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +435 -429
  61. package/lib/commonjs/components/modules/ModuleCredential.js +7 -2
  62. package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
  63. package/lib/commonjs/components/modules/ModuleNavigation.js +5 -1
  64. package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
  65. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -20
  66. package/lib/commonjs/components/pictograms/Pictogram.js +17 -4
  67. package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
  68. package/lib/commonjs/components/radio/AnimatedRadio.js +16 -15
  69. package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
  70. package/lib/commonjs/components/radio/RadioButtonLabel.js +9 -5
  71. package/lib/commonjs/components/radio/RadioButtonLabel.js.map +1 -1
  72. package/lib/commonjs/components/searchInput/SearchInput.js +4 -3
  73. package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
  74. package/lib/commonjs/components/spacer/Spacer.js +13 -6
  75. package/lib/commonjs/components/spacer/Spacer.js.map +1 -1
  76. package/lib/commonjs/components/stack/Stack.js +19 -9
  77. package/lib/commonjs/components/stack/Stack.js.map +1 -1
  78. package/lib/commonjs/components/tag/Tag.js +21 -8
  79. package/lib/commonjs/components/tag/Tag.js.map +1 -1
  80. package/lib/commonjs/components/textInput/TextInput.js.map +1 -1
  81. package/lib/commonjs/components/textInput/TextInputBase.js +23 -10
  82. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
  83. package/lib/commonjs/components/typography/IOText.js +3 -6
  84. package/lib/commonjs/components/typography/IOText.js.map +1 -1
  85. package/lib/commonjs/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +84 -84
  86. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -50
  87. package/lib/commonjs/utils/accessibility.js +24 -1
  88. package/lib/commonjs/utils/accessibility.js.map +1 -1
  89. package/lib/commonjs/utils/fonts.js +3 -2
  90. package/lib/commonjs/utils/fonts.js.map +1 -1
  91. package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
  92. package/lib/module/components/alert/Alert.js +35 -35
  93. package/lib/module/components/alert/Alert.js.map +1 -1
  94. package/lib/module/components/badge/Badge.js +16 -3
  95. package/lib/module/components/badge/Badge.js.map +1 -1
  96. package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +9 -5
  97. package/lib/module/components/banner/Banner.js.map +1 -1
  98. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
  99. package/lib/module/components/buttons/ButtonLink.js +6 -1
  100. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  101. package/lib/module/components/buttons/ButtonOutline.js +11 -9
  102. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  103. package/lib/module/components/buttons/ButtonSolid.js +10 -6
  104. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  105. package/lib/module/components/buttons/IconButton.js +2 -0
  106. package/lib/module/components/buttons/IconButton.js.map +1 -1
  107. package/lib/module/components/buttons/IconButtonSolid.js +1 -0
  108. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
  109. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +27 -9
  110. package/lib/module/components/checkbox/AnimatedCheckbox.js +23 -18
  111. package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
  112. package/lib/module/components/checkbox/CheckboxLabel.js +14 -9
  113. package/lib/module/components/checkbox/CheckboxLabel.js.map +1 -1
  114. package/lib/module/components/common/AnimatedTick.js +7 -3
  115. package/lib/module/components/common/AnimatedTick.js.map +1 -1
  116. package/lib/module/components/common/LogoPaymentWithFallback.js +9 -3
  117. package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -1
  118. package/lib/module/components/featureInfo/FeatureInfo.js +11 -8
  119. package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
  120. package/lib/module/components/icons/Icon.js +15 -6
  121. package/lib/module/components/icons/Icon.js.map +1 -1
  122. package/lib/module/components/layout/HeaderFirstLevel.js +8 -11
  123. package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
  124. package/lib/module/components/layout/HeaderSecondLevel.js +9 -10
  125. package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
  126. package/lib/module/components/listitems/ListItemAction.js +11 -7
  127. package/lib/module/components/listitems/ListItemAction.js.map +1 -1
  128. package/lib/module/components/listitems/ListItemAmount.js +13 -11
  129. package/lib/module/components/listitems/ListItemAmount.js.map +1 -1
  130. package/lib/module/components/listitems/ListItemCheckbox.js +14 -9
  131. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
  132. package/lib/module/components/listitems/ListItemHeader.js +9 -2
  133. package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
  134. package/lib/module/components/listitems/ListItemInfo.js +14 -17
  135. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  136. package/lib/module/components/listitems/ListItemInfoCopy.js +15 -13
  137. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  138. package/lib/module/components/listitems/ListItemNav.js +22 -19
  139. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  140. package/lib/module/components/listitems/ListItemNavAlert.js +21 -16
  141. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  142. package/lib/module/components/listitems/ListItemRadio.js +25 -10
  143. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  144. package/lib/module/components/listitems/ListItemRadioWithAmount.js +6 -1
  145. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  146. package/lib/module/components/listitems/ListItemSwitch.js +12 -14
  147. package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
  148. package/lib/module/components/listitems/ListItemTransaction.js +2 -0
  149. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  150. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +435 -429
  151. package/lib/module/components/modules/ModuleCredential.js +7 -2
  152. package/lib/module/components/modules/ModuleCredential.js.map +1 -1
  153. package/lib/module/components/modules/ModuleNavigation.js +5 -1
  154. package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
  155. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -20
  156. package/lib/module/components/pictograms/Pictogram.js +17 -4
  157. package/lib/module/components/pictograms/Pictogram.js.map +1 -1
  158. package/lib/module/components/radio/AnimatedRadio.js +16 -15
  159. package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
  160. package/lib/module/components/radio/RadioButtonLabel.js +10 -6
  161. package/lib/module/components/radio/RadioButtonLabel.js.map +1 -1
  162. package/lib/module/components/searchInput/SearchInput.js +5 -4
  163. package/lib/module/components/searchInput/SearchInput.js.map +1 -1
  164. package/lib/module/components/spacer/Spacer.js +11 -5
  165. package/lib/module/components/spacer/Spacer.js.map +1 -1
  166. package/lib/module/components/stack/Stack.js +19 -9
  167. package/lib/module/components/stack/Stack.js.map +1 -1
  168. package/lib/module/components/tag/Tag.js +21 -8
  169. package/lib/module/components/tag/Tag.js.map +1 -1
  170. package/lib/module/components/textInput/TextInput.js.map +1 -1
  171. package/lib/module/components/textInput/TextInputBase.js +23 -10
  172. package/lib/module/components/textInput/TextInputBase.js.map +1 -1
  173. package/lib/module/components/typography/IOText.js +5 -8
  174. package/lib/module/components/typography/IOText.js.map +1 -1
  175. package/lib/module/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +84 -84
  176. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -50
  177. package/lib/module/utils/accessibility.js +23 -1
  178. package/lib/module/utils/accessibility.js.map +1 -1
  179. package/lib/module/utils/fonts.js +1 -0
  180. package/lib/module/utils/fonts.js.map +1 -1
  181. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  182. package/lib/typescript/components/badge/Badge.d.ts +2 -1
  183. package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
  184. package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
  185. package/lib/typescript/components/buttons/ButtonLink.d.ts +1 -1
  186. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  187. package/lib/typescript/components/buttons/ButtonOutline.d.ts +1 -1
  188. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  189. package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
  190. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  191. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  192. package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
  193. package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts +2 -1
  194. package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
  195. package/lib/typescript/components/checkbox/CheckboxLabel.d.ts +2 -1
  196. package/lib/typescript/components/checkbox/CheckboxLabel.d.ts.map +1 -1
  197. package/lib/typescript/components/common/AnimatedTick.d.ts +4 -3
  198. package/lib/typescript/components/common/AnimatedTick.d.ts.map +1 -1
  199. package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -1
  200. package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
  201. package/lib/typescript/components/icons/Icon.d.ts +5 -3
  202. package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
  203. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
  204. package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
  205. package/lib/typescript/components/listitems/ListItemAction.d.ts.map +1 -1
  206. package/lib/typescript/components/listitems/ListItemAmount.d.ts.map +1 -1
  207. package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -1
  208. package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -1
  209. package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
  210. package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
  211. package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
  212. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
  213. package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -1
  214. package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
  215. package/lib/typescript/components/listitems/ListItemSwitch.d.ts +2 -2
  216. package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
  217. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  218. package/lib/typescript/components/modules/ModuleCredential.d.ts.map +1 -1
  219. package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
  220. package/lib/typescript/components/pictograms/Pictogram.d.ts +5 -3
  221. package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
  222. package/lib/typescript/components/pictograms/types.d.ts +1 -2
  223. package/lib/typescript/components/pictograms/types.d.ts.map +1 -1
  224. package/lib/typescript/components/radio/AnimatedRadio.d.ts +2 -1
  225. package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
  226. package/lib/typescript/components/radio/RadioButtonLabel.d.ts +2 -1
  227. package/lib/typescript/components/radio/RadioButtonLabel.d.ts.map +1 -1
  228. package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
  229. package/lib/typescript/components/spacer/Spacer.d.ts +1 -0
  230. package/lib/typescript/components/spacer/Spacer.d.ts.map +1 -1
  231. package/lib/typescript/components/stack/Stack.d.ts +2 -1
  232. package/lib/typescript/components/stack/Stack.d.ts.map +1 -1
  233. package/lib/typescript/components/tag/Tag.d.ts +4 -2
  234. package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
  235. package/lib/typescript/components/textInput/TextInput.d.ts +2 -1
  236. package/lib/typescript/components/textInput/TextInput.d.ts.map +1 -1
  237. package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
  238. package/lib/typescript/components/typography/BodyMonospace.d.ts +1 -1
  239. package/lib/typescript/components/typography/ButtonText.d.ts +1 -1
  240. package/lib/typescript/components/typography/Caption.d.ts +1 -1
  241. package/lib/typescript/components/typography/H1.d.ts +1 -1
  242. package/lib/typescript/components/typography/H2.d.ts +4 -1
  243. package/lib/typescript/components/typography/H2.d.ts.map +1 -1
  244. package/lib/typescript/components/typography/H3.d.ts +1 -1
  245. package/lib/typescript/components/typography/H4.d.ts +1 -1
  246. package/lib/typescript/components/typography/H5.d.ts +1 -1
  247. package/lib/typescript/components/typography/H6.d.ts +1 -1
  248. package/lib/typescript/components/typography/Hero.d.ts +1 -1
  249. package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
  250. package/lib/typescript/components/typography/markdown/MdH1.d.ts +1 -1
  251. package/lib/typescript/components/typography/markdown/MdH2.d.ts +1 -1
  252. package/lib/typescript/components/typography/markdown/MdH3.d.ts +1 -1
  253. package/lib/typescript/core/IOStyles.d.ts +7 -7
  254. package/lib/typescript/utils/accessibility.d.ts +10 -0
  255. package/lib/typescript/utils/accessibility.d.ts.map +1 -1
  256. package/lib/typescript/utils/fonts.d.ts +2 -1
  257. package/lib/typescript/utils/fonts.d.ts.map +1 -1
  258. package/package.json +1 -1
  259. package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +3 -3
  260. package/src/components/alert/Alert.tsx +43 -61
  261. package/src/components/badge/Badge.tsx +29 -4
  262. package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +9 -5
  263. package/src/components/banner/Banner.tsx +0 -2
  264. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
  265. package/src/components/buttons/ButtonLink.tsx +4 -0
  266. package/src/components/buttons/ButtonOutline.tsx +24 -25
  267. package/src/components/buttons/ButtonSolid.tsx +10 -9
  268. package/src/components/buttons/IconButton.tsx +2 -0
  269. package/src/components/buttons/IconButtonSolid.tsx +1 -0
  270. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +27 -9
  271. package/src/components/checkbox/AnimatedCheckbox.tsx +36 -18
  272. package/src/components/checkbox/CheckboxLabel.tsx +22 -10
  273. package/src/components/common/AnimatedTick.tsx +9 -3
  274. package/src/components/common/LogoPaymentWithFallback.tsx +27 -5
  275. package/src/components/featureInfo/FeatureInfo.tsx +13 -9
  276. package/src/components/icons/Icon.tsx +23 -7
  277. package/src/components/layout/HeaderFirstLevel.tsx +11 -21
  278. package/src/components/layout/HeaderSecondLevel.tsx +5 -14
  279. package/src/components/listitems/ListItemAction.tsx +19 -8
  280. package/src/components/listitems/ListItemAmount.tsx +16 -11
  281. package/src/components/listitems/ListItemCheckbox.tsx +29 -15
  282. package/src/components/listitems/ListItemHeader.tsx +12 -2
  283. package/src/components/listitems/ListItemInfo.tsx +27 -20
  284. package/src/components/listitems/ListItemInfoCopy.tsx +27 -16
  285. package/src/components/listitems/ListItemNav.tsx +44 -40
  286. package/src/components/listitems/ListItemNavAlert.tsx +30 -16
  287. package/src/components/listitems/ListItemRadio.tsx +46 -32
  288. package/src/components/listitems/ListItemRadioWithAmount.tsx +7 -2
  289. package/src/components/listitems/ListItemSwitch.tsx +21 -27
  290. package/src/components/listitems/ListItemTransaction.tsx +3 -0
  291. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +435 -429
  292. package/src/components/modules/ModuleCredential.tsx +5 -2
  293. package/src/components/modules/ModuleNavigation.tsx +3 -1
  294. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +20 -20
  295. package/src/components/pictograms/Pictogram.tsx +24 -5
  296. package/src/components/pictograms/types.ts +1 -3
  297. package/src/components/radio/AnimatedRadio.tsx +31 -15
  298. package/src/components/radio/RadioButtonLabel.tsx +16 -8
  299. package/src/components/searchInput/SearchInput.tsx +10 -5
  300. package/src/components/spacer/Spacer.tsx +21 -6
  301. package/src/components/stack/Stack.tsx +25 -14
  302. package/src/components/tag/Tag.tsx +26 -8
  303. package/src/components/textInput/TextInput.tsx +2 -1
  304. package/src/components/textInput/TextInputBase.tsx +44 -11
  305. package/src/components/typography/IOText.tsx +5 -6
  306. package/src/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +84 -84
  307. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -50
  308. package/src/utils/accessibility.ts +29 -1
  309. package/src/utils/fonts.ts +1 -0
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Platform, StyleSheet, View } from "react-native";
2
+ import { Platform, StyleSheet, View, ViewStyle } from "react-native";
3
3
  import {
4
4
  IOColors,
5
5
  IOTagRadius,
@@ -13,6 +13,7 @@ import {
13
13
  IOTagHSpacing,
14
14
  IOTagVSpacing
15
15
  } from "../../core/IOSpacing";
16
+ import { useIOFontDynamicScale } from "../../utils/accessibility";
16
17
  import { WithTestID } from "../../utils/types";
17
18
  import { IOIconSizeScale, IOIcons, Icon } from "../icons";
18
19
  import { IOText } from "../typography";
@@ -62,7 +63,9 @@ export type Tag = TextProps & { forceLightMode?: boolean } & WithTestID<
62
63
  variant: "custom";
63
64
  icon: VariantProps;
64
65
  }
65
- >;
66
+ > & {
67
+ allowFontScaling?: boolean;
68
+ };
66
69
 
67
70
  const IOTagIconMargin: IOSpacingScale = 6;
68
71
  const IOTagIconSize: IOIconSizeScale = 16;
@@ -79,16 +82,17 @@ const styles = StyleSheet.create({
79
82
  }
80
83
  }),
81
84
  borderWidth: 1,
85
+ borderCurve: "continuous"
86
+ },
87
+ tagStatic: {
82
88
  borderRadius: IOTagRadius,
83
89
  borderCurve: "continuous",
84
90
  paddingHorizontal: IOTagHSpacing,
85
- paddingVertical: IOTagVSpacing
91
+ paddingVertical: IOTagVSpacing,
92
+ columnGap: IOTagIconMargin
86
93
  },
87
94
  iconWrapper: {
88
95
  flexShrink: 1
89
- },
90
- spacer: {
91
- width: IOTagIconMargin
92
96
  }
93
97
  });
94
98
 
@@ -151,9 +155,11 @@ export const Tag = ({
151
155
  testID,
152
156
  icon,
153
157
  iconAccessibilityLabel,
158
+ allowFontScaling = true,
154
159
  forceLightMode = false
155
160
  }: Tag) => {
156
161
  const theme = useIOTheme();
162
+ const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
157
163
  const { isExperimental } = useIOExperimentalDesign();
158
164
 
159
165
  const variantProps = getVariantProps(variant, icon);
@@ -166,14 +172,26 @@ export const Tag = ({
166
172
  ? IOColors[IOThemeLight["appBackground-primary"]]
167
173
  : IOColors[theme["appBackground-primary"]];
168
174
 
175
+ const tagDynamic: ViewStyle = {
176
+ paddingHorizontal: IOTagHSpacing * dynamicFontScale,
177
+ paddingVertical: IOTagVSpacing * dynamicFontScale,
178
+ columnGap: IOTagIconMargin * dynamicFontScale * spacingScaleMultiplier,
179
+ borderRadius: IOTagRadius * dynamicFontScale
180
+ };
181
+
169
182
  return (
170
183
  <View
171
184
  testID={testID}
172
- style={[styles.tag, { borderColor, backgroundColor }]}
185
+ style={[
186
+ styles.tag,
187
+ allowFontScaling ? tagDynamic : styles.tagStatic,
188
+ { borderColor, backgroundColor }
189
+ ]}
173
190
  >
174
191
  {variantProps && (
175
192
  <View style={styles.iconWrapper}>
176
193
  <Icon
194
+ allowFontScaling={allowFontScaling}
177
195
  name={variantProps.name}
178
196
  color={
179
197
  forceLightMode
@@ -186,9 +204,9 @@ export const Tag = ({
186
204
  />
187
205
  </View>
188
206
  )}
189
- {variantProps && text && <View style={styles.spacer} />}
190
207
  {text && (
191
208
  <IOText
209
+ allowFontScaling={allowFontScaling}
192
210
  font={isExperimental ? "Titillio" : "TitilliumSansPro"}
193
211
  weight={"Semibold"}
194
212
  size={12}
@@ -1,8 +1,9 @@
1
1
  import * as React from "react";
2
+ import { ComponentProps } from "react";
2
3
  import { TextInputBase } from "./TextInputBase";
3
4
 
4
5
  type TextInputProps = Omit<
5
- React.ComponentProps<typeof TextInputBase>,
6
+ ComponentProps<typeof TextInputBase>,
6
7
  | "rightElement"
7
8
  | "status"
8
9
  | "bottomMessageColor"
@@ -26,6 +26,7 @@ import {
26
26
  useIOExperimentalDesign,
27
27
  useIOTheme
28
28
  } from "../../core";
29
+ import { useIOFontDynamicScale } from "../../utils/accessibility";
29
30
  import { IOFontSize, makeFontStyleObject } from "../../utils/fonts";
30
31
  import { RNTextInputProps, getInputPropsByType } from "../../utils/textInput";
31
32
  import { InputType, WithTestID } from "../../utils/types";
@@ -78,8 +79,7 @@ const styles = StyleSheet.create({
78
79
  flexDirection: "row",
79
80
  alignItems: "center",
80
81
  height: inputHeight,
81
- paddingVertical: inputPaddingVertical,
82
- paddingHorizontal: inputPaddingHorizontal
82
+ paddingVertical: inputPaddingVertical
83
83
  },
84
84
  textInputOuterBorder: {
85
85
  ...StyleSheet.absoluteFillObject,
@@ -107,7 +107,7 @@ const styles = StyleSheet.create({
107
107
  ...(Platform.OS === "android" && { marginLeft: -4 })
108
108
  },
109
109
  textInputStyleFont: {
110
- ...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Regular")
110
+ ...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Medium")
111
111
  },
112
112
  // TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
113
113
  textInputStyleLegacyFont: {
@@ -120,20 +120,23 @@ const styles = StyleSheet.create({
120
120
  },
121
121
  textInputLabelWrapper: {
122
122
  position: "absolute",
123
- paddingHorizontal: inputPaddingHorizontal,
124
123
  zIndex: 10,
125
124
  bottom: 0,
126
125
  top: 0,
127
126
  justifyContent: "center"
128
127
  },
129
128
  textInputLabel: {
129
+ color: inputLabelColor,
130
+ ...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Regular")
131
+ },
132
+ textInputLabelLegacyFont: {
133
+ color: inputLabelColor,
130
134
  ...makeFontStyleObject(
131
135
  inputLabelFontSize,
132
136
  "TitilliumSansPro",
133
137
  undefined,
134
138
  "Regular"
135
- ),
136
- color: inputLabelColor
139
+ )
137
140
  }
138
141
  });
139
142
 
@@ -227,6 +230,9 @@ export const TextInputBase = ({
227
230
  disabled ? "disabled" : "initial"
228
231
  );
229
232
  const focusedState = useSharedValue<number>(0);
233
+
234
+ const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
235
+
230
236
  const theme = useIOTheme();
231
237
 
232
238
  /* Get the label width to enable the correct translation */
@@ -361,7 +367,11 @@ export const TextInputBase = ({
361
367
  onPress={onTextInputPress}
362
368
  style={[
363
369
  inputStatus === "disabled" ? { opacity: inputDisabledOpacity } : {},
364
- styles.textInput
370
+ styles.textInput,
371
+ {
372
+ paddingHorizontal:
373
+ inputPaddingHorizontal * dynamicFontScale * spacingScaleMultiplier
374
+ }
365
375
  ]}
366
376
  accessible={false}
367
377
  accessibilityRole={"none"}
@@ -384,8 +394,13 @@ export const TextInputBase = ({
384
394
 
385
395
  {icon && (
386
396
  <>
387
- <Icon name={icon} color={iconColor} size={iconSize} />
388
- <HSpacer size={iconMargin} />
397
+ <Icon
398
+ allowFontScaling
399
+ name={icon}
400
+ color={iconColor}
401
+ size={iconSize}
402
+ />
403
+ <HSpacer allowScaleSpacing size={iconMargin} />
389
404
  </>
390
405
  )}
391
406
  <TextInput
@@ -428,14 +443,32 @@ export const TextInputBase = ({
428
443
  pointerEvents={"none"}
429
444
  style={[
430
445
  styles.textInputLabelWrapper,
431
- icon ? { left: iconSize + iconMargin } : {}
446
+ {
447
+ paddingHorizontal:
448
+ inputPaddingHorizontal *
449
+ dynamicFontScale *
450
+ spacingScaleMultiplier
451
+ },
452
+ icon
453
+ ? {
454
+ left:
455
+ (iconSize + iconMargin) *
456
+ dynamicFontScale *
457
+ spacingScaleMultiplier
458
+ }
459
+ : {}
432
460
  ]}
433
461
  >
434
462
  <Animated.Text
435
463
  onLayout={getLabelWidth}
436
464
  numberOfLines={1}
437
465
  accessible={false}
438
- style={[styles.textInputLabel, animatedLabelStyle]}
466
+ style={[
467
+ isExperimental
468
+ ? styles.textInputLabel
469
+ : styles.textInputLabelLegacyFont,
470
+ animatedLabelStyle
471
+ ]}
439
472
  >
440
473
  {placeholder}
441
474
  </Animated.Text>
@@ -6,11 +6,12 @@ import {
6
6
  TextStyle,
7
7
  View
8
8
  } from "react-native";
9
- import { IOColors, useIOExperimentalDesign, useIOTheme } from "../../core";
9
+ import { IOColors, useIOTheme } from "../../core";
10
10
  import { useBoldTextEnabled } from "../../utils/accessibility";
11
11
  import {
12
12
  IOFontFamily,
13
13
  IOFontWeight,
14
+ IOMaxFontSizeMultiplier,
14
15
  makeFontStyleObject
15
16
  } from "../../utils/fonts";
16
17
 
@@ -94,7 +95,7 @@ export const IOText = forwardRef<View, IOTextProps>(
94
95
  textStyle,
95
96
  style,
96
97
  children,
97
- allowFontScaling,
98
+ allowFontScaling = true,
98
99
  maxFontSizeMultiplier,
99
100
  ...props
100
101
  },
@@ -103,8 +104,6 @@ export const IOText = forwardRef<View, IOTextProps>(
103
104
  const theme = useIOTheme();
104
105
  const boldEnabled = useBoldTextEnabled();
105
106
 
106
- const { isExperimental } = useIOExperimentalDesign();
107
-
108
107
  const computedStyleObj = useMemo(
109
108
  () =>
110
109
  calculateTextStyle(
@@ -142,8 +141,8 @@ export const IOText = forwardRef<View, IOTextProps>(
142
141
 
143
142
  /* Accessible typography based on the `fontScale` parameter */
144
143
  const accessibleFontSizeProps: ComponentProps<typeof Text> = {
145
- allowFontScaling: allowFontScaling ?? isExperimental,
146
- maxFontSizeMultiplier: maxFontSizeMultiplier ?? 1.25
144
+ allowFontScaling,
145
+ maxFontSizeMultiplier: maxFontSizeMultiplier ?? IOMaxFontSizeMultiplier
147
146
  };
148
147
 
149
148
  return (