ng-hub-ui-forms 22.45.1 → 22.46.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 +14 -0
- package/fesm2022/ng-hub-ui-forms.mjs +37 -18
- package/fesm2022/ng-hub-ui-forms.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_field.scss +69 -0
- package/styles/_tokens.scss +3 -0
- package/types/ng-hub-ui-forms.d.ts +47 -14
package/README.md
CHANGED
|
@@ -945,6 +945,20 @@ field once it is touched and valid. The invalid state is unaffected — it is al
|
|
|
945
945
|
automatic; only success is gated behind this flag. A per-field `showValid` input
|
|
946
946
|
overrides the global default.
|
|
947
947
|
|
|
948
|
+
`feedbackAnimation` sets how validation messages appear and go. `collapse` (the default) opens the
|
|
949
|
+
room the message needs while it fades in, so the fields below slide down instead of jumping; `fade`
|
|
950
|
+
and `slide` only soften the text; `none` shows and hides it at once. Your own motion is a pair of
|
|
951
|
+
classes Angular adds while the message enters and leaves. Style them in a global stylesheet, because
|
|
952
|
+
they land on the field's feedback element, out of reach of an encapsulated component style. Without
|
|
953
|
+
`leave`, the message goes at once. Every preset stops under `prefers-reduced-motion`, and a message
|
|
954
|
+
shown as a tooltip is never animated. Timing comes from `--hub-form-feedback-motion-duration`,
|
|
955
|
+
`--hub-form-feedback-motion-easing` and `--hub-form-feedback-slide-distance`.
|
|
956
|
+
|
|
957
|
+
```ts
|
|
958
|
+
provideHubForms({ feedbackAnimation: 'slide' });
|
|
959
|
+
provideHubForms({ feedbackAnimation: { enter: 'error-in', leave: 'error-out' } });
|
|
960
|
+
```
|
|
961
|
+
|
|
948
962
|
`color` sets an application palette for every colour field without `swatches` of its own (there is
|
|
949
963
|
none by default) and the two accessible names the colour field adds: `customColorLabel`
|
|
950
964
|
(`'Custom color'`) for the grid's last cell and `pickerLabel` (`'Choose color'`) for the hex field's
|