@trackunit/react-table-base-components 0.0.489 → 0.0.491
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 +1 -1
- package/index.esm.js +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -123,7 +123,7 @@ const MultiValueTextCell = ({ content, count, countTooltip, icon, iconTooltip, d
|
|
|
123
123
|
const updateTooltipVisibility = (element) => {
|
|
124
124
|
setIsTooltipVisible(element ? element.scrollWidth > element.clientWidth : false);
|
|
125
125
|
};
|
|
126
|
-
return count && count > 0 ? (jsxRuntime.jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline-flex items-center", disabled: !iconTooltip, label: iconTooltip !== null && iconTooltip !== void 0 ? iconTooltip : "", placement: "bottom", children: icon }), jsxRuntime.jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline", disabled: !isTooltipVisible, label: content !== null && content !== void 0 ? content : "", placement: "bottom", children: content !== null && content !== void 0 ? content : "" }) }), jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline", disabled: !countTooltip, label: countTooltip !== null && countTooltip !== void 0 ? countTooltip : "", placement: "bottom", children: jsxRuntime.jsx(reactComponents.Tag, { color: "neutral", size: "small", children: count > 1 ? `+${count - 1}` : "" }) })] })) : null;
|
|
126
|
+
return count && count > 0 ? (jsxRuntime.jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, children: [icon ? (jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline-flex items-center", disabled: !iconTooltip, label: iconTooltip !== null && iconTooltip !== void 0 ? iconTooltip : "", placement: "bottom", children: icon })) : null, jsxRuntime.jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline", disabled: !isTooltipVisible, label: content !== null && content !== void 0 ? content : "", placement: "bottom", children: content !== null && content !== void 0 ? content : "" }) }), jsxRuntime.jsx(reactComponents.Tooltip, { className: "inline", disabled: !countTooltip, label: countTooltip !== null && countTooltip !== void 0 ? countTooltip : "", placement: "bottom", children: jsxRuntime.jsx(reactComponents.Tag, { color: "neutral", size: "small", children: count > 1 ? `+${count - 1}` : "" }) })] })) : null;
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
/**
|
package/index.esm.js
CHANGED
|
@@ -121,7 +121,7 @@ const MultiValueTextCell = ({ content, count, countTooltip, icon, iconTooltip, d
|
|
|
121
121
|
const updateTooltipVisibility = (element) => {
|
|
122
122
|
setIsTooltipVisible(element ? element.scrollWidth > element.clientWidth : false);
|
|
123
123
|
};
|
|
124
|
-
return count && count > 0 ? (jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, children: [jsx(Tooltip, { className: "inline-flex items-center", disabled: !iconTooltip, label: iconTooltip !== null && iconTooltip !== void 0 ? iconTooltip : "", placement: "bottom", children: icon }), jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsx(Tooltip, { className: "inline", disabled: !isTooltipVisible, label: content !== null && content !== void 0 ? content : "", placement: "bottom", children: content !== null && content !== void 0 ? content : "" }) }), jsx(Tooltip, { className: "inline", disabled: !countTooltip, label: countTooltip !== null && countTooltip !== void 0 ? countTooltip : "", placement: "bottom", children: jsx(Tag, { color: "neutral", size: "small", children: count > 1 ? `+${count - 1}` : "" }) })] })) : null;
|
|
124
|
+
return count && count > 0 ? (jsxs("div", { className: cvaMultiValueTextCellWrapper({ className }), "data-testid": dataTestId, children: [icon ? (jsx(Tooltip, { className: "inline-flex items-center", disabled: !iconTooltip, label: iconTooltip !== null && iconTooltip !== void 0 ? iconTooltip : "", placement: "bottom", children: icon })) : null, jsx("span", { className: cvaMultiValueTextCellTooltip(), ref: elementRef => updateTooltipVisibility(elementRef), children: jsx(Tooltip, { className: "inline", disabled: !isTooltipVisible, label: content !== null && content !== void 0 ? content : "", placement: "bottom", children: content !== null && content !== void 0 ? content : "" }) }), jsx(Tooltip, { className: "inline", disabled: !countTooltip, label: countTooltip !== null && countTooltip !== void 0 ? countTooltip : "", placement: "bottom", children: jsx(Tag, { color: "neutral", size: "small", children: count > 1 ? `+${count - 1}` : "" }) })] })) : null;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
/**
|