bkui-vue 2.0.1-beta.39 → 2.0.1-beta.39.table.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.
Files changed (48) hide show
  1. package/dist/index.cjs.js +63 -63
  2. package/dist/index.esm.js +15769 -15734
  3. package/dist/index.umd.js +63 -63
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/index.js +1 -1
  7. package/lib/scrollbar/{scrollbar.css → css/scrollbar.css} +90 -75
  8. package/lib/scrollbar/css/scrollbar.less +139 -0
  9. package/lib/scrollbar/{scrollbar.variable.css → css/scrollbar.variable.css} +89 -74
  10. package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
  11. package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
  12. package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
  13. package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
  14. package/lib/scrollbar/handlers/touch.d.ts +4 -0
  15. package/lib/scrollbar/helper/class-names.d.ts +21 -0
  16. package/lib/scrollbar/helper/css.d.ts +3 -0
  17. package/lib/scrollbar/helper/dom.d.ts +4 -0
  18. package/lib/scrollbar/helper/event-manager.d.ts +20 -0
  19. package/lib/scrollbar/helper/util.d.ts +11 -0
  20. package/lib/scrollbar/index.d.ts +133 -13
  21. package/lib/scrollbar/index.js +1331 -18489
  22. package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
  23. package/lib/scrollbar/update-geometry.d.ts +8 -0
  24. package/lib/styles/index.d.ts +1 -0
  25. package/lib/table/hooks/use-columns.d.ts +4 -1
  26. package/lib/table/hooks/use-layout.d.ts +1 -0
  27. package/lib/table/index.js +140 -66
  28. package/lib/table/table.css +108 -115
  29. package/lib/table/table.less +24 -34
  30. package/lib/table/table.variable.css +108 -115
  31. package/lib/table-column/index.js +4 -0
  32. package/lib/tree/tree.css +90 -83
  33. package/lib/tree/tree.variable.css +90 -83
  34. package/lib/virtual-render/index.d.ts +0 -23
  35. package/lib/virtual-render/index.js +54 -106
  36. package/lib/virtual-render/props.d.ts +0 -6
  37. package/lib/virtual-render/use-scrollbar.d.ts +3 -17
  38. package/lib/virtual-render/virtual-render.css +89 -82
  39. package/lib/virtual-render/virtual-render.d.ts +0 -11
  40. package/lib/virtual-render/virtual-render.less +2 -11
  41. package/lib/virtual-render/virtual-render.variable.css +89 -82
  42. package/package.json +1 -1
  43. package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
  44. package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
  45. package/lib/scrollbar/scrollbar-core/index.d.ts +0 -242
  46. package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
  47. package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
  48. package/lib/scrollbar/scrollbar.less +0 -119
@@ -145,111 +145,118 @@
145
145
  .bk-F-scroll-y::-webkit-scrollbar-thumb {
146
146
  border-radius: 4px;
147
147
  }
148
- .bk-scrollbar-wrapper {
149
- position: relative;
150
- overflow: hidden;
148
+ .bk-scrollbar {
149
+ overflow: hidden !important;
150
+ overflow-anchor: none;
151
+ touch-action: auto;
152
+ /*
153
+ * Scrollbar rail styles
154
+ */
155
+ /*
156
+ * Scrollbar thumb styles
157
+ */
158
+ }
159
+ .bk-scrollbar.bk--active-x > .bk__rail-x,
160
+ .bk-scrollbar.bk--active-y > .bk__rail-y {
161
+ display: block;
151
162
  }
152
- .bk-scrollbar-wrapper .bk-scrollbar-content-el {
153
- display: inline-flex;
154
- flex-direction: column;
155
- width: 100%;
163
+ .bk-scrollbar .bk__rail-x:hover,
164
+ .bk-scrollbar .bk__rail-y:hover,
165
+ .bk-scrollbar .bk__rail-x:focus,
166
+ .bk-scrollbar .bk__rail-y:focus,
167
+ .bk-scrollbar .bk__rail-x.bk--clicking,
168
+ .bk-scrollbar .bk__rail-y.bk--clicking {
169
+ background-color: #f0f1f5;
156
170
  }
157
- .bk-scrollbar-wrapper .bk-scrollbar-track {
158
- z-index: 1;
171
+ .bk-scrollbar .bk__rail-x {
172
+ display: none;
173
+ opacity: 0;
174
+ transition: background-color 0.2s linear, opacity 0.2s linear;
175
+ height: 10px;
176
+ bottom: 0px;
159
177
  position: absolute;
160
- right: 0;
161
- bottom: 0;
162
- pointer-events: none;
163
- overflow: hidden;
164
178
  }
165
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-vertical {
166
- width: 6px;
167
- }
168
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-vertical.bk-scrollbar-hover {
169
- width: 8px;
170
- }
171
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-horizontal {
172
- height: 6px;
173
- }
174
- .bk-scrollbar-wrapper .bk-scrollbar-track.track-small.bk-scrollbar-horizontal.bk-scrollbar-hover {
179
+ .bk-scrollbar .bk__rail-x.bk-size-small {
175
180
  height: 8px;
176
181
  }
177
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover {
178
- background-color: #f0f1f5;
179
- cursor: pointer;
182
+ .bk-scrollbar .bk__rail-x.bk-size-small .bk__thumb-x {
183
+ height: 6px;
180
184
  }
181
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-hover .bk-scrollbar::before {
182
- background-color: #979ba5;
185
+ .bk-scrollbar .bk__rail-y {
186
+ display: none;
187
+ opacity: 0;
188
+ transition: background-color 0.2s linear, opacity 0.2s linear;
189
+ width: 10px;
190
+ right: 0px;
191
+ position: absolute;
192
+ margin-right: 2px;
183
193
  }
184
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical {
185
- top: 0;
194
+ .bk-scrollbar .bk__rail-y.bk-size-small {
186
195
  width: 8px;
187
- transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
188
196
  }
189
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-vertical.bk-scrollbar-hover {
190
- width: 10px;
197
+ .bk-scrollbar .bk__rail-y.bk-size-small .bk__thumb-y {
198
+ width: 6px;
191
199
  }
192
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal {
193
- left: 0;
200
+ .bk-scrollbar:hover > .bk__rail-x,
201
+ .bk-scrollbar:hover > .bk__rail-y,
202
+ .bk-scrollbar.bk--focus > .bk__rail-x,
203
+ .bk-scrollbar.bk--focus > .bk__rail-y,
204
+ .bk-scrollbar.bk--scrolling-x > .bk__rail-x,
205
+ .bk-scrollbar.bk--scrolling-y > .bk__rail-y {
206
+ opacity: 0.9;
207
+ }
208
+ .bk-scrollbar .bk__thumb-x {
209
+ background-color: #dcdee5;
210
+ border-radius: 8px;
211
+ transition: background-color 0.2s linear, height 0.2s ease-in-out;
194
212
  height: 8px;
195
- transform: translate(var(--scroll-offset-x), var(--scroll-offset-y));
213
+ bottom: 0px;
214
+ position: absolute;
215
+ }
216
+ .bk-scrollbar .bk__thumb-y {
217
+ background-color: #dcdee5;
218
+ border-radius: 8px;
219
+ transition: background-color 0.2s linear, width 0.2s ease-in-out;
220
+ width: 8px;
221
+ right: 0px;
222
+ position: absolute;
196
223
  }
197
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar-hover {
224
+ .bk-scrollbar .bk__rail-x:hover > .bk__thumb-x,
225
+ .bk-scrollbar .bk__rail-x:focus > .bk__thumb-x,
226
+ .bk-scrollbar .bk__rail-x.bk--clicking .bk__thumb-x {
227
+ background-color: #979ba5;
198
228
  height: 10px;
199
229
  }
200
- .bk-scrollbar-wrapper .bk-scrollbar-track.bk-scrollbar-horizontal.bk-scrollbar {
201
- right: auto;
202
- left: 0;
203
- top: 0;
204
- bottom: 0;
205
- min-height: 0;
206
- min-width: 8px;
207
- width: auto;
230
+ .bk-scrollbar .bk__rail-y:hover > .bk__thumb-y,
231
+ .bk-scrollbar .bk__rail-y:focus > .bk__thumb-y,
232
+ .bk-scrollbar .bk__rail-y.bk--clicking .bk__thumb-y {
233
+ background-color: #979ba5;
234
+ width: 10px;
208
235
  }
209
- .bk-scrollbar-wrapper .bk-scrollbar-dragging {
210
- pointer-events: none;
211
- -webkit-touch-callout: none;
212
- -webkit-user-select: none;
213
- -khtml-user-select: none;
214
- -moz-user-select: none;
215
- -ms-user-select: none;
216
- user-select: none;
236
+ .bk-scrollbar .bk-size-small > .bk__thumb-x,
237
+ .bk-scrollbar .bk-size-small > .bk__thumb-x,
238
+ .bk-scrollbar .bk-size-small.bk--clicking .bk__thumb-x {
239
+ height: 8px;
217
240
  }
218
- .bk-scrollbar-wrapper .bk-scrollbar {
219
- position: absolute;
220
- left: 0;
221
- right: 0;
222
- top: 0;
223
- bottom: 0;
241
+ .bk-scrollbar .bk-size-small:hover > .bk__thumb-y,
242
+ .bk-scrollbar .bk-size-small:focus > .bk__thumb-y,
243
+ .bk-scrollbar .bk-size-small.bk--clicking .bk__thumb-y {
244
+ width: 8px;
224
245
  }
225
- .bk-scrollbar-wrapper .bk-scrollbar::before {
226
- position: absolute;
227
- content: '';
228
- background: #dcdee5;
229
- border-radius: 6px;
230
- left: 0;
231
- right: 0;
232
- top: 0;
233
- bottom: 0;
234
- opacity: 0;
235
- transition: opacity 0.2s 0.9s linear;
246
+ /* MS supports */
247
+ @supports (-ms-overflow-style: none) {
248
+ .bk-scrollbar {
249
+ overflow: auto !important;
250
+ }
236
251
  }
237
- .bk-scrollbar-wrapper .bk-scrollbar.bk-scrollbar-visible::before {
238
- opacity: 0.9;
239
- transition-delay: 0s;
240
- transition-duration: 0s;
252
+ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
253
+ .bk-scrollbar {
254
+ overflow: auto !important;
255
+ }
241
256
  }
242
257
  .bk-virtual-render {
243
258
  position: relative;
244
259
  }
245
- .bk-virtual-render .bk-virtual-content {
246
- position: absolute;
247
- top: 0;
248
- bottom: 0;
249
- left: 0;
250
- width: 100%;
251
- height: 100%;
252
- }
253
260
  .bk-virtual-render .bk-virtual-section {
254
261
  width: 1px;
255
262
  background: transparent;
@@ -1251,7 +1258,7 @@
1251
1258
  overflow: hidden;
1252
1259
  }
1253
1260
  .bk-table .bk-table-body .prepend-row {
1254
- transform: translate3d(var(--translate-x), 0, 0);
1261
+ transform: translate(var(--translate-x), 0);
1255
1262
  }
1256
1263
  .bk-table .bk-table-body .resize-column {
1257
1264
  position: absolute;
@@ -1260,7 +1267,7 @@
1260
1267
  left: 0;
1261
1268
  width: 1px;
1262
1269
  background-color: #3785ff;
1263
- transform: translate3d(var(--drag-offset-x), var(--translate-y), 0);
1270
+ transform: translate(var(--drag-offset-x), var(--translate-y));
1264
1271
  }
1265
1272
  .bk-table .bk-table-body-content.bk-stripe table tbody tr:nth-child(even) td {
1266
1273
  background-color: var(--table-strip-color);
@@ -1429,24 +1436,6 @@
1429
1436
  font-weight: 400;
1430
1437
  background-color: var(--background-color);
1431
1438
  }
1432
- .bk-table .bk-table-head table thead th.col-resize-hover::after,
1433
- .bk-table .bk-table-body table thead th.col-resize-hover::after {
1434
- position: absolute;
1435
- top: 0;
1436
- right: 0;
1437
- bottom: 0;
1438
- z-index: 1;
1439
- width: 6px;
1440
- pointer-events: none;
1441
- background-color: #3785ff;
1442
- content: '';
1443
- transform: translateX(50%);
1444
- cursor: col-resize;
1445
- }
1446
- .bk-table .bk-table-head table thead th.col-resize-hover .cell,
1447
- .bk-table .bk-table-body table thead th.col-resize-hover .cell {
1448
- cursor: col-resize;
1449
- }
1450
1439
  .bk-table .bk-table-head table thead th .cell,
1451
1440
  .bk-table .bk-table-body table thead th .cell {
1452
1441
  display: flex;
@@ -1454,17 +1443,21 @@
1454
1443
  height: calc(var(--row-height) - 2px);
1455
1444
  color: var(--table-head-font-color);
1456
1445
  }
1457
- .bk-table .bk-table-head table thead th.active,
1458
- .bk-table .bk-table-body table thead th.active,
1459
- .bk-table .bk-table-head table thead th:hover,
1460
- .bk-table .bk-table-body table thead th:hover {
1461
- cursor: pointer;
1462
- background: var(--table-row-active-bg-color);
1446
+ .bk-table .bk-table-head table thead th .cell.cell-resize,
1447
+ .bk-table .bk-table-body table thead th .cell.cell-resize {
1448
+ cursor: col-resize;
1463
1449
  }
1464
1450
  .bk-table .bk-table-head table thead th.column_fixed,
1465
1451
  .bk-table .bk-table-body table thead th.column_fixed {
1466
1452
  transform: translateX(var(--translate-x));
1467
1453
  }
1454
+ .bk-table .bk-table-head table:not(.col-resize-hover) thead th.active,
1455
+ .bk-table .bk-table-body table:not(.col-resize-hover) thead th.active,
1456
+ .bk-table .bk-table-head table:not(.col-resize-hover) thead th:hover,
1457
+ .bk-table .bk-table-body table:not(.col-resize-hover) thead th:hover {
1458
+ cursor: pointer;
1459
+ background: var(--table-row-active-bg-color);
1460
+ }
1468
1461
  .bk-table .bk-table-head table tbody tr td,
1469
1462
  .bk-table .bk-table-body table tbody tr td {
1470
1463
  background-color: #fff;
@@ -1504,6 +1497,7 @@
1504
1497
  overflow: hidden;
1505
1498
  background-color: var(--background-color);
1506
1499
  height: var(--row-height);
1500
+ min-height: var(--row-height);
1507
1501
  }
1508
1502
  .bk-table .bk-table-head.has-group .is-head-group {
1509
1503
  border-bottom: 1px solid var(--table-border-color);
@@ -1522,16 +1516,14 @@
1522
1516
  z-index: 1;
1523
1517
  width: 6px;
1524
1518
  background-color: #3785ff;
1525
- transform: translate3d(var(--drag-offset-h-x), 0, 0);
1526
- }
1527
- .bk-table .bk-table-head .col-resize-drag:hover {
1528
- cursor: ew-resize !important;
1519
+ transform: translate(var(--drag-offset-h-x), 0);
1520
+ pointer-events: none;
1529
1521
  }
1530
1522
  .bk-table .bk-table-head .bk-table-fixed {
1531
- transform: translate3d(0, 0, 0);
1523
+ transform: translate(0, 0);
1532
1524
  }
1533
1525
  .bk-table .bk-table-head thead {
1534
- transform: translate3d(var(--translate-x-1), 0, 0);
1526
+ transform: translate(var(--translate-x-1), 0);
1535
1527
  }
1536
1528
  .bk-table .bk-table-head .table-head-settings {
1537
1529
  position: absolute;
@@ -1558,6 +1550,7 @@
1558
1550
  display: flex;
1559
1551
  width: 100%;
1560
1552
  height: var(--footer-height);
1553
+ min-height: var(--footer-height);
1561
1554
  align-items: center;
1562
1555
  padding: 0 16px 0 22px;
1563
1556
  }
@@ -1628,7 +1621,7 @@
1628
1621
  bottom: 0;
1629
1622
  left: 0;
1630
1623
  pointer-events: none;
1631
- transform: translate3d(var(--translate-x), var(--translate-y), 0);
1624
+ transform: translate(var(--translate-x), var(--translate-y));
1632
1625
  }
1633
1626
  .bk-table .bk-table-fixed .column_fixed_right {
1634
1627
  box-shadow: var(--shadow-right);
@@ -41,7 +41,7 @@
41
41
  }
42
42
 
43
43
  .prepend-row {
44
- transform: translate3d(var(--translate-x), 0, 0);
44
+ transform: translate(var(--translate-x), 0);
45
45
  }
46
46
 
47
47
  .resize-column {
@@ -51,7 +51,7 @@
51
51
  left: 0;
52
52
  width: 1px;
53
53
  background-color: #3785ff;
54
- transform: translate3d(var(--drag-offset-x), var(--translate-y), 0);
54
+ transform: translate(var(--drag-offset-x), var(--translate-y));
55
55
  }
56
56
  }
57
57
 
@@ -215,37 +215,15 @@
215
215
  font-weight: 400;
216
216
  background-color: var(--background-color);
217
217
 
218
- &.col-resize-hover {
219
- &::after {
220
- position: absolute;
221
- top: 0;
222
- right: 0;
223
- bottom: 0;
224
- z-index: 1;
225
- width: 6px;
226
- pointer-events: none;
227
- background-color: #3785ff;
228
- content: '';
229
- transform: translateX(50%);
230
- cursor: col-resize;
231
- }
232
-
233
- .cell {
234
- cursor: col-resize;
235
- }
236
- }
237
-
238
218
  .cell {
239
219
  display: flex;
240
220
  align-items: center;
241
221
  height: calc(var(--row-height) - 2px);
242
222
  color: @table-head-font-color;
243
- }
244
223
 
245
- &.active,
246
- &:hover {
247
- cursor: pointer;
248
- background: @table-row-active-bg-color;
224
+ &.cell-resize {
225
+ cursor: col-resize;
226
+ }
249
227
  }
250
228
 
251
229
  &.column_fixed {
@@ -254,6 +232,18 @@
254
232
  }
255
233
  }
256
234
 
235
+ &:not(.col-resize-hover) {
236
+ thead {
237
+ th {
238
+ &.active,
239
+ &:hover {
240
+ cursor: pointer;
241
+ background: @table-row-active-bg-color;
242
+ }
243
+ }
244
+ }
245
+ }
246
+
257
247
  tbody {
258
248
  tr {
259
249
  td {
@@ -308,6 +298,7 @@
308
298
  overflow: hidden;
309
299
  background-color: var(--background-color);
310
300
  height: var(--row-height);
301
+ min-height: var(--row-height);
311
302
 
312
303
  &.has-group {
313
304
  .is-head-group {
@@ -331,18 +322,16 @@
331
322
  z-index: 1;
332
323
  width: 6px;
333
324
  background-color: #3785ff;
334
- transform: translate3d(var(--drag-offset-h-x), 0, 0);
335
- &:hover {
336
- cursor: ew-resize !important;
337
- }
325
+ transform: translate(var(--drag-offset-h-x), 0);
326
+ pointer-events: none;
338
327
  }
339
328
 
340
329
  .@{bk-prefix}-table-fixed {
341
- transform: translate3d(0, 0, 0);
330
+ transform: translate(0, 0);
342
331
  }
343
332
 
344
333
  thead {
345
- transform: translate3d(var(--translate-x-1), 0, 0);
334
+ transform: translate(var(--translate-x-1), 0);
346
335
  }
347
336
 
348
337
  .table-head-settings {
@@ -374,6 +363,7 @@
374
363
  display: flex;
375
364
  width: 100%;
376
365
  height: var(--footer-height);
366
+ min-height: var(--footer-height);
377
367
  align-items: center;
378
368
  padding: 0 16px 0 22px;
379
369
 
@@ -485,7 +475,7 @@
485
475
  bottom: 0;
486
476
  left: 0;
487
477
  pointer-events: none;
488
- transform: translate3d(var(--translate-x), var(--translate-y), 0);
478
+ transform: translate(var(--translate-x), var(--translate-y));
489
479
 
490
480
  .column_fixed_right {
491
481
  box-shadow: var(--shadow-right);