@vaadin/grid 25.0.0-alpha2 → 25.0.0-alpha21

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 +677 -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 +76 -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,677 @@
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-m));
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
+ outline: 0;
435
+ }
436
+
437
+ :host([reordering]) [part~='cell'][reorder-status='allowed'] {
438
+ /* TODO expose a custom property to control this */
439
+ --_reorder-curtain-filter: brightness(0.94) contrast(1.07);
440
+ }
441
+
442
+ :host([reordering]) [part~='cell'][reorder-status='dragging'] {
443
+ --_reorder-curtain-filter: none;
444
+ }
445
+
446
+ /* Resizing styles */
447
+ [part~='resize-handle'] {
448
+ position: absolute;
449
+ top: 0;
450
+ inset-inline-end: 0;
451
+ height: 100%;
452
+ cursor: col-resize;
453
+ z-index: 1;
454
+ opacity: 0;
455
+ width: var(--vaadin-focus-ring-width);
456
+ background: var(--vaadin-grid-column-resize-handle-color, var(--vaadin-focus-ring-color));
457
+ transition: opacity 0.2s;
458
+ translate: var(--_column-border-width);
459
+ }
460
+
461
+ [part~='last-column-cell'] [part~='resize-handle'] {
462
+ translate: 0;
463
+ }
464
+
465
+ :host(:not([reordering])) *:not([column-resizing]) [part='resize-handle']:hover,
466
+ [part='resize-handle']:active {
467
+ opacity: 1;
468
+ transition-delay: 0.15s;
469
+ }
470
+
471
+ [part~='resize-handle']::before {
472
+ position: absolute;
473
+ content: '';
474
+ height: 100%;
475
+ width: 16px;
476
+ translate: calc(-50% + var(--vaadin-focus-ring-width) / 2);
477
+ }
478
+
479
+ :host([dir='rtl']) [part~='resize-handle']::before {
480
+ translate: calc(50% - var(--vaadin-focus-ring-width) / 2);
481
+ }
482
+
483
+ [first-frozen-to-end] [part~='resize-handle']::before,
484
+ :is([last-column], [last-frozen]) [part~='resize-handle']::before {
485
+ width: 8px;
486
+ translate: 0;
487
+ }
488
+
489
+ :is([last-column], [last-frozen]) [part~='resize-handle']::before {
490
+ inset-inline-end: 0;
491
+ }
492
+
493
+ [frozen-to-end] :is([part~='resize-handle'], [part~='resize-handle']::before) {
494
+ inset-inline: 0 auto;
495
+ }
496
+
497
+ [frozen-to-end] [part~='resize-handle'] {
498
+ translate: calc(var(--_column-border-width) * -1);
499
+ }
500
+
501
+ [first-frozen-to-end] {
502
+ margin-inline-start: auto;
503
+ }
504
+
505
+ #scroller:is([column-resizing], [range-selecting]) {
506
+ -webkit-user-select: none;
507
+ user-select: none;
508
+ }
509
+
510
+ /* Focus outline element, also used for d'n'd indication */
511
+ :is([part~='row'], [part~='cell'])::after {
512
+ position: absolute;
513
+ inset: calc(var(--_row-border-width) * -1) calc(var(--_column-border-width) * -1);
514
+ z-index: 3;
515
+ pointer-events: none;
516
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
517
+ outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
518
+ }
519
+
520
+ [part~='first-column-cell']::after {
521
+ inset-inline-start: 0;
522
+ }
523
+
524
+ [part~='last-column-cell']::after {
525
+ inset-inline-end: 0;
526
+ }
527
+
528
+ #header [part~='row']:first-child::after,
529
+ [part~='first-header-row-cell']::after,
530
+ [part*='first-row']::after {
531
+ top: 0;
532
+ }
533
+
534
+ table:has(#header > tr:not([hidden])) [part~='first-row-cell']::after {
535
+ top: calc(var(--_row-border-width) * -1);
536
+ }
537
+
538
+ #footer [part~='row']:last-child::after,
539
+ [part~='last-footer-row-cell']::after,
540
+ [part~='last-row']::after,
541
+ [part~='last-row-cell']::after {
542
+ bottom: 0;
543
+ }
544
+
545
+ #header [part~='row']:last-child::after,
546
+ table:has(#footer > tr:not([hidden])) [part*='last-row']::after {
547
+ bottom: calc(var(--_row-border-width) * -1);
548
+ }
549
+
550
+ :host([navigating]) [part~='row']:focus,
551
+ :host([navigating]) [part~='cell']:focus {
552
+ outline: 0;
553
+ }
554
+
555
+ [part~='row']::after {
556
+ transform: translateX(var(--_grid-horizontal-scroll-position));
557
+ inset-inline: 0;
558
+ bottom: 0;
559
+ }
560
+
561
+ [part~='row']:focus-visible,
562
+ [part~='cell']:focus-visible {
563
+ outline: 0;
564
+ }
565
+
566
+ [part~='row']:focus-visible::after,
567
+ [part~='cell']:focus-visible::after,
568
+ :host([navigating]) [part~='row']:focus::after,
569
+ :host([navigating]) [part~='cell']:focus::after {
570
+ content: '';
571
+ }
572
+
573
+ /* Drag'n'drop styles */
574
+ :host([dragover]) {
575
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
576
+ outline-offset: calc(var(--_border-width) * -1);
577
+ }
578
+
579
+ [part~='row'][dragover] {
580
+ z-index: 100 !important;
581
+ }
582
+
583
+ [part~='row'][dragover]::after {
584
+ content: '';
585
+ }
586
+
587
+ [part~='row'][dragover='above']::after {
588
+ outline: 0;
589
+ border-top: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
590
+ }
591
+
592
+ [part~='row']:not([part*='first-row'])[dragover='above']::after,
593
+ table:has(#header > tr:not([hidden])) [part*='first-row'][dragover='above']::after {
594
+ top: calc(var(--vaadin-focus-ring-width) / -2);
595
+ }
596
+
597
+ [part~='row'][dragover='below']::after {
598
+ outline: 0;
599
+ border-bottom: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
600
+ }
601
+
602
+ [part~='row']:not([part*='last-row'])[dragover='below']::after,
603
+ table:has(#footer > tr:not([hidden])) [part*='last-row'][dragover='below']::after {
604
+ bottom: calc(var(--vaadin-focus-ring-width) / -2);
605
+ }
606
+
607
+ [part~='row'][dragstart] [part~='cell'] {
608
+ border-block-color: transparent !important;
609
+ box-shadow: none;
610
+ }
611
+
612
+ [part~='row'][dragstart] [part~='cell'][last-column] {
613
+ border-radius: 0 3px 3px 0;
614
+ }
615
+
616
+ [part~='row'][dragstart] [part~='cell'][first-column] {
617
+ border-radius: 3px 0 0 3px;
618
+ }
619
+
620
+ /* Indicates the number of dragged rows */
621
+ /* TODO export custom properties to control styles */
622
+ #scroller [part~='row'][dragstart]:not([dragstart=''])::before {
623
+ position: absolute;
624
+ left: var(--_grid-drag-start-x);
625
+ top: var(--_grid-drag-start-y);
626
+ z-index: 100;
627
+ content: attr(dragstart);
628
+ box-sizing: border-box;
629
+ padding: 0.3em;
630
+ color: white;
631
+ background-color: red;
632
+ border-radius: 1em;
633
+ font-size: 0.75rem;
634
+ line-height: 1;
635
+ font-weight: 500;
636
+ min-width: 1.6em;
637
+ text-align: center;
638
+ }
639
+
640
+ /* Sizer styles */
641
+ #sizer {
642
+ display: flex;
643
+ visibility: hidden;
644
+ }
645
+
646
+ #sizer [part~='details-cell'],
647
+ #sizer [part~='cell'] ::slotted(vaadin-grid-cell-content) {
648
+ display: none !important;
649
+ }
650
+
651
+ #sizer [part~='cell'] {
652
+ display: block;
653
+ flex-shrink: 0;
654
+ line-height: 0;
655
+ height: 0 !important;
656
+ min-height: 0 !important;
657
+ max-height: 0 !important;
658
+ padding: 0 !important;
659
+ border: none !important;
660
+ }
661
+
662
+ #sizer [part~='cell']::before {
663
+ content: '-';
664
+ }
665
+
666
+ @media (forced-colors: active) {
667
+ :host([overflow~='top']) [part~='last-header-row-cell'] {
668
+ border-bottom: var(--_row-border-width) solid;
669
+ margin-bottom: calc(var(--_row-border-width) * -1);
670
+ }
671
+
672
+ :host([overflow~='bottom']) [part~='first-footer-row-cell'] {
673
+ border-top: var(--_row-border-width) solid;
674
+ margin-top: calc(var(--_row-border-width) * -1);
675
+ }
676
+ }
677
+ `;
@@ -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;