@alfalab/core-components-chart 1.2.0 → 2.0.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 (79) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/Component.d.ts +2 -3
  3. package/dist/Component.js +6 -5
  4. package/dist/components/Dot/index.css +8 -8
  5. package/dist/components/Dot/index.js +1 -1
  6. package/dist/components/Legends/index.css +8 -8
  7. package/dist/components/Legends/index.js +1 -1
  8. package/dist/components/RectBar.d.ts +2 -3
  9. package/dist/components/RectBar.js +3 -2
  10. package/dist/components/Tick/index.css +4 -4
  11. package/dist/components/Tick/index.js +1 -1
  12. package/dist/components/TooltipContent/index.css +7 -7
  13. package/dist/components/TooltipContent/index.js +1 -1
  14. package/dist/cssm/Component.d.ts +2 -3
  15. package/dist/cssm/Component.js +4 -3
  16. package/dist/cssm/components/RectBar.d.ts +2 -3
  17. package/dist/cssm/components/RectBar.js +3 -2
  18. package/dist/cssm/index.d.ts +1 -0
  19. package/dist/cssm/index.js +6 -1
  20. package/dist/cssm/types/index.d.ts +14 -0
  21. package/dist/cssm/types/index.js +2 -0
  22. package/dist/cssm/types/utils/index.d.ts +6 -0
  23. package/dist/cssm/types/utils/index.js +2 -0
  24. package/dist/esm/Component.d.ts +2 -3
  25. package/dist/esm/Component.js +4 -5
  26. package/dist/esm/components/Dot/index.css +8 -8
  27. package/dist/esm/components/Dot/index.js +1 -1
  28. package/dist/esm/components/Legends/index.css +8 -8
  29. package/dist/esm/components/Legends/index.js +1 -1
  30. package/dist/esm/components/RectBar.d.ts +2 -3
  31. package/dist/esm/components/RectBar.js +1 -2
  32. package/dist/esm/components/Tick/index.css +4 -4
  33. package/dist/esm/components/Tick/index.js +1 -1
  34. package/dist/esm/components/TooltipContent/index.css +7 -7
  35. package/dist/esm/components/TooltipContent/index.js +1 -1
  36. package/dist/esm/hooks/useSettings/index.js +1 -1
  37. package/dist/esm/hooks/useSettings/utils/setDatas.js +1 -1
  38. package/dist/esm/hooks/useSettings/utils/setGradientCharts.js +1 -1
  39. package/dist/esm/index.css +3 -3
  40. package/dist/esm/index.d.ts +1 -0
  41. package/dist/esm/index.js +2 -2
  42. package/dist/esm/{tslib.es6-606922e2.d.ts → tslib.es6-6de29960.d.ts} +0 -0
  43. package/dist/esm/{tslib.es6-606922e2.js → tslib.es6-6de29960.js} +0 -0
  44. package/dist/esm/types/index.d.ts +14 -0
  45. package/dist/esm/types/index.js +1 -0
  46. package/dist/esm/types/utils/index.d.ts +6 -0
  47. package/dist/esm/types/utils/index.js +1 -0
  48. package/dist/hooks/useSettings/index.js +1 -1
  49. package/dist/hooks/useSettings/utils/setDatas.js +1 -1
  50. package/dist/hooks/useSettings/utils/setGradientCharts.js +1 -1
  51. package/dist/index.css +3 -3
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.js +7 -2
  54. package/dist/modern/Component.d.ts +2 -3
  55. package/dist/modern/Component.js +3 -4
  56. package/dist/modern/components/Dot/index.css +8 -8
  57. package/dist/modern/components/Dot/index.js +1 -1
  58. package/dist/modern/components/Legends/index.css +8 -8
  59. package/dist/modern/components/Legends/index.js +1 -1
  60. package/dist/modern/components/RectBar.d.ts +2 -3
  61. package/dist/modern/components/RectBar.js +1 -2
  62. package/dist/modern/components/Tick/index.css +4 -4
  63. package/dist/modern/components/Tick/index.js +1 -1
  64. package/dist/modern/components/TooltipContent/index.css +7 -7
  65. package/dist/modern/components/TooltipContent/index.js +1 -1
  66. package/dist/modern/index.css +3 -3
  67. package/dist/modern/index.d.ts +1 -0
  68. package/dist/modern/index.js +1 -1
  69. package/dist/modern/types/index.d.ts +14 -0
  70. package/dist/modern/types/index.js +1 -0
  71. package/dist/modern/types/utils/index.d.ts +6 -0
  72. package/dist/modern/types/utils/index.js +1 -0
  73. package/dist/{tslib.es6-3d19766a.d.ts → tslib.es6-c72c948d.d.ts} +0 -0
  74. package/dist/{tslib.es6-3d19766a.js → tslib.es6-c72c948d.js} +0 -0
  75. package/dist/types/index.d.ts +14 -0
  76. package/dist/types/index.js +2 -0
  77. package/dist/types/utils/index.d.ts +6 -0
  78. package/dist/types/utils/index.js +2 -0
  79. package/package.json +3 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,86 @@
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.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-chart@1.2.2...@alfalab/core-components-chart@2.0.0) (2022-03-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * Исправить импорты в сторях. ([#998](https://github.com/alfa-laboratory/core-components/issues/998)) ([e6a654a](https://github.com/alfa-laboratory/core-components/commit/e6a654a0599451c7d149484cb61d8067eed083b7))
12
+
13
+
14
+ * refactor/calendar-range (#984) ([714f615](https://github.com/alfa-laboratory/core-components/commit/714f61590586bafe1060e652943e95c133ed002a)), closes [#984](https://github.com/alfa-laboratory/core-components/issues/984)
15
+
16
+
17
+ ### BREAKING CHANGES
18
+
19
+ * Большое обновление CalendarRange
20
+
21
+ * feat(date-input): add some improvements
22
+
23
+ * feat(date-input): some updates
24
+
25
+ * feat(date-input): validation
26
+
27
+ * feat(calendar): change period selection logic
28
+
29
+ * fix(calendar): range styles
30
+
31
+ * fix(calendar): fix styles, add rangeComplete flag
32
+
33
+ * refactor(calendar-range): temporary
34
+
35
+ * fix(calendar-range): fix hook
36
+
37
+ * fix(calendar-range): fix period
38
+
39
+ * fix(calendar-range): fix tests, fix max date
40
+
41
+ * fix: update exports
42
+
43
+ * feat(calendar): allow empty values for PeriodSlider, update today
44
+
45
+ * fix(calendar-range): hide error icon
46
+
47
+ * chore(calendar-range): demo
48
+
49
+ * feat(calendar): use IconButton
50
+
51
+ * feat(calendar-range): add onChange, update demo
52
+
53
+ * fix(calendar-range): update width
54
+
55
+ * test(calendar-range): update snapshot
56
+
57
+ * fix: import date-fns separately
58
+
59
+ * fix(calendar-range): fix rest props
60
+
61
+ Co-authored-by: dmitrsavk <dmitrsavk@yandex.ru>
62
+
63
+
64
+
65
+
66
+
67
+ ## [1.2.2](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-chart@1.2.1...@alfalab/core-components-chart@1.2.2) (2022-01-17)
68
+
69
+ **Note:** Version bump only for package @alfalab/core-components-chart
70
+
71
+
72
+
73
+
74
+
75
+ ## [1.2.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-chart@1.2.0...@alfalab/core-components-chart@1.2.1) (2021-10-19)
76
+
77
+
78
+ ### Bug Fixes
79
+
80
+ * **chart:** fix deps, export types ([b46450a](https://github.com/alfa-laboratory/core-components/commit/b46450ae954b10f0138c393482fe1271b001f085))
81
+
82
+
83
+
84
+
85
+
6
86
  # [1.2.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-chart@1.1.0...@alfalab/core-components-chart@1.2.0) (2021-10-11)
7
87
 
8
88
 
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
3
2
  import { OptionsProps } from "./types/options.types";
4
- declare const _default: React.MemoExoticComponent<(props: OptionsProps) => JSX.Element | null>;
5
- export { _default as default };
3
+ declare const Chart: (props: OptionsProps) => JSX.Element | null;
4
+ export { Chart };
package/dist/Component.js CHANGED
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('./tslib.es6-3d19766a.js');
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib_es6 = require('./tslib.es6-c72c948d.js');
4
6
  var React = require('react');
5
7
  var cn = require('classnames');
6
8
  var recharts = require('recharts');
@@ -38,7 +40,7 @@ var CustomizedHOC = function (Component, options) {
38
40
  return NewComponent;
39
41
  };
40
42
 
41
- var styles = {"coreChart":"chart__coreChart_1btmk","bar":"chart__bar_1btmk","unfocused":"chart__unfocused_1btmk"};
43
+ var styles = {"coreChart":"chart__coreChart_4ogl7","bar":"chart__bar_4ogl7","unfocused":"chart__unfocused_4ogl7"};
42
44
  require('./index.css')
43
45
 
44
46
  var Chart = function (props) {
@@ -160,7 +162,7 @@ var Chart = function (props) {
160
162
  var show = charts["" + properties.dataKey];
161
163
  switch (chart) {
162
164
  case 'bar':
163
- return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React__default['default'].createElement(recharts.Bar, tslib_es6.__assign({ key: state.id + "-" + properties.dataKey }, properties, { shape: React__default['default'].createElement(components_RectBar, { radius: radius }) }),
165
+ return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React__default['default'].createElement(recharts.Bar, tslib_es6.__assign({ key: state.id + "-" + properties.dataKey }, properties, { shape: React__default['default'].createElement(components_RectBar.RectBar, { radius: radius }) }),
164
166
  labelList && (React__default['default'].createElement(recharts.LabelList, tslib_es6.__assign({ dataKey: properties.dataKey.toString() }, labelList, { content: React__default['default'].createElement(components_CustomizedLabel.CustomizedLabel, { radius: radius }) }))),
165
167
  data.map(function (_, index) {
166
168
  var key = state.id + "-" + properties.dataKey + "-" + index;
@@ -276,6 +278,5 @@ var Chart = function (props) {
276
278
  state.brush && renderBrush,
277
279
  state.legend && renderLegend))));
278
280
  };
279
- var Component = React__default['default'].memo(Chart);
280
281
 
281
- module.exports = Component;
282
+ exports.Chart = Chart;
@@ -1,19 +1,19 @@
1
- /* hash: 9g95g */
2
- .chart__dotUnfocused_9g95g {
1
+ /* hash: 11tnr */
2
+ .chart__dotUnfocused_13nr2 {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_9g95g,
7
- .chart__dotItem_9g95g,
8
- .chart__dotWrap_9g95g {
6
+ .chart__dot_13nr2,
7
+ .chart__dotItem_13nr2,
8
+ .chart__dotWrap_13nr2 {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_9g95g {
13
- animation: chart__showDot_9g95g 0.5s ease;
12
+ .chart__dot_13nr2 {
13
+ animation: chart__showDot_13nr2 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_9g95g {
16
+ @keyframes chart__showDot_13nr2 {
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_9g95g","dot":"chart__dot_9g95g","dotItem":"chart__dotItem_9g95g","dotWrap":"chart__dotWrap_9g95g","showDot":"chart__showDot_9g95g"};
14
+ var styles = {"dotUnfocused":"chart__dotUnfocused_13nr2","dot":"chart__dot_13nr2","dotItem":"chart__dotItem_13nr2","dotWrap":"chart__dotWrap_13nr2","showDot":"chart__showDot_13nr2"};
15
15
  require('./index.css')
16
16
 
17
17
  var Dot = React__default['default'].forwardRef(function (_a, ref) {
@@ -1,4 +1,4 @@
1
- /* hash: v8ezw */
1
+ /* hash: 1hoci */
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_v8ezw {
13
+ .chart__legendContent_1e90m {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  flex-wrap: wrap;
17
17
  }
18
- .chart__legendWrap_v8ezw {
18
+ .chart__legendWrap_1e90m {
19
19
  width: 100%;
20
20
  margin: 0;
21
21
  padding: 0;
22
22
  }
23
- .chart__legendItem_v8ezw {
23
+ .chart__legendItem_1e90m {
24
24
  margin-right: var(--gap-2xl);
25
25
  cursor: pointer;
26
26
  display: inline-block;
27
27
  }
28
- .chart__legendItem_v8ezw:last-child {
28
+ .chart__legendItem_1e90m:last-child {
29
29
  margin-right: 0;
30
30
  }
31
- .chart__legendUnactive_v8ezw {
31
+ .chart__legendUnactive_1e90m {
32
32
  opacity: 0.3;
33
33
  }
34
- .chart__legendIcon_v8ezw {
34
+ .chart__legendIcon_1e90m {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
37
  }
38
- .chart__legendValue_v8ezw {
38
+ .chart__legendValue_1e90m {
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_v8ezw","legendWrap":"chart__legendWrap_v8ezw","legendItem":"chart__legendItem_v8ezw","legendUnactive":"chart__legendUnactive_v8ezw","legendIcon":"chart__legendIcon_v8ezw","legendValue":"chart__legendValue_v8ezw"};
18
+ var styles = {"legendContent":"chart__legendContent_1e90m","legendWrap":"chart__legendWrap_1e90m","legendItem":"chart__legendItem_1e90m","legendUnactive":"chart__legendUnactive_1e90m","legendIcon":"chart__legendIcon_1e90m","legendValue":"chart__legendValue_1e90m"};
19
19
  require('./index.css')
20
20
 
21
21
  var icons = {
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
3
- declare const _default: React.MemoExoticComponent<({ fill, x, y, width, height, radius, background }: any) => JSX.Element>;
4
- export { _default as default };
2
+ declare const RectBar: ({ fill, x, y, width, height, radius, background }: any) => JSX.Element;
3
+ export { RectBar };
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var React = require('react');
4
6
  require('../hooks/usePathBar/utils/getRadius.js');
5
7
  var hooks_usePathBar_index = require('../hooks/usePathBar/index.js');
@@ -27,6 +29,5 @@ var RectBar = function (_a) {
27
29
  var path = React.useMemo(function () { return (React__default['default'].createElement("path", { d: getPath(x, width, height, initHeight, topRadius, bottomRadius, initY), stroke: 'none', fill: fill })); }, [x, width, height, initHeight, topRadius, bottomRadius, initY, fill]);
28
30
  return React__default['default'].createElement(React__default['default'].Fragment, null, path);
29
31
  };
30
- var RectBar$1 = React__default['default'].memo(RectBar);
31
32
 
32
- module.exports = RectBar$1;
33
+ exports.RectBar = RectBar;
@@ -1,4 +1,4 @@
1
- /* hash: 1cwrr */
1
+ /* hash: 1umff */
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_1cwrr {
14
+ .chart__tickText_sxzxj {
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_1cwrr {
20
+ .chart__circle_sxzxj {
21
21
  opacity: 0.3;
22
22
  fill: var(--color-dark-bg-primary);
23
23
  }
24
- .chart__circle_1cwrr {
24
+ .chart__circle_sxzxj {
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_1cwrr","circle":"chart__circle_1cwrr"};
13
+ var styles = {"tickText":"chart__tickText_sxzxj","circle":"chart__circle_sxzxj"};
14
14
  require('./index.css')
15
15
 
16
16
  var Tick = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 8ie71 */
1
+ /* hash: 1ie0c */
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_8ie71 {
22
+ .chart__tooltip_csamk {
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_8ie71 {
31
+ .chart__tooltipList_csamk {
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_8ie71 {
38
+ .chart__tooltipItem_csamk {
39
39
  margin-bottom: 10px;
40
40
  }
41
- .chart__tooltipArrow_8ie71 {
41
+ .chart__tooltipArrow_csamk {
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_8ie71:before {
51
+ .chart__tooltipArrow_csamk: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_8ie71 {
62
+ .chart__tooltipArrowRight_csamk {
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_8ie71","tooltipList":"chart__tooltipList_8ie71","tooltipItem":"chart__tooltipItem_8ie71","tooltipArrow":"chart__tooltipArrow_8ie71","tooltipArrowRight":"chart__tooltipArrowRight_8ie71"};
14
+ var styles = {"tooltip":"chart__tooltip_csamk","tooltipList":"chart__tooltipList_csamk","tooltipItem":"chart__tooltipItem_csamk","tooltipArrow":"chart__tooltipArrow_csamk","tooltipArrowRight":"chart__tooltipArrowRight_csamk"};
15
15
  require('./index.css')
16
16
 
17
17
  var TooltipContent = function (_a) {
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
3
2
  import { OptionsProps } from "./types/options.types";
4
- declare const _default: React.MemoExoticComponent<(props: OptionsProps) => JSX.Element | null>;
5
- export { _default as default };
3
+ declare const Chart: (props: OptionsProps) => JSX.Element | null;
4
+ export { Chart };
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('./tslib.es6-2be2aee7.js');
4
6
  var React = require('react');
5
7
  var cn = require('classnames');
@@ -163,7 +165,7 @@ var Chart = function (props) {
163
165
  var show = charts["" + properties.dataKey];
164
166
  switch (chart) {
165
167
  case 'bar':
166
- return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React__default['default'].createElement(recharts.Bar, tslib_es6.__assign({ key: state.id + "-" + properties.dataKey }, properties, { shape: React__default['default'].createElement(components_RectBar, { radius: radius }) }),
168
+ return show && !(item === null || item === void 0 ? void 0 : item.hide) ? (React__default['default'].createElement(recharts.Bar, tslib_es6.__assign({ key: state.id + "-" + properties.dataKey }, properties, { shape: React__default['default'].createElement(components_RectBar.RectBar, { radius: radius }) }),
167
169
  labelList && (React__default['default'].createElement(recharts.LabelList, tslib_es6.__assign({ dataKey: properties.dataKey.toString() }, labelList, { content: React__default['default'].createElement(components_CustomizedLabel.CustomizedLabel, { radius: radius }) }))),
168
170
  data.map(function (_, index) {
169
171
  var key = state.id + "-" + properties.dataKey + "-" + index;
@@ -279,6 +281,5 @@ var Chart = function (props) {
279
281
  state.brush && renderBrush,
280
282
  state.legend && renderLegend))));
281
283
  };
282
- var Component = React__default['default'].memo(Chart);
283
284
 
284
- module.exports = Component;
285
+ exports.Chart = Chart;
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
3
- declare const _default: React.MemoExoticComponent<({ fill, x, y, width, height, radius, background }: any) => JSX.Element>;
4
- export { _default as default };
2
+ declare const RectBar: ({ fill, x, y, width, height, radius, background }: any) => JSX.Element;
3
+ export { RectBar };
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var React = require('react');
4
6
  require('../hooks/usePathBar/utils/getRadius.js');
5
7
  var hooks_usePathBar_index = require('../hooks/usePathBar/index.js');
@@ -27,6 +29,5 @@ var RectBar = function (_a) {
27
29
  var path = React.useMemo(function () { return (React__default['default'].createElement("path", { d: getPath(x, width, height, initHeight, topRadius, bottomRadius, initY), stroke: 'none', fill: fill })); }, [x, width, height, initHeight, topRadius, bottomRadius, initY, fill]);
28
30
  return React__default['default'].createElement(React__default['default'].Fragment, null, path);
29
31
  };
30
- var RectBar$1 = React__default['default'].memo(RectBar);
31
32
 
32
- module.exports = RectBar$1;
33
+ exports.RectBar = RectBar;
@@ -1 +1,2 @@
1
1
  export * from "./Component";
2
+ export * from "./types/index";
@@ -1,10 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  require('./tslib.es6-2be2aee7.js');
4
6
  require('react');
5
7
  require('classnames');
6
8
  require('recharts');
7
- require('./Component.js');
9
+ var Component = require('./Component.js');
8
10
  require('./components/LinearGradient.js');
9
11
  require('@alfalab/core-components-typography/dist/cssm');
10
12
  require('./icons/Circle.js');
@@ -32,3 +34,6 @@ require('./components/TooltipContent/index.module.css');
32
34
  require('./components/TooltipContent/index.js');
33
35
  require('./index.module.css');
34
36
 
37
+
38
+
39
+ exports.Chart = Component.Chart;
@@ -0,0 +1,14 @@
1
+ export * from "./utils/index";
2
+ export * from "./brush.types";
3
+ export * from "./cartesianGrid.types";
4
+ export * from "./chart.types";
5
+ export * from "./composedChart.types";
6
+ export * from "./labelList.types";
7
+ export * from "./legend.types";
8
+ export * from "./options.types";
9
+ export * from "./payload.types";
10
+ export * from "./responsiveContainer.types";
11
+ export * from "./seria.types";
12
+ export * from "./tooltip.types";
13
+ export * from "./xAxis.types";
14
+ export * from "./yAxis.types";
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,6 @@
1
+ export * from "./axis.types";
2
+ export * from "./coordinates.types";
3
+ export * from "./data.types";
4
+ export * from "./dot.types";
5
+ export * from "./gradient.types";
6
+ export * from "./tick.types";
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
3
2
  import { OptionsProps } from "./types/options.types";
4
- declare const _default: React.MemoExoticComponent<(props: OptionsProps) => JSX.Element | null>;
5
- export { _default as default };
3
+ declare const Chart: (props: OptionsProps) => JSX.Element | null;
4
+ export { Chart };
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from './tslib.es6-606922e2.js';
1
+ import { _ as __assign } from './tslib.es6-6de29960.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';
@@ -20,7 +20,7 @@ import { useSettings } from './hooks/useSettings/index.js';
20
20
  import './hooks/usePathBar/utils/getRadius.js';
21
21
  import './hooks/usePathBar/index.js';
22
22
  import { CustomizedLabel } from './components/CustomizedLabel.js';
23
- import RectBar from './components/RectBar.js';
23
+ import { RectBar } from './components/RectBar.js';
24
24
  import { Tick } from './components/Tick/index.js';
25
25
  import { TooltipContent } from './components/TooltipContent/index.js';
26
26
 
@@ -31,7 +31,7 @@ var CustomizedHOC = function (Component, options) {
31
31
  return NewComponent;
32
32
  };
33
33
 
34
- var styles = {"coreChart":"chart__coreChart_1btmk","bar":"chart__bar_1btmk","unfocused":"chart__unfocused_1btmk"};
34
+ var styles = {"coreChart":"chart__coreChart_4ogl7","bar":"chart__bar_4ogl7","unfocused":"chart__unfocused_4ogl7"};
35
35
  require('./index.css')
36
36
 
37
37
  var Chart = function (props) {
@@ -269,6 +269,5 @@ var Chart = function (props) {
269
269
  state.brush && renderBrush,
270
270
  state.legend && renderLegend))));
271
271
  };
272
- var Component = React.memo(Chart);
273
272
 
274
- export default Component;
273
+ export { Chart };
@@ -1,19 +1,19 @@
1
- /* hash: 9g95g */
2
- .chart__dotUnfocused_9g95g {
1
+ /* hash: 11tnr */
2
+ .chart__dotUnfocused_13nr2 {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_9g95g,
7
- .chart__dotItem_9g95g,
8
- .chart__dotWrap_9g95g {
6
+ .chart__dot_13nr2,
7
+ .chart__dotItem_13nr2,
8
+ .chart__dotWrap_13nr2 {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_9g95g {
13
- animation: chart__showDot_9g95g 0.5s ease;
12
+ .chart__dot_13nr2 {
13
+ animation: chart__showDot_13nr2 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_9g95g {
16
+ @keyframes chart__showDot_13nr2 {
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_9g95g","dot":"chart__dot_9g95g","dotItem":"chart__dotItem_9g95g","dotWrap":"chart__dotWrap_9g95g","showDot":"chart__showDot_9g95g"};
5
+ var styles = {"dotUnfocused":"chart__dotUnfocused_13nr2","dot":"chart__dot_13nr2","dotItem":"chart__dotItem_13nr2","dotWrap":"chart__dotWrap_13nr2","showDot":"chart__showDot_13nr2"};
6
6
  require('./index.css')
7
7
 
8
8
  var Dot = React.forwardRef(function (_a, ref) {
@@ -1,4 +1,4 @@
1
- /* hash: v8ezw */
1
+ /* hash: 1hoci */
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_v8ezw {
13
+ .chart__legendContent_1e90m {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  flex-wrap: wrap;
17
17
  }
18
- .chart__legendWrap_v8ezw {
18
+ .chart__legendWrap_1e90m {
19
19
  width: 100%;
20
20
  margin: 0;
21
21
  padding: 0;
22
22
  }
23
- .chart__legendItem_v8ezw {
23
+ .chart__legendItem_1e90m {
24
24
  margin-right: var(--gap-2xl);
25
25
  cursor: pointer;
26
26
  display: inline-block;
27
27
  }
28
- .chart__legendItem_v8ezw:last-child {
28
+ .chart__legendItem_1e90m:last-child {
29
29
  margin-right: 0;
30
30
  }
31
- .chart__legendUnactive_v8ezw {
31
+ .chart__legendUnactive_1e90m {
32
32
  opacity: 0.3;
33
33
  }
34
- .chart__legendIcon_v8ezw {
34
+ .chart__legendIcon_1e90m {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
37
  }
38
- .chart__legendValue_v8ezw {
38
+ .chart__legendValue_1e90m {
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_v8ezw","legendWrap":"chart__legendWrap_v8ezw","legendItem":"chart__legendItem_v8ezw","legendUnactive":"chart__legendUnactive_v8ezw","legendIcon":"chart__legendIcon_v8ezw","legendValue":"chart__legendValue_v8ezw"};
9
+ var styles = {"legendContent":"chart__legendContent_1e90m","legendWrap":"chart__legendWrap_1e90m","legendItem":"chart__legendItem_1e90m","legendUnactive":"chart__legendUnactive_1e90m","legendIcon":"chart__legendIcon_1e90m","legendValue":"chart__legendValue_1e90m"};
10
10
  require('./index.css')
11
11
 
12
12
  var icons = {
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
3
- declare const _default: React.MemoExoticComponent<({ fill, x, y, width, height, radius, background }: any) => JSX.Element>;
4
- export { _default as default };
2
+ declare const RectBar: ({ fill, x, y, width, height, radius, background }: any) => JSX.Element;
3
+ export { RectBar };
@@ -21,6 +21,5 @@ var RectBar = function (_a) {
21
21
  var path = useMemo(function () { return (React.createElement("path", { d: getPath(x, width, height, initHeight, topRadius, bottomRadius, initY), stroke: 'none', fill: fill })); }, [x, width, height, initHeight, topRadius, bottomRadius, initY, fill]);
22
22
  return React.createElement(React.Fragment, null, path);
23
23
  };
24
- var RectBar$1 = React.memo(RectBar);
25
24
 
26
- export default RectBar$1;
25
+ export { RectBar };