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.js CHANGED
@@ -41797,31 +41797,27 @@ const TableCell = styled__default["default"].td`
41797
41797
  0 -2px 8px rgba(0, 0, 0, 0.15),
41798
41798
  0 2px 8px rgba(0, 0, 0, 0.15);
41799
41799
 
41800
- /* Position above the element - using dynamic offset */
41801
41800
  top: calc(var(--cell-top, 0px) - var(--cell-offset, 40px));
41802
- left: calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2);
41801
+ left: min(calc(100vw - 110px), max(110px, calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2)));
41803
41802
  transform: translateX(-50%);
41804
41803
 
41805
- /* Add delay */
41806
41804
  opacity: 0;
41807
41805
  animation: showTooltip 0.3s ease-in-out 0.5s forwards;
41808
41806
  }
41809
41807
 
41810
- /* Tooltip arrow */
41811
41808
  &[data-tooltip]:hover::after {
41812
41809
  content: "";
41813
41810
  position: fixed;
41814
41811
  top: calc(
41815
41812
  var(--cell-top, 0px) - var(--cell-offset, 40px) + var(--cell-height, 50px)
41816
41813
  );
41817
- left: calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2);
41814
+ left: min(calc(100vw - 110px), max(110px, calc(var(--cell-left, 0px) + var(--cell-width, 0px) / 2)));
41818
41815
  transform: translateX(-50%);
41819
41816
  border: 8px solid transparent;
41820
41817
  border-top-color: white;
41821
41818
  z-index: 1001;
41822
41819
  pointer-events: none;
41823
41820
 
41824
- /* Add delay */
41825
41821
  opacity: 0;
41826
41822
  animation: showTooltip 0.3s ease-in-out 0.5s forwards;
41827
41823
  }
@@ -42325,6 +42321,16 @@ const CheckboxWrapper = styled__default["default"].div`
42325
42321
  height: 100%;
42326
42322
 
42327
42323
  ${tooltipStyles$1}
42324
+
42325
+ &[data-tooltip]:hover::before {
42326
+ left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
42327
+ z-index: 1002;
42328
+ }
42329
+
42330
+ &[data-tooltip]:hover::after {
42331
+ left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
42332
+ z-index: 1003;
42333
+ }
42328
42334
  `;
42329
42335
  const CellContentWrapper = styled__default["default"].div`
42330
42336
  display: flex;
@@ -42332,8 +42338,21 @@ const CellContentWrapper = styled__default["default"].div`
42332
42338
  width: 100%;
42333
42339
  height: 100%;
42334
42340
  position: relative;
42341
+ overflow: hidden;
42342
+ text-overflow: ellipsis;
42343
+ white-space: nowrap;
42335
42344
 
42336
42345
  ${tooltipStyles$1}
42346
+
42347
+ &[data-tooltip]:hover::before {
42348
+ left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
42349
+ z-index: 1002;
42350
+ }
42351
+
42352
+ &[data-tooltip]:hover::after {
42353
+ left: min(calc(100vw - 110px), max(110px, calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2)));
42354
+ z-index: 1003;
42355
+ }
42337
42356
  `;
42338
42357
  const CheckboxInput = styled__default["default"].input`
42339
42358
  width: 18px;
@@ -42367,7 +42386,7 @@ const EditableCell = styled__default["default"].div`
42367
42386
  display: flex;
42368
42387
  gap: 10px;
42369
42388
  align-items: center;
42370
- justify-content: end;
42389
+ justify-content: flex-start;
42371
42390
  `;
42372
42391
  const PencilButton = styled__default["default"].button`
42373
42392
  display: flex;
@@ -43974,26 +43993,30 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
43974
43993
  return /*#__PURE__*/React__default["default"].createElement(TableCell, {
43975
43994
  key: `${column.key}-${rowIndex}`,
43976
43995
  ref: el => {
43977
- if (!fieldTooltip && isTextBasedField && el && formattedValue && shouldShowTooltip(el)) {
43978
- try {
43979
- const rect = el.getBoundingClientRect();
43980
- if (rect.width > 0 && rect.height > 0) {
43981
- const tooltipInfo = calculateTooltipOffset(String(formattedValue), true);
43982
- if (tooltipInfo) {
43983
- const {
43984
- offset,
43985
- height
43986
- } = tooltipInfo;
43987
- el.style.setProperty("--cell-top", `${rect.top}px`);
43988
- el.style.setProperty("--cell-left", `${rect.left}px`);
43989
- el.style.setProperty("--cell-width", `${rect.width}px`);
43990
- el.style.setProperty("--cell-offset", `${offset}px`);
43991
- el.style.setProperty("--cell-height", `${height}px`);
43992
- el.setAttribute("data-tooltip", String(formattedValue));
43996
+ if (isTextBasedField && el && formattedValue) {
43997
+ const hasOverflow = shouldShowTooltip(el);
43998
+ const tooltipTextToShow = hasOverflow ? String(formattedValue) : fieldTooltip;
43999
+ if (tooltipTextToShow) {
44000
+ try {
44001
+ const rect = el.getBoundingClientRect();
44002
+ if (rect.width > 0 && rect.height > 0) {
44003
+ const tooltipInfo = calculateTooltipOffset(tooltipTextToShow, true);
44004
+ if (tooltipInfo) {
44005
+ const {
44006
+ offset,
44007
+ height
44008
+ } = tooltipInfo;
44009
+ el.style.setProperty("--cell-top", `${rect.top}px`);
44010
+ el.style.setProperty("--cell-left", `${rect.left}px`);
44011
+ el.style.setProperty("--cell-width", `${rect.width}px`);
44012
+ el.style.setProperty("--cell-offset", `${offset}px`);
44013
+ el.style.setProperty("--cell-height", `${height}px`);
44014
+ el.setAttribute("data-tooltip", tooltipTextToShow);
44015
+ }
43993
44016
  }
44017
+ } catch (e) {
44018
+ console.warn("Error setting cell tooltip:", e);
43994
44019
  }
43995
- } catch (e) {
43996
- console.warn("Error setting cell tooltip:", e);
43997
44020
  }
43998
44021
  }
43999
44022
  },
@@ -44001,7 +44024,7 @@ const TableBody = /*#__PURE__*/React$1.forwardRef(({
44001
44024
  $color: column.color,
44002
44025
  $minWidth: column.minWidth,
44003
44026
  $maxWidth: column.maxWidth
44004
- }, fieldTooltip ? /*#__PURE__*/React__default["default"].createElement(CellContentWrapper, {
44027
+ }, fieldTooltip && !isTextBasedField ? /*#__PURE__*/React__default["default"].createElement(CellContentWrapper, {
44005
44028
  ref: el => applyTooltip(el, fieldTooltip)
44006
44029
  }, renderCellContent(formattedValue, isTextBasedField, shouldShimmer)) : renderCellContent(formattedValue, isTextBasedField, shouldShimmer));
44007
44030
  })), expandable && expandedRows[rowIndex] && /*#__PURE__*/React__default["default"].createElement(ExpandedRow, {