ngx-lite-form 1.4.4 → 1.4.8
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 +24 -10
- package/fesm2022/ngx-lite-form.mjs +155 -39
- package/fesm2022/ngx-lite-form.mjs.map +1 -1
- package/index.d.ts +47 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,6 +68,7 @@ Lite Form provides 15+ form and UI components. Click on any component below for
|
|
|
68
68
|
### UI Components
|
|
69
69
|
- **[LitePanel](docs/lite-panel.md)** - Modal panel for dialogs and forms
|
|
70
70
|
- **[LiteLoading](docs/lite-loading.md)** - Loading spinner and progress bar
|
|
71
|
+
- **[LiteTabGroup](docs/lite-tab-group.md)** - Tabs with sliding track and Angular projection
|
|
71
72
|
- **[LiteSnackbar](docs/lite-snackbar.md)** - Toast notifications service
|
|
72
73
|
|
|
73
74
|
---
|
|
@@ -135,7 +136,11 @@ import {
|
|
|
135
136
|
})
|
|
136
137
|
export class AppComponent {
|
|
137
138
|
// Basic input
|
|
138
|
-
nameField
|
|
139
|
+
nameField: FieldDto = {
|
|
140
|
+
label: 'Full Name',
|
|
141
|
+
formControl: new FormControl(''),
|
|
142
|
+
hint: 'Enter your full legal name'
|
|
143
|
+
} as FieldDto;
|
|
139
144
|
|
|
140
145
|
// Number input
|
|
141
146
|
ageField = new FieldDto('Age', new FormControl(0), 2, 'number');
|
|
@@ -158,7 +163,8 @@ export class AppComponent {
|
|
|
158
163
|
'Country',
|
|
159
164
|
new FormControl(''),
|
|
160
165
|
['USA', 'Canada', 'Mexico'],
|
|
161
|
-
(option) => option
|
|
166
|
+
(option) => option,
|
|
167
|
+
'Select your country of residence'
|
|
162
168
|
);
|
|
163
169
|
|
|
164
170
|
// Multi-select
|
|
@@ -190,13 +196,16 @@ export class AppComponent {
|
|
|
190
196
|
};
|
|
191
197
|
|
|
192
198
|
// File upload
|
|
193
|
-
fileField = new FileFieldDto(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
fileField = new FileFieldDto(
|
|
200
|
+
'Attachments',
|
|
201
|
+
new FormControl([]),
|
|
202
|
+
true, // multiple
|
|
203
|
+
'image/*,application/pdf', // accept
|
|
204
|
+
5 * 1024 * 1024, // maxFileSize
|
|
205
|
+
5, // maxFiles
|
|
206
|
+
true, // showPreview
|
|
207
|
+
'Upload up to 5 files (max 5MB each).' // hint
|
|
208
|
+
);
|
|
200
209
|
|
|
201
210
|
// Table with custom columns, sorting, and row selection
|
|
202
211
|
employeeTable = new TableFieldDto(
|
|
@@ -366,6 +375,7 @@ For detailed API documentation, examples, and usage guides for each component, p
|
|
|
366
375
|
- [LitePaginator Documentation](docs/lite-paginator.md)
|
|
367
376
|
- [LitePanel Documentation](docs/lite-panel.md)
|
|
368
377
|
- [LiteLoading Documentation](docs/lite-loading.md)
|
|
378
|
+
- [LiteTabGroup Documentation](docs/lite-tab-group.md)
|
|
369
379
|
- [LiteSnackbar Documentation](docs/lite-snackbar.md)
|
|
370
380
|
|
|
371
381
|
---
|
|
@@ -389,6 +399,8 @@ class FieldDto {
|
|
|
389
399
|
label: string;
|
|
390
400
|
formControl: FormControl;
|
|
391
401
|
rows?: number; // For textarea only
|
|
402
|
+
type?: 'text' | 'number';
|
|
403
|
+
hint?: string; // Helper text displayed below the field
|
|
392
404
|
}
|
|
393
405
|
```
|
|
394
406
|
|
|
@@ -400,6 +412,7 @@ abstract class BaseSelectFieldDto<T> {
|
|
|
400
412
|
label: string;
|
|
401
413
|
options: T[];
|
|
402
414
|
displayWith: (option: T) => string;
|
|
415
|
+
hint?: string; // Helper text displayed below the field
|
|
403
416
|
}
|
|
404
417
|
```
|
|
405
418
|
|
|
@@ -442,6 +455,7 @@ class FileFieldDto {
|
|
|
442
455
|
maxFileSize?: number; // Maximum file size in bytes (default: 10MB)
|
|
443
456
|
maxFiles?: number; // Maximum number of files allowed (default: 10)
|
|
444
457
|
showPreview?: boolean; // Show image previews (default: true)
|
|
458
|
+
hint?: string; // Helper text displayed below the field
|
|
445
459
|
}
|
|
446
460
|
```
|
|
447
461
|
|
|
@@ -548,4 +562,4 @@ This project is licensed under the MIT License - see the [LICENSE](https://githu
|
|
|
548
562
|
|
|
549
563
|
---
|
|
550
564
|
## Changelog
|
|
551
|
-
- See [docs/CHANGELOG.md](https://github.com/liangk/lite-form/blob/main/docs/CHANGELOG.md) for the full historical record, including the latest `v1.4.
|
|
565
|
+
- See [docs/CHANGELOG.md](https://github.com/liangk/lite-form/blob/main/docs/CHANGELOG.md) for the full historical record, including the latest `v1.4.5` release with LiteTabGroup and tab sliding/size fixes.
|