@sebgroup/green-core 2.19.0 → 2.20.0-rc.20251215154321804

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 (64) hide show
  1. package/components/badge/badge.component.d.ts +0 -23
  2. package/components/badge/badge.component.js +18 -105
  3. package/components/badge/badge.styles.js +96 -2
  4. package/components/checkbox/checkbox.component.js +24 -22
  5. package/components/checkbox/checkbox.styles.js +0 -8
  6. package/components/dropdown/dropdown.component.js +4 -1
  7. package/components/index.d.ts +2 -0
  8. package/components/index.js +2 -0
  9. package/components/input/input.styles.js +10 -1
  10. package/components/pagination/index.d.ts +1 -0
  11. package/components/pagination/index.js +1 -0
  12. package/components/pagination/pagination.component.d.ts +82 -0
  13. package/components/pagination/pagination.component.js +441 -0
  14. package/components/pagination/pagination.d.ts +2 -0
  15. package/components/pagination/pagination.js +6 -0
  16. package/components/pagination/pagination.styles.d.ts +1 -0
  17. package/components/pagination/pagination.styles.js +19 -0
  18. package/components/table/index.d.ts +2 -0
  19. package/components/table/index.js +6 -0
  20. package/components/table/table.component.d.ts +140 -0
  21. package/components/table/table.component.js +1090 -0
  22. package/components/table/table.d.ts +2 -0
  23. package/components/table/table.imports.d.ts +6 -0
  24. package/components/table/table.imports.js +63 -0
  25. package/components/table/table.js +6 -0
  26. package/components/table/table.stories.data.d.ts +53 -0
  27. package/components/table/table.stories.data.js +401 -0
  28. package/components/table/table.styles.d.ts +1 -0
  29. package/components/table/table.styles.js +788 -0
  30. package/components/table/table.types.d.ts +155 -0
  31. package/components/table/table.types.js +24 -0
  32. package/custom-elements.json +12280 -10492
  33. package/gds-element.js +1 -1
  34. package/generated/locales/da.d.ts +32 -0
  35. package/generated/locales/da.js +32 -0
  36. package/generated/locales/de.d.ts +32 -0
  37. package/generated/locales/de.js +32 -0
  38. package/generated/locales/fi.d.ts +32 -0
  39. package/generated/locales/fi.js +32 -0
  40. package/generated/locales/fr.d.ts +32 -0
  41. package/generated/locales/fr.js +32 -0
  42. package/generated/locales/it.d.ts +32 -0
  43. package/generated/locales/it.js +32 -0
  44. package/generated/locales/nl.d.ts +32 -0
  45. package/generated/locales/nl.js +32 -0
  46. package/generated/locales/no.d.ts +32 -0
  47. package/generated/locales/no.js +33 -1
  48. package/generated/locales/sv.d.ts +32 -0
  49. package/generated/locales/sv.js +32 -0
  50. package/generated/react/index.d.ts +8 -6
  51. package/generated/react/index.js +8 -6
  52. package/generated/react/input/index.d.ts +1 -1
  53. package/generated/react/pagination/index.d.ts +395 -0
  54. package/generated/react/pagination/index.js +13 -0
  55. package/generated/react/table/index.d.ts +395 -0
  56. package/generated/react/table/index.js +13 -0
  57. package/package.json +8 -1
  58. package/primitives/field-base/field-base.component.d.ts +1 -0
  59. package/primitives/field-base/field-base.component.js +8 -0
  60. package/primitives/field-base/field-base.styles.js +9 -1
  61. package/pure.d.ts +2 -0
  62. package/pure.js +2 -0
  63. package/shared-styles/rbcb-toggle.style.js +41 -12
  64. package/utils/helpers/custom-element-scoping.js +1 -1
@@ -0,0 +1,788 @@
1
+ import "../../chunks/chunk.QU3DSPNU.js";
2
+ import { css } from "lit";
3
+ const TableStyles = css`
4
+ /* Host & Container */
5
+ :host {
6
+ display: block;
7
+ font: var(--gds-sys-text-detail-book-s);
8
+ color: var(--gds-sys-color-content-neutral-01);
9
+ text-align: left;
10
+ --_table-height: 80vh;
11
+ --_table-border-width: var(--gds-sys-space-5xs);
12
+ --_table-border-color: var(--gds-sys-color-border-subtle-01);
13
+ }
14
+
15
+ /* Density Modes */
16
+ /* Compact density */
17
+ .table.compact {
18
+ --table-cell-padding-y: var(--gds-sys-space-xs);
19
+ --table-cell-padding-x: var(--gds-sys-space-s);
20
+ --table-header-padding-y: var(--gds-sys-space-xs);
21
+ --table-header-padding-x: var(--gds-sys-space-s);
22
+ --table-row-min-height: var(--gds-sys-space-xl);
23
+ --table-font-size: var(--gds-sys-text-detail-book-xs);
24
+ --table-gap: var(--gds-sys-space-m);
25
+ --table-border-spacing: 0 var(--gds-sys-space-5xs);
26
+ --table-data-padding: var(--gds-sys-space-5xs) var(--gds-sys-space-4xs);
27
+ }
28
+
29
+ /* Comfortable default */
30
+ .table.comfortable {
31
+ --table-cell-padding-y: var(--gds-sys-space-s);
32
+ --table-cell-padding-x: var(--gds-sys-space-m);
33
+ --table-header-padding-y: var(--gds-sys-space-s);
34
+ --table-header-padding-x: var(--gds-sys-space-m);
35
+ --table-row-min-height: var(--gds-sys-space-4xl);
36
+ --table-font-size: var(--gds-sys-text-detail-book-s);
37
+ --table-gap: var(--gds-sys-space-xl);
38
+ --table-border-spacing: 0 var(--gds-sys-space-4xs);
39
+ --table-data-padding: var(--gds-sys-space-3xs) var(--gds-sys-space-2xs);
40
+ }
41
+
42
+ /* Spacious density */
43
+ .table.spacious {
44
+ --table-cell-padding-y: var(--gds-sys-space-l);
45
+ --table-cell-padding-x: var(--gds-sys-space-l);
46
+ --table-header-padding-y: var(--gds-sys-space-l);
47
+ --table-header-padding-x: var(--gds-sys-space-l);
48
+ --table-row-min-height: var(--gds-sys-space-5xl);
49
+ --table-font-size: var(--gds-sys-text-detail-book-m);
50
+ --table-gap: var(--gds-sys-space-2xl);
51
+ --table-border-spacing: 0 var(--gds-sys-space-3xs);
52
+ --table-data-padding: var(--gds-sys-space-3xs) var(--gds-sys-space-xs);
53
+ }
54
+
55
+ /* Secondary and Tertiary */
56
+ .data.variant-secondary,
57
+ .data.variant-tertiary {
58
+ --_table-header-bg: var(--gds-sys-color-l2-neutral-01);
59
+ --_table-header-hover: var(--gds-sys-color-l3-neutral-02);
60
+ --_table-header-active: var(--gds-sys-color-l3-neutral-03);
61
+ --_table-row-hover: var(--gds-sys-color-l2-neutral-01);
62
+ --_table-row-selected-hover: var(--gds-sys-color-l3-neutral-03);
63
+ --_table-row-striped: var(--gds-sys-color-l2-neutral-01);
64
+ }
65
+
66
+ /* Primary variant */
67
+ .data.variant-primary {
68
+ --_table-header-bg: var(--gds-sys-color-l2-neutral-02);
69
+ --_table-header-hover: var(--gds-sys-color-l3-neutral-02);
70
+ --_table-header-active: var(--gds-sys-color-l3-neutral-03);
71
+ --_table-row-hover: color-mix(
72
+ in srgb,
73
+ var(--gds-sys-color-l3-neutral-02),
74
+ var(--gds-sys-color-state-neutral-01)
75
+ );
76
+ --_table-row-selected-hover: var(--gds-sys-color-l3-neutral-03);
77
+ --_table-row-striped: var(--gds-sys-color-l2-neutral-01);
78
+ }
79
+
80
+ /* Apply density variables */
81
+ .table {
82
+ display: flex;
83
+ flex-direction: column;
84
+ gap: var(--table-gap);
85
+ font: var(--table-font-size);
86
+ width: 100%;
87
+ }
88
+
89
+ /* Container that enables horizontal scroll */
90
+
91
+ .data {
92
+ width: 100%;
93
+ overflow-x: auto;
94
+ overflow-y: auto;
95
+ max-height: var(--_table-height);
96
+ box-sizing: border-box;
97
+ padding: var(--table-data-padding);
98
+ position: relative;
99
+ border-radius: var(--gds-sys-radius-m);
100
+ }
101
+
102
+ .data:focus {
103
+ outline: none;
104
+ }
105
+
106
+ .table-card {
107
+ outline-color: transparent;
108
+ outline-offset: var(--gds-sys-space-4xs);
109
+ outline-style: solid;
110
+ outline-width: var(--gds-sys-space-4xs);
111
+ }
112
+
113
+ .table-card:has(.data:focus-visible) {
114
+ outline-color: var(--gds-sys-color-content-neutral-01);
115
+ }
116
+
117
+ .table-card:has(.data:focus-within:not(:focus-visible)) {
118
+ outline-color: transparent;
119
+ }
120
+
121
+ table {
122
+ width: max-content;
123
+ min-width: 100%;
124
+ table-layout: auto;
125
+ border: none;
126
+ border-collapse: separate;
127
+ border-spacing: var(--table-border-spacing);
128
+ }
129
+
130
+ tbody td {
131
+ font-weight: normal;
132
+ padding-block: var(--table-cell-padding-y);
133
+ padding-inline: var(--table-cell-padding-x);
134
+ }
135
+
136
+ thead tr th:first-child,
137
+ tbody tr:hover td:first-child,
138
+ tbody tr.selected td:first-child,
139
+ .striped tbody tr td:first-child {
140
+ border-top-left-radius: var(--gds-sys-radius-s);
141
+ border-bottom-left-radius: var(--gds-sys-radius-s);
142
+ }
143
+
144
+ thead tr th:last-child,
145
+ tbody tr:hover td:last-child,
146
+ tbody tr.selected td:last-child,
147
+ .striped tbody tr td:last-child {
148
+ border-top-right-radius: var(--gds-sys-radius-s);
149
+ border-bottom-right-radius: var(--gds-sys-radius-s);
150
+ }
151
+
152
+ /* Table Header */
153
+
154
+ thead tr th {
155
+ padding-block: var(--gds-sys-space-3xs);
156
+ /* background: var(--gds-sys-color-l2-neutral-01); */
157
+ background: var(--_table-header-bg);
158
+ }
159
+
160
+ thead th.sortable {
161
+ cursor: pointer;
162
+ user-select: none;
163
+ }
164
+
165
+ /* Column header content layout */
166
+ .column-header {
167
+ display: flex;
168
+ align-items: center;
169
+ position: relative;
170
+ justify-content: space-between;
171
+ min-height: var(--gds-sys-space-l);
172
+ gap: var(--table-gap);
173
+ padding: calc(var(--table-cell-padding-y) / 2) var(--table-cell-padding-x);
174
+ border-radius: var(--gds-sys-radius-xs);
175
+ transition: all var(--gds-sys-motion-duration-fast);
176
+ }
177
+
178
+ th.sortable .column-header:hover {
179
+ background-color: var(--_table-header-hover);
180
+ }
181
+
182
+ th.sortable:active .column-header {
183
+ background-color: var(--_table-header-active);
184
+ }
185
+
186
+ .column-label {
187
+ font-weight: var(--gds-sys-text-weight-book);
188
+ }
189
+
190
+ .sort-icon {
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ transition-property: opacity;
195
+ transition-duration: var(--gds-sys-motion-duration-fast);
196
+ transition-timing-function: var(--gds-sys-motion-easing-ease);
197
+ opacity: 0;
198
+ }
199
+
200
+ @media (hover: hover) and (min-width: 768px) {
201
+ thead th.sortable:hover:not(.sorted) .sort-icon {
202
+ opacity: 0.8;
203
+ }
204
+ }
205
+
206
+ thead th.sorted .sort-icon {
207
+ opacity: 1;
208
+ }
209
+
210
+ /* Table Body */
211
+
212
+ tbody tr td {
213
+ border-top-style: solid;
214
+ border-top-width: var(--_table-border-width);
215
+ border-top-color: var(--_table-border-color);
216
+ }
217
+
218
+ tbody tr.loading {
219
+ opacity: 0.3;
220
+ pointer-events: none;
221
+ }
222
+
223
+ tbody tr.loading:not(:first-child) td {
224
+ border-color: var(--gds-sys-color-border-subtle-02);
225
+ }
226
+
227
+ /* Row Selection */
228
+
229
+ .checkbox-cell {
230
+ min-width: var(--gds-sys-space-l);
231
+ width: var(--gds-sys-space-l);
232
+ max-width: var(--gds-sys-space-l);
233
+ padding: var(--table-cell-padding-y) var(--table-cell-padding-x);
234
+ }
235
+
236
+ tbody tr:hover td,
237
+ tbody tr.selected td,
238
+ tbody tr:first-child td {
239
+ border-color: transparent;
240
+ }
241
+
242
+ tbody tr:hover + tr td,
243
+ tbody tr.selected + tr td {
244
+ border-color: transparent;
245
+ }
246
+
247
+ tbody tr.selected:last-child td {
248
+ border-bottom-color: transparent;
249
+ }
250
+
251
+ tbody tr.selected {
252
+ background-color: var(--gds-sys-color-l3-neutral-02);
253
+ }
254
+
255
+ @media (hover: hover) and (min-width: 768px) {
256
+ tbody tr.selected:hover {
257
+ /* background-color: var(--gds-sys-color-l3-neutral-03); */
258
+ background-color: var(--_table-row-selected-hover);
259
+ }
260
+
261
+ tbody tr:hover:not(.selected) {
262
+ /* background-color: var(--gds-sys-color-l2-neutral-01); */
263
+ background-color: var(--_table-row-hover);
264
+ }
265
+ }
266
+
267
+ tbody tr:hover,
268
+ tbody tr:hover + tr {
269
+ border-color: transparent;
270
+ }
271
+
272
+ /* Striped */
273
+ .striped tbody tr:not(.selected, :hover):nth-child(even) td {
274
+ /* background-color: var(--gds-sys-color-l2-neutral-01); */
275
+ background-color: var(--_table-row-striped);
276
+ }
277
+
278
+ .striped tbody tr td {
279
+ border-color: transparent;
280
+ }
281
+
282
+ /* Header & Footer Layout */
283
+ .header {
284
+ display: flex;
285
+ justify-content: space-between;
286
+ transition-property: opacity, translate;
287
+ transition-duration: var(--gds-sys-motion-duration-fast);
288
+ transition-timing-function: var(--gds-sys-motion-easing-ease);
289
+
290
+ @starting-style {
291
+ opacity: 0;
292
+ translate: 0 -2px;
293
+ }
294
+ }
295
+
296
+ /* Shared layout for header and footer sections */
297
+ .header .lead,
298
+ .header .trail {
299
+ display: flex;
300
+ align-items: center;
301
+ gap: calc(var(--table-gap) * 0.8);
302
+ width: max-content;
303
+ }
304
+
305
+ /* Cell Content & Alignment */
306
+
307
+ .cell-content {
308
+ width: 100%;
309
+ height: 100%;
310
+ display: flex;
311
+ align-items: center;
312
+ gap: 10px;
313
+ }
314
+
315
+ /* Wrapping utilities */
316
+ td.wrap .cell-content {
317
+ white-space: normal;
318
+ word-wrap: break-word;
319
+ overflow-wrap: break-word;
320
+ }
321
+
322
+ td.wrap {
323
+ max-width: var(--cell-width);
324
+ }
325
+
326
+ /* Justify utilities */
327
+
328
+ .justify-start .cell-content {
329
+ text-align: left;
330
+ justify-content: start;
331
+ }
332
+
333
+ .justify-center .cell-content {
334
+ text-align: center;
335
+ justify-content: center;
336
+ }
337
+
338
+ .justify-space-between .cell-content {
339
+ text-align: left;
340
+ justify-content: space-between;
341
+ }
342
+
343
+ .justify-end .cell-content {
344
+ text-align: right;
345
+ justify-content: flex-end;
346
+ }
347
+
348
+ .sortable.justify-end .column-header {
349
+ flex-direction: row-reverse;
350
+ }
351
+
352
+ th.actions {
353
+ padding-inline: 0;
354
+ }
355
+
356
+ th.actions.justify-end .column-header {
357
+ justify-content: flex-end;
358
+ }
359
+
360
+ /* Align utilities */
361
+ td {
362
+ height: 100%;
363
+ }
364
+
365
+ .align-start {
366
+ vertical-align: top;
367
+ }
368
+
369
+ .align-end {
370
+ vertical-align: bottom;
371
+ }
372
+
373
+ .align-center {
374
+ vertical-align: middle;
375
+ }
376
+
377
+ .align-start .cell-content {
378
+ align-items: start;
379
+ }
380
+
381
+ .align-center .cell-content {
382
+ align-items: center;
383
+ }
384
+
385
+ .align-stretch .cell-content {
386
+ align-items: stretch;
387
+ }
388
+
389
+ .align-end .cell-content {
390
+ align-items: end;
391
+ }
392
+
393
+ /* Responsive Design */
394
+
395
+ @media (max-width: 760px) {
396
+ .responsive.data {
397
+ display: contents;
398
+ }
399
+
400
+ .responsive thead {
401
+ position: sticky;
402
+ top: var(--gds-sys-space-s);
403
+ z-index: 2;
404
+ border-radius: var(--gds-sys-radius-s);
405
+ }
406
+
407
+ .responsive thead {
408
+ display: none;
409
+ }
410
+
411
+ .responsive tbody {
412
+ display: flex;
413
+ flex-direction: column;
414
+ gap: var(--table-gap);
415
+ }
416
+
417
+ .responsive tbody tr {
418
+ display: flex;
419
+ flex-direction: column;
420
+ padding: var(--table-cell-padding-x);
421
+ border: var(--gds-sys-space-5xs) solid
422
+ var(--gds-sys-color-border-subtle-01);
423
+ border-radius: var(--gds-sys-space-s);
424
+ margin: 0;
425
+ }
426
+
427
+ .responsive tbody tr:hover,
428
+ .responsive tbody tr:hover + tr {
429
+ border-color: var(--gds-sys-color-border-subtle-01);
430
+ }
431
+
432
+ .responsive tr.selected {
433
+ border-color: transparent;
434
+ }
435
+
436
+ .responsive td {
437
+ width: 100%;
438
+ max-width: 100%;
439
+ box-sizing: border-box;
440
+ display: flex;
441
+ justify-content: flex-start;
442
+ align-items: center;
443
+ padding: var(--gds-sys-space-xs) 0;
444
+ border: none;
445
+ }
446
+
447
+ .responsive td .column-label {
448
+ text-align: left;
449
+ margin-right: auto;
450
+ }
451
+
452
+ .responsive td .cell-content {
453
+ flex: 1;
454
+ }
455
+
456
+ .responsive tr:hover,
457
+ .responsive tr td:hover {
458
+ background: none;
459
+ }
460
+ }
461
+
462
+ /* Medium screens: input and dropdown side by side */
463
+ /* Medium screens: side by side layout */
464
+ @media (max-width: 760px) and (min-width: 480px) {
465
+ .header {
466
+ display: grid;
467
+ grid-template-columns: 1fr 1fr;
468
+ grid-template-areas:
469
+ 'input dropdown'
470
+ 'lead trail';
471
+ gap: calc(var(--table-gap) / 2);
472
+ }
473
+
474
+ .header .lead [gds-element='gds-input'] {
475
+ grid-area: input;
476
+ }
477
+
478
+ .header .trail [gds-element='gds-dropdown'] {
479
+ grid-area: dropdown;
480
+ }
481
+
482
+ .header .lead ::slotted(*:not([gds-element='gds-input'])) {
483
+ grid-area: lead;
484
+ }
485
+
486
+ .header .trail ::slotted(*:not([gds-element='gds-dropdown'])) {
487
+ grid-area: trail;
488
+ }
489
+
490
+ .header .lead,
491
+ .header .trail {
492
+ display: contents;
493
+ }
494
+ }
495
+
496
+ /* Small screens: fully stacked */
497
+ @media (max-width: 479px) {
498
+ .header {
499
+ display: grid;
500
+ grid-template-columns: 1fr;
501
+ grid-template-areas:
502
+ 'input'
503
+ 'dropdown'
504
+ 'lead'
505
+ 'trail';
506
+ gap: calc(var(--table-gap) / 2);
507
+ }
508
+
509
+ .header .lead [gds-element='gds-input'] {
510
+ grid-area: input;
511
+ }
512
+
513
+ .header .trail [gds-element='gds-dropdown'] {
514
+ grid-area: dropdown;
515
+ }
516
+
517
+ .header .lead ::slotted(*:not([gds-element='gds-input'])) {
518
+ grid-area: lead;
519
+ }
520
+
521
+ .header .trail ::slotted(*:not([gds-element='gds-dropdown'])) {
522
+ grid-area: trail;
523
+ }
524
+
525
+ .header .lead,
526
+ .header .trail {
527
+ display: contents;
528
+ }
529
+ }
530
+
531
+ /* Skeleton Loading State */
532
+ .skeleton {
533
+ display: inline-block;
534
+ background: linear-gradient(
535
+ 90deg,
536
+ var(--gds-sys-color-l3-neutral-01) 25%,
537
+ var(--gds-sys-color-l2-neutral-01) 50%,
538
+ var(--gds-sys-color-l3-neutral-01) 75%
539
+ );
540
+ background-size: 200% 100%;
541
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
542
+ border-radius: var(--gds-sys-space-max);
543
+ opacity: 0.1;
544
+ }
545
+
546
+ @keyframes skeleton-shimmer {
547
+ 0% {
548
+ background-position: 200% 0;
549
+ }
550
+ 100% {
551
+ background-position: -200% 0;
552
+ }
553
+ }
554
+
555
+ /* Skeleton elements */
556
+ .skeleton-text {
557
+ height: 14px;
558
+ width: 80%;
559
+ min-width: 60px;
560
+ }
561
+
562
+ .skeleton-checkbox {
563
+ height: 18px;
564
+ width: 18px;
565
+ border-radius: var(--gds-sys-radius-3xs);
566
+ }
567
+
568
+ .skeleton-action {
569
+ height: 24px;
570
+ width: 24px;
571
+ border-radius: var(--gds-sys-radius-max);
572
+ }
573
+
574
+ /* Skeleton row styling */
575
+ .skeleton-row {
576
+ opacity: 1;
577
+ pointer-events: none;
578
+ }
579
+
580
+ .skeleton-row td {
581
+ padding: var(--table-cell-padding-y) var(--table-cell-padding-x);
582
+ }
583
+
584
+ /* Different skeleton text widths for more natural look */
585
+ .skeleton-row:nth-child(odd) .skeleton-text {
586
+ width: 70%;
587
+ }
588
+
589
+ .skeleton-row:nth-child(3n) .skeleton-text {
590
+ width: 90%;
591
+ }
592
+
593
+ .skeleton-row:nth-child(4n) .skeleton-text {
594
+ width: 60%;
595
+ }
596
+
597
+ /* Visually hidden */
598
+ .visually-hidden {
599
+ position: absolute;
600
+ opacity: 0;
601
+ width: 0;
602
+ height: 0;
603
+ pointer-events: none;
604
+ }
605
+
606
+ /* Scroll driven animation */
607
+ @supports (animation-timeline: scroll()) {
608
+ @media (prefers-reduced-motion: no-preference) {
609
+ tbody tr {
610
+ animation-name: ROW_ANIMATION_VERTICAL, ROW_ANIMATION_VERTICAL;
611
+ animation-fill-mode: both;
612
+ animation-timing-function: ease-in-out;
613
+ animation-direction: normal, reverse;
614
+ animation-timeline: view(block);
615
+ animation-range:
616
+ entry -40px,
617
+ exit -40px;
618
+ }
619
+
620
+ @keyframes ROW_ANIMATION_VERTICAL {
621
+ 0% {
622
+ opacity: 0;
623
+ filter: blur(12px);
624
+ translate: 0 12px;
625
+ }
626
+ }
627
+
628
+ /* tbody td .cell-content,
629
+ thead th .column-header {
630
+ animation-name: CELL_ANIMATION_HORIZONTAL, CELL_ANIMATION_HORIZONTAL;
631
+ animation-fill-mode: both;
632
+ animation-timing-function: ease-in-out;
633
+ animation-direction: normal, reverse;
634
+ animation-timeline: view(inline);
635
+ animation-range: entry, exit;
636
+ }
637
+
638
+ @keyframes CELL_ANIMATION_HORIZONTAL {
639
+ 0% {
640
+ opacity: 0.8;
641
+ filter: blur(12px);
642
+ translate: 4px 0px;
643
+ }
644
+ } */
645
+
646
+ thead {
647
+ position: sticky;
648
+ top: 4px;
649
+ z-index: 10;
650
+ transition: box-shadow 200ms ease;
651
+ border-radius: var(--gds-sys-radius-s);
652
+ will-change: transform;
653
+ }
654
+
655
+ thead {
656
+ background-color: var(--gds-sys-color-l1-neutral-01);
657
+ }
658
+
659
+ .data.scrolled thead {
660
+ box-shadow:
661
+ var(--gds-sys-shadow-l-01),
662
+ var(--gds-sys-shadow-l-02),
663
+ inset 0 -4px 6px var(--gds-sys-color-l1-neutral-01);
664
+ backdrop-filter: blur(8px);
665
+ background: color-mix(
666
+ in srgb,
667
+ var(--gds-sys-color-l2-neutral-01),
668
+ transparent 30%
669
+ );
670
+ }
671
+
672
+ @media (prefers-reduced-transparency: no-preference) {
673
+ .data.scrolled thead tr th {
674
+ background: transparent;
675
+ }
676
+ }
677
+
678
+ /* Horizontal scroll */
679
+ @property --_inline-start-fade {
680
+ syntax: '<length>';
681
+ inherits: false;
682
+ initial-value: 0;
683
+ }
684
+
685
+ @property --_inline-end-fade {
686
+ syntax: '<length>';
687
+ inherits: false;
688
+ initial-value: 0;
689
+ }
690
+
691
+ @keyframes table-scroll-inline-fade {
692
+ 0% {
693
+ --_inline-start-fade: 0;
694
+ }
695
+ 10%,
696
+ 100% {
697
+ --_inline-start-fade: var(--gds-sys-space-4xl);
698
+ }
699
+ 0%,
700
+ 90% {
701
+ --_inline-end-fade: var(--gds-sys-space-4xl);
702
+ }
703
+ 100% {
704
+ --_inline-end-fade: 0;
705
+ }
706
+ }
707
+
708
+ .data {
709
+ overflow-x: scroll;
710
+ mask: linear-gradient(
711
+ to right,
712
+ #0000,
713
+ #ffff var(--_inline-start-fade) calc(100% - var(--_inline-end-fade)),
714
+ #0000
715
+ );
716
+ animation: table-scroll-inline-fade;
717
+ animation-timeline: --table-scroll-inline-fade;
718
+ scroll-timeline: --table-scroll-inline-fade x;
719
+ }
720
+ }
721
+ }
722
+
723
+ @media (max-width: 760px) {
724
+ .responsive,
725
+ .responsive tbody tr {
726
+ animation: none;
727
+ }
728
+ }
729
+
730
+ @supports not (animation-timeline: scroll()) {
731
+ tbody tr {
732
+ will-change: opacity, filter, translate;
733
+ transition: all 242ms cubic-bezier(0.22, 0.61, 0.36, 1);
734
+
735
+ @starting-style {
736
+ opacity: 0;
737
+ filter: blur(20px);
738
+ translate: 0 10px;
739
+ }
740
+ }
741
+ }
742
+
743
+ /* Scrollbar */
744
+ .data {
745
+ --_scrollbar-color-thumb: var(--gds-sys-color-l3-neutral-01);
746
+ --_scrollbar-color-track: var(--gds-sys-color-l3-neutral-02);
747
+ --_scrollbar-width: var(--gds-sys-space-2xs);
748
+ }
749
+
750
+ @supports (scrollbar-width: auto) {
751
+ .data {
752
+ scrollbar-color: var(--_scrollbar-color-thumb) transparent;
753
+ scrollbar-width: var(--_scrollbar-width);
754
+ }
755
+ }
756
+
757
+ @supports selector(::-webkit-scrollbar) {
758
+ .data::-webkit-scrollbar {
759
+ width: var(--_scrollbar-width);
760
+ height: var(--_scrollbar-width);
761
+ }
762
+
763
+ .data::-webkit-scrollbar-track {
764
+ background: transparent;
765
+ }
766
+
767
+ .data::-webkit-scrollbar-thumb {
768
+ background: var(--_scrollbar-color-thumb);
769
+ border-radius: var(--gds-sys-radius-max);
770
+ }
771
+ }
772
+
773
+ /* Reduced motion */
774
+ @media (prefers-reduced-motion: reduce) {
775
+ tbody tr,
776
+ tbody td .cell-content,
777
+ thead th .column-header,
778
+ .sort-icon,
779
+ .column-header,
780
+ .header {
781
+ transition: none;
782
+ animation: none;
783
+ }
784
+ }
785
+ `;
786
+ export {
787
+ TableStyles
788
+ };