lecom-ui 4.8.3 → 4.8.4
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.
|
@@ -17,6 +17,7 @@ function DataTable({
|
|
|
17
17
|
className,
|
|
18
18
|
noScroll,
|
|
19
19
|
size = "middle",
|
|
20
|
+
skeleton,
|
|
20
21
|
onIsSelected
|
|
21
22
|
}) {
|
|
22
23
|
const [sorting, setSorting] = React.useState([]);
|
|
@@ -101,7 +102,8 @@ function DataTable({
|
|
|
101
102
|
noResults,
|
|
102
103
|
onIsSelected,
|
|
103
104
|
isLoading,
|
|
104
|
-
size
|
|
105
|
+
size,
|
|
106
|
+
skeleton
|
|
105
107
|
}
|
|
106
108
|
);
|
|
107
109
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
@@ -9,6 +9,7 @@ function Table({
|
|
|
9
9
|
columns,
|
|
10
10
|
noResults,
|
|
11
11
|
size = "middle",
|
|
12
|
+
skeleton,
|
|
12
13
|
onIsSelected
|
|
13
14
|
}) {
|
|
14
15
|
const styleColumn = (meta, elem) => {
|
|
@@ -26,8 +27,11 @@ function Table({
|
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
29
|
const getFixed = (meta) => meta.fixed;
|
|
29
|
-
const arrSkeleton = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
|
|
30
30
|
if (isLoading) {
|
|
31
|
+
if (skeleton) {
|
|
32
|
+
return skeleton;
|
|
33
|
+
}
|
|
34
|
+
const arrSkeleton = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
|
|
31
35
|
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-4" }, arrSkeleton.map((id) => /* @__PURE__ */ React.createElement(
|
|
32
36
|
Skeleton,
|
|
33
37
|
{
|
package/dist/index.d.ts
CHANGED
|
@@ -379,6 +379,7 @@ interface DataTableProps<TData, TValue> {
|
|
|
379
379
|
className?: string;
|
|
380
380
|
noScroll?: boolean;
|
|
381
381
|
size?: 'small' | 'middle';
|
|
382
|
+
skeleton?: React.ReactNode;
|
|
382
383
|
onIsSelected?: (row: Row$1<TData>) => boolean;
|
|
383
384
|
}
|
|
384
385
|
interface Row<TData> {
|
|
@@ -410,10 +411,11 @@ interface TableProps<TData, TValue> {
|
|
|
410
411
|
columns: Column<TData, TValue>[];
|
|
411
412
|
noResults?: React.ReactNode;
|
|
412
413
|
size?: 'small' | 'middle';
|
|
414
|
+
skeleton?: React.ReactNode;
|
|
413
415
|
onIsSelected?: (row: Row$1<TData>) => boolean;
|
|
414
416
|
}
|
|
415
417
|
|
|
416
|
-
declare function DataTable<TData, TValue>({ isLoading, columns, data, noResults, pagination, vwDiff, vhDiff, className, noScroll, size, onIsSelected, }: DataTableProps<TData, TValue>): React$1.JSX.Element;
|
|
418
|
+
declare function DataTable<TData, TValue>({ isLoading, columns, data, noResults, pagination, vwDiff, vhDiff, className, noScroll, size, skeleton, onIsSelected, }: DataTableProps<TData, TValue>): React$1.JSX.Element;
|
|
417
419
|
declare namespace DataTable {
|
|
418
420
|
var displayName: string;
|
|
419
421
|
}
|
|
@@ -569,9 +571,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
|
|
|
569
571
|
}
|
|
570
572
|
|
|
571
573
|
declare const inputVariants: (props?: ({
|
|
572
|
-
variant?: "
|
|
573
|
-
size?: "
|
|
574
|
-
radius?: "
|
|
574
|
+
variant?: "filled" | "default" | "borderless" | null | undefined;
|
|
575
|
+
size?: "small" | "large" | "default" | null | undefined;
|
|
576
|
+
radius?: "small" | "large" | "default" | null | undefined;
|
|
575
577
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
576
578
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
|
|
577
579
|
sufix?: React$1.ReactNode;
|