@viasat/beam-styles 2.8.0 → 2.9.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/panel.module.scss +112 -5
- package/package.json +1 -1
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
@import '@viasat/beam-tokens/components/Panel';
|
|
7
7
|
|
|
8
8
|
$panelBaseClass: '#{constants.$prefix}panel';
|
|
9
|
+
$panel-transition-duration: 0.4s;
|
|
10
|
+
$panel-width: 20rem; // TO DO: Temporary fixed width, to be mapped to spec props later
|
|
9
11
|
|
|
10
12
|
.#{$panelBaseClass} {
|
|
11
13
|
display: flex;
|
|
12
14
|
flex-direction: column;
|
|
13
15
|
|
|
14
|
-
width:
|
|
16
|
+
width: $panel-width;
|
|
15
17
|
|
|
16
18
|
background-color: tokens.$bm-sem-color-surface-01;
|
|
17
19
|
|
|
@@ -24,16 +26,35 @@ $panelBaseClass: '#{constants.$prefix}panel';
|
|
|
24
26
|
&--overlay {
|
|
25
27
|
position: fixed;
|
|
26
28
|
box-shadow: tokens.$bm-comp-panel-shadow;
|
|
29
|
+
|
|
30
|
+
&.#{$panelBaseClass}--position-start {
|
|
31
|
+
left: 0;
|
|
32
|
+
top: 0;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.#{$panelBaseClass}--position-end {
|
|
37
|
+
right: 0;
|
|
38
|
+
top: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.#{$panelBaseClass}--position-bottom {
|
|
43
|
+
bottom: 0;
|
|
44
|
+
left: 0;
|
|
45
|
+
right: 0;
|
|
46
|
+
height: auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.#{$panelBaseClass}--position-full {
|
|
50
|
+
inset: 0;
|
|
51
|
+
}
|
|
27
52
|
}
|
|
28
53
|
|
|
29
54
|
&--size-full {
|
|
30
55
|
width: 100%;
|
|
31
56
|
}
|
|
32
57
|
|
|
33
|
-
&--position-bottom {
|
|
34
|
-
height: auto;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
58
|
&--padding-sm {
|
|
38
59
|
.#{$panelBaseClass}__header {
|
|
39
60
|
padding-left: tokens.$bm-comp-panel-space-x-sm;
|
|
@@ -156,4 +177,90 @@ $panelBaseClass: '#{constants.$prefix}panel';
|
|
|
156
177
|
}
|
|
157
178
|
}
|
|
158
179
|
}
|
|
180
|
+
|
|
181
|
+
&__overlay-divider {
|
|
182
|
+
position: absolute;
|
|
183
|
+
|
|
184
|
+
&--start {
|
|
185
|
+
right: 0;
|
|
186
|
+
top: 0;
|
|
187
|
+
bottom: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&--end {
|
|
191
|
+
left: 0;
|
|
192
|
+
top: 0;
|
|
193
|
+
bottom: 0;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&--bottom {
|
|
197
|
+
top: 0;
|
|
198
|
+
left: 0;
|
|
199
|
+
right: 0;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@mixin panel-slide($prop, $hidden, $visible, $duration: $panel-transition-duration) {
|
|
205
|
+
#{$prop}: $hidden;
|
|
206
|
+
&[data-status='open'] {
|
|
207
|
+
transition: $prop $duration ease-out;
|
|
208
|
+
#{$prop}: $visible;
|
|
209
|
+
}
|
|
210
|
+
&[data-status='close'] {
|
|
211
|
+
transition: $prop $duration ease-in;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.#{$panelBaseClass}--overlay[data-position='start'] {
|
|
216
|
+
@include panel-slide(transform, translateX(-100%), translateX(0));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.#{$panelBaseClass}--overlay[data-position='end'] {
|
|
220
|
+
@include panel-slide(transform, translateX(100%), translateX(0));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.#{$panelBaseClass}--overlay[data-position='bottom'] {
|
|
224
|
+
@include panel-slide(transform, translateY(100%), translateY(0));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.#{$panelBaseClass}--overlay[data-position='full'] {
|
|
228
|
+
@include panel-slide(opacity, 0, 1, $panel-transition-duration);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.#{$panelBaseClass}__inline-wrapper {
|
|
232
|
+
overflow: hidden;
|
|
233
|
+
flex-shrink: 0;
|
|
234
|
+
|
|
235
|
+
&[data-status] {
|
|
236
|
+
width: 0;
|
|
237
|
+
transition: width $panel-transition-duration ease-in;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&[data-status='open'] {
|
|
241
|
+
width: $panel-width;
|
|
242
|
+
transition: width $panel-transition-duration ease-out;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&[data-position='bottom'][data-status] {
|
|
246
|
+
width: 100%;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&[data-position='bottom'][data-status] .#{$panelBaseClass}__inline-wrapper-content {
|
|
250
|
+
transform: translateY(100%);
|
|
251
|
+
transition: transform $panel-transition-duration ease-in;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&[data-position='bottom'][data-status='open'] .#{$panelBaseClass}__inline-wrapper-content {
|
|
255
|
+
transform: translateY(0);
|
|
256
|
+
transition: transform $panel-transition-duration ease-out;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&--full[data-status='open'] {
|
|
260
|
+
width: 100%;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.#{$panelBaseClass}__inline-wrapper-content {
|
|
265
|
+
height: 100%;
|
|
159
266
|
}
|