1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-16 08:34:39 +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:
Will Martin
2026-01-28 11:36:27 -05:00
committed by GitHub
parent 61225e6015
commit 5dc49f21d2
161 changed files with 764 additions and 529 deletions

View File

@@ -1,6 +1,6 @@
<ng-container>
<div class="tw-size-[70px] tw-content-center" *ngIf="!!IconProviderMap[provider]">
<bit-icon [icon]="IconProviderMap[provider]"></bit-icon>
<bit-svg [content]="IconProviderMap[provider]"></bit-svg>
</div>
<!-- Other 2FA Types (Duo, Yubico, U2F as PNG) -->
<img

View File

@@ -3,7 +3,7 @@
import { Component, Input } from "@angular/core";
import {
Icon,
BitSvg,
TwoFactorAuthAuthenticatorIcon,
TwoFactorAuthEmailIcon,
TwoFactorAuthWebAuthnIcon,
@@ -24,7 +24,7 @@ export class TwoFactorIconComponent {
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() name: string;
protected readonly IconProviderMap: { [key: number | string]: Icon } = {
protected readonly IconProviderMap: { [key: number | string]: BitSvg } = {
0: TwoFactorAuthAuthenticatorIcon,
1: TwoFactorAuthEmailIcon,
7: TwoFactorAuthWebAuthnIcon,

View File

@@ -25,7 +25,7 @@ import { ValidationService } from "@bitwarden/common/platform/abstractions/valid
import {
AnonLayoutWrapperDataService,
ButtonModule,
IconModule,
SvgModule,
LinkModule,
TypographyModule,
} from "@bitwarden/components";
@@ -43,7 +43,7 @@ export type State = "assert" | "assertFailed";
RouterModule,
JslibModule,
ButtonModule,
IconModule,
SvgModule,
LinkModule,
TypographyModule,
],

View File

@@ -11,7 +11,7 @@ import {
DialogModule,
FormFieldModule,
IconButtonModule,
IconModule,
SvgModule,
LinkModule,
MenuModule,
RadioButtonModule,
@@ -73,9 +73,9 @@ import { IconComponent } from "./vault/components/icon.component";
MenuModule,
NoItemsModule,
IconButtonModule,
IconModule,
SvgModule,
LinkModule,
IconModule,
SvgModule,
TextDragDirective,
CopyClickDirective,
A11yTitleDirective,