From cf06fc436aec32e2a03fa517532a2dc1a029521b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juliano=20C=C3=A9zar=20Chagas=20Tavares?= Date: Wed, 20 Nov 2024 14:23:24 -0300 Subject: [PATCH] [Android][iOS] Design System Colors (#53) Removes all legacy colors and updates to use the SpruceID color palette according to the latest Figma designs. It also adds all the colors described in the design system. --- .../spruceid/mobilesdkexample/ErrorView.kt | 5 +- .../com/spruceid/mobilesdkexample/HomeView.kt | 4 +- .../com/spruceid/mobilesdkexample/Loader.kt | 8 +- .../spruceid/mobilesdkexample/LoadingView.kt | 12 +- .../spruceid/mobilesdkexample/MainActivity.kt | 20 +- .../mobilesdkexample/ScanningComponent.kt | 8 +- .../credentials/AchievementCredentialItem.kt | 38 +- .../credentials/AddToWalletView.kt | 14 +- .../credentials/GenericCredentialItem.kt | 45 +-- .../mobilesdkexample/ui/theme/Color.kt | 340 +++++++++++++++-- .../mobilesdkexample/ui/theme/Theme.kt | 8 +- .../verifier/VerifierBinarySuccessView.kt | 16 +- .../verifier/VerifierCredentialSuccessView.kt | 11 +- .../verifier/VerifierHomeView.kt | 24 +- .../verifier/VerifierMDocResultView.kt | 27 +- .../verifier/VerifyDelegatedOid4vpView.kt | 108 +++--- .../VerificationActivityLogScreen.kt | 22 +- .../VerifierSettingsHomeView.kt | 14 +- .../wallet/HandleOID4VPView.kt | 22 +- .../wallet/SelectiveDisclosureView.kt | 4 +- .../wallet/ShareableCredentialListItem.kt | 22 +- .../mobilesdkexample/wallet/WalletHomeView.kt | 13 +- .../walletsettings/WalletSettingsHomeView.kt | 8 +- example/src/main/res/values/colors.xml | 354 ++++++++++++++++-- 24 files changed, 848 insertions(+), 299 deletions(-) diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/ErrorView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ErrorView.kt index 52f3be9..34dddae 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/ErrorView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ErrorView.kt @@ -39,7 +39,6 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.spruceid.mobilesdkexample.ui.theme.BorderSecondary import com.spruceid.mobilesdkexample.ui.theme.ColorRose600 import com.spruceid.mobilesdkexample.ui.theme.ColorStone300 import com.spruceid.mobilesdkexample.ui.theme.ColorStone50 @@ -112,7 +111,7 @@ fun ErrorView( .navigationBarsPadding() .border( width = 1.dp, - color = BorderSecondary, + color = ColorStone300, shape = RoundedCornerShape(6.dp) ) ) { @@ -185,7 +184,7 @@ fun ErrorView( .fillMaxWidth() .border( width = 1.dp, - color = BorderSecondary, + color = ColorStone300, shape = RoundedCornerShape(6.dp) ) .weight(1f) diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/HomeView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/HomeView.kt index d872ba6..5b2c5b1 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/HomeView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/HomeView.kt @@ -33,7 +33,7 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController -import com.spruceid.mobilesdkexample.ui.theme.Bg +import com.spruceid.mobilesdkexample.ui.theme.ColorBase1 import com.spruceid.mobilesdkexample.ui.theme.ColorBlue300 import com.spruceid.mobilesdkexample.ui.theme.ColorBlue500 import com.spruceid.mobilesdkexample.ui.theme.ColorBlue900 @@ -93,7 +93,7 @@ fun HomeBottomTabs( tab: HomeTabs, changeTabs: (HomeTabs) -> Unit ) { - BottomAppBar(containerColor = Bg) { + BottomAppBar(containerColor = ColorBase1) { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/Loader.kt b/example/src/main/java/com/spruceid/mobilesdkexample/Loader.kt index 4756f97..b547055 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/Loader.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/Loader.kt @@ -26,9 +26,9 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import com.spruceid.mobilesdkexample.ui.theme.ColorBase150 +import com.spruceid.mobilesdkexample.ui.theme.ColorBlue600 import com.spruceid.mobilesdkexample.ui.theme.MobileSdkTheme -import com.spruceid.mobilesdkexample.ui.theme.Primary -import com.spruceid.mobilesdkexample.ui.theme.SpruceBlue @Composable fun Loader() { @@ -57,7 +57,7 @@ fun Indicator( size: Dp = 107.dp, // angle (length) of indicator arc sweepAngle: Float = 90f, - color: Color = Primary, + color: Color = ColorBase150, strokeWidth: Dp = 6.dp, ) { val transition = rememberInfiniteTransition("Infinite loader indicator") @@ -88,7 +88,7 @@ fun Indicator( .size(size) .padding(strokeWidth / 2), ) { - drawCircle(SpruceBlue, style = stroke) + drawCircle(ColorBlue600, style = stroke) drawArc( color, // arc start angle diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/LoadingView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/LoadingView.kt index 382d442..d56df48 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/LoadingView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/LoadingView.kt @@ -22,8 +22,8 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.viewinterop.AndroidView import app.rive.runtime.kotlin.RiveAnimationView -import com.spruceid.mobilesdkexample.ui.theme.CodeBorder import com.spruceid.mobilesdkexample.ui.theme.ColorBase800 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone300 import com.spruceid.mobilesdkexample.ui.theme.Inter @Composable @@ -34,10 +34,10 @@ fun LoadingView( ) { Box( modifier = Modifier - .fillMaxSize() - .padding(vertical = 40.dp) - .padding(horizontal = 30.dp) - .navigationBarsPadding() + .fillMaxSize() + .padding(vertical = 40.dp) + .padding(horizontal = 30.dp) + .navigationBarsPadding() ) { Column( modifier = Modifier.fillMaxSize(), @@ -78,7 +78,7 @@ fun LoadingView( containerColor = Color.Transparent, contentColor = Color.Black, ), - border = BorderStroke(1.dp, CodeBorder), + border = BorderStroke(1.dp, ColorStone300), modifier = Modifier .fillMaxWidth() ) { diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/MainActivity.kt b/example/src/main/java/com/spruceid/mobilesdkexample/MainActivity.kt index 9be04a9..ef33d9d 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/MainActivity.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/MainActivity.kt @@ -16,7 +16,7 @@ import com.spruceid.mobilesdkexample.db.AppDatabase import com.spruceid.mobilesdkexample.db.VerificationMethodsRepository import com.spruceid.mobilesdkexample.navigation.Screen import com.spruceid.mobilesdkexample.navigation.SetupNavGraph -import com.spruceid.mobilesdkexample.ui.theme.Bg +import com.spruceid.mobilesdkexample.ui.theme.ColorBase1 import com.spruceid.mobilesdkexample.ui.theme.MobileSdkTheme import com.spruceid.mobilesdkexample.viewmodels.CredentialPacksViewModel import com.spruceid.mobilesdkexample.viewmodels.CredentialPacksViewModelFactory @@ -36,13 +36,13 @@ class MainActivity : ComponentActivity() { ) ) } else if (intent.data!!.toString().startsWith("openid4vp")) { - navController.navigate( - Screen.HandleOID4VP.route.replace( - "{url}", - intent.data.toString().replace("openid4vp://", "") - ) + navController.navigate( + Screen.HandleOID4VP.route.replace( + "{url}", + intent.data.toString().replace("openid4vp://", "") ) - } + ) + } } else { super.onNewIntent(intent) } @@ -57,7 +57,7 @@ class MainActivity : ComponentActivity() { Surface( modifier = Modifier .fillMaxSize(), - color = Bg, + color = ColorBase1, ) { navController = rememberNavController() @@ -67,9 +67,9 @@ class MainActivity : ComponentActivity() { // RawCredentialsViewModelFactory((application as MainApplication).rawCredentialsRepository) // } - val verificationMethodsViewModel: VerificationMethodsViewModel by viewModels { + val verificationMethodsViewModel: VerificationMethodsViewModel by viewModels { VerificationMethodsViewModelFactory((application as MainApplication).verificationMethodsRepository) - } + } val credentialPacksViewModel: CredentialPacksViewModel by viewModels { CredentialPacksViewModelFactory(application as MainApplication) diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/ScanningComponent.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ScanningComponent.kt index 9557e5f..0080855 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/ScanningComponent.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ScanningComponent.kt @@ -31,8 +31,8 @@ import com.google.accompanist.permissions.rememberMultiplePermissionsState import com.spruceid.mobile.sdk.ui.MRZScanner import com.spruceid.mobile.sdk.ui.PDF417Scanner import com.spruceid.mobile.sdk.ui.QRCodeScanner +import com.spruceid.mobilesdkexample.ui.theme.ColorBase150 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.Primary enum class ScanningType { QRCODE, PDF417, MRZ @@ -154,7 +154,7 @@ fun ScanningComponent( }, colors = ButtonDefaults.buttonColors( - containerColor = Primary, + containerColor = ColorBase150, contentColor = Color.White, ), modifier = @@ -177,7 +177,7 @@ fun ScanningComponent( colors = ButtonDefaults.buttonColors( containerColor = Color.Transparent, - contentColor = Primary, + contentColor = ColorBase150, ), ) { Text( @@ -185,7 +185,7 @@ fun ScanningComponent( fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 16.sp, - color = Primary, + color = ColorBase150, ) } }, diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AchievementCredentialItem.kt b/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AchievementCredentialItem.kt index f6702d2..eed9f0d 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AchievementCredentialItem.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AchievementCredentialItem.kt @@ -46,13 +46,13 @@ import com.spruceid.mobile.sdk.ui.CardRenderingDetailsView import com.spruceid.mobile.sdk.ui.CardRenderingListView import com.spruceid.mobile.sdk.ui.toCardRendering import com.spruceid.mobilesdkexample.R -import com.spruceid.mobilesdkexample.ui.theme.Bg -import com.spruceid.mobilesdkexample.ui.theme.CredentialBorder +import com.spruceid.mobilesdkexample.ui.theme.ColorBase1 +import com.spruceid.mobilesdkexample.ui.theme.ColorBase300 +import com.spruceid.mobilesdkexample.ui.theme.ColorBlue600 +import com.spruceid.mobilesdkexample.ui.theme.ColorRose600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.SecondaryButtonRed -import com.spruceid.mobilesdkexample.ui.theme.SpruceBlue -import com.spruceid.mobilesdkexample.ui.theme.TextBody -import com.spruceid.mobilesdkexample.ui.theme.TextHeader import com.spruceid.mobilesdkexample.utils.addCredential import com.spruceid.mobilesdkexample.utils.splitCamelCase import kotlinx.coroutines.launch @@ -112,7 +112,7 @@ class AchievementCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody + color = ColorStone600 ) Spacer(modifier = Modifier.height(16.dp)) } @@ -160,7 +160,7 @@ class AchievementCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Medium, fontSize = 20.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(bottom = 8.dp) ) }, @@ -240,7 +240,7 @@ class AchievementCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Medium, fontSize = 20.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(bottom = 8.dp) ) } @@ -270,7 +270,7 @@ class AchievementCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 12.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() ) @@ -282,7 +282,7 @@ class AchievementCredentialItem : ICredentialView { shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( containerColor = Color.Transparent, - contentColor = SecondaryButtonRed, + contentColor = ColorRose600, ), modifier = Modifier .fillMaxWidth() @@ -291,7 +291,7 @@ class AchievementCredentialItem : ICredentialView { text = "Delete", fontFamily = Inter, fontWeight = FontWeight.Normal, - color = SecondaryButtonRed, + color = ColorRose600, ) } @@ -306,7 +306,7 @@ class AchievementCredentialItem : ICredentialView { shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( containerColor = Color.Transparent, - contentColor = SpruceBlue, + contentColor = ColorBlue600, ), modifier = Modifier .fillMaxWidth() @@ -315,7 +315,7 @@ class AchievementCredentialItem : ICredentialView { text = "Cancel", fontFamily = Inter, fontWeight = FontWeight.Bold, - color = SpruceBlue, + color = ColorBlue600, ) } } @@ -329,7 +329,7 @@ class AchievementCredentialItem : ICredentialView { .padding(vertical = 10.dp) .border( width = 1.dp, - color = CredentialBorder, + color = ColorBase300, shape = RoundedCornerShape(topStart = 8.dp, topEnd = 8.dp) ) .padding(12.dp) @@ -349,7 +349,7 @@ class AchievementCredentialItem : ICredentialView { .padding(vertical = 10.dp) .border( width = 1.dp, - color = CredentialBorder, + color = ColorBase300, shape = RoundedCornerShape(8.dp) ) .padding(12.dp) @@ -408,7 +408,7 @@ class AchievementCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody, + color = ColorStone600, modifier = Modifier.padding(top = 10.dp) ) Text( @@ -459,7 +459,7 @@ class AchievementCredentialItem : ICredentialView { .nestedScroll(rememberNestedScrollInteropConnection()), sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), - containerColor = Bg, + containerColor = ColorBase1, shape = RoundedCornerShape(8.dp) ) { Column( @@ -473,7 +473,7 @@ class AchievementCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 24.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() ) diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AddToWalletView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AddToWalletView.kt index 652050a..30d9257 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AddToWalletView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/credentials/AddToWalletView.kt @@ -27,10 +27,10 @@ import com.spruceid.mobile.sdk.CredentialPack import com.spruceid.mobilesdkexample.ErrorView import com.spruceid.mobilesdkexample.LoadingView import com.spruceid.mobilesdkexample.navigation.Screen -import com.spruceid.mobilesdkexample.ui.theme.CTAButtonGreen +import com.spruceid.mobilesdkexample.ui.theme.ColorEmerald700 +import com.spruceid.mobilesdkexample.ui.theme.ColorRose600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.SecondaryButtonRed -import com.spruceid.mobilesdkexample.ui.theme.TextHeader import com.spruceid.mobilesdkexample.utils.credentialDisplaySelector import com.spruceid.mobilesdkexample.viewmodels.CredentialPacksViewModel import kotlinx.coroutines.Dispatchers @@ -106,7 +106,7 @@ fun AddToWalletView( fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 24.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() .padding(vertical = 20.dp), @@ -128,7 +128,7 @@ fun AddToWalletView( }, shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( - containerColor = CTAButtonGreen, + containerColor = ColorEmerald700, contentColor = Color.White, ), modifier = Modifier @@ -149,7 +149,7 @@ fun AddToWalletView( shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( containerColor = Color.Transparent, - contentColor = SecondaryButtonRed, + contentColor = ColorRose600, ), modifier = Modifier .fillMaxWidth() @@ -158,7 +158,7 @@ fun AddToWalletView( text = "Close", fontFamily = Inter, fontWeight = FontWeight.SemiBold, - color = SecondaryButtonRed, + color = ColorRose600, ) } } diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/credentials/GenericCredentialItem.kt b/example/src/main/java/com/spruceid/mobilesdkexample/credentials/GenericCredentialItem.kt index 9dae7fa..ab985ea 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/credentials/GenericCredentialItem.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/credentials/GenericCredentialItem.kt @@ -47,13 +47,13 @@ import com.spruceid.mobile.sdk.ui.CardRenderingDetailsView import com.spruceid.mobile.sdk.ui.CardRenderingListView import com.spruceid.mobile.sdk.ui.toCardRendering import com.spruceid.mobilesdkexample.R -import com.spruceid.mobilesdkexample.ui.theme.Bg -import com.spruceid.mobilesdkexample.ui.theme.CredentialBorder +import com.spruceid.mobilesdkexample.ui.theme.ColorBase1 +import com.spruceid.mobilesdkexample.ui.theme.ColorBase300 +import com.spruceid.mobilesdkexample.ui.theme.ColorBlue600 +import com.spruceid.mobilesdkexample.ui.theme.ColorRose600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.SecondaryButtonRed -import com.spruceid.mobilesdkexample.ui.theme.SpruceBlue -import com.spruceid.mobilesdkexample.ui.theme.TextBody -import com.spruceid.mobilesdkexample.ui.theme.TextHeader import com.spruceid.mobilesdkexample.utils.addCredential import com.spruceid.mobilesdkexample.utils.splitCamelCase import kotlinx.coroutines.launch @@ -111,7 +111,7 @@ class GenericCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody + color = ColorStone600 ) Spacer(modifier = Modifier.height(16.dp)) } @@ -216,7 +216,7 @@ class GenericCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Medium, fontSize = 20.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(bottom = 8.dp) ) }, @@ -300,7 +300,7 @@ class GenericCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Medium, fontSize = 20.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(bottom = 8.dp) ) } @@ -334,7 +334,7 @@ class GenericCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 12.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() ) @@ -347,7 +347,7 @@ class GenericCredentialItem : ICredentialView { shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( containerColor = Color.Transparent, - contentColor = SecondaryButtonRed, + contentColor = ColorRose600, ), modifier = Modifier .fillMaxWidth() @@ -356,7 +356,7 @@ class GenericCredentialItem : ICredentialView { text = "Delete", fontFamily = Inter, fontWeight = FontWeight.Normal, - color = SecondaryButtonRed, + color = ColorRose600, ) } @@ -371,7 +371,7 @@ class GenericCredentialItem : ICredentialView { shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( containerColor = Color.Transparent, - contentColor = SpruceBlue, + contentColor = ColorBlue600, ), modifier = Modifier .fillMaxWidth() @@ -380,7 +380,7 @@ class GenericCredentialItem : ICredentialView { text = "Cancel", fontFamily = Inter, fontWeight = FontWeight.Bold, - color = SpruceBlue, + color = ColorBlue600, ) } } @@ -394,7 +394,7 @@ class GenericCredentialItem : ICredentialView { .padding(vertical = 10.dp) .border( width = 1.dp, - color = CredentialBorder, + color = ColorBase300, shape = RoundedCornerShape(8.dp) ) .padding(12.dp) @@ -414,7 +414,7 @@ class GenericCredentialItem : ICredentialView { .padding(vertical = 10.dp) .border( width = 1.dp, - color = CredentialBorder, + color = ColorBase300, shape = RoundedCornerShape(8.dp) ) .padding(12.dp) @@ -447,7 +447,7 @@ class GenericCredentialItem : ICredentialView { null } } - genericObjectDisplayer( + genericObjectDisplayer( credential!!, listOf("type", "hashed", "salt", "proof", "renderMethod", "@context") ) @@ -456,9 +456,10 @@ class GenericCredentialItem : ICredentialView { ) ) - Box(Modifier - .fillMaxWidth() - .padding(horizontal = 24.dp) + Box( + Modifier + .fillMaxWidth() + .padding(horizontal = 24.dp) ) { BaseCard( credentialPack = credentialPack, @@ -492,7 +493,7 @@ class GenericCredentialItem : ICredentialView { .fillMaxHeight(0.8f) .nestedScroll(rememberNestedScrollInteropConnection()), sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), - containerColor = Bg, + containerColor = ColorBase1, shape = RoundedCornerShape(topStart = 8.dp, topEnd = 8.dp) ) { Column( @@ -506,7 +507,7 @@ class GenericCredentialItem : ICredentialView { fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 24.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() ) diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Color.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Color.kt index 6456e76..1b05c5a 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Color.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Color.kt @@ -2,44 +2,316 @@ package com.spruceid.mobilesdkexample.ui.theme import androidx.compose.ui.graphics.Color -val SpruceBlue = Color(0xFF2F6AE1) -val Primary = Color(0xFFF7F7F5) -val Bg = Color(0xFFFDFDFC) -val CredentialBorder = Color(0xFFE6E1D6) -val CodeBorder = Color(0xff949494) -val CTAButtonGreen = Color(0xFF087455) -val CTAButtonBlue = Color(0xFF488CF4) -val SecondaryButtonRed = Color(0xFFE11D48) -val TextBody = Color(0xFF57534E) -val TextHeader = Color(0xFF0C0A09) -val TextOnPrimary = Color(0xFFA8A29E) -val VerifiedGreenValid = Color(0xFF047857) -val VerifiedRedInvalid = Color(0xFFBE123C) -val VerifierCloseButton = Color(0xFF44403C) - -// Design system colors +// Base +val ColorBase1 = Color(0xFFFDFDFC) +val ColorBase50 = Color(0xFFFBF9F6) +val ColorBase100 = Color(0xFFF7F5F0) +val ColorBase150 = Color(0xFFF1F0EB) +val ColorBase200 = Color(0xFFF0EDE4) val ColorBase300 = Color(0xFFE6E1D6) +val ColorBase400 = Color(0xFFDBD5C9) +val ColorBase500 = Color(0xFFC8BFAD) +val ColorBase600 = Color(0xFFAB9F8E) +val ColorBase700 = Color(0xFF9B8D79) val ColorBase800 = Color(0xFF75675C) val ColorBase900 = Color(0xFF584C43) +val ColorBase950 = Color(0xFF3B3531) + +// Terracotta +val ColorTerracotta50 = Color(0xFFFDF5F3) +val ColorTerracotta100 = Color(0xFFFCE8E4) +val ColorTerracotta200 = Color(0xFFFAD6CE) +val ColorTerracotta300 = Color(0xFFF5B9AC) +val ColorTerracotta400 = Color(0xFFEE907B) +val ColorTerracotta500 = Color(0xFFE1674C) +val ColorTerracotta600 = Color(0xFFCE5034) +val ColorTerracotta700 = Color(0xFFAD4028) +val ColorTerracotta800 = Color(0xFF8F3825) +val ColorTerracotta900 = Color(0xFF773425) +val ColorTerracotta950 = Color(0xFF40180F) + +// Slate +val ColorSlate50 = Color(0xfff8fafc) +val ColorSlate100 = Color(0xfff1f5f9) +val ColorSlate200 = Color(0xffe2e8f0) +val ColorSlate300 = Color(0xffcbd5e1) +val ColorSlate400 = Color(0xff94a3b8) +val ColorSlate500 = Color(0xff64748b) +val ColorSlate600 = Color(0xff475569) +val ColorSlate700 = Color(0xff334155) +val ColorSlate800 = Color(0xff1e293b) +val ColorSlate900 = Color(0xff0f172a) +val ColorSlate950 = Color(0xff020617) + +// Gray +val ColorGray50 = Color(0xfff9fafb) +val ColorGray100 = Color(0xfff3f4f6) +val ColorGray200 = Color(0xffe5e7eb) +val ColorGray300 = Color(0xffd1d5db) +val ColorGray400 = Color(0xff9ca3af) +val ColorGray500 = Color(0xff6b7280) +val ColorGray600 = Color(0xff4b5563) +val ColorGray700 = Color(0xff374151) +val ColorGray800 = Color(0xff1f2937) +val ColorGray900 = Color(0xff111827) +val ColorGray950 = Color(0xff030712) + +// Zinc +val ColorZinc50 = Color(0xfffafafa) +val ColorZinc100 = Color(0xfff4f4f5) +val ColorZinc200 = Color(0xffe4e4e7) +val ColorZinc300 = Color(0xffd4d4d8) +val ColorZinc400 = Color(0xffa1a1aa) +val ColorZinc500 = Color(0xff71717a) +val ColorZinc600 = Color(0xff52525b) +val ColorZinc700 = Color(0xff3f3f46) +val ColorZinc800 = Color(0xff27272a) +val ColorZinc900 = Color(0xff18181b) +val ColorZinc950 = Color(0xff09090b) + +// Neutral +val ColorNeutral50 = Color(0xfffafafa) +val ColorNeutral100 = Color(0xfff5f5f5) +val ColorNeutral200 = Color(0xffe5e5e5) +val ColorNeutral300 = Color(0xffd4d4d4) +val ColorNeutral400 = Color(0xffa3a3a3) +val ColorNeutral500 = Color(0xff737373) +val ColorNeutral600 = Color(0xff525252) +val ColorNeutral700 = Color(0xff404040) +val ColorNeutral800 = Color(0xff262626) +val ColorNeutral900 = Color(0xff171717) +val ColorNeutral950 = Color(0xff0a0a0a) + +// Stone +val ColorStone50 = Color(0xfffafaf9) +val ColorStone100 = Color(0xfff5f5f4) +val ColorStone200 = Color(0xffe7e5e4) +val ColorStone300 = Color(0xffd6d3d1) +val ColorStone400 = Color(0xffa8a29e) +val ColorStone500 = Color(0xff78716c) +val ColorStone600 = Color(0xff57534e) +val ColorStone700 = Color(0xff44403c) +val ColorStone800 = Color(0xff292524) +val ColorStone900 = Color(0xff1c1917) +val ColorStone950 = Color(0xff0c0a09) + +// Red +val ColorRed50 = Color(0xfffef2f2) +val ColorRed100 = Color(0xfffee2e2) +val ColorRed200 = Color(0xfffecaca) +val ColorRed300 = Color(0xfffca5a5) +val ColorRed400 = Color(0xfff87171) +val ColorRed500 = Color(0xffef4444) +val ColorRed600 = Color(0xffdc2626) +val ColorRed700 = Color(0xffb91c1c) +val ColorRed800 = Color(0xff991b1b) +val ColorRed900 = Color(0xff7f1d1d) +val ColorRed950 = Color(0xff450a0a) + +// Orange +val ColorOrange50 = Color(0xfffff7ed) +val ColorOrange100 = Color(0xffffedd5) +val ColorOrange200 = Color(0xfffed7aa) +val ColorOrange300 = Color(0xfffdba74) +val ColorOrange400 = Color(0xfffb923c) +val ColorOrange500 = Color(0xfff97316) +val ColorOrange600 = Color(0xffea580c) +val ColorOrange700 = Color(0xffc2410c) +val ColorOrange800 = Color(0xff9a3412) +val ColorOrange900 = Color(0xff7c2d12) +val ColorOrange950 = Color(0xff431407) + +// Amber +val ColorAmber50 = Color(0xfffffbeb) +val ColorAmber100 = Color(0xfffef3c7) +val ColorAmber200 = Color(0xfffde68a) +val ColorAmber300 = Color(0xfffcd34d) +val ColorAmber400 = Color(0xfffbbf24) +val ColorAmber500 = Color(0xfff59e0b) +val ColorAmber600 = Color(0xffd97706) +val ColorAmber700 = Color(0xffb45309) +val ColorAmber800 = Color(0xff92400e) +val ColorAmber900 = Color(0xff78350f) +val ColorAmber950 = Color(0xff451a03) + +// Yellow +val ColorYellow50 = Color(0xfffefce8) +val ColorYellow100 = Color(0xfffef9c3) +val ColorYellow200 = Color(0xfffef08a) +val ColorYellow300 = Color(0xfffde047) +val ColorYellow400 = Color(0xfffacc15) +val ColorYellow500 = Color(0xffeab308) +val ColorYellow600 = Color(0xffca8a04) +val ColorYellow700 = Color(0xffa16207) +val ColorYellow800 = Color(0xff854d0e) +val ColorYellow900 = Color(0xFF78350F) +val ColorYellow950 = Color(0xFF451A03) + +// Lime +val ColorLime50 = Color(0xfff7fee7) +val ColorLime100 = Color(0xffecfccb) +val ColorLime200 = Color(0xffd9f99d) +val ColorLime300 = Color(0xffbef264) +val ColorLime400 = Color(0xffa3e635) +val ColorLime500 = Color(0xff84cc16) +val ColorLime600 = Color(0xff65a30d) +val ColorLime700 = Color(0xff4d7c0f) +val ColorLime800 = Color(0xff3f6212) +val ColorLime900 = Color(0xff365314) +val ColorLime950 = Color(0xff1a2e05) + +// Green +val ColorGreen50 = Color(0xfff0fdf4) +val ColorGreen100 = Color(0xffdcfce7) +val ColorGreen200 = Color(0xffbbf7d0) +val ColorGreen300 = Color(0xff86efac) +val ColorGreen400 = Color(0xff4ade80) +val ColorGreen500 = Color(0xff22c55e) +val ColorGreen600 = Color(0xff16a34a) +val ColorGreen700 = Color(0xff15803d) +val ColorGreen800 = Color(0xff166534) +val ColorGreen900 = Color(0xff14532d) +val ColorGreen950 = Color(0xff052e16) + +// Emerald +val ColorEmerald50 = Color(0xFFEDFCF5) +val ColorEmerald100 = Color(0xFFD2F9E5) +val ColorEmerald200 = Color(0xFFA1EFCB) +val ColorEmerald300 = Color(0xFF72E3B6) +val ColorEmerald400 = Color(0xFF39CE98) +val ColorEmerald500 = Color(0xFF16B37F) +val ColorEmerald600 = Color(0xFF0A9167) +val ColorEmerald700 = Color(0xFF087455) +val ColorEmerald800 = Color(0xFF095C45) +val ColorEmerald900 = Color(0xFF084C3A) +val ColorEmerald950 = Color(0xFF032B21) + +// Teal +val ColorTeal50 = Color(0xfff0fdfa) +val ColorTeal100 = Color(0xffccfbf1) +val ColorTeal200 = Color(0xff99f6e4) +val ColorTeal300 = Color(0xff5eead4) +val ColorTeal400 = Color(0xff2dd4bf) +val ColorTeal500 = Color(0xff14b8a6) +val ColorTeal600 = Color(0xff0d9488) +val ColorTeal700 = Color(0xff0f766e) +val ColorTeal800 = Color(0xff115e59) +val ColorTeal900 = Color(0xff134e4a) +val ColorTeal950 = Color(0xff042f2e) + +// Cyan +val ColorCyan50 = Color(0xffecfeff) +val ColorCyan100 = Color(0xffcffafe) +val ColorCyan200 = Color(0xffa5f3fc) +val ColorCyan300 = Color(0xff67e8f9) +val ColorCyan400 = Color(0xff22d3ee) +val ColorCyan500 = Color(0xff06b6d4) +val ColorCyan600 = Color(0xff0891b2) +val ColorCyan700 = Color(0xff0e7490) +val ColorCyan800 = Color(0xff155e75) +val ColorCyan900 = Color(0xff164e63) +val ColorCyan950 = Color(0xff083344) + +// Sky +val ColorSky50 = Color(0xfff0f9ff) +val ColorSky100 = Color(0xffe0f2fe) +val ColorSky200 = Color(0xffbae6fd) +val ColorSky300 = Color(0xff7dd3fc) +val ColorSky400 = Color(0xff38bdf8) +val ColorSky500 = Color(0xff0ea5e9) +val ColorSky600 = Color(0xff0284c7) +val ColorSky700 = Color(0xff0369a1) +val ColorSky800 = Color(0xff075985) +val ColorSky900 = Color(0xff0c4a6e) +val ColorSky950 = Color(0xff082f49) + +// Blue +val ColorBlue50 = Color(0xFFF0F6FE) +val ColorBlue100 = Color(0xFFDDEBFC) +val ColorBlue200 = Color(0xFFC2DCFB) val ColorBlue300 = Color(0xFF98C7F8) +val ColorBlue400 = Color(0xFF68A8F2) val ColorBlue500 = Color(0xFF4389F2) val ColorBlue600 = Color(0xFF2F6AE1) +val ColorBlue700 = Color(0xFF2756CE) +val ColorBlue800 = Color(0xFF2546A8) val ColorBlue900 = Color(0xFF243F84) -val ColorStone50 = Color(0xFFFAFAF9) -val ColorStone200 = Color(0xFFE7E5E4) -val ColorStone300 = Color(0xFFD6D3D1) -val ColorStone400 = Color(0xFFA8A29E) -val ColorStone500 = Color(0xFF78716C) -val ColorStone600 = Color(0xFF57534E) -val ColorStone950 = Color(0xFF0C0A09) -val ColorEmerald700 = Color(0xFF087455) -val ColorEmerald900 = Color(0xFF084C3A) -val ColorRose600 = Color(0xFFE11D48) -val ColorPurple600 = Color(0xFF926CE6) -val ColorTerracotta600 = Color(0xFFE1674C) -val TextBase = Color(0xFFFBF9F6) -val TextPrimary = Color(0xFF0C0A09) -val BgSurfacePureBlue = Color(0xFF2F6AE1) -val BgSurfacePureWhite = Color(0xFFFDFDFC) -val BgSurfacePrimaryContrast = Color(0xFF44403C) -val BorderSecondary = Color(0xFFD6D3D1) \ No newline at end of file +val ColorBlue950 = Color(0xFF1A2851) + +// Indigo +val ColorIndigo50 = Color(0xffeef2ff) +val ColorIndigo100 = Color(0xffe0e7ff) +val ColorIndigo200 = Color(0xffc7d2fe) +val ColorIndigo300 = Color(0xffa5b4fc) +val ColorIndigo400 = Color(0xff818cf8) +val ColorIndigo500 = Color(0xff6366f1) +val ColorIndigo600 = Color(0xff4f46e5) +val ColorIndigo700 = Color(0xff4338ca) +val ColorIndigo800 = Color(0xff3730a3) +val ColorIndigo900 = Color(0xff312e81) +val ColorIndigo950 = Color(0xff1e1b4b) + +// Violet +val ColorViolet50 = Color(0xfff5f3ff) +val ColorViolet100 = Color(0xffede9fe) +val ColorViolet200 = Color(0xffddd6fe) +val ColorViolet300 = Color(0xffc4b5fd) +val ColorViolet400 = Color(0xffa78bfa) +val ColorViolet500 = Color(0xff8b5cf6) +val ColorViolet600 = Color(0xff7c3aed) +val ColorViolet700 = Color(0xff6d28d9) +val ColorViolet800 = Color(0xff5b21b6) +val ColorViolet900 = Color(0xff4c1d95) +val ColorViolet950 = Color(0xff2e1065) + +// Purple +val ColorPurple50 = Color(0xFFF6F4FE) +val ColorPurple100 = Color(0xFFEDEAFE) +val ColorPurple200 = Color(0xFFD4CCF8) +val ColorPurple300 = Color(0xFFC8BCF6) +val ColorPurple400 = Color(0xFFAE96EF) +val ColorPurple500 = Color(0xFF926CE6) +val ColorPurple600 = Color(0xFF824CDB) +val ColorPurple700 = Color(0xFF723AC7) +val ColorPurple800 = Color(0xFF5F30A7) +val ColorPurple900 = Color(0xFF502989) +val ColorPurple950 = Color(0xFF31195C) + +// Fuchsia +val ColorFuchsia50 = Color(0xfffdf4ff) +val ColorFuchsia100 = Color(0xfffae8ff) +val ColorFuchsia200 = Color(0xfff5d0fe) +val ColorFuchsia300 = Color(0xfff0abfc) +val ColorFuchsia400 = Color(0xffe879f9) +val ColorFuchsia500 = Color(0xffd946ef) +val ColorFuchsia600 = Color(0xffc026d3) +val ColorFuchsia700 = Color(0xffa21caf) +val ColorFuchsia800 = Color(0xff86198f) +val ColorFuchsia900 = Color(0xff701a75) +val ColorFuchsia950 = Color(0xff4a044e) + +// Pink +val ColorPink50 = Color(0xfffdf2f8) +val ColorPink100 = Color(0xfffce7f3) +val ColorPink200 = Color(0xfffbcfe8) +val ColorPink300 = Color(0xfff9a8d4) +val ColorPink400 = Color(0xfff472b6) +val ColorPink500 = Color(0xffec4899) +val ColorPink600 = Color(0xffdb2777) +val ColorPink700 = Color(0xffbe185d) +val ColorPink800 = Color(0xff9d174d) +val ColorPink900 = Color(0xff831843) +val ColorPink950 = Color(0xff500724) + +// Rose +val ColorRose50 = Color(0xfffff1f2) +val ColorRose100 = Color(0xffffe4e6) +val ColorRose200 = Color(0xfffecdd3) +val ColorRose300 = Color(0xfffda4af) +val ColorRose400 = Color(0xfffb7185) +val ColorRose500 = Color(0xfff43f5e) +val ColorRose600 = Color(0xffe11d48) +val ColorRose700 = Color(0xffbe123c) +val ColorRose800 = Color(0xff9f1239) +val ColorRose900 = Color(0xff881337) +val ColorRose950 = Color(0xff4c0519) \ No newline at end of file diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Theme.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Theme.kt index d976817..8e20708 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Theme.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Theme.kt @@ -10,13 +10,13 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext private val DarkColorScheme = darkColorScheme( - primary = Primary, - background = Bg, + primary = ColorBase150, + background = ColorBase1, ) private val LightColorScheme = lightColorScheme( - primary = Primary, - background = Bg, + primary = ColorBase150, + background = ColorBase1, /* Other default colors to override background = Color(0xFFFFFBFE), diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierBinarySuccessView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierBinarySuccessView.kt index 8636c9e..a1d5dff 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierBinarySuccessView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierBinarySuccessView.kt @@ -27,12 +27,12 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.spruceid.mobilesdkexample.R +import com.spruceid.mobilesdkexample.ui.theme.ColorEmerald900 +import com.spruceid.mobilesdkexample.ui.theme.ColorRose700 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone700 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter import com.spruceid.mobilesdkexample.ui.theme.MobileSdkTheme -import com.spruceid.mobilesdkexample.ui.theme.TextHeader -import com.spruceid.mobilesdkexample.ui.theme.VerifiedGreenValid -import com.spruceid.mobilesdkexample.ui.theme.VerifiedRedInvalid -import com.spruceid.mobilesdkexample.ui.theme.VerifierCloseButton @Composable fun VerifierBinarySuccessView( @@ -52,7 +52,7 @@ fun VerifierBinarySuccessView( .fillMaxWidth() .height(250.dp) .clip(shape = RoundedCornerShape(8.dp)) - .background(VerifiedGreenValid) + .background(ColorEmerald900) ) { Column( Modifier @@ -83,7 +83,7 @@ fun VerifierBinarySuccessView( .fillMaxWidth() .height(250.dp) .clip(shape = RoundedCornerShape(8.dp)) - .background(VerifiedRedInvalid) + .background(ColorRose700) ) { Column( Modifier @@ -114,7 +114,7 @@ fun VerifierBinarySuccessView( fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 26.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(top = 12.dp) ) @@ -124,7 +124,7 @@ fun VerifierBinarySuccessView( onClick = onClose, shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( - containerColor = VerifierCloseButton, + containerColor = ColorStone700, contentColor = Color.White, ), modifier = Modifier diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierCredentialSuccessView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierCredentialSuccessView.kt index 45daf4f..785cb03 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierCredentialSuccessView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierCredentialSuccessView.kt @@ -22,11 +22,10 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.spruceid.mobilesdkexample.ui.theme.BorderSecondary +import com.spruceid.mobilesdkexample.ui.theme.ColorStone300 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.TextBody -import com.spruceid.mobilesdkexample.ui.theme.TextHeader import com.spruceid.mobilesdkexample.utils.credentialDisplaySelector import com.spruceid.mobilesdkexample.utils.splitCamelCase @@ -84,7 +83,7 @@ fun VerifierCredentialSuccessView( fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 20.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(bottom = 8.dp) ) } @@ -94,7 +93,7 @@ fun VerifierCredentialSuccessView( fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody + color = ColorStone600 ) } @@ -151,7 +150,7 @@ fun VerifierCredentialSuccessView( .fillMaxWidth() .border( width = 1.dp, - color = BorderSecondary, + color = ColorStone300, shape = RoundedCornerShape(6.dp) ) ) { diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierHomeView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierHomeView.kt index f2af070..ea2d890 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierHomeView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierHomeView.kt @@ -30,14 +30,14 @@ import androidx.compose.ui.unit.sp import androidx.navigation.NavController import com.spruceid.mobilesdkexample.R import com.spruceid.mobilesdkexample.navigation.Screen +import com.spruceid.mobilesdkexample.ui.theme.ColorBase150 import com.spruceid.mobilesdkexample.ui.theme.ColorBlue600 import com.spruceid.mobilesdkexample.ui.theme.ColorPurple600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone400 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.ColorTerracotta600 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.Primary -import com.spruceid.mobilesdkexample.ui.theme.TextBody -import com.spruceid.mobilesdkexample.ui.theme.TextHeader -import com.spruceid.mobilesdkexample.ui.theme.TextOnPrimary import com.spruceid.mobilesdkexample.viewmodels.VerificationMethodsViewModel @Composable @@ -68,7 +68,7 @@ fun VerifierHomeHeader( fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 20.sp, - color = TextHeader + color = ColorStone950 ) Spacer(Modifier.weight(1f)) Box( @@ -78,7 +78,7 @@ fun VerifierHomeHeader( .height(36.dp) .padding(start = 4.dp) .clip(shape = RoundedCornerShape(8.dp)) - .background(Primary) + .background(ColorBase150) .clickable { navController.navigate(Screen.VerifierSettingsHomeScreen.route) } @@ -118,7 +118,7 @@ fun VerifierHomeBody( fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 14.sp, - color = TextOnPrimary + color = ColorStone400 ) Spacer(Modifier.weight(1f)) Text( @@ -137,7 +137,8 @@ fun VerifierHomeBody( Modifier .fillMaxWidth() .padding(top = 20.dp) - .padding(bottom = 60.dp)) { + .padding(bottom = 60.dp) + ) { item { VerifierListItem( @@ -214,7 +215,7 @@ fun VerifierListItem( fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 18.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.weight(4f) ) Spacer(modifier = Modifier.weight(1f)) @@ -225,7 +226,7 @@ fun VerifierListItem( fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody, + color = ColorStone600, ) } HorizontalDivider() @@ -235,7 +236,7 @@ fun VerifierListItem( fun VerifierListItemTag( type: VerifierListItemTagType ) { - when(type) { + when (type) { VerifierListItemTagType.DISPLAY_QR_CODE -> { Row( verticalAlignment = Alignment.CenterVertically, @@ -264,6 +265,7 @@ fun VerifierListItemTag( } } + VerifierListItemTagType.SCAN_QR_CODE -> { Row( verticalAlignment = Alignment.CenterVertically, diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierMDocResultView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierMDocResultView.kt index aa6f2f6..17faa35 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierMDocResultView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifierMDocResultView.kt @@ -33,16 +33,15 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.spruceid.mobile.sdk.rs.MDocItem import com.spruceid.mobilesdkexample.R -import com.spruceid.mobilesdkexample.ui.theme.BgSurfacePrimaryContrast -import com.spruceid.mobilesdkexample.ui.theme.BgSurfacePureWhite -import com.spruceid.mobilesdkexample.ui.theme.BorderSecondary +import com.spruceid.mobilesdkexample.ui.theme.ColorBase1 +import com.spruceid.mobilesdkexample.ui.theme.ColorBase50 import com.spruceid.mobilesdkexample.ui.theme.ColorBase900 import com.spruceid.mobilesdkexample.ui.theme.ColorEmerald700 import com.spruceid.mobilesdkexample.ui.theme.ColorStone200 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone300 import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone700 import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 -import com.spruceid.mobilesdkexample.ui.theme.TextBase -import com.spruceid.mobilesdkexample.ui.theme.TextPrimary import com.spruceid.mobilesdkexample.ui.theme.bodyMdDefault import com.spruceid.mobilesdkexample.ui.theme.bodyXsRegular import com.spruceid.mobilesdkexample.ui.theme.buttonText @@ -148,7 +147,7 @@ fun VerifierMDocResultView( Spacer(modifier = Modifier.width(12.dp)) Text( text = "VALID", - color = TextBase, + color = ColorBase50, style = MaterialTheme.typography.bodyMdDefault ) } @@ -261,9 +260,9 @@ fun VerifierMDocResultView( shape = RoundedCornerShape(8.dp), onClick = onClose, colors = ButtonColors( - containerColor = BgSurfacePrimaryContrast, contentColor = TextBase, + containerColor = ColorStone700, contentColor = ColorBase50, disabledContainerColor = Color.Black, - disabledContentColor = TextBase + disabledContentColor = ColorBase50 ) ) { Row( @@ -279,7 +278,7 @@ fun VerifierMDocResultView( Spacer(modifier = Modifier.width(6.dp)) Text( text = "Rescan", - color = TextBase, + color = ColorBase50, style = MaterialTheme.typography.buttonText ) } @@ -287,13 +286,13 @@ fun VerifierMDocResultView( Button( modifier = Modifier .fillMaxWidth() - .border(width = 1.dp, color = BorderSecondary), + .border(width = 1.dp, color = ColorStone300), shape = RoundedCornerShape(8.dp), onClick = onClose, colors = ButtonColors( - containerColor = BgSurfacePureWhite, contentColor = TextPrimary, - disabledContainerColor = BgSurfacePureWhite, - disabledContentColor = TextPrimary + containerColor = ColorBase1, contentColor = ColorStone950, + disabledContainerColor = ColorBase1, + disabledContentColor = ColorStone950 ) ) { @@ -301,7 +300,7 @@ fun VerifierMDocResultView( { Text( text = "Close", - color = TextPrimary, + color = ColorStone950, style = MaterialTheme.typography.buttonTextSmall ) } diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifyDelegatedOid4vpView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifyDelegatedOid4vpView.kt index d6cda9a..893aac9 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifyDelegatedOid4vpView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/verifier/VerifyDelegatedOid4vpView.kt @@ -32,7 +32,7 @@ import com.spruceid.mobilesdkexample.LoadingView import com.spruceid.mobilesdkexample.db.VerificationMethods import com.spruceid.mobilesdkexample.navigation.Screen import com.spruceid.mobilesdkexample.rememberQrBitmapPainter -import com.spruceid.mobilesdkexample.ui.theme.BorderSecondary +import com.spruceid.mobilesdkexample.ui.theme.ColorStone300 import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter import com.spruceid.mobilesdkexample.viewmodels.VerificationMethodsViewModel @@ -48,9 +48,9 @@ enum class VerifyDelegatedOid4vpViewSteps { @Composable fun VerifyDelegatedOid4vpView( - navController: NavController, - verificationId: String, - verificationMethodsViewModel: VerificationMethodsViewModel + navController: NavController, + verificationId: String, + verificationMethodsViewModel: VerificationMethodsViewModel ) { val scope = rememberCoroutineScope() @@ -78,6 +78,7 @@ fun VerifyDelegatedOid4vpView( DelegatedVerifierStatus.INITIATED -> { monitorStatus(res.status) } + DelegatedVerifierStatus.PENDING -> { // display loading view loading = "Requesting data..." @@ -85,11 +86,13 @@ fun VerifyDelegatedOid4vpView( // call next status monitor monitorStatus(res.status) } + DelegatedVerifierStatus.FAILURE -> { // display error view errorTitle = "Error Verifying Credential" errorDescription = res.toString() } + DelegatedVerifierStatus.SUCCESS -> { // display credential step = VerifyDelegatedOid4vpViewSteps.DISPLAYING_CREDENTIAL @@ -115,7 +118,7 @@ fun VerifyDelegatedOid4vpView( try { // Verification method from db verificationMethod = - verificationMethodsViewModel.getVerificationMethod(verificationId.toLong()) + verificationMethodsViewModel.getVerificationMethod(verificationId.toLong()) // Verification method base url url = Url(verificationMethod.url) @@ -127,7 +130,7 @@ fun VerifyDelegatedOid4vpView( // Get initial parameters to delegate verification val delegatedInitializationResponse = - verifier.requestDelegatedVerification(url.encodedPathAndQuery) + verifier.requestDelegatedVerification(url.encodedPathAndQuery) authQuery = "openid4vp://?${delegatedInitializationResponse.authQuery}" uri = delegatedInitializationResponse.uri @@ -145,31 +148,34 @@ fun VerifyDelegatedOid4vpView( if (errorTitle != null && errorDescription != null) { ErrorView( - errorTitle = errorTitle!!, - errorDetails = errorDescription!!, - onClose = { back() } + errorTitle = errorTitle!!, + errorDetails = errorDescription!!, + onClose = { back() } ) } else { when (step) { VerifyDelegatedOid4vpViewSteps.LOADING_QRCODE -> { LoadingView( - loadingText = "Getting QR Code", - cancelButtonLabel = "Cancel", - onCancel = { back() } + loadingText = "Getting QR Code", + cancelButtonLabel = "Cancel", + onCancel = { back() } ) } + VerifyDelegatedOid4vpViewSteps.PRESENTING_QRCODE -> { if (authQuery != null) { DelegatedVerifierDisplayQRCodeView(payload = authQuery!!, onClose = { back() }) } } + VerifyDelegatedOid4vpViewSteps.GETTING_STATUS -> { LoadingView( - loadingText = loading ?: "Requesting data...", - cancelButtonLabel = "Cancel", - onCancel = { back() } + loadingText = loading ?: "Requesting data...", + cancelButtonLabel = "Cancel", + onCancel = { back() } ) } + VerifyDelegatedOid4vpViewSteps.DISPLAYING_CREDENTIAL -> { if (presentation != null) { VerifierCredentialSuccessView( @@ -185,49 +191,49 @@ fun VerifyDelegatedOid4vpView( @Composable fun DelegatedVerifierDisplayQRCodeView(payload: String, onClose: () -> Unit) { Column( - modifier = - Modifier - .fillMaxWidth() - .padding(top = 60.dp) - .padding(bottom = 40.dp) - .padding(horizontal = 30.dp) - .navigationBarsPadding(), - horizontalAlignment = Alignment.CenterHorizontally + modifier = + Modifier + .fillMaxWidth() + .padding(top = 60.dp) + .padding(bottom = 40.dp) + .padding(horizontal = 30.dp) + .navigationBarsPadding(), + horizontalAlignment = Alignment.CenterHorizontally ) { Image( - painter = rememberQrBitmapPainter(payload, size = 300.dp), - contentDescription = - stringResource( - id = com.spruceid.mobilesdkexample.R.string.delegated_oid4vp_qrcode - ), - contentScale = ContentScale.Fit, - modifier = Modifier - .fillMaxWidth() - .weight(1f), + painter = rememberQrBitmapPainter(payload, size = 300.dp), + contentDescription = + stringResource( + id = com.spruceid.mobilesdkexample.R.string.delegated_oid4vp_qrcode + ), + contentScale = ContentScale.Fit, + modifier = Modifier + .fillMaxWidth() + .weight(1f), ) Button( - onClick = { onClose() }, - shape = RoundedCornerShape(6.dp), - colors = - ButtonDefaults.buttonColors( - containerColor = Color.Transparent, - contentColor = ColorStone950, - ), - modifier = - Modifier - .fillMaxWidth() - .border( - width = 1.dp, - color = BorderSecondary, - shape = RoundedCornerShape(6.dp) - ) + onClick = { onClose() }, + shape = RoundedCornerShape(6.dp), + colors = + ButtonDefaults.buttonColors( + containerColor = Color.Transparent, + contentColor = ColorStone950, + ), + modifier = + Modifier + .fillMaxWidth() + .border( + width = 1.dp, + color = ColorStone300, + shape = RoundedCornerShape(6.dp) + ) ) { Text( - text = "Cancel", - fontFamily = Inter, - fontWeight = FontWeight.SemiBold, - color = ColorStone950, + text = "Cancel", + fontFamily = Inter, + fontWeight = FontWeight.SemiBold, + color = ColorStone950, ) } } diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerificationActivityLogScreen.kt b/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerificationActivityLogScreen.kt index b25d377..cef8f36 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerificationActivityLogScreen.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerificationActivityLogScreen.kt @@ -20,11 +20,11 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.spruceid.mobilesdkexample.db.VerificationActivityLogs -import com.spruceid.mobilesdkexample.ui.theme.CodeBorder +import com.spruceid.mobilesdkexample.ui.theme.ColorBlue600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone300 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.SpruceBlue -import com.spruceid.mobilesdkexample.ui.theme.TextBody -import com.spruceid.mobilesdkexample.ui.theme.TextHeader import java.text.SimpleDateFormat import java.util.Date import java.util.Locale @@ -46,7 +46,7 @@ fun VerificationActivityLogsScreen() { fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 17.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(bottom = 4.dp), ) } @@ -57,7 +57,7 @@ fun VerificationActivityLogsScreen() { fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 17.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(bottom = 4.dp), ) Text( @@ -65,7 +65,7 @@ fun VerificationActivityLogsScreen() { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody, + color = ColorStone600, modifier = Modifier.padding(bottom = 4.dp), ) Row( @@ -79,7 +79,7 @@ fun VerificationActivityLogsScreen() { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody, + color = ColorStone600, modifier = Modifier .padding(bottom = 4.dp), @@ -98,7 +98,7 @@ fun VerificationActivityLogsScreen() { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody, + color = ColorStone600, modifier = Modifier.padding(bottom = 4.dp), ) } @@ -109,7 +109,7 @@ fun VerificationActivityLogsScreen() { fontSize = 14.sp, fontStyle = FontStyle.Italic, textAlign = TextAlign.End, - color = CodeBorder, + color = ColorStone300, modifier = Modifier.padding(top = 8.dp, bottom = 4.dp), ) HorizontalDivider(modifier = Modifier.padding(bottom = 12.dp)) @@ -126,7 +126,7 @@ fun VerificationActivityLogsScreen() { .padding(20.dp), colors = ButtonDefaults.buttonColors( - containerColor = SpruceBlue, + containerColor = ColorBlue600, contentColor = Color.White, ), ) { diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerifierSettingsHomeView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerifierSettingsHomeView.kt index 0702f8c..a819719 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerifierSettingsHomeView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/verifiersettings/VerifierSettingsHomeView.kt @@ -34,10 +34,10 @@ import androidx.compose.ui.unit.sp import androidx.navigation.NavController import com.spruceid.mobilesdkexample.R import com.spruceid.mobilesdkexample.navigation.Screen +import com.spruceid.mobilesdkexample.ui.theme.ColorRose600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.TextBody -import com.spruceid.mobilesdkexample.ui.theme.TextHeader -import com.spruceid.mobilesdkexample.ui.theme.VerifiedRedInvalid import com.spruceid.mobilesdkexample.viewmodels.VerificationMethodsViewModel import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch @@ -106,7 +106,7 @@ fun VerifierSettingsHomeHeader( fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 24.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(start = 10.dp) ) Spacer(Modifier.weight(1f)) @@ -153,7 +153,7 @@ fun VerifierSettingsHomeBody( fontFamily = Inter, fontWeight = FontWeight.Medium, fontSize = 14.sp, - color = TextBody, + color = ColorStone600, modifier = Modifier.padding(bottom = 5.dp, top = 5.dp), ) } @@ -170,7 +170,7 @@ fun VerifierSettingsHomeBody( fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 14.sp, - color = TextBody, + color = ColorStone600, ) } } @@ -183,7 +183,7 @@ fun VerifierSettingsHomeBody( }, shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( - containerColor = VerifiedRedInvalid, + containerColor = ColorRose600, contentColor = Color.White, ), modifier = Modifier diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/HandleOID4VPView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/HandleOID4VPView.kt index 6892403..df16169 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/HandleOID4VPView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/HandleOID4VPView.kt @@ -51,16 +51,14 @@ import com.spruceid.mobilesdkexample.ErrorView import com.spruceid.mobilesdkexample.LoadingView import com.spruceid.mobilesdkexample.R import com.spruceid.mobilesdkexample.navigation.Screen -import com.spruceid.mobilesdkexample.ui.theme.BgSurfacePureBlue -import com.spruceid.mobilesdkexample.ui.theme.BorderSecondary import com.spruceid.mobilesdkexample.ui.theme.ColorBase300 +import com.spruceid.mobilesdkexample.ui.theme.ColorBase50 import com.spruceid.mobilesdkexample.ui.theme.ColorBlue600 import com.spruceid.mobilesdkexample.ui.theme.ColorEmerald900 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone300 import com.spruceid.mobilesdkexample.ui.theme.ColorStone600 import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.TextBase -import com.spruceid.mobilesdkexample.ui.theme.TextHeader import com.spruceid.mobilesdkexample.utils.trustedDids import com.spruceid.mobilesdkexample.viewmodels.CredentialPacksViewModel import kotlinx.coroutines.Dispatchers @@ -208,7 +206,7 @@ fun DataFieldSelector( fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 20.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() .padding(bottom = 12.dp), @@ -254,7 +252,7 @@ fun DataFieldSelector( .fillMaxWidth() .border( width = 1.dp, - color = BorderSecondary, + color = ColorStone300, shape = RoundedCornerShape(6.dp) ) .weight(1f) @@ -287,7 +285,7 @@ fun DataFieldSelector( text = "Approve", fontFamily = Inter, fontWeight = FontWeight.SemiBold, - color = TextBase, + color = ColorBase50, ) } } @@ -351,7 +349,7 @@ fun CredentialSelector( fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 20.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() .padding(bottom = 12.dp), @@ -409,7 +407,7 @@ fun CredentialSelector( .fillMaxWidth() .border( width = 1.dp, - color = BorderSecondary, + color = ColorStone300, shape = RoundedCornerShape(6.dp) ) .weight(1f) @@ -452,7 +450,7 @@ fun CredentialSelector( text = "Continue", fontFamily = Inter, fontWeight = FontWeight.SemiBold, - color = TextBase, + color = ColorBase50, ) } } @@ -503,8 +501,8 @@ fun CredentialSelectorItem( } }, colors = CheckboxDefaults.colors( - checkedColor = BgSurfacePureBlue, - uncheckedColor = BorderSecondary + checkedColor = ColorBlue600, + uncheckedColor = ColorStone300 ) ) Text( diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/SelectiveDisclosureView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/SelectiveDisclosureView.kt index 864678b..affe700 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/SelectiveDisclosureView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/SelectiveDisclosureView.kt @@ -25,7 +25,7 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.spruceid.mobile.sdk.CredentialsViewModel -import com.spruceid.mobilesdkexample.ui.theme.Bg +import com.spruceid.mobilesdkexample.ui.theme.ColorBase1 import com.spruceid.mobilesdkexample.ui.theme.Inter @OptIn(ExperimentalMaterial3Api::class) @@ -48,7 +48,7 @@ fun SelectiveDisclosureView( .fillMaxHeight(0.8f), sheetState = selectNamespacesSheetState, dragHandle = null, - containerColor = Bg, + containerColor = ColorBase1, shape = RoundedCornerShape(8.dp) ) { Column( diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/ShareableCredentialListItem.kt b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/ShareableCredentialListItem.kt index 1363385..41d8715 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/ShareableCredentialListItem.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/ShareableCredentialListItem.kt @@ -42,12 +42,12 @@ import com.spruceid.mobile.sdk.CredentialsViewModel import com.spruceid.mobile.sdk.rs.Mdoc import com.spruceid.mobile.sdk.rs.ParsedCredential import com.spruceid.mobilesdkexample.R -import com.spruceid.mobilesdkexample.ui.theme.Bg -import com.spruceid.mobilesdkexample.ui.theme.CredentialBorder +import com.spruceid.mobilesdkexample.ui.theme.ColorBase1 +import com.spruceid.mobilesdkexample.ui.theme.ColorBase150 +import com.spruceid.mobilesdkexample.ui.theme.ColorBase300 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone400 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.Primary -import com.spruceid.mobilesdkexample.ui.theme.TextHeader -import com.spruceid.mobilesdkexample.ui.theme.TextOnPrimary import com.spruceid.mobilesdkexample.utils.keyBase64 import com.spruceid.mobilesdkexample.utils.keyPEM import java.security.KeyFactory @@ -127,7 +127,7 @@ fun ShareableCredentialListItems( .fillMaxHeight(0.8f), sheetState = sheetState, dragHandle = null, - containerColor = Bg, + containerColor = ColorBase1, shape = RoundedCornerShape(8.dp) ) { Text( @@ -136,7 +136,7 @@ fun ShareableCredentialListItems( fontFamily = Inter, fontWeight = FontWeight.Bold, fontSize = 24.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier .fillMaxWidth() .padding(vertical = 20.dp), @@ -155,7 +155,7 @@ fun ShareableCredentialListItems( .padding(vertical = 10.dp) .border( width = 1.dp, - color = CredentialBorder, + color = ColorBase300, shape = RoundedCornerShape(8.dp) ) ) { @@ -217,7 +217,7 @@ fun ShareableCredentialListItemQRCode(credential: ParsedCredential) { Modifier .fillMaxWidth() .clip(shape = RoundedCornerShape(0.dp, 0.dp, 8.dp, 8.dp)) - .background(Primary) + .background(ColorBase150) .padding(8.dp) ) { Row( @@ -243,7 +243,7 @@ fun ShareableCredentialListItemQRCode(credential: ParsedCredential) { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 10.sp, - color = TextOnPrimary + color = ColorStone400 ) } @@ -265,7 +265,7 @@ fun ShareableCredentialListItemQRCode(credential: ParsedCredential) { fontFamily = Inter, fontWeight = FontWeight.Normal, fontSize = 10.sp, - color = TextOnPrimary + color = ColorStone400 ) } } diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt index f593672..4ea2084 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt @@ -34,10 +34,10 @@ import com.spruceid.mobilesdkexample.LoadingView import com.spruceid.mobilesdkexample.R import com.spruceid.mobilesdkexample.credentials.GenericCredentialItem import com.spruceid.mobilesdkexample.navigation.Screen +import com.spruceid.mobilesdkexample.ui.theme.ColorBase150 import com.spruceid.mobilesdkexample.ui.theme.ColorStone400 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.Primary -import com.spruceid.mobilesdkexample.ui.theme.TextHeader import com.spruceid.mobilesdkexample.viewmodels.CredentialPacksViewModel @Composable @@ -48,7 +48,8 @@ fun WalletHomeView( Column( Modifier .padding(all = 20.dp) - .padding(top = 20.dp)) { + .padding(top = 20.dp) + ) { WalletHomeHeader(navController = navController) WalletHomeBody(credentialPacksViewModel = credentialPacksViewModel) } @@ -62,7 +63,7 @@ fun WalletHomeHeader(navController: NavController) { fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 20.sp, - color = TextHeader + color = ColorStone950 ) Spacer(Modifier.weight(1f)) Box( @@ -73,7 +74,7 @@ fun WalletHomeHeader(navController: NavController) { .height(36.dp) .padding(start = 4.dp) .clip(shape = RoundedCornerShape(8.dp)) - .background(Primary) + .background(ColorBase150) .clickable { navController.navigate(Screen.ScanQRScreen.route) } ) { Image( @@ -93,7 +94,7 @@ fun WalletHomeHeader(navController: NavController) { .height(36.dp) .padding(start = 4.dp) .clip(shape = RoundedCornerShape(8.dp)) - .background(Primary) + .background(ColorBase150) .clickable { navController.navigate(Screen.WalletSettingsHomeScreen.route) } diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/walletsettings/WalletSettingsHomeView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/walletsettings/WalletSettingsHomeView.kt index caf84f0..94e7e0c 100644 --- a/example/src/main/java/com/spruceid/mobilesdkexample/walletsettings/WalletSettingsHomeView.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/walletsettings/WalletSettingsHomeView.kt @@ -25,9 +25,9 @@ import androidx.compose.ui.unit.sp import androidx.navigation.NavController import com.spruceid.mobilesdkexample.R import com.spruceid.mobilesdkexample.navigation.Screen +import com.spruceid.mobilesdkexample.ui.theme.ColorRose600 +import com.spruceid.mobilesdkexample.ui.theme.ColorStone950 import com.spruceid.mobilesdkexample.ui.theme.Inter -import com.spruceid.mobilesdkexample.ui.theme.TextHeader -import com.spruceid.mobilesdkexample.ui.theme.VerifiedRedInvalid import com.spruceid.mobilesdkexample.viewmodels.CredentialPacksViewModel @Composable @@ -75,7 +75,7 @@ fun WalletSettingsHomeHeader( fontFamily = Inter, fontWeight = FontWeight.SemiBold, fontSize = 24.sp, - color = TextHeader, + color = ColorStone950, modifier = Modifier.padding(start = 10.dp) ) Spacer(Modifier.weight(1f)) @@ -96,7 +96,7 @@ fun WalletSettingsHomeBody(credentialPacksViewModel: CredentialPacksViewModel) { }, shape = RoundedCornerShape(5.dp), colors = ButtonDefaults.buttonColors( - containerColor = VerifiedRedInvalid, + containerColor = ColorRose600, contentColor = Color.White, ), modifier = Modifier diff --git a/example/src/main/res/values/colors.xml b/example/src/main/res/values/colors.xml index 0e593cc..380e8f4 100644 --- a/example/src/main/res/values/colors.xml +++ b/example/src/main/res/values/colors.xml @@ -1,44 +1,316 @@ - #FFF7F7F5 - #FFFDFDFC - #FFE6E1D6 - #ff949494 - #FF059669 - #FF57534E - #FF0C0A09 - #FFA8A29E - #FF0C4A6E - #FFF0F9FF - #FF0C4A6E - #FFE7E5E4 - #FFF7F5F0 - #FF0C0A09 - #FF047857 - #FFBE123C - #FF44403C - #FF2F6AE1 - #FFE11D48 - #FF087455 - - - #FFE6E1D6 - #FF75675C - #FF98C7F8 - #FF4389F2 - #FF2F6AE1 - #FF243F84 - #FFFAFAF9 - #FFD6D3D1 - #FFA8A29E - #FF78716C - #FF57534E - #FF0C0A09 - #FF084C3A - #FFE11D48 - #FF926CE6 - #FFE1674C - #FFFBF9F6 - #FFD6D3D1 - #FFD6D3D1 + // Base + #FFFDFDFC + #FFFBF9F6 + #FFF7F5F0 + #FFF1F0EB + #FFF0EDE4 + #FFE6E1D6 + #FFDBD5C9 + #FFC8BFAD + #FFAB9F8E + #FF9B8D79 + #FF75675C + #FF584C43 + #FF3B3531 + + // Terracotta + #FFFDF5F3 + #FFFCE8E4 + #FFFAD6CE + #FFF5B9AC + #FFEE907B + #FFE1674C + #FFCE5034 + #FFAD4028 + #FF8F3825 + #FF773425 + #FF40180F + + // Slate + #fff8fafc + #fff1f5f9 + #ffe2e8f0 + #ffcbd5e1 + #ff94a3b8 + #ff64748b + #ff475569 + #ff334155 + #ff1e293b + #ff0f172a + #ff020617 + + // Gray + #fff9fafb + #fff3f4f6 + #ffe5e7eb + #ffd1d5db + #ff9ca3af + #ff6b7280 + #ff4b5563 + #ff374151 + #ff1f2937 + #ff111827 + #ff030712 + + // Zinc + #fffafafa + #fff4f4f5 + #ffe4e4e7 + #ffd4d4d8 + #ffa1a1aa + #ff71717a + #ff52525b + #ff3f3f46 + #ff27272a + #ff18181b + #ff09090b + + // Neutral + #fffafafa + #fff5f5f5 + #ffe5e5e5 + #ffd4d4d4 + #ffa3a3a3 + #ff737373 + #ff525252 + #ff404040 + #ff262626 + #ff171717 + #ff0a0a0a + + // Stone + #fffafaf9 + #fff5f5f4 + #ffe7e5e4 + #ffd6d3d1 + #ffa8a29e + #ff78716c + #ff57534e + #ff44403c + #ff292524 + #ff1c1917 + #ff0c0a09 + + // Red + #fffef2f2 + #fffee2e2 + #fffecaca + #fffca5a5 + #fff87171 + #ffef4444 + #ffdc2626 + #ffb91c1c + #ff991b1b + #ff7f1d1d + #ff450a0a + + // Orange + #fffff7ed + #ffffedd5 + #fffed7aa + #fffdba74 + #fffb923c + #fff97316 + #ffea580c + #ffc2410c + #ff9a3412 + #ff7c2d12 + #ff431407 + + // Amber + #fffffbeb + #fffef3c7 + #fffde68a + #fffcd34d + #fffbbf24 + #fff59e0b + #ffd97706 + #ffb45309 + #ff92400e + #ff78350f + #ff451a03 + + // Yellow + #fffefce8 + #fffef9c3 + #fffef08a + #fffde047 + #fffacc15 + #ffeab308 + #ffca8a04 + #ffa16207 + #ff854d0e + #FF78350F + #FF451A03 + + // Lime + #fff7fee7 + #ffecfccb + #ffd9f99d + #ffbef264 + #ffa3e635 + #ff84cc16 + #ff65a30d + #ff4d7c0f + #ff3f6212 + #ff365314 + #ff1a2e05 + + // Green + #fff0fdf4 + #ffdcfce7 + #ffbbf7d0 + #ff86efac + #ff4ade80 + #ff22c55e + #ff16a34a + #ff15803d + #ff166534 + #ff14532d + #ff052e16 + + // Emerald + #FFEDFCF5 + #FFD2F9E5 + #FFA1EFCB + #FF72E3B6 + #FF39CE98 + #FF16B37F + #FF0A9167 + #FF087455 + #FF095C45 + #FF084C3A + #FF032B21 + + // Teal + #fff0fdfa + #ffccfbf1 + #ff99f6e4 + #ff5eead4 + #ff2dd4bf + #ff14b8a6 + #ff0d9488 + #ff0f766e + #ff115e59 + #ff134e4a + #ff042f2e + + // Cyan + #ffecfeff + #ffcffafe + #ffa5f3fc + #ff67e8f9 + #ff22d3ee + #ff06b6d4 + #ff0891b2 + #ff0e7490 + #ff155e75 + #ff164e63 + #ff083344 + + // Sky + #fff0f9ff + #ffe0f2fe + #ffbae6fd + #ff7dd3fc + #ff38bdf8 + #ff0ea5e9 + #ff0284c7 + #ff0369a1 + #ff075985 + #ff0c4a6e + #ff082f49 + + // Blue + #FFF0F6FE + #FFDDEBFC + #FFC2DCFB + #FF98C7F8 + #FF68A8F2 + #FF4389F2 + #FF2F6AE1 + #FF2756CE + #FF2546A8 + #FF243F84 + #FF1A2851 + + // Indigo + #ffeef2ff + #ffe0e7ff + #ffc7d2fe + #ffa5b4fc + #ff818cf8 + #ff6366f1 + #ff4f46e5 + #ff4338ca + #ff3730a3 + #ff312e81 + #ff1e1b4b + + // Violet + #fff5f3ff + #ffede9fe + #ffddd6fe + #ffc4b5fd + #ffa78bfa + #ff8b5cf6 + #ff7c3aed + #ff6d28d9 + #ff5b21b6 + #ff4c1d95 + #ff2e1065 + + // Purple + #FFF6F4FE + #FFEDEAFE + #FFD4CCF8 + #FFC8BCF6 + #FFAE96EF + #FF926CE6 + #FF824CDB + #FF723AC7 + #FF5F30A7 + #FF502989 + #FF31195C + + // Fuchsia + #fffdf4ff + #fffae8ff + #fff5d0fe + #fff0abfc + #ffe879f9 + #ffd946ef + #ffc026d3 + #ffa21caf + #ff86198f + #ff701a75 + #ff4a044e + + // Pink + #fffdf2f8 + #fffce7f3 + #fffbcfe8 + #fff9a8d4 + #fff472b6 + #ffec4899 + #ffdb2777 + #ffbe185d + #ff9d174d + #ff831843 + #ff500724 + + // Rose + #fffff1f2 + #ffffe4e6 + #fffecdd3 + #fffda4af + #fffb7185 + #fff43f5e + #ffe11d48 + #ffbe123c + #ff9f1239 + #ff881337 + #ff4c0519 \ No newline at end of file