@viasat/beam-styles 2.0.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.
Files changed (76) hide show
  1. package/README.md +150 -0
  2. package/all.scss +3 -0
  3. package/components/accordion.module.scss +166 -0
  4. package/components/accordion.vars.scss +3 -0
  5. package/components/actionList.module.scss +211 -0
  6. package/components/actionList.vars.scss +6 -0
  7. package/components/alert.module.scss +158 -0
  8. package/components/aspectRatio.module.scss +21 -0
  9. package/components/avatar.module.scss +204 -0
  10. package/components/badge.module.scss +166 -0
  11. package/components/badgeDot.module.scss +90 -0
  12. package/components/box.module.scss +127 -0
  13. package/components/breadcrumbs.module.scss +149 -0
  14. package/components/button.module.scss +179 -0
  15. package/components/button.vars.scss +129 -0
  16. package/components/card.module.scss +232 -0
  17. package/components/checkbox.module.scss +123 -0
  18. package/components/chip.module.scss +173 -0
  19. package/components/chipsGroup.module.scss +13 -0
  20. package/components/closeButton.module.scss +52 -0
  21. package/components/combobox.module.scss +243 -0
  22. package/components/dialog.module.scss +199 -0
  23. package/components/divider.module.scss +255 -0
  24. package/components/emptyState.module.scss +61 -0
  25. package/components/fileUpload.module.scss +282 -0
  26. package/components/flag.module.scss +11 -0
  27. package/components/floatingui.module.scss +40 -0
  28. package/components/header.module.scss +123 -0
  29. package/components/helperText.module.scss +86 -0
  30. package/components/icon.module.scss +46 -0
  31. package/components/icon.vars.scss +31 -0
  32. package/components/index.scss +40 -0
  33. package/components/inputChoiceGroup.module.scss +46 -0
  34. package/components/label.module.scss +67 -0
  35. package/components/link.module.scss +118 -0
  36. package/components/list.module.scss +204 -0
  37. package/components/logo.module.scss +11 -0
  38. package/components/menu.module.scss +13 -0
  39. package/components/nativeSelect.module.scss +139 -0
  40. package/components/navigation.module.scss +156 -0
  41. package/components/pageHeader.module.scss +93 -0
  42. package/components/pageLayout.module.scss +38 -0
  43. package/components/pagination.module.scss +71 -0
  44. package/components/popover.module.scss +71 -0
  45. package/components/progressBar.module.scss +107 -0
  46. package/components/radioButton.module.scss +115 -0
  47. package/components/segmentedControl.module.scss +212 -0
  48. package/components/sideNav.module.scss +355 -0
  49. package/components/slider.module.scss +240 -0
  50. package/components/spinner.module.scss +261 -0
  51. package/components/spinner.vars.scss +85 -0
  52. package/components/stepper.module.scss +255 -0
  53. package/components/switch.module.scss +194 -0
  54. package/components/tabs.module.scss +412 -0
  55. package/components/text.module.scss +112 -0
  56. package/components/textArea.module.scss +183 -0
  57. package/components/textField.module.scss +162 -0
  58. package/components/toast.module.scss +235 -0
  59. package/components/toastContainer.module.scss +68 -0
  60. package/components/tooltip.module.scss +112 -0
  61. package/package.json +47 -0
  62. package/styles.css +11719 -0
  63. package/styles.css.map +1 -0
  64. package/styles.min.css +20 -0
  65. package/styles.min.css.map +1 -0
  66. package/utils/animation.scss +13 -0
  67. package/utils/constants.scss +1 -0
  68. package/utils/cursors.scss +35 -0
  69. package/utils/globals.scss +17 -0
  70. package/utils/helpers.scss +14 -0
  71. package/utils/index.scss +10 -0
  72. package/utils/mixins.scss +93 -0
  73. package/utils/spacing.scss +82 -0
  74. package/utils/stateLayer.module.scss +55 -0
  75. package/utils/stateLayerVars.scss +75 -0
  76. package/utils/tokens.scss +14 -0
@@ -0,0 +1,194 @@
1
+ @use 'sass:map';
2
+ @use '../utils/constants.scss';
3
+ @use '../utils/mixins.scss' as mixins;
4
+ @use '../utils/tokens.scss' as tokens;
5
+ @use '../utils/animation.scss' as animation;
6
+ @use '../utils/cursors.scss' as cursors;
7
+
8
+ @import '../../../../tokens/src/lib/components/Input';
9
+
10
+ $switchClassBase: '#{constants.$prefix}switch';
11
+ $inputChoiceCursor: '--#{constants.$prefix}input-choice-cursor';
12
+ $inputChoiceLabelCursor: '--#{constants.$prefix}input-choice-label-cursor';
13
+ $inputChoiceLabelPointerEvents: '--#{constants.$prefix}input-choice-label-pointer-events';
14
+ $knobOffset: 0.1875rem;
15
+ $svgOffset: 0.3125rem;
16
+
17
+ $switchStates: (
18
+ read-only: (
19
+ backgroundColor: tokens.$bm-comp-input-color-bg-disabled,
20
+ knobColor: tokens.$bm-comp-input-color-icon,
21
+ svgColor: tokens.$bm-comp-input-color-icon,
22
+ borderColor: tokens.$bm-comp-input-color-border-disabled,
23
+ labelColor: tokens.$bm-comp-input-color-text,
24
+ ),
25
+ disabled: (
26
+ backgroundColor: tokens.$bm-comp-input-color-bg-disabled,
27
+ knobColor: tokens.$bm-comp-input-color-icon-disabled,
28
+ svgColor: tokens.$bm-comp-input-color-icon-disabled,
29
+ borderColor: tokens.$bm-comp-input-color-border-disabled,
30
+ labelColor: tokens.$bm-comp-input-color-text-disabled,
31
+ ),
32
+ );
33
+
34
+ .#{$switchClassBase} {
35
+ @include cursors.applyChoiceCursors();
36
+
37
+ &__label {
38
+ display: flex;
39
+ position: relative;
40
+ width: fit-content;
41
+ align-items: start;
42
+ gap: tokens.$bm-comp-input-space-choice-gap-inside;
43
+ min-width: tokens.$bm-comp-input-size-choice-switch-width;
44
+ min-height: tokens.$bm-comp-input-size-choice-switch-height;
45
+ font: tokens.$bm-comp-input-typo-default;
46
+ color: tokens.$bm-comp-input-color-text;
47
+ cursor: var(#{$inputChoiceLabelCursor}, pointer);
48
+ pointer-events: var(#{$inputChoiceLabelPointerEvents}, auto);
49
+ }
50
+
51
+ input {
52
+ // hide default checkbox
53
+ appearance: none;
54
+ --webkit-appearance: none;
55
+ --moz-appearance: none;
56
+
57
+ position: relative;
58
+ display: inline-block;
59
+ flex-shrink: 0;
60
+ width: tokens.$bm-comp-input-size-choice-switch-width;
61
+ height: tokens.$bm-comp-input-size-choice-switch-height;
62
+ margin: tokens.$bm-sem-space-0;
63
+ cursor: var(#{$inputChoiceCursor}, pointer);
64
+
65
+ & + .#{$switchClassBase}__switchBackground {
66
+ position: absolute;
67
+ box-sizing: border-box;
68
+ width: tokens.$bm-comp-input-size-choice-switch-width;
69
+ height: tokens.$bm-comp-input-size-choice-switch-height;
70
+ border: tokens.$bm-comp-input-border-width-choice solid
71
+ tokens.$bm-comp-input-color-border;
72
+ border-radius: tokens.$bm-comp-input-radius-choice-switch;
73
+ background-color: tokens.$bm-comp-input-color-bg;
74
+ transition: background-color animation.duration('medium') ease-in-out,
75
+ box-shadow animation.duration('medium') ease-in;
76
+
77
+ &:before,
78
+ &:after {
79
+ content: '';
80
+ position: absolute;
81
+ height: tokens.$bm-sem-size-icon-xs;
82
+ width: tokens.$bm-sem-size-icon-xs;
83
+ top: 50%;
84
+ transform: translateY(-50%);
85
+ }
86
+
87
+ &:before {
88
+ display: none;
89
+ mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 16.1698L4.83 11.9998L3.41 13.4098L9 18.9998L21 6.99984L19.59 5.58984L9 16.1698Z' fill='currentColor'/%3E%3C/svg%3E");
90
+ left: $svgOffset;
91
+ background-color: tokens.$bm-comp-input-color-icon;
92
+ }
93
+
94
+ &:after {
95
+ display: block;
96
+ mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z' fill='currentColor'/%3E%3C/svg%3E");
97
+ right: $svgOffset;
98
+ background-color: tokens.$bm-comp-input-color-icon;
99
+ }
100
+ }
101
+
102
+ // switch knob
103
+ &:after {
104
+ // TODO: make sure this doesn't brake layouts
105
+ z-index: 1;
106
+ position: absolute;
107
+ box-sizing: border-box;
108
+ content: '';
109
+ width: tokens.$bm-comp-input-size-choice-switch-knob;
110
+ height: tokens.$bm-comp-input-size-choice-switch-knob;
111
+ top: 50%;
112
+ transform: translateX(0) translateY(-50%);
113
+ left: $knobOffset;
114
+ background-color: tokens.$bm-comp-input-color-icon;
115
+ border-radius: tokens.$bm-sem-radius-round;
116
+ transition: left animation.duration('medium') ease-in-out;
117
+ }
118
+
119
+ &:checked {
120
+ & + .#{$switchClassBase}__switchBackground {
121
+ background-color: tokens.$bm-comp-input-color-choice-switch-selected-bg;
122
+ border-color: tokens.$bm-comp-input-color-choice-switch-selected-border;
123
+
124
+ &:before {
125
+ display: block;
126
+ background-color: tokens.$bm-comp-input-color-choice-switch-selected-icon;
127
+ }
128
+
129
+ &:after {
130
+ display: none;
131
+ background-color: tokens.$bm-comp-input-color-choice-switch-selected-bg;
132
+ }
133
+ }
134
+
135
+ &:after {
136
+ background-color: tokens.$bm-comp-input-color-choice-switch-selected-icon;
137
+ left: calc(
138
+ tokens.$bm-comp-input-size-choice-switch-width -
139
+ ($knobOffset + tokens.$bm-comp-input-size-choice-switch-knob)
140
+ );
141
+ }
142
+ }
143
+
144
+ &:focus-visible {
145
+ outline: none;
146
+
147
+ & + .#{$switchClassBase}__switchBackground {
148
+ @include mixins.simulated-inset-outline(
149
+ tokens.$bm-sem-border-width-focus,
150
+ solid,
151
+ tokens.$bm-sem-color-border-focus,
152
+ tokens.$bm-sem-size-focus-offset
153
+ );
154
+ }
155
+ }
156
+ }
157
+
158
+ @each $state, $values in $switchStates {
159
+ &--#{$state} &__label {
160
+ span {
161
+ color: map.get($values, labelColor);
162
+ }
163
+ }
164
+
165
+ &--#{$state} input:#{$state} {
166
+ & + .#{$switchClassBase}__switchBackground {
167
+ background-color: map.get($values, backgroundColor);
168
+ border-color: map.get($values, borderColor);
169
+
170
+ &:after,
171
+ &:before {
172
+ background-color: map.get($values, svgColor);
173
+ }
174
+ }
175
+
176
+ &:after {
177
+ background-color: map.get($values, knobColor);
178
+ }
179
+ }
180
+ }
181
+
182
+ // Text Position
183
+ &--before {
184
+ .#{$switchClassBase}__label {
185
+ flex-direction: row-reverse;
186
+ }
187
+ }
188
+
189
+ &--after {
190
+ .#{$switchClassBase}__label {
191
+ flex-direction: row;
192
+ }
193
+ }
194
+ }
@@ -0,0 +1,412 @@
1
+ @use 'sass:map';
2
+ @use '../utils/constants.scss';
3
+ @use '../utils/tokens.scss' as tokens;
4
+
5
+ @import '../../../../tokens/src/lib/components/Tabs';
6
+
7
+ $tabsBaseClass: '#{constants.$prefix}tabs';
8
+ $tabsItemBaseClass: '#{$tabsBaseClass}__item';
9
+
10
+ $sizes: (
11
+ 'md': (
12
+ 'height': tokens.$bm-comp-tabs-size-md-item,
13
+ 'font': tokens.$bm-comp-tabs-typo-md,
14
+ 'selected-font': tokens.$bm-comp-tabs-typo-md-selected,
15
+ 'icon': tokens.$bm-comp-tabs-size-md-icon,
16
+ 'icon-only': tokens.$bm-comp-tabs-size-md-icon-only,
17
+ 'indicator': tokens.$bm-comp-tabs-size-md-indicator-extent,
18
+ ),
19
+ 'lg': (
20
+ 'height': tokens.$bm-comp-tabs-size-lg-item,
21
+ 'font': tokens.$bm-comp-tabs-typo-lg,
22
+ 'selected-font': tokens.$bm-comp-tabs-typo-lg-selected,
23
+ 'icon': tokens.$bm-comp-tabs-size-lg-icon,
24
+ 'icon-only': tokens.$bm-comp-tabs-size-lg-icon-only,
25
+ 'indicator': tokens.$bm-comp-tabs-size-lg-indicator-extent,
26
+ ),
27
+ );
28
+
29
+ .#{$tabsBaseClass} {
30
+ position: relative;
31
+ width: 100%;
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: tokens.$bm-comp-tabs-space-gap-outer;
35
+ color: tokens.$bm-sem-color-text-primary;
36
+
37
+ &--disabled {
38
+ opacity: tokens.$bm-sem-opacity-disabled;
39
+ cursor: not-allowed;
40
+ }
41
+
42
+ &--vertical {
43
+ flex-direction: row;
44
+ }
45
+
46
+ &__wrapper {
47
+ position: relative;
48
+ display: flex;
49
+ justify-content: center;
50
+
51
+ .#{$tabsBaseClass}--vertical & {
52
+ display: flex;
53
+ flex-direction: row;
54
+ align-items: flex-start;
55
+ justify-content: flex-start;
56
+ gap: tokens.$bm-comp-tabs-space-gap-outer;
57
+ }
58
+ }
59
+
60
+ &__divider {
61
+ inline-size: 100%;
62
+ position: absolute;
63
+ bottom: 0;
64
+ z-index: 1;
65
+
66
+ .#{$tabsBaseClass}--vertical & {
67
+ inline-size: auto;
68
+ block-size: 100%;
69
+ position: absolute;
70
+ inset-block-end: auto;
71
+ inset-block-start: 0;
72
+ inset-inline-start: 0;
73
+ z-index: 1;
74
+ }
75
+ }
76
+ }
77
+
78
+ .#{$tabsBaseClass}__group {
79
+ position: relative;
80
+ display: flex;
81
+ flex-direction: row;
82
+ justify-content: center;
83
+ align-items: center;
84
+ width: 100%;
85
+ outline: none;
86
+ z-index: 2;
87
+ background: inherit;
88
+
89
+ &--vertical {
90
+ flex-direction: column;
91
+ align-items: flex-start;
92
+ width: auto;
93
+ }
94
+
95
+ &__content {
96
+ position: relative;
97
+ display: flex;
98
+ flex-direction: row;
99
+ justify-content: flex-start;
100
+ align-items: center;
101
+ overflow-x: auto;
102
+ scrollbar-width: none;
103
+ -ms-overflow-style: none;
104
+ width: 100%;
105
+ gap: tokens.$bm-comp-tabs-space-gap-outer;
106
+
107
+ &--scrollable {
108
+ --gradient-angle: 90deg;
109
+
110
+ @at-root [dir='rtl'] & {
111
+ --gradient-angle: 270deg;
112
+ }
113
+
114
+ &:not(.#{$tabsBaseClass}__group__content--at-start):not(
115
+ .#{$tabsBaseClass}__group__content--at-end
116
+ ) {
117
+ -webkit-mask-image: linear-gradient(
118
+ var(--gradient-angle),
119
+ transparent 0%,
120
+ #fff 25%,
121
+ #fff 75%,
122
+ transparent 100%
123
+ );
124
+ mask-image: linear-gradient(
125
+ var(--gradient-angle),
126
+ transparent 0%,
127
+ #fff 25%,
128
+ #fff 75%,
129
+ transparent 100%
130
+ );
131
+ }
132
+
133
+ &.#{$tabsBaseClass}__group__content--at-start:not(
134
+ .#{$tabsBaseClass}__group__content--at-end
135
+ ) {
136
+ -webkit-mask-image: linear-gradient(
137
+ var(--gradient-angle),
138
+ #fff 0%,
139
+ #fff 75%,
140
+ transparent 100%
141
+ );
142
+ mask-image: linear-gradient(
143
+ var(--gradient-angle),
144
+ #fff 0%,
145
+ #fff 75%,
146
+ transparent 100%
147
+ );
148
+ }
149
+
150
+ &.#{$tabsBaseClass}__group__content--at-end:not(
151
+ .#{$tabsBaseClass}__group__content--at-start
152
+ ) {
153
+ -webkit-mask-image: linear-gradient(
154
+ var(--gradient-angle),
155
+ transparent 0%,
156
+ #fff 25%,
157
+ #fff 100%
158
+ );
159
+ mask-image: linear-gradient(
160
+ var(--gradient-angle),
161
+ transparent 0%,
162
+ #fff 25%,
163
+ #fff 100%
164
+ );
165
+ }
166
+ }
167
+
168
+ &::-webkit-scrollbar {
169
+ display: none;
170
+ }
171
+
172
+ .#{$tabsBaseClass}--fluid & {
173
+ gap: tokens.$bm-sem-space-50;
174
+ }
175
+
176
+ .#{$tabsBaseClass}--vertical & {
177
+ flex-direction: column;
178
+ align-items: stretch;
179
+ overflow-y: auto;
180
+ overflow-x: hidden;
181
+ width: auto;
182
+ padding-inline: 0;
183
+ gap: 0;
184
+ }
185
+ }
186
+
187
+ &__scroll-container {
188
+ position: absolute;
189
+ inset-block-start: 0;
190
+ inset-block-end: 2px;
191
+ justify-content: space-between;
192
+ width: inherit;
193
+ z-index: 5;
194
+ display: flex;
195
+ align-items: center;
196
+ pointer-events: none;
197
+
198
+ &--left {
199
+ inset-inline-start: 0;
200
+ justify-content: flex-start;
201
+ }
202
+
203
+ &--right {
204
+ inset-inline-end: 0;
205
+ justify-content: flex-end;
206
+ }
207
+ }
208
+
209
+ &__scroll-button {
210
+ position: relative;
211
+ display: flex;
212
+ align-items: center;
213
+ justify-content: center;
214
+ border: none;
215
+ cursor: pointer;
216
+ opacity: 0;
217
+ pointer-events: none;
218
+ transition: opacity 0.2s ease;
219
+ z-index: 6;
220
+
221
+ &--visible {
222
+ opacity: 1;
223
+ pointer-events: auto;
224
+ }
225
+ }
226
+ }
227
+
228
+ .#{$tabsItemBaseClass} {
229
+ position: relative;
230
+ display: flex;
231
+ align-items: center;
232
+ justify-content: center;
233
+ cursor: pointer;
234
+ flex-shrink: 0;
235
+ gap: tokens.$bm-comp-tabs-space-gap;
236
+ outline: none;
237
+ color: tokens.$bm-comp-tabs-color-text;
238
+
239
+ &--disabled {
240
+ opacity: tokens.$bm-sem-opacity-disabled;
241
+ cursor: not-allowed;
242
+ }
243
+
244
+ &--fluid {
245
+ flex: 1;
246
+ min-width: 0;
247
+ width: 100%;
248
+ }
249
+
250
+ &--vertical:not(.#{$tabsItemBaseClass}--icon-only) {
251
+ padding-inline: tokens.$bm-comp-tabs-space-x;
252
+ justify-content: flex-start;
253
+ }
254
+
255
+ &__content {
256
+ display: flex;
257
+ align-items: center;
258
+ justify-content: center;
259
+ width: 100%;
260
+ min-width: 0;
261
+ flex-basis: content;
262
+ padding-inline: tokens.$bm-sem-border-width-focus;
263
+ }
264
+
265
+ &__input {
266
+ display: none;
267
+ }
268
+
269
+ &__label {
270
+ display: flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ gap: tokens.$bm-comp-btn-space-gap;
274
+ cursor: inherit;
275
+ min-width: 0;
276
+ width: 100%;
277
+ max-width: 100%;
278
+ }
279
+
280
+ &__indicator {
281
+ display: hidden;
282
+ position: absolute;
283
+ inset-block-end: 0;
284
+ height: tokens.$bm-comp-tabs-size-indicator;
285
+ width: 100%;
286
+ border-start-start-radius: tokens.$bm-comp-tabs-radius-indicator;
287
+ border-start-end-radius: tokens.$bm-comp-tabs-radius-indicator;
288
+ border-end-start-radius: 0;
289
+ border-end-end-radius: 0;
290
+ z-index: 3;
291
+
292
+ .#{$tabsBaseClass}--vertical & {
293
+ inset-inline-start: 0;
294
+ inset-block-start: 50%;
295
+ transform: translateY(-50%);
296
+
297
+ inset-block-end: auto;
298
+ width: tokens.$bm-comp-tabs-size-indicator;
299
+ border-start-start-radius: 0;
300
+ border-start-end-radius: tokens.$bm-comp-tabs-radius-indicator;
301
+ border-end-start-radius: 0;
302
+ border-end-end-radius: tokens.$bm-comp-tabs-radius-indicator;
303
+ }
304
+ }
305
+
306
+ &:hover {
307
+ &:not(.#{$tabsItemBaseClass}--selected):not(.#{$tabsItemBaseClass}--disabled) {
308
+ .#{$tabsItemBaseClass}__indicator {
309
+ display: block;
310
+ background: tokens.$bm-comp-tabs-color-indicator;
311
+ }
312
+ }
313
+ }
314
+
315
+ &__icon {
316
+ color: tokens.$bm-comp-tabs-color-icon;
317
+ }
318
+
319
+ &--selected {
320
+ .#{$tabsItemBaseClass}__indicator {
321
+ display: block;
322
+ background: tokens.$bm-comp-tabs-color-indicator-selected;
323
+ }
324
+ .#{$tabsItemBaseClass}__icon {
325
+ color: tokens.$bm-comp-tabs-color-icon-selected;
326
+ }
327
+ }
328
+
329
+ @each $size, $value in $sizes {
330
+ &--#{$size} {
331
+ height: map.get($value, 'height');
332
+ font: map.get($value, 'font');
333
+
334
+ &.#{$tabsItemBaseClass}--selected {
335
+ font: map.get($value, 'selected-font');
336
+ color: tokens.$bm-comp-tabs-color-text-selected;
337
+ }
338
+
339
+ .#{$tabsItemBaseClass}__icon {
340
+ width: map.get($value, 'icon');
341
+ height: map.get($value, 'icon');
342
+ }
343
+
344
+ &.#{$tabsItemBaseClass}--icon-only {
345
+ height: map.get($value, 'height');
346
+ width: map.get($value, 'height');
347
+
348
+ .#{$tabsItemBaseClass}__icon {
349
+ width: map.get($value, 'icon-only');
350
+ height: map.get($value, 'icon-only');
351
+ }
352
+
353
+ .#{$tabsItemBaseClass}__indicator {
354
+ width: map.get($value, 'indicator');
355
+ }
356
+ }
357
+
358
+ .#{$tabsBaseClass}--vertical & {
359
+ .#{$tabsItemBaseClass}__indicator {
360
+ height: map.get($value, 'indicator');
361
+ width: tokens.$bm-comp-tabs-size-indicator;
362
+ }
363
+ }
364
+ }
365
+ }
366
+
367
+ &:focus {
368
+ outline: none;
369
+ }
370
+
371
+ // Only show outline when using keyboard navigation
372
+ &:focus-visible:not(:active) {
373
+ .#{$tabsItemBaseClass}__label {
374
+ outline: tokens.$bm-sem-border-width-focus solid
375
+ tokens.$bm-sem-color-border-focus;
376
+ border-radius: tokens.$bm-sem-radius-focus-sm;
377
+ z-index: 1;
378
+ }
379
+ }
380
+
381
+ &__controlText {
382
+ text-overflow: ellipsis;
383
+ white-space: nowrap;
384
+ overflow: hidden;
385
+ max-width: 100%;
386
+ word-break: break-word;
387
+ flex: 1;
388
+
389
+ .#{$tabsBaseClass}--vertical & {
390
+ white-space: normal;
391
+ display: -webkit-box;
392
+ -webkit-line-clamp: 2;
393
+ -webkit-box-orient: vertical;
394
+ line-clamp: 2;
395
+ }
396
+ }
397
+ }
398
+
399
+ .#{$tabsBaseClass}__panel {
400
+ display: none;
401
+
402
+ &--selected {
403
+ display: flex;
404
+ align-self: stretch;
405
+ justify-content: center;
406
+ flex-direction: column;
407
+ }
408
+
409
+ .#{$tabsBaseClass}--vertical & {
410
+ flex: 1;
411
+ }
412
+ }
@@ -0,0 +1,112 @@
1
+ @use 'sass:map';
2
+ @use '../utils/constants.scss';
3
+ @use '../utils/tokens.scss' as tokens;
4
+ @use '../../../../tokens/src/lib/typography/typography.classes.css';
5
+
6
+ $textBaseClass: '#{constants.$prefix}text';
7
+
8
+ $colors: (
9
+ 'primary': tokens.$bm-sem-color-text-primary,
10
+ 'secondary': tokens.$bm-sem-color-text-secondary,
11
+ 'positive': tokens.$bm-sem-color-text-positive,
12
+ 'warning': tokens.$bm-sem-color-text-warning,
13
+ 'negative': tokens.$bm-sem-color-text-negative,
14
+ 'infoPrimary': tokens.$bm-sem-color-text-info-primary,
15
+ 'infoSecondary': tokens.$bm-sem-color-text-info-secondary,
16
+ 'selected': tokens.$bm-sem-color-text-selected,
17
+ 'disabled': tokens.$bm-sem-color-text-disabled,
18
+ 'primaryInverse': tokens.$bm-sem-color-text-primary-inverse,
19
+ 'secondaryInverse': tokens.$bm-sem-color-text-secondary-inverse,
20
+ 'expressive': tokens.$bm-expressive-color-fg,
21
+ 'expressiveStronger': tokens.$bm-expressive-color-fg-stronger,
22
+ 'expressiveInverse': tokens.$bm-expressive-color-inverse-fg,
23
+ 'expressiveInverseStronger': tokens.$bm-expressive-color-inverse-fg-stronger,
24
+ );
25
+
26
+ // Weights, we only use body-bold the rest are take care by the kind prop
27
+ $weights: (
28
+ 'heading-regular': tokens.$bm-sem-font-weight-heading,
29
+ 'heading-bold': tokens.$bm-sem-font-weight-heading-alt,
30
+ 'body-regular': tokens.$bm-sem-font-weight-body,
31
+ 'body-bold': tokens.$bm-sem-font-weight-body-bold,
32
+ );
33
+
34
+ .#{$textBaseClass} {
35
+ padding: tokens.$bm-sem-space-0;
36
+ margin: tokens.$bm-sem-space-0;
37
+
38
+ // Word Breaks
39
+ &--normal {
40
+ word-break: normal;
41
+ }
42
+
43
+ &--breakAll {
44
+ word-break: break-all;
45
+ }
46
+
47
+ &--breakWord {
48
+ word-break: break-word;
49
+ }
50
+
51
+ // Text Alignments
52
+ &--start {
53
+ text-align: start;
54
+ }
55
+
56
+ &--center {
57
+ text-align: center;
58
+ }
59
+
60
+ &--end {
61
+ text-align: end;
62
+ }
63
+
64
+ // Booleans
65
+ &--block {
66
+ display: block;
67
+ }
68
+
69
+ &--truncate {
70
+ display: block;
71
+ white-space: nowrap;
72
+ overflow: hidden;
73
+ text-overflow: ellipsis;
74
+
75
+ ::slotted(*) {
76
+ display: block;
77
+ white-space: nowrap;
78
+ overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ }
81
+ }
82
+
83
+ &--italic {
84
+ font-style: italic;
85
+ }
86
+
87
+ &--underline#{&}--strikethrough {
88
+ text-decoration: underline line-through;
89
+ }
90
+
91
+ &--underline {
92
+ text-decoration: underline;
93
+ }
94
+
95
+ &--strikethrough {
96
+ text-decoration: line-through;
97
+ }
98
+
99
+ // Weights
100
+ @each $weightName, $weightValue in $weights {
101
+ &--#{$weightName} {
102
+ font-weight: $weightValue;
103
+ }
104
+ }
105
+
106
+ // Colors
107
+ @each $colorName, $colorValue in $colors {
108
+ &--#{$colorName} {
109
+ color: $colorValue;
110
+ }
111
+ }
112
+ }