@alfalab/core-components-chart 3.1.4 → 3.1.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.
Files changed (90) hide show
  1. package/Component.js +39 -41
  2. package/components/CustomizedLabel.js +5 -7
  3. package/components/Dot/index.css +8 -8
  4. package/components/Dot/index.js +9 -11
  5. package/components/Legends/index.css +8 -8
  6. package/components/Legends/index.js +13 -15
  7. package/components/LinearGradient.js +3 -5
  8. package/components/RectBar.js +5 -7
  9. package/components/Tick/index.css +4 -4
  10. package/components/Tick/index.js +7 -9
  11. package/components/TooltipContent/index.css +7 -7
  12. package/components/TooltipContent/index.js +12 -14
  13. package/cssm/Component.js +41 -43
  14. package/cssm/components/CustomizedLabel.js +5 -7
  15. package/cssm/components/Dot/index.js +10 -12
  16. package/cssm/components/Legends/index.js +13 -15
  17. package/cssm/components/LinearGradient.js +3 -5
  18. package/cssm/components/RectBar.js +5 -7
  19. package/cssm/components/Tick/index.js +7 -9
  20. package/cssm/components/TooltipContent/index.js +12 -14
  21. package/cssm/hooks/usePathBar/index.js +0 -2
  22. package/cssm/hooks/usePathBar/utils/getRadius.js +0 -2
  23. package/cssm/hooks/useSettings/index.js +1 -3
  24. package/cssm/hooks/useSettings/utils/setComposedChartsMargin.js +0 -2
  25. package/cssm/hooks/useSettings/utils/setDatas.js +4 -6
  26. package/cssm/hooks/useSettings/utils/setGradientCharts.js +2 -4
  27. package/cssm/hooks/useSettings/utils/setLegendMargin.js +0 -2
  28. package/cssm/hooks/useSettings/utils/sortByIndex.js +0 -2
  29. package/cssm/icons/Circle.js +4 -6
  30. package/cssm/icons/CircleLine.js +5 -7
  31. package/cssm/icons/FilledCircle.js +8 -10
  32. package/cssm/icons/Point.js +5 -7
  33. package/cssm/icons/StrokeCircle.js +4 -6
  34. package/cssm/index.js +9 -11
  35. package/cssm/{tslib.es6-0de342ae.d.ts → tslib.es6-19b064c1.d.ts} +0 -0
  36. package/cssm/{tslib.es6-0de342ae.js → tslib.es6-19b064c1.js} +0 -0
  37. package/cssm/types/utils/index.d.ts +1 -0
  38. package/esm/Component.js +23 -23
  39. package/esm/components/CustomizedLabel.js +1 -1
  40. package/esm/components/Dot/index.css +8 -8
  41. package/esm/components/Dot/index.js +3 -3
  42. package/esm/components/Legends/index.css +8 -8
  43. package/esm/components/Legends/index.js +4 -4
  44. package/esm/components/LinearGradient.js +1 -1
  45. package/esm/components/RectBar.js +2 -2
  46. package/esm/components/Tick/index.css +4 -4
  47. package/esm/components/Tick/index.js +2 -2
  48. package/esm/components/TooltipContent/index.css +7 -7
  49. package/esm/components/TooltipContent/index.js +2 -2
  50. package/esm/hooks/useSettings/index.js +1 -1
  51. package/esm/hooks/useSettings/utils/setDatas.js +4 -4
  52. package/esm/hooks/useSettings/utils/setGradientCharts.js +2 -2
  53. package/esm/index.css +5 -5
  54. package/esm/index.js +7 -7
  55. package/esm/{tslib.es6-98750278.d.ts → tslib.es6-c1e06c73.d.ts} +0 -0
  56. package/esm/{tslib.es6-98750278.js → tslib.es6-c1e06c73.js} +0 -0
  57. package/esm/types/utils/index.d.ts +1 -0
  58. package/hooks/usePathBar/index.js +0 -2
  59. package/hooks/usePathBar/utils/getRadius.js +0 -2
  60. package/hooks/useSettings/index.js +1 -3
  61. package/hooks/useSettings/utils/setComposedChartsMargin.js +0 -2
  62. package/hooks/useSettings/utils/setDatas.js +4 -6
  63. package/hooks/useSettings/utils/setGradientCharts.js +2 -4
  64. package/hooks/useSettings/utils/setLegendMargin.js +0 -2
  65. package/hooks/useSettings/utils/sortByIndex.js +0 -2
  66. package/icons/Circle.js +4 -6
  67. package/icons/CircleLine.js +5 -7
  68. package/icons/FilledCircle.js +8 -10
  69. package/icons/Point.js +5 -7
  70. package/icons/StrokeCircle.js +4 -6
  71. package/index.css +5 -5
  72. package/index.js +7 -9
  73. package/modern/Component.js +10 -10
  74. package/modern/components/CustomizedLabel.js +1 -1
  75. package/modern/components/Dot/index.css +8 -8
  76. package/modern/components/Dot/index.js +1 -1
  77. package/modern/components/Legends/index.css +8 -8
  78. package/modern/components/Legends/index.js +1 -1
  79. package/modern/components/RectBar.js +1 -1
  80. package/modern/components/Tick/index.css +4 -4
  81. package/modern/components/Tick/index.js +1 -1
  82. package/modern/components/TooltipContent/index.css +7 -7
  83. package/modern/components/TooltipContent/index.js +1 -1
  84. package/modern/index.css +5 -5
  85. package/modern/index.js +6 -6
  86. package/modern/types/utils/index.d.ts +1 -0
  87. package/package.json +2 -2
  88. package/{tslib.es6-27fe16ea.d.ts → tslib.es6-2bc3955e.d.ts} +0 -0
  89. package/{tslib.es6-27fe16ea.js → tslib.es6-2bc3955e.js} +0 -0
  90. package/types/utils/index.d.ts +1 -0
@@ -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_ackkk","tooltipList":"chart__tooltipList_ackkk","tooltipItem":"chart__tooltipItem_ackkk","tooltipArrow":"chart__tooltipArrow_ackkk","tooltipArrowRight":"chart__tooltipArrowRight_ackkk"};
5
+ var styles = {"tooltip":"chart__tooltip_4pmy3","tooltipList":"chart__tooltipList_4pmy3","tooltipItem":"chart__tooltipItem_4pmy3","tooltipArrow":"chart__tooltipArrow_4pmy3","tooltipArrowRight":"chart__tooltipArrowRight_4pmy3"};
6
6
  require('./index.css')
7
7
 
8
8
  var TooltipContent = function (_a) {
@@ -22,7 +22,7 @@ var TooltipContent = function (_a) {
22
22
  React.createElement(Typography.Text, { view: 'primary-medium', tag: 'span', weight: 'medium', className: cn(styles.tooltipValue) },
23
23
  (entry === null || entry === void 0 ? void 0 : entry.formatter) ? entry.formatter(entry.value) : entry.value,
24
24
  separator || ' '),
25
- React.createElement(Typography.Text, { view: 'secondary-large', tag: 'span', className: cn(styles.tooltipName) }, "" + entry.name)));
25
+ React.createElement(Typography.Text, { view: 'secondary-large', tag: 'span', className: cn(styles.tooltipName) }, "".concat(entry.name))));
26
26
  }))));
27
27
  };
28
28
 
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from '../../tslib.es6-98750278.js';
1
+ import { _ as __assign } from '../../tslib.es6-c1e06c73.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-98750278.js';
1
+ import { _ as __assign } from '../../../tslib.es6-c1e06c73.js';
2
2
 
3
3
  var setDatas = function (series, labels) {
4
4
  var initData = [];
@@ -14,9 +14,9 @@ var setDatas = function (series, labels) {
14
14
  var obj = {
15
15
  label: label,
16
16
  };
17
- obj["" + dataKey] = item.value;
18
- if (!chartsNames["" + dataKey])
19
- chartsNames["" + dataKey] = true;
17
+ obj["".concat(dataKey)] = item.value;
18
+ if (!chartsNames["".concat(dataKey)])
19
+ chartsNames["".concat(dataKey)] = true;
20
20
  var index = initData
21
21
  .map(function (dataItem) { return dataItem.label; })
22
22
  .indexOf(label);
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from '../../../tslib.es6-98750278.js';
1
+ import { _ as __assign } from '../../../tslib.es6-c1e06c73.js';
2
2
 
3
3
  var setGradientCharts = function (series) {
4
4
  var filterSeries = series.filter(function (item) { return item.chart !== 'gradient'; });
@@ -15,7 +15,7 @@ var setGradientCharts = function (series) {
15
15
  };
16
16
  });
17
17
  }
18
- accum.push(__assign(__assign({}, item), { zIndex: -100, chart: 'gradient', hideLegend: true, hideTooltip: true, properties: __assign(__assign({}, item.properties), { dataKey: item.properties.dataKey + "-gradient", fill: fill }), data: newData || item.data }));
18
+ accum.push(__assign(__assign({}, item), { zIndex: -100, chart: 'gradient', hideLegend: true, hideTooltip: true, properties: __assign(__assign({}, item.properties), { dataKey: "".concat(item.properties.dataKey, "-gradient"), fill: fill }), data: newData || item.data }));
19
19
  }
20
20
  accum.push(item);
21
21
  return accum;
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1cwyb */
1
+ /* hash: qfgr3 */
2
2
  :root {
3
3
  --color-light-text-primary: #0b1f35;
4
4
  }
@@ -10,17 +10,17 @@
10
10
 
11
11
  /* Hard up */
12
12
  }
13
- .chart__coreChart_11fps .recharts-line path {
13
+ .chart__coreChart_14ne4 .recharts-line path {
14
14
  transition: d 0.2s ease-out;
15
15
  }
16
- .chart__coreChart_11fps .recharts-text tspan {
16
+ .chart__coreChart_14ne4 .recharts-text tspan {
17
17
  fill: var(--color-light-text-primary);
18
18
  font-size: 16px;
19
19
  line-height: 22px;
20
20
  }
21
- .chart__bar_11fps {
21
+ .chart__bar_14ne4 {
22
22
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
23
23
  }
24
- .chart__unfocused_11fps {
24
+ .chart__unfocused_14ne4 {
25
25
  opacity: 0.3;
26
26
  }
package/esm/index.js CHANGED
@@ -1,26 +1,26 @@
1
- import './tslib.es6-98750278.js';
1
+ export { Chart } from './Component.js';
2
+ import './tslib.es6-c1e06c73.js';
2
3
  import 'react';
3
4
  import 'classnames';
4
5
  import 'recharts';
5
- import './hooks/usePathBar/utils/getRadius.js';
6
- import './hooks/usePathBar/index.js';
7
6
  import './components/CustomizedLabel.js';
8
- import './icons/Point.js';
7
+ import './hooks/usePathBar/index.js';
8
+ import './hooks/usePathBar/utils/getRadius.js';
9
9
  import './components/Dot/index.js';
10
+ import './icons/Point.js';
11
+ import './components/Legends/index.js';
10
12
  import '@alfalab/core-components-typography/esm';
11
13
  import './icons/Circle.js';
12
14
  import './icons/CircleLine.js';
13
15
  import './icons/FilledCircle.js';
14
16
  import './icons/StrokeCircle.js';
15
- import './components/Legends/index.js';
16
17
  import './components/LinearGradient.js';
17
18
  import './components/RectBar.js';
18
19
  import './components/Tick/index.js';
19
20
  import './components/TooltipContent/index.js';
20
- export { Chart } from './Component.js';
21
+ import './hooks/useSettings/index.js';
21
22
  import './hooks/useSettings/utils/setComposedChartsMargin.js';
22
23
  import './hooks/useSettings/utils/setDatas.js';
23
24
  import './hooks/useSettings/utils/setGradientCharts.js';
24
25
  import './hooks/useSettings/utils/setLegendMargin.js';
25
26
  import './hooks/useSettings/utils/sortByIndex.js';
26
- import './hooks/useSettings/index.js';
@@ -4,3 +4,4 @@ export * from "./data.types";
4
4
  export * from "./dot.types";
5
5
  export * from "./gradient.types";
6
6
  export * from "./tick.types";
7
+ export {};
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
  var hooks_usePathBar_utils_getRadius = require('./utils/getRadius.js');
7
5
 
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var getRadius = function (height, radius) {
6
4
  var result = radius && height / 2 < radius ? Math.ceil(height / 2) : radius || 0;
7
5
  return result;
@@ -1,8 +1,6 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib_es6 = require('../../tslib.es6-27fe16ea.js');
3
+ var tslib_es6 = require('../../tslib.es6-2bc3955e.js');
6
4
  var React = require('react');
7
5
  var hooks_useSettings_utils_setComposedChartsMargin = require('./utils/setComposedChartsMargin.js');
8
6
  var hooks_useSettings_utils_setDatas = require('./utils/setDatas.js');
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var setComposedChartsMargin = function (composeChart, legend, brush, xAxis) {
6
4
  var _a, _b, _c, _d;
7
5
  return ({
@@ -1,8 +1,6 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib_es6 = require('../../../tslib.es6-27fe16ea.js');
3
+ var tslib_es6 = require('../../../tslib.es6-2bc3955e.js');
6
4
 
7
5
  var setDatas = function (series, labels) {
8
6
  var initData = [];
@@ -18,9 +16,9 @@ var setDatas = function (series, labels) {
18
16
  var obj = {
19
17
  label: label,
20
18
  };
21
- obj["" + dataKey] = item.value;
22
- if (!chartsNames["" + dataKey])
23
- chartsNames["" + dataKey] = true;
19
+ obj["".concat(dataKey)] = item.value;
20
+ if (!chartsNames["".concat(dataKey)])
21
+ chartsNames["".concat(dataKey)] = true;
24
22
  var index = initData
25
23
  .map(function (dataItem) { return dataItem.label; })
26
24
  .indexOf(label);
@@ -1,8 +1,6 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib_es6 = require('../../../tslib.es6-27fe16ea.js');
3
+ var tslib_es6 = require('../../../tslib.es6-2bc3955e.js');
6
4
 
7
5
  var setGradientCharts = function (series) {
8
6
  var filterSeries = series.filter(function (item) { return item.chart !== 'gradient'; });
@@ -19,7 +17,7 @@ var setGradientCharts = function (series) {
19
17
  };
20
18
  });
21
19
  }
22
- accum.push(tslib_es6.__assign(tslib_es6.__assign({}, item), { zIndex: -100, chart: 'gradient', hideLegend: true, hideTooltip: true, properties: tslib_es6.__assign(tslib_es6.__assign({}, item.properties), { dataKey: item.properties.dataKey + "-gradient", fill: fill }), data: newData || item.data }));
20
+ accum.push(tslib_es6.__assign(tslib_es6.__assign({}, item), { zIndex: -100, chart: 'gradient', hideLegend: true, hideTooltip: true, properties: tslib_es6.__assign(tslib_es6.__assign({}, item.properties), { dataKey: "".concat(item.properties.dataKey, "-gradient"), fill: fill }), data: newData || item.data }));
23
21
  }
24
22
  accum.push(item);
25
23
  return accum;
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var setLegendMargin = function (brush, legend) {
6
4
  var top = 0;
7
5
  if (typeof (brush === null || brush === void 0 ? void 0 : brush.brushMargin) !== 'number' || !(legend === null || legend === void 0 ? void 0 : legend.verticalAlign))
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var sortByIndex = function (series) {
6
4
  return series.sort(function (a, b) {
7
5
  if ((a === null || a === void 0 ? void 0 : a.zIndex) && (b === null || b === void 0 ? void 0 : b.zIndex) && (a === null || a === void 0 ? void 0 : a.zIndex) > (b === null || b === void 0 ? void 0 : b.zIndex)) {
package/icons/Circle.js CHANGED
@@ -1,17 +1,15 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var CircleIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#FF5C5C' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 16 16', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '8', cy: '8', r: '8', fill: fill })));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 16 16', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '8', cy: '8', r: '8', fill: fill })));
15
13
  };
16
14
 
17
15
  exports.CircleIcon = CircleIcon;
@@ -1,18 +1,16 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var CircleLineIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#FF5C5C' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 12', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '11', cy: '6', r: '6', fill: fill }),
15
- React__default['default'].createElement("rect", { y: '5', width: '22', height: '2', fill: fill })));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 12', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '11', cy: '6', r: '6', fill: fill }),
13
+ React__default.default.createElement("rect", { y: '5', width: '22', height: '2', fill: fill })));
16
14
  };
17
15
 
18
16
  exports.CircleLineIcon = CircleLineIcon;
@@ -1,21 +1,19 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var FilledCircleIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '11', cy: '11', r: '10', fill: 'url(#paint0_linear)', stroke: fill, strokeWidth: '2' }),
15
- React__default['default'].createElement("defs", null,
16
- React__default['default'].createElement("linearGradient", { id: 'paint0_linear', x1: '11', y1: '1', x2: '11', y2: '21', gradientUnits: 'userSpaceOnUse' },
17
- React__default['default'].createElement("stop", { stopColor: fill, stopOpacity: '0.2' }),
18
- React__default['default'].createElement("stop", { offset: '1', stopColor: fill, stopOpacity: '0' })))));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '11', cy: '11', r: '10', fill: 'url(#paint0_linear)', stroke: fill, strokeWidth: '2' }),
13
+ React__default.default.createElement("defs", null,
14
+ React__default.default.createElement("linearGradient", { id: 'paint0_linear', x1: '11', y1: '1', x2: '11', y2: '21', gradientUnits: 'userSpaceOnUse' },
15
+ React__default.default.createElement("stop", { stopColor: fill, stopOpacity: '0.2' }),
16
+ React__default.default.createElement("stop", { offset: '1', stopColor: fill, stopOpacity: '0' })))));
19
17
  };
20
18
 
21
19
  exports.FilledCircleIcon = FilledCircleIcon;
package/icons/Point.js CHANGED
@@ -1,18 +1,16 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var PointIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { height: height, viewBox: '0 0 18 18' },
14
- React__default['default'].createElement("circle", { cx: '9', cy: '9', r: '9', strokeWidth: '1', fill: fill, fillOpacity: '0.4' }),
15
- React__default['default'].createElement("circle", { cx: '9', cy: '9', r: '3', strokeWidth: '2', stroke: '#fff', fill: fill })));
11
+ return (React__default.default.createElement("svg", { height: height, viewBox: '0 0 18 18' },
12
+ React__default.default.createElement("circle", { cx: '9', cy: '9', r: '9', strokeWidth: '1', fill: fill, fillOpacity: '0.4' }),
13
+ React__default.default.createElement("circle", { cx: '9', cy: '9', r: '3', strokeWidth: '2', stroke: '#fff', fill: fill })));
16
14
  };
17
15
 
18
16
  exports.PointIcon = PointIcon;
@@ -1,17 +1,15 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
9
  var StrokeCircleIcon = function (_a) {
12
10
  var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
13
- return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
14
- React__default['default'].createElement("circle", { cx: '11', cy: '11', r: '10', stroke: fill, strokeWidth: '2', strokeDasharray: '8 8' })));
11
+ return (React__default.default.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
12
+ React__default.default.createElement("circle", { cx: '11', cy: '11', r: '10', stroke: fill, strokeWidth: '2', strokeDasharray: '8 8' })));
15
13
  };
16
14
 
17
15
  exports.StrokeCircleIcon = StrokeCircleIcon;
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1cwyb */
1
+ /* hash: qfgr3 */
2
2
  :root {
3
3
  --color-light-text-primary: #0b1f35;
4
4
  }
@@ -10,17 +10,17 @@
10
10
 
11
11
  /* Hard up */
12
12
  }
13
- .chart__coreChart_11fps .recharts-line path {
13
+ .chart__coreChart_14ne4 .recharts-line path {
14
14
  transition: d 0.2s ease-out;
15
15
  }
16
- .chart__coreChart_11fps .recharts-text tspan {
16
+ .chart__coreChart_14ne4 .recharts-text tspan {
17
17
  fill: var(--color-light-text-primary);
18
18
  font-size: 16px;
19
19
  line-height: 22px;
20
20
  }
21
- .chart__bar_11fps {
21
+ .chart__bar_14ne4 {
22
22
  transition: opacity 0.2s ease-out, d 0.2s ease-out;
23
23
  }
24
- .chart__unfocused_11fps {
24
+ .chart__unfocused_14ne4 {
25
25
  opacity: 0.3;
26
26
  }
package/index.js CHANGED
@@ -1,33 +1,31 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('./tslib.es6-27fe16ea.js');
3
+ var Component = require('./Component.js');
4
+ require('./tslib.es6-2bc3955e.js');
6
5
  require('react');
7
6
  require('classnames');
8
7
  require('recharts');
9
- require('./hooks/usePathBar/utils/getRadius.js');
10
- require('./hooks/usePathBar/index.js');
11
8
  require('./components/CustomizedLabel.js');
12
- require('./icons/Point.js');
9
+ require('./hooks/usePathBar/index.js');
10
+ require('./hooks/usePathBar/utils/getRadius.js');
13
11
  require('./components/Dot/index.js');
12
+ require('./icons/Point.js');
13
+ require('./components/Legends/index.js');
14
14
  require('@alfalab/core-components-typography');
15
15
  require('./icons/Circle.js');
16
16
  require('./icons/CircleLine.js');
17
17
  require('./icons/FilledCircle.js');
18
18
  require('./icons/StrokeCircle.js');
19
- require('./components/Legends/index.js');
20
19
  require('./components/LinearGradient.js');
21
20
  require('./components/RectBar.js');
22
21
  require('./components/Tick/index.js');
23
22
  require('./components/TooltipContent/index.js');
24
- var Component = require('./Component.js');
23
+ require('./hooks/useSettings/index.js');
25
24
  require('./hooks/useSettings/utils/setComposedChartsMargin.js');
26
25
  require('./hooks/useSettings/utils/setDatas.js');
27
26
  require('./hooks/useSettings/utils/setGradientCharts.js');
28
27
  require('./hooks/useSettings/utils/setLegendMargin.js');
29
28
  require('./hooks/useSettings/utils/sortByIndex.js');
30
- require('./hooks/useSettings/index.js');
31
29
 
32
30
 
33
31
 
@@ -1,34 +1,34 @@
1
1
  import React, { useState, useRef, useMemo, useCallback, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { Legend, CartesianGrid, XAxis, YAxis, Brush, Tooltip, Area, Line, Bar, LabelList, Cell, ResponsiveContainer, ComposedChart } from 'recharts';
4
- import './hooks/usePathBar/utils/getRadius.js';
5
- import './hooks/usePathBar/index.js';
6
4
  import { CustomizedLabel } from './components/CustomizedLabel.js';
7
- import './icons/Point.js';
8
5
  import { Dot } from './components/Dot/index.js';
9
- import '@alfalab/core-components-typography/modern';
10
- import './icons/Circle.js';
11
- import './icons/CircleLine.js';
12
- import './icons/FilledCircle.js';
13
- import './icons/StrokeCircle.js';
14
6
  import { Legends } from './components/Legends/index.js';
15
7
  import { LinearGradient } from './components/LinearGradient.js';
16
8
  import { RectBar } from './components/RectBar.js';
17
9
  import { Tick } from './components/Tick/index.js';
18
10
  import { TooltipContent } from './components/TooltipContent/index.js';
11
+ import { useSettings } from './hooks/useSettings/index.js';
12
+ import './hooks/usePathBar/index.js';
13
+ import './hooks/usePathBar/utils/getRadius.js';
14
+ import './icons/Point.js';
15
+ import '@alfalab/core-components-typography/modern';
16
+ import './icons/Circle.js';
17
+ import './icons/CircleLine.js';
18
+ import './icons/FilledCircle.js';
19
+ import './icons/StrokeCircle.js';
19
20
  import './hooks/useSettings/utils/setComposedChartsMargin.js';
20
21
  import './hooks/useSettings/utils/setDatas.js';
21
22
  import './hooks/useSettings/utils/setGradientCharts.js';
22
23
  import './hooks/useSettings/utils/setLegendMargin.js';
23
24
  import './hooks/useSettings/utils/sortByIndex.js';
24
- import { useSettings } from './hooks/useSettings/index.js';
25
25
 
26
26
  const CustomizedHOC = (Component, options) => {
27
27
  const NewComponent = (props) => React.createElement(Component, { ...props, ...options });
28
28
  return NewComponent;
29
29
  };
30
30
 
31
- var styles = {"coreChart":"chart__coreChart_11fps","bar":"chart__bar_11fps","unfocused":"chart__unfocused_11fps"};
31
+ const styles = {"coreChart":"chart__coreChart_14ne4","bar":"chart__bar_14ne4","unfocused":"chart__unfocused_14ne4"};
32
32
  require('./index.css')
33
33
 
34
34
  const Chart = (props) => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import '../hooks/usePathBar/utils/getRadius.js';
3
2
  import { usePathBar } from '../hooks/usePathBar/index.js';
3
+ import '../hooks/usePathBar/utils/getRadius.js';
4
4
 
5
5
  const CustomizedLabel = ({ x, y, value, offset, radius, height, width, formatter, }) => {
6
6
  const [initHeight] = usePathBar({ radius, height });
@@ -1,19 +1,19 @@
1
- /* hash: 1lzqe */
2
- .chart__dotUnfocused_1axnn {
1
+ /* hash: 1vmhq */
2
+ .chart__dotUnfocused_1u9no {
3
3
  opacity: 0.3;
4
4
  }
5
5
 
6
- .chart__dot_1axnn,
7
- .chart__dotItem_1axnn,
8
- .chart__dotWrap_1axnn {
6
+ .chart__dot_1u9no,
7
+ .chart__dotItem_1u9no,
8
+ .chart__dotWrap_1u9no {
9
9
  transition: all 0.2s ease;
10
10
  }
11
11
 
12
- .chart__dot_1axnn {
13
- animation: chart__showDot_1axnn 0.5s ease;
12
+ .chart__dot_1u9no {
13
+ animation: chart__showDot_1u9no 0.5s ease;
14
14
  }
15
15
 
16
- @keyframes chart__showDot_1axnn {
16
+ @keyframes chart__showDot_1u9no {
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_1axnn","dot":"chart__dot_1axnn","dotItem":"chart__dotItem_1axnn","dotWrap":"chart__dotWrap_1axnn","showDot":"chart__showDot_1axnn"};
5
+ const styles = {"dotUnfocused":"chart__dotUnfocused_1u9no","dot":"chart__dot_1u9no","dotItem":"chart__dotItem_1u9no","dotWrap":"chart__dotWrap_1u9no","showDot":"chart__showDot_1u9no"};
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: 12x4p */
1
+ /* hash: 1gmkt */
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_r4v4u {
13
+ .chart__legendContent_nx6sz {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  flex-wrap: wrap;
17
17
  }
18
- .chart__legendWrap_r4v4u {
18
+ .chart__legendWrap_nx6sz {
19
19
  width: 100%;
20
20
  margin: 0;
21
21
  padding: 0;
22
22
  }
23
- .chart__legendItem_r4v4u {
23
+ .chart__legendItem_nx6sz {
24
24
  margin-right: var(--gap-2xl);
25
25
  cursor: pointer;
26
26
  display: inline-block;
27
27
  }
28
- .chart__legendItem_r4v4u:last-child {
28
+ .chart__legendItem_nx6sz:last-child {
29
29
  margin-right: 0;
30
30
  }
31
- .chart__legendUnactive_r4v4u {
31
+ .chart__legendUnactive_nx6sz {
32
32
  opacity: 0.3;
33
33
  }
34
- .chart__legendIcon_r4v4u {
34
+ .chart__legendIcon_nx6sz {
35
35
  margin-right: 13px;
36
36
  display: flex;
37
37
  }
38
- .chart__legendValue_r4v4u {
38
+ .chart__legendValue_nx6sz {
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_r4v4u","legendWrap":"chart__legendWrap_r4v4u","legendItem":"chart__legendItem_r4v4u","legendUnactive":"chart__legendUnactive_r4v4u","legendIcon":"chart__legendIcon_r4v4u","legendValue":"chart__legendValue_r4v4u"};
9
+ const styles = {"legendContent":"chart__legendContent_nx6sz","legendWrap":"chart__legendWrap_nx6sz","legendItem":"chart__legendItem_nx6sz","legendUnactive":"chart__legendUnactive_nx6sz","legendIcon":"chart__legendIcon_nx6sz","legendValue":"chart__legendValue_nx6sz"};
10
10
  require('./index.css')
11
11
 
12
12
  const icons = {
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo } from 'react';
2
- import '../hooks/usePathBar/utils/getRadius.js';
3
2
  import { usePathBar } from '../hooks/usePathBar/index.js';
3
+ import '../hooks/usePathBar/utils/getRadius.js';
4
4
 
5
5
  // eslint-disable-next-line complexity
6
6
  const getPath = (x, width, height, initHeight, topRadius, bottomRadius, initY) => `
@@ -1,4 +1,4 @@
1
- /* hash: ohfit */
1
+ /* hash: 2ftiy */
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_19d3b {
14
+ .chart__tickText_13q5p {
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_19d3b {
20
+ .chart__circle_13q5p {
21
21
  opacity: 0.3;
22
22
  fill: var(--color-dark-bg-primary);
23
23
  }
24
- .chart__circle_19d3b {
24
+ .chart__circle_13q5p {
25
25
  opacity: 0.3;
26
26
  fill: var(--color-dark-bg-primary);
27
27
  }