@telcomdev/ui 0.0.4 → 0.0.6
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 +74 -0
- package/fesm2022/telcomdev-ui.mjs +1748 -9
- package/fesm2022/telcomdev-ui.mjs.map +1 -1
- package/package.json +7 -2
- package/types/telcomdev-ui.d.ts +419 -4
package/README.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# Telcomdev UI
|
|
2
2
|
|
|
3
|
+
## Input outline
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<td-input
|
|
7
|
+
label="Nombre completo"
|
|
8
|
+
icon="person"
|
|
9
|
+
[clearable]="true"
|
|
10
|
+
[(ngModel)]="nombre"
|
|
11
|
+
/>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`TdInput` es compatible con `ngModel` y formularios reactivos. La etiqueta y
|
|
15
|
+
el borde outline permanecen visibles en todos los estados.
|
|
16
|
+
|
|
17
|
+
## Selects
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<td-select
|
|
21
|
+
label="Estado"
|
|
22
|
+
[options]="estados"
|
|
23
|
+
[(ngModel)]="estado"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<td-autocomplete-select
|
|
27
|
+
label="Ciudad"
|
|
28
|
+
[options]="ciudades"
|
|
29
|
+
[(ngModel)]="ciudad"
|
|
30
|
+
/>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Ambos controles usan `TdSelectOption<T>`, son compatibles con formularios
|
|
34
|
+
Angular y muestran su panel mediante Angular CDK Overlay.
|
|
35
|
+
|
|
36
|
+
El comportamiento predeterminado durante el scroll es `reposition`, por lo que
|
|
37
|
+
el panel permanece unido al control. Puede cambiarse con
|
|
38
|
+
`scrollBehavior="close"`.
|
|
39
|
+
|
|
40
|
+
## Tabs
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<td-tabs [(selectedIndex)]="indice">
|
|
44
|
+
<td-tab label="General" icon="settings">
|
|
45
|
+
<app-general />
|
|
46
|
+
</td-tab>
|
|
47
|
+
<td-tab label="Usuarios" icon="people" [badge]="12">
|
|
48
|
+
<app-usuarios />
|
|
49
|
+
</td-tab>
|
|
50
|
+
</td-tabs>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Incluye las variantes `linea`, `pastilla` y `contenida`, además de navegación
|
|
54
|
+
con flechas, Home y End.
|
|
55
|
+
|
|
56
|
+
Para usar componentes basados en Overlay, como `TdDialog`, agrega el estilo
|
|
57
|
+
estructural del CDK en `angular.json`:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
"styles": [
|
|
61
|
+
"node_modules/@angular/cdk/overlay-prebuilt.css",
|
|
62
|
+
"src/styles.scss"
|
|
63
|
+
]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Los diálogos pueden abrir cualquier componente standalone. El contenido decide
|
|
67
|
+
libremente sus acciones:
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<td-dialog-actions>
|
|
71
|
+
<button type="button" [tdDialogClose]="false">Cancelar</button>
|
|
72
|
+
<button type="button" (click)="guardarBorrador()">Borrador</button>
|
|
73
|
+
<button type="submit" tdDialogPrimary>Guardar</button>
|
|
74
|
+
</td-dialog-actions>
|
|
75
|
+
```
|
|
76
|
+
|
|
3
77
|
## Iconos
|
|
4
78
|
|
|
5
79
|
```ts
|