stk-table-vue 0.2.1 → 0.2.2
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/README.md +6 -1
- package/lib/src/StkTable/StkTable.vue.d.ts +384 -373
- package/lib/src/StkTable/const.d.ts +21 -21
- package/lib/src/StkTable/index.d.ts +3 -3
- package/lib/src/StkTable/types/index.d.ts +78 -73
- package/lib/src/StkTable/useAutoResize.d.ts +14 -14
- package/lib/src/StkTable/useColResize.d.ts +18 -18
- package/lib/src/StkTable/useFixedCol.d.ts +20 -20
- package/lib/src/StkTable/useFixedStyle.d.ts +20 -20
- package/lib/src/StkTable/useHighlight.d.ts +19 -19
- package/lib/src/StkTable/useKeyboardArrowScroll.d.ts +17 -17
- package/lib/src/StkTable/useThDrag.d.ts +17 -17
- package/lib/src/StkTable/useVirtualScroll.d.ts +73 -73
- package/lib/src/StkTable/utils.d.ts +25 -25
- package/lib/stk-table-vue.js +1441 -1422
- package/lib/style.css +298 -298
- package/lib/test/StkTable.browser.test.d.ts +1 -1
- package/lib/test/insertToOrderedArray.test.d.ts +1 -1
- package/lib/test/utils/DragResize.d.ts +28 -28
- package/lib/test/utils/h.d.ts +10 -10
- package/package.json +1 -1
- package/src/StkTable/StkTable.vue +10 -5
- package/src/StkTable/types/index.ts +6 -0
- package/src/StkTable/utils.ts +46 -20
package/lib/style.css
CHANGED
|
@@ -1,298 +1,298 @@
|
|
|
1
|
-
@keyframes stk-table-dim{
|
|
2
|
-
from{
|
|
3
|
-
background-color:var(--highlight-color);
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
.stk-table{
|
|
7
|
-
--row-height:28px;
|
|
8
|
-
--header-row-height:var(--row-height);
|
|
9
|
-
--cell-padding-x:8px;
|
|
10
|
-
--resize-handle-width:4px;
|
|
11
|
-
--border-color:#e8e8f4;
|
|
12
|
-
--border-width:1px;
|
|
13
|
-
--td-bgc:#fff;
|
|
14
|
-
--th-bgc:#fafafc;
|
|
15
|
-
--th-color:#272841;
|
|
16
|
-
--tr-active-bgc:#e6f7ff;
|
|
17
|
-
--tr-hover-bgc:rgba(230, 247, 255, 0.7);
|
|
18
|
-
--bg-border-top:linear-gradient(180deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
19
|
-
--bg-border-right:linear-gradient(270deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
20
|
-
--bg-border-bottom:linear-gradient(0deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
21
|
-
--bg-border-left:linear-gradient(90deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
22
|
-
--highlight-color:#71a2fd;
|
|
23
|
-
--stripe-bgc:#fafafc;
|
|
24
|
-
--sort-arrow-color:#757699;
|
|
25
|
-
--sort-arrow-hover-color:#8f90b5;
|
|
26
|
-
--sort-arrow-active-color:#1b63d9;
|
|
27
|
-
--sort-arrow-active-sub-color:#cbcbe1;
|
|
28
|
-
--col-resize-indicator-color:#87879c;
|
|
29
|
-
--fixed-col-shadow-color-from:rgba(0, 0, 0, 0.1);
|
|
30
|
-
--fixed-col-shadow-color-to:rgba(0, 0, 0, 0);
|
|
31
|
-
position:relative;
|
|
32
|
-
overflow:auto;
|
|
33
|
-
display:flex;
|
|
34
|
-
flex-direction:column;
|
|
35
|
-
box-sizing:border-box;
|
|
36
|
-
border-left:1px solid #e8e8f4;
|
|
37
|
-
border-left:1px solid var(--border-color);
|
|
38
|
-
background-image:linear-gradient(180deg, #e8e8f4 1px, transparent 1px), linear-gradient(270deg, #e8e8f4 1px, transparent 1px), linear-gradient(0deg, #e8e8f4 1px, transparent 1px);
|
|
39
|
-
background-image:var(--bg-border-top), var(--bg-border-right), var(--bg-border-bottom);
|
|
40
|
-
}
|
|
41
|
-
.stk-table.dark{
|
|
42
|
-
--th-bgc:#202029;
|
|
43
|
-
--th-color:#C0C0D1;
|
|
44
|
-
--td-bgc:#1b1b24;
|
|
45
|
-
--border-color:#292933;
|
|
46
|
-
--tr-active-bgc:#283f63;
|
|
47
|
-
--tr-hover-bgc:#1a2b46;
|
|
48
|
-
--table-bgc:#1b1b24;
|
|
49
|
-
--highlight-color:#1e4c99;
|
|
50
|
-
--stripe-bgc:#202029;
|
|
51
|
-
--sort-arrow-color:#5d6064;
|
|
52
|
-
--sort-arrow-hover-color:#727782;
|
|
53
|
-
--sort-arrow-active-color:#d0d1d2;
|
|
54
|
-
--sort-arrow-active-sub-color:#5d6064;
|
|
55
|
-
--col-resize-indicator-color:#5d6064;
|
|
56
|
-
--fixed-col-shadow-color-from:rgba(135, 135, 156, 0.1);
|
|
57
|
-
--fixed-col-shadow-color-to:rgba(135, 135, 156, 0);
|
|
58
|
-
color:#d1d1e0;
|
|
59
|
-
}
|
|
60
|
-
.stk-table.headless{
|
|
61
|
-
border-top:1px solid var(--border-color);
|
|
62
|
-
background-image:var(--bg-border-right), var(--bg-border-bottom);
|
|
63
|
-
}
|
|
64
|
-
.stk-table.col-resizable .stk-table-main{
|
|
65
|
-
width:-moz-fit-content !important;
|
|
66
|
-
width:fit-content !important;
|
|
67
|
-
min-width:-moz-min-content !important;
|
|
68
|
-
min-width:min-content !important;
|
|
69
|
-
}
|
|
70
|
-
.stk-table.is-col-resizing th{
|
|
71
|
-
pointer-events:none;
|
|
72
|
-
}
|
|
73
|
-
.stk-table.border-h{
|
|
74
|
-
--bg-border-right:linear-gradient(transparent, transparent);
|
|
75
|
-
--bg-border-left:linear-gradient(transparent, transparent);
|
|
76
|
-
}
|
|
77
|
-
.stk-table.border-v{
|
|
78
|
-
--bg-border-bottom:linear-gradient(transparent, transparent);
|
|
79
|
-
}
|
|
80
|
-
.stk-table.border th,
|
|
81
|
-
.stk-table.border td{
|
|
82
|
-
background-image:var(--bg-border-right), var(--bg-border-bottom);
|
|
83
|
-
}
|
|
84
|
-
.stk-table.border thead tr:first-child th{
|
|
85
|
-
background-image:var(--bg-border-top), var(--bg-border-right), var(--bg-border-bottom);
|
|
86
|
-
}
|
|
87
|
-
.stk-table.border.virtual-x .virtual-x-left{
|
|
88
|
-
background:none;
|
|
89
|
-
pointer-events:none;
|
|
90
|
-
}
|
|
91
|
-
.stk-table.border.virtual-x .virtual-x-right{
|
|
92
|
-
padding:0;
|
|
93
|
-
background:none;
|
|
94
|
-
pointer-events:none;
|
|
95
|
-
}
|
|
96
|
-
.stk-table.border-body-v tbody{
|
|
97
|
-
--bg-border-bottom:linear-gradient(transparent, transparent);
|
|
98
|
-
}
|
|
99
|
-
.stk-table.stripe{
|
|
100
|
-
}
|
|
101
|
-
.stk-table.stripe tbody tr:nth-child(odd){
|
|
102
|
-
background-color:var(--stripe-bgc);
|
|
103
|
-
}
|
|
104
|
-
.stk-table .column-resize-indicator{
|
|
105
|
-
width:0;
|
|
106
|
-
height:100%;
|
|
107
|
-
border-left:2px solid var(--col-resize-indicator-color);
|
|
108
|
-
position:absolute;
|
|
109
|
-
z-index:10;
|
|
110
|
-
display:none;
|
|
111
|
-
pointer-events:none;
|
|
112
|
-
}
|
|
113
|
-
.stk-table .stk-table-main{
|
|
114
|
-
border-spacing:0;
|
|
115
|
-
border-collapse:separate;
|
|
116
|
-
width:-moz-fit-content;
|
|
117
|
-
width:fit-content;
|
|
118
|
-
min-width:100%;
|
|
119
|
-
}
|
|
120
|
-
.stk-table .stk-table-main.fixed-mode{
|
|
121
|
-
table-layout:fixed;
|
|
122
|
-
min-width:-moz-min-content;
|
|
123
|
-
min-width:min-content;
|
|
124
|
-
}
|
|
125
|
-
.stk-table .stk-table-main th,
|
|
126
|
-
.stk-table .stk-table-main td{
|
|
127
|
-
z-index:1;
|
|
128
|
-
font-size:14px;
|
|
129
|
-
box-sizing:border-box;
|
|
130
|
-
padding:0 var(--cell-padding-x);
|
|
131
|
-
}
|
|
132
|
-
.stk-table .stk-table-main th{
|
|
133
|
-
color:var(--th-color);
|
|
134
|
-
background-color:var(--th-bgc);
|
|
135
|
-
}
|
|
136
|
-
.stk-table .stk-table-main th.sortable{
|
|
137
|
-
cursor:pointer;
|
|
138
|
-
}
|
|
139
|
-
.stk-table .stk-table-main th.text-overflow .table-header-cell-wrapper{
|
|
140
|
-
white-space:nowrap;
|
|
141
|
-
overflow:hidden;
|
|
142
|
-
}
|
|
143
|
-
.stk-table .stk-table-main th.text-overflow .table-header-title{
|
|
144
|
-
text-overflow:ellipsis;
|
|
145
|
-
overflow:hidden;
|
|
146
|
-
}
|
|
147
|
-
.stk-table .stk-table-main td.fixed-cell{
|
|
148
|
-
background-color:inherit;
|
|
149
|
-
}
|
|
150
|
-
.stk-table .stk-table-main td.highlight-cell{
|
|
151
|
-
animation:stk-table-dim 2s linear;
|
|
152
|
-
}
|
|
153
|
-
.stk-table .stk-table-main td.text-overflow .table-cell-wrapper{
|
|
154
|
-
white-space:nowrap;
|
|
155
|
-
overflow:hidden;
|
|
156
|
-
text-overflow:ellipsis;
|
|
157
|
-
}
|
|
158
|
-
.stk-table .stk-table-main .fixed-cell--left{
|
|
159
|
-
--shadow-rotate:90deg;
|
|
160
|
-
}
|
|
161
|
-
.stk-table .stk-table-main .fixed-cell--left.fixed-cell--shadow::after{
|
|
162
|
-
right:-10px;
|
|
163
|
-
}
|
|
164
|
-
.stk-table .stk-table-main .fixed-cell--right{
|
|
165
|
-
--shadow-rotate:-90deg;
|
|
166
|
-
}
|
|
167
|
-
.stk-table .stk-table-main .fixed-cell--right.fixed-cell--shadow::after{
|
|
168
|
-
left:-10px;
|
|
169
|
-
}
|
|
170
|
-
.stk-table .stk-table-main .fixed-cell--shadow::after{
|
|
171
|
-
content:'';
|
|
172
|
-
width:10px;
|
|
173
|
-
height:100%;
|
|
174
|
-
top:0px;
|
|
175
|
-
position:absolute;
|
|
176
|
-
pointer-events:none;
|
|
177
|
-
background-image:linear-gradient(var(--shadow-rotate), var(--fixed-col-shadow-color-from), var(--fixed-col-shadow-color-to));
|
|
178
|
-
}
|
|
179
|
-
.stk-table .stk-table-main thead tr{
|
|
180
|
-
height:var(--header-row-height);
|
|
181
|
-
}
|
|
182
|
-
.stk-table .stk-table-main thead tr:first-child th{
|
|
183
|
-
position:sticky;
|
|
184
|
-
top:0;
|
|
185
|
-
}
|
|
186
|
-
.stk-table .stk-table-main th:not(.sorter-desc):not(.sorter-asc):hover .table-header-sorter .arrow-up{
|
|
187
|
-
fill:var(--sort-arrow-hover-color);
|
|
188
|
-
}
|
|
189
|
-
.stk-table .stk-table-main th:not(.sorter-desc):not(.sorter-asc):hover .table-header-sorter .arrow-down{
|
|
190
|
-
fill:var(--sort-arrow-hover-color);
|
|
191
|
-
}
|
|
192
|
-
.stk-table .stk-table-main th.sorter-desc .table-header-sorter{
|
|
193
|
-
display:inline;
|
|
194
|
-
display:initial;
|
|
195
|
-
}
|
|
196
|
-
.stk-table .stk-table-main th.sorter-desc .table-header-sorter .arrow-up{
|
|
197
|
-
fill:var(--sort-arrow-active-sub-color);
|
|
198
|
-
}
|
|
199
|
-
.stk-table .stk-table-main th.sorter-desc .table-header-sorter .arrow-down{
|
|
200
|
-
fill:var(--sort-arrow-active-color);
|
|
201
|
-
}
|
|
202
|
-
.stk-table .stk-table-main th.sorter-asc .table-header-sorter{
|
|
203
|
-
display:inline;
|
|
204
|
-
display:initial;
|
|
205
|
-
}
|
|
206
|
-
.stk-table .stk-table-main th.sorter-asc .table-header-sorter .arrow-up{
|
|
207
|
-
fill:var(--sort-arrow-active-color);
|
|
208
|
-
}
|
|
209
|
-
.stk-table .stk-table-main th.sorter-asc .table-header-sorter .arrow-down{
|
|
210
|
-
fill:var(--sort-arrow-active-sub-color);
|
|
211
|
-
}
|
|
212
|
-
.stk-table .stk-table-main .table-header-cell-wrapper{
|
|
213
|
-
max-width:100%;
|
|
214
|
-
display:inline-flex;
|
|
215
|
-
align-items:center;
|
|
216
|
-
}
|
|
217
|
-
.stk-table .stk-table-main .table-header-title{
|
|
218
|
-
overflow:hidden;
|
|
219
|
-
align-self:flex-start;
|
|
220
|
-
}
|
|
221
|
-
.stk-table .stk-table-main .table-header-sorter{
|
|
222
|
-
flex-shrink:0;
|
|
223
|
-
margin-left:4px;
|
|
224
|
-
width:16px;
|
|
225
|
-
height:16px;
|
|
226
|
-
display:none;
|
|
227
|
-
}
|
|
228
|
-
.stk-table .stk-table-main .table-header-sorter .arrow-up,
|
|
229
|
-
.stk-table .stk-table-main .table-header-sorter .arrow-down{
|
|
230
|
-
fill:var(--sort-arrow-color);
|
|
231
|
-
}
|
|
232
|
-
.stk-table .stk-table-main .table-header-resizer{
|
|
233
|
-
position:absolute;
|
|
234
|
-
top:0;
|
|
235
|
-
bottom:0;
|
|
236
|
-
cursor:col-resize;
|
|
237
|
-
width:var(--resize-handle-width);
|
|
238
|
-
}
|
|
239
|
-
.stk-table .stk-table-main .table-header-resizer.left{
|
|
240
|
-
left:0;
|
|
241
|
-
}
|
|
242
|
-
.stk-table .stk-table-main .table-header-resizer.right{
|
|
243
|
-
right:0;
|
|
244
|
-
}
|
|
245
|
-
.stk-table .stk-table-main tbody tr{
|
|
246
|
-
background-color:var(--td-bgc);
|
|
247
|
-
height:var(--row-height);
|
|
248
|
-
}
|
|
249
|
-
.stk-table .stk-table-main tbody tr.highlight-row{
|
|
250
|
-
animation:stk-table-dim 2s linear;
|
|
251
|
-
}
|
|
252
|
-
.stk-table .stk-table-main tbody tr.hover,
|
|
253
|
-
.stk-table .stk-table-main tbody tr:hover{
|
|
254
|
-
background-color:var(--tr-hover-bgc);
|
|
255
|
-
}
|
|
256
|
-
.stk-table .stk-table-main tbody tr.active{
|
|
257
|
-
background-color:var(--tr-active-bgc);
|
|
258
|
-
}
|
|
259
|
-
.stk-table .stk-table-no-data{
|
|
260
|
-
background-color:var(--table-bgc);
|
|
261
|
-
line-height:var(--row-height);
|
|
262
|
-
text-align:center;
|
|
263
|
-
font-size:14px;
|
|
264
|
-
position:sticky;
|
|
265
|
-
left:0px;
|
|
266
|
-
border-right:var(--border-width) solid var(--border-color);
|
|
267
|
-
border-bottom:var(--border-width) solid var(--border-color);
|
|
268
|
-
display:flex;
|
|
269
|
-
flex-direction:column;
|
|
270
|
-
align-items:center;
|
|
271
|
-
justify-content:center;
|
|
272
|
-
}
|
|
273
|
-
.stk-table .stk-table-no-data.no-data-full{
|
|
274
|
-
flex:1;
|
|
275
|
-
}
|
|
276
|
-
.stk-table.virtual{
|
|
277
|
-
}
|
|
278
|
-
.stk-table.virtual .table-header-cell-wrapper{
|
|
279
|
-
overflow:hidden;
|
|
280
|
-
max-height:var(--header-row-height);
|
|
281
|
-
}
|
|
282
|
-
.stk-table.virtual tbody{
|
|
283
|
-
position:relative;
|
|
284
|
-
}
|
|
285
|
-
.stk-table.virtual tbody tr td{
|
|
286
|
-
height:var(--row-height);
|
|
287
|
-
line-height:1;
|
|
288
|
-
}
|
|
289
|
-
.stk-table.virtual tbody tr td .table-cell-wrapper{
|
|
290
|
-
max-height:var(--row-height);
|
|
291
|
-
overflow:hidden;
|
|
292
|
-
}
|
|
293
|
-
.stk-table.virtual .padding-top-tr td{
|
|
294
|
-
height:0;
|
|
295
|
-
}
|
|
296
|
-
.stk-table.virtual-x .virtual-x-left{
|
|
297
|
-
padding:0;
|
|
298
|
-
}
|
|
1
|
+
@keyframes stk-table-dim{
|
|
2
|
+
from{
|
|
3
|
+
background-color:var(--highlight-color);
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
.stk-table{
|
|
7
|
+
--row-height:28px;
|
|
8
|
+
--header-row-height:var(--row-height);
|
|
9
|
+
--cell-padding-x:8px;
|
|
10
|
+
--resize-handle-width:4px;
|
|
11
|
+
--border-color:#e8e8f4;
|
|
12
|
+
--border-width:1px;
|
|
13
|
+
--td-bgc:#fff;
|
|
14
|
+
--th-bgc:#fafafc;
|
|
15
|
+
--th-color:#272841;
|
|
16
|
+
--tr-active-bgc:#e6f7ff;
|
|
17
|
+
--tr-hover-bgc:rgba(230, 247, 255, 0.7);
|
|
18
|
+
--bg-border-top:linear-gradient(180deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
19
|
+
--bg-border-right:linear-gradient(270deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
20
|
+
--bg-border-bottom:linear-gradient(0deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
21
|
+
--bg-border-left:linear-gradient(90deg, var(--border-color) var(--border-width), transparent var(--border-width));
|
|
22
|
+
--highlight-color:#71a2fd;
|
|
23
|
+
--stripe-bgc:#fafafc;
|
|
24
|
+
--sort-arrow-color:#757699;
|
|
25
|
+
--sort-arrow-hover-color:#8f90b5;
|
|
26
|
+
--sort-arrow-active-color:#1b63d9;
|
|
27
|
+
--sort-arrow-active-sub-color:#cbcbe1;
|
|
28
|
+
--col-resize-indicator-color:#87879c;
|
|
29
|
+
--fixed-col-shadow-color-from:rgba(0, 0, 0, 0.1);
|
|
30
|
+
--fixed-col-shadow-color-to:rgba(0, 0, 0, 0);
|
|
31
|
+
position:relative;
|
|
32
|
+
overflow:auto;
|
|
33
|
+
display:flex;
|
|
34
|
+
flex-direction:column;
|
|
35
|
+
box-sizing:border-box;
|
|
36
|
+
border-left:1px solid #e8e8f4;
|
|
37
|
+
border-left:1px solid var(--border-color);
|
|
38
|
+
background-image:linear-gradient(180deg, #e8e8f4 1px, transparent 1px), linear-gradient(270deg, #e8e8f4 1px, transparent 1px), linear-gradient(0deg, #e8e8f4 1px, transparent 1px);
|
|
39
|
+
background-image:var(--bg-border-top), var(--bg-border-right), var(--bg-border-bottom);
|
|
40
|
+
}
|
|
41
|
+
.stk-table.dark{
|
|
42
|
+
--th-bgc:#202029;
|
|
43
|
+
--th-color:#C0C0D1;
|
|
44
|
+
--td-bgc:#1b1b24;
|
|
45
|
+
--border-color:#292933;
|
|
46
|
+
--tr-active-bgc:#283f63;
|
|
47
|
+
--tr-hover-bgc:#1a2b46;
|
|
48
|
+
--table-bgc:#1b1b24;
|
|
49
|
+
--highlight-color:#1e4c99;
|
|
50
|
+
--stripe-bgc:#202029;
|
|
51
|
+
--sort-arrow-color:#5d6064;
|
|
52
|
+
--sort-arrow-hover-color:#727782;
|
|
53
|
+
--sort-arrow-active-color:#d0d1d2;
|
|
54
|
+
--sort-arrow-active-sub-color:#5d6064;
|
|
55
|
+
--col-resize-indicator-color:#5d6064;
|
|
56
|
+
--fixed-col-shadow-color-from:rgba(135, 135, 156, 0.1);
|
|
57
|
+
--fixed-col-shadow-color-to:rgba(135, 135, 156, 0);
|
|
58
|
+
color:#d1d1e0;
|
|
59
|
+
}
|
|
60
|
+
.stk-table.headless{
|
|
61
|
+
border-top:1px solid var(--border-color);
|
|
62
|
+
background-image:var(--bg-border-right), var(--bg-border-bottom);
|
|
63
|
+
}
|
|
64
|
+
.stk-table.col-resizable .stk-table-main{
|
|
65
|
+
width:-moz-fit-content !important;
|
|
66
|
+
width:fit-content !important;
|
|
67
|
+
min-width:-moz-min-content !important;
|
|
68
|
+
min-width:min-content !important;
|
|
69
|
+
}
|
|
70
|
+
.stk-table.is-col-resizing th{
|
|
71
|
+
pointer-events:none;
|
|
72
|
+
}
|
|
73
|
+
.stk-table.border-h{
|
|
74
|
+
--bg-border-right:linear-gradient(transparent, transparent);
|
|
75
|
+
--bg-border-left:linear-gradient(transparent, transparent);
|
|
76
|
+
}
|
|
77
|
+
.stk-table.border-v{
|
|
78
|
+
--bg-border-bottom:linear-gradient(transparent, transparent);
|
|
79
|
+
}
|
|
80
|
+
.stk-table.border th,
|
|
81
|
+
.stk-table.border td{
|
|
82
|
+
background-image:var(--bg-border-right), var(--bg-border-bottom);
|
|
83
|
+
}
|
|
84
|
+
.stk-table.border thead tr:first-child th{
|
|
85
|
+
background-image:var(--bg-border-top), var(--bg-border-right), var(--bg-border-bottom);
|
|
86
|
+
}
|
|
87
|
+
.stk-table.border.virtual-x .virtual-x-left{
|
|
88
|
+
background:none;
|
|
89
|
+
pointer-events:none;
|
|
90
|
+
}
|
|
91
|
+
.stk-table.border.virtual-x .virtual-x-right{
|
|
92
|
+
padding:0;
|
|
93
|
+
background:none;
|
|
94
|
+
pointer-events:none;
|
|
95
|
+
}
|
|
96
|
+
.stk-table.border-body-v tbody{
|
|
97
|
+
--bg-border-bottom:linear-gradient(transparent, transparent);
|
|
98
|
+
}
|
|
99
|
+
.stk-table.stripe{
|
|
100
|
+
}
|
|
101
|
+
.stk-table.stripe tbody tr:nth-child(odd){
|
|
102
|
+
background-color:var(--stripe-bgc);
|
|
103
|
+
}
|
|
104
|
+
.stk-table .column-resize-indicator{
|
|
105
|
+
width:0;
|
|
106
|
+
height:100%;
|
|
107
|
+
border-left:2px solid var(--col-resize-indicator-color);
|
|
108
|
+
position:absolute;
|
|
109
|
+
z-index:10;
|
|
110
|
+
display:none;
|
|
111
|
+
pointer-events:none;
|
|
112
|
+
}
|
|
113
|
+
.stk-table .stk-table-main{
|
|
114
|
+
border-spacing:0;
|
|
115
|
+
border-collapse:separate;
|
|
116
|
+
width:-moz-fit-content;
|
|
117
|
+
width:fit-content;
|
|
118
|
+
min-width:100%;
|
|
119
|
+
}
|
|
120
|
+
.stk-table .stk-table-main.fixed-mode{
|
|
121
|
+
table-layout:fixed;
|
|
122
|
+
min-width:-moz-min-content;
|
|
123
|
+
min-width:min-content;
|
|
124
|
+
}
|
|
125
|
+
.stk-table .stk-table-main th,
|
|
126
|
+
.stk-table .stk-table-main td{
|
|
127
|
+
z-index:1;
|
|
128
|
+
font-size:14px;
|
|
129
|
+
box-sizing:border-box;
|
|
130
|
+
padding:0 var(--cell-padding-x);
|
|
131
|
+
}
|
|
132
|
+
.stk-table .stk-table-main th{
|
|
133
|
+
color:var(--th-color);
|
|
134
|
+
background-color:var(--th-bgc);
|
|
135
|
+
}
|
|
136
|
+
.stk-table .stk-table-main th.sortable{
|
|
137
|
+
cursor:pointer;
|
|
138
|
+
}
|
|
139
|
+
.stk-table .stk-table-main th.text-overflow .table-header-cell-wrapper{
|
|
140
|
+
white-space:nowrap;
|
|
141
|
+
overflow:hidden;
|
|
142
|
+
}
|
|
143
|
+
.stk-table .stk-table-main th.text-overflow .table-header-title{
|
|
144
|
+
text-overflow:ellipsis;
|
|
145
|
+
overflow:hidden;
|
|
146
|
+
}
|
|
147
|
+
.stk-table .stk-table-main td.fixed-cell{
|
|
148
|
+
background-color:inherit;
|
|
149
|
+
}
|
|
150
|
+
.stk-table .stk-table-main td.highlight-cell{
|
|
151
|
+
animation:stk-table-dim 2s linear;
|
|
152
|
+
}
|
|
153
|
+
.stk-table .stk-table-main td.text-overflow .table-cell-wrapper{
|
|
154
|
+
white-space:nowrap;
|
|
155
|
+
overflow:hidden;
|
|
156
|
+
text-overflow:ellipsis;
|
|
157
|
+
}
|
|
158
|
+
.stk-table .stk-table-main .fixed-cell--left{
|
|
159
|
+
--shadow-rotate:90deg;
|
|
160
|
+
}
|
|
161
|
+
.stk-table .stk-table-main .fixed-cell--left.fixed-cell--shadow::after{
|
|
162
|
+
right:-10px;
|
|
163
|
+
}
|
|
164
|
+
.stk-table .stk-table-main .fixed-cell--right{
|
|
165
|
+
--shadow-rotate:-90deg;
|
|
166
|
+
}
|
|
167
|
+
.stk-table .stk-table-main .fixed-cell--right.fixed-cell--shadow::after{
|
|
168
|
+
left:-10px;
|
|
169
|
+
}
|
|
170
|
+
.stk-table .stk-table-main .fixed-cell--shadow::after{
|
|
171
|
+
content:'';
|
|
172
|
+
width:10px;
|
|
173
|
+
height:100%;
|
|
174
|
+
top:0px;
|
|
175
|
+
position:absolute;
|
|
176
|
+
pointer-events:none;
|
|
177
|
+
background-image:linear-gradient(var(--shadow-rotate), var(--fixed-col-shadow-color-from), var(--fixed-col-shadow-color-to));
|
|
178
|
+
}
|
|
179
|
+
.stk-table .stk-table-main thead tr{
|
|
180
|
+
height:var(--header-row-height);
|
|
181
|
+
}
|
|
182
|
+
.stk-table .stk-table-main thead tr:first-child th{
|
|
183
|
+
position:sticky;
|
|
184
|
+
top:0;
|
|
185
|
+
}
|
|
186
|
+
.stk-table .stk-table-main th:not(.sorter-desc):not(.sorter-asc):hover .table-header-sorter .arrow-up{
|
|
187
|
+
fill:var(--sort-arrow-hover-color);
|
|
188
|
+
}
|
|
189
|
+
.stk-table .stk-table-main th:not(.sorter-desc):not(.sorter-asc):hover .table-header-sorter .arrow-down{
|
|
190
|
+
fill:var(--sort-arrow-hover-color);
|
|
191
|
+
}
|
|
192
|
+
.stk-table .stk-table-main th.sorter-desc .table-header-sorter{
|
|
193
|
+
display:inline;
|
|
194
|
+
display:initial;
|
|
195
|
+
}
|
|
196
|
+
.stk-table .stk-table-main th.sorter-desc .table-header-sorter .arrow-up{
|
|
197
|
+
fill:var(--sort-arrow-active-sub-color);
|
|
198
|
+
}
|
|
199
|
+
.stk-table .stk-table-main th.sorter-desc .table-header-sorter .arrow-down{
|
|
200
|
+
fill:var(--sort-arrow-active-color);
|
|
201
|
+
}
|
|
202
|
+
.stk-table .stk-table-main th.sorter-asc .table-header-sorter{
|
|
203
|
+
display:inline;
|
|
204
|
+
display:initial;
|
|
205
|
+
}
|
|
206
|
+
.stk-table .stk-table-main th.sorter-asc .table-header-sorter .arrow-up{
|
|
207
|
+
fill:var(--sort-arrow-active-color);
|
|
208
|
+
}
|
|
209
|
+
.stk-table .stk-table-main th.sorter-asc .table-header-sorter .arrow-down{
|
|
210
|
+
fill:var(--sort-arrow-active-sub-color);
|
|
211
|
+
}
|
|
212
|
+
.stk-table .stk-table-main .table-header-cell-wrapper{
|
|
213
|
+
max-width:100%;
|
|
214
|
+
display:inline-flex;
|
|
215
|
+
align-items:center;
|
|
216
|
+
}
|
|
217
|
+
.stk-table .stk-table-main .table-header-title{
|
|
218
|
+
overflow:hidden;
|
|
219
|
+
align-self:flex-start;
|
|
220
|
+
}
|
|
221
|
+
.stk-table .stk-table-main .table-header-sorter{
|
|
222
|
+
flex-shrink:0;
|
|
223
|
+
margin-left:4px;
|
|
224
|
+
width:16px;
|
|
225
|
+
height:16px;
|
|
226
|
+
display:none;
|
|
227
|
+
}
|
|
228
|
+
.stk-table .stk-table-main .table-header-sorter .arrow-up,
|
|
229
|
+
.stk-table .stk-table-main .table-header-sorter .arrow-down{
|
|
230
|
+
fill:var(--sort-arrow-color);
|
|
231
|
+
}
|
|
232
|
+
.stk-table .stk-table-main .table-header-resizer{
|
|
233
|
+
position:absolute;
|
|
234
|
+
top:0;
|
|
235
|
+
bottom:0;
|
|
236
|
+
cursor:col-resize;
|
|
237
|
+
width:var(--resize-handle-width);
|
|
238
|
+
}
|
|
239
|
+
.stk-table .stk-table-main .table-header-resizer.left{
|
|
240
|
+
left:0;
|
|
241
|
+
}
|
|
242
|
+
.stk-table .stk-table-main .table-header-resizer.right{
|
|
243
|
+
right:0;
|
|
244
|
+
}
|
|
245
|
+
.stk-table .stk-table-main tbody tr{
|
|
246
|
+
background-color:var(--td-bgc);
|
|
247
|
+
height:var(--row-height);
|
|
248
|
+
}
|
|
249
|
+
.stk-table .stk-table-main tbody tr.highlight-row{
|
|
250
|
+
animation:stk-table-dim 2s linear;
|
|
251
|
+
}
|
|
252
|
+
.stk-table .stk-table-main tbody tr.hover,
|
|
253
|
+
.stk-table .stk-table-main tbody tr:hover{
|
|
254
|
+
background-color:var(--tr-hover-bgc);
|
|
255
|
+
}
|
|
256
|
+
.stk-table .stk-table-main tbody tr.active{
|
|
257
|
+
background-color:var(--tr-active-bgc);
|
|
258
|
+
}
|
|
259
|
+
.stk-table .stk-table-no-data{
|
|
260
|
+
background-color:var(--table-bgc);
|
|
261
|
+
line-height:var(--row-height);
|
|
262
|
+
text-align:center;
|
|
263
|
+
font-size:14px;
|
|
264
|
+
position:sticky;
|
|
265
|
+
left:0px;
|
|
266
|
+
border-right:var(--border-width) solid var(--border-color);
|
|
267
|
+
border-bottom:var(--border-width) solid var(--border-color);
|
|
268
|
+
display:flex;
|
|
269
|
+
flex-direction:column;
|
|
270
|
+
align-items:center;
|
|
271
|
+
justify-content:center;
|
|
272
|
+
}
|
|
273
|
+
.stk-table .stk-table-no-data.no-data-full{
|
|
274
|
+
flex:1;
|
|
275
|
+
}
|
|
276
|
+
.stk-table.virtual{
|
|
277
|
+
}
|
|
278
|
+
.stk-table.virtual .table-header-cell-wrapper{
|
|
279
|
+
overflow:hidden;
|
|
280
|
+
max-height:var(--header-row-height);
|
|
281
|
+
}
|
|
282
|
+
.stk-table.virtual tbody{
|
|
283
|
+
position:relative;
|
|
284
|
+
}
|
|
285
|
+
.stk-table.virtual tbody tr td{
|
|
286
|
+
height:var(--row-height);
|
|
287
|
+
line-height:1;
|
|
288
|
+
}
|
|
289
|
+
.stk-table.virtual tbody tr td .table-cell-wrapper{
|
|
290
|
+
max-height:var(--row-height);
|
|
291
|
+
overflow:hidden;
|
|
292
|
+
}
|
|
293
|
+
.stk-table.virtual .padding-top-tr td{
|
|
294
|
+
height:0;
|
|
295
|
+
}
|
|
296
|
+
.stk-table.virtual-x .virtual-x-left{
|
|
297
|
+
padding:0;
|
|
298
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export default class DragResize {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {HTMLElement} el
|
|
5
|
-
*/
|
|
6
|
-
constructor(el: HTMLElement);
|
|
7
|
-
buttonSize: {
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
};
|
|
11
|
-
/** @type {ResizeObserver} */
|
|
12
|
-
resizeObserver: ResizeObserver;
|
|
13
|
-
/** @type {DOMRect} */
|
|
14
|
-
targetDOMRect: DOMRect;
|
|
15
|
-
/** @type {{left:number,top:number}} */
|
|
16
|
-
resizeButtonStyle: {
|
|
17
|
-
left: number;
|
|
18
|
-
top: number;
|
|
19
|
-
};
|
|
20
|
-
el: HTMLElement;
|
|
21
|
-
initData(): void;
|
|
22
|
-
createResizeButton(): void;
|
|
23
|
-
resizeButton: HTMLElement | undefined;
|
|
24
|
-
/** 监听元素大小改变 */
|
|
25
|
-
onResize(): void;
|
|
26
|
-
addButtonHoverStyle(): void;
|
|
27
|
-
addEvent(): void;
|
|
28
|
-
}
|
|
1
|
+
export default class DragResize {
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {HTMLElement} el
|
|
5
|
+
*/
|
|
6
|
+
constructor(el: HTMLElement);
|
|
7
|
+
buttonSize: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
/** @type {ResizeObserver} */
|
|
12
|
+
resizeObserver: ResizeObserver;
|
|
13
|
+
/** @type {DOMRect} */
|
|
14
|
+
targetDOMRect: DOMRect;
|
|
15
|
+
/** @type {{left:number,top:number}} */
|
|
16
|
+
resizeButtonStyle: {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
};
|
|
20
|
+
el: HTMLElement;
|
|
21
|
+
initData(): void;
|
|
22
|
+
createResizeButton(): void;
|
|
23
|
+
resizeButton: HTMLElement | undefined;
|
|
24
|
+
/** 监听元素大小改变 */
|
|
25
|
+
onResize(): void;
|
|
26
|
+
addButtonHoverStyle(): void;
|
|
27
|
+
addEvent(): void;
|
|
28
|
+
}
|
package/lib/test/utils/h.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* createElement function
|
|
3
|
-
* h(tag[, text[,children]])
|
|
4
|
-
* h(tag[, attrs[,children]])
|
|
5
|
-
* h(tag[, children])
|
|
6
|
-
* @param {String} tag 标签名称,支持tag#id.class emmet写法,暂支持id ,class
|
|
7
|
-
* @param {Object | String | Number | Array<HTMLElement>} attrs 传Object为属性,传String为textContent,传数组为children
|
|
8
|
-
* @param {Array<HTMLElement>} children
|
|
9
|
-
*/
|
|
10
|
-
export default function h(tag: string, attrs: Object | string | number | Array<HTMLElement>, children: Array<HTMLElement>): HTMLElement;
|
|
1
|
+
/**
|
|
2
|
+
* createElement function
|
|
3
|
+
* h(tag[, text[,children]])
|
|
4
|
+
* h(tag[, attrs[,children]])
|
|
5
|
+
* h(tag[, children])
|
|
6
|
+
* @param {String} tag 标签名称,支持tag#id.class emmet写法,暂支持id ,class
|
|
7
|
+
* @param {Object | String | Number | Array<HTMLElement>} attrs 传Object为属性,传String为textContent,传数组为children
|
|
8
|
+
* @param {Array<HTMLElement>} children
|
|
9
|
+
*/
|
|
10
|
+
export default function h(tag: string, attrs: Object | string | number | Array<HTMLElement>, children: Array<HTMLElement>): HTMLElement;
|