react-hook-form-next-ui 2.1.1 → 3.0.50

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/README.md CHANGED
@@ -18,16 +18,19 @@ npm i react-hook-form-next-ui
18
18
  It is important to import the styles from NextUI and this library.
19
19
 
20
20
  ```js
21
+ //tailwind.config.js
22
+ import { heroui } from "@heroui/react";
23
+
21
24
  export default {
22
25
  content: [
23
26
  "./node_modules/react-hook-form-next-ui/dist/**/*.{js,ts,jsx,tsx}",
24
- "./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
27
+ "./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
25
28
  ],
26
29
  theme: {
27
30
  extend: {},
28
31
  },
29
32
  plugins: [
30
- nextui()
33
+ heroui()
31
34
  ]
32
35
  }
33
36
  ```
@@ -36,7 +39,7 @@ export default {
36
39
 
37
40
  ```js
38
41
  import { FormProvider, SubmitHandler, useForm } from "react-hook-form"
39
- import { Button } from "@nextui-org/react";
42
+ import { Button } from "@heroui/react";
40
43
  import RHFInput from "../components/RHFInput";
41
44
  import schema from "../static/schema";
42
45
  import { yupResolver } from "@hookform/resolvers/yup";
package/dist/index.d.ts CHANGED
@@ -1,31 +1,27 @@
1
1
  import { AnyObject } from 'yup';
2
- import { AutocompleteItemProps } from '@nextui-org/react';
3
- import { AutocompleteProps } from '@nextui-org/react';
4
- import { ButtonProps } from '@nextui-org/react';
5
- import { CheckboxGroupProps } from '@nextui-org/react';
6
- import { CheckboxProps } from '@nextui-org/react';
7
- import { DatePickerProps } from '@nextui-org/react';
8
- import { DateValue } from '@nextui-org/react';
2
+ import { AutocompleteItemProps } from '@heroui/react';
3
+ import { AutocompleteProps } from '@heroui/react';
4
+ import { ButtonProps } from '@heroui/react';
5
+ import { CheckboxGroupProps } from '@heroui/react';
6
+ import { CheckboxProps } from '@heroui/react';
7
+ import { DatePickerProps } from '@heroui/react';
8
+ import { DateValue } from '@heroui/react';
9
9
  import { default as default_2 } from 'react';
10
- import { InputOtpProps } from '@nextui-org/react';
11
- import { InputProps } from '@nextui-org/react';
10
+ import { InputOtpProps } from '@heroui/react';
11
+ import { InputProps } from '@heroui/react';
12
12
  import { MixedSchema } from 'yup';
13
- import { ModalProps } from '@nextui-org/react';
14
- import { RadioGroupProps } from '@nextui-org/react';
15
- import { RadioProps } from '@nextui-org/react';
13
+ import { ModalProps } from '@heroui/react';
14
+ import { RadioGroupProps } from '@heroui/react';
15
+ import { RadioProps } from '@heroui/react';
16
16
  import { ReactNode } from 'react';
17
17
  import { RegisterOptions } from 'react-hook-form';
18
- import { SelectItemProps } from '@nextui-org/react';
19
- import { SelectProps } from '@nextui-org/react';
20
- import { TableColumnProps } from '@nextui-org/react';
21
- import { TableProps } from '@nextui-org/react';
22
- import { TextAreaProps } from '@nextui-org/react';
23
- import { TimeInputProps } from '@nextui-org/react';
24
- import { TimeInputValue } from '@nextui-org/react';
25
-
26
- declare interface AcceptButton extends Omit<ButtonProps, "onClick"> {
27
- onClick: () => void | Promise<void>;
28
- }
18
+ import { SelectItemProps } from '@heroui/react';
19
+ import { SelectProps } from '@heroui/react';
20
+ import { TableColumnProps } from '@heroui/react';
21
+ import { TableProps } from '@heroui/react';
22
+ import { TextAreaProps } from '@heroui/react';
23
+ import { TimeInputProps } from '@heroui/react';
24
+ import { TimeInputValue } from '@heroui/react';
29
25
 
30
26
  declare interface ColumnFormat {
31
27
  value: string;
@@ -37,22 +33,21 @@ export declare interface ColumnsTableProps extends Omit<TableColumnProps<any>, "
37
33
  dateFormat?: string;
38
34
  }
39
35
 
40
- export declare const DataTable: ({ rows, columns, showFilter, loading, keyRow, defaultSelectedKeys, itemsName, selectionMode, inputSearch, showHandlePaginate, extraTopContent, cellClass, onSelect, defaultPaginateNumber, optionsPaginateNumber, ...props }: DataTableProps) => default_2.JSX.Element;
36
+ export declare const DataTable: ({ hideFilterSearch, loading, isVirtualized, onSelect, selectionMode, inputSearch, hideRowsPerPageOptions, extraTopContent, cellClass, rows, columns, keyRow, itemsName, rowsPerPageOptions, ...props }: DataTableProps) => default_2.JSX.Element;
41
37
 
42
38
  export declare interface DataTableProps extends TableProps {
39
+ rows: any[];
40
+ keyRow?: string;
41
+ rowsPerPageOptions?: RowsPerPageTableProps;
42
+ hideRowsPerPageOptions?: boolean;
43
43
  inputSearch?: InputProps;
44
+ hideFilterSearch?: boolean;
44
45
  extraTopContent?: ReactNode;
45
- rows: any[];
46
46
  columns: ColumnsTableProps[];
47
47
  loading?: boolean;
48
- showFilter?: boolean;
49
48
  onSelect?: (row: any) => void;
50
- showHandlePaginate?: boolean;
51
- defaultPaginateNumber?: number;
52
- optionsPaginateNumber?: number[];
53
49
  itemsName?: string;
54
50
  cellClass?: string;
55
- keyRow?: string;
56
51
  }
57
52
 
58
53
  declare const dateMinMaxValidate: ({ minDate, maxDate }: DateMinMaxValueProps) => MixedSchema<DateValue | undefined, AnyObject, undefined, "">;
@@ -94,13 +89,13 @@ declare type Icolor = "danger" | "default" | "primary" | "secondary" | "success"
94
89
 
95
90
  export declare const Layout: ({ children, title, color }: RHFNextUiLayoutProps) => default_2.JSX.Element;
96
91
 
97
- export declare function Modal({ display, children, title, onCancel, cancelButton, acceptButton, ...props }: RHFNextUiModalProps): default_2.JSX.Element;
92
+ export declare function Modal({ display, onClose, children, title, cancelButton, acceptButton, ...props }: RHFNextUiModalProps): default_2.JSX.Element;
98
93
 
99
94
  export declare const Panel: ({ title, color, children, collapse }: RHFNextUiPanelProps) => default_2.JSX.Element;
100
95
 
101
96
  export declare const RHFAutocomplete: ({ onSelectionChange, defaultSelectedKey, name, data, rules, ...props }: RHFAutocompleteProps) => default_2.JSX.Element;
102
97
 
103
- declare interface RHFAutocompleteProps extends Omit<AutocompleteProps, "children"> {
98
+ declare interface RHFAutocompleteProps extends Omit<AutocompleteProps, "children" | "defaultItems" | "selectedKey" | "isInvalid" | "errorMessage"> {
104
99
  name: string;
105
100
  rules?: RegisterOptions;
106
101
  data: AutocompleteItemProps[];
@@ -110,12 +105,12 @@ export declare const RHFCheckbox: ({ rules, name, ...props }: RHFCheckboxProps)
110
105
 
111
106
  export declare const RHFCheckboxGroup: ({ defaultValue, rules, name, data, ...props }: RHFCheckboxProps_2) => default_2.JSX.Element;
112
107
 
113
- declare interface RHFCheckboxProps extends CheckboxProps {
108
+ declare interface RHFCheckboxProps extends Omit<CheckboxProps, "isSelected" | "isInvalid"> {
114
109
  rules?: RegisterOptions;
115
110
  name: string;
116
111
  }
117
112
 
118
- declare interface RHFCheckboxProps_2 extends CheckboxGroupProps {
113
+ declare interface RHFCheckboxProps_2 extends Omit<CheckboxGroupProps, "children" | "isInvalid"> {
119
114
  rules?: RegisterOptions;
120
115
  name: string;
121
116
  data: CheckboxProps[];
@@ -123,7 +118,7 @@ declare interface RHFCheckboxProps_2 extends CheckboxGroupProps {
123
118
 
124
119
  export declare const RHFDate: ({ name, rules, defaultValue, ...props }: RHFDateProps) => default_2.JSX.Element;
125
120
 
126
- declare interface RHFDateProps extends DatePickerProps {
121
+ declare interface RHFDateProps extends Omit<DatePickerProps, "value" | "errorMessage" | "isInvalid"> {
127
122
  name: string;
128
123
  rules?: RegisterOptions;
129
124
  }
@@ -146,17 +141,17 @@ export declare const RHFInput: ({ defaultValue, rules, name, classNames, ...prop
146
141
 
147
142
  export declare const RHFInputOtp: ({ defaultValue, rules, name, classNames, ...props }: RHFInputProps_2) => default_2.JSX.Element;
148
143
 
149
- declare interface RHFInputProps extends InputProps {
144
+ declare interface RHFInputProps extends Omit<InputProps, "errorMessage" | "isInvalid"> {
150
145
  name: string;
151
146
  rules?: RegisterOptions;
152
147
  }
153
148
 
154
- declare interface RHFInputProps_2 extends InputOtpProps {
149
+ declare interface RHFInputProps_2 extends Omit<InputOtpProps, "errorMessage" | "isInvalid"> {
155
150
  name: string;
156
151
  rules?: RegisterOptions;
157
152
  }
158
153
 
159
- declare interface RHFNextUiDate extends DatePickerProps {
154
+ declare interface RHFNextUiDate extends Omit<DatePickerProps, "value" | "errorMessage" | "isInvalid"> {
160
155
  name: string;
161
156
  rules?: RegisterOptions;
162
157
  }
@@ -167,13 +162,13 @@ declare type RHFNextUiLayoutProps = {
167
162
  color?: Icolor;
168
163
  };
169
164
 
170
- declare interface RHFNextUiModalProps extends ModalProps {
165
+ declare interface RHFNextUiModalProps extends Omit<ModalProps, "onOpenChange" | "isOpen"> {
171
166
  display: boolean;
172
- onCancel: () => void;
167
+ children: ReactNode;
173
168
  title?: string;
169
+ onClose: () => void;
174
170
  cancelButton?: ButtonProps;
175
- acceptButton?: AcceptButton;
176
- children: ReactNode;
171
+ acceptButton?: ButtonProps;
177
172
  }
178
173
 
179
174
  declare interface RHFNextUiPanelProps {
@@ -185,15 +180,15 @@ declare interface RHFNextUiPanelProps {
185
180
 
186
181
  export declare const RHFRadioGroup: ({ data, rules, name, defaultValue, ...props }: RHFRadioGroupProps) => default_2.JSX.Element;
187
182
 
188
- declare interface RHFRadioGroupProps extends RadioGroupProps {
183
+ declare interface RHFRadioGroupProps extends Omit<RadioGroupProps, "isInvalid" | "errorMessage"> {
189
184
  rules?: RegisterOptions;
190
185
  data: RadioProps[];
191
186
  name: string;
192
187
  }
193
188
 
194
- export declare const RHFSelect: ({ name, data, rules, defaultSelectedKeys, allOptions, allSelectText, onSelectionChange, ...props }: RHFSelectProps) => default_2.JSX.Element;
189
+ export declare const RHFSelect: ({ name, data, rules, defaultSelectedKeys, disabledKeys, renderValue, allOptions, allSelectText, onSelectionChange, selectionMode, ...props }: RHFSelectProps) => default_2.JSX.Element;
195
190
 
196
- declare interface RHFSelectProps extends Omit<SelectProps, "children"> {
191
+ declare interface RHFSelectProps extends Omit<SelectProps, "children" | "items" | "selectedKeys" | "errorMessage" | "isInvalid"> {
197
192
  name: string;
198
193
  rules?: RegisterOptions;
199
194
  data: SelectItemProps[];
@@ -203,23 +198,28 @@ declare interface RHFSelectProps extends Omit<SelectProps, "children"> {
203
198
 
204
199
  export declare const RHFTextArea: ({ defaultValue, rules, name, classNames, ...props }: RHFTextAreaProps) => default_2.JSX.Element;
205
200
 
206
- declare interface RHFTextAreaProps extends TextAreaProps {
201
+ declare interface RHFTextAreaProps extends Omit<TextAreaProps, "errorMessage" | "isInvalid"> {
207
202
  name: string;
208
203
  rules?: RegisterOptions;
209
204
  }
210
205
 
211
206
  export declare const RHFTime: ({ name, rules, defaultValue, ...props }: RHFTimeProps) => default_2.JSX.Element;
212
207
 
213
- declare interface RHFTimeProps extends TimeInputProps {
208
+ declare interface RHFTimeProps extends Omit<TimeInputProps, "value" | "errorMessage" | "isInvalid"> {
214
209
  name: string;
215
210
  rules?: RegisterOptions;
216
211
  }
217
212
 
218
- declare interface RHFTimeProps_2 extends TimeInputProps {
213
+ declare interface RHFTimeProps_2 extends Omit<TimeInputProps, "value" | "errorMessage" | "isInvalid"> {
219
214
  rules?: RegisterOptions;
220
215
  name: string;
221
216
  }
222
217
 
218
+ declare interface RowsPerPageTableProps {
219
+ default: number;
220
+ options: number[];
221
+ }
222
+
223
223
  export declare interface SkeletonTableProps {
224
224
  size?: number;
225
225
  columns: ColumnsTableProps[];