@cutting/react-hook-form-components 0.3.8 → 0.4.0
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.
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { ComponentProps } from 'react';
|
|
2
|
-
import { FormInput, FormTextArea } from '@cutting/component-library';
|
|
3
|
-
import type { UseFormRegister, UseFormReturn } from 'react-hook-form';
|
|
4
|
-
declare module 'react' {
|
|
5
|
-
function forwardRef<T, P = Record<string, unknown>>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
6
|
-
}
|
|
7
|
-
type Controls = typeof FormInput | typeof FormTextArea;
|
|
8
|
-
export type FormProps<C extends Controls, E> = ComponentProps<C> & {
|
|
9
|
-
required?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
errors?: E;
|
|
12
|
-
} & ReturnType<UseFormRegister<any>> & Partial<Pick<UseFormReturn<any>, 'setValue'>>;
|
|
13
|
-
export declare function createFormComponent(Component: Controls): <F extends HTMLElement>(props: FormProps<Controls, any> & import("react").RefAttributes<F>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
14
|
-
export declare const Input: <F extends HTMLElement>(props: FormProps<Controls, any> & import("react").RefAttributes<F>) => React.ReactElement | null;
|
|
15
|
-
export declare const TextArea: <F extends HTMLElement>(props: FormProps<Controls, any> & import("react").RefAttributes<F>) => React.ReactElement | null;
|
|
16
|
-
export {};
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { FormInput, FormTextArea } from '@cutting/component-library';
|
|
3
|
+
import type { UseFormRegister, UseFormReturn } from 'react-hook-form';
|
|
4
|
+
declare module 'react' {
|
|
5
|
+
function forwardRef<T, P = Record<string, unknown>>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
6
|
+
}
|
|
7
|
+
type Controls = typeof FormInput | typeof FormTextArea;
|
|
8
|
+
export type FormProps<C extends Controls, E> = ComponentProps<C> & {
|
|
9
|
+
required?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
errors?: E;
|
|
12
|
+
} & ReturnType<UseFormRegister<any>> & Partial<Pick<UseFormReturn<any>, 'setValue'>>;
|
|
13
|
+
export declare function createFormComponent(Component: Controls): <F extends HTMLElement>(props: FormProps<Controls, any> & import("react").RefAttributes<F>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
14
|
+
export declare const Input: <F extends HTMLElement>(props: FormProps<Controls, any> & import("react").RefAttributes<F>) => React.ReactElement | null;
|
|
15
|
+
export declare const TextArea: <F extends HTMLElement>(props: FormProps<Controls, any> & import("react").RefAttributes<F>) => React.ReactElement | null;
|
|
16
|
+
export {};
|
|
17
17
|
//# sourceMappingURL=FormComponents.d.ts.map
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components/FormComponents/FormComponents';
|
|
1
|
+
export * from './components/FormComponents/FormComponents';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cutting/react-hook-form-components",
|
|
3
3
|
"description": "components for react-hook-form.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/esm/index.d.ts",
|
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"assert-ts": "^0.3.4",
|
|
19
|
-
"react-hook-form": "7.43.
|
|
20
|
-
"@cutting/component-library": "5.
|
|
21
|
-
"@cutting/util": "4.
|
|
19
|
+
"react-hook-form": "7.43.9",
|
|
20
|
+
"@cutting/component-library": "5.38.0",
|
|
21
|
+
"@cutting/util": "4.58.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@types/react": "18.0.
|
|
25
|
-
"@vanilla-extract/css": "^1.
|
|
26
|
-
"eslint": "8.
|
|
24
|
+
"@types/react": "18.0.35",
|
|
25
|
+
"@vanilla-extract/css": "^1.11.0",
|
|
26
|
+
"eslint": "8.38.0",
|
|
27
27
|
"react": "18.2.0",
|
|
28
28
|
"react-dom": "18.2.0",
|
|
29
29
|
"react-syntax-highlighter": "15.5.0",
|
|
30
|
-
"typescript": "
|
|
31
|
-
"@cutting/devtools": "4.
|
|
32
|
-
"@cutting/eslint-config": "4.
|
|
33
|
-
"@cutting/tsconfig": "4.
|
|
34
|
-
"@cutting/useful-types": "4.
|
|
30
|
+
"typescript": "5.0.4",
|
|
31
|
+
"@cutting/devtools": "4.63.0",
|
|
32
|
+
"@cutting/eslint-config": "4.44.0",
|
|
33
|
+
"@cutting/tsconfig": "4.40.0",
|
|
34
|
+
"@cutting/useful-types": "4.40.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": ">= 18.x.x",
|