xertica-ui 2.1.3 → 2.1.4

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 (404) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -1
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/components/assistant/index.ts +6 -6
  6. package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +97 -0
  7. package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -0
  8. package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -0
  9. package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +86 -0
  10. package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +77 -0
  11. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +573 -0
  12. package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +65 -0
  13. package/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.tsx +41 -0
  14. package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +98 -0
  15. package/components/assistant/xertica-assistant/parts/index.ts +16 -0
  16. package/components/assistant/xertica-assistant/types.ts +139 -0
  17. package/components/assistant/xertica-assistant/use-assistant.ts +5 -10
  18. package/components/assistant/xertica-assistant/xertica-assistant.tsx +125 -1096
  19. package/components/blocks/card-patterns/ActivityCard.tsx +72 -72
  20. package/components/blocks/card-patterns/FeatureCard.tsx +100 -100
  21. package/components/blocks/card-patterns/NotificationCard.tsx +127 -127
  22. package/components/blocks/card-patterns/ProfileCard.tsx +84 -84
  23. package/components/blocks/card-patterns/ProjectCard.tsx +89 -89
  24. package/components/blocks/card-patterns/QuickActionCard.tsx +62 -62
  25. package/components/blocks/card-patterns/card-patterns.stories.tsx +445 -445
  26. package/components/blocks/card-patterns/index.ts +17 -17
  27. package/components/blocks/index.ts +1 -1
  28. package/components/brand/index.ts +6 -6
  29. package/components/brand/theme-toggle/ThemeToggle.tsx +8 -27
  30. package/components/brand/xertica-provider/XerticaProvider.tsx +48 -48
  31. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  32. package/components/brand/xertica-provider/xertica-provider.test.tsx +52 -52
  33. package/components/examples/MapExamples.tsx +282 -282
  34. package/components/examples/SimpleFilterableMap.tsx +191 -191
  35. package/components/examples/index.ts +51 -51
  36. package/components/figma/ImageWithFallback.tsx +27 -27
  37. package/components/hooks/index.ts +10 -7
  38. package/components/hooks/use-layout-shortcuts.ts +46 -0
  39. package/components/index.ts +5 -5
  40. package/components/layout/header/header.test.tsx +8 -8
  41. package/components/layout/header/header.tsx +4 -4
  42. package/components/layout/index.ts +2 -2
  43. package/components/layout/sidebar/sidebar.mdx +1 -1
  44. package/components/layout/sidebar/sidebar.test.tsx +11 -11
  45. package/components/layout/sidebar/sidebar.tsx +1 -31
  46. package/components/layout/sidebar/use-sidebar.ts +2 -11
  47. package/components/media/FloatingMediaWrapper.tsx +11 -11
  48. package/components/media/audio-player/AudioPlayer.tsx +140 -215
  49. package/components/media/audio-player/use-audio-player.ts +298 -0
  50. package/components/media/index.ts +3 -3
  51. package/components/pages/home-content/HomeContent.tsx +7 -7
  52. package/components/pages/home-content/home-content.mdx +62 -62
  53. package/components/pages/home-page/HomePage.stories.tsx +39 -39
  54. package/components/pages/home-page/home-page.mdx +53 -53
  55. package/components/pages/index.ts +8 -8
  56. package/components/pages/template-content/template-content.mdx +61 -61
  57. package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
  58. package/components/pages/template-page/template-page.mdx +53 -53
  59. package/components/public-api-smoke.test.tsx +52 -52
  60. package/components/shared/CustomTooltipContent.tsx +52 -0
  61. package/components/shared/assistant-utils.ts +43 -43
  62. package/components/ui/accordion/accordion.mdx +8 -8
  63. package/components/ui/accordion/accordion.stories.tsx +53 -53
  64. package/components/ui/alert/alert.mdx +8 -8
  65. package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
  66. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
  67. package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
  68. package/components/ui/avatar/avatar.mdx +8 -8
  69. package/components/ui/badge/badge.mdx +8 -8
  70. package/components/ui/badge/badge.tsx +9 -9
  71. package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
  72. package/components/ui/button/button.mdx +8 -8
  73. package/components/ui/calendar/calendar.mdx +8 -8
  74. package/components/ui/calendar/calendar.tsx +258 -258
  75. package/components/ui/card/card.mdx +8 -8
  76. package/components/ui/card/card.stories.tsx +245 -245
  77. package/components/ui/carousel/carousel.mdx +8 -8
  78. package/components/ui/chart/chart.mdx +8 -8
  79. package/components/ui/chart/chart.stories.tsx +1303 -1303
  80. package/components/ui/chart/chart.test.tsx +154 -154
  81. package/components/ui/chart/chart.tsx +2367 -2367
  82. package/components/ui/checkbox/checkbox.mdx +8 -8
  83. package/components/ui/checkbox/checkbox.stories.tsx +20 -20
  84. package/components/ui/collapsible/collapsible.mdx +8 -8
  85. package/components/ui/command/command.mdx +8 -8
  86. package/components/ui/context-menu/context-menu.mdx +8 -8
  87. package/components/ui/dialog/dialog.mdx +8 -8
  88. package/components/ui/drawer/drawer.mdx +8 -8
  89. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
  90. package/components/ui/empty/empty.mdx +8 -8
  91. package/components/ui/file-upload/file-upload.mdx +8 -8
  92. package/components/ui/google-maps-loader/google-maps-loader.tsx +2 -2
  93. package/components/ui/hover-card/hover-card.mdx +8 -8
  94. package/components/ui/input/input.mdx +8 -8
  95. package/components/ui/input-otp/input-otp.mdx +8 -8
  96. package/components/ui/input-otp/input-otp.stories.tsx +6 -6
  97. package/components/ui/label/label.mdx +8 -8
  98. package/components/ui/map/map.mdx +8 -8
  99. package/components/ui/map/map.stories.tsx +51 -51
  100. package/components/ui/map/map.tsx +2 -2
  101. package/components/ui/menubar/menubar.mdx +8 -8
  102. package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
  103. package/components/ui/notification-badge/notification-badge.mdx +8 -8
  104. package/components/ui/pagination/pagination.mdx +8 -8
  105. package/components/ui/popover/popover.mdx +8 -8
  106. package/components/ui/progress/progress.mdx +8 -8
  107. package/components/ui/progress/progress.tsx +68 -68
  108. package/components/ui/radio-group/radio-group.mdx +8 -8
  109. package/components/ui/rating/rating.mdx +8 -8
  110. package/components/ui/resizable/resizable.mdx +8 -8
  111. package/components/ui/route-map/route-map.mdx +8 -8
  112. package/components/ui/route-map/route-map.stories.tsx +54 -54
  113. package/components/ui/route-map/route-map.tsx +2 -2
  114. package/components/ui/scroll-area/scroll-area.mdx +8 -8
  115. package/components/ui/search/search.mdx +8 -8
  116. package/components/ui/select/select.mdx +8 -8
  117. package/components/ui/select/select.stories.tsx +9 -9
  118. package/components/ui/separator/separator.mdx +8 -8
  119. package/components/ui/sheet/sheet.mdx +8 -8
  120. package/components/ui/sheet/sheet.stories.tsx +95 -95
  121. package/components/ui/simple-map/simple-map.mdx +8 -8
  122. package/components/ui/simple-map/simple-map.stories.tsx +48 -48
  123. package/components/ui/skeleton/skeleton.mdx +8 -8
  124. package/components/ui/slider/slider.mdx +8 -8
  125. package/components/ui/sonner/sonner.mdx +8 -8
  126. package/components/ui/stats-card/stats-card.mdx +8 -8
  127. package/components/ui/stepper/stepper.mdx +8 -8
  128. package/components/ui/switch/switch.mdx +8 -8
  129. package/components/ui/switch/switch.stories.tsx +20 -20
  130. package/components/ui/table/table.mdx +8 -8
  131. package/components/ui/tabs/tabs.mdx +8 -8
  132. package/components/ui/tabs/tabs.stories.tsx +26 -26
  133. package/components/ui/textarea/textarea.mdx +8 -8
  134. package/components/ui/timeline/timeline.mdx +8 -8
  135. package/components/ui/toggle/toggle.mdx +8 -8
  136. package/components/ui/toggle-group/toggle-group.mdx +8 -8
  137. package/components/ui/tooltip/tooltip.mdx +8 -8
  138. package/components/ui/tree-view/tree-view.mdx +8 -8
  139. package/components.json +1512 -1512
  140. package/contexts/ApiKeyContext.tsx +72 -72
  141. package/contexts/AssistenteContext.tsx +17 -54
  142. package/contexts/BrandColorsContext.tsx +32 -43
  143. package/contexts/LanguageContext.tsx +13 -13
  144. package/contexts/LayoutContext.test.tsx +11 -11
  145. package/contexts/LayoutContext.tsx +24 -50
  146. package/contexts/ThemeContext.tsx +26 -26
  147. package/contexts/theme-data.ts +4 -4
  148. package/dist/{AssistantChart-DoZCyS5r.cjs → AssistantChart-9w31gdAb.cjs} +4 -4
  149. package/dist/{AssistantChart-CldVCVDe.cjs → AssistantChart-BAudAfne.cjs} +5 -5
  150. package/dist/{use-mobile-DRB3BQgD.cjs → AssistantChart-BAx9VQvb.cjs} +209 -1070
  151. package/dist/{AssistantChart-Cu3m7RBo.js → AssistantChart-BP8upjMk.js} +5 -5
  152. package/dist/{use-mobile-BvYdisLP.js → AssistantChart-CVko2A1W.js} +171 -1025
  153. package/dist/{AssistantChart-C_hwFRRr.js → AssistantChart-CVzmmhx4.js} +4 -4
  154. package/dist/{AudioPlayer-C12BjQBV.cjs → AudioPlayer-1ypwE2Wh.cjs} +126 -187
  155. package/dist/{AudioPlayer-DcFKRJE_.js → AudioPlayer-DuKXrCfy.js} +80 -141
  156. package/dist/CustomTooltipContent-DHjkY0ww.js +40 -0
  157. package/dist/CustomTooltipContent-c_K-DWRr.cjs +56 -0
  158. package/dist/{ThemeContext-BoH4NLfN.js → LanguageContext-BwhwC3G2.js} +27 -104
  159. package/dist/{ThemeContext-r69W20Xg.cjs → LanguageContext-DvUt5jBg.cjs} +27 -104
  160. package/dist/{LayoutContext-BvK-ggDa.cjs → LayoutContext-BDmcZfMH.cjs} +8 -20
  161. package/dist/{LayoutContext-BAql6ZRY.js → LayoutContext-dbQvdC4O.js} +8 -20
  162. package/dist/{ThemeContext-C2EwAPDt.js → ThemeContext-BbBNoFTG.js} +2 -2
  163. package/dist/{ThemeContext-vTjumZeM.cjs → ThemeContext-Cmr8Ex8H.cjs} +2 -2
  164. package/dist/ThemeContext-RTy1m2Uq.js +82 -0
  165. package/dist/ThemeContext-bSzuOit2.cjs +81 -0
  166. package/dist/VerifyEmailPage-BE-L9mB7.js +2828 -0
  167. package/dist/{VerifyEmailPage-Cwi3kbol.cjs → VerifyEmailPage-Bae2cBXT.cjs} +7 -7
  168. package/dist/VerifyEmailPage-CR7kb5df.cjs +2827 -0
  169. package/dist/{VerifyEmailPage-C0c2e5n0.js → VerifyEmailPage-C_ihbcth.js} +6 -6
  170. package/dist/VerifyEmailPage-CbgjOF0v.js +2828 -0
  171. package/dist/{VerifyEmailPage-DvMLZgFt.js → VerifyEmailPage-CdYPSJoO.js} +1 -1
  172. package/dist/{VerifyEmailPage-CYXtbKi3.cjs → VerifyEmailPage-DMBh4NM9.cjs} +1 -1
  173. package/dist/VerifyEmailPage-Dt7zgA4w.cjs +2827 -0
  174. package/dist/{XerticaProvider-CEoWMTxu.js → XerticaProvider-BITjgC5p.js} +2 -2
  175. package/dist/{XerticaProvider-CllrbMEJ.cjs → XerticaProvider-By8q3Roe.cjs} +2 -2
  176. package/dist/{XerticaProvider-cI9hSs27.cjs → XerticaProvider-CW9hpCdF.cjs} +9 -8
  177. package/dist/{XerticaProvider-DDuiIcKo.js → XerticaProvider-siSt9uG2.js} +5 -4
  178. package/dist/{LanguageSelector-D6uacAIM.cjs → XerticaXLogo-D8jf0SNv.cjs} +86 -102
  179. package/dist/{LanguageSelector-B5YfbHra.js → XerticaXLogo-fAJMy3H4.js} +87 -103
  180. package/dist/{alert-dialog-s-vmNkJ_.js → alert-dialog-iDe5VE5o.js} +3 -3
  181. package/dist/{alert-dialog-DSKByiKZ.cjs → alert-dialog-yckpaOpy.cjs} +3 -3
  182. package/dist/assistant.cjs.js +1 -1
  183. package/dist/assistant.es.js +1 -1
  184. package/dist/brand.cjs.js +2 -2
  185. package/dist/brand.es.js +2 -2
  186. package/dist/components/assistant/xertica-assistant/parts/AssistantCollapsedView.d.ts +13 -0
  187. package/dist/components/assistant/xertica-assistant/parts/AssistantConversationList.d.ts +16 -0
  188. package/dist/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.d.ts +17 -0
  189. package/dist/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.d.ts +19 -0
  190. package/dist/components/assistant/xertica-assistant/parts/AssistantHeader.d.ts +11 -0
  191. package/dist/components/assistant/xertica-assistant/parts/AssistantMessageBubble.d.ts +29 -0
  192. package/dist/components/assistant/xertica-assistant/parts/AssistantTabBar.d.ts +13 -0
  193. package/dist/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.d.ts +4 -0
  194. package/dist/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.d.ts +17 -0
  195. package/dist/components/assistant/xertica-assistant/parts/index.d.ts +16 -0
  196. package/dist/components/assistant/xertica-assistant/types.d.ts +106 -0
  197. package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +1 -2
  198. package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +2 -96
  199. package/dist/components/hooks/index.d.ts +3 -0
  200. package/dist/components/hooks/use-layout-shortcuts.d.ts +22 -0
  201. package/dist/components/media/audio-player/AudioPlayer.d.ts +4 -1
  202. package/dist/components/media/audio-player/use-audio-player.d.ts +72 -0
  203. package/dist/components/shared/CustomTooltipContent.d.ts +20 -0
  204. package/dist/components/ui/alert/alert.d.ts +1 -1
  205. package/dist/components/ui/badge/badge.d.ts +1 -1
  206. package/dist/components/ui/button/button.d.ts +2 -2
  207. package/dist/contexts/AssistenteContext.d.ts +10 -49
  208. package/dist/{google-maps-loader-Y-QkD-Li.cjs → google-maps-loader-BqsYL48U.cjs} +0 -5
  209. package/dist/{google-maps-loader-CTYySAun.js → google-maps-loader-t2IlYBzw.js} +0 -4
  210. package/dist/hooks.cjs.js +30 -10
  211. package/dist/hooks.es.js +25 -4
  212. package/dist/index-CkTUgOwX.js +8 -0
  213. package/dist/{index-COtD8bRW.cjs → index-D3RLKRAs.cjs} +1 -1
  214. package/dist/index.cjs.js +11 -11
  215. package/dist/index.es.js +11 -11
  216. package/dist/index.umd.js +454 -1027
  217. package/dist/layout.cjs.js +3 -10
  218. package/dist/layout.es.js +3 -10
  219. package/dist/media.cjs.js +1 -1
  220. package/dist/media.es.js +1 -1
  221. package/dist/pages.cjs.js +1 -1
  222. package/dist/pages.es.js +1 -1
  223. package/dist/{sidebar-CK_0ZQHj.cjs → sidebar-CVUGHOS_.cjs} +10 -57
  224. package/dist/{sidebar-CUuOvYhK.js → sidebar-CmvwjnVb.js} +10 -40
  225. package/dist/ui.cjs.js +4 -4
  226. package/dist/ui.es.js +4 -4
  227. package/dist/use-audio-player-Bkh23vQ3.js +177 -0
  228. package/dist/use-audio-player-Dn1NR9xN.cjs +176 -0
  229. package/dist/utils/color-utils.d.ts +51 -0
  230. package/dist/{xertica-assistant-dyP7KHM5.cjs → xertica-assistant-B1IaHXnB.cjs} +388 -529
  231. package/dist/xertica-assistant-BMqdyRVi.js +2082 -0
  232. package/dist/xertica-assistant-Bj3vBCq_.cjs +2081 -0
  233. package/dist/{xertica-assistant-yX1CFBBo.js → xertica-assistant-DPsESB6t.js} +390 -531
  234. package/dist/{CodeBlock-BgfYL_rD.cjs → xertica-assistant-Qp3ydksa.cjs} +51 -263
  235. package/dist/{CodeBlock-DnYNI8rQ.js → xertica-assistant-gnCJdcZY.js} +7 -219
  236. package/dist/xertica-ui.css +2 -2
  237. package/docs/architecture-improvements.md +463 -0
  238. package/docs/architecture.md +1 -1
  239. package/docs/components/assistant-chart.md +1 -1
  240. package/docs/components/audio-player.md +46 -0
  241. package/docs/components/branding.md +251 -0
  242. package/docs/components/calendar.md +154 -154
  243. package/docs/components/card-patterns.md +337 -337
  244. package/docs/components/card.md +235 -235
  245. package/docs/components/code-block.md +108 -0
  246. package/docs/components/formatted-document.md +113 -0
  247. package/docs/components/hooks.md +430 -0
  248. package/docs/components/image-with-fallback.md +106 -0
  249. package/docs/components/map-layers.md +140 -0
  250. package/docs/components/map.md +84 -84
  251. package/docs/components/modern-chat-input.md +163 -0
  252. package/docs/components/pages.md +351 -0
  253. package/docs/components/xertica-provider.md +24 -24
  254. package/docs/decision-tree.md +287 -287
  255. package/docs/doc-audit.md +223 -0
  256. package/docs/getting-started.md +154 -0
  257. package/docs/llms.md +25 -5
  258. package/docs/patterns/detail-page.md +276 -0
  259. package/docs/patterns/settings.md +346 -0
  260. package/docs/patterns/wizard.md +217 -0
  261. package/guidelines/Guidelines.md +252 -252
  262. package/hooks/useTheme.ts +3 -3
  263. package/imports/Podcast.tsx +388 -388
  264. package/imports/XerticaAi.tsx +45 -45
  265. package/imports/XerticaX.tsx +19 -19
  266. package/imports/svg-aueiaqngck.ts +11 -11
  267. package/imports/svg-v9krss1ozd.ts +16 -16
  268. package/imports/svg-vhrdofe3qe.ts +5 -5
  269. package/llms-compact.txt +327 -327
  270. package/llms.txt +160 -160
  271. package/package.json +203 -203
  272. package/styles/xertica/app-overrides/chat.css +61 -61
  273. package/styles/xertica/app-overrides/scrollbar.css +33 -33
  274. package/styles/xertica/integrations/google-maps.css +76 -76
  275. package/styles/xertica/integrations/sonner.css +73 -73
  276. package/templates/CLAUDE.md +182 -182
  277. package/templates/guidelines/Guidelines.md +325 -325
  278. package/templates/package.json +2 -2
  279. package/templates/src/features/auth/index.ts +4 -4
  280. package/templates/src/features/auth/ui/AuthPageShell.tsx +34 -34
  281. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
  282. package/templates/src/features/auth/ui/LoginContent.tsx +90 -90
  283. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +151 -151
  284. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +59 -59
  285. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +82 -82
  286. package/templates/src/features/home/index.ts +1 -1
  287. package/templates/src/features/home/ui/HomeContent.tsx +100 -100
  288. package/templates/src/features/template/index.ts +5 -5
  289. package/templates/src/features/template/ui/CrudTemplate.tsx +3 -3
  290. package/templates/src/features/template/ui/DashboardTemplate.tsx +3 -3
  291. package/templates/src/features/template/ui/FormTemplate.tsx +120 -120
  292. package/templates/src/features/template/ui/LoginTemplate.tsx +3 -3
  293. package/templates/src/pages/AssistantPage.tsx +328 -328
  294. package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
  295. package/templates/src/pages/HomePage.tsx +57 -57
  296. package/templates/src/pages/LoginPage.tsx +10 -10
  297. package/templates/src/pages/ResetPasswordPage.tsx +6 -6
  298. package/templates/src/pages/TemplatePage.tsx +30 -30
  299. package/templates/src/pages/VerifyEmailPage.tsx +6 -6
  300. package/templates/src/shared/config/navigation.ts +20 -20
  301. package/templates/src/shared/lib/auth.ts +20 -20
  302. package/templates/src/shared/types/auth.ts +3 -3
  303. package/templates/tsconfig.json +5 -5
  304. package/utils/color-utils.ts +72 -0
  305. package/utils/gemini.ts +140 -140
  306. package/dist/AudioPlayer-B1lt5cPl.cjs +0 -989
  307. package/dist/AudioPlayer-BZ7bibzU.cjs +0 -982
  308. package/dist/AudioPlayer-DMcG_c7L.js +0 -990
  309. package/dist/AudioPlayer-e8LfNoqO.js +0 -983
  310. package/dist/CodeBlock-7TTgmdGG.cjs +0 -2094
  311. package/dist/CodeBlock-BeSt1h5P.js +0 -2078
  312. package/dist/CodeBlock-BlcqlA9M.cjs +0 -2094
  313. package/dist/CodeBlock-Bnmeu5ez.cjs +0 -2094
  314. package/dist/CodeBlock-BtfPlbAI.js +0 -2078
  315. package/dist/CodeBlock-CIySIuYr.js +0 -2078
  316. package/dist/CodeBlock-CuPtUM-7.cjs +0 -2094
  317. package/dist/CodeBlock-D6ffWXgc.js +0 -2078
  318. package/dist/CodeBlock-D8dcwbit.cjs +0 -2094
  319. package/dist/CodeBlock-DMZrFnlw.cjs +0 -2094
  320. package/dist/CodeBlock-DlBehYN8.js +0 -2078
  321. package/dist/CodeBlock-DvKWbSnE.cjs +0 -2094
  322. package/dist/CodeBlock-DwMCfkFY.js +0 -2078
  323. package/dist/CodeBlock-Dy6CNYyj.js +0 -2078
  324. package/dist/CodeBlock-U1pPOQI7.cjs +0 -2094
  325. package/dist/CodeBlock-f_GpNhEB.js +0 -2078
  326. package/dist/CodeBlock-oB6u8nI1.js +0 -2078
  327. package/dist/CodeBlock-tZC31B73.cjs +0 -2094
  328. package/dist/ImageWithFallback-CGtidP6B.cjs +0 -4542
  329. package/dist/ImageWithFallback-lsg3pdFg.js +0 -4508
  330. package/dist/XerticaOrbe-KL1RBHzw.cjs +0 -1354
  331. package/dist/XerticaOrbe-zwS1p2a8.js +0 -1355
  332. package/dist/XerticaProvider-6btlAlzc.js +0 -17
  333. package/dist/XerticaProvider-BNoNOxQ5.cjs +0 -16
  334. package/dist/XerticaProvider-BlY2limY.cjs +0 -38
  335. package/dist/XerticaProvider-hSwhNQex.js +0 -39
  336. package/dist/breadcrumb-CqJ7bHY5.js +0 -161
  337. package/dist/breadcrumb-m9Hb2_XN.cjs +0 -177
  338. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +0 -35
  339. package/dist/components/blocks/audio-player/index.d.ts +0 -1
  340. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +0 -26
  341. package/dist/components/blocks/document-editor/index.d.ts +0 -1
  342. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +0 -41
  343. package/dist/components/blocks/podcast-player/index.d.ts +0 -1
  344. package/dist/dropdown-menu-BDB5CmQs.cjs +0 -247
  345. package/dist/dropdown-menu-DQidbKBD.js +0 -231
  346. package/dist/google-maps-loader-BFWp6VPd.js +0 -287
  347. package/dist/google-maps-loader-eS3uQ5TA.cjs +0 -287
  348. package/dist/header-Cgy6vYPk.cjs +0 -731
  349. package/dist/header-DRlT4jgI.js +0 -715
  350. package/dist/header-Dux00SI4.cjs +0 -731
  351. package/dist/header-EkGKXPsD.js +0 -715
  352. package/dist/header-WfEywpyc.cjs +0 -731
  353. package/dist/header-tifNQn2U.js +0 -715
  354. package/dist/index-BhapVLVj.js +0 -8
  355. package/dist/index-D6fxYEY8.cjs +0 -7
  356. package/dist/index-DW5tYe26.js +0 -8
  357. package/dist/input-2R4loU86.js +0 -127
  358. package/dist/input-DWANSKGb.cjs +0 -145
  359. package/dist/rich-text-editor-0mraWT5y.cjs +0 -2376
  360. package/dist/rich-text-editor-B6jMRLzk.cjs +0 -1939
  361. package/dist/rich-text-editor-B8_oYcIR.js +0 -1730
  362. package/dist/rich-text-editor-B9UbSXNb.js +0 -1203
  363. package/dist/rich-text-editor-BYuRBNBU.js +0 -2373
  364. package/dist/rich-text-editor-Bb9pySTs.cjs +0 -2374
  365. package/dist/rich-text-editor-BcL6L3cm.cjs +0 -2374
  366. package/dist/rich-text-editor-BoVZYtTs.cjs +0 -2391
  367. package/dist/rich-text-editor-CPV1lEPH.cjs +0 -1748
  368. package/dist/rich-text-editor-CoKqbCtu.cjs +0 -1799
  369. package/dist/rich-text-editor-Cw56T_mB.js +0 -2356
  370. package/dist/rich-text-editor-Cyt8qs2b.js +0 -1921
  371. package/dist/rich-text-editor-D6H84OcX.cjs +0 -1220
  372. package/dist/rich-text-editor-D76gD-QI.js +0 -2328
  373. package/dist/rich-text-editor-DKkokOnA.js +0 -1781
  374. package/dist/rich-text-editor-DNsdpN64.cjs +0 -2359
  375. package/dist/rich-text-editor-DfG8bCyY.js +0 -2358
  376. package/dist/rich-text-editor-Dxjw31Z4.js +0 -2341
  377. package/dist/rich-text-editor-DzP0Epmb.js +0 -2356
  378. package/dist/rich-text-editor-skplNlBM.cjs +0 -2345
  379. package/dist/select-Bkbr0f-Z.cjs +0 -162
  380. package/dist/select-CvIVdX2n.js +0 -145
  381. package/dist/slider-Bc5Hd0y1.js +0 -56
  382. package/dist/slider-N7hFFj6X.cjs +0 -73
  383. package/dist/tooltip-Ded96neP.cjs +0 -137
  384. package/dist/tooltip-HDOoD2-0.js +0 -120
  385. package/dist/use-mobile-B0hNy_Y6.cjs +0 -4303
  386. package/dist/use-mobile-BXuYROXM.js +0 -4202
  387. package/dist/use-mobile-Bbd51ASU.cjs +0 -4392
  388. package/dist/use-mobile-Bk6CX-TC.js +0 -4359
  389. package/dist/use-mobile-BzuxjzNX.cjs +0 -4392
  390. package/dist/use-mobile-CG2-SdXV.cjs +0 -4235
  391. package/dist/use-mobile-CKb5pqTs.js +0 -4269
  392. package/dist/use-mobile-CYuAuGDl.js +0 -4202
  393. package/dist/use-mobile-CaENcqm-.js +0 -4508
  394. package/dist/use-mobile-CbrYgJGJ.js +0 -4203
  395. package/dist/use-mobile-DMOvImGQ.cjs +0 -4542
  396. package/dist/use-mobile-DZvv7QMR.js +0 -4359
  397. package/dist/use-mobile-DdI_TXam.cjs +0 -4235
  398. package/dist/use-mobile-DlceKf8a.js +0 -4359
  399. package/dist/use-mobile-DsOnow1o.cjs +0 -4236
  400. package/dist/use-mobile-Kcj6jSnK.cjs +0 -4392
  401. package/dist/use-mobile-bnKcua_i.js +0 -4202
  402. package/dist/use-mobile-ncXBeE2z.cjs +0 -4235
  403. package/dist/{rich-text-editor-DgF8s7xW.js → rich-text-editor-BmsjY03B.js} +26 -26
  404. package/dist/{rich-text-editor-mWoaSCE4.cjs → rich-text-editor-GS2kpTAK.cjs} +26 -26
@@ -1,76 +1,76 @@
1
- /* ============================================
2
- 🧩 INTEGRATION: GOOGLE MAPS
3
- ============================================ */
4
-
5
- /* Google Maps InfoWindow Customization */
6
- .gm-style .gm-style-iw-c {
7
- background-color: var(--popover) !important;
8
- border-radius: var(--radius-lg) !important;
9
- box-shadow: var(--elevation-sm) !important;
10
- padding: 0 !important;
11
- border: 1px solid var(--border) !important;
12
- }
13
-
14
- .gm-style .gm-style-iw-d {
15
- overflow: auto !important;
16
- max-height: none !important;
17
- }
18
-
19
- /* Fix for Native POIs */
20
- .gm-style .gm-style-iw-c .gm-style-iw-ch {
21
- padding-top: var(--spacing-3) !important;
22
- padding-left: var(--spacing-4) !important;
23
- padding-right: var(--spacing-8) !important;
24
- padding-bottom: var(--spacing-2) !important;
25
- }
26
-
27
- .gm-style .gm-style-iw-c .gm-style-iw-d .poi-info-window,
28
- .gm-style .gm-style-iw-c .gm-style-iw-d .transit-container {
29
- padding: var(--spacing-4) !important;
30
- padding-top: 0 !important;
31
- }
32
-
33
- /* Close button - popover style */
34
- .gm-style .gm-ui-hover-effect {
35
- opacity: 1 !important;
36
- width: 32px !important;
37
- height: 32px !important;
38
- top: 8px !important;
39
- right: 8px !important;
40
- background-color: var(--muted) !important;
41
- border-radius: var(--radius) !important;
42
- transition: all 0.2s ease !important;
43
- }
44
-
45
- .gm-style .gm-ui-hover-effect:hover {
46
- background-color: var(--accent) !important;
47
- }
48
-
49
- .gm-style .gm-ui-hover-effect > span {
50
- background-color: var(--foreground) !important;
51
- width: 14px !important;
52
- height: 14px !important;
53
- margin: 9px !important;
54
- }
55
-
56
- /* InfoWindow Tip - popover style */
57
- .gm-style .gm-style-iw-t::after {
58
- background: var(--popover) !important;
59
- box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.1) !important;
60
- border: 1px solid var(--border) !important;
61
- }
62
-
63
- /* Custom Content Class */
64
- .xertica-infowindow-content {
65
- font-family: 'Roboto', sans-serif !important;
66
- color: var(--popover-foreground) !important;
67
- }
68
-
69
- .xertica-infowindow-content * {
70
- font-family: 'Roboto', sans-serif !important;
71
- }
72
-
73
- /* Standard content override */
74
- .gm-style .gm-style-iw-c * {
75
- font-family: 'Roboto', sans-serif !important;
76
- }
1
+ /* ============================================
2
+ 🧩 INTEGRATION: GOOGLE MAPS
3
+ ============================================ */
4
+
5
+ /* Google Maps InfoWindow Customization */
6
+ .gm-style .gm-style-iw-c {
7
+ background-color: var(--popover) !important;
8
+ border-radius: var(--radius-lg) !important;
9
+ box-shadow: var(--elevation-sm) !important;
10
+ padding: 0 !important;
11
+ border: 1px solid var(--border) !important;
12
+ }
13
+
14
+ .gm-style .gm-style-iw-d {
15
+ overflow: auto !important;
16
+ max-height: none !important;
17
+ }
18
+
19
+ /* Fix for Native POIs */
20
+ .gm-style .gm-style-iw-c .gm-style-iw-ch {
21
+ padding-top: var(--spacing-3) !important;
22
+ padding-left: var(--spacing-4) !important;
23
+ padding-right: var(--spacing-8) !important;
24
+ padding-bottom: var(--spacing-2) !important;
25
+ }
26
+
27
+ .gm-style .gm-style-iw-c .gm-style-iw-d .poi-info-window,
28
+ .gm-style .gm-style-iw-c .gm-style-iw-d .transit-container {
29
+ padding: var(--spacing-4) !important;
30
+ padding-top: 0 !important;
31
+ }
32
+
33
+ /* Close button - popover style */
34
+ .gm-style .gm-ui-hover-effect {
35
+ opacity: 1 !important;
36
+ width: 32px !important;
37
+ height: 32px !important;
38
+ top: 8px !important;
39
+ right: 8px !important;
40
+ background-color: var(--muted) !important;
41
+ border-radius: var(--radius) !important;
42
+ transition: all 0.2s ease !important;
43
+ }
44
+
45
+ .gm-style .gm-ui-hover-effect:hover {
46
+ background-color: var(--accent) !important;
47
+ }
48
+
49
+ .gm-style .gm-ui-hover-effect > span {
50
+ background-color: var(--foreground) !important;
51
+ width: 14px !important;
52
+ height: 14px !important;
53
+ margin: 9px !important;
54
+ }
55
+
56
+ /* InfoWindow Tip - popover style */
57
+ .gm-style .gm-style-iw-t::after {
58
+ background: var(--popover) !important;
59
+ box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.1) !important;
60
+ border: 1px solid var(--border) !important;
61
+ }
62
+
63
+ /* Custom Content Class */
64
+ .xertica-infowindow-content {
65
+ font-family: 'Roboto', sans-serif !important;
66
+ color: var(--popover-foreground) !important;
67
+ }
68
+
69
+ .xertica-infowindow-content * {
70
+ font-family: 'Roboto', sans-serif !important;
71
+ }
72
+
73
+ /* Standard content override */
74
+ .gm-style .gm-style-iw-c * {
75
+ font-family: 'Roboto', sans-serif !important;
76
+ }
@@ -1,73 +1,73 @@
1
- /* ============================================
2
- 🧩 INTEGRATION: SONNER
3
- ============================================ */
4
-
5
- /* Sonner Toast customization - styling Alert-like (borderless, flat, colored icons) */
6
- [data-sonner-toast] {
7
- font-family: 'Roboto', sans-serif !important;
8
- border-radius: var(--radius) !important;
9
- background: var(--card) !important;
10
- border: 0 !important;
11
- border-left: 4px solid transparent !important;
12
- box-shadow: var(--elevation-sm) !important;
13
- color: var(--foreground) !important;
14
- padding: 1rem !important;
15
- }
16
-
17
- [data-sonner-toast][data-type="success"] {
18
- background: var(--toast-success-bg) !important;
19
- border-left-color: var(--toast-success-border) !important;
20
- }
21
-
22
- [data-sonner-toast][data-type="success"] [data-icon] {
23
- color: var(--toast-success-icon) !important;
24
- }
25
-
26
- [data-sonner-toast][data-type="warning"] {
27
- background: var(--toast-warning-bg) !important;
28
- border-left-color: var(--toast-warning-border) !important;
29
- }
30
-
31
- [data-sonner-toast][data-type="warning"] [data-icon] {
32
- color: var(--toast-warning-icon) !important;
33
- }
34
-
35
- [data-sonner-toast][data-type="info"] {
36
- background: var(--toast-info-bg) !important;
37
- border-left-color: var(--toast-info-border) !important;
38
- }
39
-
40
- [data-sonner-toast][data-type="info"] [data-icon] {
41
- color: var(--toast-info-icon) !important;
42
- }
43
-
44
- [data-sonner-toast][data-type="error"] {
45
- background: var(--toast-error-bg) !important;
46
- border-left-color: var(--toast-error-border) !important;
47
- }
48
-
49
- [data-sonner-toast][data-type="error"] [data-icon] {
50
- color: var(--toast-error-icon) !important;
51
- }
52
-
53
- /* Toast description text */
54
- [data-sonner-toast] [data-description] {
55
- color: var(--foreground) !important;
56
- opacity: 0.9;
57
- }
58
-
59
- /* Toast buttons */
60
- [data-sonner-toast] [data-button] {
61
- font-family: 'Roboto', sans-serif !important;
62
- border-radius: var(--radius) !important;
63
- }
64
-
65
- [data-sonner-toast] [data-button][data-primary] {
66
- background: var(--primary) !important;
67
- color: var(--primary-foreground) !important;
68
- }
69
-
70
- [data-sonner-toast] [data-button][data-cancel] {
71
- background: var(--muted) !important;
72
- color: var(--muted-foreground) !important;
73
- }
1
+ /* ============================================
2
+ 🧩 INTEGRATION: SONNER
3
+ ============================================ */
4
+
5
+ /* Sonner Toast customization - styling Alert-like (borderless, flat, colored icons) */
6
+ [data-sonner-toast] {
7
+ font-family: 'Roboto', sans-serif !important;
8
+ border-radius: var(--radius) !important;
9
+ background: var(--card) !important;
10
+ border: 0 !important;
11
+ border-left: 4px solid transparent !important;
12
+ box-shadow: var(--elevation-sm) !important;
13
+ color: var(--foreground) !important;
14
+ padding: 1rem !important;
15
+ }
16
+
17
+ [data-sonner-toast][data-type="success"] {
18
+ background: var(--toast-success-bg) !important;
19
+ border-left-color: var(--toast-success-border) !important;
20
+ }
21
+
22
+ [data-sonner-toast][data-type="success"] [data-icon] {
23
+ color: var(--toast-success-icon) !important;
24
+ }
25
+
26
+ [data-sonner-toast][data-type="warning"] {
27
+ background: var(--toast-warning-bg) !important;
28
+ border-left-color: var(--toast-warning-border) !important;
29
+ }
30
+
31
+ [data-sonner-toast][data-type="warning"] [data-icon] {
32
+ color: var(--toast-warning-icon) !important;
33
+ }
34
+
35
+ [data-sonner-toast][data-type="info"] {
36
+ background: var(--toast-info-bg) !important;
37
+ border-left-color: var(--toast-info-border) !important;
38
+ }
39
+
40
+ [data-sonner-toast][data-type="info"] [data-icon] {
41
+ color: var(--toast-info-icon) !important;
42
+ }
43
+
44
+ [data-sonner-toast][data-type="error"] {
45
+ background: var(--toast-error-bg) !important;
46
+ border-left-color: var(--toast-error-border) !important;
47
+ }
48
+
49
+ [data-sonner-toast][data-type="error"] [data-icon] {
50
+ color: var(--toast-error-icon) !important;
51
+ }
52
+
53
+ /* Toast description text */
54
+ [data-sonner-toast] [data-description] {
55
+ color: var(--foreground) !important;
56
+ opacity: 0.9;
57
+ }
58
+
59
+ /* Toast buttons */
60
+ [data-sonner-toast] [data-button] {
61
+ font-family: 'Roboto', sans-serif !important;
62
+ border-radius: var(--radius) !important;
63
+ }
64
+
65
+ [data-sonner-toast] [data-button][data-primary] {
66
+ background: var(--primary) !important;
67
+ color: var(--primary-foreground) !important;
68
+ }
69
+
70
+ [data-sonner-toast] [data-button][data-cancel] {
71
+ background: var(--muted) !important;
72
+ color: var(--muted-foreground) !important;
73
+ }
@@ -1,182 +1,182 @@
1
- # Xertica UI — Project Rules
2
-
3
- This project uses **xertica-ui**, an enterprise React design system built on Tailwind CSS v4, Radix UI, and Lucide Icons.
4
-
5
- > For the complete component reference, read `node_modules/xertica-ui/llms-full.txt`.
6
- > For a compact quick-reference, read `node_modules/xertica-ui/llms-compact.txt`.
7
- > For component selection guidance, read `node_modules/xertica-ui/docs/decision-tree.md`.
8
-
9
- ---
10
-
11
- ## Import Rules
12
-
13
- Always use the most specific subpath — never import from a category you don't need:
14
-
15
- ```tsx
16
- import { Button, Card, Input, Badge, Table, Dialog } from 'xertica-ui/ui';
17
- import { Sidebar, Header } from 'xertica-ui/layout';
18
- import { XerticaProvider, XerticaLogo, ThemeToggle } from 'xertica-ui/brand';
19
- import { XerticaAssistant, generateDemoResponse } from 'xertica-ui/assistant';
20
- import { VideoPlayer, AudioPlayer } from 'xertica-ui/media';
21
- import { useLayout, useOptionalLayout, useTheme } from 'xertica-ui/hooks';
22
- import 'xertica-ui/style.css'; // import once at root only
23
- ```
24
-
25
- The root `from 'xertica-ui'` remains valid for backward compatibility, but scaffolded project code must prefer the subpaths above.
26
-
27
- Icons are **never** from xertica-ui — always use `lucide-react`:
28
-
29
- ```tsx
30
- import { Home, Settings, Plus, Trash2, ChevronRight } from 'lucide-react';
31
- ```
32
-
33
- ---
34
-
35
- ## Non-Negotiable Rules
36
-
37
- ### HTML — never use raw elements for UI
38
- | ❌ Never | ✅ Always |
39
- |---|---|
40
- | `<button>` | `<Button>` from `xertica-ui/ui` |
41
- | `<input>` | `<Input>` from `xertica-ui/ui` |
42
- | `<select>` | `<Select>` from `xertica-ui/ui` |
43
- | `<h1>` / `<h2>` for page headers | `<PageHeader><PageHeaderHeading>` |
44
- | `<div class="card ...">` | `<Card>` from `xertica-ui/ui` |
45
- | custom scrollbar div | `<ScrollArea>` from `xertica-ui/ui` |
46
-
47
- ### Colors — context-dependent rules
48
-
49
- | ❌ Never (any context) | Reason |
50
- |---|---|
51
- | `#3b82f6`, `rgb(59,130,246)`, `hsl(...)` | Raw values — non-themeable |
52
- | `style={{ color: '#...' }}` for theming | Non-themeable inline style |
53
-
54
- | ❌ Wrong for semantic/status contexts | ✅ Required instead |
55
- |---|---|
56
- | `bg-red-500` for error states | `bg-destructive` |
57
- | `text-red-500` for error text | `text-destructive` |
58
- | `bg-green-500` for success states | `bg-success` |
59
- | `bg-yellow-500` for warnings | `bg-warning` |
60
-
61
- > For **layout, spacing, and general non-semantic UI** (custom components, decorative elements, Storybook stories where no semantic token applies), standard Tailwind color utilities like `bg-blue-500` or `text-gray-700` are acceptable.
62
-
63
- Semantic token reference:
64
- ```
65
- bg-background / text-foreground → page background and primary text
66
- bg-card / text-card-foreground → card surfaces
67
- bg-muted / text-muted-foreground → subdued areas and secondary text
68
- bg-primary / text-primary-foreground → primary actions
69
- bg-destructive → danger / error states
70
- bg-success / bg-warning / bg-info → semantic status states
71
- bg-accent → hover states
72
- border-border → standard borders
73
- border-input → form field borders
74
- ```
75
-
76
- ### Layout — always use context, never hardcode
77
- ```tsx
78
- // ✅ Correct
79
- import { useLayout } from 'xertica-ui/hooks';
80
- const { sidebarExpanded, sidebarWidth } = useLayout();
81
- <div style={{ paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : '80px' }}>
82
-
83
- // ✅ Correct for reusable components that may render without providers
84
- import { useOptionalLayout } from 'xertica-ui/hooks';
85
- const layout = useOptionalLayout();
86
- const fallbackSidebarWidth = layout?.sidebarWidth ?? 80;
87
-
88
- // ❌ Wrong — never hardcode sidebar width
89
- <div style={{ paddingLeft: '256px' }}>
90
- ```
91
-
92
- ### Destructive actions — always confirm
93
- ```tsx
94
- // ✅ Correct — confirm before executing
95
- <AlertDialog>
96
- <AlertDialogTrigger asChild>
97
- <Button variant="destructive">Delete</Button>
98
- </AlertDialogTrigger>
99
- <AlertDialogContent>...</AlertDialogContent>
100
- </AlertDialog>
101
-
102
- // ❌ Wrong — never execute destructive action directly on click
103
- <Button variant="destructive" onClick={deleteRecord}>Delete</Button>
104
- ```
105
-
106
- ---
107
-
108
- ## Page Structure
109
-
110
- Every page must follow this structure:
111
-
112
- ```tsx
113
- import { PageHeader, PageHeaderHeading, PageHeaderDescription } from 'xertica-ui/ui';
114
-
115
- export function MyPage() {
116
- return (
117
- <>
118
- <PageHeader>
119
- <PageHeaderHeading>Page Title</PageHeaderHeading>
120
- <PageHeaderDescription>Optional subtitle</PageHeaderDescription>
121
- <Button>Primary Action</Button>
122
- </PageHeader>
123
- <div className="p-6 space-y-6">
124
- {/* Page content */}
125
- </div>
126
- </>
127
- );
128
- }
129
- ```
130
-
131
- ---
132
-
133
- ## App Root Structure
134
-
135
- ```tsx
136
- import { XerticaProvider } from 'xertica-ui/brand';
137
- import { BrowserRouter } from 'react-router-dom';
138
- import 'xertica-ui/style.css';
139
-
140
- function Root() {
141
- const geminiApiKey = import.meta.env.VITE_GEMINI_API_KEY;
142
- const googleMapsApiKey = import.meta.env.VITE_GOOGLE_MAPS_API_KEY;
143
-
144
- return (
145
- <XerticaProvider
146
- apiKey={geminiApiKey}
147
- googleMapsApiKey={googleMapsApiKey}
148
- disableDarkMode
149
- >
150
- <BrowserRouter>
151
- <App />
152
- </BrowserRouter>
153
- </XerticaProvider>
154
- );
155
- }
156
- ```
157
-
158
- `XerticaProvider` is the app-level convenience wrapper used by this template. It composes theme, brand colors, language, layout, assistant/API keys, Google Maps, tooltips, and toasts. Most individual `xertica-ui` components are designed to render independently; use `useOptionalLayout()` when building reusable components that should keep working outside this provider.
159
-
160
- ---
161
-
162
- ## Toast Notifications
163
-
164
- ```tsx
165
- import { toast } from 'sonner'; // sonner is re-exported, no extra install needed
166
-
167
- toast.success('Saved successfully');
168
- toast.error('Something went wrong');
169
- toast.info('Processing...');
170
- toast.warning('Check your input');
171
- ```
172
-
173
- Never render `<Toaster>` manually — it is auto-injected by `<XerticaProvider>`.
174
-
175
- ---
176
-
177
- ## Before Writing Any Component
178
-
179
- 1. Check `node_modules/xertica-ui/llms-compact.txt` — the component may already exist.
180
- 2. Check `node_modules/xertica-ui/docs/decision-tree.md` — you may be choosing the wrong component.
181
- 3. Read the specific component doc at `node_modules/xertica-ui/docs/components/[name].md`.
182
- 4. Never create custom primitives that duplicate library components.
1
+ # Xertica UI — Project Rules
2
+
3
+ This project uses **xertica-ui**, an enterprise React design system built on Tailwind CSS v4, Radix UI, and Lucide Icons.
4
+
5
+ > For the complete component reference, read `node_modules/xertica-ui/llms-full.txt`.
6
+ > For a compact quick-reference, read `node_modules/xertica-ui/llms-compact.txt`.
7
+ > For component selection guidance, read `node_modules/xertica-ui/docs/decision-tree.md`.
8
+
9
+ ---
10
+
11
+ ## Import Rules
12
+
13
+ Always use the most specific subpath — never import from a category you don't need:
14
+
15
+ ```tsx
16
+ import { Button, Card, Input, Badge, Table, Dialog } from 'xertica-ui/ui';
17
+ import { Sidebar, Header } from 'xertica-ui/layout';
18
+ import { XerticaProvider, XerticaLogo, ThemeToggle } from 'xertica-ui/brand';
19
+ import { XerticaAssistant, generateDemoResponse } from 'xertica-ui/assistant';
20
+ import { VideoPlayer, AudioPlayer } from 'xertica-ui/media';
21
+ import { useLayout, useOptionalLayout, useTheme } from 'xertica-ui/hooks';
22
+ import 'xertica-ui/style.css'; // import once at root only
23
+ ```
24
+
25
+ The root `from 'xertica-ui'` remains valid for backward compatibility, but scaffolded project code must prefer the subpaths above.
26
+
27
+ Icons are **never** from xertica-ui — always use `lucide-react`:
28
+
29
+ ```tsx
30
+ import { Home, Settings, Plus, Trash2, ChevronRight } from 'lucide-react';
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Non-Negotiable Rules
36
+
37
+ ### HTML — never use raw elements for UI
38
+ | ❌ Never | ✅ Always |
39
+ |---|---|
40
+ | `<button>` | `<Button>` from `xertica-ui/ui` |
41
+ | `<input>` | `<Input>` from `xertica-ui/ui` |
42
+ | `<select>` | `<Select>` from `xertica-ui/ui` |
43
+ | `<h1>` / `<h2>` for page headers | `<PageHeader><PageHeaderHeading>` |
44
+ | `<div class="card ...">` | `<Card>` from `xertica-ui/ui` |
45
+ | custom scrollbar div | `<ScrollArea>` from `xertica-ui/ui` |
46
+
47
+ ### Colors — context-dependent rules
48
+
49
+ | ❌ Never (any context) | Reason |
50
+ |---|---|
51
+ | `#3b82f6`, `rgb(59,130,246)`, `hsl(...)` | Raw values — non-themeable |
52
+ | `style={{ color: '#...' }}` for theming | Non-themeable inline style |
53
+
54
+ | ❌ Wrong for semantic/status contexts | ✅ Required instead |
55
+ |---|---|
56
+ | `bg-red-500` for error states | `bg-destructive` |
57
+ | `text-red-500` for error text | `text-destructive` |
58
+ | `bg-green-500` for success states | `bg-success` |
59
+ | `bg-yellow-500` for warnings | `bg-warning` |
60
+
61
+ > For **layout, spacing, and general non-semantic UI** (custom components, decorative elements, Storybook stories where no semantic token applies), standard Tailwind color utilities like `bg-blue-500` or `text-gray-700` are acceptable.
62
+
63
+ Semantic token reference:
64
+ ```
65
+ bg-background / text-foreground → page background and primary text
66
+ bg-card / text-card-foreground → card surfaces
67
+ bg-muted / text-muted-foreground → subdued areas and secondary text
68
+ bg-primary / text-primary-foreground → primary actions
69
+ bg-destructive → danger / error states
70
+ bg-success / bg-warning / bg-info → semantic status states
71
+ bg-accent → hover states
72
+ border-border → standard borders
73
+ border-input → form field borders
74
+ ```
75
+
76
+ ### Layout — always use context, never hardcode
77
+ ```tsx
78
+ // ✅ Correct
79
+ import { useLayout } from 'xertica-ui/hooks';
80
+ const { sidebarExpanded, sidebarWidth } = useLayout();
81
+ <div style={{ paddingLeft: sidebarExpanded ? `${sidebarWidth}px` : '80px' }}>
82
+
83
+ // ✅ Correct for reusable components that may render without providers
84
+ import { useOptionalLayout } from 'xertica-ui/hooks';
85
+ const layout = useOptionalLayout();
86
+ const fallbackSidebarWidth = layout?.sidebarWidth ?? 80;
87
+
88
+ // ❌ Wrong — never hardcode sidebar width
89
+ <div style={{ paddingLeft: '256px' }}>
90
+ ```
91
+
92
+ ### Destructive actions — always confirm
93
+ ```tsx
94
+ // ✅ Correct — confirm before executing
95
+ <AlertDialog>
96
+ <AlertDialogTrigger asChild>
97
+ <Button variant="destructive">Delete</Button>
98
+ </AlertDialogTrigger>
99
+ <AlertDialogContent>...</AlertDialogContent>
100
+ </AlertDialog>
101
+
102
+ // ❌ Wrong — never execute destructive action directly on click
103
+ <Button variant="destructive" onClick={deleteRecord}>Delete</Button>
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Page Structure
109
+
110
+ Every page must follow this structure:
111
+
112
+ ```tsx
113
+ import { PageHeader, PageHeaderHeading, PageHeaderDescription } from 'xertica-ui/ui';
114
+
115
+ export function MyPage() {
116
+ return (
117
+ <>
118
+ <PageHeader>
119
+ <PageHeaderHeading>Page Title</PageHeaderHeading>
120
+ <PageHeaderDescription>Optional subtitle</PageHeaderDescription>
121
+ <Button>Primary Action</Button>
122
+ </PageHeader>
123
+ <div className="p-6 space-y-6">
124
+ {/* Page content */}
125
+ </div>
126
+ </>
127
+ );
128
+ }
129
+ ```
130
+
131
+ ---
132
+
133
+ ## App Root Structure
134
+
135
+ ```tsx
136
+ import { XerticaProvider } from 'xertica-ui/brand';
137
+ import { BrowserRouter } from 'react-router-dom';
138
+ import 'xertica-ui/style.css';
139
+
140
+ function Root() {
141
+ const geminiApiKey = import.meta.env.VITE_GEMINI_API_KEY;
142
+ const googleMapsApiKey = import.meta.env.VITE_GOOGLE_MAPS_API_KEY;
143
+
144
+ return (
145
+ <XerticaProvider
146
+ apiKey={geminiApiKey}
147
+ googleMapsApiKey={googleMapsApiKey}
148
+ disableDarkMode
149
+ >
150
+ <BrowserRouter>
151
+ <App />
152
+ </BrowserRouter>
153
+ </XerticaProvider>
154
+ );
155
+ }
156
+ ```
157
+
158
+ `XerticaProvider` is the app-level convenience wrapper used by this template. It composes theme, brand colors, language, layout, assistant/API keys, Google Maps, tooltips, and toasts. Most individual `xertica-ui` components are designed to render independently; use `useOptionalLayout()` when building reusable components that should keep working outside this provider.
159
+
160
+ ---
161
+
162
+ ## Toast Notifications
163
+
164
+ ```tsx
165
+ import { toast } from 'sonner'; // sonner is re-exported, no extra install needed
166
+
167
+ toast.success('Saved successfully');
168
+ toast.error('Something went wrong');
169
+ toast.info('Processing...');
170
+ toast.warning('Check your input');
171
+ ```
172
+
173
+ Never render `<Toaster>` manually — it is auto-injected by `<XerticaProvider>`.
174
+
175
+ ---
176
+
177
+ ## Before Writing Any Component
178
+
179
+ 1. Check `node_modules/xertica-ui/llms-compact.txt` — the component may already exist.
180
+ 2. Check `node_modules/xertica-ui/docs/decision-tree.md` — you may be choosing the wrong component.
181
+ 3. Read the specific component doc at `node_modules/xertica-ui/docs/components/[name].md`.
182
+ 4. Never create custom primitives that duplicate library components.