@vsn-ux/ngx-gaia 0.13.1 → 0.14.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/docs/form-field.md +18 -7
- package/docs/text-area.md +1 -1
- package/docs/textarea.md +1 -1
- package/fesm2022/vsn-ux-ngx-gaia.mjs +128 -75
- package/fesm2022/vsn-ux-ngx-gaia.mjs.map +1 -1
- package/package.json +1 -1
- package/types/vsn-ux-ngx-gaia.d.ts +39 -26
package/docs/form-field.md
CHANGED
|
@@ -33,12 +33,24 @@ Information text component.
|
|
|
33
33
|
|
|
34
34
|
## `[gaFormControl]`
|
|
35
35
|
|
|
36
|
-
Form control directive.
|
|
36
|
+
Form control directive that tracks validation state and manages ARIA attributes (`aria-invalid`, `aria-errormessage`). Automatically applied as a host directive on Gaia form controls (`gaInput`, `gaTextArea`, `ga-select`, `ga-data-select`, `ga-switch`, `ga-checkbox`, `ga-radio-group`). Use it explicitly only for custom (non-Gaia) controls inside `<ga-form-field>`.
|
|
37
37
|
|
|
38
38
|
### Inputs
|
|
39
39
|
|
|
40
40
|
- `gaFormControl: NgControl | string` - Optional explicit NgControl reference or control name
|
|
41
41
|
|
|
42
|
+
## `[gaFormFieldIgnore]`
|
|
43
|
+
|
|
44
|
+
Opt-out directive. When placed on a Gaia form control inside `<ga-form-field>`, prevents its implicit `gaFormControl` from registering with the form field. Useful when multiple form controls exist in a single form field and only one should drive the error callout.
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<ga-form-field>
|
|
48
|
+
<ga-label>Primary</ga-label>
|
|
49
|
+
<input gaInput [formControl]="mainCtrl" />
|
|
50
|
+
<ga-select gaFormFieldIgnore [formControl]="auxCtrl">...</ga-select>
|
|
51
|
+
</ga-form-field>
|
|
52
|
+
```
|
|
53
|
+
|
|
42
54
|
## `[gaError]`
|
|
43
55
|
|
|
44
56
|
Directive for defining error message templates. Displays the template when the specified error key exists on the control. Does not set errors; only provides the message display for existing errors.
|
|
@@ -69,12 +81,12 @@ Standalone directive for connecting form controls to form field labels. Import `
|
|
|
69
81
|
|
|
70
82
|
## Signal Forms Support
|
|
71
83
|
|
|
72
|
-
The form field works with Angular Signal Forms (`[formField]` directive)
|
|
84
|
+
The form field works with Angular Signal Forms (`[formField]` directive):
|
|
73
85
|
|
|
74
86
|
```html
|
|
75
87
|
<ga-form-field>
|
|
76
88
|
<ga-label>Email</ga-label>
|
|
77
|
-
<input
|
|
89
|
+
<input gaInput [formField]="myForm.email" />
|
|
78
90
|
</ga-form-field>
|
|
79
91
|
```
|
|
80
92
|
|
|
@@ -93,7 +105,7 @@ Complete form field
|
|
|
93
105
|
```html
|
|
94
106
|
<ga-form-field>
|
|
95
107
|
<ga-label state="(optional)" definition="Help text">Field Label</ga-label>
|
|
96
|
-
<input
|
|
108
|
+
<input gaInput [(ngModel)]="value" required />
|
|
97
109
|
<ga-info>Additional information</ga-info>
|
|
98
110
|
<ng-template gaError="required">This field is required</ng-template>
|
|
99
111
|
</ga-form-field>
|
|
@@ -105,7 +117,6 @@ Manually setting errors with gaFormControlErrors
|
|
|
105
117
|
<ga-form-field>
|
|
106
118
|
<ga-label>Password</ga-label>
|
|
107
119
|
<input
|
|
108
|
-
gaFormControl
|
|
109
120
|
gaInput
|
|
110
121
|
[gaFormControlErrors]="{ weakPassword: isPasswordWeak ? 'Password too weak' : null }"
|
|
111
122
|
[(ngModel)]="password"
|
|
@@ -155,7 +166,7 @@ Global error override behavior
|
|
|
155
166
|
```html
|
|
156
167
|
<ga-form-field>
|
|
157
168
|
<ga-label>Password</ga-label>
|
|
158
|
-
<input
|
|
169
|
+
<input gaInput [(ngModel)]="password" required minlength="8" />
|
|
159
170
|
<!-- This custom template overrides the global 'required' error -->
|
|
160
171
|
<ng-template gaError="required">Password is required</ng-template>
|
|
161
172
|
<!-- The 'minlength' error will use the global message if configured -->
|
|
@@ -175,7 +186,7 @@ emailForm = form(this.model, (schemaPath) => {
|
|
|
175
186
|
```html
|
|
176
187
|
<ga-form-field>
|
|
177
188
|
<ga-label>Email</ga-label>
|
|
178
|
-
<input
|
|
189
|
+
<input gaInput [formField]="emailForm.email" />
|
|
179
190
|
<!-- No gaError templates needed — messages from validators are used automatically -->
|
|
180
191
|
</ga-form-field>
|
|
181
192
|
```
|
package/docs/text-area.md
CHANGED
package/docs/textarea.md
CHANGED