@vaadin/grid 22.0.0-alpha7
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/LICENSE +190 -0
- package/README.md +79 -0
- package/all-imports.js +1 -0
- package/package.json +58 -0
- package/src/all-imports.js +14 -0
- package/src/array-data-provider.js +145 -0
- package/src/interfaces.d.ts +75 -0
- package/src/vaadin-grid-a11y-mixin.js +158 -0
- package/src/vaadin-grid-active-item-mixin.d.ts +19 -0
- package/src/vaadin-grid-active-item-mixin.js +117 -0
- package/src/vaadin-grid-array-data-provider-mixin.d.ts +16 -0
- package/src/vaadin-grid-array-data-provider-mixin.js +75 -0
- package/src/vaadin-grid-column-group.d.ts +54 -0
- package/src/vaadin-grid-column-group.js +320 -0
- package/src/vaadin-grid-column-reordering-mixin.d.ts +19 -0
- package/src/vaadin-grid-column-reordering-mixin.js +387 -0
- package/src/vaadin-grid-column-resizing-mixin.js +111 -0
- package/src/vaadin-grid-column.d.ts +133 -0
- package/src/vaadin-grid-column.js +745 -0
- package/src/vaadin-grid-data-provider-mixin.d.ts +108 -0
- package/src/vaadin-grid-data-provider-mixin.js +520 -0
- package/src/vaadin-grid-drag-and-drop-mixin.d.ts +69 -0
- package/src/vaadin-grid-drag-and-drop-mixin.js +433 -0
- package/src/vaadin-grid-dynamic-columns-mixin.js +180 -0
- package/src/vaadin-grid-event-context-mixin.d.ts +33 -0
- package/src/vaadin-grid-event-context-mixin.js +57 -0
- package/src/vaadin-grid-filter-column.d.ts +35 -0
- package/src/vaadin-grid-filter-column.js +120 -0
- package/src/vaadin-grid-filter-mixin.js +76 -0
- package/src/vaadin-grid-filter.d.ts +67 -0
- package/src/vaadin-grid-filter.js +125 -0
- package/src/vaadin-grid-helpers.js +23 -0
- package/src/vaadin-grid-keyboard-navigation-mixin.js +891 -0
- package/src/vaadin-grid-row-details-mixin.d.ts +44 -0
- package/src/vaadin-grid-row-details-mixin.js +200 -0
- package/src/vaadin-grid-scroll-mixin.d.ts +18 -0
- package/src/vaadin-grid-scroll-mixin.js +202 -0
- package/src/vaadin-grid-selection-column.d.ts +71 -0
- package/src/vaadin-grid-selection-column.js +285 -0
- package/src/vaadin-grid-selection-mixin.d.ts +30 -0
- package/src/vaadin-grid-selection-mixin.js +93 -0
- package/src/vaadin-grid-sort-column.d.ts +63 -0
- package/src/vaadin-grid-sort-column.js +118 -0
- package/src/vaadin-grid-sort-mixin.d.ts +15 -0
- package/src/vaadin-grid-sort-mixin.js +139 -0
- package/src/vaadin-grid-sorter.d.ts +94 -0
- package/src/vaadin-grid-sorter.js +230 -0
- package/src/vaadin-grid-styles.js +297 -0
- package/src/vaadin-grid-styling-mixin.d.ts +37 -0
- package/src/vaadin-grid-styling-mixin.js +71 -0
- package/src/vaadin-grid-tree-column.d.ts +36 -0
- package/src/vaadin-grid-tree-column.js +119 -0
- package/src/vaadin-grid-tree-toggle.d.ts +104 -0
- package/src/vaadin-grid-tree-toggle.js +205 -0
- package/src/vaadin-grid.d.ts +397 -0
- package/src/vaadin-grid.js +1004 -0
- package/theme/lumo/all-imports.js +11 -0
- package/theme/lumo/vaadin-grid-column-group.js +1 -0
- package/theme/lumo/vaadin-grid-column.js +1 -0
- package/theme/lumo/vaadin-grid-filter-column.js +2 -0
- package/theme/lumo/vaadin-grid-filter.js +2 -0
- package/theme/lumo/vaadin-grid-selection-column.js +2 -0
- package/theme/lumo/vaadin-grid-sort-column.js +2 -0
- package/theme/lumo/vaadin-grid-sorter-styles.js +53 -0
- package/theme/lumo/vaadin-grid-sorter.js +2 -0
- package/theme/lumo/vaadin-grid-styles.js +378 -0
- package/theme/lumo/vaadin-grid-tree-column.js +2 -0
- package/theme/lumo/vaadin-grid-tree-toggle-styles.js +112 -0
- package/theme/lumo/vaadin-grid-tree-toggle.js +2 -0
- package/theme/lumo/vaadin-grid.js +9 -0
- package/theme/material/all-imports.js +11 -0
- package/theme/material/vaadin-grid-column-group.js +1 -0
- package/theme/material/vaadin-grid-column.js +1 -0
- package/theme/material/vaadin-grid-filter-column.js +2 -0
- package/theme/material/vaadin-grid-filter.js +2 -0
- package/theme/material/vaadin-grid-selection-column.js +2 -0
- package/theme/material/vaadin-grid-sort-column.js +2 -0
- package/theme/material/vaadin-grid-sorter-styles.js +72 -0
- package/theme/material/vaadin-grid-sorter.js +2 -0
- package/theme/material/vaadin-grid-styles.js +252 -0
- package/theme/material/vaadin-grid-tree-column.js +2 -0
- package/theme/material/vaadin-grid-tree-toggle-styles.js +42 -0
- package/theme/material/vaadin-grid-tree-toggle.js +2 -0
- package/theme/material/vaadin-grid.js +2 -0
- package/vaadin-grid-column-group.d.ts +1 -0
- package/vaadin-grid-column-group.js +3 -0
- package/vaadin-grid-column.d.ts +1 -0
- package/vaadin-grid-column.js +3 -0
- package/vaadin-grid-filter-column.d.ts +1 -0
- package/vaadin-grid-filter-column.js +3 -0
- package/vaadin-grid-filter.d.ts +1 -0
- package/vaadin-grid-filter.js +3 -0
- package/vaadin-grid-selection-column.d.ts +1 -0
- package/vaadin-grid-selection-column.js +3 -0
- package/vaadin-grid-sort-column.d.ts +1 -0
- package/vaadin-grid-sort-column.js +3 -0
- package/vaadin-grid-sorter.d.ts +1 -0
- package/vaadin-grid-sorter.js +3 -0
- package/vaadin-grid-tree-column.d.ts +1 -0
- package/vaadin-grid-tree-column.js +3 -0
- package/vaadin-grid-tree-toggle.d.ts +1 -0
- package/vaadin-grid-tree-toggle.js +3 -0
- package/vaadin-grid.d.ts +3 -0
- package/vaadin-grid.js +4 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './vaadin-grid-column-group.js';
|
|
2
|
+
import './vaadin-grid-column.js';
|
|
3
|
+
import './vaadin-grid-filter.js';
|
|
4
|
+
import './vaadin-grid-filter-column.js';
|
|
5
|
+
import './vaadin-grid-selection-column.js';
|
|
6
|
+
import './vaadin-grid-sorter.js';
|
|
7
|
+
import './vaadin-grid-sort-column.js';
|
|
8
|
+
import './vaadin-grid-tree-toggle.js';
|
|
9
|
+
import './vaadin-grid-tree-column.js';
|
|
10
|
+
import './vaadin-grid.js';
|
|
11
|
+
import '../../src/all-imports.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../src/vaadin-grid-column-group.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../src/vaadin-grid-column.js';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
|
|
2
|
+
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
3
|
+
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
4
|
+
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
5
|
+
|
|
6
|
+
registerStyles(
|
|
7
|
+
'vaadin-grid-sorter',
|
|
8
|
+
css`
|
|
9
|
+
:host {
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
align-items: baseline;
|
|
12
|
+
-webkit-user-select: none;
|
|
13
|
+
-moz-user-select: none;
|
|
14
|
+
user-select: none;
|
|
15
|
+
cursor: var(--lumo-clickable-cursor);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[part='content'] {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-overflow: ellipsis;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[part='indicators'] {
|
|
25
|
+
margin-left: var(--lumo-space-s);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[part='indicators']::before {
|
|
29
|
+
transform: scale(0.8);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host(:not([direction]):not(:hover)) [part='indicators'] {
|
|
33
|
+
color: var(--lumo-tertiary-text-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([direction]) {
|
|
37
|
+
color: var(--lumo-primary-text-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[part='order'] {
|
|
41
|
+
font-size: var(--lumo-font-size-xxs);
|
|
42
|
+
line-height: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* RTL specific styles */
|
|
46
|
+
|
|
47
|
+
:host([dir='rtl']) [part='indicators'] {
|
|
48
|
+
margin-right: var(--lumo-space-s);
|
|
49
|
+
margin-left: 0;
|
|
50
|
+
}
|
|
51
|
+
`,
|
|
52
|
+
{ moduleId: 'lumo-grid-sorter' }
|
|
53
|
+
);
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
|
|
2
|
+
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
3
|
+
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
4
|
+
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
5
|
+
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
6
|
+
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
7
|
+
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
8
|
+
import '@vaadin/checkbox/theme/lumo/vaadin-checkbox.js';
|
|
9
|
+
|
|
10
|
+
registerStyles(
|
|
11
|
+
'vaadin-grid',
|
|
12
|
+
css`
|
|
13
|
+
:host {
|
|
14
|
+
font-family: var(--lumo-font-family);
|
|
15
|
+
font-size: var(--lumo-font-size-m);
|
|
16
|
+
line-height: var(--lumo-line-height-s);
|
|
17
|
+
color: var(--lumo-body-text-color);
|
|
18
|
+
background-color: var(--lumo-base-color);
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
-webkit-text-size-adjust: 100%;
|
|
21
|
+
-webkit-tap-highlight-color: transparent;
|
|
22
|
+
-webkit-font-smoothing: antialiased;
|
|
23
|
+
-moz-osx-font-smoothing: grayscale;
|
|
24
|
+
|
|
25
|
+
/* For internal use only */
|
|
26
|
+
--_lumo-grid-border-color: var(--lumo-contrast-20pct);
|
|
27
|
+
--_lumo-grid-secondary-border-color: var(--lumo-contrast-10pct);
|
|
28
|
+
--_lumo-grid-border-width: 1px;
|
|
29
|
+
--_lumo-grid-selected-row-color: var(--lumo-primary-color-10pct);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* No (outer) border */
|
|
33
|
+
|
|
34
|
+
:host(:not([theme~='no-border'])) {
|
|
35
|
+
border: var(--_lumo-grid-border-width) solid var(--_lumo-grid-border-color);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Cell styles */
|
|
39
|
+
|
|
40
|
+
[part~='cell'] {
|
|
41
|
+
min-height: var(--lumo-size-m);
|
|
42
|
+
background-color: var(--lumo-base-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[part~='cell'] ::slotted(vaadin-grid-cell-content) {
|
|
46
|
+
cursor: default;
|
|
47
|
+
padding: var(--lumo-space-xs) var(--lumo-space-m);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Apply row borders by default and introduce the "no-row-borders" variant */
|
|
51
|
+
:host(:not([theme~='no-row-borders'])) [part~='cell']:not([part~='details-cell']) {
|
|
52
|
+
border-top: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Hide first body row top border */
|
|
56
|
+
:host(:not([theme~='no-row-borders'])) [part='row'][first] [part~='cell']:not([part~='details-cell']) {
|
|
57
|
+
border-top: 0;
|
|
58
|
+
min-height: calc(var(--lumo-size-m) - var(--_lumo-grid-border-width));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Focus-ring */
|
|
62
|
+
|
|
63
|
+
[part~='row']:focus,
|
|
64
|
+
[part~='cell']:focus {
|
|
65
|
+
outline: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([navigating]) [part~='row']:focus::before,
|
|
69
|
+
:host([navigating]) [part~='cell']:focus::before {
|
|
70
|
+
content: '';
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: 0;
|
|
73
|
+
right: 0;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host([navigating]) [part~='row']:focus::before {
|
|
81
|
+
transform: translateX(calc(-1 * var(--_grid-horizontal-scroll-position)));
|
|
82
|
+
z-index: 3;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Drag and Drop styles */
|
|
86
|
+
:host([dragover])::after {
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
z-index: 100;
|
|
90
|
+
top: 0;
|
|
91
|
+
right: 0;
|
|
92
|
+
bottom: 0;
|
|
93
|
+
left: 0;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[part~='row'][dragover] {
|
|
99
|
+
z-index: 100 !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[part~='row'][dragover] [part~='cell'] {
|
|
103
|
+
overflow: visible;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[part~='row'][dragover] [part~='cell']::after {
|
|
107
|
+
content: '';
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 0;
|
|
110
|
+
right: 0;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
left: 0;
|
|
113
|
+
height: calc(var(--_lumo-grid-border-width) + 2px);
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
background: var(--lumo-primary-color-50pct);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[part~='row'][dragover] [part~='cell'][last-frozen]::after {
|
|
119
|
+
right: -1px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host([theme~='no-row-borders']) [dragover] [part~='cell']::after {
|
|
123
|
+
height: 2px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[part~='row'][dragover='below'] [part~='cell']::after {
|
|
127
|
+
top: 100%;
|
|
128
|
+
bottom: auto;
|
|
129
|
+
margin-top: -1px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[part~='row'][dragover='above'] [part~='cell']::after {
|
|
133
|
+
top: auto;
|
|
134
|
+
bottom: 100%;
|
|
135
|
+
margin-bottom: -1px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[part~='row'][details-opened][dragover='below'] [part~='cell']:not([part~='details-cell'])::after,
|
|
139
|
+
[part~='row'][details-opened][dragover='above'] [part~='details-cell']::after {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[part~='row'][dragover][dragover='on-top'] [part~='cell']::after {
|
|
144
|
+
height: 100%;
|
|
145
|
+
opacity: 0.5;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
[part~='row'][dragstart] [part~='cell'] {
|
|
149
|
+
border: none !important;
|
|
150
|
+
box-shadow: none !important;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
[part~='row'][dragstart] [part~='cell'][last-column] {
|
|
154
|
+
border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[part~='row'][dragstart] [part~='cell'][first-column] {
|
|
158
|
+
border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[ios] [part~='row'][dragstart] [part~='cell'] {
|
|
162
|
+
background: var(--lumo-primary-color-50pct);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
#scroller:not([ios]) [part~='row'][dragstart]:not([dragstart=''])::after {
|
|
166
|
+
display: block;
|
|
167
|
+
position: absolute;
|
|
168
|
+
left: var(--_grid-drag-start-x);
|
|
169
|
+
top: var(--_grid-drag-start-y);
|
|
170
|
+
z-index: 100;
|
|
171
|
+
content: attr(dragstart);
|
|
172
|
+
align-items: center;
|
|
173
|
+
justify-content: center;
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
padding: calc(var(--lumo-space-xs) * 0.8);
|
|
176
|
+
color: var(--lumo-error-contrast-color);
|
|
177
|
+
background-color: var(--lumo-error-color);
|
|
178
|
+
border-radius: var(--lumo-border-radius-m);
|
|
179
|
+
font-family: var(--lumo-font-family);
|
|
180
|
+
font-size: var(--lumo-font-size-xxs);
|
|
181
|
+
line-height: 1;
|
|
182
|
+
font-weight: 500;
|
|
183
|
+
text-transform: initial;
|
|
184
|
+
letter-spacing: initial;
|
|
185
|
+
min-width: calc(var(--lumo-size-s) * 0.7);
|
|
186
|
+
text-align: center;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Headers and footers */
|
|
190
|
+
|
|
191
|
+
[part~='header-cell'] ::slotted(vaadin-grid-cell-content),
|
|
192
|
+
[part~='footer-cell'] ::slotted(vaadin-grid-cell-content),
|
|
193
|
+
[part~='reorder-ghost'] {
|
|
194
|
+
font-size: var(--lumo-font-size-s);
|
|
195
|
+
font-weight: 500;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
[part~='footer-cell'] ::slotted(vaadin-grid-cell-content) {
|
|
199
|
+
font-weight: 400;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
[part='row']:only-child [part~='header-cell'] {
|
|
203
|
+
min-height: var(--lumo-size-xl);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Header borders */
|
|
207
|
+
|
|
208
|
+
/* Hide first header row top border */
|
|
209
|
+
:host(:not([theme~='no-row-borders'])) [part='row']:first-child [part~='header-cell'] {
|
|
210
|
+
border-top: 0;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
[part='row']:last-child [part~='header-cell'] {
|
|
214
|
+
border-bottom: var(--_lumo-grid-border-width) solid transparent;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:host(:not([theme~='no-row-borders'])) [part='row']:last-child [part~='header-cell'] {
|
|
218
|
+
border-bottom-color: var(--_lumo-grid-secondary-border-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Overflow uses a stronger border color */
|
|
222
|
+
:host([overflow~='top']) [part='row']:last-child [part~='header-cell'] {
|
|
223
|
+
border-bottom-color: var(--_lumo-grid-border-color);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Footer borders */
|
|
227
|
+
|
|
228
|
+
[part='row']:first-child [part~='footer-cell'] {
|
|
229
|
+
border-top: var(--_lumo-grid-border-width) solid transparent;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host(:not([theme~='no-row-borders'])) [part='row']:first-child [part~='footer-cell'] {
|
|
233
|
+
border-top-color: var(--_lumo-grid-secondary-border-color);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Overflow uses a stronger border color */
|
|
237
|
+
:host([overflow~='bottom']) [part='row']:first-child [part~='footer-cell'] {
|
|
238
|
+
border-top-color: var(--_lumo-grid-border-color);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* Column reordering */
|
|
242
|
+
|
|
243
|
+
:host([reordering]) [part~='cell'] {
|
|
244
|
+
background: linear-gradient(var(--lumo-shade-20pct), var(--lumo-shade-20pct)) var(--lumo-base-color);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:host([reordering]) [part~='cell'][reorder-status='allowed'] {
|
|
248
|
+
background: var(--lumo-base-color);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
:host([reordering]) [part~='cell'][reorder-status='dragging'] {
|
|
252
|
+
background: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct)) var(--lumo-base-color);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[part~='reorder-ghost'] {
|
|
256
|
+
opacity: 0.85;
|
|
257
|
+
box-shadow: var(--lumo-box-shadow-s);
|
|
258
|
+
/* TODO Use the same styles as for the cell element (reorder-ghost copies styles from the cell element) */
|
|
259
|
+
padding: var(--lumo-space-s) var(--lumo-space-m) !important;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Column resizing */
|
|
263
|
+
|
|
264
|
+
[part='resize-handle'] {
|
|
265
|
+
width: 3px;
|
|
266
|
+
background-color: var(--lumo-primary-color-50pct);
|
|
267
|
+
opacity: 0;
|
|
268
|
+
transition: opacity 0.2s;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
:host(:not([reordering])) *:not([column-resizing]) [part~='cell']:hover [part='resize-handle'],
|
|
272
|
+
[part='resize-handle']:active {
|
|
273
|
+
opacity: 1;
|
|
274
|
+
transition-delay: 0.15s;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* Column borders */
|
|
278
|
+
|
|
279
|
+
:host([theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
|
|
280
|
+
border-right: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Frozen columns */
|
|
284
|
+
|
|
285
|
+
[last-frozen] {
|
|
286
|
+
border-right: var(--_lumo-grid-border-width) solid transparent;
|
|
287
|
+
overflow: hidden;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
:host([overflow~='left']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
|
|
291
|
+
border-right-color: var(--_lumo-grid-border-color);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* Row stripes */
|
|
295
|
+
|
|
296
|
+
:host([theme~='row-stripes']) [part~='row']:not([odd]) [part~='body-cell'],
|
|
297
|
+
:host([theme~='row-stripes']) [part~='row']:not([odd]) [part~='details-cell'] {
|
|
298
|
+
background-image: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
|
|
299
|
+
background-repeat: repeat-x;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* Selected row */
|
|
303
|
+
|
|
304
|
+
/* Raise the selected rows above unselected rows (so that box-shadow can cover unselected rows) */
|
|
305
|
+
:host(:not([reordering])) [part~='row'][selected] {
|
|
306
|
+
z-index: 1;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
:host(:not([reordering])) [part~='row'][selected] [part~='body-cell']:not([part~='details-cell']) {
|
|
310
|
+
background-image: linear-gradient(var(--_lumo-grid-selected-row-color), var(--_lumo-grid-selected-row-color));
|
|
311
|
+
background-repeat: repeat;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* Cover the border of an unselected row */
|
|
315
|
+
:host(:not([theme~='no-row-borders'])) [part~='row'][selected] [part~='cell']:not([part~='details-cell']) {
|
|
316
|
+
box-shadow: 0 var(--_lumo-grid-border-width) 0 0 var(--_lumo-grid-selected-row-color);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/* Compact */
|
|
320
|
+
|
|
321
|
+
:host([theme~='compact']) [part='row']:only-child [part~='header-cell'] {
|
|
322
|
+
min-height: var(--lumo-size-m);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
:host([theme~='compact']) [part~='cell'] {
|
|
326
|
+
min-height: var(--lumo-size-s);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
:host([theme~='compact']) [part='row'][first] [part~='cell']:not([part~='details-cell']) {
|
|
330
|
+
min-height: calc(var(--lumo-size-s) - var(--_lumo-grid-border-width));
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
:host([theme~='compact']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
|
|
334
|
+
padding: var(--lumo-space-xs) var(--lumo-space-s);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* Wrap cell contents */
|
|
338
|
+
|
|
339
|
+
:host([theme~='wrap-cell-content']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
|
|
340
|
+
white-space: normal;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* RTL specific styles */
|
|
344
|
+
|
|
345
|
+
:host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][last-column] {
|
|
346
|
+
border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
:host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][first-column] {
|
|
350
|
+
border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
:host([dir='rtl'][theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
|
|
354
|
+
border-right: none;
|
|
355
|
+
border-left: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:host([dir='rtl']) [last-frozen] {
|
|
359
|
+
border-right: none;
|
|
360
|
+
border-left: var(--_lumo-grid-border-width) solid transparent;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
:host([dir='rtl'][overflow~='right']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
|
|
364
|
+
border-left-color: var(--_lumo-grid-border-color);
|
|
365
|
+
}
|
|
366
|
+
`,
|
|
367
|
+
{ moduleId: 'lumo-grid' }
|
|
368
|
+
);
|
|
369
|
+
|
|
370
|
+
registerStyles(
|
|
371
|
+
'vaadin-checkbox',
|
|
372
|
+
css`
|
|
373
|
+
:host(.vaadin-grid-select-all-checkbox) {
|
|
374
|
+
font-size: var(--lumo-font-size-m);
|
|
375
|
+
}
|
|
376
|
+
`,
|
|
377
|
+
{ moduleId: 'vaadin-grid-select-all-checkbox-lumo' }
|
|
378
|
+
);
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
|
|
2
|
+
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
3
|
+
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
4
|
+
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
5
|
+
|
|
6
|
+
registerStyles(
|
|
7
|
+
'vaadin-grid-tree-toggle',
|
|
8
|
+
css`
|
|
9
|
+
:host {
|
|
10
|
+
--vaadin-grid-tree-toggle-level-offset: 2em;
|
|
11
|
+
align-items: center;
|
|
12
|
+
vertical-align: middle;
|
|
13
|
+
margin-left: calc(var(--lumo-space-s) * -1);
|
|
14
|
+
-webkit-tap-highlight-color: transparent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(:not([leaf])) {
|
|
18
|
+
cursor: default;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[part='toggle'] {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
font-size: 1.5em;
|
|
24
|
+
line-height: 1;
|
|
25
|
+
width: 1em;
|
|
26
|
+
height: 1em;
|
|
27
|
+
text-align: center;
|
|
28
|
+
color: var(--lumo-contrast-50pct);
|
|
29
|
+
cursor: var(--lumo-clickable-cursor);
|
|
30
|
+
/* Increase touch target area */
|
|
31
|
+
padding: calc(1em / 3);
|
|
32
|
+
margin: calc(1em / -3);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host(:not([dir='rtl'])) [part='toggle'] {
|
|
36
|
+
margin-right: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (hover: hover) {
|
|
40
|
+
:host(:hover) [part='toggle'] {
|
|
41
|
+
color: var(--lumo-contrast-80pct);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[part='toggle']::before {
|
|
46
|
+
font-family: 'lumo-icons';
|
|
47
|
+
display: inline-block;
|
|
48
|
+
height: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host(:not([expanded])) [part='toggle']::before {
|
|
52
|
+
content: var(--lumo-icons-angle-right);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([expanded]) [part='toggle']::before {
|
|
56
|
+
content: var(--lumo-icons-angle-right);
|
|
57
|
+
transform: rotate(90deg);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Experimental support for hierarchy connectors, using an unsupported selector */
|
|
61
|
+
:host([theme~='connectors']) #level-spacer {
|
|
62
|
+
position: relative;
|
|
63
|
+
z-index: -1;
|
|
64
|
+
font-size: 1em;
|
|
65
|
+
height: 1.5em;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([theme~='connectors']) #level-spacer::before {
|
|
69
|
+
display: block;
|
|
70
|
+
content: '';
|
|
71
|
+
margin-top: calc(var(--lumo-space-m) * -1);
|
|
72
|
+
height: calc(var(--lumo-space-m) + 3em);
|
|
73
|
+
background-image: linear-gradient(
|
|
74
|
+
to right,
|
|
75
|
+
transparent calc(var(--vaadin-grid-tree-toggle-level-offset) - 1px),
|
|
76
|
+
var(--lumo-contrast-10pct) calc(var(--vaadin-grid-tree-toggle-level-offset) - 1px)
|
|
77
|
+
);
|
|
78
|
+
background-size: var(--vaadin-grid-tree-toggle-level-offset) var(--vaadin-grid-tree-toggle-level-offset);
|
|
79
|
+
background-position: calc(var(--vaadin-grid-tree-toggle-level-offset) / 2 - 2px) 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* RTL specific styles */
|
|
83
|
+
|
|
84
|
+
:host([dir='rtl']) {
|
|
85
|
+
margin-left: 0;
|
|
86
|
+
margin-right: calc(var(--lumo-space-s) * -1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([dir='rtl']) [part='toggle'] {
|
|
90
|
+
margin-left: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host([dir='rtl'][expanded]) [part='toggle']::before {
|
|
94
|
+
transform: rotate(-90deg);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host([dir='rtl'][theme~='connectors']) #level-spacer::before {
|
|
98
|
+
background-image: linear-gradient(
|
|
99
|
+
to left,
|
|
100
|
+
transparent calc(var(--vaadin-grid-tree-toggle-level-offset) - 1px),
|
|
101
|
+
var(--lumo-contrast-10pct) calc(var(--vaadin-grid-tree-toggle-level-offset) - 1px)
|
|
102
|
+
);
|
|
103
|
+
background-position: calc(100% - (var(--vaadin-grid-tree-toggle-level-offset) / 2 - 2px)) 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([dir='rtl']:not([expanded])) [part='toggle']::before,
|
|
107
|
+
:host([dir='rtl'][expanded]) [part='toggle']::before {
|
|
108
|
+
content: var(--lumo-icons-angle-left);
|
|
109
|
+
}
|
|
110
|
+
`,
|
|
111
|
+
{ moduleId: 'lumo-grid-tree-toggle' }
|
|
112
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
+
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
3
|
+
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
4
|
+
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
5
|
+
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
6
|
+
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
7
|
+
import '@vaadin/checkbox/theme/lumo/vaadin-checkbox.js';
|
|
8
|
+
import './vaadin-grid-styles.js';
|
|
9
|
+
import '../../src/vaadin-grid.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './vaadin-grid-column-group.js';
|
|
2
|
+
import './vaadin-grid-column.js';
|
|
3
|
+
import './vaadin-grid-filter.js';
|
|
4
|
+
import './vaadin-grid-filter-column.js';
|
|
5
|
+
import './vaadin-grid-selection-column.js';
|
|
6
|
+
import './vaadin-grid-sorter.js';
|
|
7
|
+
import './vaadin-grid-sort-column.js';
|
|
8
|
+
import './vaadin-grid-tree-toggle.js';
|
|
9
|
+
import './vaadin-grid-tree-column.js';
|
|
10
|
+
import './vaadin-grid.js';
|
|
11
|
+
import '../../src/all-imports.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../src/vaadin-grid-column-group.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../src/vaadin-grid-column.js';
|