@vaadin/grid 25.0.0-alpha2 → 25.0.0-alpha20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/all-imports.js +1 -1
  2. package/package.json +12 -13
  3. package/src/array-data-provider.js +9 -2
  4. package/src/lit/column-renderer-directives.d.ts +0 -1
  5. package/src/styles/vaadin-grid-base-styles.d.ts +8 -0
  6. package/src/styles/vaadin-grid-base-styles.js +671 -0
  7. package/src/styles/vaadin-grid-filter-base-styles.d.ts +8 -0
  8. package/src/styles/vaadin-grid-filter-base-styles.js +18 -0
  9. package/src/styles/vaadin-grid-sorter-base-styles.d.ts +8 -0
  10. package/src/styles/vaadin-grid-sorter-base-styles.js +64 -0
  11. package/src/styles/vaadin-grid-tree-toggle-base-styles.d.ts +8 -0
  12. package/src/styles/vaadin-grid-tree-toggle-base-styles.js +76 -0
  13. package/src/vaadin-grid-a11y-mixin.js +26 -10
  14. package/src/vaadin-grid-column-auto-width-mixin.js +9 -6
  15. package/src/vaadin-grid-column-mixin.d.ts +1 -0
  16. package/src/vaadin-grid-column-mixin.js +1 -16
  17. package/src/vaadin-grid-column-reordering-mixin.js +2 -2
  18. package/src/vaadin-grid-data-provider-mixin.js +33 -85
  19. package/src/vaadin-grid-drag-and-drop-mixin.js +3 -0
  20. package/src/vaadin-grid-event-context-mixin.d.ts +2 -0
  21. package/src/vaadin-grid-event-context-mixin.js +1 -0
  22. package/src/vaadin-grid-filter-element-mixin.js +0 -17
  23. package/src/vaadin-grid-filter.js +7 -1
  24. package/src/vaadin-grid-helpers.js +9 -0
  25. package/src/vaadin-grid-keyboard-navigation-mixin.js +2 -6
  26. package/src/vaadin-grid-mixin.d.ts +1 -0
  27. package/src/vaadin-grid-mixin.js +64 -32
  28. package/src/vaadin-grid-row-details-mixin.js +5 -5
  29. package/src/vaadin-grid-scroll-mixin.js +57 -77
  30. package/src/vaadin-grid-selection-column-base-mixin.d.ts +1 -1
  31. package/src/vaadin-grid-selection-column-base-mixin.js +1 -1
  32. package/src/vaadin-grid-selection-column.d.ts +2 -0
  33. package/src/vaadin-grid-selection-column.js +2 -1
  34. package/src/vaadin-grid-sort-column.d.ts +2 -0
  35. package/src/vaadin-grid-sorter-mixin.js +0 -60
  36. package/src/vaadin-grid-sorter.d.ts +3 -3
  37. package/src/vaadin-grid-sorter.js +10 -4
  38. package/src/vaadin-grid-tree-column-mixin.js +2 -7
  39. package/src/vaadin-grid-tree-toggle-mixin.js +0 -77
  40. package/src/vaadin-grid-tree-toggle.d.ts +4 -4
  41. package/src/vaadin-grid-tree-toggle.js +13 -5
  42. package/src/vaadin-grid.d.ts +2 -1
  43. package/src/vaadin-grid.js +6 -3
  44. package/vaadin-grid-column-group.js +1 -1
  45. package/vaadin-grid-column.js +1 -1
  46. package/vaadin-grid-filter-column.js +1 -1
  47. package/vaadin-grid-filter.js +1 -1
  48. package/vaadin-grid-selection-column.js +1 -1
  49. package/vaadin-grid-sort-column.js +1 -1
  50. package/vaadin-grid-sorter.js +1 -1
  51. package/vaadin-grid-tree-column.js +1 -1
  52. package/vaadin-grid-tree-toggle.js +1 -1
  53. package/vaadin-grid.js +1 -1
  54. package/web-types.json +13 -13
  55. package/web-types.lit.json +12 -12
  56. package/src/vaadin-grid-styles.js +0 -389
  57. package/theme/lumo/all-imports.d.ts +0 -11
  58. package/theme/lumo/all-imports.js +0 -11
  59. package/theme/lumo/vaadin-grid-column-group.d.ts +0 -1
  60. package/theme/lumo/vaadin-grid-column-group.js +0 -1
  61. package/theme/lumo/vaadin-grid-column.d.ts +0 -1
  62. package/theme/lumo/vaadin-grid-column.js +0 -1
  63. package/theme/lumo/vaadin-grid-filter-column.d.ts +0 -2
  64. package/theme/lumo/vaadin-grid-filter-column.js +0 -2
  65. package/theme/lumo/vaadin-grid-filter.d.ts +0 -2
  66. package/theme/lumo/vaadin-grid-filter.js +0 -2
  67. package/theme/lumo/vaadin-grid-selection-column.d.ts +0 -2
  68. package/theme/lumo/vaadin-grid-selection-column.js +0 -2
  69. package/theme/lumo/vaadin-grid-sort-column.d.ts +0 -2
  70. package/theme/lumo/vaadin-grid-sort-column.js +0 -2
  71. package/theme/lumo/vaadin-grid-sorter-styles.d.ts +0 -3
  72. package/theme/lumo/vaadin-grid-sorter-styles.js +0 -52
  73. package/theme/lumo/vaadin-grid-sorter.d.ts +0 -2
  74. package/theme/lumo/vaadin-grid-sorter.js +0 -2
  75. package/theme/lumo/vaadin-grid-styles.d.ts +0 -6
  76. package/theme/lumo/vaadin-grid-styles.js +0 -405
  77. package/theme/lumo/vaadin-grid-tree-column.d.ts +0 -2
  78. package/theme/lumo/vaadin-grid-tree-column.js +0 -2
  79. package/theme/lumo/vaadin-grid-tree-toggle-styles.d.ts +0 -3
  80. package/theme/lumo/vaadin-grid-tree-toggle-styles.js +0 -81
  81. package/theme/lumo/vaadin-grid-tree-toggle.d.ts +0 -2
  82. package/theme/lumo/vaadin-grid-tree-toggle.js +0 -2
  83. package/theme/lumo/vaadin-grid.d.ts +0 -2
  84. package/theme/lumo/vaadin-grid.js +0 -2
@@ -0,0 +1,671 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import '@vaadin/component-base/src/styles/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const gridStyles = css`
10
+ @keyframes vaadin-grid-appear {
11
+ to {
12
+ opacity: 1;
13
+ }
14
+ }
15
+
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(--_border-color);
29
+ cursor: default;
30
+ --_border-color: var(--vaadin-grid-border-color, var(--vaadin-border-color-secondary));
31
+ --_border-width: 0;
32
+ --_row-border-width: var(--vaadin-grid-row-border-width, 1px);
33
+ --_column-border-width: var(--vaadin-grid-column-border-width, 0px);
34
+ border-radius: var(--_border-radius);
35
+ --_border-radius: 0;
36
+ }
37
+
38
+ :host([hidden]),
39
+ [hidden] {
40
+ display: none !important;
41
+ }
42
+
43
+ :host([disabled]) {
44
+ pointer-events: none;
45
+ opacity: 0.7;
46
+ }
47
+
48
+ /* Variant: No outer border */
49
+ :host(:not([theme~='no-border'])) {
50
+ --_border-width: var(--vaadin-grid-border-width, 1px);
51
+ --_border-radius: var(--vaadin-grid-border-radius, var(--vaadin-radius-l));
52
+ }
53
+
54
+ :host([all-rows-visible]) {
55
+ height: auto;
56
+ align-self: flex-start;
57
+ min-height: auto;
58
+ flex-grow: 0;
59
+ }
60
+
61
+ #scroller {
62
+ contain: layout;
63
+ border-radius: calc(var(--_border-radius) - var(--_border-width));
64
+ position: relative;
65
+ display: flex;
66
+ width: 100%;
67
+ min-width: 0;
68
+ min-height: 0;
69
+ align-self: stretch;
70
+ overflow: hidden;
71
+ }
72
+
73
+ #items {
74
+ flex-grow: 1;
75
+ flex-shrink: 0;
76
+ display: block;
77
+ position: sticky;
78
+ width: 100%;
79
+ left: 0;
80
+ min-height: 1px;
81
+ z-index: 1;
82
+ }
83
+
84
+ #table {
85
+ display: flex;
86
+ flex-direction: column;
87
+ width: 100%;
88
+ overflow: auto;
89
+ position: relative;
90
+ border-radius: inherit;
91
+ /* Workaround for a Chrome bug: new stacking context here prevents the scrollbar from getting hidden */
92
+ z-index: 0;
93
+ }
94
+
95
+ [no-scrollbars]:is([safari], [firefox]) #table {
96
+ overflow: hidden;
97
+ }
98
+
99
+ #header,
100
+ #footer {
101
+ display: block;
102
+ position: sticky;
103
+ left: 0;
104
+ width: 100%;
105
+ }
106
+
107
+ :host([overflow~='top']) #header,
108
+ :host([overflow~='bottom']) #footer,
109
+ :host([navigating]) #header:has(tr:last-child:focus-within),
110
+ :host([navigating]) #footer:has(tr:first-child:focus-within),
111
+ [empty-state] #header {
112
+ z-index: 2;
113
+ }
114
+
115
+ :host([dir='rtl']) #items,
116
+ :host([dir='rtl']) #header,
117
+ :host([dir='rtl']) #footer {
118
+ left: auto;
119
+ }
120
+
121
+ #header {
122
+ top: 0;
123
+ }
124
+
125
+ #footer {
126
+ bottom: 0;
127
+ }
128
+
129
+ th {
130
+ text-align: inherit;
131
+ }
132
+
133
+ #header th,
134
+ [part~='reorder-ghost'] {
135
+ font-size: var(--vaadin-grid-header-font-size, 1em);
136
+ font-weight: var(--vaadin-grid-header-font-weight, 500);
137
+ color: var(--vaadin-grid-header-color, var(--vaadin-text-color));
138
+ }
139
+
140
+ [part~='row'] {
141
+ display: flex;
142
+ width: 100%;
143
+ box-sizing: border-box;
144
+ margin: 0;
145
+ position: relative;
146
+ }
147
+
148
+ [part~='row'][loading] [part~='body-cell'] ::slotted(vaadin-grid-cell-content) {
149
+ visibility: hidden;
150
+ }
151
+
152
+ [column-rendering='lazy'] [part~='body-cell']:not([frozen]):not([frozen-to-end]) {
153
+ transform: translateX(var(--_grid-lazy-columns-start));
154
+ }
155
+
156
+ #items [part~='row']:empty {
157
+ height: 100%;
158
+ }
159
+
160
+ [part~='cell'] {
161
+ padding: 0;
162
+ box-sizing: border-box;
163
+ background: var(--vaadin-grid-cell-background, var(--vaadin-background-color));
164
+ border-block: var(--_row-border-width) solid var(--_border-color);
165
+ margin-top: calc(var(--_row-border-width) * -1);
166
+
167
+ /*
168
+ Box-shadows are used to create a "fake" border at the end of the cell/row, which is visible when a row/cell ends
169
+ before the edge of the grid viewport, as well as frozen columns and rows (header and footer).
170
+ If there are frozen columns, we'll make the "fake box-shadow border" on the header and footer opaque by rendering
171
+ both the border color and cell background color, so that a semi-transparent border color doesn't "stack" when
172
+ scrolling horizontally.
173
+ */
174
+ --_fake-border:
175
+ 0 calc(var(--_top, 0) * var(--_row-border-width) * -1) 0 0 var(--_border-color),
176
+ 0 calc(var(--_top-opaque, 0) * var(--_row-border-width) * -1) 0 0
177
+ var(--vaadin-grid-cell-background-color, var(--vaadin-background-color)),
178
+ 0 calc(var(--_bottom, 0) * var(--_row-border-width)) 0 0 var(--_border-color),
179
+ 0 calc(var(--_bottom-opaque, 0) * var(--_row-border-width)) 0 0
180
+ var(--vaadin-grid-cell-background-color, var(--vaadin-background-color)),
181
+ calc(var(--_start, 0) * var(--_column-border-width) * -1) 0 0 0 var(--_border-color),
182
+ calc(var(--_end, 0) * var(--_column-border-width)) 0 0 0 var(--_border-color),
183
+ calc(var(--_end-opaque, 0) * var(--_column-border-width)) 0 0 0
184
+ var(--vaadin-grid-cell-background-color, var(--vaadin-background-color));
185
+ box-shadow: var(--_fake-border);
186
+ }
187
+
188
+ [part~='cell']:where(:not([part~='details-cell'])) {
189
+ flex-shrink: 0;
190
+ flex-grow: 1;
191
+ display: flex;
192
+ width: 100%;
193
+ position: relative;
194
+ align-items: center;
195
+ white-space: nowrap;
196
+ border-inline-start: var(--_column-border-width) solid var(--_border-color);
197
+ }
198
+
199
+ [part~='first-column-cell'] {
200
+ border-inline-start: 0;
201
+ }
202
+
203
+ [part~='first-header-row-cell'],
204
+ [part~='first-footer-row-cell'],
205
+ [part~='first-row-cell'] {
206
+ margin-top: 0;
207
+ border-top: 0;
208
+ }
209
+
210
+ table:has(#header > tr:not([hidden])) [part~='first-row-cell'] {
211
+ border-top: var(--_row-border-width) solid var(--_border-color);
212
+ }
213
+
214
+ [part~='last-column-cell'] {
215
+ --_end: 1;
216
+ }
217
+
218
+ [part~='last-column-cell']:is([part~='header-cell'], [part~='footer-cell']) {
219
+ --_end-opaque: 1;
220
+ }
221
+
222
+ [part~='last-row-cell']:where(:not([part~='details-opened-row-cell'])),
223
+ [part~='last-footer-row-cell'] {
224
+ border-bottom: 0;
225
+ --_bottom: 1;
226
+ }
227
+
228
+ [part~='last-frozen-cell'] {
229
+ --_end: 1;
230
+ }
231
+
232
+ [part~='last-frozen-cell'] + [part~='cell'] {
233
+ border-inline-start-color: transparent;
234
+ }
235
+
236
+ [part~='first-frozen-to-end-cell'] {
237
+ border-inline-start: 0;
238
+ --_start: 1;
239
+ }
240
+
241
+ [part~='last-header-row-cell'] {
242
+ border-bottom: 0;
243
+ }
244
+
245
+ :host([overflow~='top']) [part~='last-header-row-cell'],
246
+ [empty-state] [part~='last-header-row-cell'] {
247
+ --_bottom: 1;
248
+ }
249
+
250
+ #header:has(:is([frozen], [frozen-to-end])) [part~='last-header-row-cell'] {
251
+ --_bottom-opaque: 1;
252
+ }
253
+
254
+ :host([overflow~='bottom']) [part~='first-footer-row-cell'],
255
+ [empty-state] [part~='first-footer-row-cell'] {
256
+ --_top: 1;
257
+ }
258
+
259
+ #footer:has(:is([frozen], [frozen-to-end])) [part~='first-footer-row-cell'] {
260
+ --_top-opaque: 1;
261
+ }
262
+
263
+ table:has(#footer > tr:not([hidden])) [part~='last-row-cell']:not([part~='details-opened-row-cell']) {
264
+ border-bottom: var(--_row-border-width) solid var(--_border-color);
265
+ --_bottom: 0;
266
+ }
267
+
268
+ [part~='body-cell']:where(:not([part~='details-cell'])) {
269
+ --_highlight-background-color: var(--vaadin-grid-row-highlight-background-color, transparent);
270
+ --_highlight-background-image: linear-gradient(
271
+ var(--_highlight-background-color),
272
+ var(--_highlight-background-color)
273
+ );
274
+ background:
275
+ var(--_hover-background-image, none), var(--_selected-background-image, none), var(--_highlight-background-image),
276
+ var(--vaadin-grid-cell-background-color, var(--vaadin-background-color));
277
+ }
278
+
279
+ /* Variant: wrap cell contents */
280
+
281
+ :host([theme~='wrap-cell-content']) [part~='cell']:not([part~='details-cell']) {
282
+ white-space: normal;
283
+ }
284
+
285
+ /* Variant: row stripes */
286
+ [part~='odd-row'] {
287
+ --vaadin-grid-cell-background-color: var(--vaadin-grid-row-odd-background-color, var(--vaadin-background-color));
288
+ }
289
+
290
+ :host([theme~='row-stripes']) [part~='odd-row'] {
291
+ --vaadin-grid-cell-background-color: var(
292
+ --vaadin-grid-row-odd-background-color,
293
+ color-mix(in srgb, var(--vaadin-text-color) 4%, var(--vaadin-background-color))
294
+ );
295
+ }
296
+
297
+ /* Raise highlighted rows above others */
298
+
299
+ [part~='row']:focus,
300
+ [part~='row']:focus-within,
301
+ [part~='body-row']:where([selected]) {
302
+ z-index: 3;
303
+ }
304
+
305
+ @container style(--vaadin-grid-row-odd-background-color) {
306
+ [part~='odd-row'] {
307
+ z-index: 1;
308
+ }
309
+ }
310
+
311
+ /* Row hover */
312
+ @media (any-hover: hover) {
313
+ @container style(--vaadin-grid-row-hover-background-color) {
314
+ [part~='body-row']:hover {
315
+ z-index: 2;
316
+ }
317
+ }
318
+
319
+ [part~='body-row']:hover [part~='cell']:where(:not([part~='details-cell'])) {
320
+ --_hover-background-color: var(--vaadin-grid-row-hover-background-color, transparent);
321
+ --_hover-background-image: linear-gradient(var(--_hover-background-color), var(--_hover-background-color));
322
+ }
323
+ }
324
+
325
+ [part~='details-cell'] {
326
+ position: absolute;
327
+ bottom: 0;
328
+ width: 100%;
329
+ margin-top: 0;
330
+ border-top: 0;
331
+ }
332
+
333
+ [part~='last-row-cell'] + [part~='details-cell'] {
334
+ border-bottom: 0;
335
+ }
336
+
337
+ [part~='cell'] ::slotted(vaadin-grid-cell-content) {
338
+ display: block;
339
+ overflow: hidden;
340
+ text-overflow: ellipsis;
341
+ padding: var(--vaadin-grid-cell-padding, var(--vaadin-padding-container));
342
+ flex: 1;
343
+ min-width: 0;
344
+ }
345
+
346
+ [frozen],
347
+ [frozen-to-end] {
348
+ z-index: 2;
349
+ will-change: transform;
350
+ }
351
+
352
+ /* Selected row */
353
+ [part~='body-row'][selected] {
354
+ --_selected-background-color: var(
355
+ --vaadin-grid-row-selected-background-color,
356
+ color-mix(in srgb, currentColor 8%, transparent)
357
+ );
358
+ --_selected-background-image: linear-gradient(var(--_selected-background-color), var(--_selected-background-color));
359
+ }
360
+
361
+ /* Empty state */
362
+ #scroller:not([empty-state]) #emptystatebody,
363
+ #scroller[empty-state] #items {
364
+ display: none;
365
+ }
366
+
367
+ #emptystatebody {
368
+ display: flex;
369
+ position: sticky;
370
+ inset: 0;
371
+ flex: 1;
372
+ overflow: hidden;
373
+ margin-top: calc(var(--_row-border-width) * -1);
374
+ }
375
+
376
+ #emptystaterow {
377
+ display: flex;
378
+ flex: 1;
379
+ }
380
+
381
+ #emptystatecell {
382
+ display: block;
383
+ flex: 1;
384
+ overflow: auto;
385
+ padding: var(--vaadin-grid-cell-padding, var(--vaadin-padding-container));
386
+ border-top: var(--_row-border-width) solid transparent;
387
+ outline: none;
388
+ }
389
+
390
+ #emptystatecell:focus-visible {
391
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
392
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
393
+ }
394
+
395
+ /* Reordering styles */
396
+ :host([reordering]) [part~='cell'] ::slotted(vaadin-grid-cell-content),
397
+ :host([reordering]) [part~='resize-handle'],
398
+ #scroller[no-content-pointer-events] [part~='cell'] ::slotted(vaadin-grid-cell-content) {
399
+ pointer-events: none;
400
+ }
401
+
402
+ [part~='reorder-ghost'] {
403
+ visibility: hidden;
404
+ position: fixed;
405
+ pointer-events: none;
406
+ box-shadow:
407
+ 0 0 0 1px hsla(0deg, 0%, 0%, 0.2),
408
+ 0 8px 24px -2px hsla(0deg, 0%, 0%, 0.2);
409
+ padding: var(--vaadin-grid-cell-padding, var(--vaadin-padding-container)) !important;
410
+ border-radius: 3px;
411
+
412
+ /* Prevent overflowing the grid in Firefox */
413
+ top: 0;
414
+ inset-inline-start: 0;
415
+ }
416
+
417
+ :host([reordering]) {
418
+ -webkit-user-select: none;
419
+ user-select: none;
420
+ }
421
+
422
+ :host([reordering]) [part~='cell'] {
423
+ /* TODO expose a custom property to control this */
424
+ --_reorder-curtain-filter: brightness(0.9) contrast(1.1);
425
+ }
426
+
427
+ :host([reordering]) [part~='cell']::after {
428
+ content: '';
429
+ position: absolute;
430
+ inset: 0;
431
+ z-index: 1;
432
+ -webkit-backdrop-filter: var(--_reorder-curtain-filter);
433
+ backdrop-filter: var(--_reorder-curtain-filter);
434
+ }
435
+
436
+ :host([reordering]) [part~='cell'][reorder-status='allowed'] {
437
+ /* TODO expose a custom property to control this */
438
+ --_reorder-curtain-filter: brightness(0.94) contrast(1.07);
439
+ }
440
+
441
+ :host([reordering]) [part~='cell'][reorder-status='dragging'] {
442
+ --_reorder-curtain-filter: none;
443
+ }
444
+
445
+ /* Resizing styles */
446
+ [part~='resize-handle'] {
447
+ position: absolute;
448
+ top: 0;
449
+ inset-inline-end: 0;
450
+ height: 100%;
451
+ cursor: col-resize;
452
+ z-index: 1;
453
+ opacity: 0;
454
+ width: var(--vaadin-focus-ring-width);
455
+ background: var(--vaadin-grid-column-resize-handle-color, var(--vaadin-focus-ring-color));
456
+ transition: opacity 0.2s;
457
+ translate: var(--_column-border-width);
458
+ }
459
+
460
+ [part~='last-column-cell'] [part~='resize-handle'] {
461
+ translate: 0;
462
+ }
463
+
464
+ :host(:not([reordering])) *:not([column-resizing]) [part='resize-handle']:hover,
465
+ [part='resize-handle']:active {
466
+ opacity: 1;
467
+ transition-delay: 0.15s;
468
+ }
469
+
470
+ [part~='resize-handle']::before {
471
+ position: absolute;
472
+ content: '';
473
+ height: 100%;
474
+ width: 16px;
475
+ translate: calc(-50% + var(--vaadin-focus-ring-width) / 2);
476
+ }
477
+
478
+ :host([dir='rtl']) [part~='resize-handle']::before {
479
+ translate: calc(50% - var(--vaadin-focus-ring-width) / 2);
480
+ }
481
+
482
+ [first-frozen-to-end] [part~='resize-handle']::before,
483
+ :is([last-column], [last-frozen]) [part~='resize-handle']::before {
484
+ width: 8px;
485
+ translate: 0;
486
+ }
487
+
488
+ :is([last-column], [last-frozen]) [part~='resize-handle']::before {
489
+ inset-inline-end: 0;
490
+ }
491
+
492
+ [frozen-to-end] :is([part~='resize-handle'], [part~='resize-handle']::before) {
493
+ inset-inline: 0 auto;
494
+ }
495
+
496
+ [frozen-to-end] [part~='resize-handle'] {
497
+ translate: calc(var(--_column-border-width) * -1);
498
+ }
499
+
500
+ [first-frozen-to-end] {
501
+ margin-inline-start: auto;
502
+ }
503
+
504
+ #scroller:is([column-resizing], [range-selecting]) {
505
+ -webkit-user-select: none;
506
+ user-select: none;
507
+ }
508
+
509
+ /* Focus outline element, also used for d'n'd indication */
510
+ :is([part~='row'], [part~='cell'])::after {
511
+ position: absolute;
512
+ inset: calc(var(--_row-border-width) * -1) calc(var(--_column-border-width) * -1);
513
+ z-index: 3;
514
+ pointer-events: none;
515
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
516
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
517
+ }
518
+
519
+ [part~='first-column-cell']::after {
520
+ inset-inline-start: 0;
521
+ }
522
+
523
+ [part~='last-column-cell']::after {
524
+ inset-inline-end: 0;
525
+ }
526
+
527
+ #header [part~='row']:first-child::after,
528
+ [part~='first-header-row-cell']::after,
529
+ [part*='first-row']::after {
530
+ top: 0;
531
+ }
532
+
533
+ table:has(#header > tr:not([hidden])) [part~='first-row-cell']::after {
534
+ top: calc(var(--_row-border-width) * -1);
535
+ }
536
+
537
+ #footer [part~='row']:last-child::after,
538
+ [part~='last-footer-row-cell']::after,
539
+ [part~='last-row']::after,
540
+ [part~='last-row-cell']::after {
541
+ bottom: 0;
542
+ }
543
+
544
+ #header [part~='row']:last-child::after,
545
+ table:has(#footer > tr:not([hidden])) [part*='last-row']::after {
546
+ bottom: calc(var(--_row-border-width) * -1);
547
+ }
548
+
549
+ :host([navigating]) [part~='row']:focus,
550
+ :host([navigating]) [part~='cell']:focus {
551
+ outline: 0;
552
+ }
553
+
554
+ [part~='row']::after {
555
+ transform: translateX(var(--_grid-horizontal-scroll-position));
556
+ inset-inline: 0;
557
+ bottom: 0;
558
+ }
559
+
560
+ [part~='row']:focus-visible::after,
561
+ [part~='cell']:focus-visible::after,
562
+ :host([navigating]) [part~='row']:focus::after,
563
+ :host([navigating]) [part~='cell']:focus::after {
564
+ content: '';
565
+ }
566
+
567
+ /* Drag'n'drop styles */
568
+ :host([dragover]) {
569
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
570
+ outline-offset: calc(var(--_border-width) * -1);
571
+ }
572
+
573
+ [part~='row'][dragover] {
574
+ z-index: 100 !important;
575
+ }
576
+
577
+ [part~='row'][dragover]::after {
578
+ content: '';
579
+ }
580
+
581
+ [part~='row'][dragover='above']::after {
582
+ outline: 0;
583
+ border-top: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
584
+ }
585
+
586
+ [part~='row']:not([part*='first-row'])[dragover='above']::after,
587
+ table:has(#header > tr:not([hidden])) [part*='first-row'][dragover='above']::after {
588
+ top: calc(var(--vaadin-focus-ring-width) / -2);
589
+ }
590
+
591
+ [part~='row'][dragover='below']::after {
592
+ outline: 0;
593
+ border-bottom: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
594
+ }
595
+
596
+ [part~='row']:not([part*='last-row'])[dragover='below']::after,
597
+ table:has(#footer > tr:not([hidden])) [part*='last-row'][dragover='below']::after {
598
+ bottom: calc(var(--vaadin-focus-ring-width) / -2);
599
+ }
600
+
601
+ [part~='row'][dragstart] [part~='cell'] {
602
+ border-block-color: transparent !important;
603
+ box-shadow: none;
604
+ }
605
+
606
+ [part~='row'][dragstart] [part~='cell'][last-column] {
607
+ border-radius: 0 3px 3px 0;
608
+ }
609
+
610
+ [part~='row'][dragstart] [part~='cell'][first-column] {
611
+ border-radius: 3px 0 0 3px;
612
+ }
613
+
614
+ /* Indicates the number of dragged rows */
615
+ /* TODO export custom properties to control styles */
616
+ #scroller [part~='row'][dragstart]:not([dragstart=''])::before {
617
+ position: absolute;
618
+ left: var(--_grid-drag-start-x);
619
+ top: var(--_grid-drag-start-y);
620
+ z-index: 100;
621
+ content: attr(dragstart);
622
+ box-sizing: border-box;
623
+ padding: 0.3em;
624
+ color: white;
625
+ background-color: red;
626
+ border-radius: 1em;
627
+ font-size: 0.75rem;
628
+ line-height: 1;
629
+ font-weight: 500;
630
+ min-width: 1.6em;
631
+ text-align: center;
632
+ }
633
+
634
+ /* Sizer styles */
635
+ #sizer {
636
+ display: flex;
637
+ visibility: hidden;
638
+ }
639
+
640
+ #sizer [part~='details-cell'],
641
+ #sizer [part~='cell'] ::slotted(vaadin-grid-cell-content) {
642
+ display: none !important;
643
+ }
644
+
645
+ #sizer [part~='cell'] {
646
+ display: block;
647
+ flex-shrink: 0;
648
+ line-height: 0;
649
+ height: 0 !important;
650
+ min-height: 0 !important;
651
+ max-height: 0 !important;
652
+ padding: 0 !important;
653
+ border: none !important;
654
+ }
655
+
656
+ #sizer [part~='cell']::before {
657
+ content: '-';
658
+ }
659
+
660
+ @media (forced-colors: active) {
661
+ :host([overflow~='top']) [part~='last-header-row-cell'] {
662
+ border-bottom: var(--_row-border-width) solid;
663
+ margin-bottom: calc(var(--_row-border-width) * -1);
664
+ }
665
+
666
+ :host([overflow~='bottom']) [part~='first-footer-row-cell'] {
667
+ border-top: var(--_row-border-width) solid;
668
+ margin-top: calc(var(--_row-border-width) * -1);
669
+ }
670
+ }
671
+ `;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { CSSResult } from 'lit';
7
+
8
+ export const gridFilterStyles: CSSResult;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { css } from 'lit';
7
+
8
+ export const gridFilterStyles = css`
9
+ :host {
10
+ display: inline-flex;
11
+ max-width: 100%;
12
+ }
13
+
14
+ ::slotted(*) {
15
+ width: 100%;
16
+ box-sizing: border-box;
17
+ }
18
+ `;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { CSSResult } from 'lit';
7
+
8
+ export const gridSorterStyles: CSSResult;