@eleventheye/asui 2.12.0 → 2.12.2
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/dist/aschart/donut/ASChartDonut.d.ts.map +1 -1
- package/dist/aschart/donut/ASChartDonut.js +1 -1
- package/dist/aschart/donut/styles.d.ts +5 -0
- package/dist/aschart/donut/styles.d.ts.map +1 -1
- package/dist/aschart/donut/styles.js +29 -5
- package/dist/astheme/ASThemeDefault.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASChartDonut.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/ASChartDonut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ASChartDonut.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/ASChartDonut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAuFzD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyM7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -132,6 +132,6 @@ const ASChartDonut = ({ className = '', value = 0, secondaryValue = -1, tertiary
|
|
|
132
132
|
SecondaryDonut,
|
|
133
133
|
PrimaryTrack,
|
|
134
134
|
]);
|
|
135
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.DonutChart, { className: className, theme: theme, style: style, "$size": donutSize, children: [donutLabel && ((0, jsx_runtime_1.jsxs)(styles_1.DonutChartText, { theme: theme.chartdonut, "$size": size, children: [donutLabel, (0, jsx_runtime_1.jsx)(styles_1.DonutChartSubText, { theme: theme.chartdonut, "$size": size, children: donutSubLabel })] })), (0, jsx_runtime_1.jsxs)(styles_1.DonutChartSvg, { width: "100%", viewBox: "0 0 240 240", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleOuterTrack, { theme: theme.chartdonut, d: trackPath, strokeWidth: trackThickness, "$dasharray": trackDasharray, "$dashoffset": trackOffset + 1, fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleInnerTrack, { theme: theme.chartdonut, d: trackPath, strokeWidth: trackThickness ? trackThickness - 2 : 8, "$dasharray": trackDasharray, "$dashoffset": trackOffset ? trackOffset + 3 : 8, fill: "none" }), (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("title", { children: "ASChartDonut" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircle, { "$offset": primaryPercentageValue, theme: theme.chartdonut, d: PrimaryDonut, strokeWidth: donutThickness, fill: "none" })] }), secondaryPercentageValue > -1 && ((0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleSecondary, { "$offset": secondaryPercentageValue, theme: theme.chartdonut, d: SecondaryDonut, strokeWidth: (0, donutHelpers_1.getDonutThickness)(size), fill: "none" })),
|
|
135
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.DonutChart, { className: className, theme: theme, style: style, "$size": donutSize, children: [donutLabel && ((0, jsx_runtime_1.jsxs)(styles_1.DonutChartText, { theme: theme.chartdonut, "$size": size, children: [donutLabel, (0, jsx_runtime_1.jsx)(styles_1.DonutChartSubText, { theme: theme.chartdonut, "$size": size, children: donutSubLabel })] })), (0, jsx_runtime_1.jsxs)(styles_1.DonutChartSvg, { width: "100%", viewBox: "0 0 240 240", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleOuterTrack, { theme: theme.chartdonut, d: trackPath, strokeWidth: trackThickness, "$dasharray": trackDasharray, "$dashoffset": trackOffset + 1, fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleInnerTrack, { theme: theme.chartdonut, d: trackPath, strokeWidth: trackThickness ? trackThickness - 2 : 8, "$dasharray": trackDasharray, "$dashoffset": trackOffset ? trackOffset + 3 : 8, fill: "none" }), (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("title", { children: "ASChartDonut" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleBorder, { "$alternateColors": true, "$offset": DonutDashArrayOffsets[0], theme: theme.chartdonut, d: PrimaryDonut, strokeWidth: donutThickness, fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircle, { "$offset": primaryPercentageValue, theme: theme.chartdonut, d: PrimaryDonut, strokeWidth: donutThickness, fill: "none" })] }), secondaryValue > -1 && secondaryPercentageValue > -1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleSecondaryBorder, { "$alternateColors": true, "$offset": DonutDashArrayOffsets[1], theme: theme.chartdonut, d: SecondaryDonut, strokeWidth: (0, donutHelpers_1.getDonutThickness)(size), fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleSecondary, { "$offset": secondaryPercentageValue, theme: theme.chartdonut, d: SecondaryDonut, strokeWidth: (0, donutHelpers_1.getDonutThickness)(size), fill: "none" })] })), tertiaryValue > -1 && tertiaryPercentageValue > -1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleTertiaryBorder, { "$alternateColors": true, "$offset": DonutDashArrayOffsets[2], theme: theme.chartdonut, d: TertiaryDonut, strokeWidth: (0, donutHelpers_1.getDonutThickness)(size), fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleTertiary, { "$offset": tertiaryPercentageValue, theme: theme.chartdonut, d: TertiaryDonut, strokeWidth: (0, donutHelpers_1.getDonutThickness)(size), fill: "none" })] })), quaternaryValue > -1 && quaternaryPercentageValue > -1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleQuaternaryBorder, { "$offset": DonutDashArrayOffsets[3], theme: theme.chartdonut, d: QuaternaryDonut, strokeWidth: (0, donutHelpers_1.getDonutThickness)(size), fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleQuaternary, { "$offset": quaternaryPercentageValue, theme: theme.chartdonut, d: QuaternaryDonut, strokeWidth: (0, donutHelpers_1.getDonutThickness)(size), fill: "none" })] }))] })] }));
|
|
136
136
|
};
|
|
137
137
|
exports.default = ASChartDonut;
|
|
@@ -15,10 +15,15 @@ export type ASChartDonutCircleProps = {
|
|
|
15
15
|
theme: ASChartDonutTheme;
|
|
16
16
|
$offset: number;
|
|
17
17
|
$dasharray?: number;
|
|
18
|
+
$alternateColors?: boolean;
|
|
18
19
|
};
|
|
20
|
+
export declare const DonutChartCircleBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
19
21
|
export declare const DonutChartCircle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
22
|
+
export declare const DonutChartCircleSecondaryBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
20
23
|
export declare const DonutChartCircleSecondary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
24
|
+
export declare const DonutChartCircleTertiaryBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
21
25
|
export declare const DonutChartCircleTertiary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
26
|
+
export declare const DonutChartCircleQuaternaryBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
22
27
|
export declare const DonutChartCircleQuaternary: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGPathElement>, ASChartDonutCircleProps>> & string;
|
|
23
28
|
export type DonutChartThemeProps = {
|
|
24
29
|
theme: ASChartDonutTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,UAAU,4PAMtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,CAAC;AACF,eAAO,MAAM,cAAc,gQAe1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,gQAkB7B,CAAC;AAEF,eAAO,MAAM,aAAa,mKAEzB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,MAAM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Track = exports.DonutChartCircleQuaternary = exports.DonutChartCircleTertiary = exports.DonutChartCircleSecondary = exports.DonutChartCircle = exports.DonutChartSvg = exports.DonutChartSubText = exports.DonutChartText = exports.DonutChart = void 0;
|
|
3
|
+
exports.DonutChartCircleOuterTrack = exports.DonutChartCircleInnerTrack = exports.DonutChartCircleQuaternary = exports.DonutChartCircleQuaternaryBorder = exports.DonutChartCircleTertiary = exports.DonutChartCircleTertiaryBorder = exports.DonutChartCircleSecondary = exports.DonutChartCircleSecondaryBorder = exports.DonutChartCircle = exports.DonutChartCircleBorder = exports.DonutChartSvg = exports.DonutChartSubText = exports.DonutChartText = exports.DonutChart = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
6
|
exports.DonutChart = styled_components_1.default.div `
|
|
@@ -43,6 +43,12 @@ exports.DonutChartSubText = styled_components_1.default.span `
|
|
|
43
43
|
exports.DonutChartSvg = styled_components_1.default.svg `
|
|
44
44
|
transform: rotate(-225deg) scaleY(-1);
|
|
45
45
|
`;
|
|
46
|
+
exports.DonutChartCircleBorder = styled_components_1.default.path `
|
|
47
|
+
stroke-dasharray: 500;
|
|
48
|
+
stroke-dashoffset: 500;
|
|
49
|
+
stroke-dashoffset: ${({ $offset }) => $offset};
|
|
50
|
+
stroke: ${({ theme, $alternateColors }) => ($alternateColors ? '#ffffff00' : `${theme.chartdonutColor}30`)};
|
|
51
|
+
`;
|
|
46
52
|
exports.DonutChartCircle = styled_components_1.default.path `
|
|
47
53
|
stroke-dasharray: 500;
|
|
48
54
|
stroke-dashoffset: 500;
|
|
@@ -50,6 +56,12 @@ exports.DonutChartCircle = styled_components_1.default.path `
|
|
|
50
56
|
stroke-dashoffset: ${({ $offset }) => $offset};
|
|
51
57
|
stroke: ${({ theme }) => theme.chartdonutColor};
|
|
52
58
|
`;
|
|
59
|
+
exports.DonutChartCircleSecondaryBorder = styled_components_1.default.path `
|
|
60
|
+
stroke-dasharray: 500;
|
|
61
|
+
stroke-dashoffset: 500;
|
|
62
|
+
stroke-dashoffset: ${({ $offset }) => $offset};
|
|
63
|
+
stroke: ${({ theme, $alternateColors }) => ($alternateColors ? '#ffffff30' : `${theme.chartdonutSecondaryColor}30`)};
|
|
64
|
+
`;
|
|
53
65
|
exports.DonutChartCircleSecondary = styled_components_1.default.path `
|
|
54
66
|
stroke-dasharray: 500;
|
|
55
67
|
stroke-dashoffset: 500;
|
|
@@ -57,6 +69,12 @@ exports.DonutChartCircleSecondary = styled_components_1.default.path `
|
|
|
57
69
|
stroke-dashoffset: ${({ $offset }) => $offset};
|
|
58
70
|
stroke: ${({ theme }) => theme.chartdonutSecondaryColor};
|
|
59
71
|
`;
|
|
72
|
+
exports.DonutChartCircleTertiaryBorder = styled_components_1.default.path `
|
|
73
|
+
stroke-dasharray: 500;
|
|
74
|
+
stroke-dashoffset: 500;
|
|
75
|
+
stroke-dashoffset: ${({ $offset }) => $offset};
|
|
76
|
+
stroke: ${({ theme, $alternateColors }) => ($alternateColors ? '#ffffff00' : `${theme.chartdonutTertiaryColor}30`)};
|
|
77
|
+
`;
|
|
60
78
|
exports.DonutChartCircleTertiary = styled_components_1.default.path `
|
|
61
79
|
stroke-dasharray: 500;
|
|
62
80
|
stroke-dashoffset: 500;
|
|
@@ -64,6 +82,12 @@ exports.DonutChartCircleTertiary = styled_components_1.default.path `
|
|
|
64
82
|
stroke-dashoffset: ${({ $offset }) => $offset};
|
|
65
83
|
stroke: ${({ theme }) => theme.chartdonutTertiaryColor};
|
|
66
84
|
`;
|
|
85
|
+
exports.DonutChartCircleQuaternaryBorder = styled_components_1.default.path `
|
|
86
|
+
stroke-dasharray: 500;
|
|
87
|
+
stroke-dashoffset: 500;
|
|
88
|
+
stroke-dashoffset: ${({ $offset }) => $offset};
|
|
89
|
+
stroke: ${({ theme, $alternateColors }) => ($alternateColors ? '#ffffff30' : `${theme.chartdonutQuaternaryColor}30`)};
|
|
90
|
+
`;
|
|
67
91
|
exports.DonutChartCircleQuaternary = styled_components_1.default.path `
|
|
68
92
|
stroke-dasharray: 500;
|
|
69
93
|
stroke-dashoffset: 500;
|
|
@@ -72,14 +96,14 @@ exports.DonutChartCircleQuaternary = styled_components_1.default.path `
|
|
|
72
96
|
stroke: ${({ theme }) => theme.chartdonutQuaternaryColor};
|
|
73
97
|
`;
|
|
74
98
|
exports.DonutChartCircleInnerTrack = styled_components_1.default.path `
|
|
75
|
-
stroke-dasharray: ${({ $dasharray }) => $dasharray};
|
|
76
|
-
stroke-dashoffset: ${({ $dashoffset }) => $dashoffset};
|
|
99
|
+
stroke-dasharray: ${({ $dasharray }) => $dasharray};
|
|
100
|
+
stroke-dashoffset: ${({ $dashoffset }) => $dashoffset};
|
|
77
101
|
stroke: ${({ theme }) => theme.chartdonutInnerTrackColor};
|
|
78
102
|
`;
|
|
79
103
|
exports.DonutChartCircleOuterTrack = styled_components_1.default.path `
|
|
80
104
|
rotate: 1deg;
|
|
81
|
-
stroke-dasharray: ${({ $dasharray }) => ($dasharray ? $dasharray + 1 : 503)};
|
|
82
|
-
stroke-dashoffset: ${({ $dashoffset }) => ($dashoffset ? $dashoffset + 1 : 126 - 2)};
|
|
105
|
+
stroke-dasharray: ${({ $dasharray }) => ($dasharray ? $dasharray + 1 : 503)};
|
|
106
|
+
stroke-dashoffset: ${({ $dashoffset }) => ($dashoffset ? $dashoffset + 1 : 126 - 2)};
|
|
83
107
|
stroke: ${({ theme }) => theme.chartdonutOuterTrackColor};
|
|
84
108
|
transform-origin: center;
|
|
85
109
|
`;
|
|
@@ -214,7 +214,7 @@ const ASThemeDefault = {
|
|
|
214
214
|
[ASUI_types_1.ComponentSize.Medium]: '-43px',
|
|
215
215
|
[ASUI_types_1.ComponentSize.Small]: '-40px',
|
|
216
216
|
},
|
|
217
|
-
chartdonutColor: colors.
|
|
217
|
+
chartdonutColor: colors.mainGold,
|
|
218
218
|
chartdonutInnerTrackColor: colors.mainGray81,
|
|
219
219
|
chartdonutOuterTrackColor: colors.mainGray99,
|
|
220
220
|
chartdonutTransitionDuration: '2s',
|