diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c42bf7fcb6..31cb895042 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -260,13 +260,11 @@ dependencies { /** Compose libraries */ implementation(deps.compose.constraintLayout) - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.animation) implementation(deps.compose.coil) implementation(deps.compose.constraintLayout) implementation(deps.compose.foundation) - implementation(deps.compose.material) implementation(deps.compose.navigation.hilt) implementation(deps.compose.shimmer) implementation(deps.compose.ui) diff --git a/common/ui/build.gradle.kts b/common/ui/build.gradle.kts index f6f607f75a..2cb8f794be 100644 --- a/common/ui/build.gradle.kts +++ b/common/ui/build.gradle.kts @@ -12,7 +12,6 @@ dependencies { /** Compose */ implementation(deps.compose.material3) - implementation(deps.compose.material) implementation(deps.compose.foundation) implementation(deps.compose.ui) implementation(deps.compose.ui.tooling) diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 7c76425a6e..3f46d7909d 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -42,7 +42,6 @@ dependencies { /** Compose */ implementation(deps.compose.constraintLayout) implementation(deps.compose.foundation) - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.paging) implementation(deps.compose.ui.tooling) diff --git a/core/ui/src/main/java/com/tangem/core/ui/res/TangemTheme.kt b/core/ui/src/main/java/com/tangem/core/ui/res/TangemTheme.kt index b6410efd58..bc5f89a78c 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/res/TangemTheme.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/res/TangemTheme.kt @@ -4,9 +4,9 @@ import android.app.Activity import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.text.selection.LocalTextSelectionColors import androidx.compose.foundation.text.selection.TextSelectionColors -import androidx.compose.material.Colors -import androidx.compose.material.MaterialTheme -import androidx.compose.material.ProvideTextStyle +import androidx.compose.material3.ColorScheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ProvideTextStyle import androidx.compose.material3.SnackbarHostState import androidx.compose.runtime.* import androidx.compose.ui.graphics.Color @@ -90,7 +90,7 @@ fun TangemTheme( val rootBackgroundColor = rememberedColors.background.secondary MaterialTheme( - colors = materialThemeColors(colors = themeColors, isDark = isDark), + colorScheme = tangemColorScheme(colors = themeColors), ) { CompositionLocalProvider( LocalTangemColors provides rememberedColors, @@ -143,21 +143,51 @@ object TangemTheme { @Stable @Composable -private fun materialThemeColors(colors: TangemColors, isDark: Boolean): Colors { - return Colors( +private fun tangemColorScheme(colors: TangemColors): ColorScheme { + return ColorScheme( primary = colors.background.primary, - primaryVariant = colors.background.secondary, - secondary = colors.button.primary, - secondaryVariant = colors.text.accent, - background = colors.background.primary, - surface = colors.background.secondary, - error = colors.text.warning, onPrimary = colors.text.primary1, + primaryContainer = colors.background.secondary, + onPrimaryContainer = colors.background.action, + inversePrimary = colors.background.action, + + secondary = colors.button.primary, onSecondary = colors.text.primary1, + secondaryContainer = colors.background.secondary, + onSecondaryContainer = colors.text.primary1, + + tertiary = colors.background.tertiary, + onTertiary = colors.text.tertiary, + tertiaryContainer = colors.background.tertiary, + onTertiaryContainer = colors.text.tertiary, + + background = colors.background.primary, onBackground = colors.text.primary1, + + surface = colors.background.secondary, + surfaceVariant = colors.background.tertiary, onSurface = colors.text.primary1, + onSurfaceVariant = colors.text.secondary, + surfaceTint = colors.background.tertiary, + inverseSurface = colors.button.disabled, + inverseOnSurface = colors.button.primary, + surfaceBright = colors.background.secondary, + surfaceDim = colors.background.tertiary, + surfaceContainer = colors.background.tertiary, + surfaceContainerHigh = colors.background.tertiary, + surfaceContainerHighest = colors.background.tertiary, + surfaceContainerLow = colors.background.tertiary, + surfaceContainerLowest = colors.background.tertiary, + + error = colors.text.warning, + errorContainer = colors.background.tertiary, + onErrorContainer = colors.text.primary2, onError = colors.text.primary2, - isLight = !isDark, + + outline = colors.stroke.primary, + outlineVariant = colors.stroke.secondary, + + scrim = colors.stroke.transparency, ) } diff --git a/features/create-wallet-selection/impl/build.gradle.kts b/features/create-wallet-selection/impl/build.gradle.kts index 828a0ccfac..477a6af3ea 100644 --- a/features/create-wallet-selection/impl/build.gradle.kts +++ b/features/create-wallet-selection/impl/build.gradle.kts @@ -45,7 +45,6 @@ dependencies { implementation(deps.lifecycle.runtime.ktx) /** Compose libraries */ - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.animation) implementation(deps.compose.foundation) diff --git a/features/disclaimer/impl/build.gradle.kts b/features/disclaimer/impl/build.gradle.kts index 3454262136..b34ba43590 100644 --- a/features/disclaimer/impl/build.gradle.kts +++ b/features/disclaimer/impl/build.gradle.kts @@ -23,7 +23,6 @@ dependencies { implementation(deps.compose.accompanist.permission) implementation(deps.compose.accompanist.webView) implementation(deps.compose.material3) - implementation(deps.compose.material) /** Core modules */ implementation(projects.core.ui) diff --git a/features/hot-wallet/impl/build.gradle.kts b/features/hot-wallet/impl/build.gradle.kts index c740fecd23..ccc57778cd 100644 --- a/features/hot-wallet/impl/build.gradle.kts +++ b/features/hot-wallet/impl/build.gradle.kts @@ -52,7 +52,6 @@ dependencies { implementation(deps.lifecycle.runtime.ktx) /** Compose libraries */ - implementation(deps.compose.material) // to use buttons and text field in MultiWalletSeedPhraseImport.kt implementation(deps.compose.material3) implementation(deps.compose.animation) implementation(deps.compose.foundation) diff --git a/features/manage-tokens/impl/build.gradle.kts b/features/manage-tokens/impl/build.gradle.kts index c6a2a28283..0506848d40 100644 --- a/features/manage-tokens/impl/build.gradle.kts +++ b/features/manage-tokens/impl/build.gradle.kts @@ -43,7 +43,6 @@ dependencies { implementation(deps.compose.ui) implementation(deps.compose.ui.tooling) implementation(deps.compose.foundation) - implementation(deps.compose.material) // For button colors implementation(deps.compose.material3) implementation(deps.compose.shimmer) diff --git a/features/markets/impl/build.gradle.kts b/features/markets/impl/build.gradle.kts index 6029226493..df2755faef 100644 --- a/features/markets/impl/build.gradle.kts +++ b/features/markets/impl/build.gradle.kts @@ -50,7 +50,6 @@ dependencies { /* Compose */ implementation(deps.compose.coil) implementation(deps.compose.foundation) - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.ui) implementation(deps.compose.ui.tooling) diff --git a/features/nft/impl/build.gradle.kts b/features/nft/impl/build.gradle.kts index 83bba9f0b5..0e4b9f5c67 100644 --- a/features/nft/impl/build.gradle.kts +++ b/features/nft/impl/build.gradle.kts @@ -52,7 +52,6 @@ dependencies { implementation(deps.lifecycle.runtime.ktx) /** Compose libraries */ - implementation(deps.compose.material) // to use buttons and text field in MultiWalletSeedPhraseImport.kt implementation(deps.compose.material3) implementation(deps.compose.animation) implementation(deps.compose.foundation) diff --git a/features/nft/impl/src/main/kotlin/com/tangem/features/nft/details/ui/NFTDetailsLogo.kt b/features/nft/impl/src/main/kotlin/com/tangem/features/nft/details/ui/NFTDetailsLogo.kt index 465271494a..2a156d878d 100644 --- a/features/nft/impl/src/main/kotlin/com/tangem/features/nft/details/ui/NFTDetailsLogo.kt +++ b/features/nft/impl/src/main/kotlin/com/tangem/features/nft/details/ui/NFTDetailsLogo.kt @@ -6,7 +6,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.size -import androidx.compose.material.Icon +import androidx.compose.material3.Icon import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/features/onboarding-v2/impl/build.gradle.kts b/features/onboarding-v2/impl/build.gradle.kts index eac8270d6f..9653f895cb 100644 --- a/features/onboarding-v2/impl/build.gradle.kts +++ b/features/onboarding-v2/impl/build.gradle.kts @@ -62,7 +62,6 @@ dependencies { implementation(deps.lifecycle.runtime.ktx) /** Compose libraries */ - implementation(deps.compose.material) // to use buttons and text field in MultiWalletSeedPhraseImport.kt implementation(deps.compose.material3) implementation(deps.compose.animation) implementation(deps.compose.foundation) diff --git a/features/onramp/impl/build.gradle.kts b/features/onramp/impl/build.gradle.kts index efcd01bc52..8280707bae 100644 --- a/features/onramp/impl/build.gradle.kts +++ b/features/onramp/impl/build.gradle.kts @@ -63,7 +63,6 @@ dependencies { implementation(deps.compose.material3) implementation(deps.compose.shimmer) implementation(deps.compose.coil) - implementation(deps.compose.material) /** Other */ implementation(deps.decompose.ext.compose) diff --git a/features/staking/impl/build.gradle.kts b/features/staking/impl/build.gradle.kts index 67246e25f1..995576c43d 100644 --- a/features/staking/impl/build.gradle.kts +++ b/features/staking/impl/build.gradle.kts @@ -28,7 +28,6 @@ dependencies { /** Compose */ implementation(deps.compose.accompanist.systemUiController) implementation(deps.compose.material3) - implementation(deps.compose.material) implementation(deps.compose.foundation) implementation(deps.compose.ui) implementation(deps.compose.ui.tooling) diff --git a/features/swap/impl/build.gradle.kts b/features/swap/impl/build.gradle.kts index 5d0745ca74..ed1a7f3f50 100644 --- a/features/swap/impl/build.gradle.kts +++ b/features/swap/impl/build.gradle.kts @@ -61,7 +61,6 @@ dependencies { /** Compose */ implementation(deps.arrow.core) implementation(deps.compose.foundation) - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.ui.tooling) implementation(deps.compose.coil) diff --git a/features/tester/impl/build.gradle.kts b/features/tester/impl/build.gradle.kts index bd1dd6bf0f..6be7aca95c 100644 --- a/features/tester/impl/build.gradle.kts +++ b/features/tester/impl/build.gradle.kts @@ -17,7 +17,6 @@ dependencies { /** Compose */ implementation(deps.compose.accompanist.systemUiController) implementation(deps.compose.foundation) - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.navigation) implementation(deps.compose.navigation.hilt) diff --git a/features/tokendetails/impl/build.gradle.kts b/features/tokendetails/impl/build.gradle.kts index 4e929dfdb3..4bcd8ce768 100644 --- a/features/tokendetails/impl/build.gradle.kts +++ b/features/tokendetails/impl/build.gradle.kts @@ -21,7 +21,6 @@ dependencies { implementation(deps.compose.accompanist.systemUiController) implementation(deps.compose.coil) implementation(deps.compose.foundation) - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.navigation) implementation(deps.compose.navigation.hilt) diff --git a/features/wallet/impl/build.gradle.kts b/features/wallet/impl/build.gradle.kts index 77dd37708d..e6d1f16109 100644 --- a/features/wallet/impl/build.gradle.kts +++ b/features/wallet/impl/build.gradle.kts @@ -22,7 +22,6 @@ dependencies { implementation(deps.compose.coil) implementation(deps.compose.constraintLayout) implementation(deps.compose.foundation) - implementation(deps.compose.material) implementation(deps.compose.material3) implementation(deps.compose.paging) implementation(deps.compose.reorderable) diff --git a/gradle/dependencies.toml b/gradle/dependencies.toml index 3aee2f0af5..f9ef6078d0 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -30,7 +30,6 @@ androidxWorkManager = "2.9.0" # region Compose compose-runtime = "1.7.4" compose-foundation = "1.7.4" -compose-material = "1.7.4" compose-material3 = "1.3.1" compose-constraint = "1.0.1" compose-navigation = "2.7.7" @@ -169,7 +168,6 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = compose-ui-utils = { module = "androidx.compose.ui:ui-util", version.ref = "compose-runtime" } compose-animation = { module = "androidx.compose.animation:animation", version.ref = "compose-runtime" } compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-foundation" } -compose-material = { module = "androidx.compose.material:material", version.ref = "compose-material" } compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" } compose-constraintLayout = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "compose-constraint" } compose-shimmer = { module = "com.valentinilk.shimmer:compose-shimmer", version.ref = "compose-shimmer" }