ps-helix 3.0.8 → 4.0.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
@@ -2,7 +2,7 @@
2
2
 
3
3
  A comprehensive Angular component library built with Angular 21+ featuring modern design patterns, accessibility-first development, and optimal developer experience.
4
4
 
5
- [![npm version](https://img.shields.io/badge/npm-3.0.8-blue.svg)](https://www.npmjs.com/package/ps-helix)
5
+ [![npm version](https://img.shields.io/badge/npm-4.0.0-blue.svg)](https://www.npmjs.com/package/ps-helix)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
  [![Angular](https://img.shields.io/badge/Angular-21.0.3-red.svg)](https://angular.dev/)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.9.0-blue.svg)](https://www.typescriptlang.org/)
@@ -87,26 +87,14 @@ The following dependencies are bundled with ps-helix:
87
87
 
88
88
  ## Installation
89
89
 
90
- Install the package via your preferred package manager:
90
+ Install the package:
91
91
 
92
- **Avec pnpm (recommandé) :**
93
- ```bash
94
- pnpm add ps-helix
95
- ```
96
-
97
- **Avec npm :**
98
92
  ```bash
99
93
  npm install ps-helix
100
94
  ```
101
95
 
102
96
  All peer dependencies should be automatically installed. If not, install them manually:
103
97
 
104
- **Avec pnpm :**
105
- ```bash
106
- pnpm add @angular/common@^21.0.3 @angular/core@^21.0.3 @angular/forms@^21.0.3 @ngx-translate/core@^15.0.0 rxjs@^7.8.0
107
- ```
108
-
109
- **Avec npm :**
110
98
  ```bash
111
99
  npm install @angular/common@^21.0.3 @angular/core@^21.0.3 @angular/forms@^21.0.3 @ngx-translate/core@^15.0.0 rxjs@^7.8.0
112
100
  ```
@@ -118,7 +106,7 @@ After installation, verify that ps-helix is in your `package.json`:
118
106
  ```json
119
107
  {
120
108
  "dependencies": {
121
- "ps-helix": "^3.0.8"
109
+ "ps-helix": "^4.0.0"
122
110
  }
123
111
  }
124
112
  ```
@@ -457,6 +445,18 @@ export class ExampleComponent {
457
445
  }
458
446
  ```
459
447
 
448
+ ### Signal Forms Support
449
+
450
+ Form components natively implement Angular 21 Signal Forms interfaces (`FormValueControl`, `FormCheckboxControl`) while maintaining backward compatibility with Reactive Forms via `ControlValueAccessor`:
451
+
452
+ | Component | Signal Forms Interface | Reactive Forms |
453
+ |-----------|----------------------|----------------|
454
+ | `psh-input` | `FormValueControl<string>` | `ControlValueAccessor` |
455
+ | `psh-select` | `FormValueControl<T \| T[] \| null>` | `ControlValueAccessor` |
456
+ | `psh-checkbox` | `FormCheckboxControl` | `ControlValueAccessor` |
457
+ | `psh-switch` | `FormCheckboxControl` | `ControlValueAccessor` |
458
+ | `psh-radio` | - | Property binding only |
459
+
460
460
  ### Type Safety
461
461
 
462
462
  All components export TypeScript types for type-safe development:
@@ -948,8 +948,28 @@ export class MyComponent {
948
948
 
949
949
  ### Form Integration
950
950
 
951
+ Form components (`psh-input`, `psh-checkbox`, `psh-select`, `psh-switch`) support three integration modes:
952
+
951
953
  ```typescript
952
- // ✅ Good: Reactive forms with FormControl
954
+ // ✅ Recommended: Signal Forms (Angular 21+)
955
+ import { signal } from '@angular/core';
956
+ import { form, FormField, required, email } from '@angular/forms/signals';
957
+
958
+ export class MyComponent {
959
+ model = signal({ email: '', password: '' });
960
+ loginForm = form(this.model, (p) => {
961
+ required(p.email, { message: 'Email required' });
962
+ email(p.email, { message: 'Invalid email format' });
963
+ });
964
+ }
965
+ ```
966
+
967
+ ```html
968
+ <psh-input [formField]="loginForm.email" type="email" label="Email" />
969
+ ```
970
+
971
+ ```typescript
972
+ // ✅ Also supported: Reactive Forms (backward compatible)
953
973
  import { FormControl, Validators } from '@angular/forms';
954
974
 
955
975
  export class MyComponent {
@@ -961,11 +981,12 @@ export class MyComponent {
961
981
  ```
962
982
 
963
983
  ```html
964
- <psh-input
965
- label="Email"
966
- [formControl]="emailControl"
967
- [required]="true">
968
- </psh-input>
984
+ <psh-input label="Email" [formControl]="emailControl" [required]="true" />
985
+ ```
986
+
987
+ ```html
988
+ <!-- ✅ Also supported: Two-way binding -->
989
+ <psh-input [(value)]="myValue" label="Email" />
969
990
  ```
970
991
 
971
992
  ### Performance Optimization
@@ -1067,9 +1088,7 @@ See [THEME.md](./THEME.md) for complete theming documentation.
1067
1088
  1. Verify Angular version is 21.0.3 or higher
1068
1089
  2. Check `tsconfig.json` has `"strict": true`
1069
1090
  3. Ensure all peer dependencies are installed
1070
- 4. Clear node_modules and reinstall:
1071
- - Avec pnpm: `rm -rf node_modules && pnpm install`
1072
- - Avec npm: `rm -rf node_modules && npm install`
1091
+ 4. Clear node_modules and reinstall: `rm -rf node_modules && npm install`
1073
1092
 
1074
1093
  ### Performance Issues
1075
1094
 
@@ -1118,16 +1137,6 @@ Helix Design System supports:
1118
1137
 
1119
1138
  The following scripts are available for library development:
1120
1139
 
1121
- **Avec pnpm (recommandé) :**
1122
- ```bash
1123
- pnpm run build:lib # Build the library
1124
- pnpm run watch:lib # Watch for changes and rebuild
1125
- pnpm run publish:lib # Publish to npm registry
1126
- pnpm run build # Build demo application
1127
- pnpm run dev # Run demo application in dev mode
1128
- ```
1129
-
1130
- **Avec npm :**
1131
1140
  ```bash
1132
1141
  npm run build:lib # Build the library
1133
1142
  npm run watch:lib # Watch for changes and rebuild
@@ -1173,7 +1182,7 @@ Copyright (c) 2025 PACK Solutions
1173
1182
 
1174
1183
  ---
1175
1184
 
1176
- **Version**: 3.0.8
1185
+ **Version**: 4.0.0
1177
1186
  **Built with**: Angular 21.0.3, TypeScript 5.9.0, Phosphor Icons 2.0.3
1178
1187
  **Author**: Fabrice PEREZ | Product Designer at PACK Solutions
1179
1188
  **Last Updated**: January 2026