@trackunit/react-components 3.8.7 → 3.8.9

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
@@ -3126,6 +3126,9 @@ const cvaInteractableItem = cssClassVarianceUtilities.cva({
3126
3126
  // used across the app. Class definitions are colocated with the component
3127
3127
  // so it can evolve independently — if a similar layout emerges elsewhere,
3128
3128
  // promote the shared parts deliberately rather than re-plumbing here.
3129
+ const cvaCardRoot = cssClassVarianceUtilities.cva({
3130
+ base: ["min-w-0", "max-w-full"],
3131
+ });
3129
3132
  // Horizontal row: main cluster (image/thumbnail + text) + optional chevron.
3130
3133
  // `gap-2` (8px) is the space between connectivity (the right edge of the
3131
3134
  // text stack) and the chevron. Image-to-metadata spacing lives on
@@ -3490,9 +3493,9 @@ const IdentityCard = ({ title, subtitle, image, thumbnail, thumbnailColor = "inf
3490
3493
  return (jsxRuntime.jsx(Card, { className: isClickable
3491
3494
  ? cvaInteractableItem({
3492
3495
  cursor: "pointer",
3493
- className: ["focus-visible:outline-native", className],
3496
+ className: ["focus-visible:outline-native", cvaCardRoot({ className })],
3494
3497
  })
3495
- : className, "data-testid": dataTestId, onClick: onClick, ref: ref, style: style, ...clickableProps, children: jsxRuntime.jsxs("div", { className: cvaCardContentRow(), children: [jsxRuntime.jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [showImage ? (jsxRuntime.jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: image })) : null, showThumbnail ? (jsxRuntime.jsx("div", { className: cvaCardThumbnail({
3498
+ : cvaCardRoot({ className }), "data-testid": dataTestId, onClick: onClick, ref: ref, style: style, ...clickableProps, children: jsxRuntime.jsxs("div", { className: cvaCardContentRow(), children: [jsxRuntime.jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [showImage ? (jsxRuntime.jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: image })) : null, showThumbnail ? (jsxRuntime.jsx("div", { className: cvaCardThumbnail({
3496
3499
  className: `text-${thumbnailColor} bg-${thumbnailBackground}`,
3497
3500
  }), "data-testid": dataTestId ? `${dataTestId}-thumbnail` : undefined, children: thumbnail })) : null, jsxRuntime.jsxs("div", { className: cvaCardTextStack(), ref: textStackRef, children: [jsxRuntime.jsxs("div", { className: cvaCardIdentityGroup({ singleLine: isSingleLine }), "data-testid": dataTestId ? `${dataTestId}-identity-group` : undefined, children: [jsxRuntime.jsxs("div", { className: cvaCardTitleRow(), children: [jsxRuntime.jsx("div", { className: cvaCardTitleCluster(), children: jsxRuntime.jsx("h3", { className: cvaCardTitle(), "data-testid": dataTestId ? `${dataTestId}-title` : undefined,
3498
3501
  // Inline text-wrap defeats the unlayered global
@@ -3769,7 +3772,7 @@ const IdentityCardSkeleton = ({ hasImage = false, hasThumbnail = false, hasSubti
3769
3772
  // Mirror the loaded `IdentityCard` single-line rule so the skeleton →
3770
3773
  // loaded transition keeps the same vertical alignment against the image.
3771
3774
  const isSingleLine = !hasSubtitle && !hasStatusIndicators;
3772
- return (jsxRuntime.jsx(Card, { className: className, "data-testid": dataTestId, ref: ref, style: style, children: jsxRuntime.jsxs("div", { className: cvaCardContentRow(), children: [jsxRuntime.jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [hasImage ? (jsxRuntime.jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: jsxRuntime.jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-image-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, showThumbnail ? (jsxRuntime.jsx("div", { className: cvaCardThumbnail(), "data-testid": dataTestId ? `${dataTestId}-thumbnail` : undefined, children: jsxRuntime.jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-thumbnail-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, jsxRuntime.jsxs("div", { className: cvaCardTextStack(), ref: textStackRef, children: [jsxRuntime.jsxs("div", { className: cvaCardIdentityGroup({ singleLine: isSingleLine }), "data-testid": dataTestId ? `${dataTestId}-identity-group` : undefined, children: [jsxRuntime.jsxs("div", { className: cvaCardTitleRow(), children: [jsxRuntime.jsx("div", { className: cvaCardTitleCluster(), children: jsxRuntime.jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-title-skeleton` : undefined, textSize: "text-base", width: 140 }) }), hasConnectivity ? (jsxRuntime.jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-connectivity-skeleton` : undefined, height: 14, width: 50 })) : null] }), hasSubtitle ? (jsxRuntime.jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-subtitle-skeleton` : undefined, textSize: "text-xs", width: 180 })) : null] }), hasStatusIndicators ? (jsxRuntime.jsxs("div", { className: cvaCardStatusSkeletonRow(), "data-testid": dataTestId ? `${dataTestId}-status-skeleton` : undefined, children: [jsxRuntime.jsx(SkeletonBlock, { height: 14, width: 42 }), jsxRuntime.jsx(SkeletonBlock, { height: 14, width: 64 })] })) : null] })] }), hasChevron ? (jsxRuntime.jsx("div", { className: cvaCardChevron(), "data-testid": dataTestId ? `${dataTestId}-chevron` : undefined, children: jsxRuntime.jsx(Icon, { name: "ChevronRight", size: "medium" }) })) : null] }) }));
3775
+ return (jsxRuntime.jsx(Card, { className: cvaCardRoot({ className }), "data-testid": dataTestId, ref: ref, style: style, children: jsxRuntime.jsxs("div", { className: cvaCardContentRow(), children: [jsxRuntime.jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [hasImage ? (jsxRuntime.jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: jsxRuntime.jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-image-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, showThumbnail ? (jsxRuntime.jsx("div", { className: cvaCardThumbnail(), "data-testid": dataTestId ? `${dataTestId}-thumbnail` : undefined, children: jsxRuntime.jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-thumbnail-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, jsxRuntime.jsxs("div", { className: cvaCardTextStack(), ref: textStackRef, children: [jsxRuntime.jsxs("div", { className: cvaCardIdentityGroup({ singleLine: isSingleLine }), "data-testid": dataTestId ? `${dataTestId}-identity-group` : undefined, children: [jsxRuntime.jsxs("div", { className: cvaCardTitleRow(), children: [jsxRuntime.jsx("div", { className: cvaCardTitleCluster(), children: jsxRuntime.jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-title-skeleton` : undefined, textSize: "text-base", width: 140 }) }), hasConnectivity ? (jsxRuntime.jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-connectivity-skeleton` : undefined, height: 14, width: 50 })) : null] }), hasSubtitle ? (jsxRuntime.jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-subtitle-skeleton` : undefined, textSize: "text-xs", width: 180 })) : null] }), hasStatusIndicators ? (jsxRuntime.jsxs("div", { className: cvaCardStatusSkeletonRow(), "data-testid": dataTestId ? `${dataTestId}-status-skeleton` : undefined, children: [jsxRuntime.jsx(SkeletonBlock, { height: 14, width: 42 }), jsxRuntime.jsx(SkeletonBlock, { height: 14, width: 64 })] })) : null] })] }), hasChevron ? (jsxRuntime.jsx("div", { className: cvaCardChevron(), "data-testid": dataTestId ? `${dataTestId}-chevron` : undefined, children: jsxRuntime.jsx(Icon, { name: "ChevronRight", size: "medium" }) })) : null] }) }));
3773
3776
  };
3774
3777
 
3775
3778
  const cvaBadge = cssClassVarianceUtilities.cva({
package/index.esm.js CHANGED
@@ -3125,6 +3125,9 @@ const cvaInteractableItem = cva({
3125
3125
  // used across the app. Class definitions are colocated with the component
3126
3126
  // so it can evolve independently — if a similar layout emerges elsewhere,
3127
3127
  // promote the shared parts deliberately rather than re-plumbing here.
3128
+ const cvaCardRoot = cva({
3129
+ base: ["min-w-0", "max-w-full"],
3130
+ });
3128
3131
  // Horizontal row: main cluster (image/thumbnail + text) + optional chevron.
3129
3132
  // `gap-2` (8px) is the space between connectivity (the right edge of the
3130
3133
  // text stack) and the chevron. Image-to-metadata spacing lives on
@@ -3489,9 +3492,9 @@ const IdentityCard = ({ title, subtitle, image, thumbnail, thumbnailColor = "inf
3489
3492
  return (jsx(Card, { className: isClickable
3490
3493
  ? cvaInteractableItem({
3491
3494
  cursor: "pointer",
3492
- className: ["focus-visible:outline-native", className],
3495
+ className: ["focus-visible:outline-native", cvaCardRoot({ className })],
3493
3496
  })
3494
- : className, "data-testid": dataTestId, onClick: onClick, ref: ref, style: style, ...clickableProps, children: jsxs("div", { className: cvaCardContentRow(), children: [jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [showImage ? (jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: image })) : null, showThumbnail ? (jsx("div", { className: cvaCardThumbnail({
3497
+ : cvaCardRoot({ className }), "data-testid": dataTestId, onClick: onClick, ref: ref, style: style, ...clickableProps, children: jsxs("div", { className: cvaCardContentRow(), children: [jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [showImage ? (jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: image })) : null, showThumbnail ? (jsx("div", { className: cvaCardThumbnail({
3495
3498
  className: `text-${thumbnailColor} bg-${thumbnailBackground}`,
3496
3499
  }), "data-testid": dataTestId ? `${dataTestId}-thumbnail` : undefined, children: thumbnail })) : null, jsxs("div", { className: cvaCardTextStack(), ref: textStackRef, children: [jsxs("div", { className: cvaCardIdentityGroup({ singleLine: isSingleLine }), "data-testid": dataTestId ? `${dataTestId}-identity-group` : undefined, children: [jsxs("div", { className: cvaCardTitleRow(), children: [jsx("div", { className: cvaCardTitleCluster(), children: jsx("h3", { className: cvaCardTitle(), "data-testid": dataTestId ? `${dataTestId}-title` : undefined,
3497
3500
  // Inline text-wrap defeats the unlayered global
@@ -3768,7 +3771,7 @@ const IdentityCardSkeleton = ({ hasImage = false, hasThumbnail = false, hasSubti
3768
3771
  // Mirror the loaded `IdentityCard` single-line rule so the skeleton →
3769
3772
  // loaded transition keeps the same vertical alignment against the image.
3770
3773
  const isSingleLine = !hasSubtitle && !hasStatusIndicators;
3771
- return (jsx(Card, { className: className, "data-testid": dataTestId, ref: ref, style: style, children: jsxs("div", { className: cvaCardContentRow(), children: [jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [hasImage ? (jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-image-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, showThumbnail ? (jsx("div", { className: cvaCardThumbnail(), "data-testid": dataTestId ? `${dataTestId}-thumbnail` : undefined, children: jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-thumbnail-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, jsxs("div", { className: cvaCardTextStack(), ref: textStackRef, children: [jsxs("div", { className: cvaCardIdentityGroup({ singleLine: isSingleLine }), "data-testid": dataTestId ? `${dataTestId}-identity-group` : undefined, children: [jsxs("div", { className: cvaCardTitleRow(), children: [jsx("div", { className: cvaCardTitleCluster(), children: jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-title-skeleton` : undefined, textSize: "text-base", width: 140 }) }), hasConnectivity ? (jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-connectivity-skeleton` : undefined, height: 14, width: 50 })) : null] }), hasSubtitle ? (jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-subtitle-skeleton` : undefined, textSize: "text-xs", width: 180 })) : null] }), hasStatusIndicators ? (jsxs("div", { className: cvaCardStatusSkeletonRow(), "data-testid": dataTestId ? `${dataTestId}-status-skeleton` : undefined, children: [jsx(SkeletonBlock, { height: 14, width: 42 }), jsx(SkeletonBlock, { height: 14, width: 64 })] })) : null] })] }), hasChevron ? (jsx("div", { className: cvaCardChevron(), "data-testid": dataTestId ? `${dataTestId}-chevron` : undefined, children: jsx(Icon, { name: "ChevronRight", size: "medium" }) })) : null] }) }));
3774
+ return (jsx(Card, { className: cvaCardRoot({ className }), "data-testid": dataTestId, ref: ref, style: style, children: jsxs("div", { className: cvaCardContentRow(), children: [jsxs("div", { className: cvaCardMain({ singleLine: isSingleLine }), children: [hasImage ? (jsx("div", { className: cvaCardImage(), "data-testid": dataTestId ? `${dataTestId}-image` : undefined, style: imageSlotStyle, children: jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-image-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, showThumbnail ? (jsx("div", { className: cvaCardThumbnail(), "data-testid": dataTestId ? `${dataTestId}-thumbnail` : undefined, children: jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-thumbnail-skeleton` : undefined, height: "100%", width: "100%" }) })) : null, jsxs("div", { className: cvaCardTextStack(), ref: textStackRef, children: [jsxs("div", { className: cvaCardIdentityGroup({ singleLine: isSingleLine }), "data-testid": dataTestId ? `${dataTestId}-identity-group` : undefined, children: [jsxs("div", { className: cvaCardTitleRow(), children: [jsx("div", { className: cvaCardTitleCluster(), children: jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-title-skeleton` : undefined, textSize: "text-base", width: 140 }) }), hasConnectivity ? (jsx(SkeletonBlock, { "data-testid": dataTestId ? `${dataTestId}-connectivity-skeleton` : undefined, height: 14, width: 50 })) : null] }), hasSubtitle ? (jsx(SkeletonLabel, { "data-testid": dataTestId ? `${dataTestId}-subtitle-skeleton` : undefined, textSize: "text-xs", width: 180 })) : null] }), hasStatusIndicators ? (jsxs("div", { className: cvaCardStatusSkeletonRow(), "data-testid": dataTestId ? `${dataTestId}-status-skeleton` : undefined, children: [jsx(SkeletonBlock, { height: 14, width: 42 }), jsx(SkeletonBlock, { height: 14, width: 64 })] })) : null] })] }), hasChevron ? (jsx("div", { className: cvaCardChevron(), "data-testid": dataTestId ? `${dataTestId}-chevron` : undefined, children: jsx(Icon, { name: "ChevronRight", size: "medium" }) })) : null] }) }));
3772
3775
  };
3773
3776
 
3774
3777
  const cvaBadge = cva({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "3.8.7",
3
+ "version": "3.8.9",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "migrations": "./migrations.json",
@@ -14,16 +14,16 @@
14
14
  "@floating-ui/react": "^0.26.25",
15
15
  "string-ts": "^2.0.0",
16
16
  "tailwind-merge": "^2.0.0",
17
- "@trackunit/ui-design-tokens": "1.18.8",
18
- "@trackunit/css-class-variance-utilities": "2.3.8",
19
- "@trackunit/shared-utils": "1.19.8",
20
- "@trackunit/ui-icons": "1.17.8",
17
+ "@trackunit/ui-design-tokens": "1.18.9",
18
+ "@trackunit/css-class-variance-utilities": "2.3.9",
19
+ "@trackunit/shared-utils": "1.19.9",
20
+ "@trackunit/ui-icons": "1.17.9",
21
21
  "es-toolkit": "^1.52.0",
22
22
  "@tanstack/react-virtual": "^3.14.13",
23
23
  "dequal": "^2.0.3",
24
24
  "fflate": "^0.8.3",
25
25
  "zod": "^3.25.76",
26
- "@trackunit/i18n-library-translation": "2.8.9"
26
+ "@trackunit/i18n-library-translation": "2.8.10"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "^19.0.0",
@@ -1,3 +1,9 @@
1
+ export declare const cvaCardRoot: import("cva").CVAComponent<Omit<{
2
+ base: string[];
3
+ }, "defaultVariants"> & {
4
+ variants: unknown;
5
+ defaultVariants: Omit<{}, never>;
6
+ }, unknown>;
1
7
  export declare const cvaCardContentRow: import("cva").CVAComponent<Omit<{
2
8
  base: string[];
3
9
  }, "defaultVariants"> & {