@viasat/beam-styles 2.2.0 → 2.8.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/actionList.module.scss +10 -0
- package/components/card.module.scss +158 -25
- package/components/checkbox.module.scss +3 -25
- package/components/index.scss +25 -8
- package/components/panel.module.scss +159 -0
- package/components/radioButton.module.scss +3 -24
- package/components/search.module.scss +176 -0
- package/package.json +1 -1
- package/styles.css +9687 -5113
- package/styles.css.map +1 -1
- package/styles.min.css +49 -8
- package/styles.min.css.map +1 -1
- package/utils/index.scss +1 -0
- package/utils/inputChoiceMixins.scss +78 -0
|
@@ -198,6 +198,16 @@
|
|
|
198
198
|
font: tokens.$bm-comp-actionlist-typo-heading-group;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
&__no-results {
|
|
202
|
+
display: flex;
|
|
203
|
+
min-height: tokens.$bm-comp-actionlist-size-height;
|
|
204
|
+
padding: tokens.$bm-comp-actionlist-space-y 0;
|
|
205
|
+
justify-content: flex-start;
|
|
206
|
+
align-items: center;
|
|
207
|
+
color: tokens.$bm-sem-color-text-primary;
|
|
208
|
+
font: tokens.$bm-sem-typo-body-sm;
|
|
209
|
+
}
|
|
210
|
+
|
|
201
211
|
&__divider {
|
|
202
212
|
margin: tokens.$bm-comp-actionlist-space-y 0;
|
|
203
213
|
}
|
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
@use '../utils/mixins.scss' as mixins;
|
|
4
4
|
@use '../utils/tokens.scss' as tokens;
|
|
5
5
|
@use '../utils/stateLayerVars.scss' as state-layer;
|
|
6
|
+
@use '../utils/inputChoiceMixins.scss' as choiceMixins;
|
|
6
7
|
|
|
7
|
-
@import '
|
|
8
|
+
@import '@viasat/beam-tokens/components/Card';
|
|
9
|
+
@import '@viasat/beam-tokens/components/Input';
|
|
8
10
|
|
|
9
11
|
$cardBaseClass: '#{constants.$prefix}card';
|
|
12
|
+
$cardRadiusOuterVarName: '--#{constants.$prefix}card-radius-outer';
|
|
13
|
+
$selectionIndicatorTopVarName: '--#{constants.$prefix}card-selection-indicator-top';
|
|
14
|
+
$selectionIndicatorRightVarName: '--#{constants.$prefix}card-selection-indicator-right';
|
|
10
15
|
|
|
11
16
|
@mixin backdrop-overlay($color) {
|
|
12
17
|
position: relative;
|
|
@@ -69,10 +74,12 @@ $cardDensity: (
|
|
|
69
74
|
|
|
70
75
|
// Main Card component
|
|
71
76
|
.#{$cardBaseClass} {
|
|
77
|
+
#{$cardRadiusOuterVarName}: #{tokens.$bm-comp-card-radius-outer};
|
|
78
|
+
|
|
72
79
|
display: flex;
|
|
73
80
|
flex-direction: column;
|
|
74
|
-
overflow: hidden;
|
|
75
81
|
outline: none;
|
|
82
|
+
border-radius: var(#{$cardRadiusOuterVarName});
|
|
76
83
|
|
|
77
84
|
&--default-background {
|
|
78
85
|
background: tokens.$bm-comp-card-color-bg;
|
|
@@ -83,9 +90,6 @@ $cardDensity: (
|
|
|
83
90
|
&--default-border {
|
|
84
91
|
border-color: tokens.$bm-comp-card-color-border;
|
|
85
92
|
}
|
|
86
|
-
&--default-border-radius {
|
|
87
|
-
border-radius: tokens.$bm-comp-card-radius-outer;
|
|
88
|
-
}
|
|
89
93
|
|
|
90
94
|
// Interactive card styles (clickable/selectable)
|
|
91
95
|
&--interactive {
|
|
@@ -108,30 +112,27 @@ $cardDensity: (
|
|
|
108
112
|
// Extend to cover the border area so overlay matches full card surface
|
|
109
113
|
> .#{state-layer.$stateLayerBaseClass} {
|
|
110
114
|
pointer-events: none;
|
|
111
|
-
z-index:
|
|
115
|
+
z-index: 3;
|
|
112
116
|
|
|
113
117
|
$border-offset: calc(0px - tokens.$bm-sem-border-width-md);
|
|
114
118
|
#{state-layer.$top}: $border-offset;
|
|
115
119
|
#{state-layer.$right}: $border-offset;
|
|
116
120
|
#{state-layer.$bottom}: $border-offset;
|
|
117
121
|
#{state-layer.$left}: $border-offset;
|
|
118
|
-
}
|
|
119
122
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
tokens.$bm-sem-border-width-focus
|
|
124
|
-
solid,
|
|
125
|
-
tokens.$bm-sem-color-border-focus,
|
|
126
|
-
calc(tokens.$bm-sem-border-width-md + tokens.$bm-sem-size-focus-offset)
|
|
123
|
+
// Adjust outline-offset to account for state layer's negative positioning
|
|
124
|
+
// This ensures the focus ring appears at the correct distance from the card's outer edge
|
|
125
|
+
#{state-layer.$outline-offset}: calc(
|
|
126
|
+
tokens.$bm-sem-border-width-md + tokens.$bm-sem-size-focus-offset
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
// Suppress state layer when hovering interactive children
|
|
131
|
+
// Note: Excludes the card's own hidden input
|
|
131
132
|
&:has(
|
|
132
133
|
button:hover,
|
|
133
134
|
a:hover,
|
|
134
|
-
input:hover,
|
|
135
|
+
input:not([data-card-input]):hover,
|
|
135
136
|
select:hover,
|
|
136
137
|
textarea:hover,
|
|
137
138
|
[role='button']:hover,
|
|
@@ -144,10 +145,11 @@ $cardDensity: (
|
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
// Suppress state layer when clicking (active) interactive children
|
|
148
|
+
// Note: Excludes the card's own hidden input
|
|
147
149
|
&:has(
|
|
148
150
|
button:active,
|
|
149
151
|
a:active,
|
|
150
|
-
input:active,
|
|
152
|
+
input:not([data-card-input]):active,
|
|
151
153
|
select:active,
|
|
152
154
|
textarea:active,
|
|
153
155
|
[role='button']:active,
|
|
@@ -158,6 +160,22 @@ $cardDensity: (
|
|
|
158
160
|
#{state-layer.$opacity}: 0 !important;
|
|
159
161
|
#{state-layer.$background}: transparent !important;
|
|
160
162
|
}
|
|
163
|
+
|
|
164
|
+
// Suppress state layer focus outline when interactive children have focus
|
|
165
|
+
// Note: Excludes the card's own hidden input
|
|
166
|
+
&:has(
|
|
167
|
+
button:focus-visible,
|
|
168
|
+
a:focus-visible,
|
|
169
|
+
input:not([data-card-input]):focus-visible,
|
|
170
|
+
select:focus-visible,
|
|
171
|
+
textarea:focus-visible,
|
|
172
|
+
[role='button']:focus-visible,
|
|
173
|
+
[role='link']:focus-visible,
|
|
174
|
+
[tabindex]:not([tabindex='-1']):focus-visible
|
|
175
|
+
)
|
|
176
|
+
> .#{state-layer.$stateLayerBaseClass} {
|
|
177
|
+
#{state-layer.$outline-color}: transparent !important;
|
|
178
|
+
}
|
|
161
179
|
}
|
|
162
180
|
|
|
163
181
|
|
|
@@ -167,30 +185,124 @@ $cardDensity: (
|
|
|
167
185
|
cursor: not-allowed;
|
|
168
186
|
}
|
|
169
187
|
|
|
170
|
-
//
|
|
188
|
+
// Hidden input for selectable cards (provides accessibility and form integration)
|
|
189
|
+
&__hidden-input {
|
|
190
|
+
position: absolute;
|
|
191
|
+
inset: 0;
|
|
192
|
+
width: 100%;
|
|
193
|
+
height: 100%;
|
|
194
|
+
margin: 0;
|
|
195
|
+
padding: 0;
|
|
196
|
+
opacity: 0;
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
z-index: 1; // Above card background, below content
|
|
199
|
+
border: none;
|
|
200
|
+
appearance: none;
|
|
201
|
+
|
|
202
|
+
&:disabled {
|
|
203
|
+
cursor: not-allowed;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Selectable card styles
|
|
208
|
+
&--selectable {
|
|
209
|
+
// Reserve space in header to prevent overlap with selection indicator
|
|
210
|
+
// Only apply when card doesn't have media-above
|
|
211
|
+
&:not(:has(.#{$cardBaseClass}__media-above)) .#{$cardBaseClass}__header::after {
|
|
212
|
+
content: '';
|
|
213
|
+
order: 999; // Position at end of flex container
|
|
214
|
+
width: tokens.$bm-comp-input-size-choice-checkbox;
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Focus styles via :has() - show focus ring when hidden input is focused
|
|
219
|
+
&:has(.#{$cardBaseClass}__hidden-input:focus-visible) > .#{state-layer.$stateLayerBaseClass} {
|
|
220
|
+
#{state-layer.$outline-width}: tokens.$bm-sem-border-width-focus;
|
|
221
|
+
#{state-layer.$outline-color}: tokens.$bm-sem-color-border-focus;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Card-specific selection indicator (visual-only, divorced from Checkbox/RadioButton components)
|
|
226
|
+
&__selection-indicator {
|
|
227
|
+
position: absolute;
|
|
228
|
+
top: var(#{$selectionIndicatorTopVarName}, #{tokens.$bm-sem-space-100});
|
|
229
|
+
right: var(#{$selectionIndicatorRightVarName}, #{tokens.$bm-sem-space-100});
|
|
230
|
+
z-index: 4;
|
|
231
|
+
pointer-events: none;
|
|
232
|
+
display: block;
|
|
233
|
+
|
|
234
|
+
// Checkbox variant
|
|
235
|
+
&--checkbox {
|
|
236
|
+
@include choiceMixins.choice-checkbox-base();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Radio variant
|
|
240
|
+
&--radio {
|
|
241
|
+
@include choiceMixins.choice-radio-base();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Checked state - checkbox
|
|
245
|
+
&--checkbox#{&}--checked {
|
|
246
|
+
@include choiceMixins.choice-checkbox-checked();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Checked state - radio
|
|
250
|
+
&--radio#{&}--checked {
|
|
251
|
+
@include choiceMixins.choice-radio-checked();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Disabled state
|
|
255
|
+
&--disabled {
|
|
256
|
+
border-color: tokens.$bm-comp-input-color-border-disabled;
|
|
257
|
+
background-color: tokens.$bm-comp-input-color-bg-disabled;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&--checkbox#{&}--checked#{&}--disabled {
|
|
261
|
+
background-color: tokens.$bm-comp-input-color-icon-disabled;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&--radio#{&}--checked#{&}--disabled::after {
|
|
265
|
+
background-color: tokens.$bm-comp-input-color-icon-disabled;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
171
269
|
&--selected {
|
|
172
270
|
border-color: tokens.$bm-comp-card-color-border-selected;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
271
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
272
|
+
outline: tokens.$bm-sem-border-width-selected
|
|
273
|
+
solid tokens.$bm-comp-card-color-border-selected;
|
|
274
|
+
outline-offset: calc(0px - tokens.$bm-sem-border-width-md);
|
|
275
|
+
}
|
|
180
276
|
|
|
277
|
+
// Density modifiers apply positioning for selection indicator and styling for content
|
|
181
278
|
@each $density, $values in $cardDensity {
|
|
182
279
|
&--#{$density} {
|
|
183
|
-
|
|
184
|
-
|
|
280
|
+
#{$selectionIndicatorTopVarName}: #{map.get($values, inset)};
|
|
281
|
+
#{$selectionIndicatorRightVarName}: #{map.get($values, inset)};
|
|
282
|
+
|
|
283
|
+
> .#{$cardBaseClass}__content {
|
|
284
|
+
gap: map.get($values, gap);
|
|
285
|
+
padding: map.get($values, inset);
|
|
286
|
+
}
|
|
185
287
|
}
|
|
186
288
|
}
|
|
187
289
|
}
|
|
188
290
|
|
|
291
|
+
// Card.Content - sits above hidden input for selectable cards
|
|
292
|
+
.#{$cardBaseClass}__content {
|
|
293
|
+
display: flex;
|
|
294
|
+
flex-direction: column;
|
|
295
|
+
position: relative;
|
|
296
|
+
z-index: 2;
|
|
297
|
+
}
|
|
298
|
+
|
|
189
299
|
// Card.Header
|
|
190
300
|
.#{$cardBaseClass}__header {
|
|
191
301
|
display: flex;
|
|
192
302
|
flex-direction: row;
|
|
193
303
|
gap: tokens.$bm-comp-card-space-header-gap;
|
|
304
|
+
position: relative;
|
|
305
|
+
z-index: 2;
|
|
194
306
|
|
|
195
307
|
&__content-before {
|
|
196
308
|
order: 1;
|
|
@@ -250,16 +362,33 @@ $cardDensity: (
|
|
|
250
362
|
}
|
|
251
363
|
}
|
|
252
364
|
|
|
365
|
+
.#{$cardBaseClass}__media-above {
|
|
366
|
+
// Calculate inner radius from outer: inner = outer - border-width
|
|
367
|
+
$inner-radius: calc(var(#{$cardRadiusOuterVarName}) - #{tokens.$bm-sem-border-width-md});
|
|
368
|
+
border-top-left-radius: $inner-radius;
|
|
369
|
+
border-top-right-radius: $inner-radius;
|
|
370
|
+
border-bottom-left-radius: 0;
|
|
371
|
+
border-bottom-right-radius: 0;
|
|
372
|
+
|
|
373
|
+
&:last-child {
|
|
374
|
+
border-bottom-left-radius: $inner-radius;
|
|
375
|
+
border-bottom-right-radius: $inner-radius;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
253
379
|
.#{$cardBaseClass}__media-below {
|
|
254
380
|
border-radius: tokens.$bm-comp-card-radius-inner;
|
|
255
381
|
}
|
|
256
382
|
|
|
383
|
+
// Media sections sit above hidden input for selectable cards
|
|
257
384
|
.#{$cardBaseClass}__media-above,
|
|
258
385
|
.#{$cardBaseClass}__media-below {
|
|
259
386
|
display: flex;
|
|
260
387
|
overflow: hidden;
|
|
261
388
|
width: 100%;
|
|
262
389
|
isolation: isolate;
|
|
390
|
+
position: relative;
|
|
391
|
+
z-index: 2;
|
|
263
392
|
|
|
264
393
|
@each $color in black, white {
|
|
265
394
|
@each $opacity in 10, 20, 30, 40 {
|
|
@@ -281,6 +410,8 @@ $cardDensity: (
|
|
|
281
410
|
color: tokens.$bm-comp-card-color-body;
|
|
282
411
|
font: tokens.$bm-comp-card-typo-body;
|
|
283
412
|
gap: tokens.$bm-sem-space-100;
|
|
413
|
+
position: relative;
|
|
414
|
+
z-index: 2;
|
|
284
415
|
}
|
|
285
416
|
|
|
286
417
|
// Card.Footer
|
|
@@ -288,6 +419,8 @@ $cardDensity: (
|
|
|
288
419
|
display: flex;
|
|
289
420
|
gap: tokens.$bm-sem-space-50;
|
|
290
421
|
flex-direction: column;
|
|
422
|
+
position: relative;
|
|
423
|
+
z-index: 2;
|
|
291
424
|
|
|
292
425
|
&__actions {
|
|
293
426
|
display: flex;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '../utils/mixins.scss' as mixins;
|
|
4
4
|
@use '../utils/tokens.scss' as tokens;
|
|
5
5
|
@use '../utils/cursors.scss' as cursors;
|
|
6
|
+
@use '../utils/inputChoiceMixins.scss' as choiceMixins;
|
|
6
7
|
|
|
7
8
|
@import '@viasat/beam-tokens/components/Input';
|
|
8
9
|
|
|
@@ -33,8 +34,6 @@ $checkboxStates: (
|
|
|
33
34
|
),
|
|
34
35
|
);
|
|
35
36
|
|
|
36
|
-
$check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.178 7.363.808 4.697 0 5.598l3.178 3.573L10 1.501 9.198.6l-6.02 6.763Z' fill='%23fff'/%3E%3C/svg%3E");
|
|
37
|
-
|
|
38
37
|
.#{$checkboxBaseClass} {
|
|
39
38
|
display: inline-flex;
|
|
40
39
|
@include cursors.applyChoiceCursors();
|
|
@@ -75,37 +74,16 @@ $check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' v
|
|
|
75
74
|
position: relative;
|
|
76
75
|
margin: tokens.$bm-sem-space-0;
|
|
77
76
|
flex-shrink: tokens.$bm-sem-space-0;
|
|
78
|
-
width: tokens.$bm-comp-input-size-choice-checkbox;
|
|
79
|
-
height: tokens.$bm-comp-input-size-choice-checkbox;
|
|
80
|
-
background-color: tokens.$bm-comp-input-color-bg;
|
|
81
77
|
cursor: var(#{$inputChoiceCursor}, pointer);
|
|
82
78
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
border-style: solid;
|
|
86
|
-
border-color: tokens.$bm-comp-input-color-border;
|
|
87
|
-
border-radius: tokens.$bm-comp-input-radius-choice-checkbox;
|
|
88
|
-
border-width: tokens.$bm-comp-input-border-width-field-default;
|
|
79
|
+
@include choiceMixins.choice-checkbox-base();
|
|
89
80
|
|
|
90
81
|
&:focus-visible {
|
|
91
82
|
@include mixins.simulated-inset-outline();
|
|
92
83
|
}
|
|
93
84
|
|
|
94
85
|
&:checked {
|
|
95
|
-
|
|
96
|
-
border-color: tokens.$bm-comp-input-color-choice-checkbox-selected-border;
|
|
97
|
-
|
|
98
|
-
&::after {
|
|
99
|
-
@include mixins.svg-icon($check-mask);
|
|
100
|
-
content: '';
|
|
101
|
-
background-color: tokens.$bm-comp-input-color-choice-checkbox-selected-icon;
|
|
102
|
-
position: absolute;
|
|
103
|
-
top: 50%;
|
|
104
|
-
left: 50%;
|
|
105
|
-
transform: translate(-50%, -50%);
|
|
106
|
-
width: calc(#{tokens.$bm-comp-input-size-choice-checkbox} * 5 / 8);
|
|
107
|
-
height: calc(#{tokens.$bm-comp-input-size-choice-checkbox} * 5 / 8);
|
|
108
|
-
}
|
|
86
|
+
@include choiceMixins.choice-checkbox-checked();
|
|
109
87
|
}
|
|
110
88
|
}
|
|
111
89
|
|
package/components/index.scss
CHANGED
|
@@ -2,39 +2,56 @@
|
|
|
2
2
|
@use './accordion.module.scss';
|
|
3
3
|
@use './actionList.module.scss';
|
|
4
4
|
@use './alert.module.scss';
|
|
5
|
+
@use './aspectRatio.module.scss';
|
|
6
|
+
@use './avatar.module.scss';
|
|
5
7
|
@use './badge.module.scss';
|
|
6
8
|
@use './badgeDot.module.scss';
|
|
7
9
|
@use './box.module.scss';
|
|
8
|
-
@use './
|
|
9
|
-
@use './
|
|
10
|
+
@use './breadcrumbs.module.scss';
|
|
11
|
+
@use './button.module.scss';
|
|
12
|
+
@use './card.module.scss';
|
|
10
13
|
@use './checkbox.module.scss';
|
|
11
14
|
@use './chip.module.scss';
|
|
12
|
-
@use './chipsGroup.module';
|
|
15
|
+
@use './chipsGroup.module.scss';
|
|
13
16
|
@use './closeButton.module.scss';
|
|
17
|
+
@use './combobox.module.scss';
|
|
14
18
|
@use './dialog.module.scss';
|
|
15
19
|
@use './divider.module.scss';
|
|
16
20
|
@use './emptyState.module.scss';
|
|
17
21
|
@use './fileUpload.module.scss';
|
|
18
22
|
@use './flag.module.scss';
|
|
23
|
+
@use './floatingui.module.scss';
|
|
24
|
+
@use './header.module.scss';
|
|
19
25
|
@use './helperText.module.scss';
|
|
20
|
-
@use './
|
|
26
|
+
@use './icon.module.scss';
|
|
27
|
+
@use './inputChoiceGroup.module.scss';
|
|
21
28
|
@use './label.module.scss';
|
|
22
29
|
@use './link.module.scss';
|
|
30
|
+
@use './list.module.scss';
|
|
23
31
|
@use './logo.module.scss';
|
|
32
|
+
@use './menu.module.scss';
|
|
33
|
+
@use './nativeSelect.module.scss';
|
|
34
|
+
@use './navigation.module.scss';
|
|
35
|
+
@use './pageHeader.module.scss';
|
|
24
36
|
@use './pageLayout.module.scss';
|
|
37
|
+
@use './pagination.module.scss';
|
|
25
38
|
@use './popover.module.scss';
|
|
26
|
-
@use './progressBar.module';
|
|
39
|
+
@use './progressBar.module.scss';
|
|
27
40
|
@use './radioButton.module.scss';
|
|
28
|
-
@use './
|
|
29
|
-
@use './
|
|
41
|
+
@use './search.module.scss';
|
|
42
|
+
@use './segmentedControl.module.scss';
|
|
30
43
|
@use './sideNav.module.scss';
|
|
44
|
+
@use './slider.module.scss';
|
|
45
|
+
@use './spinner.module.scss';
|
|
46
|
+
@use './stepper.module.scss';
|
|
31
47
|
@use './switch.module.scss';
|
|
48
|
+
@use './tabs.module.scss';
|
|
32
49
|
@use './text.module.scss';
|
|
50
|
+
@use './textArea.module.scss';
|
|
33
51
|
@use './textField.module.scss';
|
|
34
52
|
@use './toast.module.scss';
|
|
35
53
|
@use './toastContainer.module.scss';
|
|
36
54
|
@use './tooltip.module.scss';
|
|
37
|
-
@use './tabs.module';
|
|
38
55
|
|
|
39
56
|
// State Layer Styles
|
|
40
57
|
@use '../utils/stateLayer.module.scss';
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../utils/constants.scss';
|
|
3
|
+
@use '../utils/mixins.scss' as mixins;
|
|
4
|
+
@use '../utils/tokens.scss' as tokens;
|
|
5
|
+
|
|
6
|
+
@import '@viasat/beam-tokens/components/Panel';
|
|
7
|
+
|
|
8
|
+
$panelBaseClass: '#{constants.$prefix}panel';
|
|
9
|
+
|
|
10
|
+
.#{$panelBaseClass} {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
|
|
14
|
+
width: 20rem; // TO DO: Temporary fixed width, to be mapped to spec props later
|
|
15
|
+
|
|
16
|
+
background-color: tokens.$bm-sem-color-surface-01;
|
|
17
|
+
|
|
18
|
+
&--inline {
|
|
19
|
+
position: relative;
|
|
20
|
+
height: 100%;
|
|
21
|
+
box-shadow: tokens.$bm-sem-shadow-none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--overlay {
|
|
25
|
+
position: fixed;
|
|
26
|
+
box-shadow: tokens.$bm-comp-panel-shadow;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--size-full {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--position-bottom {
|
|
34
|
+
height: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--padding-sm {
|
|
38
|
+
.#{$panelBaseClass}__header {
|
|
39
|
+
padding-left: tokens.$bm-comp-panel-space-x-sm;
|
|
40
|
+
padding-right: tokens.$bm-comp-panel-space-x-sm;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.#{$panelBaseClass}__body {
|
|
44
|
+
padding-left: tokens.$bm-comp-panel-space-x-sm;
|
|
45
|
+
padding-right: tokens.$bm-comp-panel-space-x-sm;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$panelBaseClass}__footer {
|
|
49
|
+
padding-left: tokens.$bm-comp-panel-space-x-sm;
|
|
50
|
+
padding-right: tokens.$bm-comp-panel-space-x-sm;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--padding-md {
|
|
55
|
+
.#{$panelBaseClass}__header {
|
|
56
|
+
padding-left: tokens.$bm-comp-panel-space-x-md;
|
|
57
|
+
padding-right: tokens.$bm-comp-panel-space-x-md;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.#{$panelBaseClass}__body {
|
|
61
|
+
padding-left: tokens.$bm-comp-panel-space-x-md;
|
|
62
|
+
padding-right: tokens.$bm-comp-panel-space-x-md;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.#{$panelBaseClass}__footer {
|
|
66
|
+
padding-left: tokens.$bm-comp-panel-space-x-md;
|
|
67
|
+
padding-right: tokens.$bm-comp-panel-space-x-md;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__header {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
gap: tokens.$bm-comp-panel-space-header-gap-y;
|
|
75
|
+
|
|
76
|
+
padding-top: tokens.$bm-comp-panel-space-header-pad-top;
|
|
77
|
+
padding-bottom: tokens.$bm-comp-panel-space-header-pad-bottom;
|
|
78
|
+
|
|
79
|
+
&__row {
|
|
80
|
+
display: flex;
|
|
81
|
+
gap: tokens.$bm-comp-panel-space-header-gap-x;
|
|
82
|
+
align-items: flex-start;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&__content-before {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
gap: tokens.$bm-comp-panel-space-header-gap-x;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__content-after {
|
|
92
|
+
display: flex;
|
|
93
|
+
gap: tokens.$bm-comp-panel-space-header-gap-x;
|
|
94
|
+
align-items: flex-start;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&__heading {
|
|
98
|
+
flex: 1;
|
|
99
|
+
|
|
100
|
+
font: tokens.$bm-comp-panel-typo-heading;
|
|
101
|
+
color: tokens.$bm-comp-panel-color-heading;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&__description {
|
|
105
|
+
color: tokens.$bm-comp-panel-color-description;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&__close-button {
|
|
109
|
+
width: tokens.$bm-sem-size-icon-lg;
|
|
110
|
+
height: tokens.$bm-sem-size-icon-lg;
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&__body {
|
|
118
|
+
flex: 1;
|
|
119
|
+
overflow: auto;
|
|
120
|
+
|
|
121
|
+
font: tokens.$bm-comp-panel-typo-description;
|
|
122
|
+
color: tokens.$bm-comp-panel-color-description;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&__footer {
|
|
126
|
+
display: flex;
|
|
127
|
+
gap: tokens.$bm-comp-panel-space-footer-gap-actions;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
padding-top: tokens.$bm-comp-panel-space-footer-pad-top;
|
|
130
|
+
padding-bottom: tokens.$bm-comp-panel-space-footer-pad-bottom;
|
|
131
|
+
|
|
132
|
+
&__actions {
|
|
133
|
+
display: flex;
|
|
134
|
+
gap: tokens.$bm-comp-panel-space-footer-gap-actions;
|
|
135
|
+
flex-shrink: 0;
|
|
136
|
+
flex-wrap: wrap;
|
|
137
|
+
align-items: center;
|
|
138
|
+
align-content: center;
|
|
139
|
+
|
|
140
|
+
&--start {
|
|
141
|
+
justify-content: flex-start;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&--end {
|
|
145
|
+
justify-content: flex-end;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&--spaceBetween {
|
|
149
|
+
justify-content: space-between;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&--stacked {
|
|
153
|
+
justify-content: center;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
gap: tokens.$bm-comp-panel-space-footer-gap-actions-stack;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '../utils/mixins.scss' as mixins;
|
|
4
4
|
@use '../utils/tokens.scss' as tokens;
|
|
5
5
|
@use '../utils/cursors.scss' as cursors;
|
|
6
|
+
@use '../utils/inputChoiceMixins.scss' as choiceMixins;
|
|
6
7
|
|
|
7
8
|
@import '@viasat/beam-tokens/components/Input';
|
|
8
9
|
|
|
@@ -80,36 +81,14 @@ $radioButtonStates: (
|
|
|
80
81
|
margin: tokens.$bm-sem-space-0;
|
|
81
82
|
flex-shrink: tokens.$bm-sem-space-0;
|
|
82
83
|
cursor: var(#{$inputChoiceCursor}, pointer);
|
|
83
|
-
|
|
84
|
-
height: tokens.$bm-comp-input-size-choice-radio;
|
|
85
|
-
background-color: tokens.$bm-comp-input-color-bg;
|
|
86
|
-
|
|
87
|
-
border-style: solid;
|
|
88
|
-
border-color: tokens.$bm-comp-input-color-border;
|
|
89
|
-
border-radius: tokens.$bm-comp-input-radius-choice-radio;
|
|
90
|
-
border-width: tokens.$bm-comp-input-border-width-field-default;
|
|
84
|
+
@include choiceMixins.choice-radio-base();
|
|
91
85
|
|
|
92
86
|
&:focus-visible {
|
|
93
87
|
@include mixins.simulated-inset-outline();
|
|
94
88
|
}
|
|
95
89
|
|
|
96
90
|
&:checked {
|
|
97
|
-
|
|
98
|
-
background-color: tokens.$bm-comp-input-color-choice-radio-selected-bg;
|
|
99
|
-
|
|
100
|
-
&:after {
|
|
101
|
-
background-color: tokens.$bm-comp-input-color-choice-radio-selected-inner-circle;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&:after {
|
|
106
|
-
content: '';
|
|
107
|
-
position: absolute;
|
|
108
|
-
width: tokens.$bm-comp-input-size-choice-radio-inside;
|
|
109
|
-
height: tokens.$bm-comp-input-size-choice-radio-inside;
|
|
110
|
-
border-radius: tokens.$bm-comp-input-radius-choice-radio;
|
|
111
|
-
top: calc(50% - #{tokens.$bm-comp-input-size-choice-radio-inside} / 2);
|
|
112
|
-
left: calc(50% - #{tokens.$bm-comp-input-size-choice-radio-inside} / 2);
|
|
91
|
+
@include choiceMixins.choice-radio-checked();
|
|
113
92
|
}
|
|
114
93
|
}
|
|
115
94
|
}
|