react-hook-toolkit 1.0.11 → 1.0.12

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;
@@ -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, _b = _a.spacing, spacing = _b === void 0 ? 2 : _b, _c = _a.boxShadow, boxShadow = _c === void 0 ? '0px 0px 2px 2px #d8d8d8' : _c, _d = _a.background, background = _d === void 0 ? '#eee' : _d, _e = _a.loaderType, loaderType = _e === void 0 ? 'skeleton' : _e;
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: "flex", 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"] }), (item === null || item === void 0 ? void 0 : item.value) ? (_jsx(Typography, { component: "span", sx: { fontSize: '14px' }, children: item.value || 'N/A' })) : loaderType === 'skeleton' ? (_jsx(Skeleton, { sx: { ml: 2 }, variant: "text", width: 100, height: 20 })) : (_jsx(CircularProgress, { sx: { ml: 2 }, color: "success", size: 18 }))] }) }, index.toString())); }) })] }) }));
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-hook-toolkit",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
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",