diff --git a/app/src/main/java/com/imashnake/animite/features/theme/Theme.kt b/app/src/main/java/com/imashnake/animite/features/theme/Theme.kt index 14f744e4..6091ea6a 100644 --- a/app/src/main/java/com/imashnake/animite/features/theme/Theme.kt +++ b/app/src/main/java/com/imashnake/animite/features/theme/Theme.kt @@ -2,21 +2,22 @@ package com.imashnake.animite.features.theme import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.ripple.LocalRippleTheme import androidx.compose.material.ripple.RippleAlpha -import androidx.compose.material.ripple.RippleTheme +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.LocalRippleConfiguration import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.RippleConfiguration import androidx.compose.material3.dynamicDarkColorScheme import androidx.compose.material3.dynamicLightColorScheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider -import androidx.compose.runtime.Immutable import androidx.compose.ui.platform.LocalContext import com.imashnake.animite.core.ui.LocalPaddings import com.imashnake.animite.core.ui.Paddings import com.imashnake.animite.core.ui.rememberDefaultPaddings import com.imashnake.animite.dev.ext.pastelize +@OptIn(ExperimentalMaterial3Api::class) @Composable fun AnimiteTheme( paddings: Paddings = rememberDefaultPaddings(), @@ -32,29 +33,24 @@ fun AnimiteTheme( darkTheme -> KimiNoDarkColorScheme else -> KimiNoLightColorScheme.pastelize(backgroundToPrimary = 0.05f) } + val animiteRippleTheme = RippleConfiguration( + color = MaterialTheme.colorScheme.primary, + rippleAlpha = RippleAlpha( + draggedAlpha = 0.16f, + focusedAlpha = 0.12f, + hoveredAlpha = 0.08f, + pressedAlpha = 0.12f + ) + ) MaterialTheme( colorScheme = animiteColorScheme, typography = AnimiteTypography ) { CompositionLocalProvider( - LocalRippleTheme provides AnimiteRippleTheme, + LocalRippleConfiguration provides animiteRippleTheme, LocalPaddings provides paddings, content = content ) } } - -@Immutable -private object AnimiteRippleTheme : RippleTheme { - @Composable - override fun defaultColor() = MaterialTheme.colorScheme.primary - - @Composable - override fun rippleAlpha() = RippleAlpha( - draggedAlpha = 0.16f, - focusedAlpha = 0.12f, - hoveredAlpha = 0.08f, - pressedAlpha = 0.12f - ) -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 766ae3d6..794c4b3f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,15 +17,15 @@ desugaring = "2.0.4" # Android Gradle Plugin # https://developer.android.com/studio/releases/gradle-plugin. -agp = "8.2.1" +agp = "8.2.2" # AndroidX # https://androidx.tech. activity = "1.8.2" -core = "1.13.0-alpha03" +core = "1.13.0-alpha05" lifecycle = "2.7.0" -extJunit = "1.2.0-alpha02" -espresso = "3.6.0-alpha02" +extJunit = "1.2.0-alpha03" +espresso = "3.6.0-alpha03" # TODO: Breaking changes; review release notes and update. # Apollo Kotlin @@ -46,13 +46,13 @@ composeDestinations = "1.9.59" # Compose # https://developer.android.com/jetpack/androidx/releases/compose. -composeAnimation = "1.6.0-rc01" -composeCompiler = "1.5.8" -composeFoundation = "1.6.0-rc01" -composeMaterial = "1.6.0-rc01" -composeMaterial3 = "1.2.0-beta02" -composeRuntime = "1.6.0-rc01" -composeUi = "1.6.0-rc01" +composeAnimation = "1.7.0-alpha03" +composeCompiler = "1.5.10" +composeFoundation = "1.7.0-alpha03" +composeMaterial = "1.7.0-alpha03" +composeMaterial3 = "1.3.0-alpha01" +composeRuntime = "1.7.0-alpha03" +composeUi = "1.7.0-alpha03" # Dagger # https://github.com/google/dagger/releases. @@ -60,7 +60,7 @@ dagger = "2.50" # Hilt # https://developer.android.com/jetpack/androidx/releases/hilt. -hilt = "1.1.0" +hilt = "1.2.0" # Kotlin # https://kotlinlang.org/docs/releases.html#release-details. @@ -69,7 +69,7 @@ coroutines = "1.8.0-RC2" # KSP # https://github.com/google/ksp/releases. -ksp = "1.9.22-1.0.16" +ksp = "1.9.22-1.0.17" # Test # https://github.com/junit-team/junit4/releases. @@ -77,11 +77,11 @@ junit = "4.13.2" # detekt # https://github.com/detekt/detekt/releases. -detekt = "1.23.4" +detekt = "1.23.5" # Compose Markdown # https://github.com/boswelja/compose-markdown. -composeMarkdown = "1.0.3" +composeMarkdown = "1.0.4" [libraries]