xertica-ui 1.6.1 → 1.7.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 (574) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bin/cli.ts +3 -3
  3. package/bin/generate-tokens.ts +24 -0
  4. package/components/{CodeBlock.tsx → assistant/code-block/CodeBlock.tsx} +2 -1
  5. package/components/assistant/code-block/code-block.mdx +38 -0
  6. package/components/assistant/code-block/code-block.stories.tsx +57 -0
  7. package/components/assistant/code-block/index.ts +1 -0
  8. package/components/{FormattedDocument.tsx → assistant/formatted-document/FormattedDocument.tsx} +3 -3
  9. package/components/assistant/formatted-document/formatted-document.mdx +31 -0
  10. package/components/assistant/formatted-document/formatted-document.stories.tsx +51 -0
  11. package/components/assistant/formatted-document/index.ts +1 -0
  12. package/components/assistant/markdown-message/index.ts +1 -0
  13. package/components/assistant/markdown-message/markdown-message.mdx +44 -0
  14. package/components/assistant/markdown-message/markdown-message.stories.tsx +50 -0
  15. package/components/{ModernChatInput.tsx → assistant/modern-chat-input/ModernChatInput.tsx} +8 -2
  16. package/components/assistant/modern-chat-input/index.ts +1 -0
  17. package/components/assistant/modern-chat-input/modern-chat-input.mdx +38 -0
  18. package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +52 -0
  19. package/components/assistant/xertica-assistant/index.ts +1 -0
  20. package/components/assistant/xertica-assistant/xertica-assistant.mdx +39 -0
  21. package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +74 -0
  22. package/components/{ui → assistant/xertica-assistant}/xertica-assistant.tsx +28 -18
  23. package/components/{AudioPlayer.tsx → blocks/audio-player/AudioPlayer.tsx} +243 -225
  24. package/components/blocks/audio-player/audio-player.mdx +31 -0
  25. package/components/blocks/audio-player/audio-player.stories.tsx +36 -0
  26. package/components/blocks/audio-player/index.ts +1 -0
  27. package/components/{DocumentEditor.tsx → blocks/document-editor/DocumentEditor.tsx} +9 -2
  28. package/components/blocks/document-editor/document-editor.mdx +31 -0
  29. package/components/blocks/document-editor/document-editor.stories.tsx +38 -0
  30. package/components/blocks/document-editor/index.ts +1 -0
  31. package/components/{PodcastPlayer.tsx → blocks/podcast-player/PodcastPlayer.tsx} +105 -76
  32. package/components/blocks/podcast-player/index.ts +1 -0
  33. package/components/blocks/podcast-player/podcast-player.mdx +38 -0
  34. package/components/blocks/podcast-player/podcast-player.stories.tsx +55 -0
  35. package/components/brand/branding/branding.stories.tsx +55 -0
  36. package/components/brand/language-selector/LanguageSelector.tsx +61 -0
  37. package/components/brand/language-selector/index.ts +1 -0
  38. package/components/brand/language-selector/language-selector.mdx +57 -0
  39. package/components/brand/language-selector/language-selector.stories.tsx +28 -0
  40. package/components/{ThemeToggle.tsx → brand/theme-toggle/ThemeToggle.tsx} +84 -84
  41. package/components/brand/theme-toggle/index.ts +1 -0
  42. package/components/brand/theme-toggle/theme-toggle.mdx +47 -0
  43. package/components/brand/theme-toggle/theme-toggle.stories.tsx +34 -0
  44. package/components/{XerticaLogo.tsx → brand/xertica-logo/XerticaLogo.tsx} +1 -0
  45. package/components/brand/xertica-logo/index.ts +1 -0
  46. package/components/{XerticaOrbe.tsx → brand/xertica-orbe/XerticaOrbe.tsx} +2 -1
  47. package/components/brand/xertica-orbe/index.ts +1 -0
  48. package/components/brand/xertica-orbe/xertica-orbe.mdx +38 -0
  49. package/components/brand/xertica-orbe/xertica-orbe.stories.tsx +40 -0
  50. package/components/brand/xertica-provider/XerticaProvider.tsx +47 -0
  51. package/components/brand/xertica-provider/index.ts +1 -0
  52. package/components/brand/xertica-provider/xertica-provider.mdx +55 -0
  53. package/components/brand/xertica-xlogo/index.ts +1 -0
  54. package/components/examples/ApiKeyMapExample.tsx +1 -0
  55. package/components/examples/DrawingMapExample.tsx +1 -1
  56. package/components/examples/FilterableMapExample.tsx +1 -1
  57. package/components/examples/MapGmpExample.tsx +2 -1
  58. package/components/examples/MapShowcase.tsx +2 -0
  59. package/components/examples/SidebarLogoExample.tsx +1 -1
  60. package/components/index.ts +75 -75
  61. package/components/layout/header/header.mdx +73 -0
  62. package/components/layout/header/header.stories.tsx +104 -0
  63. package/components/{Header.tsx → layout/header/header.tsx} +38 -29
  64. package/components/layout/header/index.ts +1 -0
  65. package/components/layout/sidebar/index.ts +1 -0
  66. package/components/layout/sidebar/sidebar.mdx +91 -0
  67. package/components/layout/sidebar/sidebar.stories.tsx +233 -0
  68. package/components/{Sidebar.tsx → layout/sidebar/sidebar.tsx} +98 -41
  69. package/components/layout/sidebar-primitive/index.ts +1 -0
  70. package/components/{ui/sidebar.tsx → layout/sidebar-primitive/sidebar-primitive.tsx} +9 -8
  71. package/components/media/AudioPlayer.tsx +19 -13
  72. package/components/media/FloatingMediaWrapper.tsx +5 -1
  73. package/components/media/VideoPlayer.tsx +7 -1
  74. package/components/{ForgotPasswordPage.tsx → pages/forgot-password-page/ForgotPasswordPage.tsx} +6 -6
  75. package/components/pages/forgot-password-page/index.ts +1 -0
  76. package/components/{HomeContent.tsx → pages/home-content/HomeContent.tsx} +10 -10
  77. package/components/pages/home-content/index.ts +1 -0
  78. package/components/{HomePage.tsx → pages/home-page/HomePage.tsx} +7 -7
  79. package/components/pages/home-page/index.ts +1 -0
  80. package/components/pages/login-page/LoginPage.mdx +31 -0
  81. package/components/pages/login-page/LoginPage.stories.tsx +39 -0
  82. package/components/{LoginPage.tsx → pages/login-page/LoginPage.tsx} +6 -6
  83. package/components/pages/login-page/index.ts +1 -0
  84. package/components/{ResetPasswordPage.tsx → pages/reset-password-page/ResetPasswordPage.tsx} +6 -6
  85. package/components/pages/reset-password-page/index.ts +1 -0
  86. package/components/{TemplateContent.tsx → pages/template-content/TemplateContent.tsx} +44 -37
  87. package/components/pages/template-content/index.ts +1 -0
  88. package/components/{TemplatePage.tsx → pages/template-page/TemplatePage.tsx} +5 -5
  89. package/components/pages/template-page/index.ts +1 -0
  90. package/components/{VerifyEmailPage.tsx → pages/verify-email-page/VerifyEmailPage.tsx} +4 -4
  91. package/components/pages/verify-email-page/index.ts +1 -0
  92. package/components/{assistant-utils.ts → shared/assistant-utils.ts} +51 -12
  93. package/components/ui/accordion/accordion.mdx +41 -0
  94. package/components/ui/accordion/accordion.stories.tsx +76 -0
  95. package/components/ui/{accordion.tsx → accordion/accordion.tsx} +1 -1
  96. package/components/ui/accordion/index.ts +1 -0
  97. package/components/ui/alert/alert.mdx +45 -0
  98. package/components/ui/alert/alert.stories.tsx +89 -0
  99. package/components/ui/alert/alert.tsx +116 -0
  100. package/components/ui/alert/index.ts +1 -0
  101. package/components/ui/alert-dialog/alert-dialog.mdx +31 -0
  102. package/components/ui/alert-dialog/alert-dialog.stories.tsx +47 -0
  103. package/components/ui/{alert-dialog.tsx → alert-dialog/alert-dialog.tsx} +2 -2
  104. package/components/ui/alert-dialog/index.ts +1 -0
  105. package/components/ui/aspect-ratio/aspect-ratio.mdx +37 -0
  106. package/components/ui/aspect-ratio/aspect-ratio.stories.tsx +45 -0
  107. package/components/ui/aspect-ratio/index.ts +1 -0
  108. package/components/ui/{AssistantChart.tsx → assistant-chart/AssistantChart.tsx} +1 -1
  109. package/components/ui/assistant-chart/assistant-chart.mdx +30 -0
  110. package/components/ui/assistant-chart/assistant-chart.stories.tsx +43 -0
  111. package/components/ui/assistant-chart/index.ts +1 -0
  112. package/components/ui/avatar/avatar.mdx +46 -0
  113. package/components/ui/avatar/avatar.stories.tsx +57 -0
  114. package/components/ui/{avatar.tsx → avatar/avatar.tsx} +1 -1
  115. package/components/ui/avatar/index.ts +1 -0
  116. package/components/ui/badge/badge.mdx +43 -0
  117. package/components/ui/badge/badge.stories.tsx +56 -0
  118. package/components/ui/{badge.tsx → badge/badge.tsx} +1 -1
  119. package/components/ui/badge/index.ts +1 -0
  120. package/components/ui/breadcrumb/breadcrumb.mdx +38 -0
  121. package/components/ui/breadcrumb/breadcrumb.stories.tsx +89 -0
  122. package/components/ui/{breadcrumb.tsx → breadcrumb/breadcrumb.tsx} +1 -1
  123. package/components/ui/breadcrumb/index.ts +1 -0
  124. package/components/ui/button/button.mdx +73 -0
  125. package/components/ui/button/button.stories.tsx +125 -0
  126. package/components/ui/{button.tsx → button/button.tsx} +1 -1
  127. package/components/ui/button/index.ts +1 -0
  128. package/components/ui/calendar/calendar.mdx +45 -0
  129. package/components/ui/calendar/calendar.stories.tsx +81 -0
  130. package/components/ui/{calendar.tsx → calendar/calendar.tsx} +5 -3
  131. package/components/ui/calendar/index.ts +1 -0
  132. package/components/ui/card/card.mdx +45 -0
  133. package/components/ui/card/card.stories.tsx +103 -0
  134. package/components/ui/{card.tsx → card/card.tsx} +1 -1
  135. package/components/ui/card/index.ts +1 -0
  136. package/components/ui/carousel/carousel.mdx +38 -0
  137. package/components/ui/carousel/carousel.stories.tsx +71 -0
  138. package/components/ui/{carousel.tsx → carousel/carousel.tsx} +2 -2
  139. package/components/ui/carousel/index.ts +1 -0
  140. package/components/ui/chart/chart.mdx +38 -0
  141. package/components/ui/chart/chart.stories.tsx +91 -0
  142. package/components/ui/{chart.tsx → chart/chart.tsx} +1 -1
  143. package/components/ui/chart/index.ts +1 -0
  144. package/components/ui/checkbox/checkbox.mdx +38 -0
  145. package/components/ui/checkbox/checkbox.stories.tsx +59 -0
  146. package/components/ui/{checkbox.tsx → checkbox/checkbox.tsx} +1 -1
  147. package/components/ui/checkbox/index.ts +1 -0
  148. package/components/ui/collapsible/collapsible.mdx +30 -0
  149. package/components/ui/collapsible/collapsible.stories.tsx +53 -0
  150. package/components/ui/collapsible/index.ts +1 -0
  151. package/components/ui/command/command.mdx +38 -0
  152. package/components/ui/command/command.stories.tsx +140 -0
  153. package/components/ui/{command.tsx → command/command.tsx} +2 -2
  154. package/components/ui/command/index.ts +1 -0
  155. package/components/ui/context-menu/context-menu.mdx +31 -0
  156. package/components/ui/context-menu/context-menu.stories.tsx +77 -0
  157. package/components/ui/{context-menu.tsx → context-menu/context-menu.tsx} +1 -1
  158. package/components/ui/context-menu/index.ts +1 -0
  159. package/components/ui/dialog/dialog.mdx +38 -0
  160. package/components/ui/dialog/dialog.stories.tsx +91 -0
  161. package/components/ui/{dialog.tsx → dialog/dialog.tsx} +1 -1
  162. package/components/ui/dialog/index.ts +1 -0
  163. package/components/ui/drawer/drawer.mdx +31 -0
  164. package/components/ui/drawer/drawer.stories.tsx +57 -0
  165. package/components/ui/{drawer.tsx → drawer/drawer.tsx} +1 -1
  166. package/components/ui/drawer/index.ts +1 -0
  167. package/components/ui/dropdown-menu/dropdown-menu.mdx +40 -0
  168. package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +144 -0
  169. package/components/ui/{dropdown-menu.tsx → dropdown-menu/dropdown-menu.tsx} +1 -1
  170. package/components/ui/dropdown-menu/index.ts +1 -0
  171. package/components/ui/empty/empty.mdx +45 -0
  172. package/components/ui/empty/empty.stories.tsx +63 -0
  173. package/components/ui/{empty.tsx → empty/empty.tsx} +1 -1
  174. package/components/ui/empty/index.ts +1 -0
  175. package/components/ui/file-upload/file-upload.mdx +38 -0
  176. package/components/ui/file-upload/file-upload.stories.tsx +52 -0
  177. package/components/ui/{file-upload.tsx → file-upload/file-upload.tsx} +2 -2
  178. package/components/ui/file-upload/index.ts +1 -0
  179. package/components/ui/form/form.mdx +20 -0
  180. package/components/ui/form/form.stories.tsx +86 -0
  181. package/components/ui/{form.tsx → form/form.tsx} +2 -2
  182. package/components/ui/form/index.ts +1 -0
  183. package/components/ui/{google-maps-loader.tsx → google-maps-loader/google-maps-loader.tsx} +1 -1
  184. package/components/ui/google-maps-loader/index.ts +1 -0
  185. package/components/ui/hover-card/hover-card.mdx +31 -0
  186. package/components/ui/hover-card/hover-card.stories.tsx +50 -0
  187. package/components/ui/{hover-card.tsx → hover-card/hover-card.tsx} +1 -1
  188. package/components/ui/hover-card/index.ts +1 -0
  189. package/components/ui/index.ts +3 -32
  190. package/components/ui/input/index.ts +1 -0
  191. package/components/ui/input/input.mdx +60 -0
  192. package/components/ui/input/input.stories.tsx +78 -0
  193. package/components/ui/{input.tsx → input/input.tsx} +1 -1
  194. package/components/ui/input-otp/index.ts +1 -0
  195. package/components/ui/input-otp/input-otp.mdx +38 -0
  196. package/components/ui/input-otp/input-otp.stories.tsx +70 -0
  197. package/components/ui/{input-otp.tsx → input-otp/input-otp.tsx} +1 -1
  198. package/components/ui/label/index.ts +1 -0
  199. package/components/ui/label/label.mdx +37 -0
  200. package/components/ui/label/label.stories.tsx +33 -0
  201. package/components/ui/{label.tsx → label/label.tsx} +1 -1
  202. package/components/ui/map/index.ts +1 -0
  203. package/components/ui/map/map.mdx +38 -0
  204. package/components/ui/map/map.stories.tsx +65 -0
  205. package/components/ui/{map.tsx → map/map.tsx} +3 -3
  206. package/components/ui/map-config/index.ts +1 -0
  207. package/components/ui/map-layers/index.ts +1 -0
  208. package/components/ui/{map-layers.tsx → map-layers/map-layers.tsx} +1 -1
  209. package/components/ui/map.exports/index.ts +1 -0
  210. package/components/ui/map.exports/map.exports.ts +31 -0
  211. package/components/ui/menubar/index.ts +1 -0
  212. package/components/ui/menubar/menubar.mdx +31 -0
  213. package/components/ui/menubar/menubar.stories.tsx +115 -0
  214. package/components/ui/{menubar.tsx → menubar/menubar.tsx} +1 -1
  215. package/components/ui/navigation-menu/index.ts +1 -0
  216. package/components/ui/navigation-menu/navigation-menu.mdx +31 -0
  217. package/components/ui/navigation-menu/navigation-menu.stories.tsx +113 -0
  218. package/components/ui/{navigation-menu.tsx → navigation-menu/navigation-menu.tsx} +1 -1
  219. package/components/ui/notification-badge/index.ts +1 -0
  220. package/components/ui/notification-badge/notification-badge.mdx +38 -0
  221. package/components/ui/notification-badge/notification-badge.stories.tsx +74 -0
  222. package/components/ui/{notification-badge.tsx → notification-badge/notification-badge.tsx} +1 -1
  223. package/components/ui/page-header/index.ts +1 -0
  224. package/components/ui/page-header/page-header.mdx +43 -0
  225. package/components/ui/page-header/page-header.stories.tsx +68 -0
  226. package/components/ui/page-header/page-header.tsx +121 -0
  227. package/components/ui/pagination/index.ts +1 -0
  228. package/components/ui/pagination/pagination.mdx +38 -0
  229. package/components/ui/pagination/pagination.stories.tsx +85 -0
  230. package/components/ui/{pagination.tsx → pagination/pagination.tsx} +2 -2
  231. package/components/ui/popover/index.ts +1 -0
  232. package/components/ui/popover/popover.mdx +38 -0
  233. package/components/ui/popover/popover.stories.tsx +67 -0
  234. package/components/ui/{popover.tsx → popover/popover.tsx} +1 -1
  235. package/components/ui/progress/index.ts +1 -0
  236. package/components/ui/progress/progress.mdx +33 -0
  237. package/components/ui/progress/progress.stories.tsx +38 -0
  238. package/components/ui/{progress.tsx → progress/progress.tsx} +1 -1
  239. package/components/ui/radio-group/index.ts +1 -0
  240. package/components/ui/radio-group/radio-group.mdx +38 -0
  241. package/components/ui/radio-group/radio-group.stories.tsx +46 -0
  242. package/components/ui/{radio-group.tsx → radio-group/radio-group.tsx} +1 -1
  243. package/components/ui/rating/index.ts +1 -0
  244. package/components/ui/rating/rating.mdx +38 -0
  245. package/components/ui/rating/rating.stories.tsx +49 -0
  246. package/components/ui/{rating.tsx → rating/rating.tsx} +1 -1
  247. package/components/ui/resizable/index.ts +1 -0
  248. package/components/ui/resizable/resizable.mdx +38 -0
  249. package/components/ui/resizable/resizable.stories.tsx +100 -0
  250. package/components/ui/{resizable.tsx → resizable/resizable.tsx} +1 -1
  251. package/components/ui/rich-text-editor/index.ts +1 -0
  252. package/components/ui/rich-text-editor/rich-text-editor.mdx +31 -0
  253. package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +48 -0
  254. package/components/ui/{rich-text-editor.tsx → rich-text-editor/rich-text-editor.tsx} +14 -11
  255. package/components/ui/route-map/index.ts +1 -0
  256. package/components/ui/route-map/route-map.mdx +38 -0
  257. package/components/ui/route-map/route-map.stories.tsx +47 -0
  258. package/components/ui/{route-map.tsx → route-map/route-map.tsx} +2 -2
  259. package/components/ui/scroll-area/index.ts +1 -0
  260. package/components/ui/scroll-area/scroll-area.mdx +30 -0
  261. package/components/ui/scroll-area/scroll-area.stories.tsx +34 -0
  262. package/components/ui/{scroll-area.tsx → scroll-area/scroll-area.tsx} +1 -1
  263. package/components/ui/search/index.ts +1 -0
  264. package/components/ui/search/search.mdx +38 -0
  265. package/components/ui/search/search.stories.tsx +46 -0
  266. package/components/ui/{search.tsx → search/search.tsx} +3 -1
  267. package/components/ui/select/index.ts +1 -0
  268. package/components/ui/select/select.mdx +38 -0
  269. package/components/ui/select/select.stories.tsx +86 -0
  270. package/components/ui/{select.tsx → select/select.tsx} +1 -1
  271. package/components/ui/separator/index.ts +1 -0
  272. package/components/ui/separator/separator.mdx +37 -0
  273. package/components/ui/separator/separator.stories.tsx +44 -0
  274. package/components/ui/{separator.tsx → separator/separator.tsx} +1 -1
  275. package/components/ui/sheet/index.ts +1 -0
  276. package/components/ui/sheet/sheet.mdx +38 -0
  277. package/components/ui/sheet/sheet.stories.tsx +82 -0
  278. package/components/ui/{sheet.tsx → sheet/sheet.tsx} +1 -1
  279. package/components/ui/simple-map/index.ts +1 -0
  280. package/components/ui/simple-map/simple-map.mdx +37 -0
  281. package/components/ui/simple-map/simple-map.stories.tsx +42 -0
  282. package/components/ui/{simple-map.tsx → simple-map/simple-map.tsx} +1 -1
  283. package/components/ui/skeleton/index.ts +1 -0
  284. package/components/ui/skeleton/skeleton.mdx +37 -0
  285. package/components/ui/skeleton/skeleton.stories.tsx +35 -0
  286. package/components/ui/{skeleton.tsx → skeleton/skeleton.tsx} +1 -1
  287. package/components/ui/slider/index.ts +1 -0
  288. package/components/ui/slider/slider.mdx +38 -0
  289. package/components/ui/slider/slider.stories.tsx +43 -0
  290. package/components/ui/{slider.tsx → slider/slider.tsx} +1 -1
  291. package/components/ui/sonner/index.ts +1 -0
  292. package/components/ui/sonner/sonner.mdx +31 -0
  293. package/components/ui/sonner/sonner.stories.tsx +46 -0
  294. package/components/ui/stats-card/index.ts +1 -0
  295. package/components/ui/stats-card/stats-card.mdx +38 -0
  296. package/components/ui/stats-card/stats-card.stories.tsx +76 -0
  297. package/components/ui/{stats-card.tsx → stats-card/stats-card.tsx} +2 -2
  298. package/components/ui/stepper/index.ts +1 -0
  299. package/components/ui/stepper/stepper.mdx +31 -0
  300. package/components/ui/stepper/stepper.stories.tsx +57 -0
  301. package/components/ui/{stepper.tsx → stepper/stepper.tsx} +1 -1
  302. package/components/ui/switch/index.ts +1 -0
  303. package/components/ui/switch/switch.mdx +37 -0
  304. package/components/ui/switch/switch.stories.tsx +30 -0
  305. package/components/ui/{switch.tsx → switch/switch.tsx} +1 -1
  306. package/components/ui/table/index.ts +1 -0
  307. package/components/ui/table/table.mdx +32 -0
  308. package/components/ui/table/table.stories.tsx +108 -0
  309. package/components/ui/{table.tsx → table/table.tsx} +1 -1
  310. package/components/ui/tabs/index.ts +1 -0
  311. package/components/ui/tabs/tabs.mdx +38 -0
  312. package/components/ui/tabs/tabs.stories.tsx +94 -0
  313. package/components/ui/{tabs.tsx → tabs/tabs.tsx} +1 -1
  314. package/components/ui/textarea/index.ts +1 -0
  315. package/components/ui/textarea/textarea.mdx +30 -0
  316. package/components/ui/textarea/textarea.stories.tsx +34 -0
  317. package/components/ui/{textarea.tsx → textarea/textarea.tsx} +1 -1
  318. package/components/ui/timeline/index.ts +1 -0
  319. package/components/ui/timeline/timeline.mdx +31 -0
  320. package/components/ui/timeline/timeline.stories.tsx +56 -0
  321. package/components/ui/{timeline.tsx → timeline/timeline.tsx} +1 -1
  322. package/components/ui/toggle/index.ts +1 -0
  323. package/components/ui/toggle/toggle.mdx +38 -0
  324. package/components/ui/toggle/toggle.stories.tsx +55 -0
  325. package/components/ui/{toggle.tsx → toggle/toggle.tsx} +1 -1
  326. package/components/ui/toggle-group/index.ts +1 -0
  327. package/components/ui/toggle-group/toggle-group.mdx +38 -0
  328. package/components/ui/toggle-group/toggle-group.stories.tsx +65 -0
  329. package/components/ui/{toggle-group.tsx → toggle-group/toggle-group.tsx} +2 -2
  330. package/components/ui/tooltip/index.ts +1 -0
  331. package/components/ui/tooltip/tooltip.mdx +45 -0
  332. package/components/ui/tooltip/tooltip.stories.tsx +74 -0
  333. package/components/ui/{tooltip.tsx → tooltip/tooltip.tsx} +1 -1
  334. package/components/ui/tree-view/index.ts +1 -0
  335. package/components/ui/tree-view/tree-view.mdx +31 -0
  336. package/components/ui/tree-view/tree-view.stories.tsx +59 -0
  337. package/components/ui/{tree-view.tsx → tree-view/tree-view.tsx} +1 -1
  338. package/components.json +451 -349
  339. package/dist/cli.js +27 -4
  340. package/dist/components/assistant/code-block/CodeBlock.d.ts +28 -0
  341. package/dist/components/assistant/code-block/index.d.ts +1 -0
  342. package/dist/components/assistant/formatted-document/FormattedDocument.d.ts +25 -0
  343. package/dist/components/assistant/formatted-document/index.d.ts +1 -0
  344. package/dist/components/assistant/markdown-message/MarkdownMessage.d.ts +24 -0
  345. package/dist/components/assistant/markdown-message/index.d.ts +1 -0
  346. package/dist/components/assistant/modern-chat-input/ModernChatInput.d.ts +44 -0
  347. package/dist/components/assistant/modern-chat-input/index.d.ts +1 -0
  348. package/dist/components/assistant/xertica-assistant/index.d.ts +1 -0
  349. package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +242 -0
  350. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
  351. package/dist/components/blocks/audio-player/index.d.ts +1 -0
  352. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
  353. package/dist/components/blocks/document-editor/index.d.ts +1 -0
  354. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
  355. package/dist/components/blocks/podcast-player/index.d.ts +1 -0
  356. package/dist/components/brand/language-selector/LanguageSelector.d.ts +16 -0
  357. package/dist/components/brand/language-selector/index.d.ts +1 -0
  358. package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +8 -0
  359. package/dist/components/brand/theme-toggle/index.d.ts +1 -0
  360. package/dist/components/brand/xertica-logo/XerticaLogo.d.ts +24 -0
  361. package/dist/components/brand/xertica-logo/index.d.ts +1 -0
  362. package/dist/components/brand/xertica-orbe/XerticaOrbe.d.ts +23 -0
  363. package/dist/components/brand/xertica-orbe/index.d.ts +1 -0
  364. package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +29 -0
  365. package/dist/components/brand/xertica-provider/index.d.ts +1 -0
  366. package/dist/components/brand/xertica-xlogo/XerticaXLogo.d.ts +23 -0
  367. package/dist/components/brand/xertica-xlogo/index.d.ts +1 -0
  368. package/dist/components/index.d.ts +21 -21
  369. package/dist/components/layout/header/header.d.ts +72 -0
  370. package/dist/components/layout/header/index.d.ts +1 -0
  371. package/dist/components/layout/sidebar/index.d.ts +1 -0
  372. package/dist/components/layout/sidebar/sidebar.d.ts +128 -0
  373. package/dist/components/layout/sidebar-primitive/index.d.ts +1 -0
  374. package/dist/components/layout/sidebar-primitive/sidebar-primitive.d.ts +69 -0
  375. package/dist/components/pages/forgot-password-page/ForgotPasswordPage.d.ts +13 -0
  376. package/dist/components/pages/forgot-password-page/index.d.ts +1 -0
  377. package/dist/components/pages/home-content/HomeContent.d.ts +20 -0
  378. package/dist/components/pages/home-content/index.d.ts +1 -0
  379. package/dist/components/pages/home-page/HomePage.d.ts +26 -0
  380. package/dist/components/pages/home-page/index.d.ts +1 -0
  381. package/dist/components/pages/login-page/LoginPage.d.ts +25 -0
  382. package/dist/components/pages/login-page/index.d.ts +1 -0
  383. package/dist/components/pages/reset-password-page/ResetPasswordPage.d.ts +14 -0
  384. package/dist/components/pages/reset-password-page/index.d.ts +1 -0
  385. package/dist/components/pages/template-content/TemplateContent.d.ts +19 -0
  386. package/dist/components/pages/template-content/index.d.ts +1 -0
  387. package/dist/components/pages/template-page/TemplatePage.d.ts +24 -0
  388. package/dist/components/pages/template-page/index.d.ts +1 -0
  389. package/dist/components/pages/verify-email-page/VerifyEmailPage.d.ts +14 -0
  390. package/dist/components/pages/verify-email-page/index.d.ts +1 -0
  391. package/dist/components/shared/assistant-utils.d.ts +22 -0
  392. package/dist/components/shared/layout-constants.d.ts +8 -0
  393. package/dist/components/shared/use-mobile.d.ts +2 -0
  394. package/dist/components/shared/utils.d.ts +2 -0
  395. package/dist/components/ui/accordion/accordion.d.ts +20 -0
  396. package/dist/components/ui/accordion/index.d.ts +1 -0
  397. package/dist/components/ui/alert/alert.d.ts +26 -0
  398. package/dist/components/ui/alert/index.d.ts +1 -0
  399. package/dist/components/ui/alert-dialog/alert-dialog.d.ts +26 -0
  400. package/dist/components/ui/alert-dialog/index.d.ts +1 -0
  401. package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts +14 -0
  402. package/dist/components/ui/aspect-ratio/index.d.ts +1 -0
  403. package/dist/components/ui/assistant-chart/AssistantChart.d.ts +7 -0
  404. package/dist/components/ui/assistant-chart/index.d.ts +1 -0
  405. package/dist/components/ui/avatar/avatar.d.ts +20 -0
  406. package/dist/components/ui/avatar/index.d.ts +1 -0
  407. package/dist/components/ui/badge/badge.d.ts +22 -0
  408. package/dist/components/ui/badge/index.d.ts +1 -0
  409. package/dist/components/ui/breadcrumb/breadcrumb.d.ts +23 -0
  410. package/dist/components/ui/breadcrumb/index.d.ts +1 -0
  411. package/dist/components/ui/button/button.d.ts +37 -0
  412. package/dist/components/ui/button/index.d.ts +1 -0
  413. package/dist/components/ui/calendar/calendar.d.ts +20 -0
  414. package/dist/components/ui/calendar/index.d.ts +1 -0
  415. package/dist/components/ui/card/card.d.ts +21 -0
  416. package/dist/components/ui/card/index.d.ts +1 -0
  417. package/dist/components/ui/carousel/carousel.d.ts +31 -0
  418. package/dist/components/ui/carousel/index.d.ts +1 -0
  419. package/dist/components/ui/chart/chart.d.ts +55 -0
  420. package/dist/components/ui/chart/index.d.ts +1 -0
  421. package/dist/components/ui/checkbox/checkbox.d.ts +16 -0
  422. package/dist/components/ui/checkbox/index.d.ts +1 -0
  423. package/dist/components/ui/collapsible/collapsible.d.ts +16 -0
  424. package/dist/components/ui/collapsible/index.d.ts +1 -0
  425. package/dist/components/ui/command/command.d.ts +29 -0
  426. package/dist/components/ui/command/index.d.ts +1 -0
  427. package/dist/components/ui/context-menu/context-menu.d.ts +37 -0
  428. package/dist/components/ui/context-menu/index.d.ts +1 -0
  429. package/dist/components/ui/dialog/dialog.d.ts +33 -0
  430. package/dist/components/ui/dialog/index.d.ts +1 -0
  431. package/dist/components/ui/drawer/drawer.d.ts +26 -0
  432. package/dist/components/ui/drawer/index.d.ts +1 -0
  433. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +37 -0
  434. package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
  435. package/dist/components/ui/empty/empty.d.ts +22 -0
  436. package/dist/components/ui/empty/index.d.ts +1 -0
  437. package/dist/components/ui/file-upload/file-upload.d.ts +24 -0
  438. package/dist/components/ui/file-upload/index.d.ts +1 -0
  439. package/dist/components/ui/form/form.d.ts +37 -0
  440. package/dist/components/ui/form/index.d.ts +1 -0
  441. package/dist/components/ui/google-maps-loader/google-maps-loader.d.ts +33 -0
  442. package/dist/components/ui/google-maps-loader/index.d.ts +1 -0
  443. package/dist/components/ui/hover-card/hover-card.d.ts +18 -0
  444. package/dist/components/ui/hover-card/index.d.ts +1 -0
  445. package/dist/components/ui/index.d.ts +3 -6
  446. package/dist/components/ui/input/index.d.ts +1 -0
  447. package/dist/components/ui/input/input.d.ts +25 -0
  448. package/dist/components/ui/input-otp/index.d.ts +1 -0
  449. package/dist/components/ui/input-otp/input-otp.d.ts +23 -0
  450. package/dist/components/ui/label/index.d.ts +1 -0
  451. package/dist/components/ui/label/label.d.ts +15 -0
  452. package/dist/components/ui/map/index.d.ts +1 -0
  453. package/dist/components/ui/map/map.d.ts +82 -0
  454. package/dist/components/ui/map-config/index.d.ts +1 -0
  455. package/dist/components/ui/map-config/map-config.d.ts +12 -0
  456. package/dist/components/ui/map-layers/index.d.ts +1 -0
  457. package/dist/components/ui/map-layers/map-layers.d.ts +48 -0
  458. package/dist/components/ui/map.exports/index.d.ts +1 -0
  459. package/dist/components/ui/map.exports/map.exports.d.ts +25 -0
  460. package/dist/components/ui/menubar/index.d.ts +1 -0
  461. package/dist/components/ui/menubar/menubar.d.ts +39 -0
  462. package/dist/components/ui/navigation-menu/index.d.ts +1 -0
  463. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +26 -0
  464. package/dist/components/ui/notification-badge/index.d.ts +1 -0
  465. package/dist/components/ui/notification-badge/notification-badge.d.ts +24 -0
  466. package/dist/components/ui/page-header/index.d.ts +1 -0
  467. package/dist/components/ui/page-header/page-header.d.ts +51 -0
  468. package/dist/components/ui/pagination/index.d.ts +1 -0
  469. package/dist/components/ui/pagination/pagination.d.ts +25 -0
  470. package/dist/components/ui/popover/index.d.ts +1 -0
  471. package/dist/components/ui/popover/popover.d.ts +19 -0
  472. package/dist/components/ui/progress/index.d.ts +1 -0
  473. package/dist/components/ui/progress/progress.d.ts +15 -0
  474. package/dist/components/ui/radio-group/index.d.ts +1 -0
  475. package/dist/components/ui/radio-group/radio-group.d.ts +17 -0
  476. package/dist/components/ui/rating/index.d.ts +1 -0
  477. package/dist/components/ui/rating/rating.d.ts +24 -0
  478. package/dist/components/ui/resizable/index.d.ts +1 -0
  479. package/dist/components/ui/resizable/resizable.d.ts +39 -0
  480. package/dist/components/ui/rich-text-editor/index.d.ts +1 -0
  481. package/dist/components/ui/rich-text-editor/rich-text-editor.d.ts +9 -0
  482. package/dist/components/ui/route-map/index.d.ts +1 -0
  483. package/dist/components/ui/route-map/route-map.d.ts +41 -0
  484. package/dist/components/ui/scroll-area/index.d.ts +1 -0
  485. package/dist/components/ui/scroll-area/scroll-area.d.ts +16 -0
  486. package/dist/components/ui/search/index.d.ts +1 -0
  487. package/dist/components/ui/search/search.d.ts +20 -0
  488. package/dist/components/ui/select/index.d.ts +1 -0
  489. package/dist/components/ui/select/select.d.ts +27 -0
  490. package/dist/components/ui/separator/index.d.ts +1 -0
  491. package/dist/components/ui/separator/separator.d.ts +15 -0
  492. package/dist/components/ui/sheet/index.d.ts +1 -0
  493. package/dist/components/ui/sheet/sheet.d.ts +26 -0
  494. package/dist/components/ui/simple-map/index.d.ts +1 -0
  495. package/dist/components/ui/simple-map/simple-map.d.ts +57 -0
  496. package/dist/components/ui/skeleton/index.d.ts +1 -0
  497. package/dist/components/ui/skeleton/skeleton.d.ts +14 -0
  498. package/dist/components/ui/slider/index.d.ts +1 -0
  499. package/dist/components/ui/slider/slider.d.ts +16 -0
  500. package/dist/components/ui/sonner/index.d.ts +1 -0
  501. package/dist/components/ui/sonner/sonner.d.ts +15 -0
  502. package/dist/components/ui/stats-card/index.d.ts +1 -0
  503. package/dist/components/ui/stats-card/stats-card.d.ts +29 -0
  504. package/dist/components/ui/stepper/index.d.ts +1 -0
  505. package/dist/components/ui/stepper/stepper.d.ts +31 -0
  506. package/dist/components/ui/switch/index.d.ts +1 -0
  507. package/dist/components/ui/switch/switch.d.ts +15 -0
  508. package/dist/components/ui/table/index.d.ts +1 -0
  509. package/dist/components/ui/table/table.d.ts +22 -0
  510. package/dist/components/ui/tabs/index.d.ts +1 -0
  511. package/dist/components/ui/tabs/tabs.d.ts +19 -0
  512. package/dist/components/ui/textarea/index.d.ts +1 -0
  513. package/dist/components/ui/textarea/textarea.d.ts +15 -0
  514. package/dist/components/ui/timeline/index.d.ts +1 -0
  515. package/dist/components/ui/timeline/timeline.d.ts +24 -0
  516. package/dist/components/ui/toggle/index.d.ts +1 -0
  517. package/dist/components/ui/toggle/toggle.d.ts +23 -0
  518. package/dist/components/ui/toggle-group/index.d.ts +1 -0
  519. package/dist/components/ui/toggle-group/toggle-group.d.ts +24 -0
  520. package/dist/components/ui/tooltip/index.d.ts +1 -0
  521. package/dist/components/ui/tooltip/tooltip.d.ts +19 -0
  522. package/dist/components/ui/tree-view/index.d.ts +1 -0
  523. package/dist/components/ui/tree-view/tree-view.d.ts +28 -0
  524. package/dist/index.es.js +837 -2172
  525. package/dist/index.umd.js +836 -2171
  526. package/dist/xertica-ui.css +1 -1
  527. package/docs/architecture.md +24 -0
  528. package/docs/components/alert.md +108 -114
  529. package/docs/components/assistant-chart.md +46 -0
  530. package/docs/components/audio-player.md +72 -0
  531. package/docs/components/document-editor.md +69 -0
  532. package/docs/components/google-maps-loader.md +43 -0
  533. package/docs/components/header.md +116 -202
  534. package/docs/components/input.md +13 -0
  535. package/docs/components/language-selector.md +76 -0
  536. package/docs/components/markdown-message.md +47 -0
  537. package/docs/components/page-header.md +95 -170
  538. package/docs/components/podcast-player.md +84 -0
  539. package/docs/components/sidebar.md +89 -205
  540. package/docs/components/simple-map.md +49 -0
  541. package/docs/components/theme-toggle.md +72 -0
  542. package/docs/components/xertica-logo.md +35 -0
  543. package/docs/components/xertica-orbe.md +34 -0
  544. package/docs/components/xertica-provider.md +52 -0
  545. package/docs/components/xertica-xlogo.md +34 -0
  546. package/docs/getting-started.md +56 -10
  547. package/docs/installation.md +3 -6
  548. package/docs/layout.md +137 -171
  549. package/docs/llms.md +27 -2
  550. package/docs/patterns/dashboard.md +1 -32
  551. package/llms-full.txt +6740 -1942
  552. package/llms.txt +17 -7
  553. package/package.json +150 -136
  554. package/scripts/cleanup-case-dupes.ts +59 -0
  555. package/scripts/fix-stories.cjs +19 -0
  556. package/scripts/generate-ai-manifests.ts +38 -6
  557. package/styles/xertica/tokens.css +17 -0
  558. package/templates/package.json +2 -2
  559. package/templates/src/styles/index.css +91 -47
  560. package/templates/src/styles/xertica/tokens.css +17 -0
  561. package/components/LanguageSelector.tsx +0 -73
  562. package/components/XerticaProvider.tsx +0 -82
  563. package/components/ui/alert.tsx +0 -111
  564. package/components/ui/map.exports.ts +0 -31
  565. package/components/ui/page-header.tsx +0 -277
  566. /package/components/{MarkdownMessage.tsx → assistant/markdown-message/MarkdownMessage.tsx} +0 -0
  567. /package/components/{XerticaXLogo.tsx → brand/xertica-xlogo/XerticaXLogo.tsx} +0 -0
  568. /package/components/{layout-constants.ts → shared/layout-constants.ts} +0 -0
  569. /package/components/{ui → shared}/use-mobile.ts +0 -0
  570. /package/components/{ui → shared}/utils.ts +0 -0
  571. /package/components/ui/{aspect-ratio.tsx → aspect-ratio/aspect-ratio.tsx} +0 -0
  572. /package/components/ui/{collapsible.tsx → collapsible/collapsible.tsx} +0 -0
  573. /package/components/ui/{map-config.ts → map-config/map-config.ts} +0 -0
  574. /package/components/ui/{sonner.tsx → sonner/sonner.tsx} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,20 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.7.0] — 2026-04-23
11
+
12
+ ### Fixed
13
+ - **CLI CSS Theme Import** — Corrected `@theme` → `@theme inline` in both the library's `index.css` and the generated template `src/styles/index.css`. Plain `@theme {}` was causing Tailwind v4 to resolve color tokens statically at build time using the library's defaults, preventing consumer `tokens.css` overrides from propagating into utility classes (`bg-destructive`, `bg-primary`, alert colors, etc.).
14
+ - **Dark Mode `--primary`** — Added missing `--primary: var(--xertica-primary)` in the dark mode block of `tokens.css` (library, template, and generator). Components using `bg-primary` were not picking up the dark mode brand color.
15
+ - **Dark Mode Chart Tokens** — Generator (`bin/generate-tokens.ts`) now includes `--chart-1` through `--chart-5` in the dark mode section for all generated `tokens.css` files.
16
+
17
+ ### Added
18
+ - **CLI `update` command** — `npx xertica-ui@latest update` prompts the user to select a new color theme and overwrites `src/styles/xertica/tokens.css` with the newly generated tokens, preserving all other project files.
19
+ - **Template `@theme inline` mapping** — Generated `src/styles/index.css` now includes a complete `@theme inline {}` block mapping all tokens (sidebar, charts, gradients, brand, radii) to CSS variable aliases, ensuring full theme coverage for consumer projects.
20
+ - **Documentation** — `docs/getting-started.md` updated with CLI `update` command reference and a new "CSS Setup (Critical)" section explaining the `@theme inline` requirement.
21
+
22
+ ---
23
+
10
24
  ## [1.6.0] — 2026-04-20
11
25
 
12
26
  ### Added
package/bin/cli.ts CHANGED
@@ -18,7 +18,7 @@ const program = new Command();
18
18
  program
19
19
  .name('xertica-ui')
20
20
  .description('CLI to initialize Xertica UI projects')
21
- .version('1.0.0');
21
+ .version('1.7.0');
22
22
 
23
23
  program
24
24
  .command('init')
@@ -181,7 +181,7 @@ program
181
181
 
182
182
  const minimalApp = `import React, { useState, useEffect, useLayoutEffect } from 'react';
183
183
  import { BrowserRouter as Router, Routes, Route, Navigate, useNavigate, useLocation } from 'react-router-dom';
184
- import { XerticaProvider, Toaster } from 'xertica-ui';
184
+ import { XerticaProvider } from 'xertica-ui';
185
185
  ${imports.join('\n')}
186
186
 
187
187
  export default function App() {
@@ -193,7 +193,6 @@ ${routes.join('\n')}
193
193
  <Route path="/" element={<Navigate to="${hasLogin ? '/login' : hasHome ? '/home' : '/template'}" replace />} />
194
194
  <Route path="*" element={<Navigate to="${hasLogin ? '/login' : hasHome ? '/home' : '/template'}" replace />} />
195
195
  </Routes>
196
- <Toaster position="top-right" richColors />
197
196
  </Router>
198
197
  </XerticaProvider>
199
198
  );
@@ -244,6 +243,7 @@ ${routes.join('\n')}
244
243
 
245
244
  program
246
245
  .command('update')
246
+ .alias('update-theme')
247
247
  .description('Update theme tokens in your project')
248
248
  .action(async () => {
249
249
  const targetDir = process.cwd();
@@ -66,6 +66,14 @@ export const generateTokensCss = (theme: ColorTheme): string => {
66
66
  --destructive: rgba(239, 68, 68, 1);
67
67
  --destructive-foreground: rgba(250, 250, 250, 1);
68
68
 
69
+ /* Semantic Status Colors */
70
+ --success: rgba(5, 150, 105, 1);
71
+ --success-foreground: rgba(250, 250, 250, 1);
72
+ --info: rgba(37, 99, 235, 1);
73
+ --info-foreground: rgba(250, 250, 250, 1);
74
+ --warning: rgba(245, 158, 11, 1);
75
+ --warning-foreground: rgba(24, 24, 27, 1);
76
+
69
77
  --border: rgba(228, 228, 231, 1);
70
78
  --input: rgba(244, 244, 245, 0.5);
71
79
  --input-background: rgba(244, 244, 245, 0.5);
@@ -162,6 +170,7 @@ export const generateTokensCss = (theme: ColorTheme): string => {
162
170
  .dark {
163
171
  /* Brand Tokens */
164
172
  --xertica-primary: ${rgba(colors.primaryDarkMode)};
173
+ --primary: var(--xertica-primary);
165
174
 
166
175
  /* Semantic Colors */
167
176
  --background: rgba(5, 5, 5, 1);
@@ -189,12 +198,27 @@ export const generateTokensCss = (theme: ColorTheme): string => {
189
198
  --destructive: rgba(239, 68, 68, 1);
190
199
  --destructive-foreground: rgba(250, 250, 250, 1);
191
200
 
201
+ /* Semantic Status Colors */
202
+ --success: rgba(34, 197, 94, 1);
203
+ --success-foreground: rgba(5, 5, 5, 1);
204
+ --info: rgba(96, 165, 250, 1);
205
+ --info-foreground: rgba(5, 5, 5, 1);
206
+ --warning: rgba(251, 191, 36, 1);
207
+ --warning-foreground: rgba(5, 5, 5, 1);
208
+
192
209
  --border: rgba(63, 63, 70, 1);
193
210
  --input: rgba(39, 39, 42, 0.5);
194
211
  --input-background: rgba(39, 39, 42, 0.5);
195
212
  --ring: ${rgba(colors.primaryDarkMode, 0.5)};
196
213
 
197
214
  --elevation-sm: 0px 0px 48px 0px rgba(0, 0, 0, 0.3);
215
+
216
+ /* Charts */
217
+ --chart-1: ${rgba(colors.chart1)};
218
+ --chart-2: ${rgba(colors.chart2)};
219
+ --chart-3: ${rgba(colors.chart3)};
220
+ --chart-4: ${rgba(colors.chart4)};
221
+ --chart-5: ${rgba(colors.chart5)};
198
222
 
199
223
  /* Sidebar */
200
224
  --sidebar: ${rgba(colors.sidebarDark)};
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import { Check, Copy } from 'lucide-react';
3
- import { Button } from './ui/button';
3
+ import { Button } from '../../ui/button';
4
4
  import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
5
5
 
6
6
  // Elegant custom theme inspired by Xertica.ai design system
@@ -229,6 +229,7 @@ export const CodeBlock = ({
229
229
  size="icon"
230
230
  className="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10 bg-background/80 hover:bg-background"
231
231
  onClick={handleCopy}
232
+ aria-label={copied ? "Copiado" : "Copiar código"}
232
233
  >
233
234
  {copied ? (
234
235
  <Check className="w-4 h-4 text-[var(--toast-success-icon)]" />
@@ -0,0 +1,38 @@
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
2
+ import * as CodeBlockStories from './code-block.stories';
3
+
4
+ <Meta of={CodeBlockStories} />
5
+
6
+ <Title />
7
+ <Subtitle>An elegant syntax highlighter with built-in copy functionality and Xertica branding.</Subtitle>
8
+
9
+ <Description />
10
+
11
+ <Primary />
12
+
13
+ ---
14
+
15
+ ## Usage Patterns
16
+
17
+ ### Development Snippets
18
+ Ideal for showing code examples with line numbers and filename headers.
19
+
20
+ <Canvas>
21
+ <CodeBlockStories.Default />
22
+ </Canvas>
23
+
24
+ ### Terminal Commands
25
+ Compact view for shell commands or configuration highlights.
26
+
27
+ <Canvas>
28
+ <CodeBlockStories.Simple />
29
+ </Canvas>
30
+
31
+ ---
32
+
33
+ ## AI Best Practices
34
+
35
+ > [!IMPORTANT]
36
+ > - **Language Selection** — Always specify the correct `language` prop to ensure accurate syntax highlighting.
37
+ > - **Theme Consistency** — The underlying `elegantTheme` automatically maps to the system's CSS theme variables; ensure the `XerticaProvider` is wrapping the application for correct colors.
38
+ > - **Clipboard Support** — Copy functionality includes progressive fallbacks for browsers with restricted clipboard permissions.
@@ -0,0 +1,57 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CodeBlock } from './CodeBlock';
3
+ import React from 'react';
4
+
5
+ const meta: Meta<typeof CodeBlock> = {
6
+ title: 'High-Level/CodeBlock',
7
+ component: CodeBlock,
8
+ argTypes: {
9
+ language: {
10
+ control: 'select',
11
+ options: ['typescript', 'tsx', 'css', 'bash', 'jsx'],
12
+ },
13
+ },
14
+ };
15
+
16
+ export default meta;
17
+ type Story = StoryObj<typeof CodeBlock>;
18
+
19
+ const exampleCode = `function HelloWorld() {
20
+ const [count, setCount] = useState(0);
21
+
22
+ return (
23
+ <div className="flex flex-col gap-4">
24
+ <h1 className="text-2xl font-bold">Counter</h1>
25
+ <p>Current count: {count}</p>
26
+ <Button onClick={() => setCount(count + 1)}>
27
+ Increment
28
+ </Button>
29
+ </div>
30
+ );
31
+ }`;
32
+
33
+ export const Default: Story = {
34
+ args: {
35
+ code: exampleCode,
36
+ language: 'tsx',
37
+ filename: 'Counter.tsx',
38
+ showLineNumbers: true,
39
+ },
40
+ render: (args) => (
41
+ <div className="w-full max-w-3xl">
42
+ <CodeBlock {...args} />
43
+ </div>
44
+ ),
45
+ };
46
+
47
+ export const Simple: Story = {
48
+ args: {
49
+ code: 'npm install xertica-ui',
50
+ language: 'bash',
51
+ },
52
+ render: (args) => (
53
+ <div className="w-full max-w-xl">
54
+ <CodeBlock {...args} />
55
+ </div>
56
+ ),
57
+ };
@@ -0,0 +1 @@
1
+ export * from './CodeBlock';
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import { Button } from './ui/button';
2
+ import { Button } from '../../ui/button';
3
3
  import { ChevronDown, ChevronUp } from 'lucide-react';
4
4
 
5
5
  /**
@@ -51,8 +51,8 @@ export function FormattedDocument({ content, maxPreviewLength = 500, className =
51
51
  html = html.replace(/^\d+\. (.*$)/gim, '<li class="ml-4 my-0.5">$1</li>');
52
52
 
53
53
  // Checkboxes
54
- html = html.replace(/- \[ \] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" disabled class="rounded w-3 h-3" /> <span class="text-sm">$1</span></div>');
55
- html = html.replace(/- \[x\] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" checked disabled class="rounded w-3 h-3" /> <span class="text-sm">$1</span></div>');
54
+ html = html.replace(/- \[ \] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" disabled class="rounded w-3 h-3" aria-label="$1" /> <span class="text-sm">$1</span></div>');
55
+ html = html.replace(/- \[x\] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" checked disabled class="rounded w-3 h-3" aria-label="$1" /> <span class="text-sm">$1</span></div>');
56
56
 
57
57
  // Horizontal rule
58
58
  html = html.replace(/^---$/gim, '<hr class="my-3 border-border" />');
@@ -0,0 +1,31 @@
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
2
+ import * as FormattedDocumentStories from './formatted-document.stories';
3
+
4
+ <Meta of={FormattedDocumentStories} />
5
+
6
+ <Title />
7
+ <Subtitle>A lightweight markdown renderer for displaying AI-generated summaries and documentation.</Subtitle>
8
+
9
+ <Description />
10
+
11
+ <Primary />
12
+
13
+ ---
14
+
15
+ ## Usage Patterns
16
+
17
+ ### Collapsible Content
18
+ Ideal for displaying long AI responses where a "See more" toggle is needed to preserve page verticality.
19
+
20
+ <Canvas>
21
+ <FormattedDocumentStories.Default />
22
+ </Canvas>
23
+
24
+ ---
25
+
26
+ ## AI Best Practices
27
+
28
+ > [!IMPORTANT]
29
+ > - **Markdown Compatibility** — Supports basic markdown: headers (`#`), bold (`**`), lists (`-`), and checkboxes (`- [ ]`). It does not support complex nested tables or markdown-in-html.
30
+ > - **Preview Mode** — Use `maxPreviewLength` to control the initial character count before truncation. Defaults to 500.
31
+ > - **Safe Injection** — Content is rendered via `dangerouslySetInnerHTML`. Ensure the source content (e.g., from an AI API) is trustable and sanitized if necessary.
@@ -0,0 +1,51 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { FormattedDocument } from './FormattedDocument';
3
+ import React from 'react';
4
+
5
+ const meta: Meta<typeof FormattedDocument> = {
6
+ title: 'High-Level/FormattedDocument',
7
+ component: FormattedDocument,
8
+ argTypes: {
9
+ maxPreviewLength: { control: 'number' },
10
+ },
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof FormattedDocument>;
15
+
16
+ const longContent = `# Proposta Estratégica Xertica
17
+ ## Visão Geral
18
+ Esta proposta descreve a implementação de uma camada de inteligência artificial generativa em toda a jornada do cliente.
19
+
20
+ ### Objetivos Principais
21
+ - Redução de latência no atendimento em até 40%
22
+ - Aumento na taxa de conversão de leads qualificados
23
+ - Automação de relatórios semanais para gestão
24
+
25
+ ### Cronograma
26
+ 1. **Semana 1-2:** Discovery e Mapeamento de Dados
27
+ 2. **Semana 3-4:** Setup de Infraestrutura e Agentes
28
+ 3. **Semana 5-8:** Implementação Pilot e Feedback Loop
29
+
30
+ ## Detalhamento Técnico
31
+ A arquitetura baseia-se em RAG (Retrieval Augmented Generation) utilizando bases vetoriais de alto desempenho. Os agentes são orquestrados em tempo real para garantir respostas precisas e contextuais.
32
+
33
+ - [x] Definição de personas
34
+ - [x] Configuração de guardrails
35
+ - [ ] Integração com CRM
36
+ - [ ] Deploy global
37
+
38
+ ---
39
+ **Nota:** Esta é uma versão preliminar para revisão da diretoria.`;
40
+
41
+ export const Default: Story = {
42
+ args: {
43
+ content: longContent,
44
+ maxPreviewLength: 200,
45
+ },
46
+ render: (args) => (
47
+ <div className="w-full max-w-xl p-6 border rounded-xl bg-card">
48
+ <FormattedDocument {...args} />
49
+ </div>
50
+ ),
51
+ };
@@ -0,0 +1 @@
1
+ export * from './FormattedDocument';
@@ -0,0 +1 @@
1
+ export * from './MarkdownMessage';
@@ -0,0 +1,44 @@
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
2
+ import * as MarkdownMessageStories from './markdown-message.stories';
3
+
4
+ <Meta of={MarkdownMessageStories} />
5
+
6
+ <Title />
7
+ <Subtitle>Renders AI assistant messages as formatted Markdown with syntax-highlighted code blocks.</Subtitle>
8
+
9
+ <Description />
10
+
11
+ <Primary />
12
+
13
+ ---
14
+
15
+ ## Usage
16
+
17
+ ```tsx
18
+ import { MarkdownMessage } from 'xertica-ui';
19
+
20
+ <MarkdownMessage content="**Hello!** Here is a `code` example." />
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Prop | Type | Default | Description |
26
+ |---|---|---|---|
27
+ | `content` | `string` | _(required)_ | The Markdown string to render |
28
+ | `className` | `string` | `''` | Additional CSS classes on the root container |
29
+
30
+ ## Supported Markdown
31
+
32
+ - **Bold**, _italic_, ~~strikethrough~~
33
+ - `inline code` and fenced code blocks with syntax highlighting
34
+ - Lists (ordered and unordered)
35
+ - Headers (`# H1`, `## H2`, etc.)
36
+ - Tables
37
+ - Blockquotes
38
+
39
+ ## AI Rules
40
+
41
+ > [!IMPORTANT]
42
+ > - This component is used **exclusively inside** `XerticaAssistant` message bubbles.
43
+ > - Do not use it for general-purpose Markdown rendering outside the assistant context — use a standard Markdown library instead.
44
+ > - Always sanitize content before passing it if coming from untrusted sources.
@@ -0,0 +1,50 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { MarkdownMessage } from './MarkdownMessage';
3
+
4
+ const meta: Meta<typeof MarkdownMessage> = {
5
+ title: 'Assistant/MarkdownMessage',
6
+ component: MarkdownMessage,
7
+ };
8
+
9
+ export default meta;
10
+ type Story = StoryObj<typeof MarkdownMessage>;
11
+
12
+ export const Default: Story = {
13
+ args: {
14
+ content: `
15
+ # Markdown Message Example
16
+
17
+ This component renders **Markdown** content sent by the AI assistant.
18
+
19
+ - It supports **bold** and _italic_ text.
20
+ - It supports [links](https://xertica.com).
21
+ - It supports code blocks:
22
+
23
+ \`\`\`javascript
24
+ function hello() {
25
+ console.log("Hello, Xertica!");
26
+ }
27
+ \`\`\`
28
+
29
+ > "The advance of technology is based on making it fit in so that you don't even notice it, so it's part of everyday life." - Bill Gates
30
+ `.trim(),
31
+ },
32
+ };
33
+
34
+ export const Short: Story = {
35
+ args: {
36
+ content: '**Short message** with some `inline code`.',
37
+ },
38
+ };
39
+
40
+ export const Table: Story = {
41
+ args: {
42
+ content: `
43
+ | Project | Status | Health |
44
+ |---|---|---|
45
+ | Analytics V2 | Active | ✅ Healthy |
46
+ | CRM Refactor | On Hold | ⚠️ Warning |
47
+ | Mobile App | Completed | 🏆 Done |
48
+ `.trim(),
49
+ },
50
+ };
@@ -1,8 +1,8 @@
1
1
  import React, { useRef, useEffect, useState } from 'react';
2
2
  import { motion, AnimatePresence } from 'framer-motion';
3
3
  import { Send, Plus, Paperclip, Mic, FileText, Radio, Search, X } from 'lucide-react';
4
- import { Button } from './ui/button';
5
- import { Popover, PopoverContent, PopoverTrigger } from './ui/popover';
4
+ import { Button } from '../../ui/button';
5
+ import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover';
6
6
  import { toast } from 'sonner';
7
7
 
8
8
  /**
@@ -318,6 +318,7 @@ export function ModernChatInput({
318
318
  <button
319
319
  onClick={handleRemoveAction}
320
320
  className="ml-1 hover:bg-white/20 rounded-full p-0.5 transition-colors"
321
+ aria-label="Remover ação"
321
322
  >
322
323
  <X className="w-3 h-3" />
323
324
  </button>
@@ -338,6 +339,7 @@ export function ModernChatInput({
338
339
  onFocus={handleFocus}
339
340
  onBlur={handleBlur}
340
341
  placeholder={placeholder}
342
+ aria-label={placeholder || "Mensagem para o Xertica"}
341
343
  disabled={disabled}
342
344
  className="w-full bg-transparent border-0 outline-none resize-none text-foreground placeholder-muted-foreground text-sm leading-5 min-h-[20px] max-h-[100px] overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent"
343
345
  style={{
@@ -363,6 +365,7 @@ export function ModernChatInput({
363
365
  variant="ghost"
364
366
  size="sm"
365
367
  className="h-8 w-8 p-0 rounded-full text-muted-foreground hover:bg-accent hover:text-foreground transition-all duration-200"
368
+ aria-label="Ver ações"
366
369
  >
367
370
  <Plus className="w-4 h-4" />
368
371
  </Button>
@@ -431,6 +434,7 @@ export function ModernChatInput({
431
434
  size="sm"
432
435
  onClick={onFileUpload}
433
436
  className="h-8 w-8 p-0 rounded-full text-muted-foreground hover:bg-accent hover:text-foreground transition-all duration-200"
437
+ aria-label="Anexar arquivo"
434
438
  >
435
439
  <Paperclip className="w-4 h-4" />
436
440
  </Button>
@@ -453,6 +457,7 @@ export function ModernChatInput({
453
457
  ? 'bg-destructive hover:bg-destructive/90 text-white animate-pulse'
454
458
  : 'text-muted-foreground hover:bg-accent hover:text-foreground'
455
459
  }`}
460
+ aria-label={isRecording ? "Parar gravação" : "Sugerir com voz"}
456
461
  >
457
462
  <Mic className="w-4 h-4" />
458
463
  </Button>
@@ -480,6 +485,7 @@ export function ModernChatInput({
480
485
  ? 'bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg shadow-primary/30 hover:shadow-primary/40'
481
486
  : 'bg-muted text-muted-foreground cursor-not-allowed'
482
487
  }`}
488
+ aria-label="Enviar mensagem"
483
489
  >
484
490
  <motion.div
485
491
  animate={{
@@ -0,0 +1 @@
1
+ export * from './ModernChatInput';
@@ -0,0 +1,38 @@
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
2
+ import * as ModernChatInputStories from './modern-chat-input.stories';
3
+
4
+ <Meta of={ModernChatInputStories} />
5
+
6
+ <Title />
7
+ <Subtitle>An advanced, high-performance chat input for the Xertica Assistant.</Subtitle>
8
+
9
+ <Description />
10
+
11
+ <Primary />
12
+
13
+ ---
14
+
15
+ ## Usage Patterns
16
+
17
+ ### Standard Floating Input
18
+ Optimized for chat interfaces with multi-line support, voice recording, and action chips.
19
+
20
+ <Canvas>
21
+ <ModernChatInputStories.Default />
22
+ </Canvas>
23
+
24
+ ### Full-Page Variant
25
+ Adjusts maximum width and alignment for use in standalone chat pages.
26
+
27
+ <Canvas>
28
+ <ModernChatInputStories.FullPage />
29
+ </Canvas>
30
+
31
+ ---
32
+
33
+ ## AI Best Practices
34
+
35
+ > [!IMPORTANT]
36
+ > - **Action Workflow** — Handle the `onSubmit` callback's optional `action` parameter to distinguish between standard text messages and intent-driven generations (Documents, Podcasts, Search).
37
+ > - **State Sync** — Always maintain the `value` in a parent state and update it via `onChange` and `onVoiceRecording` to ensure consistent data binding.
38
+ > - **Dynamic Sizing** — The input automatically expands up to 100px based on content; ensure the parent container can accommodate these height changes without layout shift.
@@ -0,0 +1,52 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ModernChatInput } from './ModernChatInput';
3
+ import React, { useState } from 'react';
4
+
5
+ const meta: Meta<typeof ModernChatInput> = {
6
+ title: 'High-Level/ModernChatInput',
7
+ component: ModernChatInput,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof ModernChatInput>;
15
+
16
+ export const Default: Story = {
17
+ render: () => {
18
+ const [value, setValue] = useState("");
19
+ return (
20
+ <div className="w-[600px]">
21
+ <ModernChatInput
22
+ value={value}
23
+ onChange={setValue}
24
+ onSubmit={(action) => {
25
+ alert(`Submitted: "${value}" ${action ? `with action: ${action}` : ""}`);
26
+ setValue("");
27
+ }}
28
+ onVoiceRecording={(text) => setValue(text)}
29
+ />
30
+ </div>
31
+ );
32
+ },
33
+ };
34
+
35
+ export const FullPage: Story = {
36
+ args: {
37
+ isFullPage: true,
38
+ },
39
+ render: (args) => {
40
+ const [value, setValue] = useState("Preciso de ajuda com os relatórios");
41
+ return (
42
+ <div className="w-full bg-slate-50 p-10 min-h-[300px]">
43
+ <ModernChatInput
44
+ {...args}
45
+ value={value}
46
+ onChange={setValue}
47
+ onSubmit={() => setValue("")}
48
+ />
49
+ </div>
50
+ );
51
+ },
52
+ };
@@ -0,0 +1 @@
1
+ export * from './xertica-assistant';
@@ -0,0 +1,39 @@
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
2
+ import * as AssistantStories from './xertica-assistant.stories';
3
+
4
+ <Meta of={AssistantStories} />
5
+
6
+ <Title />
7
+ <Subtitle>An embedded AI-powered assistant panel powered by Gemini.</Subtitle>
8
+
9
+ <Description />
10
+
11
+ <Primary />
12
+
13
+ ---
14
+
15
+ ## Layout Integration
16
+ The assistant panel is intensely integrated into the responsive behavior of the primary layout shell.
17
+
18
+ ### Desktop & Mobile
19
+ On desktop, it sits flush against the right side. On mobile, it transitions into a floating action button.
20
+
21
+ <Canvas>
22
+ <AssistantStories.Default />
23
+ </Canvas>
24
+
25
+ ### Custom Tabs
26
+ Extend the assistant with specialized tabs for domain-specific insights.
27
+
28
+ <Canvas>
29
+ <AssistantStories.CustomTabs />
30
+ </Canvas>
31
+
32
+ ---
33
+
34
+ ## AI Best Practices
35
+
36
+ > [!IMPORTANT]
37
+ > - **API Key** — Ensure `apiKey` is provided in `<XerticaProvider>`.
38
+ > - **State Management** — Use `toggleAssistente()` from `useLayout()` to manage visibility.
39
+ > - **System Prompt** — Always provide a context-specific `systemPrompt` for better AI relevance.