@ammarkhalidfarooq/dashboard-package 0.5.39 → 0.5.40

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.
@@ -0,0 +1,669 @@
1
+ 'use strict';
2
+
3
+ var material = require('@mui/material');
4
+ var React = require('react');
5
+ var ReactApexChart = require('react-apexcharts');
6
+ var styles = require('@mui/material/styles');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ var iconsMaterial = require('@mui/icons-material');
9
+
10
+ function _arrayLikeToArray(r, a) {
11
+ (null == a || a > r.length) && (a = r.length);
12
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
13
+ return n;
14
+ }
15
+ function _arrayWithHoles(r) {
16
+ if (Array.isArray(r)) return r;
17
+ }
18
+ function _defineProperty(e, r, t) {
19
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
20
+ value: t,
21
+ enumerable: true,
22
+ configurable: true,
23
+ writable: true
24
+ }) : e[r] = t, e;
25
+ }
26
+ function _iterableToArrayLimit(r, l) {
27
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
28
+ if (null != t) {
29
+ var e,
30
+ n,
31
+ i,
32
+ u,
33
+ a = [],
34
+ f = true,
35
+ o = false;
36
+ try {
37
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
38
+ } catch (r) {
39
+ o = true, n = r;
40
+ } finally {
41
+ try {
42
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
43
+ } finally {
44
+ if (o) throw n;
45
+ }
46
+ }
47
+ return a;
48
+ }
49
+ }
50
+ function _nonIterableRest() {
51
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
+ }
53
+ function ownKeys(e, r) {
54
+ var t = Object.keys(e);
55
+ if (Object.getOwnPropertySymbols) {
56
+ var o = Object.getOwnPropertySymbols(e);
57
+ r && (o = o.filter(function (r) {
58
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
59
+ })), t.push.apply(t, o);
60
+ }
61
+ return t;
62
+ }
63
+ function _objectSpread2(e) {
64
+ for (var r = 1; r < arguments.length; r++) {
65
+ var t = null != arguments[r] ? arguments[r] : {};
66
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
67
+ _defineProperty(e, r, t[r]);
68
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
69
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
70
+ });
71
+ }
72
+ return e;
73
+ }
74
+ function _slicedToArray(r, e) {
75
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
76
+ }
77
+ function _toPrimitive(t, r) {
78
+ if ("object" != typeof t || !t) return t;
79
+ var e = t[Symbol.toPrimitive];
80
+ if (void 0 !== e) {
81
+ var i = e.call(t, r);
82
+ if ("object" != typeof i) return i;
83
+ throw new TypeError("@@toPrimitive must return a primitive value.");
84
+ }
85
+ return ("string" === r ? String : Number)(t);
86
+ }
87
+ function _toPropertyKey(t) {
88
+ var i = _toPrimitive(t, "string");
89
+ return "symbol" == typeof i ? i : i + "";
90
+ }
91
+ function _typeof(o) {
92
+ "@babel/helpers - typeof";
93
+
94
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
95
+ return typeof o;
96
+ } : function (o) {
97
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
98
+ }, _typeof(o);
99
+ }
100
+ function _unsupportedIterableToArray(r, a) {
101
+ if (r) {
102
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
103
+ var t = {}.toString.call(r).slice(8, -1);
104
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
105
+ }
106
+ }
107
+
108
+ var RevenueChart = function RevenueChart(_ref) {
109
+ var metric = _ref.metric,
110
+ data = _ref.data,
111
+ series = _ref.series,
112
+ categories = _ref.categories,
113
+ _ref$height = _ref.height,
114
+ height = _ref$height === void 0 ? 350 : _ref$height,
115
+ _ref$stacked = _ref.stacked,
116
+ stacked = _ref$stacked === void 0 ? false : _ref$stacked,
117
+ _ref$type = _ref.type,
118
+ type = _ref$type === void 0 ? "area" : _ref$type,
119
+ _ref$id = _ref.id,
120
+ id = _ref$id === void 0 ? "revenue-chart" : _ref$id,
121
+ colors = _ref.colors,
122
+ _ref$showLegend = _ref.showLegend,
123
+ showLegend = _ref$showLegend === void 0 ? true : _ref$showLegend;
124
+ var theme = styles.useTheme();
125
+ var isRadial = type === 'donut' || type === 'pie';
126
+
127
+ // Base options common to all charts
128
+ var baseOptions = {
129
+ chart: {
130
+ id: id,
131
+ type: type,
132
+ toolbar: {
133
+ show: false
134
+ },
135
+ sparkline: {
136
+ enabled: false
137
+ },
138
+ animations: {
139
+ enabled: false
140
+ }
141
+ },
142
+ colors: colors || [theme.palette.primary.main, '#4B4BC2', '#7E7EE6', '#A3A3F0', '#C8C8FA'],
143
+ tooltip: {
144
+ theme: 'light',
145
+ y: {
146
+ formatter: function formatter(value) {
147
+ return (metric === null || metric === void 0 ? void 0 : metric.toLowerCase()) === 'revenue' ? "$".concat((value || 0).toLocaleString()) : value || 0;
148
+ }
149
+ }
150
+ }
151
+ };
152
+ var radialOptions = _objectSpread2(_objectSpread2({}, baseOptions), {}, {
153
+ labels: categories || [],
154
+ stroke: {
155
+ width: 0
156
+ },
157
+ dataLabels: {
158
+ enabled: true
159
+ },
160
+ legend: {
161
+ show: showLegend,
162
+ position: 'bottom',
163
+ horizontalAlign: 'center'
164
+ },
165
+ plotOptions: {
166
+ pie: {
167
+ donut: {
168
+ size: '70%',
169
+ labels: {
170
+ show: true,
171
+ total: {
172
+ show: true,
173
+ label: 'Total',
174
+ formatter: function formatter(w) {
175
+ var sum = w.globals.seriesTotals.reduce(function (a, b) {
176
+ return a + b;
177
+ }, 0);
178
+ return metric === 'Revenue' ? "$".concat(Math.round(sum).toLocaleString()) : Math.round(sum).toLocaleString();
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ });
186
+ var linearOptions = _objectSpread2(_objectSpread2({}, baseOptions), {}, {
187
+ chart: _objectSpread2(_objectSpread2({}, baseOptions.chart), {}, {
188
+ stacked: stacked
189
+ }),
190
+ stroke: {
191
+ curve: 'smooth',
192
+ width: type === 'bar' ? 0 : 2
193
+ },
194
+ fill: {
195
+ type: type === 'line' ? 'solid' : 'gradient',
196
+ opacity: type === 'line' ? 0 : 1,
197
+ gradient: type === 'line' ? undefined : {
198
+ shadeIntensity: 1,
199
+ opacityFrom: 0.8,
200
+ opacityTo: 0.4,
201
+ stops: [0, 100]
202
+ }
203
+ },
204
+ xaxis: {
205
+ categories: categories || [],
206
+ axisBorder: {
207
+ show: false
208
+ },
209
+ axisTicks: {
210
+ show: false
211
+ },
212
+ tickAmount: 5,
213
+ labels: {
214
+ rotate: 0,
215
+ rotateAlways: false,
216
+ hideOverlappingLabels: true,
217
+ style: {
218
+ colors: '#A1A1A8',
219
+ fontSize: '12px'
220
+ },
221
+ formatter: function formatter(val) {
222
+ if (!val || typeof val !== 'string') return val;
223
+ var date = new Date(val);
224
+ if (isNaN(date.getTime())) return val;
225
+ return date.toLocaleDateString('en-US', {
226
+ month: 'short',
227
+ day: 'numeric'
228
+ });
229
+ }
230
+ }
231
+ },
232
+ yaxis: {
233
+ show: true,
234
+ labels: {
235
+ style: {
236
+ colors: '#A1A1A8',
237
+ fontSize: '12px'
238
+ },
239
+ formatter: function formatter(value) {
240
+ return (metric === null || metric === void 0 ? void 0 : metric.toLowerCase()) === 'revenue' ? "$".concat((value || 0).toLocaleString()) : value || 0;
241
+ }
242
+ }
243
+ },
244
+ grid: {
245
+ show: true,
246
+ borderColor: '#f1f1f1',
247
+ strokeDashArray: 4,
248
+ position: 'back'
249
+ },
250
+ dataLabels: {
251
+ enabled: false
252
+ },
253
+ legend: {
254
+ show: showLegend && (stacked || series && series.length > 1),
255
+ position: 'top',
256
+ horizontalAlign: 'left'
257
+ },
258
+ plotOptions: {
259
+ bar: {
260
+ borderRadius: 4,
261
+ columnWidth: '60%'
262
+ }
263
+ }
264
+ });
265
+ var chartOptions = isRadial ? radialOptions : linearOptions;
266
+
267
+ // Ensure series is in the correct format for the chart type
268
+ var chartSeries = [];
269
+ if (isRadial) {
270
+ var _series$;
271
+ // For donut/pie, series must be a simple array of numbers
272
+ var processedData = Array.isArray(data) ? data.map(function (v) {
273
+ return _typeof(v) === 'object' && v !== null ? v.value : v;
274
+ }) : [];
275
+ chartSeries = processedData.length > 0 ? processedData : (series === null || series === void 0 || (_series$ = series[0]) === null || _series$ === void 0 ? void 0 : _series$.data) || [];
276
+ } else {
277
+ // For bar/line/area, series must be an array of objects [{ name: '', data: [] }]
278
+ var _processedData = Array.isArray(data) ? data.map(function (v) {
279
+ return _typeof(v) === 'object' && v !== null ? v.value : v;
280
+ }) : [];
281
+ chartSeries = Array.isArray(series) ? series : [{
282
+ name: metric || "Value",
283
+ data: _processedData
284
+ }];
285
+ }
286
+ return /*#__PURE__*/jsxRuntime.jsx(ReactApexChart, {
287
+ options: chartOptions,
288
+ series: chartSeries,
289
+ type: type,
290
+ height: height,
291
+ width: "100%"
292
+ }, "".concat(id, "-").concat(type, "-").concat(chartSeries.length));
293
+ };
294
+
295
+ var MetricSelector = function MetricSelector(_ref) {
296
+ var metric = _ref.metric,
297
+ onMetricChange = _ref.onMetricChange,
298
+ _ref$options = _ref.options,
299
+ options = _ref$options === void 0 ? ['Revenue', 'Donations'] : _ref$options,
300
+ _ref$label = _ref.label,
301
+ label = _ref$label === void 0 ? "Metric" : _ref$label;
302
+ var _React$useState = React.useState(null),
303
+ _React$useState2 = _slicedToArray(_React$useState, 2),
304
+ anchorEl = _React$useState2[0],
305
+ setAnchorEl = _React$useState2[1];
306
+ var open = Boolean(anchorEl);
307
+ var handleClick = function handleClick(event) {
308
+ setAnchorEl(event.currentTarget);
309
+ };
310
+ var handleClose = function handleClose(value) {
311
+ if (typeof value === 'string') {
312
+ onMetricChange(value);
313
+ }
314
+ setAnchorEl(null);
315
+ };
316
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
317
+ sx: {
318
+ display: 'flex',
319
+ gap: 1
320
+ },
321
+ children: [/*#__PURE__*/jsxRuntime.jsxs(material.Button, {
322
+ id: "metric-button",
323
+ "aria-controls": open ? 'metric-menu' : undefined,
324
+ "aria-haspopup": "true",
325
+ "aria-expanded": open ? 'true' : undefined,
326
+ onClick: handleClick,
327
+ variant: "outlined",
328
+ sx: {
329
+ borderRadius: '8px',
330
+ borderColor: '#E9E9EB',
331
+ color: '#000',
332
+ textTransform: 'none',
333
+ fontWeight: 600,
334
+ px: 2,
335
+ height: '40px',
336
+ '&:hover': {
337
+ borderColor: 'primary.main',
338
+ bgcolor: 'rgba(99, 99, 230, 0.04)'
339
+ }
340
+ },
341
+ children: [label, ": ", metric]
342
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Menu, {
343
+ id: "metric-menu",
344
+ anchorEl: anchorEl,
345
+ open: open,
346
+ onClose: function onClose() {
347
+ return handleClose();
348
+ },
349
+ MenuListProps: {
350
+ 'aria-labelledby': 'metric-button'
351
+ },
352
+ PaperProps: {
353
+ sx: {
354
+ borderRadius: '8px',
355
+ mt: 1,
356
+ boxShadow: '0 4px 12px rgba(0,0,0,0.1)',
357
+ minWidth: '150px'
358
+ }
359
+ },
360
+ children: options.map(function (option) {
361
+ return /*#__PURE__*/jsxRuntime.jsx(material.MenuItem, {
362
+ onClick: function onClick() {
363
+ return handleClose(option);
364
+ },
365
+ sx: {
366
+ fontWeight: metric === option ? 700 : 400
367
+ },
368
+ children: option
369
+ }, option);
370
+ })
371
+ })]
372
+ });
373
+ };
374
+
375
+ var RenderChartCard = function RenderChartCard(_ref) {
376
+ var item = _ref.item,
377
+ index = _ref.index,
378
+ _ref$isPrimary = _ref.isPrimary,
379
+ isPrimary = _ref$isPrimary === void 0 ? false : _ref$isPrimary,
380
+ _ref$isPremium = _ref.isPremium,
381
+ isPremium = _ref$isPremium === void 0 ? false : _ref$isPremium,
382
+ metric = _ref.metric,
383
+ setMetric = _ref.setMetric,
384
+ _ref$md = _ref.md,
385
+ md = _ref$md === void 0 ? 4 : _ref$md,
386
+ _ref$type = _ref.type,
387
+ type = _ref$type === void 0 ? "area" : _ref$type;
388
+ return /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
389
+ item: true,
390
+ xs: 12,
391
+ md: md,
392
+ sx: {
393
+ display: "flex",
394
+ paddingTop: "0px !important"
395
+ },
396
+ children: /*#__PURE__*/jsxRuntime.jsx(material.Card, {
397
+ sx: {
398
+ width: "100%",
399
+ display: "flex",
400
+ flexDirection: "column",
401
+ boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
402
+ borderRadius: 4,
403
+ border: "1px solid #f0f0f0"
404
+ },
405
+ children: /*#__PURE__*/jsxRuntime.jsxs(material.CardContent, {
406
+ sx: {
407
+ p: item.exportMode ? 2 : 3,
408
+ flexGrow: 1,
409
+ display: "flex",
410
+ flexDirection: "column"
411
+ },
412
+ children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
413
+ sx: {
414
+ display: "flex",
415
+ justifyContent: "space-between",
416
+ alignItems: "flex-start",
417
+ mb: item.exportMode ? 2 : isPremium ? 3 : 2
418
+ },
419
+ children: [isPremium ? /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
420
+ sx: {
421
+ textAlign: "left"
422
+ },
423
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
424
+ sx: {
425
+ color: "#000000",
426
+ fontWeight: 700,
427
+ fontSize: "18px",
428
+ mb: 0.2
429
+ },
430
+ children: item.label
431
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
432
+ variant: "caption",
433
+ sx: {
434
+ color: "rgba(0, 0, 0, 0.4)",
435
+ fontWeight: 400,
436
+ display: "block",
437
+ mb: 1.5
438
+ },
439
+ children: item.subtitle || "Last 30 days · daily aggregation"
440
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
441
+ sx: {
442
+ display: "flex",
443
+ alignItems: "center",
444
+ gap: 1.5
445
+ },
446
+ children: [item.value && /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
447
+ sx: {
448
+ fontWeight: 700,
449
+ color: "#000000",
450
+ fontSize: "28px"
451
+ },
452
+ children: _typeof(item.value) === 'object' && item.value !== null ? item.value.value !== undefined ? item.value.value : JSON.stringify(item.value) : item.value
453
+ }), (item.trend || "18%") && /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
454
+ sx: {
455
+ display: "flex",
456
+ alignItems: "center",
457
+ gap: 0.5,
458
+ bgcolor: "#8df3be9a",
459
+ color: "#054835ff",
460
+ px: 1,
461
+ py: 0.5,
462
+ borderRadius: "100px",
463
+ fontSize: "12px",
464
+ fontWeight: 600
465
+ },
466
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
467
+ children: "\u25B2"
468
+ }), item.trend || "18% vs last month"]
469
+ })]
470
+ })]
471
+ }) : /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
472
+ sx: {
473
+ textAlign: "left"
474
+ },
475
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
476
+ variant: "subtitle2",
477
+ sx: {
478
+ color: "#000000",
479
+ fontWeight: 600,
480
+ textTransform: "uppercase",
481
+ letterSpacing: "0.5px",
482
+ mb: 0.5
483
+ },
484
+ children: item.label
485
+ }), item.value && /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
486
+ variant: "subtitle2",
487
+ sx: {
488
+ fontWeight: 600,
489
+ color: "#000000",
490
+ mb: 0.5
491
+ },
492
+ children: _typeof(item.value) === 'object' && item.value !== null ? item.value.value !== undefined ? item.value.value : JSON.stringify(item.value) : item.value
493
+ }), item.subValue && /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
494
+ variant: "subtitle2",
495
+ sx: {
496
+ color: "#000000",
497
+ fontWeight: 600
498
+ },
499
+ children: _typeof(item.subValue) === 'object' && item.subValue !== null ? JSON.stringify(item.subValue) : item.subValue
500
+ })]
501
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
502
+ sx: {
503
+ display: "flex",
504
+ gap: 1,
505
+ alignItems: "center"
506
+ },
507
+ children: item.hideControls ? item.series && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
508
+ sx: {
509
+ display: item.exportMode ? "flex" : {
510
+ xs: "none",
511
+ sm: "flex"
512
+ },
513
+ gap: 2,
514
+ alignItems: "center"
515
+ },
516
+ children: [{
517
+ label: "Paid Ads",
518
+ color: "#6366F1"
519
+ }, {
520
+ label: "Organic",
521
+ color: "#10B981"
522
+ }, {
523
+ label: "Email",
524
+ color: "#06B6D4"
525
+ }].map(function (leg) {
526
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
527
+ sx: {
528
+ display: "flex",
529
+ alignItems: "center",
530
+ gap: 0.5
531
+ },
532
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
533
+ sx: {
534
+ width: 8,
535
+ height: 8,
536
+ borderRadius: "50%",
537
+ bgcolor: leg.color
538
+ }
539
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
540
+ sx: {
541
+ fontSize: "12px",
542
+ color: "rgba(0,0,0,0.6)",
543
+ fontWeight: 500
544
+ },
545
+ children: leg.label
546
+ })]
547
+ }, leg.label);
548
+ })
549
+ }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
550
+ children: [item.showSelector && /*#__PURE__*/jsxRuntime.jsx(MetricSelector, {
551
+ metric: metric,
552
+ onMetricChange: setMetric,
553
+ options: ["Revenue", "Donations"]
554
+ }), /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
555
+ sx: {
556
+ border: "1px solid #E9E9EB",
557
+ borderRadius: "8px",
558
+ color: "#000",
559
+ height: "40px",
560
+ width: "40px",
561
+ "&:hover": {
562
+ borderColor: "primary.main",
563
+ bgcolor: "rgba(99, 99, 230, 0.04)"
564
+ }
565
+ },
566
+ children: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.MoreHoriz, {
567
+ sx: {
568
+ fontSize: "1.2rem"
569
+ }
570
+ })
571
+ })]
572
+ })
573
+ })]
574
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
575
+ sx: {
576
+ flexGrow: 1,
577
+ minHeight: isPrimary ? "250px" : "200px"
578
+ },
579
+ children: [/*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
580
+ id: "".concat(item.label, "-").concat(index),
581
+ metric: item.label.includes("Rate") || item.label.includes("Performance") || item.label.includes("source") || item.label === "URL" ? "Percent" : item.stacked ? item.label.includes("Traffic") ? "Visitors" : "Donors" : metric,
582
+ data: item.data,
583
+ series: item.series,
584
+ categories: item.categories,
585
+ height: item.height || (isPrimary ? 250 : 200),
586
+ stacked: item.stacked,
587
+ type: type || item.type || "area",
588
+ colors: item.colors,
589
+ showLegend: !item.hideControls
590
+ }), item.hideControls && item.series && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
591
+ sx: {
592
+ display: {
593
+ xs: "flex",
594
+ sm: "none"
595
+ },
596
+ justifyContent: "center",
597
+ gap: 2,
598
+ flexWrap: "wrap",
599
+ mt: 1.5
600
+ },
601
+ children: [{
602
+ label: "Paid Ads",
603
+ color: "#6366F1"
604
+ }, {
605
+ label: "Organic",
606
+ color: "#10B981"
607
+ }, {
608
+ label: "Email",
609
+ color: "#06B6D4"
610
+ }].map(function (leg) {
611
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
612
+ sx: {
613
+ display: "flex",
614
+ alignItems: "center",
615
+ gap: 0.5
616
+ },
617
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
618
+ sx: {
619
+ width: 8,
620
+ height: 8,
621
+ borderRadius: "50%",
622
+ bgcolor: leg.color
623
+ }
624
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
625
+ sx: {
626
+ fontSize: "11px",
627
+ color: "rgba(0,0,0,0.6)",
628
+ fontWeight: 500,
629
+ marginTop: {
630
+ xs: "1px",
631
+ sm: 0
632
+ }
633
+ },
634
+ children: leg.label
635
+ })]
636
+ }, leg.label);
637
+ })
638
+ })]
639
+ }), item.footer && /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
640
+ sx: {
641
+ display: "flex",
642
+ justifyContent: "space-between",
643
+ mt: 2,
644
+ pt: 2,
645
+ borderTop: "1px solid #f0f0f0"
646
+ },
647
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
648
+ variant: "caption",
649
+ sx: {
650
+ color: "#606062",
651
+ fontWeight: 600
652
+ },
653
+ children: item.footer.left
654
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
655
+ variant: "caption",
656
+ sx: {
657
+ color: "#606062",
658
+ fontWeight: 600
659
+ },
660
+ children: item.footer.right
661
+ })]
662
+ })]
663
+ })
664
+ })
665
+ }, item.label + index);
666
+ };
667
+
668
+ module.exports = RenderChartCard;
669
+ //# sourceMappingURL=RenderChartCard.cjs.js.map