lecom-ui 5.4.12 → 5.4.14
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/components/DataTable/DataTable.js +33 -0
- package/dist/index.d.ts +10 -10
- package/package.json +1 -1
|
@@ -111,6 +111,39 @@ function DataTable({
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
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
|
+
});
|
|
122
|
+
const allRows = document.querySelectorAll("table#data-table tbody tr");
|
|
123
|
+
allRows.forEach((row) => {
|
|
124
|
+
const rowElem = row;
|
|
125
|
+
rowElem.addEventListener("mouseenter", () => {
|
|
126
|
+
const cells = rowElem.querySelectorAll("td");
|
|
127
|
+
cells.forEach((cell) => {
|
|
128
|
+
const cellElem = cell;
|
|
129
|
+
const hasTruncate = cellElem.style.overflow === "hidden" && cellElem.style.textOverflow === "ellipsis";
|
|
130
|
+
if (hasTruncate || cellElem.hasAttribute("data-fixed")) {
|
|
131
|
+
cellElem.style.backgroundColor = "#f3f4f6";
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
rowElem.addEventListener("mouseleave", () => {
|
|
136
|
+
const cells = rowElem.querySelectorAll("td");
|
|
137
|
+
cells.forEach((cell) => {
|
|
138
|
+
const cellElem = cell;
|
|
139
|
+
const hasTruncate = cellElem.style.overflow === "hidden" && cellElem.style.textOverflow === "ellipsis";
|
|
140
|
+
const isTh = cellElem.tagName === "TH";
|
|
141
|
+
if (hasTruncate || cellElem.hasAttribute("data-fixed")) {
|
|
142
|
+
cellElem.style.backgroundColor = isTh ? "#f9fafb" : "#ffffff";
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
});
|
|
114
147
|
}
|
|
115
148
|
}, [isLoading, sorting]);
|
|
116
149
|
const throttle = React.useCallback(
|
package/dist/index.d.ts
CHANGED
|
@@ -785,9 +785,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
|
|
|
785
785
|
}
|
|
786
786
|
|
|
787
787
|
declare const inputVariants: (props?: ({
|
|
788
|
-
variant?: "
|
|
789
|
-
size?: "
|
|
790
|
-
radius?: "
|
|
788
|
+
variant?: "default" | "filled" | "borderless" | null | undefined;
|
|
789
|
+
size?: "default" | "small" | "large" | null | undefined;
|
|
790
|
+
radius?: "default" | "small" | "large" | "full" | null | undefined;
|
|
791
791
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
792
792
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
|
|
793
793
|
sufix?: React$1.ReactNode;
|
|
@@ -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 |
|
|
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;
|
|
@@ -1158,10 +1158,10 @@ declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.
|
|
|
1158
1158
|
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1159
1159
|
|
|
1160
1160
|
declare const textareaVariants: (props?: ({
|
|
1161
|
-
variant?: "
|
|
1162
|
-
size?: "
|
|
1163
|
-
radius?: "
|
|
1164
|
-
resize?: "
|
|
1161
|
+
variant?: "default" | "filled" | "borderless" | null | undefined;
|
|
1162
|
+
size?: "default" | "small" | "large" | null | undefined;
|
|
1163
|
+
radius?: "default" | "small" | "large" | "full" | null | undefined;
|
|
1164
|
+
resize?: "default" | "both" | "horizontal" | "vertical" | "vertical-limited" | null | undefined;
|
|
1165
1165
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1166
1166
|
interface TextareaProps extends React$1.ComponentProps<'textarea'>, VariantProps<typeof textareaVariants> {
|
|
1167
1167
|
}
|
|
@@ -1300,7 +1300,7 @@ declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dial
|
|
|
1300
1300
|
declare const SheetPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
1301
1301
|
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1302
1302
|
declare const sheetVariants: (props?: ({
|
|
1303
|
-
side?: "
|
|
1303
|
+
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
1304
1304
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1305
1305
|
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
1306
1306
|
}
|
|
@@ -1344,7 +1344,7 @@ interface DateInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
1344
1344
|
declare const DateInput: React$1.ForwardRefExoticComponent<DateInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1345
1345
|
|
|
1346
1346
|
declare const badgeVariants: (props?: ({
|
|
1347
|
-
variant?: "
|
|
1347
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
1348
1348
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1349
1349
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
1350
1350
|
}
|