xertica-ui 2.1.2 → 2.1.3

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 (402) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -1
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/cli.ts +1 -1
  6. package/bin/generate-tokens.ts +13 -7
  7. package/components/assistant/index.ts +6 -6
  8. package/components/assistant/xertica-assistant/index.ts +2 -0
  9. package/components/assistant/xertica-assistant/use-assistant.ts +564 -0
  10. package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +200 -0
  11. package/components/assistant/xertica-assistant/xertica-assistant.tsx +183 -474
  12. package/components/blocks/card-patterns/ActivityCard.tsx +72 -72
  13. package/components/blocks/card-patterns/FeatureCard.tsx +100 -100
  14. package/components/blocks/card-patterns/NotificationCard.tsx +127 -127
  15. package/components/blocks/card-patterns/ProfileCard.tsx +84 -84
  16. package/components/blocks/card-patterns/ProjectCard.tsx +89 -89
  17. package/components/blocks/card-patterns/QuickActionCard.tsx +62 -62
  18. package/components/blocks/card-patterns/card-patterns.stories.tsx +445 -445
  19. package/components/blocks/card-patterns/index.ts +17 -17
  20. package/components/blocks/index.ts +1 -1
  21. package/components/brand/index.ts +6 -6
  22. package/components/brand/xertica-provider/XerticaProvider.tsx +48 -48
  23. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  24. package/components/brand/xertica-provider/xertica-provider.test.tsx +52 -52
  25. package/components/examples/MapExamples.tsx +282 -282
  26. package/components/examples/SimpleFilterableMap.tsx +191 -191
  27. package/components/examples/index.ts +51 -51
  28. package/components/figma/ImageWithFallback.tsx +27 -27
  29. package/components/hooks/index.ts +7 -7
  30. package/components/index.ts +5 -5
  31. package/components/layout/header/header.test.tsx +8 -8
  32. package/components/layout/header/header.tsx +4 -4
  33. package/components/layout/index.ts +2 -2
  34. package/components/layout/sidebar/index.ts +2 -0
  35. package/components/layout/sidebar/sidebar.mdx +1 -1
  36. package/components/layout/sidebar/sidebar.stories.tsx +160 -8
  37. package/components/layout/sidebar/sidebar.test.tsx +11 -11
  38. package/components/layout/sidebar/sidebar.tsx +610 -471
  39. package/components/layout/sidebar/use-sidebar.ts +113 -0
  40. package/components/media/FloatingMediaWrapper.tsx +11 -11
  41. package/components/media/audio-player/AudioPlayer.tsx +22 -22
  42. package/components/media/index.ts +3 -3
  43. package/components/pages/home-content/HomeContent.tsx +7 -7
  44. package/components/pages/home-content/home-content.mdx +62 -62
  45. package/components/pages/home-page/HomePage.stories.tsx +39 -39
  46. package/components/pages/home-page/HomePage.tsx +1 -1
  47. package/components/pages/home-page/home-page.mdx +53 -53
  48. package/components/pages/index.ts +8 -8
  49. package/components/pages/template-content/TemplateContent.tsx +5 -5
  50. package/components/pages/template-content/template-content.mdx +61 -61
  51. package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
  52. package/components/pages/template-page/TemplatePage.tsx +5 -5
  53. package/components/pages/template-page/template-page.mdx +53 -53
  54. package/components/public-api-smoke.test.tsx +52 -52
  55. package/components/shared/assistant-utils.ts +43 -43
  56. package/components/shared/layout-constants.ts +1 -1
  57. package/components/ui/accordion/accordion.mdx +8 -8
  58. package/components/ui/accordion/accordion.stories.tsx +53 -53
  59. package/components/ui/alert/alert.mdx +8 -8
  60. package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
  61. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
  62. package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
  63. package/components/ui/avatar/avatar.mdx +8 -8
  64. package/components/ui/badge/badge.mdx +8 -8
  65. package/components/ui/badge/badge.tsx +9 -9
  66. package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
  67. package/components/ui/button/button.mdx +8 -8
  68. package/components/ui/calendar/calendar.mdx +8 -8
  69. package/components/ui/calendar/calendar.tsx +258 -258
  70. package/components/ui/card/card.mdx +8 -8
  71. package/components/ui/card/card.stories.tsx +245 -245
  72. package/components/ui/carousel/carousel.mdx +8 -8
  73. package/components/ui/chart/chart.mdx +8 -8
  74. package/components/ui/chart/chart.stories.tsx +1303 -344
  75. package/components/ui/chart/chart.test.tsx +154 -154
  76. package/components/ui/chart/chart.tsx +2367 -1494
  77. package/components/ui/checkbox/checkbox.mdx +8 -8
  78. package/components/ui/checkbox/checkbox.stories.tsx +20 -20
  79. package/components/ui/collapsible/collapsible.mdx +8 -8
  80. package/components/ui/command/command.mdx +8 -8
  81. package/components/ui/context-menu/context-menu.mdx +8 -8
  82. package/components/ui/dialog/dialog.mdx +8 -8
  83. package/components/ui/drawer/drawer.mdx +8 -8
  84. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
  85. package/components/ui/empty/empty.mdx +8 -8
  86. package/components/ui/file-upload/file-upload.mdx +8 -8
  87. package/components/ui/file-upload/file-upload.stories.tsx +100 -0
  88. package/components/ui/file-upload/file-upload.tsx +14 -74
  89. package/components/ui/file-upload/index.ts +1 -0
  90. package/components/ui/file-upload/use-file-upload.ts +181 -0
  91. package/components/ui/google-maps-loader/google-maps-loader.tsx +2 -2
  92. package/components/ui/hover-card/hover-card.mdx +8 -8
  93. package/components/ui/input/input.mdx +8 -8
  94. package/components/ui/input-otp/input-otp.mdx +8 -8
  95. package/components/ui/input-otp/input-otp.stories.tsx +6 -6
  96. package/components/ui/label/label.mdx +8 -8
  97. package/components/ui/map/map.mdx +8 -8
  98. package/components/ui/map/map.stories.tsx +51 -51
  99. package/components/ui/map/map.tsx +2 -2
  100. package/components/ui/menubar/menubar.mdx +8 -8
  101. package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
  102. package/components/ui/notification-badge/notification-badge.mdx +8 -8
  103. package/components/ui/pagination/index.ts +2 -0
  104. package/components/ui/pagination/pagination.mdx +8 -8
  105. package/components/ui/pagination/pagination.stories.tsx +94 -0
  106. package/components/ui/pagination/use-pagination.ts +194 -0
  107. package/components/ui/popover/popover.mdx +8 -8
  108. package/components/ui/progress/progress.mdx +8 -8
  109. package/components/ui/progress/progress.tsx +68 -68
  110. package/components/ui/radio-group/radio-group.mdx +8 -8
  111. package/components/ui/rating/rating.mdx +8 -8
  112. package/components/ui/resizable/resizable.mdx +8 -8
  113. package/components/ui/rich-text-editor/index.ts +2 -0
  114. package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +129 -1
  115. package/components/ui/rich-text-editor/rich-text-editor.tsx +86 -305
  116. package/components/ui/rich-text-editor/use-rich-text-editor.ts +439 -0
  117. package/components/ui/route-map/route-map.mdx +8 -8
  118. package/components/ui/route-map/route-map.stories.tsx +54 -54
  119. package/components/ui/route-map/route-map.tsx +2 -2
  120. package/components/ui/scroll-area/scroll-area.mdx +8 -8
  121. package/components/ui/search/search.mdx +8 -8
  122. package/components/ui/select/select.mdx +8 -8
  123. package/components/ui/select/select.stories.tsx +9 -9
  124. package/components/ui/separator/separator.mdx +8 -8
  125. package/components/ui/sheet/sheet.mdx +8 -8
  126. package/components/ui/sheet/sheet.stories.tsx +95 -95
  127. package/components/ui/simple-map/simple-map.mdx +8 -8
  128. package/components/ui/simple-map/simple-map.stories.tsx +48 -48
  129. package/components/ui/skeleton/skeleton.mdx +8 -8
  130. package/components/ui/slider/slider.mdx +8 -8
  131. package/components/ui/sonner/sonner.mdx +8 -8
  132. package/components/ui/stats-card/stats-card.mdx +8 -8
  133. package/components/ui/stepper/index.ts +3 -1
  134. package/components/ui/stepper/stepper.mdx +8 -8
  135. package/components/ui/stepper/stepper.stories.tsx +116 -0
  136. package/components/ui/stepper/stepper.tsx +4 -4
  137. package/components/ui/stepper/use-stepper.ts +137 -0
  138. package/components/ui/switch/switch.mdx +8 -8
  139. package/components/ui/switch/switch.stories.tsx +20 -20
  140. package/components/ui/table/table.mdx +8 -8
  141. package/components/ui/tabs/tabs.mdx +8 -8
  142. package/components/ui/tabs/tabs.stories.tsx +26 -26
  143. package/components/ui/textarea/textarea.mdx +8 -8
  144. package/components/ui/timeline/timeline.mdx +8 -8
  145. package/components/ui/toggle/toggle.mdx +8 -8
  146. package/components/ui/toggle-group/toggle-group.mdx +8 -8
  147. package/components/ui/tooltip/tooltip.mdx +8 -8
  148. package/components/ui/tree-view/index.ts +4 -1
  149. package/components/ui/tree-view/tree-view.mdx +8 -8
  150. package/components/ui/tree-view/tree-view.stories.tsx +110 -4
  151. package/components/ui/tree-view/tree-view.tsx +17 -125
  152. package/components/ui/tree-view/use-tree-view.ts +229 -0
  153. package/components.json +1512 -1512
  154. package/contexts/ApiKeyContext.tsx +72 -72
  155. package/contexts/BrandColorsContext.tsx +26 -26
  156. package/contexts/LanguageContext.tsx +13 -13
  157. package/contexts/LayoutContext.test.tsx +11 -11
  158. package/contexts/LayoutContext.tsx +29 -29
  159. package/contexts/ThemeContext.tsx +26 -26
  160. package/contexts/theme-data.ts +4 -4
  161. package/dist/{AssistantChart-CVzmmhx4.js → AssistantChart-C_hwFRRr.js} +4 -4
  162. package/dist/{AssistantChart-BAx9VQvb.cjs → AssistantChart-CldVCVDe.cjs} +311 -94
  163. package/dist/{AssistantChart-CVko2A1W.js → AssistantChart-Cu3m7RBo.js} +314 -97
  164. package/dist/{AssistantChart-9w31gdAb.cjs → AssistantChart-DoZCyS5r.cjs} +4 -4
  165. package/dist/AudioPlayer-B1lt5cPl.cjs +989 -0
  166. package/dist/AudioPlayer-BZ7bibzU.cjs +982 -0
  167. package/dist/AudioPlayer-C12BjQBV.cjs +997 -0
  168. package/dist/AudioPlayer-DMcG_c7L.js +990 -0
  169. package/dist/AudioPlayer-DcFKRJE_.js +998 -0
  170. package/dist/AudioPlayer-e8LfNoqO.js +983 -0
  171. package/dist/{xertica-assistant-Qp3ydksa.cjs → CodeBlock-7TTgmdGG.cjs} +263 -51
  172. package/dist/{xertica-assistant-gnCJdcZY.js → CodeBlock-BeSt1h5P.js} +219 -7
  173. package/dist/CodeBlock-BgfYL_rD.cjs +2094 -0
  174. package/dist/CodeBlock-BlcqlA9M.cjs +2094 -0
  175. package/dist/CodeBlock-Bnmeu5ez.cjs +2094 -0
  176. package/dist/CodeBlock-BtfPlbAI.js +2078 -0
  177. package/dist/CodeBlock-CIySIuYr.js +2078 -0
  178. package/dist/CodeBlock-CuPtUM-7.cjs +2094 -0
  179. package/dist/CodeBlock-D6ffWXgc.js +2078 -0
  180. package/dist/CodeBlock-D8dcwbit.cjs +2094 -0
  181. package/dist/CodeBlock-DMZrFnlw.cjs +2094 -0
  182. package/dist/CodeBlock-DlBehYN8.js +2078 -0
  183. package/dist/CodeBlock-DnYNI8rQ.js +2078 -0
  184. package/dist/CodeBlock-DvKWbSnE.cjs +2094 -0
  185. package/dist/CodeBlock-DwMCfkFY.js +2078 -0
  186. package/dist/CodeBlock-Dy6CNYyj.js +2078 -0
  187. package/dist/CodeBlock-U1pPOQI7.cjs +2094 -0
  188. package/dist/CodeBlock-f_GpNhEB.js +2078 -0
  189. package/dist/CodeBlock-oB6u8nI1.js +2078 -0
  190. package/dist/CodeBlock-tZC31B73.cjs +2094 -0
  191. package/dist/ImageWithFallback-CGtidP6B.cjs +4542 -0
  192. package/dist/ImageWithFallback-lsg3pdFg.js +4508 -0
  193. package/dist/LanguageSelector-B5YfbHra.js +231 -0
  194. package/dist/LanguageSelector-D6uacAIM.cjs +230 -0
  195. package/dist/LayoutContext-BAql6ZRY.js +97 -0
  196. package/dist/LayoutContext-BvK-ggDa.cjs +96 -0
  197. package/dist/ThemeContext-BoH4NLfN.js +734 -0
  198. package/dist/{ThemeContext-BbBNoFTG.js → ThemeContext-C2EwAPDt.js} +2 -2
  199. package/dist/ThemeContext-r69W20Xg.cjs +733 -0
  200. package/dist/{ThemeContext-Cmr8Ex8H.cjs → ThemeContext-vTjumZeM.cjs} +2 -2
  201. package/dist/{VerifyEmailPage-BE-L9mB7.js → VerifyEmailPage-C0c2e5n0.js} +7 -7
  202. package/dist/{VerifyEmailPage-DMBh4NM9.cjs → VerifyEmailPage-CYXtbKi3.cjs} +1 -1
  203. package/dist/{VerifyEmailPage-CR7kb5df.cjs → VerifyEmailPage-Cwi3kbol.cjs} +7 -7
  204. package/dist/{VerifyEmailPage-CdYPSJoO.js → VerifyEmailPage-DvMLZgFt.js} +1 -1
  205. package/dist/XerticaOrbe-KL1RBHzw.cjs +1354 -0
  206. package/dist/XerticaOrbe-zwS1p2a8.js +1355 -0
  207. package/dist/XerticaProvider-6btlAlzc.js +17 -0
  208. package/dist/XerticaProvider-BNoNOxQ5.cjs +16 -0
  209. package/dist/XerticaProvider-BlY2limY.cjs +38 -0
  210. package/dist/{XerticaProvider-BITjgC5p.js → XerticaProvider-CEoWMTxu.js} +2 -2
  211. package/dist/{XerticaProvider-By8q3Roe.cjs → XerticaProvider-CllrbMEJ.cjs} +2 -2
  212. package/dist/XerticaProvider-DDuiIcKo.js +39 -0
  213. package/dist/XerticaProvider-cI9hSs27.cjs +38 -0
  214. package/dist/XerticaProvider-hSwhNQex.js +39 -0
  215. package/dist/{alert-dialog-yckpaOpy.cjs → alert-dialog-DSKByiKZ.cjs} +3 -3
  216. package/dist/{alert-dialog-iDe5VE5o.js → alert-dialog-s-vmNkJ_.js} +3 -3
  217. package/dist/assistant.cjs.js +2 -1
  218. package/dist/assistant.es.js +3 -2
  219. package/dist/brand.cjs.js +1 -1
  220. package/dist/brand.es.js +1 -1
  221. package/dist/breadcrumb-CqJ7bHY5.js +161 -0
  222. package/dist/breadcrumb-m9Hb2_XN.cjs +177 -0
  223. package/dist/cli.js +14 -8
  224. package/dist/components/assistant/xertica-assistant/index.d.ts +2 -0
  225. package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +126 -0
  226. package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +7 -2
  227. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
  228. package/dist/components/blocks/audio-player/index.d.ts +1 -0
  229. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
  230. package/dist/components/blocks/document-editor/index.d.ts +1 -0
  231. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
  232. package/dist/components/blocks/podcast-player/index.d.ts +1 -0
  233. package/dist/components/layout/sidebar/index.d.ts +2 -0
  234. package/dist/components/layout/sidebar/sidebar.d.ts +80 -0
  235. package/dist/components/layout/sidebar/use-sidebar.d.ts +22 -0
  236. package/dist/components/shared/layout-constants.d.ts +1 -1
  237. package/dist/components/ui/button/button.d.ts +1 -1
  238. package/dist/components/ui/chart/chart.d.ts +162 -5
  239. package/dist/components/ui/file-upload/file-upload.d.ts +2 -0
  240. package/dist/components/ui/file-upload/index.d.ts +1 -0
  241. package/dist/components/ui/file-upload/use-file-upload.d.ts +49 -0
  242. package/dist/components/ui/pagination/index.d.ts +2 -0
  243. package/dist/components/ui/pagination/use-pagination.d.ts +78 -0
  244. package/dist/components/ui/rich-text-editor/index.d.ts +2 -0
  245. package/dist/components/ui/rich-text-editor/use-rich-text-editor.d.ts +107 -0
  246. package/dist/components/ui/stepper/index.d.ts +3 -1
  247. package/dist/components/ui/stepper/stepper.d.ts +2 -2
  248. package/dist/components/ui/stepper/use-stepper.d.ts +60 -0
  249. package/dist/components/ui/tree-view/index.d.ts +4 -1
  250. package/dist/components/ui/tree-view/tree-view.d.ts +4 -6
  251. package/dist/components/ui/tree-view/use-tree-view.d.ts +60 -0
  252. package/dist/dropdown-menu-BDB5CmQs.cjs +247 -0
  253. package/dist/dropdown-menu-DQidbKBD.js +231 -0
  254. package/dist/google-maps-loader-BFWp6VPd.js +287 -0
  255. package/dist/{google-maps-loader-t2IlYBzw.js → google-maps-loader-CTYySAun.js} +4 -0
  256. package/dist/{google-maps-loader-BqsYL48U.cjs → google-maps-loader-Y-QkD-Li.cjs} +5 -0
  257. package/dist/google-maps-loader-eS3uQ5TA.cjs +287 -0
  258. package/dist/header-Cgy6vYPk.cjs +731 -0
  259. package/dist/header-DRlT4jgI.js +715 -0
  260. package/dist/header-Dux00SI4.cjs +731 -0
  261. package/dist/header-EkGKXPsD.js +715 -0
  262. package/dist/header-WfEywpyc.cjs +731 -0
  263. package/dist/header-tifNQn2U.js +715 -0
  264. package/dist/hooks.cjs.js +1 -1
  265. package/dist/hooks.es.js +1 -1
  266. package/dist/index-BhapVLVj.js +8 -0
  267. package/dist/{index-D3RLKRAs.cjs → index-COtD8bRW.cjs} +1 -1
  268. package/dist/index-D6fxYEY8.cjs +7 -0
  269. package/dist/index-DW5tYe26.js +8 -0
  270. package/dist/index.cjs.js +19 -8
  271. package/dist/index.es.js +39 -28
  272. package/dist/index.umd.js +1043 -470
  273. package/dist/input-2R4loU86.js +127 -0
  274. package/dist/input-DWANSKGb.cjs +145 -0
  275. package/dist/layout.cjs.js +89 -1
  276. package/dist/layout.es.js +90 -2
  277. package/dist/pages.cjs.js +1 -1
  278. package/dist/pages.es.js +1 -1
  279. package/dist/rich-text-editor-0mraWT5y.cjs +2376 -0
  280. package/dist/rich-text-editor-B6jMRLzk.cjs +1939 -0
  281. package/dist/rich-text-editor-B8_oYcIR.js +1730 -0
  282. package/dist/rich-text-editor-B9UbSXNb.js +1203 -0
  283. package/dist/rich-text-editor-BYuRBNBU.js +2373 -0
  284. package/dist/rich-text-editor-Bb9pySTs.cjs +2374 -0
  285. package/dist/rich-text-editor-BcL6L3cm.cjs +2374 -0
  286. package/dist/rich-text-editor-BoVZYtTs.cjs +2391 -0
  287. package/dist/rich-text-editor-CPV1lEPH.cjs +1748 -0
  288. package/dist/rich-text-editor-CoKqbCtu.cjs +1799 -0
  289. package/dist/rich-text-editor-Cw56T_mB.js +2356 -0
  290. package/dist/rich-text-editor-Cyt8qs2b.js +1921 -0
  291. package/dist/rich-text-editor-D6H84OcX.cjs +1220 -0
  292. package/dist/rich-text-editor-D76gD-QI.js +2328 -0
  293. package/dist/rich-text-editor-DKkokOnA.js +1781 -0
  294. package/dist/rich-text-editor-DNsdpN64.cjs +2359 -0
  295. package/dist/rich-text-editor-DfG8bCyY.js +2358 -0
  296. package/dist/rich-text-editor-DgF8s7xW.js +2949 -0
  297. package/dist/rich-text-editor-Dxjw31Z4.js +2341 -0
  298. package/dist/rich-text-editor-DzP0Epmb.js +2356 -0
  299. package/dist/rich-text-editor-mWoaSCE4.cjs +2966 -0
  300. package/dist/rich-text-editor-skplNlBM.cjs +2345 -0
  301. package/dist/select-Bkbr0f-Z.cjs +162 -0
  302. package/dist/select-CvIVdX2n.js +145 -0
  303. package/dist/sidebar-CK_0ZQHj.cjs +803 -0
  304. package/dist/sidebar-CUuOvYhK.js +787 -0
  305. package/dist/slider-Bc5Hd0y1.js +56 -0
  306. package/dist/slider-N7hFFj6X.cjs +73 -0
  307. package/dist/tooltip-Ded96neP.cjs +137 -0
  308. package/dist/tooltip-HDOoD2-0.js +120 -0
  309. package/dist/ui.cjs.js +14 -4
  310. package/dist/ui.es.js +26 -16
  311. package/dist/use-mobile-B0hNy_Y6.cjs +4303 -0
  312. package/dist/use-mobile-BXuYROXM.js +4202 -0
  313. package/dist/use-mobile-Bbd51ASU.cjs +4392 -0
  314. package/dist/use-mobile-Bk6CX-TC.js +4359 -0
  315. package/dist/use-mobile-BvYdisLP.js +4202 -0
  316. package/dist/use-mobile-BzuxjzNX.cjs +4392 -0
  317. package/dist/use-mobile-CG2-SdXV.cjs +4235 -0
  318. package/dist/use-mobile-CKb5pqTs.js +4269 -0
  319. package/dist/use-mobile-CYuAuGDl.js +4202 -0
  320. package/dist/use-mobile-CaENcqm-.js +4508 -0
  321. package/dist/use-mobile-CbrYgJGJ.js +4203 -0
  322. package/dist/use-mobile-DMOvImGQ.cjs +4542 -0
  323. package/dist/use-mobile-DRB3BQgD.cjs +4235 -0
  324. package/dist/use-mobile-DZvv7QMR.js +4359 -0
  325. package/dist/use-mobile-DdI_TXam.cjs +4235 -0
  326. package/dist/use-mobile-DlceKf8a.js +4359 -0
  327. package/dist/use-mobile-DsOnow1o.cjs +4236 -0
  328. package/dist/use-mobile-Kcj6jSnK.cjs +4392 -0
  329. package/dist/use-mobile-bnKcua_i.js +4202 -0
  330. package/dist/use-mobile-ncXBeE2z.cjs +4235 -0
  331. package/dist/{xertica-assistant-B1IaHXnB.cjs → xertica-assistant-dyP7KHM5.cjs} +533 -392
  332. package/dist/{xertica-assistant-DPsESB6t.js → xertica-assistant-yX1CFBBo.js} +535 -394
  333. package/dist/xertica-ui.css +2 -2
  334. package/docs/ai-usage.md +28 -10
  335. package/docs/architecture.md +76 -0
  336. package/docs/components/assistant.md +159 -0
  337. package/docs/components/calendar.md +154 -154
  338. package/docs/components/card-patterns.md +337 -337
  339. package/docs/components/card.md +235 -235
  340. package/docs/components/chart.md +354 -39
  341. package/docs/components/file-upload.md +119 -2
  342. package/docs/components/map.md +84 -84
  343. package/docs/components/pagination.md +187 -0
  344. package/docs/components/rich-text-editor.md +164 -0
  345. package/docs/components/sidebar.md +153 -4
  346. package/docs/components/stepper.md +157 -12
  347. package/docs/components/tree-view.md +164 -6
  348. package/docs/components/xertica-provider.md +24 -24
  349. package/docs/decision-tree.md +287 -287
  350. package/docs/getting-started.md +1 -1
  351. package/docs/guidelines.md +14 -8
  352. package/docs/layout.md +2 -2
  353. package/docs/llms.md +4 -4
  354. package/guidelines/Guidelines.md +252 -250
  355. package/hooks/useTheme.ts +3 -3
  356. package/imports/Podcast.tsx +388 -388
  357. package/imports/XerticaAi.tsx +45 -45
  358. package/imports/XerticaX.tsx +19 -19
  359. package/imports/svg-aueiaqngck.ts +11 -11
  360. package/imports/svg-v9krss1ozd.ts +16 -16
  361. package/imports/svg-vhrdofe3qe.ts +5 -5
  362. package/llms-compact.txt +327 -327
  363. package/llms.txt +160 -160
  364. package/package.json +203 -203
  365. package/styles/xertica/app-overrides/chat.css +61 -61
  366. package/styles/xertica/app-overrides/scrollbar.css +33 -33
  367. package/styles/xertica/integrations/google-maps.css +76 -76
  368. package/styles/xertica/integrations/sonner.css +73 -73
  369. package/styles/xertica/tokens.css +41 -12
  370. package/templates/CLAUDE.md +182 -172
  371. package/templates/guidelines/Guidelines.md +325 -313
  372. package/templates/package.json +3 -3
  373. package/templates/src/features/auth/index.ts +4 -4
  374. package/templates/src/features/auth/ui/AuthPageShell.tsx +34 -34
  375. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
  376. package/templates/src/features/auth/ui/LoginContent.tsx +90 -90
  377. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +151 -151
  378. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +59 -59
  379. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +82 -82
  380. package/templates/src/features/home/index.ts +1 -1
  381. package/templates/src/features/home/ui/HomeContent.tsx +100 -100
  382. package/templates/src/features/template/index.ts +5 -5
  383. package/templates/src/features/template/ui/CrudTemplate.tsx +3 -3
  384. package/templates/src/features/template/ui/DashboardTemplate.tsx +3 -3
  385. package/templates/src/features/template/ui/FormTemplate.tsx +120 -120
  386. package/templates/src/features/template/ui/LoginTemplate.tsx +3 -3
  387. package/templates/src/pages/AssistantPage.tsx +328 -328
  388. package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
  389. package/templates/src/pages/HomePage.tsx +57 -57
  390. package/templates/src/pages/LoginPage.tsx +10 -10
  391. package/templates/src/pages/ResetPasswordPage.tsx +6 -6
  392. package/templates/src/pages/TemplatePage.tsx +30 -30
  393. package/templates/src/pages/VerifyEmailPage.tsx +6 -6
  394. package/templates/src/shared/config/navigation.ts +20 -20
  395. package/templates/src/shared/lib/auth.ts +20 -20
  396. package/templates/src/shared/types/auth.ts +3 -3
  397. package/templates/src/styles/xertica/tokens.css +39 -10
  398. package/templates/tsconfig.json +5 -5
  399. package/utils/gemini.ts +140 -140
  400. package/dist/VerifyEmailPage-Bae2cBXT.cjs +0 -2827
  401. package/dist/VerifyEmailPage-CbgjOF0v.js +0 -2828
  402. package/dist/index-CkTUgOwX.js +0 -8
@@ -1,6 +1,6 @@
1
- # XerticaProvider
2
-
3
- The recommended root wrapper for Xertica UI applications. Most components can render independently with local fallbacks, but the provider centralizes app-wide state, theming, maps, tooltips, assistant state, API keys, and notifications.
1
+ # XerticaProvider
2
+
3
+ The recommended root wrapper for Xertica UI applications. Most components can render independently with local fallbacks, but the provider centralizes app-wide state, theming, maps, tooltips, assistant state, API keys, and notifications.
4
4
 
5
5
  ---
6
6
 
@@ -31,34 +31,34 @@ function Root() {
31
31
 
32
32
  ## Props
33
33
 
34
- | Prop | Type | Default | Description |
35
- |---|---|---|---|
36
- | `children`| `ReactNode`| _(required)_ | The entrypoint of your application. |
37
- | `apiKey` | `string` | - | Initial Gemini/AI key forwarded to `ApiKeyProvider`. |
38
- | `googleMapsApiKey` | `string` | - | Initial Google Maps JavaScript API key. |
39
- | `defaultBrandTheme` | `string` | - | Initial brand color theme id. |
40
- | `primaryColor` | `string` | - | Primary brand color override. |
41
- | `useCustomTokens` | `boolean` | `false` | Skips runtime brand token injection when the host app owns tokens. |
42
- | `disableDarkMode` | `boolean` | `false` | Forces light mode and disables dark-mode toggling from the theme provider. |
34
+ | Prop | Type | Default | Description |
35
+ |---|---|---|---|
36
+ | `children`| `ReactNode`| _(required)_ | The entrypoint of your application. |
37
+ | `apiKey` | `string` | - | Initial Gemini/AI key forwarded to `ApiKeyProvider`. |
38
+ | `googleMapsApiKey` | `string` | - | Initial Google Maps JavaScript API key. |
39
+ | `defaultBrandTheme` | `string` | - | Initial brand color theme id. |
40
+ | `primaryColor` | `string` | - | Primary brand color override. |
41
+ | `useCustomTokens` | `boolean` | `false` | Skips runtime brand token injection when the host app owns tokens. |
42
+ | `disableDarkMode` | `boolean` | `false` | Forces light mode and disables dark-mode toggling from the theme provider. |
43
43
 
44
44
  ---
45
45
 
46
46
  ## Included Services
47
47
 
48
- - **ThemeProvider**: Manages light/dark mode with browser-safe storage.
49
- - **BrandColorsProvider**: Applies runtime brand colors when custom tokens are not used.
50
- - **LanguageProvider**: Stores the selected UI language.
51
- - **ApiKeyProvider**: Stores AI and Google Maps API keys.
52
- - **AssistenteProvider**: Provides shared assistant conversation state.
53
- - **LayoutContext**: Manages `sidebarWidth` and expanded states globally.
54
- - **TooltipProvider**: Enables Radix-based tooltips with consistent delays.
55
- - **GoogleMapsLoader**: Manages the lifecycle of the Google Maps JS SDK.
56
- - **Sonner Toaster**: Injects a high-performance toast notification system.
48
+ - **ThemeProvider**: Manages light/dark mode with browser-safe storage.
49
+ - **BrandColorsProvider**: Applies runtime brand colors when custom tokens are not used.
50
+ - **LanguageProvider**: Stores the selected UI language.
51
+ - **ApiKeyProvider**: Stores AI and Google Maps API keys.
52
+ - **AssistenteProvider**: Provides shared assistant conversation state.
53
+ - **LayoutContext**: Manages `sidebarWidth` and expanded states globally.
54
+ - **TooltipProvider**: Enables Radix-based tooltips with consistent delays.
55
+ - **GoogleMapsLoader**: Manages the lifecycle of the Google Maps JS SDK.
56
+ - **Sonner Toaster**: Injects a high-performance toast notification system.
57
57
 
58
58
  ---
59
59
 
60
60
  ## AI Rules
61
61
 
62
- > [!IMPORTANT]
63
- > - **CSS Requirement**: Always remind users to import `xertica-ui/style.css` alongside the provider to avoid unstyled content.
64
- > - **Independence Contract**: UI, layout, media, and assistant components should render without this provider when possible. Use the provider at the app root for synchronized state and shared services.
62
+ > [!IMPORTANT]
63
+ > - **CSS Requirement**: Always remind users to import `xertica-ui/style.css` alongside the provider to avoid unstyled content.
64
+ > - **Independence Contract**: UI, layout, media, and assistant components should render without this provider when possible. Use the provider at the app root for synchronized state and shared services.
@@ -1,287 +1,287 @@
1
- # Component Decision Guide — Xertica UI
2
-
3
- Use this file when you need to choose between components that serve similar purposes. Each tree ends in a ✅ recommendation.
4
-
5
- ---
6
-
7
- ## Overlays & Modals
8
-
9
- **"I need to show content over the current page"**
10
-
11
- ```
12
- Does the user MUST confirm or cancel before proceeding?
13
- ├── YES → Use AlertDialog
14
- │ (blocking, cannot dismiss by clicking outside)
15
-
16
- └── NO → Is it a destructive action without a form?
17
- ├── YES → Use AlertDialog (always confirm destructive actions)
18
-
19
- └── NO → Does it need to be wide / have a scrollable form?
20
- ├── YES (wide form, detail view) → Use Sheet (side-anchored)
21
- │ variant="right" for editing, variant="left" for nav drawers
22
-
23
- ├── YES (mobile, bottom action) → Use Drawer
24
- │ (slides from bottom, mobile-optimized)
25
-
26
- └── NO (compact modal) → Use Dialog
27
- (centered, dismissible, for forms and confirmations)
28
- ```
29
-
30
- **Quick rule:**
31
- | Scenario | Component |
32
- |---|---|
33
- | "Are you sure you want to delete?" | `AlertDialog` |
34
- | Edit form in overlay | `Dialog` (small) or `Sheet` (large) |
35
- | Filter panel on mobile | `Drawer` |
36
- | Settings panel from the right | `Sheet variant="right"` |
37
- | File upload modal | `Dialog` |
38
-
39
- ---
40
-
41
- ## Floating Panels
42
-
43
- **"I need something to appear anchored to an element"**
44
-
45
- ```
46
- Is the content SHORT (1–2 lines, text-only)?
47
- ├── YES → Does it appear on hover (no interaction needed)?
48
- │ ├── YES → Use Tooltip
49
- │ │ (for icon buttons, abbreviated labels)
50
- │ └── NO → Use Tooltip (still — if it's just a label)
51
-
52
- └── NO → Does it contain interactive elements (forms, buttons, links)?
53
- ├── YES → Use Popover
54
- │ (date pickers, filter panels, color pickers)
55
- └── NO → Does it appear on hover (read-only rich content)?
56
- ├── YES → Use HoverCard
57
- │ (user profile previews, link previews, image thumbnails)
58
- └── NO (triggered by click, read-only) → Use Popover
59
- ```
60
-
61
- **Quick rule:**
62
- | Scenario | Component |
63
- |---|---|
64
- | "Open settings" icon button label | `Tooltip` |
65
- | User avatar → show profile card on hover | `HoverCard` |
66
- | Date picker | `Calendar` inside `Popover` |
67
- | Filter options panel | `Popover` |
68
- | Search suggestions | `Command` inside `Popover` |
69
-
70
- ---
71
-
72
- ## Feedback & Notifications
73
-
74
- **"I need to communicate something to the user"**
75
-
76
- ```
77
- Is the message EPHEMERAL (auto-dismisses after a few seconds)?
78
- ├── YES → Use toast() from sonner
79
- │ toast.success() / toast.error() / toast.info() / toast.warning()
80
-
81
- └── NO → Is it BLOCKING (user must act before continuing)?
82
- ├── YES + DESTRUCTIVE → Use AlertDialog
83
- ├── YES + INFORMATIONAL → Use Dialog
84
-
85
- └── NO (persistent, inline, part of the page) → Use Alert
86
- variant="default" / "destructive" / "warning" / "info" / "success"
87
- ```
88
-
89
- **Quick rule:**
90
- | Scenario | Component |
91
- |---|---|
92
- | "Saved successfully" | `toast.success()` |
93
- | "Error: server unavailable" | `toast.error()` |
94
- | "This action will delete 50 records" | `AlertDialog` |
95
- | "Your trial expires in 3 days" (in-page) | `Alert variant="warning"` |
96
- | "Complete your profile" banner | `Alert variant="info"` |
97
-
98
- ---
99
-
100
- ## Navigation
101
-
102
- **"I need navigation controls"**
103
-
104
- ```
105
- Is this the PRIMARY app navigation (always visible, vertical)?
106
- ├── YES → Use Sidebar
107
- │ (supports routes, groups, assistant mode)
108
-
109
- └── NO → Is it showing the user's LOCATION in the hierarchy?
110
- ├── YES → Use Breadcrumb (inside Header via breadcrumbs prop)
111
-
112
- └── NO → Is it HORIZONTAL top-level navigation?
113
- ├── YES (marketing / top sections) → Use NavigationMenu
114
-
115
- └── NO → Is it switching between CONTENT SECTIONS on the same page?
116
- ├── YES → Use Tabs
117
- └── NO (step-by-step flow) → Use Stepper
118
- ```
119
-
120
- **Quick rule:**
121
- | Scenario | Component |
122
- |---|---|
123
- | App sidebar (Home, Settings, Users) | `Sidebar` |
124
- | Home / Users / João Silva (where am I?) | `Breadcrumb` via `Header` |
125
- | Dashboard / Analytics / Reports (page tabs) | `Tabs` |
126
- | Step 1 → Step 2 → Step 3 (wizard) | `Stepper` |
127
- | Marketing nav (Features, Pricing, Docs) | `NavigationMenu` |
128
-
129
- ---
130
-
131
- ## Form Inputs
132
-
133
- **"I need the user to enter data"**
134
-
135
- ```
136
- Single line of text?
137
- ├── YES → Is it specifically a search query with clear/icon?
138
- │ ├── YES → Use Search
139
- │ └── NO → Use Input
140
-
141
- └── NO → Multiple lines / longer content?
142
- ├── YES → Needs rich formatting (bold, lists)?
143
- │ ├── YES → Use RichTextEditor
144
- │ └── NO → Use Textarea
145
-
146
- └── NO → Choosing from a list of options?
147
- ├── 1 of many (short list, all visible) → Use RadioGroup
148
- ├── 1 of many (long list, searchable) → Use Select or Command
149
- ├── Multiple of many → Use Checkbox group
150
- └── ON/OFF single option → Use Switch (prominent) or Checkbox (subtle)
151
- ```
152
-
153
- **Quick rule:**
154
- | Scenario | Component |
155
- |---|---|
156
- | Name, email, phone | `Input` |
157
- | Message, description, notes | `Textarea` |
158
- | Status (Active / Inactive / Pending) | `Select` |
159
- | Enable notifications (yes/no) | `Switch` |
160
- | Agree to terms (tick box) | `Checkbox` |
161
- | Choose role (Admin / Editor / Viewer) | `RadioGroup` |
162
- | Date of birth | `Calendar` inside `Popover` |
163
- | OTP / 2FA code | `InputOTP` |
164
- | Attach a file | `FileUpload` |
165
- | Range / volume | `Slider` |
166
- | Search with autocomplete | `Command` |
167
-
168
- ---
169
-
170
- ## Toggle Controls
171
-
172
- **"I need a button that stays pressed/active"**
173
-
174
- ```
175
- Is it a persistent setting that applies immediately (on/off)?
176
- ├── YES → Is it prominent (its own row in settings)?
177
- │ ├── YES → Use Switch
178
- │ └── NO (subtle, next to a label) → Use Checkbox
179
-
180
- └── NO → Is it part of a TOOLBAR (formatting, view modes)?
181
- ├── Single toggle → Use Toggle
182
- └── Group of related options → Use ToggleGroup
183
- ├── type="single" (one active at a time, like view mode)
184
- └── type="multiple" (multi-select, like formatting Bold+Italic)
185
- ```
186
-
187
- ---
188
-
189
- ## Loading States
190
-
191
- **"Data is loading"**
192
-
193
- ```
194
- Do you know the completion percentage?
195
- ├── YES → Use Progress
196
-
197
- └── NO → Is it the whole page/card loading?
198
- ├── YES → Use Skeleton (mimic the shape of the content)
199
- └── NO (small spinner inline) → Use Button loading prop or custom spinner
200
- ```
201
-
202
- ---
203
-
204
- ## Data Display
205
-
206
- **"I need to show a collection of records"**
207
-
208
- ```
209
- Is it structured tabular data with columns?
210
- ├── YES → Use Table + Pagination
211
-
212
- └── NO → Is it a chronological sequence of events?
213
- ├── YES → Use Timeline
214
-
215
- └── NO → Is it KPI metrics / numbers?
216
- ├── YES → Use StatsCard
217
-
218
- └── NO → Is the collection empty?
219
- └── YES → Use Empty (never show blank space)
220
- ```
221
-
222
- ---
223
-
224
- ## Media
225
-
226
- **"I need to display audio or video"**
227
-
228
- ```
229
- Is it VIDEO?
230
- ├── YES → Use VideoPlayer
231
- │ (custom controls, floating mode, full HTML5 video)
232
-
233
- └── NO (AUDIO) → Is it a global player (persists across pages)?
234
- ├── YES → Use AudioPlayer variant="bar"
235
- └── NO (embedded in a card) → Use AudioPlayer variant="card"
236
-
237
- Both players support FloatingMediaWrapper for picture-in-picture.
238
- ```
239
-
240
- ---
241
-
242
- ## Choosing Between Similar Components
243
-
244
- ### Dialog vs AlertDialog
245
- | | Dialog | AlertDialog |
246
- |---|---|---|
247
- | Dismissible by clicking outside | ✅ yes | ❌ no |
248
- | Required before destructive action | ❌ optional | ✅ mandatory |
249
- | Can contain forms | ✅ yes | ✅ yes |
250
- | Use case | Edit, detail view, create | Delete, revoke, reset |
251
-
252
- ### Sheet vs Dialog
253
- | | Sheet | Dialog |
254
- |---|---|---|
255
- | Position | Edge-anchored (right/left/top/bottom) | Centered |
256
- | Best for | Large forms, detail panels, navigation | Compact confirmations, small forms |
257
- | Mobile | Less ideal | Better |
258
-
259
- ### Tooltip vs HoverCard vs Popover
260
- | | Tooltip | HoverCard | Popover |
261
- |---|---|---|---|
262
- | Trigger | Hover / Focus | Hover | Click |
263
- | Content | Short text | Rich read-only (profile, preview) | Interactive (form, picker) |
264
- | Dismissal | Auto (mouse leave) | Auto (mouse leave) | Click outside |
265
-
266
- ### Switch vs Checkbox
267
- | | Switch | Checkbox |
268
- |---|---|---|
269
- | Visual weight | High (prominent) | Low (subtle) |
270
- | Best for | Feature toggles, settings that apply immediately | Multi-select lists, form agreements |
271
- | Has label? | Usually standalone label in a row | Always paired with inline label |
272
-
273
- ### Sonner (Toast) vs Alert
274
- | | Sonner | Alert |
275
- |---|---|---|
276
- | Duration | Ephemeral (auto-dismiss) | Persistent (always visible) |
277
- | Position | Fixed corner of screen | Inline in page |
278
- | Use case | Action feedback | Status banners, warnings |
279
-
280
- ### Tabs vs Accordion vs Collapsible
281
- | | Tabs | Accordion | Collapsible |
282
- |---|---|---|---|
283
- | Shows one at a time | ✅ yes | ✅ yes (default) | n/a (single) |
284
- | Content always in DOM | ✅ yes | ❌ no | ❌ no |
285
- | Horizontal trigger | ✅ yes | ❌ vertical | ❌ vertical |
286
- | Multiple open | ❌ no | Optional | n/a |
287
- | Best for | Page sections, analytics views | FAQs, settings groups | Single optional section |
1
+ # Component Decision Guide — Xertica UI
2
+
3
+ Use this file when you need to choose between components that serve similar purposes. Each tree ends in a ✅ recommendation.
4
+
5
+ ---
6
+
7
+ ## Overlays & Modals
8
+
9
+ **"I need to show content over the current page"**
10
+
11
+ ```
12
+ Does the user MUST confirm or cancel before proceeding?
13
+ ├── YES → Use AlertDialog
14
+ │ (blocking, cannot dismiss by clicking outside)
15
+
16
+ └── NO → Is it a destructive action without a form?
17
+ ├── YES → Use AlertDialog (always confirm destructive actions)
18
+
19
+ └── NO → Does it need to be wide / have a scrollable form?
20
+ ├── YES (wide form, detail view) → Use Sheet (side-anchored)
21
+ │ variant="right" for editing, variant="left" for nav drawers
22
+
23
+ ├── YES (mobile, bottom action) → Use Drawer
24
+ │ (slides from bottom, mobile-optimized)
25
+
26
+ └── NO (compact modal) → Use Dialog
27
+ (centered, dismissible, for forms and confirmations)
28
+ ```
29
+
30
+ **Quick rule:**
31
+ | Scenario | Component |
32
+ |---|---|
33
+ | "Are you sure you want to delete?" | `AlertDialog` |
34
+ | Edit form in overlay | `Dialog` (small) or `Sheet` (large) |
35
+ | Filter panel on mobile | `Drawer` |
36
+ | Settings panel from the right | `Sheet variant="right"` |
37
+ | File upload modal | `Dialog` |
38
+
39
+ ---
40
+
41
+ ## Floating Panels
42
+
43
+ **"I need something to appear anchored to an element"**
44
+
45
+ ```
46
+ Is the content SHORT (1–2 lines, text-only)?
47
+ ├── YES → Does it appear on hover (no interaction needed)?
48
+ │ ├── YES → Use Tooltip
49
+ │ │ (for icon buttons, abbreviated labels)
50
+ │ └── NO → Use Tooltip (still — if it's just a label)
51
+
52
+ └── NO → Does it contain interactive elements (forms, buttons, links)?
53
+ ├── YES → Use Popover
54
+ │ (date pickers, filter panels, color pickers)
55
+ └── NO → Does it appear on hover (read-only rich content)?
56
+ ├── YES → Use HoverCard
57
+ │ (user profile previews, link previews, image thumbnails)
58
+ └── NO (triggered by click, read-only) → Use Popover
59
+ ```
60
+
61
+ **Quick rule:**
62
+ | Scenario | Component |
63
+ |---|---|
64
+ | "Open settings" icon button label | `Tooltip` |
65
+ | User avatar → show profile card on hover | `HoverCard` |
66
+ | Date picker | `Calendar` inside `Popover` |
67
+ | Filter options panel | `Popover` |
68
+ | Search suggestions | `Command` inside `Popover` |
69
+
70
+ ---
71
+
72
+ ## Feedback & Notifications
73
+
74
+ **"I need to communicate something to the user"**
75
+
76
+ ```
77
+ Is the message EPHEMERAL (auto-dismisses after a few seconds)?
78
+ ├── YES → Use toast() from sonner
79
+ │ toast.success() / toast.error() / toast.info() / toast.warning()
80
+
81
+ └── NO → Is it BLOCKING (user must act before continuing)?
82
+ ├── YES + DESTRUCTIVE → Use AlertDialog
83
+ ├── YES + INFORMATIONAL → Use Dialog
84
+
85
+ └── NO (persistent, inline, part of the page) → Use Alert
86
+ variant="default" / "destructive" / "warning" / "info" / "success"
87
+ ```
88
+
89
+ **Quick rule:**
90
+ | Scenario | Component |
91
+ |---|---|
92
+ | "Saved successfully" | `toast.success()` |
93
+ | "Error: server unavailable" | `toast.error()` |
94
+ | "This action will delete 50 records" | `AlertDialog` |
95
+ | "Your trial expires in 3 days" (in-page) | `Alert variant="warning"` |
96
+ | "Complete your profile" banner | `Alert variant="info"` |
97
+
98
+ ---
99
+
100
+ ## Navigation
101
+
102
+ **"I need navigation controls"**
103
+
104
+ ```
105
+ Is this the PRIMARY app navigation (always visible, vertical)?
106
+ ├── YES → Use Sidebar
107
+ │ (supports routes, groups, assistant mode)
108
+
109
+ └── NO → Is it showing the user's LOCATION in the hierarchy?
110
+ ├── YES → Use Breadcrumb (inside Header via breadcrumbs prop)
111
+
112
+ └── NO → Is it HORIZONTAL top-level navigation?
113
+ ├── YES (marketing / top sections) → Use NavigationMenu
114
+
115
+ └── NO → Is it switching between CONTENT SECTIONS on the same page?
116
+ ├── YES → Use Tabs
117
+ └── NO (step-by-step flow) → Use Stepper
118
+ ```
119
+
120
+ **Quick rule:**
121
+ | Scenario | Component |
122
+ |---|---|
123
+ | App sidebar (Home, Settings, Users) | `Sidebar` |
124
+ | Home / Users / João Silva (where am I?) | `Breadcrumb` via `Header` |
125
+ | Dashboard / Analytics / Reports (page tabs) | `Tabs` |
126
+ | Step 1 → Step 2 → Step 3 (wizard) | `Stepper` |
127
+ | Marketing nav (Features, Pricing, Docs) | `NavigationMenu` |
128
+
129
+ ---
130
+
131
+ ## Form Inputs
132
+
133
+ **"I need the user to enter data"**
134
+
135
+ ```
136
+ Single line of text?
137
+ ├── YES → Is it specifically a search query with clear/icon?
138
+ │ ├── YES → Use Search
139
+ │ └── NO → Use Input
140
+
141
+ └── NO → Multiple lines / longer content?
142
+ ├── YES → Needs rich formatting (bold, lists)?
143
+ │ ├── YES → Use RichTextEditor
144
+ │ └── NO → Use Textarea
145
+
146
+ └── NO → Choosing from a list of options?
147
+ ├── 1 of many (short list, all visible) → Use RadioGroup
148
+ ├── 1 of many (long list, searchable) → Use Select or Command
149
+ ├── Multiple of many → Use Checkbox group
150
+ └── ON/OFF single option → Use Switch (prominent) or Checkbox (subtle)
151
+ ```
152
+
153
+ **Quick rule:**
154
+ | Scenario | Component |
155
+ |---|---|
156
+ | Name, email, phone | `Input` |
157
+ | Message, description, notes | `Textarea` |
158
+ | Status (Active / Inactive / Pending) | `Select` |
159
+ | Enable notifications (yes/no) | `Switch` |
160
+ | Agree to terms (tick box) | `Checkbox` |
161
+ | Choose role (Admin / Editor / Viewer) | `RadioGroup` |
162
+ | Date of birth | `Calendar` inside `Popover` |
163
+ | OTP / 2FA code | `InputOTP` |
164
+ | Attach a file | `FileUpload` |
165
+ | Range / volume | `Slider` |
166
+ | Search with autocomplete | `Command` |
167
+
168
+ ---
169
+
170
+ ## Toggle Controls
171
+
172
+ **"I need a button that stays pressed/active"**
173
+
174
+ ```
175
+ Is it a persistent setting that applies immediately (on/off)?
176
+ ├── YES → Is it prominent (its own row in settings)?
177
+ │ ├── YES → Use Switch
178
+ │ └── NO (subtle, next to a label) → Use Checkbox
179
+
180
+ └── NO → Is it part of a TOOLBAR (formatting, view modes)?
181
+ ├── Single toggle → Use Toggle
182
+ └── Group of related options → Use ToggleGroup
183
+ ├── type="single" (one active at a time, like view mode)
184
+ └── type="multiple" (multi-select, like formatting Bold+Italic)
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Loading States
190
+
191
+ **"Data is loading"**
192
+
193
+ ```
194
+ Do you know the completion percentage?
195
+ ├── YES → Use Progress
196
+
197
+ └── NO → Is it the whole page/card loading?
198
+ ├── YES → Use Skeleton (mimic the shape of the content)
199
+ └── NO (small spinner inline) → Use Button loading prop or custom spinner
200
+ ```
201
+
202
+ ---
203
+
204
+ ## Data Display
205
+
206
+ **"I need to show a collection of records"**
207
+
208
+ ```
209
+ Is it structured tabular data with columns?
210
+ ├── YES → Use Table + Pagination
211
+
212
+ └── NO → Is it a chronological sequence of events?
213
+ ├── YES → Use Timeline
214
+
215
+ └── NO → Is it KPI metrics / numbers?
216
+ ├── YES → Use StatsCard
217
+
218
+ └── NO → Is the collection empty?
219
+ └── YES → Use Empty (never show blank space)
220
+ ```
221
+
222
+ ---
223
+
224
+ ## Media
225
+
226
+ **"I need to display audio or video"**
227
+
228
+ ```
229
+ Is it VIDEO?
230
+ ├── YES → Use VideoPlayer
231
+ │ (custom controls, floating mode, full HTML5 video)
232
+
233
+ └── NO (AUDIO) → Is it a global player (persists across pages)?
234
+ ├── YES → Use AudioPlayer variant="bar"
235
+ └── NO (embedded in a card) → Use AudioPlayer variant="card"
236
+
237
+ Both players support FloatingMediaWrapper for picture-in-picture.
238
+ ```
239
+
240
+ ---
241
+
242
+ ## Choosing Between Similar Components
243
+
244
+ ### Dialog vs AlertDialog
245
+ | | Dialog | AlertDialog |
246
+ |---|---|---|
247
+ | Dismissible by clicking outside | ✅ yes | ❌ no |
248
+ | Required before destructive action | ❌ optional | ✅ mandatory |
249
+ | Can contain forms | ✅ yes | ✅ yes |
250
+ | Use case | Edit, detail view, create | Delete, revoke, reset |
251
+
252
+ ### Sheet vs Dialog
253
+ | | Sheet | Dialog |
254
+ |---|---|---|
255
+ | Position | Edge-anchored (right/left/top/bottom) | Centered |
256
+ | Best for | Large forms, detail panels, navigation | Compact confirmations, small forms |
257
+ | Mobile | Less ideal | Better |
258
+
259
+ ### Tooltip vs HoverCard vs Popover
260
+ | | Tooltip | HoverCard | Popover |
261
+ |---|---|---|---|
262
+ | Trigger | Hover / Focus | Hover | Click |
263
+ | Content | Short text | Rich read-only (profile, preview) | Interactive (form, picker) |
264
+ | Dismissal | Auto (mouse leave) | Auto (mouse leave) | Click outside |
265
+
266
+ ### Switch vs Checkbox
267
+ | | Switch | Checkbox |
268
+ |---|---|---|
269
+ | Visual weight | High (prominent) | Low (subtle) |
270
+ | Best for | Feature toggles, settings that apply immediately | Multi-select lists, form agreements |
271
+ | Has label? | Usually standalone label in a row | Always paired with inline label |
272
+
273
+ ### Sonner (Toast) vs Alert
274
+ | | Sonner | Alert |
275
+ |---|---|---|
276
+ | Duration | Ephemeral (auto-dismiss) | Persistent (always visible) |
277
+ | Position | Fixed corner of screen | Inline in page |
278
+ | Use case | Action feedback | Status banners, warnings |
279
+
280
+ ### Tabs vs Accordion vs Collapsible
281
+ | | Tabs | Accordion | Collapsible |
282
+ |---|---|---|---|
283
+ | Shows one at a time | ✅ yes | ✅ yes (default) | n/a (single) |
284
+ | Content always in DOM | ✅ yes | ❌ no | ❌ no |
285
+ | Horizontal trigger | ✅ yes | ❌ vertical | ❌ vertical |
286
+ | Multiple open | ❌ no | Optional | n/a |
287
+ | Best for | Page sections, analytics views | FAQs, settings groups | Single optional section |
@@ -121,7 +121,7 @@ The design system is token-driven. All colors, radii, and shadows are controlled
121
121
  | `border-border` | Standard borders |
122
122
  | `border-input` | Form field borders |
123
123
 
124
- **Always use semantic tokens.** Never use raw hex values or generic Tailwind colors (`bg-blue-500`, `text-gray-700`).
124
+ **Always use semantic tokens for semantic/status contexts.** Never use raw hex values (`#3b82f6`, `rgb(...)`) in any context. For error, warning, success, and status states, always use semantic tokens (`bg-destructive`, `bg-success`, `bg-warning`, `text-muted-foreground`). For layout, spacing, and general non-semantic UI, standard Tailwind color utilities are acceptable.
125
125
 
126
126
  ### Dark Mode
127
127