@vsn-ux/ngx-gaia 0.13.1 → 0.14.1

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.
@@ -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). Use `gaFormControl` alongside `[formField]`:
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 gaFormControl gaInput [formField]="myForm.email" />
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 gaFormControl gaInput [(ngModel)]="value" required />
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 gaFormControl gaInput [(ngModel)]="password" required minlength="8" />
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 gaFormControl gaInput [formField]="emailForm.email" />
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
@@ -45,6 +45,6 @@ With form field
45
45
  ```html
46
46
  <ga-form-field>
47
47
  <ga-label>Description</ga-label>
48
- <textarea gaFormControl gaTextArea placeholder="Enter description"></textarea>
48
+ <textarea gaTextArea placeholder="Enter description"></textarea>
49
49
  </ga-form-field>
50
50
  ```
package/docs/textarea.md CHANGED
@@ -25,6 +25,6 @@ Text area in form field
25
25
  ```html
26
26
  <ga-form-field>
27
27
  <ga-label>Description</ga-label>
28
- <textarea gaFormControl gaTextArea [(ngModel)]="description"></textarea>
28
+ <textarea gaTextArea [(ngModel)]="description"></textarea>
29
29
  </ga-form-field>
30
30
  ```