Migrate all references of MaterialTheme Typography to BitwardenTheme (#4007)

This commit is contained in:
David Perez 2024-10-01 13:11:57 -05:00 committed by GitHub
parent 2224708fb1
commit e63c4806f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
107 changed files with 305 additions and 543 deletions

View file

@ -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

View file

@ -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

View file

@ -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(),

View file

@ -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",

View file

@ -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,
)

View file

@ -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,
)
}
}

View file

@ -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,
)

View file

@ -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)

View file

@ -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

View file

@ -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,
)

View file

@ -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"),
)

View file

@ -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,
)

View file

@ -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),

View file

@ -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,
)
}

View file

@ -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(

View file

@ -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,
)
}

View file

@ -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()

View file

@ -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(),

View file

@ -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(),

View file

@ -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)

View file

@ -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"),
)

View file

@ -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)

View file

@ -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),
)

View file

@ -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,
)
}

View file

@ -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<String>,
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,

View file

@ -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,
)
}
}

View file

@ -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"),
)
},

View file

@ -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,

View file

@ -80,7 +80,7 @@ fun BitwardenOverflowActionItem(
text = {
Text(
text = dropdownMenuItemData.text,
style = MaterialTheme.typography.bodyLarge,
style = BitwardenTheme.typography.bodyLarge,
)
},
onClick = {

View file

@ -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),
)
},

View file

@ -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,
)
}
}

View file

@ -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,
)
}
}

View file

@ -42,7 +42,7 @@ fun BitwardenFilledErrorButton(
) {
Text(
text = label,
style = MaterialTheme.typography.labelLarge,
style = BitwardenTheme.typography.labelLarge,
)
}
}

View file

@ -43,7 +43,7 @@ fun BitwardenFilledTonalButton(
) {
Text(
text = label,
style = MaterialTheme.typography.labelLarge,
style = BitwardenTheme.typography.labelLarge,
)
}
}

View file

@ -55,7 +55,7 @@ fun BitwardenFilledTonalButtonWithIcon(
)
Text(
text = label,
style = MaterialTheme.typography.labelLarge,
style = BitwardenTheme.typography.labelLarge,
)
}
}

View file

@ -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,
)
}
}

View file

@ -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,
)
}
}

View file

@ -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,
)
}
}

View file

@ -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,
)
}
}

View file

@ -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,
)
}

View file

@ -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)

View file

@ -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"),
)
},

View file

@ -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,
)
}
},

View file

@ -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"),
)

View file

@ -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"),
)
},

View file

@ -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(

View file

@ -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"),
)
}

View file

@ -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()

View file

@ -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,

View file

@ -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(

View file

@ -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() },

View file

@ -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,
)
}
}

View file

@ -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,
)
}
},

View file

@ -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),
)

View file

@ -27,7 +27,7 @@ fun BitwardenHiddenPasswordField(
) {
OutlinedTextField(
modifier = modifier,
textStyle = MaterialTheme.typography.bodyLarge,
textStyle = BitwardenTheme.typography.bodyLarge,
label = { Text(text = label) },
value = value,
onValueChange = { },

View file

@ -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,
)
}
},

View file

@ -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,
)
}
},

View file

@ -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,

View file

@ -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,
)
}

View file

@ -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,
)
}

View file

@ -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,
)

View file

@ -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 } },
)

View file

@ -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,
),

View file

@ -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,

View file

@ -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,
)
}

View file

@ -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 {

View file

@ -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,
)

View file

@ -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,
)
}

View file

@ -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)

View file

@ -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(

View file

@ -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(),
)
}

View file

@ -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(

View file

@ -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()

View file

@ -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)

View file

@ -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()

View file

@ -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

View file

@ -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,
)
}

View file

@ -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,
)
}

View file

@ -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(

View file

@ -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(

View file

@ -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)

View file

@ -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,
)
}

View file

@ -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"),
)

View file

@ -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<BitwardenTypography> =
compositionLocalOf { bitwardenTypography }
/**
* Provides access to non material theme typography throughout the app.
*/
val LocalNonMaterialTypography: ProvidableCompositionLocal<NonMaterialTypography> =
compositionLocalOf { nonMaterialTypography }
/**
* Provides access to non material theme colors throughout the app.
*/

View file

@ -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)
}
}

View file

@ -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),

View file

@ -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"),
)

View file

@ -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())
}

View file

@ -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),

View file

@ -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,
)
}

View file

@ -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()

View file

@ -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()

View file

@ -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,
)
}

View file

@ -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,
)

View file

@ -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,

View file

@ -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),
)

View file

@ -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,
)
}

View file

@ -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,
)
}

View file

@ -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())

View file

@ -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,
)
}
}

Some files were not shown because too many files have changed in this diff Show more