@ammarkhalidfarooq/dashboard-package 0.4.77 → 0.4.79

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
@@ -3248,7 +3248,10 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
3248
3248
  _ref$chartColor = _ref.chartColor,
3249
3249
  chartColor = _ref$chartColor === void 0 ? "rgb(99, 99, 230)" : _ref$chartColor,
3250
3250
  _ref$footerMetrics = _ref.footerMetrics,
3251
- footerMetrics = _ref$footerMetrics === void 0 ? [] : _ref$footerMetrics;
3251
+ footerMetrics = _ref$footerMetrics === void 0 ? [] : _ref$footerMetrics,
3252
+ sx = _ref.sx,
3253
+ _ref$bottomSection = _ref.bottomSection,
3254
+ bottomSection = _ref$bottomSection === void 0 ? false : _ref$bottomSection;
3252
3255
  // Extract values for chart series
3253
3256
  var series = [{
3254
3257
  name: title,
@@ -3321,7 +3324,7 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
3321
3324
  }
3322
3325
  };
3323
3326
  return /*#__PURE__*/jsxs(Card, {
3324
- sx: {
3327
+ sx: _objectSpread2({
3325
3328
  p: 3,
3326
3329
  borderRadius: 4,
3327
3330
  border: "1px solid #f0f0f0",
@@ -3329,7 +3332,7 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
3329
3332
  bgcolor: "#fff",
3330
3333
  display: "flex",
3331
3334
  flexDirection: "column"
3332
- },
3335
+ }, sx),
3333
3336
  children: [/*#__PURE__*/jsxs(Box, {
3334
3337
  sx: {
3335
3338
  mb: 1
@@ -3413,7 +3416,7 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
3413
3416
  }), /*#__PURE__*/jsx(Box, {
3414
3417
  sx: {
3415
3418
  mt: "auto",
3416
- pt: 3,
3419
+ pt: bottomSection ? 1.5 : 3,
3417
3420
  display: "flex",
3418
3421
  justifyContent: "space-between"
3419
3422
  },
@@ -3452,7 +3455,8 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
3452
3455
  raisedVal = _ref.raisedVal,
3453
3456
  raisedTrend = _ref.raisedTrend,
3454
3457
  _ref$chartColors = _ref.chartColors,
3455
- chartColors = _ref$chartColors === void 0 ? ["rgb(99, 99, 230)", "#88bfd290"] : _ref$chartColors;
3458
+ chartColors = _ref$chartColors === void 0 ? ["rgb(99, 99, 230)", "#88bfd290"] : _ref$chartColors,
3459
+ sx = _ref.sx;
3456
3460
  var chartOptions = {
3457
3461
  chart: {
3458
3462
  type: "radialBar",
@@ -3507,7 +3511,7 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
3507
3511
  };
3508
3512
  var series = [acceptanceRate];
3509
3513
  return /*#__PURE__*/jsxs(Card, {
3510
- sx: {
3514
+ sx: _objectSpread2({
3511
3515
  p: 3,
3512
3516
  borderRadius: 4,
3513
3517
  border: "1px solid #f0f0f0",
@@ -3516,7 +3520,7 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
3516
3520
  // height: "100%",
3517
3521
  display: "flex",
3518
3522
  flexDirection: "column"
3519
- },
3523
+ }, sx),
3520
3524
  children: [/*#__PURE__*/jsxs(Box, {
3521
3525
  sx: {},
3522
3526
  children: [/*#__PURE__*/jsx(Typography, {
@@ -5753,7 +5757,11 @@ var OverallSection = function OverallSection(_ref) {
5753
5757
  value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalValue) || 0)),
5754
5758
  trend: "\u25B2 ".concat(orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$prevTr = orderBumpData.prevTrend) === null || _orderBumpData$prevTr === void 0 ? void 0 : _orderBumpData$prevTr.toFixed(1), "% vs last month"),
5755
5759
  chartData: orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.orderBumpMetrics,
5756
- footerMetrics: orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.footerMetrics
5760
+ footerMetrics: orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.footerMetrics,
5761
+ sx: {
5762
+ maxHeight: 280
5763
+ },
5764
+ bottomSection: true
5757
5765
  }), /*#__PURE__*/jsx(MetricDonutCard, {
5758
5766
  title: "Upsell",
5759
5767
  subtitle: "Acceptance & raised",
@@ -5761,7 +5769,10 @@ var OverallSection = function OverallSection(_ref) {
5761
5769
  acceptanceVal: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceVal) || 0), "%"),
5762
5770
  acceptanceTrend: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceTrend) || 0), "%"),
5763
5771
  raisedVal: "$".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedVal) || 0)),
5764
- raisedTrend: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedTrend) || 0), "%")
5772
+ raisedTrend: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedTrend) || 0), "%"),
5773
+ sx: {
5774
+ maxHeight: 280
5775
+ }
5765
5776
  }), /*#__PURE__*/jsx(MetricDonutCard, {
5766
5777
  title: "Downsell",
5767
5778
  subtitle: "Acceptance & raised",
@@ -5769,7 +5780,10 @@ var OverallSection = function OverallSection(_ref) {
5769
5780
  acceptanceVal: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceVal) || 0), "%"),
5770
5781
  acceptanceTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceTrend) || 0), "%"),
5771
5782
  raisedVal: "$".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedVal) || 0)),
5772
- raisedTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedTrend) || 0), "%")
5783
+ raisedTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedTrend) || 0), "%"),
5784
+ sx: {
5785
+ maxHeight: 280
5786
+ }
5773
5787
  }), /*#__PURE__*/jsx(MetricSparklineCard, {
5774
5788
  title: "Referrals",
5775
5789
  subtitle: "Revenue trend \xB7 last 30 days",
@@ -5785,7 +5799,10 @@ var OverallSection = function OverallSection(_ref) {
5785
5799
  }, {
5786
5800
  label: "Conv. rate",
5787
5801
  value: "27.5%"
5788
- }]
5802
+ }],
5803
+ sx: {
5804
+ maxHeight: 280
5805
+ }
5789
5806
  })]
5790
5807
  })]
5791
5808
  });