mirror of
https://github.com/bitwarden/browser
synced 2026-02-25 09:03:28 +00:00
* add basic new nav item styling * update alt-3 bg color * add x padding to item * remove copy left in error * style app switcher to match nav items * adding new button hover colors * add new logo lockups * use new logos in web vault * fix color and svg fills * use set height for nav items * optimize SVGs * move if logic * use rem for icon size * move shield logo * use shield svg for collapsed icon * remove unused eslint disable directive * run prettier * remove variables * update logo hover styles * use more standard flow control syntax * update admin console logo svg * add new hover variables * use class instead of fill * use variable for logo hover * remove unnecessary container * use hover variable for nav switcher * use correct variables for fill colors * update hover state to use variable left in error * give icon width to preserve text alignment * remove tree story as functionality no longer supported * remove nested styles helper * remove obsolete afterContentInit * remove tree example from layout story * remove tree example from secondary layout story * remove tree example from kitchen sink story * Fix interaction test * remove remaining references to tree variant
46 lines
1.4 KiB
HTML
46 lines
1.4 KiB
HTML
<!-- This a higher order component that composes `NavItemComponent` -->
|
|
@if (!hideIfEmpty || nestedNavComponents.length > 0) {
|
|
<bit-nav-item
|
|
[text]="text"
|
|
[icon]="icon"
|
|
[route]="route"
|
|
[relativeTo]="relativeTo"
|
|
[routerLinkActiveOptions]="routerLinkActiveOptions"
|
|
(mainContentClicked)="handleMainContentClicked()"
|
|
[ariaLabel]="ariaLabel"
|
|
[hideActiveStyles]="parentHideActiveStyles"
|
|
>
|
|
<ng-template #button>
|
|
<button
|
|
type="button"
|
|
class="tw-ms-auto"
|
|
[bitIconButton]="open ? 'bwi-angle-up' : 'bwi-angle-down'"
|
|
[buttonType]="'light'"
|
|
(click)="toggle($event)"
|
|
size="small"
|
|
[title]="'toggleCollapse' | i18n"
|
|
aria-haspopup="true"
|
|
[attr.aria-expanded]="open.toString()"
|
|
[attr.aria-controls]="contentId"
|
|
[attr.aria-label]="['toggleCollapse' | i18n, text].join(' ')"
|
|
></button>
|
|
</ng-template>
|
|
<ng-container slot="end">
|
|
<ng-content select="[slot=end]"></ng-content>
|
|
<ng-container *ngTemplateOutlet="button"></ng-container>
|
|
</ng-container>
|
|
</bit-nav-item>
|
|
<!-- [attr.aria-controls] of the above button expects a unique ID on the controlled element -->
|
|
@if (sideNavService.open$ | async) {
|
|
@if (open) {
|
|
<div
|
|
[attr.id]="contentId"
|
|
[attr.aria-label]="[text, 'submenu' | i18n].join(' ')"
|
|
role="group"
|
|
>
|
|
<ng-content></ng-content>
|
|
</div>
|
|
}
|
|
}
|
|
}
|