@alfalab/core-components-chart 3.2.3 → 3.2.5

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/Component.js CHANGED
@@ -38,7 +38,7 @@ var CustomizedHOC = function (Component, options) {
38
38
  return NewComponent;
39
39
  };
40
40
 
41
- var styles = {"coreChart":"chart__coreChart_1gitz","bar":"chart__bar_1gitz","unfocused":"chart__unfocused_1gitz"};
41
+ var styles = {"coreChart":"chart__coreChart_ittd7","bar":"chart__bar_ittd7","unfocused":"chart__unfocused_ittd7"};
42
42
  require('./index.css')
43
43
 
44
44
  var Chart = function (props) {
@@ -68,11 +68,11 @@ var Chart = function (props) {
68
68
  var chart = item.chart, dataKey = item.properties.dataKey;
69
69
  var withGrad = chart === 'area';
70
70
  var changed = false;
71
- if (charts["".concat(dataKey)] && filterCount > 1) {
71
+ if (charts[dataKey + ''] && filterCount > 1) {
72
72
  changed = true;
73
73
  setFilterCount(function (prev) { return prev - 1; });
74
74
  }
75
- if (!charts["".concat(dataKey)]) {
75
+ if (!charts[dataKey + '']) {
76
76
  changed = true;
77
77
  setFilterCount(function (prev) { return prev + 1; });
78
78
  }
@@ -80,9 +80,9 @@ var Chart = function (props) {
80
80
  return;
81
81
  setCharts(function (prev) {
82
82
  var newState = tslib.__assign({}, prev);
83
- newState["".concat(dataKey)] = !newState["".concat(dataKey)];
83
+ newState[dataKey + ''] = !newState[dataKey + ''];
84
84
  if (withGrad)
85
- newState["".concat(dataKey, "-gradient")] = !newState["".concat(dataKey, "-gradient")];
85
+ newState[dataKey + '-gradient'] = !newState[dataKey + '-gradient'];
86
86
  return newState;
87
87
  });
88
88
  }, [charts, filterCount, setCharts, setFilterCount]);
@@ -1,19 +1,19 @@
1
- /* hash: uq3jg */
2
- .chart__dotUnfocused_i449g {
1
+ /* hash: 1xp2d */
2
+ .chart__dotUnfocused_1x0vx {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_i449g,
7
- .chart__dotItem_i449g,
8
- .chart__dotWrap_i449g {
6
+ .chart__dot_1x0vx,
7
+ .chart__dotItem_1x0vx,
8
+ .chart__dotWrap_1x0vx {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_i449g {
13
- animation: chart__showDot_i449g 0.5s ease;
12
+ .chart__dot_1x0vx {
13
+ animation: chart__showDot_1x0vx 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_i449g {
16
+ @keyframes chart__showDot_1x0vx {
17
17
  from {
18
18
  opacity: 0;
19
19
  }
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
13
13
 
14
- var styles = {"dotUnfocused":"chart__dotUnfocused_i449g","dot":"chart__dot_i449g","dotItem":"chart__dotItem_i449g","dotWrap":"chart__dotWrap_i449g","showDot":"chart__showDot_i449g"};
14
+ var styles = {"dotUnfocused":"chart__dotUnfocused_1x0vx","dot":"chart__dot_1x0vx","dotItem":"chart__dotItem_1x0vx","dotWrap":"chart__dotWrap_1x0vx","showDot":"chart__showDot_1x0vx"};
15
15
  require('./index.css')
16
16
 
17
17
  var Dot = React__default.default.forwardRef(function (_a, ref) {
@@ -1,4 +1,4 @@
1
- /* hash: 1xb74 */
1
+ /* hash: q19jm */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,25 +15,25 @@
15
15
  --gap-2xl: 32px;
16
16
  } :root {
17
17
  } :root {
18
- } .chart__legendContent_1xkgh {
18
+ } .chart__legendContent_vn98r {
19
19
  display: flex;
20
20
  align-items: center;
21
21
  flex-wrap: wrap;
22
- } .chart__legendWrap_1xkgh {
22
+ } .chart__legendWrap_vn98r {
23
23
  width: 100%;
24
24
  margin: 0;
25
25
  padding: 0;
26
- } .chart__legendItem_1xkgh {
26
+ } .chart__legendItem_vn98r {
27
27
  margin-right: var(--gap-2xl);
28
28
  cursor: pointer;
29
29
  display: inline-block;
30
- } .chart__legendItem_1xkgh:last-child {
30
+ } .chart__legendItem_vn98r:last-child {
31
31
  margin-right: 0;
32
- } .chart__legendUnactive_1xkgh {
32
+ } .chart__legendUnactive_vn98r {
33
33
  opacity: 0.3;
34
- } .chart__legendIcon_1xkgh {
34
+ } .chart__legendIcon_vn98r {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
- } .chart__legendValue_1xkgh {
37
+ } .chart__legendValue_vn98r {
38
38
  text-transform: capitalize;
39
39
  }
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
15
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
16
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
17
17
 
18
- var styles = {"legendContent":"chart__legendContent_1xkgh","legendWrap":"chart__legendWrap_1xkgh","legendItem":"chart__legendItem_1xkgh","legendUnactive":"chart__legendUnactive_1xkgh","legendIcon":"chart__legendIcon_1xkgh","legendValue":"chart__legendValue_1xkgh"};
18
+ var styles = {"legendContent":"chart__legendContent_vn98r","legendWrap":"chart__legendWrap_vn98r","legendItem":"chart__legendItem_vn98r","legendUnactive":"chart__legendUnactive_vn98r","legendIcon":"chart__legendIcon_vn98r","legendValue":"chart__legendValue_vn98r"};
19
19
  require('./index.css')
20
20
 
21
21
  var icons = {
@@ -1,4 +1,4 @@
1
- /* hash: y0z2a */
1
+ /* hash: thpek */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-dark-bg-primary: #0e0e0e;
@@ -16,15 +16,15 @@
16
16
  } :root {
17
17
  } :root {
18
18
  } :root {
19
- } .chart__tickText_1e0yt {
19
+ } .chart__tickText_14up8 {
20
20
  fill: var(--color-light-text-primary);
21
21
  font-size: 16px;
22
22
  line-height: 24px;
23
23
  font-weight: 400;
24
- } .chart__circle_1e0yt {
24
+ } .chart__circle_14up8 {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
- } .chart__circle_1e0yt {
27
+ } .chart__circle_14up8 {
28
28
  opacity: 0.3;
29
29
  fill: var(--color-dark-bg-primary);
30
30
  }
@@ -10,7 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
10
10
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
11
11
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
12
12
 
13
- var styles = {"tickText":"chart__tickText_1e0yt","circle":"chart__circle_1e0yt"};
13
+ var styles = {"tickText":"chart__tickText_14up8","circle":"chart__circle_14up8"};
14
14
  require('./index.css')
15
15
 
16
16
  var Tick = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: dodcu */
1
+ /* hash: azz9q */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -21,7 +21,7 @@
21
21
  --gap-m: 16px;
22
22
  } :root {
23
23
  } :root {
24
- } .chart__tooltip_zxnwz {
24
+ } .chart__tooltip_8jx3w {
25
25
  background-color: var(--color-light-bg-primary);
26
26
  border: 1px solid var(--color-light-border-primary);
27
27
  box-shadow: var(--shadow-l);
@@ -29,15 +29,15 @@
29
29
  padding: var(--gap-s) var(--gap-m);
30
30
  pointer-events: none;
31
31
  position: relative;
32
- } .chart__tooltipList_zxnwz {
32
+ } .chart__tooltipList_8jx3w {
33
33
  position: relative;
34
34
  z-index: 5;
35
35
  list-style-type: none;
36
36
  padding: 0;
37
37
  margin: 0;
38
- } .chart__tooltipItem_zxnwz {
38
+ } .chart__tooltipItem_8jx3w {
39
39
  margin-bottom: 10px;
40
- } .chart__tooltipArrow_zxnwz {
40
+ } .chart__tooltipArrow_8jx3w {
41
41
  position: absolute;
42
42
  left: 0;
43
43
  top: 50%;
@@ -46,7 +46,7 @@
46
46
  height: 10px;
47
47
  border: 1px solid var(--color-light-border-primary);
48
48
  background-color: var(--color-light-bg-primary);
49
- } .chart__tooltipArrow_zxnwz:before {
49
+ } .chart__tooltipArrow_8jx3w:before {
50
50
  content: '';
51
51
  position: absolute;
52
52
  left: -2px;
@@ -56,7 +56,7 @@
56
56
  border-style: solid;
57
57
  border-width: 0 24px 24px 0;
58
58
  border-color: transparent var(--color-light-bg-primary) transparent transparent;
59
- } .chart__tooltipArrowRight_zxnwz {
59
+ } .chart__tooltipArrowRight_8jx3w {
60
60
  left: 100%;
61
61
  transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
62
62
  }
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
13
13
 
14
- var styles = {"tooltip":"chart__tooltip_zxnwz","tooltipList":"chart__tooltipList_zxnwz","tooltipItem":"chart__tooltipItem_zxnwz","tooltipArrow":"chart__tooltipArrow_zxnwz","tooltipArrowRight":"chart__tooltipArrowRight_zxnwz"};
14
+ var styles = {"tooltip":"chart__tooltip_8jx3w","tooltipList":"chart__tooltipList_8jx3w","tooltipItem":"chart__tooltipItem_8jx3w","tooltipArrow":"chart__tooltipArrow_8jx3w","tooltipArrowRight":"chart__tooltipArrowRight_8jx3w"};
15
15
  require('./index.css')
16
16
 
17
17
  var TooltipContent = function (_a) {
package/cssm/Component.js CHANGED
@@ -71,11 +71,11 @@ var Chart = function (props) {
71
71
  var chart = item.chart, dataKey = item.properties.dataKey;
72
72
  var withGrad = chart === 'area';
73
73
  var changed = false;
74
- if (charts["".concat(dataKey)] && filterCount > 1) {
74
+ if (charts[dataKey + ''] && filterCount > 1) {
75
75
  changed = true;
76
76
  setFilterCount(function (prev) { return prev - 1; });
77
77
  }
78
- if (!charts["".concat(dataKey)]) {
78
+ if (!charts[dataKey + '']) {
79
79
  changed = true;
80
80
  setFilterCount(function (prev) { return prev + 1; });
81
81
  }
@@ -83,9 +83,9 @@ var Chart = function (props) {
83
83
  return;
84
84
  setCharts(function (prev) {
85
85
  var newState = tslib.__assign({}, prev);
86
- newState["".concat(dataKey)] = !newState["".concat(dataKey)];
86
+ newState[dataKey + ''] = !newState[dataKey + ''];
87
87
  if (withGrad)
88
- newState["".concat(dataKey, "-gradient")] = !newState["".concat(dataKey, "-gradient")];
88
+ newState[dataKey + '-gradient'] = !newState[dataKey + '-gradient'];
89
89
  return newState;
90
90
  });
91
91
  }, [charts, filterCount, setCharts, setFilterCount]);
package/esm/Component.js CHANGED
@@ -29,7 +29,7 @@ var CustomizedHOC = function (Component, options) {
29
29
  return NewComponent;
30
30
  };
31
31
 
32
- var styles = {"coreChart":"chart__coreChart_1gitz","bar":"chart__bar_1gitz","unfocused":"chart__unfocused_1gitz"};
32
+ var styles = {"coreChart":"chart__coreChart_ittd7","bar":"chart__bar_ittd7","unfocused":"chart__unfocused_ittd7"};
33
33
  require('./index.css')
34
34
 
35
35
  var Chart = function (props) {
@@ -59,11 +59,11 @@ var Chart = function (props) {
59
59
  var chart = item.chart, dataKey = item.properties.dataKey;
60
60
  var withGrad = chart === 'area';
61
61
  var changed = false;
62
- if (charts["".concat(dataKey)] && filterCount > 1) {
62
+ if (charts[dataKey + ''] && filterCount > 1) {
63
63
  changed = true;
64
64
  setFilterCount(function (prev) { return prev - 1; });
65
65
  }
66
- if (!charts["".concat(dataKey)]) {
66
+ if (!charts[dataKey + '']) {
67
67
  changed = true;
68
68
  setFilterCount(function (prev) { return prev + 1; });
69
69
  }
@@ -71,9 +71,9 @@ var Chart = function (props) {
71
71
  return;
72
72
  setCharts(function (prev) {
73
73
  var newState = __assign({}, prev);
74
- newState["".concat(dataKey)] = !newState["".concat(dataKey)];
74
+ newState[dataKey + ''] = !newState[dataKey + ''];
75
75
  if (withGrad)
76
- newState["".concat(dataKey, "-gradient")] = !newState["".concat(dataKey, "-gradient")];
76
+ newState[dataKey + '-gradient'] = !newState[dataKey + '-gradient'];
77
77
  return newState;
78
78
  });
79
79
  }, [charts, filterCount, setCharts, setFilterCount]);
@@ -1,19 +1,19 @@
1
- /* hash: uq3jg */
2
- .chart__dotUnfocused_i449g {
1
+ /* hash: 1xp2d */
2
+ .chart__dotUnfocused_1x0vx {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_i449g,
7
- .chart__dotItem_i449g,
8
- .chart__dotWrap_i449g {
6
+ .chart__dot_1x0vx,
7
+ .chart__dotItem_1x0vx,
8
+ .chart__dotWrap_1x0vx {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_i449g {
13
- animation: chart__showDot_i449g 0.5s ease;
12
+ .chart__dot_1x0vx {
13
+ animation: chart__showDot_1x0vx 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_i449g {
16
+ @keyframes chart__showDot_1x0vx {
17
17
  from {
18
18
  opacity: 0;
19
19
  }
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { PointIcon } from '../../icons/Point.js';
4
4
 
5
- var styles = {"dotUnfocused":"chart__dotUnfocused_i449g","dot":"chart__dot_i449g","dotItem":"chart__dotItem_i449g","dotWrap":"chart__dotWrap_i449g","showDot":"chart__showDot_i449g"};
5
+ var styles = {"dotUnfocused":"chart__dotUnfocused_1x0vx","dot":"chart__dot_1x0vx","dotItem":"chart__dotItem_1x0vx","dotWrap":"chart__dotWrap_1x0vx","showDot":"chart__showDot_1x0vx"};
6
6
  require('./index.css')
7
7
 
8
8
  var Dot = React.forwardRef(function (_a, ref) {
@@ -1,4 +1,4 @@
1
- /* hash: 1xb74 */
1
+ /* hash: q19jm */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,25 +15,25 @@
15
15
  --gap-2xl: 32px;
16
16
  } :root {
17
17
  } :root {
18
- } .chart__legendContent_1xkgh {
18
+ } .chart__legendContent_vn98r {
19
19
  display: flex;
20
20
  align-items: center;
21
21
  flex-wrap: wrap;
22
- } .chart__legendWrap_1xkgh {
22
+ } .chart__legendWrap_vn98r {
23
23
  width: 100%;
24
24
  margin: 0;
25
25
  padding: 0;
26
- } .chart__legendItem_1xkgh {
26
+ } .chart__legendItem_vn98r {
27
27
  margin-right: var(--gap-2xl);
28
28
  cursor: pointer;
29
29
  display: inline-block;
30
- } .chart__legendItem_1xkgh:last-child {
30
+ } .chart__legendItem_vn98r:last-child {
31
31
  margin-right: 0;
32
- } .chart__legendUnactive_1xkgh {
32
+ } .chart__legendUnactive_vn98r {
33
33
  opacity: 0.3;
34
- } .chart__legendIcon_1xkgh {
34
+ } .chart__legendIcon_vn98r {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
- } .chart__legendValue_1xkgh {
37
+ } .chart__legendValue_vn98r {
38
38
  text-transform: capitalize;
39
39
  }
@@ -6,7 +6,7 @@ import { CircleLineIcon } from '../../icons/CircleLine.js';
6
6
  import { FilledCircleIcon } from '../../icons/FilledCircle.js';
7
7
  import { StrokeCircleIcon } from '../../icons/StrokeCircle.js';
8
8
 
9
- var styles = {"legendContent":"chart__legendContent_1xkgh","legendWrap":"chart__legendWrap_1xkgh","legendItem":"chart__legendItem_1xkgh","legendUnactive":"chart__legendUnactive_1xkgh","legendIcon":"chart__legendIcon_1xkgh","legendValue":"chart__legendValue_1xkgh"};
9
+ var styles = {"legendContent":"chart__legendContent_vn98r","legendWrap":"chart__legendWrap_vn98r","legendItem":"chart__legendItem_vn98r","legendUnactive":"chart__legendUnactive_vn98r","legendIcon":"chart__legendIcon_vn98r","legendValue":"chart__legendValue_vn98r"};
10
10
  require('./index.css')
11
11
 
12
12
  var icons = {
@@ -1,4 +1,4 @@
1
- /* hash: y0z2a */
1
+ /* hash: thpek */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-dark-bg-primary: #0e0e0e;
@@ -16,15 +16,15 @@
16
16
  } :root {
17
17
  } :root {
18
18
  } :root {
19
- } .chart__tickText_1e0yt {
19
+ } .chart__tickText_14up8 {
20
20
  fill: var(--color-light-text-primary);
21
21
  font-size: 16px;
22
22
  line-height: 24px;
23
23
  font-weight: 400;
24
- } .chart__circle_1e0yt {
24
+ } .chart__circle_14up8 {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
- } .chart__circle_1e0yt {
27
+ } .chart__circle_14up8 {
28
28
  opacity: 0.3;
29
29
  fill: var(--color-dark-bg-primary);
30
30
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- var styles = {"tickText":"chart__tickText_1e0yt","circle":"chart__circle_1e0yt"};
4
+ var styles = {"tickText":"chart__tickText_14up8","circle":"chart__circle_14up8"};
5
5
  require('./index.css')
6
6
 
7
7
  var Tick = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: dodcu */
1
+ /* hash: azz9q */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -21,7 +21,7 @@
21
21
  --gap-m: 16px;
22
22
  } :root {
23
23
  } :root {
24
- } .chart__tooltip_zxnwz {
24
+ } .chart__tooltip_8jx3w {
25
25
  background-color: var(--color-light-bg-primary);
26
26
  border: 1px solid var(--color-light-border-primary);
27
27
  box-shadow: var(--shadow-l);
@@ -29,15 +29,15 @@
29
29
  padding: var(--gap-s) var(--gap-m);
30
30
  pointer-events: none;
31
31
  position: relative;
32
- } .chart__tooltipList_zxnwz {
32
+ } .chart__tooltipList_8jx3w {
33
33
  position: relative;
34
34
  z-index: 5;
35
35
  list-style-type: none;
36
36
  padding: 0;
37
37
  margin: 0;
38
- } .chart__tooltipItem_zxnwz {
38
+ } .chart__tooltipItem_8jx3w {
39
39
  margin-bottom: 10px;
40
- } .chart__tooltipArrow_zxnwz {
40
+ } .chart__tooltipArrow_8jx3w {
41
41
  position: absolute;
42
42
  left: 0;
43
43
  top: 50%;
@@ -46,7 +46,7 @@
46
46
  height: 10px;
47
47
  border: 1px solid var(--color-light-border-primary);
48
48
  background-color: var(--color-light-bg-primary);
49
- } .chart__tooltipArrow_zxnwz:before {
49
+ } .chart__tooltipArrow_8jx3w:before {
50
50
  content: '';
51
51
  position: absolute;
52
52
  left: -2px;
@@ -56,7 +56,7 @@
56
56
  border-style: solid;
57
57
  border-width: 0 24px 24px 0;
58
58
  border-color: transparent var(--color-light-bg-primary) transparent transparent;
59
- } .chart__tooltipArrowRight_zxnwz {
59
+ } .chart__tooltipArrowRight_8jx3w {
60
60
  left: 100%;
61
61
  transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
62
62
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { Typography } from '@alfalab/core-components-typography/esm';
4
4
 
5
- var styles = {"tooltip":"chart__tooltip_zxnwz","tooltipList":"chart__tooltipList_zxnwz","tooltipItem":"chart__tooltipItem_zxnwz","tooltipArrow":"chart__tooltipArrow_zxnwz","tooltipArrowRight":"chart__tooltipArrowRight_zxnwz"};
5
+ var styles = {"tooltip":"chart__tooltip_8jx3w","tooltipList":"chart__tooltipList_8jx3w","tooltipItem":"chart__tooltipItem_8jx3w","tooltipArrow":"chart__tooltipArrow_8jx3w","tooltipArrowRight":"chart__tooltipArrowRight_8jx3w"};
6
6
  require('./index.css')
7
7
 
8
8
  var TooltipContent = function (_a) {
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1hg6c */
1
+ /* hash: pozuq */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,14 +15,14 @@
15
15
  } :root {
16
16
  } :root {
17
17
  } :root {
18
- } .chart__coreChart_1gitz .recharts-line path {
18
+ } .chart__coreChart_ittd7 .recharts-line path {
19
19
  transition: d 0.2s ease-out;
20
- } .chart__coreChart_1gitz .recharts-text tspan {
20
+ } .chart__coreChart_ittd7 .recharts-text tspan {
21
21
  fill: var(--color-light-text-primary);
22
22
  font-size: 16px;
23
23
  line-height: 22px;
24
- } .chart__bar_1gitz {
24
+ } .chart__bar_ittd7 {
25
25
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
26
- } .chart__unfocused_1gitz {
26
+ } .chart__unfocused_ittd7 {
27
27
  opacity: 0.3;
28
28
  }
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1hg6c */
1
+ /* hash: pozuq */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,14 +15,14 @@
15
15
  } :root {
16
16
  } :root {
17
17
  } :root {
18
- } .chart__coreChart_1gitz .recharts-line path {
18
+ } .chart__coreChart_ittd7 .recharts-line path {
19
19
  transition: d 0.2s ease-out;
20
- } .chart__coreChart_1gitz .recharts-text tspan {
20
+ } .chart__coreChart_ittd7 .recharts-text tspan {
21
21
  fill: var(--color-light-text-primary);
22
22
  font-size: 16px;
23
23
  line-height: 22px;
24
- } .chart__bar_1gitz {
24
+ } .chart__bar_ittd7 {
25
25
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
26
- } .chart__unfocused_1gitz {
26
+ } .chart__unfocused_ittd7 {
27
27
  opacity: 0.3;
28
28
  }
@@ -28,10 +28,10 @@ const CustomizedHOC = (Component, options) => {
28
28
  return NewComponent;
29
29
  };
30
30
 
31
- const styles = {"coreChart":"chart__coreChart_1gitz","bar":"chart__bar_1gitz","unfocused":"chart__unfocused_1gitz"};
31
+ const styles = {"coreChart":"chart__coreChart_ittd7","bar":"chart__bar_ittd7","unfocused":"chart__unfocused_ittd7"};
32
32
  require('./index.css')
33
33
 
34
- /* eslint-disable @typescript-eslint/no-explicit-any */
34
+ /* eslint-disable @typescript-eslint/no-explicit-any,prefer-template */
35
35
  const Chart = (props) => {
36
36
  const [{ state, data, charts, filterCount }, { setCharts, setFilterCount }] = useSettings(props);
37
37
  const [activeDotsState, setActiveDotsState] = useState({
@@ -58,11 +58,11 @@ const Chart = (props) => {
58
58
  const { chart, properties: { dataKey }, } = item;
59
59
  const withGrad = chart === 'area';
60
60
  let changed = false;
61
- if (charts[`${dataKey}`] && filterCount > 1) {
61
+ if (charts[dataKey + ''] && filterCount > 1) {
62
62
  changed = true;
63
63
  setFilterCount((prev) => prev - 1);
64
64
  }
65
- if (!charts[`${dataKey}`]) {
65
+ if (!charts[dataKey + '']) {
66
66
  changed = true;
67
67
  setFilterCount((prev) => prev + 1);
68
68
  }
@@ -70,9 +70,9 @@ const Chart = (props) => {
70
70
  return;
71
71
  setCharts((prev) => {
72
72
  const newState = { ...prev };
73
- newState[`${dataKey}`] = !newState[`${dataKey}`];
73
+ newState[dataKey + ''] = !newState[dataKey + ''];
74
74
  if (withGrad)
75
- newState[`${dataKey}-gradient`] = !newState[`${dataKey}-gradient`];
75
+ newState[dataKey + '-gradient'] = !newState[dataKey + '-gradient'];
76
76
  return newState;
77
77
  });
78
78
  }, [charts, filterCount, setCharts, setFilterCount]);
@@ -1,19 +1,19 @@
1
- /* hash: uq3jg */
2
- .chart__dotUnfocused_i449g {
1
+ /* hash: 1xp2d */
2
+ .chart__dotUnfocused_1x0vx {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_i449g,
7
- .chart__dotItem_i449g,
8
- .chart__dotWrap_i449g {
6
+ .chart__dot_1x0vx,
7
+ .chart__dotItem_1x0vx,
8
+ .chart__dotWrap_1x0vx {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_i449g {
13
- animation: chart__showDot_i449g 0.5s ease;
12
+ .chart__dot_1x0vx {
13
+ animation: chart__showDot_1x0vx 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_i449g {
16
+ @keyframes chart__showDot_1x0vx {
17
17
  from {
18
18
  opacity: 0;
19
19
  }
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { PointIcon } from '../../icons/Point.js';
4
4
 
5
- const styles = {"dotUnfocused":"chart__dotUnfocused_i449g","dot":"chart__dot_i449g","dotItem":"chart__dotItem_i449g","dotWrap":"chart__dotWrap_i449g","showDot":"chart__showDot_i449g"};
5
+ const styles = {"dotUnfocused":"chart__dotUnfocused_1x0vx","dot":"chart__dot_1x0vx","dotItem":"chart__dotItem_1x0vx","dotWrap":"chart__dotWrap_1x0vx","showDot":"chart__showDot_1x0vx"};
6
6
  require('./index.css')
7
7
 
8
8
  const Dot = React.forwardRef(({ cx, cy, index, activeDot, dataKey, dotSettings, value, stroke }, ref) => {
@@ -1,4 +1,4 @@
1
- /* hash: 1xb74 */
1
+ /* hash: q19jm */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,25 +15,25 @@
15
15
  --gap-2xl: 32px;
16
16
  } :root {
17
17
  } :root {
18
- } .chart__legendContent_1xkgh {
18
+ } .chart__legendContent_vn98r {
19
19
  display: flex;
20
20
  align-items: center;
21
21
  flex-wrap: wrap;
22
- } .chart__legendWrap_1xkgh {
22
+ } .chart__legendWrap_vn98r {
23
23
  width: 100%;
24
24
  margin: 0;
25
25
  padding: 0;
26
- } .chart__legendItem_1xkgh {
26
+ } .chart__legendItem_vn98r {
27
27
  margin-right: var(--gap-2xl);
28
28
  cursor: pointer;
29
29
  display: inline-block;
30
- } .chart__legendItem_1xkgh:last-child {
30
+ } .chart__legendItem_vn98r:last-child {
31
31
  margin-right: 0;
32
- } .chart__legendUnactive_1xkgh {
32
+ } .chart__legendUnactive_vn98r {
33
33
  opacity: 0.3;
34
- } .chart__legendIcon_1xkgh {
34
+ } .chart__legendIcon_vn98r {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
- } .chart__legendValue_1xkgh {
37
+ } .chart__legendValue_vn98r {
38
38
  text-transform: capitalize;
39
39
  }
@@ -6,7 +6,7 @@ import { CircleLineIcon } from '../../icons/CircleLine.js';
6
6
  import { FilledCircleIcon } from '../../icons/FilledCircle.js';
7
7
  import { StrokeCircleIcon } from '../../icons/StrokeCircle.js';
8
8
 
9
- const styles = {"legendContent":"chart__legendContent_1xkgh","legendWrap":"chart__legendWrap_1xkgh","legendItem":"chart__legendItem_1xkgh","legendUnactive":"chart__legendUnactive_1xkgh","legendIcon":"chart__legendIcon_1xkgh","legendValue":"chart__legendValue_1xkgh"};
9
+ const styles = {"legendContent":"chart__legendContent_vn98r","legendWrap":"chart__legendWrap_vn98r","legendItem":"chart__legendItem_vn98r","legendUnactive":"chart__legendUnactive_vn98r","legendIcon":"chart__legendIcon_vn98r","legendValue":"chart__legendValue_vn98r"};
10
10
  require('./index.css')
11
11
 
12
12
  const icons = {
@@ -1,4 +1,4 @@
1
- /* hash: y0z2a */
1
+ /* hash: thpek */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-dark-bg-primary: #0e0e0e;
@@ -16,15 +16,15 @@
16
16
  } :root {
17
17
  } :root {
18
18
  } :root {
19
- } .chart__tickText_1e0yt {
19
+ } .chart__tickText_14up8 {
20
20
  fill: var(--color-light-text-primary);
21
21
  font-size: 16px;
22
22
  line-height: 24px;
23
23
  font-weight: 400;
24
- } .chart__circle_1e0yt {
24
+ } .chart__circle_14up8 {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
- } .chart__circle_1e0yt {
27
+ } .chart__circle_14up8 {
28
28
  opacity: 0.3;
29
29
  fill: var(--color-dark-bg-primary);
30
30
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- const styles = {"tickText":"chart__tickText_1e0yt","circle":"chart__circle_1e0yt"};
4
+ const styles = {"tickText":"chart__tickText_14up8","circle":"chart__circle_14up8"};
5
5
  require('./index.css')
6
6
 
7
7
  const Tick = ({ y, payload, tickFormatter, xAxis }) => {
@@ -1,4 +1,4 @@
1
- /* hash: dodcu */
1
+ /* hash: azz9q */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -21,7 +21,7 @@
21
21
  --gap-m: 16px;
22
22
  } :root {
23
23
  } :root {
24
- } .chart__tooltip_zxnwz {
24
+ } .chart__tooltip_8jx3w {
25
25
  background-color: var(--color-light-bg-primary);
26
26
  border: 1px solid var(--color-light-border-primary);
27
27
  box-shadow: var(--shadow-l);
@@ -29,15 +29,15 @@
29
29
  padding: var(--gap-s) var(--gap-m);
30
30
  pointer-events: none;
31
31
  position: relative;
32
- } .chart__tooltipList_zxnwz {
32
+ } .chart__tooltipList_8jx3w {
33
33
  position: relative;
34
34
  z-index: 5;
35
35
  list-style-type: none;
36
36
  padding: 0;
37
37
  margin: 0;
38
- } .chart__tooltipItem_zxnwz {
38
+ } .chart__tooltipItem_8jx3w {
39
39
  margin-bottom: 10px;
40
- } .chart__tooltipArrow_zxnwz {
40
+ } .chart__tooltipArrow_8jx3w {
41
41
  position: absolute;
42
42
  left: 0;
43
43
  top: 50%;
@@ -46,7 +46,7 @@
46
46
  height: 10px;
47
47
  border: 1px solid var(--color-light-border-primary);
48
48
  background-color: var(--color-light-bg-primary);
49
- } .chart__tooltipArrow_zxnwz:before {
49
+ } .chart__tooltipArrow_8jx3w:before {
50
50
  content: '';
51
51
  position: absolute;
52
52
  left: -2px;
@@ -56,7 +56,7 @@
56
56
  border-style: solid;
57
57
  border-width: 0 24px 24px 0;
58
58
  border-color: transparent var(--color-light-bg-primary) transparent transparent;
59
- } .chart__tooltipArrowRight_zxnwz {
59
+ } .chart__tooltipArrowRight_8jx3w {
60
60
  left: 100%;
61
61
  transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
62
62
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { Typography } from '@alfalab/core-components-typography/modern';
4
4
 
5
- const styles = {"tooltip":"chart__tooltip_zxnwz","tooltipList":"chart__tooltipList_zxnwz","tooltipItem":"chart__tooltipItem_zxnwz","tooltipArrow":"chart__tooltipArrow_zxnwz","tooltipArrowRight":"chart__tooltipArrowRight_zxnwz"};
5
+ const styles = {"tooltip":"chart__tooltip_8jx3w","tooltipList":"chart__tooltipList_8jx3w","tooltipItem":"chart__tooltipItem_8jx3w","tooltipArrow":"chart__tooltipArrow_8jx3w","tooltipArrowRight":"chart__tooltipArrowRight_8jx3w"};
6
6
  require('./index.css')
7
7
 
8
8
  const TooltipContent = ({ payload, separator, label, tooltipArrowSide, arrow, series, labelFormatter, labelStyle, }) => {
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1hg6c */
1
+ /* hash: pozuq */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,14 +15,14 @@
15
15
  } :root {
16
16
  } :root {
17
17
  } :root {
18
- } .chart__coreChart_1gitz .recharts-line path {
18
+ } .chart__coreChart_ittd7 .recharts-line path {
19
19
  transition: d 0.2s ease-out;
20
- } .chart__coreChart_1gitz .recharts-text tspan {
20
+ } .chart__coreChart_ittd7 .recharts-text tspan {
21
21
  fill: var(--color-light-text-primary);
22
22
  font-size: 16px;
23
23
  line-height: 22px;
24
- } .chart__bar_1gitz {
24
+ } .chart__bar_ittd7 {
25
25
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
26
- } .chart__unfocused_1gitz {
26
+ } .chart__unfocused_ittd7 {
27
27
  opacity: 0.3;
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-chart",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "description": "Chart component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  "directory": "dist"
12
12
  },
13
13
  "dependencies": {
14
- "@alfalab/core-components-typography": "^4.2.1",
14
+ "@alfalab/core-components-typography": "^4.4.0",
15
15
  "classnames": "^2.3.1",
16
16
  "recharts": "^2.1.2",
17
17
  "tslib": "^2.4.0"
package/src/Component.tsx CHANGED
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
1
+ /* eslint-disable @typescript-eslint/no-explicit-any,prefer-template */
2
2
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
3
  import cn from 'classnames';
4
4
  import {
@@ -83,12 +83,12 @@ export const Chart = (props: OptionsProps) => {
83
83
  const withGrad = chart === 'area';
84
84
  let changed = false;
85
85
 
86
- if (charts[`${dataKey}`] && filterCount > 1) {
86
+ if (charts[dataKey + ''] && filterCount > 1) {
87
87
  changed = true;
88
88
  setFilterCount((prev) => prev - 1);
89
89
  }
90
90
 
91
- if (!charts[`${dataKey}`]) {
91
+ if (!charts[dataKey + '']) {
92
92
  changed = true;
93
93
  setFilterCount((prev) => prev + 1);
94
94
  }
@@ -97,8 +97,8 @@ export const Chart = (props: OptionsProps) => {
97
97
  setCharts((prev: DataDynamicBooleanProps) => {
98
98
  const newState = { ...prev };
99
99
 
100
- newState[`${dataKey}`] = !newState[`${dataKey}`];
101
- if (withGrad) newState[`${dataKey}-gradient`] = !newState[`${dataKey}-gradient`];
100
+ newState[dataKey + ''] = !newState[dataKey + ''];
101
+ if (withGrad) newState[dataKey + '-gradient'] = !newState[dataKey + '-gradient'];
102
102
 
103
103
  return newState;
104
104
  });