@eagami/ui 5.71.0 → 5.71.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.
- package/README.md +13 -0
- package/fesm2022/eagami-ui.mjs +369 -31
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +173 -11
package/README.md
CHANGED
|
@@ -73,6 +73,19 @@ Focus rings follow the primary color. When the brand hue reads as an error or a
|
|
|
73
73
|
|
|
74
74
|
Everything else is a CSS custom property you can override. See [Design tokens](https://eagami.com/ui/design-tokens).
|
|
75
75
|
|
|
76
|
+
## Forms
|
|
77
|
+
|
|
78
|
+
`showErrorsOn` sets when form components show a validation error:
|
|
79
|
+
|
|
80
|
+
- `'change'` (the default): once the user changes the field and leaves it, or submits the form. A field the user tabs past stays quiet, and a new error waits until focus leaves the field.
|
|
81
|
+
- `'touch'`: as soon as the user leaves the field, even unchanged, and live while they edit it after that.
|
|
82
|
+
|
|
83
|
+
Set it app-wide with `forms`, or on a single field with the `showErrorsOn` input every form component takes:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
provideEagamiUi({ forms: { showErrorsOn: 'touch' } });
|
|
87
|
+
```
|
|
88
|
+
|
|
76
89
|
## Testing
|
|
77
90
|
|
|
78
91
|
`<ea-dialog>` and `<ea-drawer>` are built on the native `<dialog>` element, and `@eagami/ui/testing` keeps them working in jsdom, which lacks `showModal()` and `close()`. Call `installNativeDialogShim()` once from your test setup file:
|