impaktapps-design 0.2.4 → 0.2.51

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",
@@ -12116,12 +12116,12 @@ const finalDataProvider = (type2, value) => {
12116
12116
  labelStyle: {
12117
12117
  leftLabelMargin: "75",
12118
12118
  topLabelMargin: "-6",
12119
- labelColor: "black",
12119
+ labelColor: theme.palette.text.primary,
12120
12120
  leftLabelOffset: 50,
12121
12121
  bottomLabelOffset: 45,
12122
- tickLabelColor: "balck",
12122
+ tickLabelColor: theme.palette.text.primary,
12123
12123
  tickFontSize: "10px",
12124
- tickColor: "black",
12124
+ tickColor: theme.palette.text.primary,
12125
12125
  rightAxisWidth: "0.3px",
12126
12126
  fontSize: "10px",
12127
12127
  ...(_f = value == null ? void 0 : value.style) == null ? void 0 : _f.labelStyle
@@ -12147,7 +12147,7 @@ const finalDataProvider = (type2, value) => {
12147
12147
  legendAvailable: true,
12148
12148
  ...value == null ? void 0 : value.main,
12149
12149
  legend: {
12150
- labelColor: "green",
12150
+ labelColor: theme.palette.text.primary,
12151
12151
  legendTitle: "Our Assests",
12152
12152
  direction: "row",
12153
12153
  align: "right",
@@ -12156,7 +12156,7 @@ const finalDataProvider = (type2, value) => {
12156
12156
  },
12157
12157
  style: {
12158
12158
  containerStyle: {
12159
- background: "white",
12159
+ background: theme.palette.secondary.main,
12160
12160
  width: "100%",
12161
12161
  height: "310",
12162
12162
  borderRadius: "20px",
@@ -12177,7 +12177,7 @@ const finalDataProvider = (type2, value) => {
12177
12177
  ...(_l = value == null ? void 0 : value.style) == null ? void 0 : _l.tooltipStyle
12178
12178
  },
12179
12179
  labelStyle: {
12180
- labelColor: "black",
12180
+ labelColor: theme.palette.text.primary,
12181
12181
  labelOffset: 45,
12182
12182
  leftLabelMargin: "70",
12183
12183
  topLabelMargin: "-40",
@@ -12186,7 +12186,7 @@ const finalDataProvider = (type2, value) => {
12186
12186
  legendStyle: {
12187
12187
  legend: {
12188
12188
  lineHeight: "0.9em",
12189
- color: "black",
12189
+ color: theme.palette.text.primary,
12190
12190
  fontSize: "10px",
12191
12191
  fontFamily: "arial",
12192
12192
  padding: "10px 10px",
@@ -12230,7 +12230,7 @@ const finalDataProvider = (type2, value) => {
12230
12230
  hideBottomAxisLine: false,
12231
12231
  ...value == null ? void 0 : value.main,
12232
12232
  legend: {
12233
- labelColor: "green",
12233
+ labelColor: theme.palette.text.primary,
12234
12234
  legendTitle: "Our Assests",
12235
12235
  direction: "row",
12236
12236
  align: "right",
@@ -12240,7 +12240,7 @@ const finalDataProvider = (type2, value) => {
12240
12240
  },
12241
12241
  style: {
12242
12242
  containerStyle: {
12243
- background: "white",
12243
+ background: theme.palette.secondary.main,
12244
12244
  width: "90%",
12245
12245
  height: "300",
12246
12246
  borderRadius: "20px",
@@ -12258,7 +12258,7 @@ const finalDataProvider = (type2, value) => {
12258
12258
  ...(_v = value == null ? void 0 : value.style) == null ? void 0 : _v.headerStyle
12259
12259
  },
12260
12260
  labelStyle: {
12261
- labelColor: "black",
12261
+ labelColor: theme.palette.text.primary,
12262
12262
  bottomLabelOffset: 20,
12263
12263
  leftLabelOffset: 50,
12264
12264
  leftLabelMargin: 80,
@@ -12290,7 +12290,7 @@ const finalDataProvider = (type2, value) => {
12290
12290
  },
12291
12291
  style: {
12292
12292
  containerStyle: {
12293
- background: "white",
12293
+ background: theme.palette.secondary.main,
12294
12294
  width: "90%",
12295
12295
  height: "300",
12296
12296
  borderRadius: "20px",
@@ -12314,11 +12314,11 @@ const finalDataProvider = (type2, value) => {
12314
12314
  },
12315
12315
  labelStyle: {
12316
12316
  margin: { top: 10, left: 110, right: 40, bottom: 40 },
12317
- tickLabelColor: "#6c5efb",
12317
+ tickLabelColor: theme.palette.text.primary,
12318
12318
  leftLabelOffset: 140,
12319
12319
  bottomLabelOffset: 14,
12320
12320
  tickFontSize: "10px",
12321
- tickColor: "#6c5efb",
12321
+ tickColor: theme.palette.text.primary,
12322
12322
  rightAxisWidth: "0.3px",
12323
12323
  fontSize: "10px",
12324
12324
  ...(_E = value == null ? void 0 : value.style) == null ? void 0 : _E.labelStyle
@@ -12332,10 +12332,11 @@ const finalDataProvider = (type2, value) => {
12332
12332
  }
12333
12333
  };
12334
12334
  const BarGraph = ({
12335
- value
12335
+ value,
12336
+ theme
12336
12337
  }) => {
12337
12338
  var _a2, _b2, _c2, _d, _e2;
12338
- const barData = finalDataProvider((_a2 = value == null ? void 0 : value.main) == null ? void 0 : _a2.type, value);
12339
+ const barData = finalDataProvider((_a2 = value == null ? void 0 : value.main) == null ? void 0 : _a2.type, value, theme);
12339
12340
  let GraphRender = /* @__PURE__ */ jsx(ParentSize$1, {
12340
12341
  children: (parent) => {
12341
12342
  var _a3, _b3, _c3, _d2, _e3, _f, _g, _h, _i, _j, _k, _l, _m, _n2;
@@ -12460,10 +12461,11 @@ const DrawPieGraph = ({
12460
12461
  });
12461
12462
  };
12462
12463
  const PieGraph = ({
12463
- value
12464
+ value,
12465
+ theme
12464
12466
  }) => {
12465
12467
  var _a2, _b2;
12466
- const pieData = finalDataProvider("PieGraph", value);
12468
+ const pieData = finalDataProvider("PieGraph", value, theme);
12467
12469
  let PieRender = /* @__PURE__ */ jsx(ParentSize$1, {
12468
12470
  children: (parent) => /* @__PURE__ */ jsx(DrawPieGraph, {
12469
12471
  parentWidth: parent.width,
@@ -18348,10 +18350,11 @@ const DrawGraph = ({
18348
18350
  });
18349
18351
  };
18350
18352
  const LineGraph = ({
18351
- value
18353
+ value,
18354
+ theme
18352
18355
  }) => {
18353
18356
  var _a2, _b2, _c2, _d;
18354
- const lineData = finalDataProvider("LineGraph", value);
18357
+ const lineData = finalDataProvider("LineGraph", value, theme);
18355
18358
  return /* @__PURE__ */ jsxs("div", {
18356
18359
  style: (_a2 = lineData == null ? void 0 : lineData.style) == null ? void 0 : _a2.containerStyle,
18357
18360
  children: [((_b2 = lineData == null ? void 0 : lineData.main) == null ? void 0 : _b2.header) && /* @__PURE__ */ jsx("div", {
@@ -18492,10 +18495,11 @@ var DrawHorizontalBarGraph = withTooltip(({
18492
18495
  });
18493
18496
  });
18494
18497
  const HorizontalBarGraph = ({
18495
- value
18498
+ value,
18499
+ theme
18496
18500
  }) => {
18497
18501
  var _a2, _b2;
18498
- const barData = finalDataProvider("HorizontalBarGraph", value);
18502
+ const barData = finalDataProvider("HorizontalBarGraph", value, theme);
18499
18503
  let GraphRender = /* @__PURE__ */ jsx(ParentSize$1, {
18500
18504
  children: (parent) => {
18501
18505
  var _a3, _b3, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2;
@@ -18522,7 +18526,8 @@ const HorizontalBarGraph = ({
18522
18526
  };
18523
18527
  var style = "";
18524
18528
  const ProgressBar = ({
18525
- value
18529
+ value,
18530
+ theme
18526
18531
  }) => {
18527
18532
  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;
18528
18533
  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);
@@ -35851,13 +35856,14 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(memoizeOne_esm);
35851
35856
  })(dist$1);
35852
35857
  var ReactSpeedometer = /* @__PURE__ */ getDefaultExportFromCjs(dist$1);
35853
35858
  const SpeedoMeter = ({
35854
- value
35859
+ value,
35860
+ theme
35855
35861
  }) => {
35856
35862
  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
35863
  return /* @__PURE__ */ jsxs("div", {
35858
35864
  style: {
35859
35865
  ...(_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.containerStyle,
35860
- overflow: "scroll"
35866
+ background: theme.palette.secondary.main
35861
35867
  },
35862
35868
  children: [((_b2 = value == null ? void 0 : value.main) == null ? void 0 : _b2.header) && /* @__PURE__ */ jsx("div", {
35863
35869
  style: {
@@ -35875,7 +35881,7 @@ const SpeedoMeter = ({
35875
35881
  minWidth: 500,
35876
35882
  display: "flex",
35877
35883
  justifyContent: "center",
35878
- overflow: "scroll"
35884
+ overflow: "auto"
35879
35885
  },
35880
35886
  children: /* @__PURE__ */ jsx(ReactSpeedometer, {
35881
35887
  forceRender: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-design",
3
- "version": "0.2.4",
3
+ "version": "0.2.51",
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) => (
@@ -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
@@ -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:"scroll" }}>
6
+ <div style={{ ...value?.style?.containerStyle,background:theme.palette.secondary.main }}>
7
7
  {value?.main?.header && (
8
8
  <div
9
9
  style={{
@@ -18,7 +18,7 @@ const SpeedoMeter = ({ value }: any) => {
18
18
  {value.main.header}
19
19
  </div>
20
20
  )}
21
- <div style={{ width:"100%",minWidth:500,display: "flex", justifyContent: "center",overflow:"scroll" }}>
21
+ <div style={{ width:"100%",minWidth:500,display: "flex", justifyContent: "center",overflow:"auto" }}>
22
22
  <ReactSpeedometer
23
23
  forceRender={true}
24
24
  segmentColors={value?.style?.segmentColors}
@@ -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",
@@ -62,12 +62,12 @@ export const finalDataProvider = (type: string, value: any) => {
62
62
  labelStyle: {
63
63
  leftLabelMargin: "75",
64
64
  topLabelMargin: "-6",
65
- labelColor: "black",
65
+ labelColor: theme.palette.text.primary,
66
66
  leftLabelOffset: 50,
67
67
  bottomLabelOffset: 45,
68
- tickLabelColor: "balck",
68
+ tickLabelColor:theme.palette.text.primary,
69
69
  tickFontSize: "10px",
70
- tickColor: "black",
70
+ tickColor:theme.palette.text.primary,
71
71
  rightAxisWidth: "0.3px",
72
72
  fontSize: "10px",
73
73
 
@@ -97,7 +97,7 @@ export const finalDataProvider = (type: string, value: any) => {
97
97
  legendAvailable: true,
98
98
  ...value?.main,
99
99
  legend: {
100
- labelColor: "green",
100
+ labelColor:theme.palette.text.primary,
101
101
  legendTitle: "Our Assests",
102
102
  direction: "row",
103
103
  align: "right",
@@ -107,7 +107,7 @@ export const finalDataProvider = (type: string, value: any) => {
107
107
 
108
108
  style: {
109
109
  containerStyle: {
110
- background: "white",
110
+ background:theme.palette.secondary.main,
111
111
  width: "100%",
112
112
  height: "310",
113
113
  borderRadius: "20px",
@@ -129,7 +129,7 @@ export const finalDataProvider = (type: string, value: any) => {
129
129
  ...value?.style?.tooltipStyle,
130
130
  },
131
131
  labelStyle: {
132
- labelColor: "black",
132
+ labelColor:theme.palette.text.primary,
133
133
  labelOffset: 45,
134
134
  leftLabelMargin: "70",
135
135
  topLabelMargin: "-40",
@@ -138,7 +138,7 @@ export const finalDataProvider = (type: string, value: any) => {
138
138
  legendStyle: {
139
139
  legend: {
140
140
  lineHeight: "0.9em",
141
- color: "black",
141
+ color: theme.palette.text.primary,
142
142
  fontSize: "10px",
143
143
 
144
144
  fontFamily: "arial",
@@ -185,7 +185,7 @@ export const finalDataProvider = (type: string, value: any) => {
185
185
  hideBottomAxisLine: false,
186
186
  ...value?.main,
187
187
  legend: {
188
- labelColor: "green",
188
+ labelColor:theme.palette.text.primary,
189
189
  legendTitle: "Our Assests",
190
190
  direction: "row",
191
191
  align: "right",
@@ -195,7 +195,7 @@ export const finalDataProvider = (type: string, value: any) => {
195
195
  },
196
196
  style: {
197
197
  containerStyle: {
198
- background: "white",
198
+ background:theme.palette.secondary.main,
199
199
  width: "90%",
200
200
  height: "300",
201
201
  borderRadius: "20px",
@@ -213,7 +213,7 @@ export const finalDataProvider = (type: string, value: any) => {
213
213
  ...value?.style?.headerStyle
214
214
  },
215
215
  labelStyle: {
216
- labelColor: "black",
216
+ labelColor:theme.palette.text.primary,
217
217
  bottomLabelOffset: 20,
218
218
  leftLabelOffset: 50,
219
219
  leftLabelMargin: 80,
@@ -249,7 +249,7 @@ export const finalDataProvider = (type: string, value: any) => {
249
249
  },
250
250
  style: {
251
251
  containerStyle: {
252
- background: "white",
252
+ background: theme.palette.secondary.main,
253
253
  width: "90%",
254
254
  height: "300",
255
255
  borderRadius: "20px",
@@ -273,11 +273,11 @@ export const finalDataProvider = (type: string, value: any) => {
273
273
  },
274
274
  labelStyle: {
275
275
  margin: { top: 10, left: 110, right: 40, bottom: 40 },
276
- tickLabelColor: "#6c5efb",
276
+ tickLabelColor: theme.palette.text.primary,
277
277
  leftLabelOffset: 140,
278
278
  bottomLabelOffset: 14,
279
279
  tickFontSize: "10px",
280
- tickColor: "#6c5efb",
280
+ tickColor:theme.palette.text.primary,
281
281
  rightAxisWidth: "0.3px",
282
282
  fontSize: "10px",
283
283