From b0f3c41a34c1d3106974da1d5493bdabbdc9431d Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Sun, 7 Dec 2025 17:57:57 +0100 Subject: [PATCH 1/7] chore: add material3 expressive theme --- gradle/libs.versions.toml | 1 + shared/build.gradle.kts | 1 + .../moneyflow/navigation/MoneyFlowNavHost.kt | 30 +-- .../addtransaction/AddTransactionScreen.kt | 19 +- .../categories/CategoriesScreen.kt | 6 +- .../categories/components/CategoryCard.kt | 12 +- .../moneyflow/ui/components/ErrorView.kt | 6 +- .../ui/components/HideableTextField.kt | 6 +- .../prof18/moneyflow/ui/components/Loader.kt | 4 +- .../moneyflow/ui/components/MFTopBar.kt | 23 +- .../moneyflow/ui/components/SwitchWithText.kt | 8 +- .../com/prof18/moneyflow/ui/style/Color.kt | 197 ++++++++++++------ .../com/prof18/moneyflow/ui/style/Shape.kt | 17 +- .../com/prof18/moneyflow/ui/style/Theme.kt | 125 +++++++---- .../prof18/moneyflow/ui/style/Typography.kt | 66 ++++-- 15 files changed, 334 insertions(+), 187 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 258cc370..f0c67227 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -59,6 +59,7 @@ kotlinx-coroutine-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-co kotlinx-coroutine-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-date-time" } compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose" } +compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose" } compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "composeMaterialIconsExtended" } compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" } russhwolf-multiplatform-settings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatform-settings" } diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 7455a601..5a796ce6 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -53,6 +53,7 @@ kotlin { dependencies { api(libs.compose.runtime) api(libs.compose.foundation) + api(libs.compose.material3) api(libs.compose.material) api(libs.compose.material.icons.extended) api(libs.compose.ui) diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt index 4202ab41..1b4c2d5d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt @@ -6,12 +6,13 @@ import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.safeDrawing import androidx.compose.foundation.layout.size -import androidx.compose.material.BottomNavigation -import androidx.compose.material.BottomNavigationItem -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Scaffold -import androidx.compose.material.Text +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.NavigationBar +import androidx.compose.material3.NavigationBarItem +import androidx.compose.material3.NavigationBarItemDefaults +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.MutableState @@ -42,7 +43,6 @@ import com.prof18.moneyflow.presentation.categories.CategoriesScreen import com.prof18.moneyflow.presentation.categories.data.CategoryUIData import com.prof18.moneyflow.presentation.home.HomeScreen import com.prof18.moneyflow.presentation.settings.SettingsScreen -import com.prof18.moneyflow.ui.style.LightAppColors import com.prof18.moneyflow.utils.LocalAppDensity import com.prof18.moneyflow.utils.LocalAppLocale import com.prof18.moneyflow.utils.LocalAppTheme @@ -112,12 +112,12 @@ private fun BottomBar( onNavigate: (AppRoute) -> Unit, ) { if (currentRoute !is HomeRoute && currentRoute !is SettingsRoute) return - BottomNavigation( - backgroundColor = MaterialTheme.colors.primary, - contentColor = MaterialTheme.colors.onPrimary, + NavigationBar( + containerColor = MaterialTheme.colorScheme.surface, + contentColor = MaterialTheme.colorScheme.onSurface, ) { bottomNavigationItems.forEach { item -> - BottomNavigationItem( + NavigationBarItem( icon = { Icon( painter = painterResource(item.drawableRes), @@ -127,8 +127,14 @@ private fun BottomBar( }, label = { Text(stringResource(item.titleRes)) }, selected = currentRoute::class == item.route::class, - unselectedContentColor = LightAppColors.lightGrey.copy(alpha = 0.3f), onClick = { if (currentRoute::class != item.route::class) onNavigate(item.route) }, + colors = NavigationBarItemDefaults.colors( + selectedIconColor = MaterialTheme.colorScheme.onPrimaryContainer, + selectedTextColor = MaterialTheme.colorScheme.onPrimaryContainer, + indicatorColor = MaterialTheme.colorScheme.primaryContainer, + unselectedIconColor = MaterialTheme.colorScheme.onSurfaceVariant, + unselectedTextColor = MaterialTheme.colorScheme.onSurfaceVariant, + ), ) } } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt index 416c2964..5e52b079 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt @@ -4,11 +4,12 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Scaffold -import androidx.compose.material.Surface -import androidx.compose.material.rememberScaffoldState +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.SnackbarHost +import androidx.compose.material3.SnackbarHostState +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.State @@ -66,7 +67,7 @@ internal fun AddTransactionScreen( ) { val (showDatePickerDialog, setShowedDatePickerDialog) = remember { mutableStateOf(false) } - val scaffoldState = rememberScaffoldState() + val snackbarHostState = remember { SnackbarHostState() } addTransactionAction?.let { when (it) { is AddTransactionAction.GoBack -> { @@ -86,7 +87,7 @@ internal fun AddTransactionScreen( } else { "" } - LaunchedEffect(scaffoldState.snackbarHostState, resetAction) { + LaunchedEffect(snackbarHostState, resetAction) { val message = buildString { append(messageText) if (nerdText.isNotBlank()) { @@ -94,7 +95,7 @@ internal fun AddTransactionScreen( append(nerdText) } } - scaffoldState.snackbarHostState.showSnackbar(message) + snackbarHostState.showSnackbar(message) resetAction() } } @@ -105,7 +106,7 @@ internal fun AddTransactionScreen( Scaffold( modifier = Modifier.padding(paddingValues), - scaffoldState = scaffoldState, + snackbarHost = { SnackbarHost(hostState = snackbarHostState) }, topBar = { MFTopBar( topAppBarText = stringResource(Res.string.add_transaction_screen), diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt index aab5e74b..900bcfd8 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt @@ -4,9 +4,9 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material.Divider -import androidx.compose.material.Scaffold -import androidx.compose.material.Surface +import androidx.compose.material3.Divider +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt index a166b92e..eb61cffc 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt @@ -8,10 +8,10 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -45,7 +45,7 @@ internal fun CategoryCard( Margins.regular, ) .background( - MaterialTheme.colors.primary, + MaterialTheme.colorScheme.primary, shape = RoundedCornerShape(Margins.regularCornerRadius), ), ) { @@ -55,7 +55,7 @@ internal fun CategoryCard( modifier = Modifier .padding(Margins.small) .size(28.dp), - tint = MaterialTheme.colors.onPrimary, + tint = MaterialTheme.colorScheme.onPrimary, ) } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt index b74d7d4b..aebd54b1 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt @@ -5,9 +5,9 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt index 23d851a4..1f7a294b 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt @@ -1,8 +1,8 @@ package com.prof18.moneyflow.ui.components -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt index 355d88d2..2246e46d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt @@ -2,8 +2,8 @@ package com.prof18.moneyflow.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.CircularProgressIndicator -import androidx.compose.material.Surface +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt index e9c98a1d..031a6a16 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt @@ -2,14 +2,15 @@ package com.prof18.moneyflow.ui.components import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.width -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.material.TextButton -import androidx.compose.material.TopAppBar import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Close +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.TopAppBar +import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview @@ -23,7 +24,7 @@ internal fun MFTopBar( onBackPressed: (() -> Unit)? = null, onActionClicked: (() -> Unit)? = null, actionEnabled: Boolean = true, -) { + ) { TopAppBar( title = { Text( @@ -54,8 +55,12 @@ internal fun MFTopBar( } } }, - backgroundColor = MaterialTheme.colors.background, - elevation = 0.dp, + colors = TopAppBarDefaults.topAppBarColors( + containerColor = MaterialTheme.colorScheme.surface, + navigationIconContentColor = MaterialTheme.colorScheme.onSurface, + titleContentColor = MaterialTheme.colorScheme.onSurface, + actionIconContentColor = MaterialTheme.colorScheme.onSurface, + ), ) } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt index 2de5a2c9..b9d5979c 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt @@ -4,10 +4,10 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Switch -import androidx.compose.material.Text +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Switch +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt index 0f76bda2..cea0bd71 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt @@ -1,74 +1,133 @@ package com.prof18.moneyflow.ui.style +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.lightColorScheme import androidx.compose.ui.graphics.Color -internal object LightAppColors { - - val primary = Color(0XFF3E6275) - val lightGrey = Color(0XFFF8F5F5) - val background = Color(0xFFFAFAFA) - - val red1 = Color(0xFFFF464F) - val red2 = Color(0xFFFF575F) - val red3 = Color(0xFFFFE5E7) - - val orange1 = Color(0xFFFF8A34) - val orange2 = Color(0xFFFF974A) - val orange3 = Color(0xFFFFEFE3) - - val yellow1 = Color(0xFFFFBC25) - val yellow2 = Color(0xFFFFC542) - val yellow3 = Color(0xFFFEF3D9) - - val green1 = Color(0xFF25C685) - val green2 = Color(0xFF3DD598) - val green3 = Color(0xFFD4F5E9) - - val blue1 = Color(0xFF005DF2) - val blue2 = Color(0xFF0062FF) - val blue3 = Color(0xFFE3EEFF) - - val purple1 = Color(0xFF6952DC) - val purple2 = Color(0xFF755FE2) - val purple3 = Color(0xFFEDEAFD) - - val gray1 = Color(0xFF1A3B34) - val gray2 = Color(0xFF899A96) - val gray3 = Color(0xFFE4E9F3) - val gray4 = Color(0xFFEDF1FA) -} - -object DarkAppColors { - - val primary = Color(0xFF2C4653) - val backgroundColor = Color(0XFF303030) - - val red1 = Color(0xFFFF464F) - val red2 = Color(0xFFFF575F) - val red3 = Color(0xFF623A42) - - val orange1 = Color(0xFFFF8A34) - val orange2 = Color(0xFFFF974A) - val orange3 = Color(0xFF624D3B) - - val yellow1 = Color(0xFFFFBC25) - val yellow2 = Color(0xFFFFC542) - val yellow3 = Color(0xFF625B39) - - val green1 = Color(0xFF25C685) - val green2 = Color(0xFF3DD598) - val green3 = Color(0xFF286053) - - val blue1 = Color(0xFF005DF2) - val blue2 = Color(0xFF0062FF) - val blue3 = Color(0xFF163E72) - - val purple1 = Color(0xFF6952DC) - val purple2 = Color(0xFF755FE2) - val purple3 = Color(0xFF393D69) - - val gray1 = Color(0xFFFFFFFF) - val gray2 = Color(0xFF96A7AF) - val gray3 = Color(0xFF475E69) - val gray4 = Color(0xFF30444E) +private val PrimaryPurple = Color(0xFF4E5DDE) +private val OnPrimaryPurple = Color(0xFFFFFFFF) +private val PrimaryContainer = Color(0xFFE0E0FF) +private val OnPrimaryContainer = Color(0xFF10136B) + +private val SecondaryTeal = Color(0xFF00A284) +private val OnSecondaryTeal = Color(0xFFFFFFFF) +private val SecondaryContainer = Color(0xFFB5FFE7) +private val OnSecondaryContainer = Color(0xFF002019) + +private val TertiaryMagenta = Color(0xFFB02F6E) +private val OnTertiaryMagenta = Color(0xFFFFFFFF) +private val TertiaryContainer = Color(0xFFFFD7E8) +private val OnTertiaryContainer = Color(0xFF3E0025) + +private val ExpressiveSurface = Color(0xFFFBF8FF) +private val ExpressiveSurfaceVariant = Color(0xFFE3E1EC) +private val ExpressiveOnSurface = Color(0xFF1B1B23) +private val ExpressiveOnSurfaceVariant = Color(0xFF46464F) +private val ExpressiveOutline = Color(0xFF777680) +private val ExpressiveOutlineVariant = Color(0xFFC7C6D0) + +private val InverseSurface = Color(0xFF302F37) +private val InverseOnSurface = Color(0xFFF1EFF7) +private val InversePrimary = Color(0xFFBEC2FF) + +private val DarkPrimary = Color(0xFFBEC2FF) +private val DarkOnPrimary = Color(0xFF1D2275) +private val DarkPrimaryContainer = Color(0xFF353C9C) +private val DarkOnPrimaryContainer = Color(0xFFE0E0FF) + +private val DarkSecondary = Color(0xFF5CD3BE) +private val DarkOnSecondary = Color(0xFF00382C) +private val DarkSecondaryContainer = Color(0xFF005142) +private val DarkOnSecondaryContainer = Color(0xFFB5FFE7) + +private val DarkTertiary = Color(0xFFFFA3D3) +private val DarkOnTertiary = Color(0xFF5E113D) +private val DarkTertiaryContainer = Color(0xFF7B2955) +private val DarkOnTertiaryContainer = Color(0xFFFFD7E8) + +private val DarkSurface = Color(0xFF12131A) +private val DarkOnSurface = Color(0xFFE3E1EB) +private val DarkSurfaceVariant = Color(0xFF46464F) +private val DarkOnSurfaceVariant = Color(0xFFC7C6D0) +private val DarkOutline = Color(0xFF91909A) + +private val DarkInverseSurface = Color(0xFFE3E1EB) +private val DarkInverseOnSurface = Color(0xFF1B1B23) +private val DarkInversePrimary = Color(0xFF4E5DDE) + +internal val expressiveLightColorScheme = lightColorScheme( + primary = PrimaryPurple, + onPrimary = OnPrimaryPurple, + primaryContainer = PrimaryContainer, + onPrimaryContainer = OnPrimaryContainer, + inversePrimary = InversePrimary, + secondary = SecondaryTeal, + onSecondary = OnSecondaryTeal, + secondaryContainer = SecondaryContainer, + onSecondaryContainer = OnSecondaryContainer, + tertiary = TertiaryMagenta, + onTertiary = OnTertiaryMagenta, + tertiaryContainer = TertiaryContainer, + onTertiaryContainer = OnTertiaryContainer, + background = ExpressiveSurface, + onBackground = ExpressiveOnSurface, + surface = ExpressiveSurface, + onSurface = ExpressiveOnSurface, + surfaceVariant = ExpressiveSurfaceVariant, + onSurfaceVariant = ExpressiveOnSurfaceVariant, + surfaceTint = PrimaryPurple, + inverseSurface = InverseSurface, + inverseOnSurface = InverseOnSurface, + error = Color(0xFFBA1A1A), + onError = Color(0xFFFFFFFF), + errorContainer = Color(0xFFFFDAD6), + onErrorContainer = Color(0xFF410002), + outline = ExpressiveOutline, + outlineVariant = ExpressiveOutlineVariant, + scrim = Color(0xFF000000), +) + +internal val expressiveDarkColorScheme = darkColorScheme( + primary = DarkPrimary, + onPrimary = DarkOnPrimary, + primaryContainer = DarkPrimaryContainer, + onPrimaryContainer = DarkOnPrimaryContainer, + inversePrimary = DarkInversePrimary, + secondary = DarkSecondary, + onSecondary = DarkOnSecondary, + secondaryContainer = DarkSecondaryContainer, + onSecondaryContainer = DarkOnSecondaryContainer, + tertiary = DarkTertiary, + onTertiary = DarkOnTertiary, + tertiaryContainer = DarkTertiaryContainer, + onTertiaryContainer = DarkOnTertiaryContainer, + background = DarkSurface, + onBackground = DarkOnSurface, + surface = DarkSurface, + onSurface = DarkOnSurface, + surfaceVariant = DarkSurfaceVariant, + onSurfaceVariant = DarkOnSurfaceVariant, + surfaceTint = DarkPrimary, + inverseSurface = DarkInverseSurface, + inverseOnSurface = DarkInverseOnSurface, + error = Color(0xFFFFB4AB), + onError = Color(0xFF690005), + errorContainer = Color(0xFF93000A), + onErrorContainer = Color(0xFFFFDAD6), + outline = DarkOutline, + outlineVariant = DarkSurfaceVariant, + scrim = Color(0xFF000000), +) + +internal object ExpressiveExtendedColors { + val positive = Color(0xFF24C38E) + val positiveContainer = Color(0xFFBDF4DC) + val positiveOnContainer = Color(0xFF002116) + + val negative = Color(0xFFFF5370) + val negativeContainer = Color(0xFFFFDAD7) + val negativeOnContainer = Color(0xFF410006) + + val neutralOnSurface = ExpressiveOnSurface + val neutralSurfaceVariant = ExpressiveSurfaceVariant } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt index b369666d..c1ac2b6c 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt @@ -1,11 +1,20 @@ package com.prof18.moneyflow.ui.style import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Shapes +import androidx.compose.material3.Shapes +import androidx.compose.material.Shapes as Material2Shapes import androidx.compose.ui.unit.dp internal val MoneyFlowShapes = Shapes( - small = RoundedCornerShape(4.dp), - medium = RoundedCornerShape(8.dp), - large = RoundedCornerShape(16.dp), + extraSmall = RoundedCornerShape(8.dp), + small = RoundedCornerShape(12.dp), + medium = RoundedCornerShape(16.dp), + large = RoundedCornerShape(20.dp), + extraLarge = RoundedCornerShape(28.dp), +) + +internal val MoneyFlowLegacyShapes = Material2Shapes( + small = RoundedCornerShape(8.dp), + medium = RoundedCornerShape(16.dp), + large = RoundedCornerShape(20.dp), ) diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt index 4e3cb520..ccdacf5d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt @@ -1,67 +1,106 @@ package com.prof18.moneyflow.ui.style import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.MaterialTheme +import androidx.compose.material.MaterialTheme as Material2Theme import androidx.compose.material.darkColors import androidx.compose.material.lightColors +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color - -private val LightThemeColors = lightColors( - primary = LightAppColors.primary, -// primaryVariant = LightAppColors.green2, -// secondary = LightAppColors.yellow1, -// secondaryVariant = LightAppColors.yellow2, - - background = LightAppColors.background, -// surface = LightAppColors.gray4, - error = LightAppColors.red1, - - onPrimary = LightAppColors.lightGrey, - onSecondary = DarkAppColors.gray4, - onBackground = DarkAppColors.gray4, - onSurface = DarkAppColors.gray4, - onError = DarkAppColors.gray4, -) - -private val DarkThemeColors = darkColors( - primary = DarkAppColors.primary, -// primaryVariant = DarkAppColors.green2, -// secondary = DarkAppColors.yellow1, -// secondaryVariant = DarkAppColors.yellow2, - -// background = backgroundColorDark, -// surface = primaryBlueDark, // It's for example for the bottom bar - error = DarkAppColors.red1, - - onPrimary = LightAppColors.gray4, - onSecondary = LightAppColors.gray4, - onBackground = LightAppColors.gray4, - onSurface = LightAppColors.gray4, - onError = LightAppColors.gray4, -) +import androidx.compose.ui.text.TextStyle @Composable -internal fun upArrowCircleColor(): Color = if (isSystemInDarkTheme()) DarkAppColors.green3 else LightAppColors.green3 +internal fun upArrowCircleColor(): Color = if (isSystemInDarkTheme()) { + ExpressiveExtendedColors.positiveContainer +} else { + ExpressiveExtendedColors.positiveContainer +} @Composable -internal fun upArrowColor(): Color = if (isSystemInDarkTheme()) LightAppColors.green3 else LightAppColors.green1 +internal fun upArrowColor(): Color = if (isSystemInDarkTheme()) { + ExpressiveExtendedColors.positiveOnContainer +} else { + ExpressiveExtendedColors.positive +} @Composable -internal fun downArrowCircleColor(): Color = if (isSystemInDarkTheme()) DarkAppColors.red3 else LightAppColors.red3 +internal fun downArrowCircleColor(): Color = if (isSystemInDarkTheme()) { + ExpressiveExtendedColors.negativeContainer +} else { + ExpressiveExtendedColors.negativeContainer +} @Composable -internal fun downArrowColor(): Color = if (isSystemInDarkTheme()) LightAppColors.red3 else LightAppColors.red1 +internal fun downArrowColor(): Color = if (isSystemInDarkTheme()) { + ExpressiveExtendedColors.negativeOnContainer +} else { + ExpressiveExtendedColors.negative +} @Composable fun MoneyFlowTheme( darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit, ) { + val colorScheme = if (darkTheme) expressiveDarkColorScheme else expressiveLightColorScheme + val typography = moneyFlowTypography() + + val materialColors = if (darkTheme) { + darkColors( + primary = colorScheme.primary, + primaryVariant = colorScheme.primaryContainer, + secondary = colorScheme.secondary, + background = colorScheme.background, + surface = colorScheme.surface, + error = colorScheme.error, + onPrimary = colorScheme.onPrimary, + onSecondary = colorScheme.onSecondary, + onBackground = colorScheme.onBackground, + onSurface = colorScheme.onSurface, + onError = colorScheme.onError, + ) + } else { + lightColors( + primary = colorScheme.primary, + primaryVariant = colorScheme.primaryContainer, + secondary = colorScheme.secondary, + background = colorScheme.background, + surface = colorScheme.surface, + error = colorScheme.error, + onPrimary = colorScheme.onPrimary, + onSecondary = colorScheme.onSecondary, + onBackground = colorScheme.onBackground, + onSurface = colorScheme.onSurface, + onError = colorScheme.onError, + ) + } + + val materialTypography = androidx.compose.material.Typography( + h1 = typography.h1, + h2 = typography.h2, + h3 = typography.h3, + h4 = typography.h4, + h5 = typography.h5, + h6 = typography.h6, + subtitle1 = typography.subtitle1, + subtitle2 = typography.subtitle2, + body1 = typography.body1, + body2 = typography.body2, + button = typography.button, + caption = typography.caption, + overline = typography.overline, + ) + MaterialTheme( - colors = if (darkTheme) DarkThemeColors else LightThemeColors, - typography = moneyFlowTypography(), + colorScheme = colorScheme, + typography = typography, shapes = MoneyFlowShapes, - content = content, - ) + ) { + Material2Theme( + colors = materialColors, + typography = materialTypography, + shapes = MoneyFlowLegacyShapes, + content = content, + ) + } } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt index c14cbfbd..f6cd61d0 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt @@ -1,6 +1,6 @@ package com.prof18.moneyflow.ui.style -import androidx.compose.material.Typography +import androidx.compose.material3.Typography import androidx.compose.runtime.Composable import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily @@ -23,83 +23,109 @@ internal fun moneyFlowTypography(): Typography { ) return Typography( - h1 = TextStyle( + displayLarge = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Light, fontSize = 96.sp, letterSpacing = (-1.5).sp, ), - h2 = TextStyle( + displayMedium = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Light, fontSize = 60.sp, letterSpacing = (-0.5).sp, ), - h3 = TextStyle( + displaySmall = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 48.sp, letterSpacing = 0.sp, ), - h4 = TextStyle( + headlineLarge = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 34.sp, letterSpacing = 0.25.sp, ), - h5 = TextStyle( + headlineMedium = TextStyle( + fontFamily = poppins, + fontWeight = FontWeight.Normal, + fontSize = 28.sp, + letterSpacing = 0.15.sp, + ), + headlineSmall = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 24.sp, letterSpacing = 0.sp, ), - h6 = TextStyle( + titleLarge = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, - fontSize = 20.sp, + fontSize = 22.sp, letterSpacing = 0.15.sp, ), - subtitle1 = TextStyle( + titleMedium = TextStyle( fontFamily = poppins, fontWeight = FontWeight.SemiBold, fontSize = 16.sp, letterSpacing = 0.15.sp, ), - subtitle2 = TextStyle( + titleSmall = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Light, fontSize = 16.sp, letterSpacing = 0.1.sp, ), - body1 = TextStyle( + bodyLarge = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 16.sp, letterSpacing = 0.5.sp, ), - body2 = TextStyle( + bodyMedium = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 14.sp, letterSpacing = 0.25.sp, ), - button = TextStyle( + bodySmall = TextStyle( + fontFamily = poppins, + fontWeight = FontWeight.Normal, + fontSize = 12.sp, + letterSpacing = 0.4.sp, + ), + labelLarge = TextStyle( fontFamily = poppins, fontWeight = FontWeight.SemiBold, fontSize = 14.sp, letterSpacing = 1.25.sp, ), - caption = TextStyle( + labelMedium = TextStyle( fontFamily = poppins, - fontWeight = FontWeight.ExtraLight, + fontWeight = FontWeight.Normal, fontSize = 12.sp, - letterSpacing = 0.4.sp, + letterSpacing = 0.5.sp, ), - overline = TextStyle( + labelSmall = TextStyle( fontFamily = poppins, - fontWeight = FontWeight.Normal, - fontSize = 10.sp, - letterSpacing = 1.5.sp, + fontWeight = FontWeight.SemiBold, + fontSize = 11.sp, + letterSpacing = 0.4.sp, ), ) } + +val Typography.h1: TextStyle get() = displayLarge +val Typography.h2: TextStyle get() = displayMedium +val Typography.h3: TextStyle get() = displaySmall +val Typography.h4: TextStyle get() = headlineLarge +val Typography.h5: TextStyle get() = headlineSmall +val Typography.h6: TextStyle get() = titleLarge +val Typography.subtitle1: TextStyle get() = titleMedium +val Typography.subtitle2: TextStyle get() = titleSmall +val Typography.body1: TextStyle get() = bodyLarge +val Typography.body2: TextStyle get() = bodyMedium +val Typography.button: TextStyle get() = labelLarge +val Typography.caption: TextStyle get() = bodySmall +val Typography.overline: TextStyle get() = labelSmall From e0dfd898e1204cecd95961e38e67585016588e92 Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Sun, 7 Dec 2025 19:17:30 +0100 Subject: [PATCH 2/7] fix: pin compose versions to released artifacts --- gradle/libs.versions.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f0c67227..d075b27d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,8 +7,8 @@ androidx-test = "1.7.0" androidx-test-runner = "1.7.0" androidx-test-ext = "1.3.0" biometric = "1.2.0-alpha05" -compose = "1.10.0-beta02" -compose-androidx = "1.9.5" +compose = "1.7.3" +compose-androidx = "1.7.3" immutable-collections = "0.4.0" coroutines = "1.10.2" agp = "8.10.1" @@ -17,7 +17,7 @@ detekt-compose-rules = "0.4.28" java = "21" kermit = "2.0.8" koin = "4.1.1" -kotlin = "2.2.20" +kotlin = "2.0.21" kotlinx-date-time = "0.6.1" composeMaterialIconsExtended = "1.7.3" multiplatform-settings = "1.3.0" From 586aa60f55632fa096a603e90d10520b01138eab Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Sun, 7 Dec 2025 19:17:36 +0100 Subject: [PATCH 3/7] Set material3 version to 1.5.0-alpha09 --- gradle/libs.versions.toml | 9 +- shared/build.gradle.kts | 1 - .../moneyflow/navigation/MoneyFlowNavHost.kt | 30 ++- .../addtransaction/AddTransactionScreen.kt | 19 +- .../categories/CategoriesScreen.kt | 6 +- .../categories/components/CategoryCard.kt | 12 +- .../moneyflow/ui/components/ErrorView.kt | 6 +- .../ui/components/HideableTextField.kt | 6 +- .../prof18/moneyflow/ui/components/Loader.kt | 4 +- .../moneyflow/ui/components/MFTopBar.kt | 23 +- .../moneyflow/ui/components/SwitchWithText.kt | 8 +- .../com/prof18/moneyflow/ui/style/Color.kt | 197 ++++++------------ .../com/prof18/moneyflow/ui/style/Shape.kt | 17 +- .../com/prof18/moneyflow/ui/style/Theme.kt | 125 ++++------- .../prof18/moneyflow/ui/style/Typography.kt | 66 ++---- 15 files changed, 191 insertions(+), 338 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d075b27d..dff3eb40 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,8 +7,8 @@ androidx-test = "1.7.0" androidx-test-runner = "1.7.0" androidx-test-ext = "1.3.0" biometric = "1.2.0-alpha05" -compose = "1.7.3" -compose-androidx = "1.7.3" +compose = "1.5.0-alpha09" +compose-androidx = "1.5.0-alpha09" immutable-collections = "0.4.0" coroutines = "1.10.2" agp = "8.10.1" @@ -17,9 +17,9 @@ detekt-compose-rules = "0.4.28" java = "21" kermit = "2.0.8" koin = "4.1.1" -kotlin = "2.0.21" +kotlin = "2.2.20" kotlinx-date-time = "0.6.1" -composeMaterialIconsExtended = "1.7.3" +composeMaterialIconsExtended = "1.5.0-alpha09" multiplatform-settings = "1.3.0" lifecycle-navigation3 = "2.10.0-alpha05" navigation3 = "1.0.0-alpha05" @@ -59,7 +59,6 @@ kotlinx-coroutine-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-co kotlinx-coroutine-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-date-time" } compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose" } -compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose" } compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "composeMaterialIconsExtended" } compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" } russhwolf-multiplatform-settings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatform-settings" } diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 5a796ce6..7455a601 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -53,7 +53,6 @@ kotlin { dependencies { api(libs.compose.runtime) api(libs.compose.foundation) - api(libs.compose.material3) api(libs.compose.material) api(libs.compose.material.icons.extended) api(libs.compose.ui) diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt index 1b4c2d5d..4202ab41 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt @@ -6,13 +6,12 @@ import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.safeDrawing import androidx.compose.foundation.layout.size -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.NavigationBar -import androidx.compose.material3.NavigationBarItem -import androidx.compose.material3.NavigationBarItemDefaults -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text +import androidx.compose.material.BottomNavigation +import androidx.compose.material.BottomNavigationItem +import androidx.compose.material.Icon +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Scaffold +import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.MutableState @@ -43,6 +42,7 @@ import com.prof18.moneyflow.presentation.categories.CategoriesScreen import com.prof18.moneyflow.presentation.categories.data.CategoryUIData import com.prof18.moneyflow.presentation.home.HomeScreen import com.prof18.moneyflow.presentation.settings.SettingsScreen +import com.prof18.moneyflow.ui.style.LightAppColors import com.prof18.moneyflow.utils.LocalAppDensity import com.prof18.moneyflow.utils.LocalAppLocale import com.prof18.moneyflow.utils.LocalAppTheme @@ -112,12 +112,12 @@ private fun BottomBar( onNavigate: (AppRoute) -> Unit, ) { if (currentRoute !is HomeRoute && currentRoute !is SettingsRoute) return - NavigationBar( - containerColor = MaterialTheme.colorScheme.surface, - contentColor = MaterialTheme.colorScheme.onSurface, + BottomNavigation( + backgroundColor = MaterialTheme.colors.primary, + contentColor = MaterialTheme.colors.onPrimary, ) { bottomNavigationItems.forEach { item -> - NavigationBarItem( + BottomNavigationItem( icon = { Icon( painter = painterResource(item.drawableRes), @@ -127,14 +127,8 @@ private fun BottomBar( }, label = { Text(stringResource(item.titleRes)) }, selected = currentRoute::class == item.route::class, + unselectedContentColor = LightAppColors.lightGrey.copy(alpha = 0.3f), onClick = { if (currentRoute::class != item.route::class) onNavigate(item.route) }, - colors = NavigationBarItemDefaults.colors( - selectedIconColor = MaterialTheme.colorScheme.onPrimaryContainer, - selectedTextColor = MaterialTheme.colorScheme.onPrimaryContainer, - indicatorColor = MaterialTheme.colorScheme.primaryContainer, - unselectedIconColor = MaterialTheme.colorScheme.onSurfaceVariant, - unselectedTextColor = MaterialTheme.colorScheme.onSurfaceVariant, - ), ) } } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt index 5e52b079..416c2964 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt @@ -4,12 +4,11 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Scaffold -import androidx.compose.material3.SnackbarHost -import androidx.compose.material3.SnackbarHostState -import androidx.compose.material3.Surface +import androidx.compose.material.Icon +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Scaffold +import androidx.compose.material.Surface +import androidx.compose.material.rememberScaffoldState import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.State @@ -67,7 +66,7 @@ internal fun AddTransactionScreen( ) { val (showDatePickerDialog, setShowedDatePickerDialog) = remember { mutableStateOf(false) } - val snackbarHostState = remember { SnackbarHostState() } + val scaffoldState = rememberScaffoldState() addTransactionAction?.let { when (it) { is AddTransactionAction.GoBack -> { @@ -87,7 +86,7 @@ internal fun AddTransactionScreen( } else { "" } - LaunchedEffect(snackbarHostState, resetAction) { + LaunchedEffect(scaffoldState.snackbarHostState, resetAction) { val message = buildString { append(messageText) if (nerdText.isNotBlank()) { @@ -95,7 +94,7 @@ internal fun AddTransactionScreen( append(nerdText) } } - snackbarHostState.showSnackbar(message) + scaffoldState.snackbarHostState.showSnackbar(message) resetAction() } } @@ -106,7 +105,7 @@ internal fun AddTransactionScreen( Scaffold( modifier = Modifier.padding(paddingValues), - snackbarHost = { SnackbarHost(hostState = snackbarHostState) }, + scaffoldState = scaffoldState, topBar = { MFTopBar( topAppBarText = stringResource(Res.string.add_transaction_screen), diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt index 900bcfd8..aab5e74b 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt @@ -4,9 +4,9 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material3.Divider -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Surface +import androidx.compose.material.Divider +import androidx.compose.material.Scaffold +import androidx.compose.material.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt index eb61cffc..a166b92e 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt @@ -8,10 +8,10 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text +import androidx.compose.material.Icon +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Surface +import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -45,7 +45,7 @@ internal fun CategoryCard( Margins.regular, ) .background( - MaterialTheme.colorScheme.primary, + MaterialTheme.colors.primary, shape = RoundedCornerShape(Margins.regularCornerRadius), ), ) { @@ -55,7 +55,7 @@ internal fun CategoryCard( modifier = Modifier .padding(Margins.small) .size(28.dp), - tint = MaterialTheme.colorScheme.onPrimary, + tint = MaterialTheme.colors.onPrimary, ) } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt index aebd54b1..b74d7d4b 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt @@ -5,9 +5,9 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Surface +import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt index 1f7a294b..23d851a4 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt @@ -1,8 +1,8 @@ package com.prof18.moneyflow.ui.components -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Surface +import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt index 2246e46d..355d88d2 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt @@ -2,8 +2,8 @@ package com.prof18.moneyflow.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.Surface +import androidx.compose.material.CircularProgressIndicator +import androidx.compose.material.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt index 031a6a16..e9c98a1d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt @@ -2,15 +2,14 @@ package com.prof18.moneyflow.ui.components import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.width +import androidx.compose.material.Icon +import androidx.compose.material.IconButton +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Text +import androidx.compose.material.TextButton +import androidx.compose.material.TopAppBar import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Close -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text -import androidx.compose.material3.TextButton -import androidx.compose.material3.TopAppBar -import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview @@ -24,7 +23,7 @@ internal fun MFTopBar( onBackPressed: (() -> Unit)? = null, onActionClicked: (() -> Unit)? = null, actionEnabled: Boolean = true, - ) { +) { TopAppBar( title = { Text( @@ -55,12 +54,8 @@ internal fun MFTopBar( } } }, - colors = TopAppBarDefaults.topAppBarColors( - containerColor = MaterialTheme.colorScheme.surface, - navigationIconContentColor = MaterialTheme.colorScheme.onSurface, - titleContentColor = MaterialTheme.colorScheme.onSurface, - actionIconContentColor = MaterialTheme.colorScheme.onSurface, - ), + backgroundColor = MaterialTheme.colors.background, + elevation = 0.dp, ) } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt index b9d5979c..2de5a2c9 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt @@ -4,10 +4,10 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Switch -import androidx.compose.material3.Text +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Surface +import androidx.compose.material.Switch +import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt index cea0bd71..0f76bda2 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Color.kt @@ -1,133 +1,74 @@ package com.prof18.moneyflow.ui.style -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.lightColorScheme import androidx.compose.ui.graphics.Color -private val PrimaryPurple = Color(0xFF4E5DDE) -private val OnPrimaryPurple = Color(0xFFFFFFFF) -private val PrimaryContainer = Color(0xFFE0E0FF) -private val OnPrimaryContainer = Color(0xFF10136B) - -private val SecondaryTeal = Color(0xFF00A284) -private val OnSecondaryTeal = Color(0xFFFFFFFF) -private val SecondaryContainer = Color(0xFFB5FFE7) -private val OnSecondaryContainer = Color(0xFF002019) - -private val TertiaryMagenta = Color(0xFFB02F6E) -private val OnTertiaryMagenta = Color(0xFFFFFFFF) -private val TertiaryContainer = Color(0xFFFFD7E8) -private val OnTertiaryContainer = Color(0xFF3E0025) - -private val ExpressiveSurface = Color(0xFFFBF8FF) -private val ExpressiveSurfaceVariant = Color(0xFFE3E1EC) -private val ExpressiveOnSurface = Color(0xFF1B1B23) -private val ExpressiveOnSurfaceVariant = Color(0xFF46464F) -private val ExpressiveOutline = Color(0xFF777680) -private val ExpressiveOutlineVariant = Color(0xFFC7C6D0) - -private val InverseSurface = Color(0xFF302F37) -private val InverseOnSurface = Color(0xFFF1EFF7) -private val InversePrimary = Color(0xFFBEC2FF) - -private val DarkPrimary = Color(0xFFBEC2FF) -private val DarkOnPrimary = Color(0xFF1D2275) -private val DarkPrimaryContainer = Color(0xFF353C9C) -private val DarkOnPrimaryContainer = Color(0xFFE0E0FF) - -private val DarkSecondary = Color(0xFF5CD3BE) -private val DarkOnSecondary = Color(0xFF00382C) -private val DarkSecondaryContainer = Color(0xFF005142) -private val DarkOnSecondaryContainer = Color(0xFFB5FFE7) - -private val DarkTertiary = Color(0xFFFFA3D3) -private val DarkOnTertiary = Color(0xFF5E113D) -private val DarkTertiaryContainer = Color(0xFF7B2955) -private val DarkOnTertiaryContainer = Color(0xFFFFD7E8) - -private val DarkSurface = Color(0xFF12131A) -private val DarkOnSurface = Color(0xFFE3E1EB) -private val DarkSurfaceVariant = Color(0xFF46464F) -private val DarkOnSurfaceVariant = Color(0xFFC7C6D0) -private val DarkOutline = Color(0xFF91909A) - -private val DarkInverseSurface = Color(0xFFE3E1EB) -private val DarkInverseOnSurface = Color(0xFF1B1B23) -private val DarkInversePrimary = Color(0xFF4E5DDE) - -internal val expressiveLightColorScheme = lightColorScheme( - primary = PrimaryPurple, - onPrimary = OnPrimaryPurple, - primaryContainer = PrimaryContainer, - onPrimaryContainer = OnPrimaryContainer, - inversePrimary = InversePrimary, - secondary = SecondaryTeal, - onSecondary = OnSecondaryTeal, - secondaryContainer = SecondaryContainer, - onSecondaryContainer = OnSecondaryContainer, - tertiary = TertiaryMagenta, - onTertiary = OnTertiaryMagenta, - tertiaryContainer = TertiaryContainer, - onTertiaryContainer = OnTertiaryContainer, - background = ExpressiveSurface, - onBackground = ExpressiveOnSurface, - surface = ExpressiveSurface, - onSurface = ExpressiveOnSurface, - surfaceVariant = ExpressiveSurfaceVariant, - onSurfaceVariant = ExpressiveOnSurfaceVariant, - surfaceTint = PrimaryPurple, - inverseSurface = InverseSurface, - inverseOnSurface = InverseOnSurface, - error = Color(0xFFBA1A1A), - onError = Color(0xFFFFFFFF), - errorContainer = Color(0xFFFFDAD6), - onErrorContainer = Color(0xFF410002), - outline = ExpressiveOutline, - outlineVariant = ExpressiveOutlineVariant, - scrim = Color(0xFF000000), -) - -internal val expressiveDarkColorScheme = darkColorScheme( - primary = DarkPrimary, - onPrimary = DarkOnPrimary, - primaryContainer = DarkPrimaryContainer, - onPrimaryContainer = DarkOnPrimaryContainer, - inversePrimary = DarkInversePrimary, - secondary = DarkSecondary, - onSecondary = DarkOnSecondary, - secondaryContainer = DarkSecondaryContainer, - onSecondaryContainer = DarkOnSecondaryContainer, - tertiary = DarkTertiary, - onTertiary = DarkOnTertiary, - tertiaryContainer = DarkTertiaryContainer, - onTertiaryContainer = DarkOnTertiaryContainer, - background = DarkSurface, - onBackground = DarkOnSurface, - surface = DarkSurface, - onSurface = DarkOnSurface, - surfaceVariant = DarkSurfaceVariant, - onSurfaceVariant = DarkOnSurfaceVariant, - surfaceTint = DarkPrimary, - inverseSurface = DarkInverseSurface, - inverseOnSurface = DarkInverseOnSurface, - error = Color(0xFFFFB4AB), - onError = Color(0xFF690005), - errorContainer = Color(0xFF93000A), - onErrorContainer = Color(0xFFFFDAD6), - outline = DarkOutline, - outlineVariant = DarkSurfaceVariant, - scrim = Color(0xFF000000), -) - -internal object ExpressiveExtendedColors { - val positive = Color(0xFF24C38E) - val positiveContainer = Color(0xFFBDF4DC) - val positiveOnContainer = Color(0xFF002116) - - val negative = Color(0xFFFF5370) - val negativeContainer = Color(0xFFFFDAD7) - val negativeOnContainer = Color(0xFF410006) - - val neutralOnSurface = ExpressiveOnSurface - val neutralSurfaceVariant = ExpressiveSurfaceVariant +internal object LightAppColors { + + val primary = Color(0XFF3E6275) + val lightGrey = Color(0XFFF8F5F5) + val background = Color(0xFFFAFAFA) + + val red1 = Color(0xFFFF464F) + val red2 = Color(0xFFFF575F) + val red3 = Color(0xFFFFE5E7) + + val orange1 = Color(0xFFFF8A34) + val orange2 = Color(0xFFFF974A) + val orange3 = Color(0xFFFFEFE3) + + val yellow1 = Color(0xFFFFBC25) + val yellow2 = Color(0xFFFFC542) + val yellow3 = Color(0xFFFEF3D9) + + val green1 = Color(0xFF25C685) + val green2 = Color(0xFF3DD598) + val green3 = Color(0xFFD4F5E9) + + val blue1 = Color(0xFF005DF2) + val blue2 = Color(0xFF0062FF) + val blue3 = Color(0xFFE3EEFF) + + val purple1 = Color(0xFF6952DC) + val purple2 = Color(0xFF755FE2) + val purple3 = Color(0xFFEDEAFD) + + val gray1 = Color(0xFF1A3B34) + val gray2 = Color(0xFF899A96) + val gray3 = Color(0xFFE4E9F3) + val gray4 = Color(0xFFEDF1FA) +} + +object DarkAppColors { + + val primary = Color(0xFF2C4653) + val backgroundColor = Color(0XFF303030) + + val red1 = Color(0xFFFF464F) + val red2 = Color(0xFFFF575F) + val red3 = Color(0xFF623A42) + + val orange1 = Color(0xFFFF8A34) + val orange2 = Color(0xFFFF974A) + val orange3 = Color(0xFF624D3B) + + val yellow1 = Color(0xFFFFBC25) + val yellow2 = Color(0xFFFFC542) + val yellow3 = Color(0xFF625B39) + + val green1 = Color(0xFF25C685) + val green2 = Color(0xFF3DD598) + val green3 = Color(0xFF286053) + + val blue1 = Color(0xFF005DF2) + val blue2 = Color(0xFF0062FF) + val blue3 = Color(0xFF163E72) + + val purple1 = Color(0xFF6952DC) + val purple2 = Color(0xFF755FE2) + val purple3 = Color(0xFF393D69) + + val gray1 = Color(0xFFFFFFFF) + val gray2 = Color(0xFF96A7AF) + val gray3 = Color(0xFF475E69) + val gray4 = Color(0xFF30444E) } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt index c1ac2b6c..b369666d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt @@ -1,20 +1,11 @@ package com.prof18.moneyflow.ui.style import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.Shapes -import androidx.compose.material.Shapes as Material2Shapes +import androidx.compose.material.Shapes import androidx.compose.ui.unit.dp internal val MoneyFlowShapes = Shapes( - extraSmall = RoundedCornerShape(8.dp), - small = RoundedCornerShape(12.dp), - medium = RoundedCornerShape(16.dp), - large = RoundedCornerShape(20.dp), - extraLarge = RoundedCornerShape(28.dp), -) - -internal val MoneyFlowLegacyShapes = Material2Shapes( - small = RoundedCornerShape(8.dp), - medium = RoundedCornerShape(16.dp), - large = RoundedCornerShape(20.dp), + small = RoundedCornerShape(4.dp), + medium = RoundedCornerShape(8.dp), + large = RoundedCornerShape(16.dp), ) diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt index ccdacf5d..4e3cb520 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt @@ -1,106 +1,67 @@ package com.prof18.moneyflow.ui.style import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.MaterialTheme as Material2Theme +import androidx.compose.material.MaterialTheme import androidx.compose.material.darkColors import androidx.compose.material.lightColors -import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle + +private val LightThemeColors = lightColors( + primary = LightAppColors.primary, +// primaryVariant = LightAppColors.green2, +// secondary = LightAppColors.yellow1, +// secondaryVariant = LightAppColors.yellow2, + + background = LightAppColors.background, +// surface = LightAppColors.gray4, + error = LightAppColors.red1, + + onPrimary = LightAppColors.lightGrey, + onSecondary = DarkAppColors.gray4, + onBackground = DarkAppColors.gray4, + onSurface = DarkAppColors.gray4, + onError = DarkAppColors.gray4, +) + +private val DarkThemeColors = darkColors( + primary = DarkAppColors.primary, +// primaryVariant = DarkAppColors.green2, +// secondary = DarkAppColors.yellow1, +// secondaryVariant = DarkAppColors.yellow2, + +// background = backgroundColorDark, +// surface = primaryBlueDark, // It's for example for the bottom bar + error = DarkAppColors.red1, + + onPrimary = LightAppColors.gray4, + onSecondary = LightAppColors.gray4, + onBackground = LightAppColors.gray4, + onSurface = LightAppColors.gray4, + onError = LightAppColors.gray4, +) @Composable -internal fun upArrowCircleColor(): Color = if (isSystemInDarkTheme()) { - ExpressiveExtendedColors.positiveContainer -} else { - ExpressiveExtendedColors.positiveContainer -} +internal fun upArrowCircleColor(): Color = if (isSystemInDarkTheme()) DarkAppColors.green3 else LightAppColors.green3 @Composable -internal fun upArrowColor(): Color = if (isSystemInDarkTheme()) { - ExpressiveExtendedColors.positiveOnContainer -} else { - ExpressiveExtendedColors.positive -} +internal fun upArrowColor(): Color = if (isSystemInDarkTheme()) LightAppColors.green3 else LightAppColors.green1 @Composable -internal fun downArrowCircleColor(): Color = if (isSystemInDarkTheme()) { - ExpressiveExtendedColors.negativeContainer -} else { - ExpressiveExtendedColors.negativeContainer -} +internal fun downArrowCircleColor(): Color = if (isSystemInDarkTheme()) DarkAppColors.red3 else LightAppColors.red3 @Composable -internal fun downArrowColor(): Color = if (isSystemInDarkTheme()) { - ExpressiveExtendedColors.negativeOnContainer -} else { - ExpressiveExtendedColors.negative -} +internal fun downArrowColor(): Color = if (isSystemInDarkTheme()) LightAppColors.red3 else LightAppColors.red1 @Composable fun MoneyFlowTheme( darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit, ) { - val colorScheme = if (darkTheme) expressiveDarkColorScheme else expressiveLightColorScheme - val typography = moneyFlowTypography() - - val materialColors = if (darkTheme) { - darkColors( - primary = colorScheme.primary, - primaryVariant = colorScheme.primaryContainer, - secondary = colorScheme.secondary, - background = colorScheme.background, - surface = colorScheme.surface, - error = colorScheme.error, - onPrimary = colorScheme.onPrimary, - onSecondary = colorScheme.onSecondary, - onBackground = colorScheme.onBackground, - onSurface = colorScheme.onSurface, - onError = colorScheme.onError, - ) - } else { - lightColors( - primary = colorScheme.primary, - primaryVariant = colorScheme.primaryContainer, - secondary = colorScheme.secondary, - background = colorScheme.background, - surface = colorScheme.surface, - error = colorScheme.error, - onPrimary = colorScheme.onPrimary, - onSecondary = colorScheme.onSecondary, - onBackground = colorScheme.onBackground, - onSurface = colorScheme.onSurface, - onError = colorScheme.onError, - ) - } - - val materialTypography = androidx.compose.material.Typography( - h1 = typography.h1, - h2 = typography.h2, - h3 = typography.h3, - h4 = typography.h4, - h5 = typography.h5, - h6 = typography.h6, - subtitle1 = typography.subtitle1, - subtitle2 = typography.subtitle2, - body1 = typography.body1, - body2 = typography.body2, - button = typography.button, - caption = typography.caption, - overline = typography.overline, - ) - MaterialTheme( - colorScheme = colorScheme, - typography = typography, + colors = if (darkTheme) DarkThemeColors else LightThemeColors, + typography = moneyFlowTypography(), shapes = MoneyFlowShapes, - ) { - Material2Theme( - colors = materialColors, - typography = materialTypography, - shapes = MoneyFlowLegacyShapes, - content = content, - ) - } + content = content, + ) } diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt index f6cd61d0..c14cbfbd 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt @@ -1,6 +1,6 @@ package com.prof18.moneyflow.ui.style -import androidx.compose.material3.Typography +import androidx.compose.material.Typography import androidx.compose.runtime.Composable import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily @@ -23,109 +23,83 @@ internal fun moneyFlowTypography(): Typography { ) return Typography( - displayLarge = TextStyle( + h1 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Light, fontSize = 96.sp, letterSpacing = (-1.5).sp, ), - displayMedium = TextStyle( + h2 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Light, fontSize = 60.sp, letterSpacing = (-0.5).sp, ), - displaySmall = TextStyle( + h3 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 48.sp, letterSpacing = 0.sp, ), - headlineLarge = TextStyle( + h4 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 34.sp, letterSpacing = 0.25.sp, ), - headlineMedium = TextStyle( - fontFamily = poppins, - fontWeight = FontWeight.Normal, - fontSize = 28.sp, - letterSpacing = 0.15.sp, - ), - headlineSmall = TextStyle( + h5 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 24.sp, letterSpacing = 0.sp, ), - titleLarge = TextStyle( + h6 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, - fontSize = 22.sp, + fontSize = 20.sp, letterSpacing = 0.15.sp, ), - titleMedium = TextStyle( + subtitle1 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.SemiBold, fontSize = 16.sp, letterSpacing = 0.15.sp, ), - titleSmall = TextStyle( + subtitle2 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Light, fontSize = 16.sp, letterSpacing = 0.1.sp, ), - bodyLarge = TextStyle( + body1 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 16.sp, letterSpacing = 0.5.sp, ), - bodyMedium = TextStyle( + body2 = TextStyle( fontFamily = poppins, fontWeight = FontWeight.Normal, fontSize = 14.sp, letterSpacing = 0.25.sp, ), - bodySmall = TextStyle( - fontFamily = poppins, - fontWeight = FontWeight.Normal, - fontSize = 12.sp, - letterSpacing = 0.4.sp, - ), - labelLarge = TextStyle( + button = TextStyle( fontFamily = poppins, fontWeight = FontWeight.SemiBold, fontSize = 14.sp, letterSpacing = 1.25.sp, ), - labelMedium = TextStyle( + caption = TextStyle( fontFamily = poppins, - fontWeight = FontWeight.Normal, + fontWeight = FontWeight.ExtraLight, fontSize = 12.sp, - letterSpacing = 0.5.sp, + letterSpacing = 0.4.sp, ), - labelSmall = TextStyle( + overline = TextStyle( fontFamily = poppins, - fontWeight = FontWeight.SemiBold, - fontSize = 11.sp, - letterSpacing = 0.4.sp, + fontWeight = FontWeight.Normal, + fontSize = 10.sp, + letterSpacing = 1.5.sp, ), ) } - -val Typography.h1: TextStyle get() = displayLarge -val Typography.h2: TextStyle get() = displayMedium -val Typography.h3: TextStyle get() = displaySmall -val Typography.h4: TextStyle get() = headlineLarge -val Typography.h5: TextStyle get() = headlineSmall -val Typography.h6: TextStyle get() = titleLarge -val Typography.subtitle1: TextStyle get() = titleMedium -val Typography.subtitle2: TextStyle get() = titleSmall -val Typography.body1: TextStyle get() = bodyLarge -val Typography.body2: TextStyle get() = bodyMedium -val Typography.button: TextStyle get() = labelLarge -val Typography.caption: TextStyle get() = bodySmall -val Typography.overline: TextStyle get() = labelSmall From 6e741b8c2bd7e96b8596f01fcb246211155bd2aa Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Sun, 7 Dec 2025 19:17:41 +0100 Subject: [PATCH 4/7] chore: limit material alpha version scope --- gradle/libs.versions.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dff3eb40..cc6a299f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,8 +7,9 @@ androidx-test = "1.7.0" androidx-test-runner = "1.7.0" androidx-test-ext = "1.3.0" biometric = "1.2.0-alpha05" -compose = "1.5.0-alpha09" -compose-androidx = "1.5.0-alpha09" +compose = "1.10.0-beta02" +compose-androidx = "1.9.5" +compose-material = "1.5.0-alpha09" immutable-collections = "0.4.0" coroutines = "1.10.2" agp = "8.10.1" @@ -19,7 +20,7 @@ kermit = "2.0.8" koin = "4.1.1" kotlin = "2.2.20" kotlinx-date-time = "0.6.1" -composeMaterialIconsExtended = "1.5.0-alpha09" +composeMaterialIconsExtended = "1.7.3" multiplatform-settings = "1.3.0" lifecycle-navigation3 = "2.10.0-alpha05" navigation3 = "1.0.0-alpha05" @@ -58,7 +59,7 @@ kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version kotlinx-coroutine-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } kotlinx-coroutine-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-date-time" } -compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose" } +compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose-material" } compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "composeMaterialIconsExtended" } compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" } russhwolf-multiplatform-settings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatform-settings" } From b0e60dc81fd26f3de25afbf5affab288c913f852 Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Sun, 7 Dec 2025 19:17:46 +0100 Subject: [PATCH 5/7] chore: correct material3 dependency --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cc6a299f..f969c8e2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -59,7 +59,7 @@ kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version kotlinx-coroutine-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } kotlinx-coroutine-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-date-time" } -compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose-material" } +compose-material = { module = "androidx.compose.material3:material3", version.ref = "compose-material" } compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "composeMaterialIconsExtended" } compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" } russhwolf-multiplatform-settings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatform-settings" } From c687b60f060093071d82c6c9d0b9eca521901078 Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Sun, 7 Dec 2025 20:06:06 +0100 Subject: [PATCH 6/7] chore: use jetbrains compose material --- gradle/libs.versions.toml | 5 +++-- shared/build.gradle.kts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f969c8e2..8f7d14e4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,7 +9,7 @@ androidx-test-ext = "1.3.0" biometric = "1.2.0-alpha05" compose = "1.10.0-beta02" compose-androidx = "1.9.5" -compose-material = "1.5.0-alpha09" +compose-material = "1.10.0-beta02" immutable-collections = "0.4.0" coroutines = "1.10.2" agp = "8.10.1" @@ -59,7 +59,8 @@ kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version kotlinx-coroutine-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } kotlinx-coroutine-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-date-time" } -compose-material = { module = "androidx.compose.material3:material3", version.ref = "compose-material" } +compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "compose" } +compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose" } compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "composeMaterialIconsExtended" } compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" } russhwolf-multiplatform-settings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatform-settings" } diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 7455a601..951d3143 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -54,6 +54,7 @@ kotlin { api(libs.compose.runtime) api(libs.compose.foundation) api(libs.compose.material) + api(libs.compose.material3) api(libs.compose.material.icons.extended) api(libs.compose.ui) api(libs.compose.components.resources) From d3ddddf0080f88f668a8023441466abe893036a5 Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Sun, 7 Dec 2025 20:06:13 +0100 Subject: [PATCH 7/7] chore: switch material imports to jetbrains compose --- shared/build.gradle.kts | 14 +++++------ .../moneyflow/navigation/MoneyFlowNavHost.kt | 12 +++++----- .../addtransaction/AddTransactionScreen.kt | 10 ++++---- .../addtransaction/components/DatePicker.kt | 20 ++++++++-------- .../components/IconTextClicableRow.kt | 8 +++---- .../addtransaction/components/MFTextField.kt | 10 ++++---- .../components/TransactionTypeTabBar.kt | 10 ++++---- .../alltransactions/AllTransactionsScreen.kt | 4 ++-- .../presentation/auth/AuthInProgressScreen.kt | 10 ++++---- .../presentation/budget/BudgetScreen.kt | 2 +- .../categories/CategoriesScreen.kt | 6 ++--- .../categories/components/CategoryCard.kt | 8 +++---- .../moneyflow/presentation/home/HomeScreen.kt | 24 +++++++++---------- .../home/components/HeaderNavigator.kt | 14 +++++------ .../presentation/home/components/HomeRecap.kt | 8 +++---- .../presentation/recap/RecapScreen.kt | 2 +- .../presentation/settings/SettingsScreen.kt | 8 +++---- .../ui/components/ArrowCircleIcon.kt | 4 ++-- .../moneyflow/ui/components/ErrorView.kt | 6 ++--- .../ui/components/HideableTextField.kt | 6 ++--- .../prof18/moneyflow/ui/components/Loader.kt | 4 ++-- .../moneyflow/ui/components/MFTopBar.kt | 16 ++++++------- .../moneyflow/ui/components/SwitchWithText.kt | 8 +++---- .../ui/components/TransactionCard.kt | 8 +++---- .../com/prof18/moneyflow/ui/style/Shape.kt | 2 +- .../com/prof18/moneyflow/ui/style/Theme.kt | 6 ++--- .../prof18/moneyflow/ui/style/Typography.kt | 2 +- 27 files changed, 116 insertions(+), 116 deletions(-) diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 951d3143..27e0571e 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -51,13 +51,13 @@ kotlin { val commonMain by getting { dependencies { - api(libs.compose.runtime) - api(libs.compose.foundation) - api(libs.compose.material) - api(libs.compose.material3) - api(libs.compose.material.icons.extended) - api(libs.compose.ui) - api(libs.compose.components.resources) + implementation(libs.compose.runtime) + implementation(libs.compose.foundation) + implementation(libs.compose.material) + implementation(libs.compose.material3) + implementation(libs.compose.material.icons.extended) + implementation(libs.compose.ui) + implementation(libs.compose.components.resources) implementation(libs.jetbrains.ui.tooling.preview) implementation(libs.androidx.lifecycle.viewmodel) diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt index 4202ab41..8e1f204c 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/navigation/MoneyFlowNavHost.kt @@ -6,12 +6,12 @@ import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.safeDrawing import androidx.compose.foundation.layout.size -import androidx.compose.material.BottomNavigation -import androidx.compose.material.BottomNavigationItem -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Scaffold -import androidx.compose.material.Text +import org.jetbrains.compose.material.BottomNavigation +import org.jetbrains.compose.material.BottomNavigationItem +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Scaffold +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.MutableState diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt index 416c2964..0779133d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/AddTransactionScreen.kt @@ -4,11 +4,11 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Scaffold -import androidx.compose.material.Surface -import androidx.compose.material.rememberScaffoldState +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Scaffold +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.rememberScaffoldState import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.State diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/DatePicker.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/DatePicker.kt index 033b4b21..b9f49e9a 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/DatePicker.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/DatePicker.kt @@ -9,16 +9,16 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width -import androidx.compose.material.AlertDialog -import androidx.compose.material.DropdownMenu -import androidx.compose.material.DropdownMenuItem -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text -import androidx.compose.material.TextButton -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.KeyboardArrowDown +import org.jetbrains.compose.material.AlertDialog +import org.jetbrains.compose.material.DropdownMenu +import org.jetbrains.compose.material.DropdownMenuItem +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text +import org.jetbrains.compose.material.TextButton +import org.jetbrains.compose.material.icons.Icons +import org.jetbrains.compose.material.icons.rounded.KeyboardArrowDown import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/IconTextClicableRow.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/IconTextClicableRow.kt index 46d86257..a8cb4e05 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/IconTextClicableRow.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/IconTextClicableRow.kt @@ -11,10 +11,10 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/MFTextField.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/MFTextField.kt index 491a58b0..8d6db269 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/MFTextField.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/MFTextField.kt @@ -2,11 +2,11 @@ package com.prof18.moneyflow.presentation.addtransaction.components import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.OutlinedTextField -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.OutlinedTextField +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/TransactionTypeTabBar.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/TransactionTypeTabBar.kt index fa5a9b4c..99058306 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/TransactionTypeTabBar.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/addtransaction/components/TransactionTypeTabBar.kt @@ -15,11 +15,11 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.TabPosition -import androidx.compose.material.TabRow -import androidx.compose.material.Text +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.TabPosition +import org.jetbrains.compose.material.TabRow +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/alltransactions/AllTransactionsScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/alltransactions/AllTransactionsScreen.kt index 0f911536..2b8eb4bd 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/alltransactions/AllTransactionsScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/alltransactions/AllTransactionsScreen.kt @@ -3,8 +3,8 @@ package com.prof18.moneyflow.presentation.alltransactions import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.material.Divider -import androidx.compose.material.Scaffold +import org.jetbrains.compose.material.Divider +import org.jetbrains.compose.material.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/auth/AuthInProgressScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/auth/AuthInProgressScreen.kt index f6c3742f..13442a4b 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/auth/AuthInProgressScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/auth/AuthInProgressScreen.kt @@ -5,11 +5,11 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.size -import androidx.compose.material.Button -import androidx.compose.material.CircularProgressIndicator -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.Button +import org.jetbrains.compose.material.CircularProgressIndicator +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/budget/BudgetScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/budget/BudgetScreen.kt index 72b896e6..9c241d15 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/budget/BudgetScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/budget/BudgetScreen.kt @@ -2,7 +2,7 @@ package com.prof18.moneyflow.presentation.budget import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.Text +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt index aab5e74b..2f355608 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/CategoriesScreen.kt @@ -4,9 +4,9 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material.Divider -import androidx.compose.material.Scaffold -import androidx.compose.material.Surface +import org.jetbrains.compose.material.Divider +import org.jetbrains.compose.material.Scaffold +import org.jetbrains.compose.material.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt index a166b92e..19ba4c7d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/categories/components/CategoryCard.kt @@ -8,10 +8,10 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/HomeScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/HomeScreen.kt index 9ffcccfb..914b2d45 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/HomeScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/HomeScreen.kt @@ -11,18 +11,18 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material.Divider -import androidx.compose.material.DropdownMenu -import androidx.compose.material.DropdownMenuItem -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material.icons.rounded.Visibility -import androidx.compose.material.icons.rounded.VisibilityOff +import org.jetbrains.compose.material.Divider +import org.jetbrains.compose.material.DropdownMenu +import org.jetbrains.compose.material.DropdownMenuItem +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.IconButton +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text +import org.jetbrains.compose.material.icons.Icons +import org.jetbrains.compose.material.icons.rounded.Add +import org.jetbrains.compose.material.icons.rounded.Visibility +import org.jetbrains.compose.material.icons.rounded.VisibilityOff import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HeaderNavigator.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HeaderNavigator.kt index 9c9b69b3..9b6197e2 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HeaderNavigator.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HeaderNavigator.kt @@ -5,13 +5,13 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.KeyboardArrowRight +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.IconButton +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text +import org.jetbrains.compose.material.icons.Icons +import org.jetbrains.compose.material.icons.automirrored.outlined.KeyboardArrowRight import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HomeRecap.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HomeRecap.kt index 1ddfbdd7..e129a12a 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HomeRecap.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/home/components/HomeRecap.kt @@ -12,10 +12,10 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/recap/RecapScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/recap/RecapScreen.kt index 3b92ecd9..c68e2828 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/recap/RecapScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/recap/RecapScreen.kt @@ -2,7 +2,7 @@ package com.prof18.moneyflow.presentation.recap import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.Text +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/settings/SettingsScreen.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/settings/SettingsScreen.kt index 8508db56..2edce3a7 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/settings/SettingsScreen.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/presentation/settings/SettingsScreen.kt @@ -3,10 +3,10 @@ package com.prof18.moneyflow.presentation.settings import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Scaffold -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Scaffold +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ArrowCircleIcon.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ArrowCircleIcon.kt index 7ab126e8..fd44ed55 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ArrowCircleIcon.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ArrowCircleIcon.kt @@ -5,8 +5,8 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.Icon -import androidx.compose.material.Surface +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt index b74d7d4b..5b56f879 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/ErrorView.kt @@ -5,9 +5,9 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt index 23d851a4..7be1145e 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/HideableTextField.kt @@ -1,8 +1,8 @@ package com.prof18.moneyflow.ui.components -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt index 355d88d2..e2ef6fb2 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/Loader.kt @@ -2,8 +2,8 @@ package com.prof18.moneyflow.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.CircularProgressIndicator -import androidx.compose.material.Surface +import org.jetbrains.compose.material.CircularProgressIndicator +import org.jetbrains.compose.material.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt index e9c98a1d..572045be 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/MFTopBar.kt @@ -2,14 +2,14 @@ package com.prof18.moneyflow.ui.components import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.width -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.material.TextButton -import androidx.compose.material.TopAppBar -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Close +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.IconButton +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Text +import org.jetbrains.compose.material.TextButton +import org.jetbrains.compose.material.TopAppBar +import org.jetbrains.compose.material.icons.Icons +import org.jetbrains.compose.material.icons.rounded.Close import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt index 2de5a2c9..d0b1822d 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/SwitchWithText.kt @@ -4,10 +4,10 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Switch -import androidx.compose.material.Text +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Switch +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/TransactionCard.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/TransactionCard.kt index 93cbc684..203c0bcc 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/TransactionCard.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/components/TransactionCard.kt @@ -11,10 +11,10 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import org.jetbrains.compose.material.Icon +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.Surface +import org.jetbrains.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt index b369666d..12e9e230 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Shape.kt @@ -1,7 +1,7 @@ package com.prof18.moneyflow.ui.style import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Shapes +import org.jetbrains.compose.material.Shapes import androidx.compose.ui.unit.dp internal val MoneyFlowShapes = Shapes( diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt index 4e3cb520..4141b8bb 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Theme.kt @@ -1,9 +1,9 @@ package com.prof18.moneyflow.ui.style import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.MaterialTheme -import androidx.compose.material.darkColors -import androidx.compose.material.lightColors +import org.jetbrains.compose.material.MaterialTheme +import org.jetbrains.compose.material.darkColors +import org.jetbrains.compose.material.lightColors import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color diff --git a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt index c14cbfbd..0c4a076f 100644 --- a/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt +++ b/shared/src/commonMain/kotlin/com/prof18/moneyflow/ui/style/Typography.kt @@ -1,6 +1,6 @@ package com.prof18.moneyflow.ui.style -import androidx.compose.material.Typography +import org.jetbrains.compose.material.Typography import androidx.compose.runtime.Composable import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily