impaktapps-design 0.2.5 → 0.2.52

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.
@@ -12061,7 +12061,7 @@ const Product1 = [
12061
12061
  { x: "f", y: 100 },
12062
12062
  { x: "g", y: 50 }
12063
12063
  ];
12064
- const finalDataProvider = (type2, value) => {
12064
+ const finalDataProvider = (type2, value, theme) => {
12065
12065
  var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
12066
12066
  switch (type2) {
12067
12067
  case "BarGraph":
@@ -12091,7 +12091,7 @@ const finalDataProvider = (type2, value) => {
12091
12091
  },
12092
12092
  style: {
12093
12093
  containerStyle: {
12094
- background: "white",
12094
+ background: theme.palette.secondary.main,
12095
12095
  width: "90%",
12096
12096
  height: "300",
12097
12097
  borderRadius: "20px",
@@ -12106,6 +12106,7 @@ const finalDataProvider = (type2, value) => {
12106
12106
  padding: "15px 0 1px 20px",
12107
12107
  width: "100%",
12108
12108
  fontSize: "18px",
12109
+ color: theme.palette.text.primary,
12109
12110
  ...(_d = value == null ? void 0 : value.style) == null ? void 0 : _d.headerStyle
12110
12111
  },
12111
12112
  tooltipStyle: {
@@ -12116,12 +12117,12 @@ const finalDataProvider = (type2, value) => {
12116
12117
  labelStyle: {
12117
12118
  leftLabelMargin: "75",
12118
12119
  topLabelMargin: "-6",
12119
- labelColor: "black",
12120
+ labelColor: theme.palette.text.primary,
12120
12121
  leftLabelOffset: 50,
12121
12122
  bottomLabelOffset: 45,
12122
- tickLabelColor: "balck",
12123
+ tickLabelColor: theme.palette.text.primary,
12123
12124
  tickFontSize: "10px",
12124
- tickColor: "black",
12125
+ tickColor: theme.palette.text.primary,
12125
12126
  rightAxisWidth: "0.3px",
12126
12127
  fontSize: "10px",
12127
12128
  ...(_f = value == null ? void 0 : value.style) == null ? void 0 : _f.labelStyle
@@ -12147,7 +12148,7 @@ const finalDataProvider = (type2, value) => {
12147
12148
  legendAvailable: true,
12148
12149
  ...value == null ? void 0 : value.main,
12149
12150
  legend: {
12150
- labelColor: "green",
12151
+ labelColor: theme.palette.text.primary,
12151
12152
  legendTitle: "Our Assests",
12152
12153
  direction: "row",
12153
12154
  align: "right",
@@ -12156,7 +12157,7 @@ const finalDataProvider = (type2, value) => {
12156
12157
  },
12157
12158
  style: {
12158
12159
  containerStyle: {
12159
- background: "white",
12160
+ background: theme.palette.secondary.main,
12160
12161
  width: "100%",
12161
12162
  height: "310",
12162
12163
  borderRadius: "20px",
@@ -12171,13 +12172,14 @@ const finalDataProvider = (type2, value) => {
12171
12172
  padding: "15px 0 1px 20px",
12172
12173
  width: "100%",
12173
12174
  fontSize: "18px",
12175
+ color: theme.palette.text.primary,
12174
12176
  ...(_k = value == null ? void 0 : value.style) == null ? void 0 : _k.headerStyle
12175
12177
  },
12176
12178
  tooltipStyle: {
12177
12179
  ...(_l = value == null ? void 0 : value.style) == null ? void 0 : _l.tooltipStyle
12178
12180
  },
12179
12181
  labelStyle: {
12180
- labelColor: "black",
12182
+ labelColor: theme.palette.text.primary,
12181
12183
  labelOffset: 45,
12182
12184
  leftLabelMargin: "70",
12183
12185
  topLabelMargin: "-40",
@@ -12186,7 +12188,7 @@ const finalDataProvider = (type2, value) => {
12186
12188
  legendStyle: {
12187
12189
  legend: {
12188
12190
  lineHeight: "0.9em",
12189
- color: "black",
12191
+ color: theme.palette.text.primary,
12190
12192
  fontSize: "10px",
12191
12193
  fontFamily: "arial",
12192
12194
  padding: "10px 10px",
@@ -12230,7 +12232,7 @@ const finalDataProvider = (type2, value) => {
12230
12232
  hideBottomAxisLine: false,
12231
12233
  ...value == null ? void 0 : value.main,
12232
12234
  legend: {
12233
- labelColor: "green",
12235
+ labelColor: theme.palette.text.primary,
12234
12236
  legendTitle: "Our Assests",
12235
12237
  direction: "row",
12236
12238
  align: "right",
@@ -12240,7 +12242,7 @@ const finalDataProvider = (type2, value) => {
12240
12242
  },
12241
12243
  style: {
12242
12244
  containerStyle: {
12243
- background: "white",
12245
+ background: theme.palette.secondary.main,
12244
12246
  width: "90%",
12245
12247
  height: "300",
12246
12248
  borderRadius: "20px",
@@ -12255,10 +12257,11 @@ const finalDataProvider = (type2, value) => {
12255
12257
  padding: "15px 0 1px 20px",
12256
12258
  width: "100%",
12257
12259
  fontSize: "18px",
12260
+ color: theme.palette.text.primary,
12258
12261
  ...(_v = value == null ? void 0 : value.style) == null ? void 0 : _v.headerStyle
12259
12262
  },
12260
12263
  labelStyle: {
12261
- labelColor: "black",
12264
+ labelColor: theme.palette.text.primary,
12262
12265
  bottomLabelOffset: 20,
12263
12266
  leftLabelOffset: 50,
12264
12267
  leftLabelMargin: 80,
@@ -12290,7 +12293,7 @@ const finalDataProvider = (type2, value) => {
12290
12293
  },
12291
12294
  style: {
12292
12295
  containerStyle: {
12293
- background: "white",
12296
+ background: theme.palette.secondary.main,
12294
12297
  width: "90%",
12295
12298
  height: "300",
12296
12299
  borderRadius: "20px",
@@ -12305,6 +12308,7 @@ const finalDataProvider = (type2, value) => {
12305
12308
  padding: "15px 0 1px 20px",
12306
12309
  width: "100%",
12307
12310
  fontSize: "18px",
12311
+ color: theme.palette.text.primary,
12308
12312
  ...(_C = value == null ? void 0 : value.style) == null ? void 0 : _C.headerStyle
12309
12313
  },
12310
12314
  tooltipStyle: {
@@ -12314,11 +12318,11 @@ const finalDataProvider = (type2, value) => {
12314
12318
  },
12315
12319
  labelStyle: {
12316
12320
  margin: { top: 10, left: 110, right: 40, bottom: 40 },
12317
- tickLabelColor: "#6c5efb",
12321
+ tickLabelColor: theme.palette.text.primary,
12318
12322
  leftLabelOffset: 140,
12319
12323
  bottomLabelOffset: 14,
12320
12324
  tickFontSize: "10px",
12321
- tickColor: "#6c5efb",
12325
+ tickColor: theme.palette.text.primary,
12322
12326
  rightAxisWidth: "0.3px",
12323
12327
  fontSize: "10px",
12324
12328
  ...(_E = value == null ? void 0 : value.style) == null ? void 0 : _E.labelStyle
@@ -12332,10 +12336,11 @@ const finalDataProvider = (type2, value) => {
12332
12336
  }
12333
12337
  };
12334
12338
  const BarGraph = ({
12335
- value
12339
+ value,
12340
+ theme
12336
12341
  }) => {
12337
12342
  var _a2, _b2, _c2, _d, _e2;
12338
- const barData = finalDataProvider((_a2 = value == null ? void 0 : value.main) == null ? void 0 : _a2.type, value);
12343
+ const barData = finalDataProvider((_a2 = value == null ? void 0 : value.main) == null ? void 0 : _a2.type, value, theme);
12339
12344
  let GraphRender = /* @__PURE__ */ jsx(ParentSize$1, {
12340
12345
  children: (parent) => {
12341
12346
  var _a3, _b3, _c3, _d2, _e3, _f, _g, _h, _i, _j, _k, _l, _m, _n2;
@@ -12357,12 +12362,6 @@ const BarGraph = ({
12357
12362
  children: [((_c2 = barData == null ? void 0 : barData.main) == null ? void 0 : _c2.header) && /* @__PURE__ */ jsx("div", {
12358
12363
  style: {
12359
12364
  fontWeight: 500,
12360
- textAlign: "left",
12361
- fontFamily: "inherit",
12362
- marginBottom: "20px",
12363
- padding: "15px 0 1px 20px",
12364
- fontSize: "18px",
12365
- color: "#121926",
12366
12365
  ...(_d = barData == null ? void 0 : barData.style) == null ? void 0 : _d.headerStyle
12367
12366
  },
12368
12367
  children: (_e2 = barData == null ? void 0 : barData.main) == null ? void 0 : _e2.header
@@ -12460,10 +12459,11 @@ const DrawPieGraph = ({
12460
12459
  });
12461
12460
  };
12462
12461
  const PieGraph = ({
12463
- value
12462
+ value,
12463
+ theme
12464
12464
  }) => {
12465
12465
  var _a2, _b2;
12466
- const pieData = finalDataProvider("PieGraph", value);
12466
+ const pieData = finalDataProvider("PieGraph", value, theme);
12467
12467
  let PieRender = /* @__PURE__ */ jsx(ParentSize$1, {
12468
12468
  children: (parent) => /* @__PURE__ */ jsx(DrawPieGraph, {
12469
12469
  parentWidth: parent.width,
@@ -18348,10 +18348,11 @@ const DrawGraph = ({
18348
18348
  });
18349
18349
  };
18350
18350
  const LineGraph = ({
18351
- value
18351
+ value,
18352
+ theme
18352
18353
  }) => {
18353
18354
  var _a2, _b2, _c2, _d;
18354
- const lineData = finalDataProvider("LineGraph", value);
18355
+ const lineData = finalDataProvider("LineGraph", value, theme);
18355
18356
  return /* @__PURE__ */ jsxs("div", {
18356
18357
  style: (_a2 = lineData == null ? void 0 : lineData.style) == null ? void 0 : _a2.containerStyle,
18357
18358
  children: [((_b2 = lineData == null ? void 0 : lineData.main) == null ? void 0 : _b2.header) && /* @__PURE__ */ jsx("div", {
@@ -18492,10 +18493,11 @@ var DrawHorizontalBarGraph = withTooltip(({
18492
18493
  });
18493
18494
  });
18494
18495
  const HorizontalBarGraph = ({
18495
- value
18496
+ value,
18497
+ theme
18496
18498
  }) => {
18497
18499
  var _a2, _b2;
18498
- const barData = finalDataProvider("HorizontalBarGraph", value);
18500
+ const barData = finalDataProvider("HorizontalBarGraph", value, theme);
18499
18501
  let GraphRender = /* @__PURE__ */ jsx(ParentSize$1, {
18500
18502
  children: (parent) => {
18501
18503
  var _a3, _b3, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2;
@@ -18522,9 +18524,10 @@ const HorizontalBarGraph = ({
18522
18524
  };
18523
18525
  var style = "";
18524
18526
  const ProgressBar = ({
18525
- value
18527
+ value,
18528
+ theme
18526
18529
  }) => {
18527
- var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z;
18530
+ var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o, _p, _q, _r, _s, _t2, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S;
18528
18531
  const [progress, setProgress] = useState(((_b2 = (_a2 = value == null ? void 0 : value.main) == null ? void 0 : _a2.data) == null ? void 0 : _b2.achieved) / ((_d = (_c2 = value == null ? void 0 : value.main) == null ? void 0 : _c2.data) == null ? void 0 : _d.total) * 100);
18529
18532
  useEffect(() => {
18530
18533
  var _a3, _b3, _c3, _d2;
@@ -18565,7 +18568,8 @@ const ProgressBar = ({
18565
18568
  return /* @__PURE__ */ jsxs("div", {
18566
18569
  className: "container",
18567
18570
  style: {
18568
- backgroundColor: "white",
18571
+ backgroundColor: (_h = theme == null ? void 0 : theme.palette) == null ? void 0 : _h.secondary.main,
18572
+ color: (_j = (_i = theme == null ? void 0 : theme.palette) == null ? void 0 : _i.text) == null ? void 0 : _j.primary,
18569
18573
  borderRadius: "20px",
18570
18574
  width: "auto",
18571
18575
  height: "auto",
@@ -18580,9 +18584,9 @@ const ProgressBar = ({
18580
18584
  textAlign: "left",
18581
18585
  fontFamily: "inherit",
18582
18586
  fontSize: "18px",
18583
- color: "#121926"
18587
+ color: ((_l = (_k = theme == null ? void 0 : theme.palette) == null ? void 0 : _k.text) == null ? void 0 : _l.primary) || "#121926"
18584
18588
  },
18585
- children: (_h = value == null ? void 0 : value.main) == null ? void 0 : _h.heading
18589
+ children: (_m = value == null ? void 0 : value.main) == null ? void 0 : _m.heading
18586
18590
  }), /* @__PURE__ */ jsxs("div", {
18587
18591
  style: {
18588
18592
  paddingBottom: "25px",
@@ -18602,7 +18606,8 @@ const ProgressBar = ({
18602
18606
  textAlign: "center",
18603
18607
  fontWeight: 700,
18604
18608
  marginBottom: "20px",
18605
- fontSize: "24px"
18609
+ fontSize: "24px",
18610
+ color: "inherit"
18606
18611
  },
18607
18612
  children: [progress.toFixed(2), "%"]
18608
18613
  }), /* @__PURE__ */ jsx("div", {
@@ -18628,6 +18633,7 @@ const ProgressBar = ({
18628
18633
  }), /* @__PURE__ */ jsxs("div", {
18629
18634
  style: {
18630
18635
  display: "flex",
18636
+ color: (_o = (_n2 = theme == null ? void 0 : theme.palette) == null ? void 0 : _n2.text) == null ? void 0 : _o.primary,
18631
18637
  paddingTop: "40px",
18632
18638
  width: "90%",
18633
18639
  margin: "auto"
@@ -18639,18 +18645,18 @@ const ProgressBar = ({
18639
18645
  children: [/* @__PURE__ */ jsx("div", {
18640
18646
  style: {
18641
18647
  textAlign: "left",
18642
- color: "#697586",
18643
18648
  fontSize: "10px",
18649
+ color: (_q = (_p = theme == null ? void 0 : theme.palette) == null ? void 0 : _p.text) == null ? void 0 : _q.inputLabel,
18644
18650
  marginBottom: "10px"
18645
18651
  },
18646
- children: ((_i = value == null ? void 0 : value.main) == null ? void 0 : _i.bottomLabel_1) || "Target"
18652
+ children: ((_r = value == null ? void 0 : value.main) == null ? void 0 : _r.bottomLabel_1) || "Target"
18647
18653
  }), /* @__PURE__ */ jsx("div", {
18648
18654
  style: {
18649
- color: "#121926",
18655
+ color: ((_t2 = (_s = theme == null ? void 0 : theme.palette) == null ? void 0 : _s.text) == null ? void 0 : _t2.primary) || "#121926",
18650
18656
  textAlign: "left",
18651
18657
  fontWeight: 500
18652
18658
  },
18653
- children: ((_k = (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.data) == null ? void 0 : _k.total) || ((_m = (_l = value == null ? void 0 : value.main) == null ? void 0 : _l.data) == null ? void 0 : _m.bottomLabel_1_value)
18659
+ children: ((_v = (_u = value == null ? void 0 : value.main) == null ? void 0 : _u.data) == null ? void 0 : _v.total) || ((_x = (_w = value == null ? void 0 : value.main) == null ? void 0 : _w.data) == null ? void 0 : _x.bottomLabel_1_value)
18654
18660
  })]
18655
18661
  }), /* @__PURE__ */ jsxs("div", {
18656
18662
  style: {
@@ -18659,18 +18665,18 @@ const ProgressBar = ({
18659
18665
  children: [/* @__PURE__ */ jsx("div", {
18660
18666
  style: {
18661
18667
  textAlign: "center",
18662
- color: "#697586",
18668
+ color: ((_z = (_y = theme == null ? void 0 : theme.palette) == null ? void 0 : _y.text) == null ? void 0 : _z.inputLabel) || "#697586",
18663
18669
  fontSize: "10px",
18664
18670
  marginBottom: "10px"
18665
18671
  },
18666
- children: ((_n2 = value == null ? void 0 : value.main) == null ? void 0 : _n2.bottomLabel_2) || "Achieved"
18672
+ children: ((_A = value == null ? void 0 : value.main) == null ? void 0 : _A.bottomLabel_2) || "Achieved"
18667
18673
  }), /* @__PURE__ */ jsx("div", {
18668
18674
  style: {
18669
18675
  textAlign: "center",
18670
- color: "#121926",
18676
+ color: ((_C = (_B = theme == null ? void 0 : theme.palette) == null ? void 0 : _B.text) == null ? void 0 : _C.primary) || "#121926",
18671
18677
  fontWeight: 500
18672
18678
  },
18673
- children: ((_p = (_o = value == null ? void 0 : value.main) == null ? void 0 : _o.data) == null ? void 0 : _p.achieved) || ((_r = (_q = value == null ? void 0 : value.main) == null ? void 0 : _q.data) == null ? void 0 : _r.bottomLabel_2_value)
18679
+ children: ((_E = (_D = value == null ? void 0 : value.main) == null ? void 0 : _D.data) == null ? void 0 : _E.achieved) || ((_G = (_F = value == null ? void 0 : value.main) == null ? void 0 : _F.data) == null ? void 0 : _G.bottomLabel_2_value)
18674
18680
  })]
18675
18681
  }), /* @__PURE__ */ jsxs("div", {
18676
18682
  style: {
@@ -18679,18 +18685,18 @@ const ProgressBar = ({
18679
18685
  children: [/* @__PURE__ */ jsx("div", {
18680
18686
  style: {
18681
18687
  textAlign: "right",
18682
- color: "#697586",
18688
+ color: ((_I = (_H = theme == null ? void 0 : theme.palette) == null ? void 0 : _H.text) == null ? void 0 : _I.inputLabel) || "#697586",
18683
18689
  fontSize: "10px",
18684
18690
  marginBottom: "10px"
18685
18691
  },
18686
- children: ((_s = value == null ? void 0 : value.main) == null ? void 0 : _s.bottomLabel_3) || "Average"
18692
+ children: ((_J = value == null ? void 0 : value.main) == null ? void 0 : _J.bottomLabel_3) || "Average"
18687
18693
  }), /* @__PURE__ */ jsx("div", {
18688
18694
  style: {
18689
18695
  textAlign: "right",
18690
- color: "#121926",
18696
+ color: ((_L = (_K = theme == null ? void 0 : theme.palette) == null ? void 0 : _K.text) == null ? void 0 : _L.primary) || "#121926",
18691
18697
  fontWeight: 500
18692
18698
  },
18693
- children: ((_t2 = value == null ? void 0 : value.main) == null ? void 0 : _t2.daysCount) ? Math.round(((_v = (_u = value == null ? void 0 : value.main) == null ? void 0 : _u.data) == null ? void 0 : _v.achieved) / ((_w = value == null ? void 0 : value.main) == null ? void 0 : _w.daysCount)) + ((_x = value == null ? void 0 : value.main) == null ? void 0 : _x.bottomLabel_3_averageLabel) || "/day" : (_z = (_y = value == null ? void 0 : value.main) == null ? void 0 : _y.data) == null ? void 0 : _z.bottomLabel_3_value
18699
+ children: ((_M = value == null ? void 0 : value.main) == null ? void 0 : _M.daysCount) ? Math.round(((_O = (_N = value == null ? void 0 : value.main) == null ? void 0 : _N.data) == null ? void 0 : _O.achieved) / ((_P = value == null ? void 0 : value.main) == null ? void 0 : _P.daysCount)) + ((_Q = value == null ? void 0 : value.main) == null ? void 0 : _Q.bottomLabel_3_averageLabel) || "/day" : (_S = (_R = value == null ? void 0 : value.main) == null ? void 0 : _R.data) == null ? void 0 : _S.bottomLabel_3_value
18694
18700
  })]
18695
18701
  })]
18696
18702
  })]
@@ -35851,13 +35857,14 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(memoizeOne_esm);
35851
35857
  })(dist$1);
35852
35858
  var ReactSpeedometer = /* @__PURE__ */ getDefaultExportFromCjs(dist$1);
35853
35859
  const SpeedoMeter = ({
35854
- value
35860
+ value,
35861
+ theme
35855
35862
  }) => {
35856
35863
  var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o, _p, _q, _r, _s, _t2, _u, _v, _w;
35857
35864
  return /* @__PURE__ */ jsxs("div", {
35858
35865
  style: {
35859
35866
  ...(_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.containerStyle,
35860
- overflow: "auto"
35867
+ background: theme.palette.secondary.main
35861
35868
  },
35862
35869
  children: [((_b2 = value == null ? void 0 : value.main) == null ? void 0 : _b2.header) && /* @__PURE__ */ jsx("div", {
35863
35870
  style: {
@@ -35865,7 +35872,7 @@ const SpeedoMeter = ({
35865
35872
  textAlign: "left",
35866
35873
  fontFamily: "inherit",
35867
35874
  fontSize: "18px",
35868
- color: "#121926",
35875
+ color: theme.palette.text.primary || "#121926",
35869
35876
  ...(_c2 = value == null ? void 0 : value.style) == null ? void 0 : _c2.headerStyle
35870
35877
  },
35871
35878
  children: value.main.header
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-design",
3
- "version": "0.2.5",
3
+ "version": "0.2.52",
4
4
  "dependencies": {
5
5
  "@babel/core": "^7.16.12",
6
6
  "@visx/visx": "^3.1.2",
@@ -3,8 +3,8 @@ import DrawBarGraph from "./DrawBarGraph";
3
3
  import { ParentSize } from "@visx/responsive";
4
4
  import { finalDataProvider } from "../../utils/finalDataProvider";
5
5
 
6
- const BarGraph = ({ value }:any) => {
7
- const barData:any = finalDataProvider(value?.main?.type,value)
6
+ const BarGraph = ({ value,theme}:any) => {
7
+ const barData:any = finalDataProvider(value?.main?.type,value,theme)
8
8
  let GraphRender = (
9
9
  <ParentSize>
10
10
  {(parent) => (
@@ -19,13 +19,7 @@ const BarGraph = ({ value }:any) => {
19
19
  );
20
20
 
21
21
  return <div style={barData?.style?.containerStyle}>
22
- {barData?.main?.header && <div style={{ fontWeight: 500,
23
- textAlign: "left",
24
- fontFamily: "inherit",
25
- marginBottom:"20px",
26
- padding: "15px 0 1px 20px",
27
- fontSize: "18px",
28
- color: "#121926",...barData?.style?.headerStyle}}>{barData?.main?.header}</div> }
22
+ {barData?.main?.header && <div style={{ fontWeight: 500,...barData?.style?.headerStyle}}>{barData?.main?.header}</div> }
29
23
  {GraphRender}
30
24
  </div>;
31
25
  };
@@ -3,8 +3,8 @@ import { finalDataProvider } from "../../utils/finalDataProvider";
3
3
  import DrawHorizontalBarGraph from "./DrawHorizontalBarGraph";
4
4
  import { ParentSize } from "@visx/responsive";
5
5
 
6
- const HorizontalBarGraph = ({ value }:any) => {
7
- const barData:any = finalDataProvider("HorizontalBarGraph",value)
6
+ const HorizontalBarGraph = ({ value,theme }:any) => {
7
+ const barData:any = finalDataProvider("HorizontalBarGraph",value,theme)
8
8
 
9
9
  let GraphRender = (
10
10
  <ParentSize>
@@ -2,8 +2,8 @@ import React from "react";
2
2
  import DrawLineGraph from "./DrawLineGraph";
3
3
  import { finalDataProvider } from "../../utils/finalDataProvider";
4
4
 
5
- const LineGraph = ({ value }:any) => {
6
- const lineData = finalDataProvider("LineGraph", value);
5
+ const LineGraph = ({ value,theme }:any) => {
6
+ const lineData = finalDataProvider("LineGraph", value,theme);
7
7
  return (
8
8
  <div style={lineData?.style?.containerStyle}>
9
9
  {lineData?.main?.header && (
@@ -3,8 +3,8 @@ import DrawPieGraph from "./DrawPieGraph";
3
3
  import { ParentSize } from "@visx/responsive";
4
4
  import { finalDataProvider } from "../../utils/finalDataProvider";
5
5
 
6
- const PieGraph = ({ value }: any) => {
7
- const pieData: any = finalDataProvider("PieGraph", value);
6
+ const PieGraph = ({ value,theme }: any) => {
7
+ const pieData: any = finalDataProvider("PieGraph", value,theme);
8
8
  let PieRender = (
9
9
  <ParentSize>
10
10
  {(parent) => (
@@ -1,7 +1,7 @@
1
1
  import React, { useState , useEffect } from "react";
2
2
  import "./style.css";
3
3
 
4
- const ProgressBar = ({value} : any) => {
4
+ const ProgressBar = ({value,theme} : any) => {
5
5
  const [progress, setProgress] = useState(
6
6
  (value?.main?.data?.achieved / value?.main?.data?.total) *
7
7
  100
@@ -15,7 +15,6 @@ const ProgressBar = ({value} : any) => {
15
15
  return ["#e2b6b6","#ff0000"];
16
16
  }
17
17
  if (progress < 70) {
18
- // return "#ffa500";
19
18
  return ["#b6bce2","#3f51b5"];
20
19
  } else {
21
20
  return ["#b6e2c2","#2ecc71"];
@@ -37,11 +36,9 @@ const ProgressBar = ({value} : any) => {
37
36
  style={{
38
37
  width: `${progress}%`,
39
38
  backgroundColor:value?.style?.progressBarFillColor|| getColor()[1],
40
- // backgroundColor: "#3f51b5",
41
39
  height: "100%",
42
40
  borderRadius: "10px",
43
41
  marginBottom: "20px",
44
- // backgroundColor: "#2ecc71",
45
42
  transition: "width 0.5 ease-out",
46
43
  }}
47
44
  ></div>
@@ -51,7 +48,8 @@ const ProgressBar = ({value} : any) => {
51
48
  <div
52
49
  className="container"
53
50
  style={{
54
- backgroundColor: "white",
51
+ backgroundColor:theme?.palette?.secondary.main ,
52
+ color: theme?.palette?.text?.primary,
55
53
  borderRadius: "20px",
56
54
  width: "auto",
57
55
  height: "auto",
@@ -68,7 +66,7 @@ const ProgressBar = ({value} : any) => {
68
66
  textAlign: "left",
69
67
  fontFamily: "inherit",
70
68
  fontSize: "18px",
71
- color: "#121926",
69
+ color: theme?.palette?.text?.primary||"#121926",
72
70
  }}
73
71
  >
74
72
  {value?.main?.heading}
@@ -92,6 +90,7 @@ const ProgressBar = ({value} : any) => {
92
90
  fontWeight: 700,
93
91
  marginBottom: "20px",
94
92
  fontSize: "24px",
93
+ color:"inherit"
95
94
  }}
96
95
  >
97
96
  {progress.toFixed(2)}%
@@ -126,6 +125,7 @@ const ProgressBar = ({value} : any) => {
126
125
  <div
127
126
  style={{
128
127
  display: "flex",
128
+ color: theme?.palette?.text?.primary,
129
129
  paddingTop: "40px",
130
130
  width: "90%",
131
131
  margin: "auto",
@@ -135,8 +135,8 @@ const ProgressBar = ({value} : any) => {
135
135
  <div
136
136
  style={{
137
137
  textAlign:"left",
138
- color: "#697586",
139
138
  fontSize: "10px",
139
+ color: theme?.palette?.text?.inputLabel,
140
140
  marginBottom: "10px",
141
141
  }}
142
142
  >
@@ -144,7 +144,7 @@ const ProgressBar = ({value} : any) => {
144
144
  </div>
145
145
  <div
146
146
  style={{
147
- color: "#121926",
147
+ color: theme?.palette?.text?.primary||"#121926",
148
148
  textAlign:"left",
149
149
  fontWeight: 500,
150
150
  }}
@@ -156,7 +156,7 @@ const ProgressBar = ({value} : any) => {
156
156
  <div
157
157
  style={{
158
158
  textAlign:"center",
159
- color: "#697586",
159
+ color: theme?.palette?.text?.inputLabel||"#697586",
160
160
  fontSize: "10px",
161
161
  marginBottom: "10px",
162
162
  }}
@@ -166,7 +166,7 @@ const ProgressBar = ({value} : any) => {
166
166
  <div
167
167
  style={{
168
168
  textAlign:"center",
169
- color: "#121926",
169
+ color: theme?.palette?.text?.primary|| "#121926",
170
170
  fontWeight: 500,
171
171
  }}
172
172
  >
@@ -177,7 +177,7 @@ const ProgressBar = ({value} : any) => {
177
177
  <div
178
178
  style={{
179
179
  textAlign:"right",
180
- color: "#697586",
180
+ color: theme?.palette?.text?.inputLabel||"#697586",
181
181
  fontSize: "10px",
182
182
  marginBottom: "10px",
183
183
  }}
@@ -187,7 +187,7 @@ const ProgressBar = ({value} : any) => {
187
187
  <div
188
188
  style={{
189
189
  textAlign:"right",
190
- color: "#121926",
190
+ color: theme?.palette?.text?.primary||"#121926",
191
191
  fontWeight: 500,
192
192
  }}
193
193
  >
@@ -5,36 +5,4 @@
5
5
  box-sizing: border-box;
6
6
  /* background-color: #eef6f8; */
7
7
  font-family: "Roboto", sans-serif;
8
- }
9
-
10
- /* body{
11
- display: flex;
12
- justify-content: center;
13
- align-items: center;
14
- }
15
-
16
- .container {
17
- width: 200px;
18
- margin-top: 100px;
19
- }
20
-
21
- .progress-bar{
22
- width: 100%;
23
- height: 30px;
24
- border-radius: 10px;
25
- background-color: #003441;
26
- margin-bottom: 10px;
27
- }
28
-
29
- .progress-bar-fill{
30
- height: 100%;
31
- border-radius: 10px;
32
- background-color: #2ecc71;
33
-
34
- }
35
- .progress-label{
36
- margin-top: 10px;
37
- font-size: 24px;
38
- font-weight: bold;
39
- color: #444444;
40
- } */
8
+ }
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  import ReactSpeedometer from "react-d3-speedometer";
3
3
 
4
- const SpeedoMeter = ({ value }: any) => {
4
+ const SpeedoMeter = ({ value,theme }: any) => {
5
5
  return (
6
- <div style={{ ...value?.style?.containerStyle,overflow:"auto" }}>
6
+ <div style={{ ...value?.style?.containerStyle,background:theme.palette.secondary.main }}>
7
7
  {value?.main?.header && (
8
8
  <div
9
9
  style={{
@@ -11,7 +11,7 @@ const SpeedoMeter = ({ value }: any) => {
11
11
  textAlign: "left",
12
12
  fontFamily: "inherit",
13
13
  fontSize: "18px",
14
- color: "#121926",
14
+ color:theme.palette.text.primary||"#121926",
15
15
  ...value?.style?.headerStyle,
16
16
  }}
17
17
  >
@@ -6,7 +6,7 @@ const Product1 = [
6
6
  { x: "f", y: 100 },
7
7
  { x: "g", y: 50 },
8
8
  ];
9
- export const finalDataProvider = (type: string, value: any) => {
9
+ export const finalDataProvider = (type: string, value: any,theme?:any) => {
10
10
  switch (type) {
11
11
  case "BarGraph":
12
12
  case "StackBarGraph":
@@ -38,7 +38,7 @@ export const finalDataProvider = (type: string, value: any) => {
38
38
  },
39
39
  style: {
40
40
  containerStyle: {
41
- background: "white",
41
+ background: theme.palette.secondary.main,
42
42
  width: "90%",
43
43
  height: "300",
44
44
  borderRadius: "20px",
@@ -53,6 +53,7 @@ export const finalDataProvider = (type: string, value: any) => {
53
53
  padding: "15px 0 1px 20px",
54
54
  width: "100%",
55
55
  fontSize: "18px",
56
+ color:theme.palette.text.primary,
56
57
  ...value?.style?.headerStyle
57
58
  },
58
59
  tooltipStyle: {
@@ -62,12 +63,12 @@ export const finalDataProvider = (type: string, value: any) => {
62
63
  labelStyle: {
63
64
  leftLabelMargin: "75",
64
65
  topLabelMargin: "-6",
65
- labelColor: "black",
66
+ labelColor: theme.palette.text.primary,
66
67
  leftLabelOffset: 50,
67
68
  bottomLabelOffset: 45,
68
- tickLabelColor: "balck",
69
+ tickLabelColor:theme.palette.text.primary,
69
70
  tickFontSize: "10px",
70
- tickColor: "black",
71
+ tickColor:theme.palette.text.primary,
71
72
  rightAxisWidth: "0.3px",
72
73
  fontSize: "10px",
73
74
 
@@ -97,7 +98,7 @@ export const finalDataProvider = (type: string, value: any) => {
97
98
  legendAvailable: true,
98
99
  ...value?.main,
99
100
  legend: {
100
- labelColor: "green",
101
+ labelColor:theme.palette.text.primary,
101
102
  legendTitle: "Our Assests",
102
103
  direction: "row",
103
104
  align: "right",
@@ -107,7 +108,7 @@ export const finalDataProvider = (type: string, value: any) => {
107
108
 
108
109
  style: {
109
110
  containerStyle: {
110
- background: "white",
111
+ background:theme.palette.secondary.main,
111
112
  width: "100%",
112
113
  height: "310",
113
114
  borderRadius: "20px",
@@ -122,6 +123,7 @@ export const finalDataProvider = (type: string, value: any) => {
122
123
  padding: "15px 0 1px 20px",
123
124
  width: "100%",
124
125
  fontSize: "18px",
126
+ color:theme.palette.text.primary,
125
127
  ...value?.style?.headerStyle
126
128
  },
127
129
  tooltipStyle: {
@@ -129,7 +131,7 @@ export const finalDataProvider = (type: string, value: any) => {
129
131
  ...value?.style?.tooltipStyle,
130
132
  },
131
133
  labelStyle: {
132
- labelColor: "black",
134
+ labelColor:theme.palette.text.primary,
133
135
  labelOffset: 45,
134
136
  leftLabelMargin: "70",
135
137
  topLabelMargin: "-40",
@@ -138,7 +140,7 @@ export const finalDataProvider = (type: string, value: any) => {
138
140
  legendStyle: {
139
141
  legend: {
140
142
  lineHeight: "0.9em",
141
- color: "black",
143
+ color: theme.palette.text.primary,
142
144
  fontSize: "10px",
143
145
 
144
146
  fontFamily: "arial",
@@ -185,7 +187,7 @@ export const finalDataProvider = (type: string, value: any) => {
185
187
  hideBottomAxisLine: false,
186
188
  ...value?.main,
187
189
  legend: {
188
- labelColor: "green",
190
+ labelColor:theme.palette.text.primary,
189
191
  legendTitle: "Our Assests",
190
192
  direction: "row",
191
193
  align: "right",
@@ -195,7 +197,7 @@ export const finalDataProvider = (type: string, value: any) => {
195
197
  },
196
198
  style: {
197
199
  containerStyle: {
198
- background: "white",
200
+ background:theme.palette.secondary.main,
199
201
  width: "90%",
200
202
  height: "300",
201
203
  borderRadius: "20px",
@@ -210,10 +212,11 @@ export const finalDataProvider = (type: string, value: any) => {
210
212
  padding: "15px 0 1px 20px",
211
213
  width: "100%",
212
214
  fontSize: "18px",
215
+ color:theme.palette.text.primary,
213
216
  ...value?.style?.headerStyle
214
217
  },
215
218
  labelStyle: {
216
- labelColor: "black",
219
+ labelColor:theme.palette.text.primary,
217
220
  bottomLabelOffset: 20,
218
221
  leftLabelOffset: 50,
219
222
  leftLabelMargin: 80,
@@ -249,7 +252,7 @@ export const finalDataProvider = (type: string, value: any) => {
249
252
  },
250
253
  style: {
251
254
  containerStyle: {
252
- background: "white",
255
+ background: theme.palette.secondary.main,
253
256
  width: "90%",
254
257
  height: "300",
255
258
  borderRadius: "20px",
@@ -264,6 +267,7 @@ export const finalDataProvider = (type: string, value: any) => {
264
267
  padding: "15px 0 1px 20px",
265
268
  width: "100%",
266
269
  fontSize: "18px",
270
+ color:theme.palette.text.primary,
267
271
  ...value?.style?.headerStyle
268
272
  },
269
273
  tooltipStyle: {
@@ -273,11 +277,11 @@ export const finalDataProvider = (type: string, value: any) => {
273
277
  },
274
278
  labelStyle: {
275
279
  margin: { top: 10, left: 110, right: 40, bottom: 40 },
276
- tickLabelColor: "#6c5efb",
280
+ tickLabelColor: theme.palette.text.primary,
277
281
  leftLabelOffset: 140,
278
282
  bottomLabelOffset: 14,
279
283
  tickFontSize: "10px",
280
- tickColor: "#6c5efb",
284
+ tickColor:theme.palette.text.primary,
281
285
  rightAxisWidth: "0.3px",
282
286
  fontSize: "10px",
283
287