@juau/zuri 0.1.0 → 0.3.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/README.md CHANGED
@@ -40,10 +40,10 @@ body {
40
40
 
41
41
  ```html
42
42
  <zur-navbar>
43
- <strong zurNavbarLogo>Minha Marca</strong>
43
+ <strong zurNavbarLogo>Casa Verde</strong>
44
44
  <ng-container zurNavbarLinks>
45
45
  <a href="#">Início</a>
46
- <a href="#">Explorar</a>
46
+ <a href="#">Plantas</a>
47
47
  </ng-container>
48
48
  <ng-container zurNavbarActions>
49
49
  <zur-theme-toggle />
@@ -62,33 +62,35 @@ O `ZurThemeService` aplica `data-theme="dark"` no `<html>`, persiste a escolha e
62
62
  |---|---|
63
63
  | Tema e marca | `ZurThemeService`, `zur-theme-toggle`, `[zurThemeScope]` (tema isolado), `zur-logo` |
64
64
  | Fundamentos | `button[zur-button]`, `zur-badge`, `zur-card`, `zur-avatar` |
65
- | Formulários | `zur-input`, `zur-textarea`, `zur-select`, `zur-checkbox`, `zur-radio`, `zur-switch` (todos ControlValueAccessor) |
65
+ | Formulários | `zur-input`, `zur-textarea`, `zur-select`, `zur-checkbox`, `zur-radio`, `zur-switch`, `zur-combobox`, `zur-date-picker`, `zur-chips`, `zur-slider`, `zur-segmented`, `zur-number-input`, `zur-otp-input`, `zur-rating`, `zur-time-picker` (todos ControlValueAccessor e compatíveis com `[formField]`), `zur-file-upload` |
66
66
  | Navegação | `zur-navbar`, `zur-tabs`/`zur-tab`, `zur-menu`/`zur-menu-item`, `zur-breadcrumb`, `zur-sidenav`/`zur-sidenav-item`/`zur-sidenav-label` |
67
- | Dados | `table[zur-table]` + `th[zurSortable]`, `zur-pagination` |
68
- | Conteúdo | `zur-step`, `zur-accordion`, `zur-empty-state` |
69
- | Sobreposição | `zur-drawer`, `zur-popover` + `[zurPopoverTrigger]` |
67
+ | Dados | `table[zur-table]` (+ `zurSelectAll`, `zurSelect`, `zurRow`, `zurExpandToggle`, `zur-column-filter`, `zur-column-menu`), `zur-pagination`, `zur-chart`, `zur-stat`, `zur-sparkline`, `zur-timeline`, `zur-tree` |
68
+ | Conteúdo | `zur-step`, `zur-stepper`, `zur-carousel`, `zur-avatar-group`, `zur-banner`, `zur-accordion`, `zur-empty-state` |
69
+ | Sobreposição | `zur-drawer`, `zur-popover` + `[zurPopoverTrigger]`, `ZurDialog` (`confirm`/`alert`), `zur-context-menu` + `[zurContextMenu]` |
70
+ | Plataforma | `zurDensity` / `ZurDensityService` / `zur-density-toggle` (densidade compacta), RTL em todos os componentes, `tokens.json` e presets do Tailwind (v3 e v4) |
71
+ | Padrões | `zur-chat` (+ `-message`, `-divider`, `-typing`, `-composer`), `zur-command-palette`, `zur-notification-center`, `zur-kanban` + `ng-template[zurKanbanCard]` |
70
72
  | Layouts de página | `zur-landing-layout`, `zur-dashboard-layout`, `zur-list-detail-layout`, `zur-form-layout`, `zur-docs-layout`, `zur-auth-layout`, `zur-error-layout` + `zur-sidebar`, `zur-topbar`, `zur-page-header`, `zur-footer` — veja [`LAYOUTS.md`](../../LAYOUTS.md) |
71
73
  | Feedback | `zur-modal`, `ZurToastService` + `zur-toast-container`, `[zurTooltip]`, `zur-alert`, `zur-spinner`, `zur-skeleton`, `zur-progress` |
72
74
 
73
75
  ### Exemplos
74
76
 
75
77
  ```html
76
- <button zur-button variant="primary" size="md">Reservar</button>
78
+ <button zur-button variant="primary" size="md">Comprar</button>
77
79
  <button zur-button variant="secondary">Cancelar</button>
78
80
 
79
- <zur-badge color="success">Confirmado</zur-badge>
81
+ <zur-badge color="success">Entregue</zur-badge>
80
82
 
81
83
  <zur-input label="E-mail" placeholder="voce@exemplo.com" [(ngModel)]="email" />
82
84
 
83
85
  <zur-switch [(ngModel)]="notificacoes">Receber notificações</zur-switch>
84
86
 
85
87
  <zur-tabs>
86
- <zur-tab label="Visão geral">…</zur-tab>
88
+ <zur-tab label="Descrição">…</zur-tab>
87
89
  <zur-tab label="Avaliações">…</zur-tab>
88
90
  </zur-tabs>
89
91
 
90
- <zur-modal [(open)]="aberto" title="Confirmar reserva">
91
- Deseja confirmar a reserva?
92
+ <zur-modal [(open)]="aberto" title="Confirmar pedido">
93
+ Deseja confirmar o pedido?
92
94
  <div zurModalActions>
93
95
  <button zur-button variant="ghost" (click)="aberto = false">Voltar</button>
94
96
  <button zur-button variant="primary">Confirmar</button>
@@ -96,10 +98,24 @@ O `ZurThemeService` aplica `data-theme="dark"` no `<html>`, persiste a escolha e
96
98
  </zur-modal>
97
99
  ```
98
100
 
101
+ ```html
102
+ <zur-combobox label="Planta" [options]="plantas" [(ngModel)]="planta" />
103
+ <zur-date-picker label="Período" mode="range" [(ngModel)]="periodo" />
104
+
105
+ <zur-chat style="height: 480px">
106
+ @for (m of mensagens(); track m.id) {
107
+ <zur-chat-message [from]="m.from" [author]="m.autor">{{ m.texto }}</zur-chat-message>
108
+ }
109
+ <zur-chat-composer (send)="enviar($event)" />
110
+ </zur-chat>
111
+
112
+ <zur-command-palette [commands]="comandos" (selected)="executar($event)" /> <!-- Ctrl+K -->
113
+ ```
114
+
99
115
  ```ts
100
116
  // toasts
101
117
  private toast = inject(ZurToastService);
102
- this.toast.show('Reserva confirmada!', 'success');
118
+ this.toast.show('Pedido confirmado!', 'success');
103
119
  ```
104
120
 
105
121
  ## Idioma
@@ -110,6 +126,41 @@ Os textos internos (rótulos de acessibilidade, "Voltar", "Fechar") vêm em port
110
126
  bootstrapApplication(App, { providers: [provideZuriI18n('en')] });
111
127
  ```
112
128
 
129
+ ## Densidade e direção
130
+
131
+ ```html
132
+ <html data-density="compact" dir="rtl"> <!-- página toda -->
133
+ <section zurDensity>…formulário denso…</section> <!-- só uma área -->
134
+ ```
135
+
136
+ `ZurDensityService` e `zur-density-toggle` alternam a densidade da página e lembram a escolha.
137
+ Todos os componentes usam propriedades lógicas e suas setas seguem o sentido de leitura, então RTL
138
+ funciona só com `dir="rtl"`.
139
+
140
+ ## Formulários por sinais
141
+
142
+ Os controles funcionam com `ngModel`, com formulários reativos **e** com os Signal Forms do Angular:
143
+
144
+ ```html
145
+ <zur-input label="Nome" [formField]="f.nome" />
146
+ <zur-date-picker label="Entrega" [formField]="f.entrega" />
147
+ ```
148
+
149
+ ## Tailwind e Figma
150
+
151
+ ```js
152
+ // Tailwind v3: tailwind.config.js
153
+ module.exports = { presets: [require('@juau/zuri/tailwind.preset.cjs')] };
154
+ ```
155
+
156
+ ```css
157
+ /* Tailwind v4 */
158
+ @import 'tailwindcss';
159
+ @import '@juau/zuri/tailwind-theme.css';
160
+ ```
161
+
162
+ `@juau/zuri/tokens.json` traz todos os tokens no formato W3C Design Tokens, com os dois temas.
163
+
113
164
  ## Desenvolvimento
114
165
 
115
166
  ```bash