react-hook-toolkit 1.0.11 → 1.0.13
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.
|
@@ -7,14 +7,16 @@ interface PropsType {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const AlertMessage: FC<PropsType>;
|
|
9
9
|
interface DetailsCardProps {
|
|
10
|
+
isLoading?: boolean;
|
|
10
11
|
title: string;
|
|
11
12
|
details: any[];
|
|
12
13
|
spacing?: number;
|
|
13
14
|
boxShadow?: string;
|
|
14
15
|
background?: string;
|
|
15
16
|
loaderType?: 'skeleton' | 'circular';
|
|
17
|
+
displayType?: 'flex' | 'block';
|
|
16
18
|
}
|
|
17
|
-
export declare const DetailsCard: ({ title, details, spacing, boxShadow, background, loaderType, }: DetailsCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const DetailsCard: ({ isLoading, title, details, spacing, boxShadow, background, loaderType, displayType, }: DetailsCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export declare const LabeledValue: ({ label, value, style }: any) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
interface FileComponentProps {
|
|
20
22
|
primaryKey: string | number;
|
package/dist/hooks/hooksComp.js
CHANGED
|
@@ -74,9 +74,9 @@ export var AlertMessage = function (_a) {
|
|
|
74
74
|
return null;
|
|
75
75
|
};
|
|
76
76
|
export var DetailsCard = function (_a) {
|
|
77
|
-
var title = _a.title, details = _a.details,
|
|
77
|
+
var _b = _a.isLoading, isLoading = _b === void 0 ? false : _b, title = _a.title, details = _a.details, _c = _a.spacing, spacing = _c === void 0 ? 2 : _c, _d = _a.boxShadow, boxShadow = _d === void 0 ? '0px 0px 2px 2px #d8d8d8' : _d, _e = _a.background, background = _e === void 0 ? '#eee' : _e, _f = _a.loaderType, loaderType = _f === void 0 ? 'skeleton' : _f, _g = _a.displayType, displayType = _g === void 0 ? 'flex' : _g;
|
|
78
78
|
var width = useWindowSize().width;
|
|
79
|
-
return (_jsx(Card, { sx: { boxShadow: boxShadow }, children: _jsxs(CardContent, { children: [_jsx(Typography, { variant: "h6", sx: { background: background, padding: '4px' }, children: title }), _jsx(Grid, { container: true, spacing: spacing, sx: { mt: 1 }, children: details.filter(Boolean).map(function (item, index) { return (_jsx(Grid, { item: true, xs: 12, sm: 6, md: 6, lg: width < 1367 ? 6 : 4, children: _jsxs(Box, { display:
|
|
79
|
+
return (_jsx(Card, { sx: { boxShadow: boxShadow }, children: _jsxs(CardContent, { children: [_jsx(Typography, { variant: "h6", sx: { background: background, padding: '4px' }, children: title }), _jsx(Grid, { container: true, spacing: spacing, sx: { mt: 1 }, children: details.filter(Boolean).map(function (item, index) { return (_jsx(Grid, { item: true, xs: 12, sm: 6, md: 6, lg: width < 1367 ? 6 : 4, children: _jsxs(Box, { display: displayType, alignItems: "center", sx: { fontSize: '14px' }, children: [_jsxs(Typography, { fontWeight: "bold", component: "span", sx: { fontSize: '14px' }, children: [item === null || item === void 0 ? void 0 : item.label, ":\u00A0"] }), isLoading ? (loaderType === 'skeleton' ? (_jsx(Skeleton, { sx: { ml: 2 }, variant: "text", width: 100, height: 20 })) : (_jsx(CircularProgress, { sx: { ml: 2 }, color: "success", size: 18 }))) : (_jsx(Typography, { component: "span", sx: { fontSize: '14px' }, children: (item === null || item === void 0 ? void 0 : item.value) !== undefined && (item === null || item === void 0 ? void 0 : item.value) !== null && (item === null || item === void 0 ? void 0 : item.value) !== '' ? item.value : 'N/A' }))] }) }, index.toString())); }) })] }) }));
|
|
80
80
|
};
|
|
81
81
|
export var LabeledValue = function (_a) {
|
|
82
82
|
var label = _a.label, value = _a.value, _b = _a.style, style = _b === void 0 ? undefined : _b;
|
|
@@ -120,7 +120,7 @@ export var FilePreview = function (_a) {
|
|
|
120
120
|
overflow: 'hidden',
|
|
121
121
|
textOverflow: 'ellipsis',
|
|
122
122
|
maxWidth: width - 120,
|
|
123
|
-
},
|
|
123
|
+
}, children: filename }) })) : (_jsx(Typography, { sx: {
|
|
124
124
|
fontSize: '14px',
|
|
125
125
|
whiteSpace: 'nowrap',
|
|
126
126
|
overflow: 'hidden',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-hook-toolkit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Ultimate package for React developers, offering a powerful collection of hooks and components to enhance their development experience.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|