next-recomponents 2.0.3 → 2.0.5
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 +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +594 -471
- package/dist/index.mjs +544 -422
- package/package.json +1 -1
- package/src/alert/index.tsx +23 -145
- package/src/index.tsx +2 -1
- package/src/pop/index.tsx +253 -0
- package/src/table/index.tsx +348 -241
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React$1, { DetailedHTMLProps, ButtonHTMLAttributes, ReactNode, Dispatch, SetStateAction, InputHTMLAttributes, TextareaHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
3
3
|
import { GridValidRowModel } from '@mui/x-data-grid';
|
|
4
4
|
|
|
5
|
+
interface Props$6 extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
color?: "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function Alert({ color, children, ...props }: Props$6): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
5
11
|
interface Props$5 extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
6
12
|
icon?: React.ReactNode;
|
|
7
13
|
size?: "full" | "small";
|
|
@@ -56,8 +62,9 @@ declare const regularExpresions: {
|
|
|
56
62
|
interface TableButtonProps extends React$1.MouseEvent<HTMLButtonElement, MouseEvent> {
|
|
57
63
|
row: Record<string, any>;
|
|
58
64
|
}
|
|
65
|
+
type FooterAggregation = "sum" | "avg" | "count";
|
|
59
66
|
interface FooterType {
|
|
60
|
-
[key: string]:
|
|
67
|
+
[key: string]: FooterAggregation;
|
|
61
68
|
}
|
|
62
69
|
interface TableProps {
|
|
63
70
|
data: any;
|
|
@@ -209,11 +216,12 @@ interface Table3Props<T extends Record<string, any>> extends DetailedHTMLProps<T
|
|
|
209
216
|
}
|
|
210
217
|
declare function Table3<T extends Record<string, any>>({ data, selectItems, maxItems, onSave, exportName, colSizes, modal, header, footer, onChange, symbols, sortBy, ...props }: Table3Props<T>): react_jsx_runtime.JSX.Element | null;
|
|
211
218
|
|
|
219
|
+
type Color = "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
212
220
|
declare function usePopup(): {
|
|
213
|
-
alert: (message: string) => Promise<void>;
|
|
214
|
-
confirm: (message: string) => Promise<boolean>;
|
|
215
|
-
prompt: (message: string) => Promise<string | null>;
|
|
221
|
+
alert: (message: string, color?: Color) => Promise<void>;
|
|
222
|
+
confirm: (message: string, color?: Color) => Promise<boolean>;
|
|
223
|
+
prompt: (message: string, color?: Color) => Promise<string | null>;
|
|
216
224
|
PopupComponent: react_jsx_runtime.JSX.Element | null;
|
|
217
225
|
};
|
|
218
226
|
|
|
219
|
-
export { Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };
|
|
227
|
+
export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React$1, { DetailedHTMLProps, ButtonHTMLAttributes, ReactNode, Dispatch, SetStateAction, InputHTMLAttributes, TextareaHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
3
3
|
import { GridValidRowModel } from '@mui/x-data-grid';
|
|
4
4
|
|
|
5
|
+
interface Props$6 extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
color?: "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function Alert({ color, children, ...props }: Props$6): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
5
11
|
interface Props$5 extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
6
12
|
icon?: React.ReactNode;
|
|
7
13
|
size?: "full" | "small";
|
|
@@ -56,8 +62,9 @@ declare const regularExpresions: {
|
|
|
56
62
|
interface TableButtonProps extends React$1.MouseEvent<HTMLButtonElement, MouseEvent> {
|
|
57
63
|
row: Record<string, any>;
|
|
58
64
|
}
|
|
65
|
+
type FooterAggregation = "sum" | "avg" | "count";
|
|
59
66
|
interface FooterType {
|
|
60
|
-
[key: string]:
|
|
67
|
+
[key: string]: FooterAggregation;
|
|
61
68
|
}
|
|
62
69
|
interface TableProps {
|
|
63
70
|
data: any;
|
|
@@ -209,11 +216,12 @@ interface Table3Props<T extends Record<string, any>> extends DetailedHTMLProps<T
|
|
|
209
216
|
}
|
|
210
217
|
declare function Table3<T extends Record<string, any>>({ data, selectItems, maxItems, onSave, exportName, colSizes, modal, header, footer, onChange, symbols, sortBy, ...props }: Table3Props<T>): react_jsx_runtime.JSX.Element | null;
|
|
211
218
|
|
|
219
|
+
type Color = "white" | "primary" | "secondary" | "info" | "danger" | "warning" | "success";
|
|
212
220
|
declare function usePopup(): {
|
|
213
|
-
alert: (message: string) => Promise<void>;
|
|
214
|
-
confirm: (message: string) => Promise<boolean>;
|
|
215
|
-
prompt: (message: string) => Promise<string | null>;
|
|
221
|
+
alert: (message: string, color?: Color) => Promise<void>;
|
|
222
|
+
confirm: (message: string, color?: Color) => Promise<boolean>;
|
|
223
|
+
prompt: (message: string, color?: Color) => Promise<string | null>;
|
|
216
224
|
PopupComponent: react_jsx_runtime.JSX.Element | null;
|
|
217
225
|
};
|
|
218
226
|
|
|
219
|
-
export { Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };
|
|
227
|
+
export { Alert, Button, Container, DocumentViewer, Form, Input, Modal, MyCalendar, Pre, Select, Table, Table3, type TableButtonProps, type TableButtonProps as TableEventProps, TextArea, regularExpresions, useDates, useExcel, useFormValues, usePopup, useResources };
|