@juau/zuri 0.0.1 → 0.2.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 +39 -12
- package/fesm2022/juau-zuri.mjs +7043 -1350
- package/fesm2022/juau-zuri.mjs.map +1 -1
- package/package.json +5 -1
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/index.js +79 -0
- package/schematics/ng-add/schema.json +13 -0
- package/schematics/package.json +3 -0
- package/styles/tokens.css +12 -1
- package/types/juau-zuri.d.ts +1440 -19
package/README.md
CHANGED
|
@@ -12,9 +12,11 @@ tintura verde).
|
|
|
12
12
|
## Instalação
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
|
|
15
|
+
ng add @juau/zuri
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
O `ng add` instala o pacote e configura os tokens, a fonte Nunito Sans e o estilo base do `body`. Para fazer à mão, use `npm install @juau/zuri` e siga o setup abaixo.
|
|
19
|
+
|
|
18
20
|
## Setup
|
|
19
21
|
|
|
20
22
|
1. Importe os tokens no `styles.css` global da aplicação:
|
|
@@ -38,10 +40,10 @@ body {
|
|
|
38
40
|
|
|
39
41
|
```html
|
|
40
42
|
<zur-navbar>
|
|
41
|
-
<strong zurNavbarLogo>
|
|
43
|
+
<strong zurNavbarLogo>Casa Verde</strong>
|
|
42
44
|
<ng-container zurNavbarLinks>
|
|
43
45
|
<a href="#">Início</a>
|
|
44
|
-
<a href="#">
|
|
46
|
+
<a href="#">Plantas</a>
|
|
45
47
|
</ng-container>
|
|
46
48
|
<ng-container zurNavbarActions>
|
|
47
49
|
<zur-theme-toggle />
|
|
@@ -60,31 +62,34 @@ O `ZurThemeService` aplica `data-theme="dark"` no `<html>`, persiste a escolha e
|
|
|
60
62
|
|---|---|
|
|
61
63
|
| Tema e marca | `ZurThemeService`, `zur-theme-toggle`, `[zurThemeScope]` (tema isolado), `zur-logo` |
|
|
62
64
|
| Fundamentos | `button[zur-button]`, `zur-badge`, `zur-card`, `zur-avatar` |
|
|
63
|
-
| Formulários | `zur-input`, `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` (todos ControlValueAccessor), `zur-file-upload` |
|
|
64
66
|
| Navegação | `zur-navbar`, `zur-tabs`/`zur-tab`, `zur-menu`/`zur-menu-item`, `zur-breadcrumb`, `zur-sidenav`/`zur-sidenav-item`/`zur-sidenav-label` |
|
|
65
|
-
|
|
|
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]` |
|
|
70
|
+
| Padrões | `zur-chat` (+ `-message`, `-divider`, `-typing`, `-composer`), `zur-command-palette`, `zur-notification-center`, `zur-kanban` + `ng-template[zurKanbanCard]` |
|
|
66
71
|
| 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) |
|
|
67
|
-
| Feedback | `zur-modal`, `ZurToastService` + `zur-toast-container`, `[zurTooltip]`, `zur-alert`, `zur-spinner`, `zur-skeleton` |
|
|
72
|
+
| Feedback | `zur-modal`, `ZurToastService` + `zur-toast-container`, `[zurTooltip]`, `zur-alert`, `zur-spinner`, `zur-skeleton`, `zur-progress` |
|
|
68
73
|
|
|
69
74
|
### Exemplos
|
|
70
75
|
|
|
71
76
|
```html
|
|
72
|
-
<button zur-button variant="primary" size="md">
|
|
77
|
+
<button zur-button variant="primary" size="md">Comprar</button>
|
|
73
78
|
<button zur-button variant="secondary">Cancelar</button>
|
|
74
79
|
|
|
75
|
-
<zur-badge color="success">
|
|
80
|
+
<zur-badge color="success">Entregue</zur-badge>
|
|
76
81
|
|
|
77
82
|
<zur-input label="E-mail" placeholder="voce@exemplo.com" [(ngModel)]="email" />
|
|
78
83
|
|
|
79
84
|
<zur-switch [(ngModel)]="notificacoes">Receber notificações</zur-switch>
|
|
80
85
|
|
|
81
86
|
<zur-tabs>
|
|
82
|
-
<zur-tab label="
|
|
87
|
+
<zur-tab label="Descrição">…</zur-tab>
|
|
83
88
|
<zur-tab label="Avaliações">…</zur-tab>
|
|
84
89
|
</zur-tabs>
|
|
85
90
|
|
|
86
|
-
<zur-modal [(open)]="aberto" title="Confirmar
|
|
87
|
-
Deseja confirmar
|
|
91
|
+
<zur-modal [(open)]="aberto" title="Confirmar pedido">
|
|
92
|
+
Deseja confirmar o pedido?
|
|
88
93
|
<div zurModalActions>
|
|
89
94
|
<button zur-button variant="ghost" (click)="aberto = false">Voltar</button>
|
|
90
95
|
<button zur-button variant="primary">Confirmar</button>
|
|
@@ -92,10 +97,32 @@ O `ZurThemeService` aplica `data-theme="dark"` no `<html>`, persiste a escolha e
|
|
|
92
97
|
</zur-modal>
|
|
93
98
|
```
|
|
94
99
|
|
|
100
|
+
```html
|
|
101
|
+
<zur-combobox label="Planta" [options]="plantas" [(ngModel)]="planta" />
|
|
102
|
+
<zur-date-picker label="Período" mode="range" [(ngModel)]="periodo" />
|
|
103
|
+
|
|
104
|
+
<zur-chat style="height: 480px">
|
|
105
|
+
@for (m of mensagens(); track m.id) {
|
|
106
|
+
<zur-chat-message [from]="m.from" [author]="m.autor">{{ m.texto }}</zur-chat-message>
|
|
107
|
+
}
|
|
108
|
+
<zur-chat-composer (send)="enviar($event)" />
|
|
109
|
+
</zur-chat>
|
|
110
|
+
|
|
111
|
+
<zur-command-palette [commands]="comandos" (selected)="executar($event)" /> <!-- Ctrl+K -->
|
|
112
|
+
```
|
|
113
|
+
|
|
95
114
|
```ts
|
|
96
115
|
// toasts
|
|
97
116
|
private toast = inject(ZurToastService);
|
|
98
|
-
this.toast.show('
|
|
117
|
+
this.toast.show('Pedido confirmado!', 'success');
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Idioma
|
|
121
|
+
|
|
122
|
+
Os textos internos (rótulos de acessibilidade, "Voltar", "Fechar") vêm em português. Para inglês:
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
bootstrapApplication(App, { providers: [provideZuriI18n('en')] });
|
|
99
126
|
```
|
|
100
127
|
|
|
101
128
|
## Desenvolvimento
|