xertica-ui 2.0.5 → 2.0.6

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 (303) hide show
  1. package/CHANGELOG.md +298 -243
  2. package/README.md +71 -31
  3. package/bin/cli.ts +1 -1
  4. package/components/assistant/xertica-assistant/xertica-assistant.tsx +2 -3
  5. package/components/blocks/card-patterns/ActivityCard.tsx +72 -0
  6. package/components/blocks/card-patterns/FeatureCard.tsx +100 -0
  7. package/components/blocks/card-patterns/NotificationCard.tsx +127 -0
  8. package/components/blocks/card-patterns/ProfileCard.tsx +84 -0
  9. package/components/blocks/card-patterns/ProjectCard.tsx +89 -0
  10. package/components/blocks/card-patterns/QuickActionCard.tsx +62 -0
  11. package/components/blocks/card-patterns/card-patterns.stories.tsx +445 -0
  12. package/components/blocks/card-patterns/index.ts +17 -0
  13. package/components/blocks/index.ts +1 -0
  14. package/components/brand/xertica-provider/XerticaProvider.tsx +48 -20
  15. package/components/brand/xertica-provider/xertica-provider.mdx +61 -59
  16. package/components/brand/xertica-provider/xertica-provider.test.tsx +52 -7
  17. package/components/index.ts +3 -0
  18. package/components/layout/header/header.test.tsx +8 -2
  19. package/components/layout/header/header.tsx +4 -3
  20. package/components/layout/sidebar/sidebar.stories.tsx +6 -6
  21. package/components/layout/sidebar/sidebar.test.tsx +11 -5
  22. package/components/layout/sidebar/sidebar.tsx +34 -36
  23. package/components/media/FloatingMediaWrapper.tsx +11 -8
  24. package/components/media/audio-player/AudioPlayer.tsx +22 -14
  25. package/components/pages/home-content/HomeContent.tsx +7 -5
  26. package/components/pages/home-content/home-content.mdx +62 -63
  27. package/components/pages/home-page/HomePage.tsx +12 -5
  28. package/components/pages/home-page/home-page.mdx +10 -13
  29. package/components/pages/template-content/TemplateContent.tsx +10 -4
  30. package/components/pages/template-content/template-content.mdx +61 -62
  31. package/components/pages/template-page/TemplatePage.tsx +11 -4
  32. package/components/pages/template-page/template-page.mdx +10 -11
  33. package/components/public-api-smoke.test.tsx +45 -0
  34. package/components/shared/assistant-utils.ts +43 -11
  35. package/components/ui/accordion/accordion.mdx +8 -20
  36. package/components/ui/accordion/accordion.stories.tsx +27 -13
  37. package/components/ui/alert/alert.mdx +8 -24
  38. package/components/ui/alert/alert.stories.tsx +1 -0
  39. package/components/ui/alert-dialog/alert-dialog.mdx +8 -13
  40. package/components/ui/alert-dialog/alert-dialog.stories.tsx +1 -0
  41. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -20
  42. package/components/ui/aspect-ratio/aspect-ratio.stories.tsx +1 -0
  43. package/components/ui/assistant-chart/assistant-chart.mdx +8 -13
  44. package/components/ui/assistant-chart/assistant-chart.stories.tsx +1 -0
  45. package/components/ui/avatar/avatar.mdx +8 -28
  46. package/components/ui/avatar/avatar.stories.tsx +1 -0
  47. package/components/ui/badge/badge.mdx +8 -23
  48. package/components/ui/badge/badge.stories.tsx +1 -0
  49. package/components/ui/badge/badge.tsx +9 -9
  50. package/components/ui/breadcrumb/breadcrumb.mdx +8 -20
  51. package/components/ui/breadcrumb/breadcrumb.stories.tsx +1 -0
  52. package/components/ui/button/button.mdx +8 -52
  53. package/components/ui/button/button.stories.tsx +1 -0
  54. package/components/ui/calendar/calendar.mdx +8 -27
  55. package/components/ui/calendar/calendar.stories.tsx +31 -4
  56. package/components/ui/calendar/calendar.test.tsx +6 -0
  57. package/components/ui/calendar/calendar.tsx +258 -249
  58. package/components/ui/card/card.mdx +8 -27
  59. package/components/ui/card/card.stories.tsx +245 -103
  60. package/components/ui/carousel/carousel.mdx +8 -20
  61. package/components/ui/carousel/carousel.stories.tsx +1 -0
  62. package/components/ui/chart/chart.mdx +8 -20
  63. package/components/ui/chart/chart.stories.tsx +277 -24
  64. package/components/ui/chart/chart.test.tsx +154 -20
  65. package/components/ui/chart/chart.tsx +1494 -368
  66. package/components/ui/checkbox/checkbox.mdx +8 -27
  67. package/components/ui/checkbox/checkbox.stories.tsx +1 -0
  68. package/components/ui/collapsible/collapsible.mdx +8 -13
  69. package/components/ui/collapsible/collapsible.stories.tsx +1 -0
  70. package/components/ui/command/command.mdx +8 -20
  71. package/components/ui/command/command.stories.tsx +1 -0
  72. package/components/ui/context-menu/context-menu.mdx +8 -13
  73. package/components/ui/context-menu/context-menu.stories.tsx +1 -0
  74. package/components/ui/dialog/dialog.mdx +8 -20
  75. package/components/ui/dialog/dialog.stories.tsx +1 -0
  76. package/components/ui/drawer/drawer.mdx +8 -13
  77. package/components/ui/drawer/drawer.stories.tsx +1 -0
  78. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -22
  79. package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +1 -0
  80. package/components/ui/empty/empty.mdx +8 -27
  81. package/components/ui/empty/empty.stories.tsx +1 -0
  82. package/components/ui/file-upload/file-upload.mdx +8 -20
  83. package/components/ui/file-upload/file-upload.stories.tsx +1 -0
  84. package/components/ui/form/form.stories.tsx +1 -0
  85. package/components/ui/google-maps-loader/google-maps-loader.tsx +2 -2
  86. package/components/ui/hover-card/hover-card.mdx +8 -13
  87. package/components/ui/hover-card/hover-card.stories.tsx +1 -0
  88. package/components/ui/index.ts +41 -16
  89. package/components/ui/input/input.mdx +8 -46
  90. package/components/ui/input/input.stories.tsx +1 -0
  91. package/components/ui/input-otp/input-otp.mdx +8 -27
  92. package/components/ui/input-otp/input-otp.stories.tsx +7 -6
  93. package/components/ui/label/label.mdx +8 -27
  94. package/components/ui/label/label.stories.tsx +1 -0
  95. package/components/ui/map/map.mdx +8 -20
  96. package/components/ui/map/map.stories.tsx +51 -30
  97. package/components/ui/map/map.tsx +2 -2
  98. package/components/ui/menubar/menubar.mdx +8 -13
  99. package/components/ui/menubar/menubar.stories.tsx +1 -0
  100. package/components/ui/navigation-menu/navigation-menu.mdx +8 -13
  101. package/components/ui/navigation-menu/navigation-menu.stories.tsx +1 -0
  102. package/components/ui/notification-badge/notification-badge.mdx +8 -20
  103. package/components/ui/notification-badge/notification-badge.stories.tsx +1 -0
  104. package/components/ui/page-header/page-header.stories.tsx +1 -0
  105. package/components/ui/pagination/pagination.mdx +8 -20
  106. package/components/ui/pagination/pagination.stories.tsx +11 -8
  107. package/components/ui/popover/popover.mdx +8 -20
  108. package/components/ui/popover/popover.stories.tsx +1 -0
  109. package/components/ui/progress/progress.mdx +8 -16
  110. package/components/ui/progress/progress.stories.tsx +1 -0
  111. package/components/ui/radio-group/radio-group.mdx +8 -27
  112. package/components/ui/radio-group/radio-group.stories.tsx +1 -0
  113. package/components/ui/rating/rating.mdx +8 -20
  114. package/components/ui/rating/rating.stories.tsx +1 -0
  115. package/components/ui/resizable/resizable.mdx +8 -20
  116. package/components/ui/resizable/resizable.stories.tsx +1 -0
  117. package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +1 -0
  118. package/components/ui/rich-text-editor/rich-text-editor.tsx +2 -2
  119. package/components/ui/route-map/route-map.mdx +8 -20
  120. package/components/ui/route-map/route-map.stories.tsx +1 -0
  121. package/components/ui/route-map/route-map.tsx +2 -2
  122. package/components/ui/scroll-area/scroll-area.mdx +8 -13
  123. package/components/ui/scroll-area/scroll-area.stories.tsx +1 -0
  124. package/components/ui/search/search.mdx +8 -20
  125. package/components/ui/search/search.stories.tsx +1 -0
  126. package/components/ui/select/select.mdx +8 -27
  127. package/components/ui/select/select.stories.tsx +10 -9
  128. package/components/ui/separator/separator.mdx +8 -20
  129. package/components/ui/separator/separator.stories.tsx +1 -0
  130. package/components/ui/sheet/sheet.mdx +8 -20
  131. package/components/ui/sheet/sheet.stories.tsx +1 -0
  132. package/components/ui/simple-map/simple-map.mdx +8 -20
  133. package/components/ui/simple-map/simple-map.stories.tsx +1 -0
  134. package/components/ui/skeleton/skeleton.mdx +8 -20
  135. package/components/ui/skeleton/skeleton.stories.tsx +1 -0
  136. package/components/ui/slider/slider.mdx +8 -20
  137. package/components/ui/slider/slider.stories.tsx +1 -0
  138. package/components/ui/sonner/sonner.mdx +8 -13
  139. package/components/ui/sonner/sonner.stories.tsx +1 -0
  140. package/components/ui/stats-card/stats-card.mdx +8 -20
  141. package/components/ui/stats-card/stats-card.stories.tsx +1 -0
  142. package/components/ui/stepper/stepper.mdx +8 -13
  143. package/components/ui/stepper/stepper.stories.tsx +1 -0
  144. package/components/ui/switch/switch.mdx +8 -27
  145. package/components/ui/switch/switch.stories.tsx +1 -0
  146. package/components/ui/table/table.mdx +8 -13
  147. package/components/ui/table/table.stories.tsx +1 -0
  148. package/components/ui/tabs/tabs.mdx +8 -20
  149. package/components/ui/tabs/tabs.stories.tsx +1 -0
  150. package/components/ui/textarea/textarea.mdx +8 -20
  151. package/components/ui/textarea/textarea.stories.tsx +1 -0
  152. package/components/ui/timeline/timeline.mdx +8 -13
  153. package/components/ui/timeline/timeline.stories.tsx +1 -0
  154. package/components/ui/toggle/toggle.mdx +8 -20
  155. package/components/ui/toggle/toggle.stories.tsx +1 -0
  156. package/components/ui/toggle-group/toggle-group.mdx +8 -20
  157. package/components/ui/toggle-group/toggle-group.stories.tsx +1 -0
  158. package/components/ui/tooltip/tooltip.mdx +8 -27
  159. package/components/ui/tooltip/tooltip.stories.tsx +1 -0
  160. package/components/ui/tree-view/tree-view.mdx +8 -13
  161. package/components/ui/tree-view/tree-view.stories.tsx +1 -0
  162. package/components.json +7 -3
  163. package/contexts/ApiKeyContext.tsx +72 -26
  164. package/contexts/BrandColorsContext.tsx +26 -23
  165. package/contexts/LanguageContext.tsx +13 -10
  166. package/contexts/LayoutContext.test.tsx +11 -5
  167. package/contexts/LayoutContext.tsx +29 -21
  168. package/contexts/ThemeContext.tsx +26 -22
  169. package/contexts/theme-data.ts +4 -4
  170. package/dist/AudioPlayer-B1lt5cPl.cjs +989 -0
  171. package/dist/AudioPlayer-C12BjQBV.cjs +997 -0
  172. package/dist/AudioPlayer-DMcG_c7L.js +990 -0
  173. package/dist/AudioPlayer-DcFKRJE_.js +998 -0
  174. package/dist/CodeBlock-7TTgmdGG.cjs +2094 -0
  175. package/dist/CodeBlock-BeSt1h5P.js +2078 -0
  176. package/dist/CodeBlock-BgfYL_rD.cjs +2094 -0
  177. package/dist/CodeBlock-BlcqlA9M.cjs +2094 -0
  178. package/dist/CodeBlock-Bnmeu5ez.cjs +2094 -0
  179. package/dist/CodeBlock-BtfPlbAI.js +2078 -0
  180. package/dist/CodeBlock-CIySIuYr.js +2078 -0
  181. package/dist/CodeBlock-D8dcwbit.cjs +2094 -0
  182. package/dist/CodeBlock-DMZrFnlw.cjs +2094 -0
  183. package/dist/CodeBlock-DlBehYN8.js +2078 -0
  184. package/dist/CodeBlock-DnYNI8rQ.js +2078 -0
  185. package/dist/CodeBlock-DvKWbSnE.cjs +2094 -0
  186. package/dist/CodeBlock-DwMCfkFY.js +2078 -0
  187. package/dist/CodeBlock-Dy6CNYyj.js +2078 -0
  188. package/dist/CodeBlock-U1pPOQI7.cjs +2094 -0
  189. package/dist/CodeBlock-f_GpNhEB.js +2078 -0
  190. package/dist/CodeBlock-oB6u8nI1.js +2078 -0
  191. package/dist/CodeBlock-tZC31B73.cjs +2094 -0
  192. package/dist/LayoutContext-CwT5KLiW.cjs +104 -0
  193. package/dist/LayoutContext-DVLCsoQn.js +105 -0
  194. package/dist/ThemeContext-BoH4NLfN.js +734 -0
  195. package/dist/ThemeContext-C2EwAPDt.js +735 -0
  196. package/dist/ThemeContext-r69W20Xg.cjs +733 -0
  197. package/dist/ThemeContext-vTjumZeM.cjs +734 -0
  198. package/dist/XerticaProvider-BlY2limY.cjs +38 -0
  199. package/dist/XerticaProvider-DDuiIcKo.js +39 -0
  200. package/dist/XerticaProvider-cI9hSs27.cjs +38 -0
  201. package/dist/XerticaProvider-hSwhNQex.js +39 -0
  202. package/dist/assistant.cjs.js +1 -1
  203. package/dist/assistant.es.js +1 -1
  204. package/dist/brand.cjs.js +1 -1
  205. package/dist/brand.es.js +1 -1
  206. package/dist/cli.js +5 -5
  207. package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +1 -1
  208. package/dist/components/blocks/card-patterns/ActivityCard.d.ts +20 -0
  209. package/dist/components/blocks/card-patterns/FeatureCard.d.ts +16 -0
  210. package/dist/components/blocks/card-patterns/NotificationCard.d.ts +24 -0
  211. package/dist/components/blocks/card-patterns/ProfileCard.d.ts +22 -0
  212. package/dist/components/blocks/card-patterns/ProjectCard.d.ts +18 -0
  213. package/dist/components/blocks/card-patterns/QuickActionCard.d.ts +15 -0
  214. package/dist/components/blocks/card-patterns/index.d.ts +12 -0
  215. package/dist/components/blocks/index.d.ts +1 -0
  216. package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +1 -1
  217. package/dist/components/index.d.ts +1 -0
  218. package/dist/components/shared/assistant-utils.d.ts +35 -5
  219. package/dist/components/ui/alert/alert.d.ts +1 -1
  220. package/dist/components/ui/badge/badge.d.ts +1 -1
  221. package/dist/components/ui/button/button.d.ts +2 -2
  222. package/dist/components/ui/calendar/calendar.d.ts +4 -3
  223. package/dist/components/ui/chart/chart.d.ts +109 -1
  224. package/dist/components/ui/dialog/dialog.d.ts +1 -1
  225. package/dist/components/ui/index.d.ts +4 -2
  226. package/dist/contexts/ApiKeyContext.d.ts +6 -2
  227. package/dist/contexts/LayoutContext.d.ts +1 -0
  228. package/dist/google-maps-loader-CTYySAun.js +290 -0
  229. package/dist/google-maps-loader-Y-QkD-Li.cjs +290 -0
  230. package/dist/header-Cgy6vYPk.cjs +731 -0
  231. package/dist/header-DRlT4jgI.js +715 -0
  232. package/dist/header-WfEywpyc.cjs +731 -0
  233. package/dist/header-tifNQn2U.js +715 -0
  234. package/dist/hooks.cjs.js +13 -684
  235. package/dist/hooks.es.js +13 -684
  236. package/dist/index-COtD8bRW.cjs +7 -0
  237. package/dist/index-DW5tYe26.js +8 -0
  238. package/dist/index.cjs.js +520 -192
  239. package/dist/index.es.js +557 -228
  240. package/dist/layout.cjs.js +1 -1
  241. package/dist/layout.es.js +1 -1
  242. package/dist/media.cjs.js +1 -1
  243. package/dist/media.es.js +1 -1
  244. package/dist/rich-text-editor-0mraWT5y.cjs +2376 -0
  245. package/dist/rich-text-editor-B6jMRLzk.cjs +1939 -0
  246. package/dist/rich-text-editor-B8_oYcIR.js +1730 -0
  247. package/dist/rich-text-editor-BYuRBNBU.js +2373 -0
  248. package/dist/rich-text-editor-Bb9pySTs.cjs +2374 -0
  249. package/dist/rich-text-editor-BcL6L3cm.cjs +2374 -0
  250. package/dist/rich-text-editor-BoVZYtTs.cjs +2391 -0
  251. package/dist/rich-text-editor-CPV1lEPH.cjs +1748 -0
  252. package/dist/rich-text-editor-CoKqbCtu.cjs +1799 -0
  253. package/dist/rich-text-editor-Cw56T_mB.js +2356 -0
  254. package/dist/rich-text-editor-Cyt8qs2b.js +1921 -0
  255. package/dist/rich-text-editor-D76gD-QI.js +2328 -0
  256. package/dist/rich-text-editor-DKkokOnA.js +1781 -0
  257. package/dist/rich-text-editor-DNsdpN64.cjs +2359 -0
  258. package/dist/rich-text-editor-DfG8bCyY.js +2358 -0
  259. package/dist/rich-text-editor-Dxjw31Z4.js +2341 -0
  260. package/dist/rich-text-editor-DzP0Epmb.js +2356 -0
  261. package/dist/rich-text-editor-skplNlBM.cjs +2345 -0
  262. package/dist/ui.cjs.js +57 -47
  263. package/dist/ui.es.js +241 -231
  264. package/dist/use-mobile-B0hNy_Y6.cjs +4303 -0
  265. package/dist/use-mobile-BXuYROXM.js +4202 -0
  266. package/dist/use-mobile-Bbd51ASU.cjs +4392 -0
  267. package/dist/use-mobile-Bk6CX-TC.js +4359 -0
  268. package/dist/use-mobile-BvYdisLP.js +4202 -0
  269. package/dist/use-mobile-BzuxjzNX.cjs +4392 -0
  270. package/dist/use-mobile-CG2-SdXV.cjs +4235 -0
  271. package/dist/use-mobile-CKb5pqTs.js +4269 -0
  272. package/dist/use-mobile-CYuAuGDl.js +4202 -0
  273. package/dist/use-mobile-CbrYgJGJ.js +4203 -0
  274. package/dist/use-mobile-DRB3BQgD.cjs +4235 -0
  275. package/dist/use-mobile-DZvv7QMR.js +4359 -0
  276. package/dist/use-mobile-DdI_TXam.cjs +4235 -0
  277. package/dist/use-mobile-DlceKf8a.js +4359 -0
  278. package/dist/use-mobile-DsOnow1o.cjs +4236 -0
  279. package/dist/use-mobile-Kcj6jSnK.cjs +4392 -0
  280. package/dist/use-mobile-bnKcua_i.js +4202 -0
  281. package/dist/use-mobile-ncXBeE2z.cjs +4235 -0
  282. package/dist/xertica-ui.css +1 -1
  283. package/docs/architecture.md +20 -2
  284. package/docs/components/calendar.md +154 -99
  285. package/docs/components/card-patterns.md +337 -0
  286. package/docs/components/card.md +235 -162
  287. package/docs/components/chart.md +186 -4
  288. package/docs/components/map.md +84 -76
  289. package/docs/components/xertica-provider.md +24 -12
  290. package/docs/llms.md +2 -2
  291. package/llms-compact.txt +1 -1
  292. package/llms.txt +3 -3
  293. package/package.json +1 -1
  294. package/styles/xertica/tokens.css +12 -12
  295. package/templates/CLAUDE.md +16 -4
  296. package/templates/guidelines/Guidelines.md +6 -2
  297. package/templates/package.json +2 -2
  298. package/templates/src/app/App.tsx +8 -17
  299. package/templates/src/features/template/ui/CrudTemplate.tsx +3 -3
  300. package/templates/src/features/template/ui/DashboardTemplate.tsx +3 -3
  301. package/templates/src/features/template/ui/FormTemplate.tsx +1 -1
  302. package/templates/src/features/template/ui/LoginTemplate.tsx +3 -3
  303. package/templates/tsconfig.json +5 -4
package/CHANGELOG.md CHANGED
@@ -1,243 +1,298 @@
1
- # Changelog
2
-
3
- All notable changes to `xertica-ui` will be documented in this file.
4
-
5
- Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
- Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ---
9
-
10
- ## [2.0.5] — 2026-05-12
11
-
12
- ### Added
13
-
14
- - **`llms-compact.txt`** — novo arquivo de referência compacto para LLMs, sintetizando todos os componentes em formato reduzido ideal para contextos de tokens limitados.
15
- - **`docs/decision-tree.md`** — guia de árvore de decisão para agentes de IA selecionarem o componente correto com base nos requisitos da UI.
16
- - **`templates/CLAUDE.md`** — `CLAUDE.md` agora é scaffolded automaticamente em projetos criados via `npx xertica-ui@latest init`, fornecendo contexto arquitetural (FSD/FDA, subpath imports, tokens semânticos) para Claude Code e outros assistentes de IA.
17
- - **Storybook stories** adicionadas stories interativas para Accordion, AlertDialog, Button, Checkbox, Dialog, Input, Switch, Tabs, HomePage e TemplatePage.
18
- - **`components/pages/home-page/home-page.mdx`** e **`template-page.mdx`** novas entradas de documentação MDX para as page components.
19
-
20
- ### Changed
21
-
22
- - **`guidelines/Guidelines.md`**reescrita completa do guia de arquitetura FSD/FDA: maior detalhamento de responsabilidades por camada, convenções de import e fluxo de adição de novas rotas.
23
- - **`components.json`** — atualização completa do registro de componentes, cobrindo todos os 97 componentes com metadados de subpath, props e variantes.
24
- - **`llms.txt`** — seção de subpath imports e mapeamento de camadas FSD/FDA atualizados.
25
- - **`vite.config.ts`** — ajustes no build multi-entry para garantir correta emissão dos arquivos CJS/ESM.
26
-
27
- ### Fixed
28
-
29
- - **`npx xertica-ui init` usa versão em cache** documentado que o npx armazena pacotes em cache localmente sem TTL curto. Sempre use `npx xertica-ui@latest init` para garantir a versão mais recente. O `templates/CLAUDE.md` scaffolded no projeto gerado inclui essa orientação.
30
-
31
- ---
32
-
33
- ## [2.0.3] — 2026-05-11
34
-
35
- ### Added
36
-
37
- - **CLI `update` — atualização de projeto** — novo modo no comando `update` permite atualizar os arquivos do projeto (app shell, shared, features, pages) para qualquer versão publicada do `xertica-ui`, com seleção granular de quais partes atualizar e confirmação antes de sobrescrever.
38
-
39
- ---
40
-
41
- ## [2.0.2] — 2026-05-11
42
-
43
- ### Fixed
44
-
45
- - **CLI rewritten for FSD/FDA structure** `npx xertica-ui@latest init` agora copia corretamente a estrutura Feature-Sliced Design:
46
- - Removida cópia de `src/app/routes.tsx` (arquivo não existe mais após refatoração)
47
- - Adicionada cópia de `src/app/components/AppLayout.tsx`
48
- - Adicionada cópia completa de `src/shared/` (`auth.ts`, `navigation.ts`, `types/auth.ts`)
49
- - Adicionada cópia de `src/features/auth|home|template` conforme seleções do usuário
50
- - Cópia de pages corrigida de `src/app/pages/` → `src/pages/`
51
- - `AuthGuard.tsx` agora gerado dinamicamente com imports e rotas apenas das páginas selecionadas
52
- - **`generateDemoResponse` exportado via `xertica-ui/assistant`**estava ausente do barrel causando `SyntaxError: does not provide an export named 'generateDemoResponse'`
53
- - **Build corrigido: UMD → CJS** — múltiplos entry points não são suportados com formato UMD no Vite; migrado para CJS (todos os `*.umd.js` `*.cjs.js` no `package.json` exports)
54
-
55
- ---
56
-
57
- ## [2.0.0] — 2026-05-11
58
-
59
- ### Added
60
-
61
- - **Subpath exports** — The package now exposes 6 granular entry points alongside the full root barrel:
62
- - `xertica-ui/ui` — all UI primitives (Button, Card, Input, Table, Dialog, etc.)
63
- - `xertica-ui/layout` — Sidebar and Header
64
- - `xertica-ui/brand` — XerticaProvider, XerticaLogo, XerticaXLogo, XerticaOrbe, ThemeToggle, LanguageSelector
65
- - `xertica-ui/assistant`XerticaAssistant, MarkdownMessage, CodeBlock, FormattedDocument, ModernChatInput
66
- - `xertica-ui/media` — VideoPlayer, AudioPlayer, FloatingMediaWrapper
67
- - `xertica-ui/hooks` — useLayout, useTheme, useLanguage, useBrandColors, useAssistente, useApiKey
68
- - Root `from 'xertica-ui'` remains fully supported for backward compatibility.
69
- - **`ImageWithFallback` added to `xertica-ui/ui`** — previously only in the root barrel; now accessible via the `/ui` subpath.
70
- - **Multi-entry Vite build** `vite.config.ts` now uses `lib.entry` as an object (7 entry points). Output filenames follow `[entryName].[format].js` pattern.
71
- - **CLI template — FSD/FDA architecture** The scaffolded template was restructured to follow Feature-Sliced Design + Feature-Driven Architecture:
72
- - `src/app/`BrowserRouter, XerticaProvider, AuthGuard (auth state + route definitions), AppLayout (Sidebar + children shell)
73
- - `src/shared/` `config/navigation.ts` (route registry), `lib/auth.ts` (localStorage helpers), `types/auth.ts` (User interface)
74
- - `src/features/auth/ui/` — LoginContent, ForgotPasswordContent, VerifyEmailContent, ResetPasswordContent; with shared `AuthPageShell` and `SocialLoginButtons` DRY extractions
75
- - `src/features/home/ui/` — HomeContent
76
- - `src/features/template/ui/` — TemplateContent, FormTemplate
77
- - `src/pages/`thin page wrappers (LoginPage, HomePage, TemplatePage, ForgotPasswordPage, VerifyEmailPage, ResetPasswordPage)
78
- - **`templates/guidelines/Guidelines.md`** — new architecture guide documenting FSD/FDA layers, layer responsibilities, and "Adding New Routes" step-by-step.
79
-
80
- ### Changed
81
-
82
- - **Template imports** — All template source files updated to use subpath imports (`xertica-ui/ui`, `xertica-ui/brand`, `xertica-ui/layout`, `xertica-ui/assistant`, `xertica-ui/hooks`) instead of the root barrel.
83
- - **`FormTemplate.tsx` rewritten** — Removed dependency on `@hookform/resolvers/zod`, `react-hook-form`, and `zod` (packages not included in the CLI template's `package.json`). Now uses plain React `useState` + inline validation with only `xertica-ui/ui` primitives.
84
- - **`tsconfig.build.json`** `include` array updated to cover all new barrel source directories (`components/**/*`, `contexts/**/*`, `hooks/**/*`).
85
- - **Documentation** (`llms.txt`, `llms-full.txt`) — Added subpath import reference table and FSD/FDA layer mapping.
86
-
87
- ### Fixed
88
-
89
- - **Stale compiled artifacts** — Removed `App.js`, `App.d.ts`, `main.js`, `main.d.ts` from `templates/src/app/` that were being resolved by Vite's extension priority (`.js` before `.tsx`), causing `Failed to fetch dynamically imported module` errors after the FSD restructure.
90
-
91
- ---
92
-
93
- ## [1.10.0] — 2026-05-08
94
-
95
- ### Added
96
-
97
- - **Semantic Variants** — Added `success`, `info`, and `warning` variants to components that lacked them:
98
- - **Button** — now supports 9 variants: `default`, `secondary`, `outline`, `ghost`, `destructive`, `link`, `success`, `info`, `warning`.
99
- - **Progress** — new `variant` prop (`default`, `success`, `info`, `warning`, `destructive`) colors both the track and the indicator.
100
- - **NotificationBadge** added `secondary`, `outline`, `success`, `info`, `warning`; standardized `default` to primary color for consistency with Badge and Button.
101
- - **TimelineDot** added `info` and `outline` variants; replaced hardcoded `rgb()` values with semantic CSS tokens (`bg-success`, `bg-warning`).
102
- - **DialogBody** new sub-component for the Dialog. When used, `DialogHeader` and `DialogFooter` stay pinned while `DialogBody` scrolls independently. Exported from `xertica-ui`.
103
- - **Dialog height management** `DialogContent` now has `max-h-[calc(100dvh-2rem)] overflow-hidden`. The close button (×) is pinned and never scrolls with content. `size="full"` fills the full viewport height.
104
- - **Header `breadcrumbSlot`** new prop accepting any `ReactNode` rendered immediately after the breadcrumb/title area (badges, buttons, status chips, etc.).
105
- - **Sidebar default variant groups** `variant="default"` now renders `navigationGroups` with labeled group headers. Each `RouteConfig` supports a `children` field (sub-routes shown in a contextual `DropdownMenu` via a `ChevronRight` button at the end of the item).
106
-
107
- ### Fixed
108
-
109
- - **Search double clear icon** — `type="search"` caused browsers to inject a native clear button on top of the custom × icon. Changed to `type="text"`.
110
- - **CSS `@source` path** — CLI template `src/styles/index.css` had `../node_modules/xertica-ui` (one level short); corrected to `../../node_modules/xertica-ui/components`.
111
- - **`theme-map.css` incomplete** — `--color-success`, `--color-info`, `--color-warning` and their `foreground` variants were missing, preventing `bg-success`, `text-info`, etc. from being generated in the compiled library CSS.
112
-
113
- ### Changed
114
-
115
- - **Storybook argTypes** — Multiple components had controls missing from the Storybook panel: Badge (`success`/`info`/`warning` options), Select (`size`), Avatar (`size`), Rating (`readonly` casing), Timeline (`dotVariant`), Dialog (`size` available in all stories). All corrected.
116
- - **LLM documentation** (`llms-full.txt`) Updated Badge, Button, Dialog, Header, NotificationBadge, Progress, Search, Sidebar, and Timeline sections to reflect current APIs.
117
-
118
- ---
119
-
120
- ## [1.9.0]2026-05-05
121
-
122
- ### Added
123
- - **Standardized Form Sizing System** — Implemented a unified `size` prop (`sm`, `md`, `lg`) across all form-related components for perfect visual alignment in grid layouts:
124
- - **Text Components** `Input`, `SelectTrigger`, `Textarea`, `Search`, and `InputOTPSlot` now share consistent height/padding/font-size tokens.
125
- - **Toggle Components** — `Checkbox`, `RadioGroupItem`, and `Switch` now feature dynamic sizing for both containers and internal indicators (check icon, dot, thumb).
126
- - **Labels** — `Label` component now supports `size` to match the text size of the associated input.
127
- - **Reference Guide** Added `docs/form-sizing.md` as a comprehensive guide for the standardized sizing scale.
128
- - **Assistant Individual Controls** Added granular control props to `XerticaAssistant` to toggle specific features independently:
129
- - `showHistory`, `showFavorites`, `allowAudioInput`, `allowFileUpload`, `allowDocCreation`, `allowPodcastGen`, `allowResearchGen`.
130
- - **Header Breadcrumb Navigation** Standardized `Header` to use breadcrumbs as the default navigation pattern:
131
- - Added support for `react-router-dom` links in breadcrumbs to prevent page reloads.
132
- - Configurable hierarchy levels and labels directly via props.
133
-
134
- ### Changed
135
- - **Form Component Architecture** — Migrated form elements from legacy tokens to standardized design system tokens (`bg-background`, `border-border`) for better theme consistency.
136
- - **Documentation & Storybook** — Updated all 9 affected form components with new "Sizes" sections in Storybook (Stories + MDX) and enriched LLM-facing markdown documentation.
137
- - **Unit Testing** — Updated test suites for `Checkbox`, `RadioGroup`, `Switch`, `InputOTP`, `Label`, `Search`, `Select`, and `Textarea` to verify sizing variant classes.
138
-
139
- ### Fixed
140
- - **Search Component** Removed obsolete `loading` prop which was causing TypeScript errors and was redundant with the current design system patterns.
141
- - **SelectTrigger Sizing** — Standardized `md` height to `h-10` (40px) to match the rest of the form system.
142
-
143
- ---
144
-
145
- ## [1.8.0] — 2026-04-27
146
-
147
- ### Added
148
- - **VideoPlayer UI Enhancements** Added gradient overlay on controls for improved contrast against video content:
149
- - Gradient: `from-black/60 via-black/30 to-transparent` with `pt-12` spacing
150
- - White progress bar with `bg-white/30` track, `bg-white` fill, and `rounded-r-sm` on filled portion
151
- - White icons with `drop-shadow-md` for visibility
152
- - Buttons use `text-white hover:text-white hover:bg-black/50` for proper hover states
153
- - **Slider Visual Fixes** — Improved progress bar alignment:
154
- - Added left margin `ml-2` to track for thumb alignment
155
- - Added `rounded-r-sm` to Range for filled portion
156
- - Adjusted track/margins for proper visual alignment at full value
157
-
158
- ### Changed
159
- - **Documentation**Updated component counts across all docs:
160
- - `llms.txt`: 75 97 components
161
- - `llms-full.txt`: Added statistics table
162
- - `docs/llms.md`: Added statistics section
163
- - `Introduction.mdx`: Added "97 Components" badge
164
- - **components.json** — 75 89 components (added missing Media, Assistant, Pages, and Map components)
165
-
166
- ### Fixed
167
- - **Slider Progress Bar** — Fixed visual gap where thumb doesn't align with filled bar at end position by adjusting track margins
168
-
169
- ---
170
-
171
- ## [1.7.0]2026-04-23
172
-
173
- ### Fixed
174
- - **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.).
175
- - **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.
176
- - **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.
177
-
178
- ### Added
179
- - **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.
180
- - **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.
181
- - **Documentation** — `docs/getting-started.md` updated with CLI `update` command reference and a new "CSS Setup (Critical)" section explaining the `@theme inline` requirement.
182
-
183
- ---
184
-
185
- ## [1.6.0]2026-04-20
186
-
187
- ### Added
188
- - **`docs/llms.md`** — Master LLM/AI-agent entrypoint index with full component catalog, token quick reference, and reading order guide.
189
- - **`docs/layout.md`** — Complete `LayoutContext` and `useLayout()` API reference.
190
- - **`docs/components/route-map.md`**New documentation for `RouteMap` component.
191
- - **`docs/components/use-mobile.md`**New documentation for `useMobile` / `useIsMobile` hooks.
192
- - **`Header`**New props: `user` (profile with avatar, name, email, and dropdown menu items), `actions` (custom icon action buttons), `showSettings` / `onSettingsClick`, `showLogout` / `onLogoutClick`. Fixed render order: Language → Theme → Actions → Settings → User → Logout.
193
- - **`Sidebar`** — New `width` prop (`expandedWidth: number`) for configuring the expanded sidebar pixel width. Width is now read and stored via `LayoutContext.sidebarWidth`.
194
-
195
- ### Changed
196
- - **Documentation** — All 61 component docs, 5 pattern docs, and 6 root docs fully rewritten in English with standardized structure (Overview, When to Use, Anatomy, Props table, Examples, AI Rules, Related Components).
197
- - **JSDoc** — All Portuguese JSDoc comments in `components/ui/` translated to English and enriched with accurate `@ai-rules`.
198
- - **`README.md`** — Complete rewrite in English, restructured for npm page quality (quick start, install guide, component catalog, token reference, AI agent entrypoint, troubleshooting).
199
- - **`package.json`** — Version bumped to `1.6.0`. Description translated to English.
200
-
201
- ### Fixed
202
- - **`docs/components/page-header.md`** — Was documenting a wrong API (`title/description/actions`). Now correctly documents the real API: `breadcrumbs[]`, `showLanguageSelector`, `rightContent`, `PageHeaderHeading`, `PageHeaderDescription`.
203
- - **`docs/components/stepper.md`** Was documenting a `steps[]` array prop. Now correctly documents the composable `<Stepper currentStep> + <Step step label>` API (1-indexed).
204
- - **`docs/components/empty.md`** — Was documenting single-prop component. Now correctly documents the composable sub-component pattern: `Empty > EmptyIcon > EmptyTitle > EmptyDescription > EmptyAction`.
205
- - **`docs/components/stats-card.md`** `trend` was documented as a string. Now correctly documented as `{ value: number; label?: string }`.
206
- - **`docs/components/chart.md`** Was documenting raw Recharts usage. Now correctly documents the `ChartContainer + ChartConfig + var(--color-*)` pattern.
207
-
208
- ---
209
-
210
- ## [1.5.2] — 2026-04-15
211
-
212
- ### Fixed
213
- - Resolved regression where modal components (Dialog/AlertDialog) failed to render in projects initialized via the CLI.
214
- - Implemented robust CSS integration using Tailwind v4 theme mappings.
215
- - Ensured Radix UI portals correctly inherit theme variables.
216
-
217
- ---
218
-
219
- ## [1.5.1]2026-04-14
220
-
221
- ### Changed
222
- - Sidebar: Added `assistente` variant with fixed areas, searchable navigation, and grouped navigation structures.
223
- - Template page updated to demonstrate the assistant sidebar variant.
224
-
225
- ---
226
-
227
- ## [1.5.0] — 2026-04-13
228
-
229
- ### Added
230
- - `Sidebar` — `width` / `expandedWidth` prop for configurable expanded sidebar width.
231
- - `LayoutContext` — `sidebarWidth` and `setSidebarWidth` for global sidebar width management.
232
- - `Header` — User profile section with avatar, dropdown menu, settings button, and logout button.
233
- - `StatsCard` — KPI metric card component.
234
- - `Timeline` — Chronological event list with dot variants.
235
- - `TreeView`Hierarchical tree navigation.
236
- - `Rating`Star-based rating input.
237
- - `FileUpload` — Drag-and-drop file input.
238
- - `Search` — Pre-built search input with icon and clear button.
239
- - `NotificationBadge` — Dot/count badge overlay.
240
- - `RouteMap`Google Maps route display and direction calculation.
241
- - `Stepper` — Multi-step progress indicator.
242
- - `Map` — Advanced Google Maps integration with markers, circles, polygons, and layers.
243
- - `XerticaAssistant`Embedded Gemini AI assistant panel.
1
+ # Changelog
2
+
3
+ All notable changes to `xertica-ui` will be documented in this file.
4
+
5
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
+ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [2.1.0] — 2026-05-13
11
+
12
+ ### Added
13
+
14
+ - **`components/blocks/card-patterns/`** — novo domínio `blocks/` com 6 componentes de alto nível compostos exclusivamente de primitivos `ui/`:
15
+ - **`FeatureCard`** — ícone com fundo colorido, título, badge opcional, descrição e botão de ação. Suporta 10 tokens de cor (`primary`, `chart-1..5`, `success`, `info`, `warning`, `destructive`). Replica o padrão de cards da Home page.
16
+ - **`ActivityCard`** — feed de atividades recentes com avatar, descrição de ação, timestamp e badge por tipo (`create`, `update`, `delete`, `comment`, `deploy`).
17
+ - **`ProfileCard`**card de usuário/membro com avatar, badge de status (`online`, `offline`, `away`, `busy`), linha de stats e ações primária/secundária.
18
+ - **`ProjectCard`** status de projeto com badge, barra de progresso (usa `Progress` com variant semântica por status), stack de avatares de membros e data limite.
19
+ - **`QuickActionCard`** — tile de ação rápida com ícone em caixa colorida, badge e botão full-width.
20
+ - **`NotificationCard`** — lista de notificações com indicador de não-lido, badge de tipo, "Marcar todas como lidas" e "Ver todas".
21
+ - **Exportação do domínio `blocks/`** — todos os componentes disponíveis via `import { ... } from 'xertica-ui'` e via `components/blocks/index.ts`.
22
+ - **Documentação**criado `docs/components/card-patterns.md` com props, exemplos e layout de dashboard completo para todos os 6 block components.
23
+
24
+ ### Changed
25
+
26
+ - **Calendar — dropdown caption styling** — quando `captionLayout="dropdown"` ou variações, os seletores de mês/ano agora têm visual de input (borda, fundo `bg-background`, focus ring `ring-primary`, `rounded-[var(--radius)]`, padding compacto fixo `px-2.5 py-1`). O `caption_label` em modo dropdown passa a usar `h-full w-full` com layout flexível.
27
+ - **Calendar — prop `size` removida** — o tamanho e o arredondamento do trigger ("Pick a date") são responsabilidade do elemento trigger, não do `Calendar`. A story `InPopover` demonstra o padrão correto com `triggerSizeClasses` aplicado diretamente ao `<Button>` com `rounded-[var(--radius)]` para alinhar com o token do `Input`.
28
+ - **Card stories** — enriquecidas com 3 novas variações: `WithAction` (uso de `CardAction` no header), `TeamMember` (grid de member cards com avatar e status), `SettingsCard` (lista de settings com `Separator` e `Badge`). Background `bg-muted` adicionado via decorator global da stories file para contraste com o fundo dos cards.
29
+ - **Storybook docs stories** — adicionado `render: (args) => <Component {...args} />` no nível do `meta` em todos os 60 arquivos de stories em `components/ui/`. Resolve o problema onde stories com apenas `args` (sem `render` explícito) mostravam a mesma variação repetida na aba Docs por dependerem do `projectAnnotations.render` implícito do framework React.
30
+ - **Storybook — `preview.tsx`** — `min-h-screen` passou a ser condicional a `layout: 'fullscreen'`, resolvendo a altura excessiva dos exemplos na aba Docs.
31
+ - **Documentação** — atualizados `calendar.md` (props `captionLayout`/`buttonVariant`, nota sobre `size` no trigger), `card.md` (`CardAction` na anatomia, exemplos WithAction/Stats/TeamMember/Settings), `chart.md` (nova seção Stacked Bar Chart), `architecture.md` (domínio `blocks/` com árvore de arquivos).
32
+
33
+ ### Fixed
34
+
35
+ - **Chart — stacked bar radius** — em `DashboardBarChart` com `stacked`, apenas a série no topo de cada `stackId` recebe `radius={[4,4,0,0]}`; as demais recebem `radius={[0,0,0,0]}`. Elimina a borda arredondada no topo das barras intermediárias e inferiores da pilha.
36
+ - **`FeatureCard` — badge overflow** — alterado de `flex items-center` para `flex flex-wrap` no container título+badge, garantindo que o badge quebre para a linha seguinte em vez de vazar fora do card quando o título ocupa toda a largura disponível.
37
+
38
+ ---
39
+
40
+ ## [2.0.6] — 2026-05-13
41
+
42
+ ### Added
43
+
44
+ - **Contrato de independência dos componentes** — documentado que `xertica-ui/style.css` é a única importação global obrigatória e que componentes públicos devem funcionar isoladamente sempre que possível.
45
+ - **`useOptionalLayout`** nova API compatível para componentes reutilizáveis consumirem o layout com fallback seguro, mantendo `useLayout` como hook estrito para apps que querem falhar cedo.
46
+ - **Smoke tests de API pública** — adicionada validação de import/render dos subpaths públicos (`ui`, `brand`, `layout`, `assistant`, `media` e `hooks`).
47
+ - **Exports públicos de Maps** — `useMapLayers`, `GOOGLE_MAPS_ID` e `GOOGLE_MAPS_LIBRARIES` agora são expostos pelo subpath `xertica-ui/ui`.
48
+
49
+ ### Changed
50
+
51
+ - **`XerticaProvider` completo** passa a compor providers de theme, brand colors, language, layout, assistant, API keys, Google Maps, tooltip e toaster como wrapper de conveniência para apps consumidores.
52
+ - **Componentes com contexto de layout** `Header`, `Sidebar`, páginas e componentes de mídia foram ajustados para renderizar com fallback interno quando importados sem provider.
53
+ - **Arquitetura FSD/FDA** — tipos compartilhados do assistant foram movidos para camada neutra, evitando dependência runtime de `components/shared` para implementação de feature.
54
+ - **Documentação LLM e componentes** — README, docs de provider/mapa, `llms.txt`, `llms-compact.txt` e `docs/llms.md` foram alinhados ao contrato de independência e aos subpaths consumíveis.
55
+ - **Storybook Docs de UI** — páginas MDX dos componentes de UI agora renderizam as variações reais das stories, evitando repetição do mesmo exemplo nos blocos de variação.
56
+ - **Storybook Maps** — stories de mapa usam um frame responsivo mais largo para melhorar a visualização na aba Docs.
57
+
58
+ ### Fixed
59
+
60
+ - **Guards de browser/SSR** — providers e componentes browser-only agora protegem acessos a `window`, `document`, `localStorage`, `navigator` e scripts externos.
61
+ - **Google Maps sem configuração** — componentes relacionados a Maps renderizam estados de configuração/erro sem quebrar a aplicação consumidora.
62
+
63
+ ---
64
+
65
+ ## [2.0.5]2026-05-12
66
+
67
+ ### Added
68
+
69
+ - **`llms-compact.txt`** — novo arquivo de referência compacto para LLMs, sintetizando todos os componentes em formato reduzido ideal para contextos de tokens limitados.
70
+ - **`docs/decision-tree.md`** guia de árvore de decisão para agentes de IA selecionarem o componente correto com base nos requisitos da UI.
71
+ - **`templates/CLAUDE.md`**`CLAUDE.md` agora é scaffolded automaticamente em projetos criados via `npx xertica-ui@latest init`, fornecendo contexto arquitetural (FSD/FDA, subpath imports, tokens semânticos) para Claude Code e outros assistentes de IA.
72
+ - **Storybook stories** adicionadas stories interativas para Accordion, AlertDialog, Button, Checkbox, Dialog, Input, Switch, Tabs, HomePage e TemplatePage.
73
+ - **`components/pages/home-page/home-page.mdx`** e **`template-page.mdx`** novas entradas de documentação MDX para as page components.
74
+
75
+ ### Changed
76
+
77
+ - **`guidelines/Guidelines.md`**reescrita completa do guia de arquitetura FSD/FDA: maior detalhamento de responsabilidades por camada, convenções de import e fluxo de adição de novas rotas.
78
+ - **`components.json`** — atualização completa do registro de componentes, cobrindo todos os 97 componentes com metadados de subpath, props e variantes.
79
+ - **`llms.txt`** — seção de subpath imports e mapeamento de camadas FSD/FDA atualizados.
80
+ - **`vite.config.ts`** — ajustes no build multi-entry para garantir correta emissão dos arquivos CJS/ESM.
81
+
82
+ ### Fixed
83
+
84
+ - **`npx xertica-ui init` usa versão em cache** documentado que o npx armazena pacotes em cache localmente sem TTL curto. Sempre use `npx xertica-ui@latest init` para garantir a versão mais recente. O `templates/CLAUDE.md` scaffolded no projeto gerado inclui essa orientação.
85
+
86
+ ---
87
+
88
+ ## [2.0.3] — 2026-05-11
89
+
90
+ ### Added
91
+
92
+ - **CLI `update` — atualização de projeto** — novo modo no comando `update` permite atualizar os arquivos do projeto (app shell, shared, features, pages) para qualquer versão publicada do `xertica-ui`, com seleção granular de quais partes atualizar e confirmação antes de sobrescrever.
93
+
94
+ ---
95
+
96
+ ## [2.0.2] — 2026-05-11
97
+
98
+ ### Fixed
99
+
100
+ - **CLI rewritten for FSD/FDA structure** `npx xertica-ui@latest init` agora copia corretamente a estrutura Feature-Sliced Design:
101
+ - Removida cópia de `src/app/routes.tsx` (arquivo não existe mais após refatoração)
102
+ - Adicionada cópia de `src/app/components/AppLayout.tsx`
103
+ - Adicionada cópia completa de `src/shared/` (`auth.ts`, `navigation.ts`, `types/auth.ts`)
104
+ - Adicionada cópia de `src/features/auth|home|template` conforme seleções do usuário
105
+ - Cópia de pages corrigida de `src/app/pages/` `src/pages/`
106
+ - `AuthGuard.tsx` agora gerado dinamicamente com imports e rotas apenas das páginas selecionadas
107
+ - **`generateDemoResponse` exportado via `xertica-ui/assistant`** — estava ausente do barrel causando `SyntaxError: does not provide an export named 'generateDemoResponse'`
108
+ - **Build corrigido: UMD → CJS** — múltiplos entry points não são suportados com formato UMD no Vite; migrado para CJS (todos os `*.umd.js` → `*.cjs.js` no `package.json` exports)
109
+
110
+ ---
111
+
112
+ ## [2.0.0] — 2026-05-11
113
+
114
+ ### Added
115
+
116
+ - **Subpath exports** — The package now exposes 6 granular entry points alongside the full root barrel:
117
+ - `xertica-ui/ui` — all UI primitives (Button, Card, Input, Table, Dialog, etc.)
118
+ - `xertica-ui/layout` — Sidebar and Header
119
+ - `xertica-ui/brand` — XerticaProvider, XerticaLogo, XerticaXLogo, XerticaOrbe, ThemeToggle, LanguageSelector
120
+ - `xertica-ui/assistant`XerticaAssistant, MarkdownMessage, CodeBlock, FormattedDocument, ModernChatInput
121
+ - `xertica-ui/media` — VideoPlayer, AudioPlayer, FloatingMediaWrapper
122
+ - `xertica-ui/hooks` — useLayout, useTheme, useLanguage, useBrandColors, useAssistente, useApiKey
123
+ - Root `from 'xertica-ui'` remains fully supported for backward compatibility.
124
+ - **`ImageWithFallback` added to `xertica-ui/ui`** previously only in the root barrel; now accessible via the `/ui` subpath.
125
+ - **Multi-entry Vite build** — `vite.config.ts` now uses `lib.entry` as an object (7 entry points). Output filenames follow `[entryName].[format].js` pattern.
126
+ - **CLI template — FSD/FDA architecture** — The scaffolded template was restructured to follow Feature-Sliced Design + Feature-Driven Architecture:
127
+ - `src/app/`BrowserRouter, XerticaProvider, AuthGuard (auth state + route definitions), AppLayout (Sidebar + children shell)
128
+ - `src/shared/``config/navigation.ts` (route registry), `lib/auth.ts` (localStorage helpers), `types/auth.ts` (User interface)
129
+ - `src/features/auth/ui/` LoginContent, ForgotPasswordContent, VerifyEmailContent, ResetPasswordContent; with shared `AuthPageShell` and `SocialLoginButtons` DRY extractions
130
+ - `src/features/home/ui/`HomeContent
131
+ - `src/features/template/ui/` TemplateContent, FormTemplate
132
+ - `src/pages/` thin page wrappers (LoginPage, HomePage, TemplatePage, ForgotPasswordPage, VerifyEmailPage, ResetPasswordPage)
133
+ - **`templates/guidelines/Guidelines.md`** — new architecture guide documenting FSD/FDA layers, layer responsibilities, and "Adding New Routes" step-by-step.
134
+
135
+ ### Changed
136
+
137
+ - **Template imports** — All template source files updated to use subpath imports (`xertica-ui/ui`, `xertica-ui/brand`, `xertica-ui/layout`, `xertica-ui/assistant`, `xertica-ui/hooks`) instead of the root barrel.
138
+ - **`FormTemplate.tsx` rewritten** — Removed dependency on `@hookform/resolvers/zod`, `react-hook-form`, and `zod` (packages not included in the CLI template's `package.json`). Now uses plain React `useState` + inline validation with only `xertica-ui/ui` primitives.
139
+ - **`tsconfig.build.json`** — `include` array updated to cover all new barrel source directories (`components/**/*`, `contexts/**/*`, `hooks/**/*`).
140
+ - **Documentation** (`llms.txt`, `llms-full.txt`) Added subpath import reference table and FSD/FDA layer mapping.
141
+
142
+ ### Fixed
143
+
144
+ - **Stale compiled artifacts** — Removed `App.js`, `App.d.ts`, `main.js`, `main.d.ts` from `templates/src/app/` that were being resolved by Vite's extension priority (`.js` before `.tsx`), causing `Failed to fetch dynamically imported module` errors after the FSD restructure.
145
+
146
+ ---
147
+
148
+ ## [1.10.0]2026-05-08
149
+
150
+ ### Added
151
+
152
+ - **Semantic Variants** — Added `success`, `info`, and `warning` variants to components that lacked them:
153
+ - **Button** — now supports 9 variants: `default`, `secondary`, `outline`, `ghost`, `destructive`, `link`, `success`, `info`, `warning`.
154
+ - **Progress** new `variant` prop (`default`, `success`, `info`, `warning`, `destructive`) colors both the track and the indicator.
155
+ - **NotificationBadge** — added `secondary`, `outline`, `success`, `info`, `warning`; standardized `default` to primary color for consistency with Badge and Button.
156
+ - **TimelineDot** added `info` and `outline` variants; replaced hardcoded `rgb()` values with semantic CSS tokens (`bg-success`, `bg-warning`).
157
+ - **DialogBody** — new sub-component for the Dialog. When used, `DialogHeader` and `DialogFooter` stay pinned while `DialogBody` scrolls independently. Exported from `xertica-ui`.
158
+ - **Dialog height management** — `DialogContent` now has `max-h-[calc(100dvh-2rem)] overflow-hidden`. The close button (×) is pinned and never scrolls with content. `size="full"` fills the full viewport height.
159
+ - **Header `breadcrumbSlot`** new prop accepting any `ReactNode` rendered immediately after the breadcrumb/title area (badges, buttons, status chips, etc.).
160
+ - **Sidebar default variant groups** — `variant="default"` now renders `navigationGroups` with labeled group headers. Each `RouteConfig` supports a `children` field (sub-routes shown in a contextual `DropdownMenu` via a `ChevronRight` button at the end of the item).
161
+
162
+ ### Fixed
163
+
164
+ - **Search double clear icon** — `type="search"` caused browsers to inject a native clear button on top of the custom × icon. Changed to `type="text"`.
165
+ - **CSS `@source` path** — CLI template `src/styles/index.css` had `../node_modules/xertica-ui` (one level short); corrected to `../../node_modules/xertica-ui/components`.
166
+ - **`theme-map.css` incomplete** — `--color-success`, `--color-info`, `--color-warning` and their `foreground` variants were missing, preventing `bg-success`, `text-info`, etc. from being generated in the compiled library CSS.
167
+
168
+ ### Changed
169
+
170
+ - **Storybook argTypes** — Multiple components had controls missing from the Storybook panel: Badge (`success`/`info`/`warning` options), Select (`size`), Avatar (`size`), Rating (`readonly` casing), Timeline (`dotVariant`), Dialog (`size` available in all stories). All corrected.
171
+ - **LLM documentation** (`llms-full.txt`)Updated Badge, Button, Dialog, Header, NotificationBadge, Progress, Search, Sidebar, and Timeline sections to reflect current APIs.
172
+
173
+ ---
174
+
175
+ ## [1.9.0] 2026-05-05
176
+
177
+ ### Added
178
+ - **Standardized Form Sizing System** — Implemented a unified `size` prop (`sm`, `md`, `lg`) across all form-related components for perfect visual alignment in grid layouts:
179
+ - **Text Components** — `Input`, `SelectTrigger`, `Textarea`, `Search`, and `InputOTPSlot` now share consistent height/padding/font-size tokens.
180
+ - **Toggle Components** — `Checkbox`, `RadioGroupItem`, and `Switch` now feature dynamic sizing for both containers and internal indicators (check icon, dot, thumb).
181
+ - **Labels** — `Label` component now supports `size` to match the text size of the associated input.
182
+ - **Reference Guide** — Added `docs/form-sizing.md` as a comprehensive guide for the standardized sizing scale.
183
+ - **Assistant Individual Controls** — Added granular control props to `XerticaAssistant` to toggle specific features independently:
184
+ - `showHistory`, `showFavorites`, `allowAudioInput`, `allowFileUpload`, `allowDocCreation`, `allowPodcastGen`, `allowResearchGen`.
185
+ - **Header Breadcrumb Navigation** Standardized `Header` to use breadcrumbs as the default navigation pattern:
186
+ - Added support for `react-router-dom` links in breadcrumbs to prevent page reloads.
187
+ - Configurable hierarchy levels and labels directly via props.
188
+
189
+ ### Changed
190
+ - **Form Component Architecture** Migrated form elements from legacy tokens to standardized design system tokens (`bg-background`, `border-border`) for better theme consistency.
191
+ - **Documentation & Storybook** Updated all 9 affected form components with new "Sizes" sections in Storybook (Stories + MDX) and enriched LLM-facing markdown documentation.
192
+ - **Unit Testing** Updated test suites for `Checkbox`, `RadioGroup`, `Switch`, `InputOTP`, `Label`, `Search`, `Select`, and `Textarea` to verify sizing variant classes.
193
+
194
+ ### Fixed
195
+ - **Search Component** — Removed obsolete `loading` prop which was causing TypeScript errors and was redundant with the current design system patterns.
196
+ - **SelectTrigger Sizing** — Standardized `md` height to `h-10` (40px) to match the rest of the form system.
197
+
198
+ ---
199
+
200
+ ## [1.8.0] — 2026-04-27
201
+
202
+ ### Added
203
+ - **VideoPlayer UI Enhancements** Added gradient overlay on controls for improved contrast against video content:
204
+ - Gradient: `from-black/60 via-black/30 to-transparent` with `pt-12` spacing
205
+ - White progress bar with `bg-white/30` track, `bg-white` fill, and `rounded-r-sm` on filled portion
206
+ - White icons with `drop-shadow-md` for visibility
207
+ - Buttons use `text-white hover:text-white hover:bg-black/50` for proper hover states
208
+ - **Slider Visual Fixes** — Improved progress bar alignment:
209
+ - Added left margin `ml-2` to track for thumb alignment
210
+ - Added `rounded-r-sm` to Range for filled portion
211
+ - Adjusted track/margins for proper visual alignment at full value
212
+
213
+ ### Changed
214
+ - **Documentation** Updated component counts across all docs:
215
+ - `llms.txt`: 75 97 components
216
+ - `llms-full.txt`: Added statistics table
217
+ - `docs/llms.md`: Added statistics section
218
+ - `Introduction.mdx`: Added "97 Components" badge
219
+ - **components.json**75 → 89 components (added missing Media, Assistant, Pages, and Map components)
220
+
221
+ ### Fixed
222
+ - **Slider Progress Bar** Fixed visual gap where thumb doesn't align with filled bar at end position by adjusting track margins
223
+
224
+ ---
225
+
226
+ ## [1.7.0] — 2026-04-23
227
+
228
+ ### Fixed
229
+ - **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.).
230
+ - **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.
231
+ - **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.
232
+
233
+ ### Added
234
+ - **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.
235
+ - **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.
236
+ - **Documentation**`docs/getting-started.md` updated with CLI `update` command reference and a new "CSS Setup (Critical)" section explaining the `@theme inline` requirement.
237
+
238
+ ---
239
+
240
+ ## [1.6.0]2026-04-20
241
+
242
+ ### Added
243
+ - **`docs/llms.md`**Master LLM/AI-agent entrypoint index with full component catalog, token quick reference, and reading order guide.
244
+ - **`docs/layout.md`** — Complete `LayoutContext` and `useLayout()` API reference.
245
+ - **`docs/components/route-map.md`** — New documentation for `RouteMap` component.
246
+ - **`docs/components/use-mobile.md`** — New documentation for `useMobile` / `useIsMobile` hooks.
247
+ - **`Header`** — New props: `user` (profile with avatar, name, email, and dropdown menu items), `actions` (custom icon action buttons), `showSettings` / `onSettingsClick`, `showLogout` / `onLogoutClick`. Fixed render order: Language → Theme → Actions → Settings → User → Logout.
248
+ - **`Sidebar`** — New `width` prop (`expandedWidth: number`) for configuring the expanded sidebar pixel width. Width is now read and stored via `LayoutContext.sidebarWidth`.
249
+
250
+ ### Changed
251
+ - **Documentation** — All 61 component docs, 5 pattern docs, and 6 root docs fully rewritten in English with standardized structure (Overview, When to Use, Anatomy, Props table, Examples, AI Rules, Related Components).
252
+ - **JSDoc** — All Portuguese JSDoc comments in `components/ui/` translated to English and enriched with accurate `@ai-rules`.
253
+ - **`README.md`** — Complete rewrite in English, restructured for npm page quality (quick start, install guide, component catalog, token reference, AI agent entrypoint, troubleshooting).
254
+ - **`package.json`** — Version bumped to `1.6.0`. Description translated to English.
255
+
256
+ ### Fixed
257
+ - **`docs/components/page-header.md`** — Was documenting a wrong API (`title/description/actions`). Now correctly documents the real API: `breadcrumbs[]`, `showLanguageSelector`, `rightContent`, `PageHeaderHeading`, `PageHeaderDescription`.
258
+ - **`docs/components/stepper.md`** — Was documenting a `steps[]` array prop. Now correctly documents the composable `<Stepper currentStep> + <Step step label>` API (1-indexed).
259
+ - **`docs/components/empty.md`** — Was documenting single-prop component. Now correctly documents the composable sub-component pattern: `Empty > EmptyIcon > EmptyTitle > EmptyDescription > EmptyAction`.
260
+ - **`docs/components/stats-card.md`** — `trend` was documented as a string. Now correctly documented as `{ value: number; label?: string }`.
261
+ - **`docs/components/chart.md`** — Was documenting raw Recharts usage. Now correctly documents the `ChartContainer + ChartConfig + var(--color-*)` pattern.
262
+
263
+ ---
264
+
265
+ ## [1.5.2] — 2026-04-15
266
+
267
+ ### Fixed
268
+ - Resolved regression where modal components (Dialog/AlertDialog) failed to render in projects initialized via the CLI.
269
+ - Implemented robust CSS integration using Tailwind v4 theme mappings.
270
+ - Ensured Radix UI portals correctly inherit theme variables.
271
+
272
+ ---
273
+
274
+ ## [1.5.1] — 2026-04-14
275
+
276
+ ### Changed
277
+ - Sidebar: Added `assistente` variant with fixed areas, searchable navigation, and grouped navigation structures.
278
+ - Template page updated to demonstrate the assistant sidebar variant.
279
+
280
+ ---
281
+
282
+ ## [1.5.0] — 2026-04-13
283
+
284
+ ### Added
285
+ - `Sidebar` — `width` / `expandedWidth` prop for configurable expanded sidebar width.
286
+ - `LayoutContext` — `sidebarWidth` and `setSidebarWidth` for global sidebar width management.
287
+ - `Header` — User profile section with avatar, dropdown menu, settings button, and logout button.
288
+ - `StatsCard` — KPI metric card component.
289
+ - `Timeline` — Chronological event list with dot variants.
290
+ - `TreeView` — Hierarchical tree navigation.
291
+ - `Rating` — Star-based rating input.
292
+ - `FileUpload` — Drag-and-drop file input.
293
+ - `Search` — Pre-built search input with icon and clear button.
294
+ - `NotificationBadge` — Dot/count badge overlay.
295
+ - `RouteMap` — Google Maps route display and direction calculation.
296
+ - `Stepper` — Multi-step progress indicator.
297
+ - `Map` — Advanced Google Maps integration with markers, circles, polygons, and layers.
298
+ - `XerticaAssistant` — Embedded Gemini AI assistant panel.