@trackunit/react-table-base-components 1.24.1 → 1.24.2

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
@@ -122,8 +122,8 @@ const setupLibraryTranslations = () => {
122
122
  * @param {ButtonCellProps} props - The props for the ButtonCell component
123
123
  * @returns {ReactElement} ButtonCell component
124
124
  */
125
- const ButtonCell = ({ children, className, "data-testid": dataTestId, iconColor = "primary", iconName = undefined, variant = "ghost-neutral", ...rest }) => {
126
- return (jsxRuntime.jsx(reactComponents.Button, { prefix: iconName ? jsxRuntime.jsx(reactComponents.Icon, { color: iconColor, name: iconName, size: "small", type: "solid" }) : null, ...rest, className: tailwindMerge.twMerge("px-2 text-sm font-normal text-black hover:text-black", className), "data-testid": `button-cell-${dataTestId}`, variant: variant, children: children }));
125
+ const ButtonCell = ({ children, className, "data-testid": dataTestId, iconColor = "primary", iconName = undefined, style, variant = "ghost-neutral", ...rest }) => {
126
+ return (jsxRuntime.jsx(reactComponents.Button, { prefix: iconName ? jsxRuntime.jsx(reactComponents.Icon, { color: iconColor, name: iconName, size: "small", type: "solid" }) : null, ...rest, className: tailwindMerge.twMerge("px-2 text-sm font-normal text-black hover:text-black", className), "data-testid": `button-cell-${dataTestId}`, style: style, variant: variant, children: children }));
127
127
  };
128
128
 
129
129
  const cvaCheckboxCell = cssClassVarianceUtilities.cvaMerge([""]);
@@ -147,8 +147,8 @@ const cvaCheckboxCell = cssClassVarianceUtilities.cvaMerge([""]);
147
147
  * @param {CheckboxCellProps} props - The props for the CheckboxCell component
148
148
  * @returns {ReactElement} CheckboxCell component
149
149
  */
150
- const CheckboxCell = ({ checked, className, "data-testid": dataTestId }) => {
151
- return (jsxRuntime.jsx("div", { className: cvaCheckboxCell({ className }), "data-testid": dataTestId, children: jsxRuntime.jsx(reactFormComponents.Checkbox, { checked: checked, readOnly: true }) }));
150
+ const CheckboxCell = ({ checked, className, "data-testid": dataTestId, style }) => {
151
+ return (jsxRuntime.jsx("div", { className: cvaCheckboxCell({ className }), "data-testid": dataTestId, style: style, children: jsxRuntime.jsx(reactFormComponents.Checkbox, { checked: checked, readOnly: true }) }));
152
152
  };
153
153
 
154
154
  const cvaMultiRowTableCellSection = cssClassVarianceUtilities.cvaMerge(["flex", "flex-col", "justify-center", "overflow-hidden"]);
@@ -178,8 +178,8 @@ const cvaSecondaryRowText = cssClassVarianceUtilities.cvaMerge(["overflow-hidden
178
178
  * @param {MultiRowTableCellProps} props - The props for the MultiRowTableCell component
179
179
  * @returns {ReactElement} MultiRowTableCell component
180
180
  */
181
- const MultiRowTableCell = ({ main, secondary, "data-testid": dataTestId, className, }) => {
182
- return (jsxRuntime.jsx("div", { className: cvaMultiRowTableCell({ className }), children: jsxRuntime.jsxs("section", { className: cvaMultiRowTableCellSection(), "data-testid": dataTestId, children: [typeof main === "string" ? jsxRuntime.jsx("div", { className: cvaMainRowText(), children: main }) : main, typeof secondary === "string" && secondary !== "" ? (jsxRuntime.jsx("div", { className: cvaSecondaryRowText(), children: secondary })) : (secondary)] }) }));
181
+ const MultiRowTableCell = ({ main, secondary, "data-testid": dataTestId, className, style, }) => {
182
+ return (jsxRuntime.jsx("div", { className: cvaMultiRowTableCell({ className }), style: style, children: jsxRuntime.jsxs("section", { className: cvaMultiRowTableCellSection(), "data-testid": dataTestId, children: [typeof main === "string" ? jsxRuntime.jsx("div", { className: cvaMainRowText(), children: main }) : main, typeof secondary === "string" && secondary !== "" ? (jsxRuntime.jsx("div", { className: cvaSecondaryRowText(), children: secondary })) : (secondary)] }) }));
183
183
  };
184
184
 
185
185
  const cvaCopyableCell = cssClassVarianceUtilities.cvaMerge(["overflow-hidden", "w-fit"]);
@@ -216,14 +216,14 @@ const cvaCopyableCell = cssClassVarianceUtilities.cvaMerge(["overflow-hidden", "
216
216
  * @param {CopyableCellProps} props - The props for the CopyableCell component
217
217
  * @returns {ReactElement} CopyableCell component
218
218
  */
219
- const CopyableCell = ({ text, secondary, "data-testid": dataTestId, className, }) => {
219
+ const CopyableCell = ({ text, secondary, "data-testid": dataTestId, className, style, }) => {
220
220
  const [t] = useTranslation();
221
221
  const copyLabel = t("copyableCell.copy");
222
222
  const copiedLabel = t("copyableCell.copied");
223
223
  if (secondary !== undefined) {
224
- return (jsxRuntime.jsx(MultiRowTableCell, { className: cvaCopyableCell({ className }), "data-testid": dataTestId, main: jsxRuntime.jsx(reactComponents.CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, text: text }), secondary: jsxRuntime.jsx(reactComponents.CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, size: "xs", text: secondary.text }) }));
224
+ return (jsxRuntime.jsx(MultiRowTableCell, { className: cvaCopyableCell({ className }), "data-testid": dataTestId, main: jsxRuntime.jsx(reactComponents.CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, text: text }), secondary: jsxRuntime.jsx(reactComponents.CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, size: "xs", text: secondary.text }), style: style }));
225
225
  }
226
- return (jsxRuntime.jsx(reactComponents.CopyableText, { className: cvaCopyableCell({ className }), copiedLabel: copiedLabel, copyLabel: copyLabel, "data-testid": dataTestId, text: text }));
226
+ return (jsxRuntime.jsx(reactComponents.CopyableText, { className: cvaCopyableCell({ className }), copiedLabel: copiedLabel, copyLabel: copyLabel, "data-testid": dataTestId, style: style, text: text }));
227
227
  };
228
228
 
229
229
  const cvaDateTimeCell = cssClassVarianceUtilities.cvaMerge([""]);
@@ -286,12 +286,12 @@ const cvaDateTimeSince$1 = cssClassVarianceUtilities.cvaMerge(["slashed-zero", "
286
286
  * @param {DateTimeCellProps} props - The props for the DateTimeCell component
287
287
  * @returns {ReactElement} DateTimeCell component
288
288
  */
289
- const DateTimeCell = ({ format, timeZone, locale, date, withTimeSince = true, className, "data-testid": dataTestId, }) => {
289
+ const DateTimeCell = ({ format, timeZone, locale, date, withTimeSince = true, className, "data-testid": dataTestId, style, }) => {
290
290
  if (!date) {
291
291
  return null;
292
292
  }
293
293
  const formattedDate = dateAndTimeUtils.formatDateUtil(date, format, timeZone, locale);
294
- return (jsxRuntime.jsxs("div", { className: cvaDateTimeCell({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx("p", { className: cvaDateTime$1(), children: formattedDate }), withTimeSince ? jsxRuntime.jsx(TimeSince, { date: date, locale: locale, timeZone: timeZone }) : null] }));
294
+ return (jsxRuntime.jsxs("div", { className: cvaDateTimeCell({ className }), "data-testid": dataTestId, style: style, children: [jsxRuntime.jsx("p", { className: cvaDateTime$1(), children: formattedDate }), withTimeSince ? jsxRuntime.jsx(TimeSince, { date: date, locale: locale, timeZone: timeZone }) : null] }));
295
295
  };
296
296
  const TimeSince = ({ date, timeZone, locale }) => {
297
297
  const timeSince = react.useMemo(() => {
@@ -332,8 +332,8 @@ const cvaHighlightCell = cssClassVarianceUtilities.cvaMerge(["flex", "gap-2"]);
332
332
  * @param {HighlightCellProps} props - The props for the HighlightCell component
333
333
  * @returns {ReactElement} HighlightCell component
334
334
  */
335
- const HighlightCell = ({ className, highlights, "data-testid": dataTestId, ref }) => {
336
- return (jsxRuntime.jsx("div", { className: cvaHighlightCell({ className }), "data-testid": dataTestId, ref: ref, children: highlights.map((highlight, index) => (jsxRuntime.jsx(reactComponents.Highlight, { color: "warning",
335
+ const HighlightCell = ({ className, highlights, "data-testid": dataTestId, ref, style }) => {
336
+ return (jsxRuntime.jsx("div", { className: cvaHighlightCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: highlights.map((highlight, index) => (jsxRuntime.jsx(reactComponents.Highlight, { color: "warning",
337
337
  size: "medium",
338
338
  "data-testid": `${dataTestId}-${index}`,
339
339
  ...(typeof highlight === "string" ? { children: highlight } : highlight) }, index))) }));
@@ -420,14 +420,14 @@ const cvaIdentityCell = cssClassVarianceUtilities.cvaMerge(["grid", "items-cente
420
420
  * @param {IdentityCellProps} props - The props for the IdentityCell component
421
421
  * @returns {ReactElement} IdentityCell component
422
422
  */
423
- const IdentityCell = ({ link, className, "data-testid": dataTestId, ref, title, details = [], thumbnail, }) => {
423
+ const IdentityCell = ({ link, className, "data-testid": dataTestId, ref, style, title, details = [], thumbnail, }) => {
424
424
  const [href, setHref] = react.useState(undefined);
425
425
  react.useEffect(() => {
426
426
  if (link) {
427
427
  void link.href().then(setHref);
428
428
  }
429
429
  }, [link]);
430
- return (jsxRuntime.jsxs("div", { className: cvaIdentityCell({ className, hasThumbnail: thumbnail !== undefined && thumbnail !== null }), "data-testid": dataTestId, ref: ref, children: [thumbnail !== undefined && thumbnail !== null ? (jsxRuntime.jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxRuntime.jsxs("div", { className: "grid grid-rows-[min-content_auto] items-center text-sm", children: [jsxRuntime.jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsxRuntime.jsx(reactComponents.Heading, { className: "truncate text-sm", "data-testid": dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: !link ? (jsxRuntime.jsx("span", { className: "truncate", children: title })) : (jsxRuntime.jsx(reactComponents.ExternalLink, { className: "truncate", color: "neutral", href: href ?? "", onClick: async (e) => {
430
+ return (jsxRuntime.jsxs("div", { className: cvaIdentityCell({ className, hasThumbnail: thumbnail !== undefined && thumbnail !== null }), "data-testid": dataTestId, ref: ref, style: style, children: [thumbnail !== undefined && thumbnail !== null ? (jsxRuntime.jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxRuntime.jsxs("div", { className: "grid grid-rows-[min-content_auto] items-center text-sm", children: [jsxRuntime.jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsxRuntime.jsx(reactComponents.Heading, { className: "truncate text-sm", "data-testid": dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: !link ? (jsxRuntime.jsx("span", { className: "truncate", children: title })) : (jsxRuntime.jsx(reactComponents.ExternalLink, { className: "truncate", color: "neutral", href: href ?? "", onClick: async (e) => {
431
431
  // Allow Cmd/Ctrl+Click, Shift+Click, or middle-click to open in new tab
432
432
  const hasModifierKey = e.ctrlKey || e.metaKey || e.shiftKey;
433
433
  const isMiddleClick = e.button === 1;
@@ -575,7 +575,7 @@ const LinkCell = ({ link, type, className, ref, ...rest }) => {
575
575
  * @param {ListTooltipProps<TItem>} props Component props.
576
576
  * @returns {ReactNode} Tooltip list markup.
577
577
  */
578
- const ListTooltip = ({ items, "data-testid": dataTestId, getLabel, getKey, loading = false, }) => {
578
+ const ListTooltip = ({ items, "data-testid": dataTestId, getLabel, getKey, loading = false, style, }) => {
579
579
  const toDisplay = (item, index) => {
580
580
  if (getLabel) {
581
581
  return getLabel(item, index);
@@ -607,7 +607,7 @@ const ListTooltip = ({ items, "data-testid": dataTestId, getLabel, getKey, loadi
607
607
  if (loading) {
608
608
  return jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", mode: "dark" });
609
609
  }
610
- return (jsxRuntime.jsx("ul", { className: "list-inside !ps-1 pl-1", "data-testid": dataTestId, children: items.map((item, index) => {
610
+ return (jsxRuntime.jsx("ul", { className: "list-inside !ps-1 pl-1", "data-testid": dataTestId, style: style, children: items.map((item, index) => {
611
611
  const label = toDisplay(item, index);
612
612
  if (label === "" || label === null || label === undefined) {
613
613
  return null;
@@ -626,12 +626,12 @@ const cvaMultiValueTextCellTooltip = cssClassVarianceUtilities.cvaMerge(["whites
626
626
  * @param {MultiValueTextCellProps} props - The props for the MultiValueTextCell component
627
627
  * @returns {ReactElement} MultiValueTextCell component
628
628
  */
629
- const MultiValueTextCell = ({ content, count, countTooltip, icon, iconTooltip, "data-testid": dataTestId, className, onMouseEnter, ref, }) => {
629
+ const MultiValueTextCell = ({ content, count, countTooltip, icon, iconTooltip, "data-testid": dataTestId, className, onMouseEnter, ref, style, }) => {
630
630
  const [isTooltipVisible, setIsTooltipVisible] = react.useState(false);
631
631
  const updateTooltipVisibility = (element) => {
632
632
  setIsTooltipVisible(element ? element.scrollWidth > element.clientWidth : false);
633
633
  };
634
- return count !== null && count !== undefined && count > 0 ? (jsxRuntime.jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, ref: ref, children: [icon ? (jsxRuntime.jsx(reactComponents.Tooltip, { "data-testid": dataTestId ? `${dataTestId}-icon-tooltip` : undefined, disabled: !iconTooltip, label: iconTooltip ?? "", placement: "bottom", children: jsxRuntime.jsx("span", { className: "inline-flex items-center", children: icon }) })) : null, jsxRuntime.jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsxRuntime.jsx(reactComponents.Tooltip, { "data-testid": dataTestId ? `${dataTestId}-content-tooltip` : undefined, disabled: !isTooltipVisible, label: content ?? "", placement: "bottom", children: jsxRuntime.jsx(reactComponents.Text, { className: "inline", children: content ?? "" }) }) }), count > 1 ? (jsxRuntime.jsx(reactComponents.Tooltip, { "data-testid": dataTestId ? `${dataTestId}-count-tooltip` : undefined, disabled: countTooltip === undefined || countTooltip === null, label: countTooltip ?? "", placement: "bottom", children: jsxRuntime.jsxs(reactComponents.Tag, { className: "inline", color: "neutral", onMouseEnter: onMouseEnter, size: "small", children: ["+", count - 1] }) })) : null] })) : null;
634
+ return count !== null && count !== undefined && count > 0 ? (jsxRuntime.jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [icon ? (jsxRuntime.jsx(reactComponents.Tooltip, { "data-testid": dataTestId ? `${dataTestId}-icon-tooltip` : undefined, disabled: !iconTooltip, label: iconTooltip ?? "", placement: "bottom", children: jsxRuntime.jsx("span", { className: "inline-flex items-center", children: icon }) })) : null, jsxRuntime.jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsxRuntime.jsx(reactComponents.Tooltip, { "data-testid": dataTestId ? `${dataTestId}-content-tooltip` : undefined, disabled: !isTooltipVisible, label: content ?? "", placement: "bottom", children: jsxRuntime.jsx(reactComponents.Text, { className: "inline", children: content ?? "" }) }) }), count > 1 ? (jsxRuntime.jsx(reactComponents.Tooltip, { "data-testid": dataTestId ? `${dataTestId}-count-tooltip` : undefined, disabled: countTooltip === undefined || countTooltip === null, label: countTooltip ?? "", placement: "bottom", children: jsxRuntime.jsxs(reactComponents.Tag, { className: "inline", color: "neutral", onMouseEnter: onMouseEnter, size: "small", children: ["+", count - 1] }) })) : null] })) : null;
635
635
  };
636
636
 
637
637
  /**
@@ -707,8 +707,8 @@ const cvaNumberCell = cssClassVarianceUtilities.cvaMerge(["flex", "gap-1", "slas
707
707
  * @param {NumberCellProps} props - The props for the NumberCell component.
708
708
  * @returns {ReactElement} A React JSX element representing the NumberCell component.
709
709
  */
710
- const NumberCell = ({ value = "", unit, className, "data-testid": dataTestId, ref }) => {
711
- return (jsxRuntime.jsxs("div", { className: cvaNumberCell({ className }), "data-testid": dataTestId, ref: ref, children: [jsxRuntime.jsx("span", { children: value }), value !== null && value !== "" && unit !== undefined && unit !== null && unit !== "" ? jsxRuntime.jsx("span", { children: unit }) : null] }));
710
+ const NumberCell = ({ value = "", unit, className, "data-testid": dataTestId, ref, style }) => {
711
+ return (jsxRuntime.jsxs("div", { className: cvaNumberCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [jsxRuntime.jsx("span", { children: value }), value !== null && value !== "" && unit !== undefined && unit !== null && unit !== "" ? (jsxRuntime.jsx("span", { children: unit })) : null] }));
712
712
  };
713
713
 
714
714
  const cvaPlainDateCell = cssClassVarianceUtilities.cvaMerge([""]);
@@ -739,12 +739,12 @@ const cvaDateTimeSince = cssClassVarianceUtilities.cvaMerge(["slashed-zero", "te
739
739
  * @param {PlainDateCellProps} props - The props for the PlainDateCell component
740
740
  * @returns {ReactElement} PlainDateCell component
741
741
  */
742
- const PlainDateCell = ({ locale, date, withDaysSince = true, className, "data-testid": dataTestId, ref, }) => {
742
+ const PlainDateCell = ({ locale, date, withDaysSince = true, className, "data-testid": dataTestId, ref, style, }) => {
743
743
  if (!date) {
744
744
  return null;
745
745
  }
746
746
  const formattedDate = dateAndTimeUtils.formatDateUtil(date.toZonedDateTime("UTC"), sharedUtils.DateTimeFormat.DATE_SHORT, "UTC", locale);
747
- return (jsxRuntime.jsxs("div", { className: cvaPlainDateCell({ className }), "data-testid": dataTestId, ref: ref, children: [jsxRuntime.jsx("p", { className: cvaDateTime(), children: formattedDate }), withDaysSince ? jsxRuntime.jsx(DaysSince, { date: date, locale: locale }) : null] }));
747
+ return (jsxRuntime.jsxs("div", { className: cvaPlainDateCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [jsxRuntime.jsx("p", { className: cvaDateTime(), children: formattedDate }), withDaysSince ? jsxRuntime.jsx(DaysSince, { date: date, locale: locale }) : null] }));
748
748
  };
749
749
  const DaysSince = ({ date, locale }) => {
750
750
  let timeSince = null;
@@ -916,7 +916,7 @@ const cvaResizeHandel = cssClassVarianceUtilities.cvaMerge([
916
916
  * @param {RowActionsProps} props - The properties for the component.
917
917
  * @returns {ReactElement} A React component rendering the row actions.
918
918
  */
919
- const RowActions = ({ actions }) => {
919
+ const RowActions = ({ actions, style }) => {
920
920
  const selectedActions = actions.filter(action => action.isSelected);
921
921
  const normalActions = actions.filter(action => (action.isVisible ?? true) && action.variant !== "danger");
922
922
  const dangerActions = actions.filter(action => (action.isVisible ?? true) && action.variant === "danger");
@@ -929,9 +929,9 @@ const RowActions = ({ actions }) => {
929
929
  (action.isVisible ?? true) && (jsxRuntime.jsx(reactComponents.Button, { disabled: action.disabled || action.loading, onClick: event => {
930
930
  event.stopPropagation();
931
931
  action.onClick(event);
932
- }, prefix: jsxRuntime.jsx(IconWithLoader, { action: action, size: "small" }), size: "small", variant: "secondary", children: action.label })));
932
+ }, prefix: jsxRuntime.jsx(IconWithLoader, { action: action, size: "small" }), size: "small", style: style, variant: "secondary", children: action.label })));
933
933
  }
934
- return (jsxRuntime.jsxs("div", { className: "flex items-center", "data-testid": "row-actions", children: [selectedActions.map((action, index) => (jsxRuntime.jsx(reactComponents.IconButton, { className: "mr-2", icon: action.iconName ? jsxRuntime.jsx(reactComponents.Icon, { name: action.iconName, size: "small" }) : undefined, onClick: event => {
934
+ return (jsxRuntime.jsxs("div", { className: "flex items-center", "data-testid": "row-actions", style: style, children: [selectedActions.map((action, index) => (jsxRuntime.jsx(reactComponents.IconButton, { className: "mr-2", icon: action.iconName ? jsxRuntime.jsx(reactComponents.Icon, { name: action.iconName, size: "small" }) : undefined, onClick: event => {
935
935
  event.stopPropagation();
936
936
  action.onClick(event);
937
937
  }, size: "small", variant: "ghost-neutral" }, `selected-action-${index}`))), jsxRuntime.jsx(reactComponents.MoreMenu, { customButton: jsxRuntime.jsx(reactComponents.IconButton, { icon: jsxRuntime.jsx(reactComponents.Icon, { name: "EllipsisHorizontal", size: "medium" }), onClick: event => event.stopPropagation(), size: "small", variant: "ghost-neutral" }), children: close => (jsxRuntime.jsxs(reactComponents.MenuList, { children: [normalActions.map((action, index) => (jsxRuntime.jsx(reactComponents.MenuItem, { disabled: action.disabled || action.loading, label: action.label, onClick: event => {
@@ -1078,8 +1078,8 @@ const cvaTagsCell = cssClassVarianceUtilities.cvaMerge(["flex", "gap-2"]);
1078
1078
  * @param {TagsCellProps} props - The props for the TagsCell component
1079
1079
  * @returns {ReactElement} TagsCell component
1080
1080
  */
1081
- const TagsCell = ({ className, tags, "data-testid": dataTestId, ref }) => {
1082
- return (jsxRuntime.jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, ref: ref, children: tags.map((tag, index) => (jsxRuntime.jsx(reactComponents.Tag, { color: "primary",
1081
+ const TagsCell = ({ className, tags, "data-testid": dataTestId, ref, style }) => {
1082
+ return (jsxRuntime.jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: tags.map((tag, index) => (jsxRuntime.jsx(reactComponents.Tag, { color: "primary",
1083
1083
  "data-testid": `${dataTestId}-${index}`,
1084
1084
  ...(typeof tag === "string" ? { children: tag } : tag) }, index))) }));
1085
1085
  };
@@ -1172,13 +1172,13 @@ const cvaTextCellTooltip = cssClassVarianceUtilities.cvaMerge(["grid"]);
1172
1172
  * @param {TextCellProps} props - The props for the TextCell component
1173
1173
  * @returns {ReactElement} TextCell component
1174
1174
  */
1175
- const TextCell = ({ content = "", className, "data-testid": dataTestId, ref }) => {
1175
+ const TextCell = ({ content = "", className, "data-testid": dataTestId, ref, style }) => {
1176
1176
  const [isTooltipVisible, setIsTooltipVisible] = react.useState(false);
1177
1177
  const updateTooltipVisibility = (element) => {
1178
1178
  setIsTooltipVisible(element ? element.scrollWidth > element.clientWidth : false);
1179
1179
  };
1180
1180
  const mergedRef = reactComponents.useMergeRefs([ref, (elementRef) => updateTooltipVisibility(elementRef)]);
1181
- return (jsxRuntime.jsx(reactComponents.Tooltip, { disabled: !isTooltipVisible, label: content, placement: "bottom", children: jsxRuntime.jsx("div", { className: cvaTextCellTooltip(), children: jsxRuntime.jsx("span", { className: cvaTextCell({ className }), "data-testid": dataTestId, ref: mergedRef, children: content }) }) }));
1181
+ return (jsxRuntime.jsx(reactComponents.Tooltip, { disabled: !isTooltipVisible, label: content, placement: "bottom", children: jsxRuntime.jsx("div", { className: cvaTextCellTooltip(), children: jsxRuntime.jsx("span", { className: cvaTextCell({ className }), "data-testid": dataTestId, ref: mergedRef, style: style, children: content }) }) }));
1182
1182
  };
1183
1183
 
1184
1184
  /**
package/index.esm.js CHANGED
@@ -120,8 +120,8 @@ const setupLibraryTranslations = () => {
120
120
  * @param {ButtonCellProps} props - The props for the ButtonCell component
121
121
  * @returns {ReactElement} ButtonCell component
122
122
  */
123
- const ButtonCell = ({ children, className, "data-testid": dataTestId, iconColor = "primary", iconName = undefined, variant = "ghost-neutral", ...rest }) => {
124
- return (jsx(Button, { prefix: iconName ? jsx(Icon, { color: iconColor, name: iconName, size: "small", type: "solid" }) : null, ...rest, className: twMerge("px-2 text-sm font-normal text-black hover:text-black", className), "data-testid": `button-cell-${dataTestId}`, variant: variant, children: children }));
123
+ const ButtonCell = ({ children, className, "data-testid": dataTestId, iconColor = "primary", iconName = undefined, style, variant = "ghost-neutral", ...rest }) => {
124
+ return (jsx(Button, { prefix: iconName ? jsx(Icon, { color: iconColor, name: iconName, size: "small", type: "solid" }) : null, ...rest, className: twMerge("px-2 text-sm font-normal text-black hover:text-black", className), "data-testid": `button-cell-${dataTestId}`, style: style, variant: variant, children: children }));
125
125
  };
126
126
 
127
127
  const cvaCheckboxCell = cvaMerge([""]);
@@ -145,8 +145,8 @@ const cvaCheckboxCell = cvaMerge([""]);
145
145
  * @param {CheckboxCellProps} props - The props for the CheckboxCell component
146
146
  * @returns {ReactElement} CheckboxCell component
147
147
  */
148
- const CheckboxCell = ({ checked, className, "data-testid": dataTestId }) => {
149
- return (jsx("div", { className: cvaCheckboxCell({ className }), "data-testid": dataTestId, children: jsx(Checkbox, { checked: checked, readOnly: true }) }));
148
+ const CheckboxCell = ({ checked, className, "data-testid": dataTestId, style }) => {
149
+ return (jsx("div", { className: cvaCheckboxCell({ className }), "data-testid": dataTestId, style: style, children: jsx(Checkbox, { checked: checked, readOnly: true }) }));
150
150
  };
151
151
 
152
152
  const cvaMultiRowTableCellSection = cvaMerge(["flex", "flex-col", "justify-center", "overflow-hidden"]);
@@ -176,8 +176,8 @@ const cvaSecondaryRowText = cvaMerge(["overflow-hidden", "text-ellipsis", "text-
176
176
  * @param {MultiRowTableCellProps} props - The props for the MultiRowTableCell component
177
177
  * @returns {ReactElement} MultiRowTableCell component
178
178
  */
179
- const MultiRowTableCell = ({ main, secondary, "data-testid": dataTestId, className, }) => {
180
- return (jsx("div", { className: cvaMultiRowTableCell({ className }), children: jsxs("section", { className: cvaMultiRowTableCellSection(), "data-testid": dataTestId, children: [typeof main === "string" ? jsx("div", { className: cvaMainRowText(), children: main }) : main, typeof secondary === "string" && secondary !== "" ? (jsx("div", { className: cvaSecondaryRowText(), children: secondary })) : (secondary)] }) }));
179
+ const MultiRowTableCell = ({ main, secondary, "data-testid": dataTestId, className, style, }) => {
180
+ return (jsx("div", { className: cvaMultiRowTableCell({ className }), style: style, children: jsxs("section", { className: cvaMultiRowTableCellSection(), "data-testid": dataTestId, children: [typeof main === "string" ? jsx("div", { className: cvaMainRowText(), children: main }) : main, typeof secondary === "string" && secondary !== "" ? (jsx("div", { className: cvaSecondaryRowText(), children: secondary })) : (secondary)] }) }));
181
181
  };
182
182
 
183
183
  const cvaCopyableCell = cvaMerge(["overflow-hidden", "w-fit"]);
@@ -214,14 +214,14 @@ const cvaCopyableCell = cvaMerge(["overflow-hidden", "w-fit"]);
214
214
  * @param {CopyableCellProps} props - The props for the CopyableCell component
215
215
  * @returns {ReactElement} CopyableCell component
216
216
  */
217
- const CopyableCell = ({ text, secondary, "data-testid": dataTestId, className, }) => {
217
+ const CopyableCell = ({ text, secondary, "data-testid": dataTestId, className, style, }) => {
218
218
  const [t] = useTranslation();
219
219
  const copyLabel = t("copyableCell.copy");
220
220
  const copiedLabel = t("copyableCell.copied");
221
221
  if (secondary !== undefined) {
222
- return (jsx(MultiRowTableCell, { className: cvaCopyableCell({ className }), "data-testid": dataTestId, main: jsx(CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, text: text }), secondary: jsx(CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, size: "xs", text: secondary.text }) }));
222
+ return (jsx(MultiRowTableCell, { className: cvaCopyableCell({ className }), "data-testid": dataTestId, main: jsx(CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, text: text }), secondary: jsx(CopyableText, { className: "self-start", copiedLabel: copiedLabel, copyLabel: copyLabel, size: "xs", text: secondary.text }), style: style }));
223
223
  }
224
- return (jsx(CopyableText, { className: cvaCopyableCell({ className }), copiedLabel: copiedLabel, copyLabel: copyLabel, "data-testid": dataTestId, text: text }));
224
+ return (jsx(CopyableText, { className: cvaCopyableCell({ className }), copiedLabel: copiedLabel, copyLabel: copyLabel, "data-testid": dataTestId, style: style, text: text }));
225
225
  };
226
226
 
227
227
  const cvaDateTimeCell = cvaMerge([""]);
@@ -284,12 +284,12 @@ const cvaDateTimeSince$1 = cvaMerge(["slashed-zero", "text-neutral-500", "text-x
284
284
  * @param {DateTimeCellProps} props - The props for the DateTimeCell component
285
285
  * @returns {ReactElement} DateTimeCell component
286
286
  */
287
- const DateTimeCell = ({ format, timeZone, locale, date, withTimeSince = true, className, "data-testid": dataTestId, }) => {
287
+ const DateTimeCell = ({ format, timeZone, locale, date, withTimeSince = true, className, "data-testid": dataTestId, style, }) => {
288
288
  if (!date) {
289
289
  return null;
290
290
  }
291
291
  const formattedDate = formatDateUtil(date, format, timeZone, locale);
292
- return (jsxs("div", { className: cvaDateTimeCell({ className }), "data-testid": dataTestId, children: [jsx("p", { className: cvaDateTime$1(), children: formattedDate }), withTimeSince ? jsx(TimeSince, { date: date, locale: locale, timeZone: timeZone }) : null] }));
292
+ return (jsxs("div", { className: cvaDateTimeCell({ className }), "data-testid": dataTestId, style: style, children: [jsx("p", { className: cvaDateTime$1(), children: formattedDate }), withTimeSince ? jsx(TimeSince, { date: date, locale: locale, timeZone: timeZone }) : null] }));
293
293
  };
294
294
  const TimeSince = ({ date, timeZone, locale }) => {
295
295
  const timeSince = useMemo(() => {
@@ -330,8 +330,8 @@ const cvaHighlightCell = cvaMerge(["flex", "gap-2"]);
330
330
  * @param {HighlightCellProps} props - The props for the HighlightCell component
331
331
  * @returns {ReactElement} HighlightCell component
332
332
  */
333
- const HighlightCell = ({ className, highlights, "data-testid": dataTestId, ref }) => {
334
- return (jsx("div", { className: cvaHighlightCell({ className }), "data-testid": dataTestId, ref: ref, children: highlights.map((highlight, index) => (jsx(Highlight, { color: "warning",
333
+ const HighlightCell = ({ className, highlights, "data-testid": dataTestId, ref, style }) => {
334
+ return (jsx("div", { className: cvaHighlightCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: highlights.map((highlight, index) => (jsx(Highlight, { color: "warning",
335
335
  size: "medium",
336
336
  "data-testid": `${dataTestId}-${index}`,
337
337
  ...(typeof highlight === "string" ? { children: highlight } : highlight) }, index))) }));
@@ -418,14 +418,14 @@ const cvaIdentityCell = cvaMerge(["grid", "items-center", "text-sm", "gap-2"], {
418
418
  * @param {IdentityCellProps} props - The props for the IdentityCell component
419
419
  * @returns {ReactElement} IdentityCell component
420
420
  */
421
- const IdentityCell = ({ link, className, "data-testid": dataTestId, ref, title, details = [], thumbnail, }) => {
421
+ const IdentityCell = ({ link, className, "data-testid": dataTestId, ref, style, title, details = [], thumbnail, }) => {
422
422
  const [href, setHref] = useState(undefined);
423
423
  useEffect(() => {
424
424
  if (link) {
425
425
  void link.href().then(setHref);
426
426
  }
427
427
  }, [link]);
428
- return (jsxs("div", { className: cvaIdentityCell({ className, hasThumbnail: thumbnail !== undefined && thumbnail !== null }), "data-testid": dataTestId, ref: ref, children: [thumbnail !== undefined && thumbnail !== null ? (jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxs("div", { className: "grid grid-rows-[min-content_auto] items-center text-sm", children: [jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsx(Heading, { className: "truncate text-sm", "data-testid": dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: !link ? (jsx("span", { className: "truncate", children: title })) : (jsx(ExternalLink, { className: "truncate", color: "neutral", href: href ?? "", onClick: async (e) => {
428
+ return (jsxs("div", { className: cvaIdentityCell({ className, hasThumbnail: thumbnail !== undefined && thumbnail !== null }), "data-testid": dataTestId, ref: ref, style: style, children: [thumbnail !== undefined && thumbnail !== null ? (jsx("div", { className: "mr-1 flex h-8 w-8 items-center justify-center overflow-hidden rounded-md", children: thumbnail })) : null, jsxs("div", { className: "grid grid-rows-[min-content_auto] items-center text-sm", children: [jsx("div", { className: "gap-responsive-space-sm flex w-full min-w-0 items-center truncate text-sm", children: jsx(Heading, { className: "truncate text-sm", "data-testid": dataTestId ? `${dataTestId}-name` : undefined, variant: "tertiary", children: !link ? (jsx("span", { className: "truncate", children: title })) : (jsx(ExternalLink, { className: "truncate", color: "neutral", href: href ?? "", onClick: async (e) => {
429
429
  // Allow Cmd/Ctrl+Click, Shift+Click, or middle-click to open in new tab
430
430
  const hasModifierKey = e.ctrlKey || e.metaKey || e.shiftKey;
431
431
  const isMiddleClick = e.button === 1;
@@ -573,7 +573,7 @@ const LinkCell = ({ link, type, className, ref, ...rest }) => {
573
573
  * @param {ListTooltipProps<TItem>} props Component props.
574
574
  * @returns {ReactNode} Tooltip list markup.
575
575
  */
576
- const ListTooltip = ({ items, "data-testid": dataTestId, getLabel, getKey, loading = false, }) => {
576
+ const ListTooltip = ({ items, "data-testid": dataTestId, getLabel, getKey, loading = false, style, }) => {
577
577
  const toDisplay = (item, index) => {
578
578
  if (getLabel) {
579
579
  return getLabel(item, index);
@@ -605,7 +605,7 @@ const ListTooltip = ({ items, "data-testid": dataTestId, getLabel, getKey, loadi
605
605
  if (loading) {
606
606
  return jsx(Spinner, { centering: "centered", mode: "dark" });
607
607
  }
608
- return (jsx("ul", { className: "list-inside !ps-1 pl-1", "data-testid": dataTestId, children: items.map((item, index) => {
608
+ return (jsx("ul", { className: "list-inside !ps-1 pl-1", "data-testid": dataTestId, style: style, children: items.map((item, index) => {
609
609
  const label = toDisplay(item, index);
610
610
  if (label === "" || label === null || label === undefined) {
611
611
  return null;
@@ -624,12 +624,12 @@ const cvaMultiValueTextCellTooltip = cvaMerge(["whitespace-no-wrap", "overflow-h
624
624
  * @param {MultiValueTextCellProps} props - The props for the MultiValueTextCell component
625
625
  * @returns {ReactElement} MultiValueTextCell component
626
626
  */
627
- const MultiValueTextCell = ({ content, count, countTooltip, icon, iconTooltip, "data-testid": dataTestId, className, onMouseEnter, ref, }) => {
627
+ const MultiValueTextCell = ({ content, count, countTooltip, icon, iconTooltip, "data-testid": dataTestId, className, onMouseEnter, ref, style, }) => {
628
628
  const [isTooltipVisible, setIsTooltipVisible] = useState(false);
629
629
  const updateTooltipVisibility = (element) => {
630
630
  setIsTooltipVisible(element ? element.scrollWidth > element.clientWidth : false);
631
631
  };
632
- return count !== null && count !== undefined && count > 0 ? (jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, ref: ref, children: [icon ? (jsx(Tooltip, { "data-testid": dataTestId ? `${dataTestId}-icon-tooltip` : undefined, disabled: !iconTooltip, label: iconTooltip ?? "", placement: "bottom", children: jsx("span", { className: "inline-flex items-center", children: icon }) })) : null, jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsx(Tooltip, { "data-testid": dataTestId ? `${dataTestId}-content-tooltip` : undefined, disabled: !isTooltipVisible, label: content ?? "", placement: "bottom", children: jsx(Text, { className: "inline", children: content ?? "" }) }) }), count > 1 ? (jsx(Tooltip, { "data-testid": dataTestId ? `${dataTestId}-count-tooltip` : undefined, disabled: countTooltip === undefined || countTooltip === null, label: countTooltip ?? "", placement: "bottom", children: jsxs(Tag, { className: "inline", color: "neutral", onMouseEnter: onMouseEnter, size: "small", children: ["+", count - 1] }) })) : null] })) : null;
632
+ return count !== null && count !== undefined && count > 0 ? (jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [icon ? (jsx(Tooltip, { "data-testid": dataTestId ? `${dataTestId}-icon-tooltip` : undefined, disabled: !iconTooltip, label: iconTooltip ?? "", placement: "bottom", children: jsx("span", { className: "inline-flex items-center", children: icon }) })) : null, jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsx(Tooltip, { "data-testid": dataTestId ? `${dataTestId}-content-tooltip` : undefined, disabled: !isTooltipVisible, label: content ?? "", placement: "bottom", children: jsx(Text, { className: "inline", children: content ?? "" }) }) }), count > 1 ? (jsx(Tooltip, { "data-testid": dataTestId ? `${dataTestId}-count-tooltip` : undefined, disabled: countTooltip === undefined || countTooltip === null, label: countTooltip ?? "", placement: "bottom", children: jsxs(Tag, { className: "inline", color: "neutral", onMouseEnter: onMouseEnter, size: "small", children: ["+", count - 1] }) })) : null] })) : null;
633
633
  };
634
634
 
635
635
  /**
@@ -705,8 +705,8 @@ const cvaNumberCell = cvaMerge(["flex", "gap-1", "slashed-zero", "text-sm", "tex
705
705
  * @param {NumberCellProps} props - The props for the NumberCell component.
706
706
  * @returns {ReactElement} A React JSX element representing the NumberCell component.
707
707
  */
708
- const NumberCell = ({ value = "", unit, className, "data-testid": dataTestId, ref }) => {
709
- return (jsxs("div", { className: cvaNumberCell({ className }), "data-testid": dataTestId, ref: ref, children: [jsx("span", { children: value }), value !== null && value !== "" && unit !== undefined && unit !== null && unit !== "" ? jsx("span", { children: unit }) : null] }));
708
+ const NumberCell = ({ value = "", unit, className, "data-testid": dataTestId, ref, style }) => {
709
+ return (jsxs("div", { className: cvaNumberCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [jsx("span", { children: value }), value !== null && value !== "" && unit !== undefined && unit !== null && unit !== "" ? (jsx("span", { children: unit })) : null] }));
710
710
  };
711
711
 
712
712
  const cvaPlainDateCell = cvaMerge([""]);
@@ -737,12 +737,12 @@ const cvaDateTimeSince = cvaMerge(["slashed-zero", "text-neutral-500", "text-xs"
737
737
  * @param {PlainDateCellProps} props - The props for the PlainDateCell component
738
738
  * @returns {ReactElement} PlainDateCell component
739
739
  */
740
- const PlainDateCell = ({ locale, date, withDaysSince = true, className, "data-testid": dataTestId, ref, }) => {
740
+ const PlainDateCell = ({ locale, date, withDaysSince = true, className, "data-testid": dataTestId, ref, style, }) => {
741
741
  if (!date) {
742
742
  return null;
743
743
  }
744
744
  const formattedDate = formatDateUtil(date.toZonedDateTime("UTC"), DateTimeFormat.DATE_SHORT, "UTC", locale);
745
- return (jsxs("div", { className: cvaPlainDateCell({ className }), "data-testid": dataTestId, ref: ref, children: [jsx("p", { className: cvaDateTime(), children: formattedDate }), withDaysSince ? jsx(DaysSince, { date: date, locale: locale }) : null] }));
745
+ return (jsxs("div", { className: cvaPlainDateCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [jsx("p", { className: cvaDateTime(), children: formattedDate }), withDaysSince ? jsx(DaysSince, { date: date, locale: locale }) : null] }));
746
746
  };
747
747
  const DaysSince = ({ date, locale }) => {
748
748
  let timeSince = null;
@@ -914,7 +914,7 @@ const cvaResizeHandel = cvaMerge([
914
914
  * @param {RowActionsProps} props - The properties for the component.
915
915
  * @returns {ReactElement} A React component rendering the row actions.
916
916
  */
917
- const RowActions = ({ actions }) => {
917
+ const RowActions = ({ actions, style }) => {
918
918
  const selectedActions = actions.filter(action => action.isSelected);
919
919
  const normalActions = actions.filter(action => (action.isVisible ?? true) && action.variant !== "danger");
920
920
  const dangerActions = actions.filter(action => (action.isVisible ?? true) && action.variant === "danger");
@@ -927,9 +927,9 @@ const RowActions = ({ actions }) => {
927
927
  (action.isVisible ?? true) && (jsx(Button, { disabled: action.disabled || action.loading, onClick: event => {
928
928
  event.stopPropagation();
929
929
  action.onClick(event);
930
- }, prefix: jsx(IconWithLoader, { action: action, size: "small" }), size: "small", variant: "secondary", children: action.label })));
930
+ }, prefix: jsx(IconWithLoader, { action: action, size: "small" }), size: "small", style: style, variant: "secondary", children: action.label })));
931
931
  }
932
- return (jsxs("div", { className: "flex items-center", "data-testid": "row-actions", children: [selectedActions.map((action, index) => (jsx(IconButton, { className: "mr-2", icon: action.iconName ? jsx(Icon, { name: action.iconName, size: "small" }) : undefined, onClick: event => {
932
+ return (jsxs("div", { className: "flex items-center", "data-testid": "row-actions", style: style, children: [selectedActions.map((action, index) => (jsx(IconButton, { className: "mr-2", icon: action.iconName ? jsx(Icon, { name: action.iconName, size: "small" }) : undefined, onClick: event => {
933
933
  event.stopPropagation();
934
934
  action.onClick(event);
935
935
  }, size: "small", variant: "ghost-neutral" }, `selected-action-${index}`))), jsx(MoreMenu, { customButton: jsx(IconButton, { icon: jsx(Icon, { name: "EllipsisHorizontal", size: "medium" }), onClick: event => event.stopPropagation(), size: "small", variant: "ghost-neutral" }), children: close => (jsxs(MenuList, { children: [normalActions.map((action, index) => (jsx(MenuItem, { disabled: action.disabled || action.loading, label: action.label, onClick: event => {
@@ -1076,8 +1076,8 @@ const cvaTagsCell = cvaMerge(["flex", "gap-2"]);
1076
1076
  * @param {TagsCellProps} props - The props for the TagsCell component
1077
1077
  * @returns {ReactElement} TagsCell component
1078
1078
  */
1079
- const TagsCell = ({ className, tags, "data-testid": dataTestId, ref }) => {
1080
- return (jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, ref: ref, children: tags.map((tag, index) => (jsx(Tag, { color: "primary",
1079
+ const TagsCell = ({ className, tags, "data-testid": dataTestId, ref, style }) => {
1080
+ return (jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, ref: ref, style: style, children: tags.map((tag, index) => (jsx(Tag, { color: "primary",
1081
1081
  "data-testid": `${dataTestId}-${index}`,
1082
1082
  ...(typeof tag === "string" ? { children: tag } : tag) }, index))) }));
1083
1083
  };
@@ -1170,13 +1170,13 @@ const cvaTextCellTooltip = cvaMerge(["grid"]);
1170
1170
  * @param {TextCellProps} props - The props for the TextCell component
1171
1171
  * @returns {ReactElement} TextCell component
1172
1172
  */
1173
- const TextCell = ({ content = "", className, "data-testid": dataTestId, ref }) => {
1173
+ const TextCell = ({ content = "", className, "data-testid": dataTestId, ref, style }) => {
1174
1174
  const [isTooltipVisible, setIsTooltipVisible] = useState(false);
1175
1175
  const updateTooltipVisibility = (element) => {
1176
1176
  setIsTooltipVisible(element ? element.scrollWidth > element.clientWidth : false);
1177
1177
  };
1178
1178
  const mergedRef = useMergeRefs([ref, (elementRef) => updateTooltipVisibility(elementRef)]);
1179
- return (jsx(Tooltip, { disabled: !isTooltipVisible, label: content, placement: "bottom", children: jsx("div", { className: cvaTextCellTooltip(), children: jsx("span", { className: cvaTextCell({ className }), "data-testid": dataTestId, ref: mergedRef, children: content }) }) }));
1179
+ return (jsx(Tooltip, { disabled: !isTooltipVisible, label: content, placement: "bottom", children: jsx("div", { className: cvaTextCellTooltip(), children: jsx("span", { className: cvaTextCell({ className }), "data-testid": dataTestId, ref: mergedRef, style: style, children: content }) }) }));
1180
1180
  };
1181
1181
 
1182
1182
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table-base-components",
3
- "version": "1.24.1",
3
+ "version": "1.24.2",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@trackunit/react-components": "1.24.1",
11
11
  "@trackunit/ui-icons": "1.13.1",
12
- "@trackunit/react-form-components": "1.25.1",
12
+ "@trackunit/react-form-components": "1.25.2",
13
13
  "@trackunit/css-class-variance-utilities": "1.13.1",
14
14
  "@trackunit/date-and-time-utils": "1.13.1",
15
15
  "@trackunit/shared-utils": "1.15.1",
@@ -1,7 +1,7 @@
1
- import { ButtonCommonProps, IconColors, Refable } from "@trackunit/react-components";
1
+ import { ButtonCommonProps, IconColors, Refable, type Styleable } from "@trackunit/react-components";
2
2
  import { IconName } from "@trackunit/ui-icons";
3
3
  import { ReactNode } from "react";
4
- export interface ButtonCellProps extends ButtonCommonProps, Refable<HTMLButtonElement> {
4
+ export interface ButtonCellProps extends ButtonCommonProps, Refable<HTMLButtonElement>, Styleable {
5
5
  /**
6
6
  * The content to display inside the button, typically the action text.
7
7
  */
@@ -89,4 +89,4 @@ export interface ButtonCellProps extends ButtonCommonProps, Refable<HTMLButtonEl
89
89
  * @param {ButtonCellProps} props - The props for the ButtonCell component
90
90
  * @returns {ReactElement} ButtonCell component
91
91
  */
92
- export declare const ButtonCell: ({ children, className, "data-testid": dataTestId, iconColor, iconName, variant, ...rest }: ButtonCellProps) => import("react/jsx-runtime").JSX.Element;
92
+ export declare const ButtonCell: ({ children, className, "data-testid": dataTestId, iconColor, iconName, style, variant, ...rest }: ButtonCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { CommonProps } from "@trackunit/react-components";
2
- export interface CheckboxCellProps extends CommonProps {
1
+ import { CommonProps, type Styleable } from "@trackunit/react-components";
2
+ export interface CheckboxCellProps extends CommonProps, Styleable {
3
3
  checked: boolean;
4
4
  }
5
5
  /**
@@ -21,4 +21,4 @@ export interface CheckboxCellProps extends CommonProps {
21
21
  * @param {CheckboxCellProps} props - The props for the CheckboxCell component
22
22
  * @returns {ReactElement} CheckboxCell component
23
23
  */
24
- export declare const CheckboxCell: ({ checked, className, "data-testid": dataTestId }: CheckboxCellProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const CheckboxCell: ({ checked, className, "data-testid": dataTestId, style }: CheckboxCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
- import { CommonProps, type CopyableTextProps } from "@trackunit/react-components";
1
+ import { CommonProps, type CopyableTextProps, type Styleable } from "@trackunit/react-components";
2
2
  import type { ReactElement } from "react";
3
3
  type CopyableCellSecondary = Pick<CopyableTextProps, "text">;
4
- export interface CopyableCellProps extends CommonProps, Pick<CopyableTextProps, "text"> {
4
+ export interface CopyableCellProps extends CommonProps, Pick<CopyableTextProps, "text">, Styleable {
5
5
  /**
6
6
  * When provided, renders a multi-line cell with a secondary row below the primary.
7
7
  * The secondary row is independently copyable.
@@ -40,5 +40,5 @@ export interface CopyableCellProps extends CommonProps, Pick<CopyableTextProps,
40
40
  * @param {CopyableCellProps} props - The props for the CopyableCell component
41
41
  * @returns {ReactElement} CopyableCell component
42
42
  */
43
- export declare const CopyableCell: ({ text, secondary, "data-testid": dataTestId, className, }: CopyableCellProps) => ReactElement;
43
+ export declare const CopyableCell: ({ text, secondary, "data-testid": dataTestId, className, style, }: CopyableCellProps) => ReactElement;
44
44
  export {};
@@ -1,6 +1,6 @@
1
1
  import { TemporalFormat } from "@trackunit/date-and-time-utils";
2
- import { CommonProps, Refable } from "@trackunit/react-components";
3
- export interface DateTimeCellProps extends CommonProps, Refable<HTMLDivElement> {
2
+ import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
3
+ export interface DateTimeCellProps extends CommonProps, Refable<HTMLDivElement>, Styleable {
4
4
  /**
5
5
  * The date to render.
6
6
  * If not provided, the component will not render.
@@ -86,7 +86,7 @@ export interface DateTimeCellProps extends CommonProps, Refable<HTMLDivElement>
86
86
  * @param {DateTimeCellProps} props - The props for the DateTimeCell component
87
87
  * @returns {ReactElement} DateTimeCell component
88
88
  */
89
- export declare const DateTimeCell: ({ format, timeZone, locale, date, withTimeSince, className, "data-testid": dataTestId, }: DateTimeCellProps) => import("react/jsx-runtime").JSX.Element | null;
89
+ export declare const DateTimeCell: ({ format, timeZone, locale, date, withTimeSince, className, "data-testid": dataTestId, style, }: DateTimeCellProps) => import("react/jsx-runtime").JSX.Element | null;
90
90
  export interface TimeSinceProps extends Pick<DateTimeCellProps, "date" | "timeZone" | "locale"> {
91
91
  date: Date;
92
92
  }
@@ -43,4 +43,4 @@ export interface HighlightCellProps extends CommonProps, HTMLAttributes<HTMLTabl
43
43
  * @param {HighlightCellProps} props - The props for the HighlightCell component
44
44
  * @returns {ReactElement} HighlightCell component
45
45
  */
46
- export declare const HighlightCell: ({ className, highlights, "data-testid": dataTestId, ref }: HighlightCellProps) => import("react/jsx-runtime").JSX.Element;
46
+ export declare const HighlightCell: ({ className, highlights, "data-testid": dataTestId, ref, style }: HighlightCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { CommonProps, Refable } from "@trackunit/react-components";
1
+ import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
2
2
  import { ReactElement, ReactNode } from "react";
3
- export interface IdentityCellProps extends CommonProps, Refable<HTMLDivElement> {
3
+ export interface IdentityCellProps extends CommonProps, Refable<HTMLDivElement>, Styleable {
4
4
  className?: string;
5
5
  "data-testid"?: string;
6
6
  /** The main title or name to display */
@@ -89,4 +89,4 @@ export interface IdentityCellProps extends CommonProps, Refable<HTMLDivElement>
89
89
  * @param {IdentityCellProps} props - The props for the IdentityCell component
90
90
  * @returns {ReactElement} IdentityCell component
91
91
  */
92
- export declare const IdentityCell: ({ link, className, "data-testid": dataTestId, ref, title, details, thumbnail, }: IdentityCellProps) => ReactElement;
92
+ export declare const IdentityCell: ({ link, className, "data-testid": dataTestId, ref, style, title, details, thumbnail, }: IdentityCellProps) => ReactElement;
@@ -1,5 +1,5 @@
1
- import { CommonProps, Refable } from "@trackunit/react-components";
2
- export interface ImageCellProps extends CommonProps, Refable<HTMLImageElement> {
1
+ import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
2
+ export interface ImageCellProps extends CommonProps, Refable<HTMLImageElement>, Styleable {
3
3
  /**
4
4
  * The URL of the image to be displayed.
5
5
  */
@@ -1,6 +1,6 @@
1
- import { CommonProps } from "@trackunit/react-components";
1
+ import { CommonProps, type Styleable } from "@trackunit/react-components";
2
2
  import { ReactNode } from "react";
3
- export interface MultiRowTableCellProps extends CommonProps {
3
+ export interface MultiRowTableCellProps extends CommonProps, Styleable {
4
4
  /**
5
5
  * Main row of the cell.
6
6
  */
@@ -32,4 +32,4 @@ export interface MultiRowTableCellProps extends CommonProps {
32
32
  * @param {MultiRowTableCellProps} props - The props for the MultiRowTableCell component
33
33
  * @returns {ReactElement} MultiRowTableCell component
34
34
  */
35
- export declare const MultiRowTableCell: ({ main, secondary, "data-testid": dataTestId, className, }: MultiRowTableCellProps) => import("react/jsx-runtime").JSX.Element;
35
+ export declare const MultiRowTableCell: ({ main, secondary, "data-testid": dataTestId, className, style, }: MultiRowTableCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,11 @@
1
+ import { type Styleable } from "@trackunit/react-components";
1
2
  import { Key, ReactNode } from "react";
2
3
  /**
3
4
  * Props for a generic tooltip list component.
4
5
  *
5
6
  * @template TItem Element type of the list.
6
7
  */
7
- export type ListTooltipProps<TItem = unknown> = {
8
+ export type ListTooltipProps<TItem = unknown> = Styleable & {
8
9
  /** Items to render inside the tooltip. */
9
10
  items: Array<TItem>;
10
11
  /** Data test id for testing. */
@@ -31,4 +32,4 @@ export type ListTooltipProps<TItem = unknown> = {
31
32
  * @param {ListTooltipProps<TItem>} props Component props.
32
33
  * @returns {ReactNode} Tooltip list markup.
33
34
  */
34
- export declare const ListTooltip: <TItem = unknown>({ items, "data-testid": dataTestId, getLabel, getKey, loading, }: ListTooltipProps<TItem>) => import("react/jsx-runtime").JSX.Element;
35
+ export declare const ListTooltip: <TItem = unknown>({ items, "data-testid": dataTestId, getLabel, getKey, loading, style, }: ListTooltipProps<TItem>) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { CommonProps, Refable } from "@trackunit/react-components";
1
+ import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
2
2
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
3
- export interface MultiValueTextCellProps extends CommonProps, Refable<HTMLDivElement> {
3
+ export interface MultiValueTextCellProps extends CommonProps, Refable<HTMLDivElement>, Styleable {
4
4
  /**
5
5
  * Icon rendered to the left of the text.
6
6
  * Provides visual context for the primary value.
@@ -42,4 +42,4 @@ export interface MultiValueTextCellProps extends CommonProps, Refable<HTMLDivEle
42
42
  * @param {MultiValueTextCellProps} props - The props for the MultiValueTextCell component
43
43
  * @returns {ReactElement} MultiValueTextCell component
44
44
  */
45
- export declare const MultiValueTextCell: ({ content, count, countTooltip, icon, iconTooltip, "data-testid": dataTestId, className, onMouseEnter, ref, }: MultiValueTextCellProps) => import("react/jsx-runtime").JSX.Element | null;
45
+ export declare const MultiValueTextCell: ({ content, count, countTooltip, icon, iconTooltip, "data-testid": dataTestId, className, onMouseEnter, ref, style, }: MultiValueTextCellProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,5 @@
1
- import { CommonProps, Refable } from "@trackunit/react-components";
2
- export interface NumberCellProps extends CommonProps, Refable<HTMLDivElement> {
1
+ import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
2
+ export interface NumberCellProps extends CommonProps, Refable<HTMLDivElement>, Styleable {
3
3
  /**
4
4
  * The numeric value to be displayed.
5
5
  * This can be either a string or a number.
@@ -65,4 +65,4 @@ export interface NumberCellProps extends CommonProps, Refable<HTMLDivElement> {
65
65
  * @param {NumberCellProps} props - The props for the NumberCell component.
66
66
  * @returns {ReactElement} A React JSX element representing the NumberCell component.
67
67
  */
68
- export declare const NumberCell: ({ value, unit, className, "data-testid": dataTestId, ref }: NumberCellProps) => import("react/jsx-runtime").JSX.Element;
68
+ export declare const NumberCell: ({ value, unit, className, "data-testid": dataTestId, ref, style }: NumberCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@trackunit/date-and-time-utils";
2
- import { CommonProps, Refable } from "@trackunit/react-components";
3
- export interface PlainDateCellProps extends CommonProps, Refable<HTMLDivElement> {
2
+ import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
3
+ export interface PlainDateCellProps extends CommonProps, Refable<HTMLDivElement>, Styleable {
4
4
  /**
5
5
  * The PlainDate to render.
6
6
  * If not provided, the component will not render.
@@ -43,7 +43,7 @@ export interface PlainDateCellProps extends CommonProps, Refable<HTMLDivElement>
43
43
  * @param {PlainDateCellProps} props - The props for the PlainDateCell component
44
44
  * @returns {ReactElement} PlainDateCell component
45
45
  */
46
- export declare const PlainDateCell: ({ locale, date, withDaysSince, className, "data-testid": dataTestId, ref, }: PlainDateCellProps) => import("react/jsx-runtime").JSX.Element | null;
46
+ export declare const PlainDateCell: ({ locale, date, withDaysSince, className, "data-testid": dataTestId, ref, style, }: PlainDateCellProps) => import("react/jsx-runtime").JSX.Element | null;
47
47
  export interface DaysSinceProps extends Pick<PlainDateCellProps, "date" | "locale"> {
48
48
  date: Temporal.PlainDate;
49
49
  }
@@ -1,4 +1,4 @@
1
- import { MenuItemVariant } from "@trackunit/react-components";
1
+ import { MenuItemVariant, type Styleable } from "@trackunit/react-components";
2
2
  import { IconName } from "@trackunit/ui-icons";
3
3
  import { MouseEventHandler } from "react";
4
4
  export type Action = {
@@ -19,7 +19,7 @@ export type Action = {
19
19
  /** Controls visibility of the action. Defaults to true if not specified */
20
20
  isVisible?: boolean | null;
21
21
  };
22
- export interface RowActionsProps {
22
+ export interface RowActionsProps extends Styleable {
23
23
  /**
24
24
  * Array of actions to display. Single actions render as a button,
25
25
  * multiple actions render as a dropdown menu with selected actions as icon buttons.
@@ -136,4 +136,4 @@ export interface RowActionsProps {
136
136
  * @param {RowActionsProps} props - The properties for the component.
137
137
  * @returns {ReactElement} A React component rendering the row actions.
138
138
  */
139
- export declare const RowActions: ({ actions }: RowActionsProps) => false | import("react/jsx-runtime").JSX.Element | null | undefined;
139
+ export declare const RowActions: ({ actions, style }: RowActionsProps) => false | import("react/jsx-runtime").JSX.Element | null | undefined;
@@ -61,4 +61,4 @@ export interface TagsCellProps extends CommonProps, HTMLAttributes<HTMLTableSect
61
61
  * @param {TagsCellProps} props - The props for the TagsCell component
62
62
  * @returns {ReactElement} TagsCell component
63
63
  */
64
- export declare const TagsCell: ({ className, tags, "data-testid": dataTestId, ref }: TagsCellProps) => import("react/jsx-runtime").JSX.Element;
64
+ export declare const TagsCell: ({ className, tags, "data-testid": dataTestId, ref, style }: TagsCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { CommonProps, Refable } from "@trackunit/react-components";
1
+ import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
2
2
  import { ReactElement } from "react";
3
- export interface TextCellProps extends CommonProps, Refable<HTMLSpanElement> {
3
+ export interface TextCellProps extends CommonProps, Refable<HTMLSpanElement>, Styleable {
4
4
  /**
5
5
  * The text or React element to display in the cell.
6
6
  * When text overflows the cell width, it will be truncated with an ellipsis
@@ -51,4 +51,4 @@ export interface TextCellProps extends CommonProps, Refable<HTMLSpanElement> {
51
51
  * @param {TextCellProps} props - The props for the TextCell component
52
52
  * @returns {ReactElement} TextCell component
53
53
  */
54
- export declare const TextCell: ({ content, className, "data-testid": dataTestId, ref }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
54
+ export declare const TextCell: ({ content, className, "data-testid": dataTestId, ref, style }: TextCellProps) => import("react/jsx-runtime").JSX.Element;