@lensui/lens-table 0.1.3 → 0.1.4
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 +28 -2
- package/dist/index.cjs +784 -176
- package/dist/index.css +109 -2
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +784 -176
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -56,13 +56,16 @@
|
|
|
56
56
|
overscroll-behavior-x: none;
|
|
57
57
|
touch-action: pan-x pan-y;
|
|
58
58
|
-webkit-overflow-scrolling: touch;
|
|
59
|
-
scrollbar-
|
|
60
|
-
scrollbar-color: #92979c transparent;
|
|
59
|
+
scrollbar-width: none;
|
|
61
60
|
}
|
|
62
61
|
.rvg-scroller.is-context-menu-open {
|
|
63
62
|
overflow: hidden;
|
|
64
63
|
touch-action: none;
|
|
65
64
|
}
|
|
65
|
+
.rvg-scroller::-webkit-scrollbar {
|
|
66
|
+
width: 0;
|
|
67
|
+
height: 0;
|
|
68
|
+
}
|
|
66
69
|
.rvg-scroller::-webkit-scrollbar-track,
|
|
67
70
|
.rvg-scroller::-webkit-scrollbar-corner {
|
|
68
71
|
background: transparent;
|
|
@@ -90,6 +93,65 @@
|
|
|
90
93
|
overflow: hidden;
|
|
91
94
|
pointer-events: none;
|
|
92
95
|
}
|
|
96
|
+
.rvg-text-layer::before {
|
|
97
|
+
position: absolute;
|
|
98
|
+
z-index: 5;
|
|
99
|
+
top: 0;
|
|
100
|
+
right: 0;
|
|
101
|
+
left: 0;
|
|
102
|
+
height: 1px;
|
|
103
|
+
background: var(--rvg-color-grid);
|
|
104
|
+
content: "";
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
}
|
|
107
|
+
.rvg-vertical-scrollbar,
|
|
108
|
+
.rvg-horizontal-scrollbar {
|
|
109
|
+
position: absolute;
|
|
110
|
+
z-index: 7;
|
|
111
|
+
display: none;
|
|
112
|
+
opacity: 0;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
touch-action: none;
|
|
115
|
+
transition: opacity 160ms ease;
|
|
116
|
+
}
|
|
117
|
+
.rvg-vertical-scrollbar.is-active,
|
|
118
|
+
.rvg-horizontal-scrollbar.is-active {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
pointer-events: auto;
|
|
121
|
+
}
|
|
122
|
+
.rvg-vertical-scrollbar {
|
|
123
|
+
right: 2px;
|
|
124
|
+
width: 9px;
|
|
125
|
+
}
|
|
126
|
+
.rvg-horizontal-scrollbar {
|
|
127
|
+
height: 9px;
|
|
128
|
+
}
|
|
129
|
+
.rvg-vertical-scrollbar-thumb,
|
|
130
|
+
.rvg-horizontal-scrollbar-thumb {
|
|
131
|
+
position: absolute;
|
|
132
|
+
border-radius: 999px;
|
|
133
|
+
background: #92979c;
|
|
134
|
+
opacity: .82;
|
|
135
|
+
cursor: default;
|
|
136
|
+
}
|
|
137
|
+
.rvg-vertical-scrollbar-thumb {
|
|
138
|
+
top: 0;
|
|
139
|
+
right: 1px;
|
|
140
|
+
width: 7px;
|
|
141
|
+
min-height: 28px;
|
|
142
|
+
}
|
|
143
|
+
.rvg-horizontal-scrollbar-thumb {
|
|
144
|
+
bottom: 1px;
|
|
145
|
+
left: 0;
|
|
146
|
+
height: 7px;
|
|
147
|
+
min-width: 36px;
|
|
148
|
+
}
|
|
149
|
+
.rvg-vertical-scrollbar:hover .rvg-vertical-scrollbar-thumb,
|
|
150
|
+
.rvg-horizontal-scrollbar:hover .rvg-horizontal-scrollbar-thumb,
|
|
151
|
+
.rvg-vertical-scrollbar-thumb:hover,
|
|
152
|
+
.rvg-horizontal-scrollbar-thumb:hover {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
}
|
|
93
155
|
.rvg-text-scroll-clip,
|
|
94
156
|
.rvg-body-text-clip {
|
|
95
157
|
position: absolute;
|
|
@@ -134,6 +196,10 @@
|
|
|
134
196
|
pointer-events: auto;
|
|
135
197
|
cursor: text;
|
|
136
198
|
}
|
|
199
|
+
.rvg-header-title {
|
|
200
|
+
pointer-events: none;
|
|
201
|
+
cursor: default;
|
|
202
|
+
}
|
|
137
203
|
.rvg-cell-text {
|
|
138
204
|
transition: transform 140ms ease, opacity 100ms ease;
|
|
139
205
|
}
|
|
@@ -407,6 +473,47 @@
|
|
|
407
473
|
color: var(--rvg-color-muted);
|
|
408
474
|
font-weight: 600;
|
|
409
475
|
}
|
|
476
|
+
.rvg-header-group {
|
|
477
|
+
z-index: 3;
|
|
478
|
+
border-right: 1px solid var(--rvg-color-grid);
|
|
479
|
+
border-bottom: 1px solid var(--rvg-color-grid);
|
|
480
|
+
background: var(--rvg-color-header-bg);
|
|
481
|
+
box-sizing: border-box;
|
|
482
|
+
}
|
|
483
|
+
.rvg-header-group.is-leaf {
|
|
484
|
+
z-index: 2;
|
|
485
|
+
}
|
|
486
|
+
.rvg-text-fixed-shadow {
|
|
487
|
+
position: absolute;
|
|
488
|
+
z-index: 4;
|
|
489
|
+
top: 0;
|
|
490
|
+
bottom: 0;
|
|
491
|
+
width: 10px;
|
|
492
|
+
pointer-events: none;
|
|
493
|
+
}
|
|
494
|
+
.rvg-text-fixed-shadow.is-left {
|
|
495
|
+
background:
|
|
496
|
+
linear-gradient(
|
|
497
|
+
90deg,
|
|
498
|
+
rgba(5, 5, 5, 0.06),
|
|
499
|
+
transparent);
|
|
500
|
+
}
|
|
501
|
+
.rvg-text-fixed-shadow.is-right {
|
|
502
|
+
background:
|
|
503
|
+
linear-gradient(
|
|
504
|
+
90deg,
|
|
505
|
+
transparent,
|
|
506
|
+
rgba(5, 5, 5, 0.06));
|
|
507
|
+
}
|
|
508
|
+
.rvg-text-fixed-border {
|
|
509
|
+
position: absolute;
|
|
510
|
+
z-index: 5;
|
|
511
|
+
top: 0;
|
|
512
|
+
bottom: 0;
|
|
513
|
+
width: 1px;
|
|
514
|
+
background: var(--rvg-color-grid);
|
|
515
|
+
pointer-events: none;
|
|
516
|
+
}
|
|
410
517
|
.rvg-header-icons {
|
|
411
518
|
position: absolute;
|
|
412
519
|
z-index: 2;
|
package/dist/index.d.cts
CHANGED
|
@@ -167,6 +167,8 @@ interface GridColumn<Row> {
|
|
|
167
167
|
title: string;
|
|
168
168
|
/** Custom React content rendered in the header DOM overlay. */
|
|
169
169
|
renderHeader?: (column: GridColumn<Row>) => ReactNode;
|
|
170
|
+
/** Child columns used to build grouped / multi-level headers. Only leaf columns render body cells. */
|
|
171
|
+
children?: GridColumn<Row>[];
|
|
170
172
|
/** Row field used as this column's cell value. Omit for utility columns. */
|
|
171
173
|
dataIndex?: keyof Row;
|
|
172
174
|
/** Preferred column width in pixels. Layout helpers enforce minimums. */
|
|
@@ -346,7 +348,13 @@ interface TableProps<Row extends object> {
|
|
|
346
348
|
onSelectedColumnKeysChange?: (keys: string[]) => void;
|
|
347
349
|
columnDraggable?: boolean;
|
|
348
350
|
columnResizable?: boolean;
|
|
349
|
-
onColumnOrderChange?: (sourceIndex: number, targetIndex: number
|
|
351
|
+
onColumnOrderChange?: (sourceIndex: number, targetIndex: number, detail?: {
|
|
352
|
+
type: 'column' | 'group';
|
|
353
|
+
sourceKey: string;
|
|
354
|
+
targetKey: string;
|
|
355
|
+
parentKey?: string;
|
|
356
|
+
placement: 'before' | 'after';
|
|
357
|
+
}) => void;
|
|
350
358
|
onColumnResize?: (columnKey: string, width: number) => void;
|
|
351
359
|
rowDraggable?: boolean;
|
|
352
360
|
onRowOrderChange?: (sourceIndex: number, targetIndex: number) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,8 @@ interface GridColumn<Row> {
|
|
|
167
167
|
title: string;
|
|
168
168
|
/** Custom React content rendered in the header DOM overlay. */
|
|
169
169
|
renderHeader?: (column: GridColumn<Row>) => ReactNode;
|
|
170
|
+
/** Child columns used to build grouped / multi-level headers. Only leaf columns render body cells. */
|
|
171
|
+
children?: GridColumn<Row>[];
|
|
170
172
|
/** Row field used as this column's cell value. Omit for utility columns. */
|
|
171
173
|
dataIndex?: keyof Row;
|
|
172
174
|
/** Preferred column width in pixels. Layout helpers enforce minimums. */
|
|
@@ -346,7 +348,13 @@ interface TableProps<Row extends object> {
|
|
|
346
348
|
onSelectedColumnKeysChange?: (keys: string[]) => void;
|
|
347
349
|
columnDraggable?: boolean;
|
|
348
350
|
columnResizable?: boolean;
|
|
349
|
-
onColumnOrderChange?: (sourceIndex: number, targetIndex: number
|
|
351
|
+
onColumnOrderChange?: (sourceIndex: number, targetIndex: number, detail?: {
|
|
352
|
+
type: 'column' | 'group';
|
|
353
|
+
sourceKey: string;
|
|
354
|
+
targetKey: string;
|
|
355
|
+
parentKey?: string;
|
|
356
|
+
placement: 'before' | 'after';
|
|
357
|
+
}) => void;
|
|
350
358
|
onColumnResize?: (columnKey: string, width: number) => void;
|
|
351
359
|
rowDraggable?: boolean;
|
|
352
360
|
onRowOrderChange?: (sourceIndex: number, targetIndex: number) => void;
|