File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export class SgdsSidebarItem extends SidebarElement {
2626 class =${ classMap ( {
2727 "sidebar-item" : true ,
2828 "sidebar-item--collapsed" : ! this . _isOverlay && this . _sidebarCollapsed && this . _childLevel === 1 ,
29+ "sidebar-item-leaf" : this . _childLevel > 2 ,
2930 active : this . _selected
3031 } ) }
3132 @click =${ ( ) => this . _handleClick ( ) }
Original file line number Diff line number Diff line change @@ -95,12 +95,15 @@ export class SgdsSidebarSection extends SidebarElement {
9595 >
9696 ${ this . title !== ""
9797 ? html `< div
98- class ="sidebar-section-label "
98+ class =${ classMap ( {
99+ "sidebar-section-label" : true ,
100+ "sidebar-section-label--collapsible" : this . collapsible
101+ } ) }
99102 role ="button"
100103 @click=${ this . _handleClick }
101104 aria-expanded=${ ! this . collapsed }
102105 aria-disabled=${ ! this . collapsible }
103- tabindex="0"
106+ tabindex=${ this . collapsible ? 0 : - 1 }
104107 >
105108 < span > ${ this . title } </ span >
106109 ${ this . collapsible
Original file line number Diff line number Diff line change 66}
77
88.sidebar-item .active ,
9- .sidebar-item : hover {
9+ .sidebar-item : hover ,
10+ .sidebar-item : focus-visible {
1011 background-color : var (--sgds-bg-translucent-subtle );
1112}
1213
13- .sidebar-item : focus ,
1414.sidebar-item : focus-visible {
1515 outline : var (--sgds-outline-focus );
1616 outline-offset : var (--sgds-outline-offset-focus );
3939}
4040
4141.sidebar-item-label .offset {
42+ color : var (--sgds-color-subtle );
4243 margin-left : var (--sgds-margin-2-xl );
4344}
4445
46+ .sidebar-item-leaf .active .sidebar-item-label .offset ,
47+ .sidebar-item-leaf : hover .sidebar-item-label .offset ,
48+ .sidebar-item-leaf : focus-visible .sidebar-item-label .offset {
49+ color : var (--sgds-color-default );
50+ }
51+
52+ .sidebar-item-leaf .active ,
53+ .sidebar-item-leaf : hover ,
54+ .sidebar-item-leaf : focus-visible {
55+ background-color : var (--sgds-bg-translucent-subtle );
56+ }
57+
4558.sidebar-item-label-wrapper .sidebar-item .active {
4659 background-color : var (--sgds-surface-raised );
4760 color : var (--sgds-primary-color-default );
Original file line number Diff line number Diff line change 77 display : flex;
88 align-items : center;
99 gap : var (--sgds-gap-2-xs );
10- cursor : pointer;
1110 font-size : var (--sgds-font-size-0 );
1211 line-height : var (--sgds-line-height-20 );
1312 color : var (--sgds-label-color-subtle );
1413 padding : var (--sgds-padding-xs ) var (--sgds-padding-sm );
1514 border-radius : var (--sgds-border-radius-md );
1615}
1716
18- .sidebar-section-label : hover {
17+ .sidebar-section-label--collapsible {
18+ cursor : pointer;
19+ }
20+
21+ .sidebar-section-label--collapsible : hover ,
22+ .sidebar-section-label--collapsible : focus-visible {
1923 color : var (--sgds-label-color-default );
2024}
2125
22- .sidebar-section-label : focus ,
23- .sidebar-section-label : focus-visible {
26+ .sidebar-section-label--collapsible : focus-visible {
2427 outline : var (--sgds-outline-focus );
2528 outline-offset : var (--sgds-outline-offset-focus );
2629}
Original file line number Diff line number Diff line change 66 z-index : var (--sgds-z-index-sticky );
77 width : var (--sgds-dimension-288 );
88 transition : width var (--sgds-motion-duration-standard ) var (--sgds-motion-easing-standard );
9-
109}
10+
1111.sidebar : not (.overlay ).sidebar--collapsed {
1212 width : var (--sgds-dimension-72 );
1313}
7171 display : flex;
7272 flex-direction : column;
7373 gap : var (--sgds-gap-md );
74+ margin-top : var (--sgds-margin-lg );
75+ }
76+
77+ slot [name = "lower" ]::slotted (* ) {
78+ margin-top : var (--sgds-margin-lg );
7479}
7580
7681.sidebar-nested-overlay {
You can’t perform that action at this time.
0 commit comments