ng-hub-ui-forms 22.43.0 → 22.44.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-hub-ui-forms",
3
- "version": "22.43.0",
3
+ "version": "22.44.0",
4
4
  "license": "MIT",
5
5
  "description": "Accessible, signal-based form fields for Angular (input, textarea, slider, segmented, select, datepicker, file input with drag & drop and upload progress) with automatic error display for controls, FormGroups and FormArrays. Reactive Forms today, Signal Forms ready. Part of the ng-hub-ui family.",
6
6
  "author": "Carlos Morcillo Fernández <carlos.morcillo@me.com> (https://www.carlosmorcillo.com)",
@@ -41,7 +41,7 @@
41
41
  "@angular/forms": ">=21.0.0",
42
42
  "@angular/platform-browser": ">=21.0.0",
43
43
  "ng-hub-ui-ds": ">=22.14.1",
44
- "ng-hub-ui-utils": ">=22.12.0"
44
+ "ng-hub-ui-utils": ">=22.21.0"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "ng-hub-ui-ds": {
@@ -287,6 +287,39 @@ hub-timepicker {
287
287
  }
288
288
  }
289
289
 
290
+ /**
291
+ * Feedback as a tooltip, asked for by a container through `HUB_FIELD_FEEDBACK` (the paginable
292
+ * table does it under `flushFields`).
293
+ *
294
+ * The message leaves the page but not the accessibility tree, the same clipped box as the
295
+ * visually-hidden label, so the row keeps its height and the alert is still read out. The
296
+ * field says it is wrong with a danger ring drawn inside its own box, which survives the
297
+ * table taking the border away and never moves the layout. The tooltip takes the danger
298
+ * colour from here: the controller copies `--hub-tooltip-*` off the host when it opens.
299
+ */
300
+ .hub-field-host--feedback-tooltip {
301
+ --hub-tooltip-bg: var(--hub-form-invalid-border-color);
302
+ --hub-tooltip-color: var(--hub-sys-color-danger-on, #fff);
303
+
304
+ .hub-field__feedback {
305
+ position: absolute;
306
+ width: 1px;
307
+ height: 1px;
308
+ padding: 0;
309
+ margin: -1px;
310
+ overflow: hidden;
311
+ clip-path: inset(50%);
312
+ white-space: nowrap;
313
+ border: 0;
314
+ }
315
+
316
+ // On the body rather than the field, so a horizontal field's label and required mark stay outside.
317
+ .hub-field--invalid > .hub-field__body {
318
+ border-radius: var(--hub-input-border-radius);
319
+ box-shadow: inset 0 0 0 var(--hub-input-border-width, 1px) var(--hub-form-invalid-border-color);
320
+ }
321
+ }
322
+
290
323
  /**
291
324
  * Read-only fields.
292
325
  *
@@ -175,6 +175,12 @@ declare abstract class HubFieldControl extends HubFormControl implements Control
175
175
  * a template keeps its helper text where the template can actually be shown.
176
176
  */
177
177
  protected readonly showsFormTextTooltip: _angular_core.Signal<boolean>;
178
+ /**
179
+ * Whether a container above asked for the validation message as a tooltip
180
+ * (see `HUB_FIELD_FEEDBACK`). The message block stays in the page, out of sight, so it is
181
+ * still announced; the field marks itself in the danger colour instead.
182
+ */
183
+ protected readonly feedbackAsTooltip: _angular_core.Signal<boolean>;
178
184
  onChange: (value: any) => void;
179
185
  onTouched: () => void;
180
186
  protected readonly _nativeErrors: _angular_core.WritableSignal<ValidationErrors | null>;