@mars-stack/ui 8.0.2 → 8.0.4
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/dist/hooks/index.js +5 -2
- package/package.json +4 -4
package/dist/hooks/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
3
|
-
import { useState, useRef, useCallback } from 'react';
|
|
3
|
+
import { useState, useRef, useCallback, useMemo } from 'react';
|
|
4
4
|
|
|
5
5
|
function useZodForm({
|
|
6
6
|
schema,
|
|
@@ -127,7 +127,10 @@ function useZodForm({
|
|
|
127
127
|
},
|
|
128
128
|
[values, handleChange, handleBlur, touched, errors]
|
|
129
129
|
);
|
|
130
|
-
const isValid =
|
|
130
|
+
const isValid = useMemo(
|
|
131
|
+
() => Object.keys(validateWithValues(values)).length === 0,
|
|
132
|
+
[values, validateWithValues]
|
|
133
|
+
);
|
|
131
134
|
return {
|
|
132
135
|
values,
|
|
133
136
|
errors,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mars-stack/ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"prepublishOnly": "yarn build"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@mars-stack/core": ">=8.0.
|
|
53
|
+
"@mars-stack/core": ">=8.0.4",
|
|
54
54
|
"clsx": ">=2",
|
|
55
55
|
"next": ">=14",
|
|
56
56
|
"react": ">=18"
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"react": "^19.0.0",
|
|
73
73
|
"react-dom": "^19.2.4",
|
|
74
74
|
"tsup": "^8.0.0",
|
|
75
|
-
"typescript": "^
|
|
76
|
-
"vitest": "^4.1.
|
|
75
|
+
"typescript": "^6.0.2",
|
|
76
|
+
"vitest": "^4.1.2",
|
|
77
77
|
"zod": "^4.3.6"
|
|
78
78
|
}
|
|
79
79
|
}
|