@lensui/lens-table 0.1.4 → 0.1.6
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 +46 -61
- package/dist/index.cjs +764 -170
- package/dist/index.css +362 -31
- package/dist/index.d.cts +39 -33
- package/dist/index.d.ts +39 -33
- package/dist/index.js +764 -170
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--rvg-color-primary-soft: #edf4ff;
|
|
16
16
|
--rvg-color-selection-fill: #edf4ff;
|
|
17
17
|
--rvg-color-axis-selection-fill: #e8f2ff;
|
|
18
|
+
--rvg-color-column-drop-target-fill: #eeeeee;
|
|
18
19
|
--rvg-color-range-fill: #e8f1ff;
|
|
19
20
|
--rvg-color-row-hover-fill: #f6f9fc;
|
|
20
21
|
--rvg-color-hover: #f1f4f8;
|
|
@@ -121,10 +122,17 @@
|
|
|
121
122
|
}
|
|
122
123
|
.rvg-vertical-scrollbar {
|
|
123
124
|
right: 2px;
|
|
125
|
+
left: auto;
|
|
124
126
|
width: 9px;
|
|
127
|
+
max-width: 9px;
|
|
128
|
+
overflow: hidden;
|
|
125
129
|
}
|
|
126
130
|
.rvg-horizontal-scrollbar {
|
|
131
|
+
top: auto;
|
|
132
|
+
width: auto;
|
|
127
133
|
height: 9px;
|
|
134
|
+
max-height: 9px;
|
|
135
|
+
overflow: hidden;
|
|
128
136
|
}
|
|
129
137
|
.rvg-vertical-scrollbar-thumb,
|
|
130
138
|
.rvg-horizontal-scrollbar-thumb {
|
|
@@ -137,14 +145,22 @@
|
|
|
137
145
|
.rvg-vertical-scrollbar-thumb {
|
|
138
146
|
top: 0;
|
|
139
147
|
right: 1px;
|
|
148
|
+
bottom: auto;
|
|
149
|
+
left: auto;
|
|
140
150
|
width: 7px;
|
|
151
|
+
min-width: 0;
|
|
152
|
+
max-width: 7px;
|
|
141
153
|
min-height: 28px;
|
|
142
154
|
}
|
|
143
155
|
.rvg-horizontal-scrollbar-thumb {
|
|
156
|
+
top: auto;
|
|
157
|
+
right: auto;
|
|
144
158
|
bottom: 1px;
|
|
145
159
|
left: 0;
|
|
146
|
-
height: 7px;
|
|
147
160
|
min-width: 36px;
|
|
161
|
+
min-height: 0;
|
|
162
|
+
height: 7px;
|
|
163
|
+
max-height: 7px;
|
|
148
164
|
}
|
|
149
165
|
.rvg-vertical-scrollbar:hover .rvg-vertical-scrollbar-thumb,
|
|
150
166
|
.rvg-horizontal-scrollbar:hover .rvg-horizontal-scrollbar-thumb,
|
|
@@ -203,9 +219,7 @@
|
|
|
203
219
|
.rvg-cell-text {
|
|
204
220
|
transition: transform 140ms ease, opacity 100ms ease;
|
|
205
221
|
}
|
|
206
|
-
.rvg-row-drop-settling .rvg-cell-text
|
|
207
|
-
.rvg-row-drop-settling .rvg-row-drag-icon,
|
|
208
|
-
.rvg-row-drop-settling .rvg-row-selection-icon {
|
|
222
|
+
.rvg-row-drop-settling .rvg-cell-text {
|
|
209
223
|
transition: none;
|
|
210
224
|
}
|
|
211
225
|
.rvg-cell-text > span,
|
|
@@ -225,20 +239,6 @@
|
|
|
225
239
|
white-space: normal;
|
|
226
240
|
text-overflow: clip;
|
|
227
241
|
}
|
|
228
|
-
.rvg-row-drag-icon {
|
|
229
|
-
position: absolute;
|
|
230
|
-
display: grid;
|
|
231
|
-
place-items: center;
|
|
232
|
-
pointer-events: none;
|
|
233
|
-
transition: transform 140ms ease, opacity 100ms ease;
|
|
234
|
-
}
|
|
235
|
-
.rvg-row-drag-icon svg {
|
|
236
|
-
display: block;
|
|
237
|
-
width: 16px;
|
|
238
|
-
height: 16px;
|
|
239
|
-
overflow: visible;
|
|
240
|
-
fill: var(--rvg-color-icon);
|
|
241
|
-
}
|
|
242
242
|
.rvg-cell-render {
|
|
243
243
|
position: absolute;
|
|
244
244
|
z-index: 1;
|
|
@@ -421,16 +421,12 @@
|
|
|
421
421
|
background: #fce8e6;
|
|
422
422
|
color: #d93025;
|
|
423
423
|
}
|
|
424
|
-
.rvg-row-selection-icon,
|
|
425
424
|
.rvg-header-selection-icon {
|
|
426
425
|
position: absolute;
|
|
427
426
|
display: grid;
|
|
428
427
|
place-items: center;
|
|
429
428
|
pointer-events: none;
|
|
430
429
|
}
|
|
431
|
-
.rvg-row-selection-icon {
|
|
432
|
-
transition: transform 140ms ease, opacity 100ms ease;
|
|
433
|
-
}
|
|
434
430
|
.rvg-selection-svg {
|
|
435
431
|
display: block;
|
|
436
432
|
width: 16px;
|
|
@@ -463,10 +459,280 @@
|
|
|
463
459
|
}
|
|
464
460
|
.rvg-selection-focus {
|
|
465
461
|
position: absolute;
|
|
466
|
-
z-index:
|
|
462
|
+
z-index: 7;
|
|
467
463
|
border: 2px solid var(--rvg-color-primary);
|
|
468
464
|
box-sizing: border-box;
|
|
469
465
|
pointer-events: none;
|
|
466
|
+
transition: transform 140ms ease;
|
|
467
|
+
}
|
|
468
|
+
.rvg-selection-edge-target {
|
|
469
|
+
position: absolute;
|
|
470
|
+
z-index: 6;
|
|
471
|
+
display: block;
|
|
472
|
+
min-width: 0;
|
|
473
|
+
min-height: 0;
|
|
474
|
+
margin: 0;
|
|
475
|
+
padding: 0;
|
|
476
|
+
overflow: visible;
|
|
477
|
+
border: 0;
|
|
478
|
+
border-radius: 0;
|
|
479
|
+
outline: 0;
|
|
480
|
+
appearance: none;
|
|
481
|
+
box-shadow: none;
|
|
482
|
+
box-sizing: border-box;
|
|
483
|
+
background: transparent;
|
|
484
|
+
color: transparent;
|
|
485
|
+
font: inherit;
|
|
486
|
+
line-height: 0;
|
|
487
|
+
cursor: pointer;
|
|
488
|
+
touch-action: manipulation;
|
|
489
|
+
-webkit-appearance: none;
|
|
490
|
+
}
|
|
491
|
+
.rvg-selection-edge-target::before,
|
|
492
|
+
.rvg-selection-edge-target::after {
|
|
493
|
+
position: absolute;
|
|
494
|
+
content: "";
|
|
495
|
+
pointer-events: none;
|
|
496
|
+
}
|
|
497
|
+
.rvg-selection-edge-target.is-shape-syncing::before,
|
|
498
|
+
.rvg-selection-edge-target.is-shape-syncing::after,
|
|
499
|
+
.rvg-selection-edge-target.is-shape-syncing .rvg-selection-edge-halo {
|
|
500
|
+
transition: none;
|
|
501
|
+
}
|
|
502
|
+
.rvg-selection-edge-target::before {
|
|
503
|
+
z-index: 1;
|
|
504
|
+
border-radius: 2px;
|
|
505
|
+
background-color: transparent;
|
|
506
|
+
background-image: linear-gradient(var(--rvg-color-primary), var(--rvg-color-primary));
|
|
507
|
+
background-repeat: no-repeat;
|
|
508
|
+
box-shadow: 0 0 0 rgba(22, 119, 255, 0);
|
|
509
|
+
transition:
|
|
510
|
+
top 160ms ease,
|
|
511
|
+
right 160ms ease,
|
|
512
|
+
bottom 160ms ease,
|
|
513
|
+
left 160ms ease,
|
|
514
|
+
width 140ms ease,
|
|
515
|
+
height 140ms ease,
|
|
516
|
+
background-size 140ms ease,
|
|
517
|
+
box-shadow 160ms ease;
|
|
518
|
+
}
|
|
519
|
+
.rvg-selection-edge-target::after {
|
|
520
|
+
inset: 2px;
|
|
521
|
+
border-radius: 4px;
|
|
522
|
+
opacity: 0;
|
|
523
|
+
background: rgba(22, 119, 255, 0.1);
|
|
524
|
+
transform: scale(.72);
|
|
525
|
+
transition: opacity 140ms ease, transform 160ms ease;
|
|
526
|
+
}
|
|
527
|
+
.rvg-selection-edge-target:not(.is-corner)::after {
|
|
528
|
+
display: none;
|
|
529
|
+
}
|
|
530
|
+
.rvg-selection-edge-halo {
|
|
531
|
+
position: absolute;
|
|
532
|
+
z-index: 0;
|
|
533
|
+
display: none;
|
|
534
|
+
opacity: 0;
|
|
535
|
+
pointer-events: none;
|
|
536
|
+
transition: opacity 160ms ease;
|
|
537
|
+
}
|
|
538
|
+
.rvg-selection-edge-halo svg {
|
|
539
|
+
display: block;
|
|
540
|
+
width: 100%;
|
|
541
|
+
height: 100%;
|
|
542
|
+
overflow: visible;
|
|
543
|
+
}
|
|
544
|
+
.rvg-selection-edge-halo path {
|
|
545
|
+
fill: none;
|
|
546
|
+
stroke: rgba(22, 119, 255, 0.12);
|
|
547
|
+
stroke-width: 11;
|
|
548
|
+
stroke-linecap: round;
|
|
549
|
+
stroke-linejoin: miter;
|
|
550
|
+
vector-effect: non-scaling-stroke;
|
|
551
|
+
}
|
|
552
|
+
.rvg-selection-edge-target.is-vertical::before {
|
|
553
|
+
top: 0;
|
|
554
|
+
bottom: 0;
|
|
555
|
+
left: 50%;
|
|
556
|
+
width: 2px;
|
|
557
|
+
background-position: center;
|
|
558
|
+
background-size: 2px 100%;
|
|
559
|
+
transform: translateX(-50%) scaleY(1);
|
|
560
|
+
}
|
|
561
|
+
.rvg-selection-edge-target.is-horizontal::before {
|
|
562
|
+
top: 50%;
|
|
563
|
+
right: 0;
|
|
564
|
+
left: 0;
|
|
565
|
+
height: 2px;
|
|
566
|
+
background-position: center;
|
|
567
|
+
background-size: 100% 2px;
|
|
568
|
+
transform: translateY(-50%) scaleX(1);
|
|
569
|
+
}
|
|
570
|
+
.rvg-selection-edge-target.is-vertical.is-viewport-left::before {
|
|
571
|
+
right: auto;
|
|
572
|
+
left: 6px;
|
|
573
|
+
transform: none;
|
|
574
|
+
}
|
|
575
|
+
.rvg-selection-edge-target.is-vertical.is-viewport-right::before {
|
|
576
|
+
right: 6px;
|
|
577
|
+
left: auto;
|
|
578
|
+
transform: none;
|
|
579
|
+
}
|
|
580
|
+
.rvg-selection-edge-target.is-horizontal.is-viewport-top::before {
|
|
581
|
+
top: 6px;
|
|
582
|
+
bottom: auto;
|
|
583
|
+
transform: none;
|
|
584
|
+
}
|
|
585
|
+
.rvg-selection-edge-target.is-horizontal.is-viewport-bottom::before {
|
|
586
|
+
top: auto;
|
|
587
|
+
bottom: 6px;
|
|
588
|
+
transform: none;
|
|
589
|
+
}
|
|
590
|
+
.rvg-selection-edge-target.is-corner {
|
|
591
|
+
--rvg-corner-hover-width-extension: 4px;
|
|
592
|
+
--rvg-corner-hover-height-extension: 4px;
|
|
593
|
+
}
|
|
594
|
+
.rvg-selection-edge-target.is-corner::before {
|
|
595
|
+
width: 2px;
|
|
596
|
+
height: var(--rvg-corner-height, 10px);
|
|
597
|
+
border-radius: 0;
|
|
598
|
+
opacity: 1;
|
|
599
|
+
background: var(--rvg-color-primary);
|
|
600
|
+
box-shadow: 0 0 0 rgba(22, 119, 255, 0);
|
|
601
|
+
transform: none;
|
|
602
|
+
transition: width 140ms ease, box-shadow 160ms ease;
|
|
603
|
+
}
|
|
604
|
+
.rvg-selection-edge-target.is-corner::after {
|
|
605
|
+
z-index: 1;
|
|
606
|
+
inset: auto;
|
|
607
|
+
width: var(--rvg-corner-width, 10px);
|
|
608
|
+
height: 2px;
|
|
609
|
+
border-radius: 0;
|
|
610
|
+
opacity: 1;
|
|
611
|
+
background: var(--rvg-color-primary);
|
|
612
|
+
box-shadow: 0 0 0 rgba(22, 119, 255, 0);
|
|
613
|
+
transform: none;
|
|
614
|
+
transition: height 140ms ease, box-shadow 160ms ease;
|
|
615
|
+
}
|
|
616
|
+
.rvg-selection-edge-target.is-corner.is-top-left::before,
|
|
617
|
+
.rvg-selection-edge-target.is-corner.is-top-left::after {
|
|
618
|
+
top: 6px;
|
|
619
|
+
left: 6px;
|
|
620
|
+
}
|
|
621
|
+
.rvg-selection-edge-target.is-corner.is-top-right::before,
|
|
622
|
+
.rvg-selection-edge-target.is-corner.is-top-right::after {
|
|
623
|
+
top: 6px;
|
|
624
|
+
right: 6px;
|
|
625
|
+
}
|
|
626
|
+
.rvg-selection-edge-target.is-corner.is-bottom-left::before,
|
|
627
|
+
.rvg-selection-edge-target.is-corner.is-bottom-left::after {
|
|
628
|
+
bottom: 6px;
|
|
629
|
+
left: 6px;
|
|
630
|
+
}
|
|
631
|
+
.rvg-selection-edge-target.is-corner.is-bottom-right::before,
|
|
632
|
+
.rvg-selection-edge-target.is-corner.is-bottom-right::after {
|
|
633
|
+
right: 6px;
|
|
634
|
+
bottom: 6px;
|
|
635
|
+
}
|
|
636
|
+
.rvg-selection-edge-target.is-corner:is(.is-top-left, .is-top-right)::before {
|
|
637
|
+
border-radius: 0 0 999px 999px;
|
|
638
|
+
}
|
|
639
|
+
.rvg-selection-edge-target.is-corner:is(.is-bottom-left, .is-bottom-right)::before {
|
|
640
|
+
border-radius: 999px 999px 0 0;
|
|
641
|
+
}
|
|
642
|
+
.rvg-selection-edge-target.is-corner:is(.is-top-left, .is-bottom-left)::after {
|
|
643
|
+
border-radius: 0 999px 999px 0;
|
|
644
|
+
}
|
|
645
|
+
.rvg-selection-edge-target.is-corner:is(.is-top-right, .is-bottom-right)::after {
|
|
646
|
+
border-radius: 999px 0 0 999px;
|
|
647
|
+
}
|
|
648
|
+
.rvg-selection-edge-target.is-corner .rvg-selection-edge-halo {
|
|
649
|
+
display: block;
|
|
650
|
+
width: max(0px, calc(var(--rvg-corner-width, 10px) + var(--rvg-corner-hover-width-extension) - 5px));
|
|
651
|
+
height: max(0px, calc(var(--rvg-corner-height, 10px) + var(--rvg-corner-hover-height-extension) - 5px));
|
|
652
|
+
transform-origin: center;
|
|
653
|
+
}
|
|
654
|
+
.rvg-selection-edge-target.is-corner.is-top-left .rvg-selection-edge-halo {
|
|
655
|
+
top: 8.5px;
|
|
656
|
+
left: 8.5px;
|
|
657
|
+
}
|
|
658
|
+
.rvg-selection-edge-target.is-corner.is-top-right .rvg-selection-edge-halo {
|
|
659
|
+
top: 8.5px;
|
|
660
|
+
right: 8.5px;
|
|
661
|
+
transform: scaleX(-1);
|
|
662
|
+
}
|
|
663
|
+
.rvg-selection-edge-target.is-corner.is-bottom-left .rvg-selection-edge-halo {
|
|
664
|
+
bottom: 8.5px;
|
|
665
|
+
left: 8.5px;
|
|
666
|
+
transform: scaleY(-1);
|
|
667
|
+
}
|
|
668
|
+
.rvg-selection-edge-target.is-corner.is-bottom-right .rvg-selection-edge-halo {
|
|
669
|
+
right: 8.5px;
|
|
670
|
+
bottom: 8.5px;
|
|
671
|
+
transform: scale(-1);
|
|
672
|
+
}
|
|
673
|
+
.rvg-selection-edge-target.is-corner:hover .rvg-selection-edge-halo,
|
|
674
|
+
.rvg-selection-edge-target.is-corner:focus-visible .rvg-selection-edge-halo {
|
|
675
|
+
opacity: 1;
|
|
676
|
+
}
|
|
677
|
+
.rvg-selection-edge-target.is-vertical:hover::before,
|
|
678
|
+
.rvg-selection-edge-target.is-vertical:focus-visible::before {
|
|
679
|
+
top: -4px;
|
|
680
|
+
bottom: -4px;
|
|
681
|
+
width: 5px;
|
|
682
|
+
background-size: 5px 100%;
|
|
683
|
+
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
|
|
684
|
+
transform: translateX(-50%);
|
|
685
|
+
}
|
|
686
|
+
.rvg-selection-edge-target.is-horizontal:hover::before,
|
|
687
|
+
.rvg-selection-edge-target.is-horizontal:focus-visible::before {
|
|
688
|
+
right: -4px;
|
|
689
|
+
left: -4px;
|
|
690
|
+
height: 5px;
|
|
691
|
+
background-size: 100% 5px;
|
|
692
|
+
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
|
|
693
|
+
transform: translateY(-50%);
|
|
694
|
+
}
|
|
695
|
+
.rvg-selection-edge-target.is-vertical.is-viewport-left:hover::before,
|
|
696
|
+
.rvg-selection-edge-target.is-vertical.is-viewport-left:focus-visible::before {
|
|
697
|
+
right: auto;
|
|
698
|
+
left: 6px;
|
|
699
|
+
transform: none;
|
|
700
|
+
}
|
|
701
|
+
.rvg-selection-edge-target.is-vertical.is-viewport-right:hover::before,
|
|
702
|
+
.rvg-selection-edge-target.is-vertical.is-viewport-right:focus-visible::before {
|
|
703
|
+
right: 6px;
|
|
704
|
+
left: auto;
|
|
705
|
+
transform: none;
|
|
706
|
+
}
|
|
707
|
+
.rvg-selection-edge-target.is-horizontal.is-viewport-top:hover::before,
|
|
708
|
+
.rvg-selection-edge-target.is-horizontal.is-viewport-top:focus-visible::before {
|
|
709
|
+
top: 6px;
|
|
710
|
+
bottom: auto;
|
|
711
|
+
transform: none;
|
|
712
|
+
}
|
|
713
|
+
.rvg-selection-edge-target.is-horizontal.is-viewport-bottom:hover::before,
|
|
714
|
+
.rvg-selection-edge-target.is-horizontal.is-viewport-bottom:focus-visible::before {
|
|
715
|
+
top: auto;
|
|
716
|
+
bottom: 6px;
|
|
717
|
+
transform: none;
|
|
718
|
+
}
|
|
719
|
+
.rvg-selection-edge-target.is-corner:hover::before,
|
|
720
|
+
.rvg-selection-edge-target.is-corner:focus-visible::before {
|
|
721
|
+
width: 5px;
|
|
722
|
+
height: calc(var(--rvg-corner-height, 10px) + var(--rvg-corner-hover-height-extension));
|
|
723
|
+
box-shadow: none;
|
|
724
|
+
transform: none;
|
|
725
|
+
}
|
|
726
|
+
.rvg-selection-edge-target.is-corner:hover::after,
|
|
727
|
+
.rvg-selection-edge-target.is-corner:focus-visible::after {
|
|
728
|
+
width: calc(var(--rvg-corner-width, 10px) + var(--rvg-corner-hover-width-extension));
|
|
729
|
+
height: 5px;
|
|
730
|
+
box-shadow: none;
|
|
731
|
+
transform: none;
|
|
732
|
+
}
|
|
733
|
+
.rvg-selection-edge-target:focus-visible {
|
|
734
|
+
outline: 2px solid rgba(22, 119, 255, 0.28);
|
|
735
|
+
outline-offset: -2px;
|
|
470
736
|
}
|
|
471
737
|
.rvg-header-title {
|
|
472
738
|
z-index: 1;
|
|
@@ -483,6 +749,9 @@
|
|
|
483
749
|
.rvg-header-group.is-leaf {
|
|
484
750
|
z-index: 2;
|
|
485
751
|
}
|
|
752
|
+
.rvg-header-title.is-drop-target {
|
|
753
|
+
background: var(--rvg-color-column-drop-target-fill);
|
|
754
|
+
}
|
|
486
755
|
.rvg-text-fixed-shadow {
|
|
487
756
|
position: absolute;
|
|
488
757
|
z-index: 4;
|
|
@@ -523,6 +792,20 @@
|
|
|
523
792
|
overflow: hidden;
|
|
524
793
|
pointer-events: none;
|
|
525
794
|
}
|
|
795
|
+
.rvg-header-icons::after {
|
|
796
|
+
position: absolute;
|
|
797
|
+
z-index: 3;
|
|
798
|
+
top: 0;
|
|
799
|
+
right: 0;
|
|
800
|
+
bottom: 0;
|
|
801
|
+
width: 1px;
|
|
802
|
+
background: var(--rvg-color-grid);
|
|
803
|
+
content: "";
|
|
804
|
+
pointer-events: none;
|
|
805
|
+
}
|
|
806
|
+
.rvg-root.is-vertical-borderless .rvg-header-icons::after {
|
|
807
|
+
display: none;
|
|
808
|
+
}
|
|
526
809
|
.rvg-header-scroll-clip {
|
|
527
810
|
position: absolute;
|
|
528
811
|
top: 0;
|
|
@@ -1181,6 +1464,38 @@
|
|
|
1181
1464
|
color: var(--rvg-color-muted);
|
|
1182
1465
|
font-weight: 600;
|
|
1183
1466
|
}
|
|
1467
|
+
.rvg-column-drag-preview-header .rvg-preview-header-icon {
|
|
1468
|
+
position: absolute;
|
|
1469
|
+
top: 50%;
|
|
1470
|
+
width: 14px;
|
|
1471
|
+
height: 14px;
|
|
1472
|
+
transform: translateY(-50%);
|
|
1473
|
+
overflow: visible;
|
|
1474
|
+
color: var(--rvg-color-icon);
|
|
1475
|
+
}
|
|
1476
|
+
.rvg-column-drag-preview-header .rvg-preview-header-icon path,
|
|
1477
|
+
.rvg-column-drag-preview-header .rvg-preview-header-icon circle {
|
|
1478
|
+
fill: currentColor;
|
|
1479
|
+
}
|
|
1480
|
+
.rvg-column-drag-preview-header .rvg-preview-header-icon path.is-active,
|
|
1481
|
+
.rvg-column-drag-preview-header .rvg-preview-header-icon.is-active {
|
|
1482
|
+
color: var(--rvg-color-primary);
|
|
1483
|
+
}
|
|
1484
|
+
.rvg-column-drag-preview-header .rvg-preview-header-search-icon {
|
|
1485
|
+
fill: none;
|
|
1486
|
+
stroke: currentColor;
|
|
1487
|
+
stroke-width: 1.5;
|
|
1488
|
+
stroke-linecap: round;
|
|
1489
|
+
stroke-linejoin: round;
|
|
1490
|
+
}
|
|
1491
|
+
.rvg-column-drag-preview-header .rvg-preview-header-search-icon path,
|
|
1492
|
+
.rvg-column-drag-preview-header .rvg-preview-header-search-icon circle {
|
|
1493
|
+
fill: none;
|
|
1494
|
+
}
|
|
1495
|
+
.rvg-is-dragging,
|
|
1496
|
+
.rvg-is-dragging * {
|
|
1497
|
+
cursor: move !important;
|
|
1498
|
+
}
|
|
1184
1499
|
.rvg-column-drag-preview-cell.is-axis-selected {
|
|
1185
1500
|
background: var(--rvg-color-axis-selection-fill);
|
|
1186
1501
|
}
|
|
@@ -1190,12 +1505,18 @@
|
|
|
1190
1505
|
.rvg-column-drag-preview-cell.is-selected {
|
|
1191
1506
|
background: var(--rvg-color-selection-fill);
|
|
1192
1507
|
}
|
|
1193
|
-
.rvg-row-drag-preview {
|
|
1508
|
+
.rvg-row-drag-preview-frame {
|
|
1194
1509
|
position: relative;
|
|
1195
1510
|
overflow: hidden;
|
|
1511
|
+
}
|
|
1512
|
+
.rvg-row-drag-preview {
|
|
1513
|
+
position: absolute;
|
|
1514
|
+
top: 2px;
|
|
1515
|
+
left: 2px;
|
|
1516
|
+
overflow: visible;
|
|
1196
1517
|
border: 1px solid #a9c8f5;
|
|
1197
1518
|
background: #fff;
|
|
1198
|
-
box-shadow:
|
|
1519
|
+
box-shadow: 0 2px 6px rgba(5, 5, 5, 0.08);
|
|
1199
1520
|
box-sizing: border-box;
|
|
1200
1521
|
}
|
|
1201
1522
|
.rvg-row-drag-preview-cell {
|
|
@@ -1222,6 +1543,11 @@
|
|
|
1222
1543
|
height: 16px;
|
|
1223
1544
|
fill: var(--rvg-color-icon);
|
|
1224
1545
|
}
|
|
1546
|
+
.rvg-row-drag-preview-cell.is-selected {
|
|
1547
|
+
z-index: 1;
|
|
1548
|
+
background: var(--rvg-color-selection-fill);
|
|
1549
|
+
box-shadow: 0 0 0 2px var(--rvg-color-primary);
|
|
1550
|
+
}
|
|
1225
1551
|
.rvg-preview-checkbox {
|
|
1226
1552
|
display: grid;
|
|
1227
1553
|
width: 14px;
|
|
@@ -1241,7 +1567,7 @@
|
|
|
1241
1567
|
position: absolute;
|
|
1242
1568
|
z-index: 2;
|
|
1243
1569
|
margin: 0;
|
|
1244
|
-
padding: 0
|
|
1570
|
+
padding: 0 10px;
|
|
1245
1571
|
border: 0;
|
|
1246
1572
|
border-radius: 0;
|
|
1247
1573
|
outline: 0;
|
|
@@ -1269,6 +1595,7 @@
|
|
|
1269
1595
|
position: absolute;
|
|
1270
1596
|
z-index: 6;
|
|
1271
1597
|
background: var(--rvg-color-bg);
|
|
1598
|
+
box-sizing: border-box;
|
|
1272
1599
|
}
|
|
1273
1600
|
.rvg-choice-editor {
|
|
1274
1601
|
line-height: 1;
|
|
@@ -1277,11 +1604,12 @@
|
|
|
1277
1604
|
position: absolute;
|
|
1278
1605
|
z-index: 6;
|
|
1279
1606
|
display: flex;
|
|
1280
|
-
padding: 0 28px 0
|
|
1607
|
+
padding: 0 28px 0 10px;
|
|
1281
1608
|
align-items: center;
|
|
1282
1609
|
gap: 3px;
|
|
1283
1610
|
background: var(--rvg-color-bg);
|
|
1284
1611
|
line-height: 1;
|
|
1612
|
+
box-sizing: border-box;
|
|
1285
1613
|
}
|
|
1286
1614
|
.rvg-time-field-group {
|
|
1287
1615
|
display: contents;
|
|
@@ -1307,12 +1635,13 @@
|
|
|
1307
1635
|
position: absolute;
|
|
1308
1636
|
z-index: 6;
|
|
1309
1637
|
display: flex;
|
|
1310
|
-
padding: 0
|
|
1638
|
+
padding: 0 10px;
|
|
1311
1639
|
align-items: center;
|
|
1312
1640
|
gap: 6px;
|
|
1313
1641
|
overflow: hidden;
|
|
1314
1642
|
background: var(--rvg-color-bg);
|
|
1315
1643
|
line-height: 1;
|
|
1644
|
+
box-sizing: border-box;
|
|
1316
1645
|
}
|
|
1317
1646
|
.rvg-native-editor.has-clear {
|
|
1318
1647
|
padding-right: 32px;
|
|
@@ -1571,11 +1900,11 @@
|
|
|
1571
1900
|
text-align: left;
|
|
1572
1901
|
}
|
|
1573
1902
|
.rvg-choice-editor [data-part=trigger] {
|
|
1574
|
-
padding: 0 28px 0
|
|
1903
|
+
padding: 0 28px 0 10px;
|
|
1575
1904
|
line-height: 1;
|
|
1576
1905
|
}
|
|
1577
1906
|
.rvg-date-value {
|
|
1578
|
-
padding: 0 8px 2px
|
|
1907
|
+
padding: 0 8px 2px 10px;
|
|
1579
1908
|
}
|
|
1580
1909
|
.rvg-choice-editor [data-part=value-text] {
|
|
1581
1910
|
min-width: 0;
|
|
@@ -1760,7 +2089,9 @@
|
|
|
1760
2089
|
}
|
|
1761
2090
|
}
|
|
1762
2091
|
@media (prefers-reduced-motion: reduce) {
|
|
1763
|
-
.rvg-choice-chevron
|
|
2092
|
+
.rvg-choice-chevron,
|
|
2093
|
+
.rvg-selection-edge-target::before,
|
|
2094
|
+
.rvg-selection-edge-target::after {
|
|
1764
2095
|
transition: none;
|
|
1765
2096
|
}
|
|
1766
2097
|
.rvg-choice-content[data-state] {
|
package/dist/index.d.cts
CHANGED
|
@@ -36,6 +36,7 @@ interface TableLabels {
|
|
|
36
36
|
sortDesc: string;
|
|
37
37
|
sortBoth: string;
|
|
38
38
|
dragColumn: string;
|
|
39
|
+
revealSelectedCell: string;
|
|
39
40
|
previousYear: string;
|
|
40
41
|
nextYear: string;
|
|
41
42
|
previousMonth: string;
|
|
@@ -218,6 +219,22 @@ interface GridSelection extends GridCellPosition {
|
|
|
218
219
|
rowKey: GridKey;
|
|
219
220
|
columnKey: string;
|
|
220
221
|
}
|
|
222
|
+
/** Cell locator accepted by controlled and default selection props. */
|
|
223
|
+
type GridSelectionTarget = {
|
|
224
|
+
columnKey: string;
|
|
225
|
+
rowKey: GridKey;
|
|
226
|
+
rowIndex?: number;
|
|
227
|
+
columnIndex?: number;
|
|
228
|
+
} | {
|
|
229
|
+
columnKey: string;
|
|
230
|
+
rowIndex: number;
|
|
231
|
+
rowKey?: GridKey;
|
|
232
|
+
columnIndex?: number;
|
|
233
|
+
};
|
|
234
|
+
/** Fully resolved selected cell returned by onSelectedCellChange. */
|
|
235
|
+
interface SelectedCellChange extends GridSelection {
|
|
236
|
+
value: unknown;
|
|
237
|
+
}
|
|
221
238
|
/** Fired after a cell editor commits a value. */
|
|
222
239
|
interface CellChange<Row> extends GridSelection {
|
|
223
240
|
value: unknown;
|
|
@@ -270,24 +287,6 @@ interface TableContextMenuConfig<Row> {
|
|
|
270
287
|
range?: ContextMenuSection<Row, RangeContextMenuBuiltin, RangeContextMenuContext<Row>>;
|
|
271
288
|
}
|
|
272
289
|
type TableContextMenu<Row> = boolean | TableContextMenuConfig<Row>;
|
|
273
|
-
/** Payload for inserting one or more rows around a target row. */
|
|
274
|
-
interface InsertRowsEvent<Row> {
|
|
275
|
-
rowIndex: number;
|
|
276
|
-
row: Row;
|
|
277
|
-
position: 'before' | 'after';
|
|
278
|
-
count: number;
|
|
279
|
-
/** Rows created by the grid for the optimistic visible insert. Consumers can persist these directly. */
|
|
280
|
-
insertedRows?: Row[];
|
|
281
|
-
}
|
|
282
|
-
/** Payload for deleting the selected rows. */
|
|
283
|
-
interface DeleteRowsEvent<Row> {
|
|
284
|
-
rows: Array<{
|
|
285
|
-
rowIndex: number;
|
|
286
|
-
row: Row;
|
|
287
|
-
}>;
|
|
288
|
-
/** Current rendered viewport, including virtual overscan. Useful for fast optimistic updates before rebuilding large datasets. */
|
|
289
|
-
viewportRange?: ViewportRange;
|
|
290
|
-
}
|
|
291
290
|
/**
|
|
292
291
|
* Public props for Table.
|
|
293
292
|
*
|
|
@@ -333,22 +332,24 @@ interface TableProps<Row extends object> {
|
|
|
333
332
|
summary?: TableSummaryConfig;
|
|
334
333
|
/** Show an automatically generated row number column on the left. */
|
|
335
334
|
rowNumber?: boolean;
|
|
336
|
-
selectedCell?:
|
|
337
|
-
defaultSelectedCell?:
|
|
338
|
-
onSelectedCellChange?: (selection:
|
|
335
|
+
selectedCell?: GridSelectionTarget | null;
|
|
336
|
+
defaultSelectedCell?: GridSelectionTarget | null;
|
|
337
|
+
onSelectedCellChange?: (selection: SelectedCellChange | null) => void;
|
|
339
338
|
/** Enable spreadsheet-style mouse drag selection across multiple body cells. Defaults to false. */
|
|
340
339
|
rangeSelection?: boolean;
|
|
341
340
|
rowSelection?: boolean | AxisSelectionConfig;
|
|
342
341
|
selectedRowKeys?: GridKey[];
|
|
343
342
|
defaultSelectedRowKeys?: GridKey[];
|
|
344
|
-
|
|
343
|
+
onSelectedRowChange?: (keys: GridKey[], rows: Row[], indices: number[]) => void;
|
|
345
344
|
columnSelection?: boolean | AxisSelectionConfig;
|
|
346
345
|
selectedColumnKeys?: string[];
|
|
347
346
|
defaultSelectedColumnKeys?: string[];
|
|
348
|
-
|
|
347
|
+
onSelectedColumnChange?: (keys: string[]) => void;
|
|
349
348
|
columnDraggable?: boolean;
|
|
350
349
|
columnResizable?: boolean;
|
|
351
|
-
|
|
350
|
+
onColumnsReorder?: (columns: GridColumn<Row>[], detail: {
|
|
351
|
+
sourceIndex: number;
|
|
352
|
+
targetIndex: number;
|
|
352
353
|
type: 'column' | 'group';
|
|
353
354
|
sourceKey: string;
|
|
354
355
|
targetKey: string;
|
|
@@ -357,13 +358,18 @@ interface TableProps<Row extends object> {
|
|
|
357
358
|
}) => void;
|
|
358
359
|
onColumnResize?: (columnKey: string, width: number) => void;
|
|
359
360
|
rowDraggable?: boolean;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
361
|
+
onRowsReorder?: (rows: Row[], detail: {
|
|
362
|
+
sourceIndex: number;
|
|
363
|
+
targetIndex: number;
|
|
364
|
+
}) => void;
|
|
365
|
+
/** Receives the complete rows array and the rows added by the built-in insert operation. */
|
|
366
|
+
onInsertRows?: (rows: Row[], insertedRows: Row[]) => void | Promise<void>;
|
|
367
|
+
/** Receives the complete rows array and the rows removed by the built-in delete operation. */
|
|
368
|
+
onDeleteRows?: (rows: Row[], deletedRows: Row[]) => void | Promise<void>;
|
|
369
|
+
/** Overrides the built-in value sorting. Return rows ordered for the internally managed sort state. */
|
|
370
|
+
onSortChange?: (rows: Row[], state: GridSortState) => Row[];
|
|
371
|
+
/** Overrides the built-in text filtering. Return the rows that match the internally managed filter values. */
|
|
372
|
+
onFilterChange?: (rows: Row[], values: Readonly<Record<string, string>>) => Row[];
|
|
367
373
|
onCellChange?: (change: CellChange<Row>) => void | Promise<void>;
|
|
368
374
|
onCellContextMenu?: (event: ContextMenuEvent<Row>) => void;
|
|
369
375
|
/** true uses the built-in menu, false disables custom menus, object customizes menu content and order. */
|
|
@@ -380,7 +386,7 @@ interface ViewportRange {
|
|
|
380
386
|
columnEnd: number;
|
|
381
387
|
}
|
|
382
388
|
|
|
383
|
-
declare function Table<Row extends object>({ columns:
|
|
389
|
+
declare function Table<Row extends object>({ columns: columnProps, rows: sourceRows, rowKey, width, height, autoHeight, layout, rowHeight: rowHeightProp, headerHeight: headerHeightProp, fixedHeader, locale, borderless, verticalBorderless, striped, highlight, cellSpans, loading, loadingContent, virtualized, tooltip, summary, rowNumber, selectedCell, defaultSelectedCell, onSelectedCellChange, rangeSelection, rowSelection, selectedRowKeys, defaultSelectedRowKeys, onSelectedRowChange, columnSelection, selectedColumnKeys, defaultSelectedColumnKeys, onSelectedColumnChange, columnDraggable, columnResizable, onColumnsReorder, onColumnResize, rowDraggable, onRowsReorder, onInsertRows, onDeleteRows, onSortChange, onFilterChange, onCellChange, onCellContextMenu, contextMenu: contextMenuConfig, emptyContent, className, style, ariaLabel, }: TableProps<Row>): react.JSX.Element;
|
|
384
390
|
|
|
385
391
|
type LayoutColumn<Row> = GridColumn<Row> & {
|
|
386
392
|
rowSelection?: boolean;
|
|
@@ -427,4 +433,4 @@ declare function hitTestColumn(metrics: ColumnMetric[], contentX: number): numbe
|
|
|
427
433
|
|
|
428
434
|
type TableFilterValues = Record<string, string>;
|
|
429
435
|
|
|
430
|
-
export { type AxisSelectionConfig, type CellChange, type ContextMenuEvent, type
|
|
436
|
+
export { type AxisSelectionConfig, type CellChange, type ContextMenuEvent, type GridCellPosition, type GridColumn, type GridKey, type GridSelection, type GridSelectionTarget, type GridSortState, type SelectedCellChange, type SelectionMode, type SortDirection, Table, type CellChange as TableCellChange, type GridCellPosition as TableCellPosition, type TableCellSpan, type TableCellSpanRule, type TableCellSpanRuleContext, type TableCellSpans, type GridColumn as TableColumn, type TableContextMenu, type TableContextMenuConfig, type ContextMenuEvent as TableContextMenuEvent, type GridSelection as TableEditingCell, type TableFilterValues, type TableHighlightConfig, type GridKey as TableKey, type TableLabels, type TableLayoutConfig, type TableLocaleCode, type TableLocaleConfig, type TableProps, type TableResolvedCellSpan, type GridSortState as TableSorter, type TableSummaryConfig, type TableTooltipConfig, type ViewportRange as TableViewportRange, type TableVirtualizedConfig, Table as VelocityGrid, type TableCellSpan as VelocityGridCellSpan, type TableCellSpanRule as VelocityGridCellSpanRule, type TableCellSpanRuleContext as VelocityGridCellSpanRuleContext, type TableCellSpans as VelocityGridCellSpans, type TableContextMenu as VelocityGridContextMenu, type TableContextMenuConfig as VelocityGridContextMenuConfig, type TableHighlightConfig as VelocityGridHighlightConfig, type TableLabels as VelocityGridLabels, type TableLayoutConfig as VelocityGridLayoutConfig, type TableLocaleCode as VelocityGridLocaleCode, type TableLocaleConfig as VelocityGridLocaleConfig, type TableProps as VelocityGridProps, type TableResolvedCellSpan as VelocityGridResolvedCellSpan, type TableSummaryConfig as VelocityGridSummaryConfig, type TableTooltipConfig as VelocityGridTooltipConfig, type TableVirtualizedConfig as VelocityGridVirtualizedConfig, type ViewportRange, buildColumnMetrics, getViewportRange, hitTestColumn };
|