@semcore/mini-chart 16.0.9-prerelease.5 → 16.1.0-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 +10 -0
- package/lib/cjs/component/score/Donut.js +41 -28
- package/lib/cjs/component/score/Donut.js.map +1 -1
- package/lib/cjs/component/score/Line.js +18 -18
- package/lib/cjs/component/trend/Bar.js +7 -7
- package/lib/cjs/component/trend/Line.js +7 -7
- package/lib/cjs/utils/ScoreDonutUtils.js +36 -28
- package/lib/cjs/utils/ScoreDonutUtils.js.map +1 -1
- package/lib/es6/component/score/Donut.js +41 -28
- package/lib/es6/component/score/Donut.js.map +1 -1
- package/lib/es6/component/score/Line.js +18 -18
- package/lib/es6/component/trend/Bar.js +7 -7
- package/lib/es6/component/trend/Line.js +7 -7
- package/lib/es6/utils/ScoreDonutUtils.js +36 -28
- package/lib/es6/utils/ScoreDonutUtils.js.map +1 -1
- package/lib/esm/component/score/Donut.mjs +40 -29
- package/lib/esm/component/score/Line.mjs +19 -19
- package/lib/esm/component/trend/Bar.mjs +8 -8
- package/lib/esm/component/trend/Line.mjs +8 -8
- package/lib/esm/utils/ScoreDonutUtils.mjs +36 -28
- package/lib/types/component/score/Donut.d.ts +2 -0
- package/lib/types/utils/ScoreDonutUtils.d.ts +10 -7
- package/package.json +4 -4
|
@@ -16,26 +16,26 @@ import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEn
|
|
|
16
16
|
import { Box, Flex } from '@semcore/flex-box';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
/*!__reshadow-styles__:"./line.shadow.css"*/
|
|
19
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
19
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes pulse_1tspb{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_1tspb{0%{transform:translateX(0)}to{transform:translateX(100%)}}.___SDonutContainer_1tspb_gg_.__loading_1tspb_gg_,.___SLineGauge_1tspb_gg_.__loading_1tspb_gg_,.___STrendBar_1tspb_gg_.__loading_1tspb_gg_,.___STrendLine_1tspb_gg_.__loading_1tspb_gg_{animation-name:pulse_1tspb;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_1tspb_gg_{height:8px;background-color:var(--base-bg-color_1tspb, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineValue_1tspb_gg_{height:8px;border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_1tspb_gg_.__percent_1tspb_gg_{width:var(--percent_1tspb)}.___SLineSegmentItem_1tspb_gg_.__color_1tspb_gg_,.___SLineValue_1tspb_gg_.__color_1tspb_gg_{background-color:var(--color_1tspb, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_1tspb_gg_.__segments_1tspb_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SAnimationLine_1tspb_gg_,.___SLineGaugeSegment_1tspb_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_1tspb_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_1tspb_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_1tspb_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_1tspb;animation-duration:.5s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}", /*__inner_css_end__*/"1tspb_gg_"),
|
|
20
20
|
/*__reshadow_css_end__*/
|
|
21
21
|
{
|
|
22
|
-
"__SLineGauge": "
|
|
23
|
-
"_loading": "
|
|
24
|
-
"__SDonutContainer": "
|
|
25
|
-
"__STrendLine": "
|
|
26
|
-
"__STrendBar": "
|
|
27
|
-
"@pulse": "
|
|
28
|
-
"--base-bg-color": "--base-bg-
|
|
29
|
-
"__SLineValue": "
|
|
30
|
-
"_percent": "
|
|
31
|
-
"--percent": "--
|
|
32
|
-
"_color": "
|
|
33
|
-
"__SLineSegmentItem": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_segments": "
|
|
36
|
-
"__SLineGaugeSegment": "
|
|
37
|
-
"__SAnimationLine": "
|
|
38
|
-
"@move-line": "move-
|
|
22
|
+
"__SLineGauge": "___SLineGauge_1tspb_gg_",
|
|
23
|
+
"_loading": "__loading_1tspb_gg_",
|
|
24
|
+
"__SDonutContainer": "___SDonutContainer_1tspb_gg_",
|
|
25
|
+
"__STrendLine": "___STrendLine_1tspb_gg_",
|
|
26
|
+
"__STrendBar": "___STrendBar_1tspb_gg_",
|
|
27
|
+
"@pulse": "pulse_1tspb",
|
|
28
|
+
"--base-bg-color": "--base-bg-color_1tspb",
|
|
29
|
+
"__SLineValue": "___SLineValue_1tspb_gg_",
|
|
30
|
+
"_percent": "__percent_1tspb_gg_",
|
|
31
|
+
"--percent": "--percent_1tspb",
|
|
32
|
+
"_color": "__color_1tspb_gg_",
|
|
33
|
+
"__SLineSegmentItem": "___SLineSegmentItem_1tspb_gg_",
|
|
34
|
+
"--color": "--color_1tspb",
|
|
35
|
+
"_segments": "__segments_1tspb_gg_",
|
|
36
|
+
"__SLineGaugeSegment": "___SLineGaugeSegment_1tspb_gg_",
|
|
37
|
+
"__SAnimationLine": "___SAnimationLine_1tspb_gg_",
|
|
38
|
+
"@move-line": "move-line_1tspb"
|
|
39
39
|
});
|
|
40
40
|
var LineRoot = /*#__PURE__*/function (_Component) {
|
|
41
41
|
function LineRoot() {
|
|
@@ -17,15 +17,15 @@ import { Box } from '@semcore/flex-box';
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { Trend } from './Trend';
|
|
19
19
|
/*!__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
|
|
20
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
20
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes pulse_1rcp7{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_1rcp7_gg_.__loading_1rcp7_gg_,.___SLineGauge_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendBar_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendLine_1rcp7_gg_.__loading_1rcp7_gg_{animation-name:pulse_1rcp7;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}", /*__inner_css_end__*/"1rcp7_gg_"),
|
|
21
21
|
/*__reshadow_css_end__*/
|
|
22
22
|
{
|
|
23
|
-
"__SLineGauge": "
|
|
24
|
-
"_loading": "
|
|
25
|
-
"__SDonutContainer": "
|
|
26
|
-
"__STrendLine": "
|
|
27
|
-
"__STrendBar": "
|
|
28
|
-
"@pulse": "
|
|
23
|
+
"__SLineGauge": "___SLineGauge_1rcp7_gg_",
|
|
24
|
+
"_loading": "__loading_1rcp7_gg_",
|
|
25
|
+
"__SDonutContainer": "___SDonutContainer_1rcp7_gg_",
|
|
26
|
+
"__STrendLine": "___STrendLine_1rcp7_gg_",
|
|
27
|
+
"__STrendBar": "___STrendBar_1rcp7_gg_",
|
|
28
|
+
"@pulse": "pulse_1rcp7"
|
|
29
29
|
});
|
|
30
30
|
var TrendBarRoot = /*#__PURE__*/function (_Trend) {
|
|
31
31
|
function TrendBarRoot() {
|
|
@@ -18,15 +18,15 @@ import { Box } from '@semcore/flex-box';
|
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import { Trend } from './Trend';
|
|
20
20
|
/*!__reshadow-styles__:"../skeleton/skeleton.shadow.css"*/
|
|
21
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
21
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes pulse_1rcp7{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_1rcp7_gg_.__loading_1rcp7_gg_,.___SLineGauge_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendBar_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendLine_1rcp7_gg_.__loading_1rcp7_gg_{animation-name:pulse_1rcp7;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}", /*__inner_css_end__*/"1rcp7_gg_"),
|
|
22
22
|
/*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SLineGauge": "
|
|
25
|
-
"_loading": "
|
|
26
|
-
"__SDonutContainer": "
|
|
27
|
-
"__STrendLine": "
|
|
28
|
-
"__STrendBar": "
|
|
29
|
-
"@pulse": "
|
|
24
|
+
"__SLineGauge": "___SLineGauge_1rcp7_gg_",
|
|
25
|
+
"_loading": "__loading_1rcp7_gg_",
|
|
26
|
+
"__SDonutContainer": "___SDonutContainer_1rcp7_gg_",
|
|
27
|
+
"__STrendLine": "___STrendLine_1rcp7_gg_",
|
|
28
|
+
"__STrendBar": "___STrendBar_1rcp7_gg_",
|
|
29
|
+
"@pulse": "pulse_1rcp7"
|
|
30
30
|
});
|
|
31
31
|
var TrendLineRoot = /*#__PURE__*/function (_Trend) {
|
|
32
32
|
function TrendLineRoot() {
|
|
@@ -9,14 +9,9 @@ export var ScoreDonutUtils = /*#__PURE__*/function () {
|
|
|
9
9
|
_defineProperty(this, "radius", void 0);
|
|
10
10
|
this.isSemiDonut = isSemiDonut;
|
|
11
11
|
this.radius = isSemiDonut ? 9 : 10;
|
|
12
|
-
this.value = value;
|
|
12
|
+
this.value = Math.max(Math.min(value, 100), 0);
|
|
13
13
|
}
|
|
14
14
|
return _createClass(ScoreDonutUtils, [{
|
|
15
|
-
key: "hasDivider",
|
|
16
|
-
get: function get() {
|
|
17
|
-
return ![0, 100].includes(this.value);
|
|
18
|
-
}
|
|
19
|
-
}, {
|
|
20
15
|
key: "viewBox",
|
|
21
16
|
get: function get() {
|
|
22
17
|
return this.isSemiDonut ? '0 0 24 12' : '0 0 24 24';
|
|
@@ -27,45 +22,58 @@ export var ScoreDonutUtils = /*#__PURE__*/function () {
|
|
|
27
22
|
return this.isSemiDonut ? 6 : 4;
|
|
28
23
|
}
|
|
29
24
|
}, {
|
|
30
|
-
key: "
|
|
25
|
+
key: "fullLength",
|
|
31
26
|
get: function get() {
|
|
32
27
|
return this.isSemiDonut ? Math.PI * this.radius : 2 * Math.PI * this.radius;
|
|
33
28
|
}
|
|
34
29
|
}, {
|
|
35
|
-
key: "
|
|
30
|
+
key: "point",
|
|
31
|
+
get: function get() {
|
|
32
|
+
return this.isSemiDonut ? this.fullLength / (100 / 3) : this.fullLength / 100;
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
key: "valueLength",
|
|
36
|
+
get: function get() {
|
|
37
|
+
return this.fullLength * (this.value / 100);
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
key: "animatedValueLength",
|
|
41
|
+
get: function get() {
|
|
42
|
+
return Math.min(this.valueLength, this.fullLength - this.startMargin - this.endMargin);
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
key: "startMargin",
|
|
46
|
+
get: function get() {
|
|
47
|
+
var margin = 0;
|
|
48
|
+
if (this.value > 0) margin = this.point;
|
|
49
|
+
return margin;
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "endMargin",
|
|
36
53
|
get: function get() {
|
|
37
|
-
|
|
54
|
+
var margin = 0;
|
|
55
|
+
if (!this.isSemiDonut && this.value > 0) margin = this.point;
|
|
56
|
+
return margin;
|
|
38
57
|
}
|
|
39
58
|
}, {
|
|
40
|
-
key: "
|
|
59
|
+
key: "baseOffset",
|
|
41
60
|
get: function get() {
|
|
42
|
-
return this.
|
|
61
|
+
return -1 * (this.valueLength + this.startMargin);
|
|
43
62
|
}
|
|
44
63
|
}, {
|
|
45
|
-
key: "
|
|
64
|
+
key: "baseLength",
|
|
46
65
|
get: function get() {
|
|
47
|
-
return this.
|
|
66
|
+
return Math.max(this.fullLength - this.valueLength - this.startMargin - this.endMargin, 0);
|
|
48
67
|
}
|
|
49
68
|
}, {
|
|
50
|
-
key: "
|
|
69
|
+
key: "animatedBaseLengthFrom",
|
|
51
70
|
get: function get() {
|
|
52
|
-
|
|
53
|
-
var offsetPoint = this.offsetPoint;
|
|
54
|
-
var greyStrokeDash = greyStroke - 2 * offsetPoint;
|
|
55
|
-
var strokeDashArrayBetweenSpaces = "".concat(greyStrokeDash, " ").concat(offsetPoint);
|
|
56
|
-
if (this.isSemiDonut) {
|
|
57
|
-
return "".concat(offsetPoint, " ").concat(this.value < 95 ? strokeDashArrayBetweenSpaces : '', " ").concat(this.baseStrokeDashArray);
|
|
58
|
-
}
|
|
59
|
-
return "".concat(offsetPoint, " ").concat(greyStrokeDash >= 0 ? strokeDashArrayBetweenSpaces : '', " ").concat(this.baseStrokeDashArray);
|
|
71
|
+
return this.fullLength - this.startMargin - this.endMargin;
|
|
60
72
|
}
|
|
61
73
|
}, {
|
|
62
|
-
key: "
|
|
74
|
+
key: "animatedBaseLengthTo",
|
|
63
75
|
get: function get() {
|
|
64
|
-
|
|
65
|
-
if (!hasDivider) return 0;
|
|
66
|
-
var valueStroke = this.valueStrokeDashArray;
|
|
67
|
-
var offsetPoint = this.offsetPoint;
|
|
68
|
-
return -1 * (valueStroke + (this.isSemiDonut ? offsetPoint : 0));
|
|
76
|
+
return this.fullLength - this.valueLength - this.startMargin - this.endMargin;
|
|
69
77
|
}
|
|
70
78
|
}]);
|
|
71
79
|
}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScoreDonutUtils.js","names":["ScoreDonutUtils","value","isSemiDonut","_classCallCheck","_defineProperty","radius","
|
|
1
|
+
{"version":3,"file":"ScoreDonutUtils.js","names":["ScoreDonutUtils","value","isSemiDonut","_classCallCheck","_defineProperty","radius","Math","max","min","_createClass","key","get","PI","fullLength","valueLength","startMargin","endMargin","margin","point"],"sources":["../../../src/utils/ScoreDonutUtils.ts"],"sourcesContent":["export class ScoreDonutUtils {\n private readonly isSemiDonut: boolean;\n private readonly value: number;\n\n public readonly radius: number;\n\n constructor(value: number, isSemiDonut: boolean) {\n this.isSemiDonut = isSemiDonut;\n this.radius = isSemiDonut ? 9 : 10;\n this.value = Math.max(Math.min(value, 100), 0);\n }\n\n public get viewBox() {\n return this.isSemiDonut ? '0 0 24 12' : '0 0 24 24';\n }\n\n public get strokeWidth() {\n return this.isSemiDonut ? 6 : 4;\n }\n\n public get fullLength() {\n return this.isSemiDonut ? Math.PI * this.radius : 2 * Math.PI * this.radius;\n }\n\n public get point() {\n return this.isSemiDonut\n ? this.fullLength / (100 / 3)\n : this.fullLength / 100;\n }\n\n public get valueLength() {\n return this.fullLength * (this.value / 100);\n }\n\n public get animatedValueLength() {\n return Math.min(this.valueLength, this.fullLength - this.startMargin - this.endMargin);\n }\n\n public get startMargin() {\n let margin = 0;\n if (this.value > 0) margin = this.point;\n return margin;\n }\n\n public get endMargin() {\n let margin = 0;\n if (!this.isSemiDonut && this.value > 0) margin = this.point;\n return margin;\n }\n\n public get baseOffset() {\n return -1 * (this.valueLength + this.startMargin);\n };\n\n public get baseLength() {\n return Math.max(this.fullLength - this.valueLength - this.startMargin - this.endMargin, 0);\n }\n\n public get animatedBaseLengthFrom() {\n return this.fullLength - this.startMargin - this.endMargin;\n }\n\n public get animatedBaseLengthTo() {\n return this.fullLength - this.valueLength - this.startMargin - this.endMargin;\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
9
9
|
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
10
10
|
import { extractAriaProps } from "@semcore/core/lib/utils/ariaProps";
|
|
11
11
|
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
12
|
+
import { cssVariableEnhance } from "@semcore/core/lib/utils/useCssVariable";
|
|
12
13
|
import { Box } from "@semcore/flex-box";
|
|
13
14
|
import React from "react";
|
|
14
15
|
import { ScoreDonutUtils } from "../../utils/ScoreDonutUtils.mjs";
|
|
@@ -20,19 +21,19 @@ var style = (
|
|
|
20
21
|
/*__reshadow_css_start__*/
|
|
21
22
|
(sstyled.insert(
|
|
22
23
|
/*__inner_css_start__*/
|
|
23
|
-
"@keyframes
|
|
24
|
+
"@keyframes pulse_19y2a{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_19y2a_gg_.__loading_19y2a_gg_,.___SLineGauge_19y2a_gg_.__loading_19y2a_gg_,.___STrendBar_19y2a_gg_.__loading_19y2a_gg_,.___STrendLine_19y2a_gg_.__loading_19y2a_gg_{animation-name:pulse_19y2a;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SDonutContainer_19y2a_gg_.__semi_19y2a_gg_ g{transform:rotate(180deg) translate(-24px,-24px)}.___SDonutContainer_19y2a_gg_ g{transform:rotate(-90deg) translate(-24px)}.___SDonutContainer_19y2a_gg_.__animate_19y2a_gg_ circle{transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out}",
|
|
24
25
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
26
|
+
"19y2a_gg_"
|
|
26
27
|
), /*__reshadow_css_end__*/
|
|
27
28
|
{
|
|
28
|
-
"__SLineGauge": "
|
|
29
|
-
"_loading": "
|
|
30
|
-
"__SDonutContainer": "
|
|
31
|
-
"__STrendLine": "
|
|
32
|
-
"__STrendBar": "
|
|
33
|
-
"@pulse": "
|
|
34
|
-
"_animate": "
|
|
35
|
-
"_semi": "
|
|
29
|
+
"__SLineGauge": "___SLineGauge_19y2a_gg_",
|
|
30
|
+
"_loading": "__loading_19y2a_gg_",
|
|
31
|
+
"__SDonutContainer": "___SDonutContainer_19y2a_gg_",
|
|
32
|
+
"__STrendLine": "___STrendLine_19y2a_gg_",
|
|
33
|
+
"__STrendBar": "___STrendBar_19y2a_gg_",
|
|
34
|
+
"@pulse": "pulse_19y2a",
|
|
35
|
+
"_animate": "__animate_19y2a_gg_",
|
|
36
|
+
"_semi": "__semi_19y2a_gg_"
|
|
36
37
|
})
|
|
37
38
|
);
|
|
38
39
|
var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
@@ -46,7 +47,7 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
46
47
|
value: function render() {
|
|
47
48
|
var _ref = this.asProps, _ref2;
|
|
48
49
|
var SDonutContainer = Box;
|
|
49
|
-
var _this$asProps = this.asProps, value = _this$asProps.value, styles = _this$asProps.styles, _this$asProps$baseBgC = _this$asProps.baseBgColor, baseBgColor = _this$asProps$baseBgC === void 0 ? "chart-grid-bar-chart-base-bg" : _this$asProps$baseBgC, _this$asProps$color = _this$asProps.color, color = _this$asProps$color === void 0 ? "chart-palette-order-1" : _this$asProps$color, resolveColor = _this$asProps.resolveColor, isSemiDonut = _this$asProps.isSemiDonut, loading = _this$asProps.loading;
|
|
50
|
+
var _this$asProps = this.asProps, value = _this$asProps.value, styles = _this$asProps.styles, _this$asProps$baseBgC = _this$asProps.baseBgColor, baseBgColor = _this$asProps$baseBgC === void 0 ? "chart-grid-bar-chart-base-bg" : _this$asProps$baseBgC, _this$asProps$color = _this$asProps.color, color = _this$asProps$color === void 0 ? "chart-palette-order-1" : _this$asProps$color, resolveColor = _this$asProps.resolveColor, isSemiDonut = _this$asProps.isSemiDonut, loading = _this$asProps.loading, animate = _this$asProps.animate, duration = _this$asProps.duration;
|
|
50
51
|
var scoreDonut = new ScoreDonutUtils(value, isSemiDonut);
|
|
51
52
|
var _extractAriaProps = extractAriaProps(this.asProps), __excludeProps = _extractAriaProps.__excludeProps, extractedAriaProps = _extractAriaProps.extractedAriaProps;
|
|
52
53
|
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SDonutContainer, _ref2.cn("SDonutContainer", _objectSpread({}, assignProps({
|
|
@@ -64,32 +65,42 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
64
65
|
"r": scoreDonut.radius,
|
|
65
66
|
"strokeWidth": scoreDonut.strokeWidth,
|
|
66
67
|
"stroke": resolveColor(baseBgColor),
|
|
67
|
-
"strokeDasharray": loading ? void 0 : "".concat(scoreDonut.
|
|
68
|
-
"strokeDashoffset": scoreDonut.
|
|
69
|
-
})
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
"strokeDasharray": "".concat(scoreDonut.valueStrokeDashArray, " ").concat(scoreDonut.baseStrokeDashArray),
|
|
76
|
-
"strokeDashoffset": scoreDonut.valueStrokeDashArray
|
|
77
|
-
}), /* @__PURE__ */ React.createElement("animate", _ref2.cn("animate", {
|
|
68
|
+
"strokeDasharray": loading ? void 0 : "".concat(scoreDonut.baseLength, " ").concat(scoreDonut.fullLength),
|
|
69
|
+
"strokeDashoffset": scoreDonut.baseOffset
|
|
70
|
+
}), animate && value > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("animate", _ref2.cn("animate", {
|
|
71
|
+
"attributeName": "stroke-dasharray",
|
|
72
|
+
"from": "".concat(scoreDonut.animatedBaseLengthFrom, " ").concat(scoreDonut.fullLength),
|
|
73
|
+
"to": "".concat(scoreDonut.animatedBaseLengthTo, " ").concat(scoreDonut.fullLength),
|
|
74
|
+
"dur": duration + "ms"
|
|
75
|
+
})), /* @__PURE__ */ React.createElement("animate", _ref2.cn("animate", {
|
|
78
76
|
"attributeName": "stroke-dashoffset",
|
|
79
|
-
"
|
|
80
|
-
|
|
77
|
+
"from": -1 * scoreDonut.startMargin,
|
|
78
|
+
"to": scoreDonut.baseOffset,
|
|
79
|
+
"dur": duration + "ms"
|
|
80
|
+
})))), !loading && value > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("circle", _ref2.cn("circle", {
|
|
81
81
|
"cx": "12",
|
|
82
82
|
"cy": "12",
|
|
83
83
|
"r": scoreDonut.radius,
|
|
84
84
|
"strokeWidth": scoreDonut.strokeWidth,
|
|
85
|
-
"stroke": resolveColor(
|
|
86
|
-
"strokeDasharray": scoreDonut.
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
"stroke": resolveColor(color),
|
|
86
|
+
"strokeDasharray": "".concat(scoreDonut.valueLength, " ").concat(scoreDonut.fullLength)
|
|
87
|
+
}), animate && /* @__PURE__ */ React.createElement("animate", _ref2.cn("animate", {
|
|
88
|
+
"attributeName": "stroke-dasharray",
|
|
89
|
+
"from": "0 ".concat(scoreDonut.fullLength),
|
|
90
|
+
"to": "".concat(scoreDonut.valueLength, " ").concat(scoreDonut.fullLength),
|
|
91
|
+
"dur": duration + "ms"
|
|
92
|
+
})))))));
|
|
89
93
|
}
|
|
90
94
|
}]);
|
|
91
95
|
}(Component);
|
|
92
|
-
_defineProperty(DonutRoot, "enhance", [
|
|
96
|
+
_defineProperty(DonutRoot, "enhance", [cssVariableEnhance({
|
|
97
|
+
variable: "--intergalactic-duration-extra-slow",
|
|
98
|
+
fallback: "500",
|
|
99
|
+
map: function map(v) {
|
|
100
|
+
return Number.parseInt(v, 10).toString();
|
|
101
|
+
},
|
|
102
|
+
prop: "duration"
|
|
103
|
+
}), resolveColorEnhance()]);
|
|
93
104
|
_defineProperty(DonutRoot, "style", style);
|
|
94
105
|
_defineProperty(DonutRoot, "defaultProps", {
|
|
95
106
|
animate: true
|
|
@@ -18,28 +18,28 @@ var style = (
|
|
|
18
18
|
/*__reshadow_css_start__*/
|
|
19
19
|
(sstyled.insert(
|
|
20
20
|
/*__inner_css_start__*/
|
|
21
|
-
"@keyframes
|
|
21
|
+
"@keyframes pulse_1tspb{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_1tspb{0%{transform:translateX(0)}to{transform:translateX(100%)}}.___SDonutContainer_1tspb_gg_.__loading_1tspb_gg_,.___SLineGauge_1tspb_gg_.__loading_1tspb_gg_,.___STrendBar_1tspb_gg_.__loading_1tspb_gg_,.___STrendLine_1tspb_gg_.__loading_1tspb_gg_{animation-name:pulse_1tspb;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_1tspb_gg_{height:8px;background-color:var(--base-bg-color_1tspb, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineValue_1tspb_gg_{height:8px;border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_1tspb_gg_.__percent_1tspb_gg_{width:var(--percent_1tspb)}.___SLineSegmentItem_1tspb_gg_.__color_1tspb_gg_,.___SLineValue_1tspb_gg_.__color_1tspb_gg_{background-color:var(--color_1tspb, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_1tspb_gg_.__segments_1tspb_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SAnimationLine_1tspb_gg_,.___SLineGaugeSegment_1tspb_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_1tspb_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_1tspb_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_1tspb_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_1tspb;animation-duration:.5s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}",
|
|
22
22
|
/*__inner_css_end__*/
|
|
23
|
-
"
|
|
23
|
+
"1tspb_gg_"
|
|
24
24
|
), /*__reshadow_css_end__*/
|
|
25
25
|
{
|
|
26
|
-
"__SLineGauge": "
|
|
27
|
-
"_loading": "
|
|
28
|
-
"__SDonutContainer": "
|
|
29
|
-
"__STrendLine": "
|
|
30
|
-
"__STrendBar": "
|
|
31
|
-
"@pulse": "
|
|
32
|
-
"--base-bg-color": "--base-bg-
|
|
33
|
-
"__SLineValue": "
|
|
34
|
-
"_percent": "
|
|
35
|
-
"--percent": "--
|
|
36
|
-
"_color": "
|
|
37
|
-
"__SLineSegmentItem": "
|
|
38
|
-
"--color": "--
|
|
39
|
-
"_segments": "
|
|
40
|
-
"__SLineGaugeSegment": "
|
|
41
|
-
"__SAnimationLine": "
|
|
42
|
-
"@move-line": "move-
|
|
26
|
+
"__SLineGauge": "___SLineGauge_1tspb_gg_",
|
|
27
|
+
"_loading": "__loading_1tspb_gg_",
|
|
28
|
+
"__SDonutContainer": "___SDonutContainer_1tspb_gg_",
|
|
29
|
+
"__STrendLine": "___STrendLine_1tspb_gg_",
|
|
30
|
+
"__STrendBar": "___STrendBar_1tspb_gg_",
|
|
31
|
+
"@pulse": "pulse_1tspb",
|
|
32
|
+
"--base-bg-color": "--base-bg-color_1tspb",
|
|
33
|
+
"__SLineValue": "___SLineValue_1tspb_gg_",
|
|
34
|
+
"_percent": "__percent_1tspb_gg_",
|
|
35
|
+
"--percent": "--percent_1tspb",
|
|
36
|
+
"_color": "__color_1tspb_gg_",
|
|
37
|
+
"__SLineSegmentItem": "___SLineSegmentItem_1tspb_gg_",
|
|
38
|
+
"--color": "--color_1tspb",
|
|
39
|
+
"_segments": "__segments_1tspb_gg_",
|
|
40
|
+
"__SLineGaugeSegment": "___SLineGaugeSegment_1tspb_gg_",
|
|
41
|
+
"__SAnimationLine": "___SAnimationLine_1tspb_gg_",
|
|
42
|
+
"@move-line": "move-line_1tspb"
|
|
43
43
|
})
|
|
44
44
|
);
|
|
45
45
|
var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
@@ -21,17 +21,17 @@ var style = (
|
|
|
21
21
|
/*__reshadow_css_start__*/
|
|
22
22
|
(sstyled.insert(
|
|
23
23
|
/*__inner_css_start__*/
|
|
24
|
-
"@keyframes
|
|
24
|
+
"@keyframes pulse_1rcp7{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_1rcp7_gg_.__loading_1rcp7_gg_,.___SLineGauge_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendBar_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendLine_1rcp7_gg_.__loading_1rcp7_gg_{animation-name:pulse_1rcp7;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
|
|
25
25
|
/*__inner_css_end__*/
|
|
26
|
-
"
|
|
26
|
+
"1rcp7_gg_"
|
|
27
27
|
), /*__reshadow_css_end__*/
|
|
28
28
|
{
|
|
29
|
-
"__SLineGauge": "
|
|
30
|
-
"_loading": "
|
|
31
|
-
"__SDonutContainer": "
|
|
32
|
-
"__STrendLine": "
|
|
33
|
-
"__STrendBar": "
|
|
34
|
-
"@pulse": "
|
|
29
|
+
"__SLineGauge": "___SLineGauge_1rcp7_gg_",
|
|
30
|
+
"_loading": "__loading_1rcp7_gg_",
|
|
31
|
+
"__SDonutContainer": "___SDonutContainer_1rcp7_gg_",
|
|
32
|
+
"__STrendLine": "___STrendLine_1rcp7_gg_",
|
|
33
|
+
"__STrendBar": "___STrendBar_1rcp7_gg_",
|
|
34
|
+
"@pulse": "pulse_1rcp7"
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
var TrendBarRoot = /* @__PURE__ */ function(_Trend) {
|
|
@@ -22,17 +22,17 @@ var style = (
|
|
|
22
22
|
/*__reshadow_css_start__*/
|
|
23
23
|
(sstyled.insert(
|
|
24
24
|
/*__inner_css_start__*/
|
|
25
|
-
"@keyframes
|
|
25
|
+
"@keyframes pulse_1rcp7{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_1rcp7_gg_.__loading_1rcp7_gg_,.___SLineGauge_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendBar_1rcp7_gg_.__loading_1rcp7_gg_,.___STrendLine_1rcp7_gg_.__loading_1rcp7_gg_{animation-name:pulse_1rcp7;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
|
|
26
26
|
/*__inner_css_end__*/
|
|
27
|
-
"
|
|
27
|
+
"1rcp7_gg_"
|
|
28
28
|
), /*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SLineGauge": "
|
|
31
|
-
"_loading": "
|
|
32
|
-
"__SDonutContainer": "
|
|
33
|
-
"__STrendLine": "
|
|
34
|
-
"__STrendBar": "
|
|
35
|
-
"@pulse": "
|
|
30
|
+
"__SLineGauge": "___SLineGauge_1rcp7_gg_",
|
|
31
|
+
"_loading": "__loading_1rcp7_gg_",
|
|
32
|
+
"__SDonutContainer": "___SDonutContainer_1rcp7_gg_",
|
|
33
|
+
"__STrendLine": "___STrendLine_1rcp7_gg_",
|
|
34
|
+
"__STrendBar": "___STrendBar_1rcp7_gg_",
|
|
35
|
+
"@pulse": "pulse_1rcp7"
|
|
36
36
|
})
|
|
37
37
|
);
|
|
38
38
|
var TrendLineRoot = /* @__PURE__ */ function(_Trend) {
|
|
@@ -9,14 +9,9 @@ var ScoreDonutUtils = /* @__PURE__ */ function() {
|
|
|
9
9
|
_defineProperty(this, "radius", void 0);
|
|
10
10
|
this.isSemiDonut = isSemiDonut;
|
|
11
11
|
this.radius = isSemiDonut ? 9 : 10;
|
|
12
|
-
this.value = value;
|
|
12
|
+
this.value = Math.max(Math.min(value, 100), 0);
|
|
13
13
|
}
|
|
14
14
|
return _createClass(ScoreDonutUtils2, [{
|
|
15
|
-
key: "hasDivider",
|
|
16
|
-
get: function get() {
|
|
17
|
-
return ![0, 100].includes(this.value);
|
|
18
|
-
}
|
|
19
|
-
}, {
|
|
20
15
|
key: "viewBox",
|
|
21
16
|
get: function get() {
|
|
22
17
|
return this.isSemiDonut ? "0 0 24 12" : "0 0 24 24";
|
|
@@ -27,45 +22,58 @@ var ScoreDonutUtils = /* @__PURE__ */ function() {
|
|
|
27
22
|
return this.isSemiDonut ? 6 : 4;
|
|
28
23
|
}
|
|
29
24
|
}, {
|
|
30
|
-
key: "
|
|
25
|
+
key: "fullLength",
|
|
31
26
|
get: function get() {
|
|
32
27
|
return this.isSemiDonut ? Math.PI * this.radius : 2 * Math.PI * this.radius;
|
|
33
28
|
}
|
|
34
29
|
}, {
|
|
35
|
-
key: "
|
|
30
|
+
key: "point",
|
|
31
|
+
get: function get() {
|
|
32
|
+
return this.isSemiDonut ? this.fullLength / (100 / 3) : this.fullLength / 100;
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
key: "valueLength",
|
|
36
|
+
get: function get() {
|
|
37
|
+
return this.fullLength * (this.value / 100);
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
key: "animatedValueLength",
|
|
41
|
+
get: function get() {
|
|
42
|
+
return Math.min(this.valueLength, this.fullLength - this.startMargin - this.endMargin);
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
key: "startMargin",
|
|
46
|
+
get: function get() {
|
|
47
|
+
var margin = 0;
|
|
48
|
+
if (this.value > 0) margin = this.point;
|
|
49
|
+
return margin;
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "endMargin",
|
|
36
53
|
get: function get() {
|
|
37
|
-
|
|
54
|
+
var margin = 0;
|
|
55
|
+
if (!this.isSemiDonut && this.value > 0) margin = this.point;
|
|
56
|
+
return margin;
|
|
38
57
|
}
|
|
39
58
|
}, {
|
|
40
|
-
key: "
|
|
59
|
+
key: "baseOffset",
|
|
41
60
|
get: function get() {
|
|
42
|
-
return this.
|
|
61
|
+
return -1 * (this.valueLength + this.startMargin);
|
|
43
62
|
}
|
|
44
63
|
}, {
|
|
45
|
-
key: "
|
|
64
|
+
key: "baseLength",
|
|
46
65
|
get: function get() {
|
|
47
|
-
return this.
|
|
66
|
+
return Math.max(this.fullLength - this.valueLength - this.startMargin - this.endMargin, 0);
|
|
48
67
|
}
|
|
49
68
|
}, {
|
|
50
|
-
key: "
|
|
69
|
+
key: "animatedBaseLengthFrom",
|
|
51
70
|
get: function get() {
|
|
52
|
-
|
|
53
|
-
var offsetPoint = this.offsetPoint;
|
|
54
|
-
var greyStrokeDash = greyStroke - 2 * offsetPoint;
|
|
55
|
-
var strokeDashArrayBetweenSpaces = "".concat(greyStrokeDash, " ").concat(offsetPoint);
|
|
56
|
-
if (this.isSemiDonut) {
|
|
57
|
-
return "".concat(offsetPoint, " ").concat(this.value < 95 ? strokeDashArrayBetweenSpaces : "", " ").concat(this.baseStrokeDashArray);
|
|
58
|
-
}
|
|
59
|
-
return "".concat(offsetPoint, " ").concat(greyStrokeDash >= 0 ? strokeDashArrayBetweenSpaces : "", " ").concat(this.baseStrokeDashArray);
|
|
71
|
+
return this.fullLength - this.startMargin - this.endMargin;
|
|
60
72
|
}
|
|
61
73
|
}, {
|
|
62
|
-
key: "
|
|
74
|
+
key: "animatedBaseLengthTo",
|
|
63
75
|
get: function get() {
|
|
64
|
-
|
|
65
|
-
if (!hasDivider) return 0;
|
|
66
|
-
var valueStroke = this.valueStrokeDashArray;
|
|
67
|
-
var offsetPoint = this.offsetPoint;
|
|
68
|
-
return -1 * (valueStroke + (this.isSemiDonut ? offsetPoint : 0));
|
|
76
|
+
return this.fullLength - this.valueLength - this.startMargin - this.endMargin;
|
|
69
77
|
}
|
|
70
78
|
}]);
|
|
71
79
|
}();
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type ComponentType } from '@semcore/core';
|
|
2
2
|
import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
|
|
3
|
+
import { cssVariableEnhance } from '@semcore/core/lib/utils/useCssVariable';
|
|
3
4
|
import { type BoxProps } from '@semcore/flex-box';
|
|
4
5
|
import type { CommonScoreProps } from './Score';
|
|
5
6
|
export type ScoreDonutProps = BoxProps & CommonScoreProps;
|
|
6
7
|
type Enhances = {
|
|
7
8
|
resolveColor: ReturnType<typeof resolveColorEnhance>;
|
|
9
|
+
duration: ReturnType<typeof cssVariableEnhance>;
|
|
8
10
|
isSemiDonut?: true;
|
|
9
11
|
};
|
|
10
12
|
export declare const ScoreDonut: ComponentType<ScoreDonutProps, {}, {}, Enhances>;
|
|
@@ -3,13 +3,16 @@ export declare class ScoreDonutUtils {
|
|
|
3
3
|
private readonly value;
|
|
4
4
|
readonly radius: number;
|
|
5
5
|
constructor(value: number, isSemiDonut: boolean);
|
|
6
|
-
get hasDivider(): boolean;
|
|
7
6
|
get viewBox(): "0 0 24 12" | "0 0 24 24";
|
|
8
7
|
get strokeWidth(): 6 | 4;
|
|
9
|
-
get
|
|
10
|
-
get
|
|
11
|
-
get
|
|
12
|
-
get
|
|
13
|
-
get
|
|
14
|
-
get
|
|
8
|
+
get fullLength(): number;
|
|
9
|
+
get point(): number;
|
|
10
|
+
get valueLength(): number;
|
|
11
|
+
get animatedValueLength(): number;
|
|
12
|
+
get startMargin(): number;
|
|
13
|
+
get endMargin(): number;
|
|
14
|
+
get baseOffset(): number;
|
|
15
|
+
get baseLength(): number;
|
|
16
|
+
get animatedBaseLengthFrom(): number;
|
|
17
|
+
get animatedBaseLengthTo(): number;
|
|
15
18
|
}
|