@ttoss/forms 0.14.20 → 0.14.22

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +8 -8
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { yupResolver } from '@hookform/resolvers/yup';
2
2
  import * as react_hook_form from 'react-hook-form';
3
- import { FieldValues, UseControllerReturn } from 'react-hook-form';
3
+ import { FieldValues, FieldPath, FieldPathValue, UseControllerReturn } from 'react-hook-form';
4
4
  export * from 'react-hook-form';
5
5
  import * as yup from 'yup';
6
6
  export { yup };
@@ -16,20 +16,20 @@ declare const Form: <TFieldValues extends FieldValues = FieldValues>({ children,
16
16
  children: React.ReactNode | React.ReactNode[];
17
17
  } & react_hook_form.UseFormReturn<TFieldValues, any>) => JSX.Element;
18
18
 
19
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<TFieldValues> = react_hook_form.Path<TFieldValues>>({ label, id: idProp, name, defaultValue, render, }: {
19
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ label, id: idProp, name, defaultValue, render, }: {
20
20
  label?: string | undefined;
21
21
  id?: string | undefined;
22
22
  name: TName;
23
- defaultValue?: react_hook_form.PathValue<TFieldValues, TName> | undefined;
23
+ defaultValue?: FieldPathValue<TFieldValues, TName> | undefined;
24
24
  render: (props: UseControllerReturn<TFieldValues, TName>) => React.ReactElement;
25
25
  }) => JSX.Element;
26
26
 
27
27
  declare const FormFieldCheckbox: <TFieldValues extends FieldValues = FieldValues>({ label, name, ...checkboxProps }: {
28
28
  label?: string | undefined;
29
- name: react_hook_form.Path<TFieldValues>;
29
+ name: FieldPath<TFieldValues>;
30
30
  } & CheckboxProps) => JSX.Element;
31
31
 
32
- declare const FormFieldInput: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<TFieldValues> = react_hook_form.Path<TFieldValues>>({ label, name, tooltipIcon, showCharacterCounter, ...inputProps }: {
32
+ declare const FormFieldInput: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ label, name, tooltipIcon, showCharacterCounter, ...inputProps }: {
33
33
  label?: string | undefined;
34
34
  name: TName;
35
35
  tooltipIcon?: IconType | undefined;
@@ -45,7 +45,7 @@ type FormRadioOption$1 = {
45
45
  };
46
46
  declare const FormFieldRadio: <TFieldValues extends FieldValues = FieldValues>({ label, name, options, ...radioProps }: {
47
47
  label?: string | undefined;
48
- name: react_hook_form.Path<TFieldValues>;
48
+ name: FieldPath<TFieldValues>;
49
49
  options: FormRadioOption$1[];
50
50
  } & RadioProps) => JSX.Element;
51
51
 
@@ -55,11 +55,11 @@ type FormRadioOption = {
55
55
  };
56
56
  declare const FormFieldSelect: <TFieldValues extends FieldValues = FieldValues>({ label, name, options, ...selectProps }: {
57
57
  label?: string | undefined;
58
- name: react_hook_form.Path<TFieldValues>;
58
+ name: FieldPath<TFieldValues>;
59
59
  options: FormRadioOption[];
60
60
  } & SelectProps) => JSX.Element;
61
61
 
62
- declare const FormFieldTextarea: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<TFieldValues> = react_hook_form.Path<TFieldValues>>({ label, name, ...textareaProps }: {
62
+ declare const FormFieldTextarea: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ label, name, ...textareaProps }: {
63
63
  label?: string | undefined;
64
64
  name: TName;
65
65
  } & TextareaProps) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/forms",
3
- "version": "0.14.20",
3
+ "version": "0.14.22",
4
4
  "license": "UNLICENSED",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@ttoss/config": "^1.29.2",
33
- "@ttoss/test-utils": "^1.20.9",
34
- "@ttoss/ui": "^1.31.7",
33
+ "@ttoss/test-utils": "^1.21.0",
34
+ "@ttoss/ui": "^1.31.9",
35
35
  "@types/jest": "^29.5.0",
36
36
  "jest": "^29.5.0",
37
37
  "react": "^18.2.0",
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "3d2d6ecf2c24eb734b162bfe8d73a7a2886c49f6"
44
+ "gitHead": "ae4666b1c422a69395485fed34626f7401c49191"
45
45
  }