diff --git a/apps/browser/src/autofill/background/abstractions/notification.background.ts b/apps/browser/src/autofill/background/abstractions/notification.background.ts index ac40bb315b..e01e2c5c02 100644 --- a/apps/browser/src/autofill/background/abstractions/notification.background.ts +++ b/apps/browser/src/autofill/background/abstractions/notification.background.ts @@ -1,4 +1,5 @@ import { NeverDomains } from "@bitwarden/common/models/domain/domain-service"; +import { ServerConfig } from "@bitwarden/common/platform/abstractions/config/server-config"; import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { NotificationQueueMessageTypes } from "../../enums/notification-queue-message-type.enum"; @@ -113,6 +114,7 @@ type NotificationBackgroundExtensionMessageHandlers = { bgGetEnableChangedPasswordPrompt: () => Promise; bgGetEnableAddedLoginPrompt: () => Promise; bgGetExcludedDomains: () => Promise; + bgGetActiveUserServerConfig: () => Promise; getWebVaultUrlForNotification: () => Promise; }; diff --git a/apps/browser/src/autofill/background/notification.background.spec.ts b/apps/browser/src/autofill/background/notification.background.spec.ts index 3b05cf57a9..fd15ea6e93 100644 --- a/apps/browser/src/autofill/background/notification.background.spec.ts +++ b/apps/browser/src/autofill/background/notification.background.spec.ts @@ -6,6 +6,7 @@ import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authenticatio import { AuthService } from "@bitwarden/common/auth/services/auth.service"; import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service"; import { UserNotificationSettingsService } from "@bitwarden/common/autofill/services/user-notification-settings.service"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { SelfHostedEnvironment } from "@bitwarden/common/platform/services/default-environment.service"; @@ -54,6 +55,7 @@ describe("NotificationBackground", () => { const environmentService = mock(); const logService = mock(); const themeStateService = mock(); + const configService = mock(); beforeEach(() => { notificationBackground = new NotificationBackground( @@ -68,6 +70,7 @@ describe("NotificationBackground", () => { environmentService, logService, themeStateService, + configService, ); }); diff --git a/apps/browser/src/autofill/background/notification.background.ts b/apps/browser/src/autofill/background/notification.background.ts index c14531ee74..74e6147505 100644 --- a/apps/browser/src/autofill/background/notification.background.ts +++ b/apps/browser/src/autofill/background/notification.background.ts @@ -8,6 +8,8 @@ import { NOTIFICATION_BAR_LIFESPAN_MS } from "@bitwarden/common/autofill/constan import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service"; import { UserNotificationSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/user-notification-settings.service"; import { NeverDomains } from "@bitwarden/common/models/domain/domain-service"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; +import { ServerConfig } from "@bitwarden/common/platform/abstractions/config/server-config"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; @@ -64,6 +66,7 @@ export default class NotificationBackground { bgGetEnableChangedPasswordPrompt: () => this.getEnableChangedPasswordPrompt(), bgGetEnableAddedLoginPrompt: () => this.getEnableAddedLoginPrompt(), bgGetExcludedDomains: () => this.getExcludedDomains(), + bgGetActiveUserServerConfig: () => this.getActiveUserServerConfig(), getWebVaultUrlForNotification: () => this.getWebVaultUrl(), }; @@ -79,6 +82,7 @@ export default class NotificationBackground { private environmentService: EnvironmentService, private logService: LogService, private themeStateService: ThemeStateService, + private configService: ConfigService, ) {} async init() { @@ -112,6 +116,13 @@ export default class NotificationBackground { return await firstValueFrom(this.domainSettingsService.neverDomains$); } + /** + * Gets the active user server config from the config service. + */ + async getActiveUserServerConfig(): Promise { + return await firstValueFrom(this.configService.serverConfig$); + } + /** * Checks the notification queue for any messages that need to be sent to the * specified tab. If no tab is specified, the current tab will be used. diff --git a/apps/browser/src/autofill/content/notification-bar.ts b/apps/browser/src/autofill/content/notification-bar.ts index 8c1ef93c32..2bcf4394fd 100644 --- a/apps/browser/src/autofill/content/notification-bar.ts +++ b/apps/browser/src/autofill/content/notification-bar.ts @@ -1,3 +1,4 @@ +import { ServerConfig } from "../../../../../libs/common/src/platform/abstractions/config/server-config"; import { AddLoginMessageData, ChangePasswordMessageData, @@ -6,12 +7,7 @@ import AutofillField from "../models/autofill-field"; import { WatchedForm } from "../models/watched-form"; import { NotificationBarIframeInitData } from "../notification/abstractions/notification-bar"; import { FormData } from "../services/abstractions/autofill.service"; -import { UserSettings } from "../types"; -import { - getFromLocalStorage, - sendExtensionMessage, - setupExtensionDisconnectAction, -} from "../utils"; +import { sendExtensionMessage, setupExtensionDisconnectAction } from "../utils"; interface HTMLElementWithFormOpId extends HTMLElement { formOpId: string; @@ -95,25 +91,17 @@ async function loadNotificationBar() { ); const enableAddedLoginPrompt = await sendExtensionMessage("bgGetEnableAddedLoginPrompt"); const excludedDomains = await sendExtensionMessage("bgGetExcludedDomains"); + const activeUserServerConfig: ServerConfig = await sendExtensionMessage( + "bgGetActiveUserServerConfig", + ); + const activeUserVault = activeUserServerConfig?.environment?.vault; let showNotificationBar = true; - // Look up the active user id from storage - const activeUserIdKey = "activeUserId"; - let activeUserId: string; - - const activeUserStorageValue = await getFromLocalStorage(activeUserIdKey); - if (activeUserStorageValue[activeUserIdKey]) { - activeUserId = activeUserStorageValue[activeUserIdKey]; - } - - // Look up the user's settings from storage - const userSettingsStorageValue = await getFromLocalStorage(activeUserId); - if (userSettingsStorageValue[activeUserId]) { - const userSettings: UserSettings = userSettingsStorageValue[activeUserId].settings; + if (activeUserVault) { // Do not show the notification bar on the Bitwarden vault // because they can add logins and change passwords there - if (window.location.origin === userSettings.serverConfig.environment.vault) { + if (window.location.origin === activeUserVault) { showNotificationBar = false; } else { // NeverDomains is a dictionary of domains that the user has chosen to never diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index bd4a13b7b2..9e6e66a41d 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -920,6 +920,7 @@ export default class MainBackground { this.environmentService, this.logService, themeStateService, + this.configService, ); this.overlayBackground = new OverlayBackground( this.cipherService, @@ -1156,12 +1157,10 @@ export default class MainBackground { this.cipherService.clear(userId), this.folderService.clear(userId), this.collectionService.clear(userId), - this.policyService.clear(userId), this.passwordGenerationService.clear(userId), this.vaultTimeoutSettingsService.clear(userId), this.vaultFilterService.clear(), this.biometricStateService.logout(userId), - this.providerService.save(null, userId), /* We intentionally do not clear: * - autofillSettingsService * - badgeSettingsService diff --git a/apps/cli/src/bw.ts b/apps/cli/src/bw.ts index 3815fc773b..0e6571f775 100644 --- a/apps/cli/src/bw.ts +++ b/apps/cli/src/bw.ts @@ -702,9 +702,7 @@ export class Main { this.cipherService.clear(userId), this.folderService.clear(userId), this.collectionService.clear(userId as UserId), - this.policyService.clear(userId as UserId), this.passwordGenerationService.clear(), - this.providerService.save(null, userId as UserId), ]); await this.stateEventRunnerService.handleEvent("logout", userId as UserId); diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index 4e74135c49..884296ea29 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -583,9 +583,7 @@ export class AppComponent implements OnInit, OnDestroy { await this.collectionService.clear(userBeingLoggedOut); await this.passwordGenerationService.clear(userBeingLoggedOut); await this.vaultTimeoutSettingsService.clear(userBeingLoggedOut); - await this.policyService.clear(userBeingLoggedOut); await this.biometricStateService.logout(userBeingLoggedOut as UserId); - await this.providerService.save(null, userBeingLoggedOut as UserId); await this.stateEventRunnerService.handleEvent("logout", userBeingLoggedOut as UserId); diff --git a/apps/desktop/src/auth/delete-account.component.html b/apps/desktop/src/auth/delete-account.component.html index 8639b0f5be..42c06b7489 100644 --- a/apps/desktop/src/auth/delete-account.component.html +++ b/apps/desktop/src/auth/delete-account.component.html @@ -7,7 +7,7 @@ {{ "deleteAccountWarning" | i18n }} -
+
- - - - - - - - - + + + + + + + + + `; diff --git a/apps/web/src/app/admin-console/organizations/manage/events.component.ts b/apps/web/src/app/admin-console/organizations/manage/events.component.ts index 20a0ef6e42..9fb9015155 100644 --- a/apps/web/src/app/admin-console/organizations/manage/events.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/events.component.ts @@ -154,7 +154,7 @@ export class EventsComponent extends BaseEventsComponent implements OnInit, OnDe if (r.serviceAccountId) { return { - name: this.i18nService.t("serviceAccount") + " " + this.getShortId(r.serviceAccountId), + name: this.i18nService.t("machineAccount") + " " + this.getShortId(r.serviceAccountId), }; } diff --git a/apps/web/src/app/app.component.ts b/apps/web/src/app/app.component.ts index 32f4ee67e2..628875f04a 100644 --- a/apps/web/src/app/app.component.ts +++ b/apps/web/src/app/app.component.ts @@ -274,7 +274,6 @@ export class AppComponent implements OnDestroy, OnInit { this.cipherService.clear(userId), this.folderService.clear(userId), this.collectionService.clear(userId), - this.policyService.clear(userId), this.passwordGenerationService.clear(), this.biometricStateService.logout(userId as UserId), this.paymentMethodWarningService.clear(), diff --git a/apps/web/src/app/auth/settings/account/change-avatar.component.html b/apps/web/src/app/auth/settings/account/change-avatar.component.html index 38e35399ae..3a974241d5 100644 --- a/apps/web/src/app/auth/settings/account/change-avatar.component.html +++ b/apps/web/src/app/auth/settings/account/change-avatar.component.html @@ -43,10 +43,10 @@ (click)="showCustomPicker()" title="{{ 'customColor' | i18n }}" [ngClass]="{ - '!tw-outline-[3px] tw-outline-primary-500 hover:tw-outline-[3px] hover:tw-outline-primary-500': + '!tw-outline-[3px] tw-outline-primary-600 hover:tw-outline-[3px] hover:tw-outline-primary-600': customColorSelected }" - class="tw-outline-solid tw-bg-white tw-relative tw-flex tw-h-24 tw-w-24 tw-cursor-pointer tw-place-content-center tw-content-center tw-justify-center tw-rounded-full tw-border tw-border-solid tw-border-secondary-500 tw-outline tw-outline-0 tw-outline-offset-1 hover:tw-outline-1 hover:tw-outline-primary-300 focus:tw-outline-2 focus:tw-outline-primary-500" + class="tw-outline-solid tw-bg-white tw-relative tw-flex tw-h-24 tw-w-24 tw-cursor-pointer tw-place-content-center tw-content-center tw-justify-center tw-rounded-full tw-border tw-border-solid tw-border-secondary-600 tw-outline tw-outline-0 tw-outline-offset-1 hover:tw-outline-1 hover:tw-outline-primary-300 focus:tw-outline-2 focus:tw-outline-primary-600" [style.background-color]="customColor$ | async" > {{ "dangerZone" | i18n }} -
+

{{ "dangerZoneDesc" | i18n }}

diff --git a/apps/web/src/app/auth/settings/verify-email.component.html b/apps/web/src/app/auth/settings/verify-email.component.html index 6fd2128651..ccad78348c 100644 --- a/apps/web/src/app/auth/settings/verify-email.component.html +++ b/apps/web/src/app/auth/settings/verify-email.component.html @@ -1,5 +1,5 @@ -
-
+
+
{{ "verifyEmail" | i18n }}
diff --git a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts index 39a2389c5a..65902a64c9 100644 --- a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts +++ b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey-failed.icon.ts @@ -2,27 +2,27 @@ import { svgIcon } from "@bitwarden/components"; export const CreatePasskeyFailedIcon = svgIcon` - - - - - - - - - `; diff --git a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts index c0e984bbee..79ba4021b5 100644 --- a/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts +++ b/apps/web/src/app/auth/settings/webauthn-login-settings/create-credential-dialog/create-passkey.icon.ts @@ -2,25 +2,25 @@ import { svgIcon } from "@bitwarden/components"; export const CreatePasskeyIcon = svgIcon` - - - - - - - - `; diff --git a/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html b/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html index 622a9f6d92..06b1dc7c51 100644 --- a/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html +++ b/apps/web/src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html @@ -14,7 +14,7 @@ class="tw-mr-3.5 tw-w-9 tw-rounded-full tw-font-bold tw-leading-9" *ngIf="!step.completed" [ngClass]="{ - 'tw-bg-primary-500 tw-text-contrast': selected, + 'tw-bg-primary-600 tw-text-contrast': selected, 'tw-bg-secondary-300 tw-text-main': !selected && !disabled && step.editable, 'tw-bg-transparent tw-text-muted': disabled }" @@ -22,7 +22,7 @@ {{ stepNumber }} diff --git a/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html b/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html index c10ef9af28..4c8ea28284 100644 --- a/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html +++ b/apps/web/src/app/billing/organizations/sm-adjust-subscription.component.html @@ -33,7 +33,7 @@ - {{ "additionalServiceAccounts" | i18n }} + {{ "additionalMachineAccounts" | i18n }}
- {{ "includedServiceAccounts" | i18n: options.baseServiceAccountCount }} - {{ "addAdditionalServiceAccounts" | i18n: (monthlyServiceAccountPrice | currency: "$") }} + {{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }} + {{ "addAdditionalMachineAccounts" | i18n: (monthlyServiceAccountPrice | currency: "$") }}
{{ "total" | i18n }}: @@ -56,7 +56,7 @@ - {{ "limitServiceAccounts" | i18n }} + {{ "limitMachineAccounts" | i18n }} - {{ "limitServiceAccountsDesc" | i18n }} + {{ "limitMachineAccountsDesc" | i18n }} - {{ "serviceAccountLimit" | i18n }} + {{ "machineAccountLimit" | i18n }}
- {{ "includedServiceAccounts" | i18n: options.baseServiceAccountCount }} + {{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }}
- {{ "maxServiceAccountCost" | i18n }}: + {{ "maxMachineAccountCost" | i18n }}: {{ maxAdditionalServiceAccounts }} × {{ options.additionalServiceAccountPrice | currency: "$" }} = {{ maxServiceAccountTotalCost | currency: "$" }} / {{ options.interval | i18n }} diff --git a/apps/web/src/app/billing/organizations/subscription-status.component.html b/apps/web/src/app/billing/organizations/subscription-status.component.html index 4bb2c91b85..99673a228e 100644 --- a/apps/web/src/app/billing/organizations/subscription-status.component.html +++ b/apps/web/src/app/billing/organizations/subscription-status.component.html @@ -14,7 +14,7 @@
{{ "billingPlan" | i18n }}
{{ planName }}
- +
{{ data.status.label }}
diff --git a/apps/web/src/app/billing/organizations/subscription-status.component.ts b/apps/web/src/app/billing/organizations/subscription-status.component.ts index 54af940be5..9a0b634edc 100644 --- a/apps/web/src/app/billing/organizations/subscription-status.component.ts +++ b/apps/web/src/app/billing/organizations/subscription-status.component.ts @@ -5,11 +5,11 @@ import { OrganizationSubscriptionResponse } from "@bitwarden/common/billing/mode import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; type ComponentData = { - status: { + status?: { label: string; value: string; }; - date: { + date?: { label: string; value: string; }; @@ -44,13 +44,15 @@ export class SubscriptionStatusComponent { } get status(): string { - return this.subscription.status != "canceled" && this.subscription.cancelAtEndDate - ? "pending_cancellation" - : this.subscription.status; + return this.subscription + ? this.subscription.status != "canceled" && this.subscription.cancelAtEndDate + ? "pending_cancellation" + : this.subscription.status + : "free"; } get subscription() { - return this.organizationSubscriptionResponse.subscription; + return this.organizationSubscriptionResponse?.subscription; } get data(): ComponentData { @@ -61,6 +63,9 @@ export class SubscriptionStatusComponent { const cancellationDateLabel = this.i18nService.t("cancellationDate"); switch (this.status) { + case "free": { + return {}; + } case "trialing": { return { status: { diff --git a/apps/web/src/app/billing/shared/payment.component.ts b/apps/web/src/app/billing/shared/payment.component.ts index 6e34962cb7..652bed7801 100644 --- a/apps/web/src/app/billing/shared/payment.component.ts +++ b/apps/web/src/app/billing/shared/payment.component.ts @@ -287,7 +287,7 @@ export class PaymentComponent implements OnInit, OnDestroy { )})`; this.StripeElementStyle.invalid.color = `rgb(${style.getPropertyValue("--color-text-main")})`; this.StripeElementStyle.invalid.borderColor = `rgb(${style.getPropertyValue( - "--color-danger-500", + "--color-danger-600", )})`; }); } diff --git a/apps/web/src/app/billing/shared/sm-subscribe.component.html b/apps/web/src/app/billing/shared/sm-subscribe.component.html index c9243e29a6..6cdaeb9476 100644 --- a/apps/web/src/app/billing/shared/sm-subscribe.component.html +++ b/apps/web/src/app/billing/shared/sm-subscribe.component.html @@ -20,10 +20,10 @@
  • {{ "unlimitedProjects" | i18n }}
  • -
  • {{ "serviceAccountsIncluded" | i18n: serviceAccountsIncluded }}
  • +
  • {{ "machineAccountsIncluded" | i18n: serviceAccountsIncluded }}
  • {{ - "additionalServiceAccountCost" | i18n: (monthlyCostPerServiceAccount | currency: "$") + "additionalMachineAccountCost" | i18n: (monthlyCostPerServiceAccount | currency: "$") }}
  • @@ -54,12 +54,12 @@
    - {{ "additionalServiceAccounts" | i18n }} + {{ "additionalMachineAccounts" | i18n }} - {{ "includedServiceAccounts" | i18n: serviceAccountsIncluded }} + {{ "includedMachineAccounts" | i18n: serviceAccountsIncluded }} {{ - "addAdditionalServiceAccounts" | i18n: (monthlyCostPerServiceAccount | currency: "$") + "addAdditionalMachineAccounts" | i18n: (monthlyCostPerServiceAccount | currency: "$") }} diff --git a/apps/web/src/app/components/selectable-avatar.component.ts b/apps/web/src/app/components/selectable-avatar.component.ts index 4a138ec989..1de722461a 100644 --- a/apps/web/src/app/components/selectable-avatar.component.ts +++ b/apps/web/src/app/components/selectable-avatar.component.ts @@ -41,13 +41,13 @@ export class SelectableAvatarComponent { .concat(["tw-cursor-pointer", "tw-outline", "tw-outline-solid", "tw-outline-offset-1"]) .concat( this.selected - ? ["tw-outline-[3px]", "tw-outline-primary-500"] + ? ["tw-outline-[3px]", "tw-outline-primary-600"] : [ "tw-outline-0", "hover:tw-outline-1", "hover:tw-outline-primary-300", "focus:tw-outline-2", - "focus:tw-outline-primary-500", + "focus:tw-outline-primary-600", ], ); } diff --git a/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html b/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html index 9068f9c071..f038fafecc 100644 --- a/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html +++ b/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html @@ -14,10 +14,10 @@ [routerLink]="product.appRoute" [ngClass]=" product.isActive - ? 'tw-bg-primary-500 tw-font-bold !tw-text-contrast tw-ring-offset-2 hover:tw-bg-primary-500' + ? 'tw-bg-primary-600 tw-font-bold !tw-text-contrast tw-ring-offset-2 hover:tw-bg-primary-600' : '' " - class="tw-group tw-flex tw-h-24 tw-w-28 tw-flex-col tw-items-center tw-justify-center tw-rounded tw-p-1 tw-text-primary-500 tw-outline-none hover:tw-bg-background-alt hover:tw-text-primary-700 hover:tw-no-underline focus-visible:!tw-ring-2 focus-visible:!tw-ring-primary-700" + class="tw-group tw-flex tw-h-24 tw-w-28 tw-flex-col tw-items-center tw-justify-center tw-rounded tw-p-1 tw-text-primary-600 tw-outline-none hover:tw-bg-background-alt hover:tw-text-primary-700 hover:tw-no-underline focus-visible:!tw-ring-2 focus-visible:!tw-ring-primary-700" ariaCurrentWhenActive="page" > diff --git a/apps/web/src/app/settings/low-kdf.component.html b/apps/web/src/app/settings/low-kdf.component.html index e140f345e9..fd191b21e8 100644 --- a/apps/web/src/app/settings/low-kdf.component.html +++ b/apps/web/src/app/settings/low-kdf.component.html @@ -1,5 +1,5 @@ -
    -
    +
    +
    {{ "lowKdfIterations" | i18n }}
    diff --git a/apps/web/src/app/shared/components/onboarding/onboarding.component.html b/apps/web/src/app/shared/components/onboarding/onboarding.component.html index 6a0bacbf89..ecf1eb75dd 100644 --- a/apps/web/src/app/shared/components/onboarding/onboarding.component.html +++ b/apps/web/src/app/shared/components/onboarding/onboarding.component.html @@ -1,7 +1,7 @@
    - +
    {{ title }}
    diff --git a/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts b/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts index c1529dc81e..4088b7335c 100644 --- a/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts +++ b/apps/web/src/app/shared/components/onboarding/onboarding.stories.ts @@ -39,7 +39,7 @@ const Template: Story = (args) => ({ template: ` diff --git a/apps/web/src/app/tools/send/icons/expired-send.icon.ts b/apps/web/src/app/tools/send/icons/expired-send.icon.ts index b39cdca797..3ce0856a26 100644 --- a/apps/web/src/app/tools/send/icons/expired-send.icon.ts +++ b/apps/web/src/app/tools/send/icons/expired-send.icon.ts @@ -2,10 +2,10 @@ import { svgIcon } from "@bitwarden/components"; export const ExpiredSend = svgIcon` - - - - - + + + + + `; diff --git a/apps/web/src/app/tools/send/icons/no-send.icon.ts b/apps/web/src/app/tools/send/icons/no-send.icon.ts index 7811a4723b..f5494a4b3c 100644 --- a/apps/web/src/app/tools/send/icons/no-send.icon.ts +++ b/apps/web/src/app/tools/send/icons/no-send.icon.ts @@ -2,12 +2,12 @@ import { svgIcon } from "@bitwarden/components"; export const NoSend = svgIcon` - - - - - - - + + + + + + + `; diff --git a/apps/web/src/app/vault/individual-vault/add-edit.component.html b/apps/web/src/app/vault/individual-vault/add-edit.component.html index 85075acfdd..db7a89003d 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit.component.html +++ b/apps/web/src/app/vault/individual-vault/add-edit.component.html @@ -322,7 +322,7 @@ > @@ -80,16 +80,16 @@ - {{ "viewServiceAccount" | i18n }} + {{ "viewMachineAccount" | i18n }} @@ -101,7 +101,7 @@ diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html index 92ebcdbaac..d7a4f2c747 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts.component.html @@ -1,6 +1,6 @@ diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html index 528514e678..457eff37fa 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html @@ -19,6 +19,6 @@ diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts b/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts index 0cad3129a4..f9ddcdad78 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/sm-routing.module.ts @@ -58,7 +58,7 @@ const routes: Routes = [ path: "service-accounts", loadChildren: () => ServiceAccountsModule, data: { - titleId: "serviceAccounts", + titleId: "machineAccounts", }, }, { diff --git a/libs/angular/src/auth/icons/create-passkey-failed.icon.ts b/libs/angular/src/auth/icons/create-passkey-failed.icon.ts index 39a2389c5a..65902a64c9 100644 --- a/libs/angular/src/auth/icons/create-passkey-failed.icon.ts +++ b/libs/angular/src/auth/icons/create-passkey-failed.icon.ts @@ -2,27 +2,27 @@ import { svgIcon } from "@bitwarden/components"; export const CreatePasskeyFailedIcon = svgIcon` - - - - - - - - - `; diff --git a/libs/angular/src/auth/icons/create-passkey.icon.ts b/libs/angular/src/auth/icons/create-passkey.icon.ts index c0e984bbee..79ba4021b5 100644 --- a/libs/angular/src/auth/icons/create-passkey.icon.ts +++ b/libs/angular/src/auth/icons/create-passkey.icon.ts @@ -2,25 +2,25 @@ import { svgIcon } from "@bitwarden/components"; export const CreatePasskeyIcon = svgIcon` - - - - - - - - `; diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index 36182ed9cf..6a0cfde350 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -662,7 +662,7 @@ export class AddEditComponent implements OnInit, OnDestroy { // if a cipher is unassigned we want to check if they are an admin or have permission to edit any collection if (!cipher.collectionIds) { - orgAdmin = this.organization?.canEditAllCiphers(this.flexibleCollectionsV1Enabled); + orgAdmin = this.organization?.canEditUnassignedCiphers(); } return this.cipher.id == null diff --git a/libs/auth/src/angular/icons/user-verification-biometrics-fingerprint.icon.ts b/libs/auth/src/angular/icons/user-verification-biometrics-fingerprint.icon.ts index 1fb994fda1..f661f9330b 100644 --- a/libs/auth/src/angular/icons/user-verification-biometrics-fingerprint.icon.ts +++ b/libs/auth/src/angular/icons/user-verification-biometrics-fingerprint.icon.ts @@ -2,11 +2,11 @@ import { svgIcon } from "@bitwarden/components"; export const UserVerificationBiometricsIcon = svgIcon` - - - - - - + + + + + + `; diff --git a/libs/auth/src/icons/bitwarden-logo.ts b/libs/auth/src/icons/bitwarden-logo.ts index 90591e0fe7..872228e75d 100644 --- a/libs/auth/src/icons/bitwarden-logo.ts +++ b/libs/auth/src/icons/bitwarden-logo.ts @@ -3,7 +3,7 @@ import { svgIcon } from "@bitwarden/components"; export const BitwardenLogo = svgIcon` Bitwarden - - + + `; diff --git a/libs/auth/src/icons/icon-lock.ts b/libs/auth/src/icons/icon-lock.ts index b56c1ea36d..61330fe0df 100644 --- a/libs/auth/src/icons/icon-lock.ts +++ b/libs/auth/src/icons/icon-lock.ts @@ -2,6 +2,6 @@ import { svgIcon } from "@bitwarden/components"; export const IconLock = svgIcon` - + `; diff --git a/libs/common/src/admin-console/abstractions/policy/policy.service.abstraction.ts b/libs/common/src/admin-console/abstractions/policy/policy.service.abstraction.ts index fb805f94cd..21669f78ad 100644 --- a/libs/common/src/admin-console/abstractions/policy/policy.service.abstraction.ts +++ b/libs/common/src/admin-console/abstractions/policy/policy.service.abstraction.ts @@ -78,5 +78,4 @@ export abstract class PolicyService { export abstract class InternalPolicyService extends PolicyService { upsert: (policy: PolicyData) => Promise; replace: (policies: { [id: string]: PolicyData }) => Promise; - clear: (userId?: string) => Promise; } diff --git a/libs/common/src/admin-console/models/domain/organization.ts b/libs/common/src/admin-console/models/domain/organization.ts index 5850f4582e..bdf0b8fbbf 100644 --- a/libs/common/src/admin-console/models/domain/organization.ts +++ b/libs/common/src/admin-console/models/domain/organization.ts @@ -203,8 +203,9 @@ export class Organization { ); } - canUseAdminCollections(flexibleCollectionsV1Enabled: boolean) { - return this.canEditAnyCollection(flexibleCollectionsV1Enabled); + canEditUnassignedCiphers() { + // TODO: Update this to exclude Providers if provider access is restricted in AC-1707 + return this.isAdmin || this.permissions.editAnyCollection; } canEditAllCiphers(flexibleCollectionsV1Enabled: boolean) { diff --git a/libs/common/src/admin-console/services/policy/policy.service.spec.ts b/libs/common/src/admin-console/services/policy/policy.service.spec.ts index 8fa79f4d1c..a1633d29ff 100644 --- a/libs/common/src/admin-console/services/policy/policy.service.spec.ts +++ b/libs/common/src/admin-console/services/policy/policy.service.spec.ts @@ -102,66 +102,6 @@ describe("PolicyService", () => { ]); }); - describe("clear", () => { - beforeEach(() => { - activeUserState.nextState( - arrayToRecord([ - policyData("1", "test-organization", PolicyType.MaximumVaultTimeout, true, { - minutes: 14, - }), - ]), - ); - }); - - it("clears state for the active user", async () => { - await policyService.clear(); - - expect(await firstValueFrom(policyService.policies$)).toEqual([]); - expect(await firstValueFrom(activeUserState.state$)).toEqual(null); - expect(stateProvider.activeUser.getFake(POLICIES).nextMock).toHaveBeenCalledWith([ - "userId", - null, - ]); - }); - - it("clears state for an inactive user", async () => { - const inactiveUserId = "someOtherUserId" as UserId; - const inactiveUserState = stateProvider.singleUser.getFake(inactiveUserId, POLICIES); - inactiveUserState.nextState( - arrayToRecord([ - policyData("10", "another-test-organization", PolicyType.PersonalOwnership, true), - ]), - ); - - await policyService.clear(inactiveUserId); - - // Active user is not affected - const expectedActiveUserPolicy: Partial = { - id: "1" as PolicyId, - organizationId: "test-organization", - type: PolicyType.MaximumVaultTimeout, - enabled: true, - data: { minutes: 14 }, - }; - expect(await firstValueFrom(policyService.policies$)).toEqual([expectedActiveUserPolicy]); - expect(await firstValueFrom(activeUserState.state$)).toEqual({ - "1": expectedActiveUserPolicy, - }); - expect(stateProvider.activeUser.getFake(POLICIES).nextMock).not.toHaveBeenCalled(); - - // Non-active user is cleared - expect( - await firstValueFrom( - policyService.getAll$(PolicyType.PersonalOwnership, "someOtherUserId" as UserId), - ), - ).toEqual([]); - expect(await firstValueFrom(inactiveUserState.state$)).toEqual(null); - expect( - stateProvider.singleUser.getFake("someOtherUserId" as UserId, POLICIES).nextMock, - ).toHaveBeenCalledWith(null); - }); - }); - describe("masterPasswordPolicyOptions", () => { it("returns default policy options", async () => { const data: any = { diff --git a/libs/common/src/admin-console/services/policy/policy.service.ts b/libs/common/src/admin-console/services/policy/policy.service.ts index d60d2e3293..0cbc7204de 100644 --- a/libs/common/src/admin-console/services/policy/policy.service.ts +++ b/libs/common/src/admin-console/services/policy/policy.service.ts @@ -1,6 +1,6 @@ import { combineLatest, firstValueFrom, map, Observable, of } from "rxjs"; -import { KeyDefinition, POLICIES_DISK, StateProvider } from "../../../platform/state"; +import { UserKeyDefinition, POLICIES_DISK, StateProvider } from "../../../platform/state"; import { PolicyId, UserId } from "../../../types/guid"; import { OrganizationService } from "../../abstractions/organization/organization.service.abstraction"; import { InternalPolicyService as InternalPolicyServiceAbstraction } from "../../abstractions/policy/policy.service.abstraction"; @@ -14,8 +14,9 @@ import { ResetPasswordPolicyOptions } from "../../models/domain/reset-password-p const policyRecordToArray = (policiesMap: { [id: string]: PolicyData }) => Object.values(policiesMap || {}).map((f) => new Policy(f)); -export const POLICIES = KeyDefinition.record(POLICIES_DISK, "policies", { +export const POLICIES = UserKeyDefinition.record(POLICIES_DISK, "policies", { deserializer: (policyData) => policyData, + clearOn: ["logout"], }); export class PolicyService implements InternalPolicyServiceAbstraction { @@ -222,10 +223,6 @@ export class PolicyService implements InternalPolicyServiceAbstraction { await this.activeUserPolicyState.update(() => policies); } - async clear(userId?: UserId): Promise { - await this.stateProvider.setUserState(POLICIES, null, userId); - } - /** * Determines whether an orgUser is exempt from a specific policy because of their role * Generally orgUsers who can manage policies are exempt from them, but some policies are stricter diff --git a/libs/common/src/admin-console/services/provider.service.ts b/libs/common/src/admin-console/services/provider.service.ts index 47291a5520..064e0c7175 100644 --- a/libs/common/src/admin-console/services/provider.service.ts +++ b/libs/common/src/admin-console/services/provider.service.ts @@ -1,13 +1,14 @@ import { Observable, map, firstValueFrom, of, switchMap, take } from "rxjs"; -import { KeyDefinition, PROVIDERS_DISK, StateProvider } from "../../platform/state"; +import { UserKeyDefinition, PROVIDERS_DISK, StateProvider } from "../../platform/state"; import { UserId } from "../../types/guid"; import { ProviderService as ProviderServiceAbstraction } from "../abstractions/provider.service"; import { ProviderData } from "../models/data/provider.data"; import { Provider } from "../models/domain/provider"; -export const PROVIDERS = KeyDefinition.record(PROVIDERS_DISK, "providers", { +export const PROVIDERS = UserKeyDefinition.record(PROVIDERS_DISK, "providers", { deserializer: (obj: ProviderData) => obj, + clearOn: ["logout"], }); function mapToSingleProvider(providerId: string) { diff --git a/libs/common/src/tools/generator/state/padded-data-packer.ts b/libs/common/src/tools/generator/state/padded-data-packer.ts index e2f5058b21..d1573e5cb7 100644 --- a/libs/common/src/tools/generator/state/padded-data-packer.ts +++ b/libs/common/src/tools/generator/state/padded-data-packer.ts @@ -58,11 +58,12 @@ export class PaddedDataPacker extends DataPackerAbstraction { /** {@link DataPackerAbstraction.unpack} */ unpack(secret: string): Jsonify { // frame size is stored before the JSON payload in base 10 - const frameBreakpoint = secret.indexOf(DATA_PACKING.divider); - if (frameBreakpoint < 1) { + const frameEndIndex = secret.indexOf(DATA_PACKING.divider); + if (frameEndIndex < 1) { throw new Error("missing frame size"); } - const frameSize = parseInt(secret.slice(0, frameBreakpoint), 10); + const frameSize = parseInt(secret.slice(0, frameEndIndex), 10); + const dataStartIndex = frameEndIndex + 1; // The decrypted string should be a multiple of the frame length if (secret.length % frameSize > 0) { @@ -70,20 +71,20 @@ export class PaddedDataPacker extends DataPackerAbstraction { } // encoded data terminates with the divider, followed by the padding character - const jsonBreakpoint = secret.lastIndexOf(DATA_PACKING.divider); - if (jsonBreakpoint == frameBreakpoint) { + const dataEndIndex = secret.lastIndexOf(DATA_PACKING.divider); + if (dataEndIndex == frameEndIndex) { throw new Error("missing json object"); } - const paddingBegins = jsonBreakpoint + 1; + const paddingStartIndex = dataEndIndex + 1; // If the padding contains invalid padding characters then the padding could be used // as a side channel for arbitrary data. - if (secret.slice(paddingBegins).match(DATA_PACKING.hasInvalidPadding)) { + if (secret.slice(paddingStartIndex).match(DATA_PACKING.hasInvalidPadding)) { throw new Error("invalid padding"); } // remove frame size and padding - const b64 = secret.substring(frameBreakpoint, paddingBegins); + const b64 = secret.slice(dataStartIndex, dataEndIndex); // unpack the stored data const json = Utils.fromB64ToUtf8(b64); diff --git a/libs/components/src/avatar/avatar.component.ts b/libs/components/src/avatar/avatar.component.ts index 429e9fc0c6..b19506952d 100644 --- a/libs/components/src/avatar/avatar.component.ts +++ b/libs/components/src/avatar/avatar.component.ts @@ -40,7 +40,7 @@ export class AvatarComponent implements OnChanges { get classList() { return ["tw-rounded-full"] .concat(SizeClasses[this.size] ?? []) - .concat(this.border ? ["tw-border", "tw-border-solid", "tw-border-secondary-500"] : []); + .concat(this.border ? ["tw-border", "tw-border-solid", "tw-border-secondary-600"] : []); } private generate() { diff --git a/libs/components/src/avatar/avatar.mdx b/libs/components/src/avatar/avatar.mdx index c6c5ff78ba..0f3f6f06a9 100644 --- a/libs/components/src/avatar/avatar.mdx +++ b/libs/components/src/avatar/avatar.mdx @@ -44,7 +44,7 @@ Use the user 'ID' field if `Name` is not defined. ## Outline If the avatar is displayed on one of the theme's `background` color variables or is interactive, -display the avatar with a 1 pixel `secondary-500` border to meet WCAG AA graphic contrast guidelines +display the avatar with a 1 pixel `secondary-600` border to meet WCAG AA graphic contrast guidelines for interactive elements. @@ -64,4 +64,4 @@ When the avatar is used as a button, the following states should be used: ## Accessibility Avatar background color should have 3.1:1 contrast with it’s background; or include the -`secondary-500` border Avatar text should have 4.5:1 contrast with the avatar background color +`secondary-600` border Avatar text should have 4.5:1 contrast with the avatar background color diff --git a/libs/components/src/badge/badge.directive.ts b/libs/components/src/badge/badge.directive.ts index dd28d86ae8..b81b9f80e2 100644 --- a/libs/components/src/badge/badge.directive.ts +++ b/libs/components/src/badge/badge.directive.ts @@ -3,12 +3,12 @@ import { Directive, ElementRef, HostBinding, Input } from "@angular/core"; export type BadgeVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info"; const styles: Record = { - primary: ["tw-bg-primary-500"], + primary: ["tw-bg-primary-600"], secondary: ["tw-bg-text-muted"], - success: ["tw-bg-success-500"], - danger: ["tw-bg-danger-500"], - warning: ["tw-bg-warning-500"], - info: ["tw-bg-info-500"], + success: ["tw-bg-success-600"], + danger: ["tw-bg-danger-600"], + warning: ["tw-bg-warning-600"], + info: ["tw-bg-info-600"], }; const hoverStyles: Record = { diff --git a/libs/components/src/banner/banner.component.ts b/libs/components/src/banner/banner.component.ts index e93bcb2214..099fa11fa4 100644 --- a/libs/components/src/banner/banner.component.ts +++ b/libs/components/src/banner/banner.component.ts @@ -28,13 +28,13 @@ export class BannerComponent implements OnInit { get bannerClass() { switch (this.bannerType) { case "danger": - return "tw-bg-danger-500"; + return "tw-bg-danger-600"; case "info": - return "tw-bg-info-500"; + return "tw-bg-info-600"; case "premium": - return "tw-bg-success-500"; + return "tw-bg-success-600"; case "warning": - return "tw-bg-warning-500"; + return "tw-bg-warning-600"; } } } diff --git a/libs/components/src/button/button.component.spec.ts b/libs/components/src/button/button.component.spec.ts index a0b9c1e7a5..a75ac400a9 100644 --- a/libs/components/src/button/button.component.spec.ts +++ b/libs/components/src/button/button.component.spec.ts @@ -30,8 +30,8 @@ describe("Button", () => { it("should apply classes based on type", () => { testAppComponent.buttonType = "primary"; fixture.detectChanges(); - expect(buttonDebugElement.nativeElement.classList.contains("tw-bg-primary-500")).toBe(true); - expect(linkDebugElement.nativeElement.classList.contains("tw-bg-primary-500")).toBe(true); + expect(buttonDebugElement.nativeElement.classList.contains("tw-bg-primary-600")).toBe(true); + expect(linkDebugElement.nativeElement.classList.contains("tw-bg-primary-600")).toBe(true); testAppComponent.buttonType = "secondary"; fixture.detectChanges(); @@ -40,8 +40,8 @@ describe("Button", () => { testAppComponent.buttonType = "danger"; fixture.detectChanges(); - expect(buttonDebugElement.nativeElement.classList.contains("tw-border-danger-500")).toBe(true); - expect(linkDebugElement.nativeElement.classList.contains("tw-border-danger-500")).toBe(true); + expect(buttonDebugElement.nativeElement.classList.contains("tw-border-danger-600")).toBe(true); + expect(linkDebugElement.nativeElement.classList.contains("tw-border-danger-600")).toBe(true); testAppComponent.buttonType = "unstyled"; fixture.detectChanges(); diff --git a/libs/components/src/button/button.component.ts b/libs/components/src/button/button.component.ts index 414d4e5913..3cbacb4731 100644 --- a/libs/components/src/button/button.component.ts +++ b/libs/components/src/button/button.component.ts @@ -12,13 +12,13 @@ const focusRing = [ const buttonStyles: Record = { primary: [ - "tw-border-primary-500", - "tw-bg-primary-500", + "tw-border-primary-600", + "tw-bg-primary-600", "!tw-text-contrast", "hover:tw-bg-primary-700", "hover:tw-border-primary-700", - "disabled:tw-bg-primary-500/60", - "disabled:tw-border-primary-500/60", + "disabled:tw-bg-primary-600/60", + "disabled:tw-border-primary-600/60", "disabled:!tw-text-contrast/60", "disabled:tw-bg-clip-padding", "disabled:tw-cursor-not-allowed", @@ -39,13 +39,13 @@ const buttonStyles: Record = { ], danger: [ "tw-bg-transparent", - "tw-border-danger-500", + "tw-border-danger-600", "!tw-text-danger", - "hover:tw-bg-danger-500", - "hover:tw-border-danger-500", + "hover:tw-bg-danger-600", + "hover:tw-border-danger-600", "hover:!tw-text-contrast", "disabled:tw-bg-transparent", - "disabled:tw-border-danger-500/60", + "disabled:tw-border-danger-600/60", "disabled:!tw-text-danger/60", "disabled:tw-cursor-not-allowed", ...focusRing, diff --git a/libs/components/src/callout/callout.component.ts b/libs/components/src/callout/callout.component.ts index 7ce79071bf..6942d4bc15 100644 --- a/libs/components/src/callout/callout.component.ts +++ b/libs/components/src/callout/callout.component.ts @@ -42,13 +42,13 @@ export class CalloutComponent implements OnInit { get calloutClass() { switch (this.type) { case "danger": - return "tw-border-l-danger-500"; + return "tw-border-l-danger-600"; case "info": - return "tw-border-l-info-500"; + return "tw-border-l-info-600"; case "success": - return "tw-border-l-success-500"; + return "tw-border-l-success-600"; case "warning": - return "tw-border-l-warning-500"; + return "tw-border-l-warning-600"; } } diff --git a/libs/components/src/checkbox/checkbox.component.ts b/libs/components/src/checkbox/checkbox.component.ts index bbc288659c..d8fd3f76ea 100644 --- a/libs/components/src/checkbox/checkbox.component.ts +++ b/libs/components/src/checkbox/checkbox.component.ts @@ -20,7 +20,7 @@ export class CheckboxComponent implements BitFormControlAbstraction { "tw-rounded", "tw-border", "tw-border-solid", - "tw-border-secondary-500", + "tw-border-secondary-600", "tw-h-3.5", "tw-w-3.5", "tw-mr-1.5", @@ -43,8 +43,8 @@ export class CheckboxComponent implements BitFormControlAbstraction { "disabled:tw-border", "disabled:tw-bg-secondary-100", - "checked:tw-bg-primary-500", - "checked:tw-border-primary-500", + "checked:tw-bg-primary-600", + "checked:tw-border-primary-600", "checked:hover:tw-bg-primary-700", "checked:hover:tw-border-primary-700", "[&>label:hover]:checked:tw-bg-primary-700", @@ -59,8 +59,8 @@ export class CheckboxComponent implements BitFormControlAbstraction { "[&:not(:indeterminate)]:checked:before:tw-mask-image-[var(--mask-image)]", "indeterminate:before:tw-mask-image-[var(--indeterminate-mask-image)]", - "indeterminate:tw-bg-primary-500", - "indeterminate:tw-border-primary-500", + "indeterminate:tw-bg-primary-600", + "indeterminate:tw-border-primary-600", "indeterminate:hover:tw-bg-primary-700", "indeterminate:hover:tw-border-primary-700", "[&>label:hover]:indeterminate:tw-bg-primary-700", diff --git a/libs/components/src/color-password/color-password.component.ts b/libs/components/src/color-password/color-password.component.ts index 4c32d0af0d..efa2ab687f 100644 --- a/libs/components/src/color-password/color-password.component.ts +++ b/libs/components/src/color-password/color-password.component.ts @@ -30,7 +30,7 @@ export class ColorPasswordComponent { [CharacterType.Emoji]: [], [CharacterType.Letter]: ["tw-text-main"], [CharacterType.Special]: ["tw-text-danger"], - [CharacterType.Number]: ["tw-text-primary-500"], + [CharacterType.Number]: ["tw-text-primary-600"], }; @HostBinding("class") diff --git a/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts b/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts index e93498ec48..1438c7926e 100644 --- a/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts +++ b/libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts @@ -15,7 +15,7 @@ const DEFAULT_ICON: Record = { }; const DEFAULT_COLOR: Record = { - primary: "tw-text-primary-500", + primary: "tw-text-primary-600", success: "tw-text-success", info: "tw-text-info", warning: "tw-text-warning", diff --git a/libs/components/src/dialog/simple-dialog/simple-dialog.mdx b/libs/components/src/dialog/simple-dialog/simple-dialog.mdx index 5e45b7bef6..a78ba4650a 100644 --- a/libs/components/src/dialog/simple-dialog/simple-dialog.mdx +++ b/libs/components/src/dialog/simple-dialog/simple-dialog.mdx @@ -33,11 +33,11 @@ the simple dialog's type is specified. | type | icon name | icon | color | | ------- | ------------------------ | -------------------------------------------- | ----------- | -| primary | bwi-business | | primary-500 | -| success | bwi-star | | success-500 | -| info | bwi-info-circle | | info-500 | -| warning | bwi-exclamation-triangle | | warning-500 | -| danger | bwi-error | | danger-500 | +| primary | bwi-business | | primary-600 | +| success | bwi-star | | success-600 | +| info | bwi-info-circle | | info-600 | +| warning | bwi-exclamation-triangle | | warning-600 | +| danger | bwi-error | | danger-600 | ## Scrolling Content diff --git a/libs/components/src/form-field/prefix.directive.ts b/libs/components/src/form-field/prefix.directive.ts index 62643c8bb7..6e1e15fd20 100644 --- a/libs/components/src/form-field/prefix.directive.ts +++ b/libs/components/src/form-field/prefix.directive.ts @@ -6,7 +6,7 @@ export const PrefixClasses = [ "tw-bg-background-alt", "tw-border", "tw-border-solid", - "tw-border-secondary-500", + "tw-border-secondary-600", "tw-text-muted", "tw-rounded-none", ]; diff --git a/libs/components/src/form/forms.mdx b/libs/components/src/form/forms.mdx index 0845156561..a42ddccbe6 100644 --- a/libs/components/src/form/forms.mdx +++ b/libs/components/src/form/forms.mdx @@ -174,5 +174,5 @@ the field’s label. - All field inputs are interactive elements that must follow the WCAG graphic contrast guidelines. Maintain a ratio of 3:1 with the form's background. -- Error styling should not rely only on using the `danger-500`color change. Use +- Error styling should not rely only on using the `danger-600`color change. Use as a prefix to highlight the text as error text versus helper diff --git a/libs/components/src/icon-button/icon-button.component.ts b/libs/components/src/icon-button/icon-button.component.ts index 73872926f8..53e8032795 100644 --- a/libs/components/src/icon-button/icon-button.component.ts +++ b/libs/components/src/icon-button/icon-button.component.ts @@ -60,15 +60,15 @@ const styles: Record = { ...focusRing, ], primary: [ - "tw-bg-primary-500", + "tw-bg-primary-600", "!tw-text-contrast", - "tw-border-primary-500", + "tw-border-primary-600", "hover:tw-bg-primary-700", "hover:tw-border-primary-700", "focus-visible:before:tw-ring-primary-700", "disabled:tw-opacity-60", - "disabled:hover:tw-border-primary-500", - "disabled:hover:tw-bg-primary-500", + "disabled:hover:tw-border-primary-600", + "disabled:hover:tw-bg-primary-600", ...focusRing, ], secondary: [ @@ -88,15 +88,15 @@ const styles: Record = { danger: [ "tw-bg-transparent", "!tw-text-danger", - "tw-border-danger-500", + "tw-border-danger-600", "hover:!tw-text-contrast", - "hover:tw-bg-danger-500", + "hover:tw-bg-danger-600", "focus-visible:before:tw-ring-primary-700", "disabled:tw-opacity-60", - "disabled:hover:tw-border-danger-500", + "disabled:hover:tw-border-danger-600", "disabled:hover:tw-bg-transparent", "disabled:hover:!tw-text-danger", - "disabled:hover:tw-border-danger-500", + "disabled:hover:tw-border-danger-600", ...focusRing, ], light: [ diff --git a/libs/components/src/icon-button/icon-button.stories.ts b/libs/components/src/icon-button/icon-button.stories.ts index 19bc972a70..0f25d2de58 100644 --- a/libs/components/src/icon-button/icon-button.stories.ts +++ b/libs/components/src/icon-button/icon-button.stories.ts @@ -30,7 +30,7 @@ export const Default: Story = { -
    +
    @@ -111,7 +111,7 @@ export const Contrast: Story = { render: (args) => ({ props: args, template: ` -
    +
    `, diff --git a/libs/components/src/icon/icons/no-access.ts b/libs/components/src/icon/icons/no-access.ts index f9ad048752..1011b3089c 100644 --- a/libs/components/src/icon/icons/no-access.ts +++ b/libs/components/src/icon/icons/no-access.ts @@ -2,11 +2,11 @@ import { svgIcon } from "../icon"; export const NoAccess = svgIcon` - - - - - - + + + + + + `; diff --git a/libs/components/src/icon/icons/search.ts b/libs/components/src/icon/icons/search.ts index de41dd3b19..914fa0e981 100644 --- a/libs/components/src/icon/icons/search.ts +++ b/libs/components/src/icon/icons/search.ts @@ -4,15 +4,15 @@ export const Search = svgIcon` - - - - - - - - - + + + + + + + + + `; diff --git a/libs/components/src/input/input.directive.ts b/libs/components/src/input/input.directive.ts index 9bd110704e..27c7d8175d 100644 --- a/libs/components/src/input/input.directive.ts +++ b/libs/components/src/input/input.directive.ts @@ -29,7 +29,7 @@ export class BitInputDirective implements BitFormFieldControl { "tw-bg-background-alt", "tw-border", "tw-border-solid", - this.hasError ? "tw-border-danger-500" : "tw-border-secondary-500", + this.hasError ? "tw-border-danger-600" : "tw-border-secondary-600", "tw-text-main", "tw-placeholder-text-muted", // Rounded diff --git a/libs/components/src/link/link.directive.ts b/libs/components/src/link/link.directive.ts index 6d923acf3d..a8ee528da1 100644 --- a/libs/components/src/link/link.directive.ts +++ b/libs/components/src/link/link.directive.ts @@ -4,10 +4,10 @@ export type LinkType = "primary" | "secondary" | "contrast" | "light"; const linkStyles: Record = { primary: [ - "!tw-text-primary-500", - "hover:!tw-text-primary-500", + "!tw-text-primary-600", + "hover:!tw-text-primary-600", "focus-visible:before:tw-ring-primary-700", - "disabled:!tw-text-primary-500/60", + "disabled:!tw-text-primary-600/60", ], secondary: [ "!tw-text-main", diff --git a/libs/components/src/link/link.mdx b/libs/components/src/link/link.mdx index 48c8c2abd5..100824277a 100644 --- a/libs/components/src/link/link.mdx +++ b/libs/components/src/link/link.mdx @@ -6,7 +6,7 @@ import * as stories from "./link.stories"; # Link / Text button -Text Links and Buttons use the `primary-500` color and can use either the `` or `
    @@ -61,7 +61,7 @@ export const Anchors: StoryObj = { render: (args) => ({ props: args, template: ` -
    +
    @@ -108,7 +108,7 @@ export const Disabled: Story = { template: ` -
    +
    `, diff --git a/libs/components/src/menu/menu-divider.component.html b/libs/components/src/menu/menu-divider.component.html index 98048261cf..7d9fee3e8f 100644 --- a/libs/components/src/menu/menu-divider.component.html +++ b/libs/components/src/menu/menu-divider.component.html @@ -1,5 +1,5 @@ diff --git a/libs/components/src/menu/menu-item.directive.ts b/libs/components/src/menu/menu-item.directive.ts index 2a50dd366f..77246bbcdf 100644 --- a/libs/components/src/menu/menu-item.directive.ts +++ b/libs/components/src/menu/menu-item.directive.ts @@ -16,12 +16,12 @@ export class MenuItemDirective implements FocusableOption { "tw-bg-background", "tw-text-left", "hover:tw-bg-secondary-100", - "focus:tw-bg-secondary-100", - "focus:tw-z-50", - "focus:tw-outline-none", - "focus:tw-ring", - "focus:tw-ring-offset-2", - "focus:tw-ring-primary-700", + "focus-visible:tw-bg-secondary-100", + "focus-visible:tw-z-50", + "focus-visible:tw-outline-none", + "focus-visible:tw-ring", + "focus-visible:tw-ring-offset-2", + "focus-visible:tw-ring-primary-700", "active:!tw-ring-0", "active:!tw-ring-offset-0", ]; diff --git a/libs/components/src/menu/menu.component.html b/libs/components/src/menu/menu.component.html index 98a35e97de..5b6b15b5cb 100644 --- a/libs/components/src/menu/menu.component.html +++ b/libs/components/src/menu/menu.component.html @@ -1,7 +1,7 @@