1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[SM-43] create product-switcher (#4189)

* rebase to master

* use bit-menu in product switcher; add focusStrategy to bit-menu

* recommit locales after rebase

* add light style to iconButton, use in product-switcher

* move out of component library

* add buttonType input

* gate behind sm flag

* update aria-label

* add role input to bit-menu

* style changes

* simplify partition logic

* split into two components for Storybook

* update focus styles; update grid sizing to relative

* fix underline on hover

* update attribute binding

* move to layouts dir

* add bitLink; update grid gap

* reorder loose components

* move orgs mock

* move a11y module

* fix aria role bug; add aria label to menu

* update colors

* update ring color

* simplify colors

* remove duplicate link module
This commit is contained in:
Will Martin
2022-12-21 16:50:41 -05:00
committed by GitHub
parent 7d3063942e
commit eeb407b8a4
22 changed files with 387 additions and 32 deletions

View File

@@ -1 +0,0 @@
<i class="bwi bwi-fw bwi-filter tw-text-2xl"></i>

View File

@@ -1,7 +0,0 @@
import { Component } from "@angular/core";
@Component({
selector: "sm-filter",
templateUrl: "./filter.component.html",
})
export class FilterComponent {}

View File

@@ -4,7 +4,7 @@
<input bitInput class="search tw-w-full" placeholder="{{ routeData.searchTitle | i18n }}" />
</div>
<sm-new-menu></sm-new-menu>
<sm-filter></sm-filter>
<product-switcher></product-switcher>
<ng-container *ngIf="account$ | async as account">
<button [bitMenuTriggerFor]="accountMenu" class="tw-border-0 tw-bg-transparent tw-p-0">
<bit-avatar [id]="account.userId" [text]="account.name || account.email"></bit-avatar>

View File

@@ -1,9 +1,9 @@
import { NgModule } from "@angular/core";
import { ProductSwitcherModule } from "@bitwarden/web-vault/app/layouts/product-switcher/product-switcher.module";
import { SharedModule } from "@bitwarden/web-vault/app/shared";
import { BulkStatusDialogComponent } from "../layout/dialogs/bulk-status-dialog.component";
import { FilterComponent } from "../layout/filter.component";
import { HeaderComponent } from "../layout/header.component";
import { NewMenuComponent } from "../layout/new-menu.component";
import { NoItemsComponent } from "../layout/no-items.component";
@@ -11,11 +11,10 @@ import { NoItemsComponent } from "../layout/no-items.component";
import { SecretsListComponent } from "./secrets-list.component";
@NgModule({
imports: [SharedModule],
imports: [SharedModule, ProductSwitcherModule],
exports: [
SharedModule,
BulkStatusDialogComponent,
FilterComponent,
HeaderComponent,
NewMenuComponent,
NoItemsComponent,
@@ -23,7 +22,6 @@ import { SecretsListComponent } from "./secrets-list.component";
],
declarations: [
BulkStatusDialogComponent,
FilterComponent,
HeaderComponent,
NewMenuComponent,
NoItemsComponent,