lecom-ui 5.4.11 → 5.4.13

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.
@@ -96,13 +96,14 @@ function DataTable({
96
96
  const lastColumnFixed = rowsElem.length - 1 === rowElemIndex;
97
97
  const lastRow = listRows.length - 1 === listRowIndex;
98
98
  const currentElemIsTh = currentElem.tagName === "TH";
99
+ const hasTruncate = currentElem.style.overflow === "hidden" && currentElem.style.textOverflow === "ellipsis";
99
100
  const boxShadowWidth = currentElemIsTh ? "-1.5px" : "-0.5px";
100
101
  const boxShadow = `#c9c9c9 0px ${lastRow ? "0px" : boxShadowWidth} 0px inset`;
101
102
  currentElem.style.position = "sticky";
102
103
  currentElem.style.left = `${beforeElemWidth + beforeElemLeft}px`;
103
104
  currentElem.style.boxShadow = boxShadow;
104
- if (currentElemIsTh) {
105
- currentElem.style.backgroundColor = "#f9fafb";
105
+ if (currentElemIsTh || hasTruncate) {
106
+ currentElem.style.backgroundColor = currentElemIsTh ? "#f9fafb" : "#ffffff";
106
107
  }
107
108
  currentElem.style.zIndex = "1";
108
109
  if (lastColumnFixed) {
@@ -110,6 +111,14 @@ function DataTable({
110
111
  }
111
112
  });
112
113
  });
114
+ const allCells = document.querySelectorAll("table#data-table td");
115
+ allCells.forEach((cell) => {
116
+ const cellElem = cell;
117
+ const hasTruncate = cellElem.style.overflow === "hidden" && cellElem.style.textOverflow === "ellipsis";
118
+ if (hasTruncate && !cellElem.hasAttribute("data-fixed")) {
119
+ cellElem.style.backgroundColor = "#ffffff";
120
+ }
121
+ });
113
122
  }
114
123
  }, [isLoading, sorting]);
115
124
  const throttle = React.useCallback(
package/dist/index.d.ts CHANGED
@@ -992,7 +992,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
992
992
  declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
993
993
 
994
994
  declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
995
- declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement | HTMLLabelElement | HTMLParagraphElement | HTMLHeadingElement | HTMLInputElement | HTMLUListElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement>, "id" | "onResize"> & {
995
+ declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement | HTMLLabelElement | HTMLInputElement | HTMLUListElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement>, "id" | "onResize"> & {
996
996
  className?: string;
997
997
  collapsedSize?: number | undefined;
998
998
  collapsible?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "5.4.11",
3
+ "version": "5.4.13",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",