@pagopa/io-app-design-system 3.0.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/lib/commonjs/components/alert/Alert.js +1 -2
  2. package/lib/commonjs/components/alert/Alert.js.map +1 -1
  3. package/lib/commonjs/components/alert/AlertEdgeToEdge.js +2 -2
  4. package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
  5. package/lib/commonjs/components/banner/Banner.js +1 -1
  6. package/lib/commonjs/components/banner/Banner.js.map +1 -1
  7. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  8. package/lib/commonjs/components/buttons/ButtonLink.js +1 -1
  9. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  10. package/lib/commonjs/components/buttons/ButtonOutline.js +1 -1
  11. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  12. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  13. package/lib/commonjs/components/featureInfo/FeatureInfo.js +3 -2
  14. package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
  15. package/lib/commonjs/components/index.js +11 -0
  16. package/lib/commonjs/components/index.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/otpInput/BoxedInput.js +4 -6
  51. package/lib/commonjs/components/otpInput/BoxedInput.js.map +1 -1
  52. package/lib/commonjs/components/otpInput/OTPInput.js +5 -4
  53. package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
  54. package/lib/commonjs/components/tabs/TabItem.js +1 -1
  55. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  56. package/lib/commonjs/components/textInput/TextInputBase.js +2 -2
  57. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
  58. package/lib/commonjs/components/tooltip/Arrows.js +49 -0
  59. package/lib/commonjs/components/tooltip/Arrows.js.map +1 -0
  60. package/lib/commonjs/components/tooltip/Tooltip.js +174 -0
  61. package/lib/commonjs/components/tooltip/Tooltip.js.map +1 -0
  62. package/lib/commonjs/components/tooltip/index.js +17 -0
  63. package/lib/commonjs/components/tooltip/index.js.map +1 -0
  64. package/lib/commonjs/components/tooltip/styles.js +50 -0
  65. package/lib/commonjs/components/tooltip/styles.js.map +1 -0
  66. package/lib/commonjs/components/tooltip/utils/index.js +180 -0
  67. package/lib/commonjs/components/tooltip/utils/index.js.map +1 -0
  68. package/lib/commonjs/components/tooltip/utils/types.js +2 -0
  69. package/lib/commonjs/components/tooltip/utils/types.js.map +1 -0
  70. package/lib/commonjs/components/typography/{LabelSmall.js → BodySmall.js} +8 -10
  71. package/lib/commonjs/components/typography/BodySmall.js.map +1 -0
  72. package/lib/commonjs/components/typography/ButtonText.js +1 -3
  73. package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
  74. package/lib/commonjs/components/typography/H3.js +3 -6
  75. package/lib/commonjs/components/typography/H3.js.map +1 -1
  76. package/lib/commonjs/components/typography/H6.js +4 -5
  77. package/lib/commonjs/components/typography/H6.js.map +1 -1
  78. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  79. package/lib/commonjs/components/typography/__test__/typography.test.js +6 -18
  80. package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
  81. package/lib/commonjs/components/typography/index.js +28 -72
  82. package/lib/commonjs/components/typography/index.js.map +1 -1
  83. package/lib/module/components/alert/Alert.js +2 -3
  84. package/lib/module/components/alert/Alert.js.map +1 -1
  85. package/lib/module/components/alert/AlertEdgeToEdge.js +2 -2
  86. package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
  87. package/lib/module/components/banner/Banner.js +2 -2
  88. package/lib/module/components/banner/Banner.js.map +1 -1
  89. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  90. package/lib/module/components/buttons/ButtonLink.js +1 -1
  91. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  92. package/lib/module/components/buttons/ButtonOutline.js +1 -1
  93. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  94. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  95. package/lib/module/components/featureInfo/FeatureInfo.js +4 -3
  96. package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
  97. package/lib/module/components/index.js +1 -0
  98. package/lib/module/components/index.js.map +1 -1
  99. package/lib/module/components/layout/HeaderFirstLevel.js +1 -0
  100. package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
  101. package/lib/module/components/listitems/ListItemCheckbox.js +2 -2
  102. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
  103. package/lib/module/components/listitems/ListItemInfo.js +2 -2
  104. package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
  105. package/lib/module/components/listitems/ListItemInfoCopy.js +2 -2
  106. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  107. package/lib/module/components/listitems/ListItemNav.js +2 -2
  108. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  109. package/lib/module/components/listitems/ListItemNavAlert.js +2 -2
  110. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  111. package/lib/module/components/listitems/ListItemRadio.js +2 -2
  112. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  113. package/lib/module/components/listitems/ListItemRadioWithAmount.js +3 -3
  114. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  115. package/lib/module/components/listitems/ListItemSwitch.js +2 -2
  116. package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
  117. package/lib/module/components/listitems/ListItemTransaction.js +3 -3
  118. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  119. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  120. package/lib/module/components/modules/ModuleAttachment.js +2 -2
  121. package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
  122. package/lib/module/components/modules/ModuleCheckout.js +2 -2
  123. package/lib/module/components/modules/ModuleCheckout.js.map +1 -1
  124. package/lib/module/components/modules/ModuleCredential.js +2 -2
  125. package/lib/module/components/modules/ModuleCredential.js.map +1 -1
  126. package/lib/module/components/modules/ModuleNavigation.js +4 -3
  127. package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
  128. package/lib/module/components/modules/ModulePaymentNotice.js +3 -3
  129. package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
  130. package/lib/module/components/modules/ModuleSummary.js +2 -2
  131. package/lib/module/components/modules/ModuleSummary.js.map +1 -1
  132. package/lib/module/components/otpInput/BoxedInput.js +5 -7
  133. package/lib/module/components/otpInput/BoxedInput.js.map +1 -1
  134. package/lib/module/components/otpInput/OTPInput.js +5 -4
  135. package/lib/module/components/otpInput/OTPInput.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/textInput/TextInputBase.js +3 -3
  139. package/lib/module/components/textInput/TextInputBase.js.map +1 -1
  140. package/lib/module/components/tooltip/Arrows.js +36 -0
  141. package/lib/module/components/tooltip/Arrows.js.map +1 -0
  142. package/lib/module/components/tooltip/Tooltip.js +165 -0
  143. package/lib/module/components/tooltip/Tooltip.js.map +1 -0
  144. package/lib/module/components/tooltip/index.js +2 -0
  145. package/lib/module/components/tooltip/index.js.map +1 -0
  146. package/lib/module/components/tooltip/styles.js +43 -0
  147. package/lib/module/components/tooltip/styles.js.map +1 -0
  148. package/lib/module/components/tooltip/utils/index.js +163 -0
  149. package/lib/module/components/tooltip/utils/index.js.map +1 -0
  150. package/lib/module/components/tooltip/utils/types.js +2 -0
  151. package/lib/module/components/tooltip/utils/types.js.map +1 -0
  152. package/lib/module/components/typography/{LabelSmall.js → BodySmall.js} +6 -8
  153. package/lib/module/components/typography/BodySmall.js.map +1 -0
  154. package/lib/module/components/typography/ButtonText.js +1 -3
  155. package/lib/module/components/typography/ButtonText.js.map +1 -1
  156. package/lib/module/components/typography/H3.js +3 -6
  157. package/lib/module/components/typography/H3.js.map +1 -1
  158. package/lib/module/components/typography/H6.js +4 -5
  159. package/lib/module/components/typography/H6.js.map +1 -1
  160. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  161. package/lib/module/components/typography/__test__/typography.test.js +6 -18
  162. package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
  163. package/lib/module/components/typography/index.js +6 -10
  164. package/lib/module/components/typography/index.js.map +1 -1
  165. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  166. package/lib/typescript/components/banner/Banner.d.ts +1 -1
  167. package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
  168. package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
  169. package/lib/typescript/components/index.d.ts +1 -0
  170. package/lib/typescript/components/index.d.ts.map +1 -1
  171. package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
  172. package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
  173. package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
  174. package/lib/typescript/components/otpInput/BoxedInput.d.ts.map +1 -1
  175. package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
  176. package/lib/typescript/components/tooltip/Arrows.d.ts +14 -0
  177. package/lib/typescript/components/tooltip/Arrows.d.ts.map +1 -0
  178. package/lib/typescript/components/tooltip/Tooltip.d.ts +64 -0
  179. package/lib/typescript/components/tooltip/Tooltip.d.ts.map +1 -0
  180. package/lib/typescript/components/tooltip/index.d.ts +2 -0
  181. package/lib/typescript/components/tooltip/index.d.ts.map +1 -0
  182. package/lib/typescript/components/tooltip/styles.d.ts +41 -0
  183. package/lib/typescript/components/tooltip/styles.d.ts.map +1 -0
  184. package/lib/typescript/components/tooltip/utils/index.d.ts +89 -0
  185. package/lib/typescript/components/tooltip/utils/index.d.ts.map +1 -0
  186. package/lib/typescript/components/tooltip/utils/types.d.ts +10 -0
  187. package/lib/typescript/components/tooltip/utils/types.d.ts.map +1 -0
  188. package/lib/typescript/components/typography/Body.d.ts +1 -1
  189. package/lib/typescript/components/typography/Body.d.ts.map +1 -1
  190. package/lib/typescript/components/typography/BodySmall.d.ts +13 -0
  191. package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -0
  192. package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
  193. package/lib/typescript/components/typography/H3.d.ts +2 -0
  194. package/lib/typescript/components/typography/H3.d.ts.map +1 -1
  195. package/lib/typescript/components/typography/H6.d.ts.map +1 -1
  196. package/lib/typescript/components/typography/LabelMini.d.ts +1 -1
  197. package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
  198. package/lib/typescript/components/typography/index.d.ts +6 -10
  199. package/lib/typescript/components/typography/index.d.ts.map +1 -1
  200. package/package.json +1 -1
  201. package/src/components/alert/Alert.tsx +3 -4
  202. package/src/components/alert/AlertEdgeToEdge.tsx +3 -3
  203. package/src/components/banner/Banner.tsx +7 -5
  204. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
  205. package/src/components/buttons/ButtonLink.tsx +1 -1
  206. package/src/components/buttons/ButtonOutline.tsx +1 -1
  207. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
  208. package/src/components/featureInfo/FeatureInfo.tsx +6 -6
  209. package/src/components/index.tsx +1 -0
  210. package/src/components/layout/HeaderFirstLevel.tsx +1 -0
  211. package/src/components/listitems/ListItemCheckbox.tsx +3 -3
  212. package/src/components/listitems/ListItemInfo.tsx +3 -3
  213. package/src/components/listitems/ListItemInfoCopy.tsx +3 -3
  214. package/src/components/listitems/ListItemNav.tsx +3 -3
  215. package/src/components/listitems/ListItemNavAlert.tsx +3 -3
  216. package/src/components/listitems/ListItemRadio.tsx +3 -3
  217. package/src/components/listitems/ListItemRadioWithAmount.tsx +5 -5
  218. package/src/components/listitems/ListItemSwitch.tsx +4 -4
  219. package/src/components/listitems/ListItemTransaction.tsx +5 -5
  220. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
  221. package/src/components/modules/ModuleAttachment.tsx +3 -3
  222. package/src/components/modules/ModuleCheckout.tsx +3 -3
  223. package/src/components/modules/ModuleCredential.tsx +3 -3
  224. package/src/components/modules/ModuleNavigation.tsx +6 -4
  225. package/src/components/modules/ModulePaymentNotice.tsx +5 -5
  226. package/src/components/modules/ModuleSummary.tsx +3 -3
  227. package/src/components/otpInput/BoxedInput.tsx +6 -5
  228. package/src/components/otpInput/OTPInput.tsx +23 -8
  229. package/src/components/tabs/TabItem.tsx +3 -3
  230. package/src/components/textInput/TextInputBase.tsx +5 -5
  231. package/src/components/tooltip/Arrows.tsx +36 -0
  232. package/src/components/tooltip/Tooltip.tsx +313 -0
  233. package/src/components/tooltip/index.ts +1 -0
  234. package/src/components/tooltip/styles.ts +44 -0
  235. package/src/components/tooltip/utils/index.ts +179 -0
  236. package/src/components/tooltip/utils/types.ts +9 -0
  237. package/src/components/typography/Body.tsx +1 -1
  238. package/src/components/typography/{LabelSmall.tsx → BodySmall.tsx} +7 -14
  239. package/src/components/typography/ButtonText.tsx +2 -4
  240. package/src/components/typography/H3.tsx +11 -8
  241. package/src/components/typography/H6.tsx +5 -6
  242. package/src/components/typography/LabelMini.tsx +1 -1
  243. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
  244. package/src/components/typography/__test__/typography.test.tsx +8 -24
  245. package/src/components/typography/index.tsx +6 -10
  246. package/lib/commonjs/components/typography/BaseTypography.js +0 -52
  247. package/lib/commonjs/components/typography/BaseTypography.js.map +0 -1
  248. package/lib/commonjs/components/typography/Chip.js +0 -41
  249. package/lib/commonjs/components/typography/Chip.js.map +0 -1
  250. package/lib/commonjs/components/typography/Factory.js +0 -62
  251. package/lib/commonjs/components/typography/Factory.js.map +0 -1
  252. package/lib/commonjs/components/typography/Label.js +0 -51
  253. package/lib/commonjs/components/typography/Label.js.map +0 -1
  254. package/lib/commonjs/components/typography/LabelSmall.js.map +0 -1
  255. package/lib/module/components/typography/BaseTypography.js +0 -44
  256. package/lib/module/components/typography/BaseTypography.js.map +0 -1
  257. package/lib/module/components/typography/Chip.js +0 -32
  258. package/lib/module/components/typography/Chip.js.map +0 -1
  259. package/lib/module/components/typography/Factory.js +0 -55
  260. package/lib/module/components/typography/Factory.js.map +0 -1
  261. package/lib/module/components/typography/Label.js +0 -42
  262. package/lib/module/components/typography/Label.js.map +0 -1
  263. package/lib/module/components/typography/LabelSmall.js.map +0 -1
  264. package/lib/typescript/components/typography/BaseTypography.d.ts +0 -29
  265. package/lib/typescript/components/typography/BaseTypography.d.ts.map +0 -1
  266. package/lib/typescript/components/typography/Chip.d.ts +0 -13
  267. package/lib/typescript/components/typography/Chip.d.ts.map +0 -1
  268. package/lib/typescript/components/typography/Factory.d.ts +0 -43
  269. package/lib/typescript/components/typography/Factory.d.ts.map +0 -1
  270. package/lib/typescript/components/typography/Label.d.ts +0 -13
  271. package/lib/typescript/components/typography/Label.d.ts.map +0 -1
  272. package/lib/typescript/components/typography/LabelSmall.d.ts +0 -13
  273. package/lib/typescript/components/typography/LabelSmall.d.ts.map +0 -1
  274. package/src/components/typography/BaseTypography.tsx +0 -71
  275. package/src/components/typography/Chip.tsx +0 -33
  276. package/src/components/typography/Factory.tsx +0 -98
  277. package/src/components/typography/Label.tsx +0 -62
@@ -0,0 +1,41 @@
1
+ import { ChildrenCoords } from './utils/types';
2
+ export declare const tooltipStyles: {
3
+ overlay: {
4
+ position: "absolute";
5
+ width: string;
6
+ height: string;
7
+ backgroundColor: string;
8
+ opacity: number;
9
+ zIndex: number;
10
+ };
11
+ childrenContainer: {
12
+ position: "absolute";
13
+ zIndex: number;
14
+ };
15
+ tooltipContainer: {
16
+ position: "absolute";
17
+ paddingHorizontal: number;
18
+ paddingVertical: number;
19
+ backgroundColor: string;
20
+ borderRadius: number;
21
+ zIndex: number;
22
+ overflow: "visible";
23
+ };
24
+ arrowContainer: {
25
+ position: "absolute";
26
+ display: "flex";
27
+ zIndex: number;
28
+ };
29
+ closeIcon: {
30
+ position: "absolute";
31
+ right: number;
32
+ top: number;
33
+ };
34
+ };
35
+ export declare const getChildrenPosition: (childrenCoords: ChildrenCoords) => {
36
+ top: number;
37
+ left: number;
38
+ width: number;
39
+ height: number;
40
+ };
41
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAC;AAEH,eAAO,MAAM,mBAAmB,mBAAoB,cAAc;;;;;CAKhE,CAAC"}
@@ -0,0 +1,89 @@
1
+ import { ScaledSize } from 'react-native';
2
+ import { ChildrenCoords, DisplayInsets, Placement } from './types';
3
+ export declare const ARROW_WIDTH = 24;
4
+ export declare const ARROW_HEIGHT = 14;
5
+ export declare const EMPTY_SPACE = 8;
6
+ /**
7
+ * @param displayInsets custom display insets
8
+ * @returns An `object` based on `DEFAULT_INSETS` and `displayInsets`
9
+ */
10
+ export declare const getDisplayInsets: (displayInsets: Partial<DisplayInsets>) => DisplayInsets;
11
+ /**
12
+ *
13
+ * @param placement The `Tooltip` placement
14
+ * @returns The `Arrow` box `width` and `height` based on `placement` value
15
+ */
16
+ export declare const getArrowBoxByPlacement: (placement: Placement) => {
17
+ width: number;
18
+ height: number;
19
+ };
20
+ /**
21
+ * A utility function to calculate the `Tooltip` coordinates and dimensions
22
+ * @param placement The `Tooltip` placement in relation of its children
23
+ * @param childrenCoords The measures in screen of the `Tooltip` children
24
+ * @param displayInsets The active display insets
25
+ * @param screenDimensions The dimensions of the device screen
26
+ * @returns The `Tooltip` coordinates
27
+ */
28
+ export declare const getTooltipCoords: (placement: Placement, childrenCoords: ChildrenCoords, displayInsets: DisplayInsets, screenDimensions: ScaledSize) => {
29
+ bottom: number;
30
+ left: number;
31
+ width: number;
32
+ top?: undefined;
33
+ } | {
34
+ top: number;
35
+ left: number;
36
+ width: number;
37
+ bottom?: undefined;
38
+ } | {
39
+ bottom?: undefined;
40
+ left?: undefined;
41
+ width?: undefined;
42
+ top?: undefined;
43
+ };
44
+ /**
45
+ * A utility function to calculate the `Tooltip`'s `Arrow` coordinates
46
+ * @param placement The `Arrow` placement in relation of the `Tooltip` children
47
+ * @param childrenCoords The measures in screen of the `Tooltip` children
48
+ * @param screenDimensions The active display insets
49
+ * @returns The `Tooltip`'s Arrow coordinates
50
+ */
51
+ export declare const getArrowCoords: (placement: Placement, childrenCoords: ChildrenCoords, screenDimensions: ScaledSize) => {
52
+ bottom: number;
53
+ left: number;
54
+ top?: undefined;
55
+ } | {
56
+ top: number;
57
+ left: number;
58
+ bottom?: undefined;
59
+ } | {
60
+ bottom?: undefined;
61
+ left?: undefined;
62
+ top?: undefined;
63
+ };
64
+ /**
65
+ * A utility function to calculate the `Tooltip` vertical alignment
66
+ * @param placement The `Tooltip` placement in relation of its children
67
+ * @param childrenHeight The `Tooltip`'s children height
68
+ * @param tooltipHeight The `Tooltip`'s height
69
+ * @returns If placement is `left` or `right` it returns the vertical tranlsation to align the `Tooltip` center with its `children` center,
70
+ * otherwise `null` is returned
71
+ */
72
+ export declare const getTooltipVerticalAlignment: (placement: Placement, childrenHeight: number, tooltipHeight?: number) => {
73
+ transform: {
74
+ translateY: number;
75
+ }[];
76
+ } | null;
77
+ /**
78
+ * A utility function to calculate the `Arrow` vertical alignment
79
+ * @param placement The `Tooltip` placement in relation of its children
80
+ * @param childrenHeight The `Tooltip`'s children height
81
+ */
82
+ export declare const getArrowVerticalAlignment: (placement: Placement, childrenHeight: number) => {
83
+ transform: {
84
+ translateY: number;
85
+ }[];
86
+ } | null;
87
+ export declare const isDefined: <T>(v: T) => boolean;
88
+ export declare const isNotZero: (v: number) => boolean;
89
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tooltip/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAQ7B;;;GAGG;AACH,eAAO,MAAM,gBAAgB,kBACZ,QAAQ,aAAa,CAAC,KACpC,aAA0D,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,cAAe,SAAS;;;CAc1D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,cAChB,SAAS,kBACJ,cAAc,iBACf,aAAa,oBACV,UAAU;;;;;;;;;;;;;;;CAsC7B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,cACd,SAAS,kBACJ,cAAc,oBACZ,UAAU;;;;;;;;;;;;CA6B7B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,cAAe,SAAS,kBAAkB,MAAM,kBAAkB,MAAM;;;;QAY/G,CAAC;AAEF;;;;EAIE;AACF,eAAO,MAAM,yBAAyB,cAAe,SAAS,kBAAkB,MAAM;;;;QAYrF,CAAC;AAEF,eAAO,MAAM,SAAS,SAAU,CAAC,YAAoB,CAAC;AACtD,eAAO,MAAM,SAAS,MAAO,MAAM,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ export type DisplayInsets = Record<Placement, number>;
2
+ export type Placement = "top" | "bottom" | "left" | "right";
3
+ export type ChildrenCoords = {
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ };
9
+ export type TooltipLayout = ChildrenCoords;
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/tooltip/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC"}
@@ -3,7 +3,7 @@ import { View } from "react-native";
3
3
  import { IOFontWeight } from "../../utils/fonts";
4
4
  import { TypographicStyleAsLinkProps, TypographicStyleProps } from "./IOText";
5
5
  type BodyStyleProps = TypographicStyleProps & {
6
- weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
6
+ weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
7
7
  } & TypographicStyleAsLinkProps;
8
8
  export declare const bodyFontSize = 16;
9
9
  export declare const bodyLineHeight = 24;
@@ -1 +1 @@
1
- {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;CACjE,GAAG,2BAA2B,CAAC;AAEhC,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,cAAc,KAAK,CAAC;AAQjC;;GAEG;AACH,eAAO,MAAM,IAAI,6EAsChB,CAAC"}
1
+ {"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACxD,GAAG,2BAA2B,CAAC;AAEhC,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,cAAc,KAAK,CAAC;AAQjC;;GAEG;AACH,eAAO,MAAM,IAAI,6EAsChB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import { IOFontWeight } from "../../utils/fonts";
4
+ import { TypographicStyleAsLinkProps, TypographicStyleProps } from "./IOText";
5
+ type BodySmallProps = TypographicStyleProps & {
6
+ weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
7
+ } & TypographicStyleAsLinkProps;
8
+ /**
9
+ * `BodySmall` typographic style
10
+ */
11
+ export declare const BodySmall: React.ForwardRefExoticComponent<BodySmallProps & React.RefAttributes<View>>;
12
+ export {};
13
+ //# sourceMappingURL=BodySmall.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BodySmall.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/BodySmall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACxD,GAAG,2BAA2B,CAAC;AAKhC;;GAEG;AACH,eAAO,MAAM,SAAS,6EAkCrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/ButtonText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAEtE,eAAO,MAAM,kBAAkB,EAAE,UAAe,CAAC;AAWjD;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;8BAmBtB,CAAC"}
1
+ {"version":3,"file":"ButtonText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/ButtonText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAgB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAEtE,eAAO,MAAM,kBAAkB,EAAE,UAAe,CAAC;AASjD;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;8BAmBtB,CAAC"}
@@ -12,5 +12,7 @@ export declare const H3: React.ForwardRefExoticComponent<Omit<IOTextProps, "styl
12
12
  style?: import("./IOText").IOTextStyle | undefined;
13
13
  } & {
14
14
  color?: "white" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-450" | "grey-650" | "grey-700" | "grey-850" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-400" | "blueIO-450" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-100" | "blueItalia-50" | "blue-600" | "blue-50" | "greyUltraLight" | "greyLight" | "bluegreyLight" | "grey" | "bluegrey" | "bluegreyDark" | "blue" | "blueUltraLight" | "aqua" | "aquaUltraLight" | "antiqueFuchsia" | "orange" | "red" | "green" | "greenLight" | undefined;
15
+ } & {
16
+ weight?: "Semibold" | "Bold" | undefined;
15
17
  } & React.RefAttributes<View>>;
16
18
  //# sourceMappingURL=H3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"H3.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H3.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAKtE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAQ/B;;GAEG;AACH,eAAO,MAAM,EAAE;;;;;8BAqBd,CAAC"}
1
+ {"version":3,"file":"H3.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H3.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAOtE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAM/B;;GAEG;AACH,eAAO,MAAM,EAAE;;;;;;;8BAwBd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"H6.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H6.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAItE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAQ/B;;GAEG;AACH,eAAO,MAAM,EAAE;;;;;8BAqBd,CAAC"}
1
+ {"version":3,"file":"H6.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H6.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAItE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAO/B;;GAEG;AACH,eAAO,MAAM,EAAE;;;;;8BAqBd,CAAC"}
@@ -3,7 +3,7 @@ import { View } from "react-native";
3
3
  import { IOFontWeight } from "../../utils/fonts";
4
4
  import { TypographicStyleAsLinkProps, TypographicStyleProps } from "./IOText";
5
5
  type LabelMiniProps = TypographicStyleProps & {
6
- weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
6
+ weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
7
7
  } & TypographicStyleAsLinkProps;
8
8
  /**
9
9
  * `LabelMini` typographic style
@@ -1 +1 @@
1
- {"version":3,"file":"LabelMini.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelMini.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;CACjE,GAAG,2BAA2B,CAAC;AAQhC;;GAEG;AACH,eAAO,MAAM,SAAS,6EAsCrB,CAAC"}
1
+ {"version":3,"file":"LabelMini.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelMini.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACxD,GAAG,2BAA2B,CAAC;AAQhC;;GAEG;AACH,eAAO,MAAM,SAAS,6EAsCrB,CAAC"}
@@ -1,11 +1,10 @@
1
- export * from "./BaseTypography";
2
- export * from "./IOText";
3
1
  export * from "./Body";
4
- export * from "./ComposedBodyFromArray";
5
- export * from "./Caption";
6
- export * from "./Chip";
2
+ export * from "./BodyMonospace";
3
+ export * from "./BodySmall";
7
4
  export * from "./ButtonText";
8
- export * from "./Factory";
5
+ export * from "./Caption";
6
+ export * from "./common";
7
+ export * from "./ComposedBodyFromArray";
9
8
  export * from "./H1";
10
9
  export * from "./H2";
11
10
  export * from "./H3";
@@ -13,11 +12,8 @@ export * from "./H4";
13
12
  export * from "./H5";
14
13
  export * from "./H6";
15
14
  export * from "./Hero";
16
- export * from "./Label";
17
- export * from "./LabelSmall";
15
+ export * from "./IOText";
18
16
  export * from "./LabelMini";
19
- export * from "./BodyMonospace";
20
- export * from "./common";
21
17
  export * from "./markdown/MdH1";
22
18
  export * from "./markdown/MdH2";
23
19
  export * from "./markdown/MdH3";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-app-design-system",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "description": "The library defining the core components of the design system of @pagopa/io-app",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -29,9 +29,8 @@ import { IOAlertSpacing } from "../../core/IOSpacing";
29
29
  import { WithTestID } from "../../utils/types";
30
30
  import { IOIconSizeScale, IOIcons, Icon } from "../icons";
31
31
  import { VSpacer } from "../spacer";
32
- import { ButtonText } from "../typography";
32
+ import { Body, ButtonText } from "../typography";
33
33
  import { H4 } from "../typography/H4";
34
- import { Label } from "../typography/Label";
35
34
 
36
35
  const iconSize: IOIconSizeScale = 24;
37
36
 
@@ -197,14 +196,14 @@ export const Alert = React.forwardRef<View, AlertType>(
197
196
  <VSpacer size={8} />
198
197
  </>
199
198
  )}
200
- <Label
199
+ <Body
201
200
  color={mapVariantStates[variant].foreground}
202
201
  weight={"Regular"}
203
202
  accessibilityRole="text"
204
203
  onTextLayout={onTextLayout}
205
204
  >
206
205
  {content}
207
- </Label>
206
+ </Body>
208
207
  {action && (
209
208
  <>
210
209
  <VSpacer size={8} />
@@ -33,7 +33,7 @@ import { IOStyles } from "../../core/IOStyles";
33
33
  import { makeFontStyleObject } from "../../utils/fonts";
34
34
  import { WithTestID } from "../../utils/types";
35
35
  import { IOIconSizeScale, IOIcons, Icon } from "../icons";
36
- import { Label } from "../typography/Label";
36
+ import { Body } from "../typography";
37
37
 
38
38
  const iconSize: IOIconSizeScale = 24;
39
39
 
@@ -161,7 +161,7 @@ export const AlertEdgeToEdge = ({
161
161
  />
162
162
  </View>
163
163
  <View style={IOStyles.flex}>
164
- <Label
164
+ <Body
165
165
  color={mapVariantStates[variant].foreground}
166
166
  weight={"Regular"}
167
167
  accessibilityRole="text"
@@ -182,7 +182,7 @@ export const AlertEdgeToEdge = ({
182
182
  {` ${action}`}
183
183
  </Text>
184
184
  )}
185
- </Label>
185
+ </Body>
186
186
  </View>
187
187
  </>
188
188
  );
@@ -33,7 +33,7 @@ import {
33
33
  PictogramBleed
34
34
  } from "../pictograms";
35
35
  import { VSpacer } from "../spacer";
36
- import { H6, LabelSmall } from "../typography";
36
+ import { H6, BodySmall } from "../typography";
37
37
 
38
38
  /* Styles */
39
39
  const colorTitle: IOColors = "blueIO-850";
@@ -157,7 +157,7 @@ export const Banner = ({
157
157
  onClose,
158
158
  accessibilityHint,
159
159
  accessibilityLabel,
160
- testID,
160
+ testID
161
161
  }: Banner) => {
162
162
  const isPressed: Animated.SharedValue<number> = useSharedValue(0);
163
163
 
@@ -197,7 +197,9 @@ export const Banner = ({
197
197
 
198
198
  /* Generates a complete fallbackAccessibilityLabel by concatenating the title, content, and action
199
199
  if they are present. */
200
- const fallbackAccessibilityLabel = [title, content, action].filter(Boolean).join(" ");
200
+ const fallbackAccessibilityLabel = [title, content, action]
201
+ .filter(Boolean)
202
+ .join(" ");
201
203
 
202
204
  const renderMainBlock = () => (
203
205
  <>
@@ -219,9 +221,9 @@ export const Banner = ({
219
221
  )}
220
222
  {content && (
221
223
  <>
222
- <LabelSmall color={colorContent} weight={"Regular"}>
224
+ <BodySmall color={colorContent} weight={"Regular"}>
223
225
  {content}
224
- </LabelSmall>
226
+ </BodySmall>
225
227
  {action && <VSpacer size={8} />}
226
228
  </>
227
229
  )}
@@ -82,7 +82,7 @@ exports[`Test Banner Components - Experimental Enabled Banner Snapshot 1`] = `
82
82
  {
83
83
  "color": "#031344",
84
84
  "fontFamily": "Titillio",
85
- "fontSize": 18,
85
+ "fontSize": 16,
86
86
  "fontStyle": "normal",
87
87
  "fontWeight": "600",
88
88
  "lineHeight": 24,
@@ -546,7 +546,7 @@ exports[`Test Banner Components Banner Snapshot 1`] = `
546
546
  "fontFamily": "Titillium Sans Pro",
547
547
  "fontSize": 16,
548
548
  "fontStyle": "normal",
549
- "fontWeight": "700",
549
+ "fontWeight": "600",
550
550
  "lineHeight": undefined,
551
551
  },
552
552
  {
@@ -238,7 +238,7 @@ export const ButtonLink = React.forwardRef<View, ButtonLinkProps>(
238
238
  accessibilityElementsHidden
239
239
  importantForAccessibility="no-hide-descendants"
240
240
  font={isExperimental ? "Titillio" : "TitilliumSansPro"}
241
- weight={isExperimental ? "Semibold" : "Bold"}
241
+ weight={"Semibold"}
242
242
  size={buttonTextFontSize}
243
243
  style={
244
244
  disabled
@@ -375,7 +375,7 @@ export const ButtonOutline = React.forwardRef<View, ButtonOutline>(
375
375
  )}
376
376
  <AnimatedIOText
377
377
  font={isExperimental ? "Titillio" : "TitilliumSansPro"}
378
- weight={isExperimental ? "Semibold" : "Bold"}
378
+ weight={"Semibold"}
379
379
  size={buttonTextFontSize}
380
380
  accessible={false}
381
381
  accessibilityElementsHidden
@@ -805,7 +805,7 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
805
805
  "fontFamily": "Titillium Sans Pro",
806
806
  "fontSize": 16,
807
807
  "fontStyle": "normal",
808
- "fontWeight": "700",
808
+ "fontWeight": "600",
809
809
  "lineHeight": undefined,
810
810
  },
811
811
  {
@@ -911,7 +911,7 @@ exports[`Test Buttons Components ButtonOutline Snapshot 1`] = `
911
911
  "fontFamily": "Titillium Sans Pro",
912
912
  "fontSize": 16,
913
913
  "fontStyle": "normal",
914
- "fontWeight": "700",
914
+ "fontWeight": "600",
915
915
  "lineHeight": undefined,
916
916
  },
917
917
  [
@@ -1031,7 +1031,7 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
1031
1031
  "fontFamily": "Titillium Sans Pro",
1032
1032
  "fontSize": 16,
1033
1033
  "fontStyle": "normal",
1034
- "fontWeight": "700",
1034
+ "fontWeight": "600",
1035
1035
  "lineHeight": 20,
1036
1036
  },
1037
1037
  {
@@ -1,14 +1,13 @@
1
1
  import React, { ReactNode } from "react";
2
2
  import { GestureResponderEvent, View } from "react-native";
3
3
  import {
4
- Body,
4
+ BodySmall,
5
5
  HSpacer,
6
6
  IOIconSizeScale,
7
7
  IOIcons,
8
8
  IOPictogramSizeScale,
9
9
  IOPictograms,
10
10
  Icon,
11
- Label,
12
11
  Pictogram,
13
12
  VSpacer
14
13
  } from "../../components";
@@ -44,9 +43,9 @@ const DEFAULT_PICTOGRAM_SIZE: IOPictogramSizeScale = 48;
44
43
  const renderNode = (body: FeatureInfoProps["body"]) => {
45
44
  if (typeof body === "string") {
46
45
  return (
47
- <Body color="grey-700" testID="infoScreenBody">
46
+ <BodySmall color="grey-700" testID="infoScreenBody">
48
47
  {body}
49
- </Body>
48
+ </BodySmall>
50
49
  );
51
50
  }
52
51
 
@@ -75,7 +74,8 @@ export const FeatureInfo = ({
75
74
  This verbose code could be deleted once we got "gap"
76
75
  property support */}
77
76
  {body && <VSpacer size={4} />}
78
- <Label
77
+ <BodySmall
78
+ weight="Semibold"
79
79
  asLink
80
80
  onPress={action.onPress}
81
81
  accessible
@@ -83,7 +83,7 @@ export const FeatureInfo = ({
83
83
  accessibilityElementsHidden={false}
84
84
  >
85
85
  {action.label}
86
- </Label>
86
+ </BodySmall>
87
87
  </>
88
88
  )}
89
89
  </View>
@@ -30,4 +30,5 @@ export * from "./tag";
30
30
  export * from "./textInput";
31
31
  export * from "./searchInput";
32
32
  export * from "./toast";
33
+ export * from "./tooltip";
33
34
  export * from "./typography";
@@ -126,6 +126,7 @@ export const HeaderFirstLevel = ({
126
126
  <View style={styles.headerInner}>
127
127
  <View ref={titleRef} accessible accessibilityRole="header">
128
128
  <H3
129
+ weight="Bold"
129
130
  style={{ flexShrink: 1 }}
130
131
  numberOfLines={1}
131
132
  color={
@@ -24,7 +24,7 @@ import {
24
24
  import { AnimatedCheckbox } from "../checkbox/AnimatedCheckbox";
25
25
  import { IOIcons, Icon } from "../icons";
26
26
  import { HSpacer, VSpacer } from "../spacer";
27
- import { H6, LabelSmall } from "../typography";
27
+ import { H6, BodySmall } from "../typography";
28
28
 
29
29
  type Props = {
30
30
  value: string;
@@ -188,9 +188,9 @@ export const ListItemCheckbox = ({
188
188
  <VSpacer
189
189
  size={IOSelectionListItemVisualParams.descriptionMargin}
190
190
  />
191
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
191
+ <BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
192
192
  {description}
193
- </LabelSmall>
193
+ </BodySmall>
194
194
  </View>
195
195
  )}
196
196
  </Animated.View>
@@ -12,7 +12,7 @@ import { ButtonLink, IconButton } from "../buttons";
12
12
  import { LogoPaymentWithFallback } from "../common/LogoPaymentWithFallback";
13
13
  import { IOIconSizeScale, IOIcons, Icon } from "../icons";
14
14
  import { IOLogoPaymentType } from "../logos";
15
- import { H6, LabelSmall } from "../typography";
15
+ import { H6, BodySmall } from "../typography";
16
16
 
17
17
  type ButtonLinkActionProps = {
18
18
  type: "buttonLink";
@@ -84,9 +84,9 @@ export const ListItemInfo = ({
84
84
  const itemInfoTextComponent = useMemo(
85
85
  () => (
86
86
  <View accessible={Platform.OS === "ios"}>
87
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
87
+ <BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
88
88
  {label}
89
- </LabelSmall>
89
+ </BodySmall>
90
90
  {typeof value === "string" ? (
91
91
  <H6 color={theme["textBody-default"]} numberOfLines={numberOfLines}>
92
92
  {value}
@@ -22,7 +22,7 @@ import {
22
22
  } from "../../core";
23
23
  import { WithTestID } from "../../utils/types";
24
24
  import { IOIcons, Icon } from "../icons";
25
- import { H6, LabelSmall } from "../typography";
25
+ import { BodySmall, H6 } from "../typography";
26
26
 
27
27
  export type ListItemInfoCopy = WithTestID<{
28
28
  label: string;
@@ -69,9 +69,9 @@ export const ListItemInfoCopy = ({
69
69
 
70
70
  const listItemInfoCopyContent = (
71
71
  <>
72
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
72
+ <BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
73
73
  {label}
74
- </LabelSmall>
74
+ </BodySmall>
75
75
  {/* Let developer using a custom component (e.g: skeleton) */}
76
76
  {typeof value === "string" ? (
77
77
  <H6 color={foregroundColor} numberOfLines={numberOfLines}>
@@ -33,7 +33,7 @@ import { Badge } from "../badge";
33
33
  import { IOIcons, Icon } from "../icons";
34
34
  import { LoadingSpinner } from "../loadingSpinner";
35
35
  import { HSpacer, VSpacer } from "../spacer";
36
- import { Caption, H6, LabelSmall } from "../typography";
36
+ import { Caption, H6, BodySmall } from "../typography";
37
37
 
38
38
  type ListItemTopElementProps =
39
39
  | {
@@ -161,9 +161,9 @@ export const ListItemNav = ({
161
161
  {description && (
162
162
  <>
163
163
  {typeof description === "string" ? (
164
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
164
+ <BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
165
165
  {description}
166
- </LabelSmall>
166
+ </BodySmall>
167
167
  ) : (
168
168
  description
169
169
  )}
@@ -22,7 +22,7 @@ import {
22
22
  } from "../../core";
23
23
  import { WithTestID } from "../../utils/types";
24
24
  import { Icon } from "../icons";
25
- import { H6, LabelSmall } from "../typography";
25
+ import { H6, BodySmall } from "../typography";
26
26
 
27
27
  export type ListItemNavAlert = WithTestID<{
28
28
  value: string | React.ReactNode;
@@ -82,9 +82,9 @@ export const ListItemNavAlert = ({
82
82
  {description && (
83
83
  <>
84
84
  {typeof description === "string" ? (
85
- <LabelSmall weight="Semibold" color={theme.errorText}>
85
+ <BodySmall weight="Semibold" color={theme.errorText}>
86
86
  {description}
87
- </LabelSmall>
87
+ </BodySmall>
88
88
  ) : (
89
89
  description
90
90
  )}
@@ -27,7 +27,7 @@ import { IOIcons, Icon } from "../icons";
27
27
  import { IOLogoPaymentType, LogoPayment } from "../logos";
28
28
  import { AnimatedRadio } from "../radio/AnimatedRadio";
29
29
  import { HSpacer, VSpacer } from "../spacer";
30
- import { H6, LabelSmall } from "../typography";
30
+ import { H6, BodySmall } from "../typography";
31
31
 
32
32
  type ListItemRadioGraphicProps =
33
33
  | { icon?: never; paymentLogo: IOLogoPaymentType; uri?: never }
@@ -287,9 +287,9 @@ export const ListItemRadio = ({
287
287
  <VSpacer
288
288
  size={IOSelectionListItemVisualParams.descriptionMargin}
289
289
  />
290
- <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
290
+ <BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
291
291
  {description}
292
- </LabelSmall>
292
+ </BodySmall>
293
293
  </View>
294
294
  )}
295
295
  </Animated.View>