@trackunit/react-chart-components 0.0.40 → 0.0.43
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/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/src/KPI/Kpi.d.ts +1 -1
package/index.cjs
CHANGED
|
@@ -150,7 +150,7 @@ const KPIDonutChart = ({ dataTestId, loading, countColor, totalCountColor, count
|
|
|
150
150
|
* @returns {JSX.Element} Kpi component
|
|
151
151
|
*/
|
|
152
152
|
const Kpi = ({ className, dataTestId, showChart = false, count, description, totalCount, countColor, totalCountColor, suffix, inline = false, loading = false, }) => {
|
|
153
|
-
return (jsxRuntime.jsxs(Root$1, Object.assign({ className: className, "data-testid": dataTestId }, { children: [showChart && (jsxRuntime.jsx(KPIDonutChart, { dataTestId: dataTestId && dataTestId + "-donut-chart", loading: loading, count: count, totalCount: totalCount, countColor: countColor, totalCountColor: totalCountColor })), loading ? (jsxRuntime.jsxs(Container, Object.assign({ "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, "$inline": inline }, { children: [jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 20 }), jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 50 })] }))) : (jsxRuntime.jsxs(Container, Object.assign({ "$showChart": showChart, "data-testid": dataTestId && `${dataTestId}-container`, "$inline": inline }, { children: [jsxRuntime.jsxs(CountContainer, { children: [jsxRuntime.jsx(Count, { children: count }), suffix && jsxRuntime.jsx(Suffix, Object.assign({ "data-testid": dataTestId && `${dataTestId}-suffix` }, { children: suffix }))] }), jsxRuntime.jsx(Description, { children: description })] })))] })));
|
|
153
|
+
return (jsxRuntime.jsxs(Root$1, Object.assign({ className: className, "data-testid": dataTestId }, { children: [showChart && (jsxRuntime.jsx(KPIDonutChart, { dataTestId: dataTestId && dataTestId + "-donut-chart", loading: loading, count: Number(count), totalCount: totalCount, countColor: countColor, totalCountColor: totalCountColor })), loading ? (jsxRuntime.jsxs(Container, Object.assign({ "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, "$inline": inline }, { children: [jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 20 }), jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 50 })] }))) : (jsxRuntime.jsxs(Container, Object.assign({ "$showChart": showChart, "data-testid": dataTestId && `${dataTestId}-container`, "$inline": inline }, { children: [jsxRuntime.jsxs(CountContainer, { children: [jsxRuntime.jsx(Count, { children: count }), suffix && jsxRuntime.jsx(Suffix, Object.assign({ "data-testid": dataTestId && `${dataTestId}-suffix` }, { children: suffix }))] }), jsxRuntime.jsx(Description, { children: description })] })))] })));
|
|
154
154
|
};
|
|
155
155
|
const Root$1 = tailwindStyledComponents.tw.div `tu-kpi`;
|
|
156
156
|
const CountContainer = tailwindStyledComponents.tw.span `tu-kpi__count-container`;
|
package/index.js
CHANGED
|
@@ -123,7 +123,7 @@ const KPIDonutChart = ({ dataTestId, loading, countColor, totalCountColor, count
|
|
|
123
123
|
* @returns {JSX.Element} Kpi component
|
|
124
124
|
*/
|
|
125
125
|
const Kpi = ({ className, dataTestId, showChart = false, count, description, totalCount, countColor, totalCountColor, suffix, inline = false, loading = false, }) => {
|
|
126
|
-
return (jsxs(Root$1, Object.assign({ className: className, "data-testid": dataTestId }, { children: [showChart && (jsx(KPIDonutChart, { dataTestId: dataTestId && dataTestId + "-donut-chart", loading: loading, count: count, totalCount: totalCount, countColor: countColor, totalCountColor: totalCountColor })), loading ? (jsxs(Container, Object.assign({ "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, "$inline": inline }, { children: [jsx(SkeletonLines, { lines: 1, width: 20 }), jsx(SkeletonLines, { lines: 1, width: 50 })] }))) : (jsxs(Container, Object.assign({ "$showChart": showChart, "data-testid": dataTestId && `${dataTestId}-container`, "$inline": inline }, { children: [jsxs(CountContainer, { children: [jsx(Count, { children: count }), suffix && jsx(Suffix, Object.assign({ "data-testid": dataTestId && `${dataTestId}-suffix` }, { children: suffix }))] }), jsx(Description, { children: description })] })))] })));
|
|
126
|
+
return (jsxs(Root$1, Object.assign({ className: className, "data-testid": dataTestId }, { children: [showChart && (jsx(KPIDonutChart, { dataTestId: dataTestId && dataTestId + "-donut-chart", loading: loading, count: Number(count), totalCount: totalCount, countColor: countColor, totalCountColor: totalCountColor })), loading ? (jsxs(Container, Object.assign({ "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, "$inline": inline }, { children: [jsx(SkeletonLines, { lines: 1, width: 20 }), jsx(SkeletonLines, { lines: 1, width: 50 })] }))) : (jsxs(Container, Object.assign({ "$showChart": showChart, "data-testid": dataTestId && `${dataTestId}-container`, "$inline": inline }, { children: [jsxs(CountContainer, { children: [jsx(Count, { children: count }), suffix && jsx(Suffix, Object.assign({ "data-testid": dataTestId && `${dataTestId}-suffix` }, { children: suffix }))] }), jsx(Description, { children: description })] })))] })));
|
|
127
127
|
};
|
|
128
128
|
const Root$1 = tw.div `tu-kpi`;
|
|
129
129
|
const CountContainer = tw.span `tu-kpi__count-container`;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-chart-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@trackunit/react-components": "0.1.
|
|
7
|
+
"@trackunit/react-components": "0.1.101",
|
|
8
8
|
"@trackunit/tailwind-styled-components": "0.0.56",
|
|
9
9
|
"@trackunit/ui-design-tokens": "0.0.66",
|
|
10
10
|
"echarts": "5.4.0",
|
package/src/KPI/Kpi.d.ts
CHANGED