@viasat/beam-styles 2.36.0 → 2.37.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.
- package/components/dialog.module.scss +37 -0
- package/components/floatingui.module.scss +22 -0
- package/package.json +1 -1
- package/styles.css +34 -0
- package/styles.css.map +1 -1
- package/styles.min.css +2 -2
- package/styles.min.css.map +1 -1
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
$dialogBaseClass: '#{constants.$prefix}dialog';
|
|
8
8
|
|
|
9
|
+
// Fluent 2 dialog motion duration (durationGentle).
|
|
10
|
+
$dialog-motion-duration: 0.25s;
|
|
11
|
+
|
|
9
12
|
$sizes: (
|
|
10
13
|
'sm': tokens.$bm-comp-dialog-size-sm,
|
|
11
14
|
'md': tokens.$bm-comp-dialog-size-md,
|
|
@@ -33,12 +36,46 @@ $appearances: (
|
|
|
33
36
|
flex-direction: column;
|
|
34
37
|
max-height: 100%;
|
|
35
38
|
|
|
39
|
+
// Fluent 2 surface motion: fade + scale, driven by FloatingUI's data-status.
|
|
40
|
+
// Enter uses a decelerate curve, exit an accelerate curve (durationGentle = 250ms).
|
|
41
|
+
// The backdrop scrim fades separately on the overlay (see floatingui.module.scss).
|
|
42
|
+
opacity: 0;
|
|
43
|
+
transform: scale(0.85);
|
|
44
|
+
transition:
|
|
45
|
+
opacity $dialog-motion-duration cubic-bezier(0.8, 0, 0.78, 1),
|
|
46
|
+
transform $dialog-motion-duration cubic-bezier(0.8, 0, 0.78, 1);
|
|
47
|
+
|
|
48
|
+
&[data-status='open'] {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
transform: scale(1);
|
|
51
|
+
transition-timing-function: cubic-bezier(0, 0, 0, 1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (prefers-reduced-motion: reduce) {
|
|
55
|
+
transition: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
36
58
|
@each $size, $sizeValue in $sizes {
|
|
37
59
|
&--#{$size} {
|
|
38
60
|
width: $sizeValue;
|
|
39
61
|
max-width: $sizeValue;
|
|
40
62
|
}
|
|
41
63
|
}
|
|
64
|
+
|
|
65
|
+
// One-off structural variant: fills the overlay's padded, centered area so it keeps
|
|
66
|
+
// the standard viewport-offset gap and never touches the screen edge. Relies on the
|
|
67
|
+
// overlay's existing flex centering + padding (no overlay changes needed). Can't use
|
|
68
|
+
// the $sizes width map.
|
|
69
|
+
&--full {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
max-width: none;
|
|
73
|
+
max-height: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&--full &__body {
|
|
77
|
+
flex: 1;
|
|
78
|
+
}
|
|
42
79
|
}
|
|
43
80
|
|
|
44
81
|
.#{$dialogBaseClass}__header {
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
$floatingBaseClass: '#{constants.$prefix}floatingui';
|
|
7
7
|
|
|
8
|
+
// Fluent 2 dialog motion duration (durationGentle).
|
|
9
|
+
$dialog-motion-duration: 0.25s;
|
|
10
|
+
|
|
8
11
|
.#{$floatingBaseClass} {
|
|
9
12
|
z-index: 999;
|
|
10
13
|
position: absolute;
|
|
@@ -40,6 +43,25 @@ $floatingBaseClass: '#{constants.$prefix}floatingui';
|
|
|
40
43
|
background: transparent;
|
|
41
44
|
}
|
|
42
45
|
|
|
46
|
+
// Backdrop scrim fade (Fluent 2 "FadeRelaxed": durationGentle, curveEasyEase).
|
|
47
|
+
// Only the scrim's background-color animates — the overlay's own opacity stays 1 so
|
|
48
|
+
// it never compounds the surface's opacity (the surface fades + scales separately;
|
|
49
|
+
// see dialog.module.scss). The content's data-status drives the open/close state.
|
|
50
|
+
// Dialog-scoped via `.bm-dialog`, mirroring the `:has(.panel--contained)` pattern
|
|
51
|
+
// below. Keep duration in sync with transitionConfig in Dialog.tsx.
|
|
52
|
+
&:has(.#{constants.$prefix}dialog) {
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
transition: background-color $dialog-motion-duration cubic-bezier(0.33, 0, 0.67, 1);
|
|
55
|
+
|
|
56
|
+
@media (prefers-reduced-motion: reduce) {
|
|
57
|
+
transition: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:has(.#{constants.$prefix}dialog[data-status='open']) {
|
|
62
|
+
background-color: tokens.$bm-comp-dialog-color-overlay;
|
|
63
|
+
}
|
|
64
|
+
|
|
43
65
|
// FloatingUI applies position:fixed as an inline style; !important is required to
|
|
44
66
|
// override it when the backdrop is scoped inside a container (contained Panel).
|
|
45
67
|
// Targets the Panel `--contained` modifier. If that modifier is renamed in
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -6718,6 +6718,19 @@ textarea:focus-visible,
|
|
|
6718
6718
|
display: flex;
|
|
6719
6719
|
flex-direction: column;
|
|
6720
6720
|
max-height: 100%;
|
|
6721
|
+
opacity: 0;
|
|
6722
|
+
transform: scale(0.85);
|
|
6723
|
+
transition: opacity 0.25s cubic-bezier(0.8, 0, 0.78, 1), transform 0.25s cubic-bezier(0.8, 0, 0.78, 1);
|
|
6724
|
+
}
|
|
6725
|
+
.bm-dialog[data-status=open] {
|
|
6726
|
+
opacity: 1;
|
|
6727
|
+
transform: scale(1);
|
|
6728
|
+
transition-timing-function: cubic-bezier(0, 0, 0, 1);
|
|
6729
|
+
}
|
|
6730
|
+
@media (prefers-reduced-motion: reduce) {
|
|
6731
|
+
.bm-dialog {
|
|
6732
|
+
transition: none;
|
|
6733
|
+
}
|
|
6721
6734
|
}
|
|
6722
6735
|
.bm-dialog--sm {
|
|
6723
6736
|
width: var(--bm-comp-dialog-size-sm);
|
|
@@ -6735,6 +6748,15 @@ textarea:focus-visible,
|
|
|
6735
6748
|
width: var(--bm-comp-dialog-size-xl);
|
|
6736
6749
|
max-width: var(--bm-comp-dialog-size-xl);
|
|
6737
6750
|
}
|
|
6751
|
+
.bm-dialog--full {
|
|
6752
|
+
width: 100%;
|
|
6753
|
+
height: 100%;
|
|
6754
|
+
max-width: none;
|
|
6755
|
+
max-height: none;
|
|
6756
|
+
}
|
|
6757
|
+
.bm-dialog--full .bm-dialog__body {
|
|
6758
|
+
flex: 1;
|
|
6759
|
+
}
|
|
6738
6760
|
|
|
6739
6761
|
.bm-dialog__header {
|
|
6740
6762
|
font: var(--bm-comp-dialog-typo-heading);
|
|
@@ -7705,6 +7727,18 @@ textarea:focus-visible,
|
|
|
7705
7727
|
.bm-floatingui__overlay--transparent {
|
|
7706
7728
|
background: transparent;
|
|
7707
7729
|
}
|
|
7730
|
+
.bm-floatingui__overlay:has(.bm-dialog) {
|
|
7731
|
+
background-color: transparent;
|
|
7732
|
+
transition: background-color 0.25s cubic-bezier(0.33, 0, 0.67, 1);
|
|
7733
|
+
}
|
|
7734
|
+
@media (prefers-reduced-motion: reduce) {
|
|
7735
|
+
.bm-floatingui__overlay:has(.bm-dialog) {
|
|
7736
|
+
transition: none;
|
|
7737
|
+
}
|
|
7738
|
+
}
|
|
7739
|
+
.bm-floatingui__overlay:has(.bm-dialog[data-status=open]) {
|
|
7740
|
+
background-color: var(--bm-comp-dialog-color-overlay);
|
|
7741
|
+
}
|
|
7708
7742
|
.bm-floatingui__overlay:has(.bm-panel--contained) {
|
|
7709
7743
|
position: absolute !important;
|
|
7710
7744
|
inset: 0;
|