@ttoss/forms 0.14.0 → 0.14.2
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/index.d.ts +7 -7
- package/dist/index.js +4 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -15,20 +15,20 @@ declare const Form: <TFieldValues extends FieldValues = FieldValues>({ children,
|
|
|
15
15
|
children: React.ReactNode | React.ReactNode[];
|
|
16
16
|
} & react_hook_form.UseFormReturn<TFieldValues, any>) => JSX.Element;
|
|
17
17
|
|
|
18
|
-
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<
|
|
18
|
+
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
19
|
label?: string | undefined;
|
|
20
20
|
id?: string | undefined;
|
|
21
21
|
name: TName;
|
|
22
|
-
defaultValue?: react_hook_form.PathValue<
|
|
22
|
+
defaultValue?: react_hook_form.PathValue<TFieldValues, TName> | undefined;
|
|
23
23
|
render: (props: UseControllerReturn<TFieldValues, TName>) => React.ReactElement;
|
|
24
24
|
}) => JSX.Element;
|
|
25
25
|
|
|
26
26
|
declare const FormFieldCheckbox: <TFieldValues extends FieldValues = FieldValues>({ label, name, ...checkboxProps }: {
|
|
27
27
|
label?: string | undefined;
|
|
28
|
-
name: react_hook_form.Path<
|
|
28
|
+
name: react_hook_form.Path<TFieldValues>;
|
|
29
29
|
} & CheckboxProps) => JSX.Element;
|
|
30
30
|
|
|
31
|
-
declare const FormFieldInput: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<
|
|
31
|
+
declare const FormFieldInput: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<TFieldValues> = react_hook_form.Path<TFieldValues>>({ label, name, ...inputProps }: {
|
|
32
32
|
label?: string | undefined;
|
|
33
33
|
name: TName;
|
|
34
34
|
} & InputProps) => JSX.Element;
|
|
@@ -39,7 +39,7 @@ type FormRadioOption$1 = {
|
|
|
39
39
|
};
|
|
40
40
|
declare const FormFieldRadio: <TFieldValues extends FieldValues = FieldValues>({ label, name, options, ...radioProps }: {
|
|
41
41
|
label?: string | undefined;
|
|
42
|
-
name: react_hook_form.Path<
|
|
42
|
+
name: react_hook_form.Path<TFieldValues>;
|
|
43
43
|
options: FormRadioOption$1[];
|
|
44
44
|
} & RadioProps) => JSX.Element;
|
|
45
45
|
|
|
@@ -49,11 +49,11 @@ type FormRadioOption = {
|
|
|
49
49
|
};
|
|
50
50
|
declare const FormFieldSelect: <TFieldValues extends FieldValues = FieldValues>({ label, name, options, ...selectProps }: {
|
|
51
51
|
label?: string | undefined;
|
|
52
|
-
name: react_hook_form.Path<
|
|
52
|
+
name: react_hook_form.Path<TFieldValues>;
|
|
53
53
|
options: FormRadioOption[];
|
|
54
54
|
} & SelectProps) => JSX.Element;
|
|
55
55
|
|
|
56
|
-
declare const FormFieldTextarea: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<
|
|
56
|
+
declare const FormFieldTextarea: <TFieldValues extends FieldValues = FieldValues, TName extends react_hook_form.Path<TFieldValues> = react_hook_form.Path<TFieldValues>>({ label, name, ...textareaProps }: {
|
|
57
57
|
label?: string | undefined;
|
|
58
58
|
name: TName;
|
|
59
59
|
} & TextareaProps) => JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
20
|
};
|
|
21
21
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
22
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
27
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
28
|
mod
|
|
25
29
|
));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/forms",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"react": "^18.2.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@ttoss/config": "^1.28.
|
|
33
|
-
"@ttoss/test-utils": "^1.20.
|
|
34
|
-
"@ttoss/ui": "^1.30.
|
|
32
|
+
"@ttoss/config": "^1.28.1",
|
|
33
|
+
"@ttoss/test-utils": "^1.20.3",
|
|
34
|
+
"@ttoss/ui": "^1.30.2",
|
|
35
35
|
"@types/jest": "^29.4.0",
|
|
36
|
-
"jest": "^29.4.
|
|
36
|
+
"jest": "^29.4.2",
|
|
37
37
|
"react": "^18.2.0",
|
|
38
38
|
"react-hook-form": "^7.41.2",
|
|
39
39
|
"yup": "^0.32.11"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "d4df96176c1d3fce4ebf7842de5847a618a33d9e"
|
|
45
45
|
}
|