@semcore/mini-chart 0.29.0-prerelease.9 → 0.29.1-prerelease.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.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,17 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [0.29.0] - 2025-02-28
5
+ ## [0.29.1] - 2025-03-17
6
6
 
7
7
  ### Changed
8
8
 
9
- - Version minor update due to children dependencies update (`@semcore/flex-box` [5.40.1 ~> 5.41.0], `@semcore/utils` [4.45.1 ~> 4.47.1], `@semcore/core` [2.38.1 ~> 2.39.0]).
9
+ - Version patch update due to children dependencies update (`@semcore/flex-box` [5.41.0 ~> 5.41.1], `@semcore/utils` [4.48.0 ~> 4.48.1], `@semcore/core` [2.39.0 ~> 2.39.1]).
10
+
11
+ ## [0.29.0] - 2025-03-14
12
+
13
+ ### Added
14
+
15
+ - Build for ESM.
10
16
 
11
17
  ## [0.28.1] - 2025-02-05
12
18
 
@@ -19,15 +19,15 @@ var _flexBox = require("@semcore/flex-box");
19
19
  var _resolveColorEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/resolveColorEnhance"));
20
20
  var _ariaProps = require("@semcore/utils/lib/ariaProps");
21
21
  /*__reshadow-styles__:"./donut.shadow.css"*/
22
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_18pnz{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_18pnz_gg_.__loading_18pnz_gg_,.___SLineGauge_18pnz_gg_.__loading_18pnz_gg_,.___STrendBar_18pnz_gg_.__loading_18pnz_gg_,.___STrendLine_18pnz_gg_.__loading_18pnz_gg_{animation-name:pulse_18pnz;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SDonutContainer_18pnz_gg_.__semi_18pnz_gg_ g{transform:rotate(180deg) translate(-24px,-24px)}.___SDonutContainer_18pnz_gg_ g{transform:rotate(-90deg) translate(-24px)}.___SDonutContainer_18pnz_gg_.__animate_18pnz_gg_ circle{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out}" /*__inner_css_end__*/, "18pnz_gg_") /*__reshadow_css_end__*/, {
23
- "__SLineGauge": "___SLineGauge_18pnz_gg_",
24
- "_loading": "__loading_18pnz_gg_",
25
- "__SDonutContainer": "___SDonutContainer_18pnz_gg_",
26
- "__STrendLine": "___STrendLine_18pnz_gg_",
27
- "__STrendBar": "___STrendBar_18pnz_gg_",
28
- "@pulse": "pulse_18pnz",
29
- "_animate": "__animate_18pnz_gg_",
30
- "_semi": "__semi_18pnz_gg_"
22
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_ul6zh{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_ul6zh_gg_.__loading_ul6zh_gg_,.___SLineGauge_ul6zh_gg_.__loading_ul6zh_gg_,.___STrendBar_ul6zh_gg_.__loading_ul6zh_gg_,.___STrendLine_ul6zh_gg_.__loading_ul6zh_gg_{animation-name:pulse_ul6zh;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SDonutContainer_ul6zh_gg_.__semi_ul6zh_gg_ g{transform:rotate(180deg) translate(-24px,-24px)}.___SDonutContainer_ul6zh_gg_ g{transform:rotate(-90deg) translate(-24px)}.___SDonutContainer_ul6zh_gg_.__animate_ul6zh_gg_ circle{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out}" /*__inner_css_end__*/, "ul6zh_gg_") /*__reshadow_css_end__*/, {
23
+ "__SLineGauge": "___SLineGauge_ul6zh_gg_",
24
+ "_loading": "__loading_ul6zh_gg_",
25
+ "__SDonutContainer": "___SDonutContainer_ul6zh_gg_",
26
+ "__STrendLine": "___STrendLine_ul6zh_gg_",
27
+ "__STrendBar": "___STrendBar_ul6zh_gg_",
28
+ "@pulse": "pulse_ul6zh",
29
+ "_animate": "__animate_ul6zh_gg_",
30
+ "_semi": "__semi_ul6zh_gg_"
31
31
  });
32
32
  var DonutRoot = /*#__PURE__*/function (_Component) {
33
33
  (0, _inherits2["default"])(DonutRoot, _Component);
@@ -18,24 +18,24 @@ var _react = _interopRequireDefault(require("react"));
18
18
  var _flexBox = require("@semcore/flex-box");
19
19
  var _resolveColorEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/resolveColorEnhance"));
20
20
  /*__reshadow-styles__:"./line.shadow.css"*/
21
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_1lsyc{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_1lsyc{0%{transform:translateX(0)}to{transform:translateX(100%)}}.___SDonutContainer_1lsyc_gg_.__loading_1lsyc_gg_,.___SLineGauge_1lsyc_gg_.__loading_1lsyc_gg_,.___STrendBar_1lsyc_gg_.__loading_1lsyc_gg_,.___STrendLine_1lsyc_gg_.__loading_1lsyc_gg_{animation-name:pulse_1lsyc;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_1lsyc_gg_{height:8px;background-color:var(--base-bg-color_1lsyc, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineValue_1lsyc_gg_{height:8px;border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_1lsyc_gg_.__percent_1lsyc_gg_{width:var(--percent_1lsyc)}.___SLineSegmentItem_1lsyc_gg_.__color_1lsyc_gg_,.___SLineValue_1lsyc_gg_.__color_1lsyc_gg_{background-color:var(--color_1lsyc, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_1lsyc_gg_.__segments_1lsyc_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SAnimationLine_1lsyc_gg_,.___SLineGaugeSegment_1lsyc_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_1lsyc_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_1lsyc_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_1lsyc_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_1lsyc;animation-duration:.5s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}" /*__inner_css_end__*/, "1lsyc_gg_") /*__reshadow_css_end__*/, {
22
- "__SLineGauge": "___SLineGauge_1lsyc_gg_",
23
- "_loading": "__loading_1lsyc_gg_",
24
- "__SDonutContainer": "___SDonutContainer_1lsyc_gg_",
25
- "__STrendLine": "___STrendLine_1lsyc_gg_",
26
- "__STrendBar": "___STrendBar_1lsyc_gg_",
27
- "@pulse": "pulse_1lsyc",
28
- "--base-bg-color": "--base-bg-color_1lsyc",
29
- "__SLineValue": "___SLineValue_1lsyc_gg_",
30
- "_percent": "__percent_1lsyc_gg_",
31
- "--percent": "--percent_1lsyc",
32
- "_color": "__color_1lsyc_gg_",
33
- "__SLineSegmentItem": "___SLineSegmentItem_1lsyc_gg_",
34
- "--color": "--color_1lsyc",
35
- "_segments": "__segments_1lsyc_gg_",
36
- "__SLineGaugeSegment": "___SLineGaugeSegment_1lsyc_gg_",
37
- "__SAnimationLine": "___SAnimationLine_1lsyc_gg_",
38
- "@move-line": "move-line_1lsyc"
21
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@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}" /*__inner_css_end__*/, "1b7u0_gg_") /*__reshadow_css_end__*/, {
22
+ "__SLineGauge": "___SLineGauge_1b7u0_gg_",
23
+ "_loading": "__loading_1b7u0_gg_",
24
+ "__SDonutContainer": "___SDonutContainer_1b7u0_gg_",
25
+ "__STrendLine": "___STrendLine_1b7u0_gg_",
26
+ "__STrendBar": "___STrendBar_1b7u0_gg_",
27
+ "@pulse": "pulse_1b7u0",
28
+ "--base-bg-color": "--base-bg-color_1b7u0",
29
+ "__SLineValue": "___SLineValue_1b7u0_gg_",
30
+ "_percent": "__percent_1b7u0_gg_",
31
+ "--percent": "--percent_1b7u0",
32
+ "_color": "__color_1b7u0_gg_",
33
+ "__SLineSegmentItem": "___SLineSegmentItem_1b7u0_gg_",
34
+ "--color": "--color_1b7u0",
35
+ "_segments": "__segments_1b7u0_gg_",
36
+ "__SLineGaugeSegment": "___SLineGaugeSegment_1b7u0_gg_",
37
+ "__SAnimationLine": "___SAnimationLine_1b7u0_gg_",
38
+ "@move-line": "move-line_1b7u0"
39
39
  });
40
40
  var LineRoot = /*#__PURE__*/function (_Component) {
41
41
  (0, _inherits2["default"])(LineRoot, _Component);
@@ -21,13 +21,13 @@ var _Trend2 = require("./Trend");
21
21
  var _flexBox = require("@semcore/flex-box");
22
22
  var _ariaProps = require("@semcore/utils/lib/ariaProps");
23
23
  /*__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
24
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_382bi{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_382bi_gg_.__loading_382bi_gg_,.___SLineGauge_382bi_gg_.__loading_382bi_gg_,.___STrendBar_382bi_gg_.__loading_382bi_gg_,.___STrendLine_382bi_gg_.__loading_382bi_gg_{animation-name:pulse_382bi;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}" /*__inner_css_end__*/, "382bi_gg_") /*__reshadow_css_end__*/, {
25
- "__SLineGauge": "___SLineGauge_382bi_gg_",
26
- "_loading": "__loading_382bi_gg_",
27
- "__SDonutContainer": "___SDonutContainer_382bi_gg_",
28
- "__STrendLine": "___STrendLine_382bi_gg_",
29
- "__STrendBar": "___STrendBar_382bi_gg_",
30
- "@pulse": "pulse_382bi"
24
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@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}" /*__inner_css_end__*/, "18ffn_gg_") /*__reshadow_css_end__*/, {
25
+ "__SLineGauge": "___SLineGauge_18ffn_gg_",
26
+ "_loading": "__loading_18ffn_gg_",
27
+ "__SDonutContainer": "___SDonutContainer_18ffn_gg_",
28
+ "__STrendLine": "___STrendLine_18ffn_gg_",
29
+ "__STrendBar": "___STrendBar_18ffn_gg_",
30
+ "@pulse": "pulse_18ffn"
31
31
  });
32
32
  var TrendBarRoot = /*#__PURE__*/function (_Trend) {
33
33
  (0, _inherits2["default"])(TrendBarRoot, _Trend);
@@ -22,13 +22,13 @@ var _Trend2 = require("./Trend");
22
22
  var _flexBox = require("@semcore/flex-box");
23
23
  var _ariaProps = require("@semcore/utils/lib/ariaProps");
24
24
  /*__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
25
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_382bi{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_382bi_gg_.__loading_382bi_gg_,.___SLineGauge_382bi_gg_.__loading_382bi_gg_,.___STrendBar_382bi_gg_.__loading_382bi_gg_,.___STrendLine_382bi_gg_.__loading_382bi_gg_{animation-name:pulse_382bi;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}" /*__inner_css_end__*/, "382bi_gg_") /*__reshadow_css_end__*/, {
26
- "__SLineGauge": "___SLineGauge_382bi_gg_",
27
- "_loading": "__loading_382bi_gg_",
28
- "__SDonutContainer": "___SDonutContainer_382bi_gg_",
29
- "__STrendLine": "___STrendLine_382bi_gg_",
30
- "__STrendBar": "___STrendBar_382bi_gg_",
31
- "@pulse": "pulse_382bi"
25
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@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}" /*__inner_css_end__*/, "18ffn_gg_") /*__reshadow_css_end__*/, {
26
+ "__SLineGauge": "___SLineGauge_18ffn_gg_",
27
+ "_loading": "__loading_18ffn_gg_",
28
+ "__SDonutContainer": "___SDonutContainer_18ffn_gg_",
29
+ "__STrendLine": "___STrendLine_18ffn_gg_",
30
+ "__STrendBar": "___STrendBar_18ffn_gg_",
31
+ "@pulse": "pulse_18ffn"
32
32
  });
33
33
  var TrendLineRoot = /*#__PURE__*/function (_Trend) {
34
34
  (0, _inherits2["default"])(TrendLineRoot, _Trend);
@@ -12,15 +12,15 @@ import { Box } from '@semcore/flex-box';
12
12
  import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
13
13
  import { assignProps } from '@semcore/core';
14
14
  /*__reshadow-styles__:"./donut.shadow.css"*/
15
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_18pnz{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_18pnz_gg_.__loading_18pnz_gg_,.___SLineGauge_18pnz_gg_.__loading_18pnz_gg_,.___STrendBar_18pnz_gg_.__loading_18pnz_gg_,.___STrendLine_18pnz_gg_.__loading_18pnz_gg_{animation-name:pulse_18pnz;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SDonutContainer_18pnz_gg_.__semi_18pnz_gg_ g{transform:rotate(180deg) translate(-24px,-24px)}.___SDonutContainer_18pnz_gg_ g{transform:rotate(-90deg) translate(-24px)}.___SDonutContainer_18pnz_gg_.__animate_18pnz_gg_ circle{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out}" /*__inner_css_end__*/, "18pnz_gg_") /*__reshadow_css_end__*/, {
16
- "__SLineGauge": "___SLineGauge_18pnz_gg_",
17
- "_loading": "__loading_18pnz_gg_",
18
- "__SDonutContainer": "___SDonutContainer_18pnz_gg_",
19
- "__STrendLine": "___STrendLine_18pnz_gg_",
20
- "__STrendBar": "___STrendBar_18pnz_gg_",
21
- "@pulse": "pulse_18pnz",
22
- "_animate": "__animate_18pnz_gg_",
23
- "_semi": "__semi_18pnz_gg_"
15
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_ul6zh{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_ul6zh_gg_.__loading_ul6zh_gg_,.___SLineGauge_ul6zh_gg_.__loading_ul6zh_gg_,.___STrendBar_ul6zh_gg_.__loading_ul6zh_gg_,.___STrendLine_ul6zh_gg_.__loading_ul6zh_gg_{animation-name:pulse_ul6zh;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SDonutContainer_ul6zh_gg_.__semi_ul6zh_gg_ g{transform:rotate(180deg) translate(-24px,-24px)}.___SDonutContainer_ul6zh_gg_ g{transform:rotate(-90deg) translate(-24px)}.___SDonutContainer_ul6zh_gg_.__animate_ul6zh_gg_ circle{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out}" /*__inner_css_end__*/, "ul6zh_gg_") /*__reshadow_css_end__*/, {
16
+ "__SLineGauge": "___SLineGauge_ul6zh_gg_",
17
+ "_loading": "__loading_ul6zh_gg_",
18
+ "__SDonutContainer": "___SDonutContainer_ul6zh_gg_",
19
+ "__STrendLine": "___STrendLine_ul6zh_gg_",
20
+ "__STrendBar": "___STrendBar_ul6zh_gg_",
21
+ "@pulse": "pulse_ul6zh",
22
+ "_animate": "__animate_ul6zh_gg_",
23
+ "_semi": "__semi_ul6zh_gg_"
24
24
  });
25
25
  import { extractAriaProps } from '@semcore/utils/lib/ariaProps';
26
26
  var DonutRoot = /*#__PURE__*/function (_Component) {
@@ -13,24 +13,24 @@ import createComponent, { Component, Root, sstyled } from '@semcore/core';
13
13
  import { Box, Flex } from '@semcore/flex-box';
14
14
  import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
15
15
  /*__reshadow-styles__:"./line.shadow.css"*/
16
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_1lsyc{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_1lsyc{0%{transform:translateX(0)}to{transform:translateX(100%)}}.___SDonutContainer_1lsyc_gg_.__loading_1lsyc_gg_,.___SLineGauge_1lsyc_gg_.__loading_1lsyc_gg_,.___STrendBar_1lsyc_gg_.__loading_1lsyc_gg_,.___STrendLine_1lsyc_gg_.__loading_1lsyc_gg_{animation-name:pulse_1lsyc;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_1lsyc_gg_{height:8px;background-color:var(--base-bg-color_1lsyc, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineValue_1lsyc_gg_{height:8px;border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_1lsyc_gg_.__percent_1lsyc_gg_{width:var(--percent_1lsyc)}.___SLineSegmentItem_1lsyc_gg_.__color_1lsyc_gg_,.___SLineValue_1lsyc_gg_.__color_1lsyc_gg_{background-color:var(--color_1lsyc, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_1lsyc_gg_.__segments_1lsyc_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SAnimationLine_1lsyc_gg_,.___SLineGaugeSegment_1lsyc_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_1lsyc_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_1lsyc_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_1lsyc_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_1lsyc;animation-duration:.5s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}" /*__inner_css_end__*/, "1lsyc_gg_") /*__reshadow_css_end__*/, {
17
- "__SLineGauge": "___SLineGauge_1lsyc_gg_",
18
- "_loading": "__loading_1lsyc_gg_",
19
- "__SDonutContainer": "___SDonutContainer_1lsyc_gg_",
20
- "__STrendLine": "___STrendLine_1lsyc_gg_",
21
- "__STrendBar": "___STrendBar_1lsyc_gg_",
22
- "@pulse": "pulse_1lsyc",
23
- "--base-bg-color": "--base-bg-color_1lsyc",
24
- "__SLineValue": "___SLineValue_1lsyc_gg_",
25
- "_percent": "__percent_1lsyc_gg_",
26
- "--percent": "--percent_1lsyc",
27
- "_color": "__color_1lsyc_gg_",
28
- "__SLineSegmentItem": "___SLineSegmentItem_1lsyc_gg_",
29
- "--color": "--color_1lsyc",
30
- "_segments": "__segments_1lsyc_gg_",
31
- "__SLineGaugeSegment": "___SLineGaugeSegment_1lsyc_gg_",
32
- "__SAnimationLine": "___SAnimationLine_1lsyc_gg_",
33
- "@move-line": "move-line_1lsyc"
16
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@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}" /*__inner_css_end__*/, "1b7u0_gg_") /*__reshadow_css_end__*/, {
17
+ "__SLineGauge": "___SLineGauge_1b7u0_gg_",
18
+ "_loading": "__loading_1b7u0_gg_",
19
+ "__SDonutContainer": "___SDonutContainer_1b7u0_gg_",
20
+ "__STrendLine": "___STrendLine_1b7u0_gg_",
21
+ "__STrendBar": "___STrendBar_1b7u0_gg_",
22
+ "@pulse": "pulse_1b7u0",
23
+ "--base-bg-color": "--base-bg-color_1b7u0",
24
+ "__SLineValue": "___SLineValue_1b7u0_gg_",
25
+ "_percent": "__percent_1b7u0_gg_",
26
+ "--percent": "--percent_1b7u0",
27
+ "_color": "__color_1b7u0_gg_",
28
+ "__SLineSegmentItem": "___SLineSegmentItem_1b7u0_gg_",
29
+ "--color": "--color_1b7u0",
30
+ "_segments": "__segments_1b7u0_gg_",
31
+ "__SLineGaugeSegment": "___SLineGaugeSegment_1b7u0_gg_",
32
+ "__SAnimationLine": "___SAnimationLine_1b7u0_gg_",
33
+ "@move-line": "move-line_1b7u0"
34
34
  });
35
35
  var LineRoot = /*#__PURE__*/function (_Component) {
36
36
  _inherits(LineRoot, _Component);
@@ -13,13 +13,13 @@ import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance
13
13
  import { Trend } from './Trend';
14
14
  import { Box } from '@semcore/flex-box';
15
15
  /*__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
16
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_382bi{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_382bi_gg_.__loading_382bi_gg_,.___SLineGauge_382bi_gg_.__loading_382bi_gg_,.___STrendBar_382bi_gg_.__loading_382bi_gg_,.___STrendLine_382bi_gg_.__loading_382bi_gg_{animation-name:pulse_382bi;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}" /*__inner_css_end__*/, "382bi_gg_") /*__reshadow_css_end__*/, {
17
- "__SLineGauge": "___SLineGauge_382bi_gg_",
18
- "_loading": "__loading_382bi_gg_",
19
- "__SDonutContainer": "___SDonutContainer_382bi_gg_",
20
- "__STrendLine": "___STrendLine_382bi_gg_",
21
- "__STrendBar": "___STrendBar_382bi_gg_",
22
- "@pulse": "pulse_382bi"
16
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@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}" /*__inner_css_end__*/, "18ffn_gg_") /*__reshadow_css_end__*/, {
17
+ "__SLineGauge": "___SLineGauge_18ffn_gg_",
18
+ "_loading": "__loading_18ffn_gg_",
19
+ "__SDonutContainer": "___SDonutContainer_18ffn_gg_",
20
+ "__STrendLine": "___STrendLine_18ffn_gg_",
21
+ "__STrendBar": "___STrendBar_18ffn_gg_",
22
+ "@pulse": "pulse_18ffn"
23
23
  });
24
24
  import { extractAriaProps } from '@semcore/utils/lib/ariaProps';
25
25
  var TrendBarRoot = /*#__PURE__*/function (_Trend) {
@@ -14,13 +14,13 @@ import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
14
14
  import { Trend } from './Trend';
15
15
  import { Box } from '@semcore/flex-box';
16
16
  /*__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
17
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes pulse_382bi{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_382bi_gg_.__loading_382bi_gg_,.___SLineGauge_382bi_gg_.__loading_382bi_gg_,.___STrendBar_382bi_gg_.__loading_382bi_gg_,.___STrendLine_382bi_gg_.__loading_382bi_gg_{animation-name:pulse_382bi;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}" /*__inner_css_end__*/, "382bi_gg_") /*__reshadow_css_end__*/, {
18
- "__SLineGauge": "___SLineGauge_382bi_gg_",
19
- "_loading": "__loading_382bi_gg_",
20
- "__SDonutContainer": "___SDonutContainer_382bi_gg_",
21
- "__STrendLine": "___STrendLine_382bi_gg_",
22
- "__STrendBar": "___STrendBar_382bi_gg_",
23
- "@pulse": "pulse_382bi"
17
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@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}" /*__inner_css_end__*/, "18ffn_gg_") /*__reshadow_css_end__*/, {
18
+ "__SLineGauge": "___SLineGauge_18ffn_gg_",
19
+ "_loading": "__loading_18ffn_gg_",
20
+ "__SDonutContainer": "___SDonutContainer_18ffn_gg_",
21
+ "__STrendLine": "___STrendLine_18ffn_gg_",
22
+ "__STrendBar": "___STrendBar_18ffn_gg_",
23
+ "@pulse": "pulse_18ffn"
24
24
  });
25
25
  import { extractAriaProps } from '@semcore/utils/lib/ariaProps';
26
26
  var TrendLineRoot = /*#__PURE__*/function (_Trend) {
@@ -0,0 +1,103 @@
1
+ import k from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import M from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import W from "@babel/runtime/helpers/esm/createClass";
4
+ import G from "@babel/runtime/helpers/esm/inherits";
5
+ import N from "@babel/runtime/helpers/esm/createSuper";
6
+ import m from "@babel/runtime/helpers/esm/defineProperty";
7
+ import { sstyled as R } from "@semcore/utils/lib/core/index";
8
+ import C, { assignProps as P, sstyled as I, Component as j } from "@semcore/core";
9
+ import r from "react";
10
+ import { Box as F } from "@semcore/flex-box";
11
+ import q from "@semcore/utils/lib/enhances/resolveColorEnhance";
12
+ import { extractAriaProps as H } from "@semcore/utils/lib/ariaProps";
13
+ var J = (
14
+ /*__reshadow_css_start__*/
15
+ (R.insert(
16
+ /*__inner_css_start__*/
17
+ "@keyframes pulse_ul6zh{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_ul6zh_gg_.__loading_ul6zh_gg_,.___SLineGauge_ul6zh_gg_.__loading_ul6zh_gg_,.___STrendBar_ul6zh_gg_.__loading_ul6zh_gg_,.___STrendLine_ul6zh_gg_.__loading_ul6zh_gg_{animation-name:pulse_ul6zh;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SDonutContainer_ul6zh_gg_.__semi_ul6zh_gg_ g{transform:rotate(180deg) translate(-24px,-24px)}.___SDonutContainer_ul6zh_gg_ g{transform:rotate(-90deg) translate(-24px)}.___SDonutContainer_ul6zh_gg_.__animate_ul6zh_gg_ circle{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out}",
18
+ "ul6zh_gg_"
19
+ ), {
20
+ __SLineGauge: "___SLineGauge_ul6zh_gg_",
21
+ _loading: "__loading_ul6zh_gg_",
22
+ __SDonutContainer: "___SDonutContainer_ul6zh_gg_",
23
+ __STrendLine: "___STrendLine_ul6zh_gg_",
24
+ __STrendBar: "___STrendBar_ul6zh_gg_",
25
+ "@pulse": "pulse_ul6zh",
26
+ _animate: "__animate_ul6zh_gg_",
27
+ _semi: "__semi_ul6zh_gg_"
28
+ })
29
+ ), l = /* @__PURE__ */ function(p) {
30
+ G(n, p);
31
+ var u = N(n);
32
+ function n() {
33
+ return M(this, n), u.apply(this, arguments);
34
+ }
35
+ return W(n, [{
36
+ key: "render",
37
+ value: function() {
38
+ var x = this.asProps, t, B = F, o = this.asProps, _ = o.value, b = o.styles, d = o.baseBgColor, E = d === void 0 ? "chart-grid-bar-chart-base-bg" : d, f = o.color, w = f === void 0 ? "chart-palette-order-1" : f, g = o.resolveColor, e = o.isSemiDonut, v = o.loading, h = e ? 6 : 4, i = e ? 9 : 10, a = e ? Math.PI * i : Math.PI * 2 * i, s = a * (_ / 100), S = a * ((100 - _) / 100), c = e ? a / (100 / 3) : a / 100, D = "".concat(S - 2 * c, " ").concat(c), y = "".concat(c, " ").concat(_ < 99 ? "".concat(D) : "", " ").concat(a);
39
+ e && (y = "".concat(c, " ").concat(_ < 95 ? "".concat(D) : "", " ").concat(a));
40
+ var L = e ? "0 0 24 12" : "0 0 24 24", T = -1 * (s + (e ? c : 0)), z = H(this.asProps), $ = z.__excludeProps, A = z.extractedAriaProps;
41
+ return t = I(b), /* @__PURE__ */ r.createElement(B, t.cn("SDonutContainer", k({}, P({
42
+ semi: e,
43
+ __excludeProps: $
44
+ }, x))), /* @__PURE__ */ r.createElement("svg", t.cn("svg", k({
45
+ width: "100%",
46
+ height: "100%",
47
+ viewBox: L,
48
+ fill: "none",
49
+ role: "img"
50
+ }, A)), /* @__PURE__ */ r.createElement("g", t.cn("g", {}), /* @__PURE__ */ r.createElement("circle", t.cn("circle", {
51
+ cx: "12",
52
+ cy: "12",
53
+ r: i,
54
+ strokeWidth: h,
55
+ stroke: g(E),
56
+ strokeDasharray: v ? void 0 : "".concat(S, " ").concat(a),
57
+ strokeDashoffset: T
58
+ })), !v && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("circle", t.cn("circle", {
59
+ cx: "12",
60
+ cy: "12",
61
+ r: i,
62
+ strokeWidth: h,
63
+ stroke: g(w),
64
+ strokeDasharray: "".concat(s, " ").concat(a),
65
+ strokeDashoffset: s
66
+ }), /* @__PURE__ */ r.createElement("animate", t.cn("animate", {
67
+ attributeName: "stroke-dashoffset",
68
+ values: "0;".concat(s)
69
+ }))), _ !== 100 && !e && /* @__PURE__ */ r.createElement("circle", t.cn("circle", {
70
+ cx: "12",
71
+ cy: "12",
72
+ r: i,
73
+ strokeWidth: h,
74
+ stroke: g("chart-grid-border"),
75
+ strokeDasharray: y,
76
+ strokeDashoffset: -1 * s
77
+ }))))));
78
+ }
79
+ }]), n;
80
+ }(j);
81
+ m(l, "enhance", [q()]);
82
+ m(l, "style", J);
83
+ m(l, "defaultProps", {
84
+ animate: !0
85
+ });
86
+ var K = C(l);
87
+ K.displayName = "MiniChart.ScoreDonut";
88
+ var O = C(l, {}, {
89
+ enhancements: [function() {
90
+ return {
91
+ wrapperProps: function(u) {
92
+ return P(u, {
93
+ isSemiDonut: !0
94
+ });
95
+ }
96
+ };
97
+ }]
98
+ });
99
+ O.displayName = "MiniChart.ScoreSemiDonut";
100
+ export {
101
+ K as ScoreDonut,
102
+ O as ScoreSemiDonut
103
+ };
@@ -0,0 +1,104 @@
1
+ import x from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import N from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import R from "@babel/runtime/helpers/esm/createClass";
4
+ import X from "@babel/runtime/helpers/esm/inherits";
5
+ import j from "@babel/runtime/helpers/esm/createSuper";
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";
9
+ 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 = (
13
+ /*__reshadow_css_start__*/
14
+ (z.insert(
15
+ /*__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_"
18
+ ), {
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"
36
+ })
37
+ ), 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);
42
+ }
43
+ return R(n, [{
44
+ key: "getSegmentProps",
45
+ value: function(t) {
46
+ var _ = this.asProps, c = _.children, L = _.resolveColor, a = 0;
47
+ e.Children.forEach(c, function(s) {
48
+ /* @__PURE__ */ e.isValidElement(s) && (a = a + s.props.value);
49
+ });
50
+ var u = a > 0 ? 100 * t.value / a : 0;
51
+ return {
52
+ w: "".concat(u, "%"),
53
+ "use:color": L(t.color)
54
+ };
55
+ }
56
+ }, {
57
+ key: "render",
58
+ 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;
60
+ if (T !== void 0) {
61
+ var i;
62
+ return i = d(y), /* @__PURE__ */ e.createElement(c, i.cn("SLineGauge", x({}, G({
63
+ 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", {})));
66
+ }
67
+ var o = this.asProps.segments, C = [];
68
+ if (o)
69
+ for (var b = 0; b < o; b++) {
70
+ 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,
74
+ w: D
75
+ }))));
76
+ }
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", {
81
+ w: V,
82
+ color: m(P)
83
+ })), !!C.length && /* @__PURE__ */ e.createElement(u, _.cn("SLineGaugeSegment", {}), C), w && /* @__PURE__ */ e.createElement(a, _.cn("SAnimationLine", {})));
84
+ }
85
+ }]), n;
86
+ }(M);
87
+ S(l, "enhance", [H()]);
88
+ S(l, "displayName", "ScoreLine");
89
+ S(l, "style", J);
90
+ S(l, "defaultProps", {
91
+ animate: !0
92
+ });
93
+ 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))));
96
+ }
97
+ A.displayName = "Segment";
98
+ var K = F(l, {
99
+ Segment: A
100
+ });
101
+ K.displayName = "MiniChart.ScoreLine";
102
+ export {
103
+ K as ScoreLine
104
+ };
@@ -0,0 +1,106 @@
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 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";
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 = (
16
+ /*__reshadow_css_start__*/
17
+ (R.insert(
18
+ /*__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_"
21
+ ), {
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"
28
+ })
29
+ ), o = /* @__PURE__ */ function(g) {
30
+ D(e, g);
31
+ var s = E(e);
32
+ function e() {
33
+ return L(this, e), s.apply(this, arguments);
34
+ }
35
+ return A(e, [{
36
+ key: "defaultData",
37
+ get: function() {
38
+ return [{
39
+ value: 20
40
+ }, {
41
+ value: 80
42
+ }, {
43
+ value: 45
44
+ }, {
45
+ value: 10
46
+ }];
47
+ }
48
+ }, {
49
+ key: "data",
50
+ get: function() {
51
+ var i = this.asProps, r = i.data, t = i.loading;
52
+ return t ? this.defaultData : r;
53
+ }
54
+ }, {
55
+ key: "render",
56
+ 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({
59
+ ref: this.containerRef,
60
+ __excludeProps: ["data"].concat(w(H))
61
+ }, i))), /* @__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(n, m) {
67
+ var c = u("chart-palette-order-other-data");
68
+ return n.color && (c = u(n.color)), /* @__PURE__ */ _.createElement("rect", {
69
+ 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
75
+ }, B && !x && /* @__PURE__ */ _.createElement("animate", {
76
+ attributeName: "y",
77
+ values: "".concat(t.defaultHeight, ";").concat(t.defaultHeight - n.value),
78
+ dur: "500ms"
79
+ }));
80
+ })));
81
+ }
82
+ }]), e;
83
+ }($);
84
+ l(o, "enhance", [N()]);
85
+ l(o, "style", j);
86
+ l(o, "defaultProps", {
87
+ animate: !0
88
+ });
89
+ var P = v(o);
90
+ P.displayName = "MiniChart.TrendBar";
91
+ var ee = v(o, {}, {
92
+ enhancements: [function() {
93
+ return {
94
+ wrapperProps: function(s) {
95
+ return y(s, {
96
+ isHistogram: !0
97
+ });
98
+ }
99
+ };
100
+ }]
101
+ });
102
+ P.displayName = "MiniChart.TrendHistogram";
103
+ export {
104
+ P as TrendBar,
105
+ ee as TrendHistogram
106
+ };
@@ -0,0 +1,140 @@
1
+ import A from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import y 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 = (
17
+ /*__reshadow_css_start__*/
18
+ ($.insert(
19
+ /*__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_"
22
+ ), {
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"
29
+ })
30
+ ), l = /* @__PURE__ */ function(g) {
31
+ H(s, g);
32
+ var f = W(s);
33
+ function s() {
34
+ return E(this, s), f.apply(this, arguments);
35
+ }
36
+ return R(s, [{
37
+ key: "defaultData",
38
+ get: function() {
39
+ return [15, 70, 20, 85, 20];
40
+ }
41
+ }, {
42
+ key: "lastPointRadius",
43
+ get: function() {
44
+ var e;
45
+ return (e = this.asProps.lastPointRadius) !== null && e !== void 0 ? e : 6;
46
+ }
47
+ }, {
48
+ key: "data",
49
+ get: function() {
50
+ var e = this.asProps, t = e.data, a = e.loading;
51
+ return a ? this.defaultData : t;
52
+ }
53
+ }, {
54
+ key: "svgWidth",
55
+ get: function() {
56
+ return this.asProps.lastPointColor ? this.defaultWidth + this.lastPointRadius : this.defaultWidth;
57
+ }
58
+ }, {
59
+ key: "svgHeight",
60
+ get: function() {
61
+ return this.asProps.lastPointColor ? this.defaultHeight + this.lastPointRadius : this.defaultHeight;
62
+ }
63
+ }, {
64
+ key: "color",
65
+ 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);
68
+ }
69
+ }, {
70
+ key: "render",
71
+ 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({
76
+ ref: this.containerRef,
77
+ __excludeProps: ["data"].concat(A(L))
78
+ }, e))), /* @__PURE__ */ i.createElement("svg", t.cn("svg", y({
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(o, ")")
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(o, ")")
94
+ })), u && !m && /* @__PURE__ */ i.createElement("circle", t.cn("circle", {
95
+ cx: P * (_ - 1),
96
+ cy: this.defaultHeight - this.data[_ - 1],
97
+ r: this.lastPointRadius,
98
+ fill: p(u),
99
+ stroke: p("chart-grid-border"),
100
+ strokeWidth: 4,
101
+ clipPath: "url(#".concat(o, ")")
102
+ })), T && !m && /* @__PURE__ */ i.createElement("clipPath", t.cn("clipPath", {
103
+ id: o
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%"
114
+ }))))));
115
+ }
116
+ }]), s;
117
+ }(j);
118
+ h(l, "enhance", [D(), B()]);
119
+ h(l, "style", M);
120
+ h(l, "defaultProps", {
121
+ animate: !0
122
+ });
123
+ var q = C(l);
124
+ q.displayName = "MiniChart.TrendLine";
125
+ var I = C(l, {}, {
126
+ enhancements: [function() {
127
+ return {
128
+ wrapperProps: function(f) {
129
+ return S(f, {
130
+ withArea: !0
131
+ });
132
+ }
133
+ };
134
+ }]
135
+ });
136
+ I.displayName = "MiniChart.TrendArea";
137
+ export {
138
+ I as TrendArea,
139
+ q as TrendLine
140
+ };
@@ -0,0 +1,66 @@
1
+ import f from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import u from "@babel/runtime/helpers/esm/createClass";
3
+ import a from "@babel/runtime/helpers/esm/assertThisInitialized";
4
+ import c from "@babel/runtime/helpers/esm/inherits";
5
+ import d from "@babel/runtime/helpers/esm/createSuper";
6
+ import s from "@babel/runtime/helpers/esm/defineProperty";
7
+ import m from "react";
8
+ import { Component as p } from "@semcore/core";
9
+ var R = /* @__PURE__ */ function(h) {
10
+ c(n, h);
11
+ var o = d(n);
12
+ function n() {
13
+ for (var e, t = arguments.length, r = new Array(t), i = 0; i < t; i++)
14
+ r[i] = arguments[i];
15
+ return f(this, n), e = o.call.apply(o, [this].concat(r)), s(a(e), "state", {
16
+ width: 200,
17
+ height: 100
18
+ }), s(a(e), "containerRef", /* @__PURE__ */ m.createRef()), e;
19
+ }
20
+ return u(n, [{
21
+ key: "componentDidMount",
22
+ value: function() {
23
+ this.setSizes();
24
+ }
25
+ }, {
26
+ key: "componentDidUpdate",
27
+ value: function(t) {
28
+ (t.w !== this.props.w || t.h !== this.props.h || t.data !== this.props.data) && this.setSizes();
29
+ }
30
+ }, {
31
+ key: "defaultWidth",
32
+ get: function() {
33
+ var t = this.state, r = t.width, i = t.height;
34
+ return r / i * this.defaultHeight;
35
+ }
36
+ }, {
37
+ key: "defaultHeight",
38
+ get: function() {
39
+ return 100;
40
+ }
41
+ }, {
42
+ key: "svgWidth",
43
+ get: function() {
44
+ return this.defaultWidth;
45
+ }
46
+ }, {
47
+ key: "svgHeight",
48
+ get: function() {
49
+ return this.defaultHeight;
50
+ }
51
+ }, {
52
+ key: "setSizes",
53
+ value: function() {
54
+ if (this.containerRef.current) {
55
+ var t = this.containerRef.current.getBoundingClientRect(), r = t.width, i = t.height;
56
+ r > 0 && i > 0 && this.setState({
57
+ width: r,
58
+ height: i
59
+ });
60
+ }
61
+ }
62
+ }]), n;
63
+ }(p);
64
+ export {
65
+ R as Trend
66
+ };
@@ -0,0 +1,16 @@
1
+ import { ScoreSemiDonut as r, ScoreDonut as o } from "./component/score/Donut.mjs";
2
+ import { ScoreLine as e } from "./component/score/Line.mjs";
3
+ import { TrendLine as m, TrendArea as i } from "./component/trend/Line.mjs";
4
+ import { TrendBar as t, TrendHistogram as n } from "./component/trend/Bar.mjs";
5
+ var S = {
6
+ TrendLine: m,
7
+ TrendArea: i,
8
+ TrendBar: t,
9
+ TrendHistogram: n,
10
+ ScoreSemiDonut: r,
11
+ ScoreDonut: o,
12
+ ScoreLine: e
13
+ };
14
+ export {
15
+ S as default
16
+ };
package/package.json CHANGED
@@ -1,19 +1,24 @@
1
1
  {
2
2
  "name": "@semcore/mini-chart",
3
3
  "description": "Semrush MiniChart Component",
4
- "version": "0.29.0-prerelease.9",
4
+ "version": "0.29.1-prerelease.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
+ "exports": {
12
+ "require": "./lib/cjs/index.js",
13
+ "import": "./lib/esm/index.mjs",
14
+ "types": "./lib/types/index.d.ts"
15
+ },
11
16
  "dependencies": {
12
- "@semcore/flex-box": "5.41.0-prerelease.9",
13
- "@semcore/utils": "4.47.1-prerelease.9"
17
+ "@semcore/flex-box": "5.41.1-prerelease.0",
18
+ "@semcore/utils": "4.48.1-prerelease.0"
14
19
  },
15
20
  "peerDependencies": {
16
- "@semcore/core": "^2.39.0-prerelease.9",
21
+ "@semcore/core": "^2.39.1-prerelease.0",
17
22
  "react": "16.8 - 18",
18
23
  "react-dom": "16.8 - 18"
19
24
  },
@@ -27,6 +32,6 @@
27
32
  "@semcore/testing-utils": "1.0.0"
28
33
  },
29
34
  "scripts": {
30
- "build": "pnpm semcore-builder --source=ts"
35
+ "build": "pnpm semcore-builder --source=ts && pnpm vite build"
31
36
  }
32
37
  }
package/vite.config.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { defineConfig, mergeConfig } from 'vite';
2
+
3
+ import viteConfig from '../../commonVite.config';
4
+
5
+ export default mergeConfig(
6
+ viteConfig,
7
+ defineConfig({
8
+ build: {
9
+ lib: {
10
+ entry: './src/index.ts',
11
+ },
12
+ rollupOptions: {
13
+ external: ['react', 'react-dom', 'react/jsx-runtime', /@babel\/runtime\/*/, /@semcore\/*/],
14
+ },
15
+ },
16
+ }),
17
+ );