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