@telcomdev/ui 0.0.6 → 0.0.7
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 +41 -0
- package/fesm2022/telcomdev-ui.mjs +917 -141
- package/fesm2022/telcomdev-ui.mjs.map +1 -1
- package/package.json +4 -1
- package/types/telcomdev-ui.d.ts +189 -56
package/README.md
CHANGED
|
@@ -296,6 +296,47 @@ Iconos incluidos: `home`, `dashboard`, `folder`, `settings`, `people`, `person`,
|
|
|
296
296
|
`security`, `inventory`, `shopping_cart`, `receipt`, `assessment`, `description` y
|
|
297
297
|
`business`.
|
|
298
298
|
|
|
299
|
+
## Signal Forms
|
|
300
|
+
|
|
301
|
+
`TdInput`, `TdSelect`, `TdAutocompleteSelect` y `TdDatePicker` implementan
|
|
302
|
+
`FormValueControl` y conservan soporte para `ngModel` y Reactive Forms.
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
import { signal } from '@angular/core';
|
|
306
|
+
import { form, FormField } from '@angular/forms/signals';
|
|
307
|
+
|
|
308
|
+
readonly model = signal({
|
|
309
|
+
nombre: '',
|
|
310
|
+
periodo: null as TdDatePickerValue,
|
|
311
|
+
});
|
|
312
|
+
readonly fields = form(this.model);
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
```html
|
|
316
|
+
<td-input [formField]="fields.nombre" />
|
|
317
|
+
<td-date-picker mode="rango" [formField]="fields.periodo" />
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Date Picker
|
|
321
|
+
|
|
322
|
+
```html
|
|
323
|
+
<td-date-picker
|
|
324
|
+
label="Fecha de emisión"
|
|
325
|
+
min="2026-01-01"
|
|
326
|
+
max="2027-12-31"
|
|
327
|
+
[(ngModel)]="fecha"
|
|
328
|
+
/>
|
|
329
|
+
|
|
330
|
+
<td-date-picker
|
|
331
|
+
label="Periodo"
|
|
332
|
+
mode="rango"
|
|
333
|
+
[(ngModel)]="rango"
|
|
334
|
+
/>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Las fechas se almacenan como `YYYY-MM-DD`. En modo rango el valor tiene la forma
|
|
338
|
+
`{ inicio: string, fin: string | null }`.
|
|
339
|
+
|
|
299
340
|
## Build
|
|
300
341
|
|
|
301
342
|
```bash
|