@eleventheye/asui 2.11.1 → 2.11.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ASChartDonut.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/ASChartDonut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAUzD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmD7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ASChartDonut.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/ASChartDonut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAWzD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyD7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -5,10 +5,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const apptypes_1 = require("../../apptypes");
6
6
  const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
7
7
  const styles_1 = require("./styles");
8
- const ASChartDonut = ({ className = '', theme = astheme_1.default, value = 5, style = undefined, size = apptypes_1.ComponentSize.Medium, donutSize = '200px', donutLabel = undefined, }) => {
8
+ const ASChartDonut = ({ className = '', theme = astheme_1.default, value = 5, style = undefined, size = apptypes_1.ComponentSize.Medium, donutSize = '200px', donutLabel = undefined, donutSubLabel = undefined, }) => {
9
9
  const thickness = size === apptypes_1.ComponentSize.Medium ? '12' : size === apptypes_1.ComponentSize.Small ? '8' : '16';
10
10
  const trackThickness = size === apptypes_1.ComponentSize.Medium ? '6' : size === apptypes_1.ComponentSize.Small ? '3' : '10';
11
11
  const percentageValue = 502 - Math.round((value / 100) * 378);
12
- return ((0, jsx_runtime_1.jsxs)(styles_1.DonutChart, { className: className, theme: theme, style: style, "$size": donutSize, children: [donutLabel && (0, jsx_runtime_1.jsx)(styles_1.DonutChartText, { theme: theme.chartdonut, children: donutLabel }), (0, jsx_runtime_1.jsxs)(styles_1.DonutChartSvg, { width: "100%", viewBox: "0 0 180 180", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleOuterTrack, { theme: theme.chartdonut, d: "M170 90A80 80 0 0090 10 80 80 0 0010 90a80 80 0 0080 80 80 80 0 0080-80Z", strokeWidth: parseInt(thickness, 10) + 2, fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleInnerTrack, { theme: theme.chartdonut, d: "M170 90A80 80 0 0090 10 80 80 0 0010 90a80 80 0 0080 80 80 80 0 0080-80Z", strokeWidth: parseInt(thickness, 10) - 4, 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": percentageValue, theme: theme.chartdonut, d: "M170 90A80 80 0 0090 10 80 80 0 0010 90a80 80 0 0080 80 80 80 0 0080-80Z", strokeWidth: thickness, fill: "none" })] })] })] }));
12
+ 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, children: [donutLabel, (0, jsx_runtime_1.jsx)(styles_1.DonutChartSubText, { children: donutSubLabel })] })), (0, jsx_runtime_1.jsxs)(styles_1.DonutChartSvg, { width: "100%", viewBox: "0 0 180 180", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleOuterTrack, { theme: theme.chartdonut, d: "M170 90A80 80 0 0090 10 80 80 0 0010 90a80 80 0 0080 80 80 80 0 0080-80Z", strokeWidth: parseInt(thickness, 10) + 2, fill: "none" }), (0, jsx_runtime_1.jsx)(styles_1.DonutChartCircleInnerTrack, { theme: theme.chartdonut, d: "M170 90A80 80 0 0090 10 80 80 0 0010 90a80 80 0 0080 80 80 80 0 0080-80Z", strokeWidth: parseInt(thickness, 10), 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": percentageValue, theme: theme.chartdonut, d: "M170 90A80 80 0 0090 10 80 80 0 0010 90a80 80 0 0080 80 80 80 0 0080-80Z", strokeWidth: thickness, fill: "none" })] })] })] }));
13
13
  };
14
14
  exports.default = ASChartDonut;
@@ -8,5 +8,6 @@ export interface ASChartDonutProps {
8
8
  size?: ASComponentSize;
9
9
  donutSize?: string;
10
10
  donutLabel?: React.ReactNode;
11
+ donutSubLabel?: React.ReactNode;
11
12
  }
12
13
  //# sourceMappingURL=ASChartDonut.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ASChartDonut.types.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/ASChartDonut.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAMhC,SAAS,CAAC,EAAE,MAAM,CAAC;IAOnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAOhB,KAAK,CAAC,EAAE,aAAa,CAAC;IAQtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAOf,IAAI,CAAC,EAAE,eAAe,CAAC;IAOvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAOnB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B"}
1
+ {"version":3,"file":"ASChartDonut.types.d.ts","sourceRoot":"","sources":["../../../src/aschart/donut/ASChartDonut.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAMhC,SAAS,CAAC,EAAE,MAAM,CAAC;IAOnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAOhB,KAAK,CAAC,EAAE,aAAa,CAAC;IAQtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAOf,IAAI,CAAC,EAAE,eAAe,CAAC;IAOvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAOnB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAO7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC"}
@@ -8,6 +8,7 @@ export type DonutChartTextStyledProps = {
8
8
  theme: ASChartDonutTheme;
9
9
  };
10
10
  export declare const DonutChartText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, DonutChartTextStyledProps>> & string;
11
+ export declare const DonutChartSubText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, DonutChartTextStyledProps>> & string;
11
12
  export declare const DonutChartSvg: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").SVGProps<SVGSVGElement>, never>> & string;
12
13
  export type ASChartDonutCircleProps = {
13
14
  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,MAAM,2BAA2B,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,iBA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AC;CAC1B,CAAC;AACF,eAAO,MAAM,0BAA0B,gMAItC,CAAC;AAEF,eAAO,MAAM,0BAA0B,gMAMtC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DonutChartCircleOuterTrack = exports.DonutChartCircleInnerTrack = exports.DonutChartCircle = exports.DonutChartSvg = exports.DonutChartText = exports.DonutChart = void 0;
3
+ exports.DonutChartCircleOuterTrack = exports.DonutChartCircleInnerTrack = exports.DonutChartCircle = 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 `
@@ -14,7 +14,7 @@ exports.DonutChartText = styled_components_1.default.span `
14
14
  position: absolute;
15
15
  top: 50%;
16
16
  left: 50%;
17
- transform: translate(-50%, -50%);
17
+ transform: translate(-50%, -60%);
18
18
  display: block;
19
19
  white-space: nowrap;
20
20
  font-size: ${({ theme }) => theme.chartdonutTextFontSize};
@@ -22,13 +22,25 @@ exports.DonutChartText = styled_components_1.default.span `
22
22
  color: ${({ theme }) => theme.chartdonutTextColor};
23
23
  text-shadow: ${({ theme }) => theme.chartdonutTextShadow};
24
24
  `;
25
+ exports.DonutChartSubText = styled_components_1.default.span `
26
+ position: absolute;
27
+ bottom: -24px;
28
+ left: 50%;
29
+ transform: translateX(-50%);
30
+ display: inline-block;
31
+ white-space: nowrap;
32
+ font-size: 1.5rem;
33
+ font-weight: 300;
34
+ color: ${({ theme }) => theme.chartdonutTextColor};
35
+ text-shadow: ${({ theme }) => theme.chartdonutTextShadow};
36
+ `;
25
37
  exports.DonutChartSvg = styled_components_1.default.svg `
26
38
  transform: rotate(-225deg) scaleY(-1);
27
39
  `;
28
40
  exports.DonutChartCircle = styled_components_1.default.path `
29
41
  stroke-dasharray: 502;
30
42
  stroke-dashoffset: 502;
31
- transition: stroke-dashoffset 4.5s ease-out;
43
+ transition: stroke-dashoffset 2.5s ease-out 0.5s;
32
44
  stroke-dashoffset: ${({ $offset }) => $offset};
33
45
  stroke: ${({ theme }) => theme.chartdonutColor};
34
46
  `;
@@ -173,10 +173,10 @@ const ASThemeDefault = {
173
173
  },
174
174
  chartdonut: {
175
175
  chartdonutColor: colors.yellowAlpha90,
176
- chartdonutInnerTrackColor: colors.mainGray99,
177
- chartdonutOuterTrackColor: colors.mainGray33,
176
+ chartdonutInnerTrackColor: colors.mainGray81,
177
+ chartdonutOuterTrackColor: colors.mainGray99,
178
178
  chartdonutTextColor: colors.mainGray55,
179
- chartdonutTextFontSize: '5rem',
179
+ chartdonutTextFontSize: '4rem',
180
180
  chartdonutTextFontWeight: '400',
181
181
  chartdonutTextFontFamily: "'Big Shoulders Display', 'BigShouldersDisplay', Arial, sans-serif",
182
182
  chartdonutTextShadow: '1px 1px 4px #000000',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleventheye/asui",
3
- "version": "2.11.1",
3
+ "version": "2.11.2",
4
4
  "private": false,
5
5
  "description": "AS UI React Library by eleventheye (another one!)",
6
6
  "keywords": [