xertica-ui 2.0.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +20 -6
- package/components/hooks/index.ts +1 -0
- package/components/index.ts +5 -11
- package/components/pages/index.ts +8 -0
- package/components/public-api-smoke.test.tsx +7 -0
- package/components/ui/index.ts +67 -1
- package/dist/AssistantChart-C_hwFRRr.js +3337 -0
- package/dist/AssistantChart-DoZCyS5r.cjs +3363 -0
- package/dist/AudioPlayer-CbZId7cj.cjs +998 -0
- package/dist/AudioPlayer-DU8zt8-z.js +999 -0
- package/dist/CodeBlock-DuxdtN-l.js +219 -0
- package/dist/CodeBlock-POVYONvC.cjs +218 -0
- package/dist/FeatureCard-Bcb3Zi54.js +302 -0
- package/dist/FeatureCard-CkPd2psQ.cjs +301 -0
- package/dist/VerifyEmailPage-CYXtbKi3.cjs +2827 -0
- package/dist/VerifyEmailPage-DvMLZgFt.js +2828 -0
- package/dist/XerticaOrbe-BGIB1CTK.js +1355 -0
- package/dist/XerticaOrbe-FWGjBj0U.cjs +1354 -0
- package/dist/XerticaProvider-CEoWMTxu.js +39 -0
- package/dist/XerticaProvider-CllrbMEJ.cjs +38 -0
- package/dist/XerticaXLogo-DzXKZBtG.js +231 -0
- package/dist/XerticaXLogo-xWbElCZj.cjs +230 -0
- package/dist/alert-dialog-DSKByiKZ.cjs +865 -0
- package/dist/alert-dialog-s-vmNkJ_.js +842 -0
- package/dist/assistant.cjs.js +6 -5
- package/dist/assistant.es.js +2 -1
- package/dist/avatar-Cq5_E8r9.cjs +78 -0
- package/dist/avatar-DSBfJMRJ.js +62 -0
- package/dist/blocks.cjs.js +9 -0
- package/dist/blocks.es.js +9 -0
- package/dist/brand.cjs.js +7 -7
- package/dist/brand.es.js +3 -3
- package/dist/breadcrumb-CVzzzqfo.js +103 -0
- package/dist/breadcrumb-DnDlQFg2.cjs +102 -0
- package/dist/button-0CXwCRTm.cjs +85 -0
- package/dist/button-qkz7Icqf.js +69 -0
- package/dist/card-DJTsYhLL.cjs +89 -0
- package/dist/card-fi8zAN-I.js +90 -0
- package/dist/components/hooks/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -7
- package/dist/components/pages/index.d.ts +8 -0
- package/dist/components/ui/index.d.ts +64 -0
- package/dist/dropdown-menu-Ze1YZFyc.cjs +247 -0
- package/dist/dropdown-menu-nc_Lvg-u.js +231 -0
- package/dist/hooks.cjs.js +3 -0
- package/dist/hooks.es.js +3 -0
- package/dist/index.cjs.js +246 -3325
- package/dist/index.es.js +328 -3416
- package/dist/input-CPl84zAx.cjs +151 -0
- package/dist/input-D-6IsAca.js +133 -0
- package/dist/layout.cjs.js +3 -3
- package/dist/layout.es.js +1 -1
- package/dist/media.cjs.js +1 -1
- package/dist/media.es.js +1 -1
- package/dist/pages.cjs.js +11 -0
- package/dist/pages.es.js +11 -0
- package/dist/progress-BLwqortq.cjs +105 -0
- package/dist/progress-D9mtsf6j.js +89 -0
- package/dist/rich-text-editor-BrdC5evx.js +2244 -0
- package/dist/rich-text-editor-DbV-S7Fi.cjs +2261 -0
- package/dist/select-DT7Zjn42.cjs +162 -0
- package/dist/select-En8DkoaQ.js +145 -0
- package/dist/sidebar-BcJ6LxvX.cjs +733 -0
- package/dist/sidebar-WoKvFWCN.js +717 -0
- package/dist/slider-C0JKA9k3.js +56 -0
- package/dist/slider-CPmwzm_3.cjs +73 -0
- package/dist/tooltip-CNtsL5cB.cjs +71 -0
- package/dist/tooltip-CTyZCD8h.js +55 -0
- package/dist/ui.cjs.js +211 -199
- package/dist/ui.es.js +275 -263
- package/dist/use-mobile-CNwiBNxu.js +33 -0
- package/dist/use-mobile-Dlf74ufz.cjs +49 -0
- package/dist/xertica-assistant-DIM_Do1k.js +1866 -0
- package/dist/xertica-assistant-yyrR0JKl.cjs +1882 -0
- package/dist/xertica-ui.css +1 -1
- package/docs/architecture.md +1 -0
- package/package.json +12 -2
- package/templates/package.json +3 -3
- package/templates/src/app/App.tsx +2 -0
- package/templates/src/app/components/XerticaUiVersionBadge.tsx +14 -0
- package/templates/tsconfig.node.tsbuildinfo +1 -1
- package/templates/tsconfig.tsbuildinfo +1 -1
- package/templates/vite.config.js +20 -22
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,8 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
19
19
|
- **`QuickActionCard`** — tile de ação rápida com ícone em caixa colorida, badge e botão full-width.
|
|
20
20
|
- **`NotificationCard`** — lista de notificações com indicador de não-lido, badge de tipo, "Marcar todas como lidas" e "Ver todas".
|
|
21
21
|
- **Exportação do domínio `blocks/`** — todos os componentes disponíveis via `import { ... } from 'xertica-ui'` e via `components/blocks/index.ts`.
|
|
22
|
+
- **Subpath público `xertica-ui/blocks`** — `FeatureCard`, `ActivityCard`, `ProfileCard`, `ProjectCard`, `QuickActionCard` e `NotificationCard` agora podem ser importados diretamente de `xertica-ui/blocks`.
|
|
23
|
+
- **Subpath público `xertica-ui/pages`** — `LoginPage`, `HomePage`, `TemplatePage`, `ForgotPasswordPage`, `ResetPasswordPage`, `VerifyEmailPage` e seus contents agora são publicados com entrypoint dedicado.
|
|
22
24
|
- **Documentação** — criado `docs/components/card-patterns.md` com props, exemplos e layout de dashboard completo para todos os 6 block components.
|
|
23
25
|
|
|
24
26
|
### Changed
|
|
@@ -28,6 +30,8 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
28
30
|
- **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
31
|
- **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
32
|
- **Storybook — `preview.tsx`** — `min-h-screen` passou a ser condicional a `layout: 'fullscreen'`, resolvendo a altura excessiva dos exemplos na aba Docs.
|
|
33
|
+
- **Template npm** — `templates/package.json` atualizado para `2.1.0` e dependência `xertica-ui` para `^2.1.0`.
|
|
34
|
+
- **Template version badge** — o template passa a exibir um indicador visual discreto da versão do pacote `xertica-ui` usada pelo projeto.
|
|
31
35
|
- **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
36
|
|
|
33
37
|
### Fixed
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/xertica-ui)
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
|
|
8
8
|
---
|
|
@@ -85,12 +85,14 @@ function App() {
|
|
|
85
85
|
Xertica UI v2 exposes **granular subpath entries** — import only what your layer needs without loading the entire library:
|
|
86
86
|
|
|
87
87
|
```tsx
|
|
88
|
-
import { Button, Card, Input } from 'xertica-ui/ui'; // shared/ui — primitives
|
|
89
|
-
import {
|
|
88
|
+
import { Button, Card, Input } from 'xertica-ui/ui'; // shared/ui — primitives
|
|
89
|
+
import { QuickActionCard } from 'xertica-ui/blocks'; // composed blocks
|
|
90
|
+
import { Sidebar, Header } from 'xertica-ui/layout'; // layout shell
|
|
90
91
|
import { XerticaProvider } from 'xertica-ui/brand'; // app-level — providers & brand
|
|
91
92
|
import { XerticaAssistant } from 'xertica-ui/assistant'; // feature — AI assistant
|
|
92
93
|
import { VideoPlayer, AudioPlayer } from 'xertica-ui/media'; // feature — media players
|
|
93
94
|
import { useLayout, useOptionalLayout, useTheme } from 'xertica-ui/hooks'; // shared/lib — hooks & contexts
|
|
95
|
+
import { TemplatePage } from 'xertica-ui/pages'; // optional page templates
|
|
94
96
|
import 'xertica-ui/style.css'; // styles — import once at root
|
|
95
97
|
```
|
|
96
98
|
|
|
@@ -175,7 +177,7 @@ Each feature only imports from `shared/` or its own domain. Pages only compose f
|
|
|
175
177
|
|
|
176
178
|
---
|
|
177
179
|
|
|
178
|
-
## 🧩 Component Catalog (
|
|
180
|
+
## 🧩 Component Catalog (100+ Components)
|
|
179
181
|
|
|
180
182
|
### Layout & Navigation
|
|
181
183
|
`Header` · `Sidebar` · `PageHeader` · `Breadcrumb` · `NavigationMenu` · `Tabs` · `Pagination` · `Accordion` · `Collapsible`
|
|
@@ -189,8 +191,11 @@ Each feature only imports from `shared/` or its own domain. Pages only compose f
|
|
|
189
191
|
### Actions & Data
|
|
190
192
|
`Button` · `Toggle` · `ToggleGroup` · `Rating` · `Table` · `Badge` · `Avatar` · `Progress` · `StatsCard` · `Timeline` · `Stepper` · `TreeView` · `NotificationBadge` · `Chart`
|
|
191
193
|
|
|
192
|
-
### Overlays & Feedback
|
|
193
|
-
`Dialog` · `AlertDialog` · `Sheet` · `Drawer` · `Popover` · `HoverCard` · `Tooltip` · `Alert` · `Sonner (Toast)` · `Command`
|
|
194
|
+
### Overlays & Feedback
|
|
195
|
+
`Dialog` · `AlertDialog` · `Sheet` · `Drawer` · `Popover` · `HoverCard` · `Tooltip` · `Alert` · `Sonner (Toast)` · `Command`
|
|
196
|
+
|
|
197
|
+
### Composed Blocks
|
|
198
|
+
`FeatureCard` · `ActivityCard` · `ProfileCard` · `ProjectCard` · `QuickActionCard` · `NotificationCard`
|
|
194
199
|
|
|
195
200
|
---
|
|
196
201
|
|
|
@@ -207,6 +212,15 @@ First-class Google Maps integration.
|
|
|
207
212
|
### 🎙️ Media
|
|
208
213
|
- `AudioPlayer` · `VideoPlayer` · `FloatingMediaWrapper`
|
|
209
214
|
|
|
215
|
+
### 📄 Pages
|
|
216
|
+
- `LoginPage` · `HomePage` · `TemplatePage` · `ForgotPasswordPage` · `ResetPasswordPage` · `VerifyEmailPage`
|
|
217
|
+
|
|
218
|
+
### 🧱 Blocks
|
|
219
|
+
High-level dashboard and product patterns exported from `xertica-ui/blocks`.
|
|
220
|
+
- `FeatureCard` · `ActivityCard` · `ProfileCard` · `ProjectCard` · `QuickActionCard` · `NotificationCard`
|
|
221
|
+
|
|
222
|
+
The CLI template now includes a small fixed version badge so generated projects can visually identify which `xertica-ui` package version they are using.
|
|
223
|
+
|
|
210
224
|
---
|
|
211
225
|
|
|
212
226
|
## 📚 Storybook Documentation
|
package/components/index.ts
CHANGED
|
@@ -30,16 +30,10 @@ export type {
|
|
|
30
30
|
} from './assistant/xertica-assistant/xertica-assistant';
|
|
31
31
|
|
|
32
32
|
// ============================================================================
|
|
33
|
-
// Page Components
|
|
34
|
-
// ============================================================================
|
|
35
|
-
|
|
36
|
-
export
|
|
37
|
-
export { HomePage } from './pages/home-page';
|
|
38
|
-
export { LoginPage } from './pages/login-page';
|
|
39
|
-
export { HomeContent } from './pages/home-content';
|
|
40
|
-
export { ForgotPasswordPage } from './pages/forgot-password-page';
|
|
41
|
-
export { VerifyEmailPage } from './pages/verify-email-page';
|
|
42
|
-
export { ResetPasswordPage } from './pages/reset-password-page';
|
|
33
|
+
// Page Components
|
|
34
|
+
// ============================================================================
|
|
35
|
+
|
|
36
|
+
export * from './pages';
|
|
43
37
|
|
|
44
38
|
// UI Components - All available via /components/ui/index.ts
|
|
45
39
|
export * from './ui';
|
|
@@ -80,4 +74,4 @@ export { FloatingMediaWrapper } from './media/FloatingMediaWrapper';
|
|
|
80
74
|
// PodcastPlayer was consolidated into AudioPlayer via colorVariant="primary" prop
|
|
81
75
|
|
|
82
76
|
// Demo utilities (for templates)
|
|
83
|
-
export { gerarResposta, gerarResposta as generateDemoResponse } from './shared/assistant-utils';
|
|
77
|
+
export { gerarResposta, gerarResposta as generateDemoResponse } from './shared/assistant-utils';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './forgot-password-page';
|
|
2
|
+
export * from './home-content';
|
|
3
|
+
export * from './home-page';
|
|
4
|
+
export * from './login-page';
|
|
5
|
+
export * from './reset-password-page';
|
|
6
|
+
export * from './template-content';
|
|
7
|
+
export * from './template-page';
|
|
8
|
+
export * from './verify-email-page';
|
|
@@ -4,10 +4,12 @@ import { renderHook } from '@testing-library/react';
|
|
|
4
4
|
import { describe, expect, it } from 'vitest';
|
|
5
5
|
import * as Root from './index';
|
|
6
6
|
import * as Assistant from './assistant';
|
|
7
|
+
import * as Blocks from './blocks';
|
|
7
8
|
import * as Brand from './brand';
|
|
8
9
|
import * as Hooks from './hooks';
|
|
9
10
|
import * as Layout from './layout';
|
|
10
11
|
import * as Media from './media';
|
|
12
|
+
import * as Pages from './pages';
|
|
11
13
|
import * as UI from './ui';
|
|
12
14
|
|
|
13
15
|
describe('public API smoke tests', () => {
|
|
@@ -16,8 +18,13 @@ describe('public API smoke tests', () => {
|
|
|
16
18
|
expect(Brand.XerticaProvider).toBeTypeOf('function');
|
|
17
19
|
expect(Layout.Header).toBeTypeOf('function');
|
|
18
20
|
expect(Assistant.XerticaAssistant).toBeTypeOf('function');
|
|
21
|
+
expect(Blocks.FeatureCard).toBeTypeOf('function');
|
|
19
22
|
expect(Media.AudioPlayer).toBeTypeOf('function');
|
|
23
|
+
expect(Pages.TemplateContent).toBeTypeOf('function');
|
|
24
|
+
expect(UI.CalendarDayButton).toBeTypeOf('function');
|
|
20
25
|
expect(Hooks.useOptionalLayout).toBeTypeOf('function');
|
|
26
|
+
expect(Hooks.useMobile).toBeTypeOf('function');
|
|
27
|
+
expect(Root.TemplateContent).toBe(Pages.TemplateContent);
|
|
21
28
|
expect(Root.XerticaProvider).toBe(Brand.XerticaProvider);
|
|
22
29
|
});
|
|
23
30
|
|
package/components/ui/index.ts
CHANGED
|
@@ -243,5 +243,71 @@ export type {
|
|
|
243
243
|
// Hooks
|
|
244
244
|
export { useMobile, useIsMobile } from "../shared/use-mobile";
|
|
245
245
|
|
|
246
|
-
// Image Utilities
|
|
246
|
+
// Image Utilities
|
|
247
247
|
export { ImageWithFallback } from "../figma/ImageWithFallback";
|
|
248
|
+
|
|
249
|
+
// Complete component folder re-exports
|
|
250
|
+
export * from "./accordion";
|
|
251
|
+
export * from "./alert";
|
|
252
|
+
export * from "./alert-dialog";
|
|
253
|
+
export * from "./aspect-ratio";
|
|
254
|
+
export * from "./assistant-chart";
|
|
255
|
+
export * from "./avatar";
|
|
256
|
+
export * from "./badge";
|
|
257
|
+
export * from "./breadcrumb";
|
|
258
|
+
export * from "./button";
|
|
259
|
+
export * from "./calendar";
|
|
260
|
+
export * from "./card";
|
|
261
|
+
export * from "./carousel";
|
|
262
|
+
export * from "./chart";
|
|
263
|
+
export * from "./checkbox";
|
|
264
|
+
export * from "./collapsible";
|
|
265
|
+
export * from "./command";
|
|
266
|
+
export * from "./context-menu";
|
|
267
|
+
export * from "./dialog";
|
|
268
|
+
export * from "./drawer";
|
|
269
|
+
export * from "./dropdown-menu";
|
|
270
|
+
export * from "./empty";
|
|
271
|
+
export * from "./file-upload";
|
|
272
|
+
export * from "./form";
|
|
273
|
+
export * from "./google-maps-loader";
|
|
274
|
+
export * from "./hover-card";
|
|
275
|
+
export * from "./input";
|
|
276
|
+
export * from "./input-otp";
|
|
277
|
+
export * from "./label";
|
|
278
|
+
export * from "./map";
|
|
279
|
+
export * from "./map-config";
|
|
280
|
+
export * from "./map-layers";
|
|
281
|
+
export * from "./map.exports";
|
|
282
|
+
export * from "./menubar";
|
|
283
|
+
export * from "./navigation-menu";
|
|
284
|
+
export * from "./notification-badge";
|
|
285
|
+
export * from "./page-header";
|
|
286
|
+
export * from "./pagination";
|
|
287
|
+
export * from "./popover";
|
|
288
|
+
export * from "./progress";
|
|
289
|
+
export * from "./radio-group";
|
|
290
|
+
export * from "./rating";
|
|
291
|
+
export * from "./resizable";
|
|
292
|
+
export * from "./rich-text-editor";
|
|
293
|
+
export * from "./route-map";
|
|
294
|
+
export * from "./scroll-area";
|
|
295
|
+
export * from "./search";
|
|
296
|
+
export * from "./select";
|
|
297
|
+
export * from "./separator";
|
|
298
|
+
export * from "./sheet";
|
|
299
|
+
export * from "./simple-map";
|
|
300
|
+
export * from "./skeleton";
|
|
301
|
+
export * from "./slider";
|
|
302
|
+
export * from "./sonner";
|
|
303
|
+
export * from "./stats-card";
|
|
304
|
+
export * from "./stepper";
|
|
305
|
+
export * from "./switch";
|
|
306
|
+
export * from "./table";
|
|
307
|
+
export * from "./tabs";
|
|
308
|
+
export * from "./textarea";
|
|
309
|
+
export * from "./timeline";
|
|
310
|
+
export * from "./toggle";
|
|
311
|
+
export * from "./toggle-group";
|
|
312
|
+
export * from "./tooltip";
|
|
313
|
+
export * from "./tree-view";
|