@vaadin/grid 25.0.0-alpha7 → 25.0.0-alpha8

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.
@@ -7,499 +7,496 @@ import '@vaadin/component-base/src/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const gridStyles = css`
10
- @layer base {
11
- @keyframes vaadin-grid-appear {
12
- to {
13
- opacity: 1;
14
- }
10
+ @keyframes vaadin-grid-appear {
11
+ to {
12
+ opacity: 1;
15
13
  }
14
+ }
16
15
 
17
- :host {
18
- display: flex;
19
- animation: 1ms vaadin-grid-appear;
20
- max-width: 100%;
21
- height: 400px;
22
- min-height: var(--_grid-min-height, 0);
23
- flex: 1 1 auto;
24
- align-self: stretch;
25
- position: relative;
26
- box-sizing: border-box;
27
- -webkit-tap-highlight-color: transparent;
28
- background: var(--vaadin-grid-background, var(--vaadin-background-color));
29
- border: var(--_border-width) solid var(--vaadin-grid-border-color, var(--vaadin-border-color));
30
- cursor: default;
31
- --_border-width: 0;
32
- --_row-border-width: var(--vaadin-grid-cell-border-width, 1px);
33
- --_column-border-width: var(--vaadin-grid-cell-border-width, 0);
34
- --_cell-padding: var(--vaadin-grid-cell-padding, var(--vaadin-padding-container));
35
- --_reorder-background-image: none;
36
- --_selection-background-image: none;
37
- border-radius: var(--_border-radius);
38
- --_border-radius: 0;
39
- }
16
+ :host {
17
+ display: flex;
18
+ animation: 1ms vaadin-grid-appear;
19
+ max-width: 100%;
20
+ height: 400px;
21
+ min-height: var(--_grid-min-height, 0);
22
+ flex: 1 1 auto;
23
+ align-self: stretch;
24
+ position: relative;
25
+ box-sizing: border-box;
26
+ -webkit-tap-highlight-color: transparent;
27
+ background: var(--vaadin-grid-background, var(--vaadin-background-color));
28
+ border: var(--_border-width) solid var(--vaadin-grid-border-color, var(--vaadin-border-color));
29
+ cursor: default;
30
+ --_border-width: 0;
31
+ --_row-border-width: var(--vaadin-grid-cell-border-width, 1px);
32
+ --_column-border-width: var(--vaadin-grid-cell-border-width, 0);
33
+ --_cell-padding: var(--vaadin-grid-cell-padding, var(--vaadin-padding-container));
34
+ --_reorder-background-image: none;
35
+ --_selection-background-image: none;
36
+ border-radius: var(--_border-radius);
37
+ --_border-radius: 0;
38
+ }
40
39
 
41
- :host([hidden]),
42
- [hidden] {
43
- display: none !important;
44
- }
40
+ :host([hidden]),
41
+ [hidden] {
42
+ display: none !important;
43
+ }
45
44
 
46
- :host([disabled]) {
47
- pointer-events: none;
48
- opacity: 0.7;
49
- }
45
+ :host([disabled]) {
46
+ pointer-events: none;
47
+ opacity: 0.7;
48
+ }
50
49
 
51
- /* Variant: No outer border */
52
- :host(:not([theme~='no-border'])) {
53
- --_border-width: var(--vaadin-grid-border-width, 1px);
54
- --_border-radius: var(--vaadin-grid-border-radius, var(--vaadin-radius-l));
55
- }
50
+ /* Variant: No outer border */
51
+ :host(:not([theme~='no-border'])) {
52
+ --_border-width: var(--vaadin-grid-border-width, 1px);
53
+ --_border-radius: var(--vaadin-grid-border-radius, var(--vaadin-radius-l));
54
+ }
56
55
 
57
- :host([all-rows-visible]) {
58
- height: auto;
59
- align-self: flex-start;
60
- min-height: auto;
61
- flex-grow: 0;
62
- }
56
+ :host([all-rows-visible]) {
57
+ height: auto;
58
+ align-self: flex-start;
59
+ min-height: auto;
60
+ flex-grow: 0;
61
+ }
63
62
 
64
- #scroller {
65
- contain: layout;
66
- border-radius: calc(var(--_border-radius) - var(--_border-width));
67
- position: relative;
68
- display: flex;
69
- width: 100%;
70
- min-width: 0;
71
- min-height: 0;
72
- align-self: stretch;
73
- overflow: hidden;
74
- }
63
+ #scroller {
64
+ contain: layout;
65
+ border-radius: calc(var(--_border-radius) - var(--_border-width));
66
+ position: relative;
67
+ display: flex;
68
+ width: 100%;
69
+ min-width: 0;
70
+ min-height: 0;
71
+ align-self: stretch;
72
+ overflow: hidden;
73
+ }
75
74
 
76
- #items {
77
- flex-grow: 1;
78
- flex-shrink: 0;
79
- display: block;
80
- position: sticky;
81
- width: 100%;
82
- left: 0;
83
- min-height: 1px;
84
- }
75
+ #items {
76
+ flex-grow: 1;
77
+ flex-shrink: 0;
78
+ display: block;
79
+ position: sticky;
80
+ width: 100%;
81
+ left: 0;
82
+ min-height: 1px;
83
+ }
85
84
 
86
- #table {
87
- display: flex;
88
- flex-direction: column;
89
- width: 100%;
90
- overflow: auto;
91
- position: relative;
92
- border-radius: inherit;
93
- /* Workaround for a Chrome bug: new stacking context here prevents the scrollbar from getting hidden */
94
- z-index: 0;
95
- }
85
+ #table {
86
+ display: flex;
87
+ flex-direction: column;
88
+ width: 100%;
89
+ overflow: auto;
90
+ position: relative;
91
+ border-radius: inherit;
92
+ /* Workaround for a Chrome bug: new stacking context here prevents the scrollbar from getting hidden */
93
+ z-index: 0;
94
+ }
96
95
 
97
- [no-scrollbars]:is([safari], [firefox]) #table {
98
- overflow: hidden;
99
- }
96
+ [no-scrollbars]:is([safari], [firefox]) #table {
97
+ overflow: hidden;
98
+ }
100
99
 
101
- #header,
102
- #footer {
103
- display: block;
104
- position: sticky;
105
- left: 0;
106
- width: 100%;
107
- z-index: 1;
108
- }
100
+ #header,
101
+ #footer {
102
+ display: block;
103
+ position: sticky;
104
+ left: 0;
105
+ width: 100%;
106
+ z-index: 1;
107
+ }
109
108
 
110
- :host([dir='rtl']) #items,
111
- :host([dir='rtl']) #header,
112
- :host([dir='rtl']) #footer {
113
- left: auto;
114
- }
109
+ :host([dir='rtl']) #items,
110
+ :host([dir='rtl']) #header,
111
+ :host([dir='rtl']) #footer {
112
+ left: auto;
113
+ }
115
114
 
116
- #header {
117
- top: 0;
118
- }
115
+ #header {
116
+ top: 0;
117
+ }
119
118
 
120
- #footer {
121
- bottom: 0;
122
- }
119
+ #footer {
120
+ bottom: 0;
121
+ }
123
122
 
124
- th {
125
- text-align: inherit;
126
- }
123
+ th {
124
+ text-align: inherit;
125
+ }
127
126
 
128
- #header th,
129
- [part~='reorder-ghost'] {
130
- font-size: var(--vaadin-grid-header-font-size, 1em);
131
- font-weight: var(--vaadin-grid-header-font-weight, 500);
132
- color: var(--vaadin-grid-header-color, var(--vaadin-color));
133
- }
127
+ #header th,
128
+ [part~='reorder-ghost'] {
129
+ font-size: var(--vaadin-grid-header-font-size, 1em);
130
+ font-weight: var(--vaadin-grid-header-font-weight, 500);
131
+ color: var(--vaadin-grid-header-color, var(--vaadin-color));
132
+ }
134
133
 
135
- [part~='row'] {
136
- display: flex;
137
- width: 100%;
138
- box-sizing: border-box;
139
- margin: 0;
140
- position: relative;
141
- }
134
+ [part~='row'] {
135
+ display: flex;
136
+ width: 100%;
137
+ box-sizing: border-box;
138
+ margin: 0;
139
+ position: relative;
140
+ }
142
141
 
143
- [part~='row'][loading] [part~='body-cell'] ::slotted(vaadin-grid-cell-content) {
144
- visibility: hidden;
145
- }
142
+ [part~='row'][loading] [part~='body-cell'] ::slotted(vaadin-grid-cell-content) {
143
+ visibility: hidden;
144
+ }
146
145
 
147
- [column-rendering='lazy'] [part~='body-cell']:not([frozen]):not([frozen-to-end]) {
148
- transform: translateX(var(--_grid-lazy-columns-start));
149
- }
146
+ [column-rendering='lazy'] [part~='body-cell']:not([frozen]):not([frozen-to-end]) {
147
+ transform: translateX(var(--_grid-lazy-columns-start));
148
+ }
150
149
 
151
- #items [part~='row']:empty {
152
- height: 100%;
153
- }
150
+ #items [part~='row']:empty {
151
+ height: 100%;
152
+ }
154
153
 
155
- [part~='cell'] {
156
- box-sizing: border-box;
157
- background:
158
- var(--_reorder-background-image), var(--_selection-background-image),
159
- var(--vaadin-grid-cell-background, var(--vaadin-background-color));
160
- padding: 0;
161
- }
154
+ [part~='cell'] {
155
+ box-sizing: border-box;
156
+ background:
157
+ var(--_reorder-background-image), var(--_selection-background-image),
158
+ var(--vaadin-grid-cell-background, var(--vaadin-background-color));
159
+ padding: 0;
160
+ }
162
161
 
163
- [part~='cell']:not([part~='details-cell']) {
164
- flex-shrink: 0;
165
- flex-grow: 1;
166
- box-sizing: border-box;
167
- display: flex;
168
- width: 100%;
169
- position: relative;
170
- align-items: center;
171
- white-space: nowrap;
172
- }
162
+ [part~='cell']:not([part~='details-cell']) {
163
+ flex-shrink: 0;
164
+ flex-grow: 1;
165
+ box-sizing: border-box;
166
+ display: flex;
167
+ width: 100%;
168
+ position: relative;
169
+ align-items: center;
170
+ white-space: nowrap;
171
+ }
173
172
 
174
- :focus-visible,
175
- [part~='row']::after {
176
- outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
177
- outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
178
- }
173
+ :focus-visible,
174
+ [part~='row']::after {
175
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
176
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
177
+ }
179
178
 
180
- [part~='row']:focus-visible {
181
- z-index: 1;
182
- }
179
+ [part~='row']:focus-visible {
180
+ z-index: 1;
181
+ }
183
182
 
184
- /* Used for focus outline and drag'n'drop target indication */
185
- [part~='row']::after {
186
- content: '';
187
- position: absolute;
188
- inset: calc(var(--_row-border-width) * -1) 0;
189
- z-index: 3;
190
- transform: translateX(var(--_grid-horizontal-scroll-position));
191
- pointer-events: none;
192
- visibility: hidden;
193
- }
183
+ /* Used for focus outline and drag'n'drop target indication */
184
+ [part~='row']::after {
185
+ content: '';
186
+ position: absolute;
187
+ inset: calc(var(--_row-border-width) * -1) 0;
188
+ z-index: 3;
189
+ transform: translateX(var(--_grid-horizontal-scroll-position));
190
+ pointer-events: none;
191
+ visibility: hidden;
192
+ }
194
193
 
195
- [part~='row']:focus-visible::after {
196
- visibility: visible;
197
- }
194
+ [part~='row']:focus-visible::after {
195
+ visibility: visible;
196
+ }
198
197
 
199
- /* Variant: wrap cell contents */
198
+ /* Variant: wrap cell contents */
200
199
 
201
- :host([theme~='wrap-cell-content']) [part~='cell']:not([part~='details-cell']) {
202
- white-space: normal;
203
- }
200
+ :host([theme~='wrap-cell-content']) [part~='cell']:not([part~='details-cell']) {
201
+ white-space: normal;
202
+ }
204
203
 
205
- /* Variant: row & column borders */
204
+ /* Variant: row & column borders */
206
205
 
207
- :host([theme~='no-row-borders']) {
208
- --_row-border-width: 0;
209
- }
206
+ :host([theme~='no-row-borders']) {
207
+ --_row-border-width: 0;
208
+ }
210
209
 
211
- :host([theme~='column-borders']) {
212
- --_column-border-width: var(--vaadin-grid-cell-border-width, 1px);
213
- }
210
+ :host([theme~='column-borders']) {
211
+ --_column-border-width: var(--vaadin-grid-cell-border-width, 1px);
212
+ }
214
213
 
215
- [part~='cell']:not([part~='last-column-cell'], [part~='details-cell']) {
216
- border-inline-end: var(--_column-border-width, 0) solid
217
- var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
218
- }
214
+ [part~='cell']:not([part~='last-column-cell'], [part~='details-cell']) {
215
+ border-inline-end: var(--_column-border-width, 0) solid
216
+ var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
217
+ }
219
218
 
220
- [part~='cell']:where(:not([part~='details-cell'], [part~='first-row-cell'])) {
221
- border-top: var(--_row-border-width) solid var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
222
- }
219
+ [part~='cell']:where(:not([part~='details-cell'], [part~='first-row-cell'])) {
220
+ border-top: var(--_row-border-width) solid var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
221
+ }
223
222
 
224
- [part~='first-header-row-cell'] {
225
- border-top: 0;
226
- }
223
+ [part~='first-header-row-cell'] {
224
+ border-top: 0;
225
+ }
227
226
 
228
- [part~='last-header-row-cell'] {
229
- border-bottom: var(--_row-border-width, 1px) solid
230
- var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
231
- }
227
+ [part~='last-header-row-cell'] {
228
+ border-bottom: var(--_row-border-width, 1px) solid var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
229
+ }
232
230
 
233
- [part~='first-footer-row-cell'] {
234
- border-top: var(--_row-border-width, 1px) solid var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
235
- }
231
+ [part~='first-footer-row-cell'] {
232
+ border-top: var(--_row-border-width, 1px) solid var(--vaadin-grid-cell-border-color, var(--vaadin-border-color));
233
+ }
236
234
 
237
- /* Variant: row stripes */
238
- :host([theme~='row-stripes']) [part~='odd-row'],
239
- :host([theme~='row-stripes']) [part~='odd-row'] [part~='body-cell'],
240
- :host([theme~='row-stripes']) [part~='odd-row'] [part~='details-cell'] {
241
- background:
242
- var(--_reorder-background-image), var(--_selection-background-image),
243
- var(--vaadin-grid-alternate-cell-background, var(--vaadin-background-container));
244
- }
235
+ /* Variant: row stripes */
236
+ :host([theme~='row-stripes']) [part~='odd-row'],
237
+ :host([theme~='row-stripes']) [part~='odd-row'] [part~='body-cell'],
238
+ :host([theme~='row-stripes']) [part~='odd-row'] [part~='details-cell'] {
239
+ background:
240
+ var(--_reorder-background-image), var(--_selection-background-image),
241
+ var(--vaadin-grid-alternate-cell-background, var(--vaadin-background-container));
242
+ }
245
243
 
246
- [part~='cell'] > [tabindex] {
247
- display: flex;
248
- align-items: inherit;
249
- width: 100%;
250
- }
244
+ [part~='cell'] > [tabindex] {
245
+ display: flex;
246
+ align-items: inherit;
247
+ width: 100%;
248
+ }
251
249
 
252
- [part~='details-cell'] {
253
- position: absolute;
254
- bottom: 0;
255
- width: 100%;
256
- }
250
+ [part~='details-cell'] {
251
+ position: absolute;
252
+ bottom: 0;
253
+ width: 100%;
254
+ }
257
255
 
258
- [part~='cell'] ::slotted(vaadin-grid-cell-content) {
259
- display: block;
260
- width: 100%;
261
- box-sizing: border-box;
262
- overflow: hidden;
263
- text-overflow: ellipsis;
264
- padding: var(--_cell-padding);
265
- }
256
+ [part~='cell'] ::slotted(vaadin-grid-cell-content) {
257
+ display: block;
258
+ width: 100%;
259
+ box-sizing: border-box;
260
+ overflow: hidden;
261
+ text-overflow: ellipsis;
262
+ padding: var(--_cell-padding);
263
+ }
266
264
 
267
- [frozen],
268
- [frozen-to-end] {
269
- z-index: 2;
270
- will-change: transform;
271
- }
265
+ [frozen],
266
+ [frozen-to-end] {
267
+ z-index: 2;
268
+ will-change: transform;
269
+ }
272
270
 
273
- /* Selected row */
274
- [part~='row'][selected] [part~='body-cell']:not([part~='details-cell']) {
275
- --_selection-background-image: var(
276
- --vaadin-grid-row-selected-background-image,
277
- linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08))
278
- );
279
- }
271
+ /* Selected row */
272
+ [part~='row'][selected] [part~='body-cell']:not([part~='details-cell']) {
273
+ --_selection-background-image: var(
274
+ --vaadin-grid-row-selected-background-image,
275
+ linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08))
276
+ );
277
+ }
280
278
 
281
- /* Empty state */
282
- #scroller:not([empty-state]) #emptystatebody,
283
- #scroller[empty-state] #items {
284
- display: none;
285
- }
279
+ /* Empty state */
280
+ #scroller:not([empty-state]) #emptystatebody,
281
+ #scroller[empty-state] #items {
282
+ display: none;
283
+ }
286
284
 
287
- #emptystatebody {
288
- display: flex;
289
- position: sticky;
290
- inset: 0;
291
- flex: 1;
292
- overflow: hidden;
293
- }
285
+ #emptystatebody {
286
+ display: flex;
287
+ position: sticky;
288
+ inset: 0;
289
+ flex: 1;
290
+ overflow: hidden;
291
+ }
294
292
 
295
- #emptystaterow {
296
- display: flex;
297
- flex: 1;
298
- }
293
+ #emptystaterow {
294
+ display: flex;
295
+ flex: 1;
296
+ }
299
297
 
300
- #emptystatecell {
301
- display: block;
302
- flex: 1;
303
- overflow: auto;
304
- padding: var(--_cell-padding);
305
- }
298
+ #emptystatecell {
299
+ display: block;
300
+ flex: 1;
301
+ overflow: auto;
302
+ padding: var(--_cell-padding);
303
+ }
306
304
 
307
- /* Reordering styles */
308
- :host([reordering]) [part~='cell'] ::slotted(vaadin-grid-cell-content),
309
- :host([reordering]) [part~='resize-handle'],
310
- #scroller[no-content-pointer-events] [part~='cell'] ::slotted(vaadin-grid-cell-content) {
311
- pointer-events: none;
312
- }
305
+ /* Reordering styles */
306
+ :host([reordering]) [part~='cell'] ::slotted(vaadin-grid-cell-content),
307
+ :host([reordering]) [part~='resize-handle'],
308
+ #scroller[no-content-pointer-events] [part~='cell'] ::slotted(vaadin-grid-cell-content) {
309
+ pointer-events: none;
310
+ }
313
311
 
314
- [part~='reorder-ghost'] {
315
- visibility: hidden;
316
- position: fixed;
317
- pointer-events: none;
318
- box-shadow:
319
- 0 0 0 1px hsla(0deg, 0%, 0%, 0.2),
320
- 0 8px 24px -2px hsla(0deg, 0%, 0%, 0.2);
321
- padding: var(--_cell-padding) !important;
322
- border-radius: 3px;
323
-
324
- /* Prevent overflowing the grid in Firefox */
325
- top: 0;
326
- inset-inline-start: 0;
327
- }
312
+ [part~='reorder-ghost'] {
313
+ visibility: hidden;
314
+ position: fixed;
315
+ pointer-events: none;
316
+ box-shadow:
317
+ 0 0 0 1px hsla(0deg, 0%, 0%, 0.2),
318
+ 0 8px 24px -2px hsla(0deg, 0%, 0%, 0.2);
319
+ padding: var(--_cell-padding) !important;
320
+ border-radius: 3px;
321
+
322
+ /* Prevent overflowing the grid in Firefox */
323
+ top: 0;
324
+ inset-inline-start: 0;
325
+ }
328
326
 
329
- :host([reordering]) {
330
- -webkit-user-select: none;
331
- user-select: none;
332
- }
327
+ :host([reordering]) {
328
+ -webkit-user-select: none;
329
+ user-select: none;
330
+ }
333
331
 
334
- :host([reordering]) [part~='cell'] {
335
- /* TODO expose a custom property to control this */
336
- --_reorder-background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
337
- }
332
+ :host([reordering]) [part~='cell'] {
333
+ /* TODO expose a custom property to control this */
334
+ --_reorder-background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
335
+ }
338
336
 
339
- :host([reordering]) [part~='cell'][reorder-status='allowed'] {
340
- /* TODO expose a custom property to control this */
341
- --_reorder-background-image: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04));
342
- }
337
+ :host([reordering]) [part~='cell'][reorder-status='allowed'] {
338
+ /* TODO expose a custom property to control this */
339
+ --_reorder-background-image: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04));
340
+ }
343
341
 
344
- :host([reordering]) [part~='cell'][reorder-status='dragging'] {
345
- --_reorder-background-image: none;
346
- }
342
+ :host([reordering]) [part~='cell'][reorder-status='dragging'] {
343
+ --_reorder-background-image: none;
344
+ }
347
345
 
348
- /* Resizing styles */
349
- [part~='resize-handle'] {
350
- position: absolute;
351
- top: 0;
352
- inset-inline-end: 0;
353
- height: 100%;
354
- cursor: col-resize;
355
- z-index: 1;
356
- opacity: 0;
357
- width: var(--vaadin-focus-ring-width);
358
- background: var(--vaadin-grid-column-resize-handle-color, var(--vaadin-focus-ring-color));
359
- transition: opacity 0.2s;
360
- translate: var(--_column-border-width);
361
- }
346
+ /* Resizing styles */
347
+ [part~='resize-handle'] {
348
+ position: absolute;
349
+ top: 0;
350
+ inset-inline-end: 0;
351
+ height: 100%;
352
+ cursor: col-resize;
353
+ z-index: 1;
354
+ opacity: 0;
355
+ width: var(--vaadin-focus-ring-width);
356
+ background: var(--vaadin-grid-column-resize-handle-color, var(--vaadin-focus-ring-color));
357
+ transition: opacity 0.2s;
358
+ translate: var(--_column-border-width);
359
+ }
362
360
 
363
- [part~='last-column-cell'] [part~='resize-handle'] {
364
- translate: 0;
365
- }
361
+ [part~='last-column-cell'] [part~='resize-handle'] {
362
+ translate: 0;
363
+ }
366
364
 
367
- :host(:not([reordering])) *:not([column-resizing]) [part='resize-handle']:hover,
368
- [part='resize-handle']:active {
369
- opacity: 1;
370
- transition-delay: 0.15s;
371
- }
365
+ :host(:not([reordering])) *:not([column-resizing]) [part='resize-handle']:hover,
366
+ [part='resize-handle']:active {
367
+ opacity: 1;
368
+ transition-delay: 0.15s;
369
+ }
372
370
 
373
- [part~='resize-handle']::before {
374
- position: absolute;
375
- content: '';
376
- height: 100%;
377
- width: 16px;
378
- translate: calc(-50% + var(--vaadin-focus-ring-width) / 2);
379
- }
371
+ [part~='resize-handle']::before {
372
+ position: absolute;
373
+ content: '';
374
+ height: 100%;
375
+ width: 16px;
376
+ translate: calc(-50% + var(--vaadin-focus-ring-width) / 2);
377
+ }
380
378
 
381
- :host([dir='rtl']) [part~='resize-handle']::before {
382
- translate: calc(50% - var(--vaadin-focus-ring-width) / 2);
383
- }
379
+ :host([dir='rtl']) [part~='resize-handle']::before {
380
+ translate: calc(50% - var(--vaadin-focus-ring-width) / 2);
381
+ }
384
382
 
385
- [first-frozen-to-end] [part~='resize-handle']::before,
386
- :is([last-column], [last-frozen]) [part~='resize-handle']::before {
387
- width: 8px;
388
- translate: 0;
389
- }
383
+ [first-frozen-to-end] [part~='resize-handle']::before,
384
+ :is([last-column], [last-frozen]) [part~='resize-handle']::before {
385
+ width: 8px;
386
+ translate: 0;
387
+ }
390
388
 
391
- :is([last-column], [last-frozen]) [part~='resize-handle']::before {
392
- inset-inline-end: 0;
393
- }
389
+ :is([last-column], [last-frozen]) [part~='resize-handle']::before {
390
+ inset-inline-end: 0;
391
+ }
394
392
 
395
- [frozen-to-end] :is([part~='resize-handle'], [part~='resize-handle']::before) {
396
- inset-inline: 0 auto;
397
- }
393
+ [frozen-to-end] :is([part~='resize-handle'], [part~='resize-handle']::before) {
394
+ inset-inline: 0 auto;
395
+ }
398
396
 
399
- [first-frozen-to-end] {
400
- margin-inline-start: auto;
401
- }
397
+ [first-frozen-to-end] {
398
+ margin-inline-start: auto;
399
+ }
402
400
 
403
- /* Hide resize handle if scrolled to end */
404
- :host(:not([overflow~='end'])) [first-frozen-to-end] [part~='resize-handle'] {
405
- display: none;
406
- }
401
+ /* Hide resize handle if scrolled to end */
402
+ :host(:not([overflow~='end'])) [first-frozen-to-end] [part~='resize-handle'] {
403
+ display: none;
404
+ }
407
405
 
408
- #scroller:is([column-resizing], [range-selecting]) {
409
- -webkit-user-select: none;
410
- user-select: none;
411
- }
406
+ #scroller:is([column-resizing], [range-selecting]) {
407
+ -webkit-user-select: none;
408
+ user-select: none;
409
+ }
412
410
 
413
- /* Drag'n'drop styles */
414
- :host([dragover]) {
415
- outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
416
- outline-offset: calc(var(--_border-width) * -1);
417
- }
411
+ /* Drag'n'drop styles */
412
+ :host([dragover]) {
413
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
414
+ outline-offset: calc(var(--_border-width) * -1);
415
+ }
418
416
 
419
- [part~='row'][dragover] {
420
- z-index: 100 !important;
421
- }
417
+ [part~='row'][dragover] {
418
+ z-index: 100 !important;
419
+ }
422
420
 
423
- [part~='row'][dragover]::after {
424
- visibility: visible;
425
- }
421
+ [part~='row'][dragover]::after {
422
+ visibility: visible;
423
+ }
426
424
 
427
- [part~='row'][dragover='above']::after {
428
- outline: 0;
429
- border-top: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
430
- top: calc(var(--vaadin-focus-ring-width) / -2);
431
- }
425
+ [part~='row'][dragover='above']::after {
426
+ outline: 0;
427
+ border-top: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
428
+ top: calc(var(--vaadin-focus-ring-width) / -2);
429
+ }
432
430
 
433
- [part~='row'][dragover='below']::after {
434
- outline: 0;
435
- border-bottom: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
436
- bottom: calc(var(--vaadin-focus-ring-width) / -2);
437
- }
431
+ [part~='row'][dragover='below']::after {
432
+ outline: 0;
433
+ border-bottom: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
434
+ bottom: calc(var(--vaadin-focus-ring-width) / -2);
435
+ }
438
436
 
439
- :is([part~='row']:first-child, [part~='first-row'])::after {
440
- top: 0;
441
- }
437
+ :is([part~='row']:first-child, [part~='first-row'])::after {
438
+ top: 0;
439
+ }
442
440
 
443
- :is([part~='row']:last-child, [part~='last-row'])::after {
444
- bottom: 0;
445
- }
441
+ :is([part~='row']:last-child, [part~='last-row'])::after {
442
+ bottom: 0;
443
+ }
446
444
 
447
- [part~='row'][dragstart] [part~='cell'] {
448
- border-top: 0 !important;
449
- }
445
+ [part~='row'][dragstart] [part~='cell'] {
446
+ border-top: 0 !important;
447
+ }
450
448
 
451
- [part~='row'][dragstart] [part~='cell'][last-column] {
452
- border-radius: 0 3px 3px 0;
453
- }
449
+ [part~='row'][dragstart] [part~='cell'][last-column] {
450
+ border-radius: 0 3px 3px 0;
451
+ }
454
452
 
455
- [part~='row'][dragstart] [part~='cell'][first-column] {
456
- border-radius: 3px 0 0 3px;
457
- }
453
+ [part~='row'][dragstart] [part~='cell'][first-column] {
454
+ border-radius: 3px 0 0 3px;
455
+ }
458
456
 
459
- /* Indicates the number of dragged rows */
460
- /* TODO export custom properties to control styles */
461
- #scroller [part~='row'][dragstart]:not([dragstart=''])::before {
462
- position: absolute;
463
- left: var(--_grid-drag-start-x);
464
- top: var(--_grid-drag-start-y);
465
- z-index: 100;
466
- content: attr(dragstart);
467
- box-sizing: border-box;
468
- padding: 0.3em;
469
- color: white;
470
- background-color: red;
471
- border-radius: 1em;
472
- font-size: 0.75rem;
473
- line-height: 1;
474
- font-weight: 500;
475
- min-width: 1.6em;
476
- text-align: center;
477
- }
457
+ /* Indicates the number of dragged rows */
458
+ /* TODO export custom properties to control styles */
459
+ #scroller [part~='row'][dragstart]:not([dragstart=''])::before {
460
+ position: absolute;
461
+ left: var(--_grid-drag-start-x);
462
+ top: var(--_grid-drag-start-y);
463
+ z-index: 100;
464
+ content: attr(dragstart);
465
+ box-sizing: border-box;
466
+ padding: 0.3em;
467
+ color: white;
468
+ background-color: red;
469
+ border-radius: 1em;
470
+ font-size: 0.75rem;
471
+ line-height: 1;
472
+ font-weight: 500;
473
+ min-width: 1.6em;
474
+ text-align: center;
475
+ }
478
476
 
479
- /* Sizer styles */
480
- #sizer {
481
- display: flex;
482
- visibility: hidden;
483
- }
477
+ /* Sizer styles */
478
+ #sizer {
479
+ display: flex;
480
+ visibility: hidden;
481
+ }
484
482
 
485
- #sizer [part~='details-cell'],
486
- #sizer [part~='cell'] ::slotted(vaadin-grid-cell-content) {
487
- display: none !important;
488
- }
483
+ #sizer [part~='details-cell'],
484
+ #sizer [part~='cell'] ::slotted(vaadin-grid-cell-content) {
485
+ display: none !important;
486
+ }
489
487
 
490
- #sizer [part~='cell'] {
491
- display: block;
492
- flex-shrink: 0;
493
- line-height: 0;
494
- height: 0 !important;
495
- min-height: 0 !important;
496
- max-height: 0 !important;
497
- padding: 0 !important;
498
- border: none !important;
499
- }
488
+ #sizer [part~='cell'] {
489
+ display: block;
490
+ flex-shrink: 0;
491
+ line-height: 0;
492
+ height: 0 !important;
493
+ min-height: 0 !important;
494
+ max-height: 0 !important;
495
+ padding: 0 !important;
496
+ border: none !important;
497
+ }
500
498
 
501
- #sizer [part~='cell']::before {
502
- content: '-';
503
- }
499
+ #sizer [part~='cell']::before {
500
+ content: '-';
504
501
  }
505
502
  `;