@ammarkhalidfarooq/dashboard-package 0.3.35 → 0.3.36

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.cjs.js CHANGED
@@ -795,9 +795,10 @@ var statusValue = function statusValue(value) {
795
795
  var CardWrapper = function CardWrapper(_ref) {
796
796
  var title = _ref.title,
797
797
  subtitle = _ref.subtitle,
798
- children = _ref.children;
798
+ children = _ref.children,
799
+ sx = _ref.sx;
799
800
  return /*#__PURE__*/jsxRuntime.jsx(material.Card, {
800
- sx: {
801
+ sx: _objectSpread2({
801
802
  width: "100%",
802
803
  display: "flex",
803
804
  flexDirection: "column",
@@ -805,7 +806,7 @@ var CardWrapper = function CardWrapper(_ref) {
805
806
  borderRadius: 4,
806
807
  border: "1px solid #f0f0f0",
807
808
  height: "100%"
808
- },
809
+ }, sx),
809
810
  children: /*#__PURE__*/jsxRuntime.jsxs(material.CardContent, {
810
811
  sx: {
811
812
  p: 3
@@ -1089,16 +1090,15 @@ var KeywordsCard = function KeywordsCard() {
1089
1090
  children: item.clicks
1090
1091
  }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
1091
1092
  sx: {
1092
- width: "40px",
1093
- height: "30px",
1094
1093
  textAlign: "left"
1095
1094
  },
1096
1095
  children: /*#__PURE__*/jsxRuntime.jsx(material.Box, {
1097
1096
  sx: {
1097
+ width: "40px",
1098
1098
  bgcolor: "#ebf2ffb1",
1099
1099
  color: "#3431e4",
1100
1100
  // px: 0.5,
1101
- // py: 0.5,
1101
+ p: 0.5,
1102
1102
  borderRadius: "100px",
1103
1103
  fontSize: "11px",
1104
1104
  fontWeight: 700,
@@ -1653,9 +1653,9 @@ var TopPerformingCampaignsCard = function TopPerformingCampaignsCard() {
1653
1653
  bgcolor: "#48d8d620",
1654
1654
  color: "#157c3bff",
1655
1655
  // px: 1,
1656
- // py: 0.5,
1656
+ p: 0.5,
1657
1657
  width: "40px",
1658
- height: "25px",
1658
+ // height: "25px",
1659
1659
  borderRadius: "100px",
1660
1660
  fontSize: "11px",
1661
1661
  fontWeight: 700,
@@ -1667,7 +1667,8 @@ var TopPerformingCampaignsCard = function TopPerformingCampaignsCard() {
1667
1667
  })]
1668
1668
  });
1669
1669
  };
1670
- var PaidDonorGeographyCard = function PaidDonorGeographyCard() {
1670
+ var PaidDonorGeographyCard = function PaidDonorGeographyCard(_ref3) {
1671
+ var sx = _ref3.sx;
1671
1672
  var data = [{
1672
1673
  country: "United States",
1673
1674
  value: "78 · 36%",
@@ -1696,6 +1697,7 @@ var PaidDonorGeographyCard = function PaidDonorGeographyCard() {
1696
1697
  return /*#__PURE__*/jsxRuntime.jsx(CardWrapper, {
1697
1698
  title: "Paid donor geography",
1698
1699
  subtitle: "Where ad-acquired donors come from",
1700
+ sx: sx,
1699
1701
  children: data.map(function (item, index) {
1700
1702
  return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
1701
1703
  sx: {
@@ -4321,9 +4323,10 @@ var TrafficSourceCard = function TrafficSourceCard(_ref) {
4321
4323
  color: "#94A3B8"
4322
4324
  }] : _ref$data,
4323
4325
  _ref$total = _ref.total,
4324
- total = _ref$total === void 0 ? "$240.9K" : _ref$total;
4326
+ total = _ref$total === void 0 ? "$240.9K" : _ref$total,
4327
+ sx = _ref.sx;
4325
4328
  return /*#__PURE__*/jsxRuntime.jsxs(material.Card, {
4326
- sx: {
4329
+ sx: _objectSpread2({
4327
4330
  p: 3,
4328
4331
  borderRadius: 4,
4329
4332
  border: "1px solid #f0f0f0",
@@ -4332,7 +4335,7 @@ var TrafficSourceCard = function TrafficSourceCard(_ref) {
4332
4335
  // height: "100%",
4333
4336
  display: "flex",
4334
4337
  flexDirection: "column"
4335
- },
4338
+ }, sx),
4336
4339
  children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
4337
4340
  sx: {},
4338
4341
  children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
@@ -4534,7 +4537,25 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
4534
4537
  },
4535
4538
  colors: [chartColor],
4536
4539
  tooltip: {
4537
- enabled: false
4540
+ enabled: true,
4541
+ theme: "light",
4542
+ x: {
4543
+ show: false
4544
+ },
4545
+ y: {
4546
+ formatter: function formatter(val) {
4547
+ if (title !== null && title !== void 0 && title.toLowerCase().includes("revenue")) {
4548
+ return "$".concat(val.toLocaleString());
4549
+ }
4550
+ if (title !== null && title !== void 0 && title.toLowerCase().includes("rate") || title !== null && title !== void 0 && title.toLowerCase().includes("bounce")) {
4551
+ return "".concat(val, "%");
4552
+ }
4553
+ return val.toLocaleString();
4554
+ }
4555
+ },
4556
+ marker: {
4557
+ show: false
4558
+ }
4538
4559
  }
4539
4560
  };
4540
4561
  var series = [{
@@ -4717,7 +4738,16 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
4717
4738
  lineCap: "butt"
4718
4739
  },
4719
4740
  colors: [chartColors[0]],
4720
- labels: ["accepted"]
4741
+ labels: ["accepted"],
4742
+ tooltip: {
4743
+ enabled: true,
4744
+ theme: "dark",
4745
+ y: {
4746
+ formatter: function formatter(val) {
4747
+ return "".concat(val, "%");
4748
+ }
4749
+ }
4750
+ }
4721
4751
  };
4722
4752
  var series = [acceptanceRate];
4723
4753
  return /*#__PURE__*/jsxRuntime.jsxs(material.Card, {
@@ -4882,7 +4912,8 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
4882
4912
  });
4883
4913
  };
4884
4914
 
4885
- var DonationTypeBarChart = function DonationTypeBarChart() {
4915
+ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
4916
+ var sx = _ref.sx;
4886
4917
  var chartOptions = {
4887
4918
  chart: {
4888
4919
  type: "bar",
@@ -4986,14 +5017,13 @@ var DonationTypeBarChart = function DonationTypeBarChart() {
4986
5017
  data: [32.4, 41.2, 46.8, 14.3]
4987
5018
  }];
4988
5019
  return /*#__PURE__*/jsxRuntime.jsxs(material.Card, {
4989
- sx: {
5020
+ sx: _objectSpread2({
4990
5021
  bgcolor: "#fff",
4991
5022
  borderRadius: 4,
4992
5023
  border: "1px solid #f0f0f0",
4993
5024
  boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
4994
5025
  p: 3
4995
- // height: "100%",
4996
- },
5026
+ }, sx),
4997
5027
  children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
4998
5028
  sx: {
4999
5029
  display: "flex",
@@ -5102,7 +5132,8 @@ var DonationTypeBarChart = function DonationTypeBarChart() {
5102
5132
  });
5103
5133
  };
5104
5134
 
5105
- var RefundsChargebacksCard = function RefundsChargebacksCard() {
5135
+ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
5136
+ var sx = _ref.sx;
5106
5137
  var chartOptions = {
5107
5138
  chart: {
5108
5139
  type: "area",
@@ -5211,7 +5242,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard() {
5211
5242
  data: [0.1, 0.2, 0.1, 0.15, 0.1, 0.2, 0.1, 0.15, 0.1]
5212
5243
  }];
5213
5244
  return /*#__PURE__*/jsxRuntime.jsxs(material.Card, {
5214
- sx: {
5245
+ sx: _objectSpread2({
5215
5246
  bgcolor: "#fff",
5216
5247
  borderRadius: "24px",
5217
5248
  border: "1px solid #f0f0f0",
@@ -5220,7 +5251,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard() {
5220
5251
  // height: "100%",
5221
5252
  display: "flex",
5222
5253
  flexDirection: "column"
5223
- },
5254
+ }, sx),
5224
5255
  children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
5225
5256
  sx: {
5226
5257
  mb: 0
@@ -5925,22 +5956,38 @@ var OverallSection = function OverallSection(_ref) {
5925
5956
  item: true,
5926
5957
  xs: 12,
5927
5958
  md: 3,
5928
- children: /*#__PURE__*/jsxRuntime.jsx(DonationTypeBarChart, {})
5959
+ children: /*#__PURE__*/jsxRuntime.jsx(DonationTypeBarChart, {
5960
+ sx: {
5961
+ minHeight: 330
5962
+ }
5963
+ })
5929
5964
  }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5930
5965
  item: true,
5931
5966
  xs: 12,
5932
5967
  md: 3,
5933
- children: /*#__PURE__*/jsxRuntime.jsx(PaidDonorGeographyCard, {})
5968
+ children: /*#__PURE__*/jsxRuntime.jsx(PaidDonorGeographyCard, {
5969
+ sx: {
5970
+ minHeight: 330
5971
+ }
5972
+ })
5934
5973
  }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5935
5974
  item: true,
5936
5975
  xs: 12,
5937
5976
  md: 3,
5938
- children: /*#__PURE__*/jsxRuntime.jsx(RefundsChargebacksCard, {})
5977
+ children: /*#__PURE__*/jsxRuntime.jsx(RefundsChargebacksCard, {
5978
+ sx: {
5979
+ minHeight: 330
5980
+ }
5981
+ })
5939
5982
  }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5940
5983
  item: true,
5941
5984
  xs: 12,
5942
5985
  md: 3,
5943
- children: /*#__PURE__*/jsxRuntime.jsx(TrafficSourceCard, {})
5986
+ children: /*#__PURE__*/jsxRuntime.jsx(TrafficSourceCard, {
5987
+ sx: {
5988
+ minHeight: 330
5989
+ }
5990
+ })
5944
5991
  })]
5945
5992
  }), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
5946
5993
  container: true,