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(
text = stringResource(R.string.turn_on_autofill), text = stringResource(R.string.turn_on_autofill),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
) )
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = stringResource(R.string.use_autofill_to_log_into_your_accounts), text = stringResource(R.string.use_autofill_to_log_into_your_accounts),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
// Apply similar line breaks to design // Apply similar line breaks to design

View file

@ -91,7 +91,7 @@ private fun SetupCompleteContent(
Spacer(Modifier.height(24.dp)) Spacer(Modifier.height(24.dp))
Text( Text(
text = stringResource(R.string.youre_all_set), text = stringResource(R.string.youre_all_set),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
@ -101,7 +101,7 @@ private fun SetupCompleteContent(
Spacer(Modifier.height(8.dp)) Spacer(Modifier.height(8.dp))
Text( Text(
text = stringResource(R.string.what_bitwarden_has_to_offer), text = stringResource(R.string.what_bitwarden_has_to_offer),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier 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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.composition.LocalBiometricsManager import com.x8bit.bitwarden.ui.platform.composition.LocalBiometricsManager
import com.x8bit.bitwarden.ui.platform.manager.biometrics.BiometricsManager 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 import com.x8bit.bitwarden.ui.platform.util.isPortrait
/** /**
@ -227,7 +228,7 @@ private fun ColumnScope.SetupUnlockHeaderPortrait() {
Spacer(modifier = Modifier.height(height = 24.dp)) Spacer(modifier = Modifier.height(height = 24.dp))
Text( Text(
text = stringResource(id = R.string.set_up_unlock), text = stringResource(id = R.string.set_up_unlock),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
@ -241,7 +242,7 @@ private fun ColumnScope.SetupUnlockHeaderPortrait() {
text = stringResource( text = stringResource(
id = R.string.set_up_biometrics_or_choose_a_pin_code_to_quickly_access_your_vault_and_autofill_your_logins, 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, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
@ -273,7 +274,7 @@ private fun SetupUnlockHeaderLandscape(
) { ) {
Text( Text(
text = stringResource(id = R.string.set_up_unlock), text = stringResource(id = R.string.set_up_unlock),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
@ -285,7 +286,7 @@ private fun SetupUnlockHeaderLandscape(
text = stringResource( text = stringResource(
id = R.string.set_up_biometrics_or_choose_a_pin_code_to_quickly_access_your_vault_and_autofill_your_logins, 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, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),

View file

@ -150,7 +150,7 @@ private fun CheckEmailContent(
Text( Text(
text = stringResource(id = R.string.check_your_email), text = stringResource(id = R.string.check_your_email),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier modifier = Modifier
.padding(horizontal = 8.dp) .padding(horizontal = 8.dp)
@ -167,7 +167,7 @@ private fun CheckEmailContent(
highlights = listOf(email), highlights = listOf(email),
highlightStyle = SpanStyle( highlightStyle = SpanStyle(
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
fontSize = MaterialTheme.typography.bodyMedium.fontSize, fontSize = BitwardenTheme.typography.bodyMedium.fontSize,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
), ),
tag = "EMAIL", tag = "EMAIL",
@ -175,7 +175,7 @@ private fun CheckEmailContent(
Text( Text(
text = descriptionAnnotatedString, text = descriptionAnnotatedString,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.padding(horizontal = 8.dp) .padding(horizontal = 8.dp)
.fillMaxWidth() .fillMaxWidth()
@ -185,7 +185,7 @@ private fun CheckEmailContent(
@Suppress("MaxLineLength") @Suppress("MaxLineLength")
Text( Text(
text = stringResource(R.string.select_the_link_in_the_email_to_verify_your_email_address_and_continue_creating_your_account), 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, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
@ -238,7 +238,7 @@ private fun CheckEmailLegacyContent(
Text( Text(
text = stringResource(id = R.string.check_your_email), text = stringResource(id = R.string.check_your_email),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier modifier = Modifier
.padding(horizontal = 24.dp) .padding(horizontal = 24.dp)
@ -256,7 +256,7 @@ private fun CheckEmailLegacyContent(
highlights = listOf(email), highlights = listOf(email),
highlightStyle = SpanStyle( highlightStyle = SpanStyle(
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
fontSize = MaterialTheme.typography.bodyMedium.fontSize, fontSize = BitwardenTheme.typography.bodyMedium.fontSize,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
), ),
tag = "EMAIL", tag = "EMAIL",

View file

@ -301,7 +301,7 @@ private fun CompleteRegistrationContent(
id = R.string.learn_about_other_ways_to_prevent_account_lockout, id = R.string.learn_about_other_ways_to_prevent_account_lockout,
), ),
onClick = handler.onLearnToPreventLockout, onClick = handler.onLearnToPreventLockout,
style = MaterialTheme.typography.labelMedium, style = BitwardenTheme.typography.labelMedium,
modifier = Modifier.standardHorizontalMargin(), 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, id = R.string.follow_the_instructions_in_the_email_sent_to_x_to_continue_creating_your_account,
userEmail, userEmail,
), ),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = modifier modifier = modifier
.fillMaxWidth(), .fillMaxWidth(),
@ -385,7 +385,7 @@ private fun OrderedHeaderContent() {
) { ) {
Text( Text(
text = stringResource(R.string.choose_your_master_password), text = stringResource(R.string.choose_your_master_password),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
) )
@ -394,7 +394,7 @@ private fun OrderedHeaderContent() {
text = stringResource( text = stringResource(
R.string.choose_a_unique_and_strong_password_to_keep_your_information_safe, 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, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
) )

View file

@ -111,7 +111,7 @@ fun PasswordStrengthIndicator(
} }
Text( Text(
text = label(), text = label(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = indicatorColor, color = indicatorColor,
) )
} }
@ -156,7 +156,7 @@ private fun MinimumCharacterCount(
Text( Text(
text = stringResource(R.string.minimum_characters, minimumCharacterCount), text = stringResource(R.string.minimum_characters, minimumCharacterCount),
color = characterCountColor, 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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager 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. * 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)) { Column(Modifier.padding(start = 16.dp, top = 4.dp, bottom = 4.dp)) {
Text( Text(
text = stringResource(id = R.string.accept_policies), text = stringResource(id = R.string.accept_policies),
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
FlowRow( FlowRow(
@ -337,13 +338,13 @@ private fun TermsAndPrivacySwitch(
BitwardenClickableText( BitwardenClickableText(
label = stringResource(id = R.string.terms_of_service), label = stringResource(id = R.string.terms_of_service),
onClick = onTermsClick, onClick = onTermsClick,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
innerPadding = PaddingValues(vertical = 4.dp, horizontal = 0.dp), innerPadding = PaddingValues(vertical = 4.dp, horizontal = 0.dp),
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
) )
Text( Text(
text = ",", text = ",",
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
modifier = Modifier.padding(vertical = 4.dp), modifier = Modifier.padding(vertical = 4.dp),
) )
@ -351,7 +352,7 @@ private fun TermsAndPrivacySwitch(
BitwardenClickableText( BitwardenClickableText(
label = stringResource(id = R.string.privacy_policy), label = stringResource(id = R.string.privacy_policy),
onClick = onPrivacyPolicyClick, onClick = onPrivacyPolicyClick,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
innerPadding = PaddingValues(vertical = 4.dp, horizontal = 0.dp), innerPadding = PaddingValues(vertical = 4.dp, horizontal = 0.dp),
color = MaterialTheme.colorScheme.primary, 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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager 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. * The top level composable for the Enterprise Single Sign On screen.
@ -155,7 +156,7 @@ private fun EnterpriseSignOnScreenContent(
Text( Text(
text = stringResource(id = R.string.log_in_sso_summary), text = stringResource(id = R.string.log_in_sso_summary),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)

View file

@ -107,7 +107,7 @@ private fun ExpiredRegistrationLinkContent(
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = stringResource(R.string.expired_link), text = stringResource(R.string.expired_link),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
@ -117,7 +117,7 @@ private fun ExpiredRegistrationLinkContent(
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = stringResource(R.string.please_restart_registration_or_try_logging_in), text = stringResource(R.string.please_restart_registration_or_try_logging_in),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier 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.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenSwitch import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenSwitch
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
/** /**
@ -236,7 +237,7 @@ private fun LandingScreenContent(
Text( Text(
text = stringResource(id = R.string.login_or_create_new_account), text = stringResource(id = R.string.login_or_create_new_account),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier modifier = Modifier
.padding(horizontal = 24.dp) .padding(horizontal = 24.dp)
@ -304,7 +305,7 @@ private fun LandingScreenContent(
) { ) {
Text( Text(
text = stringResource(id = R.string.new_around_here), text = stringResource(id = R.string.new_around_here),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface, 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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager 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.persistentListOf
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
@ -252,7 +253,7 @@ private fun LoginScreenContent(
BitwardenClickableText( BitwardenClickableText(
label = stringResource(id = R.string.get_master_passwordword_hint), label = stringResource(id = R.string.get_master_passwordword_hint),
onClick = onMasterPasswordClick, onClick = onMasterPasswordClick,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.testTag("GetMasterPasswordHintLabel"), .testTag("GetMasterPasswordHintLabel"),
@ -305,7 +306,7 @@ private fun LoginScreenContent(
state.environmentLabel, state.environmentLabel,
), ),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.testTag("LoggingInAsLabel") .testTag("LoggingInAsLabel")
@ -316,7 +317,7 @@ private fun LoginScreenContent(
BitwardenClickableText( BitwardenClickableText(
label = stringResource(id = R.string.not_you), label = stringResource(id = R.string.not_you),
onClick = onNotYouButtonClick, onClick = onNotYouButtonClick,
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp),
modifier = Modifier.testTag("NotYouLabel"), 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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager import com.x8bit.bitwarden.ui.platform.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager 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.LocalNonMaterialColors
import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography
/** /**
* The top level composable for the Login with Device screen. * The top level composable for the Login with Device screen.
@ -145,7 +145,7 @@ private fun LoginWithDeviceScreenContent(
Text( Text(
text = state.title(), text = state.title(),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.headlineMedium, style = BitwardenTheme.typography.headlineMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -157,7 +157,7 @@ private fun LoginWithDeviceScreenContent(
Text( Text(
text = state.subtitle(), text = state.subtitle(),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -169,7 +169,7 @@ private fun LoginWithDeviceScreenContent(
Text( Text(
text = state.description(), text = state.description(),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -181,7 +181,7 @@ private fun LoginWithDeviceScreenContent(
Text( Text(
text = stringResource(id = R.string.fingerprint_phrase), text = stringResource(id = R.string.fingerprint_phrase),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.titleLarge, style = BitwardenTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -194,7 +194,7 @@ private fun LoginWithDeviceScreenContent(
text = state.fingerprintPhrase, text = state.fingerprintPhrase,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
color = LocalNonMaterialColors.current.fingerprint, color = LocalNonMaterialColors.current.fingerprint,
style = LocalNonMaterialTypography.current.sensitiveInfoSmall, style = BitwardenTheme.typography.sensitiveInfoSmall,
minLines = 2, minLines = 2,
modifier = Modifier modifier = Modifier
.testTag("FingerprintPhraseValue") .testTag("FingerprintPhraseValue")
@ -219,7 +219,7 @@ private fun LoginWithDeviceScreenContent(
BitwardenClickableText( BitwardenClickableText(
modifier = Modifier.testTag("ResendNotificationButton"), modifier = Modifier.testTag("ResendNotificationButton"),
label = stringResource(id = R.string.resend_notification), label = stringResource(id = R.string.resend_notification),
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp),
onClick = onResendNotificationClick, onClick = onResendNotificationClick,
) )
@ -232,7 +232,7 @@ private fun LoginWithDeviceScreenContent(
Text( Text(
text = state.otherOptions(), text = state.otherOptions(),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -243,7 +243,7 @@ private fun LoginWithDeviceScreenContent(
modifier = Modifier.testTag("ViewAllLoginOptionsButton"), modifier = Modifier.testTag("ViewAllLoginOptionsButton"),
label = stringResource(id = R.string.view_all_login_options), label = stringResource(id = R.string.view_all_login_options),
innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp),
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
onClick = onViewAllLogInOptionsClick, 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.nonLetterColorVisualTransformation
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography
/** /**
* Top level composable for the master password generator. * Top level composable for the master password generator.
@ -151,7 +150,7 @@ private fun MasterPasswordGeneratorContent(
onValueChange = {}, onValueChange = {},
readOnly = true, readOnly = true,
shouldAddCustomLineBreaks = true, shouldAddCustomLineBreaks = true,
textStyle = LocalNonMaterialTypography.current.sensitiveInfoSmall, textStyle = BitwardenTheme.typography.sensitiveInfoSmall,
visualTransformation = nonLetterColorVisualTransformation(), visualTransformation = nonLetterColorVisualTransformation(),
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
) )
@ -166,12 +165,12 @@ private fun MasterPasswordGeneratorContent(
Spacer(modifier = Modifier.height(12.dp)) Spacer(modifier = Modifier.height(12.dp))
Text( Text(
text = stringResource(R.string.write_this_password_down_and_keep_it_somewhere_safe), 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, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
BitwardenClickableText( BitwardenClickableText(
label = stringResource(R.string.learn_about_other_ways_to_prevent_account_lockout), label = stringResource(R.string.learn_about_other_ways_to_prevent_account_lockout),
style = MaterialTheme.typography.labelMedium, style = BitwardenTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
onClick = onLearnToPreventLockout, onClick = onLearnToPreventLockout,
innerPadding = PaddingValues(horizontal = 0.dp, vertical = 4.dp), innerPadding = PaddingValues(horizontal = 0.dp, vertical = 4.dp),

View file

@ -103,12 +103,12 @@ fun MasterPasswordGuidanceScreen(
Text( Text(
text = stringResource(R.string.what_makes_a_password_strong), text = stringResource(R.string.what_makes_a_password_strong),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
text = stringResource( text = stringResource(
R.string.the_longer_your_password_the_more_difficult_to_hack, R.string.the_longer_your_password_the_more_difficult_to_hack,
@ -123,7 +123,7 @@ fun MasterPasswordGuidanceScreen(
) { ) {
Text( Text(
text = stringResource(R.string.the_strongest_passwords_are_usually), text = stringResource(R.string.the_strongest_passwords_are_usually),
style = MaterialTheme.typography.titleSmall, style = BitwardenTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
@ -193,13 +193,13 @@ private fun BulletTextRow(
Text( Text(
text = BULLET_TWO_TAB, text = BULLET_TWO_TAB,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.clearAndSetSemantics { }, modifier = Modifier.clearAndSetSemantics { },
) )
Text( Text(
text = text, text = text,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, 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.fillMaxWidth
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState 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.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter 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. * The top level composable for the Login screen.
@ -131,7 +131,7 @@ fun MasterPasswordHintScreen(
Text( Text(
text = stringResource(id = R.string.enter_email_for_hint), text = stringResource(id = R.string.enter_email_for_hint),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding( .padding(

View file

@ -102,7 +102,7 @@ private fun NeverLoseAccessContent(
Spacer(modifier = Modifier.height(24.dp)) Spacer(modifier = Modifier.height(24.dp))
Text( Text(
text = stringResource(R.string.never_lose_access_to_your_vault), text = stringResource(R.string.never_lose_access_to_your_vault),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.padding(horizontal = 24.dp), modifier = Modifier.padding(horizontal = 24.dp),
@ -112,7 +112,7 @@ private fun NeverLoseAccessContent(
text = stringResource( text = stringResource(
R.string.the_best_way_to_make_sure_you_can_always_access_your_account, 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, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(horizontal = 24.dp), modifier = Modifier.padding(horizontal = 24.dp),
) )
@ -163,13 +163,13 @@ private fun AccountRecoveryTipRow(
Column { Column {
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.titleSmall, style = BitwardenTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
Spacer(modifier = Modifier.height(4.dp)) Spacer(modifier = Modifier.height(4.dp))
Text( Text(
text = description, text = description,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
} }

View file

@ -97,7 +97,7 @@ private fun RemovePasswordScreenContent(
Text( Text(
text = state.description(), text = state.description(),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.standardHorizontalMargin() .standardHorizontalMargin()

View file

@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable 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.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText 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. * The top level composable for the Reset Password screen.
@ -170,7 +170,7 @@ private fun ResetPasswordScreenContent(
BitwardenPolicyWarningText( BitwardenPolicyWarningText(
text = stringResource(id = instructionsTextId), text = stringResource(id = instructionsTextId),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.fillMaxWidth(), .fillMaxWidth(),
@ -187,7 +187,7 @@ private fun ResetPasswordScreenContent(
BitwardenPolicyWarningText( BitwardenPolicyWarningText(
text = passwordPolicyContent, text = passwordPolicyContent,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.fillMaxWidth(), .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.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText 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. * The top level composable for the Set Master Password screen.
@ -120,7 +121,7 @@ private fun SetPasswordScreenContent(
text = stringResource( text = stringResource(
id = R.string.your_organization_requires_you_to_set_a_master_password, id = R.string.your_organization_requires_you_to_set_a_master_password,
), ),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -131,7 +132,7 @@ private fun SetPasswordScreenContent(
BitwardenPolicyWarningText( BitwardenPolicyWarningText(
text = stringResource(id = R.string.reset_password_auto_enroll_invite_warning), text = stringResource(id = R.string.reset_password_auto_enroll_invite_warning),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.fillMaxWidth(), .fillMaxWidth(),

View file

@ -325,7 +325,7 @@ private fun TermsAndPrivacyText(
addStyle( addStyle(
style = SpanStyle( style = SpanStyle(
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
fontSize = MaterialTheme.typography.bodyMedium.fontSize, fontSize = BitwardenTheme.typography.bodyMedium.fontSize,
), ),
start = 0, start = 0,
end = strTermsAndPrivacy.length, end = strTermsAndPrivacy.length,
@ -333,7 +333,7 @@ private fun TermsAndPrivacyText(
addStyle( addStyle(
style = SpanStyle( style = SpanStyle(
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
fontSize = MaterialTheme.typography.bodyMedium.fontSize, fontSize = BitwardenTheme.typography.bodyMedium.fontSize,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
), ),
start = startIndexTerms, start = startIndexTerms,
@ -342,7 +342,7 @@ private fun TermsAndPrivacyText(
addStyle( addStyle(
style = SpanStyle( style = SpanStyle(
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
fontSize = MaterialTheme.typography.bodyMedium.fontSize, fontSize = BitwardenTheme.typography.bodyMedium.fontSize,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
), ),
start = startIndexPrivacy, start = startIndexPrivacy,
@ -390,7 +390,7 @@ private fun TermsAndPrivacyText(
val termsUrl = stringResource(id = R.string.terms_of_service) val termsUrl = stringResource(id = R.string.terms_of_service)
ClickableText( ClickableText(
text = annotatedLinkString, text = annotatedLinkString,
style = MaterialTheme.typography.bodyMedium.copy( style = BitwardenTheme.typography.bodyMedium.copy(
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
), ),
onClick = { onClick = {
@ -458,7 +458,7 @@ private fun ReceiveMarketingEmailsSwitch(
Spacer(modifier = Modifier.width(16.dp)) Spacer(modifier = Modifier.width(16.dp))
ClickableText( ClickableText(
text = annotatedLinkString, text = annotatedLinkString,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
onClick = { onClick = {
annotatedLinkString annotatedLinkString
.getStringAnnotations(TAG_URL, it, it) .getStringAnnotations(TAG_URL, it, it)

View file

@ -185,7 +185,7 @@ private fun TrustedDeviceScaffold(
state.emailAddress, state.emailAddress,
state.environmentLabel, state.environmentLabel,
), ),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.testTag("LoggingInAsLabel") .testTag("LoggingInAsLabel")
@ -196,7 +196,7 @@ private fun TrustedDeviceScaffold(
BitwardenClickableText( BitwardenClickableText(
label = stringResource(id = R.string.not_you), label = stringResource(id = R.string.not_you),
onClick = handlers.onNotYouButtonClick, onClick = handlers.onNotYouButtonClick,
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp), innerPadding = PaddingValues(vertical = 8.dp, horizontal = 16.dp),
modifier = Modifier.testTag("NotYouLabel"), modifier = Modifier.testTag("NotYouLabel"),
) )

View file

@ -224,7 +224,7 @@ private fun TwoFactorLoginScreenContent(
Text( Text(
text = state.authMethod.description(state.displayEmail)(), text = state.authMethod.description(state.displayEmail)(),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .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.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.composition.LocalBiometricsManager import com.x8bit.bitwarden.ui.platform.composition.LocalBiometricsManager
import com.x8bit.bitwarden.ui.platform.manager.biometrics.BiometricsManager 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.persistentListOf
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
import javax.crypto.Cipher import javax.crypto.Cipher
@ -222,7 +223,7 @@ fun VaultUnlockScreen(
Spacer(modifier = Modifier.height(24.dp)) Spacer(modifier = Modifier.height(24.dp))
Text( Text(
text = state.vaultUnlockType.unlockScreenMessage(), text = state.vaultUnlockType.unlockScreenMessage(),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -236,7 +237,7 @@ fun VaultUnlockScreen(
state.email, state.email,
state.environmentUrl, state.environmentUrl,
), ),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.testTag("UserAndEnvironmentDataLabel") .testTag("UserAndEnvironmentDataLabel")
@ -259,7 +260,7 @@ fun VaultUnlockScreen(
Text( Text(
text = stringResource(R.string.account_biometric_invalidated), text = stringResource(R.string.account_biometric_invalidated),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.error, color = MaterialTheme.colorScheme.error,
modifier = Modifier.padding(horizontal = 16.dp), 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.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import com.x8bit.bitwarden.ui.platform.util.isPortrait import com.x8bit.bitwarden.ui.platform.util.isPortrait
/** /**
@ -189,7 +190,7 @@ private fun WelcomeCardLandscape(
Text( Text(
text = stringResource(id = state.titleRes), text = stringResource(id = state.titleRes),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.headlineMedium, style = BitwardenTheme.typography.headlineMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.padding(bottom = 16.dp), modifier = Modifier.padding(bottom = 16.dp),
) )
@ -197,7 +198,7 @@ private fun WelcomeCardLandscape(
Text( Text(
text = stringResource(id = state.messageRes), text = stringResource(id = state.messageRes),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
} }
@ -222,7 +223,7 @@ private fun WelcomeCardPortrait(
Text( Text(
text = stringResource(id = state.titleRes), text = stringResource(id = state.titleRes),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.headlineMedium, style = BitwardenTheme.typography.headlineMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier modifier = Modifier
.padding( .padding(
@ -234,7 +235,7 @@ private fun WelcomeCardPortrait(
Text( Text(
text = stringResource(id = state.messageRes), text = stringResource(id = state.messageRes),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, 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.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.RawValue import kotlinx.parcelize.RawValue
@ -135,7 +136,7 @@ fun createAnnotatedString(
highlights: List<String>, highlights: List<String>,
highlightStyle: SpanStyle = SpanStyle( highlightStyle: SpanStyle = SpanStyle(
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
fontSize = MaterialTheme.typography.bodyMedium.fontSize, fontSize = BitwardenTheme.typography.bodyMedium.fontSize,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
), ),
tag: String, tag: String,
@ -145,7 +146,7 @@ fun createAnnotatedString(
addStyle( addStyle(
style = SpanStyle( style = SpanStyle(
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
fontSize = MaterialTheme.typography.bodyMedium.fontSize, fontSize = BitwardenTheme.typography.bodyMedium.fontSize,
), ),
start = 0, start = 0,
end = mainString.length, 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.model.AccountSummary
import com.x8bit.bitwarden.ui.platform.components.scrim.BitwardenAnimatedScrim import com.x8bit.bitwarden.ui.platform.components.scrim.BitwardenAnimatedScrim
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter 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.iconRes
import com.x8bit.bitwarden.ui.vault.feature.vault.util.iconTestTag import com.x8bit.bitwarden.ui.vault.feature.vault.util.iconTestTag
import com.x8bit.bitwarden.ui.vault.feature.vault.util.initials import com.x8bit.bitwarden.ui.vault.feature.vault.util.initials
@ -292,7 +293,7 @@ private fun AccountSummaryItem(
Text( Text(
text = accountSummary.initials, text = accountSummary.initials,
style = MaterialTheme.typography.titleMedium style = BitwardenTheme.typography.titleMedium
// Do not allow scaling // Do not allow scaling
.copy(fontSize = 16.dp.toUnscaledTextUnit()), .copy(fontSize = 16.dp.toUnscaledTextUnit()),
color = accountSummary.avatarColor.toSafeOverlayColor(), color = accountSummary.avatarColor.toSafeOverlayColor(),
@ -307,7 +308,7 @@ private fun AccountSummaryItem(
) { ) {
Text( Text(
text = accountSummary.email, text = accountSummary.email,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
modifier = Modifier.testTag("AccountEmailLabel"), modifier = Modifier.testTag("AccountEmailLabel"),
@ -315,7 +316,7 @@ private fun AccountSummaryItem(
Text( Text(
text = accountSummary.environmentLabel, text = accountSummary.environmentLabel,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.testTag("AccountEnvironmentLabel"), modifier = Modifier.testTag("AccountEnvironmentLabel"),
) )
@ -323,7 +324,7 @@ private fun AccountSummaryItem(
accountSummary.supportingTextResOrNull?.let { supportingTextResId -> accountSummary.supportingTextResOrNull?.let { supportingTextResId ->
Text( Text(
text = stringResource(id = supportingTextResId).lowercaseWithCurrentLocal(), text = stringResource(id = supportingTextResId).lowercaseWithCurrentLocal(),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.testTag("AccountStatusLabel"), modifier = Modifier.testTag("AccountStatusLabel"),
) )
@ -414,7 +415,7 @@ private fun AddAccountItem(
Text( Text(
text = stringResource(id = R.string.add_account), 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 androidx.compose.ui.tooling.preview.Preview
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton 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. * A custom Bitwarden-themed medium top app bar with support for actions.
@ -50,7 +51,7 @@ fun BitwardenMediumTopAppBar(
title = { title = {
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.titleLarge, style = BitwardenTheme.typography.titleLarge,
modifier = Modifier.testTag("PageTitleLabel"), modifier = Modifier.testTag("PageTitleLabel"),
) )
}, },

View file

@ -119,7 +119,7 @@ fun BitwardenTopAppBar(
// making adding any arguments for softWrap and minLines superfluous. // making adding any arguments for softWrap and minLines superfluous.
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.titleLarge, style = BitwardenTheme.typography.titleLarge,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
modifier = Modifier.testTag("PageTitleLabel"), modifier = Modifier.testTag("PageTitleLabel"),
) )
@ -135,7 +135,7 @@ fun BitwardenTopAppBar(
title = { title = {
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.titleLarge, style = BitwardenTheme.typography.titleLarge,
maxLines = 1, maxLines = 1,
softWrap = false, softWrap = false,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,

View file

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

View file

@ -17,6 +17,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialColors import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialColors
/** /**
@ -41,7 +42,7 @@ fun NotificationBadge(
content = { content = {
Text( Text(
text = notificationCount.toString(), text = notificationCount.toString(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
modifier = Modifier.padding(horizontal = 5.dp, vertical = 2.dp), 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.foundation.layout.PaddingValues
import androidx.compose.material3.Button import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Represents a Bitwarden-styled filled [Button]. * Represents a Bitwarden-styled filled [Button].
@ -38,7 +38,7 @@ fun BitwardenFilledButton(
) { ) {
Text( Text(
text = label, 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.Button
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
@ -54,7 +53,7 @@ fun BitwardenFilledButtonWithIcon(
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
) )
} }
} }

View file

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

View file

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

View file

@ -55,7 +55,7 @@ fun BitwardenFilledTonalButtonWithIcon(
) )
Text( Text(
text = label, 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.foundation.layout.PaddingValues
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -10,6 +9,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Represents a Bitwarden-styled filled [OutlinedButton]. * Represents a Bitwarden-styled filled [OutlinedButton].
@ -39,7 +39,7 @@ fun BitwardenOutlinedButton(
) { ) {
Text( Text(
text = label, 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.foundation.layout.padding
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -15,6 +14,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter 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. * Represents a Bitwarden-styled filled [OutlinedButton] with an icon.
@ -53,7 +53,7 @@ fun BitwardenOutlinedButtonWithIcon(
Text( Text(
text = label, 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.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Represents a Bitwarden-styled filled [OutlinedButton] for error states. * Represents a Bitwarden-styled filled [OutlinedButton] for error states.
@ -47,7 +48,7 @@ fun BitwardenOutlinedErrorButton(
) { ) {
Text( Text(
text = label, 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.foundation.layout.PaddingValues
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.TextButton import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -10,6 +9,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Represents a Bitwarden-styled [TextButton]. * Represents a Bitwarden-styled [TextButton].
@ -47,7 +47,7 @@ fun BitwardenTextButton(
) { ) {
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
) )
} }
} }

View file

@ -64,13 +64,13 @@ fun BitwardenActionCard(
) { ) {
Text( Text(
text = actionText, text = actionText,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = callToActionText, text = callToActionText,
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
) )
} }

View file

@ -18,6 +18,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* A Bitwarden-themed, re-usable error state. * A Bitwarden-themed, re-usable error state.
@ -38,7 +39,7 @@ fun BitwardenErrorContent(
Text( Text(
text = message, text = message,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)

View file

@ -48,7 +48,7 @@ fun BitwardenBasicDialog(
{ {
Text( Text(
text = it(), text = it(),
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
modifier = Modifier.testTag("AlertTitleText"), modifier = Modifier.testTag("AlertTitleText"),
) )
} }
@ -56,7 +56,7 @@ fun BitwardenBasicDialog(
text = { text = {
Text( Text(
text = visibilityState.message(), text = visibilityState.message(),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier.testTag("AlertContentText"), modifier = Modifier.testTag("AlertContentText"),
) )
}, },

View file

@ -31,6 +31,7 @@ import androidx.compose.ui.semantics.testTag
import androidx.compose.ui.semantics.testTagsAsResourceId import androidx.compose.ui.semantics.testTagsAsResourceId
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter 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.orNow
import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern
import java.time.Instant import java.time.Instant
@ -82,7 +83,7 @@ fun BitwardenDateSelectButton(
interactionSource = remember { MutableInteractionSource() }, interactionSource = remember { MutableInteractionSource() },
onClick = { shouldShowDialog = !shouldShowDialog }, onClick = { shouldShowDialog = !shouldShowDialog },
), ),
textStyle = MaterialTheme.typography.bodyLarge, textStyle = BitwardenTheme.typography.bodyLarge,
readOnly = true, readOnly = true,
label = { Text(text = label) }, label = { Text(text = label) },
value = formattedDate, value = formattedDate,
@ -131,7 +132,7 @@ fun BitwardenDateSelectButton(
) { ) {
Text( Text(
text = stringResource(id = R.string.ok), text = stringResource(id = R.string.ok),
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
) )
} }
}, },
@ -142,7 +143,7 @@ fun BitwardenDateSelectButton(
) { ) {
Text( Text(
text = stringResource(id = R.string.cancel), 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.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField 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. * Represents a Bitwarden-styled dialog for entering your master password.
@ -58,7 +59,7 @@ fun BitwardenMasterPasswordDialog(
title = { title = {
Text( Text(
text = stringResource(id = R.string.password_confirmation), text = stringResource(id = R.string.password_confirmation),
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
modifier = Modifier.testTag("AlertTitleText"), modifier = Modifier.testTag("AlertTitleText"),
) )
}, },
@ -66,7 +67,7 @@ fun BitwardenMasterPasswordDialog(
Column { Column {
Text( Text(
text = stringResource(id = R.string.password_confirmation_desc), text = stringResource(id = R.string.password_confirmation_desc),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier.testTag("AlertContentText"), 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.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenPasswordField 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. * Represents a Bitwarden-styled dialog for the user to enter their PIN.
@ -54,7 +55,7 @@ fun BitwardenPinDialog(
title = { title = {
Text( Text(
text = stringResource(id = R.string.verify_pin), text = stringResource(id = R.string.verify_pin),
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
modifier = Modifier.testTag("AlertTitleText"), 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.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.dialog.row.BitwardenSelectionRow 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.components.util.maxDialogHeight
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Displays a dialog with a title and "Cancel" button. * Displays a dialog with a title and "Cancel" button.
@ -74,7 +75,7 @@ fun BitwardenSelectionDialog(
.fillMaxWidth(), .fillMaxWidth(),
text = title, text = title,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
) )
if (scrollState.canScrollBackward) { if (scrollState.canScrollBackward) {
Box( Box(

View file

@ -22,6 +22,7 @@ import androidx.compose.ui.semantics.testTagsAsResourceId
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton 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.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Represents a Bitwarden-styled dialog that is used to enter text. * Represents a Bitwarden-styled dialog that is used to enter text.
@ -67,7 +68,7 @@ fun BitwardenTextEntryDialog(
{ {
Text( Text(
text = it, text = it,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
modifier = Modifier.testTag("AlertTitleText"), modifier = Modifier.testTag("AlertTitleText"),
) )
} }

View file

@ -36,6 +36,7 @@ import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties import androidx.compose.ui.window.DialogProperties
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton 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. * A custom composable representing a dialog that displays the time picker dialog.
@ -71,7 +72,7 @@ fun BitwardenTimePickerDialog(
) { ) {
Text( Text(
text = stringResource(id = R.string.ok), text = stringResource(id = R.string.ok),
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
modifier = Modifier.testTag("AcceptAlertButton"), modifier = Modifier.testTag("AcceptAlertButton"),
) )
} }
@ -83,7 +84,7 @@ fun BitwardenTimePickerDialog(
) { ) {
Text( Text(
text = stringResource(id = R.string.cancel), 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), .padding(bottom = 20.dp),
// TODO: This should be "Select time" but we don't have that string (BIT-1405) // TODO: This should be "Select time" but we don't have that string (BIT-1405)
text = stringResource(id = R.string.time), text = stringResource(id = R.string.time),
style = MaterialTheme.typography.labelMedium, style = BitwardenTheme.typography.labelMedium,
) )
content() content()

View file

@ -20,6 +20,7 @@ import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.role import androidx.compose.ui.semantics.role
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter 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.orNow
import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern
import java.time.ZonedDateTime import java.time.ZonedDateTime
@ -69,7 +70,7 @@ fun BitwardenTimeSelectButton(
interactionSource = remember { MutableInteractionSource() }, interactionSource = remember { MutableInteractionSource() },
onClick = { shouldShowDialog = !shouldShowDialog }, onClick = { shouldShowDialog = !shouldShowDialog },
), ),
textStyle = MaterialTheme.typography.bodyLarge, textStyle = BitwardenTheme.typography.bodyLarge,
readOnly = true, readOnly = true,
label = { Text(text = label) }, label = { Text(text = label) },
value = formattedTime, 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.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight
import com.x8bit.bitwarden.ui.platform.components.util.maxDialogWidth 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. * Represents a Bitwarden-styled dialog with two buttons.
@ -96,7 +97,7 @@ fun BitwardenTwoButtonDialog(
.fillMaxWidth(), .fillMaxWidth(),
text = title, text = title,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
) )
Spacer(modifier = Modifier.height(16.dp)) Spacer(modifier = Modifier.height(16.dp))
} }
@ -117,7 +118,7 @@ fun BitwardenTwoButtonDialog(
.fillMaxWidth(), .fillMaxWidth(),
text = message, text = message,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
if (scrollState.canScrollForward) { if (scrollState.canScrollForward) {
Box( Box(

View file

@ -12,6 +12,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenSelectionDialog 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 * A simple clickable row for use within a [BitwardenSelectionDialog] as an alternative to a
@ -29,7 +30,7 @@ fun BitwardenBasicDialogRow(
) { ) {
Text( Text(
text = text, text = text,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
modifier = modifier modifier = modifier
.clickable( .clickable(
interactionSource = remember { MutableInteractionSource() }, interactionSource = remember { MutableInteractionSource() },

View file

@ -14,6 +14,7 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.base.util.Text import com.x8bit.bitwarden.ui.platform.base.util.Text
import com.x8bit.bitwarden.ui.platform.components.radio.BitwardenRadioButton 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. * A clickable item that displays a radio button and text.
@ -46,7 +47,7 @@ fun BitwardenSelectionRow(
Text( Text(
text = text(), text = text(),
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
) )
} }
} }

View file

@ -97,7 +97,7 @@ fun BitwardenMultiSelectButton(
) { ) {
shouldShowDialog = !shouldShowDialog shouldShowDialog = !shouldShowDialog
}, },
textStyle = MaterialTheme.typography.bodyLarge, textStyle = BitwardenTheme.typography.bodyLarge,
readOnly = true, readOnly = true,
label = { label = {
Row { Row {
@ -142,7 +142,7 @@ fun BitwardenMultiSelectButton(
{ {
Text( Text(
text = supportingText, 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.BitwardenSelectionDialog
import com.x8bit.bitwarden.ui.platform.components.dialog.row.BitwardenSelectionRow 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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import com.x8bit.bitwarden.ui.platform.util.displayLabel import com.x8bit.bitwarden.ui.platform.util.displayLabel
/** /**
@ -72,13 +73,13 @@ fun EnvironmentSelector(
) { ) {
Text( Text(
text = labelText, text = labelText,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(end = 12.dp), modifier = Modifier.padding(end = 12.dp),
) )
Text( Text(
text = selectedOption.displayLabel(), text = selectedOption.displayLabel(),
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
modifier = Modifier.padding(end = 8.dp), modifier = Modifier.padding(end = 8.dp),
) )

View file

@ -27,7 +27,7 @@ fun BitwardenHiddenPasswordField(
) { ) {
OutlinedTextField( OutlinedTextField(
modifier = modifier, modifier = modifier,
textStyle = MaterialTheme.typography.bodyLarge, textStyle = BitwardenTheme.typography.bodyLarge,
label = { Text(text = label) }, label = { Text(text = label) },
value = value, value = value,
onValueChange = { }, 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.base.util.tabNavigation
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton
import com.x8bit.bitwarden.ui.platform.components.util.nonLetterColorVisualTransformation 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. * Represents a Bitwarden-styled password field that hoists show/hide password state to the caller.
@ -74,7 +74,7 @@ fun BitwardenPasswordField(
modifier = modifier modifier = modifier
.tabNavigation() .tabNavigation()
.focusRequester(focusRequester), .focusRequester(focusRequester),
textStyle = LocalNonMaterialTypography.current.sensitiveInfoSmall, textStyle = BitwardenTheme.typography.sensitiveInfoSmall,
label = { Text(text = label) }, label = { Text(text = label) },
value = value, value = value,
onValueChange = onValueChange, onValueChange = onValueChange,
@ -94,7 +94,7 @@ fun BitwardenPasswordField(
{ {
Text( Text(
text = hint, 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.toPx
import com.x8bit.bitwarden.ui.platform.base.util.withLineBreaksAtWidth import com.x8bit.bitwarden.ui.platform.base.util.withLineBreaksAtWidth
import com.x8bit.bitwarden.ui.platform.components.model.IconResource 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 * Component that allows the user to input text. This composable will manage the state of
@ -106,7 +107,7 @@ fun BitwardenTextField(
{ {
Text( Text(
text = hint, text = hint,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
) )
} }
}, },

View file

@ -22,7 +22,7 @@ fun BitwardenListHeaderText(
) { ) {
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.labelMedium, style = BitwardenTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = modifier.padding( modifier = modifier.padding(
top = 12.dp, top = 12.dp,

View file

@ -37,13 +37,13 @@ fun BitwardenListHeaderTextWithSupportLabel(
) { ) {
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.labelMedium, style = BitwardenTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
Text( Text(
text = supportingLabel, text = supportingLabel,
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
} }

View file

@ -14,6 +14,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.StrokeCap import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* A countdown timer displayed to the user. * A countdown timer displayed to the user.
@ -52,7 +53,7 @@ fun BitwardenCircularCountdownIndicator(
Text( Text(
text = timeLeftSeconds.toString(), text = timeLeftSeconds.toString(),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
} }

View file

@ -78,14 +78,14 @@ fun BitwardenGroupItem(
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.weight(1f), modifier = Modifier.weight(1f),
) )
Text( Text(
text = supportingLabel, text = supportingLabel,
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )

View file

@ -106,7 +106,7 @@ fun BitwardenListItem(
) { ) {
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
@ -131,7 +131,7 @@ fun BitwardenListItem(
secondSupportingLabel?.let { secondSupportLabel -> secondSupportingLabel?.let { secondSupportLabel ->
Text( Text(
text = secondSupportLabel, text = secondSupportLabel,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.semantics { modifier = Modifier.semantics {
secondSupportingLabelTestTag?.let { testTag = it } secondSupportingLabelTestTag?.let { testTag = it }
@ -142,7 +142,7 @@ fun BitwardenListItem(
supportingLabel?.let { supportLabel -> supportingLabel?.let { supportLabel ->
Text( Text(
text = supportLabel, text = supportLabel,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.semantics { supportingLabelTestTag?.let { testTag = it } }, 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.semantics.semantics
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.components.divider.BitwardenHorizontalDivider 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 * 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 = text, text = text,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface.copy( color = MaterialTheme.colorScheme.onSurface.copy(
alpha = if (isEnabled) 1.0f else 0.38f, alpha = if (isEnabled) 1.0f else 0.38f,
), ),
@ -78,7 +79,7 @@ fun BitwardenTextRow(
description?.let { description?.let {
Text( Text(
text = it, text = it,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant.copy( color = MaterialTheme.colorScheme.onSurfaceVariant.copy(
alpha = if (isEnabled) 1.0f else 0.38f, 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.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Represents a Bitwarden-styled policy warning label. * Represents a Bitwarden-styled policy warning label.
@ -25,7 +26,7 @@ fun BitwardenPolicyWarningText(
text: String, text: String,
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
textAlign: TextAlign = TextAlign.Center, textAlign: TextAlign = TextAlign.Center,
style: TextStyle = MaterialTheme.typography.bodySmall, style: TextStyle = BitwardenTheme.typography.bodySmall,
) { ) {
Text( Text(
text = 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.state.ToggleableState
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Represents a Bitwarden-styled [Switch]. * Represents a Bitwarden-styled [Switch].
@ -77,14 +78,14 @@ fun BitwardenSwitch(
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
description?.let { description?.let {
Text( Text(
text = it, text = it,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
} }

View file

@ -74,7 +74,7 @@ fun BitwardenWideSwitch(
) { ) {
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = if (enabled) { color = if (enabled) {
MaterialTheme.colorScheme.onSurface MaterialTheme.colorScheme.onSurface
} else { } else {
@ -84,7 +84,7 @@ fun BitwardenWideSwitch(
description?.let { description?.let {
Text( Text(
text = it, text = it,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = if (enabled) { color = if (enabled) {
MaterialTheme.colorScheme.onSurfaceVariant MaterialTheme.colorScheme.onSurfaceVariant
} else { } else {

View file

@ -172,7 +172,7 @@ private fun OnboardingOverrideContent(
modifier = Modifier modifier = Modifier
.align(Alignment.CenterHorizontally) .align(Alignment.CenterHorizontally)
.standardHorizontalMargin(), .standardHorizontalMargin(),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
) )

View file

@ -19,6 +19,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* The empty state for the search screen. * The empty state for the search screen.
@ -52,7 +53,7 @@ fun SearchEmptyContent(
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
text = it(), text = it(),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
} }

View file

@ -135,7 +135,7 @@ private fun SettingsRow(
.padding(end = 16.dp) .padding(end = 16.dp)
.weight(1f), .weight(1f),
text = text(), text = text(),
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
TrailingContent(notificationCount = notificationCount) TrailingContent(notificationCount = notificationCount)

View file

@ -230,7 +230,7 @@ private fun ContentColumn(
Text( Text(
modifier = Modifier.padding(end = 16.dp), modifier = Modifier.padding(end = 16.dp),
text = state.copyrightInfo.invoke(), text = state.copyrightInfo.invoke(),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
} }
@ -269,7 +269,7 @@ private fun CopyRow(
.padding(end = 16.dp) .padding(end = 16.dp)
.weight(1f), .weight(1f),
text = text(), text = text(),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
Icon( 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.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.manager.biometrics.BiometricsManager import com.x8bit.bitwarden.ui.platform.manager.biometrics.BiometricsManager
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager 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.LocalNonMaterialColors
import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography
import com.x8bit.bitwarden.ui.platform.util.displayLabel import com.x8bit.bitwarden.ui.platform.util.displayLabel
import com.x8bit.bitwarden.ui.platform.util.minutes import com.x8bit.bitwarden.ui.platform.util.minutes
import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern import com.x8bit.bitwarden.ui.platform.util.toFormattedPattern
@ -453,7 +453,7 @@ private fun SessionTimeoutRow(
) { ) {
Text( Text(
text = selectedVaultTimeoutType.displayLabel(), text = selectedVaultTimeoutType.displayLabel(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.testTag("SessionTimeoutStatusLabel"), modifier = Modifier.testTag("SessionTimeoutStatusLabel"),
) )
@ -529,7 +529,7 @@ private fun SessionCustomTimeoutRow(
.toFormattedPattern("HH:mm") .toFormattedPattern("HH:mm")
Text( Text(
text = formattedTime, text = formattedTime,
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
} }
@ -606,7 +606,7 @@ private fun SessionTimeoutActionRow(
) { ) {
Text( Text(
text = selectedVaultTimeoutAction.displayLabel(), text = selectedVaultTimeoutAction.displayLabel(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant.copy( color = MaterialTheme.colorScheme.onSurfaceVariant.copy(
alpha = if (isEnabled) 1.0f else 0.38f, alpha = if (isEnabled) 1.0f else 0.38f,
), ),
@ -704,7 +704,7 @@ private fun FingerPrintPhraseDialog(
Text( Text(
text = stringResource(id = R.string.fingerprint_phrase), text = stringResource(id = R.string.fingerprint_phrase),
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
) )
}, },
@ -713,14 +713,14 @@ private fun FingerPrintPhraseDialog(
Text( Text(
text = "${stringResource(id = R.string.your_accounts_fingerprint)}:", text = "${stringResource(id = R.string.your_accounts_fingerprint)}:",
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
) )
Spacer(modifier = Modifier.height(24.dp)) Spacer(modifier = Modifier.height(24.dp))
Text( Text(
text = fingerprintPhrase(), text = fingerprintPhrase(),
color = LocalNonMaterialColors.current.fingerprint, color = LocalNonMaterialColors.current.fingerprint,
style = LocalNonMaterialTypography.current.sensitiveInfoSmall, style = BitwardenTheme.typography.sensitiveInfoSmall,
modifier = Modifier.fillMaxWidth(), 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.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight 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. * A dialog for setting a user's PIN.
@ -80,7 +81,7 @@ fun PinInputDialog(
.fillMaxWidth(), .fillMaxWidth(),
text = stringResource(id = R.string.enter_pin), text = stringResource(id = R.string.enter_pin),
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
) )
if (scrollState.canScrollBackward) { if (scrollState.canScrollBackward) {
Box( Box(
@ -102,7 +103,7 @@ fun PinInputDialog(
.fillMaxWidth(), .fillMaxWidth(),
text = stringResource(id = R.string.set_pin_description), text = stringResource(id = R.string.set_pin_description),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
BitwardenTextField( 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.dialog.LoadingDialogState
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Displays the delete account screen. * Displays the delete account screen.
@ -136,7 +137,7 @@ fun DeleteAccountScreen(
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = stringResource(id = R.string.deleting_your_account_is_permanent), text = stringResource(id = R.string.deleting_your_account_is_permanent),
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
color = MaterialTheme.colorScheme.error, color = MaterialTheme.colorScheme.error,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -145,7 +146,7 @@ fun DeleteAccountScreen(
Spacer(modifier = Modifier.height(24.dp)) Spacer(modifier = Modifier.height(24.dp))
Text( Text(
text = stringResource(id = R.string.delete_account_explanation), text = stringResource(id = R.string.delete_account_explanation),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()

View file

@ -147,7 +147,7 @@ private fun DeleteAccountConfirmationContent(
Text( Text(
text = stringResource(id = R.string.a_verification_code_was_sent_to_your_email), text = stringResource(id = R.string.a_verification_code_was_sent_to_your_email),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -169,7 +169,7 @@ private fun DeleteAccountConfirmationContent(
Text( Text(
text = stringResource(id = R.string.confirm_your_identity), text = stringResource(id = R.string.confirm_your_identity),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.composition.LocalExitManager import com.x8bit.bitwarden.ui.platform.composition.LocalExitManager
import com.x8bit.bitwarden.ui.platform.manager.exit.ExitManager 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.LocalNonMaterialColors
import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography
/** /**
* Displays the login approval screen. * Displays the login approval screen.
@ -159,7 +159,7 @@ private fun LoginApprovalContent(
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = stringResource(id = R.string.are_you_trying_to_log_in), text = stringResource(id = R.string.are_you_trying_to_log_in),
style = MaterialTheme.typography.headlineMedium, style = BitwardenTheme.typography.headlineMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -172,7 +172,7 @@ private fun LoginApprovalContent(
state.email, state.email,
state.domainUrl, state.domainUrl,
), ),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -183,7 +183,7 @@ private fun LoginApprovalContent(
Text( Text(
text = stringResource(id = R.string.fingerprint_phrase), text = stringResource(id = R.string.fingerprint_phrase),
style = MaterialTheme.typography.titleLarge, style = BitwardenTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -195,7 +195,7 @@ private fun LoginApprovalContent(
text = state.fingerprint, text = state.fingerprint,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
color = LocalNonMaterialColors.current.fingerprint, color = LocalNonMaterialColors.current.fingerprint,
style = LocalNonMaterialTypography.current.sensitiveInfoSmall, style = BitwardenTheme.typography.sensitiveInfoSmall,
modifier = Modifier modifier = Modifier
.testTag("FingerprintValueLabel") .testTag("FingerprintValueLabel")
.fillMaxWidth() .fillMaxWidth()
@ -259,7 +259,7 @@ private fun LoginApprovalInfoColumn(
Text( Text(
text = label, text = label,
style = MaterialTheme.typography.titleSmall, style = BitwardenTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -270,7 +270,7 @@ private fun LoginApprovalInfoColumn(
Text( Text(
text = value, text = value,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .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.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.scaffold.rememberBitwardenPullToRefreshState import com.x8bit.bitwarden.ui.platform.components.scaffold.rememberBitwardenPullToRefreshState
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter 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.LocalNonMaterialColors
import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography
/** /**
* Displays the pending login requests screen. * Displays the pending login requests screen.
@ -249,7 +249,7 @@ private fun PendingRequestItem(
Text( Text(
text = stringResource(id = R.string.fingerprint_phrase), text = stringResource(id = R.string.fingerprint_phrase),
style = MaterialTheme.typography.labelMedium, style = BitwardenTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
modifier = Modifier modifier = Modifier
@ -262,7 +262,7 @@ private fun PendingRequestItem(
Text( Text(
text = fingerprintPhrase, text = fingerprintPhrase,
color = LocalNonMaterialColors.current.fingerprint, color = LocalNonMaterialColors.current.fingerprint,
style = LocalNonMaterialTypography.current.sensitiveInfoSmall, style = BitwardenTheme.typography.sensitiveInfoSmall,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
modifier = Modifier modifier = Modifier
.testTag("FingerprintValueLabel") .testTag("FingerprintValueLabel")
@ -279,14 +279,14 @@ private fun PendingRequestItem(
) { ) {
Text( Text(
text = platform, text = platform,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
modifier = Modifier.padding(horizontal = 16.dp), modifier = Modifier.padding(horizontal = 16.dp),
) )
Text( Text(
text = timestamp, text = timestamp,
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.End, textAlign = TextAlign.End,
modifier = Modifier.padding(horizontal = 16.dp), modifier = Modifier.padding(horizontal = 16.dp),
@ -322,7 +322,7 @@ private fun PendingRequestsEmpty(
Text( Text(
text = stringResource(id = R.string.no_pending_requests), text = stringResource(id = R.string.no_pending_requests),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier 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.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.feature.settings.appearance.model.AppLanguage 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.feature.settings.appearance.model.AppTheme
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import com.x8bit.bitwarden.ui.platform.util.displayLabel import com.x8bit.bitwarden.ui.platform.util.displayLabel
/** /**
@ -139,7 +140,7 @@ private fun LanguageSelectionRow(
) { ) {
Text( Text(
text = currentSelection.text(), text = currentSelection.text(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
} }
@ -183,7 +184,7 @@ private fun ThemeSelectionRow(
) { ) {
Text( Text(
text = currentSelection.displayLabel(), text = currentSelection.displayLabel(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, 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.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.feature.settings.autofill.util.displayLabel 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.manager.intent.IntentManager
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Displays the auto-fill screen. * Displays the auto-fill screen.
@ -293,7 +294,7 @@ private fun DefaultUriMatchTypeRow(
) { ) {
Text( Text(
text = selectedUriMatchType.displayLabel(), text = selectedUriMatchType.displayLabel(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, 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.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight import com.x8bit.bitwarden.ui.platform.components.util.maxDialogHeight
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* A dialog for adding a blocked URI. * A dialog for adding a blocked URI.
@ -66,7 +67,7 @@ fun AddEditBlockedUriDialog(
.fillMaxWidth(), .fillMaxWidth(),
text = stringResource(id = R.string.new_uri), text = stringResource(id = R.string.new_uri),
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.headlineSmall, style = BitwardenTheme.typography.headlineSmall,
) )
if (scrollState.canScrollBackward) { if (scrollState.canScrollBackward) {
Box( 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.fab.BitwardenFloatingActionButton
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Displays the block auto-fill screen. * 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, id = R.string.auto_fill_will_not_be_offered_for_these_ur_is,
), ),
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier.align(Alignment.CenterVertically), modifier = Modifier.align(Alignment.CenterVertically),
) )
} }
@ -241,7 +242,7 @@ private fun BlockAutoFillNoItems(
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
text = stringResource(id = R.string.auto_fill_will_not_be_offered_for_these_ur_is), 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)) Spacer(modifier = Modifier.height(24.dp))
@ -281,7 +282,7 @@ private fun BlockAutoFillListItem(
.padding(end = 16.dp) .padding(end = 16.dp)
.weight(1f), .weight(1f),
text = label, text = label,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
) )
Icon( 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.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.feature.settings.exportvault.model.ExportVaultFormat 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.manager.intent.IntentManager
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import com.x8bit.bitwarden.ui.platform.util.displayLabel import com.x8bit.bitwarden.ui.platform.util.displayLabel
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
@ -281,7 +282,7 @@ private fun ExportVaultScreenContent(
Text( Text(
text = stringResource(id = R.string.send_verification_code_to_email), text = stringResource(id = R.string.send_verification_code_to_email),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
@ -332,7 +333,7 @@ private fun ExportVaultScreenContent(
Text( Text(
text = stringResource(id = R.string.export_vault_master_password_description), text = stringResource(id = R.string.export_vault_master_password_description),
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .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.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter 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.feature.settings.folders.model.FolderDisplayItem
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
@ -147,7 +148,7 @@ private fun FoldersContent(
Text( Text(
text = stringResource(id = R.string.no_folders_to_list), text = stringResource(id = R.string.no_folders_to_list),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.testTag("NoFoldersLabel"), modifier = Modifier.testTag("NoFoldersLabel"),
) )
@ -177,7 +178,7 @@ private fun FoldersContent(
.padding(start = 16.dp) .padding(start = 16.dp)
.weight(1f), .weight(1f),
text = it.name, text = it.name,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurface, 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.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenWideSwitch import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenWideSwitch
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Displays the other screen. * Displays the other screen.
@ -138,12 +139,12 @@ fun OtherScreen(
) { ) {
Text( Text(
text = stringResource(id = R.string.last_sync), text = stringResource(id = R.string.last_sync),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
modifier = Modifier.padding(start = 16.dp, end = 2.dp), modifier = Modifier.padding(start = 16.dp, end = 2.dp),
) )
Text( Text(
text = state.lastSyncTime, text = state.lastSyncTime,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
) )
} }
@ -226,7 +227,7 @@ private fun ClearClipboardFrequencyRow(
) { ) {
Text( Text(
text = currentSelection.displayLabel.invoke(), text = currentSelection.displayLabel.invoke(),
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.testTag("ClearClipboardAfterLabel"), 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.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.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. * Static wrapper to make accessing the theme components easier.
@ -117,12 +118,11 @@ fun BitwardenTheme(
LocalBitwardenColorScheme provides bitwardenColorScheme, LocalBitwardenColorScheme provides bitwardenColorScheme,
LocalNonMaterialColors provides nonMaterialColors, LocalNonMaterialColors provides nonMaterialColors,
LocalBitwardenTypography provides bitwardenTypography, LocalBitwardenTypography provides bitwardenTypography,
LocalNonMaterialTypography provides nonMaterialTypography,
) { ) {
// Set overall theme based on color scheme and typography settings // Set overall theme based on color scheme and typography settings
MaterialTheme( MaterialTheme(
colorScheme = colorScheme, colorScheme = colorScheme,
typography = Typography, typography = bitwardenTypography.toMaterialTypography(),
content = content, content = content,
) )
} }
@ -211,12 +211,6 @@ private fun Int.toColor(context: Context): Color = Color(context.getColor(this))
val LocalBitwardenTypography: ProvidableCompositionLocal<BitwardenTypography> = val LocalBitwardenTypography: ProvidableCompositionLocal<BitwardenTypography> =
compositionLocalOf { 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. * 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.composition.LocalIntentManager
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme 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_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.Passcode.PasscodeType.Passphrase.Companion.PASSPHRASE_MIN_NUMBER_OF_WORDS
import com.x8bit.bitwarden.ui.tools.feature.generator.GeneratorState.MainType.Username.UsernameType.ForwardedEmailAlias.ServiceType import com.x8bit.bitwarden.ui.tools.feature.generator.GeneratorState.MainType.Username.UsernameType.ForwardedEmailAlias.ServiceType
@ -405,7 +404,7 @@ private fun GeneratedStringItem(
}, },
onValueChange = {}, onValueChange = {},
readOnly = true, readOnly = true,
textStyle = LocalNonMaterialTypography.current.sensitiveInfoSmall, textStyle = BitwardenTheme.typography.sensitiveInfoSmall,
shouldAddCustomLineBreaks = true, shouldAddCustomLineBreaks = true,
visualTransformation = nonLetterColorVisualTransformation(), visualTransformation = nonLetterColorVisualTransformation(),
modifier = Modifier.padding(horizontal = 16.dp), 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.button.BitwardenStandardIconButton
import com.x8bit.bitwarden.ui.platform.components.util.nonLetterColorVisualTransformation import com.x8bit.bitwarden.ui.platform.components.util.nonLetterColorVisualTransformation
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme 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. * A composable function for displaying a password history list item.
@ -49,7 +48,7 @@ fun PasswordHistoryListItem(
) { ) {
Column(modifier = Modifier.weight(1f)) { Column(modifier = Modifier.weight(1f)) {
var widthPx by remember(label) { mutableIntStateOf(0) } var widthPx by remember(label) { mutableIntStateOf(0) }
val textStyle = LocalNonMaterialTypography.current.sensitiveInfoMedium val textStyle = BitwardenTheme.typography.sensitiveInfoMedium
val formattedText = label.withLineBreaksAtWidth( val formattedText = label.withLineBreaksAtWidth(
widthPx = widthPx.toFloat(), widthPx = widthPx.toFloat(),
monospacedTextStyle = textStyle, monospacedTextStyle = textStyle,
@ -68,7 +67,7 @@ fun PasswordHistoryListItem(
Text( Text(
text = supportingLabel, text = supportingLabel,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.testTag("GeneratedPasswordDateLabel"), 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.LazyColumn
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState 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.indicator.BitwardenCircularProgressIndicator
import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold import com.x8bit.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentListOf
/** /**
@ -192,7 +192,7 @@ private fun PasswordHistoryError(
) { ) {
Text( Text(
text = state.message.invoke(), text = state.message.invoke(),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
Spacer(modifier = Modifier.navigationBarsPadding()) Spacer(modifier = Modifier.navigationBarsPadding())
} }
@ -207,7 +207,7 @@ private fun PasswordHistoryEmpty(modifier: Modifier = Modifier) {
Text( Text(
modifier = Modifier.testTag("NoPasswordsDisplayedLabel"), modifier = Modifier.testTag("NoPasswordsDisplayedLabel"),
text = stringResource(id = R.string.no_passwords_to_list), text = stringResource(id = R.string.no_passwords_to_list),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
Spacer(modifier = Modifier.navigationBarsPadding()) 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.layout.padding
import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
@ -19,6 +18,7 @@ import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButton
import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText import com.x8bit.bitwarden.ui.platform.components.text.BitwardenPolicyWarningText
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Content for the empty state of the [SendScreen]. * Content for the empty state of the [SendScreen].
@ -47,7 +47,7 @@ fun SendEmpty(
Text( Text(
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
text = stringResource(id = R.string.no_sends), text = stringResource(id = R.string.no_sends),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 16.dp), .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.toggle.BitwardenWideSwitch
import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager 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 com.x8bit.bitwarden.ui.tools.feature.send.addsend.handlers.AddSendHandlers
import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentListOf
@ -151,7 +152,7 @@ fun AddSendContent(
Text( Text(
text = type.name.orEmpty(), text = type.name.orEmpty(),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
@ -160,7 +161,7 @@ fun AddSendContent(
Text( Text(
text = stringResource(id = R.string.max_file_size), text = stringResource(id = R.string.max_file_size),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
@ -172,7 +173,7 @@ fun AddSendContent(
.align(Alignment.CenterHorizontally), .align(Alignment.CenterHorizontally),
text = type.name ?: stringResource(id = R.string.no_file_chosen), text = type.name ?: stringResource(id = R.string.no_file_chosen),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
) )
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
BitwardenFilledTonalButton( BitwardenFilledTonalButton(
@ -195,7 +196,7 @@ fun AddSendContent(
Text( Text(
text = stringResource(id = R.string.max_file_size), text = stringResource(id = R.string.max_file_size),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 32.dp), .padding(horizontal = 32.dp),
@ -204,7 +205,7 @@ fun AddSendContent(
Text( Text(
text = stringResource(id = R.string.type_file_info), text = stringResource(id = R.string.type_file_info),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
@ -218,14 +219,14 @@ fun AddSendContent(
Text( Text(
text = type.name.orEmpty(), text = type.name.orEmpty(),
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyLarge, style = BitwardenTheme.typography.bodyLarge,
modifier = Modifier.weight(1f), modifier = Modifier.weight(1f),
) )
Spacer(modifier = Modifier.width(8.dp)) Spacer(modifier = Modifier.width(8.dp))
Text( Text(
text = type.displaySize.orEmpty(), text = type.displaySize.orEmpty(),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
} }
} }
@ -309,7 +310,7 @@ private fun AddSendOptions(
Text( Text(
text = stringResource(id = R.string.options), text = stringResource(id = R.string.options),
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
style = MaterialTheme.typography.labelLarge, style = BitwardenTheme.typography.labelLarge,
modifier = Modifier.padding(end = 8.dp), modifier = Modifier.padding(end = 8.dp),
) )
Icon( Icon(
@ -380,7 +381,7 @@ private fun AddSendOptions(
Spacer(modifier = Modifier.height(4.dp)) Spacer(modifier = Modifier.height(4.dp))
Text( Text(
text = stringResource(id = R.string.deletion_date_info), text = stringResource(id = R.string.deletion_date_info),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -417,7 +418,7 @@ private fun AddSendOptions(
) { ) {
Text( Text(
text = stringResource(id = R.string.expiration_date_info), text = stringResource(id = R.string.expiration_date_info),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.weight(1f), modifier = Modifier.weight(1f),
) )
@ -449,7 +450,7 @@ private fun AddSendOptions(
Spacer(modifier = Modifier.height(4.dp)) Spacer(modifier = Modifier.height(4.dp))
Text( Text(
text = stringResource(id = R.string.maximum_access_count_info), text = stringResource(id = R.string.maximum_access_count_info),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -465,13 +466,13 @@ private fun AddSendOptions(
) { ) {
Text( Text(
text = stringResource(id = R.string.current_access_count) + ":", text = stringResource(id = R.string.current_access_count) + ":",
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
Spacer(modifier = Modifier.width(4.dp)) Spacer(modifier = Modifier.width(4.dp))
Text( Text(
text = it.toString(), text = it.toString(),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, 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.Text
import com.x8bit.bitwarden.ui.platform.base.util.asText import com.x8bit.bitwarden.ui.platform.base.util.asText
import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
import java.time.ZonedDateTime import java.time.ZonedDateTime
import java.time.temporal.ChronoUnit import java.time.temporal.ChronoUnit
@ -79,7 +80,7 @@ fun SendDeletionDateChooser(
Spacer(modifier = Modifier.height(4.dp)) Spacer(modifier = Modifier.height(4.dp))
Text( Text(
text = stringResource(id = R.string.deletion_date_info), text = stringResource(id = R.string.deletion_date_info),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .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.Text
import com.x8bit.bitwarden.ui.platform.base.util.asText import com.x8bit.bitwarden.ui.platform.base.util.asText
import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
import java.time.ZonedDateTime import java.time.ZonedDateTime
import java.time.temporal.ChronoUnit import java.time.temporal.ChronoUnit
@ -81,7 +82,7 @@ fun SendExpirationDateChooser(
Spacer(modifier = Modifier.height(4.dp)) Spacer(modifier = Modifier.height(4.dp))
Text( Text(
text = stringResource(id = R.string.expiration_date_info), text = stringResource(id = R.string.expiration_date_info),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()

View file

@ -17,6 +17,7 @@ import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText
import com.x8bit.bitwarden.ui.platform.components.toggle.BitwardenWideSwitch 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 import com.x8bit.bitwarden.ui.vault.model.VaultCollection
/** /**
@ -66,7 +67,7 @@ fun LazyListScope.collectionItemsSelector(
) { ) {
Text( Text(
text = stringResource(id = R.string.no_collections_to_list), text = stringResource(id = R.string.no_collections_to_list),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant, 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.button.BitwardenStandardIconButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog
import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText 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 import com.x8bit.bitwarden.ui.vault.feature.attachments.handlers.AttachmentsHandlers
/** /**
@ -48,7 +49,7 @@ fun AttachmentsContent(
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Text( Text(
text = stringResource(id = R.string.no_attachments), text = stringResource(id = R.string.no_attachments),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
@ -88,7 +89,7 @@ fun AttachmentsContent(
?.displayName ?.displayName
?: stringResource(id = R.string.no_file_chosen), ?: stringResource(id = R.string.no_file_chosen),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@ -109,7 +110,7 @@ fun AttachmentsContent(
Text( Text(
text = stringResource(id = R.string.max_file_size), text = stringResource(id = R.string.max_file_size),
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 32.dp), .padding(horizontal = 32.dp),
@ -159,7 +160,7 @@ private fun AttachmentListEntry(
Text( Text(
text = attachmentItem.title, text = attachmentItem.title,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f), modifier = Modifier.weight(1f),
@ -170,7 +171,7 @@ private fun AttachmentListEntry(
Text( Text(
text = attachmentItem.displaySize, text = attachmentItem.displaySize,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
modifier = Modifier, 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.BitwardenStandardIconButton
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton import com.x8bit.bitwarden.ui.platform.components.button.BitwardenTextButton
import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog import com.x8bit.bitwarden.ui.platform.components.dialog.BitwardenTwoButtonDialog
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Attachment UI common for all item types. * Attachment UI common for all item types.
@ -48,7 +49,7 @@ fun AttachmentItemContent(
Text( Text(
text = attachmentItem.title, text = attachmentItem.title,
color = MaterialTheme.colorScheme.onSurface, color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f), modifier = Modifier.weight(1f),
@ -59,7 +60,7 @@ fun AttachmentItemContent(
Text( Text(
text = attachmentItem.displaySize, text = attachmentItem.displaySize,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.labelSmall, style = BitwardenTheme.typography.labelSmall,
modifier = Modifier, modifier = Modifier,
) )
@ -97,7 +98,7 @@ fun AttachmentItemContent(
text = { text = {
Text( Text(
text = stringResource(R.string.premium_required), text = stringResource(R.string.premium_required),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
}, },
containerColor = MaterialTheme.colorScheme.surfaceContainerHigh, 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.field.BitwardenTextFieldWithActions
import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText
import com.x8bit.bitwarden.ui.platform.components.indicator.BitwardenCircularCountdownIndicator 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.VaultCommonItemTypeHandlers
import com.x8bit.bitwarden.ui.vault.feature.item.handlers.VaultLoginItemTypeHandlers import com.x8bit.bitwarden.ui.vault.feature.item.handlers.VaultLoginItemTypeHandlers
import com.x8bit.bitwarden.ui.vault.feature.item.model.TotpCodeItemData import com.x8bit.bitwarden.ui.vault.feature.item.model.TotpCodeItemData
@ -344,12 +345,12 @@ private fun PasswordHistoryCount(
) { ) {
Text( Text(
text = "${stringResource(id = R.string.password_history)}: ", text = "${stringResource(id = R.string.password_history)}: ",
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
Text( Text(
text = passwordHistoryCount.toString(), text = passwordHistoryCount.toString(),
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
modifier = Modifier.clickable(onClick = onPasswordHistoryClick), 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.R
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField
import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText 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 import com.x8bit.bitwarden.ui.vault.feature.item.handlers.VaultCommonItemTypeHandlers
/** /**
@ -139,12 +140,12 @@ fun VaultItemSecureNoteContent(
) { ) {
Text( Text(
text = "${stringResource(id = R.string.date_updated)}: ", text = "${stringResource(id = R.string.date_updated)}: ",
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
Text( Text(
text = commonState.lastUpdated, text = commonState.lastUpdated,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
} }

View file

@ -6,6 +6,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.semantics
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
/** /**
* Update Text UI common for all item types. * Update Text UI common for all item types.
@ -22,12 +23,12 @@ fun VaultItemUpdateText(
) { ) {
Text( Text(
text = header, text = header,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
Text( Text(
text = text, text = text,
style = MaterialTheme.typography.bodySmall, style = BitwardenTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, 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.layout.padding
import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
import com.x8bit.bitwarden.ui.vault.feature.vault.VaultNoItems import com.x8bit.bitwarden.ui.vault.feature.vault.VaultNoItems
/** /**
@ -58,7 +58,7 @@ private fun GenericNoItems(
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
text = text, text = text,
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
) )
Spacer(modifier = Modifier.weight(1f)) Spacer(modifier = Modifier.weight(1f))
Spacer(modifier = Modifier.navigationBarsPadding()) 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.height
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState 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.composition.LocalPermissionsManager
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager
import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager 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. * The screen to manually add a totp code.
@ -125,7 +125,7 @@ fun ManualCodeEntryScreen(
Text( Text(
text = stringResource(id = R.string.enter_key_manually), text = stringResource(id = R.string.enter_key_manually),
style = MaterialTheme.typography.titleMedium, style = BitwardenTheme.typography.titleMedium,
modifier = Modifier.padding(horizontal = 16.dp), modifier = Modifier.padding(horizontal = 16.dp),
) )
@ -159,7 +159,7 @@ fun ManualCodeEntryScreen(
Text( Text(
text = stringResource(id = R.string.once_the_key_is_successfully_entered), text = stringResource(id = R.string.once_the_key_is_successfully_entered),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding( .padding(
@ -170,7 +170,7 @@ fun ManualCodeEntryScreen(
Text( Text(
text = stringResource(id = R.string.cannot_add_authenticator_key), text = stringResource(id = R.string.cannot_add_authenticator_key),
style = MaterialTheme.typography.bodyMedium, style = BitwardenTheme.typography.bodyMedium,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding( .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