impaktapps-design 0.2.993-alpha.255 → 0.2.993-alpha.256

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.
@@ -22047,7 +22047,7 @@ const DrawAreaGraph = ({
22047
22047
  areaValue,
22048
22048
  theme
22049
22049
  }) => {
22050
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
22050
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
22051
22051
  const {
22052
22052
  tooltipData,
22053
22053
  tooltipLeft,
@@ -22068,6 +22068,7 @@ const DrawAreaGraph = ({
22068
22068
  const legendLabels = (_i = areaValue.main) == null ? void 0 : _i.legendLabels;
22069
22069
  const colorMap = (_j = areaValue.style) == null ? void 0 : _j.colorMap;
22070
22070
  const defaultColour = (_l = (_k = theme.myTheme.palette) == null ? void 0 : _k.primary) == null ? void 0 : _l.main;
22071
+ const xAxisTickCount = (_m = areaValue == null ? void 0 : areaValue.main) == null ? void 0 : _m.xAxisTickCount;
22071
22072
  const isSmallScreen = width2 < 600;
22072
22073
  const longestLabelLength = useMemo(() => chartData.length ? Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)) : 0, [chartData, xAxisValue]);
22073
22074
  const dynamicBottomMargin = Math.ceil(longestLabelLength * PX_PER_CHAR$1 * LABEL_ROTATION$1);
@@ -22258,14 +22259,16 @@ const DrawAreaGraph = ({
22258
22259
  }), /* @__PURE__ */ jsx$1(AxisBottom, {
22259
22260
  top: innerHeight,
22260
22261
  scale: xScale,
22261
- label: (_m = areaValue.main) == null ? void 0 : _m.bottomLabel,
22262
+ label: (_n = areaValue.main) == null ? void 0 : _n.bottomLabel,
22262
22263
  tickFormat: formatXTick,
22263
22264
  stroke: "#d1d5db",
22264
22265
  tickStroke: "#d1d5db",
22266
+ tickTransform: xAxisType === "date" ? "translate(8, 0)" : void 0,
22267
+ numTicks: xAxisTickCount || 20,
22265
22268
  tickLabelProps
22266
22269
  }), /* @__PURE__ */ jsx$1(AxisLeft, {
22267
22270
  scale: yScale,
22268
- label: !disableLeftLabel ? (_n = areaValue.main) == null ? void 0 : _n.leftLabel : void 0,
22271
+ label: !disableLeftLabel ? (_o = areaValue.main) == null ? void 0 : _o.leftLabel : void 0,
22269
22272
  stroke: "#d1d5db",
22270
22273
  tickStroke: "#d1d5db",
22271
22274
  numTicks: yAxisTickCount || 6,
@@ -22310,9 +22313,11 @@ const DrawAreaGraph = ({
22310
22313
  left: (tooltipLeft != null ? tooltipLeft : 0) + margin2.left,
22311
22314
  style: {
22312
22315
  ...defaultStyles,
22313
- background: "#f4f7fc",
22314
- borderRadius: "8px",
22315
- padding: "12px",
22316
+ background: "#ffffff",
22317
+ borderRadius: "18px",
22318
+ padding: "16px 12px 5px 12px",
22319
+ border: "1px solid #E5E7EB",
22320
+ boxShadow: "0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06)",
22316
22321
  fontSize: "12px"
22317
22322
  },
22318
22323
  children: [/* @__PURE__ */ jsx$1("div", {
@@ -22321,23 +22326,15 @@ const DrawAreaGraph = ({
22321
22326
  marginBottom: 6
22322
22327
  },
22323
22328
  children: formatXTick(tooltipData[xAxisValue])
22324
- }), labelsArray.map((key) => {
22325
- var _a2, _b2;
22329
+ }), labelsArray.map((key, i) => {
22330
+ var _a2;
22326
22331
  return /* @__PURE__ */ jsxs("div", {
22327
22332
  style: {
22328
- display: "flex",
22329
- justifyContent: "space-between",
22330
- gap: "16px",
22331
- paddingBottom: "12px"
22333
+ paddingBottom: "11px",
22334
+ fontWeight: 500,
22335
+ color: "#756d6d"
22332
22336
  },
22333
- children: [/* @__PURE__ */ jsx$1("span", {
22334
- style: {
22335
- color: (_a2 = colorMap == null ? void 0 : colorMap[key]) != null ? _a2 : defaultColour
22336
- },
22337
- children: (_b2 = legendLabels == null ? void 0 : legendLabels[key]) != null ? _b2 : key
22338
- }), /* @__PURE__ */ jsx$1("span", {
22339
- children: tooltipData[key]
22340
- })]
22337
+ children: [(_a2 = legendLabels == null ? void 0 : legendLabels[key]) != null ? _a2 : key, " : ", tooltipData[key]]
22341
22338
  }, key);
22342
22339
  })]
22343
22340
  })]
@@ -22401,7 +22398,7 @@ const DrawStackBarLineGraph = ({
22401
22398
  stackBarLineValue,
22402
22399
  theme
22403
22400
  }) => {
22404
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
22401
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
22405
22402
  const {
22406
22403
  tooltipData,
22407
22404
  tooltipLeft,
@@ -22422,6 +22419,7 @@ const DrawStackBarLineGraph = ({
22422
22419
  const disableLeftLabel = (_m = stackBarLineValue == null ? void 0 : stackBarLineValue.main) == null ? void 0 : _m.disableLeftLabel;
22423
22420
  const tooltipUnit = (_n = stackBarLineValue == null ? void 0 : stackBarLineValue.main) == null ? void 0 : _n.tooltipUnit;
22424
22421
  const trendColor = (_o = colorMap == null ? void 0 : colorMap[growthRateKey]) != null ? _o : "#E24B4A";
22422
+ const xAxisTickCount = (_p = stackBarLineValue == null ? void 0 : stackBarLineValue.main) == null ? void 0 : _p.xAxisTickCount;
22425
22423
  const isSmallScreen = width2 < 600;
22426
22424
  const longestLabelLength = useMemo(() => chartData.length ? Math.max(...chartData.map((d2) => String(d2[xAxisValue]).length)) : 0, [chartData, xAxisValue]);
22427
22425
  const dynamicBottomMargin = Math.ceil(longestLabelLength * PX_PER_CHAR * LABEL_ROTATION);
@@ -22621,7 +22619,7 @@ const DrawStackBarLineGraph = ({
22621
22619
  textAnchor: "end",
22622
22620
  dy: "0.33em"
22623
22621
  }),
22624
- label: !disableLeftLabel ? (_p = stackBarLineValue.main) == null ? void 0 : _p.leftLabel : void 0,
22622
+ label: !disableLeftLabel ? (_q = stackBarLineValue.main) == null ? void 0 : _q.leftLabel : void 0,
22625
22623
  labelProps: {
22626
22624
  fill: "#6B7280",
22627
22625
  fontSize: 11,
@@ -22633,7 +22631,7 @@ const DrawStackBarLineGraph = ({
22633
22631
  scale: trendScale,
22634
22632
  numTicks: 5,
22635
22633
  stroke: "#9CA3AF",
22636
- label: (_q = stackBarLineValue.main) == null ? void 0 : _q.rightLabel,
22634
+ label: (_r = stackBarLineValue.main) == null ? void 0 : _r.rightLabel,
22637
22635
  tickStroke: "transparent",
22638
22636
  tickLabelProps: () => ({
22639
22637
  fill: "#6B7280",
@@ -22651,7 +22649,8 @@ const DrawStackBarLineGraph = ({
22651
22649
  top: innerHeight,
22652
22650
  scale: categoryScale,
22653
22651
  stroke: "#9CA3AF",
22654
- label: (_r = stackBarLineValue.main) == null ? void 0 : _r.bottomLabel,
22652
+ label: (_s = stackBarLineValue.main) == null ? void 0 : _s.bottomLabel,
22653
+ numTicks: xAxisTickCount || 20,
22655
22654
  tickStroke: "transparent",
22656
22655
  tickLabelProps
22657
22656
  })]
@@ -22670,13 +22669,12 @@ const DrawStackBarLineGraph = ({
22670
22669
  left: tooltipLeft,
22671
22670
  style: {
22672
22671
  ...defaultStyles,
22673
- background: "#fff",
22674
- border: "none",
22675
- borderRadius: 8,
22676
- boxShadow: "0 4px 16px rgba(0,0,0,0.35)",
22677
- padding: "15px 12px",
22678
- fontSize: 12,
22679
- minWidth: 160
22672
+ background: "#ffffff",
22673
+ borderRadius: "18px",
22674
+ padding: "16px 12px 5px 12px",
22675
+ border: "1px solid #E5E7EB",
22676
+ boxShadow: "0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06)",
22677
+ fontSize: "12px"
22680
22678
  },
22681
22679
  children: [/* @__PURE__ */ jsx$1("p", {
22682
22680
  style: {
@@ -22692,28 +22690,15 @@ const DrawStackBarLineGraph = ({
22692
22690
  flexDirection: "column",
22693
22691
  gap: 11
22694
22692
  },
22695
- children: labelsArray.map((key) => {
22696
- var _a2, _b2;
22693
+ children: labelsArray.map((key, i) => {
22694
+ var _a2;
22697
22695
  return /* @__PURE__ */ jsxs("div", {
22698
22696
  style: {
22699
- display: "flex",
22700
- justifyContent: "space-between",
22701
- alignItems: "center",
22702
- gap: 16
22697
+ paddingBottom: "11px",
22698
+ fontWeight: 500,
22699
+ color: "#756d6d"
22703
22700
  },
22704
- children: [/* @__PURE__ */ jsx$1("span", {
22705
- style: {
22706
- color: (_a2 = colorMap == null ? void 0 : colorMap[key]) != null ? _a2 : defaultColour,
22707
- fontWeight: 500
22708
- },
22709
- children: (_b2 = legendLabels == null ? void 0 : legendLabels[key]) != null ? _b2 : key
22710
- }), /* @__PURE__ */ jsxs("span", {
22711
- style: {
22712
- color: "#454444",
22713
- fontWeight: 600
22714
- },
22715
- children: [tooltipData[key], tooltipUnit]
22716
- })]
22701
+ children: [(_a2 = legendLabels == null ? void 0 : legendLabels[key]) != null ? _a2 : key, " : ", tooltipData[key], tooltipUnit]
22717
22702
  }, key);
22718
22703
  })
22719
22704
  })]