@alfalab/core-components-chart 2.1.3 → 2.2.0

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/Component.js +2 -2
  3. package/components/Dot/index.css +8 -8
  4. package/components/Dot/index.js +1 -1
  5. package/components/Legends/index.css +8 -8
  6. package/components/Legends/index.js +1 -1
  7. package/components/LinearGradient.d.ts +1 -1
  8. package/components/Tick/index.css +4 -4
  9. package/components/Tick/index.js +1 -1
  10. package/components/TooltipContent/index.css +7 -7
  11. package/components/TooltipContent/index.js +1 -1
  12. package/cssm/components/LinearGradient.d.ts +1 -1
  13. package/cssm/icons/CircleLine.d.ts +1 -1
  14. package/esm/Component.js +2 -2
  15. package/esm/components/Dot/index.css +8 -8
  16. package/esm/components/Dot/index.js +1 -1
  17. package/esm/components/Legends/index.css +8 -8
  18. package/esm/components/Legends/index.js +1 -1
  19. package/esm/components/LinearGradient.d.ts +1 -1
  20. package/esm/components/Tick/index.css +4 -4
  21. package/esm/components/Tick/index.js +1 -1
  22. package/esm/components/TooltipContent/index.css +7 -7
  23. package/esm/components/TooltipContent/index.js +1 -1
  24. package/esm/hooks/useSettings/index.js +1 -1
  25. package/esm/hooks/useSettings/utils/setDatas.js +1 -1
  26. package/esm/hooks/useSettings/utils/setGradientCharts.js +1 -1
  27. package/esm/icons/CircleLine.d.ts +1 -1
  28. package/esm/index.css +14 -3
  29. package/esm/index.js +1 -1
  30. package/esm/{tslib.es6-7bb24d27.d.ts → tslib.es6-be87f385.d.ts} +0 -0
  31. package/esm/{tslib.es6-7bb24d27.js → tslib.es6-be87f385.js} +0 -0
  32. package/hooks/useSettings/index.js +1 -1
  33. package/hooks/useSettings/utils/setDatas.js +1 -1
  34. package/hooks/useSettings/utils/setGradientCharts.js +1 -1
  35. package/icons/CircleLine.d.ts +1 -1
  36. package/index.css +14 -3
  37. package/index.js +1 -1
  38. package/modern/Component.js +1 -1
  39. package/modern/components/Dot/index.css +8 -8
  40. package/modern/components/Dot/index.js +1 -1
  41. package/modern/components/Legends/index.css +8 -8
  42. package/modern/components/Legends/index.js +1 -1
  43. package/modern/components/LinearGradient.d.ts +1 -1
  44. package/modern/components/Tick/index.css +4 -4
  45. package/modern/components/Tick/index.js +1 -1
  46. package/modern/components/TooltipContent/index.css +7 -7
  47. package/modern/components/TooltipContent/index.js +1 -1
  48. package/modern/icons/CircleLine.d.ts +1 -1
  49. package/modern/index.css +14 -3
  50. package/package.json +4 -4
  51. /package/{tslib.es6-2bd17630.d.ts → tslib.es6-7cc61387.d.ts} +0 -0
  52. /package/{tslib.es6-2bd17630.js → tslib.es6-7cc61387.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.2.0](https://github.com/core-ds/core-components/compare/@alfalab/core-components-chart@2.1.3...@alfalab/core-components-chart@2.2.0) (2022-08-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * react 18 support ([#159](https://github.com/core-ds/core-components/issues/159)) ([2e6693c](https://github.com/core-ds/core-components/commit/2e6693c62f534e333aadb7d3fff4ffd78ac84c63))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.1.3](https://github.com/core-ds/core-components/compare/@alfalab/core-components-chart@2.1.2...@alfalab/core-components-chart@2.1.3) (2022-07-18)
7
18
 
8
19
  **Note:** Version bump only for package @alfalab/core-components-chart
package/Component.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('./tslib.es6-2bd17630.js');
5
+ var tslib_es6 = require('./tslib.es6-7cc61387.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var recharts = require('recharts');
@@ -40,7 +40,7 @@ var CustomizedHOC = function (Component, options) {
40
40
  return NewComponent;
41
41
  };
42
42
 
43
- var styles = {"coreChart":"chart__coreChart_1qcsz","bar":"chart__bar_1qcsz","unfocused":"chart__unfocused_1qcsz"};
43
+ var styles = {"coreChart":"chart__coreChart_ekvmn","bar":"chart__bar_ekvmn","unfocused":"chart__unfocused_ekvmn"};
44
44
  require('./index.css')
45
45
 
46
46
  var Chart = function (props) {
@@ -1,19 +1,19 @@
1
- /* hash: suvnq */
2
- .chart__dotUnfocused_p05l7 {
1
+ /* hash: 1abiv */
2
+ .chart__dotUnfocused_1dk64 {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_p05l7,
7
- .chart__dotItem_p05l7,
8
- .chart__dotWrap_p05l7 {
6
+ .chart__dot_1dk64,
7
+ .chart__dotItem_1dk64,
8
+ .chart__dotWrap_1dk64 {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_p05l7 {
13
- animation: chart__showDot_p05l7 0.5s ease;
12
+ .chart__dot_1dk64 {
13
+ animation: chart__showDot_1dk64 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_p05l7 {
16
+ @keyframes chart__showDot_1dk64 {
17
17
  from {
18
18
  opacity: 0;
19
19
  }
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
13
13
 
14
- var styles = {"dotUnfocused":"chart__dotUnfocused_p05l7","dot":"chart__dot_p05l7","dotItem":"chart__dotItem_p05l7","dotWrap":"chart__dotWrap_p05l7","showDot":"chart__showDot_p05l7"};
14
+ var styles = {"dotUnfocused":"chart__dotUnfocused_1dk64","dot":"chart__dot_1dk64","dotItem":"chart__dotItem_1dk64","dotWrap":"chart__dotWrap_1dk64","showDot":"chart__showDot_1dk64"};
15
15
  require('./index.css')
16
16
 
17
17
  var Dot = React__default['default'].forwardRef(function (_a, ref) {
@@ -1,4 +1,4 @@
1
- /* hash: if6gq */
1
+ /* hash: 1yt44 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,31 +10,31 @@
10
10
  :root {
11
11
  --gap-2xl: 32px;
12
12
  }
13
- .chart__legendContent_1lvlx {
13
+ .chart__legendContent_14cll {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  flex-wrap: wrap;
17
17
  }
18
- .chart__legendWrap_1lvlx {
18
+ .chart__legendWrap_14cll {
19
19
  width: 100%;
20
20
  margin: 0;
21
21
  padding: 0;
22
22
  }
23
- .chart__legendItem_1lvlx {
23
+ .chart__legendItem_14cll {
24
24
  margin-right: var(--gap-2xl);
25
25
  cursor: pointer;
26
26
  display: inline-block;
27
27
  }
28
- .chart__legendItem_1lvlx:last-child {
28
+ .chart__legendItem_14cll:last-child {
29
29
  margin-right: 0;
30
30
  }
31
- .chart__legendUnactive_1lvlx {
31
+ .chart__legendUnactive_14cll {
32
32
  opacity: 0.3;
33
33
  }
34
- .chart__legendIcon_1lvlx {
34
+ .chart__legendIcon_14cll {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
37
  }
38
- .chart__legendValue_1lvlx {
38
+ .chart__legendValue_14cll {
39
39
  text-transform: capitalize;
40
40
  }
@@ -15,7 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
15
15
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
16
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
17
17
 
18
- var styles = {"legendContent":"chart__legendContent_1lvlx","legendWrap":"chart__legendWrap_1lvlx","legendItem":"chart__legendItem_1lvlx","legendUnactive":"chart__legendUnactive_1lvlx","legendIcon":"chart__legendIcon_1lvlx","legendValue":"chart__legendValue_1lvlx"};
18
+ var styles = {"legendContent":"chart__legendContent_14cll","legendWrap":"chart__legendWrap_14cll","legendItem":"chart__legendItem_14cll","legendUnactive":"chart__legendUnactive_14cll","legendIcon":"chart__legendIcon_14cll","legendValue":"chart__legendValue_14cll"};
19
19
  require('./index.css')
20
20
 
21
21
  var icons = {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { LinearGradientProps } from "../types/utils/gradient.types";
4
- declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
4
+ declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
5
5
  export { LinearGradient };
@@ -1,4 +1,4 @@
1
- /* hash: qcj1f */
1
+ /* hash: 11445 */
2
2
  :root {
3
3
  --color-dark-bg-primary: #0b1f35;
4
4
  --color-light-text-primary: #0b1f35;
@@ -11,17 +11,17 @@
11
11
 
12
12
  /* Hard up */
13
13
  }
14
- .chart__tickText_1ujkf {
14
+ .chart__tickText_17o60 {
15
15
  fill: var(--color-light-text-primary);
16
16
  font-size: 16px;
17
17
  line-height: 24px;
18
18
  font-weight: 400;
19
19
  }
20
- .chart__circle_1ujkf {
20
+ .chart__circle_17o60 {
21
21
  opacity: 0.3;
22
22
  fill: var(--color-dark-bg-primary);
23
23
  }
24
- .chart__circle_1ujkf {
24
+ .chart__circle_17o60 {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
27
  }
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
10
10
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
11
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
12
12
 
13
- var styles = {"tickText":"chart__tickText_1ujkf","circle":"chart__circle_1ujkf"};
13
+ var styles = {"tickText":"chart__tickText_17o60","circle":"chart__circle_17o60"};
14
14
  require('./index.css')
15
15
 
16
16
  var Tick = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: oh8xl */
1
+ /* hash: ew6zk */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-border-primary: #dbdee1;
@@ -19,7 +19,7 @@
19
19
  :root {
20
20
  --border-radius-m: 8px;
21
21
  }
22
- .chart__tooltip_1yufa {
22
+ .chart__tooltip_mopo0 {
23
23
  background-color: var(--color-light-bg-primary);
24
24
  border: 1px solid var(--color-light-border-primary);
25
25
  box-shadow: var(--shadow-l);
@@ -28,17 +28,17 @@
28
28
  pointer-events: none;
29
29
  position: relative;
30
30
  }
31
- .chart__tooltipList_1yufa {
31
+ .chart__tooltipList_mopo0 {
32
32
  position: relative;
33
33
  z-index: 5;
34
34
  list-style-type: none;
35
35
  padding: 0;
36
36
  margin: 0;
37
37
  }
38
- .chart__tooltipItem_1yufa {
38
+ .chart__tooltipItem_mopo0 {
39
39
  margin-bottom: 10px;
40
40
  }
41
- .chart__tooltipArrow_1yufa {
41
+ .chart__tooltipArrow_mopo0 {
42
42
  position: absolute;
43
43
  left: 0;
44
44
  top: 50%;
@@ -48,7 +48,7 @@
48
48
  border: 1px solid var(--color-light-border-primary);
49
49
  background-color: var(--color-light-bg-primary);
50
50
  }
51
- .chart__tooltipArrow_1yufa:before {
51
+ .chart__tooltipArrow_mopo0:before {
52
52
  content: '';
53
53
  position: absolute;
54
54
  left: -2px;
@@ -59,7 +59,7 @@
59
59
  border-width: 0 24px 24px 0;
60
60
  border-color: transparent var(--color-light-bg-primary) transparent transparent;
61
61
  }
62
- .chart__tooltipArrowRight_1yufa {
62
+ .chart__tooltipArrowRight_mopo0 {
63
63
  left: 100%;
64
64
  transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
65
65
  }
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
13
13
 
14
- var styles = {"tooltip":"chart__tooltip_1yufa","tooltipList":"chart__tooltipList_1yufa","tooltipItem":"chart__tooltipItem_1yufa","tooltipArrow":"chart__tooltipArrow_1yufa","tooltipArrowRight":"chart__tooltipArrowRight_1yufa"};
14
+ var styles = {"tooltip":"chart__tooltip_mopo0","tooltipList":"chart__tooltipList_mopo0","tooltipItem":"chart__tooltipItem_mopo0","tooltipArrow":"chart__tooltipArrow_mopo0","tooltipArrowRight":"chart__tooltipArrowRight_mopo0"};
15
15
  require('./index.css')
16
16
 
17
17
  var TooltipContent = function (_a) {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { LinearGradientProps } from "../types/utils/gradient.types";
4
- declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
4
+ declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
5
5
  export { LinearGradient };
@@ -4,5 +4,5 @@ type Props = {
4
4
  fill?: string;
5
5
  height?: number;
6
6
  };
7
- declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
7
+ declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
8
8
  export { CircleLineIcon };
package/esm/Component.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from './tslib.es6-7bb24d27.js';
1
+ import { _ as __assign } from './tslib.es6-be87f385.js';
2
2
  import React, { useState, useRef, useMemo, useCallback, useEffect } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { Legend, CartesianGrid, XAxis, YAxis, Brush, Tooltip, Area, Line, Bar, LabelList, Cell, ResponsiveContainer, ComposedChart } from 'recharts';
@@ -31,7 +31,7 @@ var CustomizedHOC = function (Component, options) {
31
31
  return NewComponent;
32
32
  };
33
33
 
34
- var styles = {"coreChart":"chart__coreChart_1qcsz","bar":"chart__bar_1qcsz","unfocused":"chart__unfocused_1qcsz"};
34
+ var styles = {"coreChart":"chart__coreChart_ekvmn","bar":"chart__bar_ekvmn","unfocused":"chart__unfocused_ekvmn"};
35
35
  require('./index.css')
36
36
 
37
37
  var Chart = function (props) {
@@ -1,19 +1,19 @@
1
- /* hash: suvnq */
2
- .chart__dotUnfocused_p05l7 {
1
+ /* hash: 1abiv */
2
+ .chart__dotUnfocused_1dk64 {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_p05l7,
7
- .chart__dotItem_p05l7,
8
- .chart__dotWrap_p05l7 {
6
+ .chart__dot_1dk64,
7
+ .chart__dotItem_1dk64,
8
+ .chart__dotWrap_1dk64 {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_p05l7 {
13
- animation: chart__showDot_p05l7 0.5s ease;
12
+ .chart__dot_1dk64 {
13
+ animation: chart__showDot_1dk64 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_p05l7 {
16
+ @keyframes chart__showDot_1dk64 {
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_p05l7","dot":"chart__dot_p05l7","dotItem":"chart__dotItem_p05l7","dotWrap":"chart__dotWrap_p05l7","showDot":"chart__showDot_p05l7"};
5
+ var styles = {"dotUnfocused":"chart__dotUnfocused_1dk64","dot":"chart__dot_1dk64","dotItem":"chart__dotItem_1dk64","dotWrap":"chart__dotWrap_1dk64","showDot":"chart__showDot_1dk64"};
6
6
  require('./index.css')
7
7
 
8
8
  var Dot = React.forwardRef(function (_a, ref) {
@@ -1,4 +1,4 @@
1
- /* hash: if6gq */
1
+ /* hash: 1yt44 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,31 +10,31 @@
10
10
  :root {
11
11
  --gap-2xl: 32px;
12
12
  }
13
- .chart__legendContent_1lvlx {
13
+ .chart__legendContent_14cll {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  flex-wrap: wrap;
17
17
  }
18
- .chart__legendWrap_1lvlx {
18
+ .chart__legendWrap_14cll {
19
19
  width: 100%;
20
20
  margin: 0;
21
21
  padding: 0;
22
22
  }
23
- .chart__legendItem_1lvlx {
23
+ .chart__legendItem_14cll {
24
24
  margin-right: var(--gap-2xl);
25
25
  cursor: pointer;
26
26
  display: inline-block;
27
27
  }
28
- .chart__legendItem_1lvlx:last-child {
28
+ .chart__legendItem_14cll:last-child {
29
29
  margin-right: 0;
30
30
  }
31
- .chart__legendUnactive_1lvlx {
31
+ .chart__legendUnactive_14cll {
32
32
  opacity: 0.3;
33
33
  }
34
- .chart__legendIcon_1lvlx {
34
+ .chart__legendIcon_14cll {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
37
  }
38
- .chart__legendValue_1lvlx {
38
+ .chart__legendValue_14cll {
39
39
  text-transform: capitalize;
40
40
  }
@@ -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_1lvlx","legendWrap":"chart__legendWrap_1lvlx","legendItem":"chart__legendItem_1lvlx","legendUnactive":"chart__legendUnactive_1lvlx","legendIcon":"chart__legendIcon_1lvlx","legendValue":"chart__legendValue_1lvlx"};
9
+ var styles = {"legendContent":"chart__legendContent_14cll","legendWrap":"chart__legendWrap_14cll","legendItem":"chart__legendItem_14cll","legendUnactive":"chart__legendUnactive_14cll","legendIcon":"chart__legendIcon_14cll","legendValue":"chart__legendValue_14cll"};
10
10
  require('./index.css')
11
11
 
12
12
  var icons = {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { LinearGradientProps } from "../types/utils/gradient.types";
4
- declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
4
+ declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
5
5
  export { LinearGradient };
@@ -1,4 +1,4 @@
1
- /* hash: qcj1f */
1
+ /* hash: 11445 */
2
2
  :root {
3
3
  --color-dark-bg-primary: #0b1f35;
4
4
  --color-light-text-primary: #0b1f35;
@@ -11,17 +11,17 @@
11
11
 
12
12
  /* Hard up */
13
13
  }
14
- .chart__tickText_1ujkf {
14
+ .chart__tickText_17o60 {
15
15
  fill: var(--color-light-text-primary);
16
16
  font-size: 16px;
17
17
  line-height: 24px;
18
18
  font-weight: 400;
19
19
  }
20
- .chart__circle_1ujkf {
20
+ .chart__circle_17o60 {
21
21
  opacity: 0.3;
22
22
  fill: var(--color-dark-bg-primary);
23
23
  }
24
- .chart__circle_1ujkf {
24
+ .chart__circle_17o60 {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
27
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- var styles = {"tickText":"chart__tickText_1ujkf","circle":"chart__circle_1ujkf"};
4
+ var styles = {"tickText":"chart__tickText_17o60","circle":"chart__circle_17o60"};
5
5
  require('./index.css')
6
6
 
7
7
  var Tick = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: oh8xl */
1
+ /* hash: ew6zk */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-border-primary: #dbdee1;
@@ -19,7 +19,7 @@
19
19
  :root {
20
20
  --border-radius-m: 8px;
21
21
  }
22
- .chart__tooltip_1yufa {
22
+ .chart__tooltip_mopo0 {
23
23
  background-color: var(--color-light-bg-primary);
24
24
  border: 1px solid var(--color-light-border-primary);
25
25
  box-shadow: var(--shadow-l);
@@ -28,17 +28,17 @@
28
28
  pointer-events: none;
29
29
  position: relative;
30
30
  }
31
- .chart__tooltipList_1yufa {
31
+ .chart__tooltipList_mopo0 {
32
32
  position: relative;
33
33
  z-index: 5;
34
34
  list-style-type: none;
35
35
  padding: 0;
36
36
  margin: 0;
37
37
  }
38
- .chart__tooltipItem_1yufa {
38
+ .chart__tooltipItem_mopo0 {
39
39
  margin-bottom: 10px;
40
40
  }
41
- .chart__tooltipArrow_1yufa {
41
+ .chart__tooltipArrow_mopo0 {
42
42
  position: absolute;
43
43
  left: 0;
44
44
  top: 50%;
@@ -48,7 +48,7 @@
48
48
  border: 1px solid var(--color-light-border-primary);
49
49
  background-color: var(--color-light-bg-primary);
50
50
  }
51
- .chart__tooltipArrow_1yufa:before {
51
+ .chart__tooltipArrow_mopo0:before {
52
52
  content: '';
53
53
  position: absolute;
54
54
  left: -2px;
@@ -59,7 +59,7 @@
59
59
  border-width: 0 24px 24px 0;
60
60
  border-color: transparent var(--color-light-bg-primary) transparent transparent;
61
61
  }
62
- .chart__tooltipArrowRight_1yufa {
62
+ .chart__tooltipArrowRight_mopo0 {
63
63
  left: 100%;
64
64
  transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
65
65
  }
@@ -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_1yufa","tooltipList":"chart__tooltipList_1yufa","tooltipItem":"chart__tooltipItem_1yufa","tooltipArrow":"chart__tooltipArrow_1yufa","tooltipArrowRight":"chart__tooltipArrowRight_1yufa"};
5
+ var styles = {"tooltip":"chart__tooltip_mopo0","tooltipList":"chart__tooltipList_mopo0","tooltipItem":"chart__tooltipItem_mopo0","tooltipArrow":"chart__tooltipArrow_mopo0","tooltipArrowRight":"chart__tooltipArrowRight_mopo0"};
6
6
  require('./index.css')
7
7
 
8
8
  var TooltipContent = function (_a) {
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from '../../tslib.es6-7bb24d27.js';
1
+ import { _ as __assign } from '../../tslib.es6-be87f385.js';
2
2
  import { useState, useEffect } from 'react';
3
3
  import { setComposedChartsMargin } from './utils/setComposedChartsMargin.js';
4
4
  import { setDatas } from './utils/setDatas.js';
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from '../../../tslib.es6-7bb24d27.js';
1
+ import { _ as __assign } from '../../../tslib.es6-be87f385.js';
2
2
 
3
3
  var setDatas = function (series, labels) {
4
4
  var initData = [];
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from '../../../tslib.es6-7bb24d27.js';
1
+ import { _ as __assign } from '../../../tslib.es6-be87f385.js';
2
2
 
3
3
  var setGradientCharts = function (series) {
4
4
  var filterSeries = series.filter(function (item) { return item.chart !== 'gradient'; });
@@ -4,5 +4,5 @@ type Props = {
4
4
  fill?: string;
5
5
  height?: number;
6
6
  };
7
- declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
7
+ declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
8
8
  export { CircleLineIcon };
package/esm/index.css CHANGED
@@ -1,4 +1,7 @@
1
- /* hash: sf02k */
1
+ /* hash: aycum */
2
+ :root {
3
+ --color-light-text-primary: #0b1f35;
4
+ }
2
5
  :root {
3
6
 
4
7
  /* Hard */
@@ -7,9 +10,17 @@
7
10
 
8
11
  /* Hard up */
9
12
  }
10
- .chart__bar_1qcsz {
13
+ .chart__coreChart_ekvmn .recharts-line path {
14
+ transition: d 0.2s ease-out;
15
+ }
16
+ .chart__coreChart_ekvmn .recharts-text tspan {
17
+ fill: var(--color-light-text-primary);
18
+ font-size: 16px;
19
+ line-height: 22px;
20
+ }
21
+ .chart__bar_ekvmn {
11
22
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
12
23
  }
13
- .chart__unfocused_1qcsz {
24
+ .chart__unfocused_ekvmn {
14
25
  opacity: 0.3;
15
26
  }
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './tslib.es6-7bb24d27.js';
1
+ import './tslib.es6-be87f385.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'recharts';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../../tslib.es6-2bd17630.js');
5
+ var tslib_es6 = require('../../tslib.es6-7cc61387.js');
6
6
  var React = require('react');
7
7
  var hooks_useSettings_utils_setComposedChartsMargin = require('./utils/setComposedChartsMargin.js');
8
8
  var hooks_useSettings_utils_setDatas = require('./utils/setDatas.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../../../tslib.es6-2bd17630.js');
5
+ var tslib_es6 = require('../../../tslib.es6-7cc61387.js');
6
6
 
7
7
  var setDatas = function (series, labels) {
8
8
  var initData = [];
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../../../tslib.es6-2bd17630.js');
5
+ var tslib_es6 = require('../../../tslib.es6-7cc61387.js');
6
6
 
7
7
  var setGradientCharts = function (series) {
8
8
  var filterSeries = series.filter(function (item) { return item.chart !== 'gradient'; });
@@ -4,5 +4,5 @@ type Props = {
4
4
  fill?: string;
5
5
  height?: number;
6
6
  };
7
- declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
7
+ declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
8
8
  export { CircleLineIcon };
package/index.css CHANGED
@@ -1,4 +1,7 @@
1
- /* hash: sf02k */
1
+ /* hash: aycum */
2
+ :root {
3
+ --color-light-text-primary: #0b1f35;
4
+ }
2
5
  :root {
3
6
 
4
7
  /* Hard */
@@ -7,9 +10,17 @@
7
10
 
8
11
  /* Hard up */
9
12
  }
10
- .chart__bar_1qcsz {
13
+ .chart__coreChart_ekvmn .recharts-line path {
14
+ transition: d 0.2s ease-out;
15
+ }
16
+ .chart__coreChart_ekvmn .recharts-text tspan {
17
+ fill: var(--color-light-text-primary);
18
+ font-size: 16px;
19
+ line-height: 22px;
20
+ }
21
+ .chart__bar_ekvmn {
11
22
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
12
23
  }
13
- .chart__unfocused_1qcsz {
24
+ .chart__unfocused_ekvmn {
14
25
  opacity: 0.3;
15
26
  }
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./tslib.es6-2bd17630.js');
5
+ require('./tslib.es6-7cc61387.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('recharts');
@@ -30,7 +30,7 @@ const CustomizedHOC = (Component, options) => {
30
30
  return NewComponent;
31
31
  };
32
32
 
33
- var styles = {"coreChart":"chart__coreChart_1qcsz","bar":"chart__bar_1qcsz","unfocused":"chart__unfocused_1qcsz"};
33
+ var styles = {"coreChart":"chart__coreChart_ekvmn","bar":"chart__bar_ekvmn","unfocused":"chart__unfocused_ekvmn"};
34
34
  require('./index.css')
35
35
 
36
36
  const Chart = (props) => {
@@ -1,19 +1,19 @@
1
- /* hash: suvnq */
2
- .chart__dotUnfocused_p05l7 {
1
+ /* hash: 1abiv */
2
+ .chart__dotUnfocused_1dk64 {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_p05l7,
7
- .chart__dotItem_p05l7,
8
- .chart__dotWrap_p05l7 {
6
+ .chart__dot_1dk64,
7
+ .chart__dotItem_1dk64,
8
+ .chart__dotWrap_1dk64 {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_p05l7 {
13
- animation: chart__showDot_p05l7 0.5s ease;
12
+ .chart__dot_1dk64 {
13
+ animation: chart__showDot_1dk64 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_p05l7 {
16
+ @keyframes chart__showDot_1dk64 {
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_p05l7","dot":"chart__dot_p05l7","dotItem":"chart__dotItem_p05l7","dotWrap":"chart__dotWrap_p05l7","showDot":"chart__showDot_p05l7"};
5
+ var styles = {"dotUnfocused":"chart__dotUnfocused_1dk64","dot":"chart__dot_1dk64","dotItem":"chart__dotItem_1dk64","dotWrap":"chart__dotWrap_1dk64","showDot":"chart__showDot_1dk64"};
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: if6gq */
1
+ /* hash: 1yt44 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,31 +10,31 @@
10
10
  :root {
11
11
  --gap-2xl: 32px;
12
12
  }
13
- .chart__legendContent_1lvlx {
13
+ .chart__legendContent_14cll {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  flex-wrap: wrap;
17
17
  }
18
- .chart__legendWrap_1lvlx {
18
+ .chart__legendWrap_14cll {
19
19
  width: 100%;
20
20
  margin: 0;
21
21
  padding: 0;
22
22
  }
23
- .chart__legendItem_1lvlx {
23
+ .chart__legendItem_14cll {
24
24
  margin-right: var(--gap-2xl);
25
25
  cursor: pointer;
26
26
  display: inline-block;
27
27
  }
28
- .chart__legendItem_1lvlx:last-child {
28
+ .chart__legendItem_14cll:last-child {
29
29
  margin-right: 0;
30
30
  }
31
- .chart__legendUnactive_1lvlx {
31
+ .chart__legendUnactive_14cll {
32
32
  opacity: 0.3;
33
33
  }
34
- .chart__legendIcon_1lvlx {
34
+ .chart__legendIcon_14cll {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
37
  }
38
- .chart__legendValue_1lvlx {
38
+ .chart__legendValue_14cll {
39
39
  text-transform: capitalize;
40
40
  }
@@ -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_1lvlx","legendWrap":"chart__legendWrap_1lvlx","legendItem":"chart__legendItem_1lvlx","legendUnactive":"chart__legendUnactive_1lvlx","legendIcon":"chart__legendIcon_1lvlx","legendValue":"chart__legendValue_1lvlx"};
9
+ var styles = {"legendContent":"chart__legendContent_14cll","legendWrap":"chart__legendWrap_14cll","legendItem":"chart__legendItem_14cll","legendUnactive":"chart__legendUnactive_14cll","legendIcon":"chart__legendIcon_14cll","legendValue":"chart__legendValue_14cll"};
10
10
  require('./index.css')
11
11
 
12
12
  const icons = {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { LinearGradientProps } from "../types/utils/gradient.types";
4
- declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
4
+ declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
5
5
  export { LinearGradient };
@@ -1,4 +1,4 @@
1
- /* hash: qcj1f */
1
+ /* hash: 11445 */
2
2
  :root {
3
3
  --color-dark-bg-primary: #0b1f35;
4
4
  --color-light-text-primary: #0b1f35;
@@ -11,17 +11,17 @@
11
11
 
12
12
  /* Hard up */
13
13
  }
14
- .chart__tickText_1ujkf {
14
+ .chart__tickText_17o60 {
15
15
  fill: var(--color-light-text-primary);
16
16
  font-size: 16px;
17
17
  line-height: 24px;
18
18
  font-weight: 400;
19
19
  }
20
- .chart__circle_1ujkf {
20
+ .chart__circle_17o60 {
21
21
  opacity: 0.3;
22
22
  fill: var(--color-dark-bg-primary);
23
23
  }
24
- .chart__circle_1ujkf {
24
+ .chart__circle_17o60 {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
27
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- var styles = {"tickText":"chart__tickText_1ujkf","circle":"chart__circle_1ujkf"};
4
+ var styles = {"tickText":"chart__tickText_17o60","circle":"chart__circle_17o60"};
5
5
  require('./index.css')
6
6
 
7
7
  const Tick = ({ y, payload, tickFormatter, xAxis }) => {
@@ -1,4 +1,4 @@
1
- /* hash: oh8xl */
1
+ /* hash: ew6zk */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-border-primary: #dbdee1;
@@ -19,7 +19,7 @@
19
19
  :root {
20
20
  --border-radius-m: 8px;
21
21
  }
22
- .chart__tooltip_1yufa {
22
+ .chart__tooltip_mopo0 {
23
23
  background-color: var(--color-light-bg-primary);
24
24
  border: 1px solid var(--color-light-border-primary);
25
25
  box-shadow: var(--shadow-l);
@@ -28,17 +28,17 @@
28
28
  pointer-events: none;
29
29
  position: relative;
30
30
  }
31
- .chart__tooltipList_1yufa {
31
+ .chart__tooltipList_mopo0 {
32
32
  position: relative;
33
33
  z-index: 5;
34
34
  list-style-type: none;
35
35
  padding: 0;
36
36
  margin: 0;
37
37
  }
38
- .chart__tooltipItem_1yufa {
38
+ .chart__tooltipItem_mopo0 {
39
39
  margin-bottom: 10px;
40
40
  }
41
- .chart__tooltipArrow_1yufa {
41
+ .chart__tooltipArrow_mopo0 {
42
42
  position: absolute;
43
43
  left: 0;
44
44
  top: 50%;
@@ -48,7 +48,7 @@
48
48
  border: 1px solid var(--color-light-border-primary);
49
49
  background-color: var(--color-light-bg-primary);
50
50
  }
51
- .chart__tooltipArrow_1yufa:before {
51
+ .chart__tooltipArrow_mopo0:before {
52
52
  content: '';
53
53
  position: absolute;
54
54
  left: -2px;
@@ -59,7 +59,7 @@
59
59
  border-width: 0 24px 24px 0;
60
60
  border-color: transparent var(--color-light-bg-primary) transparent transparent;
61
61
  }
62
- .chart__tooltipArrowRight_1yufa {
62
+ .chart__tooltipArrowRight_mopo0 {
63
63
  left: 100%;
64
64
  transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
65
65
  }
@@ -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
- var styles = {"tooltip":"chart__tooltip_1yufa","tooltipList":"chart__tooltipList_1yufa","tooltipItem":"chart__tooltipItem_1yufa","tooltipArrow":"chart__tooltipArrow_1yufa","tooltipArrowRight":"chart__tooltipArrowRight_1yufa"};
5
+ var styles = {"tooltip":"chart__tooltip_mopo0","tooltipList":"chart__tooltipList_mopo0","tooltipItem":"chart__tooltipItem_mopo0","tooltipArrow":"chart__tooltipArrow_mopo0","tooltipArrowRight":"chart__tooltipArrowRight_mopo0"};
6
6
  require('./index.css')
7
7
 
8
8
  const TooltipContent = ({ payload, separator, label, tooltipArrowSide, arrow, series, labelFormatter, labelStyle, }) => {
@@ -4,5 +4,5 @@ type Props = {
4
4
  fill?: string;
5
5
  height?: number;
6
6
  };
7
- declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
7
+ declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>;
8
8
  export { CircleLineIcon };
package/modern/index.css CHANGED
@@ -1,4 +1,7 @@
1
- /* hash: sf02k */
1
+ /* hash: aycum */
2
+ :root {
3
+ --color-light-text-primary: #0b1f35;
4
+ }
2
5
  :root {
3
6
 
4
7
  /* Hard */
@@ -7,9 +10,17 @@
7
10
 
8
11
  /* Hard up */
9
12
  }
10
- .chart__bar_1qcsz {
13
+ .chart__coreChart_ekvmn .recharts-line path {
14
+ transition: d 0.2s ease-out;
15
+ }
16
+ .chart__coreChart_ekvmn .recharts-text tspan {
17
+ fill: var(--color-light-text-primary);
18
+ font-size: 16px;
19
+ line-height: 22px;
20
+ }
21
+ .chart__bar_ekvmn {
11
22
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
12
23
  }
13
- .chart__unfocused_1qcsz {
24
+ .chart__unfocused_ekvmn {
14
25
  opacity: 0.3;
15
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-chart",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "description": "Chart component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -13,14 +13,14 @@
13
13
  "directory": "dist"
14
14
  },
15
15
  "dependencies": {
16
- "@alfalab/core-components-typography": "^2.6.3",
17
- "classnames": "^2.2.6",
16
+ "@alfalab/core-components-typography": "^2.7.0",
17
+ "classnames": "^2.3.1",
18
18
  "recharts": "^2.1.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/react-transition-group": "^4.2.4"
22
22
  },
23
23
  "peerDependencies": {
24
- "react": "^16.9.0 || ^17.0.1"
24
+ "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
25
25
  }
26
26
  }