@juau/zuri 0.2.0 → 0.4.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 +42 -6
- package/fesm2022/juau-zuri.mjs +12579 -3591
- package/fesm2022/juau-zuri.mjs.map +1 -1
- package/package.json +4 -1
- package/styles/tokens.css +52 -0
- package/tailwind-theme.css +61 -0
- package/tailwind.preset.cjs +83 -0
- package/tokens.json +820 -0
- package/types/juau-zuri.d.ts +2590 -230
package/types/juau-zuri.d.ts
CHANGED
|
@@ -87,6 +87,85 @@ export interface ZurI18n {
|
|
|
87
87
|
cardMoved: (card: string, column: string, position: number) => string;
|
|
88
88
|
cardDropped: (card: string, column: string, position: number) => string;
|
|
89
89
|
cardCancelled: (card: string) => string;
|
|
90
|
+
/** Campo numérico. */
|
|
91
|
+
increase: string;
|
|
92
|
+
decrease: string;
|
|
93
|
+
/** Código de verificação (OTP). */
|
|
94
|
+
otpGroup: string;
|
|
95
|
+
otpDigit: (n: number, total: number) => string;
|
|
96
|
+
/** Avaliação por estrelas. */
|
|
97
|
+
ratingValue: (value: number, max: number) => string;
|
|
98
|
+
ratingStar: (n: number) => string;
|
|
99
|
+
/** Seletor de horário. */
|
|
100
|
+
openTimePicker: string;
|
|
101
|
+
hours: string;
|
|
102
|
+
minutes: string;
|
|
103
|
+
/** Stepper. */
|
|
104
|
+
stepOf: (n: number, total: number) => string;
|
|
105
|
+
stepDone: string;
|
|
106
|
+
stepCurrent: string;
|
|
107
|
+
stepError: string;
|
|
108
|
+
/** Carrossel. */
|
|
109
|
+
carousel: string;
|
|
110
|
+
previousSlide: string;
|
|
111
|
+
nextSlide: string;
|
|
112
|
+
slideOf: (n: number, total: number) => string;
|
|
113
|
+
goToSlide: (n: number) => string;
|
|
114
|
+
pauseCarousel: string;
|
|
115
|
+
playCarousel: string;
|
|
116
|
+
/** Grupo de avatares: "+3". */
|
|
117
|
+
moreAvatars: (count: number) => string;
|
|
118
|
+
/** Diálogo de confirmação. */
|
|
119
|
+
confirm: string;
|
|
120
|
+
cancel: string;
|
|
121
|
+
ok: string;
|
|
122
|
+
/** Menu de contexto. */
|
|
123
|
+
contextMenu: string;
|
|
124
|
+
/** Linha do tempo e árvore. */
|
|
125
|
+
timeline: string;
|
|
126
|
+
tree: string;
|
|
127
|
+
expandNode: (label: string) => string;
|
|
128
|
+
collapseNode: (label: string) => string;
|
|
129
|
+
/** Tabela avançada. */
|
|
130
|
+
selectAllRows: string;
|
|
131
|
+
selectRow: string;
|
|
132
|
+
expandRow: string;
|
|
133
|
+
collapseRow: string;
|
|
134
|
+
filterColumn: (column: string) => string;
|
|
135
|
+
clearFilter: string;
|
|
136
|
+
visibleColumns: string;
|
|
137
|
+
/** Gráficos e indicadores. */
|
|
138
|
+
chartLegend: string;
|
|
139
|
+
chartData: string;
|
|
140
|
+
chartPoint: (series: string, label: string, value: string) => string;
|
|
141
|
+
statUp: string;
|
|
142
|
+
statDown: string;
|
|
143
|
+
statFlat: string;
|
|
144
|
+
statVsPrevious: string;
|
|
145
|
+
/** Botão que alterna a densidade da interface. */
|
|
146
|
+
densityToCompact: string;
|
|
147
|
+
densityToComfortable: string;
|
|
148
|
+
/** Busca, edição no lugar e código. */
|
|
149
|
+
searchLabel: string;
|
|
150
|
+
copy: string;
|
|
151
|
+
copied: string;
|
|
152
|
+
copyFailed: string;
|
|
153
|
+
edit: string;
|
|
154
|
+
save: string;
|
|
155
|
+
inlineEditSaved: string;
|
|
156
|
+
inlineEditCancelled: string;
|
|
157
|
+
/** Texto para leitores de tela em links que abrem outra aba. */
|
|
158
|
+
opensInNewTab: string;
|
|
159
|
+
/** Seleção múltipla, tabela e navegação. */
|
|
160
|
+
optionAdded: (label: string) => string;
|
|
161
|
+
optionRemoved: (label: string) => string;
|
|
162
|
+
selectedCount: (count: number) => string;
|
|
163
|
+
clearSelection: string;
|
|
164
|
+
resizeColumn: (column: string) => string;
|
|
165
|
+
tableLoading: string;
|
|
166
|
+
bottomNav: string;
|
|
167
|
+
sheetHandle: string;
|
|
168
|
+
badgeCount: (count: number) => string;
|
|
90
169
|
}
|
|
91
170
|
export declare const ZUR_I18N_PT: ZurI18n;
|
|
92
171
|
export declare const ZUR_I18N_EN: ZurI18n;
|
|
@@ -156,6 +235,7 @@ export declare class ZurThemeToggle {
|
|
|
156
235
|
* ```
|
|
157
236
|
*/
|
|
158
237
|
export declare class ZurThemeScope {
|
|
238
|
+
constructor();
|
|
159
239
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZurThemeScope, never>;
|
|
160
240
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ZurThemeScope, "[zurThemeScope]", never, {}, {}, never, never, true, never>;
|
|
161
241
|
}
|
|
@@ -194,7 +274,53 @@ export declare class ZurLogo {
|
|
|
194
274
|
};
|
|
195
275
|
}, {}, never, never, true, never>;
|
|
196
276
|
}
|
|
197
|
-
export type
|
|
277
|
+
export type ZurDensity = 'comfortable' | 'compact';
|
|
278
|
+
/**
|
|
279
|
+
* Densidade da página inteira: aplica `data-density` no `<html>` (controles mais baixos no
|
|
280
|
+
* `compact`), persiste em `localStorage` e começa no confortável. Para uma área só, use a
|
|
281
|
+
* diretiva `zurDensity`.
|
|
282
|
+
*/
|
|
283
|
+
export declare class ZurDensityService {
|
|
284
|
+
private readonly doc;
|
|
285
|
+
readonly density: import("@angular/core").WritableSignal<ZurDensity>;
|
|
286
|
+
constructor();
|
|
287
|
+
set(density: ZurDensity): void;
|
|
288
|
+
toggle(): void;
|
|
289
|
+
private initial;
|
|
290
|
+
private apply;
|
|
291
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurDensityService, never>;
|
|
292
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Densidade só da área marcada: tudo dentro dela usa os controles compactos, sem mexer no
|
|
296
|
+
* resto da página.
|
|
297
|
+
*
|
|
298
|
+
* ```html
|
|
299
|
+
* <section zurDensity>…formulário denso…</section>
|
|
300
|
+
* <section zurDensity="comfortable">…volta ao tamanho normal dentro de uma área compacta…</section>
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
303
|
+
export declare class ZurDensityScope {
|
|
304
|
+
readonly zurDensity: import("@angular/core").InputSignal<"" | ZurDensity>;
|
|
305
|
+
protected readonly value: import("@angular/core").Signal<ZurDensity>;
|
|
306
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurDensityScope, never>;
|
|
307
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ZurDensityScope, "[zurDensity]", never, {
|
|
308
|
+
"zurDensity": {
|
|
309
|
+
"alias": "zurDensity";
|
|
310
|
+
"required": false;
|
|
311
|
+
"isSignal": true;
|
|
312
|
+
};
|
|
313
|
+
}, {}, never, never, true, never>;
|
|
314
|
+
}
|
|
315
|
+
/** Botão que alterna a densidade da página (`ZurDensityService`). */
|
|
316
|
+
export declare class ZurDensityToggle {
|
|
317
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
318
|
+
protected readonly service: ZurDensityService;
|
|
319
|
+
protected readonly compact: import("@angular/core").Signal<boolean>;
|
|
320
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurDensityToggle, never>;
|
|
321
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurDensityToggle, "zur-density-toggle", never, {}, {}, never, never, true, never>;
|
|
322
|
+
}
|
|
323
|
+
export type ZurButtonVariant = 'primary' | 'secondary' | 'ghost' | 'pill' | 'danger';
|
|
198
324
|
export type ZurButtonSize = 'sm' | 'md' | 'lg';
|
|
199
325
|
/**
|
|
200
326
|
* Botão do Zuri. Aplicado como atributo em <button> ou <a> nativos
|
|
@@ -275,6 +401,262 @@ export declare class ZurAvatar {
|
|
|
275
401
|
};
|
|
276
402
|
}, {}, never, never, true, never>;
|
|
277
403
|
}
|
|
404
|
+
export interface ZurAvatarPerson {
|
|
405
|
+
name: string;
|
|
406
|
+
src?: string | null;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Pilha de avatares sobrepostos com contador do excedente ("+3"). Mostra os `max`
|
|
410
|
+
* primeiros; o resto vira o contador, que também é anunciado por extenso.
|
|
411
|
+
*
|
|
412
|
+
* ```html
|
|
413
|
+
* <zur-avatar-group [people]="equipe" [max]="4" />
|
|
414
|
+
* ```
|
|
415
|
+
*/
|
|
416
|
+
export declare class ZurAvatarGroup {
|
|
417
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
418
|
+
readonly people: import("@angular/core").InputSignal<ZurAvatarPerson[]>;
|
|
419
|
+
readonly max: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
420
|
+
readonly size: import("@angular/core").InputSignal<ZurAvatarSize>;
|
|
421
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
422
|
+
protected readonly visible: import("@angular/core").Signal<ZurAvatarPerson[]>;
|
|
423
|
+
protected readonly extra: import("@angular/core").Signal<number>;
|
|
424
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurAvatarGroup, never>;
|
|
425
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurAvatarGroup, "zur-avatar-group", never, {
|
|
426
|
+
"people": {
|
|
427
|
+
"alias": "people";
|
|
428
|
+
"required": false;
|
|
429
|
+
"isSignal": true;
|
|
430
|
+
};
|
|
431
|
+
"max": {
|
|
432
|
+
"alias": "max";
|
|
433
|
+
"required": false;
|
|
434
|
+
"isSignal": true;
|
|
435
|
+
};
|
|
436
|
+
"size": {
|
|
437
|
+
"alias": "size";
|
|
438
|
+
"required": false;
|
|
439
|
+
"isSignal": true;
|
|
440
|
+
};
|
|
441
|
+
"label": {
|
|
442
|
+
"alias": "label";
|
|
443
|
+
"required": false;
|
|
444
|
+
"isSignal": true;
|
|
445
|
+
};
|
|
446
|
+
}, {}, never, never, true, never>;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Conjunto de ícones do Zuri: traço de 2 px, pontas arredondadas, grade de 24 px.
|
|
450
|
+
* Cada ícone é uma constante exportada, então o bundler descarta os que o app não usa.
|
|
451
|
+
* Os marcados com `mirror` apontam para um lado e se espelham em RTL.
|
|
452
|
+
*
|
|
453
|
+
* ```html
|
|
454
|
+
* <zur-icon [icon]="lupa" /> // readonly lupa = zurIconSearch;
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
export interface ZurIconDef {
|
|
458
|
+
/** Nome em kebab-case (para docs e testes). */
|
|
459
|
+
readonly name: string;
|
|
460
|
+
/** Dados do caminho SVG (`d`), em grade 24 × 24. */
|
|
461
|
+
readonly d: string;
|
|
462
|
+
/** Ícone direcional: espelha em páginas da direita para a esquerda. */
|
|
463
|
+
readonly mirror?: boolean;
|
|
464
|
+
}
|
|
465
|
+
export declare const zurIconCheck: ZurIconDef;
|
|
466
|
+
export declare const zurIconX: ZurIconDef;
|
|
467
|
+
export declare const zurIconPlus: ZurIconDef;
|
|
468
|
+
export declare const zurIconMinus: ZurIconDef;
|
|
469
|
+
export declare const zurIconChevronUp: ZurIconDef;
|
|
470
|
+
export declare const zurIconChevronDown: ZurIconDef;
|
|
471
|
+
export declare const zurIconChevronStart: ZurIconDef;
|
|
472
|
+
export declare const zurIconChevronEnd: ZurIconDef;
|
|
473
|
+
export declare const zurIconArrowUp: ZurIconDef;
|
|
474
|
+
export declare const zurIconArrowDown: ZurIconDef;
|
|
475
|
+
export declare const zurIconSearch: ZurIconDef;
|
|
476
|
+
export declare const zurIconMenu: ZurIconDef;
|
|
477
|
+
export declare const zurIconMoreHorizontal: ZurIconDef;
|
|
478
|
+
export declare const zurIconMoreVertical: ZurIconDef;
|
|
479
|
+
export declare const zurIconInfo: ZurIconDef;
|
|
480
|
+
export declare const zurIconAlertTriangle: ZurIconDef;
|
|
481
|
+
export declare const zurIconAlertCircle: ZurIconDef;
|
|
482
|
+
export declare const zurIconCheckCircle: ZurIconDef;
|
|
483
|
+
export declare const zurIconXCircle: ZurIconDef;
|
|
484
|
+
export declare const zurIconTrash: ZurIconDef;
|
|
485
|
+
export declare const zurIconPencil: ZurIconDef;
|
|
486
|
+
export declare const zurIconCopy: ZurIconDef;
|
|
487
|
+
export declare const zurIconDownload: ZurIconDef;
|
|
488
|
+
export declare const zurIconUpload: ZurIconDef;
|
|
489
|
+
export declare const zurIconLink: ZurIconDef;
|
|
490
|
+
export declare const zurIconExternalLink: ZurIconDef;
|
|
491
|
+
export declare const zurIconEye: ZurIconDef;
|
|
492
|
+
export declare const zurIconEyeOff: ZurIconDef;
|
|
493
|
+
export declare const zurIconCalendar: ZurIconDef;
|
|
494
|
+
export declare const zurIconClock: ZurIconDef;
|
|
495
|
+
export declare const zurIconUser: ZurIconDef;
|
|
496
|
+
export declare const zurIconUsers: ZurIconDef;
|
|
497
|
+
export declare const zurIconHome: ZurIconDef;
|
|
498
|
+
export declare const zurIconSettings: ZurIconDef;
|
|
499
|
+
export declare const zurIconHeart: ZurIconDef;
|
|
500
|
+
export declare const zurIconStar: ZurIconDef;
|
|
501
|
+
export declare const zurIconFilter: ZurIconDef;
|
|
502
|
+
export declare const zurIconSort: ZurIconDef;
|
|
503
|
+
export declare const zurIconRefresh: ZurIconDef;
|
|
504
|
+
export declare const zurIconBell: ZurIconDef;
|
|
505
|
+
export declare const zurIconMail: ZurIconDef;
|
|
506
|
+
export declare const zurIconImage: ZurIconDef;
|
|
507
|
+
export declare const zurIconFile: ZurIconDef;
|
|
508
|
+
export declare const zurIconFolder: ZurIconDef;
|
|
509
|
+
export declare const zurIconLock: ZurIconDef;
|
|
510
|
+
export declare const zurIconUndo: ZurIconDef;
|
|
511
|
+
export declare const zurIconGrip: ZurIconDef;
|
|
512
|
+
/** Todos os ícones, para catálogos e testes. Importar este objeto desativa o tree-shaking. */
|
|
513
|
+
export declare const ZUR_ICON_CATALOG: readonly ZurIconDef[];
|
|
514
|
+
/**
|
|
515
|
+
* Ícone SVG do Zuri. Sem `label` é decorativo (`aria-hidden`); com `label` vira `role="img"`.
|
|
516
|
+
* Os ícones direcionais (setas, chevrons) se espelham sozinhos em RTL.
|
|
517
|
+
*
|
|
518
|
+
* ```html
|
|
519
|
+
* <zur-icon [icon]="lupa" />
|
|
520
|
+
* <zur-icon [icon]="alerta" label="Atenção" [size]="24" />
|
|
521
|
+
* ```
|
|
522
|
+
*/
|
|
523
|
+
export declare class ZurIcon {
|
|
524
|
+
readonly icon: import("@angular/core").InputSignal<ZurIconDef>;
|
|
525
|
+
/** Lado em px (16, 20 ou 24 seguem a grade do sistema). */
|
|
526
|
+
readonly size: import("@angular/core").InputSignal<number>;
|
|
527
|
+
/** Texto acessível; sem ele o ícone é decorativo. */
|
|
528
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
529
|
+
protected readonly path: import("@angular/core").Signal<string>;
|
|
530
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurIcon, never>;
|
|
531
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurIcon, "zur-icon", never, {
|
|
532
|
+
"icon": {
|
|
533
|
+
"alias": "icon";
|
|
534
|
+
"required": true;
|
|
535
|
+
"isSignal": true;
|
|
536
|
+
};
|
|
537
|
+
"size": {
|
|
538
|
+
"alias": "size";
|
|
539
|
+
"required": false;
|
|
540
|
+
"isSignal": true;
|
|
541
|
+
};
|
|
542
|
+
"label": {
|
|
543
|
+
"alias": "label";
|
|
544
|
+
"required": false;
|
|
545
|
+
"isSignal": true;
|
|
546
|
+
};
|
|
547
|
+
}, {}, never, never, true, never>;
|
|
548
|
+
}
|
|
549
|
+
export type ZurIconButtonVariant = 'ghost' | 'secondary' | 'primary';
|
|
550
|
+
export type ZurIconButtonSize = 'sm' | 'md' | 'lg';
|
|
551
|
+
/**
|
|
552
|
+
* Botão quadrado só com ícone. O `label` é obrigatório: vira o `aria-label`, já que o botão
|
|
553
|
+
* não tem texto. O tamanho acompanha a densidade (`--zur-control-height-*`).
|
|
554
|
+
*
|
|
555
|
+
* ```html
|
|
556
|
+
* <button zur-icon-button label="Excluir"><zur-icon [icon]="lixeira" /></button>
|
|
557
|
+
* ```
|
|
558
|
+
*/
|
|
559
|
+
export declare class ZurIconButton {
|
|
560
|
+
/** Nome acessível do botão (obrigatório: não há texto visível). */
|
|
561
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
562
|
+
readonly variant: import("@angular/core").InputSignal<ZurIconButtonVariant>;
|
|
563
|
+
readonly size: import("@angular/core").InputSignal<ZurIconButtonSize>;
|
|
564
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurIconButton, never>;
|
|
565
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurIconButton, "button[zur-icon-button]", never, {
|
|
566
|
+
"label": {
|
|
567
|
+
"alias": "label";
|
|
568
|
+
"required": true;
|
|
569
|
+
"isSignal": true;
|
|
570
|
+
};
|
|
571
|
+
"variant": {
|
|
572
|
+
"alias": "variant";
|
|
573
|
+
"required": false;
|
|
574
|
+
"isSignal": true;
|
|
575
|
+
};
|
|
576
|
+
"size": {
|
|
577
|
+
"alias": "size";
|
|
578
|
+
"required": false;
|
|
579
|
+
"isSignal": true;
|
|
580
|
+
};
|
|
581
|
+
}, {}, never, ["*"], true, never>;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Botão de ação flutuante: o atalho para a ação principal da tela. É circular, menta
|
|
585
|
+
* e usa a sombra única do sistema. `extended` mostra o texto ao lado do ícone; sem ele,
|
|
586
|
+
* informe `label` para o leitor de tela. O posicionamento (fixo no canto) é da aplicação.
|
|
587
|
+
*
|
|
588
|
+
* ```html
|
|
589
|
+
* <button zur-fab label="Novo pedido"><zur-icon [icon]="mais" size="24" /></button>
|
|
590
|
+
* <button zur-fab extended><zur-icon [icon]="mais" /> Novo pedido</button>
|
|
591
|
+
* ```
|
|
592
|
+
*/
|
|
593
|
+
export declare class ZurFab {
|
|
594
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
595
|
+
readonly extended: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
596
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurFab, never>;
|
|
597
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurFab, "button[zur-fab]", never, {
|
|
598
|
+
"label": {
|
|
599
|
+
"alias": "label";
|
|
600
|
+
"required": false;
|
|
601
|
+
"isSignal": true;
|
|
602
|
+
};
|
|
603
|
+
"extended": {
|
|
604
|
+
"alias": "extended";
|
|
605
|
+
"required": false;
|
|
606
|
+
"isSignal": true;
|
|
607
|
+
};
|
|
608
|
+
}, {}, never, ["*"], true, never>;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Link com o estilo do sistema (ink sublinhado). Com `external`, abre em outra aba com
|
|
612
|
+
* `rel="noopener noreferrer"`, mostra o ícone e avisa os leitores de tela.
|
|
613
|
+
*
|
|
614
|
+
* ```html
|
|
615
|
+
* <a zur-link href="/entregas">Política de entrega</a>
|
|
616
|
+
* <a zur-link external href="https://exemplo.com">Guia de rega</a>
|
|
617
|
+
* ```
|
|
618
|
+
*/
|
|
619
|
+
export declare class ZurLink {
|
|
620
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
621
|
+
protected readonly iconExternal: import("@juau/zuri").ZurIconDef;
|
|
622
|
+
readonly external: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
623
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurLink, never>;
|
|
624
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurLink, "a[zur-link]", never, {
|
|
625
|
+
"external": {
|
|
626
|
+
"alias": "external";
|
|
627
|
+
"required": false;
|
|
628
|
+
"isSignal": true;
|
|
629
|
+
};
|
|
630
|
+
}, {}, never, ["*"], true, never>;
|
|
631
|
+
}
|
|
632
|
+
export type ZurDividerOrientation = 'horizontal' | 'vertical';
|
|
633
|
+
/**
|
|
634
|
+
* Linha fina que separa grupos de conteúdo. Com `label` mostra um texto no meio ("ou"),
|
|
635
|
+
* que também vira o nome acessível do separador.
|
|
636
|
+
*
|
|
637
|
+
* ```html
|
|
638
|
+
* <zur-divider />
|
|
639
|
+
* <zur-divider label="ou" />
|
|
640
|
+
* <zur-divider orientation="vertical" />
|
|
641
|
+
* ```
|
|
642
|
+
*/
|
|
643
|
+
export declare class ZurDivider {
|
|
644
|
+
readonly orientation: import("@angular/core").InputSignal<ZurDividerOrientation>;
|
|
645
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
646
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurDivider, never>;
|
|
647
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurDivider, "zur-divider", never, {
|
|
648
|
+
"orientation": {
|
|
649
|
+
"alias": "orientation";
|
|
650
|
+
"required": false;
|
|
651
|
+
"isSignal": true;
|
|
652
|
+
};
|
|
653
|
+
"label": {
|
|
654
|
+
"alias": "label";
|
|
655
|
+
"required": false;
|
|
656
|
+
"isSignal": true;
|
|
657
|
+
};
|
|
658
|
+
}, {}, never, never, true, never>;
|
|
659
|
+
}
|
|
278
660
|
/**
|
|
279
661
|
* Campo de texto do Zuri — 56px, label em caption acima,
|
|
280
662
|
* foco com borda 2px ink (sem glow, Airbnb), erro em vermelho semântico.
|
|
@@ -542,8 +924,12 @@ export interface ZurComboboxOption {
|
|
|
542
924
|
* iniciais). Navegação por setas, Enter escolhe, Esc fecha. Funciona com
|
|
543
925
|
* `ngModel` e formulários reativos; o valor é o `value` da opção (ou `null`).
|
|
544
926
|
*
|
|
927
|
+
* Com `multiple`, vira seleção múltipla: as escolhas aparecem como chips dentro do campo, a lista
|
|
928
|
+
* continua aberta ao escolher e o valor é um `string[]`.
|
|
929
|
+
*
|
|
545
930
|
* ```html
|
|
546
931
|
* <zur-combobox label="Planta" [options]="plantas" [(ngModel)]="planta" />
|
|
932
|
+
* <zur-combobox label="Ambientes" multiple [options]="ambientes" [(ngModel)]="escolhidos" />
|
|
547
933
|
* ```
|
|
548
934
|
*/
|
|
549
935
|
export declare class ZurCombobox implements ControlValueAccessor {
|
|
@@ -555,32 +941,43 @@ export declare class ZurCombobox implements ControlValueAccessor {
|
|
|
555
941
|
readonly error: import("@angular/core").InputSignal<string>;
|
|
556
942
|
readonly options: import("@angular/core").InputSignal<ZurComboboxOption[]>;
|
|
557
943
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
944
|
+
/** Seleção múltipla: chips no campo, lista aberta ao escolher, valor `string[]`. */
|
|
945
|
+
readonly multiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
558
946
|
protected readonly id: string;
|
|
559
947
|
protected readonly listId: string;
|
|
560
948
|
readonly value: import("@angular/core").WritableSignal<string | null>;
|
|
949
|
+
/** Valores escolhidos no modo `multiple`. */
|
|
950
|
+
readonly values: import("@angular/core").WritableSignal<string[]>;
|
|
951
|
+
protected readonly announcement: import("@angular/core").WritableSignal<string>;
|
|
561
952
|
/** Texto digitado; `null` quando o campo só mostra o rótulo escolhido. */
|
|
562
953
|
private readonly typed;
|
|
563
954
|
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
564
955
|
protected readonly activeIndex: import("@angular/core").WritableSignal<number>;
|
|
565
956
|
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
566
957
|
private readonly selectedLabel;
|
|
958
|
+
protected readonly selectedOptions: import("@angular/core").Signal<ZurComboboxOption[]>;
|
|
567
959
|
protected readonly query: import("@angular/core").Signal<string>;
|
|
568
960
|
/** Enquanto o usuário não digita, mostra todas as opções. */
|
|
569
961
|
protected readonly filtered: import("@angular/core").Signal<ZurComboboxOption[]>;
|
|
570
|
-
protected onChange: (value: string | null) => void;
|
|
962
|
+
protected onChange: (value: string | string[] | null) => void;
|
|
571
963
|
protected onTouched: () => void;
|
|
964
|
+
protected hasValue(): boolean;
|
|
965
|
+
protected isSelected(value: string): boolean;
|
|
572
966
|
protected optionId(i: number): string;
|
|
573
967
|
protected isDisabled(): boolean;
|
|
574
968
|
protected openList(): void;
|
|
575
969
|
protected onInput(event: Event): void;
|
|
576
970
|
protected onKeydown(event: KeyboardEvent): void;
|
|
577
971
|
select(option: ZurComboboxOption): void;
|
|
972
|
+
/** Marca ou desmarca uma opção no modo `multiple`; a lista continua aberta. */
|
|
973
|
+
toggle(option: ZurComboboxOption): void;
|
|
974
|
+
protected removeTag(value: string): void;
|
|
578
975
|
clear(): void;
|
|
579
976
|
/** Fecha a lista e restaura o texto para o rótulo escolhido. */
|
|
580
977
|
private closeList;
|
|
581
978
|
protected onFocusOut(event: FocusEvent): void;
|
|
582
|
-
writeValue(value: string | null): void;
|
|
583
|
-
registerOnChange(fn: (value: string | null) => void): void;
|
|
979
|
+
writeValue(value: string | string[] | null): void;
|
|
980
|
+
registerOnChange(fn: (value: string | string[] | null) => void): void;
|
|
584
981
|
registerOnTouched(fn: () => void): void;
|
|
585
982
|
setDisabledState(isDisabled: boolean): void;
|
|
586
983
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZurCombobox, never>;
|
|
@@ -615,6 +1012,11 @@ export declare class ZurCombobox implements ControlValueAccessor {
|
|
|
615
1012
|
"required": false;
|
|
616
1013
|
"isSignal": true;
|
|
617
1014
|
};
|
|
1015
|
+
"multiple": {
|
|
1016
|
+
"alias": "multiple";
|
|
1017
|
+
"required": false;
|
|
1018
|
+
"isSignal": true;
|
|
1019
|
+
};
|
|
618
1020
|
}, {}, never, never, true, never>;
|
|
619
1021
|
}
|
|
620
1022
|
export type ZurDatePickerMode = 'single' | 'range';
|
|
@@ -642,8 +1044,8 @@ export declare class ZurDatePicker implements ControlValueAccessor {
|
|
|
642
1044
|
readonly hint: import("@angular/core").InputSignal<string>;
|
|
643
1045
|
readonly error: import("@angular/core").InputSignal<string>;
|
|
644
1046
|
readonly mode: import("@angular/core").InputSignal<ZurDatePickerMode>;
|
|
645
|
-
readonly min: import("@angular/core").InputSignal<Date | null>;
|
|
646
|
-
readonly max: import("@angular/core").InputSignal<Date | null>;
|
|
1047
|
+
readonly min: import("@angular/core").InputSignal<Date | null | undefined>;
|
|
1048
|
+
readonly max: import("@angular/core").InputSignal<Date | null | undefined>;
|
|
647
1049
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
648
1050
|
protected readonly id: string;
|
|
649
1051
|
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -901,79 +1303,50 @@ export declare class ZurChips implements ControlValueAccessor {
|
|
|
901
1303
|
};
|
|
902
1304
|
}, {}, never, never, true, never>;
|
|
903
1305
|
}
|
|
1306
|
+
export type ZurChipVariant = 'assist' | 'filter' | 'choice';
|
|
1307
|
+
export type ZurChipGroupMode = 'single' | 'multiple';
|
|
904
1308
|
/**
|
|
905
|
-
*
|
|
906
|
-
*
|
|
907
|
-
*
|
|
1309
|
+
* Grupo de chips selecionáveis. `mode="single"` é um `radiogroup` (setas trocam a escolha, Tab sai do
|
|
1310
|
+
* grupo); `mode="multiple"` é um conjunto de botões de alternar (filtros). O valor é `string` ou
|
|
1311
|
+
* `string[]`, conforme o modo, e funciona com `ngModel`, formulários reativos, `[formField]` e
|
|
1312
|
+
* `[(value)]`.
|
|
908
1313
|
*
|
|
909
1314
|
* ```html
|
|
910
|
-
* <zur-
|
|
911
|
-
*
|
|
1315
|
+
* <zur-chip-group label="Ambiente" mode="single" [(ngModel)]="ambiente">
|
|
1316
|
+
* <zur-chip value="sala">Sala</zur-chip>
|
|
1317
|
+
* <zur-chip value="varanda">Varanda</zur-chip>
|
|
1318
|
+
* </zur-chip-group>
|
|
912
1319
|
* ```
|
|
1320
|
+
*
|
|
1321
|
+
* Não confundir com `zur-chips`, o campo em que a pessoa digita para criar tags.
|
|
913
1322
|
*/
|
|
914
|
-
export declare class
|
|
915
|
-
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1323
|
+
export declare class ZurChipGroup implements ControlValueAccessor {
|
|
916
1324
|
private readonly host;
|
|
917
1325
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
918
|
-
readonly
|
|
919
|
-
readonly max: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
920
|
-
readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
921
|
-
/** Dois controles: o valor vira `[mínimo, máximo]`. */
|
|
922
|
-
readonly range: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1326
|
+
readonly mode: import("@angular/core").InputSignal<ZurChipGroupMode>;
|
|
923
1327
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
924
|
-
|
|
925
|
-
readonly format: import("@angular/core").InputSignal<(value: number) => string>;
|
|
926
|
-
protected readonly id: string;
|
|
927
|
-
/** `null` = ainda sem valor: usa o padrão (mínimo, ou a trilha toda no modo faixa). */
|
|
928
|
-
private readonly lowValue;
|
|
929
|
-
private readonly highValue;
|
|
930
|
-
protected readonly low: import("@angular/core").Signal<number>;
|
|
931
|
-
protected readonly high: import("@angular/core").Signal<number>;
|
|
1328
|
+
readonly value: import("@angular/core").ModelSignal<string | string[] | null>;
|
|
932
1329
|
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
933
|
-
protected
|
|
934
|
-
protected readonly thumbs: import("@angular/core").Signal<("low" | "high")[]>;
|
|
935
|
-
protected onChange: (value: number | [number, number]) => void;
|
|
1330
|
+
protected onChange: (value: string | string[] | null) => void;
|
|
936
1331
|
protected onTouched: () => void;
|
|
937
|
-
|
|
938
|
-
value
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
protected
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
setThumb(thumb: 'low' | 'high', raw: number): void;
|
|
945
|
-
protected onKeydown(event: KeyboardEvent, thumb: 'low' | 'high'): void;
|
|
946
|
-
private valueAt;
|
|
947
|
-
protected onTrackPointerDown(event: PointerEvent): void;
|
|
948
|
-
protected onPointerMove(event: PointerEvent): void;
|
|
949
|
-
writeValue(value: number | [number, number] | null): void;
|
|
950
|
-
registerOnChange(fn: (value: number | [number, number]) => void): void;
|
|
1332
|
+
isDisabled(): boolean;
|
|
1333
|
+
isSelected(value: string): boolean;
|
|
1334
|
+
/** Escolhe (single) ou alterna (multiple) um valor. */
|
|
1335
|
+
toggle(value: string): void;
|
|
1336
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
1337
|
+
writeValue(value: string | string[] | null): void;
|
|
1338
|
+
registerOnChange(fn: (value: string | string[] | null) => void): void;
|
|
951
1339
|
registerOnTouched(fn: () => void): void;
|
|
952
1340
|
setDisabledState(isDisabled: boolean): void;
|
|
953
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
954
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
1341
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurChipGroup, never>;
|
|
1342
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurChipGroup, "zur-chip-group", never, {
|
|
955
1343
|
"label": {
|
|
956
1344
|
"alias": "label";
|
|
957
1345
|
"required": false;
|
|
958
1346
|
"isSignal": true;
|
|
959
1347
|
};
|
|
960
|
-
"
|
|
961
|
-
"alias": "
|
|
962
|
-
"required": false;
|
|
963
|
-
"isSignal": true;
|
|
964
|
-
};
|
|
965
|
-
"max": {
|
|
966
|
-
"alias": "max";
|
|
967
|
-
"required": false;
|
|
968
|
-
"isSignal": true;
|
|
969
|
-
};
|
|
970
|
-
"step": {
|
|
971
|
-
"alias": "step";
|
|
972
|
-
"required": false;
|
|
973
|
-
"isSignal": true;
|
|
974
|
-
};
|
|
975
|
-
"range": {
|
|
976
|
-
"alias": "range";
|
|
1348
|
+
"mode": {
|
|
1349
|
+
"alias": "mode";
|
|
977
1350
|
"required": false;
|
|
978
1351
|
"isSignal": true;
|
|
979
1352
|
};
|
|
@@ -982,49 +1355,344 @@ export declare class ZurSlider implements ControlValueAccessor {
|
|
|
982
1355
|
"required": false;
|
|
983
1356
|
"isSignal": true;
|
|
984
1357
|
};
|
|
985
|
-
"
|
|
986
|
-
"alias": "
|
|
1358
|
+
"value": {
|
|
1359
|
+
"alias": "value";
|
|
987
1360
|
"required": false;
|
|
988
1361
|
"isSignal": true;
|
|
989
1362
|
};
|
|
990
|
-
}, {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
value: string;
|
|
994
|
-
label: string;
|
|
1363
|
+
}, {
|
|
1364
|
+
"value": "valueChange";
|
|
1365
|
+
}, never, ["*"], true, never>;
|
|
995
1366
|
}
|
|
996
|
-
export type ZurSegmentedSize = 'sm' | 'md';
|
|
997
1367
|
/**
|
|
998
|
-
*
|
|
999
|
-
*
|
|
1368
|
+
* Chip interativo: `assist` (ação rápida, use `(click)`), `filter` (liga e desliga, `[(selected)]`) e
|
|
1369
|
+
* `choice` (dentro de um `zur-chip-group`, com `value`). O estado selecionado tem ✓ e borda de ink,
|
|
1370
|
+
* não só cor. Com `removable`, mostra um ✕ que emite `removed`.
|
|
1000
1371
|
*
|
|
1001
1372
|
* ```html
|
|
1002
|
-
* <zur-
|
|
1373
|
+
* <zur-chip variant="filter" [(selected)]="soSol">Pleno sol</zur-chip>
|
|
1374
|
+
* <zur-chip removable label="Sala" (removed)="tirar('sala')">Sala</zur-chip>
|
|
1003
1375
|
* ```
|
|
1004
1376
|
*/
|
|
1005
|
-
export declare class
|
|
1006
|
-
|
|
1377
|
+
export declare class ZurChip {
|
|
1378
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1379
|
+
protected readonly host: ElementRef<HTMLElement>;
|
|
1380
|
+
private readonly group;
|
|
1381
|
+
readonly variant: import("@angular/core").InputSignal<ZurChipVariant>;
|
|
1382
|
+
/** Valor do chip dentro de um `zur-chip-group` (obrigatório lá). */
|
|
1383
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
1384
|
+
/** Nome para o botão de remover; sem ele usa o texto do chip. */
|
|
1007
1385
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
1008
|
-
readonly
|
|
1009
|
-
readonly
|
|
1386
|
+
readonly selected: import("@angular/core").ModelSignal<boolean>;
|
|
1387
|
+
readonly removable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1010
1388
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1011
|
-
readonly
|
|
1012
|
-
protected
|
|
1013
|
-
protected onChange: (value: string) => void;
|
|
1014
|
-
protected onTouched: () => void;
|
|
1389
|
+
readonly removed: import("@angular/core").OutputEmitterRef<void>;
|
|
1390
|
+
protected selectable(): boolean;
|
|
1015
1391
|
protected isDisabled(): boolean;
|
|
1016
|
-
|
|
1017
|
-
protected
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
"
|
|
1392
|
+
protected isSelected(): boolean;
|
|
1393
|
+
protected role(): string | null;
|
|
1394
|
+
protected pressed(): boolean | null;
|
|
1395
|
+
/** Em grupo `single`, só a escolha atual (ou todos, se nada foi escolhido) recebe o Tab. */
|
|
1396
|
+
protected tabStop(): boolean;
|
|
1397
|
+
protected onClick(): void;
|
|
1398
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurChip, never>;
|
|
1399
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurChip, "zur-chip", never, {
|
|
1400
|
+
"variant": {
|
|
1401
|
+
"alias": "variant";
|
|
1402
|
+
"required": false;
|
|
1403
|
+
"isSignal": true;
|
|
1404
|
+
};
|
|
1405
|
+
"value": {
|
|
1406
|
+
"alias": "value";
|
|
1407
|
+
"required": false;
|
|
1408
|
+
"isSignal": true;
|
|
1409
|
+
};
|
|
1410
|
+
"label": {
|
|
1411
|
+
"alias": "label";
|
|
1412
|
+
"required": false;
|
|
1413
|
+
"isSignal": true;
|
|
1414
|
+
};
|
|
1415
|
+
"selected": {
|
|
1416
|
+
"alias": "selected";
|
|
1417
|
+
"required": false;
|
|
1418
|
+
"isSignal": true;
|
|
1419
|
+
};
|
|
1420
|
+
"removable": {
|
|
1421
|
+
"alias": "removable";
|
|
1422
|
+
"required": false;
|
|
1423
|
+
"isSignal": true;
|
|
1424
|
+
};
|
|
1425
|
+
"disabled": {
|
|
1426
|
+
"alias": "disabled";
|
|
1427
|
+
"required": false;
|
|
1428
|
+
"isSignal": true;
|
|
1429
|
+
};
|
|
1430
|
+
}, {
|
|
1431
|
+
"selected": "selectedChange";
|
|
1432
|
+
"removed": "removed";
|
|
1433
|
+
}, never, ["*"], true, never>;
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Campo de busca: ícone de lupa, botão de limpar, Esc limpa e Enter envia. `searchChange` emite
|
|
1437
|
+
* enquanto a pessoa digita (com `debounceMs`, espera ela parar) e `submitted` emite no Enter.
|
|
1438
|
+
*
|
|
1439
|
+
* ```html
|
|
1440
|
+
* <zur-search label="Buscar plantas" [debounceMs]="250" (searchChange)="filtrar($event)" />
|
|
1441
|
+
* ```
|
|
1442
|
+
*/
|
|
1443
|
+
export declare class ZurSearch implements ControlValueAccessor {
|
|
1444
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1445
|
+
private readonly destroyRef;
|
|
1446
|
+
private readonly host;
|
|
1447
|
+
/** Nome acessível; sem ele usa "Buscar". */
|
|
1448
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1449
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
1450
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1451
|
+
/** Espera (ms) depois da última tecla antes de emitir `searchChange`; `0` emite na hora. */
|
|
1452
|
+
readonly debounceMs: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1453
|
+
readonly searchChange: import("@angular/core").OutputEmitterRef<string>;
|
|
1454
|
+
readonly submitted: import("@angular/core").OutputEmitterRef<string>;
|
|
1455
|
+
protected readonly id: string;
|
|
1456
|
+
protected readonly iconSearch: import("@juau/zuri").ZurIconDef;
|
|
1457
|
+
protected readonly iconX: import("@juau/zuri").ZurIconDef;
|
|
1458
|
+
protected readonly value: import("@angular/core").WritableSignal<string>;
|
|
1459
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
1460
|
+
private timer;
|
|
1461
|
+
protected onChange: (value: string) => void;
|
|
1462
|
+
protected onTouched: () => void;
|
|
1463
|
+
constructor();
|
|
1464
|
+
protected isDisabled(): boolean;
|
|
1465
|
+
protected onInput(event: Event): void;
|
|
1466
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
1467
|
+
clear(): void;
|
|
1468
|
+
writeValue(value: string | null): void;
|
|
1469
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
1470
|
+
registerOnTouched(fn: () => void): void;
|
|
1471
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1472
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSearch, never>;
|
|
1473
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSearch, "zur-search", never, {
|
|
1474
|
+
"label": {
|
|
1475
|
+
"alias": "label";
|
|
1476
|
+
"required": false;
|
|
1477
|
+
"isSignal": true;
|
|
1478
|
+
};
|
|
1479
|
+
"placeholder": {
|
|
1480
|
+
"alias": "placeholder";
|
|
1481
|
+
"required": false;
|
|
1482
|
+
"isSignal": true;
|
|
1483
|
+
};
|
|
1484
|
+
"disabled": {
|
|
1485
|
+
"alias": "disabled";
|
|
1486
|
+
"required": false;
|
|
1487
|
+
"isSignal": true;
|
|
1488
|
+
};
|
|
1489
|
+
"debounceMs": {
|
|
1490
|
+
"alias": "debounceMs";
|
|
1491
|
+
"required": false;
|
|
1492
|
+
"isSignal": true;
|
|
1493
|
+
};
|
|
1494
|
+
}, {
|
|
1495
|
+
"searchChange": "searchChange";
|
|
1496
|
+
"submitted": "submitted";
|
|
1497
|
+
}, never, never, true, never>;
|
|
1498
|
+
}
|
|
1499
|
+
/**
|
|
1500
|
+
* Texto editável no lugar. Em leitura é um botão com o valor; clique, Enter ou F2 abrem o campo.
|
|
1501
|
+
* Enter salva (em `multiline`, Ctrl/⌘+Enter), Esc cancela e sair do campo salva. O foco volta ao
|
|
1502
|
+
* botão e um aviso (`aria-live`) diz o que aconteceu.
|
|
1503
|
+
*
|
|
1504
|
+
* ```html
|
|
1505
|
+
* <zur-inline-edit label="Nome do pedido" [(ngModel)]="nome" (saved)="persistir($event)" />
|
|
1506
|
+
* ```
|
|
1507
|
+
*/
|
|
1508
|
+
export declare class ZurInlineEdit implements ControlValueAccessor {
|
|
1509
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1510
|
+
private readonly host;
|
|
1511
|
+
private readonly injector;
|
|
1512
|
+
/** Nome acessível do campo (o que está sendo editado). */
|
|
1513
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1514
|
+
/** Texto mostrado, em muted, quando o valor está vazio. */
|
|
1515
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
1516
|
+
readonly multiline: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1517
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1518
|
+
/** Emite o novo valor quando a edição é salva (e só se mudou). */
|
|
1519
|
+
readonly saved: import("@angular/core").OutputEmitterRef<string>;
|
|
1520
|
+
protected readonly iconCheck: import("@juau/zuri").ZurIconDef;
|
|
1521
|
+
protected readonly iconX: import("@juau/zuri").ZurIconDef;
|
|
1522
|
+
protected readonly iconPencil: import("@juau/zuri").ZurIconDef;
|
|
1523
|
+
readonly value: import("@angular/core").WritableSignal<string>;
|
|
1524
|
+
protected readonly editing: import("@angular/core").WritableSignal<boolean>;
|
|
1525
|
+
protected readonly draft: import("@angular/core").WritableSignal<string>;
|
|
1526
|
+
protected readonly announcement: import("@angular/core").WritableSignal<string>;
|
|
1527
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
1528
|
+
protected onChange: (value: string) => void;
|
|
1529
|
+
protected onTouched: () => void;
|
|
1530
|
+
protected isDisabled(): boolean;
|
|
1531
|
+
start(): void;
|
|
1532
|
+
commit(): void;
|
|
1533
|
+
cancel(): void;
|
|
1534
|
+
private finish;
|
|
1535
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
1536
|
+
protected onReadKeydown(event: KeyboardEvent): void;
|
|
1537
|
+
/**
|
|
1538
|
+
* Sair do campo (para fora do componente) salva. Só conta o `focusout` que vem do editor: ao
|
|
1539
|
+
* abrir, o botão de leitura que tinha o foco sai do DOM e o navegador também emite `focusout`.
|
|
1540
|
+
*/
|
|
1541
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
1542
|
+
writeValue(value: string | null): void;
|
|
1543
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
1544
|
+
registerOnTouched(fn: () => void): void;
|
|
1545
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1546
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurInlineEdit, never>;
|
|
1547
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurInlineEdit, "zur-inline-edit", never, {
|
|
1548
|
+
"label": {
|
|
1549
|
+
"alias": "label";
|
|
1550
|
+
"required": false;
|
|
1551
|
+
"isSignal": true;
|
|
1552
|
+
};
|
|
1553
|
+
"placeholder": {
|
|
1554
|
+
"alias": "placeholder";
|
|
1555
|
+
"required": false;
|
|
1556
|
+
"isSignal": true;
|
|
1557
|
+
};
|
|
1558
|
+
"multiline": {
|
|
1559
|
+
"alias": "multiline";
|
|
1560
|
+
"required": false;
|
|
1561
|
+
"isSignal": true;
|
|
1562
|
+
};
|
|
1563
|
+
"disabled": {
|
|
1564
|
+
"alias": "disabled";
|
|
1565
|
+
"required": false;
|
|
1566
|
+
"isSignal": true;
|
|
1567
|
+
};
|
|
1568
|
+
}, {
|
|
1569
|
+
"saved": "saved";
|
|
1570
|
+
}, never, never, true, never>;
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* Controle deslizante. Com `range`, tem dois controles e o valor é `[mínimo, máximo]`;
|
|
1574
|
+
* sem, é um número. Teclado: setas (±step), PageUp/PageDown (±10 steps), Home/End.
|
|
1575
|
+
* Clique na trilha move o controle mais próximo; arrastar funciona com mouse e toque.
|
|
1576
|
+
*
|
|
1577
|
+
* ```html
|
|
1578
|
+
* <zur-slider label="Preço" range [min]="0" [max]="500" [step]="10"
|
|
1579
|
+
* [format]="reais" [(ngModel)]="faixa" />
|
|
1580
|
+
* ```
|
|
1581
|
+
*/
|
|
1582
|
+
export declare class ZurSlider implements ControlValueAccessor {
|
|
1583
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1584
|
+
private readonly host;
|
|
1585
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1586
|
+
readonly min: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1587
|
+
readonly max: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1588
|
+
readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1589
|
+
/** Dois controles: o valor vira `[mínimo, máximo]`. */
|
|
1590
|
+
readonly range: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1591
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1592
|
+
/** Como mostrar/anunciar o valor (ex.: moeda). */
|
|
1593
|
+
readonly format: import("@angular/core").InputSignal<(value: number) => string>;
|
|
1594
|
+
protected readonly id: string;
|
|
1595
|
+
/** `null` = ainda sem valor: usa o padrão (mínimo, ou a trilha toda no modo faixa). */
|
|
1596
|
+
private readonly lowValue;
|
|
1597
|
+
private readonly highValue;
|
|
1598
|
+
protected readonly low: import("@angular/core").Signal<number>;
|
|
1599
|
+
protected readonly high: import("@angular/core").Signal<number>;
|
|
1600
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
1601
|
+
protected dragging: 'low' | 'high' | null;
|
|
1602
|
+
protected readonly thumbs: import("@angular/core").Signal<("low" | "high")[]>;
|
|
1603
|
+
protected onChange: (value: number | [number, number]) => void;
|
|
1604
|
+
protected onTouched: () => void;
|
|
1605
|
+
/** No modo simples o valor vive em `high`; `low` é o mínimo da trilha. */
|
|
1606
|
+
value(): number | [number, number];
|
|
1607
|
+
protected isDisabled(): boolean;
|
|
1608
|
+
protected percent(value: number): number;
|
|
1609
|
+
protected thumbLabel(thumb: 'low' | 'high'): string | null;
|
|
1610
|
+
private snap;
|
|
1611
|
+
/** Atualiza um controle respeitando o outro (low ≤ high). */
|
|
1612
|
+
setThumb(thumb: 'low' | 'high', raw: number): void;
|
|
1613
|
+
protected onKeydown(event: KeyboardEvent, thumb: 'low' | 'high'): void;
|
|
1614
|
+
private valueAt;
|
|
1615
|
+
protected onTrackPointerDown(event: PointerEvent): void;
|
|
1616
|
+
protected onPointerMove(event: PointerEvent): void;
|
|
1617
|
+
writeValue(value: number | [number, number] | null): void;
|
|
1618
|
+
registerOnChange(fn: (value: number | [number, number]) => void): void;
|
|
1619
|
+
registerOnTouched(fn: () => void): void;
|
|
1620
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1621
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSlider, never>;
|
|
1622
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSlider, "zur-slider", never, {
|
|
1623
|
+
"label": {
|
|
1624
|
+
"alias": "label";
|
|
1625
|
+
"required": false;
|
|
1626
|
+
"isSignal": true;
|
|
1627
|
+
};
|
|
1628
|
+
"min": {
|
|
1629
|
+
"alias": "min";
|
|
1630
|
+
"required": false;
|
|
1631
|
+
"isSignal": true;
|
|
1632
|
+
};
|
|
1633
|
+
"max": {
|
|
1634
|
+
"alias": "max";
|
|
1635
|
+
"required": false;
|
|
1636
|
+
"isSignal": true;
|
|
1637
|
+
};
|
|
1638
|
+
"step": {
|
|
1639
|
+
"alias": "step";
|
|
1640
|
+
"required": false;
|
|
1641
|
+
"isSignal": true;
|
|
1642
|
+
};
|
|
1643
|
+
"range": {
|
|
1644
|
+
"alias": "range";
|
|
1645
|
+
"required": false;
|
|
1646
|
+
"isSignal": true;
|
|
1647
|
+
};
|
|
1648
|
+
"disabled": {
|
|
1649
|
+
"alias": "disabled";
|
|
1650
|
+
"required": false;
|
|
1651
|
+
"isSignal": true;
|
|
1652
|
+
};
|
|
1653
|
+
"format": {
|
|
1654
|
+
"alias": "format";
|
|
1655
|
+
"required": false;
|
|
1656
|
+
"isSignal": true;
|
|
1657
|
+
};
|
|
1658
|
+
}, {}, never, never, true, never>;
|
|
1659
|
+
}
|
|
1660
|
+
export interface ZurSegmentedOption {
|
|
1661
|
+
value: string;
|
|
1662
|
+
label: string;
|
|
1663
|
+
}
|
|
1664
|
+
export type ZurSegmentedSize = 'sm' | 'md';
|
|
1665
|
+
/**
|
|
1666
|
+
* Alternador em pílulas para poucas opções mutuamente exclusivas (visão em
|
|
1667
|
+
* lista/grade, período). É um `radiogroup`: setas trocam a opção, Tab sai do grupo.
|
|
1668
|
+
*
|
|
1669
|
+
* ```html
|
|
1670
|
+
* <zur-segmented label="Visualização" [options]="visoes" [(ngModel)]="visao" />
|
|
1671
|
+
* ```
|
|
1672
|
+
*/
|
|
1673
|
+
export declare class ZurSegmented implements ControlValueAccessor {
|
|
1674
|
+
private readonly host;
|
|
1675
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1676
|
+
readonly options: import("@angular/core").InputSignal<ZurSegmentedOption[]>;
|
|
1677
|
+
readonly size: import("@angular/core").InputSignal<ZurSegmentedSize>;
|
|
1678
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1679
|
+
readonly value: import("@angular/core").WritableSignal<string | null>;
|
|
1680
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
1681
|
+
protected onChange: (value: string) => void;
|
|
1682
|
+
protected onTouched: () => void;
|
|
1683
|
+
protected isDisabled(): boolean;
|
|
1684
|
+
/** O item marcado (ou o primeiro, se nenhum) recebe o Tab. */
|
|
1685
|
+
protected isTabStop(i: number): boolean;
|
|
1686
|
+
select(value: string): void;
|
|
1687
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
1688
|
+
writeValue(value: string | null): void;
|
|
1689
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
1690
|
+
registerOnTouched(fn: () => void): void;
|
|
1691
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1692
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSegmented, never>;
|
|
1693
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSegmented, "zur-segmented", never, {
|
|
1694
|
+
"label": {
|
|
1695
|
+
"alias": "label";
|
|
1028
1696
|
"required": false;
|
|
1029
1697
|
"isSignal": true;
|
|
1030
1698
|
};
|
|
@@ -1033,191 +1701,1346 @@ export declare class ZurSegmented implements ControlValueAccessor {
|
|
|
1033
1701
|
"required": false;
|
|
1034
1702
|
"isSignal": true;
|
|
1035
1703
|
};
|
|
1036
|
-
"size": {
|
|
1037
|
-
"alias": "size";
|
|
1704
|
+
"size": {
|
|
1705
|
+
"alias": "size";
|
|
1706
|
+
"required": false;
|
|
1707
|
+
"isSignal": true;
|
|
1708
|
+
};
|
|
1709
|
+
"disabled": {
|
|
1710
|
+
"alias": "disabled";
|
|
1711
|
+
"required": false;
|
|
1712
|
+
"isSignal": true;
|
|
1713
|
+
};
|
|
1714
|
+
}, {}, never, never, true, never>;
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* Lê um número digitado em qualquer formato comum: "1.234,5", "1,234.5", "12,5", "12.5".
|
|
1718
|
+
* O último separador é o decimal. Devolve `null` se não houver número.
|
|
1719
|
+
*/
|
|
1720
|
+
export declare function zurParseNumber(text: string): number | null;
|
|
1721
|
+
/**
|
|
1722
|
+
* Campo numérico com botões − / +. Setas ↑↓ mudam por `step`, PageUp/PageDown por 10 passos,
|
|
1723
|
+
* Home/End vão a `min`/`max`. O valor é `number | null` e é limitado a `min`/`max`.
|
|
1724
|
+
*
|
|
1725
|
+
* ```html
|
|
1726
|
+
* <zur-number-input label="Quantidade" [min]="1" [max]="20" [(ngModel)]="qtd" />
|
|
1727
|
+
* ```
|
|
1728
|
+
*/
|
|
1729
|
+
export declare class ZurNumberInput implements ControlValueAccessor {
|
|
1730
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1731
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1732
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
1733
|
+
readonly hint: import("@angular/core").InputSignal<string>;
|
|
1734
|
+
readonly error: import("@angular/core").InputSignal<string>;
|
|
1735
|
+
readonly min: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
|
|
1736
|
+
readonly max: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
|
|
1737
|
+
readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1738
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1739
|
+
protected readonly id: string;
|
|
1740
|
+
readonly value: import("@angular/core").WritableSignal<number | null>;
|
|
1741
|
+
/** Texto enquanto o usuário digita; `null` = mostrar o valor formatado. */
|
|
1742
|
+
private readonly typed;
|
|
1743
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
1744
|
+
protected onChange: (value: number | null) => void;
|
|
1745
|
+
protected onTouched: () => void;
|
|
1746
|
+
protected readonly text: import("@angular/core").Signal<string>;
|
|
1747
|
+
protected readonly atMin: import("@angular/core").Signal<boolean>;
|
|
1748
|
+
protected readonly atMax: import("@angular/core").Signal<boolean>;
|
|
1749
|
+
protected isDisabled(): boolean;
|
|
1750
|
+
private clamp;
|
|
1751
|
+
private setValue;
|
|
1752
|
+
/** Soma `direction` passos (negativo diminui). Sem valor, parte do mínimo ou de zero. */
|
|
1753
|
+
stepBy(direction: number, multiplier?: number): void;
|
|
1754
|
+
protected onInput(event: Event): void;
|
|
1755
|
+
/** Converte o texto digitado em número (ao sair do campo ou com Enter). */
|
|
1756
|
+
protected commit(): void;
|
|
1757
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
1758
|
+
writeValue(value: number | null): void;
|
|
1759
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
1760
|
+
registerOnTouched(fn: () => void): void;
|
|
1761
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1762
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurNumberInput, never>;
|
|
1763
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurNumberInput, "zur-number-input", never, {
|
|
1764
|
+
"label": {
|
|
1765
|
+
"alias": "label";
|
|
1766
|
+
"required": false;
|
|
1767
|
+
"isSignal": true;
|
|
1768
|
+
};
|
|
1769
|
+
"placeholder": {
|
|
1770
|
+
"alias": "placeholder";
|
|
1771
|
+
"required": false;
|
|
1772
|
+
"isSignal": true;
|
|
1773
|
+
};
|
|
1774
|
+
"hint": {
|
|
1775
|
+
"alias": "hint";
|
|
1776
|
+
"required": false;
|
|
1777
|
+
"isSignal": true;
|
|
1778
|
+
};
|
|
1779
|
+
"error": {
|
|
1780
|
+
"alias": "error";
|
|
1781
|
+
"required": false;
|
|
1782
|
+
"isSignal": true;
|
|
1783
|
+
};
|
|
1784
|
+
"min": {
|
|
1785
|
+
"alias": "min";
|
|
1786
|
+
"required": false;
|
|
1787
|
+
"isSignal": true;
|
|
1788
|
+
};
|
|
1789
|
+
"max": {
|
|
1790
|
+
"alias": "max";
|
|
1791
|
+
"required": false;
|
|
1792
|
+
"isSignal": true;
|
|
1793
|
+
};
|
|
1794
|
+
"step": {
|
|
1795
|
+
"alias": "step";
|
|
1796
|
+
"required": false;
|
|
1797
|
+
"isSignal": true;
|
|
1798
|
+
};
|
|
1799
|
+
"disabled": {
|
|
1800
|
+
"alias": "disabled";
|
|
1801
|
+
"required": false;
|
|
1802
|
+
"isSignal": true;
|
|
1803
|
+
};
|
|
1804
|
+
}, {}, never, never, true, never>;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* Código de verificação em caixinhas (SMS, e-mail, 2FA). Digitar avança, Backspace volta,
|
|
1808
|
+
* ←/→ andam entre as caixas e colar distribui os caracteres. O valor é a string digitada;
|
|
1809
|
+
* `completed` dispara quando todas as caixas estão preenchidas. As caixas sempre seguem a
|
|
1810
|
+
* ordem esquerda→direita, mesmo em páginas RTL (números não se invertem).
|
|
1811
|
+
*
|
|
1812
|
+
* ```html
|
|
1813
|
+
* <zur-otp-input label="Código enviado por SMS" [length]="6" (completed)="verificar($event)" />
|
|
1814
|
+
* ```
|
|
1815
|
+
*/
|
|
1816
|
+
export declare class ZurOtpInput implements ControlValueAccessor {
|
|
1817
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1818
|
+
private readonly host;
|
|
1819
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1820
|
+
readonly hint: import("@angular/core").InputSignal<string>;
|
|
1821
|
+
readonly error: import("@angular/core").InputSignal<string>;
|
|
1822
|
+
readonly length: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1823
|
+
/** `numeric` aceita só dígitos; `text` aceita letras e números. */
|
|
1824
|
+
readonly mode: import("@angular/core").InputSignal<"text" | "numeric">;
|
|
1825
|
+
/** Esconde os caracteres como numa senha. */
|
|
1826
|
+
readonly masked: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1827
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1828
|
+
/** Todas as caixas preenchidas: emite o código. */
|
|
1829
|
+
readonly completed: import("@angular/core").OutputEmitterRef<string>;
|
|
1830
|
+
protected readonly id: string;
|
|
1831
|
+
private readonly chars;
|
|
1832
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
1833
|
+
protected readonly boxes: import("@angular/core").Signal<string[]>;
|
|
1834
|
+
readonly value: import("@angular/core").Signal<string>;
|
|
1835
|
+
protected onChange: (value: string) => void;
|
|
1836
|
+
protected onTouched: () => void;
|
|
1837
|
+
protected isDisabled(): boolean;
|
|
1838
|
+
private accept;
|
|
1839
|
+
private focusBox;
|
|
1840
|
+
/** Escreve `chars` a partir da caixa `start` e devolve a próxima caixa livre. */
|
|
1841
|
+
private fill;
|
|
1842
|
+
private emit;
|
|
1843
|
+
protected onInput(i: number, event: Event): void;
|
|
1844
|
+
protected onKeydown(i: number, event: KeyboardEvent): void;
|
|
1845
|
+
protected onPaste(event: ClipboardEvent): void;
|
|
1846
|
+
writeValue(value: string | null): void;
|
|
1847
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
1848
|
+
registerOnTouched(fn: () => void): void;
|
|
1849
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1850
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurOtpInput, never>;
|
|
1851
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurOtpInput, "zur-otp-input", never, {
|
|
1852
|
+
"label": {
|
|
1853
|
+
"alias": "label";
|
|
1854
|
+
"required": false;
|
|
1855
|
+
"isSignal": true;
|
|
1856
|
+
};
|
|
1857
|
+
"hint": {
|
|
1858
|
+
"alias": "hint";
|
|
1859
|
+
"required": false;
|
|
1860
|
+
"isSignal": true;
|
|
1861
|
+
};
|
|
1862
|
+
"error": {
|
|
1863
|
+
"alias": "error";
|
|
1864
|
+
"required": false;
|
|
1865
|
+
"isSignal": true;
|
|
1866
|
+
};
|
|
1867
|
+
"length": {
|
|
1868
|
+
"alias": "length";
|
|
1869
|
+
"required": false;
|
|
1870
|
+
"isSignal": true;
|
|
1871
|
+
};
|
|
1872
|
+
"mode": {
|
|
1873
|
+
"alias": "mode";
|
|
1874
|
+
"required": false;
|
|
1875
|
+
"isSignal": true;
|
|
1876
|
+
};
|
|
1877
|
+
"masked": {
|
|
1878
|
+
"alias": "masked";
|
|
1879
|
+
"required": false;
|
|
1880
|
+
"isSignal": true;
|
|
1881
|
+
};
|
|
1882
|
+
"disabled": {
|
|
1883
|
+
"alias": "disabled";
|
|
1884
|
+
"required": false;
|
|
1885
|
+
"isSignal": true;
|
|
1886
|
+
};
|
|
1887
|
+
}, {
|
|
1888
|
+
"completed": "completed";
|
|
1889
|
+
}, never, never, true, never>;
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* Avaliação por estrelas. Editável, é um `radiogroup` (setas trocam a nota) e funciona com
|
|
1893
|
+
* `ngModel`/formulários. Com `readonly`, é uma imagem com texto ("4,5 de 5") e aceita
|
|
1894
|
+
* valores fracionários. As estrelas são em ink (como no Airbnb): menta fica para ação.
|
|
1895
|
+
*
|
|
1896
|
+
* ```html
|
|
1897
|
+
* <zur-rating label="Sua nota" [(ngModel)]="nota" />
|
|
1898
|
+
* <zur-rating readonly [value]="4.5" />
|
|
1899
|
+
* ```
|
|
1900
|
+
*/
|
|
1901
|
+
export declare class ZurRating implements ControlValueAccessor {
|
|
1902
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1903
|
+
private readonly host;
|
|
1904
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1905
|
+
readonly max: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1906
|
+
readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg">;
|
|
1907
|
+
/** Só mostra a nota (aceita fração, ex.: 4,5). */
|
|
1908
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1909
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1910
|
+
/** Nota exibida no modo `readonly` quando não há formulário ligado. */
|
|
1911
|
+
readonly valueInput: import("@angular/core").InputSignalWithTransform<number | null, unknown>;
|
|
1912
|
+
protected readonly uid: string;
|
|
1913
|
+
protected readonly path = "M12 2.8l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.7 6.1 20.8l1.2-6.5L2.5 9.7l6.6-.9z";
|
|
1914
|
+
private readonly model;
|
|
1915
|
+
protected readonly hover: import("@angular/core").WritableSignal<number>;
|
|
1916
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
1917
|
+
protected onChange: (value: number) => void;
|
|
1918
|
+
protected onTouched: () => void;
|
|
1919
|
+
readonly value: import("@angular/core").Signal<number>;
|
|
1920
|
+
protected readonly stars: import("@angular/core").Signal<number[]>;
|
|
1921
|
+
protected readonly shown: import("@angular/core").Signal<number>;
|
|
1922
|
+
protected readonly summary: import("@angular/core").Signal<string>;
|
|
1923
|
+
protected isDisabled(): boolean;
|
|
1924
|
+
/** Quanto da estrela `n` é preenchido (0–1), para notas fracionárias. */
|
|
1925
|
+
protected fill(n: number): number;
|
|
1926
|
+
protected isTabStop(n: number): boolean;
|
|
1927
|
+
choose(n: number): void;
|
|
1928
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
1929
|
+
writeValue(value: number | null): void;
|
|
1930
|
+
registerOnChange(fn: (value: number) => void): void;
|
|
1931
|
+
registerOnTouched(fn: () => void): void;
|
|
1932
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1933
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurRating, never>;
|
|
1934
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurRating, "zur-rating", never, {
|
|
1935
|
+
"label": {
|
|
1936
|
+
"alias": "label";
|
|
1937
|
+
"required": false;
|
|
1938
|
+
"isSignal": true;
|
|
1939
|
+
};
|
|
1940
|
+
"max": {
|
|
1941
|
+
"alias": "max";
|
|
1942
|
+
"required": false;
|
|
1943
|
+
"isSignal": true;
|
|
1944
|
+
};
|
|
1945
|
+
"size": {
|
|
1946
|
+
"alias": "size";
|
|
1947
|
+
"required": false;
|
|
1948
|
+
"isSignal": true;
|
|
1949
|
+
};
|
|
1950
|
+
"readonly": {
|
|
1951
|
+
"alias": "readonly";
|
|
1952
|
+
"required": false;
|
|
1953
|
+
"isSignal": true;
|
|
1954
|
+
};
|
|
1955
|
+
"disabled": {
|
|
1956
|
+
"alias": "disabled";
|
|
1957
|
+
"required": false;
|
|
1958
|
+
"isSignal": true;
|
|
1959
|
+
};
|
|
1960
|
+
"valueInput": {
|
|
1961
|
+
"alias": "value";
|
|
1962
|
+
"required": false;
|
|
1963
|
+
"isSignal": true;
|
|
1964
|
+
};
|
|
1965
|
+
}, {}, never, never, true, never>;
|
|
1966
|
+
}
|
|
1967
|
+
interface Column {
|
|
1968
|
+
id: 'hour' | 'minute' | 'period';
|
|
1969
|
+
label: string;
|
|
1970
|
+
options: {
|
|
1971
|
+
value: number;
|
|
1972
|
+
label: string;
|
|
1973
|
+
disabled: boolean;
|
|
1974
|
+
selected: boolean;
|
|
1975
|
+
}[];
|
|
1976
|
+
}
|
|
1977
|
+
/** `'14:30'` → minutos desde meia-noite (ou `null` se inválido). */
|
|
1978
|
+
export declare function zurTimeToMinutes(time: string | null | undefined): number | null;
|
|
1979
|
+
/**
|
|
1980
|
+
* Seletor de horário: campo que abre um painel com listas de horas e minutos (e AM/PM
|
|
1981
|
+
* quando o idioma usa 12 horas). O valor é `'HH:mm'` (24h), em formulários ou `ngModel`.
|
|
1982
|
+
* Teclado: ↑↓ dentro da lista, ←→ entre listas, Enter/Espaço escolhe, Esc fecha.
|
|
1983
|
+
*
|
|
1984
|
+
* ```html
|
|
1985
|
+
* <zur-time-picker label="Retirada" min="09:00" max="18:00" [minuteStep]="15" [(ngModel)]="hora" />
|
|
1986
|
+
* ```
|
|
1987
|
+
*/
|
|
1988
|
+
export declare class ZurTimePicker implements ControlValueAccessor {
|
|
1989
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1990
|
+
private readonly host;
|
|
1991
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
1992
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
1993
|
+
readonly hint: import("@angular/core").InputSignal<string>;
|
|
1994
|
+
readonly error: import("@angular/core").InputSignal<string>;
|
|
1995
|
+
/** Intervalo entre os minutos listados (padrão 5). */
|
|
1996
|
+
readonly minuteStep: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1997
|
+
/** Menor e maior horário aceitos, em `'HH:mm'`. */
|
|
1998
|
+
readonly min: import("@angular/core").InputSignal<string | null | undefined>;
|
|
1999
|
+
readonly max: import("@angular/core").InputSignal<string | null | undefined>;
|
|
2000
|
+
/** `null` = decide pelo idioma (en-US usa 12h, pt-BR usa 24h). */
|
|
2001
|
+
readonly hour12: import("@angular/core").InputSignal<boolean | null>;
|
|
2002
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2003
|
+
protected readonly id: string;
|
|
2004
|
+
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
2005
|
+
private readonly hour;
|
|
2006
|
+
private readonly minute;
|
|
2007
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
2008
|
+
protected onChange: (value: string | null) => void;
|
|
2009
|
+
protected onTouched: () => void;
|
|
2010
|
+
protected readonly is12h: import("@angular/core").Signal<boolean>;
|
|
2011
|
+
/** Valor no formato do formulário, ou `null` enquanto incompleto. */
|
|
2012
|
+
readonly value: import("@angular/core").Signal<string | null>;
|
|
2013
|
+
protected readonly display: import("@angular/core").Signal<string>;
|
|
2014
|
+
private inRange;
|
|
2015
|
+
protected readonly columns: import("@angular/core").Signal<Column[]>;
|
|
2016
|
+
protected isDisabled(): boolean;
|
|
2017
|
+
/** O item escolhido (ou o primeiro) de cada lista recebe o Tab. */
|
|
2018
|
+
protected isTabStop(col: Column, index: number): boolean;
|
|
2019
|
+
toggle(): void;
|
|
2020
|
+
private show;
|
|
2021
|
+
close(returnFocus?: boolean): void;
|
|
2022
|
+
protected pick(column: Column['id'], value: number): void;
|
|
2023
|
+
private firstValidMinute;
|
|
2024
|
+
private firstValidHour;
|
|
2025
|
+
protected onKeydown(event: KeyboardEvent, c: number, o: number): void;
|
|
2026
|
+
protected onDocumentClick(event: MouseEvent): void;
|
|
2027
|
+
writeValue(value: string | null): void;
|
|
2028
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
2029
|
+
registerOnTouched(fn: () => void): void;
|
|
2030
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2031
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTimePicker, never>;
|
|
2032
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTimePicker, "zur-time-picker", never, {
|
|
2033
|
+
"label": {
|
|
2034
|
+
"alias": "label";
|
|
2035
|
+
"required": false;
|
|
2036
|
+
"isSignal": true;
|
|
2037
|
+
};
|
|
2038
|
+
"placeholder": {
|
|
2039
|
+
"alias": "placeholder";
|
|
2040
|
+
"required": false;
|
|
2041
|
+
"isSignal": true;
|
|
2042
|
+
};
|
|
2043
|
+
"hint": {
|
|
2044
|
+
"alias": "hint";
|
|
2045
|
+
"required": false;
|
|
2046
|
+
"isSignal": true;
|
|
2047
|
+
};
|
|
2048
|
+
"error": {
|
|
2049
|
+
"alias": "error";
|
|
2050
|
+
"required": false;
|
|
2051
|
+
"isSignal": true;
|
|
2052
|
+
};
|
|
2053
|
+
"minuteStep": {
|
|
2054
|
+
"alias": "minuteStep";
|
|
2055
|
+
"required": false;
|
|
2056
|
+
"isSignal": true;
|
|
2057
|
+
};
|
|
2058
|
+
"min": {
|
|
2059
|
+
"alias": "min";
|
|
2060
|
+
"required": false;
|
|
2061
|
+
"isSignal": true;
|
|
2062
|
+
};
|
|
2063
|
+
"max": {
|
|
2064
|
+
"alias": "max";
|
|
2065
|
+
"required": false;
|
|
2066
|
+
"isSignal": true;
|
|
2067
|
+
};
|
|
2068
|
+
"hour12": {
|
|
2069
|
+
"alias": "hour12";
|
|
2070
|
+
"required": false;
|
|
2071
|
+
"isSignal": true;
|
|
2072
|
+
};
|
|
2073
|
+
"disabled": {
|
|
2074
|
+
"alias": "disabled";
|
|
2075
|
+
"required": false;
|
|
2076
|
+
"isSignal": true;
|
|
2077
|
+
};
|
|
2078
|
+
}, {}, never, never, true, never>;
|
|
2079
|
+
}
|
|
2080
|
+
/**
|
|
2081
|
+
* Navbar 80px — canvas com hairline inferior (Airbnb top-nav).
|
|
2082
|
+
* Slots: [zurNavbarLogo], [zurNavbarLinks], [zurNavbarActions].
|
|
2083
|
+
* Hospeda o <zur-theme-toggle> no slot de ações.
|
|
2084
|
+
*/
|
|
2085
|
+
export declare class ZurNavbar {
|
|
2086
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurNavbar, never>;
|
|
2087
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurNavbar, "zur-navbar", never, {}, {}, never, ["[zurNavbarLogo]", "[zurNavbarLinks]", "[zurNavbarActions]"], true, never>;
|
|
2088
|
+
}
|
|
2089
|
+
/** Painel individual dentro de <zur-tabs>. */
|
|
2090
|
+
export declare class ZurTab {
|
|
2091
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2092
|
+
readonly active: import("@angular/core").WritableSignal<boolean>;
|
|
2093
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTab, never>;
|
|
2094
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTab, "zur-tab", never, {
|
|
2095
|
+
"label": {
|
|
2096
|
+
"alias": "label";
|
|
2097
|
+
"required": true;
|
|
2098
|
+
"isSignal": true;
|
|
2099
|
+
};
|
|
2100
|
+
}, {}, never, ["*"], true, never>;
|
|
2101
|
+
}
|
|
2102
|
+
/** Tabs com sublinhado 2px ink na aba ativa (Airbnb product-tabs). */
|
|
2103
|
+
export declare class ZurTabs {
|
|
2104
|
+
readonly index: import("@angular/core").ModelSignal<number>;
|
|
2105
|
+
protected readonly tabs: import("@angular/core").Signal<readonly ZurTab[]>;
|
|
2106
|
+
constructor();
|
|
2107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTabs, never>;
|
|
2108
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTabs, "zur-tabs", never, {
|
|
2109
|
+
"index": {
|
|
2110
|
+
"alias": "index";
|
|
2111
|
+
"required": false;
|
|
2112
|
+
"isSignal": true;
|
|
2113
|
+
};
|
|
2114
|
+
}, {
|
|
2115
|
+
"index": "indexChange";
|
|
2116
|
+
}, ["tabs"], ["*"], true, never>;
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* Barra de navegação inferior para celular: de 3 a 5 destinos principais, cada um com ícone e
|
|
2120
|
+
* rótulo. Respeita a área segura do aparelho (`safe-area-inset-bottom`). Por padrão fica fixa na
|
|
2121
|
+
* base da tela e some a partir de 768 px, onde a sidebar ou a navbar assumem.
|
|
2122
|
+
*
|
|
2123
|
+
* ```html
|
|
2124
|
+
* <zur-bottom-nav label="Navegação principal">
|
|
2125
|
+
* <a zur-bottom-nav-item href="/" active>
|
|
2126
|
+
* <zur-icon zurBottomNavIcon [icon]="casa" /> Início
|
|
2127
|
+
* </a>
|
|
2128
|
+
* <a zur-bottom-nav-item href="/pedidos" [badge]="3">
|
|
2129
|
+
* <zur-icon zurBottomNavIcon [icon]="sino" /> Pedidos
|
|
2130
|
+
* </a>
|
|
2131
|
+
* </zur-bottom-nav>
|
|
2132
|
+
* ```
|
|
2133
|
+
*/
|
|
2134
|
+
export declare class ZurBottomNav {
|
|
2135
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2136
|
+
/** Nome acessível da região; sem ele usa "Navegação inferior". */
|
|
2137
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2138
|
+
/** Fixa na base da tela. Desligue para posicionar você mesmo. */
|
|
2139
|
+
readonly fixed: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2140
|
+
/** Esconde a barra a partir de 768 px. Desligue para mostrá-la em qualquer largura. */
|
|
2141
|
+
readonly responsive: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2142
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurBottomNav, never>;
|
|
2143
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurBottomNav, "zur-bottom-nav", never, {
|
|
2144
|
+
"label": {
|
|
2145
|
+
"alias": "label";
|
|
2146
|
+
"required": false;
|
|
2147
|
+
"isSignal": true;
|
|
2148
|
+
};
|
|
2149
|
+
"fixed": {
|
|
2150
|
+
"alias": "fixed";
|
|
2151
|
+
"required": false;
|
|
2152
|
+
"isSignal": true;
|
|
2153
|
+
};
|
|
2154
|
+
"responsive": {
|
|
2155
|
+
"alias": "responsive";
|
|
2156
|
+
"required": false;
|
|
2157
|
+
"isSignal": true;
|
|
2158
|
+
};
|
|
2159
|
+
}, {}, never, ["*"], true, never>;
|
|
2160
|
+
}
|
|
2161
|
+
/**
|
|
2162
|
+
* Destino da barra inferior: um `<a>` ou `<button>`. `active` marca a página atual
|
|
2163
|
+
* (`aria-current="page"`) e `badge` mostra um número, ou um ponto com `"dot"`.
|
|
2164
|
+
*/
|
|
2165
|
+
export declare class ZurBottomNavItem {
|
|
2166
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2167
|
+
readonly active: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2168
|
+
/** Número de novidades, ou `"dot"` para só um ponto. */
|
|
2169
|
+
readonly badge: import("@angular/core").InputSignal<number | "dot" | null>;
|
|
2170
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurBottomNavItem, never>;
|
|
2171
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurBottomNavItem, "a[zur-bottom-nav-item], button[zur-bottom-nav-item]", never, {
|
|
2172
|
+
"active": {
|
|
2173
|
+
"alias": "active";
|
|
2174
|
+
"required": false;
|
|
2175
|
+
"isSignal": true;
|
|
2176
|
+
};
|
|
2177
|
+
"badge": {
|
|
2178
|
+
"alias": "badge";
|
|
2179
|
+
"required": false;
|
|
2180
|
+
"isSignal": true;
|
|
2181
|
+
};
|
|
2182
|
+
}, {}, never, ["[zurBottomNavIcon]", "*"], true, never>;
|
|
2183
|
+
}
|
|
2184
|
+
/** Item clicável dentro de <zur-menu>. */
|
|
2185
|
+
export declare class ZurMenuItem {
|
|
2186
|
+
readonly selected: import("@angular/core").OutputEmitterRef<void>;
|
|
2187
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurMenuItem, never>;
|
|
2188
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurMenuItem, "zur-menu-item", never, {}, {
|
|
2189
|
+
"selected": "selected";
|
|
2190
|
+
}, never, ["*"], true, never>;
|
|
2191
|
+
}
|
|
2192
|
+
/**
|
|
2193
|
+
* Menu dropdown — gatilho via slot [zurMenuTrigger], painel no tier
|
|
2194
|
+
* único de sombra. Fecha ao clicar fora ou pressionar ESC.
|
|
2195
|
+
*/
|
|
2196
|
+
export declare class ZurMenu {
|
|
2197
|
+
private readonly host;
|
|
2198
|
+
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
2199
|
+
toggle(): void;
|
|
2200
|
+
close(): void;
|
|
2201
|
+
protected onDocumentClick(event: MouseEvent): void;
|
|
2202
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurMenu, never>;
|
|
2203
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurMenu, "zur-menu", never, {}, {}, never, ["[zurMenuTrigger]", "*"], true, never>;
|
|
2204
|
+
}
|
|
2205
|
+
export interface ZurBreadcrumbItem {
|
|
2206
|
+
label: string;
|
|
2207
|
+
href?: string;
|
|
2208
|
+
}
|
|
2209
|
+
/** Breadcrumb em caption muted com separador "/". */
|
|
2210
|
+
export declare class ZurBreadcrumb {
|
|
2211
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2212
|
+
readonly items: import("@angular/core").InputSignal<ZurBreadcrumbItem[]>;
|
|
2213
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurBreadcrumb, never>;
|
|
2214
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurBreadcrumb, "zur-breadcrumb", never, {
|
|
2215
|
+
"items": {
|
|
2216
|
+
"alias": "items";
|
|
2217
|
+
"required": false;
|
|
2218
|
+
"isSignal": true;
|
|
2219
|
+
};
|
|
2220
|
+
}, {}, never, never, true, never>;
|
|
2221
|
+
}
|
|
2222
|
+
export type ZurSidenavItemLevel = 'primary' | 'secondary';
|
|
2223
|
+
/**
|
|
2224
|
+
* Navegação lateral do Zuri. Agrupa links (`zur-sidenav-item`) e rótulos de
|
|
2225
|
+
* seção (`zur-sidenav-label`).
|
|
2226
|
+
*
|
|
2227
|
+
* ```html
|
|
2228
|
+
* <zur-sidenav aria-label="Principal">
|
|
2229
|
+
* <a zur-sidenav-item routerLink="/" routerLinkActive="active">Home</a>
|
|
2230
|
+
* </zur-sidenav>
|
|
2231
|
+
* ```
|
|
2232
|
+
*/
|
|
2233
|
+
export declare class ZurSidenav {
|
|
2234
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSidenav, never>;
|
|
2235
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSidenav, "zur-sidenav", never, {}, {}, never, ["*"], true, never>;
|
|
2236
|
+
}
|
|
2237
|
+
/**
|
|
2238
|
+
* Item da navegação lateral, aplicado a `<a>` ou `<button>`.
|
|
2239
|
+
* Fica destacado (verde sólido) quando `active` é verdadeiro ou quando o
|
|
2240
|
+
* elemento recebe a classe `active` (ex.: via `routerLinkActive="active"`).
|
|
2241
|
+
*/
|
|
2242
|
+
export declare class ZurSidenavItem {
|
|
2243
|
+
private readonly shell;
|
|
2244
|
+
readonly level: import("@angular/core").InputSignal<ZurSidenavItemLevel>;
|
|
2245
|
+
readonly active: import("@angular/core").InputSignal<boolean>;
|
|
2246
|
+
/** `true` quando a sidebar do layout está recolhida (só ícones). */
|
|
2247
|
+
protected readonly collapsed: import("@angular/core").Signal<boolean>;
|
|
2248
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSidenavItem, never>;
|
|
2249
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSidenavItem, "a[zur-sidenav-item], button[zur-sidenav-item]", never, {
|
|
2250
|
+
"level": {
|
|
2251
|
+
"alias": "level";
|
|
2252
|
+
"required": false;
|
|
2253
|
+
"isSignal": true;
|
|
2254
|
+
};
|
|
2255
|
+
"active": {
|
|
2256
|
+
"alias": "active";
|
|
2257
|
+
"required": false;
|
|
2258
|
+
"isSignal": true;
|
|
2259
|
+
};
|
|
2260
|
+
}, {}, never, ["[zurSidenavIcon]", "*"], true, never>;
|
|
2261
|
+
}
|
|
2262
|
+
/** Rótulo de seção da navegação lateral (caption em caixa alta). */
|
|
2263
|
+
export declare class ZurSidenavLabel {
|
|
2264
|
+
private readonly shell;
|
|
2265
|
+
protected readonly collapsed: import("@angular/core").Signal<boolean>;
|
|
2266
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSidenavLabel, never>;
|
|
2267
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSidenavLabel, "zur-sidenav-label", never, {}, {}, never, ["*"], true, never>;
|
|
2268
|
+
}
|
|
2269
|
+
export type ZurTableDensity = 'comfortable' | 'compact';
|
|
2270
|
+
export type ZurSortDirection = 'asc' | 'desc';
|
|
2271
|
+
export interface ZurSort {
|
|
2272
|
+
key: string;
|
|
2273
|
+
direction: ZurSortDirection;
|
|
2274
|
+
}
|
|
2275
|
+
/** Texto de filtro de uma coluna (`value` vazio = sem filtro). */
|
|
2276
|
+
export interface ZurColumnFilterChange {
|
|
2277
|
+
key: string;
|
|
2278
|
+
value: string;
|
|
2279
|
+
}
|
|
2280
|
+
/** Largura nova de uma coluna redimensionada. */
|
|
2281
|
+
export interface ZurColumnResize {
|
|
2282
|
+
key: string;
|
|
2283
|
+
width: number;
|
|
2284
|
+
}
|
|
2285
|
+
/**
|
|
2286
|
+
* Estilo do Zuri para uma `<table>` nativa: cabeçalho em caption, linhas com
|
|
2287
|
+
* hairline, hover e densidade. A ordenação fica com você: marque as colunas com
|
|
2288
|
+
* `zurSortable` e reaja ao `sortChange`.
|
|
2289
|
+
*
|
|
2290
|
+
* ```html
|
|
2291
|
+
* <table zur-table (sortChange)="ordenar($event)">
|
|
2292
|
+
* <thead>
|
|
2293
|
+
* <tr><th zurSortable="nome">Nome</th><th>Produto</th></tr>
|
|
2294
|
+
* </thead>
|
|
2295
|
+
* <tbody>…</tbody>
|
|
2296
|
+
* </table>
|
|
2297
|
+
* ```
|
|
2298
|
+
*/
|
|
2299
|
+
export declare class ZurTable {
|
|
2300
|
+
/** Sem valor, segue a densidade da área (`zurDensity`) ou da página; senão é confortável. */
|
|
2301
|
+
readonly density: import("@angular/core").InputSignal<ZurTableDensity | null>;
|
|
2302
|
+
/** Emite a coluna e a direção sempre que o usuário ordena. */
|
|
2303
|
+
readonly sortChange: import("@angular/core").OutputEmitterRef<ZurSort>;
|
|
2304
|
+
readonly sort: import("@angular/core").WritableSignal<ZurSort | null>;
|
|
2305
|
+
/** Mantém o cabeçalho visível ao rolar (a tabela vai dentro de `.zur-table-scroll`). */
|
|
2306
|
+
readonly stickyHeader: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2307
|
+
/** Mantém a primeira coluna visível na rolagem horizontal. */
|
|
2308
|
+
readonly stickyFirstColumn: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2309
|
+
/** Emite a nova largura (px) quando uma coluna `zurResizable` é redimensionada. */
|
|
2310
|
+
readonly columnResize: import("@angular/core").OutputEmitterRef<ZurColumnResize>;
|
|
2311
|
+
/** `true` enquanto há um `tbody[zurTableSkeleton]` na tabela (marca `aria-busy`). */
|
|
2312
|
+
readonly busy: import("@angular/core").WritableSignal<boolean>;
|
|
2313
|
+
/** Quantidade de colunas redimensionáveis (liga `table-layout: fixed`). */
|
|
2314
|
+
readonly resizableCount: import("@angular/core").WritableSignal<number>;
|
|
2315
|
+
/** Ids das linhas selecionadas (two-way). Veja `tr[zurRow]`, `th[zurSelectAll]` e `td[zurSelect]`. */
|
|
2316
|
+
readonly selected: import("@angular/core").ModelSignal<string[]>;
|
|
2317
|
+
/** Emite quando o texto de filtro de uma coluna muda (`zur-column-filter`). */
|
|
2318
|
+
readonly filterChange: import("@angular/core").OutputEmitterRef<ZurColumnFilterChange>;
|
|
2319
|
+
/** Filtros ativos por coluna. */
|
|
2320
|
+
readonly filters: import("@angular/core").WritableSignal<Record<string, string>>;
|
|
2321
|
+
/** Linhas registradas (`tr[zurRow]`), na ordem em que aparecem. */
|
|
2322
|
+
readonly rowIds: import("@angular/core").WritableSignal<string[]>;
|
|
2323
|
+
readonly allSelected: import("@angular/core").Signal<boolean>;
|
|
2324
|
+
readonly someSelected: import("@angular/core").Signal<boolean>;
|
|
2325
|
+
registerRow(id: string): void;
|
|
2326
|
+
unregisterRow(id: string): void;
|
|
2327
|
+
isSelected(id: string): boolean;
|
|
2328
|
+
toggleRow(id: string): void;
|
|
2329
|
+
/** Marca todas as linhas (ou, se já estão todas marcadas, desmarca). */
|
|
2330
|
+
toggleAll(): void;
|
|
2331
|
+
setFilter(key: string, value: string): void;
|
|
2332
|
+
toggleSort(key: string): void;
|
|
2333
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTable, never>;
|
|
2334
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTable, "table[zur-table]", never, {
|
|
2335
|
+
"density": {
|
|
2336
|
+
"alias": "density";
|
|
2337
|
+
"required": false;
|
|
2338
|
+
"isSignal": true;
|
|
2339
|
+
};
|
|
2340
|
+
"stickyHeader": {
|
|
2341
|
+
"alias": "stickyHeader";
|
|
2342
|
+
"required": false;
|
|
2343
|
+
"isSignal": true;
|
|
2344
|
+
};
|
|
2345
|
+
"stickyFirstColumn": {
|
|
2346
|
+
"alias": "stickyFirstColumn";
|
|
2347
|
+
"required": false;
|
|
2348
|
+
"isSignal": true;
|
|
2349
|
+
};
|
|
2350
|
+
"selected": {
|
|
2351
|
+
"alias": "selected";
|
|
2352
|
+
"required": false;
|
|
2353
|
+
"isSignal": true;
|
|
2354
|
+
};
|
|
2355
|
+
}, {
|
|
2356
|
+
"sortChange": "sortChange";
|
|
2357
|
+
"columnResize": "columnResize";
|
|
2358
|
+
"selected": "selectedChange";
|
|
2359
|
+
"filterChange": "filterChange";
|
|
2360
|
+
}, never, ["*"], true, never>;
|
|
2361
|
+
}
|
|
2362
|
+
/** Torna um `<th>` ordenável dentro de `table[zur-table]`. O valor é a chave da coluna. */
|
|
2363
|
+
export declare class ZurSortable {
|
|
2364
|
+
protected readonly table: ZurTable;
|
|
2365
|
+
readonly zurSortable: import("@angular/core").InputSignal<string>;
|
|
2366
|
+
protected readonly ariaSort: import("@angular/core").Signal<"none" | "ascending" | "descending">;
|
|
2367
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSortable, never>;
|
|
2368
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSortable, "th[zurSortable]", never, {
|
|
2369
|
+
"zurSortable": {
|
|
2370
|
+
"alias": "zurSortable";
|
|
2371
|
+
"required": true;
|
|
2372
|
+
"isSignal": true;
|
|
2373
|
+
};
|
|
2374
|
+
}, {}, never, ["*", "zur-column-filter"], true, never>;
|
|
2375
|
+
}
|
|
2376
|
+
/**
|
|
2377
|
+
* Linha de dados identificada por `zurRow` (o id usado na seleção). Habilita a seleção por
|
|
2378
|
+
* checkbox, o "marcar todas" e a expansão. Use `#r="zurRow"` para ler `r.expanded()`.
|
|
2379
|
+
*
|
|
2380
|
+
* ```html
|
|
2381
|
+
* <tr [zurRow]="pedido.id" #r="zurRow">
|
|
2382
|
+
* <td zurSelect></td>
|
|
2383
|
+
* <td><button zurExpandToggle></button></td>
|
|
2384
|
+
* <td>{{ pedido.cliente }}</td>
|
|
2385
|
+
* </tr>
|
|
2386
|
+
* @if (r.expanded()) { <tr class="zur-row-detail"><td colspan="3">Detalhes…</td></tr> }
|
|
2387
|
+
* ```
|
|
2388
|
+
*/
|
|
2389
|
+
export declare class ZurTableRow {
|
|
2390
|
+
private readonly table;
|
|
2391
|
+
readonly zurRow: import("@angular/core").InputSignal<string>;
|
|
2392
|
+
readonly expanded: import("@angular/core").ModelSignal<boolean>;
|
|
2393
|
+
readonly selected: import("@angular/core").Signal<boolean>;
|
|
2394
|
+
constructor();
|
|
2395
|
+
toggle(): void;
|
|
2396
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTableRow, never>;
|
|
2397
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ZurTableRow, "tr[zurRow]", ["zurRow"], {
|
|
2398
|
+
"zurRow": {
|
|
2399
|
+
"alias": "zurRow";
|
|
2400
|
+
"required": true;
|
|
2401
|
+
"isSignal": true;
|
|
2402
|
+
};
|
|
2403
|
+
"expanded": {
|
|
2404
|
+
"alias": "expanded";
|
|
2405
|
+
"required": false;
|
|
2406
|
+
"isSignal": true;
|
|
2407
|
+
};
|
|
2408
|
+
}, {
|
|
2409
|
+
"expanded": "expandedChange";
|
|
2410
|
+
}, never, never, true, never>;
|
|
2411
|
+
}
|
|
2412
|
+
/** Checkbox de seleção da linha, dentro de `tr[zurRow]`. */
|
|
2413
|
+
export declare class ZurRowSelect {
|
|
2414
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2415
|
+
protected readonly table: ZurTable;
|
|
2416
|
+
protected readonly row: ZurTableRow;
|
|
2417
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurRowSelect, never>;
|
|
2418
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurRowSelect, "td[zurSelect]", never, {}, {}, never, never, true, never>;
|
|
2419
|
+
}
|
|
2420
|
+
/** Checkbox "selecionar todas" do cabeçalho, com estado indeterminado. */
|
|
2421
|
+
export declare class ZurSelectAll {
|
|
2422
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2423
|
+
protected readonly table: ZurTable;
|
|
2424
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSelectAll, never>;
|
|
2425
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSelectAll, "th[zurSelectAll]", never, {}, {}, never, never, true, never>;
|
|
2426
|
+
}
|
|
2427
|
+
/** Botão que abre e fecha os detalhes da linha (`tr[zurRow]`). */
|
|
2428
|
+
export declare class ZurExpandToggle {
|
|
2429
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2430
|
+
protected readonly row: ZurTableRow;
|
|
2431
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurExpandToggle, never>;
|
|
2432
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurExpandToggle, "button[zurExpandToggle]", never, {}, {}, never, never, true, never>;
|
|
2433
|
+
}
|
|
2434
|
+
/**
|
|
2435
|
+
* Botão de filtro para o cabeçalho de uma coluna. Abre um painel com um campo de texto e
|
|
2436
|
+
* emite `filterChange` na tabela (depois de uma pausa ao digitar, ou no Enter); filtrar as
|
|
2437
|
+
* linhas é com você. Dentro de uma coluna ordenável, fica ao lado do botão de ordenar.
|
|
2438
|
+
*
|
|
2439
|
+
* ```html
|
|
2440
|
+
* <th zurSortable="cliente">Cliente <zur-column-filter key="cliente" /></th>
|
|
2441
|
+
* ```
|
|
2442
|
+
*/
|
|
2443
|
+
export declare class ZurColumnFilter {
|
|
2444
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2445
|
+
private readonly table;
|
|
2446
|
+
private readonly host;
|
|
2447
|
+
private timer;
|
|
2448
|
+
/** Chave da coluna, a mesma enviada no `filterChange`. */
|
|
2449
|
+
readonly key: import("@angular/core").InputSignal<string>;
|
|
2450
|
+
/** Nome da coluna para leitores de tela; padrão: o texto do cabeçalho. */
|
|
2451
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2452
|
+
/** Pausa (ms) depois da digitação antes de emitir. */
|
|
2453
|
+
readonly debounce: import("@angular/core").InputSignal<number>;
|
|
2454
|
+
/** Texto digitado agora (ainda pode não ter sido emitido). */
|
|
2455
|
+
private readonly draft;
|
|
2456
|
+
protected readonly value: import("@angular/core").Signal<string>;
|
|
2457
|
+
constructor();
|
|
2458
|
+
protected name(): string;
|
|
2459
|
+
protected onInput(event: Event): void;
|
|
2460
|
+
protected flush(): void;
|
|
2461
|
+
protected clear(): void;
|
|
2462
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurColumnFilter, never>;
|
|
2463
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurColumnFilter, "zur-column-filter", never, {
|
|
2464
|
+
"key": {
|
|
2465
|
+
"alias": "key";
|
|
2466
|
+
"required": true;
|
|
2467
|
+
"isSignal": true;
|
|
2468
|
+
};
|
|
2469
|
+
"label": {
|
|
2470
|
+
"alias": "label";
|
|
2471
|
+
"required": false;
|
|
2472
|
+
"isSignal": true;
|
|
2473
|
+
};
|
|
2474
|
+
"debounce": {
|
|
2475
|
+
"alias": "debounce";
|
|
2476
|
+
"required": false;
|
|
2477
|
+
"isSignal": true;
|
|
2478
|
+
};
|
|
2479
|
+
}, {}, never, never, true, never>;
|
|
2480
|
+
}
|
|
2481
|
+
export interface ZurTableColumn {
|
|
2482
|
+
key: string;
|
|
2483
|
+
label: string;
|
|
2484
|
+
}
|
|
2485
|
+
/**
|
|
2486
|
+
* Menu para mostrar e ocultar colunas da tabela. `visible` (two-way) tem as chaves
|
|
2487
|
+
* das colunas à mostra; renderizar ou não cada coluna é com você. Nunca deixa a tabela
|
|
2488
|
+
* sem nenhuma coluna.
|
|
2489
|
+
*
|
|
2490
|
+
* ```html
|
|
2491
|
+
* <zur-column-menu [columns]="colunas" [(visible)]="visiveis" />
|
|
2492
|
+
* <th>…</th> @if (visiveis().includes('produto')) { <th>Produto</th> }
|
|
2493
|
+
* ```
|
|
2494
|
+
*/
|
|
2495
|
+
export declare class ZurColumnMenu {
|
|
2496
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2497
|
+
readonly columns: import("@angular/core").InputSignal<ZurTableColumn[]>;
|
|
2498
|
+
/** Chaves das colunas visíveis (two-way). */
|
|
2499
|
+
readonly visible: import("@angular/core").ModelSignal<string[]>;
|
|
2500
|
+
private readonly onlyOne;
|
|
2501
|
+
protected isLast(key: string): boolean;
|
|
2502
|
+
protected toggle(key: string, on: boolean): void;
|
|
2503
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurColumnMenu, never>;
|
|
2504
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurColumnMenu, "zur-column-menu", never, {
|
|
2505
|
+
"columns": {
|
|
2506
|
+
"alias": "columns";
|
|
2507
|
+
"required": false;
|
|
2508
|
+
"isSignal": true;
|
|
2509
|
+
};
|
|
2510
|
+
"visible": {
|
|
2511
|
+
"alias": "visible";
|
|
2512
|
+
"required": false;
|
|
2513
|
+
"isSignal": true;
|
|
2514
|
+
};
|
|
2515
|
+
}, {
|
|
2516
|
+
"visible": "visibleChange";
|
|
2517
|
+
}, never, never, true, never>;
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* Torna a coluna redimensionável: uma alça no fim da célula do cabeçalho arrasta com o mouse ou o
|
|
2521
|
+
* toque e também funciona pelo teclado (←/→ mudam 8 px, com Shift 32 px). O valor é a chave da
|
|
2522
|
+
* coluna; a largura nova sai em `columnResize` da tabela. Convive com `zurSortable`.
|
|
2523
|
+
*
|
|
2524
|
+
* ```html
|
|
2525
|
+
* <th zurSortable="nome" zurResizable="nome">Nome</th>
|
|
2526
|
+
* ```
|
|
2527
|
+
*/
|
|
2528
|
+
export declare class ZurResizable {
|
|
2529
|
+
private readonly table;
|
|
2530
|
+
private readonly i18n;
|
|
2531
|
+
private readonly el;
|
|
2532
|
+
private readonly renderer;
|
|
2533
|
+
private readonly injector;
|
|
2534
|
+
readonly zurResizable: import("@angular/core").InputSignal<string>;
|
|
2535
|
+
readonly minWidth: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2536
|
+
readonly maxWidth: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2537
|
+
private handle;
|
|
2538
|
+
constructor();
|
|
2539
|
+
private clamp;
|
|
2540
|
+
private apply;
|
|
2541
|
+
private createHandle;
|
|
2542
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurResizable, never>;
|
|
2543
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ZurResizable, "th[zurResizable]", never, {
|
|
2544
|
+
"zurResizable": {
|
|
2545
|
+
"alias": "zurResizable";
|
|
2546
|
+
"required": true;
|
|
2547
|
+
"isSignal": true;
|
|
2548
|
+
};
|
|
2549
|
+
"minWidth": {
|
|
2550
|
+
"alias": "minWidth";
|
|
2551
|
+
"required": false;
|
|
2552
|
+
"isSignal": true;
|
|
2553
|
+
};
|
|
2554
|
+
"maxWidth": {
|
|
2555
|
+
"alias": "maxWidth";
|
|
2556
|
+
"required": false;
|
|
2557
|
+
"isSignal": true;
|
|
2558
|
+
};
|
|
2559
|
+
}, {}, never, never, true, never>;
|
|
2560
|
+
}
|
|
2561
|
+
/**
|
|
2562
|
+
* Barra acima da tabela. Em repouso mostra o que você projetar (busca, filtros, botão de
|
|
2563
|
+
* exportar); com linhas selecionadas (`[selectedCount]`) troca para a barra de lote: contagem, as
|
|
2564
|
+
* ações de `[zurTableToolbarBatch]` e "Limpar seleção". A contagem é anunciada para leitores de tela.
|
|
2565
|
+
*
|
|
2566
|
+
* ```html
|
|
2567
|
+
* <zur-table-toolbar [selectedCount]="marcadas().length" (clearSelection)="marcadas.set([])">
|
|
2568
|
+
* <zur-search label="Buscar pedidos" />
|
|
2569
|
+
* <button zurTableToolbarBatch zur-button size="sm" variant="danger">Excluir</button>
|
|
2570
|
+
* </zur-table-toolbar>
|
|
2571
|
+
* ```
|
|
2572
|
+
*/
|
|
2573
|
+
export declare class ZurTableToolbar {
|
|
2574
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2575
|
+
/** Linhas selecionadas; maior que zero liga a barra de lote. */
|
|
2576
|
+
readonly selectedCount: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2577
|
+
readonly clearSelection: import("@angular/core").OutputEmitterRef<void>;
|
|
2578
|
+
protected readonly batch: import("@angular/core").Signal<boolean>;
|
|
2579
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTableToolbar, never>;
|
|
2580
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTableToolbar, "zur-table-toolbar", never, {
|
|
2581
|
+
"selectedCount": {
|
|
2582
|
+
"alias": "selectedCount";
|
|
2583
|
+
"required": false;
|
|
2584
|
+
"isSignal": true;
|
|
2585
|
+
};
|
|
2586
|
+
}, {
|
|
2587
|
+
"clearSelection": "clearSelection";
|
|
2588
|
+
}, never, ["[zurTableToolbarBatch]", "*"], true, never>;
|
|
2589
|
+
}
|
|
2590
|
+
/**
|
|
2591
|
+
* Corpo de carregamento: `rows` linhas de `columns` células em skeleton, e a tabela fica com
|
|
2592
|
+
* `aria-busy` e um aviso "Carregando dados" para leitores de tela. Troque pelo `tbody` real
|
|
2593
|
+
* quando os dados chegarem.
|
|
2594
|
+
*
|
|
2595
|
+
* ```html
|
|
2596
|
+
* @if (carregando()) { <tbody zurTableSkeleton [rows]="5" [columns]="4"></tbody> } @else { <tbody>…</tbody> }
|
|
2597
|
+
* ```
|
|
2598
|
+
*/
|
|
2599
|
+
export declare class ZurTableSkeleton {
|
|
2600
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2601
|
+
private readonly table;
|
|
2602
|
+
readonly rows: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2603
|
+
readonly columns: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2604
|
+
protected readonly widths: string[];
|
|
2605
|
+
protected readonly rowList: import("@angular/core").Signal<number[]>;
|
|
2606
|
+
protected readonly colList: import("@angular/core").Signal<number[]>;
|
|
2607
|
+
constructor();
|
|
2608
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTableSkeleton, never>;
|
|
2609
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTableSkeleton, "tbody[zurTableSkeleton]", never, {
|
|
2610
|
+
"rows": {
|
|
2611
|
+
"alias": "rows";
|
|
2612
|
+
"required": false;
|
|
2613
|
+
"isSignal": true;
|
|
2614
|
+
};
|
|
2615
|
+
"columns": {
|
|
2616
|
+
"alias": "columns";
|
|
1038
2617
|
"required": false;
|
|
1039
2618
|
"isSignal": true;
|
|
1040
2619
|
};
|
|
1041
|
-
|
|
1042
|
-
|
|
2620
|
+
}, {}, never, never, true, never>;
|
|
2621
|
+
}
|
|
2622
|
+
export type ZurChartType = 'bar' | 'line' | 'area' | 'donut';
|
|
2623
|
+
export interface ZurChartSeries {
|
|
2624
|
+
name: string;
|
|
2625
|
+
values: number[];
|
|
2626
|
+
}
|
|
2627
|
+
/** Cores categóricas em ordem fixa: tokens `--zur-chart-1..6` (nunca cíclicas). */
|
|
2628
|
+
export declare const ZUR_CHART_MAX_SERIES = 6;
|
|
2629
|
+
/** Valores "redondos" para o eixo: 0, 20, 40, 60… em vez de 0, 17, 34… */
|
|
2630
|
+
export declare function zurNiceTicks(max: number, count?: number): number[];
|
|
2631
|
+
/** Retângulo com os cantos de cima arredondados e a base reta (a barra "cresce" da linha de base). */
|
|
2632
|
+
export declare function zurBarPath(x: number, y: number, w: number, h: number, radius: number): string;
|
|
2633
|
+
interface TooltipRow {
|
|
2634
|
+
color: string;
|
|
2635
|
+
name: string;
|
|
2636
|
+
value: string;
|
|
2637
|
+
}
|
|
2638
|
+
/**
|
|
2639
|
+
* Gráfico em SVG, sem dependências: barras (agrupadas ou empilhadas), linhas, áreas e rosca.
|
|
2640
|
+
* As cores vêm dos tokens `--zur-chart-1..6` em ordem fixa (a 1ª é a menta) e acompanham o
|
|
2641
|
+
* tema. Acessível por padrão: legenda sempre que há mais de uma série, tooltip no hover **e**
|
|
2642
|
+
* no foco (←→ andam pelas categorias), tabela alternativa para leitores de tela e animação
|
|
2643
|
+
* que respeita `prefers-reduced-motion`. O eixo horizontal não espelha em RTL (dados não se
|
|
2644
|
+
* invertem) e as setas são físicas.
|
|
2645
|
+
*
|
|
2646
|
+
* ```html
|
|
2647
|
+
* <zur-chart type="bar" label="Vendas por mês" [labels]="meses"
|
|
2648
|
+
* [series]="[{ name: 'Vendas', values: [12, 18, 9] }]" />
|
|
2649
|
+
* ```
|
|
2650
|
+
*/
|
|
2651
|
+
export declare class ZurChart {
|
|
2652
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2653
|
+
private readonly host;
|
|
2654
|
+
readonly type: import("@angular/core").InputSignal<ZurChartType>;
|
|
2655
|
+
readonly series: import("@angular/core").InputSignal<ZurChartSeries[]>;
|
|
2656
|
+
/** Nomes das categorias (eixo X) ou das fatias (rosca). */
|
|
2657
|
+
readonly labels: import("@angular/core").InputSignal<string[]>;
|
|
2658
|
+
/** Nome do gráfico para leitores de tela (e rótulo do centro da rosca). */
|
|
2659
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2660
|
+
readonly height: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2661
|
+
/** Barras empilhadas em vez de lado a lado. */
|
|
2662
|
+
readonly stacked: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2663
|
+
/** Como escrever os valores (eixo, tooltip, tabela). Padrão: número no idioma. */
|
|
2664
|
+
readonly valueFormat: import("@angular/core").InputSignal<((value: number) => string) | null>;
|
|
2665
|
+
/** Legenda: `auto` mostra com 2+ séries (e na rosca); uma série só não precisa. */
|
|
2666
|
+
readonly legend: import("@angular/core").InputSignal<"auto" | "show" | "hide">;
|
|
2667
|
+
protected readonly width: import("@angular/core").WritableSignal<number>;
|
|
2668
|
+
protected readonly active: import("@angular/core").WritableSignal<number | null>;
|
|
2669
|
+
private readonly focusedIndex;
|
|
2670
|
+
constructor();
|
|
2671
|
+
private fmt;
|
|
2672
|
+
/** Eixo Y compacto quando passa de 10 mil ("12 mil"), completo antes disso. */
|
|
2673
|
+
private fmtAxis;
|
|
2674
|
+
protected readonly visible: import("@angular/core").Signal<ZurChartSeries[]>;
|
|
2675
|
+
protected readonly showLegend: import("@angular/core").Signal<boolean>;
|
|
2676
|
+
private readonly count;
|
|
2677
|
+
protected readonly tabStop: import("@angular/core").Signal<number>;
|
|
2678
|
+
private categoryName;
|
|
2679
|
+
protected readonly view: import("@angular/core").Signal<{
|
|
2680
|
+
left: number;
|
|
2681
|
+
top: number;
|
|
2682
|
+
bottom: number;
|
|
2683
|
+
cx: number;
|
|
2684
|
+
cy: number;
|
|
2685
|
+
total: string;
|
|
2686
|
+
yTicks: {
|
|
2687
|
+
y: number;
|
|
2688
|
+
text: string;
|
|
2689
|
+
}[];
|
|
2690
|
+
xLabels: {
|
|
2691
|
+
i: number;
|
|
2692
|
+
x: number;
|
|
2693
|
+
text: string;
|
|
2694
|
+
}[];
|
|
2695
|
+
bars: {
|
|
2696
|
+
key: string;
|
|
2697
|
+
cat: number;
|
|
2698
|
+
d: string;
|
|
2699
|
+
color: string;
|
|
2700
|
+
}[];
|
|
2701
|
+
lines: {
|
|
2702
|
+
s: number;
|
|
2703
|
+
d: string;
|
|
2704
|
+
areaD: string;
|
|
2705
|
+
color: string;
|
|
2706
|
+
points: {
|
|
2707
|
+
x: number;
|
|
2708
|
+
y: number;
|
|
2709
|
+
}[];
|
|
2710
|
+
}[];
|
|
2711
|
+
centers: number[];
|
|
2712
|
+
cats: {
|
|
2713
|
+
i: number;
|
|
2714
|
+
x: number;
|
|
2715
|
+
w: number;
|
|
2716
|
+
aria: string;
|
|
2717
|
+
}[];
|
|
2718
|
+
slices: {
|
|
2719
|
+
i: number;
|
|
2720
|
+
d: string;
|
|
2721
|
+
color: string;
|
|
2722
|
+
aria: string;
|
|
2723
|
+
}[];
|
|
2724
|
+
legend: {
|
|
2725
|
+
name: string;
|
|
2726
|
+
color: string;
|
|
2727
|
+
}[];
|
|
2728
|
+
}>;
|
|
2729
|
+
protected readonly tooltip: import("@angular/core").Signal<{
|
|
2730
|
+
title: string;
|
|
2731
|
+
rows: TooltipRow[];
|
|
2732
|
+
x: number;
|
|
2733
|
+
y: number;
|
|
2734
|
+
flip: boolean;
|
|
2735
|
+
} | null>;
|
|
2736
|
+
protected readonly tableRows: import("@angular/core").Signal<{
|
|
2737
|
+
label: string;
|
|
2738
|
+
cells: string[];
|
|
2739
|
+
}[]>;
|
|
2740
|
+
protected activate(i: number): void;
|
|
2741
|
+
protected onLeave(): void;
|
|
2742
|
+
protected onBlur(event: FocusEvent): void;
|
|
2743
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2744
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurChart, never>;
|
|
2745
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurChart, "zur-chart", never, {
|
|
2746
|
+
"type": {
|
|
2747
|
+
"alias": "type";
|
|
2748
|
+
"required": false;
|
|
2749
|
+
"isSignal": true;
|
|
2750
|
+
};
|
|
2751
|
+
"series": {
|
|
2752
|
+
"alias": "series";
|
|
2753
|
+
"required": false;
|
|
2754
|
+
"isSignal": true;
|
|
2755
|
+
};
|
|
2756
|
+
"labels": {
|
|
2757
|
+
"alias": "labels";
|
|
2758
|
+
"required": false;
|
|
2759
|
+
"isSignal": true;
|
|
2760
|
+
};
|
|
2761
|
+
"label": {
|
|
2762
|
+
"alias": "label";
|
|
2763
|
+
"required": false;
|
|
2764
|
+
"isSignal": true;
|
|
2765
|
+
};
|
|
2766
|
+
"height": {
|
|
2767
|
+
"alias": "height";
|
|
2768
|
+
"required": false;
|
|
2769
|
+
"isSignal": true;
|
|
2770
|
+
};
|
|
2771
|
+
"stacked": {
|
|
2772
|
+
"alias": "stacked";
|
|
2773
|
+
"required": false;
|
|
2774
|
+
"isSignal": true;
|
|
2775
|
+
};
|
|
2776
|
+
"valueFormat": {
|
|
2777
|
+
"alias": "valueFormat";
|
|
2778
|
+
"required": false;
|
|
2779
|
+
"isSignal": true;
|
|
2780
|
+
};
|
|
2781
|
+
"legend": {
|
|
2782
|
+
"alias": "legend";
|
|
1043
2783
|
"required": false;
|
|
1044
2784
|
"isSignal": true;
|
|
1045
2785
|
};
|
|
1046
2786
|
}, {}, never, never, true, never>;
|
|
1047
2787
|
}
|
|
1048
2788
|
/**
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1051
|
-
*
|
|
2789
|
+
* Mini-gráfico de tendência para dentro de cartões e tabelas. Uma linha de 2px sobre um fio
|
|
2790
|
+
* de área (10%), na cor `--zur-chart-N`. Dê um `label` para ser lido ("Vendas dos últimos
|
|
2791
|
+
* 12 dias: de 4 a 19"); sem ele o desenho é decorativo e fica escondido dos leitores de tela.
|
|
2792
|
+
*
|
|
2793
|
+
* ```html
|
|
2794
|
+
* <zur-sparkline label="Vendas dos últimos 12 dias" [values]="[4, 6, 5, 9, 12, 11, 15]" />
|
|
2795
|
+
* ```
|
|
1052
2796
|
*/
|
|
1053
|
-
export declare class
|
|
1054
|
-
|
|
1055
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ZurNavbar, "zur-navbar", never, {}, {}, never, ["[zurNavbarLogo]", "[zurNavbarLinks]", "[zurNavbarActions]"], true, never>;
|
|
1056
|
-
}
|
|
1057
|
-
/** Painel individual dentro de <zur-tabs>. */
|
|
1058
|
-
export declare class ZurTab {
|
|
2797
|
+
export declare class ZurSparkline {
|
|
2798
|
+
readonly values: import("@angular/core").InputSignal<number[]>;
|
|
1059
2799
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
2800
|
+
/** Posição da cor na paleta de gráficos (1 = menta, 2 = azul…). */
|
|
2801
|
+
readonly slot: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2802
|
+
readonly height: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
2803
|
+
protected readonly stroke: import("@angular/core").Signal<string>;
|
|
2804
|
+
protected readonly paths: import("@angular/core").Signal<{
|
|
2805
|
+
line: string;
|
|
2806
|
+
area: string;
|
|
2807
|
+
}>;
|
|
2808
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurSparkline, never>;
|
|
2809
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSparkline, "zur-sparkline", never, {
|
|
2810
|
+
"values": {
|
|
2811
|
+
"alias": "values";
|
|
2812
|
+
"required": false;
|
|
2813
|
+
"isSignal": true;
|
|
2814
|
+
};
|
|
1063
2815
|
"label": {
|
|
1064
2816
|
"alias": "label";
|
|
1065
|
-
"required":
|
|
2817
|
+
"required": false;
|
|
1066
2818
|
"isSignal": true;
|
|
1067
2819
|
};
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
/** Tabs com sublinhado 2px ink na aba ativa (Airbnb product-tabs). */
|
|
1071
|
-
export declare class ZurTabs {
|
|
1072
|
-
readonly index: import("@angular/core").ModelSignal<number>;
|
|
1073
|
-
protected readonly tabs: import("@angular/core").Signal<readonly ZurTab[]>;
|
|
1074
|
-
constructor();
|
|
1075
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTabs, never>;
|
|
1076
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTabs, "zur-tabs", never, {
|
|
1077
|
-
"index": {
|
|
1078
|
-
"alias": "index";
|
|
2820
|
+
"slot": {
|
|
2821
|
+
"alias": "slot";
|
|
1079
2822
|
"required": false;
|
|
1080
2823
|
"isSignal": true;
|
|
1081
2824
|
};
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
readonly selected: import("@angular/core").OutputEmitterRef<void>;
|
|
1089
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ZurMenuItem, never>;
|
|
1090
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ZurMenuItem, "zur-menu-item", never, {}, {
|
|
1091
|
-
"selected": "selected";
|
|
1092
|
-
}, never, ["*"], true, never>;
|
|
2825
|
+
"height": {
|
|
2826
|
+
"alias": "height";
|
|
2827
|
+
"required": false;
|
|
2828
|
+
"isSignal": true;
|
|
2829
|
+
};
|
|
2830
|
+
}, {}, never, never, true, never>;
|
|
1093
2831
|
}
|
|
1094
2832
|
/**
|
|
1095
|
-
*
|
|
1096
|
-
*
|
|
2833
|
+
* Indicador (KPI): rótulo, valor grande e variação em relação a um período. A variação
|
|
2834
|
+
* sempre vem com seta **e** sinal (+/−) e é lida por extenso ("em alta em relação ao período
|
|
2835
|
+
* anterior"): a cor reforça, mas nunca é o único sinal. Se subir é ruim (custo, erros), use
|
|
2836
|
+
* `invert`. Aceita um `zur-sparkline` no slot `[zurStatChart]`.
|
|
2837
|
+
*
|
|
2838
|
+
* ```html
|
|
2839
|
+
* <zur-stat label="Pedidos" value="1.284" [delta]="12.4">
|
|
2840
|
+
* <zur-sparkline zurStatChart label="Pedidos dos últimos 12 dias" [values]="serie" />
|
|
2841
|
+
* </zur-stat>
|
|
2842
|
+
* ```
|
|
1097
2843
|
*/
|
|
1098
|
-
export declare class
|
|
1099
|
-
private readonly host;
|
|
1100
|
-
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
1101
|
-
toggle(): void;
|
|
1102
|
-
close(): void;
|
|
1103
|
-
protected onDocumentClick(event: MouseEvent): void;
|
|
1104
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ZurMenu, never>;
|
|
1105
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ZurMenu, "zur-menu", never, {}, {}, never, ["[zurMenuTrigger]", "*"], true, never>;
|
|
1106
|
-
}
|
|
1107
|
-
export interface ZurBreadcrumbItem {
|
|
1108
|
-
label: string;
|
|
1109
|
-
href?: string;
|
|
1110
|
-
}
|
|
1111
|
-
/** Breadcrumb em caption muted com separador "/". */
|
|
1112
|
-
export declare class ZurBreadcrumb {
|
|
2844
|
+
export declare class ZurStat {
|
|
1113
2845
|
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1114
|
-
readonly
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
2846
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2847
|
+
readonly value: import("@angular/core").InputSignal<string | number>;
|
|
2848
|
+
/** Variação em %, com sinal (12,4 = +12,4%). `null` esconde. */
|
|
2849
|
+
readonly delta: import("@angular/core").InputSignal<number | null>;
|
|
2850
|
+
/** Quando cair é bom (custo, erros): inverte a cor da variação. */
|
|
2851
|
+
readonly invert: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
2852
|
+
/** Período de comparação ("vs. mês anterior"). */
|
|
2853
|
+
readonly deltaLabel: import("@angular/core").InputSignal<string>;
|
|
2854
|
+
protected readonly direction: import("@angular/core").Signal<"up" | "down" | "flat">;
|
|
2855
|
+
protected readonly tone: import("@angular/core").Signal<"flat" | "good" | "bad">;
|
|
2856
|
+
protected readonly formatted: import("@angular/core").Signal<string>;
|
|
2857
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurStat, never>;
|
|
2858
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurStat, "zur-stat", never, {
|
|
2859
|
+
"label": {
|
|
2860
|
+
"alias": "label";
|
|
2861
|
+
"required": true;
|
|
2862
|
+
"isSignal": true;
|
|
2863
|
+
};
|
|
2864
|
+
"value": {
|
|
2865
|
+
"alias": "value";
|
|
2866
|
+
"required": true;
|
|
2867
|
+
"isSignal": true;
|
|
2868
|
+
};
|
|
2869
|
+
"delta": {
|
|
2870
|
+
"alias": "delta";
|
|
1119
2871
|
"required": false;
|
|
1120
2872
|
"isSignal": true;
|
|
1121
2873
|
};
|
|
1122
|
-
|
|
2874
|
+
"invert": {
|
|
2875
|
+
"alias": "invert";
|
|
2876
|
+
"required": false;
|
|
2877
|
+
"isSignal": true;
|
|
2878
|
+
};
|
|
2879
|
+
"deltaLabel": {
|
|
2880
|
+
"alias": "deltaLabel";
|
|
2881
|
+
"required": false;
|
|
2882
|
+
"isSignal": true;
|
|
2883
|
+
};
|
|
2884
|
+
}, {}, never, ["[zurStatChart]"], true, never>;
|
|
1123
2885
|
}
|
|
1124
|
-
export type
|
|
2886
|
+
export type ZurTimelineStatus = 'neutral' | 'active' | 'success' | 'warning' | 'error' | 'info';
|
|
1125
2887
|
/**
|
|
1126
|
-
*
|
|
1127
|
-
*
|
|
2888
|
+
* Linha do tempo vertical (histórico de pedido, auditoria, feed de atividade). É uma `<ol>`
|
|
2889
|
+
* nativa: cada evento é um `li[zur-timeline-item]` e os grupos por dia usam
|
|
2890
|
+
* `li[zur-timeline-heading]`.
|
|
1128
2891
|
*
|
|
1129
2892
|
* ```html
|
|
1130
|
-
* <zur-
|
|
1131
|
-
* <
|
|
1132
|
-
*
|
|
2893
|
+
* <ol zur-timeline label="Histórico do pedido">
|
|
2894
|
+
* <li zur-timeline-heading>Hoje</li>
|
|
2895
|
+
* <li zur-timeline-item title="Saiu para entrega" time="10:42" status="success">
|
|
2896
|
+
* O entregador está a caminho.
|
|
2897
|
+
* </li>
|
|
2898
|
+
* <li zur-timeline-item title="Pedido confirmado" time="09:15">Pagamento aprovado.</li>
|
|
2899
|
+
* </ol>
|
|
1133
2900
|
* ```
|
|
1134
2901
|
*/
|
|
1135
|
-
export declare class
|
|
1136
|
-
|
|
1137
|
-
|
|
2902
|
+
export declare class ZurTimeline {
|
|
2903
|
+
/** Nome da lista para leitores de tela. */
|
|
2904
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2905
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTimeline, never>;
|
|
2906
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTimeline, "ol[zur-timeline]", never, {
|
|
2907
|
+
"label": {
|
|
2908
|
+
"alias": "label";
|
|
2909
|
+
"required": false;
|
|
2910
|
+
"isSignal": true;
|
|
2911
|
+
};
|
|
2912
|
+
}, {}, never, ["*"], true, never>;
|
|
1138
2913
|
}
|
|
1139
|
-
/**
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
readonly
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
2914
|
+
/** Um evento da linha do tempo. */
|
|
2915
|
+
export declare class ZurTimelineItem {
|
|
2916
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
2917
|
+
/** Texto de data/hora já formatado ("10:42", "ontem"). */
|
|
2918
|
+
readonly time: import("@angular/core").InputSignal<string>;
|
|
2919
|
+
/** Valor máquina opcional para o `<time datetime>`. */
|
|
2920
|
+
readonly datetime: import("@angular/core").InputSignal<string>;
|
|
2921
|
+
readonly status: import("@angular/core").InputSignal<ZurTimelineStatus>;
|
|
2922
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTimelineItem, never>;
|
|
2923
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTimelineItem, "li[zur-timeline-item]", never, {
|
|
2924
|
+
"title": {
|
|
2925
|
+
"alias": "title";
|
|
2926
|
+
"required": true;
|
|
2927
|
+
"isSignal": true;
|
|
2928
|
+
};
|
|
2929
|
+
"time": {
|
|
2930
|
+
"alias": "time";
|
|
1154
2931
|
"required": false;
|
|
1155
2932
|
"isSignal": true;
|
|
1156
2933
|
};
|
|
1157
|
-
"
|
|
1158
|
-
"alias": "
|
|
2934
|
+
"datetime": {
|
|
2935
|
+
"alias": "datetime";
|
|
1159
2936
|
"required": false;
|
|
1160
2937
|
"isSignal": true;
|
|
1161
2938
|
};
|
|
1162
|
-
|
|
2939
|
+
"status": {
|
|
2940
|
+
"alias": "status";
|
|
2941
|
+
"required": false;
|
|
2942
|
+
"isSignal": true;
|
|
2943
|
+
};
|
|
2944
|
+
}, {}, never, ["[zurTimelineIcon]", "*"], true, never>;
|
|
1163
2945
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ZurSidenavLabel, "zur-sidenav-label", never, {}, {}, never, ["*"], true, never>;
|
|
2946
|
+
export interface ZurTreeNode {
|
|
2947
|
+
id: string;
|
|
2948
|
+
label: string;
|
|
2949
|
+
children?: ZurTreeNode[];
|
|
2950
|
+
disabled?: boolean;
|
|
1170
2951
|
}
|
|
1171
|
-
export type
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
2952
|
+
export type ZurTreeSelection = 'none' | 'single' | 'multiple';
|
|
2953
|
+
interface FlatNode {
|
|
2954
|
+
node: ZurTreeNode;
|
|
2955
|
+
level: number;
|
|
2956
|
+
posInSet: number;
|
|
2957
|
+
setSize: number;
|
|
2958
|
+
parentId: string | null;
|
|
2959
|
+
expandable: boolean;
|
|
2960
|
+
expanded: boolean;
|
|
2961
|
+
}
|
|
2962
|
+
/** Template de cada nó: `<ng-template zurTreeNode let-node>…</ng-template>`. */
|
|
2963
|
+
export declare class ZurTreeNodeTemplate {
|
|
2964
|
+
readonly template: TemplateRef<{
|
|
2965
|
+
$implicit: ZurTreeNode;
|
|
2966
|
+
expanded: boolean;
|
|
2967
|
+
}>;
|
|
2968
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTreeNodeTemplate, never>;
|
|
2969
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ZurTreeNodeTemplate, "ng-template[zurTreeNode]", never, {}, {}, never, never, true, never>;
|
|
1176
2970
|
}
|
|
1177
2971
|
/**
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
2972
|
+
* Árvore expansível (pastas, categorias, estrutura de menu) no padrão ARIA `tree`:
|
|
2973
|
+
* ↑↓ andam pelos nós visíveis, → abre (ou desce ao primeiro filho), ← fecha (ou sobe ao pai;
|
|
2974
|
+
* invertidas em RTL), Home/End, `*` abre os irmãos, Enter/Espaço seleciona e digitar uma letra
|
|
2975
|
+
* pula para o próximo nó que começa com ela.
|
|
1181
2976
|
*
|
|
1182
2977
|
* ```html
|
|
1183
|
-
* <
|
|
1184
|
-
* <thead>
|
|
1185
|
-
* <tr><th zurSortable="nome">Nome</th><th>Produto</th></tr>
|
|
1186
|
-
* </thead>
|
|
1187
|
-
* <tbody>…</tbody>
|
|
1188
|
-
* </table>
|
|
2978
|
+
* <zur-tree label="Categorias" [nodes]="categorias" selection="single" [(selected)]="escolhida" />
|
|
1189
2979
|
* ```
|
|
1190
2980
|
*/
|
|
1191
|
-
export declare class
|
|
1192
|
-
readonly
|
|
1193
|
-
|
|
1194
|
-
readonly
|
|
1195
|
-
readonly
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
2981
|
+
export declare class ZurTree {
|
|
2982
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
2983
|
+
private readonly host;
|
|
2984
|
+
readonly nodes: import("@angular/core").InputSignal<ZurTreeNode[]>;
|
|
2985
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
2986
|
+
readonly selection: import("@angular/core").InputSignal<ZurTreeSelection>;
|
|
2987
|
+
/** Ids dos nós selecionados (two-way). */
|
|
2988
|
+
readonly selected: import("@angular/core").ModelSignal<string[]>;
|
|
2989
|
+
/** Ids dos nós abertos (two-way). */
|
|
2990
|
+
readonly expanded: import("@angular/core").ModelSignal<string[]>;
|
|
2991
|
+
/** Abriu ou fechou um nó. */
|
|
2992
|
+
readonly nodeToggle: import("@angular/core").OutputEmitterRef<{
|
|
2993
|
+
node: ZurTreeNode;
|
|
2994
|
+
expanded: boolean;
|
|
2995
|
+
}>;
|
|
2996
|
+
protected readonly nodeTemplate: import("@angular/core").Signal<ZurTreeNodeTemplate | undefined>;
|
|
2997
|
+
protected readonly focused: import("@angular/core").WritableSignal<string | null>;
|
|
2998
|
+
private typeahead;
|
|
2999
|
+
private typeaheadTimer;
|
|
3000
|
+
/** Nós visíveis (os filhos de nós fechados ficam de fora), já "achatados". */
|
|
3001
|
+
protected readonly rows: import("@angular/core").Signal<FlatNode[]>;
|
|
3002
|
+
/** Só um nó está no Tab: o focado, ou o selecionado, ou o primeiro. */
|
|
3003
|
+
protected readonly tabStop: import("@angular/core").Signal<string>;
|
|
3004
|
+
protected isSelected(id: string): boolean;
|
|
3005
|
+
private setOpen;
|
|
3006
|
+
private select;
|
|
3007
|
+
private focusRow;
|
|
3008
|
+
protected onRowClick(event: MouseEvent, row: FlatNode): void;
|
|
3009
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
3010
|
+
/** Digitar letras salta para o próximo nó cujo texto começa com elas. */
|
|
3011
|
+
private jumpTo;
|
|
3012
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurTree, never>;
|
|
3013
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurTree, "zur-tree", never, {
|
|
3014
|
+
"nodes": {
|
|
3015
|
+
"alias": "nodes";
|
|
1201
3016
|
"required": false;
|
|
1202
3017
|
"isSignal": true;
|
|
1203
3018
|
};
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
"
|
|
1217
|
-
"
|
|
3019
|
+
"label": {
|
|
3020
|
+
"alias": "label";
|
|
3021
|
+
"required": false;
|
|
3022
|
+
"isSignal": true;
|
|
3023
|
+
};
|
|
3024
|
+
"selection": {
|
|
3025
|
+
"alias": "selection";
|
|
3026
|
+
"required": false;
|
|
3027
|
+
"isSignal": true;
|
|
3028
|
+
};
|
|
3029
|
+
"selected": {
|
|
3030
|
+
"alias": "selected";
|
|
3031
|
+
"required": false;
|
|
3032
|
+
"isSignal": true;
|
|
3033
|
+
};
|
|
3034
|
+
"expanded": {
|
|
3035
|
+
"alias": "expanded";
|
|
3036
|
+
"required": false;
|
|
1218
3037
|
"isSignal": true;
|
|
1219
3038
|
};
|
|
1220
|
-
}, {
|
|
3039
|
+
}, {
|
|
3040
|
+
"selected": "selectedChange";
|
|
3041
|
+
"expanded": "expandedChange";
|
|
3042
|
+
"nodeToggle": "nodeToggle";
|
|
3043
|
+
}, ["nodeTemplate"], never, true, never>;
|
|
1221
3044
|
}
|
|
1222
3045
|
type PageItem = number | 'gap';
|
|
1223
3046
|
/**
|
|
@@ -1370,6 +3193,247 @@ export declare class ZurStep {
|
|
|
1370
3193
|
};
|
|
1371
3194
|
}, {}, never, ["*"], true, never>;
|
|
1372
3195
|
}
|
|
3196
|
+
/**
|
|
3197
|
+
* Bloco de código com botão de copiar. O texto é sempre da esquerda para a direita (também em RTL),
|
|
3198
|
+
* o botão anuncia "Copiado" ou "Não foi possível copiar" para leitores de tela e a área rola na
|
|
3199
|
+
* horizontal com o teclado.
|
|
3200
|
+
*
|
|
3201
|
+
* ```html
|
|
3202
|
+
* <zur-code-snippet language="bash" code="npm install @juau/zuri" />
|
|
3203
|
+
* ```
|
|
3204
|
+
*/
|
|
3205
|
+
export declare class ZurCodeSnippet {
|
|
3206
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
3207
|
+
readonly code: import("@angular/core").InputSignal<string>;
|
|
3208
|
+
/** Rótulo da linguagem mostrado no topo ("bash", "html"…). */
|
|
3209
|
+
readonly language: import("@angular/core").InputSignal<string>;
|
|
3210
|
+
/** Nome acessível do bloco; sem ele usa a linguagem. */
|
|
3211
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
3212
|
+
protected readonly iconCopy: import("@juau/zuri").ZurIconDef;
|
|
3213
|
+
protected readonly iconCheck: import("@juau/zuri").ZurIconDef;
|
|
3214
|
+
protected readonly copied: import("@angular/core").WritableSignal<boolean>;
|
|
3215
|
+
protected readonly announcement: import("@angular/core").WritableSignal<string>;
|
|
3216
|
+
private timer;
|
|
3217
|
+
constructor();
|
|
3218
|
+
copy(): Promise<void>;
|
|
3219
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurCodeSnippet, never>;
|
|
3220
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurCodeSnippet, "zur-code-snippet", never, {
|
|
3221
|
+
"code": {
|
|
3222
|
+
"alias": "code";
|
|
3223
|
+
"required": true;
|
|
3224
|
+
"isSignal": true;
|
|
3225
|
+
};
|
|
3226
|
+
"language": {
|
|
3227
|
+
"alias": "language";
|
|
3228
|
+
"required": false;
|
|
3229
|
+
"isSignal": true;
|
|
3230
|
+
};
|
|
3231
|
+
"label": {
|
|
3232
|
+
"alias": "label";
|
|
3233
|
+
"required": false;
|
|
3234
|
+
"isSignal": true;
|
|
3235
|
+
};
|
|
3236
|
+
}, {}, never, never, true, never>;
|
|
3237
|
+
}
|
|
3238
|
+
export type ZurListSelection = 'none' | 'single' | 'multiple';
|
|
3239
|
+
/**
|
|
3240
|
+
* Lista vertical de itens com área para ícone/avatar, texto principal, texto secundário e ação.
|
|
3241
|
+
* Com `selection="single" | "multiple"` vira um `listbox`: setas movem o foco, Espaço/Enter escolhem
|
|
3242
|
+
* e o valor (`string` ou `string[]`) funciona com `ngModel`, formulários reativos e `[formField]`.
|
|
3243
|
+
*
|
|
3244
|
+
* ```html
|
|
3245
|
+
* <zur-list label="Pedidos" selection="single" contained divided [(ngModel)]="pedido">
|
|
3246
|
+
* <zur-list-item value="42">
|
|
3247
|
+
* <zur-avatar zurListLeading name="Ana Silva" size="sm" />
|
|
3248
|
+
* Pedido 42
|
|
3249
|
+
* <span zurListSecondary>Monstera e vaso</span>
|
|
3250
|
+
* <zur-badge zurListTrailing>Enviado</zur-badge>
|
|
3251
|
+
* </zur-list-item>
|
|
3252
|
+
* </zur-list>
|
|
3253
|
+
* ```
|
|
3254
|
+
*/
|
|
3255
|
+
export declare class ZurList implements ControlValueAccessor {
|
|
3256
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
3257
|
+
readonly selection: import("@angular/core").InputSignal<ZurListSelection>;
|
|
3258
|
+
/** Borda e raio de 14 px em volta da lista. */
|
|
3259
|
+
readonly contained: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3260
|
+
/** Fio entre os itens. */
|
|
3261
|
+
readonly divided: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3262
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3263
|
+
readonly value: import("@angular/core").ModelSignal<string | string[] | null>;
|
|
3264
|
+
protected readonly items: import("@angular/core").Signal<readonly any[]>;
|
|
3265
|
+
protected readonly cvaDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
3266
|
+
private readonly focused;
|
|
3267
|
+
protected onChange: (value: string | string[] | null) => void;
|
|
3268
|
+
protected onTouched: () => void;
|
|
3269
|
+
readonly selectable: import("@angular/core").Signal<boolean>;
|
|
3270
|
+
isDisabled(): boolean;
|
|
3271
|
+
isSelected(value: string): boolean;
|
|
3272
|
+
/** Valor do item que recebe o Tab: o último focado, o escolhido ou o primeiro habilitado. */
|
|
3273
|
+
readonly tabValue: import("@angular/core").Signal<any>;
|
|
3274
|
+
select(value: string): void;
|
|
3275
|
+
protected onFocusIn(event: FocusEvent): void;
|
|
3276
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
3277
|
+
writeValue(value: string | string[] | null): void;
|
|
3278
|
+
registerOnChange(fn: (value: string | string[] | null) => void): void;
|
|
3279
|
+
registerOnTouched(fn: () => void): void;
|
|
3280
|
+
setDisabledState(isDisabled: boolean): void;
|
|
3281
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurList, never>;
|
|
3282
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurList, "zur-list", never, {
|
|
3283
|
+
"label": {
|
|
3284
|
+
"alias": "label";
|
|
3285
|
+
"required": false;
|
|
3286
|
+
"isSignal": true;
|
|
3287
|
+
};
|
|
3288
|
+
"selection": {
|
|
3289
|
+
"alias": "selection";
|
|
3290
|
+
"required": false;
|
|
3291
|
+
"isSignal": true;
|
|
3292
|
+
};
|
|
3293
|
+
"contained": {
|
|
3294
|
+
"alias": "contained";
|
|
3295
|
+
"required": false;
|
|
3296
|
+
"isSignal": true;
|
|
3297
|
+
};
|
|
3298
|
+
"divided": {
|
|
3299
|
+
"alias": "divided";
|
|
3300
|
+
"required": false;
|
|
3301
|
+
"isSignal": true;
|
|
3302
|
+
};
|
|
3303
|
+
"disabled": {
|
|
3304
|
+
"alias": "disabled";
|
|
3305
|
+
"required": false;
|
|
3306
|
+
"isSignal": true;
|
|
3307
|
+
};
|
|
3308
|
+
"value": {
|
|
3309
|
+
"alias": "value";
|
|
3310
|
+
"required": false;
|
|
3311
|
+
"isSignal": true;
|
|
3312
|
+
};
|
|
3313
|
+
}, {
|
|
3314
|
+
"value": "valueChange";
|
|
3315
|
+
}, ["items"], ["*"], true, never>;
|
|
3316
|
+
}
|
|
3317
|
+
/**
|
|
3318
|
+
* Item da lista. Slots: `[zurListLeading]` (ícone, avatar), o texto principal, `[zurListSecondary]`
|
|
3319
|
+
* e `[zurListTrailing]` (badge, botão). Com `interactive` (fora de uma lista selecionável) a linha
|
|
3320
|
+
* vira um botão e o `(click)` do item funciona.
|
|
3321
|
+
*/
|
|
3322
|
+
export declare class ZurListItem {
|
|
3323
|
+
readonly el: ElementRef<HTMLElement>;
|
|
3324
|
+
protected readonly list: ZurList | null;
|
|
3325
|
+
/** Identifica o item nas listas selecionáveis (obrigatório lá). */
|
|
3326
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
3327
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3328
|
+
/** Linha clicável (botão), para listas que não são de seleção. */
|
|
3329
|
+
readonly interactive: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3330
|
+
isDisabled(): boolean;
|
|
3331
|
+
protected selected(): boolean;
|
|
3332
|
+
protected isTabStop(): boolean;
|
|
3333
|
+
protected onClick(): void;
|
|
3334
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurListItem, never>;
|
|
3335
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurListItem, "zur-list-item", never, {
|
|
3336
|
+
"value": {
|
|
3337
|
+
"alias": "value";
|
|
3338
|
+
"required": false;
|
|
3339
|
+
"isSignal": true;
|
|
3340
|
+
};
|
|
3341
|
+
"disabled": {
|
|
3342
|
+
"alias": "disabled";
|
|
3343
|
+
"required": false;
|
|
3344
|
+
"isSignal": true;
|
|
3345
|
+
};
|
|
3346
|
+
"interactive": {
|
|
3347
|
+
"alias": "interactive";
|
|
3348
|
+
"required": false;
|
|
3349
|
+
"isSignal": true;
|
|
3350
|
+
};
|
|
3351
|
+
}, {}, never, ["[zurListLeading]", "*", "[zurListSecondary]", "[zurListTrailing]"], true, never>;
|
|
3352
|
+
}
|
|
3353
|
+
export type ZurStepperOrientation = 'horizontal' | 'vertical';
|
|
3354
|
+
export type ZurStepStatus = 'done' | 'current' | 'upcoming' | 'error';
|
|
3355
|
+
/** Conteúdo de uma etapa do `zur-stepper`; só a etapa atual é mostrada. */
|
|
3356
|
+
export declare class ZurStepperStep {
|
|
3357
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
3358
|
+
readonly description: import("@angular/core").InputSignal<string>;
|
|
3359
|
+
/** Marca a etapa com erro (ex.: validação falhou), qualquer que seja a posição. */
|
|
3360
|
+
readonly error: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3361
|
+
/** Preenchido pelo `zur-stepper`. */
|
|
3362
|
+
readonly active: import("@angular/core").WritableSignal<boolean>;
|
|
3363
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurStepperStep, never>;
|
|
3364
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurStepperStep, "zur-stepper-step", never, {
|
|
3365
|
+
"label": {
|
|
3366
|
+
"alias": "label";
|
|
3367
|
+
"required": true;
|
|
3368
|
+
"isSignal": true;
|
|
3369
|
+
};
|
|
3370
|
+
"description": {
|
|
3371
|
+
"alias": "description";
|
|
3372
|
+
"required": false;
|
|
3373
|
+
"isSignal": true;
|
|
3374
|
+
};
|
|
3375
|
+
"error": {
|
|
3376
|
+
"alias": "error";
|
|
3377
|
+
"required": false;
|
|
3378
|
+
"isSignal": true;
|
|
3379
|
+
};
|
|
3380
|
+
}, {}, never, ["*"], true, never>;
|
|
3381
|
+
}
|
|
3382
|
+
/**
|
|
3383
|
+
* Etapas de um fluxo (cadastro, checkout, wizard). O estado de cada etapa vem da posição:
|
|
3384
|
+
* as anteriores à atual estão concluídas. Com `linear`, só dá para voltar ou ir à etapa
|
|
3385
|
+
* atual pelo cabeçalho — avançar é com `next()`. Setas (←→ ou ↑↓ no vertical, invertidas em
|
|
3386
|
+
* RTL) movem o foco entre etapas; Enter ou Espaço ativa.
|
|
3387
|
+
*
|
|
3388
|
+
* ```html
|
|
3389
|
+
* <zur-stepper #s linear [(index)]="etapa">
|
|
3390
|
+
* <zur-stepper-step label="Endereço">…</zur-stepper-step>
|
|
3391
|
+
* <zur-stepper-step label="Pagamento">…</zur-stepper-step>
|
|
3392
|
+
* </zur-stepper>
|
|
3393
|
+
* <button zur-button (click)="s.next()">Continuar</button>
|
|
3394
|
+
* ```
|
|
3395
|
+
*/
|
|
3396
|
+
export declare class ZurStepper {
|
|
3397
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
3398
|
+
private readonly host;
|
|
3399
|
+
readonly index: import("@angular/core").ModelSignal<number>;
|
|
3400
|
+
readonly orientation: import("@angular/core").InputSignal<ZurStepperOrientation>;
|
|
3401
|
+
/** Só deixa ir para etapas já alcançadas; avançar é com `next()`. */
|
|
3402
|
+
readonly linear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3403
|
+
protected readonly steps: import("@angular/core").Signal<readonly ZurStepperStep[]>;
|
|
3404
|
+
/** Etapa mais distante já alcançada (libera o clique no modo linear). */
|
|
3405
|
+
private readonly reached;
|
|
3406
|
+
constructor();
|
|
3407
|
+
protected status(i: number): ZurStepStatus;
|
|
3408
|
+
/** Estado da etapa em palavras, para leitores de tela ("concluída", "etapa atual"…). */
|
|
3409
|
+
protected statusText(i: number): string;
|
|
3410
|
+
protected canGo(i: number): boolean;
|
|
3411
|
+
go(i: number): void;
|
|
3412
|
+
/** Avança uma etapa. No modo linear é o único jeito de liberar a etapa seguinte. */
|
|
3413
|
+
next(): void;
|
|
3414
|
+
previous(): void;
|
|
3415
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
3416
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurStepper, never>;
|
|
3417
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurStepper, "zur-stepper", never, {
|
|
3418
|
+
"index": {
|
|
3419
|
+
"alias": "index";
|
|
3420
|
+
"required": false;
|
|
3421
|
+
"isSignal": true;
|
|
3422
|
+
};
|
|
3423
|
+
"orientation": {
|
|
3424
|
+
"alias": "orientation";
|
|
3425
|
+
"required": false;
|
|
3426
|
+
"isSignal": true;
|
|
3427
|
+
};
|
|
3428
|
+
"linear": {
|
|
3429
|
+
"alias": "linear";
|
|
3430
|
+
"required": false;
|
|
3431
|
+
"isSignal": true;
|
|
3432
|
+
};
|
|
3433
|
+
}, {
|
|
3434
|
+
"index": "indexChange";
|
|
3435
|
+
}, ["steps"], ["*"], true, never>;
|
|
3436
|
+
}
|
|
1373
3437
|
export type ZurViewport = 'mobile' | 'tablet' | 'desktop';
|
|
1374
3438
|
/** Breakpoints do Zuri: mobile < 768 ≤ tablet < 1024 ≤ desktop. */
|
|
1375
3439
|
export declare const ZUR_BREAKPOINTS: {
|
|
@@ -1684,9 +3748,15 @@ export declare class ZurErrorLayout {
|
|
|
1684
3748
|
*/
|
|
1685
3749
|
export declare class ZurModal {
|
|
1686
3750
|
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
3751
|
+
private readonly doc;
|
|
1687
3752
|
readonly open: import("@angular/core").ModelSignal<boolean>;
|
|
1688
3753
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
3754
|
+
private readonly dialog;
|
|
3755
|
+
private returnFocusTo;
|
|
3756
|
+
constructor();
|
|
1689
3757
|
close(): void;
|
|
3758
|
+
/** Mantém o Tab circulando dentro do diálogo. */
|
|
3759
|
+
protected trapFocus(event: KeyboardEvent): void;
|
|
1690
3760
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZurModal, never>;
|
|
1691
3761
|
static ɵcmp: i0.ɵɵComponentDeclaration<ZurModal, "zur-modal", never, {
|
|
1692
3762
|
"open": {
|
|
@@ -1704,16 +3774,51 @@ export declare class ZurModal {
|
|
|
1704
3774
|
}, never, ["*", "[zurModalActions]"], true, never>;
|
|
1705
3775
|
}
|
|
1706
3776
|
export type ZurToastKind = 'neutral' | 'success' | 'error';
|
|
3777
|
+
export interface ZurToastAction {
|
|
3778
|
+
/** Texto do botão ("Desfazer"). */
|
|
3779
|
+
label: string;
|
|
3780
|
+
/** Roda ao clicar; o toast fecha em seguida. */
|
|
3781
|
+
handler: () => void;
|
|
3782
|
+
}
|
|
3783
|
+
export interface ZurToastOptions {
|
|
3784
|
+
/** Tempo na tela em ms. Padrão: 4000, ou 8000 quando há ação. */
|
|
3785
|
+
durationMs?: number;
|
|
3786
|
+
/** Botão de texto dentro do toast, para desfazer ou abrir algo. */
|
|
3787
|
+
action?: ZurToastAction;
|
|
3788
|
+
/** Não fecha sozinho: só pelo ✕, pela ação ou por `dismiss`. */
|
|
3789
|
+
persistent?: boolean;
|
|
3790
|
+
}
|
|
1707
3791
|
export interface ZurToast {
|
|
1708
3792
|
id: number;
|
|
1709
3793
|
message: string;
|
|
1710
3794
|
kind: ZurToastKind;
|
|
3795
|
+
action?: ZurToastAction;
|
|
3796
|
+
persistent: boolean;
|
|
1711
3797
|
}
|
|
1712
|
-
/**
|
|
3798
|
+
/**
|
|
3799
|
+
* Fila de toasts — use junto com <zur-toast-container>.
|
|
3800
|
+
*
|
|
3801
|
+
* O tempo de cada toast pausa enquanto o ponteiro ou o foco estão sobre a pilha (WCAG 2.2.1) e
|
|
3802
|
+
* continua de onde parou. `show` devolve o id, para fechar por `dismiss(id)`.
|
|
3803
|
+
*
|
|
3804
|
+
* ```ts
|
|
3805
|
+
* toast.show('Planta removida', 'neutral', { action: { label: 'Desfazer', handler: () => restaurar() } });
|
|
3806
|
+
* toast.show('Sem conexão', 'error', { persistent: true });
|
|
3807
|
+
* toast.show('Salvo', 'success', 2000); // forma curta: só a duração
|
|
3808
|
+
* ```
|
|
3809
|
+
*/
|
|
1713
3810
|
export declare class ZurToastService {
|
|
1714
3811
|
readonly toasts: import("@angular/core").WritableSignal<ZurToast[]>;
|
|
1715
|
-
|
|
3812
|
+
private readonly timers;
|
|
3813
|
+
private paused;
|
|
3814
|
+
show(message: string, kind?: ZurToastKind, options?: number | ZurToastOptions): number;
|
|
1716
3815
|
dismiss(id: number): void;
|
|
3816
|
+
dismissAll(): void;
|
|
3817
|
+
/** Congela o tempo de todos os toasts (o container chama com ponteiro ou foco sobre a pilha). */
|
|
3818
|
+
pauseAll(): void;
|
|
3819
|
+
/** Retoma o tempo que faltava de cada toast. */
|
|
3820
|
+
resumeAll(): void;
|
|
3821
|
+
private start;
|
|
1717
3822
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZurToastService, never>;
|
|
1718
3823
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1719
3824
|
}
|
|
@@ -1724,6 +3829,11 @@ export declare class ZurToastService {
|
|
|
1724
3829
|
export declare class ZurToastContainer {
|
|
1725
3830
|
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
1726
3831
|
protected readonly service: ZurToastService;
|
|
3832
|
+
/** O tempo dos toasts pausa com o ponteiro ou o foco sobre a pilha. */
|
|
3833
|
+
protected hovering: boolean;
|
|
3834
|
+
protected focusWithin: boolean;
|
|
3835
|
+
protected sync(): void;
|
|
3836
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
1727
3837
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZurToastContainer, never>;
|
|
1728
3838
|
static ɵcmp: i0.ɵɵComponentDeclaration<ZurToastContainer, "zur-toast-container", never, {}, {}, never, never, true, never>;
|
|
1729
3839
|
}
|
|
@@ -1765,6 +3875,45 @@ export declare class ZurAlert {
|
|
|
1765
3875
|
};
|
|
1766
3876
|
}, {}, never, ["*"], true, never>;
|
|
1767
3877
|
}
|
|
3878
|
+
export type ZurBannerKind = 'info' | 'success' | 'warning' | 'error';
|
|
3879
|
+
/**
|
|
3880
|
+
* Faixa de aviso de largura total, para o topo da página ou de uma seção (manutenção,
|
|
3881
|
+
* promoção, erro de conexão). Diferente do `zur-alert`, que é um aviso inline dentro do
|
|
3882
|
+
* conteúdo. Com `dismissible`, mostra o botão de fechar e atualiza `[(open)]`.
|
|
3883
|
+
*
|
|
3884
|
+
* ```html
|
|
3885
|
+
* <zur-banner kind="warning" dismissible [(open)]="aviso">
|
|
3886
|
+
* Manutenção hoje às 22h.
|
|
3887
|
+
* <a zurBannerAction href="#">Saiba mais</a>
|
|
3888
|
+
* </zur-banner>
|
|
3889
|
+
* ```
|
|
3890
|
+
*/
|
|
3891
|
+
export declare class ZurBanner {
|
|
3892
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
3893
|
+
readonly kind: import("@angular/core").InputSignal<ZurBannerKind>;
|
|
3894
|
+
readonly dismissible: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
3895
|
+
readonly open: import("@angular/core").ModelSignal<boolean>;
|
|
3896
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurBanner, never>;
|
|
3897
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurBanner, "zur-banner", never, {
|
|
3898
|
+
"kind": {
|
|
3899
|
+
"alias": "kind";
|
|
3900
|
+
"required": false;
|
|
3901
|
+
"isSignal": true;
|
|
3902
|
+
};
|
|
3903
|
+
"dismissible": {
|
|
3904
|
+
"alias": "dismissible";
|
|
3905
|
+
"required": false;
|
|
3906
|
+
"isSignal": true;
|
|
3907
|
+
};
|
|
3908
|
+
"open": {
|
|
3909
|
+
"alias": "open";
|
|
3910
|
+
"required": false;
|
|
3911
|
+
"isSignal": true;
|
|
3912
|
+
};
|
|
3913
|
+
}, {
|
|
3914
|
+
"open": "openChange";
|
|
3915
|
+
}, never, ["*", "[zurBannerAction]"], true, never>;
|
|
3916
|
+
}
|
|
1768
3917
|
export type ZurSpinnerSize = 'sm' | 'md' | 'lg';
|
|
1769
3918
|
/** Anel giratório em menta — 20/32/48px. */
|
|
1770
3919
|
export declare class ZurSpinner {
|
|
@@ -1847,7 +3996,11 @@ export declare class ZurProgress {
|
|
|
1847
3996
|
};
|
|
1848
3997
|
}, {}, never, never, true, never>;
|
|
1849
3998
|
}
|
|
1850
|
-
|
|
3999
|
+
/**
|
|
4000
|
+
* `start`/`end` seguem a direção de leitura (em RTL trocam de lado); `left`/`right` são físicos.
|
|
4001
|
+
* `bottom` é o bottom sheet: sobe da borda inferior, tem alça e fecha arrastando para baixo.
|
|
4002
|
+
*/
|
|
4003
|
+
export type ZurDrawerSide = 'start' | 'end' | 'left' | 'right' | 'bottom';
|
|
1851
4004
|
/**
|
|
1852
4005
|
* Painel lateral deslizante (gaveta) sobre a página, para filtros, detalhes ou
|
|
1853
4006
|
* formulários curtos. Fecha com ESC, clique no fundo ou no botão de fechar; o foco
|
|
@@ -1856,6 +4009,7 @@ export type ZurDrawerSide = 'left' | 'right';
|
|
|
1856
4009
|
* ```html
|
|
1857
4010
|
* <button zur-button (click)="filtros = true">Filtros</button>
|
|
1858
4011
|
* <zur-drawer [(open)]="filtros" title="Filtros">…</zur-drawer>
|
|
4012
|
+
* <zur-drawer [(open)]="opcoes" side="bottom" title="Opções">…</zur-drawer> // bottom sheet
|
|
1859
4013
|
* ```
|
|
1860
4014
|
*/
|
|
1861
4015
|
export declare class ZurDrawer {
|
|
@@ -1865,9 +4019,17 @@ export declare class ZurDrawer {
|
|
|
1865
4019
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
1866
4020
|
readonly side: import("@angular/core").InputSignal<ZurDrawerSide>;
|
|
1867
4021
|
private readonly panel;
|
|
4022
|
+
/** Deslocamento (px) do bottom sheet enquanto é arrastado para baixo. */
|
|
4023
|
+
protected readonly dragY: import("@angular/core").WritableSignal<number>;
|
|
4024
|
+
protected readonly dragging: import("@angular/core").WritableSignal<boolean>;
|
|
4025
|
+
private dragStartY;
|
|
1868
4026
|
private returnFocusTo;
|
|
1869
4027
|
constructor();
|
|
1870
4028
|
close(): void;
|
|
4029
|
+
protected dragStart(event: PointerEvent): void;
|
|
4030
|
+
protected dragMove(event: PointerEvent): void;
|
|
4031
|
+
/** Solta: fecha se foi arrastado além de 100 px (ou 30% da altura); senão volta ao lugar. */
|
|
4032
|
+
protected dragEnd(event: PointerEvent): void;
|
|
1871
4033
|
/** Mantém o Tab circulando dentro do painel. */
|
|
1872
4034
|
protected trapFocus(event: KeyboardEvent): void;
|
|
1873
4035
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZurDrawer, never>;
|
|
@@ -1948,6 +4110,204 @@ export declare class ZurPopoverTrigger {
|
|
|
1948
4110
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZurPopoverTrigger, never>;
|
|
1949
4111
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ZurPopoverTrigger, "[zurPopoverTrigger]", never, {}, {}, never, never, true, never>;
|
|
1950
4112
|
}
|
|
4113
|
+
export interface ZurDialogOptions {
|
|
4114
|
+
title: string;
|
|
4115
|
+
message?: string;
|
|
4116
|
+
confirmLabel?: string;
|
|
4117
|
+
cancelLabel?: string;
|
|
4118
|
+
/** Ação destrutiva: botão vermelho e foco inicial em "Cancelar". */
|
|
4119
|
+
destructive?: boolean;
|
|
4120
|
+
}
|
|
4121
|
+
/** Caixa de diálogo criada por `ZurDialog`; não é usada diretamente no template. */
|
|
4122
|
+
export declare class ZurDialogComponent {
|
|
4123
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
4124
|
+
readonly options: import("@angular/core").InputSignal<ZurDialogOptions>;
|
|
4125
|
+
readonly mode: import("@angular/core").InputSignal<"confirm" | "alert">;
|
|
4126
|
+
readonly result: import("@angular/core").OutputEmitterRef<boolean>;
|
|
4127
|
+
protected readonly id: string;
|
|
4128
|
+
private readonly dialog;
|
|
4129
|
+
private readonly confirmBtn;
|
|
4130
|
+
private readonly cancelBtn;
|
|
4131
|
+
private done;
|
|
4132
|
+
protected readonly safeFirst: import("@angular/core").Signal<boolean>;
|
|
4133
|
+
constructor();
|
|
4134
|
+
protected trap(event: KeyboardEvent): void;
|
|
4135
|
+
protected finish(value: boolean): void;
|
|
4136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurDialogComponent, never>;
|
|
4137
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurDialogComponent, "zur-dialog", never, {
|
|
4138
|
+
"options": {
|
|
4139
|
+
"alias": "options";
|
|
4140
|
+
"required": true;
|
|
4141
|
+
"isSignal": true;
|
|
4142
|
+
};
|
|
4143
|
+
"mode": {
|
|
4144
|
+
"alias": "mode";
|
|
4145
|
+
"required": false;
|
|
4146
|
+
"isSignal": true;
|
|
4147
|
+
};
|
|
4148
|
+
}, {
|
|
4149
|
+
"result": "result";
|
|
4150
|
+
}, never, never, true, never>;
|
|
4151
|
+
}
|
|
4152
|
+
/**
|
|
4153
|
+
* Diálogos de confirmação e aviso sem precisar montar um `zur-modal` em cada tela. O foco
|
|
4154
|
+
* fica preso no diálogo e volta ao elemento anterior ao fechar; Esc e clique fora cancelam.
|
|
4155
|
+
*
|
|
4156
|
+
* ```ts
|
|
4157
|
+
* private dialog = inject(ZurDialog);
|
|
4158
|
+
*
|
|
4159
|
+
* if (await this.dialog.confirm({ title: 'Excluir pedido?', message: 'Não dá para desfazer.',
|
|
4160
|
+
* confirmLabel: 'Excluir', destructive: true })) {
|
|
4161
|
+
* this.excluir();
|
|
4162
|
+
* }
|
|
4163
|
+
* ```
|
|
4164
|
+
*/
|
|
4165
|
+
export declare class ZurDialog {
|
|
4166
|
+
private readonly appRef;
|
|
4167
|
+
private readonly env;
|
|
4168
|
+
private readonly doc;
|
|
4169
|
+
/** Pergunta sim/não. Resolve `true` ao confirmar e `false` ao cancelar (botão, Esc ou fora). */
|
|
4170
|
+
confirm(options: ZurDialogOptions): Promise<boolean>;
|
|
4171
|
+
/** Aviso com um único botão. Resolve quando o usuário fecha. */
|
|
4172
|
+
alert(options: ZurDialogOptions): Promise<void>;
|
|
4173
|
+
private open;
|
|
4174
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurDialog, never>;
|
|
4175
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
4176
|
+
}
|
|
4177
|
+
/**
|
|
4178
|
+
* Menu de clique direito. Declare o menu uma vez e ligue-o a qualquer elemento com
|
|
4179
|
+
* `[zurContextMenu]`; os itens são `zur-menu-item`.
|
|
4180
|
+
*
|
|
4181
|
+
* ```html
|
|
4182
|
+
* <div [zurContextMenu]="menu">Clique com o botão direito aqui</div>
|
|
4183
|
+
* <zur-context-menu #menu>
|
|
4184
|
+
* <zur-menu-item (selected)="renomear()">Renomear</zur-menu-item>
|
|
4185
|
+
* <zur-menu-item (selected)="excluir()">Excluir</zur-menu-item>
|
|
4186
|
+
* </zur-context-menu>
|
|
4187
|
+
* ```
|
|
4188
|
+
*
|
|
4189
|
+
* Abre com o botão direito, **Shift+F10 / tecla Menu** ou toque longo. ↑↓/Home/End navegam,
|
|
4190
|
+
* Esc fecha e devolve o foco ao elemento de origem.
|
|
4191
|
+
*/
|
|
4192
|
+
export declare class ZurContextMenu {
|
|
4193
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
4194
|
+
private readonly doc;
|
|
4195
|
+
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
4196
|
+
protected readonly position: import("@angular/core").WritableSignal<{
|
|
4197
|
+
x: number;
|
|
4198
|
+
y: number;
|
|
4199
|
+
}>;
|
|
4200
|
+
private readonly panel;
|
|
4201
|
+
private origin;
|
|
4202
|
+
private returnFocusTo;
|
|
4203
|
+
constructor();
|
|
4204
|
+
/** Abre o menu nas coordenadas da janela. `origin` recebe o foco de volta ao fechar. */
|
|
4205
|
+
show(x: number, y: number, origin?: HTMLElement | null): void;
|
|
4206
|
+
close(returnFocus?: boolean): void;
|
|
4207
|
+
protected onOutside(event: Event): void;
|
|
4208
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
4209
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurContextMenu, never>;
|
|
4210
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurContextMenu, "zur-context-menu", never, {}, {}, never, ["*"], true, never>;
|
|
4211
|
+
}
|
|
4212
|
+
/** Liga um elemento a um `zur-context-menu`: botão direito, Shift+F10, tecla Menu e toque longo. */
|
|
4213
|
+
export declare class ZurContextMenuTrigger {
|
|
4214
|
+
readonly zurContextMenu: import("@angular/core").InputSignal<ZurContextMenu>;
|
|
4215
|
+
private readonly host;
|
|
4216
|
+
private timer;
|
|
4217
|
+
protected onContextMenu(event: MouseEvent): void;
|
|
4218
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
4219
|
+
protected onPointerDown(event: PointerEvent): void;
|
|
4220
|
+
protected cancelPress(): void;
|
|
4221
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurContextMenuTrigger, never>;
|
|
4222
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ZurContextMenuTrigger, "[zurContextMenu]", never, {
|
|
4223
|
+
"zurContextMenu": {
|
|
4224
|
+
"alias": "zurContextMenu";
|
|
4225
|
+
"required": true;
|
|
4226
|
+
"isSignal": true;
|
|
4227
|
+
};
|
|
4228
|
+
}, {}, never, never, true, never>;
|
|
4229
|
+
}
|
|
4230
|
+
/** Um slide do `zur-carousel`; só o slide atual é focável e lido. */
|
|
4231
|
+
export declare class ZurCarouselSlide {
|
|
4232
|
+
private readonly i18n;
|
|
4233
|
+
/** Preenchidos pelo `zur-carousel`. */
|
|
4234
|
+
readonly active: import("@angular/core").WritableSignal<boolean>;
|
|
4235
|
+
readonly position: import("@angular/core").WritableSignal<{
|
|
4236
|
+
n: number;
|
|
4237
|
+
total: number;
|
|
4238
|
+
}>;
|
|
4239
|
+
protected readonly ariaLabel: import("@angular/core").Signal<string>;
|
|
4240
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurCarouselSlide, never>;
|
|
4241
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurCarouselSlide, "zur-carousel-slide", never, {}, {}, never, ["*"], true, never>;
|
|
4242
|
+
}
|
|
4243
|
+
/**
|
|
4244
|
+
* Carrossel de slides com setas, indicadores e deslize por toque. Teclado: ←→ trocam o slide
|
|
4245
|
+
* (invertidas em RTL). O `autoplay` (ms) para sozinho ao passar o mouse ou focar, tem botão
|
|
4246
|
+
* de pausa e **fica desligado quando o usuário pede menos movimento**.
|
|
4247
|
+
*
|
|
4248
|
+
* ```html
|
|
4249
|
+
* <zur-carousel label="Destaques" [(index)]="i" [autoplay]="5000" loop>
|
|
4250
|
+
* <zur-carousel-slide>…</zur-carousel-slide>
|
|
4251
|
+
* </zur-carousel>
|
|
4252
|
+
* ```
|
|
4253
|
+
*/
|
|
4254
|
+
export declare class ZurCarousel {
|
|
4255
|
+
protected readonly i18n: import("@juau/zuri").ZurI18n;
|
|
4256
|
+
private readonly host;
|
|
4257
|
+
private readonly destroyRef;
|
|
4258
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
4259
|
+
readonly index: import("@angular/core").ModelSignal<number>;
|
|
4260
|
+
/** Volta ao primeiro depois do último (e vice-versa). */
|
|
4261
|
+
readonly loop: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4262
|
+
/** Intervalo da troca automática em ms; `0` desliga. */
|
|
4263
|
+
readonly autoplay: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
4264
|
+
protected readonly slides: import("@angular/core").Signal<readonly ZurCarouselSlide[]>;
|
|
4265
|
+
protected readonly count: import("@angular/core").Signal<number>;
|
|
4266
|
+
protected readonly hovered: import("@angular/core").WritableSignal<boolean>;
|
|
4267
|
+
protected readonly focused: import("@angular/core").WritableSignal<boolean>;
|
|
4268
|
+
protected readonly userPaused: import("@angular/core").WritableSignal<boolean>;
|
|
4269
|
+
private readonly reducedMotion;
|
|
4270
|
+
private readonly rtl;
|
|
4271
|
+
protected dragStart: number | null;
|
|
4272
|
+
protected readonly running: import("@angular/core").Signal<boolean>;
|
|
4273
|
+
protected readonly canPrev: import("@angular/core").Signal<boolean>;
|
|
4274
|
+
protected readonly canNext: import("@angular/core").Signal<boolean>;
|
|
4275
|
+
protected readonly transform: import("@angular/core").Signal<string>;
|
|
4276
|
+
constructor();
|
|
4277
|
+
private syncDirection;
|
|
4278
|
+
private advance;
|
|
4279
|
+
goTo(i: number): void;
|
|
4280
|
+
next(): void;
|
|
4281
|
+
previous(): void;
|
|
4282
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
4283
|
+
protected onPointerDown(event: PointerEvent): void;
|
|
4284
|
+
protected onPointerUp(event: PointerEvent): void;
|
|
4285
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZurCarousel, never>;
|
|
4286
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZurCarousel, "zur-carousel", never, {
|
|
4287
|
+
"label": {
|
|
4288
|
+
"alias": "label";
|
|
4289
|
+
"required": false;
|
|
4290
|
+
"isSignal": true;
|
|
4291
|
+
};
|
|
4292
|
+
"index": {
|
|
4293
|
+
"alias": "index";
|
|
4294
|
+
"required": false;
|
|
4295
|
+
"isSignal": true;
|
|
4296
|
+
};
|
|
4297
|
+
"loop": {
|
|
4298
|
+
"alias": "loop";
|
|
4299
|
+
"required": false;
|
|
4300
|
+
"isSignal": true;
|
|
4301
|
+
};
|
|
4302
|
+
"autoplay": {
|
|
4303
|
+
"alias": "autoplay";
|
|
4304
|
+
"required": false;
|
|
4305
|
+
"isSignal": true;
|
|
4306
|
+
};
|
|
4307
|
+
}, {
|
|
4308
|
+
"index": "indexChange";
|
|
4309
|
+
}, ["slides"], ["*"], true, never>;
|
|
4310
|
+
}
|
|
1951
4311
|
/**
|
|
1952
4312
|
* Contêiner de conversa. A área de mensagens é um `role="log"` que rola sozinha para
|
|
1953
4313
|
* o fim quando chega mensagem nova ou o texto cresce (streaming) — a menos que o
|