@pagopa/io-app-design-system 1.3.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/README.md +11 -0
  2. package/lib/commonjs/components/accordion/AccordionItem.js +137 -0
  3. package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -0
  4. package/lib/commonjs/components/accordion/index.js +4 -4
  5. package/lib/commonjs/components/accordion/index.js.map +1 -1
  6. package/lib/commonjs/components/alert/Alert.js +1 -1
  7. package/lib/commonjs/components/alert/Alert.js.map +1 -1
  8. package/lib/commonjs/components/banner/Banner.js +1 -1
  9. package/lib/commonjs/components/banner/Banner.js.map +1 -1
  10. package/lib/commonjs/components/buttons/ButtonExtendedOutline.js +1 -1
  11. package/lib/commonjs/components/buttons/ButtonExtendedOutline.js.map +1 -1
  12. package/lib/commonjs/components/buttons/ButtonLink.js +6 -6
  13. package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
  14. package/lib/commonjs/components/buttons/ButtonOutline.js +10 -10
  15. package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
  16. package/lib/commonjs/components/buttons/ButtonSolid.js +5 -5
  17. package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
  18. package/lib/commonjs/components/buttons/IconButton.js +4 -4
  19. package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
  20. package/lib/commonjs/components/buttons/IconButtonContained.js +4 -4
  21. package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -1
  22. package/lib/commonjs/components/buttons/IconButtonSolid.js +5 -5
  23. package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -1
  24. package/lib/commonjs/components/common/LogoPaymentWithFallback.js +49 -0
  25. package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -0
  26. package/lib/commonjs/components/index.js +22 -0
  27. package/lib/commonjs/components/index.js.map +1 -1
  28. package/lib/commonjs/components/layout/BlockButtons.js +82 -0
  29. package/lib/commonjs/components/layout/BlockButtons.js.map +1 -0
  30. package/lib/commonjs/components/layout/FooterWithButtons.js +41 -0
  31. package/lib/commonjs/components/layout/FooterWithButtons.js.map +1 -0
  32. package/lib/commonjs/components/layout/index.js +11 -0
  33. package/lib/commonjs/components/layout/index.js.map +1 -1
  34. package/lib/commonjs/components/listitems/ListItemAction.js +1 -1
  35. package/lib/commonjs/components/listitems/ListItemAction.js.map +1 -1
  36. package/lib/commonjs/components/listitems/ListItemCheckbox.js +1 -1
  37. package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
  38. package/lib/commonjs/components/listitems/ListItemIDP.js +1 -1
  39. package/lib/commonjs/components/listitems/ListItemIDP.js.map +1 -1
  40. package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
  41. package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
  42. package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
  43. package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
  44. package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
  45. package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
  46. package/lib/commonjs/components/listitems/ListItemRadio.js +1 -1
  47. package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
  48. package/lib/commonjs/components/listitems/ListItemTransaction.js +47 -29
  49. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  50. package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js +1 -1
  51. package/lib/commonjs/components/listitems/hooks/useListItemSpringAnimation.js.map +1 -1
  52. package/lib/commonjs/components/tabs/TabItem.js +1 -1
  53. package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
  54. package/lib/commonjs/components/tabs/TabNavigation.js +2 -2
  55. package/lib/commonjs/components/tabs/TabNavigation.js.map +1 -1
  56. package/lib/commonjs/components/{accordion/IOAccordion.js → textInput/TextInput.js} +5 -27
  57. package/lib/commonjs/components/textInput/TextInput.js.map +1 -0
  58. package/lib/commonjs/components/textInput/TextInputBase.js +233 -0
  59. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -0
  60. package/lib/commonjs/components/textInput/TextInputPassword.js +36 -0
  61. package/lib/commonjs/components/textInput/TextInputPassword.js.map +1 -0
  62. package/lib/commonjs/components/textInput/TextInputValidation.js +57 -0
  63. package/lib/commonjs/components/textInput/TextInputValidation.js.map +1 -0
  64. package/lib/commonjs/components/textInput/index.js +39 -0
  65. package/lib/commonjs/components/textInput/index.js.map +1 -0
  66. package/lib/commonjs/core/IOAnimations.js +5 -0
  67. package/lib/commonjs/core/IOAnimations.js.map +1 -1
  68. package/lib/commonjs/core/IOShapes.js +3 -1
  69. package/lib/commonjs/core/IOShapes.js.map +1 -1
  70. package/lib/commonjs/stories/ButtonDS.stories.js +34 -0
  71. package/lib/commonjs/stories/ButtonDS.stories.js.map +1 -0
  72. package/lib/commonjs/stories/H1.stories.js +33 -0
  73. package/lib/commonjs/stories/H1.stories.js.map +1 -0
  74. package/lib/commonjs/stories/H2.stories.js +33 -0
  75. package/lib/commonjs/stories/H2.stories.js.map +1 -0
  76. package/lib/commonjs/stories/H3.stories.js +33 -0
  77. package/lib/commonjs/stories/H3.stories.js.map +1 -0
  78. package/lib/commonjs/stories/H4.stories.js +33 -0
  79. package/lib/commonjs/stories/H4.stories.js.map +1 -0
  80. package/lib/commonjs/stories/H5.stories.js +33 -0
  81. package/lib/commonjs/stories/H5.stories.js.map +1 -0
  82. package/lib/commonjs/stories/H6.stories.js +33 -0
  83. package/lib/commonjs/stories/H6.stories.js.map +1 -0
  84. package/lib/commonjs/stories/Label.stories.js +33 -0
  85. package/lib/commonjs/stories/Label.stories.js.map +1 -0
  86. package/lib/commonjs/stories/LabelSmall.stories.js +33 -0
  87. package/lib/commonjs/stories/LabelSmall.stories.js.map +1 -0
  88. package/lib/commonjs/stories/Link.stories.js +33 -0
  89. package/lib/commonjs/stories/Link.stories.js.map +1 -0
  90. package/lib/commonjs/stories/Monospace.stories.js +33 -0
  91. package/lib/commonjs/stories/Monospace.stories.js.map +1 -0
  92. package/lib/commonjs/utils/accessibility.js +19 -0
  93. package/lib/commonjs/utils/accessibility.js.map +1 -0
  94. package/lib/commonjs/utils/fonts.js +13 -4
  95. package/lib/commonjs/utils/fonts.js.map +1 -1
  96. package/lib/commonjs/utils/object.js +16 -0
  97. package/lib/commonjs/utils/object.js.map +1 -0
  98. package/lib/commonjs/utils/textInput/index.js +24 -0
  99. package/lib/commonjs/utils/textInput/index.js.map +1 -0
  100. package/lib/commonjs/utils/url.js +14 -0
  101. package/lib/commonjs/utils/url.js.map +1 -0
  102. package/lib/module/components/accordion/AccordionItem.js +126 -0
  103. package/lib/module/components/accordion/AccordionItem.js.map +1 -0
  104. package/lib/module/components/accordion/index.js +1 -1
  105. package/lib/module/components/accordion/index.js.map +1 -1
  106. package/lib/module/components/alert/Alert.js +1 -1
  107. package/lib/module/components/alert/Alert.js.map +1 -1
  108. package/lib/module/components/banner/Banner.js +1 -1
  109. package/lib/module/components/banner/Banner.js.map +1 -1
  110. package/lib/module/components/buttons/ButtonExtendedOutline.js +1 -1
  111. package/lib/module/components/buttons/ButtonExtendedOutline.js.map +1 -1
  112. package/lib/module/components/buttons/ButtonLink.js +6 -6
  113. package/lib/module/components/buttons/ButtonLink.js.map +1 -1
  114. package/lib/module/components/buttons/ButtonOutline.js +10 -10
  115. package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
  116. package/lib/module/components/buttons/ButtonSolid.js +5 -5
  117. package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
  118. package/lib/module/components/buttons/IconButton.js +4 -4
  119. package/lib/module/components/buttons/IconButton.js.map +1 -1
  120. package/lib/module/components/buttons/IconButtonContained.js +4 -4
  121. package/lib/module/components/buttons/IconButtonContained.js.map +1 -1
  122. package/lib/module/components/buttons/IconButtonSolid.js +5 -5
  123. package/lib/module/components/buttons/IconButtonSolid.js.map +1 -1
  124. package/lib/module/components/common/LogoPaymentWithFallback.js +40 -0
  125. package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -0
  126. package/lib/module/components/index.js +2 -0
  127. package/lib/module/components/index.js.map +1 -1
  128. package/lib/module/components/layout/BlockButtons.js +73 -0
  129. package/lib/module/components/layout/BlockButtons.js.map +1 -0
  130. package/lib/module/components/layout/FooterWithButtons.js +32 -0
  131. package/lib/module/components/layout/FooterWithButtons.js.map +1 -0
  132. package/lib/module/components/layout/index.js +1 -0
  133. package/lib/module/components/layout/index.js.map +1 -1
  134. package/lib/module/components/listitems/ListItemAction.js +1 -1
  135. package/lib/module/components/listitems/ListItemAction.js.map +1 -1
  136. package/lib/module/components/listitems/ListItemCheckbox.js +1 -1
  137. package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
  138. package/lib/module/components/listitems/ListItemIDP.js +1 -1
  139. package/lib/module/components/listitems/ListItemIDP.js.map +1 -1
  140. package/lib/module/components/listitems/ListItemInfoCopy.js +1 -1
  141. package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
  142. package/lib/module/components/listitems/ListItemNav.js +1 -1
  143. package/lib/module/components/listitems/ListItemNav.js.map +1 -1
  144. package/lib/module/components/listitems/ListItemNavAlert.js +1 -1
  145. package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
  146. package/lib/module/components/listitems/ListItemRadio.js +1 -1
  147. package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
  148. package/lib/module/components/listitems/ListItemTransaction.js +48 -30
  149. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  150. package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js +1 -1
  151. package/lib/module/components/listitems/hooks/useListItemSpringAnimation.js.map +1 -1
  152. package/lib/module/components/tabs/TabItem.js +1 -1
  153. package/lib/module/components/tabs/TabItem.js.map +1 -1
  154. package/lib/module/components/tabs/TabNavigation.js +2 -2
  155. package/lib/module/components/tabs/TabNavigation.js.map +1 -1
  156. package/lib/module/components/textInput/TextInput.js +4 -0
  157. package/lib/module/components/textInput/TextInput.js.map +1 -0
  158. package/lib/module/components/textInput/TextInputBase.js +225 -0
  159. package/lib/module/components/textInput/TextInputBase.js.map +1 -0
  160. package/lib/module/components/textInput/TextInputPassword.js +27 -0
  161. package/lib/module/components/textInput/TextInputPassword.js.map +1 -0
  162. package/lib/module/components/textInput/TextInputValidation.js +47 -0
  163. package/lib/module/components/textInput/TextInputValidation.js.map +1 -0
  164. package/lib/module/components/textInput/index.js +4 -0
  165. package/lib/module/components/textInput/index.js.map +1 -0
  166. package/lib/module/core/IOAnimations.js +5 -0
  167. package/lib/module/core/IOAnimations.js.map +1 -1
  168. package/lib/module/core/IOShapes.js +1 -0
  169. package/lib/module/core/IOShapes.js.map +1 -1
  170. package/lib/module/stories/ButtonDS.stories.js +27 -0
  171. package/lib/module/stories/ButtonDS.stories.js.map +1 -0
  172. package/lib/module/stories/H1.stories.js +26 -0
  173. package/lib/module/stories/H1.stories.js.map +1 -0
  174. package/lib/module/stories/H2.stories.js +26 -0
  175. package/lib/module/stories/H2.stories.js.map +1 -0
  176. package/lib/module/stories/H3.stories.js +26 -0
  177. package/lib/module/stories/H3.stories.js.map +1 -0
  178. package/lib/module/stories/H4.stories.js +26 -0
  179. package/lib/module/stories/H4.stories.js.map +1 -0
  180. package/lib/module/stories/H5.stories.js +26 -0
  181. package/lib/module/stories/H5.stories.js.map +1 -0
  182. package/lib/module/stories/H6.stories.js +26 -0
  183. package/lib/module/stories/H6.stories.js.map +1 -0
  184. package/lib/module/stories/Label.stories.js +26 -0
  185. package/lib/module/stories/Label.stories.js.map +1 -0
  186. package/lib/module/stories/LabelSmall.stories.js +26 -0
  187. package/lib/module/stories/LabelSmall.stories.js.map +1 -0
  188. package/lib/module/stories/Link.stories.js +26 -0
  189. package/lib/module/stories/Link.stories.js.map +1 -0
  190. package/lib/module/stories/Monospace.stories.js +26 -0
  191. package/lib/module/stories/Monospace.stories.js.map +1 -0
  192. package/lib/module/utils/accessibility.js +10 -0
  193. package/lib/module/utils/accessibility.js.map +1 -0
  194. package/lib/module/utils/fonts.js +13 -4
  195. package/lib/module/utils/fonts.js.map +1 -1
  196. package/lib/module/utils/object.js +7 -0
  197. package/lib/module/utils/object.js.map +1 -0
  198. package/lib/module/utils/textInput/index.js +17 -0
  199. package/lib/module/utils/textInput/index.js.map +1 -0
  200. package/lib/module/utils/url.js +7 -0
  201. package/lib/module/utils/url.js.map +1 -0
  202. package/lib/typescript/components/accordion/AccordionItem.d.ts +14 -0
  203. package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -0
  204. package/lib/typescript/components/accordion/index.d.ts +1 -1
  205. package/lib/typescript/components/accordion/index.d.ts.map +1 -1
  206. package/lib/typescript/components/buttons/ButtonSolid.d.ts +16 -0
  207. package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
  208. package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts +27 -0
  209. package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -0
  210. package/lib/typescript/components/index.d.ts +2 -0
  211. package/lib/typescript/components/index.d.ts.map +1 -1
  212. package/lib/typescript/components/layout/BlockButtons.d.ts +53 -0
  213. package/lib/typescript/components/layout/BlockButtons.d.ts.map +1 -0
  214. package/lib/typescript/components/layout/FooterWithButtons.d.ts +9 -0
  215. package/lib/typescript/components/layout/FooterWithButtons.d.ts.map +1 -0
  216. package/lib/typescript/components/layout/index.d.ts +1 -0
  217. package/lib/typescript/components/layout/index.d.ts.map +1 -1
  218. package/lib/typescript/components/listitems/ListItemTransaction.d.ts +13 -5
  219. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  220. package/lib/typescript/components/textInput/TextInput.d.ts +6 -0
  221. package/lib/typescript/components/textInput/TextInput.d.ts.map +1 -0
  222. package/lib/typescript/components/textInput/TextInputBase.d.ts +28 -0
  223. package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -0
  224. package/lib/typescript/components/textInput/TextInputPassword.d.ts +6 -0
  225. package/lib/typescript/components/textInput/TextInputPassword.d.ts.map +1 -0
  226. package/lib/typescript/components/textInput/TextInputValidation.d.ts +9 -0
  227. package/lib/typescript/components/textInput/TextInputValidation.d.ts.map +1 -0
  228. package/lib/typescript/components/textInput/index.d.ts +4 -0
  229. package/lib/typescript/components/textInput/index.d.ts.map +1 -0
  230. package/lib/typescript/core/IOAnimations.d.ts +5 -0
  231. package/lib/typescript/core/IOAnimations.d.ts.map +1 -1
  232. package/lib/typescript/core/IOShapes.d.ts +1 -0
  233. package/lib/typescript/core/IOShapes.d.ts.map +1 -1
  234. package/lib/typescript/stories/ButtonDS.stories.d.ts +14 -0
  235. package/lib/typescript/stories/ButtonDS.stories.d.ts.map +1 -0
  236. package/lib/typescript/stories/H1.stories.d.ts +19 -0
  237. package/lib/typescript/stories/H1.stories.d.ts.map +1 -0
  238. package/lib/typescript/stories/H2.stories.d.ts +19 -0
  239. package/lib/typescript/stories/H2.stories.d.ts.map +1 -0
  240. package/lib/typescript/stories/H3.stories.d.ts +19 -0
  241. package/lib/typescript/stories/H3.stories.d.ts.map +1 -0
  242. package/lib/typescript/stories/H4.stories.d.ts +19 -0
  243. package/lib/typescript/stories/H4.stories.d.ts.map +1 -0
  244. package/lib/typescript/stories/H5.stories.d.ts +27 -0
  245. package/lib/typescript/stories/H5.stories.d.ts.map +1 -0
  246. package/lib/typescript/stories/H6.stories.d.ts +19 -0
  247. package/lib/typescript/stories/H6.stories.d.ts.map +1 -0
  248. package/lib/typescript/stories/Label.stories.d.ts +19 -0
  249. package/lib/typescript/stories/Label.stories.d.ts.map +1 -0
  250. package/lib/typescript/stories/LabelSmall.stories.d.ts +21 -0
  251. package/lib/typescript/stories/LabelSmall.stories.d.ts.map +1 -0
  252. package/lib/typescript/stories/Link.stories.d.ts +21 -0
  253. package/lib/typescript/stories/Link.stories.d.ts.map +1 -0
  254. package/lib/typescript/stories/Monospace.stories.d.ts +19 -0
  255. package/lib/typescript/stories/Monospace.stories.d.ts.map +1 -0
  256. package/lib/typescript/utils/accessibility.d.ts +6 -0
  257. package/lib/typescript/utils/accessibility.d.ts.map +1 -0
  258. package/lib/typescript/utils/fonts.d.ts.map +1 -1
  259. package/lib/typescript/utils/object.d.ts +5 -0
  260. package/lib/typescript/utils/object.d.ts.map +1 -0
  261. package/lib/typescript/utils/textInput/index.d.ts +9 -0
  262. package/lib/typescript/utils/textInput/index.d.ts.map +1 -0
  263. package/lib/typescript/utils/types.d.ts +1 -0
  264. package/lib/typescript/utils/types.d.ts.map +1 -1
  265. package/lib/typescript/utils/url.d.ts +8 -0
  266. package/lib/typescript/utils/url.d.ts.map +1 -0
  267. package/package.json +25 -4
  268. package/src/components/accordion/AccordionItem.tsx +165 -0
  269. package/src/components/accordion/index.tsx +1 -1
  270. package/src/components/buttons/ButtonSolid.tsx +16 -0
  271. package/src/components/common/LogoPaymentWithFallback.tsx +60 -0
  272. package/src/components/index.tsx +2 -0
  273. package/src/components/layout/BlockButtons.tsx +142 -0
  274. package/src/components/layout/FooterWithButtons.tsx +37 -0
  275. package/src/components/layout/index.tsx +1 -0
  276. package/src/components/listitems/ListItemTransaction.tsx +86 -39
  277. package/src/components/textInput/TextInput.tsx +15 -0
  278. package/src/components/textInput/TextInputBase.tsx +327 -0
  279. package/src/components/textInput/TextInputPassword.tsx +36 -0
  280. package/src/components/textInput/TextInputValidation.tsx +71 -0
  281. package/src/components/textInput/index.tsx +3 -0
  282. package/src/core/IOAnimations.ts +5 -0
  283. package/src/core/IOShapes.ts +1 -0
  284. package/src/stories/ButtonDS.stories.ts +31 -0
  285. package/src/stories/H1.stories.ts +28 -0
  286. package/src/stories/H2.stories.ts +28 -0
  287. package/src/stories/H3.stories.ts +28 -0
  288. package/src/stories/H4.stories.ts +28 -0
  289. package/src/stories/H5.stories.ts +28 -0
  290. package/src/stories/H6.stories.ts +28 -0
  291. package/src/stories/Label.stories.ts +28 -0
  292. package/src/stories/LabelSmall.stories.ts +28 -0
  293. package/src/stories/Link.stories.ts +28 -0
  294. package/src/stories/Monospace.stories.ts +28 -0
  295. package/src/utils/accessibility.ts +17 -0
  296. package/src/utils/fonts.ts +12 -5
  297. package/src/utils/object.ts +12 -0
  298. package/src/utils/textInput/index.ts +29 -0
  299. package/src/utils/types.ts +2 -0
  300. package/src/utils/url.ts +9 -0
  301. package/lib/commonjs/components/accordion/IOAccordion.js.map +0 -1
  302. package/lib/module/components/accordion/IOAccordion.js +0 -26
  303. package/lib/module/components/accordion/IOAccordion.js.map +0 -1
  304. package/lib/typescript/components/accordion/IOAccordion.d.ts +0 -13
  305. package/lib/typescript/components/accordion/IOAccordion.d.ts.map +0 -1
  306. package/src/components/accordion/IOAccordion.tsx +0 -35
@@ -0,0 +1,31 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { action } from "@storybook/addon-actions";
3
+
4
+ import { ButtonSolid } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/ButtonSolid",
9
+ component: ButtonSolid,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered"
13
+ },
14
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
15
+ tags: ["autodocs"]
16
+ } satisfies Meta<typeof ButtonSolid>;
17
+
18
+ export default meta;
19
+ type Story = StoryObj<typeof meta>;
20
+
21
+ // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
22
+ export const Primary: Story = {
23
+ args: {
24
+ color: "primary",
25
+ accessibilityLabel: "Tap to trigger test alert",
26
+ label: "Primary button",
27
+ onPress: e => {
28
+ action("clicked")(e);
29
+ }
30
+ }
31
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { H1 } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/H1",
9
+ component: H1,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof H1>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { H2 } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/H2",
9
+ component: H2,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof H2>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { H3 } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/H3",
9
+ component: H3,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof H3>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { H4 } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/H4",
9
+ component: H4,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof H4>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { H5 } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/H5",
9
+ component: H5,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof H5>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { H6 } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/H6",
9
+ component: H6,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof H6>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { Label } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/Label",
9
+ component: Label,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof Label>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { LabelSmall } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/LabelSmall",
9
+ component: LabelSmall,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof LabelSmall>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { Link } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/Link",
9
+ component: Link,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof Link>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+
3
+ import { Alert } from "react-native";
4
+ import { Monospace } from "../components";
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7
+ const meta = {
8
+ title: "Example/Monospace",
9
+ component: Monospace,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
12
+ layout: "centered",
13
+ actions: { argTypesRegex: "^on.*" }
14
+ },
15
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof Monospace>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ export const Primary: Story = {
23
+ args: {
24
+ accessibilityLabel: "Tap to trigger test alert",
25
+ onPress: () => Alert.alert("Alert", "Action triggered"),
26
+ children: "Hello World"
27
+ }
28
+ };
@@ -0,0 +1,17 @@
1
+ import { pipe } from "fp-ts/lib/function";
2
+ import * as O from "fp-ts/lib/Option";
3
+ import I18n from "i18n-js";
4
+
5
+ /**
6
+ * This function is used to get the text that will be read by the screen reader
7
+ * with the correct minus symbol pronunciation.
8
+ */
9
+ export const getAccessibleAmountText = (amount?: string) =>
10
+ pipe(
11
+ amount,
12
+ O.fromNullable,
13
+ O.map(amount =>
14
+ amount.replace("-", I18n.t("global.accessibility.minusSymbol"))
15
+ ),
16
+ O.getOrElseW(() => undefined)
17
+ );
@@ -20,14 +20,17 @@ export type FontWeightValue = (typeof weightValues)[number];
20
20
  const fonts = {
21
21
  TitilliumWeb: Platform.select({
22
22
  android: "TitilliumWeb",
23
+ web: "TitilliumWeb",
23
24
  ios: "Titillium Web"
24
25
  }),
25
26
  ReadexPro: Platform.select({
26
27
  android: "ReadexPro",
28
+ web: "ReadexPro",
27
29
  ios: "Readex Pro"
28
30
  }),
29
31
  RobotoMono: Platform.select({
30
32
  android: "RobotoMono",
33
+ web: "RobotoMono",
31
34
  ios: "Roboto Mono"
32
35
  })
33
36
  };
@@ -80,9 +83,10 @@ export const makeFontFamilyName = (
80
83
  isItalic: boolean = false
81
84
  ): string =>
82
85
  Platform.select({
83
- default: "undefined",
86
+ web: fonts[font],
84
87
  android: `${fonts[font]}-${weight || "Regular"}${isItalic ? "Italic" : ""}`,
85
- ios: fonts[font]
88
+ ios: fonts[font],
89
+ default: "undefined"
86
90
  });
87
91
 
88
92
  /**
@@ -97,8 +101,10 @@ export const makeFontStyleObject = (
97
101
  font: FontFamily | undefined = "TitilliumWeb"
98
102
  ): FontStyleObject =>
99
103
  Platform.select({
100
- default: {
101
- fontFamily: "undefined"
104
+ web: {
105
+ fontFamily: makeFontFamilyName(font, weight, isItalic),
106
+ fontWeight: weight !== undefined ? fontWeightsMap[weight] : weight,
107
+ fontStyle: isItalic ? FontStyle.italic : FontStyle.normal
102
108
  },
103
109
  android: {
104
110
  fontFamily: makeFontFamilyName(font, weight, isItalic)
@@ -107,5 +113,6 @@ export const makeFontStyleObject = (
107
113
  fontFamily: makeFontFamilyName(font, weight, isItalic),
108
114
  fontWeight: weight !== undefined ? fontWeightsMap[weight] : weight,
109
115
  fontStyle: isItalic ? FontStyle.italic : FontStyle.normal
110
- }
116
+ },
117
+ default: { fontFamily: "undefined" }
111
118
  });
@@ -0,0 +1,12 @@
1
+ import * as A from "fp-ts/Array";
2
+ import * as O from "fp-ts/Option";
3
+ import { pipe } from "fp-ts/lib/function";
4
+
5
+ export const findFirstCaseInsensitive =
6
+ <T>(obj: { [key: string]: T }) =>
7
+ (key: string): O.Option<[string, T]> =>
8
+ pipe(
9
+ obj,
10
+ Object.entries,
11
+ A.findFirst(([k, _]) => k.toLowerCase() === key.toLowerCase())
12
+ );
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ import { TextInputBase } from "../../components/textInput/TextInputBase";
3
+ import { InputType } from "../types";
4
+
5
+ type InputProps = Pick<
6
+ React.ComponentProps<typeof TextInputBase>,
7
+ "textInputProps"
8
+ > & {
9
+ valueFormat?: (value: string) => string;
10
+ };
11
+
12
+ export const getInputPropsByType = (
13
+ type: InputType
14
+ ): InputProps | undefined => {
15
+ switch (type) {
16
+ case "credit-card":
17
+ return {
18
+ valueFormat: v => v.replace(/\D/g, "").replace(/\d{4}?(?=.)/g, "$& "),
19
+ textInputProps: {
20
+ autoComplete: "cc-number",
21
+ keyboardType: "numeric",
22
+ textContentType: "creditCardNumber",
23
+ inputMode: "numeric"
24
+ }
25
+ };
26
+ default:
27
+ return undefined;
28
+ }
29
+ };
@@ -28,3 +28,5 @@ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
28
28
  export type XOR<T, U> = T | U extends object
29
29
  ? (Without<T, U> & U) | (Without<U, T> & T)
30
30
  : T | U;
31
+
32
+ export type InputType = "credit-card" | "default";
@@ -0,0 +1,9 @@
1
+ import { ImageURISource } from "react-native";
2
+
3
+ /**
4
+ * type guard to check if a value is an ImageURISource
5
+ * @argument value the value to check, can be anything
6
+ * @returns boolean
7
+ */
8
+ export const isImageUri = (value: unknown): value is ImageURISource =>
9
+ typeof value === "object" && value !== null && "uri" in value;
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_H","_IOStyles","_RawAccordion","_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","header","marginVertical","IOVisualCostants","appMarginDefault","IOAccordion","props","createElement","RawAccordion","animated","headerStyle","accessibilityLabel","title","H3","numberOfLines","style","IOStyles","flex","children","exports"],"sourceRoot":"../../../../src","sources":["components/accordion/IOAccordion.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA8C,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAM9C,MAAMW,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,MAAM,EAAE;IACNC,cAAc,EAAEC,0BAAgB,CAACC;EACnC;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAIC,KAAY,iBACtCrC,KAAA,CAAAsC,aAAA,CAAChC,aAAA,CAAAiC,YAAY;EACXC,QAAQ,EAAEH,KAAK,CAACG,QAAS;EACzBC,WAAW,EAAEZ,MAAM,CAACG,MAAO;EAC3BU,kBAAkB,EAAEL,KAAK,CAACM,KAAM;EAChCX,MAAM,eACJhC,KAAA,CAAAsC,aAAA,CAAClC,EAAA,CAAAwC,EAAE;IAACC,aAAa,EAAE,CAAE;IAACC,KAAK,EAAEC,kBAAQ,CAACC;EAAK,GACxCX,KAAK,CAACM,KACL;AACL,GAEAN,KAAK,CAACY,QACK,CACf;AAACC,OAAA,CAAAd,WAAA,GAAAA,WAAA"}
@@ -1,26 +0,0 @@
1
- import * as React from "react";
2
- import { StyleSheet } from "react-native";
3
- import { H3 } from "../typography/H3";
4
- import { IOStyles, IOVisualCostants } from "../../core/IOStyles";
5
- import { RawAccordion } from "./RawAccordion";
6
- const styles = StyleSheet.create({
7
- header: {
8
- marginVertical: IOVisualCostants.appMarginDefault
9
- }
10
- });
11
-
12
- /**
13
- * A simplified accordion that accepts a title and one child and uses {@link RawAccordion}
14
- * @param props
15
- * @constructor
16
- */
17
- export const IOAccordion = props => /*#__PURE__*/React.createElement(RawAccordion, {
18
- animated: props.animated,
19
- headerStyle: styles.header,
20
- accessibilityLabel: props.title,
21
- header: /*#__PURE__*/React.createElement(H3, {
22
- numberOfLines: 1,
23
- style: IOStyles.flex
24
- }, props.title)
25
- }, props.children);
26
- //# sourceMappingURL=IOAccordion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","StyleSheet","H3","IOStyles","IOVisualCostants","RawAccordion","styles","create","header","marginVertical","appMarginDefault","IOAccordion","props","createElement","animated","headerStyle","accessibilityLabel","title","numberOfLines","style","flex","children"],"sourceRoot":"../../../../src","sources":["components/accordion/IOAccordion.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,EAAE,QAAQ,kBAAkB;AACrC,SAASC,QAAQ,EAAEC,gBAAgB,QAAQ,qBAAqB;AAChE,SAASC,YAAY,QAAQ,gBAAgB;AAM7C,MAAMC,MAAM,GAAGL,UAAU,CAACM,MAAM,CAAC;EAC/BC,MAAM,EAAE;IACNC,cAAc,EAAEL,gBAAgB,CAACM;EACnC;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAIC,KAAY,iBACtCZ,KAAA,CAAAa,aAAA,CAACR,YAAY;EACXS,QAAQ,EAAEF,KAAK,CAACE,QAAS;EACzBC,WAAW,EAAET,MAAM,CAACE,MAAO;EAC3BQ,kBAAkB,EAAEJ,KAAK,CAACK,KAAM;EAChCT,MAAM,eACJR,KAAA,CAAAa,aAAA,CAACX,EAAE;IAACgB,aAAa,EAAE,CAAE;IAACC,KAAK,EAAEhB,QAAQ,CAACiB;EAAK,GACxCR,KAAK,CAACK,KACL;AACL,GAEAL,KAAK,CAACS,QACK,CACf"}
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import { RawAccordion } from "./RawAccordion";
3
- type Props = Omit<React.ComponentProps<typeof RawAccordion>, "header"> & {
4
- title: string;
5
- };
6
- /**
7
- * A simplified accordion that accepts a title and one child and uses {@link RawAccordion}
8
- * @param props
9
- * @constructor
10
- */
11
- export declare const IOAccordion: (props: Props) => React.ReactElement;
12
- export {};
13
- //# sourceMappingURL=IOAccordion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IOAccordion.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/IOAccordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,KAAK,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG;IACvE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAQF;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,KAAK,KAAG,MAAM,YAahD,CAAC"}
@@ -1,35 +0,0 @@
1
- import * as React from "react";
2
- import { StyleSheet } from "react-native";
3
- import { H3 } from "../typography/H3";
4
- import { IOStyles, IOVisualCostants } from "../../core/IOStyles";
5
- import { RawAccordion } from "./RawAccordion";
6
-
7
- type Props = Omit<React.ComponentProps<typeof RawAccordion>, "header"> & {
8
- title: string;
9
- };
10
-
11
- const styles = StyleSheet.create({
12
- header: {
13
- marginVertical: IOVisualCostants.appMarginDefault
14
- }
15
- });
16
-
17
- /**
18
- * A simplified accordion that accepts a title and one child and uses {@link RawAccordion}
19
- * @param props
20
- * @constructor
21
- */
22
- export const IOAccordion = (props: Props): React.ReactElement => (
23
- <RawAccordion
24
- animated={props.animated}
25
- headerStyle={styles.header}
26
- accessibilityLabel={props.title}
27
- header={
28
- <H3 numberOfLines={1} style={IOStyles.flex}>
29
- {props.title}
30
- </H3>
31
- }
32
- >
33
- {props.children}
34
- </RawAccordion>
35
- );