@saas-ui/forms 2.3.8 → 2.3.10
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 +21 -5
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/dist/yup/index.js +7 -232
- package/dist/yup/index.js.map +1 -1
- package/dist/yup/index.mjs +9 -286
- package/dist/yup/index.mjs.map +1 -1
- package/dist/zod/index.js +9 -234
- package/dist/zod/index.js.map +1 -1
- package/dist/zod/index.mjs +9 -286
- package/dist/zod/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/layout.tsx +9 -3
- package/src/submit-button.tsx +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @saas-ui/forms
|
2
2
|
|
3
|
+
## 2.3.10
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 52e7490c: Fixed issue where theming props would be forwarded to form layout element
|
8
|
+
- Updated dependencies [afb87d86]
|
9
|
+
- @saas-ui/core@2.3.5
|
10
|
+
|
11
|
+
## 2.3.9
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- 2f170bf7: Fixed issue where SubmitButton theming props could not be overwritten with AutoForm
|
16
|
+
- Updated dependencies [aa3c97a0]
|
17
|
+
- @saas-ui/core@2.3.4
|
18
|
+
|
3
19
|
## 2.3.8
|
4
20
|
|
5
21
|
### Patch Changes
|
@@ -1074,12 +1090,12 @@
|
|
1074
1090
|
Add this somewhere in the root of your project.
|
1075
1091
|
|
1076
1092
|
```ts
|
1077
|
-
import { Form } from
|
1078
|
-
import { yupResolver, yupFieldResolver } from
|
1079
|
-
import { AnyObjectSchema } from
|
1093
|
+
import { Form } from "@saas-ui/react";
|
1094
|
+
import { yupResolver, yupFieldResolver } from "@saas-ui/forms/yup"; // yupResolver is exported from here as well for convenience.
|
1095
|
+
import { AnyObjectSchema } from "yup";
|
1080
1096
|
|
1081
|
-
Form.getResolver = (schema: AnyObjectSchema) => yupResolver(schema) // @hookform/resolvers
|
1082
|
-
Form.getFieldResolver = (schema: AnyObjectSchema) => yupFieldResolver(schema) // AutoForm field resolver
|
1097
|
+
Form.getResolver = (schema: AnyObjectSchema) => yupResolver(schema); // @hookform/resolvers
|
1098
|
+
Form.getFieldResolver = (schema: AnyObjectSchema) => yupFieldResolver(schema); // AutoForm field resolver
|
1083
1099
|
```
|
1084
1100
|
|
1085
1101
|
- 9391c44: Fixed peer dependency issues.
|
package/dist/index.js
CHANGED
@@ -788,10 +788,10 @@ var FormLayout = ({ children, ...props }) => {
|
|
788
788
|
const defaultProps = (_c = (_b = (_a = theme.components) == null ? void 0 : _a.SuiFormLayout) == null ? void 0 : _b.defaultProps) != null ? _c : {
|
789
789
|
spacing: 4
|
790
790
|
};
|
791
|
-
const gridProps = {
|
791
|
+
const gridProps = (0, import_react15.omitThemingProps)({
|
792
792
|
...defaultProps,
|
793
793
|
...props
|
794
|
-
};
|
794
|
+
});
|
795
795
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
796
796
|
import_react15.SimpleGrid,
|
797
797
|
{
|
@@ -1092,13 +1092,13 @@ var SubmitButton = (0, import_react18.forwardRef)(
|
|
1092
1092
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
1093
1093
|
import_react18.Button,
|
1094
1094
|
{
|
1095
|
-
...rest,
|
1096
|
-
...field,
|
1097
1095
|
ref,
|
1098
1096
|
variant,
|
1099
1097
|
type: "submit",
|
1100
1098
|
isLoading: formState.isSubmitting || isLoading,
|
1101
1099
|
isDisabled,
|
1100
|
+
...rest,
|
1101
|
+
...field,
|
1102
1102
|
children
|
1103
1103
|
}
|
1104
1104
|
);
|