@sbb-esta/lyne-elements-dev 5.10.0-dev.1790760894 → 5.10.0-dev.1790846348

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.
@@ -1329,7 +1329,6 @@ summary {
1329
1329
  --sbb-download-info-color: var(--sbb-color-granite);
1330
1330
  --sbb-download-info-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));
1331
1331
  --sbb-expansion-panel-background-color: var(--sbb-background-color-1);
1332
- --sbb-expansion-panel-background-color-hover: var(--sbb-background-color-3);
1333
1332
  --sbb-expansion-panel-border-radius: var(--sbb-border-radius-4x);
1334
1333
  --sbb-expansion-panel-icon-size: var(--sbb-size-icon-ui-medium);
1335
1334
  --sbb-expansion-panel-title-gap-s: var(--sbb-spacing-fixed-2x);
@@ -1352,6 +1351,9 @@ summary {
1352
1351
  --sbb-expansion-panel-header-padding-inline-s: var(--sbb-spacing-fixed-5x);
1353
1352
  --sbb-expansion-panel-header-padding-inline-l: var(--sbb-spacing-fixed-6x);
1354
1353
  --sbb-expansion-panel-header-padding-inline-default: var(--sbb-expansion-panel-header-padding-inline-l);
1354
+ --sbb-expansion-panel-header-box-shadow-hover: var(--sbb-box-shadow-level-11-soft);
1355
+ --sbb-expansion-panel-header-translate-y-hover: -0.125rem;
1356
+ --sbb-expansion-panel-header-transition-easing-function: var(--sbb-animation-easing);
1355
1357
  --sbb-file-selector-color: var(--sbb-color-2);
1356
1358
  --sbb-file-selector-subtitle-color: var(--sbb-color-granite);
1357
1359
  --sbb-file-selector-subtitle-color: light-dark(var(--sbb-color-granite), var(--sbb-color-smoke));
@@ -1774,6 +1776,13 @@ summary {
1774
1776
  --sbb-table-header-padding-inline: var(--sbb-spacing-fixed-4x);
1775
1777
  --sbb-table-cell-padding-block: var(--sbb-spacing-responsive-xxxs);
1776
1778
  --sbb-table-cell-padding-inline: var(--sbb-spacing-fixed-4x);
1779
+ --sbb-table-sort-header-animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
1780
+ --sbb-table-sort-header-color: var(--sbb-color-2);
1781
+ --sbb-table-sort-header-hover-color: var(--sbb-color-primary125);
1782
+ --sbb-table-sort-header-hover-color: light-dark(
1783
+ var(--sbb-color-primary125),
1784
+ var(--sbb-color-primary85)
1785
+ );
1777
1786
  --sbb-tab-group-content-gap-size-s: var(--sbb-spacing-responsive-xs);
1778
1787
  --sbb-tab-group-content-gap-size-l: var(--sbb-spacing-responsive-s);
1779
1788
  --sbb-tab-group-content-gap-size-xl: var(--sbb-spacing-responsive-m);
@@ -3276,6 +3285,10 @@ sbb-sidebar-container:is(:has(> sbb-sidebar:not([position=end]):is(:is(:state(st
3276
3285
  --sbb-disable-animation-duration,
3277
3286
  var(--sbb-animation-duration-6x)
3278
3287
  );
3288
+ --sbb-table-sort-header-animation-duration: var(
3289
+ --sbb-disable-animation-duration,
3290
+ var(--sbb-animation-duration-6x)
3291
+ );
3279
3292
  border-spacing: 0;
3280
3293
  caption-side: bottom;
3281
3294
  color: var(--sbb-table-color);
@@ -3362,6 +3375,8 @@ sbb-table-wrapper[negative] .sbb-table,
3362
3375
  --sbb-table-color: var(--sbb-color-1-negative);
3363
3376
  --sbb-table-row-striped-color: var(--sbb-background-color-3-negative);
3364
3377
  --sbb-table-caption-color: var(--sbb-color-cement);
3378
+ --sbb-table-sort-header-color: var(--sbb-color-2-negative);
3379
+ --sbb-table-sort-header-hover-color: var(--sbb-color-primary85);
3365
3380
  }
3366
3381
 
3367
3382
  .sbb-table--striped tbody tr:nth-child(odd) :is(th, td) {
@@ -3489,6 +3504,153 @@ sbb-table-wrapper[negative] .sbb-table--theme-iron, .sbb-table--theme-iron.sbb-t
3489
3504
  text-align: right;
3490
3505
  }
3491
3506
 
3507
+ .sbb-sort-header {
3508
+ position: relative;
3509
+ }
3510
+ .sbb-sort-header:is(:focus-visible, .cdk-keyboard-focused, .cdk-program-focused), .sbb-sort-header:has(.sbb-sort-header-container:focus-visible) {
3511
+ --sbb-focus-outline-offset: calc(-1 * var(--sbb-focus-outline-width));
3512
+ outline-offset: var(--sbb-focus-outline-offset);
3513
+ outline: var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);
3514
+ }
3515
+ .sbb-sort-header:not(.sbb-sort-header-disabled) {
3516
+ cursor: pointer;
3517
+ }
3518
+ .sbb-sort-header:not(.sbb-sort-header-disabled):hover .sbb-sort-header-container {
3519
+ color: var(--sbb-table-sort-header-hover-color);
3520
+ }
3521
+
3522
+ .sbb-sort-header-sorted {
3523
+ color: var(--sbb-table-sort-header-color);
3524
+ }
3525
+
3526
+ .sbb-sort-header-container {
3527
+ display: flex;
3528
+ letter-spacing: normal;
3529
+ text-align: left;
3530
+ height: 100%;
3531
+ outline: 0;
3532
+ }
3533
+ .sbb-sort-header-disabled .sbb-sort-header-container {
3534
+ cursor: default;
3535
+ }
3536
+ .sbb-table-align-center .sbb-sort-header-container {
3537
+ text-align: center;
3538
+ }
3539
+
3540
+ .sbb-sort-header-content {
3541
+ flex-shrink: 1;
3542
+ flex-grow: 1;
3543
+ }
3544
+
3545
+ .sbb-sort-header-position-before {
3546
+ flex-direction: row-reverse;
3547
+ }
3548
+
3549
+ .sbb-sort-header-arrow {
3550
+ height: var(--sbb-size-icon-ui-small);
3551
+ width: var(--sbb-size-icon-ui-small);
3552
+ min-width: var(--sbb-size-icon-ui-small);
3553
+ position: relative;
3554
+ opacity: 0;
3555
+ animation: var(--sbb-sort-header-animation-name) var(--sbb-table-sort-header-animation-duration) var(--sbb-table-sort-header-animation-easing);
3556
+ transition-property: opacity, translate;
3557
+ transition-duration: var(--sbb-table-sort-header-animation-duration);
3558
+ transition-timing-function: var(--sbb-table-sort-header-animation-easing);
3559
+ margin: -0.0625rem -0.5rem -0.0625rem -0.25rem;
3560
+ }
3561
+ .sbb-sort-header-position-before .sbb-sort-header-arrow {
3562
+ margin: -0.0625rem -0.25rem -0.0625rem -0.0625rem;
3563
+ }
3564
+ .sbb-sort-header-arrow svg {
3565
+ width: 100%;
3566
+ height: 100%;
3567
+ }
3568
+ .sbb-sort-header-arrow svg :where(path:nth-child(2)) {
3569
+ transform-origin: center;
3570
+ }
3571
+ .sbb-sort-header-arrow.no-transition {
3572
+ transition: opacity 0ms, translate 0ms !important;
3573
+ }
3574
+ .sbb-sort-header-arrow.active, .sbb-sort-header-arrow.desc-to-active, .sbb-sort-header-arrow.asc-to-active {
3575
+ opacity: 1;
3576
+ }
3577
+ .sbb-sort-header-arrow.hint, .sbb-sort-header-arrow.desc-to-hint, .sbb-sort-header-arrow.asc-to-hint {
3578
+ opacity: 0.54;
3579
+ }
3580
+ .sbb-sort-header-arrow.desc, .sbb-sort-header-arrow.asc, .sbb-sort-header-arrow.void, .sbb-sort-header-arrow.hint-to-desc, .sbb-sort-header-arrow.active-to-desc, .sbb-sort-header-arrow.hint-to-asc, .sbb-sort-header-arrow.active-to-asc {
3581
+ opacity: 0;
3582
+ }
3583
+ .sbb-sort-header-arrow.hint, .sbb-sort-header-arrow.active, .sbb-sort-header-arrow.desc-to-active, .sbb-sort-header-arrow.asc-to-active {
3584
+ translate: 0;
3585
+ }
3586
+ .sbb-sort-header-arrow.desc, .sbb-sort-header-arrow.active-to-desc {
3587
+ translate: 0 25%;
3588
+ }
3589
+ .sbb-sort-header-arrow.asc, .sbb-sort-header-arrow.active-to-asc {
3590
+ translate: 0 -25%;
3591
+ }
3592
+ .sbb-sort-header-arrow.desc-to-hint {
3593
+ --sbb-sort-header-animation-name: move-desc-to-hint;
3594
+ translate: 0;
3595
+ }
3596
+ .sbb-sort-header-arrow.hint-to-desc {
3597
+ --sbb-sort-header-animation-name: move-hint-to-desc;
3598
+ translate: 0 25%;
3599
+ }
3600
+ .sbb-sort-header-arrow.asc-to-hint {
3601
+ --sbb-sort-header-animation-name: move-asc-to-hint;
3602
+ translate: 0;
3603
+ }
3604
+ .sbb-sort-header-arrow.hint-to-asc {
3605
+ --sbb-sort-header-animation-name: move-hint-to-asc;
3606
+ translate: 0 -25%;
3607
+ }
3608
+
3609
+ .sbb-sort-indicator {
3610
+ transition: scale var(--sbb-table-sort-header-animation-duration) var(--sbb-table-sort-header-animation-easing);
3611
+ }
3612
+ .sbb-sort-indicator.asc, .sbb-sort-indicator.active-asc {
3613
+ scale: 1 -1;
3614
+ }
3615
+ .sbb-sort-indicator.desc, .sbb-sort-indicator.active-desc {
3616
+ scale: 1 1;
3617
+ }
3618
+ .sbb-sort-indicator.no-transition {
3619
+ transition: none !important;
3620
+ }
3621
+
3622
+ @keyframes move-desc-to-hint {
3623
+ from {
3624
+ translate: 0 25%;
3625
+ }
3626
+ to {
3627
+ translate: 0 0;
3628
+ }
3629
+ }
3630
+ @keyframes move-hint-to-desc {
3631
+ from {
3632
+ translate: 0 0;
3633
+ }
3634
+ to {
3635
+ translate: 0 25%;
3636
+ }
3637
+ }
3638
+ @keyframes move-asc-to-hint {
3639
+ from {
3640
+ translate: 0 -25%;
3641
+ }
3642
+ to {
3643
+ translate: 0 0;
3644
+ }
3645
+ }
3646
+ @keyframes move-hint-to-asc {
3647
+ from {
3648
+ translate: 0 0;
3649
+ }
3650
+ to {
3651
+ translate: 0 -25%;
3652
+ }
3653
+ }
3492
3654
  sbb-tab-nav-bar .sbb-tab-amount {
3493
3655
  margin: 0;
3494
3656
  color: var(--sbb-tab-label-amount-color);
@@ -56,6 +56,12 @@ $theme: 'standard' !default;
56
56
  ),
57
57
  $theme
58
58
  )};
59
+ --sbb-table-sort-header-animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
60
+ --sbb-table-sort-header-color: var(--sbb-color-2);
61
+ --sbb-table-sort-header-hover-color: light-dark(
62
+ var(--sbb-color-primary125),
63
+ var(--sbb-color-primary85)
64
+ );
59
65
  }
60
66
 
61
67
  @mixin rules {
@@ -68,6 +74,10 @@ $theme: 'standard' !default;
68
74
  --sbb-disable-animation-duration,
69
75
  var(--sbb-animation-duration-6x)
70
76
  );
77
+ --sbb-table-sort-header-animation-duration: var(
78
+ --sbb-disable-animation-duration,
79
+ var(--sbb-animation-duration-6x)
80
+ );
71
81
 
72
82
  border-spacing: 0;
73
83
  caption-side: bottom;
@@ -172,6 +182,8 @@ $theme: 'standard' !default;
172
182
  --sbb-table-color: var(--sbb-color-1-negative);
173
183
  --sbb-table-row-striped-color: var(--sbb-background-color-3-negative);
174
184
  --sbb-table-caption-color: var(--sbb-color-cement);
185
+ --sbb-table-sort-header-color: var(--sbb-color-2-negative);
186
+ --sbb-table-sort-header-hover-color: var(--sbb-color-primary85);
175
187
  }
176
188
 
177
189
  .sbb-table--striped {
@@ -337,4 +349,221 @@ $theme: 'standard' !default;
337
349
  .sbb-table-align-right {
338
350
  text-align: right;
339
351
  }
352
+
353
+ // Sort header classes
354
+ .sbb-sort-header {
355
+ position: relative;
356
+
357
+ // Usually we could rely on the arrow showing up to be focus indication, but if a header is
358
+ // active, the arrow will always be shown so the user has no way of telling the difference.
359
+ &:is(:focus-visible, .cdk-keyboard-focused, .cdk-program-focused),
360
+ &:has(.sbb-sort-header-container:focus-visible) {
361
+ --sbb-focus-outline-offset: calc(-1 * var(--sbb-focus-outline-width));
362
+
363
+ @include sbb.focus-outline;
364
+ }
365
+
366
+ &:not(.sbb-sort-header-disabled) {
367
+ cursor: pointer;
368
+ }
369
+
370
+ &:not(.sbb-sort-header-disabled):hover .sbb-sort-header-container {
371
+ color: var(--sbb-table-sort-header-hover-color);
372
+ }
373
+ }
374
+
375
+ .sbb-sort-header-sorted {
376
+ color: var(--sbb-table-sort-header-color);
377
+ }
378
+
379
+ .sbb-sort-header-container {
380
+ display: flex;
381
+ letter-spacing: normal;
382
+ text-align: left;
383
+ height: 100%;
384
+
385
+ // Needs to be reset since we don't want an outline around the inner
386
+ // div which is focusable. We have our own alternate focus styling.
387
+ outline: 0;
388
+
389
+ .sbb-sort-header-disabled & {
390
+ cursor: default;
391
+ }
392
+
393
+ .sbb-table-align-center & {
394
+ text-align: center;
395
+ }
396
+ }
397
+
398
+ .sbb-sort-header-content {
399
+ flex-shrink: 1;
400
+ flex-grow: 1;
401
+ }
402
+
403
+ .sbb-sort-header-position-before {
404
+ flex-direction: row-reverse;
405
+ }
406
+
407
+ .sbb-sort-header-arrow {
408
+ height: var(--sbb-size-icon-ui-small);
409
+ width: var(--sbb-size-icon-ui-small);
410
+ min-width: var(--sbb-size-icon-ui-small);
411
+ position: relative;
412
+
413
+ // Start off at 0 since the arrow may become visible while parent are animating.
414
+ // This will be overwritten when the arrow animations kick in. See #11819.
415
+ opacity: 0;
416
+ animation: var(--sbb-sort-header-animation-name) var(--sbb-table-sort-header-animation-duration)
417
+ var(--sbb-table-sort-header-animation-easing);
418
+ transition: {
419
+ property: opacity, translate;
420
+ duration: var(--sbb-table-sort-header-animation-duration);
421
+ timing-function: var(--sbb-table-sort-header-animation-easing);
422
+ }
423
+
424
+ margin: #{sbb.px-to-rem-build(-1)} #{sbb.px-to-rem-build(-8)} #{sbb.px-to-rem-build(-1)}
425
+ #{sbb.px-to-rem-build(-4)};
426
+
427
+ .sbb-sort-header-position-before & {
428
+ margin: #{sbb.px-to-rem-build(-1)} #{sbb.px-to-rem-build(-4)} #{sbb.px-to-rem-build(-1)}
429
+ #{sbb.px-to-rem-build(-1)};
430
+ }
431
+
432
+ svg {
433
+ width: 100%;
434
+ height: 100%;
435
+
436
+ :where(path:nth-child(2)) {
437
+ transform-origin: center;
438
+ }
439
+ }
440
+
441
+ &.no-transition {
442
+ transition:
443
+ opacity 0ms,
444
+ translate 0ms !important;
445
+ }
446
+
447
+ &.active,
448
+ &.desc-to-active,
449
+ &.asc-to-active {
450
+ opacity: 1;
451
+ }
452
+
453
+ &.hint,
454
+ &.desc-to-hint,
455
+ &.asc-to-hint {
456
+ opacity: 0.54;
457
+ }
458
+
459
+ &.desc,
460
+ &.asc,
461
+ &.void,
462
+ &.hint-to-desc,
463
+ &.active-to-desc,
464
+ &.hint-to-asc,
465
+ &.active-to-asc {
466
+ opacity: 0;
467
+ }
468
+
469
+ &.hint,
470
+ &.active,
471
+ &.desc-to-active,
472
+ &.asc-to-active {
473
+ translate: 0;
474
+ }
475
+
476
+ &.desc,
477
+ &.active-to-desc {
478
+ translate: 0 25%;
479
+ }
480
+
481
+ &.asc,
482
+ &.active-to-asc {
483
+ translate: 0 -25%;
484
+ }
485
+
486
+ &.desc-to-hint {
487
+ --sbb-sort-header-animation-name: move-desc-to-hint;
488
+
489
+ translate: 0;
490
+ }
491
+
492
+ &.hint-to-desc {
493
+ --sbb-sort-header-animation-name: move-hint-to-desc;
494
+
495
+ translate: 0 25%;
496
+ }
497
+
498
+ &.asc-to-hint {
499
+ --sbb-sort-header-animation-name: move-asc-to-hint;
500
+
501
+ translate: 0;
502
+ }
503
+
504
+ &.hint-to-asc {
505
+ --sbb-sort-header-animation-name: move-hint-to-asc;
506
+
507
+ translate: 0 -25%;
508
+ }
509
+ }
510
+
511
+ .sbb-sort-indicator {
512
+ transition: scale var(--sbb-table-sort-header-animation-duration)
513
+ var(--sbb-table-sort-header-animation-easing);
514
+
515
+ &.asc,
516
+ &.active-asc {
517
+ scale: 1 -1;
518
+ }
519
+
520
+ &.desc,
521
+ &.active-desc {
522
+ scale: 1 1;
523
+ }
524
+
525
+ &.no-transition {
526
+ transition: none !important;
527
+ }
528
+ }
529
+
530
+ @keyframes move-desc-to-hint {
531
+ from {
532
+ translate: 0 25%;
533
+ }
534
+
535
+ to {
536
+ translate: 0 0;
537
+ }
538
+ }
539
+
540
+ @keyframes move-hint-to-desc {
541
+ from {
542
+ translate: 0 0;
543
+ }
544
+
545
+ to {
546
+ translate: 0 25%;
547
+ }
548
+ }
549
+
550
+ @keyframes move-asc-to-hint {
551
+ from {
552
+ translate: 0 -25%;
553
+ }
554
+
555
+ to {
556
+ translate: 0 0;
557
+ }
558
+ }
559
+
560
+ @keyframes move-hint-to-asc {
561
+ from {
562
+ translate: 0 0;
563
+ }
564
+
565
+ to {
566
+ translate: 0 -25%;
567
+ }
568
+ }
340
569
  }