xertica-ui 1.7.4 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +184 -227
  3. package/components/Introduction.mdx +3 -0
  4. package/components/assistant/code-block/CodeBlock.tsx +2 -2
  5. package/components/assistant/code-block/code-block.stories.tsx +1 -1
  6. package/components/assistant/code-block/code-block.test.tsx +44 -44
  7. package/components/assistant/formatted-document/FormattedDocument.tsx +14 -3
  8. package/components/assistant/formatted-document/formatted-document.test.tsx +42 -42
  9. package/components/assistant/markdown-message/MarkdownMessage.tsx +14 -4
  10. package/components/assistant/markdown-message/markdown-message.test.tsx +33 -33
  11. package/components/assistant/modern-chat-input/ModernChatInput.tsx +11 -10
  12. package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +2 -1
  13. package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +72 -72
  14. package/components/assistant/xertica-assistant/xertica-assistant.mdx +14 -16
  15. package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +53 -24
  16. package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +65 -65
  17. package/components/assistant/xertica-assistant/xertica-assistant.tsx +10 -8
  18. package/components/brand/branding/branding.mdx +27 -27
  19. package/components/brand/language-selector/language-selector.test.tsx +27 -27
  20. package/components/brand/theme-toggle/theme-toggle.test.tsx +34 -34
  21. package/components/brand/xertica-logo/xertica-logo.test.tsx +26 -26
  22. package/components/brand/xertica-orbe/xertica-orbe.test.tsx +19 -19
  23. package/components/brand/xertica-provider/xertica-provider.test.tsx +29 -29
  24. package/components/brand/xertica-xlogo/xertica-xlogo.test.tsx +16 -16
  25. package/components/examples/LocationPickerExample.tsx +328 -328
  26. package/components/examples/RouteMapExamples.tsx +329 -329
  27. package/components/index.ts +3 -4
  28. package/components/layout/header/header.test.tsx +70 -70
  29. package/components/layout/sidebar/sidebar.test.tsx +67 -67
  30. package/components/layout/sidebar/sidebar.tsx +1 -0
  31. package/components/media/FloatingMediaWrapper.tsx +221 -54
  32. package/components/media/audio-player/AudioPlayer.mdx +67 -0
  33. package/components/media/audio-player/AudioPlayer.stories.tsx +120 -0
  34. package/components/media/audio-player/AudioPlayer.test.tsx +106 -0
  35. package/components/media/audio-player/AudioPlayer.tsx +654 -0
  36. package/components/media/video-player/VideoPlayer.mdx +103 -0
  37. package/components/media/video-player/VideoPlayer.stories.tsx +94 -0
  38. package/components/media/video-player/VideoPlayer.test.tsx +73 -0
  39. package/components/media/{VideoPlayer.tsx → video-player/VideoPlayer.tsx} +27 -21
  40. package/components/media/video-player/index.ts +1 -0
  41. package/components/pages/forgot-password-page/forgot-password-page.test.tsx +42 -42
  42. package/components/pages/home-page/home-page.test.tsx +41 -41
  43. package/components/pages/login-page/login-page.test.tsx +60 -60
  44. package/components/pages/template-page/template-page.test.tsx +38 -38
  45. package/components/shared/assistant-utils.test.ts +18 -18
  46. package/components/shared/use-mobile.test.ts +16 -16
  47. package/components/shared/utils.test.ts +14 -14
  48. package/components/ui/accordion/accordion.test.tsx +64 -64
  49. package/components/ui/alert/alert.test.tsx +55 -55
  50. package/components/ui/alert-dialog/alert-dialog.stories.tsx +8 -2
  51. package/components/ui/alert-dialog/alert-dialog.test.tsx +68 -68
  52. package/components/ui/aspect-ratio/aspect-ratio.test.tsx +28 -28
  53. package/components/ui/assistant-chart/assistant-chart.test.tsx +42 -42
  54. package/components/ui/avatar/avatar.stories.tsx +26 -5
  55. package/components/ui/avatar/avatar.test.tsx +55 -55
  56. package/components/ui/badge/badge.test.tsx +40 -40
  57. package/components/ui/breadcrumb/breadcrumb.stories.tsx +35 -7
  58. package/components/ui/breadcrumb/breadcrumb.test.tsx +70 -70
  59. package/components/ui/button/button.test.tsx +64 -64
  60. package/components/ui/button/button.tsx +4 -4
  61. package/components/ui/calendar/calendar.stories.tsx +2 -2
  62. package/components/ui/calendar/calendar.test.tsx +47 -47
  63. package/components/ui/card/card.test.tsx +55 -55
  64. package/components/ui/card/card.tsx +1 -1
  65. package/components/ui/carousel/carousel.stories.tsx +10 -2
  66. package/components/ui/carousel/carousel.test.tsx +74 -74
  67. package/components/ui/chart/chart.test.tsx +49 -49
  68. package/components/ui/checkbox/checkbox.test.tsx +38 -38
  69. package/components/ui/collapsible/collapsible.stories.tsx +36 -30
  70. package/components/ui/collapsible/collapsible.test.tsx +51 -51
  71. package/components/ui/command/command.stories.tsx +2 -2
  72. package/components/ui/command/command.test.tsx +48 -48
  73. package/components/ui/command/command.tsx +2 -0
  74. package/components/ui/context-menu/context-menu.stories.tsx +2 -2
  75. package/components/ui/context-menu/context-menu.test.tsx +59 -59
  76. package/components/ui/dialog/dialog.stories.tsx +11 -0
  77. package/components/ui/dialog/dialog.test.tsx +76 -76
  78. package/components/ui/drawer/drawer.stories.tsx +19 -2
  79. package/components/ui/drawer/drawer.test.tsx +65 -65
  80. package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +13 -2
  81. package/components/ui/dropdown-menu/dropdown-menu.test.tsx +60 -60
  82. package/components/ui/empty/empty.stories.tsx +39 -11
  83. package/components/ui/empty/empty.test.tsx +37 -37
  84. package/components/ui/file-upload/file-upload.test.tsx +65 -65
  85. package/components/ui/form/form.test.tsx +80 -80
  86. package/components/ui/google-maps-loader/google-maps-loader.test.tsx +35 -35
  87. package/components/ui/hover-card/hover-card.stories.tsx +18 -2
  88. package/components/ui/hover-card/hover-card.test.tsx +50 -50
  89. package/components/ui/input/input.test.tsx +47 -47
  90. package/components/ui/input-otp/input-otp.stories.tsx +22 -17
  91. package/components/ui/input-otp/input-otp.test.tsx +56 -56
  92. package/components/ui/label/label.stories.tsx +16 -2
  93. package/components/ui/label/label.test.tsx +21 -21
  94. package/components/ui/map/map.test.tsx +74 -74
  95. package/components/ui/map/mock.test.tsx +13 -13
  96. package/components/ui/map-layers/map-layers.test.tsx +44 -44
  97. package/components/ui/menubar/menubar.stories.tsx +19 -5
  98. package/components/ui/menubar/menubar.test.tsx +51 -51
  99. package/components/ui/navigation-menu/navigation-menu.stories.tsx +19 -5
  100. package/components/ui/navigation-menu/navigation-menu.test.tsx +47 -47
  101. package/components/ui/notification-badge/notification-badge.stories.tsx +3 -3
  102. package/components/ui/notification-badge/notification-badge.test.tsx +61 -61
  103. package/components/ui/page-header/page-header.test.tsx +42 -42
  104. package/components/ui/pagination/pagination.stories.tsx +25 -7
  105. package/components/ui/pagination/pagination.test.tsx +61 -61
  106. package/components/ui/popover/popover.stories.tsx +9 -2
  107. package/components/ui/popover/popover.test.tsx +50 -50
  108. package/components/ui/progress/progress.test.tsx +23 -23
  109. package/components/ui/progress/progress.tsx +1 -0
  110. package/components/ui/radio-group/radio-group.stories.tsx +13 -2
  111. package/components/ui/radio-group/radio-group.test.tsx +54 -54
  112. package/components/ui/rating/rating.test.tsx +48 -48
  113. package/components/ui/rating/rating.tsx +1 -0
  114. package/components/ui/resizable/resizable.test.tsx +58 -58
  115. package/components/ui/rich-text-editor/rich-text-editor.mdx +21 -7
  116. package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +55 -6
  117. package/components/ui/rich-text-editor/rich-text-editor.test.tsx +49 -46
  118. package/components/ui/rich-text-editor/rich-text-editor.tsx +79 -26
  119. package/components/ui/route-map/route-map.test.tsx +95 -95
  120. package/components/ui/scroll-area/scroll-area.stories.tsx +2 -2
  121. package/components/ui/scroll-area/scroll-area.test.tsx +27 -27
  122. package/components/ui/scroll-area/scroll-area.tsx +3 -0
  123. package/components/ui/search/search.test.tsx +54 -54
  124. package/components/ui/select/select.stories.tsx +31 -18
  125. package/components/ui/select/select.test.tsx +63 -63
  126. package/components/ui/separator/separator.stories.tsx +14 -2
  127. package/components/ui/separator/separator.test.tsx +23 -23
  128. package/components/ui/sheet/sheet.stories.tsx +13 -2
  129. package/components/ui/sheet/sheet.test.tsx +60 -60
  130. package/components/ui/simple-map/simple-map.test.tsx +47 -47
  131. package/components/ui/skeleton/skeleton.stories.tsx +2 -2
  132. package/components/ui/skeleton/skeleton.test.tsx +19 -19
  133. package/components/ui/slider/slider.test.tsx +25 -25
  134. package/components/ui/slider/slider.tsx +4 -3
  135. package/components/ui/sonner/sonner.test.tsx +24 -24
  136. package/components/ui/stats-card/stats-card.test.tsx +38 -38
  137. package/components/ui/stepper/stepper.stories.tsx +2 -2
  138. package/components/ui/stepper/stepper.test.tsx +47 -47
  139. package/components/ui/switch/switch.stories.tsx +12 -2
  140. package/components/ui/switch/switch.test.tsx +33 -33
  141. package/components/ui/table/table.stories.tsx +3 -3
  142. package/components/ui/table/table.test.tsx +50 -50
  143. package/components/ui/tabs/tabs.stories.tsx +16 -2
  144. package/components/ui/tabs/tabs.test.tsx +50 -50
  145. package/components/ui/textarea/textarea.test.tsx +28 -28
  146. package/components/ui/timeline/timeline.stories.tsx +27 -6
  147. package/components/ui/timeline/timeline.test.tsx +53 -53
  148. package/components/ui/toggle/toggle.test.tsx +32 -32
  149. package/components/ui/toggle-group/toggle-group.test.tsx +47 -47
  150. package/components/ui/tooltip/tooltip.stories.tsx +9 -2
  151. package/components/ui/tooltip/tooltip.test.tsx +37 -37
  152. package/components/ui/tree-view/tree-view.test.tsx +58 -58
  153. package/components.json +99 -20
  154. package/contexts/ApiKeyContext.test.tsx +26 -26
  155. package/contexts/ApiKeyContext.tsx +145 -145
  156. package/contexts/AssistenteContext.test.tsx +17 -17
  157. package/contexts/AssistenteContext.tsx +144 -144
  158. package/contexts/BrandColorsContext.test.tsx +21 -21
  159. package/contexts/LanguageContext.test.tsx +29 -29
  160. package/contexts/LanguageContext.tsx +35 -35
  161. package/contexts/LayoutContext.test.tsx +23 -23
  162. package/contexts/ThemeContext.test.tsx +36 -36
  163. package/contexts/ThemeContext.tsx +105 -105
  164. package/dist/components/AudioPlayer.d.ts +35 -35
  165. package/dist/components/CodeBlock.d.ts +28 -28
  166. package/dist/components/DocumentEditor.d.ts +26 -26
  167. package/dist/components/ForgotPasswordPage.d.ts +13 -13
  168. package/dist/components/FormattedDocument.d.ts +25 -25
  169. package/dist/components/Header.d.ts +72 -72
  170. package/dist/components/HomeContent.d.ts +20 -20
  171. package/dist/components/HomePage.d.ts +26 -26
  172. package/dist/components/LanguageSelector.d.ts +26 -26
  173. package/dist/components/LoginPage.d.ts +25 -25
  174. package/dist/components/MarkdownMessage.d.ts +24 -24
  175. package/dist/components/ModernChatInput.d.ts +44 -44
  176. package/dist/components/PodcastPlayer.d.ts +41 -41
  177. package/dist/components/ResetPasswordPage.d.ts +14 -14
  178. package/dist/components/Sidebar.d.ts +126 -126
  179. package/dist/components/TemplateContent.d.ts +19 -19
  180. package/dist/components/TemplatePage.d.ts +24 -24
  181. package/dist/components/ThemeToggle.d.ts +26 -26
  182. package/dist/components/VerifyEmailPage.d.ts +14 -14
  183. package/dist/components/XerticaLogo.d.ts +24 -24
  184. package/dist/components/XerticaOrbe.d.ts +23 -23
  185. package/dist/components/XerticaProvider.d.ts +35 -35
  186. package/dist/components/XerticaXLogo.d.ts +23 -23
  187. package/dist/components/assistant-utils.d.ts +21 -21
  188. package/dist/components/index.d.ts +2 -4
  189. package/dist/components/layout-constants.d.ts +8 -8
  190. package/dist/components/media/FloatingMediaWrapper.d.ts +5 -1
  191. package/dist/components/media/audio-player/AudioPlayer.d.ts +36 -0
  192. package/dist/components/media/audio-player/index.d.ts +1 -0
  193. package/dist/components/media/video-player/VideoPlayer.d.ts +9 -0
  194. package/dist/components/media/video-player/index.d.ts +1 -0
  195. package/dist/components/ui/accordion.d.ts +20 -20
  196. package/dist/components/ui/alert-dialog.d.ts +26 -26
  197. package/dist/components/ui/alert.d.ts +25 -25
  198. package/dist/components/ui/aspect-ratio.d.ts +14 -14
  199. package/dist/components/ui/avatar.d.ts +20 -20
  200. package/dist/components/ui/badge.d.ts +22 -22
  201. package/dist/components/ui/breadcrumb.d.ts +23 -23
  202. package/dist/components/ui/button.d.ts +37 -37
  203. package/dist/components/ui/calendar.d.ts +20 -20
  204. package/dist/components/ui/card.d.ts +21 -21
  205. package/dist/components/ui/carousel.d.ts +31 -31
  206. package/dist/components/ui/chart.d.ts +55 -55
  207. package/dist/components/ui/checkbox.d.ts +16 -16
  208. package/dist/components/ui/collapsible.d.ts +16 -16
  209. package/dist/components/ui/command.d.ts +29 -29
  210. package/dist/components/ui/context-menu.d.ts +37 -37
  211. package/dist/components/ui/dialog.d.ts +33 -33
  212. package/dist/components/ui/drawer.d.ts +26 -26
  213. package/dist/components/ui/dropdown-menu.d.ts +37 -37
  214. package/dist/components/ui/empty.d.ts +22 -22
  215. package/dist/components/ui/file-upload.d.ts +24 -24
  216. package/dist/components/ui/form.d.ts +37 -37
  217. package/dist/components/ui/hover-card.d.ts +18 -18
  218. package/dist/components/ui/input-otp.d.ts +23 -23
  219. package/dist/components/ui/input.d.ts +25 -25
  220. package/dist/components/ui/label.d.ts +15 -15
  221. package/dist/components/ui/map-layers.d.ts +48 -48
  222. package/dist/components/ui/map.d.ts +82 -82
  223. package/dist/components/ui/menubar.d.ts +39 -39
  224. package/dist/components/ui/navigation-menu.d.ts +26 -26
  225. package/dist/components/ui/notification-badge.d.ts +24 -24
  226. package/dist/components/ui/page-header.d.ts +76 -76
  227. package/dist/components/ui/pagination.d.ts +25 -25
  228. package/dist/components/ui/popover.d.ts +19 -19
  229. package/dist/components/ui/progress.d.ts +15 -15
  230. package/dist/components/ui/radio-group.d.ts +17 -17
  231. package/dist/components/ui/rating.d.ts +24 -24
  232. package/dist/components/ui/resizable.d.ts +39 -39
  233. package/dist/components/ui/route-map.d.ts +41 -41
  234. package/dist/components/ui/scroll-area.d.ts +16 -16
  235. package/dist/components/ui/search.d.ts +20 -20
  236. package/dist/components/ui/select.d.ts +27 -27
  237. package/dist/components/ui/separator.d.ts +15 -15
  238. package/dist/components/ui/sheet.d.ts +26 -26
  239. package/dist/components/ui/simple-map.d.ts +57 -57
  240. package/dist/components/ui/skeleton.d.ts +14 -14
  241. package/dist/components/ui/slider.d.ts +16 -16
  242. package/dist/components/ui/sonner.d.ts +15 -15
  243. package/dist/components/ui/stats-card.d.ts +29 -29
  244. package/dist/components/ui/stepper.d.ts +31 -31
  245. package/dist/components/ui/switch.d.ts +15 -15
  246. package/dist/components/ui/table.d.ts +22 -22
  247. package/dist/components/ui/tabs.d.ts +19 -19
  248. package/dist/components/ui/textarea.d.ts +15 -15
  249. package/dist/components/ui/timeline.d.ts +24 -24
  250. package/dist/components/ui/toggle-group.d.ts +24 -24
  251. package/dist/components/ui/toggle.d.ts +23 -23
  252. package/dist/components/ui/tooltip.d.ts +19 -19
  253. package/dist/components/ui/tree-view.d.ts +28 -28
  254. package/dist/components/ui/xertica-assistant.d.ts +241 -241
  255. package/dist/contexts/BrandColorsContext.d.ts +19 -19
  256. package/dist/index.es.js +815 -965
  257. package/dist/index.umd.js +814 -963
  258. package/dist/xertica-ui.css +1 -1
  259. package/docs/ai-usage.md +174 -174
  260. package/docs/architecture.md +1 -1
  261. package/docs/components/accordion.md +114 -114
  262. package/docs/components/alert-dialog.md +127 -127
  263. package/docs/components/aspect-ratio.md +58 -58
  264. package/docs/components/assistant.md +1 -1
  265. package/docs/components/audio-player.md +42 -34
  266. package/docs/components/avatar.md +103 -103
  267. package/docs/components/badge.md +75 -75
  268. package/docs/components/breadcrumb.md +104 -104
  269. package/docs/components/button.md +162 -162
  270. package/docs/components/calendar.md +99 -99
  271. package/docs/components/card.md +162 -162
  272. package/docs/components/carousel.md +100 -100
  273. package/docs/components/chart.md +148 -148
  274. package/docs/components/checkbox.md +86 -86
  275. package/docs/components/collapsible.md +91 -91
  276. package/docs/components/command.md +98 -98
  277. package/docs/components/context-menu.md +81 -81
  278. package/docs/components/dialog.md +155 -155
  279. package/docs/components/drawer.md +107 -107
  280. package/docs/components/dropdown-menu.md +131 -131
  281. package/docs/components/empty.md +136 -136
  282. package/docs/components/file-upload.md +83 -83
  283. package/docs/components/floating-media-wrapper.md +63 -0
  284. package/docs/components/form.md +150 -150
  285. package/docs/components/hover-card.md +86 -86
  286. package/docs/components/input-otp.md +102 -102
  287. package/docs/components/label.md +67 -67
  288. package/docs/components/map.md +76 -76
  289. package/docs/components/menubar.md +83 -83
  290. package/docs/components/navigation-menu.md +83 -83
  291. package/docs/components/notification-badge.md +61 -61
  292. package/docs/components/pagination.md +121 -121
  293. package/docs/components/popover.md +121 -121
  294. package/docs/components/progress.md +80 -80
  295. package/docs/components/radio-group.md +127 -127
  296. package/docs/components/rating.md +77 -77
  297. package/docs/components/resizable.md +88 -88
  298. package/docs/components/route-map.md +124 -124
  299. package/docs/components/scroll-area.md +58 -58
  300. package/docs/components/search.md +75 -75
  301. package/docs/components/select.md +148 -148
  302. package/docs/components/separator.md +58 -58
  303. package/docs/components/sheet.md +124 -124
  304. package/docs/components/skeleton.md +92 -92
  305. package/docs/components/slider.md +90 -90
  306. package/docs/components/sonner.md +118 -118
  307. package/docs/components/stats-card.md +119 -119
  308. package/docs/components/stepper.md +122 -122
  309. package/docs/components/switch.md +111 -111
  310. package/docs/components/table.md +138 -138
  311. package/docs/components/tabs.md +117 -117
  312. package/docs/components/textarea.md +86 -86
  313. package/docs/components/timeline.md +81 -81
  314. package/docs/components/toggle-group.md +68 -68
  315. package/docs/components/toggle.md +66 -66
  316. package/docs/components/tooltip.md +116 -116
  317. package/docs/components/tree-view.md +78 -78
  318. package/docs/components/use-mobile.md +100 -100
  319. package/docs/components/video-player.md +68 -0
  320. package/docs/guidelines.md +203 -203
  321. package/docs/llms.md +10 -2
  322. package/docs/patterns/analytics.md +208 -208
  323. package/docs/patterns/crud.md +158 -158
  324. package/docs/patterns/form.md +244 -244
  325. package/docs/patterns/login.md +167 -167
  326. package/guidelines/Guidelines.md +657 -657
  327. package/hooks/useTheme.test.tsx +16 -16
  328. package/llms-full.txt +21 -80
  329. package/llms.txt +15 -8
  330. package/mcp/resources.json +22 -22
  331. package/mcp/tools.json +35 -35
  332. package/package.json +2 -2
  333. package/scripts/a11y-audit.mjs +162 -0
  334. package/scripts/ai-validator.ts +83 -83
  335. package/styles/xertica/theme-map.css +3 -0
  336. package/templates/.env.example +2 -2
  337. package/templates/eslint.config.js +29 -29
  338. package/templates/package.json +2 -2
  339. package/templates/postcss.config.js +6 -6
  340. package/templates/src/app/pages/CrudTemplate.tsx +106 -106
  341. package/templates/src/app/pages/DashboardTemplate.tsx +101 -101
  342. package/templates/src/app/pages/FormTemplate.tsx +109 -109
  343. package/templates/src/app/pages/LoginTemplate.tsx +52 -52
  344. package/templates/src/main.tsx +10 -10
  345. package/templates/src/styles/index.css +4 -0
  346. package/templates/tsconfig.json +21 -21
  347. package/templates/tsconfig.node.json +12 -12
  348. package/templates/vite-env.d.ts +1 -1
  349. package/templates/vite.config.ts +7 -7
  350. package/utils/demo-responses.test.ts +10 -10
  351. package/utils/demo-responses.ts +114 -114
  352. package/utils/gemini.test.ts +24 -24
  353. package/components/blocks/audio-player/AudioPlayer.tsx +0 -244
  354. package/components/blocks/audio-player/audio-player.mdx +0 -31
  355. package/components/blocks/audio-player/audio-player.stories.tsx +0 -36
  356. package/components/blocks/audio-player/audio-player.test.tsx +0 -69
  357. package/components/blocks/document-editor/DocumentEditor.tsx +0 -530
  358. package/components/blocks/document-editor/document-editor.mdx +0 -31
  359. package/components/blocks/document-editor/document-editor.stories.tsx +0 -38
  360. package/components/blocks/document-editor/document-editor.test.tsx +0 -59
  361. package/components/blocks/document-editor/index.ts +0 -1
  362. package/components/blocks/podcast-player/PodcastPlayer.tsx +0 -464
  363. package/components/blocks/podcast-player/index.ts +0 -1
  364. package/components/blocks/podcast-player/podcast-player.mdx +0 -38
  365. package/components/blocks/podcast-player/podcast-player.stories.tsx +0 -55
  366. package/components/blocks/podcast-player/podcast-player.test.tsx +0 -53
  367. package/components/media/AudioPlayer.tsx +0 -284
  368. package/docs/components/document-editor.md +0 -69
  369. package/docs/components/podcast-player.md +0 -84
  370. /package/components/{blocks → media}/audio-player/index.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,32 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.8.0] — 2026-04-27
11
+
12
+ ### Added
13
+ - **VideoPlayer UI Enhancements** — Added gradient overlay on controls for improved contrast against video content:
14
+ - Gradient: `from-black/60 via-black/30 to-transparent` with `pt-12` spacing
15
+ - White progress bar with `bg-white/30` track, `bg-white` fill, and `rounded-r-sm` on filled portion
16
+ - White icons with `drop-shadow-md` for visibility
17
+ - Buttons use `text-white hover:text-white hover:bg-black/50` for proper hover states
18
+ - **Slider Visual Fixes** — Improved progress bar alignment:
19
+ - Added left margin `ml-2` to track for thumb alignment
20
+ - Added `rounded-r-sm` to Range for filled portion
21
+ - Adjusted track/margins for proper visual alignment at full value
22
+
23
+ ### Changed
24
+ - **Documentation** — Updated component counts across all docs:
25
+ - `llms.txt`: 75 → 97 components
26
+ - `llms-full.txt`: Added statistics table
27
+ - `docs/llms.md`: Added statistics section
28
+ - `Introduction.mdx`: Added "97 Components" badge
29
+ - **components.json** — 75 → 89 components (added missing Media, Assistant, Pages, and Map components)
30
+
31
+ ### Fixed
32
+ - **Slider Progress Bar** — Fixed visual gap where thumb doesn't align with filled bar at end position by adjusting track margins
33
+
34
+ ---
35
+
10
36
  ## [1.7.0] — 2026-04-23
11
37
 
12
38
  ### Fixed
package/README.md CHANGED
@@ -1,227 +1,184 @@
1
- # Xertica UI
2
-
3
- > **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with an AI-first documentation layer for accurate LLM-driven composition.
4
-
5
- [![npm version](https://img.shields.io/npm/v/xertica-ui)](https://www.npmjs.com/package/xertica-ui)
6
- [![license](https://img.shields.io/badge/license-proprietary-red)](./LICENSE)
7
-
8
- ---
9
-
10
- ## Quick Start CLI (Recommended)
11
-
12
- Scaffold a full application in seconds:
13
-
14
- ```bash
15
- npx xertica-ui@latest init my-app
16
- cd my-app
17
- npm run dev
18
- ```
19
-
20
- The CLI scaffolds a complete Vite + React + TypeScript project with routing, authentication pages, a sidebar layout, and all Xertica UI components pre-configured.
21
-
22
- ---
23
-
24
- ## Installation as a Library
25
-
26
- To add Xertica UI to an existing React project:
27
-
28
- ```bash
29
- npm install xertica-ui
30
- ```
31
-
32
- **1. Import the stylesheet** in your entry file (`main.tsx` or `App.tsx`):
33
-
34
- ```tsx
35
- import 'xertica-ui/style.css';
36
- ```
37
-
38
- **2. Wrap your app** with `XerticaProvider`:
39
-
40
- ```tsx
41
- import { XerticaProvider } from 'xertica-ui';
42
-
43
- function App() {
44
- return (
45
- <XerticaProvider>
46
- <YourApp />
47
- </XerticaProvider>
48
- );
49
- }
50
- ```
51
-
52
- **3. Use components:**
53
-
54
- ```tsx
55
- import { Button, Card, CardContent } from 'xertica-ui';
56
-
57
- export function Example() {
58
- return (
59
- <Card>
60
- <CardContent>
61
- <Button>Get Started</Button>
62
- </CardContent>
63
- </Card>
64
- );
65
- }
66
- ```
67
-
68
- ---
69
-
70
- ## XerticaProvider Props
71
-
72
- | Prop | Type | Description |
73
- |---|---|---|
74
- | `apiKey` | `string` | Google Gemini API key for the AI assistant |
75
- | `googleMapsApiKey` | `string` | Google Maps JavaScript API key |
76
- | `primaryColor` | `string` | Override the primary brand color |
77
- | `defaultBrandTheme` | `string` | Preset brand theme name |
78
- | `useCustomTokens` | `boolean` | Use local `tokens.css` instead of library defaults |
79
- | `disableDarkMode` | `boolean` | Disables dark mode support |
80
-
81
- ---
82
-
83
- ## Component Catalog
84
-
85
- ### Layout & Navigation
86
- `Header` · `Sidebar` · `PageHeader` · `PageHeaderHeading` · `PageHeaderDescription` · `Breadcrumb` · `NavigationMenu` · `Tabs` · `Pagination`
87
-
88
- ### Surfaces
89
- `Card` · `CardHeader` · `CardTitle` · `CardDescription` · `CardContent` · `CardFooter` · `Separator` · `ScrollArea` · `AspectRatio` · `ResizablePanelGroup`
90
-
91
- ### Form & Input
92
- `Form` · `FormField` · `FormItem` · `FormLabel` · `FormControl` · `FormMessage` · `Input` · `Textarea` · `Label` · `Checkbox` · `RadioGroup` · `Switch` · `Slider` · `Select` · `Calendar` · `InputOTP` · `FileUpload` · `Search`
93
-
94
- ### Actions
95
- `Button` · `Toggle` · `ToggleGroup` · `Rating`
96
-
97
- ### Data Display
98
- `Table` · `Badge` · `Avatar` · `Progress` · `Skeleton` · `Empty` · `StatsCard` · `Timeline` · `Stepper` · `TreeView` · `NotificationBadge` · `ChartContainer`
99
-
100
- ### Structure & Utilities
101
- `Accordion` · `Collapsible` · `Carousel` · `ScrollArea`
102
-
103
- ### Overlays & Feedback
104
- `Dialog` · `AlertDialog` · `Sheet` · `Drawer` · `Popover` · `HoverCard` · `Tooltip` · `Alert` · `Toaster` · `Command`
105
-
106
- ### Menus
107
- `DropdownMenu` · `ContextMenu` · `Menubar`
108
-
109
- ### Maps
110
- `Map` · `RouteMap`
111
-
112
- ### AI Features
113
- `XerticaAssistant`
114
-
115
- ### Hooks
116
- `useMobile` · `useIsMobile` · `useLayout`
117
-
118
- ---
119
-
120
- ## Design Tokens
121
-
122
- Xertica UI uses semantic CSS tokens **never use raw colors or Tailwind color classes**:
123
-
124
- ```
125
- Background: bg-background text-foreground
126
- Card surface: bg-card text-card-foreground
127
- Muted area: bg-muted text-muted-foreground
128
- Primary action: bg-primary text-primary-foreground
129
- Destructive: bg-destructive text-destructive-foreground
130
- Border: border-border
131
- ```
132
-
133
- Tokens are defined in `styles/xertica/tokens.css` and customizable per project:
134
-
135
- ```css
136
- :root {
137
- --primary: rgba(44, 39, 91, 1);
138
- --radius: 6px;
139
- --radius-card: 12px;
140
- }
141
- ```
142
-
143
- ---
144
-
145
- ## Dark Mode
146
-
147
- Full dark mode support via `data-mode="dark"` attribute or `.dark` class, managed automatically by `XerticaProvider`. User preference is persisted to `localStorage`.
148
-
149
- ---
150
-
151
- ## AI Agent / LLM Usage
152
-
153
- Xertica UI ships with a comprehensive AI-first documentation layer in `docs/`:
154
-
155
- | File | Purpose |
156
- |---|---|
157
- | `docs/llms.md` | **Start here** — master index for AI agents |
158
- | `docs/ai-usage.md` | Mandatory rules for LLM-driven code generation |
159
- | `docs/guidelines.md` | Design token semantics and composition rules |
160
- | `docs/layout.md` | `LayoutContext` and `useLayout` API reference |
161
- | `docs/components/*.md` | Per-component reference with props, examples, and AI rules |
162
- | `docs/patterns/*.md` | Full page composition patterns (dashboard, CRUD, form, etc.) |
163
-
164
- Point your LLM agent to `docs/llms.md` as the entrypoint.
165
-
166
- ---
167
-
168
- ## Tech Stack
169
-
170
- | Technology | Version |
171
- |---|---|
172
- | React | 18.3 |
173
- | TypeScript | 5.7 |
174
- | Tailwind CSS | 4.0 |
175
- | Vite | 6.0 |
176
- | Radix UI | latest |
177
- | Recharts | 2.x |
178
- | Lucide React | 0.469+ |
179
- | react-hook-form | 7.x |
180
- | zod | 3.x |
181
-
182
- ---
183
-
184
- ## Peer Dependencies
185
-
186
- ```json
187
- {
188
- "react": "^18.3.1",
189
- "react-dom": "^18.3.1",
190
- "react-router-dom": "^7.1.3"
191
- }
192
- ```
193
-
194
- ---
195
-
196
- ## Scripts
197
-
198
- | Command | Description |
199
- |---|---|
200
- | `npm run dev` | Start development server |
201
- | `npm run build` | Production bundle |
202
- | `npm run type-check` | TypeScript validation |
203
- | `npm run lint` | ESLint check |
204
-
205
- ---
206
-
207
- ## Troubleshooting
208
-
209
- **CSS not loading:**
210
- ```bash
211
- npm install
212
- rm -rf node_modules/.vite
213
- npm run dev
214
- ```
215
-
216
- **TypeScript errors:**
217
- ```bash
218
- npm run type-check
219
- ```
220
-
221
- **Maps not rendering:** Ensure `googleMapsApiKey` is passed to `<XerticaProvider>` and the Maps JavaScript API + Directions API are enabled in your Google Cloud project.
222
-
223
- ---
224
-
225
- ## License
226
-
227
- Proprietary — Xertica AI Team.
1
+ # Xertica UI
2
+
3
+ > **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with a robust AI-first documentation layer for precise LLM-driven composition and autonomous agent interaction.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/xertica-ui)](https://www.npmjs.com/package/xertica-ui)
6
+ [![license](https://img.shields.io/badge/license-proprietary-red)](./LICENSE)
7
+
8
+ ---
9
+
10
+ ## 🤖 AI-First Single Source of Truth
11
+
12
+ Xertica UI is specifically designed to be consumed by AI Agents (LLMs, code assistants, autonomous agents). We provide dedicated entry points for AI context:
13
+
14
+ | File | Purpose |
15
+ |---|---|
16
+ | [`llms.txt`](./llms.txt) | Standard index for AI crawlers and context-aware agents. |
17
+ | [`llms-full.txt`](./llms-full.txt) | **Complete documentation** of all 96 components in a single file for large-context LLMs. |
18
+ | `docs/llms.md` | Master index for agents to navigate the documentation folder. |
19
+
20
+ ---
21
+
22
+ ## 🚀 Quick Start — CLI (Recommended)
23
+
24
+ Scaffold a full application with pre-configured routing, layout, and components:
25
+
26
+ ```bash
27
+ npx xertica-ui@latest init my-app
28
+ cd my-app
29
+ npm run dev
30
+ ```
31
+
32
+ The CLI scaffolds a complete Vite + React + TypeScript project with Portuguese UI localization and English AI-ready documentation.
33
+
34
+ ---
35
+
36
+ ## 📦 Installation as a Library
37
+
38
+ To add Xertica UI to an existing React project:
39
+
40
+ ```bash
41
+ npm install xertica-ui
42
+ ```
43
+
44
+ **1. Import the stylesheet** in your entry file (`main.tsx` or `App.tsx`):
45
+
46
+ ```tsx
47
+ import 'xertica-ui/style.css';
48
+ ```
49
+
50
+ **2. Wrap your app** with `XerticaProvider`:
51
+
52
+ ```tsx
53
+ import { XerticaProvider } from 'xertica-ui';
54
+
55
+ function App() {
56
+ return (
57
+ <XerticaProvider>
58
+ <YourApp />
59
+ </XerticaProvider>
60
+ );
61
+ }
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 🛠️ The Layout System
67
+
68
+ Xertica UI features an autonomous layout system managed by `LayoutContext`.
69
+
70
+ ### Mandatory Page Structure
71
+ Every page **must** use the `<PageHeader>` component for its title and primary actions. Never use raw `h1` or `div` for headers.
72
+
73
+ ```tsx
74
+ import { PageHeader, PageHeaderHeading, Button } from 'xertica-ui';
75
+
76
+ export function MyPage() {
77
+ return (
78
+ <>
79
+ <PageHeader>
80
+ <PageHeaderHeading>Dashboard</PageHeaderHeading>
81
+ <Button>Action</Button>
82
+ </PageHeader>
83
+ <div className="p-6">
84
+ {/* Page Content */}
85
+ </div>
86
+ </>
87
+ );
88
+ }
89
+ ```
90
+
91
+ ### `useLayout()` Hook
92
+ Access the sidebar state, width, and toggle functions anywhere in the component tree:
93
+ ```tsx
94
+ const { sidebarWidth, isSidebarOpen, toggleSidebar } = useLayout();
95
+ ```
96
+
97
+ ---
98
+
99
+ ## 🧩 Component Catalog (96 Components)
100
+
101
+ ### Layout & Navigation
102
+ `Header` · `Sidebar` · `PageHeader` · `Breadcrumb` · `NavigationMenu` · `Tabs` · `Pagination` · `Accordion` · `Collapsible`
103
+
104
+ ### Core Surfaces
105
+ `Card` · `Separator` · `ScrollArea` · `AspectRatio` · `Resizable` · `Skeleton` · `Empty`
106
+
107
+ ### Forms & Inputs
108
+ `Form` · `Input` · `Textarea` · `RichTextEditor` · `Label` · `Checkbox` · `RadioGroup` · `Switch` · `Select` · `Slider` · `Calendar` · `InputOTP` · `FileUpload` · `Search`
109
+
110
+ ### Actions & Data
111
+ `Button` · `Toggle` · `ToggleGroup` · `Rating` · `Table` · `Badge` · `Avatar` · `Progress` · `StatsCard` · `Timeline` · `Stepper` · `TreeView` · `NotificationBadge` · `Chart`
112
+
113
+ ### Overlays & Feedback
114
+ `Dialog` · `AlertDialog` · `Sheet` · `Drawer` · `Popover` · `HoverCard` · `Tooltip` · `Alert` · `Sonner (Toast)` · `Command`
115
+
116
+ ---
117
+
118
+ ## 🌟 Specialized Modules
119
+
120
+ ### 🤖 AI Assistant
121
+ Integrated AI chat panel with workspace support.
122
+ - `XerticaAssistant` · `MarkdownMessage` · `CodeBlock` · `AssistantChart`
123
+
124
+ ### 🗺️ Maps & Geolocation
125
+ First-class Google Maps integration.
126
+ - `Map` · `RouteMap` · `SimpleMap` · `GoogleMapsLoader`
127
+
128
+ ### 🎙️ Media
129
+ - `AudioPlayer` · `VideoPlayer` · `FloatingMediaWrapper`
130
+
131
+ ---
132
+
133
+ ## 🎨 Design Tokens
134
+
135
+ Xertica UI uses semantic CSS tokens. **Never use raw colors or generic Tailwind color classes**:
136
+
137
+ ```
138
+ Background: bg-background text-foreground
139
+ Card surface: bg-card text-card-foreground
140
+ Muted area: bg-muted text-muted-foreground
141
+ Primary action: bg-primary text-primary-foreground
142
+ Destructive: bg-destructive text-destructive-foreground
143
+ Border: border-border
144
+ ```
145
+
146
+ ---
147
+
148
+ ## 🌍 Localization
149
+
150
+ - **UI Components**: Fully localized in **Portuguese (pt-BR)** for end-users.
151
+ - **Documentation/Code**: Strictly maintained in **English** for AI Agent compatibility and global developer standard.
152
+
153
+ ---
154
+
155
+ ## 💻 Tech Stack
156
+
157
+ | Technology | Version |
158
+ |---|---|
159
+ | React | 18.3 |
160
+ | TypeScript | 5.7 |
161
+ | Tailwind CSS | 4.0 |
162
+ | Vite | 6.0 |
163
+ | Radix UI | Latest |
164
+ | Lucide React | 0.469+ |
165
+ | Vitest | 4.1 |
166
+
167
+ ---
168
+
169
+ ## 📜 Scripts
170
+
171
+ | Command | Description |
172
+ |---|---|
173
+ | `npm run dev` | Start development server |
174
+ | `npm run build` | Production bundle |
175
+ | `npm run storybook` | Launch component library documentation |
176
+ | `npm run test` | Run unit tests via Vitest |
177
+ | `npm run type-check` | TypeScript validation |
178
+
179
+ ---
180
+
181
+ ## ⚖️ License
182
+
183
+ Proprietary — Xertica AI Team.
184
+
@@ -12,6 +12,9 @@ import { XerticaLogo } from './brand/xertica-logo/XerticaLogo';
12
12
  <p className="text-xl text-muted-foreground max-w-2xl">
13
13
  Official Design System for Xertica projects. Built with Tailwind CSS v4, Radix UI, and AI-first engineering.
14
14
  </p>
15
+ <div className="text-lg font-mono text-muted-foreground bg-muted px-4 py-2 rounded-lg">
16
+ 97 Components
17
+ </div>
15
18
  <div className="flex gap-4 pt-4">
16
19
  <a href="https://www.npmjs.com/package/xertica-ui" target="_blank" className="h-11 px-8 rounded-full border border-border bg-background text-foreground font-medium flex items-center hover:bg-accent transition-colors no-underline">
17
20
  NPM
@@ -232,9 +232,9 @@ export const CodeBlock = ({
232
232
  aria-label={copied ? "Copiado" : "Copiar código"}
233
233
  >
234
234
  {copied ? (
235
- <Check className="w-4 h-4 text-[var(--toast-success-icon)]" />
235
+ <Check className="w-4 h-4 text-[var(--toast-success-icon)]" aria-hidden="true" />
236
236
  ) : (
237
- <Copy className="w-4 h-4" />
237
+ <Copy className="w-4 h-4" aria-hidden="true" />
238
238
  )}
239
239
  </Button>
240
240
 
@@ -35,7 +35,7 @@ export const Default: Story = {
35
35
  code: exampleCode,
36
36
  language: 'tsx',
37
37
  filename: 'Counter.tsx',
38
- showLineNumbers: true,
38
+ showLineNumbers: false,
39
39
  },
40
40
  render: (args) => (
41
41
  <div className="w-full max-w-3xl">
@@ -1,44 +1,44 @@
1
- import { render, screen, fireEvent, waitFor } from '@testing-library/react';
2
- import { describe, it, expect, vi, beforeEach } from 'vitest';
3
- import { CodeBlock } from './CodeBlock';
4
- import React from 'react';
5
-
6
- describe('CodeBlock', () => {
7
- const mockWriteText = vi.fn().mockResolvedValue(undefined);
8
-
9
- beforeEach(() => {
10
- vi.clearAllMocks();
11
- // Mock clipboard API safely
12
- vi.stubGlobal('navigator', {
13
- clipboard: {
14
- writeText: mockWriteText,
15
- },
16
- });
17
- });
18
-
19
- it('renders code correctly', () => {
20
- const code = 'const x = 1;';
21
- const { container } = render(<CodeBlock code={code} language="typescript" />);
22
- // Simple check: is the text present in the container?
23
- expect(container.textContent).toContain(code);
24
- });
25
-
26
- it('shows filename in header', () => {
27
- render(<CodeBlock code="code" filename="test.ts" />);
28
- expect(screen.getByText('test.ts')).toBeInTheDocument();
29
- });
30
-
31
- it('copies code to clipboard when button is clicked', async () => {
32
- const code = 'copy me';
33
- render(<CodeBlock code={code} />);
34
-
35
- const copyButton = screen.getByLabelText('Copiar código');
36
- fireEvent.click(copyButton);
37
-
38
- expect(mockWriteText).toHaveBeenCalledWith(code);
39
-
40
- await waitFor(() => {
41
- expect(screen.getByLabelText('Copiado')).toBeInTheDocument();
42
- });
43
- });
44
- });
1
+ import { render, screen, fireEvent, waitFor } from '@testing-library/react';
2
+ import { describe, it, expect, vi, beforeEach } from 'vitest';
3
+ import { CodeBlock } from './CodeBlock';
4
+ import React from 'react';
5
+
6
+ describe('CodeBlock', () => {
7
+ const mockWriteText = vi.fn().mockResolvedValue(undefined);
8
+
9
+ beforeEach(() => {
10
+ vi.clearAllMocks();
11
+ // Mock clipboard API safely
12
+ vi.stubGlobal('navigator', {
13
+ clipboard: {
14
+ writeText: mockWriteText,
15
+ },
16
+ });
17
+ });
18
+
19
+ it('renders code correctly', () => {
20
+ const code = 'const x = 1;';
21
+ const { container } = render(<CodeBlock code={code} language="typescript" />);
22
+ // Simple check: is the text present in the container?
23
+ expect(container.textContent).toContain(code);
24
+ });
25
+
26
+ it('shows filename in header', () => {
27
+ render(<CodeBlock code="code" filename="test.ts" />);
28
+ expect(screen.getByText('test.ts')).toBeInTheDocument();
29
+ });
30
+
31
+ it('copies code to clipboard when button is clicked', async () => {
32
+ const code = 'copy me';
33
+ render(<CodeBlock code={code} />);
34
+
35
+ const copyButton = screen.getByLabelText('Copiar código');
36
+ fireEvent.click(copyButton);
37
+
38
+ expect(mockWriteText).toHaveBeenCalledWith(code);
39
+
40
+ await waitFor(() => {
41
+ expect(screen.getByLabelText('Copiado')).toBeInTheDocument();
42
+ });
43
+ });
44
+ });
@@ -50,9 +50,20 @@ export function FormattedDocument({ content, maxPreviewLength = 500, className =
50
50
  html = html.replace(/^[-*+] \[ \] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-0.5"><input type="checkbox" disabled class="rounded w-3.5 h-3.5 accent-primary" aria-label="$1" /> <span class="text-sm">$1</span></div>');
51
51
  html = html.replace(/^[-*+] \[x\] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-0.5"><input type="checkbox" checked disabled class="rounded w-3.5 h-3.5 accent-primary" aria-label="$1" /> <span class="text-sm">$1</span></div>');
52
52
 
53
- // Lists (Bullet and Numbered)
54
- html = html.replace(/^[-*+] (.*$)/gim, '<li class="ml-6 my-0.5 list-disc">$1</li>');
55
- html = html.replace(/^(\d+)\. (.*$)/gim, '<li class="ml-6 my-0.5 list-decimal">$2</li>');
53
+ // Lists (Bullet and Numbered) - Wrap blocks of items in ul/ol
54
+ html = html.replace(/((?:^[-*+] .*$(?:\n|$))+)/gim, (match) => {
55
+ const items = match.trim().split('\n').map(item =>
56
+ `<li class="ml-6 my-0.5 list-disc">${item.replace(/^[-*+] /i, '')}</li>`
57
+ ).join('');
58
+ return `<ul class="list-disc my-2">${items}</ul>`;
59
+ });
60
+
61
+ html = html.replace(/((?:^\d+\. .*$(?:\n|$))+)/gim, (match) => {
62
+ const items = match.trim().split('\n').map(item =>
63
+ `<li class="ml-6 my-0.5 list-decimal">${item.replace(/^\d+\. /i, '')}</li>`
64
+ ).join('');
65
+ return `<ol class="list-decimal my-2">${items}</ol>`;
66
+ });
56
67
 
57
68
  // Horizontal rule
58
69
  html = html.replace(/^---$/gim, '<hr class="my-2 border-border" />');