zero-to-app 2.0.0 → 3.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 (442) hide show
  1. package/dist/brand/brand-config.d.ts +65 -0
  2. package/dist/brand/brand-config.d.ts.map +1 -0
  3. package/dist/brand/brand-config.js +68 -0
  4. package/dist/brand/brand-config.js.map +1 -0
  5. package/dist/brand/brand-context.d.ts +55 -0
  6. package/dist/brand/brand-context.d.ts.map +1 -0
  7. package/dist/brand/brand-context.js +76 -0
  8. package/dist/brand/brand-context.js.map +1 -0
  9. package/dist/brand/brand-types.d.ts +92 -0
  10. package/dist/brand/brand-types.d.ts.map +1 -0
  11. package/dist/brand/brand-types.js +2 -0
  12. package/dist/brand/brand-types.js.map +1 -0
  13. package/dist/brand/default-brand.d.ts +11 -0
  14. package/dist/brand/default-brand.d.ts.map +1 -0
  15. package/dist/brand/default-brand.js +32 -0
  16. package/dist/brand/default-brand.js.map +1 -0
  17. package/dist/brand/index.d.ts +5 -3
  18. package/dist/brand/index.d.ts.map +1 -1
  19. package/dist/brand/index.js +6 -3
  20. package/dist/brand/index.js.map +1 -1
  21. package/dist/brand/palette-generator.d.ts +64 -0
  22. package/dist/brand/palette-generator.d.ts.map +1 -0
  23. package/dist/brand/palette-generator.js +283 -0
  24. package/dist/brand/palette-generator.js.map +1 -0
  25. package/dist/components/index.d.ts +0 -8
  26. package/dist/components/index.d.ts.map +1 -1
  27. package/dist/components/index.js +0 -9
  28. package/dist/components/index.js.map +1 -1
  29. package/dist/components/navigation/app-tabs/app-tabs.d.ts +63 -0
  30. package/dist/components/navigation/app-tabs/app-tabs.d.ts.map +1 -0
  31. package/dist/components/navigation/app-tabs/app-tabs.js +13 -0
  32. package/dist/components/navigation/app-tabs/app-tabs.js.map +1 -0
  33. package/dist/components/navigation/app-tabs/app-tabs.web.d.ts +47 -0
  34. package/dist/components/navigation/app-tabs/app-tabs.web.d.ts.map +1 -0
  35. package/dist/components/navigation/app-tabs/app-tabs.web.js +104 -0
  36. package/dist/components/navigation/app-tabs/app-tabs.web.js.map +1 -0
  37. package/dist/components/navigation/app-tabs/index.d.ts +3 -0
  38. package/dist/components/navigation/app-tabs/index.d.ts.map +1 -0
  39. package/dist/components/navigation/app-tabs/index.js +3 -0
  40. package/dist/components/navigation/app-tabs/index.js.map +1 -0
  41. package/dist/components/navigation/drawer/drawer.d.ts +24 -0
  42. package/dist/components/navigation/drawer/drawer.d.ts.map +1 -0
  43. package/dist/components/navigation/drawer/drawer.js +82 -0
  44. package/dist/components/navigation/drawer/drawer.js.map +1 -0
  45. package/dist/components/navigation/index.d.ts +9 -5
  46. package/dist/components/navigation/index.d.ts.map +1 -1
  47. package/dist/components/navigation/index.js +9 -5
  48. package/dist/components/navigation/index.js.map +1 -1
  49. package/dist/components/navigation/native-header.d.ts +25 -0
  50. package/dist/components/navigation/native-header.d.ts.map +1 -0
  51. package/dist/components/navigation/native-header.js +32 -0
  52. package/dist/components/navigation/native-header.js.map +1 -0
  53. package/dist/components/navigation/shared/sidebar-styles.d.ts +34 -0
  54. package/dist/components/navigation/shared/sidebar-styles.d.ts.map +1 -0
  55. package/dist/components/navigation/shared/sidebar-styles.js +34 -0
  56. package/dist/components/navigation/shared/sidebar-styles.js.map +1 -0
  57. package/dist/components/navigation/sidebar/index.d.ts +10 -0
  58. package/dist/components/navigation/sidebar/index.d.ts.map +1 -0
  59. package/dist/components/navigation/sidebar/index.js +7 -0
  60. package/dist/components/navigation/sidebar/index.js.map +1 -0
  61. package/dist/components/navigation/sidebar/sidebar-footer.d.ts +18 -0
  62. package/dist/components/navigation/sidebar/sidebar-footer.d.ts.map +1 -0
  63. package/dist/components/navigation/sidebar/sidebar-footer.js +27 -0
  64. package/dist/components/navigation/sidebar/sidebar-footer.js.map +1 -0
  65. package/dist/components/navigation/sidebar/sidebar-header.d.ts +26 -0
  66. package/dist/components/navigation/sidebar/sidebar-header.d.ts.map +1 -0
  67. package/dist/components/navigation/sidebar/sidebar-header.js +38 -0
  68. package/dist/components/navigation/sidebar/sidebar-header.js.map +1 -0
  69. package/dist/components/navigation/sidebar/sidebar-item.d.ts +36 -0
  70. package/dist/components/navigation/sidebar/sidebar-item.d.ts.map +1 -0
  71. package/dist/components/navigation/sidebar/sidebar-item.js +63 -0
  72. package/dist/components/navigation/sidebar/sidebar-item.js.map +1 -0
  73. package/dist/components/navigation/sidebar/sidebar-section.d.ts +34 -0
  74. package/dist/components/navigation/sidebar/sidebar-section.d.ts.map +1 -0
  75. package/dist/components/navigation/sidebar/sidebar-section.js +56 -0
  76. package/dist/components/navigation/sidebar/sidebar-section.js.map +1 -0
  77. package/dist/components/navigation/sidebar/sidebar.d.ts +2 -0
  78. package/dist/components/navigation/sidebar/sidebar.d.ts.map +1 -0
  79. package/dist/components/navigation/sidebar/sidebar.js +4 -0
  80. package/dist/components/navigation/sidebar/sidebar.js.map +1 -0
  81. package/dist/components/navigation/sidebar/sidebar.native.d.ts +23 -0
  82. package/dist/components/navigation/sidebar/sidebar.native.d.ts.map +1 -0
  83. package/dist/components/navigation/sidebar/sidebar.native.js +80 -0
  84. package/dist/components/navigation/sidebar/sidebar.native.js.map +1 -0
  85. package/dist/components/navigation/sidebar/sidebar.web.d.ts +26 -0
  86. package/dist/components/navigation/sidebar/sidebar.web.d.ts.map +1 -0
  87. package/dist/components/navigation/sidebar/sidebar.web.js +90 -0
  88. package/dist/components/navigation/sidebar/sidebar.web.js.map +1 -0
  89. package/dist/components/navigation/themed-stack.d.ts +25 -0
  90. package/dist/components/navigation/themed-stack.d.ts.map +1 -0
  91. package/dist/components/navigation/themed-stack.js +37 -0
  92. package/dist/components/navigation/themed-stack.js.map +1 -0
  93. package/dist/components/shared/index.d.ts +2 -0
  94. package/dist/components/shared/index.d.ts.map +1 -0
  95. package/dist/components/shared/index.js +2 -0
  96. package/dist/components/shared/index.js.map +1 -0
  97. package/dist/components/shared/types.d.ts +82 -0
  98. package/dist/components/shared/types.d.ts.map +1 -0
  99. package/dist/components/{chat → shared}/types.js.map +1 -1
  100. package/dist/components/ui/button.d.ts +132 -0
  101. package/dist/components/ui/button.d.ts.map +1 -0
  102. package/dist/components/ui/button.js +253 -0
  103. package/dist/components/ui/button.js.map +1 -0
  104. package/dist/components/ui/collapsible.d.ts +88 -0
  105. package/dist/components/ui/collapsible.d.ts.map +1 -0
  106. package/dist/components/ui/collapsible.js +66 -0
  107. package/dist/components/ui/collapsible.js.map +1 -0
  108. package/dist/components/ui/container.d.ts +31 -0
  109. package/dist/components/ui/container.d.ts.map +1 -0
  110. package/dist/components/ui/container.js +46 -0
  111. package/dist/components/ui/container.js.map +1 -0
  112. package/dist/components/ui/fab.d.ts +51 -0
  113. package/dist/components/ui/fab.d.ts.map +1 -0
  114. package/dist/components/ui/fab.js +138 -0
  115. package/dist/components/ui/fab.js.map +1 -0
  116. package/dist/components/ui/index.d.ts +17 -12
  117. package/dist/components/ui/index.d.ts.map +1 -1
  118. package/dist/components/ui/index.js +15 -12
  119. package/dist/components/ui/index.js.map +1 -1
  120. package/dist/components/ui/screen.d.ts +40 -0
  121. package/dist/components/ui/screen.d.ts.map +1 -0
  122. package/dist/components/ui/screen.js +57 -0
  123. package/dist/components/ui/screen.js.map +1 -0
  124. package/dist/components/ui/themed-image.d.ts +7 -0
  125. package/dist/components/ui/themed-image.d.ts.map +1 -0
  126. package/dist/components/ui/themed-image.js +9 -0
  127. package/dist/components/ui/themed-image.js.map +1 -0
  128. package/dist/components/ui/themed-view.d.ts +20 -0
  129. package/dist/components/ui/themed-view.d.ts.map +1 -0
  130. package/dist/components/ui/themed-view.js +75 -0
  131. package/dist/components/ui/themed-view.js.map +1 -0
  132. package/dist/components/ui/typography.d.ts +110 -0
  133. package/dist/components/ui/typography.d.ts.map +1 -0
  134. package/dist/components/ui/typography.js +69 -0
  135. package/dist/components/ui/typography.js.map +1 -0
  136. package/dist/context/layout-context.d.ts +66 -0
  137. package/dist/context/layout-context.d.ts.map +1 -0
  138. package/dist/context/layout-context.js +83 -0
  139. package/dist/context/layout-context.js.map +1 -0
  140. package/dist/context/{scrollContext.d.ts → scroll-context.d.ts} +1 -1
  141. package/dist/context/scroll-context.d.ts.map +1 -0
  142. package/dist/context/{scrollContext.js → scroll-context.js} +1 -1
  143. package/dist/context/scroll-context.js.map +1 -0
  144. package/dist/context/sidebar-context.d.ts +74 -0
  145. package/dist/context/sidebar-context.d.ts.map +1 -0
  146. package/dist/context/sidebar-context.js +95 -0
  147. package/dist/context/sidebar-context.js.map +1 -0
  148. package/dist/hooks/index.d.ts +3 -3
  149. package/dist/hooks/index.d.ts.map +1 -1
  150. package/dist/hooks/index.js +3 -3
  151. package/dist/hooks/index.js.map +1 -1
  152. package/dist/hooks/use-breakpoint.d.ts +8 -0
  153. package/dist/hooks/use-breakpoint.d.ts.map +1 -0
  154. package/dist/hooks/use-breakpoint.js +10 -0
  155. package/dist/hooks/use-breakpoint.js.map +1 -0
  156. package/dist/hooks/{useDimensions.d.ts → use-dimensions.d.ts} +1 -1
  157. package/dist/hooks/use-dimensions.d.ts.map +1 -0
  158. package/dist/hooks/{useDimensions.js → use-dimensions.js} +1 -1
  159. package/dist/hooks/use-dimensions.js.map +1 -0
  160. package/dist/hooks/use-route-navigation.d.ts +19 -0
  161. package/dist/hooks/use-route-navigation.d.ts.map +1 -0
  162. package/dist/hooks/use-route-navigation.js +25 -0
  163. package/dist/hooks/use-route-navigation.js.map +1 -0
  164. package/dist/{components/navigation/iconUtils.d.ts → icons/icon-utils.d.ts} +2 -2
  165. package/dist/icons/icon-utils.d.ts.map +1 -0
  166. package/dist/{components/navigation/iconUtils.js → icons/icon-utils.js} +8 -4
  167. package/dist/icons/icon-utils.js.map +1 -0
  168. package/dist/icons/index.d.ts +13 -0
  169. package/dist/icons/index.d.ts.map +1 -0
  170. package/dist/icons/index.js +12 -0
  171. package/dist/icons/index.js.map +1 -0
  172. package/dist/index.d.ts +4 -1
  173. package/dist/index.d.ts.map +1 -1
  174. package/dist/index.js +4 -1
  175. package/dist/index.js.map +1 -1
  176. package/dist/theme/high-contrast-theme.d.ts +19 -0
  177. package/dist/theme/high-contrast-theme.d.ts.map +1 -0
  178. package/dist/theme/high-contrast-theme.js +225 -0
  179. package/dist/theme/high-contrast-theme.js.map +1 -0
  180. package/dist/theme/index.d.ts +4 -2
  181. package/dist/theme/index.d.ts.map +1 -1
  182. package/dist/theme/index.js +4 -2
  183. package/dist/theme/index.js.map +1 -1
  184. package/dist/theme/theme-config.d.ts +134 -0
  185. package/dist/theme/theme-config.d.ts.map +1 -0
  186. package/dist/theme/theme-config.js +286 -0
  187. package/dist/theme/theme-config.js.map +1 -0
  188. package/dist/theme/theme.d.ts +93 -2
  189. package/dist/theme/theme.d.ts.map +1 -1
  190. package/dist/theme/theme.js +125 -28
  191. package/dist/theme/theme.js.map +1 -1
  192. package/dist/utils/contrast-checker.d.ts +51 -0
  193. package/dist/utils/contrast-checker.d.ts.map +1 -0
  194. package/dist/utils/contrast-checker.js +97 -0
  195. package/dist/utils/contrast-checker.js.map +1 -0
  196. package/dist/utils/index.d.ts +2 -0
  197. package/dist/utils/index.d.ts.map +1 -0
  198. package/dist/utils/index.js +3 -0
  199. package/dist/utils/index.js.map +1 -0
  200. package/package.json +35 -20
  201. package/README.md +0 -929
  202. package/dist/brand/brandConfig.d.ts +0 -48
  203. package/dist/brand/brandConfig.d.ts.map +0 -1
  204. package/dist/brand/brandConfig.js +0 -41
  205. package/dist/brand/brandConfig.js.map +0 -1
  206. package/dist/brand/brandContext.d.ts +0 -10
  207. package/dist/brand/brandContext.d.ts.map +0 -1
  208. package/dist/brand/brandContext.js +0 -16
  209. package/dist/brand/brandContext.js.map +0 -1
  210. package/dist/brand/brandTypes.d.ts +0 -54
  211. package/dist/brand/brandTypes.d.ts.map +0 -1
  212. package/dist/brand/brandTypes.js +0 -2
  213. package/dist/brand/brandTypes.js.map +0 -1
  214. package/dist/components/action/ActionRow.d.ts +0 -25
  215. package/dist/components/action/ActionRow.d.ts.map +0 -1
  216. package/dist/components/action/ActionRow.js +0 -66
  217. package/dist/components/action/ActionRow.js.map +0 -1
  218. package/dist/components/action/index.d.ts +0 -2
  219. package/dist/components/action/index.d.ts.map +0 -1
  220. package/dist/components/action/index.js +0 -3
  221. package/dist/components/action/index.js.map +0 -1
  222. package/dist/components/card/Card.d.ts +0 -11
  223. package/dist/components/card/Card.d.ts.map +0 -1
  224. package/dist/components/card/Card.js +0 -32
  225. package/dist/components/card/Card.js.map +0 -1
  226. package/dist/components/card/index.d.ts +0 -2
  227. package/dist/components/card/index.d.ts.map +0 -1
  228. package/dist/components/card/index.js +0 -2
  229. package/dist/components/card/index.js.map +0 -1
  230. package/dist/components/chat/ChatContainer.d.ts +0 -27
  231. package/dist/components/chat/ChatContainer.d.ts.map +0 -1
  232. package/dist/components/chat/ChatContainer.js +0 -52
  233. package/dist/components/chat/ChatContainer.js.map +0 -1
  234. package/dist/components/chat/ChatInput.d.ts +0 -9
  235. package/dist/components/chat/ChatInput.d.ts.map +0 -1
  236. package/dist/components/chat/ChatInput.js +0 -219
  237. package/dist/components/chat/ChatInput.js.map +0 -1
  238. package/dist/components/chat/ChatMessages.d.ts +0 -9
  239. package/dist/components/chat/ChatMessages.d.ts.map +0 -1
  240. package/dist/components/chat/ChatMessages.js +0 -35
  241. package/dist/components/chat/ChatMessages.js.map +0 -1
  242. package/dist/components/chat/EmptyChat.d.ts +0 -18
  243. package/dist/components/chat/EmptyChat.d.ts.map +0 -1
  244. package/dist/components/chat/EmptyChat.js +0 -64
  245. package/dist/components/chat/EmptyChat.js.map +0 -1
  246. package/dist/components/chat/Message.d.ts +0 -8
  247. package/dist/components/chat/Message.d.ts.map +0 -1
  248. package/dist/components/chat/Message.js +0 -47
  249. package/dist/components/chat/Message.js.map +0 -1
  250. package/dist/components/chat/index.d.ts +0 -6
  251. package/dist/components/chat/index.d.ts.map +0 -1
  252. package/dist/components/chat/index.js +0 -7
  253. package/dist/components/chat/index.js.map +0 -1
  254. package/dist/components/chat/types.d.ts +0 -34
  255. package/dist/components/chat/types.d.ts.map +0 -1
  256. package/dist/components/form/DropDownSelect.d.ts +0 -12
  257. package/dist/components/form/DropDownSelect.d.ts.map +0 -1
  258. package/dist/components/form/DropDownSelect.js +0 -63
  259. package/dist/components/form/DropDownSelect.js.map +0 -1
  260. package/dist/components/form/EmailSubscriptionForm.d.ts +0 -14
  261. package/dist/components/form/EmailSubscriptionForm.d.ts.map +0 -1
  262. package/dist/components/form/EmailSubscriptionForm.js +0 -58
  263. package/dist/components/form/EmailSubscriptionForm.js.map +0 -1
  264. package/dist/components/form/FormErrors.d.ts +0 -7
  265. package/dist/components/form/FormErrors.d.ts.map +0 -1
  266. package/dist/components/form/FormErrors.js +0 -35
  267. package/dist/components/form/FormErrors.js.map +0 -1
  268. package/dist/components/form/FormInput.d.ts +0 -14
  269. package/dist/components/form/FormInput.d.ts.map +0 -1
  270. package/dist/components/form/FormInput.js +0 -35
  271. package/dist/components/form/FormInput.js.map +0 -1
  272. package/dist/components/form/FormSeparator.d.ts +0 -6
  273. package/dist/components/form/FormSeparator.d.ts.map +0 -1
  274. package/dist/components/form/FormSeparator.js +0 -25
  275. package/dist/components/form/FormSeparator.js.map +0 -1
  276. package/dist/components/form/index.d.ts +0 -6
  277. package/dist/components/form/index.d.ts.map +0 -1
  278. package/dist/components/form/index.js +0 -7
  279. package/dist/components/form/index.js.map +0 -1
  280. package/dist/components/layout/Footer.d.ts +0 -3
  281. package/dist/components/layout/Footer.d.ts.map +0 -1
  282. package/dist/components/layout/Footer.js +0 -60
  283. package/dist/components/layout/Footer.js.map +0 -1
  284. package/dist/components/layout/MinimalFooter.d.ts +0 -8
  285. package/dist/components/layout/MinimalFooter.d.ts.map +0 -1
  286. package/dist/components/layout/MinimalFooter.js +0 -57
  287. package/dist/components/layout/MinimalFooter.js.map +0 -1
  288. package/dist/components/layout/MobileFooterBar.d.ts +0 -7
  289. package/dist/components/layout/MobileFooterBar.d.ts.map +0 -1
  290. package/dist/components/layout/MobileFooterBar.js +0 -18
  291. package/dist/components/layout/MobileFooterBar.js.map +0 -1
  292. package/dist/components/layout/ParallaxScrollView.d.ts +0 -11
  293. package/dist/components/layout/ParallaxScrollView.d.ts.map +0 -1
  294. package/dist/components/layout/ParallaxScrollView.js +0 -67
  295. package/dist/components/layout/ParallaxScrollView.js.map +0 -1
  296. package/dist/components/layout/WebPageLayout.d.ts +0 -17
  297. package/dist/components/layout/WebPageLayout.d.ts.map +0 -1
  298. package/dist/components/layout/WebPageLayout.js +0 -103
  299. package/dist/components/layout/WebPageLayout.js.map +0 -1
  300. package/dist/components/layout/index.d.ts +0 -6
  301. package/dist/components/layout/index.d.ts.map +0 -1
  302. package/dist/components/layout/index.js +0 -9
  303. package/dist/components/layout/index.js.map +0 -1
  304. package/dist/components/list/List.d.ts +0 -10
  305. package/dist/components/list/List.d.ts.map +0 -1
  306. package/dist/components/list/List.js +0 -18
  307. package/dist/components/list/List.js.map +0 -1
  308. package/dist/components/list/ListButton.d.ts +0 -13
  309. package/dist/components/list/ListButton.d.ts.map +0 -1
  310. package/dist/components/list/ListButton.js +0 -24
  311. package/dist/components/list/ListButton.js.map +0 -1
  312. package/dist/components/list/ListDivider.d.ts +0 -7
  313. package/dist/components/list/ListDivider.d.ts.map +0 -1
  314. package/dist/components/list/ListDivider.js +0 -23
  315. package/dist/components/list/ListDivider.js.map +0 -1
  316. package/dist/components/list/index.d.ts +0 -4
  317. package/dist/components/list/index.d.ts.map +0 -1
  318. package/dist/components/list/index.js +0 -4
  319. package/dist/components/list/index.js.map +0 -1
  320. package/dist/components/media/Carousel.d.ts +0 -18
  321. package/dist/components/media/Carousel.d.ts.map +0 -1
  322. package/dist/components/media/Carousel.js +0 -60
  323. package/dist/components/media/Carousel.js.map +0 -1
  324. package/dist/components/media/FeatureCard.d.ts +0 -9
  325. package/dist/components/media/FeatureCard.d.ts.map +0 -1
  326. package/dist/components/media/FeatureCard.js +0 -68
  327. package/dist/components/media/FeatureCard.js.map +0 -1
  328. package/dist/components/media/HorizontalCarousel.d.ts +0 -17
  329. package/dist/components/media/HorizontalCarousel.d.ts.map +0 -1
  330. package/dist/components/media/HorizontalCarousel.js +0 -60
  331. package/dist/components/media/HorizontalCarousel.js.map +0 -1
  332. package/dist/components/media/ImageCarousel.d.ts +0 -14
  333. package/dist/components/media/ImageCarousel.d.ts.map +0 -1
  334. package/dist/components/media/ImageCarousel.js +0 -21
  335. package/dist/components/media/ImageCarousel.js.map +0 -1
  336. package/dist/components/media/MediaTile.d.ts +0 -30
  337. package/dist/components/media/MediaTile.d.ts.map +0 -1
  338. package/dist/components/media/MediaTile.js +0 -51
  339. package/dist/components/media/MediaTile.js.map +0 -1
  340. package/dist/components/media/SkeletonMediaTile.d.ts +0 -17
  341. package/dist/components/media/SkeletonMediaTile.d.ts.map +0 -1
  342. package/dist/components/media/SkeletonMediaTile.js +0 -67
  343. package/dist/components/media/SkeletonMediaTile.js.map +0 -1
  344. package/dist/components/media/index.d.ts +0 -7
  345. package/dist/components/media/index.d.ts.map +0 -1
  346. package/dist/components/media/index.js +0 -8
  347. package/dist/components/media/index.js.map +0 -1
  348. package/dist/components/navigation/AppbarWeb.d.ts +0 -18
  349. package/dist/components/navigation/AppbarWeb.d.ts.map +0 -1
  350. package/dist/components/navigation/AppbarWeb.js +0 -70
  351. package/dist/components/navigation/AppbarWeb.js.map +0 -1
  352. package/dist/components/navigation/IconButtonGroup.d.ts +0 -7
  353. package/dist/components/navigation/IconButtonGroup.d.ts.map +0 -1
  354. package/dist/components/navigation/IconButtonGroup.js +0 -33
  355. package/dist/components/navigation/IconButtonGroup.js.map +0 -1
  356. package/dist/components/navigation/Logo.d.ts +0 -16
  357. package/dist/components/navigation/Logo.d.ts.map +0 -1
  358. package/dist/components/navigation/Logo.js +0 -64
  359. package/dist/components/navigation/Logo.js.map +0 -1
  360. package/dist/components/navigation/MobileMenuDrawer.d.ts +0 -13
  361. package/dist/components/navigation/MobileMenuDrawer.d.ts.map +0 -1
  362. package/dist/components/navigation/MobileMenuDrawer.js +0 -184
  363. package/dist/components/navigation/MobileMenuDrawer.js.map +0 -1
  364. package/dist/components/navigation/ScreenHeader.d.ts +0 -30
  365. package/dist/components/navigation/ScreenHeader.d.ts.map +0 -1
  366. package/dist/components/navigation/ScreenHeader.js +0 -127
  367. package/dist/components/navigation/ScreenHeader.js.map +0 -1
  368. package/dist/components/navigation/iconUtils.d.ts.map +0 -1
  369. package/dist/components/navigation/iconUtils.js.map +0 -1
  370. package/dist/components/tile/Tile.d.ts +0 -18
  371. package/dist/components/tile/Tile.d.ts.map +0 -1
  372. package/dist/components/tile/Tile.js +0 -41
  373. package/dist/components/tile/Tile.js.map +0 -1
  374. package/dist/components/tile/index.d.ts +0 -2
  375. package/dist/components/tile/index.d.ts.map +0 -1
  376. package/dist/components/tile/index.js +0 -2
  377. package/dist/components/tile/index.js.map +0 -1
  378. package/dist/components/ui/ArrowButton.d.ts +0 -8
  379. package/dist/components/ui/ArrowButton.d.ts.map +0 -1
  380. package/dist/components/ui/ArrowButton.js +0 -30
  381. package/dist/components/ui/ArrowButton.js.map +0 -1
  382. package/dist/components/ui/BlurButton.d.ts +0 -16
  383. package/dist/components/ui/BlurButton.d.ts.map +0 -1
  384. package/dist/components/ui/BlurButton.js +0 -26
  385. package/dist/components/ui/BlurButton.js.map +0 -1
  386. package/dist/components/ui/Button.d.ts +0 -24
  387. package/dist/components/ui/Button.d.ts.map +0 -1
  388. package/dist/components/ui/Button.js +0 -60
  389. package/dist/components/ui/Button.js.map +0 -1
  390. package/dist/components/ui/ErrorBoundary.d.ts +0 -18
  391. package/dist/components/ui/ErrorBoundary.d.ts.map +0 -1
  392. package/dist/components/ui/ErrorBoundary.js +0 -37
  393. package/dist/components/ui/ErrorBoundary.js.map +0 -1
  394. package/dist/components/ui/IconButton.d.ts +0 -13
  395. package/dist/components/ui/IconButton.d.ts.map +0 -1
  396. package/dist/components/ui/IconButton.js +0 -27
  397. package/dist/components/ui/IconButton.js.map +0 -1
  398. package/dist/components/ui/LoadingIndicator.d.ts +0 -6
  399. package/dist/components/ui/LoadingIndicator.d.ts.map +0 -1
  400. package/dist/components/ui/LoadingIndicator.js +0 -15
  401. package/dist/components/ui/LoadingIndicator.js.map +0 -1
  402. package/dist/components/ui/NotificationBadge.d.ts +0 -8
  403. package/dist/components/ui/NotificationBadge.d.ts.map +0 -1
  404. package/dist/components/ui/NotificationBadge.js +0 -24
  405. package/dist/components/ui/NotificationBadge.js.map +0 -1
  406. package/dist/components/ui/SkeletonCard.d.ts +0 -14
  407. package/dist/components/ui/SkeletonCard.d.ts.map +0 -1
  408. package/dist/components/ui/SkeletonCard.js +0 -50
  409. package/dist/components/ui/SkeletonCard.js.map +0 -1
  410. package/dist/components/ui/StyledText.d.ts +0 -17
  411. package/dist/components/ui/StyledText.d.ts.map +0 -1
  412. package/dist/components/ui/StyledText.js +0 -27
  413. package/dist/components/ui/StyledText.js.map +0 -1
  414. package/dist/components/ui/StyledTextInput.d.ts +0 -10
  415. package/dist/components/ui/StyledTextInput.d.ts.map +0 -1
  416. package/dist/components/ui/StyledTextInput.js +0 -62
  417. package/dist/components/ui/StyledTextInput.js.map +0 -1
  418. package/dist/components/ui/TextLink.d.ts +0 -14
  419. package/dist/components/ui/TextLink.d.ts.map +0 -1
  420. package/dist/components/ui/TextLink.js +0 -25
  421. package/dist/components/ui/TextLink.js.map +0 -1
  422. package/dist/components/ui/ToggleIconButton.d.ts +0 -14
  423. package/dist/components/ui/ToggleIconButton.d.ts.map +0 -1
  424. package/dist/components/ui/ToggleIconButton.js +0 -19
  425. package/dist/components/ui/ToggleIconButton.js.map +0 -1
  426. package/dist/context/scrollContext.d.ts.map +0 -1
  427. package/dist/context/scrollContext.js.map +0 -1
  428. package/dist/hooks/useDimensions.d.ts.map +0 -1
  429. package/dist/hooks/useDimensions.js.map +0 -1
  430. package/dist/hooks/useWindowHeight.d.ts +0 -7
  431. package/dist/hooks/useWindowHeight.d.ts.map +0 -1
  432. package/dist/hooks/useWindowHeight.js +0 -10
  433. package/dist/hooks/useWindowHeight.js.map +0 -1
  434. package/dist/hooks/useWindowWidth.d.ts +0 -20
  435. package/dist/hooks/useWindowWidth.d.ts.map +0 -1
  436. package/dist/hooks/useWindowWidth.js +0 -27
  437. package/dist/hooks/useWindowWidth.js.map +0 -1
  438. package/dist/theme/themeConfig.d.ts +0 -19
  439. package/dist/theme/themeConfig.d.ts.map +0 -1
  440. package/dist/theme/themeConfig.js +0 -43
  441. package/dist/theme/themeConfig.js.map +0 -1
  442. /package/dist/components/{chat → shared}/types.js +0 -0
@@ -0,0 +1,253 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // 1. IMPORTS
3
+ import { forwardRef, useEffect, useState } from 'react';
4
+ import { ActivityIndicator, Platform, Pressable, StyleSheet, View, } from 'react-native';
5
+ import { Typography } from './typography';
6
+ import { useTheme } from '../../theme';
7
+ import { renderIcon } from '../../icons';
8
+ export const ButtonVariants = ['filled', 'elevated', 'tonal', 'outlined', 'text'];
9
+ // 3. COMPONENT
10
+ /**
11
+ * Material Design 3 Button component
12
+ * https://m3.material.io/components/buttons
13
+ *
14
+ * Supports five variants:
15
+ * - filled: High-emphasis actions (default)
16
+ * - elevated: Medium-emphasis actions with elevation
17
+ * - tonal: Medium-emphasis with container color
18
+ * - outlined: Medium-emphasis with border
19
+ * - text: Low-emphasis actions
20
+ */
21
+ const Button = forwardRef(({ title, variant = 'filled', loading = false, disabled = false, icon, onPress, iconPosition = 'right', style, testID, accessibilityLabel, accessibilityHint, color, backgroundColor, size = 'medium', }, ref) => {
22
+ const theme = useTheme();
23
+ const tokens = theme.tokens;
24
+ // Track hover and focus states (web-only features)
25
+ const [hovered, setHovered] = useState(false);
26
+ const [focused, setFocused] = useState(false);
27
+ // Respect reduce-motion preference where available and map sizes
28
+ const [reduceMotionEnabled, setReduceMotionEnabled] = useState(false);
29
+ useEffect(() => {
30
+ let mounted = true;
31
+ try {
32
+ // dynamically require to avoid bundler differences across platforms
33
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
34
+ const { AccessibilityInfo } = require('react-native');
35
+ AccessibilityInfo?.isReduceMotionEnabled?.().then((enabled) => {
36
+ if (mounted)
37
+ setReduceMotionEnabled(!!enabled);
38
+ });
39
+ }
40
+ catch (e) {
41
+ // ignore if not available
42
+ }
43
+ return () => { mounted = false; };
44
+ }, []);
45
+ // Visual heights in dp per size token
46
+ const sizeMap = {
47
+ small: 32,
48
+ medium: 40,
49
+ large: 56,
50
+ };
51
+ // default to 'medium' if not provided via props
52
+ const visualHeight = sizeMap[size] ?? sizeMap.medium;
53
+ // Ensure a minimum touch target of 48dp
54
+ const touchHeight = Math.max(48, visualHeight);
55
+ // Dynamic styles based on state
56
+ const getButtonStyle = ({ pressed }) => {
57
+ const t = tokens.button;
58
+ let bg;
59
+ let borderColor;
60
+ let elevation;
61
+ if (disabled) {
62
+ bg = t.disabledBg;
63
+ borderColor = variant === 'outlined' ? theme.outlineVariant : undefined;
64
+ }
65
+ else {
66
+ switch (variant) {
67
+ case 'filled':
68
+ bg = t.filledBg;
69
+ if (Platform.OS !== 'web') {
70
+ elevation = pressed ? tokens.elevation.level0 : tokens.elevation.level1;
71
+ }
72
+ break;
73
+ case 'elevated':
74
+ bg = t.elevatedBg;
75
+ elevation = pressed ? tokens.elevation.level1 : tokens.elevation.level3;
76
+ break;
77
+ case 'tonal':
78
+ bg = t.tonalBg;
79
+ break;
80
+ case 'outlined':
81
+ bg = 'transparent';
82
+ borderColor = t.outlinedBorder;
83
+ break;
84
+ case 'text':
85
+ bg = 'transparent';
86
+ break;
87
+ }
88
+ }
89
+ // Apply custom background color override
90
+ if (backgroundColor) {
91
+ bg = backgroundColor;
92
+ }
93
+ const baseStyle = [
94
+ styles.base,
95
+ styles[variant],
96
+ // reserve touch target height for accessibility
97
+ { minHeight: touchHeight },
98
+ { borderRadius: theme.shape.buttonBorderRadius },
99
+ bg ? { backgroundColor: bg } : null,
100
+ borderColor ? { borderColor } : null,
101
+ disabled ? styles.disabled : null,
102
+ ];
103
+ // Add elevation shadow for elevated buttons
104
+ if (elevation !== undefined && elevation > 0) {
105
+ baseStyle.push({
106
+ shadowColor: theme.shadow,
107
+ shadowOffset: { width: 0, height: Math.max(1, Math.floor(elevation / 2)) },
108
+ shadowOpacity: 0.08,
109
+ shadowRadius: Math.max(1, Math.floor(elevation / 2)),
110
+ elevation: elevation,
111
+ });
112
+ }
113
+ // Add focus ring for web/keyboard navigation
114
+ if (focused && Platform.OS === 'web') {
115
+ baseStyle.push({
116
+ borderWidth: tokens.focusRing.width,
117
+ borderColor: tokens.focusRing.color,
118
+ borderStyle: 'solid',
119
+ });
120
+ }
121
+ // M3 state layer: subtle overlay on hover (8% opacity) and press (12% opacity)
122
+ if (Platform.OS === 'web' && !disabled) {
123
+ if (pressed) {
124
+ baseStyle.push({ opacity: 0.88 });
125
+ }
126
+ else if (hovered) {
127
+ baseStyle.push({ opacity: 0.92 });
128
+ }
129
+ }
130
+ // subtle transform for hover/press unless user requests reduced motion
131
+ if (!reduceMotionEnabled) {
132
+ if (pressed) {
133
+ baseStyle.push({ transform: [{ scale: 0.997 }] });
134
+ }
135
+ else if (hovered && Platform.OS === 'web') {
136
+ baseStyle.push({ transform: [{ translateY: -1 }, { scale: 1.01 }] });
137
+ }
138
+ }
139
+ // Add custom style last
140
+ if (style) {
141
+ baseStyle.push(style);
142
+ }
143
+ return baseStyle;
144
+ };
145
+ // Get text color based on variant and state
146
+ const getTextColor = (isDisabled) => {
147
+ if (color)
148
+ return color;
149
+ if (isDisabled)
150
+ return tokens.button.disabledText;
151
+ const t = tokens.button;
152
+ switch (variant) {
153
+ case 'filled':
154
+ return t.filledText;
155
+ case 'elevated':
156
+ return t.elevatedText;
157
+ case 'tonal':
158
+ // tonal should use a high-contrast label (avoid looking disabled)
159
+ return theme.onSurface;
160
+ case 'outlined':
161
+ return t.outlinedText;
162
+ case 'text':
163
+ return t.textColor;
164
+ default:
165
+ return t.filledText;
166
+ }
167
+ };
168
+ const getIconColor = (isDisabled) => {
169
+ if (icon?.color)
170
+ return icon.color;
171
+ return getTextColor(isDisabled);
172
+ };
173
+ const textColor = getTextColor(disabled);
174
+ const iconColor = getIconColor(disabled);
175
+ if (loading) {
176
+ return (_jsx(View, { ref: ref, testID: testID, style: [
177
+ styles.base,
178
+ styles[variant],
179
+ { minHeight: touchHeight },
180
+ { borderRadius: theme.shape.buttonBorderRadius },
181
+ backgroundColor && { backgroundColor },
182
+ ], accessibilityRole: "button", accessibilityLabel: accessibilityLabel ?? title, accessibilityHint: accessibilityHint, accessibilityState: { disabled: true, busy: true }, children: _jsx(ActivityIndicator, { size: "small", color: textColor }) }));
183
+ }
184
+ const renderButtonIcon = (position) => {
185
+ if (!icon || iconPosition !== position)
186
+ return null;
187
+ const iconSize = icon.size || 18;
188
+ const iconLibrary = icon.library || 'Feather';
189
+ return (_jsx(View, { style: position === 'left' ? styles.iconLeft : styles.iconRight, children: renderIcon(icon, iconLibrary, iconSize, iconColor) }));
190
+ };
191
+ return (_jsx(Pressable, { ref: ref, testID: testID, onPress: disabled ? undefined : (e) => {
192
+ if (Platform.OS === 'web') {
193
+ e.currentTarget?.blur?.();
194
+ }
195
+ onPress?.(e);
196
+ }, disabled: disabled, style: getButtonStyle, onHoverIn: () => setHovered(true), onHoverOut: () => setHovered(false), onFocus: () => setFocused(true), onBlur: () => setFocused(false), accessibilityRole: "button", accessibilityLabel: accessibilityLabel ?? title, accessibilityHint: accessibilityHint, accessibilityState: { disabled },
197
+ // Platform-specific ripple effect for Android
198
+ android_ripple: !disabled && Platform.OS === 'android'
199
+ ? {
200
+ color: theme.primary + '40', // 25% opacity
201
+ borderless: false,
202
+ }
203
+ : undefined, children: _jsxs(View, { style: [styles.contentContainer, { height: visualHeight }], children: [renderButtonIcon('left'), _jsx(Typography, { variant: "labelLarge", weight: "medium", color: textColor, numberOfLines: 1, align: "center", children: title }), renderButtonIcon('right')] }) }));
204
+ });
205
+ Button.displayName = 'Button';
206
+ // 4. STYLES
207
+ const styles = StyleSheet.create({
208
+ base: {
209
+ alignItems: 'center',
210
+ justifyContent: 'center',
211
+ },
212
+ filled: {
213
+ paddingHorizontal: 24,
214
+ minWidth: 100,
215
+ },
216
+ elevated: {
217
+ paddingHorizontal: 24,
218
+ minWidth: 100,
219
+ },
220
+ tonal: {
221
+ paddingHorizontal: 24,
222
+ minWidth: 100,
223
+ },
224
+ outlined: {
225
+ backgroundColor: 'transparent',
226
+ borderWidth: 1,
227
+ paddingHorizontal: 24,
228
+ minWidth: 100,
229
+ },
230
+ text: {
231
+ backgroundColor: 'transparent',
232
+ paddingHorizontal: 12,
233
+ minWidth: 100,
234
+ },
235
+ disabled: {
236
+ opacity: 0.38, // M3 disabled opacity
237
+ },
238
+ contentContainer: {
239
+ flexDirection: 'row',
240
+ alignItems: 'center',
241
+ justifyContent: 'center',
242
+ gap: 8,
243
+ },
244
+ iconLeft: {
245
+ marginRight: 0, // gap handles spacing
246
+ },
247
+ iconRight: {
248
+ marginLeft: 0, // gap handles spacing
249
+ },
250
+ });
251
+ // 5. EXPORTS
252
+ export { Button };
253
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../components/ui/button.tsx"],"names":[],"mappings":";AAAA,aAAa;AACb,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,iBAAiB,EAEjB,QAAQ,EACR,SAAS,EACT,UAAU,EACV,IAAI,GAIL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAC;AAwC3D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAkF3F,eAAe;AACf;;;;;;;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B,QAAQ,EAAE,GAAG;KACd;IACD,QAAQ,EAAE;QACR,eAAe,EAAE,aAAa;QAC9B,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,EAAE;QACrB,QAAQ,EAAE,GAAG;KACd;IACD,IAAI,EAAE;QACJ,eAAe,EAAE,aAAa;QAC9B,iBAAiB,EAAE,EAAE;QACrB,QAAQ,EAAE,GAAG;KACd;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,IAAI,EAAE,sBAAsB;KACtC;IACD,gBAAgB,EAAE;QAChB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAE,CAAC;KACP;IACD,QAAQ,EAAE;QACR,WAAW,EAAE,CAAC,EAAE,sBAAsB;KACvC;IACD,SAAS,EAAE;QACT,UAAU,EAAE,CAAC,EAAE,sBAAsB;KACtC;CACF,CAAC,CAAC;AAEH,aAAa;AACb,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,88 @@
1
+ import React from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import { type IconLibrary } from '../../icons';
4
+ /**
5
+ * Props for the Collapsible component.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * // Basic usage
10
+ * <Collapsible title="More details">
11
+ * <Typography>Hidden content that can be expanded</Typography>
12
+ * </Collapsible>
13
+ * ```
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * // Controlled state
18
+ * const [open, setOpen] = useState(false);
19
+ * <Collapsible title="Settings" open={open} onToggle={setOpen}>
20
+ * <Typography>Settings content</Typography>
21
+ * </Collapsible>
22
+ * ```
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * // Custom styling
27
+ * <Collapsible
28
+ * title="FAQ Item"
29
+ * headerVariant="surfaceContainer"
30
+ * contentVariant="surface"
31
+ * >
32
+ * <Typography>Answer to the question</Typography>
33
+ * </Collapsible>
34
+ * ```
35
+ */
36
+ export interface CollapsibleProps extends Omit<ViewProps, 'children'> {
37
+ /** Title text displayed in the header */
38
+ title: string;
39
+ /** Content to show when expanded */
40
+ children: React.ReactNode;
41
+ /**
42
+ * Controlled open state. If provided, component becomes controlled.
43
+ */
44
+ open?: boolean;
45
+ /**
46
+ * Whether the collapsible starts expanded (uncontrolled mode).
47
+ * @default false
48
+ */
49
+ defaultOpen?: boolean;
50
+ /**
51
+ * Callback when the open state changes.
52
+ */
53
+ onToggle?: (isOpen: boolean) => void;
54
+ /**
55
+ * ThemedView variant for the icon button background.
56
+ * @default 'surfaceContainer'
57
+ */
58
+ headerVariant?: 'surface' | 'surfaceContainer' | 'card' | 'primary';
59
+ /**
60
+ * ThemedView variant for the content area.
61
+ * @default 'surfaceContainer'
62
+ */
63
+ contentVariant?: 'surface' | 'surfaceContainer' | 'card';
64
+ /**
65
+ * Icon library to use for the chevron.
66
+ * @default 'Feather'
67
+ */
68
+ iconLibrary?: IconLibrary;
69
+ /**
70
+ * Custom icon name for the chevron.
71
+ * @default 'chevron-right'
72
+ */
73
+ iconName?: string;
74
+ /** Test ID for testing */
75
+ testID?: string;
76
+ }
77
+ /**
78
+ * Collapsible component for expandable/collapsible content sections.
79
+ *
80
+ * Features:
81
+ * - Animated expand/collapse with rotation and fade
82
+ * - Controlled and uncontrolled modes
83
+ * - Customizable header and content styling
84
+ * - Accessible with proper press states
85
+ */
86
+ declare const Collapsible: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<View>>;
87
+ export { Collapsible };
88
+ //# sourceMappingURL=collapsible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../components/ui/collapsible.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAyB,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW3E,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAI3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACnE,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAAC;IACpE;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,kBAAkB,GAAG,MAAM,CAAC;IACzD;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAOD;;;;;;;;GAQG;AACH,QAAA,MAAM,WAAW,+EAgFhB,CAAC;AAuBF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // 1. IMPORTS
3
+ import { forwardRef, useEffect, useState } from 'react';
4
+ import { Pressable, StyleSheet, View } from 'react-native';
5
+ import Animated, { FadeIn, FadeOut, useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
6
+ import { Typography } from './typography';
7
+ import { ThemedView } from './themed-view';
8
+ import { useTheme } from '../../theme';
9
+ import { renderIcon } from '../../icons';
10
+ // Icon button dimension — also used to indent the content panel beneath the text
11
+ const ICON_BUTTON_SIZE = 32;
12
+ // 3. COMPONENT
13
+ /**
14
+ * Collapsible component for expandable/collapsible content sections.
15
+ *
16
+ * Features:
17
+ * - Animated expand/collapse with rotation and fade
18
+ * - Controlled and uncontrolled modes
19
+ * - Customizable header and content styling
20
+ * - Accessible with proper press states
21
+ */
22
+ const Collapsible = forwardRef(({ title, children, open: controlledOpen, defaultOpen = false, onToggle, headerVariant = 'surfaceContainer', contentVariant = 'surfaceContainer', iconLibrary = 'Feather', iconName = 'chevron-right', testID, style, ...rest }, ref) => {
23
+ const theme = useTheme();
24
+ // Support both controlled and uncontrolled modes
25
+ const [internalOpen, setInternalOpen] = useState(defaultOpen);
26
+ const isControlled = controlledOpen !== undefined;
27
+ const isOpen = isControlled ? controlledOpen : internalOpen;
28
+ // Animation value for chevron rotation
29
+ const rotation = useSharedValue(isOpen ? 90 : 0);
30
+ // Sync rotation whenever isOpen changes (handles both controlled and uncontrolled modes)
31
+ useEffect(() => {
32
+ rotation.value = withTiming(isOpen ? 90 : 0, { duration: 200 });
33
+ }, [isOpen]);
34
+ const handlePress = () => {
35
+ const newState = !isOpen;
36
+ if (!isControlled) {
37
+ setInternalOpen(newState);
38
+ }
39
+ onToggle?.(newState);
40
+ };
41
+ const animatedIconStyle = useAnimatedStyle(() => ({
42
+ transform: [{ rotate: `${rotation.value}deg` }],
43
+ }));
44
+ return (_jsxs(View, { ref: ref, style: style, testID: testID, ...rest, children: [_jsxs(Pressable, { style: ({ pressed }) => [styles.heading, { gap: theme.spacing.sm }, pressed && styles.pressedHeading], onPress: handlePress, accessibilityRole: "button", accessibilityState: { expanded: isOpen }, accessibilityLabel: `${title}, ${isOpen ? 'expanded' : 'collapsed'}`, children: [_jsx(ThemedView, { variant: headerVariant, style: [styles.iconButton, { borderRadius: theme.shape.surfaceBorderRadius }], children: _jsx(Animated.View, { style: animatedIconStyle, children: renderIcon({ name: iconName }, iconLibrary, 14, theme.onSurface) }) }), _jsx(Typography, { variant: "labelLarge", children: title })] }), isOpen && (_jsx(Animated.View, { entering: FadeIn.duration(200), exiting: FadeOut.duration(150), children: _jsx(ThemedView, { variant: contentVariant, style: [styles.content, { marginTop: theme.spacing.md, marginLeft: ICON_BUTTON_SIZE, padding: theme.spacing.lg, borderRadius: theme.shape.surfaceBorderRadius }], children: children }) }))] }));
45
+ });
46
+ Collapsible.displayName = 'Collapsible';
47
+ // 4. STYLES
48
+ const styles = StyleSheet.create({
49
+ heading: {
50
+ flexDirection: 'row',
51
+ alignItems: 'center',
52
+ },
53
+ pressedHeading: {
54
+ opacity: 0.7,
55
+ },
56
+ iconButton: {
57
+ width: ICON_BUTTON_SIZE,
58
+ height: ICON_BUTTON_SIZE,
59
+ justifyContent: 'center',
60
+ alignItems: 'center',
61
+ },
62
+ content: {},
63
+ });
64
+ // 5. EXPORTS
65
+ export { Collapsible };
66
+ //# sourceMappingURL=collapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../../components/ui/collapsible.tsx"],"names":[],"mappings":";AAAA,aAAa;AACb,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAC3E,OAAO,QAAQ,EAAE,EACf,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAC;AA8E3D,iFAAiF;AACjF,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B,eAAe;AAEf;;;;;;;;GAQG;AACH,MAAM,WAAW,GAAG,UAAU,CAC5B,CACE,EACE,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,cAAc,EACpB,WAAW,GAAG,KAAK,EACnB,QAAQ,EACR,a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AO,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC,YAClM,QAAQ,GACE,GACC,CACjB,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,YAAY;AACZ,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,cAAc,EAAE;QACd,OAAO,EAAE,GAAG;KACb;IACD,UAAU,EAAE;QACV,KAAK,EAAE,gBAAgB;QACvB,MAAM,EAAE,gBAAgB;QACxB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,OAAO,EAAE,EAAE;CACZ,CAAC,CAAC;AAEH,aAAa;AACb,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { type ThemedViewProps } from './themed-view';
3
+ export interface ContainerProps extends ThemedViewProps {
4
+ /** Maximum width in pixels. @default 1000 */
5
+ maxWidth?: number;
6
+ }
7
+ /**
8
+ * Container component that constrains content width for better readability on large screens.
9
+ * Centers content horizontally and applies consistent padding.
10
+ *
11
+ * Common for web layouts, marketing pages, and content-heavy screens.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Screen scrollable>
16
+ * <Container>
17
+ * <Typography>Constrained content</Typography>
18
+ * </Container>
19
+ * </Screen>
20
+ * ```
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * // Custom max-width
25
+ * <Container maxWidth={800}>
26
+ * <Typography>Narrower content</Typography>
27
+ * </Container>
28
+ * ```
29
+ */
30
+ export declare const Container: React.FC<ContainerProps>;
31
+ //# sourceMappingURL=container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../components/ui/container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAGjE,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAwB9C,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StyleSheet } from 'react-native';
3
+ import { ThemedView } from './themed-view';
4
+ import { useTheme } from '../../theme';
5
+ /**
6
+ * Container component that constrains content width for better readability on large screens.
7
+ * Centers content horizontally and applies consistent padding.
8
+ *
9
+ * Common for web layouts, marketing pages, and content-heavy screens.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <Screen scrollable>
14
+ * <Container>
15
+ * <Typography>Constrained content</Typography>
16
+ * </Container>
17
+ * </Screen>
18
+ * ```
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * // Custom max-width
23
+ * <Container maxWidth={800}>
24
+ * <Typography>Narrower content</Typography>
25
+ * </Container>
26
+ * ```
27
+ */
28
+ export const Container = ({ children, maxWidth = 1000, style, ...rest }) => {
29
+ const theme = useTheme();
30
+ return (_jsx(ThemedView, { style: [
31
+ styles.container,
32
+ {
33
+ maxWidth,
34
+ paddingHorizontal: theme.spacing.xl,
35
+ },
36
+ style,
37
+ ], rounded: false, ...rest, children: children }));
38
+ };
39
+ Container.displayName = 'Container';
40
+ const styles = StyleSheet.create({
41
+ container: {
42
+ width: '100%',
43
+ alignSelf: 'center',
44
+ },
45
+ });
46
+ //# sourceMappingURL=container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.js","sourceRoot":"","sources":["../../../components/ui/container.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAwB,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAOvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAClD,QAAQ,EACR,QAAQ,GAAG,IAAI,EACf,KAAK,EACL,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE;YACL,MAAM,CAAC,SAAS;YAChB;gBACE,QAAQ;gBACR,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE;aACpC;YACD,KAAK;SACN,EACD,OAAO,EAAE,KAAK,KACV,IAAI,YAEP,QAAQ,GACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC"}
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { GestureResponderEvent, View } from 'react-native';
3
+ import type { InteractiveComponentProps } from '../shared/types';
4
+ import type { IconConfig } from './button';
5
+ /** FAB variant controlling color scheme */
6
+ export type FABVariant = 'primary' | 'secondary' | 'tertiary' | 'surface';
7
+ /** FAB size controlling dimensions */
8
+ export type FABSize = 'small' | 'medium' | 'large';
9
+ /**
10
+ * Props for the FAB (Floating Action Button) component.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * // Standard FAB
15
+ * <FAB icon={{ name: 'plus' }} onPress={() => {}} />
16
+ *
17
+ * // Extended FAB with label
18
+ * <FAB icon={{ name: 'edit-2' }} label="Compose" onPress={() => {}} />
19
+ *
20
+ * // Small surface FAB
21
+ * <FAB icon={{ name: 'arrow-up' }} variant="surface" size="small" onPress={() => {}} />
22
+ * ```
23
+ */
24
+ export interface FABProps extends Omit<InteractiveComponentProps, 'onPress'> {
25
+ /** Required icon configuration */
26
+ icon: IconConfig;
27
+ /** Optional label for extended FAB */
28
+ label?: string;
29
+ /**
30
+ * Color variant following M3 FAB spec.
31
+ * @default 'primary'
32
+ */
33
+ variant?: FABVariant;
34
+ /**
35
+ * Size variant controlling dimensions and icon size.
36
+ * @default 'medium'
37
+ */
38
+ size?: FABSize;
39
+ /** Press handler */
40
+ onPress?: (event?: GestureResponderEvent) => void;
41
+ }
42
+ /**
43
+ * Material Design 3 Floating Action Button (FAB)
44
+ * https://m3.material.io/components/floating-action-button
45
+ *
46
+ * Supports four color variants and three sizes.
47
+ * When a `label` is provided, renders as an Extended FAB.
48
+ */
49
+ declare const FAB: React.ForwardRefExoticComponent<FABProps & React.RefAttributes<View>>;
50
+ export { FAB };
51
+ //# sourceMappingURL=fab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fab.d.ts","sourceRoot":"","sources":["../../../components/ui/fab.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,qBAAqB,EAIrB,IAAI,EAIL,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAE1E,sCAAsC;AACtC,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC;IAC1E,kCAAkC;IAClC,IAAI,EAAE,UAAU,CAAC;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,oBAAoB;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACnD;AAWD;;;;;;GAMG;AACH,QAAA,MAAM,GAAG,uEAsJP,CAAC;AAqBH,OAAO,EAAE,GAAG,EAAE,CAAC"}