@semcore/mini-chart 0.29.2 → 0.29.3

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.
@@ -0,0 +1,62 @@
1
+ @import '../skeleton/skeleton.shadow.css';
2
+
3
+ SLineGauge {
4
+ height: 8px;
5
+ background-color: var(--base-bg-color, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));
6
+ border-radius: var(--intergalactic-chart-rounded, 2px);
7
+ overflow: hidden;
8
+ position: relative;
9
+ }
10
+
11
+ SLineValue {
12
+ height: 8px;
13
+ border-radius: var(--intergalactic-chart-rounded, 2px) 0 0 var(--intergalactic-chart-rounded, 2px);
14
+ }
15
+
16
+ SLineValue[percent] {
17
+ width: var(--percent);
18
+ }
19
+
20
+ SLineValue[color], SLineSegmentItem[color] {
21
+ background-color: var(--color, var(--intergalactic-chart-palette-order-1, #2bb3ff));
22
+ }
23
+
24
+ SLineGauge[segments] {
25
+ border-radius: var(--intergalactic-progress-bar-rounded, 6px);
26
+ }
27
+
28
+ SLineGaugeSegment, SAnimationLine {
29
+ position: absolute;
30
+ top: 0;
31
+ left: 0;
32
+ right: 0;
33
+ bottom: 0;
34
+ }
35
+
36
+ SLineSegmentItem:last-child {
37
+ margin-right: 0;
38
+ border-right: none;
39
+ }
40
+
41
+ SLineSegmentItem {
42
+ height: 8px;
43
+ background: transparent;
44
+ border-right-color: var(--intergalactic-chart-grid-border, #ffffff);
45
+ border-right-style: solid;
46
+ border-right-width: 1px;
47
+ box-sizing: content-box;
48
+ }
49
+
50
+ SAnimationLine {
51
+ background-color: var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9);
52
+ transition: all var(--intergalactic-duration-extra-slow, 500) ease-in-out;
53
+ animation-name: move-line;
54
+ animation-duration: 0.5s;
55
+ animation-timing-function: ease-in-out;
56
+ animation-fill-mode: forwards;
57
+ }
58
+
59
+ @keyframes move-line {
60
+ 0% {transform: translateX(0);}
61
+ 100% {transform: translateX(100%);}
62
+ }
@@ -0,0 +1,24 @@
1
+ SLineGauge[loading],
2
+ SDonutContainer[loading],
3
+ STrendLine[loading],
4
+ STrendBar[loading] {
5
+ animation-name: pulse;
6
+ animation-iteration-count: infinite;
7
+ animation-timing-function: ease-in-out;
8
+ animation-duration: 1.6s;
9
+ will-change: opacity;
10
+ }
11
+
12
+ @keyframes pulse {
13
+ 0% {
14
+ opacity: 1;
15
+ }
16
+
17
+ 50% {
18
+ opacity: 0.4;
19
+ }
20
+
21
+ 100% {
22
+ opacity: 1;
23
+ }
24
+ }
@@ -1,40 +1,45 @@
1
- import w from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import h from "@babel/runtime/helpers/esm/objectSpread2";
3
- import L from "@babel/runtime/helpers/esm/classCallCheck";
4
- import A from "@babel/runtime/helpers/esm/createClass";
5
- import D from "@babel/runtime/helpers/esm/inherits";
6
- import E from "@babel/runtime/helpers/esm/createSuper";
7
- import c from "@babel/runtime/helpers/esm/defineProperty";
8
- import { sstyled as R } from "@semcore/utils/lib/core/index";
9
- import y, { assignProps as v, sstyled as G } from "@semcore/core";
10
- import _ from "react";
11
- import N from "@semcore/utils/lib/enhances/resolveColorEnhance";
12
- import { Trend as $ } from "./Trend.mjs";
13
- import { Box as M } from "@semcore/flex-box";
14
- import { extractAriaProps as W } from "@semcore/utils/lib/ariaProps";
15
- var j = (
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
7
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled } from "@semcore/utils/lib/core/index";
9
+ import createComponent, { assignProps, sstyled as sstyled$1 } from "@semcore/core";
10
+ import React from "react";
11
+ import resolveColorEnhance from "@semcore/utils/lib/enhances/resolveColorEnhance";
12
+ import { Trend } from "./Trend.mjs";
13
+ import { Box } from "@semcore/flex-box";
14
+ import { extractAriaProps } from "@semcore/utils/lib/ariaProps";
15
+ /*!__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
16
+ var style = (
16
17
  /*__reshadow_css_start__*/
17
- (R.insert(
18
+ (sstyled.insert(
18
19
  /*__inner_css_start__*/
19
- "@keyframes pulse_1p7cy{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_1p7cy_gg_.__loading_1p7cy_gg_,.___SLineGauge_1p7cy_gg_.__loading_1p7cy_gg_,.___STrendBar_1p7cy_gg_.__loading_1p7cy_gg_,.___STrendLine_1p7cy_gg_.__loading_1p7cy_gg_{animation-name:pulse_1p7cy;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
20
- "1p7cy_gg_"
21
- ), {
22
- __SLineGauge: "___SLineGauge_1p7cy_gg_",
23
- _loading: "__loading_1p7cy_gg_",
24
- __SDonutContainer: "___SDonutContainer_1p7cy_gg_",
25
- __STrendLine: "___STrendLine_1p7cy_gg_",
26
- __STrendBar: "___STrendBar_1p7cy_gg_",
27
- "@pulse": "pulse_1p7cy"
20
+ "@keyframes pulse_wwiiw{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_wwiiw_gg_.__loading_wwiiw_gg_,.___SLineGauge_wwiiw_gg_.__loading_wwiiw_gg_,.___STrendBar_wwiiw_gg_.__loading_wwiiw_gg_,.___STrendLine_wwiiw_gg_.__loading_wwiiw_gg_{animation-name:pulse_wwiiw;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
21
+ /*__inner_css_end__*/
22
+ "wwiiw_gg_"
23
+ ), /*__reshadow_css_end__*/
24
+ {
25
+ "__SLineGauge": "___SLineGauge_wwiiw_gg_",
26
+ "_loading": "__loading_wwiiw_gg_",
27
+ "__SDonutContainer": "___SDonutContainer_wwiiw_gg_",
28
+ "__STrendLine": "___STrendLine_wwiiw_gg_",
29
+ "__STrendBar": "___STrendBar_wwiiw_gg_",
30
+ "@pulse": "pulse_wwiiw"
28
31
  })
29
- ), i = /* @__PURE__ */ function(l) {
30
- D(e, l);
31
- var s = E(e);
32
- function e() {
33
- return L(this, e), s.apply(this, arguments);
32
+ );
33
+ var TrendBarRoot = /* @__PURE__ */ function(_Trend) {
34
+ _inherits(TrendBarRoot2, _Trend);
35
+ var _super = _createSuper(TrendBarRoot2);
36
+ function TrendBarRoot2() {
37
+ _classCallCheck(this, TrendBarRoot2);
38
+ return _super.apply(this, arguments);
34
39
  }
35
- return A(e, [{
40
+ _createClass(TrendBarRoot2, [{
36
41
  key: "defaultData",
37
- get: function() {
42
+ get: function get() {
38
43
  return [{
39
44
  value: 20
40
45
  }, {
@@ -47,60 +52,71 @@ var j = (
47
52
  }
48
53
  }, {
49
54
  key: "data",
50
- get: function() {
51
- var n = this.asProps, r = n.data, t = n.loading;
52
- return t ? this.defaultData : r;
55
+ get: function get() {
56
+ var _this$asProps = this.asProps, data = _this$asProps.data, loading = _this$asProps.loading;
57
+ if (loading) {
58
+ return this.defaultData;
59
+ }
60
+ return data;
53
61
  }
54
62
  }, {
55
63
  key: "render",
56
- value: function() {
57
- var n = this.asProps, r, t = this, S = M, a = this.asProps, T = a.styles, d = a.resolveColor, C = a.isHistogram, B = a.animate, x = a.loading, p = this.defaultWidth / this.data.length, u = W(this.asProps), H = u.__excludeProps, k = u.extractedAriaProps;
58
- return r = G(T), /* @__PURE__ */ _.createElement(S, r.cn("STrendBar", h({}, v({
59
- ref: this.containerRef,
60
- __excludeProps: ["data"].concat(w(H))
61
- }, n))), /* @__PURE__ */ _.createElement("svg", r.cn("svg", h({
62
- width: "100%",
63
- height: "100%",
64
- viewBox: "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight),
65
- role: "img"
66
- }, k)), this.data.map(function(o, m) {
67
- var f = d("chart-palette-order-other-data");
68
- return o.color && (f = d(o.color)), /* @__PURE__ */ _.createElement("rect", {
69
- key: m,
70
- x: p * m,
71
- y: t.defaultHeight - o.value,
72
- width: C ? p : p * 0.8,
73
- height: o.value,
74
- fill: f
75
- }, B && !x && /* @__PURE__ */ _.createElement("animate", {
64
+ value: function render() {
65
+ var _ref = this.asProps, _ref2, _this = this;
66
+ var STrendBar = Box;
67
+ var _this$asProps2 = this.asProps, styles = _this$asProps2.styles, resolveColor = _this$asProps2.resolveColor, isHistogram = _this$asProps2.isHistogram, animate = _this$asProps2.animate, loading = _this$asProps2.loading;
68
+ var step = this.defaultWidth / this.data.length;
69
+ var _extractAriaProps = extractAriaProps(this.asProps), __excludeProps = _extractAriaProps.__excludeProps, extractedAriaProps = _extractAriaProps.extractedAriaProps;
70
+ return _ref2 = sstyled$1(styles), /* @__PURE__ */ React.createElement(STrendBar, _ref2.cn("STrendBar", _objectSpread({}, assignProps({
71
+ "ref": this.containerRef,
72
+ "__excludeProps": ["data"].concat(_toConsumableArray(__excludeProps))
73
+ }, _ref))), /* @__PURE__ */ React.createElement("svg", _ref2.cn("svg", _objectSpread({
74
+ "width": "100%",
75
+ "height": "100%",
76
+ "viewBox": "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight),
77
+ "role": "img"
78
+ }, extractedAriaProps)), this.data.map(function(barItem, index) {
79
+ var color = resolveColor("chart-palette-order-other-data");
80
+ if (barItem.color) {
81
+ color = resolveColor(barItem.color);
82
+ }
83
+ return /* @__PURE__ */ React.createElement("rect", {
84
+ key: index,
85
+ x: step * index,
86
+ y: _this.defaultHeight - barItem.value,
87
+ width: isHistogram ? step : step * 0.8,
88
+ height: barItem.value,
89
+ fill: color
90
+ }, animate && !loading && /* @__PURE__ */ React.createElement("animate", {
76
91
  attributeName: "y",
77
- values: "".concat(t.defaultHeight, ";").concat(t.defaultHeight - o.value),
92
+ values: "".concat(_this.defaultHeight, ";").concat(_this.defaultHeight - barItem.value),
78
93
  dur: "500ms"
79
94
  }));
80
95
  })));
81
96
  }
82
- }]), e;
83
- }($);
84
- c(i, "enhance", [N()]);
85
- c(i, "style", j);
86
- c(i, "defaultProps", {
87
- animate: !0
97
+ }]);
98
+ return TrendBarRoot2;
99
+ }(Trend);
100
+ _defineProperty(TrendBarRoot, "enhance", [resolveColorEnhance()]);
101
+ _defineProperty(TrendBarRoot, "style", style);
102
+ _defineProperty(TrendBarRoot, "defaultProps", {
103
+ animate: true
88
104
  });
89
- var P = y(i);
90
- P.displayName = "MiniChart.TrendBar";
91
- var ee = y(i, {}, {
105
+ var TrendBar = createComponent(TrendBarRoot);
106
+ TrendBar.displayName = "MiniChart.TrendBar";
107
+ var TrendHistogram = createComponent(TrendBarRoot, {}, {
92
108
  enhancements: [function() {
93
109
  return {
94
- wrapperProps: function(s) {
95
- return v(s, {
96
- isHistogram: !0
110
+ wrapperProps: function wrapperProps(props) {
111
+ return assignProps(props, {
112
+ isHistogram: true
97
113
  });
98
114
  }
99
115
  };
100
116
  }]
101
117
  });
102
- P.displayName = "MiniChart.TrendHistogram";
118
+ TrendBar.displayName = "MiniChart.TrendHistogram";
103
119
  export {
104
- P as TrendBar,
105
- ee as TrendHistogram
120
+ TrendBar,
121
+ TrendHistogram
106
122
  };
@@ -1,140 +1,159 @@
1
- import A from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import v from "@babel/runtime/helpers/esm/objectSpread2";
3
- import E from "@babel/runtime/helpers/esm/classCallCheck";
4
- import R from "@babel/runtime/helpers/esm/createClass";
5
- import H from "@babel/runtime/helpers/esm/inherits";
6
- import W from "@babel/runtime/helpers/esm/createSuper";
7
- import h from "@babel/runtime/helpers/esm/defineProperty";
8
- import { sstyled as $ } from "@semcore/utils/lib/core/index";
9
- import C, { assignProps as S, sstyled as b } from "@semcore/core";
10
- import i from "react";
11
- import D from "@semcore/utils/lib/enhances/resolveColorEnhance";
12
- import B from "@semcore/utils/lib/uniqueID";
13
- import { Trend as j } from "./Trend.mjs";
14
- import { Box as G } from "@semcore/flex-box";
15
- import { extractAriaProps as N } from "@semcore/utils/lib/ariaProps";
16
- var M = (
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
6
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
7
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled } from "@semcore/utils/lib/core/index";
9
+ import createComponent, { assignProps, sstyled as sstyled$1 } from "@semcore/core";
10
+ import React from "react";
11
+ import resolveColorEnhance from "@semcore/utils/lib/enhances/resolveColorEnhance";
12
+ import uniqueIDEnhancement from "@semcore/utils/lib/uniqueID";
13
+ import { Trend } from "./Trend.mjs";
14
+ import { Box } from "@semcore/flex-box";
15
+ import { extractAriaProps } from "@semcore/utils/lib/ariaProps";
16
+ /*!__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
17
+ var style = (
17
18
  /*__reshadow_css_start__*/
18
- ($.insert(
19
+ (sstyled.insert(
19
20
  /*__inner_css_start__*/
20
- "@keyframes pulse_1p7cy{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_1p7cy_gg_.__loading_1p7cy_gg_,.___SLineGauge_1p7cy_gg_.__loading_1p7cy_gg_,.___STrendBar_1p7cy_gg_.__loading_1p7cy_gg_,.___STrendLine_1p7cy_gg_.__loading_1p7cy_gg_{animation-name:pulse_1p7cy;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
21
- "1p7cy_gg_"
22
- ), {
23
- __SLineGauge: "___SLineGauge_1p7cy_gg_",
24
- _loading: "__loading_1p7cy_gg_",
25
- __SDonutContainer: "___SDonutContainer_1p7cy_gg_",
26
- __STrendLine: "___STrendLine_1p7cy_gg_",
27
- __STrendBar: "___STrendBar_1p7cy_gg_",
28
- "@pulse": "pulse_1p7cy"
21
+ "@keyframes pulse_wwiiw{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_wwiiw_gg_.__loading_wwiiw_gg_,.___SLineGauge_wwiiw_gg_.__loading_wwiiw_gg_,.___STrendBar_wwiiw_gg_.__loading_wwiiw_gg_,.___STrendLine_wwiiw_gg_.__loading_wwiiw_gg_{animation-name:pulse_wwiiw;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
22
+ /*__inner_css_end__*/
23
+ "wwiiw_gg_"
24
+ ), /*__reshadow_css_end__*/
25
+ {
26
+ "__SLineGauge": "___SLineGauge_wwiiw_gg_",
27
+ "_loading": "__loading_wwiiw_gg_",
28
+ "__SDonutContainer": "___SDonutContainer_wwiiw_gg_",
29
+ "__STrendLine": "___STrendLine_wwiiw_gg_",
30
+ "__STrendBar": "___STrendBar_wwiiw_gg_",
31
+ "@pulse": "pulse_wwiiw"
29
32
  })
30
- ), l = /* @__PURE__ */ function(g) {
31
- H(s, g);
32
- var p = W(s);
33
- function s() {
34
- return E(this, s), p.apply(this, arguments);
33
+ );
34
+ var TrendLineRoot = /* @__PURE__ */ function(_Trend) {
35
+ _inherits(TrendLineRoot2, _Trend);
36
+ var _super = _createSuper(TrendLineRoot2);
37
+ function TrendLineRoot2() {
38
+ _classCallCheck(this, TrendLineRoot2);
39
+ return _super.apply(this, arguments);
35
40
  }
36
- return R(s, [{
41
+ _createClass(TrendLineRoot2, [{
37
42
  key: "defaultData",
38
- get: function() {
43
+ get: function get() {
39
44
  return [15, 70, 20, 85, 20];
40
45
  }
41
46
  }, {
42
47
  key: "lastPointRadius",
43
- get: function() {
44
- var e;
45
- return (e = this.asProps.lastPointRadius) !== null && e !== void 0 ? e : 6;
48
+ get: function get() {
49
+ var _this$asProps$lastPoi;
50
+ return (_this$asProps$lastPoi = this.asProps.lastPointRadius) !== null && _this$asProps$lastPoi !== void 0 ? _this$asProps$lastPoi : 6;
46
51
  }
47
52
  }, {
48
53
  key: "data",
49
- get: function() {
50
- var e = this.asProps, t = e.data, o = e.loading;
51
- return o ? this.defaultData : t;
54
+ get: function get() {
55
+ var _this$asProps = this.asProps, data = _this$asProps.data, loading = _this$asProps.loading;
56
+ if (loading) {
57
+ return this.defaultData;
58
+ }
59
+ return data;
52
60
  }
53
61
  }, {
54
62
  key: "svgWidth",
55
- get: function() {
63
+ get: function get() {
56
64
  return this.asProps.lastPointColor ? this.defaultWidth + this.lastPointRadius : this.defaultWidth;
57
65
  }
58
66
  }, {
59
67
  key: "svgHeight",
60
- get: function() {
68
+ get: function get() {
61
69
  return this.asProps.lastPointColor ? this.defaultHeight + this.lastPointRadius : this.defaultHeight;
62
70
  }
63
71
  }, {
64
72
  key: "color",
65
- get: function() {
66
- var e = this.asProps, t = e.resolveColor, o = e.color, r = o === void 0 ? "chart-palette-order-1" : o, n = e.loading;
67
- return t(n ? "skeleton-bg" : r);
73
+ get: function get() {
74
+ var _this$asProps2 = this.asProps, resolveColor = _this$asProps2.resolveColor, _this$asProps2$color = _this$asProps2.color, color = _this$asProps2$color === void 0 ? "chart-palette-order-1" : _this$asProps2$color, loading = _this$asProps2.loading;
75
+ if (loading) {
76
+ return resolveColor("skeleton-bg");
77
+ }
78
+ return resolveColor(color);
68
79
  }
69
80
  }, {
70
81
  key: "render",
71
- value: function() {
72
- for (var e = this.asProps, t, o = G, r = this.asProps, n = r.uid, k = r.withArea, T = r.animate, u = r.lastPointColor, m = r.resolveColor, f = r.loading, x = r.styles, d = [], c = this.data.length, y = this.defaultWidth / (c - 1), _ = 0; _ < c; _++)
73
- d.push("".concat(y * _, ",").concat(this.defaultHeight - this.data[_]));
74
- var P = N(this.asProps), L = P.__excludeProps, w = P.extractedAriaProps;
75
- return t = b(x), /* @__PURE__ */ i.createElement(o, t.cn("STrendLine", v({}, S({
76
- ref: this.containerRef,
77
- __excludeProps: ["data"].concat(A(L))
78
- }, e))), /* @__PURE__ */ i.createElement("svg", t.cn("svg", v({
79
- width: "100%",
80
- height: "100%",
81
- viewBox: "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight),
82
- role: "img"
83
- }, w)), /* @__PURE__ */ i.createElement("polyline", t.cn("polyline", {
84
- points: d.join(" "),
85
- stroke: this.color,
86
- strokeWidth: "4",
87
- fill: "none",
88
- clipPath: "url(#".concat(n, ")")
89
- })), k && /* @__PURE__ */ i.createElement("polyline", t.cn("polyline", {
90
- points: "0,".concat(this.defaultHeight, " ").concat(d.join(" "), " ").concat(this.defaultWidth, ",").concat(this.defaultHeight),
91
- fill: this.color,
92
- fillOpacity: 0.2,
93
- clipPath: "url(#".concat(n, ")")
94
- })), u && !f && /* @__PURE__ */ i.createElement("circle", t.cn("circle", {
95
- cx: y * (c - 1),
96
- cy: this.defaultHeight - this.data[c - 1],
97
- r: this.lastPointRadius,
98
- fill: m(u),
99
- stroke: m("chart-grid-border"),
100
- strokeWidth: 4,
101
- clipPath: "url(#".concat(n, ")")
102
- })), T && !f && /* @__PURE__ */ i.createElement("clipPath", t.cn("clipPath", {
103
- id: n
104
- }), /* @__PURE__ */ i.createElement("rect", t.cn("rect", {
105
- x: "0",
106
- y: "0",
107
- width: "100%",
108
- height: "100%",
109
- fill: "black"
110
- }), /* @__PURE__ */ i.createElement("animate", t.cn("animate", {
111
- dur: "500ms",
112
- attributeName: "width",
113
- values: "0;100%"
82
+ value: function render() {
83
+ var _ref = this.asProps, _ref2;
84
+ var STrendLine = Box;
85
+ var _this$asProps3 = this.asProps, uid = _this$asProps3.uid, withArea = _this$asProps3.withArea, animate = _this$asProps3.animate, lastPointColor = _this$asProps3.lastPointColor, resolveColor = _this$asProps3.resolveColor, loading = _this$asProps3.loading, styles = _this$asProps3.styles;
86
+ var points = [];
87
+ var length = this.data.length;
88
+ var step = this.defaultWidth / (length - 1);
89
+ for (var i = 0; i < length; i++) {
90
+ points.push("".concat(step * i, ",").concat(this.defaultHeight - this.data[i]));
91
+ }
92
+ var _extractAriaProps = extractAriaProps(this.asProps), __excludeProps = _extractAriaProps.__excludeProps, extractedAriaProps = _extractAriaProps.extractedAriaProps;
93
+ return _ref2 = sstyled$1(styles), /* @__PURE__ */ React.createElement(STrendLine, _ref2.cn("STrendLine", _objectSpread({}, assignProps({
94
+ "ref": this.containerRef,
95
+ "__excludeProps": ["data"].concat(_toConsumableArray(__excludeProps))
96
+ }, _ref))), /* @__PURE__ */ React.createElement("svg", _ref2.cn("svg", _objectSpread({
97
+ "width": "100%",
98
+ "height": "100%",
99
+ "viewBox": "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight),
100
+ "role": "img"
101
+ }, extractedAriaProps)), /* @__PURE__ */ React.createElement("polyline", _ref2.cn("polyline", {
102
+ "points": points.join(" "),
103
+ "stroke": this.color,
104
+ "strokeWidth": "4",
105
+ "fill": "none",
106
+ "clipPath": "url(#".concat(uid, ")")
107
+ })), withArea && /* @__PURE__ */ React.createElement("polyline", _ref2.cn("polyline", {
108
+ "points": "0,".concat(this.defaultHeight, " ").concat(points.join(" "), " ").concat(this.defaultWidth, ",").concat(this.defaultHeight),
109
+ "fill": this.color,
110
+ "fillOpacity": 0.2,
111
+ "clipPath": "url(#".concat(uid, ")")
112
+ })), lastPointColor && !loading && /* @__PURE__ */ React.createElement("circle", _ref2.cn("circle", {
113
+ "cx": step * (length - 1),
114
+ "cy": this.defaultHeight - this.data[length - 1],
115
+ "r": this.lastPointRadius,
116
+ "fill": resolveColor(lastPointColor),
117
+ "stroke": resolveColor("chart-grid-border"),
118
+ "strokeWidth": 4,
119
+ "clipPath": "url(#".concat(uid, ")")
120
+ })), animate && !loading && /* @__PURE__ */ React.createElement("clipPath", _ref2.cn("clipPath", {
121
+ "id": uid
122
+ }), /* @__PURE__ */ React.createElement("rect", _ref2.cn("rect", {
123
+ "x": "0",
124
+ "y": "0",
125
+ "width": "100%",
126
+ "height": "100%",
127
+ "fill": "black"
128
+ }), /* @__PURE__ */ React.createElement("animate", _ref2.cn("animate", {
129
+ "dur": "500ms",
130
+ "attributeName": "width",
131
+ "values": "0;100%"
114
132
  }))))));
115
133
  }
116
- }]), s;
117
- }(j);
118
- h(l, "enhance", [D(), B()]);
119
- h(l, "style", M);
120
- h(l, "defaultProps", {
121
- animate: !0
134
+ }]);
135
+ return TrendLineRoot2;
136
+ }(Trend);
137
+ _defineProperty(TrendLineRoot, "enhance", [resolveColorEnhance(), uniqueIDEnhancement()]);
138
+ _defineProperty(TrendLineRoot, "style", style);
139
+ _defineProperty(TrendLineRoot, "defaultProps", {
140
+ animate: true
122
141
  });
123
- var q = C(l);
124
- q.displayName = "MiniChart.TrendLine";
125
- var I = C(l, {}, {
142
+ var TrendLine = createComponent(TrendLineRoot);
143
+ TrendLine.displayName = "MiniChart.TrendLine";
144
+ var TrendArea = createComponent(TrendLineRoot, {}, {
126
145
  enhancements: [function() {
127
146
  return {
128
- wrapperProps: function(p) {
129
- return S(p, {
130
- withArea: !0
147
+ wrapperProps: function wrapperProps(props) {
148
+ return assignProps(props, {
149
+ withArea: true
131
150
  });
132
151
  }
133
152
  };
134
153
  }]
135
154
  });
136
- I.displayName = "MiniChart.TrendArea";
155
+ TrendArea.displayName = "MiniChart.TrendArea";
137
156
  export {
138
- I as TrendArea,
139
- q as TrendLine
157
+ TrendArea,
158
+ TrendLine
140
159
  };