@ammarkhalidfarooq/dashboard-package 0.6.121 → 0.6.123

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
@@ -464,7 +464,9 @@ var RevenueChart = function RevenueChart(_ref) {
464
464
  _ref$showLegend = _ref.showLegend,
465
465
  showLegend = _ref$showLegend === void 0 ? true : _ref$showLegend,
466
466
  _ref$isAmount = _ref.isAmount,
467
- isAmount = _ref$isAmount === void 0 ? false : _ref$isAmount;
467
+ isAmount = _ref$isAmount === void 0 ? false : _ref$isAmount,
468
+ _ref$xAxisTickAmount = _ref.xAxisTickAmount,
469
+ xAxisTickAmount = _ref$xAxisTickAmount === void 0 ? 5 : _ref$xAxisTickAmount;
468
470
  var theme = styles.useTheme();
469
471
  var isRadial = type === 'donut' || type === 'pie';
470
472
  var isCurrency = isAmount || (metric === null || metric === void 0 ? void 0 : metric.toLowerCase()) === 'revenue';
@@ -561,7 +563,7 @@ var RevenueChart = function RevenueChart(_ref) {
561
563
  axisTicks: {
562
564
  show: false
563
565
  },
564
- tickAmount: 5,
566
+ tickAmount: xAxisTickAmount,
565
567
  labels: {
566
568
  rotate: 0,
567
569
  rotateAlways: false,
@@ -659,6 +661,8 @@ var RenderChartCard = function RenderChartCard(_ref) {
659
661
  cardSx = _ref$cardSx === void 0 ? {} : _ref$cardSx,
660
662
  _ref$contentSx = _ref.contentSx,
661
663
  contentSx = _ref$contentSx === void 0 ? {} : _ref$contentSx;
664
+ var theme = material.useTheme();
665
+ var isMobile = material.useMediaQuery(theme.breakpoints.down("sm"));
662
666
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
663
667
  var trendText = item.trend || "18%";
664
668
  var trendColor = getTrendColor(trendText, {
@@ -886,7 +890,8 @@ var RenderChartCard = function RenderChartCard(_ref) {
886
890
  stacked: item.stacked,
887
891
  type: type || item.type || "area",
888
892
  colors: item.colors,
889
- showLegend: !item.hideControls
893
+ showLegend: !item.hideControls,
894
+ xAxisTickAmount: isMobile ? 3 : 5
890
895
  }), item.hideControls && item.series && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
891
896
  sx: {
892
897
  display: {
@@ -19601,9 +19606,9 @@ var EmailSection = function EmailSection(_ref) {
19601
19606
  _ref$numberOfDays = _ref.numberOfDays,
19602
19607
  numberOfDays = _ref$numberOfDays === void 0 ? 30 : _ref$numberOfDays;
19603
19608
  var _useState = React.useState("Total Raised"),
19604
- _useState2 = _slicedToArray(_useState, 2),
19605
- activeMetric = _useState2[0],
19606
- setActiveMetric = _useState2[1];
19609
+ _useState2 = _slicedToArray(_useState, 2);
19610
+ _useState2[0];
19611
+ _useState2[1];
19607
19612
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
19608
19613
  var overview = (apiData === null || apiData === void 0 ? void 0 : apiData.overview) || {};
19609
19614
  var overviewGrowth = (overview === null || overview === void 0 ? void 0 : overview.growthPercentage) || {};
@@ -19832,11 +19837,10 @@ var EmailSection = function EmailSection(_ref) {
19832
19837
  value: metricInfo[title].value,
19833
19838
  caption: metricInfo[title].subValue,
19834
19839
  icon: metricInfo[title].icon,
19835
- error: metricInfo[title].error,
19836
- active: activeMetric === title,
19837
- onClick: function onClick() {
19838
- return setActiveMetric(title);
19839
- },
19840
+ error: metricInfo[title].error
19841
+ // active={activeMetric === title}
19842
+ // onClick={() => setActiveMetric(title)}
19843
+ ,
19840
19844
  sx: metricInfo[title].error ? {
19841
19845
  border: "2px solid #ef4444",
19842
19846
  bgcolor: "#fffafa"