From e63c4806f11d7be29c81b596258a59163152f40c Mon Sep 17 00:00:00 2001 From: David Perez Date: Tue, 1 Oct 2024 13:11:57 -0500 Subject: [PATCH] Migrate all references of MaterialTheme Typography to BitwardenTheme (#4007) --- .../accountsetup/SetupAutofillScreen.kt | 4 +- .../accountsetup/SetupCompleteScreen.kt | 4 +- .../feature/accountsetup/SetupUnlockScreen.kt | 9 +- .../feature/checkemail/CheckEmailScreen.kt | 12 +- .../CompleteRegistrationScreen.kt | 8 +- .../PasswordStrengthIndicator.kt | 4 +- .../createaccount/CreateAccountScreen.kt | 9 +- .../EnterpriseSignOnScreen.kt | 3 +- .../ExpiredRegistrationLinkScreen.kt | 4 +- .../ui/auth/feature/landing/LandingScreen.kt | 5 +- .../ui/auth/feature/login/LoginScreen.kt | 7 +- .../loginwithdevice/LoginWithDeviceScreen.kt | 18 +- .../MasterPasswordGeneratorScreen.kt | 7 +- .../MasterPasswordGuidanceScreen.kt | 10 +- .../MasterPasswordHintScreen.kt | 4 +- .../PreventAccountLockoutScreen.kt | 8 +- .../removepassword/RemovePasswordScreen.kt | 2 +- .../resetpassword/ResetPasswordScreen.kt | 6 +- .../feature/setpassword/SetPasswordScreen.kt | 5 +- .../StartRegistrationScreen.kt | 10 +- .../trusteddevice/TrustedDeviceScreen.kt | 4 +- .../twofactorlogin/TwoFactorLoginScreen.kt | 2 +- .../feature/vaultunlock/VaultUnlockScreen.kt | 7 +- .../ui/auth/feature/welcome/WelcomeScreen.kt | 9 +- .../bitwarden/ui/platform/base/util/Text.kt | 5 +- .../account/BitwardenAccountSwitcher.kt | 11 +- .../appbar/BitwardenMediumTopAppBar.kt | 3 +- .../components/appbar/BitwardenTopAppBar.kt | 4 +- .../action/BitwardenOverflowActionItem.kt | 2 +- .../components/badge/NotificationBadge.kt | 3 +- .../button/BitwardenFilledButton.kt | 4 +- .../button/BitwardenFilledButtonWithIcon.kt | 3 +- .../button/BitwardenFilledErrorButton.kt | 2 +- .../button/BitwardenFilledTonalButton.kt | 2 +- .../BitwardenFilledTonalButtonWithIcon.kt | 2 +- .../button/BitwardenOutlinedButton.kt | 4 +- .../button/BitwardenOutlinedButtonWithIcon.kt | 4 +- .../button/BitwardenOutlinedErrorButton.kt | 3 +- .../components/button/BitwardenTextButton.kt | 4 +- .../components/card/BitwardenActionCard.kt | 4 +- .../content/BitwardenErrorContent.kt | 3 +- .../components/dialog/BitwardenBasicDialog.kt | 4 +- .../dialog/BitwardenDateSelectButton.kt | 7 +- .../dialog/BitwardenMasterPasswordDialog.kt | 5 +- .../components/dialog/BitwardenPinDialog.kt | 3 +- .../dialog/BitwardenSelectionDialog.kt | 3 +- .../dialog/BitwardenTextEntryDialog.kt | 3 +- .../dialog/BitwardenTimePickerDialog.kt | 7 +- .../dialog/BitwardenTimeSelectButton.kt | 3 +- .../dialog/BitwardenTwoButtonDialog.kt | 5 +- .../dialog/row/BitwardenBasicDialogRow.kt | 3 +- .../dialog/row/BitwardenSelectionRow.kt | 3 +- .../dropdown/BitwardenMultiSelectButton.kt | 4 +- .../dropdown/EnvironmentSelector.kt | 5 +- .../field/BitwardenHiddenPasswordField.kt | 2 +- .../field/BitwardenPasswordField.kt | 6 +- .../components/field/BitwardenTextField.kt | 3 +- .../header/BitwardenListHeaderText.kt | 2 +- ...twardenListHeaderTextWithSupportingText.kt | 4 +- .../BitwardenCircularCountdownIndicator.kt | 3 +- .../components/listitem/BitwardenGroupItem.kt | 4 +- .../components/listitem/BitwardenListItem.kt | 6 +- .../components/row/BitwardenTextRow.kt | 5 +- .../components/text/BitwardenPolicyWarning.kt | 3 +- .../components/toggle/BitwardenSwitch.kt | 5 +- .../components/toggle/BitwardenWideSwitch.kt | 4 +- .../feature/debugmenu/DebugMenuScreen.kt | 2 +- .../feature/search/SearchEmptyContent.kt | 3 +- .../feature/settings/SettingsScreen.kt | 2 +- .../feature/settings/about/AboutScreen.kt | 4 +- .../accountsecurity/AccountSecurityScreen.kt | 14 +- .../accountsecurity/PinInputDialog.kt | 5 +- .../deleteaccount/DeleteAccountScreen.kt | 5 +- .../DeleteAccountConfirmationScreen.kt | 4 +- .../loginapproval/LoginApprovalScreen.kt | 14 +- .../pendingrequests/PendingRequestsScreen.kt | 12 +- .../settings/appearance/AppearanceScreen.kt | 5 +- .../settings/autofill/AutoFillScreen.kt | 3 +- .../blockautofill/AddEditBlockedUriDialog.kt | 3 +- .../blockautofill/BlockAutoFillScreen.kt | 7 +- .../settings/exportvault/ExportVaultScreen.kt | 5 +- .../feature/settings/folders/FoldersScreen.kt | 5 +- .../feature/settings/other/OtherScreen.kt | 7 +- .../ui/platform/theme/BitwardenTheme.kt | 10 +- .../x8bit/bitwarden/ui/platform/theme/Type.kt | 282 ------------------ .../feature/generator/GeneratorScreen.kt | 3 +- .../PasswordHistoryListItem.kt | 5 +- .../passwordhistory/PasswordHistoryScreen.kt | 6 +- .../ui/tools/feature/send/SendEmpty.kt | 4 +- .../feature/send/addsend/AddSendContent.kt | 27 +- .../addsend/AddSendDeletionDateChooser.kt | 3 +- .../addsend/AddSendExpirationDateChooser.kt | 3 +- .../components/CollectionItemSelector.kt | 3 +- .../feature/attachments/AttachmentsContent.kt | 11 +- .../item/VaultItemAttachmentContent.kt | 7 +- .../feature/item/VaultItemLoginContent.kt | 5 +- .../item/VaultItemSecureNoteContent.kt | 5 +- .../vault/feature/item/VaultItemUpdateText.kt | 5 +- .../itemlisting/VaultItemListingEmpty.kt | 4 +- .../manualcodeentry/ManualCodeEntryScreen.kt | 10 +- .../VaultMoveToOrganizationContent.kt | 3 +- .../VaultMoveToOrganizationEmpty.kt | 3 +- .../feature/qrcodescan/QrCodeScanScreen.kt | 9 +- .../ui/vault/feature/vault/VaultFilter.kt | 3 +- .../ui/vault/feature/vault/VaultNoItems.kt | 3 +- .../verificationcode/VerificationCodeItem.kt | 6 +- docs/ARCHITECTURE.md | 2 +- 107 files changed, 305 insertions(+), 543 deletions(-) delete mode 100644 app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Type.kt diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupAutofillScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupAutofillScreen.kt index 4e788b2ea..0fedded4b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupAutofillScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupAutofillScreen.kt @@ -220,14 +220,14 @@ private fun OrderedHeaderContent() { ) { Text( text = stringResource(R.string.turn_on_autofill), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, ) Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(R.string.use_autofill_to_log_into_your_accounts), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center, // Apply similar line breaks to design diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupCompleteScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupCompleteScreen.kt index 12aa9be60..34afdee99 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupCompleteScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupCompleteScreen.kt @@ -91,7 +91,7 @@ private fun SetupCompleteContent( Spacer(Modifier.height(24.dp)) Text( text = stringResource(R.string.youre_all_set), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier @@ -101,7 +101,7 @@ private fun SetupCompleteContent( Spacer(Modifier.height(8.dp)) Text( text = stringResource(R.string.what_bitwarden_has_to_offer), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center, modifier = Modifier diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupUnlockScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupUnlockScreen.kt index acc33aac3..166c76a74 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupUnlockScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/accountsetup/SetupUnlockScreen.kt @@ -54,6 +54,7 @@ import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenUnlockWithPinS import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalBiometricsManager import com.x8bit.bitwarden.ui.platform.manager.biometrics.BiometricsManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.isPortrait /** @@ -227,7 +228,7 @@ private fun ColumnScope.SetupUnlockHeaderPortrait() { Spacer(modifier = Modifier.height(height = 24.dp)) Text( text = stringResource(id = R.string.set_up_unlock), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier @@ -241,7 +242,7 @@ private fun ColumnScope.SetupUnlockHeaderPortrait() { text = stringResource( id = R.string.set_up_biometrics_or_choose_a_pin_code_to_quickly_access_your_vault_and_autofill_your_logins, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier @@ -273,7 +274,7 @@ private fun SetupUnlockHeaderLandscape( ) { Text( text = stringResource(id = R.string.set_up_unlock), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth(), @@ -285,7 +286,7 @@ private fun SetupUnlockHeaderLandscape( text = stringResource( id = R.string.set_up_biometrics_or_choose_a_pin_code_to_quickly_access_your_vault_and_autofill_your_logins, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth(), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/checkemail/CheckEmailScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/checkemail/CheckEmailScreen.kt index e2d48c204..3776479bc 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/checkemail/CheckEmailScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/checkemail/CheckEmailScreen.kt @@ -150,7 +150,7 @@ private fun CheckEmailContent( Text( text = stringResource(id = R.string.check_your_email), textAlign = TextAlign.Center, - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .padding(horizontal = 8.dp) @@ -167,7 +167,7 @@ private fun CheckEmailContent( highlights = listOf(email), highlightStyle = SpanStyle( color = MaterialTheme.colorScheme.onSurface, - fontSize = MaterialTheme.typography.bodyMedium.fontSize, + fontSize = BitwardenTheme.typography.bodyMedium.fontSize, fontWeight = FontWeight.Bold, ), tag = "EMAIL", @@ -175,7 +175,7 @@ private fun CheckEmailContent( Text( text = descriptionAnnotatedString, textAlign = TextAlign.Center, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .padding(horizontal = 8.dp) .fillMaxWidth() @@ -185,7 +185,7 @@ private fun CheckEmailContent( @Suppress("MaxLineLength") Text( text = stringResource(R.string.select_the_link_in_the_email_to_verify_your_email_address_and_continue_creating_your_account), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier @@ -238,7 +238,7 @@ private fun CheckEmailLegacyContent( Text( text = stringResource(id = R.string.check_your_email), textAlign = TextAlign.Center, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .padding(horizontal = 24.dp) @@ -256,7 +256,7 @@ private fun CheckEmailLegacyContent( highlights = listOf(email), highlightStyle = SpanStyle( color = MaterialTheme.colorScheme.onSurface, - fontSize = MaterialTheme.typography.bodyMedium.fontSize, + fontSize = BitwardenTheme.typography.bodyMedium.fontSize, fontWeight = FontWeight.Bold, ), tag = "EMAIL", diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationScreen.kt index 692b4f161..559a4737f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationScreen.kt @@ -301,7 +301,7 @@ private fun CompleteRegistrationContent( id = R.string.learn_about_other_ways_to_prevent_account_lockout, ), onClick = handler.onLearnToPreventLockout, - style = MaterialTheme.typography.labelMedium, + style = BitwardenTheme.typography.labelMedium, modifier = Modifier.standardHorizontalMargin(), ) } @@ -361,7 +361,7 @@ private fun LegacyHeaderContent( id = R.string.follow_the_instructions_in_the_email_sent_to_x_to_continue_creating_your_account, userEmail, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = modifier .fillMaxWidth(), @@ -385,7 +385,7 @@ private fun OrderedHeaderContent() { ) { Text( text = stringResource(R.string.choose_your_master_password), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, ) @@ -394,7 +394,7 @@ private fun OrderedHeaderContent() { text = stringResource( R.string.choose_a_unique_and_strong_password_to_keep_your_information_safe, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/PasswordStrengthIndicator.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/PasswordStrengthIndicator.kt index 8c7507f7f..b8d428348 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/PasswordStrengthIndicator.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/PasswordStrengthIndicator.kt @@ -111,7 +111,7 @@ fun PasswordStrengthIndicator( } Text( text = label(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = indicatorColor, ) } @@ -156,7 +156,7 @@ private fun MinimumCharacterCount( Text( text = stringResource(R.string.minimum_characters, minimumCharacterCount), color = characterCountColor, - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreen.kt index 906637b2e..4732a1228 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountScreen.kt @@ -80,6 +80,7 @@ import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenSwitch import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Top level composable for the create account screen. @@ -324,7 +325,7 @@ private fun TermsAndPrivacySwitch( Column(Modifier.padding(start = 16.dp, top = 4.dp, bottom = 4.dp)) { Text( text = stringResource(id = R.string.accept_policies), - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) FlowRow( @@ -337,13 +338,13 @@ private fun TermsAndPrivacySwitch( BitwardenClickableText( label = stringResource(id = R.string.terms_of_service), onClick = onTermsClick, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, innerPadding = PaddingValues(vertical = 4.dp, horizontal = 0.dp), color = MaterialTheme.colorScheme.primary, ) Text( text = ",", - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.primary, modifier = Modifier.padding(vertical = 4.dp), ) @@ -351,7 +352,7 @@ private fun TermsAndPrivacySwitch( BitwardenClickableText( label = stringResource(id = R.string.privacy_policy), onClick = onPrivacyPolicyClick, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, innerPadding = PaddingValues(vertical = 4.dp, horizontal = 0.dp), color = MaterialTheme.colorScheme.primary, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/enterprisesignon/EnterpriseSignOnScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/enterprisesignon/EnterpriseSignOnScreen.kt index dc6336556..0f4cefebd 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/enterprisesignon/EnterpriseSignOnScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/enterprisesignon/EnterpriseSignOnScreen.kt @@ -40,6 +40,7 @@ import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * The top level composable for the Enterprise Single Sign On screen. @@ -155,7 +156,7 @@ private fun EnterpriseSignOnScreenContent( Text( text = stringResource(id = R.string.log_in_sso_summary), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkScreen.kt index abb663e35..981d1dfc1 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/expiredregistrationlink/ExpiredRegistrationLinkScreen.kt @@ -107,7 +107,7 @@ private fun ExpiredRegistrationLinkContent( Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(R.string.expired_link), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier @@ -117,7 +117,7 @@ private fun ExpiredRegistrationLinkContent( Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(R.string.please_restart_registration_or_try_logging_in), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center, modifier = Modifier diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreen.kt index cbb8f2b69..bef0031c0 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingScreen.kt @@ -54,6 +54,7 @@ import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenSwitch import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.collections.immutable.toImmutableList /** @@ -236,7 +237,7 @@ private fun LandingScreenContent( Text( text = stringResource(id = R.string.login_or_create_new_account), textAlign = TextAlign.Center, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .padding(horizontal = 24.dp) @@ -304,7 +305,7 @@ private fun LandingScreenContent( ) { Text( text = stringResource(id = R.string.new_around_here), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/login/LoginScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/login/LoginScreen.kt index 67fc315b6..cf5740e5c 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/login/LoginScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/login/LoginScreen.kt @@ -53,6 +53,7 @@ import com.x8bit.bitwarden.ui.platform.components.text.BitwardenClickableText import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList @@ -252,7 +253,7 @@ private fun LoginScreenContent( BitwardenClickableText( label = stringResource(id = R.string.get_master_passwordword_hint), onClick = onMasterPasswordClick, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, modifier = Modifier .padding(horizontal = 16.dp) .testTag("GetMasterPasswordHintLabel"), @@ -305,7 +306,7 @@ private fun LoginScreenContent( state.environmentLabel, ), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .testTag("LoggingInAsLabel") @@ -316,7 +317,7 @@ private fun LoginScreenContent( BitwardenClickableText( label = stringResource(id = R.string.not_you), onClick = onNotYouButtonClick, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), modifier = Modifier.testTag("NotYouLabel"), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt index 2c2e9ab70..951c9ec24 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt @@ -47,8 +47,8 @@ import com.x8bit.bitwarden.ui.platform.components.text.BitwardenClickableText import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialColors -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography /** * The top level composable for the Login with Device screen. @@ -145,7 +145,7 @@ private fun LoginWithDeviceScreenContent( Text( text = state.title(), textAlign = TextAlign.Start, - style = MaterialTheme.typography.headlineMedium, + style = BitwardenTheme.typography.headlineMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -157,7 +157,7 @@ private fun LoginWithDeviceScreenContent( Text( text = state.subtitle(), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -169,7 +169,7 @@ private fun LoginWithDeviceScreenContent( Text( text = state.description(), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -181,7 +181,7 @@ private fun LoginWithDeviceScreenContent( Text( text = stringResource(id = R.string.fingerprint_phrase), textAlign = TextAlign.Start, - style = MaterialTheme.typography.titleLarge, + style = BitwardenTheme.typography.titleLarge, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -194,7 +194,7 @@ private fun LoginWithDeviceScreenContent( text = state.fingerprintPhrase, textAlign = TextAlign.Start, color = LocalNonMaterialColors.current.fingerprint, - style = LocalNonMaterialTypography.current.sensitiveInfoSmall, + style = BitwardenTheme.typography.sensitiveInfoSmall, minLines = 2, modifier = Modifier .testTag("FingerprintPhraseValue") @@ -219,7 +219,7 @@ private fun LoginWithDeviceScreenContent( BitwardenClickableText( modifier = Modifier.testTag("ResendNotificationButton"), label = stringResource(id = R.string.resend_notification), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), onClick = onResendNotificationClick, ) @@ -232,7 +232,7 @@ private fun LoginWithDeviceScreenContent( Text( text = state.otherOptions(), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -243,7 +243,7 @@ private fun LoginWithDeviceScreenContent( modifier = Modifier.testTag("ViewAllLoginOptionsButton"), label = stringResource(id = R.string.view_all_login_options), innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, onClick = onViewAllLogInOptionsClick, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordgenerator/MasterPasswordGeneratorScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordgenerator/MasterPasswordGeneratorScreen.kt index 2a16fbaea..2758c6b7a 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordgenerator/MasterPasswordGeneratorScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordgenerator/MasterPasswordGeneratorScreen.kt @@ -42,7 +42,6 @@ import com.x8bit.bitwarden.ui.platform.components.text.BitwardenClickableText import com.x8bit.bitwarden.ui.platform.components.util.nonLetterColorVisualTransformation import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography /** * Top level composable for the master password generator. @@ -151,7 +150,7 @@ private fun MasterPasswordGeneratorContent( onValueChange = {}, readOnly = true, shouldAddCustomLineBreaks = true, - textStyle = LocalNonMaterialTypography.current.sensitiveInfoSmall, + textStyle = BitwardenTheme.typography.sensitiveInfoSmall, visualTransformation = nonLetterColorVisualTransformation(), modifier = Modifier.fillMaxWidth(), ) @@ -166,12 +165,12 @@ private fun MasterPasswordGeneratorContent( Spacer(modifier = Modifier.height(12.dp)) Text( text = stringResource(R.string.write_this_password_down_and_keep_it_somewhere_safe), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) BitwardenClickableText( label = stringResource(R.string.learn_about_other_ways_to_prevent_account_lockout), - style = MaterialTheme.typography.labelMedium, + style = BitwardenTheme.typography.labelMedium, color = MaterialTheme.colorScheme.primary, onClick = onLearnToPreventLockout, innerPadding = PaddingValues(horizontal = 0.dp, vertical = 4.dp), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordguidance/MasterPasswordGuidanceScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordguidance/MasterPasswordGuidanceScreen.kt index aedb52ec9..1ad1b2f2b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordguidance/MasterPasswordGuidanceScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordguidance/MasterPasswordGuidanceScreen.kt @@ -103,12 +103,12 @@ fun MasterPasswordGuidanceScreen( Text( text = stringResource(R.string.what_makes_a_password_strong), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, ) Spacer(modifier = Modifier.height(8.dp)) Text( - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, text = stringResource( R.string.the_longer_your_password_the_more_difficult_to_hack, @@ -123,7 +123,7 @@ fun MasterPasswordGuidanceScreen( ) { Text( text = stringResource(R.string.the_strongest_passwords_are_usually), - style = MaterialTheme.typography.titleSmall, + style = BitwardenTheme.typography.titleSmall, color = MaterialTheme.colorScheme.onSurface, ) Spacer(modifier = Modifier.height(8.dp)) @@ -193,13 +193,13 @@ private fun BulletTextRow( Text( text = BULLET_TWO_TAB, textAlign = TextAlign.Center, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.clearAndSetSemantics { }, ) Text( text = text, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordhint/MasterPasswordHintScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordhint/MasterPasswordHintScreen.kt index e72b9678d..eda8d2915 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordhint/MasterPasswordHintScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/masterpasswordhint/MasterPasswordHintScreen.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.rememberTopAppBarState @@ -32,6 +31,7 @@ import com.x8bit.bitwarden.ui.platform.components.dialog.LoadingDialogState import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * The top level composable for the Login screen. @@ -131,7 +131,7 @@ fun MasterPasswordHintScreen( Text( text = stringResource(id = R.string.enter_email_for_hint), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, modifier = Modifier .fillMaxWidth() .padding( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/preventaccountlockout/PreventAccountLockoutScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/preventaccountlockout/PreventAccountLockoutScreen.kt index 6f7e02fa9..e06e56af0 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/preventaccountlockout/PreventAccountLockoutScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/preventaccountlockout/PreventAccountLockoutScreen.kt @@ -102,7 +102,7 @@ private fun NeverLoseAccessContent( Spacer(modifier = Modifier.height(24.dp)) Text( text = stringResource(R.string.never_lose_access_to_your_vault), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier.padding(horizontal = 24.dp), @@ -112,7 +112,7 @@ private fun NeverLoseAccessContent( text = stringResource( R.string.the_best_way_to_make_sure_you_can_always_access_your_account, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(horizontal = 24.dp), ) @@ -163,13 +163,13 @@ private fun AccountRecoveryTipRow( Column { Text( text = title, - style = MaterialTheme.typography.titleSmall, + style = BitwardenTheme.typography.titleSmall, color = MaterialTheme.colorScheme.onSurface, ) Spacer(modifier = Modifier.height(4.dp)) Text( text = description, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/removepassword/RemovePasswordScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/removepassword/RemovePasswordScreen.kt index 2c3f1a7ce..ea259fa16 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/removepassword/RemovePasswordScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/removepassword/RemovePasswordScreen.kt @@ -97,7 +97,7 @@ private fun RemovePasswordScreenContent( Text( text = state.description(), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .standardHorizontalMargin() diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/resetpassword/ResetPasswordScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/resetpassword/ResetPasswordScreen.kt index b93c62207..494dfbb62 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/resetpassword/ResetPasswordScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/resetpassword/ResetPasswordScreen.kt @@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.rememberTopAppBarState import androidx.compose.runtime.Composable @@ -42,6 +41,7 @@ import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * The top level composable for the Reset Password screen. @@ -170,7 +170,7 @@ private fun ResetPasswordScreenContent( BitwardenPolicyWarningText( text = stringResource(id = instructionsTextId), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .padding(horizontal = 16.dp) .fillMaxWidth(), @@ -187,7 +187,7 @@ private fun ResetPasswordScreenContent( BitwardenPolicyWarningText( text = passwordPolicyContent, textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .padding(horizontal = 16.dp) .fillMaxWidth(), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/setpassword/SetPasswordScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/setpassword/SetPasswordScreen.kt index e00bffeae..03fbf2ab7 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/setpassword/SetPasswordScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/setpassword/SetPasswordScreen.kt @@ -39,6 +39,7 @@ import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * The top level composable for the Set Master Password screen. @@ -120,7 +121,7 @@ private fun SetPasswordScreenContent( text = stringResource( id = R.string.your_organization_requires_you_to_set_a_master_password, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -131,7 +132,7 @@ private fun SetPasswordScreenContent( BitwardenPolicyWarningText( text = stringResource(id = R.string.reset_password_auto_enroll_invite_warning), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .padding(horizontal = 16.dp) .fillMaxWidth(), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/startregistration/StartRegistrationScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/startregistration/StartRegistrationScreen.kt index 2511231a2..946d2721d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/startregistration/StartRegistrationScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/startregistration/StartRegistrationScreen.kt @@ -325,7 +325,7 @@ private fun TermsAndPrivacyText( addStyle( style = SpanStyle( color = MaterialTheme.colorScheme.onSurface, - fontSize = MaterialTheme.typography.bodyMedium.fontSize, + fontSize = BitwardenTheme.typography.bodyMedium.fontSize, ), start = 0, end = strTermsAndPrivacy.length, @@ -333,7 +333,7 @@ private fun TermsAndPrivacyText( addStyle( style = SpanStyle( color = MaterialTheme.colorScheme.primary, - fontSize = MaterialTheme.typography.bodyMedium.fontSize, + fontSize = BitwardenTheme.typography.bodyMedium.fontSize, fontWeight = FontWeight.Bold, ), start = startIndexTerms, @@ -342,7 +342,7 @@ private fun TermsAndPrivacyText( addStyle( style = SpanStyle( color = MaterialTheme.colorScheme.primary, - fontSize = MaterialTheme.typography.bodyMedium.fontSize, + fontSize = BitwardenTheme.typography.bodyMedium.fontSize, fontWeight = FontWeight.Bold, ), start = startIndexPrivacy, @@ -390,7 +390,7 @@ private fun TermsAndPrivacyText( val termsUrl = stringResource(id = R.string.terms_of_service) ClickableText( text = annotatedLinkString, - style = MaterialTheme.typography.bodyMedium.copy( + style = BitwardenTheme.typography.bodyMedium.copy( textAlign = TextAlign.Center, ), onClick = { @@ -458,7 +458,7 @@ private fun ReceiveMarketingEmailsSwitch( Spacer(modifier = Modifier.width(16.dp)) ClickableText( text = annotatedLinkString, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, onClick = { annotatedLinkString .getStringAnnotations(TAG_URL, it, it) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/trusteddevice/TrustedDeviceScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/trusteddevice/TrustedDeviceScreen.kt index 6699c72a2..47059f390 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/trusteddevice/TrustedDeviceScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/trusteddevice/TrustedDeviceScreen.kt @@ -185,7 +185,7 @@ private fun TrustedDeviceScaffold( state.emailAddress, state.environmentLabel, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .testTag("LoggingInAsLabel") @@ -196,7 +196,7 @@ private fun TrustedDeviceScaffold( BitwardenClickableText( label = stringResource(id = R.string.not_you), onClick = handlers.onNotYouButtonClick, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), modifier = Modifier.testTag("NotYouLabel"), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginScreen.kt index 420cdafa0..90edb680c 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/twofactorlogin/TwoFactorLoginScreen.kt @@ -224,7 +224,7 @@ private fun TwoFactorLoginScreenContent( Text( text = state.authMethod.description(state.displayEmail)(), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt index df5e2bc1e..20fad0cf2 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt @@ -62,6 +62,7 @@ import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.composition.LocalBiometricsManager import com.x8bit.bitwarden.ui.platform.manager.biometrics.BiometricsManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList import javax.crypto.Cipher @@ -222,7 +223,7 @@ fun VaultUnlockScreen( Spacer(modifier = Modifier.height(24.dp)) Text( text = state.vaultUnlockType.unlockScreenMessage(), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -236,7 +237,7 @@ fun VaultUnlockScreen( state.email, state.environmentUrl, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .testTag("UserAndEnvironmentDataLabel") @@ -259,7 +260,7 @@ fun VaultUnlockScreen( Text( text = stringResource(R.string.account_biometric_invalidated), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.error, modifier = Modifier.padding(horizontal = 16.dp), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/welcome/WelcomeScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/welcome/WelcomeScreen.kt index dcda99487..96419a597 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/welcome/WelcomeScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/welcome/WelcomeScreen.kt @@ -45,6 +45,7 @@ import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.isPortrait /** @@ -189,7 +190,7 @@ private fun WelcomeCardLandscape( Text( text = stringResource(id = state.titleRes), textAlign = TextAlign.Center, - style = MaterialTheme.typography.headlineMedium, + style = BitwardenTheme.typography.headlineMedium, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier.padding(bottom = 16.dp), ) @@ -197,7 +198,7 @@ private fun WelcomeCardLandscape( Text( text = stringResource(id = state.messageRes), textAlign = TextAlign.Center, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) } @@ -222,7 +223,7 @@ private fun WelcomeCardPortrait( Text( text = stringResource(id = state.titleRes), textAlign = TextAlign.Center, - style = MaterialTheme.typography.headlineMedium, + style = BitwardenTheme.typography.headlineMedium, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .padding( @@ -234,7 +235,7 @@ private fun WelcomeCardPortrait( Text( text = stringResource(id = state.messageRes), textAlign = TextAlign.Center, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/Text.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/Text.kt index 7d6089c8f..710a24939 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/Text.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/Text.kt @@ -12,6 +12,7 @@ import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.parcelize.Parcelize import kotlinx.parcelize.RawValue @@ -135,7 +136,7 @@ fun createAnnotatedString( highlights: List, highlightStyle: SpanStyle = SpanStyle( color = MaterialTheme.colorScheme.primary, - fontSize = MaterialTheme.typography.bodyMedium.fontSize, + fontSize = BitwardenTheme.typography.bodyMedium.fontSize, fontWeight = FontWeight.Bold, ), tag: String, @@ -145,7 +146,7 @@ fun createAnnotatedString( addStyle( style = SpanStyle( color = MaterialTheme.colorScheme.onSurface, - fontSize = MaterialTheme.typography.bodyMedium.fontSize, + fontSize = BitwardenTheme.typography.bodyMedium.fontSize, ), start = 0, end = mainString.length, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/account/BitwardenAccountSwitcher.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/account/BitwardenAccountSwitcher.kt index 678bd863e..ce1f1c33b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/account/BitwardenAccountSwitcher.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/account/BitwardenAccountSwitcher.kt @@ -55,6 +55,7 @@ import com.x8bit.bitwarden.ui.platform.components.divider.BitwardenHorizontalDiv import com.x8bit.bitwarden.ui.platform.components.model.AccountSummary import com.x8bit.bitwarden.ui.platform.components.scrim.BitwardenAnimatedScrim import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.feature.vault.util.iconRes import com.x8bit.bitwarden.ui.vault.feature.vault.util.iconTestTag import com.x8bit.bitwarden.ui.vault.feature.vault.util.initials @@ -292,7 +293,7 @@ private fun AccountSummaryItem( Text( text = accountSummary.initials, - style = MaterialTheme.typography.titleMedium + style = BitwardenTheme.typography.titleMedium // Do not allow scaling .copy(fontSize = 16.dp.toUnscaledTextUnit()), color = accountSummary.avatarColor.toSafeOverlayColor(), @@ -307,7 +308,7 @@ private fun AccountSummaryItem( ) { Text( text = accountSummary.email, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.testTag("AccountEmailLabel"), @@ -315,7 +316,7 @@ private fun AccountSummaryItem( Text( text = accountSummary.environmentLabel, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.testTag("AccountEnvironmentLabel"), ) @@ -323,7 +324,7 @@ private fun AccountSummaryItem( accountSummary.supportingTextResOrNull?.let { supportingTextResId -> Text( text = stringResource(id = supportingTextResId).lowercaseWithCurrentLocal(), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.testTag("AccountStatusLabel"), ) @@ -414,7 +415,7 @@ private fun AddAccountItem( Text( text = stringResource(id = R.string.add_account), - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenMediumTopAppBar.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenMediumTopAppBar.kt index f4ef9af84..3269d3381 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenMediumTopAppBar.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenMediumTopAppBar.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.platform.testTag import androidx.compose.ui.tooling.preview.Preview import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A custom Bitwarden-themed medium top app bar with support for actions. @@ -50,7 +51,7 @@ fun BitwardenMediumTopAppBar( title = { Text( text = title, - style = MaterialTheme.typography.titleLarge, + style = BitwardenTheme.typography.titleLarge, modifier = Modifier.testTag("PageTitleLabel"), ) }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenTopAppBar.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenTopAppBar.kt index b7de75e54..a054c8a5c 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenTopAppBar.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenTopAppBar.kt @@ -119,7 +119,7 @@ fun BitwardenTopAppBar( // making adding any arguments for softWrap and minLines superfluous. Text( text = title, - style = MaterialTheme.typography.titleLarge, + style = BitwardenTheme.typography.titleLarge, overflow = TextOverflow.Ellipsis, modifier = Modifier.testTag("PageTitleLabel"), ) @@ -135,7 +135,7 @@ fun BitwardenTopAppBar( title = { Text( text = title, - style = MaterialTheme.typography.titleLarge, + style = BitwardenTheme.typography.titleLarge, maxLines = 1, softWrap = false, overflow = TextOverflow.Ellipsis, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/action/BitwardenOverflowActionItem.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/action/BitwardenOverflowActionItem.kt index 6e39ee913..22894005f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/action/BitwardenOverflowActionItem.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/action/BitwardenOverflowActionItem.kt @@ -80,7 +80,7 @@ fun BitwardenOverflowActionItem( text = { Text( text = dropdownMenuItemData.text, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, ) }, onClick = { diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/badge/NotificationBadge.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/badge/NotificationBadge.kt index fc0aaee18..6e6a0063d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/badge/NotificationBadge.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/badge/NotificationBadge.kt @@ -17,6 +17,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialColors /** @@ -41,7 +42,7 @@ fun NotificationBadge( content = { Text( text = notificationCount.toString(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, modifier = Modifier.padding(horizontal = 5.dp, vertical = 2.dp), ) }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButton.kt index 32e0e7789..57a3d2b96 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButton.kt @@ -3,13 +3,13 @@ package com.x8bit.bitwarden.ui.platform.components.button import androidx.compose.foundation.layout.PaddingValues import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.semantics.semantics import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled filled [Button]. @@ -38,7 +38,7 @@ fun BitwardenFilledButton( ) { Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButtonWithIcon.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButtonWithIcon.kt index 7f15b9931..4c92aed3d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButtonWithIcon.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledButtonWithIcon.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -54,7 +53,7 @@ fun BitwardenFilledButtonWithIcon( Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledErrorButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledErrorButton.kt index 836fd52c4..62f92cfc4 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledErrorButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledErrorButton.kt @@ -42,7 +42,7 @@ fun BitwardenFilledErrorButton( ) { Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButton.kt index 28facaa3c..aacf70d54 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButton.kt @@ -43,7 +43,7 @@ fun BitwardenFilledTonalButton( ) { Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButtonWithIcon.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButtonWithIcon.kt index c30cce87d..72b97ebf5 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButtonWithIcon.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenFilledTonalButtonWithIcon.kt @@ -55,7 +55,7 @@ fun BitwardenFilledTonalButtonWithIcon( ) Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButton.kt index 9f2c59831..099be6296 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButton.kt @@ -2,7 +2,6 @@ package com.x8bit.bitwarden.ui.platform.components.button import androidx.compose.foundation.layout.PaddingValues import androidx.compose.material3.ButtonDefaults -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -10,6 +9,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.semantics.semantics import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled filled [OutlinedButton]. @@ -39,7 +39,7 @@ fun BitwardenOutlinedButton( ) { Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButtonWithIcon.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButtonWithIcon.kt index 9efa0396b..57b0f1db5 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButtonWithIcon.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedButtonWithIcon.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -15,6 +14,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled filled [OutlinedButton] with an icon. @@ -53,7 +53,7 @@ fun BitwardenOutlinedButtonWithIcon( Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedErrorButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedErrorButton.kt index c95de7652..926bf9b24 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedErrorButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenOutlinedErrorButton.kt @@ -11,6 +11,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.semantics.semantics import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled filled [OutlinedButton] for error states. @@ -47,7 +48,7 @@ fun BitwardenOutlinedErrorButton( ) { Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenTextButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenTextButton.kt index 5e9c12fb6..402d674af 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenTextButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/button/BitwardenTextButton.kt @@ -2,7 +2,6 @@ package com.x8bit.bitwarden.ui.platform.components.button import androidx.compose.foundation.layout.PaddingValues import androidx.compose.material3.ButtonDefaults -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable @@ -10,6 +9,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled [TextButton]. @@ -47,7 +47,7 @@ fun BitwardenTextButton( ) { Text( text = label, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/card/BitwardenActionCard.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/card/BitwardenActionCard.kt index a0296cb19..3ff97a779 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/card/BitwardenActionCard.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/card/BitwardenActionCard.kt @@ -64,13 +64,13 @@ fun BitwardenActionCard( ) { Text( text = actionText, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) Spacer(modifier = Modifier.height(8.dp)) Text( text = callToActionText, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, color = MaterialTheme.colorScheme.primary, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenErrorContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenErrorContent.kt index a31b51126..edfb69629 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenErrorContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/content/BitwardenErrorContent.kt @@ -18,6 +18,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A Bitwarden-themed, re-usable error state. @@ -38,7 +39,7 @@ fun BitwardenErrorContent( Text( text = message, color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, textAlign = TextAlign.Center, modifier = Modifier .padding(horizontal = 16.dp) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenBasicDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenBasicDialog.kt index 6525b3f3f..244a3f51e 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenBasicDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenBasicDialog.kt @@ -48,7 +48,7 @@ fun BitwardenBasicDialog( { Text( text = it(), - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, modifier = Modifier.testTag("AlertTitleText"), ) } @@ -56,7 +56,7 @@ fun BitwardenBasicDialog( text = { Text( text = visibilityState.message(), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier.testTag("AlertContentText"), ) }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenDateSelectButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenDateSelectButton.kt index d8b62b961..b7e456a4a 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenDateSelectButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenDateSelectButton.kt @@ -31,6 +31,7 @@ import androidx.compose.ui.semantics.testTag import androidx.compose.ui.semantics.testTagsAsResourceId import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.orNow import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern import java.time.Instant @@ -82,7 +83,7 @@ fun BitwardenDateSelectButton( interactionSource = remember { MutableInteractionSource() }, onClick = { shouldShowDialog = !shouldShowDialog }, ), - textStyle = MaterialTheme.typography.bodyLarge, + textStyle = BitwardenTheme.typography.bodyLarge, readOnly = true, label = { Text(text = label) }, value = formattedDate, @@ -131,7 +132,7 @@ fun BitwardenDateSelectButton( ) { Text( text = stringResource(id = R.string.ok), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } }, @@ -142,7 +143,7 @@ fun BitwardenDateSelectButton( ) { Text( text = stringResource(id = R.string.cancel), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenMasterPasswordDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenMasterPasswordDialog.kt index 7121117d8..1ad9c48aa 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenMasterPasswordDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenMasterPasswordDialog.kt @@ -23,6 +23,7 @@ import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled dialog for entering your master password. @@ -58,7 +59,7 @@ fun BitwardenMasterPasswordDialog( title = { Text( text = stringResource(id = R.string.password_confirmation), - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, modifier = Modifier.testTag("AlertTitleText"), ) }, @@ -66,7 +67,7 @@ fun BitwardenMasterPasswordDialog( Column { Text( text = stringResource(id = R.string.password_confirmation_desc), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier.testTag("AlertContentText"), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenPinDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenPinDialog.kt index c13f807fb..d322b701d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenPinDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenPinDialog.kt @@ -19,6 +19,7 @@ import androidx.compose.ui.semantics.testTagsAsResourceId import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled dialog for the user to enter their PIN. @@ -54,7 +55,7 @@ fun BitwardenPinDialog( title = { Text( text = stringResource(id = R.string.verify_pin), - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, modifier = Modifier.testTag("AlertTitleText"), ) }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenSelectionDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenSelectionDialog.kt index 91c27aeeb..2e0c97f4e 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenSelectionDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenSelectionDialog.kt @@ -29,6 +29,7 @@ import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.dialog.row.BitwardenSelectionRow import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Displays a dialog with a title and "Cancel" button. @@ -74,7 +75,7 @@ fun BitwardenSelectionDialog( .fillMaxWidth(), text = title, color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, ) if (scrollState.canScrollBackward) { Box( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTextEntryDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTextEntryDialog.kt index 3eca73a8a..029726e1d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTextEntryDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTextEntryDialog.kt @@ -22,6 +22,7 @@ import androidx.compose.ui.semantics.testTagsAsResourceId import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled dialog that is used to enter text. @@ -67,7 +68,7 @@ fun BitwardenTextEntryDialog( { Text( text = it, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, modifier = Modifier.testTag("AlertTitleText"), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimePickerDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimePickerDialog.kt index 0a9a69ea1..4e52bd270 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimePickerDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimePickerDialog.kt @@ -36,6 +36,7 @@ import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A custom composable representing a dialog that displays the time picker dialog. @@ -71,7 +72,7 @@ fun BitwardenTimePickerDialog( ) { Text( text = stringResource(id = R.string.ok), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, modifier = Modifier.testTag("AcceptAlertButton"), ) } @@ -83,7 +84,7 @@ fun BitwardenTimePickerDialog( ) { Text( text = stringResource(id = R.string.cancel), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, ) } }, @@ -153,7 +154,7 @@ private fun TimePickerDialog( .padding(bottom = 20.dp), // TODO: This should be "Select time" but we don't have that string (BIT-1405) text = stringResource(id = R.string.time), - style = MaterialTheme.typography.labelMedium, + style = BitwardenTheme.typography.labelMedium, ) content() diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimeSelectButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimeSelectButton.kt index 4271285e1..e8d326cc3 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimeSelectButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTimeSelectButton.kt @@ -20,6 +20,7 @@ import androidx.compose.ui.semantics.contentDescription import androidx.compose.ui.semantics.role import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.orNow import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern import java.time.ZonedDateTime @@ -69,7 +70,7 @@ fun BitwardenTimeSelectButton( interactionSource = remember { MutableInteractionSource() }, onClick = { shouldShowDialog = !shouldShowDialog }, ), - textStyle = MaterialTheme.typography.bodyLarge, + textStyle = BitwardenTheme.typography.bodyLarge, readOnly = true, label = { Text(text = label) }, value = formattedTime, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTwoButtonDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTwoButtonDialog.kt index 61cfc5026..b99498036 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTwoButtonDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/BitwardenTwoButtonDialog.kt @@ -33,6 +33,7 @@ import androidx.compose.ui.window.DialogProperties import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight import com.x8bit.bitwarden.ui.platform.components.util.maxDialogWidth +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled dialog with two buttons. @@ -96,7 +97,7 @@ fun BitwardenTwoButtonDialog( .fillMaxWidth(), text = title, color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, ) Spacer(modifier = Modifier.height(16.dp)) } @@ -117,7 +118,7 @@ fun BitwardenTwoButtonDialog( .fillMaxWidth(), text = message, color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) if (scrollState.canScrollForward) { Box( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenBasicDialogRow.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenBasicDialogRow.kt index 02abce0a9..36d2379d1 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenBasicDialogRow.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenBasicDialogRow.kt @@ -12,6 +12,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenSelectionDialog +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A simple clickable row for use within a [BitwardenSelectionDialog] as an alternative to a @@ -29,7 +30,7 @@ fun BitwardenBasicDialogRow( ) { Text( text = text, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, modifier = modifier .clickable( interactionSource = remember { MutableInteractionSource() }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenSelectionRow.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenSelectionRow.kt index 93e96b1b7..6ce84654a 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenSelectionRow.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dialog/row/BitwardenSelectionRow.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.ui.platform.base.util.Text import com.x8bit.bitwarden.ui.platform.components.radio.BitwardenRadioButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A clickable item that displays a radio button and text. @@ -46,7 +47,7 @@ fun BitwardenSelectionRow( Text( text = text(), color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/BitwardenMultiSelectButton.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/BitwardenMultiSelectButton.kt index 90f7d1ef8..855025e56 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/BitwardenMultiSelectButton.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/BitwardenMultiSelectButton.kt @@ -97,7 +97,7 @@ fun BitwardenMultiSelectButton( ) { shouldShowDialog = !shouldShowDialog }, - textStyle = MaterialTheme.typography.bodyLarge, + textStyle = BitwardenTheme.typography.bodyLarge, readOnly = true, label = { Row { @@ -142,7 +142,7 @@ fun BitwardenMultiSelectButton( { Text( text = supportingText, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, ) } }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/EnvironmentSelector.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/EnvironmentSelector.kt index fe8af767c..a523f82bc 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/EnvironmentSelector.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/dropdown/EnvironmentSelector.kt @@ -26,6 +26,7 @@ import com.x8bit.bitwarden.data.platform.repository.model.Environment import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenSelectionDialog import com.x8bit.bitwarden.ui.platform.components.dialog.row.BitwardenSelectionRow import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.displayLabel /** @@ -72,13 +73,13 @@ fun EnvironmentSelector( ) { Text( text = labelText, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(end = 12.dp), ) Text( text = selectedOption.displayLabel(), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, color = MaterialTheme.colorScheme.primary, modifier = Modifier.padding(end = 8.dp), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt index b5a7f01af..51240912e 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt @@ -27,7 +27,7 @@ fun BitwardenHiddenPasswordField( ) { OutlinedTextField( modifier = modifier, - textStyle = MaterialTheme.typography.bodyLarge, + textStyle = BitwardenTheme.typography.bodyLarge, label = { Text(text = label) }, value = value, onValueChange = { }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt index 4a7c4d0c6..953e84522 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenPasswordField.kt @@ -27,7 +27,7 @@ import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.base.util.tabNavigation import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton import com.x8bit.bitwarden.ui.platform.components.util.nonLetterColorVisualTransformation -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled password field that hoists show/hide password state to the caller. @@ -74,7 +74,7 @@ fun BitwardenPasswordField( modifier = modifier .tabNavigation() .focusRequester(focusRequester), - textStyle = LocalNonMaterialTypography.current.sensitiveInfoSmall, + textStyle = BitwardenTheme.typography.sensitiveInfoSmall, label = { Text(text = label) }, value = value, onValueChange = onValueChange, @@ -94,7 +94,7 @@ fun BitwardenPasswordField( { Text( text = hint, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, ) } }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt index 3aba0b91f..948c87615 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt @@ -24,6 +24,7 @@ import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.ui.platform.base.util.toPx import com.x8bit.bitwarden.ui.platform.base.util.withLineBreaksAtWidth import com.x8bit.bitwarden.ui.platform.components.model.IconResource +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Component that allows the user to input text. This composable will manage the state of @@ -106,7 +107,7 @@ fun BitwardenTextField( { Text( text = hint, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, ) } }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderText.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderText.kt index c8867c3d5..b456bf533 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderText.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderText.kt @@ -22,7 +22,7 @@ fun BitwardenListHeaderText( ) { Text( text = label, - style = MaterialTheme.typography.labelMedium, + style = BitwardenTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = modifier.padding( top = 12.dp, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderTextWithSupportingText.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderTextWithSupportingText.kt index c6956fdd8..822b902c6 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderTextWithSupportingText.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/header/BitwardenListHeaderTextWithSupportingText.kt @@ -37,13 +37,13 @@ fun BitwardenListHeaderTextWithSupportLabel( ) { Text( text = label, - style = MaterialTheme.typography.labelMedium, + style = BitwardenTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, ) Text( text = supportingLabel, - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/indicator/BitwardenCircularCountdownIndicator.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/indicator/BitwardenCircularCountdownIndicator.kt index b380396f6..a505d5337 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/indicator/BitwardenCircularCountdownIndicator.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/indicator/BitwardenCircularCountdownIndicator.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.StrokeCap import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A countdown timer displayed to the user. @@ -52,7 +53,7 @@ fun BitwardenCircularCountdownIndicator( Text( text = timeLeftSeconds.toString(), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenGroupItem.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenGroupItem.kt index 4be9d850c..7aa62bcbc 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenGroupItem.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenGroupItem.kt @@ -78,14 +78,14 @@ fun BitwardenGroupItem( Text( text = label, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier.weight(1f), ) Text( text = supportingLabel, - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenListItem.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenListItem.kt index c5df4c686..58de31e09 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenListItem.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/listitem/BitwardenListItem.kt @@ -106,7 +106,7 @@ fun BitwardenListItem( ) { Text( text = label, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, maxLines = 1, overflow = TextOverflow.Ellipsis, @@ -131,7 +131,7 @@ fun BitwardenListItem( secondSupportingLabel?.let { secondSupportLabel -> Text( text = secondSupportLabel, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.semantics { secondSupportingLabelTestTag?.let { testTag = it } @@ -142,7 +142,7 @@ fun BitwardenListItem( supportingLabel?.let { supportLabel -> Text( text = supportLabel, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.semantics { supportingLabelTestTag?.let { testTag = it } }, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/row/BitwardenTextRow.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/row/BitwardenTextRow.kt index 3c9f2b4f1..2839414e9 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/row/BitwardenTextRow.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/row/BitwardenTextRow.kt @@ -19,6 +19,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.ui.platform.components.divider.BitwardenHorizontalDivider +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a clickable row of text and can contains an optional [content] that appears to the @@ -70,7 +71,7 @@ fun BitwardenTextRow( ) { Text( text = text, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface.copy( alpha = if (isEnabled) 1.0f else 0.38f, ), @@ -78,7 +79,7 @@ fun BitwardenTextRow( description?.let { Text( text = it, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant.copy( alpha = if (isEnabled) 1.0f else 0.38f, ), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/text/BitwardenPolicyWarning.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/text/BitwardenPolicyWarning.kt index f00a64874..bab2f101c 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/text/BitwardenPolicyWarning.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/text/BitwardenPolicyWarning.kt @@ -11,6 +11,7 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled policy warning label. @@ -25,7 +26,7 @@ fun BitwardenPolicyWarningText( text: String, modifier: Modifier = Modifier, textAlign: TextAlign = TextAlign.Center, - style: TextStyle = MaterialTheme.typography.bodySmall, + style: TextStyle = BitwardenTheme.typography.bodySmall, ) { Text( text = text, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenSwitch.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenSwitch.kt index 0eb82605a..2ed33dae7 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenSwitch.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenSwitch.kt @@ -23,6 +23,7 @@ import androidx.compose.ui.semantics.toggleableState import androidx.compose.ui.state.ToggleableState import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden-styled [Switch]. @@ -77,14 +78,14 @@ fun BitwardenSwitch( Text( text = label, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) description?.let { Text( text = it, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenWideSwitch.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenWideSwitch.kt index b6845417b..8173af749 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenWideSwitch.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/toggle/BitwardenWideSwitch.kt @@ -74,7 +74,7 @@ fun BitwardenWideSwitch( ) { Text( text = label, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = if (enabled) { MaterialTheme.colorScheme.onSurface } else { @@ -84,7 +84,7 @@ fun BitwardenWideSwitch( description?.let { Text( text = it, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = if (enabled) { MaterialTheme.colorScheme.onSurfaceVariant } else { diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuScreen.kt index 24ad25885..6e690cf3f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuScreen.kt @@ -172,7 +172,7 @@ private fun OnboardingOverrideContent( modifier = Modifier .align(Alignment.CenterHorizontally) .standardHorizontalMargin(), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchEmptyContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchEmptyContent.kt index 352c8343c..003f12a00 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchEmptyContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/search/SearchEmptyContent.kt @@ -19,6 +19,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * The empty state for the search screen. @@ -52,7 +53,7 @@ fun SearchEmptyContent( .fillMaxWidth() .padding(horizontal = 16.dp), text = it(), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsScreen.kt index fbbfde466..2bac79952 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/SettingsScreen.kt @@ -135,7 +135,7 @@ private fun SettingsRow( .padding(end = 16.dp) .weight(1f), text = text(), - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) TrailingContent(notificationCount = notificationCount) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutScreen.kt index 7a230a913..de7fd7d79 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/about/AboutScreen.kt @@ -230,7 +230,7 @@ private fun ContentColumn( Text( modifier = Modifier.padding(end = 16.dp), text = state.copyrightInfo.invoke(), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurface, ) } @@ -269,7 +269,7 @@ private fun CopyRow( .padding(end = 16.dp) .weight(1f), text = text(), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurface, ) Icon( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt index 1df0cc9b7..729ba5a56 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt @@ -60,8 +60,8 @@ import com.x8bit.bitwarden.ui.platform.composition.LocalBiometricsManager import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.manager.biometrics.BiometricsManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialColors -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography import com.x8bit.bitwarden.ui.platform.util.displayLabel import com.x8bit.bitwarden.ui.platform.util.minutes import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern @@ -453,7 +453,7 @@ private fun SessionTimeoutRow( ) { Text( text = selectedVaultTimeoutType.displayLabel(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.testTag("SessionTimeoutStatusLabel"), ) @@ -529,7 +529,7 @@ private fun SessionCustomTimeoutRow( .toFormattedPattern("HH:mm") Text( text = formattedTime, - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } @@ -606,7 +606,7 @@ private fun SessionTimeoutActionRow( ) { Text( text = selectedVaultTimeoutAction.displayLabel(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant.copy( alpha = if (isEnabled) 1.0f else 0.38f, ), @@ -704,7 +704,7 @@ private fun FingerPrintPhraseDialog( Text( text = stringResource(id = R.string.fingerprint_phrase), color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, modifier = Modifier.fillMaxWidth(), ) }, @@ -713,14 +713,14 @@ private fun FingerPrintPhraseDialog( Text( text = "${stringResource(id = R.string.your_accounts_fingerprint)}:", color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier.fillMaxWidth(), ) Spacer(modifier = Modifier.height(24.dp)) Text( text = fingerprintPhrase(), color = LocalNonMaterialColors.current.fingerprint, - style = LocalNonMaterialTypography.current.sensitiveInfoSmall, + style = BitwardenTheme.typography.sensitiveInfoSmall, modifier = Modifier.fillMaxWidth(), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/PinInputDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/PinInputDialog.kt index dd473c0a4..49148f60d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/PinInputDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/PinInputDialog.kt @@ -35,6 +35,7 @@ import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A dialog for setting a user's PIN. @@ -80,7 +81,7 @@ fun PinInputDialog( .fillMaxWidth(), text = stringResource(id = R.string.enter_pin), color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, ) if (scrollState.canScrollBackward) { Box( @@ -102,7 +103,7 @@ fun PinInputDialog( .fillMaxWidth(), text = stringResource(id = R.string.set_pin_description), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) BitwardenTextField( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountScreen.kt index 28214dc25..ccc15e6fb 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountScreen.kt @@ -43,6 +43,7 @@ import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenMasterPassword import com.x8bit.bitwarden.ui.platform.components.dialog.LoadingDialogState import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Displays the delete account screen. @@ -136,7 +137,7 @@ fun DeleteAccountScreen( Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(id = R.string.deleting_your_account_is_permanent), - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, color = MaterialTheme.colorScheme.error, modifier = Modifier .fillMaxWidth() @@ -145,7 +146,7 @@ fun DeleteAccountScreen( Spacer(modifier = Modifier.height(24.dp)) Text( text = stringResource(id = R.string.delete_account_explanation), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationScreen.kt index 5ed3a35a3..e7e228d95 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationScreen.kt @@ -147,7 +147,7 @@ private fun DeleteAccountConfirmationContent( Text( text = stringResource(id = R.string.a_verification_code_was_sent_to_your_email), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -169,7 +169,7 @@ private fun DeleteAccountConfirmationContent( Text( text = stringResource(id = R.string.confirm_your_identity), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalScreen.kt index b05d5c0a6..d2b526866 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalScreen.kt @@ -44,8 +44,8 @@ import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalExitManager import com.x8bit.bitwarden.ui.platform.manager.exit.ExitManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialColors -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography /** * Displays the login approval screen. @@ -159,7 +159,7 @@ private fun LoginApprovalContent( Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(id = R.string.are_you_trying_to_log_in), - style = MaterialTheme.typography.headlineMedium, + style = BitwardenTheme.typography.headlineMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() @@ -172,7 +172,7 @@ private fun LoginApprovalContent( state.email, state.domainUrl, ), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() @@ -183,7 +183,7 @@ private fun LoginApprovalContent( Text( text = stringResource(id = R.string.fingerprint_phrase), - style = MaterialTheme.typography.titleLarge, + style = BitwardenTheme.typography.titleLarge, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() @@ -195,7 +195,7 @@ private fun LoginApprovalContent( text = state.fingerprint, textAlign = TextAlign.Start, color = LocalNonMaterialColors.current.fingerprint, - style = LocalNonMaterialTypography.current.sensitiveInfoSmall, + style = BitwardenTheme.typography.sensitiveInfoSmall, modifier = Modifier .testTag("FingerprintValueLabel") .fillMaxWidth() @@ -259,7 +259,7 @@ private fun LoginApprovalInfoColumn( Text( text = label, - style = MaterialTheme.typography.titleSmall, + style = BitwardenTheme.typography.titleSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() @@ -270,7 +270,7 @@ private fun LoginApprovalInfoColumn( Text( text = value, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreen.kt index f432bd203..d7856b5f0 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreen.kt @@ -51,8 +51,8 @@ import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialo import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.rememberBitwardenPullToRefreshState import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialColors -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography /** * Displays the pending login requests screen. @@ -249,7 +249,7 @@ private fun PendingRequestItem( Text( text = stringResource(id = R.string.fingerprint_phrase), - style = MaterialTheme.typography.labelMedium, + style = BitwardenTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Start, modifier = Modifier @@ -262,7 +262,7 @@ private fun PendingRequestItem( Text( text = fingerprintPhrase, color = LocalNonMaterialColors.current.fingerprint, - style = LocalNonMaterialTypography.current.sensitiveInfoSmall, + style = BitwardenTheme.typography.sensitiveInfoSmall, textAlign = TextAlign.Start, modifier = Modifier .testTag("FingerprintValueLabel") @@ -279,14 +279,14 @@ private fun PendingRequestItem( ) { Text( text = platform, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Start, modifier = Modifier.padding(horizontal = 16.dp), ) Text( text = timestamp, - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.End, modifier = Modifier.padding(horizontal = 16.dp), @@ -322,7 +322,7 @@ private fun PendingRequestsEmpty( Text( text = stringResource(id = R.string.no_pending_requests), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center, modifier = Modifier diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreen.kt index 7a14eaf5c..db8aec5c9 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/appearance/AppearanceScreen.kt @@ -38,6 +38,7 @@ import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenWideSwitch import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.feature.settings.appearance.model.AppLanguage import com.x8bit.bitwarden.ui.platform.feature.settings.appearance.model.AppTheme +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.displayLabel /** @@ -139,7 +140,7 @@ private fun LanguageSelectionRow( ) { Text( text = currentSelection.text(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } @@ -183,7 +184,7 @@ private fun ThemeSelectionRow( ) { Text( text = currentSelection.displayLabel(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt index 975942940..6ed73005f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt @@ -47,6 +47,7 @@ import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.feature.settings.autofill.util.displayLabel import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Displays the auto-fill screen. @@ -293,7 +294,7 @@ private fun DefaultUriMatchTypeRow( ) { Text( text = selectedUriMatchType.displayLabel(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/AddEditBlockedUriDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/AddEditBlockedUriDialog.kt index 96107e617..d037be2c8 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/AddEditBlockedUriDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/AddEditBlockedUriDialog.kt @@ -27,6 +27,7 @@ import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * A dialog for adding a blocked URI. @@ -66,7 +67,7 @@ fun AddEditBlockedUriDialog( .fillMaxWidth(), text = stringResource(id = R.string.new_uri), color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, ) if (scrollState.canScrollBackward) { Box( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt index 573ca2acb..9f8301d61 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt @@ -45,6 +45,7 @@ import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalBut import com.x8bit.bitwarden.ui.platform.components.fab.BitwardenFloatingActionButton import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Displays the block auto-fill screen. @@ -162,7 +163,7 @@ fun BlockAutoFillScreen( id = R.string.auto_fill_will_not_be_offered_for_these_ur_is, ), color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier.align(Alignment.CenterVertically), ) } @@ -241,7 +242,7 @@ private fun BlockAutoFillNoItems( .fillMaxWidth() .padding(horizontal = 16.dp), text = stringResource(id = R.string.auto_fill_will_not_be_offered_for_these_ur_is), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) Spacer(modifier = Modifier.height(24.dp)) @@ -281,7 +282,7 @@ private fun BlockAutoFillListItem( .padding(end = 16.dp) .weight(1f), text = label, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) Icon( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultScreen.kt index 077b6f1e6..406b1eb7f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultScreen.kt @@ -51,6 +51,7 @@ import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.feature.settings.exportvault.model.ExportVaultFormat import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.displayLabel import kotlinx.collections.immutable.toImmutableList @@ -281,7 +282,7 @@ private fun ExportVaultScreenContent( Text( text = stringResource(id = R.string.send_verification_code_to_email), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) @@ -332,7 +333,7 @@ private fun ExportVaultScreenContent( Text( text = stringResource(id = R.string.export_vault_master_password_description), textAlign = TextAlign.Start, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .padding(horizontal = 16.dp) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersScreen.kt index 9582013a0..7eab71abe 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/folders/FoldersScreen.kt @@ -40,6 +40,7 @@ import com.x8bit.bitwarden.ui.platform.components.fab.BitwardenFloatingActionBut import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.feature.settings.folders.model.FolderDisplayItem +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toImmutableList @@ -147,7 +148,7 @@ private fun FoldersContent( Text( text = stringResource(id = R.string.no_folders_to_list), textAlign = TextAlign.Center, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier.testTag("NoFoldersLabel"), ) @@ -177,7 +178,7 @@ private fun FoldersContent( .padding(start = 16.dp) .weight(1f), text = it.name, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/other/OtherScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/other/OtherScreen.kt index 032c282a3..4db2de338 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/other/OtherScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/other/OtherScreen.kt @@ -45,6 +45,7 @@ import com.x8bit.bitwarden.ui.platform.components.row.BitwardenTextRow import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenWideSwitch import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Displays the other screen. @@ -138,12 +139,12 @@ fun OtherScreen( ) { Text( text = stringResource(id = R.string.last_sync), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, modifier = Modifier.padding(start = 16.dp, end = 2.dp), ) Text( text = state.lastSyncTime, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, ) } @@ -226,7 +227,7 @@ private fun ClearClipboardFrequencyRow( ) { Text( text = currentSelection.displayLabel.invoke(), - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.testTag("ClearClipboardAfterLabel"), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt index 9c23ea077..2d53eac90 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt @@ -30,6 +30,7 @@ import com.x8bit.bitwarden.ui.platform.theme.color.dynamicBitwardenColorScheme import com.x8bit.bitwarden.ui.platform.theme.color.lightBitwardenColorScheme import com.x8bit.bitwarden.ui.platform.theme.type.BitwardenTypography import com.x8bit.bitwarden.ui.platform.theme.type.bitwardenTypography +import com.x8bit.bitwarden.ui.platform.theme.type.toMaterialTypography /** * Static wrapper to make accessing the theme components easier. @@ -117,12 +118,11 @@ fun BitwardenTheme( LocalBitwardenColorScheme provides bitwardenColorScheme, LocalNonMaterialColors provides nonMaterialColors, LocalBitwardenTypography provides bitwardenTypography, - LocalNonMaterialTypography provides nonMaterialTypography, ) { // Set overall theme based on color scheme and typography settings MaterialTheme( colorScheme = colorScheme, - typography = Typography, + typography = bitwardenTypography.toMaterialTypography(), content = content, ) } @@ -211,12 +211,6 @@ private fun Int.toColor(context: Context): Color = Color(context.getColor(this)) val LocalBitwardenTypography: ProvidableCompositionLocal = compositionLocalOf { bitwardenTypography } -/** - * Provides access to non material theme typography throughout the app. - */ -val LocalNonMaterialTypography: ProvidableCompositionLocal = - compositionLocalOf { nonMaterialTypography } - /** * Provides access to non material theme colors throughout the app. */ diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Type.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Type.kt deleted file mode 100644 index 25c514ca6..000000000 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/Type.kt +++ /dev/null @@ -1,282 +0,0 @@ -package com.x8bit.bitwarden.ui.platform.theme - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material3.Text -import androidx.compose.material3.Typography -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.text.PlatformTextStyle -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.Font -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.style.LineHeightStyle -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp -import com.x8bit.bitwarden.R - -val Typography: Typography = Typography( - displayLarge = TextStyle( - fontSize = 56.sp, - lineHeight = 64.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - displayMedium = TextStyle( - fontSize = 44.sp, - lineHeight = 52.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - displaySmall = TextStyle( - fontSize = 36.sp, - lineHeight = 44.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - headlineLarge = TextStyle( - fontSize = 32.sp, - lineHeight = 40.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - headlineMedium = TextStyle( - fontSize = 28.sp, - lineHeight = 36.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - headlineSmall = TextStyle( - fontSize = 18.sp, - lineHeight = 22.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - titleLarge = TextStyle( - fontSize = 19.sp, - lineHeight = 28.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - titleMedium = TextStyle( - fontSize = 16.sp, - lineHeight = 20.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - titleSmall = TextStyle( - fontSize = 14.sp, - lineHeight = 18.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_medium)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - bodyLarge = TextStyle( - fontSize = 15.sp, - lineHeight = 20.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_regular)), - fontWeight = FontWeight.W400, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - bodyMedium = TextStyle( - fontSize = 13.sp, - lineHeight = 18.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_regular)), - fontWeight = FontWeight.W400, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - bodySmall = TextStyle( - fontSize = 12.sp, - lineHeight = 16.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_regular)), - fontWeight = FontWeight.W400, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - labelLarge = TextStyle( - fontSize = 14.sp, - lineHeight = 20.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - labelMedium = TextStyle( - fontSize = 12.sp, - lineHeight = 16.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_semi_bold)), - fontWeight = FontWeight.W600, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - labelSmall = TextStyle( - fontSize = 12.sp, - lineHeight = 16.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_regular)), - fontWeight = FontWeight.W400, - letterSpacing = 0.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), -) - -val nonMaterialTypography: NonMaterialTypography = NonMaterialTypography( - sensitiveInfoSmall = TextStyle( - fontSize = 14.sp, - lineHeight = 20.sp, - fontFamily = FontFamily(Font(R.font.roboto_regular_mono)), - fontWeight = FontWeight.W400, - letterSpacing = 0.5.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - sensitiveInfoMedium = TextStyle( - fontSize = 16.sp, - lineHeight = 24.sp, - fontFamily = FontFamily(Font(R.font.roboto_regular_mono)), - fontWeight = FontWeight.W400, - letterSpacing = 0.5.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), - eyebrowMedium = TextStyle( - fontSize = 12.sp, - lineHeight = 18.sp, - fontFamily = FontFamily(Font(R.font.dm_sans_bold)), - fontWeight = FontWeight.W700, - letterSpacing = 0.5.sp, - lineHeightStyle = LineHeightStyle( - alignment = LineHeightStyle.Alignment.Center, - trim = LineHeightStyle.Trim.None, - ), - platformStyle = PlatformTextStyle(includeFontPadding = false), - ), -) - -/** - * Models typography that live outside of the Material Theme spec. - */ -data class NonMaterialTypography( - val sensitiveInfoSmall: TextStyle, - val sensitiveInfoMedium: TextStyle, - val eyebrowMedium: TextStyle, -) - -@Preview(showBackground = true) -@Composable -private fun Typography_preview() { - Column( - modifier = Modifier - .padding(8.dp) - .verticalScroll(rememberScrollState()), - verticalArrangement = Arrangement.spacedBy(4.dp), - ) { - Text(text = "Display large", style = Typography.displayLarge) - Text(text = "Display medium", style = Typography.displayMedium) - Text(text = "Display small", style = Typography.displaySmall) - Text(text = "Headline large", style = Typography.headlineLarge) - Text(text = "Headline medium", style = Typography.headlineMedium) - Text(text = "Headline small", style = Typography.headlineSmall) - Text(text = "Title large", style = Typography.titleLarge) - Text(text = "Title medium", style = Typography.titleMedium) - Text(text = "Title small", style = Typography.titleSmall) - Text(text = "Body large", style = Typography.bodyLarge) - Text(text = "Body medium", style = Typography.bodyMedium) - Text(text = "Body small", style = Typography.bodySmall) - Text(text = "Label large", style = Typography.labelLarge) - Text(text = "Label medium", style = Typography.labelMedium) - Text(text = "Label small", style = Typography.labelSmall) - Text(text = "Sensitive info small", style = nonMaterialTypography.sensitiveInfoSmall) - Text(text = "Sensitive info medium", style = nonMaterialTypography.sensitiveInfoMedium) - Text(text = "Eyebrow medium", style = nonMaterialTypography.eyebrowMedium) - } -} diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt index af60d99fb..3a5fdc44b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreen.kt @@ -59,7 +59,6 @@ import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography import com.x8bit.bitwarden.ui.tools.feature.generator.GeneratorState.MainType.Passcode.PasscodeType.Passphrase.Companion.PASSPHRASE_MAX_NUMBER_OF_WORDS import com.x8bit.bitwarden.ui.tools.feature.generator.GeneratorState.MainType.Passcode.PasscodeType.Passphrase.Companion.PASSPHRASE_MIN_NUMBER_OF_WORDS import com.x8bit.bitwarden.ui.tools.feature.generator.GeneratorState.MainType.Username.UsernameType.ForwardedEmailAlias.ServiceType @@ -405,7 +404,7 @@ private fun GeneratedStringItem( }, onValueChange = {}, readOnly = true, - textStyle = LocalNonMaterialTypography.current.sensitiveInfoSmall, + textStyle = BitwardenTheme.typography.sensitiveInfoSmall, shouldAddCustomLineBreaks = true, visualTransformation = nonLetterColorVisualTransformation(), modifier = Modifier.padding(horizontal = 16.dp), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryListItem.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryListItem.kt index 9a299599f..9d8954261 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryListItem.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryListItem.kt @@ -24,7 +24,6 @@ import com.x8bit.bitwarden.ui.platform.base.util.withVisualTransformation import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton import com.x8bit.bitwarden.ui.platform.components.util.nonLetterColorVisualTransformation import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme -import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography /** * A composable function for displaying a password history list item. @@ -49,7 +48,7 @@ fun PasswordHistoryListItem( ) { Column(modifier = Modifier.weight(1f)) { var widthPx by remember(label) { mutableIntStateOf(0) } - val textStyle = LocalNonMaterialTypography.current.sensitiveInfoMedium + val textStyle = BitwardenTheme.typography.sensitiveInfoMedium val formattedText = label.withLineBreaksAtWidth( widthPx = widthPx.toFloat(), monospacedTextStyle = textStyle, @@ -68,7 +67,7 @@ fun PasswordHistoryListItem( Text( text = supportingLabel, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.testTag("GeneratedPasswordDateLabel"), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt index 7d65fa1c2..3abaa3723 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryScreen.kt @@ -13,7 +13,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.rememberTopAppBarState @@ -38,6 +37,7 @@ import com.x8bit.bitwarden.ui.platform.components.divider.BitwardenHorizontalDiv import com.x8bit.bitwarden.ui.platform.components.indicator.BitwardenCircularProgressIndicator import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.collections.immutable.persistentListOf /** @@ -192,7 +192,7 @@ private fun PasswordHistoryError( ) { Text( text = state.message.invoke(), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) Spacer(modifier = Modifier.navigationBarsPadding()) } @@ -207,7 +207,7 @@ private fun PasswordHistoryEmpty(modifier: Modifier = Modifier) { Text( modifier = Modifier.testTag("NoPasswordsDisplayedLabel"), text = stringResource(id = R.string.no_passwords_to_list), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) Spacer(modifier = Modifier.navigationBarsPadding()) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt index 16aad11e7..7566b0d72 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/SendEmpty.kt @@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -19,6 +18,7 @@ import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Content for the empty state of the [SendScreen]. @@ -47,7 +47,7 @@ fun SendEmpty( Text( textAlign = TextAlign.Center, text = stringResource(id = R.string.no_sends), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .fillMaxWidth() .padding(horizontal = 16.dp), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendContent.kt index e9d0183a9..636694367 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendContent.kt @@ -46,6 +46,7 @@ import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningTex import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenWideSwitch import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.tools.feature.send.addsend.handlers.AddSendHandlers import kotlinx.collections.immutable.persistentListOf @@ -151,7 +152,7 @@ fun AddSendContent( Text( text = type.name.orEmpty(), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .fillMaxWidth() .padding(horizontal = 16.dp), @@ -160,7 +161,7 @@ fun AddSendContent( Text( text = stringResource(id = R.string.max_file_size), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, modifier = Modifier .fillMaxWidth() .padding(horizontal = 16.dp), @@ -172,7 +173,7 @@ fun AddSendContent( .align(Alignment.CenterHorizontally), text = type.name ?: stringResource(id = R.string.no_file_chosen), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, ) Spacer(modifier = Modifier.height(8.dp)) BitwardenFilledTonalButton( @@ -195,7 +196,7 @@ fun AddSendContent( Text( text = stringResource(id = R.string.max_file_size), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, modifier = Modifier .fillMaxWidth() .padding(horizontal = 32.dp), @@ -204,7 +205,7 @@ fun AddSendContent( Text( text = stringResource(id = R.string.type_file_info), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, modifier = Modifier .fillMaxWidth() .padding(horizontal = 16.dp), @@ -218,14 +219,14 @@ fun AddSendContent( Text( text = type.name.orEmpty(), color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, modifier = Modifier.weight(1f), ) Spacer(modifier = Modifier.width(8.dp)) Text( text = type.displaySize.orEmpty(), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) } } @@ -309,7 +310,7 @@ private fun AddSendOptions( Text( text = stringResource(id = R.string.options), color = MaterialTheme.colorScheme.primary, - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, modifier = Modifier.padding(end = 8.dp), ) Icon( @@ -380,7 +381,7 @@ private fun AddSendOptions( Spacer(modifier = Modifier.height(4.dp)) Text( text = stringResource(id = R.string.deletion_date_info), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() @@ -417,7 +418,7 @@ private fun AddSendOptions( ) { Text( text = stringResource(id = R.string.expiration_date_info), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.weight(1f), ) @@ -449,7 +450,7 @@ private fun AddSendOptions( Spacer(modifier = Modifier.height(4.dp)) Text( text = stringResource(id = R.string.maximum_access_count_info), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() @@ -465,13 +466,13 @@ private fun AddSendOptions( ) { Text( text = stringResource(id = R.string.current_access_count) + ":", - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) Spacer(modifier = Modifier.width(4.dp)) Text( text = it.toString(), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendDeletionDateChooser.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendDeletionDateChooser.kt index d52056c63..3f8b1b5f3 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendDeletionDateChooser.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendDeletionDateChooser.kt @@ -20,6 +20,7 @@ import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.base.util.Text import com.x8bit.bitwarden.ui.platform.base.util.asText import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.collections.immutable.toImmutableList import java.time.ZonedDateTime import java.time.temporal.ChronoUnit @@ -79,7 +80,7 @@ fun SendDeletionDateChooser( Spacer(modifier = Modifier.height(4.dp)) Text( text = stringResource(id = R.string.deletion_date_info), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendExpirationDateChooser.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendExpirationDateChooser.kt index 4e0722eb2..c7ec9d4ac 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendExpirationDateChooser.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/send/addsend/AddSendExpirationDateChooser.kt @@ -20,6 +20,7 @@ import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.base.util.Text import com.x8bit.bitwarden.ui.platform.base.util.asText import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import kotlinx.collections.immutable.toImmutableList import java.time.ZonedDateTime import java.time.temporal.ChronoUnit @@ -81,7 +82,7 @@ fun SendExpirationDateChooser( Spacer(modifier = Modifier.height(4.dp)) Text( text = stringResource(id = R.string.expiration_date_info), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier .fillMaxWidth() diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/components/CollectionItemSelector.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/components/CollectionItemSelector.kt index ad4b68b47..2a8148d9b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/components/CollectionItemSelector.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/components/CollectionItemSelector.kt @@ -17,6 +17,7 @@ import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenWideSwitch +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.model.VaultCollection /** @@ -66,7 +67,7 @@ fun LazyListScope.collectionItemsSelector( ) { Text( text = stringResource(id = R.string.no_collections_to_list), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsContent.kt index 9144575ce..287eb2072 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsContent.kt @@ -30,6 +30,7 @@ import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalBut import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.feature.attachments.handlers.AttachmentsHandlers /** @@ -48,7 +49,7 @@ fun AttachmentsContent( Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(id = R.string.no_attachments), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.Center, modifier = Modifier @@ -88,7 +89,7 @@ fun AttachmentsContent( ?.displayName ?: stringResource(id = R.string.no_file_chosen), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, textAlign = TextAlign.Center, modifier = Modifier .fillMaxWidth() @@ -109,7 +110,7 @@ fun AttachmentsContent( Text( text = stringResource(id = R.string.max_file_size), color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, modifier = Modifier .fillMaxWidth() .padding(horizontal = 32.dp), @@ -159,7 +160,7 @@ private fun AttachmentListEntry( Text( text = attachmentItem.title, color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f), @@ -170,7 +171,7 @@ private fun AttachmentListEntry( Text( text = attachmentItem.displaySize, color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, modifier = Modifier, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemAttachmentContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemAttachmentContent.kt index bbb42c454..fec97c271 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemAttachmentContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemAttachmentContent.kt @@ -23,6 +23,7 @@ import com.x8bit.bitwarden.ui.platform.base.util.bottomDivider import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Attachment UI common for all item types. @@ -48,7 +49,7 @@ fun AttachmentItemContent( Text( text = attachmentItem.title, color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f), @@ -59,7 +60,7 @@ fun AttachmentItemContent( Text( text = attachmentItem.displaySize, color = MaterialTheme.colorScheme.onSurfaceVariant, - style = MaterialTheme.typography.labelSmall, + style = BitwardenTheme.typography.labelSmall, modifier = Modifier, ) @@ -97,7 +98,7 @@ fun AttachmentItemContent( text = { Text( text = stringResource(R.string.premium_required), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) }, containerColor = MaterialTheme.colorScheme.surfaceContainerHigh, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt index c56edb886..db623b66f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemLoginContent.kt @@ -25,6 +25,7 @@ import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextFieldWithActions import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText import com.x8bit.bitwarden.ui.platform.components.indicator.BitwardenCircularCountdownIndicator +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.feature.item.handlers.VaultCommonItemTypeHandlers import com.x8bit.bitwarden.ui.vault.feature.item.handlers.VaultLoginItemTypeHandlers import com.x8bit.bitwarden.ui.vault.feature.item.model.TotpCodeItemData @@ -344,12 +345,12 @@ private fun PasswordHistoryCount( ) { Text( text = "${stringResource(id = R.string.password_history)}: ", - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) Text( text = passwordHistoryCount.toString(), - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.primary, modifier = Modifier.clickable(onClick = onPasswordHistoryClick), ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSecureNoteContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSecureNoteContent.kt index 4c298c8cb..c2f084145 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSecureNoteContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemSecureNoteContent.kt @@ -19,6 +19,7 @@ import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.feature.item.handlers.VaultCommonItemTypeHandlers /** @@ -139,12 +140,12 @@ fun VaultItemSecureNoteContent( ) { Text( text = "${stringResource(id = R.string.date_updated)}: ", - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) Text( text = commonState.lastUpdated, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemUpdateText.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemUpdateText.kt index 724d4197c..464f21521 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemUpdateText.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemUpdateText.kt @@ -6,6 +6,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.semantics.semantics +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Update Text UI common for all item types. @@ -22,12 +23,12 @@ fun VaultItemUpdateText( ) { Text( text = header, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) Text( text = text, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingEmpty.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingEmpty.kt index 0c8d7035c..d4aa11ff4 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingEmpty.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingEmpty.kt @@ -7,13 +7,13 @@ import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.feature.vault.VaultNoItems /** @@ -58,7 +58,7 @@ private fun GenericNoItems( .fillMaxWidth() .padding(horizontal = 16.dp), text = text, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) Spacer(modifier = Modifier.weight(1f)) Spacer(modifier = Modifier.navigationBarsPadding()) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/manualcodeentry/ManualCodeEntryScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/manualcodeentry/ManualCodeEntryScreen.kt index a86f941d7..9248fd43f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/manualcodeentry/ManualCodeEntryScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/manualcodeentry/ManualCodeEntryScreen.kt @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.rememberTopAppBarState @@ -41,6 +40,7 @@ import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.composition.LocalPermissionsManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * The screen to manually add a totp code. @@ -125,7 +125,7 @@ fun ManualCodeEntryScreen( Text( text = stringResource(id = R.string.enter_key_manually), - style = MaterialTheme.typography.titleMedium, + style = BitwardenTheme.typography.titleMedium, modifier = Modifier.padding(horizontal = 16.dp), ) @@ -159,7 +159,7 @@ fun ManualCodeEntryScreen( Text( text = stringResource(id = R.string.once_the_key_is_successfully_entered), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .fillMaxWidth() .padding( @@ -170,7 +170,7 @@ fun ManualCodeEntryScreen( Text( text = stringResource(id = R.string.cannot_add_authenticator_key), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier .fillMaxWidth() .padding( @@ -190,7 +190,7 @@ fun ManualCodeEntryScreen( } } }, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) } } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationContent.kt index e17b53cfc..62d3ca5b0 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationContent.kt @@ -17,6 +17,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.components.collectionItemsSelector import com.x8bit.bitwarden.ui.vault.model.VaultCollection import kotlinx.collections.immutable.toImmutableList @@ -64,7 +65,7 @@ fun VaultMoveToOrganizationContent( Column(horizontalAlignment = Alignment.CenterHorizontally) { Text( text = stringResource(id = R.string.move_to_org_desc), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 12.sp, modifier = Modifier diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationEmpty.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationEmpty.kt index ab254703d..89e72e423 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationEmpty.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationEmpty.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Empty view for the [VaultMoveToOrganizationScreen]. @@ -27,7 +28,7 @@ fun VaultMoveToOrganizationEmpty(modifier: Modifier = Modifier) { Spacer(modifier = Modifier.height(8.dp)) Text( text = stringResource(id = R.string.no_orgs_to_list), - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center, modifier = Modifier diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/qrcodescan/QrCodeScanScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/qrcodescan/QrCodeScanScreen.kt index 2e826b325..6e12e1265 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/qrcodescan/QrCodeScanScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/qrcodescan/QrCodeScanScreen.kt @@ -58,6 +58,7 @@ import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.text.BitwardenClickableText import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.util.isPortrait import com.x8bit.bitwarden.ui.vault.feature.qrcodescan.util.QrCodeAnalyzer import com.x8bit.bitwarden.ui.vault.feature.qrcodescan.util.QrCodeAnalyzerImpl @@ -169,7 +170,7 @@ private fun PortraitQRCodeContent( text = stringResource(id = R.string.point_your_camera_at_the_qr_code), textAlign = TextAlign.Center, color = Color.White, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, modifier = Modifier.padding(horizontal = 16.dp), ) @@ -210,7 +211,7 @@ private fun LandscapeQRCodeContent( text = stringResource(id = R.string.point_your_camera_at_the_qr_code), textAlign = TextAlign.Center, color = Color.White, - style = MaterialTheme.typography.bodySmall, + style = BitwardenTheme.typography.bodySmall, ) BottomClickableText( @@ -412,11 +413,11 @@ private fun BottomClickableText( modifier = Modifier.padding(vertical = 4.dp), text = stringResource(id = R.string.cannot_scan_qr_code), color = Color.White, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) BitwardenClickableText( label = stringResource(id = R.string.enter_key_manually), - style = MaterialTheme.typography.labelLarge, + style = BitwardenTheme.typography.labelLarge, innerPadding = PaddingValues(vertical = 4.dp, horizontal = 12.dp), onClick = onEnterCodeManuallyClick, ) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultFilter.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultFilter.kt index ebe55102b..a22b0afe5 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultFilter.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultFilter.kt @@ -24,6 +24,7 @@ import com.x8bit.bitwarden.ui.platform.base.util.scrolledContainerBackground import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenSelectionDialog import com.x8bit.bitwarden.ui.platform.components.dialog.row.BitwardenSelectionRow +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.vault.feature.vault.model.VaultFilterType import kotlinx.collections.immutable.ImmutableList @@ -81,7 +82,7 @@ fun VaultFilter( id = R.string.vault_filter_description, selectedVaultFilterType.name(), ), - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .testTag("ActiveFilterLabel") diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt index 3ca2493da..f9e9e9280 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/VaultNoItems.kt @@ -22,6 +22,7 @@ import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * No items view for the [VaultScreen]. @@ -66,7 +67,7 @@ fun VaultNoItems( .fillMaxWidth() .padding(horizontal = 16.dp), text = message, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, ) Spacer(modifier = Modifier.height(24.dp)) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt index 6adaaef1b..325454398 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/verificationcode/VerificationCodeItem.kt @@ -81,7 +81,7 @@ fun VaultVerificationCodeItem( ) { Text( text = label, - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurface, maxLines = 1, overflow = TextOverflow.Ellipsis, @@ -90,7 +90,7 @@ fun VaultVerificationCodeItem( supportingLabel?.let { Text( text = it, - style = MaterialTheme.typography.bodyMedium, + style = BitwardenTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis, @@ -106,7 +106,7 @@ fun VaultVerificationCodeItem( if (!hideAuthCode) { Text( text = authCode.chunked(3).joinToString(" "), - style = MaterialTheme.typography.bodyLarge, + style = BitwardenTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.onSurfaceVariant, ) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 8ce949901..7c1883916 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -322,7 +322,7 @@ fun ExampleScreen( Text( text = state.exampleData, textAlign = TextAlign.Center, - style = MaterialTheme.typography.headlineSmall, + style = BitwardenTheme.typography.headlineSmall, color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .padding(horizontal = 24.dp)