@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.
- package/docs/tcloud-ui-accordion.md +345 -0
- package/docs/tcloud-ui-actions.md +88 -0
- package/docs/tcloud-ui-alert-banner.md +104 -0
- package/docs/tcloud-ui-array-to-text.md +361 -0
- package/docs/tcloud-ui-breadcrumb.md +103 -0
- package/docs/tcloud-ui-bytes.md +109 -0
- package/docs/tcloud-ui-calendar.md +387 -0
- package/docs/tcloud-ui-card-accordion.md +266 -0
- package/docs/tcloud-ui-card-title.md +47 -0
- package/docs/tcloud-ui-card.md +40 -0
- package/docs/tcloud-ui-choice-issues.md +59 -0
- package/docs/tcloud-ui-cnpj.md +102 -0
- package/docs/tcloud-ui-container.md +171 -0
- package/docs/tcloud-ui-cpf.md +102 -0
- package/docs/tcloud-ui-currency.md +271 -0
- package/docs/tcloud-ui-data-list.md +91 -0
- package/docs/tcloud-ui-datebr.md +139 -0
- package/docs/tcloud-ui-datepicker-time.md +191 -0
- package/docs/tcloud-ui-datepicker.md +186 -0
- package/docs/tcloud-ui-dropdown-multi.md +444 -0
- package/docs/tcloud-ui-dropdown.md +369 -0
- package/docs/tcloud-ui-el-copy.md +113 -0
- package/docs/tcloud-ui-empty-content.md +412 -0
- package/docs/tcloud-ui-faq.md +496 -0
- package/docs/tcloud-ui-filter-bar.md +86 -0
- package/docs/tcloud-ui-filters.md +337 -0
- package/docs/tcloud-ui-hover-parent.md +467 -0
- package/docs/tcloud-ui-icon-button.md +104 -0
- package/docs/tcloud-ui-input-container.md +520 -0
- package/docs/tcloud-ui-input-password.md +258 -0
- package/docs/tcloud-ui-input-search.md +314 -0
- package/docs/tcloud-ui-label-token.md +286 -0
- package/docs/tcloud-ui-legend.md +72 -0
- package/docs/tcloud-ui-line-step-circle.md +98 -0
- package/docs/tcloud-ui-line-step-title.md +194 -0
- package/docs/tcloud-ui-linha-logo.md +550 -0
- package/docs/tcloud-ui-loading.md +88 -0
- package/docs/tcloud-ui-message.md +539 -0
- package/docs/tcloud-ui-modal.md +196 -0
- package/docs/tcloud-ui-monthname.md +123 -0
- package/docs/tcloud-ui-multi-input.md +290 -0
- package/docs/tcloud-ui-multi-select.md +311 -0
- package/docs/tcloud-ui-multiples-values.md +157 -0
- package/docs/tcloud-ui-not-found.md +88 -0
- package/docs/tcloud-ui-number-step.md +134 -0
- package/docs/tcloud-ui-pagination.md +579 -0
- package/docs/tcloud-ui-progress-bar.md +65 -0
- package/docs/tcloud-ui-radio.md +83 -0
- package/docs/tcloud-ui-reorder-items.md +418 -0
- package/docs/tcloud-ui-respective.md +167 -0
- package/docs/tcloud-ui-scroll-box.md +109 -0
- package/docs/tcloud-ui-search-bar.md +88 -0
- package/docs/tcloud-ui-search-in-object.md +143 -0
- package/docs/tcloud-ui-search-input.md +74 -0
- package/docs/tcloud-ui-skeleton-loading.md +394 -0
- package/docs/tcloud-ui-slide-toggle.md +210 -0
- package/docs/tcloud-ui-statusinfo.md +138 -0
- package/docs/tcloud-ui-tab-group.md +376 -0
- package/docs/tcloud-ui-tab-menu.md +109 -0
- package/docs/tcloud-ui-table.md +96 -0
- package/docs/tcloud-ui-tag.md +379 -0
- package/docs/tcloud-ui-tc-badge.md +168 -0
- package/docs/tcloud-ui-tc-btn.md +189 -0
- package/docs/tcloud-ui-tc-colors.md +204 -0
- package/docs/tcloud-ui-tc-form-control.md +200 -0
- package/docs/tcloud-ui-tc-text.md +139 -0
- package/docs/tcloud-ui-tc-title.md +118 -0
- package/docs/tcloud-ui-tcloud-form.md +55 -0
- package/docs/tcloud-ui-toast.md +83 -0
- package/docs/tcloud-ui-tooltip.md +88 -0
- package/docs/tcloud-ui-topology.md +232 -0
- package/docs/tcloud-ui-upload-area.md +195 -0
- package/docs/tcloud-ui-welcome.md +112 -0
- package/docs/tcloud-ui-wizard-steps.md +103 -0
- package/js/tcloud-ui-app.js +11 -0
- package/package.json +1 -1
- package/scss/tcloud-revitalizacao/components/_tcloud-ui-table.scss +95 -0
- package/scss/tcloud-revitalizacao/tc-rev-styles.scss +1 -1
- package/scss/tcloud-revitalizacao/components/_tc-rev-table.scss +0 -57
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
# Empty Content
|
|
2
|
+
|
|
3
|
+
## Características
|
|
4
|
+
|
|
5
|
+
O componente `tcloud-ui-empty-content` é um componente simples e versátil para exibir mensagens de placeholder em áreas vazias da aplicação. Ideal para comunicar ao usuário que não há dados para exibir ou que uma seção está vazia.
|
|
6
|
+
|
|
7
|
+
## Instalação
|
|
8
|
+
|
|
9
|
+
Para utilizar o componente Empty Content, 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: `<tcloud-ui-empty-content>Nenhum item disponível</tcloud-ui-empty-content>`
|
|
20
|
+
})
|
|
21
|
+
export class ExampleComponent {}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Ou importe diretamente o componente:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { TCloudUiEmptyContentComponent } from '@tcloud-ui/lib';
|
|
28
|
+
|
|
29
|
+
@Component({
|
|
30
|
+
selector: 'app-example',
|
|
31
|
+
standalone: true,
|
|
32
|
+
imports: [TCloudUiEmptyContentComponent],
|
|
33
|
+
template: `<tcloud-ui-empty-content>Nenhum item</tcloud-ui-empty-content>`
|
|
34
|
+
})
|
|
35
|
+
export class ExampleComponent {}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Propriedades (API)
|
|
39
|
+
|
|
40
|
+
O componente `tcloud-ui-empty-content` é um componente simples que aceita conteúdo via `<ng-content>`. Não possui inputs ou outputs específicos.
|
|
41
|
+
|
|
42
|
+
**Características:**
|
|
43
|
+
- Elemento semanticamente um `<div>`
|
|
44
|
+
- Estilos pré-aplicados: padding, border-radius e cores neutras
|
|
45
|
+
- Suporta qualquer conteúdo HTML/text via `<ng-content>`
|
|
46
|
+
|
|
47
|
+
## Exemplos de Uso
|
|
48
|
+
|
|
49
|
+
### Uso Básico
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { Component } from '@angular/core';
|
|
53
|
+
import { TCloudUiModule } from '@tcloud-ui/lib';
|
|
54
|
+
|
|
55
|
+
@Component({
|
|
56
|
+
selector: 'app-basic-empty',
|
|
57
|
+
standalone: true,
|
|
58
|
+
imports: [TCloudUiModule],
|
|
59
|
+
template: `
|
|
60
|
+
<tcloud-ui-empty-content>
|
|
61
|
+
Nenhum conteúdo para exibir
|
|
62
|
+
</tcloud-ui-empty-content>
|
|
63
|
+
`
|
|
64
|
+
})
|
|
65
|
+
export class BasicEmptyComponent {}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Com Ícone e Texto Estruturado
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
import { Component } from '@angular/core';
|
|
72
|
+
import { TCloudUiModule } from '@tcloud-ui/lib';
|
|
73
|
+
import { CommonModule } from '@angular/common';
|
|
74
|
+
|
|
75
|
+
@Component({
|
|
76
|
+
selector: 'app-empty-with-icon',
|
|
77
|
+
standalone: true,
|
|
78
|
+
imports: [CommonModule, TCloudUiModule],
|
|
79
|
+
template: `
|
|
80
|
+
<tcloud-ui-empty-content>
|
|
81
|
+
<div class="empty-container">
|
|
82
|
+
<i class="fa-light fa-inbox"></i>
|
|
83
|
+
<h3>Nenhuma Mensagem</h3>
|
|
84
|
+
<p>Você não tem mensagens no momento</p>
|
|
85
|
+
</div>
|
|
86
|
+
</tcloud-ui-empty-content>
|
|
87
|
+
`,
|
|
88
|
+
styles: [`
|
|
89
|
+
.empty-container {
|
|
90
|
+
text-align: center;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
i {
|
|
94
|
+
font-size: 2rem;
|
|
95
|
+
color: var(--c-neutral-600);
|
|
96
|
+
margin-bottom: 1rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
h3 {
|
|
100
|
+
margin: 0.5rem 0;
|
|
101
|
+
color: var(--c-neutral-700);
|
|
102
|
+
font-size: 1.25rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
p {
|
|
106
|
+
margin: 0;
|
|
107
|
+
color: var(--c-neutral-600);
|
|
108
|
+
font-size: 0.875rem;
|
|
109
|
+
}
|
|
110
|
+
`]
|
|
111
|
+
})
|
|
112
|
+
export class EmptyWithIconComponent {}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Lista Vazia com CTA
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { Component } from '@angular/core';
|
|
119
|
+
import { TCloudUiModule } from '@tcloud-ui/lib';
|
|
120
|
+
import { CommonModule } from '@angular/common';
|
|
121
|
+
|
|
122
|
+
@Component({
|
|
123
|
+
selector: 'app-empty-list',
|
|
124
|
+
standalone: true,
|
|
125
|
+
imports: [CommonModule, TCloudUiModule],
|
|
126
|
+
template: `
|
|
127
|
+
<tcloud-ui-empty-content>
|
|
128
|
+
<div class="empty-list">
|
|
129
|
+
<i class="fa-light fa-list"></i>
|
|
130
|
+
<h3>Nenhum Item na Lista</h3>
|
|
131
|
+
<p>Adicione seu primeiro item para começar</p>
|
|
132
|
+
<button class="btn-primary">+ Adicionar Item</button>
|
|
133
|
+
</div>
|
|
134
|
+
</tcloud-ui-empty-content>
|
|
135
|
+
`,
|
|
136
|
+
styles: [`
|
|
137
|
+
.empty-list {
|
|
138
|
+
text-align: center;
|
|
139
|
+
padding: 2rem 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
i {
|
|
143
|
+
font-size: 3rem;
|
|
144
|
+
color: var(--c-neutral-400);
|
|
145
|
+
margin-bottom: 1.5rem;
|
|
146
|
+
display: block;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
h3 {
|
|
150
|
+
margin: 0 0 0.5rem;
|
|
151
|
+
color: var(--c-neutral-800);
|
|
152
|
+
font-size: 1.5rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
p {
|
|
156
|
+
margin: 0 0 1.5rem;
|
|
157
|
+
color: var(--c-neutral-600);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.btn-primary {
|
|
161
|
+
padding: 0.5rem 1rem;
|
|
162
|
+
background: var(--c-primary-500);
|
|
163
|
+
color: white;
|
|
164
|
+
border: none;
|
|
165
|
+
border-radius: var(--bor-radius-8);
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
font-weight: 600;
|
|
168
|
+
transition: background 200ms ease;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.btn-primary:hover {
|
|
172
|
+
background: var(--c-primary-600);
|
|
173
|
+
}
|
|
174
|
+
`]
|
|
175
|
+
})
|
|
176
|
+
export class EmptyListComponent {}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Em Tabla Vazia
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
import { Component } from '@angular/core';
|
|
183
|
+
import { TCloudUiModule } from '@tcloud-ui/lib';
|
|
184
|
+
import { CommonModule } from '@angular/common';
|
|
185
|
+
|
|
186
|
+
@Component({
|
|
187
|
+
selector: 'app-table-empty',
|
|
188
|
+
standalone: true,
|
|
189
|
+
imports: [CommonModule, TCloudUiModule],
|
|
190
|
+
template: `
|
|
191
|
+
<div class="table-container">
|
|
192
|
+
@if (items.length === 0) {
|
|
193
|
+
<tcloud-ui-empty-content>
|
|
194
|
+
<div class="empty-table">
|
|
195
|
+
<i class="fa-light fa-table"></i>
|
|
196
|
+
<p>Nenhum dado disponível na tabela</p>
|
|
197
|
+
</div>
|
|
198
|
+
</tcloud-ui-empty-content>
|
|
199
|
+
} @else {
|
|
200
|
+
<table>
|
|
201
|
+
<thead>
|
|
202
|
+
<tr>
|
|
203
|
+
<th>Nome</th>
|
|
204
|
+
<th>Email</th>
|
|
205
|
+
</tr>
|
|
206
|
+
</thead>
|
|
207
|
+
<tbody>
|
|
208
|
+
@for (item of items; track item.id) {
|
|
209
|
+
<tr>
|
|
210
|
+
<td>{{ item.name }}</td>
|
|
211
|
+
<td>{{ item.email }}</td>
|
|
212
|
+
</tr>
|
|
213
|
+
}
|
|
214
|
+
</tbody>
|
|
215
|
+
</table>
|
|
216
|
+
}
|
|
217
|
+
</div>
|
|
218
|
+
`,
|
|
219
|
+
styles: [`
|
|
220
|
+
.table-container {
|
|
221
|
+
border: 1px solid var(--c-neutral-300);
|
|
222
|
+
border-radius: var(--bor-radius-8);
|
|
223
|
+
overflow: hidden;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
table {
|
|
227
|
+
width: 100%;
|
|
228
|
+
border-collapse: collapse;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
th, td {
|
|
232
|
+
padding: 1rem;
|
|
233
|
+
text-align: left;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
th {
|
|
237
|
+
background: var(--c-neutral-100);
|
|
238
|
+
font-weight: 600;
|
|
239
|
+
border-bottom: 1px solid var(--c-neutral-300);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
td {
|
|
243
|
+
border-bottom: 1px solid var(--c-neutral-200);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.empty-table {
|
|
247
|
+
text-align: center;
|
|
248
|
+
padding: 2rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.empty-table i {
|
|
252
|
+
font-size: 2.5rem;
|
|
253
|
+
color: var(--c-neutral-400);
|
|
254
|
+
margin-bottom: 1rem;
|
|
255
|
+
display: block;
|
|
256
|
+
}
|
|
257
|
+
`]
|
|
258
|
+
})
|
|
259
|
+
export class TableEmptyComponent {
|
|
260
|
+
items: any[] = [];
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Procura Sem Resultados
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
import { Component, signal } from '@angular/core';
|
|
268
|
+
import { TCloudUiModule } from '@tcloud-ui/lib';
|
|
269
|
+
import { CommonModule } from '@angular/common';
|
|
270
|
+
import { FormsModule } from '@angular/forms';
|
|
271
|
+
|
|
272
|
+
@Component({
|
|
273
|
+
selector: 'app-search-empty',
|
|
274
|
+
standalone: true,
|
|
275
|
+
imports: [CommonModule, TCloudUiModule, FormsModule],
|
|
276
|
+
template: `
|
|
277
|
+
<div class="search-container">
|
|
278
|
+
<input
|
|
279
|
+
type="text"
|
|
280
|
+
[(ngModel)]="searchTerm"
|
|
281
|
+
placeholder="Buscar produtos..."
|
|
282
|
+
class="search-input">
|
|
283
|
+
|
|
284
|
+
@if (filteredResults.length === 0 && searchTerm.length > 0) {
|
|
285
|
+
<tcloud-ui-empty-content>
|
|
286
|
+
<div class="search-empty">
|
|
287
|
+
<i class="fa-light fa-search"></i>
|
|
288
|
+
<h4>Nenhum resultado encontrado</h4>
|
|
289
|
+
<p>Nenhum produto corresponde a "{{ searchTerm }}"</p>
|
|
290
|
+
</div>
|
|
291
|
+
</tcloud-ui-empty-content>
|
|
292
|
+
} @else if (filteredResults.length > 0) {
|
|
293
|
+
<div class="results">
|
|
294
|
+
@for (result of filteredResults; track result.id) {
|
|
295
|
+
<div class="result-item">{{ result.name }}</div>
|
|
296
|
+
}
|
|
297
|
+
</div>
|
|
298
|
+
}
|
|
299
|
+
</div>
|
|
300
|
+
`,
|
|
301
|
+
styles: [`
|
|
302
|
+
.search-container {
|
|
303
|
+
width: 100%;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.search-input {
|
|
307
|
+
width: 100%;
|
|
308
|
+
padding: 0.75rem;
|
|
309
|
+
border: 1px solid var(--c-neutral-300);
|
|
310
|
+
border-radius: var(--bor-radius-8);
|
|
311
|
+
margin-bottom: 1rem;
|
|
312
|
+
font-size: 1rem;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.search-input:focus {
|
|
316
|
+
outline: none;
|
|
317
|
+
border-color: var(--c-primary-500);
|
|
318
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.search-empty {
|
|
322
|
+
text-align: center;
|
|
323
|
+
padding: 2rem;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.search-empty i {
|
|
327
|
+
font-size: 2rem;
|
|
328
|
+
color: var(--c-neutral-500);
|
|
329
|
+
margin-bottom: 1rem;
|
|
330
|
+
display: block;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.search-empty h4 {
|
|
334
|
+
margin: 0.5rem 0;
|
|
335
|
+
color: var(--c-neutral-700);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.search-empty p {
|
|
339
|
+
margin: 0;
|
|
340
|
+
color: var(--c-neutral-600);
|
|
341
|
+
font-size: 0.875rem;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.results {
|
|
345
|
+
display: grid;
|
|
346
|
+
gap: 0.5rem;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.result-item {
|
|
350
|
+
padding: 0.75rem;
|
|
351
|
+
background: var(--c-neutral-100);
|
|
352
|
+
border-radius: var(--bor-radius-4);
|
|
353
|
+
border-left: 3px solid var(--c-primary-500);
|
|
354
|
+
}
|
|
355
|
+
`]
|
|
356
|
+
})
|
|
357
|
+
export class SearchEmptyComponent {
|
|
358
|
+
searchTerm = signal('');
|
|
359
|
+
allResults = [
|
|
360
|
+
{ id: 1, name: 'Produto A' },
|
|
361
|
+
{ id: 2, name: 'Produto B' },
|
|
362
|
+
{ id: 3, name: 'Produto C' }
|
|
363
|
+
];
|
|
364
|
+
|
|
365
|
+
get filteredResults() {
|
|
366
|
+
return this.allResults.filter(r =>
|
|
367
|
+
r.name.toLowerCase().includes(this.searchTerm.toLowerCase())
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## Estilos Aplicados
|
|
374
|
+
|
|
375
|
+
O componente aplica automaticamente os seguintes estilos:
|
|
376
|
+
|
|
377
|
+
- **Padding**: `var(--size-16)` (16px) nas direções horizontal e vertical
|
|
378
|
+
- **Background**: `var(--c-neutral-200)` (cinza claro)
|
|
379
|
+
- **Border Radius**: `var(--bor-radius-8)` (8px)
|
|
380
|
+
- **Cor do Texto**: `var(--c-neutral-700)` (cinza escuro)
|
|
381
|
+
- **Fonte**: Família padrão, tamanho pequeno
|
|
382
|
+
- **Display**: Block
|
|
383
|
+
|
|
384
|
+
## Casos de Uso
|
|
385
|
+
|
|
386
|
+
- Placeholder de lista vazia
|
|
387
|
+
- Mensagem de "sem resultados" em buscas
|
|
388
|
+
- Conteúdo não carregado ou indisponível
|
|
389
|
+
- Estado vazio de um dashboard
|
|
390
|
+
- Seção de dados vazios
|
|
391
|
+
- Feedback quando nenhum item foi encontrado
|
|
392
|
+
- Estado inicial de um aplicativo
|
|
393
|
+
- Placeholder em tabelas vazias
|
|
394
|
+
- Mensagem quando filtros não retornam dados
|
|
395
|
+
|
|
396
|
+
## Dicas de Customização
|
|
397
|
+
|
|
398
|
+
1. **Cor de Fundo**: Os estilos padrão usam `var(--c-neutral-200)`. Para customizar, envolva o componente:
|
|
399
|
+
```html
|
|
400
|
+
<div style="background: var(--c-primary-100);">
|
|
401
|
+
<tcloud-ui-empty-content>...</tcloud-ui-empty-content>
|
|
402
|
+
</div>
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
2. **Tamanho**: Use `width` e `min-height` no container externo:
|
|
406
|
+
```html
|
|
407
|
+
<div style="min-height: 300px;">
|
|
408
|
+
<tcloud-ui-empty-content>...</tcloud-ui-empty-content>
|
|
409
|
+
</div>
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
3. **Conteúdo Estruturado**: Adicione `<div>` internas para melhor controle layout
|