@meta-1/design 0.0.207 → 0.0.209
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/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ILoadingOverlayParams, type INoRowsOverlayParams } from "ag-grid-community";
|
|
2
2
|
|
|
3
|
+
import { Empty } from "../empty";
|
|
4
|
+
|
|
3
5
|
export const LoadingOverlay = (_params: ILoadingOverlayParams) => {
|
|
4
6
|
return (
|
|
5
7
|
<div className="flex h-full w-full items-center justify-center bg-background/80 backdrop-blur-sm">
|
|
@@ -13,14 +15,11 @@ export const LoadingOverlay = (_params: ILoadingOverlayParams) => {
|
|
|
13
15
|
);
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
export const NoRowsOverlay = (params: INoRowsOverlayParams) => {
|
|
17
|
-
|
|
18
|
-
const message = (params as any).noRowsMessage || "暂无数据";
|
|
18
|
+
export const NoRowsOverlay = (params: INoRowsOverlayParams & { noRowsMessage?: string }) => {
|
|
19
|
+
const message = params.noRowsMessage;
|
|
19
20
|
return (
|
|
20
|
-
<div className="flex h-
|
|
21
|
-
<
|
|
22
|
-
<div className="text-muted-foreground">{message}</div>
|
|
23
|
-
</div>
|
|
21
|
+
<div className="flex min-h-[150px] w-full items-center justify-center">
|
|
22
|
+
<Empty text={message} />
|
|
24
23
|
</div>
|
|
25
24
|
);
|
|
26
25
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
@import "../../../assets/style/theme.css";
|
|
2
2
|
|
|
3
3
|
/* 自定义样式已移除,后续按需添加 */
|
|
4
|
-
.ag-cell,
|
|
5
|
-
.ag-full-width-row .ag-cell-wrapper.ag-row-group {
|
|
4
|
+
.ag-cell,
|
|
5
|
+
.ag-full-width-row .ag-cell-wrapper.ag-row-group {
|
|
6
6
|
--ag-internal-content-line-height: 24px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/* 隐藏最后一列后面的分割线 */
|
|
10
|
-
|
|
11
|
-
:where(.ag-ltr)
|
|
12
|
-
|
|
10
|
+
.ag-header-cell:last-child:after,
|
|
11
|
+
:where(.ag-ltr)
|
|
12
|
+
.ag-header-group-cell:last-child:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after {
|
|
13
13
|
visibility: hidden;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* 设置 cell 的 padding */
|
|
17
|
-
|
|
18
|
-
:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group {
|
|
17
|
+
.ag-cell:not(.ag-cell-inline-editing),
|
|
18
|
+
:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group {
|
|
19
19
|
padding-left: calc(
|
|
20
20
|
var(--ag-cell-horizontal-padding) -
|
|
21
21
|
1px +
|
|
@@ -28,8 +28,32 @@
|
|
|
28
28
|
font-size: 14px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
.ag-cell[col-id="actions"] .ag-cell-value:not(.ag-allow-overflow),
|
|
31
|
+
.ag-cell-value:not(.ag-allow-overflow),
|
|
33
32
|
.ag-cell[col-id="actions"] .ag-group-value {
|
|
34
33
|
overflow: visible;
|
|
35
|
-
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ag-root-wrapper,
|
|
37
|
+
.ag-body-viewport,
|
|
38
|
+
.ag-body-viewport-wrapper,
|
|
39
|
+
.ag-center-cols-container,
|
|
40
|
+
.ag-center-cols-viewport {
|
|
41
|
+
min-height: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ag-layout-auto-height .ag-center-cols-container,
|
|
45
|
+
.ag-layout-auto-height .ag-center-cols-viewport,
|
|
46
|
+
.ag-layout-print .ag-center-cols-container,
|
|
47
|
+
.ag-layout-print .ag-center-cols-viewport {
|
|
48
|
+
min-height: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.data-grid:has(.ag-overlay-no-rows-wrapper) .ag-center-cols-container,
|
|
52
|
+
.data-grid:has(.ag-overlay-no-rows-wrapper) .ag-center-cols-viewport {
|
|
53
|
+
min-height: 150px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.data-grid:has(.ag-overlay-no-rows-wrapper).ag-layout-auto-height .ag-center-cols-container,
|
|
57
|
+
.data-grid:has(.ag-overlay-no-rows-wrapper).ag-layout-auto-height .ag-center-cols-viewport {
|
|
58
|
+
min-height: 150px;
|
|
59
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
2
|
|
|
3
3
|
import { TabsContent, TabsList, TabsTrigger, Tabs as UITabs } from "../../ui/tabs";
|
|
4
4
|
|
|
5
5
|
export type TabsItem = {
|
|
6
|
-
label:
|
|
6
|
+
label: ReactNode;
|
|
7
7
|
value: string;
|
|
8
|
-
content?:
|
|
8
|
+
content?: ReactNode;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export type TabsProps = {
|