@gustavo-valsechi/client 1.4.186 → 1.4.188

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,13 +1,12 @@
1
1
  import React from "react";
2
2
  import { UseFormRegister } from "react-hook-form";
3
- import { IInputType } from "../index";
4
3
  import { z } from "zod";
5
4
  export interface IInputCustom {
6
5
  className?: string;
7
6
  label?: string;
8
7
  id?: string;
9
8
  name?: string;
10
- type?: IInputType;
9
+ type: "custom";
11
10
  value?: string;
12
11
  error?: string;
13
12
  disabled?: boolean;
@@ -1,8 +1,7 @@
1
1
  import { UseFormRegister } from "react-hook-form";
2
- import { IInputType } from "../index";
3
2
  import { z } from "zod";
4
3
  export interface IInputDateTime {
5
- type?: IInputType;
4
+ type: "date-time";
6
5
  className?: string;
7
6
  label?: string;
8
7
  name: string;
@@ -1,8 +1,7 @@
1
1
  import { UseFormRegister } from "react-hook-form";
2
- import { IInputType } from "../index";
3
2
  import { z } from "zod";
4
3
  export interface IInputFile {
5
- type?: IInputType;
4
+ type: "file";
6
5
  className?: string;
7
6
  label?: string;
8
7
  name: string;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { IButton, IInputSelect } from "../form";
2
+ import { IButton, IInputSelect, IInputCustom, IInputFile, IInputText, IInputDateTime, IInputTextarea } from "../form";
3
3
  export * from "./file";
4
4
  export * from "./label";
5
5
  export * from "./text";
@@ -16,6 +16,6 @@ export interface IForm {
16
16
  formRef?: any;
17
17
  onSubmit: (values: any, actions?: any) => void;
18
18
  clearWhen?: boolean;
19
- inputs: Array<IInputSelect>;
19
+ inputs: Array<IInputSelect | IInputCustom | IInputFile | IInputText | IInputDateTime | IInputTextarea>;
20
20
  buttons?: Array<IButton>;
21
21
  }
@@ -1,8 +1,7 @@
1
1
  import { UseFormRegister } from "react-hook-form";
2
- import { IInputType } from "../index";
3
2
  import { z } from "zod";
4
3
  export interface IInputSelect {
5
- type?: IInputType;
4
+ type: "select";
6
5
  className?: string;
7
6
  label?: string;
8
7
  name: string;
@@ -1,12 +1,11 @@
1
1
  import { UseFormRegister } from "react-hook-form";
2
- import { IInputType } from "../index";
3
2
  import { z } from "zod";
4
3
  export interface IInputText {
5
4
  className?: string;
6
5
  label?: string;
7
6
  id?: string;
8
7
  name?: string;
9
- type?: IInputType;
8
+ type: "text" | "password" | undefined;
10
9
  value?: string;
11
10
  mask?: (value: string) => void;
12
11
  onChange?: (event: any) => void;
@@ -1,8 +1,7 @@
1
1
  import { UseFormRegister } from "react-hook-form";
2
- import { IInputType } from "../index";
3
2
  import { z } from "zod";
4
3
  export interface IInputTextarea {
5
- type?: IInputType;
4
+ type: "textarea";
6
5
  className?: string;
7
6
  label?: string;
8
7
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.186",
3
+ "version": "1.4.188",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",