@sdata/web-vue 1.10.0 → 1.11.1
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/sd.css +148 -952
- package/dist/sd.min.css +1 -1
- package/es/_components/input-label/style/input-label.scss +11 -51
- package/es/_components/select-view/select-view.d.ts +1 -1
- package/es/_components/select-view/style/index.css +0 -84
- package/es/_components/virtual-list/interface.d.ts +10 -1
- package/es/{table/hooks/use-table-virtual-size.d.ts → _components/virtual-list/use-virtual-size.d.ts} +4 -2
- package/es/{table/hooks/use-table-virtual-size.js → _components/virtual-list/use-virtual-size.js} +17 -20
- package/es/_components/virtual-list/virtual-list.js +64 -2
- package/es/_components/virtual-list/virtual-list.vue.d.ts +208 -0
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_lang.js +277 -5
- package/es/_utils/clipboard.js +2 -1
- package/es/auto-complete/auto-complete.d.ts +1 -1
- package/es/auto-complete/index.d.ts +24 -15
- package/es/auto-complete/style/index.css +0 -16
- package/es/auto-complete/style/index.scss +11 -26
- package/es/badge/style/index.scss +11 -41
- package/es/button/style/index.css +35 -445
- package/es/button/style/index.scss +57 -332
- package/es/card/style/index.scss +18 -52
- package/es/carousel/index.d.ts +1 -0
- package/es/cascader/cascader-panel.vue.d.ts +1 -1
- package/es/cascader/cascader.vue.d.ts +3 -3
- package/es/cascader/index.d.ts +10 -10
- package/es/cascader/interface.d.ts +5 -0
- package/es/color-picker/style/index.scss +17 -99
- package/es/config-provider/config-provider.vue.d.ts +1 -1
- package/es/config-provider/index.d.ts +4 -3
- package/es/date-picker/index.d.ts +21 -14
- package/es/date-picker/panels/date/index.vue.d.ts +1 -1
- package/es/date-picker/panels/week/index.vue.d.ts +7 -7
- package/es/date-picker/picker.vue.d.ts +1 -1
- package/es/date-picker/range-picker.vue.d.ts +1 -1
- package/es/descriptions/descriptions.d.ts +1 -1
- package/es/descriptions/index.d.ts +4 -4
- package/es/descriptions/style/index.scss +18 -63
- package/es/form/style/index.css +12 -176
- package/es/form/style/status.scss +36 -73
- package/es/index.css +148 -952
- package/es/index.d.ts +21 -20
- package/es/input/style/input.scss +14 -66
- package/es/input-number/index.d.ts +5 -0
- package/es/input-tag/style/index.css +0 -84
- package/es/input-tag/style/input-tag.scss +16 -170
- package/es/list/style/index.scss +12 -42
- package/es/menu/index.d.ts +8 -0
- package/es/menu/style/index.css +0 -178
- package/es/menu/style/index.scss +36 -139
- package/es/pagination/index.d.ts +3 -3
- package/es/pagination/interface.d.ts +2 -1
- package/es/pagination/page-options.js +1 -1
- package/es/pagination/page-options.vue.d.ts +72 -71
- package/es/pagination/page-options.vue_vue_type_script_lang.js +6 -0
- package/es/pagination/pagination.d.ts +3 -3
- package/es/pagination/style/index.css +0 -12
- package/es/pagination/style/index.scss +19 -76
- package/es/radio/index.d.ts +3 -0
- package/es/result/style/index.css +0 -16
- package/es/result/style/index.scss +12 -34
- package/es/select/index.d.ts +9 -9
- package/es/select/interface.d.ts +2 -1
- package/es/select/select.d.ts +3 -3
- package/es/slider/index.d.ts +6 -3
- package/es/slider/slider.vue.d.ts +1 -1
- package/es/steps/index.d.ts +2 -0
- package/es/switch/index.d.ts +3 -0
- package/es/table/context.d.ts +1 -1
- package/es/table/hooks/use-column-resize.d.ts +2 -3
- package/es/table/hooks/use-column-resize.js +48 -21
- package/es/table/hooks/use-drag.d.ts +4 -2
- package/es/table/hooks/use-drag.js +16 -2
- package/es/table/index.d.ts +22 -34
- package/es/table/interface.d.ts +21 -2
- package/es/table/style/index.css +97 -21
- package/es/table/style/index.scss +137 -125
- package/es/table/table-operation-td.d.ts +2 -2
- package/es/table/table-operation-td.js +4 -5
- package/es/table/table-operation-th.js +4 -4
- package/es/table/table-tbody.js +1 -1
- package/es/table/table-td.js +5 -6
- package/es/table/table-th.js +25 -24
- package/es/table/table-thead.js +1 -1
- package/es/table/table-tr.js +1 -1
- package/es/table/table.d.ts +12 -16
- package/es/table/table.js +399 -190
- package/es/tabs/index.d.ts +1 -0
- package/es/tabs/style/index.scss +53 -135
- package/es/tag/index.d.ts +3 -3
- package/es/tag/style/index.css +0 -84
- package/es/tag/style/index.scss +19 -146
- package/es/tag/tag.vue.d.ts +1 -1
- package/es/theme-provider/index.d.ts +9 -9
- package/es/time-picker/index.d.ts +1 -0
- package/es/timeline/index.d.ts +1 -0
- package/es/transfer/index.d.ts +1 -0
- package/es/transfer/interface.d.ts +1 -1
- package/es/tree/hooks/use-tree-data.d.ts +17 -29
- package/es/tree/index.d.ts +6 -1
- package/es/tree/interface.d.ts +2 -0
- package/es/tree/tree.js +1 -1
- package/es/tree/tree.vue.d.ts +3561 -13
- package/es/tree/tree.vue_vue_type_script_lang.js +21 -9
- package/es/tree-select/hooks/use-selected-state.js +3 -1
- package/es/tree-select/index.d.ts +3 -0
- package/es/tree-select/tree-select.vue.d.ts +1367 -3
- package/json/vetur-attributes.json +1 -6
- package/json/vetur-tags.json +0 -1
- package/json/web-types.json +7 -11
- package/package.json +1 -1
- package/es/style/theme/legacy-less-var.scss +0 -15
- package/es/table/table-col-group.js +0 -21
- package/es/table/table-col-group.vue_vue_type_script_lang.js +0 -32
- package/es/table/table-legacy-virtual-list.js +0 -47
- package/es/table/table-legacy-virtual-list.vue.d.ts +0 -156
- package/es/table/table-legacy-virtual-list.vue_vue_type_script_lang.js +0 -148
- package/es/table/table-virtual-list-item.d.ts +0 -22
- package/es/table/table-virtual-list-item.js +0 -37
package/es/table/interface.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Simplify } from 'type-fest';
|
|
1
2
|
import { CSSProperties, RenderFunction, Slots, VNodeChild } from 'vue';
|
|
2
3
|
import { BaseType, ClassName, Data } from '../_utils/types';
|
|
3
4
|
import { TriggerProps } from '../trigger';
|
|
4
5
|
export declare const TABLE_PAGE_POSITION: readonly ["tl", "top", "tr", "bl", "bottom", "br"];
|
|
5
6
|
export type TablePagePosition = (typeof TABLE_PAGE_POSITION)[number];
|
|
6
7
|
export interface TableData {
|
|
7
|
-
key?:
|
|
8
|
+
key?: BaseType;
|
|
8
9
|
expand?: string | RenderFunction;
|
|
9
10
|
children?: TableData[];
|
|
10
11
|
disabled?: boolean;
|
|
@@ -13,7 +14,7 @@ export interface TableData {
|
|
|
13
14
|
}
|
|
14
15
|
export interface TableDataWithRaw {
|
|
15
16
|
raw: TableData;
|
|
16
|
-
key:
|
|
17
|
+
key: BaseType;
|
|
17
18
|
disabled?: boolean;
|
|
18
19
|
expand?: string | RenderFunction;
|
|
19
20
|
children?: TableDataWithRaw[];
|
|
@@ -152,6 +153,24 @@ export interface TableProps {
|
|
|
152
153
|
pagination?: boolean | Data;
|
|
153
154
|
pagePosition?: string;
|
|
154
155
|
}
|
|
156
|
+
export type TableRowKey = string | ((record: TableData) => BaseType);
|
|
157
|
+
export type TableSpanMethodContext = Simplify<{
|
|
158
|
+
record: TableData;
|
|
159
|
+
column: TableColumnData | TableOperationColumn;
|
|
160
|
+
rowIndex: number;
|
|
161
|
+
columnIndex: number;
|
|
162
|
+
}>;
|
|
163
|
+
export type TableSpanMethod = (data: TableSpanMethodContext) => {
|
|
164
|
+
rowspan?: number;
|
|
165
|
+
colspan?: number;
|
|
166
|
+
} | void;
|
|
167
|
+
export type TableLoadMore = (record: TableData, done: (children?: TableData[]) => void) => void;
|
|
168
|
+
export type TableSummaryContext = Simplify<{
|
|
169
|
+
columns: TableColumnData[];
|
|
170
|
+
data: TableData[];
|
|
171
|
+
}>;
|
|
172
|
+
export type TableSummary = boolean | ((params: TableSummaryContext) => TableData[]);
|
|
173
|
+
export type TableSummarySpanMethod = TableSpanMethod;
|
|
155
174
|
export type Sorter = {
|
|
156
175
|
field: string;
|
|
157
176
|
direction: 'ascend' | 'descend';
|
package/es/table/style/index.css
CHANGED
|
@@ -65,11 +65,34 @@
|
|
|
65
65
|
position: absolute;
|
|
66
66
|
top: 0;
|
|
67
67
|
right: -4px;
|
|
68
|
-
z-index:
|
|
68
|
+
z-index: 2;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
69
71
|
width: 8px;
|
|
70
72
|
height: 100%;
|
|
71
73
|
cursor: col-resize;
|
|
72
74
|
}
|
|
75
|
+
.sd-table-column-handle::after {
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: 50%;
|
|
78
|
+
left: 50%;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
width: 2px;
|
|
81
|
+
height: 0;
|
|
82
|
+
background-color: var(--color-neutral-3);
|
|
83
|
+
border-radius: 1px;
|
|
84
|
+
transform: translate(-50%, -50%);
|
|
85
|
+
transition: height 0.15s ease, background-color 0.15s ease;
|
|
86
|
+
content: "";
|
|
87
|
+
}
|
|
88
|
+
.sd-table-column-handle:hover::after {
|
|
89
|
+
height: 40%;
|
|
90
|
+
background-color: rgb(var(--primary-6));
|
|
91
|
+
}
|
|
92
|
+
.sd-table-th-resizing .sd-table-column-handle::after {
|
|
93
|
+
height: 100%;
|
|
94
|
+
background-color: rgb(var(--primary-6));
|
|
95
|
+
}
|
|
73
96
|
.sd-table .sd-spin {
|
|
74
97
|
display: flex;
|
|
75
98
|
flex-direction: column;
|
|
@@ -81,25 +104,47 @@
|
|
|
81
104
|
.sd-table-footer {
|
|
82
105
|
border-radius: 0 0 var(--border-radius-medium) var(--border-radius-medium);
|
|
83
106
|
}
|
|
107
|
+
.sd-table-append {
|
|
108
|
+
background-color: var(--color-bg-2);
|
|
109
|
+
}
|
|
84
110
|
.sd-table-scroll-position-right .sd-table-col-fixed-left-last::after, .sd-table-scroll-position-middle .sd-table-col-fixed-left-last::after {
|
|
85
111
|
box-shadow: inset 6px 0 8px -3px rgba(0, 0, 0, 0.15);
|
|
86
112
|
}
|
|
87
113
|
.sd-table-scroll-position-left .sd-table-col-fixed-right-first::after, .sd-table-scroll-position-middle .sd-table-col-fixed-right-first::after {
|
|
88
114
|
box-shadow: inset -6px 0 8px -3px rgba(0, 0, 0, 0.15);
|
|
89
115
|
}
|
|
90
|
-
.sd-table-layout-fixed .sd-table-element {
|
|
91
|
-
table-layout: fixed;
|
|
92
|
-
}
|
|
93
116
|
.sd-table .sd-table-element {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
94
119
|
width: 100%;
|
|
95
120
|
min-width: 100%;
|
|
96
121
|
margin: 0;
|
|
97
|
-
|
|
98
|
-
|
|
122
|
+
}
|
|
123
|
+
.sd-table-thead, .sd-table-tbody, .sd-table-tfoot-content {
|
|
124
|
+
display: grid;
|
|
125
|
+
grid-template-columns: var(--sd-table-grid-template, minmax(0, 1fr));
|
|
126
|
+
}
|
|
127
|
+
.sd-table-tr, .sd-table-virtual-row {
|
|
128
|
+
display: grid;
|
|
129
|
+
grid-column: 1/-1;
|
|
130
|
+
grid-template-columns: var(--sd-table-grid-template, minmax(0, 1fr));
|
|
131
|
+
}
|
|
132
|
+
.sd-table-tbody > .sd-virtual-list, .sd-table-tbody > .sd-table-body {
|
|
133
|
+
grid-column: 1/-1;
|
|
134
|
+
width: 100%;
|
|
135
|
+
}
|
|
136
|
+
.sd-table-virtual-item {
|
|
137
|
+
display: grid;
|
|
138
|
+
grid-template-columns: var(--sd-table-grid-template, minmax(0, 1fr));
|
|
139
|
+
width: 100%;
|
|
140
|
+
}
|
|
141
|
+
.sd-table-virtual-row-table {
|
|
142
|
+
background-color: var(--color-bg-2);
|
|
99
143
|
}
|
|
100
144
|
.sd-table-th {
|
|
101
145
|
position: relative;
|
|
102
146
|
box-sizing: border-box;
|
|
147
|
+
min-width: 0;
|
|
103
148
|
color: rgb(var(--gray-10));
|
|
104
149
|
font-weight: 500;
|
|
105
150
|
line-height: 1.5715;
|
|
@@ -123,6 +168,7 @@
|
|
|
123
168
|
}
|
|
124
169
|
.sd-table-td {
|
|
125
170
|
box-sizing: border-box;
|
|
171
|
+
min-width: 0;
|
|
126
172
|
color: rgb(var(--gray-10));
|
|
127
173
|
line-height: 1.5715;
|
|
128
174
|
text-align: left;
|
|
@@ -142,6 +188,9 @@
|
|
|
142
188
|
.sd-table-cell {
|
|
143
189
|
display: flex;
|
|
144
190
|
align-items: center;
|
|
191
|
+
width: 100%;
|
|
192
|
+
min-width: 0;
|
|
193
|
+
height: 100%;
|
|
145
194
|
}
|
|
146
195
|
.sd-table-cell-align-right {
|
|
147
196
|
justify-content: flex-end;
|
|
@@ -230,6 +279,9 @@
|
|
|
230
279
|
.sd-table-cell-expand-icon .sd-table-cell-inline-icon {
|
|
231
280
|
display: inline-flex;
|
|
232
281
|
margin-right: 4px;
|
|
282
|
+
padding: 0;
|
|
283
|
+
background: transparent;
|
|
284
|
+
border: 0;
|
|
233
285
|
}
|
|
234
286
|
.sd-table-cell-expand-icon .sd-table-cell-inline-icon .sd-icon-loading {
|
|
235
287
|
color: rgb(var(--primary-6));
|
|
@@ -267,7 +319,6 @@
|
|
|
267
319
|
.sd-table-th.sd-table-operation .sd-table-cell, .sd-table-td.sd-table-operation .sd-table-cell {
|
|
268
320
|
display: flex;
|
|
269
321
|
justify-content: center;
|
|
270
|
-
padding: 0;
|
|
271
322
|
}
|
|
272
323
|
.sd-table-radio, .sd-table-checkbox {
|
|
273
324
|
justify-content: center;
|
|
@@ -296,6 +347,12 @@
|
|
|
296
347
|
.sd-table-cell-with-sorter {
|
|
297
348
|
display: flex;
|
|
298
349
|
align-items: center;
|
|
350
|
+
width: 100%;
|
|
351
|
+
padding: 0;
|
|
352
|
+
color: inherit;
|
|
353
|
+
text-align: inherit;
|
|
354
|
+
background: transparent;
|
|
355
|
+
border: 0;
|
|
299
356
|
cursor: pointer;
|
|
300
357
|
}
|
|
301
358
|
.sd-table-cell-with-sorter:hover {
|
|
@@ -437,10 +494,20 @@
|
|
|
437
494
|
box-shadow: inset -6px 0 8px -3px rgba(0, 0, 0, 0.15);
|
|
438
495
|
}
|
|
439
496
|
.sd-table-header {
|
|
497
|
+
width: 100%;
|
|
498
|
+
min-width: 100%;
|
|
440
499
|
overflow: hidden;
|
|
441
500
|
background-color: var(--color-neutral-2);
|
|
442
501
|
scrollbar-color: transparent transparent;
|
|
443
502
|
}
|
|
503
|
+
.sd-table-header > .sd-table-element {
|
|
504
|
+
width: 100%;
|
|
505
|
+
background-color: inherit;
|
|
506
|
+
}
|
|
507
|
+
.sd-table-header .sd-table-thead {
|
|
508
|
+
width: 100%;
|
|
509
|
+
background-color: inherit;
|
|
510
|
+
}
|
|
444
511
|
.sd-table-header-sticky {
|
|
445
512
|
position: sticky;
|
|
446
513
|
top: 0;
|
|
@@ -468,12 +535,12 @@
|
|
|
468
535
|
border-bottom: 1px solid var(--color-neutral-3);
|
|
469
536
|
}
|
|
470
537
|
.sd-table-border .sd-table-scroll-y .sd-table-body .sd-table-tr:last-of-type .sd-table-td,
|
|
471
|
-
.sd-table-border .sd-table-scroll-y tfoot .sd-table-tr:last-of-type .sd-table-td {
|
|
538
|
+
.sd-table-border .sd-table-scroll-y .sd-table-tfoot-content .sd-table-tr:last-of-type .sd-table-td {
|
|
472
539
|
border-bottom: none;
|
|
473
540
|
}
|
|
474
541
|
.sd-table-border .sd-table-scroll-y .sd-table-body .sd-table-tr:last-of-type .sd-table-td.sd-table-col-fixed-left-last::after, .sd-table-border .sd-table-scroll-y .sd-table-body .sd-table-tr:last-of-type .sd-table-td.sd-table-col-fixed-right-first::after,
|
|
475
|
-
.sd-table-border .sd-table-scroll-y tfoot .sd-table-tr:last-of-type .sd-table-td.sd-table-col-fixed-left-last::after,
|
|
476
|
-
.sd-table-border .sd-table-scroll-y tfoot .sd-table-tr:last-of-type .sd-table-td.sd-table-col-fixed-right-first::after {
|
|
542
|
+
.sd-table-border .sd-table-scroll-y .sd-table-tfoot-content .sd-table-tr:last-of-type .sd-table-td.sd-table-col-fixed-left-last::after,
|
|
543
|
+
.sd-table-border .sd-table-scroll-y .sd-table-tfoot-content .sd-table-tr:last-of-type .sd-table-td.sd-table-col-fixed-right-first::after {
|
|
477
544
|
bottom: 0;
|
|
478
545
|
}
|
|
479
546
|
.sd-table-border .sd-table-tr .sd-table-th {
|
|
@@ -502,7 +569,7 @@
|
|
|
502
569
|
.sd-table-border-header-cell .sd-table-td-resizing:not(.sd-table-tr-expand) {
|
|
503
570
|
border-right-color: rgb(var(--primary-6));
|
|
504
571
|
}
|
|
505
|
-
.sd-table-border.sd-table-border-header-cell thead .sd-table-tr:first-child .sd-table-th:last-child {
|
|
572
|
+
.sd-table-border.sd-table-border-header-cell .sd-table-thead .sd-table-tr:first-child .sd-table-th:last-child {
|
|
506
573
|
border-right: 0;
|
|
507
574
|
}
|
|
508
575
|
.sd-table-border-body-cell .sd-table-td:not(:last-child):not(.sd-table-tr-expand) {
|
|
@@ -525,9 +592,26 @@
|
|
|
525
592
|
background-color: var(--color-fill-1);
|
|
526
593
|
content: "";
|
|
527
594
|
}
|
|
528
|
-
.sd-table .sd-table-tr-draggable {
|
|
595
|
+
.sd-table .sd-table-tr-draggable .sd-table-td {
|
|
529
596
|
cursor: move;
|
|
530
597
|
}
|
|
598
|
+
.sd-table .sd-table-tr-drop-target .sd-table-td {
|
|
599
|
+
position: relative;
|
|
600
|
+
}
|
|
601
|
+
.sd-table .sd-table-tr-drop-target .sd-table-td::before {
|
|
602
|
+
position: absolute;
|
|
603
|
+
top: -1px;
|
|
604
|
+
right: 0;
|
|
605
|
+
left: 0;
|
|
606
|
+
height: 2px;
|
|
607
|
+
background-color: rgb(var(--primary-6));
|
|
608
|
+
border-radius: 1px;
|
|
609
|
+
content: "";
|
|
610
|
+
pointer-events: none;
|
|
611
|
+
}
|
|
612
|
+
.sd-table-dragging .sd-table-td {
|
|
613
|
+
transition: background-color 0.2s ease;
|
|
614
|
+
}
|
|
531
615
|
.sd-table-hover:not(.sd-table-dragging) .sd-table-tr:not(.sd-table-tr-empty):not(.sd-table-tr-summary):hover .sd-table-td:not(.sd-table-col-fixed-left):not(.sd-table-col-fixed-right),
|
|
532
616
|
.sd-table-hover .sd-table-tr-drag .sd-table-td:not(.sd-table-col-fixed-left):not(.sd-table-col-fixed-right) {
|
|
533
617
|
background-color: var(--color-fill-1);
|
|
@@ -569,7 +653,7 @@
|
|
|
569
653
|
height: 0;
|
|
570
654
|
background-color: transparent;
|
|
571
655
|
}
|
|
572
|
-
.sd-table tfoot .sd-table-td {
|
|
656
|
+
.sd-table .sd-table-tfoot-content .sd-table-td {
|
|
573
657
|
background-color: var(--color-neutral-2);
|
|
574
658
|
}
|
|
575
659
|
.sd-table-tr-checked .sd-table-td {
|
|
@@ -647,15 +731,7 @@
|
|
|
647
731
|
.sd-table-size-mini .sd-table-editable-row .sd-table-cell-wrap-value {
|
|
648
732
|
padding: 2px 16px;
|
|
649
733
|
}
|
|
650
|
-
.sd-table-virtualized .sd-table-element {
|
|
651
|
-
table-layout: fixed;
|
|
652
|
-
}
|
|
653
|
-
.sd-table-virtualized div.sd-table-body div.sd-table-tr {
|
|
654
|
-
display: flex;
|
|
655
|
-
}
|
|
656
734
|
.sd-table-virtualized div.sd-table-body div.sd-table-td {
|
|
657
|
-
display: flex;
|
|
658
|
-
flex: 1;
|
|
659
735
|
align-items: center;
|
|
660
736
|
}
|
|
661
737
|
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
@use '@style/theme/index.scss' as global;
|
|
3
3
|
@use 'sass:string';
|
|
4
4
|
@use 'sass:map';
|
|
5
|
-
@use '
|
|
5
|
+
@use 'sass:meta';
|
|
6
6
|
@use '@style/mixins/index.scss' as *;
|
|
7
|
+
@use '@components/table/style/token.scss' as token;
|
|
7
8
|
@use '@components/table/style/token.scss' as *;
|
|
8
9
|
@use '@components/table/style/filters-popup.scss' as *;
|
|
9
10
|
|
|
@@ -14,98 +15,14 @@ $table-cls-tr: string.unquote('#{$table-prefix-cls}-tr');
|
|
|
14
15
|
$table-cls-th: string.unquote('#{$table-prefix-cls}-th');
|
|
15
16
|
$table-cls-td: string.unquote('#{$table-prefix-cls}-td');
|
|
16
17
|
|
|
17
|
-
$
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
'table-border-style': $table-border-style,
|
|
26
|
-
'table-border-width': $table-border-width,
|
|
27
|
-
'table-color-bg-body-cell': $table-color-bg-body-cell,
|
|
28
|
-
'table-color-bg-body-row_active': $table-color-bg-body-row_active,
|
|
29
|
-
'table-color-bg-body-row_active_dark': $table-color-bg-body-row_active_dark,
|
|
30
|
-
'table-color-bg-body-row_hover': $table-color-bg-body-row_hover,
|
|
31
|
-
'table-color-bg-body-sorted-cell': $table-color-bg-body-sorted-cell,
|
|
32
|
-
'table-color-bg-body-stripe-row': $table-color-bg-body-stripe-row,
|
|
33
|
-
'table-color-bg-expand-content': $table-color-bg-expand-content,
|
|
34
|
-
'table-color-bg-expand-content_hover': $table-color-bg-expand-content_hover,
|
|
35
|
-
'table-color-bg-expand-icon': $table-color-bg-expand-icon,
|
|
36
|
-
'table-color-bg-expand-icon_hover': $table-color-bg-expand-icon_hover,
|
|
37
|
-
'table-color-bg-header-cell': $table-color-bg-header-cell,
|
|
38
|
-
'table-color-bg-header-filters-icon_hover': $table-color-bg-header-filters-icon_hover,
|
|
39
|
-
'table-color-bg-header-sorted-cell': $table-color-bg-header-sorted-cell,
|
|
40
|
-
'table-color-bg-header-sorted-cell_hover': $table-color-bg-header-sorted-cell_hover,
|
|
41
|
-
'table-color-bg-tfoot': $table-color-bg-tfoot,
|
|
42
|
-
'table-color-body-background': $table-color-body-background,
|
|
43
|
-
'table-color-border': $table-color-border,
|
|
44
|
-
'table-color-border_resizing': $table-color-border_resizing,
|
|
45
|
-
'table-color-editable-body-cell-border': $table-color-editable-body-cell-border,
|
|
46
|
-
'table-color-expand-icon': $table-color-expand-icon,
|
|
47
|
-
'table-color-expand-icon-border': $table-color-expand-icon-border,
|
|
48
|
-
'table-color-expand-icon-border_hover': $table-color-expand-icon-border_hover,
|
|
49
|
-
'table-color-expand-icon_hover': $table-color-expand-icon_hover,
|
|
50
|
-
'table-color-header-filters-icon': $table-color-header-filters-icon,
|
|
51
|
-
'table-color-header-filters-icon_active': $table-color-header-filters-icon_active,
|
|
52
|
-
'table-color-header-sorter-icon': $table-color-header-sorter-icon,
|
|
53
|
-
'table-color-header-sorter-icon_active': $table-color-header-sorter-icon_active,
|
|
54
|
-
'table-color-header-sorter-icon_next': $table-color-header-sorter-icon_next,
|
|
55
|
-
'table-color-text-body-cell': $table-color-text-body-cell,
|
|
56
|
-
'table-color-text-header-cell': $table-color-text-header-cell,
|
|
57
|
-
'table-filters-icon-bg_hover': $table-filters-icon-bg_hover,
|
|
58
|
-
'table-font-size-expand-button': $table-font-size-expand-button,
|
|
59
|
-
'table-font-size-filters-icon': $table-font-size-filters-icon,
|
|
60
|
-
'table-font-size-header-sorter-icon': $table-font-size-header-sorter-icon,
|
|
61
|
-
'table-font-weight-header-text': $table-font-weight-header-text,
|
|
62
|
-
'table-position-header-sorter-icon-down-top': $table-position-header-sorter-icon-down-top,
|
|
63
|
-
'table-position-header-sorter-icon-left': $table-position-header-sorter-icon-left,
|
|
64
|
-
'table-position-header-sorter-icon-up-top': $table-position-header-sorter-icon-up-top,
|
|
65
|
-
'table-shadow-left': $table-shadow-left,
|
|
66
|
-
'table-shadow-right': $table-shadow-right,
|
|
67
|
-
'table-size-body-min-width': $table-size-body-min-width,
|
|
68
|
-
'table-size-drag-handle-col-width': $table-size-drag-handle-col-width,
|
|
69
|
-
'table-size-expand-button': $table-size-expand-button,
|
|
70
|
-
'table-size-default-font-header-size': $table-size-default-font-header-size,
|
|
71
|
-
'table-size-default-font-size': $table-size-default-font-size,
|
|
72
|
-
'table-size-default-padding-horizontal': $table-size-default-padding-horizontal,
|
|
73
|
-
'table-size-default-padding-vertical': $table-size-default-padding-vertical,
|
|
74
|
-
'table-size-expand-icon-col-width': $table-size-expand-icon-col-width,
|
|
75
|
-
'table-size-filters-width': $table-size-filters-width,
|
|
76
|
-
'table-size-header-sorter-icon-height': $table-size-header-sorter-icon-height,
|
|
77
|
-
'table-size-header-sorter-icon-width': $table-size-header-sorter-icon-width,
|
|
78
|
-
'table-size-large-font-header-size': $table-size-large-font-header-size,
|
|
79
|
-
'table-size-large-font-size': $table-size-large-font-size,
|
|
80
|
-
'table-size-large-padding-horizontal': $table-size-large-padding-horizontal,
|
|
81
|
-
'table-size-large-padding-vertical': $table-size-large-padding-vertical,
|
|
82
|
-
'table-size-middle-font-header-size': $table-size-middle-font-header-size,
|
|
83
|
-
'table-size-middle-font-size': $table-size-middle-font-size,
|
|
84
|
-
'table-size-middle-padding-horizontal': $table-size-middle-padding-horizontal,
|
|
85
|
-
'table-size-middle-padding-vertical': $table-size-middle-padding-vertical,
|
|
86
|
-
'table-size-medium-font-header-size': $table-size-medium-font-header-size,
|
|
87
|
-
'table-size-medium-font-size': $table-size-medium-font-size,
|
|
88
|
-
'table-size-medium-padding-horizontal': $table-size-medium-padding-horizontal,
|
|
89
|
-
'table-size-medium-padding-vertical': $table-size-medium-padding-vertical,
|
|
90
|
-
'table-size-mini-font-header-size': $table-size-mini-font-header-size,
|
|
91
|
-
'table-size-mini-font-size': $table-size-mini-font-size,
|
|
92
|
-
'table-size-mini-padding-horizontal': $table-size-mini-padding-horizontal,
|
|
93
|
-
'table-size-mini-padding-vertical': $table-size-mini-padding-vertical,
|
|
94
|
-
'table-size-selection-col-width': $table-size-selection-col-width,
|
|
95
|
-
'table-size-small-font-header-size': $table-size-small-font-header-size,
|
|
96
|
-
'table-size-small-font-size': $table-size-small-font-size,
|
|
97
|
-
'table-size-small-padding-horizontal': $table-size-small-padding-horizontal,
|
|
98
|
-
'table-size-small-padding-vertical': $table-size-small-padding-vertical,
|
|
99
|
-
'table-size-shadow-wrapper-width': $table-size-shadow-wrapper-width,
|
|
100
|
-
'table-spacing-expand-button-margin-right': $table-spacing-expand-button-margin-right,
|
|
101
|
-
'table-spacing-header-sorter-icon-margin-left': $table-spacing-header-sorter-icon-margin-left,
|
|
102
|
-
'table-spacing-pagination-margin': $table-spacing-pagination-margin,
|
|
103
|
-
'transition-duration-1': theme.$transition-duration-1,
|
|
104
|
-
'transition-timing-function-linear': theme.$transition-timing-function-linear,
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
@function less-var($name, $fallback: null) {
|
|
108
|
-
@return legacyLessVar.get($__less-vars, $name, $fallback);
|
|
18
|
+
@function token-var($name, $fallback: null) {
|
|
19
|
+
$value: map.get(meta.module-variables('token'), $name);
|
|
20
|
+
|
|
21
|
+
@if $value == null {
|
|
22
|
+
@return $fallback;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@return $value;
|
|
109
26
|
}
|
|
110
27
|
|
|
111
28
|
@mixin expandBtn() {
|
|
@@ -134,29 +51,29 @@ $__less-vars: (
|
|
|
134
51
|
|
|
135
52
|
@mixin table-size($size) {
|
|
136
53
|
.#{$table-prefix-cls}-cell {
|
|
137
|
-
padding:
|
|
138
|
-
|
|
54
|
+
padding: token-var('table-size-#{$size}-padding-vertical')
|
|
55
|
+
token-var('table-size-#{$size}-padding-horizontal');
|
|
139
56
|
}
|
|
140
57
|
|
|
141
58
|
//.#{$table-prefix-cls}-col-has-sorter .#{$table-prefix-cls}-cell-with-sorter {
|
|
142
|
-
// padding:
|
|
59
|
+
// padding: token-var('table-size-#{$size}-padding-vertical') token-var('table-size-#{$size}-padding-horizontal');
|
|
143
60
|
// cursor: pointer;
|
|
144
61
|
//}
|
|
145
62
|
|
|
146
63
|
//.#{$table-cls-td} {
|
|
147
|
-
// padding:
|
|
64
|
+
// padding: token-var('table-size-#{$size}-padding-vertical') token-var('table-size-#{$size}-padding-horizontal');
|
|
148
65
|
//}
|
|
149
66
|
|
|
150
67
|
.#{$table-cls-th} {
|
|
151
|
-
font-size:
|
|
68
|
+
font-size: token-var('table-size-#{$size}-font-header-size');
|
|
152
69
|
}
|
|
153
70
|
|
|
154
71
|
.#{$table-cls-td} {
|
|
155
|
-
font-size:
|
|
72
|
+
font-size: token-var('table-size-#{$size}-font-size');
|
|
156
73
|
}
|
|
157
74
|
|
|
158
|
-
$table-size-padding-vertical:
|
|
159
|
-
$table-size-padding-horizontal:
|
|
75
|
+
$table-size-padding-vertical: token-var('table-size-#{$size}-padding-vertical');
|
|
76
|
+
$table-size-padding-horizontal: token-var('table-size-#{$size}-padding-horizontal');
|
|
160
77
|
|
|
161
78
|
.#{$table-prefix-cls}-footer {
|
|
162
79
|
padding: $table-size-padding-vertical $table-size-padding-horizontal;
|
|
@@ -184,10 +101,38 @@ $__less-vars: (
|
|
|
184
101
|
position: absolute;
|
|
185
102
|
top: 0;
|
|
186
103
|
right: -4px;
|
|
187
|
-
z-index:
|
|
104
|
+
z-index: 2;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
188
107
|
width: 8px;
|
|
189
108
|
height: 100%;
|
|
190
109
|
cursor: col-resize;
|
|
110
|
+
|
|
111
|
+
&::after {
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 50%;
|
|
114
|
+
left: 50%;
|
|
115
|
+
z-index: 1;
|
|
116
|
+
width: 2px;
|
|
117
|
+
height: 0;
|
|
118
|
+
background-color: $table-color-border;
|
|
119
|
+
border-radius: 1px;
|
|
120
|
+
transform: translate(-50%, -50%);
|
|
121
|
+
transition:
|
|
122
|
+
height 0.15s ease,
|
|
123
|
+
background-color 0.15s ease;
|
|
124
|
+
content: '';
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:hover::after {
|
|
128
|
+
height: 40%;
|
|
129
|
+
background-color: global.$color-primary-6;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&-th-resizing &-column-handle::after {
|
|
134
|
+
height: 100%;
|
|
135
|
+
background-color: global.$color-primary-6;
|
|
191
136
|
}
|
|
192
137
|
|
|
193
138
|
// spin
|
|
@@ -207,6 +152,10 @@ $__less-vars: (
|
|
|
207
152
|
border-radius: 0 0 $table-border-radius $table-border-radius;
|
|
208
153
|
}
|
|
209
154
|
|
|
155
|
+
&-append {
|
|
156
|
+
background-color: $table-color-body-background;
|
|
157
|
+
}
|
|
158
|
+
|
|
210
159
|
// box-shadow of the fixed column on the left
|
|
211
160
|
&-scroll-position-right &-col-fixed-left-last::after,
|
|
212
161
|
&-scroll-position-middle &-col-fixed-left-last::after {
|
|
@@ -219,23 +168,48 @@ $__less-vars: (
|
|
|
219
168
|
box-shadow: $table-shadow-right;
|
|
220
169
|
}
|
|
221
170
|
|
|
222
|
-
&-layout-fixed {
|
|
223
|
-
.#{$table-cls-table} {
|
|
224
|
-
table-layout: fixed;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
171
|
.#{$table-cls-table} {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
229
174
|
width: 100%;
|
|
230
175
|
min-width: 100%;
|
|
231
176
|
margin: 0;
|
|
232
|
-
|
|
233
|
-
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&-thead,
|
|
180
|
+
&-tbody,
|
|
181
|
+
&-tfoot-content {
|
|
182
|
+
display: grid;
|
|
183
|
+
grid-template-columns: var(--sd-table-grid-template, minmax(0, 1fr));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&-tr,
|
|
187
|
+
&-virtual-row {
|
|
188
|
+
display: grid;
|
|
189
|
+
grid-column: 1 / -1;
|
|
190
|
+
grid-template-columns: var(--sd-table-grid-template, minmax(0, 1fr));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&-tbody > .#{theme.$prefix}-virtual-list,
|
|
194
|
+
&-tbody > .#{$table-prefix-cls}-body {
|
|
195
|
+
grid-column: 1 / -1;
|
|
196
|
+
width: 100%;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&-virtual-item {
|
|
200
|
+
display: grid;
|
|
201
|
+
grid-template-columns: var(--sd-table-grid-template, minmax(0, 1fr));
|
|
202
|
+
width: 100%;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&-virtual-row-table {
|
|
206
|
+
background-color: $table-color-body-background;
|
|
234
207
|
}
|
|
235
208
|
|
|
236
209
|
&-th {
|
|
237
210
|
position: relative;
|
|
238
211
|
box-sizing: border-box;
|
|
212
|
+
min-width: 0;
|
|
239
213
|
color: $table-color-text-header-cell;
|
|
240
214
|
font-weight: $table-font-weight-header-text;
|
|
241
215
|
line-height: theme.$line-height-base;
|
|
@@ -265,6 +239,7 @@ $__less-vars: (
|
|
|
265
239
|
|
|
266
240
|
&-td {
|
|
267
241
|
box-sizing: border-box;
|
|
242
|
+
min-width: 0;
|
|
268
243
|
color: $table-color-text-body-cell;
|
|
269
244
|
line-height: theme.$line-height-base;
|
|
270
245
|
text-align: left;
|
|
@@ -288,6 +263,9 @@ $__less-vars: (
|
|
|
288
263
|
&-cell {
|
|
289
264
|
display: flex;
|
|
290
265
|
align-items: center;
|
|
266
|
+
width: 100%;
|
|
267
|
+
min-width: 0;
|
|
268
|
+
height: 100%;
|
|
291
269
|
|
|
292
270
|
&-align-right {
|
|
293
271
|
justify-content: flex-end;
|
|
@@ -385,6 +363,9 @@ $__less-vars: (
|
|
|
385
363
|
&-cell-expand-icon &-cell-inline-icon {
|
|
386
364
|
display: inline-flex;
|
|
387
365
|
margin-right: $table-spacing-expand-button-margin-right;
|
|
366
|
+
padding: 0;
|
|
367
|
+
background: transparent;
|
|
368
|
+
border: 0;
|
|
388
369
|
|
|
389
370
|
.#{theme.$prefix}-icon-loading {
|
|
390
371
|
color: global.$color-primary-6;
|
|
@@ -442,7 +423,6 @@ $__less-vars: (
|
|
|
442
423
|
&-td#{&}-operation &-cell {
|
|
443
424
|
display: flex;
|
|
444
425
|
justify-content: center;
|
|
445
|
-
padding: 0;
|
|
446
426
|
}
|
|
447
427
|
|
|
448
428
|
&-radio,
|
|
@@ -477,6 +457,12 @@ $__less-vars: (
|
|
|
477
457
|
&-cell-with-sorter {
|
|
478
458
|
display: flex;
|
|
479
459
|
align-items: center;
|
|
460
|
+
width: 100%;
|
|
461
|
+
padding: 0;
|
|
462
|
+
color: inherit;
|
|
463
|
+
text-align: inherit;
|
|
464
|
+
background: transparent;
|
|
465
|
+
border: 0;
|
|
480
466
|
cursor: pointer;
|
|
481
467
|
|
|
482
468
|
&:hover {
|
|
@@ -671,10 +657,22 @@ $__less-vars: (
|
|
|
671
657
|
}
|
|
672
658
|
|
|
673
659
|
&-header {
|
|
660
|
+
width: 100%;
|
|
661
|
+
min-width: 100%;
|
|
674
662
|
overflow: hidden;
|
|
675
663
|
background-color: $table-color-bg-header-cell;
|
|
676
664
|
scrollbar-color: transparent transparent;
|
|
677
665
|
|
|
666
|
+
> .#{$table-cls-table} {
|
|
667
|
+
width: 100%;
|
|
668
|
+
background-color: inherit;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.#{$table-prefix-cls}-thead {
|
|
672
|
+
width: 100%;
|
|
673
|
+
background-color: inherit;
|
|
674
|
+
}
|
|
675
|
+
|
|
678
676
|
&-sticky {
|
|
679
677
|
position: sticky;
|
|
680
678
|
top: 0;
|
|
@@ -722,7 +720,7 @@ $__less-vars: (
|
|
|
722
720
|
border-bottom: $table-border-width $table-border-style $table-color-border;
|
|
723
721
|
|
|
724
722
|
.#{$table-prefix-cls}-body .#{$table-cls-tr}:last-of-type .#{$table-cls-td},
|
|
725
|
-
tfoot .#{$table-cls-tr}:last-of-type .#{$table-cls-td} {
|
|
723
|
+
.#{$table-prefix-cls}-tfoot-content .#{$table-cls-tr}:last-of-type .#{$table-cls-td} {
|
|
726
724
|
border-bottom: none;
|
|
727
725
|
|
|
728
726
|
&.#{$table-prefix-cls}-col-fixed-left-last::after,
|
|
@@ -784,7 +782,7 @@ $__less-vars: (
|
|
|
784
782
|
}
|
|
785
783
|
|
|
786
784
|
&-border#{&}-border-header-cell {
|
|
787
|
-
thead {
|
|
785
|
+
.#{$table-prefix-cls}-thead {
|
|
788
786
|
.#{$table-cls-tr}:first-child .#{$table-cls-th}:last-child {
|
|
789
787
|
border-right: 0;
|
|
790
788
|
}
|
|
@@ -826,10 +824,34 @@ $__less-vars: (
|
|
|
826
824
|
}
|
|
827
825
|
}
|
|
828
826
|
|
|
829
|
-
& .#{$table-cls-tr}-draggable {
|
|
827
|
+
& .#{$table-cls-tr}-draggable .#{$table-cls-td} {
|
|
830
828
|
cursor: move;
|
|
831
829
|
}
|
|
832
830
|
|
|
831
|
+
// Drop target indicator during row drag
|
|
832
|
+
& .#{$table-cls-tr}-drop-target {
|
|
833
|
+
.#{$table-cls-td} {
|
|
834
|
+
position: relative;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.#{$table-cls-td}::before {
|
|
838
|
+
position: absolute;
|
|
839
|
+
top: -1px;
|
|
840
|
+
right: 0;
|
|
841
|
+
left: 0;
|
|
842
|
+
height: 2px;
|
|
843
|
+
background-color: global.$color-primary-6;
|
|
844
|
+
border-radius: 1px;
|
|
845
|
+
content: '';
|
|
846
|
+
pointer-events: none;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// Row drag transition
|
|
851
|
+
&-dragging .#{$table-cls-td} {
|
|
852
|
+
transition: background-color 0.2s ease;
|
|
853
|
+
}
|
|
854
|
+
|
|
833
855
|
&-hover {
|
|
834
856
|
&:not(.#{$table-prefix-cls}-dragging)
|
|
835
857
|
.#{$table-cls-tr}:not(.#{$table-prefix-cls}-tr-empty):not(
|
|
@@ -900,7 +922,7 @@ $__less-vars: (
|
|
|
900
922
|
}
|
|
901
923
|
}
|
|
902
924
|
|
|
903
|
-
& tfoot &-td {
|
|
925
|
+
& &-tfoot-content &-td {
|
|
904
926
|
background-color: $table-color-bg-tfoot;
|
|
905
927
|
}
|
|
906
928
|
|
|
@@ -925,17 +947,7 @@ $__less-vars: (
|
|
|
925
947
|
}
|
|
926
948
|
|
|
927
949
|
// virtualized
|
|
928
|
-
&-virtualized .#{$table-cls-table} {
|
|
929
|
-
table-layout: fixed;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
&-virtualized div#{&}-body div#{&}-tr {
|
|
933
|
-
display: flex;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
950
|
&-virtualized div#{&}-body div#{&}-td {
|
|
937
|
-
display: flex;
|
|
938
|
-
flex: 1;
|
|
939
951
|
align-items: center;
|
|
940
952
|
}
|
|
941
953
|
}
|