@carbon/styles 0.9.0 → 0.11.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.
@@ -37,447 +37,17 @@
37
37
  @include reset;
38
38
  @include type-style('body-short-01');
39
39
 
40
- position: relative;
41
- width: 100%;
42
- height: auto;
43
- color: $text-primary;
44
- @include breakpoint(md) {
45
- min-height: rem(40px);
46
- background: none;
47
- }
48
- }
49
-
50
- .#{$prefix}--tabs--container {
51
- @include breakpoint(md) {
52
- min-height: rem(48px);
53
- }
54
- }
55
-
56
- .#{$prefix}--tabs-trigger {
57
- display: flex;
58
- height: rem(40px);
59
- align-items: center;
60
- justify-content: space-between;
61
- padding: 0 $spacing-09 0 $spacing-05;
62
- border-bottom: 1px solid $border-strong;
63
- background-color: $layer;
64
- color: $text-primary;
65
- cursor: pointer;
66
- outline: 2px solid transparent;
67
-
68
- @include breakpoint(md) {
69
- display: none;
70
- }
71
- }
72
-
73
- .#{$prefix}--tabs-trigger:focus,
74
- .#{$prefix}--tabs-trigger:active {
75
- @include focus-outline('outline');
76
- }
77
-
78
- .#{$prefix}--tabs-trigger svg {
79
- position: absolute;
80
- right: $spacing-05;
81
- fill: $border-inverse;
82
- transition: transform $duration-fast-01 motion(standard, productive);
83
- }
84
-
85
- .#{$prefix}--tabs-trigger--open:focus,
86
- .#{$prefix}--tabs-trigger--open:active {
87
- @include focus-outline('reset');
88
-
89
- transition: outline $duration-fast-01 motion(standard, productive);
90
- }
91
-
92
- .#{$prefix}--tabs-trigger--open {
93
- background: $layer-accent;
94
- }
95
-
96
- .#{$prefix}--tabs-trigger--open svg {
97
- @include rotate(-180deg, $duration-fast-01, 50% 45%);
98
- }
99
-
100
- // There is only a difference in tab color when in mobile/dropdown view
101
- .#{$prefix}--tabs--light.#{$prefix}--tabs-trigger {
102
- background-color: $field-02;
103
- }
104
-
105
- .#{$prefix}--tabs-trigger-text {
106
- overflow: hidden;
107
- padding-top: 2px;
108
- color: $text-primary;
109
- font-weight: 400;
110
- text-decoration: none;
111
- text-overflow: ellipsis;
112
- white-space: nowrap;
113
- }
114
-
115
- .#{$prefix}--tabs-trigger-text:hover {
116
- color: $text-primary;
117
- }
118
-
119
- .#{$prefix}--tabs-trigger-text:focus {
120
- outline: none;
121
- }
122
-
123
- .#{$prefix}--tabs__nav {
124
- @include box-shadow;
125
-
126
- position: absolute;
127
- z-index: z('dropdown');
128
- display: flex;
129
- width: 100%;
130
- max-height: 600px;
131
- flex-direction: column;
132
- padding: 0;
133
- margin: 0;
134
- background: $layer;
135
- list-style: none;
136
- transition: max-height $duration-fast-01 motion(standard, productive);
137
-
138
- @include breakpoint(md) {
139
- z-index: auto;
140
- width: auto;
141
- flex-direction: row;
142
- background: none;
143
- box-shadow: none;
144
- transition: inherit;
145
- }
146
- }
147
-
148
- .#{$prefix}--tabs__nav--hidden {
149
- overflow: hidden;
150
- max-height: 0;
151
- transition: max-height $duration-fast-01 motion(standard, productive);
152
-
153
- @include breakpoint(md) {
154
- display: flex;
155
- max-width: 100%;
156
- max-height: none;
157
- overflow-x: auto;
158
- transition: inherit;
159
- }
160
- }
161
-
162
- //-----------------------------
163
- // Item
164
- //-----------------------------
165
- .#{$prefix}--tabs__nav-item {
166
- @include reset;
167
-
168
- display: flex;
169
- width: 100%;
170
- height: rem(40px);
171
- padding: 0;
172
- background-color: $layer;
173
- cursor: pointer;
174
- transition: background-color $duration-fast-01 motion(standard, productive);
175
-
176
- @include breakpoint(md) {
177
- height: auto;
178
- background: transparent;
179
-
180
- + .#{$prefix}--tabs__nav-item {
181
- margin-left: rem(1px);
182
- }
183
- }
184
- }
185
-
186
- .#{$prefix}--tabs--container .#{$prefix}--tabs__nav-item {
187
- @include breakpoint(md) {
188
- background-color: $layer-accent;
189
-
190
- + .#{$prefix}--tabs__nav-item {
191
- margin-left: 0;
192
- // Draws the border without affecting the inner-content
193
- box-shadow: -1px 0 0 0 $border-strong;
194
- }
195
-
196
- + .#{$prefix}--tabs__nav-item.#{$prefix}--tabs__nav-item--selected,
197
- &.#{$prefix}--tabs__nav-item--selected + .#{$prefix}--tabs__nav-item {
198
- box-shadow: none;
199
- }
200
- }
201
- }
202
-
203
- .#{$prefix}--tabs__nav-item .#{$prefix}--tabs__nav-link {
204
- transition: color $duration-fast-01 motion(standard, productive),
205
- border-bottom-color $duration-fast-01 motion(standard, productive),
206
- outline $duration-fast-01 motion(standard, productive);
207
- }
208
-
209
- //-----------------------------
210
- // Item Hover
211
- //-----------------------------
212
- .#{$prefix}--tabs__nav-item:hover:not(.#{$prefix}--tabs__nav-item--selected) {
213
- @include breakpoint(md) {
214
- background: transparent;
215
- }
216
- }
217
-
218
- .#{$prefix}--tabs__nav-item:hover:not(.#{$prefix}--tabs__nav-item--disabled) {
219
- background-color: $layer-hover;
220
- box-shadow: 0 -1px 0 $layer-hover;
221
-
222
- @include breakpoint(md) {
223
- background-color: transparent;
224
-
225
- + .#{$prefix}--tabs__nav-item {
226
- box-shadow: none;
227
- }
228
- }
229
- }
230
-
231
- .#{$prefix}--tabs--container
232
- .#{$prefix}--tabs__nav-item:hover:not(.#{$prefix}--tabs__nav-item--disabled) {
233
- @include breakpoint(md) {
234
- background-color: $layer-selected-hover;
235
- }
236
- }
237
-
238
- //---------------------------------------------
239
- // Item Disabled
240
- //---------------------------------------------
241
- .#{$prefix}--tabs__nav-item--disabled,
242
- .#{$prefix}--tabs__nav-item--disabled:hover {
243
- cursor: not-allowed;
244
- outline: none;
245
- }
246
-
247
- .#{$prefix}--tabs--container
248
- .#{$prefix}--tabs__nav-item.#{$prefix}--tabs__nav-item--disabled,
249
- .#{$prefix}--tabs--container
250
- .#{$prefix}--tabs__nav-item.#{$prefix}--tabs__nav-item--disabled:hover {
251
- @include breakpoint(md) {
252
- background-color: button.$button-disabled;
253
- }
254
- }
255
-
256
- .#{$prefix}--tabs--container
257
- .#{$prefix}--tabs__nav-item--disabled
258
- .#{$prefix}--tabs__nav-link {
259
- @include breakpoint(md) {
260
- border-bottom: none;
261
- color: $text-on-color-disabled;
262
- }
263
- }
264
-
265
- //-----------------------------
266
- // Item Selected
267
- //-----------------------------
268
- .#{$prefix}--tabs__nav-item--selected:not(.#{$prefix}--tabs__nav-item--disabled) {
269
- display: none;
270
- border: none;
271
- transition: color $duration-fast-01 motion(standard, productive);
272
-
273
- @include breakpoint(md) {
274
- display: flex;
275
- .#{$prefix}--tabs__nav-link,
276
- .#{$prefix}--tabs__nav-link:focus,
277
- .#{$prefix}--tabs__nav-link:active {
278
- @include type-style('productive-heading-01');
279
-
280
- border-bottom: 2px solid $border-interactive;
281
- color: $text-primary;
282
- }
283
- }
284
- }
285
-
286
- .#{$prefix}--tabs--container
287
- .#{$prefix}--tabs__nav-item--selected:not(.#{$prefix}--tabs__nav-item--disabled),
288
- .#{$prefix}--tabs--container
289
- .#{$prefix}--tabs__nav-item--selected:hover:not(.#{$prefix}--tabs__nav-item--disabled) {
290
- @include breakpoint(md) {
291
- background-color: $layer;
292
-
293
- .#{$prefix}--tabs__nav-link {
294
- padding: $spacing-03 $spacing-05;
295
- border-bottom: none;
296
- box-shadow: inset 0 2px 0 0 $border-interactive;
297
- // height - vertical padding
298
- // Draws the border without affecting the inner-content
299
- line-height: calc(#{rem(48px)} - (#{$spacing-03} * 2));
300
- }
301
-
302
- .#{$prefix}--tabs__nav-link:focus,
303
- .#{$prefix}--tabs__nav-link:active {
304
- box-shadow: none;
305
- }
306
- }
307
- }
308
-
309
- //-----------------------------
310
- // Link
311
- //-----------------------------
312
- a.#{$prefix}--tabs__nav-link {
313
- @include focus-outline('reset');
314
-
315
- display: inline-block;
316
- overflow: hidden;
317
- width: calc(100% - 32px);
318
- height: rem(40px);
319
- padding: $spacing-04 0;
320
- border-bottom: 1px solid $border-subtle;
321
- margin: 0 $spacing-05;
322
- color: $text-secondary;
323
- font-weight: 400;
324
- line-height: 1rem;
325
- text-decoration: none;
326
- text-overflow: ellipsis;
327
- transition: border $duration-fast-01 motion(standard, productive),
328
- outline $duration-fast-01 motion(standard, productive);
329
- white-space: nowrap;
330
-
331
- &:focus,
332
- &:active {
333
- @include focus-outline('outline');
334
-
335
- width: 100%;
336
- padding-left: 16px;
337
- margin: 0;
338
- }
339
-
340
- @include breakpoint(md) {
341
- width: rem(160px);
342
- padding: $spacing-04 $spacing-05 $spacing-03;
343
- border-bottom: $tab-underline-color;
344
- margin: 0;
345
- line-height: inherit;
346
-
347
- &:focus,
348
- &:active {
349
- width: rem(160px);
350
- border-bottom: 2px;
351
- }
352
- }
353
- }
354
-
355
- .#{$prefix}--tabs--container a.#{$prefix}--tabs__nav-link {
356
- @include breakpoint(md) {
357
- height: rem(48px);
358
- padding: $spacing-03 $spacing-05;
359
- border-bottom: none;
360
- // Height - vertical padding
361
- line-height: calc(#{rem(48px)} - (#{$spacing-03} * 2));
362
- }
363
- }
364
-
365
- //-----------------------------
366
- // Link Hover
367
- //-----------------------------
368
- .#{$prefix}--tabs__nav-item:hover:not(.#{$prefix}--tabs__nav-item--selected):not(.#{$prefix}--tabs__nav-item--disabled)
369
- .#{$prefix}--tabs__nav-link {
370
- color: $text-primary;
371
- @include breakpoint(md) {
372
- border-bottom: $tab-underline-color-hover;
373
- color: $text-primary;
374
- }
375
- }
376
-
377
- .#{$prefix}--tabs--container
378
- .#{$prefix}--tabs__nav-item:hover:not(.#{$prefix}--tabs__nav-item--selected):not(.#{$prefix}--tabs__nav-item--disabled)
379
- .#{$prefix}--tabs__nav-link {
380
- @include breakpoint(md) {
381
- border-bottom: none;
382
- }
383
- }
384
-
385
- //-----------------------------
386
- // Link Disabled
387
- //-----------------------------
388
- .#{$prefix}--tabs__nav-item--disabled .#{$prefix}--tabs__nav-link {
389
- border-bottom: $tab-underline-disabled;
390
- color: $tab-text-disabled;
391
- pointer-events: none;
392
- }
393
-
394
- .#{$prefix}--tabs__nav-item--disabled:hover .#{$prefix}--tabs__nav-link {
395
- border-bottom: $tab-underline-disabled;
396
- cursor: no-drop;
397
- }
398
-
399
- .#{$prefix}--tabs__nav-item--disabled .#{$prefix}--tabs__nav-link:focus,
400
- .#{$prefix}--tabs__nav-item--disabled a.#{$prefix}--tabs__nav-link:active {
401
- border-bottom: $tab-underline-disabled;
402
- outline: none;
403
- }
404
-
405
- //-----------------------------
406
- // Link Focus
407
- //-----------------------------
408
- .#{$prefix}--tabs__nav-item:not(.#{$prefix}--tabs__nav-item--selected):not(.#{$prefix}--tabs__nav-item--disabled):not(.#{$prefix}--tabs__nav-item--selected)
409
- .#{$prefix}--tabs__nav-link:focus,
410
- .#{$prefix}--tabs__nav-item:not(.#{$prefix}--tabs__nav-item--selected):not(.#{$prefix}--tabs__nav-item--disabled):not(.#{$prefix}--tabs__nav-item--selected)
411
- a.#{$prefix}--tabs__nav-link:active {
412
- color: $text-secondary;
413
- }
414
-
415
- //-----------------------------
416
- // Tab Content Container
417
- //-----------------------------
418
- .#{$prefix}--tab-content {
419
- padding: $spacing-05;
420
-
421
- &:focus {
422
- @include focus-outline('outline');
423
- }
424
- }
425
-
426
- //-----------------------------
427
- // Skeleton state
428
- //-----------------------------
429
- .#{$prefix}--tabs.#{$prefix}--skeleton {
430
- cursor: default;
431
- pointer-events: none;
432
- }
433
-
434
- .#{$prefix}--skeleton.#{$prefix}--tabs--scrollable:not(.#{$prefix}--tabs--scrollable--container)
435
- .#{$prefix}--tabs--scrollable__nav-item {
436
- border-bottom: 2px solid $skeleton-element;
437
- }
438
-
439
- .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs__nav-link {
440
- display: flex;
441
- width: 10rem;
442
- height: 100%;
443
- align-items: center;
444
- padding: 0 1rem;
445
- }
446
-
447
- .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs__nav-link span {
448
- @include skeleton;
449
-
450
- display: block;
451
- width: 100%;
452
- height: rem(14px);
453
- }
454
-
455
- .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs-trigger {
456
- @include skeleton;
457
-
458
- width: rem(100px);
459
- }
460
-
461
- .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs-trigger svg {
462
- @include visually-hidden;
463
- }
464
-
465
- // TODO: remove namespace and suffix in next major release
466
- .#{$prefix}--tabs--scrollable {
467
- @include reset;
468
- @include type-style('body-short-01');
469
-
470
40
  display: flex;
471
41
  width: 100%;
472
42
  height: auto;
473
43
  min-height: rem(40px);
474
44
  color: $text-primary;
475
45
 
476
- &.#{$prefix}--tabs--scrollable--container {
46
+ &.#{$prefix}--tabs--contained {
477
47
  min-height: rem(48px);
478
48
  }
479
49
 
480
- .#{$prefix}--tabs--scrollable__nav {
50
+ .#{$prefix}--tabs__nav {
481
51
  display: flex;
482
52
  overflow: auto hidden;
483
53
  width: auto;
@@ -516,23 +86,19 @@
516
86
  background-image: linear-gradient(to right, transparent, $background);
517
87
  }
518
88
 
519
- .#{$prefix}--tabs--scrollable--light
520
- .#{$prefix}--tabs__overflow-indicator--left {
89
+ .#{$prefix}--tabs--light .#{$prefix}--tabs__overflow-indicator--left {
521
90
  background-image: linear-gradient(to left, transparent, $layer);
522
91
  }
523
92
 
524
- .#{$prefix}--tabs--scrollable--light
525
- .#{$prefix}--tabs__overflow-indicator--right {
93
+ .#{$prefix}--tabs--light .#{$prefix}--tabs__overflow-indicator--right {
526
94
  background-image: linear-gradient(to right, transparent, $layer);
527
95
  }
528
96
 
529
- &.#{$prefix}--tabs--scrollable--container
530
- .#{$prefix}--tabs__overflow-indicator--left {
97
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__overflow-indicator--left {
531
98
  background-image: linear-gradient(to left, transparent, $layer-accent);
532
99
  }
533
100
 
534
- &.#{$prefix}--tabs--scrollable--container
535
- .#{$prefix}--tabs__overflow-indicator--right {
101
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__overflow-indicator--right {
536
102
  background-image: linear-gradient(to right, transparent, $layer-accent);
537
103
  }
538
104
 
@@ -557,7 +123,7 @@
557
123
  );
558
124
  }
559
125
 
560
- &.#{$prefix}--tabs--scrollable--container
126
+ &.#{$prefix}--tabs--contained
561
127
  .#{$prefix}--tabs__overflow-indicator--left {
562
128
  background-image: linear-gradient(
563
129
  to left,
@@ -566,7 +132,7 @@
566
132
  );
567
133
  }
568
134
 
569
- &.#{$prefix}--tabs--scrollable--container
135
+ &.#{$prefix}--tabs--contained
570
136
  .#{$prefix}--tabs__overflow-indicator--right {
571
137
  background-image: linear-gradient(
572
138
  to right,
@@ -595,8 +161,7 @@
595
161
  display: none;
596
162
  }
597
163
 
598
- &.#{$prefix}--tabs--scrollable--container
599
- .#{$prefix}--tab--overflow-nav-button {
164
+ &.#{$prefix}--tabs--contained .#{$prefix}--tab--overflow-nav-button {
600
165
  width: $spacing-09;
601
166
  margin: 0;
602
167
  background-color: $layer-accent;
@@ -609,7 +174,7 @@
609
174
  //-----------------------------
610
175
  // Item
611
176
  //-----------------------------
612
- .#{$prefix}--tabs--scrollable__nav-item {
177
+ .#{$prefix}--tabs__nav-item {
613
178
  @include reset;
614
179
 
615
180
  display: flex;
@@ -619,116 +184,32 @@
619
184
  motion(standard, productive);
620
185
  }
621
186
 
622
- .#{$prefix}--tabs--scrollable__nav-item
623
- + .#{$prefix}--tabs--scrollable__nav-item {
187
+ .#{$prefix}--tabs__nav-item + .#{$prefix}--tabs__nav-item {
624
188
  margin-left: rem(1px);
625
189
  }
626
190
 
627
- &.#{$prefix}--tabs--scrollable--container
628
- .#{$prefix}--tabs--scrollable__nav-item {
191
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item {
629
192
  background-color: $layer-accent;
630
193
  }
631
194
 
632
- &.#{$prefix}--tabs--scrollable--container
633
- .#{$prefix}--tabs--scrollable__nav-item
634
- + .#{$prefix}--tabs--scrollable__nav-item {
195
+ &.#{$prefix}--tabs--contained
196
+ .#{$prefix}--tabs__nav-item
197
+ + .#{$prefix}--tabs__nav-item {
635
198
  margin-left: 0;
636
199
  // Draws the border without affecting the inner-content
637
200
  box-shadow: rem(-1px) 0 0 0 $border-strong;
638
201
  }
639
202
 
640
- &.#{$prefix}--tabs--scrollable--container
641
- .#{$prefix}--tabs--scrollable__nav-item
642
- + .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--selected,
643
- &.#{$prefix}--tabs--scrollable--container
644
- .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--selected
645
- + .#{$prefix}--tabs--scrollable__nav-item {
646
- box-shadow: none;
647
- }
648
-
649
- .#{$prefix}--tabs--scrollable__nav-item
650
- .#{$prefix}--tabs--scrollable__nav-link {
203
+ .#{$prefix}--tabs__nav-item .#{$prefix}--tabs__nav-link {
651
204
  transition: color $duration-fast-01 motion(standard, productive),
652
205
  border-bottom-color $duration-fast-01 motion(standard, productive),
653
206
  outline $duration-fast-01 motion(standard, productive);
654
207
  }
655
208
 
656
- //-----------------------------
657
- // Item Hover
658
- //-----------------------------
659
- &.#{$prefix}--tabs--scrollable--container
660
- .#{$prefix}--tabs--scrollable__nav-item:hover {
661
- background-color: $layer-selected-hover;
662
- }
663
-
664
- //---------------------------------------------
665
- // Item Disabled
666
- //---------------------------------------------
667
- .#{$prefix}--tabs--scrollable__nav-item--disabled,
668
- .#{$prefix}--tabs--scrollable__nav-item--disabled:hover {
669
- background-color: transparent;
670
- cursor: not-allowed;
671
- outline: none;
672
- }
673
-
674
- &.#{$prefix}--tabs--scrollable--container
675
- .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--disabled,
676
- &.#{$prefix}--tabs--scrollable--container
677
- .#{$prefix}--tabs--scrollable__nav-item.#{$prefix}--tabs--scrollable__nav-item--disabled:hover {
678
- background-color: button.$button-disabled;
679
- }
680
-
681
- //-----------------------------
682
- // Item Selected
683
- //-----------------------------
684
- .#{$prefix}--tabs--scrollable__nav-item--selected {
685
- transition: color $duration-fast-01 motion(standard, productive);
686
- }
687
-
688
- .#{$prefix}--tabs--scrollable__nav-item--selected
689
- .#{$prefix}--tabs--scrollable__nav-link,
690
- .#{$prefix}--tabs--scrollable__nav-item--selected
691
- .#{$prefix}--tabs--scrollable__nav-link:focus,
692
- .#{$prefix}--tabs--scrollable__nav-item--selected
693
- .#{$prefix}--tabs--scrollable__nav-link:active {
694
- @include type-style('productive-heading-01');
695
-
696
- border-bottom: 2px solid $border-interactive;
697
- color: $text-primary;
698
- }
699
-
700
- &.#{$prefix}--tabs--scrollable--container
701
- .#{$prefix}--tabs--scrollable__nav-item--selected,
702
- &.#{$prefix}--tabs--scrollable--container
703
- .#{$prefix}--tabs--scrollable__nav-item--selected:hover {
704
- background-color: $layer;
705
-
706
- .#{$prefix}--tabs--scrollable__nav-link:focus,
707
- .#{$prefix}--tabs--scrollable__nav-link:active {
708
- box-shadow: none;
709
- }
710
- }
711
-
712
- &.#{$prefix}--tabs--scrollable--container
713
- .#{$prefix}--tabs--scrollable__nav-item--selected
714
- .#{$prefix}--tabs--scrollable__nav-link {
715
- // Draws the border without affecting the inner-content
716
- box-shadow: inset 0 2px 0 0 $border-interactive;
717
- // height - vertical padding
718
- line-height: calc(#{rem(48px)} - (#{$spacing-03} * 2));
719
- }
720
-
721
- &.#{$prefix}--tabs--scrollable--light.#{$prefix}--tabs--scrollable--container
722
- .#{$prefix}--tabs--scrollable__nav-item--selected,
723
- &.#{$prefix}--tabs--scrollable--light.#{$prefix}--tabs--scrollable--container
724
- .#{$prefix}--tabs--scrollable__nav-item--selected:hover {
725
- background-color: $background;
726
- }
727
-
728
209
  //-----------------------------
729
210
  // Link
730
211
  //-----------------------------
731
- .#{$prefix}--tabs--scrollable__nav-link {
212
+ .#{$prefix}--tabs__nav-link {
732
213
  @include button-reset.reset($width: false);
733
214
  @include focus-outline('reset');
734
215
  @include type-style('body-short-01');
@@ -738,10 +219,10 @@
738
219
  }
739
220
 
740
221
  overflow: hidden;
222
+ max-width: 10rem;
741
223
  padding: $spacing-04 $spacing-05 $spacing-03;
742
224
  border-bottom: $tab-underline-color;
743
225
  color: $text-secondary;
744
- text-align: left;
745
226
  text-decoration: none;
746
227
  text-overflow: ellipsis;
747
228
  transition: border $duration-fast-01 motion(standard, productive),
@@ -754,128 +235,187 @@
754
235
  }
755
236
  }
756
237
 
757
- &.#{$prefix}--tabs--scrollable--container
758
- .#{$prefix}--tabs--scrollable__nav-link {
238
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-link {
759
239
  height: rem(48px);
760
240
  padding: $spacing-03 $spacing-05;
761
241
  border-bottom: 0;
762
242
  // height - vertical padding
763
243
  line-height: calc(#{rem(48px)} - (#{$spacing-03} * 2));
244
+ text-align: left;
764
245
  }
765
246
 
766
247
  //-----------------------------
767
- // Link Hover
248
+ // Item Hover
768
249
  //-----------------------------
769
- .#{$prefix}--tabs--scrollable__nav-item:hover
770
- .#{$prefix}--tabs--scrollable__nav-link {
771
- border-bottom: $tab-underline-color-hover;
250
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item:hover {
251
+ background-color: $layer-selected-hover;
252
+ }
253
+
254
+ //-----------------------------
255
+ // Item Selected
256
+ //-----------------------------
257
+ .#{$prefix}--tabs__nav-item--selected {
258
+ border-bottom: 2px solid $border-interactive;
259
+ transition: color $duration-fast-01 motion(standard, productive);
260
+ }
261
+
262
+ &.#{$prefix}--tabs--contained
263
+ .#{$prefix}--tabs__nav-item--selected
264
+ + .#{$prefix}--tabs__nav-item {
265
+ box-shadow: none;
266
+ }
267
+
268
+ &.#{$prefix}--tabs--contained
269
+ .#{$prefix}--tabs__nav-item.#{$prefix}--tabs__nav-item--selected {
270
+ // Draws the border without affecting the inner-content
271
+ box-shadow: inset 0 2px 0 0 $border-interactive;
272
+ }
273
+
274
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item--selected,
275
+ .#{$prefix}--tabs__nav-item--selected,
276
+ .#{$prefix}--tabs__nav-item--selected:focus
277
+ .#{$prefix}--tabs__nav-link:focus,
278
+ .#{$prefix}--tabs__nav-item--selected:active
279
+ .#{$prefix}--tabs__nav-link:active {
280
+ @include type-style('productive-heading-01');
281
+
772
282
  color: $text-primary;
773
283
  }
774
284
 
775
- &.#{$prefix}--tabs--scrollable--container
776
- .#{$prefix}--tabs--scrollable__nav-item
777
- .#{$prefix}--tabs--scrollable__nav-link {
778
- border-bottom: none;
285
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item--selected,
286
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item--selected:hover {
287
+ background-color: $layer;
288
+ // height - vertical padding
289
+ line-height: calc(#{rem(48px)} - (#{$spacing-03} * 2));
290
+
291
+ .#{$prefix}--tabs__nav-link:focus,
292
+ .#{$prefix}--tabs__nav-link:active {
293
+ box-shadow: none;
294
+ }
295
+ }
296
+
297
+ &.#{$prefix}--tabs--light.#{$prefix}--tabs--contained
298
+ .#{$prefix}--tabs__nav-item--selected,
299
+ &.#{$prefix}--tabs--light.#{$prefix}--tabs--contained
300
+ .#{$prefix}--tabs__nav-item--selected:hover {
301
+ background-color: $background;
779
302
  }
780
303
 
781
304
  //-----------------------------
782
- // Link Disabled
305
+ // Link Hover
783
306
  //-----------------------------
784
- .#{$prefix}--tabs--scrollable__nav-item--disabled
785
- .#{$prefix}--tabs--scrollable__nav-link {
307
+ .#{$prefix}--tabs__nav-item:hover .#{$prefix}--tabs__nav-link {
308
+ border-bottom: $tab-underline-color-hover;
309
+ color: $text-primary;
310
+ }
311
+
312
+ //-----------------------------
313
+ // Item Disabled
314
+ //-----------------------------
315
+
316
+ .#{$prefix}--tabs__nav-item--disabled {
786
317
  border-bottom: $tab-underline-disabled;
318
+ background-color: transparent;
787
319
  color: $tab-text-disabled;
320
+ outline: none;
788
321
  }
789
322
 
790
- .#{$prefix}--tabs--scrollable__nav-item--disabled:hover
791
- .#{$prefix}--tabs--scrollable__nav-link {
323
+ .#{$prefix}--tabs__nav-item--disabled:hover {
792
324
  border-bottom: $tab-underline-disabled;
793
325
  color: $tab-text-disabled;
794
326
  cursor: not-allowed;
795
- pointer-events: none;
796
327
  }
797
328
 
798
- .#{$prefix}--tabs--scrollable__nav-item--disabled
799
- .#{$prefix}--tabs--scrollable__nav-link:focus,
800
- .#{$prefix}--tabs--scrollable__nav-item--disabled
801
- .#{$prefix}--tabs--scrollable__nav-link:active {
329
+ &.#{$prefix}--tabs--contained
330
+ .#{$prefix}--tabs__nav-item.#{$prefix}--tabs__nav-item--disabled,
331
+ &.#{$prefix}--tabs--contained
332
+ .#{$prefix}--tabs__nav-item.#{$prefix}--tabs__nav-item--disabled:hover {
333
+ background-color: button.$button-disabled;
334
+ }
335
+
336
+ .#{$prefix}--tabs__nav-item--disabled:focus,
337
+ .#{$prefix}--tabs__nav-item--disabled:active {
802
338
  border-bottom: $tab-underline-disabled;
803
339
  outline: none;
340
+ pointer-events: none;
804
341
  }
805
342
 
806
- .#{$prefix}--tabs--scrollable--light
807
- .#{$prefix}--tabs--scrollable__nav-item--disabled
808
- .#{$prefix}--tabs--scrollable__nav-link {
343
+ .#{$prefix}--tabs--light
344
+ .#{$prefix}--tabs__nav-item--disabled
345
+ .#{$prefix}--tabs__nav-link {
809
346
  border-bottom-color: $border-subtle;
810
347
  }
811
348
 
812
- .#{$prefix}--tabs--scrollable--light
813
- .#{$prefix}--tabs--scrollable__nav-item--disabled:hover
814
- .#{$prefix}--tabs--scrollable__nav-link {
349
+ .#{$prefix}--tabs--light
350
+ .#{$prefix}--tabs__nav-item--disabled:hover
351
+ .#{$prefix}--tabs__nav-link {
815
352
  border-bottom-color: $border-subtle;
816
353
  }
817
354
 
818
- .#{$prefix}--tabs--scrollable--light
819
- .#{$prefix}--tabs--scrollable__nav-item--disabled
820
- .#{$prefix}--tabs--scrollable__nav-link:focus,
821
- .#{$prefix}--tabs--scrollable--light
822
- .#{$prefix}--tabs--scrollable__nav-item--disabled
823
- .#{$prefix}--tabs--scrollable__nav-link:active {
355
+ .#{$prefix}--tabs--light
356
+ .#{$prefix}--tabs__nav-item--disabled
357
+ .#{$prefix}--tabs__nav-link:focus,
358
+ .#{$prefix}--tabs--light
359
+ .#{$prefix}--tabs__nav-item--disabled
360
+ .#{$prefix}--tabs__nav-link:active {
824
361
  border-bottom-color: $border-subtle;
825
362
  }
826
363
 
827
- &.#{$prefix}--tabs--scrollable--container
828
- .#{$prefix}--tabs--scrollable__nav-item--disabled
829
- .#{$prefix}--tabs--scrollable__nav-link {
364
+ &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item--disabled {
830
365
  border-bottom: none;
831
366
  color: $text-on-color-disabled;
832
367
  }
368
+ }
369
+ //-----------------------------
370
+ // Tab Content Container
371
+ //-----------------------------
372
+ .#{$prefix}--tab-content {
373
+ padding: $spacing-05;
833
374
 
834
- //-----------------------------
835
- // Tab Content Container
836
- //-----------------------------
837
- .#{$prefix}--tab-content {
838
- padding: $spacing-05;
839
- }
840
-
841
- //-----------------------------
842
- // Skeleton state
843
- //-----------------------------
844
- .#{$prefix}--tabs.#{$prefix}--skeleton {
845
- cursor: default;
846
- pointer-events: none;
375
+ &:focus {
376
+ @include focus-outline('outline');
847
377
  }
378
+ }
848
379
 
849
- .#{$prefix}--tabs.#{$prefix}--skeleton
850
- .#{$prefix}--tabs--scrollable__nav-link {
851
- @include skeleton;
380
+ //-----------------------------
381
+ // Skeleton state
382
+ //-----------------------------
383
+ .#{$prefix}--tabs.#{$prefix}--skeleton {
384
+ cursor: default;
385
+ pointer-events: none;
386
+ }
852
387
 
853
- width: rem(75px);
854
- }
388
+ .#{$prefix}--skeleton.#{$prefix}--tabs:not(.#{$prefix}--tabs--contained)
389
+ .#{$prefix}--tabs__nav-link {
390
+ border-bottom: 2px solid $skeleton-element;
391
+ }
855
392
 
856
- .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs-trigger {
857
- @include skeleton;
393
+ .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs__nav-link {
394
+ display: flex;
395
+ width: 10rem;
396
+ height: 100%;
397
+ align-items: center;
398
+ padding: 0 1rem;
399
+ }
858
400
 
859
- width: rem(75px);
860
- margin-right: rem(1px);
861
- }
401
+ .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs__nav-link span {
402
+ @include skeleton;
862
403
 
863
- .#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs-trigger svg {
864
- @include visually-hidden;
865
- }
404
+ display: block;
405
+ width: 100%;
406
+ height: rem(14px);
866
407
  }
867
408
 
868
409
  // Windows HCM fix
869
- .#{$prefix}--tabs--scrollable__nav-item
410
+ .#{$prefix}--tabs__nav-item
870
411
  .#{$prefix}--tabs__nav-item--selected
871
- .#{$prefix}--tabs--scrollable__nav-item--selected {
412
+ .#{$prefix}--tabs__nav-item--selected {
872
413
  @include high-contrast-mode('focus');
873
414
  }
874
415
 
875
- // stylelint-disable-next-line no-duplicate-selectors
876
- .#{$prefix}--tabs--scrollable
877
- .#{$prefix}--tabs--scrollable__nav-item--disabled
878
- .#{$prefix}--tabs--scrollable__nav-link {
416
+ .#{$prefix}--tabs
417
+ .#{$prefix}--tabs__nav-item--disabled
418
+ .#{$prefix}--tabs__nav-link {
879
419
  @include high-contrast-mode('disabled');
880
420
  }
881
421
  }