@trackunit/react-components 1.9.56 → 1.10.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/index.cjs.js +9 -14
- package/index.esm.js +9 -14
- package/package.json +6 -6
- package/src/components/KPICard/KPICard.variants.d.ts +3 -1
package/index.cjs.js
CHANGED
|
@@ -3377,10 +3377,6 @@ const cvaKPICard = cssClassVarianceUtilities.cvaMerge([
|
|
|
3377
3377
|
"hover:shadow-none", // overwriting the Card hover shadow when wrapped in a KPICard
|
|
3378
3378
|
], {
|
|
3379
3379
|
variants: {
|
|
3380
|
-
minHeight: {
|
|
3381
|
-
default: ["min-h-[78px]"],
|
|
3382
|
-
withTrends: ["min-h-[94px]"],
|
|
3383
|
-
},
|
|
3384
3380
|
isClickable: {
|
|
3385
3381
|
true: ["hover:bg-neutral-50", "component-card-border"],
|
|
3386
3382
|
false: [],
|
|
@@ -3406,6 +3402,14 @@ const cvaKPIIconContainer = cssClassVarianceUtilities.cvaMerge(["flex", "items-c
|
|
|
3406
3402
|
},
|
|
3407
3403
|
},
|
|
3408
3404
|
});
|
|
3405
|
+
const cvaCardBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["grid", "grid-cols-[1fr_auto]", "px-3", "pb-2", "pt-3"], {
|
|
3406
|
+
variants: {
|
|
3407
|
+
iconName: {
|
|
3408
|
+
true: "gap-2",
|
|
3409
|
+
false: "gap-3 ",
|
|
3410
|
+
},
|
|
3411
|
+
},
|
|
3412
|
+
});
|
|
3409
3413
|
|
|
3410
3414
|
/**
|
|
3411
3415
|
* The KPICard component is used to display KPIs.
|
|
@@ -3418,18 +3422,9 @@ const KPICard = ({ isActive = false, onClick, className, dataTestId, children, i
|
|
|
3418
3422
|
return (jsxRuntime.jsx(Card, { className: cvaKPICard({
|
|
3419
3423
|
isClickable,
|
|
3420
3424
|
isActive,
|
|
3421
|
-
minHeight: rest.trend ? "withTrends" : "default",
|
|
3422
3425
|
className,
|
|
3423
|
-
}), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxRuntime.jsxs(CardBody, { className: cvaCardBodyDensityContainer({ iconName: Boolean(iconName) }), density: "none", children: [jsxRuntime.jsx(KPI, { ...rest, className:
|
|
3426
|
+
}), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxRuntime.jsxs(CardBody, { className: cvaCardBodyDensityContainer({ iconName: Boolean(iconName) }), density: "none", children: [jsxRuntime.jsx(KPI, { ...rest, className: "p-0", dataTestId: dataTestId ? `${dataTestId}-kpi` : undefined, loading: loading }), iconName ? (jsxRuntime.jsx("div", { className: cvaKPIIconContainer({ iconColor }), children: jsxRuntime.jsx(Icon, { name: iconName, size: "small", type: "solid" }) })) : null, children] }) }));
|
|
3424
3427
|
};
|
|
3425
|
-
const cvaCardBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["grid", "grid-cols-[1fr_auto]"], {
|
|
3426
|
-
variants: {
|
|
3427
|
-
iconName: {
|
|
3428
|
-
true: "gap-2 px-3 pb-2 pt-3",
|
|
3429
|
-
false: "gap-3 px-3 pb-2 pt-3",
|
|
3430
|
-
},
|
|
3431
|
-
},
|
|
3432
|
-
});
|
|
3433
3428
|
|
|
3434
3429
|
const cvaListContainer = cssClassVarianceUtilities.cvaMerge(["overflow-y-auto", "overflow-x-hidden", "h-full"], {
|
|
3435
3430
|
variants: {
|
package/index.esm.js
CHANGED
|
@@ -3375,10 +3375,6 @@ const cvaKPICard = cvaMerge([
|
|
|
3375
3375
|
"hover:shadow-none", // overwriting the Card hover shadow when wrapped in a KPICard
|
|
3376
3376
|
], {
|
|
3377
3377
|
variants: {
|
|
3378
|
-
minHeight: {
|
|
3379
|
-
default: ["min-h-[78px]"],
|
|
3380
|
-
withTrends: ["min-h-[94px]"],
|
|
3381
|
-
},
|
|
3382
3378
|
isClickable: {
|
|
3383
3379
|
true: ["hover:bg-neutral-50", "component-card-border"],
|
|
3384
3380
|
false: [],
|
|
@@ -3404,6 +3400,14 @@ const cvaKPIIconContainer = cvaMerge(["flex", "items-center", "justify-center",
|
|
|
3404
3400
|
},
|
|
3405
3401
|
},
|
|
3406
3402
|
});
|
|
3403
|
+
const cvaCardBodyDensityContainer = cvaMerge(["grid", "grid-cols-[1fr_auto]", "px-3", "pb-2", "pt-3"], {
|
|
3404
|
+
variants: {
|
|
3405
|
+
iconName: {
|
|
3406
|
+
true: "gap-2",
|
|
3407
|
+
false: "gap-3 ",
|
|
3408
|
+
},
|
|
3409
|
+
},
|
|
3410
|
+
});
|
|
3407
3411
|
|
|
3408
3412
|
/**
|
|
3409
3413
|
* The KPICard component is used to display KPIs.
|
|
@@ -3416,18 +3420,9 @@ const KPICard = ({ isActive = false, onClick, className, dataTestId, children, i
|
|
|
3416
3420
|
return (jsx(Card, { className: cvaKPICard({
|
|
3417
3421
|
isClickable,
|
|
3418
3422
|
isActive,
|
|
3419
|
-
minHeight: rest.trend ? "withTrends" : "default",
|
|
3420
3423
|
className,
|
|
3421
|
-
}), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxs(CardBody, { className: cvaCardBodyDensityContainer({ iconName: Boolean(iconName) }), density: "none", children: [jsx(KPI, { ...rest, className:
|
|
3424
|
+
}), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxs(CardBody, { className: cvaCardBodyDensityContainer({ iconName: Boolean(iconName) }), density: "none", children: [jsx(KPI, { ...rest, className: "p-0", dataTestId: dataTestId ? `${dataTestId}-kpi` : undefined, loading: loading }), iconName ? (jsx("div", { className: cvaKPIIconContainer({ iconColor }), children: jsx(Icon, { name: iconName, size: "small", type: "solid" }) })) : null, children] }) }));
|
|
3422
3425
|
};
|
|
3423
|
-
const cvaCardBodyDensityContainer = cvaMerge(["grid", "grid-cols-[1fr_auto]"], {
|
|
3424
|
-
variants: {
|
|
3425
|
-
iconName: {
|
|
3426
|
-
true: "gap-2 px-3 pb-2 pt-3",
|
|
3427
|
-
false: "gap-3 px-3 pb-2 pt-3",
|
|
3428
|
-
},
|
|
3429
|
-
},
|
|
3430
|
-
});
|
|
3431
3426
|
|
|
3432
3427
|
const cvaListContainer = cvaMerge(["overflow-y-auto", "overflow-x-hidden", "h-full"], {
|
|
3433
3428
|
variants: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"@floating-ui/react": "^0.26.25",
|
|
17
17
|
"string-ts": "^2.0.0",
|
|
18
18
|
"tailwind-merge": "^2.0.0",
|
|
19
|
-
"@trackunit/ui-design-tokens": "1.7.
|
|
20
|
-
"@trackunit/css-class-variance-utilities": "1.7.
|
|
21
|
-
"@trackunit/shared-utils": "1.9.
|
|
22
|
-
"@trackunit/ui-icons": "1.7.
|
|
23
|
-
"@trackunit/react-test-setup": "1.4.
|
|
19
|
+
"@trackunit/ui-design-tokens": "1.7.42",
|
|
20
|
+
"@trackunit/css-class-variance-utilities": "1.7.42",
|
|
21
|
+
"@trackunit/shared-utils": "1.9.42",
|
|
22
|
+
"@trackunit/ui-icons": "1.7.43",
|
|
23
|
+
"@trackunit/react-test-setup": "1.4.42",
|
|
24
24
|
"@tanstack/react-router": "1.114.29",
|
|
25
25
|
"es-toolkit": "^1.39.10",
|
|
26
26
|
"@tanstack/react-virtual": "3.13.12"
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare const cvaKPICard: (props?: ({
|
|
2
|
-
minHeight?: "default" | "withTrends" | null | undefined;
|
|
3
2
|
isClickable?: boolean | null | undefined;
|
|
4
3
|
isActive?: boolean | null | undefined;
|
|
5
4
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
5
|
export declare const cvaKPIIconContainer: (props?: ({
|
|
7
6
|
iconColor?: "success" | "warning" | "danger" | "info" | "neutral" | null | undefined;
|
|
8
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const cvaCardBodyDensityContainer: (props?: ({
|
|
9
|
+
iconName?: boolean | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|