xertica-ui 1.9.0 → 1.9.2

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 (205) hide show
  1. package/README.md +184 -184
  2. package/components/assistant/modern-chat-input/modern-chat-input.mdx +71 -71
  3. package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +131 -131
  4. package/components/assistant/xertica-assistant/xertica-assistant.mdx +66 -66
  5. package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +201 -201
  6. package/components/examples/SidebarLogoExample.tsx +1 -1
  7. package/components/layout/header/header.mdx +117 -117
  8. package/components/layout/header/header.stories.tsx +165 -165
  9. package/components/layout/sidebar/sidebar.tsx +24 -7
  10. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +1 -1
  11. package/components/pages/forgot-password-page/forgot-password-page.test.tsx +1 -1
  12. package/components/pages/home-content/HomeContent.tsx +10 -5
  13. package/components/pages/home-page/HomePage.tsx +12 -3
  14. package/components/pages/home-page/home-page.test.tsx +1 -1
  15. package/components/pages/login-page/LoginPage.tsx +1 -1
  16. package/components/pages/login-page/login-page.test.tsx +1 -1
  17. package/components/pages/reset-password-page/ResetPasswordPage.tsx +1 -1
  18. package/components/pages/template-content/TemplateContent.tsx +10 -27
  19. package/components/pages/template-page/TemplatePage.tsx +12 -3
  20. package/components/pages/template-page/template-page.test.tsx +1 -1
  21. package/components/pages/verify-email-page/VerifyEmailPage.tsx +1 -1
  22. package/components/ui/checkbox/checkbox.stories.tsx +83 -83
  23. package/components/ui/input/input.stories.tsx +108 -108
  24. package/components/ui/input-otp/input-otp.stories.tsx +120 -120
  25. package/components/ui/input-otp/input-otp.test.tsx +79 -79
  26. package/components/ui/label/label.stories.tsx +73 -73
  27. package/components/ui/label/label.test.tsx +1 -1
  28. package/components/ui/radio-group/radio-group.stories.tsx +105 -105
  29. package/components/ui/radio-group/radio-group.test.tsx +78 -78
  30. package/components/ui/search/search.stories.tsx +107 -107
  31. package/components/ui/select/select.stories.tsx +148 -148
  32. package/components/ui/select/select.test.tsx +1 -1
  33. package/components/ui/switch/switch.stories.tsx +67 -67
  34. package/components/ui/switch/switch.test.tsx +1 -1
  35. package/components/ui/textarea/textarea.stories.tsx +66 -66
  36. package/components/ui/textarea/textarea.test.tsx +41 -41
  37. package/dist/components/layout/sidebar/sidebar.d.ts +6 -2
  38. package/dist/components/pages/home-content/HomeContent.d.ts +8 -1
  39. package/dist/components/pages/template-content/TemplateContent.d.ts +8 -1
  40. package/dist/index.es.js +44 -2043
  41. package/dist/index.umd.js +47 -2047
  42. package/docs/components/header.md +214 -214
  43. package/docs/form-sizing.md +154 -154
  44. package/docs/installation.md +1 -1
  45. package/guidelines/Guidelines.md +2 -2
  46. package/package.json +1 -1
  47. package/styles/xertica/theme-map.css +91 -91
  48. package/templates/package.json +2 -2
  49. package/templates/src/app/App.d.ts +1 -0
  50. package/templates/src/app/App.js +70 -0
  51. package/templates/src/app/pages/CrudTemplate.d.ts +1 -0
  52. package/templates/src/app/pages/CrudTemplate.js +6 -0
  53. package/templates/src/app/pages/DashboardTemplate.d.ts +1 -0
  54. package/templates/src/app/pages/DashboardTemplate.js +9 -0
  55. package/templates/src/app/pages/ForgotPassword/ForgotPasswordContent.d.ts +1 -0
  56. package/templates/src/app/pages/ForgotPassword/ForgotPasswordContent.js +21 -0
  57. package/templates/src/app/pages/ForgotPasswordPage.d.ts +1 -0
  58. package/templates/src/app/pages/ForgotPasswordPage.js +5 -0
  59. package/templates/src/app/pages/FormTemplate.d.ts +1 -0
  60. package/templates/src/app/pages/FormTemplate.js +23 -0
  61. package/templates/src/app/pages/Home/HomeContent.d.ts +1 -0
  62. package/templates/src/app/pages/Home/HomeContent.js +24 -0
  63. package/templates/src/app/pages/Home/HomeContent.tsx +11 -4
  64. package/templates/src/app/pages/HomePage.d.ts +8 -0
  65. package/templates/src/app/pages/HomePage.js +24 -0
  66. package/templates/src/app/pages/HomePage.tsx +7 -2
  67. package/templates/src/app/pages/Login/LoginContent.d.ts +5 -0
  68. package/templates/src/app/pages/Login/LoginContent.js +28 -0
  69. package/templates/src/app/pages/LoginPage.d.ts +5 -0
  70. package/templates/src/app/pages/LoginPage.js +5 -0
  71. package/templates/src/app/pages/LoginTemplate.d.ts +1 -0
  72. package/templates/src/app/pages/LoginTemplate.js +6 -0
  73. package/templates/src/app/pages/ResetPassword/ResetPasswordContent.d.ts +1 -0
  74. package/templates/src/app/pages/ResetPassword/ResetPasswordContent.js +73 -0
  75. package/templates/src/app/pages/ResetPasswordPage.d.ts +1 -0
  76. package/templates/src/app/pages/ResetPasswordPage.js +5 -0
  77. package/templates/src/app/pages/Template/TemplateContent.d.ts +1 -0
  78. package/templates/src/app/pages/Template/TemplateContent.js +75 -0
  79. package/templates/src/app/pages/Template/TemplateContent.tsx +7 -2
  80. package/templates/src/app/pages/TemplatePage.d.ts +8 -0
  81. package/templates/src/app/pages/TemplatePage.js +11 -0
  82. package/templates/src/app/pages/TemplatePage.tsx +6 -1
  83. package/templates/src/app/pages/VerifyEmail/VerifyEmailContent.d.ts +1 -0
  84. package/templates/src/app/pages/VerifyEmail/VerifyEmailContent.js +24 -0
  85. package/templates/src/app/pages/VerifyEmailPage.d.ts +1 -0
  86. package/templates/src/app/pages/VerifyEmailPage.js +5 -0
  87. package/templates/src/app/routes.d.ts +10 -0
  88. package/templates/src/app/routes.js +22 -0
  89. package/templates/src/main.d.ts +1 -0
  90. package/templates/src/main.js +6 -0
  91. package/templates/tsconfig.json +16 -6
  92. package/templates/tsconfig.node.json +1 -1
  93. package/templates/tsconfig.node.tsbuildinfo +1 -1
  94. package/templates/tsconfig.tsbuildinfo +1 -1
  95. package/templates/vite.config.d.ts +2 -0
  96. package/templates/vite.config.js +6 -0
  97. package/utils/demo-responses.test.ts +2 -2
  98. package/utils/demo-responses.ts +1 -1
  99. package/dist/AssistantChart-BkwfdilF.js +0 -22
  100. package/dist/AssistantChart-G8I1Kfu4.js +0 -22
  101. package/dist/components/AssistenteXertica.d.ts +0 -17
  102. package/dist/components/AudioPlayer.d.ts +0 -35
  103. package/dist/components/CodeBlock.d.ts +0 -28
  104. package/dist/components/DocumentEditor.d.ts +0 -26
  105. package/dist/components/ForgotPasswordPage.d.ts +0 -13
  106. package/dist/components/FormattedDocument.d.ts +0 -25
  107. package/dist/components/Header.d.ts +0 -72
  108. package/dist/components/HomeContent.d.ts +0 -20
  109. package/dist/components/HomePage.d.ts +0 -26
  110. package/dist/components/LanguageSelector.d.ts +0 -26
  111. package/dist/components/LoginPage.d.ts +0 -25
  112. package/dist/components/MarkdownMessage.d.ts +0 -24
  113. package/dist/components/ModernChatInput.d.ts +0 -44
  114. package/dist/components/PodcastPlayer.d.ts +0 -41
  115. package/dist/components/ResetPasswordPage.d.ts +0 -14
  116. package/dist/components/Sidebar.d.ts +0 -126
  117. package/dist/components/TemplateContent.d.ts +0 -19
  118. package/dist/components/TemplatePage.d.ts +0 -24
  119. package/dist/components/ThemeToggle.d.ts +0 -26
  120. package/dist/components/VerifyEmailPage.d.ts +0 -14
  121. package/dist/components/XerticaLogo.d.ts +0 -24
  122. package/dist/components/XerticaOrbe.d.ts +0 -23
  123. package/dist/components/XerticaProvider.d.ts +0 -35
  124. package/dist/components/XerticaXLogo.d.ts +0 -23
  125. package/dist/components/assistant-utils.d.ts +0 -21
  126. package/dist/components/layout-constants.d.ts +0 -8
  127. package/dist/components/media/AudioPlayer.d.ts +0 -9
  128. package/dist/components/media/VideoPlayer.d.ts +0 -8
  129. package/dist/components/ui/AssistantChart.d.ts +0 -7
  130. package/dist/components/ui/accordion.d.ts +0 -20
  131. package/dist/components/ui/alert-dialog.d.ts +0 -26
  132. package/dist/components/ui/alert.d.ts +0 -25
  133. package/dist/components/ui/aspect-ratio.d.ts +0 -14
  134. package/dist/components/ui/avatar.d.ts +0 -20
  135. package/dist/components/ui/badge.d.ts +0 -22
  136. package/dist/components/ui/breadcrumb.d.ts +0 -23
  137. package/dist/components/ui/button.d.ts +0 -37
  138. package/dist/components/ui/calendar.d.ts +0 -20
  139. package/dist/components/ui/card.d.ts +0 -21
  140. package/dist/components/ui/carousel.d.ts +0 -31
  141. package/dist/components/ui/chart.d.ts +0 -55
  142. package/dist/components/ui/checkbox.d.ts +0 -16
  143. package/dist/components/ui/collapsible.d.ts +0 -16
  144. package/dist/components/ui/command.d.ts +0 -29
  145. package/dist/components/ui/context-menu.d.ts +0 -37
  146. package/dist/components/ui/dialog.d.ts +0 -33
  147. package/dist/components/ui/drawer.d.ts +0 -26
  148. package/dist/components/ui/dropdown-menu.d.ts +0 -37
  149. package/dist/components/ui/empty.d.ts +0 -22
  150. package/dist/components/ui/file-upload.d.ts +0 -24
  151. package/dist/components/ui/form.d.ts +0 -37
  152. package/dist/components/ui/google-maps-loader.d.ts +0 -33
  153. package/dist/components/ui/hover-card.d.ts +0 -18
  154. package/dist/components/ui/input-otp.d.ts +0 -23
  155. package/dist/components/ui/input.d.ts +0 -25
  156. package/dist/components/ui/label.d.ts +0 -15
  157. package/dist/components/ui/map-config.d.ts +0 -12
  158. package/dist/components/ui/map-layers.d.ts +0 -48
  159. package/dist/components/ui/map.d.ts +0 -82
  160. package/dist/components/ui/map.exports.d.ts +0 -25
  161. package/dist/components/ui/menubar.d.ts +0 -39
  162. package/dist/components/ui/navigation-menu.d.ts +0 -26
  163. package/dist/components/ui/notification-badge.d.ts +0 -24
  164. package/dist/components/ui/page-header.d.ts +0 -76
  165. package/dist/components/ui/pagination.d.ts +0 -25
  166. package/dist/components/ui/popover.d.ts +0 -19
  167. package/dist/components/ui/progress.d.ts +0 -15
  168. package/dist/components/ui/radio-group.d.ts +0 -17
  169. package/dist/components/ui/rating.d.ts +0 -24
  170. package/dist/components/ui/resizable.d.ts +0 -39
  171. package/dist/components/ui/route-map.d.ts +0 -41
  172. package/dist/components/ui/scroll-area.d.ts +0 -16
  173. package/dist/components/ui/search.d.ts +0 -20
  174. package/dist/components/ui/select.d.ts +0 -27
  175. package/dist/components/ui/separator.d.ts +0 -15
  176. package/dist/components/ui/sheet.d.ts +0 -26
  177. package/dist/components/ui/sidebar.d.ts +0 -69
  178. package/dist/components/ui/simple-map.d.ts +0 -57
  179. package/dist/components/ui/skeleton.d.ts +0 -14
  180. package/dist/components/ui/slider.d.ts +0 -16
  181. package/dist/components/ui/sonner.d.ts +0 -15
  182. package/dist/components/ui/stats-card.d.ts +0 -29
  183. package/dist/components/ui/stepper.d.ts +0 -31
  184. package/dist/components/ui/switch.d.ts +0 -15
  185. package/dist/components/ui/table.d.ts +0 -22
  186. package/dist/components/ui/tabs.d.ts +0 -19
  187. package/dist/components/ui/textarea.d.ts +0 -15
  188. package/dist/components/ui/timeline.d.ts +0 -24
  189. package/dist/components/ui/toggle-group.d.ts +0 -24
  190. package/dist/components/ui/toggle.d.ts +0 -23
  191. package/dist/components/ui/tooltip.d.ts +0 -19
  192. package/dist/components/ui/tree-view.d.ts +0 -28
  193. package/dist/components/ui/use-mobile.d.ts +0 -2
  194. package/dist/components/ui/utils.d.ts +0 -2
  195. package/dist/components/ui/xertica-assistant.d.ts +0 -241
  196. package/dist/contexts/ApiKeyContext.d.ts +0 -15
  197. package/dist/contexts/BrandColorsContext.d.ts +0 -19
  198. package/dist/contexts/LanguageContext.d.ts +0 -11
  199. package/dist/contexts/ThemeContext.d.ts +0 -16
  200. package/dist/contexts/index.d.ts +0 -7
  201. package/dist/contexts/theme-data.d.ts +0 -81
  202. package/dist/index-D6V_7QbH.js +0 -99663
  203. package/dist/index-DHlP-IBS.js +0 -99663
  204. package/dist/utils/demo-responses.d.ts +0 -2
  205. package/dist/utils/gemini.d.ts +0 -8
package/README.md CHANGED
@@ -1,184 +1,184 @@
1
- # Xertica UI
2
-
3
- > **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with a robust AI-first documentation layer for precise LLM-driven composition and autonomous agent interaction.
4
-
5
- [![npm version](https://img.shields.io/npm/v/xertica-ui)](https://www.npmjs.com/package/xertica-ui)
6
- [![license](https://img.shields.io/badge/license-proprietary-red)](./LICENSE)
7
-
8
- ---
9
-
10
- ## 🤖 AI-First Single Source of Truth
11
-
12
- Xertica UI is specifically designed to be consumed by AI Agents (LLMs, code assistants, autonomous agents). We provide dedicated entry points for AI context:
13
-
14
- | File | Purpose |
15
- |---|---|
16
- | [`llms.txt`](./llms.txt) | Standard index for AI crawlers and context-aware agents. |
17
- | [`llms-full.txt`](./llms-full.txt) | **Complete documentation** of all 96 components in a single file for large-context LLMs. |
18
- | `docs/llms.md` | Master index for agents to navigate the documentation folder. |
19
-
20
- ---
21
-
22
- ## 🚀 Quick Start — CLI (Recommended)
23
-
24
- Scaffold a full application with pre-configured routing, layout, and components:
25
-
26
- ```bash
27
- npx xertica-ui@latest init my-app
28
- cd my-app
29
- npm run dev
30
- ```
31
-
32
- The CLI scaffolds a complete Vite + React + TypeScript project with Portuguese UI localization and English AI-ready documentation.
33
-
34
- ---
35
-
36
- ## 📦 Installation as a Library
37
-
38
- To add Xertica UI to an existing React project:
39
-
40
- ```bash
41
- npm install xertica-ui
42
- ```
43
-
44
- **1. Import the stylesheet** in your entry file (`main.tsx` or `App.tsx`):
45
-
46
- ```tsx
47
- import 'xertica-ui/style.css';
48
- ```
49
-
50
- **2. Wrap your app** with `XerticaProvider`:
51
-
52
- ```tsx
53
- import { XerticaProvider } from 'xertica-ui';
54
-
55
- function App() {
56
- return (
57
- <XerticaProvider>
58
- <YourApp />
59
- </XerticaProvider>
60
- );
61
- }
62
- ```
63
-
64
- ---
65
-
66
- ## 🛠️ The Layout System
67
-
68
- Xertica UI features an autonomous layout system managed by `LayoutContext`.
69
-
70
- ### Mandatory Page Structure
71
- Every page **must** use the `<PageHeader>` component for its title and primary actions. Never use raw `h1` or `div` for headers.
72
-
73
- ```tsx
74
- import { PageHeader, PageHeaderHeading, Button } from 'xertica-ui';
75
-
76
- export function MyPage() {
77
- return (
78
- <>
79
- <PageHeader>
80
- <PageHeaderHeading>Dashboard</PageHeaderHeading>
81
- <Button>Action</Button>
82
- </PageHeader>
83
- <div className="p-6">
84
- {/* Page Content */}
85
- </div>
86
- </>
87
- );
88
- }
89
- ```
90
-
91
- ### `useLayout()` Hook
92
- Access the sidebar state, width, and toggle functions anywhere in the component tree:
93
- ```tsx
94
- const { sidebarWidth, isSidebarOpen, toggleSidebar } = useLayout();
95
- ```
96
-
97
- ---
98
-
99
- ## 🧩 Component Catalog (96 Components)
100
-
101
- ### Layout & Navigation
102
- `Header` · `Sidebar` · `PageHeader` · `Breadcrumb` · `NavigationMenu` · `Tabs` · `Pagination` · `Accordion` · `Collapsible`
103
-
104
- ### Core Surfaces
105
- `Card` · `Separator` · `ScrollArea` · `AspectRatio` · `Resizable` · `Skeleton` · `Empty`
106
-
107
- ### Forms & Inputs
108
- `Form` · `Input` · `Textarea` · `RichTextEditor` · `Label` · `Checkbox` · `RadioGroup` · `Switch` · `Select` · `Slider` · `Calendar` · `InputOTP` · `FileUpload` · `Search`
109
-
110
- ### Actions & Data
111
- `Button` · `Toggle` · `ToggleGroup` · `Rating` · `Table` · `Badge` · `Avatar` · `Progress` · `StatsCard` · `Timeline` · `Stepper` · `TreeView` · `NotificationBadge` · `Chart`
112
-
113
- ### Overlays & Feedback
114
- `Dialog` · `AlertDialog` · `Sheet` · `Drawer` · `Popover` · `HoverCard` · `Tooltip` · `Alert` · `Sonner (Toast)` · `Command`
115
-
116
- ---
117
-
118
- ## 🌟 Specialized Modules
119
-
120
- ### 🤖 AI Assistant
121
- Integrated AI chat panel with workspace support.
122
- - `XerticaAssistant` · `MarkdownMessage` · `CodeBlock` · `AssistantChart`
123
-
124
- ### 🗺️ Maps & Geolocation
125
- First-class Google Maps integration.
126
- - `Map` · `RouteMap` · `SimpleMap` · `GoogleMapsLoader`
127
-
128
- ### 🎙️ Media
129
- - `AudioPlayer` · `VideoPlayer` · `FloatingMediaWrapper`
130
-
131
- ---
132
-
133
- ## 🎨 Design Tokens
134
-
135
- Xertica UI uses semantic CSS tokens. **Never use raw colors or generic Tailwind color classes**:
136
-
137
- ```
138
- Background: bg-background text-foreground
139
- Card surface: bg-card text-card-foreground
140
- Muted area: bg-muted text-muted-foreground
141
- Primary action: bg-primary text-primary-foreground
142
- Destructive: bg-destructive text-destructive-foreground
143
- Border: border-border
144
- ```
145
-
146
- ---
147
-
148
- ## 🌍 Localization
149
-
150
- - **UI Components**: Fully localized in **Portuguese (pt-BR)** for end-users.
151
- - **Documentation/Code**: Strictly maintained in **English** for AI Agent compatibility and global developer standard.
152
-
153
- ---
154
-
155
- ## 💻 Tech Stack
156
-
157
- | Technology | Version |
158
- |---|---|
159
- | React | 18.3 |
160
- | TypeScript | 5.7 |
161
- | Tailwind CSS | 4.0 |
162
- | Vite | 6.0 |
163
- | Radix UI | Latest |
164
- | Lucide React | 0.469+ |
165
- | Vitest | 4.1 |
166
-
167
- ---
168
-
169
- ## 📜 Scripts
170
-
171
- | Command | Description |
172
- |---|---|
173
- | `npm run dev` | Start development server |
174
- | `npm run build` | Production bundle |
175
- | `npm run storybook` | Launch component library documentation |
176
- | `npm run test` | Run unit tests via Vitest |
177
- | `npm run type-check` | TypeScript validation |
178
-
179
- ---
180
-
181
- ## ⚖️ License
182
-
183
- Proprietary — Xertica AI Team.
184
-
1
+ # Xertica UI
2
+
3
+ > **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with a robust AI-first documentation layer for precise LLM-driven composition and autonomous agent interaction.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/xertica-ui)](https://www.npmjs.com/package/xertica-ui)
6
+ [![license](https://img.shields.io/badge/license-proprietary-red)](./LICENSE)
7
+
8
+ ---
9
+
10
+ ## 🤖 AI-First Single Source of Truth
11
+
12
+ Xertica UI is specifically designed to be consumed by AI Agents (LLMs, code assistants, autonomous agents). We provide dedicated entry points for AI context:
13
+
14
+ | File | Purpose |
15
+ |---|---|
16
+ | [`llms.txt`](./llms.txt) | Standard index for AI crawlers and context-aware agents. |
17
+ | [`llms-full.txt`](./llms-full.txt) | **Complete documentation** of all 96 components in a single file for large-context LLMs. |
18
+ | `docs/llms.md` | Master index for agents to navigate the documentation folder. |
19
+
20
+ ---
21
+
22
+ ## 🚀 Quick Start — CLI (Recommended)
23
+
24
+ Scaffold a full application with pre-configured routing, layout, and components:
25
+
26
+ ```bash
27
+ npx xertica-ui@latest init my-app
28
+ cd my-app
29
+ npm run dev
30
+ ```
31
+
32
+ The CLI scaffolds a complete Vite + React + TypeScript project with Portuguese UI localization and English AI-ready documentation.
33
+
34
+ ---
35
+
36
+ ## 📦 Installation as a Library
37
+
38
+ To add Xertica UI to an existing React project:
39
+
40
+ ```bash
41
+ npm install xertica-ui
42
+ ```
43
+
44
+ **1. Import the stylesheet** in your entry file (`main.tsx` or `App.tsx`):
45
+
46
+ ```tsx
47
+ import 'xertica-ui/style.css';
48
+ ```
49
+
50
+ **2. Wrap your app** with `XerticaProvider`:
51
+
52
+ ```tsx
53
+ import { XerticaProvider } from 'xertica-ui';
54
+
55
+ function App() {
56
+ return (
57
+ <XerticaProvider>
58
+ <YourApp />
59
+ </XerticaProvider>
60
+ );
61
+ }
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 🛠️ The Layout System
67
+
68
+ Xertica UI features an autonomous layout system managed by `LayoutContext`.
69
+
70
+ ### Mandatory Page Structure
71
+ Every page **must** use the `<PageHeader>` component for its title and primary actions. Never use raw `h1` or `div` for headers.
72
+
73
+ ```tsx
74
+ import { PageHeader, PageHeaderHeading, Button } from 'xertica-ui';
75
+
76
+ export function MyPage() {
77
+ return (
78
+ <>
79
+ <PageHeader>
80
+ <PageHeaderHeading>Dashboard</PageHeaderHeading>
81
+ <Button>Action</Button>
82
+ </PageHeader>
83
+ <div className="p-6">
84
+ {/* Page Content */}
85
+ </div>
86
+ </>
87
+ );
88
+ }
89
+ ```
90
+
91
+ ### `useLayout()` Hook
92
+ Access the sidebar state, width, and toggle functions anywhere in the component tree:
93
+ ```tsx
94
+ const { sidebarWidth, isSidebarOpen, toggleSidebar } = useLayout();
95
+ ```
96
+
97
+ ---
98
+
99
+ ## 🧩 Component Catalog (96 Components)
100
+
101
+ ### Layout & Navigation
102
+ `Header` · `Sidebar` · `PageHeader` · `Breadcrumb` · `NavigationMenu` · `Tabs` · `Pagination` · `Accordion` · `Collapsible`
103
+
104
+ ### Core Surfaces
105
+ `Card` · `Separator` · `ScrollArea` · `AspectRatio` · `Resizable` · `Skeleton` · `Empty`
106
+
107
+ ### Forms & Inputs
108
+ `Form` · `Input` · `Textarea` · `RichTextEditor` · `Label` · `Checkbox` · `RadioGroup` · `Switch` · `Select` · `Slider` · `Calendar` · `InputOTP` · `FileUpload` · `Search`
109
+
110
+ ### Actions & Data
111
+ `Button` · `Toggle` · `ToggleGroup` · `Rating` · `Table` · `Badge` · `Avatar` · `Progress` · `StatsCard` · `Timeline` · `Stepper` · `TreeView` · `NotificationBadge` · `Chart`
112
+
113
+ ### Overlays & Feedback
114
+ `Dialog` · `AlertDialog` · `Sheet` · `Drawer` · `Popover` · `HoverCard` · `Tooltip` · `Alert` · `Sonner (Toast)` · `Command`
115
+
116
+ ---
117
+
118
+ ## 🌟 Specialized Modules
119
+
120
+ ### 🤖 AI Assistant
121
+ Integrated AI chat panel with workspace support.
122
+ - `XerticaAssistant` · `MarkdownMessage` · `CodeBlock` · `AssistantChart`
123
+
124
+ ### 🗺️ Maps & Geolocation
125
+ First-class Google Maps integration.
126
+ - `Map` · `RouteMap` · `SimpleMap` · `GoogleMapsLoader`
127
+
128
+ ### 🎙️ Media
129
+ - `AudioPlayer` · `VideoPlayer` · `FloatingMediaWrapper`
130
+
131
+ ---
132
+
133
+ ## 🎨 Design Tokens
134
+
135
+ Xertica UI uses semantic CSS tokens. **Never use raw colors or generic Tailwind color classes**:
136
+
137
+ ```
138
+ Background: bg-background text-foreground
139
+ Card surface: bg-card text-card-foreground
140
+ Muted area: bg-muted text-muted-foreground
141
+ Primary action: bg-primary text-primary-foreground
142
+ Destructive: bg-destructive text-destructive-foreground
143
+ Border: border-border
144
+ ```
145
+
146
+ ---
147
+
148
+ ## 🌍 Localization
149
+
150
+ - **UI Components**: Fully localized in **Portuguese (pt-BR)** for end-users.
151
+ - **Documentation/Code**: Strictly maintained in **English** for AI Agent compatibility and global developer standard.
152
+
153
+ ---
154
+
155
+ ## 💻 Tech Stack
156
+
157
+ | Technology | Version |
158
+ |---|---|
159
+ | React | 18.3 |
160
+ | TypeScript | 5.7 |
161
+ | Tailwind CSS | 4.0 |
162
+ | Vite | 6.0 |
163
+ | Radix UI | Latest |
164
+ | Lucide React | 0.469+ |
165
+ | Vitest | 4.1 |
166
+
167
+ ---
168
+
169
+ ## 📜 Scripts
170
+
171
+ | Command | Description |
172
+ |---|---|
173
+ | `npm run dev` | Start development server |
174
+ | `npm run build` | Production bundle |
175
+ | `npm run storybook` | Launch component library documentation |
176
+ | `npm run test` | Run unit tests via Vitest |
177
+ | `npm run type-check` | TypeScript validation |
178
+
179
+ ---
180
+
181
+ ## ⚖️ License
182
+
183
+ Proprietary — Xertica AI Team.
184
+
@@ -1,71 +1,71 @@
1
- import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
2
- import * as ModernChatInputStories from './modern-chat-input.stories';
3
-
4
- <Meta of={ModernChatInputStories} />
5
-
6
- <Title />
7
- <Subtitle>An advanced, high-performance chat input for the Xertica Assistant.</Subtitle>
8
-
9
- <Description />
10
-
11
- <Primary />
12
-
13
- ---
14
-
15
- ## Usage Patterns
16
-
17
- ### Standard Floating Input
18
- Optimized for chat interfaces with multi-line support, voice recording, and action chips.
19
-
20
- <Canvas>
21
- <ModernChatInputStories.Default />
22
- </Canvas>
23
-
24
- ### Full-Page Variant
25
- Adjusts maximum width and alignment for use in standalone chat pages.
26
-
27
- <Canvas>
28
- <ModernChatInputStories.FullPage />
29
- </Canvas>
30
-
31
- ---
32
-
33
- ## Feature Flags
34
-
35
- Each input capability can be individually toggled via boolean props.
36
- All flags default to `true` for full backward compatibility.
37
-
38
- | Prop | Controls | Default |
39
- |---|---|---|
40
- | `enableAudioInput` | Voice recording button | `true` |
41
- | `enableFileAttachment` | File attachment (paperclip) button | `true` |
42
- | `enableDocumentCreation` | "Create document" menu item | `true` |
43
- | `enablePodcastGeneration` | "Generate podcast" menu item | `true` |
44
- | `enableSearch` | "Search" menu item | `true` |
45
-
46
- > [!NOTE]
47
- > When all three action types (`enableDocumentCreation`, `enablePodcastGeneration`, `enableSearch`) are set to `false`, the "+" menu button is completely hidden.
48
-
49
- ### Text Only
50
- All action buttons disabled — only the text input and send button remain.
51
-
52
- <Canvas>
53
- <ModernChatInputStories.TextOnly />
54
- </Canvas>
55
-
56
- ### Selective Actions
57
- Only document creation and search are enabled for a focused workflow.
58
-
59
- <Canvas>
60
- <ModernChatInputStories.SelectiveActions />
61
- </Canvas>
62
-
63
- ---
64
-
65
- ## AI Best Practices
66
-
67
- > [!IMPORTANT]
68
- > - **Action Workflow** — Handle the `onSubmit` callback's optional `action` parameter to distinguish between standard text messages and intent-driven generations (Documents, Podcasts, Search).
69
- > - **State Sync** — Always maintain the `value` in a parent state and update it via `onChange` and `onVoiceRecording` to ensure consistent data binding.
70
- > - **Dynamic Sizing** — The input automatically expands up to 100px based on content; ensure the parent container can accommodate these height changes without layout shift.
71
- > - **Feature Flags** — Pass flags like `enableSearch={false}` or `enableAudioInput={false}` to tailor input capabilities per use-case. Flags are independent and can be combined freely.
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
2
+ import * as ModernChatInputStories from './modern-chat-input.stories';
3
+
4
+ <Meta of={ModernChatInputStories} />
5
+
6
+ <Title />
7
+ <Subtitle>An advanced, high-performance chat input for the Xertica Assistant.</Subtitle>
8
+
9
+ <Description />
10
+
11
+ <Primary />
12
+
13
+ ---
14
+
15
+ ## Usage Patterns
16
+
17
+ ### Standard Floating Input
18
+ Optimized for chat interfaces with multi-line support, voice recording, and action chips.
19
+
20
+ <Canvas>
21
+ <ModernChatInputStories.Default />
22
+ </Canvas>
23
+
24
+ ### Full-Page Variant
25
+ Adjusts maximum width and alignment for use in standalone chat pages.
26
+
27
+ <Canvas>
28
+ <ModernChatInputStories.FullPage />
29
+ </Canvas>
30
+
31
+ ---
32
+
33
+ ## Feature Flags
34
+
35
+ Each input capability can be individually toggled via boolean props.
36
+ All flags default to `true` for full backward compatibility.
37
+
38
+ | Prop | Controls | Default |
39
+ |---|---|---|
40
+ | `enableAudioInput` | Voice recording button | `true` |
41
+ | `enableFileAttachment` | File attachment (paperclip) button | `true` |
42
+ | `enableDocumentCreation` | "Create document" menu item | `true` |
43
+ | `enablePodcastGeneration` | "Generate podcast" menu item | `true` |
44
+ | `enableSearch` | "Search" menu item | `true` |
45
+
46
+ > [!NOTE]
47
+ > When all three action types (`enableDocumentCreation`, `enablePodcastGeneration`, `enableSearch`) are set to `false`, the "+" menu button is completely hidden.
48
+
49
+ ### Text Only
50
+ All action buttons disabled — only the text input and send button remain.
51
+
52
+ <Canvas>
53
+ <ModernChatInputStories.TextOnly />
54
+ </Canvas>
55
+
56
+ ### Selective Actions
57
+ Only document creation and search are enabled for a focused workflow.
58
+
59
+ <Canvas>
60
+ <ModernChatInputStories.SelectiveActions />
61
+ </Canvas>
62
+
63
+ ---
64
+
65
+ ## AI Best Practices
66
+
67
+ > [!IMPORTANT]
68
+ > - **Action Workflow** — Handle the `onSubmit` callback's optional `action` parameter to distinguish between standard text messages and intent-driven generations (Documents, Podcasts, Search).
69
+ > - **State Sync** — Always maintain the `value` in a parent state and update it via `onChange` and `onVoiceRecording` to ensure consistent data binding.
70
+ > - **Dynamic Sizing** — The input automatically expands up to 100px based on content; ensure the parent container can accommodate these height changes without layout shift.
71
+ > - **Feature Flags** — Pass flags like `enableSearch={false}` or `enableAudioInput={false}` to tailor input capabilities per use-case. Flags are independent and can be combined freely.