@telcomdev/ui 0.0.4 → 0.0.5

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 CHANGED
@@ -1,5 +1,63 @@
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
+ Para usar componentes basados en Overlay, como `TdDialog`, agrega el estilo
41
+ estructural del CDK en `angular.json`:
42
+
43
+ ```json
44
+ "styles": [
45
+ "node_modules/@angular/cdk/overlay-prebuilt.css",
46
+ "src/styles.scss"
47
+ ]
48
+ ```
49
+
50
+ Los diálogos pueden abrir cualquier componente standalone. El contenido decide
51
+ libremente sus acciones:
52
+
53
+ ```html
54
+ <td-dialog-actions>
55
+ <button type="button" [tdDialogClose]="false">Cancelar</button>
56
+ <button type="button" (click)="guardarBorrador()">Borrador</button>
57
+ <button type="submit" tdDialogPrimary>Guardar</button>
58
+ </td-dialog-actions>
59
+ ```
60
+
3
61
  ## Iconos
4
62
 
5
63
  ```ts