@pagopa/io-app-design-system 4.4.1 → 5.0.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 (316) 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/ListItemNav.js +18 -9
  34. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  35. package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -4
  36. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  37. package/lib/commonjs/components/listitems/ListItemTransaction.js +2 -4
  38. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  39. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +31 -35
  40. package/lib/commonjs/components/modules/ModuleIDP.js +4 -5
  41. package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
  42. package/lib/commonjs/components/numberpad/NumberButton.js +3 -18
  43. package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
  44. package/lib/commonjs/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
  45. package/lib/commonjs/components/radio/AnimatedRadio.js +4 -14
  46. package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
  47. package/lib/commonjs/components/searchInput/SearchInput.js +6 -10
  48. package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
  49. package/lib/commonjs/components/stepper/Stepper.js +1 -10
  50. package/lib/commonjs/components/stepper/Stepper.js.map +1 -1
  51. package/lib/commonjs/components/switch/NativeSwitch.js +2 -15
  52. package/lib/commonjs/components/switch/NativeSwitch.js.map +1 -1
  53. package/lib/commonjs/components/tabs/TabItem.js +6 -46
  54. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  55. package/lib/commonjs/components/tag/Tag.js +4 -4
  56. package/lib/commonjs/components/tag/Tag.js.map +1 -1
  57. package/lib/commonjs/components/textInput/TextInputBase.js +10 -20
  58. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
  59. package/lib/commonjs/components/typography/Body.js +4 -6
  60. package/lib/commonjs/components/typography/Body.js.map +1 -1
  61. package/lib/commonjs/components/typography/BodySmall.js +3 -3
  62. package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
  63. package/lib/commonjs/components/typography/ButtonText.js +6 -7
  64. package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
  65. package/lib/commonjs/components/typography/Caption.js +6 -12
  66. package/lib/commonjs/components/typography/Caption.js.map +1 -1
  67. package/lib/commonjs/components/typography/H1.js +6 -13
  68. package/lib/commonjs/components/typography/H1.js.map +1 -1
  69. package/lib/commonjs/components/typography/H2.js +8 -17
  70. package/lib/commonjs/components/typography/H2.js.map +1 -1
  71. package/lib/commonjs/components/typography/H3.js +4 -8
  72. package/lib/commonjs/components/typography/H3.js.map +1 -1
  73. package/lib/commonjs/components/typography/H4.js +7 -14
  74. package/lib/commonjs/components/typography/H4.js.map +1 -1
  75. package/lib/commonjs/components/typography/H5.js +5 -10
  76. package/lib/commonjs/components/typography/H5.js.map +1 -1
  77. package/lib/commonjs/components/typography/H6.js +7 -10
  78. package/lib/commonjs/components/typography/H6.js.map +1 -1
  79. package/lib/commonjs/components/typography/Hero.js +8 -17
  80. package/lib/commonjs/components/typography/Hero.js.map +1 -1
  81. package/lib/commonjs/components/typography/LabelMini.js +4 -6
  82. package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
  83. package/lib/commonjs/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
  84. package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
  85. package/lib/commonjs/components/typography/markdown/MdH1.js +3 -3
  86. package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
  87. package/lib/commonjs/components/typography/markdown/MdH2.js +3 -3
  88. package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
  89. package/lib/commonjs/components/typography/markdown/MdH3.js +3 -3
  90. package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
  91. package/lib/commonjs/core/IOColors.js +1 -8
  92. package/lib/commonjs/core/IOColors.js.map +1 -1
  93. package/lib/commonjs/core/IODSExperimentalContextProvider.js +4 -3
  94. package/lib/commonjs/core/IODSExperimentalContextProvider.js.map +1 -1
  95. package/lib/commonjs/core/IONewTypefaceContextProvider.js +33 -0
  96. package/lib/commonjs/core/IONewTypefaceContextProvider.js.map +1 -0
  97. package/lib/commonjs/core/IOStyles.js +1 -49
  98. package/lib/commonjs/core/IOStyles.js.map +1 -1
  99. package/lib/commonjs/core/IOThemeContextProvider.js +4 -15
  100. package/lib/commonjs/core/IOThemeContextProvider.js.map +1 -1
  101. package/lib/commonjs/core/index.js +11 -0
  102. package/lib/commonjs/core/index.js.map +1 -1
  103. package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  104. package/lib/module/components/accordion/index.js +0 -1
  105. package/lib/module/components/accordion/index.js.map +1 -1
  106. package/lib/module/components/badge/Badge.js +5 -5
  107. package/lib/module/components/badge/Badge.js.map +1 -1
  108. package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
  109. package/lib/module/components/banner/Banner.js +5 -5
  110. package/lib/module/components/banner/Banner.js.map +1 -1
  111. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
  112. package/lib/module/components/buttons/ButtonLink.js +28 -35
  113. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  114. package/lib/module/components/buttons/ButtonOutline.js +19 -87
  115. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  116. package/lib/module/components/buttons/ButtonSolid.js +10 -54
  117. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  118. package/lib/module/components/buttons/IconButton.js +6 -37
  119. package/lib/module/components/buttons/IconButton.js.map +1 -1
  120. package/lib/module/components/buttons/IconButtonContained.js +6 -51
  121. package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
  122. package/lib/module/components/buttons/IconButtonSolid.js +6 -37
  123. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
  124. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
  125. package/lib/module/components/checkbox/AnimatedCheckbox.js +6 -16
  126. package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
  127. package/lib/module/components/checkbox/AnimatedMessageCheckbox.js +3 -10
  128. package/lib/module/components/checkbox/AnimatedMessageCheckbox.js.map +1 -1
  129. package/lib/module/components/layout/FooterActions.js +2 -6
  130. package/lib/module/components/layout/FooterActions.js.map +1 -1
  131. package/lib/module/components/layout/HeaderSecondLevel.js +4 -4
  132. package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
  133. package/lib/module/components/layout/ModalBSHeader.js +5 -17
  134. package/lib/module/components/layout/ModalBSHeader.js.map +1 -1
  135. package/lib/module/components/listitems/ListItemNav.js +19 -10
  136. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  137. package/lib/module/components/listitems/ListItemNavAlert.js +2 -5
  138. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  139. package/lib/module/components/listitems/ListItemTransaction.js +3 -5
  140. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  141. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +31 -35
  142. package/lib/module/components/modules/ModuleIDP.js +4 -5
  143. package/lib/module/components/modules/ModuleIDP.js.map +1 -1
  144. package/lib/module/components/numberpad/NumberButton.js +5 -20
  145. package/lib/module/components/numberpad/NumberButton.js.map +1 -1
  146. package/lib/module/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
  147. package/lib/module/components/radio/AnimatedRadio.js +5 -15
  148. package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
  149. package/lib/module/components/searchInput/SearchInput.js +7 -11
  150. package/lib/module/components/searchInput/SearchInput.js.map +1 -1
  151. package/lib/module/components/stepper/Stepper.js +2 -11
  152. package/lib/module/components/stepper/Stepper.js.map +1 -1
  153. package/lib/module/components/switch/NativeSwitch.js +3 -16
  154. package/lib/module/components/switch/NativeSwitch.js.map +1 -1
  155. package/lib/module/components/tabs/TabItem.js +7 -47
  156. package/lib/module/components/tabs/TabItem.js.map +1 -1
  157. package/lib/module/components/tag/Tag.js +5 -5
  158. package/lib/module/components/tag/Tag.js.map +1 -1
  159. package/lib/module/components/textInput/TextInputBase.js +11 -21
  160. package/lib/module/components/textInput/TextInputBase.js.map +1 -1
  161. package/lib/module/components/typography/Body.js +5 -7
  162. package/lib/module/components/typography/Body.js.map +1 -1
  163. package/lib/module/components/typography/BodySmall.js +4 -4
  164. package/lib/module/components/typography/BodySmall.js.map +1 -1
  165. package/lib/module/components/typography/ButtonText.js +7 -8
  166. package/lib/module/components/typography/ButtonText.js.map +1 -1
  167. package/lib/module/components/typography/Caption.js +6 -12
  168. package/lib/module/components/typography/Caption.js.map +1 -1
  169. package/lib/module/components/typography/H1.js +6 -13
  170. package/lib/module/components/typography/H1.js.map +1 -1
  171. package/lib/module/components/typography/H2.js +8 -17
  172. package/lib/module/components/typography/H2.js.map +1 -1
  173. package/lib/module/components/typography/H3.js +4 -8
  174. package/lib/module/components/typography/H3.js.map +1 -1
  175. package/lib/module/components/typography/H4.js +7 -14
  176. package/lib/module/components/typography/H4.js.map +1 -1
  177. package/lib/module/components/typography/H5.js +6 -11
  178. package/lib/module/components/typography/H5.js.map +1 -1
  179. package/lib/module/components/typography/H6.js +7 -10
  180. package/lib/module/components/typography/H6.js.map +1 -1
  181. package/lib/module/components/typography/Hero.js +8 -17
  182. package/lib/module/components/typography/Hero.js.map +1 -1
  183. package/lib/module/components/typography/LabelMini.js +5 -7
  184. package/lib/module/components/typography/LabelMini.js.map +1 -1
  185. package/lib/module/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
  186. package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
  187. package/lib/module/components/typography/markdown/MdH1.js +4 -4
  188. package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
  189. package/lib/module/components/typography/markdown/MdH2.js +4 -4
  190. package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
  191. package/lib/module/components/typography/markdown/MdH3.js +4 -4
  192. package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
  193. package/lib/module/core/IOColors.js +0 -6
  194. package/lib/module/core/IOColors.js.map +1 -1
  195. package/lib/module/core/IODSExperimentalContextProvider.js +2 -2
  196. package/lib/module/core/IODSExperimentalContextProvider.js.map +1 -1
  197. package/lib/module/core/IONewTypefaceContextProvider.js +22 -0
  198. package/lib/module/core/IONewTypefaceContextProvider.js.map +1 -0
  199. package/lib/module/core/IOStyles.js +0 -46
  200. package/lib/module/core/IOStyles.js.map +1 -1
  201. package/lib/module/core/IOThemeContextProvider.js +3 -12
  202. package/lib/module/core/IOThemeContextProvider.js.map +1 -1
  203. package/lib/module/core/index.js +1 -0
  204. package/lib/module/core/index.js.map +1 -1
  205. package/lib/typescript/components/accordion/index.d.ts +0 -1
  206. package/lib/typescript/components/accordion/index.d.ts.map +1 -1
  207. package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
  208. package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
  209. package/lib/typescript/components/buttons/ButtonOutline.d.ts.map +1 -1
  210. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  211. package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
  212. package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -1
  213. package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -1
  214. package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
  215. package/lib/typescript/components/checkbox/AnimatedMessageCheckbox.d.ts.map +1 -1
  216. package/lib/typescript/components/layout/FooterActions.d.ts.map +1 -1
  217. package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
  218. package/lib/typescript/components/layout/ModalBSHeader.d.ts.map +1 -1
  219. package/lib/typescript/components/listitems/ListItemNav.d.ts.map +1 -1
  220. package/lib/typescript/components/listitems/ListItemNavAlert.d.ts.map +1 -1
  221. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  222. package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -1
  223. package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
  224. package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
  225. package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
  226. package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -1
  227. package/lib/typescript/components/switch/NativeSwitch.d.ts.map +1 -1
  228. package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
  229. package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
  230. package/lib/typescript/components/typography/Body.d.ts.map +1 -1
  231. package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
  232. package/lib/typescript/components/typography/Caption.d.ts.map +1 -1
  233. package/lib/typescript/components/typography/H1.d.ts.map +1 -1
  234. package/lib/typescript/components/typography/H2.d.ts +0 -3
  235. package/lib/typescript/components/typography/H2.d.ts.map +1 -1
  236. package/lib/typescript/components/typography/H3.d.ts.map +1 -1
  237. package/lib/typescript/components/typography/H4.d.ts.map +1 -1
  238. package/lib/typescript/components/typography/H5.d.ts.map +1 -1
  239. package/lib/typescript/components/typography/H6.d.ts.map +1 -1
  240. package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
  241. package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
  242. package/lib/typescript/core/IOColors.d.ts +0 -1
  243. package/lib/typescript/core/IOColors.d.ts.map +1 -1
  244. package/lib/typescript/core/IODSExperimentalContextProvider.d.ts.map +1 -1
  245. package/lib/typescript/core/IONewTypefaceContextProvider.d.ts +16 -0
  246. package/lib/typescript/core/IONewTypefaceContextProvider.d.ts.map +1 -0
  247. package/lib/typescript/core/IOStyles.d.ts +2 -32
  248. package/lib/typescript/core/IOStyles.d.ts.map +1 -1
  249. package/lib/typescript/core/IOThemeContextProvider.d.ts +0 -4
  250. package/lib/typescript/core/IOThemeContextProvider.d.ts.map +1 -1
  251. package/lib/typescript/core/index.d.ts +1 -0
  252. package/lib/typescript/core/index.d.ts.map +1 -1
  253. package/lib/typescript/utils/fonts.d.ts +1 -1
  254. package/package.json +1 -1
  255. package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
  256. package/src/components/accordion/index.tsx +0 -1
  257. package/src/components/badge/Badge.tsx +3 -3
  258. package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +1 -1
  259. package/src/components/banner/Banner.tsx +3 -4
  260. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +3 -3
  261. package/src/components/buttons/ButtonLink.tsx +38 -41
  262. package/src/components/buttons/ButtonOutline.tsx +31 -103
  263. package/src/components/buttons/ButtonSolid.tsx +11 -69
  264. package/src/components/buttons/IconButton.tsx +5 -49
  265. package/src/components/buttons/IconButtonContained.tsx +11 -58
  266. package/src/components/buttons/IconButtonSolid.tsx +9 -47
  267. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +29 -27
  268. package/src/components/checkbox/AnimatedCheckbox.tsx +6 -34
  269. package/src/components/checkbox/AnimatedMessageCheckbox.tsx +3 -14
  270. package/src/components/layout/FooterActions.tsx +1 -4
  271. package/src/components/layout/HeaderSecondLevel.tsx +4 -3
  272. package/src/components/layout/ModalBSHeader.tsx +11 -29
  273. package/src/components/listitems/ListItemNav.tsx +44 -31
  274. package/src/components/listitems/ListItemNavAlert.tsx +1 -4
  275. package/src/components/listitems/ListItemTransaction.tsx +2 -6
  276. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +31 -35
  277. package/src/components/modules/ModuleIDP.tsx +3 -8
  278. package/src/components/numberpad/NumberButton.tsx +4 -27
  279. package/src/components/numberpad/__test__/__snapshots__/NumberPad.test.tsx.snap +10 -10
  280. package/src/components/radio/AnimatedRadio.tsx +5 -33
  281. package/src/components/searchInput/SearchInput.tsx +11 -20
  282. package/src/components/stepper/Stepper.tsx +2 -20
  283. package/src/components/switch/NativeSwitch.tsx +3 -21
  284. package/src/components/tabs/TabItem.tsx +14 -61
  285. package/src/components/tag/Tag.tsx +3 -3
  286. package/src/components/textInput/TextInputBase.tsx +19 -34
  287. package/src/components/typography/Body.tsx +4 -11
  288. package/src/components/typography/BodySmall.tsx +3 -3
  289. package/src/components/typography/ButtonText.tsx +6 -8
  290. package/src/components/typography/Caption.tsx +6 -13
  291. package/src/components/typography/H1.tsx +6 -14
  292. package/src/components/typography/H2.tsx +8 -18
  293. package/src/components/typography/H3.tsx +4 -8
  294. package/src/components/typography/H4.tsx +7 -15
  295. package/src/components/typography/H5.tsx +6 -14
  296. package/src/components/typography/H6.tsx +7 -11
  297. package/src/components/typography/Hero.tsx +8 -18
  298. package/src/components/typography/LabelMini.tsx +4 -11
  299. package/src/components/typography/__test__/__snapshots__/ComposedBodyFromArray.test.tsx.snap +42 -42
  300. package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +26 -26
  301. package/src/components/typography/markdown/MdH1.tsx +3 -3
  302. package/src/components/typography/markdown/MdH2.tsx +3 -3
  303. package/src/components/typography/markdown/MdH3.tsx +3 -3
  304. package/src/core/IOColors.ts +0 -7
  305. package/src/core/IODSExperimentalContextProvider.tsx +2 -2
  306. package/src/core/IONewTypefaceContextProvider.tsx +37 -0
  307. package/src/core/IOStyles.ts +0 -52
  308. package/src/core/IOThemeContextProvider.tsx +3 -16
  309. package/src/core/index.ts +1 -0
  310. package/lib/commonjs/components/accordion/RawAccordion.js +0 -93
  311. package/lib/commonjs/components/accordion/RawAccordion.js.map +0 -1
  312. package/lib/module/components/accordion/RawAccordion.js +0 -86
  313. package/lib/module/components/accordion/RawAccordion.js.map +0 -1
  314. package/lib/typescript/components/accordion/RawAccordion.d.ts +0 -17
  315. package/lib/typescript/components/accordion/RawAccordion.d.ts.map +0 -1
  316. package/src/components/accordion/RawAccordion.tsx +0 -116
@@ -10,7 +10,7 @@ exports[`Test Typography Components Body Snapshot 1`] = `
10
10
  {},
11
11
  {
12
12
  "color": "#555C70",
13
- "fontFamily": "Titillium Sans Pro",
13
+ "fontFamily": "Titillio",
14
14
  "fontSize": 16,
15
15
  "fontStyle": "normal",
16
16
  "fontWeight": "400",
@@ -58,7 +58,7 @@ exports[`Test Typography Components BodySmall Snapshot 1`] = `
58
58
  {},
59
59
  {
60
60
  "color": "#555C70",
61
- "fontFamily": "Titillium Sans Pro",
61
+ "fontFamily": "Titillio",
62
62
  "fontSize": 14,
63
63
  "fontStyle": "normal",
64
64
  "fontWeight": "400",
@@ -81,7 +81,7 @@ exports[`Test Typography Components BodySmall Snapshot 2`] = `
81
81
  {},
82
82
  {
83
83
  "color": "#0073E6",
84
- "fontFamily": "Titillium Sans Pro",
84
+ "fontFamily": "Titillio",
85
85
  "fontSize": 14,
86
86
  "fontStyle": "normal",
87
87
  "fontWeight": "400",
@@ -104,7 +104,7 @@ exports[`Test Typography Components BodySmall Snapshot 3`] = `
104
104
  {},
105
105
  {
106
106
  "color": "#475A6D",
107
- "fontFamily": "Titillium Sans Pro",
107
+ "fontFamily": "Titillio",
108
108
  "fontSize": 14,
109
109
  "fontStyle": "normal",
110
110
  "fontWeight": "400",
@@ -127,7 +127,7 @@ exports[`Test Typography Components BodySmall Snapshot 4`] = `
127
127
  {},
128
128
  {
129
129
  "color": "#C02927",
130
- "fontFamily": "Titillium Sans Pro",
130
+ "fontFamily": "Titillio",
131
131
  "fontSize": 14,
132
132
  "fontStyle": "normal",
133
133
  "fontWeight": "400",
@@ -150,7 +150,7 @@ exports[`Test Typography Components BodySmall Snapshot 5`] = `
150
150
  {},
151
151
  {
152
152
  "color": "#FFFFFF",
153
- "fontFamily": "Titillium Sans Pro",
153
+ "fontFamily": "Titillio",
154
154
  "fontSize": 14,
155
155
  "fontStyle": "normal",
156
156
  "fontWeight": "400",
@@ -172,7 +172,7 @@ exports[`Test Typography Components CTA Snapshot 1`] = `
172
172
  {},
173
173
  {
174
174
  "color": "#FFFFFF",
175
- "fontFamily": "Titillium Sans Pro",
175
+ "fontFamily": "Titillio",
176
176
  "fontSize": 16,
177
177
  "fontStyle": "normal",
178
178
  "fontWeight": "600",
@@ -195,7 +195,7 @@ exports[`Test Typography Components H1 Snapshot 1`] = `
195
195
  {},
196
196
  {
197
197
  "color": "#0E0F13",
198
- "fontFamily": "Titillium Sans Pro",
198
+ "fontFamily": "Titillio",
199
199
  "fontSize": 28,
200
200
  "fontStyle": "normal",
201
201
  "fontWeight": "600",
@@ -218,7 +218,7 @@ exports[`Test Typography Components H1 Snapshot 2`] = `
218
218
  {},
219
219
  {
220
220
  "color": "#FFFFFF",
221
- "fontFamily": "Titillium Sans Pro",
221
+ "fontFamily": "Titillio",
222
222
  "fontSize": 28,
223
223
  "fontStyle": "normal",
224
224
  "fontWeight": "600",
@@ -241,8 +241,8 @@ exports[`Test Typography Components H2 Snapshot 1`] = `
241
241
  {},
242
242
  {
243
243
  "color": "#0E0F13",
244
- "fontFamily": "Titillium Sans Pro",
245
- "fontSize": 28,
244
+ "fontFamily": "Titillio",
245
+ "fontSize": 26,
246
246
  "fontStyle": "normal",
247
247
  "fontWeight": "600",
248
248
  "lineHeight": 34,
@@ -264,7 +264,7 @@ exports[`Test Typography Components H3 Snapshot 1`] = `
264
264
  {},
265
265
  {
266
266
  "color": "#0E0F13",
267
- "fontFamily": "Titillium Sans Pro",
267
+ "fontFamily": "Titillio",
268
268
  "fontSize": 22,
269
269
  "fontStyle": "normal",
270
270
  "fontWeight": "600",
@@ -287,7 +287,7 @@ exports[`Test Typography Components H3 Snapshot 2`] = `
287
287
  {},
288
288
  {
289
289
  "color": "#CCD4DC",
290
- "fontFamily": "Titillium Sans Pro",
290
+ "fontFamily": "Titillio",
291
291
  "fontSize": 22,
292
292
  "fontStyle": "normal",
293
293
  "fontWeight": "600",
@@ -310,7 +310,7 @@ exports[`Test Typography Components H3 Snapshot 3`] = `
310
310
  {},
311
311
  {
312
312
  "color": "#FFFFFF",
313
- "fontFamily": "Titillium Sans Pro",
313
+ "fontFamily": "Titillio",
314
314
  "fontSize": 22,
315
315
  "fontStyle": "normal",
316
316
  "fontWeight": "600",
@@ -333,7 +333,7 @@ exports[`Test Typography Components H3 Snapshot 4`] = `
333
333
  {},
334
334
  {
335
335
  "color": "#FFFFFF",
336
- "fontFamily": "Titillium Sans Pro",
336
+ "fontFamily": "Titillio",
337
337
  "fontSize": 22,
338
338
  "fontStyle": "normal",
339
339
  "fontWeight": "600",
@@ -356,7 +356,7 @@ exports[`Test Typography Components H3 Snapshot 5`] = `
356
356
  {},
357
357
  {
358
358
  "color": "#0E0F13",
359
- "fontFamily": "Titillium Sans Pro",
359
+ "fontFamily": "Titillio",
360
360
  "fontSize": 22,
361
361
  "fontStyle": "normal",
362
362
  "fontWeight": "600",
@@ -379,7 +379,7 @@ exports[`Test Typography Components H4 Snapshot 1`] = `
379
379
  {},
380
380
  {
381
381
  "color": "#0E0F13",
382
- "fontFamily": "Titillium Sans Pro",
382
+ "fontFamily": "Titillio",
383
383
  "fontSize": 20,
384
384
  "fontStyle": "normal",
385
385
  "fontWeight": "600",
@@ -402,7 +402,7 @@ exports[`Test Typography Components H4 Snapshot 2`] = `
402
402
  {},
403
403
  {
404
404
  "color": "#0073E6",
405
- "fontFamily": "Titillium Sans Pro",
405
+ "fontFamily": "Titillio",
406
406
  "fontSize": 20,
407
407
  "fontStyle": "normal",
408
408
  "fontWeight": "600",
@@ -425,7 +425,7 @@ exports[`Test Typography Components H4 Snapshot 3`] = `
425
425
  {},
426
426
  {
427
427
  "color": "#FFFFFF",
428
- "fontFamily": "Titillium Sans Pro",
428
+ "fontFamily": "Titillio",
429
429
  "fontSize": 20,
430
430
  "fontStyle": "normal",
431
431
  "fontWeight": "600",
@@ -451,7 +451,7 @@ exports[`Test Typography Components H5 Snapshot 1`] = `
451
451
  },
452
452
  {
453
453
  "color": "#0E0F13",
454
- "fontFamily": "Titillium Sans Pro",
454
+ "fontFamily": "Titillio",
455
455
  "fontSize": 14,
456
456
  "fontStyle": "normal",
457
457
  "fontWeight": "600",
@@ -477,7 +477,7 @@ exports[`Test Typography Components H5 Snapshot 2`] = `
477
477
  },
478
478
  {
479
479
  "color": "#475A6D",
480
- "fontFamily": "Titillium Sans Pro",
480
+ "fontFamily": "Titillio",
481
481
  "fontSize": 14,
482
482
  "fontStyle": "normal",
483
483
  "fontWeight": "600",
@@ -503,7 +503,7 @@ exports[`Test Typography Components H5 Snapshot 3`] = `
503
503
  },
504
504
  {
505
505
  "color": "#0073E6",
506
- "fontFamily": "Titillium Sans Pro",
506
+ "fontFamily": "Titillio",
507
507
  "fontSize": 14,
508
508
  "fontStyle": "normal",
509
509
  "fontWeight": "600",
@@ -529,7 +529,7 @@ exports[`Test Typography Components H5 Snapshot 4`] = `
529
529
  },
530
530
  {
531
531
  "color": "#FFFFFF",
532
- "fontFamily": "Titillium Sans Pro",
532
+ "fontFamily": "Titillio",
533
533
  "fontSize": 14,
534
534
  "fontStyle": "normal",
535
535
  "fontWeight": "600",
@@ -552,8 +552,8 @@ exports[`Test Typography Components H6 Snapshot 1`] = `
552
552
  {},
553
553
  {
554
554
  "color": "#0E0F13",
555
- "fontFamily": "Titillium Sans Pro",
556
- "fontSize": 17,
555
+ "fontFamily": "Titillio",
556
+ "fontSize": 16,
557
557
  "fontStyle": "normal",
558
558
  "fontWeight": "600",
559
559
  "lineHeight": 24,
@@ -579,7 +579,7 @@ exports[`Test Typography Components Link Snapshot 1`] = `
579
579
  },
580
580
  {
581
581
  "color": "#0B3EE3",
582
- "fontFamily": "Titillium Sans Pro",
582
+ "fontFamily": "Titillio",
583
583
  "fontSize": 16,
584
584
  "fontStyle": "normal",
585
585
  "fontWeight": "400",
@@ -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 { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
5
5
 
6
6
  /**
@@ -10,11 +10,11 @@ import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
10
10
  export const MdH1 = forwardRef<View, TypographicStyleProps>(
11
11
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
12
12
  const theme = useIOTheme();
13
- const { isExperimental } = useIOExperimentalDesign();
13
+ const { newTypefaceEnabled } = useIONewTypeface();
14
14
 
15
15
  const MdH1Props: IOTextProps = {
16
16
  ...props,
17
- font: isExperimental ? "Titillio" : "TitilliumSansPro",
17
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
18
18
  weight: "Semibold",
19
19
  size: 20,
20
20
  lineHeight: 24,
@@ -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 { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
5
5
 
6
6
  /**
@@ -9,11 +9,11 @@ import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
9
9
  export const MdH2 = forwardRef<View, TypographicStyleProps>(
10
10
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
11
11
  const theme = useIOTheme();
12
- const { isExperimental } = useIOExperimentalDesign();
12
+ const { newTypefaceEnabled } = useIONewTypeface();
13
13
 
14
14
  const MdH2Props: IOTextProps = {
15
15
  ...props,
16
- font: isExperimental ? "Titillio" : "TitilliumSansPro",
16
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
17
17
  weight: "Semibold",
18
18
  size: 16,
19
19
  lineHeight: 24,
@@ -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 { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
5
5
 
6
6
  /**
@@ -9,11 +9,11 @@ import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
9
9
  export const MdH3 = forwardRef<View, TypographicStyleProps>(
10
10
  ({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
11
11
  const theme = useIOTheme();
12
- const { isExperimental } = useIOExperimentalDesign();
12
+ const { newTypefaceEnabled } = useIONewTypeface();
13
13
 
14
14
  const MdH3Props: IOTextProps = {
15
15
  ...props,
16
- font: isExperimental ? "Titillio" : "TitilliumSansPro",
16
+ font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
17
17
  weight: "Regular",
18
18
  size: 16,
19
19
  lineHeight: 24,
@@ -338,13 +338,6 @@ export const IOThemeLight: IOTheme = {
338
338
  "pictogram-tint-tertiary": "blueIO-400"
339
339
  };
340
340
 
341
- export const IOThemeLightLegacy: IOTheme = {
342
- ...IOThemeLight,
343
- "appBackground-accent": "blue",
344
- "interactiveElem-default": "blue",
345
- "pictogram-hands": "blue"
346
- };
347
-
348
341
  export const IOThemeDark: IOTheme = {
349
342
  ...IOThemeLight,
350
343
  // General
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useState } from "react";
2
2
 
3
3
  type IOExperimentalContextType = {
4
4
  isExperimental: boolean;
@@ -24,7 +24,7 @@ export const IODSExperimentalContextProvider = ({
24
24
  children,
25
25
  isExperimentaEnabled
26
26
  }: React.PropsWithChildren<IOExperimentalContextProviderProps>) => {
27
- const [isExperimental, setExperimental] = React.useState(
27
+ const [isExperimental, setExperimental] = useState(
28
28
  isExperimentaEnabled ?? false
29
29
  );
30
30
 
@@ -0,0 +1,37 @@
1
+ import React, { PropsWithChildren, useState } from "react";
2
+
3
+ type IONewTypefaceContextType = {
4
+ newTypefaceEnabled: boolean;
5
+ setNewTypefaceEnabled: (newTypefaceEnabled: boolean) => void;
6
+ };
7
+ /**
8
+ * Experimental Context for new UI Representations
9
+ */
10
+ export const IONewTypefaceContext =
11
+ React.createContext<IONewTypefaceContextType>({
12
+ newTypefaceEnabled: true,
13
+ setNewTypefaceEnabled: () => void 0
14
+ });
15
+
16
+ export const useIONewTypeface = () => React.useContext(IONewTypefaceContext);
17
+
18
+ type IOExperimentalContextProviderProps = {
19
+ isNewTypefaceEnabled?: boolean;
20
+ };
21
+
22
+ export const IONewTypefaceContextProvider = ({
23
+ children,
24
+ isNewTypefaceEnabled
25
+ }: PropsWithChildren<IOExperimentalContextProviderProps>) => {
26
+ const [newTypefaceEnabled, setNewTypefaceEnabled] = useState(
27
+ isNewTypefaceEnabled ?? true
28
+ );
29
+
30
+ return (
31
+ <IONewTypefaceContext.Provider
32
+ value={{ newTypefaceEnabled, setNewTypefaceEnabled }}
33
+ >
34
+ {children}
35
+ </IONewTypefaceContext.Provider>
36
+ );
37
+ };
@@ -104,7 +104,6 @@ export const IOStyles = StyleSheet.create({
104
104
  - Height for classic buttons
105
105
  - Width and height for icon buttons
106
106
  */
107
- const btnLegacySizeDefault = 40;
108
107
  const btnSizeLarge = 56;
109
108
  // NEW Design System
110
109
  const btnBorderRadius = 8;
@@ -116,46 +115,6 @@ export const iconBtnSizeSmall: number = 24;
116
115
 
117
116
  export const numberPadBtnSize: number = 56;
118
117
 
119
- export const IOButtonLegacyStyles = StyleSheet.create({
120
- /* BaseButton, used in the:
121
- ButtonSolid, ButtonOutline
122
- */
123
- button: {
124
- flexDirection: "row",
125
- alignItems: "center",
126
- justifyContent: "center",
127
- textAlignVertical: "center", // Prop supported on Android only
128
- /* Legacy visual properties. They will be replaced with
129
- dynamic ones once NativeBase is gone */
130
- borderRadius: 4,
131
- paddingHorizontal: 16,
132
- // Reset default visual parameters
133
- elevation: 0
134
- // Visual parameters based on the FontScale
135
- // paddingVertical: PixelRatio.getFontScale() * 10,
136
- // paddingHorizontal: PixelRatio.getFontScale() * 16,
137
- // borderRadius: PixelRatio.getFontScale() * 8
138
- },
139
- buttonInner: {
140
- flexDirection: "row",
141
- alignItems: "center",
142
- justifyContent: "center"
143
- },
144
- /* Labels */
145
- label: {
146
- alignSelf: "center"
147
- },
148
- labelSizeDefault: {
149
- fontSize: 16
150
- },
151
- /* Heights
152
- Must be replaced with dynamic values, depending on the
153
- fontScale parameter */
154
- buttonSizeDefault: {
155
- height: btnLegacySizeDefault
156
- }
157
- });
158
-
159
118
  export const IOButtonStyles = StyleSheet.create({
160
119
  /* BaseButton, used in the:
161
120
  ButtonSolid, ButtonOutline
@@ -326,11 +285,6 @@ interface IOSwitchVisualParams {
326
285
  padding: number;
327
286
  }
328
287
 
329
- interface IOSelectionTickLegacyVisualParams {
330
- borderColorOffState: IOColors;
331
- bgColorOnState: IOColors;
332
- }
333
-
334
288
  export const IOSelectionTickVisualParams: IOSelectionTickVisualParams = {
335
289
  size: 24,
336
290
  borderWidth: 2,
@@ -350,12 +304,6 @@ export const IOSwitchVisualParams: IOSwitchVisualParams = {
350
304
  padding: 2
351
305
  };
352
306
 
353
- export const IOSelectionTickLegacyVisualParams: IOSelectionTickLegacyVisualParams =
354
- {
355
- borderColorOffState: "bluegrey",
356
- bgColorOnState: "blue"
357
- };
358
-
359
307
  interface IOSelectionListItemVisualParams {
360
308
  paddingVertical: IOSpacingScale;
361
309
  paddingHorizontal: IOAppMargin;
@@ -1,15 +1,8 @@
1
- import React, { useMemo } from "react";
1
+ import React from "react";
2
2
  import { Appearance } from "react-native";
3
- import {
4
- IOTheme,
5
- IOThemeDark,
6
- IOThemeLight,
7
- IOThemeLightLegacy
8
- } from "./IOColors";
9
- import { useIOExperimentalDesign } from "./IODSExperimentalContextProvider";
3
+ import { IOTheme, IOThemeDark, IOThemeLight } from "./IOColors";
10
4
 
11
5
  export const IOThemes = { light: IOThemeLight, dark: IOThemeDark };
12
- export const legacyIOThemes = { light: IOThemeLightLegacy, dark: IOThemeDark };
13
6
  type IOThemeType = keyof typeof IOThemes;
14
7
 
15
8
  type IOThemeContextType = {
@@ -41,18 +34,12 @@ export const IOThemeContextProvider = ({
41
34
  const [currentTheme, setCurrentTheme] = React.useState<IOThemeType>(
42
35
  theme ?? "light"
43
36
  );
44
- const { isExperimental } = useIOExperimentalDesign();
45
-
46
- const themeMap = useMemo(
47
- () => (isExperimental ? IOThemes : legacyIOThemes),
48
- [isExperimental]
49
- );
50
37
 
51
38
  return (
52
39
  <IOThemeContext.Provider
53
40
  value={{
54
41
  themeType: currentTheme,
55
- theme: themeMap[currentTheme],
42
+ theme: IOThemes[currentTheme],
56
43
  setTheme: setCurrentTheme
57
44
  }}
58
45
  >
package/src/core/index.ts CHANGED
@@ -4,5 +4,6 @@ export * from "./IOTransitions";
4
4
  export * from "./IOStyles";
5
5
  export * from "./IOShapes";
6
6
  export * from "./IOSpacing";
7
+ export * from "./IONewTypefaceContextProvider";
7
8
  export * from "./IODSExperimentalContextProvider";
8
9
  export * from "./IOThemeContextProvider";
@@ -1,93 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.RawAccordion = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _IOStyles = require("../../core/IOStyles");
10
- var _Icon = require("../icons/Icon");
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
- // TODO: handle external initial open/closed state
14
-
15
- const styles = _reactNative.StyleSheet.create({
16
- headerIcon: {
17
- alignSelf: "center"
18
- },
19
- row: {
20
- ..._IOStyles.IOStyles.row,
21
- justifyContent: "space-between"
22
- },
23
- internalHeader: {
24
- flex: 1,
25
- paddingRight: _IOStyles.IOVisualCostants.appMarginDefault
26
- }
27
- });
28
-
29
- /**
30
- * Obtains the degree starting from the open state
31
- * @param isOpen
32
- */
33
- const getDegree = isOpen => isOpen ? "-90deg" : "-270deg";
34
-
35
- /**
36
- * The base accordion component, implements the opening and closing logic for viewing the children
37
- * @param props
38
- * @constructor
39
- */
40
- const RawAccordion = props => {
41
- const [isOpen, setOpen] = (0, React.useState)(false);
42
- const animatedController = (0, React.useRef)(new _reactNative.Animated.Value(1)).current;
43
- const shouldAnimate = props.animated ?? true;
44
- const headerStyle = props.headerStyle ?? {};
45
- const accessibilityLabel = props.accessibilityLabel ? `${props.accessibilityLabel}, ` : "";
46
- const arrowAngle = shouldAnimate ? animatedController.interpolate({
47
- inputRange: [0, 1],
48
- outputRange: ["0deg", "-180deg"]
49
- }) : getDegree(isOpen);
50
- (0, React.useEffect)(() => {
51
- if (_reactNative.Platform.OS === "android") {
52
- _reactNative.UIManager.setLayoutAnimationEnabledExperimental(shouldAnimate);
53
- }
54
- }, [shouldAnimate]);
55
- const onPress = () => {
56
- if (shouldAnimate) {
57
- _reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);
58
- _reactNative.Animated.timing(animatedController, {
59
- duration: 300,
60
- toValue: isOpen ? 1 : 0,
61
- useNativeDriver: true,
62
- easing: _reactNative.Easing.linear
63
- }).start();
64
- }
65
- setOpen(!isOpen);
66
- };
67
- return /*#__PURE__*/React.createElement(_reactNative.View, {
68
- style: _IOStyles.IOStyles.flex
69
- }, /*#__PURE__*/React.createElement(_reactNative.TouchableWithoutFeedback, {
70
- onPress: onPress,
71
- accessible: true,
72
- accessibilityRole: "button",
73
- accessibilityLabel: accessibilityLabel + (isOpen ? "Paragrafo espanso" : "Paragrafo chiuso")
74
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
75
- style: [styles.row, headerStyle]
76
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
77
- style: styles.internalHeader
78
- }, props.header), /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
79
- testID: "ArrowAccordion",
80
- style: {
81
- ...styles.headerIcon,
82
- transform: [{
83
- rotateZ: arrowAngle
84
- }]
85
- }
86
- }, /*#__PURE__*/React.createElement(_Icon.Icon, {
87
- name: "chevronTop",
88
- color: "blue",
89
- size: 24
90
- })))), isOpen && props.children);
91
- };
92
- exports.RawAccordion = RawAccordion;
93
- //# sourceMappingURL=RawAccordion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_IOStyles","_Icon","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","styles","StyleSheet","create","headerIcon","alignSelf","row","IOStyles","justifyContent","internalHeader","flex","paddingRight","IOVisualCostants","appMarginDefault","getDegree","isOpen","RawAccordion","props","setOpen","useState","animatedController","useRef","Animated","Value","current","shouldAnimate","animated","headerStyle","accessibilityLabel","arrowAngle","interpolate","inputRange","outputRange","useEffect","Platform","OS","UIManager","setLayoutAnimationEnabledExperimental","onPress","LayoutAnimation","configureNext","Presets","easeInEaseOut","timing","duration","toValue","useNativeDriver","easing","Easing","linear","start","createElement","View","style","TouchableWithoutFeedback","accessible","accessibilityRole","header","testID","transform","rotateZ","Icon","name","color","size","children","exports"],"sourceRoot":"../../../../src","sources":["components/accordion/RawAccordion.tsx"],"mappings":"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"}
@@ -1,86 +0,0 @@
1
- import * as React from "react";
2
- import { useEffect, useRef, useState } from "react";
3
- import { Animated, Easing, LayoutAnimation, Platform, StyleSheet, TouchableWithoutFeedback, UIManager, View } from "react-native";
4
- import { IOStyles, IOVisualCostants } from "../../core/IOStyles";
5
- import { Icon } from "../icons/Icon";
6
-
7
- // TODO: handle external initial open/closed state
8
-
9
- const styles = StyleSheet.create({
10
- headerIcon: {
11
- alignSelf: "center"
12
- },
13
- row: {
14
- ...IOStyles.row,
15
- justifyContent: "space-between"
16
- },
17
- internalHeader: {
18
- flex: 1,
19
- paddingRight: IOVisualCostants.appMarginDefault
20
- }
21
- });
22
-
23
- /**
24
- * Obtains the degree starting from the open state
25
- * @param isOpen
26
- */
27
- const getDegree = isOpen => isOpen ? "-90deg" : "-270deg";
28
-
29
- /**
30
- * The base accordion component, implements the opening and closing logic for viewing the children
31
- * @param props
32
- * @constructor
33
- */
34
- export const RawAccordion = props => {
35
- const [isOpen, setOpen] = useState(false);
36
- const animatedController = useRef(new Animated.Value(1)).current;
37
- const shouldAnimate = props.animated ?? true;
38
- const headerStyle = props.headerStyle ?? {};
39
- const accessibilityLabel = props.accessibilityLabel ? `${props.accessibilityLabel}, ` : "";
40
- const arrowAngle = shouldAnimate ? animatedController.interpolate({
41
- inputRange: [0, 1],
42
- outputRange: ["0deg", "-180deg"]
43
- }) : getDegree(isOpen);
44
- useEffect(() => {
45
- if (Platform.OS === "android") {
46
- UIManager.setLayoutAnimationEnabledExperimental(shouldAnimate);
47
- }
48
- }, [shouldAnimate]);
49
- const onPress = () => {
50
- if (shouldAnimate) {
51
- LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
52
- Animated.timing(animatedController, {
53
- duration: 300,
54
- toValue: isOpen ? 1 : 0,
55
- useNativeDriver: true,
56
- easing: Easing.linear
57
- }).start();
58
- }
59
- setOpen(!isOpen);
60
- };
61
- return /*#__PURE__*/React.createElement(View, {
62
- style: IOStyles.flex
63
- }, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
64
- onPress: onPress,
65
- accessible: true,
66
- accessibilityRole: "button",
67
- accessibilityLabel: accessibilityLabel + (isOpen ? "Paragrafo espanso" : "Paragrafo chiuso")
68
- }, /*#__PURE__*/React.createElement(View, {
69
- style: [styles.row, headerStyle]
70
- }, /*#__PURE__*/React.createElement(View, {
71
- style: styles.internalHeader
72
- }, props.header), /*#__PURE__*/React.createElement(Animated.View, {
73
- testID: "ArrowAccordion",
74
- style: {
75
- ...styles.headerIcon,
76
- transform: [{
77
- rotateZ: arrowAngle
78
- }]
79
- }
80
- }, /*#__PURE__*/React.createElement(Icon, {
81
- name: "chevronTop",
82
- color: "blue",
83
- size: 24
84
- })))), isOpen && props.children);
85
- };
86
- //# sourceMappingURL=RawAccordion.js.map