Skip to content

Commit

Permalink
PM-11217: Update colors to new design spec (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-livefront authored Sep 25, 2024
1 parent 5d1d057 commit ad3cf96
Show file tree
Hide file tree
Showing 572 changed files with 1,097 additions and 664 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
"blue" : "0xF9",
"green" : "0xF6",
"red" : "0xF3"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x1E",
"green" : "0x1C",
"red" : "0x1C"
"blue" : "0x27",
"green" : "0x1A",
"red" : "0x12"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct CompleteRegistrationView: View {
Image(decorative: Asset.Images.questionRound)
.resizable()
.frame(width: 24, height: 24)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 0) {
Text(Localizations.whatMakesAPasswordStrong)
Expand All @@ -115,13 +115,13 @@ struct CompleteRegistrationView: View {
} label: {
Text(Localizations.learnMore)
.styleGuide(.subheadline)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.textInteraction.swiftUIColor)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
}
.padding(16)
.background(Asset.Colors.backgroundTertiary.swiftUIColor)
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.clipShape(RoundedRectangle(cornerRadius: 10))
}

Expand Down Expand Up @@ -167,7 +167,7 @@ struct CompleteRegistrationView: View {
store.send(.preventAccountLockTapped)
} label: {
Text(Localizations.learnAboutWaysToPreventAccountLockout)
.foregroundColor(Color(asset: Asset.Colors.primaryBitwardenLight))
.foregroundColor(Asset.Colors.textInteraction.swiftUIColor)
.styleGuide(.footnote, weight: .bold)
.multilineTextAlignment(.leading)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct ExpiredLinkView: View {
VStack(alignment: .center, spacing: 0) {
Image(decorative: Asset.Images.expiredLink)
.frame(maxWidth: .infinity)
.foregroundColor(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundColor(Asset.Colors.iconSecondary.swiftUIColor)
.padding([.bottom, .top], 32)

Text(Localizations.expiredLink)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct MasterPasswordGuidanceView: View {

detailedInstructionsView
}
.background(Asset.Colors.backgroundTertiary.swiftUIColor)
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.clipShape(RoundedRectangle(cornerRadius: 10))

passwordGeneratorButton
Expand Down Expand Up @@ -80,7 +80,7 @@ struct MasterPasswordGuidanceView: View {
Image(decorative: Asset.Images.restart2)
.resizable()
.frame(width: 24, height: 24)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 0) {
Text(Localizations.useTheGeneratorToCreateAStrongUniquePassword)
Expand All @@ -90,16 +90,16 @@ struct MasterPasswordGuidanceView: View {

Text(Localizations.tryItOut)
.styleGuide(.subheadline)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.textInteraction.swiftUIColor)
}
.frame(maxWidth: .infinity, alignment: .leading)
}

Image(decorative: Asset.Images.rightAngle)
.foregroundStyle(Asset.Colors.textSecondary.swiftUIColor)
.foregroundStyle(Asset.Colors.iconPrimary.swiftUIColor)
}
.padding(16)
.background(Asset.Colors.backgroundTertiary.swiftUIColor)
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.clipShape(RoundedRectangle(cornerRadius: 10))
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct PreventAccountLockView: View {

writeDownInstructions
}
.background(Asset.Colors.backgroundTertiary.swiftUIColor)
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.scrollView()
Expand Down Expand Up @@ -59,7 +59,7 @@ struct PreventAccountLockView: View {
Image(decorative: Asset.Images.lightbulb)
.resizable()
.frame(width: 32, height: 32)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 4) {
Text(Localizations.createAHint)
Expand All @@ -84,7 +84,7 @@ struct PreventAccountLockView: View {
Image(decorative: Asset.Images.pencil)
.resizable()
.frame(width: 32, height: 32)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.iconSecondary.swiftUIColor)

VStack(alignment: .leading, spacing: 4) {
Text(Localizations.writeYourPasswordDown)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 24 additions & 20 deletions BitwardenShared/UI/Auth/IntroCarousel/IntroCarouselView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,35 @@ struct IntroCarouselView: View {
@ViewBuilder imageContent: () -> some View,
@ViewBuilder textContent: () -> some View
) -> some View {
if verticalSizeClass == .regular {
VStack(spacing: 80) {
imageContent()
textContent()
}
.padding(.vertical, 16)
.frame(maxWidth: .infinity, minHeight: minHeight)
.scrollView(addVerticalPadding: false)
} else {
HStack(alignment: .top, spacing: 40) {
VStack(spacing: 0) {
Spacer(minLength: 0)
Group {
if verticalSizeClass == .regular {
VStack(spacing: 80) {
imageContent()
.padding(.leading, 36)
.padding(.vertical, 16)
Spacer(minLength: 0)
textContent()
}
.frame(minHeight: minHeight)
.padding(.vertical, 16)
.frame(maxWidth: .infinity, minHeight: minHeight)
} else {
HStack(alignment: .top, spacing: 40) {
VStack(spacing: 0) {
Spacer(minLength: 0)
imageContent()
.padding(.leading, 36)
.padding(.vertical, 16)
Spacer(minLength: 0)
}
.frame(minHeight: minHeight)

textContent()
.padding(.vertical, 16)
.frame(maxWidth: .infinity, minHeight: minHeight)
.scrollView(addVerticalPadding: false)
textContent()
.padding(.vertical, 16)
.frame(maxWidth: .infinity, minHeight: minHeight)
}
}
}
.scrollView(
addVerticalPadding: false,
backgroundColor: Asset.Colors.backgroundSecondary.swiftUIColor
)
}

/// A view that displays a carousel page.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions BitwardenShared/UI/Auth/Landing/LandingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ struct LandingView: View {
Button(Localizations.createAccount) {
store.send(.createAccountPressed)
}
.foregroundColor(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundColor(Asset.Colors.textInteraction.swiftUIColor)
}
.styleGuide(.footnote)
}
.padding([.horizontal, .bottom], 16)
}
.background(Asset.Colors.backgroundSecondary.swiftUIColor.ignoresSafeArea())
.background(Asset.Colors.backgroundPrimary.swiftUIColor.ignoresSafeArea())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,24 @@ struct LoginDecryptionOptionsView: View {
await store.perform(.notYouPressed)
}
.accessibilityIdentifier("NotYouButton")
.foregroundColor(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundColor(Asset.Colors.textInteraction.swiftUIColor)
}
.styleGuide(.footnote)
.padding(.top, 24)
}
}

// MARK: - Previews

#if DEBUG
#Preview {
NavigationView {
LoginDecryptionOptionsView(store: Store(processor: StateProcessor(
state: LoginDecryptionOptionsState(
shouldShowContinueButton: true,
email: "[email protected]"
)
)))
}
}
#endif
6 changes: 3 additions & 3 deletions BitwardenShared/UI/Auth/Login/LoginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct LoginView: View {
.padding(.top, 16)
.frame(maxWidth: .infinity)
}
.background(Asset.Colors.backgroundSecondary.swiftUIColor.ignoresSafeArea())
.background(Asset.Colors.backgroundPrimary.swiftUIColor.ignoresSafeArea())
.navigationTitle(Localizations.bitwarden)
.navigationBarTitleDisplayMode(.inline)
.navigationBarBackButtonHidden(true)
Expand Down Expand Up @@ -71,7 +71,7 @@ struct LoginView: View {
}
.styleGuide(.subheadline)
.accessibilityIdentifier("GetMasterPasswordHintLabel")
.foregroundColor(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundColor(Asset.Colors.textInteraction.swiftUIColor)
}
}

Expand Down Expand Up @@ -128,7 +128,7 @@ struct LoginView: View {
store.send(.notYouPressed)
}
.accessibilityIdentifier("NotYouLabel")
.foregroundColor(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundColor(Asset.Colors.textInteraction.swiftUIColor)
}
.styleGuide(.footnote)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct LoginWithDeviceView: View {
store.send(.dismiss)
}
.styleGuide(.subheadline)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.textInteraction.swiftUIColor)
.accessibilityIdentifier("ViewAllLoginOptionsButton")
}
}
Expand All @@ -72,7 +72,7 @@ struct LoginWithDeviceView: View {

Text(store.state.fingerprintPhrase ?? "")
.styleGuide(.bodyMonospaced)
.foregroundStyle(Asset.Colors.fingerprint.swiftUIColor)
.foregroundStyle(Asset.Colors.textCodePink.swiftUIColor)
.multilineTextAlignment(.leading)
.accessibilityIdentifier("FingerprintPhraseValue")
}
Expand All @@ -85,7 +85,7 @@ struct LoginWithDeviceView: View {
await store.perform(.resendNotification)
}
.styleGuide(.body)
.foregroundStyle(Asset.Colors.primaryBitwarden.swiftUIColor)
.foregroundStyle(Asset.Colors.textInteraction.swiftUIColor)
.accessibilityIdentifier("ResendNotificationButton")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct PasswordHintView: View {
}
.padding(16)
}
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.background(Asset.Colors.backgroundPrimary.swiftUIColor)
.navigationTitle(Localizations.passwordHint)
.toolbar {
cancelToolbarItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SwiftUI
/// Part of `ProfileSwitcherState`.
struct ProfileSwitcherItem: Equatable, Hashable {
/// The color associated with the profile
var color: Color = .init(asset: Asset.Colors.primaryBitwardenLight).opacity(0.12)
var color: Color = Asset.Colors.backgroundTertiary.swiftUIColor

/// The account's email.
var email: String
Expand Down
10 changes: 5 additions & 5 deletions BitwardenShared/UI/Auth/ProfileSwitcher/ProfileSwitcherRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct ProfileSwitcherRow: View {
}
.padding([.leading], 16)
}
.background(Asset.Colors.backgroundPrimary.swiftUIColor)
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
}

/// A row divider view
Expand All @@ -94,7 +94,7 @@ struct ProfileSwitcherRow: View {
Rectangle()
.frame(height: 1.0)
.frame(maxWidth: .infinity)
.foregroundColor(Asset.Colors.separatorOpaque.swiftUIColor)
.foregroundColor(Asset.Colors.strokeDivider.swiftUIColor)
} else {
EmptyView()
}
Expand All @@ -113,7 +113,7 @@ struct ProfileSwitcherRow: View {
.accessibilityLabel(Localizations.account)
case .addAccount:
Asset.Images.plus.swiftUIImage
.imageStyle(.rowIcon(color: Asset.Colors.primaryBitwarden.swiftUIColor))
.imageStyle(.rowIcon(color: Asset.Colors.iconSecondary.swiftUIColor))
.padding(4)
}
}
Expand Down Expand Up @@ -183,11 +183,11 @@ struct ProfileSwitcherRow: View {
private var trailingIconColor: Color {
switch store.state.rowType {
case .active:
Asset.Colors.primaryBitwarden.swiftUIColor
Asset.Colors.iconPrimary.swiftUIColor
case .alternate:
Asset.Colors.textSecondary.swiftUIColor
case .addAccount:
Asset.Colors.backgroundPrimary.swiftUIColor
Asset.Colors.backgroundSecondary.swiftUIColor
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ extension View {
.accessibilityHidden(initials != nil)
}
}
.foregroundColor(textColor ?? Asset.Colors.primaryBitwarden.swiftUIColor)
.background(color ?? Asset.Colors.primaryBitwarden.swiftUIColor.opacity(0.12))
.foregroundColor(textColor ?? Asset.Colors.textInteraction.swiftUIColor)
.background(color ?? Asset.Colors.backgroundTertiary.swiftUIColor)
.clipShape(Circle())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct ProfileSwitcherView: View {
addAccountRow
}
}
.background(Asset.Colors.backgroundPrimary.swiftUIColor)
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.transition(.move(edge: .top))
.hidden(!store.state.isVisible)
.fixedSize(horizontal: false, vertical: true)
Expand Down Expand Up @@ -67,7 +67,7 @@ struct ProfileSwitcherView: View {
ZStack(alignment: .top) {
Color.black.opacity(0.4)
.ignoresSafeArea()
Asset.Colors.backgroundPrimary.swiftUIColor
Asset.Colors.backgroundSecondary.swiftUIColor
.frame(height: abs(min(scrollOffset.y, 0)))
.fixedSize(horizontal: false, vertical: true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct SetMasterPasswordView: View {
}
.padding(16)
}
.background(Asset.Colors.backgroundSecondary.swiftUIColor)
.background(Asset.Colors.backgroundPrimary.swiftUIColor)
.navigationTitle(Localizations.setMasterPassword)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
Expand Down
Loading

0 comments on commit ad3cf96

Please sign in to comment.