@andreyfedkovich/cozy-ui 0.10.0 → 0.10.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/CHANGELOG.md +3 -3
- package/README.md +3 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
## 0.10.0 - 2026-06-04
|
|
7
7
|
|
|
8
|
-
- **feat:** New `ShowErrorPolicy` presets — `draftFriendly`, `wizardStep`, `savedInvalid`, `onBlurOrSubmit`. Recommended for
|
|
8
|
+
- **feat:** New `ShowErrorPolicy` presets — `draftFriendly`, `wizardStep`, `savedInvalid`, `onBlurOrSubmit`. Recommended for draft-friendly and wizard forms; legacy `default` unchanged (shows on `hasValue` alone).
|
|
9
9
|
- **feat:** Extended `FieldMeta` — `stepSubmitted`, `validationPending`, `errorKind`. `resolveDisplayError` suppresses stale `required` when value is non-empty.
|
|
10
|
-
- **feat:** `useFormFields` + `FieldBinding` — replaces per-app binding glue
|
|
10
|
+
- **feat:** `useFormFields` + `FieldBinding` — replaces typical per-app binding glue. `markStepSubmitted`, `markFormSubmitted`, `resetInteraction`.
|
|
11
11
|
- **feat:** `useValidationRequest` — async validate with generation/stale guard and `validationPending`.
|
|
12
12
|
- **feat:** `attemptWizardStep`, `attemptFormSubmit` — validate-on-click for wizard and submit (no `disabled={!isValid}`).
|
|
13
13
|
- **feat:** `suppressError` prop on field components; dev warning when `error={null}` suppresses invalid `fieldMeta`.
|
|
14
14
|
- **feat:** Export `useFieldPresentation`, `FieldErrorCaption`, `FormField`, `hasFieldValue`.
|
|
15
|
-
- **docs:** `docs/validation-recipes.md` — recipes, anti-patterns,
|
|
15
|
+
- **docs:** `docs/validation-recipes.md` — recipes, anti-patterns, migration guide and consumer verification checklist.
|
|
16
16
|
|
|
17
17
|
## 0.9.0 - 2026-06-04
|
|
18
18
|
|
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ npm i @andreyfedkovich/cozy-ui
|
|
|
37
37
|
- [Utility](#utility) — `Tag`, `CopyTextTrigger`
|
|
38
38
|
- [Workflow](#workflow) — `ApprovalRoute`, `CommentFeed`, `DetailView`, `SideNav`, `SettingsView`, `Switch`, `ImageSegmented`
|
|
39
39
|
- [Hooks & helpers](#hooks--helpers)
|
|
40
|
+
- [Validation recipes](https://github.com/AndreyFedkovich/cozy-ui-components/blob/main/docs/validation-recipes.md)
|
|
40
41
|
- [Icons](#icons)
|
|
41
42
|
- [TypeScript](#typescript)
|
|
42
43
|
- [SSR & framework support](#ssr--framework-support)
|
|
@@ -408,13 +409,13 @@ Form state stays in your app (React Hook Form, TanStack Form, or `useState`). Co
|
|
|
408
409
|
| `useFieldState`, `useFormFields`, `useValidationRequest` | React hooks |
|
|
409
410
|
| `attemptWizardStep`, `attemptFormSubmit` | Validate-on-click helpers |
|
|
410
411
|
|
|
411
|
-
**Recommended policy for
|
|
412
|
+
**Recommended policy for draft-friendly forms:** `draftFriendly` — no flash on first keystroke; saved invalid visible on load.
|
|
412
413
|
|
|
413
414
|
**Legacy `default` policy:** `invalid && (touched || submitted || hasValue)`.
|
|
414
415
|
|
|
415
416
|
**Props on fields:** `error`, `suppressError`, `fieldMeta`, `showErrorPolicy`.
|
|
416
417
|
|
|
417
|
-
See [
|
|
418
|
+
See [Validation recipes](https://github.com/AndreyFedkovich/cozy-ui-components/blob/main/docs/validation-recipes.md) for step-by-step recipes and expected form behavior.
|
|
418
419
|
|
|
419
420
|
**Callback families:**
|
|
420
421
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andreyfedkovich/cozy-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.1",
|
|
5
5
|
"description": "Cozy UI — a premium, opinionated React component library for crafted product UIs. Typed, themeable, SSR-safe, tree-shakeable.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
],
|
|
20
20
|
"author": "Andrey Fedkovich",
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"homepage": "https://github.com/
|
|
22
|
+
"homepage": "https://github.com/AndreyFedkovich/cozy-ui-components#readme",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/AndreyFedkovich/cozy-ui-components.git"
|
|
26
26
|
},
|
|
27
27
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/
|
|
28
|
+
"url": "https://github.com/AndreyFedkovich/cozy-ui-components/issues"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": [
|
|
31
31
|
"**/*.css"
|