@viasat/beam-styles 2.41.0 → 2.43.0

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.
@@ -51,7 +51,8 @@ $dialog-motion-duration: 0.25s;
51
51
  // below. Keep duration in sync with transitionConfig in Dialog.tsx.
52
52
  &:has(.#{constants.$prefix}dialog) {
53
53
  background-color: transparent;
54
- transition: background-color $dialog-motion-duration cubic-bezier(0.33, 0, 0.67, 1);
54
+ transition: background-color $dialog-motion-duration
55
+ cubic-bezier(0.33, 0, 0.67, 1);
55
56
 
56
57
  @media (prefers-reduced-motion: reduce) {
57
58
  transition: none;
@@ -62,6 +63,21 @@ $dialog-motion-duration: 0.25s;
62
63
  background-color: tokens.$bm-comp-dialog-color-overlay;
63
64
  }
64
65
 
66
+ // Scrim fade for modal Panel (isModal), same timing as Dialog scrim.
67
+ &:has(.#{constants.$prefix}panel--overlay[aria-modal]) {
68
+ background-color: transparent;
69
+ transition: background-color $dialog-motion-duration
70
+ cubic-bezier(0.33, 0, 0.67, 1);
71
+
72
+ @media (prefers-reduced-motion: reduce) {
73
+ transition: none;
74
+ }
75
+ }
76
+
77
+ &:has(.#{constants.$prefix}panel--overlay[aria-modal][data-status='open']) {
78
+ background-color: tokens.$bm-comp-dialog-color-overlay;
79
+ }
80
+
65
81
  // FloatingUI applies position:fixed as an inline style; !important is required to
66
82
  // override it when the backdrop is scoped inside a container (contained Panel).
67
83
  // Targets the Panel `--contained` modifier. If that modifier is renamed in
@@ -72,5 +88,20 @@ $dialog-motion-duration: 0.25s;
72
88
  // Clip slide transforms without creating a scroll container.
73
89
  overflow: clip !important;
74
90
  }
91
+
92
+ // Non-modal Panel: the overlay is required only as a clip/scroll-isolation layer
93
+ // (its `overflow: clip` keeps the off-screen slide from inflating — and scrolling —
94
+ // the consumer's container). It must NOT dim or block the page. Keyed off the Panel
95
+ // lacking `aria-modal`, which is only set for isModal/alert.
96
+ &:has(.#{constants.$prefix}panel--overlay:not([aria-modal])) {
97
+ background: transparent;
98
+ pointer-events: none;
99
+ overflow: clip;
100
+
101
+ // Re-enable interaction on the panel itself (the rest of the page stays clickable).
102
+ .#{constants.$prefix}panel--overlay {
103
+ pointer-events: auto;
104
+ }
105
+ }
75
106
  }
76
107
  }
@@ -8,11 +8,12 @@
8
8
  $panelBaseClass: '#{constants.$prefix}panel';
9
9
  $panelOffsetXVar: '--#{constants.$prefix}comp-panel-offset-x';
10
10
  $panelOffsetYVar: '--#{constants.$prefix}comp-panel-offset-y';
11
- $panelSizeVar: '--#{constants.$prefix}comp-panel-size';
11
+ $panelWidthVar: '--#{constants.$prefix}comp-panel-width';
12
+ $panelHeightVar: '--#{constants.$prefix}comp-panel-height';
12
13
  $panel-transition-duration: 0.4s;
13
14
  $panel-max-height: 90dvh;
14
15
 
15
- $panel-sizes: (
16
+ $panel-widths: (
16
17
  'sm': tokens.$bm-comp-panel-size-sm,
17
18
  'md': tokens.$bm-comp-panel-size-md,
18
19
  'lg': tokens.$bm-comp-panel-size-lg,
@@ -41,24 +42,24 @@ $panel-sizes: (
41
42
  left: 0;
42
43
  top: 0;
43
44
  bottom: 0;
44
- // Cap to the viewport so the panel never bleeds off a screen narrower than its size.
45
- width: min(var(#{$panelSizeVar}, #{tokens.$bm-comp-panel-size-md}), 100dvw);
45
+ // Cap to the viewport so the panel never bleeds off a screen narrower than its width.
46
+ width: min(var(#{$panelWidthVar}, #{tokens.$bm-comp-panel-size-md}), 100dvw);
46
47
  }
47
48
 
48
49
  &.#{$panelBaseClass}--position-end {
49
50
  right: 0;
50
51
  top: 0;
51
52
  bottom: 0;
52
- // Cap to the viewport so the panel never bleeds off a screen narrower than its size.
53
- width: min(var(#{$panelSizeVar}, #{tokens.$bm-comp-panel-size-md}), 100dvw);
53
+ // Cap to the viewport so the panel never bleeds off a screen narrower than its width.
54
+ width: min(var(#{$panelWidthVar}, #{tokens.$bm-comp-panel-size-md}), 100dvw);
54
55
  }
55
56
 
56
57
  &.#{$panelBaseClass}--position-bottom {
57
58
  bottom: 0;
58
59
  left: 0;
59
60
  right: 0;
60
- height: var(#{$panelSizeVar}, auto);
61
- max-height: var(#{$panelSizeVar}, #{$panel-max-height});
61
+ height: var(#{$panelHeightVar}, auto);
62
+ max-height: var(#{$panelHeightVar}, #{$panel-max-height});
62
63
  }
63
64
 
64
65
  &.#{$panelBaseClass}--contained {
@@ -112,9 +113,9 @@ $panel-sizes: (
112
113
  width: auto;
113
114
  } @else {
114
115
  // Floating start/end sit inset by the offset; cap to the viewport minus both
115
- // offsets so the panel still fits (with its gap) on screens narrower than its size.
116
+ // offsets so the panel still fits (with its gap) on screens narrower than its width.
116
117
  width: min(
117
- var(#{$panelSizeVar}, #{tokens.$bm-comp-panel-size-md}),
118
+ var(#{$panelWidthVar}, #{tokens.$bm-comp-panel-size-md}),
118
119
  100dvw - 2 * var(#{$panelOffsetXVar}, 1rem)
119
120
  );
120
121
  }
@@ -123,9 +124,9 @@ $panel-sizes: (
123
124
  }
124
125
  }
125
126
 
126
- @each $size, $width in $panel-sizes {
127
- &--size-#{$size} {
128
- #{$panelSizeVar}: $width;
127
+ @each $name, $value in $panel-widths {
128
+ &--width-#{$name} {
129
+ #{$panelWidthVar}: $value;
129
130
  }
130
131
  }
131
132
 
@@ -225,8 +226,8 @@ $panel-sizes: (
225
226
  flex: 1;
226
227
  overflow: auto;
227
228
 
228
- font: tokens.$bm-comp-panel-typo-description;
229
- color: tokens.$bm-comp-panel-color-description;
229
+ font: tokens.$bm-sem-typo-body-sm;
230
+ color: tokens.$bm-sem-color-text-primary;
230
231
  }
231
232
 
232
233
  &__footer {
@@ -307,16 +308,16 @@ $panel-sizes: (
307
308
  width: 100%;
308
309
  }
309
310
 
310
- // Inline bottom: let --bm-comp-panel-size drive height (overrides shared height: auto).
311
+ // Inline bottom: let --bm-comp-panel-height drive height (overrides shared height: auto).
311
312
  // No max-height cap here — inline panels are bounded by their flex container, not the viewport
312
313
  // (unlike overlay bottom which applies a 90dvh soft cap via $panel-max-height).
313
314
  &--inline#{&}--position-bottom {
314
- height: var(#{$panelSizeVar}, auto);
315
+ height: var(#{$panelHeightVar}, auto);
315
316
  }
316
317
 
317
318
  // Pin start/end inline content while the wrapper animates width.
318
319
  &--inline:not(#{&}--resizable):not(#{&}--position-bottom) {
319
- width: var(#{$panelSizeVar}, #{tokens.$bm-comp-panel-size-md});
320
+ width: var(#{$panelWidthVar}, #{tokens.$bm-comp-panel-size-md});
320
321
  }
321
322
  }
322
323
 
@@ -394,13 +395,26 @@ $resize-handle-positions: (
394
395
  @include panel-slide(transform, translateY(100%), translateY(0));
395
396
  }
396
397
 
398
+ // Fade the shadow out in sync with the slide-out animation so it doesn't linger
399
+ // after the panel has moved off-screen.
400
+ .#{$panelBaseClass}--overlay[data-status='close'] {
401
+ box-shadow: tokens.$bm-sem-shadow-none;
402
+ transition-property: transform, box-shadow;
403
+ transition-duration: $panel-transition-duration;
404
+ transition-timing-function: ease-in;
405
+
406
+ @media (prefers-reduced-motion: reduce) {
407
+ transition: none;
408
+ }
409
+ }
410
+
397
411
  .#{$panelBaseClass}__inline-wrapper {
398
412
  overflow: hidden;
399
413
  flex-shrink: 0;
400
414
 
401
- @each $size, $token in $panel-sizes {
402
- &--size-#{$size} {
403
- #{$panelSizeVar}: $token;
415
+ @each $name, $value in $panel-widths {
416
+ &--width-#{$name} {
417
+ #{$panelWidthVar}: $value;
404
418
  }
405
419
  }
406
420
 
@@ -413,7 +427,7 @@ $resize-handle-positions: (
413
427
  }
414
428
 
415
429
  &[data-status='open'] {
416
- width: var(#{$panelSizeVar}, #{tokens.$bm-comp-panel-size-md});
430
+ width: var(#{$panelWidthVar}, #{tokens.$bm-comp-panel-size-md});
417
431
  transition: width $panel-transition-duration ease-out;
418
432
  @media (prefers-reduced-motion: reduce) {
419
433
  transition: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viasat/beam-styles",
3
- "version": "2.41.0",
3
+ "version": "2.43.0",
4
4
  "description": "SCSS modules and component styles for the Beam Design System",
5
5
  "license": "MIT",
6
6
  "author": "Viasat",
package/styles.css CHANGED
@@ -7899,11 +7899,31 @@ textarea:focus-visible,
7899
7899
  .bm-floatingui__overlay:has(.bm-dialog[data-status=open]) {
7900
7900
  background-color: var(--bm-comp-dialog-color-overlay);
7901
7901
  }
7902
+ .bm-floatingui__overlay:has(.bm-panel--overlay[aria-modal]) {
7903
+ background-color: transparent;
7904
+ transition: background-color 0.25s cubic-bezier(0.33, 0, 0.67, 1);
7905
+ }
7906
+ @media (prefers-reduced-motion: reduce) {
7907
+ .bm-floatingui__overlay:has(.bm-panel--overlay[aria-modal]) {
7908
+ transition: none;
7909
+ }
7910
+ }
7911
+ .bm-floatingui__overlay:has(.bm-panel--overlay[aria-modal][data-status=open]) {
7912
+ background-color: var(--bm-comp-dialog-color-overlay);
7913
+ }
7902
7914
  .bm-floatingui__overlay:has(.bm-panel--contained) {
7903
7915
  position: absolute !important;
7904
7916
  inset: 0;
7905
7917
  overflow: clip !important;
7906
7918
  }
7919
+ .bm-floatingui__overlay:has(.bm-panel--overlay:not([aria-modal])) {
7920
+ background: transparent;
7921
+ pointer-events: none;
7922
+ overflow: clip;
7923
+ }
7924
+ .bm-floatingui__overlay:has(.bm-panel--overlay:not([aria-modal])) .bm-panel--overlay {
7925
+ pointer-events: auto;
7926
+ }
7907
7927
 
7908
7928
  :root,
7909
7929
  :host,