@saas-ui/forms 0.7.1 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +25 -0
- package/dist/array-field.d.ts +4 -1
- package/dist/array-field.d.ts.map +1 -1
- package/dist/auto-form.d.ts +1 -0
- package/dist/auto-form.d.ts.map +1 -1
- package/dist/display-field.d.ts.map +1 -1
- package/dist/display-if.d.ts +4 -1
- package/dist/display-if.d.ts.map +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/fields.d.ts.map +1 -1
- package/dist/form.d.ts +1 -0
- package/dist/form.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/layout.d.ts +4 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/object-field.d.ts.map +1 -1
- package/dist/submit-button.d.ts.map +1 -1
- package/dist/zod/index.js +1 -1
- package/dist/zod/index.js.map +1 -1
- package/dist/zod/index.modern.js +1 -1
- package/dist/zod/index.modern.js.map +1 -1
- package/dist/zod/{index.d.ts → zod/src/index.d.ts} +0 -0
- package/dist/zod/{index.d.ts.map → zod/src/index.d.ts.map} +0 -0
- package/dist/zod/{zod-resolver.d.ts → zod/src/zod-resolver.d.ts} +0 -0
- package/dist/zod/{zod-resolver.d.ts.map → zod/src/zod-resolver.d.ts.map} +0 -0
- package/package.json +4 -1
- package/src/array-field.tsx +33 -1
- package/src/auto-form.tsx +9 -1
- package/src/display-field.tsx +9 -0
- package/src/display-if.tsx +5 -0
- package/src/field.tsx +6 -0
- package/src/fields.tsx +5 -0
- package/src/form.tsx +8 -0
- package/src/layout.tsx +13 -1
- package/src/object-field.tsx +5 -0
- package/src/submit-button.tsx +5 -0
- package/yup/package.json +28 -0
- package/zod/package.json +29 -0
package/src/submit-button.tsx
CHANGED
@@ -5,6 +5,7 @@ import { useFormContext } from 'react-hook-form'
|
|
5
5
|
import { Button, ButtonProps } from '@saas-ui/button'
|
6
6
|
|
7
7
|
import { forwardRef } from '@chakra-ui/system'
|
8
|
+
import { __DEV__ } from '@chakra-ui/utils'
|
8
9
|
|
9
10
|
export interface SubmitButtonProps extends ButtonProps {
|
10
11
|
/**
|
@@ -52,3 +53,7 @@ SubmitButton.defaultProps = {
|
|
52
53
|
disableIfUntouched: false,
|
53
54
|
disableIfInvalid: false,
|
54
55
|
}
|
56
|
+
|
57
|
+
if (__DEV__) {
|
58
|
+
SubmitButton.displayName = 'SubmitButton'
|
59
|
+
}
|
package/yup/package.json
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"name": "yup",
|
3
|
+
"description": "Saas UI Forms field resolver: yup",
|
4
|
+
"version": "1.0.0",
|
5
|
+
"private": true,
|
6
|
+
"source": "./src/index.ts",
|
7
|
+
"exports": {
|
8
|
+
".": {
|
9
|
+
"development": "./src/index.ts",
|
10
|
+
"require": "./../dist/yup/index.js",
|
11
|
+
"types": "./../dist/yup/src/index.d.ts",
|
12
|
+
"default": "./../dist/yup/index.modern.js"
|
13
|
+
},
|
14
|
+
"./src": {
|
15
|
+
"default": "./src/index.ts"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"main": "../dist/yup/index.js",
|
19
|
+
"module": "../dist/yup/index.modern.js",
|
20
|
+
"types": "../dist/yup/index.d.ts",
|
21
|
+
"author": "Eelco Wiersma <eelco@appulse.nl>",
|
22
|
+
"license": "MIT",
|
23
|
+
"peerDependencies": {
|
24
|
+
"@hookform/resolvers": "^2.8.3",
|
25
|
+
"react-hook-form": "^7.22.0",
|
26
|
+
"yup": "^0.32.11"
|
27
|
+
}
|
28
|
+
}
|
package/zod/package.json
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"name": "zod",
|
3
|
+
"description": "Saas UI Forms field resolver: zod",
|
4
|
+
"version": "1.0.0",
|
5
|
+
"private": true,
|
6
|
+
"source": "./src/index.ts",
|
7
|
+
"exports": {
|
8
|
+
".": {
|
9
|
+
"development": "./src/index.ts",
|
10
|
+
"require": "./../dist/zod/index.js",
|
11
|
+
"types": "./../dist/zod/src/index.d.ts",
|
12
|
+
"default": "./../dist/zod/index.modern.js"
|
13
|
+
},
|
14
|
+
"./src": {
|
15
|
+
"default": "./src/index.ts"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"main": "../dist/zod/index.js",
|
19
|
+
"module": "../dist/zod/index.modern.js",
|
20
|
+
"types": "../dist/zod/index.d.ts",
|
21
|
+
"author": "Eelco Wiersma <eelco@appulse.nl>",
|
22
|
+
"license": "MIT",
|
23
|
+
"peerDependencies": {
|
24
|
+
"@chakra-ui/utils": "^1.10.4",
|
25
|
+
"@hookform/resolvers": "^2.8.3",
|
26
|
+
"react-hook-form": "^7.22.0",
|
27
|
+
"zod": "^3.14.4"
|
28
|
+
}
|
29
|
+
}
|