@semcore/mini-chart 0.29.1 → 16.0.0-prerelease.4

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.
@@ -4,101 +4,100 @@ import R from "@babel/runtime/helpers/esm/createClass";
4
4
  import X from "@babel/runtime/helpers/esm/inherits";
5
5
  import j from "@babel/runtime/helpers/esm/createSuper";
6
6
  import S from "@babel/runtime/helpers/esm/defineProperty";
7
- import { sstyled as z } from "@semcore/utils/lib/core/index";
8
- import F, { sstyled as d, assignProps as G, Component as M } from "@semcore/core";
7
+ import { sstyled as m, createComponent as z, assignProps as G, Component as F } from "@semcore/core";
9
8
  import e from "react";
10
- import { Box as g, Flex as q } from "@semcore/flex-box";
11
- import H from "@semcore/utils/lib/enhances/resolveColorEnhance";
12
- var J = (
9
+ import { Box as g, Flex as M } from "@semcore/flex-box";
10
+ import q from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
11
+ var H = (
13
12
  /*__reshadow_css_start__*/
14
- (z.insert(
13
+ (m.insert(
15
14
  /*__inner_css_start__*/
16
- "@keyframes pulse_1b7u0{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_1b7u0{0%{transform:translateX(0)}to{transform:translateX(100%)}}.___SDonutContainer_1b7u0_gg_.__loading_1b7u0_gg_,.___SLineGauge_1b7u0_gg_.__loading_1b7u0_gg_,.___STrendBar_1b7u0_gg_.__loading_1b7u0_gg_,.___STrendLine_1b7u0_gg_.__loading_1b7u0_gg_{animation-name:pulse_1b7u0;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_1b7u0_gg_{height:8px;background-color:var(--base-bg-color_1b7u0, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineValue_1b7u0_gg_{height:8px;border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_1b7u0_gg_.__percent_1b7u0_gg_{width:var(--percent_1b7u0)}.___SLineSegmentItem_1b7u0_gg_.__color_1b7u0_gg_,.___SLineValue_1b7u0_gg_.__color_1b7u0_gg_{background-color:var(--color_1b7u0, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_1b7u0_gg_.__segments_1b7u0_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SAnimationLine_1b7u0_gg_,.___SLineGaugeSegment_1b7u0_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_1b7u0_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_1b7u0_gg_{height:8px;background:0 0;border-right-color:var(--intergalactic-chart-grid-border, #ffffff);border-right-style:solid;border-right-width:1px;box-sizing:content-box}.___SAnimationLine_1b7u0_gg_{background-color:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9);transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out;animation-name:move-line_1b7u0;animation-duration:.5s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}",
17
- "1b7u0_gg_"
15
+ "@keyframes pulse_2vm7d{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_2vm7d{0%{transform:translateX(0)}to{transform:translateX(100%)}}.___SDonutContainer_2vm7d_gg_.__loading_2vm7d_gg_,.___SLineGauge_2vm7d_gg_.__loading_2vm7d_gg_,.___STrendBar_2vm7d_gg_.__loading_2vm7d_gg_,.___STrendLine_2vm7d_gg_.__loading_2vm7d_gg_{animation-name:pulse_2vm7d;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_2vm7d_gg_{height:8px;background-color:var(--base-bg-color_2vm7d, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineValue_2vm7d_gg_{height:8px;border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_2vm7d_gg_.__percent_2vm7d_gg_{width:var(--percent_2vm7d)}.___SLineSegmentItem_2vm7d_gg_.__color_2vm7d_gg_,.___SLineValue_2vm7d_gg_.__color_2vm7d_gg_{background-color:var(--color_2vm7d, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_2vm7d_gg_.__segments_2vm7d_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SAnimationLine_2vm7d_gg_,.___SLineGaugeSegment_2vm7d_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_2vm7d_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_2vm7d_gg_{height:8px;background:0 0;border-right-color:var(--intergalactic-chart-grid-border, #ffffff);border-right-style:solid;border-right-width:1px;box-sizing:content-box}.___SAnimationLine_2vm7d_gg_{background-color:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9);transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out;animation-name:move-line_2vm7d;animation-duration:.5s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}",
16
+ "2vm7d_gg_"
18
17
  ), {
19
- __SLineGauge: "___SLineGauge_1b7u0_gg_",
20
- _loading: "__loading_1b7u0_gg_",
21
- __SDonutContainer: "___SDonutContainer_1b7u0_gg_",
22
- __STrendLine: "___STrendLine_1b7u0_gg_",
23
- __STrendBar: "___STrendBar_1b7u0_gg_",
24
- "@pulse": "pulse_1b7u0",
25
- "--base-bg-color": "--base-bg-color_1b7u0",
26
- __SLineValue: "___SLineValue_1b7u0_gg_",
27
- _percent: "__percent_1b7u0_gg_",
28
- "--percent": "--percent_1b7u0",
29
- _color: "__color_1b7u0_gg_",
30
- __SLineSegmentItem: "___SLineSegmentItem_1b7u0_gg_",
31
- "--color": "--color_1b7u0",
32
- _segments: "__segments_1b7u0_gg_",
33
- __SLineGaugeSegment: "___SLineGaugeSegment_1b7u0_gg_",
34
- __SAnimationLine: "___SAnimationLine_1b7u0_gg_",
35
- "@move-line": "move-line_1b7u0"
18
+ __SLineGauge: "___SLineGauge_2vm7d_gg_",
19
+ _loading: "__loading_2vm7d_gg_",
20
+ __SDonutContainer: "___SDonutContainer_2vm7d_gg_",
21
+ __STrendLine: "___STrendLine_2vm7d_gg_",
22
+ __STrendBar: "___STrendBar_2vm7d_gg_",
23
+ "@pulse": "pulse_2vm7d",
24
+ "--base-bg-color": "--base-bg-color_2vm7d",
25
+ __SLineValue: "___SLineValue_2vm7d_gg_",
26
+ _percent: "__percent_2vm7d_gg_",
27
+ "--percent": "--percent_2vm7d",
28
+ _color: "__color_2vm7d_gg_",
29
+ __SLineSegmentItem: "___SLineSegmentItem_2vm7d_gg_",
30
+ "--color": "--color_2vm7d",
31
+ _segments: "__segments_2vm7d_gg_",
32
+ __SLineGaugeSegment: "___SLineGaugeSegment_2vm7d_gg_",
33
+ __SAnimationLine: "___SAnimationLine_2vm7d_gg_",
34
+ "@move-line": "move-line_2vm7d"
36
35
  })
37
36
  ), l = /* @__PURE__ */ function(p) {
38
- X(n, p);
39
- var v = j(n);
40
- function n() {
41
- return N(this, n), v.apply(this, arguments);
37
+ X(r, p);
38
+ var h = j(r);
39
+ function r() {
40
+ return N(this, r), h.apply(this, arguments);
42
41
  }
43
- return R(n, [{
42
+ return R(r, [{
44
43
  key: "getSegmentProps",
45
44
  value: function(t) {
46
- var _ = this.asProps, c = _.children, L = _.resolveColor, a = 0;
45
+ var _ = this.asProps, c = _.children, f = _.resolveColor, a = 0;
47
46
  e.Children.forEach(c, function(s) {
48
47
  /* @__PURE__ */ e.isValidElement(s) && (a = a + s.props.value);
49
48
  });
50
- var u = a > 0 ? 100 * t.value / a : 0;
49
+ var d = a > 0 ? 100 * t.value / a : 0;
51
50
  return {
52
- w: "".concat(u, "%"),
53
- "use:color": L(t.color)
51
+ w: "".concat(d, "%"),
52
+ "use:color": f(t.color)
54
53
  };
55
54
  }
56
55
  }, {
57
56
  key: "render",
58
57
  value: function() {
59
- var t = this.asProps, _, c = g, L = g, a = g, u = q, s = g, r = this.asProps, f = r.value, y = r.styles, E = r.color, P = E === void 0 ? "chart-palette-order-1" : E, k = r.baseBgColor, m = r.resolveColor, B = r.loading, T = r.children, $ = r.Children, w = r.animate;
58
+ var t = this.asProps, _, c = g, f = g, a = g, d = M, s = g, n = this.asProps, b = n.value, y = n.styles, E = n.color, P = E === void 0 ? "chart-palette-order-1" : E, k = n.baseBgColor, v = n.resolveColor, B = n.loading, T = n.children, $ = n.Children, w = n.animate;
60
59
  if (T !== void 0) {
61
60
  var i;
62
- return i = d(y), /* @__PURE__ */ e.createElement(c, i.cn("SLineGauge", x({}, G({
61
+ return i = m(y), /* @__PURE__ */ e.createElement(c, i.cn("SLineGauge", x({}, G({
63
62
  segments: !0,
64
- "base-bg-color": m(k)
65
- }, t))), /* @__PURE__ */ e.createElement(u, i.cn("SLineGaugeSegment", {}), /* @__PURE__ */ e.createElement($, i.cn("Children", {}))), w && /* @__PURE__ */ e.createElement(a, i.cn("SAnimationLine", {})));
63
+ "base-bg-color": v(k)
64
+ }, t))), /* @__PURE__ */ e.createElement(d, i.cn("SLineGaugeSegment", {}), /* @__PURE__ */ e.createElement($, i.cn("Children", {}))), w && /* @__PURE__ */ e.createElement(a, i.cn("SAnimationLine", {})));
66
65
  }
67
66
  var o = this.asProps.segments, C = [];
68
67
  if (o)
69
- for (var b = 0; b < o; b++) {
68
+ for (var u = 0; u < o; u++) {
70
69
  var I, D = "calc((100% - ".concat(o - 1, "px) / ").concat(o, ")");
71
- C.push((I = d(y), /* @__PURE__ */ e.createElement(s, I.cn("SLineSegmentItem", {
72
- key: b,
73
- color: b < f ? m(P) : void 0,
70
+ C.push((I = m(y), /* @__PURE__ */ e.createElement(s, I.cn("SLineSegmentItem", {
71
+ key: u,
72
+ color: u < b ? v(P) : void 0,
74
73
  w: D
75
74
  }))));
76
75
  }
77
- var V = "".concat(f, "%");
78
- return o && (V = "".concat(f / o * 100, "%")), _ = d(y), /* @__PURE__ */ e.createElement(c, _.cn("SLineGauge", x({}, G({
79
- "base-bg-color": m(k)
80
- }, t))), !B && /* @__PURE__ */ e.createElement(L, _.cn("SLineValue", {
76
+ var V = "".concat(b, "%");
77
+ return o && (V = "".concat(b / o * 100, "%")), _ = m(y), /* @__PURE__ */ e.createElement(c, _.cn("SLineGauge", x({}, G({
78
+ "base-bg-color": v(k)
79
+ }, t))), !B && /* @__PURE__ */ e.createElement(f, _.cn("SLineValue", {
81
80
  w: V,
82
- color: m(P)
83
- })), !!C.length && /* @__PURE__ */ e.createElement(u, _.cn("SLineGaugeSegment", {}), C), w && /* @__PURE__ */ e.createElement(a, _.cn("SAnimationLine", {})));
81
+ color: v(P)
82
+ })), !!C.length && /* @__PURE__ */ e.createElement(d, _.cn("SLineGaugeSegment", {}), C), w && /* @__PURE__ */ e.createElement(a, _.cn("SAnimationLine", {})));
84
83
  }
85
- }]), n;
86
- }(M);
87
- S(l, "enhance", [H()]);
84
+ }]), r;
85
+ }(F);
86
+ S(l, "enhance", [q()]);
88
87
  S(l, "displayName", "ScoreLine");
89
- S(l, "style", J);
88
+ S(l, "style", H);
90
89
  S(l, "defaultProps", {
91
90
  animate: !0
92
91
  });
93
92
  function A(p) {
94
- var v = arguments[0], n, h = p.styles, t = g;
95
- return n = d(h), /* @__PURE__ */ e.createElement(t, n.cn("SLineSegmentItem", x({}, G({}, v))));
93
+ var h = arguments[0], r, L = p.styles, t = g;
94
+ return r = m(L), /* @__PURE__ */ e.createElement(t, r.cn("SLineSegmentItem", x({}, G({}, h))));
96
95
  }
97
96
  A.displayName = "Segment";
98
- var K = F(l, {
97
+ var J = z(l, {
99
98
  Segment: A
100
99
  });
101
- K.displayName = "MiniChart.ScoreLine";
100
+ J.displayName = "MiniChart.ScoreLine";
102
101
  export {
103
- K as ScoreLine
102
+ J as ScoreLine
104
103
  };
@@ -1,33 +1,32 @@
1
1
  import w from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import h from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import f from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import L from "@babel/runtime/helpers/esm/classCallCheck";
4
4
  import A from "@babel/runtime/helpers/esm/createClass";
5
5
  import D from "@babel/runtime/helpers/esm/inherits";
6
6
  import E from "@babel/runtime/helpers/esm/createSuper";
7
7
  import l from "@babel/runtime/helpers/esm/defineProperty";
8
- import { sstyled as R } from "@semcore/utils/lib/core/index";
9
- import v, { assignProps as y, sstyled as G } from "@semcore/core";
8
+ import { sstyled as v, createComponent as y, assignProps as j } from "@semcore/core";
10
9
  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 = (
10
+ import R from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
11
+ import { Trend as G } from "./Trend.mjs";
12
+ import { Box as N } from "@semcore/flex-box";
13
+ import { extractAriaProps as M } from "@semcore/core/lib/utils/ariaProps";
14
+ var W = (
16
15
  /*__reshadow_css_start__*/
17
- (R.insert(
16
+ (v.insert(
18
17
  /*__inner_css_start__*/
19
- "@keyframes pulse_18ffn{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_18ffn_gg_.__loading_18ffn_gg_,.___SLineGauge_18ffn_gg_.__loading_18ffn_gg_,.___STrendBar_18ffn_gg_.__loading_18ffn_gg_,.___STrendLine_18ffn_gg_.__loading_18ffn_gg_{animation-name:pulse_18ffn;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
20
- "18ffn_gg_"
18
+ "@keyframes pulse_7jer1{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_7jer1_gg_.__loading_7jer1_gg_,.___SLineGauge_7jer1_gg_.__loading_7jer1_gg_,.___STrendBar_7jer1_gg_.__loading_7jer1_gg_,.___STrendLine_7jer1_gg_.__loading_7jer1_gg_{animation-name:pulse_7jer1;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
19
+ "7jer1_gg_"
21
20
  ), {
22
- __SLineGauge: "___SLineGauge_18ffn_gg_",
23
- _loading: "__loading_18ffn_gg_",
24
- __SDonutContainer: "___SDonutContainer_18ffn_gg_",
25
- __STrendLine: "___STrendLine_18ffn_gg_",
26
- __STrendBar: "___STrendBar_18ffn_gg_",
27
- "@pulse": "pulse_18ffn"
21
+ __SLineGauge: "___SLineGauge_7jer1_gg_",
22
+ _loading: "__loading_7jer1_gg_",
23
+ __SDonutContainer: "___SDonutContainer_7jer1_gg_",
24
+ __STrendLine: "___STrendLine_7jer1_gg_",
25
+ __STrendBar: "___STrendBar_7jer1_gg_",
26
+ "@pulse": "pulse_7jer1"
28
27
  })
29
- ), o = /* @__PURE__ */ function(g) {
30
- D(e, g);
28
+ ), o = /* @__PURE__ */ function(u) {
29
+ D(e, u);
31
30
  var s = E(e);
32
31
  function e() {
33
32
  return L(this, e), s.apply(this, arguments);
@@ -48,51 +47,51 @@ var j = (
48
47
  }, {
49
48
  key: "data",
50
49
  get: function() {
51
- var i = this.asProps, r = i.data, t = i.loading;
50
+ var n = this.asProps, r = n.data, t = n.loading;
52
51
  return t ? this.defaultData : r;
53
52
  }
54
53
  }, {
55
54
  key: "render",
56
55
  value: function() {
57
- var i = this.asProps, r, t = this, S = M, a = this.asProps, T = a.styles, u = a.resolveColor, C = a.isHistogram, B = a.animate, x = a.loading, f = this.defaultWidth / this.data.length, p = W(this.asProps), H = p.__excludeProps, k = p.extractedAriaProps;
58
- return r = G(T), /* @__PURE__ */ _.createElement(S, r.cn("STrendBar", h({}, y({
56
+ var n = this.asProps, r, t = this, S = N, a = this.asProps, T = a.styles, p = a.resolveColor, C = a.isHistogram, B = a.animate, x = a.loading, g = this.defaultWidth / this.data.length, c = M(this.asProps), H = c.__excludeProps, k = c.extractedAriaProps;
57
+ return r = v(T), /* @__PURE__ */ _.createElement(S, r.cn("STrendBar", f({}, j({
59
58
  ref: this.containerRef,
60
59
  __excludeProps: ["data"].concat(w(H))
61
- }, i))), /* @__PURE__ */ _.createElement("svg", r.cn("svg", h({
60
+ }, n))), /* @__PURE__ */ _.createElement("svg", r.cn("svg", f({
62
61
  width: "100%",
63
62
  height: "100%",
64
63
  viewBox: "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight),
65
64
  role: "img"
66
- }, k)), this.data.map(function(n, m) {
67
- var c = u("chart-palette-order-other-data");
68
- return n.color && (c = u(n.color)), /* @__PURE__ */ _.createElement("rect", {
65
+ }, k)), this.data.map(function(i, m) {
66
+ var h = p("chart-palette-order-other-data");
67
+ return i.color && (h = p(i.color)), /* @__PURE__ */ _.createElement("rect", {
69
68
  key: m,
70
- x: f * m,
71
- y: t.defaultHeight - n.value,
72
- width: C ? f : f * 0.8,
73
- height: n.value,
74
- fill: c
69
+ x: g * m,
70
+ y: t.defaultHeight - i.value,
71
+ width: C ? g : g * 0.8,
72
+ height: i.value,
73
+ fill: h
75
74
  }, B && !x && /* @__PURE__ */ _.createElement("animate", {
76
75
  attributeName: "y",
77
- values: "".concat(t.defaultHeight, ";").concat(t.defaultHeight - n.value),
76
+ values: "".concat(t.defaultHeight, ";").concat(t.defaultHeight - i.value),
78
77
  dur: "500ms"
79
78
  }));
80
79
  })));
81
80
  }
82
81
  }]), e;
83
- }($);
84
- l(o, "enhance", [N()]);
85
- l(o, "style", j);
82
+ }(G);
83
+ l(o, "enhance", [R()]);
84
+ l(o, "style", W);
86
85
  l(o, "defaultProps", {
87
86
  animate: !0
88
87
  });
89
- var P = v(o);
88
+ var P = y(o);
90
89
  P.displayName = "MiniChart.TrendBar";
91
- var ee = v(o, {}, {
90
+ var b = y(o, {}, {
92
91
  enhancements: [function() {
93
92
  return {
94
93
  wrapperProps: function(s) {
95
- return y(s, {
94
+ return j(s, {
96
95
  isHistogram: !0
97
96
  });
98
97
  }
@@ -102,5 +101,5 @@ var ee = v(o, {}, {
102
101
  P.displayName = "MiniChart.TrendHistogram";
103
102
  export {
104
103
  P as TrendBar,
105
- ee as TrendHistogram
104
+ b as TrendHistogram
106
105
  };
@@ -4,34 +4,33 @@ import E from "@babel/runtime/helpers/esm/classCallCheck";
4
4
  import R from "@babel/runtime/helpers/esm/createClass";
5
5
  import H from "@babel/runtime/helpers/esm/inherits";
6
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";
7
+ import g from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled as j, createComponent as C, assignProps as S } from "@semcore/core";
10
9
  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 = (
10
+ import $ from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
11
+ import b from "@semcore/core/lib/utils/uniqueID";
12
+ import { Trend as D } from "./Trend.mjs";
13
+ import { Box as B } from "@semcore/flex-box";
14
+ import { extractAriaProps as G } from "@semcore/core/lib/utils/ariaProps";
15
+ var N = (
17
16
  /*__reshadow_css_start__*/
18
- ($.insert(
17
+ (j.insert(
19
18
  /*__inner_css_start__*/
20
- "@keyframes pulse_18ffn{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_18ffn_gg_.__loading_18ffn_gg_,.___SLineGauge_18ffn_gg_.__loading_18ffn_gg_,.___STrendBar_18ffn_gg_.__loading_18ffn_gg_,.___STrendLine_18ffn_gg_.__loading_18ffn_gg_{animation-name:pulse_18ffn;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
21
- "18ffn_gg_"
19
+ "@keyframes pulse_7jer1{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_7jer1_gg_.__loading_7jer1_gg_,.___SLineGauge_7jer1_gg_.__loading_7jer1_gg_,.___STrendBar_7jer1_gg_.__loading_7jer1_gg_,.___STrendLine_7jer1_gg_.__loading_7jer1_gg_{animation-name:pulse_7jer1;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
20
+ "7jer1_gg_"
22
21
  ), {
23
- __SLineGauge: "___SLineGauge_18ffn_gg_",
24
- _loading: "__loading_18ffn_gg_",
25
- __SDonutContainer: "___SDonutContainer_18ffn_gg_",
26
- __STrendLine: "___STrendLine_18ffn_gg_",
27
- __STrendBar: "___STrendBar_18ffn_gg_",
28
- "@pulse": "pulse_18ffn"
22
+ __SLineGauge: "___SLineGauge_7jer1_gg_",
23
+ _loading: "__loading_7jer1_gg_",
24
+ __SDonutContainer: "___SDonutContainer_7jer1_gg_",
25
+ __STrendLine: "___STrendLine_7jer1_gg_",
26
+ __STrendBar: "___STrendBar_7jer1_gg_",
27
+ "@pulse": "pulse_7jer1"
29
28
  })
30
- ), l = /* @__PURE__ */ function(g) {
31
- H(s, g);
32
- var f = W(s);
29
+ ), l = /* @__PURE__ */ function(u) {
30
+ H(s, u);
31
+ var d = W(s);
33
32
  function s() {
34
- return E(this, s), f.apply(this, arguments);
33
+ return E(this, s), d.apply(this, arguments);
35
34
  }
36
35
  return R(s, [{
37
36
  key: "defaultData",
@@ -47,8 +46,8 @@ var M = (
47
46
  }, {
48
47
  key: "data",
49
48
  get: function() {
50
- var e = this.asProps, t = e.data, a = e.loading;
51
- return a ? this.defaultData : t;
49
+ var e = this.asProps, t = e.data, o = e.loading;
50
+ return o ? this.defaultData : t;
52
51
  }
53
52
  }, {
54
53
  key: "svgWidth",
@@ -63,16 +62,16 @@ var M = (
63
62
  }, {
64
63
  key: "color",
65
64
  get: function() {
66
- var e = this.asProps, t = e.resolveColor, a = e.color, r = a === void 0 ? "chart-palette-order-1" : a, o = e.loading;
67
- return t(o ? "skeleton-bg" : r);
65
+ var e = this.asProps, t = e.resolveColor, o = e.color, r = o === void 0 ? "chart-palette-order-1" : o, n = e.loading;
66
+ return t(n ? "skeleton-bg" : r);
68
67
  }
69
68
  }, {
70
69
  key: "render",
71
70
  value: function() {
72
- for (var e = this.asProps, t, a = G, r = this.asProps, o = r.uid, k = r.withArea, T = r.animate, u = r.lastPointColor, p = r.resolveColor, m = r.loading, x = r.styles, d = [], _ = this.data.length, P = this.defaultWidth / (_ - 1), c = 0; c < _; c++)
73
- d.push("".concat(P * c, ",").concat(this.defaultHeight - this.data[c]));
74
- var v = N(this.asProps), L = v.__excludeProps, w = v.extractedAriaProps;
75
- return t = b(x), /* @__PURE__ */ i.createElement(a, t.cn("STrendLine", y({}, S({
71
+ for (var e = this.asProps, t, o = B, r = this.asProps, n = r.uid, k = r.withArea, T = r.animate, p = r.lastPointColor, m = r.resolveColor, f = r.loading, x = r.styles, h = [], _ = this.data.length, P = this.defaultWidth / (_ - 1), c = 0; c < _; c++)
72
+ h.push("".concat(P * c, ",").concat(this.defaultHeight - this.data[c]));
73
+ var v = G(this.asProps), L = v.__excludeProps, w = v.extractedAriaProps;
74
+ return t = j(x), /* @__PURE__ */ i.createElement(o, t.cn("STrendLine", y({}, S({
76
75
  ref: this.containerRef,
77
76
  __excludeProps: ["data"].concat(A(L))
78
77
  }, e))), /* @__PURE__ */ i.createElement("svg", t.cn("svg", y({
@@ -81,26 +80,26 @@ var M = (
81
80
  viewBox: "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight),
82
81
  role: "img"
83
82
  }, w)), /* @__PURE__ */ i.createElement("polyline", t.cn("polyline", {
84
- points: d.join(" "),
83
+ points: h.join(" "),
85
84
  stroke: this.color,
86
85
  strokeWidth: "4",
87
86
  fill: "none",
88
- clipPath: "url(#".concat(o, ")")
87
+ clipPath: "url(#".concat(n, ")")
89
88
  })), k && /* @__PURE__ */ i.createElement("polyline", t.cn("polyline", {
90
- points: "0,".concat(this.defaultHeight, " ").concat(d.join(" "), " ").concat(this.defaultWidth, ",").concat(this.defaultHeight),
89
+ points: "0,".concat(this.defaultHeight, " ").concat(h.join(" "), " ").concat(this.defaultWidth, ",").concat(this.defaultHeight),
91
90
  fill: this.color,
92
91
  fillOpacity: 0.2,
93
- clipPath: "url(#".concat(o, ")")
94
- })), u && !m && /* @__PURE__ */ i.createElement("circle", t.cn("circle", {
92
+ clipPath: "url(#".concat(n, ")")
93
+ })), p && !f && /* @__PURE__ */ i.createElement("circle", t.cn("circle", {
95
94
  cx: P * (_ - 1),
96
95
  cy: this.defaultHeight - this.data[_ - 1],
97
96
  r: this.lastPointRadius,
98
- fill: p(u),
99
- stroke: p("chart-grid-border"),
97
+ fill: m(p),
98
+ stroke: m("chart-grid-border"),
100
99
  strokeWidth: 4,
101
- clipPath: "url(#".concat(o, ")")
102
- })), T && !m && /* @__PURE__ */ i.createElement("clipPath", t.cn("clipPath", {
103
- id: o
100
+ clipPath: "url(#".concat(n, ")")
101
+ })), T && !f && /* @__PURE__ */ i.createElement("clipPath", t.cn("clipPath", {
102
+ id: n
104
103
  }), /* @__PURE__ */ i.createElement("rect", t.cn("rect", {
105
104
  x: "0",
106
105
  y: "0",
@@ -114,27 +113,27 @@ var M = (
114
113
  }))))));
115
114
  }
116
115
  }]), s;
117
- }(j);
118
- h(l, "enhance", [D(), B()]);
119
- h(l, "style", M);
120
- h(l, "defaultProps", {
116
+ }(D);
117
+ g(l, "enhance", [$(), b()]);
118
+ g(l, "style", N);
119
+ g(l, "defaultProps", {
121
120
  animate: !0
122
121
  });
123
- var q = C(l);
124
- q.displayName = "MiniChart.TrendLine";
125
- var I = C(l, {}, {
122
+ var M = C(l);
123
+ M.displayName = "MiniChart.TrendLine";
124
+ var q = C(l, {}, {
126
125
  enhancements: [function() {
127
126
  return {
128
- wrapperProps: function(f) {
129
- return S(f, {
127
+ wrapperProps: function(d) {
128
+ return S(d, {
130
129
  withArea: !0
131
130
  });
132
131
  }
133
132
  };
134
133
  }]
135
134
  });
136
- I.displayName = "MiniChart.TrendArea";
135
+ q.displayName = "MiniChart.TrendArea";
137
136
  export {
138
- I as TrendArea,
139
- q as TrendLine
137
+ q as TrendArea,
138
+ M as TrendLine
140
139
  };
@@ -1,6 +1,6 @@
1
1
  import { ComponentType } from '@semcore/core';
2
2
  import { BoxProps } from '@semcore/flex-box';
3
- import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
3
+ import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
4
4
  import { CommonScoreProps } from './Score';
5
5
  export type ScoreDonutProps = BoxProps & CommonScoreProps;
6
6
  type Enhances = {
@@ -1,8 +1,8 @@
1
- import { Intergalactic, ComponentType } from '@semcore/utils/lib/core';
1
+ import { Intergalactic, ComponentType } from '@semcore/core';
2
2
  import { CommonScoreProps } from './Score';
3
3
  import React from 'react';
4
4
  import { BoxProps, Box } from '@semcore/flex-box';
5
- import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
5
+ import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
6
6
  type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
7
7
  type Range<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
8
8
  export type SegmentColor = `chart-palette-order-${Range<1, 24>}`;
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from '@semcore/core';
2
- import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
2
+ import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
3
3
  import { CommonTrendProps } from './Trend';
4
4
  type BarItem = {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from '@semcore/core';
2
- import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
2
+ import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
3
3
  import { CommonTrendProps } from './Trend';
4
4
  export type TrendLineProps = CommonTrendProps & {
5
5
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/mini-chart",
3
3
  "description": "Semrush MiniChart Component",
4
- "version": "0.29.1",
4
+ "version": "16.0.0-prerelease.4",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -13,14 +13,9 @@
13
13
  "import": "./lib/esm/index.mjs",
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
- "dependencies": {
17
- "@semcore/flex-box": "5.41.1",
18
- "@semcore/utils": "4.48.1"
19
- },
20
16
  "peerDependencies": {
21
- "@semcore/core": "^2.17.5",
22
- "react": "16.8 - 18",
23
- "react-dom": "16.8 - 18"
17
+ "@semcore/base-components": "^16.0.0-prerelease.4",
18
+ "@semcore/flex-box": "^16.0.0-prerelease.4"
24
19
  },
25
20
  "repository": {
26
21
  "type": "git",