@ammarkhalidfarooq/dashboard-package 0.5.40 → 0.6.0

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
@@ -113,6 +113,118 @@ export default App;
113
113
  }
114
114
  ```
115
115
 
116
+ ### ActiveCampaignsCard (tree-shakeable)
117
+
118
+ A configurable table card — used for channel performance, active campaigns, and similar ranked lists.
119
+
120
+ ```jsx
121
+ import ActiveCampaignsCard from "@ammarkhalidfarooq/dashboard-package/ActiveCampaignsCard";
122
+ ```
123
+
124
+ Or import from the main entry:
125
+
126
+ ```jsx
127
+ import { ActiveCampaignsCard } from "@ammarkhalidfarooq/dashboard-package";
128
+ ```
129
+
130
+ **Channel performance example:**
131
+
132
+ ```jsx
133
+ import ActiveCampaignsCard from "@ammarkhalidfarooq/dashboard-package/ActiveCampaignsCard";
134
+
135
+ const channelRows = [
136
+ {
137
+ id: "M",
138
+ avatarBg: "#4267B2",
139
+ name: "Meta Ads",
140
+ val1: "$32,800",
141
+ val2: "$112,400",
142
+ val3: "3.4x",
143
+ val4: "$340",
144
+ type: "trend",
145
+ trendType: "up",
146
+ trendLabel: "Improving",
147
+ highlightVal3: true,
148
+ val3Color: "#22C55E",
149
+ },
150
+ {
151
+ id: "G",
152
+ avatarBg: "#4285F4",
153
+ name: "Google Ads",
154
+ val1: "$28,200",
155
+ val2: "$78,300",
156
+ val3: "2.8x",
157
+ val4: "$385",
158
+ type: "trend",
159
+ trendType: "up",
160
+ trendLabel: "Improving",
161
+ highlightVal3: true,
162
+ val3Color: "#22C55E",
163
+ },
164
+ ];
165
+
166
+ const App = () => (
167
+ <ActiveCampaignsCard
168
+ title="Channel performance"
169
+ subtitle="Ad platforms ranked by ROAS"
170
+ columns={["channel", "spend", "revenue", "ROAS", "CPA", "trend"]}
171
+ gridTemplateColumns="2.2fr 1fr 1fr 0.8fr 0.8fr 1.2fr"
172
+ height="100%"
173
+ rows={channelRows}
174
+ />
175
+ );
176
+
177
+ export default App;
178
+ ```
179
+
180
+ **Props:**
181
+
182
+ | Prop | Type | Default | Description |
183
+ |------|------|---------|-------------|
184
+ | `title` | `string` | `"Active campaigns"` | Card title |
185
+ | `subtitle` | `string` | `"Live fundraisers ranked by velocity"` | Card subtitle |
186
+ | `actionLabel` | `string` | — | Optional top-right action link text |
187
+ | `columns` | `string[]` | `["Campaign", "Raised", "Progress", "Donors", "Avg gift"]` | Table header labels |
188
+ | `rows` | `object[]` | `[]` | Table row data (see below) |
189
+ | `gridTemplateColumns` | `string` | `"3fr 1fr 1.5fr 0.8fr 1fr"` | CSS grid column template |
190
+ | `height` | `string` | — | Card height (e.g. `"100%"`) |
191
+ | `compact` | `boolean` | `false` | Smaller typography and spacing |
192
+
193
+ **`row` shape:**
194
+
195
+ ```js
196
+ // Channel performance / trend table (6 columns)
197
+ {
198
+ id: "M", // Avatar label (optional)
199
+ avatarBg: "#4267B2", // Avatar background color
200
+ name: "Meta Ads", // Row label
201
+ val1: "$32,800", // Column 2 (spend / raised)
202
+ val2: "$112,400", // Column 3 when type !== "progress"
203
+ val3: "3.4x", // Column 4 (ROAS / donors)
204
+ val4: "$340", // Column 5 (CPA / avg gift)
205
+ type: "trend", // "trend" | "progress" — controls column 3 & 6
206
+ trendType: "up", // "up" | "down" (when type is "trend")
207
+ trendLabel: "Improving", // Trend badge text
208
+ highlightVal3: true, // Highlight column 4 value
209
+ val3Color: "#22C55E", // Highlight color for column 4
210
+ }
211
+
212
+ // Campaign progress table (5 columns)
213
+ {
214
+ id: "1",
215
+ name: "Ramadan Appeal",
216
+ val1: "$45,200",
217
+ type: "progress",
218
+ progress: 72,
219
+ progressColor: "rgb(99, 99, 230)",
220
+ val3: "1,240",
221
+ val4: "$36.45",
222
+ status: "Live",
223
+ statusBg: "#DCFCE7",
224
+ statusColor: "#166534",
225
+ }
226
+ ```
227
+
116
228
  ## Development
117
229
 
118
230
  To preview the component locally:
@@ -127,4 +239,4 @@ To build the package:
127
239
  npm run build
128
240
  ```
129
241
 
130
- The build outputs ESM and CommonJS bundles in the `dist` folder, including a separate `RenderChartCard` bundle for tree-shaking.
242
+ The build outputs ESM and CommonJS bundles in the `dist` folder, including separate `RenderChartCard` and `ActiveCampaignsCard` bundles for tree-shaking.
@@ -0,0 +1,266 @@
1
+ 'use strict';
2
+
3
+ var material = require('@mui/material');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+
6
+ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
7
+ var _ref$title = _ref.title,
8
+ title = _ref$title === void 0 ? "Active campaigns" : _ref$title,
9
+ _ref$subtitle = _ref.subtitle,
10
+ subtitle = _ref$subtitle === void 0 ? "Live fundraisers ranked by velocity" : _ref$subtitle,
11
+ actionLabel = _ref.actionLabel,
12
+ _ref$columns = _ref.columns,
13
+ columns = _ref$columns === void 0 ? ["Campaign", "Raised", "Progress", "Donors", "Avg gift"] : _ref$columns,
14
+ _ref$rows = _ref.rows,
15
+ rows = _ref$rows === void 0 ? [] : _ref$rows,
16
+ _ref$gridTemplateColu = _ref.gridTemplateColumns,
17
+ gridTemplateColumns = _ref$gridTemplateColu === void 0 ? "3fr 1fr 1.5fr 0.8fr 1fr " : _ref$gridTemplateColu,
18
+ height = _ref.height,
19
+ _ref$compact = _ref.compact,
20
+ compact = _ref$compact === void 0 ? false : _ref$compact;
21
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
22
+ sx: {
23
+ bgcolor: "#fff",
24
+ borderRadius: compact ? 3 : 4,
25
+ border: "1px solid #f0f0f0",
26
+ boxShadow: compact ? "0 2px 12px rgba(0,0,0,0.05)" : "0 4px 24px rgba(0,0,0,0.06)",
27
+ p: compact ? 1.5 : 3,
28
+ height: height
29
+ // height: "100%",
30
+ },
31
+ children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
32
+ sx: {
33
+ display: "flex",
34
+ justifyContent: "space-between",
35
+ alignItems: "flex-start",
36
+ mb: compact ? 1.25 : 3
37
+ },
38
+ children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
39
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
40
+ sx: {
41
+ fontWeight: 700,
42
+ fontSize: compact ? "14px" : "18px",
43
+ color: "#000",
44
+ textAlign: "left"
45
+ },
46
+ children: title
47
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
48
+ sx: {
49
+ fontSize: compact ? "10px" : "13px",
50
+ color: "rgba(0, 0, 0, 0.4)",
51
+ mt: 0.2
52
+ },
53
+ children: subtitle
54
+ })]
55
+ }), actionLabel && /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
56
+ sx: {
57
+ fontSize: compact ? "10px" : "13px",
58
+ fontWeight: 600,
59
+ color: "rgb(99, 99, 230)",
60
+ cursor: "pointer"
61
+ },
62
+ children: actionLabel
63
+ })]
64
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
65
+ sx: {
66
+ overflowX: compact ? "hidden" : "auto"
67
+ },
68
+ children: /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
69
+ sx: {
70
+ minWidth: compact ? 0 : "600px"
71
+ },
72
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
73
+ sx: {
74
+ display: "grid",
75
+ gridTemplateColumns: gridTemplateColumns,
76
+ gap: compact ? 1 : 2,
77
+ pb: compact ? 1 : 2.5,
78
+ borderBottom: "1px solid #f0f0f0"
79
+ },
80
+ children: columns.map(function (header) {
81
+ return /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
82
+ sx: {
83
+ fontSize: compact ? "9px" : "12px",
84
+ color: "rgba(0, 0, 0, 0.4)",
85
+ fontWeight: 500,
86
+ textAlign: "left"
87
+ },
88
+ children: header
89
+ }, header);
90
+ })
91
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
92
+ sx: {
93
+ mt: 1
94
+ },
95
+ children: rows.map(function (row, idx) {
96
+ var _row$progress;
97
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
98
+ sx: {
99
+ display: "grid",
100
+ gridTemplateColumns: gridTemplateColumns,
101
+ gap: compact ? 1 : 2,
102
+ py: compact ? 0.5 : 1.2,
103
+ alignItems: "center",
104
+ borderBottom: idx === rows.length - 1 ? "none" : "1px solid #f5f5f5"
105
+ },
106
+ children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
107
+ sx: {
108
+ display: "flex",
109
+ alignItems: "center",
110
+ gap: 1.5
111
+ },
112
+ children: [row.id && /*#__PURE__*/jsxRuntime.jsx(material.Avatar, {
113
+ sx: {
114
+ width: compact ? 22 : 28,
115
+ height: compact ? 22 : 28,
116
+ fontSize: compact ? "8px" : "10px",
117
+ fontWeight: 700,
118
+ bgcolor: row.avatarBg || "#F3F4F6",
119
+ color: "rgb(99, 99, 230)"
120
+ },
121
+ children: row.id
122
+ }), row.icon && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
123
+ sx: {
124
+ color: row.iconColor || "inherit",
125
+ display: "flex",
126
+ alignItems: "center"
127
+ },
128
+ children: /*#__PURE__*/jsxRuntime.jsx(row.icon, {
129
+ sx: {
130
+ fontSize: "18px"
131
+ }
132
+ })
133
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
134
+ sx: {
135
+ fontSize: compact ? "10px" : "12px",
136
+ fontWeight: 700,
137
+ color: "#000"
138
+ },
139
+ children: row.name
140
+ })]
141
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
142
+ sx: {
143
+ fontSize: compact ? "10px" : "13px",
144
+ fontWeight: 600,
145
+ color: "#000",
146
+ textAlign: "left"
147
+ },
148
+ children: row.val1
149
+ }), row.type === "progress" ? /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
150
+ sx: {
151
+ display: "flex",
152
+ alignItems: "center",
153
+ gap: 1.5
154
+ },
155
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
156
+ sx: {
157
+ flexGrow: 1
158
+ },
159
+ children: /*#__PURE__*/jsxRuntime.jsx(material.LinearProgress, {
160
+ variant: "determinate",
161
+ value: Math.min(100, Math.max(0, (_row$progress = row.progress) !== null && _row$progress !== void 0 ? _row$progress : 0)),
162
+ sx: {
163
+ height: compact ? 6 : 8,
164
+ borderRadius: 4,
165
+ bgcolor: "#F3F4F6",
166
+ "& .MuiLinearProgress-bar": {
167
+ borderRadius: 4,
168
+ bgcolor: row.progressColor || "rgb(99, 99, 230)"
169
+ }
170
+ }
171
+ })
172
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Typography, {
173
+ sx: {
174
+ fontSize: compact ? "9px" : "11px",
175
+ color: "rgba(0, 0, 0, 0.4)",
176
+ minWidth: "30px"
177
+ },
178
+ children: [row.progress, "%"]
179
+ })]
180
+ }) : /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
181
+ sx: {
182
+ fontSize: "13px",
183
+ fontWeight: 600,
184
+ color: "#000",
185
+ textAlign: "left"
186
+ },
187
+ children: row.val2
188
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
189
+ sx: {
190
+ fontSize: compact ? "10px" : "13px",
191
+ fontWeight: row.highlightVal3 ? 700 : 500,
192
+ color: row.highlightVal3 ? row.val3Color || "#22C55E" : "#000",
193
+ textAlign: "left"
194
+ },
195
+ children: row.val3
196
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
197
+ sx: {
198
+ fontSize: "13px",
199
+ fontWeight: 500,
200
+ color: "#000",
201
+ textAlign: "left"
202
+ },
203
+ children: row.val4
204
+ }), columns.length > 5 && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
205
+ children: row.type === "trend" ? /*#__PURE__*/jsxRuntime.jsx(material.Box, {
206
+ sx: {
207
+ display: "flex",
208
+ alignItems: "center",
209
+ gap: 0.5
210
+ },
211
+ children: row.trendType === "up" ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
212
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
213
+ sx: {
214
+ fontSize: "14px",
215
+ color: "#22C55E"
216
+ },
217
+ children: "\u25B2"
218
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
219
+ sx: {
220
+ fontSize: "12px",
221
+ color: "#22C55E",
222
+ fontWeight: 700
223
+ },
224
+ children: row.trendLabel
225
+ })]
226
+ }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
227
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
228
+ sx: {
229
+ fontSize: "14px",
230
+ color: "#EF4444"
231
+ },
232
+ children: "\u25BC"
233
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
234
+ sx: {
235
+ fontSize: "12px",
236
+ color: "#EF4444",
237
+ fontWeight: 700
238
+ },
239
+ children: row.trendLabel
240
+ })]
241
+ })
242
+ }) : /*#__PURE__*/jsxRuntime.jsx(material.Box, {
243
+ sx: {
244
+ display: "inline-block",
245
+ px: compact ? 1 : 1.5,
246
+ py: compact ? 0.25 : 0.5,
247
+ borderRadius: "100px",
248
+ bgcolor: row.statusBg,
249
+ color: row.statusColor,
250
+ fontSize: compact ? "9px" : "11px",
251
+ fontWeight: 700,
252
+ textAlign: "center"
253
+ },
254
+ children: row.status
255
+ })
256
+ })]
257
+ }, idx);
258
+ })
259
+ })]
260
+ })
261
+ })]
262
+ });
263
+ };
264
+
265
+ module.exports = ActiveCampaignsCard;
266
+ //# sourceMappingURL=ActiveCampaignsCard.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActiveCampaignsCard.cjs.js","sources":["../src/components/UI/ActiveCampaignsCard/index.jsx"],"sourcesContent":["import { Box, Typography, LinearProgress, Avatar } from \"@mui/material\";\r\n\r\nconst ActiveCampaignsCard = ({\r\n title = \"Active campaigns\",\r\n subtitle = \"Live fundraisers ranked by velocity\",\r\n actionLabel,\r\n columns = [\"Campaign\", \"Raised\", \"Progress\", \"Donors\", \"Avg gift\",],\r\n rows = [],\r\n gridTemplateColumns = \"3fr 1fr 1.5fr 0.8fr 1fr \",\r\n height,\r\n compact = false,\r\n}) => {\r\n return (\r\n <Box\r\n sx={{\r\n bgcolor: \"#fff\",\r\n borderRadius: compact ? 3 : 4,\r\n border: \"1px solid #f0f0f0\",\r\n boxShadow: compact ? \"0 2px 12px rgba(0,0,0,0.05)\" : \"0 4px 24px rgba(0,0,0,0.06)\",\r\n p: compact ? 1.5 : 3,\r\n height: height,\r\n // height: \"100%\",\r\n }}\r\n >\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n justifyContent: \"space-between\",\r\n alignItems: \"flex-start\",\r\n mb: compact ? 1.25 : 3,\r\n }}\r\n >\r\n <Box>\r\n <Typography\r\n sx={{\r\n fontWeight: 700,\r\n fontSize: compact ? \"14px\" : \"18px\",\r\n color: \"#000\",\r\n textAlign: \"left\",\r\n }}\r\n >\r\n {title}\r\n </Typography>\r\n <Typography\r\n sx={{ fontSize: compact ? \"10px\" : \"13px\", color: \"rgba(0, 0, 0, 0.4)\", mt: 0.2 }}\r\n >\r\n {subtitle}\r\n </Typography>\r\n </Box>\r\n {actionLabel && (\r\n <Typography\r\n sx={{\r\n fontSize: compact ? \"10px\" : \"13px\",\r\n fontWeight: 600,\r\n color: \"rgb(99, 99, 230)\",\r\n cursor: \"pointer\",\r\n }}\r\n >\r\n {actionLabel}\r\n </Typography>\r\n )}\r\n </Box>\r\n\r\n <Box sx={{ overflowX: compact ? \"hidden\" : \"auto\" }}>\r\n <Box sx={{ minWidth: compact ? 0 : \"600px\" }}>\r\n <Box\r\n sx={{\r\n display: \"grid\",\r\n gridTemplateColumns: gridTemplateColumns,\r\n gap: compact ? 1 : 2,\r\n pb: compact ? 1 : 2.5,\r\n borderBottom: \"1px solid #f0f0f0\",\r\n }}\r\n >\r\n {columns.map((header) => (\r\n <Typography\r\n key={header}\r\n sx={{\r\n fontSize: compact ? \"9px\" : \"12px\",\r\n color: \"rgba(0, 0, 0, 0.4)\",\r\n fontWeight: 500,\r\n textAlign: \"left\",\r\n }}\r\n >\r\n {header}\r\n </Typography>\r\n ))}\r\n </Box>\r\n\r\n <Box sx={{ mt: 1 }}>\r\n {rows.map((row, idx) => (\r\n <Box\r\n key={idx}\r\n sx={{\r\n display: \"grid\",\r\n gridTemplateColumns: gridTemplateColumns,\r\n gap: compact ? 1 : 2,\r\n py: compact ? 0.5 : 1.2,\r\n alignItems: \"center\",\r\n borderBottom:\r\n idx === rows.length - 1 ? \"none\" : \"1px solid #f5f5f5\",\r\n }}\r\n >\r\n {/* Column 1: Item with Avatar/Icon */}\r\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1.5 }}>\r\n {row.id && (\r\n <Avatar\r\n sx={{\r\n width: compact ? 22 : 28,\r\n height: compact ? 22 : 28,\r\n fontSize: compact ? \"8px\" : \"10px\",\r\n fontWeight: 700,\r\n bgcolor: row.avatarBg || \"#F3F4F6\",\r\n color: \"rgb(99, 99, 230)\",\r\n }}\r\n >\r\n {row.id}\r\n </Avatar>\r\n )}\r\n {row.icon && (\r\n <Box\r\n sx={{\r\n color: row.iconColor || \"inherit\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n }}\r\n >\r\n <row.icon sx={{ fontSize: \"18px\" }} />\r\n </Box>\r\n )}\r\n <Typography\r\n sx={{ fontSize: compact ? \"10px\" : \"12px\", fontWeight: 700, color: \"#000\" }}\r\n >\r\n {row.name}\r\n </Typography>\r\n </Box>\r\n\r\n {/* Column 2: Value 1 (Spent/Raised) */}\r\n <Typography\r\n sx={{\r\n fontSize: compact ? \"10px\" : \"13px\",\r\n fontWeight: 600,\r\n color: \"#000\",\r\n textAlign: \"left\",\r\n }}\r\n >\r\n {row.val1}\r\n </Typography>\r\n\r\n {/* Column 3: Progress or Value 2 */}\r\n {row.type === \"progress\" ? (\r\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1.5, }}>\r\n <Box sx={{ flexGrow: 1 }}>\r\n <LinearProgress\r\n variant=\"determinate\"\r\n value={Math.min(100, Math.max(0, row.progress ?? 0))}\r\n sx={{\r\n height: compact ? 6 : 8,\r\n borderRadius: 4,\r\n bgcolor: \"#F3F4F6\",\r\n \"& .MuiLinearProgress-bar\": {\r\n borderRadius: 4,\r\n bgcolor: row.progressColor || \"rgb(99, 99, 230)\",\r\n },\r\n }}\r\n />\r\n </Box>\r\n <Typography\r\n sx={{\r\n fontSize: compact ? \"9px\" : \"11px\",\r\n color: \"rgba(0, 0, 0, 0.4)\",\r\n minWidth: \"30px\",\r\n }}\r\n >\r\n {row.progress}%\r\n </Typography>\r\n </Box>\r\n ) : (\r\n <Typography\r\n sx={{\r\n fontSize: \"13px\",\r\n fontWeight: 600,\r\n color: \"#000\",\r\n textAlign: \"left\",\r\n }}\r\n >\r\n {row.val2}\r\n </Typography>\r\n )}\r\n\r\n {/* Column 4: Value 3 or highlighted ROAS */}\r\n <Typography\r\n sx={{\r\n fontSize: compact ? \"10px\" : \"13px\",\r\n fontWeight: row.highlightVal3 ? 700 : 500,\r\n color: row.highlightVal3\r\n ? row.val3Color || \"#22C55E\"\r\n : \"#000\",\r\n textAlign: \"left\",\r\n }}\r\n >\r\n {row.val3}\r\n </Typography>\r\n\r\n {/* Column 5: Value 4 */}\r\n <Typography\r\n sx={{\r\n fontSize: \"13px\",\r\n fontWeight: 500,\r\n color: \"#000\",\r\n textAlign: \"left\",\r\n }}\r\n >\r\n {row.val4}\r\n </Typography>\r\n\r\n {/* Column 6: Status or Trend */}\r\n {columns.length > 5 && (\r\n <Box>\r\n {row.type === \"trend\" ? (\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: 0.5,\r\n }}\r\n >\r\n {row.trendType === \"up\" ? (\r\n <>\r\n <Typography sx={{ fontSize: \"14px\", color: \"#22C55E\" }}>\r\n ▲\r\n </Typography>\r\n <Typography\r\n sx={{\r\n fontSize: \"12px\",\r\n color: \"#22C55E\",\r\n fontWeight: 700,\r\n }}\r\n >\r\n {row.trendLabel}\r\n </Typography>\r\n </>\r\n ) : (\r\n <>\r\n <Typography sx={{ fontSize: \"14px\", color: \"#EF4444\" }}>\r\n ▼\r\n </Typography>\r\n <Typography\r\n sx={{\r\n fontSize: \"12px\",\r\n color: \"#EF4444\",\r\n fontWeight: 700,\r\n }}\r\n >\r\n {row.trendLabel}\r\n </Typography>\r\n </>\r\n )}\r\n </Box>\r\n ) : (\r\n <Box\r\n sx={{\r\n display: \"inline-block\",\r\n px: compact ? 1 : 1.5,\r\n py: compact ? 0.25 : 0.5,\r\n borderRadius: \"100px\",\r\n bgcolor: row.statusBg,\r\n color: row.statusColor,\r\n fontSize: compact ? \"9px\" : \"11px\",\r\n fontWeight: 700,\r\n textAlign: \"center\",\r\n }}\r\n >\r\n {row.status}\r\n </Box>\r\n )}\r\n </Box>\r\n )}\r\n </Box>\r\n ))}\r\n </Box>\r\n </Box>\r\n </Box>\r\n </Box>\r\n );\r\n};\r\n\r\nexport default ActiveCampaignsCard;\r\n"],"names":["ActiveCampaignsCard","_ref","_ref$title","title","_ref$subtitle","subtitle","actionLabel","_ref$columns","columns","_ref$rows","rows","_ref$gridTemplateColu","gridTemplateColumns","height","_ref$compact","compact","_jsxs","Box","sx","bgcolor","borderRadius","border","boxShadow","p","children","display","justifyContent","alignItems","mb","_jsx","Typography","fontWeight","fontSize","color","textAlign","mt","cursor","overflowX","minWidth","gap","pb","borderBottom","map","header","row","idx","_row$progress","py","length","id","Avatar","width","avatarBg","icon","iconColor","name","val1","type","flexGrow","LinearProgress","variant","value","Math","min","max","progress","progressColor","val2","highlightVal3","val3Color","val3","val4","trendType","_Fragment","trendLabel","px","statusBg","statusColor","status"],"mappings":";;;;;AAEA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EASnB;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CARJE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,MAAA,GAAG,kBAAkB,GAAAA,UAAA;IAAAE,aAAA,GAAAH,IAAA,CAC1BI,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAA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