sag_components 2.0.0-beta319 → 2.0.0-beta320
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 +49 -26
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +49 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -41787,31 +41787,27 @@ const TableCell = styled.td`
|
|
|
41787
41787
|
0 -2px 8px rgba(0, 0, 0, 0.15),
|
|
41788
41788
|
0 2px 8px rgba(0, 0, 0, 0.15);
|
|
41789
41789
|
|
|
41790
|
-
/* Position above the element - using dynamic offset */
|
|
41791
41790
|
top: calc(var(--cell-top, 0px) - var(--cell-offset, 40px));
|
|
41792
|
-
left: calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2);
|
|
41791
|
+
left: min(calc(100vw - 110px), max(110px, calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2)));
|
|
41793
41792
|
transform: translateX(-50%);
|
|
41794
41793
|
|
|
41795
|
-
/* Add delay */
|
|
41796
41794
|
opacity: 0;
|
|
41797
41795
|
animation: showTooltip 0.3s ease-in-out 0.5s forwards;
|
|
41798
41796
|
}
|
|
41799
41797
|
|
|
41800
|
-
/* Tooltip arrow */
|
|
41801
41798
|
&[data-tooltip]:hover::after {
|
|
41802
41799
|
content: "";
|
|
41803
41800
|
position: fixed;
|
|
41804
41801
|
top: calc(
|
|
41805
41802
|
var(--cell-top, 0px) - var(--cell-offset, 40px) + var(--cell-height, 50px)
|
|
41806
41803
|
);
|
|
41807
|
-
left: calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2);
|
|
41804
|
+
left: min(calc(100vw - 110px), max(110px, calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2)));
|
|
41808
41805
|
transform: translateX(-50%);
|
|
41809
41806
|
border: 8px solid transparent;
|
|
41810
41807
|
border-top-color: white;
|
|
41811
41808
|
z-index: 1001;
|
|
41812
41809
|
pointer-events: none;
|
|
41813
41810
|
|
|
41814
|
-
/* Add delay */
|
|
41815
41811
|
opacity: 0;
|
|
41816
41812
|
animation: showTooltip 0.3s ease-in-out 0.5s forwards;
|
|
41817
41813
|
}
|
|
@@ -42315,6 +42311,16 @@ const CheckboxWrapper = styled.div`
|
|
|
42315
42311
|
height: 100%;
|
|
42316
42312
|
|
|
42317
42313
|
${tooltipStyles$1}
|
|
42314
|
+
|
|
42315
|
+
&[data-tooltip]:hover::before {
|
|
42316
|
+
left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
|
|
42317
|
+
z-index: 1002;
|
|
42318
|
+
}
|
|
42319
|
+
|
|
42320
|
+
&[data-tooltip]:hover::after {
|
|
42321
|
+
left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
|
|
42322
|
+
z-index: 1003;
|
|
42323
|
+
}
|
|
42318
42324
|
`;
|
|
42319
42325
|
const CellContentWrapper = styled.div`
|
|
42320
42326
|
display: flex;
|
|
@@ -42322,8 +42328,21 @@ const CellContentWrapper = styled.div`
|
|
|
42322
42328
|
width: 100%;
|
|
42323
42329
|
height: 100%;
|
|
42324
42330
|
position: relative;
|
|
42331
|
+
overflow: hidden;
|
|
42332
|
+
text-overflow: ellipsis;
|
|
42333
|
+
white-space: nowrap;
|
|
42325
42334
|
|
|
42326
42335
|
${tooltipStyles$1}
|
|
42336
|
+
|
|
42337
|
+
&[data-tooltip]:hover::before {
|
|
42338
|
+
left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
|
|
42339
|
+
z-index: 1002;
|
|
42340
|
+
}
|
|
42341
|
+
|
|
42342
|
+
&[data-tooltip]:hover::after {
|
|
42343
|
+
left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
|
|
42344
|
+
z-index: 1003;
|
|
42345
|
+
}
|
|
42327
42346
|
`;
|
|
42328
42347
|
const CheckboxInput = styled.input`
|
|
42329
42348
|
width: 18px;
|
|
@@ -42357,7 +42376,7 @@ const EditableCell = styled.div`
|
|
|
42357
42376
|
display: flex;
|
|
42358
42377
|
gap: 10px;
|
|
42359
42378
|
align-items: center;
|
|
42360
|
-
justify-content:
|
|
42379
|
+
justify-content: flex-start;
|
|
42361
42380
|
`;
|
|
42362
42381
|
const PencilButton = styled.button`
|
|
42363
42382
|
display: flex;
|
|
@@ -43964,26 +43983,30 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
43964
43983
|
return /*#__PURE__*/React$1.createElement(TableCell, {
|
|
43965
43984
|
key: `${column.key}-${rowIndex}`,
|
|
43966
43985
|
ref: el => {
|
|
43967
|
-
if (
|
|
43968
|
-
|
|
43969
|
-
|
|
43970
|
-
|
|
43971
|
-
|
|
43972
|
-
|
|
43973
|
-
|
|
43974
|
-
|
|
43975
|
-
|
|
43976
|
-
|
|
43977
|
-
|
|
43978
|
-
|
|
43979
|
-
|
|
43980
|
-
|
|
43981
|
-
|
|
43982
|
-
|
|
43986
|
+
if (isTextBasedField && el && formattedValue) {
|
|
43987
|
+
const hasOverflow = shouldShowTooltip(el);
|
|
43988
|
+
const tooltipTextToShow = hasOverflow ? String(formattedValue) : fieldTooltip;
|
|
43989
|
+
if (tooltipTextToShow) {
|
|
43990
|
+
try {
|
|
43991
|
+
const rect = el.getBoundingClientRect();
|
|
43992
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
43993
|
+
const tooltipInfo = calculateTooltipOffset(tooltipTextToShow, true);
|
|
43994
|
+
if (tooltipInfo) {
|
|
43995
|
+
const {
|
|
43996
|
+
offset,
|
|
43997
|
+
height
|
|
43998
|
+
} = tooltipInfo;
|
|
43999
|
+
el.style.setProperty("--cell-top", `${rect.top}px`);
|
|
44000
|
+
el.style.setProperty("--cell-left", `${rect.left}px`);
|
|
44001
|
+
el.style.setProperty("--cell-width", `${rect.width}px`);
|
|
44002
|
+
el.style.setProperty("--cell-offset", `${offset}px`);
|
|
44003
|
+
el.style.setProperty("--cell-height", `${height}px`);
|
|
44004
|
+
el.setAttribute("data-tooltip", tooltipTextToShow);
|
|
44005
|
+
}
|
|
43983
44006
|
}
|
|
44007
|
+
} catch (e) {
|
|
44008
|
+
console.warn("Error setting cell tooltip:", e);
|
|
43984
44009
|
}
|
|
43985
|
-
} catch (e) {
|
|
43986
|
-
console.warn("Error setting cell tooltip:", e);
|
|
43987
44010
|
}
|
|
43988
44011
|
}
|
|
43989
44012
|
},
|
|
@@ -43991,7 +44014,7 @@ const TableBody = /*#__PURE__*/forwardRef(({
|
|
|
43991
44014
|
$color: column.color,
|
|
43992
44015
|
$minWidth: column.minWidth,
|
|
43993
44016
|
$maxWidth: column.maxWidth
|
|
43994
|
-
}, fieldTooltip ? /*#__PURE__*/React$1.createElement(CellContentWrapper, {
|
|
44017
|
+
}, fieldTooltip && !isTextBasedField ? /*#__PURE__*/React$1.createElement(CellContentWrapper, {
|
|
43995
44018
|
ref: el => applyTooltip(el, fieldTooltip)
|
|
43996
44019
|
}, renderCellContent(formattedValue, isTextBasedField, shouldShimmer)) : renderCellContent(formattedValue, isTextBasedField, shouldShimmer));
|
|
43997
44020
|
})), expandable && expandedRows[rowIndex] && /*#__PURE__*/React$1.createElement(ExpandedRow, {
|