@cedarjs/forms 3.0.0-canary.13220 → 3.0.0-canary.13221

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/Form.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { FieldValues, UseFormReturn, UseFormProps } from 'react-hook-form';
3
- export interface FormProps<TFieldValues extends FieldValues> extends Omit<React.ComponentPropsWithRef<'form'>, 'onSubmit'> {
3
+ export interface FormProps<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues> extends Omit<React.ComponentPropsWithRef<'form'>, 'onSubmit'> {
4
4
  error?: any;
5
5
  /**
6
6
  * The methods returned by `useForm`.
@@ -22,7 +22,7 @@ export interface FormProps<TFieldValues extends FieldValues> extends Omit<React.
22
22
  * )
23
23
  * ```
24
24
  */
25
- formMethods?: UseFormReturn<TFieldValues>;
25
+ formMethods?: UseFormReturn<TFieldValues, TContext, TTransformedValues>;
26
26
  /**
27
27
  * Configures how React Hook Form performs validation, among other things.
28
28
  *
@@ -34,8 +34,8 @@ export interface FormProps<TFieldValues extends FieldValues> extends Omit<React.
34
34
  *
35
35
  * @see {@link https://react-hook-form.com/docs/useform}
36
36
  */
37
- config?: UseFormProps<TFieldValues>;
38
- onSubmit?: (value: TFieldValues, event?: React.BaseSyntheticEvent) => void;
37
+ config?: UseFormProps<TFieldValues, TContext, TTransformedValues>;
38
+ onSubmit?: (value: TTransformedValues, event?: React.BaseSyntheticEvent) => void;
39
39
  }
40
- export declare const Form: <TFieldValues extends FieldValues>(props: FormProps<TFieldValues> & React.RefAttributes<HTMLFormElement>) => React.ReactElement | null;
40
+ export declare const Form: <TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: FormProps<TFieldValues, TContext, TTransformedValues> & React.RefAttributes<HTMLFormElement>) => React.ReactElement | null;
41
41
  //# sourceMappingURL=Form.d.ts.map
@@ -1 +1 @@
1
- {"version":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A;IACX;;;;;;;;;;;;;;;;;;;OAmBG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAA;IACvE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAA;IACjE,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,kBAAkB,EACzB,KAAK,CAAC,EAAE,KAAK,CAAC,kBAAkB,KAC7B,IAAI,CAAA;CACV;AAsDD,eAAO,MAAM,IAAI,EAA4B,CAC3C,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,EAEjC,KAAK,EAAE,SAAS,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,GAC1D,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,KACnC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA"}
package/dist/Form.js CHANGED
@@ -42,7 +42,9 @@ function FormInner({
42
42
  children,
43
43
  ...rest
44
44
  }, ref) {
45
- const hookFormMethods = (0, import_react_hook_form.useForm)(config);
45
+ const hookFormMethods = (0, import_react_hook_form.useForm)(
46
+ config
47
+ );
46
48
  const formMethods = propFormMethods || hookFormMethods;
47
49
  return /* @__PURE__ */ import_react.default.createElement(
48
50
  "form",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/forms",
3
- "version": "3.0.0-canary.13220+6335b87d6",
3
+ "version": "3.0.0-canary.13221+3e6338d41",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -38,7 +38,7 @@
38
38
  "react-hook-form": "7.71.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@cedarjs/framework-tools": "3.0.0-canary.13220",
41
+ "@cedarjs/framework-tools": "3.0.0-canary.13221",
42
42
  "@testing-library/dom": "9.3.4",
43
43
  "@testing-library/jest-dom": "6.9.1",
44
44
  "@testing-library/react": "14.3.1",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "6335b87d6961a0250a36b15a783e63e1784bba61"
64
+ "gitHead": "3e6338d41070c495778246d7e4d741101c388f8d"
65
65
  }