next-recomponents 1.1.5 → 1.1.7
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.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +259 -137
- package/dist/index.mjs +227 -102
- package/package.json +1 -1
- package/src/button/index.tsx +27 -3
- package/src/container/index.tsx +1 -0
- package/src/form/index.tsx +15 -3
- package/src/select/index.tsx +7 -0
- package/src/use-resources/get.token.tsx +1 -3
- package/src/use-resources/index.ts +91 -4
- package/src/use-resources/types.ts +3 -0
package/dist/index.d.mts
CHANGED
|
@@ -12,7 +12,7 @@ interface Props$3 extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
12
12
|
size?: "full" | "small";
|
|
13
13
|
color?: "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
14
14
|
}
|
|
15
|
-
declare function Button({ className, size, color, children, icon, ...props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function Button({ className, size, color, children, icon, disabled, ...props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
type LocationItem = {
|
|
18
18
|
location: string;
|
|
@@ -34,12 +34,13 @@ interface OnSubmitProps extends React$1.FormEvent<HTMLFormElement> {
|
|
|
34
34
|
values: Record<string, any>;
|
|
35
35
|
}
|
|
36
36
|
interface Props$2 {
|
|
37
|
-
onSubmit: (e: OnSubmitProps) => void
|
|
37
|
+
onSubmit: (e: OnSubmitProps) => void | Promise<void>;
|
|
38
38
|
children: React$1.ReactNode;
|
|
39
39
|
state?: [any, Dispatch<SetStateAction<any>>];
|
|
40
40
|
invalidMessage?: string;
|
|
41
|
+
loader?: React$1.ReactNode;
|
|
41
42
|
}
|
|
42
|
-
declare function Form({ onSubmit, state, invalidMessage, children, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare function Form({ onSubmit, state, invalidMessage, children, loader, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
43
44
|
|
|
44
45
|
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
45
46
|
label: React.ReactNode;
|
|
@@ -103,6 +104,9 @@ type EnhancedEndpoints<T extends Record<string, ItemsRecord>> = {
|
|
|
103
104
|
totalItems: number;
|
|
104
105
|
totalPages: number;
|
|
105
106
|
errorMessage: string;
|
|
107
|
+
autoLoad?: Boolean;
|
|
108
|
+
defaultParams?: Record<string, any>;
|
|
109
|
+
id?: number | string;
|
|
106
110
|
};
|
|
107
111
|
};
|
|
108
112
|
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ interface Props$3 extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
12
12
|
size?: "full" | "small";
|
|
13
13
|
color?: "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
14
14
|
}
|
|
15
|
-
declare function Button({ className, size, color, children, icon, ...props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function Button({ className, size, color, children, icon, disabled, ...props }: Props$3): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
type LocationItem = {
|
|
18
18
|
location: string;
|
|
@@ -34,12 +34,13 @@ interface OnSubmitProps extends React$1.FormEvent<HTMLFormElement> {
|
|
|
34
34
|
values: Record<string, any>;
|
|
35
35
|
}
|
|
36
36
|
interface Props$2 {
|
|
37
|
-
onSubmit: (e: OnSubmitProps) => void
|
|
37
|
+
onSubmit: (e: OnSubmitProps) => void | Promise<void>;
|
|
38
38
|
children: React$1.ReactNode;
|
|
39
39
|
state?: [any, Dispatch<SetStateAction<any>>];
|
|
40
40
|
invalidMessage?: string;
|
|
41
|
+
loader?: React$1.ReactNode;
|
|
41
42
|
}
|
|
42
|
-
declare function Form({ onSubmit, state, invalidMessage, children, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare function Form({ onSubmit, state, invalidMessage, children, loader, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
43
44
|
|
|
44
45
|
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
45
46
|
label: React.ReactNode;
|
|
@@ -103,6 +104,9 @@ type EnhancedEndpoints<T extends Record<string, ItemsRecord>> = {
|
|
|
103
104
|
totalItems: number;
|
|
104
105
|
totalPages: number;
|
|
105
106
|
errorMessage: string;
|
|
107
|
+
autoLoad?: Boolean;
|
|
108
|
+
defaultParams?: Record<string, any>;
|
|
109
|
+
id?: number | string;
|
|
106
110
|
};
|
|
107
111
|
};
|
|
108
112
|
|