@trackunit/react-components 1.5.58 → 1.5.60

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
@@ -1769,7 +1769,7 @@ const cvaCardHeaderDensityContainer = cssClassVarianceUtilities.cvaMerge(["flex"
1769
1769
  density: "auto",
1770
1770
  },
1771
1771
  });
1772
- const cvaCardBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["flex", "flex-grow", "overflow-auto"], {
1772
+ const cvaCardBodyDensityContainer$1 = cssClassVarianceUtilities.cvaMerge(["flex", "flex-grow", "overflow-auto"], {
1773
1773
  variants: {
1774
1774
  disableGap: {
1775
1775
  true: "gap-0",
@@ -1786,7 +1786,6 @@ const cvaCardBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["flex",
1786
1786
  dense: "gap-1 p-2",
1787
1787
  compact: "gap-3 p-3",
1788
1788
  comfortable: "gap-4 p-4",
1789
- kpi: "gap-3 px-3 pb-2 pt-3",
1790
1789
  spacious: "gap-4 p-6",
1791
1790
  auto: "component-card-spacing @sm:component-card-spacing-sm @md:component-card-spacing-md",
1792
1791
  },
@@ -1819,7 +1818,7 @@ const Card = ({ children, onClick, fullHeight = false, onMouseEnter, onMouseLeav
1819
1818
  * @returns {ReactElement} CardBody component
1820
1819
  */
1821
1820
  const CardBody = ({ density = "auto", children, dataTestId, className, direction, disableGap, id, }) => {
1822
- return (jsxRuntime.jsx("div", { className: cvaCardBodyDensityContainer({ density, disableGap, className, direction }), "data-testid": dataTestId, id: id, children: children }));
1821
+ return (jsxRuntime.jsx("div", { className: cvaCardBodyDensityContainer$1({ density, disableGap, className, direction }), "data-testid": dataTestId, id: id, children: children }));
1823
1822
  };
1824
1823
 
1825
1824
  /**
@@ -2945,8 +2944,16 @@ const KPICard = ({ isActive, onClick, className, dataTestId, children, ...rest }
2945
2944
  minHeight: rest.trend ? "withTrends" : "default",
2946
2945
  variant: rest.variant,
2947
2946
  className,
2948
- }), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxRuntime.jsxs(CardBody, { className: tailwindMerge.twMerge(rest.iconName ? "grid grid-cols-[1fr_auto] gap-2" : ""), density: "kpi", children: [jsxRuntime.jsx(KPI, { ...rest, className: tailwindMerge.twMerge(rest.iconName ? "gap-2" : "", "p-0"), dataTestId: dataTestId ? `${dataTestId}-kpi` : undefined }), rest.iconName ? (jsxRuntime.jsx("div", { className: cvaKPIIconContainer({ iconColor: rest.iconColor ?? "info" }), children: jsxRuntime.jsx(Icon, { name: rest.iconName, size: "small", type: "solid" }) })) : null, children] }) }));
2947
+ }), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxRuntime.jsxs(CardBody, { className: cvaCardBodyDensityContainer({ iconName: Boolean(rest.iconName) }), density: "none", children: [jsxRuntime.jsx(KPI, { ...rest, className: tailwindMerge.twMerge(rest.iconName ? "gap-2" : "", "p-0"), dataTestId: dataTestId ? `${dataTestId}-kpi` : undefined }), rest.iconName ? (jsxRuntime.jsx("div", { className: cvaKPIIconContainer({ iconColor: rest.iconColor ?? "info" }), children: jsxRuntime.jsx(Icon, { name: rest.iconName, size: "small", type: "solid" }) })) : null, children] }) }));
2949
2948
  };
2949
+ const cvaCardBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["grid", "grid-cols-[1fr_auto]"], {
2950
+ variants: {
2951
+ iconName: {
2952
+ true: "gap-2 px-3 pb-2 pt-3",
2953
+ false: "gap-3 px-3 pb-2 pt-3",
2954
+ },
2955
+ },
2956
+ });
2950
2957
 
2951
2958
  const cvaMenuList = cssClassVarianceUtilities.cvaMerge([
2952
2959
  "shadow",
package/index.esm.js CHANGED
@@ -1767,7 +1767,7 @@ const cvaCardHeaderDensityContainer = cvaMerge(["flex", "border-b", "border-seco
1767
1767
  density: "auto",
1768
1768
  },
1769
1769
  });
1770
- const cvaCardBodyDensityContainer = cvaMerge(["flex", "flex-grow", "overflow-auto"], {
1770
+ const cvaCardBodyDensityContainer$1 = cvaMerge(["flex", "flex-grow", "overflow-auto"], {
1771
1771
  variants: {
1772
1772
  disableGap: {
1773
1773
  true: "gap-0",
@@ -1784,7 +1784,6 @@ const cvaCardBodyDensityContainer = cvaMerge(["flex", "flex-grow", "overflow-aut
1784
1784
  dense: "gap-1 p-2",
1785
1785
  compact: "gap-3 p-3",
1786
1786
  comfortable: "gap-4 p-4",
1787
- kpi: "gap-3 px-3 pb-2 pt-3",
1788
1787
  spacious: "gap-4 p-6",
1789
1788
  auto: "component-card-spacing @sm:component-card-spacing-sm @md:component-card-spacing-md",
1790
1789
  },
@@ -1817,7 +1816,7 @@ const Card = ({ children, onClick, fullHeight = false, onMouseEnter, onMouseLeav
1817
1816
  * @returns {ReactElement} CardBody component
1818
1817
  */
1819
1818
  const CardBody = ({ density = "auto", children, dataTestId, className, direction, disableGap, id, }) => {
1820
- return (jsx("div", { className: cvaCardBodyDensityContainer({ density, disableGap, className, direction }), "data-testid": dataTestId, id: id, children: children }));
1819
+ return (jsx("div", { className: cvaCardBodyDensityContainer$1({ density, disableGap, className, direction }), "data-testid": dataTestId, id: id, children: children }));
1821
1820
  };
1822
1821
 
1823
1822
  /**
@@ -2943,8 +2942,16 @@ const KPICard = ({ isActive, onClick, className, dataTestId, children, ...rest }
2943
2942
  minHeight: rest.trend ? "withTrends" : "default",
2944
2943
  variant: rest.variant,
2945
2944
  className,
2946
- }), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxs(CardBody, { className: twMerge(rest.iconName ? "grid grid-cols-[1fr_auto] gap-2" : ""), density: "kpi", children: [jsx(KPI, { ...rest, className: twMerge(rest.iconName ? "gap-2" : "", "p-0"), dataTestId: dataTestId ? `${dataTestId}-kpi` : undefined }), rest.iconName ? (jsx("div", { className: cvaKPIIconContainer({ iconColor: rest.iconColor ?? "info" }), children: jsx(Icon, { name: rest.iconName, size: "small", type: "solid" }) })) : null, children] }) }));
2945
+ }), "data-testid": dataTestId ? dataTestId : undefined, onClick: onClick, children: jsxs(CardBody, { className: cvaCardBodyDensityContainer({ iconName: Boolean(rest.iconName) }), density: "none", children: [jsx(KPI, { ...rest, className: twMerge(rest.iconName ? "gap-2" : "", "p-0"), dataTestId: dataTestId ? `${dataTestId}-kpi` : undefined }), rest.iconName ? (jsx("div", { className: cvaKPIIconContainer({ iconColor: rest.iconColor ?? "info" }), children: jsx(Icon, { name: rest.iconName, size: "small", type: "solid" }) })) : null, children] }) }));
2947
2946
  };
2947
+ const cvaCardBodyDensityContainer = cvaMerge(["grid", "grid-cols-[1fr_auto]"], {
2948
+ variants: {
2949
+ iconName: {
2950
+ true: "gap-2 px-3 pb-2 pt-3",
2951
+ false: "gap-3 px-3 pb-2 pt-3",
2952
+ },
2953
+ },
2954
+ });
2948
2955
 
2949
2956
  const cvaMenuList = cvaMerge([
2950
2957
  "shadow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "1.5.58",
3
+ "version": "1.5.60",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -1 +1 @@
1
- export type Density = "none" | "dense" | "compact" | "comfortable" | "kpi" | "spacious" | "auto";
1
+ export type Density = "none" | "dense" | "compact" | "comfortable" | "spacious" | "auto";
@@ -15,5 +15,5 @@ export declare const cvaCardHeaderDensityContainer: (props?: ({
15
15
  export declare const cvaCardBodyDensityContainer: (props?: ({
16
16
  disableGap?: boolean | null | undefined;
17
17
  direction?: "row" | "row-reverse" | "column" | "column-reverse" | null | undefined;
18
- density?: "none" | "dense" | "compact" | "comfortable" | "kpi" | "spacious" | "auto" | null | undefined;
18
+ density?: "none" | "dense" | "compact" | "comfortable" | "spacious" | "auto" | null | undefined;
19
19
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;