@carbon/web-components 2.55.0-rc.0 → 2.55.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/custom-elements.json +133 -30
- package/es/components/button/button.d.ts.map +1 -1
- package/es/components/button/button.js +6 -4
- package/es/components/button/button.js.map +1 -1
- package/es/components/menu/menu-item.d.ts.map +1 -1
- package/es/components/menu/menu-item.js +3 -3
- package/es/components/menu/menu-item.js.map +1 -1
- package/es/components/multi-select/multi-select.d.ts +4 -0
- package/es/components/multi-select/multi-select.d.ts.map +1 -1
- package/es/components/multi-select/multi-select.js +4 -1
- package/es/components/multi-select/multi-select.js.map +1 -1
- package/es/components/overflow-menu/overflow-menu-item.d.ts.map +1 -1
- package/es/components/overflow-menu/overflow-menu-item.js +4 -3
- package/es/components/overflow-menu/overflow-menu-item.js.map +1 -1
- package/es/components/tabs/defs.d.ts +26 -0
- package/es/components/tabs/defs.d.ts.map +1 -1
- package/es/components/tabs/defs.js +28 -1
- package/es/components/tabs/defs.js.map +1 -1
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.d.ts.map +1 -1
- package/es/components/tabs/index.js +1 -0
- package/es/components/tabs/stories/tabs-wrapper.d.ts +5 -0
- package/es/components/tabs/stories/tabs-wrapper.d.ts.map +1 -1
- package/es/components/tabs/stories/tabs-wrapper.js +2 -0
- package/es/components/tabs/stories/tabs-wrapper.js.map +1 -1
- package/es/components/tabs/tab.d.ts +26 -0
- package/es/components/tabs/tab.d.ts.map +1 -1
- package/es/components/tabs/tab.js +41 -7
- package/es/components/tabs/tab.js.map +1 -1
- package/es/components/tabs/tabs-vertical.d.ts +29 -0
- package/es/components/tabs/tabs-vertical.d.ts.map +1 -0
- package/es/components/tabs/tabs-vertical.js +113 -0
- package/es/components/tabs/tabs-vertical.js.map +1 -0
- package/es/components/tabs/tabs.d.ts +22 -4
- package/es/components/tabs/tabs.d.ts.map +1 -1
- package/es/components/tabs/tabs.js +50 -9
- package/es/components/tabs/tabs.js.map +1 -1
- package/es/components/tabs/tabs.scss.js +1 -1
- package/es/components/tabs/tabs.scss.js.map +1 -1
- package/es-custom/components/button/button.d.ts.map +1 -1
- package/es-custom/components/button/button.js +6 -4
- package/es-custom/components/button/button.js.map +1 -1
- package/es-custom/components/menu/menu-item.d.ts.map +1 -1
- package/es-custom/components/menu/menu-item.js +3 -3
- package/es-custom/components/menu/menu-item.js.map +1 -1
- package/es-custom/components/multi-select/multi-select.d.ts +4 -0
- package/es-custom/components/multi-select/multi-select.d.ts.map +1 -1
- package/es-custom/components/multi-select/multi-select.js +4 -1
- package/es-custom/components/multi-select/multi-select.js.map +1 -1
- package/es-custom/components/overflow-menu/overflow-menu-item.d.ts.map +1 -1
- package/es-custom/components/overflow-menu/overflow-menu-item.js +4 -3
- package/es-custom/components/overflow-menu/overflow-menu-item.js.map +1 -1
- package/es-custom/components/tabs/defs.d.ts +26 -0
- package/es-custom/components/tabs/defs.d.ts.map +1 -1
- package/es-custom/components/tabs/defs.js +28 -1
- package/es-custom/components/tabs/defs.js.map +1 -1
- package/es-custom/components/tabs/index.d.ts +1 -0
- package/es-custom/components/tabs/index.d.ts.map +1 -1
- package/es-custom/components/tabs/index.js +1 -0
- package/es-custom/components/tabs/stories/tabs-wrapper.d.ts +5 -0
- package/es-custom/components/tabs/stories/tabs-wrapper.d.ts.map +1 -1
- package/es-custom/components/tabs/stories/tabs-wrapper.js +2 -0
- package/es-custom/components/tabs/stories/tabs-wrapper.js.map +1 -1
- package/es-custom/components/tabs/tab.d.ts +26 -0
- package/es-custom/components/tabs/tab.d.ts.map +1 -1
- package/es-custom/components/tabs/tab.js +41 -7
- package/es-custom/components/tabs/tab.js.map +1 -1
- package/es-custom/components/tabs/tabs-vertical.d.ts +29 -0
- package/es-custom/components/tabs/tabs-vertical.d.ts.map +1 -0
- package/es-custom/components/tabs/tabs-vertical.js +113 -0
- package/es-custom/components/tabs/tabs-vertical.js.map +1 -0
- package/es-custom/components/tabs/tabs.d.ts +22 -4
- package/es-custom/components/tabs/tabs.d.ts.map +1 -1
- package/es-custom/components/tabs/tabs.js +50 -9
- package/es-custom/components/tabs/tabs.js.map +1 -1
- package/es-custom/components/tabs/tabs.scss.js +1 -1
- package/es-custom/components/tabs/tabs.scss.js.map +1 -1
- package/lib/components/button/button.d.ts.map +1 -1
- package/lib/components/menu/menu-item.d.ts.map +1 -1
- package/lib/components/multi-select/multi-select.d.ts +4 -0
- package/lib/components/multi-select/multi-select.d.ts.map +1 -1
- package/lib/components/overflow-menu/overflow-menu-item.d.ts.map +1 -1
- package/lib/components/tabs/defs.d.ts +26 -0
- package/lib/components/tabs/defs.d.ts.map +1 -1
- package/lib/components/tabs/defs.js +29 -0
- package/lib/components/tabs/defs.js.map +1 -1
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.d.ts.map +1 -1
- package/lib/components/tabs/stories/tabs-wrapper.d.ts +5 -0
- package/lib/components/tabs/stories/tabs-wrapper.d.ts.map +1 -1
- package/lib/components/tabs/tab.d.ts +26 -0
- package/lib/components/tabs/tab.d.ts.map +1 -1
- package/lib/components/tabs/tabs-vertical.d.ts +29 -0
- package/lib/components/tabs/tabs-vertical.d.ts.map +1 -0
- package/lib/components/tabs/tabs.d.ts +22 -4
- package/lib/components/tabs/tabs.d.ts.map +1 -1
- package/package.json +7 -7
- package/scss/components/tabs/tabs-story.scss +5 -0
- package/scss/components/tabs/tabs.scss +168 -5
- package/telemetry.yml +2 -0
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
@use '@carbon/styles/scss/utilities/layout';
|
|
21
21
|
@use '@carbon/styles/scss/utilities/convert';
|
|
22
22
|
@use '@carbon/styles/scss/utilities/skeleton' as *;
|
|
23
|
+
@use '@carbon/styles/scss/utilities/update_fields_on_layer' as *;
|
|
23
24
|
|
|
24
25
|
$inset-transition: inset 110ms motion(standard, productive);
|
|
25
26
|
|
|
@@ -27,6 +28,7 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
27
28
|
:host(#{$prefix}-tabs-skeleton) {
|
|
28
29
|
@extend .#{$prefix}--tabs;
|
|
29
30
|
@include emit-layout-tokens();
|
|
31
|
+
|
|
30
32
|
.#{$prefix}--tabs-nav-content-container {
|
|
31
33
|
position: relative;
|
|
32
34
|
overflow: scroll;
|
|
@@ -264,6 +266,9 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
264
266
|
outline: none;
|
|
265
267
|
}
|
|
266
268
|
|
|
269
|
+
:host(#{$prefix}-tab:not([type='contained']):not([vertical])) {
|
|
270
|
+
margin-inline-end: convert.to-rem(1px);
|
|
271
|
+
}
|
|
267
272
|
:host(#{$prefix}-tab:not([type='contained'])) {
|
|
268
273
|
.#{$prefix}--tabs__nav-link {
|
|
269
274
|
padding-block-end: calc(#{$spacing-03} + #{convert.to-rem(1px)});
|
|
@@ -271,10 +276,19 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
271
276
|
}
|
|
272
277
|
}
|
|
273
278
|
|
|
279
|
+
:host(#{$prefix}-tab:not([type='contained']):not([vertical]):last-of-type) {
|
|
280
|
+
margin-inline-end: 0;
|
|
281
|
+
}
|
|
274
282
|
:host(#{$prefix}-tab:not([type='contained']))
|
|
275
283
|
+ :host(#{$prefix}-tab:not([type='contained'])) {
|
|
276
284
|
margin-inline-start: convert.to-rem(1px);
|
|
277
285
|
}
|
|
286
|
+
:host(#{$prefix}-tab[vertical]) {
|
|
287
|
+
.#{$prefix}--tabs__nav-link {
|
|
288
|
+
padding-block-end: $spacing-03;
|
|
289
|
+
padding-block-start: $spacing-03;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
278
292
|
|
|
279
293
|
:host(#{$prefix}-tab[badge-indicator][icon-only]:not([icon-size='lg']))
|
|
280
294
|
#{$prefix}-badge-indicator,
|
|
@@ -368,7 +382,7 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
368
382
|
}
|
|
369
383
|
}
|
|
370
384
|
|
|
371
|
-
:host(#{$prefix}-tab:hover:not([selected])) {
|
|
385
|
+
:host(#{$prefix}-tab:hover:not([selected]):not([vertical])) {
|
|
372
386
|
background-color: transparent;
|
|
373
387
|
|
|
374
388
|
a.#{$prefix}--tabs__nav-link {
|
|
@@ -384,7 +398,7 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
384
398
|
|
|
385
399
|
:host(#{$prefix}-tabs[type='contained'])
|
|
386
400
|
.#{$prefix}--tabs-nav-content-container {
|
|
387
|
-
block-size:
|
|
401
|
+
block-size: layout.size('height');
|
|
388
402
|
}
|
|
389
403
|
|
|
390
404
|
:host(#{$prefix}-tab[type='contained']) {
|
|
@@ -392,9 +406,9 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
392
406
|
|
|
393
407
|
a.#{$prefix}--tabs__nav-link {
|
|
394
408
|
padding: $spacing-03 $spacing-05;
|
|
395
|
-
block-size:
|
|
409
|
+
block-size: layout.size('height');
|
|
396
410
|
// height - vertical padding
|
|
397
|
-
line-height: calc(#{
|
|
411
|
+
line-height: calc(#{layout.size('height')} - (#{$spacing-03} * 2));
|
|
398
412
|
}
|
|
399
413
|
}
|
|
400
414
|
|
|
@@ -446,7 +460,7 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
446
460
|
// Draws the border without affecting the inner-content
|
|
447
461
|
box-shadow: inset 0 $spacing-01 0 0 $interactive;
|
|
448
462
|
// height - vertical padding
|
|
449
|
-
line-height: calc(#{
|
|
463
|
+
line-height: calc(#{layout.size('height')} - (#{$spacing-03} * 2));
|
|
450
464
|
}
|
|
451
465
|
|
|
452
466
|
.#{$prefix}--tabs__nav-link:focus,
|
|
@@ -559,6 +573,155 @@ $inset-transition: inset 110ms motion(standard, productive);
|
|
|
559
573
|
}
|
|
560
574
|
}
|
|
561
575
|
|
|
576
|
+
:host(#{$prefix}-tab[vertical]) .#{$prefix}--tabs__nav-link {
|
|
577
|
+
display: flex;
|
|
578
|
+
align-items: center;
|
|
579
|
+
border-block-end: 1px solid $border-subtle;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
:host(#{$prefix}-tab[vertical][selected]) .#{$prefix}--tabs__nav-link {
|
|
583
|
+
border-block-end: 1px solid $border-subtle;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
:host(#{$prefix}-tab[vertical][disabled]) .#{$prefix}--tabs__nav-link {
|
|
587
|
+
border-block-end: 1px solid $border-subtle;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
//-----------------------------
|
|
591
|
+
// Vertical Tabs Wrapper
|
|
592
|
+
//-----------------------------
|
|
593
|
+
|
|
594
|
+
:host(#{$prefix}-tabs-vertical) {
|
|
595
|
+
@include emit-layout-tokens();
|
|
596
|
+
@include layout.use('density', $default: 'normal');
|
|
597
|
+
|
|
598
|
+
grid-column: span 2;
|
|
599
|
+
max-block-size: none;
|
|
600
|
+
|
|
601
|
+
&.#{$prefix}--css-grid {
|
|
602
|
+
box-shadow: inset -1px 0 $border-subtle;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
::slotted(#{$prefix}-tabs) {
|
|
606
|
+
grid-column: span 2;
|
|
607
|
+
|
|
608
|
+
@include breakpoint(lg) {
|
|
609
|
+
grid-column: span 4;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Shadow-DOM wrapper for the panel slot — styled directly (no ::slotted needed)
|
|
614
|
+
.#{$prefix}-panel-container {
|
|
615
|
+
@include update_fields_on_layer;
|
|
616
|
+
|
|
617
|
+
background: $layer;
|
|
618
|
+
grid-column: 3 / -1;
|
|
619
|
+
overflow-y: auto;
|
|
620
|
+
|
|
621
|
+
@include breakpoint(lg) {
|
|
622
|
+
grid-column: 5 / -1;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// Slotted tab panel divs — match React's cds--tab-content styles
|
|
628
|
+
:host(#{$prefix}-tabs-vertical) ::slotted([role='tabpanel']) {
|
|
629
|
+
// stylelint-disable-next-line declaration-no-important
|
|
630
|
+
padding: layout.density('padding-inline') !important;
|
|
631
|
+
outline: none;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
:host(#{$prefix}-tabs-vertical)
|
|
635
|
+
.panel-container
|
|
636
|
+
::slotted([role='tabpanel']:focus) {
|
|
637
|
+
@include focus-outline('outline');
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// cds-tabs when slotted inside cds-tabs-vertical (slot="tabs")
|
|
641
|
+
:host(#{$prefix}-tabs-vertical) ::slotted(#{$prefix}-tabs) {
|
|
642
|
+
background: $layer;
|
|
643
|
+
box-shadow: inset -1px 0 $border-subtle;
|
|
644
|
+
max-block-size: none;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// Internal styles for cds-tabs when inside cds-tabs-vertical
|
|
648
|
+
// These are applied via a CSS custom property / attribute set by the wrapper
|
|
649
|
+
:host(#{$prefix}-tabs[vertical]) {
|
|
650
|
+
.#{$prefix}--tabs-nav-content-container {
|
|
651
|
+
block-size: 100%;
|
|
652
|
+
overflow-x: hidden;
|
|
653
|
+
overflow-y: auto;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.#{$prefix}--tabs-nav-content {
|
|
657
|
+
position: relative;
|
|
658
|
+
block-size: 100%;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.#{$prefix}--tabs-nav {
|
|
662
|
+
position: relative;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.#{$prefix}--tab--list {
|
|
666
|
+
display: flex;
|
|
667
|
+
flex-direction: column;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.#{$prefix}--tab--overflow-nav-button {
|
|
671
|
+
display: none;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.#{$prefix}--tabs__nav-item-label {
|
|
675
|
+
display: -webkit-box;
|
|
676
|
+
overflow: hidden;
|
|
677
|
+
-webkit-box-orient: vertical;
|
|
678
|
+
-webkit-line-clamp: 2;
|
|
679
|
+
line-height: var(--cds-body-compact-01-line-height);
|
|
680
|
+
text-overflow: ellipsis;
|
|
681
|
+
white-space: normal;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
:host(#{$prefix}-tab[vertical]) {
|
|
686
|
+
flex: none;
|
|
687
|
+
background-color: $layer-01;
|
|
688
|
+
block-size: $spacing-10;
|
|
689
|
+
border-inline-end: 1px solid $border-subtle;
|
|
690
|
+
box-shadow: inset 3px 0 0 0 $border-subtle;
|
|
691
|
+
inline-size: 100%;
|
|
692
|
+
|
|
693
|
+
.#{$prefix}--tabs__nav-item-label {
|
|
694
|
+
display: -webkit-box;
|
|
695
|
+
overflow: hidden;
|
|
696
|
+
-webkit-box-orient: vertical;
|
|
697
|
+
-webkit-line-clamp: 2;
|
|
698
|
+
line-height: var(--cds-body-compact-01-line-height);
|
|
699
|
+
text-overflow: ellipsis;
|
|
700
|
+
white-space: normal;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
:host(#{$prefix}-tab[vertical][disabled]) {
|
|
705
|
+
border-inline-end: 1px solid $border-subtle;
|
|
706
|
+
box-shadow: inset 3px 0 0 0 $border-subtle;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
:host(#{$prefix}-tab[vertical]:hover),
|
|
710
|
+
:host(#{$prefix}-tab[vertical][disabled]:hover) {
|
|
711
|
+
.#{$prefix}--tabs__nav-link {
|
|
712
|
+
border-block-end: 1px solid $border-subtle;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
:host(#{$prefix}-tab[vertical][selected]) {
|
|
717
|
+
border-inline: none;
|
|
718
|
+
box-shadow: inset 3px 0 0 0 $border-interactive;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
:host(#{$prefix}-tab[vertical]:not([selected]):not([disabled]):hover) {
|
|
722
|
+
background-color: $layer-hover;
|
|
723
|
+
box-shadow: inset 3px 0 0 0 $border-strong;
|
|
724
|
+
}
|
|
562
725
|
:host(#{$prefix}-tab) {
|
|
563
726
|
.#{$prefix}--tabs__nav-link--dismissable {
|
|
564
727
|
display: flex;
|