ngx-lite-form 1.4.10 → 1.5.0

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,6 +1,6 @@
1
1
  # Lite Form: A Lightweight and Powerful Angular Form Library
2
2
 
3
- **Lite Form is a comprehensive, open-source library of 16+ standalone components for building modern, reactive forms in Angular (v20+). It provides lightweight, customizable, and fully-typed form controls—from basic inputs to advanced data tables, loading indicators, and badge components—designed to accelerate development and improve user experience.**
3
+ **Lite Form is a comprehensive, open-source library of 18+ standalone components for building modern, reactive forms in Angular (v20+). It provides lightweight, customizable, and fully-typed form controls—from basic inputs to advanced data tables, loading indicators, and badge components—designed to accelerate development and improve user experience.**
4
4
 
5
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
6
 
@@ -47,7 +47,7 @@ Lite Form is ideal for a wide range of applications, including but not limited t
47
47
 
48
48
  ## Components
49
49
 
50
- Lite Form provides 15+ form and UI components. Click on any component below for detailed documentation:
50
+ Lite Form provides 18+ form and UI components. Click on any component below for detailed documentation:
51
51
 
52
52
  ### Form Controls
53
53
  - **[LiteInput](docs/lite-input.md)** - Text input with floating labels and validation
@@ -57,6 +57,8 @@ Lite Form provides 15+ form and UI components. Click on any component below for
57
57
  - **[LiteMultiSelect](docs/lite-multi-select.md)** - Multi-selection dropdown with inline display
58
58
  - **[LiteRadio](docs/lite-radio.md)** - Radio button group for single selection
59
59
  - **[LiteCheckbox](docs/lite-checkbox.md)** - Checkbox for boolean input
60
+ - **[LiteToggle](docs/lite-toggle.md)** - Modern iOS-style toggle switch for boolean states
61
+ - **[LiteSlider](docs/lite-slider.md)** - Range slider for numeric input with visual feedback
60
62
  - **[LiteDate](docs/lite-date.md)** - Date picker with single/range selection
61
63
  - **[LiteDateTime](docs/lite-datetime.md)** - Combined date and time picker
62
64
  - **[LiteFile](docs/lite-file.md)** - File upload with drag & drop and camera capture
@@ -93,6 +95,8 @@ import {
93
95
  LiteMultiSelect,
94
96
  LiteRadio,
95
97
  LiteCheckbox,
98
+ LiteToggle,
99
+ LiteSlider,
96
100
  LiteDate,
97
101
  LiteDateTime,
98
102
  LiteFile,
@@ -111,6 +115,7 @@ import {
111
115
  RadioFieldDto,
112
116
  DateRangeFieldDto,
113
117
  FileFieldDto,
118
+ SliderFieldDto,
114
119
  TableFieldDto,
115
120
  PaginatorFieldDto,
116
121
  LitePanelAction,
@@ -127,6 +132,8 @@ import {
127
132
  LiteMultiSelect,
128
133
  LiteRadio,
129
134
  LiteCheckbox,
135
+ LiteToggle,
136
+ LiteSlider,
130
137
  LiteDate,
131
138
  LiteDateTime,
132
139
  LiteFile,
@@ -162,6 +169,20 @@ export class AppComponent {
162
169
  // Checkbox (using basic FieldDto for boolean)
163
170
  agreeField = new FieldDto('I agree to terms', new FormControl<boolean>(false, { nonNullable: true }));
164
171
 
172
+ // Toggle switch
173
+ notificationsField = new FieldDto('Enable Notifications', new FormControl<boolean>(true, { nonNullable: true }));
174
+
175
+ // Slider
176
+ volumeField = new SliderFieldDto(
177
+ 'Volume',
178
+ new FormControl<number>(75, { nonNullable: true }),
179
+ 0,
180
+ 100,
181
+ 1,
182
+ true,
183
+ (value) => `${value}%`
184
+ );
185
+
165
186
  // Select dropdown
166
187
  countryField = new SelectFieldDto(
167
188
  'Country',
@@ -303,6 +324,8 @@ export class AppComponent {
303
324
  <lite-password [control]="passwordField" [showStrengthIndicator]="true"></lite-password>
304
325
  <lite-textarea [control]="descriptionField"></lite-textarea>
305
326
  <lite-checkbox [control]="agreeField"></lite-checkbox>
327
+ <lite-toggle [control]="notificationsField"></lite-toggle>
328
+ <lite-slider [control]="volumeField"></lite-slider>
306
329
  <lite-select [control]="countryField"></lite-select>
307
330
  <lite-multi-select [control]="skillsField"></lite-multi-select>
308
331
  <lite-radio [control]="planField"></lite-radio>
@@ -398,6 +421,8 @@ For detailed API documentation, examples, and usage guides for each component, p
398
421
  - [LiteMultiSelect Documentation](docs/lite-multi-select.md)
399
422
  - [LiteRadio Documentation](docs/lite-radio.md)
400
423
  - [LiteCheckbox Documentation](docs/lite-checkbox.md)
424
+ - [LiteToggle Documentation](docs/lite-toggle.md)
425
+ - [LiteSlider Documentation](docs/lite-slider.md)
401
426
  - [LiteDate Documentation](docs/lite-date.md)
402
427
  - [LiteDateTime Documentation](docs/lite-datetime.md)
403
428
  - [LiteFile Documentation](docs/lite-file.md)
@@ -555,6 +580,35 @@ class BadgeFieldDto {
555
580
  }
556
581
  ```
557
582
 
583
+ ### SliderFieldDto
584
+ Slider field configuration for the LiteSlider component.
585
+
586
+ ```typescript
587
+ class SliderFieldDto {
588
+ label: string;
589
+ formControl: FormControl<number>;
590
+ min?: number; // Minimum value (default: 0)
591
+ max?: number; // Maximum value (default: 100)
592
+ step?: number; // Step increment (default: 1)
593
+ showMinMax?: boolean; // Show min/max labels (default: true)
594
+ valueFormatter?: (value: number) => string; // Custom value formatter
595
+ hint?: string; // Helper text
596
+
597
+ constructor(
598
+ label: string,
599
+ formControl: FormControl<number>,
600
+ min: number = 0,
601
+ max: number = 100,
602
+ step: number = 1,
603
+ showMinMax: boolean = true,
604
+ valueFormatter?: (value: number) => string,
605
+ hint?: string
606
+ )
607
+ }
608
+ ```
609
+
610
+ **Note:** LiteToggle uses the standard `FieldDto` with a `FormControl<boolean>`.
611
+
558
612
  ---
559
613
 
560
614
  ## Validation