mirror of
https://github.com/bitwarden/browser
synced 2026-02-21 20:04:02 +00:00
[CL-82] rename bit-icon to bit-svg; create new bit-icon component for font icons (#18584)
* rename bit-icon to bit-svg; create new bit-icon for font icons Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * find and replace current usage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * add custom eslint warning Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix incorrect usage * fix tests * fix tests * Update libs/components/src/svg/index.ts Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * Update libs/eslint/components/no-bwi-class-usage.spec.mjs Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * update component api * update class name * use icon type in iconButton component * update type Icon --> BitSvg * fix bad renames * fix more renames * fix bad input * revert iconButton type * fix lint * fix more inputs * misc fixes Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix test * add eslint ignore * fix lint * add comparison story --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
committed by
jaasen-livefront
parent
67ff1e1d85
commit
de2f4a04fc
@@ -10,7 +10,7 @@ import {
|
||||
ButtonModule,
|
||||
CheckboxModule,
|
||||
FormFieldModule,
|
||||
IconModule,
|
||||
SvgModule,
|
||||
IconTileComponent,
|
||||
LinkModule,
|
||||
CalloutComponent,
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
templateUrl: "phishing-warning.component.html",
|
||||
imports: [
|
||||
CommonModule,
|
||||
IconModule,
|
||||
SvgModule,
|
||||
JslibModule,
|
||||
LinkModule,
|
||||
FormFieldModule,
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
type="button"
|
||||
role="link"
|
||||
>
|
||||
<bit-icon
|
||||
[icon]="rla.isActive ? button.iconActive : button.icon"
|
||||
<bit-svg
|
||||
[content]="rla.isActive ? button.iconActive : button.icon"
|
||||
aria-hidden="true"
|
||||
class="tw-leading-3"
|
||||
></bit-icon>
|
||||
></bit-svg>
|
||||
<span class="tw-text-sm tw-truncate tw-max-w-full">
|
||||
{{ button.label | i18n }}
|
||||
</span>
|
||||
|
||||
@@ -3,15 +3,15 @@ import { Component, Input } from "@angular/core";
|
||||
import { RouterModule } from "@angular/router";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { Icon } from "@bitwarden/assets/svg";
|
||||
import { BitSvg } from "@bitwarden/assets/svg";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { IconModule, LinkModule } from "@bitwarden/components";
|
||||
import { SvgModule, LinkModule } from "@bitwarden/components";
|
||||
|
||||
export type NavButton = {
|
||||
label: string;
|
||||
page: string;
|
||||
icon: Icon;
|
||||
iconActive: Icon;
|
||||
icon: BitSvg;
|
||||
iconActive: BitSvg;
|
||||
showBerry?: boolean;
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ export type NavButton = {
|
||||
@Component({
|
||||
selector: "popup-tab-navigation",
|
||||
templateUrl: "popup-tab-navigation.component.html",
|
||||
imports: [CommonModule, LinkModule, RouterModule, JslibModule, IconModule],
|
||||
imports: [CommonModule, LinkModule, RouterModule, JslibModule, SvgModule],
|
||||
host: {
|
||||
class: "tw-block tw-size-full tw-flex tw-flex-col",
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[pageTitle]="''"
|
||||
>
|
||||
<div class="tw-w-32">
|
||||
<bit-icon *ngIf="showLogo" [icon]="logo" [ariaLabel]="'appLogoLabel' | i18n"></bit-icon>
|
||||
<bit-svg *ngIf="showLogo" [content]="logo" [ariaLabel]="'appLogoLabel' | i18n"></bit-svg>
|
||||
</div>
|
||||
|
||||
<ng-container slot="end">
|
||||
|
||||
@@ -5,10 +5,10 @@ import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute, Data, NavigationEnd, Router, RouterModule } from "@angular/router";
|
||||
import { Subject, filter, switchMap, takeUntil, tap } from "rxjs";
|
||||
|
||||
import { BitwardenLogo, Icon } from "@bitwarden/assets/svg";
|
||||
import { BitwardenLogo, BitSvg } from "@bitwarden/assets/svg";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import {
|
||||
IconModule,
|
||||
SvgModule,
|
||||
Translation,
|
||||
AnonLayoutComponent,
|
||||
AnonLayoutWrapperData,
|
||||
@@ -38,7 +38,7 @@ export interface ExtensionAnonLayoutWrapperData extends AnonLayoutWrapperData {
|
||||
CommonModule,
|
||||
CurrentAccountComponent,
|
||||
I18nPipe,
|
||||
IconModule,
|
||||
SvgModule,
|
||||
PopOutComponent,
|
||||
PopupPageComponent,
|
||||
PopupHeaderComponent,
|
||||
@@ -54,7 +54,7 @@ export class ExtensionAnonLayoutWrapperComponent implements OnInit, OnDestroy {
|
||||
|
||||
protected pageTitle: string;
|
||||
protected pageSubtitle: string;
|
||||
protected pageIcon: Icon;
|
||||
protected pageIcon: BitSvg;
|
||||
protected showReadonlyHostname: boolean;
|
||||
protected maxWidth: "md" | "3xl";
|
||||
protected hasLoggedInAccount: boolean = false;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
class="tw-flex tw-bg-background-alt tw-flex-col tw-justify-center tw-items-center tw-gap-2 tw-h-full tw-px-5"
|
||||
>
|
||||
<div class="tw-size-[95px] tw-content-center">
|
||||
<bit-icon [icon]="sendCreatedIcon"></bit-icon>
|
||||
<bit-svg [content]="sendCreatedIcon"></bit-svg>
|
||||
</div>
|
||||
<h3 tabindex="0" appAutofocus class="tw-font-medium">
|
||||
{{ "createdSendSuccessfully" | i18n }}
|
||||
|
||||
@@ -14,7 +14,7 @@ import { SelfHostedEnvironment } from "@bitwarden/common/platform/services/defau
|
||||
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||
import { SendType } from "@bitwarden/common/tools/send/types/send-type";
|
||||
import { ButtonModule, I18nMockService, IconModule, ToastService } from "@bitwarden/components";
|
||||
import { ButtonModule, I18nMockService, SvgModule, ToastService } from "@bitwarden/components";
|
||||
|
||||
import { PopOutComponent } from "../../../../platform/popup/components/pop-out.component";
|
||||
import { PopupFooterComponent } from "../../../../platform/popup/layout/popup-footer.component";
|
||||
@@ -76,7 +76,7 @@ describe("SendCreatedComponent", () => {
|
||||
RouterTestingModule,
|
||||
JslibModule,
|
||||
ButtonModule,
|
||||
IconModule,
|
||||
SvgModule,
|
||||
PopOutComponent,
|
||||
PopupHeaderComponent,
|
||||
PopupPageComponent,
|
||||
|
||||
@@ -13,7 +13,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||
import { ButtonModule, IconModule, ToastService } from "@bitwarden/components";
|
||||
import { ButtonModule, SvgModule, ToastService } from "@bitwarden/components";
|
||||
|
||||
import { PopOutComponent } from "../../../../platform/popup/components/pop-out.component";
|
||||
import { PopupFooterComponent } from "../../../../platform/popup/layout/popup-footer.component";
|
||||
@@ -34,7 +34,7 @@ import { PopupPageComponent } from "../../../../platform/popup/layout/popup-page
|
||||
PopupPageComponent,
|
||||
RouterModule,
|
||||
PopupFooterComponent,
|
||||
IconModule,
|
||||
SvgModule,
|
||||
],
|
||||
})
|
||||
export class SendCreatedComponent {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<vault-carousel-slide [label]="'securityPrioritized' | i18n" [disablePadding]="true">
|
||||
<div class="tw-flex tw-flex-col tw-items-center tw-justify-around">
|
||||
<div class="tw-size-32 tw-content-center tw-my-4">
|
||||
<bit-icon [icon]="itemTypes"></bit-icon>
|
||||
<bit-svg [content]="itemTypes"></bit-svg>
|
||||
</div>
|
||||
<h2 bitTypography="h2" class="tw-text-center">{{ "securityPrioritized" | i18n }}</h2>
|
||||
<p bitTypography="body1" class="tw-text-center">{{ "securityPrioritizedBody" | i18n }}</p>
|
||||
@@ -11,7 +11,7 @@
|
||||
<vault-carousel-slide [label]="'quickLogin' | i18n" [disablePadding]="true">
|
||||
<div class="tw-flex tw-flex-col tw-items-center tw-justify-around">
|
||||
<div class="tw-size-32 tw-content-center tw-my-4">
|
||||
<bit-icon [icon]="loginCards"></bit-icon>
|
||||
<bit-svg [content]="loginCards"></bit-svg>
|
||||
</div>
|
||||
<h2 bitTypography="h2" class="tw-text-center">{{ "quickLogin" | i18n }}</h2>
|
||||
<p bitTypography="body1" class="tw-text-center">{{ "quickLoginBody" | i18n }}</p>
|
||||
@@ -20,7 +20,7 @@
|
||||
<vault-carousel-slide [label]="'secureUser' | i18n" [disablePadding]="true">
|
||||
<div class="tw-flex tw-flex-col tw-items-center tw-justify-around">
|
||||
<div class="tw-size-32 tw-content-center tw-my-4">
|
||||
<bit-icon [icon]="noCredentials"></bit-icon>
|
||||
<bit-svg [content]="noCredentials"></bit-svg>
|
||||
</div>
|
||||
<h2 bitTypography="h2" class="tw-text-center">{{ "secureUser" | i18n }}</h2>
|
||||
<p bitTypography="body1" class="tw-text-center">{{ "secureUserBody" | i18n }}</p>
|
||||
@@ -29,7 +29,7 @@
|
||||
<vault-carousel-slide [label]="'secureDevices' | i18n" [disablePadding]="true">
|
||||
<div class="tw-flex tw-flex-col tw-items-center tw-justify-around">
|
||||
<div class="tw-size-32 tw-content-center tw-my-4">
|
||||
<bit-icon [icon]="secureDevices"></bit-icon>
|
||||
<bit-svg [content]="secureDevices"></bit-svg>
|
||||
</div>
|
||||
<h2 bitTypography="h2" class="tw-text-center">{{ "secureDevices" | i18n }}</h2>
|
||||
<p bitTypography="body1" class="tw-text-center">{{ "secureDevicesBody" | i18n }}</p>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Router } from "@angular/router";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { ItemTypes, LoginCards, NoCredentialsIcon, DevicesIcon } from "@bitwarden/assets/svg";
|
||||
import { ButtonModule, DialogModule, IconModule, TypographyModule } from "@bitwarden/components";
|
||||
import { ButtonModule, DialogModule, SvgModule, TypographyModule } from "@bitwarden/components";
|
||||
import { I18nPipe } from "@bitwarden/ui-common";
|
||||
import { VaultCarouselModule } from "@bitwarden/vault";
|
||||
|
||||
@@ -17,7 +17,7 @@ import { IntroCarouselService } from "../../../services/intro-carousel.service";
|
||||
imports: [
|
||||
VaultCarouselModule,
|
||||
ButtonModule,
|
||||
IconModule,
|
||||
SvgModule,
|
||||
DialogModule,
|
||||
TypographyModule,
|
||||
JslibModule,
|
||||
|
||||
Reference in New Issue
Block a user