ngx-lite-form 1.3.1 → 1.3.2
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 +77 -40
- package/fesm2022/ngx-lite-form.mjs +26 -26
- package/fesm2022/ngx-lite-form.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,33 @@
|
|
|
1
|
-
# Lite Form
|
|
1
|
+
# Lite Form: A Lightweight and Powerful Angular Form Library
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
**Lite Form is a comprehensive, open-source library of 12+ standalone components for building modern, reactive forms in Angular (v17+). It provides lightweight, customizable, and fully-typed form controls—from basic inputs to advanced data tables—designed to accelerate development and improve user experience.**
|
|
4
|
+
|
|
5
|
+
This library is built for developers who need a robust, out-of-the-box solution for form-heavy applications without the overhead of heavy-weight dependencies. All components are standalone, tree-shakable, and integrate seamlessly with Angular's Reactive Forms module.
|
|
6
|
+
|
|
7
|
+
## Why Choose Lite Form?
|
|
8
|
+
|
|
9
|
+
- **🚀 Accelerate Development**: Get a complete suite of form controls ready to use, including complex components like date pickers, file uploads, and data tables. Drastically reduce boilerplate code.
|
|
10
|
+
- **💎 Lightweight & Performant**: Built with modern Angular practices. All components are standalone and tree-shakable, ensuring a minimal bundle size.
|
|
11
|
+
- **✅ Fully Typed & Integrated**: Enjoy excellent developer experience with fully-typed APIs for all components and Data Transfer Objects (DTOs), ensuring type safety and easier integration.
|
|
12
|
+
- **🎨 Highly Customizable**: While providing a clean default UI, the library is designed for easy styling. A clear SCSS structure and BEM-style classes allow for deep customization to match your brand.
|
|
13
|
+
- **🔒 Secure & Accessible**: Components are built with security and accessibility (ARIA) in mind, including advanced password strength analysis and accessible form field structures.
|
|
14
|
+
|
|
15
|
+
## Live Demo
|
|
16
|
+
|
|
17
|
+
Experience Lite Form in action with our interactive live demo on StackBlitz. Test out all the components and see how they work in a real Angular application.
|
|
18
|
+
|
|
19
|
+
[**🚀 Launch Live Demo on StackBlitz**](https://stackblitz.com/edit/angular-ivy-hfgxpd?file=src%2Fapp%2Fapp.ts)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Use Cases
|
|
23
|
+
|
|
24
|
+
Lite Form is ideal for a wide range of applications, including but not limited to:
|
|
25
|
+
|
|
26
|
+
- **Enterprise Applications**: Build complex forms for data entry, configuration, and management with robust validation.
|
|
27
|
+
- **Dashboards and Admin Panels**: Quickly create settings pages, user management forms, and data tables.
|
|
28
|
+
- **Customer-Facing Websites**: Implement user-friendly registration, login, and profile forms.
|
|
29
|
+
- **E-commerce**: Develop streamlined checkout processes and product configuration forms.
|
|
30
|
+
- **Internal Tools**: Rapidly prototype and build internal tools for data collection and management.
|
|
5
31
|
|
|
6
32
|
## Features
|
|
7
33
|
- ✅ **Modern Angular 20+** - Built with standalone components, signals, and latest CLI tooling
|
|
@@ -291,9 +317,10 @@ export class AppComponent {
|
|
|
291
317
|
|
|
292
318
|
**Selector:** `lite-input`
|
|
293
319
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
320
|
+
| Input | Type | Default | Description |
|
|
321
|
+
| :------- | :---------- | :------ | :---------------------------------------- |
|
|
322
|
+
| `control`| `FieldDto` | - | Field configuration and form control. |
|
|
323
|
+
| `inEdit` | `boolean` | `true` | Toggles between edit and read-only mode. |
|
|
297
324
|
|
|
298
325
|
**Example:**
|
|
299
326
|
```typescript
|
|
@@ -308,11 +335,12 @@ nameField = new FieldDto('Full Name', new FormControl('', [Validators.required])
|
|
|
308
335
|
|
|
309
336
|
**Selector:** `lite-password`
|
|
310
337
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
338
|
+
| Input | Type | Default | Description |
|
|
339
|
+
| :---------------------- | :-------- | :------ | :----------------------------------------------------- |
|
|
340
|
+
| `control` | `FieldDto`| - | Field configuration and form control. |
|
|
341
|
+
| `inEdit` | `boolean` | `true` | Toggles between edit and read-only mode. |
|
|
342
|
+
| `showToggle` | `boolean` | `true` | If `true`, shows the password visibility toggle button. |
|
|
343
|
+
| `showStrengthIndicator` | `boolean` | `false` | If `true`, shows the password strength analysis bar. |
|
|
316
344
|
|
|
317
345
|
**Features:**
|
|
318
346
|
- Password visibility toggle with eye/eye-off icons
|
|
@@ -355,9 +383,10 @@ const analysis = FormUtils.analyzePasswordStrength('MyStr0ng@Pass');
|
|
|
355
383
|
|
|
356
384
|
**Selector:** `lite-textarea`
|
|
357
385
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
386
|
+
| Input | Type | Default | Description |
|
|
387
|
+
| :-------- | :--------- | :------ | :------------------------------------------------------------ |
|
|
388
|
+
| `control` | `FieldDto` | - | Field configuration, including `rows` for initial height. |
|
|
389
|
+
| `inEdit` | `boolean` | `true` | Toggles between edit and read-only mode. |
|
|
361
390
|
|
|
362
391
|
**Example:**
|
|
363
392
|
```typescript
|
|
@@ -373,9 +402,10 @@ descriptionField = new FieldDto('Description', new FormControl(''), 4);
|
|
|
373
402
|
|
|
374
403
|
**Selector:** `lite-select`
|
|
375
404
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
405
|
+
| Input | Type | Default | Description |
|
|
406
|
+
| :-------- | :------------------ | :------ | :----------------------------------------------- |
|
|
407
|
+
| `control` | `SelectFieldDto<T>` | - | Field configuration, including `options`. |
|
|
408
|
+
| `inEdit` | `boolean` | `true` | Toggles between edit and read-only mode. |
|
|
379
409
|
|
|
380
410
|
**Example:**
|
|
381
411
|
```typescript
|
|
@@ -398,9 +428,10 @@ statusField = new SelectFieldDto(
|
|
|
398
428
|
|
|
399
429
|
**Selector:** `lite-multi-select`
|
|
400
430
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
431
|
+
| Input | Type | Default | Description |
|
|
432
|
+
| :-------- | :----------------------- | :------ | :----------------------------------------------- |
|
|
433
|
+
| `control` | `MultiSelectFieldDto<T>` | - | Field configuration, including `options`. |
|
|
434
|
+
| `inEdit` | `boolean` | `true` | Toggles between edit and read-only mode. |
|
|
404
435
|
|
|
405
436
|
**Features:**
|
|
406
437
|
- Inline selected items display
|
|
@@ -426,11 +457,12 @@ tagsField = new MultiSelectFieldDto(
|
|
|
426
457
|
|
|
427
458
|
**Selector:** `lite-date`
|
|
428
459
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
460
|
+
| Input | Type | Default | Description |
|
|
461
|
+
| :-------- | :---------------------------- | :------------- | :----------------------------------------------- |
|
|
462
|
+
| `control` | `FieldDto` or `DateRangeFieldDto` | - | Field configuration for single or range date. |
|
|
463
|
+
| `inEdit` | `boolean` | `true` | Toggles between edit and read-only mode. |
|
|
464
|
+
| `format` | `string` | `'dd/MM/yyyy'` | Date display format string. |
|
|
465
|
+
| `range` | `boolean` | `false` | If `true`, enables date range selection mode. |
|
|
434
466
|
|
|
435
467
|
**Features:**
|
|
436
468
|
- Single date and date range selection
|
|
@@ -483,9 +515,10 @@ eventDateField: DateRangeFieldDto = {
|
|
|
483
515
|
|
|
484
516
|
**Selector:** `lite-file`
|
|
485
517
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
518
|
+
| Input | Type | Default | Description |
|
|
519
|
+
| :-------- | :------------- | :------ | :----------------------------------------------- |
|
|
520
|
+
| `control` | `FileFieldDto` | - | Field configuration for file uploads. |
|
|
521
|
+
| `inEdit` | `boolean` | `true` | Toggles between edit and read-only mode. |
|
|
489
522
|
|
|
490
523
|
**Features:**
|
|
491
524
|
- File upload via button, drag & drop, or camera capture (on supported devices)
|
|
@@ -537,13 +570,15 @@ imageField = new FileFieldDto(
|
|
|
537
570
|
|
|
538
571
|
**Selector:** `lite-table`
|
|
539
572
|
|
|
540
|
-
|
|
541
|
-
|
|
573
|
+
| Input | Type | Default | Description |
|
|
574
|
+
| :------ | :------------------ | :------ | :----------------------------------------------- |
|
|
575
|
+
| `table` | `TableFieldDto<T>` | - | Table configuration including columns and data. |
|
|
542
576
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
577
|
+
| Output | Type | Description |
|
|
578
|
+
| :------------------- | :------------------------------- | :----------------------------------------------------- |
|
|
579
|
+
| `pageChange` | `number` | Emitted with the new page number on page change. |
|
|
580
|
+
| `itemsPerPageChange` | `number` | Emitted with the new items-per-page count. |
|
|
581
|
+
| `menuAction` | `{ action: string; row: T }` | Emitted when a row action is selected from a menu. |
|
|
547
582
|
|
|
548
583
|
**Features:**
|
|
549
584
|
- Flexbox-based responsive layout for modern table design
|
|
@@ -626,12 +661,14 @@ onRowMenuAction(event: { action: string; row: any }) {
|
|
|
626
661
|
|
|
627
662
|
**Selector:** `lite-paginator`
|
|
628
663
|
|
|
629
|
-
|
|
630
|
-
|
|
664
|
+
| Input | Type | Default | Description |
|
|
665
|
+
| :---------- | :------------------ | :------ | :----------------------------------------------- |
|
|
666
|
+
| `paginator` | `PaginatorFieldDto` | - | Paginator configuration object. |
|
|
631
667
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
668
|
+
| Output | Type | Description |
|
|
669
|
+
| :------------------- | :------- | :----------------------------------------------- |
|
|
670
|
+
| `pageChange` | `number` | Emitted with the new page number on page change. |
|
|
671
|
+
| `itemsPerPageChange` | `number` | Emitted with the new items-per-page count. |
|
|
635
672
|
|
|
636
673
|
**Features:**
|
|
637
674
|
- Previous/Next navigation buttons with disabled states
|
|
@@ -851,4 +888,4 @@ This project is licensed under the MIT License - see the [LICENSE](https://githu
|
|
|
851
888
|
---
|
|
852
889
|
|
|
853
890
|
## Changelog
|
|
854
|
-
- See [docs/CHANGELOG.md](https://github.com/liangk/lite-form/blob/main/docs/CHANGELOG.md) for the full historical record, including the latest `v1.3.
|
|
891
|
+
- See [docs/CHANGELOG.md](https://github.com/liangk/lite-form/blob/main/docs/CHANGELOG.md) for the full historical record, including the latest `v1.3.2` release adding `LiteTable` single-action button rendering for one-item menus and neutral default styling (with optional `danger` variant).
|