@pagopa/io-app-design-system 1.17.2 → 1.19.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 (298) hide show
  1. package/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +110 -0
  2. package/lib/commonjs/components/Advice/__test__/advice.test.js +9 -0
  3. package/lib/commonjs/components/Advice/__test__/advice.test.js.map +1 -1
  4. package/lib/commonjs/components/accordion/AccordionItem.js +25 -9
  5. package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -1
  6. package/lib/commonjs/components/avatar/__test__/__snapshots__/avatar.test.tsx.snap +37 -0
  7. package/lib/commonjs/components/avatar/__test__/avatar.test.js +13 -0
  8. package/lib/commonjs/components/avatar/__test__/avatar.test.js.map +1 -1
  9. package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +46 -0
  10. package/lib/commonjs/components/badge/__test__/badge.test.js +10 -0
  11. package/lib/commonjs/components/badge/__test__/badge.test.js.map +1 -1
  12. package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +315 -0
  13. package/lib/commonjs/components/banner/__test__/banner.test.js +15 -0
  14. package/lib/commonjs/components/banner/__test__/banner.test.js.map +1 -1
  15. package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +862 -0
  16. package/lib/commonjs/components/buttons/__test__/button.test.js +57 -0
  17. package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
  18. package/lib/commonjs/components/checkbox/CheckboxLabel.js +6 -29
  19. package/lib/commonjs/components/checkbox/CheckboxLabel.js.map +1 -1
  20. package/lib/commonjs/components/codeInput/CodeInput.js +10 -25
  21. package/lib/commonjs/components/codeInput/CodeInput.js.map +1 -1
  22. package/lib/commonjs/components/endOfPage/EndOfPage.js +36 -0
  23. package/lib/commonjs/components/endOfPage/EndOfPage.js.map +1 -0
  24. package/lib/commonjs/components/endOfPage/index.js +17 -0
  25. package/lib/commonjs/components/endOfPage/index.js.map +1 -0
  26. package/lib/commonjs/components/icons/Icon.js +64 -48
  27. package/lib/commonjs/components/icons/Icon.js.map +1 -1
  28. package/lib/commonjs/components/icons/svg/IconSystemLocationiOS.js +34 -0
  29. package/lib/commonjs/components/icons/svg/IconSystemLocationiOS.js.map +1 -0
  30. package/lib/commonjs/components/icons/svg/IconSystemNotificationsInstructions.js +1 -0
  31. package/lib/commonjs/components/icons/svg/IconSystemNotificationsInstructions.js.map +1 -1
  32. package/lib/commonjs/components/icons/svg/IconSystemPermissionsAndroid.js +34 -0
  33. package/lib/commonjs/components/icons/svg/IconSystemPermissionsAndroid.js.map +1 -0
  34. package/lib/commonjs/components/icons/svg/IconSystemPhotosiOS.js +105 -0
  35. package/lib/commonjs/components/icons/svg/IconSystemPhotosiOS.js.map +1 -0
  36. package/lib/commonjs/components/icons/svg/IconSystemPrivacyiOS.js +34 -0
  37. package/lib/commonjs/components/icons/svg/IconSystemPrivacyiOS.js.map +1 -0
  38. package/lib/commonjs/components/icons/svg/originals/IconSystemLocationiOS.svg +7 -0
  39. package/lib/commonjs/components/icons/svg/originals/IconSystemNotificationsInstructions.svg +22 -0
  40. package/lib/commonjs/components/icons/svg/originals/IconSystemPhotosiOS.svg +99 -0
  41. package/lib/commonjs/components/icons/svg/originals/IconSystemPrivacyiOS.svg +14 -0
  42. package/lib/commonjs/components/image/Image.js +47 -0
  43. package/lib/commonjs/components/image/Image.js.map +1 -0
  44. package/lib/commonjs/components/image/index.js +17 -0
  45. package/lib/commonjs/components/image/index.js.map +1 -0
  46. package/lib/commonjs/components/index.js +33 -0
  47. package/lib/commonjs/components/index.js.map +1 -1
  48. package/lib/commonjs/components/layout/HeaderSecondLevel.js +9 -3
  49. package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
  50. package/lib/commonjs/components/listitems/ListItemHeader.js +4 -3
  51. package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
  52. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +4 -1
  53. package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  54. package/lib/commonjs/components/listitems/ListItemTransaction.js +6 -3
  55. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  56. package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +1729 -0
  57. package/lib/commonjs/components/listitems/__test__/listitem.test.js +83 -3
  58. package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
  59. package/lib/commonjs/components/otpInput/BoxedInput.js +72 -0
  60. package/lib/commonjs/components/otpInput/BoxedInput.js.map +1 -0
  61. package/lib/commonjs/components/otpInput/OTPInput.js +131 -0
  62. package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -0
  63. package/lib/commonjs/components/otpInput/index.js +17 -0
  64. package/lib/commonjs/components/otpInput/index.js.map +1 -0
  65. package/lib/commonjs/components/pictograms/Pictogram.js +74 -68
  66. package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
  67. package/lib/commonjs/components/pictograms/svg/PictogramComunicationProblem.js +85 -0
  68. package/lib/commonjs/components/pictograms/svg/PictogramComunicationProblem.js.map +1 -0
  69. package/lib/commonjs/components/pictograms/svg/PictogramEventClose.js +40 -0
  70. package/lib/commonjs/components/pictograms/svg/PictogramEventClose.js.map +1 -0
  71. package/lib/commonjs/components/pictograms/svg/PictogramHello.js +61 -0
  72. package/lib/commonjs/components/pictograms/svg/PictogramHello.js.map +1 -0
  73. package/lib/commonjs/components/pictograms/svg/originals/PictogramComunicationProblem.svg +91 -0
  74. package/lib/commonjs/components/pictograms/svg/originals/PictogramEventClose.svg +34 -0
  75. package/lib/commonjs/components/pictograms/svg/originals/PictogramHello.svg +46 -0
  76. package/lib/commonjs/components/radio/RadioButtonLabel.js +70 -0
  77. package/lib/commonjs/components/radio/RadioButtonLabel.js.map +1 -0
  78. package/lib/commonjs/components/radio/RadioGroup.js +25 -21
  79. package/lib/commonjs/components/radio/RadioGroup.js.map +1 -1
  80. package/lib/commonjs/components/radio/index.js +11 -0
  81. package/lib/commonjs/components/radio/index.js.map +1 -1
  82. package/lib/commonjs/components/tabs/TabItem.js +13 -6
  83. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  84. package/lib/commonjs/components/typography/LabelHeader.js +6 -4
  85. package/lib/commonjs/components/typography/LabelHeader.js.map +1 -1
  86. package/lib/commonjs/core/IODSExperimentalContextProvider.js +9 -9
  87. package/lib/commonjs/core/IODSExperimentalContextProvider.js.map +1 -1
  88. package/lib/commonjs/utils/hooks/useErrorShakeAnimation.js +44 -0
  89. package/lib/commonjs/utils/hooks/useErrorShakeAnimation.js.map +1 -0
  90. package/lib/commonjs/utils/testing.js +15 -0
  91. package/lib/commonjs/utils/testing.js.map +1 -0
  92. package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +110 -0
  93. package/lib/module/components/Advice/__test__/advice.test.js +9 -0
  94. package/lib/module/components/Advice/__test__/advice.test.js.map +1 -1
  95. package/lib/module/components/accordion/AccordionItem.js +27 -11
  96. package/lib/module/components/accordion/AccordionItem.js.map +1 -1
  97. package/lib/module/components/avatar/__test__/__snapshots__/avatar.test.tsx.snap +37 -0
  98. package/lib/module/components/avatar/__test__/avatar.test.js +13 -0
  99. package/lib/module/components/avatar/__test__/avatar.test.js.map +1 -1
  100. package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +46 -0
  101. package/lib/module/components/badge/__test__/badge.test.js +10 -0
  102. package/lib/module/components/badge/__test__/badge.test.js.map +1 -1
  103. package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +315 -0
  104. package/lib/module/components/banner/__test__/banner.test.js +15 -0
  105. package/lib/module/components/banner/__test__/banner.test.js.map +1 -1
  106. package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +862 -0
  107. package/lib/module/components/buttons/__test__/button.test.js +57 -0
  108. package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
  109. package/lib/module/components/checkbox/CheckboxLabel.js +7 -30
  110. package/lib/module/components/checkbox/CheckboxLabel.js.map +1 -1
  111. package/lib/module/components/codeInput/CodeInput.js +9 -25
  112. package/lib/module/components/codeInput/CodeInput.js.map +1 -1
  113. package/lib/module/components/endOfPage/EndOfPage.js +28 -0
  114. package/lib/module/components/endOfPage/EndOfPage.js.map +1 -0
  115. package/lib/module/components/endOfPage/index.js +2 -0
  116. package/lib/module/components/endOfPage/index.js.map +1 -0
  117. package/lib/module/components/icons/Icon.js +64 -48
  118. package/lib/module/components/icons/Icon.js.map +1 -1
  119. package/lib/module/components/icons/svg/IconSystemLocationiOS.js +26 -0
  120. package/lib/module/components/icons/svg/IconSystemLocationiOS.js.map +1 -0
  121. package/lib/module/components/icons/svg/IconSystemNotificationsInstructions.js +2 -1
  122. package/lib/module/components/icons/svg/IconSystemNotificationsInstructions.js.map +1 -1
  123. package/lib/module/components/icons/svg/IconSystemPermissionsAndroid.js +26 -0
  124. package/lib/module/components/icons/svg/IconSystemPermissionsAndroid.js.map +1 -0
  125. package/lib/module/components/icons/svg/IconSystemPhotosiOS.js +97 -0
  126. package/lib/module/components/icons/svg/IconSystemPhotosiOS.js.map +1 -0
  127. package/lib/module/components/icons/svg/IconSystemPrivacyiOS.js +26 -0
  128. package/lib/module/components/icons/svg/IconSystemPrivacyiOS.js.map +1 -0
  129. package/lib/module/components/icons/svg/originals/IconSystemLocationiOS.svg +7 -0
  130. package/lib/module/components/icons/svg/originals/IconSystemNotificationsInstructions.svg +22 -0
  131. package/lib/module/components/icons/svg/originals/IconSystemPhotosiOS.svg +99 -0
  132. package/lib/module/components/icons/svg/originals/IconSystemPrivacyiOS.svg +14 -0
  133. package/lib/module/components/image/Image.js +39 -0
  134. package/lib/module/components/image/Image.js.map +1 -0
  135. package/lib/module/components/image/index.js +2 -0
  136. package/lib/module/components/image/index.js.map +1 -0
  137. package/lib/module/components/index.js +3 -0
  138. package/lib/module/components/index.js.map +1 -1
  139. package/lib/module/components/layout/HeaderSecondLevel.js +9 -3
  140. package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
  141. package/lib/module/components/listitems/ListItemHeader.js +4 -3
  142. package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
  143. package/lib/module/components/listitems/ListItemRadioWithAmount.js +4 -1
  144. package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
  145. package/lib/module/components/listitems/ListItemTransaction.js +6 -3
  146. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  147. package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +1729 -0
  148. package/lib/module/components/listitems/__test__/listitem.test.js +83 -3
  149. package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
  150. package/lib/module/components/otpInput/BoxedInput.js +64 -0
  151. package/lib/module/components/otpInput/BoxedInput.js.map +1 -0
  152. package/lib/module/components/otpInput/OTPInput.js +121 -0
  153. package/lib/module/components/otpInput/OTPInput.js.map +1 -0
  154. package/lib/module/components/otpInput/index.js +2 -0
  155. package/lib/module/components/otpInput/index.js.map +1 -0
  156. package/lib/module/components/pictograms/Pictogram.js +74 -68
  157. package/lib/module/components/pictograms/Pictogram.js.map +1 -1
  158. package/lib/module/components/pictograms/svg/PictogramComunicationProblem.js +77 -0
  159. package/lib/module/components/pictograms/svg/PictogramComunicationProblem.js.map +1 -0
  160. package/lib/module/components/pictograms/svg/PictogramEventClose.js +32 -0
  161. package/lib/module/components/pictograms/svg/PictogramEventClose.js.map +1 -0
  162. package/lib/module/components/pictograms/svg/PictogramHello.js +53 -0
  163. package/lib/module/components/pictograms/svg/PictogramHello.js.map +1 -0
  164. package/lib/module/components/pictograms/svg/originals/PictogramComunicationProblem.svg +91 -0
  165. package/lib/module/components/pictograms/svg/originals/PictogramEventClose.svg +34 -0
  166. package/lib/module/components/pictograms/svg/originals/PictogramHello.svg +46 -0
  167. package/lib/module/components/radio/RadioButtonLabel.js +62 -0
  168. package/lib/module/components/radio/RadioButtonLabel.js.map +1 -0
  169. package/lib/module/components/radio/RadioGroup.js +25 -21
  170. package/lib/module/components/radio/RadioGroup.js.map +1 -1
  171. package/lib/module/components/radio/index.js +1 -0
  172. package/lib/module/components/radio/index.js.map +1 -1
  173. package/lib/module/components/tabs/TabItem.js +13 -6
  174. package/lib/module/components/tabs/TabItem.js.map +1 -1
  175. package/lib/module/components/typography/LabelHeader.js +6 -4
  176. package/lib/module/components/typography/LabelHeader.js.map +1 -1
  177. package/lib/module/core/IODSExperimentalContextProvider.js +3 -3
  178. package/lib/module/core/IODSExperimentalContextProvider.js.map +1 -1
  179. package/lib/module/utils/hooks/useErrorShakeAnimation.js +37 -0
  180. package/lib/module/utils/hooks/useErrorShakeAnimation.js.map +1 -0
  181. package/lib/module/utils/testing.js +7 -0
  182. package/lib/module/utils/testing.js.map +1 -0
  183. package/lib/typescript/components/accordion/AccordionItem.d.ts +3 -1
  184. package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -1
  185. package/lib/typescript/components/checkbox/CheckboxLabel.d.ts.map +1 -1
  186. package/lib/typescript/components/codeInput/CodeInput.d.ts.map +1 -1
  187. package/lib/typescript/components/endOfPage/EndOfPage.d.ts +23 -0
  188. package/lib/typescript/components/endOfPage/EndOfPage.d.ts.map +1 -0
  189. package/lib/typescript/components/endOfPage/index.d.ts +2 -0
  190. package/lib/typescript/components/endOfPage/index.d.ts.map +1 -0
  191. package/lib/typescript/components/icons/Icon.d.ts +8 -0
  192. package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
  193. package/lib/typescript/components/icons/svg/IconSystemLocationiOS.d.ts +5 -0
  194. package/lib/typescript/components/icons/svg/IconSystemLocationiOS.d.ts.map +1 -0
  195. package/lib/typescript/components/icons/svg/IconSystemNotificationsInstructions.d.ts.map +1 -1
  196. package/lib/typescript/components/icons/svg/IconSystemPermissionsAndroid.d.ts +5 -0
  197. package/lib/typescript/components/icons/svg/IconSystemPermissionsAndroid.d.ts.map +1 -0
  198. package/lib/typescript/components/icons/svg/IconSystemPhotosiOS.d.ts +5 -0
  199. package/lib/typescript/components/icons/svg/IconSystemPhotosiOS.d.ts.map +1 -0
  200. package/lib/typescript/components/icons/svg/IconSystemPrivacyiOS.d.ts +5 -0
  201. package/lib/typescript/components/icons/svg/IconSystemPrivacyiOS.d.ts.map +1 -0
  202. package/lib/typescript/components/image/Image.d.ts +17 -0
  203. package/lib/typescript/components/image/Image.d.ts.map +1 -0
  204. package/lib/typescript/components/image/index.d.ts +2 -0
  205. package/lib/typescript/components/image/index.d.ts.map +1 -0
  206. package/lib/typescript/components/index.d.ts +3 -0
  207. package/lib/typescript/components/index.d.ts.map +1 -1
  208. package/lib/typescript/components/layout/HeaderSecondLevel.d.ts +10 -4
  209. package/lib/typescript/components/layout/HeaderSecondLevel.d.ts.map +1 -1
  210. package/lib/typescript/components/listitems/ListItemHeader.d.ts +2 -2
  211. package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -1
  212. package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts +1 -0
  213. package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
  214. package/lib/typescript/components/listitems/ListItemTransaction.d.ts +6 -1
  215. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  216. package/lib/typescript/components/otpInput/BoxedInput.d.ts +9 -0
  217. package/lib/typescript/components/otpInput/BoxedInput.d.ts.map +1 -0
  218. package/lib/typescript/components/otpInput/OTPInput.d.ts +26 -0
  219. package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -0
  220. package/lib/typescript/components/otpInput/index.d.ts +2 -0
  221. package/lib/typescript/components/otpInput/index.d.ts.map +1 -0
  222. package/lib/typescript/components/pictograms/Pictogram.d.ts +3 -0
  223. package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
  224. package/lib/typescript/components/pictograms/svg/PictogramComunicationProblem.d.ts +5 -0
  225. package/lib/typescript/components/pictograms/svg/PictogramComunicationProblem.d.ts.map +1 -0
  226. package/lib/typescript/components/pictograms/svg/PictogramEventClose.d.ts +5 -0
  227. package/lib/typescript/components/pictograms/svg/PictogramEventClose.d.ts.map +1 -0
  228. package/lib/typescript/components/pictograms/svg/PictogramHello.d.ts +5 -0
  229. package/lib/typescript/components/pictograms/svg/PictogramHello.d.ts.map +1 -0
  230. package/lib/typescript/components/radio/RadioButtonLabel.d.ts +18 -0
  231. package/lib/typescript/components/radio/RadioButtonLabel.d.ts.map +1 -0
  232. package/lib/typescript/components/radio/RadioGroup.d.ts +22 -9
  233. package/lib/typescript/components/radio/RadioGroup.d.ts.map +1 -1
  234. package/lib/typescript/components/radio/index.d.ts +1 -0
  235. package/lib/typescript/components/radio/index.d.ts.map +1 -1
  236. package/lib/typescript/components/tabs/TabItem.d.ts +2 -1
  237. package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
  238. package/lib/typescript/components/typography/LabelHeader.d.ts +1 -1
  239. package/lib/typescript/components/typography/LabelHeader.d.ts.map +1 -1
  240. package/lib/typescript/core/IODSExperimentalContextProvider.d.ts +5 -1
  241. package/lib/typescript/core/IODSExperimentalContextProvider.d.ts.map +1 -1
  242. package/lib/typescript/utils/hooks/useErrorShakeAnimation.d.ts +11 -0
  243. package/lib/typescript/utils/hooks/useErrorShakeAnimation.d.ts.map +1 -0
  244. package/lib/typescript/utils/testing.d.ts +4 -0
  245. package/lib/typescript/utils/testing.d.ts.map +1 -0
  246. package/package.json +4 -2
  247. package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +110 -0
  248. package/src/components/Advice/__test__/advice.test.tsx +10 -0
  249. package/src/components/accordion/AccordionItem.tsx +33 -13
  250. package/src/components/avatar/__test__/__snapshots__/avatar.test.tsx.snap +37 -0
  251. package/src/components/avatar/__test__/avatar.test.tsx +10 -0
  252. package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +46 -0
  253. package/src/components/badge/__test__/badge.test.tsx +10 -0
  254. package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +315 -0
  255. package/src/components/banner/__test__/banner.test.tsx +18 -0
  256. package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +862 -0
  257. package/src/components/buttons/__test__/button.test.tsx +77 -1
  258. package/src/components/checkbox/CheckboxLabel.tsx +4 -31
  259. package/src/components/codeInput/CodeInput.tsx +5 -33
  260. package/src/components/endOfPage/EndOfPage.tsx +55 -0
  261. package/src/components/endOfPage/index.tsx +1 -0
  262. package/src/components/icons/Icon.tsx +64 -48
  263. package/src/components/icons/svg/IconSystemLocationiOS.tsx +15 -0
  264. package/src/components/icons/svg/IconSystemNotificationsInstructions.tsx +2 -1
  265. package/src/components/icons/svg/IconSystemPermissionsAndroid.tsx +19 -0
  266. package/src/components/icons/svg/IconSystemPhotosiOS.tsx +114 -0
  267. package/src/components/icons/svg/IconSystemPrivacyiOS.tsx +15 -0
  268. package/src/components/icons/svg/originals/IconSystemLocationiOS.svg +7 -0
  269. package/src/components/icons/svg/originals/IconSystemNotificationsInstructions.svg +22 -0
  270. package/src/components/icons/svg/originals/IconSystemPhotosiOS.svg +99 -0
  271. package/src/components/icons/svg/originals/IconSystemPrivacyiOS.svg +14 -0
  272. package/src/components/image/Image.tsx +49 -0
  273. package/src/components/image/index.tsx +1 -0
  274. package/src/components/index.tsx +3 -0
  275. package/src/components/layout/HeaderSecondLevel.tsx +28 -10
  276. package/src/components/listitems/ListItemHeader.tsx +6 -3
  277. package/src/components/listitems/ListItemRadioWithAmount.tsx +5 -1
  278. package/src/components/listitems/ListItemTransaction.tsx +12 -1
  279. package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +1729 -0
  280. package/src/components/listitems/__test__/listitem.test.tsx +104 -3
  281. package/src/components/otpInput/BoxedInput.tsx +67 -0
  282. package/src/components/otpInput/OTPInput.tsx +135 -0
  283. package/src/components/otpInput/index.tsx +1 -0
  284. package/src/components/pictograms/Pictogram.tsx +74 -68
  285. package/src/components/pictograms/svg/PictogramComunicationProblem.tsx +94 -0
  286. package/src/components/pictograms/svg/PictogramEventClose.tsx +34 -0
  287. package/src/components/pictograms/svg/PictogramHello.tsx +54 -0
  288. package/src/components/pictograms/svg/originals/PictogramComunicationProblem.svg +91 -0
  289. package/src/components/pictograms/svg/originals/PictogramEventClose.svg +34 -0
  290. package/src/components/pictograms/svg/originals/PictogramHello.svg +46 -0
  291. package/src/components/radio/RadioButtonLabel.tsx +73 -0
  292. package/src/components/radio/RadioGroup.tsx +61 -11
  293. package/src/components/radio/index.tsx +1 -0
  294. package/src/components/tabs/TabItem.tsx +22 -6
  295. package/src/components/typography/LabelHeader.tsx +11 -6
  296. package/src/core/IODSExperimentalContextProvider.tsx +3 -3
  297. package/src/utils/hooks/useErrorShakeAnimation.ts +43 -0
  298. package/src/utils/testing.tsx +14 -0
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import { Pressable } from "react-native";
3
+ import { AnimatedRadio } from "./AnimatedRadio";
4
+ type Props = {
5
+ label: string;
6
+ onValueChange?: (newValue: boolean) => void;
7
+ };
8
+ type OwnProps = Props & Pick<React.ComponentProps<typeof AnimatedRadio>, "disabled" | "checked"> & Pick<React.ComponentProps<typeof Pressable>, "onPress">;
9
+ /**
10
+ * A radio button with the automatic state management that uses a {@link AnimatedRadio}
11
+ * The toggleValue change when a `onPress` event is received and dispatch the `onValueChange`.
12
+ *
13
+ * @param props
14
+ * @constructor
15
+ */
16
+ export declare const RadioButtonLabel: ({ label, checked, disabled, onValueChange }: OwnProps) => React.JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=RadioButtonLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButtonLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/RadioButtonLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IAEd,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAMF,KAAK,QAAQ,GAAG,KAAK,GACnB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,GACxE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,gDAK1B,QAAQ,sBAqCV,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React, { ComponentProps } from "react";
2
- import { ListItemRadio } from "../listitems/ListItemRadio";
2
+ import { ListItemRadio } from "../listitems";
3
3
  export type RadioItem<T> = {
4
4
  id: T;
5
5
  value: string;
@@ -8,16 +8,29 @@ export type RadioItem<T> = {
8
8
  startImage?: ComponentProps<typeof ListItemRadio>["startImage"];
9
9
  loadingProps?: ComponentProps<typeof ListItemRadio>["loadingProps"];
10
10
  };
11
- type Props<T> = {
12
- items: ReadonlyArray<RadioItem<T>>;
11
+ export type RadioItemWithAmount<T> = {
12
+ id: T;
13
+ label: string;
14
+ formattedAmountString: string;
15
+ } & ({
16
+ isSuggested?: false;
17
+ } | {
18
+ isSuggested: true;
19
+ suggestReason: string;
20
+ });
21
+ type CommonProps<T> = {
13
22
  selectedItem?: T;
14
23
  onPress: (selected: T) => void;
15
24
  };
16
- /**
17
- * A list of radio buttons.
18
- * The management of the selection is demanded and derived by the `selectedItem` prop.
19
- * The item with the `id` equal to the `selectedItem` is the active one.
20
- */
21
- export declare const RadioGroup: <T>({ items, selectedItem, onPress }: Props<T>) => React.JSX.Element;
25
+ type RadioListItemProps<T> = {
26
+ type: "radioListItem";
27
+ items: ReadonlyArray<RadioItem<T>>;
28
+ } & CommonProps<T>;
29
+ type RadioListItemWithAmountProps<T> = {
30
+ type: "radioListItemWithAmount";
31
+ items: ReadonlyArray<RadioItemWithAmount<T>>;
32
+ } & CommonProps<T>;
33
+ type Props<T> = RadioListItemProps<T> | RadioListItemWithAmountProps<T>;
34
+ export declare const RadioGroup: <T>(props: Props<T>) => React.JSX.Element;
22
35
  export {};
23
36
  //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,YAAY,CAAC,CAAC;IAChE,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,cAAc,CAAC,CAAC;CACrE,CAAC;AAEF,KAAK,KAAK,CAAC,CAAC,IAAI;IACd,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,sEAkBtB,CAAC"}
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,aAAa,EAA2B,MAAM,cAAc,CAAC;AAEtE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,YAAY,CAAC,CAAC;IAChE,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,cAAc,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,MAAM,CAAC;CAC/B,GAAG,CACA;IACE,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,GACD;IACE,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CACJ,CAAC;AACF,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CACpC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEnB,KAAK,4BAA4B,CAAC,CAAC,IAAI;IACrC,IAAI,EAAE,yBAAyB,CAAC;IAChC,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9C,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEnB,KAAK,KAAK,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,4BAA4B,CAAC,CAAC,CAAC,CAAC;AA+CxE,eAAO,MAAM,UAAU,2CAKtB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from "./AnimatedRadio";
2
+ export * from "./RadioButtonLabel";
2
3
  export * from "./RadioGroup";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
@@ -13,7 +13,8 @@ export type TabItem = WithTestID<{
13
13
  accessibilityLabel: string;
14
14
  accessibilityHint?: string;
15
15
  onPress?: (event: GestureResponderEvent) => void;
16
+ disabled?: boolean;
16
17
  }>;
17
- declare const TabItem: ({ label, color, selected, fullWidth, accessibilityLabel, accessibilityHint, testID, onPress, icon, iconSelected }: TabItem) => React.JSX.Element;
18
+ declare const TabItem: ({ label, color, selected, fullWidth, accessibilityLabel, accessibilityHint, testID, onPress, disabled, icon, iconSelected }: TabItem) => React.JSX.Element;
18
19
  export { TabItem };
19
20
  //# sourceMappingURL=TabItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabItem.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/TabItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAyB,MAAM,cAAc,CAAC;AAU5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAC;AAMzC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClD,CAAC,CAAC;AAuCH,QAAA,MAAM,OAAO,sHAWV,OAAO,sBAkFT,CAAC;AAiBF,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"TabItem.d.ts","sourceRoot":"","sources":["../../../../src/components/tabs/TabItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAyB,MAAM,cAAc,CAAC;AAU5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAC;AAMzC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AA0CH,QAAA,MAAM,OAAO,gIAYV,OAAO,sBA4FT,CAAC;AAkBF,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -3,7 +3,7 @@ import { IOFontWeight } from "../../utils/fonts";
3
3
  import { IOTheme } from "../../core";
4
4
  import { ExternalTypographyProps, TypographyProps } from "./common";
5
5
  type AllowedColors = IOTheme["textBody-default"] | "grey-650" | "grey-850" | "white" | "black";
6
- type AllowedWeight = Extract<IOFontWeight, "Regular">;
6
+ type AllowedWeight = Extract<IOFontWeight, "Regular" | "SemiBold">;
7
7
  type LabelHeaderProps = ExternalTypographyProps<TypographyProps<AllowedWeight, AllowedColors>>;
8
8
  export declare const labelHeaderFontSize = 14;
9
9
  export declare const labelHeaderLineHeight = 18;
@@ -1 +1 @@
1
- {"version":3,"file":"LabelHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAyC,MAAM,YAAY,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEpE,KAAK,aAAa,GACd,OAAO,CAAC,kBAAkB,CAAC,GAC3B,UAAU,GACV,UAAU,GACV,OAAO,GACP,OAAO,CAAC;AACZ,KAAK,aAAa,GAAG,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AAEtD,KAAK,gBAAgB,GAAG,uBAAuB,CAC7C,eAAe,CAAC,aAAa,EAAE,aAAa,CAAC,CAC9C,CAAC;AAEF,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,uBAAuB,EAAE,aACJ,CAAC;AAOnC;;GAEG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCAalD,CAAC"}
1
+ {"version":3,"file":"LabelHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAyC,MAAM,YAAY,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEpE,KAAK,aAAa,GACd,OAAO,CAAC,kBAAkB,CAAC,GAC3B,UAAU,GACV,UAAU,GACV,OAAO,GACP,OAAO,CAAC;AACZ,KAAK,aAAa,GAAG,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;AAEnE,KAAK,gBAAgB,GAAG,uBAAuB,CAC7C,eAAe,CAAC,aAAa,EAAE,aAAa,CAAC,CAC9C,CAAC;AAEF,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,uBAAuB,EAAE,aACJ,CAAC;AAQnC;;GAEG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCAiBlD,CAAC"}
@@ -1,8 +1,12 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  type IOExperimentalContextType = {
3
3
  isExperimental: boolean;
4
4
  setExperimental: (isExperimental: boolean) => void;
5
5
  };
6
+ /**
7
+ * Experimental Context for new UI Representations
8
+ */
9
+ export declare const IOExperimentalDesignContext: React.Context<IOExperimentalContextType>;
6
10
  export declare const useIOExperimentalDesign: () => IOExperimentalContextType;
7
11
  type IOExperimentalContextProviderProps = {
8
12
  isExperimentaEnabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD,CAAC;AAUF,eAAO,MAAM,uBAAuB,iCACW,CAAC;AAEhD,KAAK,kCAAkC,GAAG;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,+BAA+B,uCAGzC,MAAM,iBAAiB,CAAC,kCAAkC,CAAC,sBAY7D,CAAC"}
1
+ {"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,2BAA2B,0CAIpC,CAAC;AAEL,eAAO,MAAM,uBAAuB,iCACW,CAAC;AAEhD,KAAK,kCAAkC,GAAG;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,+BAA+B,uCAGzC,MAAM,iBAAiB,CAAC,kCAAkC,CAAC,sBAY7D,CAAC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react-native-reanimated" />
2
+ export declare const useErrorShakeAnimation: () => {
3
+ translate: import("react-native-reanimated").SharedValue<number>;
4
+ animatedStyle: {
5
+ transform: {
6
+ translateX: number;
7
+ }[];
8
+ };
9
+ shakeAnimation: () => number;
10
+ };
11
+ //# sourceMappingURL=useErrorShakeAnimation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useErrorShakeAnimation.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useErrorShakeAnimation.ts"],"names":[],"mappings":";AAYA,eAAO,MAAM,sBAAsB;;;;;;;;CA8BlC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import TestRenderer from "react-test-renderer";
3
+ export declare const TestRendererWithExperimentalEnabledContextProvider: (ui: React.ReactElement, options?: TestRenderer.TestRendererOptions) => TestRenderer.ReactTestRenderer;
4
+ //# sourceMappingURL=testing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/utils/testing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAG/C,eAAO,MAAM,kDAAkD,OACzD,MAAM,YAAY,YACZ,aAAa,mBAAmB,mCAOzC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-app-design-system",
3
- "version": "1.17.2",
3
+ "version": "1.19.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",
@@ -37,6 +37,8 @@
37
37
  "bootstrap": "yarn example && yarn install",
38
38
  "storybook": "storybook dev -p 6006",
39
39
  "build-storybook": "storybook build",
40
+ "predeploy": "yarn build-storybook",
41
+ "deploy-storybook": "gh-pages -d storybook-static",
40
42
  "generate:icons": "node scripts/generateNewIcons.js",
41
43
  "generate:pictograms": "node scripts/generateNewPictograms.js",
42
44
  "generate": "npm-run-all generate:*"
@@ -52,7 +54,7 @@
52
54
  "bugs": {
53
55
  "url": "https://github.com/pagopa/io-app-design-system/issues"
54
56
  },
55
- "homepage": "https://github.com/pagopa/io-app-design-system#readme",
57
+ "homepage": "https://pagopa.github.io/io-app-design-system",
56
58
  "devDependencies": {
57
59
  "@babel/plugin-proposal-class-properties": "^7.18.6",
58
60
  "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
@@ -1,5 +1,115 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Test Advice Components - Experimental Enabled Advice Snapshot 1`] = `
4
+ <View
5
+ style={
6
+ {
7
+ "flexDirection": "row",
8
+ }
9
+ }
10
+ >
11
+ <View
12
+ style={
13
+ {
14
+ "marginTop": 4,
15
+ }
16
+ }
17
+ >
18
+ <RNSVGSvgView
19
+ accessibilityElementsHidden={true}
20
+ accessibilityLabel=""
21
+ accessible={false}
22
+ align="xMidYMid"
23
+ bbHeight={20}
24
+ bbWidth={20}
25
+ color={4278219750}
26
+ focusable={false}
27
+ height={20}
28
+ importantForAccessibility="no-hide-descendants"
29
+ meetOrSlice={0}
30
+ minX={0}
31
+ minY={0}
32
+ style={
33
+ [
34
+ {
35
+ "backgroundColor": "transparent",
36
+ "borderWidth": 0,
37
+ },
38
+ {
39
+ "color": "#0073E6",
40
+ },
41
+ {
42
+ "flex": 0,
43
+ "height": 20,
44
+ "width": 20,
45
+ },
46
+ ]
47
+ }
48
+ tintColor={4278219750}
49
+ vbHeight={24}
50
+ vbWidth={24}
51
+ width={20}
52
+ >
53
+ <RNSVGGroup>
54
+ <RNSVGPath
55
+ clipRule={0}
56
+ d="M0 12C0 5.3726 5.3726 0 12 0s12 5.3726 12 12-5.3726 12-12 12S0 18.6274 0 12Zm2 0C2 6.47717 6.47717 2 12 2c5.5228 0 10 4.47717 10 10 0 5.5228-4.4772 10-10 10-5.52283 0-10-4.4772-10-10Zm10.0281 7.5c.8439 0 1.5281-.6842 1.5281-1.5281s-.6842-1.5281-1.5281-1.5281c-.844 0-1.5281.6842-1.5281 1.5281S11.1841 19.5 12.0281 19.5Zm0-15.05618h.0005c.5678 0 1.0281.46029 1.0281 1.02808v8.0046c0 .5678-.4603 1.028-1.0281 1.028h-.0005c-.5678 0-1.0281-.4602-1.0281-1.028V5.4719c0-.56779.4603-1.02808 1.0281-1.02808Z"
57
+ fill={
58
+ [
59
+ 2,
60
+ ]
61
+ }
62
+ fillRule={0}
63
+ propList={
64
+ [
65
+ "fill",
66
+ "fillRule",
67
+ ]
68
+ }
69
+ />
70
+ </RNSVGGroup>
71
+ </RNSVGSvgView>
72
+ </View>
73
+ <View
74
+ style={
75
+ {
76
+ "width": 8,
77
+ }
78
+ }
79
+ />
80
+ <Text
81
+ allowFontScaling={false}
82
+ color="bluegrey"
83
+ defaultColor="bluegrey"
84
+ defaultWeight="Regular"
85
+ font="TitilliumWeb"
86
+ fontStyle={
87
+ {
88
+ "fontSize": 16,
89
+ "lineHeight": 24,
90
+ }
91
+ }
92
+ style={
93
+ [
94
+ {
95
+ "fontSize": 16,
96
+ "lineHeight": 24,
97
+ },
98
+ {
99
+ "color": "#475A6D",
100
+ "fontFamily": "Titillium Web",
101
+ "fontStyle": "normal",
102
+ "fontWeight": "400",
103
+ },
104
+ ]
105
+ }
106
+ weight="Regular"
107
+ >
108
+ Text
109
+ </Text>
110
+ </View>
111
+ `;
112
+
3
113
  exports[`Test Advice Components Advice Snapshot 1`] = `
4
114
  <View
5
115
  style={
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import * as TestRenderer from "react-test-renderer";
3
+ import { TestRendererWithExperimentalEnabledContextProvider } from "../../../utils/testing";
3
4
  import { Advice } from "../Advice";
4
5
 
5
6
  describe("Test Advice Components", () => {
@@ -10,3 +11,12 @@ describe("Test Advice Components", () => {
10
11
  expect(advice).toMatchSnapshot();
11
12
  });
12
13
  });
14
+
15
+ describe("Test Advice Components - Experimental Enabled", () => {
16
+ it("Advice Snapshot", () => {
17
+ const advice = TestRendererWithExperimentalEnabledContextProvider(
18
+ <Advice text={"Text"}></Advice>
19
+ ).toJSON();
20
+ expect(advice).toMatchSnapshot();
21
+ });
22
+ });
@@ -1,27 +1,28 @@
1
1
  import React, { useState } from "react";
2
2
  import {
3
- Text,
4
- View,
3
+ LayoutChangeEvent,
5
4
  StyleSheet,
5
+ Text,
6
6
  TouchableWithoutFeedback,
7
- LayoutChangeEvent
7
+ View
8
8
  } from "react-native";
9
+ import LinearGradient from "react-native-linear-gradient";
9
10
  import Animated, {
10
11
  useAnimatedStyle,
11
12
  withSpring
12
13
  } from "react-native-reanimated";
13
- import LinearGradient from "react-native-linear-gradient";
14
- import { IOAccordionRadius, type IOSpacingScale } from "../../core";
15
- import { makeFontStyleObject } from "../../utils/fonts";
14
+ import { IOAccordionRadius, IOStyles, type IOSpacingScale } from "../../core";
15
+ import { IOSpringValues } from "../../core/IOAnimations";
16
16
  import { IOColors, hexToRgba } from "../../core/IOColors";
17
+ import { makeFontStyleObject } from "../../utils/fonts";
18
+ import { IOIconSizeScale, IOIcons, Icon } from "../icons/Icon";
17
19
  import { H6 } from "../typography";
18
- import { IOSpringValues } from "../../core/IOAnimations";
19
- import { Icon } from "../icons/Icon";
20
20
 
21
21
  export type AccordionItem = {
22
22
  id: number;
23
23
  title: string;
24
24
  body: string | React.ReactNode;
25
+ icon?: IOIcons;
25
26
  };
26
27
 
27
28
  type AccordionBody = {
@@ -30,10 +31,14 @@ type AccordionBody = {
30
31
  };
31
32
 
32
33
  const accordionBodySpacing: IOSpacingScale = 16;
33
- const accordionIconMargin: IOSpacingScale = 8;
34
+ const accordionIconMargin: IOSpacingScale = 12;
35
+ const accordionChevronMargin: IOSpacingScale = 8;
34
36
  const accordionBorder: IOColors = "grey-200";
35
37
  const accordionBackground: IOColors = "white";
36
38
 
39
+ // Icon size
40
+ const iconSize: IOIconSizeScale = 24;
41
+
37
42
  /* The code below is a re-adaptation of Dima Portenko's code:
38
43
  https://github.com/dimaportenko/reanimated-collapsable-card-tutorial
39
44
  */
@@ -68,7 +73,7 @@ export const AccordionBody = ({ children, expanded }: AccordionBody) => {
68
73
  );
69
74
  };
70
75
 
71
- export const AccordionItem = ({ title, body }: AccordionItem) => {
76
+ export const AccordionItem = ({ title, body, icon }: AccordionItem) => {
72
77
  const [expanded, setExpanded] = useState(false);
73
78
 
74
79
  const onItemPress = () => {
@@ -97,8 +102,24 @@ export const AccordionItem = ({ title, body }: AccordionItem) => {
97
102
  onPress={onItemPress}
98
103
  >
99
104
  <View style={styles.textContainer}>
100
- <View style={{ flexShrink: 1, marginRight: accordionIconMargin }}>
101
- <H6 color="black">{title}</H6>
105
+ <View
106
+ style={[
107
+ IOStyles.row,
108
+ IOStyles.alignCenter,
109
+ {
110
+ flexShrink: 1,
111
+ marginRight: accordionChevronMargin
112
+ }
113
+ ]}
114
+ >
115
+ {icon && (
116
+ <View style={{ marginRight: accordionIconMargin }}>
117
+ <Icon name={icon} size={iconSize} color="black" />
118
+ </View>
119
+ )}
120
+ <View style={{ flexShrink: 1 }}>
121
+ <H6 color="black">{title}</H6>
122
+ </View>
102
123
  </View>
103
124
  <Animated.View style={animatedChevron}>
104
125
  <Icon name="chevronBottom" color="blueIO-500" />
@@ -157,7 +178,6 @@ const styles = StyleSheet.create({
157
178
  },
158
179
  textContainer: {
159
180
  padding: accordionBodySpacing,
160
- flexGrow: 1,
161
181
  flexDirection: "row",
162
182
  alignItems: "center",
163
183
  justifyContent: "space-between"
@@ -1,5 +1,42 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Test Avatar Components - Experimental Enabled Avatar Snapshot 1`] = `
4
+ <View
5
+ style={
6
+ [
7
+ {
8
+ "borderColor": "rgba(14,15,19,0.1)",
9
+ "borderWidth": 1,
10
+ "overflow": "hidden",
11
+ "resizeMode": "contain",
12
+ },
13
+ {
14
+ "backgroundColor": "#FFFFFF",
15
+ "borderRadius": 22,
16
+ "height": 44,
17
+ "padding": 6,
18
+ "width": 44,
19
+ },
20
+ ]
21
+ }
22
+ >
23
+ <Image
24
+ onError={[Function]}
25
+ source={
26
+ {
27
+ "uri": "",
28
+ }
29
+ }
30
+ style={
31
+ {
32
+ "height": "100%",
33
+ "width": "100%",
34
+ }
35
+ }
36
+ />
37
+ </View>
38
+ `;
39
+
3
40
  exports[`Test Avatar Components Avatar Snapshot 1`] = `
4
41
  <View
5
42
  style={
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import * as TestRenderer from "react-test-renderer";
3
+ import { TestRendererWithExperimentalEnabledContextProvider } from "../../../utils/testing";
3
4
  import { Avatar } from "../Avatar";
4
5
 
5
6
  describe("Test Avatar Components", () => {
@@ -10,3 +11,12 @@ describe("Test Avatar Components", () => {
10
11
  expect(avatar).toMatchSnapshot();
11
12
  });
12
13
  });
14
+
15
+ describe("Test Avatar Components - Experimental Enabled", () => {
16
+ it("Avatar Snapshot", () => {
17
+ const avatar = TestRendererWithExperimentalEnabledContextProvider(
18
+ <Avatar shape={"circle"} size={"small"} logoUri={{ uri: "" }}></Avatar>
19
+ ).toJSON();
20
+ expect(avatar).toMatchSnapshot();
21
+ });
22
+ });
@@ -1,5 +1,51 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Test Badge Components - Experimental Enabled Badge Snapshot 1`] = `
4
+ <View
5
+ style={
6
+ [
7
+ {
8
+ "alignItems": "center",
9
+ "borderRadius": 24,
10
+ "flexDirection": "row",
11
+ "justifyContent": "center",
12
+ "paddingHorizontal": 8,
13
+ "paddingVertical": 4,
14
+ },
15
+ {
16
+ "backgroundColor": "#F4F5F8",
17
+ },
18
+ ]
19
+ }
20
+ >
21
+ <Text
22
+ ellipsizeMode="tail"
23
+ numberOfLines={1}
24
+ style={
25
+ [
26
+ {
27
+ "alignSelf": "center",
28
+ "flexShrink": 1,
29
+ "fontSize": 12,
30
+ "lineHeight": 16,
31
+ "textTransform": "uppercase",
32
+ },
33
+ {
34
+ "fontFamily": "Readex Pro",
35
+ "fontStyle": "normal",
36
+ "fontWeight": "400",
37
+ },
38
+ {
39
+ "color": "#555C70",
40
+ },
41
+ ]
42
+ }
43
+ >
44
+ text
45
+ </Text>
46
+ </View>
47
+ `;
48
+
3
49
  exports[`Test Badge Components Badge Snapshot 1`] = `
4
50
  <View
5
51
  style={
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import * as TestRenderer from "react-test-renderer";
3
+ import { TestRendererWithExperimentalEnabledContextProvider } from "../../../utils/testing";
3
4
  import { Badge } from "../Badge";
4
5
 
5
6
  describe("Test Badge Components", () => {
@@ -10,3 +11,12 @@ describe("Test Badge Components", () => {
10
11
  expect(badge).toMatchSnapshot();
11
12
  });
12
13
  });
14
+
15
+ describe("Test Badge Components - Experimental Enabled", () => {
16
+ it("Badge Snapshot", () => {
17
+ const badge = TestRendererWithExperimentalEnabledContextProvider(
18
+ <Badge text={"text"} variant={"default"}></Badge>
19
+ ).toJSON();
20
+ expect(badge).toMatchSnapshot();
21
+ });
22
+ });