@dev-tcloud/tcloud-ui 6.15.0 → 6.18.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.
Files changed (79) hide show
  1. package/docs/tcloud-ui-accordion.md +345 -0
  2. package/docs/tcloud-ui-actions.md +88 -0
  3. package/docs/tcloud-ui-alert-banner.md +104 -0
  4. package/docs/tcloud-ui-array-to-text.md +361 -0
  5. package/docs/tcloud-ui-breadcrumb.md +103 -0
  6. package/docs/tcloud-ui-bytes.md +109 -0
  7. package/docs/tcloud-ui-calendar.md +387 -0
  8. package/docs/tcloud-ui-card-accordion.md +266 -0
  9. package/docs/tcloud-ui-card-title.md +47 -0
  10. package/docs/tcloud-ui-card.md +40 -0
  11. package/docs/tcloud-ui-choice-issues.md +59 -0
  12. package/docs/tcloud-ui-cnpj.md +102 -0
  13. package/docs/tcloud-ui-container.md +171 -0
  14. package/docs/tcloud-ui-cpf.md +102 -0
  15. package/docs/tcloud-ui-currency.md +271 -0
  16. package/docs/tcloud-ui-data-list.md +91 -0
  17. package/docs/tcloud-ui-datebr.md +139 -0
  18. package/docs/tcloud-ui-datepicker-time.md +191 -0
  19. package/docs/tcloud-ui-datepicker.md +186 -0
  20. package/docs/tcloud-ui-dropdown-multi.md +444 -0
  21. package/docs/tcloud-ui-dropdown.md +369 -0
  22. package/docs/tcloud-ui-el-copy.md +113 -0
  23. package/docs/tcloud-ui-empty-content.md +412 -0
  24. package/docs/tcloud-ui-faq.md +496 -0
  25. package/docs/tcloud-ui-filter-bar.md +86 -0
  26. package/docs/tcloud-ui-filters.md +337 -0
  27. package/docs/tcloud-ui-hover-parent.md +467 -0
  28. package/docs/tcloud-ui-icon-button.md +104 -0
  29. package/docs/tcloud-ui-input-container.md +520 -0
  30. package/docs/tcloud-ui-input-password.md +258 -0
  31. package/docs/tcloud-ui-input-search.md +314 -0
  32. package/docs/tcloud-ui-label-token.md +286 -0
  33. package/docs/tcloud-ui-legend.md +72 -0
  34. package/docs/tcloud-ui-line-step-circle.md +98 -0
  35. package/docs/tcloud-ui-line-step-title.md +194 -0
  36. package/docs/tcloud-ui-linha-logo.md +550 -0
  37. package/docs/tcloud-ui-loading.md +88 -0
  38. package/docs/tcloud-ui-message.md +539 -0
  39. package/docs/tcloud-ui-modal.md +196 -0
  40. package/docs/tcloud-ui-monthname.md +123 -0
  41. package/docs/tcloud-ui-multi-input.md +290 -0
  42. package/docs/tcloud-ui-multi-select.md +311 -0
  43. package/docs/tcloud-ui-multiples-values.md +157 -0
  44. package/docs/tcloud-ui-not-found.md +88 -0
  45. package/docs/tcloud-ui-number-step.md +134 -0
  46. package/docs/tcloud-ui-pagination.md +579 -0
  47. package/docs/tcloud-ui-progress-bar.md +65 -0
  48. package/docs/tcloud-ui-radio.md +83 -0
  49. package/docs/tcloud-ui-reorder-items.md +418 -0
  50. package/docs/tcloud-ui-respective.md +167 -0
  51. package/docs/tcloud-ui-scroll-box.md +109 -0
  52. package/docs/tcloud-ui-search-bar.md +88 -0
  53. package/docs/tcloud-ui-search-in-object.md +143 -0
  54. package/docs/tcloud-ui-search-input.md +74 -0
  55. package/docs/tcloud-ui-skeleton-loading.md +394 -0
  56. package/docs/tcloud-ui-slide-toggle.md +210 -0
  57. package/docs/tcloud-ui-statusinfo.md +138 -0
  58. package/docs/tcloud-ui-tab-group.md +376 -0
  59. package/docs/tcloud-ui-tab-menu.md +109 -0
  60. package/docs/tcloud-ui-table.md +96 -0
  61. package/docs/tcloud-ui-tag.md +379 -0
  62. package/docs/tcloud-ui-tc-badge.md +168 -0
  63. package/docs/tcloud-ui-tc-btn.md +189 -0
  64. package/docs/tcloud-ui-tc-colors.md +204 -0
  65. package/docs/tcloud-ui-tc-form-control.md +200 -0
  66. package/docs/tcloud-ui-tc-text.md +139 -0
  67. package/docs/tcloud-ui-tc-title.md +118 -0
  68. package/docs/tcloud-ui-tcloud-form.md +55 -0
  69. package/docs/tcloud-ui-toast.md +83 -0
  70. package/docs/tcloud-ui-tooltip.md +88 -0
  71. package/docs/tcloud-ui-topology.md +232 -0
  72. package/docs/tcloud-ui-upload-area.md +195 -0
  73. package/docs/tcloud-ui-welcome.md +112 -0
  74. package/docs/tcloud-ui-wizard-steps.md +103 -0
  75. package/js/tcloud-ui-app.js +11 -0
  76. package/package.json +1 -1
  77. package/scss/tcloud-revitalizacao/components/_tcloud-ui-table.scss +95 -0
  78. package/scss/tcloud-revitalizacao/tc-rev-styles.scss +1 -1
  79. package/scss/tcloud-revitalizacao/components/_tc-rev-table.scss +0 -57
@@ -0,0 +1,496 @@
1
+ # FAQ
2
+
3
+ ## Características
4
+
5
+ O componente `tcloud-ui-faq` é um componente de perguntas frequentes (FAQ) que permite exibir uma lista de perguntas e respostas de forma interativa. Cada pergunta pode ser expandida ou recolhida com animações suaves, criando uma experiência intuitiva para o usuário encontrar respostas.
6
+
7
+ ## Instalação
8
+
9
+ Para utilizar o componente FAQ, importe o módulo `TCloudUiModule`:
10
+
11
+ ```typescript
12
+ import { TCloudUiModule } from '@tcloud-ui/lib';
13
+ import { Component } from '@angular/core';
14
+
15
+ @Component({
16
+ selector: 'app-example',
17
+ standalone: true,
18
+ imports: [TCloudUiModule],
19
+ template: `
20
+ <tcloud-ui-faq
21
+ [questions]="questions"
22
+ [title]="'Perguntas Frequentes'">
23
+ </tcloud-ui-faq>
24
+ `
25
+ })
26
+ export class ExampleComponent {
27
+ questions = [
28
+ { question: 'Como fazer?', answer: 'Desta forma...' }
29
+ ];
30
+ }
31
+ ```
32
+
33
+ Ou importe diretamente o componente:
34
+
35
+ ```typescript
36
+ import { TCloudUiFaqComponent } from '@tcloud-ui/lib';
37
+
38
+ @Component({
39
+ selector: 'app-example',
40
+ standalone: true,
41
+ imports: [TCloudUiFaqComponent],
42
+ template: `...`
43
+ })
44
+ export class ExampleComponent {}
45
+ ```
46
+
47
+ ## Propriedades (API)
48
+
49
+ ### Inputs
50
+
51
+ | Nome | Tipo | Descrição | Valor Default |
52
+ |------|------|-----------|---------------|
53
+ | `title` | `string` | Título da seção de FAQ | `'Dúvidas frequentes'` |
54
+ | `questions` | `{ question: string; answer: string }[]` | Array de perguntas e respostas | `[]` |
55
+
56
+ ### Estados Internos
57
+
58
+ O componente usa um `signal` para rastrear qual pergunta está aberta:
59
+ - `openIndex: signal<number \| null>` - Índice da pergunta aberta (null se nenhuma estiver aberta)
60
+
61
+ ### Métodos
62
+
63
+ - `toggle(index: number): void` - Alterna entre abrir/fechar uma pergunta
64
+
65
+ ## Exemplos de Uso
66
+
67
+ ### Uso Básico
68
+
69
+ ```typescript
70
+ import { Component } from '@angular/core';
71
+ import { TCloudUiModule } from '@tcloud-ui/lib';
72
+
73
+ @Component({
74
+ selector: 'app-basic-faq',
75
+ standalone: true,
76
+ imports: [TCloudUiModule],
77
+ template: `
78
+ <tcloud-ui-faq
79
+ [questions]="basicQuestions"
80
+ [title]="'Perguntas Frequentes'">
81
+ </tcloud-ui-faq>
82
+ `
83
+ })
84
+ export class BasicFaqComponent {
85
+ basicQuestions = [
86
+ {
87
+ question: 'Como criar uma conta?',
88
+ answer: 'Para criar uma conta, clique no botão "Registrar" e preencha o formulário com seus dados.'
89
+ },
90
+ {
91
+ question: 'Esqueci minha senha. O que fazer?',
92
+ answer: 'Clique em "Esqueci minha senha" na página de login e siga as instruções enviadas para seu email.'
93
+ },
94
+ {
95
+ question: 'Como contatar o suporte?',
96
+ answer: 'Você pode contatar o suporte através do formulário de contato ou enviando um email para support@example.com'
97
+ }
98
+ ];
99
+ }
100
+ ```
101
+
102
+ ### FAQ por Categoria
103
+
104
+ ```typescript
105
+ import { Component } from '@angular/core';
106
+ import { TCloudUiModule } from '@tcloud-ui/lib';
107
+ import { CommonModule } from '@angular/common';
108
+
109
+ @Component({
110
+ selector: 'app-category-faq',
111
+ standalone: true,
112
+ imports: [CommonModule, TCloudUiModule],
113
+ template: `
114
+ <div class="faq-categories">
115
+ <div class="category">
116
+ <h3>Conta e Login</h3>
117
+ <tcloud-ui-faq [questions]="accountQuestions"></tcloud-ui-faq>
118
+ </div>
119
+
120
+ <div class="category">
121
+ <h3>Pagamento</h3>
122
+ <tcloud-ui-faq [questions]="paymentQuestions"></tcloud-ui-faq>
123
+ </div>
124
+
125
+ <div class="category">
126
+ <h3>Envios</h3>
127
+ <tcloud-ui-faq [questions]="shippingQuestions"></tcloud-ui-faq>
128
+ </div>
129
+ </div>
130
+ `,
131
+ styles: [`
132
+ .faq-categories {
133
+ display: grid;
134
+ gap: 2rem;
135
+ }
136
+
137
+ .category h3 {
138
+ margin: 0 0 1rem;
139
+ font-size: 1.5rem;
140
+ color: var(--c-primary-600);
141
+ }
142
+ `]
143
+ })
144
+ export class CategoryFaqComponent {
145
+ accountQuestions = [
146
+ {
147
+ question: 'Como editar meu perfil?',
148
+ answer: 'Acesse Configurações > Perfil para editar suas informações pessoais.'
149
+ },
150
+ {
151
+ question: 'Como alterar meu email?',
152
+ answer: 'Vá para Configurações > Segurança > Email e siga o processo de verificação.'
153
+ }
154
+ ];
155
+
156
+ paymentQuestions = [
157
+ {
158
+ question: 'Quais formas de pagamento vocês aceitam?',
159
+ answer: 'Aceitamos cartão de crédito, débito, PIX e boleto bancário.'
160
+ },
161
+ {
162
+ question: 'Meu pagamento foi recusado. O que fazer?',
163
+ answer: 'Verifique dados do cartão, disponibilidade de crédito ou tente outro método de pagamento.'
164
+ }
165
+ ];
166
+
167
+ shippingQuestions = [
168
+ {
169
+ question: 'Qual é o prazo de entrega?',
170
+ answer: 'O prazo varia de 1 a 7 dias úteis dependendo da sua localização.'
171
+ },
172
+ {
173
+ question: 'Como rastrear meu pedido?',
174
+ answer: 'Use o código de rastreamento enviado por email ou acesse sua conta > Pedidos.'
175
+ }
176
+ ];
177
+ }
178
+ ```
179
+
180
+ ### FAQ com Busca
181
+
182
+ ```typescript
183
+ import { Component, signal } from '@angular/core';
184
+ import { TCloudUiModule } from '@tcloud-ui/lib';
185
+ import { CommonModule } from '@angular/common';
186
+ import { FormsModule } from '@angular/forms';
187
+
188
+ @Component({
189
+ selector: 'app-search-faq',
190
+ standalone: true,
191
+ imports: [CommonModule, TCloudUiModule, FormsModule],
192
+ template: `
193
+ <div class="search-faq">
194
+ <input
195
+ type="text"
196
+ [(ngModel)]="searchTerm"
197
+ placeholder="Buscar pergunta..."
198
+ class="search-input"
199
+ />
200
+
201
+ <tcloud-ui-faq
202
+ [questions]="filteredQuestions()"
203
+ [title]="'Resultados da Busca'"
204
+ ></tcloud-ui-faq>
205
+
206
+ @if (searchTerm && filteredQuestions().length === 0) {
207
+ <div class="no-results">
208
+ Nenhuma pergunta encontrada para "{{ searchTerm }}"
209
+ </div>
210
+ }
211
+ </div>
212
+ `,
213
+ styles: [`
214
+ .search-faq {
215
+ max-width: 600px;
216
+ margin: 0 auto;
217
+ }
218
+
219
+ .search-input {
220
+ width: 100%;
221
+ padding: 0.75rem;
222
+ margin-bottom: 1.5rem;
223
+ border: 1px solid var(--c-neutral-300);
224
+ border-radius: var(--bor-radius-8);
225
+ font-size: 1rem;
226
+ }
227
+
228
+ .search-input:focus {
229
+ outline: none;
230
+ border-color: var(--c-primary-500);
231
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
232
+ }
233
+
234
+ .no-results {
235
+ padding: 2rem;
236
+ text-align: center;
237
+ color: var(--c-neutral-600);
238
+ background: var(--c-neutral-100);
239
+ border-radius: var(--bor-radius-8);
240
+ }
241
+ `]
242
+ })
243
+ export class SearchFaqComponent {
244
+ searchTerm = signal('');
245
+
246
+ allQuestions = [
247
+ { question: 'O que é FAQ?', answer: 'FAQ é Perguntas Frequentes' },
248
+ { question: 'Como usar?', answer: 'Use o componente com um array de perguntas' },
249
+ { question: 'É responsivo?', answer: 'Sim, é totalmente responsivo' },
250
+ { question: 'Posso customizar?', answer: 'Sim, você pode customizar as perguntas' }
251
+ ];
252
+
253
+ filteredQuestions() {
254
+ const term = this.searchTerm().toLowerCase();
255
+ if (!term) return this.allQuestions;
256
+
257
+ return this.allQuestions.filter(q =>
258
+ q.question.toLowerCase().includes(term) ||
259
+ q.answer.toLowerCase().includes(term)
260
+ );
261
+ }
262
+ }
263
+ ```
264
+
265
+ ### FAQ Dinâmico
266
+
267
+ ```typescript
268
+ import { Component, signal } from '@angular/core';
269
+ import { TCloudUiModule } from '@tcloud-ui/lib';
270
+ import { CommonModule } from '@angular/common';
271
+
272
+ @Component({
273
+ selector: 'app-dynamic-faq',
274
+ standalone: true,
275
+ imports: [CommonModule, TCloudUiModule],
276
+ template: `
277
+ <div class="dynamic-faq">
278
+ <button
279
+ (click)="loadMoreQuestions()"
280
+ class="btn-load-more"
281
+ [disabled]="allQuestionsLoaded()">
282
+ @if (!allQuestionsLoaded()) {
283
+ Carregar mais perguntas
284
+ } @else {
285
+ Todas as perguntas carregadas ✓
286
+ }
287
+ </button>
288
+
289
+ <tcloud-ui-faq
290
+ [questions]="displayedQuestions()"
291
+ [title]="'Perguntas Frequentes'"
292
+ ></tcloud-ui-faq>
293
+ </div>
294
+ `,
295
+ styles: [`
296
+ .dynamic-faq {
297
+ display: flex;
298
+ flex-direction: column;
299
+ gap: 1.5rem;
300
+ }
301
+
302
+ .btn-load-more {
303
+ padding: 0.75rem 1.5rem;
304
+ background: var(--c-primary-500);
305
+ color: white;
306
+ border: none;
307
+ border-radius: var(--bor-radius-8);
308
+ font-weight: 600;
309
+ cursor: pointer;
310
+ transition: background 200ms;
311
+ }
312
+
313
+ .btn-load-more:hover:not(:disabled) {
314
+ background: var(--c-primary-600);
315
+ }
316
+
317
+ .btn-load-more:disabled {
318
+ background: var(--c-neutral-400);
319
+ cursor: not-allowed;
320
+ }
321
+ `]
322
+ })
323
+ export class DynamicFaqComponent {
324
+ itemsPerPage = 3;
325
+ currentPage = signal(1);
326
+ allQuestionsLoaded = signal(false);
327
+
328
+ allQuestions = [
329
+ { question: 'Pergunta 1?', answer: 'Resposta 1' },
330
+ { question: 'Pergunta 2?', answer: 'Resposta 2' },
331
+ { question: 'Pergunta 3?', answer: 'Resposta 3' },
332
+ { question: 'Pergunta 4?', answer: 'Resposta 4' },
333
+ { question: 'Pergunta 5?', answer: 'Resposta 5' },
334
+ { question: 'Pergunta 6?', answer: 'Resposta 6' }
335
+ ];
336
+
337
+ displayedQuestions() {
338
+ return this.allQuestions.slice(
339
+ 0,
340
+ this.currentPage() * this.itemsPerPage
341
+ );
342
+ }
343
+
344
+ loadMoreQuestions() {
345
+ this.currentPage.update(p => p + 1);
346
+ if (this.displayedQuestions().length >= this.allQuestions.length) {
347
+ this.allQuestionsLoaded.set(true);
348
+ }
349
+ }
350
+ }
351
+ ```
352
+
353
+ ### FAQ com Ícones
354
+
355
+ ```typescript
356
+ import { Component } from '@angular/core';
357
+ import { TCloudUiModule } from '@tcloud-ui/lib';
358
+ import { CommonModule } from '@angular/common';
359
+
360
+ @Component({
361
+ selector: 'app-faq-with-icons',
362
+ standalone: true,
363
+ imports: [CommonModule, TCloudUiModule],
364
+ template: `
365
+ <div class="faq-tiles">
366
+ @for (category of categories; track category.icon) {
367
+ <div class="faq-tile">
368
+ <div class="tile-header">
369
+ <i [class]="category.icon"></i>
370
+ <h3>{{ category.title }}</h3>
371
+ </div>
372
+ <tcloud-ui-faq [questions]="category.questions"></tcloud-ui-faq>
373
+ </div>
374
+ }
375
+ </div>
376
+ `,
377
+ styles: [`
378
+ .faq-tiles {
379
+ display: grid;
380
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
381
+ gap: 2rem;
382
+ }
383
+
384
+ .faq-tile {
385
+ border: 1px solid var(--c-neutral-200);
386
+ border-radius: var(--bor-radius-8);
387
+ padding: 1.5rem;
388
+ background: white;
389
+ }
390
+
391
+ .tile-header {
392
+ display: flex;
393
+ align-items: center;
394
+ gap: 1rem;
395
+ margin-bottom: 1.5rem;
396
+ }
397
+
398
+ .tile-header i {
399
+ font-size: 1.75rem;
400
+ color: var(--c-primary-500);
401
+ }
402
+
403
+ .tile-header h3 {
404
+ margin: 0;
405
+ font-size: 1.25rem;
406
+ color: var(--c-neutral-800);
407
+ }
408
+ `]
409
+ })
410
+ export class FaqWithIconsComponent {
411
+ categories = [
412
+ {
413
+ title: 'Contas',
414
+ icon: 'fa-light fa-user',
415
+ questions: [
416
+ { question: 'Como criar uma conta?', answer: 'Clique em Registrar...' },
417
+ { question: 'Como fazer login?', answer: 'Use suas credenciais...' }
418
+ ]
419
+ },
420
+ {
421
+ title: 'Compras',
422
+ icon: 'fa-light fa-shopping-bag',
423
+ questions: [
424
+ { question: 'Como comprar?', answer: 'Adicione itens ao carrinho...' },
425
+ { question: 'Posso cancelar?', answer: 'Sim, dentro de 24 horas...' }
426
+ ]
427
+ },
428
+ {
429
+ title: 'Suporte',
430
+ icon: 'fa-light fa-headset',
431
+ questions: [
432
+ { question: 'Como contatar suporte?', answer: 'Use o chat or email...' },
433
+ { question: 'Qual o horário?', answer: '24/7 durante semana...' }
434
+ ]
435
+ }
436
+ ];
437
+ }
438
+ ```
439
+
440
+ ## Animações
441
+
442
+ O componente inclui animações suaves:
443
+
444
+ - **Altura**: Transição de 56px (fechado) para auto (aberto) em 0.2s
445
+ - **Ícone**: Rotação de 180° da seta ao expandir em 0.3s
446
+ - **Overflow**: Controle automático de overflow durante a transição
447
+
448
+ ## Responsividade
449
+
450
+ O componente é totalmente responsivo:
451
+
452
+ - **Desktop**: Layout completo com estilos otimizados
453
+ - **Mobile**: Adaptado para telas pequenas com padding reduzido
454
+ - **Tablet**: Escala intermediária
455
+
456
+ ## Estilos Padrão
457
+
458
+ - **Fundo**: `var(--c-neutral-50)` (cinza muito claro)
459
+ - **Borda**: `1px solid var(--c-neutral-300)`
460
+ - **Texto**: `var(--c-neutral-700)` com tamanho 16px
461
+ - **Altura fechado**: 56px
462
+ - **Padding**: 16px
463
+ - **Cursor**: pointer ao passar sobre a pergunta
464
+
465
+ ## Casos de Uso
466
+
467
+ - Página de FAQ do site
468
+ - Seção de ajuda em aplicações
469
+ - Documentação interativa
470
+ - Suporte ao cliente
471
+ - Centro de conhecimento
472
+ - Guias de troubleshooting
473
+ - Perguntas sobre produtos
474
+ - Informações sobre politicas
475
+ - Instruções de uso
476
+ - Respostas a dúvidas recorrentes
477
+
478
+ ## Performance
479
+
480
+ - Usa `ChangeDetectionStrategy.OnPush` para melhor performance
481
+ - Signals para reatividade eficiente
482
+ - Renderização otimizada com `*ngFor`
483
+
484
+ ## Acessibilidade
485
+
486
+ - Botões clicáveis com cursor pointer
487
+ - Setas visuais indicando estado
488
+ - Estrutura semântica clara
489
+ - Suporta navegação por teclado (clique em qualquer pergunta)
490
+
491
+ ## Dicas de Customização
492
+
493
+ 1. **Cores**: Customize através de CSS custom properties (--c-neutral-*)
494
+ 2. **Fontes**: Use a família `var(--f-family)`
495
+ 3. **Animações**: Ajuste de duração no SCSS (0.2s e 0.3s)
496
+ 4. **Espaçamento**: Modifique padding e margin conforme necessário
@@ -0,0 +1,86 @@
1
+ # Filter Bar
2
+
3
+ ## Características
4
+
5
+ O `TCloudUiFilterBarComponent` é um componente Angular standalone que exibe uma barra de filtros com um botão de ação "Filtrar". Ao ser clicado, o botão emite um evento com os parâmetros de filtro configurados.
6
+
7
+ Funcionalidades principais:
8
+ - Controle de filtro por estado de lock (`com`, `sem`, `todos`).
9
+ - Emissão de evento `filterApply` ao aplicar o filtro.
10
+ - Layout flexbox com espaçamento configurável.
11
+
12
+ ## Instalação
13
+
14
+ Importe o `TCloudUiFilterBarComponent` no componente standalone:
15
+
16
+ ```typescript
17
+ import { TCloudUiFilterBarComponent } from 'tcloud-ui';
18
+
19
+ @Component({
20
+ selector: 'app-exemplo',
21
+ standalone: true,
22
+ imports: [TCloudUiFilterBarComponent],
23
+ template: '...'
24
+ })
25
+ export class ExemploComponent {}
26
+ ```
27
+
28
+ ## Propriedades (API)
29
+
30
+ ### Inputs
31
+
32
+ Este componente não possui `@Input()` públicos. O estado interno `lock` é gerenciado internamente.
33
+
34
+ ### Outputs
35
+
36
+ | Nome | Tipo de Evento | Descrição |
37
+ |-------------|---------------------------------------------|-----------------------------------------------------|
38
+ | filterApply | `{ lock?: 'com' \| 'sem' \| 'todos' }` | Emitido ao clicar no botão "Filtrar", contendo o estado atual do filtro. |
39
+
40
+ ## Exemplos de Uso
41
+
42
+ ### Uso Básico
43
+
44
+ ```html
45
+ <tcloud-ui-filter-bar (filterApply)="onFilterApply($event)"></tcloud-ui-filter-bar>
46
+ ```
47
+
48
+ ```typescript
49
+ @Component({
50
+ selector: 'app-exemplo',
51
+ standalone: true,
52
+ imports: [TCloudUiFilterBarComponent],
53
+ template: `
54
+ <tcloud-ui-filter-bar (filterApply)="onFilterApply($event)"></tcloud-ui-filter-bar>
55
+ `
56
+ })
57
+ export class ExemploComponent {
58
+ onFilterApply(event: { lock?: 'com' | 'sem' | 'todos' }): void {
59
+ console.log('Filtro aplicado:', event);
60
+ }
61
+ }
62
+ ```
63
+
64
+ ### Uso Avançado — Reagindo ao Evento de Filtro
65
+
66
+ ```typescript
67
+ @Component({
68
+ selector: 'app-exemplo',
69
+ standalone: true,
70
+ imports: [CommonModule, TCloudUiFilterBarComponent],
71
+ template: `
72
+ <tcloud-ui-filter-bar (filterApply)="onFilterApply($event)"></tcloud-ui-filter-bar>
73
+ <div *ngIf="appliedFilter">
74
+ <p>Filtro aplicado: {{ appliedFilter.lock }}</p>
75
+ </div>
76
+ `
77
+ })
78
+ export class ExemploComponent {
79
+ appliedFilter: { lock?: 'com' | 'sem' | 'todos' } | null = null;
80
+
81
+ onFilterApply(event: { lock?: 'com' | 'sem' | 'todos' }): void {
82
+ this.appliedFilter = event;
83
+ // Realizar chamada HTTP ou filtragem local
84
+ }
85
+ }
86
+ ```