From 0b5afa6252e239a5945153bf5fe7401b1e58103a Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Mon, 12 Aug 2024 08:38:11 -0500 Subject: [PATCH] [PM-10731] Move vault icons (#10453) * move NoFolders icon to vault library * move DeactivatedOrg icon to vault library * move Vault icon to vault library * move NoResults icon to vault library * clean up barrel file * Revert "move NoResults icon to vault library" This reverts commit 43abd45db799ca01339f579da3d52a84d64e670e. * re-export no results --- .../src/vault/popup/components/vault/vault-v2.component.ts | 5 +++-- .../browser/src/vault/popup/settings/folders-v2.component.ts | 4 ++-- libs/components/src/icon/icons/index.ts | 3 --- .../src/icon => vault/src}/icons/deactivated-org.ts | 2 +- libs/vault/src/icons/index.ts | 3 +++ libs/{components/src/icon => vault/src}/icons/no-folders.ts | 2 +- libs/{components/src/icon => vault/src}/icons/vault.ts | 2 +- libs/vault/src/index.ts | 2 ++ 8 files changed, 13 insertions(+), 10 deletions(-) rename libs/{components/src/icon => vault/src}/icons/deactivated-org.ts (98%) create mode 100644 libs/vault/src/icons/index.ts rename libs/{components/src/icon => vault/src}/icons/no-folders.ts (98%) rename libs/{components/src/icon => vault/src}/icons/vault.ts (99%) diff --git a/apps/browser/src/vault/popup/components/vault/vault-v2.component.ts b/apps/browser/src/vault/popup/components/vault/vault-v2.component.ts index 11331277a9..97f028895b 100644 --- a/apps/browser/src/vault/popup/components/vault/vault-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault/vault-v2.component.ts @@ -8,6 +8,7 @@ import { JslibModule } from "@bitwarden/angular/jslib.module"; import { CollectionId, OrganizationId } from "@bitwarden/common/types/guid"; import { CipherType } from "@bitwarden/common/vault/enums"; import { ButtonModule, Icons, NoItemsModule } from "@bitwarden/components"; +import { VaultIcons } from "@bitwarden/vault"; import { CurrentAccountComponent } from "../../../../auth/popup/account-switching/current-account.component"; import { PopOutComponent } from "../../../../platform/popup/components/pop-out.component"; @@ -73,8 +74,8 @@ export class VaultV2Component implements OnInit, OnDestroy { /** Visual state of the vault */ protected vaultState: VaultState | null = null; - protected vaultIcon = Icons.Vault; - protected deactivatedIcon = Icons.DeactivatedOrg; + protected vaultIcon = VaultIcons.Vault; + protected deactivatedIcon = VaultIcons.DeactivatedOrg; protected noResultsIcon = Icons.NoResults; protected VaultStateEnum = VaultState; diff --git a/apps/browser/src/vault/popup/settings/folders-v2.component.ts b/apps/browser/src/vault/popup/settings/folders-v2.component.ts index 503484410b..a0fa763313 100644 --- a/apps/browser/src/vault/popup/settings/folders-v2.component.ts +++ b/apps/browser/src/vault/popup/settings/folders-v2.component.ts @@ -10,8 +10,8 @@ import { ButtonModule, DialogService, IconButtonModule, - Icons, } from "@bitwarden/components"; +import { VaultIcons } from "@bitwarden/vault"; import { ItemGroupComponent } from "../../../../../../libs/components/src/item/item-group.component"; import { ItemModule } from "../../../../../../libs/components/src/item/item.module"; @@ -46,7 +46,7 @@ import { NewItemDropdownV2Component } from "../components/vault-v2/new-item-drop export class FoldersV2Component { folders$: Observable; - NoFoldersIcon = Icons.NoFolders; + NoFoldersIcon = VaultIcons.NoFolders; constructor( private folderService: FolderService, diff --git a/libs/components/src/icon/icons/index.ts b/libs/components/src/icon/icons/index.ts index c0a8f3bd1a..0ed0cc1897 100644 --- a/libs/components/src/icon/icons/index.ts +++ b/libs/components/src/icon/icons/index.ts @@ -1,6 +1,3 @@ -export * from "./deactivated-org"; export * from "./search"; export * from "./no-access"; -export * from "./vault"; export * from "./no-results"; -export * from "./no-folders"; diff --git a/libs/components/src/icon/icons/deactivated-org.ts b/libs/vault/src/icons/deactivated-org.ts similarity index 98% rename from libs/components/src/icon/icons/deactivated-org.ts rename to libs/vault/src/icons/deactivated-org.ts index 9bb9577669..7d1871a091 100644 --- a/libs/components/src/icon/icons/deactivated-org.ts +++ b/libs/vault/src/icons/deactivated-org.ts @@ -1,4 +1,4 @@ -import { svgIcon } from "../icon"; +import { svgIcon } from "@bitwarden/components"; export const DeactivatedOrg = svgIcon` diff --git a/libs/vault/src/icons/index.ts b/libs/vault/src/icons/index.ts new file mode 100644 index 0000000000..3bb5c285fb --- /dev/null +++ b/libs/vault/src/icons/index.ts @@ -0,0 +1,3 @@ +export * from "./deactivated-org"; +export * from "./no-folders"; +export * from "./vault"; diff --git a/libs/components/src/icon/icons/no-folders.ts b/libs/vault/src/icons/no-folders.ts similarity index 98% rename from libs/components/src/icon/icons/no-folders.ts rename to libs/vault/src/icons/no-folders.ts index ee69aac1ae..478cb6a6b7 100644 --- a/libs/components/src/icon/icons/no-folders.ts +++ b/libs/vault/src/icons/no-folders.ts @@ -1,4 +1,4 @@ -import { svgIcon } from "../icon"; +import { svgIcon } from "@bitwarden/components"; export const NoFolders = svgIcon` diff --git a/libs/components/src/icon/icons/vault.ts b/libs/vault/src/icons/vault.ts similarity index 99% rename from libs/components/src/icon/icons/vault.ts rename to libs/vault/src/icons/vault.ts index 21e0eda016..4afe0920f7 100644 --- a/libs/components/src/icon/icons/vault.ts +++ b/libs/vault/src/icons/vault.ts @@ -1,4 +1,4 @@ -import { svgIcon } from "../icon"; +import { svgIcon } from "@bitwarden/components"; export const Vault = svgIcon` diff --git a/libs/vault/src/index.ts b/libs/vault/src/index.ts index e9417495a7..d5841c7db0 100644 --- a/libs/vault/src/index.ts +++ b/libs/vault/src/index.ts @@ -12,3 +12,5 @@ export { } from "./components/assign-collections.component"; export { DownloadAttachmentComponent } from "./components/download-attachment/download-attachment.component"; + +export * as VaultIcons from "./icons";