@trackunit/react-chart-components 0.0.173 → 0.0.175

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.js CHANGED
@@ -180,7 +180,7 @@ const cvaKpiContainer = cssClassVarianceUtilities.cvaMerge(["flex", "flex-col",
180
180
  * @returns {JSX.Element} Kpi component
181
181
  */
182
182
  const Kpi = ({ className, dataTestId, showChart = false, count, description, totalCount, countColor, totalCountColor, suffix, inline = false, loading = false, }) => {
183
- return (jsxRuntime.jsxs("div", { className: cvaKpi({ 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("div", { className: cvaKpiContainer({ inline }), "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, children: [jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 20 }), jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 50 })] })) : (jsxRuntime.jsxs("div", { className: cvaKpiContainer({ inline, showChart }), "data-testid": dataTestId && `${dataTestId}-container`, children: [jsxRuntime.jsxs("span", { className: cvaKpiCountContainer(), children: [jsxRuntime.jsx("span", { className: cvaKpiCount(), children: count }), suffix && (jsxRuntime.jsx("span", { className: cvaKpiSuffix(), "data-testid": dataTestId && `${dataTestId}-suffix`, children: suffix }))] }), jsxRuntime.jsx("span", { className: cvaKpiDescription(), children: description })] }))] }));
183
+ return (jsxRuntime.jsxs("div", { className: cvaKpi({ 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("div", { className: cvaKpiContainer({ inline }), "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, children: [jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 20 }), jsxRuntime.jsx(reactComponents.SkeletonLines, { lines: 1, width: 50 })] })) : (jsxRuntime.jsxs("div", { className: cvaKpiContainer({ inline, showChart }), "data-testid": dataTestId && `${dataTestId}-container`, children: [jsxRuntime.jsxs("span", { className: cvaKpiCountContainer(), children: [jsxRuntime.jsx("span", { className: cvaKpiCount(), children: count !== null && count !== void 0 ? count : "-" }), suffix && (jsxRuntime.jsx("span", { className: cvaKpiSuffix(), "data-testid": dataTestId && `${dataTestId}-suffix`, children: suffix }))] }), jsxRuntime.jsx("span", { className: cvaKpiDescription(), children: description })] }))] }));
184
184
  };
185
185
 
186
186
  const cvaLegendItem = cssClassVarianceUtilities.cvaMerge([
package/index.esm.js CHANGED
@@ -153,7 +153,7 @@ const cvaKpiContainer = cvaMerge(["flex", "flex-col", "items-baseline"], {
153
153
  * @returns {JSX.Element} Kpi component
154
154
  */
155
155
  const Kpi = ({ className, dataTestId, showChart = false, count, description, totalCount, countColor, totalCountColor, suffix, inline = false, loading = false, }) => {
156
- return (jsxs("div", { className: cvaKpi({ 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("div", { className: cvaKpiContainer({ inline }), "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, children: [jsx(SkeletonLines, { lines: 1, width: 20 }), jsx(SkeletonLines, { lines: 1, width: 50 })] })) : (jsxs("div", { className: cvaKpiContainer({ inline, showChart }), "data-testid": dataTestId && `${dataTestId}-container`, children: [jsxs("span", { className: cvaKpiCountContainer(), children: [jsx("span", { className: cvaKpiCount(), children: count }), suffix && (jsx("span", { className: cvaKpiSuffix(), "data-testid": dataTestId && `${dataTestId}-suffix`, children: suffix }))] }), jsx("span", { className: cvaKpiDescription(), children: description })] }))] }));
156
+ return (jsxs("div", { className: cvaKpi({ 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("div", { className: cvaKpiContainer({ inline }), "data-testid": dataTestId && `${dataTestId}-skeleton-lines`, children: [jsx(SkeletonLines, { lines: 1, width: 20 }), jsx(SkeletonLines, { lines: 1, width: 50 })] })) : (jsxs("div", { className: cvaKpiContainer({ inline, showChart }), "data-testid": dataTestId && `${dataTestId}-container`, children: [jsxs("span", { className: cvaKpiCountContainer(), children: [jsx("span", { className: cvaKpiCount(), children: count !== null && count !== void 0 ? count : "-" }), suffix && (jsx("span", { className: cvaKpiSuffix(), "data-testid": dataTestId && `${dataTestId}-suffix`, children: suffix }))] }), jsx("span", { className: cvaKpiDescription(), children: description })] }))] }));
157
157
  };
158
158
 
159
159
  const cvaLegendItem = cvaMerge([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-chart-components",
3
- "version": "0.0.173",
3
+ "version": "0.0.175",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from "@storybook/react";
2
2
  import { Chart, ChartProps } from "./Chart";
3
3
  type Story = StoryObj<typeof Chart>;
4
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ChartProps>;
4
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, ChartProps>;
5
5
  export default _default;
6
6
  export declare const packageName: () => JSX.Element;
7
7
  export declare const Default: Story;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from "@storybook/react";
2
2
  import { Kpi, KpiProps } from "./Kpi";
3
3
  type Story = StoryObj<typeof Kpi>;
4
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, KpiProps>;
4
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, KpiProps>;
5
5
  export default _default;
6
6
  export declare const packageName: () => JSX.Element;
7
7
  export declare const Default: Story;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from "@storybook/react";
2
2
  import { ILegendItem, LegendItem } from "./LegendItem";
3
3
  type Story = StoryObj<typeof LegendItem>;
4
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ILegendItem>;
4
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, ILegendItem>;
5
5
  export default _default;
6
6
  export declare const packageName: () => JSX.Element;
7
7
  export declare const Default: Story;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from "@storybook/react";
2
2
  import { PieChart, PieChartProps } from "./PieChart";
3
3
  type Story = StoryObj<typeof PieChart>;
4
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, PieChartProps<object>>;
4
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, PieChartProps<object>>;
5
5
  export default _default;
6
6
  export declare const packageName: () => JSX.Element;
7
7
  export declare const Default: Story;