sag_components 2.0.0-beta228 → 2.0.0-beta229
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/dist/index.esm.js
CHANGED
|
@@ -39312,6 +39312,25 @@ const StatusCellCircle = styled.div`
|
|
|
39312
39312
|
border: 1px solid white;
|
|
39313
39313
|
background-color: ${props => props.backgroundColor};
|
|
39314
39314
|
`;
|
|
39315
|
+
const DotIndicatorWrapper = styled.div`
|
|
39316
|
+
display: inline-flex;
|
|
39317
|
+
align-items: center;
|
|
39318
|
+
justify-content: center;
|
|
39319
|
+
width: 100%;
|
|
39320
|
+
height: 100%;
|
|
39321
|
+
position: relative;
|
|
39322
|
+
|
|
39323
|
+
${tooltipStyles$1}
|
|
39324
|
+
|
|
39325
|
+
/* Override tooltip position */
|
|
39326
|
+
&[data-tooltip]:hover::before {
|
|
39327
|
+
top: calc(var(--tooltip-top, 0px) - var(--tooltip-offset, 60px) + 20px);
|
|
39328
|
+
}
|
|
39329
|
+
|
|
39330
|
+
&[data-tooltip]:hover::after {
|
|
39331
|
+
top: calc(var(--tooltip-top, 0px) - var(--tooltip-offset, 60px) + var(--tooltip-height, 50px) + 20px);
|
|
39332
|
+
}
|
|
39333
|
+
`;
|
|
39315
39334
|
|
|
39316
39335
|
// NEW TAG STYLES
|
|
39317
39336
|
const TagContainer = styled.div`
|
|
@@ -40543,14 +40562,40 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
40543
40562
|
if (!value || typeof value !== 'object') return null;
|
|
40544
40563
|
const {
|
|
40545
40564
|
show,
|
|
40546
|
-
color
|
|
40565
|
+
color,
|
|
40566
|
+
tooltip
|
|
40547
40567
|
} = value;
|
|
40548
40568
|
|
|
40549
40569
|
// Only show the dot if show is true
|
|
40550
40570
|
if (!show) return null;
|
|
40551
|
-
return /*#__PURE__*/React$1.createElement(
|
|
40571
|
+
return /*#__PURE__*/React$1.createElement(DotIndicatorWrapper, {
|
|
40572
|
+
ref: el => {
|
|
40573
|
+
if (el && tooltip && tooltip.trim() !== "") {
|
|
40574
|
+
try {
|
|
40575
|
+
const rect = el.getBoundingClientRect();
|
|
40576
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
40577
|
+
const tooltipInfo = calculateTooltipOffset(tooltip);
|
|
40578
|
+
if (tooltipInfo) {
|
|
40579
|
+
const {
|
|
40580
|
+
offset,
|
|
40581
|
+
height
|
|
40582
|
+
} = tooltipInfo;
|
|
40583
|
+
el.style.setProperty("--tooltip-top", `${rect.top}px`);
|
|
40584
|
+
el.style.setProperty("--tooltip-left", `${rect.left}px`);
|
|
40585
|
+
el.style.setProperty("--tooltip-width", `${rect.width}px`);
|
|
40586
|
+
el.style.setProperty("--tooltip-offset", `${offset}px`);
|
|
40587
|
+
el.style.setProperty("--tooltip-height", `${height}px`);
|
|
40588
|
+
el.setAttribute("data-tooltip", tooltip);
|
|
40589
|
+
}
|
|
40590
|
+
}
|
|
40591
|
+
} catch (e) {
|
|
40592
|
+
console.warn("Error applying dotIndicator tooltip:", e);
|
|
40593
|
+
}
|
|
40594
|
+
}
|
|
40595
|
+
}
|
|
40596
|
+
}, /*#__PURE__*/React$1.createElement(StatusCellCircle, {
|
|
40552
40597
|
backgroundColor: color
|
|
40553
|
-
});
|
|
40598
|
+
}));
|
|
40554
40599
|
} catch (e) {
|
|
40555
40600
|
console.warn('Error formatting dotIndicator:', e);
|
|
40556
40601
|
return null;
|